@alfadocs/ui-kit 0.65.0 → 0.66.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/{ai-tools-rail-JnlTqfS4.js → ai-tools-rail-DAfaW8eA.js} +64 -55
- package/dist/_chunks/{bishop-score-x2fNqbuZ.js → bishop-score-DPN4Ched.js} +2 -2
- package/dist/_chunks/{bmi-calculator-C3roxbqD.js → bmi-calculator-DuUneHuZ.js} +2 -2
- package/dist/_chunks/columns-2-BTOBZbep.js +15 -0
- package/dist/_chunks/{cycle-calculator-DrVXbIB4.js → cycle-calculator-D6LTmtQt.js} +2 -2
- package/dist/_chunks/{due-date-calculator-D4K1BnE2.js → due-date-calculator-CIG194vq.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-CFqQc56y.js → editable-currency-cell-renderer-f3d0Rhue.js} +330 -340
- package/dist/_chunks/{fetal-weight-B_pBjlO7.js → fetal-weight-Xf8-ZoDy.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-BETQAVkA.js → gestational-age-calculator-BGsZaWXW.js} +2 -2
- package/dist/_chunks/{hcg-doubling-8zXCJgAQ.js → hcg-doubling-LH5i6oM7.js} +2 -2
- package/dist/_chunks/{type-DZ5OMRA2.js → image-C6RM5hfF.js} +4 -16
- package/dist/_chunks/{insert-result-DIAG3ltJ.js → insert-result-njqBthzT.js} +68 -57
- package/dist/_chunks/{marketplace-app-shell-BXfRMiRk.js → marketplace-app-shell-Cou6XnMJ.js} +2 -2
- package/dist/_chunks/{patient-shell-CF_qon7C.js → patient-shell-Tgpv0HND.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-BuzLTwjy.js → pregnancy-dating-f9aJbiAk.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-aicn7qs7.js → pregnancy-weight-gain-BMRBeA8V.js} +2 -2
- package/dist/_chunks/rich-text-editor-B5XQNxe8.js +1586 -0
- package/dist/_chunks/{sidebar-DPEHzxLZ.js → sidebar-BFwbx74W.js} +12 -1
- package/dist/_chunks/trash-2-rPAKaRgB.js +18 -0
- package/dist/_chunks/{unit-converter-CHN2cZ4b.js → unit-converter-C1V3ACM9.js} +2 -2
- package/dist/_chunks/{workflow-map-BX3JY1Bu.js → workflow-map-Bt4Of5dT.js} +136 -148
- package/dist/agent-catalog.json +1 -1
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +12 -2
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +16 -0
- package/dist/i18n/locales/ar.js +16 -0
- package/dist/i18n/locales/de.d.ts +16 -0
- package/dist/i18n/locales/de.js +16 -0
- package/dist/i18n/locales/el.d.ts +16 -0
- package/dist/i18n/locales/el.js +16 -0
- package/dist/i18n/locales/en.d.ts +16 -0
- package/dist/i18n/locales/en.js +16 -0
- package/dist/i18n/locales/es.d.ts +16 -0
- package/dist/i18n/locales/es.js +16 -0
- package/dist/i18n/locales/fr.d.ts +16 -0
- package/dist/i18n/locales/fr.js +16 -0
- package/dist/i18n/locales/hi.d.ts +16 -0
- package/dist/i18n/locales/hi.js +16 -0
- package/dist/i18n/locales/it.d.ts +16 -0
- package/dist/i18n/locales/it.js +16 -0
- package/dist/i18n/locales/ja.d.ts +16 -0
- package/dist/i18n/locales/ja.js +16 -0
- package/dist/i18n/locales/nl.d.ts +16 -0
- package/dist/i18n/locales/nl.js +16 -0
- package/dist/i18n/locales/pl.d.ts +16 -0
- package/dist/i18n/locales/pl.js +16 -0
- package/dist/i18n/locales/pt.d.ts +16 -0
- package/dist/i18n/locales/pt.js +16 -0
- package/dist/i18n/locales/ro.d.ts +16 -0
- package/dist/i18n/locales/ro.js +16 -0
- package/dist/i18n/locales/ru.d.ts +16 -0
- package/dist/i18n/locales/ru.js +16 -0
- package/dist/i18n/locales/sq.d.ts +16 -0
- package/dist/i18n/locales/sq.js +16 -0
- package/dist/i18n/locales/sv.d.ts +16 -0
- package/dist/i18n/locales/sv.js +16 -0
- package/dist/i18n/locales/tr.d.ts +16 -0
- package/dist/i18n/locales/tr.js +16 -0
- package/dist/i18n/locales/zh.d.ts +16 -0
- package/dist/i18n/locales/zh.js +16 -0
- package/dist/index.js +18 -18
- package/dist/locales/ar.json +16 -0
- package/dist/locales/de.json +16 -0
- package/dist/locales/el.json +16 -0
- package/dist/locales/en.json +16 -0
- package/dist/locales/es.json +16 -0
- package/dist/locales/fr.json +16 -0
- package/dist/locales/hi.json +16 -0
- package/dist/locales/it.json +16 -0
- package/dist/locales/ja.json +16 -0
- package/dist/locales/nl.json +16 -0
- package/dist/locales/pl.json +16 -0
- package/dist/locales/pt.json +16 -0
- package/dist/locales/ro.json +16 -0
- package/dist/locales/ru.json +16 -0
- package/dist/locales/sq.json +16 -0
- package/dist/locales/sv.json +16 -0
- package/dist/locales/tr.json +16 -0
- package/dist/locales/zh.json +16 -0
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/rich-text-editor-u36FqSWz.js +0 -1190
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as s, jsxs as E } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as z, forwardRef as
|
|
2
|
+
import { useMemo as z, forwardRef as q, useState as R, useCallback as M, useEffect as P, useRef as X, createContext as Ne, useContext as Se, isValidElement as we, cloneElement as Fe, useImperativeHandle as yt } from "react";
|
|
3
3
|
import { S as Tt } from "./skeleton-CZbwyJAA.js";
|
|
4
4
|
import { E as Ct } from "./empty-state-BLy7tigq.js";
|
|
5
5
|
import { c as xt } from "./index-D2ZczOXr.js";
|
|
6
6
|
import { useTranslation as F } from "react-i18next";
|
|
7
7
|
import { useGridFilter as J, AgGridReact as Nt } from "ag-grid-react";
|
|
8
8
|
import { ModuleRegistry as St, AllCommunityModule as wt } from "ag-grid-community";
|
|
9
|
-
import { B as
|
|
9
|
+
import { B as L } from "./button-DD_0Xdmr.js";
|
|
10
10
|
import { I as V } from "./icon-button-LqoiKcUN.js";
|
|
11
11
|
import { P as Z } from "./popover-DTbfAuR0.js";
|
|
12
12
|
import { C as Re } from "./checkbox-DRcOdmXv.js";
|
|
@@ -16,7 +16,7 @@ import { D as Y } from "./dropdown-menu-DwwPovMZ.js";
|
|
|
16
16
|
import { X as De } from "./x-CCcI3eJp.js";
|
|
17
17
|
import { R as Ft } from "./refresh-cw-CC8jSKMr.js";
|
|
18
18
|
import { S as pe } from "./search-BonnQsHv.js";
|
|
19
|
-
import {
|
|
19
|
+
import { C as Rt } from "./columns-2-BTOBZbep.js";
|
|
20
20
|
import { G as Dt } from "./grip-vertical-Dlg0_k5C.js";
|
|
21
21
|
import { P as kt } from "./printer-CeVEWfQq.js";
|
|
22
22
|
import { F as ke } from "./file-text-DSNuv2B8.js";
|
|
@@ -33,37 +33,27 @@ import { A as ze } from "./autocomplete-CcCFlVf-.js";
|
|
|
33
33
|
import { N as ee } from "./number-input-Dj5L3pXK.js";
|
|
34
34
|
import { B as Mt } from "./badge-zsf5i5bH.js";
|
|
35
35
|
import { A as Ae } from "./avatar-BNQNhoyL.js";
|
|
36
|
-
import { T as
|
|
36
|
+
import { T as jt } from "./tooltip-DvmfrNvB.js";
|
|
37
37
|
import { T as he } from "./timestamp-BV2lC-wV.js";
|
|
38
|
-
import { S as
|
|
39
|
-
import { S as
|
|
40
|
-
import { u as
|
|
41
|
-
import { c as Pe, a as Oe, b as Me, d as
|
|
42
|
-
|
|
43
|
-
* @license lucide-react v1.8.0 - ISC
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the ISC license.
|
|
46
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/
|
|
48
|
-
const $t = [
|
|
49
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
50
|
-
["path", { d: "M12 3v18", key: "108xh3" }]
|
|
51
|
-
], Gt = Rt("columns-2", $t);
|
|
52
|
-
function Bt(t) {
|
|
38
|
+
import { S as Lt } from "./square-check-big-Jr-0202D.js";
|
|
39
|
+
import { S as qt } from "./square-CZoGU14v.js";
|
|
40
|
+
import { u as $t } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
41
|
+
import { c as Pe, a as Oe, b as Me, d as je } from "./input-surface-xyERuLU_.js";
|
|
42
|
+
function _t(t) {
|
|
53
43
|
if (!we(t)) return t;
|
|
54
44
|
const e = t, a = e.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} ds:size-4`.trim();
|
|
55
45
|
return Fe(e, { className: n, size: e.props.size ?? 16 });
|
|
56
46
|
}
|
|
57
|
-
const
|
|
58
|
-
function
|
|
59
|
-
const e = Se(
|
|
47
|
+
const Le = Ne(null);
|
|
48
|
+
function $(t) {
|
|
49
|
+
const e = Se(Le);
|
|
60
50
|
if (!e)
|
|
61
51
|
throw new Error(
|
|
62
52
|
`${t} must be rendered inside <DataTable.Toolbar> as a descendant of <DataTable>.`
|
|
63
53
|
);
|
|
64
54
|
return e;
|
|
65
55
|
}
|
|
66
|
-
function
|
|
56
|
+
function Gt({
|
|
67
57
|
getApi: t,
|
|
68
58
|
selectionCount: e,
|
|
69
59
|
onPrint: a,
|
|
@@ -73,9 +63,9 @@ function Vt({
|
|
|
73
63
|
() => ({ getApi: t, selectionCount: e, onPrint: a }),
|
|
74
64
|
[t, e, a]
|
|
75
65
|
);
|
|
76
|
-
return /* @__PURE__ */ s(
|
|
66
|
+
return /* @__PURE__ */ s(Le.Provider, { value: r, children: n });
|
|
77
67
|
}
|
|
78
|
-
const
|
|
68
|
+
const Bt = [
|
|
79
69
|
"data-table-toolbar",
|
|
80
70
|
// Mobile (<sm) keeps `flex-wrap` so a wide QuickSearch can flow above the
|
|
81
71
|
// Actions cluster on narrow screens. From `sm` (≥640px) we switch to
|
|
@@ -94,20 +84,20 @@ const Ut = [
|
|
|
94
84
|
"ds:border ds:border-[color:var(--card-border)]",
|
|
95
85
|
"ds:shadow-[var(--shadow-sm)]",
|
|
96
86
|
"ds:py-[var(--spacing-sm)] ds:px-[var(--spacing-md)]"
|
|
97
|
-
].join(" "),
|
|
87
|
+
].join(" "), qe = q(
|
|
98
88
|
({ className: t, children: e, ...a }, n) => /* @__PURE__ */ s(
|
|
99
89
|
"div",
|
|
100
90
|
{
|
|
101
91
|
ref: n,
|
|
102
92
|
role: "toolbar",
|
|
103
|
-
className: [
|
|
93
|
+
className: [Bt, t ?? ""].join(" ").trim(),
|
|
104
94
|
...a,
|
|
105
95
|
children: e
|
|
106
96
|
}
|
|
107
97
|
)
|
|
108
98
|
);
|
|
109
|
-
|
|
110
|
-
const
|
|
99
|
+
qe.displayName = "DataTable.Toolbar";
|
|
100
|
+
const $e = q(
|
|
111
101
|
({ className: t, children: e, ...a }, n) => /* @__PURE__ */ s(
|
|
112
102
|
"div",
|
|
113
103
|
{
|
|
@@ -126,8 +116,8 @@ const qe = _(
|
|
|
126
116
|
}
|
|
127
117
|
)
|
|
128
118
|
);
|
|
129
|
-
|
|
130
|
-
const
|
|
119
|
+
$e.displayName = "DataTable.Toolbar.FilterBar";
|
|
120
|
+
const _e = q(
|
|
131
121
|
({ className: t, children: e, ...a }, n) => /* @__PURE__ */ s(
|
|
132
122
|
"div",
|
|
133
123
|
{
|
|
@@ -142,13 +132,13 @@ const $e = _(
|
|
|
142
132
|
}
|
|
143
133
|
)
|
|
144
134
|
);
|
|
145
|
-
|
|
146
|
-
const Ge =
|
|
135
|
+
_e.displayName = "DataTable.Toolbar.Actions";
|
|
136
|
+
const Ge = q(
|
|
147
137
|
({ label: t, onExport: e, intent: a = "outline", ...n }, r) => {
|
|
148
|
-
const { t:
|
|
149
|
-
const d =
|
|
138
|
+
const { t: l } = F(), { getApi: o } = $("DataTable.Toolbar.ExportCsv"), u = M(() => {
|
|
139
|
+
const d = o();
|
|
150
140
|
d && (e ? e(d) : d.exportDataAsCsv());
|
|
151
|
-
}, [
|
|
141
|
+
}, [o, e]);
|
|
152
142
|
return /* @__PURE__ */ s(
|
|
153
143
|
V,
|
|
154
144
|
{
|
|
@@ -156,7 +146,7 @@ const Ge = _(
|
|
|
156
146
|
type: "button",
|
|
157
147
|
intent: a,
|
|
158
148
|
icon: /* @__PURE__ */ s(ne, { "aria-hidden": !0 }),
|
|
159
|
-
tooltip: t ??
|
|
149
|
+
tooltip: t ?? l("dataTable.exportCsv"),
|
|
160
150
|
onClick: u,
|
|
161
151
|
...n
|
|
162
152
|
}
|
|
@@ -178,12 +168,12 @@ async function Be(t, e) {
|
|
|
178
168
|
const [{ jsPDF: a }, { default: n }] = await Promise.all([
|
|
179
169
|
import("./jspdf.es.min-DaapWjR1.js").then((g) => g.j),
|
|
180
170
|
import("./jspdf.plugin.autotable-CSiDNyPn.js")
|
|
181
|
-
]),
|
|
182
|
-
|
|
171
|
+
]), l = (t.getColumns() ?? []).filter((g) => g.isVisible()), o = [
|
|
172
|
+
l.map((g) => t.getDisplayNameForColumn(g, null) ?? "")
|
|
183
173
|
], u = [];
|
|
184
174
|
t.forEachNodeAfterFilterAndSort((g) => {
|
|
185
175
|
if (!g.data) return;
|
|
186
|
-
const b =
|
|
176
|
+
const b = l.map((v) => {
|
|
187
177
|
const y = t.getCellValue({
|
|
188
178
|
rowNode: g,
|
|
189
179
|
colKey: v,
|
|
@@ -195,7 +185,7 @@ async function Be(t, e) {
|
|
|
195
185
|
});
|
|
196
186
|
const d = W("--muted", [240, 240, 240]), c = W("--foreground", [30, 30, 30]), i = W("--card-foreground", [30, 30, 30]), p = W("--card", [250, 250, 250]), C = new a({ orientation: "landscape" });
|
|
197
187
|
n(C, {
|
|
198
|
-
head:
|
|
188
|
+
head: o,
|
|
199
189
|
body: u,
|
|
200
190
|
headStyles: { fillColor: d, textColor: c },
|
|
201
191
|
bodyStyles: { textColor: i },
|
|
@@ -207,9 +197,9 @@ async function Be(t, e) {
|
|
|
207
197
|
}
|
|
208
198
|
}), C.save(e.fileName);
|
|
209
199
|
}
|
|
210
|
-
const Ve =
|
|
211
|
-
({ label: t, onClick: e, fileName: a, intent: n = "outline", ...r },
|
|
212
|
-
const { t:
|
|
200
|
+
const Ve = q(
|
|
201
|
+
({ label: t, onClick: e, fileName: a, intent: n = "outline", ...r }, l) => {
|
|
202
|
+
const { t: o } = F(), { getApi: u } = $("DataTable.Toolbar.ExportPdf"), d = M(() => {
|
|
213
203
|
const c = u();
|
|
214
204
|
if (e) {
|
|
215
205
|
e(c);
|
|
@@ -222,11 +212,11 @@ const Ve = _(
|
|
|
222
212
|
return /* @__PURE__ */ s(
|
|
223
213
|
V,
|
|
224
214
|
{
|
|
225
|
-
ref:
|
|
215
|
+
ref: l,
|
|
226
216
|
type: "button",
|
|
227
217
|
intent: n,
|
|
228
218
|
icon: /* @__PURE__ */ s(ke, { "aria-hidden": !0 }),
|
|
229
|
-
tooltip: t ??
|
|
219
|
+
tooltip: t ?? o("dataTable.exportPdf"),
|
|
230
220
|
onClick: d,
|
|
231
221
|
...r
|
|
232
222
|
}
|
|
@@ -234,9 +224,9 @@ const Ve = _(
|
|
|
234
224
|
}
|
|
235
225
|
);
|
|
236
226
|
Ve.displayName = "DataTable.Toolbar.ExportPdf";
|
|
237
|
-
const Ue =
|
|
227
|
+
const Ue = q(
|
|
238
228
|
({ label: t, intent: e = "outline", ...a }, n) => {
|
|
239
|
-
const { t: r } = F(), { onPrint:
|
|
229
|
+
const { t: r } = F(), { onPrint: l } = $("DataTable.Toolbar.Print");
|
|
240
230
|
return /* @__PURE__ */ s(
|
|
241
231
|
V,
|
|
242
232
|
{
|
|
@@ -245,7 +235,7 @@ const Ue = _(
|
|
|
245
235
|
intent: e,
|
|
246
236
|
icon: /* @__PURE__ */ s(kt, { "aria-hidden": !0 }),
|
|
247
237
|
tooltip: t ?? r("dataTable.print"),
|
|
248
|
-
onClick:
|
|
238
|
+
onClick: l,
|
|
249
239
|
...a
|
|
250
240
|
}
|
|
251
241
|
);
|
|
@@ -253,12 +243,12 @@ const Ue = _(
|
|
|
253
243
|
);
|
|
254
244
|
Ue.displayName = "DataTable.Toolbar.Print";
|
|
255
245
|
const Ke = ({ placeholder: t, debounceMs: e = 150 }) => {
|
|
256
|
-
const { t: a } = F(), { getApi: n } =
|
|
257
|
-
return P(() => (
|
|
246
|
+
const { t: a } = F(), { getApi: n } = $("DataTable.Toolbar.QuickSearch"), [r, l] = R(""), o = X(void 0);
|
|
247
|
+
return P(() => (o.current && window.clearTimeout(o.current), o.current = window.setTimeout(() => {
|
|
258
248
|
const u = n();
|
|
259
249
|
u && u.setGridOption("quickFilterText", r);
|
|
260
250
|
}, e), () => {
|
|
261
|
-
|
|
251
|
+
o.current && window.clearTimeout(o.current);
|
|
262
252
|
}), [r, e, n]), // Slot wrapper caps the search at a sensible legible width on desktop —
|
|
263
253
|
// without this, TextInput's `w-full` lets the QuickSearch absorb the
|
|
264
254
|
// entire FilterBar row and push trailing Actions onto a second line at
|
|
@@ -272,19 +262,19 @@ const Ke = ({ placeholder: t, debounceMs: e = 150 }) => {
|
|
|
272
262
|
type: "search",
|
|
273
263
|
size: "sm",
|
|
274
264
|
value: r,
|
|
275
|
-
onChange: (u) =>
|
|
265
|
+
onChange: (u) => l(u.target.value),
|
|
276
266
|
placeholder: t ?? a("dataTable.quickSearch.placeholder", "Search…"),
|
|
277
267
|
startAdornment: /* @__PURE__ */ s(pe, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
278
268
|
clearable: !0,
|
|
279
|
-
onClear: () =>
|
|
269
|
+
onClear: () => l(""),
|
|
280
270
|
"aria-label": a("dataTable.quickSearch.label", "Quick search")
|
|
281
271
|
}
|
|
282
272
|
) });
|
|
283
273
|
};
|
|
284
274
|
Ke.displayName = "DataTable.Toolbar.QuickSearch";
|
|
285
|
-
const We =
|
|
275
|
+
const We = q(
|
|
286
276
|
({ onRefresh: t, label: e, intent: a = "outline", ...n }, r) => {
|
|
287
|
-
const { t:
|
|
277
|
+
const { t: l } = F();
|
|
288
278
|
return /* @__PURE__ */ s(
|
|
289
279
|
V,
|
|
290
280
|
{
|
|
@@ -292,7 +282,7 @@ const We = _(
|
|
|
292
282
|
type: "button",
|
|
293
283
|
intent: a,
|
|
294
284
|
icon: /* @__PURE__ */ s(Ft, { "aria-hidden": !0 }),
|
|
295
|
-
tooltip: e ??
|
|
285
|
+
tooltip: e ?? l("dataTable.refresh", "Refresh"),
|
|
296
286
|
onClick: t,
|
|
297
287
|
...n
|
|
298
288
|
}
|
|
@@ -300,7 +290,7 @@ const We = _(
|
|
|
300
290
|
}
|
|
301
291
|
);
|
|
302
292
|
We.displayName = "DataTable.Toolbar.Refresh";
|
|
303
|
-
function
|
|
293
|
+
function Vt(t) {
|
|
304
294
|
if (!t || typeof t != "object") return "";
|
|
305
295
|
const e = t;
|
|
306
296
|
if (typeof e.filter == "string" || typeof e.filter == "number") {
|
|
@@ -310,10 +300,10 @@ function Kt(t) {
|
|
|
310
300
|
return typeof e.dateFrom == "string" ? typeof e.dateTo == "string" && e.dateTo ? `${e.dateFrom} – ${e.dateTo}` : String(e.dateFrom) : Array.isArray(e.values) ? e.values.map(String).join(", ") : "";
|
|
311
301
|
}
|
|
312
302
|
const He = () => {
|
|
313
|
-
const { t } = F(), { getApi: e } =
|
|
303
|
+
const { t } = F(), { getApi: e } = $("DataTable.Toolbar.FilterChips"), [a, n] = R([]), [r, l] = R(""), o = M(() => {
|
|
314
304
|
const i = e();
|
|
315
305
|
if (!i) {
|
|
316
|
-
n([]),
|
|
306
|
+
n([]), l("");
|
|
317
307
|
return;
|
|
318
308
|
}
|
|
319
309
|
const p = i.getFilterModel() ?? {}, C = i.getColumns() ?? [], g = [];
|
|
@@ -322,28 +312,28 @@ const He = () => {
|
|
|
322
312
|
g.push({
|
|
323
313
|
colId: v,
|
|
324
314
|
headerName: f,
|
|
325
|
-
text:
|
|
315
|
+
text: Vt(p[v])
|
|
326
316
|
});
|
|
327
317
|
}
|
|
328
318
|
n(g);
|
|
329
319
|
const b = i.getGridOption("quickFilterText");
|
|
330
|
-
|
|
320
|
+
l(typeof b == "string" ? b : "");
|
|
331
321
|
}, [e]);
|
|
332
322
|
if (P(() => {
|
|
333
323
|
const i = e();
|
|
334
324
|
if (!i) return;
|
|
335
|
-
const p = (C) =>
|
|
336
|
-
return i.addEventListener("filterChanged", p),
|
|
325
|
+
const p = (C) => o();
|
|
326
|
+
return i.addEventListener("filterChanged", p), o(), () => {
|
|
337
327
|
i.removeEventListener("filterChanged", p);
|
|
338
328
|
};
|
|
339
|
-
}, [e,
|
|
329
|
+
}, [e, o]), a.length + (r ? 1 : 0) === 0) return null;
|
|
340
330
|
function d(i) {
|
|
341
331
|
const p = e();
|
|
342
332
|
p && p.destroyFilter(i);
|
|
343
333
|
}
|
|
344
334
|
function c() {
|
|
345
335
|
const i = e();
|
|
346
|
-
i && (i.setFilterModel(null), i.setGridOption("quickFilterText", ""),
|
|
336
|
+
i && (i.setFilterModel(null), i.setGridOption("quickFilterText", ""), l(""));
|
|
347
337
|
}
|
|
348
338
|
return /* @__PURE__ */ E(
|
|
349
339
|
"div",
|
|
@@ -360,7 +350,7 @@ const He = () => {
|
|
|
360
350
|
fill: "outline",
|
|
361
351
|
onRemove: () => {
|
|
362
352
|
const i = e();
|
|
363
|
-
i == null || i.setGridOption("quickFilterText", ""),
|
|
353
|
+
i == null || i.setGridOption("quickFilterText", ""), l("");
|
|
364
354
|
}
|
|
365
355
|
}
|
|
366
356
|
),
|
|
@@ -375,7 +365,7 @@ const He = () => {
|
|
|
375
365
|
i.colId
|
|
376
366
|
)),
|
|
377
367
|
/* @__PURE__ */ s(
|
|
378
|
-
|
|
368
|
+
L,
|
|
379
369
|
{
|
|
380
370
|
type: "button",
|
|
381
371
|
intent: "ghost",
|
|
@@ -395,9 +385,9 @@ const Qe = ({
|
|
|
395
385
|
options: e,
|
|
396
386
|
label: a
|
|
397
387
|
}) => {
|
|
398
|
-
const { t: n } = F(), { getApi: r } =
|
|
388
|
+
const { t: n } = F(), { getApi: r } = $("DataTable.Toolbar.FacetFilter"), [l, o] = R(null);
|
|
399
389
|
function u(d) {
|
|
400
|
-
|
|
390
|
+
o(d);
|
|
401
391
|
const c = r();
|
|
402
392
|
if (c) {
|
|
403
393
|
if (d === null) {
|
|
@@ -417,9 +407,9 @@ const Qe = ({
|
|
|
417
407
|
"aria-label": a ?? n("dataTable.facetFilter.label", "Filter"),
|
|
418
408
|
className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
419
409
|
children: e.map((d) => {
|
|
420
|
-
const c =
|
|
410
|
+
const c = l === d.value;
|
|
421
411
|
return /* @__PURE__ */ s(
|
|
422
|
-
|
|
412
|
+
L,
|
|
423
413
|
{
|
|
424
414
|
type: "button",
|
|
425
415
|
size: "sm",
|
|
@@ -435,17 +425,17 @@ const Qe = ({
|
|
|
435
425
|
);
|
|
436
426
|
};
|
|
437
427
|
Qe.displayName = "DataTable.Toolbar.FacetFilter";
|
|
438
|
-
const
|
|
439
|
-
async function
|
|
428
|
+
const Ut = ["csv", "xlsx", "pdf"];
|
|
429
|
+
async function Kt(t, e) {
|
|
440
430
|
if (!t) return;
|
|
441
|
-
const a = await import("./exceljs.min-DUJ-5CGx.js").then((v) => v.e), n = new a.Workbook(), r = n.addWorksheet("Sheet1"),
|
|
431
|
+
const a = await import("./exceljs.min-DUJ-5CGx.js").then((v) => v.e), n = new a.Workbook(), r = n.addWorksheet("Sheet1"), o = (t.getColumns() ?? []).filter((v) => v.isVisible());
|
|
442
432
|
r.addRow(
|
|
443
|
-
|
|
433
|
+
o.map(
|
|
444
434
|
(v) => t.getDisplayNameForColumn(v, null) ?? v.getColId()
|
|
445
435
|
)
|
|
446
436
|
), t.forEachNodeAfterFilterAndSort((v) => {
|
|
447
437
|
v.data && r.addRow(
|
|
448
|
-
|
|
438
|
+
o.map((y) => {
|
|
449
439
|
const f = t.getCellValue({
|
|
450
440
|
rowNode: v,
|
|
451
441
|
colKey: y,
|
|
@@ -469,7 +459,7 @@ async function Ht(t, e) {
|
|
|
469
459
|
b.href = g, b.download = e.fileName, document.body.appendChild(b), b.click(), document.body.removeChild(b), URL.revokeObjectURL(g);
|
|
470
460
|
}
|
|
471
461
|
const Xe = Ne(null);
|
|
472
|
-
function
|
|
462
|
+
function Wt() {
|
|
473
463
|
const t = Se(Xe);
|
|
474
464
|
if (!t)
|
|
475
465
|
throw new Error(
|
|
@@ -478,7 +468,7 @@ function Qt() {
|
|
|
478
468
|
return t;
|
|
479
469
|
}
|
|
480
470
|
const Je = ({ children: t, label: e }) => {
|
|
481
|
-
const { t: a } = F(), { getApi: n } =
|
|
471
|
+
const { t: a } = F(), { getApi: n } = $("DataTable.Toolbar.ExportMenu"), r = z(() => ({ getApi: n }), [n]), l = t ?? Ut.map((o) => /* @__PURE__ */ s(me, { format: o }, o));
|
|
482
472
|
return /* @__PURE__ */ s(Xe.Provider, { value: r, children: /* @__PURE__ */ E(Y.Root, { children: [
|
|
483
473
|
/* @__PURE__ */ s(Y.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
484
474
|
V,
|
|
@@ -491,14 +481,14 @@ const Je = ({ children: t, label: e }) => {
|
|
|
491
481
|
"aria-haspopup": "menu"
|
|
492
482
|
}
|
|
493
483
|
) }),
|
|
494
|
-
/* @__PURE__ */ s(Y.Content, { align: "end", sideOffset: 4, children:
|
|
484
|
+
/* @__PURE__ */ s(Y.Content, { align: "end", sideOffset: 4, children: l })
|
|
495
485
|
] }) });
|
|
496
486
|
};
|
|
497
487
|
Je.displayName = "DataTable.Toolbar.ExportMenu";
|
|
498
|
-
function
|
|
488
|
+
function Ht(t, e) {
|
|
499
489
|
return e === "csv" ? t("dataTable.export.csv", "Export CSV") : e === "xlsx" ? t("dataTable.export.xlsx", "Export Excel") : e === "pdf" ? t("dataTable.export.pdf", "Export PDF") : t("dataTable.export.custom", "Export");
|
|
500
490
|
}
|
|
501
|
-
function
|
|
491
|
+
function Qt(t) {
|
|
502
492
|
return t === "csv" ? /* @__PURE__ */ s(ne, { "aria-hidden": !0, className: "ds:size-4" }) : t === "xlsx" ? /* @__PURE__ */ s(Et, { "aria-hidden": !0, className: "ds:size-4" }) : t === "pdf" ? /* @__PURE__ */ s(ke, { "aria-hidden": !0, className: "ds:size-4" }) : /* @__PURE__ */ s(ne, { "aria-hidden": !0, className: "ds:size-4" });
|
|
503
493
|
}
|
|
504
494
|
const me = ({
|
|
@@ -507,8 +497,8 @@ const me = ({
|
|
|
507
497
|
onClick: a,
|
|
508
498
|
fileName: n
|
|
509
499
|
}) => {
|
|
510
|
-
const { t: r } = F(), { getApi:
|
|
511
|
-
const u =
|
|
500
|
+
const { t: r } = F(), { getApi: l } = Wt(), o = M(() => {
|
|
501
|
+
const u = l();
|
|
512
502
|
if (t === "csv") {
|
|
513
503
|
u == null || u.exportDataAsCsv();
|
|
514
504
|
return;
|
|
@@ -520,20 +510,20 @@ const me = ({
|
|
|
520
510
|
return;
|
|
521
511
|
}
|
|
522
512
|
if (t === "xlsx") {
|
|
523
|
-
|
|
513
|
+
Kt(u, {
|
|
524
514
|
fileName: n ?? "data-table-export.xlsx"
|
|
525
515
|
});
|
|
526
516
|
return;
|
|
527
517
|
}
|
|
528
518
|
a == null || a(u);
|
|
529
|
-
}, [t, n, a,
|
|
530
|
-
return /* @__PURE__ */ s(Y.Item, { onSelect:
|
|
531
|
-
|
|
532
|
-
/* @__PURE__ */ s("span", { children: e ??
|
|
519
|
+
}, [t, n, a, l]);
|
|
520
|
+
return /* @__PURE__ */ s(Y.Item, { onSelect: o, children: /* @__PURE__ */ E("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
521
|
+
Qt(t),
|
|
522
|
+
/* @__PURE__ */ s("span", { children: e ?? Ht(r, t) })
|
|
533
523
|
] }) });
|
|
534
524
|
};
|
|
535
525
|
me.displayName = "DataTable.Toolbar.ExportMenu.Item";
|
|
536
|
-
function
|
|
526
|
+
function Xt(t) {
|
|
537
527
|
return t ? (t.getColumns() ?? []).map((a) => a.getColDef().hide === void 0 && a.getColId().startsWith("ag-Grid-") ? null : {
|
|
538
528
|
colId: a.getColId(),
|
|
539
529
|
displayName: t.getDisplayNameForColumn(a, null) || a.getColId(),
|
|
@@ -541,14 +531,14 @@ function Zt(t) {
|
|
|
541
531
|
}).filter((a) => a !== null) : [];
|
|
542
532
|
}
|
|
543
533
|
const Ze = ({ label: t }) => {
|
|
544
|
-
const { t: e } = F(), { getApi: a } =
|
|
534
|
+
const { t: e } = F(), { getApi: a } = $("DataTable.Toolbar.ColumnToggle"), [n, r] = R(!1), [l, o] = R([]), [u, d] = R(null), [c, i] = R(null);
|
|
545
535
|
P(() => {
|
|
546
|
-
n &&
|
|
536
|
+
n && o(Xt(a()));
|
|
547
537
|
}, [n, a]);
|
|
548
538
|
const p = M(
|
|
549
539
|
(b, v) => {
|
|
550
540
|
const y = a();
|
|
551
|
-
y && (y.setColumnsVisible([b], v),
|
|
541
|
+
y && (y.setColumnsVisible([b], v), o(
|
|
552
542
|
(f) => f.map(
|
|
553
543
|
(m) => m.colId === b ? { ...m, visible: v } : m
|
|
554
544
|
)
|
|
@@ -560,16 +550,16 @@ const Ze = ({ label: t }) => {
|
|
|
560
550
|
if (b === v) return;
|
|
561
551
|
const y = a();
|
|
562
552
|
if (!y) return;
|
|
563
|
-
|
|
553
|
+
o((m) => {
|
|
564
554
|
const h = m.findIndex((D) => D.colId === b), x = m.findIndex((D) => D.colId === v);
|
|
565
555
|
if (h < 0 || x < 0) return m;
|
|
566
556
|
const S = [...m], [I] = S.splice(h, 1);
|
|
567
557
|
return S.splice(x, 0, I), S;
|
|
568
558
|
});
|
|
569
|
-
const f =
|
|
559
|
+
const f = l.findIndex((m) => m.colId === v);
|
|
570
560
|
f >= 0 && y.moveColumns([b], f);
|
|
571
561
|
},
|
|
572
|
-
[a,
|
|
562
|
+
[a, l]
|
|
573
563
|
), g = t ?? e("dataTable.columnToggle");
|
|
574
564
|
return /* @__PURE__ */ E(Z.Root, { open: n, onOpenChange: r, children: [
|
|
575
565
|
/* @__PURE__ */ s(Z.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
@@ -577,7 +567,7 @@ const Ze = ({ label: t }) => {
|
|
|
577
567
|
{
|
|
578
568
|
type: "button",
|
|
579
569
|
intent: "outline",
|
|
580
|
-
icon: /* @__PURE__ */ s(
|
|
570
|
+
icon: /* @__PURE__ */ s(Rt, { "aria-hidden": !0 }),
|
|
581
571
|
"aria-label": g,
|
|
582
572
|
"aria-haspopup": "dialog"
|
|
583
573
|
}
|
|
@@ -589,7 +579,7 @@ const Ze = ({ label: t }) => {
|
|
|
589
579
|
{
|
|
590
580
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
591
581
|
"aria-label": g,
|
|
592
|
-
children:
|
|
582
|
+
children: l.map((b) => {
|
|
593
583
|
const v = u === b.colId, y = c === b.colId && u !== b.colId;
|
|
594
584
|
return /* @__PURE__ */ E(
|
|
595
585
|
"li",
|
|
@@ -645,22 +635,22 @@ const Ze = ({ label: t }) => {
|
|
|
645
635
|
] });
|
|
646
636
|
};
|
|
647
637
|
Ze.displayName = "DataTable.Toolbar.ColumnToggle";
|
|
648
|
-
const Ye =
|
|
649
|
-
({ label: t, icon: e, onClick: a, variant: n = "default", size: r = "sm", ...
|
|
650
|
-
const { t: u } = F(), { getApi: d, selectionCount: c } =
|
|
638
|
+
const Ye = q(
|
|
639
|
+
({ label: t, icon: e, onClick: a, variant: n = "default", size: r = "sm", ...l }, o) => {
|
|
640
|
+
const { t: u } = F(), { getApi: d, selectionCount: c } = $(
|
|
651
641
|
"DataTable.Toolbar.BulkAction"
|
|
652
642
|
);
|
|
653
643
|
return c === 0 ? null : /* @__PURE__ */ E(
|
|
654
|
-
|
|
644
|
+
L,
|
|
655
645
|
{
|
|
656
|
-
ref:
|
|
646
|
+
ref: o,
|
|
657
647
|
type: "button",
|
|
658
648
|
intent: n === "destructive" ? "destructive" : "secondary",
|
|
659
649
|
size: r,
|
|
660
|
-
startIcon:
|
|
650
|
+
startIcon: _t(e),
|
|
661
651
|
onClick: () => a(d()),
|
|
662
652
|
"aria-label": `${t} (${u("dataTable.bulkAction", { count: c })})`,
|
|
663
|
-
...
|
|
653
|
+
...l,
|
|
664
654
|
children: [
|
|
665
655
|
/* @__PURE__ */ s("span", { children: t }),
|
|
666
656
|
/* @__PURE__ */ s(
|
|
@@ -677,11 +667,11 @@ const Ye = _(
|
|
|
677
667
|
}
|
|
678
668
|
);
|
|
679
669
|
Ye.displayName = "DataTable.Toolbar.BulkAction";
|
|
680
|
-
const
|
|
670
|
+
const Jt = Object.assign(Je, {
|
|
681
671
|
Item: me
|
|
682
|
-
}), te = Object.assign(
|
|
683
|
-
FilterBar:
|
|
684
|
-
Actions:
|
|
672
|
+
}), te = Object.assign(qe, {
|
|
673
|
+
FilterBar: $e,
|
|
674
|
+
Actions: _e,
|
|
685
675
|
/** @deprecated Use `Toolbar.ExportMenu` with a `csv` item. */
|
|
686
676
|
ExportCsv: Ge,
|
|
687
677
|
/** @deprecated Use `Toolbar.ExportMenu` with a `pdf` item. */
|
|
@@ -693,15 +683,15 @@ const Yt = Object.assign(Je, {
|
|
|
693
683
|
Refresh: We,
|
|
694
684
|
FilterChips: He,
|
|
695
685
|
FacetFilter: Qe,
|
|
696
|
-
ExportMenu:
|
|
697
|
-
}),
|
|
686
|
+
ExportMenu: Jt
|
|
687
|
+
}), Zt = [
|
|
698
688
|
"contains",
|
|
699
689
|
"equals",
|
|
700
690
|
"startsWith",
|
|
701
691
|
"endsWith",
|
|
702
692
|
"notContains"
|
|
703
693
|
];
|
|
704
|
-
function
|
|
694
|
+
function Yt(t) {
|
|
705
695
|
const e = new Intl.Collator(t, {
|
|
706
696
|
sensitivity: "base",
|
|
707
697
|
usage: "search"
|
|
@@ -709,9 +699,9 @@ function ta(t) {
|
|
|
709
699
|
function a(n, r) {
|
|
710
700
|
if (r.length === 0) return 0;
|
|
711
701
|
if (r.length > n.length) return -1;
|
|
712
|
-
for (let
|
|
713
|
-
if (e.compare(n.slice(
|
|
714
|
-
return
|
|
702
|
+
for (let l = 0; l <= n.length - r.length; l += 1)
|
|
703
|
+
if (e.compare(n.slice(l, l + r.length), r) === 0)
|
|
704
|
+
return l;
|
|
715
705
|
return -1;
|
|
716
706
|
}
|
|
717
707
|
return {
|
|
@@ -724,20 +714,20 @@ function ta(t) {
|
|
|
724
714
|
) === 0
|
|
725
715
|
};
|
|
726
716
|
}
|
|
727
|
-
function
|
|
717
|
+
function ea(t) {
|
|
728
718
|
return t == null ? null : typeof t == "string" ? t : String(t);
|
|
729
719
|
}
|
|
730
|
-
function
|
|
731
|
-
const { model: e, onModelChange: a, getValue: n, placeholder: r, defaultOperator:
|
|
720
|
+
function ta(t) {
|
|
721
|
+
const { model: e, onModelChange: a, getValue: n, placeholder: r, defaultOperator: l } = t, { t: o } = F("ui"), u = (e == null ? void 0 : e.type) ?? l ?? "contains", [d, c] = R(u), [i, p] = R((e == null ? void 0 : e.filter) ?? "");
|
|
732
722
|
P(() => {
|
|
733
|
-
c((e == null ? void 0 : e.type) ??
|
|
734
|
-
}, [e,
|
|
735
|
-
const C = z(() =>
|
|
723
|
+
c((e == null ? void 0 : e.type) ?? l ?? "contains"), p((e == null ? void 0 : e.filter) ?? "");
|
|
724
|
+
}, [e, l]);
|
|
725
|
+
const C = z(() => Yt(It.language), []);
|
|
736
726
|
J({
|
|
737
727
|
doesFilterPass: (f) => {
|
|
738
728
|
const m = e;
|
|
739
729
|
if (!m || m.filter === "") return !0;
|
|
740
|
-
const h =
|
|
730
|
+
const h = ea(n(f.node));
|
|
741
731
|
if (h === null) return !1;
|
|
742
732
|
switch (m.type) {
|
|
743
733
|
case "equals":
|
|
@@ -763,14 +753,14 @@ function na(t) {
|
|
|
763
753
|
a({ type: d, filter: i });
|
|
764
754
|
}
|
|
765
755
|
function b() {
|
|
766
|
-
p(""), c(
|
|
756
|
+
p(""), c(l ?? "contains"), a(null);
|
|
767
757
|
}
|
|
768
|
-
const v =
|
|
758
|
+
const v = Zt.map(
|
|
769
759
|
(f) => ({
|
|
770
760
|
value: f,
|
|
771
|
-
label:
|
|
761
|
+
label: o(`dataTable.textFilter.operators.${f}`)
|
|
772
762
|
})
|
|
773
|
-
), y = r ??
|
|
763
|
+
), y = r ?? o("dataTable.textFilter.placeholder");
|
|
774
764
|
return /* @__PURE__ */ E(
|
|
775
765
|
"div",
|
|
776
766
|
{
|
|
@@ -786,7 +776,7 @@ function na(t) {
|
|
|
786
776
|
onValueChange: (f) => {
|
|
787
777
|
f !== "" && c(f);
|
|
788
778
|
},
|
|
789
|
-
"aria-label":
|
|
779
|
+
"aria-label": o("dataTable.textFilter.operators.contains")
|
|
790
780
|
}
|
|
791
781
|
),
|
|
792
782
|
/* @__PURE__ */ s(
|
|
@@ -804,16 +794,16 @@ function na(t) {
|
|
|
804
794
|
}
|
|
805
795
|
),
|
|
806
796
|
/* @__PURE__ */ E("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: [
|
|
807
|
-
/* @__PURE__ */ s(
|
|
808
|
-
/* @__PURE__ */ s(
|
|
797
|
+
/* @__PURE__ */ s(L, { intent: "ghost", size: "sm", onClick: b, type: "button", children: o("dataTable.textFilter.clear") }),
|
|
798
|
+
/* @__PURE__ */ s(L, { intent: "primary", size: "sm", onClick: g, type: "button", children: o("dataTable.textFilter.apply") })
|
|
809
799
|
] })
|
|
810
800
|
]
|
|
811
801
|
}
|
|
812
802
|
);
|
|
813
803
|
}
|
|
814
|
-
function
|
|
804
|
+
function aa(t) {
|
|
815
805
|
var p, C;
|
|
816
|
-
const { model: e, onModelChange: a, column: n } = t, { t: r } = F("ui"),
|
|
806
|
+
const { model: e, onModelChange: a, column: n } = t, { t: r } = F("ui"), l = ((C = (p = n == null ? void 0 : n.getColDef) == null ? void 0 : p.call(n)) == null ? void 0 : C.filterParams) ?? {}, o = l.defaultOperator ?? "contains", u = l.placeholder ?? r("dataTable.textFilter.placeholder"), [d, c] = R((e == null ? void 0 : e.filter) ?? "");
|
|
817
807
|
P(() => {
|
|
818
808
|
c((e == null ? void 0 : e.filter) ?? "");
|
|
819
809
|
}, [e == null ? void 0 : e.filter]), P(() => {
|
|
@@ -823,10 +813,10 @@ function ra(t) {
|
|
|
823
813
|
e && a(null);
|
|
824
814
|
return;
|
|
825
815
|
}
|
|
826
|
-
a({ type:
|
|
816
|
+
a({ type: o, filter: d });
|
|
827
817
|
}, 200);
|
|
828
818
|
return () => clearTimeout(g);
|
|
829
|
-
}, [d,
|
|
819
|
+
}, [d, o, e, a]);
|
|
830
820
|
function i() {
|
|
831
821
|
c(""), e && a(null);
|
|
832
822
|
}
|
|
@@ -852,7 +842,7 @@ function ra(t) {
|
|
|
852
842
|
}
|
|
853
843
|
) });
|
|
854
844
|
}
|
|
855
|
-
const
|
|
845
|
+
const na = {
|
|
856
846
|
id: "data-table",
|
|
857
847
|
capabilities: [
|
|
858
848
|
"select_single",
|
|
@@ -961,7 +951,7 @@ const sa = {
|
|
|
961
951
|
}
|
|
962
952
|
};
|
|
963
953
|
St.registerModules([wt]);
|
|
964
|
-
const
|
|
954
|
+
const ra = xt("ag-theme-alfadocs ds:w-full", {
|
|
965
955
|
variants: {
|
|
966
956
|
density: {
|
|
967
957
|
default: "",
|
|
@@ -978,7 +968,7 @@ const oa = xt("ag-theme-alfadocs ds:w-full", {
|
|
|
978
968
|
bordered: !0
|
|
979
969
|
}
|
|
980
970
|
});
|
|
981
|
-
function
|
|
971
|
+
function sa() {
|
|
982
972
|
const { t } = F();
|
|
983
973
|
return z(
|
|
984
974
|
() => ({
|
|
@@ -1012,7 +1002,7 @@ function la() {
|
|
|
1012
1002
|
[t]
|
|
1013
1003
|
);
|
|
1014
1004
|
}
|
|
1015
|
-
function
|
|
1005
|
+
function la() {
|
|
1016
1006
|
return /* @__PURE__ */ s(
|
|
1017
1007
|
"div",
|
|
1018
1008
|
{
|
|
@@ -1030,7 +1020,7 @@ function ia() {
|
|
|
1030
1020
|
}
|
|
1031
1021
|
);
|
|
1032
1022
|
}
|
|
1033
|
-
function
|
|
1023
|
+
function oa() {
|
|
1034
1024
|
const { t } = F();
|
|
1035
1025
|
return /* @__PURE__ */ s(
|
|
1036
1026
|
Ct,
|
|
@@ -1042,7 +1032,7 @@ function ca() {
|
|
|
1042
1032
|
}
|
|
1043
1033
|
);
|
|
1044
1034
|
}
|
|
1045
|
-
function
|
|
1035
|
+
function ia(t) {
|
|
1046
1036
|
try {
|
|
1047
1037
|
const e = localStorage.getItem(`data-table-col-state:${t}`);
|
|
1048
1038
|
return e ? JSON.parse(e) : null;
|
|
@@ -1050,7 +1040,7 @@ function da(t) {
|
|
|
1050
1040
|
return null;
|
|
1051
1041
|
}
|
|
1052
1042
|
}
|
|
1053
|
-
function
|
|
1043
|
+
function ca(t, e) {
|
|
1054
1044
|
try {
|
|
1055
1045
|
localStorage.setItem(
|
|
1056
1046
|
`data-table-col-state:${t}`,
|
|
@@ -1059,13 +1049,13 @@ function ua(t, e) {
|
|
|
1059
1049
|
} catch {
|
|
1060
1050
|
}
|
|
1061
1051
|
}
|
|
1062
|
-
function
|
|
1052
|
+
function da(t, e) {
|
|
1063
1053
|
const {
|
|
1064
1054
|
columnDefs: a,
|
|
1065
1055
|
rowData: n,
|
|
1066
1056
|
rowSelection: r,
|
|
1067
|
-
pagination:
|
|
1068
|
-
paginationPageSize:
|
|
1057
|
+
pagination: l = !1,
|
|
1058
|
+
paginationPageSize: o = 25,
|
|
1069
1059
|
paginationPageSizeSelector: u = [10, 25, 50, 100],
|
|
1070
1060
|
gridId: d,
|
|
1071
1061
|
onSelectionChanged: c,
|
|
@@ -1082,7 +1072,7 @@ function fa(t, e) {
|
|
|
1082
1072
|
pinnedBottomRowData: x,
|
|
1083
1073
|
printMode: S = !1,
|
|
1084
1074
|
children: I
|
|
1085
|
-
} = t, { t: D, i18n:
|
|
1075
|
+
} = t, { t: D, i18n: _ } = F(), k = X(null), [G, tt] = R(0), [se, le] = R(""), at = sa(), oe = z(
|
|
1086
1076
|
() => ({
|
|
1087
1077
|
getSelection: () => {
|
|
1088
1078
|
var w;
|
|
@@ -1110,9 +1100,9 @@ function fa(t, e) {
|
|
|
1110
1100
|
w.forEachNodeAfterFilterAndSort((U) => {
|
|
1111
1101
|
U.id != null && O.push(U.id);
|
|
1112
1102
|
});
|
|
1113
|
-
const A = O.indexOf(T),
|
|
1114
|
-
if (A < 0 ||
|
|
1115
|
-
const [B, ce] = A <=
|
|
1103
|
+
const A = O.indexOf(T), j = O.indexOf(N);
|
|
1104
|
+
if (A < 0 || j < 0) return;
|
|
1105
|
+
const [B, ce] = A <= j ? [A, j] : [j, A], de = new Set(O.slice(B, ce + 1));
|
|
1116
1106
|
w.forEachNode((U) => {
|
|
1117
1107
|
U.id != null && U.setSelected(de.has(U.id));
|
|
1118
1108
|
});
|
|
@@ -1139,8 +1129,8 @@ function fa(t, e) {
|
|
|
1139
1129
|
const N = (O = k.current) == null ? void 0 : O.api;
|
|
1140
1130
|
if (!N) return;
|
|
1141
1131
|
const w = N.getColumnState().map((A) => {
|
|
1142
|
-
const
|
|
1143
|
-
return { ...A, sort:
|
|
1132
|
+
const j = T.find((B) => B.colId === A.colId);
|
|
1133
|
+
return { ...A, sort: j ? j.sort : null };
|
|
1144
1134
|
});
|
|
1145
1135
|
N.applyColumnState({ state: w, defaultState: { sort: null } });
|
|
1146
1136
|
},
|
|
@@ -1159,8 +1149,8 @@ function fa(t, e) {
|
|
|
1159
1149
|
}),
|
|
1160
1150
|
[]
|
|
1161
1151
|
);
|
|
1162
|
-
yt(e, () =>
|
|
1163
|
-
const nt =
|
|
1152
|
+
yt(e, () => oe, [oe]), Pt(na, oe, d);
|
|
1153
|
+
const nt = _.dir() === "rtl", rt = n === void 0, st = zt(), { resolvedTheme: ge } = At(), lt = (ge === "light-accessible" || ge === "dark-accessible") && v === "compact" ? "default" : v, ot = z(() => {
|
|
1164
1154
|
if (r)
|
|
1165
1155
|
return r === "single" ? { mode: "singleRow" } : {
|
|
1166
1156
|
mode: "multiRow",
|
|
@@ -1170,14 +1160,14 @@ function fa(t, e) {
|
|
|
1170
1160
|
}, [r]), it = M(() => {
|
|
1171
1161
|
var N;
|
|
1172
1162
|
if (!d || !((N = k.current) != null && N.api)) return;
|
|
1173
|
-
const T =
|
|
1163
|
+
const T = ia(d);
|
|
1174
1164
|
T && k.current.api.applyColumnState({
|
|
1175
1165
|
state: T,
|
|
1176
1166
|
applyOrder: !0
|
|
1177
1167
|
});
|
|
1178
1168
|
}, [d]), ie = M(() => {
|
|
1179
1169
|
var T;
|
|
1180
|
-
d && ((T = k.current) != null && T.api) &&
|
|
1170
|
+
d && ((T = k.current) != null && T.api) && ca(d, k.current.api);
|
|
1181
1171
|
}, [d]), ct = M(() => {
|
|
1182
1172
|
var w;
|
|
1183
1173
|
const T = (w = k.current) == null ? void 0 : w.api;
|
|
@@ -1189,17 +1179,17 @@ function fa(t, e) {
|
|
|
1189
1179
|
var w;
|
|
1190
1180
|
const N = (w = k.current) == null ? void 0 : w.api;
|
|
1191
1181
|
if (N) {
|
|
1192
|
-
const A = N.getColumnState().find((
|
|
1182
|
+
const A = N.getColumnState().find((j) => j.sort);
|
|
1193
1183
|
if (A) {
|
|
1194
|
-
const
|
|
1195
|
-
|
|
1184
|
+
const j = A.colId, B = N.getColumnDef(j), ce = (B == null ? void 0 : B.headerName) ?? j, de = A.sort === "asc" ? "dataTable.sortAscending" : "dataTable.sortDescending";
|
|
1185
|
+
le(
|
|
1196
1186
|
D("dataTable.sortAnnounce", {
|
|
1197
1187
|
column: ce,
|
|
1198
1188
|
direction: D(de)
|
|
1199
1189
|
})
|
|
1200
1190
|
);
|
|
1201
1191
|
} else
|
|
1202
|
-
|
|
1192
|
+
le("");
|
|
1203
1193
|
}
|
|
1204
1194
|
i == null || i(T);
|
|
1205
1195
|
},
|
|
@@ -1212,10 +1202,10 @@ function fa(t, e) {
|
|
|
1212
1202
|
);
|
|
1213
1203
|
P(() => {
|
|
1214
1204
|
if (!se) return;
|
|
1215
|
-
const T = setTimeout(() =>
|
|
1205
|
+
const T = setTimeout(() => le(""), 3e3);
|
|
1216
1206
|
return () => clearTimeout(T);
|
|
1217
1207
|
}, [se]);
|
|
1218
|
-
const ft = C ??
|
|
1208
|
+
const ft = C ?? oa, pt = g ?? la, mt = M(
|
|
1219
1209
|
() => {
|
|
1220
1210
|
var T;
|
|
1221
1211
|
return (T = k.current) == null ? void 0 : T.api;
|
|
@@ -1223,11 +1213,11 @@ function fa(t, e) {
|
|
|
1223
1213
|
[]
|
|
1224
1214
|
), gt = M(() => {
|
|
1225
1215
|
typeof window < "u" && window.print();
|
|
1226
|
-
}, []), bt =
|
|
1227
|
-
density:
|
|
1216
|
+
}, []), bt = ra({
|
|
1217
|
+
density: lt,
|
|
1228
1218
|
bordered: y,
|
|
1229
1219
|
className: m
|
|
1230
|
-
}), ht = I ?? /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(te.Actions, { children: /* @__PURE__ */ s(te.ExportMenu, {}) }) }), vt = S ? !1 :
|
|
1220
|
+
}), ht = I ?? /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(te.Actions, { children: /* @__PURE__ */ s(te.ExportMenu, {}) }) }), vt = S ? !1 : l;
|
|
1231
1221
|
return /* @__PURE__ */ E(
|
|
1232
1222
|
"div",
|
|
1233
1223
|
{
|
|
@@ -1238,7 +1228,7 @@ function fa(t, e) {
|
|
|
1238
1228
|
"data-print-mode": S ? "true" : void 0,
|
|
1239
1229
|
children: [
|
|
1240
1230
|
!S && /* @__PURE__ */ s(
|
|
1241
|
-
|
|
1231
|
+
Gt,
|
|
1242
1232
|
{
|
|
1243
1233
|
getApi: mt,
|
|
1244
1234
|
selectionCount: G,
|
|
@@ -1264,8 +1254,8 @@ function fa(t, e) {
|
|
|
1264
1254
|
// language instead of AG Grid's stock browser-skinned input.
|
|
1265
1255
|
// Number / date / select columns opt into their dedicated
|
|
1266
1256
|
// wrapper per-column.
|
|
1267
|
-
filter:
|
|
1268
|
-
floatingFilterComponent:
|
|
1257
|
+
filter: ta,
|
|
1258
|
+
floatingFilterComponent: aa,
|
|
1269
1259
|
resizable: !0,
|
|
1270
1260
|
floatingFilter: !0,
|
|
1271
1261
|
// §13d — faint sort icon advertises which columns are
|
|
@@ -1273,11 +1263,11 @@ function fa(t, e) {
|
|
|
1273
1263
|
unSortIcon: !0,
|
|
1274
1264
|
...b == null ? void 0 : b.defaultColDef
|
|
1275
1265
|
},
|
|
1276
|
-
rowSelection:
|
|
1266
|
+
rowSelection: ot,
|
|
1277
1267
|
pagination: vt,
|
|
1278
|
-
paginationPageSize:
|
|
1268
|
+
paginationPageSize: o,
|
|
1279
1269
|
paginationPageSizeSelector: u,
|
|
1280
|
-
paginationNumberFormatter: (T) => new Intl.NumberFormat(
|
|
1270
|
+
paginationNumberFormatter: (T) => new Intl.NumberFormat(_.language).format(T.value),
|
|
1281
1271
|
animateRows: !st,
|
|
1282
1272
|
enableRtl: nt,
|
|
1283
1273
|
ensureDomOrder: !0,
|
|
@@ -1321,21 +1311,21 @@ function fa(t, e) {
|
|
|
1321
1311
|
}
|
|
1322
1312
|
);
|
|
1323
1313
|
}
|
|
1324
|
-
const et =
|
|
1314
|
+
const et = q(da);
|
|
1325
1315
|
et.displayName = "DataTable";
|
|
1326
|
-
const
|
|
1316
|
+
const vn = Object.assign(et, {
|
|
1327
1317
|
Toolbar: te
|
|
1328
1318
|
});
|
|
1329
|
-
function
|
|
1319
|
+
function yn(t, e, a) {
|
|
1330
1320
|
return z(() => {
|
|
1331
1321
|
const n = {};
|
|
1332
1322
|
for (const r of e) {
|
|
1333
|
-
let
|
|
1334
|
-
for (const
|
|
1335
|
-
const u =
|
|
1336
|
-
Number.isFinite(d) && (
|
|
1323
|
+
let l = 0;
|
|
1324
|
+
for (const o of t ?? []) {
|
|
1325
|
+
const u = o[r], d = typeof u == "number" ? u : Number(u);
|
|
1326
|
+
Number.isFinite(d) && (l += d);
|
|
1337
1327
|
}
|
|
1338
|
-
n[r] =
|
|
1328
|
+
n[r] = l;
|
|
1339
1329
|
}
|
|
1340
1330
|
return a != null && a.labelField && a.labelValue !== void 0 && (n[a.labelField] = a.labelValue), n;
|
|
1341
1331
|
}, [t, e, a == null ? void 0 : a.labelField, a == null ? void 0 : a.labelValue]);
|
|
@@ -1348,17 +1338,17 @@ function Q(t) {
|
|
|
1348
1338
|
const e = new Date(t);
|
|
1349
1339
|
return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
1350
1340
|
}
|
|
1351
|
-
function
|
|
1352
|
-
const { model: e, onModelChange: a, getValue: n, doesRowPassOtherFilter: r } = t,
|
|
1341
|
+
function Tn(t) {
|
|
1342
|
+
const { model: e, onModelChange: a, getValue: n, doesRowPassOtherFilter: r } = t, l = {
|
|
1353
1343
|
from: Q(e == null ? void 0 : e.dateFrom),
|
|
1354
1344
|
to: Q(e == null ? void 0 : e.dateTo)
|
|
1355
|
-
}, [
|
|
1345
|
+
}, [o, u] = R(l);
|
|
1356
1346
|
J({
|
|
1357
1347
|
doesFilterPass: (c) => {
|
|
1358
1348
|
const i = n(c.node);
|
|
1359
1349
|
if (!i) return !1;
|
|
1360
1350
|
const p = i instanceof Date ? i : Q(String(i));
|
|
1361
|
-
return !(!p ||
|
|
1351
|
+
return !(!p || o.from && p < o.from || o.to && p > o.to);
|
|
1362
1352
|
}
|
|
1363
1353
|
});
|
|
1364
1354
|
function d(c) {
|
|
@@ -1372,16 +1362,16 @@ function xn(t) {
|
|
|
1372
1362
|
dateTo: re(c.to)
|
|
1373
1363
|
});
|
|
1374
1364
|
}
|
|
1375
|
-
return /* @__PURE__ */ s("div", { className: "ds:p-[var(--spacing-sm)] ds:min-w-[280px]", children: /* @__PURE__ */ s(Ie, { value:
|
|
1365
|
+
return /* @__PURE__ */ s("div", { className: "ds:p-[var(--spacing-sm)] ds:min-w-[280px]", children: /* @__PURE__ */ s(Ie, { value: o, onChange: d, size: "sm" }) });
|
|
1376
1366
|
}
|
|
1377
|
-
function
|
|
1367
|
+
function Cn(t) {
|
|
1378
1368
|
var d, c;
|
|
1379
|
-
const { model: e, onModelChange: a, column: n } = t, r = ((c = (d = n == null ? void 0 : n.getColDef) == null ? void 0 : d.call(n)) == null ? void 0 : c.filterParams) ?? {}, [
|
|
1369
|
+
const { model: e, onModelChange: a, column: n } = t, r = ((c = (d = n == null ? void 0 : n.getColDef) == null ? void 0 : d.call(n)) == null ? void 0 : c.filterParams) ?? {}, [l, o] = R({
|
|
1380
1370
|
from: Q(e == null ? void 0 : e.dateFrom),
|
|
1381
1371
|
to: Q(e == null ? void 0 : e.dateTo)
|
|
1382
1372
|
});
|
|
1383
1373
|
function u(i) {
|
|
1384
|
-
if (
|
|
1374
|
+
if (o(i), !i.from && !i.to) {
|
|
1385
1375
|
a(null);
|
|
1386
1376
|
return;
|
|
1387
1377
|
}
|
|
@@ -1394,7 +1384,7 @@ function Nn(t) {
|
|
|
1394
1384
|
return /* @__PURE__ */ s("div", { "data-component": "date-range-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
1395
1385
|
Ie,
|
|
1396
1386
|
{
|
|
1397
|
-
value:
|
|
1387
|
+
value: l,
|
|
1398
1388
|
onChange: u,
|
|
1399
1389
|
size: "sm",
|
|
1400
1390
|
placeholder: r.placeholder
|
|
@@ -1404,10 +1394,10 @@ function Nn(t) {
|
|
|
1404
1394
|
function K(t) {
|
|
1405
1395
|
return typeof t == "number" ? `n:${t}` : `s:${t}`;
|
|
1406
1396
|
}
|
|
1407
|
-
function
|
|
1408
|
-
const { model: e, onModelChange: a, getValue: n, api: r, column:
|
|
1409
|
-
if (
|
|
1410
|
-
if (!r || !
|
|
1397
|
+
function xn(t) {
|
|
1398
|
+
const { model: e, onModelChange: a, getValue: n, api: r, column: l, options: o, placeholder: u } = t, { t: d } = F("ui"), c = z(() => {
|
|
1399
|
+
if (o && o.length > 0) return o;
|
|
1400
|
+
if (!r || !l) return [];
|
|
1411
1401
|
const f = /* @__PURE__ */ new Map();
|
|
1412
1402
|
return r.forEachNode((m) => {
|
|
1413
1403
|
const h = n(m);
|
|
@@ -1417,7 +1407,7 @@ function Sn(t) {
|
|
|
1417
1407
|
}), Array.from(f.values()).sort(
|
|
1418
1408
|
(m, h) => String(m.label).localeCompare(String(h.label))
|
|
1419
1409
|
);
|
|
1420
|
-
}, [
|
|
1410
|
+
}, [o, r, l, n]), i = z(() => {
|
|
1421
1411
|
const f = /* @__PURE__ */ new Set(), m = (e == null ? void 0 : e.values) ?? [];
|
|
1422
1412
|
for (const h of m) f.add(K(h));
|
|
1423
1413
|
return f;
|
|
@@ -1482,25 +1472,25 @@ function Sn(t) {
|
|
|
1482
1472
|
}
|
|
1483
1473
|
),
|
|
1484
1474
|
/* @__PURE__ */ E("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: [
|
|
1485
|
-
/* @__PURE__ */ s(
|
|
1486
|
-
/* @__PURE__ */ s(
|
|
1475
|
+
/* @__PURE__ */ s(L, { intent: "ghost", size: "sm", onClick: v, type: "button", children: d("dataTable.selectFilter.clear") }),
|
|
1476
|
+
/* @__PURE__ */ s(L, { intent: "primary", size: "sm", onClick: b, type: "button", children: d("dataTable.selectFilter.apply") })
|
|
1487
1477
|
] })
|
|
1488
1478
|
]
|
|
1489
1479
|
}
|
|
1490
1480
|
);
|
|
1491
1481
|
}
|
|
1492
|
-
function
|
|
1482
|
+
function Nn(t) {
|
|
1493
1483
|
var C;
|
|
1494
|
-
const { model: e, onModelChange: a, column: n } = t, r = (C = n == null ? void 0 : n.getColDef) == null ? void 0 : C.call(n),
|
|
1484
|
+
const { model: e, onModelChange: a, column: n } = t, r = (C = n == null ? void 0 : n.getColDef) == null ? void 0 : C.call(n), l = (r == null ? void 0 : r.filterParams) ?? {}, o = l.options ?? [], u = l.placeholder ?? (typeof (r == null ? void 0 : r.headerName) == "string" ? r.headerName : void 0), d = z(() => {
|
|
1495
1485
|
const g = /* @__PURE__ */ new Map();
|
|
1496
|
-
for (const b of
|
|
1486
|
+
for (const b of o) g.set(String(b.value), b.value);
|
|
1497
1487
|
return g;
|
|
1498
|
-
}, [
|
|
1499
|
-
() =>
|
|
1488
|
+
}, [o]), c = z(
|
|
1489
|
+
() => o.map((g) => ({
|
|
1500
1490
|
value: String(g.value),
|
|
1501
1491
|
label: g.label
|
|
1502
1492
|
})),
|
|
1503
|
-
[
|
|
1493
|
+
[o]
|
|
1504
1494
|
), i = z(
|
|
1505
1495
|
() => ((e == null ? void 0 : e.values) ?? []).map((g) => String(g)),
|
|
1506
1496
|
[e]
|
|
@@ -1524,7 +1514,7 @@ function wn(t) {
|
|
|
1524
1514
|
options: c,
|
|
1525
1515
|
value: i,
|
|
1526
1516
|
onChange: p,
|
|
1527
|
-
placeholder:
|
|
1517
|
+
placeholder: l.placeholder,
|
|
1528
1518
|
"aria-label": u,
|
|
1529
1519
|
allowClear: !0
|
|
1530
1520
|
}
|
|
@@ -1533,19 +1523,19 @@ function wn(t) {
|
|
|
1533
1523
|
function H(t) {
|
|
1534
1524
|
return t.trim().toLocaleLowerCase();
|
|
1535
1525
|
}
|
|
1536
|
-
function
|
|
1526
|
+
function Sn(t) {
|
|
1537
1527
|
const {
|
|
1538
1528
|
model: e,
|
|
1539
1529
|
onModelChange: a,
|
|
1540
1530
|
getValue: n,
|
|
1541
1531
|
api: r,
|
|
1542
|
-
column:
|
|
1543
|
-
options:
|
|
1532
|
+
column: l,
|
|
1533
|
+
options: o,
|
|
1544
1534
|
loadOptions: u,
|
|
1545
1535
|
placeholder: d
|
|
1546
1536
|
} = t, { t: c } = F("ui"), i = z(() => {
|
|
1547
|
-
if (
|
|
1548
|
-
if (!r || !
|
|
1537
|
+
if (o && o.length > 0) return o;
|
|
1538
|
+
if (!r || !l) return [];
|
|
1549
1539
|
const m = /* @__PURE__ */ new Map();
|
|
1550
1540
|
return r.forEachNode((h) => {
|
|
1551
1541
|
const x = n(h);
|
|
@@ -1555,7 +1545,7 @@ function Fn(t) {
|
|
|
1555
1545
|
}), Array.from(m.values()).sort(
|
|
1556
1546
|
(h, x) => h.label.localeCompare(x.label)
|
|
1557
1547
|
);
|
|
1558
|
-
}, [
|
|
1548
|
+
}, [o, r, l, n]), p = z(() => async (m, h) => {
|
|
1559
1549
|
if (u)
|
|
1560
1550
|
return (await u(m, h)).map((D) => ({ value: D.value, label: D.label }));
|
|
1561
1551
|
const x = H(m);
|
|
@@ -1601,19 +1591,19 @@ function Fn(t) {
|
|
|
1601
1591
|
"aria-label": f
|
|
1602
1592
|
}
|
|
1603
1593
|
),
|
|
1604
|
-
/* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:justify-end ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: /* @__PURE__ */ s(
|
|
1594
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:justify-end ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: /* @__PURE__ */ s(L, { intent: "ghost", size: "sm", onClick: y, type: "button", children: c("dataTable.typeaheadFilter.clear") }) })
|
|
1605
1595
|
]
|
|
1606
1596
|
}
|
|
1607
1597
|
);
|
|
1608
1598
|
}
|
|
1609
|
-
function
|
|
1599
|
+
function wn(t) {
|
|
1610
1600
|
var b, v;
|
|
1611
|
-
const { model: e, onModelChange: a, column: n } = t, { t: r } = F("ui"),
|
|
1601
|
+
const { model: e, onModelChange: a, column: n } = t, { t: r } = F("ui"), l = ((v = (b = n == null ? void 0 : n.getColDef) == null ? void 0 : b.call(n)) == null ? void 0 : v.filterParams) ?? {}, o = l.options ?? [], u = l.loadOptions, d = l.placeholder ?? r("dataTable.typeaheadFilter.placeholder"), c = z(() => async (y, f) => {
|
|
1612
1602
|
if (u)
|
|
1613
1603
|
return (await u(y, f)).map((S) => ({ value: S.value, label: S.label }));
|
|
1614
1604
|
const m = H(y);
|
|
1615
|
-
return (m ?
|
|
1616
|
-
}, [u,
|
|
1605
|
+
return (m ? o.filter((x) => H(x.label).includes(m)) : o).slice(0, 50).map((x) => ({ value: x.value, label: x.label }));
|
|
1606
|
+
}, [u, o]), [i, p] = R((e == null ? void 0 : e.value) ?? "");
|
|
1617
1607
|
P(() => {
|
|
1618
1608
|
p((e == null ? void 0 : e.value) ?? "");
|
|
1619
1609
|
}, [e == null ? void 0 : e.value]);
|
|
@@ -1636,7 +1626,7 @@ function Rn(t) {
|
|
|
1636
1626
|
}
|
|
1637
1627
|
) });
|
|
1638
1628
|
}
|
|
1639
|
-
const
|
|
1629
|
+
const ua = [
|
|
1640
1630
|
"equals",
|
|
1641
1631
|
"notEqual",
|
|
1642
1632
|
"greaterThan",
|
|
@@ -1653,7 +1643,7 @@ function ve(t) {
|
|
|
1653
1643
|
function ye(t) {
|
|
1654
1644
|
return t === "inRange";
|
|
1655
1645
|
}
|
|
1656
|
-
function
|
|
1646
|
+
function fa(t, e, a, n) {
|
|
1657
1647
|
if (t === "blank") return e === null;
|
|
1658
1648
|
if (t === "notBlank") return e !== null;
|
|
1659
1649
|
if (e === null) return !1;
|
|
@@ -1673,26 +1663,26 @@ function ma(t, e, a, n) {
|
|
|
1673
1663
|
return e <= a;
|
|
1674
1664
|
case "inRange": {
|
|
1675
1665
|
if (n === null) return e >= a;
|
|
1676
|
-
const r = Math.min(a, n),
|
|
1677
|
-
return e >= r && e <=
|
|
1666
|
+
const r = Math.min(a, n), l = Math.max(a, n);
|
|
1667
|
+
return e >= r && e <= l;
|
|
1678
1668
|
}
|
|
1679
1669
|
default:
|
|
1680
1670
|
return !0;
|
|
1681
1671
|
}
|
|
1682
1672
|
}
|
|
1683
|
-
function
|
|
1673
|
+
function pa(t) {
|
|
1684
1674
|
if (t == null || t === "") return null;
|
|
1685
1675
|
const e = typeof t == "number" ? t : Number(t);
|
|
1686
1676
|
return Number.isNaN(e) ? null : e;
|
|
1687
1677
|
}
|
|
1688
|
-
function
|
|
1678
|
+
function Fn(t) {
|
|
1689
1679
|
const {
|
|
1690
1680
|
model: e,
|
|
1691
1681
|
onModelChange: a,
|
|
1692
1682
|
getValue: n,
|
|
1693
1683
|
defaultOperator: r,
|
|
1694
|
-
min:
|
|
1695
|
-
max:
|
|
1684
|
+
min: l,
|
|
1685
|
+
max: o,
|
|
1696
1686
|
step: u,
|
|
1697
1687
|
placeholder: d
|
|
1698
1688
|
} = t, { t: c } = F("ui"), i = (e == null ? void 0 : e.type) ?? r ?? "equals", [p, C] = R(i), [g, b] = R((e == null ? void 0 : e.filter) ?? null), [v, y] = R(
|
|
@@ -1707,17 +1697,17 @@ function Dn(t) {
|
|
|
1707
1697
|
}, [e, r]), J({
|
|
1708
1698
|
doesFilterPass: (D) => {
|
|
1709
1699
|
if (!e) return !0;
|
|
1710
|
-
const
|
|
1711
|
-
return
|
|
1700
|
+
const _ = pa(n(D.node));
|
|
1701
|
+
return fa(
|
|
1712
1702
|
e.type,
|
|
1713
|
-
|
|
1703
|
+
_,
|
|
1714
1704
|
e.filter ?? null,
|
|
1715
1705
|
e.filterTo ?? null
|
|
1716
1706
|
);
|
|
1717
1707
|
}
|
|
1718
1708
|
});
|
|
1719
1709
|
const f = z(
|
|
1720
|
-
() =>
|
|
1710
|
+
() => ua.map((D) => ({
|
|
1721
1711
|
value: D,
|
|
1722
1712
|
label: c(`dataTable.numberFilter.operators.${D}`)
|
|
1723
1713
|
})),
|
|
@@ -1770,8 +1760,8 @@ function Dn(t) {
|
|
|
1770
1760
|
size: "sm",
|
|
1771
1761
|
value: g,
|
|
1772
1762
|
onChange: b,
|
|
1773
|
-
min:
|
|
1774
|
-
max:
|
|
1763
|
+
min: l,
|
|
1764
|
+
max: o,
|
|
1775
1765
|
step: u,
|
|
1776
1766
|
placeholder: m,
|
|
1777
1767
|
"aria-label": m
|
|
@@ -1784,8 +1774,8 @@ function Dn(t) {
|
|
|
1784
1774
|
size: "sm",
|
|
1785
1775
|
value: g,
|
|
1786
1776
|
onChange: b,
|
|
1787
|
-
min:
|
|
1788
|
-
max:
|
|
1777
|
+
min: l,
|
|
1778
|
+
max: o,
|
|
1789
1779
|
step: u,
|
|
1790
1780
|
placeholder: c("dataTable.numberFilter.from"),
|
|
1791
1781
|
"aria-label": c("dataTable.numberFilter.from")
|
|
@@ -1797,8 +1787,8 @@ function Dn(t) {
|
|
|
1797
1787
|
size: "sm",
|
|
1798
1788
|
value: v,
|
|
1799
1789
|
onChange: y,
|
|
1800
|
-
min:
|
|
1801
|
-
max:
|
|
1790
|
+
min: l,
|
|
1791
|
+
max: o,
|
|
1802
1792
|
step: u,
|
|
1803
1793
|
placeholder: c("dataTable.numberFilter.to"),
|
|
1804
1794
|
"aria-label": c("dataTable.numberFilter.to")
|
|
@@ -1806,16 +1796,16 @@ function Dn(t) {
|
|
|
1806
1796
|
)
|
|
1807
1797
|
] }),
|
|
1808
1798
|
/* @__PURE__ */ E("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: [
|
|
1809
|
-
/* @__PURE__ */ s(
|
|
1810
|
-
/* @__PURE__ */ s(
|
|
1799
|
+
/* @__PURE__ */ s(L, { intent: "ghost", size: "sm", onClick: x, type: "button", children: c("dataTable.numberFilter.clear") }),
|
|
1800
|
+
/* @__PURE__ */ s(L, { intent: "primary", size: "sm", onClick: h, type: "button", children: c("dataTable.numberFilter.apply") })
|
|
1811
1801
|
] })
|
|
1812
1802
|
]
|
|
1813
1803
|
}
|
|
1814
1804
|
);
|
|
1815
1805
|
}
|
|
1816
|
-
function
|
|
1806
|
+
function Rn(t) {
|
|
1817
1807
|
var i, p;
|
|
1818
|
-
const { model: e, onModelChange: a, column: n } = t, { t: r } = F("ui"),
|
|
1808
|
+
const { model: e, onModelChange: a, column: n } = t, { t: r } = F("ui"), l = ((p = (i = n == null ? void 0 : n.getColDef) == null ? void 0 : i.call(n)) == null ? void 0 : p.filterParams) ?? {}, o = l.defaultOperator ?? "equals", u = l.placeholder ?? r("dataTable.numberFilter.placeholder"), [d, c] = R((e == null ? void 0 : e.filter) ?? null);
|
|
1819
1809
|
return P(() => {
|
|
1820
1810
|
c((e == null ? void 0 : e.filter) ?? null);
|
|
1821
1811
|
}, [e == null ? void 0 : e.filter]), P(() => {
|
|
@@ -1825,39 +1815,39 @@ function kn(t) {
|
|
|
1825
1815
|
a(null);
|
|
1826
1816
|
return;
|
|
1827
1817
|
}
|
|
1828
|
-
a({ type:
|
|
1818
|
+
a({ type: o, filter: d });
|
|
1829
1819
|
}, 200);
|
|
1830
1820
|
return () => clearTimeout(C);
|
|
1831
|
-
}, [d,
|
|
1821
|
+
}, [d, o]), /* @__PURE__ */ s("div", { "data-component": "number-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
1832
1822
|
ee,
|
|
1833
1823
|
{
|
|
1834
1824
|
size: "sm",
|
|
1835
1825
|
value: d,
|
|
1836
1826
|
onChange: c,
|
|
1837
|
-
min:
|
|
1838
|
-
max:
|
|
1839
|
-
step:
|
|
1827
|
+
min: l.min,
|
|
1828
|
+
max: l.max,
|
|
1829
|
+
step: l.step,
|
|
1840
1830
|
placeholder: u,
|
|
1841
1831
|
"aria-label": u
|
|
1842
1832
|
}
|
|
1843
1833
|
) });
|
|
1844
1834
|
}
|
|
1845
|
-
function
|
|
1835
|
+
function Dn(t) {
|
|
1846
1836
|
const { value: e, variantMap: a } = t, n = (a == null ? void 0 : a[e]) ?? "neutral";
|
|
1847
1837
|
return /* @__PURE__ */ s(Mt, { variant: n, withDot: !0, size: "sm", children: String(e ?? "") });
|
|
1848
1838
|
}
|
|
1849
|
-
function
|
|
1839
|
+
function kn(t) {
|
|
1850
1840
|
const { value: e } = t;
|
|
1851
1841
|
return e ? /* @__PURE__ */ E("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
1852
1842
|
/* @__PURE__ */ s(Ae, { name: e.name, src: e.src, size: "sm" }),
|
|
1853
1843
|
/* @__PURE__ */ s("span", { children: e.name })
|
|
1854
1844
|
] }) : null;
|
|
1855
1845
|
}
|
|
1856
|
-
const
|
|
1846
|
+
const ma = {
|
|
1857
1847
|
sm: "ds:size-8",
|
|
1858
1848
|
md: "ds:size-10",
|
|
1859
1849
|
lg: "ds:size-12"
|
|
1860
|
-
},
|
|
1850
|
+
}, ga = {
|
|
1861
1851
|
square: "ds:rounded-none",
|
|
1862
1852
|
rounded: "ds:rounded-[var(--radius-md)]",
|
|
1863
1853
|
circle: "ds:rounded-[var(--radius-full)]"
|
|
@@ -1867,24 +1857,24 @@ function ue(t, e) {
|
|
|
1867
1857
|
const a = t[e];
|
|
1868
1858
|
return typeof a == "string" ? a : void 0;
|
|
1869
1859
|
}
|
|
1870
|
-
const
|
|
1871
|
-
function
|
|
1860
|
+
const ba = /^(?:https?:|data:image\/)/i;
|
|
1861
|
+
function ha(t) {
|
|
1872
1862
|
if (!t) return;
|
|
1873
1863
|
const e = t.trim();
|
|
1874
1864
|
if (e.length !== 0)
|
|
1875
|
-
return
|
|
1865
|
+
return ba.test(e) ? e : void 0;
|
|
1876
1866
|
}
|
|
1877
|
-
function
|
|
1867
|
+
function En(t) {
|
|
1878
1868
|
const {
|
|
1879
1869
|
data: e,
|
|
1880
1870
|
srcField: a,
|
|
1881
1871
|
altField: n,
|
|
1882
1872
|
fallbackField: r,
|
|
1883
|
-
size:
|
|
1884
|
-
shape:
|
|
1873
|
+
size: l = "md",
|
|
1874
|
+
shape: o = "rounded"
|
|
1885
1875
|
} = t;
|
|
1886
1876
|
if (!e) return null;
|
|
1887
|
-
const u = ue(e, a), d =
|
|
1877
|
+
const u = ue(e, a), d = ha(u), c = n ? ue(e, n) ?? "" : "", i = r ? ue(e, r) : void 0;
|
|
1888
1878
|
return d ? /* @__PURE__ */ s(
|
|
1889
1879
|
"img",
|
|
1890
1880
|
{
|
|
@@ -1892,22 +1882,22 @@ function zn(t) {
|
|
|
1892
1882
|
alt: c,
|
|
1893
1883
|
loading: "lazy",
|
|
1894
1884
|
decoding: "async",
|
|
1895
|
-
className: ["ds:object-cover",
|
|
1885
|
+
className: ["ds:object-cover", ma[l], ga[o]].join(
|
|
1896
1886
|
" "
|
|
1897
1887
|
)
|
|
1898
1888
|
}
|
|
1899
|
-
) : i ? /* @__PURE__ */ s(Ae, { name: i, size:
|
|
1889
|
+
) : i ? /* @__PURE__ */ s(Ae, { name: i, size: l }) : null;
|
|
1900
1890
|
}
|
|
1901
|
-
function
|
|
1891
|
+
function In(t) {
|
|
1902
1892
|
const { value: e, maxVisible: a = 3 } = t, { t: n } = F();
|
|
1903
1893
|
if (!Array.isArray(e) || e.length === 0) return null;
|
|
1904
|
-
const r = e.slice(0, a),
|
|
1894
|
+
const r = e.slice(0, a), l = e.length - a;
|
|
1905
1895
|
return /* @__PURE__ */ E("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1906
|
-
r.map((
|
|
1907
|
-
|
|
1896
|
+
r.map((o) => /* @__PURE__ */ s(ae, { label: o, size: "sm" }, o)),
|
|
1897
|
+
l > 0 && /* @__PURE__ */ s(jt, { label: e.slice(a).join(", "), children: /* @__PURE__ */ s(
|
|
1908
1898
|
ae,
|
|
1909
1899
|
{
|
|
1910
|
-
label: n("inputs.multiSelect.overflow", { count:
|
|
1900
|
+
label: n("inputs.multiSelect.overflow", { count: l }),
|
|
1911
1901
|
size: "sm",
|
|
1912
1902
|
variant: "neutral",
|
|
1913
1903
|
fill: "outline"
|
|
@@ -1915,7 +1905,7 @@ function An(t) {
|
|
|
1915
1905
|
) })
|
|
1916
1906
|
] });
|
|
1917
1907
|
}
|
|
1918
|
-
const
|
|
1908
|
+
const va = {
|
|
1919
1909
|
date: { year: "numeric", month: "short", day: "numeric" },
|
|
1920
1910
|
time: { hour: "2-digit", minute: "2-digit" },
|
|
1921
1911
|
datetime: {
|
|
@@ -1926,7 +1916,7 @@ const Ta = {
|
|
|
1926
1916
|
minute: "2-digit"
|
|
1927
1917
|
}
|
|
1928
1918
|
};
|
|
1929
|
-
function
|
|
1919
|
+
function zn(t) {
|
|
1930
1920
|
const { value: e, format: a = "date", options: n } = t;
|
|
1931
1921
|
return e == null || e === "" ? null : a === "relative" && !n ? /* @__PURE__ */ s(he, { value: e, shape: "bare" }) : /* @__PURE__ */ s(
|
|
1932
1922
|
he,
|
|
@@ -1934,32 +1924,32 @@ function Pn(t) {
|
|
|
1934
1924
|
value: e,
|
|
1935
1925
|
format: "absolute",
|
|
1936
1926
|
shape: "bare",
|
|
1937
|
-
absoluteFormat: n ??
|
|
1927
|
+
absoluteFormat: n ?? va[a === "relative" ? "date" : a]
|
|
1938
1928
|
}
|
|
1939
1929
|
);
|
|
1940
1930
|
}
|
|
1941
|
-
function
|
|
1931
|
+
function ya(t) {
|
|
1942
1932
|
if (t == null || t === "") return null;
|
|
1943
1933
|
const e = typeof t == "number" ? t : Number(t);
|
|
1944
1934
|
return Number.isFinite(e) ? e : null;
|
|
1945
1935
|
}
|
|
1946
|
-
function
|
|
1936
|
+
function An(t) {
|
|
1947
1937
|
const {
|
|
1948
1938
|
value: e,
|
|
1949
1939
|
currency: a = "EUR",
|
|
1950
1940
|
colorNegative: n,
|
|
1951
1941
|
strikethrough: r,
|
|
1952
|
-
options:
|
|
1953
|
-
} = t, { i18n:
|
|
1942
|
+
options: l
|
|
1943
|
+
} = t, { i18n: o } = F(), u = ya(e);
|
|
1954
1944
|
if (u === null) return null;
|
|
1955
|
-
const d =
|
|
1945
|
+
const d = o.language || "en", c = new Intl.NumberFormat(d, {
|
|
1956
1946
|
style: "currency",
|
|
1957
1947
|
currency: a,
|
|
1958
|
-
...
|
|
1948
|
+
...l
|
|
1959
1949
|
}).format(u), i = ["ds:tabular-nums"];
|
|
1960
1950
|
return n && u < 0 && i.push("ds:text-[color:var(--destructive)]"), r && i.push("line-through"), /* @__PURE__ */ s("span", { className: i.join(" "), children: c });
|
|
1961
1951
|
}
|
|
1962
|
-
function
|
|
1952
|
+
function Ta(t) {
|
|
1963
1953
|
if (!we(t)) return t;
|
|
1964
1954
|
const e = t, a = e.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} size-4`.trim();
|
|
1965
1955
|
return Fe(e, { className: n, size: e.props.size ?? 16 });
|
|
@@ -1967,20 +1957,20 @@ function xa(t) {
|
|
|
1967
1957
|
function Te(t, e) {
|
|
1968
1958
|
return typeof t == "function" ? t(e) : !!t;
|
|
1969
1959
|
}
|
|
1970
|
-
function
|
|
1960
|
+
function Pn(t) {
|
|
1971
1961
|
const { data: e, actions: a } = t;
|
|
1972
1962
|
return e ? /* @__PURE__ */ s("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: a.map((n, r) => {
|
|
1973
1963
|
if (Te(n.hidden, e)) return null;
|
|
1974
|
-
const
|
|
1964
|
+
const l = Te(n.disabled, e), o = l && n.disabledReason ? n.disabledReason : n.label, u = n.variant === "destructive";
|
|
1975
1965
|
return /* @__PURE__ */ s(
|
|
1976
1966
|
V,
|
|
1977
1967
|
{
|
|
1978
1968
|
size: "sm",
|
|
1979
1969
|
intent: "ghost",
|
|
1980
|
-
icon:
|
|
1981
|
-
tooltip:
|
|
1970
|
+
icon: Ta(n.icon),
|
|
1971
|
+
tooltip: o,
|
|
1982
1972
|
"aria-label": n.label,
|
|
1983
|
-
disabled:
|
|
1973
|
+
disabled: l,
|
|
1984
1974
|
onClick: (d) => {
|
|
1985
1975
|
d.stopPropagation(), n.onClick(e);
|
|
1986
1976
|
},
|
|
@@ -1993,13 +1983,13 @@ function Mn(t) {
|
|
|
1993
1983
|
function Ce(t, e) {
|
|
1994
1984
|
return typeof t == "function" ? t(e) : t;
|
|
1995
1985
|
}
|
|
1996
|
-
function
|
|
1986
|
+
function Ca(t) {
|
|
1997
1987
|
return /^(https?:\/\/|\/|#|mailto:|tel:)/i.test(t) ? t : "#";
|
|
1998
1988
|
}
|
|
1999
|
-
function
|
|
2000
|
-
const { value: e, data: a, href: n, onClick: r, secondary:
|
|
1989
|
+
function On(t) {
|
|
1990
|
+
const { value: e, data: a, href: n, onClick: r, secondary: l } = t;
|
|
2001
1991
|
if (!a) return null;
|
|
2002
|
-
const
|
|
1992
|
+
const o = Ce(n, a), u = Ce(l, a), d = e == null || e === "" ? "" : String(e), c = [
|
|
2003
1993
|
"ds:text-[color:var(--primary)]",
|
|
2004
1994
|
"ds:hover:underline",
|
|
2005
1995
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
@@ -2008,13 +1998,13 @@ function Ln(t) {
|
|
|
2008
1998
|
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
2009
1999
|
"ds:rounded-[var(--radius-sm)]"
|
|
2010
2000
|
].join(" "), i = (p) => {
|
|
2011
|
-
r && (
|
|
2001
|
+
r && (o || p.preventDefault(), p.stopPropagation(), r(a));
|
|
2012
2002
|
};
|
|
2013
2003
|
return /* @__PURE__ */ E("span", { className: "ds:flex ds:flex-col ds:leading-tight", children: [
|
|
2014
|
-
|
|
2004
|
+
o ? /* @__PURE__ */ s(
|
|
2015
2005
|
"a",
|
|
2016
2006
|
{
|
|
2017
|
-
href:
|
|
2007
|
+
href: Ca(o),
|
|
2018
2008
|
onClick: i,
|
|
2019
2009
|
className: c,
|
|
2020
2010
|
children: d
|
|
@@ -2034,20 +2024,20 @@ function Ln(t) {
|
|
|
2034
2024
|
u ? /* @__PURE__ */ s("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: u }) : null
|
|
2035
2025
|
] });
|
|
2036
2026
|
}
|
|
2037
|
-
function
|
|
2027
|
+
function Mn(t) {
|
|
2038
2028
|
const {
|
|
2039
2029
|
value: e,
|
|
2040
2030
|
data: a,
|
|
2041
2031
|
onToggle: n,
|
|
2042
2032
|
onError: r,
|
|
2043
|
-
trueIcon:
|
|
2044
|
-
falseIcon:
|
|
2033
|
+
trueIcon: l,
|
|
2034
|
+
falseIcon: o,
|
|
2045
2035
|
trueClass: u = "ds:text-[color:var(--success)]",
|
|
2046
2036
|
falseClass: d = "ds:text-[color:var(--muted-foreground)]",
|
|
2047
2037
|
label: c
|
|
2048
2038
|
} = t, { t: i } = F(), [p, C] = R(!1);
|
|
2049
2039
|
if (!a) return null;
|
|
2050
|
-
const g = !!e, b = g ?
|
|
2040
|
+
const g = !!e, b = g ? l ?? /* @__PURE__ */ s(Lt, { "aria-hidden": !0, className: "ds:size-4" }) : o ?? /* @__PURE__ */ s(qt, { "aria-hidden": !0, className: "ds:size-4" }), v = g ? u : d, y = c ?? i(g ? "inputs.switch.on" : "inputs.switch.off");
|
|
2051
2041
|
async function f(m) {
|
|
2052
2042
|
if (m.stopPropagation(), p || !a) return;
|
|
2053
2043
|
const x = n(a, !g);
|
|
@@ -2088,7 +2078,7 @@ function jn(t) {
|
|
|
2088
2078
|
}
|
|
2089
2079
|
);
|
|
2090
2080
|
}
|
|
2091
|
-
const
|
|
2081
|
+
const xa = {
|
|
2092
2082
|
sm: "ds:size-[var(--icon-size-sm)]",
|
|
2093
2083
|
md: "ds:size-[var(--icon-size-md)]",
|
|
2094
2084
|
lg: "ds:size-[var(--icon-size-lg)]"
|
|
@@ -2098,62 +2088,62 @@ function xe(t, e) {
|
|
|
2098
2088
|
const a = t[e];
|
|
2099
2089
|
return typeof a == "string" ? a : void 0;
|
|
2100
2090
|
}
|
|
2101
|
-
const
|
|
2102
|
-
function
|
|
2091
|
+
const Na = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i, Sa = /^rgba?\(\s*[\d.\s,%/]+\)$/i, wa = /^hsla?\(\s*[\d.\s,%/]+\)$/i, Fa = /^var\(--[a-z0-9-]+(?:,\s*[^)]+)?\)$/i;
|
|
2092
|
+
function Ra(t) {
|
|
2103
2093
|
if (!t) return;
|
|
2104
2094
|
const e = t.trim();
|
|
2105
|
-
if (
|
|
2095
|
+
if (Na.test(e) || Sa.test(e) || wa.test(e) || Fa.test(e))
|
|
2106
2096
|
return e;
|
|
2107
2097
|
}
|
|
2108
|
-
function
|
|
2109
|
-
const { data: e, colorField: a, size: n = "md", labelField: r } = t,
|
|
2110
|
-
return
|
|
2111
|
-
const c =
|
|
2098
|
+
function jn(t) {
|
|
2099
|
+
const { data: e, colorField: a, size: n = "md", labelField: r } = t, l = X(null), o = e ? xe(e, a) : void 0, u = Ra(o), d = e && r ? xe(e, r) : void 0;
|
|
2100
|
+
return $t(() => {
|
|
2101
|
+
const c = l.current;
|
|
2112
2102
|
c && (u ? c.style.setProperty("--data-table-dot-color", u) : c.style.removeProperty("--data-table-dot-color"));
|
|
2113
2103
|
}, [u]), u ? /* @__PURE__ */ E("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
2114
2104
|
/* @__PURE__ */ s(
|
|
2115
2105
|
"span",
|
|
2116
2106
|
{
|
|
2117
|
-
ref:
|
|
2107
|
+
ref: l,
|
|
2118
2108
|
"aria-hidden": "true",
|
|
2119
2109
|
className: [
|
|
2120
2110
|
"ds:inline-block ds:shrink-0 ds:rounded-[var(--radius-full)]",
|
|
2121
2111
|
"ds:bg-[var(--data-table-dot-color)]",
|
|
2122
2112
|
"ds:border ds:border-[color:var(--border)]",
|
|
2123
|
-
|
|
2113
|
+
xa[n]
|
|
2124
2114
|
].join(" ")
|
|
2125
2115
|
}
|
|
2126
2116
|
),
|
|
2127
2117
|
d ? /* @__PURE__ */ s("span", { children: d }) : null
|
|
2128
2118
|
] }) : null;
|
|
2129
2119
|
}
|
|
2130
|
-
function
|
|
2120
|
+
function Da(t, e) {
|
|
2131
2121
|
if (!t || typeof t != "object") return null;
|
|
2132
2122
|
const a = t[e], n = typeof a == "number" ? a : Number(a);
|
|
2133
2123
|
return Number.isFinite(n) ? n : null;
|
|
2134
2124
|
}
|
|
2135
|
-
function
|
|
2136
|
-
const { data: e, lines: a, currency: n = "EUR", highlightNegative: r } = t, { i18n:
|
|
2125
|
+
function Ln(t) {
|
|
2126
|
+
const { data: e, lines: a, currency: n = "EUR", highlightNegative: r } = t, { i18n: l } = F();
|
|
2137
2127
|
if (!e) return null;
|
|
2138
|
-
const
|
|
2139
|
-
const i =
|
|
2128
|
+
const o = l.language || "en", u = (c) => {
|
|
2129
|
+
const i = Da(e, c.valueField);
|
|
2140
2130
|
if (i === null) return null;
|
|
2141
2131
|
let p;
|
|
2142
2132
|
switch (c.format ?? "number") {
|
|
2143
2133
|
case "currency":
|
|
2144
|
-
p = new Intl.NumberFormat(
|
|
2134
|
+
p = new Intl.NumberFormat(o, {
|
|
2145
2135
|
style: "currency",
|
|
2146
2136
|
currency: n
|
|
2147
2137
|
}).format(i);
|
|
2148
2138
|
break;
|
|
2149
2139
|
case "percent":
|
|
2150
|
-
p = new Intl.NumberFormat(
|
|
2140
|
+
p = new Intl.NumberFormat(o, {
|
|
2151
2141
|
style: "percent",
|
|
2152
2142
|
maximumFractionDigits: 1
|
|
2153
2143
|
}).format(i / 100);
|
|
2154
2144
|
break;
|
|
2155
2145
|
default:
|
|
2156
|
-
p = new Intl.NumberFormat(
|
|
2146
|
+
p = new Intl.NumberFormat(o).format(i);
|
|
2157
2147
|
}
|
|
2158
2148
|
return {
|
|
2159
2149
|
label: c.label,
|
|
@@ -2207,9 +2197,9 @@ function qn(t) {
|
|
|
2207
2197
|
}
|
|
2208
2198
|
);
|
|
2209
2199
|
}
|
|
2210
|
-
function
|
|
2200
|
+
function qn(t) {
|
|
2211
2201
|
var c, i;
|
|
2212
|
-
const { initialValue: e, onValueChange: a, stopEditing: n, column: r } = t, [
|
|
2202
|
+
const { initialValue: e, onValueChange: a, stopEditing: n, column: r } = t, [l, o] = R(e ?? ""), u = X(null);
|
|
2213
2203
|
P(() => {
|
|
2214
2204
|
const p = u.current;
|
|
2215
2205
|
p && (p.focus(), p.select());
|
|
@@ -2220,11 +2210,11 @@ function $n(t) {
|
|
|
2220
2210
|
{
|
|
2221
2211
|
ref: u,
|
|
2222
2212
|
type: "text",
|
|
2223
|
-
value:
|
|
2213
|
+
value: l,
|
|
2224
2214
|
"aria-label": d,
|
|
2225
2215
|
onChange: (p) => {
|
|
2226
2216
|
const C = p.target.value;
|
|
2227
|
-
|
|
2217
|
+
o(C), a(C);
|
|
2228
2218
|
},
|
|
2229
2219
|
onKeyDown: (p) => {
|
|
2230
2220
|
p.key === "Enter" && (p.preventDefault(), n());
|
|
@@ -2238,20 +2228,20 @@ function $n(t) {
|
|
|
2238
2228
|
// WCAG 2.5.5 target size.
|
|
2239
2229
|
Oe.md,
|
|
2240
2230
|
Me.sm,
|
|
2241
|
-
|
|
2231
|
+
je.sm
|
|
2242
2232
|
].join(" ")
|
|
2243
2233
|
}
|
|
2244
2234
|
);
|
|
2245
2235
|
}
|
|
2246
|
-
function
|
|
2236
|
+
function $n(t) {
|
|
2247
2237
|
var v, y;
|
|
2248
2238
|
const {
|
|
2249
2239
|
initialValue: e,
|
|
2250
2240
|
onValueChange: a,
|
|
2251
2241
|
stopEditing: n,
|
|
2252
2242
|
column: r,
|
|
2253
|
-
decimals:
|
|
2254
|
-
min:
|
|
2243
|
+
decimals: l = 2,
|
|
2244
|
+
min: o,
|
|
2255
2245
|
max: u
|
|
2256
2246
|
} = t, { i18n: d } = F(), c = X(null), i = ((y = (v = r == null ? void 0 : r.getColDef) == null ? void 0 : v.call(r)) == null ? void 0 : y.headerName) ?? void 0, [p, C] = R(() => e == null || Number.isNaN(e) ? "" : String(e));
|
|
2257
2247
|
P(() => {
|
|
@@ -2259,9 +2249,9 @@ function Gn(t) {
|
|
|
2259
2249
|
f && (f.focus(), f.select());
|
|
2260
2250
|
}, []);
|
|
2261
2251
|
function g(f) {
|
|
2262
|
-
var
|
|
2252
|
+
var _, k;
|
|
2263
2253
|
if (f.trim().length === 0) return null;
|
|
2264
|
-
const m = d.language || "en", h = new Intl.NumberFormat(m).formatToParts(12345.6), x = ((
|
|
2254
|
+
const m = d.language || "en", h = new Intl.NumberFormat(m).formatToParts(12345.6), x = ((_ = h.find((G) => G.type === "group")) == null ? void 0 : _.value) ?? "", S = ((k = h.find((G) => G.type === "decimal")) == null ? void 0 : k.value) ?? ".", I = f.replace(new RegExp(`\\${x}`, "g"), "").replace(S, ".").replace(/[^\d.-]/g, ""), D = Number(I);
|
|
2265
2255
|
return Number.isFinite(D) ? D : null;
|
|
2266
2256
|
}
|
|
2267
2257
|
function b(f) {
|
|
@@ -2271,8 +2261,8 @@ function Gn(t) {
|
|
|
2271
2261
|
return;
|
|
2272
2262
|
}
|
|
2273
2263
|
let h = m;
|
|
2274
|
-
typeof
|
|
2275
|
-
const x = 10 **
|
|
2264
|
+
typeof o == "number" && (h = Math.max(o, h)), typeof u == "number" && (h = Math.min(u, h));
|
|
2265
|
+
const x = 10 ** l;
|
|
2276
2266
|
a(Math.round(h * x) / x);
|
|
2277
2267
|
}
|
|
2278
2268
|
return /* @__PURE__ */ s(
|
|
@@ -2296,40 +2286,40 @@ function Gn(t) {
|
|
|
2296
2286
|
// Use `md` height — see editable-text-cell-renderer for rationale.
|
|
2297
2287
|
Oe.md,
|
|
2298
2288
|
Me.sm,
|
|
2299
|
-
|
|
2289
|
+
je.sm
|
|
2300
2290
|
].join(" ")
|
|
2301
2291
|
}
|
|
2302
2292
|
);
|
|
2303
2293
|
}
|
|
2304
2294
|
export {
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2295
|
+
Pn as A,
|
|
2296
|
+
Ln as B,
|
|
2297
|
+
jn as C,
|
|
2298
|
+
vn as D,
|
|
2299
|
+
$n as E,
|
|
2300
|
+
En as I,
|
|
2301
|
+
On as L,
|
|
2302
|
+
Fn as N,
|
|
2303
|
+
xn as S,
|
|
2304
|
+
In as T,
|
|
2305
|
+
kn as U,
|
|
2306
|
+
An as a,
|
|
2307
|
+
zn as b,
|
|
2308
|
+
Tn as c,
|
|
2309
|
+
Cn as d,
|
|
2310
|
+
qn as e,
|
|
2311
|
+
Rn as f,
|
|
2312
|
+
Nn as g,
|
|
2313
|
+
Dn as h,
|
|
2314
|
+
ta as i,
|
|
2315
|
+
aa as j,
|
|
2316
|
+
Mn as k,
|
|
2327
2317
|
te as l,
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2318
|
+
Gt as m,
|
|
2319
|
+
Sn as n,
|
|
2320
|
+
wn as o,
|
|
2321
|
+
na as p,
|
|
2332
2322
|
Be as q,
|
|
2333
|
-
|
|
2323
|
+
yn as u
|
|
2334
2324
|
};
|
|
2335
|
-
//# sourceMappingURL=editable-currency-cell-renderer-
|
|
2325
|
+
//# sourceMappingURL=editable-currency-cell-renderer-f3d0Rhue.js.map
|