Browse Source

Flex layout replacements. Switch to tailwind.css.

pull/11838/head
Igor Kulikov 2 years ago
parent
commit
316a2ea0e1
  1. 28
      ui-ngx/src/app/modules/home/components/widget/lib/settings/date/date-range-navigator-widget-settings.component.html
  2. 2
      ui-ngx/src/app/modules/home/components/widget/lib/settings/entity/entities-hierarchy-widget-settings.component.html
  3. 16
      ui-ngx/src/app/modules/home/components/widget/lib/settings/entity/entities-table-key-settings.component.html
  4. 17
      ui-ngx/src/app/modules/home/components/widget/lib/settings/entity/entities-table-widget-settings.component.html
  5. 4
      ui-ngx/src/app/modules/home/components/widget/lib/settings/gateway/gateway-config-single-device-widget-settings.component.html
  6. 12
      ui-ngx/src/app/modules/home/components/widget/lib/settings/gateway/gateway-config-widget-settings.component.html
  7. 6
      ui-ngx/src/app/modules/home/components/widget/lib/settings/gateway/gateway-events-widget-settings.component.html
  8. 2
      ui-ngx/src/app/modules/home/components/widget/lib/settings/gateway/gateway-logs-settings.component.html
  9. 23
      ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/analogue-compass-widget-settings.component.html
  10. 32
      ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/analogue-gauge-widget-settings.component.html
  11. 41
      ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/digital-gauge-widget-settings.component.html
  12. 4
      ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/tick-value.component.html

28
ui-ngx/src/app/modules/home/components/widget/lib/settings/date/date-range-navigator-widget-settings.component.html

@ -15,23 +15,23 @@
limitations under the License.
-->
<section class="tb-widget-settings" [formGroup]="dateRangeNavigatorWidgetSettingsForm" fxLayout="column">
<section class="tb-widget-settings flex flex-col" [formGroup]="dateRangeNavigatorWidgetSettingsForm">
<fieldset class="fields-group fields-group-slider">
<legend class="group-title" translate>widgets.date-range-navigator.date-range-picker-settings</legend>
<mat-expansion-panel class="tb-settings" [expanded]="!dateRangeNavigatorWidgetSettingsForm.get('hidePicker').value">
<mat-expansion-panel-header fxLayout="row wrap">
<mat-expansion-panel-header class="flex flex-row flex-wrap">
<mat-panel-title>
<mat-slide-toggle formControlName="hidePicker" (click)="$event.stopPropagation()"
fxLayoutAlign="center">
class="flex items-stretch justify-center">
{{ 'widgets.date-range-navigator.hide-date-range-picker' | translate }}
</mat-slide-toggle>
</mat-panel-title>
<mat-panel-description fxLayoutAlign="end center" fxHide.xs translate>
<mat-panel-description class="flex items-center justify-end xs:!hidden" translate>
widget-config.advanced-settings
</mat-panel-description>
</mat-expansion-panel-header>
<ng-template matExpansionPanelContent>
<section fxLayout="column" fxFlex>
<section class="flex flex-1 flex-col">
<mat-checkbox formControlName="onePanel">
{{ 'widgets.date-range-navigator.picker-one-panel' | translate }}
</mat-checkbox>
@ -41,7 +41,7 @@
<mat-checkbox formControlName="showTemplate">
{{ 'widgets.date-range-navigator.picker-show-template' | translate }}
</mat-checkbox>
<mat-form-field fxFlex class="mat-block">
<mat-form-field class="mat-block flex-1">
<mat-label translate>widgets.date-range-navigator.first-day-of-week</mat-label>
<input matInput type="number" min="1" max="7" step="1" formControlName="firstDayOfWeek">
</mat-form-field>
@ -52,19 +52,19 @@
<fieldset class="fields-group fields-group-slider">
<legend class="group-title" translate>widgets.date-range-navigator.interval-settings</legend>
<mat-expansion-panel class="tb-settings" [expanded]="!dateRangeNavigatorWidgetSettingsForm.get('hideInterval').value">
<mat-expansion-panel-header fxLayout="row wrap">
<mat-expansion-panel-header class="flex flex-row flex-wrap">
<mat-panel-title>
<mat-slide-toggle formControlName="hideInterval" (click)="$event.stopPropagation()"
fxLayoutAlign="center">
class="flex items-stretch justify-center">
{{ 'widgets.date-range-navigator.hide-interval' | translate }}
</mat-slide-toggle>
</mat-panel-title>
<mat-panel-description fxLayoutAlign="end center" fxHide.xs translate>
<mat-panel-description class="flex items-center justify-end xs:!hidden" translate>
widget-config.advanced-settings
</mat-panel-description>
</mat-expansion-panel-header>
<ng-template matExpansionPanelContent>
<mat-form-field fxFlex class="mat-block">
<mat-form-field class="mat-block flex-1">
<mat-label translate>widgets.date-range-navigator.initial-interval</mat-label>
<mat-select formControlName="initialInterval">
<mat-option [value]="'hour'">
@ -96,19 +96,19 @@
<fieldset class="fields-group fields-group-slider">
<legend class="group-title" translate>widgets.date-range-navigator.step-settings</legend>
<mat-expansion-panel class="tb-settings" [expanded]="!dateRangeNavigatorWidgetSettingsForm.get('hideStepSize').value">
<mat-expansion-panel-header fxLayout="row wrap">
<mat-expansion-panel-header class="flex flex-row flex-wrap">
<mat-panel-title>
<mat-slide-toggle formControlName="hideStepSize" (click)="$event.stopPropagation()"
fxLayoutAlign="center">
class="flex items-stretch justify-center">
{{ 'widgets.date-range-navigator.hide-step-size' | translate }}
</mat-slide-toggle>
</mat-panel-title>
<mat-panel-description fxLayoutAlign="end center" fxHide.xs translate>
<mat-panel-description class="flex items-center justify-end xs:!hidden" translate>
widget-config.advanced-settings
</mat-panel-description>
</mat-expansion-panel-header>
<ng-template matExpansionPanelContent>
<mat-form-field fxFlex class="mat-block">
<mat-form-field class="mat-block flex-1">
<mat-label translate>widgets.date-range-navigator.initial-step-size</mat-label>
<mat-select formControlName="stepSize">
<mat-option [value]="'hour'">

