jedison 1.16.0 → 1.16.2
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/CHANGELOG.md +9 -0
- package/dist/cjs/jedison.cjs +1 -1
- package/dist/cjs/jedison.cjs.map +1 -1
- package/dist/esm/jedison.js +25 -0
- package/dist/esm/jedison.js.map +1 -1
- package/dist/umd/jedison.umd.js +1 -1
- package/dist/umd/jedison.umd.js.map +1 -1
- package/package.json +5 -4
package/dist/esm/jedison.js
CHANGED
|
@@ -5261,6 +5261,7 @@ class EditorArrayTable extends EditorArray {
|
|
|
5261
5261
|
table.thead.appendChild(th);
|
|
5262
5262
|
}
|
|
5263
5263
|
this.instance.children.forEach((child, index2) => {
|
|
5264
|
+
var _a, _b;
|
|
5264
5265
|
const tbodyRow = document.createElement("tr");
|
|
5265
5266
|
const buttonsTd = this.theme.getTableDefinition({ isButtonColumn: true });
|
|
5266
5267
|
const { deleteBtn, moveUpBtn, moveDownBtn, dragBtn, btnGroup, addAfterBtn } = this.getButtons(index2);
|
|
@@ -5283,6 +5284,7 @@ class EditorArrayTable extends EditorArray {
|
|
|
5283
5284
|
}
|
|
5284
5285
|
const td = this.theme.getTableDefinition();
|
|
5285
5286
|
child.ui.adaptForTable(child, td);
|
|
5287
|
+
(_b = (_a = child.ui.control.info) == null ? void 0 : _a.container) == null ? void 0 : _b.remove();
|
|
5286
5288
|
td.appendChild(child.ui.control.container);
|
|
5287
5289
|
tbodyRow.appendChild(td);
|
|
5288
5290
|
if (arrayButtonsPosition === "right") {
|
|
@@ -5411,6 +5413,7 @@ class EditorArrayTableObject extends EditorArray {
|
|
|
5411
5413
|
table.thead.appendChild(th);
|
|
5412
5414
|
}
|
|
5413
5415
|
this.instance.children.forEach((child, index2) => {
|
|
5416
|
+
var _a, _b;
|
|
5414
5417
|
const tbodyRow = document.createElement("tr");
|
|
5415
5418
|
const buttonsTd = this.theme.getTableDefinition({ isButtonColumn: true });
|
|
5416
5419
|
const { deleteBtn, moveUpBtn, moveDownBtn, dragBtn, btnGroup, addAfterBtn } = this.getButtons(index2);
|
|
@@ -5433,14 +5436,17 @@ class EditorArrayTableObject extends EditorArray {
|
|
|
5433
5436
|
}
|
|
5434
5437
|
if (child.children.length) {
|
|
5435
5438
|
child.children.forEach((grandchild) => {
|
|
5439
|
+
var _a2, _b2;
|
|
5436
5440
|
const td = this.theme.getTableDefinition();
|
|
5437
5441
|
grandchild.ui.adaptForTable(td);
|
|
5442
|
+
(_b2 = (_a2 = grandchild.ui.control.info) == null ? void 0 : _a2.container) == null ? void 0 : _b2.remove();
|
|
5438
5443
|
td.appendChild(grandchild.ui.control.container);
|
|
5439
5444
|
tbodyRow.appendChild(td);
|
|
5440
5445
|
});
|
|
5441
5446
|
} else {
|
|
5442
5447
|
const td = this.theme.getTableDefinition();
|
|
5443
5448
|
child.ui.adaptForTable(td);
|
|
5449
|
+
(_b = (_a = child.ui.control.info) == null ? void 0 : _a.container) == null ? void 0 : _b.remove();
|
|
5444
5450
|
td.appendChild(child.ui.control.container);
|
|
5445
5451
|
tbodyRow.appendChild(td);
|
|
5446
5452
|
}
|
|
@@ -8175,6 +8181,23 @@ class Theme {
|
|
|
8175
8181
|
new MutationObserver(syncState).observe(toggle, { attributes: true, attributeFilter: ["class"] });
|
|
8176
8182
|
return toggle;
|
|
8177
8183
|
}
|
|
8184
|
+
/**
|
|
8185
|
+
* Makes the whole editor header (legend) toggle the collapse, so users can
|
|
8186
|
+
* click the title or empty header area instead of only the small toggle
|
|
8187
|
+
* button. Clicks on interactive header items (buttons, links, form controls,
|
|
8188
|
+
* actions and switcher slots) are ignored so they keep their own behavior.
|
|
8189
|
+
*/
|
|
8190
|
+
makeHeaderClickable(legend, collapseToggle) {
|
|
8191
|
+
legend.style.cursor = "pointer";
|
|
8192
|
+
legend.addEventListener("click", (event) => {
|
|
8193
|
+
if (event.target.closest(
|
|
8194
|
+
"button, a, input, select, textarea, [contenteditable], .jedi-actions-slot, .jedi-switcher-slot"
|
|
8195
|
+
)) {
|
|
8196
|
+
return;
|
|
8197
|
+
}
|
|
8198
|
+
collapseToggle.click();
|
|
8199
|
+
});
|
|
8200
|
+
}
|
|
8178
8201
|
/**
|
|
8179
8202
|
* Container for properties editing elements like property activators
|
|
8180
8203
|
*/
|
|
@@ -8706,6 +8729,7 @@ class Theme {
|
|
|
8706
8729
|
}
|
|
8707
8730
|
if (config.enableCollapseToggle) {
|
|
8708
8731
|
actions.appendChild(collapseToggle);
|
|
8732
|
+
this.makeHeaderClickable(legend, collapseToggle);
|
|
8709
8733
|
}
|
|
8710
8734
|
return {
|
|
8711
8735
|
container,
|
|
@@ -9029,6 +9053,7 @@ class Theme {
|
|
|
9029
9053
|
body.appendChild(childrenSlot);
|
|
9030
9054
|
if (config.enableCollapseToggle) {
|
|
9031
9055
|
actions.appendChild(collapseToggle);
|
|
9056
|
+
this.makeHeaderClickable(legend, collapseToggle);
|
|
9032
9057
|
}
|
|
9033
9058
|
const showFooter = (config.arrayFooterAdd === true || config.arrayFooterDeleteAll === true) && config.readOnly === false;
|
|
9034
9059
|
if (showFooter) {
|