@alfadocs/ui-kit 0.66.0 → 0.67.0

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