2
ui-ngx/src/app/modules/home/components/widget/lib/settings/entity/entities-hierarchy-widget-settings.component.html

@ -15,7 +15,7 @@
limitations under the License.
-->
<section class="tb-widget-settings" [formGroup]="entitiesHierarchyWidgetSettingsForm" fxLayout="column">
<section class="tb-widget-settings flex flex-col" [formGroup]="entitiesHierarchyWidgetSettingsForm">
<fieldset class="fields-group">
<legend class="group-title" translate>widgets.entities-hierarchy.hierarchy-data-settings</legend>
<tb-js-func formControlName="nodeRelationQueryFunction"

16
ui-ngx/src/app/modules/home/components/widget/lib/settings/entity/entities-table-key-settings.component.html

@ -20,7 +20,7 @@
<div class="tb-form-panel-title" translate>widgets.table.column-settings</div>
<div class="tb-form-row">
<div class="fixed-title-width">{{ 'widgets.table.custom-title' | translate }}</div>
<mat-form-field fxFlex appearance="outline" subscriptSizing="dynamic">
<mat-form-field class="flex-1" appearance="outline" subscriptSizing="dynamic">
<input matInput formControlName="customTitle" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>
</div>
@ -62,14 +62,13 @@
</div>
<div class="tb-form-panel tb-slide-toggle">
<mat-expansion-panel class="tb-settings" [expanded]="entitiesTableKeySettingsForm.get('useCellStyleFunction').value">
<mat-expansion-panel-header fxLayout="row wrap">
<mat-expansion-panel-header class="flex flex-row flex-wrap">
<mat-panel-title>
<mat-slide-toggle class="mat-slide" formControlName="useCellStyleFunction" (click)="$event.stopPropagation()"
fxLayoutAlign="center">
<mat-slide-toggle class="mat-slide flex items-stretch justify-center" formControlName="useCellStyleFunction" (click)="$event.stopPropagation()">
{{ 'widgets.table.use-cell-style-function' | translate }}
</mat-slide-toggle>
</mat-panel-title>
<mat-panel-description fxFlex="40" fxLayoutAlign="end center" fxHide.xs translate>
<mat-panel-description class="flex max-w-40% flex-full items-center justify-end xs:!hidden" translate>
widget-config.advanced-settings
</mat-panel-description>
</mat-expansion-panel-header>
@ -86,14 +85,13 @@
</div>
<div class="tb-form-panel tb-slide-toggle">
<mat-expansion-panel class="tb-settings" [expanded]="entitiesTableKeySettingsForm.get('useCellContentFunction').value">
<mat-expansion-panel-header fxLayout="row wrap">
<mat-expansion-panel-header class="flex flex-row flex-wrap">
<mat-panel-title>
<mat-slide-toggle class="mat-slide" formControlName="useCellContentFunction" (click)="$event.stopPropagation()"
fxLayoutAlign="center">
<mat-slide-toggle class="mat-slide flex items-stretch justify-center" formControlName="useCellContentFunction" (click)="$event.stopPropagation()">
{{ 'widgets.table.use-cell-content-function' | translate }}
</mat-slide-toggle>
</mat-panel-title>
<mat-panel-description fxFlex="40" fxLayoutAlign="end center" fxHide.xs translate>
<mat-panel-description class="flex max-w-40% flex-full items-center justify-end xs:!hidden" translate>
widget-config.advanced-settings
</mat-panel-description>
</mat-expansion-panel-header>

