jedison 1.16.1 → 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 +5 -0
- package/dist/cjs/jedison.cjs +1 -1
- package/dist/cjs/jedison.cjs.map +1 -1
- package/dist/esm/jedison.js +19 -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
|
@@ -8181,6 +8181,23 @@ class Theme {
|
|
|
8181
8181
|
new MutationObserver(syncState).observe(toggle, { attributes: true, attributeFilter: ["class"] });
|
|
8182
8182
|
return toggle;
|
|
8183
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
|
+
}
|
|
8184
8201
|
/**
|
|
8185
8202
|
* Container for properties editing elements like property activators
|
|
8186
8203
|
*/
|
|
@@ -8712,6 +8729,7 @@ class Theme {
|
|
|
8712
8729
|
}
|
|
8713
8730
|
if (config.enableCollapseToggle) {
|
|
8714
8731
|
actions.appendChild(collapseToggle);
|
|
8732
|
+
this.makeHeaderClickable(legend, collapseToggle);
|
|
8715
8733
|
}
|
|
8716
8734
|
return {
|
|
8717
8735
|
container,
|
|
@@ -9035,6 +9053,7 @@ class Theme {
|
|
|
9035
9053
|
body.appendChild(childrenSlot);
|
|
9036
9054
|
if (config.enableCollapseToggle) {
|
|
9037
9055
|
actions.appendChild(collapseToggle);
|
|
9056
|
+
this.makeHeaderClickable(legend, collapseToggle);
|
|
9038
9057
|
}
|
|
9039
9058
|
const showFooter = (config.arrayFooterAdd === true || config.arrayFooterDeleteAll === true) && config.readOnly === false;
|
|
9040
9059
|
if (showFooter) {
|