@node-projects/web-component-designer-visualization-addons 0.1.63 → 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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ //@ts-ignore
2
+ class FieldObjectId extends Blockly.FieldTextInput {
3
+ }
4
+ //@ts-ignore
5
+ Blockly.FieldObjectId = FieldObjectId;
6
+ 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
  /**
@@ -1,17 +1,17 @@
1
1
  import { BindingTarget } from "@node-projects/web-component-designer";
2
2
  export class ScriptRefactorService {
3
3
  getRefactorings(designItems) {
4
- let refactorings = [];
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
- let sc = a[1];
8
+ const sc = a[1];
9
9
  if (sc[0] == '{') {
10
- let script = JSON.parse(sc);
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
- let cp = c[p];
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.63",
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
+ }