@node-projects/web-component-designer-htmlparserservice-lit-element 0.1.4 → 1.0.0

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.
@@ -23,7 +23,7 @@ export class LitElementParserService {
23
23
  let element;
24
24
  let manualCreatedElement = false;
25
25
  if (!namespace)
26
- element = newElementFromString('<' + item.rawTagName + ' ' + item.rawAttrs + '></' + item.rawTagName + '>', instanceServiceContainer.designerCanvas.rootDesignItem.document); // some custom elements only parse attributes during constructor call
26
+ element = newElementFromString('<' + item.rawTagName + ' ' + item.rawAttrs + '></' + item.rawTagName + '>', instanceServiceContainer.rootDesignItem.document); // some custom elements only parse attributes during constructor call
27
27
  if (!element) {
28
28
  if (namespace)
29
29
  element = document.createElementNS(namespace, item.rawTagName);
@@ -49,9 +49,9 @@ export class LitElementParserService {
49
49
  let styleParser = new CssAttributeParser();
50
50
  styleParser.parse(style);
51
51
  for (let s of styleParser.entries) {
52
- designItem._withoutUndoSetStyle(s.name, s.value);
52
+ designItem._withoutUndoSetStyle(s.name, s.value, s.important);
53
53
  if (manualCreatedElement) {
54
- element.style[s.name] = s.value;
54
+ element.style.setProperty(s.name, s.value, s.important ? 'important' : '');
55
55
  }
56
56
  }
57
57
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "web-component-designer addon: Parser Service for Templates inside of BaseCustomWebcomponent",
3
3
  "name": "@node-projects/web-component-designer-htmlparserservice-lit-element",
4
- "version": "0.1.4",
4
+ "version": "1.0.0",
5
5
  "type": "module",
6
6
  "main": "./dist/service/htmlParserService/LitElementParserService.js",
7
7
  "author": "jochen.kuehner@gmx.de",
@@ -13,8 +13,8 @@
13
13
  "prepublishOnly": "npm run build"
14
14
  },
15
15
  "dependencies": {
16
- "esprima-next": "^5.8.4",
17
- "@node-projects/web-component-designer": ">=0.1.1"
16
+ "esprima-next": "^6.0.3",
17
+ "@node-projects/web-component-designer": "1.0.0"
18
18
  },
19
19
  "repository": {
20
20
  "type": "git",