@alfadocs/ui-kit 0.65.0 → 0.67.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/{agenda-card-Bl-SBiCh.js → agenda-card-BxSFkqgY.js} +2 -2
- package/dist/_chunks/{agenda-tray-Bh1KfEOG.js → agenda-tray-T-BumlGZ.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-Btzmk8OH.js → ai-consent-banner-Dxtx_WAh.js} +2 -2
- package/dist/_chunks/{ai-tools-rail-JnlTqfS4.js → ai-tools-rail-DfmewPUN.js} +92 -76
- package/dist/_chunks/{alia-sidebar-CN8pA6c-.js → alia-sidebar-Ckv0yCKi.js} +2 -2
- package/dist/_chunks/{anamnesis-card-qeLYRG79.js → anamnesis-card-N8pIKWuS.js} +2 -2
- package/dist/_chunks/{antenatal-schedule-timeline-BfzFjEyb.js → antenatal-schedule-timeline-35ebkcZT.js} +2 -2
- package/dist/_chunks/{appointment-tray-BQnJEora.js → appointment-tray-CQJ3Nbi5.js} +4 -4
- package/dist/_chunks/{badge-zsf5i5bH.js → badge-CqGsX32l.js} +46 -42
- package/dist/_chunks/{bishop-score-x2fNqbuZ.js → bishop-score-CjsB9bM-.js} +3 -3
- package/dist/_chunks/{bmi-calculator-C3roxbqD.js → bmi-calculator-n-823_1V.js} +3 -3
- package/dist/_chunks/{care-plan-card-D42WD4-T.js → care-plan-card-CJei-nl9.js} +4 -4
- package/dist/_chunks/{care-plan-entry-card-BukNI7Uy.js → care-plan-entry-card-EmfrbHu8.js} +4 -4
- package/dist/_chunks/{clinical-note-card-BYo437dU.js → clinical-note-card-gtrxv6zn.js} +2 -2
- package/dist/_chunks/{color-picker-9tL7pz5y.js → color-picker-B7xsn6tX.js} +186 -167
- package/dist/_chunks/columns-2-BTOBZbep.js +15 -0
- package/dist/_chunks/{contact-profile-card-CCeJmjbd.js → contact-profile-card-7BMB85T6.js} +2 -2
- package/dist/_chunks/{cycle-calculator-DrVXbIB4.js → cycle-calculator-BF0ointe.js} +3 -3
- package/dist/_chunks/{dependent-selector-CRWgieHm.js → dependent-selector-DpzGtr_J.js} +2 -2
- package/dist/_chunks/{document-scanner-biBS_f6c.js → document-scanner-D2qehl3-.js} +53 -53
- package/dist/_chunks/{due-date-calculator-D4K1BnE2.js → due-date-calculator-DU9AEWNy.js} +4 -4
- package/dist/_chunks/{editable-currency-cell-renderer-CFqQc56y.js → editable-currency-cell-renderer-BVJ04DkB.js} +914 -865
- package/dist/_chunks/{fetal-weight-B_pBjlO7.js → fetal-weight-BVSzOhuR.js} +3 -3
- package/dist/_chunks/{gestational-age-calculator-BETQAVkA.js → gestational-age-calculator-DBlFdoiP.js} +4 -4
- package/dist/_chunks/{hcg-doubling-8zXCJgAQ.js → hcg-doubling-if4Q8aSX.js} +3 -3
- 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-Bu-HD3fy.js} +3 -3
- package/dist/_chunks/{message-card-Bgcvfj6-.js → message-card-Bx4GmLvf.js} +9 -9
- package/dist/_chunks/{message-tray-saAVMeHP.js → message-tray-CVyJajVJ.js} +2 -2
- package/dist/_chunks/{operator-hero-CM8949Hd.js → operator-hero-f_KaRhw5.js} +2 -2
- package/dist/_chunks/{patient-search-Bw9ONucF.js → patient-search-DR9XUYRQ.js} +2 -2
- package/dist/_chunks/{patient-shell-CF_qon7C.js → patient-shell-DrV_iekt.js} +2 -2
- package/dist/_chunks/{patient-summary-card-Bgso0p_l.js → patient-summary-card-ByfIU8N0.js} +4 -4
- package/dist/_chunks/{payment-request-card-DBz3hVDz.js → payment-request-card-yTjzKQCU.js} +3 -3
- package/dist/_chunks/{periodontal-chart-card-AYyHtU9K.js → periodontal-chart-card-Dh3KgvYG.js} +2 -2
- package/dist/_chunks/{practice-results-CVAgY2RZ.js → practice-results-DND2SAt7.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-BuzLTwjy.js → pregnancy-dating-QY-sqpvj.js} +4 -4
- package/dist/_chunks/{pregnancy-weight-gain-aicn7qs7.js → pregnancy-weight-gain-DOJXXNYP.js} +3 -3
- package/dist/_chunks/rich-text-editor-BOQr5lHx.js +1970 -0
- package/dist/_chunks/{scroll-area-BWqCkEGz.js → scroll-area-eccd_Uf-.js} +38 -28
- package/dist/_chunks/{sidebar-DPEHzxLZ.js → sidebar-CGjIk_FQ.js} +36 -22
- package/dist/_chunks/{suggestion-chip-C4kxWUIs.js → suggestion-chip-Bk4PmYTg.js} +30 -30
- package/dist/_chunks/{tab-bar-Xetknddo.js → tab-bar-B1ovILzh.js} +2 -2
- package/dist/_chunks/{tag-CdA0s_VV.js → tag-BQXwuJq1.js} +41 -38
- package/dist/_chunks/{transaction-chip-BZCa6XDn.js → transaction-chip-BrW8P50O.js} +19 -19
- 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-JAZryZJr.js} +137 -149
- package/dist/agent-catalog.json +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/badge/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/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/cell-renderers/actions-cell-renderer.d.ts +16 -0
- package/dist/components/data-table/cell-renderers/tooth-cell-renderer.d.ts +12 -0
- package/dist/components/data-table/data-table.d.ts +1 -1
- package/dist/components/data-table/index.d.ts +2 -0
- package/dist/components/data-table/index.js +13 -12
- package/dist/components/data-table/toolbar.d.ts +5 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- 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/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/practice-results/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 +36 -2
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +2 -0
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/suggestion-chip/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/transaction-chip/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 +26 -0
- package/dist/i18n/locales/ar.js +27 -1
- package/dist/i18n/locales/de.d.ts +26 -0
- package/dist/i18n/locales/de.js +27 -1
- package/dist/i18n/locales/el.d.ts +26 -0
- package/dist/i18n/locales/el.js +27 -1
- package/dist/i18n/locales/en.d.ts +26 -0
- package/dist/i18n/locales/en.js +27 -1
- package/dist/i18n/locales/es.d.ts +26 -0
- package/dist/i18n/locales/es.js +27 -1
- package/dist/i18n/locales/fr.d.ts +26 -0
- package/dist/i18n/locales/fr.js +27 -1
- package/dist/i18n/locales/hi.d.ts +26 -0
- package/dist/i18n/locales/hi.js +27 -1
- package/dist/i18n/locales/it.d.ts +26 -0
- package/dist/i18n/locales/it.js +27 -1
- package/dist/i18n/locales/ja.d.ts +26 -0
- package/dist/i18n/locales/ja.js +27 -1
- package/dist/i18n/locales/nl.d.ts +26 -0
- package/dist/i18n/locales/nl.js +25 -1
- package/dist/i18n/locales/pl.d.ts +26 -0
- package/dist/i18n/locales/pl.js +27 -1
- package/dist/i18n/locales/pt.d.ts +26 -0
- package/dist/i18n/locales/pt.js +27 -1
- package/dist/i18n/locales/ro.d.ts +26 -0
- package/dist/i18n/locales/ro.js +27 -1
- package/dist/i18n/locales/ru.d.ts +26 -0
- package/dist/i18n/locales/ru.js +27 -1
- package/dist/i18n/locales/sq.d.ts +26 -0
- package/dist/i18n/locales/sq.js +27 -1
- package/dist/i18n/locales/sv.d.ts +26 -0
- package/dist/i18n/locales/sv.js +25 -1
- package/dist/i18n/locales/tr.d.ts +26 -0
- package/dist/i18n/locales/tr.js +27 -1
- package/dist/i18n/locales/zh.d.ts +26 -0
- package/dist/i18n/locales/zh.js +25 -1
- package/dist/index.js +509 -508
- package/dist/locales/ar.json +27 -1
- package/dist/locales/de.json +27 -1
- package/dist/locales/el.json +27 -1
- package/dist/locales/en.json +27 -1
- package/dist/locales/es.json +27 -1
- package/dist/locales/fr.json +27 -1
- package/dist/locales/hi.json +27 -1
- package/dist/locales/it.json +27 -1
- package/dist/locales/ja.json +27 -1
- package/dist/locales/nl.json +27 -1
- package/dist/locales/pl.json +27 -1
- package/dist/locales/pt.json +27 -1
- package/dist/locales/ro.json +27 -1
- package/dist/locales/ru.json +27 -1
- package/dist/locales/sq.json +27 -1
- package/dist/locales/sv.json +27 -1
- package/dist/locales/tr.json +27 -1
- package/dist/locales/zh.json +27 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +6 -3
- package/package.json +1 -1
- package/dist/_chunks/rich-text-editor-u36FqSWz.js +0 -1190
|
@@ -1,69 +1,61 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { useMemo as z, forwardRef as
|
|
3
|
-
import { S as
|
|
4
|
-
import { E as
|
|
5
|
-
import { c as
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { useGridFilter as
|
|
8
|
-
import { ModuleRegistry as
|
|
9
|
-
import { B as
|
|
10
|
-
import { I as
|
|
11
|
-
import { P as
|
|
12
|
-
import { C as
|
|
13
|
-
import { T as
|
|
14
|
-
import { T as
|
|
15
|
-
import { D as
|
|
16
|
-
import { X as
|
|
17
|
-
import { R as
|
|
18
|
-
import { S as
|
|
19
|
-
import {
|
|
20
|
-
import { G as
|
|
21
|
-
import { P as
|
|
22
|
-
import { F as
|
|
1
|
+
import { jsx as s, jsxs as I } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as z, forwardRef as $, useState as D, useCallback as M, useEffect as P, useRef as Z, createContext as Se, useContext as we, isValidElement as Fe, cloneElement as Re, useImperativeHandle as Tt } from "react";
|
|
3
|
+
import { S as Ct } from "./skeleton-CZbwyJAA.js";
|
|
4
|
+
import { E as xt } from "./empty-state-BLy7tigq.js";
|
|
5
|
+
import { c as Nt } from "./index-D2ZczOXr.js";
|
|
6
|
+
import { useTranslation as R } from "react-i18next";
|
|
7
|
+
import { useGridFilter as Y, AgGridReact as St } from "ag-grid-react";
|
|
8
|
+
import { ModuleRegistry as wt, AllCommunityModule as Ft } from "ag-grid-community";
|
|
9
|
+
import { B as L } from "./button-DD_0Xdmr.js";
|
|
10
|
+
import { I as G } from "./icon-button-LqoiKcUN.js";
|
|
11
|
+
import { P as ee } from "./popover-DTbfAuR0.js";
|
|
12
|
+
import { C as De } from "./checkbox-DRcOdmXv.js";
|
|
13
|
+
import { T as pe } from "./text-input-BaClJL8Y.js";
|
|
14
|
+
import { T as J } from "./tag-BQXwuJq1.js";
|
|
15
|
+
import { D as B } from "./dropdown-menu-DwwPovMZ.js";
|
|
16
|
+
import { X as ke } from "./x-CCcI3eJp.js";
|
|
17
|
+
import { R as Rt } from "./refresh-cw-CC8jSKMr.js";
|
|
18
|
+
import { S as me } from "./search-BonnQsHv.js";
|
|
19
|
+
import { C as Dt } from "./columns-2-BTOBZbep.js";
|
|
20
|
+
import { G as kt } from "./grip-vertical-Dlg0_k5C.js";
|
|
21
|
+
import { P as It } from "./printer-CeVEWfQq.js";
|
|
22
|
+
import { F as Ie } from "./file-text-DSNuv2B8.js";
|
|
23
23
|
import { D as ne } from "./download-CDF1sbL9.js";
|
|
24
24
|
import { F as Et } from "./file-spreadsheet-zUkY8rJ2.js";
|
|
25
|
-
import
|
|
25
|
+
import zt from "i18next";
|
|
26
26
|
import { S as Ee } from "./select-CEtRcon5.js";
|
|
27
|
-
import { u as
|
|
28
|
-
import { u as
|
|
29
|
-
import { u as
|
|
30
|
-
import { D as
|
|
31
|
-
import { M as
|
|
32
|
-
import { A as
|
|
33
|
-
import { N as
|
|
34
|
-
import { B as
|
|
35
|
-
import { A as
|
|
27
|
+
import { u as At } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
28
|
+
import { u as Pt } from "./use-theme-CAuo6EYT.js";
|
|
29
|
+
import { u as Ot } from "./registry-nPAVE19X.js";
|
|
30
|
+
import { D as ze } from "./date-range-picker-C5BWfH_T.js";
|
|
31
|
+
import { M as Mt } from "./multi-select-BcPylvHR.js";
|
|
32
|
+
import { A as Ae } from "./autocomplete-CcCFlVf-.js";
|
|
33
|
+
import { N as te } from "./number-input-Dj5L3pXK.js";
|
|
34
|
+
import { B as jt } from "./badge-CqGsX32l.js";
|
|
35
|
+
import { A as Pe } from "./avatar-BNQNhoyL.js";
|
|
36
36
|
import { T as Lt } from "./tooltip-DvmfrNvB.js";
|
|
37
|
-
import { T as
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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) {
|
|
53
|
-
if (!we(t)) return t;
|
|
37
|
+
import { T as ve } from "./timestamp-BV2lC-wV.js";
|
|
38
|
+
import { I as qt } from "./icon-button-group-C48khLE0.js";
|
|
39
|
+
import { E as $t } from "./ellipsis-rgGdiK_9.js";
|
|
40
|
+
import { S as _t } from "./square-check-big-Jr-0202D.js";
|
|
41
|
+
import { S as Bt } from "./square-CZoGU14v.js";
|
|
42
|
+
import { u as Gt } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
43
|
+
import { c as Oe, a as Me, b as je, d as Le } from "./input-surface-xyERuLU_.js";
|
|
44
|
+
function Vt(t) {
|
|
45
|
+
if (!Fe(t)) return t;
|
|
54
46
|
const e = t, a = e.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} ds:size-4`.trim();
|
|
55
|
-
return
|
|
47
|
+
return Re(e, { className: n, size: e.props.size ?? 16 });
|
|
56
48
|
}
|
|
57
|
-
const
|
|
58
|
-
function
|
|
59
|
-
const e =
|
|
49
|
+
const qe = Se(null);
|
|
50
|
+
function _(t) {
|
|
51
|
+
const e = we(qe);
|
|
60
52
|
if (!e)
|
|
61
53
|
throw new Error(
|
|
62
54
|
`${t} must be rendered inside <DataTable.Toolbar> as a descendant of <DataTable>.`
|
|
63
55
|
);
|
|
64
56
|
return e;
|
|
65
57
|
}
|
|
66
|
-
function
|
|
58
|
+
function Ut({
|
|
67
59
|
getApi: t,
|
|
68
60
|
selectionCount: e,
|
|
69
61
|
onPrint: a,
|
|
@@ -73,9 +65,9 @@ function Vt({
|
|
|
73
65
|
() => ({ getApi: t, selectionCount: e, onPrint: a }),
|
|
74
66
|
[t, e, a]
|
|
75
67
|
);
|
|
76
|
-
return /* @__PURE__ */ s(
|
|
68
|
+
return /* @__PURE__ */ s(qe.Provider, { value: r, children: n });
|
|
77
69
|
}
|
|
78
|
-
const
|
|
70
|
+
const Kt = [
|
|
79
71
|
"data-table-toolbar",
|
|
80
72
|
// Mobile (<sm) keeps `flex-wrap` so a wide QuickSearch can flow above the
|
|
81
73
|
// Actions cluster on narrow screens. From `sm` (≥640px) we switch to
|
|
@@ -94,20 +86,20 @@ const Ut = [
|
|
|
94
86
|
"ds:border ds:border-[color:var(--card-border)]",
|
|
95
87
|
"ds:shadow-[var(--shadow-sm)]",
|
|
96
88
|
"ds:py-[var(--spacing-sm)] ds:px-[var(--spacing-md)]"
|
|
97
|
-
].join(" "),
|
|
89
|
+
].join(" "), $e = $(
|
|
98
90
|
({ className: t, children: e, ...a }, n) => /* @__PURE__ */ s(
|
|
99
91
|
"div",
|
|
100
92
|
{
|
|
101
93
|
ref: n,
|
|
102
94
|
role: "toolbar",
|
|
103
|
-
className: [
|
|
95
|
+
className: [Kt, t ?? ""].join(" ").trim(),
|
|
104
96
|
...a,
|
|
105
97
|
children: e
|
|
106
98
|
}
|
|
107
99
|
)
|
|
108
100
|
);
|
|
109
|
-
|
|
110
|
-
const
|
|
101
|
+
$e.displayName = "DataTable.Toolbar";
|
|
102
|
+
const _e = $(
|
|
111
103
|
({ className: t, children: e, ...a }, n) => /* @__PURE__ */ s(
|
|
112
104
|
"div",
|
|
113
105
|
{
|
|
@@ -126,8 +118,8 @@ const qe = _(
|
|
|
126
118
|
}
|
|
127
119
|
)
|
|
128
120
|
);
|
|
129
|
-
|
|
130
|
-
const
|
|
121
|
+
_e.displayName = "DataTable.Toolbar.FilterBar";
|
|
122
|
+
const Be = $(
|
|
131
123
|
({ className: t, children: e, ...a }, n) => /* @__PURE__ */ s(
|
|
132
124
|
"div",
|
|
133
125
|
{
|
|
@@ -142,15 +134,15 @@ const $e = _(
|
|
|
142
134
|
}
|
|
143
135
|
)
|
|
144
136
|
);
|
|
145
|
-
|
|
146
|
-
const Ge =
|
|
137
|
+
Be.displayName = "DataTable.Toolbar.Actions";
|
|
138
|
+
const Ge = $(
|
|
147
139
|
({ label: t, onExport: e, intent: a = "outline", ...n }, r) => {
|
|
148
|
-
const { t: o } =
|
|
149
|
-
const d =
|
|
140
|
+
const { t: o } = R(), { getApi: i } = _("DataTable.Toolbar.ExportCsv"), u = M(() => {
|
|
141
|
+
const d = i();
|
|
150
142
|
d && (e ? e(d) : d.exportDataAsCsv());
|
|
151
|
-
}, [
|
|
143
|
+
}, [i, e]);
|
|
152
144
|
return /* @__PURE__ */ s(
|
|
153
|
-
|
|
145
|
+
G,
|
|
154
146
|
{
|
|
155
147
|
ref: r,
|
|
156
148
|
type: "button",
|
|
@@ -164,7 +156,7 @@ const Ge = _(
|
|
|
164
156
|
}
|
|
165
157
|
);
|
|
166
158
|
Ge.displayName = "DataTable.Toolbar.ExportCsv";
|
|
167
|
-
function
|
|
159
|
+
function H(t, e = [30, 30, 30]) {
|
|
168
160
|
if (typeof document > "u") return e;
|
|
169
161
|
const a = document.createElement("span");
|
|
170
162
|
a.style.color = `hsl(var(${t}))`, a.style.position = "absolute", a.style.visibility = "hidden", document.body.appendChild(a);
|
|
@@ -173,77 +165,77 @@ function W(t, e = [30, 30, 30]) {
|
|
|
173
165
|
const r = n.match(/rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)/i);
|
|
174
166
|
return r ? [Number(r[1]), Number(r[2]), Number(r[3])] : e;
|
|
175
167
|
}
|
|
176
|
-
async function
|
|
168
|
+
async function Ve(t, e) {
|
|
177
169
|
if (!t) return;
|
|
178
170
|
const [{ jsPDF: a }, { default: n }] = await Promise.all([
|
|
179
|
-
import("./jspdf.es.min-DaapWjR1.js").then((
|
|
171
|
+
import("./jspdf.es.min-DaapWjR1.js").then((b) => b.j),
|
|
180
172
|
import("./jspdf.plugin.autotable-CSiDNyPn.js")
|
|
181
|
-
]), o = (t.getColumns() ?? []).filter((
|
|
182
|
-
o.map((
|
|
173
|
+
]), o = (t.getColumns() ?? []).filter((b) => b.isVisible()), i = [
|
|
174
|
+
o.map((b) => t.getDisplayNameForColumn(b, null) ?? "")
|
|
183
175
|
], u = [];
|
|
184
|
-
t.forEachNodeAfterFilterAndSort((
|
|
185
|
-
if (!
|
|
186
|
-
const
|
|
187
|
-
const
|
|
188
|
-
rowNode:
|
|
189
|
-
colKey:
|
|
176
|
+
t.forEachNodeAfterFilterAndSort((b) => {
|
|
177
|
+
if (!b.data) return;
|
|
178
|
+
const x = o.map((T) => {
|
|
179
|
+
const h = t.getCellValue({
|
|
180
|
+
rowNode: b,
|
|
181
|
+
colKey: T,
|
|
190
182
|
useFormatter: !0
|
|
191
183
|
});
|
|
192
|
-
return
|
|
184
|
+
return h == null ? "" : String(h);
|
|
193
185
|
});
|
|
194
|
-
u.push(
|
|
186
|
+
u.push(x);
|
|
195
187
|
});
|
|
196
|
-
const d =
|
|
197
|
-
n(
|
|
198
|
-
head:
|
|
188
|
+
const d = H("--muted", [240, 240, 240]), c = H("--foreground", [30, 30, 30]), l = H("--card-foreground", [30, 30, 30]), f = H("--card", [250, 250, 250]), y = new a({ orientation: "landscape" });
|
|
189
|
+
n(y, {
|
|
190
|
+
head: i,
|
|
199
191
|
body: u,
|
|
200
192
|
headStyles: { fillColor: d, textColor: c },
|
|
201
|
-
bodyStyles: { textColor:
|
|
202
|
-
alternateRowStyles: { fillColor:
|
|
193
|
+
bodyStyles: { textColor: l },
|
|
194
|
+
alternateRowStyles: { fillColor: f },
|
|
203
195
|
styles: {
|
|
204
196
|
font: "helvetica",
|
|
205
197
|
fontSize: 10,
|
|
206
198
|
cellPadding: 4
|
|
207
199
|
}
|
|
208
|
-
}),
|
|
200
|
+
}), y.save(e.fileName);
|
|
209
201
|
}
|
|
210
|
-
const
|
|
202
|
+
const Ue = $(
|
|
211
203
|
({ label: t, onClick: e, fileName: a, intent: n = "outline", ...r }, o) => {
|
|
212
|
-
const { t:
|
|
204
|
+
const { t: i } = R(), { getApi: u } = _("DataTable.Toolbar.ExportPdf"), d = M(() => {
|
|
213
205
|
const c = u();
|
|
214
206
|
if (e) {
|
|
215
207
|
e(c);
|
|
216
208
|
return;
|
|
217
209
|
}
|
|
218
|
-
|
|
210
|
+
Ve(c, {
|
|
219
211
|
fileName: a ?? "data-table-export.pdf"
|
|
220
212
|
});
|
|
221
213
|
}, [u, e, a]);
|
|
222
214
|
return /* @__PURE__ */ s(
|
|
223
|
-
|
|
215
|
+
G,
|
|
224
216
|
{
|
|
225
217
|
ref: o,
|
|
226
218
|
type: "button",
|
|
227
219
|
intent: n,
|
|
228
|
-
icon: /* @__PURE__ */ s(
|
|
229
|
-
tooltip: t ??
|
|
220
|
+
icon: /* @__PURE__ */ s(Ie, { "aria-hidden": !0 }),
|
|
221
|
+
tooltip: t ?? i("dataTable.exportPdf"),
|
|
230
222
|
onClick: d,
|
|
231
223
|
...r
|
|
232
224
|
}
|
|
233
225
|
);
|
|
234
226
|
}
|
|
235
227
|
);
|
|
236
|
-
|
|
237
|
-
const
|
|
228
|
+
Ue.displayName = "DataTable.Toolbar.ExportPdf";
|
|
229
|
+
const Ke = $(
|
|
238
230
|
({ label: t, intent: e = "outline", ...a }, n) => {
|
|
239
|
-
const { t: r } =
|
|
231
|
+
const { t: r } = R(), { onPrint: o } = _("DataTable.Toolbar.Print");
|
|
240
232
|
return /* @__PURE__ */ s(
|
|
241
|
-
|
|
233
|
+
G,
|
|
242
234
|
{
|
|
243
235
|
ref: n,
|
|
244
236
|
type: "button",
|
|
245
237
|
intent: e,
|
|
246
|
-
icon: /* @__PURE__ */ s(
|
|
238
|
+
icon: /* @__PURE__ */ s(It, { "aria-hidden": !0 }),
|
|
247
239
|
tooltip: t ?? r("dataTable.print"),
|
|
248
240
|
onClick: o,
|
|
249
241
|
...a
|
|
@@ -251,14 +243,14 @@ const Ue = _(
|
|
|
251
243
|
);
|
|
252
244
|
}
|
|
253
245
|
);
|
|
254
|
-
|
|
255
|
-
const
|
|
256
|
-
const { t: a } =
|
|
257
|
-
return P(() => (
|
|
246
|
+
Ke.displayName = "DataTable.Toolbar.Print";
|
|
247
|
+
const We = ({ placeholder: t, debounceMs: e = 150 }) => {
|
|
248
|
+
const { t: a } = R(), { getApi: n } = _("DataTable.Toolbar.QuickSearch"), [r, o] = D(""), i = Z(void 0);
|
|
249
|
+
return P(() => (i.current && window.clearTimeout(i.current), i.current = window.setTimeout(() => {
|
|
258
250
|
const u = n();
|
|
259
251
|
u && u.setGridOption("quickFilterText", r);
|
|
260
252
|
}, e), () => {
|
|
261
|
-
|
|
253
|
+
i.current && window.clearTimeout(i.current);
|
|
262
254
|
}), [r, e, n]), // Slot wrapper caps the search at a sensible legible width on desktop —
|
|
263
255
|
// without this, TextInput's `w-full` lets the QuickSearch absorb the
|
|
264
256
|
// entire FilterBar row and push trailing Actions onto a second line at
|
|
@@ -267,31 +259,31 @@ const Ke = ({ placeholder: t, debounceMs: e = 150 }) => {
|
|
|
267
259
|
// `--toolbar-search-max` token in the kit yet — see this component's
|
|
268
260
|
// summary for a follow-up note recommending we add one.
|
|
269
261
|
/* @__PURE__ */ s("div", { className: "ds:w-full ds:max-w-[24rem] ds:min-w-0", children: /* @__PURE__ */ s(
|
|
270
|
-
|
|
262
|
+
pe,
|
|
271
263
|
{
|
|
272
264
|
type: "search",
|
|
273
265
|
size: "sm",
|
|
274
266
|
value: r,
|
|
275
267
|
onChange: (u) => o(u.target.value),
|
|
276
268
|
placeholder: t ?? a("dataTable.quickSearch.placeholder", "Search…"),
|
|
277
|
-
startAdornment: /* @__PURE__ */ s(
|
|
269
|
+
startAdornment: /* @__PURE__ */ s(me, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
278
270
|
clearable: !0,
|
|
279
271
|
onClear: () => o(""),
|
|
280
272
|
"aria-label": a("dataTable.quickSearch.label", "Quick search")
|
|
281
273
|
}
|
|
282
274
|
) });
|
|
283
275
|
};
|
|
284
|
-
|
|
285
|
-
const
|
|
276
|
+
We.displayName = "DataTable.Toolbar.QuickSearch";
|
|
277
|
+
const He = $(
|
|
286
278
|
({ onRefresh: t, label: e, intent: a = "outline", ...n }, r) => {
|
|
287
|
-
const { t: o } =
|
|
279
|
+
const { t: o } = R();
|
|
288
280
|
return /* @__PURE__ */ s(
|
|
289
|
-
|
|
281
|
+
G,
|
|
290
282
|
{
|
|
291
283
|
ref: r,
|
|
292
284
|
type: "button",
|
|
293
285
|
intent: a,
|
|
294
|
-
icon: /* @__PURE__ */ s(
|
|
286
|
+
icon: /* @__PURE__ */ s(Rt, { "aria-hidden": !0 }),
|
|
295
287
|
tooltip: e ?? o("dataTable.refresh", "Refresh"),
|
|
296
288
|
onClick: t,
|
|
297
289
|
...n
|
|
@@ -299,8 +291,8 @@ const We = _(
|
|
|
299
291
|
);
|
|
300
292
|
}
|
|
301
293
|
);
|
|
302
|
-
|
|
303
|
-
function
|
|
294
|
+
He.displayName = "DataTable.Toolbar.Refresh";
|
|
295
|
+
function Wt(t) {
|
|
304
296
|
if (!t || typeof t != "object") return "";
|
|
305
297
|
const e = t;
|
|
306
298
|
if (typeof e.filter == "string" || typeof e.filter == "number") {
|
|
@@ -309,43 +301,43 @@ function Kt(t) {
|
|
|
309
301
|
}
|
|
310
302
|
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
303
|
}
|
|
312
|
-
const
|
|
313
|
-
const { t } =
|
|
314
|
-
const
|
|
315
|
-
if (!
|
|
304
|
+
const Qe = () => {
|
|
305
|
+
const { t } = R(), { getApi: e } = _("DataTable.Toolbar.FilterChips"), [a, n] = D([]), [r, o] = D(""), i = M(() => {
|
|
306
|
+
const l = e();
|
|
307
|
+
if (!l) {
|
|
316
308
|
n([]), o("");
|
|
317
309
|
return;
|
|
318
310
|
}
|
|
319
|
-
const
|
|
320
|
-
for (const
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
colId:
|
|
324
|
-
headerName:
|
|
325
|
-
text:
|
|
311
|
+
const f = l.getFilterModel() ?? {}, y = l.getColumns() ?? [], b = [];
|
|
312
|
+
for (const T of Object.keys(f)) {
|
|
313
|
+
const h = y.find((g) => g.getColId() === T), p = l.getDisplayNameForColumn(h, null) ?? T;
|
|
314
|
+
b.push({
|
|
315
|
+
colId: T,
|
|
316
|
+
headerName: p,
|
|
317
|
+
text: Wt(f[T])
|
|
326
318
|
});
|
|
327
319
|
}
|
|
328
|
-
n(
|
|
329
|
-
const
|
|
330
|
-
o(typeof
|
|
320
|
+
n(b);
|
|
321
|
+
const x = l.getGridOption("quickFilterText");
|
|
322
|
+
o(typeof x == "string" ? x : "");
|
|
331
323
|
}, [e]);
|
|
332
324
|
if (P(() => {
|
|
333
|
-
const
|
|
334
|
-
if (!
|
|
335
|
-
const
|
|
336
|
-
return
|
|
337
|
-
|
|
325
|
+
const l = e();
|
|
326
|
+
if (!l) return;
|
|
327
|
+
const f = (y) => i();
|
|
328
|
+
return l.addEventListener("filterChanged", f), i(), () => {
|
|
329
|
+
l.removeEventListener("filterChanged", f);
|
|
338
330
|
};
|
|
339
|
-
}, [e,
|
|
340
|
-
function d(
|
|
341
|
-
const
|
|
342
|
-
|
|
331
|
+
}, [e, i]), a.length + (r ? 1 : 0) === 0) return null;
|
|
332
|
+
function d(l) {
|
|
333
|
+
const f = e();
|
|
334
|
+
f && f.destroyFilter(l);
|
|
343
335
|
}
|
|
344
336
|
function c() {
|
|
345
|
-
const
|
|
346
|
-
|
|
337
|
+
const l = e();
|
|
338
|
+
l && (l.setFilterModel(null), l.setGridOption("quickFilterText", ""), o(""));
|
|
347
339
|
}
|
|
348
|
-
return /* @__PURE__ */
|
|
340
|
+
return /* @__PURE__ */ I(
|
|
349
341
|
"div",
|
|
350
342
|
{
|
|
351
343
|
role: "group",
|
|
@@ -353,35 +345,35 @@ const He = () => {
|
|
|
353
345
|
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
354
346
|
children: [
|
|
355
347
|
r && /* @__PURE__ */ s(
|
|
356
|
-
|
|
348
|
+
J,
|
|
357
349
|
{
|
|
358
350
|
label: `${t("dataTable.quickSearch.label", "Quick search")}: ${r}`,
|
|
359
351
|
size: "sm",
|
|
360
352
|
fill: "outline",
|
|
361
353
|
onRemove: () => {
|
|
362
|
-
const
|
|
363
|
-
|
|
354
|
+
const l = e();
|
|
355
|
+
l == null || l.setGridOption("quickFilterText", ""), o("");
|
|
364
356
|
}
|
|
365
357
|
}
|
|
366
358
|
),
|
|
367
|
-
a.map((
|
|
368
|
-
|
|
359
|
+
a.map((l) => /* @__PURE__ */ s(
|
|
360
|
+
J,
|
|
369
361
|
{
|
|
370
|
-
label:
|
|
362
|
+
label: l.text ? `${l.headerName}: ${l.text}` : l.headerName,
|
|
371
363
|
size: "sm",
|
|
372
364
|
fill: "outline",
|
|
373
|
-
onRemove: () => d(
|
|
365
|
+
onRemove: () => d(l.colId)
|
|
374
366
|
},
|
|
375
|
-
|
|
367
|
+
l.colId
|
|
376
368
|
)),
|
|
377
369
|
/* @__PURE__ */ s(
|
|
378
|
-
|
|
370
|
+
L,
|
|
379
371
|
{
|
|
380
372
|
type: "button",
|
|
381
373
|
intent: "ghost",
|
|
382
374
|
size: "sm",
|
|
383
375
|
onClick: c,
|
|
384
|
-
startIcon: /* @__PURE__ */ s(
|
|
376
|
+
startIcon: /* @__PURE__ */ s(ke, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
385
377
|
children: t("dataTable.filterChips.clearAll", "Clear all")
|
|
386
378
|
}
|
|
387
379
|
)
|
|
@@ -389,15 +381,15 @@ const He = () => {
|
|
|
389
381
|
}
|
|
390
382
|
);
|
|
391
383
|
};
|
|
392
|
-
|
|
393
|
-
const
|
|
384
|
+
Qe.displayName = "DataTable.Toolbar.FilterChips";
|
|
385
|
+
const Xe = ({
|
|
394
386
|
field: t,
|
|
395
387
|
options: e,
|
|
396
388
|
label: a
|
|
397
389
|
}) => {
|
|
398
|
-
const { t: n } =
|
|
390
|
+
const { t: n } = R(), { getApi: r } = _("DataTable.Toolbar.FacetFilter"), [o, i] = D(null);
|
|
399
391
|
function u(d) {
|
|
400
|
-
|
|
392
|
+
i(d);
|
|
401
393
|
const c = r();
|
|
402
394
|
if (c) {
|
|
403
395
|
if (d === null) {
|
|
@@ -419,7 +411,7 @@ const Qe = ({
|
|
|
419
411
|
children: e.map((d) => {
|
|
420
412
|
const c = o === d.value;
|
|
421
413
|
return /* @__PURE__ */ s(
|
|
422
|
-
|
|
414
|
+
L,
|
|
423
415
|
{
|
|
424
416
|
type: "button",
|
|
425
417
|
size: "sm",
|
|
@@ -434,54 +426,54 @@ const Qe = ({
|
|
|
434
426
|
}
|
|
435
427
|
);
|
|
436
428
|
};
|
|
437
|
-
|
|
438
|
-
const
|
|
439
|
-
async function
|
|
429
|
+
Xe.displayName = "DataTable.Toolbar.FacetFilter";
|
|
430
|
+
const Ht = ["csv", "xlsx", "pdf"];
|
|
431
|
+
async function Qt(t, e) {
|
|
440
432
|
if (!t) return;
|
|
441
|
-
const a = await import("./exceljs.min-DUJ-5CGx.js").then((
|
|
433
|
+
const a = await import("./exceljs.min-DUJ-5CGx.js").then((T) => T.e), n = new a.Workbook(), r = n.addWorksheet("Sheet1"), i = (t.getColumns() ?? []).filter((T) => T.isVisible());
|
|
442
434
|
r.addRow(
|
|
443
|
-
|
|
444
|
-
(
|
|
435
|
+
i.map(
|
|
436
|
+
(T) => t.getDisplayNameForColumn(T, null) ?? T.getColId()
|
|
445
437
|
)
|
|
446
|
-
), t.forEachNodeAfterFilterAndSort((
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
const
|
|
450
|
-
rowNode:
|
|
451
|
-
colKey:
|
|
438
|
+
), t.forEachNodeAfterFilterAndSort((T) => {
|
|
439
|
+
T.data && r.addRow(
|
|
440
|
+
i.map((h) => {
|
|
441
|
+
const p = t.getCellValue({
|
|
442
|
+
rowNode: T,
|
|
443
|
+
colKey: h,
|
|
452
444
|
useFormatter: !0
|
|
453
445
|
});
|
|
454
|
-
return
|
|
446
|
+
return p ?? "";
|
|
455
447
|
})
|
|
456
448
|
);
|
|
457
449
|
});
|
|
458
|
-
const u =
|
|
459
|
-
c.eachCell((
|
|
460
|
-
|
|
450
|
+
const u = H("--muted", [240, 240, 240]), d = H("--foreground", [30, 30, 30]), c = r.getRow(1), l = ([T, h, p]) => `${T.toString(16).padStart(2, "0")}${h.toString(16).padStart(2, "0")}${p.toString(16).padStart(2, "0")}`.toUpperCase();
|
|
451
|
+
c.eachCell((T) => {
|
|
452
|
+
T.font = { bold: !0, color: { argb: `FF${l(d)}` } }, T.fill = {
|
|
461
453
|
type: "pattern",
|
|
462
454
|
pattern: "solid",
|
|
463
|
-
fgColor: { argb: `FF${
|
|
455
|
+
fgColor: { argb: `FF${l(u)}` }
|
|
464
456
|
};
|
|
465
457
|
});
|
|
466
|
-
const
|
|
458
|
+
const f = await n.xlsx.writeBuffer(), y = new Blob([f], {
|
|
467
459
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
468
|
-
}),
|
|
469
|
-
|
|
460
|
+
}), b = URL.createObjectURL(y), x = document.createElement("a");
|
|
461
|
+
x.href = b, x.download = e.fileName, document.body.appendChild(x), x.click(), document.body.removeChild(x), URL.revokeObjectURL(b);
|
|
470
462
|
}
|
|
471
|
-
const
|
|
472
|
-
function
|
|
473
|
-
const t =
|
|
463
|
+
const Je = Se(null);
|
|
464
|
+
function Xt() {
|
|
465
|
+
const t = we(Je);
|
|
474
466
|
if (!t)
|
|
475
467
|
throw new Error(
|
|
476
468
|
"DataTable.Toolbar.ExportMenu.Item must be rendered inside DataTable.Toolbar.ExportMenu."
|
|
477
469
|
);
|
|
478
470
|
return t;
|
|
479
471
|
}
|
|
480
|
-
const
|
|
481
|
-
const { t: a } =
|
|
482
|
-
return /* @__PURE__ */ s(
|
|
483
|
-
/* @__PURE__ */ s(
|
|
484
|
-
|
|
472
|
+
const Ze = ({ children: t, label: e }) => {
|
|
473
|
+
const { t: a } = R(), { getApi: n } = _("DataTable.Toolbar.ExportMenu"), r = z(() => ({ getApi: n }), [n]), o = t ?? Ht.map((i) => /* @__PURE__ */ s(ge, { format: i }, i));
|
|
474
|
+
return /* @__PURE__ */ s(Je.Provider, { value: r, children: /* @__PURE__ */ I(B.Root, { children: [
|
|
475
|
+
/* @__PURE__ */ s(B.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
476
|
+
G,
|
|
485
477
|
{
|
|
486
478
|
type: "button",
|
|
487
479
|
intent: "outline",
|
|
@@ -491,131 +483,131 @@ const Je = ({ children: t, label: e }) => {
|
|
|
491
483
|
"aria-haspopup": "menu"
|
|
492
484
|
}
|
|
493
485
|
) }),
|
|
494
|
-
/* @__PURE__ */ s(
|
|
486
|
+
/* @__PURE__ */ s(B.Content, { align: "end", sideOffset: 4, children: o })
|
|
495
487
|
] }) });
|
|
496
488
|
};
|
|
497
|
-
|
|
498
|
-
function
|
|
489
|
+
Ze.displayName = "DataTable.Toolbar.ExportMenu";
|
|
490
|
+
function Jt(t, e) {
|
|
499
491
|
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
492
|
}
|
|
501
|
-
function
|
|
502
|
-
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(
|
|
493
|
+
function Zt(t) {
|
|
494
|
+
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(Ie, { "aria-hidden": !0, className: "ds:size-4" }) : /* @__PURE__ */ s(ne, { "aria-hidden": !0, className: "ds:size-4" });
|
|
503
495
|
}
|
|
504
|
-
const
|
|
496
|
+
const ge = ({
|
|
505
497
|
format: t,
|
|
506
498
|
label: e,
|
|
507
499
|
onClick: a,
|
|
508
500
|
fileName: n
|
|
509
501
|
}) => {
|
|
510
|
-
const { t: r } =
|
|
502
|
+
const { t: r } = R(), { getApi: o } = Xt(), i = M(() => {
|
|
511
503
|
const u = o();
|
|
512
504
|
if (t === "csv") {
|
|
513
505
|
u == null || u.exportDataAsCsv();
|
|
514
506
|
return;
|
|
515
507
|
}
|
|
516
508
|
if (t === "pdf") {
|
|
517
|
-
|
|
509
|
+
Ve(u, {
|
|
518
510
|
fileName: n ?? "data-table-export.pdf"
|
|
519
511
|
});
|
|
520
512
|
return;
|
|
521
513
|
}
|
|
522
514
|
if (t === "xlsx") {
|
|
523
|
-
|
|
515
|
+
Qt(u, {
|
|
524
516
|
fileName: n ?? "data-table-export.xlsx"
|
|
525
517
|
});
|
|
526
518
|
return;
|
|
527
519
|
}
|
|
528
520
|
a == null || a(u);
|
|
529
521
|
}, [t, n, a, o]);
|
|
530
|
-
return /* @__PURE__ */ s(
|
|
531
|
-
|
|
532
|
-
/* @__PURE__ */ s("span", { children: e ??
|
|
522
|
+
return /* @__PURE__ */ s(B.Item, { onSelect: i, children: /* @__PURE__ */ I("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
523
|
+
Zt(t),
|
|
524
|
+
/* @__PURE__ */ s("span", { children: e ?? Jt(r, t) })
|
|
533
525
|
] }) });
|
|
534
526
|
};
|
|
535
|
-
|
|
536
|
-
function
|
|
527
|
+
ge.displayName = "DataTable.Toolbar.ExportMenu.Item";
|
|
528
|
+
function Yt(t) {
|
|
537
529
|
return t ? (t.getColumns() ?? []).map((a) => a.getColDef().hide === void 0 && a.getColId().startsWith("ag-Grid-") ? null : {
|
|
538
530
|
colId: a.getColId(),
|
|
539
531
|
displayName: t.getDisplayNameForColumn(a, null) || a.getColId(),
|
|
540
532
|
visible: a.isVisible()
|
|
541
533
|
}).filter((a) => a !== null) : [];
|
|
542
534
|
}
|
|
543
|
-
const
|
|
544
|
-
const { t:
|
|
535
|
+
const Ye = ({ label: t, icon: e, footer: a }) => {
|
|
536
|
+
const { t: n } = R(), { getApi: r } = _("DataTable.Toolbar.ColumnToggle"), [o, i] = D(!1), [u, d] = D([]), [c, l] = D(null), [f, y] = D(null);
|
|
545
537
|
P(() => {
|
|
546
|
-
|
|
547
|
-
}, [
|
|
548
|
-
const
|
|
549
|
-
(
|
|
550
|
-
const
|
|
551
|
-
|
|
552
|
-
(
|
|
553
|
-
(
|
|
538
|
+
o && d(Yt(r()));
|
|
539
|
+
}, [o, r]);
|
|
540
|
+
const b = M(
|
|
541
|
+
(h, p) => {
|
|
542
|
+
const g = r();
|
|
543
|
+
g && (g.setColumnsVisible([h], p), d(
|
|
544
|
+
(m) => m.map(
|
|
545
|
+
(v) => v.colId === h ? { ...v, visible: p } : v
|
|
554
546
|
)
|
|
555
547
|
));
|
|
556
548
|
},
|
|
557
|
-
[
|
|
558
|
-
),
|
|
559
|
-
(
|
|
560
|
-
if (
|
|
561
|
-
const
|
|
562
|
-
if (!
|
|
563
|
-
|
|
564
|
-
const
|
|
565
|
-
if (
|
|
566
|
-
const
|
|
567
|
-
return
|
|
549
|
+
[r]
|
|
550
|
+
), x = M(
|
|
551
|
+
(h, p) => {
|
|
552
|
+
if (h === p) return;
|
|
553
|
+
const g = r();
|
|
554
|
+
if (!g) return;
|
|
555
|
+
d((v) => {
|
|
556
|
+
const S = v.findIndex((F) => F.colId === h), E = v.findIndex((F) => F.colId === p);
|
|
557
|
+
if (S < 0 || E < 0) return v;
|
|
558
|
+
const k = [...v], [q] = k.splice(S, 1);
|
|
559
|
+
return k.splice(E, 0, q), k;
|
|
568
560
|
});
|
|
569
|
-
const
|
|
570
|
-
|
|
561
|
+
const m = u.findIndex((v) => v.colId === p);
|
|
562
|
+
m >= 0 && g.moveColumns([h], m);
|
|
571
563
|
},
|
|
572
|
-
[
|
|
573
|
-
),
|
|
574
|
-
return /* @__PURE__ */
|
|
575
|
-
/* @__PURE__ */ s(
|
|
576
|
-
|
|
564
|
+
[r, u]
|
|
565
|
+
), T = t ?? n("dataTable.columnToggle");
|
|
566
|
+
return /* @__PURE__ */ I(ee.Root, { open: o, onOpenChange: i, children: [
|
|
567
|
+
/* @__PURE__ */ s(ee.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
568
|
+
G,
|
|
577
569
|
{
|
|
578
570
|
type: "button",
|
|
579
571
|
intent: "outline",
|
|
580
|
-
icon: /* @__PURE__ */ s(
|
|
581
|
-
"aria-label":
|
|
572
|
+
icon: e ?? /* @__PURE__ */ s(Dt, { "aria-hidden": !0 }),
|
|
573
|
+
"aria-label": T,
|
|
582
574
|
"aria-haspopup": "dialog"
|
|
583
575
|
}
|
|
584
576
|
) }),
|
|
585
|
-
/* @__PURE__ */
|
|
586
|
-
/* @__PURE__ */ s(
|
|
577
|
+
/* @__PURE__ */ I(ee.Content, { size: "sm", align: "end", children: [
|
|
578
|
+
/* @__PURE__ */ s(ee.Heading, { children: T }),
|
|
587
579
|
/* @__PURE__ */ s(
|
|
588
580
|
"ul",
|
|
589
581
|
{
|
|
590
582
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
591
|
-
"aria-label":
|
|
592
|
-
children:
|
|
593
|
-
const
|
|
594
|
-
return /* @__PURE__ */
|
|
583
|
+
"aria-label": T,
|
|
584
|
+
children: u.map((h) => {
|
|
585
|
+
const p = c === h.colId, g = f === h.colId && c !== h.colId;
|
|
586
|
+
return /* @__PURE__ */ I(
|
|
595
587
|
"li",
|
|
596
588
|
{
|
|
597
589
|
draggable: !0,
|
|
598
|
-
onDragStart: (
|
|
599
|
-
|
|
590
|
+
onDragStart: (m) => {
|
|
591
|
+
l(h.colId), m.dataTransfer.effectAllowed = "move", m.dataTransfer.setData("text/plain", h.colId);
|
|
600
592
|
},
|
|
601
|
-
onDragOver: (
|
|
602
|
-
|
|
593
|
+
onDragOver: (m) => {
|
|
594
|
+
m.preventDefault(), m.dataTransfer.dropEffect = "move", y(h.colId);
|
|
603
595
|
},
|
|
604
596
|
onDragLeave: () => {
|
|
605
|
-
|
|
597
|
+
y((m) => m === h.colId ? null : m);
|
|
606
598
|
},
|
|
607
|
-
onDrop: (
|
|
608
|
-
|
|
609
|
-
const
|
|
610
|
-
|
|
599
|
+
onDrop: (m) => {
|
|
600
|
+
m.preventDefault();
|
|
601
|
+
const v = m.dataTransfer.getData("text/plain");
|
|
602
|
+
v && x(v, h.colId), l(null), y(null);
|
|
611
603
|
},
|
|
612
604
|
onDragEnd: () => {
|
|
613
|
-
|
|
605
|
+
l(null), y(null);
|
|
614
606
|
},
|
|
615
607
|
className: [
|
|
616
608
|
"ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-xs)] ds:py-[var(--spacing-2xs,var(--spacing-xs))] ds:transition-colors",
|
|
617
|
-
|
|
618
|
-
|
|
609
|
+
p ? "ds:opacity-50" : "",
|
|
610
|
+
g ? "ds:bg-[color:color-mix(in_srgb,var(--primary)_8%,transparent)]" : ""
|
|
619
611
|
].filter(Boolean).join(" "),
|
|
620
612
|
children: [
|
|
621
613
|
/* @__PURE__ */ s(
|
|
@@ -623,41 +615,42 @@ const Ze = ({ label: t }) => {
|
|
|
623
615
|
{
|
|
624
616
|
"aria-hidden": "true",
|
|
625
617
|
className: "ds:cursor-grab ds:text-[color:var(--muted-foreground)] ds:active:cursor-grabbing",
|
|
626
|
-
children: /* @__PURE__ */ s(
|
|
618
|
+
children: /* @__PURE__ */ s(kt, { className: "ds:size-4" })
|
|
627
619
|
}
|
|
628
620
|
),
|
|
629
621
|
/* @__PURE__ */ s(
|
|
630
|
-
|
|
622
|
+
De,
|
|
631
623
|
{
|
|
632
|
-
label:
|
|
633
|
-
checked:
|
|
634
|
-
onCheckedChange: (
|
|
624
|
+
label: h.displayName,
|
|
625
|
+
checked: h.visible,
|
|
626
|
+
onCheckedChange: (m) => b(h.colId, m === !0)
|
|
635
627
|
}
|
|
636
628
|
)
|
|
637
629
|
]
|
|
638
630
|
},
|
|
639
|
-
|
|
631
|
+
h.colId
|
|
640
632
|
);
|
|
641
633
|
})
|
|
642
634
|
}
|
|
643
|
-
)
|
|
635
|
+
),
|
|
636
|
+
a ? /* @__PURE__ */ s("div", { className: "ds:mt-[var(--spacing-xs)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-sm)]", children: a }) : null
|
|
644
637
|
] })
|
|
645
638
|
] });
|
|
646
639
|
};
|
|
647
|
-
|
|
648
|
-
const
|
|
649
|
-
({ label: t, icon: e, onClick: a, variant: n = "default", size: r = "sm", ...o },
|
|
650
|
-
const { t: u } =
|
|
640
|
+
Ye.displayName = "DataTable.Toolbar.ColumnToggle";
|
|
641
|
+
const et = $(
|
|
642
|
+
({ label: t, icon: e, onClick: a, variant: n = "default", size: r = "sm", ...o }, i) => {
|
|
643
|
+
const { t: u } = R(), { getApi: d, selectionCount: c } = _(
|
|
651
644
|
"DataTable.Toolbar.BulkAction"
|
|
652
645
|
);
|
|
653
|
-
return c === 0 ? null : /* @__PURE__ */
|
|
654
|
-
|
|
646
|
+
return c === 0 ? null : /* @__PURE__ */ I(
|
|
647
|
+
L,
|
|
655
648
|
{
|
|
656
|
-
ref:
|
|
649
|
+
ref: i,
|
|
657
650
|
type: "button",
|
|
658
651
|
intent: n === "destructive" ? "destructive" : "secondary",
|
|
659
652
|
size: r,
|
|
660
|
-
startIcon:
|
|
653
|
+
startIcon: Vt(e),
|
|
661
654
|
onClick: () => a(d()),
|
|
662
655
|
"aria-label": `${t} (${u("dataTable.bulkAction", { count: c })})`,
|
|
663
656
|
...o,
|
|
@@ -676,32 +669,32 @@ const Ye = _(
|
|
|
676
669
|
);
|
|
677
670
|
}
|
|
678
671
|
);
|
|
679
|
-
|
|
680
|
-
const
|
|
681
|
-
Item:
|
|
682
|
-
}),
|
|
683
|
-
FilterBar:
|
|
684
|
-
Actions:
|
|
672
|
+
et.displayName = "DataTable.Toolbar.BulkAction";
|
|
673
|
+
const ea = Object.assign(Ze, {
|
|
674
|
+
Item: ge
|
|
675
|
+
}), ae = Object.assign($e, {
|
|
676
|
+
FilterBar: _e,
|
|
677
|
+
Actions: Be,
|
|
685
678
|
/** @deprecated Use `Toolbar.ExportMenu` with a `csv` item. */
|
|
686
679
|
ExportCsv: Ge,
|
|
687
680
|
/** @deprecated Use `Toolbar.ExportMenu` with a `pdf` item. */
|
|
688
|
-
ExportPdf:
|
|
689
|
-
Print:
|
|
690
|
-
ColumnToggle:
|
|
691
|
-
BulkAction:
|
|
692
|
-
QuickSearch:
|
|
693
|
-
Refresh:
|
|
694
|
-
FilterChips:
|
|
695
|
-
FacetFilter:
|
|
696
|
-
ExportMenu:
|
|
697
|
-
}),
|
|
681
|
+
ExportPdf: Ue,
|
|
682
|
+
Print: Ke,
|
|
683
|
+
ColumnToggle: Ye,
|
|
684
|
+
BulkAction: et,
|
|
685
|
+
QuickSearch: We,
|
|
686
|
+
Refresh: He,
|
|
687
|
+
FilterChips: Qe,
|
|
688
|
+
FacetFilter: Xe,
|
|
689
|
+
ExportMenu: ea
|
|
690
|
+
}), ta = [
|
|
698
691
|
"contains",
|
|
699
692
|
"equals",
|
|
700
693
|
"startsWith",
|
|
701
694
|
"endsWith",
|
|
702
695
|
"notContains"
|
|
703
696
|
];
|
|
704
|
-
function
|
|
697
|
+
function aa(t) {
|
|
705
698
|
const e = new Intl.Collator(t, {
|
|
706
699
|
sensitivity: "base",
|
|
707
700
|
usage: "search"
|
|
@@ -724,54 +717,54 @@ function ta(t) {
|
|
|
724
717
|
) === 0
|
|
725
718
|
};
|
|
726
719
|
}
|
|
727
|
-
function
|
|
720
|
+
function na(t) {
|
|
728
721
|
return t == null ? null : typeof t == "string" ? t : String(t);
|
|
729
722
|
}
|
|
730
|
-
function
|
|
731
|
-
const { model: e, onModelChange: a, getValue: n, placeholder: r, defaultOperator: o } = t, { t:
|
|
723
|
+
function ra(t) {
|
|
724
|
+
const { model: e, onModelChange: a, getValue: n, placeholder: r, defaultOperator: o } = t, { t: i } = R("ui"), u = (e == null ? void 0 : e.type) ?? o ?? "contains", [d, c] = D(u), [l, f] = D((e == null ? void 0 : e.filter) ?? "");
|
|
732
725
|
P(() => {
|
|
733
|
-
c((e == null ? void 0 : e.type) ?? o ?? "contains"),
|
|
726
|
+
c((e == null ? void 0 : e.type) ?? o ?? "contains"), f((e == null ? void 0 : e.filter) ?? "");
|
|
734
727
|
}, [e, o]);
|
|
735
|
-
const
|
|
736
|
-
|
|
737
|
-
doesFilterPass: (
|
|
738
|
-
const
|
|
739
|
-
if (!
|
|
740
|
-
const
|
|
741
|
-
if (
|
|
742
|
-
switch (
|
|
728
|
+
const y = z(() => aa(zt.language), []);
|
|
729
|
+
Y({
|
|
730
|
+
doesFilterPass: (p) => {
|
|
731
|
+
const g = e;
|
|
732
|
+
if (!g || g.filter === "") return !0;
|
|
733
|
+
const m = na(n(p.node));
|
|
734
|
+
if (m === null) return !1;
|
|
735
|
+
switch (g.type) {
|
|
743
736
|
case "equals":
|
|
744
|
-
return
|
|
737
|
+
return y.equals(m, g.filter);
|
|
745
738
|
case "contains":
|
|
746
|
-
return
|
|
739
|
+
return y.contains(m, g.filter);
|
|
747
740
|
case "startsWith":
|
|
748
|
-
return
|
|
741
|
+
return y.startsWith(m, g.filter);
|
|
749
742
|
case "endsWith":
|
|
750
|
-
return
|
|
743
|
+
return y.endsWith(m, g.filter);
|
|
751
744
|
case "notContains":
|
|
752
|
-
return !
|
|
745
|
+
return !y.contains(m, g.filter);
|
|
753
746
|
default:
|
|
754
747
|
return !0;
|
|
755
748
|
}
|
|
756
749
|
}
|
|
757
750
|
});
|
|
758
|
-
function
|
|
759
|
-
if (
|
|
751
|
+
function b() {
|
|
752
|
+
if (l.trim() === "") {
|
|
760
753
|
a(null);
|
|
761
754
|
return;
|
|
762
755
|
}
|
|
763
|
-
a({ type: d, filter:
|
|
756
|
+
a({ type: d, filter: l });
|
|
764
757
|
}
|
|
765
|
-
function
|
|
766
|
-
|
|
758
|
+
function x() {
|
|
759
|
+
f(""), c(o ?? "contains"), a(null);
|
|
767
760
|
}
|
|
768
|
-
const
|
|
769
|
-
(
|
|
770
|
-
value:
|
|
771
|
-
label:
|
|
761
|
+
const T = ta.map(
|
|
762
|
+
(p) => ({
|
|
763
|
+
value: p,
|
|
764
|
+
label: i(`dataTable.textFilter.operators.${p}`)
|
|
772
765
|
})
|
|
773
|
-
),
|
|
774
|
-
return /* @__PURE__ */
|
|
766
|
+
), h = r ?? i("dataTable.textFilter.placeholder");
|
|
767
|
+
return /* @__PURE__ */ I(
|
|
775
768
|
"div",
|
|
776
769
|
{
|
|
777
770
|
"data-component": "text-filter",
|
|
@@ -781,78 +774,78 @@ function na(t) {
|
|
|
781
774
|
Ee,
|
|
782
775
|
{
|
|
783
776
|
size: "sm",
|
|
784
|
-
options:
|
|
777
|
+
options: T,
|
|
785
778
|
value: d,
|
|
786
|
-
onValueChange: (
|
|
787
|
-
|
|
779
|
+
onValueChange: (p) => {
|
|
780
|
+
p !== "" && c(p);
|
|
788
781
|
},
|
|
789
|
-
"aria-label":
|
|
782
|
+
"aria-label": i("dataTable.textFilter.operators.contains")
|
|
790
783
|
}
|
|
791
784
|
),
|
|
792
785
|
/* @__PURE__ */ s(
|
|
793
|
-
|
|
786
|
+
pe,
|
|
794
787
|
{
|
|
795
788
|
size: "sm",
|
|
796
|
-
value:
|
|
797
|
-
onChange: (
|
|
798
|
-
onKeyDown: (
|
|
799
|
-
|
|
789
|
+
value: l,
|
|
790
|
+
onChange: (p) => f(p.target.value),
|
|
791
|
+
onKeyDown: (p) => {
|
|
792
|
+
p.key === "Enter" && (p.preventDefault(), b());
|
|
800
793
|
},
|
|
801
|
-
placeholder:
|
|
802
|
-
"aria-label":
|
|
803
|
-
startAdornment: /* @__PURE__ */ s(
|
|
794
|
+
placeholder: h,
|
|
795
|
+
"aria-label": h,
|
|
796
|
+
startAdornment: /* @__PURE__ */ s(me, { "aria-hidden": "true", className: "ds:size-4" })
|
|
804
797
|
}
|
|
805
798
|
),
|
|
806
|
-
/* @__PURE__ */
|
|
807
|
-
/* @__PURE__ */ s(
|
|
808
|
-
/* @__PURE__ */ s(
|
|
799
|
+
/* @__PURE__ */ I("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: [
|
|
800
|
+
/* @__PURE__ */ s(L, { intent: "ghost", size: "sm", onClick: x, type: "button", children: i("dataTable.textFilter.clear") }),
|
|
801
|
+
/* @__PURE__ */ s(L, { intent: "primary", size: "sm", onClick: b, type: "button", children: i("dataTable.textFilter.apply") })
|
|
809
802
|
] })
|
|
810
803
|
]
|
|
811
804
|
}
|
|
812
805
|
);
|
|
813
806
|
}
|
|
814
|
-
function
|
|
815
|
-
var
|
|
816
|
-
const { model: e, onModelChange: a, column: n } = t, { t: r } =
|
|
807
|
+
function sa(t) {
|
|
808
|
+
var f, y;
|
|
809
|
+
const { model: e, onModelChange: a, column: n } = t, { t: r } = R("ui"), o = ((y = (f = n == null ? void 0 : n.getColDef) == null ? void 0 : f.call(n)) == null ? void 0 : y.filterParams) ?? {}, i = o.defaultOperator ?? "contains", u = o.placeholder ?? r("dataTable.textFilter.placeholder"), [d, c] = D((e == null ? void 0 : e.filter) ?? "");
|
|
817
810
|
P(() => {
|
|
818
811
|
c((e == null ? void 0 : e.filter) ?? "");
|
|
819
812
|
}, [e == null ? void 0 : e.filter]), P(() => {
|
|
820
813
|
if (d === ((e == null ? void 0 : e.filter) ?? "")) return;
|
|
821
|
-
const
|
|
814
|
+
const b = setTimeout(() => {
|
|
822
815
|
if (d === "") {
|
|
823
816
|
e && a(null);
|
|
824
817
|
return;
|
|
825
818
|
}
|
|
826
|
-
a({ type:
|
|
819
|
+
a({ type: i, filter: d });
|
|
827
820
|
}, 200);
|
|
828
|
-
return () => clearTimeout(
|
|
829
|
-
}, [d,
|
|
830
|
-
function
|
|
821
|
+
return () => clearTimeout(b);
|
|
822
|
+
}, [d, i, e, a]);
|
|
823
|
+
function l() {
|
|
831
824
|
c(""), e && a(null);
|
|
832
825
|
}
|
|
833
826
|
return /* @__PURE__ */ s("div", { "data-component": "text-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
834
|
-
|
|
827
|
+
pe,
|
|
835
828
|
{
|
|
836
829
|
size: "sm",
|
|
837
830
|
value: d,
|
|
838
|
-
onChange: (
|
|
831
|
+
onChange: (b) => c(b.target.value),
|
|
839
832
|
placeholder: u,
|
|
840
833
|
"aria-label": u,
|
|
841
|
-
startAdornment: /* @__PURE__ */ s(
|
|
834
|
+
startAdornment: /* @__PURE__ */ s(me, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
842
835
|
endAdornment: d.length > 0 ? /* @__PURE__ */ s(
|
|
843
836
|
"button",
|
|
844
837
|
{
|
|
845
838
|
type: "button",
|
|
846
839
|
"aria-label": r("dataTable.textFilter.clear"),
|
|
847
|
-
onClick:
|
|
840
|
+
onClick: l,
|
|
848
841
|
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",
|
|
849
|
-
children: /* @__PURE__ */ s(
|
|
842
|
+
children: /* @__PURE__ */ s(ke, { "aria-hidden": "true", className: "ds:size-4" })
|
|
850
843
|
}
|
|
851
844
|
) : void 0
|
|
852
845
|
}
|
|
853
846
|
) });
|
|
854
847
|
}
|
|
855
|
-
const
|
|
848
|
+
const la = {
|
|
856
849
|
id: "data-table",
|
|
857
850
|
capabilities: [
|
|
858
851
|
"select_single",
|
|
@@ -960,8 +953,8 @@ const sa = {
|
|
|
960
953
|
}
|
|
961
954
|
}
|
|
962
955
|
};
|
|
963
|
-
|
|
964
|
-
const oa =
|
|
956
|
+
wt.registerModules([Ft]);
|
|
957
|
+
const oa = Nt("ag-theme-alfadocs ds:w-full", {
|
|
965
958
|
variants: {
|
|
966
959
|
density: {
|
|
967
960
|
default: "",
|
|
@@ -978,8 +971,8 @@ const oa = xt("ag-theme-alfadocs ds:w-full", {
|
|
|
978
971
|
bordered: !0
|
|
979
972
|
}
|
|
980
973
|
});
|
|
981
|
-
function
|
|
982
|
-
const { t } =
|
|
974
|
+
function ia() {
|
|
975
|
+
const { t } = R();
|
|
983
976
|
return z(
|
|
984
977
|
() => ({
|
|
985
978
|
// Filter strings
|
|
@@ -1012,7 +1005,7 @@ function la() {
|
|
|
1012
1005
|
[t]
|
|
1013
1006
|
);
|
|
1014
1007
|
}
|
|
1015
|
-
function
|
|
1008
|
+
function ca() {
|
|
1016
1009
|
return /* @__PURE__ */ s(
|
|
1017
1010
|
"div",
|
|
1018
1011
|
{
|
|
@@ -1020,7 +1013,7 @@ function ia() {
|
|
|
1020
1013
|
"aria-live": "polite",
|
|
1021
1014
|
className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]",
|
|
1022
1015
|
children: Array.from({ length: 5 }).map((t, e) => /* @__PURE__ */ s(
|
|
1023
|
-
|
|
1016
|
+
Ct,
|
|
1024
1017
|
{
|
|
1025
1018
|
variant: "rectangular",
|
|
1026
1019
|
className: "ds:h-[var(--min-target-size)] ds:w-full"
|
|
@@ -1030,10 +1023,10 @@ function ia() {
|
|
|
1030
1023
|
}
|
|
1031
1024
|
);
|
|
1032
1025
|
}
|
|
1033
|
-
function
|
|
1034
|
-
const { t } =
|
|
1026
|
+
function da() {
|
|
1027
|
+
const { t } = R();
|
|
1035
1028
|
return /* @__PURE__ */ s(
|
|
1036
|
-
|
|
1029
|
+
xt,
|
|
1037
1030
|
{
|
|
1038
1031
|
variant: "no-results",
|
|
1039
1032
|
size: "sm",
|
|
@@ -1042,7 +1035,7 @@ function ca() {
|
|
|
1042
1035
|
}
|
|
1043
1036
|
);
|
|
1044
1037
|
}
|
|
1045
|
-
function
|
|
1038
|
+
function ua(t) {
|
|
1046
1039
|
try {
|
|
1047
1040
|
const e = localStorage.getItem(`data-table-col-state:${t}`);
|
|
1048
1041
|
return e ? JSON.parse(e) : null;
|
|
@@ -1050,7 +1043,7 @@ function da(t) {
|
|
|
1050
1043
|
return null;
|
|
1051
1044
|
}
|
|
1052
1045
|
}
|
|
1053
|
-
function
|
|
1046
|
+
function fa(t, e) {
|
|
1054
1047
|
try {
|
|
1055
1048
|
localStorage.setItem(
|
|
1056
1049
|
`data-table-col-state:${t}`,
|
|
@@ -1059,201 +1052,201 @@ function ua(t, e) {
|
|
|
1059
1052
|
} catch {
|
|
1060
1053
|
}
|
|
1061
1054
|
}
|
|
1062
|
-
function
|
|
1055
|
+
function pa(t, e) {
|
|
1063
1056
|
const {
|
|
1064
1057
|
columnDefs: a,
|
|
1065
1058
|
rowData: n,
|
|
1066
1059
|
rowSelection: r,
|
|
1067
1060
|
pagination: o = !1,
|
|
1068
|
-
paginationPageSize:
|
|
1061
|
+
paginationPageSize: i = 25,
|
|
1069
1062
|
paginationPageSizeSelector: u = [10, 25, 50, 100],
|
|
1070
1063
|
gridId: d,
|
|
1071
1064
|
onSelectionChanged: c,
|
|
1072
|
-
onSortChanged:
|
|
1073
|
-
onFilterChanged:
|
|
1074
|
-
noRowsOverlay:
|
|
1075
|
-
loadingOverlay:
|
|
1076
|
-
gridOptions:
|
|
1077
|
-
density:
|
|
1078
|
-
bordered:
|
|
1079
|
-
heightClass:
|
|
1080
|
-
className:
|
|
1081
|
-
getRowClass:
|
|
1082
|
-
pinnedBottomRowData:
|
|
1065
|
+
onSortChanged: l,
|
|
1066
|
+
onFilterChanged: f,
|
|
1067
|
+
noRowsOverlay: y,
|
|
1068
|
+
loadingOverlay: b,
|
|
1069
|
+
gridOptions: x,
|
|
1070
|
+
density: T,
|
|
1071
|
+
bordered: h,
|
|
1072
|
+
heightClass: p = "ds:h-[500px]",
|
|
1073
|
+
className: g,
|
|
1074
|
+
getRowClass: m,
|
|
1075
|
+
pinnedBottomRowData: v,
|
|
1083
1076
|
printMode: S = !1,
|
|
1084
|
-
children:
|
|
1085
|
-
} = t, { t:
|
|
1077
|
+
children: E
|
|
1078
|
+
} = t, { t: k, i18n: q } = R(), F = Z(null), [V, at] = D(0), [se, le] = D(""), nt = ia(), oe = z(
|
|
1086
1079
|
() => ({
|
|
1087
1080
|
getSelection: () => {
|
|
1088
1081
|
var w;
|
|
1089
|
-
const
|
|
1090
|
-
if (!
|
|
1082
|
+
const C = (w = F.current) == null ? void 0 : w.api;
|
|
1083
|
+
if (!C) return [];
|
|
1091
1084
|
const N = [];
|
|
1092
|
-
for (const O of
|
|
1085
|
+
for (const O of C.getSelectedNodes())
|
|
1093
1086
|
O.id != null && N.push(O.id);
|
|
1094
1087
|
return N;
|
|
1095
1088
|
},
|
|
1096
|
-
setSelection: (
|
|
1089
|
+
setSelection: (C) => {
|
|
1097
1090
|
var O;
|
|
1098
|
-
const N = (O =
|
|
1091
|
+
const N = (O = F.current) == null ? void 0 : O.api;
|
|
1099
1092
|
if (!N) return;
|
|
1100
|
-
const w = new Set(
|
|
1093
|
+
const w = new Set(C);
|
|
1101
1094
|
N.forEachNode((A) => {
|
|
1102
1095
|
A.id != null && A.setSelected(w.has(A.id));
|
|
1103
1096
|
});
|
|
1104
1097
|
},
|
|
1105
|
-
selectRange: (
|
|
1106
|
-
var
|
|
1107
|
-
const w = (
|
|
1098
|
+
selectRange: (C, N) => {
|
|
1099
|
+
var he;
|
|
1100
|
+
const w = (he = F.current) == null ? void 0 : he.api;
|
|
1108
1101
|
if (!w) return;
|
|
1109
1102
|
const O = [];
|
|
1110
|
-
w.forEachNodeAfterFilterAndSort((
|
|
1111
|
-
|
|
1103
|
+
w.forEachNodeAfterFilterAndSort((K) => {
|
|
1104
|
+
K.id != null && O.push(K.id);
|
|
1112
1105
|
});
|
|
1113
|
-
const A = O.indexOf(
|
|
1114
|
-
if (A < 0 ||
|
|
1115
|
-
const [
|
|
1116
|
-
w.forEachNode((
|
|
1117
|
-
|
|
1106
|
+
const A = O.indexOf(C), j = O.indexOf(N);
|
|
1107
|
+
if (A < 0 || j < 0) return;
|
|
1108
|
+
const [U, ce] = A <= j ? [A, j] : [j, A], de = new Set(O.slice(U, ce + 1));
|
|
1109
|
+
w.forEachNode((K) => {
|
|
1110
|
+
K.id != null && K.setSelected(de.has(K.id));
|
|
1118
1111
|
});
|
|
1119
1112
|
},
|
|
1120
1113
|
clearSelection: () => {
|
|
1121
|
-
var
|
|
1122
|
-
(N = (
|
|
1114
|
+
var C, N;
|
|
1115
|
+
(N = (C = F.current) == null ? void 0 : C.api) == null || N.deselectAll();
|
|
1123
1116
|
},
|
|
1124
1117
|
getFilter: () => {
|
|
1125
|
-
var
|
|
1126
|
-
return ((N = (
|
|
1118
|
+
var C, N;
|
|
1119
|
+
return ((N = (C = F.current) == null ? void 0 : C.api) == null ? void 0 : N.getFilterModel()) ?? {};
|
|
1127
1120
|
},
|
|
1128
|
-
setFilter: (
|
|
1121
|
+
setFilter: (C) => {
|
|
1129
1122
|
var N, w;
|
|
1130
|
-
(w = (N =
|
|
1123
|
+
(w = (N = F.current) == null ? void 0 : N.api) == null || w.setFilterModel(C);
|
|
1131
1124
|
},
|
|
1132
1125
|
getSort: () => {
|
|
1133
1126
|
var N;
|
|
1134
|
-
const
|
|
1135
|
-
return
|
|
1127
|
+
const C = (N = F.current) == null ? void 0 : N.api;
|
|
1128
|
+
return C ? C.getColumnState().filter((w) => w.sort === "asc" || w.sort === "desc").map((w) => ({ colId: w.colId, sort: w.sort })) : [];
|
|
1136
1129
|
},
|
|
1137
|
-
setSort: (
|
|
1130
|
+
setSort: (C) => {
|
|
1138
1131
|
var O;
|
|
1139
|
-
const N = (O =
|
|
1132
|
+
const N = (O = F.current) == null ? void 0 : O.api;
|
|
1140
1133
|
if (!N) return;
|
|
1141
1134
|
const w = N.getColumnState().map((A) => {
|
|
1142
|
-
const
|
|
1143
|
-
return { ...A, sort:
|
|
1135
|
+
const j = C.find((U) => U.colId === A.colId);
|
|
1136
|
+
return { ...A, sort: j ? j.sort : null };
|
|
1144
1137
|
});
|
|
1145
1138
|
N.applyColumnState({ state: w, defaultState: { sort: null } });
|
|
1146
1139
|
},
|
|
1147
1140
|
getCurrentPage: () => {
|
|
1148
|
-
var
|
|
1149
|
-
return ((N = (
|
|
1141
|
+
var C, N;
|
|
1142
|
+
return ((N = (C = F.current) == null ? void 0 : C.api) == null ? void 0 : N.paginationGetCurrentPage()) ?? 0;
|
|
1150
1143
|
},
|
|
1151
|
-
goToPage: (
|
|
1144
|
+
goToPage: (C) => {
|
|
1152
1145
|
var N, w;
|
|
1153
|
-
(w = (N =
|
|
1146
|
+
(w = (N = F.current) == null ? void 0 : N.api) == null || w.paginationGoToPage(C);
|
|
1154
1147
|
},
|
|
1155
1148
|
getRawApi: () => {
|
|
1156
|
-
var
|
|
1157
|
-
return (
|
|
1149
|
+
var C;
|
|
1150
|
+
return (C = F.current) == null ? void 0 : C.api;
|
|
1158
1151
|
}
|
|
1159
1152
|
}),
|
|
1160
1153
|
[]
|
|
1161
1154
|
);
|
|
1162
|
-
|
|
1163
|
-
const
|
|
1155
|
+
Tt(e, () => oe, [oe]), Ot(la, oe, d);
|
|
1156
|
+
const rt = q.dir() === "rtl", st = n === void 0, lt = At(), { resolvedTheme: be } = Pt(), ot = (be === "light-accessible" || be === "dark-accessible") && T === "compact" ? "default" : T, it = z(() => {
|
|
1164
1157
|
if (r)
|
|
1165
1158
|
return r === "single" ? { mode: "singleRow" } : {
|
|
1166
1159
|
mode: "multiRow",
|
|
1167
1160
|
headerCheckbox: !0,
|
|
1168
1161
|
checkboxes: !0
|
|
1169
1162
|
};
|
|
1170
|
-
}, [r]),
|
|
1163
|
+
}, [r]), ct = M(() => {
|
|
1171
1164
|
var N;
|
|
1172
|
-
if (!d || !((N =
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1175
|
-
state:
|
|
1165
|
+
if (!d || !((N = F.current) != null && N.api)) return;
|
|
1166
|
+
const C = ua(d);
|
|
1167
|
+
C && F.current.api.applyColumnState({
|
|
1168
|
+
state: C,
|
|
1176
1169
|
applyOrder: !0
|
|
1177
1170
|
});
|
|
1178
1171
|
}, [d]), ie = M(() => {
|
|
1179
|
-
var
|
|
1180
|
-
d && ((
|
|
1181
|
-
}, [d]),
|
|
1172
|
+
var C;
|
|
1173
|
+
d && ((C = F.current) != null && C.api) && fa(d, F.current.api);
|
|
1174
|
+
}, [d]), dt = M(() => {
|
|
1182
1175
|
var w;
|
|
1183
|
-
const
|
|
1184
|
-
if (!
|
|
1185
|
-
const N =
|
|
1186
|
-
|
|
1187
|
-
}, [c]),
|
|
1188
|
-
(
|
|
1176
|
+
const C = (w = F.current) == null ? void 0 : w.api;
|
|
1177
|
+
if (!C) return;
|
|
1178
|
+
const N = C.getSelectedRows();
|
|
1179
|
+
at(N.length), c == null || c(N);
|
|
1180
|
+
}, [c]), ut = M(
|
|
1181
|
+
(C) => {
|
|
1189
1182
|
var w;
|
|
1190
|
-
const N = (w =
|
|
1183
|
+
const N = (w = F.current) == null ? void 0 : w.api;
|
|
1191
1184
|
if (N) {
|
|
1192
|
-
const A = N.getColumnState().find((
|
|
1185
|
+
const A = N.getColumnState().find((j) => j.sort);
|
|
1193
1186
|
if (A) {
|
|
1194
|
-
const
|
|
1195
|
-
|
|
1196
|
-
|
|
1187
|
+
const j = A.colId, U = N.getColumnDef(j), ce = (U == null ? void 0 : U.headerName) ?? j, de = A.sort === "asc" ? "dataTable.sortAscending" : "dataTable.sortDescending";
|
|
1188
|
+
le(
|
|
1189
|
+
k("dataTable.sortAnnounce", {
|
|
1197
1190
|
column: ce,
|
|
1198
|
-
direction:
|
|
1191
|
+
direction: k(de)
|
|
1199
1192
|
})
|
|
1200
1193
|
);
|
|
1201
1194
|
} else
|
|
1202
|
-
|
|
1195
|
+
le("");
|
|
1203
1196
|
}
|
|
1204
|
-
|
|
1197
|
+
l == null || l(C);
|
|
1205
1198
|
},
|
|
1206
|
-
[
|
|
1207
|
-
),
|
|
1208
|
-
(
|
|
1209
|
-
|
|
1199
|
+
[l, k]
|
|
1200
|
+
), ft = M(
|
|
1201
|
+
(C) => {
|
|
1202
|
+
f == null || f(C);
|
|
1210
1203
|
},
|
|
1211
|
-
[
|
|
1204
|
+
[f]
|
|
1212
1205
|
);
|
|
1213
1206
|
P(() => {
|
|
1214
1207
|
if (!se) return;
|
|
1215
|
-
const
|
|
1216
|
-
return () => clearTimeout(
|
|
1208
|
+
const C = setTimeout(() => le(""), 3e3);
|
|
1209
|
+
return () => clearTimeout(C);
|
|
1217
1210
|
}, [se]);
|
|
1218
|
-
const
|
|
1211
|
+
const pt = y ?? da, mt = b ?? ca, gt = M(
|
|
1219
1212
|
() => {
|
|
1220
|
-
var
|
|
1221
|
-
return (
|
|
1213
|
+
var C;
|
|
1214
|
+
return (C = F.current) == null ? void 0 : C.api;
|
|
1222
1215
|
},
|
|
1223
1216
|
[]
|
|
1224
|
-
),
|
|
1217
|
+
), bt = M(() => {
|
|
1225
1218
|
typeof window < "u" && window.print();
|
|
1226
|
-
}, []),
|
|
1219
|
+
}, []), ht = oa({
|
|
1227
1220
|
density: ot,
|
|
1228
|
-
bordered:
|
|
1229
|
-
className:
|
|
1230
|
-
}),
|
|
1231
|
-
return /* @__PURE__ */
|
|
1221
|
+
bordered: h,
|
|
1222
|
+
className: g
|
|
1223
|
+
}), vt = E ?? /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(ae.Actions, { children: /* @__PURE__ */ s(ae.ExportMenu, {}) }) }), yt = S ? !1 : o;
|
|
1224
|
+
return /* @__PURE__ */ I(
|
|
1232
1225
|
"div",
|
|
1233
1226
|
{
|
|
1234
|
-
className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1235
|
-
"aria-busy":
|
|
1227
|
+
className: "ds:flex ds:w-full ds:min-h-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1228
|
+
"aria-busy": st ? "true" : void 0,
|
|
1236
1229
|
"data-component": "data-table",
|
|
1237
1230
|
"data-component-id": d,
|
|
1238
1231
|
"data-print-mode": S ? "true" : void 0,
|
|
1239
1232
|
children: [
|
|
1240
1233
|
!S && /* @__PURE__ */ s(
|
|
1241
|
-
|
|
1234
|
+
Ut,
|
|
1242
1235
|
{
|
|
1243
|
-
getApi:
|
|
1244
|
-
selectionCount:
|
|
1245
|
-
onPrint:
|
|
1246
|
-
children:
|
|
1236
|
+
getApi: gt,
|
|
1237
|
+
selectionCount: V,
|
|
1238
|
+
onPrint: bt,
|
|
1239
|
+
children: vt
|
|
1247
1240
|
}
|
|
1248
1241
|
),
|
|
1249
1242
|
/* @__PURE__ */ s(
|
|
1250
1243
|
"div",
|
|
1251
1244
|
{
|
|
1252
|
-
className: [
|
|
1245
|
+
className: [ht, S ? "" : p].join(" ").trim(),
|
|
1253
1246
|
children: /* @__PURE__ */ s(
|
|
1254
|
-
|
|
1247
|
+
St,
|
|
1255
1248
|
{
|
|
1256
|
-
ref:
|
|
1249
|
+
ref: F,
|
|
1257
1250
|
theme: "legacy",
|
|
1258
1251
|
columnDefs: a,
|
|
1259
1252
|
rowData: n,
|
|
@@ -1264,22 +1257,22 @@ function fa(t, e) {
|
|
|
1264
1257
|
// language instead of AG Grid's stock browser-skinned input.
|
|
1265
1258
|
// Number / date / select columns opt into their dedicated
|
|
1266
1259
|
// wrapper per-column.
|
|
1267
|
-
filter:
|
|
1268
|
-
floatingFilterComponent:
|
|
1260
|
+
filter: ra,
|
|
1261
|
+
floatingFilterComponent: sa,
|
|
1269
1262
|
resizable: !0,
|
|
1270
1263
|
floatingFilter: !0,
|
|
1271
1264
|
// §13d — faint sort icon advertises which columns are
|
|
1272
1265
|
// sortable. v33+ moved this from grid-level to defaultColDef.
|
|
1273
1266
|
unSortIcon: !0,
|
|
1274
|
-
...
|
|
1267
|
+
...x == null ? void 0 : x.defaultColDef
|
|
1275
1268
|
},
|
|
1276
|
-
rowSelection:
|
|
1277
|
-
pagination:
|
|
1278
|
-
paginationPageSize:
|
|
1269
|
+
rowSelection: it,
|
|
1270
|
+
pagination: yt,
|
|
1271
|
+
paginationPageSize: i,
|
|
1279
1272
|
paginationPageSizeSelector: u,
|
|
1280
|
-
paginationNumberFormatter: (
|
|
1281
|
-
animateRows: !
|
|
1282
|
-
enableRtl:
|
|
1273
|
+
paginationNumberFormatter: (C) => new Intl.NumberFormat(q.language).format(C.value),
|
|
1274
|
+
animateRows: !lt,
|
|
1275
|
+
enableRtl: rt,
|
|
1283
1276
|
ensureDomOrder: !0,
|
|
1284
1277
|
enableCellSpan: !0,
|
|
1285
1278
|
enableCellTextSelection: !0,
|
|
@@ -1297,42 +1290,42 @@ function fa(t, e) {
|
|
|
1297
1290
|
undoRedoCellEditingLimit: 20,
|
|
1298
1291
|
suppressCellFocus: !1,
|
|
1299
1292
|
rowBuffer: 10,
|
|
1300
|
-
localeText:
|
|
1301
|
-
noRowsOverlayComponent:
|
|
1302
|
-
loadingOverlayComponent:
|
|
1303
|
-
getRowClass:
|
|
1304
|
-
pinnedBottomRowData:
|
|
1293
|
+
localeText: nt,
|
|
1294
|
+
noRowsOverlayComponent: pt,
|
|
1295
|
+
loadingOverlayComponent: mt,
|
|
1296
|
+
getRowClass: m,
|
|
1297
|
+
pinnedBottomRowData: v,
|
|
1305
1298
|
domLayout: S ? "autoHeight" : void 0,
|
|
1306
|
-
onGridReady:
|
|
1299
|
+
onGridReady: ct,
|
|
1307
1300
|
onColumnMoved: ie,
|
|
1308
1301
|
onColumnResized: ie,
|
|
1309
1302
|
onColumnPinned: ie,
|
|
1310
|
-
onSortChanged:
|
|
1311
|
-
onFilterChanged:
|
|
1312
|
-
onSelectionChanged:
|
|
1313
|
-
...
|
|
1303
|
+
onSortChanged: ut,
|
|
1304
|
+
onFilterChanged: ft,
|
|
1305
|
+
onSelectionChanged: dt,
|
|
1306
|
+
...x
|
|
1314
1307
|
}
|
|
1315
1308
|
)
|
|
1316
1309
|
}
|
|
1317
1310
|
),
|
|
1318
|
-
!S && /* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:justify-between type-body-sm ds:text-[color:var(--muted-foreground)]", children:
|
|
1311
|
+
!S && /* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:justify-between type-body-sm ds:text-[color:var(--muted-foreground)]", children: V > 0 ? /* @__PURE__ */ s("span", { children: k("dataTable.selected", { count: V }) }) : /* @__PURE__ */ s("span", {}) }),
|
|
1319
1312
|
/* @__PURE__ */ s("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: se })
|
|
1320
1313
|
]
|
|
1321
1314
|
}
|
|
1322
1315
|
);
|
|
1323
1316
|
}
|
|
1324
|
-
const
|
|
1325
|
-
|
|
1326
|
-
const
|
|
1327
|
-
Toolbar:
|
|
1317
|
+
const tt = $(pa);
|
|
1318
|
+
tt.displayName = "DataTable";
|
|
1319
|
+
const Sn = Object.assign(tt, {
|
|
1320
|
+
Toolbar: ae
|
|
1328
1321
|
});
|
|
1329
|
-
function
|
|
1322
|
+
function wn(t, e, a) {
|
|
1330
1323
|
return z(() => {
|
|
1331
1324
|
const n = {};
|
|
1332
1325
|
for (const r of e) {
|
|
1333
1326
|
let o = 0;
|
|
1334
|
-
for (const
|
|
1335
|
-
const u =
|
|
1327
|
+
for (const i of t ?? []) {
|
|
1328
|
+
const u = i[r], d = typeof u == "number" ? u : Number(u);
|
|
1336
1329
|
Number.isFinite(d) && (o += d);
|
|
1337
1330
|
}
|
|
1338
1331
|
n[r] = o;
|
|
@@ -1343,22 +1336,22 @@ function Cn(t, e, a) {
|
|
|
1343
1336
|
function re(t) {
|
|
1344
1337
|
return t ? t.toISOString().slice(0, 10) : null;
|
|
1345
1338
|
}
|
|
1346
|
-
function
|
|
1339
|
+
function X(t) {
|
|
1347
1340
|
if (!t) return;
|
|
1348
1341
|
const e = new Date(t);
|
|
1349
1342
|
return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
1350
1343
|
}
|
|
1351
|
-
function
|
|
1344
|
+
function Fn(t) {
|
|
1352
1345
|
const { model: e, onModelChange: a, getValue: n, doesRowPassOtherFilter: r } = t, o = {
|
|
1353
|
-
from:
|
|
1354
|
-
to:
|
|
1355
|
-
}, [
|
|
1356
|
-
|
|
1346
|
+
from: X(e == null ? void 0 : e.dateFrom),
|
|
1347
|
+
to: X(e == null ? void 0 : e.dateTo)
|
|
1348
|
+
}, [i, u] = D(o);
|
|
1349
|
+
Y({
|
|
1357
1350
|
doesFilterPass: (c) => {
|
|
1358
|
-
const
|
|
1359
|
-
if (!
|
|
1360
|
-
const
|
|
1361
|
-
return !(!
|
|
1351
|
+
const l = n(c.node);
|
|
1352
|
+
if (!l) return !1;
|
|
1353
|
+
const f = l instanceof Date ? l : X(String(l));
|
|
1354
|
+
return !(!f || i.from && f < i.from || i.to && f > i.to);
|
|
1362
1355
|
}
|
|
1363
1356
|
});
|
|
1364
1357
|
function d(c) {
|
|
@@ -1372,27 +1365,27 @@ function xn(t) {
|
|
|
1372
1365
|
dateTo: re(c.to)
|
|
1373
1366
|
});
|
|
1374
1367
|
}
|
|
1375
|
-
return /* @__PURE__ */ s("div", { className: "ds:p-[var(--spacing-sm)] ds:min-w-[280px]", children: /* @__PURE__ */ s(
|
|
1368
|
+
return /* @__PURE__ */ s("div", { className: "ds:p-[var(--spacing-sm)] ds:min-w-[280px]", children: /* @__PURE__ */ s(ze, { value: i, onChange: d, size: "sm" }) });
|
|
1376
1369
|
}
|
|
1377
|
-
function
|
|
1370
|
+
function Rn(t) {
|
|
1378
1371
|
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) ?? {}, [o,
|
|
1380
|
-
from:
|
|
1381
|
-
to:
|
|
1372
|
+
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) ?? {}, [o, i] = D({
|
|
1373
|
+
from: X(e == null ? void 0 : e.dateFrom),
|
|
1374
|
+
to: X(e == null ? void 0 : e.dateTo)
|
|
1382
1375
|
});
|
|
1383
|
-
function u(
|
|
1384
|
-
if (l
|
|
1376
|
+
function u(l) {
|
|
1377
|
+
if (i(l), !l.from && !l.to) {
|
|
1385
1378
|
a(null);
|
|
1386
1379
|
return;
|
|
1387
1380
|
}
|
|
1388
1381
|
a({
|
|
1389
1382
|
type: "inRange",
|
|
1390
|
-
dateFrom: re(
|
|
1391
|
-
dateTo: re(
|
|
1383
|
+
dateFrom: re(l.from),
|
|
1384
|
+
dateTo: re(l.to)
|
|
1392
1385
|
});
|
|
1393
1386
|
}
|
|
1394
1387
|
return /* @__PURE__ */ s("div", { "data-component": "date-range-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
1395
|
-
|
|
1388
|
+
ze,
|
|
1396
1389
|
{
|
|
1397
1390
|
value: o,
|
|
1398
1391
|
onChange: u,
|
|
@@ -1401,60 +1394,60 @@ function Nn(t) {
|
|
|
1401
1394
|
}
|
|
1402
1395
|
) });
|
|
1403
1396
|
}
|
|
1404
|
-
function
|
|
1397
|
+
function W(t) {
|
|
1405
1398
|
return typeof t == "number" ? `n:${t}` : `s:${t}`;
|
|
1406
1399
|
}
|
|
1407
|
-
function
|
|
1408
|
-
const { model: e, onModelChange: a, getValue: n, api: r, column: o, options:
|
|
1409
|
-
if (
|
|
1400
|
+
function Dn(t) {
|
|
1401
|
+
const { model: e, onModelChange: a, getValue: n, api: r, column: o, options: i, placeholder: u } = t, { t: d } = R("ui"), c = z(() => {
|
|
1402
|
+
if (i && i.length > 0) return i;
|
|
1410
1403
|
if (!r || !o) return [];
|
|
1411
|
-
const
|
|
1412
|
-
return r.forEachNode((
|
|
1413
|
-
const
|
|
1414
|
-
if (
|
|
1415
|
-
const
|
|
1416
|
-
|
|
1417
|
-
}), Array.from(
|
|
1418
|
-
(
|
|
1404
|
+
const p = /* @__PURE__ */ new Map();
|
|
1405
|
+
return r.forEachNode((g) => {
|
|
1406
|
+
const m = n(g);
|
|
1407
|
+
if (m == null) return;
|
|
1408
|
+
const v = typeof m == "string" || typeof m == "number" ? m : String(m), S = W(v);
|
|
1409
|
+
p.has(S) || p.set(S, { value: v, label: String(v) });
|
|
1410
|
+
}), Array.from(p.values()).sort(
|
|
1411
|
+
(g, m) => String(g.label).localeCompare(String(m.label))
|
|
1419
1412
|
);
|
|
1420
|
-
}, [
|
|
1421
|
-
const
|
|
1422
|
-
for (const
|
|
1423
|
-
return
|
|
1424
|
-
}, [e]), [
|
|
1413
|
+
}, [i, r, o, n]), l = z(() => {
|
|
1414
|
+
const p = /* @__PURE__ */ new Set(), g = (e == null ? void 0 : e.values) ?? [];
|
|
1415
|
+
for (const m of g) p.add(W(m));
|
|
1416
|
+
return p;
|
|
1417
|
+
}, [e]), [f, y] = D(l);
|
|
1425
1418
|
P(() => {
|
|
1426
|
-
|
|
1427
|
-
}, [
|
|
1428
|
-
doesFilterPass: (
|
|
1429
|
-
const
|
|
1430
|
-
if (!
|
|
1431
|
-
const
|
|
1432
|
-
if (
|
|
1433
|
-
const
|
|
1434
|
-
return
|
|
1419
|
+
y(l);
|
|
1420
|
+
}, [l]), Y({
|
|
1421
|
+
doesFilterPass: (p) => {
|
|
1422
|
+
const g = e == null ? void 0 : e.values;
|
|
1423
|
+
if (!g || g.length === 0) return !0;
|
|
1424
|
+
const m = n(p.node);
|
|
1425
|
+
if (m == null) return !1;
|
|
1426
|
+
const v = typeof m == "string" || typeof m == "number" ? m : String(m), S = W(v);
|
|
1427
|
+
return g.some((E) => W(E) === S);
|
|
1435
1428
|
}
|
|
1436
1429
|
});
|
|
1437
|
-
function
|
|
1438
|
-
|
|
1439
|
-
const
|
|
1440
|
-
return
|
|
1430
|
+
function b(p) {
|
|
1431
|
+
y((g) => {
|
|
1432
|
+
const m = new Set(g);
|
|
1433
|
+
return m.has(p) ? m.delete(p) : m.add(p), m;
|
|
1441
1434
|
});
|
|
1442
1435
|
}
|
|
1443
|
-
function
|
|
1444
|
-
if (
|
|
1436
|
+
function x() {
|
|
1437
|
+
if (f.size === 0) {
|
|
1445
1438
|
a(null);
|
|
1446
1439
|
return;
|
|
1447
1440
|
}
|
|
1448
|
-
const
|
|
1449
|
-
for (const
|
|
1450
|
-
|
|
1451
|
-
a({ type: "set", values:
|
|
1441
|
+
const p = [];
|
|
1442
|
+
for (const g of c)
|
|
1443
|
+
f.has(W(g.value)) && p.push(g.value);
|
|
1444
|
+
a({ type: "set", values: p });
|
|
1452
1445
|
}
|
|
1453
|
-
function
|
|
1454
|
-
|
|
1446
|
+
function T() {
|
|
1447
|
+
y(/* @__PURE__ */ new Set()), a(null);
|
|
1455
1448
|
}
|
|
1456
|
-
const
|
|
1457
|
-
return /* @__PURE__ */
|
|
1449
|
+
const h = u ?? d("dataTable.selectFilter.all");
|
|
1450
|
+
return /* @__PURE__ */ I(
|
|
1458
1451
|
"div",
|
|
1459
1452
|
{
|
|
1460
1453
|
"data-component": "select-filter",
|
|
@@ -1464,179 +1457,179 @@ function Sn(t) {
|
|
|
1464
1457
|
"div",
|
|
1465
1458
|
{
|
|
1466
1459
|
role: "group",
|
|
1467
|
-
"aria-label":
|
|
1460
|
+
"aria-label": h,
|
|
1468
1461
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:max-h-[240px] ds:overflow-y-auto",
|
|
1469
|
-
children: c.length === 0 ? /* @__PURE__ */ s("p", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[var(--muted-foreground)] ds:py-[var(--spacing-xs)]", children: d("dataTable.agGrid.noRowsToShow") }) : c.map((
|
|
1470
|
-
const
|
|
1462
|
+
children: c.length === 0 ? /* @__PURE__ */ s("p", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[var(--muted-foreground)] ds:py-[var(--spacing-xs)]", children: d("dataTable.agGrid.noRowsToShow") }) : c.map((p) => {
|
|
1463
|
+
const g = W(p.value);
|
|
1471
1464
|
return /* @__PURE__ */ s(
|
|
1472
|
-
|
|
1465
|
+
De,
|
|
1473
1466
|
{
|
|
1474
1467
|
size: "sm",
|
|
1475
|
-
label:
|
|
1476
|
-
checked:
|
|
1477
|
-
onCheckedChange: () => g
|
|
1468
|
+
label: p.label,
|
|
1469
|
+
checked: f.has(g),
|
|
1470
|
+
onCheckedChange: () => b(g)
|
|
1478
1471
|
},
|
|
1479
|
-
|
|
1472
|
+
g
|
|
1480
1473
|
);
|
|
1481
1474
|
})
|
|
1482
1475
|
}
|
|
1483
1476
|
),
|
|
1484
|
-
/* @__PURE__ */
|
|
1485
|
-
/* @__PURE__ */ s(
|
|
1486
|
-
/* @__PURE__ */ s(
|
|
1477
|
+
/* @__PURE__ */ I("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: [
|
|
1478
|
+
/* @__PURE__ */ s(L, { intent: "ghost", size: "sm", onClick: T, type: "button", children: d("dataTable.selectFilter.clear") }),
|
|
1479
|
+
/* @__PURE__ */ s(L, { intent: "primary", size: "sm", onClick: x, type: "button", children: d("dataTable.selectFilter.apply") })
|
|
1487
1480
|
] })
|
|
1488
1481
|
]
|
|
1489
1482
|
}
|
|
1490
1483
|
);
|
|
1491
1484
|
}
|
|
1492
|
-
function
|
|
1493
|
-
var
|
|
1494
|
-
const { model: e, onModelChange: a, column: n } = t, r = (
|
|
1495
|
-
const
|
|
1496
|
-
for (const
|
|
1497
|
-
return
|
|
1498
|
-
}, [
|
|
1499
|
-
() =>
|
|
1500
|
-
value: String(
|
|
1501
|
-
label:
|
|
1485
|
+
function kn(t) {
|
|
1486
|
+
var y;
|
|
1487
|
+
const { model: e, onModelChange: a, column: n } = t, r = (y = n == null ? void 0 : n.getColDef) == null ? void 0 : y.call(n), o = (r == null ? void 0 : r.filterParams) ?? {}, i = o.options ?? [], u = o.placeholder ?? (typeof (r == null ? void 0 : r.headerName) == "string" ? r.headerName : void 0), d = z(() => {
|
|
1488
|
+
const b = /* @__PURE__ */ new Map();
|
|
1489
|
+
for (const x of i) b.set(String(x.value), x.value);
|
|
1490
|
+
return b;
|
|
1491
|
+
}, [i]), c = z(
|
|
1492
|
+
() => i.map((b) => ({
|
|
1493
|
+
value: String(b.value),
|
|
1494
|
+
label: b.label
|
|
1502
1495
|
})),
|
|
1503
|
-
[
|
|
1504
|
-
),
|
|
1505
|
-
() => ((e == null ? void 0 : e.values) ?? []).map((
|
|
1496
|
+
[i]
|
|
1497
|
+
), l = z(
|
|
1498
|
+
() => ((e == null ? void 0 : e.values) ?? []).map((b) => String(b)),
|
|
1506
1499
|
[e]
|
|
1507
1500
|
);
|
|
1508
|
-
function
|
|
1509
|
-
if (
|
|
1501
|
+
function f(b) {
|
|
1502
|
+
if (b.length === 0) {
|
|
1510
1503
|
a(null);
|
|
1511
1504
|
return;
|
|
1512
1505
|
}
|
|
1513
|
-
const
|
|
1514
|
-
for (const
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1506
|
+
const x = [];
|
|
1507
|
+
for (const T of b) {
|
|
1508
|
+
const h = d.get(T);
|
|
1509
|
+
h !== void 0 && x.push(h);
|
|
1517
1510
|
}
|
|
1518
|
-
a({ type: "set", values:
|
|
1511
|
+
a({ type: "set", values: x });
|
|
1519
1512
|
}
|
|
1520
1513
|
return /* @__PURE__ */ s("div", { "data-component": "select-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
1521
|
-
|
|
1514
|
+
Mt,
|
|
1522
1515
|
{
|
|
1523
1516
|
size: "sm",
|
|
1524
1517
|
options: c,
|
|
1525
|
-
value:
|
|
1526
|
-
onChange:
|
|
1518
|
+
value: l,
|
|
1519
|
+
onChange: f,
|
|
1527
1520
|
placeholder: o.placeholder,
|
|
1528
1521
|
"aria-label": u,
|
|
1529
1522
|
allowClear: !0
|
|
1530
1523
|
}
|
|
1531
1524
|
) });
|
|
1532
1525
|
}
|
|
1533
|
-
function
|
|
1526
|
+
function Q(t) {
|
|
1534
1527
|
return t.trim().toLocaleLowerCase();
|
|
1535
1528
|
}
|
|
1536
|
-
function
|
|
1529
|
+
function In(t) {
|
|
1537
1530
|
const {
|
|
1538
1531
|
model: e,
|
|
1539
1532
|
onModelChange: a,
|
|
1540
1533
|
getValue: n,
|
|
1541
1534
|
api: r,
|
|
1542
1535
|
column: o,
|
|
1543
|
-
options:
|
|
1536
|
+
options: i,
|
|
1544
1537
|
loadOptions: u,
|
|
1545
1538
|
placeholder: d
|
|
1546
|
-
} = t, { t: c } =
|
|
1547
|
-
if (
|
|
1539
|
+
} = t, { t: c } = R("ui"), l = z(() => {
|
|
1540
|
+
if (i && i.length > 0) return i;
|
|
1548
1541
|
if (!r || !o) return [];
|
|
1549
|
-
const
|
|
1550
|
-
return r.forEachNode((
|
|
1551
|
-
const
|
|
1552
|
-
if (
|
|
1553
|
-
const S = typeof
|
|
1554
|
-
|
|
1555
|
-
}), Array.from(
|
|
1556
|
-
(
|
|
1542
|
+
const g = /* @__PURE__ */ new Map();
|
|
1543
|
+
return r.forEachNode((m) => {
|
|
1544
|
+
const v = n(m);
|
|
1545
|
+
if (v == null) return;
|
|
1546
|
+
const S = typeof v == "string" ? v : String(v);
|
|
1547
|
+
g.has(S) || g.set(S, { value: S, label: S });
|
|
1548
|
+
}), Array.from(g.values()).sort(
|
|
1549
|
+
(m, v) => m.label.localeCompare(v.label)
|
|
1557
1550
|
);
|
|
1558
|
-
}, [
|
|
1551
|
+
}, [i, r, o, n]), f = z(() => async (g, m) => {
|
|
1559
1552
|
if (u)
|
|
1560
|
-
return (await u(
|
|
1561
|
-
const
|
|
1562
|
-
return (
|
|
1563
|
-
}, [u,
|
|
1553
|
+
return (await u(g, m)).map((k) => ({ value: k.value, label: k.label }));
|
|
1554
|
+
const v = Q(g);
|
|
1555
|
+
return (v ? l.filter((E) => Q(E.label).includes(v)) : l).slice(0, 50).map((E) => ({ value: E.value, label: E.label }));
|
|
1556
|
+
}, [u, l]), [y, b] = D((e == null ? void 0 : e.value) ?? "");
|
|
1564
1557
|
P(() => {
|
|
1565
|
-
|
|
1566
|
-
}, [e == null ? void 0 : e.value]),
|
|
1567
|
-
doesFilterPass: (
|
|
1568
|
-
const
|
|
1569
|
-
if (!
|
|
1570
|
-
const
|
|
1571
|
-
if (
|
|
1572
|
-
const S = typeof
|
|
1573
|
-
return
|
|
1558
|
+
b((e == null ? void 0 : e.value) ?? "");
|
|
1559
|
+
}, [e == null ? void 0 : e.value]), Y({
|
|
1560
|
+
doesFilterPass: (g) => {
|
|
1561
|
+
const m = e == null ? void 0 : e.value;
|
|
1562
|
+
if (!m) return !0;
|
|
1563
|
+
const v = n(g.node);
|
|
1564
|
+
if (v == null) return !1;
|
|
1565
|
+
const S = typeof v == "string" ? v : String(v);
|
|
1566
|
+
return Q(S) === Q(m);
|
|
1574
1567
|
}
|
|
1575
1568
|
});
|
|
1576
|
-
function
|
|
1577
|
-
g
|
|
1569
|
+
function x(g) {
|
|
1570
|
+
b(g.label), a({ type: "equals", value: g.value });
|
|
1578
1571
|
}
|
|
1579
|
-
function
|
|
1580
|
-
g
|
|
1572
|
+
function T(g) {
|
|
1573
|
+
b(g), g === "" && e && a(null);
|
|
1581
1574
|
}
|
|
1582
|
-
function
|
|
1583
|
-
|
|
1575
|
+
function h() {
|
|
1576
|
+
b(""), a(null);
|
|
1584
1577
|
}
|
|
1585
|
-
const
|
|
1586
|
-
return /* @__PURE__ */
|
|
1578
|
+
const p = d ?? c("dataTable.typeaheadFilter.placeholder");
|
|
1579
|
+
return /* @__PURE__ */ I(
|
|
1587
1580
|
"div",
|
|
1588
1581
|
{
|
|
1589
1582
|
"data-component": "typeahead-filter",
|
|
1590
1583
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
|
|
1591
1584
|
children: [
|
|
1592
1585
|
/* @__PURE__ */ s(
|
|
1593
|
-
|
|
1586
|
+
Ae,
|
|
1594
1587
|
{
|
|
1595
1588
|
size: "sm",
|
|
1596
|
-
value:
|
|
1597
|
-
onChange:
|
|
1598
|
-
onSelect:
|
|
1599
|
-
loadOptions:
|
|
1600
|
-
placeholder:
|
|
1601
|
-
"aria-label":
|
|
1589
|
+
value: y,
|
|
1590
|
+
onChange: T,
|
|
1591
|
+
onSelect: x,
|
|
1592
|
+
loadOptions: f,
|
|
1593
|
+
placeholder: p,
|
|
1594
|
+
"aria-label": p
|
|
1602
1595
|
}
|
|
1603
1596
|
),
|
|
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(
|
|
1597
|
+
/* @__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: h, type: "button", children: c("dataTable.typeaheadFilter.clear") }) })
|
|
1605
1598
|
]
|
|
1606
1599
|
}
|
|
1607
1600
|
);
|
|
1608
1601
|
}
|
|
1609
|
-
function
|
|
1610
|
-
var
|
|
1611
|
-
const { model: e, onModelChange: a, column: n } = t, { t: r } =
|
|
1602
|
+
function En(t) {
|
|
1603
|
+
var x, T;
|
|
1604
|
+
const { model: e, onModelChange: a, column: n } = t, { t: r } = R("ui"), o = ((T = (x = n == null ? void 0 : n.getColDef) == null ? void 0 : x.call(n)) == null ? void 0 : T.filterParams) ?? {}, i = o.options ?? [], u = o.loadOptions, d = o.placeholder ?? r("dataTable.typeaheadFilter.placeholder"), c = z(() => async (h, p) => {
|
|
1612
1605
|
if (u)
|
|
1613
|
-
return (await u(
|
|
1614
|
-
const
|
|
1615
|
-
return (
|
|
1616
|
-
}, [u,
|
|
1606
|
+
return (await u(h, p)).map((S) => ({ value: S.value, label: S.label }));
|
|
1607
|
+
const g = Q(h);
|
|
1608
|
+
return (g ? i.filter((v) => Q(v.label).includes(g)) : i).slice(0, 50).map((v) => ({ value: v.value, label: v.label }));
|
|
1609
|
+
}, [u, i]), [l, f] = D((e == null ? void 0 : e.value) ?? "");
|
|
1617
1610
|
P(() => {
|
|
1618
|
-
|
|
1611
|
+
f((e == null ? void 0 : e.value) ?? "");
|
|
1619
1612
|
}, [e == null ? void 0 : e.value]);
|
|
1620
|
-
function
|
|
1621
|
-
|
|
1613
|
+
function y(h) {
|
|
1614
|
+
f(h.label), a({ type: "equals", value: h.value });
|
|
1622
1615
|
}
|
|
1623
|
-
function
|
|
1624
|
-
|
|
1616
|
+
function b(h) {
|
|
1617
|
+
f(h), h === "" && e && a(null);
|
|
1625
1618
|
}
|
|
1626
1619
|
return /* @__PURE__ */ s("div", { "data-component": "typeahead-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
1627
|
-
|
|
1620
|
+
Ae,
|
|
1628
1621
|
{
|
|
1629
1622
|
size: "sm",
|
|
1630
|
-
value:
|
|
1631
|
-
onChange:
|
|
1632
|
-
onSelect:
|
|
1623
|
+
value: l,
|
|
1624
|
+
onChange: b,
|
|
1625
|
+
onSelect: y,
|
|
1633
1626
|
loadOptions: c,
|
|
1634
1627
|
placeholder: d,
|
|
1635
1628
|
"aria-label": d
|
|
1636
1629
|
}
|
|
1637
1630
|
) });
|
|
1638
1631
|
}
|
|
1639
|
-
const
|
|
1632
|
+
const ma = [
|
|
1640
1633
|
"equals",
|
|
1641
1634
|
"notEqual",
|
|
1642
1635
|
"greaterThan",
|
|
@@ -1647,13 +1640,13 @@ const pa = [
|
|
|
1647
1640
|
"blank",
|
|
1648
1641
|
"notBlank"
|
|
1649
1642
|
];
|
|
1650
|
-
function
|
|
1643
|
+
function ye(t) {
|
|
1651
1644
|
return t !== "blank" && t !== "notBlank";
|
|
1652
1645
|
}
|
|
1653
|
-
function
|
|
1646
|
+
function Te(t) {
|
|
1654
1647
|
return t === "inRange";
|
|
1655
1648
|
}
|
|
1656
|
-
function
|
|
1649
|
+
function ga(t, e, a, n) {
|
|
1657
1650
|
if (t === "blank") return e === null;
|
|
1658
1651
|
if (t === "notBlank") return e !== null;
|
|
1659
1652
|
if (e === null) return !1;
|
|
@@ -1680,73 +1673,73 @@ function ma(t, e, a, n) {
|
|
|
1680
1673
|
return !0;
|
|
1681
1674
|
}
|
|
1682
1675
|
}
|
|
1683
|
-
function
|
|
1676
|
+
function ba(t) {
|
|
1684
1677
|
if (t == null || t === "") return null;
|
|
1685
1678
|
const e = typeof t == "number" ? t : Number(t);
|
|
1686
1679
|
return Number.isNaN(e) ? null : e;
|
|
1687
1680
|
}
|
|
1688
|
-
function
|
|
1681
|
+
function zn(t) {
|
|
1689
1682
|
const {
|
|
1690
1683
|
model: e,
|
|
1691
1684
|
onModelChange: a,
|
|
1692
1685
|
getValue: n,
|
|
1693
1686
|
defaultOperator: r,
|
|
1694
1687
|
min: o,
|
|
1695
|
-
max:
|
|
1688
|
+
max: i,
|
|
1696
1689
|
step: u,
|
|
1697
1690
|
placeholder: d
|
|
1698
|
-
} = t, { t: c } =
|
|
1691
|
+
} = t, { t: c } = R("ui"), l = (e == null ? void 0 : e.type) ?? r ?? "equals", [f, y] = D(l), [b, x] = D((e == null ? void 0 : e.filter) ?? null), [T, h] = D(
|
|
1699
1692
|
(e == null ? void 0 : e.filterTo) ?? null
|
|
1700
1693
|
);
|
|
1701
1694
|
P(() => {
|
|
1702
1695
|
if (e === null) {
|
|
1703
|
-
|
|
1696
|
+
y(r ?? "equals"), x(null), h(null);
|
|
1704
1697
|
return;
|
|
1705
1698
|
}
|
|
1706
|
-
|
|
1707
|
-
}, [e, r]),
|
|
1708
|
-
doesFilterPass: (
|
|
1699
|
+
y(e.type), x(e.filter ?? null), h(e.filterTo ?? null);
|
|
1700
|
+
}, [e, r]), Y({
|
|
1701
|
+
doesFilterPass: (k) => {
|
|
1709
1702
|
if (!e) return !0;
|
|
1710
|
-
const
|
|
1711
|
-
return
|
|
1703
|
+
const q = ba(n(k.node));
|
|
1704
|
+
return ga(
|
|
1712
1705
|
e.type,
|
|
1713
|
-
|
|
1706
|
+
q,
|
|
1714
1707
|
e.filter ?? null,
|
|
1715
1708
|
e.filterTo ?? null
|
|
1716
1709
|
);
|
|
1717
1710
|
}
|
|
1718
1711
|
});
|
|
1719
|
-
const
|
|
1720
|
-
() =>
|
|
1721
|
-
value:
|
|
1722
|
-
label: c(`dataTable.numberFilter.operators.${
|
|
1712
|
+
const p = z(
|
|
1713
|
+
() => ma.map((k) => ({
|
|
1714
|
+
value: k,
|
|
1715
|
+
label: c(`dataTable.numberFilter.operators.${k}`)
|
|
1723
1716
|
})),
|
|
1724
1717
|
[c]
|
|
1725
|
-
),
|
|
1726
|
-
function
|
|
1727
|
-
if (!
|
|
1728
|
-
a({ type:
|
|
1718
|
+
), g = d ?? c("dataTable.numberFilter.placeholder");
|
|
1719
|
+
function m() {
|
|
1720
|
+
if (!ye(f)) {
|
|
1721
|
+
a({ type: f, filter: 0 });
|
|
1729
1722
|
return;
|
|
1730
1723
|
}
|
|
1731
|
-
if (
|
|
1724
|
+
if (b === null) {
|
|
1732
1725
|
a(null);
|
|
1733
1726
|
return;
|
|
1734
1727
|
}
|
|
1735
|
-
if (
|
|
1728
|
+
if (Te(f)) {
|
|
1736
1729
|
a({
|
|
1737
|
-
type:
|
|
1738
|
-
filter:
|
|
1739
|
-
filterTo:
|
|
1730
|
+
type: f,
|
|
1731
|
+
filter: b,
|
|
1732
|
+
filterTo: T ?? void 0
|
|
1740
1733
|
});
|
|
1741
1734
|
return;
|
|
1742
1735
|
}
|
|
1743
|
-
a({ type:
|
|
1736
|
+
a({ type: f, filter: b });
|
|
1744
1737
|
}
|
|
1745
|
-
function
|
|
1746
|
-
|
|
1738
|
+
function v() {
|
|
1739
|
+
y(r ?? "equals"), x(null), h(null), a(null);
|
|
1747
1740
|
}
|
|
1748
|
-
const S =
|
|
1749
|
-
return /* @__PURE__ */
|
|
1741
|
+
const S = ye(f), E = Te(f);
|
|
1742
|
+
return /* @__PURE__ */ I(
|
|
1750
1743
|
"div",
|
|
1751
1744
|
{
|
|
1752
1745
|
"data-component": "number-filter",
|
|
@@ -1756,80 +1749,80 @@ function Dn(t) {
|
|
|
1756
1749
|
Ee,
|
|
1757
1750
|
{
|
|
1758
1751
|
size: "sm",
|
|
1759
|
-
options:
|
|
1760
|
-
value:
|
|
1761
|
-
onValueChange: (
|
|
1762
|
-
|
|
1752
|
+
options: p,
|
|
1753
|
+
value: f,
|
|
1754
|
+
onValueChange: (k) => {
|
|
1755
|
+
k !== "" && y(k);
|
|
1763
1756
|
},
|
|
1764
1757
|
"aria-label": c("dataTable.numberFilter.operators.equals")
|
|
1765
1758
|
}
|
|
1766
1759
|
),
|
|
1767
|
-
S && !
|
|
1768
|
-
|
|
1760
|
+
S && !E && /* @__PURE__ */ s(
|
|
1761
|
+
te,
|
|
1769
1762
|
{
|
|
1770
1763
|
size: "sm",
|
|
1771
|
-
value:
|
|
1772
|
-
onChange:
|
|
1764
|
+
value: b,
|
|
1765
|
+
onChange: x,
|
|
1773
1766
|
min: o,
|
|
1774
|
-
max:
|
|
1767
|
+
max: i,
|
|
1775
1768
|
step: u,
|
|
1776
|
-
placeholder:
|
|
1777
|
-
"aria-label":
|
|
1769
|
+
placeholder: g,
|
|
1770
|
+
"aria-label": g
|
|
1778
1771
|
}
|
|
1779
1772
|
),
|
|
1780
|
-
|
|
1773
|
+
E && /* @__PURE__ */ I("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1781
1774
|
/* @__PURE__ */ s(
|
|
1782
|
-
|
|
1775
|
+
te,
|
|
1783
1776
|
{
|
|
1784
1777
|
size: "sm",
|
|
1785
|
-
value:
|
|
1786
|
-
onChange:
|
|
1778
|
+
value: b,
|
|
1779
|
+
onChange: x,
|
|
1787
1780
|
min: o,
|
|
1788
|
-
max:
|
|
1781
|
+
max: i,
|
|
1789
1782
|
step: u,
|
|
1790
1783
|
placeholder: c("dataTable.numberFilter.from"),
|
|
1791
1784
|
"aria-label": c("dataTable.numberFilter.from")
|
|
1792
1785
|
}
|
|
1793
1786
|
),
|
|
1794
1787
|
/* @__PURE__ */ s(
|
|
1795
|
-
|
|
1788
|
+
te,
|
|
1796
1789
|
{
|
|
1797
1790
|
size: "sm",
|
|
1798
|
-
value:
|
|
1799
|
-
onChange:
|
|
1791
|
+
value: T,
|
|
1792
|
+
onChange: h,
|
|
1800
1793
|
min: o,
|
|
1801
|
-
max:
|
|
1794
|
+
max: i,
|
|
1802
1795
|
step: u,
|
|
1803
1796
|
placeholder: c("dataTable.numberFilter.to"),
|
|
1804
1797
|
"aria-label": c("dataTable.numberFilter.to")
|
|
1805
1798
|
}
|
|
1806
1799
|
)
|
|
1807
1800
|
] }),
|
|
1808
|
-
/* @__PURE__ */
|
|
1809
|
-
/* @__PURE__ */ s(
|
|
1810
|
-
/* @__PURE__ */ s(
|
|
1801
|
+
/* @__PURE__ */ I("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: [
|
|
1802
|
+
/* @__PURE__ */ s(L, { intent: "ghost", size: "sm", onClick: v, type: "button", children: c("dataTable.numberFilter.clear") }),
|
|
1803
|
+
/* @__PURE__ */ s(L, { intent: "primary", size: "sm", onClick: m, type: "button", children: c("dataTable.numberFilter.apply") })
|
|
1811
1804
|
] })
|
|
1812
1805
|
]
|
|
1813
1806
|
}
|
|
1814
1807
|
);
|
|
1815
1808
|
}
|
|
1816
|
-
function
|
|
1817
|
-
var
|
|
1818
|
-
const { model: e, onModelChange: a, column: n } = t, { t: r } =
|
|
1809
|
+
function An(t) {
|
|
1810
|
+
var l, f;
|
|
1811
|
+
const { model: e, onModelChange: a, column: n } = t, { t: r } = R("ui"), o = ((f = (l = n == null ? void 0 : n.getColDef) == null ? void 0 : l.call(n)) == null ? void 0 : f.filterParams) ?? {}, i = o.defaultOperator ?? "equals", u = o.placeholder ?? r("dataTable.numberFilter.placeholder"), [d, c] = D((e == null ? void 0 : e.filter) ?? null);
|
|
1819
1812
|
return P(() => {
|
|
1820
1813
|
c((e == null ? void 0 : e.filter) ?? null);
|
|
1821
1814
|
}, [e == null ? void 0 : e.filter]), P(() => {
|
|
1822
1815
|
if (d === ((e == null ? void 0 : e.filter) ?? null)) return;
|
|
1823
|
-
const
|
|
1816
|
+
const y = setTimeout(() => {
|
|
1824
1817
|
if (d === null || Number.isNaN(d)) {
|
|
1825
1818
|
a(null);
|
|
1826
1819
|
return;
|
|
1827
1820
|
}
|
|
1828
|
-
a({ type:
|
|
1821
|
+
a({ type: i, filter: d });
|
|
1829
1822
|
}, 200);
|
|
1830
|
-
return () => clearTimeout(
|
|
1831
|
-
}, [d,
|
|
1832
|
-
|
|
1823
|
+
return () => clearTimeout(y);
|
|
1824
|
+
}, [d, i]), /* @__PURE__ */ s("div", { "data-component": "number-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
1825
|
+
te,
|
|
1833
1826
|
{
|
|
1834
1827
|
size: "sm",
|
|
1835
1828
|
value: d,
|
|
@@ -1842,22 +1835,22 @@ function kn(t) {
|
|
|
1842
1835
|
}
|
|
1843
1836
|
) });
|
|
1844
1837
|
}
|
|
1845
|
-
function
|
|
1838
|
+
function Pn(t) {
|
|
1846
1839
|
const { value: e, variantMap: a } = t, n = (a == null ? void 0 : a[e]) ?? "neutral";
|
|
1847
|
-
return /* @__PURE__ */ s(
|
|
1840
|
+
return /* @__PURE__ */ s(jt, { variant: n, withDot: !0, size: "sm", children: String(e ?? "") });
|
|
1848
1841
|
}
|
|
1849
|
-
function
|
|
1842
|
+
function On(t) {
|
|
1850
1843
|
const { value: e } = t;
|
|
1851
|
-
return e ? /* @__PURE__ */
|
|
1852
|
-
/* @__PURE__ */ s(
|
|
1844
|
+
return e ? /* @__PURE__ */ I("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
1845
|
+
/* @__PURE__ */ s(Pe, { name: e.name, src: e.src, size: "sm" }),
|
|
1853
1846
|
/* @__PURE__ */ s("span", { children: e.name })
|
|
1854
1847
|
] }) : null;
|
|
1855
1848
|
}
|
|
1856
|
-
const
|
|
1849
|
+
const ha = {
|
|
1857
1850
|
sm: "ds:size-8",
|
|
1858
1851
|
md: "ds:size-10",
|
|
1859
1852
|
lg: "ds:size-12"
|
|
1860
|
-
},
|
|
1853
|
+
}, va = {
|
|
1861
1854
|
square: "ds:rounded-none",
|
|
1862
1855
|
rounded: "ds:rounded-[var(--radius-md)]",
|
|
1863
1856
|
circle: "ds:rounded-[var(--radius-full)]"
|
|
@@ -1867,24 +1860,24 @@ function ue(t, e) {
|
|
|
1867
1860
|
const a = t[e];
|
|
1868
1861
|
return typeof a == "string" ? a : void 0;
|
|
1869
1862
|
}
|
|
1870
|
-
const
|
|
1871
|
-
function
|
|
1863
|
+
const ya = /^(?:https?:|data:image\/)/i;
|
|
1864
|
+
function Ta(t) {
|
|
1872
1865
|
if (!t) return;
|
|
1873
1866
|
const e = t.trim();
|
|
1874
1867
|
if (e.length !== 0)
|
|
1875
|
-
return
|
|
1868
|
+
return ya.test(e) ? e : void 0;
|
|
1876
1869
|
}
|
|
1877
|
-
function
|
|
1870
|
+
function Mn(t) {
|
|
1878
1871
|
const {
|
|
1879
1872
|
data: e,
|
|
1880
1873
|
srcField: a,
|
|
1881
1874
|
altField: n,
|
|
1882
1875
|
fallbackField: r,
|
|
1883
1876
|
size: o = "md",
|
|
1884
|
-
shape:
|
|
1877
|
+
shape: i = "rounded"
|
|
1885
1878
|
} = t;
|
|
1886
1879
|
if (!e) return null;
|
|
1887
|
-
const u = ue(e, a), d =
|
|
1880
|
+
const u = ue(e, a), d = Ta(u), c = n ? ue(e, n) ?? "" : "", l = r ? ue(e, r) : void 0;
|
|
1888
1881
|
return d ? /* @__PURE__ */ s(
|
|
1889
1882
|
"img",
|
|
1890
1883
|
{
|
|
@@ -1892,20 +1885,20 @@ function zn(t) {
|
|
|
1892
1885
|
alt: c,
|
|
1893
1886
|
loading: "lazy",
|
|
1894
1887
|
decoding: "async",
|
|
1895
|
-
className: ["ds:object-cover",
|
|
1888
|
+
className: ["ds:object-cover", ha[o], va[i]].join(
|
|
1896
1889
|
" "
|
|
1897
1890
|
)
|
|
1898
1891
|
}
|
|
1899
|
-
) :
|
|
1892
|
+
) : l ? /* @__PURE__ */ s(Pe, { name: l, size: o }) : null;
|
|
1900
1893
|
}
|
|
1901
|
-
function
|
|
1902
|
-
const { value: e, maxVisible: a = 3 } = t, { t: n } =
|
|
1894
|
+
function jn(t) {
|
|
1895
|
+
const { value: e, maxVisible: a = 3 } = t, { t: n } = R();
|
|
1903
1896
|
if (!Array.isArray(e) || e.length === 0) return null;
|
|
1904
1897
|
const r = e.slice(0, a), o = e.length - a;
|
|
1905
|
-
return /* @__PURE__ */
|
|
1906
|
-
r.map((
|
|
1898
|
+
return /* @__PURE__ */ I("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1899
|
+
r.map((i) => /* @__PURE__ */ s(J, { label: i, size: "sm" }, i)),
|
|
1907
1900
|
o > 0 && /* @__PURE__ */ s(Lt, { label: e.slice(a).join(", "), children: /* @__PURE__ */ s(
|
|
1908
|
-
|
|
1901
|
+
J,
|
|
1909
1902
|
{
|
|
1910
1903
|
label: n("inputs.multiSelect.overflow", { count: o }),
|
|
1911
1904
|
size: "sm",
|
|
@@ -1915,7 +1908,36 @@ function An(t) {
|
|
|
1915
1908
|
) })
|
|
1916
1909
|
] });
|
|
1917
1910
|
}
|
|
1918
|
-
|
|
1911
|
+
function Ca() {
|
|
1912
|
+
return /* @__PURE__ */ s(
|
|
1913
|
+
"svg",
|
|
1914
|
+
{
|
|
1915
|
+
viewBox: "0 0 24 24",
|
|
1916
|
+
fill: "none",
|
|
1917
|
+
stroke: "currentColor",
|
|
1918
|
+
strokeWidth: 1.75,
|
|
1919
|
+
strokeLinecap: "round",
|
|
1920
|
+
strokeLinejoin: "round",
|
|
1921
|
+
"aria-hidden": "true",
|
|
1922
|
+
className: "ds:size-3.5",
|
|
1923
|
+
children: /* @__PURE__ */ s("path", { d: "M12 5.5c-1.074 -1.426 -2.45 -2.2 -4 -2c-2.5 .323 -3.7 2.5 -3.5 5c.1 1.5 .5 3 .5 4.5c0 1.5 .5 3.5 1 5c.3 .9 .5 2 1.5 2s1.3 -1.5 1.5 -2.5c.2 -1 .5 -2 1.5 -2s1.3 1 1.5 2c.2 1 .5 2.5 1.5 2.5s1.2 -1.1 1.5 -2c.5 -1.5 1 -3.5 1 -5c0 -1.5 .4 -3 .5 -4.5c.2 -2.5 -1 -4.677 -3.5 -5c-1.55 -.2 -2.926 .574 -4 2z" })
|
|
1924
|
+
}
|
|
1925
|
+
);
|
|
1926
|
+
}
|
|
1927
|
+
function Ln(t) {
|
|
1928
|
+
const { value: e, maxInlineSize: a = "8rem" } = t;
|
|
1929
|
+
return !Array.isArray(e) || e.length === 0 ? null : /* @__PURE__ */ s(
|
|
1930
|
+
J,
|
|
1931
|
+
{
|
|
1932
|
+
label: e.join(", "),
|
|
1933
|
+
size: "sm",
|
|
1934
|
+
fill: "outline",
|
|
1935
|
+
leading: /* @__PURE__ */ s(Ca, {}),
|
|
1936
|
+
maxInlineSize: a
|
|
1937
|
+
}
|
|
1938
|
+
);
|
|
1939
|
+
}
|
|
1940
|
+
const xa = {
|
|
1919
1941
|
date: { year: "numeric", month: "short", day: "numeric" },
|
|
1920
1942
|
time: { hour: "2-digit", minute: "2-digit" },
|
|
1921
1943
|
datetime: {
|
|
@@ -1926,80 +1948,106 @@ const Ta = {
|
|
|
1926
1948
|
minute: "2-digit"
|
|
1927
1949
|
}
|
|
1928
1950
|
};
|
|
1929
|
-
function
|
|
1951
|
+
function qn(t) {
|
|
1930
1952
|
const { value: e, format: a = "date", options: n } = t;
|
|
1931
|
-
return e == null || e === "" ? null : a === "relative" && !n ? /* @__PURE__ */ s(
|
|
1932
|
-
|
|
1953
|
+
return e == null || e === "" ? null : a === "relative" && !n ? /* @__PURE__ */ s(ve, { value: e, shape: "bare" }) : /* @__PURE__ */ s(
|
|
1954
|
+
ve,
|
|
1933
1955
|
{
|
|
1934
1956
|
value: e,
|
|
1935
1957
|
format: "absolute",
|
|
1936
1958
|
shape: "bare",
|
|
1937
|
-
absoluteFormat: n ??
|
|
1959
|
+
absoluteFormat: n ?? xa[a === "relative" ? "date" : a]
|
|
1938
1960
|
}
|
|
1939
1961
|
);
|
|
1940
1962
|
}
|
|
1941
|
-
function
|
|
1963
|
+
function Na(t) {
|
|
1942
1964
|
if (t == null || t === "") return null;
|
|
1943
1965
|
const e = typeof t == "number" ? t : Number(t);
|
|
1944
1966
|
return Number.isFinite(e) ? e : null;
|
|
1945
1967
|
}
|
|
1946
|
-
function
|
|
1968
|
+
function $n(t) {
|
|
1947
1969
|
const {
|
|
1948
1970
|
value: e,
|
|
1949
1971
|
currency: a = "EUR",
|
|
1950
1972
|
colorNegative: n,
|
|
1951
1973
|
strikethrough: r,
|
|
1952
1974
|
options: o
|
|
1953
|
-
} = t, { i18n:
|
|
1975
|
+
} = t, { i18n: i } = R(), u = Na(e);
|
|
1954
1976
|
if (u === null) return null;
|
|
1955
|
-
const d =
|
|
1977
|
+
const d = i.language || "en", c = new Intl.NumberFormat(d, {
|
|
1956
1978
|
style: "currency",
|
|
1957
1979
|
currency: a,
|
|
1958
1980
|
...o
|
|
1959
|
-
}).format(u),
|
|
1960
|
-
return n && u < 0 &&
|
|
1981
|
+
}).format(u), l = ["ds:tabular-nums"];
|
|
1982
|
+
return n && u < 0 && l.push("ds:text-[color:var(--destructive)]"), r && l.push("line-through"), /* @__PURE__ */ s("span", { className: l.join(" "), children: c });
|
|
1961
1983
|
}
|
|
1962
|
-
function
|
|
1963
|
-
if (!
|
|
1984
|
+
function Ce(t) {
|
|
1985
|
+
if (!Fe(t)) return t;
|
|
1964
1986
|
const e = t, a = e.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} size-4`.trim();
|
|
1965
|
-
return
|
|
1987
|
+
return Re(e, { className: n, size: e.props.size ?? 16 });
|
|
1966
1988
|
}
|
|
1967
|
-
function
|
|
1989
|
+
function fe(t, e) {
|
|
1968
1990
|
return typeof t == "function" ? t(e) : !!t;
|
|
1969
1991
|
}
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1992
|
+
const Sa = "ds:text-[color:var(--destructive)] ds:hover:text-[color:var(--destructive-hover)]";
|
|
1993
|
+
function _n(t) {
|
|
1994
|
+
const { data: e, actions: a, intent: n = "ghost", group: r, label: o, collapsed: i } = t;
|
|
1995
|
+
if (!e) return null;
|
|
1996
|
+
const u = a.filter((l) => !fe(l.hidden, e));
|
|
1997
|
+
if (typeof i == "function" ? i() : !!i)
|
|
1998
|
+
return /* @__PURE__ */ I(B.Root, { children: [
|
|
1999
|
+
/* @__PURE__ */ s(B.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
2000
|
+
G,
|
|
2001
|
+
{
|
|
2002
|
+
size: "sm",
|
|
2003
|
+
intent: n,
|
|
2004
|
+
icon: /* @__PURE__ */ s($t, { "aria-hidden": !0 }),
|
|
2005
|
+
"aria-label": o ?? "Actions"
|
|
2006
|
+
}
|
|
2007
|
+
) }),
|
|
2008
|
+
/* @__PURE__ */ s(B.Content, { align: "end", children: u.map((l, f) => /* @__PURE__ */ s(
|
|
2009
|
+
B.Item,
|
|
2010
|
+
{
|
|
2011
|
+
startIcon: Ce(l.icon),
|
|
2012
|
+
disabled: fe(l.disabled, e),
|
|
2013
|
+
onSelect: () => l.onClick(e),
|
|
2014
|
+
className: l.variant === "destructive" ? "ds:text-[color:var(--destructive)]" : void 0,
|
|
2015
|
+
children: l.label
|
|
2016
|
+
},
|
|
2017
|
+
f
|
|
2018
|
+
)) })
|
|
2019
|
+
] });
|
|
2020
|
+
const c = u.map((l, f) => {
|
|
2021
|
+
const y = fe(l.disabled, e), b = y && l.disabledReason ? l.disabledReason : l.label;
|
|
1975
2022
|
return /* @__PURE__ */ s(
|
|
1976
|
-
|
|
2023
|
+
G,
|
|
1977
2024
|
{
|
|
1978
2025
|
size: "sm",
|
|
1979
|
-
intent:
|
|
1980
|
-
icon:
|
|
1981
|
-
tooltip:
|
|
1982
|
-
"aria-label":
|
|
1983
|
-
disabled:
|
|
1984
|
-
onClick: (
|
|
1985
|
-
|
|
2026
|
+
intent: n,
|
|
2027
|
+
icon: Ce(l.icon),
|
|
2028
|
+
tooltip: b,
|
|
2029
|
+
"aria-label": l.label,
|
|
2030
|
+
disabled: y,
|
|
2031
|
+
onClick: (x) => {
|
|
2032
|
+
x.stopPropagation(), l.onClick(e);
|
|
1986
2033
|
},
|
|
1987
|
-
className:
|
|
2034
|
+
className: l.variant === "destructive" ? Sa : void 0
|
|
1988
2035
|
},
|
|
1989
|
-
|
|
2036
|
+
f
|
|
1990
2037
|
);
|
|
1991
|
-
})
|
|
2038
|
+
});
|
|
2039
|
+
return r ? /* @__PURE__ */ s(qt, { "aria-label": o ?? "Actions", size: "sm", children: c }) : /* @__PURE__ */ s("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: c });
|
|
1992
2040
|
}
|
|
1993
|
-
function
|
|
2041
|
+
function xe(t, e) {
|
|
1994
2042
|
return typeof t == "function" ? t(e) : t;
|
|
1995
2043
|
}
|
|
1996
|
-
function
|
|
2044
|
+
function wa(t) {
|
|
1997
2045
|
return /^(https?:\/\/|\/|#|mailto:|tel:)/i.test(t) ? t : "#";
|
|
1998
2046
|
}
|
|
1999
|
-
function
|
|
2047
|
+
function Bn(t) {
|
|
2000
2048
|
const { value: e, data: a, href: n, onClick: r, secondary: o } = t;
|
|
2001
2049
|
if (!a) return null;
|
|
2002
|
-
const
|
|
2050
|
+
const i = xe(n, a), u = xe(o, a), d = e == null || e === "" ? "" : String(e), c = [
|
|
2003
2051
|
"ds:text-[color:var(--primary)]",
|
|
2004
2052
|
"ds:hover:underline",
|
|
2005
2053
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
@@ -2007,15 +2055,15 @@ function Ln(t) {
|
|
|
2007
2055
|
"ds:focus-visible:outline-[color:var(--ring)]",
|
|
2008
2056
|
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
2009
2057
|
"ds:rounded-[var(--radius-sm)]"
|
|
2010
|
-
].join(" "),
|
|
2011
|
-
r && (
|
|
2058
|
+
].join(" "), l = (f) => {
|
|
2059
|
+
r && (i || f.preventDefault(), f.stopPropagation(), r(a));
|
|
2012
2060
|
};
|
|
2013
|
-
return /* @__PURE__ */
|
|
2014
|
-
|
|
2061
|
+
return /* @__PURE__ */ I("span", { className: "ds:flex ds:flex-col ds:leading-tight", children: [
|
|
2062
|
+
i ? /* @__PURE__ */ s(
|
|
2015
2063
|
"a",
|
|
2016
2064
|
{
|
|
2017
|
-
href:
|
|
2018
|
-
onClick:
|
|
2065
|
+
href: wa(i),
|
|
2066
|
+
onClick: l,
|
|
2019
2067
|
className: c,
|
|
2020
2068
|
children: d
|
|
2021
2069
|
}
|
|
@@ -2023,7 +2071,7 @@ function Ln(t) {
|
|
|
2023
2071
|
"button",
|
|
2024
2072
|
{
|
|
2025
2073
|
type: "button",
|
|
2026
|
-
onClick:
|
|
2074
|
+
onClick: l,
|
|
2027
2075
|
className: [
|
|
2028
2076
|
"ds:appearance-none ds:bg-transparent ds:p-0 ds:text-start",
|
|
2029
2077
|
c
|
|
@@ -2034,31 +2082,31 @@ function Ln(t) {
|
|
|
2034
2082
|
u ? /* @__PURE__ */ s("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: u }) : null
|
|
2035
2083
|
] });
|
|
2036
2084
|
}
|
|
2037
|
-
function
|
|
2085
|
+
function Gn(t) {
|
|
2038
2086
|
const {
|
|
2039
2087
|
value: e,
|
|
2040
2088
|
data: a,
|
|
2041
2089
|
onToggle: n,
|
|
2042
2090
|
onError: r,
|
|
2043
2091
|
trueIcon: o,
|
|
2044
|
-
falseIcon:
|
|
2092
|
+
falseIcon: i,
|
|
2045
2093
|
trueClass: u = "ds:text-[color:var(--success)]",
|
|
2046
2094
|
falseClass: d = "ds:text-[color:var(--muted-foreground)]",
|
|
2047
2095
|
label: c
|
|
2048
|
-
} = t, { t:
|
|
2096
|
+
} = t, { t: l } = R(), [f, y] = D(!1);
|
|
2049
2097
|
if (!a) return null;
|
|
2050
|
-
const
|
|
2051
|
-
async function
|
|
2052
|
-
if (
|
|
2053
|
-
const
|
|
2054
|
-
if (
|
|
2055
|
-
|
|
2098
|
+
const b = !!e, x = b ? o ?? /* @__PURE__ */ s(_t, { "aria-hidden": !0, className: "ds:size-4" }) : i ?? /* @__PURE__ */ s(Bt, { "aria-hidden": !0, className: "ds:size-4" }), T = b ? u : d, h = c ?? l(b ? "inputs.switch.on" : "inputs.switch.off");
|
|
2099
|
+
async function p(g) {
|
|
2100
|
+
if (g.stopPropagation(), f || !a) return;
|
|
2101
|
+
const v = n(a, !b);
|
|
2102
|
+
if (v && typeof v.then == "function") {
|
|
2103
|
+
y(!0);
|
|
2056
2104
|
try {
|
|
2057
|
-
await
|
|
2105
|
+
await v;
|
|
2058
2106
|
} catch (S) {
|
|
2059
2107
|
r == null || r(a, S);
|
|
2060
2108
|
} finally {
|
|
2061
|
-
|
|
2109
|
+
y(!1);
|
|
2062
2110
|
}
|
|
2063
2111
|
}
|
|
2064
2112
|
}
|
|
@@ -2067,11 +2115,11 @@ function jn(t) {
|
|
|
2067
2115
|
{
|
|
2068
2116
|
type: "button",
|
|
2069
2117
|
role: "switch",
|
|
2070
|
-
"aria-checked":
|
|
2071
|
-
"aria-busy":
|
|
2072
|
-
"aria-label":
|
|
2073
|
-
disabled:
|
|
2074
|
-
onClick:
|
|
2118
|
+
"aria-checked": b,
|
|
2119
|
+
"aria-busy": f,
|
|
2120
|
+
"aria-label": h,
|
|
2121
|
+
disabled: f,
|
|
2122
|
+
onClick: p,
|
|
2075
2123
|
className: [
|
|
2076
2124
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
2077
2125
|
"ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
|
|
@@ -2082,35 +2130,35 @@ function jn(t) {
|
|
|
2082
2130
|
"ds:focus-visible:outline-[color:var(--ring)]",
|
|
2083
2131
|
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
2084
2132
|
"ds:disabled:opacity-50",
|
|
2085
|
-
|
|
2133
|
+
T
|
|
2086
2134
|
].join(" "),
|
|
2087
|
-
children:
|
|
2135
|
+
children: x
|
|
2088
2136
|
}
|
|
2089
2137
|
);
|
|
2090
2138
|
}
|
|
2091
|
-
const
|
|
2139
|
+
const Fa = {
|
|
2092
2140
|
sm: "ds:size-[var(--icon-size-sm)]",
|
|
2093
2141
|
md: "ds:size-[var(--icon-size-md)]",
|
|
2094
2142
|
lg: "ds:size-[var(--icon-size-lg)]"
|
|
2095
2143
|
};
|
|
2096
|
-
function
|
|
2144
|
+
function Ne(t, e) {
|
|
2097
2145
|
if (!t || typeof t != "object") return;
|
|
2098
2146
|
const a = t[e];
|
|
2099
2147
|
return typeof a == "string" ? a : void 0;
|
|
2100
2148
|
}
|
|
2101
|
-
const
|
|
2102
|
-
function
|
|
2149
|
+
const Ra = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i, Da = /^rgba?\(\s*[\d.\s,%/]+\)$/i, ka = /^hsla?\(\s*[\d.\s,%/]+\)$/i, Ia = /^var\(--[a-z0-9-]+(?:,\s*[^)]+)?\)$/i;
|
|
2150
|
+
function Ea(t) {
|
|
2103
2151
|
if (!t) return;
|
|
2104
2152
|
const e = t.trim();
|
|
2105
|
-
if (
|
|
2153
|
+
if (Ra.test(e) || Da.test(e) || ka.test(e) || Ia.test(e))
|
|
2106
2154
|
return e;
|
|
2107
2155
|
}
|
|
2108
|
-
function
|
|
2109
|
-
const { data: e, colorField: a, size: n = "md", labelField: r } = t, o =
|
|
2110
|
-
return
|
|
2156
|
+
function Vn(t) {
|
|
2157
|
+
const { data: e, colorField: a, size: n = "md", labelField: r } = t, o = Z(null), i = e ? Ne(e, a) : void 0, u = Ea(i), d = e && r ? Ne(e, r) : void 0;
|
|
2158
|
+
return Gt(() => {
|
|
2111
2159
|
const c = o.current;
|
|
2112
2160
|
c && (u ? c.style.setProperty("--data-table-dot-color", u) : c.style.removeProperty("--data-table-dot-color"));
|
|
2113
|
-
}, [u]), u ? /* @__PURE__ */
|
|
2161
|
+
}, [u]), u ? /* @__PURE__ */ I("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
2114
2162
|
/* @__PURE__ */ s(
|
|
2115
2163
|
"span",
|
|
2116
2164
|
{
|
|
@@ -2120,45 +2168,45 @@ function _n(t) {
|
|
|
2120
2168
|
"ds:inline-block ds:shrink-0 ds:rounded-[var(--radius-full)]",
|
|
2121
2169
|
"ds:bg-[var(--data-table-dot-color)]",
|
|
2122
2170
|
"ds:border ds:border-[color:var(--border)]",
|
|
2123
|
-
|
|
2171
|
+
Fa[n]
|
|
2124
2172
|
].join(" ")
|
|
2125
2173
|
}
|
|
2126
2174
|
),
|
|
2127
2175
|
d ? /* @__PURE__ */ s("span", { children: d }) : null
|
|
2128
2176
|
] }) : null;
|
|
2129
2177
|
}
|
|
2130
|
-
function
|
|
2178
|
+
function za(t, e) {
|
|
2131
2179
|
if (!t || typeof t != "object") return null;
|
|
2132
2180
|
const a = t[e], n = typeof a == "number" ? a : Number(a);
|
|
2133
2181
|
return Number.isFinite(n) ? n : null;
|
|
2134
2182
|
}
|
|
2135
|
-
function
|
|
2136
|
-
const { data: e, lines: a, currency: n = "EUR", highlightNegative: r } = t, { i18n: o } =
|
|
2183
|
+
function Un(t) {
|
|
2184
|
+
const { data: e, lines: a, currency: n = "EUR", highlightNegative: r } = t, { i18n: o } = R();
|
|
2137
2185
|
if (!e) return null;
|
|
2138
|
-
const
|
|
2139
|
-
const
|
|
2140
|
-
if (
|
|
2141
|
-
let
|
|
2186
|
+
const i = o.language || "en", u = (c) => {
|
|
2187
|
+
const l = za(e, c.valueField);
|
|
2188
|
+
if (l === null) return null;
|
|
2189
|
+
let f;
|
|
2142
2190
|
switch (c.format ?? "number") {
|
|
2143
2191
|
case "currency":
|
|
2144
|
-
|
|
2192
|
+
f = new Intl.NumberFormat(i, {
|
|
2145
2193
|
style: "currency",
|
|
2146
2194
|
currency: n
|
|
2147
|
-
}).format(
|
|
2195
|
+
}).format(l);
|
|
2148
2196
|
break;
|
|
2149
2197
|
case "percent":
|
|
2150
|
-
|
|
2198
|
+
f = new Intl.NumberFormat(i, {
|
|
2151
2199
|
style: "percent",
|
|
2152
2200
|
maximumFractionDigits: 1
|
|
2153
|
-
}).format(
|
|
2201
|
+
}).format(l / 100);
|
|
2154
2202
|
break;
|
|
2155
2203
|
default:
|
|
2156
|
-
|
|
2204
|
+
f = new Intl.NumberFormat(i).format(l);
|
|
2157
2205
|
}
|
|
2158
2206
|
return {
|
|
2159
2207
|
label: c.label,
|
|
2160
|
-
formatted:
|
|
2161
|
-
negative: !!r &&
|
|
2208
|
+
formatted: f,
|
|
2209
|
+
negative: !!r && l < 0
|
|
2162
2210
|
};
|
|
2163
2211
|
}, d = a.map(u).filter(
|
|
2164
2212
|
(c) => c !== null
|
|
@@ -2175,12 +2223,12 @@ function qn(t) {
|
|
|
2175
2223
|
"type-meta",
|
|
2176
2224
|
"ds:leading-tight"
|
|
2177
2225
|
].join(" "),
|
|
2178
|
-
children: d.map((c,
|
|
2226
|
+
children: d.map((c, l) => /* @__PURE__ */ I(
|
|
2179
2227
|
"span",
|
|
2180
2228
|
{
|
|
2181
2229
|
className: "ds:inline-flex ds:items-baseline ds:gap-x-[var(--spacing-xs)]",
|
|
2182
2230
|
children: [
|
|
2183
|
-
|
|
2231
|
+
l > 0 ? /* @__PURE__ */ s(
|
|
2184
2232
|
"span",
|
|
2185
2233
|
{
|
|
2186
2234
|
"aria-hidden": "true",
|
|
@@ -2202,19 +2250,19 @@ function qn(t) {
|
|
|
2202
2250
|
)
|
|
2203
2251
|
]
|
|
2204
2252
|
},
|
|
2205
|
-
`${c.label}-${
|
|
2253
|
+
`${c.label}-${l}`
|
|
2206
2254
|
))
|
|
2207
2255
|
}
|
|
2208
2256
|
);
|
|
2209
2257
|
}
|
|
2210
|
-
function
|
|
2211
|
-
var c,
|
|
2212
|
-
const { initialValue: e, onValueChange: a, stopEditing: n, column: r } = t, [o,
|
|
2258
|
+
function Kn(t) {
|
|
2259
|
+
var c, l;
|
|
2260
|
+
const { initialValue: e, onValueChange: a, stopEditing: n, column: r } = t, [o, i] = D(e ?? ""), u = Z(null);
|
|
2213
2261
|
P(() => {
|
|
2214
|
-
const
|
|
2215
|
-
|
|
2262
|
+
const f = u.current;
|
|
2263
|
+
f && (f.focus(), f.select());
|
|
2216
2264
|
}, []);
|
|
2217
|
-
const d = ((
|
|
2265
|
+
const d = ((l = (c = r == null ? void 0 : r.getColDef) == null ? void 0 : c.call(r)) == null ? void 0 : l.headerName) ?? void 0;
|
|
2218
2266
|
return /* @__PURE__ */ s(
|
|
2219
2267
|
"input",
|
|
2220
2268
|
{
|
|
@@ -2222,58 +2270,58 @@ function $n(t) {
|
|
|
2222
2270
|
type: "text",
|
|
2223
2271
|
value: o,
|
|
2224
2272
|
"aria-label": d,
|
|
2225
|
-
onChange: (
|
|
2226
|
-
const
|
|
2227
|
-
|
|
2273
|
+
onChange: (f) => {
|
|
2274
|
+
const y = f.target.value;
|
|
2275
|
+
i(y), a(y);
|
|
2228
2276
|
},
|
|
2229
|
-
onKeyDown: (
|
|
2230
|
-
|
|
2277
|
+
onKeyDown: (f) => {
|
|
2278
|
+
f.key === "Enter" && (f.preventDefault(), n());
|
|
2231
2279
|
},
|
|
2232
2280
|
className: [
|
|
2233
2281
|
"ds:block ds:w-full ds:appearance-none",
|
|
2234
2282
|
// Input surface chrome: rounded border + bg + focus halo.
|
|
2235
|
-
|
|
2283
|
+
Oe,
|
|
2236
2284
|
// Use the `md` height (`--min-target-size`) so the input
|
|
2237
2285
|
// auto-lifts to 48px under `.theme-accessible` to satisfy
|
|
2238
2286
|
// WCAG 2.5.5 target size.
|
|
2239
|
-
|
|
2240
|
-
|
|
2287
|
+
Me.md,
|
|
2288
|
+
je.sm,
|
|
2241
2289
|
Le.sm
|
|
2242
2290
|
].join(" ")
|
|
2243
2291
|
}
|
|
2244
2292
|
);
|
|
2245
2293
|
}
|
|
2246
|
-
function
|
|
2247
|
-
var
|
|
2294
|
+
function Wn(t) {
|
|
2295
|
+
var T, h;
|
|
2248
2296
|
const {
|
|
2249
2297
|
initialValue: e,
|
|
2250
2298
|
onValueChange: a,
|
|
2251
2299
|
stopEditing: n,
|
|
2252
2300
|
column: r,
|
|
2253
2301
|
decimals: o = 2,
|
|
2254
|
-
min:
|
|
2302
|
+
min: i,
|
|
2255
2303
|
max: u
|
|
2256
|
-
} = t, { i18n: d } =
|
|
2304
|
+
} = t, { i18n: d } = R(), c = Z(null), l = ((h = (T = r == null ? void 0 : r.getColDef) == null ? void 0 : T.call(r)) == null ? void 0 : h.headerName) ?? void 0, [f, y] = D(() => e == null || Number.isNaN(e) ? "" : String(e));
|
|
2257
2305
|
P(() => {
|
|
2258
|
-
const
|
|
2259
|
-
|
|
2306
|
+
const p = c.current;
|
|
2307
|
+
p && (p.focus(), p.select());
|
|
2260
2308
|
}, []);
|
|
2261
|
-
function
|
|
2262
|
-
var
|
|
2263
|
-
if (
|
|
2264
|
-
const
|
|
2265
|
-
return Number.isFinite(
|
|
2309
|
+
function b(p) {
|
|
2310
|
+
var q, F;
|
|
2311
|
+
if (p.trim().length === 0) return null;
|
|
2312
|
+
const g = d.language || "en", m = new Intl.NumberFormat(g).formatToParts(12345.6), v = ((q = m.find((V) => V.type === "group")) == null ? void 0 : q.value) ?? "", S = ((F = m.find((V) => V.type === "decimal")) == null ? void 0 : F.value) ?? ".", E = p.replace(new RegExp(`\\${v}`, "g"), "").replace(S, ".").replace(/[^\d.-]/g, ""), k = Number(E);
|
|
2313
|
+
return Number.isFinite(k) ? k : null;
|
|
2266
2314
|
}
|
|
2267
|
-
function
|
|
2268
|
-
const
|
|
2269
|
-
if (
|
|
2315
|
+
function x(p) {
|
|
2316
|
+
const g = b(p);
|
|
2317
|
+
if (g == null) {
|
|
2270
2318
|
a(null);
|
|
2271
2319
|
return;
|
|
2272
2320
|
}
|
|
2273
|
-
let
|
|
2274
|
-
typeof
|
|
2275
|
-
const
|
|
2276
|
-
a(Math.round(
|
|
2321
|
+
let m = g;
|
|
2322
|
+
typeof i == "number" && (m = Math.max(i, m)), typeof u == "number" && (m = Math.min(u, m));
|
|
2323
|
+
const v = 10 ** o;
|
|
2324
|
+
a(Math.round(m * v) / v);
|
|
2277
2325
|
}
|
|
2278
2326
|
return /* @__PURE__ */ s(
|
|
2279
2327
|
"input",
|
|
@@ -2281,55 +2329,56 @@ function Gn(t) {
|
|
|
2281
2329
|
ref: c,
|
|
2282
2330
|
type: "text",
|
|
2283
2331
|
inputMode: "decimal",
|
|
2284
|
-
value:
|
|
2285
|
-
"aria-label":
|
|
2286
|
-
onChange: (
|
|
2287
|
-
const
|
|
2288
|
-
|
|
2332
|
+
value: f,
|
|
2333
|
+
"aria-label": l,
|
|
2334
|
+
onChange: (p) => {
|
|
2335
|
+
const g = p.target.value;
|
|
2336
|
+
y(g), x(g);
|
|
2289
2337
|
},
|
|
2290
|
-
onKeyDown: (
|
|
2291
|
-
|
|
2338
|
+
onKeyDown: (p) => {
|
|
2339
|
+
p.key === "Enter" && (p.preventDefault(), n());
|
|
2292
2340
|
},
|
|
2293
2341
|
className: [
|
|
2294
2342
|
"ds:block ds:w-full ds:appearance-none ds:text-end ds:tabular-nums",
|
|
2295
|
-
|
|
2343
|
+
Oe,
|
|
2296
2344
|
// Use `md` height — see editable-text-cell-renderer for rationale.
|
|
2297
|
-
|
|
2298
|
-
|
|
2345
|
+
Me.md,
|
|
2346
|
+
je.sm,
|
|
2299
2347
|
Le.sm
|
|
2300
2348
|
].join(" ")
|
|
2301
2349
|
}
|
|
2302
2350
|
);
|
|
2303
2351
|
}
|
|
2304
2352
|
export {
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2353
|
+
_n as A,
|
|
2354
|
+
Un as B,
|
|
2355
|
+
Vn as C,
|
|
2356
|
+
Sn as D,
|
|
2357
|
+
Wn as E,
|
|
2358
|
+
Mn as I,
|
|
2359
|
+
Bn as L,
|
|
2360
|
+
zn as N,
|
|
2361
|
+
Dn as S,
|
|
2362
|
+
jn as T,
|
|
2363
|
+
On as U,
|
|
2364
|
+
$n as a,
|
|
2365
|
+
qn as b,
|
|
2366
|
+
Fn as c,
|
|
2367
|
+
Rn as d,
|
|
2368
|
+
Kn as e,
|
|
2369
|
+
An as f,
|
|
2370
|
+
kn as g,
|
|
2371
|
+
Pn as h,
|
|
2372
|
+
ra as i,
|
|
2373
|
+
sa as j,
|
|
2374
|
+
Gn as k,
|
|
2375
|
+
ae as l,
|
|
2376
|
+
Ut as m,
|
|
2377
|
+
Ln as n,
|
|
2378
|
+
In as o,
|
|
2379
|
+
En as p,
|
|
2380
|
+
la as q,
|
|
2381
|
+
Ve as r,
|
|
2382
|
+
wn as u
|
|
2334
2383
|
};
|
|
2335
|
-
//# sourceMappingURL=editable-currency-cell-renderer-
|
|
2384
|
+
//# sourceMappingURL=editable-currency-cell-renderer-BVJ04DkB.js.map
|