@node-projects/web-component-designer-visualization-addons 0.1.109 → 0.1.111
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.
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { VisualizationBinding } from "../interfaces/VisualizationBinding.js";
|
|
2
2
|
import { State, VisualizationHandler } from "../interfaces/VisualizationHandler.js";
|
|
3
3
|
import { BindingTarget } from "@node-projects/web-component-designer/dist/elements/item/BindingTarget.js";
|
|
4
|
+
export type SpecialValueHandler = {
|
|
5
|
+
valueProvider: (propertyName: string) => any;
|
|
6
|
+
valueChangedCallbacks: Map<string, (() => void)[]>;
|
|
7
|
+
};
|
|
4
8
|
export declare const bindingPrefixProperty = "bind-prop:";
|
|
5
9
|
export declare const bindingPrefixAttribute = "bind-attr:";
|
|
6
10
|
export declare const bindingPrefixClass = "bind-class:";
|
|
@@ -44,15 +48,9 @@ export declare class BindingsHelper {
|
|
|
44
48
|
serializeBinding(element: Element, targetName: string, binding: VisualizationBinding): [name: string, value: string];
|
|
45
49
|
getBindingAttributeName(element: Element, propertyName: string, propertyTarget: BindingTarget): string;
|
|
46
50
|
getBindings(element: Element): Generator<namedBinding, void, unknown>;
|
|
47
|
-
applyAllBindings(rootElement: ParentNode, relativeSignalPath: string, root: HTMLElement, specialValueHandler?:
|
|
48
|
-
valueProvider: (propertyName: string) => any;
|
|
49
|
-
valueChangedCallbacks: Map<string, (() => void)[]>;
|
|
50
|
-
}): (() => void)[];
|
|
51
|
+
applyAllBindings(rootElement: ParentNode, relativeSignalPath: string, root: HTMLElement, specialValueHandler?: SpecialValueHandler): (() => void)[];
|
|
51
52
|
parseCssBindings(sheet: string, element: Element, relativeSignalPath: string, root: HTMLElement): Promise<[stylesheet: CSSStyleSheet, unsub: (() => void)[]]>;
|
|
52
|
-
parseCssBinding(value: string, element: Element, relativeSignalPath: string, root: HTMLElement, specialValueHandler?:
|
|
53
|
-
valueProvider: (propertyName: string) => any;
|
|
54
|
-
valueChangedCallbacks: Map<string, (() => void)[]>;
|
|
55
|
-
}): [name: string, unsub: (() => void)[]];
|
|
53
|
+
parseCssBinding(value: string, element: Element, relativeSignalPath: string, root: HTMLElement, specialValueHandler?: SpecialValueHandler): [name: string, unsub: (() => void)[]];
|
|
56
54
|
/**
|
|
57
55
|
* ? = bind to signals in properties
|
|
58
56
|
* ?? = binding to a property
|
|
@@ -64,10 +62,7 @@ export declare class BindingsHelper {
|
|
|
64
62
|
* @param root
|
|
65
63
|
* @returns
|
|
66
64
|
*/
|
|
67
|
-
applyBinding(element: Element, binding: namedBinding, relativeSignalPath: string, root: HTMLElement, specialValueHandler?:
|
|
68
|
-
valueProvider: (propertyName: string) => any;
|
|
69
|
-
valueChangedCallbacks: Map<string, (() => void)[]>;
|
|
70
|
-
}): () => void;
|
|
65
|
+
applyBinding(element: Element, binding: namedBinding, relativeSignalPath: string, root: HTMLElement, specialValueHandler?: SpecialValueHandler): () => void;
|
|
71
66
|
private addTwoWayBinding;
|
|
72
67
|
private static parseValueWithType;
|
|
73
68
|
handleValueChanged(element: Element, binding: namedBinding, value: any, valuesObject: any[], index: number, signalVarNames: string[], noParse: boolean, relativeSignalPath: string): void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TypedEvent, cssFromString } from "@node-projects/base-custom-webcomponent";
|
|
2
2
|
import { BindingTarget } from "@node-projects/web-component-designer/dist/elements/item/BindingTarget.js";
|
|
3
3
|
import { PropertiesHelper } from "@node-projects/web-component-designer/dist/elements/services/propertiesService/services/PropertiesHelper.js";
|
|
4
|
-
//;,[ are not allowed in bindings, so they could be used for a short form...
|
|
5
4
|
export const bindingPrefixProperty = 'bind-prop:';
|
|
6
5
|
export const bindingPrefixAttribute = 'bind-attr:';
|
|
7
6
|
export const bindingPrefixClass = 'bind-class:';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface VisualisationElementScript {
|
|
2
|
-
init?(instance: HTMLElement): any;
|
|
3
|
-
connectedCallback?(instance: HTMLElement): any;
|
|
4
|
-
disconnectedCallback?(instance: HTMLElement): any;
|
|
2
|
+
init?(instance: HTMLElement, shadowRoot: ShadowRoot): any;
|
|
3
|
+
connectedCallback?(instance: HTMLElement, shadowRoot: ShadowRoot): any;
|
|
4
|
+
disconnectedCallback?(instance: HTMLElement, shadowRoot: ShadowRoot): any;
|
|
5
5
|
}
|
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.111",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "jochen.kuehner@gmx.de",
|