@node-projects/web-component-designer-visualization-addons 0.1.148 → 0.1.150
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/BlocklyScriptEditor.d.ts +0 -2
- package/dist/blockly/BlocklyScriptEditor.js +0 -11
- package/dist/components/BindingsEditor.d.ts +27 -12
- package/dist/components/BindingsEditor.js +570 -206
- package/dist/components/BindingsEditorHelp.d.ts +1 -0
- package/dist/components/BindingsEditorHelp.js +228 -0
- package/dist/index-min.js +493 -118
- package/dist/services/VisualizationBindingsService.js +9 -1
- package/package.json +3 -3
|
@@ -5,8 +5,6 @@ export declare class BlocklyScriptEditor extends BaseCustomWebComponentConstruct
|
|
|
5
5
|
static readonly is = "node-projects-blockly-script-editor";
|
|
6
6
|
blocklyDiv: HTMLDivElement;
|
|
7
7
|
workspace: any;
|
|
8
|
-
static blocklyStyle1: CSSStyleSheet;
|
|
9
|
-
static blocklyStyle2: CSSStyleSheet;
|
|
10
8
|
resizeObserver: ResizeObserver;
|
|
11
9
|
private _toolbox;
|
|
12
10
|
constructor(toolbox: any);
|
|
@@ -15,8 +15,6 @@ export class BlocklyScriptEditor extends BaseCustomWebComponentConstructorAppend
|
|
|
15
15
|
static is = 'node-projects-blockly-script-editor';
|
|
16
16
|
blocklyDiv;
|
|
17
17
|
workspace;
|
|
18
|
-
static blocklyStyle1;
|
|
19
|
-
static blocklyStyle2;
|
|
20
18
|
resizeObserver;
|
|
21
19
|
_toolbox;
|
|
22
20
|
constructor(toolbox) {
|
|
@@ -73,15 +71,6 @@ export class BlocklyScriptEditor extends BaseCustomWebComponentConstructorAppend
|
|
|
73
71
|
},
|
|
74
72
|
maxInstances: { 'start_event': 1 },
|
|
75
73
|
});
|
|
76
|
-
if (!BlocklyScriptEditor.blocklyStyle1) {
|
|
77
|
-
BlocklyScriptEditor.blocklyStyle1 = new CSSStyleSheet();
|
|
78
|
-
//@ts-ignore
|
|
79
|
-
BlocklyScriptEditor.blocklyStyle1.replaceSync(document.getElementById('blockly-renderer-style-' + renderer + '-' + themename).innerText);
|
|
80
|
-
BlocklyScriptEditor.blocklyStyle2 = new CSSStyleSheet();
|
|
81
|
-
//@ts-ignore
|
|
82
|
-
BlocklyScriptEditor.blocklyStyle2.replaceSync(document.getElementById('blockly-common-style').innerText);
|
|
83
|
-
}
|
|
84
|
-
this.shadowRoot.adoptedStyleSheets = [BlocklyScriptEditor.blocklyStyle1, BlocklyScriptEditor.blocklyStyle2, BlocklyScriptEditor.style];
|
|
85
74
|
//@ts-ignore
|
|
86
75
|
const zoomToFit = new ZoomToFitControl(this.workspace);
|
|
87
76
|
zoomToFit.init();
|
|
@@ -9,10 +9,8 @@ export declare class BindingsEditor extends BaseCustomWebComponentConstructorApp
|
|
|
9
9
|
twoWayPossible: BooleanConstructor;
|
|
10
10
|
twoWay: BooleanConstructor;
|
|
11
11
|
expression: StringConstructor;
|
|
12
|
-
objectNames: StringConstructor;
|
|
13
12
|
events: StringConstructor;
|
|
14
13
|
invert: BooleanConstructor;
|
|
15
|
-
converters: ArrayConstructor;
|
|
16
14
|
historic: ObjectConstructor;
|
|
17
15
|
};
|
|
18
16
|
twoWayPossible: boolean;
|
|
@@ -28,8 +26,18 @@ export declare class BindingsEditor extends BaseCustomWebComponentConstructorApp
|
|
|
28
26
|
key: string;
|
|
29
27
|
value: any;
|
|
30
28
|
}[];
|
|
29
|
+
static readonly namedConverters: {
|
|
30
|
+
name: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
converter?: Record<string, any>;
|
|
33
|
+
}[];
|
|
34
|
+
/** Extra help-page sections (raw HTML, same markup/classes as BindingsEditorHelp.ts) contributed by the host application.
|
|
35
|
+
* Left empty by default so the plain designer help page is unaffected. */
|
|
36
|
+
static readonly helpSections: string[];
|
|
31
37
|
convertersString: string;
|
|
32
|
-
|
|
38
|
+
/** Unified converter value for use in IBinding.converters when saving. Returns the named converter
|
|
39
|
+
* string when set, otherwise converts the inline key/value table to a Record, or undefined if empty. */
|
|
40
|
+
get converter(): Record<string, any> | string | undefined;
|
|
33
41
|
protected _property: IProperty;
|
|
34
42
|
protected _binding: IBinding & {
|
|
35
43
|
converter: Record<string, any> | string;
|
|
@@ -38,20 +46,27 @@ export declare class BindingsEditor extends BaseCustomWebComponentConstructorApp
|
|
|
38
46
|
protected _serviceContainer: ServiceContainer;
|
|
39
47
|
protected _instanceServiceContainer: InstanceServiceContainer;
|
|
40
48
|
protected _shell: VisualizationShell;
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
private _signals;
|
|
50
|
+
private _signalListContainer;
|
|
51
|
+
private _converterListContainer;
|
|
43
52
|
constructor(property: IProperty, binding: IBinding & {
|
|
44
53
|
converter: Record<string, any>;
|
|
45
54
|
}, bindingTarget: BindingTarget, serviceContainer: ServiceContainer, instanceServiceContainer: InstanceServiceContainer, shell: VisualizationShell, config?: {
|
|
46
|
-
namedConverters
|
|
55
|
+
namedConverters?: boolean;
|
|
56
|
+
showHistoric?: boolean;
|
|
57
|
+
historicLabel?: string;
|
|
47
58
|
});
|
|
48
59
|
ready(): void;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
60
|
+
private _parseObjectNames;
|
|
61
|
+
private _signalsToObjectNames;
|
|
62
|
+
private _renderSignalList;
|
|
63
|
+
private _syncSignals;
|
|
64
|
+
_addSignal(): void;
|
|
65
|
+
_selectForRow(index: number, signalInput: HTMLInputElement): Promise<void>;
|
|
66
|
+
private _renderConverterList;
|
|
67
|
+
_addConverter(): void;
|
|
68
|
+
_selectNamedConverter(): Promise<void>;
|
|
52
69
|
_refresh(): void;
|
|
53
|
-
_select(): Promise<void>;
|
|
54
70
|
showHistoric(): Promise<void>;
|
|
55
|
-
|
|
56
|
-
removeConverter(): void;
|
|
71
|
+
_showHelp(): void;
|
|
57
72
|
}
|