Browse Source

Reworked SCADA tag actions editor and made click/dblclick mutually exclusive

pull/15919/head
Maksym Tsymbarov 4 weeks ago
parent
commit
90af292e36
  1. 82
      ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts
  2. 6
      ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-components.module.ts
  3. 67
      ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag-actions-panel.component.html
  4. 23
      ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag-actions-panel.component.scss
  5. 126
      ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag-actions-panel.component.ts
  6. 31
      ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag-function-panel.component.ts
  7. 37
      ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag.component.html
  8. 9
      ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag.component.scss
  9. 141
      ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag.component.ts
  10. 4
      ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tags.component.html
  11. 9
      ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tags.component.scss
  12. 10
      ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tags.component.ts
  13. 10
      ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata.component.ts
  14. 32
      ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-tag-action-button.directive.ts
  15. 30
      ui-ngx/src/app/modules/home/pages/scada-symbol/scada-symbol-editor.models.ts
  16. 57
      ui-ngx/src/app/modules/home/pages/scada-symbol/scada-symbol-tooltip.components.ts
  17. 14
      ui-ngx/src/app/modules/home/pages/scada-symbol/scada-symbol.component.ts
  18. 3
      ui-ngx/src/assets/help/en_US/scada/tag_click_action_fn.md
  19. 6
      ui-ngx/src/assets/help/en_US/scada/tag_dblclick_action_fn.md
  20. 5
      ui-ngx/src/assets/locale/locale.constant-en_US.json

82
ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts

