@node-projects/web-component-designer-visualization-addons 0.1.77 → 0.1.78
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/components/BindingsEditor.d.ts +3 -2
- package/dist/components/BindingsEditor.js +10 -2
- package/dist/components/EventAssignment.js +1 -0
- package/dist/components/SimpleScriptEditor.d.ts +2 -1
- package/dist/components/SimpleScriptEditor.js +3 -0
- package/dist/components/VisualizationPropertyGrid.d.ts +3 -1
- package/dist/components/VisualizationPropertyGrid.js +5 -1
- package/dist/services/SignalPropertyEditor.d.ts +1 -1
- package/dist/services/SignalPropertyEditor.js +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentConstructorAppend } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
import { BindingTarget, IBinding, IProperty, ServiceContainer } from '@node-projects/web-component-designer';
|
|
2
|
+
import { BindingTarget, IBinding, InstanceServiceContainer, IProperty, ServiceContainer } from '@node-projects/web-component-designer';
|
|
3
3
|
import { VisualizationShell } from '../interfaces/VisualizationShell.js';
|
|
4
4
|
export declare class BindingsEditor extends BaseCustomWebComponentConstructorAppend {
|
|
5
5
|
static readonly template: HTMLTemplateElement;
|
|
@@ -33,12 +33,13 @@ export declare class BindingsEditor extends BaseCustomWebComponentConstructorApp
|
|
|
33
33
|
private _binding;
|
|
34
34
|
private _bindingTarget;
|
|
35
35
|
private _serviceContainer;
|
|
36
|
+
private _instanceServiceContainer;
|
|
36
37
|
private _shell;
|
|
37
38
|
private _activeRow;
|
|
38
39
|
private _objNmInput;
|
|
39
40
|
constructor(property: IProperty, binding: IBinding & {
|
|
40
41
|
converter: Record<string, any>;
|
|
41
|
-
}, bindingTarget: BindingTarget, serviceContainer: ServiceContainer, shell: VisualizationShell);
|
|
42
|
+
}, bindingTarget: BindingTarget, serviceContainer: ServiceContainer, instanceServiceContainer: InstanceServiceContainer, shell: VisualizationShell);
|
|
42
43
|
ready(): void;
|
|
43
44
|
_focusRow(index: number): void;
|
|
44
45
|
_updatefocusedRow(): void;
|
|
@@ -187,10 +187,11 @@ export class BindingsEditor extends BaseCustomWebComponentConstructorAppend {
|
|
|
187
187
|
_binding;
|
|
188
188
|
_bindingTarget;
|
|
189
189
|
_serviceContainer;
|
|
190
|
+
_instanceServiceContainer;
|
|
190
191
|
_shell;
|
|
191
192
|
_activeRow = -1;
|
|
192
193
|
_objNmInput;
|
|
193
|
-
constructor(property, binding, bindingTarget, serviceContainer, shell) {
|
|
194
|
+
constructor(property, binding, bindingTarget, serviceContainer, instanceServiceContainer, shell) {
|
|
194
195
|
super();
|
|
195
196
|
super._restoreCachedInititalValues();
|
|
196
197
|
this._objNmInput = this._getDomElement('objnm');
|
|
@@ -198,6 +199,7 @@ export class BindingsEditor extends BaseCustomWebComponentConstructorAppend {
|
|
|
198
199
|
this._binding = binding;
|
|
199
200
|
this._bindingTarget = bindingTarget;
|
|
200
201
|
this._serviceContainer = serviceContainer;
|
|
202
|
+
this._instanceServiceContainer = instanceServiceContainer;
|
|
201
203
|
this._shell = shell;
|
|
202
204
|
}
|
|
203
205
|
ready() {
|
|
@@ -260,13 +262,19 @@ export class BindingsEditor extends BaseCustomWebComponentConstructorAppend {
|
|
|
260
262
|
}
|
|
261
263
|
async _select() {
|
|
262
264
|
let b = new BindableObjectsBrowser();
|
|
263
|
-
b.initialize(this._serviceContainer);
|
|
265
|
+
b.initialize(this._serviceContainer, this._instanceServiceContainer);
|
|
264
266
|
b.title = 'select signal...';
|
|
265
267
|
const abortController = new AbortController();
|
|
266
268
|
b.objectDoubleclicked.on(() => {
|
|
267
269
|
abortController.abort();
|
|
268
270
|
if (this.objectNames != '')
|
|
269
271
|
this.objectNames += ';';
|
|
272
|
+
if (b.selectedObject.specialType == 'signalProperty') {
|
|
273
|
+
this.objectNames += '?';
|
|
274
|
+
}
|
|
275
|
+
else if (b.selectedObject.bindabletype === 'property') {
|
|
276
|
+
this.objectNames += '??';
|
|
277
|
+
}
|
|
270
278
|
this.objectNames += b.selectedObject.fullName;
|
|
271
279
|
this._bindingsRefresh();
|
|
272
280
|
});
|
|
@@ -349,6 +349,7 @@ export class EventAssignment extends BaseCustomWebComponentConstructorAppend {
|
|
|
349
349
|
}
|
|
350
350
|
let sc = new SimpleScriptEditor();
|
|
351
351
|
sc.serviceContainer = selectedItem.serviceContainer;
|
|
352
|
+
sc.instanceServiceContainer = selectedItem.instanceServiceContainer;
|
|
352
353
|
sc.scriptCommandsTypeInfo = this._scriptCommandsTypeInfo;
|
|
353
354
|
sc.propertiesTypeInfo = this._propertiesTypeInfo;
|
|
354
355
|
sc.visualizationShell = this._visualizationShell;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseCustomWebComponentConstructorAppend } from "@node-projects/base-custom-webcomponent";
|
|
2
2
|
import { Script } from "../scripting/Script.js";
|
|
3
|
-
import { ServiceContainer } from "@node-projects/web-component-designer";
|
|
3
|
+
import { InstanceServiceContainer, ServiceContainer } from "@node-projects/web-component-designer";
|
|
4
4
|
import { VisualizationHandler } from "../interfaces/VisualizationHandler.js";
|
|
5
5
|
import { VisualizationShell } from "../interfaces/VisualizationShell.js";
|
|
6
6
|
import '@node-projects/splitview.webcomponent';
|
|
@@ -9,6 +9,7 @@ export declare class SimpleScriptEditor extends BaseCustomWebComponentConstructo
|
|
|
9
9
|
static readonly template: HTMLTemplateElement;
|
|
10
10
|
static readonly is = "node-projects-visualization-simple-script-editor";
|
|
11
11
|
serviceContainer: ServiceContainer;
|
|
12
|
+
instanceServiceContainer: InstanceServiceContainer;
|
|
12
13
|
visualizationHandler: VisualizationHandler;
|
|
13
14
|
visualizationShell: VisualizationShell;
|
|
14
15
|
scriptCommandsTypeInfo: any;
|
|
@@ -55,6 +55,7 @@ export class SimpleScriptEditor extends BaseCustomWebComponentConstructorAppend
|
|
|
55
55
|
`;
|
|
56
56
|
static is = 'node-projects-visualization-simple-script-editor';
|
|
57
57
|
serviceContainer;
|
|
58
|
+
instanceServiceContainer;
|
|
58
59
|
visualizationHandler;
|
|
59
60
|
visualizationShell;
|
|
60
61
|
scriptCommandsTypeInfo;
|
|
@@ -82,6 +83,7 @@ export class SimpleScriptEditor extends BaseCustomWebComponentConstructorAppend
|
|
|
82
83
|
pg.visualizationHandler = this.visualizationHandler;
|
|
83
84
|
pg.visualizationShell = this.visualizationShell;
|
|
84
85
|
pg.serviceContainer = this.serviceContainer;
|
|
86
|
+
pg.instanceServiceContainer = this.instanceServiceContainer;
|
|
85
87
|
pg.getTypeInfo = (obj, type) => typeInfoFromJsonSchema(this.propertiesTypeInfo, obj, type);
|
|
86
88
|
pg.showHead = false;
|
|
87
89
|
pg.typeName = 'IScriptMultiplexValue';
|
|
@@ -99,6 +101,7 @@ export class SimpleScriptEditor extends BaseCustomWebComponentConstructorAppend
|
|
|
99
101
|
this._propertygrid.visualizationHandler = this.visualizationHandler;
|
|
100
102
|
this._propertygrid.visualizationShell = this.visualizationShell;
|
|
101
103
|
this._propertygrid.serviceContainer = this.serviceContainer;
|
|
104
|
+
this._propertygrid.instanceServiceContainer = this.instanceServiceContainer;
|
|
102
105
|
this._propertygrid.getTypeInfo = (obj, type) => typeInfoFromJsonSchema(this.scriptCommandsTypeInfo, obj, type);
|
|
103
106
|
this._propertygrid.getSpecialEditorForType = async (property, currentValue, propertyPath, wbRender, additionalInfo) => {
|
|
104
107
|
//@ts-ignore
|
|
@@ -2,10 +2,12 @@ import { IProperty, PropertyGrid } from '@node-projects/propertygrid.webcomponen
|
|
|
2
2
|
import { WbRenderEventType } from "types";
|
|
3
3
|
import { VisualizationHandler } from '../interfaces/VisualizationHandler';
|
|
4
4
|
import { VisualizationShell } from '../interfaces/VisualizationShell';
|
|
5
|
-
import { ServiceContainer } from '@node-projects/web-component-designer';
|
|
5
|
+
import { InstanceServiceContainer, ServiceContainer } from '@node-projects/web-component-designer';
|
|
6
6
|
export declare class VisualizationPropertyGrid extends PropertyGrid {
|
|
7
7
|
serviceContainer: ServiceContainer;
|
|
8
|
+
instanceServiceContainer: InstanceServiceContainer;
|
|
8
9
|
visualizationHandler: VisualizationHandler;
|
|
9
10
|
visualizationShell: VisualizationShell;
|
|
11
|
+
constructor();
|
|
10
12
|
getEditorForType(property: IProperty, currentValue: any, propertyPath: string, wbRender: WbRenderEventType, additionalInfo?: any): Promise<HTMLElement>;
|
|
11
13
|
}
|
|
@@ -3,8 +3,12 @@ import { BindableObjectsBrowser } from '@node-projects/web-component-designer-wi
|
|
|
3
3
|
import { CodeViewMonaco } from '@node-projects/web-component-designer-codeview-monaco';
|
|
4
4
|
export class VisualizationPropertyGrid extends PropertyGrid {
|
|
5
5
|
serviceContainer;
|
|
6
|
+
instanceServiceContainer;
|
|
6
7
|
visualizationHandler;
|
|
7
8
|
visualizationShell;
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
}
|
|
8
12
|
async getEditorForType(property, currentValue, propertyPath, wbRender, additionalInfo) {
|
|
9
13
|
if (this.getSpecialEditorForType) {
|
|
10
14
|
let edt = await this.getSpecialEditorForType(property, currentValue, propertyPath, wbRender, additionalInfo);
|
|
@@ -44,7 +48,7 @@ export class VisualizationPropertyGrid extends PropertyGrid {
|
|
|
44
48
|
btn.textContent = '...';
|
|
45
49
|
btn.onclick = async () => {
|
|
46
50
|
let b = new BindableObjectsBrowser();
|
|
47
|
-
b.initialize(this.serviceContainer);
|
|
51
|
+
b.initialize(this.serviceContainer, this.instanceServiceContainer);
|
|
48
52
|
b.title = 'select signal...';
|
|
49
53
|
const abortController = new AbortController();
|
|
50
54
|
b.objectDoubleclicked.on(() => {
|
|
@@ -2,6 +2,6 @@ import { BasePropertyEditor, IProperty, ValueType } from "@node-projects/web-com
|
|
|
2
2
|
import { VisualizationShell } from "../interfaces/VisualizationShell.js";
|
|
3
3
|
export declare class SignalPropertyEditor extends BasePropertyEditor<HTMLElement> {
|
|
4
4
|
_ip: HTMLInputElement;
|
|
5
|
-
constructor(property: IProperty, shell: VisualizationShell);
|
|
5
|
+
constructor(property: IProperty, shell: VisualizationShell, context: any);
|
|
6
6
|
refreshValue(valueType: ValueType, value: any): void;
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import { BasePropertyEditor } from "@node-projects/web-component-designer";
|
|
|
2
2
|
import { BindableObjectsBrowser } from "@node-projects/web-component-designer-widgets-wunderbaum";
|
|
3
3
|
export class SignalPropertyEditor extends BasePropertyEditor {
|
|
4
4
|
_ip;
|
|
5
|
-
constructor(property, shell) {
|
|
5
|
+
constructor(property, shell, context) {
|
|
6
6
|
super(property);
|
|
7
7
|
let cnt = document.createElement('div');
|
|
8
8
|
cnt.style.display = 'flex';
|
|
@@ -17,7 +17,7 @@ export class SignalPropertyEditor extends BasePropertyEditor {
|
|
|
17
17
|
btn.textContent = '...';
|
|
18
18
|
btn.onclick = async () => {
|
|
19
19
|
let b = new BindableObjectsBrowser();
|
|
20
|
-
b.initialize(this.designItems[0].serviceContainer);
|
|
20
|
+
b.initialize(this.designItems[0].serviceContainer, context);
|
|
21
21
|
b.title = 'select signal...';
|
|
22
22
|
const abortController = new AbortController();
|
|
23
23
|
b.objectDoubleclicked.on(() => {
|
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.78",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "jochen.kuehner@gmx.de",
|