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