@node-projects/web-component-designer 0.1.118 → 0.1.120

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.
@@ -163,7 +163,7 @@ export class AbstractPropertiesService {
163
163
  let bindings = AbstractPropertiesService._bindingsCache.get(designItem);
164
164
  if (!bindings) {
165
165
  const services = designItem.serviceContainer.getServices('bindingService');
166
- const bindings = [];
166
+ bindings = [];
167
167
  for (const s of services) {
168
168
  const bs = s.getBindings(designItem);
169
169
  if (bs && bs.length > 0) {
@@ -218,10 +218,7 @@ export class AbstractPropertiesService {
218
218
  return null;
219
219
  }
220
220
  getBinding(designItems, property) {
221
- //TODO: optimize perf, do not call bindings service for each property.
222
- const bindings = designItems[0].serviceContainer.forSomeServicesTillResult('bindingService', (s) => {
223
- return s.getBindings(designItems[0]);
224
- });
221
+ const bindings = AbstractPropertiesService.getOrBuildCachedBindings(designItems[0]);
225
222
  if (bindings != null) {
226
223
  if (property.propertyType == PropertyType.cssValue) {
227
224
  return bindings.find(x => (x.target == BindingTarget.css || x.target == BindingTarget.cssvar) && x.targetName == property.name);
@@ -85,10 +85,7 @@ export class AttributesPropertiesService {
85
85
  return null;
86
86
  }
87
87
  getBinding(designItems, property) {
88
- //TODO: optimize perf, do not call bindings service for each property.
89
- const bindings = designItems[0].serviceContainer.forSomeServicesTillResult('bindingService', (s) => {
90
- return s.getBindings(designItems[0]);
91
- });
88
+ const bindings = AbstractPropertiesService.getOrBuildCachedBindings(designItems[0]);
92
89
  return bindings.find(x => (x.target == BindingTarget.property || x.target == BindingTarget.attribute) && x.targetName == property.name);
93
90
  }
94
91
  getUnsetValue(designItems, property) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "A WYSIWYG designer webcomponent for html components",
3
3
  "name": "@node-projects/web-component-designer",
4
- "version": "0.1.118",
4
+ "version": "0.1.120",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "jochen.kuehner@gmx.de",