diff --git a/ui-ngx/patches/@angular+compiler+18.2.13.patch b/ui-ngx/patches/@angular+compiler+18.2.13.patch index a4245cb0e9..af8e6995cd 100644 --- a/ui-ngx/patches/@angular+compiler+18.2.13.patch +++ b/ui-ngx/patches/@angular+compiler+18.2.13.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@angular/compiler/fesm2022/compiler.mjs b/node_modules/@angular/compiler/fesm2022/compiler.mjs -index a00b189..260e7be 100755 +index a00b189..58896de 100755 --- a/node_modules/@angular/compiler/fesm2022/compiler.mjs +++ b/node_modules/@angular/compiler/fesm2022/compiler.mjs @@ -18631,6 +18631,7 @@ function SECURITY_SCHEMA() { @@ -86,3 +86,12 @@ index a00b189..260e7be 100755 ]); registerContext(SecurityContext.RESOURCE_URL, [ 'applet|code', +@@ -18659,6 +18729,8 @@ function SECURITY_SCHEMA() { + 'object|codebase', + 'object|data', + 'script|src', ++ 'script|href', ++ 'script|xlink:href', + ]); + } + return _SECURITY_SCHEMA; diff --git a/ui-ngx/src/app/modules/home/components/widget/config/basic/button/segmented-button-basic-config.component.html b/ui-ngx/src/app/modules/home/components/widget/config/basic/button/segmented-button-basic-config.component.html index b677374c19..f748c13f81 100644 --- a/ui-ngx/src/app/modules/home/components/widget/config/basic/button/segmented-button-basic-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/config/basic/button/segmented-button-basic-config.component.html @@ -126,7 +126,6 @@ subscriptSizing="dynamic" [predefinedValuesButton]="true" [predefinedValues]="predefinedValues" - [disabled]="!segmentedButtonWidgetConfigForm.get('leftAppearance').get('showLabel').value" placeholderText="{{ 'widget-config.set' | translate }}" formControlName="label" > @@ -164,7 +163,6 @@ subscriptSizing="dynamic" [predefinedValuesButton]="true" [predefinedValues]="predefinedValues" - [disabled]="!segmentedButtonWidgetConfigForm.get('rightAppearance').get('showLabel').value" placeholderText="{{ 'widget-config.set' | translate }}" formControlName="label" > diff --git a/ui-ngx/src/app/modules/home/components/widget/config/basic/button/segmented-button-basic-config.component.ts b/ui-ngx/src/app/modules/home/components/widget/config/basic/button/segmented-button-basic-config.component.ts index d2d6968831..895848a933 100644 --- a/ui-ngx/src/app/modules/home/components/widget/config/basic/button/segmented-button-basic-config.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/config/basic/button/segmented-button-basic-config.component.ts @@ -142,4 +142,52 @@ export class SegmentedButtonBasicConfigComponent extends BasicWidgetConfigCompon return this.widgetConfig; } + + protected validatorTriggers(): string[] { + return ['appearance.leftAppearance.showLabel', 'appearance.leftAppearance.showIcon', 'appearance.rightAppearance.showLabel', 'appearance.rightAppearance.showIcon',]; + } + + protected updateValidators(emitEvent: boolean) { + const showLeftLabel: boolean = this.segmentedButtonWidgetConfigForm.get('appearance.leftAppearance.showLabel').value; + const showRightLabel: boolean = this.segmentedButtonWidgetConfigForm.get('appearance.rightAppearance.showLabel').value; + + const showLeftIcon: boolean = this.segmentedButtonWidgetConfigForm.get('appearance.leftAppearance.showIcon').value; + const showRightIcon: boolean = this.segmentedButtonWidgetConfigForm.get('appearance.rightAppearance.showIcon').value; + + if (showLeftLabel) { + this.segmentedButtonWidgetConfigForm.get('appearance.leftAppearance.label').enable({emitEvent}); + this.segmentedButtonWidgetConfigForm.get('appearance.leftAppearance.labelFont').enable({emitEvent}); + } else { + this.segmentedButtonWidgetConfigForm.get('appearance.leftAppearance.label').disable({emitEvent}); + this.segmentedButtonWidgetConfigForm.get('appearance.leftAppearance.labelFont').disable({emitEvent}); + } + + if (showRightLabel) { + this.segmentedButtonWidgetConfigForm.get('appearance.rightAppearance.label').enable({emitEvent}); + this.segmentedButtonWidgetConfigForm.get('appearance.rightAppearance.labelFont').enable({emitEvent}); + } else { + this.segmentedButtonWidgetConfigForm.get('appearance.rightAppearance.label').disable({emitEvent}); + this.segmentedButtonWidgetConfigForm.get('appearance.rightAppearance.labelFont').disable({emitEvent}); + } + + if (showLeftIcon) { + this.segmentedButtonWidgetConfigForm.get('appearance.leftAppearance.icon').enable({emitEvent}); + this.segmentedButtonWidgetConfigForm.get('appearance.leftAppearance.iconSize').enable({emitEvent}); + this.segmentedButtonWidgetConfigForm.get('appearance.leftAppearance.iconSizeUnit').enable({emitEvent}); + } else { + this.segmentedButtonWidgetConfigForm.get('appearance.leftAppearance.icon').disable({emitEvent}); + this.segmentedButtonWidgetConfigForm.get('appearance.leftAppearance.iconSize').disable({emitEvent}); + this.segmentedButtonWidgetConfigForm.get('appearance.leftAppearance.iconSizeUnit').disable({emitEvent}); + } + + if (showRightIcon) { + this.segmentedButtonWidgetConfigForm.get('appearance.rightAppearance.icon').enable({emitEvent}); + this.segmentedButtonWidgetConfigForm.get('appearance.rightAppearance.iconSize').enable({emitEvent}); + this.segmentedButtonWidgetConfigForm.get('appearance.rightAppearance.iconSizeUnit').enable({emitEvent}); + } else { + this.segmentedButtonWidgetConfigForm.get('appearance.rightAppearance.icon').disable({emitEvent}); + this.segmentedButtonWidgetConfigForm.get('appearance.rightAppearance.iconSize').disable({emitEvent}); + this.segmentedButtonWidgetConfigForm.get('appearance.rightAppearance.iconSizeUnit').disable({emitEvent}); + } + } } diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/segmented-button-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/segmented-button-widget-settings.component.html index 67579541c9..fc27e782e2 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/segmented-button-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/segmented-button-widget-settings.component.html @@ -117,7 +117,6 @@ brackets="curly" subscriptSizing="dynamic" predefinedValuesButton="true" - [disabled]="!segmentedButtonWidgetSettingsForm.get('leftAppearance').get('showLabel').value" [predefinedValues]="predefinedValues" placeholderText="{{ 'widget-config.set' | translate }}" formControlName="label" @@ -155,7 +154,6 @@ brackets="curly" subscriptSizing="dynamic" predefinedValuesButton="true" - [disabled]="!segmentedButtonWidgetSettingsForm.get('rightAppearance').get('showLabel').value" [predefinedValues]="predefinedValues" placeholderText="{{ 'widget-config.set' | translate }}" formControlName="label" diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/segmented-button-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/segmented-button-widget-settings.component.ts index b0eaf5c464..540688c18e 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/segmented-button-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/button/segmented-button-widget-settings.component.ts @@ -38,6 +38,7 @@ import { WidgetButtonToggleState, widgetButtonToggleStatesTranslations } from '@home/components/widget/lib/button/segmented-button-widget.models'; +import { ValueCardLayout } from '@home/components/widget/lib/cards/value-card-widget.models'; @Component({ selector: 'tb-segmented-button-widget-settings', @@ -139,4 +140,52 @@ export class SegmentedButtonWidgetSettingsComponent extends WidgetSettingsCompon }) }); } + + protected validatorTriggers(): string[] { + return ['appearance.leftAppearance.showLabel', 'appearance.leftAppearance.showIcon', 'appearance.rightAppearance.showLabel', 'appearance.rightAppearance.showIcon',]; + } + + protected updateValidators(emitEvent: boolean) { + const showLeftLabel: boolean = this.segmentedButtonWidgetSettingsForm.get('appearance.leftAppearance.showLabel').value; + const showRightLabel: boolean = this.segmentedButtonWidgetSettingsForm.get('appearance.rightAppearance.showLabel').value; + + const showLeftIcon: boolean = this.segmentedButtonWidgetSettingsForm.get('appearance.leftAppearance.showIcon').value; + const showRightIcon: boolean = this.segmentedButtonWidgetSettingsForm.get('appearance.rightAppearance.showIcon').value; + + if (showLeftLabel) { + this.segmentedButtonWidgetSettingsForm.get('appearance.leftAppearance.label').enable({emitEvent}); + this.segmentedButtonWidgetSettingsForm.get('appearance.leftAppearance.labelFont').enable({emitEvent}); + } else { + this.segmentedButtonWidgetSettingsForm.get('appearance.leftAppearance.label').disable({emitEvent}); + this.segmentedButtonWidgetSettingsForm.get('appearance.leftAppearance.labelFont').disable({emitEvent}); + } + + if (showRightLabel) { + this.segmentedButtonWidgetSettingsForm.get('appearance.rightAppearance.label').enable({emitEvent}); + this.segmentedButtonWidgetSettingsForm.get('appearance.rightAppearance.labelFont').enable({emitEvent}); + } else { + this.segmentedButtonWidgetSettingsForm.get('appearance.rightAppearance.label').disable({emitEvent}); + this.segmentedButtonWidgetSettingsForm.get('appearance.rightAppearance.labelFont').disable({emitEvent}); + } + + if (showLeftIcon) { + this.segmentedButtonWidgetSettingsForm.get('appearance.leftAppearance.icon').enable({emitEvent}); + this.segmentedButtonWidgetSettingsForm.get('appearance.leftAppearance.iconSize').enable({emitEvent}); + this.segmentedButtonWidgetSettingsForm.get('appearance.leftAppearance.iconSizeUnit').enable({emitEvent}); + } else { + this.segmentedButtonWidgetSettingsForm.get('appearance.leftAppearance.icon').disable({emitEvent}); + this.segmentedButtonWidgetSettingsForm.get('appearance.leftAppearance.iconSize').disable({emitEvent}); + this.segmentedButtonWidgetSettingsForm.get('appearance.leftAppearance.iconSizeUnit').disable({emitEvent}); + } + + if (showRightIcon) { + this.segmentedButtonWidgetSettingsForm.get('appearance.rightAppearance.icon').enable({emitEvent}); + this.segmentedButtonWidgetSettingsForm.get('appearance.rightAppearance.iconSize').enable({emitEvent}); + this.segmentedButtonWidgetSettingsForm.get('appearance.rightAppearance.iconSizeUnit').enable({emitEvent}); + } else { + this.segmentedButtonWidgetSettingsForm.get('appearance.rightAppearance.icon').disable({emitEvent}); + this.segmentedButtonWidgetSettingsForm.get('appearance.rightAppearance.iconSize').disable({emitEvent}); + this.segmentedButtonWidgetSettingsForm.get('appearance.rightAppearance.iconSizeUnit').disable({emitEvent}); + } + } } diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/send-rpc-widget-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/send-rpc-widget-settings.component.html index ea21202511..72bc8d8219 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/send-rpc-widget-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/send-rpc-widget-settings.component.html @@ -18,15 +18,10 @@
widgets.rpc.common-settings - + + widgets.rpc.widget-title + + widgets.rpc.button-label diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/send-rpc-widget-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/send-rpc-widget-settings.component.ts index 91dbf23e85..b8af3eaf0d 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/send-rpc-widget-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/control/send-rpc-widget-settings.component.ts @@ -15,7 +15,7 @@ /// import { Component } from '@angular/core'; -import { WidgetSettings, WidgetSettingsComponent, widgetTitleAutocompleteValues } from '@shared/models/widget.models'; +import { WidgetSettings, WidgetSettingsComponent } from '@shared/models/widget.models'; import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; @@ -32,8 +32,6 @@ export class SendRpcWidgetSettingsComponent extends WidgetSettingsComponent { contentTypes = ContentType; - predefinedValues = widgetTitleAutocompleteValues; - constructor(protected store: Store, private fb: UntypedFormBuilder) { super(store); diff --git a/ui-ngx/src/app/shared/models/constants.ts b/ui-ngx/src/app/shared/models/constants.ts index 036223eec1..2890b4827c 100644 --- a/ui-ngx/src/app/shared/models/constants.ts +++ b/ui-ngx/src/app/shared/models/constants.ts @@ -217,7 +217,7 @@ export const HelpLinks = { mobileQrCode: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/ui/mobile-qr-code/`, calculatedField: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/calculated-fields/`, aiModels: `${helpBaseUrl}/docs${docPlatformPrefix}/samples/analytics/ai-models/`, - apiKeys: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/ui/api-keys`, + apiKeys: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/security/api-keys/`, timewindowSettings: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/dashboards/#time-window`, trendzSettings: `${helpBaseUrl}/docs/trendz/`, alarmRules: `${helpBaseUrl}/docs${docPlatformPrefix}/user-guide/alarm-rules/`,