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