17
ui-ngx/src/app/modules/home/components/widget/lib/settings/entity/entities-table-widget-settings.component.html

@ -20,7 +20,7 @@
<div class="tb-form-panel-title" translate>widgets.table.table-header</div>
<div class="tb-form-row">
<div class="fixed-title-width">{{ 'widgets.table.entities-table-title' | translate }}</div>
<mat-form-field fxFlex appearance="outline" subscriptSizing="dynamic">
<mat-form-field class="flex-1" appearance="outline" subscriptSizing="dynamic">
<input matInput formControlName="entitiesTitle" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>
</div>
@ -45,7 +45,7 @@
<mat-slide-toggle class="mat-slide fixed-title-width" formControlName="displayEntityName">
{{ 'widgets.table.display-entity-name' | translate }}
</mat-slide-toggle>
<mat-form-field fxFlex appearance="outline" subscriptSizing="dynamic">
<mat-form-field class="flex-1" appearance="outline" subscriptSizing="dynamic">
<input matInput formControlName="entityNameColumnTitle" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>
</div>
@ -53,7 +53,7 @@
<mat-slide-toggle class="mat-slide fixed-title-width" formControlName="displayEntityLabel">
{{ 'widgets.table.display-entity-label' | translate }}
</mat-slide-toggle>
<mat-form-field fxFlex appearance="outline" subscriptSizing="dynamic">
<mat-form-field class="flex-1" appearance="outline" subscriptSizing="dynamic">
<input matInput formControlName="entityLabelColumnTitle" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>
</div>
@ -70,7 +70,7 @@
{{ 'widgets.table.show-cell-actions-menu-mobile' | translate }}
</mat-slide-toggle>
</div>
<mat-form-field fxFlex subscriptSizing="dynamic">
<mat-form-field class="flex-1" subscriptSizing="dynamic">
<mat-label translate>widgets.table.hidden-cell-button-display-mode</mat-label>
<mat-select formControlName="reserveSpaceForHiddenAction">
<mat-option [value]="'true'">
@ -81,7 +81,7 @@
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field fxFlex subscriptSizing="dynamic">
<mat-form-field class="flex-1" subscriptSizing="dynamic">
<mat-label translate>widgets.table.default-sort-order</mat-label>
<input matInput formControlName="defaultSortOrder">
</mat-form-field>
@ -101,14 +101,13 @@
<div class="tb-form-panel tb-slide-toggle">
<div class="tb-form-panel-title" translate>widgets.table.rows</div>
<mat-expansion-panel class="tb-settings" [expanded]="entitiesTableWidgetSettingsForm.get('useRowStyleFunction').value">
<mat-expansion-panel-header fxLayout="row wrap">
<mat-expansion-panel-header class="flex flex-row flex-wrap">
<mat-panel-title>
<mat-slide-toggle class="mat-slide" formControlName="useRowStyleFunction" (click)="$event.stopPropagation()"
fxLayoutAlign="center">
<mat-slide-toggle class="mat-slide flex items-stretch justify-center" formControlName="useRowStyleFunction" (click)="$event.stopPropagation()">
{{ 'widgets.table.use-row-style-function' | translate }}
</mat-slide-toggle>
</mat-panel-title>
<mat-panel-description fxFlex="40" fxLayoutAlign="end center" fxHide.xs translate>
<mat-panel-description class="flex max-w-40% flex-full items-center justify-end xs:!hidden" translate>
widget-config.advanced-settings
</mat-panel-description>
</mat-expansion-panel-header>

