@alfadocs/ui-kit 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{actions-cell-renderer-DaL80uqL.js → actions-cell-renderer-ClGCSQnA.js} +600 -565
- package/dist/_chunks/{ai-consent-banner-BXD7W6FI.js → ai-consent-banner-DKgFfSzc.js} +2 -2
- package/dist/_chunks/{alert-Cxaqd-QO.js → alert-DS22ha1n.js} +103 -98
- package/dist/_chunks/{annotation-marker-qt5R9WZX.js → annotation-marker-CsUJGZjQ.js} +7 -5
- package/dist/_chunks/{audio-recorder-BjnB7V8n.js → audio-recorder-sRsGS-0V.js} +2 -2
- package/dist/_chunks/{booking-DSOK-bnR.js → booking-D8fCzcUd.js} +2 -2
- package/dist/_chunks/{care-plan-card-BrwhyIJI.js → care-plan-card-DjjVnBYz.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-DWEdCQM3.js → care-plan-entry-card-BVhpvd-P.js} +2 -2
- package/dist/_chunks/{collapsible-BrnRiCC6.js → collapsible-CGL9ontS.js} +65 -61
- package/dist/_chunks/{document-preview-DXsCEj4U.js → document-preview-DAczwybt.js} +2 -2
- package/dist/_chunks/{document-scanner-cS_ispQs.js → document-scanner-BRYIc3A-.js} +2 -2
- package/dist/_chunks/{entity-summary-BILN4wEG.js → entity-summary-BS6n7Iah.js} +2 -2
- package/dist/_chunks/{face-scheme-CjQAHvSP.js → face-scheme-Cou2efl7.js} +2 -2
- package/dist/_chunks/{file-manager-B9LZzT5E.js → file-manager-CNSLiuLo.js} +2 -2
- package/dist/_chunks/{freemium-paywall-Dr2342_S.js → freemium-paywall-DsT7MaLd.js} +2 -2
- package/dist/_chunks/link-cell-renderer-_DlEZHLI.js +772 -0
- package/dist/_chunks/{marketplace-app-shell-pCHBp8bo.js → marketplace-app-shell-DQC9Gpm0.js} +2 -2
- package/dist/_chunks/{muscle-scheme-kgCX5qfO.js → muscle-scheme-yfzP_xoJ.js} +2 -2
- package/dist/_chunks/{patient-details-UmNcxL0c.js → patient-details-l7pnsUq9.js} +2 -2
- package/dist/_chunks/{patient-search-vtRTSdf6.js → patient-search-H54Utav2.js} +2 -2
- package/dist/_chunks/{patient-table-QEVsFvwq.js → patient-table-DXk0wW8Q.js} +243 -239
- package/dist/_chunks/payment-automation-upsell-C4LIw1iQ.js +305 -0
- package/dist/_chunks/{payment-form-BoGxEmGn.js → payment-form-CyKT20xZ.js} +2 -2
- package/dist/_chunks/{payment-request-card-CygO1anM.js → payment-request-card-CN30J6yM.js} +107 -138
- package/dist/_chunks/{pdf-viewer-CcOuR2wj.js → pdf-viewer-DHg8SfUI.js} +2 -2
- package/dist/_chunks/{practice-results-yKbwIxqa.js → practice-results-qvJRkvLn.js} +2 -2
- package/dist/_chunks/receipt-euro-C6k4Gzhr.js +36 -0
- package/dist/_chunks/{reviews-panel-DmOjvmyH.js → reviews-panel-BfUJhx3m.js} +2 -2
- package/dist/_chunks/{sign-document-cH9CboWB.js → sign-document-D70TEUw9.js} +2 -2
- package/dist/_chunks/{signature-request-BzXTV_RH.js → signature-request-BlNCXpRN.js} +2 -2
- package/dist/_chunks/sparkline-DLq7xwic.js +394 -0
- package/dist/_chunks/{warning-stack-DKeAfj5M.js → warning-stack-IVf0oxh2.js} +2 -2
- package/dist/_chunks/{workflow-map-SIfAhmWz.js → workflow-map-ByyBYj6Y.js} +2 -2
- package/dist/agent-catalog.json +211 -7
- package/dist/agent-i18n/en.json +13 -3
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/alert/alert.d.ts +20 -0
- package/dist/components/alert/index.d.ts +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/annotation-marker/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/data-table/filters/select-filter.d.ts +6 -0
- package/dist/components/data-table/hooks/use-presentational-aria-fix.d.ts +19 -0
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/sparkline/index.d.ts +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.d.ts +36 -3
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/host-compat.css +10 -1
- package/dist/i18n/locales/ar.d.ts +1 -0
- package/dist/i18n/locales/ar.js +1 -0
- package/dist/i18n/locales/de.d.ts +1 -0
- package/dist/i18n/locales/de.js +1 -0
- package/dist/i18n/locales/el.d.ts +1 -0
- package/dist/i18n/locales/el.js +1 -0
- package/dist/i18n/locales/en.d.ts +1 -0
- package/dist/i18n/locales/en.js +1 -0
- package/dist/i18n/locales/es.d.ts +1 -0
- package/dist/i18n/locales/es.js +1 -0
- package/dist/i18n/locales/fr.d.ts +1 -0
- package/dist/i18n/locales/fr.js +1 -0
- package/dist/i18n/locales/hi.d.ts +1 -0
- package/dist/i18n/locales/hi.js +1 -0
- package/dist/i18n/locales/it.d.ts +1 -0
- package/dist/i18n/locales/it.js +1 -0
- package/dist/i18n/locales/ja.d.ts +1 -0
- package/dist/i18n/locales/ja.js +1 -0
- package/dist/i18n/locales/nl.d.ts +1 -0
- package/dist/i18n/locales/nl.js +1 -0
- package/dist/i18n/locales/pl.d.ts +1 -0
- package/dist/i18n/locales/pl.js +1 -0
- package/dist/i18n/locales/pt.d.ts +1 -0
- package/dist/i18n/locales/pt.js +1 -0
- package/dist/i18n/locales/ro.d.ts +1 -0
- package/dist/i18n/locales/ro.js +1 -0
- package/dist/i18n/locales/ru.d.ts +1 -0
- package/dist/i18n/locales/ru.js +1 -0
- package/dist/i18n/locales/sq.d.ts +1 -0
- package/dist/i18n/locales/sq.js +1 -0
- package/dist/i18n/locales/sv.d.ts +1 -0
- package/dist/i18n/locales/sv.js +1 -0
- package/dist/i18n/locales/tr.d.ts +1 -0
- package/dist/i18n/locales/tr.js +1 -0
- package/dist/i18n/locales/zh.d.ts +1 -0
- package/dist/i18n/locales/zh.js +1 -0
- package/dist/index.js +974 -1268
- package/dist/locales/ar.json +1 -0
- package/dist/locales/de.json +1 -0
- package/dist/locales/el.json +1 -0
- package/dist/locales/en.json +1 -0
- package/dist/locales/es.json +1 -0
- package/dist/locales/fr.json +1 -0
- package/dist/locales/hi.json +1 -0
- package/dist/locales/it.json +1 -0
- package/dist/locales/ja.json +1 -0
- package/dist/locales/nl.json +1 -0
- package/dist/locales/pl.json +1 -0
- package/dist/locales/pt.json +1 -0
- package/dist/locales/ro.json +1 -0
- package/dist/locales/ru.json +1 -0
- package/dist/locales/sq.json +1 -0
- package/dist/locales/sv.json +1 -0
- package/dist/locales/tr.json +1 -0
- package/dist/locales/zh.json +1 -0
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +5 -0
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +5 -1
- package/dist/_chunks/link-cell-renderer-Bt-mXeQY.js +0 -728
- package/dist/_chunks/sparkline-DcXqRZoq.js +0 -283
package/dist/_chunks/{actions-cell-renderer-DaL80uqL.js → actions-cell-renderer-ClGCSQnA.js}
RENAMED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { jsx as n, jsxs as O } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { S as
|
|
4
|
-
import { E as
|
|
5
|
-
import { c as
|
|
2
|
+
import { useMemo as $, forwardRef as P, useState as k, useCallback as A, useEffect as q, useRef as se, createContext as Ce, useContext as Se, isValidElement as we, cloneElement as Ne, useImperativeHandle as ot } from "react";
|
|
3
|
+
import { S as it } from "./skeleton-CZbwyJAA.js";
|
|
4
|
+
import { E as st } from "./empty-state-CrLsi0XI.js";
|
|
5
|
+
import { c as lt } from "./index-D2ZczOXr.js";
|
|
6
6
|
import { useTranslation as w } from "react-i18next";
|
|
7
|
-
import { useGridFilter as
|
|
8
|
-
import { ModuleRegistry as
|
|
9
|
-
import { I as
|
|
10
|
-
import { B as
|
|
11
|
-
import { I as
|
|
7
|
+
import { useGridFilter as dt, AgGridReact as ct } from "ag-grid-react";
|
|
8
|
+
import { ModuleRegistry as ut, AllCommunityModule as pt } from "ag-grid-community";
|
|
9
|
+
import { I as Ie } from "./icon-button-group-BLHPN6jg.js";
|
|
10
|
+
import { B as X } from "./button-CPGiR_bH.js";
|
|
11
|
+
import { I as L } from "./icon-button-C_kbcd7I.js";
|
|
12
12
|
import { P as Z } from "./popover-Cc0a69sw.js";
|
|
13
|
-
import { C as
|
|
14
|
-
import { T as
|
|
15
|
-
import { T as
|
|
13
|
+
import { C as mt } from "./checkbox-BuZ1u__2.js";
|
|
14
|
+
import { T as le } from "./text-input-CUvCb6ST.js";
|
|
15
|
+
import { T as ye } from "./tag-3wgkwwDB.js";
|
|
16
16
|
import { D as j } from "./dropdown-menu-DU-Hrf33.js";
|
|
17
|
-
import { X as
|
|
18
|
-
import { R as
|
|
19
|
-
import { S as
|
|
20
|
-
import { c as
|
|
21
|
-
import { G as
|
|
22
|
-
import { P as
|
|
23
|
-
import { F as
|
|
24
|
-
import { D as
|
|
25
|
-
import { F as
|
|
26
|
-
import
|
|
27
|
-
import { S as
|
|
28
|
-
import { u as
|
|
29
|
-
import { u as
|
|
30
|
-
import { u as
|
|
31
|
-
import { E as
|
|
17
|
+
import { X as Fe } from "./x-B5YnXwCz.js";
|
|
18
|
+
import { R as ft } from "./refresh-cw-DnI0cLFC.js";
|
|
19
|
+
import { S as de } from "./search-QbWPlY5f.js";
|
|
20
|
+
import { c as gt } from "./createLucideIcon-DhHxpK9K.js";
|
|
21
|
+
import { G as bt } from "./grip-vertical-onSb1JXO.js";
|
|
22
|
+
import { P as ht } from "./printer-rkK0T1gi.js";
|
|
23
|
+
import { F as De } from "./file-text-5yv6r2ls.js";
|
|
24
|
+
import { D as te } from "./download-CfYKJO_j.js";
|
|
25
|
+
import { F as Tt } from "./file-spreadsheet-DmwyfV4O.js";
|
|
26
|
+
import yt from "i18next";
|
|
27
|
+
import { S as vt } from "./select-BW5ecXlX.js";
|
|
28
|
+
import { u as xt } from "./registry-DvAUVLHh.js";
|
|
29
|
+
import { u as Ct } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
30
|
+
import { u as St } from "./use-theme-CAuo6EYT.js";
|
|
31
|
+
import { E as wt } from "./ellipsis-dRo9ouSU.js";
|
|
32
32
|
/**
|
|
33
33
|
* @license lucide-react v1.22.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
37
|
*/
|
|
38
|
-
const
|
|
38
|
+
const Nt = [
|
|
39
39
|
["path", { d: "M10.5 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v5.5", key: "1g2yzs" }],
|
|
40
40
|
["path", { d: "m14.3 19.6 1-.4", key: "11sv9r" }],
|
|
41
41
|
["path", { d: "M15 3v7.5", key: "7lm50a" }],
|
|
@@ -48,34 +48,34 @@ const Ct = [
|
|
|
48
48
|
["path", { d: "m21.7 19.4-.9-.3", key: "1qgwi9" }],
|
|
49
49
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
50
50
|
["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }]
|
|
51
|
-
],
|
|
52
|
-
function
|
|
53
|
-
if (!
|
|
54
|
-
const t = e,
|
|
55
|
-
return
|
|
51
|
+
], It = gt("columns-3-cog", Nt);
|
|
52
|
+
function Ft(e) {
|
|
53
|
+
if (!we(e)) return e;
|
|
54
|
+
const t = e, r = t.props.className ?? "", a = /\bsize-|\bw-|\bh-/.test(r) ? r : `${r} ds:size-4`.trim();
|
|
55
|
+
return Ne(t, { className: a, size: t.props.size ?? 16 });
|
|
56
56
|
}
|
|
57
|
-
const
|
|
57
|
+
const Re = Ce(null);
|
|
58
58
|
function G(e) {
|
|
59
|
-
const t =
|
|
59
|
+
const t = Se(Re);
|
|
60
60
|
if (!t)
|
|
61
61
|
throw new Error(
|
|
62
62
|
`${e} must be rendered inside <DataTable.Toolbar> as a descendant of <DataTable>.`
|
|
63
63
|
);
|
|
64
64
|
return t;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function Dt({
|
|
67
67
|
getApi: e,
|
|
68
68
|
selectionCount: t,
|
|
69
|
-
onPrint:
|
|
70
|
-
children:
|
|
69
|
+
onPrint: r,
|
|
70
|
+
children: a
|
|
71
71
|
}) {
|
|
72
|
-
const o =
|
|
73
|
-
() => ({ getApi: e, selectionCount: t, onPrint:
|
|
74
|
-
[e, t,
|
|
72
|
+
const o = $(
|
|
73
|
+
() => ({ getApi: e, selectionCount: t, onPrint: r }),
|
|
74
|
+
[e, t, r]
|
|
75
75
|
);
|
|
76
|
-
return /* @__PURE__ */ n(
|
|
76
|
+
return /* @__PURE__ */ n(Re.Provider, { value: o, children: a });
|
|
77
77
|
}
|
|
78
|
-
const
|
|
78
|
+
const Rt = [
|
|
79
79
|
"data-table-toolbar",
|
|
80
80
|
// Mobile (<sm) keeps `flex-wrap` so a wide QuickSearch can flow above the
|
|
81
81
|
// Actions cluster on narrow screens. From `sm` (≥640px) we switch to
|
|
@@ -87,24 +87,24 @@ const It = [
|
|
|
87
87
|
// No card surface: the toolbar sits directly on the page background,
|
|
88
88
|
// matching the header-tools layout the Patients / Care Plan List
|
|
89
89
|
// patterns established (the old bg-card + border + shadow bar is gone).
|
|
90
|
-
].join(" "),
|
|
91
|
-
({ className: e, children: t, ...
|
|
90
|
+
].join(" "), Ae = P(
|
|
91
|
+
({ className: e, children: t, ...r }, a) => /* @__PURE__ */ n(
|
|
92
92
|
"div",
|
|
93
93
|
{
|
|
94
|
-
ref:
|
|
94
|
+
ref: a,
|
|
95
95
|
role: "toolbar",
|
|
96
|
-
className: [
|
|
97
|
-
...
|
|
96
|
+
className: [Rt, e ?? ""].join(" ").trim(),
|
|
97
|
+
...r,
|
|
98
98
|
children: t
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
101
|
);
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
({ className: e, children: t, ...
|
|
102
|
+
Ae.displayName = "DataTable.Toolbar";
|
|
103
|
+
const ke = P(
|
|
104
|
+
({ className: e, children: t, ...r }, a) => /* @__PURE__ */ n(
|
|
105
105
|
"div",
|
|
106
106
|
{
|
|
107
|
-
ref:
|
|
107
|
+
ref: a,
|
|
108
108
|
className: [
|
|
109
109
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
110
110
|
// `grow` lets FilterBar absorb the free space; `min-w-0` lets the
|
|
@@ -114,69 +114,69 @@ const Re = P(
|
|
|
114
114
|
"ds:grow ds:min-w-0",
|
|
115
115
|
e ?? ""
|
|
116
116
|
].join(" ").trim(),
|
|
117
|
-
...
|
|
117
|
+
...r,
|
|
118
118
|
children: t
|
|
119
119
|
}
|
|
120
120
|
)
|
|
121
121
|
);
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
({ className: e, children: t, ...
|
|
122
|
+
ke.displayName = "DataTable.Toolbar.FilterBar";
|
|
123
|
+
const Ee = P(
|
|
124
|
+
({ className: e, children: t, ...r }, a) => /* @__PURE__ */ n(
|
|
125
125
|
"div",
|
|
126
126
|
{
|
|
127
|
-
ref:
|
|
127
|
+
ref: a,
|
|
128
128
|
className: [
|
|
129
129
|
"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
130
130
|
"ds:ms-auto",
|
|
131
131
|
e ?? ""
|
|
132
132
|
].join(" ").trim(),
|
|
133
|
-
...
|
|
133
|
+
...r,
|
|
134
134
|
children: t
|
|
135
135
|
}
|
|
136
136
|
)
|
|
137
137
|
);
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
({ label: e, onExport: t, intent:
|
|
141
|
-
const { t:
|
|
142
|
-
const
|
|
143
|
-
|
|
138
|
+
Ee.displayName = "DataTable.Toolbar.Actions";
|
|
139
|
+
const ce = P(
|
|
140
|
+
({ label: e, onExport: t, intent: r = "outline", ...a }, o) => {
|
|
141
|
+
const { t: i } = w(), { getApi: c } = G("DataTable.Toolbar.ExportCsv"), u = A(() => {
|
|
142
|
+
const l = c();
|
|
143
|
+
l && (t ? t(l) : l.exportDataAsCsv());
|
|
144
144
|
}, [c, t]);
|
|
145
145
|
return /* @__PURE__ */ n(
|
|
146
|
-
|
|
146
|
+
L,
|
|
147
147
|
{
|
|
148
148
|
ref: o,
|
|
149
149
|
type: "button",
|
|
150
|
-
intent:
|
|
151
|
-
icon: /* @__PURE__ */ n(
|
|
152
|
-
tooltip: e ??
|
|
153
|
-
onClick:
|
|
154
|
-
...
|
|
150
|
+
intent: r,
|
|
151
|
+
icon: /* @__PURE__ */ n(te, { "aria-hidden": !0 }),
|
|
152
|
+
tooltip: e ?? i("dataTable.exportCsv"),
|
|
153
|
+
onClick: u,
|
|
154
|
+
...a
|
|
155
155
|
}
|
|
156
156
|
);
|
|
157
157
|
}
|
|
158
158
|
);
|
|
159
|
-
|
|
159
|
+
ce.displayName = "DataTable.Toolbar.ExportCsv";
|
|
160
160
|
function U(e, t = [30, 30, 30]) {
|
|
161
161
|
if (typeof document > "u") return t;
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
const
|
|
165
|
-
document.body.removeChild(
|
|
166
|
-
const o =
|
|
162
|
+
const r = document.createElement("span");
|
|
163
|
+
r.style.color = `hsl(var(${e}))`, r.style.position = "absolute", r.style.visibility = "hidden", document.body.appendChild(r);
|
|
164
|
+
const a = getComputedStyle(r).color;
|
|
165
|
+
document.body.removeChild(r);
|
|
166
|
+
const o = a.match(/rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)/i);
|
|
167
167
|
return o ? [Number(o[1]), Number(o[2]), Number(o[3])] : t;
|
|
168
168
|
}
|
|
169
|
-
async function
|
|
169
|
+
async function Oe(e, t) {
|
|
170
170
|
if (!e) return;
|
|
171
|
-
const [{ jsPDF:
|
|
171
|
+
const [{ jsPDF: r }, { default: a }] = await Promise.all([
|
|
172
172
|
import("./jspdf.es.min-DaapWjR1.js").then((b) => b.j),
|
|
173
173
|
import("./jspdf.plugin.autotable-CSiDNyPn.js")
|
|
174
|
-
]),
|
|
175
|
-
|
|
176
|
-
],
|
|
174
|
+
]), i = (e.getColumns() ?? []).filter((b) => b.isVisible()), c = [
|
|
175
|
+
i.map((b) => e.getDisplayNameForColumn(b, null) ?? "")
|
|
176
|
+
], u = [];
|
|
177
177
|
e.forEachNodeAfterFilterAndSort((b) => {
|
|
178
178
|
if (!b.data) return;
|
|
179
|
-
const T =
|
|
179
|
+
const T = i.map((g) => {
|
|
180
180
|
const N = e.getCellValue({
|
|
181
181
|
rowNode: b,
|
|
182
182
|
colKey: g,
|
|
@@ -184,15 +184,15 @@ async function Ae(e, t) {
|
|
|
184
184
|
});
|
|
185
185
|
return N == null ? "" : String(N);
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
u.push(T);
|
|
188
188
|
});
|
|
189
|
-
const
|
|
190
|
-
|
|
189
|
+
const l = U("--muted", [240, 240, 240]), p = U("--foreground", [30, 30, 30]), s = U("--card-foreground", [30, 30, 30]), m = U("--card", [250, 250, 250]), y = new r({ orientation: "landscape" });
|
|
190
|
+
a(y, {
|
|
191
191
|
head: c,
|
|
192
|
-
body:
|
|
193
|
-
headStyles: { fillColor:
|
|
194
|
-
bodyStyles: { textColor:
|
|
195
|
-
alternateRowStyles: { fillColor:
|
|
192
|
+
body: u,
|
|
193
|
+
headStyles: { fillColor: l, textColor: p },
|
|
194
|
+
bodyStyles: { textColor: s },
|
|
195
|
+
alternateRowStyles: { fillColor: m },
|
|
196
196
|
styles: {
|
|
197
197
|
font: "helvetica",
|
|
198
198
|
fontSize: 10,
|
|
@@ -200,59 +200,59 @@ async function Ae(e, t) {
|
|
|
200
200
|
}
|
|
201
201
|
}), y.save(t.fileName);
|
|
202
202
|
}
|
|
203
|
-
const
|
|
204
|
-
({ label: e, onClick: t, fileName:
|
|
205
|
-
const { t: c } = w(), { getApi:
|
|
206
|
-
const
|
|
203
|
+
const ue = P(
|
|
204
|
+
({ label: e, onClick: t, fileName: r, intent: a = "outline", ...o }, i) => {
|
|
205
|
+
const { t: c } = w(), { getApi: u } = G("DataTable.Toolbar.ExportPdf"), l = A(() => {
|
|
206
|
+
const p = u();
|
|
207
207
|
if (t) {
|
|
208
|
-
t(
|
|
208
|
+
t(p);
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
|
-
|
|
212
|
-
fileName:
|
|
211
|
+
Oe(p, {
|
|
212
|
+
fileName: r ?? "data-table-export.pdf"
|
|
213
213
|
});
|
|
214
|
-
}, [
|
|
214
|
+
}, [u, t, r]);
|
|
215
215
|
return /* @__PURE__ */ n(
|
|
216
|
-
|
|
216
|
+
L,
|
|
217
217
|
{
|
|
218
|
-
ref:
|
|
218
|
+
ref: i,
|
|
219
219
|
type: "button",
|
|
220
|
-
intent:
|
|
221
|
-
icon: /* @__PURE__ */ n(
|
|
220
|
+
intent: a,
|
|
221
|
+
icon: /* @__PURE__ */ n(De, { "aria-hidden": !0 }),
|
|
222
222
|
tooltip: e ?? c("dataTable.exportPdf"),
|
|
223
|
-
onClick:
|
|
223
|
+
onClick: l,
|
|
224
224
|
...o
|
|
225
225
|
}
|
|
226
226
|
);
|
|
227
227
|
}
|
|
228
228
|
);
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
({ label: e, intent: t = "outline", ...
|
|
232
|
-
const { t: o } = w(), { onPrint:
|
|
229
|
+
ue.displayName = "DataTable.Toolbar.ExportPdf";
|
|
230
|
+
const pe = P(
|
|
231
|
+
({ label: e, intent: t = "outline", ...r }, a) => {
|
|
232
|
+
const { t: o } = w(), { onPrint: i } = G("DataTable.Toolbar.Print");
|
|
233
233
|
return /* @__PURE__ */ n(
|
|
234
|
-
|
|
234
|
+
L,
|
|
235
235
|
{
|
|
236
|
-
ref:
|
|
236
|
+
ref: a,
|
|
237
237
|
type: "button",
|
|
238
238
|
intent: t,
|
|
239
|
-
icon: /* @__PURE__ */ n(
|
|
239
|
+
icon: /* @__PURE__ */ n(ht, { "aria-hidden": !0 }),
|
|
240
240
|
tooltip: e ?? o("dataTable.print"),
|
|
241
|
-
onClick:
|
|
242
|
-
...
|
|
241
|
+
onClick: i,
|
|
242
|
+
...r
|
|
243
243
|
}
|
|
244
244
|
);
|
|
245
245
|
}
|
|
246
246
|
);
|
|
247
|
-
|
|
248
|
-
const
|
|
249
|
-
const { t:
|
|
250
|
-
return
|
|
251
|
-
const
|
|
252
|
-
|
|
247
|
+
pe.displayName = "DataTable.Toolbar.Print";
|
|
248
|
+
const Pe = ({ placeholder: e, debounceMs: t = 150 }) => {
|
|
249
|
+
const { t: r } = w(), { getApi: a } = G("DataTable.Toolbar.QuickSearch"), [o, i] = k(""), c = se(void 0);
|
|
250
|
+
return q(() => (c.current && window.clearTimeout(c.current), c.current = window.setTimeout(() => {
|
|
251
|
+
const u = a();
|
|
252
|
+
u && u.setGridOption("quickFilterText", o);
|
|
253
253
|
}, t), () => {
|
|
254
254
|
c.current && window.clearTimeout(c.current);
|
|
255
|
-
}), [o, t,
|
|
255
|
+
}), [o, t, a]), // Slot wrapper caps the search at a sensible legible width on desktop —
|
|
256
256
|
// without this, TextInput's `w-full` lets the QuickSearch absorb the
|
|
257
257
|
// entire FilterBar row and push trailing Actions onto a second line at
|
|
258
258
|
// 1024 / 1280 / 1440. `min-w-0` lets the slot shrink below `24rem` when
|
|
@@ -260,72 +260,72 @@ const Ee = ({ placeholder: e, debounceMs: t = 150 }) => {
|
|
|
260
260
|
// `--toolbar-search-max` token in the kit yet — see this component's
|
|
261
261
|
// summary for a follow-up note recommending we add one.
|
|
262
262
|
/* @__PURE__ */ n("div", { className: "ds:w-full ds:max-w-[24rem] ds:min-w-0", children: /* @__PURE__ */ n(
|
|
263
|
-
|
|
263
|
+
le,
|
|
264
264
|
{
|
|
265
265
|
type: "search",
|
|
266
266
|
size: "sm",
|
|
267
267
|
value: o,
|
|
268
|
-
onChange: (
|
|
269
|
-
placeholder: e ??
|
|
270
|
-
startAdornment: /* @__PURE__ */ n(
|
|
268
|
+
onChange: (u) => i(u.target.value),
|
|
269
|
+
placeholder: e ?? r("dataTable.quickSearch.placeholder", "Search…"),
|
|
270
|
+
startAdornment: /* @__PURE__ */ n(de, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
271
271
|
clearable: !0,
|
|
272
|
-
onClear: () =>
|
|
273
|
-
"aria-label":
|
|
272
|
+
onClear: () => i(""),
|
|
273
|
+
"aria-label": r("dataTable.quickSearch.label", "Quick search")
|
|
274
274
|
}
|
|
275
275
|
) });
|
|
276
276
|
};
|
|
277
|
-
|
|
278
|
-
const
|
|
279
|
-
({ onRefresh: e, label: t, intent:
|
|
280
|
-
const { t:
|
|
277
|
+
Pe.displayName = "DataTable.Toolbar.QuickSearch";
|
|
278
|
+
const me = P(
|
|
279
|
+
({ onRefresh: e, label: t, intent: r = "outline", ...a }, o) => {
|
|
280
|
+
const { t: i } = w();
|
|
281
281
|
return /* @__PURE__ */ n(
|
|
282
|
-
|
|
282
|
+
L,
|
|
283
283
|
{
|
|
284
284
|
ref: o,
|
|
285
285
|
type: "button",
|
|
286
|
-
intent:
|
|
287
|
-
icon: /* @__PURE__ */ n(
|
|
288
|
-
tooltip: t ??
|
|
286
|
+
intent: r,
|
|
287
|
+
icon: /* @__PURE__ */ n(ft, { "aria-hidden": !0 }),
|
|
288
|
+
tooltip: t ?? i("dataTable.refresh", "Refresh"),
|
|
289
289
|
onClick: e,
|
|
290
|
-
...
|
|
290
|
+
...a
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
293
|
}
|
|
294
294
|
);
|
|
295
|
-
|
|
296
|
-
function
|
|
295
|
+
me.displayName = "DataTable.Toolbar.Refresh";
|
|
296
|
+
function At(e) {
|
|
297
297
|
if (!e || typeof e != "object") return "";
|
|
298
298
|
const t = e;
|
|
299
299
|
if (typeof t.filter == "string" || typeof t.filter == "number") {
|
|
300
|
-
const
|
|
301
|
-
return
|
|
300
|
+
const r = typeof t.type == "string" ? t.type : "", a = typeof t.filterTo == "string" || typeof t.filterTo == "number" ? String(t.filterTo) : "";
|
|
301
|
+
return r === "inRange" && a ? `${t.filter} – ${a}` : r ? `${r} ${t.filter}` : String(t.filter);
|
|
302
302
|
}
|
|
303
303
|
return typeof t.dateFrom == "string" ? typeof t.dateTo == "string" && t.dateTo ? `${t.dateFrom} – ${t.dateTo}` : String(t.dateFrom) : Array.isArray(t.values) ? t.values.map(String).join(", ") : "";
|
|
304
304
|
}
|
|
305
|
-
const
|
|
306
|
-
const { t: e } = w(), { getApi: t } = G("DataTable.Toolbar.FilterChips"), [
|
|
307
|
-
const
|
|
308
|
-
if (!
|
|
309
|
-
|
|
305
|
+
const ze = () => {
|
|
306
|
+
const { t: e } = w(), { getApi: t } = G("DataTable.Toolbar.FilterChips"), [r, a] = k([]), [o, i] = k(""), c = A(() => {
|
|
307
|
+
const s = t();
|
|
308
|
+
if (!s) {
|
|
309
|
+
a([]), i("");
|
|
310
310
|
return;
|
|
311
311
|
}
|
|
312
|
-
const
|
|
313
|
-
for (const g of Object.keys(
|
|
314
|
-
const N = y.find((
|
|
312
|
+
const m = s.getFilterModel() ?? {}, y = s.getColumns() ?? [], b = [];
|
|
313
|
+
for (const g of Object.keys(m)) {
|
|
314
|
+
const N = y.find((F) => F.getColId() === g), x = s.getDisplayNameForColumn(N, null) ?? g;
|
|
315
315
|
b.push({
|
|
316
316
|
colId: g,
|
|
317
317
|
headerName: x,
|
|
318
|
-
text:
|
|
318
|
+
text: At(m[g])
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
|
|
322
|
-
const T =
|
|
323
|
-
|
|
321
|
+
a(b);
|
|
322
|
+
const T = s.getGridOption("quickFilterText");
|
|
323
|
+
i(typeof T == "string" ? T : "");
|
|
324
324
|
}, [t]);
|
|
325
|
-
if (
|
|
326
|
-
let
|
|
327
|
-
const
|
|
328
|
-
T.addEventListener("filterChanged",
|
|
325
|
+
if (q(() => {
|
|
326
|
+
let s;
|
|
327
|
+
const m = (T) => c(), y = (T) => {
|
|
328
|
+
T.addEventListener("filterChanged", m), c(), s = () => T.removeEventListener("filterChanged", m);
|
|
329
329
|
}, b = t();
|
|
330
330
|
if (b)
|
|
331
331
|
y(b);
|
|
@@ -334,17 +334,17 @@ const Oe = () => {
|
|
|
334
334
|
const g = t();
|
|
335
335
|
g && (window.clearInterval(T), y(g));
|
|
336
336
|
}, 50);
|
|
337
|
-
|
|
337
|
+
s = () => window.clearInterval(T);
|
|
338
338
|
}
|
|
339
|
-
return () =>
|
|
340
|
-
}, [t, c]),
|
|
341
|
-
function
|
|
342
|
-
const
|
|
343
|
-
|
|
339
|
+
return () => s == null ? void 0 : s();
|
|
340
|
+
}, [t, c]), r.length + (o ? 1 : 0) === 0) return null;
|
|
341
|
+
function l(s) {
|
|
342
|
+
const m = t();
|
|
343
|
+
m && m.destroyFilter(s);
|
|
344
344
|
}
|
|
345
|
-
function
|
|
346
|
-
const
|
|
347
|
-
|
|
345
|
+
function p() {
|
|
346
|
+
const s = t();
|
|
347
|
+
s && (s.setFilterModel(null), s.setGridOption("quickFilterText", ""), i(""));
|
|
348
348
|
}
|
|
349
349
|
return /* @__PURE__ */ O(
|
|
350
350
|
"div",
|
|
@@ -354,35 +354,35 @@ const Oe = () => {
|
|
|
354
354
|
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
355
355
|
children: [
|
|
356
356
|
o && /* @__PURE__ */ n(
|
|
357
|
-
|
|
357
|
+
ye,
|
|
358
358
|
{
|
|
359
359
|
label: `${e("dataTable.quickSearch.label", "Quick search")}: ${o}`,
|
|
360
360
|
size: "sm",
|
|
361
361
|
fill: "outline",
|
|
362
362
|
onRemove: () => {
|
|
363
|
-
const
|
|
364
|
-
|
|
363
|
+
const s = t();
|
|
364
|
+
s == null || s.setGridOption("quickFilterText", ""), i("");
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
),
|
|
368
|
-
|
|
369
|
-
|
|
368
|
+
r.map((s) => /* @__PURE__ */ n(
|
|
369
|
+
ye,
|
|
370
370
|
{
|
|
371
|
-
label:
|
|
371
|
+
label: s.text ? `${s.headerName}: ${s.text}` : s.headerName,
|
|
372
372
|
size: "sm",
|
|
373
373
|
fill: "outline",
|
|
374
|
-
onRemove: () =>
|
|
374
|
+
onRemove: () => l(s.colId)
|
|
375
375
|
},
|
|
376
|
-
|
|
376
|
+
s.colId
|
|
377
377
|
)),
|
|
378
378
|
/* @__PURE__ */ n(
|
|
379
|
-
|
|
379
|
+
X,
|
|
380
380
|
{
|
|
381
381
|
type: "button",
|
|
382
382
|
intent: "ghost",
|
|
383
383
|
size: "sm",
|
|
384
|
-
onClick:
|
|
385
|
-
startIcon: /* @__PURE__ */ n(
|
|
384
|
+
onClick: p,
|
|
385
|
+
startIcon: /* @__PURE__ */ n(Fe, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
386
386
|
children: e("dataTable.filterChips.clearAll", "Clear all")
|
|
387
387
|
}
|
|
388
388
|
)
|
|
@@ -390,56 +390,56 @@ const Oe = () => {
|
|
|
390
390
|
}
|
|
391
391
|
);
|
|
392
392
|
};
|
|
393
|
-
|
|
394
|
-
const
|
|
393
|
+
ze.displayName = "DataTable.Toolbar.FilterChips";
|
|
394
|
+
const Me = ({
|
|
395
395
|
field: e,
|
|
396
396
|
options: t,
|
|
397
|
-
label:
|
|
397
|
+
label: r
|
|
398
398
|
}) => {
|
|
399
|
-
const { t:
|
|
400
|
-
function
|
|
401
|
-
c(
|
|
402
|
-
const
|
|
403
|
-
if (
|
|
404
|
-
if (
|
|
405
|
-
|
|
399
|
+
const { t: a } = w(), { getApi: o } = G("DataTable.Toolbar.FacetFilter"), [i, c] = k(null);
|
|
400
|
+
function u(l) {
|
|
401
|
+
c(l);
|
|
402
|
+
const p = o();
|
|
403
|
+
if (p) {
|
|
404
|
+
if (l === null) {
|
|
405
|
+
p.destroyFilter(e);
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
|
-
|
|
408
|
+
p.setColumnFilterModel(e, {
|
|
409
409
|
type: "equals",
|
|
410
|
-
filter:
|
|
411
|
-
}),
|
|
410
|
+
filter: l
|
|
411
|
+
}), p.onFilterChanged();
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
return /* @__PURE__ */ n(
|
|
415
415
|
"div",
|
|
416
416
|
{
|
|
417
417
|
role: "group",
|
|
418
|
-
"aria-label":
|
|
418
|
+
"aria-label": r ?? a("dataTable.facetFilter.label", "Filter"),
|
|
419
419
|
className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
420
|
-
children: t.map((
|
|
421
|
-
const
|
|
420
|
+
children: t.map((l) => {
|
|
421
|
+
const p = i === l.value;
|
|
422
422
|
return /* @__PURE__ */ n(
|
|
423
|
-
|
|
423
|
+
X,
|
|
424
424
|
{
|
|
425
425
|
type: "button",
|
|
426
426
|
size: "sm",
|
|
427
|
-
intent:
|
|
428
|
-
"aria-pressed":
|
|
429
|
-
onClick: () =>
|
|
430
|
-
children:
|
|
427
|
+
intent: p ? "primary" : "secondary",
|
|
428
|
+
"aria-pressed": p,
|
|
429
|
+
onClick: () => u(l.value),
|
|
430
|
+
children: l.label
|
|
431
431
|
},
|
|
432
|
-
String(
|
|
432
|
+
String(l.value)
|
|
433
433
|
);
|
|
434
434
|
})
|
|
435
435
|
}
|
|
436
436
|
);
|
|
437
437
|
};
|
|
438
|
-
|
|
439
|
-
const
|
|
440
|
-
async function
|
|
438
|
+
Me.displayName = "DataTable.Toolbar.FacetFilter";
|
|
439
|
+
const kt = ["csv", "xlsx", "pdf"];
|
|
440
|
+
async function Et(e, t) {
|
|
441
441
|
if (!e) return;
|
|
442
|
-
const
|
|
442
|
+
const r = await import("./exceljs.min-DUJ-5CGx.js").then((g) => g.e), a = new r.Workbook(), o = a.addWorksheet("Sheet1"), c = (e.getColumns() ?? []).filter((g) => g.isVisible());
|
|
443
443
|
o.addRow(
|
|
444
444
|
c.map(
|
|
445
445
|
(g) => e.getDisplayNameForColumn(g, null) ?? g.getColId()
|
|
@@ -456,135 +456,135 @@ async function Rt(e, t) {
|
|
|
456
456
|
})
|
|
457
457
|
);
|
|
458
458
|
});
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
g.font = { bold: !0, color: { argb: `FF${
|
|
459
|
+
const u = U("--muted", [240, 240, 240]), l = U("--foreground", [30, 30, 30]), p = o.getRow(1), s = ([g, N, x]) => `${g.toString(16).padStart(2, "0")}${N.toString(16).padStart(2, "0")}${x.toString(16).padStart(2, "0")}`.toUpperCase();
|
|
460
|
+
p.eachCell((g) => {
|
|
461
|
+
g.font = { bold: !0, color: { argb: `FF${s(l)}` } }, g.fill = {
|
|
462
462
|
type: "pattern",
|
|
463
463
|
pattern: "solid",
|
|
464
|
-
fgColor: { argb: `FF${
|
|
464
|
+
fgColor: { argb: `FF${s(u)}` }
|
|
465
465
|
};
|
|
466
466
|
});
|
|
467
|
-
const
|
|
467
|
+
const m = await a.xlsx.writeBuffer(), y = new Blob([m], {
|
|
468
468
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
469
469
|
}), b = URL.createObjectURL(y), T = document.createElement("a");
|
|
470
470
|
T.href = b, T.download = t.fileName, document.body.appendChild(T), T.click(), document.body.removeChild(T), URL.revokeObjectURL(b);
|
|
471
471
|
}
|
|
472
|
-
const
|
|
473
|
-
function
|
|
474
|
-
const e =
|
|
472
|
+
const Ge = Ce(null);
|
|
473
|
+
function Ot() {
|
|
474
|
+
const e = Se(Ge);
|
|
475
475
|
if (!e)
|
|
476
476
|
throw new Error(
|
|
477
477
|
"DataTable.Toolbar.ExportMenu.Item must be rendered inside DataTable.Toolbar.ExportMenu."
|
|
478
478
|
);
|
|
479
479
|
return e;
|
|
480
480
|
}
|
|
481
|
-
const
|
|
482
|
-
({ children: e, label: t, intent:
|
|
483
|
-
const { t:
|
|
484
|
-
return /* @__PURE__ */ n(
|
|
481
|
+
const fe = P(
|
|
482
|
+
({ children: e, label: t, intent: r = "outline", ...a }, o) => {
|
|
483
|
+
const { t: i } = w(), { getApi: c } = G("DataTable.Toolbar.ExportMenu"), u = $(() => ({ getApi: c }), [c]), l = e ?? kt.map((p) => /* @__PURE__ */ n(ge, { format: p }, p));
|
|
484
|
+
return /* @__PURE__ */ n(Ge.Provider, { value: u, children: /* @__PURE__ */ O(j.Root, { children: [
|
|
485
485
|
/* @__PURE__ */ n(j.Trigger, { asChild: !0, children: /* @__PURE__ */ n(
|
|
486
|
-
|
|
486
|
+
L,
|
|
487
487
|
{
|
|
488
488
|
ref: o,
|
|
489
489
|
type: "button",
|
|
490
|
-
intent:
|
|
491
|
-
icon: /* @__PURE__ */ n(
|
|
492
|
-
tooltip: t ??
|
|
493
|
-
"aria-label": t ??
|
|
490
|
+
intent: r,
|
|
491
|
+
icon: /* @__PURE__ */ n(te, { "aria-hidden": !0 }),
|
|
492
|
+
tooltip: t ?? i("dataTable.export.menu", "Export"),
|
|
493
|
+
"aria-label": t ?? i("dataTable.export.menu", "Export"),
|
|
494
494
|
"aria-haspopup": "menu",
|
|
495
|
-
...
|
|
495
|
+
...a
|
|
496
496
|
}
|
|
497
497
|
) }),
|
|
498
|
-
/* @__PURE__ */ n(j.Content, { align: "end", sideOffset: 4, children:
|
|
498
|
+
/* @__PURE__ */ n(j.Content, { align: "end", sideOffset: 4, children: l })
|
|
499
499
|
] }) });
|
|
500
500
|
}
|
|
501
501
|
);
|
|
502
|
-
|
|
503
|
-
function
|
|
502
|
+
fe.displayName = "DataTable.Toolbar.ExportMenu";
|
|
503
|
+
function Pt(e, t) {
|
|
504
504
|
return t === "csv" ? e("dataTable.export.csv", "Export CSV") : t === "xlsx" ? e("dataTable.export.xlsx", "Export Excel") : t === "pdf" ? e("dataTable.export.pdf", "Export PDF") : e("dataTable.export.custom", "Export");
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
return e === "csv" ? /* @__PURE__ */ n(
|
|
506
|
+
function zt(e) {
|
|
507
|
+
return e === "csv" ? /* @__PURE__ */ n(te, { "aria-hidden": !0, className: "ds:size-4" }) : e === "xlsx" ? /* @__PURE__ */ n(Tt, { "aria-hidden": !0, className: "ds:size-4" }) : e === "pdf" ? /* @__PURE__ */ n(De, { "aria-hidden": !0, className: "ds:size-4" }) : /* @__PURE__ */ n(te, { "aria-hidden": !0, className: "ds:size-4" });
|
|
508
508
|
}
|
|
509
|
-
const
|
|
509
|
+
const ge = ({
|
|
510
510
|
format: e,
|
|
511
511
|
label: t,
|
|
512
|
-
onClick:
|
|
513
|
-
fileName:
|
|
512
|
+
onClick: r,
|
|
513
|
+
fileName: a
|
|
514
514
|
}) => {
|
|
515
|
-
const { t: o } = w(), { getApi:
|
|
516
|
-
const
|
|
515
|
+
const { t: o } = w(), { getApi: i } = Ot(), c = A(() => {
|
|
516
|
+
const u = i();
|
|
517
517
|
if (e === "csv") {
|
|
518
|
-
|
|
518
|
+
u == null || u.exportDataAsCsv();
|
|
519
519
|
return;
|
|
520
520
|
}
|
|
521
521
|
if (e === "pdf") {
|
|
522
|
-
|
|
523
|
-
fileName:
|
|
522
|
+
Oe(u, {
|
|
523
|
+
fileName: a ?? "data-table-export.pdf"
|
|
524
524
|
});
|
|
525
525
|
return;
|
|
526
526
|
}
|
|
527
527
|
if (e === "xlsx") {
|
|
528
|
-
|
|
529
|
-
fileName:
|
|
528
|
+
Et(u, {
|
|
529
|
+
fileName: a ?? "data-table-export.xlsx"
|
|
530
530
|
});
|
|
531
531
|
return;
|
|
532
532
|
}
|
|
533
|
-
|
|
534
|
-
}, [e,
|
|
533
|
+
r == null || r(u);
|
|
534
|
+
}, [e, a, r, i]);
|
|
535
535
|
return /* @__PURE__ */ n(j.Item, { onSelect: c, children: /* @__PURE__ */ O("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
536
|
-
|
|
537
|
-
/* @__PURE__ */ n("span", { children: t ??
|
|
536
|
+
zt(e),
|
|
537
|
+
/* @__PURE__ */ n("span", { children: t ?? Pt(o, e) })
|
|
538
538
|
] }) });
|
|
539
539
|
};
|
|
540
|
-
|
|
541
|
-
function
|
|
542
|
-
return e ? (e.getAllGridColumns() ?? []).map((
|
|
543
|
-
colId:
|
|
544
|
-
displayName: e.getDisplayNameForColumn(
|
|
545
|
-
visible:
|
|
546
|
-
}).filter((
|
|
540
|
+
ge.displayName = "DataTable.Toolbar.ExportMenu.Item";
|
|
541
|
+
function Mt(e) {
|
|
542
|
+
return e ? (e.getAllGridColumns() ?? []).map((r) => r.getColDef().hide === void 0 && r.getColId().startsWith("ag-Grid-") ? null : {
|
|
543
|
+
colId: r.getColId(),
|
|
544
|
+
displayName: e.getDisplayNameForColumn(r, null) || r.getColId(),
|
|
545
|
+
visible: r.isVisible()
|
|
546
|
+
}).filter((r) => r !== null) : [];
|
|
547
547
|
}
|
|
548
|
-
const
|
|
549
|
-
function({ label: t, icon:
|
|
550
|
-
const { t:
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
}, [
|
|
554
|
-
const
|
|
548
|
+
const be = P(
|
|
549
|
+
function({ label: t, icon: r, footer: a, header: o, intent: i = "outline", ...c }, u) {
|
|
550
|
+
const { t: l } = w(), { getApi: p } = G("DataTable.Toolbar.ColumnToggle"), [s, m] = k(!1), [y, b] = k([]), [T, g] = k(null), [N, x] = k(null);
|
|
551
|
+
q(() => {
|
|
552
|
+
s && b(Mt(p()));
|
|
553
|
+
}, [s, p]);
|
|
554
|
+
const F = A(
|
|
555
555
|
(C, M) => {
|
|
556
|
-
const R =
|
|
556
|
+
const R = p();
|
|
557
557
|
R && (R.setColumnsVisible([C], M), b(
|
|
558
558
|
(S) => S.map(
|
|
559
559
|
(h) => h.colId === C ? { ...h, visible: M } : h
|
|
560
560
|
)
|
|
561
561
|
));
|
|
562
562
|
},
|
|
563
|
-
[
|
|
564
|
-
), z =
|
|
563
|
+
[p]
|
|
564
|
+
), z = A(
|
|
565
565
|
(C, M) => {
|
|
566
566
|
if (C === M) return;
|
|
567
|
-
const R =
|
|
567
|
+
const R = p();
|
|
568
568
|
if (!R) return;
|
|
569
569
|
b((h) => {
|
|
570
|
-
const
|
|
571
|
-
if (
|
|
572
|
-
const
|
|
573
|
-
return
|
|
570
|
+
const H = h.findIndex((_) => _.colId === C), K = h.findIndex((_) => _.colId === M);
|
|
571
|
+
if (H < 0 || K < 0) return h;
|
|
572
|
+
const Q = [...h], [J] = Q.splice(H, 1);
|
|
573
|
+
return Q.splice(K, 0, J), Q;
|
|
574
574
|
});
|
|
575
575
|
const S = y.findIndex((h) => h.colId === M);
|
|
576
576
|
S >= 0 && R.moveColumns([C], S);
|
|
577
577
|
},
|
|
578
|
-
[
|
|
579
|
-
), W = t ??
|
|
580
|
-
return /* @__PURE__ */ O(Z.Root, { open:
|
|
578
|
+
[p, y]
|
|
579
|
+
), W = t ?? l("dataTable.columnToggle");
|
|
580
|
+
return /* @__PURE__ */ O(Z.Root, { open: s, onOpenChange: m, children: [
|
|
581
581
|
/* @__PURE__ */ n(Z.Trigger, { asChild: !0, children: /* @__PURE__ */ n(
|
|
582
|
-
|
|
582
|
+
L,
|
|
583
583
|
{
|
|
584
|
-
ref:
|
|
584
|
+
ref: u,
|
|
585
585
|
type: "button",
|
|
586
|
-
intent:
|
|
587
|
-
icon:
|
|
586
|
+
intent: i,
|
|
587
|
+
icon: r ?? /* @__PURE__ */ n(It, { "aria-hidden": !0 }),
|
|
588
588
|
tooltip: W,
|
|
589
589
|
"aria-label": W,
|
|
590
590
|
"aria-haspopup": "dialog",
|
|
@@ -635,15 +635,15 @@ const fe = P(
|
|
|
635
635
|
{
|
|
636
636
|
"aria-hidden": "true",
|
|
637
637
|
className: "ds:cursor-grab ds:text-[color:var(--muted-foreground)] ds:active:cursor-grabbing",
|
|
638
|
-
children: /* @__PURE__ */ n(
|
|
638
|
+
children: /* @__PURE__ */ n(bt, { className: "ds:size-4" })
|
|
639
639
|
}
|
|
640
640
|
),
|
|
641
641
|
/* @__PURE__ */ n(
|
|
642
|
-
|
|
642
|
+
mt,
|
|
643
643
|
{
|
|
644
644
|
label: C.displayName,
|
|
645
645
|
checked: C.visible,
|
|
646
|
-
onCheckedChange: (S) =>
|
|
646
|
+
onCheckedChange: (S) => F(C.colId, S === !0)
|
|
647
647
|
}
|
|
648
648
|
)
|
|
649
649
|
]
|
|
@@ -653,28 +653,28 @@ const fe = P(
|
|
|
653
653
|
})
|
|
654
654
|
}
|
|
655
655
|
),
|
|
656
|
-
|
|
656
|
+
a ? /* @__PURE__ */ n("div", { className: "ds:mt-[var(--spacing-xs)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-sm)]", children: a }) : null
|
|
657
657
|
] })
|
|
658
658
|
] });
|
|
659
659
|
}
|
|
660
660
|
);
|
|
661
|
-
|
|
662
|
-
const
|
|
663
|
-
({ label: e, icon: t, onClick:
|
|
664
|
-
const { t:
|
|
661
|
+
be.displayName = "DataTable.Toolbar.ColumnToggle";
|
|
662
|
+
const je = P(
|
|
663
|
+
({ label: e, icon: t, onClick: r, variant: a = "default", size: o = "sm", ...i }, c) => {
|
|
664
|
+
const { t: u } = w(), { getApi: l, selectionCount: p } = G(
|
|
665
665
|
"DataTable.Toolbar.BulkAction"
|
|
666
666
|
);
|
|
667
|
-
return
|
|
668
|
-
|
|
667
|
+
return p === 0 ? null : /* @__PURE__ */ O(
|
|
668
|
+
X,
|
|
669
669
|
{
|
|
670
670
|
ref: c,
|
|
671
671
|
type: "button",
|
|
672
|
-
intent:
|
|
672
|
+
intent: a === "destructive" ? "destructive" : "secondary",
|
|
673
673
|
size: o,
|
|
674
|
-
startIcon:
|
|
675
|
-
onClick: () =>
|
|
676
|
-
"aria-label": `${e} (${
|
|
677
|
-
...
|
|
674
|
+
startIcon: Ft(t),
|
|
675
|
+
onClick: () => r(l()),
|
|
676
|
+
"aria-label": `${e} (${u("dataTable.bulkAction", { count: p })})`,
|
|
677
|
+
...i,
|
|
678
678
|
children: [
|
|
679
679
|
/* @__PURE__ */ n("span", { children: e }),
|
|
680
680
|
/* @__PURE__ */ n(
|
|
@@ -682,7 +682,7 @@ const Me = P(
|
|
|
682
682
|
{
|
|
683
683
|
"aria-hidden": "true",
|
|
684
684
|
className: "ds:ms-[var(--spacing-xs)] ds:opacity-80",
|
|
685
|
-
children:
|
|
685
|
+
children: u("dataTable.bulkAction", { count: p })
|
|
686
686
|
}
|
|
687
687
|
)
|
|
688
688
|
]
|
|
@@ -690,105 +690,105 @@ const Me = P(
|
|
|
690
690
|
);
|
|
691
691
|
}
|
|
692
692
|
);
|
|
693
|
-
|
|
693
|
+
je.displayName = "DataTable.Toolbar.BulkAction";
|
|
694
694
|
for (const e of [
|
|
695
|
-
le,
|
|
696
|
-
de,
|
|
697
695
|
ce,
|
|
698
696
|
ue,
|
|
699
697
|
pe,
|
|
700
|
-
|
|
698
|
+
me,
|
|
699
|
+
fe,
|
|
700
|
+
be
|
|
701
701
|
])
|
|
702
702
|
e.rendersIconButton = !0;
|
|
703
|
-
const
|
|
704
|
-
Item:
|
|
705
|
-
}),
|
|
706
|
-
FilterBar:
|
|
707
|
-
Actions:
|
|
703
|
+
const Gt = Object.assign(fe, {
|
|
704
|
+
Item: ge
|
|
705
|
+
}), ee = Object.assign(Ae, {
|
|
706
|
+
FilterBar: ke,
|
|
707
|
+
Actions: Ee,
|
|
708
708
|
/** @deprecated Use `Toolbar.ExportMenu` with a `csv` item. */
|
|
709
|
-
ExportCsv:
|
|
709
|
+
ExportCsv: ce,
|
|
710
710
|
/** @deprecated Use `Toolbar.ExportMenu` with a `pdf` item. */
|
|
711
|
-
ExportPdf:
|
|
712
|
-
Print:
|
|
713
|
-
ColumnToggle:
|
|
714
|
-
BulkAction:
|
|
715
|
-
QuickSearch:
|
|
716
|
-
Refresh:
|
|
717
|
-
FilterChips:
|
|
718
|
-
FacetFilter:
|
|
719
|
-
ExportMenu:
|
|
720
|
-
}),
|
|
711
|
+
ExportPdf: ue,
|
|
712
|
+
Print: pe,
|
|
713
|
+
ColumnToggle: be,
|
|
714
|
+
BulkAction: je,
|
|
715
|
+
QuickSearch: Pe,
|
|
716
|
+
Refresh: me,
|
|
717
|
+
FilterChips: ze,
|
|
718
|
+
FacetFilter: Me,
|
|
719
|
+
ExportMenu: Gt
|
|
720
|
+
}), jt = [
|
|
721
721
|
"contains",
|
|
722
722
|
"equals",
|
|
723
723
|
"startsWith",
|
|
724
724
|
"endsWith",
|
|
725
725
|
"notContains"
|
|
726
726
|
];
|
|
727
|
-
function
|
|
727
|
+
function qt(e) {
|
|
728
728
|
const t = new Intl.Collator(e, {
|
|
729
729
|
sensitivity: "base",
|
|
730
730
|
usage: "search"
|
|
731
731
|
});
|
|
732
|
-
function a
|
|
732
|
+
function r(a, o) {
|
|
733
733
|
if (o.length === 0) return 0;
|
|
734
|
-
if (o.length >
|
|
735
|
-
for (let
|
|
736
|
-
if (t.compare(
|
|
737
|
-
return
|
|
734
|
+
if (o.length > a.length) return -1;
|
|
735
|
+
for (let i = 0; i <= a.length - o.length; i += 1)
|
|
736
|
+
if (t.compare(a.slice(i, i + o.length), o) === 0)
|
|
737
|
+
return i;
|
|
738
738
|
return -1;
|
|
739
739
|
}
|
|
740
740
|
return {
|
|
741
|
-
equals: (
|
|
742
|
-
contains: (
|
|
743
|
-
startsWith: (
|
|
744
|
-
endsWith: (
|
|
745
|
-
|
|
741
|
+
equals: (a, o) => t.compare(a, o) === 0,
|
|
742
|
+
contains: (a, o) => r(a, o) !== -1,
|
|
743
|
+
startsWith: (a, o) => o.length <= a.length && t.compare(a.slice(0, o.length), o) === 0,
|
|
744
|
+
endsWith: (a, o) => o.length <= a.length && t.compare(
|
|
745
|
+
a.slice(a.length - o.length),
|
|
746
746
|
o
|
|
747
747
|
) === 0
|
|
748
748
|
};
|
|
749
749
|
}
|
|
750
|
-
function
|
|
750
|
+
function Lt(e) {
|
|
751
751
|
return e == null ? null : typeof e == "string" ? e : String(e);
|
|
752
752
|
}
|
|
753
|
-
function
|
|
754
|
-
const { model: t, onModelChange:
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
}, [t,
|
|
758
|
-
const y =
|
|
759
|
-
|
|
753
|
+
function _t(e) {
|
|
754
|
+
const { model: t, onModelChange: r, getValue: a, placeholder: o, defaultOperator: i } = e, { t: c } = w("ui"), u = (t == null ? void 0 : t.type) ?? i ?? "contains", [l, p] = k(u), [s, m] = k((t == null ? void 0 : t.filter) ?? "");
|
|
755
|
+
q(() => {
|
|
756
|
+
p((t == null ? void 0 : t.type) ?? i ?? "contains"), m((t == null ? void 0 : t.filter) ?? "");
|
|
757
|
+
}, [t, i]);
|
|
758
|
+
const y = $(() => qt(yt.language), []);
|
|
759
|
+
dt({
|
|
760
760
|
doesFilterPass: (x) => {
|
|
761
|
-
const
|
|
762
|
-
if (!
|
|
763
|
-
const z =
|
|
761
|
+
const F = t;
|
|
762
|
+
if (!F || F.filter === "") return !0;
|
|
763
|
+
const z = Lt(a(x.node));
|
|
764
764
|
if (z === null) return !1;
|
|
765
|
-
switch (
|
|
765
|
+
switch (F.type) {
|
|
766
766
|
case "equals":
|
|
767
|
-
return y.equals(z,
|
|
767
|
+
return y.equals(z, F.filter);
|
|
768
768
|
case "contains":
|
|
769
|
-
return y.contains(z,
|
|
769
|
+
return y.contains(z, F.filter);
|
|
770
770
|
case "startsWith":
|
|
771
|
-
return y.startsWith(z,
|
|
771
|
+
return y.startsWith(z, F.filter);
|
|
772
772
|
case "endsWith":
|
|
773
|
-
return y.endsWith(z,
|
|
773
|
+
return y.endsWith(z, F.filter);
|
|
774
774
|
case "notContains":
|
|
775
|
-
return !y.contains(z,
|
|
775
|
+
return !y.contains(z, F.filter);
|
|
776
776
|
default:
|
|
777
777
|
return !0;
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
780
|
});
|
|
781
781
|
function b() {
|
|
782
|
-
if (
|
|
783
|
-
|
|
782
|
+
if (s.trim() === "") {
|
|
783
|
+
r(null);
|
|
784
784
|
return;
|
|
785
785
|
}
|
|
786
|
-
|
|
786
|
+
r({ type: l, filter: s });
|
|
787
787
|
}
|
|
788
788
|
function T() {
|
|
789
|
-
|
|
789
|
+
m(""), p(i ?? "contains"), r(null);
|
|
790
790
|
}
|
|
791
|
-
const g =
|
|
791
|
+
const g = jt.map(
|
|
792
792
|
(x) => ({
|
|
793
793
|
value: x,
|
|
794
794
|
label: c(`dataTable.textFilter.operators.${x}`)
|
|
@@ -801,81 +801,113 @@ function jt(e) {
|
|
|
801
801
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
|
|
802
802
|
children: [
|
|
803
803
|
/* @__PURE__ */ n(
|
|
804
|
-
|
|
804
|
+
vt,
|
|
805
805
|
{
|
|
806
806
|
size: "sm",
|
|
807
807
|
options: g,
|
|
808
|
-
value:
|
|
808
|
+
value: l,
|
|
809
809
|
onValueChange: (x) => {
|
|
810
|
-
x !== "" &&
|
|
810
|
+
x !== "" && p(x);
|
|
811
811
|
},
|
|
812
812
|
"aria-label": c("dataTable.textFilter.operators.contains")
|
|
813
813
|
}
|
|
814
814
|
),
|
|
815
815
|
/* @__PURE__ */ n(
|
|
816
|
-
|
|
816
|
+
le,
|
|
817
817
|
{
|
|
818
818
|
size: "sm",
|
|
819
|
-
value:
|
|
820
|
-
onChange: (x) =>
|
|
819
|
+
value: s,
|
|
820
|
+
onChange: (x) => m(x.target.value),
|
|
821
821
|
onKeyDown: (x) => {
|
|
822
822
|
x.key === "Enter" && (x.preventDefault(), b());
|
|
823
823
|
},
|
|
824
824
|
placeholder: N,
|
|
825
825
|
"aria-label": N,
|
|
826
|
-
startAdornment: /* @__PURE__ */ n(
|
|
826
|
+
startAdornment: /* @__PURE__ */ n(de, { "aria-hidden": "true", className: "ds:size-4" })
|
|
827
827
|
}
|
|
828
828
|
),
|
|
829
829
|
/* @__PURE__ */ O("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
|
|
830
|
-
/* @__PURE__ */ n(
|
|
831
|
-
/* @__PURE__ */ n(
|
|
830
|
+
/* @__PURE__ */ n(X, { intent: "ghost", size: "sm", onClick: T, type: "button", children: c("dataTable.textFilter.clear") }),
|
|
831
|
+
/* @__PURE__ */ n(X, { intent: "primary", size: "sm", onClick: b, type: "button", children: c("dataTable.textFilter.apply") })
|
|
832
832
|
] })
|
|
833
833
|
]
|
|
834
834
|
}
|
|
835
835
|
);
|
|
836
836
|
}
|
|
837
|
-
function
|
|
838
|
-
var
|
|
839
|
-
const { model: t, onModelChange:
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
}, [t == null ? void 0 : t.filter]),
|
|
843
|
-
if (
|
|
837
|
+
function Bt(e) {
|
|
838
|
+
var m, y;
|
|
839
|
+
const { model: t, onModelChange: r, column: a } = e, { t: o } = w("ui"), i = ((y = (m = a == null ? void 0 : a.getColDef) == null ? void 0 : m.call(a)) == null ? void 0 : y.filterParams) ?? {}, c = i.defaultOperator ?? "contains", u = i.placeholder ?? o("dataTable.textFilter.placeholder"), [l, p] = k((t == null ? void 0 : t.filter) ?? "");
|
|
840
|
+
q(() => {
|
|
841
|
+
p((t == null ? void 0 : t.filter) ?? "");
|
|
842
|
+
}, [t == null ? void 0 : t.filter]), q(() => {
|
|
843
|
+
if (l === ((t == null ? void 0 : t.filter) ?? "")) return;
|
|
844
844
|
const b = setTimeout(() => {
|
|
845
|
-
if (
|
|
846
|
-
t &&
|
|
845
|
+
if (l === "") {
|
|
846
|
+
t && r(null);
|
|
847
847
|
return;
|
|
848
848
|
}
|
|
849
|
-
|
|
849
|
+
r({ type: c, filter: l });
|
|
850
850
|
}, 200);
|
|
851
851
|
return () => clearTimeout(b);
|
|
852
|
-
}, [
|
|
853
|
-
function
|
|
854
|
-
|
|
852
|
+
}, [l, c, t, r]);
|
|
853
|
+
function s() {
|
|
854
|
+
p(""), t && r(null);
|
|
855
855
|
}
|
|
856
856
|
return /* @__PURE__ */ n("div", { "data-component": "text-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ n(
|
|
857
|
-
|
|
857
|
+
le,
|
|
858
858
|
{
|
|
859
859
|
size: "sm",
|
|
860
|
-
value:
|
|
861
|
-
onChange: (b) =>
|
|
862
|
-
placeholder:
|
|
863
|
-
"aria-label":
|
|
864
|
-
startAdornment: /* @__PURE__ */ n(
|
|
865
|
-
endAdornment:
|
|
860
|
+
value: l,
|
|
861
|
+
onChange: (b) => p(b.target.value),
|
|
862
|
+
placeholder: u,
|
|
863
|
+
"aria-label": u,
|
|
864
|
+
startAdornment: /* @__PURE__ */ n(de, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
865
|
+
endAdornment: l.length > 0 ? /* @__PURE__ */ n(
|
|
866
866
|
"button",
|
|
867
867
|
{
|
|
868
868
|
type: "button",
|
|
869
869
|
"aria-label": o("dataTable.textFilter.clear"),
|
|
870
|
-
onClick:
|
|
870
|
+
onClick: s,
|
|
871
871
|
className: "ds:pointer-events-auto ds:flex ds:items-center ds:text-[var(--muted-foreground)] ds:hover:text-[var(--foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
872
|
-
children: /* @__PURE__ */ n(
|
|
872
|
+
children: /* @__PURE__ */ n(Fe, { "aria-hidden": "true", className: "ds:size-4" })
|
|
873
873
|
}
|
|
874
874
|
) : void 0
|
|
875
875
|
}
|
|
876
876
|
) });
|
|
877
877
|
}
|
|
878
|
-
const
|
|
878
|
+
const $t = /* @__PURE__ */ new Set(["presentation", "none"]), ve = '[role="presentation"][aria-hidden], [role="none"][aria-hidden]';
|
|
879
|
+
function Y(e) {
|
|
880
|
+
const t = e.getAttribute("role");
|
|
881
|
+
t === null || !$t.has(t) || e.getAttribute("aria-hidden") === "false" && e.removeAttribute("aria-hidden");
|
|
882
|
+
}
|
|
883
|
+
function Wt(e, t = !0) {
|
|
884
|
+
q(() => {
|
|
885
|
+
const r = e.current;
|
|
886
|
+
if (!t || !r || typeof MutationObserver > "u") return;
|
|
887
|
+
(() => {
|
|
888
|
+
for (const i of r.querySelectorAll(ve)) Y(i);
|
|
889
|
+
})();
|
|
890
|
+
const o = new MutationObserver((i) => {
|
|
891
|
+
for (const c of i)
|
|
892
|
+
if (c.type === "attributes")
|
|
893
|
+
Y(c.target);
|
|
894
|
+
else
|
|
895
|
+
for (const u of c.addedNodes)
|
|
896
|
+
if (u instanceof Element) {
|
|
897
|
+
Y(u);
|
|
898
|
+
for (const l of u.querySelectorAll(ve))
|
|
899
|
+
Y(l);
|
|
900
|
+
}
|
|
901
|
+
});
|
|
902
|
+
return o.observe(r, {
|
|
903
|
+
subtree: !0,
|
|
904
|
+
childList: !0,
|
|
905
|
+
attributes: !0,
|
|
906
|
+
attributeFilter: ["aria-hidden"]
|
|
907
|
+
}), () => o.disconnect();
|
|
908
|
+
}, [e, t]);
|
|
909
|
+
}
|
|
910
|
+
const Kt = {
|
|
879
911
|
id: "data-table",
|
|
880
912
|
capabilities: [
|
|
881
913
|
"select_single",
|
|
@@ -1067,8 +1099,8 @@ const _t = {
|
|
|
1067
1099
|
}
|
|
1068
1100
|
}
|
|
1069
1101
|
};
|
|
1070
|
-
|
|
1071
|
-
const
|
|
1102
|
+
ut.registerModules([pt]);
|
|
1103
|
+
const Vt = lt("ag-theme-alfadocs ds:w-full", {
|
|
1072
1104
|
variants: {
|
|
1073
1105
|
density: {
|
|
1074
1106
|
default: "",
|
|
@@ -1085,9 +1117,9 @@ const Lt = ot("ag-theme-alfadocs ds:w-full", {
|
|
|
1085
1117
|
bordered: !0
|
|
1086
1118
|
}
|
|
1087
1119
|
});
|
|
1088
|
-
function
|
|
1120
|
+
function Ut() {
|
|
1089
1121
|
const { t: e } = w();
|
|
1090
|
-
return
|
|
1122
|
+
return $(
|
|
1091
1123
|
() => ({
|
|
1092
1124
|
// Filter strings
|
|
1093
1125
|
contains: e("dataTable.agGrid.contains"),
|
|
@@ -1119,7 +1151,7 @@ function Bt() {
|
|
|
1119
1151
|
[e]
|
|
1120
1152
|
);
|
|
1121
1153
|
}
|
|
1122
|
-
function
|
|
1154
|
+
function Ht() {
|
|
1123
1155
|
return /* @__PURE__ */ n(
|
|
1124
1156
|
"div",
|
|
1125
1157
|
{
|
|
@@ -1127,7 +1159,7 @@ function $t() {
|
|
|
1127
1159
|
"aria-live": "polite",
|
|
1128
1160
|
className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]",
|
|
1129
1161
|
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ n(
|
|
1130
|
-
|
|
1162
|
+
it,
|
|
1131
1163
|
{
|
|
1132
1164
|
variant: "rectangular",
|
|
1133
1165
|
className: "ds:h-[var(--min-target-size)] ds:w-full"
|
|
@@ -1137,10 +1169,10 @@ function $t() {
|
|
|
1137
1169
|
}
|
|
1138
1170
|
);
|
|
1139
1171
|
}
|
|
1140
|
-
function
|
|
1172
|
+
function Qt() {
|
|
1141
1173
|
const { t: e } = w();
|
|
1142
1174
|
return /* @__PURE__ */ n(
|
|
1143
|
-
|
|
1175
|
+
st,
|
|
1144
1176
|
{
|
|
1145
1177
|
variant: "no-results",
|
|
1146
1178
|
size: "sm",
|
|
@@ -1149,29 +1181,29 @@ function Wt() {
|
|
|
1149
1181
|
}
|
|
1150
1182
|
);
|
|
1151
1183
|
}
|
|
1152
|
-
function
|
|
1153
|
-
return e.map(({ hide: t, pinned:
|
|
1184
|
+
function qe(e) {
|
|
1185
|
+
return e.map(({ hide: t, pinned: r, ...a }) => a);
|
|
1154
1186
|
}
|
|
1155
|
-
function
|
|
1187
|
+
function Jt(e) {
|
|
1156
1188
|
try {
|
|
1157
1189
|
const t = localStorage.getItem(`data-table-col-state:${e}`);
|
|
1158
1190
|
if (!t) return null;
|
|
1159
|
-
const
|
|
1160
|
-
return Array.isArray(
|
|
1191
|
+
const r = JSON.parse(t);
|
|
1192
|
+
return Array.isArray(r) ? qe(r) : null;
|
|
1161
1193
|
} catch {
|
|
1162
1194
|
return null;
|
|
1163
1195
|
}
|
|
1164
1196
|
}
|
|
1165
|
-
function
|
|
1197
|
+
function Xt(e, t) {
|
|
1166
1198
|
try {
|
|
1167
1199
|
localStorage.setItem(
|
|
1168
1200
|
`data-table-col-state:${e}`,
|
|
1169
|
-
JSON.stringify(
|
|
1201
|
+
JSON.stringify(qe(t.getColumnState()))
|
|
1170
1202
|
);
|
|
1171
1203
|
} catch {
|
|
1172
1204
|
}
|
|
1173
1205
|
}
|
|
1174
|
-
const
|
|
1206
|
+
const Zt = /* @__PURE__ */ new Set([
|
|
1175
1207
|
"api",
|
|
1176
1208
|
"flex",
|
|
1177
1209
|
"gridInitializing",
|
|
@@ -1179,223 +1211,226 @@ const Ut = /* @__PURE__ */ new Set([
|
|
|
1179
1211
|
"autosizeColumns",
|
|
1180
1212
|
"sizeColumnsToFit"
|
|
1181
1213
|
]);
|
|
1182
|
-
function
|
|
1214
|
+
function Yt(e, t) {
|
|
1183
1215
|
const {
|
|
1184
|
-
columnDefs:
|
|
1185
|
-
rowData:
|
|
1216
|
+
columnDefs: r,
|
|
1217
|
+
rowData: a,
|
|
1186
1218
|
rowSelection: o,
|
|
1187
|
-
pagination:
|
|
1219
|
+
pagination: i = !1,
|
|
1188
1220
|
paginationPageSize: c = 25,
|
|
1189
|
-
paginationPageSizeSelector:
|
|
1190
|
-
gridId:
|
|
1191
|
-
onSelectionChanged:
|
|
1192
|
-
onSortChanged:
|
|
1193
|
-
onFilterChanged:
|
|
1221
|
+
paginationPageSizeSelector: u = [10, 25, 50, 100],
|
|
1222
|
+
gridId: l,
|
|
1223
|
+
onSelectionChanged: p,
|
|
1224
|
+
onSortChanged: s,
|
|
1225
|
+
onFilterChanged: m,
|
|
1194
1226
|
noRowsOverlay: y,
|
|
1195
1227
|
loadingOverlay: b,
|
|
1196
1228
|
gridOptions: T,
|
|
1197
1229
|
density: g,
|
|
1198
1230
|
bordered: N,
|
|
1199
1231
|
heightClass: x = "ds:h-[500px]",
|
|
1200
|
-
className:
|
|
1232
|
+
className: F,
|
|
1201
1233
|
getRowClass: z,
|
|
1202
1234
|
pinnedBottomRowData: W,
|
|
1203
1235
|
printMode: C = !1,
|
|
1204
1236
|
children: M
|
|
1205
|
-
} = e, { t: R, i18n: S } = w(), h =
|
|
1237
|
+
} = e, { t: R, i18n: S } = w(), h = se(null), H = se(null);
|
|
1238
|
+
Wt(H);
|
|
1239
|
+
const [K, Q] = k(0), [J, _] = k(""), _e = Ut(), re = $(
|
|
1206
1240
|
() => ({
|
|
1207
1241
|
getSelection: () => {
|
|
1208
1242
|
var v;
|
|
1209
|
-
const
|
|
1210
|
-
if (!
|
|
1211
|
-
const
|
|
1212
|
-
for (const
|
|
1213
|
-
|
|
1214
|
-
return
|
|
1243
|
+
const d = (v = h.current) == null ? void 0 : v.api;
|
|
1244
|
+
if (!d) return [];
|
|
1245
|
+
const f = [];
|
|
1246
|
+
for (const D of d.getSelectedNodes())
|
|
1247
|
+
D.id != null && f.push(D.id);
|
|
1248
|
+
return f;
|
|
1215
1249
|
},
|
|
1216
|
-
setSelection: (
|
|
1217
|
-
var
|
|
1218
|
-
const
|
|
1219
|
-
if (!
|
|
1220
|
-
const v = new Set(
|
|
1221
|
-
|
|
1250
|
+
setSelection: (d) => {
|
|
1251
|
+
var D;
|
|
1252
|
+
const f = (D = h.current) == null ? void 0 : D.api;
|
|
1253
|
+
if (!f) return;
|
|
1254
|
+
const v = new Set(d);
|
|
1255
|
+
f.forEachNode((I) => {
|
|
1222
1256
|
I.id != null && I.setSelected(v.has(I.id));
|
|
1223
1257
|
});
|
|
1224
1258
|
},
|
|
1225
|
-
selectRange: (
|
|
1226
|
-
var
|
|
1227
|
-
const v = (
|
|
1259
|
+
selectRange: (d, f) => {
|
|
1260
|
+
var Te;
|
|
1261
|
+
const v = (Te = h.current) == null ? void 0 : Te.api;
|
|
1228
1262
|
if (!v) return;
|
|
1229
|
-
const
|
|
1263
|
+
const D = [];
|
|
1230
1264
|
v.forEachNodeAfterFilterAndSort((V) => {
|
|
1231
|
-
V.id != null &&
|
|
1265
|
+
V.id != null && D.push(V.id);
|
|
1232
1266
|
});
|
|
1233
|
-
const I =
|
|
1267
|
+
const I = D.indexOf(d), E = D.indexOf(f);
|
|
1234
1268
|
if (I < 0 || E < 0) return;
|
|
1235
|
-
const [
|
|
1269
|
+
const [B, ne] = I <= E ? [I, E] : [E, I], oe = new Set(D.slice(B, ne + 1));
|
|
1236
1270
|
v.forEachNode((V) => {
|
|
1237
|
-
V.id != null && V.setSelected(
|
|
1271
|
+
V.id != null && V.setSelected(oe.has(V.id));
|
|
1238
1272
|
});
|
|
1239
1273
|
},
|
|
1240
1274
|
clearSelection: () => {
|
|
1241
|
-
var
|
|
1242
|
-
(
|
|
1275
|
+
var d, f;
|
|
1276
|
+
(f = (d = h.current) == null ? void 0 : d.api) == null || f.deselectAll();
|
|
1243
1277
|
},
|
|
1244
1278
|
getFilter: () => {
|
|
1245
|
-
var
|
|
1246
|
-
return ((
|
|
1279
|
+
var d, f;
|
|
1280
|
+
return ((f = (d = h.current) == null ? void 0 : d.api) == null ? void 0 : f.getFilterModel()) ?? {};
|
|
1247
1281
|
},
|
|
1248
|
-
setFilter: (
|
|
1249
|
-
var
|
|
1250
|
-
(v = (
|
|
1282
|
+
setFilter: (d) => {
|
|
1283
|
+
var f, v;
|
|
1284
|
+
(v = (f = h.current) == null ? void 0 : f.api) == null || v.setFilterModel(d);
|
|
1251
1285
|
},
|
|
1252
1286
|
getSort: () => {
|
|
1253
|
-
var
|
|
1254
|
-
const
|
|
1255
|
-
return
|
|
1287
|
+
var f;
|
|
1288
|
+
const d = (f = h.current) == null ? void 0 : f.api;
|
|
1289
|
+
return d ? d.getColumnState().filter((v) => v.sort === "asc" || v.sort === "desc").map((v) => ({ colId: v.colId, sort: v.sort })) : [];
|
|
1256
1290
|
},
|
|
1257
|
-
setSort: (
|
|
1258
|
-
var
|
|
1259
|
-
const
|
|
1260
|
-
if (!
|
|
1261
|
-
const v =
|
|
1262
|
-
const E =
|
|
1291
|
+
setSort: (d) => {
|
|
1292
|
+
var D;
|
|
1293
|
+
const f = (D = h.current) == null ? void 0 : D.api;
|
|
1294
|
+
if (!f) return;
|
|
1295
|
+
const v = f.getColumnState().map((I) => {
|
|
1296
|
+
const E = d.find((B) => B.colId === I.colId);
|
|
1263
1297
|
return { ...I, sort: E ? E.sort : null };
|
|
1264
1298
|
});
|
|
1265
|
-
|
|
1299
|
+
f.applyColumnState({ state: v, defaultState: { sort: null } });
|
|
1266
1300
|
},
|
|
1267
1301
|
getCurrentPage: () => {
|
|
1268
|
-
var
|
|
1269
|
-
return ((
|
|
1302
|
+
var d, f;
|
|
1303
|
+
return ((f = (d = h.current) == null ? void 0 : d.api) == null ? void 0 : f.paginationGetCurrentPage()) ?? 0;
|
|
1270
1304
|
},
|
|
1271
|
-
goToPage: (
|
|
1272
|
-
var
|
|
1273
|
-
(v = (
|
|
1305
|
+
goToPage: (d) => {
|
|
1306
|
+
var f, v;
|
|
1307
|
+
(v = (f = h.current) == null ? void 0 : f.api) == null || v.paginationGoToPage(d);
|
|
1274
1308
|
},
|
|
1275
1309
|
getRawApi: () => {
|
|
1276
|
-
var
|
|
1277
|
-
return (
|
|
1310
|
+
var d;
|
|
1311
|
+
return (d = h.current) == null ? void 0 : d.api;
|
|
1278
1312
|
}
|
|
1279
1313
|
}),
|
|
1280
1314
|
[]
|
|
1281
1315
|
);
|
|
1282
|
-
|
|
1283
|
-
const
|
|
1316
|
+
ot(t, () => re, [re]), xt(Kt, re, l);
|
|
1317
|
+
const Be = S.dir() === "rtl", $e = a === void 0, We = Ct(), { resolvedTheme: he } = St(), Ke = (he === "light-accessible" || he === "dark-accessible") && g === "compact" ? "default" : g, Ve = $(() => {
|
|
1284
1318
|
if (o)
|
|
1285
1319
|
return o === "single" ? { mode: "singleRow" } : {
|
|
1286
1320
|
mode: "multiRow",
|
|
1287
1321
|
headerCheckbox: !0,
|
|
1288
1322
|
checkboxes: !0
|
|
1289
1323
|
};
|
|
1290
|
-
}, [o]),
|
|
1291
|
-
var
|
|
1292
|
-
if (!
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1295
|
-
state:
|
|
1324
|
+
}, [o]), Ue = A(() => {
|
|
1325
|
+
var f;
|
|
1326
|
+
if (!l || !((f = h.current) != null && f.api)) return;
|
|
1327
|
+
const d = Jt(l);
|
|
1328
|
+
d && h.current.api.applyColumnState({
|
|
1329
|
+
state: d,
|
|
1296
1330
|
applyOrder: !0
|
|
1297
1331
|
});
|
|
1298
|
-
}, [
|
|
1299
|
-
(
|
|
1300
|
-
var
|
|
1301
|
-
|
|
1332
|
+
}, [l]), ae = A(
|
|
1333
|
+
(d) => {
|
|
1334
|
+
var f;
|
|
1335
|
+
d.source && Zt.has(d.source) || l && ((f = h.current) != null && f.api) && Xt(l, h.current.api);
|
|
1302
1336
|
},
|
|
1303
|
-
[
|
|
1304
|
-
),
|
|
1337
|
+
[l]
|
|
1338
|
+
), He = $(() => {
|
|
1305
1339
|
if (!T) return;
|
|
1306
|
-
const
|
|
1307
|
-
return delete
|
|
1308
|
-
}, [T]),
|
|
1340
|
+
const d = { ...T };
|
|
1341
|
+
return delete d.defaultColDef, d;
|
|
1342
|
+
}, [T]), Qe = A(() => {
|
|
1309
1343
|
var v;
|
|
1310
|
-
const
|
|
1311
|
-
if (!
|
|
1312
|
-
const
|
|
1313
|
-
|
|
1314
|
-
}, [
|
|
1315
|
-
(
|
|
1344
|
+
const d = (v = h.current) == null ? void 0 : v.api;
|
|
1345
|
+
if (!d) return;
|
|
1346
|
+
const f = d.getSelectedRows();
|
|
1347
|
+
Q(f.length), p == null || p(f);
|
|
1348
|
+
}, [p]), Je = A(
|
|
1349
|
+
(d) => {
|
|
1316
1350
|
var v;
|
|
1317
|
-
const
|
|
1318
|
-
if (
|
|
1319
|
-
const I =
|
|
1351
|
+
const f = (v = h.current) == null ? void 0 : v.api;
|
|
1352
|
+
if (f) {
|
|
1353
|
+
const I = f.getColumnState().find((E) => E.sort);
|
|
1320
1354
|
if (I) {
|
|
1321
|
-
const E = I.colId,
|
|
1322
|
-
|
|
1355
|
+
const E = I.colId, B = f.getColumnDef(E), ne = (B == null ? void 0 : B.headerName) ?? E, oe = I.sort === "asc" ? "dataTable.sortAscending" : "dataTable.sortDescending";
|
|
1356
|
+
_(
|
|
1323
1357
|
R("dataTable.sortAnnounce", {
|
|
1324
|
-
column:
|
|
1325
|
-
direction: R(
|
|
1358
|
+
column: ne,
|
|
1359
|
+
direction: R(oe)
|
|
1326
1360
|
})
|
|
1327
1361
|
);
|
|
1328
1362
|
} else
|
|
1329
|
-
|
|
1363
|
+
_("");
|
|
1330
1364
|
}
|
|
1331
|
-
|
|
1365
|
+
s == null || s(d);
|
|
1332
1366
|
},
|
|
1333
|
-
[
|
|
1334
|
-
),
|
|
1335
|
-
(
|
|
1336
|
-
|
|
1367
|
+
[s, R]
|
|
1368
|
+
), Xe = A(
|
|
1369
|
+
(d) => {
|
|
1370
|
+
m == null || m(d);
|
|
1337
1371
|
},
|
|
1338
|
-
[
|
|
1372
|
+
[m]
|
|
1339
1373
|
);
|
|
1340
|
-
|
|
1341
|
-
if (!
|
|
1342
|
-
const
|
|
1343
|
-
return () => clearTimeout(
|
|
1344
|
-
}, [
|
|
1345
|
-
const
|
|
1374
|
+
q(() => {
|
|
1375
|
+
if (!J) return;
|
|
1376
|
+
const d = setTimeout(() => _(""), 3e3);
|
|
1377
|
+
return () => clearTimeout(d);
|
|
1378
|
+
}, [J]);
|
|
1379
|
+
const Ze = y ?? Qt, Ye = b ?? Ht, et = A(
|
|
1346
1380
|
() => {
|
|
1347
|
-
var
|
|
1348
|
-
return (
|
|
1381
|
+
var d;
|
|
1382
|
+
return (d = h.current) == null ? void 0 : d.api;
|
|
1349
1383
|
},
|
|
1350
1384
|
[]
|
|
1351
|
-
),
|
|
1385
|
+
), tt = A(() => {
|
|
1352
1386
|
typeof window < "u" && window.print();
|
|
1353
|
-
}, []),
|
|
1354
|
-
density:
|
|
1387
|
+
}, []), rt = Vt({
|
|
1388
|
+
density: Ke,
|
|
1355
1389
|
bordered: N,
|
|
1356
|
-
className:
|
|
1357
|
-
}),
|
|
1358
|
-
|
|
1390
|
+
className: F
|
|
1391
|
+
}), at = M ?? /* @__PURE__ */ n("div", { className: "data-table-toolbar ds:flex ds:justify-end", children: /* @__PURE__ */ O(
|
|
1392
|
+
Ie,
|
|
1359
1393
|
{
|
|
1360
1394
|
role: "toolbar",
|
|
1361
1395
|
"aria-label": R("dataTable.tableActions"),
|
|
1362
1396
|
className: "ds:bg-[var(--background)]",
|
|
1363
1397
|
children: [
|
|
1364
|
-
/* @__PURE__ */ n(
|
|
1365
|
-
/* @__PURE__ */ n(
|
|
1366
|
-
/* @__PURE__ */ n(
|
|
1398
|
+
/* @__PURE__ */ n(ee.ExportMenu, {}),
|
|
1399
|
+
/* @__PURE__ */ n(ee.Print, {}),
|
|
1400
|
+
/* @__PURE__ */ n(ee.ColumnToggle, {})
|
|
1367
1401
|
]
|
|
1368
1402
|
}
|
|
1369
|
-
) }),
|
|
1403
|
+
) }), nt = C ? !1 : i;
|
|
1370
1404
|
return /* @__PURE__ */ O(
|
|
1371
1405
|
"div",
|
|
1372
1406
|
{
|
|
1373
1407
|
className: "ds:flex ds:w-full ds:min-h-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1374
|
-
"aria-busy":
|
|
1408
|
+
"aria-busy": $e ? "true" : void 0,
|
|
1375
1409
|
"data-component": "data-table",
|
|
1376
|
-
"data-component-id":
|
|
1410
|
+
"data-component-id": l,
|
|
1377
1411
|
"data-print-mode": C ? "true" : void 0,
|
|
1378
1412
|
children: [
|
|
1379
1413
|
!C && /* @__PURE__ */ n(
|
|
1380
|
-
|
|
1414
|
+
Dt,
|
|
1381
1415
|
{
|
|
1382
|
-
getApi:
|
|
1416
|
+
getApi: et,
|
|
1383
1417
|
selectionCount: K,
|
|
1384
|
-
onPrint:
|
|
1385
|
-
children:
|
|
1418
|
+
onPrint: tt,
|
|
1419
|
+
children: at
|
|
1386
1420
|
}
|
|
1387
1421
|
),
|
|
1388
1422
|
/* @__PURE__ */ n(
|
|
1389
1423
|
"div",
|
|
1390
1424
|
{
|
|
1391
|
-
|
|
1425
|
+
ref: H,
|
|
1426
|
+
className: [rt, C ? "" : x].join(" ").trim(),
|
|
1392
1427
|
children: /* @__PURE__ */ n(
|
|
1393
|
-
|
|
1428
|
+
ct,
|
|
1394
1429
|
{
|
|
1395
1430
|
ref: h,
|
|
1396
1431
|
theme: "legacy",
|
|
1397
|
-
columnDefs:
|
|
1398
|
-
rowData:
|
|
1432
|
+
columnDefs: r,
|
|
1433
|
+
rowData: a,
|
|
1399
1434
|
defaultColDef: {
|
|
1400
1435
|
sortable: !0,
|
|
1401
1436
|
// Default filter = DS-styled text filter so untyped columns
|
|
@@ -1403,8 +1438,8 @@ function Ht(e, t) {
|
|
|
1403
1438
|
// language instead of AG Grid's stock browser-skinned input.
|
|
1404
1439
|
// Number / date / select columns opt into their dedicated
|
|
1405
1440
|
// wrapper per-column.
|
|
1406
|
-
filter:
|
|
1407
|
-
floatingFilterComponent:
|
|
1441
|
+
filter: _t,
|
|
1442
|
+
floatingFilterComponent: Bt,
|
|
1408
1443
|
resizable: !0,
|
|
1409
1444
|
floatingFilter: !0,
|
|
1410
1445
|
// §13d — faint sort icon advertises which columns are
|
|
@@ -1412,13 +1447,13 @@ function Ht(e, t) {
|
|
|
1412
1447
|
unSortIcon: !0,
|
|
1413
1448
|
...T == null ? void 0 : T.defaultColDef
|
|
1414
1449
|
},
|
|
1415
|
-
rowSelection:
|
|
1416
|
-
pagination:
|
|
1450
|
+
rowSelection: Ve,
|
|
1451
|
+
pagination: nt,
|
|
1417
1452
|
paginationPageSize: c,
|
|
1418
|
-
paginationPageSizeSelector:
|
|
1419
|
-
paginationNumberFormatter: (
|
|
1420
|
-
animateRows: !
|
|
1421
|
-
enableRtl:
|
|
1453
|
+
paginationPageSizeSelector: u,
|
|
1454
|
+
paginationNumberFormatter: (d) => new Intl.NumberFormat(S.language).format(d.value),
|
|
1455
|
+
animateRows: !We,
|
|
1456
|
+
enableRtl: Be,
|
|
1422
1457
|
ensureDomOrder: !0,
|
|
1423
1458
|
enableCellSpan: !0,
|
|
1424
1459
|
enableCellTextSelection: !0,
|
|
@@ -1436,111 +1471,111 @@ function Ht(e, t) {
|
|
|
1436
1471
|
undoRedoCellEditingLimit: 20,
|
|
1437
1472
|
suppressCellFocus: !1,
|
|
1438
1473
|
rowBuffer: 10,
|
|
1439
|
-
localeText:
|
|
1440
|
-
noRowsOverlayComponent:
|
|
1441
|
-
loadingOverlayComponent:
|
|
1474
|
+
localeText: _e,
|
|
1475
|
+
noRowsOverlayComponent: Ze,
|
|
1476
|
+
loadingOverlayComponent: Ye,
|
|
1442
1477
|
getRowClass: z,
|
|
1443
1478
|
pinnedBottomRowData: W,
|
|
1444
1479
|
domLayout: C ? "autoHeight" : void 0,
|
|
1445
|
-
onGridReady:
|
|
1480
|
+
onGridReady: Ue,
|
|
1446
1481
|
onColumnMoved: ae,
|
|
1447
1482
|
onColumnResized: ae,
|
|
1448
1483
|
onColumnPinned: ae,
|
|
1449
|
-
onSortChanged:
|
|
1450
|
-
onFilterChanged:
|
|
1451
|
-
onSelectionChanged:
|
|
1452
|
-
...
|
|
1484
|
+
onSortChanged: Je,
|
|
1485
|
+
onFilterChanged: Xe,
|
|
1486
|
+
onSelectionChanged: Qe,
|
|
1487
|
+
...He
|
|
1453
1488
|
}
|
|
1454
1489
|
)
|
|
1455
1490
|
}
|
|
1456
1491
|
),
|
|
1457
1492
|
!C && /* @__PURE__ */ n("div", { className: "ds:flex ds:items-center ds:justify-between type-body-sm ds:text-[color:var(--muted-foreground)]", children: K > 0 ? /* @__PURE__ */ n("span", { children: R("dataTable.selected", { count: K }) }) : /* @__PURE__ */ n("span", {}) }),
|
|
1458
|
-
/* @__PURE__ */ n("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children:
|
|
1493
|
+
/* @__PURE__ */ n("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: J })
|
|
1459
1494
|
]
|
|
1460
1495
|
}
|
|
1461
1496
|
);
|
|
1462
1497
|
}
|
|
1463
|
-
const
|
|
1464
|
-
|
|
1465
|
-
const
|
|
1466
|
-
Toolbar:
|
|
1498
|
+
const Le = P(Yt);
|
|
1499
|
+
Le.displayName = "DataTable";
|
|
1500
|
+
const Or = Object.assign(Le, {
|
|
1501
|
+
Toolbar: ee
|
|
1467
1502
|
});
|
|
1468
|
-
function
|
|
1469
|
-
if (!
|
|
1470
|
-
const t = e,
|
|
1471
|
-
return
|
|
1503
|
+
function xe(e) {
|
|
1504
|
+
if (!we(e)) return e;
|
|
1505
|
+
const t = e, r = t.props.className ?? "", a = /\bsize-|\bw-|\bh-/.test(r) ? r : `${r} size-4`.trim();
|
|
1506
|
+
return Ne(t, { className: a, size: t.props.size ?? 16 });
|
|
1472
1507
|
}
|
|
1473
|
-
function
|
|
1508
|
+
function Pr(e) {
|
|
1474
1509
|
return Math.max(1, e) * 32 + 26;
|
|
1475
1510
|
}
|
|
1476
|
-
function
|
|
1511
|
+
function ie(e, t) {
|
|
1477
1512
|
return typeof e == "function" ? e(t) : !!e;
|
|
1478
1513
|
}
|
|
1479
|
-
const
|
|
1480
|
-
function
|
|
1481
|
-
const { data: t, actions:
|
|
1514
|
+
const er = "ds:text-[color:var(--destructive)] ds:hover:text-[color:var(--destructive-hover)]";
|
|
1515
|
+
function zr(e) {
|
|
1516
|
+
const { data: t, actions: r, intent: a = "ghost", group: o, label: i, collapsed: c } = e, { t: u } = w();
|
|
1482
1517
|
if (!t) return null;
|
|
1483
|
-
const
|
|
1518
|
+
const l = r.filter((m) => !ie(m.hidden, t));
|
|
1484
1519
|
if (typeof c == "function" ? c() : !!c)
|
|
1485
1520
|
return /* @__PURE__ */ O(j.Root, { children: [
|
|
1486
1521
|
/* @__PURE__ */ n(j.Trigger, { asChild: !0, children: /* @__PURE__ */ n(
|
|
1487
|
-
|
|
1522
|
+
L,
|
|
1488
1523
|
{
|
|
1489
1524
|
size: "sm",
|
|
1490
|
-
intent:
|
|
1491
|
-
icon: /* @__PURE__ */ n(
|
|
1492
|
-
"aria-label":
|
|
1525
|
+
intent: a,
|
|
1526
|
+
icon: /* @__PURE__ */ n(wt, { "aria-hidden": !0 }),
|
|
1527
|
+
"aria-label": i ?? u("dataTable.actions", "Actions")
|
|
1493
1528
|
}
|
|
1494
1529
|
) }),
|
|
1495
|
-
/* @__PURE__ */ n(j.Content, { align: "end", children:
|
|
1530
|
+
/* @__PURE__ */ n(j.Content, { align: "end", children: l.map((m, y) => /* @__PURE__ */ n(
|
|
1496
1531
|
j.Item,
|
|
1497
1532
|
{
|
|
1498
|
-
startIcon:
|
|
1499
|
-
disabled:
|
|
1500
|
-
onSelect: () =>
|
|
1501
|
-
className:
|
|
1502
|
-
children:
|
|
1533
|
+
startIcon: xe(m.icon),
|
|
1534
|
+
disabled: ie(m.disabled, t),
|
|
1535
|
+
onSelect: () => m.onClick(t),
|
|
1536
|
+
className: m.variant === "destructive" ? "ds:text-[color:var(--destructive)]" : void 0,
|
|
1537
|
+
children: m.label
|
|
1503
1538
|
},
|
|
1504
1539
|
y
|
|
1505
1540
|
)) })
|
|
1506
1541
|
] });
|
|
1507
|
-
const
|
|
1508
|
-
const b =
|
|
1542
|
+
const s = l.map((m, y) => {
|
|
1543
|
+
const b = ie(m.disabled, t), T = b && m.disabledReason ? m.disabledReason : m.label;
|
|
1509
1544
|
return /* @__PURE__ */ n(
|
|
1510
|
-
|
|
1545
|
+
L,
|
|
1511
1546
|
{
|
|
1512
1547
|
size: "sm",
|
|
1513
|
-
intent:
|
|
1514
|
-
icon:
|
|
1548
|
+
intent: a,
|
|
1549
|
+
icon: xe(m.icon),
|
|
1515
1550
|
tooltip: T,
|
|
1516
|
-
"aria-label":
|
|
1551
|
+
"aria-label": m.label,
|
|
1517
1552
|
disabled: b,
|
|
1518
1553
|
onClick: (g) => {
|
|
1519
|
-
g.stopPropagation(),
|
|
1554
|
+
g.stopPropagation(), m.onClick(t);
|
|
1520
1555
|
},
|
|
1521
|
-
className:
|
|
1556
|
+
className: m.variant === "destructive" ? er : void 0
|
|
1522
1557
|
},
|
|
1523
1558
|
y
|
|
1524
1559
|
);
|
|
1525
1560
|
});
|
|
1526
1561
|
return o ? /* @__PURE__ */ n(
|
|
1527
|
-
|
|
1562
|
+
Ie,
|
|
1528
1563
|
{
|
|
1529
|
-
"aria-label":
|
|
1564
|
+
"aria-label": i ?? u("dataTable.actions", "Actions"),
|
|
1530
1565
|
size: "sm",
|
|
1531
|
-
children:
|
|
1566
|
+
children: s
|
|
1532
1567
|
}
|
|
1533
|
-
) : /* @__PURE__ */ n("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children:
|
|
1568
|
+
) : /* @__PURE__ */ n("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: s });
|
|
1534
1569
|
}
|
|
1535
1570
|
export {
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1571
|
+
zr as A,
|
|
1572
|
+
Or as D,
|
|
1573
|
+
_t as T,
|
|
1574
|
+
Bt as a,
|
|
1575
|
+
ee as b,
|
|
1576
|
+
Dt as c,
|
|
1577
|
+
Pr as d,
|
|
1578
|
+
Kt as e,
|
|
1579
|
+
Oe as f
|
|
1545
1580
|
};
|
|
1546
|
-
//# sourceMappingURL=actions-cell-renderer-
|
|
1581
|
+
//# sourceMappingURL=actions-cell-renderer-ClGCSQnA.js.map
|