@alfadocs/ui-kit 1.114.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 (416) hide show
  1. package/dist/_chunks/accessible-target-Bs9ELM3l.js +6 -0
  2. package/dist/_chunks/{actions-cell-renderer-BVn3vDTg.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/{ai-permission-notice-BkgcGmu8.js → ai-permission-notice-C-xR2_iS.js} +2 -2
  5. package/dist/_chunks/{alia-sidebar-CKkg3gc8.js → alia-sidebar-BBxbMRmX.js} +2 -2
  6. package/dist/_chunks/{anamnesis-summary-rows-DaS-j8Jd.js → anamnesis-summary-rows-gEXqU5i5.js} +8 -8
  7. package/dist/_chunks/{antenatal-schedule-timeline-DmlXxevC.js → antenatal-schedule-timeline-va9zx7tJ.js} +11 -11
  8. package/dist/_chunks/{appointment-card-FKOnH1uJ.js → appointment-card-BMZoXaGx.js} +4 -4
  9. package/dist/_chunks/{appointment-peek-DWfcpoGy.js → appointment-peek-B1CCv-7J.js} +2 -2
  10. package/dist/_chunks/{appointment-timeline-eOi-y8m3.js → appointment-timeline-0k4LxODn.js} +4 -4
  11. package/dist/_chunks/{appointment-tray-C6oBvsG5.js → appointment-tray-DIxpgIXM.js} +2 -2
  12. package/dist/_chunks/{ar-C4YQVTH6.js → ar-BFvUBJ_g.js} +10 -10
  13. package/dist/_chunks/arrow-down-left-DECv-dJt.js +15 -0
  14. package/dist/_chunks/{balance-badge-cell-BAZynD--.js → balance-badge-cell-L7bD0Nsh.js} +28 -27
  15. package/dist/_chunks/bill-line-table-WEIRDcv6.js +1563 -0
  16. package/dist/_chunks/{bmi-calculator-Ba4yoR31.js → bmi-calculator-BjUfXqcY.js} +2 -2
  17. package/dist/_chunks/buildMatchPatternFn-jbaE1-W0.js +68 -0
  18. package/dist/_chunks/{button-group-CUnNnt8a.js → button-group-BvU9vRnX.js} +2 -2
  19. package/dist/_chunks/{calculator-dialog-D4TyJwqy.js → calculator-dialog-BGX5XQCM.js} +2 -2
  20. package/dist/_chunks/{calendar-appointment-editor-dialog-iyh9QqNw.js → calendar-appointment-editor-dialog-DqZMb4yd.js} +527 -539
  21. package/dist/_chunks/{care-plan-card-DMjlYlFc.js → care-plan-card-CfV8jiF0.js} +3 -3
  22. package/dist/_chunks/{care-plan-entry-card-3hguBW45.js → care-plan-entry-card-Bt01kyTl.js} +4 -4
  23. package/dist/_chunks/{chart-bddVIElM.js → chart-BSx8cfMm.js} +2 -2
  24. package/dist/_chunks/{chat-container-baxzy8k8.js → chat-container-B83b4hut.js} +2 -2
  25. package/dist/_chunks/checkbox-DV4sNDeB.js +282 -0
  26. package/dist/_chunks/{checkbox-group-eGdv9fZc.js → checkbox-group-EfinQS1h.js} +2 -2
  27. package/dist/_chunks/chevrons-up-down-CgiVAHb7.js +15 -0
  28. package/dist/_chunks/circle-off-DuT9pVy2.js +16 -0
  29. package/dist/_chunks/combobox-BBCVQS-S.js +935 -0
  30. package/dist/_chunks/compact-editor-fields-6sTWRLtf.js +21 -0
  31. package/dist/_chunks/{contact-profile-card-DMXWBBkU.js → contact-profile-card-BRCHbQ3-.js} +2 -2
  32. package/dist/_chunks/{country-select-CUuGOAoZ.js → country-select-C2GdvRtS.js} +2 -2
  33. package/dist/_chunks/{cycle-calculator-Dd-XbKmZ.js → cycle-calculator-Brd0PP4U.js} +6 -6
  34. package/dist/_chunks/{dashboard-grid-DrOkTtya.js → dashboard-grid-3aidD-IQ.js} +2 -2
  35. package/dist/_chunks/data-grid-ByhrYGVw.js +9814 -0
  36. package/dist/_chunks/data-grid-tabs-D9Y4DeeH.js +365 -0
  37. package/dist/_chunks/data-table-B47iw2CO.js +1694 -0
  38. package/dist/_chunks/data-table-tabs-NYLhD8_Z.js +242 -0
  39. package/dist/_chunks/date-locale-OG-MupVD.js +83 -0
  40. package/dist/_chunks/{date-picker-CdhXlgVI.js → date-picker-DBVTj6lO.js} +21 -20
  41. package/dist/_chunks/{date-picker-variants-Dt6UbonG.js → date-picker-variants-J1EeAhIH.js} +601 -678
  42. package/dist/_chunks/date-range-panel-B-DUtfw3.js +62 -0
  43. package/dist/_chunks/{date-range-picker-DCADIR8o.js → date-range-picker-PTRpDkXT.js} +72 -70
  44. package/dist/_chunks/{date-time-picker-CT2bC7-A.js → date-time-picker-CJnqiQoT.js} +22 -21
  45. package/dist/_chunks/{de-B1B3PIgY.js → de-i9wbjGPc.js} +2 -2
  46. package/dist/_chunks/default-tabs-BQcSqcNG.js +2250 -0
  47. package/dist/_chunks/dialog-CIUn5oLb.js +348 -0
  48. package/dist/_chunks/{document-preview-WvJKHJOP.js → document-preview-B_JGHsEW.js} +2 -2
  49. package/dist/_chunks/{dropdown-menu-CqxBthww.js → dropdown-menu-Dmbak7q6.js} +320 -248
  50. package/dist/_chunks/{due-date-calculator-Dl6SyMHO.js → due-date-calculator-DzIQXEX5.js} +7 -7
  51. package/dist/_chunks/{editable-currency-cell-renderer-BUdFMh67.js → editable-currency-cell-renderer-p-Q1UkZS.js} +3 -3
  52. package/dist/_chunks/{el-iLqGpapg.js → el-Cm-rWthb.js} +20 -20
  53. package/dist/_chunks/{en-GB-CxPRQbD6.js → en-GB-BHn82gW8.js} +11 -10
  54. package/dist/_chunks/en-US-C4QKhzhA.js +46 -0
  55. package/dist/_chunks/{es-Bg1oqwDs.js → es-B_6Z19UA.js} +4 -4
  56. package/dist/_chunks/export-files-BByoK9Cg.js +248 -0
  57. package/dist/_chunks/{face-scheme-DlcQaQVR.js → face-scheme-CEjJUnNe.js} +19 -18
  58. package/dist/_chunks/{fetal-weight-DmZzMRzB.js → fetal-weight-CJTlfh_k.js} +2 -2
  59. package/dist/_chunks/{file-manager-LG7B_UHB.js → file-manager-DEe51ZDe.js} +5 -5
  60. package/dist/_chunks/format-price-CIX0YJZn.js +179 -0
  61. package/dist/_chunks/format-ql5WTsYT.js +846 -0
  62. package/dist/_chunks/{fr-DpGxyOGI.js → fr-gTba51QO.js} +7 -7
  63. package/dist/_chunks/funnel-DpPV3Qkd.js +20 -0
  64. package/dist/_chunks/{gestational-age-calculator-DmzYdW5e.js → gestational-age-calculator-60y1RyQL.js} +7 -7
  65. package/dist/_chunks/grid-context-jn9y8tNE.js +46 -0
  66. package/dist/_chunks/{hcg-doubling-Tr72PetS.js → hcg-doubling-BUZQkSYC.js} +7 -6
  67. package/dist/_chunks/{header-settings-Df9q1uHt.js → header-settings-DNgvO8fS.js} +2 -2
  68. package/dist/_chunks/{heatmap-CNxCDl0D.js → heatmap-tn1WxoMT.js} +4 -4
  69. package/dist/_chunks/{help-me-write-templates-CWxgjDZl.js → help-me-write-templates-C28E_rOt.js} +2 -2
  70. package/dist/_chunks/{hi-3Dtsksrw.js → hi-BIHq9ncx.js} +10 -10
  71. package/dist/_chunks/highlighter-DSkckT2Q.js +15 -0
  72. package/dist/_chunks/icon-button-group-Ca2VkXy5.js +442 -0
  73. package/dist/_chunks/{index-CJE9uQmb.js → index-Bze5jCG_.js} +2 -1
  74. package/dist/_chunks/{isSameWeek-DyVftHWi.js → isSameWeek-CZOtDcsd.js} +2 -2
  75. package/dist/_chunks/{it-Cp0CA13d.js → it-DaCPWJ9Y.js} +11 -11
  76. package/dist/_chunks/{ja-9FOyR1lb.js → ja-BRCpkD95.js} +26 -26
  77. package/dist/_chunks/{kit-extensions-DZJRmDI6.js → kit-extensions-BFfLg7c-.js} +7 -7
  78. package/dist/_chunks/link-cell-renderer-D-Io828l.js +800 -0
  79. package/dist/_chunks/{login-dev-card-D7orCfJT.js → login-dev-card-CPndtWdz.js} +2 -2
  80. package/dist/_chunks/{marketplace-app-shell-CPNVBVLH.js → marketplace-app-shell-CBHNg8x-.js} +5 -5
  81. package/dist/_chunks/match-BATShpSX.js +336 -0
  82. package/dist/_chunks/money-OE6_oDPH.js +138 -0
  83. package/dist/_chunks/{muscle-scheme-BkmDUTmk.js → muscle-scheme-7UsRsCHP.js} +2 -2
  84. package/dist/_chunks/{nl-sfx-zJgR.js → nl-5tAwYo00.js} +6 -6
  85. package/dist/_chunks/normalizeDates-BBNNIR-v.js +36 -0
  86. package/dist/_chunks/{notes-panel-DXMTObBv.js → notes-panel-DexbfrFo.js} +3 -3
  87. package/dist/_chunks/number-input-DUSvP7Dq.js +625 -0
  88. package/dist/_chunks/{optical-prescription-CvbN8yD2.js → optical-prescription-Da_r8pMr.js} +2 -2
  89. package/dist/_chunks/{parse-B0s7bY4d.js → parse-BLBWPIgE.js} +63 -61
  90. package/dist/_chunks/{parseISO-DZZ5a-zK.js → parseISO-Dl4T9peU.js} +2 -2
  91. package/dist/_chunks/parts-CtcTW1PN.js +869 -0
  92. package/dist/_chunks/{patient-details-DdtXBNjt.js → patient-details-PJ0Y__7t.js} +2 -2
  93. package/dist/_chunks/{patient-field-row-D9rb-QJH.js → patient-field-row-0QP8KCVp.js} +7 -7
  94. package/dist/_chunks/{patient-search-DDRDCjZi.js → patient-search-Bdx_Ob3y.js} +2 -2
  95. package/dist/_chunks/{patient-summary-card-CGHz-Bvm.js → patient-summary-card-BOfXDP8a.js} +4 -4
  96. package/dist/_chunks/{payment-request-card-BmV2pLoM.js → payment-request-card-_04afZEx.js} +14 -13
  97. package/dist/_chunks/{periodontal-diagnosis-xheWfi4g.js → periodontal-diagnosis-DnZuZD14.js} +2 -2
  98. package/dist/_chunks/{permission-matrix-BJ6sg3Zp.js → permission-matrix-BXmhICzN.js} +3 -3
  99. package/dist/_chunks/{pl-BLh7KO-s.js → pl-mLYbfByR.js} +7 -7
  100. package/dist/_chunks/{practice-results-BlxfBx-D.js → practice-results-CrBjScXX.js} +3 -3
  101. package/dist/_chunks/{pregnancy-dating-BvorzHrd.js → pregnancy-dating-Bg_VUPwl.js} +8 -8
  102. package/dist/_chunks/{pregnancy-weight-gain-DQoOM8QV.js → pregnancy-weight-gain-B-eXFdmq.js} +2 -2
  103. package/dist/_chunks/privacy-mask-BlJK51MD.js +78 -0
  104. package/dist/_chunks/privacy-mask-text-B8YfzB7L.js +7 -0
  105. package/dist/_chunks/{province-select-cVOlwEc5.js → province-select-CTM8A9SM.js} +2 -2
  106. package/dist/_chunks/{pt-CPKOrOLj.js → pt-CgaqtlD9.js} +6 -6
  107. package/dist/_chunks/{radiograph-panel.agent-CXah49KM.js → radiograph-panel.agent-9jwXlOXB.js} +4 -4
  108. package/dist/_chunks/{registration-form-Lw9T7IXr.js → registration-form-DW-0X7S4.js} +2 -2
  109. package/dist/_chunks/{reserved.agent-D2jwJPac.js → reserved.agent-C1zRHaya.js} +12 -12
  110. package/dist/_chunks/{rich-text-editor-BLS2cK-u.js → rich-text-editor-r80Zw8ll.js} +14 -13
  111. package/dist/_chunks/{ro-Dc-oNqbF.js → ro-CpDg1-8v.js} +2 -2
  112. package/dist/_chunks/row-actions-Df7TJbNR.js +213 -0
  113. package/dist/_chunks/{ru-BtNpDZRR.js → ru-B7VMyjud.js} +9 -9
  114. package/dist/_chunks/saved-view-tabs-DLWm88Eq.js +932 -0
  115. package/dist/_chunks/{send-registration-link-form-DfbTjrEK.js → send-registration-link-form-DWxWa_cJ.js} +5 -5
  116. package/dist/_chunks/{sidebar-2VsPlNkZ.js → sidebar-D5DFYN5K.js} +326 -335
  117. package/dist/_chunks/{signature-request-BnTihryS.js → signature-request-CgvjLic3.js} +3 -3
  118. package/dist/_chunks/{slot-grid-BhjaLJ0o.js → slot-grid-b4eZXokb.js} +3 -3
  119. package/dist/_chunks/{sq-D4c7olaV.js → sq-B0Ree_9P.js} +2 -2
  120. package/dist/_chunks/subDays-Bsoy023P.js +8 -0
  121. package/dist/_chunks/{sv-Bf_dHPvh.js → sv-D9fP66O7.js} +4 -4
  122. package/dist/_chunks/{tab-bar-C_pggqVr.js → tab-bar-DTn8pHqH.js} +2 -2
  123. package/dist/_chunks/{tabs-CXYjr_8O.js → tabs-CsmgkiG6.js} +2 -2
  124. package/dist/_chunks/{tag-DOZGz0fT.js → tag-BNlcEJfE.js} +70 -67
  125. package/dist/_chunks/{task-card-DqVoitRk.js → task-card-BNbkwIYM.js} +2 -2
  126. package/dist/_chunks/{task-editor-D--LwVrg.js → task-editor-DgUjtqpX.js} +386 -410
  127. package/dist/_chunks/{task-tray-C6j8HVMv.js → task-tray-Bmi9wCHq.js} +2 -2
  128. package/dist/_chunks/{tasks-panel-D6PuF4MQ.js → tasks-panel-B5Nsf10r.js} +3 -3
  129. package/dist/_chunks/{theme-toggle-Czq3K9jB.js → theme-toggle-DfvdEg_V.js} +3 -3
  130. package/dist/_chunks/{token-insert-menu-Dl3x2ekR.js → token-insert-menu-BdcmK5Um.js} +2 -2
  131. package/dist/_chunks/toolbar-DbUQBrq4.js +159 -0
  132. package/dist/_chunks/{tooth-scheme-C-ALCHaV.js → tooth-scheme-LTkT4EXd.js} +2 -2
  133. package/dist/_chunks/{tr-xqQ6cbGY.js → tr-Bcz5LCHZ.js} +2 -2
  134. package/dist/_chunks/{transaction-chip-CohY6sTA.js → transaction-chip-CkYd-3ky.js} +47 -57
  135. package/dist/_chunks/{transcript-panel-A781Pkzr.js → transcript-panel-Wr8e4Zgi.js} +2 -2
  136. package/dist/_chunks/{treatment-receipt-pFqWFyD_.js → treatment-receipt-1VnuinhY.js} +3 -3
  137. package/dist/_chunks/undo-2-EBxWjj1W.js +15 -0
  138. package/dist/_chunks/{unit-converter-D77vmlzN.js → unit-converter-YKlHyUC2.js} +2 -2
  139. package/dist/_chunks/{use-appointment-details-read-BK_Gw1GG.js → use-appointment-details-read-_r7cjTtm.js} +8 -8
  140. package/dist/_chunks/{verify-identity-types-C85EXNzy.js → verify-identity-types-D_LdByCp.js} +2 -2
  141. package/dist/_chunks/{voice-control-panel-BGiX4sqB.js → voice-control-panel-Be_c0CQ0.js} +2 -2
  142. package/dist/_chunks/{widget-picker-U4JsEhQE.js → widget-picker-DrxJjEkv.js} +2 -2
  143. package/dist/_chunks/{workflow-map-B4XkcET0.js → workflow-map-D-u8_YSr.js} +2 -2
  144. package/dist/_chunks/{workflow-status-9wb7iWUd.js → workflow-status-fykpTxfb.js} +2 -2
  145. package/dist/_chunks/{workflow-webhook-action-CtBn5JvO.js → workflow-webhook-action-DM3W8XZE.js} +3 -3
  146. package/dist/_chunks/{zh-CN-C657DBCO.js → zh-CN-B7Ek17US.js} +11 -11
  147. package/dist/agent-catalog.json +3359 -1569
  148. package/dist/agent-i18n/en.json +100 -2
  149. package/dist/components/_shared/accessible-target.d.ts +12 -0
  150. package/dist/components/_shared/decimal.d.ts +171 -0
  151. package/dist/components/_shared/format-price.d.ts +54 -2
  152. package/dist/components/_shared/privacy-mask-text.d.ts +4 -0
  153. package/dist/components/_shared/privacy-mask.d.ts +2 -4
  154. package/dist/components/_shared/saved-view-tabs/saved-tab.d.ts +54 -0
  155. package/dist/components/_shared/saved-view-tabs/saved-view-tabs.d.ts +93 -0
  156. package/dist/components/_shared/saved-view-tabs/use-saved-view-tabs.d.ts +59 -0
  157. package/dist/components/_shared/saved-view-tabs/view-adapter.d.ts +69 -0
  158. package/dist/components/_shared/table-filters/calendar-day.d.ts +27 -0
  159. package/dist/components/_shared/table-filters/predicates.d.ts +56 -0
  160. package/dist/components/_shared/table-toolbar/context.d.ts +28 -0
  161. package/dist/components/_shared/table-toolbar/describe-filter.d.ts +42 -0
  162. package/dist/components/_shared/table-toolbar/export-files.d.ts +47 -0
  163. package/dist/components/{data-table/xlsx-export.d.ts → _shared/table-toolbar/export-xlsx.d.ts} +2 -2
  164. package/dist/components/_shared/table-toolbar/parts.d.ts +125 -0
  165. package/dist/components/_shared/table-toolbar/seam.d.ts +261 -0
  166. package/dist/components/address-fields/index.js +1 -1
  167. package/dist/components/ai-permission-notice/index.js +1 -1
  168. package/dist/components/appointment-card/index.js +2 -2
  169. package/dist/components/appointment-details-panel/index.js +1 -1
  170. package/dist/components/appointment-peek/index.js +1 -1
  171. package/dist/components/appointment-timeline/index.js +1 -1
  172. package/dist/components/bill-line-table/bill-line-table.agent.d.ts +4 -0
  173. package/dist/components/bill-line-table/bill-line-table.columns.d.ts +47 -0
  174. package/dist/components/bill-line-table/bill-line-table.d.ts +4 -0
  175. package/dist/components/bill-line-table/bill-line-table.model.d.ts +173 -0
  176. package/dist/components/bill-line-table/bill-line-table.types.d.ts +443 -0
  177. package/dist/components/bill-line-table/bill-line-table.variants.d.ts +34 -0
  178. package/dist/components/bill-line-table/index.d.ts +6 -0
  179. package/dist/components/bill-line-table/index.js +23 -0
  180. package/dist/components/bill-table/bill-table.agent.d.ts +4 -0
  181. package/dist/components/bill-table/bill-table.d.ts +13 -0
  182. package/dist/components/bill-table/bill-table.variants.d.ts +55 -0
  183. package/dist/components/bill-table/cells.d.ts +89 -0
  184. package/dist/components/bill-table/columns.d.ts +21 -0
  185. package/dist/components/bill-table/default-tabs.d.ts +21 -0
  186. package/dist/components/bill-table/handle.d.ts +19 -0
  187. package/dist/components/bill-table/index.d.ts +7 -0
  188. package/dist/components/bill-table/index.js +19 -0
  189. package/dist/components/bill-table/model.d.ts +103 -0
  190. package/dist/components/bill-table/row-actions.d.ts +27 -0
  191. package/dist/components/bill-table/status-maps.d.ts +225 -0
  192. package/dist/components/bill-table/types.d.ts +542 -0
  193. package/dist/components/bmi-calculator/index.js +1 -1
  194. package/dist/components/booking/index.js +1 -1
  195. package/dist/components/button-group/index.js +1 -1
  196. package/dist/components/calculator-dialog/index.js +1 -1
  197. package/dist/components/care-plan-card/index.js +1 -1
  198. package/dist/components/care-plan-entry-card/index.js +1 -1
  199. package/dist/components/chart/index.js +1 -1
  200. package/dist/components/chat-container/index.js +1 -1
  201. package/dist/components/checkbox/checkbox.d.ts +66 -6
  202. package/dist/components/checkbox/index.js +1 -1
  203. package/dist/components/checkbox-group/index.js +1 -1
  204. package/dist/components/combobox/combobox.d.ts +59 -1
  205. package/dist/components/combobox/index.d.ts +1 -1
  206. package/dist/components/combobox/index.js +1 -1
  207. package/dist/components/contact-profile-card/index.js +1 -1
  208. package/dist/components/country-select/index.js +1 -1
  209. package/dist/components/cycle-calculator/index.js +1 -1
  210. package/dist/components/dashboard-grid/index.js +1 -1
  211. package/dist/components/data-grid/announcer.d.ts +27 -0
  212. package/dist/components/data-grid/body.d.ts +101 -0
  213. package/dist/components/data-grid/columns.d.ts +96 -0
  214. package/dist/components/data-grid/data-grid.agent.d.ts +2 -1
  215. package/dist/components/data-grid/data-grid.d.ts +11 -27
  216. package/dist/components/data-grid/data-grid.variants.d.ts +110 -0
  217. package/dist/components/data-grid/editors.d.ts +14 -0
  218. package/dist/components/data-grid/export-snapshot.d.ts +3 -0
  219. package/dist/components/data-grid/features.d.ts +56 -0
  220. package/dist/components/data-grid/filter-fns.d.ts +23 -0
  221. package/dist/components/data-grid/filters/date-range-panel.d.ts +8 -0
  222. package/dist/components/data-grid/filters/filter-panels.d.ts +27 -0
  223. package/dist/components/data-grid/filters/filter-trigger.d.ts +7 -0
  224. package/dist/components/data-grid/footer.d.ts +10 -0
  225. package/dist/components/data-grid/grid-context.d.ts +18 -0
  226. package/dist/components/data-grid/handle.d.ts +60 -0
  227. package/dist/components/data-grid/header.d.ts +12 -0
  228. package/dist/components/data-grid/index.d.ts +3 -0
  229. package/dist/components/data-grid/index.js +11 -3
  230. package/dist/components/data-grid/keyboard.d.ts +76 -0
  231. package/dist/components/data-grid/pager.d.ts +18 -0
  232. package/dist/components/data-grid/persistence.d.ts +60 -0
  233. package/dist/components/data-grid/print.d.ts +10 -0
  234. package/dist/components/data-grid/responsive.d.ts +36 -0
  235. package/dist/components/data-grid/selection.d.ts +68 -0
  236. package/dist/components/data-grid/state.d.ts +119 -0
  237. package/dist/components/data-grid/states.d.ts +34 -0
  238. package/dist/components/data-grid/toolbar-seam.d.ts +7 -0
  239. package/dist/components/data-grid/toolbar.d.ts +41 -0
  240. package/dist/components/data-grid/types.d.ts +1396 -0
  241. package/dist/components/data-grid/use-data-grid-engine.d.ts +9 -0
  242. package/dist/components/data-grid/virtual-rows.d.ts +43 -0
  243. package/dist/components/data-grid-tabs/data-grid-tabs.agent.d.ts +9 -0
  244. package/dist/components/data-grid-tabs/data-grid-tabs.d.ts +4 -0
  245. package/dist/components/data-grid-tabs/grid-view-adapter.d.ts +15 -0
  246. package/dist/components/data-grid-tabs/index.d.ts +5 -0
  247. package/dist/components/data-grid-tabs/index.js +8 -0
  248. package/dist/components/data-grid-tabs/types.d.ts +220 -0
  249. package/dist/components/data-table/ag-toolbar-seam.d.ts +35 -0
  250. package/dist/components/data-table/calendar-day.d.ts +4 -21
  251. package/dist/components/data-table/data-table.d.ts +10 -6
  252. package/dist/components/data-table/filters/date-range-filter.d.ts +5 -9
  253. package/dist/components/data-table/filters/filter-kind.d.ts +6 -0
  254. package/dist/components/data-table/filters/number-filter.d.ts +6 -10
  255. package/dist/components/data-table/filters/select-filter.d.ts +2 -4
  256. package/dist/components/data-table/filters/text-filter.d.ts +2 -5
  257. package/dist/components/data-table/index.js +4 -4
  258. package/dist/components/data-table/toolbar.d.ts +25 -21
  259. package/dist/components/data-table-tabs/ag-view-adapter.d.ts +17 -0
  260. package/dist/components/data-table-tabs/data-table-tabs.d.ts +34 -33
  261. package/dist/components/data-table-tabs/index.js +1 -1
  262. package/dist/components/data-table-tabs/use-data-table-filter-tabs.d.ts +11 -66
  263. package/dist/components/date-picker/index.js +1 -1
  264. package/dist/components/date-range-picker/index.js +1 -1
  265. package/dist/components/date-time-picker/index.js +1 -1
  266. package/dist/components/dialog/focus-return.d.ts +12 -0
  267. package/dist/components/dialog/index.js +1 -1
  268. package/dist/components/document-preview/index.js +1 -1
  269. package/dist/components/dropdown-menu/dropdown-menu.d.ts +11 -0
  270. package/dist/components/dropdown-menu/index.js +1 -1
  271. package/dist/components/due-date-calculator/index.js +2 -2
  272. package/dist/components/face-scheme/index.js +1 -1
  273. package/dist/components/fetal-weight/index.js +1 -1
  274. package/dist/components/file-manager/index.js +1 -1
  275. package/dist/components/gestational-age-calculator/index.js +1 -1
  276. package/dist/components/hcg-doubling/index.js +1 -1
  277. package/dist/components/header-settings/index.js +1 -1
  278. package/dist/components/heatmap/index.js +1 -1
  279. package/dist/components/icon-button-group/icon-button-group.d.ts +19 -1
  280. package/dist/components/icon-button-group/index.d.ts +1 -1
  281. package/dist/components/icon-button-group/index.js +1 -1
  282. package/dist/components/index.d.ts +7 -0
  283. package/dist/components/money/index.js +1 -1
  284. package/dist/components/money/money.d.ts +39 -6
  285. package/dist/components/muscle-scheme/index.js +1 -1
  286. package/dist/components/notes-panel/index.js +1 -1
  287. package/dist/components/number-input/index.d.ts +2 -2
  288. package/dist/components/number-input/index.js +1 -1
  289. package/dist/components/number-input/number-input.d.ts +43 -2
  290. package/dist/components/number-input/use-locale-number.d.ts +67 -3
  291. package/dist/components/optical-prescription/index.js +1 -1
  292. package/dist/components/patient-details/index.js +1 -1
  293. package/dist/components/patient-search/index.js +1 -1
  294. package/dist/components/patient-summary-card/index.js +1 -1
  295. package/dist/components/patient-table/index.js +1 -1
  296. package/dist/components/payment-card/index.js +1 -1
  297. package/dist/components/periodontal-diagnosis/index.js +1 -1
  298. package/dist/components/permission-matrix/index.js +1 -1
  299. package/dist/components/practice-results/index.js +1 -1
  300. package/dist/components/pregnancy-dating/index.js +1 -1
  301. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  302. package/dist/components/province-select/index.js +1 -1
  303. package/dist/components/radiograph-panel/index.js +1 -1
  304. package/dist/components/rich-text-editor/index.js +2 -2
  305. package/dist/components/row-actions/index.d.ts +3 -0
  306. package/dist/components/row-actions/index.js +5 -0
  307. package/dist/components/row-actions/row-actions.d.ts +63 -0
  308. package/dist/components/sidebar/index.js +1 -1
  309. package/dist/components/skeleton-scheme/index.js +1 -1
  310. package/dist/components/slot-grid/index.js +1 -1
  311. package/dist/components/smart-date/smart-date.d.ts +1 -1
  312. package/dist/components/tab-bar/index.js +1 -1
  313. package/dist/components/tabs/index.js +1 -1
  314. package/dist/components/tag/index.js +1 -1
  315. package/dist/components/task-card/index.js +1 -1
  316. package/dist/components/task-editor/index.js +1 -1
  317. package/dist/components/task-tray/index.js +1 -1
  318. package/dist/components/tasks-panel/index.js +1 -1
  319. package/dist/components/theme-toggle/index.js +1 -1
  320. package/dist/components/token-insert-menu/index.js +1 -1
  321. package/dist/components/tooth-scheme/index.js +1 -1
  322. package/dist/components/transaction-chip/index.js +1 -1
  323. package/dist/components/transaction-chip/transaction-chip.d.ts +1 -1
  324. package/dist/components/transcript-panel/index.js +1 -1
  325. package/dist/components/treatment-receipt/index.js +1 -1
  326. package/dist/components/unit-converter/index.js +1 -1
  327. package/dist/components/voice-control-panel/index.js +1 -1
  328. package/dist/components/widget-picker/index.js +1 -1
  329. package/dist/components/workflow/index.js +1 -1
  330. package/dist/components/workflow-status/index.js +1 -1
  331. package/dist/core.css +1 -1
  332. package/dist/decimal/index.js +149 -0
  333. package/dist/host-compat.css +36 -2
  334. package/dist/i18n/locales/ar.d.ts +342 -0
  335. package/dist/i18n/locales/ar.js +344 -2
  336. package/dist/i18n/locales/de.d.ts +342 -0
  337. package/dist/i18n/locales/de.js +344 -2
  338. package/dist/i18n/locales/el.d.ts +342 -0
  339. package/dist/i18n/locales/el.js +344 -2
  340. package/dist/i18n/locales/en.d.ts +342 -0
  341. package/dist/i18n/locales/en.js +345 -2
  342. package/dist/i18n/locales/es.d.ts +342 -0
  343. package/dist/i18n/locales/es.js +344 -2
  344. package/dist/i18n/locales/fr.d.ts +342 -0
  345. package/dist/i18n/locales/fr.js +344 -2
  346. package/dist/i18n/locales/hi.d.ts +342 -0
  347. package/dist/i18n/locales/hi.js +344 -2
  348. package/dist/i18n/locales/it.d.ts +342 -0
  349. package/dist/i18n/locales/it.js +344 -2
  350. package/dist/i18n/locales/ja.d.ts +342 -0
  351. package/dist/i18n/locales/ja.js +344 -2
  352. package/dist/i18n/locales/nl.d.ts +342 -0
  353. package/dist/i18n/locales/nl.js +344 -2
  354. package/dist/i18n/locales/pl.d.ts +342 -0
  355. package/dist/i18n/locales/pl.js +344 -2
  356. package/dist/i18n/locales/pt.d.ts +342 -0
  357. package/dist/i18n/locales/pt.js +344 -2
  358. package/dist/i18n/locales/ro.d.ts +342 -0
  359. package/dist/i18n/locales/ro.js +344 -2
  360. package/dist/i18n/locales/ru.d.ts +342 -0
  361. package/dist/i18n/locales/ru.js +344 -2
  362. package/dist/i18n/locales/sq.d.ts +342 -0
  363. package/dist/i18n/locales/sq.js +344 -2
  364. package/dist/i18n/locales/sv.d.ts +342 -0
  365. package/dist/i18n/locales/sv.js +344 -2
  366. package/dist/i18n/locales/tr.d.ts +342 -0
  367. package/dist/i18n/locales/tr.js +344 -2
  368. package/dist/i18n/locales/zh.d.ts +342 -0
  369. package/dist/i18n/locales/zh.js +344 -2
  370. package/dist/index.js +1305 -1241
  371. package/dist/locales/ar.json +344 -2
  372. package/dist/locales/de.json +344 -2
  373. package/dist/locales/el.json +344 -2
  374. package/dist/locales/en.json +344 -2
  375. package/dist/locales/es.json +344 -2
  376. package/dist/locales/fr.json +344 -2
  377. package/dist/locales/hi.json +344 -2
  378. package/dist/locales/it.json +344 -2
  379. package/dist/locales/ja.json +344 -2
  380. package/dist/locales/nl.json +344 -2
  381. package/dist/locales/pl.json +344 -2
  382. package/dist/locales/pt.json +344 -2
  383. package/dist/locales/ro.json +344 -2
  384. package/dist/locales/ru.json +344 -2
  385. package/dist/locales/sq.json +344 -2
  386. package/dist/locales/sv.json +344 -2
  387. package/dist/locales/tr.json +344 -2
  388. package/dist/locales/zh.json +344 -2
  389. package/dist/patterns/alia-assistant/index.js +1 -1
  390. package/dist/patterns/anamnesis/index.js +1 -1
  391. package/dist/patterns/calendar/index.js +1 -1
  392. package/dist/patterns/help-me-write-templates/index.js +1 -1
  393. package/dist/patterns/login-form/index.js +1 -1
  394. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  395. package/dist/patterns/registration-form/index.js +1 -1
  396. package/dist/patterns/send-registration-link-form/index.js +1 -1
  397. package/dist/patterns/signature-request/index.js +1 -1
  398. package/dist/patterns/verify-identity/index.js +1 -1
  399. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  400. package/dist/tokens.css +1 -1
  401. package/package.json +21 -1
  402. package/dist/_chunks/checkbox-a7Sh-dXb.js +0 -227
  403. package/dist/_chunks/combobox-duuDRI1t.js +0 -688
  404. package/dist/_chunks/data-grid.agent-CASyEAnb.js +0 -1773
  405. package/dist/_chunks/data-table-C9idMvs0.js +0 -2042
  406. package/dist/_chunks/data-table-tabs-Db7zToFD.js +0 -728
  407. package/dist/_chunks/dialog-BTjSQjdY.js +0 -274
  408. package/dist/_chunks/format--x5jypvH.js +0 -1319
  409. package/dist/_chunks/format-price-BcFBa-WP.js +0 -52
  410. package/dist/_chunks/icon-button-group-mXvYDaba.js +0 -427
  411. package/dist/_chunks/link-cell-renderer-_Fv3WEmb.js +0 -867
  412. package/dist/_chunks/money-Tsczpjfz.js +0 -102
  413. package/dist/_chunks/number-input-CVwI1ltI.js +0 -423
  414. package/dist/_chunks/privacy-mask-Dc3kdkCR.js +0 -81
  415. package/dist/_chunks/subDays-DKISP2nE.js +0 -8
  416. package/dist/_chunks/undo-2-CYNAzclj.js +0 -26
@@ -0,0 +1,2250 @@
1
+ import { jsxs as T, jsx as l, Fragment as ne } from "react/jsx-runtime";
2
+ import { useId as Ee, useMemo as M, createElement as ft, forwardRef as yt, useRef as K, useState as ht, useImperativeHandle as gt, useCallback as Tt } from "react";
3
+ import { useTranslation as v } from "react-i18next";
4
+ import { u as St } from "./registry-DvAUVLHh.js";
5
+ import { D as vt, e as wt } from "./data-grid-ByhrYGVw.js";
6
+ import { D as N } from "./toolbar-DbUQBrq4.js";
7
+ import { I as It } from "./icon-button-group-Ca2VkXy5.js";
8
+ import { c as w } from "./index-D2ZczOXr.js";
9
+ import { b as kt, a as Nt } from "./accessible-target-Bs9ELM3l.js";
10
+ import { R as Lt } from "./row-actions-Df7TJbNR.js";
11
+ import { V as Be } from "./visually-hidden-BHxEUGyT.js";
12
+ import { B as At } from "./badge-BUk4RjTS.js";
13
+ import { B as Ot } from "./button-DohK_Ak_.js";
14
+ import { I as _t } from "./icon-button-S8_weU3g.js";
15
+ import { I as Dt } from "./info-tip-C-MPkShR.js";
16
+ import { M as oe } from "./money-OE6_oDPH.js";
17
+ import { P as F } from "./popover-CN5IsOeS.js";
18
+ import { a as Ct } from "./format-number-DdzqwMs1.js";
19
+ import { decimalToNumber as Rt } from "../decimal/index.js";
20
+ import { f as Pt } from "./intl-locale-FWh-Y5_3.js";
21
+ import { I as Et } from "./info-CGn22peZ.js";
22
+ import { A as Bt } from "./arrow-down-left-DECv-dJt.js";
23
+ import { A as xt } from "./arrow-up-right-C2v_MKsK.js";
24
+ import { i as Ft } from "./is-development-CLUAnsU7.js";
25
+ import { F as xe } from "./file-text-5yv6r2ls.js";
26
+ import { c as le } from "./createLucideIcon-DhHxpK9K.js";
27
+ import { P as Wt } from "./pencil-B1sKKyuT.js";
28
+ import { C as Mt } from "./circle-off-DuT9pVy2.js";
29
+ import { U as Ut } from "./undo-2-EBxWjj1W.js";
30
+ import { T as Kt } from "./trash-2-uumy3fy1.js";
31
+ /**
32
+ * @license lucide-react v1.22.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */
37
+ const Vt = [
38
+ [
39
+ "path",
40
+ {
41
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
42
+ key: "1oefj6"
43
+ }
44
+ ],
45
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
46
+ ["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
47
+ ["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }]
48
+ ], Fe = le("file-code", Vt);
49
+ /**
50
+ * @license lucide-react v1.22.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */
55
+ const zt = [
56
+ ["path", { d: "M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17", key: "geh8rc" }],
57
+ [
58
+ "path",
59
+ {
60
+ d: "m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",
61
+ key: "1fto5m"
62
+ }
63
+ ],
64
+ ["path", { d: "m2 16 6 6", key: "1pfhp9" }],
65
+ ["circle", { cx: "16", cy: "9", r: "2.9", key: "1n0dlu" }],
66
+ ["circle", { cx: "6", cy: "5", r: "3", key: "151irh" }]
67
+ ], jt = le("hand-coins", zt);
68
+ /**
69
+ * @license lucide-react v1.22.0 - ISC
70
+ *
71
+ * This source code is licensed under the ISC license.
72
+ * See the LICENSE file in the root directory of this source tree.
73
+ */
74
+ const qt = [
75
+ ["path", { d: "M12 22V12", key: "d0xqtd" }],
76
+ ["path", { d: "M16 17h6", key: "1ook5g" }],
77
+ ["path", { d: "M19 14v6", key: "1ckrd5" }],
78
+ [
79
+ "path",
80
+ {
81
+ d: "M21 10.535V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.675-.955",
82
+ key: "28k6lz"
83
+ }
84
+ ],
85
+ ["path", { d: "M3.29 7 12 12l8.71-5", key: "19ckod" }],
86
+ ["path", { d: "m7.5 4.27 8.997 5.148", key: "9yrvtv" }]
87
+ ], $t = le("package-plus", qt), Ht = ["number", "date", "counterparty", "amount"], Yt = ["incoming", "outgoing"], Zt = [
88
+ "paid",
89
+ "partiallyPaid",
90
+ "unpaid",
91
+ "overdue",
92
+ "writtenOff",
93
+ "noPaymentDue"
94
+ ], Gt = [
95
+ "notSent",
96
+ "sending",
97
+ "pending",
98
+ "accepted",
99
+ "delivered",
100
+ "notDelivered",
101
+ "rejected",
102
+ "received"
103
+ ], Xt = ["notLoaded", "toReview", "loaded"], Qt = ["full", "partial", "credit", "proforma", "other"], Jt = [25, 50, 100], ei = [
104
+ "date",
105
+ "direction",
106
+ "counterparty",
107
+ "amount",
108
+ "paymentStatus",
109
+ "sdiStatus",
110
+ "warehouseStatus"
111
+ ], ti = /* @__PURE__ */ new Set([
112
+ "date",
113
+ "direction",
114
+ "amount",
115
+ "paymentStatus",
116
+ "sdiStatus",
117
+ "warehouseStatus",
118
+ "datePreset",
119
+ "type",
120
+ "number",
121
+ "prefix",
122
+ "withInsuranceNet",
123
+ "withVat",
124
+ "withTaxAtSource",
125
+ "withWelfareFundContribution",
126
+ "withUnpaidAmount",
127
+ "writtenOff",
128
+ "taxOfficeNotification",
129
+ "receivedFromSdi",
130
+ "sentToSdi",
131
+ "selfBill",
132
+ "liabilityDate",
133
+ "sdiEntryDate",
134
+ "relationType",
135
+ "insurance"
136
+ ]), We = { masked: !0 };
137
+ function C(e, t) {
138
+ throw new Error(`${e}: ${t}`);
139
+ }
140
+ function R(e, t) {
141
+ e.getRowIds().includes(t) || C("UNKNOWN_ROW", `no bill "${t}" on the current page.`);
142
+ }
143
+ const W = (e) => ({
144
+ type: "object",
145
+ properties: {
146
+ type: { const: "set" },
147
+ values: { type: "array", items: { enum: [...e] } }
148
+ },
149
+ required: ["type", "values"],
150
+ additionalProperties: !1
151
+ }), ee = {
152
+ type: "object",
153
+ properties: {
154
+ type: { const: "inRange" },
155
+ dateFrom: { type: ["string", "null"], format: "date" },
156
+ dateTo: { type: ["string", "null"], format: "date" }
157
+ },
158
+ required: ["type", "dateFrom", "dateTo"],
159
+ additionalProperties: !1
160
+ }, A = {
161
+ type: "boolean",
162
+ description: "true = yes, false = no; leave the key out for either."
163
+ }, Me = {
164
+ type: "object",
165
+ additionalProperties: !1,
166
+ properties: {
167
+ date: ee,
168
+ direction: W(Yt),
169
+ amount: {
170
+ type: "object",
171
+ description: "Amount in major units (12.50), as on the platform form.",
172
+ properties: {
173
+ type: {
174
+ enum: ["inRange", "greaterThanOrEqual", "lessThanOrEqual", "equals"]
175
+ },
176
+ filter: { type: "number" },
177
+ filterTo: { type: "number" }
178
+ },
179
+ required: ["type"],
180
+ additionalProperties: !1
181
+ },
182
+ paymentStatus: W(Zt),
183
+ sdiStatus: W(Gt),
184
+ warehouseStatus: W(Xt),
185
+ datePreset: { enum: ["today", "thisMonth", "thisYear"] },
186
+ type: W(Qt),
187
+ number: { type: "string" },
188
+ prefix: { type: "string" },
189
+ withInsuranceNet: A,
190
+ withVat: A,
191
+ withTaxAtSource: A,
192
+ withWelfareFundContribution: A,
193
+ withUnpaidAmount: A,
194
+ writtenOff: A,
195
+ taxOfficeNotification: A,
196
+ receivedFromSdi: A,
197
+ sentToSdi: A,
198
+ selfBill: A,
199
+ liabilityDate: ee,
200
+ sdiEntryDate: ee,
201
+ relationType: { enum: ["patient", "company", "operator"] },
202
+ insurance: { type: "string" }
203
+ }
204
+ }, ii = new Set(
205
+ Object.keys(Me.properties)
206
+ );
207
+ function ai(e) {
208
+ const t = { ...e.getFilter() };
209
+ if (!e.getFeatures().privacyMode)
210
+ return t;
211
+ const a = {};
212
+ for (const [s, c] of Object.entries(t))
213
+ a[s] = ti.has(s) ? c : We;
214
+ return a;
215
+ }
216
+ const V = {
217
+ type: "object",
218
+ properties: { id: { type: "string", description: "A bill id (rows)." } },
219
+ required: ["id"],
220
+ additionalProperties: !1
221
+ }, ni = {
222
+ id: "bill-table",
223
+ capabilities: [
224
+ "select_multiple",
225
+ "range_pick",
226
+ "filter",
227
+ "sort",
228
+ "paginate",
229
+ "view_change",
230
+ "scroll",
231
+ // open_bill moves to the bill page (26 section 4: `navigate`).
232
+ "navigate",
233
+ // load_into_warehouse opens the HTP-7311 dialog (`open`: a Dialog).
234
+ // download_bill fits no capability exactly (a file request): the
235
+ // agent-readiness-auditor rules on it.
236
+ "open"
237
+ ],
238
+ state: {
239
+ features: {
240
+ type: "{ selectable, privacyMode, showWarehouseStatus, sortableColumns, status }",
241
+ descriptionKey: "ui.agent.billTable.state.features",
242
+ description: "What this bill list can do now: selection, privacy mode, the warehouse column, sortable columns and loading status.",
243
+ read: (e) => e.getFeatures()
244
+ },
245
+ rows: {
246
+ type: "Array<{ id, number, type, date, direction, counterpartyKind, counterpartyName?, amountMinor, paymentStatus, sdiStatus, warehouseStatus, actions }>",
247
+ descriptionKey: "ui.agent.billTable.state.rows",
248
+ description: "The bills on the current page, amounts in hundredths. A counterparty name is given only for companies; patients and other people are never named.",
249
+ read: (e) => e.getRowSummaries()
250
+ },
251
+ selection: {
252
+ type: "string[]",
253
+ descriptionKey: "ui.agent.billTable.state.selection",
254
+ description: "Ids of the selected bills, on every page.",
255
+ read: (e) => e.getSelection()
256
+ },
257
+ sort: {
258
+ type: "Array<{ colId, sort }>",
259
+ descriptionKey: "ui.agent.billTable.state.sort",
260
+ description: "The active sort, as the server receives it. A counterparty sort is left out while privacy mode is on.",
261
+ read: (e) => e.getQuery().sorting
262
+ },
263
+ filter: {
264
+ type: "object",
265
+ descriptionKey: "ui.agent.billTable.state.filter",
266
+ description: "The active filters. Under privacy mode, filters that can point at a person read { masked: true }.",
267
+ read: (e) => ai(e)
268
+ },
269
+ quickFilter: {
270
+ type: "'' | { masked: true }",
271
+ descriptionKey: "ui.agent.billTable.state.quickFilter",
272
+ description: "Empty when no quick search is set; otherwise { masked: true }, since the text may be a name. Set it with set_quick_filter.",
273
+ // Masked in both modes: a person's name typed here must not reach
274
+ // agent state, privacy mode or not.
275
+ read: (e) => e.getQuickFilter() === "" ? "" : We
276
+ },
277
+ currentPage: {
278
+ type: "number",
279
+ descriptionKey: "ui.agent.billTable.state.currentPage",
280
+ description: "Zero-based page index.",
281
+ read: (e) => e.getQuery().pagination.pageIndex
282
+ },
283
+ pageSize: {
284
+ type: "number",
285
+ descriptionKey: "ui.agent.billTable.state.pageSize",
286
+ description: "Bills per page.",
287
+ read: (e) => e.getQuery().pagination.pageSize
288
+ },
289
+ pageCount: {
290
+ type: "number",
291
+ descriptionKey: "ui.agent.billTable.state.pageCount",
292
+ description: "Number of pages; -1 when the total is unknown.",
293
+ read: (e) => e.getPageCount()
294
+ },
295
+ rowCount: {
296
+ type: "number",
297
+ descriptionKey: "ui.agent.billTable.state.rowCount",
298
+ description: "Bills matching the filters, on every page; -1 when unknown.",
299
+ read: (e) => e.getRowCount()
300
+ },
301
+ columns: {
302
+ type: "Array<{ id, label, visible, canHide, sortable, masked }>",
303
+ descriptionKey: "ui.agent.billTable.state.columns",
304
+ description: "The columns, in display order.",
305
+ read: (e) => e.getColumns()
306
+ }
307
+ },
308
+ actions: {
309
+ select_rows: {
310
+ safety: "read",
311
+ argsType: "{ ids: string[] }",
312
+ argsSchema: {
313
+ type: "object",
314
+ properties: { ids: { type: "array", items: { type: "string" } } },
315
+ required: ["ids"],
316
+ additionalProperties: !1
317
+ },
318
+ returns: "string[]",
319
+ idempotent: !0,
320
+ errors: ["SELECTION_DISABLED: the list is read-only."],
321
+ descriptionKey: "ui.agent.billTable.actions.selectRows",
322
+ description: "Replace the selection with the given bill ids. Changing a filter or the search clears it.",
323
+ invoke: (e, t) => (e.getFeatures().selectable || C("SELECTION_DISABLED", "this list has no selection."), e.setSelection(t.ids), e.getSelection())
324
+ },
325
+ select_range: {
326
+ safety: "read",
327
+ argsType: "{ fromId: string, toId: string }",
328
+ argsSchema: {
329
+ type: "object",
330
+ properties: { fromId: { type: "string" }, toId: { type: "string" } },
331
+ required: ["fromId", "toId"],
332
+ additionalProperties: !1
333
+ },
334
+ idempotent: !0,
335
+ errors: [
336
+ "SELECTION_DISABLED: the list is read-only.",
337
+ "UNKNOWN_ROW: fromId or toId is not on the current page."
338
+ ],
339
+ descriptionKey: "ui.agent.billTable.actions.selectRange",
340
+ description: "Select every bill from fromId to toId on the current page, inclusive.",
341
+ invoke: (e, t) => {
342
+ e.getFeatures().selectable || C("SELECTION_DISABLED", "this list has no selection."), R(e, t.fromId), R(e, t.toId), e.selectRange(t.fromId, t.toId);
343
+ }
344
+ },
345
+ clear_selection: {
346
+ safety: "read",
347
+ idempotent: !0,
348
+ descriptionKey: "ui.agent.billTable.actions.clearSelection",
349
+ description: "Clear the selection on every page.",
350
+ invoke: (e) => e.clearSelection()
351
+ },
352
+ sort_by: {
353
+ safety: "read",
354
+ openWorld: !0,
355
+ argsType: '{ colId: "number" | "date" | "counterparty" | "amount", sort: "asc" | "desc" }',
356
+ argsSchema: {
357
+ type: "object",
358
+ properties: {
359
+ colId: { enum: [...Ht] },
360
+ sort: { enum: ["asc", "desc"] }
361
+ },
362
+ required: ["colId", "sort"],
363
+ additionalProperties: !1
364
+ },
365
+ idempotent: !0,
366
+ errors: [
367
+ "SORT_DISABLED: the server cannot sort this column (features.sortableColumns).",
368
+ "COLUMN_MASKED: counterparty cannot be sorted while privacy mode is on."
369
+ ],
370
+ examples: [{ args: { colId: "amount", sort: "desc" } }],
371
+ descriptionKey: "ui.agent.billTable.actions.sortBy",
372
+ description: "Sort the bills by one column. The host fetches the first page again.",
373
+ invoke: (e, t) => {
374
+ e.getFeatures().sortableColumns.includes(t.colId) || C("SORT_DISABLED", `column "${t.colId}" does not sort.`);
375
+ const s = e.getColumns().find((c) => c.id === t.colId);
376
+ s != null && s.masked && C("COLUMN_MASKED", `"${t.colId}" is hidden by privacy mode.`), e.setSort([{ colId: t.colId, sort: t.sort }]);
377
+ }
378
+ },
379
+ apply_filter: {
380
+ safety: "read",
381
+ openWorld: !0,
382
+ argsType: "{ model: BillTableFilterModel }",
383
+ argsSchema: {
384
+ type: "object",
385
+ properties: { model: Me },
386
+ required: ["model"],
387
+ additionalProperties: !1
388
+ },
389
+ idempotent: !0,
390
+ errors: [
391
+ "UNKNOWN_FILTER: a key is not a bill filter.",
392
+ "Changing filters clears the selection."
393
+ ],
394
+ examples: [
395
+ {
396
+ args: {
397
+ model: {
398
+ sdiStatus: { type: "set", values: ["received"] },
399
+ warehouseStatus: { type: "set", values: ["toReview"] }
400
+ }
401
+ },
402
+ note: "Bills from SDI that need a warehouse review."
403
+ }
404
+ ],
405
+ descriptionKey: "ui.agent.billTable.actions.applyFilter",
406
+ description: "Replace the filters. The host fetches the first page again.",
407
+ invoke: (e, t) => {
408
+ for (const a of Object.keys(t.model))
409
+ ii.has(a) || C("UNKNOWN_FILTER", `"${a}" is not a bill filter.`);
410
+ e.setFilter(t.model);
411
+ }
412
+ },
413
+ set_quick_filter: {
414
+ safety: "read",
415
+ openWorld: !0,
416
+ argsType: "{ text: string }",
417
+ argsSchema: {
418
+ type: "object",
419
+ properties: { text: { type: "string" } },
420
+ required: ["text"],
421
+ additionalProperties: !1
422
+ },
423
+ idempotent: !0,
424
+ errors: ["Changing the search clears the selection."],
425
+ descriptionKey: "ui.agent.billTable.actions.setQuickFilter",
426
+ description: "Search by bill number, and by counterparty name unless privacy mode is on.",
427
+ invoke: (e, t) => e.setQuickFilter(t.text)
428
+ },
429
+ clear_filters: {
430
+ safety: "read",
431
+ openWorld: !0,
432
+ idempotent: !0,
433
+ descriptionKey: "ui.agent.billTable.actions.clearFilters",
434
+ description: "Remove every filter and the quick search.",
435
+ invoke: (e) => e.clearFilters()
436
+ },
437
+ go_to_page: {
438
+ safety: "read",
439
+ openWorld: !0,
440
+ argsType: "{ pageIndex: number }",
441
+ argsSchema: {
442
+ type: "object",
443
+ properties: { pageIndex: { type: "integer", minimum: 0 } },
444
+ required: ["pageIndex"],
445
+ additionalProperties: !1
446
+ },
447
+ idempotent: !0,
448
+ descriptionKey: "ui.agent.billTable.actions.goToPage",
449
+ description: "Go to a zero-based page.",
450
+ invoke: (e, t) => e.goToPage(t.pageIndex)
451
+ },
452
+ set_page_size: {
453
+ safety: "read",
454
+ openWorld: !0,
455
+ argsType: "{ size: 25 | 50 | 100 }",
456
+ argsSchema: {
457
+ type: "object",
458
+ properties: { size: { enum: [...Jt] } },
459
+ required: ["size"],
460
+ additionalProperties: !1
461
+ },
462
+ idempotent: !0,
463
+ descriptionKey: "ui.agent.billTable.actions.setPageSize",
464
+ description: "Change how many bills show per page.",
465
+ invoke: (e, t) => e.setPageSize(t.size)
466
+ },
467
+ scroll_to_row: {
468
+ safety: "read",
469
+ argsType: "{ id: string }",
470
+ argsSchema: V,
471
+ idempotent: !0,
472
+ errors: ["UNKNOWN_ROW: the id is not on the current page."],
473
+ descriptionKey: "ui.agent.billTable.actions.scrollToRow",
474
+ description: "Scroll a bill on the current page into view.",
475
+ invoke: (e, t) => {
476
+ R(e, t.id), e.scrollToRow(t.id);
477
+ }
478
+ },
479
+ set_column_visibility: {
480
+ safety: "write",
481
+ argsType: "{ id: string, visible: boolean }",
482
+ argsSchema: {
483
+ type: "object",
484
+ properties: {
485
+ id: { enum: [...ei] },
486
+ visible: { type: "boolean" }
487
+ },
488
+ required: ["id", "visible"],
489
+ additionalProperties: !1
490
+ },
491
+ idempotent: !0,
492
+ errors: [
493
+ "UNKNOWN_COLUMN: the column is not in this list (warehouseStatus needs the warehouse module).",
494
+ "NOT_HIDEABLE: number and actions always show."
495
+ ],
496
+ descriptionKey: "ui.agent.billTable.actions.setColumnVisibility",
497
+ description: "Show or hide a column. The choice is saved for this list.",
498
+ invoke: (e, t) => {
499
+ const a = e.getColumns().find((s) => s.id === t.id);
500
+ a || C("UNKNOWN_COLUMN", `no column "${t.id}".`), a.canHide || C("NOT_HIDEABLE", `"${t.id}" always shows.`), e.setColumnVisible(t.id, t.visible);
501
+ }
502
+ },
503
+ reset_columns: {
504
+ safety: "destructive",
505
+ idempotent: !0,
506
+ descriptionKey: "ui.agent.billTable.actions.resetColumns",
507
+ description: "Put every column back to its default and delete the column choices saved for this list.",
508
+ invoke: (e) => e.resetColumns()
509
+ },
510
+ get_row_actions: {
511
+ safety: "read",
512
+ argsType: "{ id: string }",
513
+ argsSchema: V,
514
+ returns: 'Record<action, "enabled" | { disabled: reason }>',
515
+ idempotent: !0,
516
+ errors: ["UNKNOWN_ROW: the id is not on the current page."],
517
+ descriptionKey: "ui.agent.billTable.actions.getRowActions",
518
+ description: "Which actions one bill offers now, and why a disabled one is disabled.",
519
+ // The agent-safe projection (reason codes, a host's text as `host`),
520
+ // never `handle.getRowActions`, which carries the host's text.
521
+ invoke: (e, t) => {
522
+ var a;
523
+ return R(e, t.id), ((a = e.getRowSummaries().find((s) => s.id === t.id)) == null ? void 0 : a.actions) ?? {};
524
+ }
525
+ },
526
+ open_bill: {
527
+ safety: "read",
528
+ openWorld: !0,
529
+ argsType: "{ id: string }",
530
+ argsSchema: V,
531
+ errors: [
532
+ "UNKNOWN_ROW: the id is not on the current page.",
533
+ "ACTION_UNAVAILABLE: the bill offers no open action.",
534
+ "ACTION_DISABLED: followed by the reason code."
535
+ ],
536
+ descriptionKey: "ui.agent.billTable.actions.openBill",
537
+ description: "Open one bill. The host shows its page.",
538
+ invoke: (e, t) => {
539
+ R(e, t.id), e.openBill(t.id);
540
+ }
541
+ },
542
+ download_bill: {
543
+ // A bill PDF or XML names the patient: a document with patient data
544
+ // leaves the UI for the device (signature-request precedent, phi).
545
+ safety: "phi",
546
+ openWorld: !0,
547
+ argsType: '{ id: string, format: "pdf" | "xml" }',
548
+ argsSchema: {
549
+ type: "object",
550
+ properties: {
551
+ id: { type: "string" },
552
+ format: { enum: ["pdf", "xml"] }
553
+ },
554
+ required: ["id", "format"],
555
+ additionalProperties: !1
556
+ },
557
+ errors: [
558
+ "UNKNOWN_ROW: the id is not on the current page.",
559
+ "ACTION_UNAVAILABLE: the bill offers no download in this format.",
560
+ "ACTION_DISABLED: followed by the reason code."
561
+ ],
562
+ descriptionKey: "ui.agent.billTable.actions.downloadBill",
563
+ description: "Download one bill as a PDF or an electronic invoice (XML).",
564
+ invoke: (e, t) => {
565
+ R(e, t.id), e.downloadBill(t.id, t.format);
566
+ }
567
+ },
568
+ load_into_warehouse: {
569
+ // Opens the review dialog (or the upsell without the module);
570
+ // nothing loads until the user confirms there.
571
+ safety: "read",
572
+ openWorld: !0,
573
+ argsType: "{ id: string }",
574
+ argsSchema: V,
575
+ errors: [
576
+ "UNKNOWN_ROW: the id is not on the current page.",
577
+ "ACTION_UNAVAILABLE: not an incoming SDI bill.",
578
+ "ACTION_DISABLED: alreadyLoaded, when the bill is already in the warehouse."
579
+ ],
580
+ descriptionKey: "ui.agent.billTable.actions.loadIntoWarehouse",
581
+ description: "Open the dialog that loads an incoming SDI bill's lines into the warehouse. Nothing loads until the user confirms.",
582
+ invoke: (e, t) => {
583
+ R(e, t.id), e.loadIntoWarehouse(t.id);
584
+ }
585
+ }
586
+ },
587
+ domHooks: {
588
+ root: {
589
+ attr: "data-component",
590
+ value: "bill-table",
591
+ description: "Marks the element as a kit BillTable."
592
+ },
593
+ instanceId: {
594
+ attr: "data-component-id",
595
+ sourceProp: "gridId",
596
+ description: "Sourced from gridId (default accounting-bills)."
597
+ },
598
+ item: {
599
+ attr: "data-row-id",
600
+ description: "Opaque bill id on each row (DataGrid). Act through the handle, not the DOM."
601
+ }
602
+ }
603
+ }, oi = w("ds:w-full ds:min-w-0", {
604
+ variants: {
605
+ height: {
606
+ auto: "ds:block",
607
+ fill: "ds:flex ds:min-h-0 ds:flex-auto ds:flex-col"
608
+ }
609
+ },
610
+ defaultVariants: { height: "auto" }
611
+ }), q = w(
612
+ "ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]",
613
+ {
614
+ variants: {
615
+ align: {
616
+ start: "ds:items-start",
617
+ end: "ds:items-end"
618
+ }
619
+ },
620
+ defaultVariants: { align: "start" }
621
+ }
622
+ ), j = w(
623
+ "type-meta ds:text-[color:var(--muted-foreground)]"
624
+ ), re = w(
625
+ "ds:inline-flex ds:min-w-0 ds:max-w-full ds:items-center ds:gap-[var(--spacing-xs)]"
626
+ ), li = w(
627
+ "ds:size-4 ds:shrink-0 ds:rtl:-scale-x-100"
628
+ ), ri = w(
629
+ "ds:block ds:min-w-0 ds:max-w-full ds:truncate"
630
+ ), si = w([
631
+ "ds:max-w-full ds:[--primary:var(--primary-readable)] ds:[--primary-hover:var(--primary-readable-hover)]",
632
+ "ds:[tr[data-selected]_&]:[--primary:var(--primary-readable-hover)]",
633
+ "ds:data-[component=button]:sm:before:block",
634
+ kt
635
+ ]), di = w("ds:font-medium"), ci = w(
636
+ "ds:mt-[var(--spacing-sm)] ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"
637
+ ), ui = w(
638
+ "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]"
639
+ ), pi = w("ds:m-0", {
640
+ variants: {
641
+ tone: {
642
+ muted: "ds:text-[color:var(--muted-foreground)]",
643
+ strong: "ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-sm)] ds:text-[color:var(--foreground)] ds:[font-weight:var(--font-weight-semibold)]"
644
+ }
645
+ },
646
+ defaultVariants: { tone: "muted" }
647
+ }), bi = w(
648
+ "ds:m-0 ds:grid ds:grid-cols-[1fr_auto] ds:items-baseline ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-2xs)]"
649
+ ), mi = w(
650
+ "ds:m-0 ds:text-[color:var(--muted-foreground)]"
651
+ ), fi = w("ds:m-0 ds:text-end"), $ = ["incoming", "outgoing"], xa = [
652
+ "full",
653
+ "partial",
654
+ "credit",
655
+ "proforma",
656
+ "other"
657
+ ], yi = [
658
+ "paid",
659
+ "partiallyPaid",
660
+ "unpaid",
661
+ "overdue",
662
+ "writtenOff",
663
+ "noPaymentDue"
664
+ ], hi = [
665
+ "notApplicable",
666
+ "notSent",
667
+ "sending",
668
+ "pending",
669
+ "accepted",
670
+ "delivered",
671
+ "notDelivered",
672
+ "rejected",
673
+ "received"
674
+ ], gi = [
675
+ "notLoaded",
676
+ "toReview",
677
+ "loaded"
678
+ ], Fa = [
679
+ "patient",
680
+ "person",
681
+ "company"
682
+ ], Ue = [
683
+ "open",
684
+ "downloadPdf",
685
+ "downloadXml",
686
+ "loadIntoWarehouse",
687
+ "edit",
688
+ "recordPayment",
689
+ "writeOff",
690
+ "undoWriteOff",
691
+ "delete"
692
+ ], Wa = [
693
+ "alreadyLoaded",
694
+ "sentToSdi",
695
+ "legalStorage",
696
+ "paymentAutomation",
697
+ "noPermission",
698
+ "inProgress"
699
+ ], Ti = [
700
+ "number",
701
+ "date",
702
+ "direction",
703
+ "counterparty",
704
+ "amount",
705
+ "paymentStatus",
706
+ "sdiStatus",
707
+ "warehouseStatus",
708
+ "actions"
709
+ ], Ke = [
710
+ "number",
711
+ "date",
712
+ "counterparty",
713
+ "amount"
714
+ ], Ma = [
715
+ "csv",
716
+ "csvDetailed",
717
+ "pdfZip",
718
+ "pdfSingle",
719
+ "xmlOutgoingZip",
720
+ "xmlIncomingZip"
721
+ ], Ua = [
722
+ "bills-this-year",
723
+ "bills-all",
724
+ "bills-incoming",
725
+ "bills-outgoing",
726
+ "bills-to-pay",
727
+ "bills-to-collect",
728
+ "bills-to-load"
729
+ ], Si = "accounting-bills", vi = [
730
+ { colId: "date", sort: "desc" }
731
+ ], Ae = [25, 50, 100], H = 2, _ = { source: "user" }, te = { source: "api" };
732
+ function wi(e) {
733
+ return e.counterparty !== null && e.counterparty.kind !== "company";
734
+ }
735
+ function Ii(e) {
736
+ return Number.isSafeInteger(e) ? Rt({ units: e, scale: H }) : null;
737
+ }
738
+ const Oe = /* @__PURE__ */ new Map(), ki = /^(\d{4})-(\d{2})-(\d{2})$/;
739
+ function Ve(e, t) {
740
+ const a = ki.exec(e);
741
+ if (!a) return e;
742
+ const [, s, c, b] = a, i = new Date(
743
+ Date.UTC(Number(s), Number(c) - 1, Number(b))
744
+ );
745
+ if (Number.isNaN(i.getTime())) return e;
746
+ const n = Pt(t);
747
+ let o = Oe.get(n);
748
+ return o || (o = new Intl.DateTimeFormat(n, {
749
+ dateStyle: "medium",
750
+ timeZone: "UTC"
751
+ }), Oe.set(n, o)), o.format(i);
752
+ }
753
+ const Ni = new Set(Ke);
754
+ function Li(e) {
755
+ return Ni.has(e);
756
+ }
757
+ function ae(e) {
758
+ const t = [];
759
+ for (const a of e)
760
+ Li(a.colId) && t.push({ colId: a.colId, sort: a.sort });
761
+ return t;
762
+ }
763
+ function ze(e) {
764
+ return e.map((t) => `${t.colId}:${t.sort}`).join("|");
765
+ }
766
+ function Ai(e, t) {
767
+ return t && ze(e) === t.key ? t.raw : e;
768
+ }
769
+ const Oi = {
770
+ open: "onOpen",
771
+ downloadPdf: "onDownload",
772
+ downloadXml: "onDownload",
773
+ loadIntoWarehouse: "onLoadIntoWarehouse",
774
+ edit: "onEdit",
775
+ recordPayment: "onRecordPayment",
776
+ writeOff: "onWriteOff",
777
+ undoWriteOff: "onWriteOff",
778
+ delete: "onDelete"
779
+ };
780
+ function se(e, t) {
781
+ return typeof e[Oi[t]] == "function";
782
+ }
783
+ function je(e) {
784
+ return typeof e.disabled == "string" ? e.disabled : "host";
785
+ }
786
+ function _i(e, t, a, s) {
787
+ const c = {};
788
+ for (const b of Ue) {
789
+ const i = e.actions[b];
790
+ i === void 0 || !se(t, b) || (c[b] = a && i !== "enabled" && typeof i.disabled != "string" ? { disabled: { text: s } } : i);
791
+ }
792
+ return c;
793
+ }
794
+ function Di(e, t) {
795
+ const a = {};
796
+ for (const s of Ue) {
797
+ const c = e.actions[s];
798
+ c === void 0 || !se(t, s) || (a[s] = c === "enabled" ? "enabled" : { disabled: je(c) });
799
+ }
800
+ return a;
801
+ }
802
+ function Ci(e, t) {
803
+ var s, c;
804
+ const a = {
805
+ id: e.id,
806
+ number: e.number,
807
+ type: e.type,
808
+ date: e.date,
809
+ direction: e.direction,
810
+ counterpartyKind: ((s = e.counterparty) == null ? void 0 : s.kind) ?? null,
811
+ amountMinor: e.amountMinor,
812
+ paymentStatus: e.paymentStatus,
813
+ sdiStatus: e.sdiStatus,
814
+ warehouseStatus: e.warehouseStatus ?? null,
815
+ actions: Di(e, t)
816
+ };
817
+ return ((c = e.counterparty) == null ? void 0 : c.kind) === "company" && (a.counterpartyName = e.counterparty.name), a;
818
+ }
819
+ const qe = {
820
+ paid: { key: "billTable.paymentStatus.paid", en: "Paid", variant: "success" },
821
+ partiallyPaid: {
822
+ key: "billTable.paymentStatus.partiallyPaid",
823
+ en: "Partly paid",
824
+ variant: "warning"
825
+ },
826
+ unpaid: {
827
+ key: "billTable.paymentStatus.unpaid",
828
+ en: "Unpaid",
829
+ variant: "warning"
830
+ },
831
+ overdue: {
832
+ key: "billTable.paymentStatus.overdue",
833
+ en: "Overdue",
834
+ variant: "error"
835
+ },
836
+ writtenOff: {
837
+ key: "billTable.paymentStatus.writtenOff",
838
+ en: "Written off",
839
+ variant: "neutral"
840
+ },
841
+ noPaymentDue: {
842
+ key: "billTable.paymentStatus.noPaymentDue",
843
+ en: "No payment due",
844
+ variant: "neutral"
845
+ }
846
+ }, $e = {
847
+ notSent: {
848
+ key: "billTable.sdiStatus.notSent",
849
+ en: "Not sent",
850
+ variant: "neutral"
851
+ },
852
+ sending: {
853
+ key: "billTable.sdiStatus.sending",
854
+ en: "Sending",
855
+ variant: "info"
856
+ },
857
+ pending: {
858
+ key: "billTable.sdiStatus.pending",
859
+ en: "Awaiting SDI",
860
+ variant: "warning"
861
+ },
862
+ accepted: {
863
+ key: "billTable.sdiStatus.accepted",
864
+ en: "Accepted",
865
+ variant: "success"
866
+ },
867
+ delivered: {
868
+ key: "billTable.sdiStatus.delivered",
869
+ en: "Delivered",
870
+ variant: "success"
871
+ },
872
+ notDelivered: {
873
+ key: "billTable.sdiStatus.notDelivered",
874
+ en: "Not delivered",
875
+ variant: "warning"
876
+ },
877
+ rejected: {
878
+ key: "billTable.sdiStatus.rejected",
879
+ en: "Rejected",
880
+ variant: "error"
881
+ },
882
+ received: {
883
+ key: "billTable.sdiStatus.received",
884
+ en: "Received from SDI",
885
+ variant: "info"
886
+ }
887
+ }, He = {
888
+ notLoaded: {
889
+ key: "billTable.warehouseStatus.notLoaded",
890
+ en: "Not loaded",
891
+ variant: "neutral"
892
+ },
893
+ toReview: {
894
+ key: "billTable.warehouseStatus.toReview",
895
+ en: "To review",
896
+ variant: "warning"
897
+ },
898
+ loaded: {
899
+ key: "billTable.warehouseStatus.loaded",
900
+ en: "Loaded",
901
+ variant: "success"
902
+ }
903
+ }, Y = {
904
+ incoming: { key: "billTable.direction.incoming", en: "Incoming" },
905
+ outgoing: { key: "billTable.direction.outgoing", en: "Outgoing" }
906
+ }, Ri = {
907
+ partial: { key: "billTable.type.partial", en: "Deposit" },
908
+ credit: { key: "billTable.type.credit", en: "Credit note" },
909
+ proforma: { key: "billTable.type.proforma", en: "Pro forma" },
910
+ other: { key: "billTable.type.other", en: "Other document" }
911
+ }, Pi = {
912
+ downloadPdf: { key: "billTable.action.downloadPdf", en: "Download PDF" },
913
+ downloadXml: { key: "billTable.action.downloadXml", en: "Download XML" },
914
+ loadIntoWarehouse: {
915
+ key: "billTable.action.loadIntoWarehouse",
916
+ en: "Load into warehouse"
917
+ },
918
+ edit: { key: "billTable.action.edit", en: "Edit" },
919
+ recordPayment: {
920
+ key: "billTable.action.recordPayment",
921
+ en: "Record payment"
922
+ },
923
+ writeOff: {
924
+ key: "billTable.action.writeOff",
925
+ en: "Write off the unpaid amount"
926
+ },
927
+ undoWriteOff: { key: "billTable.action.undoWriteOff", en: "Undo write-off" },
928
+ delete: { key: "billTable.action.delete", en: "Delete" }
929
+ }, Ye = {
930
+ alreadyLoaded: {
931
+ key: "billTable.disabledReason.alreadyLoaded",
932
+ en: "This bill is already in the warehouse."
933
+ },
934
+ sentToSdi: {
935
+ key: "billTable.disabledReason.sentToSdi",
936
+ en: "This bill was sent to SDI, so it cannot be changed."
937
+ },
938
+ legalStorage: {
939
+ key: "billTable.disabledReason.legalStorage",
940
+ en: "This bill is in legal storage, so it cannot be changed."
941
+ },
942
+ paymentAutomation: {
943
+ key: "billTable.disabledReason.paymentAutomation",
944
+ en: "This bill has automatic payments, so it cannot be changed."
945
+ },
946
+ noPermission: {
947
+ key: "billTable.disabledReason.noPermission",
948
+ en: "You do not have permission to do this."
949
+ },
950
+ inProgress: {
951
+ key: "billTable.disabledReason.inProgress",
952
+ en: "Already in progress."
953
+ }
954
+ }, Ei = {
955
+ csv: { key: "billTable.export.csv", en: "CSV" },
956
+ csvDetailed: {
957
+ key: "billTable.export.csvDetailed",
958
+ en: "CSV with treatments"
959
+ },
960
+ pdfZip: { key: "billTable.export.pdfZip", en: "ZIP with one PDF per bill" },
961
+ pdfSingle: { key: "billTable.export.pdfSingle", en: "One PDF" },
962
+ xmlOutgoingZip: {
963
+ key: "billTable.export.xmlOutgoingZip",
964
+ en: "ZIP of sent electronic invoices (XML)"
965
+ },
966
+ xmlIncomingZip: {
967
+ key: "billTable.export.xmlIncomingZip",
968
+ en: "ZIP of electronic invoices received from SDI (XML)"
969
+ }
970
+ };
971
+ function Bi({
972
+ row: e,
973
+ openHintId: t,
974
+ onOpen: a,
975
+ hideHostText: s
976
+ }) {
977
+ const { t: c } = v("ui"), b = Ee(), i = e.actions.open;
978
+ let n = null;
979
+ if (e.type !== "full") {
980
+ const d = Ri[e.type];
981
+ n = c(d.key, d.en);
982
+ }
983
+ let o = null;
984
+ if (i !== void 0 && i !== "enabled")
985
+ if (typeof i.disabled == "string") {
986
+ const d = Ye[i.disabled];
987
+ o = c(d.key, d.en);
988
+ } else
989
+ o = s ? c(
990
+ "billTable.disabledReason.privacyHidden",
991
+ "Not available (reason hidden in privacy mode)"
992
+ ) : i.disabled.text;
993
+ return /* @__PURE__ */ T("span", { className: q(), children: [
994
+ i === void 0 ? /* @__PURE__ */ l("span", { className: di(), children: e.number }) : /* @__PURE__ */ l(
995
+ Ot,
996
+ {
997
+ intent: "link",
998
+ size: "sm",
999
+ className: si(),
1000
+ "aria-describedby": o ? `${t} ${b}` : t,
1001
+ "aria-disabled": o ? !0 : void 0,
1002
+ onClick: (d) => {
1003
+ if (o) {
1004
+ d.preventDefault();
1005
+ return;
1006
+ }
1007
+ a(e);
1008
+ },
1009
+ children: e.number
1010
+ }
1011
+ ),
1012
+ o ? /* @__PURE__ */ l("span", { hidden: !0, id: b, children: o }) : null,
1013
+ n ? /* @__PURE__ */ l("span", { className: j(), children: n }) : null
1014
+ ] });
1015
+ }
1016
+ function xi({ day: e }) {
1017
+ const { i18n: t } = v("ui");
1018
+ return /* @__PURE__ */ l("span", { children: Ve(e, t.language) });
1019
+ }
1020
+ function Ze({ direction: e }) {
1021
+ return /* @__PURE__ */ l(e === "incoming" ? Bt : xt, { "aria-hidden": "true", className: li() });
1022
+ }
1023
+ function Ge({ direction: e }) {
1024
+ const { t } = v("ui"), a = Y[e];
1025
+ return /* @__PURE__ */ T("span", { className: re(), children: [
1026
+ /* @__PURE__ */ l(Ze, { direction: e }),
1027
+ /* @__PURE__ */ l("span", { children: t(a.key, a.en) })
1028
+ ] });
1029
+ }
1030
+ function Fi({
1031
+ counterparty: e
1032
+ }) {
1033
+ const { t } = v("ui");
1034
+ return e === null ? /* @__PURE__ */ l("span", { className: j(), children: t("billTable.counterparty.none", "No counterparty") }) : /* @__PURE__ */ T("span", { className: q(), children: [
1035
+ /* @__PURE__ */ l("span", { dir: "auto", className: ri(), children: e.name }),
1036
+ e.deleted ? /* @__PURE__ */ l("span", { className: j(), children: t("billTable.counterparty.deleted", "Deleted") }) : null
1037
+ ] });
1038
+ }
1039
+ function Wi({
1040
+ amountMinor: e,
1041
+ currency: t
1042
+ }) {
1043
+ return /* @__PURE__ */ l(
1044
+ oe,
1045
+ {
1046
+ size: "sm",
1047
+ value: e,
1048
+ currency: t,
1049
+ scale: H
1050
+ }
1051
+ );
1052
+ }
1053
+ function de({
1054
+ label: e,
1055
+ variant: t
1056
+ }) {
1057
+ return /* @__PURE__ */ l(At, { size: "sm", variant: t, withDot: !0, children: e });
1058
+ }
1059
+ const Mi = /* @__PURE__ */ new Set([
1060
+ "unpaid",
1061
+ "partiallyPaid",
1062
+ "overdue"
1063
+ ]);
1064
+ function Ui({
1065
+ status: e,
1066
+ nextDueDate: t
1067
+ }) {
1068
+ const { t: a, i18n: s } = v("ui"), c = qe[e];
1069
+ return /* @__PURE__ */ T("span", { className: q(), children: [
1070
+ /* @__PURE__ */ l(de, { label: a(c.key, c.en), variant: c.variant }),
1071
+ t && Mi.has(e) ? /* @__PURE__ */ l("span", { className: j(), children: a("billTable.paymentStatus.due", "Due {{date}}", {
1072
+ date: Ve(t, s.language)
1073
+ }) }) : null
1074
+ ] });
1075
+ }
1076
+ function Ki({ status: e }) {
1077
+ const { t } = v("ui");
1078
+ if (e === "notApplicable") return null;
1079
+ const a = $e[e];
1080
+ return /* @__PURE__ */ l(de, { label: t(a.key, a.en), variant: a.variant });
1081
+ }
1082
+ function Vi({
1083
+ status: e
1084
+ }) {
1085
+ const { t } = v("ui");
1086
+ if (e === null) return null;
1087
+ const a = He[e];
1088
+ return /* @__PURE__ */ l(de, { label: t(a.key, a.en), variant: a.variant });
1089
+ }
1090
+ function zi() {
1091
+ const { t: e } = v("ui");
1092
+ return /* @__PURE__ */ l(
1093
+ Dt,
1094
+ {
1095
+ size: "sm",
1096
+ content: e(
1097
+ "billTable.sdiHelp",
1098
+ "SDI is the Italian exchange system for electronic invoices."
1099
+ )
1100
+ }
1101
+ );
1102
+ }
1103
+ function B({
1104
+ label: e,
1105
+ value: t,
1106
+ currency: a
1107
+ }) {
1108
+ return /* @__PURE__ */ T(ne, { children: [
1109
+ /* @__PURE__ */ l("dt", { className: mi(), children: e }),
1110
+ /* @__PURE__ */ l("dd", { className: fi(), children: /* @__PURE__ */ l(
1111
+ oe,
1112
+ {
1113
+ size: "sm",
1114
+ value: t,
1115
+ currency: a,
1116
+ scale: H
1117
+ }
1118
+ ) })
1119
+ ] });
1120
+ }
1121
+ function ji({
1122
+ totals: e,
1123
+ currency: t
1124
+ }) {
1125
+ const { t: a, i18n: s } = v("ui");
1126
+ return /* @__PURE__ */ l("div", { className: ci(), children: $.map((c) => {
1127
+ const b = e[c];
1128
+ return b ? /* @__PURE__ */ T("div", { className: ui(), children: [
1129
+ /* @__PURE__ */ T("p", { className: pi({ tone: "strong" }), children: [
1130
+ /* @__PURE__ */ l(Ge, { direction: c }),
1131
+ /* @__PURE__ */ l("span", { children: a("billTable.totals.count", "{{formatted}} bills", {
1132
+ count: b.count,
1133
+ formatted: Ct(b.count, s.language)
1134
+ }) })
1135
+ ] }),
1136
+ /* @__PURE__ */ T("dl", { className: bi(), children: [
1137
+ /* @__PURE__ */ l(
1138
+ B,
1139
+ {
1140
+ label: a("billTable.totals.gross", "Gross"),
1141
+ value: b.grossMinor,
1142
+ currency: t
1143
+ }
1144
+ ),
1145
+ /* @__PURE__ */ l(
1146
+ B,
1147
+ {
1148
+ label: a("billTable.totals.net", "Net"),
1149
+ value: b.netMinor,
1150
+ currency: t
1151
+ }
1152
+ ),
1153
+ /* @__PURE__ */ l(
1154
+ B,
1155
+ {
1156
+ label: a("billTable.totals.vat", "VAT"),
1157
+ value: b.vatMinor,
1158
+ currency: t
1159
+ }
1160
+ ),
1161
+ /* @__PURE__ */ l(
1162
+ B,
1163
+ {
1164
+ label: a("billTable.totals.taxAtSource", "Withholding tax"),
1165
+ value: b.taxAtSourceMinor,
1166
+ currency: t
1167
+ }
1168
+ ),
1169
+ /* @__PURE__ */ l(
1170
+ B,
1171
+ {
1172
+ label: a("billTable.totals.paid", "Paid"),
1173
+ value: b.paidMinor,
1174
+ currency: t
1175
+ }
1176
+ ),
1177
+ /* @__PURE__ */ l(
1178
+ B,
1179
+ {
1180
+ label: a("billTable.totals.unpaid", "Unpaid"),
1181
+ value: b.unpaidMinor,
1182
+ currency: t
1183
+ }
1184
+ )
1185
+ ] })
1186
+ ] }, c) : null;
1187
+ }) });
1188
+ }
1189
+ function qi({
1190
+ totals: e,
1191
+ currency: t
1192
+ }) {
1193
+ const { t: a } = v("ui"), s = a("billTable.totals.breakdown", "Totals breakdown");
1194
+ return /* @__PURE__ */ T("span", { className: re(), children: [
1195
+ /* @__PURE__ */ l("span", { children: a("dataTable.totalRow", "Total") }),
1196
+ /* @__PURE__ */ T(F, { children: [
1197
+ /* @__PURE__ */ l(F.Trigger, { asChild: !0, children: /* @__PURE__ */ l(
1198
+ _t,
1199
+ {
1200
+ intent: "ghost",
1201
+ size: "sm",
1202
+ icon: /* @__PURE__ */ l(Et, { "aria-hidden": "true" }),
1203
+ "aria-label": s,
1204
+ className: Nt
1205
+ }
1206
+ ) }),
1207
+ /* @__PURE__ */ T(F.Content, { side: "top", align: "start", size: "md", children: [
1208
+ /* @__PURE__ */ l(F.Heading, { children: s }),
1209
+ /* @__PURE__ */ l(F.Description, { children: a(
1210
+ "billTable.totals.scope",
1211
+ "Every bill that matches the filters, on all pages."
1212
+ ) }),
1213
+ /* @__PURE__ */ l(ji, { totals: e, currency: t })
1214
+ ] })
1215
+ ] })
1216
+ ] });
1217
+ }
1218
+ function _e({
1219
+ totals: e,
1220
+ field: t,
1221
+ currency: a
1222
+ }) {
1223
+ const { t: s } = v("ui");
1224
+ return /* @__PURE__ */ l(
1225
+ "span",
1226
+ {
1227
+ className: q({
1228
+ align: t === "grossMinor" ? "end" : "start"
1229
+ }),
1230
+ children: $.map((c) => {
1231
+ const b = e[c];
1232
+ if (!b) return null;
1233
+ const i = Y[c], n = s(i.key, i.en);
1234
+ return /* @__PURE__ */ T("span", { className: re(), children: [
1235
+ /* @__PURE__ */ l(Ze, { direction: c }),
1236
+ t === "grossMinor" ? /* @__PURE__ */ l("span", { children: n }) : /* @__PURE__ */ T(ne, { children: [
1237
+ /* @__PURE__ */ l(Be, { children: n }),
1238
+ /* @__PURE__ */ l("span", { children: s("billTable.totals.unpaid", "Unpaid") })
1239
+ ] }),
1240
+ /* @__PURE__ */ l(
1241
+ oe,
1242
+ {
1243
+ size: "sm",
1244
+ value: b[t],
1245
+ currency: a,
1246
+ scale: H
1247
+ }
1248
+ )
1249
+ ] }, c);
1250
+ })
1251
+ }
1252
+ );
1253
+ }
1254
+ const $i = [
1255
+ "inRange",
1256
+ "greaterThanOrEqual",
1257
+ "lessThanOrEqual",
1258
+ "equals"
1259
+ ], Hi = hi.filter(
1260
+ (e) => e !== "notApplicable"
1261
+ );
1262
+ function Yi({
1263
+ currency: e,
1264
+ showWarehouseStatus: t,
1265
+ sortableColumns: a,
1266
+ totals: s,
1267
+ privacyMode: c,
1268
+ openHintId: b,
1269
+ onOpenRow: i,
1270
+ rowActions: n
1271
+ }) {
1272
+ const { t: o } = v("ui"), d = a.join("|");
1273
+ return M(() => {
1274
+ const y = new Set(d.split("|")), P = (r) => {
1275
+ const h = Y[r];
1276
+ return o(h.key, h.en);
1277
+ }, S = (r) => {
1278
+ const h = qe[r];
1279
+ return o(h.key, h.en);
1280
+ }, I = (r) => {
1281
+ const h = $e[r];
1282
+ return o(h.key, h.en);
1283
+ }, k = (r) => {
1284
+ const h = He[r];
1285
+ return o(h.key, h.en);
1286
+ }, f = (r, h) => r.map((L) => ({ value: L, label: h(L) })), m = o("dataTable.actions", "Actions"), u = [
1287
+ {
1288
+ id: "number",
1289
+ header: o("billTable.column.number", "Number"),
1290
+ // The number names the row: `<th scope="row">`, "Select A12",
1291
+ // "Actions, A12". Pinned at the inline start, always shown.
1292
+ rowHeader: !0,
1293
+ pin: "start",
1294
+ hideable: !1,
1295
+ reorderable: !1,
1296
+ pinnable: !1,
1297
+ size: 136,
1298
+ minSize: 112,
1299
+ value: (r) => r.number,
1300
+ exportValue: (r) => r.number,
1301
+ sort: y.has("number") ? "text" : void 0,
1302
+ cell: (r) => /* @__PURE__ */ l(
1303
+ Bi,
1304
+ {
1305
+ row: r,
1306
+ openHintId: b,
1307
+ onOpen: i,
1308
+ hideHostText: c
1309
+ }
1310
+ ),
1311
+ footer: s ? /* @__PURE__ */ l(qi, { totals: s, currency: e }) : void 0
1312
+ },
1313
+ {
1314
+ id: "date",
1315
+ header: o("billTable.column.date", "Date"),
1316
+ size: 120,
1317
+ responsiveTier: 1,
1318
+ // A calendar day `YYYY-MM-DD`; DataGrid formats it for export.
1319
+ value: (r) => r.date,
1320
+ sort: y.has("date") ? "date" : void 0,
1321
+ sortDescFirst: !0,
1322
+ // One request per range: the server filters on Apply.
1323
+ filter: { kind: "dateRange", commitMode: "apply" },
1324
+ search: !1,
1325
+ cell: (r) => /* @__PURE__ */ l(xi, { day: r.date })
1326
+ },
1327
+ {
1328
+ id: "direction",
1329
+ header: o("billTable.column.direction", "Direction"),
1330
+ size: 132,
1331
+ responsiveTier: 1,
1332
+ value: (r) => r.direction,
1333
+ exportValue: (r) => P(r.direction),
1334
+ filter: {
1335
+ kind: "select",
1336
+ options: f($, P)
1337
+ },
1338
+ search: !1,
1339
+ cell: (r) => /* @__PURE__ */ l(Ge, { direction: r.direction })
1340
+ },
1341
+ {
1342
+ id: "counterparty",
1343
+ header: o("billTable.column.counterparty", "Counterparty"),
1344
+ size: 240,
1345
+ minSize: 160,
1346
+ value: (r) => {
1347
+ var h;
1348
+ return ((h = r.counterparty) == null ? void 0 : h.name) ?? null;
1349
+ },
1350
+ // Off while privacy mode is on: the whole column leaves sorting and
1351
+ // the server query (DataGrid's whole-column privacy rule).
1352
+ sort: y.has("counterparty") ? "text" : void 0,
1353
+ // Patients and other people are masked; companies stay visible.
1354
+ privacy: { mode: "mask", appliesTo: wi },
1355
+ cell: (r) => /* @__PURE__ */ l(Fi, { counterparty: r.counterparty })
1356
+ },
1357
+ {
1358
+ id: "amount",
1359
+ header: o("billTable.column.amount", "Amount"),
1360
+ align: "end",
1361
+ size: 136,
1362
+ value: (r) => r.amountMinor,
1363
+ exportValue: (r) => Ii(r.amountMinor),
1364
+ sort: y.has("amount") ? "number" : void 0,
1365
+ sortDescFirst: !0,
1366
+ // A currency NumberInput in the table currency. Bounds are MAJOR
1367
+ // units as typed (12.50), like the platform's amount_from/_to;
1368
+ // the server converts. Rows carry minor units.
1369
+ filter: {
1370
+ kind: "number",
1371
+ mode: "currency",
1372
+ currency: e,
1373
+ operators: $i,
1374
+ defaultOperator: "inRange"
1375
+ },
1376
+ search: !1,
1377
+ cell: (r) => /* @__PURE__ */ l(Wi, { amountMinor: r.amountMinor, currency: e }),
1378
+ footer: s ? /* @__PURE__ */ l(
1379
+ _e,
1380
+ {
1381
+ totals: s,
1382
+ field: "grossMinor",
1383
+ currency: e
1384
+ }
1385
+ ) : void 0
1386
+ },
1387
+ {
1388
+ id: "paymentStatus",
1389
+ header: o("billTable.column.paymentStatus", "Payment status"),
1390
+ size: 168,
1391
+ responsiveTier: 2,
1392
+ value: (r) => r.paymentStatus,
1393
+ exportValue: (r) => S(r.paymentStatus),
1394
+ filter: {
1395
+ kind: "select",
1396
+ options: f(yi, S)
1397
+ },
1398
+ search: !1,
1399
+ cell: (r) => /* @__PURE__ */ l(
1400
+ Ui,
1401
+ {
1402
+ status: r.paymentStatus,
1403
+ nextDueDate: r.nextDueDate ?? null
1404
+ }
1405
+ ),
1406
+ footer: s ? /* @__PURE__ */ l(
1407
+ _e,
1408
+ {
1409
+ totals: s,
1410
+ field: "unpaidMinor",
1411
+ currency: e
1412
+ }
1413
+ ) : void 0
1414
+ },
1415
+ {
1416
+ id: "sdiStatus",
1417
+ header: o("billTable.column.sdiStatus", "SDI status"),
1418
+ headerTip: /* @__PURE__ */ l(zi, {}),
1419
+ size: 168,
1420
+ responsiveTier: 3,
1421
+ value: (r) => r.sdiStatus === "notApplicable" ? null : r.sdiStatus,
1422
+ exportValue: (r) => r.sdiStatus === "notApplicable" ? "" : I(r.sdiStatus),
1423
+ filter: {
1424
+ kind: "select",
1425
+ options: f(Hi, I)
1426
+ },
1427
+ search: !1,
1428
+ cell: (r) => /* @__PURE__ */ l(Ki, { status: r.sdiStatus })
1429
+ }
1430
+ ];
1431
+ return t && u.push({
1432
+ id: "warehouseStatus",
1433
+ header: o("billTable.column.warehouseStatus", "Warehouse status"),
1434
+ size: 152,
1435
+ responsiveTier: 2,
1436
+ value: (r) => r.warehouseStatus ?? null,
1437
+ exportValue: (r) => r.warehouseStatus ? k(r.warehouseStatus) : "",
1438
+ filter: {
1439
+ kind: "select",
1440
+ options: f(gi, k)
1441
+ },
1442
+ search: !1,
1443
+ cell: (r) => /* @__PURE__ */ l(Vi, { status: r.warehouseStatus ?? null })
1444
+ }), u.push({
1445
+ id: "actions",
1446
+ header: /* @__PURE__ */ l(Be, { children: m }),
1447
+ headerLabel: m,
1448
+ pin: "end",
1449
+ size: 64,
1450
+ hideable: !1,
1451
+ reorderable: !1,
1452
+ pinnable: !1,
1453
+ resizable: !1,
1454
+ exportable: !1,
1455
+ printable: !1,
1456
+ search: !1,
1457
+ // Kit RowActions, menu only: one "More actions" button per row, the
1458
+ // group named by reference ("Actions, A12"), never by row data in an
1459
+ // attribute. A row that offers no menu item renders no button.
1460
+ cell: (r, h) => /* @__PURE__ */ l(
1461
+ Lt,
1462
+ {
1463
+ row: r,
1464
+ actions: n,
1465
+ maxInline: 0,
1466
+ "aria-labelledby": h.inputLabelledBy
1467
+ }
1468
+ )
1469
+ }), u;
1470
+ }, [
1471
+ o,
1472
+ e,
1473
+ t,
1474
+ d,
1475
+ s,
1476
+ c,
1477
+ b,
1478
+ i,
1479
+ n
1480
+ ]);
1481
+ }
1482
+ function z(e, t) {
1483
+ throw new Error(`${e}: ${t}`);
1484
+ }
1485
+ function ie(e) {
1486
+ Ft() && console.warn(`[BillTable] ${e}`);
1487
+ }
1488
+ const Zi = new Set(Ti);
1489
+ function Gi(e) {
1490
+ return Zi.has(e);
1491
+ }
1492
+ function De(e) {
1493
+ return new Set(
1494
+ e.getColumns().filter((t) => t.masked === !0).map((t) => t.id)
1495
+ );
1496
+ }
1497
+ function Xi(e, t) {
1498
+ const a = () => e.current, s = () => t.current;
1499
+ function c(i) {
1500
+ return s().rows.find((o) => o.id === i) ?? z("UNKNOWN_ROW", `no bill "${i}" on the current page.`);
1501
+ }
1502
+ function b(i, n) {
1503
+ const o = c(i), { callbacks: d } = s(), y = o.actions[n];
1504
+ return (y === void 0 || !se(d, n)) && z("ACTION_UNAVAILABLE", `bill "${i}" does not offer ${n}.`), y !== "enabled" && z("ACTION_DISABLED", je(y)), { row: o, callbacks: d };
1505
+ }
1506
+ return {
1507
+ getFeatures() {
1508
+ const { features: i } = s();
1509
+ return { ...i, sortableColumns: [...i.sortableColumns] };
1510
+ },
1511
+ /* ---- query ---- */
1512
+ getQuery() {
1513
+ const i = a(), { privacyMode: n } = s().features;
1514
+ if (!i)
1515
+ return {
1516
+ sorting: [],
1517
+ filters: {},
1518
+ quickFilter: "",
1519
+ pagination: { pageIndex: 0, pageSize: vt },
1520
+ privacyMode: n
1521
+ };
1522
+ const o = De(i), d = { ...i.getFilter() };
1523
+ for (const y of Object.keys(d))
1524
+ o.has(y) && delete d[y];
1525
+ return {
1526
+ sorting: ae(
1527
+ i.getSort().filter((y) => !o.has(y.colId))
1528
+ ),
1529
+ filters: d,
1530
+ quickFilter: i.getQuickFilter(),
1531
+ pagination: {
1532
+ pageIndex: i.getCurrentPage(),
1533
+ pageSize: i.getPageSize()
1534
+ },
1535
+ privacyMode: n
1536
+ };
1537
+ },
1538
+ setSort(i) {
1539
+ const n = a();
1540
+ if (!n) return;
1541
+ const { sortableColumns: o } = s().features, d = De(n);
1542
+ for (const y of i) {
1543
+ if (!o.includes(y.colId)) {
1544
+ ie(`setSort: the server does not sort "${y.colId}".`);
1545
+ return;
1546
+ }
1547
+ if (d.has(y.colId)) {
1548
+ ie(`setSort: "${y.colId}" is hidden by privacy mode.`);
1549
+ return;
1550
+ }
1551
+ }
1552
+ i.length > 1 && ie("setSort: the server sorts by one column; the first one is used."), n.setSort(i.slice(0, 1));
1553
+ },
1554
+ getFilter() {
1555
+ var i;
1556
+ return { ...((i = a()) == null ? void 0 : i.getFilter()) ?? {} };
1557
+ },
1558
+ setFilter(i, n) {
1559
+ var o;
1560
+ (o = a()) == null || o.setFilter(i, n);
1561
+ },
1562
+ getQuickFilter() {
1563
+ var i;
1564
+ return ((i = a()) == null ? void 0 : i.getQuickFilter()) ?? "";
1565
+ },
1566
+ setQuickFilter(i, n) {
1567
+ var o;
1568
+ (o = a()) == null || o.setQuickFilter(i, n);
1569
+ },
1570
+ clearFilters() {
1571
+ var i;
1572
+ (i = a()) == null || i.clearFilters();
1573
+ },
1574
+ goToPage(i) {
1575
+ var n;
1576
+ (n = a()) == null || n.goToPage(i);
1577
+ },
1578
+ setPageSize(i) {
1579
+ var n;
1580
+ (n = a()) == null || n.setPageSize(i);
1581
+ },
1582
+ getPageCount() {
1583
+ var i;
1584
+ return ((i = a()) == null ? void 0 : i.getPageCount()) ?? 0;
1585
+ },
1586
+ getRowCount() {
1587
+ var i;
1588
+ return ((i = a()) == null ? void 0 : i.getRowCount()) ?? 0;
1589
+ },
1590
+ getRowIds() {
1591
+ var i;
1592
+ return ((i = a()) == null ? void 0 : i.getRowIds()) ?? s().rows.map((n) => n.id);
1593
+ },
1594
+ /* ---- selection ---- */
1595
+ getSelection() {
1596
+ var i;
1597
+ return ((i = a()) == null ? void 0 : i.getSelection()) ?? [];
1598
+ },
1599
+ setSelection(i) {
1600
+ var n;
1601
+ (n = a()) == null || n.setSelection(i);
1602
+ },
1603
+ selectRange(i, n) {
1604
+ var o;
1605
+ (o = a()) == null || o.selectRange(i, n);
1606
+ },
1607
+ clearSelection() {
1608
+ var i;
1609
+ (i = a()) == null || i.clearSelection();
1610
+ },
1611
+ /* ---- columns ---- */
1612
+ getColumns() {
1613
+ const i = a();
1614
+ if (!i) return [];
1615
+ const { privacyMode: n } = s().features, o = [];
1616
+ for (const d of i.getColumns())
1617
+ Gi(d.id) && o.push({
1618
+ id: d.id,
1619
+ label: d.label,
1620
+ visible: d.visible,
1621
+ canHide: d.canHide,
1622
+ sortable: d.sortable,
1623
+ // DataGrid reports `masked`; a missing value counts as masked
1624
+ // for the counterparty while privacy mode is on.
1625
+ masked: d.masked ?? (n && d.id === "counterparty")
1626
+ });
1627
+ return o;
1628
+ },
1629
+ setColumnVisible(i, n) {
1630
+ var o;
1631
+ (o = a()) == null || o.setColumnVisible(i, n);
1632
+ },
1633
+ resetColumns() {
1634
+ var i;
1635
+ (i = a()) == null || i.resetColumnState();
1636
+ },
1637
+ /* ---- focus ---- */
1638
+ scrollToRow(i) {
1639
+ var n;
1640
+ (n = a()) == null || n.scrollToRow(i);
1641
+ },
1642
+ focusRow(i, n = "number") {
1643
+ var o;
1644
+ (o = a()) == null || o.focusRow(i, n);
1645
+ },
1646
+ /* ---- rows (agent-safe projection) ---- */
1647
+ getRowSummaries() {
1648
+ const { rows: i, callbacks: n } = s();
1649
+ return i.map((o) => Ci(o, n));
1650
+ },
1651
+ /* ---- row actions ---- */
1652
+ getRowActions(i) {
1653
+ const n = c(i), { callbacks: o, features: d, hiddenReasonText: y } = s();
1654
+ return _i(
1655
+ n,
1656
+ o,
1657
+ d.privacyMode,
1658
+ y
1659
+ );
1660
+ },
1661
+ openBill(i) {
1662
+ const { row: n, callbacks: o } = b(i, "open");
1663
+ o.onOpen(n, te);
1664
+ },
1665
+ downloadBill(i, n) {
1666
+ var y;
1667
+ n !== "pdf" && n !== "xml" && z("ACTION_UNAVAILABLE", `unknown format "${String(n)}".`);
1668
+ const { row: o, callbacks: d } = b(
1669
+ i,
1670
+ n === "xml" ? "downloadXml" : "downloadPdf"
1671
+ );
1672
+ (y = d.onDownload) == null || y.call(d, o, n, te);
1673
+ },
1674
+ loadIntoWarehouse(i) {
1675
+ var d;
1676
+ const { row: n, callbacks: o } = b(i, "loadIntoWarehouse");
1677
+ (d = o.onLoadIntoWarehouse) == null || d.call(o, n, {
1678
+ ...te,
1679
+ warehouseStatus: n.warehouseStatus ?? null
1680
+ });
1681
+ },
1682
+ /* ---- change feed ---- */
1683
+ subscribe(i) {
1684
+ var n;
1685
+ return ((n = a()) == null ? void 0 : n.subscribe(i)) ?? (() => {
1686
+ });
1687
+ }
1688
+ };
1689
+ }
1690
+ const Qi = {
1691
+ downloadPdf: "downloads",
1692
+ downloadXml: "downloads",
1693
+ loadIntoWarehouse: "warehouse",
1694
+ edit: "bill",
1695
+ recordPayment: "bill",
1696
+ writeOff: "bill",
1697
+ undoWriteOff: "bill",
1698
+ delete: "delete"
1699
+ };
1700
+ function Ji({
1701
+ callbacksRef: e,
1702
+ available: t,
1703
+ privacyMode: a
1704
+ }) {
1705
+ const { t: s } = v("ui"), {
1706
+ download: c,
1707
+ loadIntoWarehouse: b,
1708
+ edit: i,
1709
+ recordPayment: n,
1710
+ writeOff: o,
1711
+ delete: d
1712
+ } = t;
1713
+ return M(() => {
1714
+ const y = s(
1715
+ "billTable.disabledReason.privacyHidden",
1716
+ "Not available (reason hidden in privacy mode)"
1717
+ ), P = (f, m) => {
1718
+ const u = f.actions[m];
1719
+ if (!(u === void 0 || u === "enabled")) {
1720
+ if (typeof u.disabled == "string") {
1721
+ const r = Ye[u.disabled];
1722
+ return s(r.key, r.en);
1723
+ }
1724
+ return a ? y : u.disabled.text;
1725
+ }
1726
+ }, S = (f, m, u, r = "default") => {
1727
+ const h = Pi[f];
1728
+ return {
1729
+ // Developer constant: React key and `data-action-id`, never row data.
1730
+ id: f,
1731
+ // Design 3.6 menu group: the menu draws a separator between groups.
1732
+ section: Qi[f],
1733
+ icon: ft(m, { "aria-hidden": !0 }),
1734
+ label: s(h.key, h.en),
1735
+ onClick: u,
1736
+ variant: r,
1737
+ hidden: (L) => L.actions[f] === void 0,
1738
+ disabled: (L) => {
1739
+ const x = L.actions[f];
1740
+ return x !== void 0 && x !== "enabled";
1741
+ },
1742
+ disabledReason: (L) => P(L, f)
1743
+ };
1744
+ }, I = () => e.current, k = [];
1745
+ return c && k.push(
1746
+ S(
1747
+ "downloadPdf",
1748
+ xe,
1749
+ (f) => {
1750
+ var m, u;
1751
+ return (u = (m = I()).onDownload) == null ? void 0 : u.call(m, f, "pdf", _);
1752
+ }
1753
+ ),
1754
+ S(
1755
+ "downloadXml",
1756
+ Fe,
1757
+ (f) => {
1758
+ var m, u;
1759
+ return (u = (m = I()).onDownload) == null ? void 0 : u.call(m, f, "xml", _);
1760
+ }
1761
+ )
1762
+ ), b && k.push(
1763
+ S(
1764
+ "loadIntoWarehouse",
1765
+ $t,
1766
+ (f) => {
1767
+ var m, u;
1768
+ return (u = (m = I()).onLoadIntoWarehouse) == null ? void 0 : u.call(m, f, {
1769
+ ..._,
1770
+ // HTP-7312 analytics: `bill_warehouse_load_clicked
1771
+ // { warehouse_status }`; `null` without the module.
1772
+ warehouseStatus: f.warehouseStatus ?? null
1773
+ });
1774
+ }
1775
+ )
1776
+ ), i && k.push(
1777
+ S("edit", Wt, (f) => {
1778
+ var m, u;
1779
+ return (u = (m = I()).onEdit) == null ? void 0 : u.call(m, f, _);
1780
+ })
1781
+ ), n && k.push(
1782
+ S(
1783
+ "recordPayment",
1784
+ jt,
1785
+ (f) => {
1786
+ var m, u;
1787
+ return (u = (m = I()).onRecordPayment) == null ? void 0 : u.call(m, f, _);
1788
+ }
1789
+ )
1790
+ ), o && k.push(
1791
+ S(
1792
+ "writeOff",
1793
+ Mt,
1794
+ (f) => {
1795
+ var m, u;
1796
+ return (u = (m = I()).onWriteOff) == null ? void 0 : u.call(m, f, !1, _);
1797
+ }
1798
+ ),
1799
+ S(
1800
+ "undoWriteOff",
1801
+ Ut,
1802
+ (f) => {
1803
+ var m, u;
1804
+ return (u = (m = I()).onWriteOff) == null ? void 0 : u.call(m, f, !0, _);
1805
+ }
1806
+ )
1807
+ ), d && k.push(
1808
+ S(
1809
+ "delete",
1810
+ Kt,
1811
+ (f) => {
1812
+ var m, u;
1813
+ return (u = (m = I()).onDelete) == null ? void 0 : u.call(m, f, _);
1814
+ },
1815
+ "destructive"
1816
+ )
1817
+ ), k;
1818
+ }, [
1819
+ s,
1820
+ e,
1821
+ c,
1822
+ b,
1823
+ i,
1824
+ n,
1825
+ o,
1826
+ d,
1827
+ a
1828
+ ]);
1829
+ }
1830
+ const ea = [], ta = (e) => e.id, ia = (e) => e.number, aa = yt(
1831
+ function(t, a) {
1832
+ const {
1833
+ /* data */
1834
+ rows: s,
1835
+ rowCount: c,
1836
+ currency: b = "EUR",
1837
+ totals: i = null,
1838
+ /* query */
1839
+ query: n,
1840
+ defaultQuery: o,
1841
+ onQueryChange: d,
1842
+ sortableColumns: y = Ke,
1843
+ pageSizeOptions: P = Ae,
1844
+ /* selection */
1845
+ selectable: S = !0,
1846
+ selection: I,
1847
+ defaultSelection: k,
1848
+ onSelectionChange: f,
1849
+ /* columns */
1850
+ showWarehouseStatus: m = !1,
1851
+ gridId: u = Si,
1852
+ persistColumnState: r = !0,
1853
+ /* row actions */
1854
+ onOpen: h,
1855
+ onDownload: L,
1856
+ onLoadIntoWarehouse: x,
1857
+ onEdit: ce,
1858
+ onRecordPayment: ue,
1859
+ onWriteOff: pe,
1860
+ onDelete: be,
1861
+ /* bulk and list actions */
1862
+ onBulkDownload: Z,
1863
+ listDownloads: me = ea,
1864
+ onListDownload: fe,
1865
+ onRefresh: ye,
1866
+ /* toolbar */
1867
+ toolbarStart: Xe,
1868
+ extraFilterLabels: he,
1869
+ /* states */
1870
+ status: ge = "ready",
1871
+ error: O,
1872
+ onCreateBill: Te,
1873
+ headingLevel: Se,
1874
+ /* privacy and layout */
1875
+ privacyMode: E = !1,
1876
+ caption: Qe,
1877
+ density: Je = "default",
1878
+ height: ve = "auto",
1879
+ /* DOM: naming goes to the grid's scroll region */
1880
+ className: et,
1881
+ "aria-label": tt,
1882
+ "aria-labelledby": it,
1883
+ "aria-describedby": at,
1884
+ ...nt
1885
+ } = t, { t: p } = v("ui"), we = Ee(), G = K(null), X = {
1886
+ onOpen: h,
1887
+ onDownload: L,
1888
+ onLoadIntoWarehouse: x,
1889
+ onEdit: ce,
1890
+ onRecordPayment: ue,
1891
+ onWriteOff: pe,
1892
+ onDelete: be
1893
+ }, Q = K(X);
1894
+ Q.current = X;
1895
+ const ot = p(
1896
+ "billTable.disabledReason.privacyHidden",
1897
+ "Not available (reason hidden in privacy mode)"
1898
+ ), Ie = {
1899
+ rows: s,
1900
+ callbacks: X,
1901
+ features: {
1902
+ selectable: S,
1903
+ privacyMode: E,
1904
+ showWarehouseStatus: m,
1905
+ sortableColumns: [...y],
1906
+ status: ge
1907
+ },
1908
+ hiddenReasonText: ot
1909
+ }, ke = K(Ie);
1910
+ ke.current = Ie;
1911
+ const [U] = ht(() => Xi(G, ke));
1912
+ gt(a, () => U, [U]), St(ni, U, u);
1913
+ const Ne = K(null), lt = (g) => {
1914
+ var Le;
1915
+ const D = ae(g.sorting);
1916
+ Ne.current = {
1917
+ key: ze(D),
1918
+ raw: ae(((Le = G.current) == null ? void 0 : Le.getSort()) ?? g.sorting)
1919
+ }, d == null || d({
1920
+ sorting: D,
1921
+ // Column models and host keys; DataGrid evaluates none of them in
1922
+ // server mode and passes the host's keys through as written.
1923
+ filters: g.filters,
1924
+ quickFilter: g.quickFilter,
1925
+ pagination: { ...g.pagination },
1926
+ privacyMode: E
1927
+ });
1928
+ }, rt = n ? Ai(n.sorting, Ne.current) : void 0, J = P.join(","), st = M(
1929
+ () => ({
1930
+ pageSizeOptions: J === "" ? Ae : J.split(",").map(Number)
1931
+ }),
1932
+ [J]
1933
+ ), dt = M(() => ({ ...{
1934
+ datePreset: p("billTable.filter.datePreset", "Period"),
1935
+ type: p("billTable.filter.type", "Type"),
1936
+ number: p("billTable.filter.number", "Number"),
1937
+ prefix: p("billTable.filter.prefix", "Prefix"),
1938
+ withInsuranceNet: p(
1939
+ "billTable.filter.withInsuranceNet",
1940
+ "Insurer amount"
1941
+ ),
1942
+ withVat: p("billTable.filter.withVat", "VAT"),
1943
+ withTaxAtSource: p(
1944
+ "billTable.filter.withTaxAtSource",
1945
+ "Withholding tax"
1946
+ ),
1947
+ withWelfareFundContribution: p(
1948
+ "billTable.filter.withWelfareFundContribution",
1949
+ "Welfare fund contribution"
1950
+ ),
1951
+ withUnpaidAmount: p(
1952
+ "billTable.filter.withUnpaidAmount",
1953
+ "Amount still to pay"
1954
+ ),
1955
+ writtenOff: p("billTable.filter.writtenOff", "Written off"),
1956
+ taxOfficeNotification: p(
1957
+ "billTable.filter.taxOfficeNotification",
1958
+ "Consent to send to Sistema TS"
1959
+ ),
1960
+ receivedFromSdi: p(
1961
+ "billTable.filter.receivedFromSdi",
1962
+ "Received from SDI"
1963
+ ),
1964
+ sentToSdi: p("billTable.filter.sentToSdi", "Sent to SDI"),
1965
+ selfBill: p("billTable.filter.selfBill", "Self-billing"),
1966
+ liabilityDate: p("billTable.filter.liabilityDate", "Due date"),
1967
+ sdiEntryDate: p(
1968
+ "billTable.filter.sdiEntryDate",
1969
+ "Date received by SDI"
1970
+ ),
1971
+ relationType: p("billTable.filter.relationType", "Counterparty type"),
1972
+ relation: p("billTable.filter.relation", "Counterparty"),
1973
+ insurance: p("billTable.filter.insurance", "Insurer"),
1974
+ personalAssistant: p(
1975
+ "billTable.filter.personalAssistant",
1976
+ "Personal assistant"
1977
+ )
1978
+ }, ...he }), [p, he]), ct = Ji({
1979
+ callbacksRef: Q,
1980
+ available: {
1981
+ download: !!L,
1982
+ loadIntoWarehouse: !!x,
1983
+ edit: !!ce,
1984
+ recordPayment: !!ue,
1985
+ writeOff: !!pe,
1986
+ delete: !!be
1987
+ },
1988
+ privacyMode: E
1989
+ }), ut = Tt((g) => {
1990
+ Q.current.onOpen(g, _);
1991
+ }, []), pt = Yi({
1992
+ currency: b,
1993
+ showWarehouseStatus: m,
1994
+ sortableColumns: y,
1995
+ totals: i,
1996
+ privacyMode: E,
1997
+ openHintId: we,
1998
+ onOpenRow: ut,
1999
+ rowActions: ct
2000
+ }), bt = $.map((g) => {
2001
+ const D = Y[g];
2002
+ return { value: g, label: p(D.key, D.en) };
2003
+ }), mt = /* @__PURE__ */ T(N, { children: [
2004
+ /* @__PURE__ */ T(N.FilterBar, { children: [
2005
+ Xe,
2006
+ /* @__PURE__ */ l(
2007
+ N.QuickSearch,
2008
+ {
2009
+ placeholder: E ? p("billTable.search.placeholderPrivate", "Search by number") : p(
2010
+ "billTable.search.placeholder",
2011
+ "Search by number or counterparty"
2012
+ )
2013
+ }
2014
+ ),
2015
+ /* @__PURE__ */ l(
2016
+ N.FacetFilter,
2017
+ {
2018
+ field: "direction",
2019
+ label: p("billTable.column.direction", "Direction"),
2020
+ options: [
2021
+ { value: null, label: p("dataTable.selectFilter.all", "All") },
2022
+ ...bt
2023
+ ]
2024
+ }
2025
+ ),
2026
+ /* @__PURE__ */ l(N.FilterChips, {})
2027
+ ] }),
2028
+ /* @__PURE__ */ T(N.Actions, { children: [
2029
+ S && Z ? /* @__PURE__ */ T(ne, { children: [
2030
+ /* @__PURE__ */ l(
2031
+ N.BulkAction,
2032
+ {
2033
+ label: p("billTable.bulk.downloadPdf", "Download PDFs"),
2034
+ icon: /* @__PURE__ */ l(xe, { "aria-hidden": "true" }),
2035
+ onAction: ({ selectedRowIds: g }) => Z([...g], "pdf")
2036
+ }
2037
+ ),
2038
+ /* @__PURE__ */ l(
2039
+ N.BulkAction,
2040
+ {
2041
+ label: p("billTable.bulk.downloadXml", "Download XML files"),
2042
+ icon: /* @__PURE__ */ l(Fe, { "aria-hidden": "true" }),
2043
+ onAction: ({ selectedRowIds: g }) => Z([...g], "xml")
2044
+ }
2045
+ )
2046
+ ] }) : null,
2047
+ /* @__PURE__ */ T(
2048
+ It,
2049
+ {
2050
+ "aria-label": p("dataTable.tableActions", "Table actions"),
2051
+ children: [
2052
+ me.length > 0 && fe ? (
2053
+ // Today's list downloads apply the query to every matching
2054
+ // bill on the server; DataGrid's built-in CSV, Excel and PDF
2055
+ // would export one page, so only custom items are offered.
2056
+ /* @__PURE__ */ l(
2057
+ N.ExportMenu,
2058
+ {
2059
+ label: p("billTable.export.menu", "Download list"),
2060
+ children: me.map((g) => {
2061
+ const D = Ei[g];
2062
+ return /* @__PURE__ */ l(
2063
+ N.ExportMenu.Item,
2064
+ {
2065
+ format: "custom",
2066
+ label: p(D.key, D.en),
2067
+ onExport: () => fe(g, U.getQuery())
2068
+ },
2069
+ g
2070
+ );
2071
+ })
2072
+ }
2073
+ )
2074
+ ) : null,
2075
+ ye ? /* @__PURE__ */ l(N.Refresh, { onRefresh: ye }) : null,
2076
+ /* @__PURE__ */ l(N.ColumnToggle, {})
2077
+ ]
2078
+ }
2079
+ )
2080
+ ] })
2081
+ ] });
2082
+ return /* @__PURE__ */ T(
2083
+ "div",
2084
+ {
2085
+ "data-component": "bill-table",
2086
+ "data-component-id": u,
2087
+ className: oi({ height: ve, className: et }),
2088
+ ...nt,
2089
+ children: [
2090
+ /* @__PURE__ */ l("span", { hidden: !0, id: we, children: p("billTable.open", "Open bill") }),
2091
+ /* @__PURE__ */ l(
2092
+ wt,
2093
+ {
2094
+ ref: G,
2095
+ columns: pt,
2096
+ rows: s,
2097
+ getRowId: ta,
2098
+ caption: Qe ?? p("billTable.caption", "Bills"),
2099
+ "aria-label": tt,
2100
+ "aria-labelledby": it,
2101
+ "aria-describedby": at,
2102
+ gridId: u,
2103
+ registerAgent: !1,
2104
+ persistColumnState: r,
2105
+ dataMode: "server",
2106
+ rowCount: c,
2107
+ sorting: rt,
2108
+ defaultSorting: (o == null ? void 0 : o.sorting) ?? vi,
2109
+ filters: n == null ? void 0 : n.filters,
2110
+ defaultFilters: o == null ? void 0 : o.filters,
2111
+ quickFilter: n == null ? void 0 : n.quickFilter,
2112
+ defaultQuickFilter: o == null ? void 0 : o.quickFilter,
2113
+ page: n == null ? void 0 : n.pagination,
2114
+ defaultPage: o == null ? void 0 : o.pagination,
2115
+ onQueryChange: lt,
2116
+ filterLabels: dt,
2117
+ multiSort: !1,
2118
+ maxSortLevels: 1,
2119
+ pagination: st,
2120
+ selectionMode: S ? "multiple" : "none",
2121
+ rowSelection: I,
2122
+ defaultRowSelection: k,
2123
+ onRowSelectionChange: f,
2124
+ selectAllScope: "page",
2125
+ rangeSelection: !0,
2126
+ clearSelectionOnFilterChange: !0,
2127
+ columnResizing: !0,
2128
+ responsiveColumns: !0,
2129
+ getRowLabel: ia,
2130
+ rowLabelPrivacySafe: !0,
2131
+ status: ge,
2132
+ error: {
2133
+ title: (O == null ? void 0 : O.title) ?? p("billTable.error.title", "The bills could not be loaded"),
2134
+ description: O == null ? void 0 : O.description,
2135
+ onRetry: O == null ? void 0 : O.onRetry,
2136
+ headingLevel: Se
2137
+ },
2138
+ empty: {
2139
+ title: p("billTable.empty.title", "No bills yet"),
2140
+ description: p(
2141
+ "billTable.empty.description",
2142
+ "Bills you create, or receive from SDI, appear here."
2143
+ ),
2144
+ action: Te ? {
2145
+ label: p("billTable.empty.action", "Add bill"),
2146
+ onClick: Te
2147
+ } : void 0,
2148
+ headingLevel: Se,
2149
+ noResultsTitle: p(
2150
+ "billTable.empty.noResultsTitle",
2151
+ "No bills match your filters"
2152
+ )
2153
+ },
2154
+ toolbar: mt,
2155
+ density: Je,
2156
+ height: ve,
2157
+ privacyMode: E
2158
+ }
2159
+ )
2160
+ ]
2161
+ }
2162
+ );
2163
+ }
2164
+ );
2165
+ aa.displayName = "BillTable";
2166
+ const Ce = ["incoming"], Re = ["outgoing"], Pe = [
2167
+ "unpaid",
2168
+ "partiallyPaid",
2169
+ "overdue"
2170
+ ], na = ["received"], oa = ["notLoaded", "toReview"];
2171
+ function Ka({
2172
+ withWarehouse: e = !1
2173
+ } = {}) {
2174
+ const { t } = v("ui");
2175
+ return M(() => {
2176
+ const a = [
2177
+ {
2178
+ id: "bills-this-year",
2179
+ label: t("billTable.tabs.thisYear", "This year"),
2180
+ filterModel: { datePreset: "thisYear" },
2181
+ locked: !0,
2182
+ userNamed: !1
2183
+ },
2184
+ {
2185
+ id: "bills-all",
2186
+ label: t("billTable.tabs.all", "All"),
2187
+ filterModel: {},
2188
+ locked: !0,
2189
+ userNamed: !1
2190
+ },
2191
+ {
2192
+ id: "bills-incoming",
2193
+ label: t("billTable.tabs.incoming", "Incoming"),
2194
+ filterModel: { direction: { type: "set", values: [...Ce] } },
2195
+ userNamed: !1
2196
+ },
2197
+ {
2198
+ id: "bills-outgoing",
2199
+ label: t("billTable.tabs.outgoing", "Outgoing"),
2200
+ filterModel: { direction: { type: "set", values: [...Re] } },
2201
+ userNamed: !1
2202
+ },
2203
+ {
2204
+ id: "bills-to-pay",
2205
+ label: t("billTable.tabs.toPay", "To pay"),
2206
+ filterModel: {
2207
+ direction: { type: "set", values: [...Ce] },
2208
+ paymentStatus: { type: "set", values: [...Pe] }
2209
+ },
2210
+ userNamed: !1
2211
+ },
2212
+ {
2213
+ id: "bills-to-collect",
2214
+ label: t("billTable.tabs.toCollect", "To collect"),
2215
+ filterModel: {
2216
+ direction: { type: "set", values: [...Re] },
2217
+ paymentStatus: { type: "set", values: [...Pe] }
2218
+ },
2219
+ userNamed: !1
2220
+ }
2221
+ ];
2222
+ return e && a.push({
2223
+ id: "bills-to-load",
2224
+ label: t("billTable.tabs.toLoad", "To load into warehouse"),
2225
+ filterModel: {
2226
+ sdiStatus: { type: "set", values: [...na] },
2227
+ warehouseStatus: { type: "set", values: [...oa] }
2228
+ },
2229
+ userNamed: !1
2230
+ }), a;
2231
+ }, [t, e]);
2232
+ }
2233
+ export {
2234
+ Wa as B,
2235
+ Fa as a,
2236
+ $ as b,
2237
+ Ma as c,
2238
+ yi as d,
2239
+ Ue as e,
2240
+ hi as f,
2241
+ Ti as g,
2242
+ Ua as h,
2243
+ Ke as i,
2244
+ xa as j,
2245
+ gi as k,
2246
+ aa as l,
2247
+ ni as m,
2248
+ Ka as u
2249
+ };
2250
+ //# sourceMappingURL=default-tabs-BQcSqcNG.js.map