@node-projects/web-component-designer 0.0.173 → 0.0.174
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.
|
@@ -20,9 +20,16 @@ export class DesignItem {
|
|
|
20
20
|
appliedDesignerExtensions = new Map();
|
|
21
21
|
shouldAppliedDesignerExtensions = new Map();
|
|
22
22
|
async clone() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
try {
|
|
24
|
+
const html = DomConverter.ConvertToString([this], null, false);
|
|
25
|
+
const parsed = await this.serviceContainer.htmlParserService.parse(html, this.serviceContainer, this.instanceServiceContainer);
|
|
26
|
+
return parsed[0];
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
//TODO: clone service for design item, maybe refactor copy&paste to use this also...
|
|
30
|
+
console.warn("could not clone design item.", this);
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
26
33
|
}
|
|
27
34
|
replaceNode(newNode) {
|
|
28
35
|
DesignItem._designItemMap.delete(this.node);
|