Commit f2b10edf1e7e4cd8021774b8c244bec7c8c6620a
Committed by
GitHub
1 parent
7e66cb93
[3.0] Improvements import and tables for mobile view (#2594)
* Fix width table in Safari * Improvement in mobile view * Improvement attributes-table from mobile view * Relation-table improvement for mobile view * Improvement entity-table from mobile view
Showing
25 changed files
with
303 additions
and
137 deletions
... | ... | @@ -16,10 +16,10 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 18 | <form [formGroup]="alarmFormGroup" style="min-width: 600px;"> |
19 | - <mat-toolbar fxLayout="row" color="primary"> | |
19 | + <mat-toolbar color="primary"> | |
20 | 20 | <h2>{{ 'alarm.alarm-details' | translate }}</h2> |
21 | 21 | <span fxFlex></span> |
22 | - <button mat-button mat-icon-button | |
22 | + <button mat-icon-button | |
23 | 23 | (click)="close()" |
24 | 24 | type="button"> |
25 | 25 | <mat-icon class="material-icons">close</mat-icon> |
... | ... | @@ -91,7 +91,6 @@ |
91 | 91 | <div fxLayout="row" *ngIf="alarm$ | async; let alarm;"> |
92 | 92 | <button *ngIf="allowAcknowledgment && (alarm.status === alarmStatuses.ACTIVE_UNACK || |
93 | 93 | alarm.status === alarmStatuses.CLEARED_UNACK)" |
94 | - mat-button | |
95 | 94 | mat-raised-button |
96 | 95 | color="primary" |
97 | 96 | type="button" |
... | ... | @@ -102,7 +101,6 @@ |
102 | 101 | </button> |
103 | 102 | <button *ngIf="allowClear && (alarm.status === alarmStatuses.ACTIVE_ACK || |
104 | 103 | alarm.status === alarmStatuses.ACTIVE_UNACK)" |
105 | - mat-button | |
106 | 104 | mat-raised-button |
107 | 105 | color="primary" |
108 | 106 | type="button" |
... | ... | @@ -113,7 +111,6 @@ |
113 | 111 | </div> |
114 | 112 | <span fxFlex></span> |
115 | 113 | <button mat-button color="primary" |
116 | - style="margin-right: 20px;" | |
117 | 114 | type="button" |
118 | 115 | [disabled]="(isLoading$ | async)" |
119 | 116 | (click)="close()" cdkFocusInitial> | ... | ... |
... | ... | @@ -40,10 +40,6 @@ import { AlarmService } from '@app/core/http/alarm.service'; |
40 | 40 | import { DialogService } from '@core/services/dialog.service'; |
41 | 41 | import { AlarmTableHeaderComponent } from '@home/components/alarm/alarm-table-header.component'; |
42 | 42 | import { |
43 | - AuditLogDetailsDialogComponent, | |
44 | - AuditLogDetailsDialogData | |
45 | -} from '@home/components/audit-log/audit-log-details-dialog.component'; | |
46 | -import { | |
47 | 43 | AlarmDetailsDialogComponent, |
48 | 44 | AlarmDetailsDialogData |
49 | 45 | } from '@home/components/alarm/alarm-details-dialog.component'; | ... | ... |
... | ... | @@ -15,9 +15,9 @@ |
15 | 15 | limitations under the License. |
16 | 16 | |
17 | 17 | --> |
18 | -<mat-form-field class="mat-block" style="width: 200px;"> | |
18 | +<mat-form-field class="mat-block"> | |
19 | 19 | <mat-label translate>alarm.alarm-status</mat-label> |
20 | - <mat-select matInput [ngModel]="alarmTableConfig.searchStatus" | |
20 | + <mat-select [ngModel]="alarmTableConfig.searchStatus" | |
21 | 21 | (ngModelChange)="searchStatusChanged($event)"> |
22 | 22 | <mat-option *ngFor="let status of alarmSearchStatusTypes" [value]="status"> |
23 | 23 | {{ alarmSearchStatusTranslationsMap.get(alarmSearchStatusEnum[status]) | translate }} | ... | ... |
... | ... | @@ -13,16 +13,20 @@ |
13 | 13 | * See the License for the specific language governing permissions and |
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | +@import 'src/scss/constants'; | |
17 | + | |
16 | 18 | :host { |
17 | 19 | /* flex: 1; |
18 | 20 | display: flex; |
19 | 21 | justify-content: flex-start; */ |
20 | 22 | padding-right: 8px; |
23 | + min-width: 160px; | |
21 | 24 | } |
22 | 25 | |
23 | 26 | :host ::ng-deep { |
24 | 27 | mat-form-field { |
25 | 28 | font-size: 16px; |
29 | + width: 200px; | |
26 | 30 | |
27 | 31 | .mat-form-field-wrapper { |
28 | 32 | padding-bottom: 0; |
... | ... | @@ -31,5 +35,13 @@ |
31 | 35 | .mat-form-field-underline { |
32 | 36 | bottom: 0; |
33 | 37 | } |
38 | + | |
39 | + @media #{$mat-xs} { | |
40 | + width: 100%; | |
41 | + | |
42 | + .mat-form-field-infix { | |
43 | + width: auto !important; | |
44 | + } | |
45 | + } | |
34 | 46 | } |
35 | 47 | } | ... | ... |
... | ... | @@ -20,8 +20,6 @@ import { DatePipe } from '@angular/common'; |
20 | 20 | import { MatDialog } from '@angular/material/dialog'; |
21 | 21 | import { EntityId } from '@shared/models/id/entity-id'; |
22 | 22 | import { EntitiesTableComponent } from '@home/components/entity/entities-table.component'; |
23 | -import { Store } from '@ngrx/store'; | |
24 | -import { AppState } from '@core/core.state'; | |
25 | 23 | import { DialogService } from '@core/services/dialog.service'; |
26 | 24 | import { AlarmTableConfig } from './alarm-table-config'; |
27 | 25 | import { AlarmSearchStatus } from '@shared/models/alarm.models'; |
... | ... | @@ -70,8 +68,7 @@ export class AlarmTableComponent implements OnInit { |
70 | 68 | private dialogService: DialogService, |
71 | 69 | private translate: TranslateService, |
72 | 70 | private datePipe: DatePipe, |
73 | - private dialog: MatDialog, | |
74 | - private store: Store<AppState>) { | |
71 | + private dialog: MatDialog) { | |
75 | 72 | } |
76 | 73 | |
77 | 74 | ngOnInit() { | ... | ... |
... | ... | @@ -19,35 +19,37 @@ |
19 | 19 | <div fxFlex fxLayout="column" class="mat-elevation-z1 tb-entity-table-content"> |
20 | 20 | <mat-toolbar class="mat-table-toolbar" [fxShow]="mode === 'default' && !textSearchMode && dataSource.selection.isEmpty()"> |
21 | 21 | <div class="mat-toolbar-tools"> |
22 | - <span class="tb-entity-table-title">{{telemetryTypeTranslationsMap.get(attributeScope) | translate}}</span> | |
23 | - <mat-form-field class="mat-block tb-attribute-scope" style="width: 200px;" *ngIf="!disableAttributeScopeSelection"> | |
24 | - <mat-label translate>attribute.attributes-scope</mat-label> | |
25 | - <mat-select [disabled]="(isLoading$ | async) || attributeScopeSelectionReadonly" | |
26 | - matInput [ngModel]="attributeScope" | |
27 | - (ngModelChange)="attributeScopeChanged($event)"> | |
28 | - <mat-option *ngFor="let scope of attributeScopes" [value]="scope"> | |
29 | - {{ telemetryTypeTranslationsMap.get(toTelemetryTypeFunc(scope)) | translate }} | |
30 | - </mat-option> | |
31 | - </mat-select> | |
32 | - </mat-form-field> | |
22 | + <div fxLayout="row" fxLayoutAlign="start center" fxLayout.xs="column" fxLayoutAlign.xs="center start" class="title-container"> | |
23 | + <span class="tb-entity-table-title">{{telemetryTypeTranslationsMap.get(attributeScope) | translate}}</span> | |
24 | + <mat-form-field class="mat-block tb-attribute-scope" *ngIf="!disableAttributeScopeSelection"> | |
25 | + <mat-label translate>attribute.attributes-scope</mat-label> | |
26 | + <mat-select [disabled]="(isLoading$ | async) || attributeScopeSelectionReadonly" | |
27 | + [ngModel]="attributeScope" | |
28 | + (ngModelChange)="attributeScopeChanged($event)"> | |
29 | + <mat-option *ngFor="let scope of attributeScopes" [value]="scope"> | |
30 | + {{ telemetryTypeTranslationsMap.get(toTelemetryTypeFunc(scope)) | translate }} | |
31 | + </mat-option> | |
32 | + </mat-select> | |
33 | + </mat-form-field> | |
34 | + </div> | |
33 | 35 | <span fxFlex></span> |
34 | - <button *ngIf="!isClientSideTelemetryTypeMap.get(attributeScope)" | |
35 | - mat-button mat-icon-button | |
36 | + <button mat-icon-button | |
37 | + *ngIf="!isClientSideTelemetryTypeMap.get(attributeScope)" | |
36 | 38 | [disabled]="isLoading$ | async" |
37 | 39 | (click)="addAttribute($event)" |
38 | 40 | matTooltip="{{ 'action.add' | translate }}" |
39 | 41 | matTooltipPosition="above"> |
40 | 42 | <mat-icon>add</mat-icon> |
41 | 43 | </button> |
42 | - <button *ngIf="!isClientSideTelemetryTypeMap.get(attributeScope)" | |
43 | - mat-button mat-icon-button | |
44 | + <button mat-icon-button | |
45 | + *ngIf="!isClientSideTelemetryTypeMap.get(attributeScope)" | |
44 | 46 | [disabled]="isLoading$ | async" |
45 | 47 | (click)="reloadAttributes()" |
46 | 48 | matTooltip="{{ 'action.refresh' | translate }}" |
47 | 49 | matTooltipPosition="above"> |
48 | 50 | <mat-icon>refresh</mat-icon> |
49 | 51 | </button> |
50 | - <button mat-button mat-icon-button | |
52 | + <button mat-icon-button | |
51 | 53 | [disabled]="isLoading$ | async" |
52 | 54 | (click)="enterFilterMode()" |
53 | 55 | matTooltip="{{ 'action.search' | translate }}" |
... | ... | @@ -58,7 +60,7 @@ |
58 | 60 | </mat-toolbar> |
59 | 61 | <mat-toolbar class="mat-table-toolbar" [fxShow]="mode === 'default' && textSearchMode && dataSource.selection.isEmpty()"> |
60 | 62 | <div class="mat-toolbar-tools"> |
61 | - <button mat-button mat-icon-button | |
63 | + <button mat-icon-button | |
62 | 64 | matTooltip="{{ 'action.search' | translate }}" |
63 | 65 | matTooltipPosition="above"> |
64 | 66 | <mat-icon>search</mat-icon> |
... | ... | @@ -69,7 +71,7 @@ |
69 | 71 | [(ngModel)]="pageLink.textSearch" |
70 | 72 | placeholder="{{ 'common.enter-search' | translate }}"/> |
71 | 73 | </mat-form-field> |
72 | - <button mat-button mat-icon-button (click)="exitFilterMode()" | |
74 | + <button mat-icon-button (click)="exitFilterMode()" | |
73 | 75 | matTooltip="{{ 'action.close' | translate }}" |
74 | 76 | matTooltipPosition="above"> |
75 | 77 | <mat-icon>close</mat-icon> |
... | ... | @@ -77,23 +79,22 @@ |
77 | 79 | </div> |
78 | 80 | </mat-toolbar> |
79 | 81 | <mat-toolbar class="mat-table-toolbar" color="primary" [fxShow]="mode === 'default' && !dataSource.selection.isEmpty()"> |
80 | - <div class="mat-toolbar-tools"> | |
81 | - <span> | |
82 | - {{ translate.get( | |
83 | - attributeScope === latestTelemetryTypes.LATEST_TELEMETRY | |
84 | - ? 'attribute.selected-telemetry' : 'attribute.selected-attributes', | |
85 | - {count: dataSource.selection.selected.length}) | async }} | |
86 | - </span> | |
82 | + <div class="mat-toolbar-tools" fxLayout.xs="row wrap"> | |
83 | + <span class="tb-entity-table-info"> | |
84 | + {{ (attributeScope === latestTelemetryTypes.LATEST_TELEMETRY ? | |
85 | + 'attribute.selected-telemetry' : 'attribute.selected-attributes') | translate:{count: dataSource.selection.selected.length} }} | |
86 | + </span> | |
87 | 87 | <span fxFlex></span> |
88 | 88 | <button [fxShow]="!isClientSideTelemetryTypeMap.get(attributeScope)" |
89 | - mat-button mat-icon-button [disabled]="isLoading$ | async" | |
89 | + class="button-widget-action" | |
90 | + mat-icon-button [disabled]="isLoading$ | async" | |
90 | 91 | matTooltip="{{ 'action.delete' | translate }}" |
91 | 92 | matTooltipPosition="above" |
92 | 93 | (click)="deleteAttributes($event)"> |
93 | 94 | <mat-icon>delete</mat-icon> |
94 | 95 | </button> |
95 | - <button mat-button mat-raised-button | |
96 | - color="accent" | |
96 | + <button mat-raised-button color="accent" | |
97 | + class="button-widget-action" | |
97 | 98 | [disabled]="isLoading$ | async" |
98 | 99 | matTooltip="{{ 'attribute.show-on-widget' | translate }}" |
99 | 100 | matTooltipPosition="above" |
... | ... | @@ -104,7 +105,7 @@ |
104 | 105 | </div> |
105 | 106 | </mat-toolbar> |
106 | 107 | <mat-toolbar class="mat-table-toolbar" color="primary" [fxShow]="mode === 'widget'"> |
107 | - <div class="mat-toolbar-tools" fxLayoutGap="8px"> | |
108 | + <div class="mat-toolbar-tools" fxLayoutGap="8px" fxLayout.xs="row wrap"> | |
108 | 109 | <div fxFlex fxLayout="row" fxLayoutAlign="start"> |
109 | 110 | <span class="tb-details-subtitle">{{ 'widgets-bundle.current' | translate }}</span> |
110 | 111 | <tb-widgets-bundle-select fxFlexOffset="5" |
... | ... | @@ -115,8 +116,9 @@ |
115 | 116 | (ngModelChange)="onWidgetsBundleChanged()"> |
116 | 117 | </tb-widgets-bundle-select> |
117 | 118 | </div> |
118 | - <button mat-button mat-raised-button [fxShow]="widgetsList.length > 0" | |
119 | + <button mat-raised-button [fxShow]="widgetsList.length > 0" | |
119 | 120 | color="accent" |
121 | + class="button-widget-action" | |
120 | 122 | [disabled]="isLoading$ | async" |
121 | 123 | matTooltip="{{ 'attribute.add-to-dashboard' | translate }}" |
122 | 124 | matTooltipPosition="above" |
... | ... | @@ -124,7 +126,7 @@ |
124 | 126 | <mat-icon>dashboard</mat-icon> |
125 | 127 | <span translate>attribute.add-to-dashboard</span> |
126 | 128 | </button> |
127 | - <button mat-button mat-icon-button | |
129 | + <button mat-icon-button | |
128 | 130 | [disabled]="isLoading$ | async" |
129 | 131 | matTooltip="{{ 'action.close' | translate }}" |
130 | 132 | matTooltipPosition="above" |
... | ... | @@ -134,7 +136,7 @@ |
134 | 136 | </div> |
135 | 137 | </mat-toolbar> |
136 | 138 | <div fxFlex class="table-container" [fxShow]="mode !== 'widget'"> |
137 | - <mat-table [dataSource]="dataSource" | |
139 | + <table mat-table [dataSource]="dataSource" | |
138 | 140 | matSort [matSortActive]="pageLink.sortOrder.property" [matSortDirection]="pageLink.sortDirection()" matSortDisableClear> |
139 | 141 | <ng-container matColumnDef="select" sticky> |
140 | 142 | <mat-header-cell *matHeaderCellDef style="width: 30px;"> |
... | ... | @@ -167,7 +169,7 @@ |
167 | 169 | <mat-cell *matCellDef="let attribute" |
168 | 170 | class="tb-value-cell" |
169 | 171 | (click)="editAttribute($event, attribute)"> |
170 | - <div fxLayout="row"> | |
172 | + <div fxLayout="row" style="align-items: center"> | |
171 | 173 | <span fxFlex>{{attribute.value | tbJson}}</span> |
172 | 174 | <span [fxShow]="!isClientSideTelemetryTypeMap.get(attributeScope)"> |
173 | 175 | <mat-icon>edit</mat-icon> |
... | ... | @@ -179,7 +181,7 @@ |
179 | 181 | <mat-row [ngClass]="{'mat-row-select': true, |
180 | 182 | 'mat-selected': dataSource.selection.isSelected(attribute)}" |
181 | 183 | *matRowDef="let attribute; columns: displayedColumns;" (click)="dataSource.selection.toggle(attribute)"></mat-row> |
182 | - </mat-table> | |
184 | + </table> | |
183 | 185 | <span [fxShow]="dataSource.isEmpty() | async" |
184 | 186 | fxLayoutAlign="center center" |
185 | 187 | class="no-data-found" translate>{{ |
... | ... | @@ -218,14 +220,16 @@ |
218 | 220 | </section> |
219 | 221 | |
220 | 222 | <ng-template #carouselPrev> |
221 | - <button mat-button mat-icon-button *ngIf="widgetsCarouselIndex > 0" | |
223 | + <button mat-icon-button | |
224 | + *ngIf="widgetsCarouselIndex > 0" | |
222 | 225 | matTooltip="{{ 'attribute.prev-widget' | translate }}" |
223 | 226 | matTooltipPosition="above"> |
224 | 227 | <mat-icon>keyboard_arrow_left</mat-icon> |
225 | 228 | </button> |
226 | 229 | </ng-template> |
227 | 230 | <ng-template #carouselNext> |
228 | - <button mat-button mat-icon-button *ngIf="widgetsCarouselIndex < widgetsList.length - 1" | |
231 | + <button mat-icon-button | |
232 | + *ngIf="widgetsCarouselIndex < widgetsList.length - 1" | |
229 | 233 | matTooltip="{{ 'attribute.next-widget' | translate }}" |
230 | 234 | matTooltipPosition="above"> |
231 | 235 | <mat-icon>keyboard_arrow_right</mat-icon> |
... | ... | @@ -241,13 +245,11 @@ |
241 | 245 | <span translate *ngIf="mode === 'widget' && widgetsLoaded && |
242 | 246 | widgetsList.length === 0 && |
243 | 247 | widgetsBundle" |
244 | - fxLayoutAlign="center center" | |
245 | - fxFlex | |
248 | + fxFlex fxLayoutAlign="center center" | |
246 | 249 | style="text-transform: uppercase; display: flex;" |
247 | 250 | class="mat-headline">widgets-bundle.empty</span> |
248 | 251 | <span translate *ngIf="mode === 'widget' && !widgetsBundle" |
249 | - fxLayoutAlign="center center" | |
250 | - fxFlex | |
252 | + fxFlex fxLayoutAlign="center center" | |
251 | 253 | style="text-transform: uppercase; display: flex;" |
252 | 254 | class="mat-headline">widget.select-widgets-bundle</span> |
253 | 255 | </div> | ... | ... |
... | ... | @@ -13,6 +13,8 @@ |
13 | 13 | * See the License for the specific language governing permissions and |
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | +@import 'src/scss/constants'; | |
17 | + | |
16 | 18 | :host { |
17 | 19 | width: 100%; |
18 | 20 | height: 100%; |
... | ... | @@ -22,6 +24,14 @@ |
22 | 24 | height: 100%; |
23 | 25 | background: #fff; |
24 | 26 | |
27 | + .mat-toolbar-tools{ | |
28 | + min-height: auto; | |
29 | + } | |
30 | + | |
31 | + .title-container{ | |
32 | + overflow: hidden; | |
33 | + } | |
34 | + | |
25 | 35 | .tb-entity-table-title { |
26 | 36 | padding-right: 20px; |
27 | 37 | white-space: nowrap; |
... | ... | @@ -32,6 +42,30 @@ |
32 | 42 | .table-container { |
33 | 43 | overflow: auto; |
34 | 44 | } |
45 | + | |
46 | + .tb-entity-table-info{ | |
47 | + white-space: nowrap; | |
48 | + overflow: hidden; | |
49 | + text-overflow: ellipsis; | |
50 | + } | |
51 | + | |
52 | + .button-widget-action{ | |
53 | + margin-left: auto; | |
54 | + overflow: hidden; | |
55 | + text-overflow: ellipsis; | |
56 | + } | |
57 | + } | |
58 | + } | |
59 | + | |
60 | + @media #{$mat-xs} { | |
61 | + .mat-toolbar { | |
62 | + height: auto; | |
63 | + min-height: 100px; | |
64 | + | |
65 | + .tb-entity-table-title{ | |
66 | + padding-bottom: 5px; | |
67 | + width: 100%; | |
68 | + } | |
35 | 69 | } |
36 | 70 | } |
37 | 71 | } |
... | ... | @@ -42,6 +76,7 @@ |
42 | 76 | } |
43 | 77 | mat-form-field.tb-attribute-scope { |
44 | 78 | font-size: 16px; |
79 | + width: 200px; | |
45 | 80 | |
46 | 81 | .mat-form-field-wrapper { |
47 | 82 | padding-bottom: 0; |
... | ... | @@ -50,6 +85,14 @@ |
50 | 85 | .mat-form-field-underline { |
51 | 86 | bottom: 0; |
52 | 87 | } |
88 | + | |
89 | + @media #{$mat-xs} { | |
90 | + width: 100%; | |
91 | + | |
92 | + .mat-form-field-infix { | |
93 | + width: auto !important; | |
94 | + } | |
95 | + } | |
53 | 96 | } |
54 | 97 | mat-cell.tb-value-cell { |
55 | 98 | cursor: pointer; | ... | ... |
... | ... | @@ -45,7 +45,8 @@ import { |
45 | 45 | isClientSideTelemetryType, |
46 | 46 | LatestTelemetry, |
47 | 47 | TelemetryType, |
48 | - telemetryTypeTranslations, toTelemetryType | |
48 | + telemetryTypeTranslations, | |
49 | + toTelemetryType | |
49 | 50 | } from '@shared/models/telemetry/telemetry.models'; |
50 | 51 | import { AttributeDatasource } from '@home/models/datasource/attribute-datasource'; |
51 | 52 | import { AttributeService } from '@app/core/http/attribute.service'; |
... | ... | @@ -297,6 +298,9 @@ export class AttributeTableComponent extends PageComponent implements AfterViewI |
297 | 298 | if ($event) { |
298 | 299 | $event.stopPropagation(); |
299 | 300 | } |
301 | + if (this.attributeScope === LatestTelemetry.LATEST_TELEMETRY){ | |
302 | + return; | |
303 | + } | |
300 | 304 | const target = $event.target || $event.srcElement || $event.currentTarget; |
301 | 305 | const config = new OverlayConfig(); |
302 | 306 | config.backdropClass = 'cdk-overlay-transparent-backdrop'; | ... | ... |
... | ... | @@ -36,12 +36,14 @@ |
36 | 36 | <div fxLayout="column" class="mat-elevation-z1 tb-entity-table-content"> |
37 | 37 | <mat-toolbar class="mat-table-toolbar" [fxShow]="!textSearchMode && dataSource.selection.isEmpty()"> |
38 | 38 | <div class="mat-toolbar-tools"> |
39 | - <span *ngIf="entitiesTableConfig.tableTitle" class="tb-entity-table-title">{{ entitiesTableConfig.tableTitle }}</span> | |
40 | - <tb-anchor #entityTableHeader></tb-anchor> | |
41 | - <tb-timewindow *ngIf="entitiesTableConfig.useTimePageLink" [(ngModel)]="timewindow" | |
42 | - (ngModelChange)="onTimewindowChange()" | |
43 | - asButton historyOnly></tb-timewindow> | |
44 | - <span fxFlex *ngIf="!entitiesTableConfig.headerComponent || entitiesTableConfig.useTimePageLink"></span> | |
39 | + <div fxLayout="row" fxLayoutAlign="start center" fxLayout.xs="column" fxLayoutAlign.xs="center start" class="title-container"> | |
40 | + <span *ngIf="entitiesTableConfig.tableTitle" class="tb-entity-table-title">{{ entitiesTableConfig.tableTitle }}</span> | |
41 | + <tb-anchor #entityTableHeader></tb-anchor> | |
42 | + <tb-timewindow *ngIf="entitiesTableConfig.useTimePageLink" [(ngModel)]="timewindow" | |
43 | + (ngModelChange)="onTimewindowChange()" | |
44 | + asButton historyOnly></tb-timewindow> | |
45 | + </div> | |
46 | + <span fxFlex></span> | |
45 | 47 | <div [fxShow]="addEnabled()"> |
46 | 48 | <button mat-icon-button [disabled]="isLoading$ | async" |
47 | 49 | *ngIf="!entitiesTableConfig.addActionDescriptors.length; else addActions" |
... | ... | @@ -120,9 +122,9 @@ |
120 | 122 | </mat-toolbar> |
121 | 123 | <mat-toolbar *ngIf="entitiesTableConfig.selectionEnabled" class="mat-table-toolbar" color="primary" [fxShow]="!dataSource.selection.isEmpty()"> |
122 | 124 | <div class="mat-toolbar-tools"> |
123 | - <span> | |
124 | - {{ translate.get(translations.selectedEntities, {count: dataSource.selection.selected.length}) | async }} | |
125 | - </span> | |
125 | + <span class="tb-entity-table-info"> | |
126 | + {{ translations.selectedEntities | translate:{count: dataSource.selection.selected.length} }} | |
127 | + </span> | |
126 | 128 | <span fxFlex></span> |
127 | 129 | <button mat-icon-button [disabled]="isLoading$ | async" |
128 | 130 | [fxShow]="actionDescriptor.isEnabled" *ngFor="let actionDescriptor of groupActionDescriptors" | ... | ... |
... | ... | @@ -13,6 +13,8 @@ |
13 | 13 | * See the License for the specific language governing permissions and |
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | +@import 'src/scss/constants'; | |
17 | + | |
16 | 18 | :host { |
17 | 19 | width: 100%; |
18 | 20 | height: 100%; |
... | ... | @@ -22,6 +24,14 @@ |
22 | 24 | height: 100%; |
23 | 25 | background: #fff; |
24 | 26 | |
27 | + .mat-toolbar-tools{ | |
28 | + min-height: auto; | |
29 | + } | |
30 | + | |
31 | + .title-container{ | |
32 | + overflow: hidden; | |
33 | + } | |
34 | + | |
25 | 35 | .tb-entity-table-title { |
26 | 36 | padding-right: 20px; |
27 | 37 | white-space: nowrap; |
... | ... | @@ -32,6 +42,24 @@ |
32 | 42 | .table-container { |
33 | 43 | overflow: auto; |
34 | 44 | } |
45 | + | |
46 | + .tb-entity-table-info{ | |
47 | + white-space: nowrap; | |
48 | + overflow: hidden; | |
49 | + text-overflow: ellipsis; | |
50 | + } | |
51 | + } | |
52 | + } | |
53 | + | |
54 | + @media #{$mat-xs} { | |
55 | + .mat-toolbar { | |
56 | + height: auto; | |
57 | + min-height: 100px; | |
58 | + | |
59 | + .tb-entity-table-title{ | |
60 | + padding-bottom: 5px; | |
61 | + width: 100%; | |
62 | + } | |
35 | 63 | } |
36 | 64 | } |
37 | 65 | } | ... | ... |
... | ... | @@ -15,9 +15,9 @@ |
15 | 15 | limitations under the License. |
16 | 16 | |
17 | 17 | --> |
18 | -<mat-form-field class="mat-block" style="width: 200px;"> | |
18 | +<mat-form-field class="mat-block"> | |
19 | 19 | <mat-label translate>event.event-type</mat-label> |
20 | - <mat-select matInput [ngModel]="eventTableConfig.eventType" | |
20 | + <mat-select [ngModel]="eventTableConfig.eventType" | |
21 | 21 | (ngModelChange)="eventTypeChanged($event)"> |
22 | 22 | <mat-option *ngFor="let type of eventTableConfig.eventTypes" [value]="type"> |
23 | 23 | {{ eventTypeTranslationsMap.get(type) | translate }} | ... | ... |
... | ... | @@ -13,16 +13,20 @@ |
13 | 13 | * See the License for the specific language governing permissions and |
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | +@import 'src/scss/constants'; | |
17 | + | |
16 | 18 | :host { |
17 | 19 | /* flex: 1; |
18 | 20 | display: flex; |
19 | 21 | justify-content: flex-start; */ |
20 | 22 | padding-right: 8px; |
23 | + min-width: 160px; | |
21 | 24 | } |
22 | 25 | |
23 | 26 | :host ::ng-deep { |
24 | 27 | mat-form-field { |
25 | 28 | font-size: 16px; |
29 | + width: 200px; | |
26 | 30 | |
27 | 31 | .mat-form-field-wrapper { |
28 | 32 | padding-bottom: 0; |
... | ... | @@ -31,5 +35,13 @@ |
31 | 35 | .mat-form-field-underline { |
32 | 36 | bottom: 0; |
33 | 37 | } |
38 | + | |
39 | + @media #{$mat-xs} { | |
40 | + width: 100%; | |
41 | + | |
42 | + .mat-form-field-infix { | |
43 | + width: auto !important; | |
44 | + } | |
45 | + } | |
34 | 46 | } |
35 | 47 | } | ... | ... |
... | ... | @@ -15,20 +15,11 @@ |
15 | 15 | /// |
16 | 16 | |
17 | 17 | import { Component, Input, OnInit, ViewChild } from '@angular/core'; |
18 | -import { AuditLogService } from '@core/http/audit-log.service'; | |
19 | 18 | import { TranslateService } from '@ngx-translate/core'; |
20 | 19 | import { DatePipe } from '@angular/common'; |
21 | 20 | import { MatDialog } from '@angular/material/dialog'; |
22 | -import { AuditLogMode } from '@shared/models/audit-log.models'; | |
23 | 21 | import { EntityId } from '@shared/models/id/entity-id'; |
24 | -import { UserId } from '@shared/models/id/user-id'; | |
25 | -import { CustomerId } from '@shared/models/id/customer-id'; | |
26 | -import { AuditLogTableConfig } from '@home/components/audit-log/audit-log-table-config'; | |
27 | 22 | import { EntitiesTableComponent } from '@home/components/entity/entities-table.component'; |
28 | -import { Store } from '@ngrx/store'; | |
29 | -import { AppState } from '@core/core.state'; | |
30 | -import { Authority } from '@shared/models/authority.enum'; | |
31 | -import { getCurrentAuthUser } from '@core/auth/auth.selectors'; | |
32 | 23 | import { EventTableConfig } from './event-table-config'; |
33 | 24 | import { EventService } from '@core/http/event.service'; |
34 | 25 | import { DialogService } from '@core/services/dialog.service'; |
... | ... | @@ -89,8 +80,7 @@ export class EventTableComponent implements OnInit { |
89 | 80 | private dialogService: DialogService, |
90 | 81 | private translate: TranslateService, |
91 | 82 | private datePipe: DatePipe, |
92 | - private dialog: MatDialog, | |
93 | - private store: Store<AppState>) { | |
83 | + private dialog: MatDialog) { | |
94 | 84 | } |
95 | 85 | |
96 | 86 | ngOnInit() { | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 18 | <form> |
19 | - <mat-toolbar color="primary"> | |
19 | + <mat-toolbar fxLayout="row" color="primary"> | |
20 | 20 | <h2 translate>{{ importTitle }}</h2> |
21 | 21 | <span fxFlex></span> |
22 | 22 | <div [tb-help]="'entitiesImport'"></div> |
... | ... | @@ -76,18 +76,19 @@ |
76 | 76 | </div> |
77 | 77 | </fieldset> |
78 | 78 | </form> |
79 | - <div fxLayout="row" fxLayoutGap="20px"> | |
79 | + <div fxLayout="row wrap" fxLayoutAlign="space-between center"> | |
80 | 80 | <button mat-button |
81 | 81 | [disabled]="(isLoading$ | async)" |
82 | 82 | (click)="previousStep()">{{ 'action.back' | translate }}</button> |
83 | - <span fxFlex></span> | |
84 | - <button mat-button | |
85 | - [disabled]="(isLoading$ | async)" | |
86 | - (click)="cancel()">{{ 'action.cancel' | translate }}</button> | |
87 | - <button mat-raised-button | |
88 | - [disabled]="(isLoading$ | async)" | |
89 | - color="primary" | |
90 | - (click)="nextStep(3)">{{ 'action.continue' | translate }}</button> | |
83 | + <div fxLayout="row wrap" fxLayoutGap="20px"> | |
84 | + <button mat-button | |
85 | + [disabled]="(isLoading$ | async)" | |
86 | + (click)="cancel()">{{ 'action.cancel' | translate }}</button> | |
87 | + <button mat-raised-button | |
88 | + [disabled]="(isLoading$ | async)" | |
89 | + color="primary" | |
90 | + (click)="nextStep(3)">{{ 'action.continue' | translate }}</button> | |
91 | + </div> | |
91 | 92 | </div> |
92 | 93 | </mat-step> |
93 | 94 | <mat-step [stepControl]="columnTypesFormGroup"> |
... | ... | @@ -95,18 +96,19 @@ |
95 | 96 | <ng-template matStepLabel>{{ 'import.stepper-text.column-type' | translate }}</ng-template> |
96 | 97 | <tb-table-columns-assignment formControlName="columnsParam" [entityType]="entityType"></tb-table-columns-assignment> |
97 | 98 | </form> |
98 | - <div fxLayout="row" fxLayoutGap="20px"> | |
99 | + <div fxLayout="row wrap" fxLayoutAlign="space-between center"> | |
99 | 100 | <button mat-button |
100 | 101 | [disabled]="(isLoading$ | async)" |
101 | 102 | (click)="previousStep()">{{ 'action.back' | translate }}</button> |
102 | - <span fxFlex></span> | |
103 | - <button mat-button | |
104 | - [disabled]="(isLoading$ | async)" | |
105 | - (click)="cancel()">{{ 'action.cancel' | translate }}</button> | |
106 | - <button mat-raised-button | |
107 | - [disabled]="(isLoading$ | async) || columnTypesFormGroup.invalid || !columnTypesFormGroup.dirty" | |
108 | - color="primary" | |
109 | - (click)="nextStep(4)">{{ 'action.continue' | translate }}</button> | |
103 | + <div fxLayout="row wrap" fxLayoutGap="20px"> | |
104 | + <button mat-button | |
105 | + [disabled]="(isLoading$ | async)" | |
106 | + (click)="cancel()">{{ 'action.cancel' | translate }}</button> | |
107 | + <button mat-raised-button | |
108 | + [disabled]="(isLoading$ | async) || columnTypesFormGroup.invalid || !columnTypesFormGroup.dirty" | |
109 | + color="primary" | |
110 | + (click)="nextStep(4)">{{ 'action.continue' | translate }}</button> | |
111 | + </div> | |
110 | 112 | </div> |
111 | 113 | </mat-step> |
112 | 114 | <mat-step> | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 18 | <form #importForm="ngForm" [formGroup]="importFormGroup" (ngSubmit)="importFromJson()"> |
19 | - <mat-toolbar fxLayout="row" color="primary"> | |
19 | + <mat-toolbar color="primary"> | |
20 | 20 | <h2 translate>{{ importTitle }}</h2> |
21 | 21 | <span fxFlex></span> |
22 | 22 | <button mat-button mat-icon-button |
... | ... | @@ -42,15 +42,13 @@ |
42 | 42 | </div> |
43 | 43 | </fieldset> |
44 | 44 | </div> |
45 | - <div mat-dialog-actions fxLayout="row"> | |
46 | - <span fxFlex></span> | |
47 | - <button mat-button mat-raised-button color="primary" | |
45 | + <div mat-dialog-actions fxLayoutAlign="end center"> | |
46 | + <button mat-raised-button color="primary" | |
48 | 47 | type="submit" |
49 | 48 | [disabled]="(isLoading$ | async) || importFormGroup.invalid || !importFormGroup.dirty"> |
50 | 49 | {{ 'action.import' | translate }} |
51 | 50 | </button> |
52 | 51 | <button mat-button color="primary" |
53 | - style="margin-right: 20px;" | |
54 | 52 | type="button" |
55 | 53 | [disabled]="(isLoading$ | async)" |
56 | 54 | (click)="cancel()" cdkFocusInitial> | ... | ... |
... | ... | @@ -23,13 +23,13 @@ |
23 | 23 | </mat-cell> |
24 | 24 | </ng-container> |
25 | 25 | <ng-container matColumnDef="sampleData"> |
26 | - <mat-header-cell *matHeaderCellDef style="width: 30%"> {{ 'import.column-example' | translate }} </mat-header-cell> | |
26 | + <mat-header-cell *matHeaderCellDef style="flex: 0 0 30%;"> {{ 'import.column-example' | translate }} </mat-header-cell> | |
27 | 27 | <mat-cell *matCellDef="let column"> |
28 | 28 | {{column.sampleData}} |
29 | 29 | </mat-cell> |
30 | 30 | </ng-container> |
31 | 31 | <ng-container matColumnDef="type"> |
32 | - <mat-header-cell *matHeaderCellDef style="width: 40%"> {{ 'import.column-type.column-type' | translate }} </mat-header-cell> | |
32 | + <mat-header-cell *matHeaderCellDef style="flex: 0 0 40%"> {{ 'import.column-type.column-type' | translate }} </mat-header-cell> | |
33 | 33 | <mat-cell *matCellDef="let column"> |
34 | 34 | <mat-select matInput [(ngModel)]="column.type" (ngModelChange)="columnsUpdated()"> |
35 | 35 | <mat-option *ngFor="let type of columnTypes" [value]="type.value" [disabled]="type.disabled"> |
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | </mat-cell> |
40 | 40 | </ng-container> |
41 | 41 | <ng-container matColumnDef="key"> |
42 | - <mat-header-cell *matHeaderCellDef style="width: 30%"> {{ 'import.column-key' | translate }} </mat-header-cell> | |
42 | + <mat-header-cell *matHeaderCellDef style="flex: 0 0 30%"> {{ 'import.column-key' | translate }} </mat-header-cell> | |
43 | 43 | <mat-cell *matCellDef="let column"> |
44 | 44 | <mat-form-field floatLabel="always" hideRequiredMarker |
45 | 45 | *ngIf="isColumnTypeDiffers(column.type)"> | ... | ... |
... | ... | @@ -19,30 +19,33 @@ |
19 | 19 | <div fxFlex fxLayout="column" class="mat-elevation-z1 tb-entity-table-content"> |
20 | 20 | <mat-toolbar class="mat-table-toolbar" [fxShow]="!textSearchMode && dataSource.selection.isEmpty()"> |
21 | 21 | <div class="mat-toolbar-tools"> |
22 | - <span class="tb-entity-table-title">{{(direction == directions.FROM ? | |
23 | - 'relation.from-relations' : 'relation.to-relations') | translate}}</span> | |
24 | - <mat-form-field class="mat-block tb-relation-direction" style="width: 200px;"> | |
25 | - <mat-label translate>relation.direction</mat-label> | |
26 | - <mat-select matInput [ngModel]="direction" | |
27 | - (ngModelChange)="directionChanged($event)"> | |
28 | - <mat-option *ngFor="let type of directionTypes" [value]="type"> | |
29 | - {{ directionTypeTranslations.get(directions[type]) | translate }} | |
30 | - </mat-option> | |
31 | - </mat-select> | |
32 | - </mat-form-field> | |
22 | + <div fxLayout="row" fxLayoutAlign="start center" fxLayout.xs="column" fxLayoutAlign.xs="center start" class="title-container"> | |
23 | + <span class="tb-entity-table-title"> | |
24 | + {{(direction == directions.FROM ? 'relation.from-relations' : 'relation.to-relations') | translate}} | |
25 | + </span> | |
26 | + <mat-form-field class="mat-block tb-relation-direction"> | |
27 | + <mat-label translate>relation.direction</mat-label> | |
28 | + <mat-select [ngModel]="direction" | |
29 | + (ngModelChange)="directionChanged($event)"> | |
30 | + <mat-option *ngFor="let type of directionTypes" [value]="type"> | |
31 | + {{ directionTypeTranslations.get(directions[type]) | translate }} | |
32 | + </mat-option> | |
33 | + </mat-select> | |
34 | + </mat-form-field> | |
35 | + </div> | |
33 | 36 | <span fxFlex></span> |
34 | - <button mat-button mat-icon-button [disabled]="isLoading$ | async" | |
37 | + <button mat-icon-button [disabled]="isLoading$ | async" | |
35 | 38 | (click)="addRelation($event)" |
36 | 39 | matTooltip="{{ 'action.add' | translate }}" |
37 | 40 | matTooltipPosition="above"> |
38 | 41 | <mat-icon>add</mat-icon> |
39 | 42 | </button> |
40 | - <button mat-button mat-icon-button [disabled]="isLoading$ | async" (click)="reloadRelations()" | |
43 | + <button mat-icon-button [disabled]="isLoading$ | async" (click)="reloadRelations()" | |
41 | 44 | matTooltip="{{ 'action.refresh' | translate }}" |
42 | 45 | matTooltipPosition="above"> |
43 | 46 | <mat-icon>refresh</mat-icon> |
44 | 47 | </button> |
45 | - <button mat-button mat-icon-button [disabled]="isLoading$ | async" (click)="enterFilterMode()" | |
48 | + <button mat-icon-button [disabled]="isLoading$ | async" (click)="enterFilterMode()" | |
46 | 49 | matTooltip="{{ 'action.search' | translate }}" |
47 | 50 | matTooltipPosition="above"> |
48 | 51 | <mat-icon>search</mat-icon> |
... | ... | @@ -51,7 +54,7 @@ |
51 | 54 | </mat-toolbar> |
52 | 55 | <mat-toolbar class="mat-table-toolbar" [fxShow]="textSearchMode && dataSource.selection.isEmpty()"> |
53 | 56 | <div class="mat-toolbar-tools"> |
54 | - <button mat-button mat-icon-button | |
57 | + <button mat-icon-button | |
55 | 58 | matTooltip="{{ 'action.search' | translate }}" |
56 | 59 | matTooltipPosition="above"> |
57 | 60 | <mat-icon>search</mat-icon> |
... | ... | @@ -62,7 +65,7 @@ |
62 | 65 | [(ngModel)]="pageLink.textSearch" |
63 | 66 | placeholder="{{ 'common.enter-search' | translate }}"/> |
64 | 67 | </mat-form-field> |
65 | - <button mat-button mat-icon-button (click)="exitFilterMode()" | |
68 | + <button mat-icon-button (click)="exitFilterMode()" | |
66 | 69 | matTooltip="{{ 'action.close' | translate }}" |
67 | 70 | matTooltipPosition="above"> |
68 | 71 | <mat-icon>close</mat-icon> |
... | ... | @@ -70,12 +73,11 @@ |
70 | 73 | </div> |
71 | 74 | </mat-toolbar> |
72 | 75 | <mat-toolbar class="mat-table-toolbar" color="primary" [fxShow]="!dataSource.selection.isEmpty()"> |
73 | - <div class="mat-toolbar-tools"> | |
74 | - <span> | |
75 | - {{ translate.get('relation.selected-relations', {count: dataSource.selection.selected.length}) | async }} | |
76 | - </span> | |
77 | - <span fxFlex></span> | |
78 | - <button mat-button mat-icon-button [disabled]="isLoading$ | async" | |
76 | + <div class="mat-toolbar-tools" fxLayoutAlign="space-between center"> | |
77 | + <span class="tb-entity-table-info"> | |
78 | + {{ 'relation.selected-relations' | translate:{count: dataSource.selection.selected.length} }} | |
79 | + </span> | |
80 | + <button mat-icon-button [disabled]="isLoading$ | async" | |
79 | 81 | matTooltip="{{ 'action.delete' | translate }}" |
80 | 82 | matTooltipPosition="above" |
81 | 83 | (click)="deleteRelations($event)"> |
... | ... | @@ -135,13 +137,13 @@ |
135 | 137 | </mat-header-cell> |
136 | 138 | <mat-cell *matCellDef="let relation"> |
137 | 139 | <div fxFlex fxLayout="row" fxLayoutAlign="end"> |
138 | - <button mat-button mat-icon-button [disabled]="isLoading$ | async" | |
140 | + <button mat-icon-button [disabled]="isLoading$ | async" | |
139 | 141 | matTooltip="{{ 'relation.edit' | translate }}" |
140 | 142 | matTooltipPosition="above" |
141 | 143 | (click)="editRelation($event, relation)"> |
142 | 144 | <mat-icon>edit</mat-icon> |
143 | 145 | </button> |
144 | - <button mat-button mat-icon-button [disabled]="isLoading$ | async" | |
146 | + <button mat-icon-button [disabled]="isLoading$ | async" | |
145 | 147 | matTooltip="{{ 'relation.delete' | translate }}" |
146 | 148 | matTooltipPosition="above" |
147 | 149 | (click)="deleteRelation($event, relation)"> | ... | ... |
... | ... | @@ -13,6 +13,8 @@ |
13 | 13 | * See the License for the specific language governing permissions and |
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | +@import 'src/scss/constants'; | |
17 | + | |
16 | 18 | :host { |
17 | 19 | width: 100%; |
18 | 20 | height: 100%; |
... | ... | @@ -22,6 +24,14 @@ |
22 | 24 | height: 100%; |
23 | 25 | background: #fff; |
24 | 26 | |
27 | + .mat-toolbar-tools{ | |
28 | + min-height: auto; | |
29 | + } | |
30 | + | |
31 | + .title-container{ | |
32 | + overflow: hidden; | |
33 | + } | |
34 | + | |
25 | 35 | .tb-entity-table-title { |
26 | 36 | padding-right: 20px; |
27 | 37 | white-space: nowrap; |
... | ... | @@ -32,6 +42,24 @@ |
32 | 42 | .table-container { |
33 | 43 | overflow: auto; |
34 | 44 | } |
45 | + | |
46 | + .tb-entity-table-info{ | |
47 | + white-space: nowrap; | |
48 | + overflow: hidden; | |
49 | + text-overflow: ellipsis; | |
50 | + } | |
51 | + } | |
52 | + } | |
53 | + | |
54 | + @media #{$mat-xs} { | |
55 | + .mat-toolbar { | |
56 | + height: auto; | |
57 | + min-height: 100px; | |
58 | + | |
59 | + .tb-entity-table-title{ | |
60 | + padding-bottom: 5px; | |
61 | + width: 100%; | |
62 | + } | |
35 | 63 | } |
36 | 64 | } |
37 | 65 | } |
... | ... | @@ -42,6 +70,7 @@ |
42 | 70 | } |
43 | 71 | mat-form-field.tb-relation-direction { |
44 | 72 | font-size: 16px; |
73 | + width: 200px; | |
45 | 74 | |
46 | 75 | .mat-form-field-wrapper { |
47 | 76 | padding-bottom: 0; |
... | ... | @@ -50,5 +79,13 @@ |
50 | 79 | .mat-form-field-underline { |
51 | 80 | bottom: 0; |
52 | 81 | } |
82 | + | |
83 | + @media #{$mat-xs} { | |
84 | + width: 100%; | |
85 | + | |
86 | + .mat-form-field-infix { | |
87 | + width: auto !important; | |
88 | + } | |
89 | + } | |
53 | 90 | } |
54 | 91 | } | ... | ... |
... | ... | @@ -13,14 +13,19 @@ |
13 | 13 | * See the License for the specific language governing permissions and |
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | +@import 'src/scss/constants'; | |
17 | + | |
16 | 18 | :host { |
17 | 19 | flex: 1; |
18 | 20 | display: flex; |
19 | 21 | justify-content: flex-start; |
22 | + min-width: 150px; | |
20 | 23 | } |
21 | 24 | |
22 | 25 | :host ::ng-deep { |
23 | 26 | tb-entity-subtype-select { |
27 | + width: 100%; | |
28 | + | |
24 | 29 | mat-form-field { |
25 | 30 | font-size: 16px; |
26 | 31 | |
... | ... | @@ -31,6 +36,14 @@ |
31 | 36 | .mat-form-field-underline { |
32 | 37 | bottom: 0; |
33 | 38 | } |
39 | + | |
40 | + @media #{$mat-xs} { | |
41 | + width: 100%; | |
42 | + | |
43 | + .mat-form-field-infix { | |
44 | + width: auto !important; | |
45 | + } | |
46 | + } | |
34 | 47 | } |
35 | 48 | } |
36 | 49 | } | ... | ... |
... | ... | @@ -14,12 +14,12 @@ |
14 | 14 | /// limitations under the License. |
15 | 15 | /// |
16 | 16 | |
17 | -import {Component} from '@angular/core'; | |
18 | -import {Store} from '@ngrx/store'; | |
19 | -import {AppState} from '@core/core.state'; | |
20 | -import {EntityTableHeaderComponent} from '../../components/entity/entity-table-header.component'; | |
21 | -import {EntityType} from '@shared/models/entity-type.models'; | |
22 | -import {AssetInfo} from '@shared/models/asset.models'; | |
17 | +import { Component } from '@angular/core'; | |
18 | +import { Store } from '@ngrx/store'; | |
19 | +import { AppState } from '@core/core.state'; | |
20 | +import { EntityTableHeaderComponent } from '../../components/entity/entity-table-header.component'; | |
21 | +import { EntityType } from '@shared/models/entity-type.models'; | |
22 | +import { AssetInfo } from '@shared/models/asset.models'; | |
23 | 23 | |
24 | 24 | @Component({ |
25 | 25 | selector: 'tb-asset-table-header', | ... | ... |
... | ... | @@ -13,14 +13,19 @@ |
13 | 13 | * See the License for the specific language governing permissions and |
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | +@import 'src/scss/constants'; | |
17 | + | |
16 | 18 | :host { |
17 | 19 | flex: 1; |
18 | 20 | display: flex; |
19 | 21 | justify-content: flex-start; |
22 | + min-width: 150px; | |
20 | 23 | } |
21 | 24 | |
22 | 25 | :host ::ng-deep { |
23 | 26 | tb-entity-subtype-select { |
27 | + width: 100%; | |
28 | + | |
24 | 29 | mat-form-field { |
25 | 30 | font-size: 16px; |
26 | 31 | |
... | ... | @@ -31,6 +36,14 @@ |
31 | 36 | .mat-form-field-underline { |
32 | 37 | bottom: 0; |
33 | 38 | } |
39 | + | |
40 | + @media #{$mat-xs} { | |
41 | + width: 100%; | |
42 | + | |
43 | + .mat-form-field-infix { | |
44 | + width: auto !important; | |
45 | + } | |
46 | + } | |
34 | 47 | } |
35 | 48 | } |
36 | 49 | } | ... | ... |
... | ... | @@ -13,14 +13,19 @@ |
13 | 13 | * See the License for the specific language governing permissions and |
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | +@import 'src/scss/constants'; | |
17 | + | |
16 | 18 | :host { |
17 | 19 | flex: 1; |
18 | 20 | display: flex; |
19 | 21 | justify-content: flex-start; |
22 | + min-width: 150px; | |
20 | 23 | } |
21 | 24 | |
22 | 25 | :host ::ng-deep { |
23 | 26 | tb-entity-subtype-select { |
27 | + width: 100%; | |
28 | + | |
24 | 29 | mat-form-field { |
25 | 30 | font-size: 16px; |
26 | 31 | |
... | ... | @@ -31,6 +36,14 @@ |
31 | 36 | .mat-form-field-underline { |
32 | 37 | bottom: 0; |
33 | 38 | } |
39 | + | |
40 | + @media #{$mat-xs} { | |
41 | + width: 100%; | |
42 | + | |
43 | + .mat-form-field-infix { | |
44 | + width: auto !important; | |
45 | + } | |
46 | + } | |
34 | 47 | } |
35 | 48 | } |
36 | 49 | } | ... | ... |
... | ... | @@ -13,6 +13,8 @@ |
13 | 13 | * See the License for the specific language governing permissions and |
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | +@import 'src/scss/constants'; | |
17 | + | |
16 | 18 | tb-widgets-bundle-select { |
17 | 19 | mat-select { |
18 | 20 | margin: 0; |
... | ... | @@ -96,6 +98,10 @@ mat-toolbar { |
96 | 98 | color: #fff !important; |
97 | 99 | } |
98 | 100 | } |
101 | + | |
102 | + @media #{$mat-xs} { | |
103 | + width: auto; | |
104 | + } | |
99 | 105 | } |
100 | 106 | .mat-form-field-underline { |
101 | 107 | display: none; | ... | ... |