4
ui-ngx/src/app/modules/home/components/widget/lib/settings/gateway/gateway-config-single-device-widget-settings.component.html

@ -15,8 +15,8 @@
limitations under the License.
-->
<section class="tb-widget-settings" [formGroup]="gatewayConfigSingleDeviceWidgetSettingsForm" fxLayout="column">
<mat-form-field fxFlex class="mat-block">
<section class="tb-widget-settings flex flex-col" [formGroup]="gatewayConfigSingleDeviceWidgetSettingsForm">
<mat-form-field class="mat-block flex-1">
<mat-label translate>widgets.gateway.gateway-title</mat-label>
<input matInput formControlName="gatewayTitle">
</mat-form-field>

12
ui-ngx/src/app/modules/home/components/widget/lib/settings/gateway/gateway-config-widget-settings.component.html

@ -15,29 +15,29 @@
limitations under the License.
-->
<section class="tb-widget-settings" [formGroup]="gatewayConfigWidgetSettingsForm" fxLayout="column">
<section class="tb-widget-settings flex flex-col" [formGroup]="gatewayConfigWidgetSettingsForm">
<fieldset class="fields-group">
<legend class="group-title" translate>widgets.gateway.general-settings</legend>
<mat-form-field fxFlex class="mat-block">
<mat-form-field class="mat-block flex-1">
<mat-label translate>widgets.gateway.widget-title</mat-label>
<input matInput formControlName="widgetTitle">
</mat-form-field>
<mat-form-field fxFlex class="mat-block">
<mat-form-field class="mat-block flex-1">
<mat-label translate>widgets.gateway.default-archive-file-name</mat-label>
<input matInput formControlName="archiveFileName">
</mat-form-field>
<mat-form-field fxFlex class="mat-block">
<mat-form-field class="mat-block flex-1">
<mat-label translate>widgets.gateway.device-type-for-new-gateway</mat-label>
<input matInput formControlName="gatewayType">
</mat-form-field>
</fieldset>
<fieldset class="fields-group">
<legend class="group-title" translate>widgets.gateway.messages-settings</legend>
<mat-form-field fxFlex class="mat-block">
<mat-form-field class="mat-block flex-1">
<mat-label translate>widgets.gateway.save-config-success-message</mat-label>
<input matInput formControlName="successfulSave">
</mat-form-field>
<mat-form-field fxFlex class="mat-block">
<mat-form-field class="mat-block flex-1">
<mat-label translate>widgets.gateway.device-name-exists-message</mat-label>
<input matInput formControlName="gatewayNameExists">
</mat-form-field>

6
ui-ngx/src/app/modules/home/components/widget/lib/settings/gateway/gateway-events-widget-settings.component.html

@ -15,12 +15,12 @@
limitations under the License.
-->
<section class="tb-widget-settings" [formGroup]="gatewayEventsWidgetSettingsForm" fxLayout="column">
<mat-form-field fxFlex class="mat-block">
<section class="tb-widget-settings flex flex-col" [formGroup]="gatewayEventsWidgetSettingsForm">
<mat-form-field class="mat-block flex-1">
<mat-label translate>widgets.gateway.events-title</mat-label>
<input matInput formControlName="eventsTitle">
</mat-form-field>
<mat-form-field fxFlex class="mat-block" floatLabel="always">
<mat-form-field class="mat-block flex-1" floatLabel="always">
<mat-label translate>widgets.gateway.events-filter</mat-label>
<mat-chip-grid #chipList formControlName="eventsReg">
<mat-chip-row

