@wirecore/wirelayer-react 0.12.1 → 0.13.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.
Files changed (54) hide show
  1. package/dist/{Button-Cd7lufvJ.js → Button-D_ctSYR-.js} +1 -1
  2. package/dist/{Checkbox-BMRax6m4.js → Checkbox-DXiff9X7.js} +1 -1
  3. package/dist/{ContextMenu-Bz723GfL.js → ContextMenu-Z23QyLFn.js} +408 -370
  4. package/dist/{CopyButton-C_LAuCkR.js → CopyButton-Dr_QrMYf.js} +2 -2
  5. package/dist/{Field-DkYxlVar.js → Field-DFh-zcjr.js} +3 -3
  6. package/dist/{Highlight-43-H9459.js → Highlight-CpYN310r.js} +1 -1
  7. package/dist/{Input-CtYSQznO.js → Input-D8lXkJcv.js} +4 -4
  8. package/dist/PasswordInput-DQIzdTGq.js +452 -0
  9. package/dist/{RecipesProvider-0idafuGm.js → RecipesProvider-COODXvxz.js} +8 -1
  10. package/dist/{Select-CGyqfOm3.js → Select-E_geb3hU.js} +5 -5
  11. package/dist/{Slider-Bfm_jjYE.js → Slider-BFGCHR5_.js} +3 -3
  12. package/dist/{Tree-DLHbcH3-.js → Tree-BDYg4j6i.js} +128 -128
  13. package/dist/chart.js +2 -2
  14. package/dist/code.js +14 -14
  15. package/dist/components/Confirm/ConfirmDialog.d.ts.map +1 -1
  16. package/dist/components/Confirm/confirm.d.ts +5 -0
  17. package/dist/components/Confirm/confirm.d.ts.map +1 -1
  18. package/dist/components/Dialog/Dialog.d.ts +12 -3
  19. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  20. package/dist/components/DialogService/DialogHost.d.ts.map +1 -1
  21. package/dist/components/DialogService/dialogs.d.ts +5 -0
  22. package/dist/components/DialogService/dialogs.d.ts.map +1 -1
  23. package/dist/components/Drawer/Drawer.d.ts +10 -2
  24. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  25. package/dist/components/NotificationCenter/NotificationCenter.d.ts +8 -2
  26. package/dist/components/NotificationCenter/NotificationCenter.d.ts.map +1 -1
  27. package/dist/components/RecipesProvider/RecipesProvider.d.ts +6 -0
  28. package/dist/components/RecipesProvider/RecipesProvider.d.ts.map +1 -1
  29. package/dist/data-table/DataTable.d.ts +26 -7
  30. package/dist/data-table/DataTable.d.ts.map +1 -1
  31. package/dist/data-table/FilterMenu.d.ts.map +1 -1
  32. package/dist/data-table/ValueInput.d.ts +5 -1
  33. package/dist/data-table/ValueInput.d.ts.map +1 -1
  34. package/dist/data-table/features.d.ts +10 -0
  35. package/dist/data-table/features.d.ts.map +1 -1
  36. package/dist/data-table/index.d.ts +1 -1
  37. package/dist/data-table/index.d.ts.map +1 -1
  38. package/dist/data-table/inputs.d.ts +5 -0
  39. package/dist/data-table/inputs.d.ts.map +1 -1
  40. package/dist/data-table/types.d.ts +3 -0
  41. package/dist/data-table/types.d.ts.map +1 -1
  42. package/dist/data-table.js +1150 -1083
  43. package/dist/editor.js +4 -4
  44. package/dist/form.js +10 -10
  45. package/dist/index.d.ts +1 -1
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +2088 -2111
  48. package/dist/pdf.js +7 -7
  49. package/dist/sources/dateRangeInput.css +3 -0
  50. package/dist/virtual.js +7 -7
  51. package/llms-full.txt +127 -26
  52. package/llms.txt +1 -0
  53. package/package.json +3 -3
  54. package/dist/PasswordInput-CxZXGV2m.js +0 -449
@@ -1,184 +1,215 @@
1
1
  "use client";
2
- import { a as e, i as t, n } from "./RecipesProvider-0idafuGm.js";
3
- import { _ as r, g as i, i as a, n as o, r as s, t as c, v as ee, y as l } from "./ContextMenu-Bz723GfL.js";
4
- import { t as u } from "./Button-Cd7lufvJ.js";
5
- import { n as d, t as te } from "./Input-CtYSQznO.js";
6
- import { n as ne, t as re } from "./Select-CGyqfOm3.js";
7
- import { t as f } from "./Checkbox-BMRax6m4.js";
8
- import { t as p } from "./Highlight-43-H9459.js";
9
- import { t as ie } from "./CopyButton-C_LAuCkR.js";
10
- import { EditHistory as ae, aggregateValues as oe, applyPending as m, autoRowSpans as se, changesByRow as ce, clearTableState as le, collectErrors as ue, conditionFieldsFromColumns as de, createDataController as fe, createDataController as pe, createXlsx as me, csvSeparator as he, dataAnnouncement as ge, dataSourceToRows as _e, dataTable as ve, dataTableMatchModes as ye, defineMatchMode as be, downloadBytes as xe, downloadText as Se, emptyConditionGroup as Ce, emptyFilterRule as we, extendRange as Te, findMatches as Ee, fitColumnWidth as De, gridFocusIn as Oe, gridKeydown as ke, groupedRowMove as Ae, historyKey as je, idRange as Me, inlineArrowStep as Ne, isActiveCondition as Pe, isActiveFilter as Fe, isRangeMatchMode as Ie, listValueKey as Le, loadTableState as Re, locateTreeNode as ze, matchModeDefinition as Be, matchModeLabel as Ve, matchModesFor as h, matchesColumnFilter as He, matchesCondition as Ue, matchesRowKeywords as We, matchesSearch as Ge, menu as Ke, moveColumnBlock as qe, moveItem as Je, moveTreeRow as Ye, nextSorting as Xe, numberSummary as Ze, omitTableState as Qe, paginatorAlignKey as $e, parseCellText as et, parseTsv as tt, pasteTargets as nt, pendingValue as rt, pivotTable as it, pivotView as at, printHtml as ot, printTableHtml as st, queryKey as ct, rangeAround as lt, rangeBounds as ut, rowColumnSpans as dt, rowsToDataSource as ft, rowsToDataSource as pt, sameCellValue as mt, sameTableValue as ht, saveTableState as gt, syncGrid as _t, toCsv as vt, toFilterRule as yt, toTsv as bt, treeDropMove as xt, treeGridKeyAction as St, treeKeyboardMove as Ct, warnInDevelopment as wt } from "@wirecore/wirelayer-recipes";
11
- import { ArrowDown as Tt, ArrowUp as Et, ArrowUpDown as Dt, Check as Ot, ChevronDown as kt, ChevronRight as At, ChevronUp as jt, ChevronsDownUp as Mt, ChevronsUpDown as Nt, Columns3 as Pt, Download as Ft, EllipsisVertical as It, Filter as Lt, FilterX as Rt, GripVertical as zt, ListFilter as Bt, Maximize2 as Vt, Minimize2 as Ht, Pencil as Ut, Plus as Wt, Redo2 as Gt, Rows3 as Kt, Search as qt, TextSearch as Jt, Trash2 as Yt, Undo2 as Xt, X as Zt } from "lucide-react";
12
- import { Fragment as Qt, createContext as $t, useContext as en, useEffect as g, useId as tn, useImperativeHandle as nn, useLayoutEffect as rn, useMemo as _, useRef as v, useState as y } from "react";
13
- import { Fragment as an, jsx as b, jsxs as x } from "react/jsx-runtime";
2
+ import { a as e, n as t, o as n, r, t as i } from "./RecipesProvider-COODXvxz.js";
3
+ import { _ as a, a as o, g as s, i as c, n as l, r as ee, t as te, v as ne, y as u } from "./ContextMenu-Z23QyLFn.js";
4
+ import { t as d } from "./Button-D_ctSYR-.js";
5
+ import { n as f, t as p } from "./Input-D8lXkJcv.js";
6
+ import { n as re, t as ie } from "./Select-E_geb3hU.js";
7
+ import { t as ae } from "./Checkbox-DXiff9X7.js";
8
+ import { t as oe } from "./Highlight-CpYN310r.js";
9
+ import { t as m } from "./CopyButton-Dr_QrMYf.js";
10
+ import { EditHistory as se, aggregateValues as ce, applyPending as le, autoRowSpans as ue, changesByRow as de, clearTableState as fe, collectErrors as pe, conditionFieldsFromColumns as me, createDataController as he, createDataController as ge, createXlsx as _e, csvSeparator as ve, dataAnnouncement as ye, dataSourceToRows as be, dataTable as xe, dataTableMatchModes as Se, defineMatchMode as Ce, downloadBytes as we, downloadText as Te, emptyConditionGroup as Ee, emptyFilterRule as De, extendRange as Oe, findMatches as ke, fitColumnWidth as Ae, gridFocusIn as je, gridKeydown as Me, groupedRowMove as Ne, historyKey as Pe, idRange as Fe, inlineArrowStep as Ie, isActiveCondition as Le, isActiveFilter as Re, isRangeMatchMode as ze, listValueKey as Be, loadTableState as Ve, locateTreeNode as He, matchModeDefinition as Ue, matchModeLabel as h, matchModesFor as We, matchesColumnFilter as Ge, matchesCondition as Ke, matchesRowKeywords as qe, matchesSearch as Je, menu as Ye, moveColumnBlock as Xe, moveItem as Ze, moveTreeRow as Qe, nextSorting as $e, numberSummary as et, omitTableState as tt, paginatorAlignKey as nt, parseCellText as rt, parseTsv as it, pasteTargets as at, pendingValue as ot, pivotTable as st, pivotView as ct, printHtml as lt, printTableHtml as ut, queryKey as dt, rangeAround as ft, rangeBounds as pt, rowColumnSpans as mt, rowsToDataSource as ht, rowsToDataSource as gt, sameCellValue as _t, sameTableValue as vt, saveTableState as yt, sizeOverrides as bt, syncGrid as xt, toCsv as St, toFilterRule as Ct, toTsv as wt, treeDropMove as Tt, treeGridKeyAction as Et, treeKeyboardMove as Dt, warnInDevelopment as Ot } from "@wirecore/wirelayer-recipes";
11
+ import { ArrowDown as kt, ArrowUp as At, ArrowUpDown as jt, Check as Mt, ChevronDown as Nt, ChevronRight as Pt, ChevronUp as Ft, ChevronsDownUp as It, ChevronsUpDown as Lt, Columns3 as Rt, Download as zt, EllipsisVertical as Bt, Filter as Vt, FilterX as Ht, GripVertical as Ut, ListFilter as Wt, Maximize2 as Gt, Minimize2 as Kt, Pencil as qt, Plus as Jt, Redo2 as Yt, Rows3 as Xt, Search as Zt, TextSearch as Qt, Trash2 as $t, Undo2 as en, X as tn } from "lucide-react";
12
+ import { Fragment as nn, createContext as rn, useContext as an, useEffect as g, useId as on, useImperativeHandle as sn, useLayoutEffect as cn, useMemo as _, useRef as v, useState as y } from "react";
13
+ import { Fragment as ln, jsx as b, jsxs as x } from "react/jsx-runtime";
14
14
  import { Menu as S } from "@ark-ui/react/menu";
15
- import { Portal as on } from "@ark-ui/react/portal";
16
- import { Popover as sn } from "@ark-ui/react/popover";
17
- import { createPortal as cn } from "react-dom";
18
- import { columnFilteringFeature as ln, columnGroupingFeature as un, columnOrderingFeature as dn, columnPinningFeature as fn, columnResizingFeature as pn, columnSizingFeature as mn, columnVisibilityFeature as hn, createExpandedRowModel as gn, createFilteredRowModel as _n, createGroupedRowModel as vn, createPaginatedRowModel as yn, createSortedRowModel as bn, filterFn_equalsString as xn, filterFn_includesString as Sn, globalFilteringFeature as Cn, rowExpandingFeature as wn, rowPaginationFeature as Tn, rowPinningFeature as En, rowSelectionFeature as Dn, rowSortingFeature as On, sortFn_alphanumeric as kn, tableFeatures as An, useTable as jn } from "@tanstack/react-table";
15
+ import { Portal as un } from "@ark-ui/react/portal";
16
+ import { Popover as dn } from "@ark-ui/react/popover";
17
+ import { createPortal as fn } from "react-dom";
18
+ import { columnFilteringFeature as pn, columnGroupingFeature as mn, columnOrderingFeature as hn, columnPinningFeature as gn, columnResizingFeature as _n, columnSizingFeature as vn, columnVisibilityFeature as yn, constructSortFn as bn, createExpandedRowModel as xn, createFilteredRowModel as Sn, createGroupedRowModel as Cn, createPaginatedRowModel as wn, createSortedRowModel as Tn, filterFn_equalsString as En, filterFn_includesString as Dn, globalFilteringFeature as On, rowExpandingFeature as kn, rowPaginationFeature as An, rowPinningFeature as jn, rowSelectionFeature as Mn, rowSortingFeature as Nn, sortFn_alphanumericCaseSensitive as Pn, sortFn_basic as Fn, sortFn_datetime as In, sortFn_textCaseSensitive as Ln, tableFeatures as Rn, useTable as zn } from "@tanstack/react-table";
19
19
  //#region src/data-table/features.ts
20
- var Mn = An({
21
- rowSortingFeature: On,
22
- sortedRowModel: bn(),
23
- sortFns: { alphanumeric: kn },
24
- rowPaginationFeature: Tn,
25
- paginatedRowModel: yn(),
26
- rowSelectionFeature: Dn,
27
- rowPinningFeature: En,
28
- rowExpandingFeature: wn,
29
- expandedRowModel: gn(),
30
- columnGroupingFeature: un,
31
- groupedRowModel: vn(),
32
- columnFilteringFeature: ln,
33
- globalFilteringFeature: Cn,
34
- filteredRowModel: _n(),
20
+ var Bn = /* @__PURE__ */ new Map(), Vn = (e) => {
21
+ let t = e.table.options.meta?.locale ?? "", n = Bn.get(t);
22
+ return n || (n = new Intl.Collator(t || void 0, {
23
+ numeric: !0,
24
+ sensitivity: "base"
25
+ }), Bn.set(t, n)), n;
26
+ }, Hn = bn({
27
+ resolveDataValue: (e) => typeof e == "string" ? e : typeof e == "number" && Number.isFinite(e) ? String(e) : "",
28
+ sort: (e, t, n) => Vn(n).compare(e, t)
29
+ }), Un = Rn({
30
+ tableMeta: {},
31
+ rowSortingFeature: Nn,
32
+ sortedRowModel: Tn(),
33
+ sortFns: {
34
+ text: Hn,
35
+ alphanumeric: Hn,
36
+ textCaseSensitive: Ln,
37
+ alphanumericCaseSensitive: Pn,
38
+ datetime: In,
39
+ basic: Fn
40
+ },
41
+ rowPaginationFeature: An,
42
+ paginatedRowModel: wn(),
43
+ rowSelectionFeature: Mn,
44
+ rowPinningFeature: jn,
45
+ rowExpandingFeature: kn,
46
+ expandedRowModel: xn(),
47
+ columnGroupingFeature: mn,
48
+ groupedRowModel: Cn(),
49
+ columnFilteringFeature: pn,
50
+ globalFilteringFeature: On,
51
+ filteredRowModel: Sn(),
35
52
  filterFns: {
36
- includesString: Sn,
37
- equalsString: xn
53
+ includesString: Dn,
54
+ equalsString: En
38
55
  },
39
- columnVisibilityFeature: hn,
40
- columnOrderingFeature: dn,
41
- columnPinningFeature: fn,
42
- columnSizingFeature: mn,
43
- columnResizingFeature: pn
44
- }), Nn = $t({});
56
+ columnVisibilityFeature: yn,
57
+ columnOrderingFeature: hn,
58
+ columnPinningFeature: gn,
59
+ columnSizingFeature: vn,
60
+ columnResizingFeature: _n
61
+ }), Wn = rn({});
45
62
  //#endregion
46
63
  //#region src/data-table/ValueInput.tsx
