@node-projects/web-component-designer-widgets-wunderbaum 0.1.27 → 0.1.29
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,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentConstructorAppend, TypedEvent } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
import { IBindableObject, ServiceContainer } from '@node-projects/web-component-designer';
|
|
2
|
+
import { IBindableObject, InstanceServiceContainer, ServiceContainer } from '@node-projects/web-component-designer';
|
|
3
3
|
export declare class BindableObjectsBrowser extends BaseCustomWebComponentConstructorAppend {
|
|
4
4
|
private _treeDiv;
|
|
5
5
|
private _tree;
|
|
@@ -8,5 +8,6 @@ export declare class BindableObjectsBrowser extends BaseCustomWebComponentConstr
|
|
|
8
8
|
static readonly style: CSSStyleSheet;
|
|
9
9
|
static template: HTMLTemplateElement;
|
|
10
10
|
constructor();
|
|
11
|
-
|
|
11
|
+
private _instanceServiceContainer;
|
|
12
|
+
initialize(serviceContainer: ServiceContainer, instanceServiceContainer: InstanceServiceContainer): Promise<void>;
|
|
12
13
|
}
|
|
@@ -31,7 +31,7 @@ export class BindableObjectsBrowser extends BaseCustomWebComponentConstructorApp
|
|
|
31
31
|
if (bindable?.children)
|
|
32
32
|
children = bindable.children;
|
|
33
33
|
else
|
|
34
|
-
children = await service.getBindableObjects(bindable);
|
|
34
|
+
children = await service.getBindableObjects(bindable, this._instanceServiceContainer);
|
|
35
35
|
resolve(children.map(x => ({
|
|
36
36
|
title: x.name,
|
|
37
37
|
service,
|
|
@@ -65,11 +65,15 @@ export class BindableObjectsBrowser extends BaseCustomWebComponentConstructorApp
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
_instanceServiceContainer;
|
|
69
|
+
async initialize(serviceContainer, instanceServiceContainer) {
|
|
70
|
+
this._instanceServiceContainer = instanceServiceContainer;
|
|
69
71
|
let rootNode = this._tree.root;
|
|
70
72
|
rootNode.removeChildren();
|
|
71
73
|
const services = serviceContainer.bindableObjectsServices;
|
|
72
74
|
for (const s of services) {
|
|
75
|
+
if (!s.hasObjectsForInstanceServiceContainer(this._instanceServiceContainer))
|
|
76
|
+
continue;
|
|
73
77
|
this._tree.root.addChildren({
|
|
74
78
|
title: s.name,
|
|
75
79
|
lazy: true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css, html, BaseCustomWebComponentConstructorAppend, cssFromString } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
import { NodeType, assetsPath, ContextMenu, switchContainer, DomConverter, ForceCssContextMenu } from '@node-projects/web-component-designer';
|
|
2
|
+
import { NodeType, assetsPath, ContextMenu, switchContainer, DomConverter, ForceCssContextMenu, hasCommandKey } from '@node-projects/web-component-designer';
|
|
3
3
|
import { Wunderbaum } from 'wunderbaum';
|
|
4
4
|
import { defaultOptions, defaultStyle } from '../WunderbaumOptions.js';
|
|
5
5
|
//@ts-ignore
|
|
@@ -172,7 +172,7 @@ export class TreeViewExtended extends BaseCustomWebComponentConstructorAppend {
|
|
|
172
172
|
setTimeout(() => {
|
|
173
173
|
this.selectedFromTree = false;
|
|
174
174
|
}, 50);
|
|
175
|
-
if (e.event
|
|
175
|
+
if (hasCommandKey(e.event)) {
|
|
176
176
|
const sel = [...designItem.instanceServiceContainer.selectionService.selectedElements];
|
|
177
177
|
const idx = sel.indexOf(designItem);
|
|
178
178
|
if (idx >= 0) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "web-component-designer addon: Widgets using wunderbaum",
|
|
3
3
|
"name": "@node-projects/web-component-designer-widgets-wunderbaum",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.29",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "jochen.kuehner@gmx.de",
|