@node-projects/web-component-designer-visualization-addons 0.1.102 → 0.1.103
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/helpers/BindingsHelper.js +14 -13
- package/dist/scripting/ScriptCommands.d.ts +2 -1
- package/dist/scripting/ScriptSystem.js +3 -1
- package/dist/scripting/ScriptUpgrader.d.ts +1 -1
- package/dist/services/BindableObjectDragDropService.d.ts +2 -2
- package/package.json +1 -1
- package/dist/blockly/components/fields/FieldObjectId.d.ts +0 -1
- package/dist/blockly/components/fields/FieldObjectId.js +0 -6
|
@@ -202,6 +202,7 @@ export class BindingsHelper {
|
|
|
202
202
|
}
|
|
203
203
|
serializeBinding(element, targetName, binding) {
|
|
204
204
|
let bindingCopy = { ...binding };
|
|
205
|
+
delete bindingCopy.type;
|
|
205
206
|
if (!binding.twoWay) {
|
|
206
207
|
delete bindingCopy.events;
|
|
207
208
|
delete bindingCopy.expressionTwoWay;
|
|
@@ -223,7 +224,7 @@ export class BindingsHelper {
|
|
|
223
224
|
if (!needsJson && binding.target == BindingTarget.property &&
|
|
224
225
|
!binding.expression && !binding.expressionTwoWay &&
|
|
225
226
|
binding.converter == null &&
|
|
226
|
-
|
|
227
|
+
//!binding.type &&
|
|
227
228
|
!binding.historic &&
|
|
228
229
|
!binding.writeBackSignal) {
|
|
229
230
|
if (targetName == 'textContent')
|
|
@@ -237,7 +238,7 @@ export class BindingsHelper {
|
|
|
237
238
|
binding.expression && !binding.expression.includes("\n") && !binding.expression.includes(";") &&
|
|
238
239
|
!binding.expressionTwoWay &&
|
|
239
240
|
binding.converter == null &&
|
|
240
|
-
|
|
241
|
+
//!binding.type &&
|
|
241
242
|
!binding.historic &&
|
|
242
243
|
!binding.writeBackSignal) {
|
|
243
244
|
if (targetName == 'textContent')
|
|
@@ -249,7 +250,7 @@ export class BindingsHelper {
|
|
|
249
250
|
if (!needsJson && binding.target == BindingTarget.attribute &&
|
|
250
251
|
!binding.expression && !binding.expressionTwoWay &&
|
|
251
252
|
binding.converter == null &&
|
|
252
|
-
|
|
253
|
+
//!binding.type &&
|
|
253
254
|
!binding.historic &&
|
|
254
255
|
!binding.writeBackSignal) {
|
|
255
256
|
return [bindingPrefixAttribute + PropertiesHelper.camelToDashCase(targetName), (binding.twoWay ? '=' : '') + (binding.inverted ? '!' : '') + binding.signal + (!binding.twoWay && binding.signal.includes(';') ? ';' : '') + eventsString];
|
|
@@ -259,7 +260,7 @@ export class BindingsHelper {
|
|
|
259
260
|
binding.expression && !binding.expression.includes("\n") && !binding.expression.includes(";") &&
|
|
260
261
|
!binding.expressionTwoWay &&
|
|
261
262
|
binding.converter == null &&
|
|
262
|
-
|
|
263
|
+
//!binding.type &&
|
|
263
264
|
!binding.historic &&
|
|
264
265
|
!binding.writeBackSignal) {
|
|
265
266
|
return [bindingPrefixAttribute + PropertiesHelper.camelToDashCase(targetName), (binding.twoWay ? '=' : '') + (binding.inverted ? '!' : '') + binding.signal + ';' + binding.expression + eventsString];
|
|
@@ -267,7 +268,7 @@ export class BindingsHelper {
|
|
|
267
268
|
if (!needsJson && binding.target == BindingTarget.class &&
|
|
268
269
|
!binding.expression && !binding.expressionTwoWay &&
|
|
269
270
|
binding.converter == null &&
|
|
270
|
-
|
|
271
|
+
//!binding.type &&
|
|
271
272
|
!binding.historic &&
|
|
272
273
|
!binding.writeBackSignal) {
|
|
273
274
|
return [bindingPrefixClass + PropertiesHelper.camelToDashCase(targetName), (binding.inverted ? '!' : '') + binding.signal + (!binding.twoWay && binding.signal.includes(';') ? ';' : '') + eventsString];
|
|
@@ -277,7 +278,7 @@ export class BindingsHelper {
|
|
|
277
278
|
binding.expression && !binding.expression.includes("\n") && !binding.expression.includes(";") &&
|
|
278
279
|
!binding.expressionTwoWay &&
|
|
279
280
|
binding.converter == null &&
|
|
280
|
-
|
|
281
|
+
//!binding.type &&
|
|
281
282
|
!binding.historic &&
|
|
282
283
|
!binding.writeBackSignal) {
|
|
283
284
|
return [bindingPrefixClass + PropertiesHelper.camelToDashCase(targetName), (binding.inverted ? '!' : '') + binding.signal + ';' + binding.expression + eventsString];
|
|
@@ -285,7 +286,7 @@ export class BindingsHelper {
|
|
|
285
286
|
if (!needsJson && binding.target == BindingTarget.css &&
|
|
286
287
|
!binding.expression && !binding.expressionTwoWay &&
|
|
287
288
|
binding.converter == null &&
|
|
288
|
-
|
|
289
|
+
//!binding.type &&
|
|
289
290
|
!binding.historic &&
|
|
290
291
|
!binding.writeBackSignal) {
|
|
291
292
|
return [bindingPrefixCss + PropertiesHelper.camelToDashCase(targetName), (binding.inverted ? '!' : '') + binding.signal + (!binding.twoWay && binding.signal.includes(';') ? ';' : '') + eventsString];
|
|
@@ -295,7 +296,7 @@ export class BindingsHelper {
|
|
|
295
296
|
binding.expression && !binding.expression.includes("\n") && !binding.expression.includes(";") &&
|
|
296
297
|
!binding.expressionTwoWay &&
|
|
297
298
|
binding.converter == null &&
|
|
298
|
-
|
|
299
|
+
//!binding.type &&
|
|
299
300
|
!binding.historic &&
|
|
300
301
|
!binding.writeBackSignal) {
|
|
301
302
|
return [bindingPrefixCss + PropertiesHelper.camelToDashCase(targetName), (binding.inverted ? '!' : '') + binding.signal + ';' + binding.expression + eventsString];
|
|
@@ -303,7 +304,7 @@ export class BindingsHelper {
|
|
|
303
304
|
if (!needsJson && binding.target == BindingTarget.cssvar &&
|
|
304
305
|
!binding.expression && !binding.expressionTwoWay &&
|
|
305
306
|
binding.converter == null &&
|
|
306
|
-
|
|
307
|
+
//!binding.type &&
|
|
307
308
|
!binding.historic &&
|
|
308
309
|
!binding.writeBackSignal) {
|
|
309
310
|
return [bindingPrefixCssVar + BindingsHelper.camelToDotCase(targetName.substring(2)), (binding.inverted ? '!' : '') + binding.signal + (!binding.twoWay && binding.signal.includes(';') ? ';' : '') + eventsString];
|
|
@@ -313,7 +314,7 @@ export class BindingsHelper {
|
|
|
313
314
|
binding.expression && !binding.expression.includes("\n") && !binding.expression.includes(";") &&
|
|
314
315
|
!binding.expressionTwoWay &&
|
|
315
316
|
binding.converter == null &&
|
|
316
|
-
|
|
317
|
+
//!binding.type &&
|
|
317
318
|
!binding.historic &&
|
|
318
319
|
!binding.writeBackSignal) {
|
|
319
320
|
return [bindingPrefixCssVar + PropertiesHelper.camelToDashCase(targetName), (binding.inverted ? '!' : '') + binding.signal + ';' + binding.expression + eventsString];
|
|
@@ -330,9 +331,9 @@ export class BindingsHelper {
|
|
|
330
331
|
if (binding.twoWay === null || binding.twoWay === false) {
|
|
331
332
|
delete bindingCopy.twoWay;
|
|
332
333
|
}
|
|
333
|
-
if (binding.type === null || binding.type === '') {
|
|
334
|
-
|
|
335
|
-
}
|
|
334
|
+
/*if (binding.type === null || binding.type === '') {
|
|
335
|
+
delete bindingCopy.type;
|
|
336
|
+
}*/
|
|
336
337
|
delete bindingCopy.target;
|
|
337
338
|
if (!binding.historic) {
|
|
338
339
|
delete bindingCopy.historic;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare type ScriptCommands =
|
|
1
|
+
export declare type ScriptCommands = RunnableScriptCommands | Comment | Condition | Exit | Label | Goto;
|
|
2
|
+
export declare type RunnableScriptCommands = OpenScreen | OpenUrl | OpenDialog | CloseDialog | ToggleSignalValue | SetSignalValue | IncrementSignalValue | DecrementSignalValue | SetBitInSignal | ClearBitInSignal | ToggleBitInSignal | Console | CalculateSignalValue | Javascript | SetElementProperty | Delay | SwitchLanguage | Login | Logout | SubscribeSignal | UnsubscribeSignal | WriteSignalsInGroup | ClearSiganlsInGroup | RunScript | CopySignalValuesFromFolder | ShowMessageBox | ExportSignalValuesAsJson | ImportSignalValuesFromJson;
|
|
2
3
|
export interface Comment {
|
|
3
4
|
type: 'Comment';
|
|
4
5
|
comment: string;
|
|
@@ -182,7 +182,9 @@ export class ScriptSystem {
|
|
|
182
182
|
case 'SetElementProperty': {
|
|
183
183
|
//@ts-ignore
|
|
184
184
|
command = ScriptUpgrades.upgradeSetElementProperty(command);
|
|
185
|
-
|
|
185
|
+
let name = await this.getValue(command.name, context);
|
|
186
|
+
if (name === '')
|
|
187
|
+
name = null;
|
|
186
188
|
const value = await this.getValue(command.value, context);
|
|
187
189
|
const parentIndex = await this.getValue(command.parentIndex ?? 0, context);
|
|
188
190
|
const target = await this.getValue(command.target ?? 'property', context);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScriptCommands, SetElementProperty } from "./ScriptCommands";
|
|
2
2
|
export declare class ScriptUpgrades {
|
|
3
|
-
static upgradeScriptCommand(scriptCommand: ScriptCommands):
|
|
3
|
+
static upgradeScriptCommand(scriptCommand: ScriptCommands): import("./ScriptCommands").OpenScreen | import("./ScriptCommands").OpenUrl | import("./ScriptCommands").OpenDialog | import("./ScriptCommands").CloseDialog | import("./ScriptCommands").ToggleSignalValue | import("./ScriptCommands").SetSignalValue | import("./ScriptCommands").IncrementSignalValue | import("./ScriptCommands").DecrementSignalValue | import("./ScriptCommands").SetBitInSignal | import("./ScriptCommands").ClearBitInSignal | import("./ScriptCommands").ToggleBitInSignal | import("./ScriptCommands").Console | import("./ScriptCommands").CalculateSignalValue | import("./ScriptCommands").Javascript | SetElementProperty | import("./ScriptCommands").Delay | import("./ScriptCommands").SwitchLanguage | import("./ScriptCommands").Login | import("./ScriptCommands").Logout | import("./ScriptCommands").SubscribeSignal | import("./ScriptCommands").UnsubscribeSignal | import("./ScriptCommands").WriteSignalsInGroup | import("./ScriptCommands").ClearSiganlsInGroup | import("./ScriptCommands").RunScript | import("./ScriptCommands").CopySignalValuesFromFolder | import("./ScriptCommands").ShowMessageBox | import("./ScriptCommands").ExportSignalValuesAsJson | import("./ScriptCommands").ImportSignalValuesFromJson | import("./ScriptCommands").Comment | import("./ScriptCommands").Condition | import("./ScriptCommands").Exit | import("./ScriptCommands").Label | import("./ScriptCommands").Goto;
|
|
4
4
|
static upgradeSetElementProperty(scriptCommand: SetElementProperty): SetElementProperty;
|
|
5
5
|
}
|
|
@@ -3,8 +3,8 @@ import { BindingsHelper } from "../helpers/BindingsHelper.js";
|
|
|
3
3
|
import { VisualizationHandler } from "../interfaces/VisualizationHandler.js";
|
|
4
4
|
export declare class BindableObjectDragDropService implements IBindableObjectDragDropService {
|
|
5
5
|
constructor(bindingsHelper: BindingsHelper, visualizationHandler: VisualizationHandler);
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
protected _bindingsHelper: BindingsHelper;
|
|
7
|
+
protected _visualizationHandler: VisualizationHandler;
|
|
8
8
|
rectMap: Map<Element, SVGRectElement>;
|
|
9
9
|
rect: SVGRectElement;
|
|
10
10
|
dragEnter(designerCanvas: IDesignerCanvas, event: DragEvent, element: Element): void;
|
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.103",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "jochen.kuehner@gmx.de",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|