2
ui-ngx/src/app/modules/home/components/widget/lib/settings/gateway/gateway-logs-settings.component.html

@ -20,7 +20,7 @@
<mat-slide-toggle class="mat-slide fixed-title-width" formControlName="isConnectorLog">
{{ "widgets.gateway.show-connector" | translate }}
</mat-slide-toggle>
<mat-form-field fxFlex appearance="outline" subscriptSizing="dynamic">
<mat-form-field class="flex-1" appearance="outline" subscriptSizing="dynamic">
<input matInput formControlName="connectorLogState" placeholder="{{ 'widgets.gateway.connector-state-param-key' | translate }}">
</mat-form-field>
</div>

23
ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/analogue-compass-widget-settings.component.html

@ -20,10 +20,10 @@
<div class="tb-form-panel-title" translate>widgets.gauge.ticks-settings</div>
<div class="tb-form-row">
<div class="fixed-title-width" translate>widgets.gauge.labels</div>
<div fxFlex fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-1 flex-row items-center justify-start gap-2">
<tb-string-items-list
style="display: flex"
fxFlex
class="flex-1"
appearance="outline"
subscriptSizing="dynamic"
editable
@ -33,7 +33,7 @@
</div>
<div class="tb-form-row space-between">
<div translate>widgets.gauge.label-style</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<tb-font-settings formControlName="majorTickFont"
disabledLineHeight>
</tb-font-settings>
@ -53,7 +53,7 @@
</div>
<div class="tb-form-row space-between">
<div translate>widgets.gauge.minor-ticks</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic">
<input matInput type="number" min="0" formControlName="minorTicks">
</mat-form-field>
@ -84,7 +84,7 @@
<mat-slide-toggle class="mat-slide fixed-title-width" formControlName="showBorder">
{{ 'widgets.gauge.show-plate-border' | translate }}
</mat-slide-toggle>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<mat-form-field class="number" appearance="outline" subscriptSizing="dynamic">
<input matInput type="number" min="0" formControlName="borderOuterWidth" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>
@ -100,7 +100,7 @@
<div class="tb-form-panel-title" translate>widgets.gauge.needle-settings</div>
<div class="tb-form-row space-between column-xs">
<div translate>widgets.gauge.needle-circle</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<mat-form-field class="number" appearance="outline" subscriptSizing="dynamic">
<input matInput type="number" min="0" formControlName="needleCircleSize" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>
@ -121,21 +121,20 @@
<div class="tb-form-panel tb-slide-toggle">
<mat-expansion-panel class="tb-settings" [expanded]="analogueCompassWidgetSettingsForm.get('animation').value">
<mat-expansion-panel-header fxLayout="row wrap">
<mat-expansion-panel-header class="flex flex-row flex-wrap">
<mat-panel-title>
<mat-slide-toggle class="mat-slide" formControlName="animation" (click)="$event.stopPropagation()"
fxLayoutAlign="center">
<mat-slide-toggle class="mat-slide flex items-stretch justify-center" formControlName="animation" (click)="$event.stopPropagation()">
{{ 'widgets.gauge.enable-animation' | translate }}
</mat-slide-toggle>
</mat-panel-title>
<mat-panel-description fxFlex="40" fxLayoutAlign="end center" fxHide.xs translate>
<mat-panel-description class="flex max-w-40% flex-full items-center justify-end xs:!hidden" translate>
widget-config.advanced-settings
</mat-panel-description>
</mat-expansion-panel-header>
<ng-template matExpansionPanelContent>
<div class="tb-form-row">
<div class="fixed-title-width" translate>widgets.gauge.animation-target</div>
<mat-form-field fxFlex appearance="outline" subscriptSizing="dynamic">
<mat-form-field class="flex-1" appearance="outline" subscriptSizing="dynamic">
<mat-select formControlName="animationTarget">
<mat-option [value]="'needle'">
{{ 'widgets.gauge.animation-target-needle' | translate }}
@ -148,7 +147,7 @@
</div>
<div class="tb-form-row space-between">
<div translate>widgets.gauge.animation-duration-rule</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic">
<input matInput type="number" min="0" formControlName="animationDuration" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>

