@node-projects/web-component-designer-visualization-addons 0.1.0

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.
Files changed (78) hide show
  1. package/README.md +19 -0
  2. package/dist/blockly/BlocklyJavascriptHelper.d.ts +2 -0
  3. package/dist/blockly/BlocklyJavascriptHelper.js +35 -0
  4. package/dist/blockly/BlocklyScriptEditor.d.ts +16 -0
  5. package/dist/blockly/BlocklyScriptEditor.js +106 -0
  6. package/dist/blockly/BlocklyToolbox.d.ts +1117 -0
  7. package/dist/blockly/BlocklyToolbox.js +980 -0
  8. package/dist/blockly/components/Console.d.ts +0 -0
  9. package/dist/blockly/components/Console.js +26 -0
  10. package/dist/blockly/components/Debugger.d.ts +0 -0
  11. package/dist/blockly/components/Debugger.js +15 -0
  12. package/dist/blockly/components/GetState.d.ts +0 -0
  13. package/dist/blockly/components/GetState.js +21 -0
  14. package/dist/blockly/components/GetSubProperty.d.ts +0 -0
  15. package/dist/blockly/components/GetSubProperty.js +27 -0
  16. package/dist/blockly/components/OpenScreen.d.ts +0 -0
  17. package/dist/blockly/components/OpenScreen.js +31 -0
  18. package/dist/blockly/components/QuerySelector.d.ts +0 -0
  19. package/dist/blockly/components/QuerySelector.js +30 -0
  20. package/dist/blockly/components/QuerySelectorAll.d.ts +0 -0
  21. package/dist/blockly/components/QuerySelectorAll.js +30 -0
  22. package/dist/blockly/components/Return.d.ts +0 -0
  23. package/dist/blockly/components/Return.js +21 -0
  24. package/dist/blockly/components/SetElement.d.ts +0 -0
  25. package/dist/blockly/components/SetElement.js +44 -0
  26. package/dist/blockly/components/SetState.d.ts +0 -0
  27. package/dist/blockly/components/SetState.js +26 -0
  28. package/dist/blockly/components/StartEvent.d.ts +0 -0
  29. package/dist/blockly/components/StartEvent.js +23 -0
  30. package/dist/blockly/components/components.d.ts +11 -0
  31. package/dist/blockly/components/components.js +11 -0
  32. package/dist/blockly/components/fields/FieldObjectId.d.ts +1 -0
  33. package/dist/blockly/components/fields/FieldObjectId.js +6 -0
  34. package/dist/components/BindingsEditor.d.ts +49 -0
  35. package/dist/components/BindingsEditor.js +298 -0
  36. package/dist/components/BindingsEditorHistoric.d.ts +14 -0
  37. package/dist/components/BindingsEditorHistoric.js +97 -0
  38. package/dist/components/PropertyGridExt.d.ts +0 -0
  39. package/dist/components/PropertyGridExt.js +1 -0
  40. package/dist/components/ScriptEditor.d.ts +28 -0
  41. package/dist/components/ScriptEditor.js +254 -0
  42. package/dist/components/VisualizationPropertyGrid.d.ts +12 -0
  43. package/dist/components/VisualizationPropertyGrid.js +104 -0
  44. package/dist/helpers/BindingsHelper.d.ts +47 -0
  45. package/dist/helpers/BindingsHelper.js +642 -0
  46. package/dist/index.d.ts +21 -0
  47. package/dist/index.js +22 -0
  48. package/dist/interfaces/IScriptMultiplexValue.d.ts +15 -0
  49. package/dist/interfaces/IScriptMultiplexValue.js +15 -0
  50. package/dist/interfaces/VisualisationElementScript.d.ts +5 -0
  51. package/dist/interfaces/VisualisationElementScript.js +1 -0
  52. package/dist/interfaces/VisualizationBinding.d.ts +20 -0
  53. package/dist/interfaces/VisualizationBinding.js +4 -0
  54. package/dist/interfaces/VisualizationHandler.d.ts +24 -0
  55. package/dist/interfaces/VisualizationHandler.js +2 -0
  56. package/dist/interfaces/VisualizationShell.d.ts +13 -0
  57. package/dist/interfaces/VisualizationShell.js +1 -0
  58. package/dist/interfaces/VisualizationUiHandler.d.ts +5 -0
  59. package/dist/interfaces/VisualizationUiHandler.js +2 -0
  60. package/dist/scripting/Script.d.ts +6 -0
  61. package/dist/scripting/Script.js +5 -0
  62. package/dist/scripting/ScriptCommands.d.ts +192 -0
  63. package/dist/scripting/ScriptCommands.js +1 -0
  64. package/dist/scripting/ScriptSystem.d.ts +23 -0
  65. package/dist/scripting/ScriptSystem.js +224 -0
  66. package/dist/services/BindableObjectDragDropService.d.ts +16 -0
  67. package/dist/services/BindableObjectDragDropService.js +145 -0
  68. package/dist/services/BindingsService.d.ts +11 -0
  69. package/dist/services/BindingsService.js +46 -0
  70. package/dist/services/PropertyGridDragDropService.d.ts +7 -0
  71. package/dist/services/PropertyGridDragDropService.js +10 -0
  72. package/dist/services/ScriptRefactorService.d.ts +9 -0
  73. package/dist/services/ScriptRefactorService.js +79 -0
  74. package/dist/services/SignalPropertyEditor.d.ts +7 -0
  75. package/dist/services/SignalPropertyEditor.js +43 -0
  76. package/dist/setupVisuService.d.ts +0 -0
  77. package/dist/setupVisuService.js +1 -0
  78. package/package.json +29 -0
