@alfadocs/ui-kit 1.115.0 → 1.116.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 (268) hide show
  1. package/dist/_chunks/accessible-target-Bs9ELM3l.js +6 -0
  2. package/dist/_chunks/{actions-cell-renderer-bI27uXXC.js → actions-cell-renderer-DzHxDyI7.js} +3 -3
  3. package/dist/_chunks/{address-fields-D5Ije0S2.js → address-fields-BFVCtfP2.js} +3 -3
  4. package/dist/_chunks/{anamnesis-summary-rows-BZ36ULQk.js → anamnesis-summary-rows-gEXqU5i5.js} +6 -6
  5. package/dist/_chunks/{appointment-card-D_-aBrx5.js → appointment-card-BMZoXaGx.js} +3 -3
  6. package/dist/_chunks/{appointment-peek-DWfcpoGy.js → appointment-peek-B1CCv-7J.js} +2 -2
  7. package/dist/_chunks/{appointment-timeline-DxLu3afn.js → appointment-timeline-0k4LxODn.js} +3 -3
  8. package/dist/_chunks/{appointment-tray-BhXOJpIJ.js → appointment-tray-DIxpgIXM.js} +2 -2
  9. package/dist/_chunks/arrow-down-left-DECv-dJt.js +15 -0
  10. package/dist/_chunks/{balance-badge-cell-CXHihM22.js → balance-badge-cell-L7bD0Nsh.js} +6 -6
  11. package/dist/_chunks/bill-line-table-WEIRDcv6.js +1563 -0
  12. package/dist/_chunks/{bmi-calculator-Ba4yoR31.js → bmi-calculator-BjUfXqcY.js} +2 -2
  13. package/dist/_chunks/{button-group-CUnNnt8a.js → button-group-BvU9vRnX.js} +2 -2
  14. package/dist/_chunks/{calculator-dialog-D4TyJwqy.js → calculator-dialog-BGX5XQCM.js} +2 -2
  15. package/dist/_chunks/{calendar-appointment-editor-dialog-BVzFi4hH.js → calendar-appointment-editor-dialog-DqZMb4yd.js} +16 -16
  16. package/dist/_chunks/{care-plan-card-BA3MfdfZ.js → care-plan-card-CfV8jiF0.js} +3 -3
  17. package/dist/_chunks/{care-plan-entry-card-CUtFZ813.js → care-plan-entry-card-Bt01kyTl.js} +3 -3
  18. package/dist/_chunks/{chart-DebrFZ6L.js → chart-BSx8cfMm.js} +2 -2
  19. package/dist/_chunks/circle-off-DuT9pVy2.js +16 -0
  20. package/dist/_chunks/combobox-BBCVQS-S.js +935 -0
  21. package/dist/_chunks/{compact-editor-fields-cP6yh7xv.js → compact-editor-fields-6sTWRLtf.js} +3 -3
  22. package/dist/_chunks/{contact-profile-card-DMXWBBkU.js → contact-profile-card-BRCHbQ3-.js} +2 -2
  23. package/dist/_chunks/{country-select-CUuGOAoZ.js → country-select-C2GdvRtS.js} +2 -2
  24. package/dist/_chunks/{cycle-calculator-C68V9rdH.js → cycle-calculator-Brd0PP4U.js} +2 -2
  25. package/dist/_chunks/{dashboard-grid-DrOkTtya.js → dashboard-grid-3aidD-IQ.js} +2 -2
  26. package/dist/_chunks/{toolbar-Bc3pjfG5.js → data-grid-ByhrYGVw.js} +3013 -3106
  27. package/dist/_chunks/{data-grid-tabs-CsLbIv0h.js → data-grid-tabs-D9Y4DeeH.js} +2 -2
  28. package/dist/_chunks/{data-table-DXaE2Ret.js → data-table-B47iw2CO.js} +101 -100
  29. package/dist/_chunks/{date-range-panel-CBFfkgmz.js → date-range-panel-B-DUtfw3.js} +7 -7
  30. package/dist/_chunks/default-tabs-BQcSqcNG.js +2250 -0
  31. package/dist/_chunks/dialog-CIUn5oLb.js +348 -0
  32. package/dist/_chunks/{document-preview-WvJKHJOP.js → document-preview-B_JGHsEW.js} +2 -2
  33. package/dist/_chunks/{dropdown-menu-CqxBthww.js → dropdown-menu-Dmbak7q6.js} +320 -248
  34. package/dist/_chunks/{due-date-calculator-C1UA5jpS.js → due-date-calculator-DzIQXEX5.js} +2 -2
  35. package/dist/_chunks/{editable-currency-cell-renderer-CtlMhLai.js → editable-currency-cell-renderer-p-Q1UkZS.js} +2 -2
  36. package/dist/_chunks/export-files-BByoK9Cg.js +248 -0
  37. package/dist/_chunks/{face-scheme-DkoxiDCh.js → face-scheme-CEjJUnNe.js} +19 -18
  38. package/dist/_chunks/{fetal-weight-DmZzMRzB.js → fetal-weight-CJTlfh_k.js} +2 -2
  39. package/dist/_chunks/{file-manager-DFFExyym.js → file-manager-DEe51ZDe.js} +5 -5
  40. package/dist/_chunks/format-price-CIX0YJZn.js +179 -0
  41. package/dist/_chunks/{grid-context-AwsLJRhH.js → grid-context-jn9y8tNE.js} +4 -4
  42. package/dist/_chunks/{hcg-doubling-CC-dbKE8.js → hcg-doubling-BUZQkSYC.js} +2 -2
  43. package/dist/_chunks/{header-settings-Df9q1uHt.js → header-settings-DNgvO8fS.js} +2 -2
  44. package/dist/_chunks/{heatmap-eXdtmEoU.js → heatmap-tn1WxoMT.js} +3 -3
  45. package/dist/_chunks/{help-me-write-templates-CWxgjDZl.js → help-me-write-templates-C28E_rOt.js} +2 -2
  46. package/dist/_chunks/highlighter-DSkckT2Q.js +15 -0
  47. package/dist/_chunks/{icon-button-group-C9mPK-bX.js → icon-button-group-Ca2VkXy5.js} +2 -2
  48. package/dist/_chunks/{kit-extensions-CzG0RmhQ.js → kit-extensions-BFfLg7c-.js} +6 -6
  49. package/dist/_chunks/{link-cell-renderer-Ditt5mvT.js → link-cell-renderer-D-Io828l.js} +4 -4
  50. package/dist/_chunks/{marketplace-app-shell-CcEHJgDd.js → marketplace-app-shell-CBHNg8x-.js} +4 -4
  51. package/dist/_chunks/money-OE6_oDPH.js +138 -0
  52. package/dist/_chunks/{muscle-scheme-BkmDUTmk.js → muscle-scheme-7UsRsCHP.js} +2 -2
  53. package/dist/_chunks/{notes-panel-BVYG_MJE.js → notes-panel-DexbfrFo.js} +3 -3
  54. package/dist/_chunks/number-input-DUSvP7Dq.js +625 -0
  55. package/dist/_chunks/{optical-prescription-CvbN8yD2.js → optical-prescription-Da_r8pMr.js} +2 -2
  56. package/dist/_chunks/parts-CtcTW1PN.js +869 -0
  57. package/dist/_chunks/{patient-details-DlT-vpSe.js → patient-details-PJ0Y__7t.js} +2 -2
  58. package/dist/_chunks/{patient-field-row-B54uzvu-.js → patient-field-row-0QP8KCVp.js} +5 -5
  59. package/dist/_chunks/{patient-search-DDRDCjZi.js → patient-search-Bdx_Ob3y.js} +2 -2
  60. package/dist/_chunks/{patient-summary-card-Dy9-CzON.js → patient-summary-card-BOfXDP8a.js} +3 -3
  61. package/dist/_chunks/{payment-request-card-BmV2pLoM.js → payment-request-card-_04afZEx.js} +14 -13
  62. package/dist/_chunks/{practice-results-BlxfBx-D.js → practice-results-CrBjScXX.js} +3 -3
  63. package/dist/_chunks/{pregnancy-dating-qZpw3zj8.js → pregnancy-dating-Bg_VUPwl.js} +2 -2
  64. package/dist/_chunks/{pregnancy-weight-gain-DQoOM8QV.js → pregnancy-weight-gain-B-eXFdmq.js} +2 -2
  65. package/dist/_chunks/{province-select-cVOlwEc5.js → province-select-CTM8A9SM.js} +2 -2
  66. package/dist/_chunks/{radiograph-panel.agent-C1LGeX-G.js → radiograph-panel.agent-9jwXlOXB.js} +2 -2
  67. package/dist/_chunks/{reserved.agent-6p3Hm4oH.js → reserved.agent-C1zRHaya.js} +4 -4
  68. package/dist/_chunks/{rich-text-editor-efaMWbYz.js → rich-text-editor-r80Zw8ll.js} +12 -11
  69. package/dist/_chunks/row-actions-Df7TJbNR.js +213 -0
  70. package/dist/_chunks/{signature-request-BnTihryS.js → signature-request-CgvjLic3.js} +3 -3
  71. package/dist/_chunks/{tab-bar-C_pggqVr.js → tab-bar-DTn8pHqH.js} +2 -2
  72. package/dist/_chunks/{tabs-CXYjr_8O.js → tabs-CsmgkiG6.js} +2 -2
  73. package/dist/_chunks/{task-editor-CSa6vQ9r.js → task-editor-DgUjtqpX.js} +168 -178
  74. package/dist/_chunks/{tasks-panel-CVjY1d7Q.js → tasks-panel-B5Nsf10r.js} +2 -2
  75. package/dist/_chunks/{theme-toggle-CObX2Ffa.js → theme-toggle-DfvdEg_V.js} +3 -3
  76. package/dist/_chunks/{token-insert-menu-Dl3x2ekR.js → token-insert-menu-BdcmK5Um.js} +2 -2
  77. package/dist/_chunks/toolbar-DbUQBrq4.js +159 -0
  78. package/dist/_chunks/{tooth-scheme-C-ALCHaV.js → tooth-scheme-LTkT4EXd.js} +2 -2
  79. package/dist/_chunks/{transaction-chip-CohY6sTA.js → transaction-chip-CkYd-3ky.js} +47 -57
  80. package/dist/_chunks/{treatment-receipt-BydbojdD.js → treatment-receipt-1VnuinhY.js} +2 -2
  81. package/dist/_chunks/undo-2-EBxWjj1W.js +15 -0
  82. package/dist/_chunks/{unit-converter-D77vmlzN.js → unit-converter-YKlHyUC2.js} +2 -2
  83. package/dist/_chunks/{use-appointment-details-read-BMAiQYo6.js → use-appointment-details-read-_r7cjTtm.js} +7 -7
  84. package/dist/_chunks/{verify-identity-types-C85EXNzy.js → verify-identity-types-D_LdByCp.js} +2 -2
  85. package/dist/_chunks/{widget-picker-U4JsEhQE.js → widget-picker-DrxJjEkv.js} +2 -2
  86. package/dist/_chunks/{workflow-map-B4XkcET0.js → workflow-map-D-u8_YSr.js} +2 -2
  87. package/dist/_chunks/{workflow-status-9wb7iWUd.js → workflow-status-fykpTxfb.js} +2 -2
  88. package/dist/_chunks/{workflow-webhook-action-DNSe65yd.js → workflow-webhook-action-DM3W8XZE.js} +2 -2
  89. package/dist/agent-catalog.json +1080 -1
  90. package/dist/agent-i18n/en.json +50 -0
  91. package/dist/components/_shared/accessible-target.d.ts +12 -0
  92. package/dist/components/_shared/decimal.d.ts +171 -0
  93. package/dist/components/_shared/format-price.d.ts +54 -2
  94. package/dist/components/address-fields/index.js +1 -1
  95. package/dist/components/appointment-card/index.js +2 -2
  96. package/dist/components/appointment-details-panel/index.js +1 -1
  97. package/dist/components/appointment-peek/index.js +1 -1
  98. package/dist/components/appointment-timeline/index.js +1 -1
  99. package/dist/components/bill-line-table/bill-line-table.agent.d.ts +4 -0
  100. package/dist/components/bill-line-table/bill-line-table.columns.d.ts +47 -0
  101. package/dist/components/bill-line-table/bill-line-table.d.ts +4 -0
  102. package/dist/components/bill-line-table/bill-line-table.model.d.ts +173 -0
  103. package/dist/components/bill-line-table/bill-line-table.types.d.ts +443 -0
  104. package/dist/components/bill-line-table/bill-line-table.variants.d.ts +34 -0
  105. package/dist/components/bill-line-table/index.d.ts +6 -0
  106. package/dist/components/bill-line-table/index.js +23 -0
  107. package/dist/components/bill-table/bill-table.agent.d.ts +4 -0
  108. package/dist/components/bill-table/bill-table.d.ts +13 -0
  109. package/dist/components/bill-table/bill-table.variants.d.ts +55 -0
  110. package/dist/components/bill-table/cells.d.ts +89 -0
  111. package/dist/components/bill-table/columns.d.ts +21 -0
  112. package/dist/components/bill-table/default-tabs.d.ts +21 -0
  113. package/dist/components/bill-table/handle.d.ts +19 -0
  114. package/dist/components/bill-table/index.d.ts +7 -0
  115. package/dist/components/bill-table/index.js +19 -0
  116. package/dist/components/bill-table/model.d.ts +103 -0
  117. package/dist/components/bill-table/row-actions.d.ts +27 -0
  118. package/dist/components/bill-table/status-maps.d.ts +225 -0
  119. package/dist/components/bill-table/types.d.ts +542 -0
  120. package/dist/components/bmi-calculator/index.js +1 -1
  121. package/dist/components/booking/index.js +1 -1
  122. package/dist/components/button-group/index.js +1 -1
  123. package/dist/components/calculator-dialog/index.js +1 -1
  124. package/dist/components/care-plan-card/index.js +1 -1
  125. package/dist/components/care-plan-entry-card/index.js +1 -1
  126. package/dist/components/chart/index.js +1 -1
  127. package/dist/components/combobox/combobox.d.ts +59 -1
  128. package/dist/components/combobox/index.d.ts +1 -1
  129. package/dist/components/combobox/index.js +1 -1
  130. package/dist/components/contact-profile-card/index.js +1 -1
  131. package/dist/components/country-select/index.js +1 -1
  132. package/dist/components/cycle-calculator/index.js +1 -1
  133. package/dist/components/dashboard-grid/index.js +1 -1
  134. package/dist/components/data-grid/body.d.ts +6 -0
  135. package/dist/components/data-grid/data-grid.variants.d.ts +1 -9
  136. package/dist/components/data-grid/editors.d.ts +7 -1
  137. package/dist/components/data-grid/index.js +9 -8
  138. package/dist/components/data-grid/selection.d.ts +10 -0
  139. package/dist/components/data-grid/types.d.ts +61 -11
  140. package/dist/components/data-grid-tabs/index.js +1 -1
  141. package/dist/components/data-table/index.js +4 -4
  142. package/dist/components/dialog/focus-return.d.ts +12 -0
  143. package/dist/components/dialog/index.js +1 -1
  144. package/dist/components/document-preview/index.js +1 -1
  145. package/dist/components/dropdown-menu/dropdown-menu.d.ts +11 -0
  146. package/dist/components/dropdown-menu/index.js +1 -1
  147. package/dist/components/due-date-calculator/index.js +1 -1
  148. package/dist/components/face-scheme/index.js +1 -1
  149. package/dist/components/fetal-weight/index.js +1 -1
  150. package/dist/components/file-manager/index.js +1 -1
  151. package/dist/components/hcg-doubling/index.js +1 -1
  152. package/dist/components/header-settings/index.js +1 -1
  153. package/dist/components/heatmap/index.js +1 -1
  154. package/dist/components/icon-button-group/index.js +1 -1
  155. package/dist/components/index.d.ts +6 -0
  156. package/dist/components/money/index.js +1 -1
  157. package/dist/components/money/money.d.ts +39 -6
  158. package/dist/components/muscle-scheme/index.js +1 -1
  159. package/dist/components/notes-panel/index.js +1 -1
  160. package/dist/components/number-input/index.d.ts +2 -2
  161. package/dist/components/number-input/index.js +1 -1
  162. package/dist/components/number-input/number-input.d.ts +43 -2
  163. package/dist/components/number-input/use-locale-number.d.ts +67 -3
  164. package/dist/components/optical-prescription/index.js +1 -1
  165. package/dist/components/patient-details/index.js +1 -1
  166. package/dist/components/patient-search/index.js +1 -1
  167. package/dist/components/patient-summary-card/index.js +1 -1
  168. package/dist/components/patient-table/index.js +1 -1
  169. package/dist/components/payment-card/index.js +1 -1
  170. package/dist/components/practice-results/index.js +1 -1
  171. package/dist/components/pregnancy-dating/index.js +1 -1
  172. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  173. package/dist/components/province-select/index.js +1 -1
  174. package/dist/components/radiograph-panel/index.js +1 -1
  175. package/dist/components/rich-text-editor/index.js +2 -2
  176. package/dist/components/row-actions/index.d.ts +3 -0
  177. package/dist/components/row-actions/index.js +5 -0
  178. package/dist/components/row-actions/row-actions.d.ts +63 -0
  179. package/dist/components/skeleton-scheme/index.js +1 -1
  180. package/dist/components/smart-date/smart-date.d.ts +1 -1
  181. package/dist/components/tab-bar/index.js +1 -1
  182. package/dist/components/tabs/index.js +1 -1
  183. package/dist/components/task-editor/index.js +1 -1
  184. package/dist/components/tasks-panel/index.js +1 -1
  185. package/dist/components/theme-toggle/index.js +1 -1
  186. package/dist/components/token-insert-menu/index.js +1 -1
  187. package/dist/components/tooth-scheme/index.js +1 -1
  188. package/dist/components/transaction-chip/index.js +1 -1
  189. package/dist/components/transaction-chip/transaction-chip.d.ts +1 -1
  190. package/dist/components/treatment-receipt/index.js +1 -1
  191. package/dist/components/unit-converter/index.js +1 -1
  192. package/dist/components/widget-picker/index.js +1 -1
  193. package/dist/components/workflow/index.js +1 -1
  194. package/dist/components/workflow-status/index.js +1 -1
  195. package/dist/core.css +1 -1
  196. package/dist/decimal/index.js +149 -0
  197. package/dist/host-compat.css +4 -1
  198. package/dist/i18n/locales/ar.d.ts +248 -0
  199. package/dist/i18n/locales/ar.js +249 -1
  200. package/dist/i18n/locales/de.d.ts +248 -0
  201. package/dist/i18n/locales/de.js +249 -1
  202. package/dist/i18n/locales/el.d.ts +248 -0
  203. package/dist/i18n/locales/el.js +249 -1
  204. package/dist/i18n/locales/en.d.ts +248 -0
  205. package/dist/i18n/locales/en.js +249 -1
  206. package/dist/i18n/locales/es.d.ts +248 -0
  207. package/dist/i18n/locales/es.js +249 -1
  208. package/dist/i18n/locales/fr.d.ts +248 -0
  209. package/dist/i18n/locales/fr.js +249 -1
  210. package/dist/i18n/locales/hi.d.ts +248 -0
  211. package/dist/i18n/locales/hi.js +249 -1
  212. package/dist/i18n/locales/it.d.ts +248 -0
  213. package/dist/i18n/locales/it.js +249 -1
  214. package/dist/i18n/locales/ja.d.ts +248 -0
  215. package/dist/i18n/locales/ja.js +249 -1
  216. package/dist/i18n/locales/nl.d.ts +248 -0
  217. package/dist/i18n/locales/nl.js +249 -1
  218. package/dist/i18n/locales/pl.d.ts +248 -0
  219. package/dist/i18n/locales/pl.js +249 -1
  220. package/dist/i18n/locales/pt.d.ts +248 -0
  221. package/dist/i18n/locales/pt.js +249 -1
  222. package/dist/i18n/locales/ro.d.ts +248 -0
  223. package/dist/i18n/locales/ro.js +249 -1
  224. package/dist/i18n/locales/ru.d.ts +248 -0
  225. package/dist/i18n/locales/ru.js +249 -1
  226. package/dist/i18n/locales/sq.d.ts +248 -0
  227. package/dist/i18n/locales/sq.js +249 -1
  228. package/dist/i18n/locales/sv.d.ts +248 -0
  229. package/dist/i18n/locales/sv.js +249 -1
  230. package/dist/i18n/locales/tr.d.ts +248 -0
  231. package/dist/i18n/locales/tr.js +249 -1
  232. package/dist/i18n/locales/zh.d.ts +248 -0
  233. package/dist/i18n/locales/zh.js +249 -1
  234. package/dist/index.js +1298 -1246
  235. package/dist/locales/ar.json +249 -1
  236. package/dist/locales/de.json +249 -1
  237. package/dist/locales/el.json +249 -1
  238. package/dist/locales/en.json +249 -1
  239. package/dist/locales/es.json +249 -1
  240. package/dist/locales/fr.json +249 -1
  241. package/dist/locales/hi.json +249 -1
  242. package/dist/locales/it.json +249 -1
  243. package/dist/locales/ja.json +249 -1
  244. package/dist/locales/nl.json +249 -1
  245. package/dist/locales/pl.json +249 -1
  246. package/dist/locales/pt.json +249 -1
  247. package/dist/locales/ro.json +249 -1
  248. package/dist/locales/ru.json +249 -1
  249. package/dist/locales/sq.json +249 -1
  250. package/dist/locales/sv.json +249 -1
  251. package/dist/locales/tr.json +249 -1
  252. package/dist/locales/zh.json +249 -1
  253. package/dist/patterns/anamnesis/index.js +1 -1
  254. package/dist/patterns/calendar/index.js +1 -1
  255. package/dist/patterns/help-me-write-templates/index.js +1 -1
  256. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  257. package/dist/patterns/signature-request/index.js +1 -1
  258. package/dist/patterns/verify-identity/index.js +1 -1
  259. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  260. package/dist/tokens.css +1 -1
  261. package/package.json +17 -1
  262. package/dist/_chunks/combobox-duuDRI1t.js +0 -688
  263. package/dist/_chunks/dialog-BTjSQjdY.js +0 -274
  264. package/dist/_chunks/format-price-BcFBa-WP.js +0 -52
  265. package/dist/_chunks/money-Tsczpjfz.js +0 -102
  266. package/dist/_chunks/number-input-CVwI1ltI.js +0 -423
  267. package/dist/_chunks/parts-Wz2LeGnH.js +0 -1113
  268. package/dist/_chunks/undo-2-CYNAzclj.js +0 -26
