@salesforce/ui-design-mode 11.35.5 → 11.36.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.
package/dist/protocol/version.js
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
];
|
|
43
43
|
|
|
44
44
|
// src/protocol/version.ts
|
|
45
|
-
var UI_DESIGN_MODE_VERSION = "11.
|
|
45
|
+
var UI_DESIGN_MODE_VERSION = "11.36.0";
|
|
46
46
|
|
|
47
47
|
// src/runtime/interactions/utils/sourceUtils.ts
|
|
48
48
|
function parseRequiredInt(value) {
|
|
@@ -150,9 +150,7 @@
|
|
|
150
150
|
element.addEventListener("input", this.boundHandleInput);
|
|
151
151
|
}
|
|
152
152
|
removeEditable(element) {
|
|
153
|
-
|
|
154
|
-
element.contentEditable = "false";
|
|
155
|
-
}
|
|
153
|
+
const originalText = element.dataset.originalText;
|
|
156
154
|
element.removeEventListener("blur", this.boundHandleBlur);
|
|
157
155
|
element.removeEventListener("keydown", this.boundHandleKeydown);
|
|
158
156
|
element.removeEventListener("input", this.boundHandleInput);
|
|
@@ -160,6 +158,15 @@
|
|
|
160
158
|
delete el.dataset.originalText;
|
|
161
159
|
}
|
|
162
160
|
this.editableGroup = [];
|
|
161
|
+
if (element.contentEditable === "true") {
|
|
162
|
+
element.contentEditable = "false";
|
|
163
|
+
}
|
|
164
|
+
if (originalText !== void 0) {
|
|
165
|
+
const newText = element.textContent ?? "";
|
|
166
|
+
if (newText !== originalText) {
|
|
167
|
+
this.communicationManager?.notifyTextChange(element, originalText, newText);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
163
170
|
}
|
|
164
171
|
_isTextElement(element) {
|
|
165
172
|
return TEXT_TAGS.includes(element.tagName) && (element.textContent ?? "").trim().length > 0 && element.dataset.textType === "static";
|
|
@@ -173,18 +180,7 @@
|
|
|
173
180
|
this.onContentChange?.();
|
|
174
181
|
}
|
|
175
182
|
_handleBlur(e) {
|
|
176
|
-
|
|
177
|
-
const newText = element.textContent ?? "";
|
|
178
|
-
const originalText = element.dataset.originalText ?? "";
|
|
179
|
-
if (newText !== originalText) {
|
|
180
|
-
for (const el of this.editableGroup) {
|
|
181
|
-
el.dataset.originalText = newText;
|
|
182
|
-
}
|
|
183
|
-
if (this.communicationManager) {
|
|
184
|
-
this.communicationManager.notifyTextChange(element, originalText, newText);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
this.removeEditable(element);
|
|
183
|
+
this.removeEditable(e.target);
|
|
188
184
|
}
|
|
189
185
|
_handleKeydown(e) {
|
|
190
186
|
const element = e.target;
|
|
@@ -192,6 +188,10 @@
|
|
|
192
188
|
e.preventDefault();
|
|
193
189
|
element.blur();
|
|
194
190
|
}
|
|
191
|
+
if (e.key === " " && !e.isComposing && element.tagName === "BUTTON") {
|
|
192
|
+
e.preventDefault();
|
|
193
|
+
element.ownerDocument.execCommand("insertText", false, " ");
|
|
194
|
+
}
|
|
195
195
|
if (e.key === "Escape") {
|
|
196
196
|
for (const el of this.editableGroup) {
|
|
197
197
|
if (el.dataset.originalText) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editableManager.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/editableManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,UAAU,wBAAwB;IACjC,gBAAgB,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxF;AAED,yGAAyG;AACzG,eAAO,MAAM,SAAS,mBAAwB,CAAC;AAE/C,qBAAa,eAAe;IAC3B,OAAO,CAAC,oBAAoB,CAAC,CAA2B;IACxD,OAAO,CAAC,eAAe,CAAC,CAAa;IACrC,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,kBAAkB,CAA6B;IACvD,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,aAAa,CAAgB;IAErC;;;;OAIG;gBACS,oBAAoB,CAAC,EAAE,wBAAwB,EAAE,eAAe,CAAC,EAAE,MAAM,IAAI;IASzF,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAoB9C,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"editableManager.d.ts","sourceRoot":"","sources":["../../../src/runtime/interactions/editableManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,UAAU,wBAAwB;IACjC,gBAAgB,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxF;AAED,yGAAyG;AACzG,eAAO,MAAM,SAAS,mBAAwB,CAAC;AAE/C,qBAAa,eAAe;IAC3B,OAAO,CAAC,oBAAoB,CAAC,CAA2B;IACxD,OAAO,CAAC,eAAe,CAAC,CAAa;IACrC,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,kBAAkB,CAA6B;IACvD,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,aAAa,CAAgB;IAErC;;;;OAIG;gBACS,oBAAoB,CAAC,EAAE,wBAAwB,EAAE,eAAe,CAAC,EAAE,MAAM,IAAI;IASzF,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAoB9C,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAsC1C,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,cAAc;CAiCtB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-design-mode",
|
|
3
3
|
"description": "Hybrid editor (design-mode) authoring UI, iframe runtime, source-locator, and protocol for Salesforce UI Bundles",
|
|
4
|
-
"version": "11.
|
|
4
|
+
"version": "11.36.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|