@knime/jsonforms 1.14.3 → 1.15.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/CHANGELOG.md +24 -0
- package/dist/{AnyOfTwinlist-Cwxtyt0Q.js → AnyOfTwinlist-Co_sJAsc.js} +3 -3
- package/dist/{Button-BxuGKyL5.js → Button-Cqwayw73.js} +4 -4
- package/dist/CheckboxControl-C10_DX1N.js +40 -0
- package/dist/{Checkboxes-DIPjJhPO.js → Checkboxes-DWOxHiUX.js} +2 -2
- package/dist/{CheckboxesControl-5QlPmjwv.js → CheckboxesControl-BMRFgmO_.js} +7 -10
- package/dist/{ComboBoxControl-Dk02x7sN.js → ComboBoxControl-R0DlbAdT.js} +26 -29
- package/dist/{DateControl-CddCObVg.js → DateControl-DAGAM92B.js} +3 -3
- package/dist/DateTimeControl-DJhIb_U4.js +45 -0
- package/dist/{DateTimeFormatInput-bO1zHUyp.js → DateTimeFormatInput-BhLQzC-P.js} +74 -82
- package/dist/{DateTimeFormatPickerControl-Dq25_JV2.js → DateTimeFormatPickerControl-V7pxRYaW.js} +5 -8
- package/dist/{DateTimeFormatPickerWithTypeControl-DZib_x-B.js → DateTimeFormatPickerWithTypeControl-3fa75rGw.js} +6 -9
- package/dist/{DateTimeInput-CEYEV8dt.js → DateTimeInput-Cs0KqlOS.js} +4629 -4556
- package/dist/Dropdown-BEx-cvXH.js +608 -0
- package/dist/{DropdownControl-BNQKWzTT.js → DropdownControl-DEIA5VD4.js} +4 -4
- package/dist/{HorizontalLayout-6GwurgkR.js → HorizontalLayout-DCfhMNq4.js} +2 -2
- package/dist/{InputField-BYxW_-G3.js → InputField-OkFB9VHZ.js} +11 -11
- package/dist/{IntegerControl-DZIY-wb_.js → IntegerControl-Om8J7hch.js} +3 -3
- package/dist/{IntervalControl-Yts36_MI.js → IntervalControl-B7UbyyD-.js} +99 -100
- package/dist/{LoadingDropdown-Dw-0WQ8x.js → LoadingDropdown-CINkq_Sw.js} +6 -6
- package/dist/{ManualTwinlistControl-C3NnAug1.js → ManualTwinlistControl-BLTfr2gT.js} +24 -30
- package/dist/MultiSelectListBoxControl-j1TaFtQj.js +31 -0
- package/dist/{MultimodeTwinlistControl-B2Jven29.js → MultimodeTwinlistControl-BsFqHRFM.js} +97 -108
- package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_37fe7036_lang-DGKMWtLi.js → MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_37fe7036_lang-2fVBipAl.js} +1 -1
- package/dist/{MultiselectListBox-CHvGxAhY.js → MultiselectListBox-CMTJnAWr.js} +18 -23
- package/dist/{NameFilter-D0hKO5Fr.js → NameFilter-d5k6rDVY.js} +3 -3
- package/dist/{NumberControl-DkeQT1iR.js → NumberControl-Kc3hvVef.js} +3 -3
- package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-BOCR1qXG.js +50 -0
- package/dist/{NumberInput-DJ38AGiR.js → NumberInput-BepS3tAK.js} +5 -5
- package/dist/{OneOfDropdown-NAgE-mPP.js → OneOfDropdown-CLwVXrbC.js} +10 -11
- package/dist/{RadioControl-DjrysNQ_.js → RadioControl-DpziR8nA.js} +4 -4
- package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-DVIeg5W1.js +104 -0
- package/dist/{RichTextControl-CXY1ULxR.js → RichTextControl-CE6whfV5.js} +4524 -4079
- package/dist/SectionHeading-D7znCZXu.js +19 -0
- package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-DR31vaIu.js +15431 -0
- package/dist/{SectionLayout-CJP4sYyB.js → SectionLayout-BhXDOzqB.js} +4 -4
- package/dist/SettingsSubPanel-x9uWGoiu.js +5 -0
- package/dist/{SettingsSubPanelLayout-YBNVPQOD.js → SettingsSubPanelLayout-BPHBM5n5.js} +12 -11
- package/dist/{SimpleButtonControl-ejyUwJdL.js → SimpleButtonControl-DfCSlgZS.js} +9 -9
- package/dist/SimpleTwinlistControl-CBalniCf.js +25 -0
- package/dist/{SingleSelectControl-B0JgDv7j.js → SingleSelectControl-DC4w0ata.js} +4 -4
- package/dist/{SingleSelectListBoxControl-ClQOxnxW.js → SingleSelectListBoxControl-CKj-p8jZ.js} +33 -36
- package/dist/{SortListControl-mvJofiWn.js → SortListControl-BIUyPjCi.js} +122 -120
- package/dist/{StyledListItem-BXz08pEQ.js → StyledListItem-D-HJWfo5.js} +3 -3
- package/dist/{TextAreaControl-S4aoqAv1.js → TextAreaControl-D28TQZEY.js} +23 -26
- package/dist/{TextControl-rJrjrBw8.js → TextControl-DUDBWcHy.js} +1 -1
- package/dist/{TextControl.vue_vue_type_script_setup_true_lang-Bf6GB1zX.js → TextControl.vue_vue_type_script_setup_true_lang-DpAd3yOu.js} +16 -19
- package/dist/TimeControl-HRooO_z3.js +36 -0
- package/dist/{TwinlistControlBase-D1l9t7Up.js → TwinlistControlBase-Brfh5pqZ.js} +5 -5
- package/dist/{TwinlistLoadingInfo-CQRx9cEu.js → TwinlistLoadingInfo-C4Tta00d.js} +150 -167
- package/dist/TypedStringFilter-CdvgPKhD.js +26 -0
- package/dist/{ValueSwitch-CUYV7v67.js → ValueSwitch-W4y1YvNM.js} +8 -8
- package/dist/{ValueSwitchControl-IP9SxrUs.js → ValueSwitchControl-BaXH8Cjx.js} +3 -3
- package/dist/{VerticalLayout-D2eQSYgv.js → VerticalLayout-ChAmRKNj.js} +5 -5
- package/dist/VerticalLayoutBase-DAk4vfH5.js +20 -0
- package/dist/ZonedDateTimeControl-Qb57KmMT.js +69 -0
- package/dist/{_baseEach-cjHvi5iT.js → _baseEach-DdH9cM67.js} +4 -4
- package/dist/{_baseIteratee-CIxt0KWU.js → _baseIteratee-BGt-t7Os.js} +27 -27
- package/dist/{_getTag-sLUyzSDj.js → _getTag-DAFySze4.js} +10 -10
- package/dist/{arrow-dropdown-DdgjzLAO.js → arrow-dropdown-BAFsD8Su.js} +2 -2
- package/dist/{arrow-next-CIOU5o42.js → arrow-next-BQVCxGb8.js} +2 -2
- package/dist/{close-BuY4mhXV.js → close-DGt8x-x_.js} +2 -2
- package/dist/floating-ui.vue-CDo9Kas1.js +1055 -0
- package/dist/{hotkeys-kwHHtFKz.js → hotkeys-rxnt4egK.js} +1 -1
- package/dist/index-CpKfM262.js +376 -0
- package/dist/knime-jsonforms.css +1 -1
- package/dist/knime-jsonforms.js +64 -67
- package/dist/{localTimeUtils-Dv-1R88J.js → localTimeUtils-NIKgHnIr.js} +179 -181
- package/dist/magic-string.es-BQ9KnLz-.js +659 -0
- package/dist/navigator-e30QQMkl.js +4 -0
- package/dist/popper-LGjf7Wza.js +905 -0
- package/dist/{reload-BVbCGubF.js → reload-DCdbNLa2.js} +2 -2
- package/dist/src/higherOrderComponents/control/LabeledControl.vue.d.ts +26 -22
- package/dist/src/higherOrderComponents/control/errorMessage/ErrorLine.vue.d.ts +3 -4
- package/dist/src/higherOrderComponents/control/errorMessage/ErrorMessages.vue.d.ts +16 -10
- package/dist/src/higherOrderComponents/control/errorMessage/withErrorMessage.d.ts +1 -1
- package/dist/src/higherOrderComponents/control/util.d.ts +7 -33
- package/dist/src/higherOrderComponents/layout/util.d.ts +1 -17
- package/dist/src/layoutComponents/Form.vue.d.ts +12 -4
- package/dist/src/layoutComponents/HorizontalLayout.vue.d.ts +1 -1
- package/dist/src/layoutComponents/SectionLayout.vue.d.ts +13 -5
- package/dist/src/layoutComponents/VerticalLayout.vue.d.ts +1 -1
- package/dist/src/layoutComponents/VerticalLayoutBase.vue.d.ts +16 -9
- package/dist/src/layoutComponents/section/SectionHeading.vue.d.ts +13 -6
- package/dist/src/layoutComponents/settingsSubPanel/SettingsSubPanel.vue.d.ts +2 -2
- package/dist/src/layoutComponents/settingsSubPanel/SettingsSubPanelBackArrow.vue.d.ts +1 -1
- package/dist/src/renderers/dateTimeFormatPickerRenderer.d.ts +2 -2
- package/dist/src/renderers/defaultRenderers.d.ts +966 -151
- package/dist/src/renderers/dropdownRenderer.d.ts +1 -1
- package/dist/src/renderers/fallbackRenderers.d.ts +8 -8
- package/dist/src/renderers/horizontalLayoutRenderer.d.ts +1 -1
- package/dist/src/renderers/sectionLayoutRenderer.d.ts +4 -4
- package/dist/src/renderers/simpleButtonRenderer.d.ts +7 -89
- package/dist/src/renderers/sortListRenderer.d.ts +853 -20
- package/dist/src/renderers/textMessageRenderer.d.ts +65 -1
- package/dist/src/renderers/textRenderer.d.ts +1 -1
- package/dist/src/renderers/verticalLayoutRenderer.d.ts +2 -2
- package/dist/src/renderers/zonedDateTimeRenderer.d.ts +1 -1
- package/dist/src/uiComponents/CheckboxControl.vue.d.ts +15 -6
- package/dist/src/uiComponents/CheckboxesControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/ComboBoxControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DateControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DateTimeControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DateTimeFormatPickerControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DateTimeFormatPickerWithTypeControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DropdownControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/IntegerControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/IntervalControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/MultiSelectListBoxControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/NumberControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/NumberControlBase.vue.d.ts +5 -9
- package/dist/src/uiComponents/OneOfDropdown.vue.d.ts +2 -1
- package/dist/src/uiComponents/RadioControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/RadioControlBase.vue.d.ts +4 -8
- package/dist/src/uiComponents/SimpleButtonControl.vue.d.ts +5 -129
- package/dist/src/uiComponents/SingleSelectControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/SingleSelectListBoxControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/SortListControl.vue.d.ts +845 -12
- package/dist/src/uiComponents/TextAreaControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/TextControl.vue.d.ts +203 -3
- package/dist/src/uiComponents/TextMessageControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/TimeControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/ValueSwitchControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/ZonedDateTimeControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/composables/useProvidedState.d.ts +1 -1
- package/dist/src/uiComponents/loading/TwinlistLoadingInfo.vue.d.ts +1 -1
- package/dist/src/uiComponents/richTextControl/DialogLinkModal.vue.d.ts +3 -1
- package/dist/src/uiComponents/richTextControl/RichTextControl.vue.d.ts +230 -1
- package/dist/src/uiComponents/twinlist/AnyOfTwinlist.vue.d.ts +2 -1
- package/dist/src/uiComponents/twinlist/ManualTwinlistControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/twinlist/MultimodeTwinlistControl.vue.d.ts +8 -15
- package/dist/src/uiComponents/twinlist/NameFilter.vue.d.ts +2 -1
- package/dist/src/uiComponents/twinlist/SimpleTwinlistControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/twinlist/TwinlistControlBase.vue.d.ts +5 -10
- package/dist/src/uiComponents/twinlist/TypedStringFilter.vue.d.ts +2 -1
- package/dist/{svgWithTitle-Cr3Pu3wr.js → svgWithTitle-CnTmPYAB.js} +4 -4
- package/dist/testUtils/component.d.ts +18 -18
- package/dist/testing.js +8688 -8655
- package/dist/{toString-C_MqBj3_.js → toString-BhubvA3m.js} +1 -1
- package/dist/{useBuiltinValidations-DP7OS71z.js → useBuiltinValidations-Boxrm71q.js} +1 -1
- package/dist/useDropdownNavigation-BfCXUheD.js +817 -0
- package/dist/usePossibleValues-DXuWWBh_.js +16 -0
- package/package.json +14 -14
- package/dist/CheckboxControl-Oe97HhY3.js +0 -40
- package/dist/DateTimeControl-DyXUJBHE.js +0 -54
- package/dist/Dropdown-CJj0CUA8.js +0 -604
- package/dist/MultiSelectListBoxControl-3Q41S4aA.js +0 -34
- package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-B9K5qEs3.js +0 -53
- package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-WaVJMdQq.js +0 -114
- package/dist/SectionHeading-BU1W5lDr.js +0 -19
- package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-CsYyUtDa.js +0 -14015
- package/dist/SettingsSubPanel-KxEyzlB6.js +0 -5
- package/dist/SimpleTwinlistControl-qXQxRI7h.js +0 -28
- package/dist/TimeControl-DfhE8yu9.js +0 -42
- package/dist/TypedStringFilter-C6JhWCCC.js +0 -29
- package/dist/VerticalLayoutBase-DRfHwc4t.js +0 -20
- package/dist/ZonedDateTimeControl-Bi8cV34A.js +0 -75
- package/dist/floating-ui.vue-B-MrqKCT.js +0 -1019
- package/dist/index-CoRworrE.js +0 -322
- package/dist/magic-string.es-D-aKzDFf.js +0 -858
- package/dist/navigator-D_R-txCf.js +0 -7
- package/dist/popper-CRR--9mA.js +0 -907
- package/dist/src/JsonFormsDialog.vue.d.ts +0 -46
- package/dist/useDropdownNavigation-7o7SRJSo.js +0 -781
- package/dist/usePossibleValues-lz0Rcu_N.js +0 -20
|
@@ -1,781 +0,0 @@
|
|
|
1
|
-
import { defineComponent as he, ref as oe, computed as ge, onMounted as ye, watch as me, onUnmounted as we, Comment as Fe, cloneVNode as Ne, readonly as Te } from "vue";
|
|
2
|
-
/*!
|
|
3
|
-
* tabbable 6.2.0
|
|
4
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
5
|
-
*/
|
|
6
|
-
var ce = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], U = /* @__PURE__ */ ce.join(","), se = typeof Element > "u", S = se ? function() {
|
|
7
|
-
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, G = !se && Element.prototype.getRootNode ? function(u) {
|
|
8
|
-
var e;
|
|
9
|
-
return u == null || (e = u.getRootNode) === null || e === void 0 ? void 0 : e.call(u);
|
|
10
|
-
} : function(u) {
|
|
11
|
-
return u == null ? void 0 : u.ownerDocument;
|
|
12
|
-
}, q = function u(e, t) {
|
|
13
|
-
var a;
|
|
14
|
-
t === void 0 && (t = !0);
|
|
15
|
-
var o = e == null || (a = e.getAttribute) === null || a === void 0 ? void 0 : a.call(e, "inert"), c = o === "" || o === "true", n = c || t && e && u(e.parentNode);
|
|
16
|
-
return n;
|
|
17
|
-
}, Ee = function(e) {
|
|
18
|
-
var t, a = e == null || (t = e.getAttribute) === null || t === void 0 ? void 0 : t.call(e, "contenteditable");
|
|
19
|
-
return a === "" || a === "true";
|
|
20
|
-
}, le = function(e, t, a) {
|
|
21
|
-
if (q(e))
|
|
22
|
-
return [];
|
|
23
|
-
var o = Array.prototype.slice.apply(e.querySelectorAll(U));
|
|
24
|
-
return t && S.call(e, U) && o.unshift(e), o = o.filter(a), o;
|
|
25
|
-
}, de = function u(e, t, a) {
|
|
26
|
-
for (var o = [], c = Array.from(e); c.length; ) {
|
|
27
|
-
var n = c.shift();
|
|
28
|
-
if (!q(n, !1))
|
|
29
|
-
if (n.tagName === "SLOT") {
|
|
30
|
-
var l = n.assignedElements(), d = l.length ? l : n.children, b = u(d, !0, a);
|
|
31
|
-
a.flatten ? o.push.apply(o, b) : o.push({
|
|
32
|
-
scopeParent: n,
|
|
33
|
-
candidates: b
|
|
34
|
-
});
|
|
35
|
-
} else {
|
|
36
|
-
var w = S.call(n, U);
|
|
37
|
-
w && a.filter(n) && (t || !e.includes(n)) && o.push(n);
|
|
38
|
-
var m = n.shadowRoot || // check for an undisclosed shadow
|
|
39
|
-
typeof a.getShadowRoot == "function" && a.getShadowRoot(n), T = !q(m, !1) && (!a.shadowRootFilter || a.shadowRootFilter(n));
|
|
40
|
-
if (m && T) {
|
|
41
|
-
var C = u(m === !0 ? n.children : m.children, !0, a);
|
|
42
|
-
a.flatten ? o.push.apply(o, C) : o.push({
|
|
43
|
-
scopeParent: n,
|
|
44
|
-
candidates: C
|
|
45
|
-
});
|
|
46
|
-
} else
|
|
47
|
-
c.unshift.apply(c, n.children);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return o;
|
|
51
|
-
}, fe = function(e) {
|
|
52
|
-
return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
|
|
53
|
-
}, D = function(e) {
|
|
54
|
-
if (!e)
|
|
55
|
-
throw new Error("No node provided");
|
|
56
|
-
return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || Ee(e)) && !fe(e) ? 0 : e.tabIndex;
|
|
57
|
-
}, ke = function(e, t) {
|
|
58
|
-
var a = D(e);
|
|
59
|
-
return a < 0 && t && !fe(e) ? 0 : a;
|
|
60
|
-
}, De = function(e, t) {
|
|
61
|
-
return e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex;
|
|
62
|
-
}, ve = function(e) {
|
|
63
|
-
return e.tagName === "INPUT";
|
|
64
|
-
}, Se = function(e) {
|
|
65
|
-
return ve(e) && e.type === "hidden";
|
|
66
|
-
}, Oe = function(e) {
|
|
67
|
-
var t = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(a) {
|
|
68
|
-
return a.tagName === "SUMMARY";
|
|
69
|
-
});
|
|
70
|
-
return t;
|
|
71
|
-
}, Ce = function(e, t) {
|
|
72
|
-
for (var a = 0; a < e.length; a++)
|
|
73
|
-
if (e[a].checked && e[a].form === t)
|
|
74
|
-
return e[a];
|
|
75
|
-
}, Ie = function(e) {
|
|
76
|
-
if (!e.name)
|
|
77
|
-
return !0;
|
|
78
|
-
var t = e.form || G(e), a = function(l) {
|
|
79
|
-
return t.querySelectorAll('input[type="radio"][name="' + l + '"]');
|
|
80
|
-
}, o;
|
|
81
|
-
if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
|
|
82
|
-
o = a(window.CSS.escape(e.name));
|
|
83
|
-
else
|
|
84
|
-
try {
|
|
85
|
-
o = a(e.name);
|
|
86
|
-
} catch (n) {
|
|
87
|
-
return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", n.message), !1;
|
|
88
|
-
}
|
|
89
|
-
var c = Ce(o, e.form);
|
|
90
|
-
return !c || c === e;
|
|
91
|
-
}, Re = function(e) {
|
|
92
|
-
return ve(e) && e.type === "radio";
|
|
93
|
-
}, Pe = function(e) {
|
|
94
|
-
return Re(e) && !Ie(e);
|
|
95
|
-
}, Ae = function(e) {
|
|
96
|
-
var t, a = e && G(e), o = (t = a) === null || t === void 0 ? void 0 : t.host, c = !1;
|
|
97
|
-
if (a && a !== e) {
|
|
98
|
-
var n, l, d;
|
|
99
|
-
for (c = !!((n = o) !== null && n !== void 0 && (l = n.ownerDocument) !== null && l !== void 0 && l.contains(o) || e != null && (d = e.ownerDocument) !== null && d !== void 0 && d.contains(e)); !c && o; ) {
|
|
100
|
-
var b, w, m;
|
|
101
|
-
a = G(o), o = (b = a) === null || b === void 0 ? void 0 : b.host, c = !!((w = o) !== null && w !== void 0 && (m = w.ownerDocument) !== null && m !== void 0 && m.contains(o));
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return c;
|
|
105
|
-
}, te = function(e) {
|
|
106
|
-
var t = e.getBoundingClientRect(), a = t.width, o = t.height;
|
|
107
|
-
return a === 0 && o === 0;
|
|
108
|
-
}, xe = function(e, t) {
|
|
109
|
-
var a = t.displayCheck, o = t.getShadowRoot;
|
|
110
|
-
if (getComputedStyle(e).visibility === "hidden")
|
|
111
|
-
return !0;
|
|
112
|
-
var c = S.call(e, "details>summary:first-of-type"), n = c ? e.parentElement : e;
|
|
113
|
-
if (S.call(n, "details:not([open]) *"))
|
|
114
|
-
return !0;
|
|
115
|
-
if (!a || a === "full" || a === "legacy-full") {
|
|
116
|
-
if (typeof o == "function") {
|
|
117
|
-
for (var l = e; e; ) {
|
|
118
|
-
var d = e.parentElement, b = G(e);
|
|
119
|
-
if (d && !d.shadowRoot && o(d) === !0)
|
|
120
|
-
return te(e);
|
|
121
|
-
e.assignedSlot ? e = e.assignedSlot : !d && b !== e.ownerDocument ? e = b.host : e = d;
|
|
122
|
-
}
|
|
123
|
-
e = l;
|
|
124
|
-
}
|
|
125
|
-
if (Ae(e))
|
|
126
|
-
return !e.getClientRects().length;
|
|
127
|
-
if (a !== "legacy-full")
|
|
128
|
-
return !0;
|
|
129
|
-
} else if (a === "non-zero-area")
|
|
130
|
-
return te(e);
|
|
131
|
-
return !1;
|
|
132
|
-
}, Be = function(e) {
|
|
133
|
-
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
|
|
134
|
-
for (var t = e.parentElement; t; ) {
|
|
135
|
-
if (t.tagName === "FIELDSET" && t.disabled) {
|
|
136
|
-
for (var a = 0; a < t.children.length; a++) {
|
|
137
|
-
var o = t.children.item(a);
|
|
138
|
-
if (o.tagName === "LEGEND")
|
|
139
|
-
return S.call(t, "fieldset[disabled] *") ? !0 : !o.contains(e);
|
|
140
|
-
}
|
|
141
|
-
return !0;
|
|
142
|
-
}
|
|
143
|
-
t = t.parentElement;
|
|
144
|
-
}
|
|
145
|
-
return !1;
|
|
146
|
-
}, V = function(e, t) {
|
|
147
|
-
return !(t.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
|
|
148
|
-
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
149
|
-
// note related to `candidateSelectors`)
|
|
150
|
-
q(t) || Se(t) || xe(t, e) || // For a details element with a summary, the summary element gets the focus
|
|
151
|
-
Oe(t) || Be(t));
|
|
152
|
-
}, z = function(e, t) {
|
|
153
|
-
return !(Pe(t) || D(t) < 0 || !V(e, t));
|
|
154
|
-
}, Le = function(e) {
|
|
155
|
-
var t = parseInt(e.getAttribute("tabindex"), 10);
|
|
156
|
-
return !!(isNaN(t) || t >= 0);
|
|
157
|
-
}, Ke = function u(e) {
|
|
158
|
-
var t = [], a = [];
|
|
159
|
-
return e.forEach(function(o, c) {
|
|
160
|
-
var n = !!o.scopeParent, l = n ? o.scopeParent : o, d = ke(l, n), b = n ? u(o.candidates) : l;
|
|
161
|
-
d === 0 ? n ? t.push.apply(t, b) : t.push(l) : a.push({
|
|
162
|
-
documentOrder: c,
|
|
163
|
-
tabIndex: d,
|
|
164
|
-
item: o,
|
|
165
|
-
isScope: n,
|
|
166
|
-
content: b
|
|
167
|
-
});
|
|
168
|
-
}), a.sort(De).reduce(function(o, c) {
|
|
169
|
-
return c.isScope ? o.push.apply(o, c.content) : o.push(c.content), o;
|
|
170
|
-
}, []).concat(t);
|
|
171
|
-
}, je = function(e, t) {
|
|
172
|
-
t = t || {};
|
|
173
|
-
var a;
|
|
174
|
-
return t.getShadowRoot ? a = de([e], t.includeContainer, {
|
|
175
|
-
filter: z.bind(null, t),
|
|
176
|
-
flatten: !1,
|
|
177
|
-
getShadowRoot: t.getShadowRoot,
|
|
178
|
-
shadowRootFilter: Le
|
|
179
|
-
}) : a = le(e, t.includeContainer, z.bind(null, t)), Ke(a);
|
|
180
|
-
}, Me = function(e, t) {
|
|
181
|
-
t = t || {};
|
|
182
|
-
var a;
|
|
183
|
-
return t.getShadowRoot ? a = de([e], t.includeContainer, {
|
|
184
|
-
filter: V.bind(null, t),
|
|
185
|
-
flatten: !0,
|
|
186
|
-
getShadowRoot: t.getShadowRoot
|
|
187
|
-
}) : a = le(e, t.includeContainer, V.bind(null, t)), a;
|
|
188
|
-
}, O = function(e, t) {
|
|
189
|
-
if (t = t || {}, !e)
|
|
190
|
-
throw new Error("No node provided");
|
|
191
|
-
return S.call(e, U) === !1 ? !1 : z(t, e);
|
|
192
|
-
}, Ue = /* @__PURE__ */ ce.concat("iframe").join(","), $ = function(e, t) {
|
|
193
|
-
if (t = t || {}, !e)
|
|
194
|
-
throw new Error("No node provided");
|
|
195
|
-
return S.call(e, Ue) === !1 ? !1 : V(t, e);
|
|
196
|
-
};
|
|
197
|
-
/*!
|
|
198
|
-
* focus-trap 7.5.4
|
|
199
|
-
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
200
|
-
*/
|
|
201
|
-
function ae(u, e) {
|
|
202
|
-
var t = Object.keys(u);
|
|
203
|
-
if (Object.getOwnPropertySymbols) {
|
|
204
|
-
var a = Object.getOwnPropertySymbols(u);
|
|
205
|
-
e && (a = a.filter(function(o) {
|
|
206
|
-
return Object.getOwnPropertyDescriptor(u, o).enumerable;
|
|
207
|
-
})), t.push.apply(t, a);
|
|
208
|
-
}
|
|
209
|
-
return t;
|
|
210
|
-
}
|
|
211
|
-
function ne(u) {
|
|
212
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
213
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
214
|
-
e % 2 ? ae(Object(t), !0).forEach(function(a) {
|
|
215
|
-
Ge(u, a, t[a]);
|
|
216
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(u, Object.getOwnPropertyDescriptors(t)) : ae(Object(t)).forEach(function(a) {
|
|
217
|
-
Object.defineProperty(u, a, Object.getOwnPropertyDescriptor(t, a));
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
return u;
|
|
221
|
-
}
|
|
222
|
-
function Ge(u, e, t) {
|
|
223
|
-
return e = Ve(e), e in u ? Object.defineProperty(u, e, {
|
|
224
|
-
value: t,
|
|
225
|
-
enumerable: !0,
|
|
226
|
-
configurable: !0,
|
|
227
|
-
writable: !0
|
|
228
|
-
}) : u[e] = t, u;
|
|
229
|
-
}
|
|
230
|
-
function qe(u, e) {
|
|
231
|
-
if (typeof u != "object" || u === null) return u;
|
|
232
|
-
var t = u[Symbol.toPrimitive];
|
|
233
|
-
if (t !== void 0) {
|
|
234
|
-
var a = t.call(u, e || "default");
|
|
235
|
-
if (typeof a != "object") return a;
|
|
236
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
237
|
-
}
|
|
238
|
-
return (e === "string" ? String : Number)(u);
|
|
239
|
-
}
|
|
240
|
-
function Ve(u) {
|
|
241
|
-
var e = qe(u, "string");
|
|
242
|
-
return typeof e == "symbol" ? e : String(e);
|
|
243
|
-
}
|
|
244
|
-
var re = {
|
|
245
|
-
activateTrap: function(e, t) {
|
|
246
|
-
if (e.length > 0) {
|
|
247
|
-
var a = e[e.length - 1];
|
|
248
|
-
a !== t && a.pause();
|
|
249
|
-
}
|
|
250
|
-
var o = e.indexOf(t);
|
|
251
|
-
o === -1 || e.splice(o, 1), e.push(t);
|
|
252
|
-
},
|
|
253
|
-
deactivateTrap: function(e, t) {
|
|
254
|
-
var a = e.indexOf(t);
|
|
255
|
-
a !== -1 && e.splice(a, 1), e.length > 0 && e[e.length - 1].unpause();
|
|
256
|
-
}
|
|
257
|
-
}, Ye = function(e) {
|
|
258
|
-
return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
|
|
259
|
-
}, He = function(e) {
|
|
260
|
-
return (e == null ? void 0 : e.key) === "Escape" || (e == null ? void 0 : e.key) === "Esc" || (e == null ? void 0 : e.keyCode) === 27;
|
|
261
|
-
}, B = function(e) {
|
|
262
|
-
return (e == null ? void 0 : e.key) === "Tab" || (e == null ? void 0 : e.keyCode) === 9;
|
|
263
|
-
}, We = function(e) {
|
|
264
|
-
return B(e) && !e.shiftKey;
|
|
265
|
-
}, Ze = function(e) {
|
|
266
|
-
return B(e) && e.shiftKey;
|
|
267
|
-
}, ie = function(e) {
|
|
268
|
-
return setTimeout(e, 0);
|
|
269
|
-
}, ue = function(e, t) {
|
|
270
|
-
var a = -1;
|
|
271
|
-
return e.every(function(o, c) {
|
|
272
|
-
return t(o) ? (a = c, !1) : !0;
|
|
273
|
-
}), a;
|
|
274
|
-
}, x = function(e) {
|
|
275
|
-
for (var t = arguments.length, a = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
|
|
276
|
-
a[o - 1] = arguments[o];
|
|
277
|
-
return typeof e == "function" ? e.apply(void 0, a) : e;
|
|
278
|
-
}, j = function(e) {
|
|
279
|
-
return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
|
|
280
|
-
}, $e = [], ze = function(e, t) {
|
|
281
|
-
var a = (t == null ? void 0 : t.document) || document, o = (t == null ? void 0 : t.trapStack) || $e, c = ne({
|
|
282
|
-
returnFocusOnDeactivate: !0,
|
|
283
|
-
escapeDeactivates: !0,
|
|
284
|
-
delayInitialFocus: !0,
|
|
285
|
-
isKeyForward: We,
|
|
286
|
-
isKeyBackward: Ze
|
|
287
|
-
}, t), n = {
|
|
288
|
-
// containers given to createFocusTrap()
|
|
289
|
-
// @type {Array<HTMLElement>}
|
|
290
|
-
containers: [],
|
|
291
|
-
// list of objects identifying tabbable nodes in `containers` in the trap
|
|
292
|
-
// NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
|
|
293
|
-
// is active, but the trap should never get to a state where there isn't at least one group
|
|
294
|
-
// with at least one tabbable node in it (that would lead to an error condition that would
|
|
295
|
-
// result in an error being thrown)
|
|
296
|
-
// @type {Array<{
|
|
297
|
-
// container: HTMLElement,
|
|
298
|
-
// tabbableNodes: Array<HTMLElement>, // empty if none
|
|
299
|
-
// focusableNodes: Array<HTMLElement>, // empty if none
|
|
300
|
-
// posTabIndexesFound: boolean,
|
|
301
|
-
// firstTabbableNode: HTMLElement|undefined,
|
|
302
|
-
// lastTabbableNode: HTMLElement|undefined,
|
|
303
|
-
// firstDomTabbableNode: HTMLElement|undefined,
|
|
304
|
-
// lastDomTabbableNode: HTMLElement|undefined,
|
|
305
|
-
// nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
|
|
306
|
-
// }>}
|
|
307
|
-
containerGroups: [],
|
|
308
|
-
// same order/length as `containers` list
|
|
309
|
-
// references to objects in `containerGroups`, but only those that actually have
|
|
310
|
-
// tabbable nodes in them
|
|
311
|
-
// NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
|
|
312
|
-
// the same length
|
|
313
|
-
tabbableGroups: [],
|
|
314
|
-
nodeFocusedBeforeActivation: null,
|
|
315
|
-
mostRecentlyFocusedNode: null,
|
|
316
|
-
active: !1,
|
|
317
|
-
paused: !1,
|
|
318
|
-
// timer ID for when delayInitialFocus is true and initial focus in this trap
|
|
319
|
-
// has been delayed during activation
|
|
320
|
-
delayInitialFocusTimer: void 0,
|
|
321
|
-
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
322
|
-
recentNavEvent: void 0
|
|
323
|
-
}, l, d = function(i, r, s) {
|
|
324
|
-
return i && i[r] !== void 0 ? i[r] : c[s || r];
|
|
325
|
-
}, b = function(i, r) {
|
|
326
|
-
var s = typeof (r == null ? void 0 : r.composedPath) == "function" ? r.composedPath() : void 0;
|
|
327
|
-
return n.containerGroups.findIndex(function(f) {
|
|
328
|
-
var v = f.container, h = f.tabbableNodes;
|
|
329
|
-
return v.contains(i) || // fall back to explicit tabbable search which will take into consideration any
|
|
330
|
-
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
331
|
-
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
332
|
-
// look inside web components even if open)
|
|
333
|
-
(s == null ? void 0 : s.includes(v)) || h.find(function(y) {
|
|
334
|
-
return y === i;
|
|
335
|
-
});
|
|
336
|
-
});
|
|
337
|
-
}, w = function(i) {
|
|
338
|
-
var r = c[i];
|
|
339
|
-
if (typeof r == "function") {
|
|
340
|
-
for (var s = arguments.length, f = new Array(s > 1 ? s - 1 : 0), v = 1; v < s; v++)
|
|
341
|
-
f[v - 1] = arguments[v];
|
|
342
|
-
r = r.apply(void 0, f);
|
|
343
|
-
}
|
|
344
|
-
if (r === !0 && (r = void 0), !r) {
|
|
345
|
-
if (r === void 0 || r === !1)
|
|
346
|
-
return r;
|
|
347
|
-
throw new Error("`".concat(i, "` was specified but was not a node, or did not return a node"));
|
|
348
|
-
}
|
|
349
|
-
var h = r;
|
|
350
|
-
if (typeof r == "string" && (h = a.querySelector(r), !h))
|
|
351
|
-
throw new Error("`".concat(i, "` as selector refers to no known node"));
|
|
352
|
-
return h;
|
|
353
|
-
}, m = function() {
|
|
354
|
-
var i = w("initialFocus");
|
|
355
|
-
if (i === !1)
|
|
356
|
-
return !1;
|
|
357
|
-
if (i === void 0 || !$(i, c.tabbableOptions))
|
|
358
|
-
if (b(a.activeElement) >= 0)
|
|
359
|
-
i = a.activeElement;
|
|
360
|
-
else {
|
|
361
|
-
var r = n.tabbableGroups[0], s = r && r.firstTabbableNode;
|
|
362
|
-
i = s || w("fallbackFocus");
|
|
363
|
-
}
|
|
364
|
-
if (!i)
|
|
365
|
-
throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
366
|
-
return i;
|
|
367
|
-
}, T = function() {
|
|
368
|
-
if (n.containerGroups = n.containers.map(function(i) {
|
|
369
|
-
var r = je(i, c.tabbableOptions), s = Me(i, c.tabbableOptions), f = r.length > 0 ? r[0] : void 0, v = r.length > 0 ? r[r.length - 1] : void 0, h = s.find(function(F) {
|
|
370
|
-
return O(F);
|
|
371
|
-
}), y = s.slice().reverse().find(function(F) {
|
|
372
|
-
return O(F);
|
|
373
|
-
}), N = !!r.find(function(F) {
|
|
374
|
-
return D(F) > 0;
|
|
375
|
-
});
|
|
376
|
-
return {
|
|
377
|
-
container: i,
|
|
378
|
-
tabbableNodes: r,
|
|
379
|
-
focusableNodes: s,
|
|
380
|
-
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
381
|
-
posTabIndexesFound: N,
|
|
382
|
-
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
383
|
-
firstTabbableNode: f,
|
|
384
|
-
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
385
|
-
lastTabbableNode: v,
|
|
386
|
-
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
387
|
-
// would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
|
388
|
-
// because that API doesn't work with Shadow DOM as well as it should (@see
|
|
389
|
-
// https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
|
|
390
|
-
// to address an edge case related to positive tabindex support, this seems like a much easier,
|
|
391
|
-
// "close enough most of the time" alternative for positive tabindexes which should generally
|
|
392
|
-
// be avoided anyway...
|
|
393
|
-
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
394
|
-
firstDomTabbableNode: h,
|
|
395
|
-
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
396
|
-
lastDomTabbableNode: y,
|
|
397
|
-
/**
|
|
398
|
-
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
399
|
-
* in this container, if any.
|
|
400
|
-
* @param {HTMLElement} node
|
|
401
|
-
* @param {boolean} [forward] True if going in forward tab order; false if going
|
|
402
|
-
* in reverse.
|
|
403
|
-
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
404
|
-
*/
|
|
405
|
-
nextTabbableNode: function(k) {
|
|
406
|
-
var P = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, E = r.indexOf(k);
|
|
407
|
-
return E < 0 ? P ? s.slice(s.indexOf(k) + 1).find(function(A) {
|
|
408
|
-
return O(A);
|
|
409
|
-
}) : s.slice(0, s.indexOf(k)).reverse().find(function(A) {
|
|
410
|
-
return O(A);
|
|
411
|
-
}) : r[E + (P ? 1 : -1)];
|
|
412
|
-
}
|
|
413
|
-
};
|
|
414
|
-
}), n.tabbableGroups = n.containerGroups.filter(function(i) {
|
|
415
|
-
return i.tabbableNodes.length > 0;
|
|
416
|
-
}), n.tabbableGroups.length <= 0 && !w("fallbackFocus"))
|
|
417
|
-
throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
|
|
418
|
-
if (n.containerGroups.find(function(i) {
|
|
419
|
-
return i.posTabIndexesFound;
|
|
420
|
-
}) && n.containerGroups.length > 1)
|
|
421
|
-
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
422
|
-
}, C = function p(i) {
|
|
423
|
-
var r = i.activeElement;
|
|
424
|
-
if (r)
|
|
425
|
-
return r.shadowRoot && r.shadowRoot.activeElement !== null ? p(r.shadowRoot) : r;
|
|
426
|
-
}, g = function p(i) {
|
|
427
|
-
if (i !== !1 && i !== C(document)) {
|
|
428
|
-
if (!i || !i.focus) {
|
|
429
|
-
p(m());
|
|
430
|
-
return;
|
|
431
|
-
}
|
|
432
|
-
i.focus({
|
|
433
|
-
preventScroll: !!c.preventScroll
|
|
434
|
-
}), n.mostRecentlyFocusedNode = i, Ye(i) && i.select();
|
|
435
|
-
}
|
|
436
|
-
}, L = function(i) {
|
|
437
|
-
var r = w("setReturnFocus", i);
|
|
438
|
-
return r || (r === !1 ? !1 : i);
|
|
439
|
-
}, K = function(i) {
|
|
440
|
-
var r = i.target, s = i.event, f = i.isBackward, v = f === void 0 ? !1 : f;
|
|
441
|
-
r = r || j(s), T();
|
|
442
|
-
var h = null;
|
|
443
|
-
if (n.tabbableGroups.length > 0) {
|
|
444
|
-
var y = b(r, s), N = y >= 0 ? n.containerGroups[y] : void 0;
|
|
445
|
-
if (y < 0)
|
|
446
|
-
v ? h = n.tabbableGroups[n.tabbableGroups.length - 1].lastTabbableNode : h = n.tabbableGroups[0].firstTabbableNode;
|
|
447
|
-
else if (v) {
|
|
448
|
-
var F = ue(n.tabbableGroups, function(W) {
|
|
449
|
-
var Z = W.firstTabbableNode;
|
|
450
|
-
return r === Z;
|
|
451
|
-
});
|
|
452
|
-
if (F < 0 && (N.container === r || $(r, c.tabbableOptions) && !O(r, c.tabbableOptions) && !N.nextTabbableNode(r, !1)) && (F = y), F >= 0) {
|
|
453
|
-
var k = F === 0 ? n.tabbableGroups.length - 1 : F - 1, P = n.tabbableGroups[k];
|
|
454
|
-
h = D(r) >= 0 ? P.lastTabbableNode : P.lastDomTabbableNode;
|
|
455
|
-
} else B(s) || (h = N.nextTabbableNode(r, !1));
|
|
456
|
-
} else {
|
|
457
|
-
var E = ue(n.tabbableGroups, function(W) {
|
|
458
|
-
var Z = W.lastTabbableNode;
|
|
459
|
-
return r === Z;
|
|
460
|
-
});
|
|
461
|
-
if (E < 0 && (N.container === r || $(r, c.tabbableOptions) && !O(r, c.tabbableOptions) && !N.nextTabbableNode(r)) && (E = y), E >= 0) {
|
|
462
|
-
var A = E === n.tabbableGroups.length - 1 ? 0 : E + 1, ee = n.tabbableGroups[A];
|
|
463
|
-
h = D(r) >= 0 ? ee.firstTabbableNode : ee.firstDomTabbableNode;
|
|
464
|
-
} else B(s) || (h = N.nextTabbableNode(r));
|
|
465
|
-
}
|
|
466
|
-
} else
|
|
467
|
-
h = w("fallbackFocus");
|
|
468
|
-
return h;
|
|
469
|
-
}, I = function(i) {
|
|
470
|
-
var r = j(i);
|
|
471
|
-
if (!(b(r, i) >= 0)) {
|
|
472
|
-
if (x(c.clickOutsideDeactivates, i)) {
|
|
473
|
-
l.deactivate({
|
|
474
|
-
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
475
|
-
// which will result in the outside click setting focus to the node
|
|
476
|
-
// that was clicked (and if not focusable, to "nothing"); by setting
|
|
477
|
-
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
|
|
478
|
-
// on activation (or the configured `setReturnFocus` node), whether the
|
|
479
|
-
// outside click was on a focusable node or not
|
|
480
|
-
returnFocus: c.returnFocusOnDeactivate
|
|
481
|
-
});
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
x(c.allowOutsideClick, i) || i.preventDefault();
|
|
485
|
-
}
|
|
486
|
-
}, Y = function(i) {
|
|
487
|
-
var r = j(i), s = b(r, i) >= 0;
|
|
488
|
-
if (s || r instanceof Document)
|
|
489
|
-
s && (n.mostRecentlyFocusedNode = r);
|
|
490
|
-
else {
|
|
491
|
-
i.stopImmediatePropagation();
|
|
492
|
-
var f, v = !0;
|
|
493
|
-
if (n.mostRecentlyFocusedNode)
|
|
494
|
-
if (D(n.mostRecentlyFocusedNode) > 0) {
|
|
495
|
-
var h = b(n.mostRecentlyFocusedNode), y = n.containerGroups[h].tabbableNodes;
|
|
496
|
-
if (y.length > 0) {
|
|
497
|
-
var N = y.findIndex(function(F) {
|
|
498
|
-
return F === n.mostRecentlyFocusedNode;
|
|
499
|
-
});
|
|
500
|
-
N >= 0 && (c.isKeyForward(n.recentNavEvent) ? N + 1 < y.length && (f = y[N + 1], v = !1) : N - 1 >= 0 && (f = y[N - 1], v = !1));
|
|
501
|
-
}
|
|
502
|
-
} else
|
|
503
|
-
n.containerGroups.some(function(F) {
|
|
504
|
-
return F.tabbableNodes.some(function(k) {
|
|
505
|
-
return D(k) > 0;
|
|
506
|
-
});
|
|
507
|
-
}) || (v = !1);
|
|
508
|
-
else
|
|
509
|
-
v = !1;
|
|
510
|
-
v && (f = K({
|
|
511
|
-
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
512
|
-
// outside the trap causing the focus escape we're trying to fix)
|
|
513
|
-
target: n.mostRecentlyFocusedNode,
|
|
514
|
-
isBackward: c.isKeyBackward(n.recentNavEvent)
|
|
515
|
-
})), g(f || n.mostRecentlyFocusedNode || m());
|
|
516
|
-
}
|
|
517
|
-
n.recentNavEvent = void 0;
|
|
518
|
-
}, be = function(i) {
|
|
519
|
-
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
520
|
-
n.recentNavEvent = i;
|
|
521
|
-
var s = K({
|
|
522
|
-
event: i,
|
|
523
|
-
isBackward: r
|
|
524
|
-
});
|
|
525
|
-
s && (B(i) && i.preventDefault(), g(s));
|
|
526
|
-
}, X = function(i) {
|
|
527
|
-
if (He(i) && x(c.escapeDeactivates, i) !== !1) {
|
|
528
|
-
i.preventDefault(), l.deactivate();
|
|
529
|
-
return;
|
|
530
|
-
}
|
|
531
|
-
(c.isKeyForward(i) || c.isKeyBackward(i)) && be(i, c.isKeyBackward(i));
|
|
532
|
-
}, J = function(i) {
|
|
533
|
-
var r = j(i);
|
|
534
|
-
b(r, i) >= 0 || x(c.clickOutsideDeactivates, i) || x(c.allowOutsideClick, i) || (i.preventDefault(), i.stopImmediatePropagation());
|
|
535
|
-
}, Q = function() {
|
|
536
|
-
if (n.active)
|
|
537
|
-
return re.activateTrap(o, l), n.delayInitialFocusTimer = c.delayInitialFocus ? ie(function() {
|
|
538
|
-
g(m());
|
|
539
|
-
}) : g(m()), a.addEventListener("focusin", Y, !0), a.addEventListener("mousedown", I, {
|
|
540
|
-
capture: !0,
|
|
541
|
-
passive: !1
|
|
542
|
-
}), a.addEventListener("touchstart", I, {
|
|
543
|
-
capture: !0,
|
|
544
|
-
passive: !1
|
|
545
|
-
}), a.addEventListener("click", J, {
|
|
546
|
-
capture: !0,
|
|
547
|
-
passive: !1
|
|
548
|
-
}), a.addEventListener("keydown", X, {
|
|
549
|
-
capture: !0,
|
|
550
|
-
passive: !1
|
|
551
|
-
}), l;
|
|
552
|
-
}, _ = function() {
|
|
553
|
-
if (n.active)
|
|
554
|
-
return a.removeEventListener("focusin", Y, !0), a.removeEventListener("mousedown", I, !0), a.removeEventListener("touchstart", I, !0), a.removeEventListener("click", J, !0), a.removeEventListener("keydown", X, !0), l;
|
|
555
|
-
}, pe = function(i) {
|
|
556
|
-
var r = i.some(function(s) {
|
|
557
|
-
var f = Array.from(s.removedNodes);
|
|
558
|
-
return f.some(function(v) {
|
|
559
|
-
return v === n.mostRecentlyFocusedNode;
|
|
560
|
-
});
|
|
561
|
-
});
|
|
562
|
-
r && g(m());
|
|
563
|
-
}, H = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(pe) : void 0, R = function() {
|
|
564
|
-
H && (H.disconnect(), n.active && !n.paused && n.containers.map(function(i) {
|
|
565
|
-
H.observe(i, {
|
|
566
|
-
subtree: !0,
|
|
567
|
-
childList: !0
|
|
568
|
-
});
|
|
569
|
-
}));
|
|
570
|
-
};
|
|
571
|
-
return l = {
|
|
572
|
-
get active() {
|
|
573
|
-
return n.active;
|
|
574
|
-
},
|
|
575
|
-
get paused() {
|
|
576
|
-
return n.paused;
|
|
577
|
-
},
|
|
578
|
-
activate: function(i) {
|
|
579
|
-
if (n.active)
|
|
580
|
-
return this;
|
|
581
|
-
var r = d(i, "onActivate"), s = d(i, "onPostActivate"), f = d(i, "checkCanFocusTrap");
|
|
582
|
-
f || T(), n.active = !0, n.paused = !1, n.nodeFocusedBeforeActivation = a.activeElement, r == null || r();
|
|
583
|
-
var v = function() {
|
|
584
|
-
f && T(), Q(), R(), s == null || s();
|
|
585
|
-
};
|
|
586
|
-
return f ? (f(n.containers.concat()).then(v, v), this) : (v(), this);
|
|
587
|
-
},
|
|
588
|
-
deactivate: function(i) {
|
|
589
|
-
if (!n.active)
|
|
590
|
-
return this;
|
|
591
|
-
var r = ne({
|
|
592
|
-
onDeactivate: c.onDeactivate,
|
|
593
|
-
onPostDeactivate: c.onPostDeactivate,
|
|
594
|
-
checkCanReturnFocus: c.checkCanReturnFocus
|
|
595
|
-
}, i);
|
|
596
|
-
clearTimeout(n.delayInitialFocusTimer), n.delayInitialFocusTimer = void 0, _(), n.active = !1, n.paused = !1, R(), re.deactivateTrap(o, l);
|
|
597
|
-
var s = d(r, "onDeactivate"), f = d(r, "onPostDeactivate"), v = d(r, "checkCanReturnFocus"), h = d(r, "returnFocus", "returnFocusOnDeactivate");
|
|
598
|
-
s == null || s();
|
|
599
|
-
var y = function() {
|
|
600
|
-
ie(function() {
|
|
601
|
-
h && g(L(n.nodeFocusedBeforeActivation)), f == null || f();
|
|
602
|
-
});
|
|
603
|
-
};
|
|
604
|
-
return h && v ? (v(L(n.nodeFocusedBeforeActivation)).then(y, y), this) : (y(), this);
|
|
605
|
-
},
|
|
606
|
-
pause: function(i) {
|
|
607
|
-
if (n.paused || !n.active)
|
|
608
|
-
return this;
|
|
609
|
-
var r = d(i, "onPause"), s = d(i, "onPostPause");
|
|
610
|
-
return n.paused = !0, r == null || r(), _(), R(), s == null || s(), this;
|
|
611
|
-
},
|
|
612
|
-
unpause: function(i) {
|
|
613
|
-
if (!n.paused || !n.active)
|
|
614
|
-
return this;
|
|
615
|
-
var r = d(i, "onUnpause"), s = d(i, "onPostUnpause");
|
|
616
|
-
return n.paused = !1, r == null || r(), T(), Q(), R(), s == null || s(), this;
|
|
617
|
-
},
|
|
618
|
-
updateContainerElements: function(i) {
|
|
619
|
-
var r = [].concat(i).filter(Boolean);
|
|
620
|
-
return n.containers = r.map(function(s) {
|
|
621
|
-
return typeof s == "string" ? a.querySelector(s) : s;
|
|
622
|
-
}), n.active && T(), R(), this;
|
|
623
|
-
}
|
|
624
|
-
}, l.updateContainerElements(e), l;
|
|
625
|
-
};
|
|
626
|
-
/*!
|
|
627
|
-
* focus-trap-vue v4.0.1
|
|
628
|
-
* (c) 2023 Eduardo San Martin Morote
|
|
629
|
-
* @license MIT
|
|
630
|
-
*/
|
|
631
|
-
const Xe = {
|
|
632
|
-
escapeDeactivates: {
|
|
633
|
-
type: Boolean,
|
|
634
|
-
default: !0
|
|
635
|
-
},
|
|
636
|
-
returnFocusOnDeactivate: {
|
|
637
|
-
type: Boolean,
|
|
638
|
-
default: !0
|
|
639
|
-
},
|
|
640
|
-
allowOutsideClick: {
|
|
641
|
-
type: [Boolean, Function],
|
|
642
|
-
default: !0
|
|
643
|
-
},
|
|
644
|
-
clickOutsideDeactivates: [Boolean, Function],
|
|
645
|
-
initialFocus: [String, Function, Boolean],
|
|
646
|
-
fallbackFocus: [String, Function],
|
|
647
|
-
checkCanFocusTrap: Function,
|
|
648
|
-
checkCanReturnFocus: Function,
|
|
649
|
-
delayInitialFocus: {
|
|
650
|
-
type: Boolean,
|
|
651
|
-
default: !0
|
|
652
|
-
},
|
|
653
|
-
document: Object,
|
|
654
|
-
preventScroll: Boolean,
|
|
655
|
-
setReturnFocus: [Object, String, Boolean, Function],
|
|
656
|
-
tabbableOptions: Object
|
|
657
|
-
}, Qe = he({
|
|
658
|
-
props: Object.assign({
|
|
659
|
-
active: {
|
|
660
|
-
// TODO: could be options for activate but what about the options for deactivating?
|
|
661
|
-
type: Boolean,
|
|
662
|
-
default: !0
|
|
663
|
-
}
|
|
664
|
-
}, Xe),
|
|
665
|
-
emits: [
|
|
666
|
-
"update:active",
|
|
667
|
-
"activate",
|
|
668
|
-
"postActivate",
|
|
669
|
-
"deactivate",
|
|
670
|
-
"postDeactivate"
|
|
671
|
-
],
|
|
672
|
-
render() {
|
|
673
|
-
return this.renderImpl();
|
|
674
|
-
},
|
|
675
|
-
setup(u, { slots: e, emit: t }) {
|
|
676
|
-
let a;
|
|
677
|
-
const o = oe(null), c = ge(() => {
|
|
678
|
-
const l = o.value;
|
|
679
|
-
return l && (l instanceof HTMLElement ? l : l.$el);
|
|
680
|
-
});
|
|
681
|
-
function n() {
|
|
682
|
-
return a || (a = ze(c.value, {
|
|
683
|
-
escapeDeactivates: u.escapeDeactivates,
|
|
684
|
-
allowOutsideClick: u.allowOutsideClick,
|
|
685
|
-
returnFocusOnDeactivate: u.returnFocusOnDeactivate,
|
|
686
|
-
clickOutsideDeactivates: u.clickOutsideDeactivates,
|
|
687
|
-
onActivate: () => {
|
|
688
|
-
t("update:active", !0), t("activate");
|
|
689
|
-
},
|
|
690
|
-
onDeactivate: () => {
|
|
691
|
-
t("update:active", !1), t("deactivate");
|
|
692
|
-
},
|
|
693
|
-
onPostActivate: () => t("postActivate"),
|
|
694
|
-
onPostDeactivate: () => t("postDeactivate"),
|
|
695
|
-
initialFocus: u.initialFocus,
|
|
696
|
-
fallbackFocus: u.fallbackFocus,
|
|
697
|
-
tabbableOptions: u.tabbableOptions,
|
|
698
|
-
delayInitialFocus: u.delayInitialFocus
|
|
699
|
-
}));
|
|
700
|
-
}
|
|
701
|
-
return ye(() => {
|
|
702
|
-
me(() => u.active, (l) => {
|
|
703
|
-
l && c.value ? n().activate() : a && (a.deactivate(), (!c.value || c.value.nodeType === Node.COMMENT_NODE) && (a = null));
|
|
704
|
-
}, { immediate: !0, flush: "post" });
|
|
705
|
-
}), we(() => {
|
|
706
|
-
a && a.deactivate(), a = null;
|
|
707
|
-
}), {
|
|
708
|
-
activate() {
|
|
709
|
-
n().activate();
|
|
710
|
-
},
|
|
711
|
-
deactivate() {
|
|
712
|
-
a && a.deactivate();
|
|
713
|
-
},
|
|
714
|
-
renderImpl() {
|
|
715
|
-
if (!e.default)
|
|
716
|
-
return null;
|
|
717
|
-
const l = e.default().filter((b) => b.type !== Fe);
|
|
718
|
-
return !l || !l.length || l.length > 1 ? (console.error("[focus-trap-vue]: FocusTrap requires exactly one child."), l) : Ne(l[0], { ref: o });
|
|
719
|
-
}
|
|
720
|
-
};
|
|
721
|
-
}
|
|
722
|
-
}), M = (u) => {
|
|
723
|
-
u.preventDefault(), u.stopPropagation(), u.stopImmediatePropagation();
|
|
724
|
-
}, _e = ({
|
|
725
|
-
getNextElement: u,
|
|
726
|
-
getFirstElement: e,
|
|
727
|
-
getLastElement: t,
|
|
728
|
-
close: a,
|
|
729
|
-
disableSpaceToClick: o,
|
|
730
|
-
keepOpenedOnTab: c
|
|
731
|
-
}) => {
|
|
732
|
-
const n = oe(null), l = () => {
|
|
733
|
-
};
|
|
734
|
-
let d = l;
|
|
735
|
-
const b = () => {
|
|
736
|
-
n.value = null, d = l;
|
|
737
|
-
}, w = (g) => {
|
|
738
|
-
n.value = g.index, d = g.onClick;
|
|
739
|
-
}, m = (g) => {
|
|
740
|
-
w(u(n.value, g));
|
|
741
|
-
}, T = () => {
|
|
742
|
-
b(), a();
|
|
743
|
-
};
|
|
744
|
-
return {
|
|
745
|
-
onKeydown: (g) => {
|
|
746
|
-
switch (g.code) {
|
|
747
|
-
case "ArrowDown":
|
|
748
|
-
M(g), m(1);
|
|
749
|
-
break;
|
|
750
|
-
case "ArrowUp":
|
|
751
|
-
M(g), m(-1);
|
|
752
|
-
break;
|
|
753
|
-
case "Enter":
|
|
754
|
-
case "Space": {
|
|
755
|
-
const L = g.code === "Enter", K = g.code === "Space";
|
|
756
|
-
n.value !== null && (L || K && !o) && (M(g), d());
|
|
757
|
-
break;
|
|
758
|
-
}
|
|
759
|
-
case "Home":
|
|
760
|
-
e && w(e());
|
|
761
|
-
break;
|
|
762
|
-
case "End":
|
|
763
|
-
t && w(t());
|
|
764
|
-
break;
|
|
765
|
-
case "Escape":
|
|
766
|
-
M(g), T();
|
|
767
|
-
break;
|
|
768
|
-
case "Tab":
|
|
769
|
-
c || T();
|
|
770
|
-
break;
|
|
771
|
-
}
|
|
772
|
-
},
|
|
773
|
-
currentIndex: Te(n),
|
|
774
|
-
resetNavigation: b,
|
|
775
|
-
setElement: w
|
|
776
|
-
};
|
|
777
|
-
};
|
|
778
|
-
export {
|
|
779
|
-
Qe as F,
|
|
780
|
-
_e as u
|
|
781
|
-
};
|