@node-projects/web-component-designer-visualization-addons 0.1.50 → 0.1.51
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.
|
@@ -30,7 +30,7 @@ export declare class IndirectSignal {
|
|
|
30
30
|
private visualizationHandler;
|
|
31
31
|
private element;
|
|
32
32
|
private relativeSignalPath;
|
|
33
|
-
constructor(visualizationHandler: VisualizationHandler, id: string, valueChangedCb: (value: State) => void, element: Element, relativeSignalPath: string);
|
|
33
|
+
constructor(visualizationHandler: VisualizationHandler, id: string, valueChangedCb: (value: State) => void, element: Element, relativeSignalPath: string, root: HTMLElement);
|
|
34
34
|
private parseIndirectBinding;
|
|
35
35
|
handleValueChanged(value: any, index: number): void;
|
|
36
36
|
dispose(): void;
|
|
@@ -53,7 +53,7 @@ export class IndirectSignal {
|
|
|
53
53
|
visualizationHandler;
|
|
54
54
|
element;
|
|
55
55
|
relativeSignalPath;
|
|
56
|
-
constructor(visualizationHandler, id, valueChangedCb, element, relativeSignalPath) {
|
|
56
|
+
constructor(visualizationHandler, id, valueChangedCb, element, relativeSignalPath, root) {
|
|
57
57
|
this.visualizationHandler = visualizationHandler;
|
|
58
58
|
this.valueChangedCb = valueChangedCb;
|
|
59
59
|
this.element = element;
|
|
@@ -63,11 +63,11 @@ export class IndirectSignal {
|
|
|
63
63
|
for (let i = 0; i < this.signals.length; i++) {
|
|
64
64
|
let nm = this.signals[i];
|
|
65
65
|
if (nm[0] === '?' && nm[1] === '?') {
|
|
66
|
-
this.handleValueChanged(
|
|
66
|
+
this.handleValueChanged(root[nm.substring(2)], i);
|
|
67
67
|
continue;
|
|
68
68
|
}
|
|
69
69
|
else if (nm[0] === '?') {
|
|
70
|
-
nm =
|
|
70
|
+
nm = root[nm.substring(1)];
|
|
71
71
|
}
|
|
72
72
|
let cb = (id, value) => this.handleValueChanged(value.val, i);
|
|
73
73
|
this.unsubscribeList.push([cb, this.visualizationHandler.subscribeState(nm, cb)]);
|
|
@@ -601,7 +601,7 @@ export class BindingsHelper {
|
|
|
601
601
|
}
|
|
602
602
|
else {
|
|
603
603
|
if (s.includes('{')) {
|
|
604
|
-
let indirectSignal = new IndirectSignal(this._visualizationHandler, s, (value) => this.handleValueChanged(element, binding, value.val, valuesObject, i, signalVars, false), element, relativeSignalPath);
|
|
604
|
+
let indirectSignal = new IndirectSignal(this._visualizationHandler, s, (value) => this.handleValueChanged(element, binding, value.val, valuesObject, i, signalVars, false), element, relativeSignalPath, root);
|
|
605
605
|
if (!cleanupCalls)
|
|
606
606
|
cleanupCalls = [];
|
|
607
607
|
cleanupCalls.push(() => indirectSignal.dispose());
|
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.51",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "jochen.kuehner@gmx.de",
|