47
- function Pn({ type: t, value: n, onChange: r, label: i, options: a, any: o = !1, invalid: c, inputProps: l, renderOption: u }) {
48
- let d = e(), ne = d.dataTable, { dateInput: p, numberInput: ie } = en(Nn), ae = (a ?? []).some((e) => typeof e != "string"), oe = [...o ? [{
64
+ function Gn({ type: e, value: t, onChange: r, label: i, options: a, any: o = !1, invalid: s, inputProps: l, filter: ee = !1, range: te = !1, renderOption: u }) {
65
+ let d = n(), f = d.dataTable, { dateInput: re, numberInput: oe, dateRangeInput: m } = an(Wn), se = (a ?? []).some((e) => typeof e != "string"), ce = [...o ? [{
49
66
  value: "",
50
- label: ne.filterAll
51
- }] : [], ...t === "boolean" ? [{
67
+ label: f.filterAll
68
+ }] : [], ...e === "boolean" ? [{
52
69
  value: "true",
53
- label: ne.yes
70
+ label: f.yes
54
71
  }, {
55
72
  value: "false",
56
- label: ne.no
73
+ label: f.no
57
74
  }] : (a ?? []).map((e) => typeof e == "string" ? {
58
75
  value: e,
59
76
  label: e
60
- } : e)], m = n == null ? "" : String(n);
61
- return t === "text" ? /* @__PURE__ */ b(te, {
77
+ } : e)], le = t == null ? "" : String(t);
78
+ return te && (e === "date" || e === "datetime") && m ? /* @__PURE__ */ b(m, {
62
79
  size: "sm",
63
80
  "aria-label": i,
64
- invalid: c,
81
+ invalid: s,
65
82
  placeholder: l?.placeholder,
66
- value: m,
83
+ withTime: e === "datetime",
84
+ value: Array.isArray(t) && (t[0] || t[1]) ? {
85
+ start: t[0] ?? null,
86
+ end: t[1] ?? null
87
+ } : null,
88
+ onValueChange: (e) => r([e?.start ?? null, e?.end ?? null])
89
+ }) : e === "text" ? /* @__PURE__ */ b(p, {
90
+ size: "sm",
91
+ "aria-label": i,
92
+ invalid: s,
93
+ placeholder: l?.placeholder ?? (ee ? f.filterText : void 0),
94
+ value: le,
67
95
  onChange: (e) => r(e.target.value)
68
- }) : t === "textarea" ? /* @__PURE__ */ b(ee, {
96
+ }) : e === "textarea" ? /* @__PURE__ */ b(ne, {
69
97
  size: "sm",
70
98
  autoResize: !0,
71
99
  "aria-label": i,
72
- invalid: c,
73
- value: m,
100
+ invalid: s,
101
+ value: le,
74
102
  onChange: (e) => r(e.target.value)
75
- }) : t === "number" && ie ? /* @__PURE__ */ b(ie, {
103
+ }) : e === "number" && oe ? /* @__PURE__ */ b(oe, {
76
104
  size: "sm",
77
105
  "aria-label": i,
78
- invalid: c,
106
+ invalid: s,
79
107
  placeholder: l?.placeholder,
80
- value: typeof n == "number" ? n : null,
108
+ value: typeof t == "number" ? t : null,
81
109
  onValueChange: r
82
- }) : t === "number" ? /* @__PURE__ */ b(te, {
110
+ }) : e === "number" ? /* @__PURE__ */ b(p, {
83
111
  type: "number",
84
112
  size: "sm",
85
113
  "aria-label": i,
86
- invalid: c,
114
+ invalid: s,
87
115
  placeholder: l?.placeholder,
88
- value: typeof n == "number" ? String(n) : "",
116
+ value: typeof t == "number" ? String(t) : "",
89
117
  onChange: ({ target: e }) => r(e.value && Number.isFinite(Number(e.value)) ? Number(e.value) : null)
90
- }) : (t === "date" || t === "datetime") && p ? /* @__PURE__ */ b(p, {
118
+ }) : (e === "date" || e === "datetime") && re ? /* @__PURE__ */ b(re, {
119
+ size: "sm",
91
120
  "aria-label": i,
92
- invalid: c,
121
+ invalid: s,
93
122
  placeholder: l?.placeholder,
94
- withTime: t === "datetime",
95
- value: m || null,
123
+ withTime: e === "datetime",
124
+ value: le || null,
96
125
  onValueChange: r
97
- }) : t === "date" || t === "datetime" ? /* @__PURE__ */ b(te, {
98
- type: t === "date" ? "date" : "datetime-local",
126
+ }) : e === "date" || e === "datetime" ? /* @__PURE__ */ b(p, {
127
+ type: e === "date" ? "date" : "datetime-local",
99
128
  size: "sm",
100
129
  "aria-label": i,
101
- invalid: c,
102
- value: m.slice(0, t === "date" ? 10 : 16),
130
+ invalid: s,
131
+ value: le.slice(0, e === "date" ? 10 : 16),
103
132
  onChange: ({ target: e }) => r(e.value || null)
104
- }) : t === "multiSelect" ? /* @__PURE__ */ b(s, {
133
+ }) : e === "multiSelect" ? /* @__PURE__ */ b(c, {
134
+ size: "sm",
105
135
  "aria-label": i,
106
- items: oe,
107
- invalid: c,
108
- placeholder: l?.placeholder ?? ne.filterAll,
136
+ items: ce,
137
+ invalid: s,
138
+ placeholder: l?.placeholder ?? f.filterAll,
109
139
  filter: l?.filter,
110
140
  maxShown: l?.maxShown,
111
141
  clearable: l?.clearable,
112
142
  renderItem: u,
113
- value: Array.isArray(n) ? n : [],
143
+ value: Array.isArray(t) ? t : [],
114
144
  onValueChange: r
115
- }) : t === "checkbox" ? /* @__PURE__ */ b(f, {
145
+ }) : e === "checkbox" ? /* @__PURE__ */ b(ae, {
116
146
  "aria-label": i,
117
- invalid: c,
118
- checked: n === !0,
147
+ invalid: s,
148
+ checked: t === !0,
119
149
  onCheckedChange: (e) => r(e === !0)
120
- }) : /* @__PURE__ */ b(re, {
150
+ }) : /* @__PURE__ */ b(ie, {
151
+ size: "sm",
121
152
  "aria-label": i,
122
- items: oe,
123
- invalid: c,
153
+ items: ce,
154
+ invalid: s,
124
155
  placeholder: l?.placeholder ?? d.common.placeholder,
125
156
  filter: l?.filter,
126
157
  clearable: l?.clearable,
127
158
  renderItem: u,
128
- value: ae ? n ?? (o ? "" : null) : m,
159
+ value: se ? t ?? (o ? "" : null) : le,
129
160
  onValueChange: (e) => r(e ?? "")
130
161
  });
131
162
  }
132
163
  //#endregion
133
164
  //#region src/data-table/FilterMenu.tsx
134
- function Fn({ header: r, type: i, value: a, onChange: o, options: s, matchModes: c, maxConstraints: ee, renderValue: l, inputProps: te, renderOption: ne }) {
135
- let f = n("dataTable", ve)(), p = e().dataTable, { locale: ie } = t(), [ae, oe] = y(!1), [m, se] = y(() => we(i)), ce = Fe(a), le = h(i, c), ue = (e) => Be(e)?.input ?? i, de = (e) => {
136
- e && se(structuredClone(yt(a ?? we(i), i))), oe(e);
137
- }, fe = (e, t) => se((n) => ({
165
+ function Kn({ header: r, type: i, value: a, onChange: o, options: s, matchModes: c, maxConstraints: l, renderValue: ee, inputProps: te, renderOption: ne }) {
166
+ let u = t("dataTable", xe)(), p = n().dataTable, { locale: re } = e(), [ae, oe] = y(!1), [m, se] = y(() => De(i)), ce = Re(a), le = We(i, c), ue = (e) => Ue(e)?.input ?? i, de = an(Wn), fe = (e) => !!de.dateRangeInput && ["date", "datetime"].includes(ue(e)), pe = (e) => {
167
+ e && se(structuredClone(Ct(a ?? De(i), i))), oe(e);
168
+ }, me = (e, t) => se((n) => ({
138
169
  ...n,
139
170
  constraints: n.constraints.map((n, r) => r === e ? {
140
171
  ...n,
141
172
  ...t
142
173
  } : n)
143
- })), pe = (e, t) => {
144
- let n = m.constraints[e], r = Ie(t) !== Ie(n.matchMode);
145
- fe(e, r ? {
174
+ })), he = (e, t) => {
175
+ let n = m.constraints[e], r = ze(t) !== ze(n.matchMode);
176
+ me(e, r ? {
146
177
  matchMode: t,
147
- value: Ie(t) ? [null, null] : null
178
+ value: ze(t) ? [null, null] : null
148
179
  } : { matchMode: t });
149
- }, me = (e, t, n) => {
180
+ }, ge = (e, t, n) => {
150
181
  let r = m.constraints[e], i = Array.isArray(r.value) ? [...r.value] : [null, null];
151
- i[t] = n, fe(e, { value: i });
152
- }, he = () => {
153
- o(Fe(m) ? structuredClone(m) : void 0), oe(!1);
182
+ i[t] = n, me(e, { value: i });
183
+ }, _e = () => {
184
+ o(Re(m) ? structuredClone(m) : void 0), oe(!1);
154
185
  };
155
- return /* @__PURE__ */ x(sn.Root, {
186
+ return /* @__PURE__ */ x(dn.Root, {
156
187
  open: ae,
157
- onOpenChange: (e) => de(e.open),
188
+ onOpenChange: (e) => pe(e.open),
158
189
  positioning: {
159
190
  placement: "bottom-end",
160
191
  gutter: 4
161
192
  },
162
193
  lazyMount: !0,
163
194
  unmountOnExit: !0,
164
- children: [/* @__PURE__ */ b(sn.Trigger, {
165
- className: f.headButton(),
195
+ children: [/* @__PURE__ */ b(dn.Trigger, {
196
+ className: u.headButton(),
166
197
  "aria-label": p.filterMenu(r, ce),
167
198
  "data-active": ce || void 0,
168
- children: /* @__PURE__ */ b(Lt, {
169
- className: f.headButtonIcon(),
199
+ children: /* @__PURE__ */ b(Vt, {
200
+ className: u.headButtonIcon(),
170
201
  "aria-hidden": "true"
171
202
  })
172
- }), /* @__PURE__ */ b(on, { children: /* @__PURE__ */ b(sn.Positioner, { children: /* @__PURE__ */ b(sn.Content, {
173
- className: f.filterPanel(),
203
+ }), /* @__PURE__ */ b(un, { children: /* @__PURE__ */ b(dn.Positioner, { children: /* @__PURE__ */ b(dn.Content, {
204
+ className: u.filterPanel(),
174
205
  "aria-label": p.filterMenu(r, !1),
175
206
  children: /* @__PURE__ */ x("form", {
176
- className: f.filterForm(),
207
+ className: u.filterForm(),
177
208
  onSubmit: (e) => {
178
- e.preventDefault(), he();
209
+ e.preventDefault(), _e();
179
210
  },
180
211
  children: [
181
- m.constraints.length > 1 && /* @__PURE__ */ b(re, {
212
+ m.constraints.length > 1 && /* @__PURE__ */ b(ie, {
182
213
  "aria-label": p.operator,
183
214
  items: [{
184
215
  value: "and",
@@ -194,20 +225,20 @@ function Fn({ header: r, type: i, value: a, onChange: o, options: s, matchModes:
194
225
  }))
195
226
  }),
196
227
  m.constraints.map((e, t) => /* @__PURE__ */ x("div", {
197
- className: f.filterRule(),
228
+ className: u.filterRule(),
198
229
  children: [/* @__PURE__ */ x("div", {
199
- className: f.filterRuleHead(),
200
- children: [le.length > 1 && /* @__PURE__ */ b(re, {
201
- className: f.filterMode(),
230
+ className: u.filterRuleHead(),
231
+ children: [le.length > 1 && /* @__PURE__ */ b(ie, {
232
+ className: u.filterMode(),
202
233
  "aria-label": p.matchMode(t),
203
234
  items: le.map((e) => ({
204
235
  value: e,
205
- label: Ve(e, p.matchModes, ie)
236
+ label: h(e, p.matchModes, re)
206
237
  })),
207
238
  value: e.matchMode,
208
- onValueChange: (e) => pe(t, e ?? le[0])
209
- }), m.constraints.length > 1 && /* @__PURE__ */ b(d, {
210
- icon: Yt,
239
+ onValueChange: (e) => he(t, e ?? le[0])
240
+ }), m.constraints.length > 1 && /* @__PURE__ */ b(f, {
241
+ icon: $t,
211
242
  label: p.removeRule(t),
212
243
  variant: "text",
213
244
  size: "sm",
@@ -216,41 +247,49 @@ function Fn({ header: r, type: i, value: a, onChange: o, options: s, matchModes:
216
247
  constraints: e.constraints.filter((e, n) => n !== t)
217
248
  }))
218
249
  })]
219
- }), l ? l({
250
+ }), ee ? ee({
220
251
  value: e.value,
221
- setValue: (e) => fe(t, { value: e })
222
- }) : Ie(e.matchMode) ? /* @__PURE__ */ x("div", {
223
- className: f.filterRange(),
224
- children: [/* @__PURE__ */ b(Pn, {
252
+ setValue: (e) => me(t, { value: e })
253
+ }) : ze(e.matchMode) && fe(e.matchMode) ? /* @__PURE__ */ b(Gn, {
254
+ range: !0,
255
+ type: ue(e.matchMode),
256
+ label: p.value(t),
257
+ inputProps: te,
258
+ value: e.value,
259
+ onChange: (e) => me(t, { value: e })
260
+ }) : ze(e.matchMode) ? /* @__PURE__ */ x("div", {
261
+ className: u.filterRange(),
262
+ children: [/* @__PURE__ */ b(Gn, {
225
263
  type: ue(e.matchMode),
226
264
  label: `${p.value(t)}, ${p.from}`,
227
265
  options: s,
228
266
  inputProps: te,
229
267
  value: Array.isArray(e.value) ? e.value[0] : null,
230
- onChange: (e) => me(t, 0, e)
231
- }), /* @__PURE__ */ b(Pn, {
268
+ onChange: (e) => ge(t, 0, e)
269
+ }), /* @__PURE__ */ b(Gn, {
232
270
  type: ue(e.matchMode),
233
271
  label: `${p.value(t)}, ${p.to}`,
234
272
  options: s,
235
273
  inputProps: te,
236
274
  value: Array.isArray(e.value) ? e.value[1] : null,
237
- onChange: (e) => me(t, 1, e)
275
+ onChange: (e) => ge(t, 1, e)
238
276
  })]
239
- }) : /* @__PURE__ */ b(Pn, {
277
+ }) : /* @__PURE__ */ b(Gn, {
240
278
  type: ue(e.matchMode),
241
279
  label: p.value(t),
242
280
  options: s,
243
281
  inputProps: te,
282
+ filter: !0,
244
283
  renderOption: ne,
245
284
  value: e.value,
246
- onChange: (e) => fe(t, { value: e })
285
+ onChange: (e) => me(t, { value: e })
247
286
  })]
248
287
  }, t)),
249
- m.constraints.length < ee && /* @__PURE__ */ b(u, {
288
+ m.constraints.length < l && /* @__PURE__ */ b(d, {
250
289
  variant: "text",
251
290
  size: "sm",
252
- className: f.filterAdd(),
253
- leadingIcon: Wt,
291
+ className: u.filterAdd(),
292
+ leadingIcon: Jt,
254
293
  onClick: () => se((e) => ({
255
294
  ...e,
256
295
  constraints: [...e.constraints, {
@@ -261,15 +300,15 @@ function Fn({ header: r, type: i, value: a, onChange: o, options: s, matchModes:
261
300
  children: p.addRule
262
301
  }),
263
302
  /* @__PURE__ */ x("div", {
264
- className: f.filterActions(),
265
- children: [/* @__PURE__ */ b(u, {
303
+ className: u.filterActions(),
304
+ children: [/* @__PURE__ */ b(d, {
266
305
  variant: "outline",
267
306
  size: "sm",
268
307
  onClick: () => {
269
308
  o(void 0), oe(!1);
270
309
  },
271
310
  children: p.clear
272
- }), /* @__PURE__ */ b(u, {
311
+ }), /* @__PURE__ */ b(d, {
273
312
  type: "submit",
274
313
  size: "sm",
275
314
  children: p.apply
@@ -282,139 +321,139 @@ function Fn({ header: r, type: i, value: a, onChange: o, options: s, matchModes:
282
321
  }
283
322
  //#endregion
284
323
  //#region src/data-table/DataTable.tsx
285
- var C = (e, t) => typeof e == "function" ? e(t) : e, In = (e) => e == null ? "" : String(e), Ln = (e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], Rn = (e) => e ? Array.isArray(e) ? e : [e] : [], zn = (e) => Object.fromEntries(e.filter((e) => Fe(e.value)).map((e) => [e.id, e.value])), Bn = (e) => Object.entries(e).filter(([, e]) => Fe(e)).map(([e, t]) => ({
324
+ var C = (e, t) => typeof e == "function" ? e(t) : e, qn = (e) => e == null ? "" : String(e), Jn = (e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], Yn = (e) => e ? Array.isArray(e) ? e : [e] : [], Xn = (e) => Object.fromEntries(e.filter((e) => Re(e.value)).map((e) => [e.id, e.value])), Zn = (e) => Object.entries(e).filter(([, e]) => Re(e)).map(([e, t]) => ({
286
325
  id: e,
287
326
  value: t
288
- })), Vn = (e, t = !0) => Object.fromEntries(e.map((e) => [e, t])), Hn = (e) => Object.fromEntries(e.map((e) => [e, !0])), Un = (e, t, n) => {
327
+ })), Qn = (e, t = !0) => Object.fromEntries(e.map((e) => [e, t])), $n = (e) => Object.fromEntries(e.map((e) => [e, !0])), er = (e, t, n) => {
289
328
  let r = { ...e };
290
329
  for (let e of t) n ? r[e] = !0 : delete r[e];
291
330
  return r;
292
- }, Wn = (e) => (e.filterOptions ?? []).some((e) => typeof e != "string"), Gn = /* @__PURE__ */ new Set([
331
+ }, tr = (e) => (e.filterOptions ?? []).some((e) => typeof e != "string"), nr = /* @__PURE__ */ new Set([
293
332
  "select",
294
333
  "date",
295
334
  "checkbox"
296
- ]), Kn = 60, qn = 16, Jn = [], Yn = ["selection"];
297
- function Xn(e) {
335
+ ]), rr = 60, ir = 16, ar = [], or = ["selection"];
336
+ function sr(e) {
298
337
  let [t, n] = y(e);
299
- return t === e || ht(t, e) ? t : (n(e), e);
338
+ return t === e || vt(t, e) ? t : (n(e), e);
300
339
  }
301
- var Zn = (e) => "getRows" in e ? pt(e.getRows) : e, Qn = "input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"], [data-editor]", $n = {
340
+ var cr = (e) => "getRows" in e ? gt(e.getRows) : e, lr = "input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"], [data-editor]", ur = {
302
341
  drag: 40,
303
342
  select: 48,
304
343
  expand: 40,
305
344
  number: 56,
306
345
  actions: 88
307
- }, er = () => void 0;
308
- function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebounce: fe = 300, pivot: _e, columns: be, caption: we, getRowId: Ve, pageSize: h, onPageSizeChange: Je, pageSizeOptions: Ye, page: ft, onPageChange: pt, first: ht, onFirstChange: yt, paginatorPosition: Wt = "bottom", paginatorEdges: Yt, paginatorAlign: $t, sorting: en, onSortingChange: sn, defaultSorting: ln, sortMode: un = "single", manual: dn = !1, rowCount: fn, selectable: pn = !1, selectionMode: mn = "multiple", selection: hn, onSelectionChange: gn, selectedRows: _n, onSelectedRowsChange: vn, selectOnRowClick: yn = !1, isRowSelectable: bn, selectAllMode: xn = "page", allSelection: Sn, onAllSelectionChange: Cn, rowLabel: wn, loading: Tn = !1, loadingVariant: En = "overlay", emptyText: Dn, noResultsText: On, loadingText: kn, selectAllLabel: An, getSubRows: tr, treeFilterMode: nr, expanded: rr, defaultExpanded: ir, onExpandedChange: ar, expandLabel: or, rowExpandable: sr, expansion: cr, advancedFilter: lr, advancedFilterValue: ur, onAdvancedFilterValueChange: dr, renderAdvancedFilter: fr, search: pr = !1, globalFilter: mr, onGlobalFilterChange: hr, rowKeywords: gr, highlightSearch: _r = !1, filters: vr, onFiltersChange: yr, filterDisplay: br = "row", showFilters: xr, onShowFiltersChange: Sr, filterToggle: Cr = !1, filterReset: wr = !1, maxConstraints: Tr = 2, resizable: Er = !1, columnToggle: Dr = !1, hiddenColumns: Or, onHiddenColumnsChange: kr, columnMenu: Ar = !1, reorderableColumns: jr = !1, columnOrder: Mr, onColumnOrderChange: Nr, pinnedColumns: Pr, onPinnedColumnsChange: Fr, exportFilename: Ir, csvSeparator: Lr, exportFormats: Rr, groupBy: zr, onGroupByChange: Br, frozenRows: Vr, reorderableRows: Hr = !1, onRowReorder: Ur, rowNumbers: Wr = !1, rowActions: Gr, onRowAction: Kr, contextMenu: qr = !1, rowClass: Jr, rowHref: Yr, onRowClick: Xr, navigation: Zr = "tab", statusBar: Qr = !1, cellSelection: w = !1, onCellSelectionChange: $r, onCellPaste: ei, onSave: ti, find: ni = !1, wrapHeaders: ri = !1, verticalHeaders: ii = !1, editMode: T = "cell", editTrigger: ai = "click", onCellEdit: oi, onRowEdit: si, size: ci, onSizeChange: li, densityToggle: ui = !1, gridlines: di = !1, bordered: fi = !1, striped: pi = !1, fullscreenToggle: mi = !1, scrollHeight: hi, features: gi, virtual: _i = !1, rowHeight: vi = 41, onLoadMore: yi, onScrollEnd: bi, onScroll: xi, stateKey: Si, stateStorage: Ci = "session", stateExclude: wi = Yn, toolbar: Ti, toolbarStart: Ei, toolbarEnd: Di, empty: Oi, noResults: ki, loadingContent: Ai, ref: ji, className: Mi, ...Ni }) {
309
- let Pi = n("dataTable", ve, a), Fi = n("menu", Ke)(), E = e(), { locale: D } = t(), O = E.dataTable, Ii = tn(), Li = v(null), [Ri] = y(() => Object.assign({}, ...gi ?? [])), zi = (e, t) => wn?.(e, t) ?? O.row(t), Bi = (e, t) => or?.(e, t) ?? O.subRows(zi(e, t)), [Vi, Hi] = y({
346
+ }, dr = () => void 0, fr = bt("sm");
347
+ function pr({ classes: o, data: c, dataSource: l, cacheTime: ee = 0, searchDebounce: ne = 300, pivot: he, columns: be, caption: Ce, getRowId: De, pageSize: h, onPageSizeChange: We, pageSizeOptions: Ze, page: Qe, onPageChange: ht, first: gt, onFirstChange: vt, paginatorPosition: bt = "bottom", paginatorEdges: Ct, paginatorAlign: Jt, sorting: $t, onSortingChange: rn, defaultSorting: an, sortMode: dn = "single", manual: pn = !1, rowCount: mn, selectable: hn = !1, selectionMode: gn = "multiple", selection: _n, onSelectionChange: vn, selectedRows: yn, onSelectedRowsChange: bn, selectOnRowClick: xn = !1, isRowSelectable: Sn, selectAllMode: Cn = "page", allSelection: wn, onAllSelectionChange: Tn, rowLabel: En, loading: Dn = !1, loadingVariant: On = "overlay", emptyText: kn, noResultsText: An, loadingText: jn, selectAllLabel: Mn, getSubRows: Nn, treeFilterMode: Pn, expanded: Fn, defaultExpanded: In, onExpandedChange: Ln, expandLabel: Rn, rowExpandable: Bn, expansion: Vn, advancedFilter: Hn, advancedFilterValue: pr, onAdvancedFilterValueChange: mr, renderAdvancedFilter: hr, sortable: gr, search: _r = !1, searchAlign: vr, globalFilter: yr, onGlobalFilterChange: br, rowKeywords: xr, highlightSearch: Sr = !1, filters: Cr, onFiltersChange: wr, filterDisplay: Tr = "row", showFilters: Er, onShowFiltersChange: Dr, filterToggle: Or = !1, filterReset: kr = !1, maxConstraints: Ar = 2, resizable: jr = !1, columnToggle: Mr = !1, hiddenColumns: Nr, onHiddenColumnsChange: Pr, columnMenu: Fr = !1, reorderableColumns: Ir = !1, columnOrder: Lr, onColumnOrderChange: Rr, pinnedColumns: zr, onPinnedColumnsChange: Br, exportFilename: Vr, csvSeparator: Hr, exportFormats: Ur, groupBy: Wr, onGroupByChange: Gr, frozenRows: Kr, reorderableRows: qr = !1, onRowReorder: Jr, rowNumbers: Yr = !1, rowActions: Xr, onRowAction: Zr, contextMenu: Qr = !1, rowClass: $r, rowHref: ei, onRowClick: ti, navigation: ni = "tab", statusBar: ri = !1, cellSelection: w = !1, onCellSelectionChange: ii, onCellPaste: ai, onSave: oi, find: si = !1, wrapHeaders: ci, verticalHeaders: li, editMode: T = "cell", editTrigger: ui = "click", onCellEdit: di, onRowEdit: fi, size: pi, onSizeChange: mi, densityToggle: hi = !1, gridlines: gi, bordered: _i, striped: vi, fullscreenToggle: yi = !1, scrollHeight: bi, minScrollHeight: xi, features: Si, virtual: Ci = !1, rowHeight: wi = 41, onLoadMore: Ti, onScrollEnd: Ei, onScroll: Di, stateKey: Oi, stateStorage: ki = "session", stateExclude: Ai = or, toolbar: ji, toolbarStart: Mi, toolbarEnd: Ni, empty: Pi, noResults: Fi, loadingContent: Ii, ref: Li, className: Ri, ...zi }) {
348
+ let Bi = t("dataTable", xe, o), Vi = r("dataTable", xe), Hi = gi ?? !!Vi.gridlines, Ui = _i ?? !!Vi.bordered, Wi = vi ?? !!Vi.striped, Gi = ci ?? !!Vi.wrapHeaders, Ki = li ?? !!Vi.verticalHeaders, qi = t("menu", Ye)(), E = n(), { locale: D } = e(), O = E.dataTable, Ji = on(), Yi = v(null), [Xi] = y(() => Object.assign({}, ...Si ?? [])), Zi = (e, t) => En?.(e, t) ?? O.row(t), Qi = (e, t) => Rn?.(e, t) ?? O.subRows(Zi(e, t)), [$i, ea] = y({
310
349
  status: "idle",
311
350
  items: []
312
- }), Ui = v(s), [Wi] = y(() => pe({ source: { getItems: (e) => Zn(Ui.current).getItems(e) } }));
351
+ }), ta = v(l), [na] = y(() => ge({ source: { getItems: (e) => cr(ta.current).getItems(e) } }));
313
352
  g(() => {
314
- Ui.current = s, Wi.configure({
353
+ ta.current = l, na.configure({
315
354
  ttl: ee,
316
- debounce: fe
355
+ debounce: ne
317
356
  });
318
- }), g(() => (Wi.configure({ onChange: Hi }), () => Wi.dispose()), [Wi]);
319
- let Gi = _(() => {
320
- if (!_e) return null;
357
+ }), g(() => (na.configure({ onChange: ea }), () => na.dispose()), [na]);
358
+ let ra = _(() => {
359
+ if (!he) return null;
321
360
  let e = /* @__PURE__ */ new Map(), t = (n) => n.forEach((n) => n.columns ? t(n.columns) : e.set(n.id, n));
322
361
  t(be);
323
362
  let n = (t, n) => {
324
363
  let r = e.get(n);
325
364
  return r ? typeof r.accessor == "function" ? r.accessor(t) : t[r.accessor ?? r.id] : t[n];
326
365
  }, r = new Intl.NumberFormat(D, { maximumFractionDigits: 2 });
327
- return at(it(o ?? Jn, _e, n, (t, n, r) => {
366
+ return ct(st(c ?? ar, he, n, (t, n, r) => {
328
367
  let i = e.get(n)?.format;
329
- return i ? i(r, t) : In(r);
330
- }), _e, {
368
+ return i ? i(r, t) : qn(r);
369
+ }), he, {
331
370
  header: (t) => e.get(t)?.header ?? t,
332
371
  totalLabel: O.total,
333
- format: (e) => typeof e == "number" ? r.format(e) : In(e)
372
+ format: (e) => typeof e == "number" ? r.format(e) : qn(e)
334
373
  });
335
374
  }, [
336
- _e,
337
- o,
375
+ he,
376
+ c,
338
377
  be,
339
378
  D,
340
379
  O
341
- ]), [Ki, qi] = y(() => Ce("and", "root")), Ji = ur ?? Ki, [Yi, Xi] = y(!1), Zi = _(() => Array.isArray(lr) ? lr : lr ? de(be, o ?? Jn) : [], [
342
- lr,
380
+ ]), [ia, aa] = y(() => Ee("and", "root")), oa = pr ?? ia, [sa, ca] = y(!1), la = _(() => Array.isArray(Hn) ? Hn : Hn ? me(be, c ?? ar) : [], [
381
+ Hn,
343
382
  be,
344
- o
345
- ]), Qi = !!lr && Pe(Ji, Zi), $i = (e) => {
346
- qi(e), dr?.(e);
347
- }, ea = !!lr && !!fr;
383
+ c
384
+ ]), ua = !!Hn && Le(oa, la), da = (e) => {
385
+ aa(e), mr?.(e);
386
+ }, fa = !!Hn && !!hr;
348
387
  g(() => {
349
- lr && !fr && wt("DataTable: `advancedFilter` has no editor, so the toolbar button is hidden – pass `renderAdvancedFilter={(props) => <ConditionBuilder {...props} />}` with ConditionBuilder from @wirecore/wirelayer-blocks-react");
350
- }, [lr, fr]);
351
- let ta = _(() => Qi && !dn ? (o ?? Jn).filter((e) => Ue(e, Ji, Zi, D)) : o, [
352
- Qi,
353
- dn,
354
- o,
355
- Ji,
356
- Zi,
388
+ Hn && !hr && Ot("DataTable: `advancedFilter` has no editor, so the toolbar button is hidden – pass `renderAdvancedFilter={(props) => <ConditionBuilder {...props} />}` with ConditionBuilder from @wirecore/wirelayer-blocks-react");
389
+ }, [Hn, hr]);
390
+ let pa = _(() => ua && !pn ? (c ?? ar).filter((e) => Ke(e, oa, la, D)) : c, [
391
+ ua,
392
+ pn,
393
+ c,
394
+ oa,
395
+ la,
357
396
  D
358
- ]), na = Gi ? Gi.rows : s ? Vi.items : ta ?? Jn, ra = Gi ? Gi.columns : be, k = dn || !!s, ia = s ? Vi.totalCount ?? Vi.items.length : fn, aa = !!s && Vi.status === "error", oa = Tn || !!s && Vi.status === "loading", { leafDefs: A, columnById: j } = _(() => {
397
+ ]), ma = ra ? ra.rows : l ? $i.items : pa ?? ar, ha = ra ? ra.columns : be, k = pn || !!l, ga = l ? $i.totalCount ?? $i.items.length : mn, _a = !!l && $i.status === "error", va = Dn || !!l && $i.status === "loading", { leafDefs: A, columnById: j } = _(() => {
359
398
  let e = /* @__PURE__ */ new Map(), t = [], n = (r) => r.forEach((r) => {
360
399
  e.set(r.id, r), r.columns ? n(r.columns) : t.push(r);
361
400
  });
362
- return n(ra), {
401
+ return n(ha), {
363
402
  leafDefs: t,
364
403
  columnById: e
365
404
  };
366
- }, [ra]), sa = (e, t) => typeof e.accessor == "function" ? e.accessor(t) : t[e.accessor ?? e.id], M = (e, t, n) => e?.format ? e.format(t, n) : In(t), ca = Xn(en), [la, ua] = y(() => Rn(ln)), N = _(() => ca === void 0 ? la : Rn(ca), [ca, la]), [da, fa] = y(0), [pa, ma] = y(h ?? 10), [ha, ga] = y(h);
367
- h !== ha && (ga(h), ma(h ?? 10));
368
- let _a = ht === void 0 ? ft === void 0 ? da : ft - 1 : Math.floor(ht / pa), va = pa, P = _(() => ({
369
- pageIndex: _a,
370
- pageSize: va
371
- }), [_a, va]), ya = (e) => {
372
- let t = (o ?? Jn).indexOf(e);
373
- return Ve ? Ve(e, t) : t >= 0 ? String(t) : void 0;
374
- }, ba = Xn(hn), xa = Xn(_n), Sa = _(() => xa?.map(ya).filter((e) => e !== void 0), [xa]), [Ca, wa] = y({}), Ta = _(() => ba === void 0 ? Sa === void 0 ? Ca : Hn(Sa) : Hn(ba), [
375
- ba,
376
- Sa,
377
- Ca
378
- ]), [Ea, Da] = y(null), Oa = Xn(Sn), ka = Oa === void 0 ? Ea : Oa, [Aa, ja] = y(!0), Ma = xr ?? Aa, [F, Na] = y(() => Ln(zr)), Pa = Ln(zr).join("\0"), [Fa, Ia] = y(Pa);
379
- Pa !== Fa && (Ia(Pa), Na(Ln(zr)));
380
- let [La, Ra] = y(() => ir ? Vn(ir) : zr && !cr ? !0 : {}), za = Xn(rr), Ba = _(() => za === void 0 ? La : Vn(za), [za, La]), [Va, Ha] = y(""), I = mr ?? Va, [Ua, Wa] = y([]), Ga = Xn(vr), Ka = _(() => Ga === void 0 ? Ua : Bn(Ga), [Ga, Ua]), [qa, Ja] = y({}), Ya = Xn(Or), Xa = _(() => Ya === void 0 ? qa : Vn(Ya, !1), [Ya, qa]), [Za, Qa] = y([]), $a = Xn(Mr) ?? Za, [eo, to] = y(null), no = Xn(Pr), ro = _(() => no ?? eo ?? {
405
+ }, [ha]), ya = (e, t) => typeof e.accessor == "function" ? e.accessor(t) : t[e.accessor ?? e.id], M = (e, t, n) => e?.format ? e.format(t, n) : qn(t), ba = sr($t), [xa, Sa] = y(() => Yn(an)), N = _(() => ba === void 0 ? xa : Yn(ba), [ba, xa]), [Ca, wa] = y(0), [Ta, Ea] = y(h ?? 10), [Da, Oa] = y(h);
406
+ h !== Da && (Oa(h), Ea(h ?? 10));
407
+ let ka = gt === void 0 ? Qe === void 0 ? Ca : Qe - 1 : Math.floor(gt / Ta), Aa = Ta, P = _(() => ({
408
+ pageIndex: ka,
409
+ pageSize: Aa
410
+ }), [ka, Aa]), ja = (e) => {
411
+ let t = (c ?? ar).indexOf(e);
412
+ return De ? De(e, t) : t >= 0 ? String(t) : void 0;
413
+ }, Ma = sr(_n), Na = sr(yn), Pa = _(() => Na?.map(ja).filter((e) => e !== void 0), [Na]), [Fa, Ia] = y({}), La = _(() => Ma === void 0 ? Pa === void 0 ? Fa : $n(Pa) : $n(Ma), [
414
+ Ma,
415
+ Pa,
416
+ Fa
417
+ ]), [Ra, za] = y(null), Ba = sr(wn), Va = Ba === void 0 ? Ra : Ba, [Ha, Ua] = y(Vi.showFilters ?? !0), Wa = Er ?? Ha, [F, Ga] = y(() => Jn(Wr)), Ka = Jn(Wr).join("\0"), [qa, Ja] = y(Ka);
418
+ Ka !== qa && (Ja(Ka), Ga(Jn(Wr)));
419
+ let [Ya, Xa] = y(() => In ? Qn(In) : Wr && !Vn ? !0 : {}), Za = sr(Fn), Qa = _(() => Za === void 0 ? Ya : Qn(Za), [Za, Ya]), [$a, eo] = y(""), I = yr ?? $a, [to, no] = y([]), ro = sr(Cr), io = _(() => ro === void 0 ? to : Zn(ro), [ro, to]), [ao, oo] = y({}), so = sr(Nr), co = _(() => so === void 0 ? ao : Qn(so, !1), [so, ao]), [lo, uo] = y([]), fo = sr(Lr) ?? lo, [po, mo] = y(null), ho = sr(zr), go = _(() => ho ?? po ?? {
381
420
  start: A.filter((e) => e.pinned === "start").map((e) => e.id),
382
421
  end: A.filter((e) => e.pinned === "end").map((e) => e.id)
383
422
  }, [
384
- no,
385
- eo,
423
+ ho,
424
+ po,
386
425
  A
387
- ]), [io, ao] = y({}), [oo, so] = y(ci ?? "md"), [co, lo] = y(ci);
388
- ci !== co && (lo(ci), ci && so(ci));
389
- let uo = _(() => ({
390
- top: [...Vr ?? []],
426
+ ]), [_o, vo] = y({}), [yo, bo] = y(pi ?? "md"), [xo, So] = y(pi);
427
+ pi !== xo && (So(pi), pi && bo(pi));
428
+ let Co = _(() => ({
429
+ top: [...Kr ?? []],
391
430
  bottom: []
392
- }), [Vr]), fo = (e) => {
393
- ua(e), sn?.(un === "multiple" ? [...e] : e[0] ?? null);
394
- }, po = (e) => {
395
- e.pageSize !== P.pageSize && (ma(e.pageSize), Je?.(e.pageSize)), fa(e.pageIndex), pt?.(e.pageIndex + 1), yt?.(e.pageIndex * e.pageSize);
396
- }, mo = v(/* @__PURE__ */ new Map()), ho = (e) => {
397
- wa(e);
431
+ }), [Kr]), wo = (e) => {
432
+ Sa(e), rn?.(dn === "multiple" ? [...e] : e[0] ?? null);
433
+ }, To = (e) => {
434
+ e.pageSize !== P.pageSize && (Ea(e.pageSize), We?.(e.pageSize)), wa(e.pageIndex), ht?.(e.pageIndex + 1), vt?.(e.pageIndex * e.pageSize);
435
+ }, Eo = v(/* @__PURE__ */ new Map()), Do = (e) => {
436
+ Ia(e);
398
437
  let t = Object.keys(e).filter((t) => e[t]);
399
- gn?.(t);
438
+ vn?.(t);
400
439
  let n = L.getCoreRowModel().rowsById;
401
- for (let t of [...mo.current.keys()]) e[t] || mo.current.delete(t);
402
- for (let e of t) n[e] && mo.current.set(e, n[e].original);
403
- for (let t of _n ?? []) {
404
- let n = ya(t);
405
- n !== void 0 && e[n] && !mo.current.has(n) && mo.current.set(n, t);
440
+ for (let t of [...Eo.current.keys()]) e[t] || Eo.current.delete(t);
441
+ for (let e of t) n[e] && Eo.current.set(e, n[e].original);
442
+ for (let t of yn ?? []) {
443
+ let n = ja(t);
444
+ n !== void 0 && e[n] && !Eo.current.has(n) && Eo.current.set(n, t);
406
445
  }
407
- vn?.(t.flatMap((e) => mo.current.has(e) ? [mo.current.get(e)] : []));
408
- }, go = (e) => {
409
- Da(e), Cn?.(e);
410
- }, _o = (e) => {
411
- ja(e), Sr?.(e);
412
- }, vo = () => _o(!Ma), yo = (e) => {
413
- Ra(e), ar?.(e === !0 ? [] : Object.keys(e).filter((t) => e[t]));
414
- }, bo = (e) => {
415
- so(e), li?.(e);
416
- }, xo = !!gr && !Gi, So = _(() => {
417
- let e = (e) => !e.filter || e.filter === "text" || e.filter === "select" || e.filter === "multiSelect", t = (e, t, n) => e.format ? e.format(t, n) : In(t), n = (r) => r.columns ? {
446
+ bn?.(t.flatMap((e) => Eo.current.has(e) ? [Eo.current.get(e)] : []));
447
+ }, Oo = (e) => {
448
+ za(e), Tn?.(e);
449
+ }, ko = (e) => {
450
+ Ua(e), Dr?.(e);
451
+ }, Ao = () => ko(!Wa), jo = (e) => {
452
+ Xa(e), Ln?.(e === !0 ? [] : Object.keys(e).filter((t) => e[t]));
453
+ }, Mo = (e) => {
454
+ bo(e), mi?.(e);
455
+ }, No = !!xr && !ra, Po = _(() => {
456
+ let e = (e) => !e.filter || e.filter === "text" || e.filter === "select" || e.filter === "multiSelect", t = (e, t, n) => e.format ? e.format(t, n) : qn(t), n = (r) => r.columns ? {
418
457
  id: r.id,
419
458
  header: r.header,
420
459
  columns: r.columns.map(n)
@@ -426,143 +465,146 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
426
465
  sortDescFirst: !1,
427
466
  sortUndefined: "last",
428
467
  ...r.sortFn ? { sortFn: (e, t) => r.sortFn(e.original, t.original) } : {},
429
- filterFn: (n, i, a) => He({
468
+ filterFn: (n, i, a) => Ge({
430
469
  value: n.getValue(i),
431
470
  text: e(r) ? t(r, n.getValue(i), n.original) : "",
432
471
  row: n.original,
433
472
  type: r.filter,
434
473
  locale: D,
435
474
  filterFn: r.filterFn,
436
- byValue: Wn(r)
475
+ byValue: tr(r)
437
476
  }, a),
438
- enableGlobalFilter: xo || r.searchable !== !1,
477
+ enableGlobalFilter: No || r.searchable !== !1,
439
478
  enableHiding: r.hideable !== !1,
440
479
  enableGrouping: !0,
441
480
  ...r.width ? { size: r.width } : {},
442
- minSize: Kn
481
+ minSize: rr
443
482
  };
444
- return ra.map(n);
483
+ return ha.map(n);
445
484
  }, [
446
- ra,
485
+ ha,
447
486
  D,
448
- xo
449
- ]), L = jn({
450
- features: Mn,
451
- columns: So,
452
- data: na,
453
- getRowId: (e, t) => Gi ? e.id : Ve?.(e, t) ?? String(t),
487
+ No
488
+ ]), L = zn({
489
+ features: Un,
490
+ columns: Po,
491
+ data: ma,
492
+ meta: { locale: D },
493
+ getRowId: (e, t) => ra ? e.id : De?.(e, t) ?? String(t),
454
494
  state: {
455
495
  sorting: N,
456
496
  pagination: P,
457
- rowSelection: Ta,
458
- expanded: Ba,
497
+ rowSelection: La,
498
+ expanded: Qa,
459
499
  globalFilter: I,
460
- columnFilters: Ka,
461
- columnVisibility: Xa,
462
- columnOrder: $a,
463
- columnPinning: ro,
464
- columnSizing: io,
500
+ columnFilters: io,
501
+ columnVisibility: co,
502
+ columnOrder: fo,
503
+ columnPinning: go,
504
+ columnSizing: _o,
465
505
  grouping: F,
466
- rowPinning: uo
506
+ rowPinning: Co
467
507
  },
468
- getSubRows: tr,
469
- filterFromLeafRows: nr === "lenient",
470
- getRowCanExpand: (e) => !!cr && (sr?.(e.original) ?? !0) || !!e.subRows?.length,
471
- ...Hr || w ? { autoResetExpanded: !1 } : {},
472
- onExpandedChange: (e) => yo(C(e, Ba)),
473
- onSortingChange: (e) => fo(C(e, N)),
474
- onPaginationChange: (e) => po(C(e, P)),
475
- onRowSelectionChange: (e) => ho(C(e, Ta)),
508
+ getSubRows: Nn,
509
+ filterFromLeafRows: Pn === "lenient",
510
+ getRowCanExpand: (e) => !!Vn && (Bn?.(e.original) ?? !0) || !!e.subRows?.length,
511
+ ...qr || w ? { autoResetExpanded: !1 } : {},
512
+ onExpandedChange: (e) => jo(C(e, Qa)),
513
+ onSortingChange: (e) => wo(C(e, N)),
514
+ onPaginationChange: (e) => To(C(e, P)),
515
+ onRowSelectionChange: (e) => Do(C(e, La)),
476
516
  onGlobalFilterChange: (e) => {
477
517
  let t = C(e, I) ?? "";
478
- Ha(t), hr?.(t);
518
+ eo(t), br?.(t);
479
519
  },
480
520
  onColumnFiltersChange: (e) => {
481
- let t = C(e, Ka);
482
- Wa(t), yr?.(zn(t));
521
+ let t = C(e, io);
522
+ no(t), wr?.(Xn(t));
483
523
  },
484
524
  onColumnVisibilityChange: (e) => {
485
- let t = C(e, Xa);
486
- Ja(t), kr?.(Object.keys(t).filter((e) => t[e] === !1));
525
+ let t = C(e, co);
526
+ oo(t), Pr?.(Object.keys(t).filter((e) => t[e] === !1));
487
527
  },
488
528
  onColumnOrderChange: (e) => {
489
- let t = C(e, $a);
490
- Qa(t), Nr?.(t);
529
+ let t = C(e, fo);
530
+ uo(t), Rr?.(t);
491
531
  },
492
532
  onColumnPinningChange: (e) => {
493
- let t = C(e, ro);
494
- to(t), Fr?.({
533
+ let t = C(e, go);
534
+ mo(t), Br?.({
495
535
  start: [...t.start],
496
536
  end: [...t.end]
497
537
  });
498
538
  },
499
- onColumnSizingChange: (e) => ao((t) => C(e, t)),
539
+ onColumnSizingChange: (e) => vo((t) => C(e, t)),
500
540
  onGroupingChange: (e) => {
501
541
  let t = C(e, F);
502
- Na(t), Br?.(t);
542
+ Ga(t), Gr?.(t);
503
543
  },
504
544
  globalFilterFn: (e, t, n) => {
505
- if (xo && We(gr(e.original), n, D)) return !0;
545
+ if (No && qe(xr(e.original), n, D)) return !0;
506
546
  let r = j.get(t);
507
- return r?.searchable !== !1 && Ge([M(r, e.getValue(t), e.original)], n, D);
547
+ return r?.searchable !== !1 && Je([M(r, e.getValue(t), e.original)], n, D);
508
548
  },
509
- getColumnCanGlobalFilter: (e) => xo || j.get(e.id)?.searchable !== !1,
510
- enableColumnResizing: Er,
549
+ getColumnCanGlobalFilter: (e) => No || j.get(e.id)?.searchable !== !1,
550
+ enableColumnResizing: jr,
511
551
  columnResizeMode: "onChange",
512
552
  groupedColumnMode: !1,
513
553
  keepPinnedRows: !0,
514
- enableRowSelection: (e) => pn && !e.getIsGrouped() && (bn?.(e.original) ?? !0),
515
- enableMultiRowSelection: mn !== "single",
554
+ enableRowSelection: (e) => hn && !e.getIsGrouped() && (Sn?.(e.original) ?? !0),
555
+ enableMultiRowSelection: gn !== "single",
516
556
  manualSorting: k,
517
557
  manualFiltering: k,
518
558
  manualPagination: k || !h,
519
- rowCount: k ? ia : void 0
520
- }), [R, Co] = y(!1), wo = {
521
- size: oo,
522
- gridlines: di,
523
- bordered: fi,
524
- paginatorAlign: $e($t),
525
- striped: pi,
526
- scrollable: !!hi,
527
- wrapHeaders: ri,
528
- verticalHeaders: ii
529
- }, z = Zr === "grid", To = z && !!tr, B = _i && !!hi && !!Ri.useVirtualizer, Eo = !!h, V = Pi({
530
- ...wo,
559
+ rowCount: k ? ga : void 0
560
+ }), [R, Fo] = y(!1), Io = {
561
+ size: yo,
562
+ gridlines: Hi,
563
+ bordered: Ui,
564
+ paginatorAlign: nt(Jt),
565
+ striped: Wi,
566
+ scrollable: !!bi,
567
+ fill: bi === "fill",
568
+ wrapHeaders: Gi,
569
+ verticalHeaders: Ki
570
+ }, z = ni === "grid", Lo = z && !!Nn, B = Ci && !!bi && !!Xi.useVirtualizer, Ro = !!h, zo = _r && (vr ? vr === "center" : !!Vi.searchCentered), V = Bi({
571
+ ...Io,
531
572
  fullscreen: R,
532
- grid: z
533
- }), Do = (e) => {
573
+ grid: z,
574
+ searchCentered: zo
575
+ }), Bo = (e) => {
534
576
  let t = j.get(e);
535
- return Pi({
536
- ...wo,
577
+ return Bi({
578
+ ...Io,
537
579
  align: t?.align,
538
580
  hideBelow: t?.hideBelow ? `hide-${t.hideBelow}` : void 0
539
581
  });
540
- }, Oo = (e, t) => {
582
+ }, Vo = (e, t) => {
541
583
  let n = j.get(e)?.cellClass;
542
584
  return typeof n == "function" ? t && !t.getIsGrouped() ? n(t.original) : void 0 : n;
543
- }, ko = A.some((e) => e.editable), Ao = T !== "row", H = [
544
- ...Hr ? ["drag"] : [],
545
- ...pn ? ["select"] : [],
546
- ...cr ? ["expand"] : [],
547
- ...Wr ? ["number"] : []
548
- ], U = Gr || T === "row" && ko ? ["actions"] : [], W = L.getVisibleLeafColumns(), jo = W.length + H.length + U.length, Mo = Er || A.some((e) => e.width) || ro.start.length > 0 || ro.end.length > 0, No = ro.start.length > 0, Po = ro.end.length > 0, Fo = H.reduce((e, t) => e + $n[t], 0), Io = U.reduce((e, t) => e + $n[t], 0), Lo = (e, t) => {
585
+ }, Ho = A.some((e) => e.editable), Uo = T !== "row", H = [
586
+ ...qr ? ["drag"] : [],
587
+ ...hn ? ["select"] : [],
588
+ ...Vn ? ["expand"] : [],
589
+ ...Yr ? ["number"] : []
590
+ ], U = Xr || T === "row" && Ho ? ["actions"] : [], W = L.getVisibleLeafColumns(), Wo = (e) => !U.length && W.at(-1)?.id === e, Go = W.length + H.length + U.length, Ko = jr || A.some((e) => e.width) || go.start.length > 0 || go.end.length > 0, qo = go.start.length > 0, Jo = go.end.length > 0, Yo = H.reduce((e, t) => e + ur[t], 0), Xo = U.reduce((e, t) => e + ur[t], 0), Zo = (e, t) => {
549
591
  let n = L.getColumn(e), r = n?.getIsPinned();
550
592
  if (!n || !r) return "";
551
593
  let i = r === "start" ? L.getStartVisibleLeafColumns().at(-1)?.id === e && V.pinnedStartEdge() : L.getEndVisibleLeafColumns()[0]?.id === e && V.pinnedEndEdge();
552
594
  return [t ? V.pinnedHead() : V.pinned(), i].filter(Boolean).join(" ");
553
- }, Ro = (e, t) => {
595
+ }, Qo = (e, t) => {
554
596
  let n = L.getColumn(e);
555
- if (!n || !Mo) return;
597
+ if (!n || !Ko) return;
556
598
  let r = n.getIsPinned();
557
599
  return {
558
600
  ...t ? { width: n.getSize() } : {},
559
- ...r === "start" ? { insetInlineStart: Fo + n.getStart("start") } : {},
560
- ...r === "end" ? { insetInlineEnd: Io + n.getAfter("end") } : {}
601
+ ...r === "start" ? { insetInlineStart: Yo + n.getStart("start") } : {},
602
+ ...r === "end" ? { insetInlineEnd: Xo + n.getAfter("end") } : {}
561
603
  };
562
- }, zo = (e) => U.includes(e) ? Po : No, G = (e, t) => [e === "select" ? V.selectCell() : V.utilityCell(), zo(e) ? t ? V.pinnedHead() : V.pinned() : ""].filter(Boolean).join(" "), K = (e) => {
563
- if (!Mo) return;
564
- let t = { width: $n[e] };
565
- if (!zo(e)) return t;
604
+ }, $o = (e) => U.includes(e) ? Jo : qo, G = (e, t) => [e === "select" ? V.selectCell() : V.utilityCell(), $o(e) ? t ? V.pinnedHead() : V.pinned() : ""].filter(Boolean).join(" "), K = (e) => {
605
+ if (!Ko) return;
606
+ let t = { width: ur[e] };
607
+ if (!$o(e)) return t;
566
608
  if (U.includes(e)) return {
567
609
  ...t,
568
610
  insetInlineEnd: 0
@@ -570,15 +612,15 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
570
612
  let n = H.slice(0, H.indexOf(e));
571
613
  return {
572
614
  ...t,
573
- insetInlineStart: n.reduce((e, t) => e + $n[t], 0)
615
+ insetInlineStart: n.reduce((e, t) => e + ur[t], 0)
574
616
  };
575
- }, Bo = L.getHeaderGroups(), Vo = (() => {
617
+ }, es = L.getHeaderGroups(), ts = (() => {
576
618
  let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
577
- Bo.forEach((n, r) => n.headers.forEach((n) => {
619
+ es.forEach((n, r) => n.headers.forEach((n) => {
578
620
  n.isPlaceholder || (e.set(n.column.id, r), t.set(n.column.id, n));
579
621
  }));
580
622
  let n = /* @__PURE__ */ new Set();
581
- return Bo.map((r, i) => r.headers.flatMap((r) => {
623
+ return es.map((r, i) => r.headers.flatMap((r) => {
582
624
  let a = r.column.id;
583
625
  if (n.has(a)) return [];
584
626
  n.add(a);
@@ -589,31 +631,37 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
589
631
  group: o.subHeaders.length > 0
590
632
  }];
591
633
  }));
592
- })(), q = (e) => j.get(e.id)?.header ?? e.id, Ho = (e) => j.get(e.id)?.headerHidden ? V.srOnly() : V.headLabel(), Uo = (e) => !!j.get(e)?.sortable, Wo = (e) => {
634
+ })(), q = (e) => j.get(e.id)?.header ?? e.id, ns = (e) => j.get(e.id)?.headerHidden ? V.srOnly() : V.headLabel(), rs = (e) => {
635
+ let t = j.get(e);
636
+ return !!t && (t.sortable ?? ((gr ?? !!Vi.sortable) && is(t)));
637
+ }, is = (e) => {
638
+ let t = ma[0];
639
+ return !!e.sortFn || e.accessor !== void 0 || !!t && e.id in t;
640
+ }, as = (e) => {
593
641
  let t = N[0];
594
- return t?.id === e ? t.desc ? "descending" : "ascending" : Uo(e) ? "none" : void 0;
595
- }, Go = (e) => N.findIndex((t) => t.id === e) + 1, [Ko, qo] = y(""), Jo = (e) => {
596
- qo(""), setTimeout(() => qo(e));
597
- }, J = v(null), Yo = v(!1);
598
- rn(() => {
642
+ return t?.id === e ? t.desc ? "descending" : "ascending" : rs(e) ? "none" : void 0;
643
+ }, os = (e) => N.findIndex((t) => t.id === e) + 1, [ss, cs] = y(""), ls = (e) => {
644
+ cs(""), setTimeout(() => cs(e));
645
+ }, J = v(null), us = v(!1);
646
+ cn(() => {
599
647
  if (!J.current) return;
600
- let e = Li.current?.querySelector(J.current);
601
- (Yo.current ? e?.closest("td") ?? e : e)?.focus(), J.current = null, Yo.current = !1;
648
+ let e = Yi.current?.querySelector(J.current);
649
+ (us.current ? e?.closest("td") ?? e : e)?.focus(), J.current = null, us.current = !1;
602
650
  });
603
- let Xo = Ar || jr, Zo = (e) => jr && j.get(e)?.reorderable !== !1, Qo = (e) => {
651
+ let ds = Fr || Ir, fs = (e) => Ir && j.get(e)?.reorderable !== !1, ps = (e) => {
604
652
  let t = j.get(e.id), n = e.getIsSorted(), r = e.getIsPinned(), i = W.map((e) => e.id), a = i.indexOf(e.id);
605
653
  return [
606
- Uo(e.id) ? [
654
+ rs(e.id) ? [
607
655
  {
608
656
  value: "sort-asc",
609
657
  label: O.sortAscending,
610
- icon: Et,
658
+ icon: At,
611
659
  disabled: n === "asc"
612
660
  },
613
661
  {
614
662
  value: "sort-desc",
615
663
  label: O.sortDescending,
616
- icon: Tt,
664
+ icon: kt,
617
665
  disabled: n === "desc"
618
666
  },
619
667
  ...n ? [{
@@ -635,7 +683,7 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
635
683
  label: O.unpin
636
684
  }] : []
637
685
  ],
638
- Zo(e.id) ? [{
686
+ fs(e.id) ? [{
639
687
  value: "move-earlier",
640
688
  label: O.moveEarlier,
641
689
  disabled: a <= 0
@@ -655,12 +703,12 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
655
703
  label: O.hideColumn
656
704
  }] : []]
657
705
  ].filter((e) => e.length).flatMap((e, t) => t ? [{ type: "separator" }, ...e] : e);
658
- }, $o = (e, t, n) => {
706
+ }, ms = (e, t, n) => {
659
707
  let r = L.getAllLeafColumns().map((e) => e.id).filter((t) => t !== e);
660
708
  r.splice(r.indexOf(t) + +!!n, 0, e), L.setColumnOrder(r);
661
709
  let i = W.map((e) => e.id).filter((t) => t !== e);
662
- i.splice(i.indexOf(t) + +!!n, 0, e), Jo(O.columnMoved(j.get(e)?.header ?? e, i.indexOf(e) + 1, i.length));
663
- }, es = (e, t) => {
710
+ i.splice(i.indexOf(t) + +!!n, 0, e), ls(O.columnMoved(j.get(e)?.header ?? e, i.indexOf(e) + 1, i.length));
711
+ }, hs = (e, t) => {
664
712
  let n = W.map((e) => e.id), r = n.indexOf(e.id);
665
713
  switch (J.current = `[data-column-menu="${CSS.escape(e.id)}"]`, t) {
666
714
  case "sort-asc":
@@ -669,11 +717,11 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
669
717
  id: e.id,
670
718
  desc: t === "sort-desc"
671
719
  };
672
- un === "multiple" ? Go(e.id) ? fo(N.map((t) => t.id === e.id ? n : t)) : fo([...N, n]) : fo([n]);
720
+ dn === "multiple" ? os(e.id) ? wo(N.map((t) => t.id === e.id ? n : t)) : wo([...N, n]) : wo([n]);
673
721
  break;
674
722
  }
675
723
  case "sort-clear":
676
- fo(N.filter((t) => t.id !== e.id));
724
+ wo(N.filter((t) => t.id !== e.id));
677
725
  break;
678
726
  case "pin-start":
679
727
  case "pin-end":
@@ -681,10 +729,10 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
681
729
  e.pin(t === "unpin" ? !1 : t === "pin-start" ? "start" : "end");
682
730
  break;
683
731
  case "move-earlier":
684
- $o(e.id, n[r - 1], !1);
732
+ ms(e.id, n[r - 1], !1);
685
733
  break;
686
734
  case "move-later":
687
- $o(e.id, n[r + 1], !0);
735
+ ms(e.id, n[r + 1], !0);
688
736
  break;
689
737
  case "group":
690
738
  L.setGrouping([...F, e.id]);
@@ -699,78 +747,78 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
699
747
  break;
700
748
  }
701
749
  }
702
- }, [ts, ns] = y(null), [rs, is] = y(null), as = (e, t) => {
703
- ns(e), t.dataTransfer.setData("text/plain", e), t.dataTransfer.effectAllowed = "move";
704
- }, os = (e, t) => {
705
- if (!ts || ts === e || !Zo(e)) return;
750
+ }, [gs, _s] = y(null), [vs, ys] = y(null), bs = (e, t) => {
751
+ _s(e), t.dataTransfer.setData("text/plain", e), t.dataTransfer.effectAllowed = "move";
752
+ }, xs = (e, t) => {
753
+ if (!gs || gs === e || !fs(e)) return;
706
754
  t.preventDefault();
707
755
  let n = t.currentTarget, r = n.getBoundingClientRect(), i = getComputedStyle(n).direction === "rtl", a = t.clientX > r.left + r.width / 2;
708
- is({
756
+ ys({
709
757
  id: e,
710
758
  after: i ? !a : a
711
759
  });
712
- }, ss = () => {
713
- ns(null), is(null);
714
- }, cs = (e) => {
715
- e.preventDefault(), ts && rs && $o(ts, rs.id, rs.after), ss();
716
- }, ls = (e) => rs?.id === e ? rs.after ? "after" : "before" : void 0, us = (e, t) => {
760
+ }, Ss = () => {
761
+ _s(null), ys(null);
762
+ }, Cs = (e) => {
763
+ e.preventDefault(), gs && vs && ms(gs, vs.id, vs.after), Ss();
764
+ }, ws = (e) => vs?.id === e ? vs.after ? "after" : "before" : void 0, Ts = (e, t) => {
717
765
  let n = t.currentTarget.closest("th"), r = n?.closest("table");
718
766
  if (!n || !r) return;
719
- let i = j.get(e), a = B && i ? L.getRowModel().rows.map((t) => M(i, t.getValue(e), t.original)) : void 0, o = De(r, n, a);
767
+ let i = j.get(e), a = B && i ? L.getRowModel().rows.map((t) => M(i, t.getValue(e), t.original)) : void 0, o = Ae(r, n, a);
720
768
  o && L.setColumnSizing((t) => ({
721
769
  ...t,
722
- [e]: Math.min(1200, Math.max(Kn, o))
770
+ [e]: Math.min(1200, Math.max(rr, o))
723
771
  }));
724
- }, ds = (e, t) => {
725
- if (t.key === "Enter") return t.preventDefault(), us(e, t);
726
- let n = Ne(t.key, t.currentTarget) * qn;
772
+ }, Es = (e, t) => {
773
+ if (t.key === "Enter") return t.preventDefault(), Ts(e, t);
774
+ let n = Ie(t.key, t.currentTarget) * ir;
727
775
  if (!n) return;
728
776
  t.preventDefault();
729
777
  let r = L.getColumn(e);
730
778
  L.setColumnSizing((t) => ({
731
779
  ...t,
732
- [e]: Math.max(Kn, r.getSize() + n)
780
+ [e]: Math.max(rr, r.getSize() + n)
733
781
  }));
734
- }, fs = (e) => !!e && (!!e.filter || !!e.renderFilter), ps = br === "row" && Ma && A.some((e) => fs(e)), ms = br === "menu" && Ma, hs = !!I || Ka.length > 0 || Qi, gs = (e) => Ka.find((t) => t.id === e)?.value, _s = (e) => e.filterOptions ?? [...new Set(na.map((t) => M(e, sa(e, t), t)))].filter(Boolean).sort(), vs = (e) => {
735
- let t = gs(e.id);
782
+ }, Ds = (e) => !!e && (!!e.filter || !!e.renderFilter), Os = Tr === "row" && Wa && A.some((e) => Ds(e)), ks = Tr === "menu" && Wa, As = !!I || io.length > 0 || ua, js = (e) => io.find((t) => t.id === e)?.value, Ms = (e) => e.filterOptions ?? [...new Set(ma.map((t) => M(e, ya(e, t), t)))].filter(Boolean).sort(), Ns = (e) => {
783
+ let t = js(e.id);
736
784
  return t === void 0 ? e.filter === "multiSelect" ? [] : null : typeof t == "string" ? t : t.constraints[0]?.value ?? null;
737
- }, ys = (e, t) => L.getColumn(e)?.setFilterValue(t !== void 0 && Fe(t) ? t : void 0), bs = (e) => e.filterMatchMode ?? (Wn(e) && e.filter === "multiSelect" ? "in" : ye[e.filter ?? "text"][0]), xs = (e) => Be(bs(e))?.input ?? e.filter ?? "text", Ss = (e, t) => {
785
+ }, Ps = (e, t) => L.getColumn(e)?.setFilterValue(t !== void 0 && Re(t) ? t : void 0), Fs = (e) => e.filterMatchMode ?? (tr(e) && e.filter === "multiSelect" ? "in" : Se[e.filter ?? "text"][0]), Is = (e) => Ue(Fs(e))?.input ?? e.filter ?? "text", Ls = (e, t) => {
738
786
  let n = e.filter ?? "text";
739
- if ((n === "text" || n === "select") && !e.filterMatchMode && !Wn(e) && !e.renderFilter) return ys(e.id, In(t));
740
- ys(e.id, {
787
+ if ((n === "text" || n === "select") && !e.filterMatchMode && !tr(e) && !e.renderFilter) return Ps(e.id, qn(t));
788
+ Ps(e.id, {
741
789
  operator: "and",
742
790
  constraints: [{
743
- matchMode: bs(e),
791
+ matchMode: Fs(e),
744
792
  value: t
745
793
  }]
746
794
  });
747
- }, Cs = (e, t) => {
748
- let n = vs(e);
795
+ }, Rs = (e) => !!Xi.dateRangeInput && ["date", "datetime"].includes(Is(e)), zs = (e, t) => {
796
+ let n = Ns(e);
749
797
  return Array.isArray(n) ? n[t] : null;
750
- }, ws = (e, t, n) => {
751
- let r = vs(e), i = Array.isArray(r) ? [...r] : [null, null];
752
- i[t] = n, Ss(e, i);
753
- }, Ts = mn !== "single", Es = xn === "all" && k, Ds = (e) => Es && ka ? e.getCanSelect() && !ka.except.includes(e.id) : e.getIsSelected(), Os = Es && ka ? Math.max(0, (ia ?? na.length) - ka.except.length) : Object.values(Ta).filter(Boolean).length, ks = Es ? ka ? !ka.except.length || "indeterminate" : Os ? "indeterminate" : !1 : L.getIsAllPageRowsSelected() ? !0 : L.getIsSomePageRowsSelected() ? "indeterminate" : !1, As = (e) => {
754
- Es ? (ho({}), go(ka || !e ? null : {
798
+ }, Bs = (e, t, n) => {
799
+ let r = Ns(e), i = Array.isArray(r) ? [...r] : [null, null];
800
+ i[t] = n, Ls(e, i);
801
+ }, Vs = gn !== "single", Hs = Cn === "all" && k, Us = (e) => Hs && Va ? e.getCanSelect() && !Va.except.includes(e.id) : e.getIsSelected(), Ws = Hs && Va ? Math.max(0, (ga ?? ma.length) - Va.except.length) : Object.values(La).filter(Boolean).length, Gs = Hs ? Va ? !Va.except.length || "indeterminate" : Ws ? "indeterminate" : !1 : L.getIsAllPageRowsSelected() ? !0 : L.getIsSomePageRowsSelected() ? "indeterminate" : !1, Ks = (e) => {
802
+ Hs ? (Do({}), Oo(Va || !e ? null : {
755
803
  mode: "all",
756
804
  except: []
757
- })) : xn === "all" ? L.toggleAllRowsSelected(e) : L.toggleAllPageRowsSelected(e);
758
- }, js = `${Ii}-select`, Ms = v(null), Ns = v(!1), Ps = (e, t, n = !1) => {
805
+ })) : Cn === "all" ? L.toggleAllRowsSelected(e) : L.toggleAllPageRowsSelected(e);
806
+ }, qs = `${Ji}-select`, Js = v(null), Ys = v(!1), Xs = (e, t, n = !1) => {
759
807
  let r = L.getRowModel().rows.filter((e) => e.getCanSelect()).map((e) => e.id);
760
- if (Es && ka) {
761
- let i = new Set(ka.except);
762
- for (let a of n && Ms.current ? Me(r, Ms.current, e.id) : [e.id]) t ? i.delete(a) : i.add(a);
763
- go({
808
+ if (Hs && Va) {
809
+ let i = new Set(Va.except);
810
+ for (let a of n && Js.current ? Fe(r, Js.current, e.id) : [e.id]) t ? i.delete(a) : i.add(a);
811
+ Oo({
764
812
  mode: "all",
765
813
  except: [...i]
766
814
  });
767
- } else ho(Ts ? Un(Ta, n && Ms.current ? Me(r, Ms.current, e.id) : [e.id], t) : t ? Hn([e.id]) : {});
768
- Ms.current = e.id;
769
- }, Fs = (e) => Ns.current = e.shiftKey, Is = "button, a, input, select, textarea, label, [role=checkbox], [role=combobox], [contenteditable]", Ls = (e, t) => {
815
+ } else Do(Vs ? er(La, n && Js.current ? Fe(r, Js.current, e.id) : [e.id], t) : t ? $n([e.id]) : {});
816
+ Js.current = e.id;
817
+ }, Zs = (e) => Ys.current = e.shiftKey, Qs = "button, a, input, select, textarea, label, [role=checkbox], [role=combobox], [contenteditable]", $s = (e, t) => {
770
818
  let n = t.target, r = !!n.closest("[data-row-link]");
771
- if (!r && n.closest(Is)) return;
772
- let i = Yr?.(e.original);
773
- if (Xr?.({
819
+ if (!r && n.closest(Qs)) return;
820
+ let i = ei?.(e.original);
821
+ if (ti?.({
774
822
  row: e.original,
775
823
  rowId: e.id,
776
824
  href: i,
@@ -778,11 +826,11 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
778
826
  }), i) {
779
827
  if (r || t.nativeEvent.defaultPrevented) return;
780
828
  t.ctrlKey || t.metaKey || t.shiftKey ? window.open(i, "_blank", "noopener") : window.location.assign(i);
781
- } else yn && e.getCanSelect() && Ps(e, !Ts || !Ds(e), Ts && t.shiftKey);
782
- }, Rs = (e, t) => {
783
- let n = Yr?.(e.original);
784
- t.button === 1 && n && !t.target.closest(Is) && window.open(n, "_blank", "noopener");
785
- }, zs = Vr?.length ? L.getCenterRows() : L.getRowModel().rows, Bs = Vr?.length ? L.getTopRows() : [], Y = (aa ? Jn : zs).flatMap((e) => e.getIsGrouped() ? [{
829
+ } else xn && e.getCanSelect() && Xs(e, !Vs || !Us(e), Vs && t.shiftKey);
830
+ }, ec = (e, t) => {
831
+ let n = ei?.(e.original);
832
+ t.button === 1 && n && !t.target.closest(Qs) && window.open(n, "_blank", "noopener");
833
+ }, tc = Kr?.length ? L.getCenterRows() : L.getRowModel().rows, nc = Kr?.length ? L.getTopRows() : [], Y = (_a ? ar : tc).flatMap((e) => e.getIsGrouped() ? [{
786
834
  kind: "group",
787
835
  row: e,
788
836
  key: e.id
@@ -790,158 +838,158 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
790
838
  kind: "row",
791
839
  row: e,
792
840
  key: e.id
793
- }, ...cr && e.getCanExpand() && e.getIsExpanded() ? [{
841
+ }, ...Vn && e.getCanExpand() && e.getIsExpanded() ? [{
794
842
  kind: "expansion",
795
843
  row: e,
796
844
  key: `${e.id}:details`
797
- }] : []]), Vs = h && !k ? P.pageIndex * P.pageSize : 0, Hs = new Map(Y.filter((e) => e.kind === "row").map((e, t) => [e.row.id, Vs + t + 1])), Us = (e) => `${Ii}-details-${e.id}`, Ws = L.getIsAllRowsExpanded(), Gs = !!tr || F.length > 0, Ks = A.some((e) => e.aggregate), qs = A.some((e) => e.aggregate || e.footer || e.renderFooter), Js = (e, t, n) => t == null ? "" : e.format && n ? e.format(t, n) : typeof t == "number" ? new Intl.NumberFormat(D, { maximumFractionDigits: 2 }).format(t) : In(t), Ys = (e, t) => {
845
+ }] : []]), rc = h && !k ? P.pageIndex * P.pageSize : 0, ic = new Map(Y.filter((e) => e.kind === "row").map((e, t) => [e.row.id, rc + t + 1])), ac = (e) => Wi ? String(((ic.get(e.id) ?? 0) - rc) % 2 == 0) : void 0, oc = (e) => `${Ji}-details-${e.id}`, sc = L.getIsAllRowsExpanded(), cc = !!Nn || F.length > 0, lc = A.some((e) => e.aggregate), uc = A.some((e) => e.aggregate || e.footer || e.renderFooter), dc = (e, t, n) => t == null ? "" : e.format && n ? e.format(t, n) : typeof t == "number" ? new Intl.NumberFormat(D, { maximumFractionDigits: 2 }).format(t) : qn(t), fc = (e, t) => {
798
846
  if (!e.aggregate) return "";
799
- let n = t.filter((e) => !e.getIsGrouped()), r = oe(n.map((t) => sa(e, t.original)), e.aggregate);
800
- return Js(e, r, e.aggregate === "count" ? void 0 : n[0]?.original);
801
- }, Xs = (e) => {
847
+ let n = t.filter((e) => !e.getIsGrouped()), r = ce(n.map((t) => ya(e, t.original)), e.aggregate);
848
+ return dc(e, r, e.aggregate === "count" ? void 0 : n[0]?.original);
849
+ }, pc = (e) => {
802
850
  if (e.footer !== void 0) return e.footer;
803
851
  if (!e.aggregate) return "";
804
- let t = Ys(e, L.getFilteredRowModel().flatRows);
852
+ let t = fc(e, L.getFilteredRowModel().flatRows);
805
853
  return typeof e.aggregate == "string" ? O.aggregates[e.aggregate]?.(t) ?? t : t;
806
- }, Zs = (e) => {
807
- let t = Xs(e);
854
+ }, mc = (e) => {
855
+ let t = pc(e);
808
856
  if (!e.renderFooter) return t;
809
- let n = L.getFilteredRowModel().flatRows.filter((e) => !e.getIsGrouped()), r = e.aggregate ? oe(n.map((t) => sa(e, t.original)), e.aggregate) : void 0;
857
+ let n = L.getFilteredRowModel().flatRows.filter((e) => !e.getIsGrouped()), r = e.aggregate ? ce(n.map((t) => ya(e, t.original)), e.aggregate) : void 0;
810
858
  return e.renderFooter({
811
859
  value: r,
812
860
  text: t,
813
861
  rows: n.map((e) => e.original)
814
862
  });
815
- }, Qs = (e) => typeof Gr == "function" ? Gr(e.original) : Gr ?? [], [$s, ec] = y(null), tc = (e) => {
863
+ }, hc = (e) => typeof Xr == "function" ? Xr(e.original) : Xr ?? [], [gc, _c] = y(null), vc = (e) => {
816
864
  let t = e.target.closest("[data-row-id]");
817
- ec(t ? L.getRow(t.dataset.rowId, !0) ?? null : null);
818
- }, nc = (e, t) => {
819
- e && Kr?.({
865
+ _c(t ? L.getRow(t.dataset.rowId, !0) ?? null : null);
866
+ }, yc = (e, t) => {
867
+ e && Zr?.({
820
868
  value: t,
821
869
  row: e.original,
822
870
  rowId: e.id
823
871
  });
824
- }, rc = (e) => {
872
+ }, bc = (e) => {
825
873
  try {
826
874
  return L.getRow(e, !0) ?? void 0;
827
875
  } catch {
828
876
  return;
829
877
  }
830
- }, [X, ic] = y(null), [ac, oc] = y(null), [sc, cc] = y(null), lc = v(null);
878
+ }, [X, xc] = y(null), [Sc, Cc] = y(null), [wc, Tc] = y(null), Ec = v(null);
831
879
  g(() => {
832
- lc.current &&= (Li.current?.querySelector(`[data-drag-handle="${CSS.escape(lc.current)}"]`)?.focus(), null);
833
- }, [na]);
834
- let uc = !!tr, dc = F.length > 0, fc = (e) => F.map((t) => Le(e.getValue(t))).join("\0"), pc = (e) => F.map((t) => {
880
+ Ec.current &&= (Yi.current?.querySelector(`[data-drag-handle="${CSS.escape(Ec.current)}"]`)?.focus(), null);
881
+ }, [ma]);
882
+ let Dc = !!Nn, Oc = F.length > 0, kc = (e) => F.map((t) => Be(e.getValue(t))).join("\0"), Ac = (e) => F.map((t) => {
835
883
  let n = j.get(t);
836
884
  return `${n?.header ?? t}: ${M(n, e.getValue(t), e.original)}`;
837
- }).join(", "), mc = () => Y.filter((e) => e.kind === "row" && (dc || e.row.depth === 0)).map((e) => e.row), hc = () => {
885
+ }).join(", "), jc = () => Y.filter((e) => e.kind === "row" && (Oc || e.row.depth === 0)).map((e) => e.row), Mc = () => {
838
886
  let e = (t) => t.map((t) => ({
839
887
  id: t.id,
840
- ...tr?.(t.original) ? { children: e(t.subRows) } : {}
888
+ ...Nn?.(t.original) ? { children: e(t.subRows) } : {}
841
889
  }));
842
890
  return e(L.getCoreRowModel().rows);
843
- }, gc = (e, t, n) => {
844
- let r = (e, t) => e < t ? t - 1 : t, i = e.index, a = r(i, t.index + +!!n), o = dc && fc(e) !== fc(t);
891
+ }, Nc = (e, t, n) => {
892
+ let r = (e, t) => e < t ? t - 1 : t, i = e.index, a = r(i, t.index + +!!n), o = Oc && kc(e) !== kc(t);
845
893
  if (i === a && !o) return;
846
894
  let s = o ? Object.fromEntries(F.map((e) => [e, t.getValue(e)])) : void 0;
847
- Ur?.({
895
+ Jr?.({
848
896
  row: e.original,
849
897
  rowId: e.id,
850
898
  from: i,
851
899
  to: a,
852
900
  ...s ? { group: s } : {}
853
901
  });
854
- let c = mc().filter((n) => n.id !== e.id && (!dc || fc(n) === fc(t))).map((e) => e.id), ee = c.indexOf(t.id) + +!!n + 1, l = zi(e.original, e.index);
855
- Jo(o ? O.rowMovedToGroup(l, pc(t), ee, c.length + 1) : O.rowMoved(l, ee, c.length + 1));
856
- }, _c = (e, t) => {
902
+ let c = jc().filter((n) => n.id !== e.id && (!Oc || kc(n) === kc(t))).map((e) => e.id), l = c.indexOf(t.id) + +!!n + 1, ee = Zi(e.original, e.index);
903
+ ls(o ? O.rowMovedToGroup(ee, Ac(t), l, c.length + 1) : O.rowMoved(ee, l, c.length + 1));
904
+ }, Pc = (e, t) => {
857
905
  if (!t) return;
858
- let n = hc(), r = t.parentId ? rc(t.parentId) : void 0, i = t.parentId ? ze(n, t.parentId)?.node.children ?? [] : n;
859
- Ur?.({
906
+ let n = Mc(), r = t.parentId ? bc(t.parentId) : void 0, i = t.parentId ? He(n, t.parentId)?.node.children ?? [] : n;
907
+ Jr?.({
860
908
  row: e.original,
861
909
  rowId: e.id,
862
910
  from: e.index,
863
911
  to: t.index,
864
912
  parentId: t.parentId,
865
913
  index: t.index
866
- }), r && !r.getIsExpanded() && r.toggleExpanded(!0), Jo(O.rowMovedInTree(zi(e.original, e.index), r ? zi(r.original, r.index) : null, t.index + 1, i.filter((t) => t.id !== e.id).length + 1));
867
- }, vc = (e, t) => {
868
- if (uc) {
914
+ }), r && !r.getIsExpanded() && r.toggleExpanded(!0), ls(O.rowMovedInTree(Zi(e.original, e.index), r ? Zi(r.original, r.index) : null, t.index + 1, i.filter((t) => t.id !== e.id).length + 1));
915
+ }, Fc = (e, t) => {
916
+ if (Dc) {
869
917
  let n = getComputedStyle(t.currentTarget).direction === "rtl", r = t.key === "ArrowUp" ? "up" : t.key === "ArrowDown" ? "down" : t.key === "ArrowRight" ? n ? "out" : "in" : t.key === "ArrowLeft" ? n ? "in" : "out" : void 0;
870
918
  if (!r) return;
871
- t.preventDefault(), lc.current = e.id, _c(e, Ct(hc(), e.id, r));
919
+ t.preventDefault(), Ec.current = e.id, Pc(e, Dt(Mc(), e.id, r));
872
920
  return;
873
921
  }
874
922
  if (t.key !== "ArrowUp" && t.key !== "ArrowDown") return;
875
923
  t.preventDefault();
876
- let n = mc();
877
- if (dc) {
878
- let r = Ae(n.map((e) => ({
924
+ let n = jc();
925
+ if (Oc) {
926
+ let r = Ne(n.map((e) => ({
879
927
  id: e.id,
880
- group: fc(e)
881
- })), e.id, t.key === "ArrowUp" ? "up" : "down"), i = r && rc(r.targetId);
928
+ group: kc(e)
929
+ })), e.id, t.key === "ArrowUp" ? "up" : "down"), i = r && bc(r.targetId);
882
930
  if (!r || !i) return;
883
- lc.current = e.id, gc(e, i, r.after);
931
+ Ec.current = e.id, Nc(e, i, r.after);
884
932
  return;
885
933
  }
886
934
  let r = n[n.indexOf(e) + (t.key === "ArrowUp" ? -1 : 1)];
887
- r && (lc.current = e.id, gc(e, r, t.key === "ArrowDown"));
888
- }, yc = (e, t) => {
889
- if (ac !== e.id) return t.preventDefault();
890
- ic(e.id), t.dataTransfer.setData("text/plain", e.id), t.dataTransfer.effectAllowed = "move";
891
- }, bc = (e, t) => {
935
+ r && (Ec.current = e.id, Nc(e, r, t.key === "ArrowDown"));
936
+ }, Ic = (e, t) => {
937
+ if (Sc !== e.id) return t.preventDefault();
938
+ xc(e.id), t.dataTransfer.setData("text/plain", e.id), t.dataTransfer.effectAllowed = "move";
939
+ }, Lc = (e, t) => {
892
940
  if (!X || X === e.id) return;
893
941
  let n = t.currentTarget.getBoundingClientRect(), r = (t.clientY - n.top) / n.height;
894
- if (uc) {
895
- let n = tr?.(e.original) ? r < .25 ? "before" : r > .75 ? "after" : "inside" : r < .5 ? "before" : "after";
896
- if (!xt(hc(), X, e.id, n)) return cc(null);
897
- t.preventDefault(), cc({
942
+ if (Dc) {
943
+ let n = Nn?.(e.original) ? r < .25 ? "before" : r > .75 ? "after" : "inside" : r < .5 ? "before" : "after";
944
+ if (!Tt(Mc(), X, e.id, n)) return Tc(null);
945
+ t.preventDefault(), Tc({
898
946
  id: e.id,
899
947
  position: n
900
948
  });
901
- } else t.preventDefault(), cc({
949
+ } else t.preventDefault(), Tc({
902
950
  id: e.id,
903
951
  position: r > .5 ? "after" : "before"
904
952
  });
905
- }, xc = (e, t) => {
906
- X && (t.preventDefault(), cc({
953
+ }, Rc = (e, t) => {
954
+ X && (t.preventDefault(), Tc({
907
955
  id: e.id,
908
956
  position: "inside"
909
957
  }));
910
- }, Sc = () => {
911
- ic(null), cc(null), oc(null);
912
- }, Cc = (e) => {
958
+ }, zc = () => {
959
+ xc(null), Tc(null), Cc(null);
960
+ }, Bc = (e) => {
913
961
  e.preventDefault();
914
- let t = X ? rc(X) : void 0, n = sc ? rc(sc.id) : void 0;
915
- if (t && n && sc) {
916
- if (uc) _c(t, xt(hc(), t.id, n.id, sc.position));
962
+ let t = X ? bc(X) : void 0, n = wc ? bc(wc.id) : void 0;
963
+ if (t && n && wc) {
964
+ if (Dc) Pc(t, Tt(Mc(), t.id, n.id, wc.position));
917
965
  else if (n.getIsGrouped()) {
918
966
  let e = n.getLeafRows().filter((e) => !e.getIsGrouped() && e.id !== t.id).at(-1);
919
- e && gc(t, e, !0);
920
- } else gc(t, n, sc.position === "after");
967
+ e && Nc(t, e, !0);
968
+ } else Nc(t, n, wc.position === "after");
921
969
  }
922
- Sc();
923
- }, wc = (e) => sc?.id === e ? sc.position : void 0, [Tc, Ec] = y({}), Dc = v(Tc), Oc = (e) => {
924
- Dc.current = e, Ec(e);
925
- }, kc = (e, t) => {
926
- let n = rt(Tc, e.id, t);
970
+ zc();
971
+ }, Vc = (e) => wc?.id === e ? wc.position : void 0, [Hc, Uc] = y({}), Wc = v(Hc), Gc = (e) => {
972
+ Wc.current = e, Uc(e);
973
+ }, Kc = (e, t) => {
974
+ let n = ot(Hc, e.id, t);
927
975
  return n ? n.value : e.getValue(t);
928
- }, Ac = w || T === "batch", [jc] = y(() => new ae()), [, Mc] = y(0), Nc = () => Mc((e) => e + 1), Pc = (e, t = !0, n = !1) => {
976
+ }, qc = w || T === "batch", [Jc] = y(() => new se()), [, Yc] = y(0), Xc = () => Yc((e) => e + 1), Zc = (e, t = !0, n = !1) => {
929
977
  if (e.length) {
930
- if (T === "batch") Oc(m(Dc.current, e, n));
978
+ if (T === "batch") Gc(le(Wc.current, e, n));
931
979
  else for (let t of n ? [...e].reverse() : e) {
932
- let e = rc(t.rowId);
933
- e && oi?.({
980
+ let e = bc(t.rowId);
981
+ e && di?.({
934
982
  row: e.original,
935
983
  rowId: e.id,
936
984
  columnId: t.columnId,
937
985
  value: n ? t.before : t.after
938
986
  });
939
987
  }
940
- if (T === "row") for (let { rowId: t, values: r } of ce(e, n)) {
941
- let e = rc(t);
988
+ if (T === "row") for (let { rowId: t, values: r } of de(e, n)) {
989
+ let e = bc(t);
942
990
  if (!e) continue;
943
- let n = A.filter((e) => e.editable).map((t) => [t.id, kc(e, t.id)]);
944
- si?.({
991
+ let n = A.filter((e) => e.editable).map((t) => [t.id, Kc(e, t.id)]);
992
+ fi?.({
945
993
  row: e.original,
946
994
  rowId: t,
947
995
  values: {
@@ -950,23 +998,23 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
950
998
  }
951
999
  });
952
1000
  }
953
- t && Ac && (jc.push(e), Nc());
1001
+ t && qc && (Jc.push(e), Xc());
954
1002
  }
955
- }, Fc = () => {
956
- let e = jc.undo();
957
- e && (Pc(e, !1, !0), Nc(), Jo(O.undone(e.length)));
958
- }, Ic = () => {
959
- let e = jc.redo();
960
- e && (Pc(e, !1), Nc(), Jo(O.redone(e.length)));
961
- }, Lc = Object.keys(Tc).length, Rc = () => {
1003
+ }, Qc = () => {
1004
+ let e = Jc.undo();
1005
+ e && (Zc(e, !1, !0), Xc(), ls(O.undone(e.length)));
1006
+ }, $c = () => {
1007
+ let e = Jc.redo();
1008
+ e && (Zc(e, !1), Xc(), ls(O.redone(e.length)));
1009
+ }, el = Object.keys(Hc).length, tl = () => {
962
1010
  let e = $.current;
963
1011
  (e?.querySelector("[tabindex=\"0\"]") ?? e)?.focus();
964
- }, zc = () => {
965
- let e = Object.values(Dc.current);
1012
+ }, nl = () => {
1013
+ let e = Object.values(Wc.current);
966
1014
  if (!e.length) return;
967
1015
  let t = [], n = /* @__PURE__ */ new Map();
968
1016
  for (let r of e) {
969
- let e = rc(r.rowId);
1017
+ let e = bc(r.rowId);
970
1018
  if (!e) continue;
971
1019
  t.push({
972
1020
  row: e.original,
@@ -982,139 +1030,139 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
982
1030
  };
983
1031
  i.values[r.columnId] = r.after, n.set(e.id, i);
984
1032
  }
985
- ti?.({
1033
+ oi?.({
986
1034
  changes: t,
987
1035
  rows: [...n.values()]
988
- }), Oc({}), jc.clear(), Nc(), Jo(O.changesSaved(t.length)), Rc();
989
- }, Bc = () => {
990
- Object.keys(Dc.current).length && (Oc({}), jc.clear(), Nc(), Jo(O.changesDiscarded), Rc());
991
- }, [Vc, Hc] = y(null), [Uc, Wc] = y(null), [Gc, Kc] = y({}), [qc, Jc] = y({}), Yc = v(Gc), Xc = (e) => {
992
- Yc.current = e, Kc(e);
993
- }, [Zc, Qc] = y(!1), $c = v(!1), el = (e) => {
994
- J.current = e, Yo.current = z;
995
- }, tl = (e) => e.editor ?? "text", nl = (e, t) => `${e}:${t}`, rl = (e, t) => `${Ii}-error-${e}-${t}`, il = "[data-editor] :is(input, button, [role=combobox], [tabindex=\"0\"])", al = () => Y.filter((e) => e.kind === "row").flatMap((e) => W.filter((e) => j.get(e.id)?.editable).map((t) => ({
1036
+ }), Gc({}), Jc.clear(), Xc(), ls(O.changesSaved(t.length)), tl();
1037
+ }, rl = () => {
1038
+ Object.keys(Wc.current).length && (Gc({}), Jc.clear(), Xc(), ls(O.changesDiscarded), tl());
1039
+ }, [il, al] = y(null), [ol, sl] = y(null), [cl, ll] = y({}), [ul, dl] = y({}), fl = v(cl), pl = (e) => {
1040
+ fl.current = e, ll(e);
1041
+ }, [ml, hl] = y(!1), gl = v(!1), _l = (e) => {
1042
+ J.current = e, us.current = z;
1043
+ }, vl = (e) => e.editor ?? "text", yl = (e, t) => `${e}:${t}`, bl = (e, t) => `${Ji}-error-${e}-${t}`, xl = "[data-editor] :is(input, button, [role=combobox], [tabindex=\"0\"])", Sl = () => Y.filter((e) => e.kind === "row").flatMap((e) => W.filter((e) => j.get(e.id)?.editable).map((t) => ({
996
1044
  rowId: e.row.id,
997
1045
  columnId: t.id
998
- }))), ol = (e, t) => {
999
- ll({
1046
+ }))), Cl = (e, t) => {
1047
+ El({
1000
1048
  rowId: e.id,
1001
1049
  columnId: t
1002
- }), Xc({ [t]: kc(e, t) }), Jc({}), J.current = il;
1003
- }, sl = (e, t, n) => {
1004
- let r = ue(t.map((t) => [t, () => j.get(t)?.validate?.(n[t], e.original)])), i = (e) => (Jc(e), Object.keys(e).length === 0);
1005
- return r instanceof Promise ? ($c.current = !0, Qc(!0), r.then(i).finally(() => {
1006
- $c.current = !1, Qc(!1);
1050
+ }), pl({ [t]: Kc(e, t) }), dl({}), J.current = xl;
1051
+ }, wl = (e, t, n) => {
1052
+ let r = pe(t.map((t) => [t, () => j.get(t)?.validate?.(n[t], e.original)])), i = (e) => (dl(e), Object.keys(e).length === 0);
1053
+ return r instanceof Promise ? (gl.current = !0, hl(!0), r.then(i).finally(() => {
1054
+ gl.current = !1, hl(!1);
1007
1055
  })) : i(r);
1008
- }, cl = v(Vc), ll = (e) => {
1009
- cl.current = e, Hc(e);
1010
- }, ul = (e, t, n, r = Yc.current) => {
1011
- if (!Vc || $c.current) return;
1012
- let i = sl(e, [t], r);
1056
+ }, Tl = v(il), El = (e) => {
1057
+ Tl.current = e, al(e);
1058
+ }, Dl = (e, t, n, r = fl.current) => {
1059
+ if (!il || gl.current) return;
1060
+ let i = wl(e, [t], r);
1013
1061
  i instanceof Promise ? i.then((i) => {
1014
- let a = cl.current;
1015
- a?.rowId === e.id && a.columnId === t && (i ? dl(e, t, n, r) : J.current = il);
1016
- }) : i ? dl(e, t, n, r) : J.current = il;
1017
- }, dl = (e, t, n, r) => {
1062
+ let a = Tl.current;
1063
+ a?.rowId === e.id && a.columnId === t && (i ? Ol(e, t, n, r) : J.current = xl);
1064
+ }) : i ? Ol(e, t, n, r) : J.current = xl;
1065
+ }, Ol = (e, t, n, r) => {
1018
1066
  let i = r[t];
1019
- ll(null);
1020
- let a = kc(e, t);
1021
- if ((T === "batch" ? !mt(i, a) : i !== e.getValue(t)) && Pc([{
1067
+ El(null);
1068
+ let a = Kc(e, t);
1069
+ if ((T === "batch" ? !_t(i, a) : i !== e.getValue(t)) && Zc([{
1022
1070
  rowId: e.id,
1023
1071
  columnId: t,
1024
1072
  before: a,
1025
1073
  after: i
1026
1074
  }]), n) {
1027
- let r = al(), i = r[r.findIndex((n) => n.rowId === e.id && n.columnId === t) + n], a = i && L.getRow(i.rowId, !0);
1028
- if (i && a) return ol(a, i.columnId);
1075
+ let r = Sl(), i = r[r.findIndex((n) => n.rowId === e.id && n.columnId === t) + n], a = i && L.getRow(i.rowId, !0);
1076
+ if (i && a) return Cl(a, i.columnId);
1029
1077
  }
1030
- el(`[data-edit="${CSS.escape(nl(e.id, t))}"]`);
1031
- }, fl = (e, t) => {
1032
- ll(null), Jc({}), el(`[data-edit="${CSS.escape(nl(e.id, t))}"]`);
1033
- }, pl = (e, t, n) => {
1034
- n.defaultPrevented || (n.key === "Escape" ? (n.preventDefault(), fl(e, t)) : n.key === "Enter" && (n.target.matches("textarea") ? n.ctrlKey || n.metaKey : !n.target.matches("button, [role=combobox]")) ? (n.preventDefault(), ul(e, t)) : n.key === "Tab" && (n.preventDefault(), ul(e, t, n.shiftKey ? -1 : 1)));
1035
- }, ml = (e, t, n) => {
1078
+ _l(`[data-edit="${CSS.escape(yl(e.id, t))}"]`);
1079
+ }, kl = (e, t) => {
1080
+ El(null), dl({}), _l(`[data-edit="${CSS.escape(yl(e.id, t))}"]`);
1081
+ }, Al = (e, t, n) => {
1082
+ n.defaultPrevented || (n.key === "Escape" ? (n.preventDefault(), kl(e, t)) : n.key === "Enter" && (n.target.matches("textarea") ? n.ctrlKey || n.metaKey : !n.target.matches("button, [role=combobox]")) ? (n.preventDefault(), Dl(e, t)) : n.key === "Tab" && (n.preventDefault(), Dl(e, t, n.shiftKey ? -1 : 1)));
1083
+ }, jl = (e, t, n) => {
1036
1084
  let r = n.relatedTarget, i = n.currentTarget;
1037
- r && (i.contains(r) || !Li.current?.contains(r) && r.closest("[data-scope]")) || ul(e, t);
1038
- }, hl = (e, t, n) => {
1085
+ r && (i.contains(r) || !Yi.current?.contains(r) && r.closest("[data-scope]")) || Dl(e, t);
1086
+ }, Ml = (e, t, n) => {
1039
1087
  let r = {
1040
- ...Yc.current,
1088
+ ...fl.current,
1041
1089
  [t.id]: n
1042
1090
  };
1043
- Xc(r), Ao && Gn.has(tl(t)) && !t.renderEditor && ul(e, t.id, void 0, r);
1044
- }, gl = (e, t) => ({
1045
- value: Gc[t.id],
1046
- setValue: (e) => Xc({
1047
- ...Yc.current,
1091
+ pl(r), Uo && nr.has(vl(t)) && !t.renderEditor && Dl(e, t.id, void 0, r);
1092
+ }, Nl = (e, t) => ({
1093
+ value: cl[t.id],
1094
+ setValue: (e) => pl({
1095
+ ...fl.current,
1048
1096
  [t.id]: e
1049
1097
  }),
1050
1098
  row: e.original,
1051
- commit: () => Ao ? ul(e, t.id) : vl(e, !0),
1052
- cancel: () => Ao ? fl(e, t.id) : vl(e, !1),
1053
- invalid: !!qc[t.id]
1054
- }), _l = (e) => {
1055
- Wc(e.id), Jc({}), Xc(Object.fromEntries(A.filter((e) => e.editable).map((t) => [t.id, e.getValue(t.id)]))), J.current = il;
1056
- }, vl = (e, t) => {
1057
- if ($c.current) return;
1058
- let n = Yc.current, r = () => {
1059
- Wc(null), Jc({}), el(`[data-row-edit="${CSS.escape(e.id)}"]`);
1099
+ commit: () => Uo ? Dl(e, t.id) : Fl(e, !0),
1100
+ cancel: () => Uo ? kl(e, t.id) : Fl(e, !1),
1101
+ invalid: !!ul[t.id]
1102
+ }), Pl = (e) => {
1103
+ sl(e.id), dl({}), pl(Object.fromEntries(A.filter((e) => e.editable).map((t) => [t.id, e.getValue(t.id)]))), J.current = xl;
1104
+ }, Fl = (e, t) => {
1105
+ if (gl.current) return;
1106
+ let n = fl.current, r = () => {
1107
+ sl(null), dl({}), _l(`[data-row-edit="${CSS.escape(e.id)}"]`);
1060
1108
  };
1061
1109
  if (!t) return r();
1062
1110
  let i = A.filter((e) => e.editable).map((e) => e.id), a = (t) => {
1063
- t ? (si?.({
1111
+ t ? (fi?.({
1064
1112
  row: e.original,
1065
1113
  rowId: e.id,
1066
1114
  values: { ...n }
1067
- }), r()) : J.current = il;
1068
- }, o = sl(e, i, n);
1115
+ }), r()) : J.current = xl;
1116
+ }, o = wl(e, i, n);
1069
1117
  o instanceof Promise ? o.then(a) : a(o);
1070
- }, yl = (e, t) => {
1071
- t.defaultPrevented || (t.key === "Escape" ? (t.preventDefault(), vl(e, !1)) : t.key === "Enter" && t.target.matches("input") && (t.preventDefault(), vl(e, !0)));
1072
- }, [Z, bl] = y(null), xl = Y.filter((e) => e.kind === "row").map((e) => e.row.id), Sl = W.map((e) => e.id), Cl = w ? ut(Z, xl, Sl) : null, wl = new Map(xl.map((e, t) => [e, t])), Tl = new Map(Sl.map((e, t) => [e, t])), El = (e, t) => {
1073
- if (!Cl) return !1;
1074
- let n = wl.get(e) ?? -1, r = Tl.get(t) ?? -1;
1075
- return n >= Cl.top && n <= Cl.bottom && r >= Cl.left && r <= Cl.right;
1076
- }, Dl = (e) => {
1077
- let t = ut(e, xl, Sl);
1118
+ }, Il = (e, t) => {
1119
+ t.defaultPrevented || (t.key === "Escape" ? (t.preventDefault(), Fl(e, !1)) : t.key === "Enter" && t.target.matches("input") && (t.preventDefault(), Fl(e, !0)));
1120
+ }, [Z, Ll] = y(null), Rl = Y.filter((e) => e.kind === "row").map((e) => e.row.id), zl = W.map((e) => e.id), Bl = w ? pt(Z, Rl, zl) : null, Vl = new Map(Rl.map((e, t) => [e, t])), Hl = new Map(zl.map((e, t) => [e, t])), Ul = (e, t) => {
1121
+ if (!Bl) return !1;
1122
+ let n = Vl.get(e) ?? -1, r = Hl.get(t) ?? -1;
1123
+ return n >= Bl.top && n <= Bl.bottom && r >= Bl.left && r <= Bl.right;
1124
+ }, Wl = (e) => {
1125
+ let t = pt(e, Rl, zl);
1078
1126
  if (!t) return null;
1079
- let n = xl.slice(t.top, t.bottom + 1), r = Sl.slice(t.left, t.right + 1), i = n.flatMap((e) => rc(e) ?? []);
1127
+ let n = Rl.slice(t.top, t.bottom + 1), r = zl.slice(t.left, t.right + 1), i = n.flatMap((e) => bc(e) ?? []);
1080
1128
  return {
1081
1129
  rowIds: n,
1082
1130
  columnIds: r,
1083
1131
  rows: i.map((e) => e.original),
1084
- values: i.map((e) => r.map((t) => kc(e, t)))
1132
+ values: i.map((e) => r.map((t) => Kc(e, t)))
1085
1133
  };
1086
- }, Ol = (e) => {
1087
- e && Z && e.anchor.rowId === Z.anchor.rowId && e.anchor.columnId === Z.anchor.columnId && e.focus.rowId === Z.focus.rowId && e.focus.columnId === Z.focus.columnId || !e && !Z || (bl(e), $r?.(Dl(e)));
1088
- }, kl = v(!1), Al = v(!1), jl = v(!1);
1134
+ }, Gl = (e) => {
1135
+ e && Z && e.anchor.rowId === Z.anchor.rowId && e.anchor.columnId === Z.anchor.columnId && e.focus.rowId === Z.focus.rowId && e.focus.columnId === Z.focus.columnId || !e && !Z || (Ll(e), ii?.(Wl(e)));
1136
+ }, Kl = v(!1), ql = v(!1), Jl = v(!1);
1089
1137
  g(() => {
1090
1138
  if (!w) return;
1091
- let e = () => kl.current = !1;
1139
+ let e = () => Kl.current = !1;
1092
1140
  return window.addEventListener("pointerup", e), () => window.removeEventListener("pointerup", e);
1093
1141
  }, [w]);
1094
- let Ml = (e, t, n) => {
1142
+ let Yl = (e, t, n) => {
1095
1143
  if (!w || n.button !== 0 || n.target.closest("[data-editor]")) return;
1096
1144
  let r = {
1097
1145
  rowId: e,
1098
1146
  columnId: t
1099
1147
  }, i = n.shiftKey && Z;
1100
- Ol(i ? {
1148
+ Gl(i ? {
1101
1149
  anchor: Z.anchor,
1102
1150
  focus: r
1103
1151
  } : {
1104
1152
  anchor: r,
1105
1153
  focus: r
1106
- }), kl.current = !0, jl.current = !!i, i && window.getSelection()?.removeAllRanges();
1107
- }, Nl = (e, t, n) => {
1108
- kl.current && Z && n.buttons & 1 && (Ol({
1154
+ }), Kl.current = !0, Jl.current = !!i, i && window.getSelection()?.removeAllRanges();
1155
+ }, Xl = (e, t, n) => {
1156
+ Kl.current && Z && n.buttons & 1 && (Gl({
1109
1157
  anchor: Z.anchor,
1110
1158
  focus: {
1111
1159
  rowId: e,
1112
1160
  columnId: t
1113
1161
  }
1114
1162
  }), window.getSelection()?.removeAllRanges());
1115
- }, Pl = (e) => {
1116
- jl.current && (jl.current = !1, e.preventDefault(), e.stopPropagation());
1117
- }, Fl = (e, t) => $.current?.querySelector(`tr[data-row-id="${CSS.escape(e)}"] > [data-column-id="${CSS.escape(t)}"]`) ?? null, Il = (e) => {
1163
+ }, Zl = (e) => {
1164
+ Jl.current && (Jl.current = !1, e.preventDefault(), e.stopPropagation());
1165
+ }, Ql = (e, t) => $.current?.querySelector(`tr[data-row-id="${CSS.escape(e)}"] > [data-column-id="${CSS.escape(t)}"]`) ?? null, $l = (e) => {
1118
1166
  let t = e.target, n = e.key;
1119
1167
  if (!w || !z || !e.shiftKey || e.altKey || ![
1120
1168
  "ArrowUp",
@@ -1126,7 +1174,7 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1126
1174
  ].includes(n)) return !1;
1127
1175
  let r = t.closest("tr")?.dataset.rowId, i = t.dataset.columnId;
1128
1176
  if (!r || !i || !t.matches("td")) return !1;
1129
- let a = getComputedStyle(t).direction === "rtl", o = n === "ArrowUp" ? "up" : n === "ArrowDown" ? "down" : n === "Home" ? "home" : n === "End" ? "end" : n === "ArrowRight" === a ? "previous" : "next", s = Z && El(r, i) ? Z : {
1177
+ let a = getComputedStyle(t).direction === "rtl", o = n === "ArrowUp" ? "up" : n === "ArrowDown" ? "down" : n === "Home" ? "home" : n === "End" ? "end" : n === "ArrowRight" === a ? "previous" : "next", s = Z && Ul(r, i) ? Z : {
1130
1178
  anchor: {
1131
1179
  rowId: r,
1132
1180
  columnId: i
@@ -1135,46 +1183,46 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1135
1183
  rowId: r,
1136
1184
  columnId: i
1137
1185
  }
1138
- }, c = Te(s, xl, Sl, o, e.ctrlKey || e.metaKey);
1139
- e.preventDefault(), Ol(c);
1140
- let ee = () => {
1141
- let e = Fl(c.focus.rowId, c.focus.columnId);
1142
- return e ? (Al.current = !0, e.focus(), Al.current = !1, e.scrollIntoView?.({
1186
+ }, c = Oe(s, Rl, zl, o, e.ctrlKey || e.metaKey);
1187
+ e.preventDefault(), Gl(c);
1188
+ let l = () => {
1189
+ let e = Ql(c.focus.rowId, c.focus.columnId);
1190
+ return e ? (ql.current = !0, e.focus(), ql.current = !1, e.scrollIntoView?.({
1143
1191
  block: "nearest",
1144
1192
  inline: "nearest"
1145
1193
  }), !0) : !1;
1146
1194
  };
1147
- return !ee() && B && (ku?.scrollToIndex(Y.findIndex((e) => e.kind === "row" && e.row.id === c.focus.rowId)), requestAnimationFrame(() => requestAnimationFrame(() => void ee()))), !0;
1148
- }, Ll = (e, t) => M(j.get(t), kc(e, t), e.original), Rl = () => {
1149
- let e = Dl(Z);
1195
+ return !l() && B && (Ku?.scrollToIndex(Y.findIndex((e) => e.kind === "row" && e.row.id === c.focus.rowId)), requestAnimationFrame(() => requestAnimationFrame(() => void l()))), !0;
1196
+ }, eu = (e, t) => M(j.get(t), Kc(e, t), e.original), tu = () => {
1197
+ let e = Wl(Z);
1150
1198
  if (e) {
1151
- let t = e.rowIds.flatMap((e) => rc(e) ?? []);
1199
+ let t = e.rowIds.flatMap((e) => bc(e) ?? []);
1152
1200
  return {
1153
- text: bt(t.map((t) => e.columnIds.map((e) => Ll(t, e)))),
1201
+ text: wt(t.map((t) => e.columnIds.map((e) => eu(t, e)))),
1154
1202
  count: t.length * e.columnIds.length
1155
1203
  };
1156
1204
  }
1157
- let t = Y.filter((e) => e.kind === "row" && Ds(e.row)).map((e) => e.row);
1205
+ let t = Y.filter((e) => e.kind === "row" && Us(e.row)).map((e) => e.row);
1158
1206
  return t.length ? {
1159
- text: bt(t.map((e) => Sl.map((t) => Ll(e, t)))),
1160
- count: t.length * Sl.length
1207
+ text: wt(t.map((e) => zl.map((t) => eu(e, t)))),
1208
+ count: t.length * zl.length
1161
1209
  } : null;
1162
- }, zl = () => {
1210
+ }, nu = () => {
1163
1211
  let e = document.activeElement;
1164
- return !!e && !!$.current?.contains(e) && !e.closest(Qn);
1165
- }, Bl = (e) => {
1166
- if (!zl() || !e.clipboardData || window.getSelection()?.toString()) return;
1167
- let t = Rl();
1168
- t && (e.clipboardData.setData("text/plain", t.text), e.preventDefault(), Jo(O.cellsCopied(t.count)));
1169
- }, Vl = async (e) => {
1170
- let t = tt(e), n = ut(Z, xl, Sl);
1212
+ return !!e && !!$.current?.contains(e) && !e.closest(lr);
1213
+ }, ru = (e) => {
1214
+ if (!nu() || !e.clipboardData || window.getSelection()?.toString()) return;
1215
+ let t = tu();
1216
+ t && (e.clipboardData.setData("text/plain", t.text), e.preventDefault(), ls(O.cellsCopied(t.count)));
1217
+ }, iu = async (e) => {
1218
+ let t = it(e), n = pt(Z, Rl, zl);
1171
1219
  if (!t.length || !n || !Z) return;
1172
- let r = nt(t, {
1220
+ let r = at(t, {
1173
1221
  row: n.top,
1174
1222
  column: n.left
1175
- }, xl, Sl, n), i = [], a = [];
1223
+ }, Rl, zl, n), i = [], a = [];
1176
1224
  for (let e of r) {
1177
- let t = j.get(e.columnId), n = rc(e.rowId);
1225
+ let t = j.get(e.columnId), n = bc(e.rowId);
1178
1226
  if (!t || !n) continue;
1179
1227
  if (!t.editable) {
1180
1228
  i.push({
@@ -1183,7 +1231,7 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1183
1231
  });
1184
1232
  continue;
1185
1233
  }
1186
- let r = et(e.text, tl(t), {
1234
+ let r = rt(e.text, vl(t), {
1187
1235
  locale: D,
1188
1236
  choices: t.editOptions
1189
1237
  });
@@ -1194,8 +1242,8 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1194
1242
  });
1195
1243
  continue;
1196
1244
  }
1197
- let o = kc(n, e.columnId);
1198
- mt(r.value, o) || a.push({
1245
+ let o = Kc(n, e.columnId);
1246
+ _t(r.value, o) || a.push({
1199
1247
  change: {
1200
1248
  rowId: n.id,
1201
1249
  columnId: t.id,
@@ -1206,7 +1254,7 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1206
1254
  def: t
1207
1255
  });
1208
1256
  }
1209
- let o = await ue(a.map(({ change: e, row: t, def: n }, r) => [String(r), () => n.validate?.(e.after, t.original)])), s = a.filter((e, t) => {
1257
+ let o = await pe(a.map(({ change: e, row: t, def: n }, r) => [String(r), () => n.validate?.(e.after, t.original)])), s = a.filter((e, t) => {
1210
1258
  let n = o[String(t)];
1211
1259
  return n && i.push({
1212
1260
  rowId: e.change.rowId,
@@ -1228,113 +1276,113 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1228
1276
  c.defaultPrevented = !0;
1229
1277
  }
1230
1278
  };
1231
- ei?.(c), !c.defaultPrevented && (Pc(s.map(({ change: e }) => e)), Ol(lt(r, xl, Sl)), Jo(O.cellsPasted(s.length, i.length)));
1232
- }, Hl = (e) => {
1233
- if (!zl()) return;
1279
+ ai?.(c), !c.defaultPrevented && (Zc(s.map(({ change: e }) => e)), Gl(ft(r, Rl, zl)), ls(O.cellsPasted(s.length, i.length)));
1280
+ }, au = (e) => {
1281
+ if (!nu()) return;
1234
1282
  let t = e.clipboardData?.getData("text/plain");
1235
- t && (e.preventDefault(), Vl(t));
1283
+ t && (e.preventDefault(), iu(t));
1236
1284
  };
1237
1285
  g(() => {
1238
- if (w) return document.addEventListener("copy", Bl), document.addEventListener("paste", Hl), () => {
1239
- document.removeEventListener("copy", Bl), document.removeEventListener("paste", Hl);
1286
+ if (w) return document.addEventListener("copy", ru), document.addEventListener("paste", au), () => {
1287
+ document.removeEventListener("copy", ru), document.removeEventListener("paste", au);
1240
1288
  };
1241
1289
  });
1242
- let Ul = (e) => {
1243
- if (!Ac || e.target.closest(Qn)) return !1;
1244
- let t = je(e);
1245
- return t ? (e.preventDefault(), t === "undo" ? Fc() : Ic(), !0) : !1;
1246
- }, [Wl, Gl] = y(!1), [Kl, ql] = y(""), [Jl, Yl] = y(0), Xl = ni && Wl && !!Kl.trim(), Zl = Xl ? (Eo && !k ? L.getPrePaginatedRowModel().rows : L.getRowModel().rows).filter((e) => !e.getIsGrouped()) : [], Q = Xl ? Ee(Zl.map((e) => ({
1290
+ let ou = (e) => {
1291
+ if (!qc || e.target.closest(lr)) return !1;
1292
+ let t = Pe(e);
1293
+ return t ? (e.preventDefault(), t === "undo" ? Qc() : $c(), !0) : !1;
1294
+ }, [su, cu] = y(!1), [lu, uu] = y(""), [du, fu] = y(0), pu = si && su && !!lu.trim(), mu = pu ? (Ro && !k ? L.getPrePaginatedRowModel().rows : L.getRowModel().rows).filter((e) => !e.getIsGrouped()) : [], Q = pu ? ke(mu.map((e) => ({
1247
1295
  id: e.id,
1248
1296
  cells: W.map((t) => ({
1249
1297
  columnId: t.id,
1250
- text: Ll(e, t.id)
1298
+ text: eu(e, t.id)
1251
1299
  }))
1252
- })), Kl, D) : [], Ql = Q.length ? Q[Math.min(Jl, Q.length - 1)] : void 0, $l = new Set(Q.map((e) => `${e.rowId}\u0000${e.columnId}`)), eu = (e, t) => Xl ? Ql?.rowId === e && Ql.columnId === t ? V.findCurrent() : $l.has(`${e}\u0000${t}`) ? V.findMatch() : "" : "", tu = v(!1), nu = (e) => {
1300
+ })), lu, D) : [], hu = Q.length ? Q[Math.min(du, Q.length - 1)] : void 0, gu = new Set(Q.map((e) => `${e.rowId}\u0000${e.columnId}`)), _u = (e, t) => pu ? hu?.rowId === e && hu.columnId === t ? V.findCurrent() : gu.has(`${e}\u0000${t}`) ? V.findMatch() : "" : "", vu = v(!1), yu = (e) => {
1253
1301
  if (!Q.length) return;
1254
1302
  let t = (e + Q.length) % Q.length;
1255
- Yl(t);
1303
+ fu(t);
1256
1304
  let n = Q[t];
1257
- if (Eo && !k) {
1258
- let e = Zl.findIndex((e) => e.id === n.rowId), t = Math.floor(e / P.pageSize);
1305
+ if (Ro && !k) {
1306
+ let e = mu.findIndex((e) => e.id === n.rowId), t = Math.floor(e / P.pageSize);
1259
1307
  e >= 0 && t !== P.pageIndex && L.setPageIndex(t);
1260
1308
  }
1261
- tu.current = !0;
1309
+ vu.current = !0;
1262
1310
  };
1263
1311
  g(() => {
1264
- if (!tu.current || !Ql) return;
1265
- tu.current = !1;
1266
- let e = () => Fl(Ql.rowId, Ql.columnId)?.scrollIntoView?.({
1312
+ if (!vu.current || !hu) return;
1313
+ vu.current = !1;
1314
+ let e = () => Ql(hu.rowId, hu.columnId)?.scrollIntoView?.({
1267
1315
  block: "nearest",
1268
1316
  inline: "nearest"
1269
- }), t = Y.findIndex((e) => e.kind === "row" && e.row.id === Ql.rowId);
1270
- B && t >= 0 ? (ku?.scrollToIndex(t, { align: "center" }), requestAnimationFrame(() => requestAnimationFrame(e))) : e();
1317
+ }), t = Y.findIndex((e) => e.kind === "row" && e.row.id === hu.rowId);
1318
+ B && t >= 0 ? (Ku?.scrollToIndex(t, { align: "center" }), requestAnimationFrame(() => requestAnimationFrame(e))) : e();
1271
1319
  });
1272
- let ru = () => {
1273
- let e = !Wl;
1274
- Gl(e), J.current = e ? "[data-find-input] input, input[data-find-input]" : "[data-find-toggle]";
1275
- }, iu = (e) => {
1276
- e.key === "Enter" ? (e.preventDefault(), nu(Jl + (e.shiftKey ? -1 : 1))) : e.key === "Escape" && (e.preventDefault(), ru());
1277
- }, au = (e) => {
1278
- ql(e), Yl(0), tu.current = !0;
1279
- }, ou = !B && A.some((e) => e.rowSpan === "auto" || e.colSpan), su = (e) => `${Ii}-head-${e}`, cu = (() => {
1280
- if (!ou) return;
1281
- let e = Y.map((e) => e.kind === "row" ? dt(W.map((t) => j.get(t.id)?.colSpan?.(e.row.original) ?? 1)) : W.map(() => 1)), t = Y.map((e, t) => e.kind !== "row" || Y[t - 1]?.kind !== "row"), n = W.map((e) => j.get(e.id)?.rowSpan === "auto"), r = (t, n) => Y.map((r, i) => r.kind === "row" && e[i][n] === 1 ? Ll(r.row, t) : null), i = se(W.flatMap((e, t) => n[t] ? [r(e.id, t)] : []), t), a = 0;
1320
+ let bu = () => {
1321
+ let e = !su;
1322
+ cu(e), J.current = e ? "[data-find-input] input, input[data-find-input]" : "[data-find-toggle]";
1323
+ }, xu = (e) => {
1324
+ e.key === "Enter" ? (e.preventDefault(), yu(du + (e.shiftKey ? -1 : 1))) : e.key === "Escape" && (e.preventDefault(), bu());
1325
+ }, Su = (e) => {
1326
+ uu(e), fu(0), vu.current = !0;
1327
+ }, Cu = !B && A.some((e) => e.rowSpan === "auto" || e.colSpan), wu = (e) => `${Ji}-head-${e}`, Tu = (() => {
1328
+ if (!Cu) return;
1329
+ let e = Y.map((e) => e.kind === "row" ? mt(W.map((t) => j.get(t.id)?.colSpan?.(e.row.original) ?? 1)) : W.map(() => 1)), t = Y.map((e, t) => e.kind !== "row" || Y[t - 1]?.kind !== "row"), n = W.map((e) => j.get(e.id)?.rowSpan === "auto"), r = (t, n) => Y.map((r, i) => r.kind === "row" && e[i][n] === 1 ? eu(r.row, t) : null), i = ue(W.flatMap((e, t) => n[t] ? [r(e.id, t)] : []), t), a = 0;
1282
1330
  return {
1283
1331
  columnSpans: e,
1284
1332
  rowSpans: n.map((e) => e ? i[a++] : void 0)
1285
1333
  };
1286
- })(), lu = (e, t) => ({
1287
- rowSpan: cu?.rowSpans[t]?.[e] ?? 1,
1288
- colSpan: cu?.columnSpans[e]?.[t] ?? 1
1289
- }), uu = (e, t) => {
1290
- if (!ou) return {};
1291
- let { rowSpan: n, colSpan: r } = lu(e, t);
1334
+ })(), Eu = (e, t) => ({
1335
+ rowSpan: Tu?.rowSpans[t]?.[e] ?? 1,
1336
+ colSpan: Tu?.columnSpans[e]?.[t] ?? 1
1337
+ }), Du = (e, t) => {
1338
+ if (!Cu) return {};
1339
+ let { rowSpan: n, colSpan: r } = Eu(e, t);
1292
1340
  return {
1293
1341
  ...n > 1 ? { rowSpan: n } : {},
1294
1342
  ...r > 1 ? { colSpan: r } : {},
1295
- headers: W.slice(t, t + r).map((e) => su(e.id)).join(" ")
1343
+ headers: W.slice(t, t + r).map((e) => wu(e.id)).join(" ")
1296
1344
  };
1297
- }, du = (e = {}) => {
1298
- let t = L.getVisibleLeafColumns().map((e) => j.get(e.id)).filter((e) => e.exportable !== !1), n = (e.selectionOnly ? L.getSelectedRowModel().flatRows : L.getSortedRowModel().flatRows).filter((e) => !e.getIsGrouped()).map((e) => t.map((t) => t.exportValue ? t.exportValue(e.original) : M(t, e.getValue(t.id), e.original))), r = e.separator ?? Lr ?? he(D), i = vt([t.map((e) => e.exportHeader ?? e.header), ...n], r);
1345
+ }, Ou = (e = {}) => {
1346
+ let t = L.getVisibleLeafColumns().map((e) => j.get(e.id)).filter((e) => e.exportable !== !1), n = (e.selectionOnly ? L.getSelectedRowModel().flatRows : L.getSortedRowModel().flatRows).filter((e) => !e.getIsGrouped()).map((e) => t.map((t) => t.exportValue ? t.exportValue(e.original) : M(t, e.getValue(t.id), e.original))), r = e.separator ?? Hr ?? ve(D), i = St([t.map((e) => e.exportHeader ?? e.header), ...n], r);
1299
1347
  return e.bom === !1 ? i.slice(1) : i;
1300
- }, fu = (e = !1) => {
1348
+ }, ku = (e = !1) => {
1301
1349
  let t = typeof e == "boolean" ? { selectionOnly: e } : e;
1302
- Se(`${t.filename ?? Ir ?? "export"}.csv`, du(t));
1303
- }, pu = (e) => [{
1350
+ Te(`${t.filename ?? Vr ?? "export"}.csv`, Ou(t));
1351
+ }, Au = (e) => [{
1304
1352
  row: e,
1305
1353
  group: e.getIsGrouped(),
1306
1354
  depth: e.depth
1307
- }, ...e.subRows.flatMap(pu)], mu = (e = !1) => e ? L.getSelectedRowModel().flatRows.filter((e) => !e.getIsGrouped()).map((e) => ({
1355
+ }, ...e.subRows.flatMap(Au)], ju = (e = !1) => e ? L.getSelectedRowModel().flatRows.filter((e) => !e.getIsGrouped()).map((e) => ({
1308
1356
  row: e,
1309
1357
  group: !1,
1310
1358
  depth: 0
1311
- })) : L.getSortedRowModel().rows.flatMap(pu), hu = (e) => {
1359
+ })) : L.getSortedRowModel().rows.flatMap(Au), Mu = (e) => {
1312
1360
  let t = j.get(e.groupingColumnId);
1313
1361
  return `${t?.header ?? ""}: ${M(t, e.groupingValue, e.original)} (${e.getLeafRows().filter((e) => !e.getIsGrouped()).length})`;
1314
- }, gu = (e) => e.editor === "datetime" ? "datetime" : e.filter === "date" || e.editor === "date" ? "date" : void 0, _u = (e, t, n) => {
1362
+ }, Nu = (e) => e.editor === "datetime" ? "datetime" : e.filter === "date" || e.editor === "date" ? "date" : void 0, Pu = (e, t, n) => {
1315
1363
  if (e == null || e === "") return null;
1316
1364
  if (typeof e == "number") return Number.isFinite(e) ? e : null;
1317
1365
  if (e instanceof Date) return {
1318
1366
  date: e,
1319
- time: gu(t) === "datetime"
1367
+ time: Nu(t) === "datetime"
1320
1368
  };
1321
- let r = gu(t);
1369
+ let r = Nu(t);
1322
1370
  return r && (typeof e == "string" || typeof e == "number") ? {
1323
1371
  date: e,
1324
1372
  time: r === "datetime"
1325
- } : typeof e == "boolean" && !t.format ? e : n ? M(t, e, n) : In(e);
1326
- }, vu = (e = {}) => {
1327
- let t = L.getVisibleLeafColumns().map((e) => j.get(e.id)).filter((e) => e.exportable !== !1), n = mu(e.selectionOnly).filter((t) => !t.group || e.groups !== !1).map(({ row: n, group: r, depth: i }) => {
1373
+ } : typeof e == "boolean" && !t.format ? e : n ? M(t, e, n) : qn(e);
1374
+ }, Fu = (e = {}) => {
1375
+ let t = L.getVisibleLeafColumns().map((e) => j.get(e.id)).filter((e) => e.exportable !== !1), n = ju(e.selectionOnly).filter((t) => !t.group || e.groups !== !1).map(({ row: n, group: r, depth: i }) => {
1328
1376
  if (r) {
1329
1377
  let e = n.getLeafRows().filter((e) => !e.getIsGrouped());
1330
1378
  return {
1331
1379
  kind: "group",
1332
1380
  level: i,
1333
1381
  cells: t.map((t, r) => {
1334
- if (r === 0) return hu(n);
1382
+ if (r === 0) return Mu(n);
1335
1383
  if (!t.aggregate) return null;
1336
- let i = oe(e.map((e) => sa(t, e.original)), t.aggregate);
1337
- return typeof i == "number" ? i : In(i);
1384
+ let i = ce(e.map((e) => ya(t, e.original)), t.aggregate);
1385
+ return typeof i == "number" ? i : qn(i);
1338
1386
  })
1339
1387
  };
1340
1388
  }
@@ -1343,9 +1391,9 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1343
1391
  cells: t.map((e) => {
1344
1392
  if (e.exportValue) {
1345
1393
  let t = e.exportValue(n.original);
1346
- return typeof t == "number" || typeof t == "boolean" ? t : t instanceof Date ? { date: t } : In(t);
1394
+ return typeof t == "number" || typeof t == "boolean" ? t : t instanceof Date ? { date: t } : qn(t);
1347
1395
  }
1348
- return _u(n.getValue(e.id), e, n.original);
1396
+ return Pu(n.getValue(e.id), e, n.original);
1349
1397
  })
1350
1398
  };
1351
1399
  });
@@ -1353,152 +1401,152 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1353
1401
  let e = L.getFilteredRowModel().flatRows.filter((e) => !e.getIsGrouped()), r = t.map((t) => {
1354
1402
  if (t.footer !== void 0) return t.footer;
1355
1403
  if (!t.aggregate) return null;
1356
- let n = oe(e.map((e) => sa(t, e.original)), t.aggregate);
1357
- return typeof n == "number" ? n : In(n);
1404
+ let n = ce(e.map((e) => ya(t, e.original)), t.aggregate);
1405
+ return typeof n == "number" ? n : qn(n);
1358
1406
  });
1359
1407
  r[0] === null && (r[0] = O.total), n.push({
1360
1408
  kind: "total",
1361
1409
  cells: r
1362
1410
  });
1363
1411
  }
1364
- return me({
1365
- name: e.sheetName ?? we,
1412
+ return _e({
1413
+ name: e.sheetName ?? Ce,
1366
1414
  columns: t.map((e) => ({ header: e.exportHeader ?? e.header })),
1367
1415
  rows: n
1368
1416
  });
1369
- }, yu = (e = {}) => xe(`${e.filename ?? Ir ?? "export"}.xlsx`, vu(e)), bu = (e, t) => e === "xlsx" ? yu({ selectionOnly: t }) : fu(t), xu = (e = {}) => {
1370
- let t = W.map((e) => j.get(e.id)), n = Vo.map((e) => e.map((e) => ({
1417
+ }, Iu = (e = {}) => we(`${e.filename ?? Vr ?? "export"}.xlsx`, Fu(e)), Lu = (e, t) => e === "xlsx" ? Iu({ selectionOnly: t }) : ku(t), Ru = (e = {}) => {
1418
+ let t = W.map((e) => j.get(e.id)), n = ts.map((e) => e.map((e) => ({
1371
1419
  text: q(e.header.column),
1372
1420
  colSpan: e.group ? e.header.colSpan : 1,
1373
1421
  rowSpan: e.rowSpan,
1374
1422
  align: e.group ? void 0 : j.get(e.header.column.id)?.align
1375
- }))), r = mu(e.selectionOnly).map(({ row: e, group: n }) => n ? {
1423
+ }))), r = ju(e.selectionOnly).map(({ row: e, group: n }) => n ? {
1376
1424
  kind: "group",
1377
1425
  cells: [{
1378
- text: hu(e),
1426
+ text: Mu(e),
1379
1427
  colSpan: t.length
1380
1428
  }]
1381
1429
  } : { cells: t.map((t) => ({
1382
- text: Ll(e, t.id),
1430
+ text: eu(e, t.id),
1383
1431
  align: t.align
1384
- })) }), i = qs ? t.map((e) => ({
1385
- text: Xs(e),
1432
+ })) }), i = uc ? t.map((e) => ({
1433
+ text: pc(e),
1386
1434
  align: e.align
1387
1435
  })) : void 0;
1388
- ot(st({
1389
- title: e.title ?? we,
1390
- caption: we,
1436
+ lt(ut({
1437
+ title: e.title ?? Ce,
1438
+ caption: Ce,
1391
1439
  lang: D,
1392
- dir: getComputedStyle(Li.current ?? document.body).direction === "rtl" ? "rtl" : "ltr",
1440
+ dir: getComputedStyle(Yi.current ?? document.body).direction === "rtl" ? "rtl" : "ltr",
1393
1441
  head: n,
1394
1442
  body: r,
1395
1443
  foot: i
1396
1444
  }));
1397
- }, Su = () => {
1398
- Si && le(Si, Ci);
1399
- }, Cu = () => {
1400
- Ka.length && L.setColumnFilters([]), I && L.setGlobalFilter(""), Qi && $i(Ce("and", "root")), P.pageIndex && po({
1445
+ }, zu = () => {
1446
+ Oi && fe(Oi, ki);
1447
+ }, Bu = () => {
1448
+ io.length && L.setColumnFilters([]), I && L.setGlobalFilter(""), ua && da(Ee("and", "root")), P.pageIndex && To({
1401
1449
  ...P,
1402
1450
  pageIndex: 0
1403
1451
  });
1404
- }, wu = () => {
1405
- Cu(), fo(Rn(ln)), Object.keys(Ta).length && ho({}), ka && go(null), Ju((e) => e + 1);
1406
- }, Tu = async () => {
1407
- s && await Wi.refresh();
1452
+ }, Vu = () => {
1453
+ Bu(), wo(Yn(an)), Object.keys(La).length && Do({}), Va && Oo(null), dd((e) => e + 1);
1454
+ }, Hu = async () => {
1455
+ l && await na.refresh();
1408
1456
  };
1409
- nn(ji, () => ({
1410
- exportCsv: fu,
1411
- generateCsv: du,
1412
- clearState: Su,
1413
- resetFilters: Cu,
1414
- resetState: wu,
1415
- exportXlsx: yu,
1416
- generateXlsx: vu,
1417
- print: xu,
1418
- refresh: Tu,
1419
- undo: Fc,
1420
- redo: Ic
1421
- })), rn(() => {
1457
+ sn(Li, () => ({
1458
+ exportCsv: ku,
1459
+ generateCsv: Ou,
1460
+ clearState: zu,
1461
+ resetFilters: Bu,
1462
+ resetState: Vu,
1463
+ exportXlsx: Iu,
1464
+ generateXlsx: Fu,
1465
+ print: Ru,
1466
+ refresh: Hu,
1467
+ undo: Qc,
1468
+ redo: $c
1469
+ })), cn(() => {
1422
1470
  if (!R) return;
1423
1471
  let e = [];
1424
- for (let t of document.body.children) t !== Li.current && t instanceof HTMLElement && !t.inert && (t.inert = !0, e.push(t));
1472
+ for (let t of document.body.children) t !== Yi.current && t instanceof HTMLElement && !t.inert && (t.inert = !0, e.push(t));
1425
1473
  return () => e.forEach((e) => e.inert = !1);
1426
1474
  }, [R]);
1427
- let Eu = () => {
1428
- Co(!R), J.current = "[data-fullscreen-toggle]";
1429
- }, Du = (e) => {
1430
- R && e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), Eu());
1431
- }, Ou = v(null), ku = (Ri.useVirtualizer ?? er)({
1475
+ let Uu = () => {
1476
+ Fo(!R), J.current = "[data-fullscreen-toggle]";
1477
+ }, Wu = (e) => {
1478
+ R && e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), Uu());
1479
+ }, Gu = v(null), Ku = (Xi.useVirtualizer ?? dr)({
1432
1480
  count: B ? Y.length : 0,
1433
- getScrollElement: () => Ou.current,
1434
- estimateSize: () => vi,
1481
+ getScrollElement: () => Gu.current,
1482
+ estimateSize: () => wi,
1435
1483
  overscan: 8,
1436
1484
  getItemKey: (e) => Y[e]?.key ?? e,
1437
1485
  initialRect: {
1438
1486
  width: 0,
1439
- height: Number.parseInt(hi ?? "", 10) || 400
1487
+ height: Number.parseInt(bi ?? "", 10) || 400
1440
1488
  }
1441
1489
  });
1442
1490
  g(() => {
1443
- _i && !Ri.useVirtualizer && wt("DataTable: `virtual` needs the feature virtualRows, so all rows are rendered – pass `features={[virtualRows]}` with virtualRows from @wirecore/wirelayer-react/virtual");
1444
- }, [_i, Ri]);
1445
- let Au = B ? ku?.getVirtualItems() ?? [] : [], ju = B ? Au.map((e) => ({
1491
+ Ci && !Xi.useVirtualizer && Ot("DataTable: `virtual` needs the feature virtualRows, so all rows are rendered – pass `features={[virtualRows]}` with virtualRows from @wirecore/wirelayer-react/virtual");
1492
+ }, [Ci, Xi]);
1493
+ let qu = B ? Ku?.getVirtualItems() ?? [] : [], Ju = B ? qu.map((e) => ({
1446
1494
  ...Y[e.index],
1447
1495
  index: e.index
1448
1496
  })) : Y.map((e, t) => ({
1449
1497
  ...e,
1450
1498
  index: t
1451
- })), Mu = B ? Au[0]?.start ?? 0 : 0, Nu = B ? (ku?.getTotalSize() ?? 0) - (Au.at(-1)?.end ?? 0) : 0, Pu = (e) => {
1452
- B && e && ku?.measureElement(e);
1453
- }, Fu = v(!1);
1499
+ })), Yu = B ? qu[0]?.start ?? 0 : 0, Xu = B ? (Ku?.getTotalSize() ?? 0) - (qu.at(-1)?.end ?? 0) : 0, Zu = (e) => {
1500
+ B && e && Ku?.measureElement(e);
1501
+ }, Qu = v(!1);
1454
1502
  g(() => {
1455
- Fu.current = !1;
1456
- }, [na.length]);
1457
- let Iu = (e) => {
1458
- if (xi?.(e), !hi) return;
1503
+ Qu.current = !1;
1504
+ }, [ma.length]);
1505
+ let $u = (e) => {
1506
+ if (Di?.(e), !bi) return;
1459
1507
  let t = e.currentTarget;
1460
- Fu.current || t.scrollTop + t.clientHeight < t.scrollHeight - 80 || (Fu.current = !0, yi?.(), bi?.());
1461
- }, Lu = v(null), [Ru, zu] = y(0);
1508
+ Qu.current || t.scrollTop + t.clientHeight < t.scrollHeight - 80 || (Qu.current = !0, Ti?.(), Ei?.());
1509
+ }, ed = v(null), [td, nd] = y(0);
1462
1510
  g(() => {
1463
- if (!Lu.current || typeof ResizeObserver > "u") return;
1464
- let e = new ResizeObserver(() => zu(Lu.current?.offsetHeight ?? 0));
1465
- return e.observe(Lu.current), () => e.disconnect();
1511
+ if (!ed.current || typeof ResizeObserver > "u") return;
1512
+ let e = new ResizeObserver(() => nd(ed.current?.offsetHeight ?? 0));
1513
+ return e.observe(ed.current), () => e.disconnect();
1466
1514
  }, []);
1467
1515
  let $ = v(null);
1468
1516
  g(() => {
1469
- z && $.current && _t($.current);
1517
+ z && $.current && xt($.current);
1470
1518
  });
1471
- let Bu = (e) => {
1519
+ let rd = (e) => {
1472
1520
  if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.defaultPrevented) return !1;
1473
1521
  let t = e.target, n = t.closest("td"), r = n?.parentElement?.dataset.rowId;
1474
- if (!n || !r || n.cellIndex !== H.length || t.closest(Qn)) return !1;
1522
+ if (!n || !r || n.cellIndex !== H.length || t.closest(lr)) return !1;
1475
1523
  let i = L.getRow(r, !0);
1476
1524
  if (!i) return !1;
1477
1525
  let a = getComputedStyle($.current).direction === "rtl", o = {
1478
1526
  expandable: i.getCanExpand(),
1479
1527
  expanded: i.getIsExpanded(),
1480
1528
  level: i.depth + 1
1481
- }, s = St(e.key, o, a);
1529
+ }, s = Et(e.key, o, a);
1482
1530
  if (!s) return !1;
1483
1531
  if (e.preventDefault(), s === "parent") {
1484
1532
  let e = i.getParentRow();
1485
1533
  $.current?.querySelector(`tr[data-row-id="${CSS.escape(e?.id ?? "")}"] > td:nth-child(${H.length + 1})`)?.focus();
1486
1534
  } else i.toggleExpanded(s === "expand");
1487
1535
  return !0;
1488
- }, Vu = (e) => {
1489
- z && $.current && (To && Bu(e) || ke(e.nativeEvent, $.current, {
1536
+ }, id = (e) => {
1537
+ z && $.current && (Lo && rd(e) || Me(e.nativeEvent, $.current, {
1490
1538
  itemCount: Y.length,
1491
- scrollToItem: B ? (e) => ku?.scrollToIndex(e) : void 0,
1492
- pageRows: Ou.current && hi ? Math.max(1, Math.floor(Ou.current.clientHeight / vi) - 1) : 10,
1539
+ scrollToItem: B ? (e) => Ku?.scrollToIndex(e) : void 0,
1540
+ pageRows: Gu.current && bi ? Math.max(1, Math.floor(Gu.current.clientHeight / wi) - 1) : 10,
1493
1541
  onSelectRow: (e) => {
1494
1542
  let t = L.getRow(e, !0);
1495
- t?.getCanSelect() && Ps(t, !Ts || !Ds(t));
1543
+ t?.getCanSelect() && Xs(t, !Vs || !Us(t));
1496
1544
  }
1497
1545
  }));
1498
- }, Hu = (e) => {
1499
- z && $.current && Oe($.current, e.target);
1546
+ }, ad = (e) => {
1547
+ z && $.current && je($.current, e.target);
1500
1548
  let t = e.target, n = t.closest("tr")?.dataset.rowId, r = t.dataset.columnId;
1501
- w && z && !kl.current && !Al.current && n && r && t.matches("td") && Ol({
1549
+ w && z && !Kl.current && !ql.current && n && r && t.matches("td") && Gl({
1502
1550
  anchor: {
1503
1551
  rowId: n,
1504
1552
  columnId: r
@@ -1508,254 +1556,254 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1508
1556
  columnId: r
1509
1557
  }
1510
1558
  });
1511
- }, Uu = (e) => {
1512
- Ul(e) || Il(e) || Vu(e);
1513
- }, Wu = v(!1);
1559
+ }, od = (e) => {
1560
+ ou(e) || $l(e) || id(e);
1561
+ }, sd = v(!1);
1514
1562
  g(() => {
1515
- if (!Si) return;
1516
- let e = Re(Si, Ci), t = e && Qe(e, wi);
1517
- Wu.current = !0, t && (t.sorting && fo(t.sorting), t.filters && L.setColumnFilters(Bn(t.filters)), t.globalFilter !== void 0 && L.setGlobalFilter(t.globalFilter), t.columnSizing && ao(t.columnSizing), t.columnOrder && L.setColumnOrder(t.columnOrder), t.hiddenColumns && L.setColumnVisibility(Vn(t.hiddenColumns, !1)), t.pinnedColumns && L.setColumnPinning(t.pinnedColumns), t.expanded && t.expanded.length && yo(Vn(t.expanded)), t.selection && ho(Hn(t.selection)), t.density && bo(t.density), t.showFilters !== void 0 && t.showFilters !== Ma && _o(t.showFilters), (t.page || t.pageSize) && po({
1563
+ if (!Oi) return;
1564
+ let e = Ve(Oi, ki), t = e && tt(e, Ai);
1565
+ sd.current = !0, t && (t.sorting && wo(t.sorting), t.filters && L.setColumnFilters(Zn(t.filters)), t.globalFilter !== void 0 && L.setGlobalFilter(t.globalFilter), t.columnSizing && vo(t.columnSizing), t.columnOrder && L.setColumnOrder(t.columnOrder), t.hiddenColumns && L.setColumnVisibility(Qn(t.hiddenColumns, !1)), t.pinnedColumns && L.setColumnPinning(t.pinnedColumns), t.expanded && t.expanded.length && jo(Qn(t.expanded)), t.selection && Do($n(t.selection)), t.density && Mo(t.density), t.showFilters !== void 0 && t.showFilters !== Wa && ko(t.showFilters), (t.page || t.pageSize) && To({
1518
1566
  pageIndex: (t.page ?? 1) - 1,
1519
1567
  pageSize: t.pageSize ?? P.pageSize
1520
1568
  }));
1521
1569
  }, []);
1522
- let Gu = {
1570
+ let cd = {
1523
1571
  sorting: N,
1524
- filters: zn(Ka),
1572
+ filters: Xn(io),
1525
1573
  globalFilter: I,
1526
1574
  page: P.pageIndex + 1,
1527
1575
  pageSize: P.pageSize,
1528
- columnSizing: io,
1529
- columnOrder: $a,
1530
- hiddenColumns: Object.keys(Xa).filter((e) => Xa[e] === !1),
1531
- pinnedColumns: ro,
1532
- expanded: Ba === !0 ? [] : Object.keys(Ba).filter((e) => Ba[e]),
1533
- selection: Object.keys(Ta).filter((e) => Ta[e]),
1534
- density: oo,
1535
- showFilters: Ma
1536
- }, Ku = JSON.stringify(Qe(Gu, wi)), [qu, Ju] = y(0), Yu = v(0);
1576
+ columnSizing: _o,
1577
+ columnOrder: fo,
1578
+ hiddenColumns: Object.keys(co).filter((e) => co[e] === !1),
1579
+ pinnedColumns: go,
1580
+ expanded: Qa === !0 ? [] : Object.keys(Qa).filter((e) => Qa[e]),
1581
+ selection: Object.keys(La).filter((e) => La[e]),
1582
+ density: yo,
1583
+ showFilters: Wa
1584
+ }, ld = JSON.stringify(tt(cd, Ai)), [ud, dd] = y(0), fd = v(0);
1537
1585
  g(() => {
1538
- Si && Wu.current && (qu === Yu.current ? gt(Si, JSON.parse(Ku), Ci) : (Yu.current = qu, le(Si, Ci)));
1586
+ Oi && sd.current && (ud === fd.current ? yt(Oi, JSON.parse(ld), ki) : (fd.current = ud, fe(Oi, ki)));
1539
1587
  }, [
1540
- Si,
1541
- Ci,
1542
- Ku,
1543
- qu
1588
+ Oi,
1589
+ ki,
1590
+ ld,
1591
+ ud
1544
1592
  ]);
1545
- let Xu = {
1593
+ let pd = {
1546
1594
  page: P.pageIndex + 1,
1547
1595
  pageSize: h ? P.pageSize : 0,
1548
1596
  sorting: N.map((e) => ({
1549
1597
  id: e.id,
1550
1598
  desc: e.desc
1551
1599
  })),
1552
- filters: zn(Ka),
1600
+ filters: Xn(io),
1553
1601
  search: I,
1554
1602
  groupBy: F,
1555
- ...Qi ? { condition: Ji } : {}
1556
- }, Zu = ct(Xu), Qu = ct({
1557
- ...Xu,
1603
+ ...ua ? { condition: oa } : {}
1604
+ }, md = dt(pd), hd = dt({
1605
+ ...pd,
1558
1606
  page: void 0,
1559
1607
  pageSize: void 0
1560
- }), $u = v(void 0), ed = v(I);
1608
+ }), gd = v(void 0), _d = v(I);
1561
1609
  g(() => {
1562
- if (!s) return;
1563
- let e = $u.current !== void 0 && $u.current !== Qu;
1564
- if ($u.current = Qu, e && P.pageIndex !== 0) {
1565
- po({
1610
+ if (!l) return;
1611
+ let e = gd.current !== void 0 && gd.current !== hd;
1612
+ if (gd.current = hd, e && P.pageIndex !== 0) {
1613
+ To({
1566
1614
  ...P,
1567
1615
  pageIndex: 0
1568
1616
  });
1569
1617
  return;
1570
1618
  }
1571
- let t = ed.current !== I;
1572
- ed.current = I, Wi.load(JSON.parse(Zu), { debounce: t });
1573
- }, [Zu, !!s]);
1574
- let td = k ? ia ?? na.length : L.getPrePaginatedRowModel().rows.length, nd = (Ye ?? []).map((e) => ({
1619
+ let t = _d.current !== I;
1620
+ _d.current = I, na.load(JSON.parse(md), { debounce: t });
1621
+ }, [md, !!l]);
1622
+ let vd = k ? ga ?? ma.length : L.getPrePaginatedRowModel().rows.length, yd = (Ze ?? []).map((e) => ({
1575
1623
  value: String(e),
1576
1624
  label: String(e)
1577
- })), rd = ni || pr || Dr || !!Ir || ui || mi || Cr || wr || ea || !!Ti || !!Ei || !!Di, id = _r ? I : "", ad = oa && En === "skeleton", od = Math.min(Y.length || h || 5, 50), sd = hs && (k || na.length > 0) && (ki !== void 0 || On !== void 0), cd = (() => {
1578
- if (!Qr) return [];
1625
+ })), bd = si || _r || Mr || !!Vr || hi || yi || Or || kr || fa || !!ji || !!Mi || !!Ni, xd = Sr ? I : "", Sd = va && On === "skeleton", Cd = Math.min(Y.length || h || 5, 50), wd = As && (k || ma.length > 0) && (Fi !== void 0 || An !== void 0), Td = (() => {
1626
+ if (!ri) return [];
1579
1627
  let e = L.getSelectedRowModel().flatRows.filter((e) => !e.getIsGrouped());
1580
1628
  return e.length ? W.flatMap((t) => {
1581
- let n = j.get(t.id), r = Ze(e.map((e) => sa(n, e.original)));
1629
+ let n = j.get(t.id), r = et(e.map((e) => ya(n, e.original)));
1582
1630
  if (!r) return [];
1583
1631
  let i = e[0].original;
1584
1632
  return [{
1585
1633
  id: t.id,
1586
- text: `${n.header}: ${O.aggregates.sum(Js(n, r.sum, i))} · ${O.aggregates.avg(Js(n, r.avg, i))}`
1634
+ text: `${n.header}: ${O.aggregates.sum(dc(n, r.sum, i))} · ${O.aggregates.avg(dc(n, r.avg, i))}`
1587
1635
  }];
1588
1636
  }) : [];
1589
- })(), ld = k ? ia ?? na.length : L.getCoreRowModel().rows.length, ud = Yr ? W.find((e) => {
1637
+ })(), Ed = k ? ga ?? ma.length : L.getCoreRowModel().rows.length, Dd = ei ? W.find((e) => {
1590
1638
  let t = j.get(e.id);
1591
- return !t?.copyable && !(Ao && t?.editable);
1592
- })?.id : void 0, dd = (e, t) => t === ud ? Yr?.(e.original) : void 0, fd = (e) => e.columns ? e.columns.flatMap(fd) : [e.id], pd = ra.some((e) => e.columns) ? (() => {
1639
+ return !t?.copyable && !(Uo && t?.editable);
1640
+ })?.id : void 0, Od = (e, t) => t === Dd ? ei?.(e.original) : void 0, kd = (e) => e.columns ? e.columns.flatMap(kd) : [e.id], Ad = ha.some((e) => e.columns) ? (() => {
1593
1641
  let e = L.getAllLeafColumns(), t = (t) => e.findIndex((e) => e.id === t);
1594
- return ra.map((n) => ({
1642
+ return ha.map((n) => ({
1595
1643
  def: n,
1596
- leaves: fd(n).map((n) => e[t(n)]).filter(Boolean).sort((e, n) => t(e.id) - t(n.id))
1644
+ leaves: kd(n).map((n) => e[t(n)]).filter(Boolean).sort((e, n) => t(e.id) - t(n.id))
1597
1645
  })).sort((e, n) => t(e.leaves[0]?.id ?? "") - t(n.leaves[0]?.id ?? ""));
1598
- })() : void 0, md = (e, t) => {
1599
- let n = ra.map((e) => ({
1646
+ })() : void 0, jd = (e, t) => {
1647
+ let n = ha.map((e) => ({
1600
1648
  id: e.id,
1601
- leaves: fd(e)
1602
- })), r = qe(L.getAllLeafColumns().map((e) => e.id), n, e, t);
1649
+ leaves: kd(e)
1650
+ })), r = Xe(L.getAllLeafColumns().map((e) => e.id), n, e, t);
1603
1651
  if (!r) return;
1604
1652
  L.setColumnOrder(r);
1605
1653
  let i = n.map((e) => e.id).sort((e, t) => r.indexOf(n.find((t) => t.id === e).leaves[0]) - r.indexOf(n.find((e) => e.id === t).leaves[0]));
1606
- Jo(O.columnMoved(j.get(e)?.header ?? e, i.indexOf(e) + 1, i.length));
1607
- }, hd = Rr?.length ? Rr : ["csv"], gd = pn && Os > 0, _d = hd.length === 1 && hd[0] === "csv" ? gd ? [{
1654
+ ls(O.columnMoved(j.get(e)?.header ?? e, i.indexOf(e) + 1, i.length));
1655
+ }, Md = Ur?.length ? Ur : ["csv"], Nd = hn && Ws > 0, Pd = Md.length === 1 && Md[0] === "csv" ? Nd ? [{
1608
1656
  value: "all",
1609
1657
  label: O.exportAll
1610
1658
  }, {
1611
1659
  value: "selection",
1612
1660
  label: O.exportSelection
1613
- }] : [] : hd.flatMap((e) => gd ? [{
1661
+ }] : [] : Md.flatMap((e) => Nd ? [{
1614
1662
  value: `${e}:all`,
1615
1663
  label: O.exportAs(e, !1)
1616
1664
  }, {
1617
1665
  value: `${e}:selection`,
1618
1666
  label: O.exportAs(e, !0)
1619
- }] : hd.length > 1 ? [{
1667
+ }] : Md.length > 1 ? [{
1620
1668
  value: `${e}:all`,
1621
1669
  label: O.exportAs(e, !1)
1622
- }] : []), vd = hd.length > 1 ? O.exportMenu : hd[0] === "xlsx" ? O.exportXlsx : O.export, yd = /* @__PURE__ */ x("div", {
1670
+ }] : []), Fd = Md.length > 1 ? O.exportMenu : Md[0] === "xlsx" ? O.exportXlsx : O.export, Id = /* @__PURE__ */ x("div", {
1623
1671
  className: V.footer(),
1624
- children: [nd.length > 0 && /* @__PURE__ */ x("div", {
1672
+ children: [yd.length > 0 && /* @__PURE__ */ x("div", {
1625
1673
  className: V.pageSize(),
1626
1674
  children: [/* @__PURE__ */ b("span", {
1627
1675
  "aria-hidden": "true",
1628
1676
  children: O.rowsPerPage
1629
- }), /* @__PURE__ */ b(re, {
1677
+ }), /* @__PURE__ */ b(ie, {
1630
1678
  className: V.pageSizeSelect(),
1631
1679
  "aria-label": O.rowsPerPage,
1632
- items: nd,
1680
+ items: yd,
1633
1681
  value: String(P.pageSize),
1634
1682
  onValueChange: (e) => L.setPageSize(Number(e))
1635
1683
  })]
1636
- }), /* @__PURE__ */ b(r, {
1637
- count: td,
1684
+ }), /* @__PURE__ */ b(a, {
1685
+ count: vd,
1638
1686
  pageSize: P.pageSize,
1639
1687
  page: P.pageIndex + 1,
1640
- translations: { rootLabel: `${we}: ${E.pagination.rootLabel}` },
1641
- withEdges: Yt,
1688
+ translations: { rootLabel: `${Ce}: ${E.pagination.rootLabel}` },
1689
+ withEdges: Ct,
1642
1690
  onPageChange: (e) => L.setPageIndex(e - 1)
1643
1691
  })]
1644
- }), bd = (e, t, n, r) => {
1645
- let i = w && El(e.id, t), a = T === "batch" && !!rt(Tc, e.id, t);
1692
+ }), Ld = (e, t, n, r) => {
1693
+ let i = w && Ul(e.id, t), a = T === "batch" && !!ot(Hc, e.id, t);
1646
1694
  return {
1647
1695
  className: [
1648
1696
  i ? V.cellSelected() : "",
1649
1697
  a ? V.cellChanged() : "",
1650
- eu(e.id, t)
1698
+ _u(e.id, t)
1651
1699
  ],
1652
1700
  attributes: {
1653
- ...w || ni ? { "data-column-id": t } : {},
1701
+ ...w || si ? { "data-column-id": t } : {},
1654
1702
  ...w && z ? { "aria-selected": i } : {},
1655
1703
  ...a ? { "data-changed": "" } : {},
1656
- ...uu(n, r),
1704
+ ...Du(n, r),
1657
1705
  ...w ? {
1658
- onPointerDown: (n) => Ml(e.id, t, n),
1659
- onPointerEnter: (n) => Nl(e.id, t, n),
1660
- onClickCapture: Pl
1706
+ onPointerDown: (n) => Yl(e.id, t, n),
1707
+ onPointerEnter: (n) => Xl(e.id, t, n),
1708
+ onClickCapture: Zl
1661
1709
  } : {}
1662
1710
  }
1663
1711
  };
1664
- }, xd = (e, t) => Uc === e.id ? /* @__PURE__ */ x(an, { children: [/* @__PURE__ */ b(d, {
1665
- icon: Ot,
1712
+ }, Rd = (e, t) => ol === e.id ? /* @__PURE__ */ x(ln, { children: [/* @__PURE__ */ b(f, {
1713
+ icon: Mt,
1666
1714
  label: O.saveRow(t),
1667
1715
  variant: "text",
1668
1716
  size: "sm",
1669
- onClick: () => vl(e, !0)
1670
- }), /* @__PURE__ */ b(d, {
1671
- icon: Zt,
1717
+ onClick: () => Fl(e, !0)
1718
+ }), /* @__PURE__ */ b(f, {
1719
+ icon: tn,
1672
1720
  label: O.cancelEdit(t),
1673
1721
  variant: "text",
1674
1722
  size: "sm",
1675
- onClick: () => vl(e, !1)
1676
- })] }) : /* @__PURE__ */ b(d, {
1723
+ onClick: () => Fl(e, !1)
1724
+ })] }) : /* @__PURE__ */ b(f, {
1677
1725
  "data-row-edit": e.id,
1678
- icon: Ut,
1726
+ icon: qt,
1679
1727
  label: O.editRow(t),
1680
1728
  variant: "text",
1681
1729
  size: "sm",
1682
- onClick: () => _l(e)
1683
- }), Sd = (e, t, n) => {
1684
- let r = j.get(t.id), i = M(r, n, e.original), a = T === "batch" && !!rt(Tc, e.id, t.id), o = r?.cell ? r.cell(e.original, n) : void 0;
1685
- if (r?.editable && (Ao && Vc?.rowId === e.id && Vc.columnId === t.id || T === "row" && Uc === e.id)) return /* @__PURE__ */ x("div", {
1730
+ onClick: () => Pl(e)
1731
+ }), zd = (e, t, n) => {
1732
+ let r = j.get(t.id), i = M(r, n, e.original), a = T === "batch" && !!ot(Hc, e.id, t.id), o = r?.cell ? r.cell(e.original, n) : void 0;
1733
+ if (r?.editable && (Uo && il?.rowId === e.id && il.columnId === t.id || T === "row" && ol === e.id)) return /* @__PURE__ */ x("div", {
1686
1734
  "data-editor": "",
1687
1735
  className: V.editor(),
1688
- "aria-busy": Zc || void 0,
1689
- onKeyDown: (n) => Ao ? pl(e, t.id, n) : yl(e, n),
1690
- onBlur: Ao ? (n) => ml(e, t.id, n) : void 0,
1691
- children: [r.renderEditor ? r.renderEditor(gl(e, r)) : /* @__PURE__ */ b(Pn, {
1692
- type: tl(r),
1736
+ "aria-busy": ml || void 0,
1737
+ onKeyDown: (n) => Uo ? Al(e, t.id, n) : Il(e, n),
1738
+ onBlur: Uo ? (n) => jl(e, t.id, n) : void 0,
1739
+ children: [r.renderEditor ? r.renderEditor(Nl(e, r)) : /* @__PURE__ */ b(Gn, {
1740
+ type: vl(r),
1693
1741
  label: q(t),
1694
1742
  options: r.editOptions,
1695
1743
  renderOption: r.renderOption,
1696
- invalid: !!qc[t.id],
1697
- value: Gc[t.id],
1698
- onChange: (t) => hl(e, r, t)
1699
- }), qc[t.id] && /* @__PURE__ */ b("span", {
1700
- id: rl(e.id, t.id),
1744
+ invalid: !!ul[t.id],
1745
+ value: cl[t.id],
1746
+ onChange: (t) => Ml(e, r, t)
1747
+ }), ul[t.id] && /* @__PURE__ */ b("span", {
1748
+ id: bl(e.id, t.id),
1701
1749
  role: "alert",
1702
1750
  className: V.editError(),
1703
- children: qc[t.id]
1751
+ children: ul[t.id]
1704
1752
  })]
1705
1753
  });
1706
- if (Ao && r?.editable) return /* @__PURE__ */ b("button", {
1754
+ if (Uo && r?.editable) return /* @__PURE__ */ b("button", {
1707
1755
  type: "button",
1708
- className: Do(t.id).editButton(),
1709
- "data-edit": nl(e.id, t.id),
1756
+ className: Bo(t.id).editButton(),
1757
+ "data-edit": yl(e.id, t.id),
1710
1758
  "aria-label": a ? `${O.edit(q(t), i)}, ${O.changed}` : O.edit(q(t), i),
1711
1759
  onClick: (n) => {
1712
- (ai !== "dblclick" || n.detail !== 1) && ol(e, t.id);
1760
+ (ui !== "dblclick" || n.detail !== 1) && Cl(e, t.id);
1713
1761
  },
1714
1762
  children: o ?? i
1715
1763
  });
1716
1764
  if (r?.copyable) return /* @__PURE__ */ x("span", {
1717
1765
  className: V.copyCell(),
1718
- children: [o ?? i, /* @__PURE__ */ b(ie, {
1766
+ children: [o ?? i, /* @__PURE__ */ b(m, {
1719
1767
  value: i,
1720
1768
  label: O.copy(q(t), i)
1721
1769
  })]
1722
1770
  });
1723
- let s = Xl ? Kl.trim() : id, c = o === void 0 ? s ? /* @__PURE__ */ b(p, {
1771
+ let s = pu ? lu.trim() : xd, c = o === void 0 ? s ? /* @__PURE__ */ b(oe, {
1724
1772
  text: i,
1725
1773
  query: s
1726
- }) : i : o, ee = dd(e, t.id);
1727
- return ee ? /* @__PURE__ */ b("a", {
1728
- href: ee,
1774
+ }) : i : o, l = Od(e, t.id);
1775
+ return l ? /* @__PURE__ */ b("a", {
1776
+ href: l,
1729
1777
  className: V.rowLink(),
1730
1778
  "data-row-link": "",
1731
1779
  children: c
1732
1780
  }) : c;
1733
- }, Cd = /* @__PURE__ */ x("tbody", {
1734
- onContextMenuCapture: tc,
1781
+ }, Bd = /* @__PURE__ */ x("tbody", {
1782
+ onContextMenuCapture: vc,
1735
1783
  children: [
1736
- Y.length === 0 && !ad && /* @__PURE__ */ b("tr", { children: /* @__PURE__ */ b("td", {
1737
- colSpan: jo,
1784
+ Y.length === 0 && !Sd && /* @__PURE__ */ b("tr", { children: /* @__PURE__ */ b("td", {
1785
+ colSpan: Go,
1738
1786
  className: V.message(),
1739
- children: aa ? /* @__PURE__ */ x("span", {
1787
+ children: _a ? /* @__PURE__ */ x("span", {
1740
1788
  className: V.errorContent(),
1741
1789
  children: [/* @__PURE__ */ b("span", {
1742
1790
  role: "alert",
1743
1791
  children: E.dataSource.error
1744
- }), /* @__PURE__ */ b(u, {
1792
+ }), /* @__PURE__ */ b(d, {
1745
1793
  variant: "outline",
1746
1794
  size: "sm",
1747
- onClick: () => void Tu(),
1795
+ onClick: () => void Hu(),
1748
1796
  children: E.dataSource.retry
1749
1797
  })]
1750
- }) : oa ? Ai ?? /* @__PURE__ */ x("span", {
1798
+ }) : va ? Ii ?? /* @__PURE__ */ x("span", {
1751
1799
  className: V.messageContent(),
1752
- children: [/* @__PURE__ */ b(ne, {
1800
+ children: [/* @__PURE__ */ b(re, {
1753
1801
  size: "sm",
1754
- label: kn ?? E.common.loading
1755
- }), kn ?? E.common.loading]
1756
- }) : sd ? ki ?? On ?? Dn ?? E.common.empty : Oi ?? Dn ?? E.common.empty
1802
+ label: jn ?? E.common.loading
1803
+ }), jn ?? E.common.loading]
1804
+ }) : wd ? Fi ?? An ?? kn ?? E.common.empty : Pi ?? kn ?? E.common.empty
1757
1805
  }) }),
1758
- ad && Array.from({ length: od }, (e, t) => /* @__PURE__ */ x("tr", {
1806
+ Sd && Array.from({ length: Cd }, (e, t) => /* @__PURE__ */ x("tr", {
1759
1807
  className: V.row(),
1760
1808
  children: [
1761
1809
  H.map((e) => /* @__PURE__ */ b("td", {
@@ -1763,9 +1811,9 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1763
1811
  style: K(e)
1764
1812
  }, e)),
1765
1813
  W.map((e) => /* @__PURE__ */ b("td", {
1766
- className: Do(e.id).td({ class: Lo(e.id, !1) }),
1767
- style: Ro(e.id, !1),
1768
- children: /* @__PURE__ */ b(i, {})
1814
+ className: Bo(e.id).td({ class: Zo(e.id, !1) }),
1815
+ style: Qo(e.id, !1),
1816
+ children: /* @__PURE__ */ b(s, {})
1769
1817
  }, e.id)),
1770
1818
  U.length > 0 && /* @__PURE__ */ b("td", {
1771
1819
  className: V.td({ class: G("actions", !1) }),
@@ -1773,30 +1821,30 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1773
1821
  })
1774
1822
  ]
1775
1823
  }, `skeleton-${t + 1}`)),
1776
- Mu > 0 && !ad && /* @__PURE__ */ b("tr", {
1824
+ Yu > 0 && !Sd && /* @__PURE__ */ b("tr", {
1777
1825
  className: V.spacer(),
1778
1826
  "aria-hidden": "true",
1779
1827
  children: /* @__PURE__ */ b("td", {
1780
- colSpan: jo,
1828
+ colSpan: Go,
1781
1829
  className: V.spacerCell(),
1782
- style: { height: Mu }
1830
+ style: { height: Yu }
1783
1831
  })
1784
1832
  }),
1785
- (ad ? [] : ju).map((e) => {
1786
- let t = e.row, n = B ? e.index + Vo.length + 1 : void 0;
1833
+ (Sd ? [] : Ju).map((e) => {
1834
+ let t = e.row, n = B ? e.index + ts.length + 1 : void 0;
1787
1835
  if (e.kind === "group") {
1788
1836
  let r = j.get(t.groupingColumnId), i = M(r, t.groupingValue, t.original), a = t.getLeafRows().length;
1789
1837
  return /* @__PURE__ */ x("tr", {
1790
- ref: Pu,
1838
+ ref: Zu,
1791
1839
  className: V.groupRow({ class: X ? [V.dropTarget(), V.dropInside()] : void 0 }),
1792
1840
  "data-index": e.index,
1793
1841
  "aria-rowindex": n,
1794
- "data-drop": X ? wc(t.id) : void 0,
1795
- onDragOver: Hr ? (e) => xc(t, e) : void 0,
1796
- onDragLeave: Hr ? () => cc(null) : void 0,
1797
- onDrop: Hr ? Cc : void 0,
1842
+ "data-drop": X ? Vc(t.id) : void 0,
1843
+ onDragOver: qr ? (e) => Rc(t, e) : void 0,
1844
+ onDragLeave: qr ? () => Tc(null) : void 0,
1845
+ onDrop: qr ? Bc : void 0,
1798
1846
  children: [/* @__PURE__ */ b("td", {
1799
- colSpan: Ks ? H.length + 1 : jo,
1847
+ colSpan: lc ? H.length + 1 : Go,
1800
1848
  className: V.groupCell(),
1801
1849
  children: /* @__PURE__ */ x("div", {
1802
1850
  className: V.treeCell(),
@@ -1808,7 +1856,7 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1808
1856
  "aria-expanded": t.getIsExpanded(),
1809
1857
  "aria-label": O.group(r?.header ?? "", i, a),
1810
1858
  onClick: t.getToggleExpandedHandler(),
1811
- children: /* @__PURE__ */ b(At, {
1859
+ children: /* @__PURE__ */ b(Pt, {
1812
1860
  className: V.expanderIcon(),
1813
1861
  "data-state": t.getIsExpanded() ? "open" : "closed",
1814
1862
  "aria-hidden": "true"
@@ -1824,50 +1872,51 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1824
1872
  })
1825
1873
  ]
1826
1874
  })
1827
- }), Ks && /* @__PURE__ */ x(an, { children: [W.slice(1).map((e) => /* @__PURE__ */ b("td", {
1828
- className: Do(e.id).groupAggregate(),
1829
- children: Ys(j.get(e.id), t.getLeafRows())
1875
+ }), lc && /* @__PURE__ */ x(ln, { children: [W.slice(1).map((e) => /* @__PURE__ */ b("td", {
1876
+ className: Bo(e.id).groupAggregate(),
1877
+ children: fc(j.get(e.id), t.getLeafRows())
1830
1878
  }, e.id)), U.length > 0 && /* @__PURE__ */ b("td", { className: V.groupAggregate() })] })]
1831
1879
  }, e.key);
1832
1880
  }
1833
1881
  if (e.kind === "expansion") return /* @__PURE__ */ b("tr", {
1834
- id: Us(t),
1835
- ref: Pu,
1882
+ id: oc(t),
1883
+ ref: Zu,
1836
1884
  className: V.expansionRow(),
1837
1885
  "data-index": e.index,
1838
1886
  "aria-rowindex": n,
1839
1887
  children: /* @__PURE__ */ b("td", {
1840
- colSpan: jo,
1888
+ colSpan: Go,
1841
1889
  className: V.expansionCell(),
1842
- children: cr?.(t.original, t.id)
1890
+ children: Vn?.(t.original, t.id)
1843
1891
  })
1844
1892
  }, e.key);
1845
- let r = zi(t.original, t.index);
1893
+ let r = Zi(t.original, t.index);
1846
1894
  return /* @__PURE__ */ x("tr", {
1847
- ref: Pu,
1895
+ ref: Zu,
1848
1896
  className: V.row({ class: [
1849
- Hr ? V.dropTarget() : "",
1850
- Hr && uc && X ? V.dropInside() : "",
1851
- Yr?.(t.original) ? V.linkRow() : "",
1852
- Jr?.(t.original)
1897
+ qr ? V.dropTarget() : "",
1898
+ qr && Dc && X ? V.dropInside() : "",
1899
+ ei?.(t.original) ? V.linkRow() : "",
1900
+ $r?.(t.original)
1853
1901
  ] }),
1854
- "data-state": Ds(t) ? "selected" : void 0,
1855
- "aria-selected": z && pn ? Ds(t) : void 0,
1902
+ "data-state": Us(t) ? "selected" : void 0,
1903
+ "aria-selected": z && hn ? Us(t) : void 0,
1856
1904
  "data-row-id": t.id,
1905
+ "data-stripe": ac(t),
1857
1906
  "data-index": e.index,
1858
1907
  "aria-rowindex": n,
1859
- "aria-level": To ? t.depth + 1 : void 0,
1860
- "aria-expanded": To && t.getCanExpand() ? t.getIsExpanded() : void 0,
1861
- draggable: ac === t.id ? "true" : void 0,
1862
- "data-drop": wc(t.id),
1908
+ "aria-level": Lo ? t.depth + 1 : void 0,
1909
+ "aria-expanded": Lo && t.getCanExpand() ? t.getIsExpanded() : void 0,
1910
+ draggable: Sc === t.id ? "true" : void 0,
1911
+ "data-drop": Vc(t.id),
1863
1912
  "data-dragging": X === t.id || void 0,
1864
- onClick: (e) => Ls(t, e),
1865
- onAuxClick: (e) => Rs(t, e),
1866
- onDragStart: (e) => yc(t, e),
1867
- onDragOver: (e) => bc(t, e),
1868
- onDragLeave: () => cc(null),
1869
- onDrop: Cc,
1870
- onDragEnd: Sc,
1913
+ onClick: (e) => $s(t, e),
1914
+ onAuxClick: (e) => ec(t, e),
1915
+ onDragStart: (e) => Ic(t, e),
1916
+ onDragOver: (e) => Lc(t, e),
1917
+ onDragLeave: () => Tc(null),
1918
+ onDrop: Bc,
1919
+ onDragEnd: zc,
1871
1920
  children: [
1872
1921
  H.map((e) => /* @__PURE__ */ b("td", {
1873
1922
  className: V.td({ class: G(e, !1) }),
@@ -1877,72 +1926,72 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1877
1926
  className: V.dragHandle(),
1878
1927
  "data-drag-handle": t.id,
1879
1928
  "aria-label": O.moveRow(r),
1880
- "aria-keyshortcuts": uc ? "ArrowUp ArrowDown ArrowLeft ArrowRight" : "ArrowUp ArrowDown",
1881
- onKeyDown: (e) => vc(t, e),
1882
- onPointerDown: () => oc(t.id),
1883
- onPointerUp: () => oc(X ? ac : null),
1884
- children: /* @__PURE__ */ b(zt, {
1929
+ "aria-keyshortcuts": Dc ? "ArrowUp ArrowDown ArrowLeft ArrowRight" : "ArrowUp ArrowDown",
1930
+ onKeyDown: (e) => Fc(t, e),
1931
+ onPointerDown: () => Cc(t.id),
1932
+ onPointerUp: () => Cc(X ? Sc : null),
1933
+ children: /* @__PURE__ */ b(Ut, {
1885
1934
  className: V.dragIcon(),
1886
1935
  "aria-hidden": "true"
1887
1936
  })
1888
- }) : e === "select" && Ts ? /* @__PURE__ */ b("span", {
1889
- onClickCapture: Fs,
1890
- onKeyDownCapture: Fs,
1891
- children: /* @__PURE__ */ b(f, {
1892
- checked: Ds(t),
1937
+ }) : e === "select" && Vs ? /* @__PURE__ */ b("span", {
1938
+ onClickCapture: Zs,
1939
+ onKeyDownCapture: Zs,
1940
+ children: /* @__PURE__ */ b(ae, {
1941
+ checked: Us(t),
1893
1942
  disabled: !t.getCanSelect(),
1894
1943
  "aria-label": O.selectRow(r),
1895
- onCheckedChange: (e) => Ps(t, e === !0, Ns.current)
1944
+ onCheckedChange: (e) => Xs(t, e === !0, Ys.current)
1896
1945
  })
1897
1946
  }) : e === "select" ? /* @__PURE__ */ b("input", {
1898
1947
  type: "radio",
1899
- name: js,
1948
+ name: qs,
1900
1949
  className: V.radio(),
1901
- checked: Ds(t),
1950
+ checked: Us(t),
1902
1951
  disabled: !t.getCanSelect(),
1903
1952
  "aria-label": O.selectRow(r),
1904
- onChange: () => Ps(t, !0)
1953
+ onChange: () => Xs(t, !0)
1905
1954
  }) : e === "expand" && t.getCanExpand() ? /* @__PURE__ */ b("button", {
1906
1955
  type: "button",
1907
1956
  className: V.expander(),
1908
1957
  "aria-expanded": t.getIsExpanded(),
1909
- "aria-controls": t.getIsExpanded() ? Us(t) : void 0,
1958
+ "aria-controls": t.getIsExpanded() ? oc(t) : void 0,
1910
1959
  "aria-label": O.details(r),
1911
1960
  onClick: () => t.toggleExpanded(),
1912
- children: /* @__PURE__ */ b(At, {
1961
+ children: /* @__PURE__ */ b(Pt, {
1913
1962
  className: V.expanderIcon(),
1914
1963
  "data-state": t.getIsExpanded() ? "open" : "closed",
1915
1964
  "aria-hidden": "true"
1916
1965
  })
1917
1966
  }) : e === "expand" ? /* @__PURE__ */ b("span", { className: V.expanderSpacer() }) : /* @__PURE__ */ b("span", {
1918
1967
  className: V.rowNumber(),
1919
- children: Hs.get(t.id)
1968
+ children: ic.get(t.id)
1920
1969
  })
1921
1970
  }, e)),
1922
1971
  t.getVisibleCells().map((n, r) => {
1923
- if (ou) {
1924
- let t = lu(e.index, r);
1972
+ if (Cu) {
1973
+ let t = Eu(e.index, r);
1925
1974
  if (!t.rowSpan || !t.colSpan) return null;
1926
1975
  }
1927
- let i = Sd(t, n.column, kc(t, n.column.id)), a = bd(t, n.column.id, e.index, r);
1976
+ let i = zd(t, n.column, Kc(t, n.column.id)), a = Ld(t, n.column.id, e.index, r);
1928
1977
  return /* @__PURE__ */ b("td", {
1929
- className: Do(n.column.id).td({ class: [
1930
- Lo(n.column.id, !1),
1931
- Oo(n.column.id, t),
1978
+ className: Bo(n.column.id).td({ class: [
1979
+ Zo(n.column.id, !1),
1980
+ Vo(n.column.id, t),
1932
1981
  ...a.className
1933
1982
  ] }),
1934
- style: Ro(n.column.id, !1),
1983
+ style: Qo(n.column.id, !1),
1935
1984
  ...a.attributes,
1936
- children: Gs && r === 0 ? /* @__PURE__ */ x("div", {
1985
+ children: cc && r === 0 ? /* @__PURE__ */ x("div", {
1937
1986
  className: V.treeCell(),
1938
1987
  style: { paddingInlineStart: t.depth * 20 },
1939
- children: [tr && t.getCanExpand() ? /* @__PURE__ */ b("button", {
1988
+ children: [Nn && t.getCanExpand() ? /* @__PURE__ */ b("button", {
1940
1989
  type: "button",
1941
1990
  className: V.expander(),
1942
1991
  "aria-expanded": t.getIsExpanded(),
1943
- "aria-label": Bi(t.original, t.index),
1992
+ "aria-label": Qi(t.original, t.index),
1944
1993
  onClick: t.getToggleExpandedHandler(),
1945
- children: /* @__PURE__ */ b(At, {
1994
+ children: /* @__PURE__ */ b(Pt, {
1946
1995
  className: V.expanderIcon(),
1947
1996
  "data-state": t.getIsExpanded() ? "open" : "closed",
1948
1997
  "aria-hidden": "true"
@@ -1956,11 +2005,11 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1956
2005
  style: K("actions"),
1957
2006
  children: /* @__PURE__ */ x("div", {
1958
2007
  className: V.editActions(),
1959
- children: [T === "row" && ko && xd(t, r), Gr && Uc !== t.id && /* @__PURE__ */ b(l, {
1960
- items: Qs(t),
1961
- onSelect: (e) => nc(t, e),
1962
- children: /* @__PURE__ */ b(d, {
1963
- icon: It,
2008
+ children: [T === "row" && Ho && Rd(t, r), Xr && ol !== t.id && /* @__PURE__ */ b(u, {
2009
+ items: hc(t),
2010
+ onSelect: (e) => yc(t, e),
2011
+ children: /* @__PURE__ */ b(f, {
2012
+ icon: Bt,
1964
2013
  label: O.rowActions(r),
1965
2014
  variant: "text",
1966
2015
  size: "sm"
@@ -1971,79 +2020,88 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
1971
2020
  ]
1972
2021
  }, e.key);
1973
2022
  }),
1974
- Nu > 0 && !ad && /* @__PURE__ */ b("tr", {
2023
+ Xu > 0 && !Sd && /* @__PURE__ */ b("tr", {
1975
2024
  className: V.spacer(),
1976
2025
  "aria-hidden": "true",
1977
2026
  children: /* @__PURE__ */ b("td", {
1978
- colSpan: jo,
2027
+ colSpan: Go,
1979
2028
  className: V.spacerCell(),
1980
- style: { height: Nu }
2029
+ style: { height: Xu }
1981
2030
  })
1982
2031
  })
1983
2032
  ]
1984
- }), wd = /* @__PURE__ */ x("div", {
1985
- ...Ni,
1986
- ref: Li,
1987
- className: V.base({ class: Mi }),
2033
+ }), Vd = /* @__PURE__ */ x("div", {
2034
+ ...zi,
2035
+ ref: Yi,
2036
+ className: V.base({ class: Ri }),
1988
2037
  role: R ? "dialog" : void 0,
1989
2038
  "aria-modal": R || void 0,
1990
- "aria-label": R ? we : void 0,
1991
- onKeyDown: Du,
2039
+ "aria-label": R ? Ce : void 0,
2040
+ onKeyDown: Wu,
1992
2041
  children: [
1993
- rd && /* @__PURE__ */ x("div", {
2042
+ bd && /* @__PURE__ */ x("div", {
1994
2043
  className: V.toolbar(),
1995
2044
  children: [
1996
- Ei,
1997
- pr && /* @__PURE__ */ b(te, {
2045
+ Mi && /* @__PURE__ */ b(i, {
2046
+ recipes: fr,
2047
+ children: Mi
2048
+ }),
2049
+ _r && /* @__PURE__ */ b(p, {
1998
2050
  type: "search",
1999
2051
  size: "sm",
2000
- leadingIcon: qt,
2052
+ leadingIcon: Zt,
2001
2053
  className: V.search(),
2002
2054
  placeholder: O.searchPlaceholder,
2003
- "aria-label": O.search(we),
2055
+ "aria-label": O.search(Ce),
2004
2056
  value: I,
2005
2057
  onChange: (e) => L.setGlobalFilter(e.target.value)
2006
2058
  }),
2007
- Ti,
2059
+ ji && /* @__PURE__ */ b(i, {
2060
+ recipes: fr,
2061
+ children: ji
2062
+ }),
2008
2063
  /* @__PURE__ */ x("div", {
2009
2064
  className: V.toolbarEnd(),
2010
2065
  children: [
2011
- Di,
2012
- ni && /* @__PURE__ */ b(d, {
2066
+ Ni && /* @__PURE__ */ b(i, {
2067
+ recipes: fr,
2068
+ children: Ni
2069
+ }),
2070
+ si && /* @__PURE__ */ b(f, {
2013
2071
  "data-find-toggle": "",
2014
- icon: Jt,
2072
+ icon: Qt,
2015
2073
  label: O.find,
2016
2074
  variant: "outline",
2017
2075
  size: "sm",
2018
- "aria-expanded": Wl,
2019
- onClick: ru
2076
+ "aria-expanded": su,
2077
+ onClick: bu
2020
2078
  }),
2021
- ea && /* @__PURE__ */ b(u, {
2079
+ fa && /* @__PURE__ */ b(d, {
2022
2080
  variant: "outline",
2023
2081
  size: "sm",
2024
- leadingIcon: Bt,
2025
- "aria-expanded": Yi,
2026
- "aria-controls": `${Ii}-advanced`,
2027
- onClick: () => Xi(!Yi),
2082
+ leadingIcon: Wt,
2083
+ "aria-expanded": sa,
2084
+ "aria-controls": `${Ji}-advanced`,
2085
+ onClick: () => ca(!sa),
2028
2086
  children: E.conditionBuilder.advanced
2029
2087
  }),
2030
- Cr && /* @__PURE__ */ b(d, {
2031
- icon: Lt,
2088
+ Or && /* @__PURE__ */ b(f, {
2089
+ icon: Vt,
2032
2090
  label: O.filterToggle,
2033
2091
  variant: "outline",
2034
2092
  size: "sm",
2035
- "aria-pressed": Ma,
2036
- onClick: vo
2093
+ "aria-pressed": Wa,
2094
+ onClick: Ao
2037
2095
  }),
2038
- wr && /* @__PURE__ */ b(d, {
2039
- icon: Rt,
2096
+ kr && /* @__PURE__ */ b(f, {
2097
+ icon: Ht,
2040
2098
  label: O.resetFilters,
2041
2099
  variant: "outline",
2042
2100
  size: "sm",
2043
- disabled: !hs,
2044
- onClick: Cu
2101
+ disabled: !As,
2102
+ onClick: Bu
2045
2103
  }),
2046
- ui && /* @__PURE__ */ x(S.Root, {
2104
+ hi && /* @__PURE__ */ x(S.Root, {
2047
2105
  positioning: {
2048
2106
  placement: "bottom-end",
2049
2107
  gutter: 4
@@ -2052,36 +2110,36 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2052
2110
  unmountOnExit: !0,
2053
2111
  children: [/* @__PURE__ */ b(S.Trigger, {
2054
2112
  asChild: !0,
2055
- children: /* @__PURE__ */ b(d, {
2056
- icon: Kt,
2113
+ children: /* @__PURE__ */ b(f, {
2114
+ icon: Xt,
2057
2115
  label: O.density,
2058
2116
  variant: "outline",
2059
2117
  size: "sm"
2060
2118
  })
2061
- }), /* @__PURE__ */ b(on, { children: /* @__PURE__ */ b(S.Positioner, { children: /* @__PURE__ */ b(S.Content, {
2062
- className: Fi.content(),
2119
+ }), /* @__PURE__ */ b(un, { children: /* @__PURE__ */ b(S.Positioner, { children: /* @__PURE__ */ b(S.Content, {
2120
+ className: qi.content(),
2063
2121
  children: /* @__PURE__ */ b(S.RadioItemGroup, {
2064
- value: oo,
2065
- onValueChange: (e) => bo(e.value),
2122
+ value: yo,
2123
+ onValueChange: (e) => Mo(e.value),
2066
2124
  children: [
2067
2125
  "sm",
2068
2126
  "md",
2069
2127
  "lg"
2070
2128
  ].map((e) => /* @__PURE__ */ x(S.RadioItem, {
2071
2129
  value: e,
2072
- className: Fi.item(),
2073
- children: [/* @__PURE__ */ b(S.ItemIndicator, { children: /* @__PURE__ */ b(Ot, {
2130
+ className: qi.item(),
2131
+ children: [/* @__PURE__ */ b(S.ItemIndicator, { children: /* @__PURE__ */ b(Mt, {
2074
2132
  className: V.menuCheck(),
2075
2133
  "aria-hidden": "true"
2076
2134
  }) }), /* @__PURE__ */ b(S.ItemText, {
2077
- className: Fi.label(),
2135
+ className: qi.label(),
2078
2136
  children: O.densities[e]
2079
2137
  })]
2080
2138
  }, e))
2081
2139
  })
2082
2140
  }) }) })]
2083
2141
  }),
2084
- Dr && /* @__PURE__ */ x(S.Root, {
2142
+ Mr && /* @__PURE__ */ x(S.Root, {
2085
2143
  positioning: {
2086
2144
  placement: "bottom-end",
2087
2145
  gutter: 4
@@ -2090,15 +2148,15 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2090
2148
  unmountOnExit: !0,
2091
2149
  children: [/* @__PURE__ */ b(S.Trigger, {
2092
2150
  asChild: !0,
2093
- children: /* @__PURE__ */ b(u, {
2151
+ children: /* @__PURE__ */ b(d, {
2094
2152
  variant: "outline",
2095
2153
  size: "sm",
2096
- leadingIcon: Pt,
2154
+ leadingIcon: Rt,
2097
2155
  children: O.columns
2098
2156
  })
2099
- }), /* @__PURE__ */ b(on, { children: /* @__PURE__ */ b(S.Positioner, { children: /* @__PURE__ */ b(S.Content, {
2100
- className: Fi.content(),
2101
- children: (pd || [{
2157
+ }), /* @__PURE__ */ b(un, { children: /* @__PURE__ */ b(S.Positioner, { children: /* @__PURE__ */ b(S.Content, {
2158
+ className: qi.content(),
2159
+ children: (Ad || [{
2102
2160
  def: void 0,
2103
2161
  leaves: L.getAllLeafColumns()
2104
2162
  }]).map(({ def: e, leaves: t }, n) => {
@@ -2107,135 +2165,135 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2107
2165
  checked: e.getIsVisible(),
2108
2166
  onCheckedChange: (t) => e.toggleVisibility(t),
2109
2167
  closeOnSelect: !1,
2110
- className: Fi.item({ class: t ? V.columnGroupItem() : void 0 }),
2111
- children: [/* @__PURE__ */ b(S.ItemIndicator, { children: /* @__PURE__ */ b(Ot, {
2168
+ className: qi.item({ class: t ? V.columnGroupItem() : void 0 }),
2169
+ children: [/* @__PURE__ */ b(S.ItemIndicator, { children: /* @__PURE__ */ b(Mt, {
2112
2170
  className: V.menuCheck(),
2113
2171
  "aria-hidden": "true"
2114
2172
  }) }), /* @__PURE__ */ b(S.ItemText, {
2115
- className: Fi.label(),
2173
+ className: qi.label(),
2116
2174
  children: q(e)
2117
2175
  })]
2118
2176
  }, e.id);
2119
- return e?.columns ? /* @__PURE__ */ x(Qt, { children: [
2177
+ return e?.columns ? /* @__PURE__ */ x(nn, { children: [
2120
2178
  /* @__PURE__ */ x(S.CheckboxItem, {
2121
2179
  value: `group:${e.id}`,
2122
2180
  checked: r.every((e) => e.getIsVisible()),
2123
2181
  disabled: !r.length,
2124
2182
  onCheckedChange: (e) => L.setColumnVisibility({
2125
- ...Xa,
2183
+ ...co,
2126
2184
  ...Object.fromEntries(r.map((t) => [t.id, e]))
2127
2185
  }),
2128
2186
  closeOnSelect: !1,
2129
- className: Fi.item(),
2130
- children: [/* @__PURE__ */ b(S.ItemIndicator, { children: /* @__PURE__ */ b(Ot, {
2187
+ className: qi.item(),
2188
+ children: [/* @__PURE__ */ b(S.ItemIndicator, { children: /* @__PURE__ */ b(Mt, {
2131
2189
  className: V.menuCheck(),
2132
2190
  "aria-hidden": "true"
2133
2191
  }) }), /* @__PURE__ */ b(S.ItemText, {
2134
- className: Fi.label(),
2192
+ className: qi.label(),
2135
2193
  children: e.header
2136
2194
  })]
2137
2195
  }),
2138
2196
  r.map((e) => i(e, !0)),
2139
- jr && [-1, 1].map((t) => /* @__PURE__ */ b(S.Item, {
2197
+ Ir && [-1, 1].map((t) => /* @__PURE__ */ b(S.Item, {
2140
2198
  value: `group-${t < 0 ? "earlier" : "later"}:${e.id}`,
2141
- disabled: t < 0 ? n === 0 : n === pd.length - 1,
2199
+ disabled: t < 0 ? n === 0 : n === Ad.length - 1,
2142
2200
  closeOnSelect: !1,
2143
- className: Fi.item({ class: V.columnGroupItem() }),
2144
- onSelect: () => md(e.id, t),
2201
+ className: qi.item({ class: V.columnGroupItem() }),
2202
+ onSelect: () => jd(e.id, t),
2145
2203
  children: /* @__PURE__ */ b(S.ItemText, {
2146
- className: Fi.label(),
2204
+ className: qi.label(),
2147
2205
  children: t < 0 ? O.columnGroupEarlier(e.header) : O.columnGroupLater(e.header)
2148
2206
  })
2149
2207
  }, t))
2150
- ] }, `group:${e.id}`) : /* @__PURE__ */ b(Qt, { children: r.map((e) => i(e, !1)) }, e?.id ?? "columns");
2208
+ ] }, `group:${e.id}`) : /* @__PURE__ */ b(nn, { children: r.map((e) => i(e, !1)) }, e?.id ?? "columns");
2151
2209
  })
2152
2210
  }) }) })]
2153
2211
  }),
2154
- Ir && (_d.length > 1 ? /* @__PURE__ */ b(l, {
2155
- items: _d,
2212
+ Vr && (Pd.length > 1 ? /* @__PURE__ */ b(u, {
2213
+ items: Pd,
2156
2214
  onSelect: (e) => {
2157
2215
  let [t, n] = e.includes(":") ? e.split(":") : ["csv", e];
2158
- bu(t, n === "selection");
2216
+ Lu(t, n === "selection");
2159
2217
  },
2160
- children: /* @__PURE__ */ b(u, {
2218
+ children: /* @__PURE__ */ b(d, {
2161
2219
  variant: "outline",
2162
2220
  size: "sm",
2163
- leadingIcon: Ft,
2164
- children: vd
2221
+ leadingIcon: zt,
2222
+ children: Fd
2165
2223
  })
2166
- }) : /* @__PURE__ */ b(u, {
2224
+ }) : /* @__PURE__ */ b(d, {
2167
2225
  variant: "outline",
2168
2226
  size: "sm",
2169
- leadingIcon: Ft,
2170
- onClick: () => bu(hd[0], !1),
2171
- children: vd
2227
+ leadingIcon: zt,
2228
+ onClick: () => Lu(Md[0], !1),
2229
+ children: Fd
2172
2230
  })),
2173
- mi && /* @__PURE__ */ b(d, {
2231
+ yi && /* @__PURE__ */ b(f, {
2174
2232
  "data-fullscreen-toggle": "",
2175
- icon: R ? Ht : Vt,
2233
+ icon: R ? Kt : Gt,
2176
2234
  label: R ? O.exitFullscreen : O.fullscreen,
2177
2235
  variant: "outline",
2178
2236
  size: "sm",
2179
- onClick: Eu
2237
+ onClick: Uu
2180
2238
  })
2181
2239
  ]
2182
2240
  })
2183
2241
  ]
2184
2242
  }),
2185
- ea && Yi && /* @__PURE__ */ b("div", {
2186
- id: `${Ii}-advanced`,
2243
+ fa && sa && /* @__PURE__ */ b("div", {
2244
+ id: `${Ji}-advanced`,
2187
2245
  className: V.advancedFilter(),
2188
- children: fr({
2189
- fields: Zi,
2190
- value: Ji,
2191
- onValueChange: $i,
2246
+ children: hr({
2247
+ fields: la,
2248
+ value: oa,
2249
+ onValueChange: da,
2192
2250
  label: E.conditionBuilder.advanced
2193
2251
  })
2194
2252
  }),
2195
- ni && Wl && /* @__PURE__ */ x("div", {
2253
+ si && su && /* @__PURE__ */ x("div", {
2196
2254
  className: V.findBar(),
2197
2255
  role: "search",
2198
2256
  "aria-label": O.find,
2199
2257
  children: [
2200
- /* @__PURE__ */ b(te, {
2258
+ /* @__PURE__ */ b(p, {
2201
2259
  type: "search",
2202
2260
  size: "sm",
2203
2261
  "data-find-input": "",
2204
- leadingIcon: Jt,
2262
+ leadingIcon: Qt,
2205
2263
  className: V.findInput(),
2206
2264
  placeholder: O.searchPlaceholder,
2207
2265
  "aria-label": O.find,
2208
- value: Kl,
2209
- onChange: (e) => au(e.target.value),
2210
- onKeyDown: iu
2266
+ value: lu,
2267
+ onChange: (e) => Su(e.target.value),
2268
+ onKeyDown: xu
2211
2269
  }),
2212
2270
  /* @__PURE__ */ b("span", {
2213
2271
  className: V.findCount(),
2214
2272
  "aria-live": "polite",
2215
- children: Kl.trim() ? O.findMatches(Q.length ? Math.min(Jl, Q.length - 1) + 1 : 0, Q.length) : ""
2273
+ children: lu.trim() ? O.findMatches(Q.length ? Math.min(du, Q.length - 1) + 1 : 0, Q.length) : ""
2216
2274
  }),
2217
- /* @__PURE__ */ b(d, {
2218
- icon: jt,
2275
+ /* @__PURE__ */ b(f, {
2276
+ icon: Ft,
2219
2277
  label: O.findPrevious,
2220
2278
  variant: "text",
2221
2279
  size: "sm",
2222
2280
  disabled: !Q.length,
2223
- onClick: () => nu(Jl - 1)
2281
+ onClick: () => yu(du - 1)
2224
2282
  }),
2225
- /* @__PURE__ */ b(d, {
2226
- icon: kt,
2283
+ /* @__PURE__ */ b(f, {
2284
+ icon: Nt,
2227
2285
  label: O.findNext,
2228
2286
  variant: "text",
2229
2287
  size: "sm",
2230
2288
  disabled: !Q.length,
2231
- onClick: () => nu(Jl + 1)
2289
+ onClick: () => yu(du + 1)
2232
2290
  }),
2233
- /* @__PURE__ */ b(d, {
2234
- icon: Zt,
2291
+ /* @__PURE__ */ b(f, {
2292
+ icon: tn,
2235
2293
  label: O.findClose,
2236
2294
  variant: "text",
2237
2295
  size: "sm",
2238
- onClick: ru
2296
+ onClick: bu
2239
2297
  })
2240
2298
  ]
2241
2299
  }),
@@ -2244,35 +2302,35 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2244
2302
  children: [
2245
2303
  /* @__PURE__ */ b("span", {
2246
2304
  className: V.batchCount(),
2247
- children: O.changes(Lc)
2305
+ children: O.changes(el)
2248
2306
  }),
2249
- /* @__PURE__ */ b(u, {
2307
+ /* @__PURE__ */ b(d, {
2250
2308
  variant: "text",
2251
2309
  size: "sm",
2252
- leadingIcon: Xt,
2253
- disabled: !jc.canUndo,
2254
- onClick: Fc,
2310
+ leadingIcon: en,
2311
+ disabled: !Jc.canUndo,
2312
+ onClick: Qc,
2255
2313
  children: O.undo
2256
2314
  }),
2257
- /* @__PURE__ */ b(u, {
2315
+ /* @__PURE__ */ b(d, {
2258
2316
  variant: "text",
2259
2317
  size: "sm",
2260
- leadingIcon: Gt,
2261
- disabled: !jc.canRedo,
2262
- onClick: Ic,
2318
+ leadingIcon: Yt,
2319
+ disabled: !Jc.canRedo,
2320
+ onClick: $c,
2263
2321
  children: O.redo
2264
2322
  }),
2265
- /* @__PURE__ */ b(u, {
2323
+ /* @__PURE__ */ b(d, {
2266
2324
  variant: "outline",
2267
2325
  size: "sm",
2268
- disabled: !Lc,
2269
- onClick: Bc,
2326
+ disabled: !el,
2327
+ onClick: rl,
2270
2328
  children: O.discardChanges
2271
2329
  }),
2272
- /* @__PURE__ */ b(u, {
2330
+ /* @__PURE__ */ b(d, {
2273
2331
  size: "sm",
2274
- disabled: !Lc,
2275
- onClick: zc,
2332
+ disabled: !el,
2333
+ onClick: nl,
2276
2334
  children: O.saveChanges
2277
2335
  })
2278
2336
  ]
@@ -2280,54 +2338,54 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2280
2338
  /* @__PURE__ */ b("p", {
2281
2339
  role: "status",
2282
2340
  className: V.status(),
2283
- children: Ko || (s ? aa ? "" : ge(Vi, E, D) : hs ? O.results(L.getFilteredRowModel().rows.length) : "")
2341
+ children: ss || (l ? _a ? "" : ye($i, E, D) : As ? O.results(L.getFilteredRowModel().rows.length) : "")
2284
2342
  }),
2285
- Eo && Wt === "top" && yd,
2343
+ Ro && bt === "top" && Id,
2286
2344
  /* @__PURE__ */ b("div", {
2287
- ref: Ou,
2345
+ ref: Gu,
2288
2346
  className: V.scroll(),
2289
- style: hi ? { maxHeight: hi } : void 0,
2290
- onScroll: Iu,
2347
+ style: bi === "fill" ? xi ? { minHeight: xi } : void 0 : bi ? { maxHeight: bi } : void 0,
2348
+ onScroll: $u,
2291
2349
  children: /* @__PURE__ */ x("table", {
2292
2350
  ref: $,
2293
- className: V.table({ class: Mo ? V.fixedLayout() : void 0 }),
2294
- style: Mo ? { minWidth: L.getTotalSize() + Fo + Io } : void 0,
2295
- "aria-busy": oa || void 0,
2296
- "aria-rowcount": B ? Y.length + Vo.length : void 0,
2297
- role: z ? To ? "treegrid" : "grid" : void 0,
2298
- "aria-multiselectable": z && (pn && Ts || w) ? "true" : void 0,
2351
+ className: V.table({ class: Ko ? V.fixedLayout() : void 0 }),
2352
+ style: Ko ? { minWidth: L.getTotalSize() + Yo + Xo } : void 0,
2353
+ "aria-busy": va || void 0,
2354
+ "aria-rowcount": B ? Y.length + ts.length : void 0,
2355
+ role: z ? Lo ? "treegrid" : "grid" : void 0,
2356
+ "aria-multiselectable": z && (hn && Vs || w) ? "true" : void 0,
2299
2357
  tabIndex: (w || T === "batch") && !z ? -1 : void 0,
2300
- onKeyDown: Uu,
2301
- onFocus: Hu,
2358
+ onKeyDown: od,
2359
+ onFocus: ad,
2302
2360
  children: [
2303
2361
  /* @__PURE__ */ b("caption", {
2304
2362
  className: V.caption(),
2305
- children: we
2363
+ children: Ce
2306
2364
  }),
2307
2365
  /* @__PURE__ */ x("thead", {
2308
- ref: Lu,
2366
+ ref: ed,
2309
2367
  className: V.head(),
2310
- children: [Vo.map((e, t) => /* @__PURE__ */ x("tr", {
2368
+ children: [ts.map((e, t) => /* @__PURE__ */ x("tr", {
2311
2369
  className: V.headRow(),
2312
2370
  children: [
2313
2371
  t === 0 && H.map((e) => /* @__PURE__ */ b("th", {
2314
2372
  scope: "col",
2315
- rowSpan: Vo.length,
2373
+ rowSpan: ts.length,
2316
2374
  className: V.th({ class: G(e, !0) }),
2317
2375
  style: K(e),
2318
- children: e === "select" && Ts ? /* @__PURE__ */ b(f, {
2319
- checked: ks,
2320
- "aria-label": An ?? (xn === "all" ? O.selectAllRows : O.selectAll),
2321
- onCheckedChange: (e) => As(e === !0)
2376
+ children: e === "select" && Vs ? /* @__PURE__ */ b(ae, {
2377
+ checked: Gs,
2378
+ "aria-label": Mn ?? (Cn === "all" ? O.selectAllRows : O.selectAll),
2379
+ onCheckedChange: (e) => Ks(e === !0)
2322
2380
  }) : e === "select" ? /* @__PURE__ */ b("span", {
2323
2381
  className: V.srOnly(),
2324
2382
  children: O.select
2325
2383
  }) : e === "expand" ? /* @__PURE__ */ b("button", {
2326
2384
  type: "button",
2327
2385
  className: V.expander(),
2328
- "aria-label": Ws ? O.collapseAll : O.expandAll,
2329
- onClick: () => L.toggleAllRowsExpanded(!Ws),
2330
- children: b(Ws ? Mt : Nt, {
2386
+ "aria-label": sc ? O.collapseAll : O.expandAll,
2387
+ onClick: () => L.toggleAllRowsExpanded(!sc),
2388
+ children: b(sc ? It : Lt, {
2331
2389
  className: V.expanderIcon(),
2332
2390
  "aria-hidden": "true"
2333
2391
  })
@@ -2345,43 +2403,43 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2345
2403
  className: V.th({ class: V.groupTh() }),
2346
2404
  children: q(t)
2347
2405
  }, e.header.id);
2348
- let r = t.getIsSorted(), i = Go(t.id);
2406
+ let r = t.getIsSorted(), i = os(t.id);
2349
2407
  return /* @__PURE__ */ x("th", {
2350
- id: ou ? su(t.id) : void 0,
2408
+ id: Cu ? wu(t.id) : void 0,
2351
2409
  scope: "col",
2352
2410
  rowSpan: e.rowSpan > 1 ? e.rowSpan : void 0,
2353
- className: Do(t.id).th({ class: [
2354
- Lo(t.id, !0),
2355
- jr ? V.dropTargetColumn() : "",
2411
+ className: Bo(t.id).th({ class: [
2412
+ Zo(t.id, !0),
2413
+ Ir ? V.dropTargetColumn() : "",
2356
2414
  j.get(t.id)?.headerClass
2357
2415
  ] }),
2358
- style: Ro(t.id, !0),
2359
- "aria-sort": Wo(t.id),
2360
- draggable: Zo(t.id) && !t.getIsPinned() ? "true" : void 0,
2361
- "data-drop": ls(t.id),
2362
- "data-dragging": ts === t.id || void 0,
2363
- onDragStart: (e) => as(t.id, e),
2364
- onDragOver: (e) => os(t.id, e),
2365
- onDragLeave: () => is(null),
2366
- onDrop: cs,
2367
- onDragEnd: ss,
2416
+ style: Qo(t.id, !0),
2417
+ "aria-sort": as(t.id),
2418
+ draggable: fs(t.id) && !t.getIsPinned() ? "true" : void 0,
2419
+ "data-drop": ws(t.id),
2420
+ "data-dragging": gs === t.id || void 0,
2421
+ onDragStart: (e) => bs(t.id, e),
2422
+ onDragOver: (e) => xs(t.id, e),
2423
+ onDragLeave: () => ys(null),
2424
+ onDrop: Cs,
2425
+ onDragEnd: Ss,
2368
2426
  children: [/* @__PURE__ */ x("div", {
2369
- className: Do(t.id).headContent(),
2427
+ className: Bo(t.id).headContent(),
2370
2428
  children: [
2371
- Uo(t.id) ? /* @__PURE__ */ x("button", {
2429
+ rs(t.id) ? /* @__PURE__ */ x("button", {
2372
2430
  type: "button",
2373
2431
  className: V.sortButton(),
2374
- onClick: (e) => fo(Xe(N, t.id, un === "multiple" && e.shiftKey)),
2432
+ onClick: (e) => wo($e(N, t.id, dn === "multiple" && e.shiftKey)),
2375
2433
  children: [
2376
2434
  /* @__PURE__ */ b("span", {
2377
- className: Ho(t),
2435
+ className: ns(t),
2378
2436
  children: q(t)
2379
2437
  }),
2380
- b(r === "asc" ? Et : r === "desc" ? Tt : Dt, {
2438
+ b(r === "asc" ? At : r === "desc" ? kt : jt, {
2381
2439
  className: V.sortIcon(),
2382
2440
  "aria-hidden": "true"
2383
2441
  }),
2384
- N.length > 1 && i > 0 && /* @__PURE__ */ x(an, { children: [/* @__PURE__ */ b("span", {
2442
+ N.length > 1 && i > 0 && /* @__PURE__ */ x(ln, { children: [/* @__PURE__ */ b("span", {
2385
2443
  className: V.sortBadge(),
2386
2444
  "aria-hidden": "true",
2387
2445
  children: i
@@ -2391,59 +2449,59 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2391
2449
  })] })
2392
2450
  ]
2393
2451
  }) : /* @__PURE__ */ b("span", {
2394
- className: Ho(t),
2452
+ className: ns(t),
2395
2453
  children: q(t)
2396
2454
  }),
2397
- ms && n && fs(n) && /* @__PURE__ */ b(Fn, {
2455
+ ks && n && Ds(n) && /* @__PURE__ */ b(Kn, {
2398
2456
  header: q(t),
2399
2457
  type: n.filter ?? "text",
2400
- value: gs(t.id),
2401
- onChange: (e) => ys(t.id, e),
2402
- options: _s(n),
2458
+ value: js(t.id),
2459
+ onChange: (e) => Ps(t.id, e),
2460
+ options: Ms(n),
2403
2461
  inputProps: n.filterInputProps,
2404
2462
  renderOption: n.renderOption,
2405
2463
  matchModes: n.matchModes,
2406
- maxConstraints: Tr,
2464
+ maxConstraints: Ar,
2407
2465
  renderValue: n.renderFilter ? (e) => n.renderFilter({
2408
2466
  ...e,
2409
2467
  column: n
2410
2468
  }) : void 0
2411
2469
  }),
2412
- Xo && /* @__PURE__ */ b(l, {
2413
- items: Qo(t),
2414
- onSelect: (e) => es(t, e),
2470
+ ds && /* @__PURE__ */ b(u, {
2471
+ items: ps(t),
2472
+ onSelect: (e) => hs(t, e),
2415
2473
  children: /* @__PURE__ */ b("button", {
2416
2474
  type: "button",
2417
2475
  className: V.headButton(),
2418
2476
  "data-column-menu": t.id,
2419
2477
  "aria-label": O.columnMenu(q(t)),
2420
- children: /* @__PURE__ */ b(It, {
2478
+ children: /* @__PURE__ */ b(Bt, {
2421
2479
  className: V.headButtonIcon(),
2422
2480
  "aria-hidden": "true"
2423
2481
  })
2424
2482
  })
2425
2483
  })
2426
2484
  ]
2427
- }), Er && /* @__PURE__ */ b("div", {
2485
+ }), jr && /* @__PURE__ */ b("div", {
2428
2486
  role: "separator",
2429
2487
  "aria-orientation": "vertical",
2430
2488
  "aria-label": O.resize(q(t)),
2431
2489
  "aria-valuenow": t.getSize(),
2432
- "aria-valuemin": Kn,
2490
+ "aria-valuemin": rr,
2433
2491
  "aria-valuemax": 1200,
2434
2492
  tabIndex: 0,
2435
- className: V.resizer(),
2493
+ className: V.resizer({ edge: Wo(t.id) }),
2436
2494
  "data-resizing": t.getIsResizing() || void 0,
2437
2495
  onMouseDown: e.header.getResizeHandler(),
2438
2496
  onTouchStart: e.header.getResizeHandler(),
2439
- onKeyDown: (e) => ds(t.id, e),
2440
- onDoubleClick: (e) => us(t.id, e)
2497
+ onKeyDown: (e) => Es(t.id, e),
2498
+ onDoubleClick: (e) => Ts(t.id, e)
2441
2499
  })]
2442
2500
  }, e.header.id);
2443
2501
  }),
2444
2502
  t === 0 && U.length > 0 && /* @__PURE__ */ b("th", {
2445
2503
  scope: "col",
2446
- rowSpan: Vo.length,
2504
+ rowSpan: ts.length,
2447
2505
  className: V.th({ class: G("actions", !0) }),
2448
2506
  style: K("actions"),
2449
2507
  children: /* @__PURE__ */ b("span", {
@@ -2452,7 +2510,7 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2452
2510
  })
2453
2511
  })
2454
2512
  ]
2455
- }, t)), ps && /* @__PURE__ */ x("tr", {
2513
+ }, t)), Os && /* @__PURE__ */ x("tr", {
2456
2514
  className: V.filterRow(),
2457
2515
  children: [
2458
2516
  H.map((e) => /* @__PURE__ */ b("td", {
@@ -2462,31 +2520,39 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2462
2520
  W.map((e) => {
2463
2521
  let t = j.get(e.id);
2464
2522
  return /* @__PURE__ */ b("td", {
2465
- className: Do(e.id).filterCell({ class: Lo(e.id, !0) }),
2466
- style: Ro(e.id, !0),
2467
- children: t && fs(t) ? t.renderFilter ? t.renderFilter({
2468
- value: vs(t),
2469
- setValue: (e) => Ss(t, e),
2523
+ className: Bo(e.id).filterCell({ class: Zo(e.id, !0) }),
2524
+ style: Qo(e.id, !0),
2525
+ children: t && Ds(t) ? t.renderFilter ? t.renderFilter({
2526
+ value: Ns(t),
2527
+ setValue: (e) => Ls(t, e),
2470
2528
  column: t
2471
- }) : Ie(bs(t)) ? /* @__PURE__ */ b("div", {
2529
+ }) : ze(Fs(t)) && Rs(t) ? /* @__PURE__ */ b(Gn, {
2530
+ range: !0,
2531
+ type: Is(t),
2532
+ label: O.filter(q(e)),
2533
+ inputProps: t.filterInputProps,
2534
+ value: Ns(t),
2535
+ onChange: (e) => Ls(t, e)
2536
+ }) : ze(Fs(t)) ? /* @__PURE__ */ b("div", {
2472
2537
  className: V.filterRowRange(),
2473
- children: [0, 1].map((n) => /* @__PURE__ */ b(Pn, {
2474
- type: xs(t),
2538
+ children: [0, 1].map((n) => /* @__PURE__ */ b(Gn, {
2539
+ type: Is(t),
2475
2540
  label: `${O.filter(q(e))}, ${n ? O.to : O.from}`,
2476
- options: _s(t),
2541
+ options: Ms(t),
2477
2542
  inputProps: t.filterInputProps,
2478
- value: Cs(t, n),
2479
- onChange: (e) => ws(t, n, e)
2543
+ value: zs(t, n),
2544
+ onChange: (e) => Bs(t, n, e)
2480
2545
  }, n))
2481
- }) : /* @__PURE__ */ b(Pn, {
2482
- type: xs(t),
2546
+ }) : /* @__PURE__ */ b(Gn, {
2547
+ type: Is(t),
2483
2548
  label: O.filter(q(e)),
2484
- options: _s(t),
2549
+ options: Ms(t),
2485
2550
  inputProps: t.filterInputProps,
2486
2551
  renderOption: t.renderOption,
2487
2552
  any: !0,
2488
- value: vs(t),
2489
- onChange: (e) => Ss(t, e)
2553
+ filter: !0,
2554
+ value: Ns(t),
2555
+ onChange: (e) => Ls(t, e)
2490
2556
  }) : null
2491
2557
  }, e.id);
2492
2558
  }),
@@ -2497,14 +2563,15 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2497
2563
  ]
2498
2564
  })]
2499
2565
  }),
2500
- Bs.length > 0 && /* @__PURE__ */ b("tbody", {
2566
+ nc.length > 0 && /* @__PURE__ */ b("tbody", {
2501
2567
  className: V.frozenBody(),
2502
- style: hi ? { top: Ru } : void 0,
2503
- children: Bs.map((e) => /* @__PURE__ */ x("tr", {
2504
- className: V.row({ class: Jr?.(e.original) }),
2505
- "data-state": Ds(e) ? "selected" : void 0,
2506
- "aria-selected": z && pn ? Ds(e) : void 0,
2568
+ style: bi ? { top: td } : void 0,
2569
+ children: nc.map((e, t) => /* @__PURE__ */ x("tr", {
2570
+ className: V.row({ class: $r?.(e.original) }),
2571
+ "data-state": Us(e) ? "selected" : void 0,
2572
+ "aria-selected": z && hn ? Us(e) : void 0,
2507
2573
  "data-row-id": e.id,
2574
+ "data-stripe": Wi ? String(t % 2 == 1) : void 0,
2508
2575
  children: [
2509
2576
  H.map((e) => /* @__PURE__ */ b("td", {
2510
2577
  className: V.td({ class: G(e, !1) }),
@@ -2513,11 +2580,11 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2513
2580
  e.getVisibleCells().map((t) => {
2514
2581
  let n = j.get(t.column.id);
2515
2582
  return /* @__PURE__ */ b("td", {
2516
- className: Do(t.column.id).td({ class: [Lo(t.column.id, !1), Oo(t.column.id, e)] }),
2517
- style: Ro(t.column.id, !1),
2518
- children: n?.editable && (Ao || Uc === e.id) ? Sd(e, t.column, kc(e, t.column.id)) : n?.copyable ? /* @__PURE__ */ x("span", {
2583
+ className: Bo(t.column.id).td({ class: [Zo(t.column.id, !1), Vo(t.column.id, e)] }),
2584
+ style: Qo(t.column.id, !1),
2585
+ children: n?.editable && (Uo || ol === e.id) ? zd(e, t.column, Kc(e, t.column.id)) : n?.copyable ? /* @__PURE__ */ x("span", {
2519
2586
  className: V.copyCell(),
2520
- children: [n.cell ? n.cell(e.original, t.getValue()) : M(n, t.getValue(), e.original), /* @__PURE__ */ b(ie, {
2587
+ children: [n.cell ? n.cell(e.original, t.getValue()) : M(n, t.getValue(), e.original), /* @__PURE__ */ b(m, {
2521
2588
  value: M(n, t.getValue(), e.original),
2522
2589
  label: O.copy(q(t.column), M(n, t.getValue(), e.original))
2523
2590
  })]
@@ -2527,21 +2594,21 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2527
2594
  U.length > 0 && /* @__PURE__ */ b("td", {
2528
2595
  className: V.td({ class: G("actions", !1) }),
2529
2596
  style: K("actions"),
2530
- children: T === "row" && ko && /* @__PURE__ */ b("div", {
2597
+ children: T === "row" && Ho && /* @__PURE__ */ b("div", {
2531
2598
  className: V.editActions(),
2532
- children: xd(e, zi(e.original, e.index))
2599
+ children: Rd(e, Zi(e.original, e.index))
2533
2600
  })
2534
2601
  })
2535
2602
  ]
2536
2603
  }, e.id))
2537
2604
  }),
2538
- qr && Gr ? /* @__PURE__ */ b(c, {
2539
- items: $s ? Qs($s) : [],
2540
- label: $s ? O.rowActions(zi($s.original, $s.index)) : void 0,
2541
- onSelect: (e) => nc($s, e),
2542
- children: Cd
2543
- }) : Cd,
2544
- qs && /* @__PURE__ */ b("tfoot", {
2605
+ Qr && Xr ? /* @__PURE__ */ b(te, {
2606
+ items: gc ? hc(gc) : [],
2607
+ label: gc ? O.rowActions(Zi(gc.original, gc.index)) : void 0,
2608
+ onSelect: (e) => yc(gc, e),
2609
+ children: Bd
2610
+ }) : Bd,
2611
+ uc && /* @__PURE__ */ b("tfoot", {
2545
2612
  className: V.foot(),
2546
2613
  children: /* @__PURE__ */ x("tr", { children: [
2547
2614
  H.map((e) => /* @__PURE__ */ b("td", {
@@ -2549,9 +2616,9 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2549
2616
  style: K(e)
2550
2617
  }, e)),
2551
2618
  W.map((e) => /* @__PURE__ */ b("td", {
2552
- className: Do(e.id).footCell({ class: [Lo(e.id, !1), Oo(e.id)] }),
2553
- style: Ro(e.id, !1),
2554
- children: Zs(j.get(e.id))
2619
+ className: Bo(e.id).footCell({ class: [Zo(e.id, !1), Vo(e.id)] }),
2620
+ style: Qo(e.id, !1),
2621
+ children: mc(j.get(e.id))
2555
2622
  }, e.id)),
2556
2623
  U.length > 0 && /* @__PURE__ */ b("td", {
2557
2624
  className: V.footCell({ class: G("actions", !1) }),
@@ -2562,25 +2629,25 @@ function tr({ classes: a, data: o, dataSource: s, cacheTime: ee = 0, searchDebou
2562
2629
  ]
2563
2630
  })
2564
2631
  }),
2565
- Qr && /* @__PURE__ */ x("div", {
2632
+ ri && /* @__PURE__ */ x("div", {
2566
2633
  className: V.statusBar(),
2567
2634
  children: [
2568
- /* @__PURE__ */ b("span", { children: O.rowCount(ld) }),
2569
- hs && /* @__PURE__ */ b("span", { children: O.filteredCount(L.getFilteredRowModel().rows.length) }),
2570
- pn && /* @__PURE__ */ b("span", { children: E.common.selectedCount(Os) }),
2571
- cd.map((e) => /* @__PURE__ */ b("span", { children: e.text }, e.id))
2635
+ /* @__PURE__ */ b("span", { children: O.rowCount(Ed) }),
2636
+ As && /* @__PURE__ */ b("span", { children: O.filteredCount(L.getFilteredRowModel().rows.length) }),
2637
+ hn && /* @__PURE__ */ b("span", { children: E.common.selectedCount(Ws) }),
2638
+ Td.map((e) => /* @__PURE__ */ b("span", { children: e.text }, e.id))
2572
2639
  ]
2573
2640
  }),
2574
- Eo && Wt === "bottom" && yd
2641
+ Ro && bt === "bottom" && Id
2575
2642
  ]
2576
2643
  });
2577
- return /* @__PURE__ */ b(Nn.Provider, {
2578
- value: Ri,
2579
- children: R ? cn(wd, document.body) : /* @__PURE__ */ b(Qt, { children: wd })
2644
+ return /* @__PURE__ */ b(Wn.Provider, {
2645
+ value: Xi,
2646
+ children: R ? fn(Vd, document.body) : /* @__PURE__ */ b(nn, { children: Vd })
2580
2647
  });
2581
2648
  }
2582
2649
  //#endregion
2583
2650
  //#region src/data-table/inputs.ts
2584
- var nr = { dateInput: a }, rr = { numberInput: o };
2651
+ var mr = { dateInput: o }, hr = { numberInput: ee }, gr = { dateRangeInput: l };
2585
2652
  //#endregion
2586
- export { tr as DataTable, fe as createDataController, _e as dataSourceToRows, nr as dateInput, be as defineMatchMode, Je as moveItem, Ye as moveTreeRow, rr as numberInput, ft as rowsToDataSource };
2653
+ export { pr as DataTable, he as createDataController, be as dataSourceToRows, mr as dateInput, gr as dateRangeInput, Ce as defineMatchMode, Ze as moveItem, Qe as moveTreeRow, hr as numberInput, ht as rowsToDataSource };