UI: Refactorign chip

This commit is contained in:
Artem Dzhereleiko 2025-07-30 16:39:57 +03:00
parent 850bb69c4e
commit d4116e368d
6 changed files with 4 additions and 31 deletions

View File

@ -80,7 +80,7 @@
{{ 'entity.key' | translate }}
</mat-header-cell>
<mat-cell *matCellDef="let argument" class="w-1/4 xs:w-1/3">
<mat-chip>
<mat-chip class="tb-chip-row-ellipsis">
<div tbTruncateWithTooltip class="key-text">{{ argument.refEntityKey.key }}</div>
</mat-chip>
</mat-cell>

View File

@ -55,12 +55,6 @@
}
:host ::ng-deep {
.mat-mdc-standard-chip {
.mdc-evolution-chip__cell--primary, .mdc-evolution-chip__action--primary, .mdc-evolution-chip__text-label {
overflow: hidden;
}
}
.arguments-table:not(.arguments-table-with-error) {
.mdc-data-table__row:last-child .mat-mdc-cell {
border-bottom: none;

View File

@ -23,6 +23,7 @@
<mat-label *ngIf="label">{{ label }}</mat-label>
<mat-chip-grid #itemsChipList formControlName="items" [required]="required">
<mat-chip-row *ngFor="let item of itemList"
class="tb-chip-row-ellipsis"
[removable]="!disabled"
[contentEditable]="editable && !disabled"
(removed)="removeItems(item)">

View File

@ -1,22 +0,0 @@
/**
* Copyright © 2016-2025 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.tb-string-items-list {
.mat-mdc-standard-chip {
.mdc-evolution-chip__cell--primary, .mat-mdc-chip-action-label {
overflow: hidden;
}
}
}

View File

@ -39,7 +39,7 @@ export interface StringItemsOption {
@Component({
selector: 'tb-string-items-list',
templateUrl: './string-items-list.component.html',
styleUrls: ['./string-items-list.component.scss'],
styleUrls: [],
providers: [
{
provide: NG_VALUE_ACCESSOR,

View File

@ -1257,7 +1257,7 @@ pre.tb-highlight {
.tb-chip-row-ellipsis {
overflow: hidden;
.mdc-evolution-chip__cell--primary, .mdc-evolution-chip__text-label {
.mdc-evolution-chip__cell--primary, .mdc-evolution-chip__action--primary, .mdc-evolution-chip__text-label {
overflow: hidden;
}
}