|
|
@ -21,108 +21,113 @@ |
|
|
</mat-slide-toggle> |
|
|
</mat-slide-toggle> |
|
|
<fieldset [class.!hidden]="updateMultipleAttributesKeySettingsForm.get('dataKeyHidden').value" class="fields-group"> |
|
|
<fieldset [class.!hidden]="updateMultipleAttributesKeySettingsForm.get('dataKeyHidden').value" class="fields-group"> |
|
|
<legend class="group-title" translate>widgets.input-widgets.general-settings</legend> |
|
|
<legend class="group-title" translate>widgets.input-widgets.general-settings</legend> |
|
|
<section class="flex flex-col gt-xs:flex-row gt-xs:items-center gt-xs:justify-start gt-xs:gap-2"> |
|
|
<div class="flex flex-col"> |
|
|
<mat-form-field class="mat-block flex-full xs:max-h-50% gt-xs:max-w-50%"> |
|
|
<section class="flex flex-col gt-xs:flex-row gt-xs:items-center gt-xs:justify-start gt-xs:gap-2"> |
|
|
<mat-label translate>widgets.input-widgets.datakey-type</mat-label> |
|
|
<mat-form-field class="mat-block flex-full xs:max-h-50% gt-xs:max-w-50%"> |
|
|
<mat-select formControlName="dataKeyType"> |
|
|
<mat-label translate>widgets.input-widgets.datakey-type</mat-label> |
|
|
<mat-option [value]="'server'"> |
|
|
<mat-select formControlName="dataKeyType"> |
|
|
{{ 'widgets.input-widgets.datakey-type-server' | translate }} |
|
|
<mat-option [value]="'server'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-type-server' | translate }} |
|
|
<mat-option [value]="'shared'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-type-shared' | translate }} |
|
|
<mat-option [value]="'shared'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-type-shared' | translate }} |
|
|
<mat-option [value]="'timeseries'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-type-timeseries' | translate }} |
|
|
<mat-option [value]="'timeseries'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-type-timeseries' | translate }} |
|
|
</mat-select> |
|
|
</mat-option> |
|
|
</mat-form-field> |
|
|
</mat-select> |
|
|
<mat-form-field class="mat-block flex-full xs:max-h-50% gt-xs:max-w-50%"> |
|
|
</mat-form-field> |
|
|
<mat-label translate>widgets.input-widgets.datakey-value-type</mat-label> |
|
|
<mat-form-field class="mat-block flex-full xs:max-h-50% gt-xs:max-w-50%"> |
|
|
<mat-select formControlName="dataKeyValueType"> |
|
|
<mat-label translate>widgets.input-widgets.datakey-value-type</mat-label> |
|
|
<mat-option [value]="'string'"> |
|
|
<mat-select formControlName="dataKeyValueType"> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-string' | translate }} |
|
|
<mat-option [value]="'string'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-string' | translate }} |
|
|
<mat-option [value]="'double'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-double' | translate }} |
|
|
<mat-option [value]="'double'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-double' | translate }} |
|
|
<mat-option [value]="'integer'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-integer' | translate }} |
|
|
<mat-option [value]="'integer'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-integer' | translate }} |
|
|
<mat-option [value]="'booleanCheckbox'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-boolean-checkbox' | translate }} |
|
|
<mat-option [value]="'booleanCheckbox'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-boolean-checkbox' | translate }} |
|
|
<mat-option [value]="'booleanSwitch'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-boolean-switch' | translate }} |
|
|
<mat-option [value]="'booleanSwitch'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-boolean-switch' | translate }} |
|
|
<mat-option [value]="'dateTime'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-date-time' | translate }} |
|
|
<mat-option [value]="'dateTime'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-date-time' | translate }} |
|
|
<mat-option [value]="'date'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-date' | translate }} |
|
|
<mat-option [value]="'date'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-date' | translate }} |
|
|
<mat-option [value]="'time'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-time' | translate }} |
|
|
<mat-option [value]="'time'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-time' | translate }} |
|
|
<mat-option [value]="'select'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-select' | translate }} |
|
|
<mat-option [value]="'select'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-select' | translate }} |
|
|
<mat-option [value]="'JSON'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-json' | translate }} |
|
|
<mat-option [value]="'radio'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-radio' | translate }} |
|
|
<mat-option [value]="'color'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-color' | translate }} |
|
|
<mat-option [value]="'JSON'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-json' | translate }} |
|
|
</mat-select> |
|
|
</mat-option> |
|
|
</mat-form-field> |
|
|
<mat-option [value]="'color'"> |
|
|
</section> |
|
|
{{ 'widgets.input-widgets.datakey-value-type-color' | translate }} |
|
|
<mat-checkbox formControlName="required" style="margin-bottom: 8px;"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.value-is-required' | translate }} |
|
|
</mat-select> |
|
|
</mat-checkbox> |
|
|
</mat-form-field> |
|
|
<section class="flex flex-col gt-xs:flex-row gt-xs:items-center gt-xs:justify-start gt-xs:gap-2"> |
|
|
</section> |
|
|
<mat-form-field class="mat-block flex-full xs:max-h-50% gt-xs:max-w-50%"> |
|
|
<mat-checkbox formControlName="required" style="margin-bottom: 8px;"> |
|
|
<mat-label translate>widgets.input-widgets.ability-to-edit-attribute</mat-label> |
|
|
{{ 'widgets.input-widgets.value-is-required' | translate }} |
|
|
<mat-select formControlName="isEditable"> |
|
|
</mat-checkbox> |
|
|
<mat-option [value]="'editable'"> |
|
|
<section class="flex flex-col gt-xs:flex-row gt-xs:items-center gt-xs:justify-start gt-xs:gap-2"> |
|
|
{{ 'widgets.input-widgets.ability-to-edit-attribute-editable' | translate }} |
|
|
<mat-form-field class="mat-block flex-full xs:max-h-50% gt-xs:max-w-50%"> |
|
|
</mat-option> |
|
|
<mat-label translate>widgets.input-widgets.ability-to-edit-attribute</mat-label> |
|
|
<mat-option [value]="'disabled'"> |
|
|
<mat-select formControlName="isEditable"> |
|
|
{{ 'widgets.input-widgets.ability-to-edit-attribute-disabled' | translate }} |
|
|
<mat-option [value]="'editable'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.ability-to-edit-attribute-editable' | translate }} |
|
|
<mat-option [value]="'readonly'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.ability-to-edit-attribute-readonly' | translate }} |
|
|
<mat-option [value]="'disabled'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.ability-to-edit-attribute-disabled' | translate }} |
|
|
</mat-select> |
|
|
</mat-option> |
|
|
</mat-form-field> |
|
|
<mat-option [value]="'readonly'"> |
|
|
<mat-form-field [class.!hidden]="updateMultipleAttributesKeySettingsForm.get('isEditable').value !== 'editable'" class="mat-block flex-full xs:max-h-50% gt-xs:max-w-50%"> |
|
|
{{ 'widgets.input-widgets.ability-to-edit-attribute-readonly' | translate }} |
|
|
<mat-label translate>widgets.input-widgets.disable-on-datakey-name</mat-label> |
|
|
</mat-option> |
|
|
<input matInput formControlName="disabledOnDataKey"> |
|
|
</mat-select> |
|
|
</mat-form-field> |
|
|
</mat-form-field> |
|
|
</section> |
|
|
<mat-form-field [class.!hidden]="updateMultipleAttributesKeySettingsForm.get('isEditable').value !== 'editable'" class="mat-block flex-full xs:max-h-50% gt-xs:max-w-50%"> |
|
|
<section *ngIf="!['booleanSwitch', 'booleanCheckbox'].includes(updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value)" |
|
|
<mat-label translate>widgets.input-widgets.disable-on-datakey-name</mat-label> |
|
|
class="flex flex-col gt-xs:flex-row gt-xs:items-center gt-xs:justify-start gt-xs:gap-2"> |
|
|
<input matInput formControlName="disabledOnDataKey"> |
|
|
<mat-form-field class="mat-block flex-full xs:max-h-50% gt-xs:max-w-50%"> |
|
|
</mat-form-field> |
|
|
<mat-label translate>widgets.input-widgets.field-appearance</mat-label> |
|
|
</section> |
|
|
<mat-select formControlName="appearance"> |
|
|
<section *ngIf="!['booleanSwitch', 'booleanCheckbox', 'radio'].includes(updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value)" |
|
|
<mat-option [value]="'fill'"> |
|
|
class="flex flex-col gt-xs:flex-row gt-xs:items-center gt-xs:justify-start gt-xs:gap-2"> |
|
|
{{ 'widgets.input-widgets.appearance-fill' | translate }} |
|
|
<mat-form-field class="mat-block flex-full xs:max-h-50% gt-xs:max-w-50%"> |
|
|
</mat-option> |
|
|
<mat-label translate>widgets.input-widgets.field-appearance</mat-label> |
|
|
<mat-option [value]="'outline'"> |
|
|
<mat-select formControlName="appearance"> |
|
|
{{ 'widgets.input-widgets.appearance-outline' | translate }} |
|
|
<mat-option [value]="'fill'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.appearance-fill' | translate }} |
|
|
</mat-select> |
|
|
</mat-option> |
|
|
</mat-form-field> |
|
|
<mat-option [value]="'outline'"> |
|
|
<mat-form-field class="mat-block flex-full xs:max-h-50% gt-xs:max-w-50%"> |
|
|
{{ 'widgets.input-widgets.appearance-outline' | translate }} |
|
|
<mat-label translate>widgets.input-widgets.subscript-sizing</mat-label> |
|
|
</mat-option> |
|
|
<mat-select formControlName="subscriptSizing"> |
|
|
</mat-select> |
|
|
<mat-option [value]="'fixed'"> |
|
|
</mat-form-field> |
|
|
{{ 'widgets.input-widgets.subscript-sizing-fixed' | translate }} |
|
|
<mat-form-field class="mat-block flex-full xs:max-h-50% gt-xs:max-w-50%"> |
|
|
</mat-option> |
|
|
<mat-label translate>widgets.input-widgets.subscript-sizing</mat-label> |
|
|
<mat-option [value]="'dynamic'"> |
|
|
<mat-select formControlName="subscriptSizing"> |
|
|
{{ 'widgets.input-widgets.subscript-sizing-dynamic' | translate }} |
|
|
<mat-option [value]="'fixed'"> |
|
|
</mat-option> |
|
|
{{ 'widgets.input-widgets.subscript-sizing-fixed' | translate }} |
|
|
</mat-select> |
|
|
</mat-option> |
|
|
</mat-form-field> |
|
|
<mat-option [value]="'dynamic'"> |
|
|
</section> |
|
|
{{ 'widgets.input-widgets.subscript-sizing-dynamic' | translate }} |
|
|
|
|
|
</mat-option> |
|
|
|
|
|
</mat-select> |
|
|
|
|
|
</mat-form-field> |
|
|
|
|
|
</section> |
|
|
|
|
|
</div> |
|
|
</fieldset> |
|
|
</fieldset> |
|
|
<fieldset [class.!hidden]="updateMultipleAttributesKeySettingsForm.get('dataKeyHidden').value || |
|
|
<fieldset [class.!hidden]="updateMultipleAttributesKeySettingsForm.get('dataKeyHidden').value || |
|
|
updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value !== 'booleanSwitch'" class="fields-group"> |
|
|
updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value !== 'booleanSwitch'" class="fields-group"> |
|
|
@ -140,8 +145,10 @@ |
|
|
</mat-form-field> |
|
|
</mat-form-field> |
|
|
</fieldset> |
|
|
</fieldset> |
|
|
<fieldset [class.!hidden]="updateMultipleAttributesKeySettingsForm.get('dataKeyHidden').value || |
|
|
<fieldset [class.!hidden]="updateMultipleAttributesKeySettingsForm.get('dataKeyHidden').value || |
|
|
updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value !== 'select'" class="fields-group"> |
|
|
(updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value !== 'select' && updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value !== 'radio')" class="fields-group"> |
|
|
<legend class="group-title" translate>widgets.input-widgets.select-options</legend> |
|
|
<legend class="group-title"> |
|
|
|
|
|
{{ (updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value === 'select' ? 'widgets.input-widgets.select-options' : 'widgets.input-widgets.radio-options') | translate }} |
|
|
|
|
|
</legend> |
|
|
<div class="flex flex-col"> |
|
|
<div class="flex flex-col"> |
|
|
<div class="tb-control-list tb-drop-list" cdkDropList cdkDropListOrientation="vertical" |
|
|
<div class="tb-control-list tb-drop-list" cdkDropList cdkDropListOrientation="vertical" |
|
|
(cdkDropListDropped)="selectOptionDrop($event)"> |
|
|
(cdkDropListDropped)="selectOptionDrop($event)"> |
|
|
@ -155,18 +162,51 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div *ngIf="!selectOptionsFormArray().controls.length"> |
|
|
<div *ngIf="!selectOptionsFormArray().controls.length"> |
|
|
<span translate |
|
|
<span class="tb-prompt flex items-center justify-center"> |
|
|
class="tb-prompt flex items-center justify-center">widgets.input-widgets.no-select-options</span> |
|
|
{{ (updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value === 'select' ? 'widgets.input-widgets.no-select-options' : 'widgets.input-widgets.no-radio-options') | translate }} |
|
|
|
|
|
</span> |
|
|
</div> |
|
|
</div> |
|
|
<div style="padding-top: 16px;"> |
|
|
<div style="padding-top: 16px;"> |
|
|
<button mat-raised-button color="primary" |
|
|
<button mat-raised-button color="primary" |
|
|
type="button" |
|
|
type="button" |
|
|
(click)="addSelectOption()"> |
|
|
(click)="addSelectOption()"> |
|
|
<span translate>widgets.input-widgets.add-select-option</span> |
|
|
<span> |
|
|
|
|
|
{{ (updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value === 'select' ? 'widgets.input-widgets.add-select-option' : 'widgets.input-widgets.add-radio-option') | translate }} |
|
|
|
|
|
</span> |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</fieldset> |
|
|
</fieldset> |
|
|
|
|
|
<div class="tb-form-panel mb-3.5" |
|
|
|
|
|
[class.!hidden]="updateMultipleAttributesKeySettingsForm.get('dataKeyHidden').value || |
|
|
|
|
|
updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value !== 'radio'"> |
|
|
|
|
|
<div class="tb-form-panel-title" translate>widgets.input-widgets.radio-button-settings</div> |
|
|
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
|
|
<div>{{ 'widgets.input-widgets.color' | translate }}</div> |
|
|
|
|
|
<tb-color-input asBoxInput |
|
|
|
|
|
formControlName="radioColor"> |
|
|
|
|
|
</tb-color-input> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
|
|
<div>{{ 'widgets.input-widgets.columns' | translate }}</div> |
|
|
|
|
|
<mat-form-field appearance="outline" class="number" subscriptSizing="dynamic"> |
|
|
|
|
|
<input matInput formControlName="radioColumns" type="number" min="0" step="1" placeholder="{{ 'widget-config.set' | translate }}"> |
|
|
|
|
|
</mat-form-field> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="tb-form-row space-between"> |
|
|
|
|
|
<div>{{ 'widgets.input-widgets.radio-label-position' | translate }}</div> |
|
|
|
|
|
<mat-form-field class="medium-width" appearance="outline" subscriptSizing="dynamic"> |
|
|
|
|
|
<mat-select formControlName="radioLabelPosition"> |
|
|
|
|
|
<mat-option [value]="'after'"> |
|
|
|
|
|
{{ 'widgets.input-widgets.radio-label-position-after' | translate }} |
|
|
|
|
|
</mat-option> |
|
|
|
|
|
<mat-option [value]="'before'"> |
|
|
|
|
|
{{ 'widgets.input-widgets.radio-label-position-before' | translate }} |
|
|
|
|
|
</mat-option> |
|
|
|
|
|
</mat-select> |
|
|
|
|
|
</mat-form-field> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
<fieldset [class.!hidden]="updateMultipleAttributesKeySettingsForm.get('dataKeyHidden').value || |
|
|
<fieldset [class.!hidden]="updateMultipleAttributesKeySettingsForm.get('dataKeyHidden').value || |
|
|
(updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value !== 'integer' && |
|
|
(updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value !== 'integer' && |
|
|
updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value !== 'double')" class="fields-group"> |
|
|
updateMultipleAttributesKeySettingsForm.get('dataKeyValueType').value !== 'double')" class="fields-group"> |
|
|
|