@node-projects/web-component-designer-visualization-addons 0.1.126 → 0.1.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,10 +3,9 @@ export declare type RunnableScriptCommands = OpenScreen | OpenUrl | OpenDialog |
|
|
|
3
3
|
/**
|
|
4
4
|
* signal - a signal (the default)
|
|
5
5
|
* property - a property defined in the current screen/control
|
|
6
|
-
* elementProperty - a property defined on the
|
|
7
|
-
* rootProperty - a property defined on the root element
|
|
6
|
+
* elementProperty - a property defined on the element raising the event
|
|
8
7
|
*/
|
|
9
|
-
export type signalTarget = 'signal' | 'property' | 'elementProperty'
|
|
8
|
+
export type signalTarget = 'signal' | 'property' | 'elementProperty';
|
|
10
9
|
export interface Comment {
|
|
11
10
|
type: 'Comment';
|
|
12
11
|
comment: string;
|
|
@@ -83,28 +83,22 @@ export class ScriptSystem {
|
|
|
83
83
|
}
|
|
84
84
|
async getValueFromTarget(target, name, context) {
|
|
85
85
|
if (target === 'property') {
|
|
86
|
-
return context.
|
|
86
|
+
return context.root[name];
|
|
87
87
|
}
|
|
88
88
|
else if (target === 'elementProperty') {
|
|
89
89
|
return context.element[name];
|
|
90
90
|
}
|
|
91
|
-
else if (target === 'rootProperty') {
|
|
92
|
-
return context.root[name];
|
|
93
|
-
}
|
|
94
91
|
else {
|
|
95
92
|
return (await this._visualizationHandler.getState(this.getSignalName(name, context)))?.val;
|
|
96
93
|
}
|
|
97
94
|
}
|
|
98
95
|
async setValueOnTarget(target, name, context, value) {
|
|
99
96
|
if (target === 'property') {
|
|
100
|
-
context.
|
|
97
|
+
context.root[name] = value;
|
|
101
98
|
}
|
|
102
99
|
else if (target === 'elementProperty') {
|
|
103
100
|
context.element[name] = value;
|
|
104
101
|
}
|
|
105
|
-
else if (target === 'rootProperty') {
|
|
106
|
-
context.root[name] = value;
|
|
107
|
-
}
|
|
108
102
|
else {
|
|
109
103
|
await this._visualizationHandler.setState(this.getSignalName(name, context), value);
|
|
110
104
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "web-component-designer addon for visualizations",
|
|
3
3
|
"name": "@node-projects/web-component-designer-visualization-addons",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.127",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "jochen.kuehner@gmx.de",
|