|
|
|
@ -15,7 +15,7 @@ |
|
|
|
limitations under the License. |
|
|
|
|
|
|
|
--> |
|
|
|
<section class="tb-widget-settings" [formGroup]="analogueGaugeWidgetSettingsForm" fxLayout="column"> |
|
|
|
<ng-container [formGroup]="analogueGaugeWidgetSettingsForm"> |
|
|
|
<ng-container [ngSwitch]="gaugeType"> |
|
|
|
<ng-container *ngSwitchCase="'radial'"> |
|
|
|
<ng-container *ngTemplateOutlet="radialGauge; context: ctx "></ng-container> |
|
|
|
@ -24,330 +24,383 @@ |
|
|
|
<ng-container *ngTemplateOutlet="linearGauge; context: ctx "></ng-container> |
|
|
|
</ng-container> |
|
|
|
</ng-container> |
|
|
|
<tb-color-input |
|
|
|
formControlName="defaultColor" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.default-color' | translate }}" openOnInput colorClearButton> |
|
|
|
</tb-color-input> |
|
|
|
<fieldset class="fields-group"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.ticks-settings</legend> |
|
|
|
<section fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>widgets.gauge.min-value</mat-label> |
|
|
|
<input matInput type="number" formControlName="minValue"> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>widgets.gauge.max-value</mat-label> |
|
|
|
<input matInput type="number" formControlName="maxValue"> |
|
|
|
</mat-form-field> |
|
|
|
</section> |
|
|
|
<section fxLayout="column" fxLayout.gt-xs="row" fxLayoutGap.gt-xs="8px" fxLayoutAlign.gt-xs="start center"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>widgets.gauge.major-ticks-count</mat-label> |
|
|
|
<input matInput type="number" min="0" formControlName="majorTicksCount"> |
|
|
|
</mat-form-field> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorMajorTicks" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.major-ticks-color' | translate }}" openOnInput colorClearButton> |
|
|
|
</tb-color-input> |
|
|
|
</section> |
|
|
|
<section fxLayout="column" fxLayout.gt-xs="row" fxLayoutGap.gt-xs="8px" fxLayoutAlign.gt-xs="start center"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>widgets.gauge.minor-ticks-count</mat-label> |
|
|
|
<input matInput type="number" min="0" formControlName="minorTicks"> |
|
|
|
</mat-form-field> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorMinorTicks" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.minor-ticks-color' | translate }}" openOnInput colorClearButton> |
|
|
|
</tb-color-input> |
|
|
|
</section> |
|
|
|
<fieldset class="fields-group"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.tick-numbers-font</legend> |
|
|
|
<tb-widget-font formControlName="numbersFont"></tb-widget-font> |
|
|
|
</fieldset> |
|
|
|
</fieldset> |
|
|
|
<fieldset class="fields-group fields-group-slider"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.unit-title-settings</legend> |
|
|
|
<mat-expansion-panel class="tb-settings" [expanded]="analogueGaugeWidgetSettingsForm.get('showUnitTitle').value"> |
|
|
|
<mat-expansion-panel-header fxLayout="row wrap"> |
|
|
|
<mat-panel-title> |
|
|
|
<mat-slide-toggle formControlName="showUnitTitle" (click)="$event.stopPropagation()" |
|
|
|
fxLayoutAlign="center"> |
|
|
|
{{ 'widgets.gauge.show-unit-title' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
</mat-panel-title> |
|
|
|
<mat-panel-description fxLayoutAlign="end center" fxHide.xs translate> |
|
|
|
widget-config.advanced-settings |
|
|
|
</mat-panel-description> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<ng-template matExpansionPanelContent> |
|
|
|
<section fxLayout="column"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>widgets.gauge.unit-title</mat-label> |
|
|
|
<input matInput formControlName="unitTitle"> |
|
|
|
</mat-form-field> |
|
|
|
<fieldset class="fields-group"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.title-font</legend> |
|
|
|
<tb-widget-font formControlName="titleFont"></tb-widget-font> |
|
|
|
</fieldset> |
|
|
|
</section> |
|
|
|
</ng-template> |
|
|
|
</mat-expansion-panel> |
|
|
|
</fieldset> |
|
|
|
<fieldset class="fields-group"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.units-settings</legend> |
|
|
|
<fieldset class="fields-group"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.units-font</legend> |
|
|
|
<tb-widget-font formControlName="unitsFont"></tb-widget-font> |
|
|
|
</fieldset> |
|
|
|
</fieldset> |
|
|
|
<fieldset class="fields-group fields-group-slider"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.value-box-settings</legend> |
|
|
|
|
|
|
|
<div class="tb-form-panel"> |
|
|
|
<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="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 }}"> |
|
|
|
</mat-form-field> |
|
|
|
<div class="tb-small-label" translate>widgets.gauge.max-value-short</div> |
|
|
|
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic"> |
|
|
|
<input matInput formControlName="maxValue" type="number" step="1" placeholder="{{ 'widget-config.set' | translate }}"> |
|
|
|
</mat-form-field> |
|
|
|
<tb-font-settings formControlName="numbersFont" |
|
|
|
disabledLineHeight> |
|
|
|
</tb-font-settings> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="numbersColor"> |
|
|
|
</tb-color-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<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"> |
|
|
|
<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> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorMajorTicks"> |
|
|
|
</tb-color-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<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"> |
|
|
|
<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> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorMinorTicks"> |
|
|
|
</tb-color-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-panel"> |
|
|
|
<div class="tb-form-panel-title" translate>widgets.gauge.units-settings</div> |
|
|
|
<div class="tb-form-row column-xs"> |
|
|
|
<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"> |
|
|
|
<mat-form-field class="flex" appearance="outline" subscriptSizing="dynamic"> |
|
|
|
<input matInput formControlName="unitTitle" placeholder="{{ 'widget-config.set' | translate }}"> |
|
|
|
</mat-form-field> |
|
|
|
<tb-font-settings formControlName="titleFont" |
|
|
|
disabledLineHeight |
|
|
|
[previewText]="analogueGaugeWidgetSettingsForm.get('unitTitle').value"> |
|
|
|
</tb-font-settings> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="titleColor"> |
|
|
|
</tb-color-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widget-config.units-short</div> |
|
|
|
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px"> |
|
|
|
<tb-font-settings formControlName="unitsFont" |
|
|
|
disabledLineHeight> |
|
|
|
</tb-font-settings> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="unitsColor"> |
|
|
|
</tb-color-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<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-panel-title> |
|
|
|
<mat-slide-toggle formControlName="valueBox" (click)="$event.stopPropagation()" |
|
|
|
<mat-slide-toggle class="mat-slide" formControlName="valueBox" (click)="$event.stopPropagation()" |
|
|
|
fxLayoutAlign="center"> |
|
|
|
{{ 'widgets.gauge.show-value-box' | translate }} |
|
|
|
{{ 'widgets.gauge.value-box' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
</mat-panel-title> |
|
|
|
<mat-panel-description fxLayoutAlign="end center" fxHide.xs translate> |
|
|
|
<mat-panel-description fxFlex="40" fxLayoutAlign="end center" fxHide.xs translate> |
|
|
|
widget-config.advanced-settings |
|
|
|
</mat-panel-description> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<ng-template matExpansionPanelContent> |
|
|
|
<section fxLayout="column"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>widgets.gauge.value-int</mat-label> |
|
|
|
<input matInput type="number" min="0" step="1" formControlName="valueInt"> |
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.value-int</div> |
|
|
|
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic"> |
|
|
|
<input matInput type="number" min="0" step="1" formControlName="valueInt" placeholder="{{ 'widget-config.set' | translate }}"> |
|
|
|
</mat-form-field> |
|
|
|
<fieldset class="fields-group"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.value-font</legend> |
|
|
|
<tb-widget-font formControlName="valueFont" [hasShadowColor]="true"></tb-widget-font> |
|
|
|
</fieldset> |
|
|
|
<section fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px"> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorValueBoxRect" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.value-box-rect-stroke-color' | translate }}" openOnInput colorClearButton> |
|
|
|
</div> |
|
|
|
<div class="tb-form-panel"> |
|
|
|
<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"> |
|
|
|
<tb-font-settings formControlName="valueFont" |
|
|
|
disabledLineHeight> |
|
|
|
</tb-font-settings> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="valueColor"> |
|
|
|
</tb-color-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.value-text-shadow</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="valueColorShadow"> |
|
|
|
</tb-color-input> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorValueBoxRectEnd" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.value-box-rect-stroke-color-end' | translate }}" openOnInput colorClearButton> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="tb-form-panel"> |
|
|
|
<div class="tb-form-panel-title" translate>widgets.gauge.value-box</div> |
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.rect-stroke-color-start</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorValueBoxRect"> |
|
|
|
</tb-color-input> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.rect-stroke-color-end</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorValueBoxRectEnd"> |
|
|
|
</tb-color-input> |
|
|
|
</section> |
|
|
|
<section fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px"> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorValueBoxBackground" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.value-box-background-color' | translate }}" openOnInput colorClearButton> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.background-color</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorValueBoxBackground"> |
|
|
|
</tb-color-input> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorValueBoxShadow" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.value-box-shadow-color' | translate }}" openOnInput colorClearButton> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.shadow-color</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorValueBoxShadow"> |
|
|
|
</tb-color-input> |
|
|
|
</section> |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
</mat-expansion-panel> |
|
|
|
</fieldset> |
|
|
|
<fieldset class="fields-group"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.plate-settings</legend> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorPlate" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.plate-color' | translate }}" openOnInput colorClearButton> |
|
|
|
</tb-color-input> |
|
|
|
<mat-slide-toggle formControlName="showBorder"> |
|
|
|
{{ 'widgets.gauge.show-plate-border' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
</fieldset> |
|
|
|
<fieldset class="fields-group"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.needle-settings</legend> |
|
|
|
<section fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px"> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorNeedle" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.needle-color' | translate }}" openOnInput colorClearButton> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-panel"> |
|
|
|
<div class="tb-form-panel-title" translate>widgets.gauge.plate-settings</div> |
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.plate-color</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorPlate"> |
|
|
|
</tb-color-input> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorNeedleEnd" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.needle-color-end' | translate }}" openOnInput colorClearButton> |
|
|
|
</div> |
|
|
|
<div class="tb-form-row"> |
|
|
|
<mat-slide-toggle class="mat-slide" formControlName="showBorder"> |
|
|
|
{{ 'widgets.gauge.show-plate-border' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-panel"> |
|
|
|
<div class="tb-form-panel-title" translate>widgets.gauge.needle-settings</div> |
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.needle-color-start</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorNeedle"> |
|
|
|
</tb-color-input> |
|
|
|
</section> |
|
|
|
<section fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px"> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorNeedleShadowUp" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.needle-color-shadow-up' | translate }}" openOnInput colorClearButton> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.needle-color-end</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorNeedleEnd"> |
|
|
|
</tb-color-input> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorNeedleShadowDown" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.needle-color-shadow-down' | translate }}" openOnInput colorClearButton> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.needle-color-shadow-up</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorNeedleShadowUp"> |
|
|
|
</tb-color-input> |
|
|
|
</section> |
|
|
|
</fieldset> |
|
|
|
<fieldset class="fields-group"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.highlights-settings</legend> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>widgets.gauge.highlights-width</mat-label> |
|
|
|
<input matInput type="number" min="0" formControlName="highlightsWidth"> |
|
|
|
</mat-form-field> |
|
|
|
<fieldset class="fields-group"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.highlights</legend> |
|
|
|
<div fxLayout="column"> |
|
|
|
<div class="tb-control-list tb-drop-list" cdkDropList cdkDropListOrientation="vertical" |
|
|
|
(cdkDropListDropped)="highlightDrop($event)"> |
|
|
|
<div cdkDrag class="tb-draggable" *ngFor="let highlightControl of highlightsFormArray().controls; trackBy: trackByHighlightControl; |
|
|
|
let $index = index; last as isLast;" |
|
|
|
fxLayout="column" [ngStyle]="!isLast ? {paddingBottom: '8px'} : {}"> |
|
|
|
<tb-gauge-highlight [formControl]="highlightControl" |
|
|
|
[expanded]="highlightControl.new" |
|
|
|
(removeHighlight)="removeHighlight($index)"> |
|
|
|
</tb-gauge-highlight> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div *ngIf="!highlightsFormArray().controls.length"> |
|
|
|
<span translate fxLayoutAlign="center center" |
|
|
|
class="tb-prompt">widgets.gauge.no-highlights</span> |
|
|
|
</div> |
|
|
|
<div style="padding-top: 16px;"> |
|
|
|
<button mat-raised-button color="primary" |
|
|
|
type="button" |
|
|
|
(click)="addHighlight()"> |
|
|
|
<span translate>widgets.gauge.add-highlight</span> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.needle-color-shadow-down</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorNeedleShadowDown"> |
|
|
|
</tb-color-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-panel"> |
|
|
|
<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"> |
|
|
|
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic"> |
|
|
|
<input matInput type="number" min="0" formControlName="highlightsWidth"> |
|
|
|
</mat-form-field> |
|
|
|
<tb-color-settings formControlName="highlights"> |
|
|
|
<!-- [disabledColorType]="[colorType.constant, colorType.function]"--> |
|
|
|
</tb-color-settings> |
|
|
|
</div> |
|
|
|
</fieldset> |
|
|
|
</fieldset> |
|
|
|
<fieldset class="fields-group fields-group-slider"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.animation-settings</legend> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<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-panel-title> |
|
|
|
<mat-slide-toggle formControlName="animation" (click)="$event.stopPropagation()" |
|
|
|
<mat-slide-toggle class="mat-slide" formControlName="animation" (click)="$event.stopPropagation()" |
|
|
|
fxLayoutAlign="center"> |
|
|
|
{{ 'widgets.gauge.enable-animation' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
</mat-panel-title> |
|
|
|
<mat-panel-description fxLayoutAlign="end center" fxHide.xs translate> |
|
|
|
<mat-panel-description fxFlex="40" fxLayoutAlign="end center" fxHide.xs translate> |
|
|
|
widget-config.advanced-settings |
|
|
|
</mat-panel-description> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<ng-template matExpansionPanelContent> |
|
|
|
<section fxLayout="column"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>widgets.gauge.animation-duration</mat-label> |
|
|
|
<input matInput type="number" min="0" formControlName="animationDuration"> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>widgets.gauge.animation-rule</mat-label> |
|
|
|
<mat-select formControlName="animationRule"> |
|
|
|
<mat-option [value]="'linear'"> |
|
|
|
{{ 'widgets.gauge.animation-linear' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'quad'"> |
|
|
|
{{ 'widgets.gauge.animation-quad' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'quint'"> |
|
|
|
{{ 'widgets.gauge.animation-quint' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'cycle'"> |
|
|
|
{{ 'widgets.gauge.animation-cycle' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'bounce'"> |
|
|
|
{{ 'widgets.gauge.animation-bounce' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'elastic'"> |
|
|
|
{{ 'widgets.gauge.animation-elastic' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'dequad'"> |
|
|
|
{{ 'widgets.gauge.animation-dequad' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'dequint'"> |
|
|
|
{{ 'widgets.gauge.animation-dequint' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'decycle'"> |
|
|
|
{{ 'widgets.gauge.animation-decycle' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'debounce'"> |
|
|
|
{{ 'widgets.gauge.animation-debounce' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'delastic'"> |
|
|
|
{{ 'widgets.gauge.animation-delastic' | translate }} |
|
|
|
</mat-option> |
|
|
|
</mat-select> |
|
|
|
</mat-form-field> |
|
|
|
</section> |
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.animation-duration-rule</div> |
|
|
|
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px"> |
|
|
|
<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> |
|
|
|
<mat-form-field appearance="outline" subscriptSizing="dynamic"> |
|
|
|
<mat-select formControlName="animationRule"> |
|
|
|
<mat-option [value]="'linear'"> |
|
|
|
{{ 'widgets.gauge.animation-linear' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'quad'"> |
|
|
|
{{ 'widgets.gauge.animation-quad' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'quint'"> |
|
|
|
{{ 'widgets.gauge.animation-quint' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'cycle'"> |
|
|
|
{{ 'widgets.gauge.animation-cycle' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'bounce'"> |
|
|
|
{{ 'widgets.gauge.animation-bounce' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'elastic'"> |
|
|
|
{{ 'widgets.gauge.animation-elastic' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'dequad'"> |
|
|
|
{{ 'widgets.gauge.animation-dequad' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'dequint'"> |
|
|
|
{{ 'widgets.gauge.animation-dequint' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'decycle'"> |
|
|
|
{{ 'widgets.gauge.animation-decycle' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'debounce'"> |
|
|
|
{{ 'widgets.gauge.animation-debounce' | translate }} |
|
|
|
</mat-option> |
|
|
|
<mat-option [value]="'delastic'"> |
|
|
|
{{ 'widgets.gauge.animation-delastic' | translate }} |
|
|
|
</mat-option> |
|
|
|
</mat-select> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
</mat-expansion-panel> |
|
|
|
</fieldset> |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-template #radialGauge let-settingsForm="settingsForm"> |
|
|
|
<fieldset class="fields-group" [formGroup]="settingsForm"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.radial-gauge-settings</legend> |
|
|
|
<section fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px" fxLayoutAlign.gt-xs="start center"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>widgets.gauge.start-ticks-angle</mat-label> |
|
|
|
<input matInput type="number" min="0" max="360" formControlName="startAngle"> |
|
|
|
<div class="tb-form-panel" [formGroup]="settingsForm"> |
|
|
|
<div class="tb-form-panel-title" translate>widgets.gauge.radial-gauge-settings</div> |
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.start-ticks-angle</div> |
|
|
|
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic"> |
|
|
|
<input matInput formControlName="startAngle" type="number" min="0" max="360" placeholder="{{ 'widget-config.set' | translate }}"> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.ticks-angle</div> |
|
|
|
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic"> |
|
|
|
<input matInput formControlName="ticksAngle" type="number" min="0" max="360" placeholder="{{ 'widget-config.set' | translate }}"> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>widgets.gauge.ticks-angle</mat-label> |
|
|
|
<input matInput type="number" min="0" max="360" formControlName="ticksAngle"> |
|
|
|
</div> |
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.needle-circle-size</div> |
|
|
|
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic"> |
|
|
|
<input matInput formControlName="needleCircleSize" type="number" min="0" placeholder="{{ 'widget-config.set' | translate }}"> |
|
|
|
</mat-form-field> |
|
|
|
</section> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>widgets.gauge.needle-circle-size</mat-label> |
|
|
|
<input matInput type="number" min="0" formControlName="needleCircleSize"> |
|
|
|
</mat-form-field> |
|
|
|
</fieldset> |
|
|
|
</div> |
|
|
|
|
|
|
|
<ng-container *ngTemplateOutlet="arrowScaleDefaultColor"></ng-container> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template #linearGauge let-settingsForm="settingsForm"> |
|
|
|
<fieldset class="fields-group" [formGroup]="settingsForm"> |
|
|
|
<legend class="group-title" translate>widgets.gauge.linear-gauge-settings</legend> |
|
|
|
<section fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<mat-label translate>widgets.gauge.bar-stroke-width</mat-label> |
|
|
|
<input matInput type="number" min="0" formControlName="barStrokeWidth"> |
|
|
|
</mat-form-field> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorBarStroke" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.bar-stroke-color' | translate }}" openOnInput colorClearButton> |
|
|
|
</tb-color-input> |
|
|
|
</section> |
|
|
|
<section fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px"> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorBar" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.bar-background-color' | translate }}" openOnInput colorClearButton> |
|
|
|
<div class="tb-form-panel" [formGroup]="settingsForm"> |
|
|
|
<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"> |
|
|
|
<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> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorBar"> |
|
|
|
</tb-color-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.bar-background-color</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorBar"> |
|
|
|
</tb-color-input> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorBarEnd" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.bar-background-color-end' | translate }}" openOnInput colorClearButton> |
|
|
|
</div> |
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.bar-background-color-end</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorBarEnd"> |
|
|
|
</tb-color-input> |
|
|
|
</section> |
|
|
|
<section fxLayout="row" fxLayout.xs="column" fxLayoutGap.gt-xs="8px"> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorBarProgress" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.progress-bar-color' | translate }}" openOnInput colorClearButton> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.progress-bar-color-start</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorBarProgress"> |
|
|
|
</tb-color-input> |
|
|
|
<tb-color-input fxFlex |
|
|
|
formControlName="colorBarProgressEnd" |
|
|
|
icon="format_color_fill" |
|
|
|
label="{{ 'widgets.gauge.progress-bar-color-end' | translate }}" openOnInput colorClearButton> |
|
|
|
</div> |
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
<div translate>widgets.gauge.progress-bar-color-end</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
colorClearButton |
|
|
|
formControlName="colorBarProgressEnd"> |
|
|
|
</tb-color-input> |
|
|
|
</section> |
|
|
|
</fieldset> |
|
|
|
</div> |
|
|
|
<ng-container *ngTemplateOutlet="arrowScaleDefaultColor"></ng-container> |
|
|
|
</div> |
|
|
|
|
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template #arrowScaleDefaultColor> |
|
|
|
<div class="tb-form-row space-between" [formGroup]="analogueGaugeWidgetSettingsForm"> |
|
|
|
<div>{{ 'widgets.gauge.arrow-and-scale-color' | translate }}</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
formControlName="defaultColor"> |
|
|
|
</tb-color-input> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
|