@alfadocs/ui-kit 1.140.0 → 1.142.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 (295) hide show
  1. package/dist/_chunks/{actions-cell-renderer-C-l_ppP6.js → actions-cell-renderer-CPNyF6ye.js} +3 -3
  2. package/dist/_chunks/{ai-credits-notice-BNFcQoXo.js → ai-credits-notice-D_Zm_N2A.js} +2 -2
  3. package/dist/_chunks/{ai-prompt-input-B2QFwuJ1.js → ai-prompt-input-y4-dtQIT.js} +2 -2
  4. package/dist/_chunks/{alia-sidebar-CVBlKur9.js → alia-sidebar-uxTsUbIt.js} +2 -2
  5. package/dist/_chunks/{anamnesis-summary-rows-YJGs2uWD.js → anamnesis-summary-rows-C2Ca9_Qj.js} +8 -8
  6. package/dist/_chunks/{appointment-card-CaxFXtSn.js → appointment-card-C0UFYFLZ.js} +170 -168
  7. package/dist/_chunks/{appointment-details-panel.history-DrIMDQYf.js → appointment-details-panel.history-BUXwhill.js} +2 -2
  8. package/dist/_chunks/{appointment-peek-BP_ACFz5.js → appointment-peek-BCzekfWh.js} +3 -3
  9. package/dist/_chunks/appointment-timeline-BK68CCBl.js +689 -0
  10. package/dist/_chunks/{appointment-tray-DPpeR9JT.js → appointment-tray-dfgScPcC.js} +2 -2
  11. package/dist/_chunks/{audio-recorder-6dUq8I38.js → audio-recorder-DxhCiLqG.js} +2 -2
  12. package/dist/_chunks/{balance-badge-cell-CRStPNDd.js → balance-badge-cell-CXi6moSa.js} +5 -5
  13. package/dist/_chunks/{bill-line-table-DTqXdBED.js → bill-line-table-qAdmV19W.js} +2 -2
  14. package/dist/_chunks/{bishop-score-M7Fi-ykx.js → bishop-score-DbvfBlBM.js} +2 -2
  15. package/dist/_chunks/{button-group-DuQuuulC.js → button-group-DoKG16Fy.js} +2 -2
  16. package/dist/_chunks/{calculator-dialog-Cg3GjaRf.js → calculator-dialog-BWizCwN5.js} +2 -2
  17. package/dist/_chunks/{calendar-appointment-editor-dialog-BBrJlmyd.js → calendar-appointment-editor-dialog-BDc8Q4Ji.js} +17 -17
  18. package/dist/_chunks/{calendar-editor-discard-host-BcMEgVEq.js → calendar-editor-discard-host-BblBxMqT.js} +5 -5
  19. package/dist/_chunks/{calendar-waiting-list-panel-Cdg9YssA.js → calendar-waiting-list-panel-js-0KEh8.js} +6 -6
  20. package/dist/_chunks/{calendar.sheets-DbMOO7YV.js → calendar.sheets-sBWH7Jxn.js} +12 -12
  21. package/dist/_chunks/calls-panel-CnjAKFgA.js +1448 -0
  22. package/dist/_chunks/{care-plan-card-CjHq6PLo.js → care-plan-card-TZH6C60K.js} +2 -2
  23. package/dist/_chunks/{care-plan-entry-card-DY1toF6E.js → care-plan-entry-card-CufvXAWa.js} +2 -2
  24. package/dist/_chunks/{chart-D0EeFWst.js → chart-ChNsJf9_.js} +2 -2
  25. package/dist/_chunks/{color-picker-CC8ZfntU.js → color-picker-5FKOk_z1.js} +2 -2
  26. package/dist/_chunks/{communications-panel-DBWM9II9.js → communications-panel-EP27FN7e.js} +3 -3
  27. package/dist/_chunks/{control-room-rail-DcJpHbp4.js → control-room-rail-7SidoPJH.js} +2 -2
  28. package/dist/_chunks/{cycle-calculator-Cb66X2Pf.js → cycle-calculator-BUCGfEcy.js} +2 -2
  29. package/dist/_chunks/{dashboard-grid-2uVXEe9e.js → dashboard-grid-D2egA1Zu.js} +2 -2
  30. package/dist/_chunks/{data-grid-tabs-D9Y4DeeH.js → data-grid-tabs-Mbj6bSK2.js} +2 -2
  31. package/dist/_chunks/{data-grid-CRUSZcVT.js → data-grid-tyE2kGfx.js} +5 -5
  32. package/dist/_chunks/{data-table-CnLfOwxg.js → data-table-Bq1FRBGB.js} +4 -4
  33. package/dist/_chunks/{data-table-tabs-NYLhD8_Z.js → data-table-tabs-D5ujdK56.js} +2 -2
  34. package/dist/_chunks/{date-picker-BmVBVpVu.js → date-picker-CD-PBzXM.js} +2 -2
  35. package/dist/_chunks/{date-range-panel-CT9Pk-HF.js → date-range-panel-BOgfP_V3.js} +2 -2
  36. package/dist/_chunks/{date-range-picker-2Up_FRrM.js → date-range-picker-Z-hI5Vb7.js} +2 -2
  37. package/dist/_chunks/{date-time-picker-C6b_Vymc.js → date-time-picker-DHza1SEH.js} +2 -2
  38. package/dist/_chunks/{default-tabs-CRbVCDSU.js → default-tabs-ChkVzOL8.js} +7 -7
  39. package/dist/_chunks/dialog-239Geb7Z.js +431 -0
  40. package/dist/_chunks/dialog-container-DHR0byah.js +17 -0
  41. package/dist/_chunks/{document-preview-FTCHXYhk.js → document-preview-x_S8V7VC.js} +3 -3
  42. package/dist/_chunks/{dropdown-menu-DBWaW4pq.js → dropdown-menu-Bm1KALnk.js} +2 -2
  43. package/dist/_chunks/{due-date-calculator-Dlqegxx9.js → due-date-calculator-DpN0Z9p4.js} +2 -2
  44. package/dist/_chunks/{editable-currency-cell-renderer-CZMQ5xRT.js → editable-currency-cell-renderer-C6z6ABN_.js} +2 -2
  45. package/dist/_chunks/{face-scheme-Bxt7ZnJn.js → face-scheme-S88jbOzl.js} +3 -3
  46. package/dist/_chunks/{file-manager-Bsccb8Jj.js → file-manager-ChQSjfU8.js} +5 -5
  47. package/dist/_chunks/{gestational-age-calculator-DXSPWG8u.js → gestational-age-calculator-CCDIhSMV.js} +3 -3
  48. package/dist/_chunks/{hcg-doubling-Dqbj6PQj.js → hcg-doubling-BekuksBv.js} +2 -2
  49. package/dist/_chunks/{header-settings-Cu-MKOsO.js → header-settings-CvZ7Qii6.js} +3 -3
  50. package/dist/_chunks/{heatmap-CFPaEKD_.js → heatmap-D0OGx-70.js} +3 -3
  51. package/dist/_chunks/{help-me-write-templates-DO6vJeP4.js → help-me-write-templates-C84_4iwX.js} +2 -2
  52. package/dist/_chunks/{hover-card-CuRIA4wN.js → hover-card-CIiPOlyM.js} +2 -2
  53. package/dist/_chunks/{icon-button-group-SmkdVCNx.js → icon-button-group-CLhC7wjU.js} +2 -2
  54. package/dist/_chunks/{icon-picker-BmU6gpZT.js → icon-picker-Ct6n8GTa.js} +2 -2
  55. package/dist/_chunks/{info-tip-B3cn3fY2.js → info-tip-CkH2En-i.js} +2 -2
  56. package/dist/_chunks/{invoice-upload-list-BR6vycF7.js → invoice-upload-list-CZ1B9yWh.js} +4 -4
  57. package/dist/_chunks/{kit-extensions-QddOSnIq.js → kit-extensions-C_oZ7WOq.js} +4 -4
  58. package/dist/_chunks/{link-cell-renderer-hAJplRFF.js → link-cell-renderer-ByOAy2Sb.js} +4 -4
  59. package/dist/_chunks/{locale-picker-C86h8Yt1.js → locale-picker-OrojXX6E.js} +2 -2
  60. package/dist/_chunks/{marketplace-app-shell-dMmxI6MT.js → marketplace-app-shell-DnL187-U.js} +4 -4
  61. package/dist/_chunks/{message-tray-pLGgLmoG.js → message-tray-g6dp_AAt.js} +2 -2
  62. package/dist/_chunks/{muscle-scheme-BB2eBfww.js → muscle-scheme-vNd8wU7V.js} +2 -2
  63. package/dist/_chunks/{non-modal-tab-exit-j3CPOuE3.js → non-modal-tab-exit-DqJao_E-.js} +2 -1
  64. package/dist/_chunks/{notes-panel-CnmQqhwq.js → notes-panel-CtMLUJOe.js} +5 -4
  65. package/dist/_chunks/{notification-tray-mlCfxNRH.js → notification-tray-DqCYs9Bw.js} +2 -2
  66. package/dist/_chunks/{optical-prescription-GzeK_2cf.js → optical-prescription-CWwrW4YQ.js} +2 -2
  67. package/dist/_chunks/{pagination-C7N_NiRN.js → pagination-BpXG5jVk.js} +2 -2
  68. package/dist/_chunks/{parts-BOnDDU3E.js → parts-IFiXO68Y.js} +3 -3
  69. package/dist/_chunks/{patient-account-settings-DfEPHmCh.js → patient-account-settings-e8Wp2g-F.js} +3 -3
  70. package/dist/_chunks/{patient-check-in-resume-TWs8CPQr.js → patient-check-in-resume-_nwf9gpx.js} +5 -5
  71. package/dist/_chunks/{patient-details-D0PjzALT.js → patient-details-6uJZ27ZL.js} +2 -2
  72. package/dist/_chunks/{patient-field-row-DlpIModg.js → patient-field-row-D8Cu_MQp.js} +5 -5
  73. package/dist/_chunks/{patient-search-aTFd7p9s.js → patient-search-C6-INPjs.js} +2 -2
  74. package/dist/_chunks/{patient-summary-card-BP_K7g_q.js → patient-summary-card-NYjO0IfN.js} +3 -3
  75. package/dist/_chunks/{pdf-viewer-TRC5jEm5.js → pdf-viewer-C8no312t.js} +2 -2
  76. package/dist/_chunks/{phone-input-DRKcJUi4.js → phone-input-DHiYJZ9v.js} +2 -2
  77. package/dist/_chunks/{popover-CN5IsOeS.js → popover-CkvP3rHZ.js} +2 -2
  78. package/dist/_chunks/{popup-region-qz_5_A0V.js → popup-region-BgZ8oeUB.js} +2 -2
  79. package/dist/_chunks/{portal-details-VfeOI4PB.js → portal-details-D9oF6FUV.js} +2 -2
  80. package/dist/_chunks/{portal-documents-hGHlwmbv.js → portal-documents-DSiLSave.js} +5 -5
  81. package/dist/_chunks/{portal-parts-C99CreYO.js → portal-parts-8qrUM-uK.js} +3 -3
  82. package/dist/_chunks/{practice-results-DaxGw9_f.js → practice-results-BUEsl2Pj.js} +3 -3
  83. package/dist/_chunks/{pregnancy-dating-a6WIg4oy.js → pregnancy-dating-wc9iCN0f.js} +3 -3
  84. package/dist/_chunks/{prescription-history-Bp_JHhdF.js → prescription-history-DFcPXYdF.js} +8 -8
  85. package/dist/_chunks/{product-hub-panel-K4QbULG7.js → product-hub-panel-BPpmVDm5.js} +2 -2
  86. package/dist/_chunks/{public-header.agent-DaeDfLfy.js → public-header.agent-Dsl9zhA2.js} +2 -2
  87. package/dist/_chunks/{radiograph-panel.agent-88VjqlG7.js → radiograph-panel.agent-CSpr2paU.js} +4 -4
  88. package/dist/_chunks/{registration-form-Cs9o6e5q.js → registration-form-DRGMzq9V.js} +3 -3
  89. package/dist/_chunks/{reserved.agent-L2ElYPuj.js → reserved.agent-C_pr0bHy.js} +4 -4
  90. package/dist/_chunks/{rich-text-editor-DFsH5RAj.js → rich-text-editor-CQ54ybTB.js} +1325 -1310
  91. package/dist/_chunks/{row-actions-BF2-uizV.js → row-actions-C6d6vy5z.js} +3 -3
  92. package/dist/_chunks/{saved-view-tabs-DLWm88Eq.js → saved-view-tabs-CVUM3Nqz.js} +2 -2
  93. package/dist/_chunks/{select-Bm8s3q-X.js → select-Bw5FvGJ7.js} +2 -2
  94. package/dist/_chunks/{send-registration-link-form-C1vw6H1M.js → send-registration-link-form-D-NkS__p.js} +3 -3
  95. package/dist/_chunks/{sheet-BdhYeQQT.js → sheet-BIAhwdyS.js} +2 -2
  96. package/dist/_chunks/{sign-document-DDZbmYHu.js → sign-document-BUhWw-7S.js} +2 -2
  97. package/dist/_chunks/{signature-request-D3sLLOM6.js → signature-request-BfKo3vOz.js} +4 -4
  98. package/dist/_chunks/{signing-end-screen-BdhbkPKO.js → signing-end-screen-Pmda6tCH.js} +4 -4
  99. package/dist/_chunks/{step-up-dialog-C2JqJmCA.js → step-up-dialog-C1O8ctoh.js} +2 -2
  100. package/dist/_chunks/{sync-tray-BhnkgXKK.js → sync-tray-BTmveFGE.js} +2 -2
  101. package/dist/_chunks/{tab-bar-CeC2QOwB.js → tab-bar-C6tPDq9s.js} +2 -2
  102. package/dist/_chunks/{tabs-BXr5XeGq.js → tabs-BOf9OO--.js} +3 -3
  103. package/dist/_chunks/{task-editor-DDVDPKJf.js → task-editor-DNkrLbgK.js} +7 -6
  104. package/dist/_chunks/{tasks-panel-BHXaPNOZ.js → tasks-panel-Dmp49cBo.js} +3 -3
  105. package/dist/_chunks/{theme-toggle-BQDFxvVS.js → theme-toggle-C2LPw3xr.js} +3 -3
  106. package/dist/_chunks/{token-insert-menu-BLtfMTJd.js → token-insert-menu-sGtftx4Y.js} +2 -2
  107. package/dist/_chunks/{tool-rail-Kup1b7xI.js → tool-rail-CKOuVHUQ.js} +213 -209
  108. package/dist/_chunks/{toolbar-B7UHCMSr.js → toolbar-JTR20W-U.js} +3 -3
  109. package/dist/_chunks/{tooth-scheme-BtnFgugP.js → tooth-scheme-DpgciFU8.js} +2 -2
  110. package/dist/_chunks/{unit-converter-OBhSDXee.js → unit-converter-D1e1wZRE.js} +2 -2
  111. package/dist/_chunks/{use-appointment-details-read-DeQnmmZw.js → use-appointment-details-read-DIRHedaM.js} +7 -7
  112. package/dist/_chunks/{verify-identity-types-C6Bam8v6.js → verify-identity-types-CpeJIc9F.js} +2 -2
  113. package/dist/_chunks/{voice-control-panel-Dc_NFH2R.js → voice-control-panel-CfBUrzhJ.js} +3 -3
  114. package/dist/_chunks/{widget-picker-D3T7e8a4.js → widget-picker-Ddl0lDWV.js} +2 -2
  115. package/dist/_chunks/{workflow-map-DaZFP9SJ.js → workflow-map-CsfRHhlz.js} +2 -2
  116. package/dist/_chunks/{workflow-status-CO0mxXs2.js → workflow-status-Cg7yjnye.js} +2 -2
  117. package/dist/_chunks/{workflow-webhook-action-BsGSh3h9.js → workflow-webhook-action-BUWc2txJ.js} +2 -2
  118. package/dist/agent-catalog.json +134 -3
  119. package/dist/agent-i18n/en.json +8 -2
  120. package/dist/appointment-editor-panel/index.js +2 -2
  121. package/dist/browser-support.js +1 -1
  122. package/dist/calendar-action-buttons/index.js +1 -1
  123. package/dist/components/_shared/non-modal-tab-exit.d.ts +1 -0
  124. package/dist/components/ai-credits-notice/index.js +1 -1
  125. package/dist/components/ai-prompt-input/index.js +1 -1
  126. package/dist/components/appointment-card/appointment-card.d.ts +4 -0
  127. package/dist/components/appointment-card/index.js +2 -2
  128. package/dist/components/appointment-details-panel/index.js +1 -1
  129. package/dist/components/appointment-peek/index.js +1 -1
  130. package/dist/components/appointment-timeline/appointment-timeline.d.ts +51 -0
  131. package/dist/components/appointment-timeline/index.d.ts +1 -1
  132. package/dist/components/appointment-timeline/index.js +1 -1
  133. package/dist/components/audio-recorder/index.js +1 -1
  134. package/dist/components/bill-line-table/index.js +1 -1
  135. package/dist/components/bill-table/index.js +1 -1
  136. package/dist/components/bishop-score/index.js +1 -1
  137. package/dist/components/booking/index.js +1 -1
  138. package/dist/components/button-group/index.js +1 -1
  139. package/dist/components/calculator-dialog/index.js +1 -1
  140. package/dist/components/calls-panel/calls-panel.d.ts +91 -0
  141. package/dist/components/calls-panel/index.d.ts +1 -1
  142. package/dist/components/calls-panel/index.js +1 -1
  143. package/dist/components/care-plan-card/index.js +1 -1
  144. package/dist/components/care-plan-entry-card/index.js +1 -1
  145. package/dist/components/chart/index.js +1 -1
  146. package/dist/components/color-picker/index.js +1 -1
  147. package/dist/components/communications-panel/index.js +1 -1
  148. package/dist/components/control-room-rail/index.js +1 -1
  149. package/dist/components/cycle-calculator/index.js +1 -1
  150. package/dist/components/dashboard-grid/index.js +1 -1
  151. package/dist/components/data-grid/index.js +2 -2
  152. package/dist/components/data-grid-tabs/index.js +1 -1
  153. package/dist/components/data-table/index.js +4 -4
  154. package/dist/components/data-table-tabs/index.js +1 -1
  155. package/dist/components/date-picker/index.js +1 -1
  156. package/dist/components/date-range-picker/index.js +1 -1
  157. package/dist/components/date-time-picker/index.js +1 -1
  158. package/dist/components/dialog/dialog-container.d.ts +27 -0
  159. package/dist/components/dialog/dialog.d.ts +12 -2
  160. package/dist/components/dialog/index.d.ts +3 -1
  161. package/dist/components/dialog/index.js +5 -3
  162. package/dist/components/document-preview/index.js +1 -1
  163. package/dist/components/dropdown-menu/index.js +1 -1
  164. package/dist/components/due-date-calculator/index.js +1 -1
  165. package/dist/components/face-scheme/index.js +1 -1
  166. package/dist/components/file-manager/index.js +1 -1
  167. package/dist/components/gestational-age-calculator/index.js +1 -1
  168. package/dist/components/hcg-doubling/index.js +1 -1
  169. package/dist/components/header-settings/index.js +1 -1
  170. package/dist/components/heatmap/index.js +1 -1
  171. package/dist/components/hover-card/index.js +1 -1
  172. package/dist/components/icon-button-group/index.js +1 -1
  173. package/dist/components/icon-picker/index.js +1 -1
  174. package/dist/components/info-tip/index.js +1 -1
  175. package/dist/components/invoice-upload-list/index.js +1 -1
  176. package/dist/components/locale-picker/index.js +1 -1
  177. package/dist/components/message-tray/index.js +1 -1
  178. package/dist/components/muscle-scheme/index.js +1 -1
  179. package/dist/components/notes-panel/index.js +1 -1
  180. package/dist/components/notification-tray/index.js +1 -1
  181. package/dist/components/optical-prescription/index.js +1 -1
  182. package/dist/components/pagination/index.js +1 -1
  183. package/dist/components/patient-details/index.js +1 -1
  184. package/dist/components/patient-search/index.js +1 -1
  185. package/dist/components/patient-summary-card/index.js +1 -1
  186. package/dist/components/patient-table/index.js +1 -1
  187. package/dist/components/pdf-viewer/index.js +1 -1
  188. package/dist/components/phone-input/index.js +1 -1
  189. package/dist/components/popover/index.js +1 -1
  190. package/dist/components/practice-results/index.js +1 -1
  191. package/dist/components/pregnancy-dating/index.js +1 -1
  192. package/dist/components/product-hub-tray/index.js +1 -1
  193. package/dist/components/public-header/index.js +1 -1
  194. package/dist/components/radiograph-panel/index.js +1 -1
  195. package/dist/components/rich-text-editor/index.js +2 -2
  196. package/dist/components/row-actions/index.js +1 -1
  197. package/dist/components/select/index.js +1 -1
  198. package/dist/components/sheet/index.js +1 -1
  199. package/dist/components/sign-document/index.js +1 -1
  200. package/dist/components/skeleton-scheme/index.js +1 -1
  201. package/dist/components/step-up-dialog/index.js +1 -1
  202. package/dist/components/sync-tray/index.js +1 -1
  203. package/dist/components/tab-bar/index.js +1 -1
  204. package/dist/components/tabs/index.js +1 -1
  205. package/dist/components/task-editor/index.js +1 -1
  206. package/dist/components/tasks-panel/index.js +1 -1
  207. package/dist/components/theme-toggle/index.js +1 -1
  208. package/dist/components/token-insert-menu/index.js +1 -1
  209. package/dist/components/tool-rail/index.js +1 -1
  210. package/dist/components/tooth-scheme/index.js +1 -1
  211. package/dist/components/unit-converter/index.js +1 -1
  212. package/dist/components/voice-control-panel/index.js +1 -1
  213. package/dist/components/widget-picker/index.js +1 -1
  214. package/dist/components/workflow/index.js +1 -1
  215. package/dist/components/workflow-status/index.js +1 -1
  216. package/dist/core.css +1 -1
  217. package/dist/find-free-slots-panel/index.js +1 -1
  218. package/dist/host-compat.css +13 -1
  219. package/dist/i18n/locales/ar.d.ts +45 -0
  220. package/dist/i18n/locales/ar.js +44 -2
  221. package/dist/i18n/locales/de.d.ts +45 -0
  222. package/dist/i18n/locales/de.js +44 -2
  223. package/dist/i18n/locales/el.d.ts +45 -0
  224. package/dist/i18n/locales/el.js +47 -2
  225. package/dist/i18n/locales/en.d.ts +37 -0
  226. package/dist/i18n/locales/en.js +39 -2
  227. package/dist/i18n/locales/es.d.ts +45 -0
  228. package/dist/i18n/locales/es.js +44 -2
  229. package/dist/i18n/locales/fr.d.ts +45 -0
  230. package/dist/i18n/locales/fr.js +44 -2
  231. package/dist/i18n/locales/hi.d.ts +45 -0
  232. package/dist/i18n/locales/hi.js +47 -2
  233. package/dist/i18n/locales/it.d.ts +45 -0
  234. package/dist/i18n/locales/it.js +44 -2
  235. package/dist/i18n/locales/ja.d.ts +45 -0
  236. package/dist/i18n/locales/ja.js +47 -2
  237. package/dist/i18n/locales/nl.d.ts +45 -0
  238. package/dist/i18n/locales/nl.js +44 -2
  239. package/dist/i18n/locales/pl.d.ts +45 -0
  240. package/dist/i18n/locales/pl.js +47 -2
  241. package/dist/i18n/locales/pt.d.ts +45 -0
  242. package/dist/i18n/locales/pt.js +44 -2
  243. package/dist/i18n/locales/ro.d.ts +45 -0
  244. package/dist/i18n/locales/ro.js +44 -2
  245. package/dist/i18n/locales/ru.d.ts +45 -0
  246. package/dist/i18n/locales/ru.js +44 -2
  247. package/dist/i18n/locales/sq.d.ts +45 -0
  248. package/dist/i18n/locales/sq.js +47 -2
  249. package/dist/i18n/locales/sv.d.ts +45 -0
  250. package/dist/i18n/locales/sv.js +44 -2
  251. package/dist/i18n/locales/tr.d.ts +45 -0
  252. package/dist/i18n/locales/tr.js +44 -2
  253. package/dist/i18n/locales/zh.d.ts +45 -0
  254. package/dist/i18n/locales/zh.js +44 -2
  255. package/dist/index.js +945 -943
  256. package/dist/locales/ar.json +47 -2
  257. package/dist/locales/de.json +47 -2
  258. package/dist/locales/el.json +47 -2
  259. package/dist/locales/en.json +39 -2
  260. package/dist/locales/es.json +47 -2
  261. package/dist/locales/fr.json +47 -2
  262. package/dist/locales/hi.json +47 -2
  263. package/dist/locales/it.json +47 -2
  264. package/dist/locales/ja.json +47 -2
  265. package/dist/locales/nl.json +47 -2
  266. package/dist/locales/pl.json +47 -2
  267. package/dist/locales/pt.json +47 -2
  268. package/dist/locales/ro.json +47 -2
  269. package/dist/locales/ru.json +47 -2
  270. package/dist/locales/sq.json +47 -2
  271. package/dist/locales/sv.json +47 -2
  272. package/dist/locales/tr.json +47 -2
  273. package/dist/locales/zh.json +47 -2
  274. package/dist/online-bookings-panel/index.js +1 -1
  275. package/dist/patterns/alia-assistant/index.js +1 -1
  276. package/dist/patterns/anamnesis/index.js +1 -1
  277. package/dist/patterns/calendar/index.js +3 -3
  278. package/dist/patterns/help-me-write-templates/index.js +1 -1
  279. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  280. package/dist/patterns/patient-account-settings/index.js +1 -1
  281. package/dist/patterns/patient-check-in/index.js +1 -1
  282. package/dist/patterns/patient-portal/index.js +2 -2
  283. package/dist/patterns/prescription/index.js +1 -1
  284. package/dist/patterns/registration-form/index.js +1 -1
  285. package/dist/patterns/send-registration-link-form/index.js +1 -1
  286. package/dist/patterns/signature-request/index.js +1 -1
  287. package/dist/patterns/signing/index.js +1 -1
  288. package/dist/patterns/verify-identity/index.js +1 -1
  289. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  290. package/dist/tokens.css +1 -1
  291. package/dist/waiting-list-panel/index.js +2 -2
  292. package/package.json +1 -1
  293. package/dist/_chunks/appointment-timeline-BEwgbYyG.js +0 -455
  294. package/dist/_chunks/calls-panel-CtxJAzkJ.js +0 -1094
  295. package/dist/_chunks/dialog-CVTxyR0v.js +0 -349