@ -106,20 +106,26 @@ export type ScadaSymbolActionTrigger = 'click' | 'dblclick' | 'contextmenu';
export interface ScadaSymbolActionTriggerInfo {
name: string;
enabledLabel: string;
helpId: string;
excludedBy?: ScadaSymbolActionTrigger;
}
export const scadaSymbolActionTriggerInfo: Record<ScadaSymbolActionTrigger, ScadaSymbolActionTriggerInfo> = {
click: {
name: 'scada.tag.on-click-action',
enabledLabel: 'scada.tag.on-click-action-enabled',
helpId: 'scada/tag_click_action_fn'
},
dblclick: {
name: 'scada.tag.on-double-click-action',
helpId: 'scada/tag_dblclick_action_fn'
enabledLabel: 'scada.tag.on-double-click-action-enabled',
helpId: 'scada/tag_dblclick_action_fn',
excludedBy: 'click'
},
contextmenu: {
name: 'scada.tag.on-right-click-action',
enabledLabel: 'scada.tag.on-right-click-action-enabled',
helpId: 'scada/tag_contextmenu_action_fn'
}
};
@ -127,12 +133,6 @@ export const scadaSymbolActionTriggerInfo: Record<ScadaSymbolActionTrigger, Scad
export const scadaSymbolActionTriggers =
Object.keys(scadaSymbolActionTriggerInfo) as ScadaSymbolActionTrigger[];
// Max interval between clicks of a double click: a click action is deferred by this amount
// when the same tag also has a dblclick action, so it can be canceled by the second click.
const dblClickDelay = 500;
export type ScadaSymbolActionFunction = (ctx: ScadaSymbolContext, element: Element, event: Event) => void;
export interface ScadaSymbolAction {
actionFunction?: string;
@ -143,9 +143,27 @@ export interface ScadaSymbolTag {
tag: string;
stateRenderFunction?: string;
stateRender?: ScadaSymbolTagStateRenderFunction;
actions?: {[trigger in ScadaSymbolActionTrigger]?: ScadaSymbolAction};
actions?: ScadaSymbolTagActions;
}
export type ScadaSymbolTagActions = {[trigger in ScadaSymbolActionTrigger]?: ScadaSymbolAction};
export const exclusiveActionTrigger = (trigger: ScadaSymbolActionTrigger): ScadaSymbolActionTrigger | undefined =>
scadaSymbolActionTriggerInfo[trigger].excludedBy ??
scadaSymbolActionTriggers.find(other => scadaSymbolActionTriggerInfo[other].excludedBy === trigger);
const isActionExcluded = (actions: ScadaSymbolTagActions, trigger: string): boolean =>
scadaSymbolActionTriggers.some(known => {
const excludedBy = scadaSymbolActionTriggerInfo[known].excludedBy;
return known === trigger && !!excludedBy && !!actions[excludedBy];
});
const activeTagActions = (actions: ScadaSymbolTagActions): [string, ScadaSymbolAction][] =>
Object.entries(actions).filter(([trigger, action]) => !!action && !isActionExcluded(actions, trigger));
export const activeActionTriggers = (actions: ScadaSymbolTagActions): ScadaSymbolActionTrigger[] =>
actions ? scadaSymbolActionTriggers.filter(trigger => !!actions[trigger] && !isActionExcluded(actions, trigger)) : [];
export enum ScadaSymbolBehaviorType {
value = 'value',
action = 'action',
@ -532,8 +550,6 @@ export class ScadaSymbolObject {
private readonly shapeResize$: ResizeObserver;
private readonly destroy$ = new Subject<void>();
private readonly deferredClickTimeouts = new Set<ReturnType<typeof setTimeout>>();
private scale = 1;
private performInit = true;
@ -563,8 +579,6 @@ export class ScadaSymbolObject {
public destroy() {
this.destroy$.next();
this.destroy$.complete();
this.deferredClickTimeouts.forEach(timeout => clearTimeout(timeout));
this.deferredClickTimeouts.clear();
if (this.shapeResize$) {
this.shapeResize$.disconnect();
}
@ -594,11 +608,8 @@ export class ScadaSymbolObject {
for (const tag of this.metadata.tags) {
tag.stateRender = parseFunction(tag.stateRenderFunction, ['ctx', 'element']) || (() => {});
if (tag.actions) {
for (const trigger of scadaSymbolActionTriggers) {
const action = tag.actions[trigger];
if (action) {
action.action = parseFunction(action.actionFunction, ['ctx', 'element', 'event']) || (() => {});
}
for (const [, action] of activeTagActions(tag.actions)) {
action.action = parseFunction(action.actionFunction, ['ctx', 'element', 'event']) || (() => {});
}
}
}
@ -690,38 +701,15 @@ export class ScadaSymbolObject {
for (const tag of this.metadata.tags) {
if (tag.actions) {
const elements = this.svgShape.find(`[tb\\:tag="${tag.tag}"]`);
const deferClick = !!tag.actions.click && !!tag.actions.dblclick;
for (const trigger of scadaSymbolActionTriggers) {
const action = tag.actions[trigger];
if (!action) {
continue;
}
for (const [trigger, action] of activeTagActions(tag.actions)) {
elements.forEach(element => {
element.attr('cursor', 'pointer');
if (trigger === 'click' && deferClick) {
let clickTimeout: ReturnType<typeof setTimeout> = null;
element.on('click', (event: MouseEvent) => {
if (clickTimeout !== null) {
clearTimeout(clickTimeout);
this.deferredClickTimeouts.delete(clickTimeout);
clickTimeout = null;
}
if (event.detail === 1) {
clickTimeout = setTimeout(() => {
this.deferredClickTimeouts.delete(clickTimeout);
action.action(this.context, element, event);
}, dblClickDelay);
this.deferredClickTimeouts.add(clickTimeout);
}
});
} else {
element.on(trigger, (event) => {
if (trigger === 'contextmenu') {
event.preventDefault();
}
action.action(this.context, element, event);
});
}
element.on(trigger, (event) => {
if (trigger === 'contextmenu') {
event.preventDefault();
}
action.action(this.context, element, event);
});
});
}
}

6
ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-components.module.ts

@ -26,8 +26,8 @@ import {
ScadaSymbolMetadataTagFunctionPanelComponent
} from '@home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag-function-panel.component';
import {
ScadaSymbolTagActionButtonDirective
} from '@home/pages/scada-symbol/metadata-components/scada-symbol-tag-action-button.directive';
ScadaSymbolMetadataTagActionsPanelComponent
} from '@home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag-actions-panel.component';
@NgModule({
declarations:
@ -35,8 +35,8 @@ import {
ScadaSymbolMetadataComponent,
ScadaSymbolMetadataTagComponent,
ScadaSymbolMetadataTagsComponent,
ScadaSymbolTagActionButtonDirective,
ScadaSymbolMetadataTagFunctionPanelComponent,
ScadaSymbolMetadataTagActionsPanelComponent,
ScadaSymbolBehaviorsComponent,
ScadaSymbolBehaviorRowComponent,
ScadaSymbolBehaviorPanelComponent

67
ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag-actions-panel.component.html

@ -0,0 +1,67 @@
<!--
SPDX-FileCopyrightText: Copyright The ThingsBoard Authors
SPDX-License-Identifier: Apache-2.0
-->
<div class="tb-scada-symbol-metadata-tag-actions-panel" [formGroup]="actionsFormGroup">
<div class="flex flex-row items-center gap-4">
<mat-chip-set>
<mat-chip>
<span>{{ tag }}</span>
</mat-chip>
</mat-chip-set>
<div class="tb-form-panel-title" translate>scada.tag.actions</div>
</div>
<tb-toggle-select [(ngModel)]="selectedTrigger" [ngModelOptions]="{standalone: true}">
@for (trigger of actionTriggers; track trigger) {
<ng-template #triggerLabel>
<span [class.tb-action-trigger-enabled]="isEnabled(trigger)">{{ actionTriggerInfo[trigger].name | translate }}</span>
</ng-template>
<tb-toggle-option [value]="trigger" [template]="triggerLabel">{{ actionTriggerInfo[trigger].name | translate }}</tb-toggle-option>
}
</tb-toggle-select>
@for (trigger of actionTriggers; track trigger) {
@if (trigger === selectedTrigger) {
@let exclusiveTrigger = exclusiveActionTrigger(trigger);
<div [formGroupName]="trigger"
tb-hint-tooltip-icon="{{ exclusiveTrigger ? ('scada.tag.action-conflict' | translate: {trigger: (actionTriggerInfo[exclusiveTrigger].name | translate)}) : '' }}">
<mat-slide-toggle class="mat-slide" formControlName="enabled">
{{ actionTriggerInfo[trigger].enabledLabel | translate }}
</mat-slide-toggle>
</div>
}
}
<div class="-m-2.5 flex flex-col gap-4 overflow-auto p-2.5">
@for (trigger of actionTriggers; track trigger) {
@if (trigger === selectedTrigger) {
<ng-container [formGroupName]="trigger">
<tb-js-func minHeight="300px"
formControlName="actionFunction"
[highlightRules]="highlightRules"
[editorCompleter]="completer"
[functionArgs]="actionFunctionArgs"
[helpId]="actionTriggerInfo[trigger].helpId">
</tb-js-func>
</ng-container>
}
}
</div>
<div class="flex h-10 flex-row items-end justify-end gap-4">
<button mat-button
color="primary"
type="button"
(click)="cancel()">
{{ (disabled ? 'action.close' : 'action.cancel') | translate }}
</button>
@if (!disabled) {
<button mat-raised-button
color="primary"
type="button"
(click)="applyActions()"
[disabled]="actionsFormGroup.invalid || !actionsFormGroup.dirty">
{{ 'action.apply' | translate }}
</button>
}
</div>
</div>

23
ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag-actions-panel.component.scss

@ -0,0 +1,23 @@
// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors
// SPDX-License-Identifier: Apache-2.0
@import '../../../../../../scss/constants';
.tb-scada-symbol-metadata-tag-actions-panel {
width: 800px;
display: flex;
flex-direction: column;
gap: 16px;
@media #{$mat-lt-md} {
width: 90vw;
}
.tb-action-trigger-enabled::before {
content: '';
display: inline-block;
width: 6px;
height: 6px;
margin-right: 6px;
border-radius: 50%;
background-color: currentColor;
vertical-align: middle;
}
}

126
ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag-actions-panel.component.ts

@ -0,0 +1,126 @@
// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors
// SPDX-License-Identifier: Apache-2.0
import { Component, DestroyRef, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { TbPopoverComponent } from '@shared/components/popover.component';
import { TbEditorCompleter } from '@shared/models/ace/completion.models';
import { scadaSymbolActionFunctionHighlightRules } from '@home/pages/scada-symbol/scada-symbol-editor.models';
import {
activeActionTriggers,
exclusiveActionTrigger,
ScadaSymbolActionTrigger,
scadaSymbolActionTriggerInfo,
scadaSymbolActionTriggers,
ScadaSymbolTagActions
} from '@home/components/widget/lib/scada/scada-symbol.models';
@Component({
selector: 'tb-scada-symbol-metadata-tag-actions-panel',
templateUrl: './scada-symbol-metadata-tag-actions-panel.component.html',
styleUrls: ['./scada-symbol-metadata-tag-actions-panel.component.scss'],
encapsulation: ViewEncapsulation.None,
standalone: false
})
export class ScadaSymbolMetadataTagActionsPanelComponent implements OnInit {
@Input()
tag: string;
@Input()
actions: ScadaSymbolTagActions;
@Input()
completer: TbEditorCompleter;
@Input()
disabled: boolean;
@Input()
popover: TbPopoverComponent<ScadaSymbolMetadataTagActionsPanelComponent>;
@Output()
actionsApplied = new EventEmitter<ScadaSymbolTagActions>();
actionTriggers = scadaSymbolActionTriggers;
actionTriggerInfo = scadaSymbolActionTriggerInfo;
actionFunctionArgs = ['ctx', 'element', 'event'];
highlightRules = scadaSymbolActionFunctionHighlightRules;
actionsFormGroup: UntypedFormGroup;
selectedTrigger: ScadaSymbolActionTrigger;
exclusiveActionTrigger = exclusiveActionTrigger;
constructor(private fb: UntypedFormBuilder,
private destroyRef: DestroyRef) {
}
ngOnInit(): void {
const activeTriggers = activeActionTriggers(this.actions);
const triggerGroups: {[trigger: string]: UntypedFormGroup} = {};
for (const trigger of this.actionTriggers) {
triggerGroups[trigger] = this.fb.group({
enabled: [activeTriggers.includes(trigger)],
actionFunction: [this.actions?.[trigger]?.actionFunction, [Validators.required]]
});
}
this.actionsFormGroup = this.fb.group(triggerGroups);
if (this.actionTriggers.some(trigger => !!this.actions?.[trigger] && !activeTriggers.includes(trigger))) {
this.actionsFormGroup.markAsDirty();
}
if (this.disabled) {
this.actionsFormGroup.disable({emitEvent: false});
} else {
this.actionTriggers.forEach(trigger => this.updateActionFunctionState(trigger));
}
this.selectedTrigger = this.actionTriggers.find(trigger => this.isEnabled(trigger)) ?? this.actionTriggers[0];
for (const trigger of this.actionTriggers) {
this.actionsFormGroup.get([trigger, 'enabled']).valueChanges.pipe(
takeUntilDestroyed(this.destroyRef)
).subscribe((enabled: boolean) => {
const exclusiveTrigger = exclusiveActionTrigger(trigger);
if (enabled && exclusiveTrigger) {
this.actionsFormGroup.get([exclusiveTrigger, 'enabled']).setValue(false, {emitEvent: false});
this.updateActionFunctionState(exclusiveTrigger);
}
this.updateActionFunctionState(trigger);
});
}
}
isEnabled(trigger: ScadaSymbolActionTrigger): boolean {
return !!this.actionsFormGroup.get([trigger, 'enabled']).value;
}
cancel() {
this.popover?.hide();
}
applyActions() {
const value = this.actionsFormGroup.getRawValue();
let actions: ScadaSymbolTagActions = null;
for (const trigger of this.actionTriggers) {
if (value[trigger].enabled) {
actions = actions || {};
actions[trigger] = {
actionFunction: value[trigger].actionFunction
};
}
}
this.actionsApplied.emit(actions);
}
private updateActionFunctionState(trigger: ScadaSymbolActionTrigger) {
const actionFunctionControl = this.actionsFormGroup.get([trigger, 'actionFunction']);
if (this.isEnabled(trigger)) {
actionFunctionControl.enable({emitEvent: false});
} else {
actionFunctionControl.disable({emitEvent: false});
}
}
}

31
ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag-function-panel.component.ts

@ -15,15 +15,8 @@ import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { WidgetService } from '@core/http/widget.service';
import { TbEditorCompleter } from '@shared/models/ace/completion.models';
import { AceHighlightRules } from '@shared/models/ace/ace.models';
import {
scadaSymbolActionFunctionHighlightRules,
scadaSymbolRenderFunctionHighlightRules
} from '@home/pages/scada-symbol/scada-symbol-editor.models';
import { scadaSymbolRenderFunctionHighlightRules } from '@home/pages/scada-symbol/scada-symbol-editor.models';
import { JsFuncComponent } from '@shared/components/js-func.component';
import {
ScadaSymbolActionTrigger,
scadaSymbolActionTriggerInfo
} from '@home/components/widget/lib/scada/scada-symbol.models';
@Component({
selector: 'tb-scada-symbol-metadata-tag-function-panel',
@ -40,9 +33,6 @@ export class ScadaSymbolMetadataTagFunctionPanelComponent implements OnInit, Aft
@Input()
tagFunction: string;
@Input()
tagFunctionType: 'renderFunction' | ScadaSymbolActionTrigger;
@Input()
tag: string;
@ -62,13 +52,13 @@ export class ScadaSymbolMetadataTagFunctionPanelComponent implements OnInit, Aft
tagFunctionFormGroup: UntypedFormGroup;
panelTitle: string;
panelTitle = 'scada.state-render-function';
tagFunctionArgs: string[];
tagFunctionArgs = ['ctx', 'element'];
tagFunctionHelpId: string;
tagFunctionHelpId = 'scada/tag_state_render_fn';
highlightRules: AceHighlightRules;
highlightRules: AceHighlightRules = scadaSymbolRenderFunctionHighlightRules;
constructor(private fb: UntypedFormBuilder,
private widgetService: WidgetService) {
@ -83,17 +73,6 @@ export class ScadaSymbolMetadataTagFunctionPanelComponent implements OnInit, Aft
if (this.disabled) {
this.tagFunctionFormGroup.disable({emitEvent: false});
}
if (this.tagFunctionType === 'renderFunction') {
this.panelTitle = 'scada.state-render-function';
this.tagFunctionArgs = ['ctx', 'element'];
this.highlightRules = scadaSymbolRenderFunctionHighlightRules;
this.tagFunctionHelpId = 'scada/tag_state_render_fn';
} else {
this.panelTitle = scadaSymbolActionTriggerInfo[this.tagFunctionType].name;
this.tagFunctionArgs = ['ctx', 'element', 'event'];
this.highlightRules = scadaSymbolActionFunctionHighlightRules;
this.tagFunctionHelpId = scadaSymbolActionTriggerInfo[this.tagFunctionType].helpId;
}
}
ngAfterViewInit() {

37
ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag.component.html

@ -14,32 +14,33 @@
</mat-chip>
</mat-chip-set>
</div>
@let tag = tagFormGroup.get('tag').value;
<div class="tb-state-render-function-field">
@if (isStateRenderFunctionVisible()) {
@if (!disabled || tagFormGroup.get('stateRenderFunction').value) {
@let stateRenderActionKey = disabled ? 'action.view' : (tagFormGroup.get('stateRenderFunction').value ? 'action.edit' : 'action.add');
<button
#editStateRenderFunctionButton
mat-button
color="primary"
[attr.aria-label]="stateRenderFunctionButtonAriaLabel()"
[attr.aria-label]="(stateRenderActionKey | translate) + ' ' + ('scada.state-render-function' | translate) + ': ' + tag"
(click)="editTagStateRenderFunction()">
<mat-icon>{{ disabled ? 'visibility' : (tagFormGroup.get('stateRenderFunction').value ? 'edit' : 'add') }}</mat-icon>
<span>{{ ( disabled ? 'action.view' : (tagFormGroup.get('stateRenderFunction').value ? 'action.edit' : 'action.add') ) | translate }}</span>
<span>{{ stateRenderActionKey | translate }}</span>
</button>
}
</div>
<div class="tb-actions-field">
@if (!disabled || actionsCount) {
@let actionsKey = disabled ? 'action.view' : (actionsCount ? 'action.edit' : 'action.add');
<button
#editActionsButton
mat-button
color="primary"
[attr.aria-label]="(actionsKey | translate) + ' ' + ('scada.tag.actions' | translate) + ': ' + tag"
(click)="editActions()">
<mat-icon>{{ disabled ? 'visibility' : (actionsCount ? 'edit' : 'add') }}</mat-icon>
<span>{{ actionsKey | translate }}@if (actionsCount) { ({{ actionsCount }})}</span>
</button>
}
</div>
@for (trigger of actionTriggers; track trigger) {
<div class="tb-action-function-field">
@if (isActionVisible(trigger)) {
<button
[tbScadaSymbolTagActionButton]="trigger"
mat-button
color="primary"
[attr.aria-label]="actionButtonAriaLabel(trigger)"
(click)="editAction(trigger)">
<mat-icon>{{ disabled ? 'visibility' : (tagFormGroup.get(actionControlName(trigger)).value ? 'edit' : 'add') }}</mat-icon>
<span>{{ ( disabled ? 'action.view' : (tagFormGroup.get(actionControlName(trigger)).value ? 'action.edit' : 'action.add') ) | translate }}</span>
</button>
}
</div>
}
</div>

9
ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag.component.scss

@ -2,10 +2,15 @@
// SPDX-License-Identifier: Apache-2.0
.tb-scada-symbol-metadata-tag-row {
.tb-tag-field {
flex: 1 1 40%;
flex: 1 1 70%;
}
.tb-state-render-function-field, .tb-action-function-field {
.tb-state-render-function-field {
flex: 1 1 15%;
}
.tb-actions-field {
flex: 1 1 15%;
}
.tb-state-render-function-field, .tb-actions-field {
display: flex;
justify-content: flex-end;
.mdc-button {

141
ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag.component.ts

@ -5,15 +5,12 @@ import {
forwardRef,
Input,
OnInit,
QueryList,
Renderer2,
ViewChild,
ViewChildren,
ViewContainerRef,
ViewEncapsulation
} from '@angular/core';
import {
AbstractControl,
ControlValueAccessor,
NG_VALIDATORS,
NG_VALUE_ACCESSOR,
@ -22,22 +19,16 @@ import {
UntypedFormGroup,
Validator
} from '@angular/forms';
import {
ScadaSymbolActionTrigger,
scadaSymbolActionTriggerInfo,
scadaSymbolActionTriggers,
ScadaSymbolTag
} from '@home/components/widget/lib/scada/scada-symbol.models';
import { activeActionTriggers, ScadaSymbolTag } from '@home/components/widget/lib/scada/scada-symbol.models';
import { TbEditorCompleter } from '@shared/models/ace/completion.models';
import { MatButton } from '@angular/material/button';
import {
ScadaSymbolTagActionButtonDirective
} from '@home/pages/scada-symbol/metadata-components/scada-symbol-tag-action-button.directive';
ScadaSymbolMetadataTagActionsPanelComponent
} from '@home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag-actions-panel.component';
import { TbPopoverService } from '@shared/components/popover.service';
import {
ScadaSymbolMetadataTagFunctionPanelComponent
} from '@home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tag-function-panel.component';
import { TranslateService } from '@ngx-translate/core';
@Component({
selector: 'tb-scada-symbol-metadata-tag',
@ -63,8 +54,8 @@ export class ScadaSymbolMetadataTagComponent implements ControlValueAccessor, On
@ViewChild('editStateRenderFunctionButton')
editStateRenderFunctionButton: MatButton;
@ViewChildren(ScadaSymbolTagActionButtonDirective)
editActionButtons: QueryList<ScadaSymbolTagActionButtonDirective>;
@ViewChild('editActionsButton')
editActionsButton: MatButton;
@Input()
disabled: boolean;
@ -75,7 +66,7 @@ export class ScadaSymbolMetadataTagComponent implements ControlValueAccessor, On
@Input()
actionFunctionCompleter: TbEditorCompleter;
actionTriggers = scadaSymbolActionTriggers;
actionsCount = 0;
tagFormGroup: UntypedFormGroup;
@ -86,19 +77,14 @@ export class ScadaSymbolMetadataTagComponent implements ControlValueAccessor, On
constructor(private fb: UntypedFormBuilder,
private popoverService: TbPopoverService,
private renderer: Renderer2,
private translate: TranslateService,
private viewContainerRef: ViewContainerRef) {
}
ngOnInit() {
const controls: {[key: string]: any} = {
this.tagFormGroup = this.fb.group({
tag: [null, []],
stateRenderFunction: [null, []]
};
for (const trigger of this.actionTriggers) {
controls[this.actionControlName(trigger)] = [null, []];
}
this.tagFormGroup = this.fb.group(controls);
});
}
registerOnChange(fn: any): void {
@ -119,14 +105,13 @@ export class ScadaSymbolMetadataTagComponent implements ControlValueAccessor, On
writeValue(value: ScadaSymbolTag): void {
this.modelValue = value;
const patch: {[key: string]: any} = {
tag: value?.tag,
stateRenderFunction: value?.stateRenderFunction
};
for (const trigger of this.actionTriggers) {
patch[this.actionControlName(trigger)] = value?.actions?.[trigger]?.actionFunction;
}
this.tagFormGroup.patchValue(patch, {emitEvent: false});
this.tagFormGroup.patchValue(
{
tag: value?.tag,
stateRenderFunction: value?.stateRenderFunction
}, {emitEvent: false}
);
this.updateActionsCount();
}
public validate(_c: UntypedFormControl) {
@ -138,61 +123,45 @@ export class ScadaSymbolMetadataTagComponent implements ControlValueAccessor, On
};
}
actionControlName(trigger: ScadaSymbolActionTrigger): string {
return trigger + 'Action';
}
isStateRenderFunctionVisible(): boolean {
return !this.disabled || !!this.tagFormGroup.get('stateRenderFunction').value;
}
isActionVisible(trigger: ScadaSymbolActionTrigger): boolean {
return !this.disabled || !!this.tagFormGroup.get(this.actionControlName(trigger)).value;
}
stateRenderFunctionButtonAriaLabel(): string {
return this.buttonAriaLabel('scada.state-render-function', this.tagFormGroup.get('stateRenderFunction').value);
}
actionButtonAriaLabel(trigger: ScadaSymbolActionTrigger): string {
return this.buttonAriaLabel(scadaSymbolActionTriggerInfo[trigger].name,
this.tagFormGroup.get(this.actionControlName(trigger)).value);
}
editTagStateRenderFunction(): void {
this.openTagFunction('renderFunction', this.editStateRenderFunctionButton);
this.openTagFunction(this.editStateRenderFunctionButton);
}
editAction(trigger: ScadaSymbolActionTrigger): void {
const actionButton = this.editActionButtons.find(b => b.trigger === trigger);
if (actionButton) {
this.openTagFunction(trigger, actionButton.button);
editActions(): void {
const trigger = this.editActionsButton._elementRef.nativeElement;
trigger.scrollIntoView();
if (this.popoverService.hasPopover(trigger)) {
this.popoverService.hidePopover(trigger);
} else {
const actionsPanelPopover = this.popoverService.displayPopover({
trigger,
renderer: this.renderer,
componentType: ScadaSymbolMetadataTagActionsPanelComponent,
hostView: this.viewContainerRef,
preferredPlacement: ['leftOnly', 'leftTopOnly', 'leftBottomOnly'],
context: {
tag: this.tagFormGroup.get('tag').value,
actions: this.modelValue?.actions,
completer: this.actionFunctionCompleter,
disabled: this.disabled
},
isModal: true
});
actionsPanelPopover.tbComponentRef.instance.popover = actionsPanelPopover;
actionsPanelPopover.tbComponentRef.instance.actionsApplied.subscribe((actions) => {
actionsPanelPopover.hide();
this.updateModel(actions);
});
}
}
private buttonAriaLabel(tagFunctionNameKey: string, tagFunction: string): string {
const action = this.disabled ? 'action.view' : (tagFunction ? 'action.edit' : 'action.add');
const label = `${this.translate.instant(action)} ${this.translate.instant(tagFunctionNameKey)}`;
const tag = this.tagFormGroup.get('tag').value;
return tag ? `${label}: ${tag}` : label;
}
private openTagFunction(tagFunctionType: 'renderFunction' | ScadaSymbolActionTrigger,
button: MatButton) {
private openTagFunction(button: MatButton) {
const trigger = button._elementRef.nativeElement;
trigger.scrollIntoView();
if (this.popoverService.hasPopover(trigger)) {
this.popoverService.hidePopover(trigger);
} else {
let tagFunctionControl: AbstractControl;
let completer: TbEditorCompleter;
if (tagFunctionType === 'renderFunction') {
tagFunctionControl = this.tagFormGroup.get('stateRenderFunction');
completer = this.elementStateRenderFunctionCompleter;
} else {
tagFunctionControl = this.tagFormGroup.get(this.actionControlName(tagFunctionType));
completer = this.actionFunctionCompleter;
}
const tagFunctionControl = this.tagFormGroup.get('stateRenderFunction');
const scadaSymbolTagFunctionPanelPopover = this.popoverService.displayPopover({
trigger,
renderer: this.renderer,
@ -201,9 +170,8 @@ export class ScadaSymbolMetadataTagComponent implements ControlValueAccessor, On
preferredPlacement: ['leftOnly', 'leftTopOnly', 'leftBottomOnly'],
context: {
tagFunction: tagFunctionControl.value,
tagFunctionType,
tag: this.tagFormGroup.get('tag').value,
completer,
completer: this.elementStateRenderFunctionCompleter,
disabled: this.disabled
},
isModal: true
@ -217,23 +185,18 @@ export class ScadaSymbolMetadataTagComponent implements ControlValueAccessor, On
}
}
private updateModel() {
private updateModel(actions = this.modelValue?.actions) {
const value = this.tagFormGroup.value;
this.modelValue = {
tag: value.tag,
stateRenderFunction: value.stateRenderFunction
stateRenderFunction: value.stateRenderFunction,
actions
};
let actions: ScadaSymbolTag['actions'] = null;
for (const trigger of this.actionTriggers) {
const actionFunction = value[this.actionControlName(trigger)];
if (actionFunction) {
actions = actions || {};
actions[trigger] = {
actionFunction
};
}
}
this.modelValue.actions = actions;
this.updateActionsCount();
this.propagateChange(this.modelValue);
}
private updateActionsCount() {
this.actionsCount = activeActionTriggers(this.modelValue?.actions).length;
}
}

4
ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tags.component.html

@ -9,9 +9,7 @@
<div class="tb-form-table-header">
<div class="tb-form-table-header-cell tb-tag-header" translate>scada.tag.tag</div>
<div class="tb-form-table-header-cell tb-state-render-function-header" translate>scada.state-render-function</div>
@for (trigger of actionTriggers; track trigger) {
<div class="tb-form-table-header-cell tb-action-function-header">{{ actionTriggerInfo[trigger].name | translate }}</div>
}
<div class="tb-form-table-header-cell tb-actions-header" translate>scada.tag.actions</div>
</div>
@if (tagsFormArray().controls.length) {
<div class="tb-form-table-body">

9
ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tags.component.scss

@ -5,10 +5,15 @@
margin: 12px;
.tb-form-table-header-cell {
&.tb-tag-header {
flex: 1 1 40%;
flex: 1 1 70%;
}
&.tb-state-render-function-header, &.tb-action-function-header {
&.tb-state-render-function-header {
flex: 1 1 15%;
}
&.tb-actions-header {
flex: 1 1 15%;
}
&.tb-state-render-function-header, &.tb-actions-header {
display: flex;
justify-content: flex-end;
}

10
ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata-tags.component.ts

@ -25,9 +25,7 @@ import {
Validator
} from '@angular/forms';
import {
ScadaSymbolActionTrigger,
scadaSymbolActionTriggers,
scadaSymbolActionTriggerInfo,
ScadaSymbolTag
} from '@home/components/widget/lib/scada/scada-symbol.models';
import {
@ -78,10 +76,6 @@ export class ScadaSymbolMetadataTagsComponent implements ControlValueAccessor, O
@Input()
actionFunctionCompleter: TbEditorCompleter;
actionTriggers = scadaSymbolActionTriggers;
actionTriggerInfo = scadaSymbolActionTriggerInfo;
tagsFormGroup: UntypedFormGroup;
private modelValue: ScadaSymbolTag[];
@ -179,12 +173,12 @@ export class ScadaSymbolMetadataTagsComponent implements ControlValueAccessor, O
});
}
editTagAction(tag: string, trigger: ScadaSymbolActionTrigger): void {
editTagActions(tag: string): void {
setTimeout(() => {
const tags: ScadaSymbolTag[] = this.tagsFormGroup.get('tags').value;
const index = tags.findIndex(t => t.tag === tag);
const tagComponent = this.metadataTags.get(index);
tagComponent?.editAction(trigger);
tagComponent?.editActions();
});
}

10
ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-metadata.component.ts

@ -23,11 +23,7 @@ import {
Validators
} from '@angular/forms';
import { PageComponent } from '@shared/components/page.component';
import {
emptyMetadata,
ScadaSymbolActionTrigger,
ScadaSymbolMetadata
} from '@home/components/widget/lib/scada/scada-symbol.models';
import { emptyMetadata, ScadaSymbolMetadata } from '@home/components/widget/lib/scada/scada-symbol.models';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { ToggleHeaderOption } from '@shared/components/toggle-header.component';
@ -198,9 +194,9 @@ export class ScadaSymbolMetadataComponent extends PageComponent implements OnIni
this.symbolMetadataTags.editTagStateRenderFunction(tag);
}
editTagAction(tag: string, trigger: ScadaSymbolActionTrigger): void {
editTagActions(tag: string): void {
this.selectedOption = 'tags';
this.symbolMetadataTags.editTagAction(tag, trigger);
this.symbolMetadataTags.editTagActions(tag);
}
public validate(c: UntypedFormControl) {

32
ui-ngx/src/app/modules/home/pages/scada-symbol/metadata-components/scada-symbol-tag-action-button.directive.ts

@ -1,32 +0,0 @@
///
/// Copyright © 2016-2026 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { Directive, Input } from '@angular/core';
import { MatButton } from '@angular/material/button';
import { ScadaSymbolActionTrigger } from '@home/components/widget/lib/scada/scada-symbol.models';
@Directive({
selector: '[tbScadaSymbolTagActionButton]',
standalone: false
})
export class ScadaSymbolTagActionButtonDirective {
@Input('tbScadaSymbolTagActionButton')
trigger: ScadaSymbolActionTrigger;
constructor(public button: MatButton) {
}
}

30
ui-ngx/src/app/modules/home/pages/scada-symbol/scada-symbol-editor.models.ts

@ -11,8 +11,8 @@ import {
setupTagPanelTooltip
} from '@home/pages/scada-symbol/scada-symbol-tooltip.components';
import {
ScadaSymbolActionTrigger,
scadaSymbolActionTriggers,
activeActionTriggers,
ScadaSymbolTagActions,
ScadaSymbolBehavior,
ScadaSymbolBehaviorType,
scadaSymbolContentData,
@ -41,9 +41,9 @@ export interface ScadaSymbolData {
export interface ScadaSymbolEditObjectCallbacks {
tagHasStateRenderFunction: (tag: string) => boolean;
tagHasAction: (tag: string, trigger: ScadaSymbolActionTrigger) => boolean;
tagActions: (tag: string) => ScadaSymbolTagActions;
editTagStateRenderFunction: (tag: string) => void;
editTagAction: (tag: string, trigger: ScadaSymbolActionTrigger) => void;
editTagActions: (tag: string) => void;
tagsUpdated: (tags: string[]) => void;
hasHiddenElements?: (hasHidden: boolean) => void;
onSymbolEditObjectDirty: (dirty: boolean) => void;
@ -413,16 +413,16 @@ export class ScadaSymbolEditObject {
return this.callbacks.tagHasStateRenderFunction(tag);
}
public tagHasAction(tag: string, trigger: ScadaSymbolActionTrigger): boolean {
return this.callbacks.tagHasAction(tag, trigger);
public tagActions(tag: string): ScadaSymbolTagActions {
return this.callbacks.tagActions(tag);
}
public editTagStateRenderFunction(tag: string) {
this.callbacks.editTagStateRenderFunction(tag);
}
public editTagAction(tag: string, trigger: ScadaSymbolActionTrigger) {
this.callbacks.editTagAction(tag, trigger);
public editTagActions(tag: string) {
this.callbacks.editTagActions(tag);
}
public setDirty(dirty: boolean) {
@ -635,16 +635,16 @@ export class ScadaSymbolElement {
}
}
public hasAction(trigger: ScadaSymbolActionTrigger): boolean {
public actions(): ScadaSymbolTagActions {
if (this.hasTag()) {
return this.editObject.tagHasAction(this.tag, trigger);
return this.editObject.tagActions(this.tag);
} else {
return false;
return null;
}
}
public hasAnyAction(): boolean {
return scadaSymbolActionTriggers.some(trigger => this.hasAction(trigger));
public actionsCount(): number {
return activeActionTriggers(this.actions()).length;
}
public editStateRenderFunction() {
@ -653,9 +653,9 @@ export class ScadaSymbolElement {
}
}
public editAction(trigger: ScadaSymbolActionTrigger) {
public editActions() {
if (this.hasTag()) {
this.editObject.editTagAction(this.tag, trigger);
this.editObject.editTagActions(this.tag);
}
}

57
ui-ngx/src/app/modules/home/pages/scada-symbol/scada-symbol-tooltip.components.ts

@ -17,11 +17,6 @@ import {
ViewEncapsulation
} from '@angular/core';
import { ScadaSymbolElement } from '@home/pages/scada-symbol/scada-symbol-editor.models';
import {
ScadaSymbolActionTrigger,
scadaSymbolActionTriggerInfo,
scadaSymbolActionTriggers
} from '@home/components/widget/lib/scada/scada-symbol.models';
import { CommonModule } from '@angular/common';
import { SharedModule } from '@shared/shared.module';
import { ENTER } from '@angular/cdk/keycodes';
@ -232,7 +227,7 @@ class ScadaSymbolTagPanelComponent extends ScadaSymbolPanelComponent implements
ngOnInit() {
if (this.symbolElement?.readonly) {
this.displayTagSettings = (this.symbolElement?.hasStateRenderFunction() || this.symbolElement?.hasAnyAction());
this.displayTagSettings = (this.symbolElement?.hasStateRenderFunction() || !!this.symbolElement?.actionsCount());
}
}
@ -357,6 +352,7 @@ class ScadaSymbolRemoveTagConfirmComponent extends ScadaSymbolPanelComponent imp
@Component({
template: `<div class="tooltipster-content tb-scada-symbol-tooltip-panel column flex-start">
@let tag = symbolElement?.tag;
@if (!symbolElement?.readonly || hasStateRenderFunction) {
<div translate>scada.state-render-function</div>
}
@ -364,6 +360,7 @@ class ScadaSymbolRemoveTagConfirmComponent extends ScadaSymbolPanelComponent imp
<button
mat-stroked-button
color="primary"
[attr.aria-label]="((symbolElement?.readonly ? 'action.view' : 'action.edit') | translate) + ' ' + ('scada.state-render-function' | translate) + ': ' + tag"
(click)="editStateRenderFunction()">
<mat-icon>{{ symbolElement?.readonly ? 'visibility' : 'edit' }}</mat-icon>
<span>{{ (symbolElement?.readonly ? 'action.view' : 'action.edit') | translate }}</span>
@ -373,33 +370,23 @@ class ScadaSymbolRemoveTagConfirmComponent extends ScadaSymbolPanelComponent imp
<button
mat-stroked-button
color="primary"
[attr.aria-label]="('action.add' | translate) + ' ' + ('scada.state-render-function' | translate) + ': ' + tag"
(click)="editStateRenderFunction()">
<mat-icon>add</mat-icon>
<span translate>action.add</span>
</button>
}
@for (trigger of actionTriggers; track trigger) {
@if (!symbolElement?.readonly || hasActions[trigger]) {
<div>{{ actionTriggerInfo[trigger].name | translate }}</div>
}
@if (hasActions[trigger]) {
<button
mat-stroked-button
color="primary"
(click)="editAction(trigger)">
<mat-icon>{{ symbolElement?.readonly ? 'visibility' : 'edit' }}</mat-icon>
<span>{{ (symbolElement?.readonly ? 'action.view' : 'action.edit') | translate }}</span>
</button>
}
@if (!hasActions[trigger] && !symbolElement?.readonly) {
<button
mat-stroked-button
color="primary"
(click)="editAction(trigger)">
<mat-icon>add</mat-icon>
<span translate>action.add</span>
</button>
}
@if (!symbolElement?.readonly || actionsCount) {
@let actionsKey = symbolElement?.readonly ? 'action.view' : (actionsCount ? 'action.edit' : 'action.add');
<div translate>scada.tag.actions</div>
<button
mat-stroked-button
color="primary"
[attr.aria-label]="(actionsKey | translate) + ' ' + ('scada.tag.actions' | translate) + ': ' + tag"
(click)="editActions()">
<mat-icon>{{ symbolElement?.readonly ? 'visibility' : (actionsCount ? 'edit' : 'add') }}</mat-icon>
<span>{{ actionsKey | translate }}@if (actionsCount) { ({{ actionsCount }})}</span>
</button>
}
</div>`,
styleUrls: ['./scada-symbol-tooltip.component.scss'],
@ -408,13 +395,9 @@ class ScadaSymbolRemoveTagConfirmComponent extends ScadaSymbolPanelComponent imp
})
class ScadaSymbolTagSettingsComponent extends ScadaSymbolPanelComponent implements OnInit, AfterViewInit {
actionTriggers = scadaSymbolActionTriggers;
actionTriggerInfo = scadaSymbolActionTriggerInfo;
hasStateRenderFunction = false;
hasActions: {[trigger in ScadaSymbolActionTrigger]?: boolean} = {};
actionsCount = 0;
constructor(public element: ElementRef<HTMLElement>) {
super(element);
@ -426,17 +409,15 @@ class ScadaSymbolTagSettingsComponent extends ScadaSymbolPanelComponent implemen
updateFunctionsState() {
this.hasStateRenderFunction = this.symbolElement.hasStateRenderFunction();
for (const trigger of this.actionTriggers) {
this.hasActions[trigger] = this.symbolElement.hasAction(trigger);
}
this.actionsCount = this.symbolElement.actionsCount();
}
editStateRenderFunction() {
this.symbolElement.editStateRenderFunction();
}
editAction(trigger: ScadaSymbolActionTrigger) {
this.symbolElement.editAction(trigger);
editActions() {
this.symbolElement.editActions();
}
}

14
ui-ngx/src/app/modules/home/pages/scada-symbol/scada-symbol.component.ts

@ -20,9 +20,9 @@ import { Subject } from 'rxjs';
import { ScadaSymbolData, ScadaSymbolEditObjectCallbacks } from '@home/pages/scada-symbol/scada-symbol-editor.models';
import {
parseScadaSymbolMetadataFromContent,
ScadaSymbolActionTrigger,
ScadaSymbolMetadata,
ScadaSymbolObjectSettings,
ScadaSymbolTagActions,
updateScadaSymbolMetadataInContent
} from '@home/components/widget/lib/scada/scada-symbol.models';
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
@ -330,21 +330,17 @@ export class ScadaSymbolComponent extends PageComponent
return false;
}
tagHasAction(tag: string, trigger: ScadaSymbolActionTrigger): boolean {
tagActions(tag: string): ScadaSymbolTagActions {
const metadata: ScadaSymbolMetadata = this.scadaSymbolFormGroup.get('metadata').value;
if (metadata.tags) {
const found = metadata.tags.find(t => t.tag === tag);
return !!found?.actions?.[trigger]?.actionFunction;
}
return false;
return metadata.tags?.find(t => t.tag === tag)?.actions ?? null;
}
editTagStateRenderFunction(tag: string) {
this.symbolMetadata.editTagStateRenderFunction(tag);
}
editTagAction(tag: string, trigger: ScadaSymbolActionTrigger) {
this.symbolMetadata.editTagAction(tag, trigger);
editTagActions(tag: string) {
this.symbolMetadata.editTagActions(tag);
}
onSymbolEditObjectDirty(dirty: boolean) {

3
ui-ngx/src/assets/help/en_US/scada/tag_click_action_fn.md

@ -21,6 +21,9 @@ A JavaScript function invoked when user clicks on SVG element with specific tag.
<div class="divider"></div>
A tag can have either an *on click* or an *on double click* action, but not both: every double click also fires two clicks.
If the symbol metadata contains both, only the click action is executed.
##### Examples without setting values for callAction function

6
ui-ngx/src/assets/help/en_US/scada/tag_dblclick_action_fn.md

@ -21,8 +21,8 @@ A JavaScript function invoked when user double-clicks on SVG element with specif
<div class="divider"></div>
If the same tag also has an *on click* action configured, the click action is automatically deferred for a short interval
and cancelled when a double click is detected — only the double click action is executed.
A tag can have either an *on click* or an *on double click* action, but not both: every double click also fires two clicks.
If the symbol metadata contains both, only the click action is executed.
##### Example
@ -44,7 +44,7 @@ ctx.api.callAction(event, 'doubleClick'); // Trigger widget action 'doubleClick
*Example Use Case*
- **Navigate to Dashboard State:** If the 'doubleClick' action is configured to navigate to a detailed dashboard state, the user will be redirected to that state when double-clicking on the element, while a single click may be reserved for a quick toggle action.
- **Navigate to Dashboard State:** If the 'doubleClick' action is configured to navigate to a detailed dashboard state, the user will be redirected to that state when double-clicking on the element.
- **Open URL:** If configured to open a URL, double-clicking on the element will take the user to a specified web resource.
<br>

5
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -5993,6 +5993,11 @@
"on-click-action": "On click action",
"on-double-click-action": "On double click action",
"on-right-click-action": "On right click action",
"on-click-action-enabled": "Run the function below when an element with this tag is clicked",
"on-double-click-action-enabled": "Run the function below when an element with this tag is double-clicked",
"on-right-click-action-enabled": "Run the function below instead of the browser context menu when an element with this tag is right-clicked",
"actions": "Actions",
"action-conflict": "Can't be combined with {{trigger}}: enabling this action disables it.",
"no-tags": "No tags configured",
"delete-tag-text": "Are you sure you want to delete tag<br/><b>{{tag}}</b> from <b>{{elementType}}</b> element?",
"update-tag": "Update tag",

Loading…
Cancel
Save