32
ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/analogue-gauge-widget-settings.component.html

@ -29,7 +29,7 @@
<div class="tb-form-panel-title" translate>widgets.gauge.ticks-settings</div>
<div class="tb-form-row space-between column-xs">
<div translate>widgets.gauge.ticks</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<div class="tb-small-label" translate>widgets.gauge.min-value-short</div>
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic">
<input matInput formControlName="minValue" type="number" step="1" placeholder="{{ 'widget-config.set' | translate }}">
@ -50,7 +50,7 @@
<div class="tb-form-row space-between column-xs">
<div translate>widgets.gauge.major-ticks-count</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic">
<input matInput formControlName="majorTicksCount" type="number" min="0" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>
@ -63,7 +63,7 @@
<div class="tb-form-row space-between column-xs">
<div translate>widgets.gauge.minor-ticks-count</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic">
<input matInput formControlName="minorTicks" type="number" min="0" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>
@ -81,7 +81,7 @@
<mat-slide-toggle class="mat-slide fixed-title-width" formControlName="showUnitTitle">
{{ 'widgets.gauge.units-title' | translate }}
</mat-slide-toggle>
<div fxFlex fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-1 flex-row items-center justify-start gap-2">
<mat-form-field class="flex" appearance="outline" subscriptSizing="dynamic">
<input matInput formControlName="unitTitle" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>
@ -98,7 +98,7 @@
<div class="tb-form-row space-between">
<div translate>widget-config.units-short</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<tb-font-settings formControlName="unitsFont"
disabledLineHeight>
</tb-font-settings>
@ -112,14 +112,13 @@
<div class="tb-form-panel tb-slide-toggle">
<mat-expansion-panel class="tb-settings" [expanded]="analogueGaugeWidgetSettingsForm.get('valueBox').value">
<mat-expansion-panel-header fxLayout="row wrap">
<mat-expansion-panel-header class="flex flex-row flex-wrap">
<mat-panel-title>
<mat-slide-toggle class="mat-slide" formControlName="valueBox" (click)="$event.stopPropagation()"
fxLayoutAlign="center">
<mat-slide-toggle class="mat-slide flex items-stretch justify-center" formControlName="valueBox" (click)="$event.stopPropagation()">
{{ 'widgets.gauge.value-box' | translate }}
</mat-slide-toggle>
</mat-panel-title>
<mat-panel-description fxFlex="40" fxLayoutAlign="end center" fxHide.xs translate>
<mat-panel-description class="flex max-w-40% flex-full items-center justify-end xs:!hidden" translate>
widget-config.advanced-settings
</mat-panel-description>
</mat-expansion-panel-header>
@ -134,7 +133,7 @@
<div class="tb-form-panel-title" translate>widgets.gauge.value-text</div>
<div class="tb-form-row space-between">
<div translate>widgets.gauge.value-text</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<tb-font-settings formControlName="valueFont"
disabledLineHeight>
</tb-font-settings>
@ -245,7 +244,7 @@
<div class="tb-form-panel-title" translate>widgets.gauge.scale-settings</div>
<div class="tb-form-row space-between">
<div translate>widgets.gauge.scale</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic">
<input matInput type="number" min="0" formControlName="highlightsWidth">
</mat-form-field>
@ -257,21 +256,20 @@
<div class="tb-form-panel tb-slide-toggle">
<mat-expansion-panel class="tb-settings" [expanded]="analogueGaugeWidgetSettingsForm.get('animation').value">
<mat-expansion-panel-header fxLayout="row wrap">
<mat-expansion-panel-header class="flex flex-row flex-wrap">
<mat-panel-title>
<mat-slide-toggle class="mat-slide" formControlName="animation" (click)="$event.stopPropagation()"
fxLayoutAlign="center">
<mat-slide-toggle class="mat-slide flex items-stretch justify-center" formControlName="animation" (click)="$event.stopPropagation()">
{{ 'widgets.gauge.enable-animation' | translate }}
</mat-slide-toggle>
</mat-panel-title>
<mat-panel-description fxFlex="40" fxLayoutAlign="end center" fxHide.xs translate>
<mat-panel-description class="flex max-w-40% flex-full items-center justify-end xs:!hidden" translate>
widget-config.advanced-settings
</mat-panel-description>
</mat-expansion-panel-header>
<ng-template matExpansionPanelContent>
<div class="tb-form-row space-between">
<div translate>widgets.gauge.animation-duration-rule</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic">
<input matInput type="number" min="0" formControlName="animationDuration" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>
@ -350,7 +348,7 @@
<div class="tb-form-panel-title" translate>widgets.gauge.linear-gauge-settings</div>
<div class="tb-form-row space-between">
<div translate>widgets.gauge.bar-stroke</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic">
<input matInput type="number" min="0" formControlName="barStrokeWidth" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>

