@node-projects/web-component-designer-visualization-addons 0.1.105 → 0.1.107
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,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentConstructorAppend, html, css } from '@node-projects/base-custom-webcomponent';
|
|
2
2
|
import { BindingMode, BindingTarget } from '@node-projects/web-component-designer';
|
|
3
|
-
import { BindableObjectsBrowser } from "@node-projects/web-component-designer-widgets-wunderbaum";
|
|
4
3
|
import { BindingsEditorHistoric } from './BindingsEditorHistoric.js';
|
|
5
4
|
export class BindingsEditor extends BaseCustomWebComponentConstructorAppend {
|
|
6
5
|
static template = html `
|
|
@@ -261,7 +260,7 @@ export class BindingsEditor extends BaseCustomWebComponentConstructorAppend {
|
|
|
261
260
|
});
|
|
262
261
|
}
|
|
263
262
|
async _select() {
|
|
264
|
-
let b =
|
|
263
|
+
let b = this._shell.createBindableObjectBrowser();
|
|
265
264
|
b.initialize(this._serviceContainer, this._instanceServiceContainer, 'binding');
|
|
266
265
|
b.title = 'select signal...';
|
|
267
266
|
const abortController = new AbortController();
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PropertyGrid } from '@node-projects/propertygrid.webcomponent';
|
|
2
|
-
import { BindableObjectsBrowser } from '@node-projects/web-component-designer-widgets-wunderbaum';
|
|
3
2
|
import { CodeViewMonaco } from '@node-projects/web-component-designer-codeview-monaco';
|
|
4
3
|
export class VisualizationPropertyGrid extends PropertyGrid {
|
|
5
4
|
serviceContainer;
|
|
@@ -49,7 +48,7 @@ export class VisualizationPropertyGrid extends PropertyGrid {
|
|
|
49
48
|
let btn = document.createElement('button');
|
|
50
49
|
btn.textContent = '...';
|
|
51
50
|
btn.onclick = async () => {
|
|
52
|
-
let b =
|
|
51
|
+
let b = this.visualizationShell.createBindableObjectBrowser();
|
|
53
52
|
b.initialize(this.serviceContainer, this.instanceServiceContainer, this.bindableObjectsTarget);
|
|
54
53
|
b.title = 'select signal...';
|
|
55
54
|
const abortController = new AbortController();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IBindableObjectsBrowser } from "@node-projects/web-component-designer";
|
|
1
2
|
export interface VisualizationShell {
|
|
2
3
|
openConfirmation(element: HTMLElement, options: {
|
|
3
4
|
x?: number;
|
|
@@ -10,4 +11,5 @@ export interface VisualizationShell {
|
|
|
10
11
|
confirmText?: string;
|
|
11
12
|
cancelText?: string;
|
|
12
13
|
}): Promise<boolean>;
|
|
14
|
+
createBindableObjectBrowser: () => IBindableObjectsBrowser;
|
|
13
15
|
}
|
|
@@ -2,6 +2,7 @@ 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
|
+
protected _container: HTMLDivElement;
|
|
5
6
|
constructor(property: IProperty, shell: VisualizationShell);
|
|
6
7
|
refreshValue(valueType: ValueType, value: any): void;
|
|
7
8
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { BasePropertyEditor } from "@node-projects/web-component-designer";
|
|
2
|
-
import { BindableObjectsBrowser } from "@node-projects/web-component-designer-widgets-wunderbaum";
|
|
3
2
|
export class SignalPropertyEditor extends BasePropertyEditor {
|
|
4
3
|
_ip;
|
|
4
|
+
_container;
|
|
5
5
|
constructor(property, shell) {
|
|
6
6
|
super(property);
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
this._container = document.createElement('div');
|
|
8
|
+
this._container.style.display = 'flex';
|
|
9
9
|
this._ip = document.createElement('input');
|
|
10
10
|
this._ip.onchange = (e) => this._valueChanged(this._ip.value);
|
|
11
11
|
this._ip.onfocus = (e) => {
|
|
12
12
|
this._ip.selectionStart = 0;
|
|
13
13
|
this._ip.selectionEnd = this._ip.value?.length;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
this._container.appendChild(this._ip);
|
|
16
16
|
let btn = document.createElement('button');
|
|
17
17
|
btn.textContent = '...';
|
|
18
18
|
btn.onclick = async () => {
|
|
19
|
-
let b =
|
|
19
|
+
let b = shell.createBindableObjectBrowser();
|
|
20
20
|
b.initialize(this.designItems[0].serviceContainer, this.designItems[0].instanceServiceContainer, 'property');
|
|
21
21
|
b.title = 'select signal...';
|
|
22
22
|
const abortController = new AbortController();
|
|
@@ -31,8 +31,8 @@ export class SignalPropertyEditor extends BasePropertyEditor {
|
|
|
31
31
|
this._valueChanged(this._ip.value);
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
this.element =
|
|
34
|
+
this._container.appendChild(btn);
|
|
35
|
+
this.element = this._container;
|
|
36
36
|
}
|
|
37
37
|
refreshValue(valueType, value) {
|
|
38
38
|
if (value == null)
|
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.107",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "jochen.kuehner@gmx.de",
|