@node-projects/web-component-designer-visualization-addons 0.1.12 → 0.1.13
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.
|
@@ -17,5 +17,5 @@ export declare class ScriptSystem {
|
|
|
17
17
|
root: HTMLElement;
|
|
18
18
|
}): Promise<any>;
|
|
19
19
|
static extractPart(obj: any, propertyPath: string): any;
|
|
20
|
-
assignAllScripts(source: string, javascriptCode: string, shadowRoot: ShadowRoot, instance: HTMLElement): Promise<VisualisationElementScript>;
|
|
20
|
+
assignAllScripts(source: string, javascriptCode: string, shadowRoot: ShadowRoot, instance: HTMLElement, assignExternalScript?: (element: Element, event: string, scriptData: any) => void): Promise<VisualisationElementScript>;
|
|
21
21
|
}
|
|
@@ -158,7 +158,7 @@ export class ScriptSystem {
|
|
|
158
158
|
}
|
|
159
159
|
return retVal;
|
|
160
160
|
}
|
|
161
|
-
async assignAllScripts(source, javascriptCode, shadowRoot, instance) {
|
|
161
|
+
async assignAllScripts(source, javascriptCode, shadowRoot, instance, assignExternalScript) {
|
|
162
162
|
const allElements = shadowRoot.querySelectorAll('*');
|
|
163
163
|
let jsObject = null;
|
|
164
164
|
if (javascriptCode) {
|
|
@@ -192,6 +192,10 @@ export class ScriptSystem {
|
|
|
192
192
|
compiledFunc(evt, shadowRoot);
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
+
else {
|
|
196
|
+
if (assignExternalScript)
|
|
197
|
+
assignExternalScript(e, evtName, scriptObj);
|
|
198
|
+
}
|
|
195
199
|
}
|
|
196
200
|
else {
|
|
197
201
|
e.addEventListener(evtName, (evt) => {
|
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.13",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "jochen.kuehner@gmx.de",
|