41
ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/digital-gauge-widget-settings.component.html

@ -43,7 +43,7 @@
<mat-slide-toggle class="mat-slide fixed-title-width" formControlName="showMinMax">
{{ 'widgets.gauge.min-and-max-label' | translate }}
</mat-slide-toggle>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<tb-font-settings formControlName="minMaxFont"
disabledLineHeight
[previewText]="previewFn">
@ -57,7 +57,7 @@
<div class="tb-form-row space-between column-xs">
<div class="fixed-title-width">{{ 'widgets.gauge.min-and-max-value' | translate }}</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<div class="tb-small-label" translate>widgets.gauge.min-value-short</div>
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic">
<input matInput formControlName="minValue" type="number" step="1" placeholder="{{ 'widget-config.set' | translate }}">
@ -81,7 +81,7 @@
<mat-slide-toggle class="mat-slide fixed-title-width" formControlName="showValue">
{{ 'widgets.gauge.value' | translate }}
</mat-slide-toggle>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<tb-font-settings formControlName="valueFont"
disabledLineHeight
[previewText]="valuePreviewFn">
@ -97,7 +97,7 @@
<mat-slide-toggle class="mat-slide fixed-title-width" formControlName="showTitle">
{{ 'widgets.gauge.label' | translate }}
</mat-slide-toggle>
<div fxFlex fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-1 flex-row items-center justify-start gap-2">
<mat-form-field class="flex" appearance="outline" subscriptSizing="dynamic">
<input matInput formControlName="title" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>
@ -126,12 +126,12 @@
<mat-slide-toggle class="mat-slide fixed-title-width" formControlName="showTimestamp">
{{ 'widgets.gauge.show-timestamp' | translate }}
</mat-slide-toggle>
<tb-date-format-select fxFlex excludeLastUpdateAgo formControlName="timestampFormat"></tb-date-format-select>
<tb-date-format-select class="flex-1" excludeLastUpdateAgo formControlName="timestampFormat"></tb-date-format-select>
</div>
<div class="tb-form-row space-between column-xs">
<div class="fixed-title-width">{{ 'widgets.gauge.font' | translate }}</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<tb-font-settings formControlName="labelFont"
disabledLineHeight
[previewText]="valuePreviewFn">
@ -200,21 +200,20 @@
<div class="tb-form-panel tb-slide-toggle">
<mat-expansion-panel class="tb-settings" [expanded]="digitalGaugeWidgetSettingsForm.get('showTicks').value">
<mat-expansion-panel-header fxLayout="row wrap">
<mat-expansion-panel-header class="flex flex-row flex-wrap">
<mat-panel-title>
<mat-slide-toggle class="mat-slide" formControlName="showTicks" (click)="$event.stopPropagation()"
fxLayoutAlign="center">
<mat-slide-toggle class="mat-slide flex items-stretch justify-center" formControlName="showTicks" (click)="$event.stopPropagation()">
{{ 'widgets.gauge.ticks' | translate }}
</mat-slide-toggle>
</mat-panel-title>
<mat-panel-description fxFlex="40" fxLayoutAlign="end center" fxHide.xs translate>
<mat-panel-description class="flex max-w-40% flex-full items-center justify-end xs:!hidden" translate>
widget-config.advanced-settings
</mat-panel-description>
</mat-expansion-panel-header>
<ng-template matExpansionPanelContent>
<div class="tb-form-row space-between column-xs">
<div class="fixed-title-width">{{ 'widgets.gauge.tick-width-and-color' | translate }}</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic">
<input matInput type="number" min="0" formControlName="tickWidth" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>
@ -228,17 +227,16 @@
<div class="tb-form-panel-title" translate>widgets.gauge.tick-values</div>
<div class="tb-control-list tb-drop-list" cdkDropList cdkDropListOrientation="vertical"
(cdkDropListDropped)="tickValueDrop($event)">
<div cdkDrag class="tb-draggable" *ngFor="let tickValueControl of tickValuesFormArray().controls; trackBy: trackByTickValue;
let $index = index; last as isLast;" fxLayout="row" [ngStyle]="!isLast ? {paddingBottom: '8px'} : {}">
<tb-tick-value fxFlex
<div cdkDrag class="tb-draggable flex flex-row" *ngFor="let tickValueControl of tickValuesFormArray().controls; trackBy: trackByTickValue;
let $index = index; last as isLast;" [class.pb-2]="!isLast">
<tb-tick-value class="flex-1"
[formControl]="tickValueControl"
[aliasController]="aliasController"
[dataKeyCallbacks]="dataKeyCallbacks"
[datasource]="datasource"
(removeTickValue)="removeTickValue($index)">
</tb-tick-value>
<button class="tb-box-button"
fxHide.lt-lg
<button class="tb-box-button lt-lg:!hidden"
mat-icon-button
type="button"
cdkDragHandle
@ -249,7 +247,7 @@
</div>
</div>
<div *ngIf="!tickValuesFormArray().controls.length">
<span translate fxLayoutAlign="center center" class="tb-prompt">widgets.gauge.no-tick-values</span>
<span translate class="tb-prompt flex items-center justify-center">widgets.gauge.no-tick-values</span>
</div>
<div style="padding-top: 16px;">
<button mat-stroked-button color="primary"
@ -266,21 +264,20 @@
<div class="tb-form-panel tb-slide-toggle">
<mat-expansion-panel class="tb-settings" [expanded]="digitalGaugeWidgetSettingsForm.get('animation').value">
<mat-expansion-panel-header fxLayout="row wrap">
<mat-expansion-panel-header class="flex flex-row flex-wrap">
<mat-panel-title>
<mat-slide-toggle class="mat-slide" formControlName="animation" (click)="$event.stopPropagation()"
fxLayoutAlign="center">
<mat-slide-toggle class="mat-slide flex items-stretch justify-center" formControlName="animation" (click)="$event.stopPropagation()">
{{ 'widgets.gauge.enable-animation' | translate }}
</mat-slide-toggle>
</mat-panel-title>
<mat-panel-description fxFlex="40" fxLayoutAlign="end center" fxHide.xs translate>
<mat-panel-description class="flex max-w-40% flex-full items-center justify-end xs:!hidden" translate>
widget-config.advanced-settings
</mat-panel-description>
</mat-expansion-panel-header>
<ng-template matExpansionPanelContent>
<div class="tb-form-row space-between">
<div translate>widgets.gauge.animation-duration-rule</div>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<div class="flex flex-row items-center justify-start gap-2">
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic">
<input matInput type="number" min="0" formControlName="animationDuration" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field>

4
ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/tick-value.component.html

@ -16,8 +16,8 @@
-->
<div fxLayout="row" [formGroup]="tickValueFormGroup">
<tb-value-source-data-key fxFlex
<div class="flex flex-row" [formGroup]="tickValueFormGroup">
<tb-value-source-data-key class="flex-1"
formControlName="tickValue"
[aliasController]="aliasController"
[dataKeyCallbacks]="dataKeyCallbacks"

Loading…
Cancel
Save