@node-projects/web-component-designer-visualization-addons 0.1.62 → 0.1.64
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.
- package/dist/blockly/components/fields/FieldObjectId.d.ts +1 -0
- package/dist/blockly/components/fields/FieldObjectId.js +6 -0
- package/dist/scripting/ScriptCommands.d.ts +54 -1
- package/dist/scripting/ScriptSystem.js +1 -1
- package/dist/services/ScriptRefactorService.js +4 -4
- package/package.json +31 -31
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare type ScriptCommands = Comment | OpenScreen | OpenUrl | OpenDialog | CloseDialog | ToggleSignalValue | SetSignalValue | IncrementSignalValue | DecrementSignalValue | SetBitInSignal | ClearBitInSignal | ToggleBitInSignal | Console | CalculateSignalValue | Javascript | SetElementProperty | Delay | SwitchLanguage | Login | Logout | SubscribeSignal | UnsubscribeSignal | WriteSignalsInGroup | ClearSiganlsInGroup | Condition | Exit | Label | RunScript | Goto;
|
|
1
|
+
export declare type ScriptCommands = Comment | OpenScreen | OpenUrl | OpenDialog | CloseDialog | ToggleSignalValue | SetSignalValue | IncrementSignalValue | DecrementSignalValue | SetBitInSignal | ClearBitInSignal | ToggleBitInSignal | Console | CalculateSignalValue | Javascript | SetElementProperty | Delay | SwitchLanguage | Login | Logout | SubscribeSignal | UnsubscribeSignal | WriteSignalsInGroup | ClearSiganlsInGroup | Condition | Exit | Label | RunScript | Goto | CopySignalValuesFromFolder | ShowMessageBox | ExportSignalValuesAsJson | ImportSignalValuesFromJson;
|
|
2
2
|
export interface Comment {
|
|
3
3
|
type: 'Comment';
|
|
4
4
|
comment: string;
|
|
@@ -35,6 +35,26 @@ export interface OpenDialog {
|
|
|
35
35
|
left?: string;
|
|
36
36
|
top?: string;
|
|
37
37
|
}
|
|
38
|
+
export interface ShowMessageBox {
|
|
39
|
+
type: 'ShowMessageBox';
|
|
40
|
+
/**
|
|
41
|
+
* title text
|
|
42
|
+
*/
|
|
43
|
+
title: string;
|
|
44
|
+
/**
|
|
45
|
+
* message text
|
|
46
|
+
*/
|
|
47
|
+
message: string;
|
|
48
|
+
/**
|
|
49
|
+
* message text
|
|
50
|
+
*/
|
|
51
|
+
buttons: 'Ok' | 'OkCancel' | 'YesNo' | 'RetryCancel' | 'YesNoCancel' | 'AbortRetryIgnore' | 'CancelTryContinue';
|
|
52
|
+
/**
|
|
53
|
+
* number of the clicked button
|
|
54
|
+
* @TJS-format signal
|
|
55
|
+
*/
|
|
56
|
+
resultSignal: string;
|
|
57
|
+
}
|
|
38
58
|
export interface CloseDialog {
|
|
39
59
|
type: 'CloseDialog';
|
|
40
60
|
}
|
|
@@ -225,6 +245,39 @@ export interface ClearSiganlsInGroup {
|
|
|
225
245
|
*/
|
|
226
246
|
group: string;
|
|
227
247
|
}
|
|
248
|
+
export interface CopySignalValuesFromFolder {
|
|
249
|
+
type: 'CopySignalValuesFromFolder';
|
|
250
|
+
/**
|
|
251
|
+
* name of the source folder
|
|
252
|
+
*/
|
|
253
|
+
sourceFolder: string;
|
|
254
|
+
/**
|
|
255
|
+
* name of destination folder
|
|
256
|
+
*/
|
|
257
|
+
destinationFolder?: number;
|
|
258
|
+
}
|
|
259
|
+
export interface ExportSignalValuesAsJson {
|
|
260
|
+
type: 'ExportSignalValuesAsJson';
|
|
261
|
+
/**
|
|
262
|
+
* regex to select the signals (every matching one)
|
|
263
|
+
*/
|
|
264
|
+
regex: string;
|
|
265
|
+
/**
|
|
266
|
+
* wait for updated values from the connection
|
|
267
|
+
*/
|
|
268
|
+
updateTagValues?: number;
|
|
269
|
+
/**
|
|
270
|
+
* download filename
|
|
271
|
+
*/
|
|
272
|
+
fileName?: string;
|
|
273
|
+
}
|
|
274
|
+
export interface ImportSignalValuesFromJson {
|
|
275
|
+
type: 'ImportSignalValuesFromJson';
|
|
276
|
+
/**
|
|
277
|
+
* json data with the values
|
|
278
|
+
*/
|
|
279
|
+
data: string;
|
|
280
|
+
}
|
|
228
281
|
export interface Condition {
|
|
229
282
|
type: 'Condition';
|
|
230
283
|
/**
|
|
@@ -314,7 +314,7 @@ export class ScriptSystem {
|
|
|
314
314
|
async parseStringWithValues(text, context) {
|
|
315
315
|
const parsed = parseBindingString(text);
|
|
316
316
|
let results = await Promise.all(parsed.signals.map(x => this.getStateOrFieldOrParameter(this.getSignaName(x, context), context)));
|
|
317
|
-
let nm =
|
|
317
|
+
let nm = parsed.parts[0];
|
|
318
318
|
for (let i = 0; i < parsed.parts.length - 1; i++) {
|
|
319
319
|
let v = results[i].val;
|
|
320
320
|
if (v == null)
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { BindingTarget } from "@node-projects/web-component-designer";
|
|
2
2
|
export class ScriptRefactorService {
|
|
3
3
|
getRefactorings(designItems) {
|
|
4
|
-
|
|
4
|
+
const refactorings = [];
|
|
5
5
|
for (let d of designItems) {
|
|
6
6
|
for (let a of d.attributes()) {
|
|
7
7
|
if (a[0][0] == '@') {
|
|
8
|
-
|
|
8
|
+
const sc = a[1];
|
|
9
9
|
if (sc[0] == '{') {
|
|
10
|
-
|
|
10
|
+
const script = JSON.parse(sc);
|
|
11
11
|
if ('commands' in script) {
|
|
12
12
|
for (let c of script.commands) {
|
|
13
13
|
for (let p in c) {
|
|
14
|
-
|
|
14
|
+
const cp = c[p];
|
|
15
15
|
if (cp != null && typeof cp === 'object') {
|
|
16
16
|
let mp = cp;
|
|
17
17
|
if (mp.source == 'signal') {
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"description": "web-component-designer addon for visualizations",
|
|
3
|
-
"name": "@node-projects/web-component-designer-visualization-addons",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"author": "jochen.kuehner@gmx.de",
|
|
8
|
-
"license": "MIT",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"tsc": "tsc",
|
|
11
|
-
"build": "tsc",
|
|
12
|
-
"link": "npm link",
|
|
13
|
-
"prepublishOnly": "npm run build"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@adobe/css-tools": "^4.4.0",
|
|
17
|
-
"@blockly/zoom-to-fit": "^6.0.7",
|
|
18
|
-
"@node-projects/base-custom-webcomponent": ">=0.19.0",
|
|
19
|
-
"@node-projects/propertygrid.webcomponent": ">=1.1.1",
|
|
20
|
-
"@node-projects/splitview.webcomponent": ">=1.0.1",
|
|
21
|
-
"@node-projects/web-component-designer": ">=0.1.215",
|
|
22
|
-
"@node-projects/web-component-designer-codeview-monaco": ">=0.1.27",
|
|
23
|
-
"@node-projects/web-component-designer-widgets-wunderbaum": ">=0.1.27",
|
|
24
|
-
"blockly": "^11.1.1",
|
|
25
|
-
"long": "^5.2.3"
|
|
26
|
-
},
|
|
27
|
-
"repository": {
|
|
28
|
-
"type": "git",
|
|
29
|
-
"url": "git+https://github.com/node-projects/web-component-designer.git"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"description": "web-component-designer addon for visualizations",
|
|
3
|
+
"name": "@node-projects/web-component-designer-visualization-addons",
|
|
4
|
+
"version": "0.1.64",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"author": "jochen.kuehner@gmx.de",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"tsc": "tsc",
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"link": "npm link",
|
|
13
|
+
"prepublishOnly": "npm run build"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@adobe/css-tools": "^4.4.0",
|
|
17
|
+
"@blockly/zoom-to-fit": "^6.0.7",
|
|
18
|
+
"@node-projects/base-custom-webcomponent": ">=0.19.0",
|
|
19
|
+
"@node-projects/propertygrid.webcomponent": ">=1.1.1",
|
|
20
|
+
"@node-projects/splitview.webcomponent": ">=1.0.1",
|
|
21
|
+
"@node-projects/web-component-designer": ">=0.1.215",
|
|
22
|
+
"@node-projects/web-component-designer-codeview-monaco": ">=0.1.27",
|
|
23
|
+
"@node-projects/web-component-designer-widgets-wunderbaum": ">=0.1.27",
|
|
24
|
+
"blockly": "^11.1.1",
|
|
25
|
+
"long": "^5.2.3"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/node-projects/web-component-designer.git"
|
|
30
|
+
}
|
|
31
|
+
}
|