@@ -0,0 +1,298 @@
1
+ import { BaseCustomWebComponentConstructorAppend, html, css } from '@node-projects/base-custom-webcomponent';
2
+ import { BindingMode, BindingTarget } from '@node-projects/web-component-designer';
3
+ import { BindableObjectsBrowser } from "@node-projects/web-component-designer-widgets-wunderbaum";
4
+ import { BindingsEditorHistoric } from './BindingsEditorHistoric.js';
5
+ export class BindingsEditor extends BaseCustomWebComponentConstructorAppend {
6
+ static template = html `
7
+ <div id="root">
8
+ <div class="vertical-grid">
9
+ <div style="grid-column: 1/3">
10
+ <div style="display: flex; flex-direction: column;">
11
+ <div class="row">
12
+ <span style="cursor: pointer;" title="to use multiple objects, seprate them with semicolon (;). access iobroker objects in properties via ?propertyName, access the propertyValue via ??propertyName. Bind to ioBroker object via $objectId. You could also use ioBroker signals inside of a Signal Name via {name}">objects</span>
13
+ </div>
14
+ <div style="display:flex;align-items: flex-end;">
15
+ <input class="row" value="{{?this.objectNames::change}}" style="flex-grow: 1;">
16
+ <button @click="_clear" style="height: 22px">X</button>
17
+ <button @click="_select" style="height: 22px">...</button>
18
+ </div>
19
+ <div class="row">
20
+ <label style="white-space: nowrap; margin-right: 4px;" title="if set, the value is converted to the type before binding is applied">type :</label>
21
+ <select class="row" value="{{?this.objectValueType}}">
22
+ <option selected value="">ignore</option>
23
+ <option value="number">number</option>
24
+ <option value="boolean">boolean</option>
25
+ <option value="string">string</string>
26
+ </select>
27
+ </div>
28
+ <div class="row">
29
+ <input type="checkbox" disabled="[[!this.twoWayPossible]]" checked="{{this.twoWay::change}}" @change="_refresh">
30
+ <span>two way binding</span>
31
+ <span css:display="[[this.twoWay ? 'inline' : 'none']]" style="margin-left: 15px">events:&nbsp;</span>
32
+ <input css:display="[[this.twoWay ? 'inline-block' : 'none']]" title="to use multiple events, seprate them with semicolon (;)" class="row" value="{{?this.events::change}}" style="flex-grow: 1;">
33
+ </div>
34
+ <div class="row" style="position: relative">
35
+ <input type="checkbox" checked="{{this.invert::change}}">
36
+ <span>invert logic</span>
37
+ <button css:border="[[this.historic ? 'solid lime 5px' : 'none']]" style="position: absolute; right: 1px; top: 5px; padding: 10px;" @click="showHistoric">historic</button>
38
+ </div>
39
+ <div class="row">
40
+ <span style="cursor: pointer;" title="javascript expression. access objects with __0, __1, ...">formula</span>
41
+ </div>
42
+ <div class="row">
43
+ <node-projects-code-view-monaco id="expression" single-row language="javascript" style="width: 100%; min-height: 17px; height: 17px; position: relative; overflow: hidden; resize: vertical;" .value="{{?this.expression}}"></iobroker-webui-monaco-editor>
44
+ </div>
45
+ <div class="row">
46
+ <span style="cursor: pointer;" title="javascript expression. access property with 'value'">formula write back (two way)</span>
47
+ </div>
48
+ <div class="row">
49
+ <node-projects-code-view-monaco id="expression2way" read-only="[[!this.twoWay]]" $readonly="[[!this.twoWay]]" single-row language="javascript" style="width: 100%; min-height: 17px; height: 17px; position: relative; overflow: hidden; resize: vertical;" .value="{{?this.expressionTwoWay}}"></iobroker-webui-monaco-editor>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ <div class="vertical-grid" style="margin-top: 10px;">
55
+ <div>
56
+ <div class="input-headline">
57
+ <span>converter</span>:
58
+ </div>
59
+ </div>
60
+ </div>
61
+ <div class="vertical-grid" style="border: solid 1px black; padding: 10px; overflow-y: auto;">
62
+ <div class="bottomleft">
63
+ <div id="converterGrid" style="height: 100%;">
64
+ <div style="width: 100%; height: 20px; display: flex;">
65
+ <div style="width: 39%">condition</div>
66
+ <div style="width: 59%">value</div>
67
+ </div>
68
+ <template repeat:item="[[this.converters]]">
69
+ <div css:background-color="[[item.activeRow ? 'gray' : '']]" style="width: 100%; display: flex; height: 26px; justify-content: center; align-items: center; gap: 5px;">
70
+ <input type="text" value="{{item.key}}" @focus="[[this._focusRow(index)]]" style="width: 39%">
71
+ <input type="[[this._property.type == 'color' ? 'color' : 'text']]" value="{{item.value}}" @focus="[[this._focusRow(index)]]" style="width: 59%">
72
+ </div>
73
+ </template>
74
+ </div>
75
+ </div>
76
+ <div class="controlbox" id="grid-controls">
77
+ <button type="button" id="add-row-button" value="add" @click="addConverter">
78
+ <span>add</span>
79
+ </button>
80
+ <button id="remove-row-button" value="remove" style="margin-top: 6px;" @click="removeConverter">
81
+ <span>remove</span>
82
+ </button>
83
+ </div>
84
+ </div>
85
+ </div>`;
86
+ static style = css `
87
+ :host {
88
+ box-sizing: border-box;
89
+ }
90
+
91
+ #converterGrid {
92
+ display: flex;
93
+ gap: 2px;
94
+ flex-direction: column;
95
+ }
96
+ #converterGrid input {
97
+ height: 20px;
98
+ box-sizing: border-box;
99
+ }
100
+
101
+ .padding_top {
102
+ padding-top: 30px;
103
+ }
104
+
105
+ .row{
106
+ margin-top: 3px;
107
+ display: flex;
108
+ align-items: center;
109
+ }
110
+
111
+ .controlbox {
112
+ display: flex;
113
+ flex-direction: column;
114
+ }
115
+
116
+ .input-headline {
117
+ height: 30px;
118
+ }
119
+
120
+ input[type="checkbox"] {
121
+ margin-right: 15px;
122
+ width: 15px;
123
+ height: 15px;
124
+ }
125
+
126
+ select {
127
+ width: 100%;
128
+ }
129
+
130
+ #root {
131
+ padding: 2px 10px;
132
+ display: grid;
133
+ grid-template-rows: min-content min-content;
134
+ overflow: auto;
135
+ height: calc(100% - 4px)
136
+ }
137
+
138
+ .vertical-grid {
139
+ display: grid;
140
+ grid-template-columns: calc((100% - 150px) - 30px) 150px;
141
+ gap: 30px;
142
+ }
143
+
144
+ #grid input, #list input {
145
+ border:0px;
146
+ }
147
+
148
+ #tagdata_type {
149
+ height: 24px;
150
+ font-size: inherit;
151
+ }
152
+
153
+ iobroker-webui-monaco-editor:not([readonly]) {
154
+ border: 1px black solid;
155
+ }
156
+
157
+ iobroker-webui-monaco-editor[readonly] {
158
+ border: 1px lightgray solid;
159
+ }`;
160
+ static is = 'iobroker-webui-dynamics-editor';
161
+ static properties = {
162
+ twoWayPossible: Boolean,
163
+ twoWay: Boolean,
164
+ expression: String,
165
+ objectNames: String,
166
+ events: String,
167
+ invert: Boolean,
168
+ converters: Array,
169
+ historic: Object
170
+ };
171
+ twoWayPossible = false;
172
+ twoWay = false;
173
+ expression = '';
174
+ expressionTwoWay = '';
175
+ historic;
176
+ objectNames = '';
177
+ events = '';
178
+ invert = false;
179
+ converters = [];
180
+ objectValueType;
181
+ _property;
182
+ _binding;
183
+ _bindingTarget;
184
+ _serviceContainer;
185
+ _shell;
186
+ _activeRow = -1;
187
+ constructor(property, binding, bindingTarget, servieContainer, shell) {
188
+ super();
189
+ super._restoreCachedInititalValues();
190
+ this._property = property;
191
+ this._binding = binding;
192
+ this._bindingTarget = bindingTarget;
193
+ this._serviceContainer = servieContainer;
194
+ this._shell = shell;
195
+ }
196
+ ready() {
197
+ this._parseAttributesToProperties();
198
+ this._assignEvents();
199
+ this.twoWayPossible = false;
200
+ if (this._bindingTarget == BindingTarget.property)
201
+ this.twoWayPossible = true;
202
+ if (this._binding) {
203
+ this.twoWay = this._binding.mode == BindingMode.twoWay;
204
+ this.expression = this._binding.expression;
205
+ this.expressionTwoWay = this._binding.expressionTwoWay;
206
+ this.historic = this._binding.historic;
207
+ this.invert = this._binding.invert;
208
+ this.objectValueType = this._binding.type;
209
+ if (this._binding.bindableObjectNames)
210
+ this.objectNames = this._binding.bindableObjectNames.join(';');
211
+ if (this._binding.converter) {
212
+ for (let c in this._binding.converter) {
213
+ this.converters.push({ key: c, value: this._binding.converter[c] });
214
+ }
215
+ }
216
+ if (this._binding.changedEvents && this._binding.changedEvents.length)
217
+ this.events = this._binding.changedEvents.join(';');
218
+ }
219
+ if (this.expression) {
220
+ let edt = this._getDomElement('expression');
221
+ if (this.expression.indexOf('\n') >= 0) {
222
+ edt.style.height = (3 * 17) + 'px';
223
+ }
224
+ }
225
+ if (this.expressionTwoWay) {
226
+ let edt = this._getDomElement('expression2way');
227
+ if (this.expressionTwoWay.indexOf('\n') >= 0) {
228
+ edt.style.height = (3 * 17) + 'px';
229
+ }
230
+ }
231
+ this._bindingsParse();
232
+ }
233
+ _focusRow(index) {
234
+ this._activeRow = index;
235
+ this._updatefocusedRow();
236
+ }
237
+ _updatefocusedRow() {
238
+ let g = this._getDomElement('converterGrid');
239
+ g.querySelectorAll('div').forEach(x => x.style.background = '');
240
+ if (this._activeRow >= 0)
241
+ g.children[this._activeRow + 1].style.background = 'gray';
242
+ }
243
+ _clear() {
244
+ this.objectNames = '';
245
+ this._bindingsRefresh();
246
+ }
247
+ _refresh() {
248
+ requestAnimationFrame(() => {
249
+ this._bindingsRefresh();
250
+ });
251
+ }
252
+ async _select() {
253
+ let b = new BindableObjectsBrowser();
254
+ b.initialize(this._serviceContainer);
255
+ b.title = 'select signal...';
256
+ const abortController = new AbortController();
257
+ b.objectDoubleclicked.on(() => {
258
+ abortController.abort();
259
+ if (this.objectNames != '')
260
+ this.objectNames += ';';
261
+ this.objectNames += b.selectedObject.fullName;
262
+ this._bindingsRefresh();
263
+ });
264
+ let res = await this._shell.openConfirmation(b, { x: 100, y: 100, width: 400, height: 300, parent: this, abortSignal: abortController.signal });
265
+ if (res) {
266
+ if (this.objectNames != '')
267
+ this.objectNames += ';';
268
+ this.objectNames += b.selectedObject.fullName;
269
+ this._bindingsRefresh();
270
+ }
271
+ }
272
+ async showHistoric() {
273
+ let h = new BindingsEditorHistoric(this.historic);
274
+ const abortController = new AbortController();
275
+ h.title = "Edit historic binding to: " + this._property.name;
276
+ let res = await this._shell.openConfirmation(h, { x: 100, y: 100, width: 420, height: 510, parent: this, abortSignal: abortController.signal, disableResize: true, cancelText: 'Remove' });
277
+ if (!res) {
278
+ this.historic = null;
279
+ }
280
+ else {
281
+ this.historic = h.historic;
282
+ }
283
+ this._bindingsRefresh();
284
+ }
285
+ addConverter() {
286
+ this.converters.push({ key: '', value: '' });
287
+ this._activeRow = this.converters.length - 1;
288
+ this._bindingsRefresh();
289
+ this._updatefocusedRow();
290
+ }
291
+ removeConverter() {
292
+ this.converters.splice(this._activeRow, 1);
293
+ this._activeRow = -1;
294
+ this._bindingsRefresh();
295
+ this._updatefocusedRow();
296
+ }
297
+ }
298
+ customElements.define(BindingsEditor.is, BindingsEditor);
@@ -0,0 +1,14 @@
1
+ import { BaseCustomWebComponentConstructorAppend } from '@node-projects/base-custom-webcomponent';
2
+ export declare class BindingsEditorHistoric extends BaseCustomWebComponentConstructorAppend {
3
+ #private;
4
+ static readonly template: HTMLTemplateElement;
5
+ static readonly style: CSSStyleSheet;
6
+ static readonly is = "node-projects-bindings-editor-historic";
7
+ historic: any;
8
+ static readonly properties: {
9
+ historic: ObjectConstructor;
10
+ };
11
+ constructor(historic: any);
12
+ ready(): void;
13
+ refresh(): void;
14
+ }
@@ -0,0 +1,97 @@
1
+ import { BaseCustomWebComponentConstructorAppend, html, css } from '@node-projects/base-custom-webcomponent';
2
+ export class BindingsEditorHistoric extends BaseCustomWebComponentConstructorAppend {
3
+ static template = html `
4
+ <span style="position:absolute;left:30px;top:26px;">from</span>
5
+ <span style="position:absolute;left:30px;top:77px;">count</span>
6
+ <span style="position:absolute;left:30px;top:123px;">limit</span>
7
+ <span style="position:absolute;left:30px;top:150px;">round</span>
8
+ <span style="position:absolute;left:55px;top:181px;">return newest entries</span>
9
+ <span style="position:absolute;left:55px;top:201px;">remove border values</span>
10
+ <span style="position:absolute;left:30px;top:301px;">step</span>
11
+ <span style="position:absolute;left:30px;top:270px;">aggregate</span>
12
+ <span style="position:absolute;left:30px;top:227px;">ignore null</span>
13
+ <input type="datetime-local" value="{{this.historic.from}}" style="position:absolute;left:75.9219px;top:26px;width:184px;">
14
+ <span style="position:absolute;left:31px;top:52px;">to</span>
15
+ <input type="datetime-local" value="{{this.historic.to}}" style="position:absolute;left:76px;top:51.4375px;width:184px;">
16
+ <input type="number" value="{{this.historic.count}}" style="position:absolute;left:76px;top:78.4415px;width:184px;">
17
+ <input type="number" value="{{this.historic.limit}}" style="position:absolute;left:76px;top:125.5px;width:184px;">
18
+ <input type="number" value="{{this.historic.round}}" style="position:absolute;left:76px;top:152px;width:184px;">
19
+ <input type="number" value="{{this.historic.step}}" style="position:absolute;left:75.921875px;top:301px;width:184px;">
20
+ <select value="{{?this.historic.aggregate}}" @change="[[this.refresh()]]" style="position:absolute;left:142px;top:273px;width:118px;height:21px;">
21
+ <option>none</option>
22
+ <option>minmax</option>
23
+ <option>max</option>
24
+ <option>min</option>
25
+ <option>average</option>
26
+ <option>total</option>
27
+ <option>count</option>
28
+ <option>percentile</option>
29
+ <option>quantile</option>
30
+ <option>integral</option>
31
+ </select>
32
+ <select value="{{this.historic.ignoreNull}}" style="position:absolute;left:142px;top:230px;width:119px;height:21px;">
33
+ <option>false</option>
34
+ <option>true</option>
35
+ <option>0</option>
36
+ </select>
37
+ <input type="checkbox" checked="{{this.historic.returnNewestEntries}}" style="position:absolute;left:35px;top:184px;">
38
+ <input type="checkbox" checked="{{this.historic.removeBorderValues}}" style="position:absolute;left:35px;top:204px;">
39
+ <div style="position:absolute;left:266px;top:26px;width:135px;height:201px;border:1px solid black;">
40
+ <div style="position:absolute;left:25px;top:36px;width:117px;height:154px;grid-template-columns:20px 1fr;display:grid;">
41
+ <input type="checkbox" checked="{{this.historic.from}}" style="grid-column:1;grid-row:1;">
42
+ <span>from</span>
43
+ <input type="checkbox" checked="{{this.historic.ack}}">
44
+ <span>ack</span>
45
+ <input type="checkbox" checked="{{this.historic.q}}">
46
+ <span>q</span>
47
+ <input type="checkbox" checked="{{this.historic.user}}">
48
+ <span>user</span>
49
+ <input type="checkbox" checked="{{this.historic.comment}}">
50
+ <span>comment</span>
51
+ <input type="checkbox" checked="{{this.historic.id}}">
52
+ <span>id</span>
53
+ </div>
54
+ <span style="position:absolute;left:8px;top:6px;">include fields</span>
55
+ </div>
56
+ <span style="position:absolute;left:31.8203px;top:390px;">update all (ms)</span>
57
+ <input value="{{this.historic.reloadInterval}}" type="number" style="position:absolute;left:142px;top:390px;width:119px;">
58
+ <span css:visibility="[[this.historic.aggregate == 'percentile' ? 'visible' : 'collapse']]" id="lblPercentile" style="position:absolute;left:30px;top:325px;">percentile</span>
59
+ <input css:visibility="[[this.historic.aggregate == 'percentile' ? 'visible' : 'collapse']]" value="{{this.historic.percentile}}" type="number" id="percentile" style="position:absolute;left:109px;top:325px;width:151px;">
60
+ <span css:visibility="[[this.historic.aggregate == 'integral' ? 'visible' : 'collapse']]" id="lblIntegral" style="position:absolute;left:30px;top:325px;">integral unit</span>
61
+ <input css:visibility="[[this.historic.aggregate == 'integral' ? 'visible' : 'collapse']]" value="{{this.historic.integralUnit}}" type="number" id="integralUnit" style="position:absolute;left:126px;top:325px;width:134px;">
62
+ <select css:visibility="[[this.historic.aggregate == 'integral' ? 'visible' : 'collapse']]" value="{{this.historic.integralInterpolation}}" style="position:absolute;left:178.93px;top:349px;width:81px;height:21px;">
63
+ <option>none</option>
64
+ <option>linear</option>
65
+ </select>
66
+ <span css:visibility="[[this.historic.aggregate == 'integral' ? 'visible' : 'collapse']]" style="position:absolute;left:29.9219px;top:346px;">integral interpolation</span>
67
+ <input css:visibility="[[this.historic.aggregate == 'quantile' ? 'visible' : 'collapse']]" value="{{this.historic.quantile}}" type="number" id="quantile" style="position:absolute;left:107px;top:325px;width:153px;">
68
+ <span css:visibility="[[this.historic.aggregate == 'quantile' ? 'visible' : 'collapse']]" id="lblQuantile" style="position:absolute;left:30px;top:325px;">quantile</span>
69
+ <span style="position:absolute;left:34px;top:417px;">instance</span>
70
+ <input type="text" value="{{?this.historic.instance}}" style="position:absolute;left:104px;top:419px;width:155px;">`;
71
+ static style = css `
72
+ :host {
73
+ box-sizing: border-box;
74
+ }`;
75
+ static is = 'node-projects-bindings-editor-historic';
76
+ historic;
77
+ static properties = {
78
+ historic: Object
79
+ };
80
+ constructor(historic) {
81
+ super();
82
+ this._restoreCachedInititalValues();
83
+ this.historic = historic ?? { reloadInterval: 2000 };
84
+ }
85
+ ready() {
86
+ this._bindingsParse();
87
+ }
88
+ #refreshing = false;
89
+ refresh() {
90
+ if (!this.#refreshing) {
91
+ this.#refreshing = true;
92
+ this._bindingsRefresh(null, true);
93
+ this.#refreshing = false;
94
+ }
95
+ }
96
+ }
97
+ customElements.define(BindingsEditorHistoric.is, BindingsEditorHistoric);
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,28 @@
1
+ import { BaseCustomWebComponentConstructorAppend } from "@node-projects/base-custom-webcomponent";
2
+ import { Script } from "../scripting/Script.js";
3
+ import { ServiceContainer } from "@node-projects/web-component-designer";
4
+ import { VisualizationHandler } from "../interfaces/VisualizationHandler";
5
+ import { VisualizationShell } from "../interfaces/VisualizationShell";
6
+ import '@node-projects/splitview.webcomponent';
7
+ export declare class SimpleScriptEditor extends BaseCustomWebComponentConstructorAppend {
8
+ static readonly style: CSSStyleSheet;
9
+ static readonly template: HTMLTemplateElement;
10
+ static readonly is = "node-projects-simple-script-editor";
11
+ serviceContainer: ServiceContainer;
12
+ visualizationHandler: VisualizationHandler;
13
+ visualizationShell: VisualizationShell;
14
+ scriptCommandsTypeInfo: any;
15
+ propertiesTypeInfo: any;
16
+ private _script;
17
+ private _commandListDiv;
18
+ private _commandListFancyTree;
19
+ private _possibleCommands;
20
+ private _propertygrid;
21
+ constructor();
22
+ ready(): Promise<void>;
23
+ private addPossibleCommands;
24
+ loadScript(script: Script): void;
25
+ private createTreeItem;
26
+ addItem(): void;
27
+ getScriptCommands(): any[];
28
+ }