@gears-frontx/ui-kit 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/data-grid.DYrZEU-F.css +1 -0
- package/dist/chunks/debounce.js +17 -0
- package/dist/chunks/debounce.js.map +1 -0
- package/dist/chunks/empty.Cfg5lE0n.css +1 -0
- package/dist/chunks/filters.DcFdZpNG.css +1 -0
- package/dist/chunks/hooked.js +52 -0
- package/dist/chunks/hooked.js.map +1 -0
- package/dist/chunks/messages.js +18 -3
- package/dist/chunks/messages.js.map +1 -1
- package/dist/chunks/pagination.DPVITj_D.css +1 -0
- package/dist/components/data-grid/components/filter-chip.d.ts +21 -0
- package/dist/components/data-grid/components/filter-chip.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-control-area.d.ts +9 -0
- package/dist/components/data-grid/components/filter-control-area.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-options-search-input.d.ts +11 -0
- package/dist/components/data-grid/components/filter-options-search-input.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-popover-content.d.ts +8 -0
- package/dist/components/data-grid/components/filter-popover-content.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-reset-button.d.ts +8 -0
- package/dist/components/data-grid/components/filter-reset-button.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-scrollable-wrapper.d.ts +8 -0
- package/dist/components/data-grid/components/filter-scrollable-wrapper.d.ts.map +1 -0
- package/dist/components/data-grid/messages.d.ts +15 -0
- package/dist/components/data-grid/messages.d.ts.map +1 -1
- package/dist/components/data-grid/plugins/filters/components/adaptive-popover.d.ts +20 -0
- package/dist/components/data-grid/plugins/filters/components/adaptive-popover.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/all-filters-button.d.ts +3 -0
- package/dist/components/data-grid/plugins/filters/components/all-filters-button.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/all-filters-dialog.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/components/all-filters-dialog.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/dialog-filter-item.d.ts +9 -0
- package/dist/components/data-grid/plugins/filters/components/dialog-filter-item.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/filter-label.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/components/filter-label.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/filter-popover.d.ts +9 -0
- package/dist/components/data-grid/plugins/filters/components/filter-popover.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/filter-single.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/components/filter-single.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/filters-bar.d.ts +3 -0
- package/dist/components/data-grid/plugins/filters/components/filters-bar.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-dialog-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-dialog-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-list.d.ts +12 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-list.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/filter-checkbox-group.d.ts +20 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/filter-checkbox-group.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-calendar.d.ts +17 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-calendar.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-dialog-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-dialog-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-selection.d.ts +16 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-selection.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-value.d.ts +19 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-value.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/filter-date-range.d.ts +16 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/filter-date-range.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/entities.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/entities.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/search/filter-search.d.ts +10 -0
- package/dist/components/data-grid/plugins/filters/entities/search/filter-search.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/search/search-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/search/search-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/filter-tag-group.d.ts +14 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/filter-tag-group.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-dialog-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-dialog-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-list.d.ts +11 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-list.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/toggle/filter-toggle.d.ts +10 -0
- package/dist/components/data-grid/plugins/filters/entities/toggle/filter-toggle.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/toggle/toggle-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/toggle/toggle-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/filter-tree.d.ts +20 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/filter-tree.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/resolve-filter-tree-value.d.ts +8 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/resolve-filter-tree-value.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-dialog-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-dialog-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-list.d.ts +12 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-list.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-radio-select-plugin.d.ts +13 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-radio-select-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/use-tree-search.d.ts +8 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/use-tree-search.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/filters-plugin.d.ts +3 -0
- package/dist/components/data-grid/plugins/filters/filters-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/filters-types.d.ts +141 -0
- package/dist/components/data-grid/plugins/filters/filters-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/public.d.ts +11 -0
- package/dist/components/data-grid/plugins/filters/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/services/read-option-values.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/services/read-option-values.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/services/use-async-filter-search.d.ts +20 -0
- package/dist/components/data-grid/plugins/filters/services/use-async-filter-search.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/services/use-filter-search.d.ts +12 -0
- package/dist/components/data-grid/plugins/filters/services/use-filter-search.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-actions.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-actions.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-content.d.ts +3 -0
- package/dist/components/data-grid/tree/components/tree-content.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-layout-slot.d.ts +9 -0
- package/dist/components/data-grid/tree/components/tree-layout-slot.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-left-slot.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-left-slot.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-list-item.d.ts +10 -0
- package/dist/components/data-grid/tree/components/tree-list-item.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-main.d.ts +3 -0
- package/dist/components/data-grid/tree/components/tree-main.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-node-content.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-node-content.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-node-directory-item.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-node-directory-item.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-node-leaf.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-node-leaf.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-nodes.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-nodes.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-placeholder.d.ts +6 -0
- package/dist/components/data-grid/tree/components/tree-placeholder.d.ts.map +1 -0
- package/dist/components/data-grid/tree/create-tree.d.ts +5 -0
- package/dist/components/data-grid/tree/create-tree.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/core/tree-context.d.ts +21 -0
- package/dist/components/data-grid/tree/services/core/tree-context.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/focus/focus-service.d.ts +5 -0
- package/dist/components/data-grid/tree/services/focus/focus-service.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/focus/focus-types.d.ts +25 -0
- package/dist/components/data-grid/tree/services/focus/focus-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/focus/navigation-helpers.d.ts +27 -0
- package/dist/components/data-grid/tree/services/focus/navigation-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/hooked/hooked-types.d.ts +8 -0
- package/dist/components/data-grid/tree/services/hooked/hooked-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/hooked/hooked.d.ts +3 -0
- package/dist/components/data-grid/tree/services/hooked/hooked.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/internal/internal-helpers.d.ts +2 -0
- package/dist/components/data-grid/tree/services/internal/internal-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/layout/layout-service.d.ts +5 -0
- package/dist/components/data-grid/tree/services/layout/layout-service.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/layout/layout-types.d.ts +124 -0
- package/dist/components/data-grid/tree/services/layout/layout-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-helpers.d.ts +50 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-service.d.ts +5 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-service.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-types.d.ts +43 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/settings/settings-service.d.ts +5 -0
- package/dist/components/data-grid/tree/services/settings/settings-service.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/settings/settings-types.d.ts +73 -0
- package/dist/components/data-grid/tree/services/settings/settings-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/tree-types.d.ts +44 -0
- package/dist/components/data-grid/tree/tree-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/tree.d.ts +4 -0
- package/dist/components/data-grid/tree/tree.d.ts.map +1 -0
- package/dist/components/data-grid/tree-structure/tree-structure-types.d.ts +89 -0
- package/dist/components/data-grid/tree-structure/tree-structure-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree-structure/tree-structure.d.ts +19 -0
- package/dist/components/data-grid/tree-structure/tree-structure.d.ts.map +1 -0
- package/dist/components/data-grid/utils/components-stack.d.ts +12 -0
- package/dist/components/data-grid/utils/components-stack.d.ts.map +1 -0
- package/dist/components/data-grid/utils/use-is-tablet-up.d.ts +3 -0
- package/dist/components/data-grid/utils/use-is-tablet-up.d.ts.map +1 -0
- package/dist/data-grid/filters.d.ts +1 -0
- package/dist/data-grid/filters.js +1633 -0
- package/dist/data-grid/filters.js.map +1 -0
- package/dist/data-grid/pagination.js +41 -40
- package/dist/data-grid/pagination.js.map +1 -1
- package/dist/data-grid/text-search.js +55 -67
- package/dist/data-grid/text-search.js.map +1 -1
- package/dist/data-grid.js +578 -618
- package/dist/data-grid.js.map +1 -1
- package/dist/docs/data-grid.md +170 -4
- package/dist/empty.js +34 -34
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +392 -382
- package/dist/index.js.map +1 -1
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/dist/chunks/data-grid.DIkpRRaf.css +0 -1
- package/dist/chunks/empty.DWqLrSfF.css +0 -1
- package/dist/chunks/pagination.BAAl9D_S.css +0 -1
package/dist/data-grid.js
CHANGED
|
@@ -1,106 +1,107 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useEffect as A, useContext as Et, createContext as Lt, useRef as
|
|
4
|
-
import { b as
|
|
5
|
-
import { c as
|
|
2
|
+
import { jsx as u, jsxs as D, Fragment as G } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect as A, useContext as Et, createContext as Lt, useRef as K, useMemo as It, useState as Dt, Suspense as Gt } from "react";
|
|
4
|
+
import { b as O, u as F, i as U, D as Rt } from "./chunks/plugins-helpers.js";
|
|
5
|
+
import { c as jn, a as Kn } from "./chunks/plugins-helpers.js";
|
|
6
6
|
import { cx as N } from "class-variance-authority";
|
|
7
7
|
import { Spinner as Mt } from "./spinner.js";
|
|
8
|
-
import { SearchXIcon as
|
|
8
|
+
import { SearchXIcon as Ot, OctagonAlertIcon as Ht, TablePropertiesIcon as At } from "lucide-react";
|
|
9
9
|
import { m as V } from "./chunks/messages.js";
|
|
10
10
|
import { Empty as dt, EmptyHeader as ut, EmptyMedia as ft, EmptyTitle as pt, EmptyDescription as St } from "./empty.js";
|
|
11
11
|
import { create as z } from "zustand";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { c as Wt, i as R, u as Nt } from "./chunks/hooked.js";
|
|
13
|
+
import { S as Vt } from "./chunks/segment.js";
|
|
14
|
+
import { ToggleGroupItem as zt } from "./toggle-group.js";
|
|
14
15
|
import { useShallow as Y } from "zustand/react/shallow";
|
|
15
|
-
import { TableHead as mt, TableCell as
|
|
16
|
-
import './chunks/data-grid.
|
|
17
|
-
delayed:
|
|
16
|
+
import { TableHead as mt, TableCell as Pt, TableRow as J, TableBody as Tt, TableHeader as $t, Table as Ft } from "./table.js";
|
|
17
|
+
import './chunks/data-grid.DYrZEU-F.css';const Bt = "_delayed_1ys81_5", jt = {
|
|
18
|
+
delayed: Bt
|
|
18
19
|
};
|
|
19
20
|
function X({ className: t }) {
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ u("span", { className: N(jt.delayed, t), children: /* @__PURE__ */ u(Mt, { size: "lg" }) });
|
|
21
22
|
}
|
|
22
|
-
const
|
|
23
|
-
root:
|
|
23
|
+
const Kt = "_root_9f4nk_13", Ut = {
|
|
24
|
+
root: Kt
|
|
24
25
|
};
|
|
25
|
-
function
|
|
26
|
-
const t =
|
|
26
|
+
function Jt() {
|
|
27
|
+
const t = O(), e = t.load.useLoadStateStore((o) => o.recordsLoadState), n = t.core.useExternalLoadingStore((o) => o.loading);
|
|
27
28
|
return e === "loading" || n;
|
|
28
29
|
}
|
|
29
|
-
const
|
|
30
|
-
loaderOverlay:
|
|
30
|
+
const Yt = "_loaderOverlay_3znr7_29", Xt = {
|
|
31
|
+
loaderOverlay: Yt
|
|
31
32
|
};
|
|
32
|
-
function
|
|
33
|
-
const n =
|
|
34
|
-
return /* @__PURE__ */ D("div", { className:
|
|
33
|
+
function qt({ children: t }) {
|
|
34
|
+
const n = O().core.useLoadStateStore((f) => f.loadState), r = Jt() && n === "loaded", s = r || n === "loading";
|
|
35
|
+
return /* @__PURE__ */ D("div", { className: Ut.root, "aria-busy": s ? "true" : void 0, children: [
|
|
35
36
|
t,
|
|
36
|
-
r && /* @__PURE__ */
|
|
37
|
+
r && /* @__PURE__ */ u("div", { className: Xt.loaderOverlay, children: /* @__PURE__ */ u(X, {}) })
|
|
37
38
|
] });
|
|
38
39
|
}
|
|
39
|
-
const
|
|
40
|
-
emptyState:
|
|
40
|
+
const Qt = "_emptyState_1tt1k_3", Zt = {
|
|
41
|
+
emptyState: Qt
|
|
41
42
|
};
|
|
42
|
-
function
|
|
43
|
-
const { useStore: t } =
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
e && /* @__PURE__ */
|
|
43
|
+
function te() {
|
|
44
|
+
const { useStore: t } = F(), e = t((n) => n.hasActiveFilters);
|
|
45
|
+
return /* @__PURE__ */ u(dt, { className: Zt.emptyState, children: /* @__PURE__ */ D(ut, { children: [
|
|
46
|
+
/* @__PURE__ */ u(ft, { variant: "icon", children: /* @__PURE__ */ u(Ot, {}) }),
|
|
47
|
+
/* @__PURE__ */ u(pt, { children: V.emptyState.noResultsFound }),
|
|
48
|
+
e && /* @__PURE__ */ u(St, { children: V.emptyState.noResultsFoundDescription })
|
|
48
49
|
] }) });
|
|
49
50
|
}
|
|
50
|
-
const
|
|
51
|
-
dataGridLayoutMain:
|
|
51
|
+
const ee = "_dataGridLayoutMain_ta8be_5", ne = {
|
|
52
|
+
dataGridLayoutMain: ee
|
|
52
53
|
};
|
|
53
|
-
function
|
|
54
|
-
const { useStore: t } =
|
|
55
|
-
return /* @__PURE__ */ D("div", { className:
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
function oe() {
|
|
55
|
+
const { useStore: t } = F(), e = O(), n = t((m) => m.visibleRecords), o = t((m) => m.hasActiveFilters), r = e.layout.useLayoutStore((m) => m.activeSlotIds.get("main")), s = e.layout.useLayoutStore((m) => m.slots.get("main")), f = s == null ? void 0 : s.find((m) => m.id === r), g = e.layout.useLayoutStore((m) => m.slots.get("empty")), c = g == null ? void 0 : g[0], p = n.length === 0, l = f && (!p || o), d = p;
|
|
56
|
+
return /* @__PURE__ */ D("div", { className: ne.dataGridLayoutMain, children: [
|
|
57
|
+
l && /* @__PURE__ */ u(f.component, {}),
|
|
58
|
+
d && (c ? /* @__PURE__ */ u(c.component, {}) : /* @__PURE__ */ u(te, {}))
|
|
58
59
|
] });
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
-
const n =
|
|
62
|
-
return !n || n.length === 0 ? null : /* @__PURE__ */
|
|
61
|
+
function re({ name: t }) {
|
|
62
|
+
const n = O().layout.useLayoutStore((o) => o.slots.get(t));
|
|
63
|
+
return !n || n.length === 0 ? null : /* @__PURE__ */ u(G, { children: n.map((o) => /* @__PURE__ */ u(o.component, {}, o.id)) });
|
|
63
64
|
}
|
|
64
|
-
const
|
|
65
|
-
dataGridTopDefault:
|
|
66
|
-
topStartSlots:
|
|
67
|
-
topStartSlot:
|
|
68
|
-
topEndSlot:
|
|
69
|
-
topEndSlots:
|
|
65
|
+
const ie = "_dataGridTopDefault_5t4tt_1", se = "_topStartSlots_5t4tt_16", ae = "_topStartSlot_5t4tt_16", ce = "_topEndSlot_5t4tt_32", le = "_topEndSlots_5t4tt_36", P = {
|
|
66
|
+
dataGridTopDefault: ie,
|
|
67
|
+
topStartSlots: se,
|
|
68
|
+
topStartSlot: ae,
|
|
69
|
+
topEndSlot: ce,
|
|
70
|
+
topEndSlots: le
|
|
70
71
|
};
|
|
71
|
-
function
|
|
72
|
-
const t =
|
|
72
|
+
function de() {
|
|
73
|
+
const t = O(), e = t.layout.useLayoutStore(
|
|
73
74
|
(s) => s.slots.get("top-start")
|
|
74
75
|
), n = t.layout.useLayoutStore((s) => s.slots.get("top-end")), o = ((e == null ? void 0 : e.length) ?? 0) > 0, r = ((n == null ? void 0 : n.length) ?? 0) > 0;
|
|
75
76
|
return !o && !r ? null : /* @__PURE__ */ D("div", { className: P.dataGridTopDefault, children: [
|
|
76
|
-
o && /* @__PURE__ */
|
|
77
|
-
r && /* @__PURE__ */
|
|
77
|
+
o && /* @__PURE__ */ u("div", { className: P.topStartSlots, children: e == null ? void 0 : e.map((s) => /* @__PURE__ */ u("div", { className: P.topStartSlot, children: /* @__PURE__ */ u(s.component, {}) }, s.id)) }),
|
|
78
|
+
r && /* @__PURE__ */ u("div", { className: P.topEndSlots, children: n == null ? void 0 : n.map((s) => /* @__PURE__ */ u("div", { className: P.topEndSlot, children: /* @__PURE__ */ u(s.component, {}) }, s.id)) })
|
|
78
79
|
] });
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
-
const t =
|
|
81
|
+
function ue() {
|
|
82
|
+
const t = O(), e = t.layout.useLayoutStore((s) => s.activeSlotIds.get("top")), n = t.layout.useLayoutStore((s) => s.slots.get("top")), o = n == null ? void 0 : n.find((s) => s.id === e);
|
|
82
83
|
if (!o) return null;
|
|
83
|
-
const r = o.id === "default" ?
|
|
84
|
-
return /* @__PURE__ */
|
|
84
|
+
const r = o.id === "default" ? de : o.component;
|
|
85
|
+
return /* @__PURE__ */ u(r, {});
|
|
85
86
|
}
|
|
86
|
-
const
|
|
87
|
-
center:
|
|
87
|
+
const fe = "_center_s4klt_3", et = {
|
|
88
|
+
center: fe
|
|
88
89
|
};
|
|
89
|
-
function
|
|
90
|
-
return t === "loaded" ? /* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
] }) }) : /* @__PURE__ */
|
|
95
|
-
}
|
|
96
|
-
function
|
|
97
|
-
const t =
|
|
98
|
-
return A(() => (t.init().catch((
|
|
99
|
-
process.env.NODE_ENV !== "production" && console.error("[DataGrid] Initial load failed:",
|
|
100
|
-
}), () => t.destroy()), [t]), /* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
!s && /* @__PURE__ */
|
|
90
|
+
function pe({ loadState: t, children: e }) {
|
|
91
|
+
return t === "loaded" ? /* @__PURE__ */ u(G, { children: e }) : t === "error" ? /* @__PURE__ */ u(dt, { className: et.center, children: /* @__PURE__ */ D(ut, { children: [
|
|
92
|
+
/* @__PURE__ */ u(ft, { variant: "icon", children: /* @__PURE__ */ u(Ht, {}) }),
|
|
93
|
+
/* @__PURE__ */ u(pt, { children: V.loadError.headerDefault }),
|
|
94
|
+
/* @__PURE__ */ u(St, { children: V.loadError.bodyDefault })
|
|
95
|
+
] }) }) : /* @__PURE__ */ u(X, { className: et.center });
|
|
96
|
+
}
|
|
97
|
+
function Se() {
|
|
98
|
+
const t = F(), { useStore: e } = t, { core: n } = O(), o = e((f) => f.visibleRecords), r = n.useLoadStateStore((f) => f.loadState), s = o.length === 0;
|
|
99
|
+
return A(() => (t.init().catch((f) => {
|
|
100
|
+
process.env.NODE_ENV !== "production" && console.error("[DataGrid] Initial load failed:", f);
|
|
101
|
+
}), () => t.destroy()), [t]), /* @__PURE__ */ u(qt, { children: /* @__PURE__ */ D(pe, { loadState: r, children: [
|
|
102
|
+
/* @__PURE__ */ u(ue, {}),
|
|
103
|
+
/* @__PURE__ */ u(oe, {}),
|
|
104
|
+
!s && /* @__PURE__ */ u(re, { name: "bottom" })
|
|
104
105
|
] }) });
|
|
105
106
|
}
|
|
106
107
|
function ht() {
|
|
@@ -114,7 +115,7 @@ function ht() {
|
|
|
114
115
|
setLoaded: o,
|
|
115
116
|
setError: r,
|
|
116
117
|
setBlank: s,
|
|
117
|
-
reset:
|
|
118
|
+
reset: f,
|
|
118
119
|
loadPromise: g
|
|
119
120
|
};
|
|
120
121
|
function n() {
|
|
@@ -129,21 +130,21 @@ function ht() {
|
|
|
129
130
|
function s() {
|
|
130
131
|
t.setState({ loadState: "blank" });
|
|
131
132
|
}
|
|
132
|
-
function
|
|
133
|
+
function f() {
|
|
133
134
|
e += 1, s();
|
|
134
135
|
}
|
|
135
|
-
async function g(
|
|
136
|
-
const
|
|
136
|
+
async function g(c) {
|
|
137
|
+
const p = ++e;
|
|
137
138
|
n();
|
|
138
139
|
try {
|
|
139
|
-
const
|
|
140
|
-
return
|
|
141
|
-
} catch (
|
|
142
|
-
throw
|
|
140
|
+
const l = await c;
|
|
141
|
+
return p === e && o(), l;
|
|
142
|
+
} catch (l) {
|
|
143
|
+
throw p === e && r(), l;
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
+
function me() {
|
|
147
148
|
const { useLoadState: t, loadPromise: e, reset: n } = ht(), o = z()(() => ({
|
|
148
149
|
loading: !1
|
|
149
150
|
}));
|
|
@@ -158,40 +159,8 @@ function pe() {
|
|
|
158
159
|
o.setState({ loading: s });
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
|
-
function
|
|
162
|
-
const t =
|
|
163
|
-
return { hook: e, callHook: o, callHookParallel: r, callHookSync: s };
|
|
164
|
-
function e(l, g) {
|
|
165
|
-
if (!l || typeof g != "function")
|
|
166
|
-
return () => {
|
|
167
|
-
};
|
|
168
|
-
const a = g, f = t.get(l) ?? [];
|
|
169
|
-
return f.push(a), t.set(l, f), () => {
|
|
170
|
-
const d = t.get(l);
|
|
171
|
-
if (!d) return;
|
|
172
|
-
const u = d.indexOf(a);
|
|
173
|
-
u !== -1 && d.splice(u, 1), d.length === 0 && t.delete(l);
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
function n(l) {
|
|
177
|
-
return [...t.get(l) ?? []];
|
|
178
|
-
}
|
|
179
|
-
function o(l, ...g) {
|
|
180
|
-
const a = n(l).reduce((f, d) => {
|
|
181
|
-
const u = f[f.length - 1] ?? Promise.resolve();
|
|
182
|
-
return [...f, u.then(() => d(...g))];
|
|
183
|
-
}, []);
|
|
184
|
-
return Promise.all(a);
|
|
185
|
-
}
|
|
186
|
-
function r(l, ...g) {
|
|
187
|
-
return Promise.all(n(l).map((a) => a(...g)));
|
|
188
|
-
}
|
|
189
|
-
function s(l, ...g) {
|
|
190
|
-
return n(l).map((a) => a(...g));
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
function me() {
|
|
194
|
-
const t = Se();
|
|
162
|
+
function he() {
|
|
163
|
+
const t = Wt();
|
|
195
164
|
return {
|
|
196
165
|
hook: t.hook,
|
|
197
166
|
callHook: t.callHook,
|
|
@@ -199,21 +168,21 @@ function me() {
|
|
|
199
168
|
callHookSync: t.callHookSync
|
|
200
169
|
};
|
|
201
170
|
}
|
|
202
|
-
const q = "table_layout", yt = "cards_layout", nt = "view_selector",
|
|
171
|
+
const q = "table_layout", yt = "cards_layout", nt = "view_selector", ye = /* @__PURE__ */ new Map([
|
|
203
172
|
[q, V.layoutMainSlotSelector.table],
|
|
204
173
|
[yt, V.layoutMainSlotSelector.cards]
|
|
205
174
|
]);
|
|
206
|
-
function
|
|
207
|
-
const t =
|
|
175
|
+
function ge() {
|
|
176
|
+
const t = O(), e = t.layout.useLayoutStore((r) => r.slots.get("main")), n = t.layout.useLayoutStore((r) => r.activeSlotIds.get("main"));
|
|
208
177
|
if (!e || e.length < 2) return null;
|
|
209
|
-
return /* @__PURE__ */
|
|
178
|
+
return /* @__PURE__ */ u(Vt, { size: "sm", iconOnly: !0, value: n, onValueChange: o, children: e.map((r) => {
|
|
210
179
|
const s = "icon" in r ? r.icon : void 0;
|
|
211
|
-
return /* @__PURE__ */
|
|
212
|
-
|
|
180
|
+
return /* @__PURE__ */ u(
|
|
181
|
+
zt,
|
|
213
182
|
{
|
|
214
183
|
value: r.id,
|
|
215
|
-
"aria-label":
|
|
216
|
-
children: s ? /* @__PURE__ */
|
|
184
|
+
"aria-label": ye.get(r.id) ?? r.id,
|
|
185
|
+
children: s ? /* @__PURE__ */ u(s, {}) : null
|
|
217
186
|
},
|
|
218
187
|
r.id
|
|
219
188
|
);
|
|
@@ -222,64 +191,64 @@ function ye() {
|
|
|
222
191
|
r && t.layout.setActiveSlotId("main", r);
|
|
223
192
|
}
|
|
224
193
|
}
|
|
225
|
-
function
|
|
194
|
+
function Ce(t) {
|
|
226
195
|
const e = z()(() => ({
|
|
227
196
|
slots: /* @__PURE__ */ new Map(),
|
|
228
197
|
activeSlotIds: /* @__PURE__ */ new Map()
|
|
229
198
|
})), n = {
|
|
230
199
|
registerSlot: s,
|
|
231
|
-
setActiveSlotId:
|
|
200
|
+
setActiveSlotId: f,
|
|
232
201
|
getActiveSlotId: g
|
|
233
202
|
};
|
|
234
203
|
return t.plugins.registerPublicApi(n), {
|
|
235
204
|
...n,
|
|
236
205
|
useLayoutStore: e
|
|
237
206
|
};
|
|
238
|
-
function o(
|
|
239
|
-
return r(
|
|
207
|
+
function o(c, p) {
|
|
208
|
+
return r(c).find((l) => l.id === p);
|
|
240
209
|
}
|
|
241
|
-
function r(
|
|
242
|
-
return e.getState().slots.get(
|
|
210
|
+
function r(c) {
|
|
211
|
+
return e.getState().slots.get(c) ?? [];
|
|
243
212
|
}
|
|
244
|
-
function s(
|
|
245
|
-
(
|
|
213
|
+
function s(c, p) {
|
|
214
|
+
(c === "top-start" || c === "top-end") && !o("top", "default") && s("top", {
|
|
246
215
|
id: "default",
|
|
247
216
|
active: !0,
|
|
248
217
|
component: () => null
|
|
249
218
|
});
|
|
250
|
-
const
|
|
251
|
-
e.setState((
|
|
252
|
-
const h = new Map(
|
|
253
|
-
return h.set(
|
|
254
|
-
}), ("active" in
|
|
219
|
+
const l = p.id ?? Math.random().toString(), d = r(c), m = p.order ?? (d.length + 1) * 10, S = { id: l, name: c, ...p, order: m }, i = [...d, S].sort((a, h) => a.order - h.order);
|
|
220
|
+
e.setState((a) => {
|
|
221
|
+
const h = new Map(a.slots);
|
|
222
|
+
return h.set(c, i), { slots: h };
|
|
223
|
+
}), ("active" in p && p.active || i.length === 1) && f(c, S.id), c === "main" && i.length >= 2 && !o("top-end", nt) && s("top-end", {
|
|
255
224
|
id: nt,
|
|
256
|
-
component:
|
|
225
|
+
component: ge
|
|
257
226
|
});
|
|
258
227
|
}
|
|
259
|
-
function
|
|
260
|
-
e.setState((
|
|
261
|
-
const
|
|
262
|
-
return
|
|
228
|
+
function f(c, p) {
|
|
229
|
+
e.setState((l) => {
|
|
230
|
+
const d = new Map(l.activeSlotIds);
|
|
231
|
+
return d.set(c, p), { activeSlotIds: d };
|
|
263
232
|
});
|
|
264
233
|
}
|
|
265
|
-
function g(
|
|
266
|
-
return e.getState().activeSlotIds.get(
|
|
234
|
+
function g(c) {
|
|
235
|
+
return e.getState().activeSlotIds.get(c);
|
|
267
236
|
}
|
|
268
237
|
}
|
|
269
238
|
function $(t) {
|
|
270
239
|
return typeof t == "object" && t !== null;
|
|
271
240
|
}
|
|
272
|
-
function
|
|
241
|
+
function we(t, e) {
|
|
273
242
|
const n = ((e == null ? void 0 : e.id) ?? Math.random()).toString(), o = new AbortController(), r = ht(), s = structuredClone((e == null ? void 0 : e.loadContext) ?? {});
|
|
274
|
-
let
|
|
275
|
-
const
|
|
243
|
+
let f, g, c;
|
|
244
|
+
const p = {}, l = {
|
|
276
245
|
id: n,
|
|
277
246
|
useLoadState: r.useLoadState,
|
|
278
247
|
signal: o.signal,
|
|
279
|
-
abort:
|
|
248
|
+
abort: d,
|
|
280
249
|
refresh: (e == null ? void 0 : e.refresh) ?? null,
|
|
281
250
|
get promise() {
|
|
282
|
-
return
|
|
251
|
+
return p.promise;
|
|
283
252
|
},
|
|
284
253
|
get loadContext() {
|
|
285
254
|
return s;
|
|
@@ -288,57 +257,57 @@ function Ce(t, e) {
|
|
|
288
257
|
return g;
|
|
289
258
|
},
|
|
290
259
|
get fetchResult() {
|
|
291
|
-
return
|
|
260
|
+
return f;
|
|
292
261
|
},
|
|
293
262
|
get error() {
|
|
294
|
-
return
|
|
263
|
+
return c;
|
|
295
264
|
}
|
|
296
265
|
};
|
|
297
|
-
return
|
|
298
|
-
function
|
|
266
|
+
return p.promise = r.loadPromise(m()), l;
|
|
267
|
+
function d() {
|
|
299
268
|
o.abort();
|
|
300
269
|
}
|
|
301
270
|
async function m() {
|
|
302
271
|
try {
|
|
303
|
-
await t.hooked.callHookParallel("load:prepare",
|
|
304
|
-
const
|
|
305
|
-
i(s,
|
|
272
|
+
await t.hooked.callHookParallel("load:prepare", l);
|
|
273
|
+
const a = await t.hooked.callHookParallel("load:context", l);
|
|
274
|
+
i(s, a);
|
|
306
275
|
const h = {
|
|
307
|
-
...
|
|
308
|
-
signal:
|
|
276
|
+
...l.loadContext,
|
|
277
|
+
signal: l.signal
|
|
309
278
|
};
|
|
310
|
-
if (
|
|
311
|
-
const y = t.hooked.callHookSync("load:store",
|
|
279
|
+
if (f = await t.config.load.current(h), S(f), g = (await t.hooked.callHook("load:process", l))[0] ?? f, S(g), (e == null ? void 0 : e.store) !== !1) {
|
|
280
|
+
const y = t.hooked.callHookSync("load:store", l);
|
|
312
281
|
(!y.length || y.every((C) => C !== !0)) && (t.storage.clearSections(), t.storage.createSection({ loadContext: s }, g.results));
|
|
313
282
|
}
|
|
314
|
-
await t.hooked.callHook("load:success",
|
|
315
|
-
} catch (
|
|
316
|
-
throw
|
|
283
|
+
await t.hooked.callHook("load:success", l);
|
|
284
|
+
} catch (a) {
|
|
285
|
+
throw c = a, await t.hooked.callHook("load:error", l), c;
|
|
317
286
|
}
|
|
318
287
|
}
|
|
319
|
-
function S(
|
|
320
|
-
if (typeof
|
|
288
|
+
function S(a) {
|
|
289
|
+
if (typeof a != "object" || a === null || !("results" in a))
|
|
321
290
|
throw new Error(
|
|
322
|
-
`Load result must be an object with "results" and "total?" properties. Got ${JSON.stringify(
|
|
291
|
+
`Load result must be an object with "results" and "total?" properties. Got ${JSON.stringify(a)}`
|
|
323
292
|
);
|
|
324
293
|
}
|
|
325
|
-
function i(
|
|
294
|
+
function i(a, h) {
|
|
326
295
|
for (const y of h ?? [])
|
|
327
296
|
if ($(y))
|
|
328
297
|
for (const C in y) {
|
|
329
298
|
const b = y[C];
|
|
330
299
|
if ($(b))
|
|
331
300
|
if (Array.isArray(b))
|
|
332
|
-
|
|
301
|
+
a[C] = b;
|
|
333
302
|
else {
|
|
334
|
-
|
|
335
|
-
const v =
|
|
303
|
+
a[C] ?? (a[C] = {});
|
|
304
|
+
const v = a[C];
|
|
336
305
|
$(v) && Object.assign(v, b);
|
|
337
306
|
}
|
|
338
307
|
}
|
|
339
308
|
}
|
|
340
309
|
}
|
|
341
|
-
function
|
|
310
|
+
function be(t) {
|
|
342
311
|
const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
|
|
343
312
|
let o;
|
|
344
313
|
const r = z()(() => ({
|
|
@@ -347,133 +316,133 @@ function we(t) {
|
|
|
347
316
|
})), s = {
|
|
348
317
|
triggerLoad: i,
|
|
349
318
|
refresh: m,
|
|
350
|
-
abort:
|
|
351
|
-
getLoadInstances:
|
|
319
|
+
abort: p,
|
|
320
|
+
getLoadInstances: c,
|
|
352
321
|
useLoadStateStore: r
|
|
353
322
|
};
|
|
354
323
|
return t.plugins.registerPublicApi(s), {
|
|
355
324
|
...s,
|
|
356
|
-
init:
|
|
325
|
+
init: d
|
|
357
326
|
};
|
|
358
|
-
function
|
|
327
|
+
function f() {
|
|
359
328
|
r.setState({
|
|
360
329
|
loadState: e.size > 0 ? "loading" : "blank",
|
|
361
330
|
recordsLoadState: n.size > 0 ? "loading" : "blank"
|
|
362
331
|
});
|
|
363
332
|
}
|
|
364
|
-
function g(
|
|
333
|
+
function g(a) {
|
|
365
334
|
var h, y;
|
|
366
|
-
return (
|
|
335
|
+
return (a == null ? void 0 : a.store) === !1 ? !1 : ((y = (h = a == null ? void 0 : a.loadContext) == null ? void 0 : h.tree) == null ? void 0 : y.parentId) == null;
|
|
367
336
|
}
|
|
368
|
-
function
|
|
337
|
+
function c() {
|
|
369
338
|
return [...e.values()];
|
|
370
339
|
}
|
|
371
|
-
function
|
|
372
|
-
for (const
|
|
373
|
-
|
|
340
|
+
function p() {
|
|
341
|
+
for (const a of e.values())
|
|
342
|
+
a.abort();
|
|
374
343
|
}
|
|
375
|
-
async function
|
|
344
|
+
async function l(a) {
|
|
376
345
|
try {
|
|
377
|
-
return await
|
|
346
|
+
return await a.promise, !1;
|
|
378
347
|
} catch (h) {
|
|
379
|
-
if (
|
|
348
|
+
if (a.signal.aborted) return !0;
|
|
380
349
|
throw h;
|
|
381
350
|
}
|
|
382
351
|
}
|
|
383
|
-
async function
|
|
352
|
+
async function d() {
|
|
384
353
|
await t.hooked.callHook("init");
|
|
385
|
-
const
|
|
386
|
-
if (!await
|
|
387
|
-
let h =
|
|
354
|
+
const a = o;
|
|
355
|
+
if (!await l(i())) return;
|
|
356
|
+
let h = a;
|
|
388
357
|
for (; o !== h; )
|
|
389
358
|
h = o, await h;
|
|
390
359
|
}
|
|
391
|
-
function m(
|
|
392
|
-
return o = S(
|
|
360
|
+
function m(a = {}) {
|
|
361
|
+
return o = S(a), o;
|
|
393
362
|
}
|
|
394
|
-
async function S(
|
|
395
|
-
|
|
396
|
-
const h = { resetFilters:
|
|
397
|
-
await t.hooked.callHook("refresh", h), await
|
|
363
|
+
async function S(a) {
|
|
364
|
+
p();
|
|
365
|
+
const h = { resetFilters: a.resetFilters ?? !0 };
|
|
366
|
+
await t.hooked.callHook("refresh", h), await l(i({ refresh: h }));
|
|
398
367
|
}
|
|
399
|
-
function i(
|
|
400
|
-
const h =
|
|
401
|
-
return e.set(h.id, h), g(
|
|
402
|
-
e.delete(h.id), n.delete(h.id),
|
|
368
|
+
function i(a) {
|
|
369
|
+
const h = we(t, a);
|
|
370
|
+
return e.set(h.id, h), g(a) && n.add(h.id), f(), h.promise.finally(() => {
|
|
371
|
+
e.delete(h.id), n.delete(h.id), f();
|
|
403
372
|
}).catch(() => {
|
|
404
373
|
}), h;
|
|
405
374
|
}
|
|
406
375
|
}
|
|
407
|
-
function
|
|
376
|
+
function ve(t) {
|
|
408
377
|
const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), o = t.config.name, r = t.config.persistent ?? "localStorage", s = {
|
|
409
|
-
registerPersistentState:
|
|
378
|
+
registerPersistentState: c
|
|
410
379
|
};
|
|
411
380
|
return t.plugins.registerPublicApi(s), s;
|
|
412
|
-
function
|
|
413
|
-
return `dataGrid:${o}:${
|
|
381
|
+
function f(p) {
|
|
382
|
+
return `dataGrid:${o}:${p}`;
|
|
414
383
|
}
|
|
415
|
-
function g(
|
|
384
|
+
function g(p) {
|
|
416
385
|
if (typeof window > "u") return null;
|
|
417
386
|
try {
|
|
418
|
-
return
|
|
387
|
+
return p === "localStorage" ? localStorage : sessionStorage;
|
|
419
388
|
} catch {
|
|
420
389
|
return null;
|
|
421
390
|
}
|
|
422
391
|
}
|
|
423
|
-
function
|
|
424
|
-
const
|
|
392
|
+
function c(p, l = {}) {
|
|
393
|
+
const d = f(p), m = l.storage ?? r, S = m === "router" && l.router === !1;
|
|
425
394
|
return {
|
|
426
395
|
get value() {
|
|
427
396
|
return i();
|
|
428
397
|
},
|
|
429
|
-
setValue:
|
|
398
|
+
setValue: a,
|
|
430
399
|
buildStorageItem: h
|
|
431
400
|
};
|
|
432
401
|
function i() {
|
|
433
402
|
if (S)
|
|
434
403
|
return;
|
|
435
404
|
if (m === "memory")
|
|
436
|
-
return n.get(
|
|
405
|
+
return n.get(p);
|
|
437
406
|
if (m === "router") {
|
|
438
407
|
const C = new URLSearchParams(window.location.search);
|
|
439
|
-
return ot(C.get(
|
|
408
|
+
return ot(C.get(p));
|
|
440
409
|
}
|
|
441
410
|
const y = g(m);
|
|
442
411
|
if (y)
|
|
443
|
-
return ot(
|
|
412
|
+
return ot(ke(y, d));
|
|
444
413
|
}
|
|
445
|
-
function
|
|
414
|
+
function a(y) {
|
|
446
415
|
var C;
|
|
447
416
|
if (!S) {
|
|
448
417
|
if (m === "memory")
|
|
449
|
-
y === void 0 ? n.delete(
|
|
418
|
+
y === void 0 ? n.delete(p) : n.set(p, y);
|
|
450
419
|
else if (m === "router") {
|
|
451
420
|
const b = new URLSearchParams(window.location.search);
|
|
452
|
-
y === void 0 ? b.delete(
|
|
421
|
+
y === void 0 ? b.delete(p) : b.set(p, JSON.stringify(y));
|
|
453
422
|
const v = `${window.location.pathname}?${b.toString()}`;
|
|
454
423
|
window.history.replaceState(null, "", v);
|
|
455
424
|
} else {
|
|
456
425
|
const b = g(m);
|
|
457
426
|
if (!b) return;
|
|
458
427
|
try {
|
|
459
|
-
y === void 0 ? b.removeItem(
|
|
428
|
+
y === void 0 ? b.removeItem(d) : b.setItem(d, JSON.stringify(y));
|
|
460
429
|
} catch {
|
|
461
430
|
}
|
|
462
431
|
}
|
|
463
|
-
(C = e.get(
|
|
432
|
+
(C = e.get(p)) == null || C.forEach((b) => b());
|
|
464
433
|
}
|
|
465
434
|
}
|
|
466
435
|
function h(y) {
|
|
467
|
-
if (!
|
|
436
|
+
if (!l.schema) return { [p]: y };
|
|
468
437
|
const C = {};
|
|
469
|
-
return Object.entries(
|
|
438
|
+
return Object.entries(l.schema).forEach(([b]) => {
|
|
470
439
|
const v = $(y) ? y[b] : void 0;
|
|
471
440
|
v !== void 0 && (C[b] = v);
|
|
472
441
|
}), C;
|
|
473
442
|
}
|
|
474
443
|
}
|
|
475
444
|
}
|
|
476
|
-
function
|
|
445
|
+
function ke(t, e) {
|
|
477
446
|
try {
|
|
478
447
|
return t.getItem(e);
|
|
479
448
|
} catch {
|
|
@@ -488,7 +457,7 @@ function ot(t) {
|
|
|
488
457
|
return;
|
|
489
458
|
}
|
|
490
459
|
}
|
|
491
|
-
function
|
|
460
|
+
function xe(t) {
|
|
492
461
|
const e = /* @__PURE__ */ new Map(), n = {
|
|
493
462
|
hook: t.hooked.hook,
|
|
494
463
|
getPlugin: g
|
|
@@ -496,28 +465,28 @@ function ke(t) {
|
|
|
496
465
|
return {
|
|
497
466
|
...n,
|
|
498
467
|
registerPlugin: s,
|
|
499
|
-
registerPlugins:
|
|
468
|
+
registerPlugins: f,
|
|
500
469
|
registerPublicApi: r,
|
|
501
470
|
pluginContext: o
|
|
502
471
|
};
|
|
503
|
-
function r(
|
|
504
|
-
Object.assign(o,
|
|
472
|
+
function r(c) {
|
|
473
|
+
Object.assign(o, c);
|
|
505
474
|
}
|
|
506
|
-
function s(
|
|
507
|
-
if (e.has(
|
|
475
|
+
function s(c) {
|
|
476
|
+
if (e.has(c.name)) {
|
|
508
477
|
process.env.NODE_ENV !== "production" && console.warn(
|
|
509
|
-
`[DataGrid] Plugin "${
|
|
478
|
+
`[DataGrid] Plugin "${c.name}" is already registered. Skipping duplicate.`
|
|
510
479
|
);
|
|
511
480
|
return;
|
|
512
481
|
}
|
|
513
|
-
const
|
|
514
|
-
|
|
482
|
+
const p = c.setup(o);
|
|
483
|
+
p !== void 0 && e.set(c.name, p);
|
|
515
484
|
}
|
|
516
|
-
function
|
|
517
|
-
|
|
485
|
+
function f(c) {
|
|
486
|
+
c.forEach((p) => s(p));
|
|
518
487
|
}
|
|
519
|
-
function g(
|
|
520
|
-
return e.get(
|
|
488
|
+
function g(c) {
|
|
489
|
+
return e.get(c);
|
|
521
490
|
}
|
|
522
491
|
}
|
|
523
492
|
function rt(t, e) {
|
|
@@ -528,7 +497,7 @@ function rt(t, e) {
|
|
|
528
497
|
}
|
|
529
498
|
return e(t);
|
|
530
499
|
}
|
|
531
|
-
function
|
|
500
|
+
function _e(t) {
|
|
532
501
|
const e = z()(() => ({
|
|
533
502
|
sections: /* @__PURE__ */ new Map(),
|
|
534
503
|
recordSections: /* @__PURE__ */ new Map(),
|
|
@@ -542,14 +511,14 @@ function xe(t) {
|
|
|
542
511
|
useStore: e,
|
|
543
512
|
clearSections: s,
|
|
544
513
|
createSection: r,
|
|
545
|
-
getSections:
|
|
514
|
+
getSections: f,
|
|
546
515
|
getRecord: g,
|
|
547
|
-
getSectionsByParentId:
|
|
548
|
-
getRecordsByParentId:
|
|
549
|
-
getItemId:
|
|
516
|
+
getSectionsByParentId: c,
|
|
517
|
+
getRecordsByParentId: p,
|
|
518
|
+
getItemId: l
|
|
550
519
|
};
|
|
551
520
|
return t.plugins.registerPublicApi(o), { ...o, updateImplicitFilterKeys: m };
|
|
552
|
-
function r(i,
|
|
521
|
+
function r(i, a) {
|
|
553
522
|
const h = Math.random().toString(), y = i.parentId ?? null, C = {
|
|
554
523
|
id: h,
|
|
555
524
|
visible: !0,
|
|
@@ -557,7 +526,7 @@ function xe(t) {
|
|
|
557
526
|
loadContext: i.loadContext,
|
|
558
527
|
records: []
|
|
559
528
|
}, b = t.config.itemKey ?? "id";
|
|
560
|
-
for (const [v, _] of
|
|
529
|
+
for (const [v, _] of a.entries()) {
|
|
561
530
|
const w = rt(_, b);
|
|
562
531
|
C.records.push({ id: w, item: _, index: v, section: C });
|
|
563
532
|
}
|
|
@@ -585,38 +554,38 @@ function xe(t) {
|
|
|
585
554
|
hasActiveFilters: !1
|
|
586
555
|
});
|
|
587
556
|
}
|
|
588
|
-
function
|
|
557
|
+
function f() {
|
|
589
558
|
return [...e.getState().sections.values()];
|
|
590
559
|
}
|
|
591
560
|
function g(i) {
|
|
592
|
-
for (const
|
|
593
|
-
const h =
|
|
561
|
+
for (const a of e.getState().sections.values()) {
|
|
562
|
+
const h = a.records.find((y) => y.id === i);
|
|
594
563
|
if (h)
|
|
595
564
|
return h;
|
|
596
565
|
}
|
|
597
566
|
}
|
|
598
|
-
function
|
|
599
|
-
const
|
|
600
|
-
return (
|
|
567
|
+
function c(i) {
|
|
568
|
+
const a = e.getState();
|
|
569
|
+
return (a.recordSections.get(i) ?? []).map((y) => a.sections.get(y)).filter(Boolean);
|
|
601
570
|
}
|
|
602
|
-
function
|
|
603
|
-
return
|
|
571
|
+
function p(i) {
|
|
572
|
+
return c(i).flatMap((a) => a.records);
|
|
604
573
|
}
|
|
605
|
-
function
|
|
606
|
-
const
|
|
607
|
-
return rt(i,
|
|
574
|
+
function l(i) {
|
|
575
|
+
const a = t.config.itemKey ?? "id";
|
|
576
|
+
return rt(i, a);
|
|
608
577
|
}
|
|
609
|
-
function
|
|
578
|
+
function d(i) {
|
|
610
579
|
return i == null ? !1 : typeof i == "boolean" ? !0 : Array.isArray(i) ? i.length > 0 : !!i;
|
|
611
580
|
}
|
|
612
581
|
function m(i) {
|
|
613
|
-
n !== i && (n = i, e.setState((
|
|
582
|
+
n !== i && (n = i, e.setState((a) => S(a.sections, a.recordSections)));
|
|
614
583
|
}
|
|
615
|
-
function S(i,
|
|
616
|
-
const y = [...i.values()].filter((w) => w.visible), b = (
|
|
584
|
+
function S(i, a) {
|
|
585
|
+
const y = [...i.values()].filter((w) => w.visible), b = (a.get(null) ?? []).map((w) => i.get(w)).filter((w) => w.visible), v = y.flatMap((w) => w.records), _ = y.some((w) => {
|
|
617
586
|
const { filters: x } = w.loadContext;
|
|
618
587
|
return x ? Object.entries(x).some(
|
|
619
|
-
([L, E]) => !n.includes(L) &&
|
|
588
|
+
([L, E]) => !n.includes(L) && d(E == null ? void 0 : E.value)
|
|
620
589
|
) : !1;
|
|
621
590
|
});
|
|
622
591
|
return {
|
|
@@ -641,75 +610,75 @@ function Ct(t, e) {
|
|
|
641
610
|
const n = t.key ?? t.id, o = n.includes(".") ? gt(e, n) : e[n];
|
|
642
611
|
return t.formatter ? t.formatter(o) : o != null ? String(o) : "";
|
|
643
612
|
}
|
|
644
|
-
function
|
|
613
|
+
function Ee({
|
|
645
614
|
column: t,
|
|
646
615
|
item: e
|
|
647
616
|
}) {
|
|
648
617
|
if (t.render)
|
|
649
|
-
return typeof t.render == "function" ? /* @__PURE__ */
|
|
618
|
+
return typeof t.render == "function" ? /* @__PURE__ */ u(G, { children: t.render(e) }) : /* @__PURE__ */ u(G, { children: t.render });
|
|
650
619
|
if (t.component) {
|
|
651
620
|
const n = t.component, o = t.key ?? t.id, r = o.includes(".") ? gt(e, o) : e[o];
|
|
652
|
-
return /* @__PURE__ */
|
|
621
|
+
return /* @__PURE__ */ u(n, { item: e, column: t, value: r });
|
|
653
622
|
}
|
|
654
|
-
return /* @__PURE__ */
|
|
623
|
+
return /* @__PURE__ */ u(G, { children: Ct(t, e) });
|
|
655
624
|
}
|
|
656
|
-
function
|
|
657
|
-
return /* @__PURE__ */
|
|
625
|
+
function Le({ children: t }) {
|
|
626
|
+
return /* @__PURE__ */ u(G, { children: t });
|
|
658
627
|
}
|
|
659
|
-
function
|
|
628
|
+
function Ie({
|
|
660
629
|
column: t
|
|
661
630
|
}) {
|
|
662
|
-
return /* @__PURE__ */
|
|
631
|
+
return /* @__PURE__ */ u("span", { children: Q(t.label) });
|
|
663
632
|
}
|
|
664
|
-
function
|
|
665
|
-
return
|
|
633
|
+
function H() {
|
|
634
|
+
return O().table;
|
|
666
635
|
}
|
|
667
|
-
const
|
|
668
|
-
cell:
|
|
669
|
-
stickyCell:
|
|
670
|
-
stickyHeaderCell:
|
|
671
|
-
contentRow:
|
|
672
|
-
content:
|
|
636
|
+
const De = "_cell_5zgpa_2", Ge = "_stickyCell_5zgpa_16", Re = "_stickyHeaderCell_5zgpa_33", Me = "_contentRow_5zgpa_38", Oe = "_content_5zgpa_37", He = "_endSlot_5zgpa_37", M = {
|
|
637
|
+
cell: De,
|
|
638
|
+
stickyCell: Ge,
|
|
639
|
+
stickyHeaderCell: Re,
|
|
640
|
+
contentRow: Me,
|
|
641
|
+
content: Oe,
|
|
673
642
|
endSlot: He
|
|
674
|
-
},
|
|
675
|
-
headerCell:
|
|
676
|
-
headerCellContent:
|
|
677
|
-
extraHeaderCell:
|
|
643
|
+
}, Ae = "_headerCell_18ulc_1", We = "_headerCellContent_18ulc_13", Ne = "_extraHeaderCell_18ulc_21", B = {
|
|
644
|
+
headerCell: Ae,
|
|
645
|
+
headerCellContent: We,
|
|
646
|
+
extraHeaderCell: Ne
|
|
678
647
|
};
|
|
679
648
|
function wt({ children: t }) {
|
|
680
|
-
return /* @__PURE__ */
|
|
649
|
+
return /* @__PURE__ */ u("span", { className: B.headerCellContent, children: t });
|
|
681
650
|
}
|
|
682
651
|
function bt({
|
|
683
652
|
group: t,
|
|
684
653
|
colspan: e,
|
|
685
654
|
className: n
|
|
686
655
|
}) {
|
|
687
|
-
const o =
|
|
688
|
-
return /* @__PURE__ */
|
|
656
|
+
const o = H(), r = o.useGroupStickyOffset(t.id), s = o.useStickyHeader(), f = r !== void 0, g = t.component, c = g ? /* @__PURE__ */ u(g, { group: t }) : /* @__PURE__ */ u(wt, { children: Q(t.label) });
|
|
657
|
+
return /* @__PURE__ */ u(
|
|
689
658
|
mt,
|
|
690
659
|
{
|
|
691
660
|
className: N(
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
s &&
|
|
661
|
+
M.cell,
|
|
662
|
+
B.headerCell,
|
|
663
|
+
f && M.stickyCell,
|
|
664
|
+
s && M.stickyHeaderCell,
|
|
696
665
|
n
|
|
697
666
|
),
|
|
698
|
-
style:
|
|
667
|
+
style: f ? { position: "sticky", insetInlineStart: `${r}px` } : void 0,
|
|
699
668
|
scope: "col",
|
|
700
669
|
colSpan: e,
|
|
701
|
-
children:
|
|
670
|
+
children: c
|
|
702
671
|
}
|
|
703
672
|
);
|
|
704
673
|
}
|
|
705
|
-
const vt = Lt(null),
|
|
706
|
-
function
|
|
674
|
+
const vt = Lt(null), Ve = vt.Provider;
|
|
675
|
+
function zn() {
|
|
707
676
|
const t = Et(vt);
|
|
708
677
|
if (!t)
|
|
709
678
|
throw new Error("useDataGridRecord must be used within a DataGridRow");
|
|
710
679
|
return t;
|
|
711
680
|
}
|
|
712
|
-
const
|
|
681
|
+
const ze = "--_data-grid-col-max";
|
|
713
682
|
function kt(t) {
|
|
714
683
|
return typeof t == "string" && t.trim().endsWith("%");
|
|
715
684
|
}
|
|
@@ -717,9 +686,9 @@ function xt(t) {
|
|
|
717
686
|
return typeof t == "number" ? `${t}px` : /^-?\d+(\.\d+)?$/.test(t.trim()) ? `${t}px` : t;
|
|
718
687
|
}
|
|
719
688
|
function _t(t, e, n) {
|
|
720
|
-
return e === "auto" ?
|
|
689
|
+
return e === "auto" ? Te(t, n) : Pe(t, n);
|
|
721
690
|
}
|
|
722
|
-
function
|
|
691
|
+
function Pe(t, e) {
|
|
723
692
|
const o = (t.width === "min-content" ? e : t.width) ?? t.minWidth ?? t.maxWidth;
|
|
724
693
|
if (o === void 0) return { headerStyle: {}, contentVars: {}, isCapped: !1 };
|
|
725
694
|
if (kt(o))
|
|
@@ -731,12 +700,12 @@ function ze(t, e) {
|
|
|
731
700
|
isCapped: !1
|
|
732
701
|
};
|
|
733
702
|
}
|
|
734
|
-
function
|
|
703
|
+
function Te(t, e) {
|
|
735
704
|
const { width: n, minWidth: o, maxWidth: r } = t, s = {};
|
|
736
705
|
if (n !== void 0)
|
|
737
706
|
if (n === "min-content" && e !== void 0) {
|
|
738
|
-
const
|
|
739
|
-
s.width =
|
|
707
|
+
const c = `${r !== void 0 ? Math.min(e, r) : e}px`;
|
|
708
|
+
s.width = c, s.minInlineSize = c;
|
|
740
709
|
} else if (kt(n))
|
|
741
710
|
s.inlineSize = n;
|
|
742
711
|
else {
|
|
@@ -744,56 +713,56 @@ function Pe(t, e) {
|
|
|
744
713
|
s.width = g, s.minInlineSize = g;
|
|
745
714
|
}
|
|
746
715
|
o !== void 0 && (s.minInlineSize = `${o}px`);
|
|
747
|
-
const
|
|
748
|
-
return r !== void 0 && (n === void 0 && (s.width = `${r}px`),
|
|
716
|
+
const f = {};
|
|
717
|
+
return r !== void 0 && (n === void 0 && (s.width = `${r}px`), f[ze] = `${r}px`), { headerStyle: s, contentVars: f, isCapped: r !== void 0 };
|
|
749
718
|
}
|
|
750
|
-
function
|
|
751
|
-
const o = t.cellOverflow ?? "wrap", { contentVars: r, isCapped: s } = _t(t, n),
|
|
752
|
-
return { style: r, overflow: o, capped: s, title:
|
|
719
|
+
function $e(t, e, n) {
|
|
720
|
+
const o = t.cellOverflow ?? "wrap", { contentVars: r, isCapped: s } = _t(t, n), f = o === "nowrap" ? Ct(t, e) : void 0;
|
|
721
|
+
return { style: r, overflow: o, capped: s, title: f || void 0 };
|
|
753
722
|
}
|
|
754
|
-
const
|
|
755
|
-
function
|
|
723
|
+
const Fe = "data-grid-row-ignore-click";
|
|
724
|
+
function Be(t) {
|
|
756
725
|
if (t != null)
|
|
757
726
|
return typeof t == "number" ? `${t}px` : isNaN(Number(t)) ? t : `${t}px`;
|
|
758
727
|
}
|
|
759
|
-
function
|
|
728
|
+
function j({
|
|
760
729
|
columnId: t,
|
|
761
730
|
rowspan: e,
|
|
762
731
|
className: n,
|
|
763
732
|
style: o,
|
|
764
733
|
width: r,
|
|
765
734
|
children: s,
|
|
766
|
-
header:
|
|
735
|
+
header: f,
|
|
767
736
|
endSlot: g,
|
|
768
|
-
overflow:
|
|
769
|
-
capped:
|
|
770
|
-
title:
|
|
771
|
-
contentRowRef:
|
|
737
|
+
overflow: c,
|
|
738
|
+
capped: p,
|
|
739
|
+
title: l,
|
|
740
|
+
contentRowRef: d,
|
|
772
741
|
fillContent: m,
|
|
773
742
|
ignoreRowClick: S
|
|
774
743
|
}) {
|
|
775
|
-
const i =
|
|
776
|
-
return /* @__PURE__ */
|
|
744
|
+
const i = H(), a = i.useColumnStickyOffset(t), h = i.useColumnEndStickyOffset(t), y = a !== void 0, C = h !== void 0, b = /* @__PURE__ */ u("span", { className: M.content, children: s }), v = f ? mt : Pt, _ = Be(r);
|
|
745
|
+
return /* @__PURE__ */ u(
|
|
777
746
|
v,
|
|
778
747
|
{
|
|
779
748
|
"data-column-id": t,
|
|
780
|
-
"data-overflow":
|
|
781
|
-
"data-capped":
|
|
749
|
+
"data-overflow": c,
|
|
750
|
+
"data-capped": p || void 0,
|
|
782
751
|
"data-header-fill": m || void 0,
|
|
783
|
-
...S && { [
|
|
784
|
-
title:
|
|
785
|
-
className: N(
|
|
752
|
+
...S && { [Fe]: "" },
|
|
753
|
+
title: l,
|
|
754
|
+
className: N(M.cell, (y || C) && M.stickyCell, n),
|
|
786
755
|
style: {
|
|
787
756
|
...o,
|
|
788
757
|
..._ ? { width: _ } : {},
|
|
789
|
-
...y ? { position: "sticky", insetInlineStart: `${
|
|
758
|
+
...y ? { position: "sticky", insetInlineStart: `${a}px` } : {},
|
|
790
759
|
...C ? { position: "sticky", insetInlineEnd: `${h}px` } : {}
|
|
791
760
|
},
|
|
792
|
-
scope:
|
|
761
|
+
scope: f ? "col" : void 0,
|
|
793
762
|
rowSpan: e,
|
|
794
|
-
children: g ? /* @__PURE__ */ D("span", { className:
|
|
763
|
+
children: g ? /* @__PURE__ */ D("span", { className: M.contentRow, ref: d, children: [
|
|
795
764
|
b,
|
|
796
|
-
/* @__PURE__ */
|
|
765
|
+
/* @__PURE__ */ u("span", { className: M.endSlot, children: g })
|
|
797
766
|
] }) : b
|
|
798
767
|
}
|
|
799
768
|
);
|
|
@@ -801,80 +770,80 @@ function K({
|
|
|
801
770
|
function it({
|
|
802
771
|
position: t
|
|
803
772
|
}) {
|
|
804
|
-
const n =
|
|
805
|
-
return /* @__PURE__ */
|
|
806
|
-
|
|
773
|
+
const n = H().useExtraColumns(t);
|
|
774
|
+
return /* @__PURE__ */ u(G, { children: n.map((o) => /* @__PURE__ */ u(
|
|
775
|
+
j,
|
|
807
776
|
{
|
|
808
777
|
columnId: o.id,
|
|
809
778
|
width: o.width,
|
|
810
779
|
ignoreRowClick: o.ignoreRowClick,
|
|
811
|
-
children: o.body ? /* @__PURE__ */
|
|
780
|
+
children: o.body ? /* @__PURE__ */ u(o.body, {}) : null
|
|
812
781
|
},
|
|
813
782
|
o.id
|
|
814
783
|
)) });
|
|
815
784
|
}
|
|
816
|
-
function
|
|
817
|
-
const e =
|
|
785
|
+
function je({ record: t }) {
|
|
786
|
+
const e = H(), n = e.useVisibleColumns(), o = e.useTableLayout(), r = e.useComponent(
|
|
818
787
|
"body-cell-content"
|
|
819
788
|
);
|
|
820
|
-
return /* @__PURE__ */
|
|
821
|
-
/* @__PURE__ */
|
|
789
|
+
return /* @__PURE__ */ u(Ve, { value: t, children: /* @__PURE__ */ D(J, { children: [
|
|
790
|
+
/* @__PURE__ */ u(it, { position: "start" }),
|
|
822
791
|
n.map((s) => {
|
|
823
|
-
var
|
|
824
|
-
const
|
|
825
|
-
return /* @__PURE__ */
|
|
826
|
-
|
|
792
|
+
var c;
|
|
793
|
+
const f = (c = s.getClassName) == null ? void 0 : c.call(s, t.item), g = $e(s, t.item, o);
|
|
794
|
+
return /* @__PURE__ */ u(
|
|
795
|
+
j,
|
|
827
796
|
{
|
|
828
797
|
columnId: s.id,
|
|
829
|
-
className:
|
|
798
|
+
className: f,
|
|
830
799
|
...g,
|
|
831
|
-
children: /* @__PURE__ */
|
|
800
|
+
children: /* @__PURE__ */ u(r, { column: s, item: t.item })
|
|
832
801
|
},
|
|
833
802
|
s.id
|
|
834
803
|
);
|
|
835
804
|
}),
|
|
836
|
-
/* @__PURE__ */
|
|
805
|
+
/* @__PURE__ */ u(it, { position: "end" })
|
|
837
806
|
] }) });
|
|
838
807
|
}
|
|
839
|
-
const
|
|
840
|
-
tableWrapper:
|
|
841
|
-
table:
|
|
842
|
-
layoutFixed:
|
|
843
|
-
layoutAuto:
|
|
844
|
-
tableBordered:
|
|
808
|
+
const Ke = "_tableWrapper_1wbrz_6", Ue = "_table_1wbrz_6", Je = "_layoutFixed_1wbrz_35", Ye = "_layoutAuto_1wbrz_42", Xe = "_tableBordered_1wbrz_49", T = {
|
|
809
|
+
tableWrapper: Ke,
|
|
810
|
+
table: Ue,
|
|
811
|
+
layoutFixed: Je,
|
|
812
|
+
layoutAuto: Ye,
|
|
813
|
+
tableBordered: Xe
|
|
845
814
|
};
|
|
846
|
-
function
|
|
815
|
+
function qe({
|
|
847
816
|
record: t
|
|
848
817
|
}) {
|
|
849
|
-
const n =
|
|
850
|
-
return /* @__PURE__ */
|
|
818
|
+
const n = H().useComponent("row");
|
|
819
|
+
return /* @__PURE__ */ u(n, { record: t });
|
|
851
820
|
}
|
|
852
|
-
function
|
|
821
|
+
function Qe({
|
|
853
822
|
records: t
|
|
854
823
|
}) {
|
|
855
|
-
return /* @__PURE__ */
|
|
824
|
+
return /* @__PURE__ */ u(G, { children: t.map((e) => /* @__PURE__ */ u(qe, { record: e }, e.id)) });
|
|
856
825
|
}
|
|
857
|
-
function
|
|
858
|
-
const e =
|
|
859
|
-
return /* @__PURE__ */
|
|
826
|
+
function Ze() {
|
|
827
|
+
const e = F().useStore((n) => n.rootSections);
|
|
828
|
+
return /* @__PURE__ */ u(G, { children: e.map((n) => /* @__PURE__ */ u(Tt, { children: /* @__PURE__ */ u(Qe, { records: n.records }) }, n.id)) });
|
|
860
829
|
}
|
|
861
|
-
function
|
|
830
|
+
function tn({
|
|
862
831
|
column: t,
|
|
863
832
|
rowspan: e,
|
|
864
833
|
className: n,
|
|
865
834
|
children: o
|
|
866
835
|
}) {
|
|
867
|
-
const s =
|
|
868
|
-
return /* @__PURE__ */
|
|
869
|
-
|
|
836
|
+
const s = H().useStickyHeader();
|
|
837
|
+
return /* @__PURE__ */ u(
|
|
838
|
+
j,
|
|
870
839
|
{
|
|
871
840
|
header: !0,
|
|
872
841
|
columnId: t.id,
|
|
873
|
-
className: N(
|
|
842
|
+
className: N(B.extraHeaderCell, s && M.stickyHeaderCell, n),
|
|
874
843
|
width: t.width,
|
|
875
844
|
rowspan: e,
|
|
876
845
|
ignoreRowClick: t.ignoreRowClick,
|
|
877
|
-
children: o ? /* @__PURE__ */
|
|
846
|
+
children: o ? /* @__PURE__ */ u(wt, { children: o }) : null
|
|
878
847
|
}
|
|
879
848
|
);
|
|
880
849
|
}
|
|
@@ -883,19 +852,19 @@ function st({
|
|
|
883
852
|
isGroupRow: e,
|
|
884
853
|
className: n
|
|
885
854
|
}) {
|
|
886
|
-
const o =
|
|
887
|
-
return /* @__PURE__ */
|
|
888
|
-
|
|
855
|
+
const o = H(), r = o.useHasGroups(), s = o.useExtraColumns(t), f = !r || e;
|
|
856
|
+
return /* @__PURE__ */ u(G, { children: s.map((g) => /* @__PURE__ */ u(
|
|
857
|
+
tn,
|
|
889
858
|
{
|
|
890
859
|
column: g,
|
|
891
|
-
rowspan:
|
|
860
|
+
rowspan: f && r ? 2 : void 0,
|
|
892
861
|
className: n,
|
|
893
|
-
children:
|
|
862
|
+
children: f && g.header ? /* @__PURE__ */ u(g.header, {}) : null
|
|
894
863
|
},
|
|
895
864
|
g.id
|
|
896
865
|
)) });
|
|
897
866
|
}
|
|
898
|
-
function
|
|
867
|
+
function en(t) {
|
|
899
868
|
return {
|
|
900
869
|
setMinContentWidth: e,
|
|
901
870
|
useMinContentWidth: n
|
|
@@ -903,14 +872,14 @@ function tn(t) {
|
|
|
903
872
|
function e(o, r) {
|
|
904
873
|
const s = t.getState().minContentWidths;
|
|
905
874
|
if (s.get(o) === r) return;
|
|
906
|
-
const
|
|
907
|
-
|
|
875
|
+
const f = new Map(s);
|
|
876
|
+
f.set(o, r), t.setState({ minContentWidths: f });
|
|
908
877
|
}
|
|
909
878
|
function n(o) {
|
|
910
879
|
return t((r) => r.minContentWidths.get(o));
|
|
911
880
|
}
|
|
912
881
|
}
|
|
913
|
-
function
|
|
882
|
+
function nn(t, e) {
|
|
914
883
|
const n = e ? window.getComputedStyle(e) : void 0, o = n ? parseFloat(n.paddingInlineStart || "0") + parseFloat(n.paddingInlineEnd || "0") : 0, r = n ? parseFloat(n.borderInlineStartWidth || "0") + parseFloat(n.borderInlineEndWidth || "0") : 0;
|
|
915
884
|
return Math.ceil(t.contentRect.width + o + r);
|
|
916
885
|
}
|
|
@@ -920,30 +889,30 @@ function at({
|
|
|
920
889
|
headerCellEndSlots: n,
|
|
921
890
|
className: o
|
|
922
891
|
}) {
|
|
923
|
-
const r =
|
|
892
|
+
const r = H(), s = K(null), f = r.useComponent("header-cell-label"), g = r.useTableLayout(), c = r.useStickyHeader(), p = r.useMinContentWidth(t.id), l = t.headerComponent ? /* @__PURE__ */ u(t.headerComponent, { column: t }) : (
|
|
924
893
|
// eslint-disable-next-line react-hooks/static-components -- LabelComponent comes from the grid's component registry (a store lookup), so it is the same component on every render; the rule cannot see through the lookup.
|
|
925
|
-
/* @__PURE__ */
|
|
926
|
-
),
|
|
894
|
+
/* @__PURE__ */ u(f, { column: t })
|
|
895
|
+
), d = t.headerOverflow ?? "nowrap", m = t.width === "min-content", S = m ? void 0 : d, { headerStyle: i, contentVars: a, isCapped: h } = _t(
|
|
927
896
|
t,
|
|
928
897
|
g,
|
|
929
|
-
|
|
930
|
-
), y = !t.headerComponent &&
|
|
898
|
+
p
|
|
899
|
+
), y = !t.headerComponent && d === "nowrap" ? Q(t.label) : void 0, C = !!t.headerComponent && !m;
|
|
931
900
|
return A(() => {
|
|
932
901
|
if (!m) return;
|
|
933
902
|
const b = s.current;
|
|
934
903
|
if (!b) return;
|
|
935
904
|
const v = b.closest("th, td"), _ = new ResizeObserver((w) => {
|
|
936
905
|
const x = w[w.length - 1];
|
|
937
|
-
r.setMinContentWidth(t.id,
|
|
906
|
+
r.setMinContentWidth(t.id, nn(x, v));
|
|
938
907
|
});
|
|
939
908
|
return _.observe(b), () => _.disconnect();
|
|
940
|
-
}, [m, t.id, r]), /* @__PURE__ */
|
|
941
|
-
|
|
909
|
+
}, [m, t.id, r]), /* @__PURE__ */ u(
|
|
910
|
+
j,
|
|
942
911
|
{
|
|
943
912
|
header: !0,
|
|
944
913
|
columnId: t.id,
|
|
945
|
-
className: N(
|
|
946
|
-
style: { ...i, ...
|
|
914
|
+
className: N(B.headerCell, c && M.stickyHeaderCell, o),
|
|
915
|
+
style: { ...i, ...a },
|
|
947
916
|
rowspan: e,
|
|
948
917
|
overflow: S,
|
|
949
918
|
capped: m ? void 0 : h,
|
|
@@ -952,118 +921,115 @@ function at({
|
|
|
952
921
|
fillContent: C,
|
|
953
922
|
endSlot: n.map((b) => {
|
|
954
923
|
const v = b.component;
|
|
955
|
-
return /* @__PURE__ */
|
|
924
|
+
return /* @__PURE__ */ u(v, { column: t }, b.id);
|
|
956
925
|
}),
|
|
957
|
-
children:
|
|
926
|
+
children: l
|
|
958
927
|
}
|
|
959
928
|
);
|
|
960
929
|
}
|
|
961
|
-
const
|
|
962
|
-
theadSticky:
|
|
930
|
+
const on = "_theadSticky_1kkfu_11", rn = {
|
|
931
|
+
theadSticky: on
|
|
963
932
|
};
|
|
964
|
-
function
|
|
965
|
-
const t =
|
|
933
|
+
function sn() {
|
|
934
|
+
const t = H(), e = K(null), n = K(null), o = t.useHasGroups(), r = t.useStickyHeader(), s = t.useFirstRowHeaderCells(), f = t.useSecondRowHeaderColumns(), g = t.useSlots("header-cell-end");
|
|
966
935
|
return A(() => {
|
|
967
|
-
const
|
|
968
|
-
if (!
|
|
969
|
-
n.current = new ResizeObserver((
|
|
970
|
-
var
|
|
971
|
-
for (const S of
|
|
936
|
+
const c = e.current;
|
|
937
|
+
if (!c) return;
|
|
938
|
+
n.current = new ResizeObserver((l) => {
|
|
939
|
+
var d, m;
|
|
940
|
+
for (const S of l) {
|
|
972
941
|
const { columnId: i } = S.target.dataset;
|
|
973
942
|
if (i) {
|
|
974
|
-
const
|
|
975
|
-
t.onResizeColumn(i,
|
|
943
|
+
const a = ((m = (d = S.borderBoxSize) == null ? void 0 : d[0]) == null ? void 0 : m.inlineSize) ?? S.contentRect.width;
|
|
944
|
+
t.onResizeColumn(i, a);
|
|
976
945
|
}
|
|
977
946
|
}
|
|
978
947
|
});
|
|
979
|
-
const
|
|
980
|
-
for (const
|
|
981
|
-
n.current.observe(
|
|
948
|
+
const p = c.querySelectorAll("[data-column-id]");
|
|
949
|
+
for (const l of p)
|
|
950
|
+
n.current.observe(l);
|
|
982
951
|
return () => {
|
|
983
|
-
var
|
|
984
|
-
(
|
|
952
|
+
var l;
|
|
953
|
+
(l = n.current) == null || l.disconnect();
|
|
985
954
|
};
|
|
986
|
-
}, [t, s,
|
|
987
|
-
|
|
955
|
+
}, [t, s, f]), /* @__PURE__ */ D(
|
|
956
|
+
$t,
|
|
988
957
|
{
|
|
989
958
|
ref: e,
|
|
990
|
-
className: N(r && o &&
|
|
959
|
+
className: N(r && o && rn.theadSticky),
|
|
991
960
|
children: [
|
|
992
961
|
/* @__PURE__ */ D(J, { children: [
|
|
993
|
-
/* @__PURE__ */
|
|
994
|
-
s.map((
|
|
995
|
-
if (
|
|
996
|
-
const
|
|
997
|
-
return /* @__PURE__ */
|
|
962
|
+
/* @__PURE__ */ u(st, { position: "start", isGroupRow: !0 }),
|
|
963
|
+
s.map((c) => {
|
|
964
|
+
if (c.type === "group") {
|
|
965
|
+
const l = c.item;
|
|
966
|
+
return /* @__PURE__ */ u(bt, { group: l, colspan: c.colspan }, l.id);
|
|
998
967
|
}
|
|
999
|
-
const
|
|
1000
|
-
return /* @__PURE__ */
|
|
968
|
+
const p = c.item;
|
|
969
|
+
return /* @__PURE__ */ u(
|
|
1001
970
|
at,
|
|
1002
971
|
{
|
|
1003
|
-
column:
|
|
1004
|
-
rowspan:
|
|
972
|
+
column: p,
|
|
973
|
+
rowspan: c.rowspan,
|
|
1005
974
|
headerCellEndSlots: g
|
|
1006
975
|
},
|
|
1007
|
-
|
|
976
|
+
p.id
|
|
1008
977
|
);
|
|
1009
978
|
}),
|
|
1010
|
-
/* @__PURE__ */
|
|
979
|
+
/* @__PURE__ */ u(st, { position: "end", isGroupRow: !0 })
|
|
1011
980
|
] }),
|
|
1012
|
-
o &&
|
|
981
|
+
o && f.length > 0 && /* @__PURE__ */ u(J, { children: f.map((c) => /* @__PURE__ */ u(
|
|
1013
982
|
at,
|
|
1014
983
|
{
|
|
1015
|
-
column:
|
|
984
|
+
column: c,
|
|
1016
985
|
headerCellEndSlots: g
|
|
1017
986
|
},
|
|
1018
|
-
|
|
987
|
+
c.id
|
|
1019
988
|
)) })
|
|
1020
989
|
]
|
|
1021
990
|
}
|
|
1022
991
|
);
|
|
1023
992
|
}
|
|
1024
993
|
function ct({ slots: t }) {
|
|
1025
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
994
|
+
return t.length === 0 ? null : /* @__PURE__ */ u(G, { children: t.map((e) => {
|
|
1026
995
|
const n = e.component;
|
|
1027
|
-
return /* @__PURE__ */
|
|
996
|
+
return /* @__PURE__ */ u(n, {}, e.id);
|
|
1028
997
|
}) });
|
|
1029
998
|
}
|
|
1030
|
-
const
|
|
999
|
+
const an = {
|
|
1031
1000
|
fixed: T.layoutFixed,
|
|
1032
1001
|
auto: T.layoutAuto
|
|
1033
1002
|
};
|
|
1034
|
-
function
|
|
1035
|
-
const t =
|
|
1003
|
+
function cn() {
|
|
1004
|
+
const t = H(), e = t.useHasGroups(), n = t.useSlots("subheader"), o = t.useSlots("footer"), r = t.useTableLayout(), s = t.useStickyHeader(), f = t.useComponent("content");
|
|
1036
1005
|
return (
|
|
1037
1006
|
// eslint-disable-next-line react-hooks/static-components -- ContentWrapper comes from the grid's component registry (a store lookup), so it is the same component on every render; the rule cannot see through the lookup.
|
|
1038
|
-
/* @__PURE__ */
|
|
1039
|
-
|
|
1007
|
+
/* @__PURE__ */ u(f, { children: /* @__PURE__ */ D(
|
|
1008
|
+
Ft,
|
|
1040
1009
|
{
|
|
1041
1010
|
stickyHeader: s,
|
|
1042
1011
|
containerClassName: T.tableWrapper,
|
|
1043
|
-
className: N(T.table,
|
|
1012
|
+
className: N(T.table, an[r], e && T.tableBordered),
|
|
1044
1013
|
children: [
|
|
1045
|
-
/* @__PURE__ */
|
|
1046
|
-
/* @__PURE__ */
|
|
1047
|
-
/* @__PURE__ */
|
|
1048
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ u(sn, {}),
|
|
1015
|
+
/* @__PURE__ */ u(ct, { slots: n }),
|
|
1016
|
+
/* @__PURE__ */ u(Ze, {}),
|
|
1017
|
+
/* @__PURE__ */ u(ct, { slots: o })
|
|
1049
1018
|
]
|
|
1050
1019
|
}
|
|
1051
1020
|
) })
|
|
1052
1021
|
);
|
|
1053
1022
|
}
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
}
|
|
1057
|
-
const cn = /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;
|
|
1058
|
-
function ln(t, e, n) {
|
|
1023
|
+
const ln = /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;
|
|
1024
|
+
function dn(t, e, n) {
|
|
1059
1025
|
const o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1060
1026
|
let s = !1;
|
|
1061
1027
|
return {
|
|
1062
1028
|
initializeColumns: S,
|
|
1063
1029
|
useVisibleColumns: m
|
|
1064
1030
|
};
|
|
1065
|
-
function
|
|
1066
|
-
if (!
|
|
1031
|
+
function f(i) {
|
|
1032
|
+
if (!ln.test(i))
|
|
1067
1033
|
throw new Error(`Column id "${i}" must be snake_case (e.g., "user_name", "is_active").`);
|
|
1068
1034
|
}
|
|
1069
1035
|
function g(i) {
|
|
@@ -1071,69 +1037,69 @@ function ln(t, e, n) {
|
|
|
1071
1037
|
`[DataGrid] Column "${i.id}": \`headerTruncate\` is deprecated, use \`headerOverflow: 'nowrap'\` instead. \`headerTruncate\` will be removed in a future release.`
|
|
1072
1038
|
)), { ...i, headerOverflow: "nowrap" });
|
|
1073
1039
|
}
|
|
1074
|
-
function
|
|
1075
|
-
|
|
1040
|
+
function c(i, a) {
|
|
1041
|
+
a !== "fixed" || process.env.NODE_ENV === "production" || i.width === "min-content" || [i.width, i.minWidth, i.maxWidth].filter(
|
|
1076
1042
|
(y) => y !== void 0
|
|
1077
1043
|
).length <= 1 || o.has(i.id) || (o.add(i.id), console.warn(
|
|
1078
1044
|
`[DataGrid] Column "${i.id}": width, minWidth, and maxWidth cannot all apply under tableLayout="fixed" -- they collapse to a single track (width wins when set). Use tableLayout="auto" for independent min/max constraints, or drop the extra prop(s).`
|
|
1079
1045
|
));
|
|
1080
1046
|
}
|
|
1081
|
-
function
|
|
1082
|
-
|
|
1047
|
+
function p(i, a) {
|
|
1048
|
+
a !== "auto" || process.env.NODE_ENV === "production" || s || i.length === 0 || !i.every(
|
|
1083
1049
|
(y) => y.width !== void 0 || y.maxWidth !== void 0
|
|
1084
1050
|
) || (s = !0, console.warn(
|
|
1085
1051
|
'[DataGrid] Every column has a width or maxWidth under tableLayout="auto" -- if the container is wider than their sum, the browser will grow columns past their caps and capped content will show trailing blank space. Leave at least one column without a width/maxWidth to absorb the extra space.'
|
|
1086
1052
|
));
|
|
1087
1053
|
}
|
|
1088
|
-
function
|
|
1089
|
-
const
|
|
1054
|
+
function l(i) {
|
|
1055
|
+
const a = [];
|
|
1090
1056
|
for (const h of i)
|
|
1091
|
-
if (
|
|
1057
|
+
if (R(h))
|
|
1092
1058
|
for (const y of h.columns)
|
|
1093
|
-
|
|
1059
|
+
a.push(g({ ...y, groupId: h.id }));
|
|
1094
1060
|
else
|
|
1095
|
-
|
|
1096
|
-
return
|
|
1061
|
+
a.push(g(h));
|
|
1062
|
+
return a;
|
|
1097
1063
|
}
|
|
1098
|
-
function
|
|
1099
|
-
const
|
|
1064
|
+
function d(i) {
|
|
1065
|
+
const a = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Set();
|
|
1100
1066
|
function y(C) {
|
|
1101
|
-
|
|
1067
|
+
a.set(C.id, C.visible ?? !0), C.visibleToggleDisabled && h.add(C.id);
|
|
1102
1068
|
}
|
|
1103
1069
|
for (const C of i)
|
|
1104
|
-
if (
|
|
1070
|
+
if (R(C))
|
|
1105
1071
|
for (const b of C.columns)
|
|
1106
1072
|
y(b);
|
|
1107
1073
|
else
|
|
1108
1074
|
y(C);
|
|
1109
1075
|
for (const [C, b] of Object.entries((n == null ? void 0 : n.read()) ?? {}))
|
|
1110
|
-
|
|
1111
|
-
return
|
|
1076
|
+
a.has(C) && !h.has(C) && a.set(C, b);
|
|
1077
|
+
return a;
|
|
1112
1078
|
}
|
|
1113
1079
|
function m() {
|
|
1114
1080
|
return t(
|
|
1115
1081
|
Y((i) => {
|
|
1116
|
-
const
|
|
1117
|
-
return e.getOrderedColumnsWithSticky(
|
|
1082
|
+
const a = i.flatColumns.filter((h) => i.columnVisibility.get(h.id) !== !1);
|
|
1083
|
+
return e.getOrderedColumnsWithSticky(a, i.columnSticky);
|
|
1118
1084
|
})
|
|
1119
1085
|
);
|
|
1120
1086
|
}
|
|
1121
1087
|
function S(i) {
|
|
1122
|
-
const
|
|
1123
|
-
for (const y of
|
|
1124
|
-
|
|
1125
|
-
return
|
|
1088
|
+
const a = l(i), { tableLayout: h } = t.getState();
|
|
1089
|
+
for (const y of a)
|
|
1090
|
+
f(y.id), c(y, h);
|
|
1091
|
+
return p(a, h), {
|
|
1126
1092
|
columns: i,
|
|
1127
|
-
flatColumns:
|
|
1128
|
-
columnVisibility:
|
|
1093
|
+
flatColumns: a,
|
|
1094
|
+
columnVisibility: d(i)
|
|
1129
1095
|
};
|
|
1130
1096
|
}
|
|
1131
1097
|
}
|
|
1132
|
-
const
|
|
1133
|
-
function
|
|
1098
|
+
const un = "columnVisibility";
|
|
1099
|
+
function fn(t) {
|
|
1134
1100
|
if (!t.config.persistentColumnVisibility) return;
|
|
1135
1101
|
const e = t.persistentState.registerPersistentState(
|
|
1136
|
-
|
|
1102
|
+
un,
|
|
1137
1103
|
{ storage: "localStorage" }
|
|
1138
1104
|
);
|
|
1139
1105
|
return { read: n, record: o };
|
|
@@ -1141,99 +1107,99 @@ function un(t) {
|
|
|
1141
1107
|
var s;
|
|
1142
1108
|
const r = (s = e.value) == null ? void 0 : s.columns;
|
|
1143
1109
|
return typeof r != "object" || r === null || Array.isArray(r) ? {} : Object.fromEntries(
|
|
1144
|
-
Object.entries(r).filter(([,
|
|
1110
|
+
Object.entries(r).filter(([, f]) => typeof f == "boolean")
|
|
1145
1111
|
);
|
|
1146
1112
|
}
|
|
1147
1113
|
function o(r, s) {
|
|
1148
1114
|
e.setValue({ columns: { ...n(), [r]: s } });
|
|
1149
1115
|
}
|
|
1150
1116
|
}
|
|
1151
|
-
function
|
|
1117
|
+
function pn(t) {
|
|
1152
1118
|
const e = /* @__PURE__ */ new Set();
|
|
1153
1119
|
return {
|
|
1154
1120
|
registerExtraColumn: n,
|
|
1155
1121
|
updateExtraColumnWidth: r,
|
|
1156
1122
|
updateExtraColumnOrder: s,
|
|
1157
|
-
updateExtraColumnSticky:
|
|
1123
|
+
updateExtraColumnSticky: f,
|
|
1158
1124
|
useExtraColumns: g
|
|
1159
1125
|
};
|
|
1160
|
-
function n(
|
|
1161
|
-
const
|
|
1162
|
-
id:
|
|
1163
|
-
header:
|
|
1164
|
-
body:
|
|
1165
|
-
width:
|
|
1166
|
-
sticky:
|
|
1167
|
-
ignoreRowClick:
|
|
1126
|
+
function n(c) {
|
|
1127
|
+
const p = t.getState(), l = c.position ?? "end", d = l === "start" ? p.extraColumnsStart : p.extraColumnsEnd, m = c.order ?? (d.length + 1) * 10, S = {
|
|
1128
|
+
id: c.id ?? Math.random().toString(36).slice(2),
|
|
1129
|
+
header: c.header,
|
|
1130
|
+
body: c.body,
|
|
1131
|
+
width: c.width,
|
|
1132
|
+
sticky: c.sticky,
|
|
1133
|
+
ignoreRowClick: c.ignoreRowClick,
|
|
1168
1134
|
order: m,
|
|
1169
|
-
position:
|
|
1170
|
-
}, i = [...
|
|
1171
|
-
|
|
1135
|
+
position: l
|
|
1136
|
+
}, i = [...d, S].sort((a, h) => a.order - h.order);
|
|
1137
|
+
l === "start" ? (o(S.id, S.sticky), t.setState({ extraColumnsStart: i })) : t.setState({ extraColumnsEnd: i });
|
|
1172
1138
|
}
|
|
1173
|
-
function o(
|
|
1174
|
-
process.env.NODE_ENV !== "production" &&
|
|
1175
|
-
`[DataGrid] Extra column "${
|
|
1139
|
+
function o(c, p) {
|
|
1140
|
+
process.env.NODE_ENV !== "production" && p && (e.has(c) || (e.add(c), console.warn(
|
|
1141
|
+
`[DataGrid] Extra column "${c}": \`sticky\` pins to the table's inline-end edge and is read only for columns at the \`end\` position -- on a \`start\` column it does nothing. Drop the flag, or register the column at the \`end\` position.`
|
|
1176
1142
|
)));
|
|
1177
1143
|
}
|
|
1178
|
-
function r(
|
|
1179
|
-
const
|
|
1180
|
-
function
|
|
1181
|
-
const
|
|
1182
|
-
if (
|
|
1144
|
+
function r(c, p) {
|
|
1145
|
+
const l = t.getState();
|
|
1146
|
+
function d(i) {
|
|
1147
|
+
const a = i.findIndex((y) => y.id === c);
|
|
1148
|
+
if (a === -1) return;
|
|
1183
1149
|
const h = [...i];
|
|
1184
|
-
return h[
|
|
1150
|
+
return h[a] = { ...h[a], width: p }, h;
|
|
1185
1151
|
}
|
|
1186
|
-
const m =
|
|
1152
|
+
const m = d(l.extraColumnsStart);
|
|
1187
1153
|
if (m) {
|
|
1188
1154
|
t.setState({ extraColumnsStart: m });
|
|
1189
1155
|
return;
|
|
1190
1156
|
}
|
|
1191
|
-
const S =
|
|
1157
|
+
const S = d(l.extraColumnsEnd);
|
|
1192
1158
|
S && t.setState({ extraColumnsEnd: S });
|
|
1193
1159
|
}
|
|
1194
|
-
function s(
|
|
1195
|
-
const
|
|
1196
|
-
function
|
|
1197
|
-
const
|
|
1198
|
-
if (
|
|
1160
|
+
function s(c, p) {
|
|
1161
|
+
const l = t.getState();
|
|
1162
|
+
function d(i) {
|
|
1163
|
+
const a = i.findIndex((y) => y.id === c);
|
|
1164
|
+
if (a === -1) return;
|
|
1199
1165
|
const h = [...i];
|
|
1200
|
-
return h[
|
|
1166
|
+
return h[a] = { ...h[a], order: p }, h.sort((y, C) => y.order - C.order);
|
|
1201
1167
|
}
|
|
1202
|
-
const m =
|
|
1168
|
+
const m = d(l.extraColumnsStart);
|
|
1203
1169
|
if (m) {
|
|
1204
1170
|
t.setState({ extraColumnsStart: m });
|
|
1205
1171
|
return;
|
|
1206
1172
|
}
|
|
1207
|
-
const S =
|
|
1173
|
+
const S = d(l.extraColumnsEnd);
|
|
1208
1174
|
S && t.setState({ extraColumnsEnd: S });
|
|
1209
1175
|
}
|
|
1210
|
-
function
|
|
1211
|
-
const
|
|
1212
|
-
if (i === -1 || (
|
|
1213
|
-
const
|
|
1214
|
-
|
|
1176
|
+
function f(c, p) {
|
|
1177
|
+
const l = t.getState(), d = l.extraColumnsStart.some((h) => h.id === c), m = d ? "extraColumnsStart" : "extraColumnsEnd", S = l[m], i = S.findIndex((h) => h.id === c);
|
|
1178
|
+
if (i === -1 || (d && o(c, p), (S[i].sticky ?? !1) === p)) return;
|
|
1179
|
+
const a = [...S];
|
|
1180
|
+
a[i] = { ...a[i], sticky: p }, t.setState({ [m]: a });
|
|
1215
1181
|
}
|
|
1216
|
-
function g(
|
|
1217
|
-
return t((
|
|
1182
|
+
function g(c) {
|
|
1183
|
+
return t((p) => c === "start" ? p.extraColumnsStart : p.extraColumnsEnd);
|
|
1218
1184
|
}
|
|
1219
1185
|
}
|
|
1220
|
-
function
|
|
1186
|
+
function Sn(t, e, n) {
|
|
1221
1187
|
const o = [];
|
|
1222
1188
|
let r = null, s = null;
|
|
1223
1189
|
return {
|
|
1224
|
-
useHasGroups:
|
|
1225
|
-
useFirstRowHeaderCells:
|
|
1190
|
+
useHasGroups: l,
|
|
1191
|
+
useFirstRowHeaderCells: d,
|
|
1226
1192
|
useSecondRowHeaderColumns: m
|
|
1227
1193
|
};
|
|
1228
|
-
function
|
|
1229
|
-
const S = t.getState(), i = S.flatColumns.filter((
|
|
1194
|
+
function f() {
|
|
1195
|
+
const S = t.getState(), i = S.flatColumns.filter((a) => S.columnVisibility.get(a.id) !== !1);
|
|
1230
1196
|
return e.getOrderedColumnsWithSticky(i, S.columnSticky);
|
|
1231
1197
|
}
|
|
1232
1198
|
function g() {
|
|
1233
|
-
return t.getState().columns.some(
|
|
1199
|
+
return t.getState().columns.some(R);
|
|
1234
1200
|
}
|
|
1235
|
-
function
|
|
1236
|
-
const S = t.getState(), i =
|
|
1201
|
+
function c() {
|
|
1202
|
+
const S = t.getState(), i = f();
|
|
1237
1203
|
if (!g()) {
|
|
1238
1204
|
const y = S.components.get("header-cell") ?? n.get("header-cell");
|
|
1239
1205
|
return i.map((C) => ({
|
|
@@ -1242,12 +1208,12 @@ function pn(t, e, n) {
|
|
|
1242
1208
|
component: y
|
|
1243
1209
|
}));
|
|
1244
1210
|
}
|
|
1245
|
-
const
|
|
1211
|
+
const a = new Map(i.map((y, C) => [y.id, C]));
|
|
1246
1212
|
return [...S.columns].sort((y, C) => {
|
|
1247
|
-
const b =
|
|
1213
|
+
const b = R(y) ? Math.min(...y.columns.map((_) => a.get(_.id) ?? 1 / 0)) : a.get(y.id) ?? 1 / 0, v = R(C) ? Math.min(...C.columns.map((_) => a.get(_.id) ?? 1 / 0)) : a.get(C.id) ?? 1 / 0;
|
|
1248
1214
|
return b - v;
|
|
1249
1215
|
}).flatMap((y) => {
|
|
1250
|
-
if (
|
|
1216
|
+
if (R(y)) {
|
|
1251
1217
|
const C = y.columns.filter(
|
|
1252
1218
|
(b) => S.columnVisibility.get(b.id) !== !1
|
|
1253
1219
|
).length;
|
|
@@ -1266,19 +1232,19 @@ function pn(t, e, n) {
|
|
|
1266
1232
|
};
|
|
1267
1233
|
});
|
|
1268
1234
|
}
|
|
1269
|
-
function
|
|
1235
|
+
function p() {
|
|
1270
1236
|
if (!g()) return o;
|
|
1271
1237
|
const S = t.getState();
|
|
1272
|
-
return
|
|
1238
|
+
return f().filter((a) => a.groupId && S.columnVisibility.get(a.id) !== !1);
|
|
1273
1239
|
}
|
|
1274
|
-
function
|
|
1275
|
-
return t((S) => S.columns.some(
|
|
1240
|
+
function l() {
|
|
1241
|
+
return t((S) => S.columns.some(R));
|
|
1276
1242
|
}
|
|
1277
|
-
function
|
|
1243
|
+
function d() {
|
|
1278
1244
|
return t((S) => {
|
|
1279
1245
|
if (r !== null && r.state === S)
|
|
1280
1246
|
return r.result;
|
|
1281
|
-
const i =
|
|
1247
|
+
const i = c();
|
|
1282
1248
|
return r = { state: S, result: i }, i;
|
|
1283
1249
|
});
|
|
1284
1250
|
}
|
|
@@ -1286,122 +1252,122 @@ function pn(t, e, n) {
|
|
|
1286
1252
|
return t((S) => {
|
|
1287
1253
|
if (s !== null && s.state === S)
|
|
1288
1254
|
return s.result;
|
|
1289
|
-
const i =
|
|
1255
|
+
const i = p();
|
|
1290
1256
|
return s = { state: S, result: i }, i;
|
|
1291
1257
|
});
|
|
1292
1258
|
}
|
|
1293
1259
|
}
|
|
1294
1260
|
const lt = [];
|
|
1295
|
-
function
|
|
1261
|
+
function mn(t) {
|
|
1296
1262
|
return {
|
|
1297
1263
|
registerSlot: e,
|
|
1298
1264
|
useSlots: n
|
|
1299
1265
|
};
|
|
1300
1266
|
function e(o, r) {
|
|
1301
|
-
const s = t.getState(),
|
|
1302
|
-
id:
|
|
1267
|
+
const s = t.getState(), f = Math.random().toString(36).slice(2), g = s.slots.get(o) ?? lt, c = r.order ?? (g.length + 1) * 10, p = {
|
|
1268
|
+
id: f,
|
|
1303
1269
|
name: o,
|
|
1304
1270
|
component: r.component,
|
|
1305
|
-
order:
|
|
1306
|
-
},
|
|
1307
|
-
|
|
1271
|
+
order: c
|
|
1272
|
+
}, l = [...g, p].sort((m, S) => m.order - S.order), d = new Map(s.slots);
|
|
1273
|
+
d.set(o, l), t.setState({ slots: d });
|
|
1308
1274
|
}
|
|
1309
1275
|
function n(o) {
|
|
1310
1276
|
return t(Y((r) => r.slots.get(o) ?? lt));
|
|
1311
1277
|
}
|
|
1312
1278
|
}
|
|
1313
|
-
const
|
|
1314
|
-
function
|
|
1279
|
+
const hn = /^\s*(\d+(?:\.\d+)?)px\s*$/;
|
|
1280
|
+
function yn(t) {
|
|
1315
1281
|
return {
|
|
1316
1282
|
initializeStickyState: e,
|
|
1317
1283
|
getOrderedColumnsWithSticky: n,
|
|
1318
1284
|
onResizeColumn: o,
|
|
1319
1285
|
isColumnSticky: r,
|
|
1320
1286
|
isGroupSticky: s,
|
|
1321
|
-
useColumnStickyOffset:
|
|
1287
|
+
useColumnStickyOffset: f,
|
|
1322
1288
|
useColumnEndStickyOffset: g,
|
|
1323
|
-
useGroupStickyOffset:
|
|
1289
|
+
useGroupStickyOffset: c
|
|
1324
1290
|
};
|
|
1325
|
-
function e(
|
|
1326
|
-
const
|
|
1327
|
-
for (const S of
|
|
1328
|
-
if (
|
|
1291
|
+
function e(l) {
|
|
1292
|
+
const d = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
|
|
1293
|
+
for (const S of l)
|
|
1294
|
+
if (R(S)) {
|
|
1329
1295
|
m.set(S.id, S.sticky ?? !1);
|
|
1330
1296
|
for (const i of S.columns)
|
|
1331
|
-
|
|
1297
|
+
d.set(i.id, i.sticky ?? S.sticky ?? !1);
|
|
1332
1298
|
} else
|
|
1333
|
-
|
|
1334
|
-
return { columnSticky:
|
|
1299
|
+
d.set(S.id, S.sticky ?? !1);
|
|
1300
|
+
return { columnSticky: d, groupSticky: m };
|
|
1335
1301
|
}
|
|
1336
|
-
function n(
|
|
1302
|
+
function n(l, d) {
|
|
1337
1303
|
const m = [], S = [];
|
|
1338
|
-
for (const i of
|
|
1339
|
-
|
|
1304
|
+
for (const i of l)
|
|
1305
|
+
d.get(i.id) ? m.push(i) : S.push(i);
|
|
1340
1306
|
return [...m, ...S];
|
|
1341
1307
|
}
|
|
1342
|
-
function o(
|
|
1308
|
+
function o(l, d) {
|
|
1343
1309
|
const m = t.getState().columnWidths;
|
|
1344
|
-
if (m.get(
|
|
1310
|
+
if (m.get(l) === d) return;
|
|
1345
1311
|
const S = new Map(m);
|
|
1346
|
-
S.set(
|
|
1312
|
+
S.set(l, d), t.setState({ columnWidths: S });
|
|
1347
1313
|
}
|
|
1348
|
-
function r(
|
|
1349
|
-
return t.getState().columnSticky.get(
|
|
1314
|
+
function r(l) {
|
|
1315
|
+
return t.getState().columnSticky.get(l) === !0;
|
|
1350
1316
|
}
|
|
1351
|
-
function s(
|
|
1352
|
-
return t.getState().groupSticky.get(
|
|
1317
|
+
function s(l) {
|
|
1318
|
+
return t.getState().groupSticky.get(l) === !0;
|
|
1353
1319
|
}
|
|
1354
|
-
function l
|
|
1355
|
-
return t((
|
|
1356
|
-
if (!
|
|
1357
|
-
let m =
|
|
1358
|
-
const S =
|
|
1320
|
+
function f(l) {
|
|
1321
|
+
return t((d) => {
|
|
1322
|
+
if (!d.columnSticky.get(l)) return;
|
|
1323
|
+
let m = p(d);
|
|
1324
|
+
const S = d.flatColumns.filter((i) => d.columnVisibility.get(i.id) !== !1);
|
|
1359
1325
|
for (const i of S) {
|
|
1360
|
-
if (i.id ===
|
|
1361
|
-
|
|
1326
|
+
if (i.id === l) break;
|
|
1327
|
+
d.columnSticky.get(i.id) && (m += d.columnWidths.get(i.id) ?? 0);
|
|
1362
1328
|
}
|
|
1363
1329
|
return m;
|
|
1364
1330
|
});
|
|
1365
1331
|
}
|
|
1366
|
-
function g(
|
|
1367
|
-
return t((
|
|
1332
|
+
function g(l) {
|
|
1333
|
+
return t((d) => gn(d, l));
|
|
1368
1334
|
}
|
|
1369
|
-
function
|
|
1370
|
-
return t((
|
|
1371
|
-
if (!
|
|
1372
|
-
let m =
|
|
1373
|
-
const S =
|
|
1335
|
+
function c(l) {
|
|
1336
|
+
return t((d) => {
|
|
1337
|
+
if (!d.groupSticky.get(l)) return;
|
|
1338
|
+
let m = p(d);
|
|
1339
|
+
const S = d.flatColumns.filter((i) => d.columnVisibility.get(i.id) !== !1);
|
|
1374
1340
|
for (const i of S) {
|
|
1375
|
-
if (i.groupId ===
|
|
1376
|
-
|
|
1341
|
+
if (i.groupId === l) break;
|
|
1342
|
+
d.columnSticky.get(i.id) && (m += d.columnWidths.get(i.id) ?? 0);
|
|
1377
1343
|
}
|
|
1378
1344
|
return m;
|
|
1379
1345
|
});
|
|
1380
1346
|
}
|
|
1381
|
-
function
|
|
1382
|
-
let
|
|
1383
|
-
for (const m of
|
|
1384
|
-
m.width && (
|
|
1385
|
-
return
|
|
1347
|
+
function p(l) {
|
|
1348
|
+
let d = 0;
|
|
1349
|
+
for (const m of l.extraColumnsStart)
|
|
1350
|
+
m.width && (d += parseInt(m.width, 10) || 0);
|
|
1351
|
+
return d;
|
|
1386
1352
|
}
|
|
1387
1353
|
}
|
|
1388
|
-
function
|
|
1354
|
+
function gn(t, e) {
|
|
1389
1355
|
let n = 0;
|
|
1390
1356
|
for (let o = t.extraColumnsEnd.length - 1; o >= 0; o--) {
|
|
1391
1357
|
const r = t.extraColumnsEnd[o];
|
|
1392
1358
|
if (r.sticky) {
|
|
1393
1359
|
if (r.id === e) return n;
|
|
1394
|
-
n +=
|
|
1360
|
+
n += Cn(t, r);
|
|
1395
1361
|
}
|
|
1396
1362
|
}
|
|
1397
1363
|
}
|
|
1398
|
-
function
|
|
1364
|
+
function Cn(t, e) {
|
|
1399
1365
|
const n = t.columnWidths.get(e.id);
|
|
1400
1366
|
if (n !== void 0) return n;
|
|
1401
|
-
const o =
|
|
1367
|
+
const o = hn.exec(e.width ?? "");
|
|
1402
1368
|
return o ? Number(o[1]) : 0;
|
|
1403
1369
|
}
|
|
1404
|
-
function
|
|
1370
|
+
function wn() {
|
|
1405
1371
|
return z(() => ({
|
|
1406
1372
|
columns: [],
|
|
1407
1373
|
flatColumns: [],
|
|
@@ -1418,30 +1384,30 @@ function Cn() {
|
|
|
1418
1384
|
stickyHeader: !1
|
|
1419
1385
|
}));
|
|
1420
1386
|
}
|
|
1421
|
-
function
|
|
1422
|
-
const e =
|
|
1387
|
+
function bn(t) {
|
|
1388
|
+
const e = wn(), n = vn();
|
|
1423
1389
|
t.layout.registerSlot("main", {
|
|
1424
1390
|
id: q,
|
|
1425
|
-
component:
|
|
1391
|
+
component: cn,
|
|
1426
1392
|
active: !0,
|
|
1427
1393
|
icon: At
|
|
1428
1394
|
});
|
|
1429
|
-
const o =
|
|
1395
|
+
const o = mn(e), r = pn(e), s = yn(e), f = fn(t), g = dn(e, s, f), c = Sn(e, s, n), p = en(e), l = {
|
|
1430
1396
|
registerTableSlot: o.registerSlot,
|
|
1431
1397
|
registerExtraColumn: r.registerExtraColumn,
|
|
1432
1398
|
updateExtraColumnWidth: r.updateExtraColumnWidth,
|
|
1433
1399
|
updateExtraColumnOrder: r.updateExtraColumnOrder,
|
|
1434
1400
|
updateExtraColumnSticky: r.updateExtraColumnSticky,
|
|
1435
1401
|
registerComponent: C,
|
|
1436
|
-
updateColumns:
|
|
1402
|
+
updateColumns: d,
|
|
1437
1403
|
updateColumnVisibility: m,
|
|
1438
1404
|
updateColumnSticky: y,
|
|
1439
1405
|
updateTableLayout: S,
|
|
1440
|
-
updateStickyHeader:
|
|
1406
|
+
updateStickyHeader: a
|
|
1441
1407
|
};
|
|
1442
|
-
return t.plugins.registerPublicApi(
|
|
1443
|
-
...
|
|
1444
|
-
updateColumns:
|
|
1408
|
+
return t.plugins.registerPublicApi(l), {
|
|
1409
|
+
...l,
|
|
1410
|
+
updateColumns: d,
|
|
1445
1411
|
useComponent: b,
|
|
1446
1412
|
useConfigurationColumns: _,
|
|
1447
1413
|
useTableLayout: i,
|
|
@@ -1450,10 +1416,10 @@ function wn(t) {
|
|
|
1450
1416
|
...r,
|
|
1451
1417
|
...s,
|
|
1452
1418
|
...g,
|
|
1453
|
-
...
|
|
1454
|
-
...
|
|
1419
|
+
...c,
|
|
1420
|
+
...p
|
|
1455
1421
|
};
|
|
1456
|
-
function
|
|
1422
|
+
function d(w) {
|
|
1457
1423
|
const x = g.initializeColumns(w), { columnSticky: L, groupSticky: E } = s.initializeStickyState(w), k = e.getState();
|
|
1458
1424
|
e.setState({
|
|
1459
1425
|
...x,
|
|
@@ -1469,7 +1435,7 @@ function wn(t) {
|
|
|
1469
1435
|
}
|
|
1470
1436
|
function m(w, x) {
|
|
1471
1437
|
const L = e.getState(), E = new Map(L.columnVisibility);
|
|
1472
|
-
E.set(w, x), e.setState({ columnVisibility: E }),
|
|
1438
|
+
E.set(w, x), e.setState({ columnVisibility: E }), f == null || f.record(w, x);
|
|
1473
1439
|
}
|
|
1474
1440
|
function S(w) {
|
|
1475
1441
|
e.setState({ tableLayout: w });
|
|
@@ -1477,7 +1443,7 @@ function wn(t) {
|
|
|
1477
1443
|
function i() {
|
|
1478
1444
|
return e((w) => w.tableLayout);
|
|
1479
1445
|
}
|
|
1480
|
-
function
|
|
1446
|
+
function a(w) {
|
|
1481
1447
|
e.setState({ stickyHeader: w });
|
|
1482
1448
|
}
|
|
1483
1449
|
function h() {
|
|
@@ -1485,7 +1451,7 @@ function wn(t) {
|
|
|
1485
1451
|
}
|
|
1486
1452
|
function y(w, x) {
|
|
1487
1453
|
const L = e.getState();
|
|
1488
|
-
if (L.columns.some((k) =>
|
|
1454
|
+
if (L.columns.some((k) => R(k) && k.id === w)) {
|
|
1489
1455
|
const k = new Map(L.groupSticky);
|
|
1490
1456
|
k.set(w, x), e.setState({ groupSticky: k });
|
|
1491
1457
|
} else {
|
|
@@ -1526,7 +1492,7 @@ function wn(t) {
|
|
|
1526
1492
|
visibleToggleDisabled: I.visibleToggleDisabled ?? (tt && k === 1)
|
|
1527
1493
|
};
|
|
1528
1494
|
}
|
|
1529
|
-
return w.map((I) =>
|
|
1495
|
+
return w.map((I) => R(I) ? {
|
|
1530
1496
|
id: I.id,
|
|
1531
1497
|
label: v(I.label),
|
|
1532
1498
|
visible: I.visible ?? !0,
|
|
@@ -1536,12 +1502,12 @@ function wn(t) {
|
|
|
1536
1502
|
}, [w, x, L, E]);
|
|
1537
1503
|
}
|
|
1538
1504
|
}
|
|
1539
|
-
function
|
|
1505
|
+
function vn() {
|
|
1540
1506
|
const t = /* @__PURE__ */ new Map();
|
|
1541
|
-
return t.set("body-cell-content",
|
|
1507
|
+
return t.set("body-cell-content", Ee), t.set("content", Le), t.set("header-cell-label", Ie), t.set("header-group", bt), t.set("row", je), t;
|
|
1542
1508
|
}
|
|
1543
|
-
function
|
|
1544
|
-
const e =
|
|
1509
|
+
function kn(t) {
|
|
1510
|
+
const e = he(), n = {}, o = {
|
|
1545
1511
|
hooked: e,
|
|
1546
1512
|
config: t,
|
|
1547
1513
|
get plugins() {
|
|
@@ -1566,7 +1532,7 @@ function vn(t) {
|
|
|
1566
1532
|
return W(n.table, "table");
|
|
1567
1533
|
}
|
|
1568
1534
|
};
|
|
1569
|
-
return n.plugins =
|
|
1535
|
+
return n.plugins = xe(o), n.core = me(), n.load = be(o), n.storage = _e(o), n.persistentState = ve(o), n.layout = Ce(o), n.table = bn(o), {
|
|
1570
1536
|
init: s,
|
|
1571
1537
|
destroy: r,
|
|
1572
1538
|
...o.plugins.pluginContext,
|
|
@@ -1574,12 +1540,12 @@ function vn(t) {
|
|
|
1574
1540
|
};
|
|
1575
1541
|
function r() {
|
|
1576
1542
|
e.callHookSync("destroy");
|
|
1577
|
-
const
|
|
1578
|
-
o.load.abort(),
|
|
1543
|
+
const f = o.core.useLoadStateStore.getState().loadState === "loading" && o.load.getLoadInstances().length > 0;
|
|
1544
|
+
o.load.abort(), f && o.core.resetLoadState();
|
|
1579
1545
|
}
|
|
1580
1546
|
async function s() {
|
|
1581
|
-
const { loadState:
|
|
1582
|
-
|
|
1547
|
+
const { loadState: f } = o.core.useLoadStateStore.getState();
|
|
1548
|
+
f === "loaded" || f === "loading" || await o.core.loadPromise(o.load.init());
|
|
1583
1549
|
}
|
|
1584
1550
|
}
|
|
1585
1551
|
function W(t, e) {
|
|
@@ -1587,64 +1553,58 @@ function W(t, e) {
|
|
|
1587
1553
|
throw new Error(`[DataGrid] The ${e} service was used before it was created.`);
|
|
1588
1554
|
return t;
|
|
1589
1555
|
}
|
|
1590
|
-
function kn(t) {
|
|
1591
|
-
const e = F(t);
|
|
1592
|
-
return A(() => {
|
|
1593
|
-
e.current = t;
|
|
1594
|
-
}, [t]), e;
|
|
1595
|
-
}
|
|
1596
1556
|
const xn = [];
|
|
1597
|
-
function
|
|
1557
|
+
function Pn({
|
|
1598
1558
|
name: t,
|
|
1599
1559
|
load: e,
|
|
1600
1560
|
columns: n,
|
|
1601
1561
|
children: o,
|
|
1602
1562
|
persistent: r,
|
|
1603
1563
|
persistentColumnVisibility: s,
|
|
1604
|
-
tableLayout:
|
|
1564
|
+
tableLayout: f = "fixed",
|
|
1605
1565
|
stickyHeader: g = !1,
|
|
1606
|
-
loading:
|
|
1607
|
-
implicitFilterKeys:
|
|
1566
|
+
loading: c = !1,
|
|
1567
|
+
implicitFilterKeys: p
|
|
1608
1568
|
}) {
|
|
1609
|
-
const
|
|
1610
|
-
() =>
|
|
1569
|
+
const l = Nt(e), [d] = Dt(
|
|
1570
|
+
() => kn({
|
|
1611
1571
|
name: t,
|
|
1612
|
-
load:
|
|
1572
|
+
load: l,
|
|
1613
1573
|
persistent: r,
|
|
1614
1574
|
persistentColumnVisibility: s
|
|
1615
1575
|
})
|
|
1616
1576
|
);
|
|
1617
1577
|
return A(() => {
|
|
1618
|
-
|
|
1619
|
-
}, [
|
|
1620
|
-
|
|
1621
|
-
}, [
|
|
1622
|
-
|
|
1623
|
-
}, [
|
|
1624
|
-
|
|
1625
|
-
}, [
|
|
1626
|
-
|
|
1627
|
-
|
|
1578
|
+
d.updateTableLayout(f);
|
|
1579
|
+
}, [d, f]), A(() => {
|
|
1580
|
+
d.updateColumns(n);
|
|
1581
|
+
}, [d, n]), A(() => {
|
|
1582
|
+
d.updateStickyHeader(g);
|
|
1583
|
+
}, [d, g]), A(() => {
|
|
1584
|
+
d[U].core.updateLoading(c);
|
|
1585
|
+
}, [d, c]), A(() => {
|
|
1586
|
+
d[U].storage.updateImplicitFilterKeys(
|
|
1587
|
+
p ?? xn
|
|
1628
1588
|
);
|
|
1629
|
-
}, [
|
|
1589
|
+
}, [d, p]), /* @__PURE__ */ D(Rt, { value: d, children: [
|
|
1630
1590
|
o,
|
|
1631
|
-
/* @__PURE__ */
|
|
1591
|
+
/* @__PURE__ */ u(Gt, { fallback: /* @__PURE__ */ u(X, {}), children: /* @__PURE__ */ u(Se, {}) })
|
|
1632
1592
|
] });
|
|
1633
1593
|
}
|
|
1634
|
-
const
|
|
1594
|
+
const Tn = {
|
|
1635
1595
|
table: q,
|
|
1636
1596
|
cards: yt
|
|
1637
1597
|
};
|
|
1638
|
-
function
|
|
1639
|
-
return
|
|
1598
|
+
function $n() {
|
|
1599
|
+
return O().layout.useLayoutStore((e) => e.activeSlotIds.get("main"));
|
|
1640
1600
|
}
|
|
1641
1601
|
export {
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1602
|
+
Tn as DATA_GRID_VIEW,
|
|
1603
|
+
Pn as DataGrid,
|
|
1604
|
+
jn as createDataGridPlugin,
|
|
1605
|
+
F as useDataGrid,
|
|
1606
|
+
$n as useDataGridActiveView,
|
|
1607
|
+
Kn as useDataGridPluginContext,
|
|
1608
|
+
zn as useDataGridRecord
|
|
1649
1609
|
};
|
|
1650
1610
|
//# sourceMappingURL=data-grid.js.map
|