@@ -1,1113 +0,0 @@
1
- import { jsx as s, jsxs as z, Fragment as Ge } from "react/jsx-runtime";
2
- import { useMemo as Be, createContext as Ie, useState as G, useEffect as J, useContext as Re, forwardRef as W, useRef as X, useCallback as ie, useLayoutEffect as je, useId as Le, useReducer as We, isValidElement as Qe, cloneElement as Ve } from "react";
3
- import { useTranslation as q } from "react-i18next";
4
- import { c as te } from "./index-D2ZczOXr.js";
5
- import { B as oe } from "./button-DohK_Ak_.js";
6
- import { I as H } from "./icon-button-S8_weU3g.js";
7
- import { P as le } from "./popover-CN5IsOeS.js";
8
- import { C as _e } from "./checkbox-DV4sNDeB.js";
9
- import { T as Ue } from "./text-input-B6iAgCr3.js";
10
- import { T as xe } from "./tag-BNlcEJfE.js";
11
- import { D as Y } from "./dropdown-menu-CqxBthww.js";
12
- import { a as me } from "./format-number-DdzqwMs1.js";
13
- import { g as He } from "./date-locale-OG-MupVD.js";
14
- import { P as Ce } from "./printer-rkK0T1gi.js";
15
- import { R as ke } from "./refresh-cw-DnI0cLFC.js";
16
- import { D as Fe } from "./download-CfYKJO_j.js";
17
- import { c as Xe } from "./createLucideIcon-DhHxpK9K.js";
18
- import { G as Ye } from "./grip-vertical-onSb1JXO.js";
19
- import { A as Je, a as Ke } from "./arrow-up-BYvcvTkB.js";
20
- import { R as Ze } from "./rotate-ccw-BBQnIVTr.js";
21
- import { S as et } from "./search-QbWPlY5f.js";
22
- import { X as Ne } from "./x-B5YnXwCz.js";
23
- import { F as tt } from "./file-spreadsheet-DmwyfV4O.js";
24
- import { F as nt } from "./file-text-5yv6r2ls.js";
25
- /**
26
- * @license lucide-react v1.22.0 - ISC
27
- *
28
- * This source code is licensed under the ISC license.
29
- * See the LICENSE file in the root directory of this source tree.
30
- */
31
- const rt = [
32
- ["path", { d: "M10.5 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v5.5", key: "1g2yzs" }],
33
- ["path", { d: "m14.3 19.6 1-.4", key: "11sv9r" }],
34
- ["path", { d: "M15 3v7.5", key: "7lm50a" }],
35
- ["path", { d: "m15.2 16.9-.9-.3", key: "1t7mvx" }],
36
- ["path", { d: "m16.6 21.7.3-.9", key: "1j67ps" }],
37
- ["path", { d: "m16.8 15.3-.4-1", key: "1ei7r6" }],
38
- ["path", { d: "m19.1 15.2.3-.9", key: "18r7jp" }],
39
- ["path", { d: "m19.6 21.7-.4-1", key: "z2vh2" }],
40
- ["path", { d: "m20.7 16.8 1-.4", key: "19m87a" }],
41
- ["path", { d: "m21.7 19.4-.9-.3", key: "1qgwi9" }],
42
- ["path", { d: "M9 3v18", key: "fh3hqa" }],
43
- ["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }]
44
- ], at = Xe("columns-3-cog", rt), De = /^\d{4}-\d{2}-\d{2}$/, st = /^(\d{4}-\d{2}-\d{2})/;
45
- function it(e) {
46
- if (!e) return null;
47
- const t = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
48
- return `${t}-${r}-${n}`;
49
- }
50
- function sn(e) {
51
- return typeof e == "string" && De.test(e);
52
- }
53
- function ot(e) {
54
- if (!e) return;
55
- const t = De.test(e) ? new Date(
56
- Number(e.slice(0, 4)),
57
- Number(e.slice(5, 7)) - 1,
58
- Number(e.slice(8, 10))
59
- ) : new Date(e);
60
- return Number.isNaN(t.getTime()) ? void 0 : t;
61
- }
62
- function lt(e) {
63
- if (e == null || e === "")
64
- return null;
65
- if (typeof e == "string") {
66
- const r = st.exec(e);
67
- if (r) return r[1];
68
- }
69
- const t = e instanceof Date ? e : new Date(String(e));
70
- return Number.isNaN(t.getTime()) ? null : it(t);
71
- }
72
- function on(e) {
73
- const t = new Intl.Collator(e, {
74
- sensitivity: "base",
75
- usage: "search"
76
- });
77
- function r(n, a) {
78
- if (a.length === 0) return 0;
79
- if (a.length > n.length) return -1;
80
- for (let d = 0; d <= n.length - a.length; d += 1)
81
- if (t.compare(n.slice(d, d + a.length), a) === 0)
82
- return d;
83
- return -1;
84
- }
85
- return {
86
- equals: (n, a) => t.compare(n, a) === 0,
87
- contains: (n, a) => r(n, a) !== -1,
88
- startsWith: (n, a) => a.length <= n.length && t.compare(n.slice(0, a.length), a) === 0,
89
- endsWith: (n, a) => a.length <= n.length && t.compare(
90
- n.slice(n.length - a.length),
91
- a
92
- ) === 0
93
- };
94
- }
95
- function ut(e) {
96
- return e == null ? null : typeof e == "string" ? e : String(e);
97
- }
98
- function ln(e, t, r) {
99
- if (!e || e.filter === "") return !0;
100
- const n = ut(t);
101
- if (n === null) return !1;
102
- switch (e.type) {
103
- case "equals":
104
- return r.equals(n, e.filter);
105
- case "contains":
106
- return r.contains(n, e.filter);
107
- case "startsWith":
108
- return r.startsWith(n, e.filter);
109
- case "endsWith":
110
- return r.endsWith(n, e.filter);
111
- case "notContains":
112
- return !r.contains(n, e.filter);
113
- default:
114
- return !0;
115
- }
116
- }
117
- function ct(e) {
118
- if (e == null || e === "") return null;
119
- const t = typeof e == "number" ? e : Number(e);
120
- return Number.isNaN(t) ? null : t;
121
- }
122
- function dt(e, t, r, n) {
123
- if (e === "blank") return t === null;
124
- if (e === "notBlank") return t !== null;
125
- if (t === null) return !1;
126
- if (e === "inRange")
127
- return r === null ? n === null || t <= n : n === null ? t >= r : t >= r && t <= n;
128
- if (r === null) return !0;
129
- switch (e) {
130
- case "equals":
131
- return t === r;
132
- case "notEqual":
133
- return t !== r;
134
- case "greaterThan":
135
- return t > r;
136
- case "greaterThanOrEqual":
137
- return t >= r;
138
- case "lessThan":
139
- return t < r;
140
- case "lessThanOrEqual":
141
- return t <= r;
142
- default:
143
- return !0;
144
- }
145
- }
146
- function un(e, t) {
147
- return e ? dt(
148
- e.type,
149
- ct(t),
150
- e.filter ?? null,
151
- e.filterTo ?? null
152
- ) : !0;
153
- }
154
- function Se(e) {
155
- return typeof e == "number" ? `n:${e}` : `s:${e}`;
156
- }
157
- function ft(e) {
158
- return e == null ? null : typeof e == "string" || typeof e == "number" ? e : String(e);
159
- }
160
- function cn(e, t) {
161
- const r = e == null ? void 0 : e.values;
162
- if (!r || r.length === 0) return !0;
163
- const n = ft(t);
164
- if (n === null) return !1;
165
- const a = Se(n);
166
- return r.some((d) => Se(d) === a);
167
- }
168
- function pt(e, t, r) {
169
- if (!t && !r) return !0;
170
- const n = lt(e);
171
- return !(!n || t && n < t || r && n > r);
172
- }
173
- function dn(e, t) {
174
- return pt(t, e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo);
175
- }
176
- function fn(e) {
177
- if (e == null) return !0;
178
- if (typeof e != "object") return !1;
179
- const t = e;
180
- return t.type === "set" ? !Array.isArray(t.values) || t.values.length === 0 : t.type === "inRange" && ("dateFrom" in t || "dateTo" in t) ? !t.dateFrom && !t.dateTo : t.type === "blank" || t.type === "notBlank" ? !1 : "value" in t ? t.value === null || t.value === void 0 || t.value === "" : typeof t.filter == "string" ? t.filter.trim() === "" : typeof t.type == "string" ? typeof t.filter != "number" && typeof t.filterTo != "number" : !1;
181
- }
182
- const mt = "yyyy-mm-dd hh:mm";
183
- function gt(e) {
184
- return e == null ? "" : typeof e == "number" ? Number.isFinite(e) ? e : String(e) : typeof e == "string" || typeof e == "boolean" ? e : e instanceof Date && !Number.isNaN(e.getTime()) ? { value: e, type: Date, format: mt } : String(e);
185
- }
186
- async function bt(e, t, r) {
187
- const { default: n } = await import("./index-CpVcVNBu.js"), a = [
188
- e.map((d) => ({
189
- value: d,
190
- fontWeight: "bold",
191
- textColor: r.text,
192
- backgroundColor: r.fill
193
- })),
194
- ...t.map((d) => d.map(gt))
195
- ];
196
- return n(a, { sheet: "Sheet1" }).toBlob();
197
- }
198
- function K(e, t = [30, 30, 30]) {
199
- if (typeof document > "u") return t;
200
- const r = document.createElement("div");
201
- r.className = "theme-light", r.style.position = "absolute", r.style.visibility = "hidden";
202
- const n = document.createElement("span");
203
- n.style.color = `var(${e})`, r.appendChild(n), document.body.appendChild(r);
204
- const a = getComputedStyle(n).color;
205
- document.body.removeChild(r);
206
- const d = a.match(/rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)/i);
207
- return d ? [Number(d[1]), Number(d[2]), Number(d[3])] : t;
208
- }
209
- function Me(e, t) {
210
- const r = URL.createObjectURL(e), n = document.createElement("a");
211
- n.href = r, n.download = t, document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(r);
212
- }
213
- async function pn(e, t) {
214
- const [{ jsPDF: r }, { default: n }] = await Promise.all([
215
- import("./jspdf.es.min-BW7y6yhl.js").then((M) => M.j),
216
- import("./jspdf.plugin.autotable-CSiDNyPn.js")
217
- ]), a = [[...e.headers]], d = e.rows.map(
218
- (M) => M.map((Q) => Q == null ? "" : String(Q))
219
- ), k = K("--muted", [240, 240, 240]), F = K("--foreground", [30, 30, 30]), I = K("--card-foreground", [30, 30, 30]), N = K("--card", [250, 250, 250]), B = new r({ orientation: "landscape" });
220
- n(B, {
221
- head: a,
222
- body: d,
223
- headStyles: { fillColor: k, textColor: F },
224
- bodyStyles: { textColor: I },
225
- alternateRowStyles: { fillColor: N },
226
- styles: {
227
- font: "helvetica",
228
- fontSize: 10,
229
- cellPadding: 4
230
- }
231
- }), B.save(t.fileName);
232
- }
233
- async function mn(e, t) {
234
- const r = ([a, d, k]) => `#${[a, d, k].map((F) => F.toString(16).padStart(2, "0")).join("")}`.toUpperCase(), n = await bt(e.headers, e.rows, {
235
- fill: r(K("--muted", [240, 240, 240])),
236
- text: r(K("--foreground", [30, 30, 30]))
237
- });
238
- Me(n, t.fileName);
239
- }
240
- function gn(e) {
241
- const t = e.rows.map(
242
- (r) => r.cells
243
- );
244
- return e.totals && t.push(e.totals), { headers: e.columns.map((r) => r.label), rows: t };
245
- }
246
- const we = `\r
247
- `, ht = /^[=+\-@\t\r]/, yt = new RegExp("^[-+][\\s\\u00a0\\u202f]?\\p{Sc}?[\\s\\u00a0\\u202f]?\\d[\\d\\s\\u00a0\\u202f.,']*[\\s\\u00a0\\u202f]?[\\p{Sc}%]?$", "u");
248
- function vt(e) {
249
- if (e == null) return "";
250
- if (typeof e == "number")
251
- return Number.isFinite(e) ? String(e) : "";
252
- let t = String(e);
253
- return ht.test(t) && !yt.test(t) && (t = `'${t}`), /[",\r\n]/.test(t) ? `"${t.replace(/"/g, '""')}"` : t;
254
- }
255
- function Tt(e) {
256
- return [e.headers, ...e.rows].map(
257
- (r) => r.map(vt).join(",")
258
- ).join(we) + we;
259
- }
260
- function bn(e, t) {
261
- const r = new Blob(["\uFEFF", Tt(e)], {
262
- type: "text/csv;charset=utf-8"
263
- });
264
- Me(r, t.fileName);
265
- }
266
- function hn(e, t) {
267
- return `${(e ?? "").normalize("NFC").replace(/[^\p{L}\p{N} ._-]+/gu, "-").replace(/\s+/g, " ").replace(/^[\s.-]+|[\s.-]+$/g, "").slice(0, 80) || "table-export"}.${t}`;
268
- }
269
- const qe = Ie(
270
- null
271
- );
272
- function yn({
273
- seam: e,
274
- children: t
275
- }) {
276
- const r = Be(() => ({ seam: e }), [e]);
277
- return /* @__PURE__ */ s(qe.Provider, { value: r, children: t });
278
- }
279
- function xt(e, t) {
280
- const r = Re(qe), n = (r == null ? void 0 : r.seam) ?? t;
281
- if (!n) throw new Error(e);
282
- return n;
283
- }
284
- function ee(e, t) {
285
- const [r, n] = G(0), a = t.join(" ");
286
- return J(() => {
287
- const d = new Set(a.split(" "));
288
- return e.subscribe((k) => {
289
- d.has(k) && n((F) => F + 1);
290
- });
291
- }, [e, a]), r;
292
- }
293
- function Ct(e, t) {
294
- const r = (n, a) => String(n).padStart(a, "0");
295
- return t.replace(/yyyy|MM|dd/g, (n) => {
296
- if (n === "dd") return r(e.getDate(), 2);
297
- if (n === "MM") return r(e.getMonth() + 1, 2);
298
- const a = e.getFullYear();
299
- return r(a > 0 ? a : 1 - a, 4);
300
- });
301
- }
302
- function kt(e, t, r) {
303
- const n = e.filterOptions;
304
- return t ? {
305
- kitWording: !0,
306
- optionLabel: n ? (a) => {
307
- var d;
308
- return (d = n.find((k) => k.value === a)) == null ? void 0 : d.label;
309
- } : void 0,
310
- number: (a) => me(a, r),
311
- day: (a) => {
312
- const d = ot(a);
313
- return d ? Ct(d, He(r ?? "en")) : a;
314
- }
315
- } : {};
316
- }
317
- function Ft(e) {
318
- return e === "contains" || e === "notContains" || e === "equals" || e === "startsWith" || e === "endsWith";
319
- }
320
- function Nt(e, t) {
321
- switch (e) {
322
- case "contains":
323
- return t("dataTable.textFilter.operators.contains", "Contains");
324
- case "notContains":
325
- return t(
326
- "dataTable.textFilter.operators.notContains",
327
- "Does not contain"
328
- );
329
- case "equals":
330
- return t("dataTable.textFilter.operators.equals", "Equals");
331
- case "startsWith":
332
- return t("dataTable.textFilter.operators.startsWith", "Starts with");
333
- case "endsWith":
334
- return t("dataTable.textFilter.operators.endsWith", "Ends with");
335
- }
336
- }
337
- function St(e, t) {
338
- switch (e) {
339
- case "contains":
340
- return t("dataTable.agGrid.contains", "Contains");
341
- case "notContains":
342
- return t("dataTable.agGrid.notContains", "Does not contain");
343
- case "startsWith":
344
- return t("dataTable.agGrid.startsWith", "Starts with");
345
- case "endsWith":
346
- return t("dataTable.agGrid.endsWith", "Ends with");
347
- case "equals":
348
- return t("dataTable.agGrid.equals", "Equals");
349
- case "notEqual":
350
- return t("dataTable.agGrid.notEqual", "Not equal");
351
- case "greaterThan":
352
- return t("dataTable.agGrid.greaterThan", "Greater than");
353
- case "greaterThanOrEqual":
354
- return t(
355
- "dataTable.agGrid.greaterThanOrEqual",
356
- "Greater than or equal to"
357
- );
358
- case "lessThan":
359
- return t("dataTable.agGrid.lessThan", "Less than");
360
- case "lessThanOrEqual":
361
- return t("dataTable.agGrid.lessThanOrEqual", "Less than or equal to");
362
- case "inRange":
363
- return t("dataTable.agGrid.inRange", "In range");
364
- case "blank":
365
- return t("dataTable.agGrid.blank", "Blank");
366
- case "notBlank":
367
- return t("dataTable.agGrid.notBlank", "Not blank");
368
- default:
369
- return e;
370
- }
371
- }
372
- function wt(e, t, r = {}) {
373
- if (!e || typeof e != "object") return "";
374
- const n = e, a = typeof n.type == "string" ? n.type : "", d = r.kitWording === !0, k = (x) => d && typeof n.filter == "string" && Ft(x) ? Nt(x, t) : St(x, t), F = (x) => typeof x == "number" && r.number ? r.number(x) : String(x), I = (x) => r.day ? r.day(x) : x, N = t("dataTable.numberFilter.from", "From"), B = t("dataTable.numberFilter.to", "To");
375
- if (a === "blank" || a === "notBlank") return k(a);
376
- const M = typeof n.filter == "string" || typeof n.filter == "number", Q = typeof n.filterTo == "string" || typeof n.filterTo == "number";
377
- if (a === "inRange" && (M || Q))
378
- return M && Q ? `${F(n.filter)} – ${F(n.filterTo)}` : M ? `${N} ${F(n.filter)}` : `${B} ${F(n.filterTo)}`;
379
- if (M)
380
- return a ? `${k(a)} ${F(n.filter)}` : F(n.filter);
381
- if (d) {
382
- const x = typeof n.dateFrom == "string" && n.dateFrom ? n.dateFrom : "", P = typeof n.dateTo == "string" && n.dateTo ? n.dateTo : "", V = a === "inRange" || a === "";
383
- if (x && P) return `${I(x)} – ${I(P)}`;
384
- if (x)
385
- return V ? `${N} ${I(x)}` : `${k(a)} ${I(x)}`;
386
- if (P) return `${B} ${I(P)}`;
387
- } else if (typeof n.dateFrom == "string")
388
- return typeof n.dateTo == "string" && n.dateTo ? `${n.dateFrom} – ${n.dateTo}` : String(n.dateFrom);
389
- return Array.isArray(n.values) ? n.values.map((P) => {
390
- var V;
391
- return ((V = r.optionLabel) == null ? void 0 : V.call(r, P)) ?? F(P);
392
- }).join(", ") : "";
393
- }
394
- function $t(e) {
395
- if (!Qe(e)) return e;
396
- const t = e, r = t.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(r) ? r : `${r} ds:size-4`.trim();
397
- return Ve(t, { className: n, size: t.props.size ?? 16 });
398
- }
399
- function $e(e) {
400
- return e.getColumns().some((t) => t.masked === !0);
401
- }
402
- function Ee(e, t, r) {
403
- const n = e[t], a = e[r];
404
- if (!n || !a || !n.canMove || n.canPin === !1 && a.pinned !== n.pinned) return !1;
405
- const d = e.filter((I, N) => N !== t);
406
- d.splice(r, 0, n);
407
- const k = /* @__PURE__ */ new Set();
408
- let F = null;
409
- for (const I of d) {
410
- const N = I.groupId ?? null;
411
- if (N !== F) {
412
- if (N !== null && k.has(N)) return !1;
413
- N !== null && k.add(N), F = N;
414
- }
415
- }
416
- return !0;
417
- }
418
- function Et(e) {
419
- return {
420
- selectedRowIds: e.getSelectedRowIds(),
421
- getExportSnapshot: () => e.getExportSnapshot()
422
- };
423
- }
424
- const It = te([
425
- "data-table-toolbar",
426
- // Mobile (<sm) keeps `flex-wrap` so a wide QuickSearch can flow above the
427
- // Actions cluster on narrow screens. From `sm` (≥640px) we switch to
428
- // `flex-nowrap` + `min-w-0` so the row stays single-line at every common
429
- // desktop width (1024 / 1280 / 1440): the QuickSearch slot shrinks via
430
- // its own `min-w-0` instead of pushing the trailing Actions to a new row.
431
- "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
432
- "ds:sm:flex-nowrap ds:min-w-0"
433
- // No card surface: the toolbar sits directly on the page background,
434
- // matching the header-tools layout the Patients / Care Plan List
435
- // patterns established.
436
- ]), Rt = te([
437
- "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
438
- // `grow` lets FilterBar absorb the free space; `min-w-0` lets the
439
- // QuickSearch slot inside shrink below its intrinsic width when the
440
- // toolbar runs `flex-nowrap` at `sm` and above, so the trailing
441
- // Actions cluster stays pinned on a single row.
442
- "ds:grow ds:min-w-0"
443
- ]), Dt = te("ds:w-full ds:max-w-[24rem] ds:min-w-0", {
444
- variants: {
445
- // The masked "Search applied" state adds a Clear button beside the box.
446
- hiddenQuery: {
447
- true: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:[&>[data-component=text-input]]:min-w-0 ds:[&>[data-component=text-input]]:grow",
448
- false: ""
449
- }
450
- },
451
- defaultVariants: { hiddenQuery: !1 }
452
- }), Mt = te([
453
- "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
454
- "ds:ms-auto"
455
- ]), qt = te(
456
- "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",
457
- {
458
- variants: {
459
- dragging: { true: "ds:opacity-50", false: "" },
460
- dragOver: {
461
- true: "ds:bg-[color:color-mix(in_srgb,var(--primary)_8%,transparent)]",
462
- false: ""
463
- }
464
- },
465
- defaultVariants: { dragging: !1, dragOver: !1 }
466
- }
467
- );
468
- function vn(e) {
469
- const { prefix: t } = e, r = e.useEngineSeam ?? (() => null), n = (i) => xt(
470
- e.missingProvider(`${t}.${i}`),
471
- r()
472
- ), a = W(
473
- ({ className: i, children: f, ...l }, u) => /* @__PURE__ */ s(
474
- "div",
475
- {
476
- ref: u,
477
- role: "toolbar",
478
- className: It({ className: i }),
479
- ...l,
480
- children: f
481
- }
482
- )
483
- );
484
- a.displayName = t;
485
- const d = W(
486
- ({ className: i, children: f, ...l }, u) => /* @__PURE__ */ s(
487
- "div",
488
- {
489
- ref: u,
490
- className: Rt({ className: i }),
491
- ...l,
492
- children: f
493
- }
494
- )
495
- );
496
- d.displayName = `${t}.FilterBar`;
497
- const k = W(
498
- ({ className: i, children: f, ...l }, u) => /* @__PURE__ */ s(
499
- "div",
500
- {
501
- ref: u,
502
- className: Mt({ className: i }),
503
- ...l,
504
- children: f
505
- }
506
- )
507
- );
508
- k.displayName = `${t}.Actions`;
509
- function F(i) {
510
- return i;
511
- }
512
- const I = W(
513
- ({ label: i, intent: f = "outline", ...l }, u) => {
514
- const { t: c } = q("ui"), v = n("Print"), { onClick: y, ...S } = l;
515
- return /* @__PURE__ */ s(
516
- H,
517
- {
518
- ref: u,
519
- type: "button",
520
- intent: f,
521
- icon: /* @__PURE__ */ s(Ce, { "aria-hidden": !0 }),
522
- tooltip: i ?? c("dataTable.print"),
523
- ...S,
524
- onClick: (m) => {
525
- y == null || y(m), m.defaultPrevented || v.print();
526
- }
527
- }
528
- );
529
- }
530
- );
531
- I.displayName = `${t}.Print`;
532
- const N = W(
533
- ({ onRefresh: i, label: f, intent: l = "outline", ...u }, c) => {
534
- const { t: v } = q("ui"), { onClick: y, ...S } = u;
535
- return /* @__PURE__ */ s(
536
- H,
537
- {
538
- ref: c,
539
- type: "button",
540
- intent: l,
541
- icon: /* @__PURE__ */ s(ke, { "aria-hidden": !0 }),
542
- tooltip: f ?? v("dataTable.refresh", "Refresh"),
543
- ...S,
544
- onClick: (m) => {
545
- y == null || y(m), m.defaultPrevented || i();
546
- }
547
- }
548
- );
549
- }
550
- );
551
- N.displayName = `${t}.Refresh`;
552
- const B = ({
553
- childProps: i,
554
- disabled: f
555
- }) => {
556
- const { t: l } = q("ui"), u = n("Print"), c = i.label;
557
- return /* @__PURE__ */ s(
558
- Y.Item,
559
- {
560
- startIcon: /* @__PURE__ */ s(Ce, { "aria-hidden": !0, className: "ds:size-4" }),
561
- disabled: f,
562
- onSelect: () => void u.print(),
563
- children: typeof c == "string" ? c : l("dataTable.print")
564
- }
565
- );
566
- };
567
- B.displayName = `${t}.Print.MenuItem`;
568
- const M = ({
569
- childProps: i,
570
- disabled: f
571
- }) => {
572
- const { t: l } = q("ui"), { label: u, onRefresh: c } = i;
573
- return /* @__PURE__ */ s(
574
- Y.Item,
575
- {
576
- startIcon: /* @__PURE__ */ s(ke, { "aria-hidden": !0, className: "ds:size-4" }),
577
- disabled: f,
578
- onSelect: () => c == null ? void 0 : c(),
579
- children: u ?? l("dataTable.refresh", "Refresh")
580
- }
581
- );
582
- };
583
- M.displayName = `${t}.Refresh.MenuItem`;
584
- const Q = Object.assign(I, {
585
- overflowMenuItem: B
586
- }), x = Object.assign(N, {
587
- overflowMenuItem: M
588
- }), P = ({
589
- placeholder: i,
590
- debounceMs: f = 150
591
- }) => {
592
- const { t: l } = q("ui"), u = n("QuickSearch"), c = u.features.syncsFilterInputs, v = ee(
593
- u,
594
- c ? ["quickFilter", "filter", "columns"] : []
595
- ), y = c && $e(u), [S, m] = G(
596
- () => c && !$e(u) ? u.getQuickFilter() : ""
597
- ), T = X(c ? u.getQuickFilter() : ""), g = X(y), C = X(void 0), [E, R] = G(!1), _ = Le(), b = X(null);
598
- J(() => {
599
- if (!c) return;
600
- const h = u.getQuickFilter();
601
- if (g.current !== y) {
602
- g.current = y, T.current = h, m(y ? "" : h);
603
- return;
604
- }
605
- h !== T.current && (C.current && (window.clearTimeout(C.current), C.current = void 0, R(!1)), T.current = h, m(y && h !== "" ? "" : h));
606
- }, [c, u, v, y]), J(
607
- () => () => {
608
- C.current && window.clearTimeout(C.current);
609
- },
610
- []
611
- );
612
- const D = (h) => {
613
- C.current && window.clearTimeout(C.current), R(!0), C.current = window.setTimeout(() => {
614
- if (C.current = void 0, R(!1), c) {
615
- if (u.getQuickFilter() !== T.current || h === T.current) return;
616
- T.current = h;
617
- }
618
- u.setQuickFilter(h);
619
- }, f);
620
- }, j = (h) => {
621
- m(h), D(h);
622
- }, $ = y && !E && S === "" && u.getQuickFilter() !== "";
623
- return (
624
- // Slot wrapper caps the search at a legible width on desktop: without
625
- // it, TextInput's `w-full` lets the QuickSearch absorb the entire
626
- // FilterBar row and push trailing Actions onto a second line at
627
- // 1024 / 1280 / 1440. `min-w-0` lets the slot shrink below `24rem`
628
- // when the toolbar is squeezed on narrow viewports.
629
- /* @__PURE__ */ z("div", { className: Dt({ hiddenQuery: $ }), children: [
630
- /* @__PURE__ */ s(
631
- Ue,
632
- {
633
- ref: b,
634
- type: "search",
635
- size: "sm",
636
- ...c ? { value: S } : {},
637
- onChange: (h) => j(h.target.value),
638
- placeholder: $ ? l("dataTable.quickSearch.appliedHidden", "Search applied") : i ?? l("dataTable.quickSearch.placeholder", "Search…"),
639
- startAdornment: /* @__PURE__ */ s(et, { "aria-hidden": !0, className: "ds:size-4" }),
640
- clearable: !0,
641
- onClear: () => j(""),
642
- "aria-label": l("dataTable.quickSearch.label", "Quick search"),
643
- "aria-describedby": $ ? _ : void 0
644
- }
645
- ),
646
- $ ? /* @__PURE__ */ z(Ge, { children: [
647
- /* @__PURE__ */ s("span", { id: _, className: "ds:sr-only", children: l(
648
- "dataTable.quickSearch.appliedHiddenDescription",
649
- "A search is applied. Its text is hidden in privacy mode."
650
- ) }),
651
- /* @__PURE__ */ s(
652
- H,
653
- {
654
- type: "button",
655
- size: "sm",
656
- intent: "ghost",
657
- icon: /* @__PURE__ */ s(Ne, { "aria-hidden": !0 }),
658
- tooltip: l("dataTable.quickSearch.clearApplied", "Clear search"),
659
- onClick: () => {
660
- var h;
661
- j(""), (h = b.current) == null || h.focus();
662
- }
663
- }
664
- )
665
- ] }) : null
666
- ] })
667
- );
668
- };
669
- P.displayName = `${t}.QuickSearch`;
670
- const V = () => {
671
- var _;
672
- const { t: i, i18n: f } = q("ui"), l = n("FilterChips");
673
- ee(l, ["filter", "quickFilter", "columns"]);
674
- const [, u] = We((b) => b + 1, 0), c = l.getFilterModel() ?? {}, v = l.getColumns(), y = new Map(
675
- v.map((b) => [b.id, b])
676
- ), S = l.features.formatsFilterValues === !0, m = (b, D) => S ? i("dataTable.filterChips.chip", { column: b, value: D }) : `${b}: ${D}`, T = [];
677
- for (const b of Object.keys(c)) {
678
- const D = y.get(b);
679
- if (!D) {
680
- const h = (_ = l.getFilterLabel) == null ? void 0 : _.call(l, b);
681
- T.push({ key: b, label: h ?? b });
682
- continue;
683
- }
684
- const j = D.masked ? "" : wt(
685
- c[b],
686
- i,
687
- kt(D, S, f.language)
688
- ), $ = D.label || b;
689
- T.push({ key: b, label: j ? m($, j) : $ });
690
- }
691
- const g = l.getQuickFilter(), C = i("dataTable.quickSearch.label", "Quick search"), E = v.some((b) => b.masked === !0) ? C : m(C, g);
692
- return T.length + (g ? 1 : 0) === 0 ? null : /* @__PURE__ */ z(
693
- "div",
694
- {
695
- role: "group",
696
- "aria-label": i("dataTable.filterChips.label", "Active filters"),
697
- className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
698
- children: [
699
- g && /* @__PURE__ */ s(
700
- xe,
701
- {
702
- label: E,
703
- size: "sm",
704
- variant: "brand",
705
- fill: "solid",
706
- onRemove: () => {
707
- l.setQuickFilter(""), u();
708
- }
709
- }
710
- ),
711
- T.map((b) => /* @__PURE__ */ s(
712
- xe,
713
- {
714
- label: b.label,
715
- size: "sm",
716
- variant: "brand",
717
- fill: "solid",
718
- onRemove: () => {
719
- l.setColumnFilter(b.key, null), u();
720
- }
721
- },
722
- b.key
723
- )),
724
- /* @__PURE__ */ s(
725
- oe,
726
- {
727
- type: "button",
728
- intent: "ghost",
729
- size: "sm",
730
- onClick: () => {
731
- l.clearAllFilters(), u();
732
- },
733
- startIcon: /* @__PURE__ */ s(Ne, { "aria-hidden": !0, className: "ds:size-4" }),
734
- children: i("dataTable.filterChips.clearAll", "Clear all")
735
- }
736
- )
737
- ]
738
- }
739
- );
740
- };
741
- V.displayName = `${t}.FilterChips`;
742
- const ge = ({ field: i, options: f, label: l }) => {
743
- var C;
744
- const { t: u } = q("ui"), c = n("FacetFilter"), v = c.features.syncsFilterInputs && !!c.getFacet, y = ee(c, v ? ["filter"] : []), [S, m] = G(null);
745
- J(() => {
746
- v && m(null);
747
- }, [v, y]);
748
- const T = S ? S.value : v ? ((C = c.getFacet) == null ? void 0 : C.call(c, i)) ?? null : null;
749
- function g(E) {
750
- m({ value: E }), c.setFacet(i, E);
751
- }
752
- return /* @__PURE__ */ s(
753
- "div",
754
- {
755
- role: "group",
756
- "aria-label": l ?? u("dataTable.facetFilter.label", "Filter"),
757
- className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
758
- children: f.map((E) => {
759
- const R = T === E.value;
760
- return /* @__PURE__ */ s(
761
- oe,
762
- {
763
- type: "button",
764
- size: "sm",
765
- intent: R ? "primary" : "secondary",
766
- "aria-pressed": R,
767
- onClick: () => g(E.value),
768
- children: E.label
769
- },
770
- String(E.value)
771
- );
772
- })
773
- }
774
- );
775
- };
776
- ge.displayName = `${t}.FacetFilter`;
777
- const be = Ie(!1), ue = W(
778
- ({ children: i, label: f, intent: l = "outline", ...u }, c) => {
779
- const { t: v } = q("ui");
780
- return n("ExportMenu"), /* @__PURE__ */ s(be.Provider, { value: !0, children: /* @__PURE__ */ z(Y.Root, { children: [
781
- /* @__PURE__ */ s(Y.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
782
- H,
783
- {
784
- ref: c,
785
- type: "button",
786
- intent: l,
787
- icon: /* @__PURE__ */ s(Fe, { "aria-hidden": !0 }),
788
- tooltip: f ?? v("dataTable.export.menu", "Export"),
789
- "aria-label": f ?? v("dataTable.export.menu", "Export"),
790
- "aria-haspopup": "menu",
791
- ...u
792
- }
793
- ) }),
794
- /* @__PURE__ */ s(Y.Content, { align: "end", sideOffset: 4, children: i })
795
- ] }) });
796
- }
797
- );
798
- ue.displayName = `${t}.ExportMenu`;
799
- function Pe(i, f) {
800
- return f === "csv" ? i("dataTable.export.csv", "Export CSV") : f === "xlsx" ? i("dataTable.export.xlsx", "Export Excel") : f === "pdf" ? i("dataTable.export.pdf", "Export PDF") : i("dataTable.export.custom", "Export");
801
- }
802
- function Oe(i) {
803
- return i === "xlsx" ? /* @__PURE__ */ s(tt, { "aria-hidden": !0, className: "ds:size-4" }) : i === "pdf" ? /* @__PURE__ */ s(nt, { "aria-hidden": !0, className: "ds:size-4" }) : /* @__PURE__ */ s(Fe, { "aria-hidden": !0, className: "ds:size-4" });
804
- }
805
- const he = ({
806
- format: i,
807
- label: f,
808
- onSelect: l,
809
- disabled: u,
810
- description: c
811
- }) => {
812
- const { t: v } = q("ui");
813
- if (!Re(be))
814
- throw new Error(
815
- `${t}.ExportMenu.Item must be rendered inside ${t}.ExportMenu.`
816
- );
817
- return /* @__PURE__ */ s(
818
- Y.Item,
819
- {
820
- onSelect: l,
821
- disabled: u,
822
- description: c,
823
- children: /* @__PURE__ */ z("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
824
- Oe(i),
825
- /* @__PURE__ */ s("span", { children: f ?? Pe(v, i) })
826
- ] })
827
- }
828
- );
829
- };
830
- he.displayName = `${t}.ExportMenu.Item`;
831
- const ce = W(
832
- function({ label: f, icon: l, footer: u, header: c, intent: v = "outline", ...y }, S) {
833
- const { t: m, i18n: T } = q("ui"), g = n("ColumnToggle"), C = g.features.keyboardReorder, E = g.features.toolbarAnnouncesColumnMoves === !0, [R, _] = G(!1), [b, D] = G(""), j = ee(g, R ? ["columns"] : []), [$, h] = G([]), [ve, de] = G(null), [Ae, ne] = G(null), Z = X(/* @__PURE__ */ new Map()), re = X(
834
- null
835
- ), U = ie(
836
- () => g.getColumns().filter((o) => o.hiddenByPrivacy !== !0),
837
- [g]
838
- );
839
- J(() => {
840
- R && h(U());
841
- }, [R, U, j]), J(() => {
842
- R && D("");
843
- }, [R]), je(() => {
844
- var p;
845
- const o = re.current;
846
- if (!o) return;
847
- re.current = null;
848
- const w = $.findIndex((A) => A.id === o.id);
849
- if (w < 0) return;
850
- const O = (o.dir === "up" ? w === 0 : w === $.length - 1) ? o.dir === "up" ? "down" : "up" : o.dir;
851
- (p = Z.current.get(`${o.id}:${O}`)) == null || p.focus();
852
- }, [$]);
853
- const ze = ie(
854
- (o, w) => {
855
- g.isReady() && (g.setColumnVisible(o, w), h(U()));
856
- },
857
- [g, U]
858
- ), Te = ie(
859
- (o, w) => {
860
- if (!g.isReady()) return;
861
- const L = g.getColumns().find((pe) => pe.id === o);
862
- g.moveColumn(o, w);
863
- const O = U();
864
- if (h(O), !E || !L) return;
865
- const p = O.findIndex((pe) => pe.id === o), A = O[p];
866
- if (!A) return;
867
- const se = A.label || o;
868
- if (A.pinned !== L.pinned) {
869
- D(
870
- A.pinned === "start" ? m("dataGrid.announce.columnPinnedStart", { column: se }) : A.pinned === "end" ? m("dataGrid.announce.columnPinnedEnd", { column: se }) : m("dataGrid.announce.columnUnpinned", { column: se })
871
- );
872
- return;
873
- }
874
- D(
875
- m("dataGrid.announce.columnMoved", {
876
- column: se,
877
- position: me(p + 1, T.language),
878
- total: me(O.length, T.language)
879
- })
880
- );
881
- },
882
- [g, U, E, m, T.language]
883
- ), fe = ie(
884
- (o, w) => {
885
- if (o === w) return;
886
- const L = g.getColumns().findIndex((O) => O.id === w);
887
- L < 0 || Te(o, L);
888
- },
889
- [g, Te]
890
- ), ae = f ?? m("dataTable.columnToggle");
891
- return /* @__PURE__ */ z(le.Root, { open: R, onOpenChange: _, children: [
892
- /* @__PURE__ */ s(le.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
893
- H,
894
- {
895
- ref: S,
896
- type: "button",
897
- intent: v,
898
- icon: l ?? /* @__PURE__ */ s(at, { "aria-hidden": !0 }),
899
- tooltip: ae,
900
- "aria-label": ae,
901
- "aria-haspopup": "dialog",
902
- ...y
903
- }
904
- ) }),
905
- /* @__PURE__ */ z(
906
- le.Content,
907
- {
908
- size: "sm",
909
- align: "end",
910
- className: "ds:flex ds:max-h-[var(--radix-popover-content-available-height)] ds:flex-col",
911
- children: [
912
- /* @__PURE__ */ s(le.Heading, { children: ae }),
913
- c ? /* @__PURE__ */ s("div", { className: "ds:mb-[var(--spacing-xs)] ds:border-b ds:border-[color:var(--border)] ds:pb-[var(--spacing-sm)]", children: c }) : null,
914
- /* @__PURE__ */ s(
915
- "ul",
916
- {
917
- className: "ds:flex ds:min-h-0 ds:flex-col ds:gap-[var(--spacing-xs)] ds:overflow-y-auto",
918
- "aria-label": ae,
919
- children: $.map((o, w) => {
920
- const L = ve === o.id, O = Ae === o.id && ve !== o.id;
921
- return /* @__PURE__ */ z(
922
- "li",
923
- {
924
- draggable: !0,
925
- onDragStart: (p) => {
926
- de(o.id), p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", o.id);
927
- },
928
- onDragOver: (p) => {
929
- p.preventDefault(), p.dataTransfer.dropEffect = "move", ne(o.id);
930
- },
931
- onDragLeave: () => {
932
- ne((p) => p === o.id ? null : p);
933
- },
934
- onDrop: (p) => {
935
- p.preventDefault();
936
- const A = p.dataTransfer.getData("text/plain");
937
- A && fe(A, o.id), de(null), ne(null);
938
- },
939
- onDragEnd: () => {
940
- de(null), ne(null);
941
- },
942
- className: qt({
943
- dragging: L,
944
- dragOver: O
945
- }),
946
- children: [
947
- /* @__PURE__ */ s(
948
- "span",
949
- {
950
- "aria-hidden": "true",
951
- className: "ds:cursor-grab ds:text-[color:var(--muted-foreground)] ds:active:cursor-grabbing",
952
- children: /* @__PURE__ */ s(Ye, { className: "ds:size-4" })
953
- }
954
- ),
955
- /* @__PURE__ */ s(
956
- _e,
957
- {
958
- label: o.label,
959
- checked: o.visible,
960
- disabled: o.canHide === !1,
961
- onCheckedChange: (p) => ze(o.id, p === !0)
962
- }
963
- ),
964
- C ? /* @__PURE__ */ z("span", { className: "ds:ms-auto ds:flex ds:items-center", children: [
965
- /* @__PURE__ */ s(
966
- H,
967
- {
968
- ref: (p) => {
969
- p ? Z.current.set(`${o.id}:up`, p) : Z.current.delete(`${o.id}:up`);
970
- },
971
- type: "button",
972
- size: "sm",
973
- intent: "ghost",
974
- icon: /* @__PURE__ */ s(Je, { "aria-hidden": !0 }),
975
- "aria-label": m("dataGrid.toolbar.moveColumnUp", {
976
- column: o.label
977
- }),
978
- disabled: !Ee($, w, w - 1),
979
- onClick: () => {
980
- re.current = { id: o.id, dir: "up" };
981
- const p = $[w - 1];
982
- p && fe(o.id, p.id);
983
- }
984
- }
985
- ),
986
- /* @__PURE__ */ s(
987
- H,
988
- {
989
- ref: (p) => {
990
- p ? Z.current.set(`${o.id}:down`, p) : Z.current.delete(`${o.id}:down`);
991
- },
992
- type: "button",
993
- size: "sm",
994
- intent: "ghost",
995
- icon: /* @__PURE__ */ s(Ke, { "aria-hidden": !0 }),
996
- "aria-label": m("dataGrid.toolbar.moveColumnDown", {
997
- column: o.label
998
- }),
999
- disabled: !Ee($, w, w + 1),
1000
- onClick: () => {
1001
- re.current = { id: o.id, dir: "down" };
1002
- const p = $[w + 1];
1003
- p && fe(o.id, p.id);
1004
- }
1005
- }
1006
- )
1007
- ] }) : null
1008
- ]
1009
- },
1010
- o.id
1011
- );
1012
- })
1013
- }
1014
- ),
1015
- E ? /* @__PURE__ */ s("span", { role: "status", className: "ds:sr-only", children: b }) : null,
1016
- C && g.resetColumns ? /* @__PURE__ */ s("div", { className: "ds:mt-[var(--spacing-xs)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-sm)]", children: /* @__PURE__ */ s(
1017
- oe,
1018
- {
1019
- type: "button",
1020
- intent: "ghost",
1021
- size: "sm",
1022
- startIcon: /* @__PURE__ */ s(Ze, { "aria-hidden": !0, className: "ds:size-4" }),
1023
- onClick: () => {
1024
- var o;
1025
- (o = g.resetColumns) == null || o.call(g), h(U());
1026
- },
1027
- children: m("dataGrid.toolbar.resetColumns")
1028
- }
1029
- ) }) : null,
1030
- u ? /* @__PURE__ */ s("div", { className: "ds:mt-[var(--spacing-xs)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-sm)]", children: u }) : null
1031
- ]
1032
- }
1033
- )
1034
- ] });
1035
- }
1036
- );
1037
- ce.displayName = `${t}.ColumnToggle`;
1038
- const ye = W(
1039
- ({ label: i, icon: f, onAction: l, variant: u = "default", size: c = "sm", ...v }, y) => {
1040
- const { t: S } = q("ui"), m = n("BulkAction");
1041
- ee(m, ["selection"]);
1042
- const T = m.getSelectionCount();
1043
- return T === 0 ? null : /* @__PURE__ */ z(
1044
- oe,
1045
- {
1046
- ref: y,
1047
- type: "button",
1048
- intent: u === "destructive" ? "destructive" : "secondary",
1049
- size: c,
1050
- startIcon: $t(f),
1051
- onClick: () => l(Et(m)),
1052
- "aria-label": `${i} (${S("dataTable.bulkAction", { count: T })})`,
1053
- ...v,
1054
- children: [
1055
- /* @__PURE__ */ s("span", { children: i }),
1056
- /* @__PURE__ */ s(
1057
- "span",
1058
- {
1059
- "aria-hidden": "true",
1060
- className: "ds:ms-[var(--spacing-xs)] ds:opacity-80",
1061
- children: S("dataTable.bulkAction", { count: T })
1062
- }
1063
- )
1064
- ]
1065
- }
1066
- );
1067
- }
1068
- );
1069
- ye.displayName = `${t}.BulkAction`;
1070
- for (const i of [I, N, ue, ce])
1071
- i.rendersIconButton = !0;
1072
- return {
1073
- Root: a,
1074
- FilterBar: d,
1075
- Actions: k,
1076
- Print: Q,
1077
- Refresh: x,
1078
- QuickSearch: P,
1079
- FilterChips: V,
1080
- FacetFilter: ge,
1081
- ExportMenu: ue,
1082
- ExportMenuItemBase: he,
1083
- ColumnToggle: ce,
1084
- BulkAction: ye,
1085
- useSeam: n
1086
- };
1087
- }
1088
- export {
1089
- yn as T,
1090
- Se as a,
1091
- ut as b,
1092
- ct as c,
1093
- pt as d,
1094
- vn as e,
1095
- ot as f,
1096
- mn as g,
1097
- fn as h,
1098
- sn as i,
1099
- dn as j,
1100
- un as k,
1101
- ln as l,
1102
- on as m,
1103
- dt as n,
1104
- lt as o,
1105
- bn as p,
1106
- hn as q,
1107
- gn as r,
1108
- cn as s,
1109
- it as t,
1110
- Et as u,
1111
- pn as w
1112
- };
1113
- //# sourceMappingURL=parts-Wz2LeGnH.js.map