@node-projects/web-component-designer 0.1.79 → 0.1.80
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.
|
@@ -153,7 +153,10 @@ export class DesignItem {
|
|
|
153
153
|
}
|
|
154
154
|
set id(value) {
|
|
155
155
|
this.element.id = value;
|
|
156
|
-
this.
|
|
156
|
+
if (this.id)
|
|
157
|
+
this.setAttribute("id", value);
|
|
158
|
+
else
|
|
159
|
+
this.removeAttribute("id");
|
|
157
160
|
}
|
|
158
161
|
get isRootItem() {
|
|
159
162
|
return this.instanceServiceContainer.contentService.rootDesignItem === this;
|
|
@@ -102,6 +102,7 @@ export class PropertyGridWithHeader extends BaseCustomWebComponentLazyAppend {
|
|
|
102
102
|
e.preventDefault();
|
|
103
103
|
e.stopPropagation();
|
|
104
104
|
}
|
|
105
|
+
PropertyGridPropertyList.refreshIsSetElementAndEditorForDesignItems(this._idRect, this._propertiesService.idProperty, this._instanceServiceContainer.selectionService.selectedElements, this._propertiesService);
|
|
105
106
|
};
|
|
106
107
|
this._content.onkeydown = e => {
|
|
107
108
|
if (e.key == 'Enter') {
|
|
@@ -113,13 +114,18 @@ export class PropertyGridWithHeader extends BaseCustomWebComponentLazyAppend {
|
|
|
113
114
|
e.preventDefault();
|
|
114
115
|
e.stopPropagation();
|
|
115
116
|
}
|
|
117
|
+
PropertyGridPropertyList.refreshIsSetElementAndEditorForDesignItems(this._contentRect, this._propertiesService.contentProperty, this._instanceServiceContainer.selectionService.selectedElements, this._propertiesService);
|
|
118
|
+
PropertyGridPropertyList.refreshIsSetElementAndEditorForDesignItems(this._innerRect, this._propertiesService.innerHtmlProperty, this._instanceServiceContainer.selectionService.selectedElements, this._propertiesService);
|
|
116
119
|
};
|
|
117
120
|
let pSel;
|
|
118
121
|
this._id.onfocus = e => {
|
|
119
122
|
pSel = this._instanceServiceContainer.selectionService.primarySelection;
|
|
120
123
|
};
|
|
121
124
|
this._id.onblur = e => {
|
|
122
|
-
pSel
|
|
125
|
+
if (pSel)
|
|
126
|
+
pSel.id = this._id.value;
|
|
127
|
+
pSel = null;
|
|
128
|
+
PropertyGridPropertyList.refreshIsSetElementAndEditorForDesignItems(this._idRect, this._propertiesService.idProperty, this._instanceServiceContainer.selectionService.selectedElements, this._propertiesService);
|
|
123
129
|
};
|
|
124
130
|
}
|
|
125
131
|
set serviceContainer(value) {
|
|
@@ -145,6 +151,7 @@ export class PropertyGridWithHeader extends BaseCustomWebComponentLazyAppend {
|
|
|
145
151
|
this._type.value = this._instanceServiceContainer.selectionService.primarySelection?.node?.nodeName ?? '';
|
|
146
152
|
}
|
|
147
153
|
this._type.title = this._type.value;
|
|
154
|
+
this._id.blur();
|
|
148
155
|
this._id.value = this._instanceServiceContainer.selectionService.primarySelection?.id ?? '';
|
|
149
156
|
if (this._instanceServiceContainer.selectionService.primarySelection?.element?.nodeType != NodeType.Element) {
|
|
150
157
|
this._content.value = this._instanceServiceContainer.selectionService.primarySelection?.content ?? '';
|