@svgrid/grid-wc 3.0.46 → 3.0.48

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.
Files changed (103) hide show
  1. package/dist/GridFind-C1YbloFh.js +39 -0
  2. package/dist/GridFooter-DOR8m9GQ.js +142 -0
  3. package/dist/GridMenus-Da8XGbc6.js +1461 -0
  4. package/dist/PinSplitter-Du4ZF8T3.js +178 -0
  5. package/dist/SvChartMenu-B6kpmwUv.js +401 -0
  6. package/dist/{SvDateRangeInput-Cpss2SsG.js → SvDateRangeInput-ByR-LFgf.js} +78 -77
  7. package/dist/SvDateTimePicker-BCxhFb5c.js +763 -0
  8. package/dist/{SvField-C--8r4go.js → SvField-CtzxdF7J.js} +100 -99
  9. package/dist/SvGridCellEditor-BUdVD7xM.js +594 -0
  10. package/dist/SvGridChart-DkKI8-bj.js +3684 -0
  11. package/dist/SvGridChartBuilder-BCQ3W8TY.js +1086 -0
  12. package/dist/SvGridChartPanel-uqul044E.js +1689 -0
  13. package/dist/{SvGridChartView-Bvacwk37.js → SvGridChartView-DWxEFzdM.js} +9 -8
  14. package/dist/SvGridDropdown-CnCQuXaI.js +258 -0
  15. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +12 -3
  16. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
  17. package/dist/angular/types/svgrid-grid-wc-angular.d.ts +5 -1
  18. package/dist/chart/SvChartMenu-NxEyX5kU.js +635 -0
  19. package/dist/chart/{chart-export-C43UPY8D.js → chart-export-Dj_zVsjI.js} +5 -7
  20. package/dist/chart/chart-export-pdf-pmzjhHhB.js +156 -0
  21. package/dist/chart/{client-BuB0wIgc.js → client-Y303i9Lw.js} +1317 -1214
  22. package/dist/chart/sv-chart-element.js +2390 -2405
  23. package/dist/chart-export-pdf-DyuVs1gO.js +156 -0
  24. package/dist/client-OtsRxGjS.js +3075 -0
  25. package/dist/{column-resize-DUPgynvc.js → column-resize-SEn7el6C.js} +21 -9
  26. package/dist/{csv-injection-Ce26_TOb.js → csv-injection-Cxf6dMrr.js} +1 -1
  27. package/dist/{date-format-B0RznzxC.js → date-format-DngG1HJ5.js} +402 -407
  28. package/dist/{shadow/export-format-6jDuF2nb.js → export-format-7DhxeN27.js} +2 -2
  29. package/dist/{grid-extension.svelte-CBhmpjuc.js → grid-extension.svelte-DToFhcZv.js} +1 -1
  30. package/dist/grid-menu-messages-BEsB6Jhh.js +57 -0
  31. package/dist/history-Q12tf0k-.js +80 -0
  32. package/dist/list-option-DpIu99JN.js +203 -0
  33. package/dist/menu-focus-lmTebXyL.js +45 -0
  34. package/dist/range-commit-C6Rogxem.js +385 -0
  35. package/dist/react/index.d.ts +11 -0
  36. package/dist/react/index.js +2 -1
  37. package/dist/shadow/GridFind-CcoKoisE.js +39 -0
  38. package/dist/shadow/GridFooter-CDq71ytl.js +142 -0
  39. package/dist/shadow/GridMenus-RAp-E3hp.js +1461 -0
  40. package/dist/shadow/PinSplitter-BAYTAZtm.js +178 -0
  41. package/dist/shadow/SvChartMenu-C74rWwjU.js +401 -0
  42. package/dist/shadow/{SvDateRangeInput-Cpss2SsG.js → SvDateRangeInput-9Wq4E64y.js} +78 -77
  43. package/dist/shadow/SvDateTimePicker-y9jPLR19.js +763 -0
  44. package/dist/shadow/{SvField-C--8r4go.js → SvField-DGPj2clt.js} +100 -99
  45. package/dist/shadow/SvGridCellEditor-CzeBp9lp.js +594 -0
  46. package/dist/shadow/SvGridChart-zTsB6F3Y.js +3684 -0
  47. package/dist/shadow/SvGridChartBuilder-VUKgOcp7.js +1086 -0
  48. package/dist/shadow/SvGridChartPanel-DkjEUB7t.js +1689 -0
  49. package/dist/shadow/{SvGridChartView-Bvacwk37.js → SvGridChartView-DQmJahyT.js} +9 -8
  50. package/dist/shadow/SvGridDropdown-B_5kqHQE.js +258 -0
  51. package/dist/shadow/chart-export-pdf-BZy6f5QB.js +156 -0
  52. package/dist/shadow/client-OtsRxGjS.js +3075 -0
  53. package/dist/shadow/{column-resize-DUPgynvc.js → column-resize-SEn7el6C.js} +21 -9
  54. package/dist/shadow/{csv-injection-Ce26_TOb.js → csv-injection-Cxf6dMrr.js} +1 -1
  55. package/dist/shadow/{date-format-B0RznzxC.js → date-format-C9UkbCig.js} +402 -407
  56. package/dist/{export-format-6jDuF2nb.js → shadow/export-format-7DhxeN27.js} +2 -2
  57. package/dist/shadow/{grid-extension.svelte-CBhmpjuc.js → grid-extension.svelte-DToFhcZv.js} +1 -1
  58. package/dist/shadow/grid-menu-messages-BEsB6Jhh.js +57 -0
  59. package/dist/shadow/history-Q12tf0k-.js +80 -0
  60. package/dist/shadow/list-option-DpIu99JN.js +203 -0
  61. package/dist/shadow/menu-focus-lmTebXyL.js +45 -0
  62. package/dist/shadow/range-commit-C6Rogxem.js +385 -0
  63. package/dist/shadow/sv-grid-shadow-element.d.ts +7 -0
  64. package/dist/shadow/sv-grid-shadow-element.js +4236 -4469
  65. package/dist/shadow/{svelte-virtualizer.svelte-u-y0InK2.js → svelte-virtualizer.svelte-DWvD9wvL.js} +17 -12
  66. package/dist/sv-grid-element.d.ts +7 -0
  67. package/dist/sv-grid-element.js +4219 -4452
  68. package/dist/{svelte-virtualizer.svelte-u-y0InK2.js → svelte-virtualizer.svelte-DWvD9wvL.js} +17 -12
  69. package/dist/vue/index.d.ts +6 -2
  70. package/dist/vue/index.js +1 -1
  71. package/package.json +4 -4
  72. package/dist/GridFind-DianRZxS.js +0 -39
  73. package/dist/GridFooter-Bp3o5qJX.js +0 -162
  74. package/dist/GridMenus-BYkY3nhr.js +0 -1405
  75. package/dist/PinSplitter-CinhgIrH.js +0 -130
  76. package/dist/SvChartMenu-CgAcTloT.js +0 -413
  77. package/dist/SvDateTimePicker-DyRO_e91.js +0 -770
  78. package/dist/SvGridCellEditor-DHHGSjgp.js +0 -584
  79. package/dist/SvGridChart-BFQLtNmn.js +0 -3703
  80. package/dist/SvGridChartBuilder-CtGuoAOV.js +0 -1166
  81. package/dist/SvGridChartPanel-CeaXNzmV.js +0 -1743
  82. package/dist/SvGridDropdown-CrECQYeq.js +0 -257
  83. package/dist/chart/SvChartMenu-DslxOgPN.js +0 -590
  84. package/dist/chart/chart-export-pdf-C0_y8glC.js +0 -104
  85. package/dist/chart-export-pdf-DDVtypH7.js +0 -104
  86. package/dist/client-DtIdusS4.js +0 -2974
  87. package/dist/focus-trap-Dbb2tJxb.js +0 -65
  88. package/dist/list-option-DrRyivWp.js +0 -82
  89. package/dist/shadow/GridFind-DianRZxS.js +0 -39
  90. package/dist/shadow/GridFooter-DvMFqeNV.js +0 -162
  91. package/dist/shadow/GridMenus-DKLNTKDZ.js +0 -1405
  92. package/dist/shadow/PinSplitter-CinhgIrH.js +0 -130
  93. package/dist/shadow/SvChartMenu-CgAcTloT.js +0 -413
  94. package/dist/shadow/SvDateTimePicker-DyRO_e91.js +0 -770
  95. package/dist/shadow/SvGridCellEditor-DHHGSjgp.js +0 -584
  96. package/dist/shadow/SvGridChart-BFQLtNmn.js +0 -3703
  97. package/dist/shadow/SvGridChartBuilder-CtGuoAOV.js +0 -1166
  98. package/dist/shadow/SvGridChartPanel-CeaXNzmV.js +0 -1743
  99. package/dist/shadow/SvGridDropdown-CrECQYeq.js +0 -257
  100. package/dist/shadow/chart-export-pdf-DDVtypH7.js +0 -104
  101. package/dist/shadow/client-DtIdusS4.js +0 -2974
  102. package/dist/shadow/focus-trap-Dbb2tJxb.js +0 -65
  103. package/dist/shadow/list-option-DrRyivWp.js +0 -82
