@node-projects/web-component-designer-visualization-addons 0.1.106 → 0.1.108

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.
@@ -29,14 +29,16 @@ export declare class BindingsEditor extends BaseCustomWebComponentConstructorApp
29
29
  value: any;
30
30
  }[];
31
31
  objectValueType: string;
32
- private _property;
33
- private _binding;
34
- private _bindingTarget;
35
- private _serviceContainer;
36
- private _instanceServiceContainer;
37
- private _shell;
38
- private _activeRow;
39
- private _objNmInput;
32
+ protected _property: IProperty;
33
+ protected _binding: IBinding & {
34
+ converter: Record<string, any>;
35
+ };
36
+ protected _bindingTarget: BindingTarget;
37
+ protected _serviceContainer: ServiceContainer;
38
+ protected _instanceServiceContainer: InstanceServiceContainer;
39
+ protected _shell: VisualizationShell;
40
+ protected _activeRow: number;
41
+ protected _objNmInput: HTMLInputElement;
40
42
  constructor(property: IProperty, binding: IBinding & {
41
43
  converter: Record<string, any>;
42
44
  }, bindingTarget: BindingTarget, serviceContainer: ServiceContainer, instanceServiceContainer: InstanceServiceContainer, shell: VisualizationShell);
@@ -10,12 +10,12 @@ export class BindingsEditor extends BaseCustomWebComponentConstructorAppend {
10
10
  <div class="row">
11
11
  <span style="cursor: pointer;" title="to use multiple objects, seprate them with semicolon (;). access signal objects in properties via ?propertyName, access the propertyValue via ??propertyName. Bind to signal configurations via $objectId. You could also use signals inside of a Signal Name via {name}">objects</span>
12
12
  </div>
13
- <div style="display:flex;align-items: flex-end;">
14
- <input id="objnm" class="row" value="{{?this.objectNames::change}}" style="flex-grow: 1;">
13
+ <div id="groupObjectName" style="display:flex;align-items: flex-end;">
14
+ <input id="objectName" class="row" value="{{?this.objectNames::change}}" style="flex-grow: 1;">
15
15
  <button @click="_clear" style="height: 22px">X</button>
16
16
  <button @click="_select" style="height: 22px">...</button>
17
17
  </div>
18
- <div class="row">
18
+ <div id="groupObjectType" class="row">
19
19
  <label style="white-space: nowrap; margin-right: 4px;" title="if set, the value is converted to the type before binding is applied">type :</label>
20
20
  <select class="row" value="{{?this.objectValueType}}">
21
21
  <option selected value="">ignore</option>
@@ -24,13 +24,13 @@ export class BindingsEditor extends BaseCustomWebComponentConstructorAppend {
24
24
  <option value="string">string</string>
25
25
  </select>
26
26
  </div>
27
- <div class="row">
27
+ <div id="groupBindingMode" class="row">
28
28
  <input type="checkbox" disabled="[[!this.twoWayPossible]]" checked="{{this.twoWay::change}}" @change="_refresh">
29
29
  <span>two way binding</span>
30
30
  <span css:display="[[this.twoWay ? 'inline' : 'none']]" style="margin-left: 15px">events:&nbsp;</span>
31
31
  <input css:display="[[this.twoWay ? 'inline-block' : 'none']]" title="to use multiple events, seprate them with semicolon (;)" class="row" value="{{?this.events::change}}" style="flex-grow: 1;">
32
32
  </div>
33
- <div class="row" style="position: relative">
33
+ <div id="groupinvert" class="row" style="position: relative">
34
34
  <input type="checkbox" checked="{{this.invert::change}}">
35
35
  <span>invert logic</span>
36
36
  <button css:border="[[this.historic ? 'solid lime 5px' : 'none']]" style="position: absolute; right: 1px; top: 5px; padding: 10px;" @click="showHistoric">historic</button>
@@ -193,7 +193,7 @@ export class BindingsEditor extends BaseCustomWebComponentConstructorAppend {
193
193
  constructor(property, binding, bindingTarget, serviceContainer, instanceServiceContainer, shell) {
194
194
  super();
195
195
  super._restoreCachedInititalValues();
196
- this._objNmInput = this._getDomElement('objnm');
196
+ this._objNmInput = this._getDomElement('objectName');
197
197
  this._property = property;
198
198
  this._binding = binding;
199
199
  this._bindingTarget = bindingTarget;
@@ -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,17 +1,18 @@
1
1
  import { BasePropertyEditor } from "@node-projects/web-component-designer";
2
2
  export class SignalPropertyEditor extends BasePropertyEditor {
3
3
  _ip;
4
+ _container;
4
5
  constructor(property, shell) {
5
6
  super(property);
6
- let cnt = document.createElement('div');
7
- cnt.style.display = 'flex';
7
+ this._container = document.createElement('div');
8
+ this._container.style.display = 'flex';
8
9
  this._ip = document.createElement('input');
9
10
  this._ip.onchange = (e) => this._valueChanged(this._ip.value);
10
11
  this._ip.onfocus = (e) => {
11
12
  this._ip.selectionStart = 0;
12
13
  this._ip.selectionEnd = this._ip.value?.length;
13
14
  };
14
- cnt.appendChild(this._ip);
15
+ this._container.appendChild(this._ip);
15
16
  let btn = document.createElement('button');
16
17
  btn.textContent = '...';
17
18
  btn.onclick = async () => {
@@ -30,8 +31,8 @@ export class SignalPropertyEditor extends BasePropertyEditor {
30
31
  this._valueChanged(this._ip.value);
31
32
  }
32
33
  };
33
- cnt.appendChild(btn);
34
- this.element = cnt;
34
+ this._container.appendChild(btn);
35
+ this.element = this._container;
35
36
  }
36
37
  refreshValue(valueType, value) {
37
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.106",
4
+ "version": "0.1.108",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "jochen.kuehner@gmx.de",