@node-projects/web-component-designer-visualization-addons 0.1.74 → 0.1.76
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.
|
@@ -60,7 +60,7 @@ export interface ShowMessageBox {
|
|
|
60
60
|
*/
|
|
61
61
|
buttons: 'ok' | 'okCancel' | 'yesNo' | 'retryCancel' | 'yesNoCancel' | 'abortRetryIgnore' | 'cancelTryContinue';
|
|
62
62
|
/**
|
|
63
|
-
* number of the clicked button
|
|
63
|
+
* number of the clicked button, starting with 1
|
|
64
64
|
* @TJS-format signal
|
|
65
65
|
*/
|
|
66
66
|
resultSignal: string;
|
|
@@ -218,6 +218,7 @@ export interface SetElementProperty {
|
|
|
218
218
|
name: string;
|
|
219
219
|
/**
|
|
220
220
|
* only for target: class
|
|
221
|
+
* @default toggle
|
|
221
222
|
*/
|
|
222
223
|
mode: 'add' | 'remove' | 'toggle';
|
|
223
224
|
/**
|
|
@@ -186,9 +186,9 @@ export class ScriptSystem {
|
|
|
186
186
|
const value = await this.getValue(command.value, context);
|
|
187
187
|
const parentIndex = await this.getValue(command.parentIndex ?? 0, context);
|
|
188
188
|
const target = await this.getValue(command.target ?? 'property', context);
|
|
189
|
-
const targetSelectorTarget = await this.getValue(command.targetSelectorTarget ?? '
|
|
190
|
-
const targetSelector = await this.getValue(command.targetSelector
|
|
191
|
-
const mode = await this.getValue(command.mode, context);
|
|
189
|
+
const targetSelectorTarget = await this.getValue(command.targetSelectorTarget ?? 'container', context);
|
|
190
|
+
const targetSelector = await this.getValue(command.targetSelector, context);
|
|
191
|
+
const mode = await this.getValue(command.mode ?? 'toggle', context);
|
|
192
192
|
let elements = this.getTargetFromTargetSelector(context, targetSelectorTarget, parentIndex, targetSelector);
|
|
193
193
|
for (let e of elements) {
|
|
194
194
|
if (target == 'attribute') {
|
|
@@ -248,6 +248,39 @@ export class ScriptSystem {
|
|
|
248
248
|
this.runExternalScript(name, scriptType);
|
|
249
249
|
break;
|
|
250
250
|
}
|
|
251
|
+
case 'ShowMessageBox': {
|
|
252
|
+
let res = null;
|
|
253
|
+
const buttons = await this.getValue(command.buttons, context);
|
|
254
|
+
if (buttons == 'ok') {
|
|
255
|
+
const message = await this.getValue(command.message, context);
|
|
256
|
+
alert(message);
|
|
257
|
+
res = 1;
|
|
258
|
+
}
|
|
259
|
+
else if (buttons == 'yesNo') {
|
|
260
|
+
const message = await this.getValue(command.message, context);
|
|
261
|
+
if (confirm(message))
|
|
262
|
+
res = 1;
|
|
263
|
+
else
|
|
264
|
+
res = 2;
|
|
265
|
+
}
|
|
266
|
+
const resultSignal = await this.getValue(command.resultSignal, context);
|
|
267
|
+
if (resultSignal) {
|
|
268
|
+
this._visualizationHandler.setState(resultSignal, res);
|
|
269
|
+
}
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
case 'Login':
|
|
273
|
+
case 'Logout':
|
|
274
|
+
case 'CloseDialog':
|
|
275
|
+
case 'OpenDialog':
|
|
276
|
+
case 'OpenScreen':
|
|
277
|
+
case 'SwitchLanguage':
|
|
278
|
+
case 'CopySignalValuesFromFolder':
|
|
279
|
+
case 'ExportSignalValuesAsJson':
|
|
280
|
+
case 'ImportSignalValuesFromJson': {
|
|
281
|
+
alert('command: "' + command.type + '" is not yet implemented');
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
251
284
|
}
|
|
252
285
|
}
|
|
253
286
|
getTarget(context, targetSelectorTarget, parentLevel) {
|
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.76",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "jochen.kuehner@gmx.de",
|