@alfadocs/ui-kit-debug 1.128.0 → 1.130.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.
- package/dist/_chunks/{appointment-card-0PebvrOS.js → appointment-card-vbUsDh70.js} +49 -72
- package/dist/_chunks/appointment-card-vbUsDh70.js.map +1 -0
- package/dist/_chunks/{appointment-timeline-Czd4PBkF.js → appointment-timeline-B5pfBl-b.js} +2 -2
- package/dist/_chunks/{appointment-timeline-Czd4PBkF.js.map → appointment-timeline-B5pfBl-b.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-B04zKY7g.js → appointment-tray-BhiXetjs.js} +2 -2
- package/dist/_chunks/{appointment-tray-B04zKY7g.js.map → appointment-tray-BhiXetjs.js.map} +1 -1
- package/dist/_chunks/{calendar-_sgjuH3L.js → calendar-DzR-vdJ5.js} +614 -563
- package/dist/_chunks/calendar-DzR-vdJ5.js.map +1 -0
- package/dist/_chunks/calendar-appointment-editor-dialog-CXch4Pmu.js +13663 -0
- package/dist/_chunks/calendar-appointment-editor-dialog-CXch4Pmu.js.map +1 -0
- package/dist/_chunks/{calendar-event-card-DXAYWH6k.js → calendar-event-card-BNEzkjm-.js} +142 -132
- package/dist/_chunks/calendar-event-card-BNEzkjm-.js.map +1 -0
- package/dist/_chunks/{care-plan-card-bGTIliXc.js → care-plan-card-CwgkImOD.js} +2 -2
- package/dist/_chunks/{care-plan-card-bGTIliXc.js.map → care-plan-card-CwgkImOD.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-k8FslxsU.js → care-plan-header-Dx5OMkc9.js} +2 -2
- package/dist/_chunks/{care-plan-header-k8FslxsU.js.map → care-plan-header-Dx5OMkc9.js.map} +1 -1
- package/dist/_chunks/{clinical-note-card-DHn5W_bv.js → clinical-note-card-pPaeWWnu.js} +2 -2
- package/dist/_chunks/{clinical-note-card-DHn5W_bv.js.map → clinical-note-card-pPaeWWnu.js.map} +1 -1
- package/dist/_chunks/{contact-card-CGpbYuxl.js → contact-card-BSY2YpLZ.js} +2 -2
- package/dist/_chunks/{contact-card-CGpbYuxl.js.map → contact-card-BSY2YpLZ.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-CCgf0Ntt.js → contact-profile-card-CsZNMlws.js} +2 -2
- package/dist/_chunks/{contact-profile-card-CCgf0Ntt.js.map → contact-profile-card-CsZNMlws.js.map} +1 -1
- package/dist/_chunks/contact-round-DiSvB3LP.js +18 -0
- package/dist/_chunks/contact-round-DiSvB3LP.js.map +1 -0
- package/dist/_chunks/{default-tabs-DOuHEKI5.js → default-tabs-BnB6FUEW.js} +2 -2
- package/dist/_chunks/{default-tabs-DOuHEKI5.js.map → default-tabs-BnB6FUEW.js.map} +1 -1
- package/dist/_chunks/{entity-summary-BanguTa6.js → entity-summary-KHM0PnSI.js} +56 -68
- package/dist/_chunks/entity-summary-KHM0PnSI.js.map +1 -0
- package/dist/_chunks/file-pen-line-k4uMBM3h.js +29 -0
- package/dist/_chunks/file-pen-line-k4uMBM3h.js.map +1 -0
- package/dist/_chunks/{header-settings-DsvheAOt.js → header-settings-ZGvYAuKF.js} +101 -97
- package/dist/_chunks/header-settings-ZGvYAuKF.js.map +1 -0
- package/dist/_chunks/{info-tip-C-MPkShR.js → info-tip-B3cn3fY2.js} +2 -2
- package/dist/_chunks/{info-tip-C-MPkShR.js.map → info-tip-B3cn3fY2.js.map} +1 -1
- package/dist/_chunks/{link-DtCfnLnF.js → link-CeV7FoI6.js} +2 -2
- package/dist/_chunks/{link-DtCfnLnF.js.map → link-CeV7FoI6.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-BOBWmzoT.js → marketplace-app-shell-D_HA8CKx.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-BOBWmzoT.js.map → marketplace-app-shell-D_HA8CKx.js.map} +1 -1
- package/dist/_chunks/{nav-grid-D2xVcHTO.js → nav-grid-dEgDAri3.js} +2 -2
- package/dist/_chunks/{nav-grid-D2xVcHTO.js.map → nav-grid-dEgDAri3.js.map} +1 -1
- package/dist/_chunks/{note-attachment-cnj2JRrg.js → note-attachment-MNTIqdSz.js} +2 -2
- package/dist/_chunks/{note-attachment-cnj2JRrg.js.map → note-attachment-MNTIqdSz.js.map} +1 -1
- package/dist/_chunks/{note-timeline-BrjHBQfx.js → note-timeline-BQeW0VZY.js} +2 -2
- package/dist/_chunks/{note-timeline-BrjHBQfx.js.map → note-timeline-BQeW0VZY.js.map} +1 -1
- package/dist/_chunks/{notes-panel-n1JFNQ5u.js → notes-panel-DIY7eNsq.js} +2 -2
- package/dist/_chunks/{notes-panel-n1JFNQ5u.js.map → notes-panel-DIY7eNsq.js.map} +1 -1
- package/dist/_chunks/{patient-details-Cba9HQj_.js → patient-details-DBtEITfE.js} +2 -2
- package/dist/_chunks/{patient-details-Cba9HQj_.js.map → patient-details-DBtEITfE.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-CtDihADs.js → patient-field-row-a5d4QijH.js} +2 -2
- package/dist/_chunks/{patient-field-row-CtDihADs.js.map → patient-field-row-a5d4QijH.js.map} +1 -1
- package/dist/_chunks/{patient-search-D_S7joff.js → patient-search-OAwFgOW3.js} +2 -2
- package/dist/_chunks/{patient-search-D_S7joff.js.map → patient-search-OAwFgOW3.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-DnLdbtsw.js → patient-summary-card-BUcZ-gaL.js} +3 -3
- package/dist/_chunks/{patient-summary-card-DnLdbtsw.js.map → patient-summary-card-BUcZ-gaL.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-CEIalOtr.js → payment-request-card-Dv4WbRBe.js} +2 -2
- package/dist/_chunks/{payment-request-card-CEIalOtr.js.map → payment-request-card-Dv4WbRBe.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-CqRJlmb7.js → product-hub-panel-a8wdVOUt.js} +2 -2
- package/dist/_chunks/{product-hub-panel-CqRJlmb7.js.map → product-hub-panel-a8wdVOUt.js.map} +1 -1
- package/dist/_chunks/{public-footer-C8UIzqLJ.js → public-footer-D0cqScpz.js} +2 -2
- package/dist/_chunks/{public-footer-C8UIzqLJ.js.map → public-footer-D0cqScpz.js.map} +1 -1
- package/dist/_chunks/{signature-request-Dzs0jZsd.js → signature-request-DW2PSp66.js} +3 -3
- package/dist/_chunks/{signature-request-Dzs0jZsd.js.map → signature-request-DW2PSp66.js.map} +1 -1
- package/dist/_chunks/{signed-out-frame-fUf7tqs3.js → signed-out-frame-Oa2e1yps.js} +2 -2
- package/dist/_chunks/{signed-out-frame-fUf7tqs3.js.map → signed-out-frame-Oa2e1yps.js.map} +1 -1
- package/dist/_chunks/task-editor-CVRrDqpe.js +1256 -0
- package/dist/_chunks/task-editor-CVRrDqpe.js.map +1 -0
- package/dist/_chunks/{toast-BNoN8Qjh.js → toast-DQ1Zu1kk.js} +264 -251
- package/dist/_chunks/{toast-BNoN8Qjh.js.map → toast-DQ1Zu1kk.js.map} +1 -1
- package/dist/_chunks/{treatment-receipt-1VnuinhY.js → treatment-receipt-BZzwvsnY.js} +73 -56
- package/dist/_chunks/treatment-receipt-BZzwvsnY.js.map +1 -0
- package/dist/_chunks/use-appointment-details-read-BrykoTOR.js +2475 -0
- package/dist/_chunks/use-appointment-details-read-BrykoTOR.js.map +1 -0
- package/dist/_chunks/{whatsapp-button-DV9JFmtq.js → whatsapp-button-XbozeDl_.js} +32 -25
- package/dist/_chunks/whatsapp-button-XbozeDl_.js.map +1 -0
- package/dist/agent-catalog.json +49 -16
- package/dist/agent-i18n/en.json +5 -5
- package/dist/browser-support.js +1 -1
- package/dist/components/_shared/patient-picker.d.ts +10 -0
- package/dist/components/_shared/patient-picker.d.ts.map +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +30 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts.map +1 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.links.d.ts +15 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.links.d.ts.map +1 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.recurrence.d.ts +9 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.recurrence.d.ts.map +1 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +12 -3
- package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts.map +1 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +63 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts.map +1 -1
- package/dist/components/appointment-details-panel/index.d.ts +2 -1
- package/dist/components/appointment-details-panel/index.d.ts.map +1 -1
- package/dist/components/appointment-details-panel/index.js +5 -4
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/calendar/calendar.d.ts +22 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/calendar-event-card.d.ts +8 -0
- package/dist/components/calendar-event-card/calendar-event-card.d.ts.map +1 -1
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts.map +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/nav-grid/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/toast.d.ts.map +1 -1
- package/dist/components/treatment-receipt/index.d.ts +2 -2
- package/dist/components/treatment-receipt/index.d.ts.map +1 -1
- package/dist/components/treatment-receipt/index.js +2 -1
- package/dist/components/treatment-receipt/treatment-receipt.d.ts +11 -1
- package/dist/components/treatment-receipt/treatment-receipt.d.ts.map +1 -1
- package/dist/components/whatsapp-button/index.js +1 -1
- package/dist/components/whatsapp-button/whatsapp-button.d.ts.map +1 -1
- package/dist/core.css +1 -1
- package/dist/fullcalendar.css +5 -1
- package/dist/host-compat.css +4 -1
- package/dist/i18n/locales/ar.d.ts +119 -4
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +130 -15
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +119 -4
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +130 -15
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +119 -4
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +130 -15
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +119 -4
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +122 -10
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +119 -4
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +130 -15
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +119 -4
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +130 -15
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +119 -4
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +130 -15
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +119 -4
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +130 -15
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +119 -4
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +130 -15
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +119 -4
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +130 -15
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +119 -4
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +130 -15
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +119 -4
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +130 -15
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +119 -4
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +130 -15
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +119 -4
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +130 -15
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +119 -4
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +130 -15
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +119 -4
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +130 -15
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +119 -4
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +130 -15
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +119 -4
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +130 -15
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +1112 -1107
- package/dist/locales/ar.json +130 -15
- package/dist/locales/de.json +130 -15
- package/dist/locales/el.json +130 -15
- package/dist/locales/en.json +122 -7
- package/dist/locales/es.json +130 -15
- package/dist/locales/fr.json +130 -15
- package/dist/locales/hi.json +130 -15
- package/dist/locales/it.json +130 -15
- package/dist/locales/ja.json +130 -15
- package/dist/locales/nl.json +130 -15
- package/dist/locales/pl.json +130 -15
- package/dist/locales/pt.json +130 -15
- package/dist/locales/ro.json +130 -15
- package/dist/locales/ru.json +130 -15
- package/dist/locales/sq.json +130 -15
- package/dist/locales/sv.json +130 -15
- package/dist/locales/tr.json +130 -15
- package/dist/locales/zh.json +130 -15
- package/dist/patterns/calendar/calendar-appointment-details.d.ts +83 -2
- package/dist/patterns/calendar/calendar-appointment-details.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-appointment-editor-dialog.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-archive.d.ts +12 -0
- package/dist/patterns/calendar/calendar-archive.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-bookings-panel.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-care-rules.d.ts +19 -23
- package/dist/patterns/calendar/calendar-care-rules.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-delete-confirm.d.ts +18 -0
- package/dist/patterns/calendar/calendar-delete-confirm.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-document-scope-confirm.d.ts +12 -0
- package/dist/patterns/calendar/calendar-document-scope-confirm.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-editor-guard.d.ts +12 -0
- package/dist/patterns/calendar/calendar-editor-guard.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-editor-hydration.d.ts +13 -2
- package/dist/patterns/calendar/calendar-editor-hydration.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-load-error.d.ts +11 -0
- package/dist/patterns/calendar/calendar-load-error.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-patient-locked.d.ts +13 -0
- package/dist/patterns/calendar/calendar-patient-locked.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-patient-picker.d.ts +6 -1
- package/dist/patterns/calendar/calendar-patient-picker.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-prompts.d.ts +11 -0
- package/dist/patterns/calendar/calendar-prompts.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-settings-ical.d.ts +11 -0
- package/dist/patterns/calendar/calendar-settings-ical.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-settings-overlay.d.ts +73 -0
- package/dist/patterns/calendar/calendar-settings-overlay.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-settings-panel.d.ts +62 -0
- package/dist/patterns/calendar/calendar-settings-panel.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-settings-practice.d.ts +20 -0
- package/dist/patterns/calendar/calendar-settings-practice.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-status-colours.d.ts +18 -0
- package/dist/patterns/calendar/calendar-status-colours.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-upcoming-panel.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-waiting-list-panel.d.ts +17 -2
- package/dist/patterns/calendar/calendar-waiting-list-panel.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-workspace.d.ts +285 -6
- package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-workspace.model.d.ts +103 -17
- package/dist/patterns/calendar/calendar-workspace.model.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.data.d.ts +9 -3
- package/dist/patterns/calendar/calendar.data.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.journey.d.ts +69 -5
- package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.model.d.ts +129 -22
- package/dist/patterns/calendar/calendar.model.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.preferences.d.ts +4 -0
- package/dist/patterns/calendar/calendar.preferences.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.sheets.d.ts +129 -18
- package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.surface.d.ts +64 -6
- package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.types.d.ts +231 -6
- package/dist/patterns/calendar/calendar.types.d.ts.map +1 -1
- package/dist/patterns/calendar/index.d.ts +9 -6
- package/dist/patterns/calendar/index.d.ts.map +1 -1
- package/dist/patterns/calendar/index.js +18 -15
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/tokens.css +5 -1
- package/package.json +1 -1
- package/dist/_chunks/appointment-card-0PebvrOS.js.map +0 -1
- package/dist/_chunks/calendar-_sgjuH3L.js.map +0 -1
- package/dist/_chunks/calendar-appointment-editor-dialog-CGDDGMdo.js +0 -10974
- package/dist/_chunks/calendar-appointment-editor-dialog-CGDDGMdo.js.map +0 -1
- package/dist/_chunks/calendar-event-card-DXAYWH6k.js.map +0 -1
- package/dist/_chunks/entity-summary-BanguTa6.js.map +0 -1
- package/dist/_chunks/header-settings-DsvheAOt.js.map +0 -1
- package/dist/_chunks/task-editor-C05yx7JJ.js +0 -1218
- package/dist/_chunks/task-editor-C05yx7JJ.js.map +0 -1
- package/dist/_chunks/treatment-receipt-1VnuinhY.js.map +0 -1
- package/dist/_chunks/use-appointment-details-read-Bm408XzX.js +0 -2198
- package/dist/_chunks/use-appointment-details-read-Bm408XzX.js.map +0 -1
- package/dist/_chunks/whatsapp-button-DV9JFmtq.js.map +0 -1
|
@@ -1,2198 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as p, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
-
import { c as it } from "./index-D2ZczOXr.js";
|
|
3
|
-
import { useId as Ye, useRef as M, forwardRef as Qt, useEffect as pe, useMemo as wt, useState as B, useCallback as Xt } from "react";
|
|
4
|
-
import { useTranslation as $ } from "react-i18next";
|
|
5
|
-
import { u as Jt } from "./registry-DvAUVLHh.js";
|
|
6
|
-
import { u as te } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
7
|
-
import { c as Zt } from "./compose-refs-C0k0tdqF.js";
|
|
8
|
-
import { h as Ue, g as Qe } from "./handled-rejection-6gqCf5vt.js";
|
|
9
|
-
import { a as en, b as xt } from "./privacy-mask-DJ1gee4c.js";
|
|
10
|
-
import { A as F } from "./alert-C4WKViaS.js";
|
|
11
|
-
import { B as O } from "./button-DohK_Ak_.js";
|
|
12
|
-
import { I as Lt } from "./icon-button-S8_weU3g.js";
|
|
13
|
-
import { B as tn } from "./button-group-B2MJo0Se.js";
|
|
14
|
-
import { D as Oe } from "./dropdown-menu-Dw6sgQwJ.js";
|
|
15
|
-
import { E as zt } from "./editable-description-KU56SP4P.js";
|
|
16
|
-
import { N as Xe } from "./note-timeline-BrjHBQfx.js";
|
|
17
|
-
import { P as Ot } from "./panel-header-CbtlTe85.js";
|
|
18
|
-
import { P as Ge } from "./panel-subview-DCyvn-49.js";
|
|
19
|
-
import { P as _t } from "./patient-summary-card-DnLdbtsw.js";
|
|
20
|
-
import { S as ne } from "./section-card-CYfeQ6EQ.js";
|
|
21
|
-
import { C as nn, S as ue } from "./skeleton-tTWJpvAq.js";
|
|
22
|
-
import { T as an } from "./text-area-COMVJ1yE.js";
|
|
23
|
-
import { T as sn } from "./tooltip-uEBdD1-5.js";
|
|
24
|
-
import { T as Bt } from "./treatment-receipt-1VnuinhY.js";
|
|
25
|
-
import { a as Nt } from "./whatsapp-button-DV9JFmtq.js";
|
|
26
|
-
import { a as Ft, W as on } from "./workflow-status-D0avpoeS.js";
|
|
27
|
-
import { u as ot, a as At, i as rn } from "./appointment-workflow-status-DMjuIK90.js";
|
|
28
|
-
import { E as dn } from "./empty-state-DwJ5YNzz.js";
|
|
29
|
-
import { T as Ae } from "./timeline-DXko0M1t.js";
|
|
30
|
-
import { C as rt } from "./calendar-clock-hbObjfGY.js";
|
|
31
|
-
import { T as $t } from "./trash-2-uumy3fy1.js";
|
|
32
|
-
import { A as Ve } from "./entity-card-fpm-KUKc.js";
|
|
33
|
-
import { C as ln } from "./calendar-plus-BFrIRE4r.js";
|
|
34
|
-
import { P as me } from "./pencil-B1sKKyuT.js";
|
|
35
|
-
import { C as Je } from "./clock-Drd4Wtis.js";
|
|
36
|
-
import { c as Fe } from "./createLucideIcon-DhHxpK9K.js";
|
|
37
|
-
import { A as cn } from "./arrow-right-KsIrLdt0.js";
|
|
38
|
-
import { A as Ze } from "./avatar-Dp5apm1d.js";
|
|
39
|
-
import { B as $e } from "./badge-BUk4RjTS.js";
|
|
40
|
-
import { H as dt } from "./heart-pulse-BCppJyN2.js";
|
|
41
|
-
import { G as un } from "./globe-sHBW1JN5.js";
|
|
42
|
-
import { T as mn } from "./triangle-alert-CBnO6nq_.js";
|
|
43
|
-
import { E as pn } from "./euro-Dsuz4ixO.js";
|
|
44
|
-
import { V as lt } from "./video-BheNGvsu.js";
|
|
45
|
-
import { R as Ht } from "./repeat-CvQa5rZt.js";
|
|
46
|
-
import { C as hn } from "./counter-WsvRuum1.js";
|
|
47
|
-
import { D as _e } from "./description-list-BxzDN9o2.js";
|
|
48
|
-
import { T as St } from "./timestamp-DPLDWdxA.js";
|
|
49
|
-
import { T as fn } from "./transaction-chip-CkYd-3ky.js";
|
|
50
|
-
import { H as he } from "./hover-card-CuRIA4wN.js";
|
|
51
|
-
import { S as gn } from "./smartphone-C0rFF2if.js";
|
|
52
|
-
import { P as vn } from "./phone-FceYcIFQ.js";
|
|
53
|
-
import { M as yn } from "./mail-BqXVF2zH.js";
|
|
54
|
-
import { M as bn } from "./map-pin-BaY37-Km.js";
|
|
55
|
-
import { C as kn } from "./calendar-days-BGWklvE-.js";
|
|
56
|
-
import { H as wn } from "./hourglass-BEAzW1wE.js";
|
|
57
|
-
import { A as It } from "./armchair-BaLDW6Hz.js";
|
|
58
|
-
import { B as xn } from "./building-2-D33bLCWL.js";
|
|
59
|
-
import { N as Nn } from "./notebook-pen-CO7HoM-W.js";
|
|
60
|
-
import { C as Wt } from "./clipboard-list-rSzfIYZB.js";
|
|
61
|
-
import { C as An } from "./copy-vRpqqHtY.js";
|
|
62
|
-
import { P as Sn } from "./plus-DzMQ_c6b.js";
|
|
63
|
-
import { S as In } from "./square-check-big-dj0o8yA3.js";
|
|
64
|
-
import { H as Tt } from "./history-CK2JaU2g.js";
|
|
65
|
-
import { C as Tn } from "./chevron-down-DWE7GSq9.js";
|
|
66
|
-
import { C as Dn } from "./camera-VSklPDCv.js";
|
|
67
|
-
import { F as Cn } from "./file-BuG1VMAy.js";
|
|
68
|
-
import { F as En } from "./file-text-5yv6r2ls.js";
|
|
69
|
-
import { F as Rn } from "./folder-BghC8_S2.js";
|
|
70
|
-
import { R as Pn } from "./receipt-euro-B1cLM_TN.js";
|
|
71
|
-
/**
|
|
72
|
-
* @license lucide-react v1.22.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/
|
|
77
|
-
const Mn = [
|
|
78
|
-
["path", { d: "M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8", key: "1w3rig" }],
|
|
79
|
-
["path", { d: "M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1", key: "n2jgmb" }],
|
|
80
|
-
["path", { d: "M2 21h20", key: "1nyx9w" }],
|
|
81
|
-
["path", { d: "M7 8v3", key: "1qtyvj" }],
|
|
82
|
-
["path", { d: "M12 8v3", key: "hwp4zt" }],
|
|
83
|
-
["path", { d: "M17 8v3", key: "1i6e5u" }],
|
|
84
|
-
["path", { d: "M7 4h.01", key: "1bh4kh" }],
|
|
85
|
-
["path", { d: "M12 4h.01", key: "1ujb9j" }],
|
|
86
|
-
["path", { d: "M17 4h.01", key: "1upcoc" }]
|
|
87
|
-
], Ln = Fe("cake", Mn);
|
|
88
|
-
/**
|
|
89
|
-
* @license lucide-react v1.22.0 - ISC
|
|
90
|
-
*
|
|
91
|
-
* This source code is licensed under the ISC license.
|
|
92
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/
|
|
94
|
-
const zn = [
|
|
95
|
-
["path", { d: "M11 14h10", key: "1w8e9d" }],
|
|
96
|
-
["path", { d: "M16 4h2a2 2 0 0 1 2 2v1.344", key: "1e62lh" }],
|
|
97
|
-
["path", { d: "m17 18 4-4-4-4", key: "z2g111" }],
|
|
98
|
-
["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113", key: "bjbb7m" }],
|
|
99
|
-
["rect", { x: "8", y: "2", width: "8", height: "4", rx: "1", key: "ublpy" }]
|
|
100
|
-
], Dt = Fe("clipboard-paste", zn);
|
|
101
|
-
/**
|
|
102
|
-
* @license lucide-react v1.22.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/
|
|
107
|
-
const On = [
|
|
108
|
-
["path", { d: "M16 10h2", key: "8sgtl7" }],
|
|
109
|
-
["path", { d: "M16 14h2", key: "epxaof" }],
|
|
110
|
-
["path", { d: "M6.17 15a3 3 0 0 1 5.66 0", key: "n6f512" }],
|
|
111
|
-
["circle", { cx: "9", cy: "11", r: "2", key: "yxgjnd" }],
|
|
112
|
-
["rect", { x: "2", y: "5", width: "20", height: "14", rx: "2", key: "qneu4z" }]
|
|
113
|
-
], _n = Fe("id-card", On);
|
|
114
|
-
/**
|
|
115
|
-
* @license lucide-react v1.22.0 - ISC
|
|
116
|
-
*
|
|
117
|
-
* This source code is licensed under the ISC license.
|
|
118
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
-
*/
|
|
120
|
-
const Bn = [
|
|
121
|
-
["path", { d: "M12 2v20", key: "t6zp3m" }],
|
|
122
|
-
["path", { d: "m15 19-3 3-3-3", key: "11eu04" }],
|
|
123
|
-
["path", { d: "m19 9 3 3-3 3", key: "1mg7y2" }],
|
|
124
|
-
["path", { d: "M2 12h20", key: "9i4pu4" }],
|
|
125
|
-
["path", { d: "m5 9-3 3 3 3", key: "j64kie" }],
|
|
126
|
-
["path", { d: "m9 5 3-3 3 3", key: "l8vdw6" }]
|
|
127
|
-
], et = Fe("move", Bn), Fn = '[data-component="button-group"] [data-component="icon-button"][aria-haspopup="menu"]', $n = {
|
|
128
|
-
id: "appointment-details-panel",
|
|
129
|
-
// open and close back open_history and close_history; set_value backs
|
|
130
|
-
// set_status.
|
|
131
|
-
capabilities: ["open", "close", "set_value"],
|
|
132
|
-
state: {
|
|
133
|
-
eventId: {
|
|
134
|
-
type: "string | null",
|
|
135
|
-
descriptionKey: "ui.agent.appointmentDetailsPanel.state.eventId",
|
|
136
|
-
description: "The occurrence on screen or being read, as the host identifies it. After a failed or refused read, the occurrence it was for when the host says so. Null when there is none, or the host did not say.",
|
|
137
|
-
read: (t) => t.getEventId()
|
|
138
|
-
},
|
|
139
|
-
loadStatus: {
|
|
140
|
-
type: "'loading' | 'ready' | 'error' | 'refused'",
|
|
141
|
-
descriptionKey: "ui.agent.appointmentDetailsPanel.state.loadStatus",
|
|
142
|
-
description: "Where the read is: loading, ready, failed (with Retry) or refused. Actions need ready.",
|
|
143
|
-
read: (t) => t.getLoadStatus()
|
|
144
|
-
},
|
|
145
|
-
appointmentStatus: {
|
|
146
|
-
type: "'confirmed' | 'waiting' | 'in_care' | 'done' | 'cancelled' | 'absent' | null",
|
|
147
|
-
descriptionKey: "ui.agent.appointmentDetailsPanel.state.appointmentStatus",
|
|
148
|
-
description: "The appointment status as last saved here or read. Null when none is recorded or nothing is on screen.",
|
|
149
|
-
read: (t) => t.getAppointmentStatus()
|
|
150
|
-
},
|
|
151
|
-
allowedStatuses: {
|
|
152
|
-
type: "string[]",
|
|
153
|
-
descriptionKey: "ui.agent.appointmentDetailsPanel.state.allowedStatuses",
|
|
154
|
-
description: "The statuses set_status accepts now, in menu order. Empty when the status is read-only.",
|
|
155
|
-
read: (t) => t.getAllowedStatuses()
|
|
156
|
-
},
|
|
157
|
-
offeredActions: {
|
|
158
|
-
type: "string[]",
|
|
159
|
-
descriptionKey: "ui.agent.appointmentDetailsPanel.state.offeredActions",
|
|
160
|
-
description: "The footer actions on offer, as their data-action values (for example edit-appointment, delete-appointment), in footer order, including any folded into More.",
|
|
161
|
-
read: (t) => t.getOfferedActions()
|
|
162
|
-
},
|
|
163
|
-
historyOpen: {
|
|
164
|
-
type: "boolean",
|
|
165
|
-
descriptionKey: "ui.agent.appointmentDetailsPanel.state.historyOpen",
|
|
166
|
-
description: "Whether the History sub-view covers the details.",
|
|
167
|
-
read: (t) => t.isHistoryOpen()
|
|
168
|
-
},
|
|
169
|
-
privacy: {
|
|
170
|
-
type: "boolean",
|
|
171
|
-
descriptionKey: "ui.agent.appointmentDetailsPanel.state.privacy",
|
|
172
|
-
description: "Whether privacy mode is on. The patient identity and personal fields are then masked on screen.",
|
|
173
|
-
read: (t) => t.isPrivacy()
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
actions: {
|
|
177
|
-
open_history: {
|
|
178
|
-
safety: "read",
|
|
179
|
-
openWorld: !0,
|
|
180
|
-
idempotent: !0,
|
|
181
|
-
errors: ["No appointment is on screen, or History is not offered."],
|
|
182
|
-
descriptionKey: "ui.agent.appointmentDetailsPanel.actions.openHistory",
|
|
183
|
-
description: "Slide the appointment's history over the details, as its header button does; the host reads it then if it did not send it with the details. It lists who changed what, and when.",
|
|
184
|
-
invoke: (t) => t.openHistory()
|
|
185
|
-
},
|
|
186
|
-
close_history: {
|
|
187
|
-
safety: "read",
|
|
188
|
-
idempotent: !0,
|
|
189
|
-
descriptionKey: "ui.agent.appointmentDetailsPanel.actions.closeHistory",
|
|
190
|
-
description: "Return from History to the details.",
|
|
191
|
-
invoke: (t) => t.closeHistory()
|
|
192
|
-
},
|
|
193
|
-
set_status: {
|
|
194
|
-
safety: "phi",
|
|
195
|
-
openWorld: !0,
|
|
196
|
-
idempotent: !0,
|
|
197
|
-
argsType: "{ status: string }",
|
|
198
|
-
argsSchema: {
|
|
199
|
-
type: "object",
|
|
200
|
-
properties: {
|
|
201
|
-
status: {
|
|
202
|
-
type: "string",
|
|
203
|
-
enum: [
|
|
204
|
-
"confirmed",
|
|
205
|
-
"waiting",
|
|
206
|
-
"in_care",
|
|
207
|
-
"done",
|
|
208
|
-
"cancelled",
|
|
209
|
-
"absent"
|
|
210
|
-
]
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
required: ["status"]
|
|
214
|
-
},
|
|
215
|
-
errors: [
|
|
216
|
-
"The status is read-only: no appointment on screen, no host save, readOnly, or no allowed statuses.",
|
|
217
|
-
"The status is not in allowedStatuses.",
|
|
218
|
-
"A status save is already in flight.",
|
|
219
|
-
"The host refused the change. The previous status stays and the panel shows the message."
|
|
220
|
-
],
|
|
221
|
-
examples: [{ args: { status: "waiting" } }],
|
|
222
|
-
descriptionKey: "ui.agent.appointmentDetailsPanel.actions.setStatus",
|
|
223
|
-
description: "Save a new appointment status through the host, as the footer control does. Resolves once the host has saved it.",
|
|
224
|
-
invoke: (t, n) => t.setAppointmentStatus(
|
|
225
|
-
n.status
|
|
226
|
-
)
|
|
227
|
-
},
|
|
228
|
-
retry: {
|
|
229
|
-
safety: "read",
|
|
230
|
-
openWorld: !0,
|
|
231
|
-
errors: [
|
|
232
|
-
"Retry is not offered: the read has not failed or been refused as retryable, or the host offers no Retry."
|
|
233
|
-
],
|
|
234
|
-
descriptionKey: "ui.agent.appointmentDetailsPanel.actions.retry",
|
|
235
|
-
description: "Ask the host to read the appointment again, after a failed read or a refusal it marked retryable.",
|
|
236
|
-
invoke: (t) => t.retry()
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
domHooks: {
|
|
240
|
-
root: {
|
|
241
|
-
attr: "data-component",
|
|
242
|
-
value: "appointment-details-panel",
|
|
243
|
-
description: `Marks the panel. It also carries data-event-id and data-status. Inside, cards carry data-card (patient, appointment, notes, treatments), footer actions data-action, and the History and description sub-views data-details-subview. An action in offeredActions with no data-action in the footer strip is folded into More: click the panel's ${Fn}, and its menu item carries the same data-action.`
|
|
244
|
-
},
|
|
245
|
-
instanceId: {
|
|
246
|
-
attr: "data-component-id",
|
|
247
|
-
sourceProp: "id",
|
|
248
|
-
description: "Sourced from the id prop, or generated."
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
function tt(t) {
|
|
253
|
-
const n = document.activeElement;
|
|
254
|
-
n && n !== document.body || t == null || t.focus({ preventScroll: !0 });
|
|
255
|
-
}
|
|
256
|
-
function Se(t) {
|
|
257
|
-
const n = document.getElementById(t);
|
|
258
|
-
n && !n.hasAttribute("tabindex") && (n.tabIndex = -1), tt(n);
|
|
259
|
-
}
|
|
260
|
-
function nt(t) {
|
|
261
|
-
return typeof t == "string" && /^\d{4}-\d{2}-\d{2}$/.test(t) ? /* @__PURE__ */ new Date(`${t}T00:00:00`) : new Date(t);
|
|
262
|
-
}
|
|
263
|
-
function Be(t, n) {
|
|
264
|
-
try {
|
|
265
|
-
return new Intl.DateTimeFormat(t, {
|
|
266
|
-
weekday: "long",
|
|
267
|
-
day: "numeric",
|
|
268
|
-
month: "long",
|
|
269
|
-
year: "numeric"
|
|
270
|
-
}).format(nt(n));
|
|
271
|
-
} catch {
|
|
272
|
-
return "";
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
function Hn(t, n, o) {
|
|
276
|
-
const r = new Date(n), s = o ? new Date(o) : r;
|
|
277
|
-
try {
|
|
278
|
-
const i = new Intl.DateTimeFormat(t, {
|
|
279
|
-
hour: "2-digit",
|
|
280
|
-
minute: "2-digit",
|
|
281
|
-
hour12: !1
|
|
282
|
-
});
|
|
283
|
-
return typeof i.formatRange == "function" ? i.formatRange(r, s) : `${i.format(r)} – ${i.format(s)}`;
|
|
284
|
-
} catch {
|
|
285
|
-
return "";
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
const at = {
|
|
289
|
-
weekday: "short",
|
|
290
|
-
day: "numeric",
|
|
291
|
-
month: "short",
|
|
292
|
-
hour: "2-digit",
|
|
293
|
-
minute: "2-digit"
|
|
294
|
-
};
|
|
295
|
-
function Wn(t, n) {
|
|
296
|
-
const o = nt(t), r = nt(n);
|
|
297
|
-
let s = r.getFullYear() - o.getFullYear();
|
|
298
|
-
const i = r.getMonth() - o.getMonth();
|
|
299
|
-
return (i < 0 || i === 0 && r.getDate() < o.getDate()) && (s -= 1), Math.max(0, s);
|
|
300
|
-
}
|
|
301
|
-
const jn = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})$/;
|
|
302
|
-
function qn(t) {
|
|
303
|
-
const n = typeof t == "string" ? jn.exec(t) : null;
|
|
304
|
-
if (!n) return;
|
|
305
|
-
const [o, r, s, i, l, b] = n.slice(1).map(Number), d = /* @__PURE__ */ new Date(0);
|
|
306
|
-
if (d.setFullYear(o, r, 0), r < 1 || r > 12 || s < 1 || s > d.getDate() || i > 23 || l > 59 || b > 59)
|
|
307
|
-
return;
|
|
308
|
-
const f = /* @__PURE__ */ new Date(0);
|
|
309
|
-
return f.setFullYear(o, r - 1, s), f.setHours(i, l, b, 0), f;
|
|
310
|
-
}
|
|
311
|
-
function Kn(t) {
|
|
312
|
-
return t.map((n) => {
|
|
313
|
-
const o = Date.parse(n.atIso);
|
|
314
|
-
return { entry: n, time: Number.isFinite(o) ? o : -1 / 0 };
|
|
315
|
-
}).sort((n, o) => n.time === o.time ? 0 : o.time - n.time).map(({ entry: n }) => n);
|
|
316
|
-
}
|
|
317
|
-
const Un = {
|
|
318
|
-
daily: "recurrenceDaily",
|
|
319
|
-
weekly: "recurrenceWeekly",
|
|
320
|
-
monthly: "recurrenceMonthly",
|
|
321
|
-
quarterly: "recurrenceQuarterly",
|
|
322
|
-
semiannual: "recurrenceSemiannual",
|
|
323
|
-
yearly: "recurrenceYearly"
|
|
324
|
-
};
|
|
325
|
-
function Gn(t) {
|
|
326
|
-
return t.phones ? t.phones : t.phone ? [{ label: "mobile", number: t.phone }] : [];
|
|
327
|
-
}
|
|
328
|
-
function jt(t) {
|
|
329
|
-
return [t.address, t.postalCode, t.city].filter((n) => !!n).join(", ");
|
|
330
|
-
}
|
|
331
|
-
function Vn(t) {
|
|
332
|
-
return [t.address, t.city].filter((n) => !!n).join(", ");
|
|
333
|
-
}
|
|
334
|
-
function Yn(t) {
|
|
335
|
-
const n = jt(t);
|
|
336
|
-
return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(n)}`;
|
|
337
|
-
}
|
|
338
|
-
const R = (t) => `calendarWorkspace.details.${t}`, Qn = /* @__PURE__ */ new Set(["patient", "care"]), Ct = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i, Xn = (t) => {
|
|
339
|
-
switch (t.field) {
|
|
340
|
-
case "time":
|
|
341
|
-
return !!(t.fromIso || t.toIso);
|
|
342
|
-
case "duration":
|
|
343
|
-
return t.fromMin !== void 0 || t.toMin !== void 0;
|
|
344
|
-
default:
|
|
345
|
-
return !!(t.from || t.to);
|
|
346
|
-
}
|
|
347
|
-
};
|
|
348
|
-
function Jn(t) {
|
|
349
|
-
const n = t.kind === "moved" ? [{ field: "time", fromIso: t.fromIso, toIso: t.toIso }] : t.kind === "resized" ? [{ field: "duration", fromMin: t.fromMin, toMin: t.toMin }] : t.kind === "status" ? [{ field: "status", from: t.from, to: t.to }] : [], o = ("changes" in t ? t.changes ?? [] : []).filter(
|
|
350
|
-
Xn
|
|
351
|
-
), r = new Set(n.map((s) => s.field));
|
|
352
|
-
return [
|
|
353
|
-
...n,
|
|
354
|
-
...o.filter((s) => r.has(s.field) ? !1 : (r.add(s.field), !0))
|
|
355
|
-
];
|
|
356
|
-
}
|
|
357
|
-
const Zn = (t, n) => t.getFullYear() === n.getFullYear() && t.getMonth() === n.getMonth() && t.getDate() === n.getDate();
|
|
358
|
-
function ea({
|
|
359
|
-
history: t,
|
|
360
|
-
locale: n,
|
|
361
|
-
noteUnrecordedEdits: o = !1,
|
|
362
|
-
privacy: r = !1
|
|
363
|
-
}) {
|
|
364
|
-
const { t: s, i18n: i } = $("ui"), { optionFor: l } = ot(null), b = n ?? i.language, d = (a, u) => {
|
|
365
|
-
try {
|
|
366
|
-
return new Intl.DateTimeFormat(b, u).format(
|
|
367
|
-
new Date(a)
|
|
368
|
-
);
|
|
369
|
-
} catch {
|
|
370
|
-
return a;
|
|
371
|
-
}
|
|
372
|
-
}, f = (a) => d(a, at), c = s(R("history.notSet")), C = (a) => {
|
|
373
|
-
switch (a.field) {
|
|
374
|
-
case "status":
|
|
375
|
-
return {
|
|
376
|
-
from: a.from && l(a.from).label,
|
|
377
|
-
to: a.to && l(a.to).label
|
|
378
|
-
};
|
|
379
|
-
case "time": {
|
|
380
|
-
const u = a.fromIso && new Date(a.fromIso), k = a.toIso && new Date(a.toIso), h = u && k && Zn(u, k) ? d(a.toIso, {
|
|
381
|
-
hour: "2-digit",
|
|
382
|
-
minute: "2-digit"
|
|
383
|
-
}) : void 0;
|
|
384
|
-
return {
|
|
385
|
-
from: a.fromIso && f(a.fromIso),
|
|
386
|
-
to: h ?? (a.toIso && f(a.toIso))
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
case "duration":
|
|
390
|
-
return {
|
|
391
|
-
from: a.fromMin === void 0 ? void 0 : s(R("history.minutes"), { n: a.fromMin }),
|
|
392
|
-
to: a.toMin === void 0 ? void 0 : s(R("history.minutes"), { n: a.toMin })
|
|
393
|
-
};
|
|
394
|
-
default:
|
|
395
|
-
return { from: a.from || void 0, to: a.to || void 0 };
|
|
396
|
-
}
|
|
397
|
-
}, E = (a) => {
|
|
398
|
-
const u = s(R(`history.fields.${a.field}`)), { from: k, to: h } = C(a);
|
|
399
|
-
return a.field === "colour" && [k, h].some((N) => N && Ct.test(N)) ? s(R("history.changed.colour")) : k && !h ? s(R("history.changeCleared"), { field: u, from: k }) : !k && h ? s(R("history.changeSet"), { field: u, to: h }) : s(R("history.changeFromTo"), {
|
|
400
|
-
field: u,
|
|
401
|
-
from: k ?? c,
|
|
402
|
-
to: h ?? c
|
|
403
|
-
});
|
|
404
|
-
}, g = (a) => {
|
|
405
|
-
const u = (A, S) => A && a.field === "colour" && Ct.test(A) ? /* @__PURE__ */ e(
|
|
406
|
-
"span",
|
|
407
|
-
{
|
|
408
|
-
className: "ds:inline-block ds:size-4 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:border ds:border-[color:var(--border)] ds:[background-color:var(--history-swatch)] ds:forced-colors:[forced-color-adjust:none]",
|
|
409
|
-
style: {
|
|
410
|
-
"--history-swatch": A.startsWith("#") ? A : `#${A}`
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
) : A ? /* @__PURE__ */ e(
|
|
414
|
-
"span",
|
|
415
|
-
{
|
|
416
|
-
className: S ? "ds:min-w-0 ds:font-[var(--font-weight-medium)] ds:text-[color:var(--foreground)]" : "ds:min-w-0 ds:text-[color:var(--muted-foreground)]",
|
|
417
|
-
children: A
|
|
418
|
-
}
|
|
419
|
-
) : /* @__PURE__ */ e("span", { className: "ds:min-w-0 ds:text-[color:var(--muted-foreground)]", children: c }), k = (A) => A ? /* @__PURE__ */ e(
|
|
420
|
-
Ft,
|
|
421
|
-
{
|
|
422
|
-
value: A,
|
|
423
|
-
option: l(A),
|
|
424
|
-
size: "sm"
|
|
425
|
-
}
|
|
426
|
-
) : u(void 0, !1), { from: h, to: N } = C(a);
|
|
427
|
-
return /* @__PURE__ */ p("div", { className: "ds:min-w-0", "data-history-change": a.field, children: [
|
|
428
|
-
/* @__PURE__ */ e("span", { className: "ds:sr-only", children: E(a) }),
|
|
429
|
-
/* @__PURE__ */ p(
|
|
430
|
-
"div",
|
|
431
|
-
{
|
|
432
|
-
"aria-hidden": "true",
|
|
433
|
-
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
434
|
-
children: [
|
|
435
|
-
a.field === "status" ? k(a.from) : u(h, !1),
|
|
436
|
-
/* @__PURE__ */ e(
|
|
437
|
-
cn,
|
|
438
|
-
{
|
|
439
|
-
className: "ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:rtl:rotate-180",
|
|
440
|
-
"aria-hidden": "true"
|
|
441
|
-
}
|
|
442
|
-
),
|
|
443
|
-
a.field === "status" ? k(a.to) : u(N, !0)
|
|
444
|
-
]
|
|
445
|
-
}
|
|
446
|
-
)
|
|
447
|
-
] });
|
|
448
|
-
}, P = (a) => {
|
|
449
|
-
switch (a.kind) {
|
|
450
|
-
case "created":
|
|
451
|
-
return {
|
|
452
|
-
title: s(R("history.created")),
|
|
453
|
-
type: "success",
|
|
454
|
-
icon: /* @__PURE__ */ e(ln, { size: 16, "aria-hidden": "true" })
|
|
455
|
-
};
|
|
456
|
-
case "confirmedByPatient": {
|
|
457
|
-
const y = Ve.confirmed.Icon;
|
|
458
|
-
return {
|
|
459
|
-
title: s(R("history.confirmedByPatient")),
|
|
460
|
-
type: "success",
|
|
461
|
-
icon: /* @__PURE__ */ e(y, { size: 16, "aria-hidden": "true" })
|
|
462
|
-
};
|
|
463
|
-
}
|
|
464
|
-
case "deleted":
|
|
465
|
-
return {
|
|
466
|
-
title: s(R("history.deleted")),
|
|
467
|
-
type: "error",
|
|
468
|
-
icon: /* @__PURE__ */ e($t, { size: 16, "aria-hidden": "true" })
|
|
469
|
-
};
|
|
470
|
-
}
|
|
471
|
-
const u = Jn(a), k = r ? u.filter((y) => !Qn.has(y.field)) : u, h = new Set(k.map((y) => y.field)), N = [
|
|
472
|
-
...a.kind === "edited" ? a.fields : [],
|
|
473
|
-
...u.filter((y) => !h.has(y.field)).map((y) => y.field)
|
|
474
|
-
].filter(
|
|
475
|
-
(y, v, L) => y !== "status" && !h.has(y) && L.indexOf(y) === v
|
|
476
|
-
), A = N.length > 0 ? s(R("history.editedDetail"), {
|
|
477
|
-
fields: N.map((y) => s(R(`history.fields.${y}`))).join(", ")
|
|
478
|
-
}) : void 0, [S] = k;
|
|
479
|
-
if (k.length === 1 && S && !A)
|
|
480
|
-
switch (S.field) {
|
|
481
|
-
case "status": {
|
|
482
|
-
const { to: y } = S, v = y ? Ve[y].Icon : me;
|
|
483
|
-
return {
|
|
484
|
-
title: s(R("history.status")),
|
|
485
|
-
type: y === "cancelled" || y === "absent" ? "warning" : "neutral",
|
|
486
|
-
icon: /* @__PURE__ */ e(v, { size: 16, "aria-hidden": "true" }),
|
|
487
|
-
detail: g(S)
|
|
488
|
-
};
|
|
489
|
-
}
|
|
490
|
-
case "time":
|
|
491
|
-
return {
|
|
492
|
-
title: s(R("history.moved")),
|
|
493
|
-
type: "info",
|
|
494
|
-
icon: /* @__PURE__ */ e(et, { size: 16, "aria-hidden": "true" }),
|
|
495
|
-
detail: g(S)
|
|
496
|
-
};
|
|
497
|
-
case "duration":
|
|
498
|
-
return {
|
|
499
|
-
title: s(R("history.resized")),
|
|
500
|
-
type: "info",
|
|
501
|
-
icon: /* @__PURE__ */ e(Je, { size: 16, "aria-hidden": "true" }),
|
|
502
|
-
detail: g(S)
|
|
503
|
-
};
|
|
504
|
-
default:
|
|
505
|
-
return {
|
|
506
|
-
title: s(R(`history.changed.${S.field}`)),
|
|
507
|
-
type: "neutral",
|
|
508
|
-
icon: /* @__PURE__ */ e(me, { size: 16, "aria-hidden": "true" }),
|
|
509
|
-
detail: g(S)
|
|
510
|
-
};
|
|
511
|
-
}
|
|
512
|
-
if (k.length > 0) {
|
|
513
|
-
const y = a.kind === "moved" ? {
|
|
514
|
-
title: "history.moved",
|
|
515
|
-
icon: /* @__PURE__ */ e(et, { size: 16, "aria-hidden": "true" })
|
|
516
|
-
} : a.kind === "resized" ? {
|
|
517
|
-
title: "history.resized",
|
|
518
|
-
icon: /* @__PURE__ */ e(Je, { size: 16, "aria-hidden": "true" })
|
|
519
|
-
} : a.kind === "status" ? {
|
|
520
|
-
title: "history.status",
|
|
521
|
-
icon: (() => {
|
|
522
|
-
const v = Ve[a.to].Icon;
|
|
523
|
-
return /* @__PURE__ */ e(v, { size: 16, "aria-hidden": "true" });
|
|
524
|
-
})()
|
|
525
|
-
} : {
|
|
526
|
-
title: "history.edited",
|
|
527
|
-
icon: /* @__PURE__ */ e(me, { size: 16, "aria-hidden": "true" })
|
|
528
|
-
};
|
|
529
|
-
return {
|
|
530
|
-
title: s(R(y.title)),
|
|
531
|
-
type: a.kind === "moved" || a.kind === "resized" ? "info" : a.kind === "status" && (a.to === "cancelled" || a.to === "absent") ? "warning" : "neutral",
|
|
532
|
-
icon: y.icon,
|
|
533
|
-
detail: /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
534
|
-
/* @__PURE__ */ e(
|
|
535
|
-
"dl",
|
|
536
|
-
{
|
|
537
|
-
"aria-label": s(R("history.changesLabel")),
|
|
538
|
-
className: "ds:m-0 ds:grid ds:grid-cols-[auto_minmax(0,1fr)] ds:items-baseline ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-xs)]",
|
|
539
|
-
children: k.map((v) => /* @__PURE__ */ p("div", { className: "ds:contents", children: [
|
|
540
|
-
/* @__PURE__ */ e("dt", { className: "type-label ds:text-[color:var(--muted-foreground)]", children: s(R(`history.fields.${v.field}`)) }),
|
|
541
|
-
/* @__PURE__ */ e("dd", { className: "ds:m-0 ds:min-w-0", children: g(v) })
|
|
542
|
-
] }, v.field))
|
|
543
|
-
}
|
|
544
|
-
),
|
|
545
|
-
A ? /* @__PURE__ */ e("p", { className: "ds:m-0", children: A }) : null
|
|
546
|
-
] })
|
|
547
|
-
};
|
|
548
|
-
}
|
|
549
|
-
return {
|
|
550
|
-
title: s(R("history.edited")),
|
|
551
|
-
type: "neutral",
|
|
552
|
-
icon: /* @__PURE__ */ e(me, { size: 16, "aria-hidden": "true" }),
|
|
553
|
-
detail: A || (o ? /* @__PURE__ */ e("span", { className: "ds:text-[color:var(--muted-foreground)]", children: s(R("history.notRecorded")) }) : void 0)
|
|
554
|
-
};
|
|
555
|
-
};
|
|
556
|
-
return t.length === 0 ? /* @__PURE__ */ e(
|
|
557
|
-
dn,
|
|
558
|
-
{
|
|
559
|
-
variant: "first-use",
|
|
560
|
-
size: "sm",
|
|
561
|
-
title: s(R("historyEmpty"))
|
|
562
|
-
}
|
|
563
|
-
) : /* @__PURE__ */ e(Ae, { order: "newest-first", "aria-label": s(R("historyTitle")), children: Kn(t).map((a) => {
|
|
564
|
-
const u = P(a);
|
|
565
|
-
return /* @__PURE__ */ p(
|
|
566
|
-
Ae.Event,
|
|
567
|
-
{
|
|
568
|
-
eventId: a.id,
|
|
569
|
-
type: u.type,
|
|
570
|
-
className: "ds:[column-gap:var(--spacing-sm)] ds:[padding-block-end:var(--spacing-lg)] ds:before:bg-[var(--primary)]",
|
|
571
|
-
children: [
|
|
572
|
-
/* @__PURE__ */ e(Ae.Dot, { icon: u.icon }),
|
|
573
|
-
/* @__PURE__ */ e(
|
|
574
|
-
Ae.Content,
|
|
575
|
-
{
|
|
576
|
-
title: u.title,
|
|
577
|
-
description: u.detail,
|
|
578
|
-
className: "ds:[padding-block-end:0] ds:[&>[data-component=card]]:border-[color:var(--card-border)] ds:[&>[data-component=card]]:shadow-[var(--shadow-card)]",
|
|
579
|
-
actor: a.actor.trim() ? { name: a.actor } : void 0,
|
|
580
|
-
children: /* @__PURE__ */ p("span", { className: "ds:mt-[var(--spacing-sm)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
581
|
-
/* @__PURE__ */ e(
|
|
582
|
-
rt,
|
|
583
|
-
{
|
|
584
|
-
"aria-hidden": "true",
|
|
585
|
-
className: "ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)]"
|
|
586
|
-
}
|
|
587
|
-
),
|
|
588
|
-
/* @__PURE__ */ e(
|
|
589
|
-
Ae.Timestamp,
|
|
590
|
-
{
|
|
591
|
-
date: a.atIso,
|
|
592
|
-
relative: !1,
|
|
593
|
-
locale: b
|
|
594
|
-
}
|
|
595
|
-
)
|
|
596
|
-
] })
|
|
597
|
-
}
|
|
598
|
-
)
|
|
599
|
-
]
|
|
600
|
-
},
|
|
601
|
-
a.id
|
|
602
|
-
);
|
|
603
|
-
}) });
|
|
604
|
-
}
|
|
605
|
-
const ta = {
|
|
606
|
-
confirmed: "success",
|
|
607
|
-
waiting: "info",
|
|
608
|
-
in_care: "accentSoft",
|
|
609
|
-
done: "success",
|
|
610
|
-
cancelled: "error",
|
|
611
|
-
absent: "warning"
|
|
612
|
-
};
|
|
613
|
-
function na({ event: t }) {
|
|
614
|
-
const { t: n } = $("ui"), o = (s) => `calendarWorkspace.details.indicators.${s}`, r = [];
|
|
615
|
-
return t.isBookedOnline && r.push({
|
|
616
|
-
id: "online",
|
|
617
|
-
icon: /* @__PURE__ */ e(un, { "aria-hidden": "true" }),
|
|
618
|
-
label: n(o("bookedOnline")),
|
|
619
|
-
variant: "info"
|
|
620
|
-
}), t.hasUnassignedPatient && r.push({
|
|
621
|
-
id: "unassigned",
|
|
622
|
-
icon: /* @__PURE__ */ e(mn, { "aria-hidden": "true" }),
|
|
623
|
-
label: n(o("unassignedPatient")),
|
|
624
|
-
variant: "warning"
|
|
625
|
-
}), t.hasHighlightedAnamnesis && r.push({
|
|
626
|
-
id: "anamnesis",
|
|
627
|
-
icon: /* @__PURE__ */ e(dt, { "aria-hidden": "true" }),
|
|
628
|
-
label: n(o("anamnesis")),
|
|
629
|
-
variant: "accentSoft"
|
|
630
|
-
}), t.hasBillableAmount && r.push({
|
|
631
|
-
id: "billable",
|
|
632
|
-
icon: /* @__PURE__ */ e(pn, { "aria-hidden": "true" }),
|
|
633
|
-
label: n(o("billable")),
|
|
634
|
-
variant: "warning"
|
|
635
|
-
}), t.isTelehealth && r.push({
|
|
636
|
-
id: "telehealth",
|
|
637
|
-
icon: /* @__PURE__ */ e(lt, { "aria-hidden": "true" }),
|
|
638
|
-
label: n(o("telehealth")),
|
|
639
|
-
variant: "info"
|
|
640
|
-
}), t.isRecurring && r.push({
|
|
641
|
-
id: "recurring",
|
|
642
|
-
icon: /* @__PURE__ */ e(Ht, { "aria-hidden": "true" }),
|
|
643
|
-
label: n(o("recurring")),
|
|
644
|
-
variant: "info"
|
|
645
|
-
}), r.length === 0 ? null : /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: r.map((s) => /* @__PURE__ */ e(
|
|
646
|
-
$e,
|
|
647
|
-
{
|
|
648
|
-
variant: s.variant,
|
|
649
|
-
size: "sm",
|
|
650
|
-
leading: s.icon,
|
|
651
|
-
children: s.label
|
|
652
|
-
},
|
|
653
|
-
s.id
|
|
654
|
-
)) });
|
|
655
|
-
}
|
|
656
|
-
function aa({
|
|
657
|
-
name: t,
|
|
658
|
-
avatarSrc: n,
|
|
659
|
-
unresolved: o = !1,
|
|
660
|
-
status: r,
|
|
661
|
-
flags: s,
|
|
662
|
-
age: i,
|
|
663
|
-
onOpenPatient: l,
|
|
664
|
-
highlightedAnamnesisCount: b = 0,
|
|
665
|
-
expiredAnamnesisCount: d = 0,
|
|
666
|
-
anamnesisAnswers: f = [],
|
|
667
|
-
locale: c
|
|
668
|
-
}) {
|
|
669
|
-
const { t: C, i18n: E } = $("ui"), g = (h) => `calendarWorkspace.details.${h}`, { optionFor: P } = ot(r), a = r ? P(r) : void 0, u = b, k = d;
|
|
670
|
-
return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)] ds:pb-0", children: [
|
|
671
|
-
/* @__PURE__ */ p("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
672
|
-
/* @__PURE__ */ e(Ze, { name: t, src: n }),
|
|
673
|
-
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:[min-inline-size:0]", children: [
|
|
674
|
-
/* @__PURE__ */ p("span", { className: "ds:flex ds:flex-wrap ds:items-baseline ds:gap-[var(--spacing-2xs)] ds:text-start", children: [
|
|
675
|
-
l ? /* @__PURE__ */ e(O, { size: "sm", intent: "link", onClick: () => l(), children: t }) : /* @__PURE__ */ e("span", { className: "ds:font-[var(--font-weight-semibold)] ds:truncate", children: t }),
|
|
676
|
-
i !== void 0 ? /* @__PURE__ */ e("span", { className: "type-body-sm ds:text-[color:var(--muted-foreground)]", children: C(g("patientAge"), { n: i }) }) : null
|
|
677
|
-
] }),
|
|
678
|
-
o ? /* @__PURE__ */ e("span", { className: "type-body-sm ds:text-start ds:text-[color:var(--muted-foreground)]", children: C(g("patientNotLoaded")) }) : null,
|
|
679
|
-
r && a ? /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
|
|
680
|
-
$e,
|
|
681
|
-
{
|
|
682
|
-
variant: ta[r],
|
|
683
|
-
size: "sm",
|
|
684
|
-
leading: a.icon,
|
|
685
|
-
children: a.label
|
|
686
|
-
}
|
|
687
|
-
) }) : null,
|
|
688
|
-
/* @__PURE__ */ e(na, { event: s })
|
|
689
|
-
] })
|
|
690
|
-
] }),
|
|
691
|
-
u + k > 0 ? /* @__PURE__ */ p(
|
|
692
|
-
F,
|
|
693
|
-
{
|
|
694
|
-
variant: "warning",
|
|
695
|
-
announce: "off",
|
|
696
|
-
icon: /* @__PURE__ */ e(dt, { "aria-hidden": "true" }),
|
|
697
|
-
children: [
|
|
698
|
-
/* @__PURE__ */ e(F.Title, { as: "p", children: C(g("anamnesisTitle")) }),
|
|
699
|
-
/* @__PURE__ */ e(F.Description, { children: [
|
|
700
|
-
u > 0 ? C(g("anamnesisHighlighted"), { n: u }) : null,
|
|
701
|
-
k > 0 ? C(g("anamnesisExpired"), { n: k }) : null
|
|
702
|
-
].filter((h) => h !== null).join(" · ") }),
|
|
703
|
-
f.length > 0 ? (
|
|
704
|
-
/* Question · yes or no · answer · interview date, as the
|
|
705
|
-
platform's details dialog lists them. A list, not a
|
|
706
|
-
Description, which renders a <p>. */
|
|
707
|
-
/* @__PURE__ */ e("ul", { className: "type-body-sm ds:m-0 ds:mt-[var(--spacing-xs)] ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-0", children: f.map((h) => /* @__PURE__ */ p("li", { className: "ds:text-start", children: [
|
|
708
|
-
/* @__PURE__ */ e("span", { className: "ds:font-[var(--font-weight-semibold)]", children: h.question }),
|
|
709
|
-
` · ${C(g(h.yes ? "anamnesisYes" : "anamnesisNo"))}`,
|
|
710
|
-
h.answer ? ` · ${h.answer}` : "",
|
|
711
|
-
` · ${Be(c ?? E.language, h.interviewIso)}`
|
|
712
|
-
] }, h.question)) })
|
|
713
|
-
) : null
|
|
714
|
-
]
|
|
715
|
-
}
|
|
716
|
-
) : null
|
|
717
|
-
] });
|
|
718
|
-
}
|
|
719
|
-
function st({
|
|
720
|
-
eyebrow: t,
|
|
721
|
-
heading: n,
|
|
722
|
-
facts: o
|
|
723
|
-
}) {
|
|
724
|
-
return /* @__PURE__ */ p(Q, { children: [
|
|
725
|
-
/* @__PURE__ */ e(he.Eyebrow, { children: t }),
|
|
726
|
-
/* @__PURE__ */ e(he.Heading, { children: n }),
|
|
727
|
-
o && o.length > 0 ? /* @__PURE__ */ e(he.Body, { children: /* @__PURE__ */ e("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-0 type-body-sm", children: o.map((r, s) => /* @__PURE__ */ e(
|
|
728
|
-
"li",
|
|
729
|
-
{
|
|
730
|
-
className: r.muted ? "ds:text-[color:var(--muted-foreground)]" : void 0,
|
|
731
|
-
children: r.text
|
|
732
|
-
},
|
|
733
|
-
s
|
|
734
|
-
)) }) }) : null
|
|
735
|
-
] });
|
|
736
|
-
}
|
|
737
|
-
const sa = "ds:inline-flex ds:cursor-pointer ds:rounded-[var(--radius-full)] ds:p-0 ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]";
|
|
738
|
-
function Et({
|
|
739
|
-
id: t,
|
|
740
|
-
eyebrow: n,
|
|
741
|
-
heading: o,
|
|
742
|
-
facts: r,
|
|
743
|
-
children: s
|
|
744
|
-
}) {
|
|
745
|
-
return /* @__PURE__ */ p(he, { children: [
|
|
746
|
-
/* @__PURE__ */ e(he.Trigger, { asChild: !0, children: /* @__PURE__ */ e("button", { type: "button", "data-chip-hover": t, className: sa, children: s }) }),
|
|
747
|
-
/* @__PURE__ */ e(he.Content, { side: "bottom", align: "start", size: "sm", children: /* @__PURE__ */ e(st, { eyebrow: n, heading: o, facts: r }) })
|
|
748
|
-
] });
|
|
749
|
-
}
|
|
750
|
-
const m = (t) => `calendarWorkspace.details.${t}`, ia = "type-body-sm ds:text-[color:var(--muted-foreground)]", qt = (t) => /* @__PURE__ */ e("a", { href: `tel:${t.replace(/\s/g, "")}`, dir: "ltr", children: t }), Kt = (t) => /* @__PURE__ */ e("a", { href: `mailto:${t}`, dir: "ltr", children: t }), Ut = (t, n, o) => new Intl.NumberFormat(t, { style: "currency", currency: o }).format(n);
|
|
751
|
-
function Rt({ rows: t }) {
|
|
752
|
-
const n = t.filter((o) => !!o);
|
|
753
|
-
return n.length === 0 ? null : /* @__PURE__ */ e(_e, { layout: "inline", density: "compact", children: n.map((o) => /* @__PURE__ */ p(
|
|
754
|
-
_e.Row,
|
|
755
|
-
{
|
|
756
|
-
"data-row": o.id,
|
|
757
|
-
icon: o.icon,
|
|
758
|
-
children: [
|
|
759
|
-
/* @__PURE__ */ e(_e.Term, { children: o.label }),
|
|
760
|
-
/* @__PURE__ */ e(_e.Detail, { children: o.value })
|
|
761
|
-
]
|
|
762
|
-
},
|
|
763
|
-
o.id
|
|
764
|
-
)) });
|
|
765
|
-
}
|
|
766
|
-
function oa({
|
|
767
|
-
details: t,
|
|
768
|
-
locale: n,
|
|
769
|
-
currency: o,
|
|
770
|
-
now: r,
|
|
771
|
-
mapsLink: s = !1
|
|
772
|
-
}) {
|
|
773
|
-
const { t: i } = $("ui"), { patient: l, signing: b, money: d, booking: f } = t;
|
|
774
|
-
if (!l) return null;
|
|
775
|
-
const c = b && b.required > 0 ? b : void 0, C = ((c == null ? void 0 : c.toComplete) ?? 0) > 0, E = c ? [
|
|
776
|
-
{
|
|
777
|
-
text: C ? c.requestedVia === "sms" ? i(m("signingRequestedSms")) : c.requestedVia === "email" ? i(m("signingRequestedEmail")) : i(m("signingNotRequested")) : i(m("signingAllSigned"))
|
|
778
|
-
},
|
|
779
|
-
...c.aesSetUp ? [] : [{ text: i(m("aesMissing")), muted: !0 }]
|
|
780
|
-
] : [], g = l.highlightedAnamnesisCount ?? 0, P = l.expiredAnamnesisCount ?? 0, a = (l.highlightedAnamnesisAnswers ?? []).map((v) => ({
|
|
781
|
-
text: [
|
|
782
|
-
v.question,
|
|
783
|
-
i(m(v.yes ? "anamnesisYes" : "anamnesisNo")),
|
|
784
|
-
v.answer,
|
|
785
|
-
Be(n, v.interviewIso)
|
|
786
|
-
].filter(Boolean).join(" · ")
|
|
787
|
-
})), u = jt(l), k = Vn(l) || u, h = [
|
|
788
|
-
...l.dobIso ? [
|
|
789
|
-
{
|
|
790
|
-
id: "dob",
|
|
791
|
-
label: i(m("dob")),
|
|
792
|
-
icon: /* @__PURE__ */ e(Ln, {}),
|
|
793
|
-
value: `${Be(n, l.dobIso)} ${i(
|
|
794
|
-
m("patientAge"),
|
|
795
|
-
{
|
|
796
|
-
n: Wn(l.dobIso, r)
|
|
797
|
-
}
|
|
798
|
-
)}`
|
|
799
|
-
}
|
|
800
|
-
] : [],
|
|
801
|
-
...Gn(l).map((v, L) => {
|
|
802
|
-
const K = v.label === "mobile" || v.label === "home" || v.label === "work";
|
|
803
|
-
return {
|
|
804
|
-
id: `phone-${L}`,
|
|
805
|
-
label: i(K ? `calendarWorkspace.print.phoneLabels.${v.label}` : m("phone")),
|
|
806
|
-
icon: v.label === "mobile" ? /* @__PURE__ */ e(gn, {}) : /* @__PURE__ */ e(vn, {}),
|
|
807
|
-
value: qt(v.number)
|
|
808
|
-
};
|
|
809
|
-
}),
|
|
810
|
-
...l.email ? [
|
|
811
|
-
{
|
|
812
|
-
id: "email",
|
|
813
|
-
label: i(m("email")),
|
|
814
|
-
icon: /* @__PURE__ */ e(yn, {}),
|
|
815
|
-
value: Kt(l.email)
|
|
816
|
-
}
|
|
817
|
-
] : [],
|
|
818
|
-
...s ? [
|
|
819
|
-
{
|
|
820
|
-
id: "address",
|
|
821
|
-
label: i(m("address")),
|
|
822
|
-
icon: /* @__PURE__ */ e(bn, {}),
|
|
823
|
-
value: u ? /* @__PURE__ */ e(
|
|
824
|
-
"a",
|
|
825
|
-
{
|
|
826
|
-
href: Yn(l),
|
|
827
|
-
target: "_blank",
|
|
828
|
-
rel: "noopener noreferrer",
|
|
829
|
-
"aria-label": `${i(m("mapsLink"))}: ${k}`,
|
|
830
|
-
children: k
|
|
831
|
-
}
|
|
832
|
-
) : /* @__PURE__ */ e("span", { className: ia, children: i(m("noAddress")) })
|
|
833
|
-
}
|
|
834
|
-
] : []
|
|
835
|
-
], N = (d == null ? void 0 : d.unpaidAmount) ?? 0, A = (d == null ? void 0 : d.billableAmount) ?? 0, S = (f == null ? void 0 : f.paidOnlineAmount) ?? 0, y = (v, L, K, ae, V, se) => /* @__PURE__ */ e(
|
|
836
|
-
Et,
|
|
837
|
-
{
|
|
838
|
-
id: K,
|
|
839
|
-
eyebrow: i(m("hoverBilling")),
|
|
840
|
-
heading: i(m(ae), {
|
|
841
|
-
amount: Ut(n, L, o)
|
|
842
|
-
}),
|
|
843
|
-
facts: [{ text: i(m(V)) }],
|
|
844
|
-
children: /* @__PURE__ */ e(
|
|
845
|
-
fn,
|
|
846
|
-
{
|
|
847
|
-
"data-chip": K,
|
|
848
|
-
state: v,
|
|
849
|
-
amount: L,
|
|
850
|
-
currency: o,
|
|
851
|
-
locale: n,
|
|
852
|
-
size: "md",
|
|
853
|
-
showLabel: !0,
|
|
854
|
-
label: se,
|
|
855
|
-
showIcon: !1
|
|
856
|
-
}
|
|
857
|
-
)
|
|
858
|
-
}
|
|
859
|
-
);
|
|
860
|
-
return /* @__PURE__ */ e(
|
|
861
|
-
_t,
|
|
862
|
-
{
|
|
863
|
-
"data-card": "patient",
|
|
864
|
-
name: l.name,
|
|
865
|
-
avatarUrl: l.avatarSrc,
|
|
866
|
-
locale: n,
|
|
867
|
-
surface: "elevated",
|
|
868
|
-
density: "compact",
|
|
869
|
-
flags: {
|
|
870
|
-
unsignedDocumentsCount: (c == null ? void 0 : c.toComplete) ?? 0,
|
|
871
|
-
highlightedAnamnesisCount: g
|
|
872
|
-
},
|
|
873
|
-
flagHover: {
|
|
874
|
-
...c ? {
|
|
875
|
-
unsignedDocuments: /* @__PURE__ */ e(
|
|
876
|
-
st,
|
|
877
|
-
{
|
|
878
|
-
eyebrow: i(m("sectionSigning")),
|
|
879
|
-
heading: c.toComplete === 1 ? i(m("signingToSignOne")) : i(m("signingToSignMany"), {
|
|
880
|
-
n: c.toComplete
|
|
881
|
-
}),
|
|
882
|
-
facts: E
|
|
883
|
-
}
|
|
884
|
-
)
|
|
885
|
-
} : {},
|
|
886
|
-
highlightedAnamnesis: /* @__PURE__ */ e(
|
|
887
|
-
st,
|
|
888
|
-
{
|
|
889
|
-
eyebrow: i(m("anamnesisTitle")),
|
|
890
|
-
heading: i(m("anamnesisHighlighted"), { n: g }),
|
|
891
|
-
facts: a
|
|
892
|
-
}
|
|
893
|
-
)
|
|
894
|
-
},
|
|
895
|
-
extraChips: N > 0 || A > 0 || S > 0 || P > 0 ? /* @__PURE__ */ p(Q, { children: [
|
|
896
|
-
/* @__PURE__ */ p("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
897
|
-
N > 0 ? y(
|
|
898
|
-
"debt",
|
|
899
|
-
N,
|
|
900
|
-
"unpaid",
|
|
901
|
-
"hoverUnpaidHeading",
|
|
902
|
-
"hoverUnpaidFact"
|
|
903
|
-
) : null,
|
|
904
|
-
A > 0 ? y(
|
|
905
|
-
"to-invoice",
|
|
906
|
-
A,
|
|
907
|
-
"billable",
|
|
908
|
-
"hoverBillableHeading",
|
|
909
|
-
"hoverBillableFact"
|
|
910
|
-
) : null,
|
|
911
|
-
S > 0 ? y(
|
|
912
|
-
"settled",
|
|
913
|
-
S,
|
|
914
|
-
"paidOnline",
|
|
915
|
-
"hoverPaidOnlineHeading",
|
|
916
|
-
"hoverPaidOnlineFact",
|
|
917
|
-
/* A deposit is settled money, but "Settled" hides where
|
|
918
|
-
it came from: the chip says what its hover card says. */
|
|
919
|
-
i(m("paidOnline"))
|
|
920
|
-
) : null
|
|
921
|
-
] }),
|
|
922
|
-
P > 0 ? /* @__PURE__ */ e(
|
|
923
|
-
Et,
|
|
924
|
-
{
|
|
925
|
-
id: "anamnesisExpired",
|
|
926
|
-
eyebrow: i(m("anamnesisTitle")),
|
|
927
|
-
heading: i(m("anamnesisExpired"), { n: P }),
|
|
928
|
-
facts: [{ text: i(m("hoverAnamnesisExpiredFact")) }],
|
|
929
|
-
children: /* @__PURE__ */ e(
|
|
930
|
-
$e,
|
|
931
|
-
{
|
|
932
|
-
"data-chip": "anamnesisExpired",
|
|
933
|
-
variant: "warning",
|
|
934
|
-
size: "md",
|
|
935
|
-
leading: /* @__PURE__ */ e(dt, {}),
|
|
936
|
-
children: i(m("anamnesisExpired"), { n: P })
|
|
937
|
-
}
|
|
938
|
-
)
|
|
939
|
-
}
|
|
940
|
-
) : null
|
|
941
|
-
] }) : void 0,
|
|
942
|
-
visibleFieldOrder: h.map((v) => v.id),
|
|
943
|
-
sections: h.length > 0 ? [{ id: "contact", heading: i(m("sectionPatient")), fields: h }] : void 0
|
|
944
|
-
}
|
|
945
|
-
);
|
|
946
|
-
}
|
|
947
|
-
function ra({
|
|
948
|
-
details: t,
|
|
949
|
-
locale: n,
|
|
950
|
-
currency: o,
|
|
951
|
-
operator: r,
|
|
952
|
-
chair: s,
|
|
953
|
-
description: i,
|
|
954
|
-
privacy: l = !1,
|
|
955
|
-
history: b
|
|
956
|
-
}) {
|
|
957
|
-
const { t: d } = $("ui"), { appointment: f, booking: c, patient: C } = t, E = (v) => d(`calendarWorkspace.editor.${v}`), g = new Date(f.startIso), P = new Date(g.getTime() + f.durationMin * 6e4), a = Number.isFinite(g.getTime()), { recurrence: u } = f, k = u && Un[u.frequency], h = k ? d(`calendarWorkspace.editor.${k}`) : void 0, N = c ? [
|
|
958
|
-
c.bookedAtIso && {
|
|
959
|
-
id: "bookedAt",
|
|
960
|
-
label: d(m("bookedAt")),
|
|
961
|
-
value: /* @__PURE__ */ e(
|
|
962
|
-
St,
|
|
963
|
-
{
|
|
964
|
-
value: c.bookedAtIso,
|
|
965
|
-
format: "absolute",
|
|
966
|
-
shape: "bare",
|
|
967
|
-
locale: n,
|
|
968
|
-
absoluteFormat: at
|
|
969
|
-
}
|
|
970
|
-
)
|
|
971
|
-
},
|
|
972
|
-
c.typedName && {
|
|
973
|
-
id: "bookingName",
|
|
974
|
-
label: d(m("bookingName")),
|
|
975
|
-
value: c.typedName
|
|
976
|
-
},
|
|
977
|
-
c.phone && {
|
|
978
|
-
id: "bookingPhone",
|
|
979
|
-
label: d(m("bookingPhone")),
|
|
980
|
-
value: qt(c.phone)
|
|
981
|
-
},
|
|
982
|
-
c.email && {
|
|
983
|
-
id: "bookingEmail",
|
|
984
|
-
label: d(m("bookingEmail")),
|
|
985
|
-
value: Kt(c.email)
|
|
986
|
-
},
|
|
987
|
-
c.note && {
|
|
988
|
-
id: "bookingNote",
|
|
989
|
-
label: d(m("bookingNote")),
|
|
990
|
-
value: c.note
|
|
991
|
-
},
|
|
992
|
-
/* With a patient the amount is a chip on the patient card. */
|
|
993
|
-
!C && c.paidOnlineAmount !== void 0 && {
|
|
994
|
-
id: "paidOnline",
|
|
995
|
-
label: d(m("paidOnline")),
|
|
996
|
-
value: Ut(n, c.paidOnlineAmount, o)
|
|
997
|
-
}
|
|
998
|
-
] : [], A = l ? N.filter((v) => v && v.id === "bookedAt") : N, S = A.some(Boolean), y = c || f.bookedOnline || b == null ? void 0 : b.filter(
|
|
999
|
-
(v) => v.kind === "created" && v.actor.trim() !== ""
|
|
1000
|
-
).sort((v, L) => Date.parse(v.atIso) - Date.parse(L.atIso))[0];
|
|
1001
|
-
return /* @__PURE__ */ p(
|
|
1002
|
-
ne,
|
|
1003
|
-
{
|
|
1004
|
-
"data-card": "appointment",
|
|
1005
|
-
title: d(m("sectionAppointment")),
|
|
1006
|
-
headingLevel: 3,
|
|
1007
|
-
children: [
|
|
1008
|
-
i,
|
|
1009
|
-
/* @__PURE__ */ e(
|
|
1010
|
-
Rt,
|
|
1011
|
-
{
|
|
1012
|
-
rows: [
|
|
1013
|
-
a && {
|
|
1014
|
-
id: "date",
|
|
1015
|
-
label: E("date"),
|
|
1016
|
-
icon: /* @__PURE__ */ e(kn, {}),
|
|
1017
|
-
value: Be(n, g)
|
|
1018
|
-
},
|
|
1019
|
-
a && {
|
|
1020
|
-
id: "time",
|
|
1021
|
-
label: d(m("time")),
|
|
1022
|
-
icon: /* @__PURE__ */ e(Je, {}),
|
|
1023
|
-
value: f.allDay ? E("allDay") : Hn(n, g, P)
|
|
1024
|
-
},
|
|
1025
|
-
!f.allDay && {
|
|
1026
|
-
id: "duration",
|
|
1027
|
-
label: E("duration"),
|
|
1028
|
-
icon: /* @__PURE__ */ e(wn, {}),
|
|
1029
|
-
value: `${f.durationMin} ${E("durationUnit")}`
|
|
1030
|
-
},
|
|
1031
|
-
f.isTelehealth && {
|
|
1032
|
-
id: "type",
|
|
1033
|
-
label: E("type"),
|
|
1034
|
-
icon: /* @__PURE__ */ e(lt, {}),
|
|
1035
|
-
value: E("typeTelehealth")
|
|
1036
|
-
},
|
|
1037
|
-
r && {
|
|
1038
|
-
id: "operator",
|
|
1039
|
-
label: d(m("operator")),
|
|
1040
|
-
/* A person, as on the grid: the avatar fills the icon slot. */
|
|
1041
|
-
icon: /* @__PURE__ */ e(Ze, { name: r.name, src: r.avatarSrc, size: "xs" }),
|
|
1042
|
-
value: r.name
|
|
1043
|
-
},
|
|
1044
|
-
s && {
|
|
1045
|
-
id: "chair",
|
|
1046
|
-
label: d(m("chair")),
|
|
1047
|
-
icon: /* @__PURE__ */ e(It, {}),
|
|
1048
|
-
value: /* @__PURE__ */ e($e, { variant: "neutral", size: "sm", leading: /* @__PURE__ */ e(It, {}), children: s.name })
|
|
1049
|
-
},
|
|
1050
|
-
f.branchLabel && {
|
|
1051
|
-
id: "branch",
|
|
1052
|
-
label: E("branch"),
|
|
1053
|
-
icon: /* @__PURE__ */ e(xn, {}),
|
|
1054
|
-
value: f.branchLabel
|
|
1055
|
-
},
|
|
1056
|
-
y && {
|
|
1057
|
-
id: "createdBy",
|
|
1058
|
-
label: d(m("createdBy")),
|
|
1059
|
-
icon: /* @__PURE__ */ e(Ze, { name: y.actor, size: "xs" }),
|
|
1060
|
-
value: /* @__PURE__ */ p("span", { className: "ds:inline-flex ds:flex-wrap ds:items-baseline ds:gap-x-[var(--spacing-xs)]", children: [
|
|
1061
|
-
/* @__PURE__ */ e("span", { children: y.actor }),
|
|
1062
|
-
" ",
|
|
1063
|
-
/* @__PURE__ */ e("span", { className: "ds:text-[color:var(--muted-foreground)]", children: /* @__PURE__ */ e(
|
|
1064
|
-
St,
|
|
1065
|
-
{
|
|
1066
|
-
value: y.atIso,
|
|
1067
|
-
format: "absolute",
|
|
1068
|
-
shape: "bare",
|
|
1069
|
-
locale: n,
|
|
1070
|
-
absoluteFormat: at
|
|
1071
|
-
}
|
|
1072
|
-
) })
|
|
1073
|
-
] })
|
|
1074
|
-
},
|
|
1075
|
-
h && u && {
|
|
1076
|
-
id: "series",
|
|
1077
|
-
label: d(m("seriesLabel")),
|
|
1078
|
-
icon: /* @__PURE__ */ e(Ht, {}),
|
|
1079
|
-
value: u.count === void 0 ? h : d(m("seriesRule"), {
|
|
1080
|
-
frequency: h,
|
|
1081
|
-
count: u.count
|
|
1082
|
-
})
|
|
1083
|
-
}
|
|
1084
|
-
]
|
|
1085
|
-
}
|
|
1086
|
-
),
|
|
1087
|
-
S ? /* @__PURE__ */ p(
|
|
1088
|
-
"div",
|
|
1089
|
-
{
|
|
1090
|
-
"data-block": "booking",
|
|
1091
|
-
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
1092
|
-
children: [
|
|
1093
|
-
/* @__PURE__ */ e("h4", { className: "ds:m-0 type-label ds:text-[color:var(--muted-foreground)]", children: d(m("sectionBooking")) }),
|
|
1094
|
-
/* @__PURE__ */ e(Rt, { rows: A })
|
|
1095
|
-
]
|
|
1096
|
-
}
|
|
1097
|
-
) : null
|
|
1098
|
-
]
|
|
1099
|
-
}
|
|
1100
|
-
);
|
|
1101
|
-
}
|
|
1102
|
-
function da({
|
|
1103
|
-
details: t,
|
|
1104
|
-
locale: n,
|
|
1105
|
-
currency: o,
|
|
1106
|
-
privacy: r = !1
|
|
1107
|
-
}) {
|
|
1108
|
-
const { t: s } = $("ui"), { care: i } = t, l = r || i == null ? void 0 : i.plan;
|
|
1109
|
-
return !i || !l && i.lines.length === 0 ? null : /* @__PURE__ */ p(
|
|
1110
|
-
ne,
|
|
1111
|
-
{
|
|
1112
|
-
"data-card": "treatments",
|
|
1113
|
-
title: s(m("sectionTreatments")),
|
|
1114
|
-
headingLevel: 3,
|
|
1115
|
-
children: [
|
|
1116
|
-
l ? /* @__PURE__ */ p("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-item", children: [
|
|
1117
|
-
/* @__PURE__ */ e(
|
|
1118
|
-
Wt,
|
|
1119
|
-
{
|
|
1120
|
-
"aria-hidden": "true",
|
|
1121
|
-
className: "ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)]"
|
|
1122
|
-
}
|
|
1123
|
-
),
|
|
1124
|
-
l.number ? s(m("planLine"), { number: l.number, name: l.name }) : l.name
|
|
1125
|
-
] }) : null,
|
|
1126
|
-
i.lines.length > 0 ? /* @__PURE__ */ e(
|
|
1127
|
-
Bt,
|
|
1128
|
-
{
|
|
1129
|
-
lines: i.lines.map(({ entryId: b, careId: d, ...f }) => ({
|
|
1130
|
-
id: b,
|
|
1131
|
-
...f
|
|
1132
|
-
})),
|
|
1133
|
-
locale: n,
|
|
1134
|
-
currency: o
|
|
1135
|
-
}
|
|
1136
|
-
) : null
|
|
1137
|
-
]
|
|
1138
|
-
}
|
|
1139
|
-
);
|
|
1140
|
-
}
|
|
1141
|
-
const Pt = 3;
|
|
1142
|
-
function la({
|
|
1143
|
-
preview: t,
|
|
1144
|
-
onOpenNotes: n,
|
|
1145
|
-
locale: o
|
|
1146
|
-
}) {
|
|
1147
|
-
const { t: r } = $("ui"), s = Ye(), i = t.status ?? "ready", l = M(!1);
|
|
1148
|
-
te(() => {
|
|
1149
|
-
l.current && (i !== "loading" && (l.current = !1), Se(s));
|
|
1150
|
-
}, [i, s]);
|
|
1151
|
-
const b = t.total ?? (i === "ready" ? t.notes.length : null), d = Math.max(0, (b ?? 0) - Pt), f = d > 0 ? r(m("notesMore"), { n: d }) : r(m("notesPreviewOpen"));
|
|
1152
|
-
return /* @__PURE__ */ p(
|
|
1153
|
-
ne,
|
|
1154
|
-
{
|
|
1155
|
-
"data-card": "notes",
|
|
1156
|
-
headingId: s,
|
|
1157
|
-
headingLevel: 3,
|
|
1158
|
-
title: b === null ? r("notesPanel.title") : r(m("notesPreviewTitle"), { count: b }),
|
|
1159
|
-
headerAction: n && (b ?? 0) > 0 ? /* @__PURE__ */ p("span", { className: "ds:relative ds:inline-flex", children: [
|
|
1160
|
-
/* @__PURE__ */ e(
|
|
1161
|
-
Lt,
|
|
1162
|
-
{
|
|
1163
|
-
icon: /* @__PURE__ */ e(Nn, { "aria-hidden": "true" }),
|
|
1164
|
-
intent: "outline",
|
|
1165
|
-
size: "sm",
|
|
1166
|
-
"data-action": "open-patient-notes",
|
|
1167
|
-
"aria-label": f,
|
|
1168
|
-
tooltip: f,
|
|
1169
|
-
onClick: () => n()
|
|
1170
|
-
}
|
|
1171
|
-
),
|
|
1172
|
-
d > 0 ? (
|
|
1173
|
-
/* Decorative: the button's name already says the count. */
|
|
1174
|
-
/* @__PURE__ */ e(
|
|
1175
|
-
hn,
|
|
1176
|
-
{
|
|
1177
|
-
variant: "outline",
|
|
1178
|
-
size: "sm",
|
|
1179
|
-
background: "surface",
|
|
1180
|
-
count: d,
|
|
1181
|
-
"aria-hidden": "true",
|
|
1182
|
-
className: "ds:pointer-events-none ds:absolute ds:-top-[var(--spacing-2xs)] ds:-end-[var(--spacing-2xs)]"
|
|
1183
|
-
}
|
|
1184
|
-
)
|
|
1185
|
-
) : null
|
|
1186
|
-
] }) : void 0,
|
|
1187
|
-
children: [
|
|
1188
|
-
i === "error" ? /* @__PURE__ */ p(F, { variant: "error", children: [
|
|
1189
|
-
/* @__PURE__ */ e(F.Description, { children: r("notesPanel.loadError") }),
|
|
1190
|
-
t.onRetry ? /* @__PURE__ */ e(F.Action, { children: /* @__PURE__ */ e(
|
|
1191
|
-
O,
|
|
1192
|
-
{
|
|
1193
|
-
intent: "secondary",
|
|
1194
|
-
size: "sm",
|
|
1195
|
-
onClick: () => {
|
|
1196
|
-
var c;
|
|
1197
|
-
l.current = !0, (c = t.onRetry) == null || c.call(t);
|
|
1198
|
-
},
|
|
1199
|
-
children: r("notesPanel.retry")
|
|
1200
|
-
}
|
|
1201
|
-
) }) : null
|
|
1202
|
-
] }) : null,
|
|
1203
|
-
t.notes.length === 0 && i === "loading" ? /* @__PURE__ */ p(Q, { children: [
|
|
1204
|
-
/* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: r("notesPanel.loading") }),
|
|
1205
|
-
/* @__PURE__ */ e(Xe, { notes: [], loading: !0, loadingRows: 2 })
|
|
1206
|
-
] }) : i !== "error" || t.notes.length > 0 ? (
|
|
1207
|
-
/* A note click, or Enter or Space on it, goes straight to that note
|
|
1208
|
-
in the Notes tool; the header button opens the tool at the top. */
|
|
1209
|
-
/* @__PURE__ */ e(
|
|
1210
|
-
Xe,
|
|
1211
|
-
{
|
|
1212
|
-
notes: t.notes,
|
|
1213
|
-
maxItems: Pt,
|
|
1214
|
-
locale: o,
|
|
1215
|
-
"aria-labelledby": s,
|
|
1216
|
-
onNoteActivate: n,
|
|
1217
|
-
emptyState: /* @__PURE__ */ e("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: r(m("notesPreviewEmpty")) })
|
|
1218
|
-
}
|
|
1219
|
-
)
|
|
1220
|
-
) : null
|
|
1221
|
-
]
|
|
1222
|
-
}
|
|
1223
|
-
);
|
|
1224
|
-
}
|
|
1225
|
-
const ca = it("ds:flex ds:h-full ds:min-h-0 ds:flex-col"), ua = it(
|
|
1226
|
-
"ds:flex ds:shrink-0 ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:border-t ds:border-[color:var(--border)] ds:p-[var(--spacing-sm)]"
|
|
1227
|
-
), ma = it(
|
|
1228
|
-
"ds:shrink-0 ds:rounded-[var(--radius-md)] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
1229
|
-
), G = "ds:sm:[min-block-size:var(--accessible-target-floor,0px)]", pa = "ds:sm:[&>button]:[min-block-size:var(--accessible-target-floor,0px)]", ha = [
|
|
1230
|
-
"ds:sm:[&_button:has(svg.lucide-ellipsis)]:[min-block-size:var(--accessible-target-floor,0px)]",
|
|
1231
|
-
"ds:[&_button:has(svg.lucide-ellipsis)]:[min-inline-size:var(--accessible-target-floor,auto)]"
|
|
1232
|
-
].join(" "), Gt = ["40%", "33%", "50%", "25%"], fa = [
|
|
1233
|
-
"bill",
|
|
1234
|
-
"folder",
|
|
1235
|
-
"template",
|
|
1236
|
-
"empty",
|
|
1237
|
-
"identification",
|
|
1238
|
-
"webcam"
|
|
1239
|
-
], ga = {
|
|
1240
|
-
bill: /* @__PURE__ */ e(Pn, { "aria-hidden": "true" }),
|
|
1241
|
-
folder: /* @__PURE__ */ e(Rn, { "aria-hidden": "true" }),
|
|
1242
|
-
template: /* @__PURE__ */ e(En, { "aria-hidden": "true" }),
|
|
1243
|
-
empty: /* @__PURE__ */ e(Cn, { "aria-hidden": "true" }),
|
|
1244
|
-
identification: /* @__PURE__ */ e(_n, { "aria-hidden": "true" }),
|
|
1245
|
-
webcam: /* @__PURE__ */ e(Dn, { "aria-hidden": "true" })
|
|
1246
|
-
}, D = (t) => `calendarWorkspace.details.${t}`;
|
|
1247
|
-
function Mt({
|
|
1248
|
-
children: t,
|
|
1249
|
-
startIcon: n,
|
|
1250
|
-
overflowItems: o,
|
|
1251
|
-
"data-action": r,
|
|
1252
|
-
intent: s,
|
|
1253
|
-
background: i,
|
|
1254
|
-
size: l,
|
|
1255
|
-
hideLabel: b
|
|
1256
|
-
}) {
|
|
1257
|
-
return /* @__PURE__ */ p(Oe.Root, { children: [
|
|
1258
|
-
/* @__PURE__ */ e(sn, { label: t, side: "top", children: /* @__PURE__ */ e(Oe.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1259
|
-
O,
|
|
1260
|
-
{
|
|
1261
|
-
intent: s,
|
|
1262
|
-
background: i,
|
|
1263
|
-
size: l,
|
|
1264
|
-
"data-action": r,
|
|
1265
|
-
className: G,
|
|
1266
|
-
startIcon: n,
|
|
1267
|
-
"aria-haspopup": "menu",
|
|
1268
|
-
endIcon: /* @__PURE__ */ e(Tn, { "aria-hidden": "true" }),
|
|
1269
|
-
children: b ? /* @__PURE__ */ e("span", { className: "ds:sr-only", children: t }) : t
|
|
1270
|
-
}
|
|
1271
|
-
) }) }),
|
|
1272
|
-
/* @__PURE__ */ e(Oe.Content, { align: "end", children: o.map((d) => /* @__PURE__ */ e(
|
|
1273
|
-
Oe.Item,
|
|
1274
|
-
{
|
|
1275
|
-
"data-action": d.action,
|
|
1276
|
-
startIcon: d.icon,
|
|
1277
|
-
onSelect: d.onSelect,
|
|
1278
|
-
children: d.label
|
|
1279
|
-
},
|
|
1280
|
-
d.label
|
|
1281
|
-
)) })
|
|
1282
|
-
] });
|
|
1283
|
-
}
|
|
1284
|
-
function va() {
|
|
1285
|
-
const { t } = $("ui");
|
|
1286
|
-
return /* @__PURE__ */ p(Q, { children: [
|
|
1287
|
-
/* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: t("common.loading") }),
|
|
1288
|
-
/* @__PURE__ */ p(
|
|
1289
|
-
"div",
|
|
1290
|
-
{
|
|
1291
|
-
"aria-hidden": "true",
|
|
1292
|
-
className: "ds:flex ds:min-h-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)] ds:overflow-hidden ds:p-[var(--spacing-md)] ds:[&>*]:shrink-0",
|
|
1293
|
-
children: [
|
|
1294
|
-
/* @__PURE__ */ e(
|
|
1295
|
-
_t,
|
|
1296
|
-
{
|
|
1297
|
-
name: "",
|
|
1298
|
-
loading: !0,
|
|
1299
|
-
surface: "elevated",
|
|
1300
|
-
density: "compact"
|
|
1301
|
-
}
|
|
1302
|
-
),
|
|
1303
|
-
/* @__PURE__ */ p(ne, { title: t(D("sectionAppointment")), headingLevel: 3, children: [
|
|
1304
|
-
/* @__PURE__ */ e(zt, { loading: !0, maxLines: 2 }),
|
|
1305
|
-
/* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: Gt.map((n, o) => /* @__PURE__ */ p(
|
|
1306
|
-
"div",
|
|
1307
|
-
{
|
|
1308
|
-
className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
1309
|
-
children: [
|
|
1310
|
-
/* @__PURE__ */ e(
|
|
1311
|
-
ue,
|
|
1312
|
-
{
|
|
1313
|
-
variant: "rounded",
|
|
1314
|
-
stagger: o + 2,
|
|
1315
|
-
width: "var(--spacing-md)",
|
|
1316
|
-
height: "var(--spacing-md)",
|
|
1317
|
-
className: "ds:shrink-0"
|
|
1318
|
-
}
|
|
1319
|
-
),
|
|
1320
|
-
/* @__PURE__ */ e(
|
|
1321
|
-
ue,
|
|
1322
|
-
{
|
|
1323
|
-
variant: "text",
|
|
1324
|
-
size: "sm",
|
|
1325
|
-
stagger: o + 2,
|
|
1326
|
-
width: n
|
|
1327
|
-
}
|
|
1328
|
-
)
|
|
1329
|
-
]
|
|
1330
|
-
},
|
|
1331
|
-
n
|
|
1332
|
-
)) })
|
|
1333
|
-
] }),
|
|
1334
|
-
/* @__PURE__ */ e(ne, { title: t("notesPanel.title"), headingLevel: 3, children: /* @__PURE__ */ e(Xe, { notes: [], loading: !0, loadingRows: 2 }) }),
|
|
1335
|
-
/* @__PURE__ */ e(ne, { title: t(D("sectionTreatments")), headingLevel: 3, children: /* @__PURE__ */ e(Bt, { lines: [], loading: !0 }) })
|
|
1336
|
-
]
|
|
1337
|
-
}
|
|
1338
|
-
),
|
|
1339
|
-
/* @__PURE__ */ p(
|
|
1340
|
-
"div",
|
|
1341
|
-
{
|
|
1342
|
-
"aria-hidden": "true",
|
|
1343
|
-
className: "ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-sm)] ds:border-t ds:border-[color:var(--border)] ds:p-[var(--spacing-md)]",
|
|
1344
|
-
children: [
|
|
1345
|
-
/* @__PURE__ */ e(ue, { variant: "rounded", width: "33%", height: "var(--spacing-xl)" }),
|
|
1346
|
-
/* @__PURE__ */ e(
|
|
1347
|
-
ue,
|
|
1348
|
-
{
|
|
1349
|
-
variant: "rounded",
|
|
1350
|
-
stagger: 1,
|
|
1351
|
-
height: "var(--spacing-xl)",
|
|
1352
|
-
className: "ds:flex-1"
|
|
1353
|
-
}
|
|
1354
|
-
)
|
|
1355
|
-
]
|
|
1356
|
-
}
|
|
1357
|
-
)
|
|
1358
|
-
] });
|
|
1359
|
-
}
|
|
1360
|
-
function ya({
|
|
1361
|
-
history: t,
|
|
1362
|
-
locale: n,
|
|
1363
|
-
onRetry: o,
|
|
1364
|
-
noteUnrecordedEdits: r,
|
|
1365
|
-
privacy: s
|
|
1366
|
-
}) {
|
|
1367
|
-
var g;
|
|
1368
|
-
const { t: i } = $("ui"), l = t.status ?? (t.entries ? "ready" : "loading"), b = l === "error" ? void 0 : t.entries, d = l === "loading" || l !== "error" && !b, [f, c] = B(!1);
|
|
1369
|
-
pe(() => c(!0), []);
|
|
1370
|
-
let C = "";
|
|
1371
|
-
d ? C = i("common.loading") : b && (C = b.length === 0 ? i(D("historyEmpty")) : i(D("historyLoaded"), { n: b.length }));
|
|
1372
|
-
let E;
|
|
1373
|
-
return l === "error" ? E = /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1374
|
-
/* @__PURE__ */ e(F, { variant: "error", children: /* @__PURE__ */ e(F.Description, { children: ((g = t.message) == null ? void 0 : g.trim()) || i("emptyState.error.description") }) }),
|
|
1375
|
-
o ? /* @__PURE__ */ e(
|
|
1376
|
-
O,
|
|
1377
|
-
{
|
|
1378
|
-
intent: "outline",
|
|
1379
|
-
"data-action": "retry-history",
|
|
1380
|
-
onClick: () => o(),
|
|
1381
|
-
children: i("emptyState.error.cta")
|
|
1382
|
-
}
|
|
1383
|
-
) : null
|
|
1384
|
-
] }) : d || !b ? E = /* @__PURE__ */ e(
|
|
1385
|
-
"div",
|
|
1386
|
-
{
|
|
1387
|
-
"aria-hidden": "true",
|
|
1388
|
-
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
1389
|
-
children: Gt.slice(0, 3).map((P, a) => /* @__PURE__ */ p(
|
|
1390
|
-
"div",
|
|
1391
|
-
{
|
|
1392
|
-
className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)]",
|
|
1393
|
-
children: [
|
|
1394
|
-
/* @__PURE__ */ e(
|
|
1395
|
-
ue,
|
|
1396
|
-
{
|
|
1397
|
-
variant: "circular",
|
|
1398
|
-
stagger: a,
|
|
1399
|
-
width: "var(--spacing-xl)",
|
|
1400
|
-
height: "var(--spacing-xl)",
|
|
1401
|
-
className: "ds:shrink-0"
|
|
1402
|
-
}
|
|
1403
|
-
),
|
|
1404
|
-
/* @__PURE__ */ e(
|
|
1405
|
-
ue,
|
|
1406
|
-
{
|
|
1407
|
-
variant: "rounded",
|
|
1408
|
-
stagger: a,
|
|
1409
|
-
width: P,
|
|
1410
|
-
height: "var(--spacing-2xl)"
|
|
1411
|
-
}
|
|
1412
|
-
)
|
|
1413
|
-
]
|
|
1414
|
-
},
|
|
1415
|
-
P
|
|
1416
|
-
))
|
|
1417
|
-
}
|
|
1418
|
-
) : E = /* @__PURE__ */ e(
|
|
1419
|
-
ea,
|
|
1420
|
-
{
|
|
1421
|
-
history: b,
|
|
1422
|
-
locale: n,
|
|
1423
|
-
noteUnrecordedEdits: r,
|
|
1424
|
-
privacy: s
|
|
1425
|
-
}
|
|
1426
|
-
), /* @__PURE__ */ p(Q, { children: [
|
|
1427
|
-
/* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: f ? C : "" }),
|
|
1428
|
-
E
|
|
1429
|
-
] });
|
|
1430
|
-
}
|
|
1431
|
-
function ba({
|
|
1432
|
-
read: t,
|
|
1433
|
-
refreshing: n,
|
|
1434
|
-
currency: o,
|
|
1435
|
-
now: r,
|
|
1436
|
-
locale: s,
|
|
1437
|
-
shownTitle: i,
|
|
1438
|
-
headingId: l,
|
|
1439
|
-
enter: b,
|
|
1440
|
-
live: d,
|
|
1441
|
-
statusControl: f,
|
|
1442
|
-
patientId: c = ((Ee) => (Ee = t.patient) == null ? void 0 : Ee.id)(),
|
|
1443
|
-
operator: C,
|
|
1444
|
-
chair: E,
|
|
1445
|
-
privacy: g = !1,
|
|
1446
|
-
privacyTitle: P,
|
|
1447
|
-
mapsLink: a,
|
|
1448
|
-
notesPreview: u,
|
|
1449
|
-
onOpenNotes: k,
|
|
1450
|
-
history: h,
|
|
1451
|
-
onOpenHistory: N,
|
|
1452
|
-
noteUnrecordedEdits: A = !1,
|
|
1453
|
-
readOnly: S = !1,
|
|
1454
|
-
onStatusChange: y,
|
|
1455
|
-
allowedStatuses: v = At,
|
|
1456
|
-
onDescriptionChange: L,
|
|
1457
|
-
onEdit: K,
|
|
1458
|
-
onMove: ae,
|
|
1459
|
-
onCopy: V,
|
|
1460
|
-
onDelete: se,
|
|
1461
|
-
onJoinTelehealth: Ie,
|
|
1462
|
-
onWhatsApp: Te,
|
|
1463
|
-
whatsappUrl: De,
|
|
1464
|
-
createTaskUrl: Ce,
|
|
1465
|
-
documents: X
|
|
1466
|
-
}) {
|
|
1467
|
-
var yt, bt;
|
|
1468
|
-
const { t: w } = $("ui"), { eventId: z } = t, [He] = B(b), ie = { details: t, locale: s, currency: o }, I = h ? h.eventId !== void 0 && h.eventId !== z ? { status: "loading" } : h : t.history ? { entries: t.history } : void 0, Re = (u == null ? void 0 : u.patientId) === void 0 || u.patientId === c, oe = u ? Re ? u : c ? { notes: [], status: "loading", total: null } : void 0 : void 0, J = !!L && !S && !g, [fe, Y] = B(!1), [ge, U] = B(!1), Z = fe && I !== void 0, Pe = ge && J, ve = () => {
|
|
1469
|
-
Z || !I || (Y(!0), N == null || N(z));
|
|
1470
|
-
}, Me = M({ history: !1, editor: !1 });
|
|
1471
|
-
te(() => {
|
|
1472
|
-
const x = Me.current;
|
|
1473
|
-
Me.current = { history: Z, editor: Pe };
|
|
1474
|
-
const ce = x.history && I === void 0, kt = x.editor && !J;
|
|
1475
|
-
ce && Y(!1), kt && U(!1), (ce || kt) && Se(l);
|
|
1476
|
-
});
|
|
1477
|
-
const re = M(null), _ = M(!1), ye = (I == null ? void 0 : I.status) ?? (I != null && I.entries ? "ready" : "loading");
|
|
1478
|
-
te(() => {
|
|
1479
|
-
_.current && (ye !== "loading" && (_.current = !1), tt(re.current));
|
|
1480
|
-
}, [ye]);
|
|
1481
|
-
const [q, be] = B(t.appointment.name ?? "");
|
|
1482
|
-
pe(() => {
|
|
1483
|
-
be(t.appointment.name ?? "");
|
|
1484
|
-
}, [t.appointment.name]);
|
|
1485
|
-
const [ke, ee] = B(""), [de, we] = B(!1), [T, H] = B(), le = M(null);
|
|
1486
|
-
pe(() => {
|
|
1487
|
-
ge && (ee(q), H(void 0));
|
|
1488
|
-
}, [ge]);
|
|
1489
|
-
const Le = async () => {
|
|
1490
|
-
if (!L) return;
|
|
1491
|
-
const x = ke.trim();
|
|
1492
|
-
we(!0), H(void 0);
|
|
1493
|
-
try {
|
|
1494
|
-
await L(x, z), be(x), U(!1);
|
|
1495
|
-
} catch (ce) {
|
|
1496
|
-
H(
|
|
1497
|
-
Qe(ce, w(D("descriptionSaveFailed")))
|
|
1498
|
-
);
|
|
1499
|
-
} finally {
|
|
1500
|
-
we(!1);
|
|
1501
|
-
}
|
|
1502
|
-
}, [W, We] = B(t.appointment.status);
|
|
1503
|
-
pe(() => {
|
|
1504
|
-
We(t.appointment.status);
|
|
1505
|
-
}, [t.appointment.status]);
|
|
1506
|
-
const ct = M(n);
|
|
1507
|
-
te(() => {
|
|
1508
|
-
const x = ct.current && !n;
|
|
1509
|
-
ct.current = n, x && (We(t.appointment.status), be(t.appointment.name ?? ""));
|
|
1510
|
-
}, [n]);
|
|
1511
|
-
const ze = At.filter(
|
|
1512
|
-
(x) => v.includes(x)
|
|
1513
|
-
), xe = ot(W, {
|
|
1514
|
-
statuses: ze,
|
|
1515
|
-
/* Shown so the control can say it, but not a choice. */
|
|
1516
|
-
disabledStatuses: W && !ze.includes(W) ? [W] : []
|
|
1517
|
-
}), Ne = !!y && !S && ze.some((x) => x !== W), Vt = async (x) => {
|
|
1518
|
-
if (!(!y || !rn(x))) {
|
|
1519
|
-
try {
|
|
1520
|
-
await y(x, z);
|
|
1521
|
-
} catch (ce) {
|
|
1522
|
-
throw new Error(Qe(ce, w(D("statusSaveFailed"))));
|
|
1523
|
-
}
|
|
1524
|
-
We(x);
|
|
1525
|
-
}
|
|
1526
|
-
}, ut = g ? void 0 : De, mt = fa.filter(
|
|
1527
|
-
(x) => X == null ? void 0 : X.kinds.includes(x)
|
|
1528
|
-
), Yt = (((yt = t.care) == null ? void 0 : yt.lines.length) ?? 0) > 0, pt = c !== void 0 && c !== "", je = w(D("status")), ht = `${je}: ${xe.option.label}`, qe = M(null), ft = M(Ne);
|
|
1529
|
-
te(() => {
|
|
1530
|
-
const x = ft.current && !Ne;
|
|
1531
|
-
ft.current = Ne, x && (qe.current ? tt(qe.current) : Se(l));
|
|
1532
|
-
});
|
|
1533
|
-
const gt = Ne ? /* @__PURE__ */ e(
|
|
1534
|
-
on,
|
|
1535
|
-
{
|
|
1536
|
-
ref: f,
|
|
1537
|
-
value: xe.value,
|
|
1538
|
-
options: xe.options,
|
|
1539
|
-
size: "sm",
|
|
1540
|
-
workflowLabel: je,
|
|
1541
|
-
className: `ds:[&>button]:bg-[color:var(--background)] ${pa}`,
|
|
1542
|
-
"aria-label": ht,
|
|
1543
|
-
onValueChange: Vt
|
|
1544
|
-
}
|
|
1545
|
-
) : W ? (
|
|
1546
|
-
/* Named as the control is, "Status: Confirmed": the small display
|
|
1547
|
-
prints the value alone. */
|
|
1548
|
-
/* @__PURE__ */ e(
|
|
1549
|
-
"div",
|
|
1550
|
-
{
|
|
1551
|
-
ref: qe,
|
|
1552
|
-
role: "group",
|
|
1553
|
-
"aria-label": ht,
|
|
1554
|
-
tabIndex: -1,
|
|
1555
|
-
"data-status-display": "",
|
|
1556
|
-
className: ma(),
|
|
1557
|
-
children: /* @__PURE__ */ e(
|
|
1558
|
-
Ft,
|
|
1559
|
-
{
|
|
1560
|
-
value: xe.value,
|
|
1561
|
-
size: "sm",
|
|
1562
|
-
workflowLabel: je,
|
|
1563
|
-
option: xe.option
|
|
1564
|
-
}
|
|
1565
|
-
)
|
|
1566
|
-
}
|
|
1567
|
-
)
|
|
1568
|
-
) : null, j = [];
|
|
1569
|
-
Ie && j.push([
|
|
1570
|
-
"join-telehealth",
|
|
1571
|
-
/* @__PURE__ */ e(
|
|
1572
|
-
O,
|
|
1573
|
-
{
|
|
1574
|
-
intent: "primary",
|
|
1575
|
-
"data-action": "join-telehealth",
|
|
1576
|
-
className: G,
|
|
1577
|
-
startIcon: /* @__PURE__ */ e(lt, { "aria-hidden": "true" }),
|
|
1578
|
-
onClick: () => Ie(z),
|
|
1579
|
-
children: w(D("joinTelehealth"))
|
|
1580
|
-
},
|
|
1581
|
-
"join"
|
|
1582
|
-
)
|
|
1583
|
-
]), !S && K && j.push([
|
|
1584
|
-
"edit-appointment",
|
|
1585
|
-
/* @__PURE__ */ e(
|
|
1586
|
-
O,
|
|
1587
|
-
{
|
|
1588
|
-
"data-action": "edit-appointment",
|
|
1589
|
-
className: G,
|
|
1590
|
-
startIcon: /* @__PURE__ */ e(me, { "aria-hidden": "true" }),
|
|
1591
|
-
onClick: () => K(z),
|
|
1592
|
-
children: w("calendarWorkspace.editor.editTitle")
|
|
1593
|
-
},
|
|
1594
|
-
"edit"
|
|
1595
|
-
)
|
|
1596
|
-
]), !S && ae && j.push([
|
|
1597
|
-
"move-appointment",
|
|
1598
|
-
/* @__PURE__ */ e(
|
|
1599
|
-
O,
|
|
1600
|
-
{
|
|
1601
|
-
"data-action": "move-appointment",
|
|
1602
|
-
className: G,
|
|
1603
|
-
startIcon: /* @__PURE__ */ e(et, { "aria-hidden": "true" }),
|
|
1604
|
-
onClick: () => ae(z),
|
|
1605
|
-
children: w(D("move"))
|
|
1606
|
-
},
|
|
1607
|
-
"move"
|
|
1608
|
-
)
|
|
1609
|
-
]), !S && V && j.push([
|
|
1610
|
-
"copy-appointment",
|
|
1611
|
-
Yt ? /* @__PURE__ */ e(
|
|
1612
|
-
Mt,
|
|
1613
|
-
{
|
|
1614
|
-
"data-action": "copy-appointment",
|
|
1615
|
-
"data-overflow-tip": !1,
|
|
1616
|
-
startIcon: /* @__PURE__ */ e(Dt, { "aria-hidden": "true" }),
|
|
1617
|
-
overflowItems: [
|
|
1618
|
-
{
|
|
1619
|
-
label: w("calendarWorkspace.editor.duplicateAppointmentOnly"),
|
|
1620
|
-
icon: /* @__PURE__ */ e(An, { "aria-hidden": "true" }),
|
|
1621
|
-
action: "copy-appointment-only",
|
|
1622
|
-
onSelect: () => V(!1, z)
|
|
1623
|
-
},
|
|
1624
|
-
{
|
|
1625
|
-
label: w("calendarWorkspace.editor.duplicateWithTreatments"),
|
|
1626
|
-
icon: /* @__PURE__ */ e(Wt, { "aria-hidden": "true" }),
|
|
1627
|
-
action: "copy-appointment-with-treatments",
|
|
1628
|
-
onSelect: () => V(!0, z)
|
|
1629
|
-
}
|
|
1630
|
-
],
|
|
1631
|
-
children: w(D("copy"))
|
|
1632
|
-
},
|
|
1633
|
-
"copy"
|
|
1634
|
-
) : /* @__PURE__ */ e(
|
|
1635
|
-
O,
|
|
1636
|
-
{
|
|
1637
|
-
"data-action": "copy-appointment",
|
|
1638
|
-
className: G,
|
|
1639
|
-
startIcon: /* @__PURE__ */ e(Dt, { "aria-hidden": "true" }),
|
|
1640
|
-
onClick: () => V(!1, z),
|
|
1641
|
-
children: w(D("copy"))
|
|
1642
|
-
},
|
|
1643
|
-
"copy"
|
|
1644
|
-
)
|
|
1645
|
-
]), X && mt.length > 0 && j.push([
|
|
1646
|
-
"open-create-document",
|
|
1647
|
-
/* @__PURE__ */ e(
|
|
1648
|
-
Mt,
|
|
1649
|
-
{
|
|
1650
|
-
"data-action": "open-create-document",
|
|
1651
|
-
"data-overflow-tip": !1,
|
|
1652
|
-
startIcon: /* @__PURE__ */ e(Sn, { "aria-hidden": "true" }),
|
|
1653
|
-
overflowItems: mt.map((x) => ({
|
|
1654
|
-
label: w(D(`documents.${x}`)),
|
|
1655
|
-
icon: ga[x],
|
|
1656
|
-
action: `create-document-${x}`,
|
|
1657
|
-
onSelect: () => X.onCreate(x, z)
|
|
1658
|
-
})),
|
|
1659
|
-
children: w(D("documents.label"))
|
|
1660
|
-
},
|
|
1661
|
-
"documents"
|
|
1662
|
-
)
|
|
1663
|
-
]), Te ? j.push([
|
|
1664
|
-
"open-whatsapp",
|
|
1665
|
-
/* @__PURE__ */ e(
|
|
1666
|
-
O,
|
|
1667
|
-
{
|
|
1668
|
-
"data-action": "open-whatsapp",
|
|
1669
|
-
className: G,
|
|
1670
|
-
startIcon: /* @__PURE__ */ e(Nt, { "aria-hidden": "true" }),
|
|
1671
|
-
onClick: () => Te(z),
|
|
1672
|
-
children: w(D("remindWhatsApp"))
|
|
1673
|
-
},
|
|
1674
|
-
"whatsapp"
|
|
1675
|
-
)
|
|
1676
|
-
]) : ut && j.push([
|
|
1677
|
-
"open-whatsapp",
|
|
1678
|
-
/* @__PURE__ */ e(
|
|
1679
|
-
O,
|
|
1680
|
-
{
|
|
1681
|
-
asChild: !0,
|
|
1682
|
-
"data-action": "open-whatsapp",
|
|
1683
|
-
className: G,
|
|
1684
|
-
startIcon: /* @__PURE__ */ e(Nt, { "aria-hidden": "true" }),
|
|
1685
|
-
children: /* @__PURE__ */ e("a", { href: ut, target: "_blank", rel: "noopener noreferrer", children: w(D("remindWhatsApp")) })
|
|
1686
|
-
},
|
|
1687
|
-
"whatsapp"
|
|
1688
|
-
)
|
|
1689
|
-
]), Ce && j.push([
|
|
1690
|
-
"create-task",
|
|
1691
|
-
/* @__PURE__ */ e(
|
|
1692
|
-
O,
|
|
1693
|
-
{
|
|
1694
|
-
asChild: !0,
|
|
1695
|
-
"data-action": "create-task",
|
|
1696
|
-
className: G,
|
|
1697
|
-
startIcon: /* @__PURE__ */ e(In, { "aria-hidden": "true" }),
|
|
1698
|
-
children: /* @__PURE__ */ e("a", { href: Ce, children: w(D("createTask")) })
|
|
1699
|
-
},
|
|
1700
|
-
"task"
|
|
1701
|
-
)
|
|
1702
|
-
]), !S && se && j.push([
|
|
1703
|
-
"delete-appointment",
|
|
1704
|
-
/* @__PURE__ */ e(
|
|
1705
|
-
O,
|
|
1706
|
-
{
|
|
1707
|
-
intent: "destructiveOutline",
|
|
1708
|
-
"data-action": "delete-appointment",
|
|
1709
|
-
className: G,
|
|
1710
|
-
startIcon: /* @__PURE__ */ e($t, { "aria-hidden": "true" }),
|
|
1711
|
-
onClick: () => se(z),
|
|
1712
|
-
children: w("calendarWorkspace.editor.delete")
|
|
1713
|
-
},
|
|
1714
|
-
"delete"
|
|
1715
|
-
)
|
|
1716
|
-
]);
|
|
1717
|
-
const Ke = j.map(([, x]) => x);
|
|
1718
|
-
d.current = {
|
|
1719
|
-
status: W ?? null,
|
|
1720
|
-
allowed: Ne ? ze : [],
|
|
1721
|
-
offered: j.map(([x]) => x),
|
|
1722
|
-
historyAvailable: I !== void 0,
|
|
1723
|
-
historyOpen: Z,
|
|
1724
|
-
openHistory: ve,
|
|
1725
|
-
closeHistory: () => Y(!1)
|
|
1726
|
-
};
|
|
1727
|
-
const vt = w(D("historyBack"));
|
|
1728
|
-
return /* @__PURE__ */ e(
|
|
1729
|
-
"div",
|
|
1730
|
-
{
|
|
1731
|
-
className: `ds:flex ds:min-h-0 ds:flex-1 ds:flex-col ${He ? nn : ""}`,
|
|
1732
|
-
children: /* @__PURE__ */ p(Ge.Host, { children: [
|
|
1733
|
-
/* @__PURE__ */ e(
|
|
1734
|
-
Ot,
|
|
1735
|
-
{
|
|
1736
|
-
title: i,
|
|
1737
|
-
headingId: l,
|
|
1738
|
-
icon: /* @__PURE__ */ e(rt, { "aria-hidden": "true" }),
|
|
1739
|
-
sticky: !0,
|
|
1740
|
-
divider: !0,
|
|
1741
|
-
actions: I ? /* @__PURE__ */ e(
|
|
1742
|
-
Lt,
|
|
1743
|
-
{
|
|
1744
|
-
size: "sm",
|
|
1745
|
-
intent: "ghost",
|
|
1746
|
-
icon: /* @__PURE__ */ e(Tt, { "aria-hidden": "true" }),
|
|
1747
|
-
"aria-label": w(D("historyAction")),
|
|
1748
|
-
tooltip: w(D("historyAction")),
|
|
1749
|
-
"data-action": "open-history",
|
|
1750
|
-
onClick: ve
|
|
1751
|
-
}
|
|
1752
|
-
) : void 0
|
|
1753
|
-
}
|
|
1754
|
-
),
|
|
1755
|
-
/* @__PURE__ */ e(
|
|
1756
|
-
"div",
|
|
1757
|
-
{
|
|
1758
|
-
tabIndex: 0,
|
|
1759
|
-
"aria-busy": n || void 0,
|
|
1760
|
-
className: "ds:[min-block-size:0] ds:flex-1 ds:overflow-y-auto",
|
|
1761
|
-
children: /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
|
|
1762
|
-
g ? /* @__PURE__ */ e(en, { mask: P }) : t.patient ? /* @__PURE__ */ e(oa, { ...ie, now: r, mapsLink: a }) : (
|
|
1763
|
-
/* No patient card to carry the identity: a patient-less, an
|
|
1764
|
-
unassigned or an unresolved booking keeps the strip. */
|
|
1765
|
-
/* @__PURE__ */ e(
|
|
1766
|
-
aa,
|
|
1767
|
-
{
|
|
1768
|
-
name: t.appointment.title.trim() ? t.appointment.title : w(D("patientNotLoaded")),
|
|
1769
|
-
unresolved: pt,
|
|
1770
|
-
status: W,
|
|
1771
|
-
flags: {
|
|
1772
|
-
isTelehealth: t.appointment.isTelehealth,
|
|
1773
|
-
isBookedOnline: t.appointment.bookedOnline,
|
|
1774
|
-
isRecurring: t.appointment.recurrence !== void 0,
|
|
1775
|
-
hasUnassignedPatient: t.appointment.bookedOnline && !pt,
|
|
1776
|
-
hasHighlightedAnamnesis: !1,
|
|
1777
|
-
hasBillableAmount: (((bt = t.money) == null ? void 0 : bt.billableAmount) ?? 0) > 0
|
|
1778
|
-
},
|
|
1779
|
-
locale: s
|
|
1780
|
-
}
|
|
1781
|
-
)
|
|
1782
|
-
),
|
|
1783
|
-
/* @__PURE__ */ e(
|
|
1784
|
-
ra,
|
|
1785
|
-
{
|
|
1786
|
-
...ie,
|
|
1787
|
-
operator: C,
|
|
1788
|
-
chair: E,
|
|
1789
|
-
privacy: g,
|
|
1790
|
-
history: (I == null ? void 0 : I.status) === "error" || I == null ? void 0 : I.entries,
|
|
1791
|
-
description: (
|
|
1792
|
-
/* Not keyed on the text: the pencil must survive a save,
|
|
1793
|
-
so the sub-view can hand focus back to it. An empty
|
|
1794
|
-
read-only description prints nothing. Privacy hides the
|
|
1795
|
-
text and the pencil. */
|
|
1796
|
-
g ? q ? /* @__PURE__ */ e(xt, { block: "description" }) : void 0 : q || L && !S ? /* @__PURE__ */ e(
|
|
1797
|
-
zt,
|
|
1798
|
-
{
|
|
1799
|
-
"data-block": "description",
|
|
1800
|
-
role: "group",
|
|
1801
|
-
"aria-label": w("calendarWorkspace.editor.description"),
|
|
1802
|
-
value: q,
|
|
1803
|
-
editLabel: w(D("editDescription")),
|
|
1804
|
-
onEdit: L && !S ? () => U(!0) : void 0
|
|
1805
|
-
}
|
|
1806
|
-
) : void 0
|
|
1807
|
-
)
|
|
1808
|
-
}
|
|
1809
|
-
),
|
|
1810
|
-
oe && g ? /* @__PURE__ */ e(
|
|
1811
|
-
ne,
|
|
1812
|
-
{
|
|
1813
|
-
"data-card": "notes",
|
|
1814
|
-
title: w("notesPanel.title"),
|
|
1815
|
-
headingLevel: 3,
|
|
1816
|
-
children: /* @__PURE__ */ e(xt, {})
|
|
1817
|
-
}
|
|
1818
|
-
) : oe ? /* @__PURE__ */ e(
|
|
1819
|
-
la,
|
|
1820
|
-
{
|
|
1821
|
-
preview: oe,
|
|
1822
|
-
onOpenNotes: Re ? k : void 0,
|
|
1823
|
-
locale: s
|
|
1824
|
-
}
|
|
1825
|
-
) : null,
|
|
1826
|
-
/* @__PURE__ */ e(da, { ...ie, privacy: g })
|
|
1827
|
-
] })
|
|
1828
|
-
}
|
|
1829
|
-
),
|
|
1830
|
-
gt || Ke.length > 0 ? (
|
|
1831
|
-
/* The body scrolls; the status and the actions stay put. The
|
|
1832
|
-
status keeps its own segment and never folds. The actions fold
|
|
1833
|
-
to icons, then into More, never onto a second line. */
|
|
1834
|
-
/* @__PURE__ */ p("div", { className: ua(), children: [
|
|
1835
|
-
gt,
|
|
1836
|
-
Ke.length > 0 ? /* @__PURE__ */ e(
|
|
1837
|
-
tn,
|
|
1838
|
-
{
|
|
1839
|
-
label: w(D("actionsLabel")),
|
|
1840
|
-
overflow: "menu",
|
|
1841
|
-
collapseToIcons: !0,
|
|
1842
|
-
background: "surface",
|
|
1843
|
-
size: "sm",
|
|
1844
|
-
className: `ds:min-w-0 ds:flex-1 ds:text-end ${ha}`,
|
|
1845
|
-
children: Ke
|
|
1846
|
-
}
|
|
1847
|
-
) : null
|
|
1848
|
-
] })
|
|
1849
|
-
) : null,
|
|
1850
|
-
I ? /* @__PURE__ */ e(
|
|
1851
|
-
Ge,
|
|
1852
|
-
{
|
|
1853
|
-
ref: re,
|
|
1854
|
-
open: Z,
|
|
1855
|
-
icon: /* @__PURE__ */ e(Tt, { "aria-hidden": "true" }),
|
|
1856
|
-
title: w(D("historyTitle")),
|
|
1857
|
-
backLabel: vt,
|
|
1858
|
-
headingLevel: 3,
|
|
1859
|
-
onBack: () => Y(!1),
|
|
1860
|
-
"data-details-subview": "history",
|
|
1861
|
-
children: /* @__PURE__ */ e("div", { className: "ds:-m-[var(--panel-subview-inset)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ e(
|
|
1862
|
-
ya,
|
|
1863
|
-
{
|
|
1864
|
-
history: I,
|
|
1865
|
-
locale: s,
|
|
1866
|
-
noteUnrecordedEdits: A,
|
|
1867
|
-
privacy: g,
|
|
1868
|
-
onRetry: I.onRetry ? () => {
|
|
1869
|
-
var x;
|
|
1870
|
-
_.current = !0, (x = I.onRetry) == null || x.call(I);
|
|
1871
|
-
} : void 0
|
|
1872
|
-
}
|
|
1873
|
-
) })
|
|
1874
|
-
}
|
|
1875
|
-
) : null,
|
|
1876
|
-
J ? /* @__PURE__ */ e(
|
|
1877
|
-
Ge,
|
|
1878
|
-
{
|
|
1879
|
-
open: Pe,
|
|
1880
|
-
icon: /* @__PURE__ */ e(me, { "aria-hidden": "true" }),
|
|
1881
|
-
title: w(D("editDescription")),
|
|
1882
|
-
backLabel: vt,
|
|
1883
|
-
headingLevel: 3,
|
|
1884
|
-
initialFocusRef: le,
|
|
1885
|
-
onBack: () => {
|
|
1886
|
-
de || U(!1);
|
|
1887
|
-
},
|
|
1888
|
-
"data-details-subview": "description",
|
|
1889
|
-
footer: /* @__PURE__ */ p(Q, { children: [
|
|
1890
|
-
/* @__PURE__ */ e(
|
|
1891
|
-
O,
|
|
1892
|
-
{
|
|
1893
|
-
intent: "secondary",
|
|
1894
|
-
disabled: de,
|
|
1895
|
-
onClick: () => U(!1),
|
|
1896
|
-
children: w(D("noteCancel"))
|
|
1897
|
-
}
|
|
1898
|
-
),
|
|
1899
|
-
/* @__PURE__ */ e(
|
|
1900
|
-
O,
|
|
1901
|
-
{
|
|
1902
|
-
intent: "primary",
|
|
1903
|
-
"data-action": "save-description",
|
|
1904
|
-
loading: de,
|
|
1905
|
-
onClick: () => void Le(),
|
|
1906
|
-
children: w(D("descriptionSave"))
|
|
1907
|
-
}
|
|
1908
|
-
)
|
|
1909
|
-
] }),
|
|
1910
|
-
children: /* @__PURE__ */ p("div", { className: "ds:-m-[var(--panel-subview-inset)] ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
|
|
1911
|
-
T ? /* @__PURE__ */ e(F, { variant: "error", children: /* @__PURE__ */ e(F.Description, { children: T }) }) : null,
|
|
1912
|
-
/* @__PURE__ */ e(
|
|
1913
|
-
an,
|
|
1914
|
-
{
|
|
1915
|
-
ref: le,
|
|
1916
|
-
value: ke,
|
|
1917
|
-
minRows: 6,
|
|
1918
|
-
autoResize: !0,
|
|
1919
|
-
"aria-label": w("calendarWorkspace.editor.description"),
|
|
1920
|
-
onChange: (x) => ee(x.target.value)
|
|
1921
|
-
}
|
|
1922
|
-
)
|
|
1923
|
-
] })
|
|
1924
|
-
}
|
|
1925
|
-
) : null
|
|
1926
|
-
] })
|
|
1927
|
-
}
|
|
1928
|
-
);
|
|
1929
|
-
}
|
|
1930
|
-
const ka = Qt(function({
|
|
1931
|
-
state: n,
|
|
1932
|
-
onRetry: o,
|
|
1933
|
-
patientId: r,
|
|
1934
|
-
operator: s,
|
|
1935
|
-
chair: i,
|
|
1936
|
-
currency: l = "EUR",
|
|
1937
|
-
now: b,
|
|
1938
|
-
locale: d,
|
|
1939
|
-
title: f,
|
|
1940
|
-
privacy: c = !1,
|
|
1941
|
-
privacyTitle: C,
|
|
1942
|
-
mapsLink: E,
|
|
1943
|
-
notesPreview: g,
|
|
1944
|
-
onOpenNotes: P,
|
|
1945
|
-
history: a,
|
|
1946
|
-
onOpenHistory: u,
|
|
1947
|
-
noteUnrecordedEdits: k,
|
|
1948
|
-
readOnly: h = !1,
|
|
1949
|
-
onStatusChange: N,
|
|
1950
|
-
allowedStatuses: A,
|
|
1951
|
-
onDescriptionChange: S,
|
|
1952
|
-
onEdit: y,
|
|
1953
|
-
onMove: v,
|
|
1954
|
-
onCopy: L,
|
|
1955
|
-
onDelete: K,
|
|
1956
|
-
onJoinTelehealth: ae,
|
|
1957
|
-
onWhatsApp: V,
|
|
1958
|
-
whatsappUrl: se,
|
|
1959
|
-
createTaskUrl: Ie,
|
|
1960
|
-
documents: Te,
|
|
1961
|
-
id: De,
|
|
1962
|
-
className: Ce,
|
|
1963
|
-
...X
|
|
1964
|
-
}, Ee) {
|
|
1965
|
-
var de, we;
|
|
1966
|
-
const { t: w, i18n: z } = $("ui"), He = Ye(), ie = De ?? He, I = Ye(), Re = d ?? z.language, oe = !c && (f != null && f.trim()) ? f : w(D("region")), J = n.status === "ready" ? n.read : void 0, fe = n.status === "ready" ? n.read.eventId : n.eventId, Y = M(
|
|
1967
|
-
void 0
|
|
1968
|
-
), ge = Y.current !== void 0 && Y.current !== "ready";
|
|
1969
|
-
pe(() => {
|
|
1970
|
-
Y.current = n.status;
|
|
1971
|
-
}, [n.status]);
|
|
1972
|
-
const U = !!o && (n.status === "error" || n.status === "refused" && n.retryable === !0), Z = M(null), Pe = wt(() => Zt(Ee, Z), [Ee]), ve = M(!1);
|
|
1973
|
-
typeof document < "u" && (ve.current = ((de = Z.current) == null ? void 0 : de.contains(document.activeElement)) ?? !1);
|
|
1974
|
-
const Me = J ? `ready:${J.eventId}` : n.status, re = M(!1);
|
|
1975
|
-
te(() => {
|
|
1976
|
-
re.current ? (n.status !== "loading" && (re.current = !1), Se(I)) : ve.current && Se(I);
|
|
1977
|
-
}, [Me, I]);
|
|
1978
|
-
const _ = M(null);
|
|
1979
|
-
J || (_.current = null);
|
|
1980
|
-
const ye = M(null), q = M({ state: n, eventId: fe, privacy: c, retryOffered: U, onRetry: o });
|
|
1981
|
-
q.current = { state: n, eventId: fe, privacy: c, retryOffered: U, onRetry: o };
|
|
1982
|
-
const be = wt(
|
|
1983
|
-
() => ({
|
|
1984
|
-
getEventId: () => q.current.eventId ?? null,
|
|
1985
|
-
getLoadStatus: () => q.current.state.status,
|
|
1986
|
-
getAppointmentStatus: () => {
|
|
1987
|
-
var T;
|
|
1988
|
-
return ((T = _.current) == null ? void 0 : T.status) ?? null;
|
|
1989
|
-
},
|
|
1990
|
-
getAllowedStatuses: () => {
|
|
1991
|
-
var T;
|
|
1992
|
-
return [...((T = _.current) == null ? void 0 : T.allowed) ?? []];
|
|
1993
|
-
},
|
|
1994
|
-
getOfferedActions: () => {
|
|
1995
|
-
var T;
|
|
1996
|
-
return [...((T = _.current) == null ? void 0 : T.offered) ?? []];
|
|
1997
|
-
},
|
|
1998
|
-
isHistoryOpen: () => {
|
|
1999
|
-
var T;
|
|
2000
|
-
return ((T = _.current) == null ? void 0 : T.historyOpen) ?? !1;
|
|
2001
|
-
},
|
|
2002
|
-
isPrivacy: () => q.current.privacy,
|
|
2003
|
-
openHistory: () => {
|
|
2004
|
-
var T;
|
|
2005
|
-
if (!((T = _.current) != null && T.historyAvailable))
|
|
2006
|
-
throw new Error("AppointmentDetailsPanel: History is not offered.");
|
|
2007
|
-
_.current.openHistory();
|
|
2008
|
-
},
|
|
2009
|
-
closeHistory: () => {
|
|
2010
|
-
var T;
|
|
2011
|
-
(T = _.current) == null || T.closeHistory();
|
|
2012
|
-
},
|
|
2013
|
-
setAppointmentStatus: (T) => {
|
|
2014
|
-
const H = _.current, le = ye.current;
|
|
2015
|
-
if (!H || !le || H.allowed.length === 0)
|
|
2016
|
-
return Ue(
|
|
2017
|
-
new Error("AppointmentDetailsPanel: the status is read-only.")
|
|
2018
|
-
);
|
|
2019
|
-
if (T === H.status) return Promise.resolve();
|
|
2020
|
-
if (!H.allowed.includes(T))
|
|
2021
|
-
return Ue(
|
|
2022
|
-
new Error(`AppointmentDetailsPanel: "${T}" is not allowed.`)
|
|
2023
|
-
);
|
|
2024
|
-
const Le = () => Ue(
|
|
2025
|
-
new Error("AppointmentDetailsPanel: a status save is in flight.")
|
|
2026
|
-
);
|
|
2027
|
-
if (le.getIsSaving()) return Le();
|
|
2028
|
-
const W = le.setValue(T);
|
|
2029
|
-
return W === void 0 ? Le() : W;
|
|
2030
|
-
},
|
|
2031
|
-
retry: () => {
|
|
2032
|
-
const { retryOffered: T, onRetry: H } = q.current;
|
|
2033
|
-
if (!T || !H)
|
|
2034
|
-
throw new Error("AppointmentDetailsPanel: Retry is not offered.");
|
|
2035
|
-
H();
|
|
2036
|
-
}
|
|
2037
|
-
}),
|
|
2038
|
-
[]
|
|
2039
|
-
);
|
|
2040
|
-
Jt($n, be, ie);
|
|
2041
|
-
const ke = /* @__PURE__ */ e(
|
|
2042
|
-
Ot,
|
|
2043
|
-
{
|
|
2044
|
-
title: oe,
|
|
2045
|
-
headingId: I,
|
|
2046
|
-
icon: /* @__PURE__ */ e(rt, { "aria-hidden": "true" }),
|
|
2047
|
-
sticky: !0,
|
|
2048
|
-
divider: !0
|
|
2049
|
-
}
|
|
2050
|
-
);
|
|
2051
|
-
let ee;
|
|
2052
|
-
return n.status === "ready" ? ee = /* @__PURE__ */ e(
|
|
2053
|
-
ba,
|
|
2054
|
-
{
|
|
2055
|
-
read: n.read,
|
|
2056
|
-
refreshing: n.refreshing === !0,
|
|
2057
|
-
currency: l,
|
|
2058
|
-
now: b ?? /* @__PURE__ */ new Date(),
|
|
2059
|
-
locale: Re,
|
|
2060
|
-
shownTitle: oe,
|
|
2061
|
-
headingId: I,
|
|
2062
|
-
enter: ge,
|
|
2063
|
-
live: _,
|
|
2064
|
-
statusControl: ye,
|
|
2065
|
-
patientId: r,
|
|
2066
|
-
operator: s,
|
|
2067
|
-
chair: i,
|
|
2068
|
-
privacy: c,
|
|
2069
|
-
privacyTitle: C,
|
|
2070
|
-
mapsLink: E,
|
|
2071
|
-
notesPreview: g,
|
|
2072
|
-
onOpenNotes: P,
|
|
2073
|
-
history: a,
|
|
2074
|
-
onOpenHistory: u,
|
|
2075
|
-
noteUnrecordedEdits: k,
|
|
2076
|
-
readOnly: h,
|
|
2077
|
-
onStatusChange: N,
|
|
2078
|
-
allowedStatuses: A,
|
|
2079
|
-
onDescriptionChange: S,
|
|
2080
|
-
onEdit: y,
|
|
2081
|
-
onMove: v,
|
|
2082
|
-
onCopy: L,
|
|
2083
|
-
onDelete: K,
|
|
2084
|
-
onJoinTelehealth: ae,
|
|
2085
|
-
onWhatsApp: V,
|
|
2086
|
-
whatsappUrl: se,
|
|
2087
|
-
createTaskUrl: Ie,
|
|
2088
|
-
documents: Te
|
|
2089
|
-
},
|
|
2090
|
-
n.read.eventId
|
|
2091
|
-
) : n.status === "loading" ? ee = /* @__PURE__ */ p(Q, { children: [
|
|
2092
|
-
ke,
|
|
2093
|
-
/* @__PURE__ */ e(va, {})
|
|
2094
|
-
] }) : ee = /* @__PURE__ */ p(Q, { children: [
|
|
2095
|
-
ke,
|
|
2096
|
-
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
|
|
2097
|
-
/* @__PURE__ */ e(F, { variant: n.status === "error" ? "error" : "warning", children: /* @__PURE__ */ e(F.Description, { children: n.status === "error" ? ((we = n.message) == null ? void 0 : we.trim()) || w("emptyState.error.description") : n.reason }) }),
|
|
2098
|
-
U ? /* @__PURE__ */ e(
|
|
2099
|
-
O,
|
|
2100
|
-
{
|
|
2101
|
-
intent: "outline",
|
|
2102
|
-
"data-action": "retry-load",
|
|
2103
|
-
onClick: () => {
|
|
2104
|
-
re.current = !0, o == null || o();
|
|
2105
|
-
},
|
|
2106
|
-
children: w("emptyState.error.cta")
|
|
2107
|
-
}
|
|
2108
|
-
) : null
|
|
2109
|
-
] })
|
|
2110
|
-
] }), /* @__PURE__ */ e(
|
|
2111
|
-
"div",
|
|
2112
|
-
{
|
|
2113
|
-
ref: Pe,
|
|
2114
|
-
id: De,
|
|
2115
|
-
"data-component": "appointment-details-panel",
|
|
2116
|
-
"data-component-id": ie,
|
|
2117
|
-
"data-event-id": fe,
|
|
2118
|
-
"data-status": n.status,
|
|
2119
|
-
"aria-busy": n.status === "loading" || void 0,
|
|
2120
|
-
className: ca({ className: Ce }),
|
|
2121
|
-
...X,
|
|
2122
|
-
children: ee
|
|
2123
|
-
}
|
|
2124
|
-
);
|
|
2125
|
-
});
|
|
2126
|
-
ka.displayName = "AppointmentDetailsPanel";
|
|
2127
|
-
function _s({
|
|
2128
|
-
eventId: t,
|
|
2129
|
-
load: n,
|
|
2130
|
-
reloadKey: o
|
|
2131
|
-
}) {
|
|
2132
|
-
const { t: r } = $("ui"), s = M("");
|
|
2133
|
-
s.current = r("emptyState.error.description");
|
|
2134
|
-
const i = M(n);
|
|
2135
|
-
te(() => {
|
|
2136
|
-
i.current = n;
|
|
2137
|
-
});
|
|
2138
|
-
const [l, b] = B(0), [d, f] = B(), c = JSON.stringify([o ?? null, l]), [C, E] = B({ eventId: t, count: 0 }), g = C.eventId === t ? C.count : C.count + 1;
|
|
2139
|
-
C.eventId !== t && E({ eventId: t, count: g }), pe(() => {
|
|
2140
|
-
if (t === null) {
|
|
2141
|
-
f(void 0);
|
|
2142
|
-
return;
|
|
2143
|
-
}
|
|
2144
|
-
const k = new AbortController(), h = (N) => {
|
|
2145
|
-
k.signal.aborted || f({ eventId: t, selection: g, request: c, value: N });
|
|
2146
|
-
};
|
|
2147
|
-
return Promise.resolve().then(() => i.current(t, { signal: k.signal })).then((N) => {
|
|
2148
|
-
var A, S;
|
|
2149
|
-
if (N.status !== "ready") {
|
|
2150
|
-
h({
|
|
2151
|
-
status: "refused",
|
|
2152
|
-
eventId: t,
|
|
2153
|
-
reason: N.reason,
|
|
2154
|
-
retryable: N.retryable
|
|
2155
|
-
});
|
|
2156
|
-
return;
|
|
2157
|
-
}
|
|
2158
|
-
if (((A = N.details) == null ? void 0 : A.eventId) !== t || !qn((S = N.details.appointment) == null ? void 0 : S.startIso))
|
|
2159
|
-
throw new Error(s.current);
|
|
2160
|
-
h({ status: "ready", read: N.details });
|
|
2161
|
-
}).catch((N) => {
|
|
2162
|
-
h({
|
|
2163
|
-
status: "error",
|
|
2164
|
-
eventId: t,
|
|
2165
|
-
message: Qe(N, s.current)
|
|
2166
|
-
});
|
|
2167
|
-
}), () => k.abort();
|
|
2168
|
-
}, [t, g, c]);
|
|
2169
|
-
const P = Xt(() => b((k) => k + 1), []);
|
|
2170
|
-
if (t === null) return { state: null, retry: P };
|
|
2171
|
-
const a = (d == null ? void 0 : d.eventId) === t && d.selection === g ? d : void 0;
|
|
2172
|
-
let u = { status: "loading", eventId: t };
|
|
2173
|
-
return (a == null ? void 0 : a.request) === c ? u = a.value : (a == null ? void 0 : a.value.status) === "ready" && (u = { status: "ready", read: a.value.read, refreshing: !0 }), { state: u, retry: P };
|
|
2174
|
-
}
|
|
2175
|
-
export {
|
|
2176
|
-
ka as A,
|
|
2177
|
-
Dt as C,
|
|
2178
|
-
at as D,
|
|
2179
|
-
na as I,
|
|
2180
|
-
et as M,
|
|
2181
|
-
Un as R,
|
|
2182
|
-
$n as a,
|
|
2183
|
-
nt as b,
|
|
2184
|
-
Wn as c,
|
|
2185
|
-
Gn as d,
|
|
2186
|
-
ta as e,
|
|
2187
|
-
Be as f,
|
|
2188
|
-
ea as g,
|
|
2189
|
-
jt as h,
|
|
2190
|
-
Vn as i,
|
|
2191
|
-
Yn as j,
|
|
2192
|
-
aa as k,
|
|
2193
|
-
Hn as l,
|
|
2194
|
-
qn as p,
|
|
2195
|
-
Kn as s,
|
|
2196
|
-
_s as u
|
|
2197
|
-
};
|
|
2198
|
-
//# sourceMappingURL=use-appointment-details-read-Bm408XzX.js.map
|