@@ -1,5 +1,5 @@
1
1
  import { a as e, n as t, r as n, t as r } from "./cell-formatting-B2BDgY-k.js";
2
- import { t as i } from "./csv-injection-Ce26_TOb.js";
2
+ import { t as i } from "./csv-injection-Cxf6dMrr.js";
3
3
  import "./conditional-formatting-LFQdw2jz.js";
4
4
  //#region ../grid/dist/export-format.js
5
5
  function a(t) {
@@ -52,7 +52,7 @@ function u(e) {
52
52
  var d = () => new Promise((e) => setTimeout(e, 0));
53
53
  function f(e, t, n) {
54
54
  let r = e == null ? "" : e instanceof Date ? o(e) : String(e);
55
- return r === "" ? r : (n && typeof e == "string" && (r = i(r)), r.includes(t) || r.includes("\"") || r.includes("\n") || r.includes("\r") ? `"${r.replace(/"/g, "\"\"")}"` : r);
55
+ return r === "" ? r : (n && typeof e != "number" && (r = i(r)), r.includes(t) || r.includes("\"") || r.includes("\n") || r.includes("\r") ? `"${r.replace(/"/g, "\"\"")}"` : r);
56
56
  }
57
57
  async function p(e, t, n = {}) {
58
58
  let r = n.csv?.delimiter ?? ",", i = n.csv?.eol ?? "\r\n", a = n.csv?.bom ?? !0, o = n.csv?.escapeFormulas ?? !0, s = Math.max(1, n.chunkRows ?? 5e3), c = e.length, p = [];
@@ -1,4 +1,4 @@
1
- import { et as e, z as t } from "./client-DtIdusS4.js";
1
+ import { $ as e, z as t } from "./client-OtsRxGjS.js";
2
2
  //#region ../grid/dist/filtering/filter-operator-catalogue.js
3
3
  var n = ["isBlank", "isNotBlank"];
4
4
  function r(e) {
@@ -0,0 +1,57 @@
1
+ import { a as e } from "./editor-contract-peBDxir_.js";
2
+ //#region ../grid/dist/grid-menu-messages.js
3
+ var t = {
4
+ menuSortAscending: "Sort ascending",
5
+ menuSortDescending: "Sort descending",
6
+ menuSortBy: "Sort {label}",
7
+ menuRemoveSort: "Remove sort",
8
+ menuPinLeft: "Pin to left",
9
+ menuPinRight: "Pin to right",
10
+ menuUnpin: "Unpin column",
11
+ menuAutosize: "Autosize this column",
12
+ menuAutosizeAll: "Autosize all columns",
13
+ menuGroupBy: "Group by this column",
14
+ menuRemoveGrouping: "Remove grouping",
15
+ menuChooseColumns: "Choose columns",
16
+ menuResetColumns: "Reset columns",
17
+ menuTabGeneral: "General",
18
+ menuTabFilter: "Filter",
19
+ menuTabColumns: "Columns",
20
+ menuVisibleColumns: "Visible columns",
21
+ filterCondition: "Filter condition",
22
+ filterSecondCondition: "Second filter condition",
23
+ filterCombine: "Combine conditions",
24
+ filterAnd: "AND",
25
+ filterOr: "OR",
26
+ filterRemoveSecond: "Remove second condition",
27
+ filterAddCondition: "+ Add condition",
28
+ filterValue: "Filter value...",
29
+ filterValues: "value, value...",
30
+ filterPattern: "Pattern...",
31
+ filterFrom: "From",
32
+ filterTo: "To",
33
+ filterPickRange: "Pick a range...",
34
+ filterSearchValues: "Search values...",
35
+ filterValuesLabel: "Filter values",
36
+ filterSelectAll: "(Select all)",
37
+ filterSelectAllResults: "(Select all results)",
38
+ filterNoValues: "No values",
39
+ filterShowing: "Showing {shown} of {total}",
40
+ filterDone: "Done",
41
+ commentPlaceholder: "Add a comment…",
42
+ commentRemove: "Remove",
43
+ commentCancel: "Cancel",
44
+ commentSave: "Save",
45
+ findLabel: "Find in grid",
46
+ findPlaceholder: "Find in grid…",
47
+ findNoMatches: "No matches",
48
+ findCount: "{at} of {total}",
49
+ findPrevious: "Previous match",
50
+ findNext: "Next match",
51
+ findClose: "Close find"
52
+ };
53
+ function n(n) {
54
+ return e(t, n);
55
+ }
56
+ //#endregion
57
+ export { n as t };
@@ -0,0 +1,80 @@
1
+ //#region ../grid/dist/history.js
2
+ function e(e, t) {
3
+ let n = e[t]?.groupId;
4
+ if (!n) return t;
5
+ let r = t;
6
+ for (; r > 0 && e[r - 1]?.groupId === n;) --r;
7
+ return r;
8
+ }
9
+ function t(e, t) {
10
+ let n = e[t]?.groupId;
11
+ if (!n) return t;
12
+ let r = t;
13
+ for (; r < e.length - 1 && e[r + 1]?.groupId === n;) r += 1;
14
+ return r;
15
+ }
16
+ function n(t, n) {
17
+ let r = t.length, i = 0;
18
+ for (; r > 0 && i < n;) r = e(t, r - 1), i += 1;
19
+ return r === 0 ? t : t.slice(r);
20
+ }
21
+ function r(e) {
22
+ let t = e.historyPtr >= 0 ? e.history[e.historyPtr] : void 0;
23
+ return t ? { tag: t.tag } : null;
24
+ }
25
+ function i(e) {
26
+ let t = e.historyPtr < e.history.length - 1 ? e.history[e.historyPtr + 1] : void 0;
27
+ return t ? { tag: t.tag } : null;
28
+ }
29
+ function a(t) {
30
+ if (t.historyPtr < 0) return !1;
31
+ let n = t.historyPtr;
32
+ if (!t.history[n]) return !1;
33
+ let r = e(t.history, n);
34
+ for (let e = n; e >= r; --e) {
35
+ let n = t.history[e];
36
+ n && t.applyHistoryStep(n, "undo");
37
+ }
38
+ return t.historyPtr = r - 1, t.historyVersion += 1, !0;
39
+ }
40
+ function o(e) {
41
+ if (e.historyPtr >= e.history.length - 1) return !1;
42
+ let n = e.historyPtr + 1;
43
+ if (!e.history[n]) return !1;
44
+ let r = t(e.history, n);
45
+ for (let t = n; t <= r; t += 1) {
46
+ let n = e.history[t];
47
+ n && e.applyHistoryStep(n, "redo");
48
+ }
49
+ return e.historyPtr = r, e.historyVersion += 1, !0;
50
+ }
51
+ function s(e, t, r) {
52
+ if (!t.length) return;
53
+ let i = e.historyGroupId ?? (r && t.length > 1 ? r : void 0), a = e.historyTag, o = e.history.slice(0, e.historyPtr + 1);
54
+ for (let e of t) {
55
+ let t = a === void 0 ? e : {
56
+ ...e,
57
+ tag: a
58
+ };
59
+ o.push(i ? {
60
+ ...t,
61
+ groupId: i
62
+ } : t);
63
+ }
64
+ o = n(o, e.UNDO_LIMIT), e.history = o, e.historyPtr = e.history.length - 1, e.historyVersion += 1;
65
+ }
66
+ var c = 0;
67
+ function l() {
68
+ return c += 1, `g${c}`;
69
+ }
70
+ function u(e, t) {
71
+ let n = e.historyGroupId;
72
+ e.historyGroupId = n ?? l();
73
+ try {
74
+ return t();
75
+ } finally {
76
+ e.historyGroupId = n;
77
+ }
78
+ }
79
+ //#endregion
80
+ export { o as a, s as i, i as n, u as o, r, a as s, l as t };
@@ -0,0 +1,203 @@
1
+ //#region ../grid/dist/a11y/focus-trap.js
2
+ var e = [
3
+ "a[href]",
4
+ "area[href]",
5
+ "button:not([disabled])",
6
+ "input:not([disabled])",
7
+ "select:not([disabled])",
8
+ "textarea:not([disabled])",
9
+ "iframe",
10
+ "audio[controls]",
11
+ "video[controls]",
12
+ "[contenteditable]:not([contenteditable=\"false\"])",
13
+ "[tabindex]"
14
+ ].join(",");
15
+ function t(e) {
16
+ if (e.hasAttribute("disabled") || e.getAttribute("aria-hidden") === "true" || e.hidden || e.closest("[hidden]")) return !1;
17
+ let t = e.style;
18
+ return !(t.display === "none" || t.visibility === "hidden" || typeof e.getClientRects == "function" && e.getClientRects().length === 0 && document.body.getClientRects().length > 0);
19
+ }
20
+ function n(n) {
21
+ return Array.from(n.querySelectorAll(e)).filter((e) => {
22
+ let n = e.getAttribute("tabindex");
23
+ return n !== null && Number(n) < 0 ? !1 : t(e);
24
+ });
25
+ }
26
+ function r(e, t) {
27
+ let r = null, i = 0, a = !1, o = !1, s, c = () => {
28
+ clearTimeout(s), s = setTimeout(l, 0);
29
+ };
30
+ function l() {
31
+ let s = document.activeElement, c = !r?.isConnected || r.matches(":disabled"), l = !s || s === document.body || s === r && c, u = a;
32
+ if (a = !1, !r || !l) {
33
+ e.contains(s) || (r = null);
34
+ return;
35
+ }
36
+ if (!u) {
37
+ r = null;
38
+ return;
39
+ }
40
+ if (!c) return r.focus();
41
+ let d = n(e), f = d[Math.min(i, d.length - 1)], p = f && !(o && f.matches("input, textarea, [contenteditable]")) ? f : t?.() ?? e;
42
+ p === e && !e.hasAttribute("tabindex") && e.setAttribute("tabindex", "-1"), p.focus({ preventScroll: !0 });
43
+ }
44
+ let u = (t) => {
45
+ r = t.target, i = Math.max(0, n(e).indexOf(r));
46
+ }, d = (e) => {
47
+ o = e.pointerType === "touch";
48
+ }, f = new MutationObserver((e) => {
49
+ r && (e.some((e) => e.type === "childList" || e.target === r) && (a = !0), c());
50
+ });
51
+ return e.addEventListener("focusin", u), e.addEventListener("focusout", c), e.addEventListener("pointerdown", d, !0), f.observe(e, {
52
+ subtree: !0,
53
+ childList: !0,
54
+ attributes: !0,
55
+ attributeFilter: ["disabled"]
56
+ }), { destroy() {
57
+ clearTimeout(s), f.disconnect(), e.removeEventListener("focusin", u), e.removeEventListener("focusout", c), e.removeEventListener("pointerdown", d, !0);
58
+ } };
59
+ }
60
+ function i(e) {
61
+ let t = [];
62
+ for (let n = e; n && n !== document.body; n = n.parentElement ?? n.getRootNode().host ?? null) t.push({
63
+ el: n,
64
+ next: n.nextElementSibling
65
+ });
66
+ return t;
67
+ }
68
+ function a(t) {
69
+ let r = (e) => e?.isConnected ? (e.focus({ preventScroll: !0 }), e.getRootNode().activeElement === e) : !1, i = (t) => !!t && r(t.matches(e) ? t : n(t)[0]);
70
+ t.some(({ el: t }) => t.matches(e) && r(t)) || t.some(({ el: e, next: t }) => i(e.isConnected ? e : t));
71
+ }
72
+ function o(e, t = {}) {
73
+ let { initialFocus: o = "first", returnFocus: s = !0 } = t, c = null, l = [], u = !1, d = null;
74
+ function f() {
75
+ let t = o;
76
+ return t === "container" ? e : t === "first" ? n(e)[0] ?? e : typeof t == "function" ? t() : t;
77
+ }
78
+ function p(r) {
79
+ if (!u) return;
80
+ if (r.key === "Escape" && t.onEscape) {
81
+ t.onEscape(r);
82
+ return;
83
+ }
84
+ if (r.key !== "Tab") return;
85
+ let i = n(e);
86
+ if (!i.length) {
87
+ r.preventDefault(), e.focus();
88
+ return;
89
+ }
90
+ let a = i[0], o = i[i.length - 1], s = document.activeElement;
91
+ if (!e.contains(s)) {
92
+ r.preventDefault(), a.focus();
93
+ return;
94
+ }
95
+ r.shiftKey && s === a ? (r.preventDefault(), o.focus()) : !r.shiftKey && s === o && (r.preventDefault(), a.focus());
96
+ }
97
+ function m() {
98
+ u || (u = !0, c = document.activeElement, e.hasAttribute("tabindex") || e.setAttribute("tabindex", "-1"), document.addEventListener("keydown", p, !0), d = r(e), queueMicrotask(() => {
99
+ u && ((!c?.isConnected || c === document.body) && (c = document.activeElement), l = i(c), f()?.focus());
100
+ }));
101
+ }
102
+ function h() {
103
+ u && (u = !1, d?.destroy(), document.removeEventListener("keydown", p, !0), s && (c?.focus?.(), a(l)), c = null);
104
+ }
105
+ return {
106
+ activate: m,
107
+ release: h
108
+ };
109
+ }
110
+ //#endregion
111
+ //#region ../grid/dist/list-nav.js
112
+ function s(e, t) {
113
+ let n = [];
114
+ for (let r = 0; r < e; r++) t?.(r) || n.push(r);
115
+ return n;
116
+ }
117
+ function c(e, t, n) {
118
+ let r = e.length;
119
+ return r === 0 ? -1 : e[(e.indexOf(t) + n + r) % r];
120
+ }
121
+ //#endregion
122
+ //#region ../grid/dist/list-option.js
123
+ function l(e) {
124
+ return e ? e.map((e) => {
125
+ if (typeof e == "object" && e) {
126
+ let t = e, n = t.value ?? t.label ?? "";
127
+ return {
128
+ ...t,
129
+ value: n,
130
+ label: t.label ?? String(n)
131
+ };
132
+ }
133
+ return {
134
+ value: e,
135
+ label: String(e)
136
+ };
137
+ }) : [];
138
+ }
139
+ function u(e) {
140
+ let t = [], n = /* @__PURE__ */ new Map();
141
+ return e.forEach((e, r) => {
142
+ let i = e.group ?? null, a = n.get(i);
143
+ a || (a = {
144
+ group: i,
145
+ options: []
146
+ }, n.set(i, a), t.push(a)), a.options.push({
147
+ ...e,
148
+ index: r
149
+ });
150
+ }), t;
151
+ }
152
+ function d(e, t) {
153
+ let n = Math.max(1, t.groupHeaderHeight ?? 28), r = t.rowHeight, i = (e) => Math.max(1, typeof r == "function" ? r(e, e.index) : r), a = [], o = Array(e.length), s = !1;
154
+ for (let t of u(e)) {
155
+ t.group != null && (s = !0, a.push({
156
+ type: "group",
157
+ label: t.group,
158
+ size: n
159
+ }));
160
+ for (let e of t.options) o[e.index] = a.length, a.push({
161
+ type: "option",
162
+ opt: e,
163
+ size: i(e)
164
+ });
165
+ }
166
+ return {
167
+ entries: a,
168
+ hasGroups: s,
169
+ sizeAt: (e) => a[e]?.size ?? 0,
170
+ optionFlatIndex: o
171
+ };
172
+ }
173
+ function f(e, t, n) {
174
+ let r = t.trim().toLowerCase();
175
+ if (!r || !e.length) return -1;
176
+ let i = e.length;
177
+ for (let t = 1; t <= i; t++) {
178
+ let a = (n + t) % i, o = e[a];
179
+ if (o && !o.disabled && o.label.toLowerCase().startsWith(r)) return a;
180
+ }
181
+ return -1;
182
+ }
183
+ function p(e = 600) {
184
+ let t = "", n;
185
+ return {
186
+ get value() {
187
+ return t;
188
+ },
189
+ push(r) {
190
+ return t += r, n && clearTimeout(n), n = setTimeout(() => {
191
+ t = "";
192
+ }, e), t;
193
+ },
194
+ clear() {
195
+ t = "", n && clearTimeout(n);
196
+ }
197
+ };
198
+ }
199
+ function m(e) {
200
+ return e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && e.key !== " ";
201
+ }
202
+ //#endregion
203
+ export { f as a, c, i as d, n as f, m as i, o as l, d as n, l as o, r as p, u as r, s, p as t, a as u };
@@ -0,0 +1,45 @@
1
+ import { c as e, d as t, i as n, p as r, t as i, u as a } from "./list-option-DpIu99JN.js";
2
+ //#region ../grid/dist/a11y/menu-focus.js
3
+ var o = "[role^=\"menuitem\"]:not(:disabled)", s = "input, select, textarea, button:not(:disabled), [tabindex=\"0\"]";
4
+ function c(c, l = {}) {
5
+ let u = document.activeElement, d = t(u), f = i(), p = () => Array.from(c.querySelectorAll(o)), m = (e) => e?.focus({ preventScroll: !0 });
6
+ function h(t, r) {
7
+ let i = r.indexOf(document.activeElement), a = r.map((e, t) => t);
8
+ if (t.key === "ArrowDown") return r[e(a, i, 1)];
9
+ if (t.key === "ArrowUp") return r[i < 0 ? r.length - 1 : e(a, i, -1)];
10
+ if (t.key === "Home") return r[0];
11
+ if (t.key === "End") return r[r.length - 1];
12
+ if (!n(t)) return;
13
+ let o = f.push(t.key.toLowerCase()), s = (e) => (e.textContent ?? "").trim().toLowerCase(), c = o.length > 1 && [...o].every((e) => e === o[0]), l = c || o.length === 1 ? i + 1 : Math.max(i, 0);
14
+ return [...r.slice(l), ...r.slice(0, l)].find((e) => s(e).startsWith(c ? o[0] : o));
15
+ }
16
+ function g(e) {
17
+ if (e.target.closest("input, select, textarea, [contenteditable=\"true\"]")) return;
18
+ if (e.key === "Tab" || e.key === "Escape") {
19
+ if (!l.close) return;
20
+ e.preventDefault(), e.stopPropagation(), l.close();
21
+ return;
22
+ }
23
+ let t = h(e, p());
24
+ t && (e.preventDefault(), m(t), t.scrollIntoView?.({ block: "nearest" }));
25
+ }
26
+ l.keys !== !1 && c.addEventListener("keydown", g);
27
+ let _ = r(c), v = () => m(p()[0] ?? c.querySelector(s) ?? c);
28
+ return v(), queueMicrotask(() => {
29
+ c.isConnected && !c.contains(document.activeElement) && v();
30
+ }), {
31
+ update(e) {
32
+ l = e;
33
+ },
34
+ destroy() {
35
+ c.removeEventListener("keydown", g), _.destroy(), f.clear(), queueMicrotask(() => {
36
+ let e = document.activeElement;
37
+ if (e && e !== document.body && e.isConnected) return;
38
+ let t = l.returnTo?.();
39
+ a(t ? [{ el: t }, ...d] : d);
40
+ });
41
+ }
42
+ };
43
+ }
44
+ //#endregion
45
+ export { c as t };