@@ -1,1094 +0,0 @@
1
- import { jsxs as m, jsx as t, Fragment as Jt } from "react/jsx-runtime";
2
- import { forwardRef as Qt, useId as qe, useRef as l, useImperativeHandle as Xt, useEffect as M, useMemo as fe, useCallback as ae, useState as y } from "react";
3
- import { c as Rt } from "./index-D2ZczOXr.js";
4
- import { useTranslation as Ot } from "react-i18next";
5
- import { u as Wt } from "./registry-DvAUVLHh.js";
6
- import { u as er } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
7
- import { g as ze } from "./get-error-message-DbFUzuja.js";
8
- import { formatPhoneForDisplay as tr } from "../format-phone/index.js";
9
- import { f as Kt, c as rr } from "./intl-locale-FWh-Y5_3.js";
10
- import { A as q } from "./alert-C4WKViaS.js";
11
- import { B as D } from "./button-DohK_Ak_.js";
12
- import { I as xt } from "./icon-button-S8_weU3g.js";
13
- import { C as Be } from "./call-status-chip-pajxN5eZ.js";
14
- import { D as nr } from "./date-time-picker-C6b_Vymc.js";
15
- import { D as E } from "./dialog-CVTxyR0v.js";
16
- import { E as je } from "./empty-state-DwJ5YNzz.js";
17
- import { F as he } from "./form-field-CyHfOVKF.js";
18
- import { L as Ct } from "./link-CeV7FoI6.js";
19
- import { P as It } from "./panel-header-CbtlTe85.js";
20
- import { P as Nt } from "./panel-subview-DCyvn-49.js";
21
- import { S as St } from "./select-Bm8s3q-X.js";
22
- import { S as _e } from "./skeleton-tTWJpvAq.js";
23
- import { T as Tt } from "./text-area-COMVJ1yE.js";
24
- import { P as Me } from "./phone-FceYcIFQ.js";
25
- import { P as ar } from "./pencil-B1sKKyuT.js";
26
- import { T as kt } from "./trash-2-uumy3fy1.js";
27
- import { P as sr } from "./plus-DzMQ_c6b.js";
28
- const or = {
29
- id: "calls-panel",
30
- capabilities: ["open", "close", "submit", "edit_inline"],
31
- state: {
32
- callCount: {
33
- type: "number",
34
- descriptionKey: "ui.agent.callsPanel.state.callCount",
35
- description: "How many logged calls the list holds. A count only, never a call. Zero under privacy.",
36
- read: (a) => a.getState().callCount
37
- },
38
- automaticCount: {
39
- type: "number",
40
- descriptionKey: "ui.agent.callsPanel.state.automaticCount",
41
- description: "How many calls were logged by other software, such as a phone system. A count only: never a number, a name or a link. Zero under privacy.",
42
- read: (a) => a.getState().automaticCount
43
- },
44
- missedCount: {
45
- type: "number",
46
- descriptionKey: "ui.agent.callsPanel.state.missedCount",
47
- description: "How many incoming calls nobody answered. A count only. Zero under privacy.",
48
- read: (a) => a.getState().missedCount
49
- },
50
- status: {
51
- type: "'ready' | 'loading' | 'error'",
52
- descriptionKey: "ui.agent.callsPanel.state.status",
53
- description: "The state of the host's read of the calls.",
54
- read: (a) => a.getState().status
55
- },
56
- formOpen: {
57
- type: "boolean",
58
- descriptionKey: "ui.agent.callsPanel.state.formOpen",
59
- description: 'Whether the "Log a call" form is showing.',
60
- read: (a) => a.getState().formOpen
61
- },
62
- privacy: {
63
- type: "{ masked: true } | null",
64
- descriptionKey: "ui.agent.callsPanel.state.privacy",
65
- description: "Reads { masked: true } when privacy mode withholds the calls, else null.",
66
- read: (a) => a.getState().privacy ? { masked: !0 } : null
67
- }
68
- },
69
- actions: {
70
- open_form: {
71
- safety: "write",
72
- idempotent: !0,
73
- errors: [
74
- "The panel is read-only, privacy mode is on, or the host gave no way to log a call."
75
- ],
76
- descriptionKey: "ui.agent.callsPanel.actions.openForm",
77
- description: 'Open the "Log a call" form, as the button does.',
78
- invoke: (a) => a.openForm()
79
- },
80
- close_form: {
81
- // A dismiss, classed as select and dialog class their `close`.
82
- safety: "read",
83
- idempotent: !0,
84
- errors: ["A call is being saved."],
85
- descriptionKey: "ui.agent.callsPanel.actions.closeForm",
86
- description: "Close the form and discard what was typed in it.",
87
- invoke: (a) => a.closeForm()
88
- },
89
- submit_call: {
90
- // A call note is patient-identifiable. PHI.
91
- safety: "phi",
92
- argsType: "{ dateIso: string; purposeId?: string | null; outcomeId?: string | null; description?: string }",
93
- argsSchema: {
94
- type: "object",
95
- properties: {
96
- dateIso: {
97
- type: "string",
98
- description: "ISO-8601 instant the call took place."
99
- },
100
- purposeId: { type: ["string", "null"] },
101
- outcomeId: { type: ["string", "null"] },
102
- description: { type: "string" }
103
- },
104
- required: ["dateIso"]
105
- },
106
- openWorld: !0,
107
- errors: [
108
- "The date is missing or not a date.",
109
- "The purpose or outcome is not one the host offered.",
110
- "The panel is read-only, privacy mode is on, or the host gave no way to log a call.",
111
- "A write is already in progress.",
112
- "The host refused the call. The panel keeps the form and shows the host's message."
113
- ],
114
- descriptionKey: "ui.agent.callsPanel.actions.logCall",
115
- description: "Log a call made to the patient. Settles with the host's answer; a refusal rejects.",
116
- examples: [
117
- {
118
- args: {
119
- dateIso: "2026-06-24T09:30:00Z",
120
- outcomeId: "connected",
121
- description: "Confirmed the visit."
122
- },
123
- note: "Log a connected call."
124
- }
125
- ],
126
- invoke: (a, d) => a.logCall(d)
127
- },
128
- edit_call: {
129
- safety: "phi",
130
- argsType: "{ id: string; description: string }",
131
- argsSchema: {
132
- type: "object",
133
- properties: {
134
- id: { type: "string" },
135
- description: { type: "string", minLength: 1 }
136
- },
137
- required: ["id", "description"]
138
- },
139
- idempotent: !0,
140
- openWorld: !0,
141
- errors: [
142
- "No call has that id.",
143
- "The description is empty.",
144
- "The panel is read-only, privacy mode is on, or the host gave no way to edit a call.",
145
- "A write is already in progress.",
146
- "The host refused the edit. The panel keeps the text and shows the host's message."
147
- ],
148
- descriptionKey: "ui.agent.callsPanel.actions.updateCall",
149
- description: "Replace the description of a logged call. Only the description can change. Settles with the host's answer.",
150
- invoke: (a, d) => a.updateCall(d.id, { description: d.description })
151
- },
152
- delete_call: {
153
- safety: "destructive",
154
- argsType: "{ id: string }",
155
- argsSchema: {
156
- type: "object",
157
- properties: { id: { type: "string" } },
158
- required: ["id"]
159
- },
160
- openWorld: !0,
161
- errors: [
162
- "No call has that id.",
163
- "The panel is read-only, privacy mode is on, or the host gave no way to delete a call.",
164
- "A write is already in progress.",
165
- "The host refused the delete."
166
- ],
167
- descriptionKey: "ui.agent.callsPanel.actions.deleteCall",
168
- description: "Delete a logged call. Settles with the host's answer; a refusal rejects.",
169
- invoke: (a, d) => a.deleteCall(d.id)
170
- }
171
- },
172
- domHooks: {
173
- root: {
174
- attr: "data-component",
175
- value: "calls-panel",
176
- description: "Marks the CallsPanel region."
177
- },
178
- instanceId: {
179
- attr: "data-component-id",
180
- sourceProp: "id",
181
- description: "Sourced from the id prop. Required to address a specific panel from the agent."
182
- },
183
- item: {
184
- attr: "data-call-id",
185
- description: "Stable call id on each rendered call. Never a description, a purpose or a date."
186
- }
187
- }
188
- }, Et = Rt(
189
- "ds:flex ds:h-full ds:min-h-0 ds:min-w-0 ds:flex-col ds:bg-[color:var(--card)]"
190
- ), Dt = Rt(
191
- [
192
- "ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-xs)]",
193
- "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--card-border)]",
194
- "ds:bg-[color:var(--card)] ds:p-[var(--spacing-sm)]"
195
- ].join(" ")
196
- ), Lt = {
197
- connected: "positive",
198
- no_answer: "caution",
199
- busy: "caution",
200
- left_voicemail: "caution",
201
- wrong_number: "negative"
202
- }, lr = new Set(Object.keys(Lt));
203
- function Ft(a) {
204
- if (a)
205
- try {
206
- const d = new URL(a.trim());
207
- return d.protocol === "http:" || d.protocol === "https:" ? d.href : void 0;
208
- } catch {
209
- return;
210
- }
211
- }
212
- function ir(a, d) {
213
- const b = Kt(rr(d)), P = Math.round(a), p = [
214
- [Math.floor(P / 3600), "hour"],
215
- [Math.floor(P % 3600 / 60), "minute"],
216
- [P % 60, "second"]
217
- ].filter(([k]) => k > 0);
218
- p.length === 0 && p.push([0, "second"]);
219
- const w = p.map(
220
- ([k, N]) => new Intl.NumberFormat(b, {
221
- style: "unit",
222
- unit: N,
223
- unitDisplay: "short"
224
- }).format(k)
225
- );
226
- return new Intl.ListFormat(b, { type: "unit", style: "narrow" }).format(
227
- w
228
- );
229
- }
230
- function ge(a) {
231
- return !!a && !Number.isNaN(a.getTime());
232
- }
233
- function At(a) {
234
- const d = new Date(a).getTime();
235
- return Number.isNaN(d) ? 0 : d;
236
- }
237
- function dr({ text: a }) {
238
- const { t: d } = Ot("ui"), b = qe(), P = l(null), [T, p] = y(!1), [w, k] = y(!1);
239
- return er(() => {
240
- const N = P.current;
241
- if (!N || T) return;
242
- const se = () => k(N.scrollHeight > N.clientHeight + 1);
243
- if (se(), typeof ResizeObserver > "u") return;
244
- const c = new ResizeObserver(se);
245
- return c.observe(N), () => c.disconnect();
246
- }, [a, T]), /* @__PURE__ */ m("div", { className: "ds:flex ds:min-w-0 ds:flex-col ds:items-start ds:gap-[var(--spacing-2xs)]", children: [
247
- /* @__PURE__ */ t(
248
- "p",
249
- {
250
- ref: P,
251
- id: b,
252
- dir: "auto",
253
- "data-calls-description": "",
254
- className: [
255
- "ds:m-0 ds:w-full type-body-sm ds:whitespace-pre-line ds:text-[color:var(--foreground)] ds:[overflow-wrap:anywhere]",
256
- T ? "" : "ds:line-clamp-3"
257
- ].join(" "),
258
- children: a
259
- }
260
- ),
261
- w || T ? /* @__PURE__ */ t(
262
- D,
263
- {
264
- type: "button",
265
- intent: "link",
266
- size: "sm",
267
- className: "ds:data-[component=button]:ps-0 ds:data-[component=button]:pe-0",
268
- "aria-expanded": T,
269
- "aria-controls": b,
270
- onClick: () => p((N) => !N),
271
- children: d(T ? "callsPanel.showLess" : "callsPanel.showMore")
272
- }
273
- ) : null
274
- ] });
275
- }
276
- const cr = Qt(
277
- ({
278
- id: a,
279
- title: d,
280
- "aria-label": b,
281
- nowIso: P,
282
- locale: T,
283
- calls: p,
284
- status: w = "ready",
285
- onRetry: k,
286
- purposes: N,
287
- outcomes: se,
288
- privacy: c = !1,
289
- readOnly: V = !1,
290
- onCreate: ve,
291
- onUpdate: ye,
292
- onDelete: we,
293
- onWriteError: Ve,
294
- className: $e,
295
- ...Ze
296
- }, Ht) => {
297
- const { t: n, i18n: zt } = Ot("ui"), oe = qe(), Bt = qe(), Ye = d ?? n("callsPanel.title"), be = T ?? zt.language, F = l(null);
298
- Xt(Ht, () => F.current, []);
299
- const Pe = l(null), Ue = l(null), le = l(!1), K = !V && !c && !!ve, $ = !V && !c && !!ye, L = !V && !c && !!we, Z = N ?? [], H = se ?? [], z = l(ve);
300
- z.current = ve;
301
- const Y = l(ye);
302
- Y.current = ye;
303
- const U = l(we);
304
- U.current = we;
305
- const S = l(Ve);
306
- S.current = Ve;
307
- const g = l(!0);
308
- M(() => (g.current = !0, () => {
309
- g.current = !1;
310
- }), []);
311
- const Ge = fe(
312
- () => new Date(P ?? Date.now()).getFullYear(),
313
- [P]
314
- ), xe = ae(
315
- (e) => {
316
- const r = new Date(e);
317
- return Number.isNaN(r.getTime()) ? e : new Intl.DateTimeFormat(Kt(be), {
318
- calendar: "gregory",
319
- hourCycle: "h23",
320
- day: "numeric",
321
- month: "short",
322
- ...r.getFullYear() === Ge ? {} : { year: "numeric" },
323
- hour: "2-digit",
324
- minute: "2-digit"
325
- }).format(r);
326
- },
327
- [be, Ge]
328
- ), Je = fe(
329
- () => [...p].sort((e, r) => At(r.dateIso) - At(e.dateIso)),
330
- [p]
331
- ), Qe = (e, r) => {
332
- var s;
333
- return r ? (s = e.find((o) => o.id === r)) == null ? void 0 : s.label : void 0;
334
- }, [x, B] = y(null), u = l(!1), A = l(null), G = l(null), [Ce, C] = y(null), [ie, R] = y(!1), [I, j] = y({
335
- date: void 0,
336
- purposeId: "",
337
- outcomeId: "",
338
- description: ""
339
- }), [Xe, de] = y(null), [jt, Ie] = y(!1), Ne = ae(() => {
340
- const e = new Date(P ?? Date.now());
341
- j({
342
- date: ge(e) ? e : void 0,
343
- purposeId: "",
344
- outcomeId: "",
345
- description: ""
346
- }), de(null), Ie(!1), C(null), R(!0);
347
- }, [P]), We = fe(
348
- () => ({
349
- get current() {
350
- var e;
351
- return ((e = Ue.current) == null ? void 0 : e.querySelector(
352
- "[data-calls-date] button"
353
- )) ?? null;
354
- }
355
- }),
356
- []
357
- ), [f, O] = y(
358
- null
359
- ), [J, Q] = y(null), [ce, ue] = y(!1), X = l(null), Se = l(null), [W, ee] = y(null), [et, te] = y(null), Te = l(null), pe = W ? p.find((e) => e.id === W) : void 0, _ = l({
360
- form: !1,
361
- editingId: null,
362
- deleteId: null
363
- });
364
- _.current = {
365
- form: ie,
366
- editingId: (f == null ? void 0 : f.id) ?? null,
367
- deleteId: pe ? W : null
368
- }, M(() => {
369
- c && (R(!1), j({
370
- date: void 0,
371
- purposeId: "",
372
- outcomeId: "",
373
- description: ""
374
- }), de(null), O(null), Q(null), ee(null), te(null), C(null));
375
- }, [c]), M(() => {
376
- var s;
377
- const e = _.current, r = !K && e.form || !$ && e.editingId !== null || !L && e.deleteId !== null;
378
- if (K || R(!1), $ || O(null), L || ee(null), r && !c && le.current) {
379
- const o = document.activeElement;
380
- if (!o || o === document.body || !!o.closest(
381
- '[data-calls-form],[data-calls-editor],[role="alertdialog"]'
382
- )) {
383
- const i = (s = F.current) == null ? void 0 : s.querySelector("h2");
384
- i && (i.setAttribute("tabindex", "-1"), i.focus({
385
- preventScroll: !0,
386
- focusVisible: !1
387
- }));
388
- }
389
- }
390
- }, [K, $, L]);
391
- const ke = ae(
392
- async (e, r = "ui") => {
393
- var s, o;
394
- if (!u.current) {
395
- u.current = !0, A.current = "create", B("create"), de(null), C(null);
396
- try {
397
- await ((s = z.current) == null ? void 0 : s.call(z, e)), g.current && (r === "ui" && R(!1), C("saved"));
398
- } catch (h) {
399
- throw g.current && de(ze(h, n("callsPanel.saveFailed"))), (o = S.current) == null || o.call(S, {
400
- kind: "create",
401
- error: h,
402
- shown: g.current && (r === "ui" || _.current.form)
403
- }), h;
404
- } finally {
405
- u.current = !1, A.current = null, g.current && B(null);
406
- }
407
- }
408
- },
409
- [n]
410
- ), Ee = ae(
411
- async (e, r, s = "ui") => {
412
- var o, h;
413
- if (!u.current) {
414
- u.current = !0, A.current = "update", B("update"), Q(null), C(null);
415
- try {
416
- await ((o = Y.current) == null ? void 0 : o.call(Y, e, { description: r })), g.current && (s === "ui" && (X.current = e, O(null)), C("updated"));
417
- } catch (i) {
418
- throw g.current && Q(ze(i, n("callsPanel.updateFailed"))), (h = S.current) == null || h.call(S, {
419
- kind: "update",
420
- id: e,
421
- error: i,
422
- shown: g.current && (s === "ui" || _.current.editingId === e)
423
- }), i;
424
- } finally {
425
- u.current = !1, A.current = null, g.current && B(null);
426
- }
427
- }
428
- },
429
- [n]
430
- ), De = ae(
431
- async (e, r = "ui") => {
432
- var s, o;
433
- if (!u.current) {
434
- u.current = !0, A.current = "delete", B("delete"), te(null), C(null), G.current = null;
435
- try {
436
- if (await ((s = U.current) == null ? void 0 : s.call(U, e)), g.current) {
437
- const h = _.current.deleteId === e;
438
- ee((i) => i === e ? null : i), O((i) => (i == null ? void 0 : i.id) === e ? null : i), h ? G.current = "deleted" : C("deleted");
439
- }
440
- } catch (h) {
441
- throw g.current && te(
442
- ze(h, n("callsPanel.deleteFailed"))
443
- ), (o = S.current) == null || o.call(S, {
444
- kind: "delete",
445
- id: e,
446
- error: h,
447
- shown: g.current && (r === "ui" || _.current.deleteId === e)
448
- }), h;
449
- } finally {
450
- u.current = !1, A.current = null, g.current && B(null);
451
- }
452
- }
453
- },
454
- [n]
455
- ), tt = () => {
456
- var e;
457
- if (!u.current) {
458
- if (!ge(I.date)) {
459
- Ie(!0), (e = We.current) == null || e.focus();
460
- return;
461
- }
462
- ke({
463
- dateIso: I.date.toISOString(),
464
- purposeId: I.purposeId || null,
465
- outcomeId: I.outcomeId || null,
466
- description: I.description.trim()
467
- }).catch(() => {
468
- });
469
- }
470
- }, rt = () => {
471
- if (!f || u.current) return;
472
- const e = f.text.trim();
473
- if (!e) {
474
- ue(!0);
475
- return;
476
- }
477
- Ee(f.id, e).catch(() => {
478
- });
479
- }, _t = (e) => {
480
- u.current || (Se.current = e.id, O({ id: e.id, text: e.description ?? "" }), Q(null), ue(!1), C(null));
481
- }, nt = () => {
482
- u.current || (X.current = (f == null ? void 0 : f.id) ?? null, O(null), Q(null), ue(!1));
483
- };
484
- M(() => {
485
- var r;
486
- if (f || !X.current) return;
487
- const e = (r = F.current) == null ? void 0 : r.querySelector(
488
- `[data-call-id="${CSS.escape(X.current)}"] [data-calls-edit]`
489
- );
490
- X.current = null, e == null || e.focus();
491
- }, [f, p]);
492
- const at = (e) => e.filter((r) => {
493
- var s;
494
- return ((s = r.source) == null ? void 0 : s.kind) === "integration";
495
- }).length, st = (e) => e.filter((r) => r.missed === !0 && r.direction !== "outgoing").length, ot = l({
496
- callCount: p.length,
497
- automaticCount: at(p),
498
- missedCount: st(p),
499
- status: w,
500
- formOpen: ie,
501
- privacy: c
502
- });
503
- ot.current = {
504
- callCount: c ? 0 : p.length,
505
- automaticCount: c ? 0 : at(p),
506
- missedCount: c ? 0 : st(p),
507
- status: w,
508
- formOpen: ie && K,
509
- privacy: c
510
- };
511
- const lt = l({ readOnly: V, privacy: c });
512
- lt.current = { readOnly: V, privacy: c };
513
- const Fe = l(p);
514
- Fe.current = p;
515
- const it = l({
516
- purposes: Z,
517
- outcomes: H
518
- });
519
- it.current = { purposes: Z, outcomes: H };
520
- const dt = l(Ne);
521
- dt.current = Ne;
522
- const Mt = fe(() => {
523
- const e = async (r, s) => {
524
- const o = lt.current;
525
- if (o.privacy) throw new Error("Calls are hidden by privacy mode.");
526
- if (o.readOnly) throw new Error("The panel is read-only.");
527
- if (!r) throw new Error(`The host gave the panel no way to ${s}.`);
528
- };
529
- return {
530
- getState: () => ({ ...ot.current }),
531
- openForm: async () => {
532
- await e(!!z.current, "log a call"), dt.current();
533
- },
534
- closeForm: async () => {
535
- if (A.current === "create")
536
- throw new Error("A call is being saved.");
537
- R(!1);
538
- },
539
- logCall: async (r) => {
540
- await e(!!z.current, "log a call");
541
- const s = new Date(r.dateIso);
542
- if (!ge(s)) throw new Error("The date is not a date.");
543
- const { purposes: o, outcomes: h } = it.current;
544
- if (r.purposeId && !o.some((i) => i.id === r.purposeId))
545
- throw new Error("That purpose is not offered.");
546
- if (r.outcomeId && !h.some((i) => i.id === r.outcomeId))
547
- throw new Error("That outcome is not offered.");
548
- if (u.current) throw new Error("A write is in progress.");
549
- await ke(
550
- {
551
- dateIso: s.toISOString(),
552
- purposeId: r.purposeId ?? null,
553
- outcomeId: r.outcomeId ?? null,
554
- description: (r.description ?? "").trim()
555
- },
556
- "agent"
557
- );
558
- },
559
- updateCall: async (r, s) => {
560
- if (await e(!!Y.current, "edit a call"), !Fe.current.some((o) => o.id === r))
561
- throw new Error("No call has that id.");
562
- if (!s.description.trim())
563
- throw new Error("The description is empty.");
564
- if (u.current) throw new Error("A write is in progress.");
565
- await Ee(r, s.description.trim(), "agent");
566
- },
567
- deleteCall: async (r) => {
568
- if (await e(!!U.current, "delete a call"), !Fe.current.some((s) => s.id === r))
569
- throw new Error("No call has that id.");
570
- if (u.current) throw new Error("A write is in progress.");
571
- await De(r, "agent");
572
- }
573
- };
574
- }, [ke, Ee, De]);
575
- Wt(or, Mt, a);
576
- const ct = l(!1);
577
- M(() => {
578
- const e = F.current;
579
- if (!e) return;
580
- const r = le.current && (!document.activeElement || document.activeElement === document.body);
581
- if (ct.current && !r || !r && !c && w !== "ready") return;
582
- ct.current = !0;
583
- const s = c || w !== "ready" ? null : Pe.current;
584
- if (s) {
585
- s.focus({ preventScroll: !0 });
586
- return;
587
- }
588
- const o = e.querySelector("h2");
589
- o && (o.setAttribute("tabindex", "-1"), o.focus({ preventScroll: !0, focusVisible: !1 }));
590
- }, [c, w]);
591
- const ut = {
592
- onFocusCapture: () => {
593
- le.current = !0;
594
- },
595
- onBlurCapture: (e) => {
596
- e.relatedTarget && (le.current = !1);
597
- }
598
- }, pt = w === "loading" ? n("callsPanel.loading") : x === "create" || x === "update" ? n("callsPanel.saving") : x === "delete" ? n("callsPanel.deleting") : Ce === "saved" ? n("callsPanel.saved") : Ce === "updated" ? n("callsPanel.updated") : Ce === "deleted" ? n("callsPanel.deleted") : "", [qt, Vt] = y("");
599
- if (M(() => {
600
- Vt(pt);
601
- }, [pt]), c)
602
- return /* @__PURE__ */ m(
603
- "section",
604
- {
605
- ref: F,
606
- "data-component": "calls-panel",
607
- "data-component-id": a,
608
- "data-privacy": "masked",
609
- "aria-labelledby": b ? void 0 : oe,
610
- "aria-label": b,
611
- className: [Et(), $e].filter(Boolean).join(" "),
612
- ...ut,
613
- ...Ze,
614
- children: [
615
- /* @__PURE__ */ t(
616
- It,
617
- {
618
- title: Ye,
619
- icon: /* @__PURE__ */ t(Me, { "aria-hidden": "true" }),
620
- headingId: b ? void 0 : oe,
621
- divider: !0
622
- }
623
- ),
624
- /* @__PURE__ */ t("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ t(
625
- je,
626
- {
627
- variant: "first-use",
628
- size: "sm",
629
- title: n("callsPanel.privacyTitle"),
630
- description: n("callsPanel.privacyDescription")
631
- }
632
- ) })
633
- ]
634
- }
635
- );
636
- let re;
637
- w === "loading" ? re = /* @__PURE__ */ t(
638
- "div",
639
- {
640
- "data-calls-state": "loading",
641
- className: "ds:flex ds:min-h-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)] ds:overflow-y-auto ds:p-[var(--spacing-md)]",
642
- "aria-hidden": "true",
643
- children: ["a", "b", "c"].map((e, r) => /* @__PURE__ */ m("div", { className: Dt(), children: [
644
- /* @__PURE__ */ t(_e, { variant: "text", size: "md", width: "60%", stagger: r }),
645
- /* @__PURE__ */ t(_e, { variant: "text", size: "sm", width: "90%", stagger: r }),
646
- /* @__PURE__ */ t(_e, { variant: "text", size: "sm", width: "40%", stagger: r })
647
- ] }, e))
648
- }
649
- ) : w === "error" ? re = /* @__PURE__ */ t(
650
- "div",
651
- {
652
- "data-calls-state": "error",
653
- className: "ds:min-h-0 ds:flex-1 ds:overflow-y-auto ds:p-[var(--spacing-md)]",
654
- children: /* @__PURE__ */ t(
655
- je,
656
- {
657
- variant: "error",
658
- size: "sm",
659
- title: n("callsPanel.errorTitle"),
660
- primaryAction: k ? { label: n("callsPanel.retry"), onClick: k } : void 0
661
- }
662
- )
663
- }
664
- ) : Je.length === 0 ? re = /* @__PURE__ */ t(
665
- "div",
666
- {
667
- "data-calls-state": "empty",
668
- className: "ds:min-h-0 ds:flex-1 ds:overflow-y-auto ds:p-[var(--spacing-md)]",
669
- children: /* @__PURE__ */ t(
670
- je,
671
- {
672
- variant: "first-use",
673
- size: "sm",
674
- title: n("callsPanel.emptyTitle"),
675
- description: n("callsPanel.emptyDescription")
676
- }
677
- )
678
- }
679
- ) : re = /* @__PURE__ */ t("div", { className: "ds:min-h-0 ds:flex-1 ds:overflow-y-auto ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ t(
680
- "ul",
681
- {
682
- "aria-label": n("callsPanel.listLabel"),
683
- className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0",
684
- children: Je.map((e) => {
685
- var gt, vt, yt, wt, bt, Pt;
686
- const r = xe(e.dateIso), s = Qe(H, e.outcomeId), o = Qe(Z, e.purposeId), h = ((gt = H.find((v) => v.id === e.outcomeId)) == null ? void 0 : gt.tone) ?? Lt[e.outcomeId ?? ""] ?? "neutral", i = (f == null ? void 0 : f.id) === e.id, mt = (e.description ?? "").trim(), Ut = e.missed === !0 && e.direction !== "outgoing", Ae = typeof e.durationSeconds == "number" && Number.isFinite(e.durationSeconds) && e.durationSeconds >= 0 ? ir(e.durationSeconds, be) : void 0, Re = (vt = e.phoneNumber) != null && vt.trim() ? tr(e.phoneNumber.trim()) : void 0, Oe = (yt = e.handledBy) == null ? void 0 : yt.trim(), Gt = ((wt = e.source) == null ? void 0 : wt.kind) === "integration", ft = (Pt = (bt = e.source) == null ? void 0 : bt.name) == null ? void 0 : Pt.trim(), Ke = Ft(e.recordingHref), Le = Ft(e.transcriptHref), ht = `${Bt}-edit-${e.id}`, He = `${ht}-msg`;
687
- return /* @__PURE__ */ m(
688
- "li",
689
- {
690
- "data-call-id": e.id,
691
- "data-outcome": e.outcomeId || void 0,
692
- className: Dt(),
693
- children: [
694
- /* @__PURE__ */ m("div", { className: "ds:flex ds:min-w-0 ds:items-start ds:gap-[var(--spacing-xs)]", children: [
695
- /* @__PURE__ */ m("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-2xs)] ds:py-[var(--spacing-xs)]", children: [
696
- /* @__PURE__ */ t(
697
- "time",
698
- {
699
- dateTime: e.dateIso,
700
- className: "type-body-sm ds:font-semibold ds:text-[color:var(--foreground)]",
701
- children: r
702
- }
703
- ),
704
- Ut ? /* @__PURE__ */ t(
705
- Be,
706
- {
707
- status: "missed",
708
- label: n("callsPanel.missedCall"),
709
- "data-calls-direction": "missed"
710
- }
711
- ) : e.direction ? /* @__PURE__ */ t(
712
- Be,
713
- {
714
- status: e.direction,
715
- label: e.direction === "incoming" ? n("callsPanel.incoming") : n("callsPanel.outgoing"),
716
- "data-calls-direction": e.direction
717
- }
718
- ) : null,
719
- s ? /* @__PURE__ */ t(
720
- Be,
721
- {
722
- status: lr.has(e.outcomeId ?? "") ? e.outcomeId : "custom",
723
- label: s,
724
- tone: h,
725
- "data-calls-outcome": ""
726
- }
727
- ) : null,
728
- o ? /* @__PURE__ */ t(
729
- "span",
730
- {
731
- "data-calls-purpose": "",
732
- className: "type-meta ds:min-w-0 ds:text-[color:var(--muted-foreground)] ds:[overflow-wrap:anywhere]",
733
- children: o
734
- }
735
- ) : null
736
- ] }),
737
- !i && ($ || L) ? /* @__PURE__ */ m("div", { className: "ds:-me-[var(--spacing-xs)] ds:flex ds:shrink-0 ds:items-center", children: [
738
- $ ? /* @__PURE__ */ t(
739
- xt,
740
- {
741
- "data-calls-edit": "",
742
- icon: /* @__PURE__ */ t(ar, {}),
743
- intent: "ghost",
744
- "aria-label": n("callsPanel.editNamed", {
745
- date: r
746
- }),
747
- tooltip: n("callsPanel.edit"),
748
- "aria-disabled": x ? !0 : void 0,
749
- onClick: () => _t(e)
750
- }
751
- ) : null,
752
- L ? /* @__PURE__ */ t(
753
- xt,
754
- {
755
- "data-calls-delete": "",
756
- icon: /* @__PURE__ */ t(kt, {}),
757
- intent: "ghost",
758
- "aria-label": n("callsPanel.deleteNamed", {
759
- date: r
760
- }),
761
- tooltip: n("callsPanel.delete"),
762
- "aria-disabled": x ? !0 : void 0,
763
- onClick: () => {
764
- u.current || (te(null), C(null), Te.current = e.id, ee(e.id));
765
- }
766
- }
767
- ) : null
768
- ] }) : null
769
- ] }),
770
- i && f ? /* @__PURE__ */ m(
771
- "div",
772
- {
773
- "data-calls-editor": "",
774
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
775
- children: [
776
- /* @__PURE__ */ t(
777
- Tt,
778
- {
779
- id: ht,
780
- "aria-label": n("callsPanel.editLabel", { date: r }),
781
- value: f.text,
782
- minRows: 3,
783
- autoResize: !0,
784
- ref: (v) => {
785
- v && Se.current === e.id && (Se.current = null, v.focus());
786
- },
787
- tone: ce || J ? "error" : "default",
788
- "aria-invalid": ce || !!J || void 0,
789
- "aria-describedby": ce || J ? He : void 0,
790
- onChange: (v) => {
791
- O({ id: e.id, text: v.target.value }), ue(!1);
792
- },
793
- onKeyDown: (v) => {
794
- v.key === "Enter" && (v.ctrlKey || v.metaKey) && f.text.trim() ? (v.preventDefault(), rt()) : v.key === "Escape" && (v.preventDefault(), v.stopPropagation(), nt());
795
- }
796
- }
797
- ),
798
- ce ? /* @__PURE__ */ t(
799
- "p",
800
- {
801
- id: He,
802
- role: "alert",
803
- "data-calls-edit-error": "",
804
- className: "ds:m-0 type-meta ds:text-[color:var(--destructive)]",
805
- children: n("callsPanel.editRequired")
806
- }
807
- ) : null,
808
- J ? /* @__PURE__ */ t(q, { variant: "error", "data-calls-edit-refused": "", children: /* @__PURE__ */ t(q.Description, { id: He, children: J }) }) : null,
809
- /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:justify-end ds:gap-[var(--spacing-sm)]", children: [
810
- /* @__PURE__ */ t(
811
- D,
812
- {
813
- type: "button",
814
- intent: "outline",
815
- size: "sm",
816
- "aria-disabled": x ? !0 : void 0,
817
- onClick: nt,
818
- children: n("callsPanel.editCancel")
819
- }
820
- ),
821
- /* @__PURE__ */ t(
822
- D,
823
- {
824
- type: "button",
825
- size: "sm",
826
- "aria-disabled": x ? !0 : void 0,
827
- "aria-busy": x === "update" || void 0,
828
- onClick: rt,
829
- children: n(x === "update" ? "callsPanel.saving" : "callsPanel.editSave")
830
- }
831
- )
832
- ] })
833
- ]
834
- }
835
- ) : mt ? /* @__PURE__ */ t(dr, { text: mt }) : /* @__PURE__ */ t("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: n("callsPanel.noDescription") }),
836
- Ae || Re || Oe ? /* @__PURE__ */ m(
837
- "div",
838
- {
839
- "data-calls-details": "",
840
- className: "ds:flex ds:min-w-0 ds:flex-wrap ds:items-baseline ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-2xs)] type-meta ds:text-[color:var(--muted-foreground)]",
841
- children: [
842
- Ae ? /* @__PURE__ */ t("span", { "data-calls-duration": "", children: Ae }) : null,
843
- Re ? /* @__PURE__ */ t(
844
- "span",
845
- {
846
- "data-calls-phone": "",
847
- dir: "ltr",
848
- className: "ds:[overflow-wrap:anywhere]",
849
- children: Re
850
- }
851
- ) : null,
852
- Oe ? /* @__PURE__ */ t(
853
- "span",
854
- {
855
- "data-calls-handled-by": "",
856
- className: "ds:[overflow-wrap:anywhere]",
857
- children: n("callsPanel.takenBy", { name: Oe })
858
- }
859
- ) : null
860
- ]
861
- }
862
- ) : null,
863
- Gt ? /* @__PURE__ */ t(
864
- "p",
865
- {
866
- "data-calls-source": "",
867
- className: "ds:m-0 type-meta ds:text-[color:var(--muted-foreground)] ds:[overflow-wrap:anywhere]",
868
- children: ft ? n("callsPanel.loggedAutomaticallyBy", {
869
- app: ft
870
- }) : n("callsPanel.loggedAutomatically")
871
- }
872
- ) : null,
873
- Ke || Le ? /* @__PURE__ */ m(
874
- "div",
875
- {
876
- "data-calls-links": "",
877
- className: "ds:flex ds:min-w-0 ds:flex-wrap ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-2xs)] type-meta",
878
- children: [
879
- Ke ? /* @__PURE__ */ t(Ct, { href: Ke, external: !0, children: n("callsPanel.recording") }) : null,
880
- Le ? /* @__PURE__ */ t(Ct, { href: Le, external: !0, children: n("callsPanel.transcript") }) : null
881
- ]
882
- }
883
- ) : null,
884
- e.createdAtIso ? /* @__PURE__ */ t("p", { className: "ds:m-0 type-meta ds:text-[color:var(--muted-foreground)]", children: n("callsPanel.addedOn", {
885
- date: xe(e.createdAtIso)
886
- }) }) : null
887
- ]
888
- },
889
- e.id
890
- );
891
- })
892
- }
893
- ) });
894
- const me = x === "create", $t = jt && !ge(I.date) ? n("callsPanel.dateRequired") : void 0, Zt = /* @__PURE__ */ m(Jt, { children: [
895
- /* @__PURE__ */ t(
896
- D,
897
- {
898
- type: "button",
899
- intent: "outline",
900
- "aria-disabled": me || void 0,
901
- onClick: () => {
902
- u.current || R(!1);
903
- },
904
- children: n("callsPanel.cancel")
905
- }
906
- ),
907
- /* @__PURE__ */ t(
908
- D,
909
- {
910
- type: "button",
911
- "aria-disabled": me || void 0,
912
- "aria-busy": me || void 0,
913
- onClick: tt,
914
- children: n(me ? "callsPanel.saving" : "callsPanel.save")
915
- }
916
- )
917
- ] }), Yt = pe ? xe(pe.dateIso) : "", ne = x === "delete";
918
- return /* @__PURE__ */ m(
919
- "section",
920
- {
921
- ref: F,
922
- "data-component": "calls-panel",
923
- "data-component-id": a,
924
- "aria-labelledby": b ? void 0 : oe,
925
- "aria-label": b,
926
- className: [Et(), $e].filter(Boolean).join(" "),
927
- ...ut,
928
- ...Ze,
929
- children: [
930
- /* @__PURE__ */ m(Nt.Host, { className: "ds:flex-1", children: [
931
- /* @__PURE__ */ t(
932
- It,
933
- {
934
- title: Ye,
935
- icon: /* @__PURE__ */ t(Me, { "aria-hidden": "true" }),
936
- headingId: b ? void 0 : oe,
937
- divider: !0
938
- }
939
- ),
940
- /* @__PURE__ */ t("span", { role: "status", className: "ds:sr-only", children: qt }),
941
- K && w === "ready" ? /* @__PURE__ */ t("div", { className: "ds:shrink-0 ds:px-[var(--spacing-md)] ds:pt-[var(--spacing-md)]", children: /* @__PURE__ */ t(
942
- D,
943
- {
944
- ref: Pe,
945
- type: "button",
946
- className: "ds:w-full",
947
- startIcon: /* @__PURE__ */ t(sr, { "aria-hidden": "true" }),
948
- onClick: Ne,
949
- children: n("callsPanel.logCall")
950
- }
951
- ) }) : null,
952
- re,
953
- K ? /* @__PURE__ */ t(
954
- Nt,
955
- {
956
- ref: Ue,
957
- open: ie,
958
- title: n("callsPanel.formTitle"),
959
- icon: /* @__PURE__ */ t(Me, { "aria-hidden": "true" }),
960
- backLabel: n("callsPanel.back"),
961
- headingLevel: 2,
962
- initialFocusRef: We,
963
- onBack: () => {
964
- u.current || R(!1);
965
- },
966
- footer: Zt,
967
- "data-calls-form": "",
968
- children: /* @__PURE__ */ m("div", { className: "ds:-m-[var(--panel-subview-inset)] ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
969
- Xe ? /* @__PURE__ */ t(q, { variant: "error", "data-calls-form-error": "", children: /* @__PURE__ */ t(q.Description, { children: Xe }) }) : null,
970
- /* @__PURE__ */ t("div", { "data-calls-date": "", children: /* @__PURE__ */ t(
971
- he,
972
- {
973
- label: n("callsPanel.dateLabel"),
974
- required: !0,
975
- error: $t,
976
- children: /* @__PURE__ */ t(
977
- nr,
978
- {
979
- value: I.date,
980
- onChange: (e) => {
981
- j((r) => ({ ...r, date: e })), e && Ie(!1);
982
- }
983
- }
984
- )
985
- }
986
- ) }),
987
- Z.length > 0 ? /* @__PURE__ */ t(he, { label: n("callsPanel.purposeLabel"), optional: !0, children: /* @__PURE__ */ t(
988
- St,
989
- {
990
- options: Z.map((e) => ({
991
- value: e.id,
992
- label: e.label
993
- })),
994
- value: I.purposeId,
995
- placeholder: n("callsPanel.notSet"),
996
- clearable: !0,
997
- onValueChange: (e) => j((r) => ({ ...r, purposeId: e }))
998
- }
999
- ) }) : null,
1000
- H.length > 0 ? /* @__PURE__ */ t(he, { label: n("callsPanel.outcomeLabel"), optional: !0, children: /* @__PURE__ */ t(
1001
- St,
1002
- {
1003
- options: H.map((e) => ({
1004
- value: e.id,
1005
- label: e.label
1006
- })),
1007
- value: I.outcomeId,
1008
- placeholder: n("callsPanel.notSet"),
1009
- clearable: !0,
1010
- onValueChange: (e) => j((r) => ({ ...r, outcomeId: e }))
1011
- }
1012
- ) }) : null,
1013
- /* @__PURE__ */ t(he, { label: n("callsPanel.descriptionLabel"), optional: !0, children: /* @__PURE__ */ t(
1014
- Tt,
1015
- {
1016
- value: I.description,
1017
- placeholder: n("callsPanel.descriptionPlaceholder"),
1018
- minRows: 4,
1019
- autoResize: !0,
1020
- onChange: (e) => j((r) => ({ ...r, description: e.target.value })),
1021
- onKeyDown: (e) => {
1022
- e.key === "Enter" && (e.ctrlKey || e.metaKey) && I.description.trim() && (e.preventDefault(), tt());
1023
- }
1024
- }
1025
- ) })
1026
- ] })
1027
- }
1028
- ) : null
1029
- ] }),
1030
- L ? /* @__PURE__ */ t(
1031
- E,
1032
- {
1033
- open: !!pe,
1034
- onOpenChange: (e) => {
1035
- ne || e || (ee(null), te(null));
1036
- },
1037
- children: /* @__PURE__ */ m(
1038
- E.Content,
1039
- {
1040
- size: "sm",
1041
- variant: "alert",
1042
- onCloseAutoFocus: (e) => {
1043
- e.preventDefault(), G.current && (C(G.current), G.current = null);
1044
- const r = F.current, s = (Te.current ? r == null ? void 0 : r.querySelector(
1045
- `[data-call-id="${CSS.escape(Te.current)}"] [data-calls-delete]`
1046
- ) : null) ?? Pe.current ?? (r == null ? void 0 : r.querySelector("h2"));
1047
- s && (s.tagName === "H2" && s.setAttribute("tabindex", "-1"), s.focus({ preventScroll: !0 }));
1048
- },
1049
- children: [
1050
- /* @__PURE__ */ m(E.Header, { children: [
1051
- /* @__PURE__ */ t(E.Title, { children: n("callsPanel.deleteTitle") }),
1052
- /* @__PURE__ */ t(E.Description, { children: n("callsPanel.deleteBody", { date: Yt }) })
1053
- ] }),
1054
- et ? /* @__PURE__ */ t(E.Body, { children: /* @__PURE__ */ t(q, { variant: "error", "data-calls-delete-error": "", children: /* @__PURE__ */ t(q.Description, { children: et }) }) }) : null,
1055
- /* @__PURE__ */ m(E.Footer, { divider: !0, children: [
1056
- /* @__PURE__ */ t(E.Close, { asChild: !0, children: /* @__PURE__ */ t(
1057
- D,
1058
- {
1059
- intent: "outline",
1060
- "aria-disabled": ne || void 0,
1061
- children: n("callsPanel.deleteCancel")
1062
- }
1063
- ) }),
1064
- /* @__PURE__ */ t(
1065
- D,
1066
- {
1067
- intent: "destructive",
1068
- startIcon: /* @__PURE__ */ t(kt, { "aria-hidden": "true" }),
1069
- "aria-disabled": ne || void 0,
1070
- "aria-busy": ne || void 0,
1071
- onClick: () => {
1072
- W && !u.current && De(W).catch(() => {
1073
- });
1074
- },
1075
- children: n(ne ? "callsPanel.deleting" : "callsPanel.deleteConfirm")
1076
- }
1077
- )
1078
- ] })
1079
- ]
1080
- }
1081
- )
1082
- }
1083
- ) : null
1084
- ]
1085
- }
1086
- );
1087
- }
1088
- );
1089
- cr.displayName = "CallsPanel";
1090
- export {
1091
- cr as C,
1092
- or as c
1093
- };
1094
- //# sourceMappingURL=calls-panel-CtxJAzkJ.js.map