@alfadocs/ui-kit 1.149.1 → 1.151.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/{address-autocomplete-_LeOFdM7.js → address-autocomplete-Bt1nwxyn.js} +2 -2
- package/dist/_chunks/{address-fields-C4khof4C.js → address-fields-COumFRSX.js} +2 -2
- package/dist/_chunks/{agenda-tray-NgxPuAAz.js → agenda-tray-CmfcYQhc.js} +2 -2
- package/dist/_chunks/{ai-summary-panel-Cdsve-XN.js → ai-summary-panel-DyAHCqaj.js} +4 -4
- package/dist/_chunks/{alia-sidebar-Bjuxk8mU.js → alia-sidebar-BqZjnVoF.js} +2 -2
- package/dist/_chunks/{anamnesis-card-G0qzw0Oi.js → anamnesis-card-CoiG7vDj.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-QCv6zW-J.js → anamnesis-summary-rows-CFpaA1GP.js} +4 -4
- package/dist/_chunks/{app-frame-DUPEwu4E.js → app-frame-XEjLsLGY.js} +2 -2
- package/dist/_chunks/{appointment-card-HOZrABrQ.js → appointment-card-BPZggqck.js} +2 -2
- package/dist/_chunks/{appointment-details-panel.history-BxNqcA-r.js → appointment-details-panel.history-FSsTXj1t.js} +84 -71
- package/dist/_chunks/{appointment-details-panel.identity--_j07UG1.js → appointment-details-panel.identity-9hRo85Lx.js} +91 -79
- package/dist/_chunks/appointment-peek-CmQM4wvx.js +223 -0
- package/dist/_chunks/{appointment-timeline-CuZW-CGT.js → appointment-timeline-COfoHpoJ.js} +4 -4
- package/dist/_chunks/{appointment-tray-CFCxukwq.js → appointment-tray-BlKwDJKi.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-BPz9bQAB.js → balance-badge-cell-OghXENKK.js} +4 -4
- package/dist/_chunks/{bill-line-table-B8Cc2pTH.js → bill-line-table-DxV5_Dmq.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-fQleWmJE.js → calendar-appointment-editor-dialog-BPAfWtm9.js} +590 -583
- package/dist/_chunks/{calendar-editor-discard-host-DWS_kM-a.js → calendar-editor-discard-host-BudLsUZO.js} +5 -5
- package/dist/_chunks/{calendar-waiting-list-panel-BKBHfBpn.js → calendar-waiting-list-panel-DukgSOPH.js} +9 -9
- package/dist/_chunks/{calendar-workspace.model-4zmA3BFE.js → calendar-workspace.model-BulUpy0I.js} +2 -2
- package/dist/_chunks/{calendar.sheets-lgAqJB34.js → calendar.sheets-OmTiQdCg.js} +11 -11
- package/dist/_chunks/{calls-panel-BTTfHnPD.js → calls-panel-eohONLia.js} +5 -5
- package/dist/_chunks/{care-plan-card-2U2LuIJD.js → care-plan-card-DJXNWjKB.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-CUAlQv1c.js → care-plan-entry-card-W5QvNv8m.js} +2 -2
- package/dist/_chunks/code-BfU9G1ZM.js +15 -0
- package/dist/_chunks/{communications-panel-DDzUyoHi.js → communications-panel-CqiFs8BH.js} +4 -4
- package/dist/_chunks/{connection-status-Bi6KPTlh.js → connection-status-C13KmOPL.js} +2 -2
- package/dist/_chunks/control-room-rail-BmpTKtL1.js +456 -0
- package/dist/_chunks/{data-grid-CkzbCZSo.js → data-grid-DTAwrOiq.js} +3 -3
- package/dist/_chunks/{data-table-DFAYYsSc.js → data-table-CgpHO6EZ.js} +2 -2
- package/dist/_chunks/{default-tabs-C45FVzsG.js → default-tabs-CZaDDf1G.js} +4 -4
- package/dist/_chunks/{description-list-DA4TgL_I.js → description-list-DaldSpGy.js} +29 -26
- package/dist/_chunks/dev-bypass-button-DFcNpCQj.js +24 -0
- package/dist/_chunks/{document-preview-oSuJsJ3k.js → document-preview-TbwhY_eK.js} +4 -4
- package/dist/_chunks/{editable-currency-cell-renderer-DXJI0fnU.js → editable-currency-cell-renderer-a3CrwNKm.js} +143 -168
- package/dist/_chunks/{editable-description-BsSjLnSx.js → editable-description-B2F54K4T.js} +34 -33
- package/dist/_chunks/{empty-state-5REM7oDM.js → empty-state-qHtpcasr.js} +65 -77
- package/dist/_chunks/{entity-summary-CZmGcWi2.js → entity-summary-BNnTP1F6.js} +62 -50
- package/dist/_chunks/{error-boundary-BQ5mRqEd.js → error-boundary-BDS1XStO.js} +2 -2
- package/dist/_chunks/{error-page-CdNGIezW.js → error-page-3gWV-Vmj.js} +2 -2
- package/dist/_chunks/{error-page-illustration-BdJLuMdV.js → error-page-illustration-CJCjLk_-.js} +125 -149
- package/dist/_chunks/{face-scheme-BC2whb1S.js → face-scheme-DRYGaszs.js} +255 -264
- package/dist/_chunks/feature-preview-switch-B_8JTya_.js +75 -0
- package/dist/_chunks/{file-manager-Cp3Z4VvM.js → file-manager-DMvYx-Gq.js} +165 -180
- package/dist/_chunks/folder-DvNxod7_.js +36 -0
- package/dist/_chunks/{heatmap-DvsZ-mcL.js → heatmap-BZNkPkDD.js} +4 -4
- package/dist/_chunks/{help-me-write-templates-DlA54nu5.js → help-me-write-templates-VnvlK87x.js} +3 -3
- package/dist/_chunks/{info-tip-cCppV1fD.js → info-tip-DkVISvo-.js} +2 -2
- package/dist/_chunks/{invoice-upload-list-BReimsvV.js → invoice-upload-list-DutydbjC.js} +3 -3
- package/dist/_chunks/{link-cell-renderer-CWLArl5e.js → link-cell-renderer-DTunki79.js} +3 -3
- package/dist/_chunks/{login-dev-card-DqUNJcd7.js → login-dev-card-CQz9yhrU.js} +2 -2
- package/dist/_chunks/{map-view-n6GiDRWM.js → map-view-B67HXWPR.js} +2 -2
- package/dist/_chunks/mark-adrift-LBqHvZwv.js +42 -0
- package/dist/_chunks/{marketplace-app-shell-CGA-R-zt.js → marketplace-app-shell-CclaaAvb.js} +3 -3
- package/dist/_chunks/message-square-warning-DsGGfd0K.js +22 -0
- package/dist/_chunks/{message-tray-Dx2HPcKB.js → message-tray-DysT-DPS.js} +2 -2
- package/dist/_chunks/{note-timeline-BbjHMhkL.js → note-timeline-CS5j2OKD.js} +86 -77
- package/dist/_chunks/notebook-text-spVSekMN.js +21 -0
- package/dist/_chunks/{notes-panel-Cw06dLDm.js → notes-panel-d0I3hOEY.js} +363 -341
- package/dist/_chunks/{notification-tray-BnC5OItw.js → notification-tray-CjGDlwLg.js} +2 -2
- package/dist/_chunks/{optical-prescription-DZvauMiM.js → optical-prescription-CAnXavjq.js} +3 -3
- package/dist/_chunks/{panel-header-CbtlTe85.js → panel-header-DTc5OFUg.js} +78 -66
- package/dist/_chunks/panel-right-CnMHSvLU.js +15 -0
- package/dist/_chunks/{panel-subview-DjBwNV16.js → panel-subview-B5hnQwfQ.js} +3 -3
- package/dist/_chunks/{patient-account-settings-Do0QbDJe.js → patient-account-settings-DQx_9CYV.js} +3 -3
- package/dist/_chunks/{patient-check-in-resume-Bxy1_Pfo.js → patient-check-in-resume-BOHcm9hT.js} +6 -6
- package/dist/_chunks/{patient-details-Cj3dp9GB.js → patient-details-wFIzTz7N.js} +4 -4
- package/dist/_chunks/{patient-field-row-DDjsUsc_.js → patient-field-row-BDgfYLgz.js} +202 -201
- package/dist/_chunks/{patient-summary-card-roM9Esfb.js → patient-summary-card-ZunOre3Q.js} +158 -164
- package/dist/_chunks/{payment-request-card-C9VglWsV.js → payment-request-card-BSSfKrcc.js} +3 -3
- package/dist/_chunks/{portal-details-CKF4yFHs.js → portal-details-R-lwrisO.js} +4 -4
- package/dist/_chunks/{portal-documents-DvpAwmSI.js → portal-documents-C6XlWpEl.js} +3 -3
- package/dist/_chunks/{portal-parts-Cvu4PfIY.js → portal-parts-DlvSUZFX.js} +3 -3
- package/dist/_chunks/{practice-results-D0TAgL8v.js → practice-results-CqoB5YAv.js} +5 -5
- package/dist/_chunks/{prescription-history-CQuJmd4H.js → prescription-history-CxBM3gnm.js} +4 -4
- package/dist/_chunks/{privacy-mask-zVh0ntm0.js → privacy-mask-CaLBAxzj.js} +3 -3
- package/dist/_chunks/{product-hub-panel-NVpRuJeW.js → product-hub-panel-RJzrDcGp.js} +3 -3
- package/dist/_chunks/{public-header.agent-Dzo6ujrE.js → public-header.agent-B2CqVq4s.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-BUZPsuSP.js → radiograph-panel.agent-kgCmmgZk.js} +4 -4
- package/dist/_chunks/{registration-form-AtRCt8n5.js → registration-form-Dbe1sFZb.js} +2 -2
- package/dist/_chunks/{registry-connection-panel-ACOsXu3F.js → registry-connection-panel-BkPPA3Fj.js} +4 -4
- package/dist/_chunks/{reserved.agent-DjvapRF1.js → reserved.agent-C-sMq0pb.js} +5 -5
- package/dist/_chunks/{reviews-panel-Cw5ygAxs.js → reviews-panel-jIz5aP2X.js} +4 -4
- package/dist/_chunks/rich-text-editor-DTadvKa7.js +4716 -0
- package/dist/_chunks/{scroll-area-CY5SLYNw.js → scroll-area-RQtcKkHf.js} +84 -79
- package/dist/_chunks/{sheet-CZDjW9Q-.js → sheet-1LXzej6Q.js} +2 -2
- package/dist/_chunks/{sidebar-D5DFYN5K.js → sidebar-BV9JCgS4.js} +2 -2
- package/dist/_chunks/{signed-out-frame-CC25CgKo.js → signed-out-frame-CKA8SSbU.js} +2 -2
- package/dist/_chunks/{signing-end-screen-Bq6tkFE6.js → signing-end-screen-HXkalppf.js} +2 -2
- package/dist/_chunks/{slot-grid-khIpy8Gx.js → slot-grid-DdqeF6PW.js} +2 -2
- package/dist/_chunks/{sync-tray-BQD-HuA4.js → sync-tray-CSVGzuur.js} +2 -2
- package/dist/_chunks/{task-editor-C-4I2sBa.js → task-editor-aXjGMwYA.js} +6 -6
- package/dist/_chunks/{task-tray-CxxcGGgx.js → task-tray-C48Vq8nt.js} +2 -2
- package/dist/_chunks/{tasks-panel-BDPQPOP6.js → tasks-panel-BdxHb-fX.js} +3 -3
- package/dist/_chunks/text-area-DbxGkpzE.js +269 -0
- package/dist/_chunks/{tool-rail-DjPEiBa2.js → tool-rail-B4p6MmxA.js} +383 -363
- package/dist/_chunks/{toolbar-B9oh9XY9.js → toolbar-B2JJ_XDT.js} +2 -2
- package/dist/_chunks/tooth-chip-DOv925IH.js +41 -0
- package/dist/_chunks/{transaction-chip-CkYd-3ky.js → transaction-chip-6jToArJn.js} +45 -43
- package/dist/_chunks/{transcript-panel-Wr8e4Zgi.js → transcript-panel-Dc0fK4WO.js} +2 -2
- package/dist/_chunks/{treatment-receipt-BZzwvsnY.js → treatment-receipt-CZQV1NkJ.js} +59 -62
- package/dist/_chunks/use-appointment-details-read-BR3TQOHx.js +2091 -0
- package/dist/_chunks/user-round-DZxRG9zq.js +15 -0
- package/dist/_chunks/{week-availability-D0tTll4q.js → week-availability-D00rMjsX.js} +2 -2
- package/dist/_chunks/{workflow-map-F7OThorL.js → workflow-map-DLUTUZ27.js} +2 -2
- package/dist/agent-catalog.json +15 -1
- package/dist/appointment-editor-panel/index.js +4 -4
- package/dist/booking-tools-data/index.js +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/calendar-action-buttons/index.js +1 -1
- package/dist/components/_shared/appointment-format.d.ts +4 -0
- package/dist/components/_shared/mark-adrift.d.ts +12 -0
- package/dist/components/_shared/patient-field-row.d.ts +5 -1
- package/dist/components/_shared/safe-html.d.ts +6 -0
- package/dist/components/_shared/tooth-chip.d.ts +21 -0
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-summary-panel/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/app-frame/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +12 -2
- package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +3 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +12 -2
- package/dist/components/appointment-details-panel/description-length.d.ts +18 -0
- package/dist/components/appointment-details-panel/index.d.ts +1 -0
- package/dist/components/appointment-details-panel/index.js +7 -6
- package/dist/components/appointment-peek/appointment-peek.d.ts +45 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bill-line-table/index.js +1 -1
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calls-panel/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/communications-panel/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/control-room-rail/control-room-rail.d.ts +24 -0
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/data-table/index.js +3 -3
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/dev-bypass-button/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/editable-description/editable-description.d.ts +7 -0
- package/dist/components/editable-description/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/error-boundary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/feature-preview-switch/feature-preview-switch.d.ts +55 -0
- package/dist/components/feature-preview-switch/index.d.ts +2 -0
- package/dist/components/feature-preview-switch/index.js +5 -0
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/invoice-upload-list/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/note-timeline/note-timeline.d.ts +8 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +33 -2
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/panel-header/index.js +1 -1
- package/dist/components/panel-header/panel-header.d.ts +8 -0
- package/dist/components/panel-subview/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +9 -0
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/registry-connection-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +18 -5
- package/dist/components/rich-text-editor/index.d.ts +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/link-bar.d.ts +8 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +25 -3
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/scroll-area/scroll-area.d.ts +6 -0
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/sync-tray/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/text-area/index.js +1 -1
- package/dist/components/text-area/text-area.d.ts +15 -0
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tool-rail/tool-rail.d.ts +23 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +7 -0
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/treatment-receipt/index.js +1 -1
- package/dist/components/treatment-receipt/treatment-receipt.d.ts +6 -1
- package/dist/components/week-availability/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/find-free-slots-panel/index.js +1 -1
- package/dist/host-compat.css +4 -1
- package/dist/host-legacy.css +63 -4
- package/dist/i18n/locales/ar.d.ts +18 -0
- package/dist/i18n/locales/ar.js +18 -3
- package/dist/i18n/locales/de.d.ts +18 -0
- package/dist/i18n/locales/de.js +18 -3
- package/dist/i18n/locales/el.d.ts +18 -0
- package/dist/i18n/locales/el.js +21 -3
- package/dist/i18n/locales/en.d.ts +18 -0
- package/dist/i18n/locales/en.js +21 -3
- package/dist/i18n/locales/es.d.ts +18 -0
- package/dist/i18n/locales/es.js +21 -3
- package/dist/i18n/locales/fr.d.ts +18 -0
- package/dist/i18n/locales/fr.js +21 -3
- package/dist/i18n/locales/hi.d.ts +18 -0
- package/dist/i18n/locales/hi.js +18 -3
- package/dist/i18n/locales/it.d.ts +28 -10
- package/dist/i18n/locales/it.js +31 -13
- package/dist/i18n/locales/ja.d.ts +18 -0
- package/dist/i18n/locales/ja.js +18 -3
- package/dist/i18n/locales/nl.d.ts +18 -0
- package/dist/i18n/locales/nl.js +18 -3
- package/dist/i18n/locales/pl.d.ts +18 -0
- package/dist/i18n/locales/pl.js +21 -3
- package/dist/i18n/locales/pt.d.ts +18 -0
- package/dist/i18n/locales/pt.js +21 -3
- package/dist/i18n/locales/ro.d.ts +18 -0
- package/dist/i18n/locales/ro.js +21 -3
- package/dist/i18n/locales/ru.d.ts +18 -0
- package/dist/i18n/locales/ru.js +18 -3
- package/dist/i18n/locales/sq.d.ts +18 -0
- package/dist/i18n/locales/sq.js +21 -3
- package/dist/i18n/locales/sv.d.ts +18 -0
- package/dist/i18n/locales/sv.js +18 -3
- package/dist/i18n/locales/tr.d.ts +18 -0
- package/dist/i18n/locales/tr.js +18 -3
- package/dist/i18n/locales/zh.d.ts +18 -0
- package/dist/i18n/locales/zh.js +18 -3
- package/dist/index.js +820 -817
- package/dist/locales/ar.json +21 -3
- package/dist/locales/de.json +21 -3
- package/dist/locales/el.json +21 -3
- package/dist/locales/en.json +21 -3
- package/dist/locales/es.json +21 -3
- package/dist/locales/fr.json +21 -3
- package/dist/locales/hi.json +21 -3
- package/dist/locales/it.json +31 -13
- package/dist/locales/ja.json +21 -3
- package/dist/locales/nl.json +21 -3
- package/dist/locales/pl.json +21 -3
- package/dist/locales/pt.json +21 -3
- package/dist/locales/ro.json +21 -3
- package/dist/locales/ru.json +21 -3
- package/dist/locales/sq.json +21 -3
- package/dist/locales/sv.json +21 -3
- package/dist/locales/tr.json +21 -3
- package/dist/locales/zh.json +21 -3
- package/dist/online-bookings-panel/index.js +2 -2
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +4 -4
- package/dist/patterns/error-page/index.js +2 -2
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-account-settings/index.js +1 -1
- package/dist/patterns/patient-check-in/index.js +1 -1
- package/dist/patterns/patient-portal/index.js +2 -2
- package/dist/patterns/prescription/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/patterns/signing/index.js +1 -1
- package/dist/redactor.css +9 -0
- package/dist/safe-html/index.js +33 -19
- package/dist/tokens.css +61 -52
- package/dist/waiting-list-panel/index.js +3 -3
- package/package.json +5 -1
- package/dist/_chunks/appointment-peek-B3raO90X.js +0 -123
- package/dist/_chunks/contact-round-DiSvB3LP.js +0 -18
- package/dist/_chunks/control-room-rail-BQvaYowi.js +0 -416
- package/dist/_chunks/dev-bypass-button-BzfYGPuf.js +0 -33
- package/dist/_chunks/folder-BghC8_S2.js +0 -20
- package/dist/_chunks/rich-text-editor-eGdYDPK2.js +0 -4405
- package/dist/_chunks/text-area-COMVJ1yE.js +0 -258
- package/dist/_chunks/use-appointment-details-read-Bl1DHXQ2.js +0 -1998
- /package/dist/{patterns → components}/_shared/mark-pieces.d.ts +0 -0
|
@@ -0,0 +1,2091 @@
|
|
|
1
|
+
import { jsxs as b, jsx as e, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
+
import { c as ct } from "./index-D2ZczOXr.js";
|
|
3
|
+
import { useId as st, useRef as R, forwardRef as rn, useEffect as we, useMemo as At, useState as H, useCallback as ln } from "react";
|
|
4
|
+
import { useTranslation as te } from "react-i18next";
|
|
5
|
+
import { u as dn } from "./registry-DvAUVLHh.js";
|
|
6
|
+
import { u as pe } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
7
|
+
import { c as cn } from "./compose-refs-C0k0tdqF.js";
|
|
8
|
+
import { g as ot } from "./get-error-message-DbFUzuja.js";
|
|
9
|
+
import { useSaveOutcomeUnknownMessage as un, isSaveOutcomeUnknownError as Nt, SaveOutcomeUnknownError as pn } from "../save-outcome/index.js";
|
|
10
|
+
import { h as nt } from "./handled-rejection-C-6Dq0As.js";
|
|
11
|
+
import { c as mn, a as xt } from "./privacy-mask-CaLBAxzj.js";
|
|
12
|
+
import { A as ee } from "./alert-C4WKViaS.js";
|
|
13
|
+
import { B as T } from "./button-Dp4j9ygh.js";
|
|
14
|
+
import { I as Ve } from "./icon-button-u9VMQn3x.js";
|
|
15
|
+
import { B as hn } from "./button-group-CHQD8GJ0.js";
|
|
16
|
+
import { D as ze } from "./dropdown-menu-Bm1KALnk.js";
|
|
17
|
+
import { E as Wt } from "./editable-description-B2F54K4T.js";
|
|
18
|
+
import { N as rt } from "./note-timeline-CS5j2OKD.js";
|
|
19
|
+
import { P as $t } from "./panel-header-DTc5OFUg.js";
|
|
20
|
+
import { P as at } from "./panel-subview-B5hnQwfQ.js";
|
|
21
|
+
import { P as qt } from "./patient-summary-card-ZunOre3Q.js";
|
|
22
|
+
import { S as me } from "./section-card-CYfeQ6EQ.js";
|
|
23
|
+
import { C as fn, S as ke } from "./skeleton-tTWJpvAq.js";
|
|
24
|
+
import { F as gn } from "./form-field-CyHfOVKF.js";
|
|
25
|
+
import { T as vn } from "./text-area-DbxGkpzE.js";
|
|
26
|
+
import { T as yn } from "./tooltip-uEBdD1-5.js";
|
|
27
|
+
import { T as zt } from "./treatment-receipt-CZQV1NkJ.js";
|
|
28
|
+
import { a as it } from "./whatsapp-button-XbozeDl_.js";
|
|
29
|
+
import { W as bn, a as kn } from "./workflow-status-Cg7yjnye.js";
|
|
30
|
+
import { a as Ct, u as wn, i as Sn } from "./appointment-workflow-status-S-lx81Yz.js";
|
|
31
|
+
import { M as An, C as Tt, A as Nn } from "./appointment-details-panel.history-FSsTXj1t.js";
|
|
32
|
+
import { R as xn, a as Et, b as Kt, e as Cn, g as Tn, j as En, c as In, d as Dn, h as Rn, D as It, f as Pn, i as Ln, p as On } from "./appointment-details-panel.identity-9hRo85Lx.js";
|
|
33
|
+
import { A as Dt } from "./avatar-Dp5apm1d.js";
|
|
34
|
+
import { B as jt } from "./badge-BUk4RjTS.js";
|
|
35
|
+
import { C as Fn } from "./counter-WsvRuum1.js";
|
|
36
|
+
import { D as Ke } from "./description-list-DaldSpGy.js";
|
|
37
|
+
import { T as Rt } from "./timestamp-UMF1llBs.js";
|
|
38
|
+
import { T as _n } from "./transaction-chip-6jToArJn.js";
|
|
39
|
+
import { H as Se } from "./hover-card-CS8ulBf9.js";
|
|
40
|
+
import { c as Yt } from "./createLucideIcon-DhHxpK9K.js";
|
|
41
|
+
import { U as Hn } from "./user-round-DZxRG9zq.js";
|
|
42
|
+
import { S as Pt } from "./smartphone-C0rFF2if.js";
|
|
43
|
+
import { P as Mn } from "./phone-FceYcIFQ.js";
|
|
44
|
+
import { M as Un } from "./mail-BqXVF2zH.js";
|
|
45
|
+
import { M as Bn } from "./map-pin-BaY37-Km.js";
|
|
46
|
+
import { F as Wn } from "./file-pen-line-k4uMBM3h.js";
|
|
47
|
+
import { P as $n } from "./pen-line-D0De5zdl.js";
|
|
48
|
+
import { C as qn } from "./credit-card-D9XZsHGA.js";
|
|
49
|
+
import { H as zn } from "./heart-pulse-BCppJyN2.js";
|
|
50
|
+
import { R as Kn } from "./refresh-cw-DnI0cLFC.js";
|
|
51
|
+
import { a as Gt, F as jn } from "./folder-DvNxod7_.js";
|
|
52
|
+
import { N as Vt } from "./notebook-text-spVSekMN.js";
|
|
53
|
+
import { C as Yn } from "./calendar-days-BGWklvE-.js";
|
|
54
|
+
import { C as Gn } from "./clock-Drd4Wtis.js";
|
|
55
|
+
import { H as Vn } from "./hourglass-BEAzW1wE.js";
|
|
56
|
+
import { V as Xt } from "./video-BheNGvsu.js";
|
|
57
|
+
import { A as Lt } from "./armchair-BaLDW6Hz.js";
|
|
58
|
+
import { B as Xn } from "./building-2-D33bLCWL.js";
|
|
59
|
+
import { R as Jn } from "./repeat-CvQa5rZt.js";
|
|
60
|
+
import { G as Qn } from "./globe-sHBW1JN5.js";
|
|
61
|
+
import { N as Zn } from "./notebook-pen-CO7HoM-W.js";
|
|
62
|
+
import { C as Jt } from "./clipboard-list-rSzfIYZB.js";
|
|
63
|
+
import { U as ea } from "./user-plus-BtcOLgNU.js";
|
|
64
|
+
import { P as Ot } from "./pencil-B1sKKyuT.js";
|
|
65
|
+
import { C as ta } from "./copy-vRpqqHtY.js";
|
|
66
|
+
import { P as na } from "./plus-DzMQ_c6b.js";
|
|
67
|
+
import { S as aa } from "./square-check-big-dj0o8yA3.js";
|
|
68
|
+
import { T as ia } from "./trash-2-uumy3fy1.js";
|
|
69
|
+
import { H as Ft } from "./history-CK2JaU2g.js";
|
|
70
|
+
import { C as Qt } from "./calendar-clock-hbObjfGY.js";
|
|
71
|
+
import { C as sa } from "./chevron-down-DWE7GSq9.js";
|
|
72
|
+
import { C as oa } from "./camera-VSklPDCv.js";
|
|
73
|
+
import { F as ra } from "./file-BuG1VMAy.js";
|
|
74
|
+
import { F as la } from "./file-text-5yv6r2ls.js";
|
|
75
|
+
import { R as da } from "./receipt-euro-B1cLM_TN.js";
|
|
76
|
+
/**
|
|
77
|
+
* @license lucide-react v1.22.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/
|
|
82
|
+
const ca = [
|
|
83
|
+
["path", { d: "M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8", key: "1w3rig" }],
|
|
84
|
+
["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" }],
|
|
85
|
+
["path", { d: "M2 21h20", key: "1nyx9w" }],
|
|
86
|
+
["path", { d: "M7 8v3", key: "1qtyvj" }],
|
|
87
|
+
["path", { d: "M12 8v3", key: "hwp4zt" }],
|
|
88
|
+
["path", { d: "M17 8v3", key: "1i6e5u" }],
|
|
89
|
+
["path", { d: "M7 4h.01", key: "1bh4kh" }],
|
|
90
|
+
["path", { d: "M12 4h.01", key: "1ujb9j" }],
|
|
91
|
+
["path", { d: "M17 4h.01", key: "1upcoc" }]
|
|
92
|
+
], ua = Yt("cake", ca);
|
|
93
|
+
/**
|
|
94
|
+
* @license lucide-react v1.22.0 - ISC
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the ISC license.
|
|
97
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/
|
|
99
|
+
const pa = [
|
|
100
|
+
["path", { d: "M16 10h2", key: "8sgtl7" }],
|
|
101
|
+
["path", { d: "M16 14h2", key: "epxaof" }],
|
|
102
|
+
["path", { d: "M6.17 15a3 3 0 0 1 5.66 0", key: "n6f512" }],
|
|
103
|
+
["circle", { cx: "9", cy: "11", r: "2", key: "yxgjnd" }],
|
|
104
|
+
["rect", { x: "2", y: "5", width: "20", height: "14", rx: "2", key: "qneu4z" }]
|
|
105
|
+
], ma = Yt("id-card", pa);
|
|
106
|
+
function ha(t) {
|
|
107
|
+
const n = t.trim();
|
|
108
|
+
let i = 0;
|
|
109
|
+
for (let r = 0; r < n.length; r += 1)
|
|
110
|
+
i += n.charCodeAt(r) >= 256 ? 6 : 1;
|
|
111
|
+
return i;
|
|
112
|
+
}
|
|
113
|
+
const fa = '[data-component="button-group"] [data-component="icon-button"][aria-haspopup="menu"]', ga = {
|
|
114
|
+
id: "appointment-details-panel",
|
|
115
|
+
// open and close back open_history and close_history; set_value backs
|
|
116
|
+
// set_status.
|
|
117
|
+
capabilities: ["open", "close", "set_value"],
|
|
118
|
+
state: {
|
|
119
|
+
eventId: {
|
|
120
|
+
type: "string | null",
|
|
121
|
+
descriptionKey: "ui.agent.appointmentDetailsPanel.state.eventId",
|
|
122
|
+
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.",
|
|
123
|
+
read: (t) => t.getEventId()
|
|
124
|
+
},
|
|
125
|
+
loadStatus: {
|
|
126
|
+
type: "'loading' | 'ready' | 'error' | 'refused'",
|
|
127
|
+
descriptionKey: "ui.agent.appointmentDetailsPanel.state.loadStatus",
|
|
128
|
+
description: "Where the read is: loading, ready, failed (with Retry) or refused. Actions need ready.",
|
|
129
|
+
read: (t) => t.getLoadStatus()
|
|
130
|
+
},
|
|
131
|
+
appointmentStatus: {
|
|
132
|
+
type: "'confirmed' | 'waiting' | 'in_care' | 'done' | 'cancelled' | 'absent' | null",
|
|
133
|
+
descriptionKey: "ui.agent.appointmentDetailsPanel.state.appointmentStatus",
|
|
134
|
+
description: "The appointment status as last saved here or read. Null when none is recorded or nothing is on screen.",
|
|
135
|
+
read: (t) => t.getAppointmentStatus()
|
|
136
|
+
},
|
|
137
|
+
allowedStatuses: {
|
|
138
|
+
type: "string[]",
|
|
139
|
+
descriptionKey: "ui.agent.appointmentDetailsPanel.state.allowedStatuses",
|
|
140
|
+
description: "The statuses set_status accepts now, in menu order. Empty when the status is read-only.",
|
|
141
|
+
read: (t) => t.getAllowedStatuses()
|
|
142
|
+
},
|
|
143
|
+
offeredActions: {
|
|
144
|
+
type: "string[]",
|
|
145
|
+
descriptionKey: "ui.agent.appointmentDetailsPanel.state.offeredActions",
|
|
146
|
+
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.",
|
|
147
|
+
read: (t) => t.getOfferedActions()
|
|
148
|
+
},
|
|
149
|
+
historyOpen: {
|
|
150
|
+
type: "boolean",
|
|
151
|
+
descriptionKey: "ui.agent.appointmentDetailsPanel.state.historyOpen",
|
|
152
|
+
description: "Whether the History sub-view covers the details.",
|
|
153
|
+
read: (t) => t.isHistoryOpen()
|
|
154
|
+
},
|
|
155
|
+
privacy: {
|
|
156
|
+
type: "boolean",
|
|
157
|
+
descriptionKey: "ui.agent.appointmentDetailsPanel.state.privacy",
|
|
158
|
+
description: "Whether privacy mode is on. The patient identity and personal fields are then masked on screen.",
|
|
159
|
+
read: (t) => t.isPrivacy()
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
actions: {
|
|
163
|
+
open_history: {
|
|
164
|
+
safety: "read",
|
|
165
|
+
openWorld: !0,
|
|
166
|
+
idempotent: !0,
|
|
167
|
+
errors: ["No appointment is on screen, or History is not offered."],
|
|
168
|
+
descriptionKey: "ui.agent.appointmentDetailsPanel.actions.openHistory",
|
|
169
|
+
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.",
|
|
170
|
+
invoke: (t) => t.openHistory()
|
|
171
|
+
},
|
|
172
|
+
close_history: {
|
|
173
|
+
safety: "read",
|
|
174
|
+
idempotent: !0,
|
|
175
|
+
descriptionKey: "ui.agent.appointmentDetailsPanel.actions.closeHistory",
|
|
176
|
+
description: "Return from History to the details.",
|
|
177
|
+
invoke: (t) => t.closeHistory()
|
|
178
|
+
},
|
|
179
|
+
set_status: {
|
|
180
|
+
safety: "phi",
|
|
181
|
+
openWorld: !0,
|
|
182
|
+
idempotent: !0,
|
|
183
|
+
argsType: "{ status: string }",
|
|
184
|
+
argsSchema: {
|
|
185
|
+
type: "object",
|
|
186
|
+
properties: {
|
|
187
|
+
status: {
|
|
188
|
+
type: "string",
|
|
189
|
+
enum: [
|
|
190
|
+
"confirmed",
|
|
191
|
+
"waiting",
|
|
192
|
+
"in_care",
|
|
193
|
+
"done",
|
|
194
|
+
"cancelled",
|
|
195
|
+
"absent"
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
required: ["status"]
|
|
200
|
+
},
|
|
201
|
+
errors: [
|
|
202
|
+
"The status is read-only: no appointment on screen, no host save, readOnly, or no allowed statuses.",
|
|
203
|
+
"The status is not in allowedStatuses.",
|
|
204
|
+
"A status save is already in flight.",
|
|
205
|
+
"The host refused the change. The previous status stays and the panel shows the message."
|
|
206
|
+
],
|
|
207
|
+
examples: [{ args: { status: "waiting" } }],
|
|
208
|
+
descriptionKey: "ui.agent.appointmentDetailsPanel.actions.setStatus",
|
|
209
|
+
description: "Save a new appointment status through the host, as the footer control does. Resolves once the host has saved it.",
|
|
210
|
+
invoke: (t, n) => t.setAppointmentStatus(
|
|
211
|
+
n.status
|
|
212
|
+
)
|
|
213
|
+
},
|
|
214
|
+
retry: {
|
|
215
|
+
safety: "read",
|
|
216
|
+
openWorld: !0,
|
|
217
|
+
errors: [
|
|
218
|
+
"Retry is not offered: the read has not failed or been refused as retryable, or the host offers no Retry."
|
|
219
|
+
],
|
|
220
|
+
descriptionKey: "ui.agent.appointmentDetailsPanel.actions.retry",
|
|
221
|
+
description: "Ask the host to read the appointment again, after a failed read or a refusal it marked retryable.",
|
|
222
|
+
invoke: (t) => t.retry()
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
domHooks: {
|
|
226
|
+
root: {
|
|
227
|
+
attr: "data-component",
|
|
228
|
+
value: "appointment-details-panel",
|
|
229
|
+
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 ${fa}, and its menu item carries the same data-action.`
|
|
230
|
+
},
|
|
231
|
+
instanceId: {
|
|
232
|
+
attr: "data-component-id",
|
|
233
|
+
sourceProp: "id",
|
|
234
|
+
description: "Sourced from the id prop, or generated."
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
function lt(t) {
|
|
239
|
+
const n = document.activeElement;
|
|
240
|
+
n && n !== document.body || t == null || t.focus({ preventScroll: !0 });
|
|
241
|
+
}
|
|
242
|
+
function _e(t) {
|
|
243
|
+
const n = document.getElementById(t);
|
|
244
|
+
n && !n.hasAttribute("tabindex") && (n.tabIndex = -1), lt(n);
|
|
245
|
+
}
|
|
246
|
+
const ue = {
|
|
247
|
+
advancedSignature: "setup-advanced-signature",
|
|
248
|
+
requestSignature: "request-signature",
|
|
249
|
+
signOnDevice: "sign-on-device",
|
|
250
|
+
openPatient: "open-patient",
|
|
251
|
+
renewAnamnesis: "renew-anamnesis",
|
|
252
|
+
unlockPayments: "unlock-payments",
|
|
253
|
+
carePlan: "open-care-plan"
|
|
254
|
+
};
|
|
255
|
+
function Ye(t) {
|
|
256
|
+
if (t)
|
|
257
|
+
try {
|
|
258
|
+
const { protocol: n } = new URL(t, "https://host.invalid");
|
|
259
|
+
return n === "http:" || n === "https:" ? t : void 0;
|
|
260
|
+
} catch {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
const va = {
|
|
265
|
+
SU: 0,
|
|
266
|
+
MO: 1,
|
|
267
|
+
TU: 2,
|
|
268
|
+
WE: 3,
|
|
269
|
+
TH: 4,
|
|
270
|
+
FR: 5,
|
|
271
|
+
SA: 6
|
|
272
|
+
}, ya = ["MO", "TU", "WE", "TH", "FR", "SA", "SU"], ba = {
|
|
273
|
+
daily: "recurrenceEveryDay",
|
|
274
|
+
weekly: "recurrenceEveryWeek",
|
|
275
|
+
monthly: "recurrenceEveryMonth",
|
|
276
|
+
yearly: "recurrenceEveryYear"
|
|
277
|
+
}, ka = {
|
|
278
|
+
1: "recurrenceOrdinal1",
|
|
279
|
+
2: "recurrenceOrdinal2",
|
|
280
|
+
3: "recurrenceOrdinal3",
|
|
281
|
+
4: "recurrenceOrdinal4"
|
|
282
|
+
}, wa = /^(-1|[1-4])?(MO|TU|WE|TH|FR|SA|SU)$/;
|
|
283
|
+
function _t(t, n) {
|
|
284
|
+
const i = new Date(2026, 0, 4 + va[t]);
|
|
285
|
+
return new Intl.DateTimeFormat(n, { weekday: "long" }).format(i);
|
|
286
|
+
}
|
|
287
|
+
function Sa(t, n, i) {
|
|
288
|
+
const r = Et(n);
|
|
289
|
+
if (!Number.isFinite(r.getTime())) return;
|
|
290
|
+
const c = i ? Et(i) : void 0, o = c && c.getFullYear() === r.getFullYear();
|
|
291
|
+
try {
|
|
292
|
+
return new Intl.DateTimeFormat(t, {
|
|
293
|
+
day: "numeric",
|
|
294
|
+
month: "long",
|
|
295
|
+
...o ? {} : { year: "numeric" }
|
|
296
|
+
}).format(r);
|
|
297
|
+
} catch {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
function Aa(t, n, i, r) {
|
|
302
|
+
const c = xn[i.frequency];
|
|
303
|
+
if (!c) return;
|
|
304
|
+
const o = (y) => `calendarWorkspace.editor.${y}`, p = (y) => `calendarWorkspace.details.${y}`, f = ba[i.frequency], m = f && (i.interval ?? 1) > 1 ? t(o(f), { count: i.interval }) : t(o(c)), a = (i.byDay ?? []).map((y) => wa.exec(y)).filter((y) => y !== null), l = i.frequency === "weekly" ? ya.filter(
|
|
305
|
+
(y) => a.some(([, g, x]) => !g && x === y)
|
|
306
|
+
) : [], d = i.frequency === "monthly" || i.frequency === "yearly" ? a.find(([, y]) => y) : void 0;
|
|
307
|
+
let A = m;
|
|
308
|
+
if (l.length > 0)
|
|
309
|
+
A = t(p("seriesOnDays"), {
|
|
310
|
+
every: m,
|
|
311
|
+
days: new Intl.ListFormat(n, { type: "conjunction" }).format(
|
|
312
|
+
l.map((y) => _t(y, n))
|
|
313
|
+
)
|
|
314
|
+
});
|
|
315
|
+
else if (d) {
|
|
316
|
+
const [, y, g] = d, x = _t(g, n);
|
|
317
|
+
A = y === "-1" ? t(p("seriesOnLast"), { every: m, weekday: x }) : t(p("seriesOnNth"), {
|
|
318
|
+
every: m,
|
|
319
|
+
weekday: x,
|
|
320
|
+
ordinal: t(o(ka[y]))
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
if (i.count !== void 0)
|
|
324
|
+
return t(p("seriesRule"), {
|
|
325
|
+
frequency: A,
|
|
326
|
+
count: i.count
|
|
327
|
+
});
|
|
328
|
+
const v = i.untilIso ? Sa(n, i.untilIso, r) : void 0;
|
|
329
|
+
return v ? t(p("seriesUntil"), { rule: A, date: v }) : A;
|
|
330
|
+
}
|
|
331
|
+
function dt({
|
|
332
|
+
eyebrow: t,
|
|
333
|
+
heading: n,
|
|
334
|
+
facts: i
|
|
335
|
+
}) {
|
|
336
|
+
return /* @__PURE__ */ b(oe, { children: [
|
|
337
|
+
/* @__PURE__ */ e(Se.Eyebrow, { children: t }),
|
|
338
|
+
/* @__PURE__ */ e(Se.Heading, { children: n }),
|
|
339
|
+
i && i.length > 0 ? /* @__PURE__ */ e(Se.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: i.map((r, c) => /* @__PURE__ */ e(
|
|
340
|
+
"li",
|
|
341
|
+
{
|
|
342
|
+
className: r.muted ? "ds:text-[color:var(--muted-foreground)]" : void 0,
|
|
343
|
+
children: r.text
|
|
344
|
+
},
|
|
345
|
+
c
|
|
346
|
+
)) }) }) : null
|
|
347
|
+
] });
|
|
348
|
+
}
|
|
349
|
+
const Na = "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)]";
|
|
350
|
+
function Ht({
|
|
351
|
+
id: t,
|
|
352
|
+
eyebrow: n,
|
|
353
|
+
heading: i,
|
|
354
|
+
facts: r,
|
|
355
|
+
children: c
|
|
356
|
+
}) {
|
|
357
|
+
return /* @__PURE__ */ b(Se, { children: [
|
|
358
|
+
/* @__PURE__ */ e(Se.Trigger, { asChild: !0, children: /* @__PURE__ */ e("button", { type: "button", "data-chip-hover": t, className: Na, children: c }) }),
|
|
359
|
+
/* @__PURE__ */ e(Se.Content, { side: "bottom", align: "start", size: "sm", children: /* @__PURE__ */ e(dt, { eyebrow: n, heading: i, facts: r }) })
|
|
360
|
+
] });
|
|
361
|
+
}
|
|
362
|
+
const s = (t) => `calendarWorkspace.details.${t}`, xa = {
|
|
363
|
+
missing: "consentMissing",
|
|
364
|
+
requested: "consentRequested",
|
|
365
|
+
signed: "consentSigned"
|
|
366
|
+
}, Zt = (t) => /* @__PURE__ */ e("a", { href: `tel:${t.replace(/\s/g, "")}`, dir: "ltr", children: t }), en = (t) => /* @__PURE__ */ e("a", { href: `mailto:${t}`, dir: "ltr", children: t }), tn = (t, n, i) => new Intl.NumberFormat(t, { style: "currency", currency: i }).format(n);
|
|
367
|
+
function Ge({
|
|
368
|
+
href: t,
|
|
369
|
+
action: n,
|
|
370
|
+
icon: i,
|
|
371
|
+
iconOnly: r = !1,
|
|
372
|
+
children: c
|
|
373
|
+
}) {
|
|
374
|
+
const o = Ye(t);
|
|
375
|
+
return o ? /* @__PURE__ */ e(
|
|
376
|
+
T,
|
|
377
|
+
{
|
|
378
|
+
asChild: !0,
|
|
379
|
+
size: "sm",
|
|
380
|
+
intent: "outline",
|
|
381
|
+
"data-action": n,
|
|
382
|
+
startIcon: i,
|
|
383
|
+
hideLabel: r,
|
|
384
|
+
children: /* @__PURE__ */ e("a", { href: o, children: c })
|
|
385
|
+
}
|
|
386
|
+
) : null;
|
|
387
|
+
}
|
|
388
|
+
const Ca = "ds:[--description-list-icon-color:var(--accent)] ds:[--description-list-icon-gap:var(--spacing-md)]";
|
|
389
|
+
function je({
|
|
390
|
+
rows: t,
|
|
391
|
+
stacked: n = !1
|
|
392
|
+
}) {
|
|
393
|
+
const i = t.filter((r) => !!r);
|
|
394
|
+
return i.length === 0 ? null : /* @__PURE__ */ e(
|
|
395
|
+
Ke,
|
|
396
|
+
{
|
|
397
|
+
layout: n ? "stacked" : "inline",
|
|
398
|
+
density: "compact",
|
|
399
|
+
className: Ca,
|
|
400
|
+
children: i.map((r) => /* @__PURE__ */ b(
|
|
401
|
+
Ke.Row,
|
|
402
|
+
{
|
|
403
|
+
"data-row": r.id,
|
|
404
|
+
icon: r.icon,
|
|
405
|
+
children: [
|
|
406
|
+
/* @__PURE__ */ e(Ke.Term, { children: r.label }),
|
|
407
|
+
/* @__PURE__ */ e(Ke.Detail, { children: r.value })
|
|
408
|
+
]
|
|
409
|
+
},
|
|
410
|
+
r.id
|
|
411
|
+
))
|
|
412
|
+
}
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
function Ta({
|
|
416
|
+
details: t,
|
|
417
|
+
locale: n,
|
|
418
|
+
currency: i,
|
|
419
|
+
now: r,
|
|
420
|
+
mapsLink: c = !1,
|
|
421
|
+
shortcuts: o,
|
|
422
|
+
onRequestSignature: p,
|
|
423
|
+
onSignOnDevice: f,
|
|
424
|
+
onOpenPatient: m
|
|
425
|
+
}) {
|
|
426
|
+
const { t: a } = te("ui"), { patient: l, signing: d, money: A, booking: v } = t;
|
|
427
|
+
if (!l) return null;
|
|
428
|
+
const y = (d == null ? void 0 : d.consents) ?? [], g = d && (d.required > 0 || y.length > 0) ? d : void 0, x = ((g == null ? void 0 : g.toComplete) ?? 0) > 0, L = g ? [
|
|
429
|
+
{
|
|
430
|
+
text: x ? g.requestedVia === "sms" ? a(s("signingRequestedSms")) : g.requestedVia === "email" ? a(s("signingRequestedEmail")) : a(s("signingNotRequested")) : a(s("signingAllSigned"))
|
|
431
|
+
},
|
|
432
|
+
...g.aesSetUp ? [] : [{ text: a(s("aesMissing")), muted: !0 }]
|
|
433
|
+
] : [], P = ((d == null ? void 0 : d.required) ?? 0) > 0 && x, C = !!(o != null && o.advancedSignatureUrl) && ((d == null ? void 0 : d.required) ?? 0) > 0 && !(d != null && d.aesSetUp), M = !!p && P, D = !!f && P, _ = l.highlightedAnamnesisCount ?? 0, E = l.expiredAnamnesisCount ?? 0, q = (l.highlightedAnamnesisAnswers ?? []).map((N) => ({
|
|
434
|
+
text: [
|
|
435
|
+
N.question,
|
|
436
|
+
a(s(N.yes ? "anamnesisYes" : "anamnesisNo")),
|
|
437
|
+
N.answer,
|
|
438
|
+
Kt(n, N.interviewIso)
|
|
439
|
+
].filter(Boolean).join(" · ")
|
|
440
|
+
})), z = Cn(l), re = Tn(l) || z, K = y.map((N) => ({
|
|
441
|
+
id: `consent-${N.id}`,
|
|
442
|
+
label: N.name,
|
|
443
|
+
value: a(s(xa[N.state]))
|
|
444
|
+
})), j = [
|
|
445
|
+
...l.dobIso ? [
|
|
446
|
+
{
|
|
447
|
+
id: "dob",
|
|
448
|
+
label: a(s("dob")),
|
|
449
|
+
icon: /* @__PURE__ */ e(ua, {}),
|
|
450
|
+
value: En(n, l.dobIso)
|
|
451
|
+
},
|
|
452
|
+
/* The age is a fact of its own, not a bracket after the date: its
|
|
453
|
+
own row, label and glyph, with the kit's plural-aware words
|
|
454
|
+
(`AgeChip`). Not that chip's hourglass: in this panel the
|
|
455
|
+
hourglass is the appointment's duration, one card below. */
|
|
456
|
+
{
|
|
457
|
+
id: "age",
|
|
458
|
+
label: a("patientTable.column.age"),
|
|
459
|
+
icon: /* @__PURE__ */ e(Hn, {}),
|
|
460
|
+
value: a("patientField.age", {
|
|
461
|
+
count: In(l.dobIso, r)
|
|
462
|
+
})
|
|
463
|
+
}
|
|
464
|
+
] : [],
|
|
465
|
+
...Dn(l).map((N, G) => {
|
|
466
|
+
const V = N.label === "mobile" || N.label === "home" || N.label === "work";
|
|
467
|
+
return {
|
|
468
|
+
id: `phone-${G}`,
|
|
469
|
+
label: a(V ? `calendarWorkspace.print.phoneLabels.${N.label}` : s("phone")),
|
|
470
|
+
icon: N.label === "mobile" ? /* @__PURE__ */ e(Pt, {}) : /* @__PURE__ */ e(Mn, {}),
|
|
471
|
+
value: Zt(N.number)
|
|
472
|
+
};
|
|
473
|
+
}),
|
|
474
|
+
...l.email ? [
|
|
475
|
+
{
|
|
476
|
+
id: "email",
|
|
477
|
+
label: a(s("email")),
|
|
478
|
+
icon: /* @__PURE__ */ e(Un, {}),
|
|
479
|
+
value: en(l.email)
|
|
480
|
+
}
|
|
481
|
+
] : [],
|
|
482
|
+
/* P27: hidden patient details leave the address out, and with it the
|
|
483
|
+
row: no map link and no empty "address" line. */
|
|
484
|
+
...c && z ? [
|
|
485
|
+
{
|
|
486
|
+
id: "address",
|
|
487
|
+
label: a(s("address")),
|
|
488
|
+
icon: /* @__PURE__ */ e(Bn, {}),
|
|
489
|
+
value: /* @__PURE__ */ e(
|
|
490
|
+
"a",
|
|
491
|
+
{
|
|
492
|
+
href: Rn(l),
|
|
493
|
+
target: "_blank",
|
|
494
|
+
rel: "noopener noreferrer",
|
|
495
|
+
"aria-label": `${a(s("mapsLink"))}: ${re}`,
|
|
496
|
+
children: re
|
|
497
|
+
}
|
|
498
|
+
)
|
|
499
|
+
}
|
|
500
|
+
] : []
|
|
501
|
+
], Y = (A == null ? void 0 : A.unpaidAmount) ?? 0, B = (A == null ? void 0 : A.billableAmount) ?? 0, ne = (v == null ? void 0 : v.paidOnlineAmount) ?? 0, ae = (N, G, V, Ae, Ne, xe) => /* @__PURE__ */ e(
|
|
502
|
+
Ht,
|
|
503
|
+
{
|
|
504
|
+
id: V,
|
|
505
|
+
eyebrow: a(s("hoverBilling")),
|
|
506
|
+
heading: a(s(Ae), {
|
|
507
|
+
amount: tn(n, G, i)
|
|
508
|
+
}),
|
|
509
|
+
facts: [{ text: a(s(Ne)) }],
|
|
510
|
+
children: /* @__PURE__ */ e(
|
|
511
|
+
_n,
|
|
512
|
+
{
|
|
513
|
+
"data-chip": V,
|
|
514
|
+
state: N,
|
|
515
|
+
amount: G,
|
|
516
|
+
currency: i,
|
|
517
|
+
locale: n,
|
|
518
|
+
size: "md",
|
|
519
|
+
showLabel: !0,
|
|
520
|
+
label: xe,
|
|
521
|
+
showIcon: !1,
|
|
522
|
+
tone: N === "to-invoice" ? "neutral" : "state"
|
|
523
|
+
}
|
|
524
|
+
)
|
|
525
|
+
}
|
|
526
|
+
);
|
|
527
|
+
return /* @__PURE__ */ e(
|
|
528
|
+
qt,
|
|
529
|
+
{
|
|
530
|
+
"data-card": "patient",
|
|
531
|
+
name: l.name,
|
|
532
|
+
avatarUrl: l.avatarSrc,
|
|
533
|
+
locale: n,
|
|
534
|
+
surface: "elevated",
|
|
535
|
+
density: "compact",
|
|
536
|
+
fieldColumns: "single",
|
|
537
|
+
wrapFieldValues: !0,
|
|
538
|
+
className: "ds:[--key-value-pair-icon-color:var(--accent)]",
|
|
539
|
+
flags: {
|
|
540
|
+
unsignedDocumentsCount: (g == null ? void 0 : g.toComplete) ?? 0,
|
|
541
|
+
highlightedAnamnesisCount: _
|
|
542
|
+
},
|
|
543
|
+
flagHover: {
|
|
544
|
+
...g ? {
|
|
545
|
+
unsignedDocuments: /* @__PURE__ */ e(
|
|
546
|
+
dt,
|
|
547
|
+
{
|
|
548
|
+
eyebrow: a(s("sectionSigning")),
|
|
549
|
+
heading: g.toComplete === 1 ? a(s("signingToSignOne")) : a(s("signingToSignMany"), {
|
|
550
|
+
n: g.toComplete
|
|
551
|
+
}),
|
|
552
|
+
facts: L
|
|
553
|
+
}
|
|
554
|
+
)
|
|
555
|
+
} : {},
|
|
556
|
+
highlightedAnamnesis: /* @__PURE__ */ e(
|
|
557
|
+
dt,
|
|
558
|
+
{
|
|
559
|
+
eyebrow: a(s("anamnesisTitle")),
|
|
560
|
+
heading: a(s("anamnesisHighlighted"), { n: _ }),
|
|
561
|
+
facts: q
|
|
562
|
+
}
|
|
563
|
+
)
|
|
564
|
+
},
|
|
565
|
+
actionSlot: m ? /* @__PURE__ */ e(
|
|
566
|
+
Ve,
|
|
567
|
+
{
|
|
568
|
+
icon: /* @__PURE__ */ e(Gt, { "aria-hidden": "true" }),
|
|
569
|
+
intent: "outline",
|
|
570
|
+
size: "sm",
|
|
571
|
+
"data-action": ue.openPatient,
|
|
572
|
+
"aria-label": a(s("openPatient")),
|
|
573
|
+
tooltip: a(s("openPatient")),
|
|
574
|
+
onClick: () => m(t.eventId)
|
|
575
|
+
}
|
|
576
|
+
) : void 0,
|
|
577
|
+
extraChips: Y > 0 || B > 0 || ne > 0 || E > 0 || C || M || D ? /* @__PURE__ */ b(oe, { children: [
|
|
578
|
+
/* @__PURE__ */ b("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
579
|
+
Y > 0 ? ae(
|
|
580
|
+
"debt",
|
|
581
|
+
Y,
|
|
582
|
+
"unpaid",
|
|
583
|
+
"hoverUnpaidHeading",
|
|
584
|
+
"hoverUnpaidFact"
|
|
585
|
+
) : null,
|
|
586
|
+
B > 0 ? ae(
|
|
587
|
+
"to-invoice",
|
|
588
|
+
B,
|
|
589
|
+
"billable",
|
|
590
|
+
"hoverBillableHeading",
|
|
591
|
+
"hoverBillableFact"
|
|
592
|
+
) : null,
|
|
593
|
+
ne > 0 ? ae(
|
|
594
|
+
"settled",
|
|
595
|
+
ne,
|
|
596
|
+
"paidOnline",
|
|
597
|
+
"hoverPaidOnlineHeading",
|
|
598
|
+
"hoverPaidOnlineFact",
|
|
599
|
+
/* A deposit is settled money, but "Settled" hides where
|
|
600
|
+
it came from: the chip says what its hover card says. */
|
|
601
|
+
a(s("paidOnline"))
|
|
602
|
+
) : null
|
|
603
|
+
] }),
|
|
604
|
+
M ? /* @__PURE__ */ e(
|
|
605
|
+
T,
|
|
606
|
+
{
|
|
607
|
+
size: "sm",
|
|
608
|
+
intent: "outline",
|
|
609
|
+
"data-action": ue.requestSignature,
|
|
610
|
+
startIcon: /* @__PURE__ */ e(Wn, { "aria-hidden": "true" }),
|
|
611
|
+
onClick: () => p(t.eventId),
|
|
612
|
+
children: a(s("signingRequest"))
|
|
613
|
+
}
|
|
614
|
+
) : null,
|
|
615
|
+
D ? /* @__PURE__ */ e(
|
|
616
|
+
T,
|
|
617
|
+
{
|
|
618
|
+
size: "sm",
|
|
619
|
+
intent: "outline",
|
|
620
|
+
"data-action": ue.signOnDevice,
|
|
621
|
+
"aria-label": `${a(s("signingRequest"))}: ${a(s("signingOnDevice"))}`,
|
|
622
|
+
startIcon: /* @__PURE__ */ e(Pt, { "aria-hidden": "true" }),
|
|
623
|
+
onClick: () => f(t.eventId),
|
|
624
|
+
children: a(s("signingOnDevice"))
|
|
625
|
+
}
|
|
626
|
+
) : null,
|
|
627
|
+
C && (o != null && o.advancedSignatureUrl) ? /* @__PURE__ */ e(
|
|
628
|
+
Ge,
|
|
629
|
+
{
|
|
630
|
+
href: o.advancedSignatureUrl,
|
|
631
|
+
action: ue.advancedSignature,
|
|
632
|
+
icon: /* @__PURE__ */ e($n, { "aria-hidden": "true" }),
|
|
633
|
+
children: a(s("aesSetUp"))
|
|
634
|
+
}
|
|
635
|
+
) : null,
|
|
636
|
+
o != null && o.unlockPaymentsUrl && (Y > 0 || B > 0) ? /* @__PURE__ */ e(
|
|
637
|
+
Ge,
|
|
638
|
+
{
|
|
639
|
+
href: o.unlockPaymentsUrl,
|
|
640
|
+
action: ue.unlockPayments,
|
|
641
|
+
icon: /* @__PURE__ */ e(qn, { "aria-hidden": "true" }),
|
|
642
|
+
children: a(s("unlockPayments"))
|
|
643
|
+
}
|
|
644
|
+
) : null,
|
|
645
|
+
E > 0 ? /* @__PURE__ */ e(
|
|
646
|
+
Ht,
|
|
647
|
+
{
|
|
648
|
+
id: "anamnesisExpired",
|
|
649
|
+
eyebrow: a(s("anamnesisTitle")),
|
|
650
|
+
heading: a(s("anamnesisExpired"), { n: E }),
|
|
651
|
+
facts: [{ text: a(s("hoverAnamnesisExpiredFact")) }],
|
|
652
|
+
children: /* @__PURE__ */ e(
|
|
653
|
+
jt,
|
|
654
|
+
{
|
|
655
|
+
"data-chip": "anamnesisExpired",
|
|
656
|
+
variant: "warning",
|
|
657
|
+
size: "md",
|
|
658
|
+
leading: /* @__PURE__ */ e(zn, {}),
|
|
659
|
+
children: a(s("anamnesisExpired"), { n: E })
|
|
660
|
+
}
|
|
661
|
+
)
|
|
662
|
+
}
|
|
663
|
+
) : null,
|
|
664
|
+
E > 0 && (o != null && o.renewAnamnesisUrl) ? /* @__PURE__ */ e(
|
|
665
|
+
Ge,
|
|
666
|
+
{
|
|
667
|
+
href: o.renewAnamnesisUrl,
|
|
668
|
+
action: ue.renewAnamnesis,
|
|
669
|
+
icon: /* @__PURE__ */ e(Kn, { "aria-hidden": "true" }),
|
|
670
|
+
children: a(s("anamnesisRenew"))
|
|
671
|
+
}
|
|
672
|
+
) : null
|
|
673
|
+
] }) : void 0,
|
|
674
|
+
visibleFieldOrder: [...j, ...K].map((N) => N.id),
|
|
675
|
+
sections: j.length > 0 || K.length > 0 ? [
|
|
676
|
+
...j.length > 0 ? [{ id: "contact", heading: a(s("sectionPatient")), fields: j }] : [],
|
|
677
|
+
...K.length > 0 ? [
|
|
678
|
+
{
|
|
679
|
+
id: "consents",
|
|
680
|
+
heading: a(s("sectionSigning")),
|
|
681
|
+
fields: K
|
|
682
|
+
}
|
|
683
|
+
] : []
|
|
684
|
+
] : void 0
|
|
685
|
+
}
|
|
686
|
+
);
|
|
687
|
+
}
|
|
688
|
+
function Ea({
|
|
689
|
+
details: t,
|
|
690
|
+
locale: n,
|
|
691
|
+
currency: i,
|
|
692
|
+
operator: r,
|
|
693
|
+
chair: c,
|
|
694
|
+
description: o,
|
|
695
|
+
headerAction: p,
|
|
696
|
+
privacy: f = !1,
|
|
697
|
+
history: m
|
|
698
|
+
}) {
|
|
699
|
+
const { t: a } = te("ui"), { appointment: l, booking: d, patient: A } = t, v = (E) => a(`calendarWorkspace.editor.${E}`), y = new Date(l.startIso), g = new Date(y.getTime() + l.durationMin * 6e4), x = Number.isFinite(y.getTime()), { recurrence: L } = l, P = L && Aa(a, n, L, l.startIso), C = d ? [
|
|
700
|
+
d.bookedAtIso && {
|
|
701
|
+
id: "bookedAt",
|
|
702
|
+
label: a(s("bookedAt")),
|
|
703
|
+
value: /* @__PURE__ */ e(
|
|
704
|
+
Rt,
|
|
705
|
+
{
|
|
706
|
+
value: d.bookedAtIso,
|
|
707
|
+
format: "absolute",
|
|
708
|
+
shape: "bare",
|
|
709
|
+
locale: n,
|
|
710
|
+
absoluteFormat: It
|
|
711
|
+
}
|
|
712
|
+
)
|
|
713
|
+
},
|
|
714
|
+
d.typedName && {
|
|
715
|
+
id: "bookingName",
|
|
716
|
+
label: a(s("bookingName")),
|
|
717
|
+
value: d.typedName
|
|
718
|
+
},
|
|
719
|
+
d.phone && {
|
|
720
|
+
id: "bookingPhone",
|
|
721
|
+
label: a(s("bookingPhone")),
|
|
722
|
+
value: Zt(d.phone)
|
|
723
|
+
},
|
|
724
|
+
d.email && {
|
|
725
|
+
id: "bookingEmail",
|
|
726
|
+
label: a(s("bookingEmail")),
|
|
727
|
+
value: en(d.email)
|
|
728
|
+
},
|
|
729
|
+
d.note && {
|
|
730
|
+
id: "bookingNote",
|
|
731
|
+
label: a(s("bookingNote")),
|
|
732
|
+
value: d.note
|
|
733
|
+
},
|
|
734
|
+
/* With a patient the amount is a chip on the patient card. */
|
|
735
|
+
!A && d.paidOnlineAmount !== void 0 && {
|
|
736
|
+
id: "paidOnline",
|
|
737
|
+
label: a(s("paidOnline")),
|
|
738
|
+
value: tn(n, d.paidOnlineAmount, i)
|
|
739
|
+
}
|
|
740
|
+
] : [], M = f ? C.filter((E) => E && E.id === "bookedAt") : C, D = M.some(Boolean), _ = d || l.bookedOnline || m == null ? void 0 : m.filter(
|
|
741
|
+
(E) => E.kind === "created" && E.actor.trim() !== ""
|
|
742
|
+
).sort((E, q) => Date.parse(E.atIso) - Date.parse(q.atIso))[0];
|
|
743
|
+
return /* @__PURE__ */ b(
|
|
744
|
+
me,
|
|
745
|
+
{
|
|
746
|
+
"data-card": "appointment",
|
|
747
|
+
title: a(s("sectionAppointment")),
|
|
748
|
+
headingLevel: 3,
|
|
749
|
+
headerAction: p,
|
|
750
|
+
children: [
|
|
751
|
+
/* @__PURE__ */ e(
|
|
752
|
+
je,
|
|
753
|
+
{
|
|
754
|
+
stacked: !0,
|
|
755
|
+
rows: [
|
|
756
|
+
o != null && o !== !1 && {
|
|
757
|
+
id: "description",
|
|
758
|
+
label: v("description"),
|
|
759
|
+
icon: /* @__PURE__ */ e(Vt, {}),
|
|
760
|
+
value: o
|
|
761
|
+
}
|
|
762
|
+
]
|
|
763
|
+
}
|
|
764
|
+
),
|
|
765
|
+
/* @__PURE__ */ e(
|
|
766
|
+
je,
|
|
767
|
+
{
|
|
768
|
+
rows: [
|
|
769
|
+
x && {
|
|
770
|
+
id: "date",
|
|
771
|
+
label: v("date"),
|
|
772
|
+
icon: /* @__PURE__ */ e(Yn, {}),
|
|
773
|
+
value: Kt(n, y)
|
|
774
|
+
},
|
|
775
|
+
x && {
|
|
776
|
+
id: "time",
|
|
777
|
+
label: a(s("time")),
|
|
778
|
+
icon: /* @__PURE__ */ e(Gn, {}),
|
|
779
|
+
value: l.allDay ? v("allDay") : Pn(n, y, g)
|
|
780
|
+
},
|
|
781
|
+
!l.allDay && {
|
|
782
|
+
id: "duration",
|
|
783
|
+
label: v("duration"),
|
|
784
|
+
icon: /* @__PURE__ */ e(Vn, {}),
|
|
785
|
+
value: `${l.durationMin} ${v("durationUnit")}`
|
|
786
|
+
},
|
|
787
|
+
l.isTelehealth && {
|
|
788
|
+
id: "type",
|
|
789
|
+
label: v("type"),
|
|
790
|
+
icon: /* @__PURE__ */ e(Xt, {}),
|
|
791
|
+
value: v("typeTelehealth")
|
|
792
|
+
},
|
|
793
|
+
r && {
|
|
794
|
+
id: "operator",
|
|
795
|
+
label: a(s("operator")),
|
|
796
|
+
/* A person, as on the grid: the avatar fills the icon slot. */
|
|
797
|
+
icon: /* @__PURE__ */ e(Dt, { name: r.name, src: r.avatarSrc, size: "xs" }),
|
|
798
|
+
value: r.name
|
|
799
|
+
},
|
|
800
|
+
c && {
|
|
801
|
+
id: "chair",
|
|
802
|
+
label: a(s("chair")),
|
|
803
|
+
icon: /* @__PURE__ */ e(Lt, {}),
|
|
804
|
+
value: /* @__PURE__ */ e(jt, { variant: "neutral", size: "sm", leading: /* @__PURE__ */ e(Lt, {}), children: c.name })
|
|
805
|
+
},
|
|
806
|
+
l.branchLabel && {
|
|
807
|
+
id: "branch",
|
|
808
|
+
label: v("branch"),
|
|
809
|
+
icon: /* @__PURE__ */ e(Xn, {}),
|
|
810
|
+
value: l.branchLabel
|
|
811
|
+
},
|
|
812
|
+
_ && {
|
|
813
|
+
id: "createdBy",
|
|
814
|
+
label: a(s("createdBy")),
|
|
815
|
+
icon: /* @__PURE__ */ e(Dt, { name: _.actor, size: "xs" }),
|
|
816
|
+
value: /* @__PURE__ */ b("span", { className: "ds:inline-flex ds:flex-wrap ds:items-baseline ds:gap-x-[var(--spacing-xs)]", children: [
|
|
817
|
+
/* @__PURE__ */ e("span", { children: _.actor }),
|
|
818
|
+
" ",
|
|
819
|
+
/* @__PURE__ */ e("span", { className: "ds:text-[color:var(--muted-foreground)]", children: /* @__PURE__ */ e(
|
|
820
|
+
Rt,
|
|
821
|
+
{
|
|
822
|
+
value: _.atIso,
|
|
823
|
+
format: "absolute",
|
|
824
|
+
shape: "bare",
|
|
825
|
+
locale: n,
|
|
826
|
+
absoluteFormat: It
|
|
827
|
+
}
|
|
828
|
+
) })
|
|
829
|
+
] })
|
|
830
|
+
},
|
|
831
|
+
P && {
|
|
832
|
+
id: "series",
|
|
833
|
+
label: a(s("seriesLabel")),
|
|
834
|
+
icon: /* @__PURE__ */ e(Jn, {}),
|
|
835
|
+
value: P
|
|
836
|
+
}
|
|
837
|
+
]
|
|
838
|
+
}
|
|
839
|
+
),
|
|
840
|
+
/* @__PURE__ */ e(
|
|
841
|
+
je,
|
|
842
|
+
{
|
|
843
|
+
stacked: !0,
|
|
844
|
+
rows: [
|
|
845
|
+
(d == null ? void 0 : d.reason) && {
|
|
846
|
+
id: "bookingReason",
|
|
847
|
+
label: a(s("bookingReason")),
|
|
848
|
+
icon: /* @__PURE__ */ e(Qn, {}),
|
|
849
|
+
value: /* @__PURE__ */ e("span", { className: "ds:font-medium", children: d.reason })
|
|
850
|
+
}
|
|
851
|
+
]
|
|
852
|
+
}
|
|
853
|
+
),
|
|
854
|
+
D ? /* @__PURE__ */ b(
|
|
855
|
+
"div",
|
|
856
|
+
{
|
|
857
|
+
"data-block": "booking",
|
|
858
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
859
|
+
children: [
|
|
860
|
+
/* @__PURE__ */ e("h4", { className: "ds:m-0 type-label ds:text-[color:var(--muted-foreground)]", children: a(s("sectionBooking")) }),
|
|
861
|
+
/* @__PURE__ */ e(je, { rows: M })
|
|
862
|
+
]
|
|
863
|
+
}
|
|
864
|
+
) : null
|
|
865
|
+
]
|
|
866
|
+
}
|
|
867
|
+
);
|
|
868
|
+
}
|
|
869
|
+
function Ia({
|
|
870
|
+
details: t,
|
|
871
|
+
locale: n,
|
|
872
|
+
currency: i,
|
|
873
|
+
privacy: r = !1,
|
|
874
|
+
carePlanUrl: c
|
|
875
|
+
}) {
|
|
876
|
+
const { t: o } = te("ui"), { care: p } = t, f = r || p == null ? void 0 : p.plan;
|
|
877
|
+
return !p || !f && p.lines.length === 0 ? null : /* @__PURE__ */ b(
|
|
878
|
+
me,
|
|
879
|
+
{
|
|
880
|
+
"data-card": "treatments",
|
|
881
|
+
title: o(s("sectionTreatments")),
|
|
882
|
+
headingLevel: 3,
|
|
883
|
+
headerAction: f && c ? /* @__PURE__ */ e(
|
|
884
|
+
Ge,
|
|
885
|
+
{
|
|
886
|
+
href: c,
|
|
887
|
+
action: ue.carePlan,
|
|
888
|
+
icon: /* @__PURE__ */ e(Gt, { "aria-hidden": "true" }),
|
|
889
|
+
iconOnly: !0,
|
|
890
|
+
children: o(s("openCarePlan"))
|
|
891
|
+
}
|
|
892
|
+
) : void 0,
|
|
893
|
+
children: [
|
|
894
|
+
f ? /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-xs)]", children: /* @__PURE__ */ b("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-item", children: [
|
|
895
|
+
/* @__PURE__ */ e(
|
|
896
|
+
Jt,
|
|
897
|
+
{
|
|
898
|
+
"aria-hidden": "true",
|
|
899
|
+
className: "ds:size-4 ds:shrink-0 ds:text-[color:var(--accent)]"
|
|
900
|
+
}
|
|
901
|
+
),
|
|
902
|
+
f.number ? o(s("planLine"), { number: f.number, name: f.name }) : f.name
|
|
903
|
+
] }) }) : null,
|
|
904
|
+
p.lines.length > 0 ? /* @__PURE__ */ e(
|
|
905
|
+
zt,
|
|
906
|
+
{
|
|
907
|
+
lines: p.lines.map(({ entryId: m, careId: a, ...l }) => ({
|
|
908
|
+
id: m,
|
|
909
|
+
...l
|
|
910
|
+
})),
|
|
911
|
+
locale: n,
|
|
912
|
+
currency: i
|
|
913
|
+
}
|
|
914
|
+
) : null
|
|
915
|
+
]
|
|
916
|
+
}
|
|
917
|
+
);
|
|
918
|
+
}
|
|
919
|
+
const Mt = 3;
|
|
920
|
+
function Da({
|
|
921
|
+
preview: t,
|
|
922
|
+
onOpenNotes: n,
|
|
923
|
+
locale: i
|
|
924
|
+
}) {
|
|
925
|
+
const { t: r } = te("ui"), c = st(), o = t.status ?? "ready", p = R(!1);
|
|
926
|
+
pe(() => {
|
|
927
|
+
p.current && (o !== "loading" && (p.current = !1), _e(c));
|
|
928
|
+
}, [o, c]);
|
|
929
|
+
const f = t.total ?? (o === "ready" ? t.notes.length : null), m = Math.max(0, (f ?? 0) - Mt), a = m > 0 ? r(s("notesMore"), { n: m }) : r(s("notesPreviewOpen"));
|
|
930
|
+
return /* @__PURE__ */ b(
|
|
931
|
+
me,
|
|
932
|
+
{
|
|
933
|
+
"data-card": "notes",
|
|
934
|
+
headingId: c,
|
|
935
|
+
headingLevel: 3,
|
|
936
|
+
title: f === null ? r("notesPanel.title") : r(s("notesPreviewTitle"), { count: f }),
|
|
937
|
+
headerAction: n && (f ?? 0) > 0 ? /* @__PURE__ */ b("span", { className: "ds:relative ds:inline-flex", children: [
|
|
938
|
+
/* @__PURE__ */ e(
|
|
939
|
+
Ve,
|
|
940
|
+
{
|
|
941
|
+
icon: /* @__PURE__ */ e(Zn, { "aria-hidden": "true" }),
|
|
942
|
+
intent: "outline",
|
|
943
|
+
size: "sm",
|
|
944
|
+
"data-action": "open-patient-notes",
|
|
945
|
+
"aria-label": a,
|
|
946
|
+
tooltip: a,
|
|
947
|
+
onClick: () => n()
|
|
948
|
+
}
|
|
949
|
+
),
|
|
950
|
+
m > 0 ? (
|
|
951
|
+
/* Decorative: the button's name already says the count. */
|
|
952
|
+
/* @__PURE__ */ e(
|
|
953
|
+
Fn,
|
|
954
|
+
{
|
|
955
|
+
variant: "outline",
|
|
956
|
+
size: "sm",
|
|
957
|
+
background: "surface",
|
|
958
|
+
count: m,
|
|
959
|
+
"aria-hidden": "true",
|
|
960
|
+
className: "ds:pointer-events-none ds:absolute ds:-top-[var(--spacing-2xs)] ds:-end-[var(--spacing-2xs)]"
|
|
961
|
+
}
|
|
962
|
+
)
|
|
963
|
+
) : null
|
|
964
|
+
] }) : void 0,
|
|
965
|
+
children: [
|
|
966
|
+
o === "error" ? /* @__PURE__ */ b(ee, { variant: "error", children: [
|
|
967
|
+
/* @__PURE__ */ e(ee.Description, { children: r("notesPanel.loadError") }),
|
|
968
|
+
t.onRetry ? /* @__PURE__ */ e(ee.Action, { children: /* @__PURE__ */ e(
|
|
969
|
+
T,
|
|
970
|
+
{
|
|
971
|
+
intent: "secondary",
|
|
972
|
+
size: "sm",
|
|
973
|
+
onClick: () => {
|
|
974
|
+
var l;
|
|
975
|
+
p.current = !0, (l = t.onRetry) == null || l.call(t);
|
|
976
|
+
},
|
|
977
|
+
children: r("notesPanel.retry")
|
|
978
|
+
}
|
|
979
|
+
) }) : null
|
|
980
|
+
] }) : null,
|
|
981
|
+
t.notes.length === 0 && o === "loading" ? /* @__PURE__ */ b(oe, { children: [
|
|
982
|
+
/* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: r("notesPanel.loading") }),
|
|
983
|
+
/* @__PURE__ */ e(rt, { notes: [], loading: !0, loadingRows: 2 })
|
|
984
|
+
] }) : o !== "error" || t.notes.length > 0 ? (
|
|
985
|
+
/* A note click, or Enter or Space on it, goes straight to that note
|
|
986
|
+
in the Notes tool; the header button opens the tool at the top. */
|
|
987
|
+
/* @__PURE__ */ e(
|
|
988
|
+
rt,
|
|
989
|
+
{
|
|
990
|
+
notes: t.notes,
|
|
991
|
+
maxItems: Mt,
|
|
992
|
+
bodyFormat: "plain",
|
|
993
|
+
locale: i,
|
|
994
|
+
"aria-labelledby": c,
|
|
995
|
+
onNoteActivate: n,
|
|
996
|
+
emptyState: /* @__PURE__ */ e("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: r(s("notesPreviewEmpty")) })
|
|
997
|
+
}
|
|
998
|
+
)
|
|
999
|
+
) : null
|
|
1000
|
+
]
|
|
1001
|
+
}
|
|
1002
|
+
);
|
|
1003
|
+
}
|
|
1004
|
+
const Ra = ct("ds:flex ds:h-full ds:min-h-0 ds:flex-col"), Pa = ct(
|
|
1005
|
+
[
|
|
1006
|
+
"ds:flex ds:shrink-0 ds:flex-wrap ds:items-center ds:justify-end",
|
|
1007
|
+
"ds:gap-x-[var(--spacing-xs)] ds:gap-y-[var(--spacing-2xs)]",
|
|
1008
|
+
"ds:border-t ds:border-[color:var(--border)] ds:p-[var(--spacing-sm)]",
|
|
1009
|
+
"ds:[&>[data-component=workflow-status]]:contents",
|
|
1010
|
+
"ds:[&>[data-component=workflow-status]>[role=alert]]:order-1",
|
|
1011
|
+
"ds:[&>[data-component=workflow-status]>[role=alert]]:basis-full"
|
|
1012
|
+
].join(" ")
|
|
1013
|
+
), La = ct(
|
|
1014
|
+
"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)]"
|
|
1015
|
+
), U = "ds:sm:[min-block-size:var(--accessible-target-floor,0px)]", Oa = "ds:sm:[&>button]:[min-block-size:var(--accessible-target-floor,0px)]", Fa = [
|
|
1016
|
+
"ds:sm:[&_button:has(svg.lucide-ellipsis)]:[min-block-size:var(--accessible-target-floor,0px)]",
|
|
1017
|
+
"ds:[&_button:has(svg.lucide-ellipsis)]:[min-inline-size:var(--accessible-target-floor,auto)]"
|
|
1018
|
+
].join(" "), nn = ["40%", "33%", "50%", "25%"], _a = [
|
|
1019
|
+
"bill",
|
|
1020
|
+
"folder",
|
|
1021
|
+
"template",
|
|
1022
|
+
"empty",
|
|
1023
|
+
"identification",
|
|
1024
|
+
"webcam"
|
|
1025
|
+
], Ut = {
|
|
1026
|
+
bill: /* @__PURE__ */ e(da, { "aria-hidden": "true" }),
|
|
1027
|
+
folder: /* @__PURE__ */ e(jn, { "aria-hidden": "true" }),
|
|
1028
|
+
template: /* @__PURE__ */ e(la, { "aria-hidden": "true" }),
|
|
1029
|
+
empty: /* @__PURE__ */ e(ra, { "aria-hidden": "true" }),
|
|
1030
|
+
identification: /* @__PURE__ */ e(ma, { "aria-hidden": "true" }),
|
|
1031
|
+
webcam: /* @__PURE__ */ e(oa, { "aria-hidden": "true" })
|
|
1032
|
+
}, k = (t) => `calendarWorkspace.details.${t}`;
|
|
1033
|
+
function Bt({
|
|
1034
|
+
children: t,
|
|
1035
|
+
startIcon: n,
|
|
1036
|
+
overflowItems: i,
|
|
1037
|
+
"data-action": r,
|
|
1038
|
+
intent: c,
|
|
1039
|
+
background: o,
|
|
1040
|
+
size: p,
|
|
1041
|
+
hideLabel: f
|
|
1042
|
+
}) {
|
|
1043
|
+
return /* @__PURE__ */ b(ze.Root, { children: [
|
|
1044
|
+
/* @__PURE__ */ e(yn, { label: t, side: "top", children: /* @__PURE__ */ e(ze.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1045
|
+
T,
|
|
1046
|
+
{
|
|
1047
|
+
intent: c,
|
|
1048
|
+
background: o,
|
|
1049
|
+
size: p,
|
|
1050
|
+
"data-action": r,
|
|
1051
|
+
className: U,
|
|
1052
|
+
startIcon: n,
|
|
1053
|
+
"aria-haspopup": "menu",
|
|
1054
|
+
endIcon: /* @__PURE__ */ e(sa, { "aria-hidden": "true" }),
|
|
1055
|
+
children: f ? /* @__PURE__ */ e("span", { className: "ds:sr-only", children: t }) : t
|
|
1056
|
+
}
|
|
1057
|
+
) }) }),
|
|
1058
|
+
/* @__PURE__ */ e(ze.Content, { align: "end", children: i.map((m) => /* @__PURE__ */ e(
|
|
1059
|
+
ze.Item,
|
|
1060
|
+
{
|
|
1061
|
+
"data-action": m.action,
|
|
1062
|
+
startIcon: m.icon,
|
|
1063
|
+
onSelect: m.onSelect,
|
|
1064
|
+
children: m.label
|
|
1065
|
+
},
|
|
1066
|
+
m.label
|
|
1067
|
+
)) })
|
|
1068
|
+
] });
|
|
1069
|
+
}
|
|
1070
|
+
function Ha() {
|
|
1071
|
+
const { t } = te("ui");
|
|
1072
|
+
return /* @__PURE__ */ b(oe, { children: [
|
|
1073
|
+
/* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: t("common.loading") }),
|
|
1074
|
+
/* @__PURE__ */ b(
|
|
1075
|
+
"div",
|
|
1076
|
+
{
|
|
1077
|
+
"aria-hidden": "true",
|
|
1078
|
+
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",
|
|
1079
|
+
children: [
|
|
1080
|
+
/* @__PURE__ */ e(
|
|
1081
|
+
qt,
|
|
1082
|
+
{
|
|
1083
|
+
name: "",
|
|
1084
|
+
loading: !0,
|
|
1085
|
+
surface: "elevated",
|
|
1086
|
+
density: "compact"
|
|
1087
|
+
}
|
|
1088
|
+
),
|
|
1089
|
+
/* @__PURE__ */ b(me, { title: t(k("sectionAppointment")), headingLevel: 3, children: [
|
|
1090
|
+
/* @__PURE__ */ e(Wt, { loading: !0, maxLines: 2 }),
|
|
1091
|
+
/* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: nn.map((n, i) => /* @__PURE__ */ b(
|
|
1092
|
+
"div",
|
|
1093
|
+
{
|
|
1094
|
+
className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
1095
|
+
children: [
|
|
1096
|
+
/* @__PURE__ */ e(
|
|
1097
|
+
ke,
|
|
1098
|
+
{
|
|
1099
|
+
variant: "rounded",
|
|
1100
|
+
stagger: i + 2,
|
|
1101
|
+
width: "var(--spacing-md)",
|
|
1102
|
+
height: "var(--spacing-md)",
|
|
1103
|
+
className: "ds:shrink-0"
|
|
1104
|
+
}
|
|
1105
|
+
),
|
|
1106
|
+
/* @__PURE__ */ e(
|
|
1107
|
+
ke,
|
|
1108
|
+
{
|
|
1109
|
+
variant: "text",
|
|
1110
|
+
size: "sm",
|
|
1111
|
+
stagger: i + 2,
|
|
1112
|
+
width: n
|
|
1113
|
+
}
|
|
1114
|
+
)
|
|
1115
|
+
]
|
|
1116
|
+
},
|
|
1117
|
+
n
|
|
1118
|
+
)) })
|
|
1119
|
+
] }),
|
|
1120
|
+
/* @__PURE__ */ e(me, { title: t("notesPanel.title"), headingLevel: 3, children: /* @__PURE__ */ e(rt, { notes: [], loading: !0, loadingRows: 2 }) }),
|
|
1121
|
+
/* @__PURE__ */ e(me, { title: t(k("sectionTreatments")), headingLevel: 3, children: /* @__PURE__ */ e(zt, { lines: [], loading: !0 }) })
|
|
1122
|
+
]
|
|
1123
|
+
}
|
|
1124
|
+
),
|
|
1125
|
+
/* @__PURE__ */ b(
|
|
1126
|
+
"div",
|
|
1127
|
+
{
|
|
1128
|
+
"aria-hidden": "true",
|
|
1129
|
+
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)]",
|
|
1130
|
+
children: [
|
|
1131
|
+
/* @__PURE__ */ e(ke, { variant: "rounded", width: "33%", height: "var(--spacing-xl)" }),
|
|
1132
|
+
/* @__PURE__ */ e(
|
|
1133
|
+
ke,
|
|
1134
|
+
{
|
|
1135
|
+
variant: "rounded",
|
|
1136
|
+
stagger: 1,
|
|
1137
|
+
height: "var(--spacing-xl)",
|
|
1138
|
+
className: "ds:flex-1"
|
|
1139
|
+
}
|
|
1140
|
+
)
|
|
1141
|
+
]
|
|
1142
|
+
}
|
|
1143
|
+
)
|
|
1144
|
+
] });
|
|
1145
|
+
}
|
|
1146
|
+
function Ma({
|
|
1147
|
+
history: t,
|
|
1148
|
+
locale: n,
|
|
1149
|
+
onRetry: i,
|
|
1150
|
+
noteUnrecordedEdits: r,
|
|
1151
|
+
privacy: c
|
|
1152
|
+
}) {
|
|
1153
|
+
var v;
|
|
1154
|
+
const { t: o } = te("ui"), p = t.status ?? (t.entries ? "ready" : "loading"), f = p === "error" ? void 0 : t.entries, m = p === "loading" || p !== "error" && !f, [a, l] = H(!1);
|
|
1155
|
+
we(() => l(!0), []);
|
|
1156
|
+
let d = "";
|
|
1157
|
+
m ? d = o("common.loading") : f && (d = f.length === 0 ? o(k("historyEmpty")) : o(k("historyLoaded"), { n: f.length }));
|
|
1158
|
+
let A;
|
|
1159
|
+
return p === "error" ? A = /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1160
|
+
/* @__PURE__ */ e(ee, { variant: "error", children: /* @__PURE__ */ e(ee.Description, { children: ((v = t.message) == null ? void 0 : v.trim()) || o("emptyState.error.description") }) }),
|
|
1161
|
+
i ? /* @__PURE__ */ e(
|
|
1162
|
+
T,
|
|
1163
|
+
{
|
|
1164
|
+
intent: "outline",
|
|
1165
|
+
"data-action": "retry-history",
|
|
1166
|
+
onClick: () => i(),
|
|
1167
|
+
children: o("emptyState.error.cta")
|
|
1168
|
+
}
|
|
1169
|
+
) : null
|
|
1170
|
+
] }) : m || !f ? A = /* @__PURE__ */ e(
|
|
1171
|
+
"div",
|
|
1172
|
+
{
|
|
1173
|
+
"aria-hidden": "true",
|
|
1174
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
1175
|
+
children: nn.slice(0, 3).map((y, g) => /* @__PURE__ */ b(
|
|
1176
|
+
"div",
|
|
1177
|
+
{
|
|
1178
|
+
className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)]",
|
|
1179
|
+
children: [
|
|
1180
|
+
/* @__PURE__ */ e(
|
|
1181
|
+
ke,
|
|
1182
|
+
{
|
|
1183
|
+
variant: "circular",
|
|
1184
|
+
stagger: g,
|
|
1185
|
+
width: "var(--spacing-xl)",
|
|
1186
|
+
height: "var(--spacing-xl)",
|
|
1187
|
+
className: "ds:shrink-0"
|
|
1188
|
+
}
|
|
1189
|
+
),
|
|
1190
|
+
/* @__PURE__ */ e(
|
|
1191
|
+
ke,
|
|
1192
|
+
{
|
|
1193
|
+
variant: "rounded",
|
|
1194
|
+
stagger: g,
|
|
1195
|
+
width: y,
|
|
1196
|
+
height: "var(--spacing-2xl)"
|
|
1197
|
+
}
|
|
1198
|
+
)
|
|
1199
|
+
]
|
|
1200
|
+
},
|
|
1201
|
+
y
|
|
1202
|
+
))
|
|
1203
|
+
}
|
|
1204
|
+
) : A = /* @__PURE__ */ e(
|
|
1205
|
+
Nn,
|
|
1206
|
+
{
|
|
1207
|
+
history: f,
|
|
1208
|
+
locale: n,
|
|
1209
|
+
noteUnrecordedEdits: r,
|
|
1210
|
+
privacy: c
|
|
1211
|
+
}
|
|
1212
|
+
), /* @__PURE__ */ b(oe, { children: [
|
|
1213
|
+
/* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: a ? d : "" }),
|
|
1214
|
+
A
|
|
1215
|
+
] });
|
|
1216
|
+
}
|
|
1217
|
+
function Ua({
|
|
1218
|
+
read: t,
|
|
1219
|
+
refreshing: n,
|
|
1220
|
+
currency: i,
|
|
1221
|
+
now: r,
|
|
1222
|
+
locale: c,
|
|
1223
|
+
shownTitle: o,
|
|
1224
|
+
headingId: p,
|
|
1225
|
+
enter: f,
|
|
1226
|
+
live: m,
|
|
1227
|
+
statusControl: a,
|
|
1228
|
+
patientId: l = ((Me) => (Me = t.patient) == null ? void 0 : Me.id)(),
|
|
1229
|
+
operator: d,
|
|
1230
|
+
chair: A,
|
|
1231
|
+
privacy: v = !1,
|
|
1232
|
+
privacyTitle: y,
|
|
1233
|
+
mapsLink: g,
|
|
1234
|
+
notesPreview: x,
|
|
1235
|
+
onOpenNotes: L,
|
|
1236
|
+
history: P,
|
|
1237
|
+
onOpenHistory: C,
|
|
1238
|
+
noteUnrecordedEdits: M = !1,
|
|
1239
|
+
readOnly: D = !1,
|
|
1240
|
+
onStatusChange: _,
|
|
1241
|
+
allowedStatuses: E = Ct,
|
|
1242
|
+
onDescriptionChange: q,
|
|
1243
|
+
descriptionMaxLength: z,
|
|
1244
|
+
descriptionMeasureLength: re = ha,
|
|
1245
|
+
onAssignPatient: K,
|
|
1246
|
+
onEdit: j,
|
|
1247
|
+
onMove: Y,
|
|
1248
|
+
onCopy: B,
|
|
1249
|
+
onDelete: ne,
|
|
1250
|
+
onJoinTelehealth: ae,
|
|
1251
|
+
onWhatsApp: N,
|
|
1252
|
+
whatsappUrl: G,
|
|
1253
|
+
onBuyWhatsApp: V,
|
|
1254
|
+
createTaskUrl: Ae,
|
|
1255
|
+
onRequestSignature: Ne,
|
|
1256
|
+
onSignOnDevice: xe,
|
|
1257
|
+
onOpenPatient: He,
|
|
1258
|
+
shortcuts: he,
|
|
1259
|
+
documents: X
|
|
1260
|
+
}) {
|
|
1261
|
+
var kt, wt;
|
|
1262
|
+
const { t: h } = te("ui"), { eventId: I } = t, [Xe] = H(f), fe = { details: t, locale: c, currency: i }, w = P ? P.eventId !== void 0 && P.eventId !== I ? { status: "loading" } : P : t.history ? { entries: t.history } : void 0, Ue = (x == null ? void 0 : x.patientId) === void 0 || x.patientId === l, ge = x ? Ue ? x : l ? { notes: [], status: "loading", total: null } : void 0 : void 0, J = !!q && !D && !v, [Ce, ie] = H(!1), [Te, Q] = H(!1), le = Ce && w !== void 0, Be = Te && J, Ee = () => {
|
|
1263
|
+
le || !w || (ie(!0), C == null || C(I));
|
|
1264
|
+
}, We = R({ history: !1, editor: !1 });
|
|
1265
|
+
pe(() => {
|
|
1266
|
+
const u = We.current;
|
|
1267
|
+
We.current = { history: le, editor: Be };
|
|
1268
|
+
const Z = u.history && w === void 0, St = u.editor && !J;
|
|
1269
|
+
Z && ie(!1), St && Q(!1), (Z || St) && _e(p);
|
|
1270
|
+
});
|
|
1271
|
+
const ve = R(null), O = R(!1), Ie = (w == null ? void 0 : w.status) ?? (w != null && w.entries ? "ready" : "loading");
|
|
1272
|
+
pe(() => {
|
|
1273
|
+
O.current && (Ie !== "loading" && (O.current = !1), lt(ve.current));
|
|
1274
|
+
}, [Ie]);
|
|
1275
|
+
const [$, De] = H(t.appointment.name ?? "");
|
|
1276
|
+
we(() => {
|
|
1277
|
+
De(t.appointment.name ?? "");
|
|
1278
|
+
}, [t.appointment.name]);
|
|
1279
|
+
const [ye, de] = H(""), [be, Re] = H(!1), [S, W] = H(), [Pe, ce] = H(!1), Le = un(), ut = R(null), pt = z !== void 0 && re(ye) > z;
|
|
1280
|
+
we(() => {
|
|
1281
|
+
Te && (de($), W(void 0), ce(!1));
|
|
1282
|
+
}, [Te]);
|
|
1283
|
+
const an = async () => {
|
|
1284
|
+
if (!q) return;
|
|
1285
|
+
const u = ye.trim();
|
|
1286
|
+
Re(!0), W(void 0), ce(!1);
|
|
1287
|
+
try {
|
|
1288
|
+
await q(u, I), De(u), Q(!1);
|
|
1289
|
+
} catch (Z) {
|
|
1290
|
+
Nt(Z) ? ce(!0) : W(
|
|
1291
|
+
ot(Z, h(k("descriptionSaveFailed")))
|
|
1292
|
+
);
|
|
1293
|
+
} finally {
|
|
1294
|
+
Re(!1);
|
|
1295
|
+
}
|
|
1296
|
+
}, [se, Je] = H(t.appointment.status);
|
|
1297
|
+
we(() => {
|
|
1298
|
+
Je(t.appointment.status);
|
|
1299
|
+
}, [t.appointment.status]);
|
|
1300
|
+
const mt = R(n);
|
|
1301
|
+
pe(() => {
|
|
1302
|
+
const u = mt.current && !n;
|
|
1303
|
+
mt.current = n, u && (Je(t.appointment.status), De(t.appointment.name ?? ""));
|
|
1304
|
+
}, [n]);
|
|
1305
|
+
const $e = Ct.filter(
|
|
1306
|
+
(u) => E.includes(u)
|
|
1307
|
+
), Oe = wn(se, {
|
|
1308
|
+
statuses: $e,
|
|
1309
|
+
/* Shown so the control can say it, but not a choice. */
|
|
1310
|
+
disabledStatuses: se && !$e.includes(se) ? [se] : []
|
|
1311
|
+
}), Fe = !!_ && !D && $e.some((u) => u !== se), sn = async (u) => {
|
|
1312
|
+
if (!(!_ || !Sn(u))) {
|
|
1313
|
+
try {
|
|
1314
|
+
await _(u, I);
|
|
1315
|
+
} catch (Z) {
|
|
1316
|
+
throw Nt(Z) ? new pn(Le, { cause: Z }) : new Error(ot(Z, h(k("statusSaveFailed"))));
|
|
1317
|
+
}
|
|
1318
|
+
Je(u);
|
|
1319
|
+
}
|
|
1320
|
+
}, ht = v ? void 0 : G, qe = _a.filter(
|
|
1321
|
+
(u) => X == null ? void 0 : X.kinds.includes(u)
|
|
1322
|
+
), on = (((kt = t.care) == null ? void 0 : kt.lines.length) ?? 0) > 0, Qe = l !== void 0 && l !== "", Ze = h(k("status")), ft = `${Ze}: ${Oe.option.label}`, et = R(null), gt = R(Fe);
|
|
1323
|
+
pe(() => {
|
|
1324
|
+
const u = gt.current && !Fe;
|
|
1325
|
+
gt.current = Fe, u && (et.current ? lt(et.current) : _e(p));
|
|
1326
|
+
});
|
|
1327
|
+
const vt = Fe ? /* @__PURE__ */ e(
|
|
1328
|
+
bn,
|
|
1329
|
+
{
|
|
1330
|
+
ref: a,
|
|
1331
|
+
value: Oe.value,
|
|
1332
|
+
options: Oe.options,
|
|
1333
|
+
size: "sm",
|
|
1334
|
+
workflowLabel: Ze,
|
|
1335
|
+
className: `ds:[&>button]:bg-[color:var(--background)] ${Oa}`,
|
|
1336
|
+
"aria-label": ft,
|
|
1337
|
+
onValueChange: sn
|
|
1338
|
+
}
|
|
1339
|
+
) : se ? (
|
|
1340
|
+
/* Named as the control is, "Status: Confirmed": the small display
|
|
1341
|
+
prints the value alone. */
|
|
1342
|
+
/* @__PURE__ */ e(
|
|
1343
|
+
"div",
|
|
1344
|
+
{
|
|
1345
|
+
ref: et,
|
|
1346
|
+
role: "group",
|
|
1347
|
+
"aria-label": ft,
|
|
1348
|
+
tabIndex: -1,
|
|
1349
|
+
"data-status-display": "",
|
|
1350
|
+
className: La(),
|
|
1351
|
+
children: /* @__PURE__ */ e(
|
|
1352
|
+
kn,
|
|
1353
|
+
{
|
|
1354
|
+
value: Oe.value,
|
|
1355
|
+
size: "sm",
|
|
1356
|
+
workflowLabel: Ze,
|
|
1357
|
+
option: Oe.option
|
|
1358
|
+
}
|
|
1359
|
+
)
|
|
1360
|
+
}
|
|
1361
|
+
)
|
|
1362
|
+
) : null, F = [];
|
|
1363
|
+
if (!D && K && !Qe && F.push([
|
|
1364
|
+
"assign-patient",
|
|
1365
|
+
/* @__PURE__ */ e(
|
|
1366
|
+
T,
|
|
1367
|
+
{
|
|
1368
|
+
intent: "primary",
|
|
1369
|
+
"data-action": "assign-patient",
|
|
1370
|
+
className: U,
|
|
1371
|
+
startIcon: /* @__PURE__ */ e(ea, { "aria-hidden": "true" }),
|
|
1372
|
+
onClick: () => K(I),
|
|
1373
|
+
children: h("calendarWorkspace.inc1.bookings.assignPatient")
|
|
1374
|
+
},
|
|
1375
|
+
"assign"
|
|
1376
|
+
)
|
|
1377
|
+
]), ae && F.push([
|
|
1378
|
+
"join-telehealth",
|
|
1379
|
+
/* @__PURE__ */ e(
|
|
1380
|
+
T,
|
|
1381
|
+
{
|
|
1382
|
+
intent: "primary",
|
|
1383
|
+
"data-action": "join-telehealth",
|
|
1384
|
+
className: U,
|
|
1385
|
+
startIcon: /* @__PURE__ */ e(Xt, { "aria-hidden": "true" }),
|
|
1386
|
+
onClick: () => ae(I),
|
|
1387
|
+
children: h(k("joinTelehealth"))
|
|
1388
|
+
},
|
|
1389
|
+
"join"
|
|
1390
|
+
)
|
|
1391
|
+
]), !D && j && F.push([
|
|
1392
|
+
"edit-appointment",
|
|
1393
|
+
/* @__PURE__ */ e(
|
|
1394
|
+
T,
|
|
1395
|
+
{
|
|
1396
|
+
"data-action": "edit-appointment",
|
|
1397
|
+
className: U,
|
|
1398
|
+
startIcon: /* @__PURE__ */ e(Ot, { "aria-hidden": "true" }),
|
|
1399
|
+
onClick: () => j(I),
|
|
1400
|
+
children: h("calendarWorkspace.editor.editTitle")
|
|
1401
|
+
},
|
|
1402
|
+
"edit"
|
|
1403
|
+
)
|
|
1404
|
+
]), !D && Y && F.push([
|
|
1405
|
+
"move-appointment",
|
|
1406
|
+
/* @__PURE__ */ e(
|
|
1407
|
+
T,
|
|
1408
|
+
{
|
|
1409
|
+
"data-action": "move-appointment",
|
|
1410
|
+
className: U,
|
|
1411
|
+
startIcon: /* @__PURE__ */ e(An, { "aria-hidden": "true" }),
|
|
1412
|
+
onClick: () => Y(I),
|
|
1413
|
+
children: h(k("move"))
|
|
1414
|
+
},
|
|
1415
|
+
"move"
|
|
1416
|
+
)
|
|
1417
|
+
]), !D && B && F.push([
|
|
1418
|
+
"copy-appointment",
|
|
1419
|
+
on ? /* @__PURE__ */ e(
|
|
1420
|
+
Bt,
|
|
1421
|
+
{
|
|
1422
|
+
"data-action": "copy-appointment",
|
|
1423
|
+
"data-overflow-tip": !1,
|
|
1424
|
+
startIcon: /* @__PURE__ */ e(Tt, { "aria-hidden": "true" }),
|
|
1425
|
+
overflowItems: [
|
|
1426
|
+
{
|
|
1427
|
+
label: h("calendarWorkspace.editor.duplicateAppointmentOnly"),
|
|
1428
|
+
icon: /* @__PURE__ */ e(ta, { "aria-hidden": "true" }),
|
|
1429
|
+
action: "copy-appointment-only",
|
|
1430
|
+
onSelect: () => B(!1, I)
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
label: h("calendarWorkspace.editor.duplicateWithTreatments"),
|
|
1434
|
+
icon: /* @__PURE__ */ e(Jt, { "aria-hidden": "true" }),
|
|
1435
|
+
action: "copy-appointment-with-treatments",
|
|
1436
|
+
onSelect: () => B(!0, I)
|
|
1437
|
+
}
|
|
1438
|
+
],
|
|
1439
|
+
children: h(k("copy"))
|
|
1440
|
+
},
|
|
1441
|
+
"copy"
|
|
1442
|
+
) : /* @__PURE__ */ e(
|
|
1443
|
+
T,
|
|
1444
|
+
{
|
|
1445
|
+
"data-action": "copy-appointment",
|
|
1446
|
+
className: U,
|
|
1447
|
+
startIcon: /* @__PURE__ */ e(Tt, { "aria-hidden": "true" }),
|
|
1448
|
+
onClick: () => B(!1, I),
|
|
1449
|
+
children: h(k("copy"))
|
|
1450
|
+
},
|
|
1451
|
+
"copy"
|
|
1452
|
+
)
|
|
1453
|
+
]), X && qe.length === 1) {
|
|
1454
|
+
const [u] = qe;
|
|
1455
|
+
F.push([
|
|
1456
|
+
`create-document-${u}`,
|
|
1457
|
+
/* @__PURE__ */ e(
|
|
1458
|
+
T,
|
|
1459
|
+
{
|
|
1460
|
+
"data-action": `create-document-${u}`,
|
|
1461
|
+
className: U,
|
|
1462
|
+
startIcon: Ut[u],
|
|
1463
|
+
onClick: () => X.onCreate(u, I),
|
|
1464
|
+
children: h(k(`documents.${u}`))
|
|
1465
|
+
},
|
|
1466
|
+
"documents"
|
|
1467
|
+
)
|
|
1468
|
+
]);
|
|
1469
|
+
} else X && qe.length > 1 && F.push([
|
|
1470
|
+
"open-create-document",
|
|
1471
|
+
/* @__PURE__ */ e(
|
|
1472
|
+
Bt,
|
|
1473
|
+
{
|
|
1474
|
+
"data-action": "open-create-document",
|
|
1475
|
+
"data-overflow-tip": !1,
|
|
1476
|
+
startIcon: /* @__PURE__ */ e(na, { "aria-hidden": "true" }),
|
|
1477
|
+
overflowItems: qe.map((u) => ({
|
|
1478
|
+
label: h(k(`documents.${u}`)),
|
|
1479
|
+
icon: Ut[u],
|
|
1480
|
+
action: `create-document-${u}`,
|
|
1481
|
+
onSelect: () => X.onCreate(u, I)
|
|
1482
|
+
})),
|
|
1483
|
+
children: h(k("documents.label"))
|
|
1484
|
+
},
|
|
1485
|
+
"documents"
|
|
1486
|
+
)
|
|
1487
|
+
]);
|
|
1488
|
+
N ? F.push([
|
|
1489
|
+
"open-whatsapp",
|
|
1490
|
+
/* @__PURE__ */ e(
|
|
1491
|
+
T,
|
|
1492
|
+
{
|
|
1493
|
+
"data-action": "open-whatsapp",
|
|
1494
|
+
className: U,
|
|
1495
|
+
startIcon: /* @__PURE__ */ e(it, { "aria-hidden": "true" }),
|
|
1496
|
+
onClick: () => N(I),
|
|
1497
|
+
children: h(k("remindWhatsApp"))
|
|
1498
|
+
},
|
|
1499
|
+
"whatsapp"
|
|
1500
|
+
)
|
|
1501
|
+
]) : Ye(ht) ? F.push([
|
|
1502
|
+
"open-whatsapp",
|
|
1503
|
+
/* @__PURE__ */ e(
|
|
1504
|
+
T,
|
|
1505
|
+
{
|
|
1506
|
+
asChild: !0,
|
|
1507
|
+
"data-action": "open-whatsapp",
|
|
1508
|
+
className: U,
|
|
1509
|
+
startIcon: /* @__PURE__ */ e(it, { "aria-hidden": "true" }),
|
|
1510
|
+
children: /* @__PURE__ */ e(
|
|
1511
|
+
"a",
|
|
1512
|
+
{
|
|
1513
|
+
href: Ye(ht),
|
|
1514
|
+
target: "_blank",
|
|
1515
|
+
rel: "noopener noreferrer",
|
|
1516
|
+
children: h(k("remindWhatsApp"))
|
|
1517
|
+
}
|
|
1518
|
+
)
|
|
1519
|
+
},
|
|
1520
|
+
"whatsapp"
|
|
1521
|
+
)
|
|
1522
|
+
]) : V && !G && F.push([
|
|
1523
|
+
"buy-whatsapp",
|
|
1524
|
+
/* @__PURE__ */ e(
|
|
1525
|
+
T,
|
|
1526
|
+
{
|
|
1527
|
+
"data-action": "buy-whatsapp",
|
|
1528
|
+
className: U,
|
|
1529
|
+
startIcon: /* @__PURE__ */ e(it, { "aria-hidden": "true" }),
|
|
1530
|
+
onClick: () => V(I),
|
|
1531
|
+
children: h(k("buyWhatsApp"))
|
|
1532
|
+
},
|
|
1533
|
+
"buy-whatsapp"
|
|
1534
|
+
)
|
|
1535
|
+
]);
|
|
1536
|
+
const yt = Ye(Ae);
|
|
1537
|
+
yt && F.push([
|
|
1538
|
+
"create-task",
|
|
1539
|
+
/* @__PURE__ */ e(
|
|
1540
|
+
T,
|
|
1541
|
+
{
|
|
1542
|
+
asChild: !0,
|
|
1543
|
+
"data-action": "create-task",
|
|
1544
|
+
className: U,
|
|
1545
|
+
startIcon: /* @__PURE__ */ e(aa, { "aria-hidden": "true" }),
|
|
1546
|
+
children: /* @__PURE__ */ e("a", { href: yt, children: h(k("createTask")) })
|
|
1547
|
+
},
|
|
1548
|
+
"task"
|
|
1549
|
+
)
|
|
1550
|
+
]), !D && ne && F.push([
|
|
1551
|
+
"delete-appointment",
|
|
1552
|
+
/* @__PURE__ */ e(
|
|
1553
|
+
T,
|
|
1554
|
+
{
|
|
1555
|
+
intent: "destructiveOutline",
|
|
1556
|
+
"data-action": "delete-appointment",
|
|
1557
|
+
className: U,
|
|
1558
|
+
startIcon: /* @__PURE__ */ e(ia, { "aria-hidden": "true" }),
|
|
1559
|
+
onClick: () => ne(I),
|
|
1560
|
+
children: h("calendarWorkspace.editor.delete")
|
|
1561
|
+
},
|
|
1562
|
+
"delete"
|
|
1563
|
+
)
|
|
1564
|
+
]);
|
|
1565
|
+
const tt = F.map(([, u]) => u);
|
|
1566
|
+
m.current = {
|
|
1567
|
+
status: se ?? null,
|
|
1568
|
+
allowed: Fe ? $e : [],
|
|
1569
|
+
offered: F.map(([u]) => u),
|
|
1570
|
+
historyAvailable: w !== void 0,
|
|
1571
|
+
historyOpen: le,
|
|
1572
|
+
openHistory: Ee,
|
|
1573
|
+
closeHistory: () => ie(!1)
|
|
1574
|
+
};
|
|
1575
|
+
const bt = h(k("historyBack"));
|
|
1576
|
+
return /* @__PURE__ */ e(
|
|
1577
|
+
"div",
|
|
1578
|
+
{
|
|
1579
|
+
className: `ds:flex ds:min-h-0 ds:flex-1 ds:flex-col ${Xe ? fn : ""}`,
|
|
1580
|
+
children: /* @__PURE__ */ b(at.Host, { children: [
|
|
1581
|
+
/* @__PURE__ */ e(
|
|
1582
|
+
$t,
|
|
1583
|
+
{
|
|
1584
|
+
title: o,
|
|
1585
|
+
headingId: p,
|
|
1586
|
+
icon: /* @__PURE__ */ e(Qt, { "aria-hidden": "true" }),
|
|
1587
|
+
sticky: !0,
|
|
1588
|
+
divider: !0,
|
|
1589
|
+
actions: w ? /* @__PURE__ */ e(
|
|
1590
|
+
Ve,
|
|
1591
|
+
{
|
|
1592
|
+
size: "sm",
|
|
1593
|
+
intent: "ghost",
|
|
1594
|
+
icon: /* @__PURE__ */ e(Ft, { "aria-hidden": "true" }),
|
|
1595
|
+
"aria-label": h(k("historyAction")),
|
|
1596
|
+
tooltip: h(k("historyAction")),
|
|
1597
|
+
"data-action": "open-history",
|
|
1598
|
+
onClick: Ee
|
|
1599
|
+
}
|
|
1600
|
+
) : void 0
|
|
1601
|
+
}
|
|
1602
|
+
),
|
|
1603
|
+
/* @__PURE__ */ e(
|
|
1604
|
+
"div",
|
|
1605
|
+
{
|
|
1606
|
+
tabIndex: 0,
|
|
1607
|
+
"aria-busy": n || void 0,
|
|
1608
|
+
className: "ds:[min-block-size:0] ds:flex-1 ds:overflow-y-auto",
|
|
1609
|
+
children: /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
|
|
1610
|
+
v ? /* @__PURE__ */ e(mn, { mask: y }) : t.patient ? /* @__PURE__ */ e(
|
|
1611
|
+
Ta,
|
|
1612
|
+
{
|
|
1613
|
+
...fe,
|
|
1614
|
+
now: r,
|
|
1615
|
+
mapsLink: g,
|
|
1616
|
+
shortcuts: he,
|
|
1617
|
+
onRequestSignature: Ne,
|
|
1618
|
+
onSignOnDevice: xe,
|
|
1619
|
+
onOpenPatient: He
|
|
1620
|
+
}
|
|
1621
|
+
) : (
|
|
1622
|
+
/* No patient card to carry the identity: a patient-less, an
|
|
1623
|
+
unassigned or an unresolved booking keeps the strip. */
|
|
1624
|
+
/* @__PURE__ */ e(
|
|
1625
|
+
Ln,
|
|
1626
|
+
{
|
|
1627
|
+
name: t.appointment.title.trim() ? t.appointment.title : h(k("patientNotLoaded")),
|
|
1628
|
+
unresolved: Qe,
|
|
1629
|
+
status: se,
|
|
1630
|
+
flags: {
|
|
1631
|
+
isTelehealth: t.appointment.isTelehealth,
|
|
1632
|
+
isBookedOnline: t.appointment.bookedOnline,
|
|
1633
|
+
isRecurring: t.appointment.recurrence !== void 0,
|
|
1634
|
+
hasUnassignedPatient: t.appointment.bookedOnline && !Qe,
|
|
1635
|
+
hasHighlightedAnamnesis: !1,
|
|
1636
|
+
hasBillableAmount: (((wt = t.money) == null ? void 0 : wt.billableAmount) ?? 0) > 0
|
|
1637
|
+
},
|
|
1638
|
+
locale: c
|
|
1639
|
+
}
|
|
1640
|
+
)
|
|
1641
|
+
),
|
|
1642
|
+
/* @__PURE__ */ e(
|
|
1643
|
+
Ea,
|
|
1644
|
+
{
|
|
1645
|
+
...fe,
|
|
1646
|
+
operator: d,
|
|
1647
|
+
chair: A,
|
|
1648
|
+
privacy: v,
|
|
1649
|
+
history: (w == null ? void 0 : w.status) === "error" || w == null ? void 0 : w.entries,
|
|
1650
|
+
headerAction: J ? /* @__PURE__ */ e(
|
|
1651
|
+
Ve,
|
|
1652
|
+
{
|
|
1653
|
+
icon: /* @__PURE__ */ e(Vt, { "aria-hidden": "true" }),
|
|
1654
|
+
intent: "outline",
|
|
1655
|
+
size: "sm",
|
|
1656
|
+
"data-action": "edit-description",
|
|
1657
|
+
"aria-label": h(k("editDescription")),
|
|
1658
|
+
tooltip: h(k("editDescription")),
|
|
1659
|
+
onClick: () => Q(!0)
|
|
1660
|
+
}
|
|
1661
|
+
) : void 0,
|
|
1662
|
+
description: (
|
|
1663
|
+
/* An empty read-only description prints nothing. */
|
|
1664
|
+
v ? $ ? /* @__PURE__ */ e(xt, { block: "description" }) : void 0 : $ || J ? /* @__PURE__ */ e(
|
|
1665
|
+
Wt,
|
|
1666
|
+
{
|
|
1667
|
+
"data-block": "description",
|
|
1668
|
+
value: $
|
|
1669
|
+
}
|
|
1670
|
+
) : void 0
|
|
1671
|
+
)
|
|
1672
|
+
}
|
|
1673
|
+
),
|
|
1674
|
+
ge && v ? /* @__PURE__ */ e(
|
|
1675
|
+
me,
|
|
1676
|
+
{
|
|
1677
|
+
"data-card": "notes",
|
|
1678
|
+
title: h("notesPanel.title"),
|
|
1679
|
+
headingLevel: 3,
|
|
1680
|
+
children: /* @__PURE__ */ e(xt, {})
|
|
1681
|
+
}
|
|
1682
|
+
) : ge ? /* @__PURE__ */ e(
|
|
1683
|
+
Da,
|
|
1684
|
+
{
|
|
1685
|
+
preview: ge,
|
|
1686
|
+
onOpenNotes: Ue ? L : void 0,
|
|
1687
|
+
locale: c
|
|
1688
|
+
}
|
|
1689
|
+
) : null,
|
|
1690
|
+
/* @__PURE__ */ e(
|
|
1691
|
+
Ia,
|
|
1692
|
+
{
|
|
1693
|
+
...fe,
|
|
1694
|
+
privacy: v,
|
|
1695
|
+
carePlanUrl: he == null ? void 0 : he.carePlanUrl
|
|
1696
|
+
}
|
|
1697
|
+
)
|
|
1698
|
+
] })
|
|
1699
|
+
}
|
|
1700
|
+
),
|
|
1701
|
+
vt || tt.length > 0 ? (
|
|
1702
|
+
/* The body scrolls; the status and the actions stay put. The
|
|
1703
|
+
status keeps its own segment and never folds. The actions fold
|
|
1704
|
+
to icons, then into More, never onto a second line. Only a
|
|
1705
|
+
refused status change adds a line, for its message. */
|
|
1706
|
+
/* @__PURE__ */ b("div", { className: Pa(), children: [
|
|
1707
|
+
vt,
|
|
1708
|
+
tt.length > 0 ? /* @__PURE__ */ e(
|
|
1709
|
+
hn,
|
|
1710
|
+
{
|
|
1711
|
+
label: h(k("actionsLabel")),
|
|
1712
|
+
overflow: "menu",
|
|
1713
|
+
collapseToIcons: !0,
|
|
1714
|
+
background: "surface",
|
|
1715
|
+
size: "sm",
|
|
1716
|
+
className: `ds:min-w-0 ds:flex-1 ds:text-end ${Fa}`,
|
|
1717
|
+
children: tt
|
|
1718
|
+
}
|
|
1719
|
+
) : null
|
|
1720
|
+
] })
|
|
1721
|
+
) : null,
|
|
1722
|
+
w ? /* @__PURE__ */ e(
|
|
1723
|
+
at,
|
|
1724
|
+
{
|
|
1725
|
+
ref: ve,
|
|
1726
|
+
open: le,
|
|
1727
|
+
icon: /* @__PURE__ */ e(Ft, { "aria-hidden": "true" }),
|
|
1728
|
+
title: h(k("historyTitle")),
|
|
1729
|
+
backLabel: bt,
|
|
1730
|
+
headingLevel: 3,
|
|
1731
|
+
onBack: () => ie(!1),
|
|
1732
|
+
"data-details-subview": "history",
|
|
1733
|
+
children: /* @__PURE__ */ e("div", { className: "ds:-m-[var(--panel-subview-inset)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ e(
|
|
1734
|
+
Ma,
|
|
1735
|
+
{
|
|
1736
|
+
history: w,
|
|
1737
|
+
locale: c,
|
|
1738
|
+
noteUnrecordedEdits: M,
|
|
1739
|
+
privacy: v,
|
|
1740
|
+
onRetry: w.onRetry ? () => {
|
|
1741
|
+
var u;
|
|
1742
|
+
O.current = !0, (u = w.onRetry) == null || u.call(w);
|
|
1743
|
+
} : void 0
|
|
1744
|
+
}
|
|
1745
|
+
) })
|
|
1746
|
+
}
|
|
1747
|
+
) : null,
|
|
1748
|
+
J ? /* @__PURE__ */ e(
|
|
1749
|
+
at,
|
|
1750
|
+
{
|
|
1751
|
+
open: Be,
|
|
1752
|
+
icon: /* @__PURE__ */ e(Ot, { "aria-hidden": "true" }),
|
|
1753
|
+
title: h(k("editDescription")),
|
|
1754
|
+
backLabel: bt,
|
|
1755
|
+
headingLevel: 3,
|
|
1756
|
+
initialFocusRef: ut,
|
|
1757
|
+
onBack: () => {
|
|
1758
|
+
be || Q(!1);
|
|
1759
|
+
},
|
|
1760
|
+
"data-details-subview": "description",
|
|
1761
|
+
footer: /* @__PURE__ */ b(oe, { children: [
|
|
1762
|
+
/* @__PURE__ */ e(
|
|
1763
|
+
T,
|
|
1764
|
+
{
|
|
1765
|
+
intent: "secondary",
|
|
1766
|
+
disabled: be,
|
|
1767
|
+
onClick: () => Q(!1),
|
|
1768
|
+
children: h(k("noteCancel"))
|
|
1769
|
+
}
|
|
1770
|
+
),
|
|
1771
|
+
/* @__PURE__ */ e(
|
|
1772
|
+
T,
|
|
1773
|
+
{
|
|
1774
|
+
intent: "primary",
|
|
1775
|
+
"data-action": "save-description",
|
|
1776
|
+
loading: be,
|
|
1777
|
+
disabled: pt,
|
|
1778
|
+
onClick: () => void an(),
|
|
1779
|
+
children: h(k("descriptionSave"))
|
|
1780
|
+
}
|
|
1781
|
+
)
|
|
1782
|
+
] }),
|
|
1783
|
+
children: /* @__PURE__ */ b("div", { className: "ds:-m-[var(--panel-subview-inset)] ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
|
|
1784
|
+
/* @__PURE__ */ e(
|
|
1785
|
+
gn,
|
|
1786
|
+
{
|
|
1787
|
+
label: h("calendarWorkspace.editor.description"),
|
|
1788
|
+
error: pt ? h("calendarWorkspace.editor.descriptionTooLong", {
|
|
1789
|
+
max: z
|
|
1790
|
+
}) : S,
|
|
1791
|
+
children: /* @__PURE__ */ e(
|
|
1792
|
+
vn,
|
|
1793
|
+
{
|
|
1794
|
+
ref: ut,
|
|
1795
|
+
value: ye,
|
|
1796
|
+
minRows: 6,
|
|
1797
|
+
autoResize: !0,
|
|
1798
|
+
softMaxLength: z,
|
|
1799
|
+
measureLength: re,
|
|
1800
|
+
onChange: (u) => {
|
|
1801
|
+
de(u.target.value), ce(!1);
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
)
|
|
1805
|
+
}
|
|
1806
|
+
),
|
|
1807
|
+
Pe ? /* @__PURE__ */ e(
|
|
1808
|
+
ee,
|
|
1809
|
+
{
|
|
1810
|
+
variant: "warning",
|
|
1811
|
+
announce: "assertive",
|
|
1812
|
+
"data-outcome": "unknown",
|
|
1813
|
+
children: /* @__PURE__ */ e(ee.Description, { children: Le })
|
|
1814
|
+
}
|
|
1815
|
+
) : null
|
|
1816
|
+
] })
|
|
1817
|
+
}
|
|
1818
|
+
) : null
|
|
1819
|
+
] })
|
|
1820
|
+
}
|
|
1821
|
+
);
|
|
1822
|
+
}
|
|
1823
|
+
const Ba = rn(function({
|
|
1824
|
+
state: n,
|
|
1825
|
+
onRetry: i,
|
|
1826
|
+
patientId: r,
|
|
1827
|
+
operator: c,
|
|
1828
|
+
chair: o,
|
|
1829
|
+
currency: p = "EUR",
|
|
1830
|
+
now: f,
|
|
1831
|
+
locale: m,
|
|
1832
|
+
title: a,
|
|
1833
|
+
privacy: l = !1,
|
|
1834
|
+
privacyTitle: d,
|
|
1835
|
+
mapsLink: A,
|
|
1836
|
+
notesPreview: v,
|
|
1837
|
+
onOpenNotes: y,
|
|
1838
|
+
history: g,
|
|
1839
|
+
onOpenHistory: x,
|
|
1840
|
+
noteUnrecordedEdits: L,
|
|
1841
|
+
readOnly: P = !1,
|
|
1842
|
+
onStatusChange: C,
|
|
1843
|
+
allowedStatuses: M,
|
|
1844
|
+
onDescriptionChange: D,
|
|
1845
|
+
descriptionMaxLength: _,
|
|
1846
|
+
descriptionMeasureLength: E,
|
|
1847
|
+
onAssignPatient: q,
|
|
1848
|
+
onEdit: z,
|
|
1849
|
+
onMove: re,
|
|
1850
|
+
onCopy: K,
|
|
1851
|
+
onDelete: j,
|
|
1852
|
+
onJoinTelehealth: Y,
|
|
1853
|
+
onWhatsApp: B,
|
|
1854
|
+
whatsappUrl: ne,
|
|
1855
|
+
onBuyWhatsApp: ae,
|
|
1856
|
+
createTaskUrl: N,
|
|
1857
|
+
onRequestSignature: G,
|
|
1858
|
+
onSignOnDevice: V,
|
|
1859
|
+
onOpenPatient: Ae,
|
|
1860
|
+
shortcuts: Ne,
|
|
1861
|
+
documents: xe,
|
|
1862
|
+
id: He,
|
|
1863
|
+
className: he,
|
|
1864
|
+
...X
|
|
1865
|
+
}, Me) {
|
|
1866
|
+
var be, Re;
|
|
1867
|
+
const { t: h, i18n: I } = te("ui"), Xe = st(), fe = He ?? Xe, w = st(), Ue = m ?? I.language, ge = !l && (a != null && a.trim()) ? a : h(k("region")), J = n.status === "ready" ? n.read : void 0, Ce = n.status === "ready" ? n.read.eventId : n.eventId, ie = R(
|
|
1868
|
+
void 0
|
|
1869
|
+
), Te = ie.current !== void 0 && ie.current !== "ready";
|
|
1870
|
+
we(() => {
|
|
1871
|
+
ie.current = n.status;
|
|
1872
|
+
}, [n.status]);
|
|
1873
|
+
const Q = !!i && (n.status === "error" || n.status === "refused" && n.retryable === !0), le = R(null), Be = At(() => cn(Me, le), [Me]), Ee = R(!1);
|
|
1874
|
+
typeof document < "u" && (Ee.current = ((be = le.current) == null ? void 0 : be.contains(document.activeElement)) ?? !1);
|
|
1875
|
+
const We = J ? `ready:${J.eventId}` : n.status, ve = R(!1);
|
|
1876
|
+
pe(() => {
|
|
1877
|
+
ve.current ? (n.status !== "loading" && (ve.current = !1), _e(w)) : Ee.current && _e(w);
|
|
1878
|
+
}, [We, w]);
|
|
1879
|
+
const O = R(null);
|
|
1880
|
+
J || (O.current = null);
|
|
1881
|
+
const Ie = R(null), $ = R({ state: n, eventId: Ce, privacy: l, retryOffered: Q, onRetry: i });
|
|
1882
|
+
$.current = { state: n, eventId: Ce, privacy: l, retryOffered: Q, onRetry: i };
|
|
1883
|
+
const De = At(
|
|
1884
|
+
() => ({
|
|
1885
|
+
getEventId: () => $.current.eventId ?? null,
|
|
1886
|
+
getLoadStatus: () => $.current.state.status,
|
|
1887
|
+
getAppointmentStatus: () => {
|
|
1888
|
+
var S;
|
|
1889
|
+
return ((S = O.current) == null ? void 0 : S.status) ?? null;
|
|
1890
|
+
},
|
|
1891
|
+
getAllowedStatuses: () => {
|
|
1892
|
+
var S;
|
|
1893
|
+
return [...((S = O.current) == null ? void 0 : S.allowed) ?? []];
|
|
1894
|
+
},
|
|
1895
|
+
getOfferedActions: () => {
|
|
1896
|
+
var S;
|
|
1897
|
+
return [...((S = O.current) == null ? void 0 : S.offered) ?? []];
|
|
1898
|
+
},
|
|
1899
|
+
isHistoryOpen: () => {
|
|
1900
|
+
var S;
|
|
1901
|
+
return ((S = O.current) == null ? void 0 : S.historyOpen) ?? !1;
|
|
1902
|
+
},
|
|
1903
|
+
isPrivacy: () => $.current.privacy,
|
|
1904
|
+
openHistory: () => {
|
|
1905
|
+
var S;
|
|
1906
|
+
if (!((S = O.current) != null && S.historyAvailable))
|
|
1907
|
+
throw new Error("AppointmentDetailsPanel: History is not offered.");
|
|
1908
|
+
O.current.openHistory();
|
|
1909
|
+
},
|
|
1910
|
+
closeHistory: () => {
|
|
1911
|
+
var S;
|
|
1912
|
+
(S = O.current) == null || S.closeHistory();
|
|
1913
|
+
},
|
|
1914
|
+
setAppointmentStatus: (S) => {
|
|
1915
|
+
const W = O.current, Pe = Ie.current;
|
|
1916
|
+
if (!W || !Pe || W.allowed.length === 0)
|
|
1917
|
+
return nt(
|
|
1918
|
+
new Error("AppointmentDetailsPanel: the status is read-only.")
|
|
1919
|
+
);
|
|
1920
|
+
if (S === W.status) return Promise.resolve();
|
|
1921
|
+
if (!W.allowed.includes(S))
|
|
1922
|
+
return nt(
|
|
1923
|
+
new Error(`AppointmentDetailsPanel: "${S}" is not allowed.`)
|
|
1924
|
+
);
|
|
1925
|
+
const ce = () => nt(
|
|
1926
|
+
new Error("AppointmentDetailsPanel: a status save is in flight.")
|
|
1927
|
+
);
|
|
1928
|
+
if (Pe.getIsSaving()) return ce();
|
|
1929
|
+
const Le = Pe.setValue(S);
|
|
1930
|
+
return Le === void 0 ? ce() : Le;
|
|
1931
|
+
},
|
|
1932
|
+
retry: () => {
|
|
1933
|
+
const { retryOffered: S, onRetry: W } = $.current;
|
|
1934
|
+
if (!S || !W)
|
|
1935
|
+
throw new Error("AppointmentDetailsPanel: Retry is not offered.");
|
|
1936
|
+
W();
|
|
1937
|
+
}
|
|
1938
|
+
}),
|
|
1939
|
+
[]
|
|
1940
|
+
);
|
|
1941
|
+
dn(ga, De, fe);
|
|
1942
|
+
const ye = /* @__PURE__ */ e(
|
|
1943
|
+
$t,
|
|
1944
|
+
{
|
|
1945
|
+
title: ge,
|
|
1946
|
+
headingId: w,
|
|
1947
|
+
icon: /* @__PURE__ */ e(Qt, { "aria-hidden": "true" }),
|
|
1948
|
+
sticky: !0,
|
|
1949
|
+
divider: !0
|
|
1950
|
+
}
|
|
1951
|
+
);
|
|
1952
|
+
let de;
|
|
1953
|
+
return n.status === "ready" ? de = /* @__PURE__ */ e(
|
|
1954
|
+
Ua,
|
|
1955
|
+
{
|
|
1956
|
+
read: n.read,
|
|
1957
|
+
refreshing: n.refreshing === !0,
|
|
1958
|
+
currency: p,
|
|
1959
|
+
now: f ?? /* @__PURE__ */ new Date(),
|
|
1960
|
+
locale: Ue,
|
|
1961
|
+
shownTitle: ge,
|
|
1962
|
+
headingId: w,
|
|
1963
|
+
enter: Te,
|
|
1964
|
+
live: O,
|
|
1965
|
+
statusControl: Ie,
|
|
1966
|
+
patientId: r,
|
|
1967
|
+
operator: c,
|
|
1968
|
+
chair: o,
|
|
1969
|
+
privacy: l,
|
|
1970
|
+
privacyTitle: d,
|
|
1971
|
+
mapsLink: A,
|
|
1972
|
+
notesPreview: v,
|
|
1973
|
+
onOpenNotes: y,
|
|
1974
|
+
history: g,
|
|
1975
|
+
onOpenHistory: x,
|
|
1976
|
+
noteUnrecordedEdits: L,
|
|
1977
|
+
readOnly: P,
|
|
1978
|
+
onStatusChange: C,
|
|
1979
|
+
allowedStatuses: M,
|
|
1980
|
+
onDescriptionChange: D,
|
|
1981
|
+
descriptionMaxLength: _,
|
|
1982
|
+
descriptionMeasureLength: E,
|
|
1983
|
+
onAssignPatient: q,
|
|
1984
|
+
onEdit: z,
|
|
1985
|
+
onMove: re,
|
|
1986
|
+
onCopy: K,
|
|
1987
|
+
onDelete: j,
|
|
1988
|
+
onJoinTelehealth: Y,
|
|
1989
|
+
onWhatsApp: B,
|
|
1990
|
+
whatsappUrl: ne,
|
|
1991
|
+
onBuyWhatsApp: ae,
|
|
1992
|
+
createTaskUrl: N,
|
|
1993
|
+
onRequestSignature: G,
|
|
1994
|
+
onSignOnDevice: V,
|
|
1995
|
+
onOpenPatient: Ae,
|
|
1996
|
+
shortcuts: Ne,
|
|
1997
|
+
documents: xe
|
|
1998
|
+
},
|
|
1999
|
+
n.read.eventId
|
|
2000
|
+
) : n.status === "loading" ? de = /* @__PURE__ */ b(oe, { children: [
|
|
2001
|
+
ye,
|
|
2002
|
+
/* @__PURE__ */ e(Ha, {})
|
|
2003
|
+
] }) : de = /* @__PURE__ */ b(oe, { children: [
|
|
2004
|
+
ye,
|
|
2005
|
+
/* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
|
|
2006
|
+
/* @__PURE__ */ e(ee, { variant: n.status === "error" ? "error" : "warning", children: /* @__PURE__ */ e(ee.Description, { children: n.status === "error" ? ((Re = n.message) == null ? void 0 : Re.trim()) || h("emptyState.error.description") : n.reason }) }),
|
|
2007
|
+
Q ? /* @__PURE__ */ e(
|
|
2008
|
+
T,
|
|
2009
|
+
{
|
|
2010
|
+
intent: "outline",
|
|
2011
|
+
"data-action": "retry-load",
|
|
2012
|
+
onClick: () => {
|
|
2013
|
+
ve.current = !0, i == null || i();
|
|
2014
|
+
},
|
|
2015
|
+
children: h("emptyState.error.cta")
|
|
2016
|
+
}
|
|
2017
|
+
) : null
|
|
2018
|
+
] })
|
|
2019
|
+
] }), /* @__PURE__ */ e(
|
|
2020
|
+
"div",
|
|
2021
|
+
{
|
|
2022
|
+
ref: Be,
|
|
2023
|
+
id: He,
|
|
2024
|
+
"data-component": "appointment-details-panel",
|
|
2025
|
+
"data-component-id": fe,
|
|
2026
|
+
"data-event-id": Ce,
|
|
2027
|
+
"data-status": n.status,
|
|
2028
|
+
"aria-busy": n.status === "loading" || void 0,
|
|
2029
|
+
className: Ra({ className: he }),
|
|
2030
|
+
...X,
|
|
2031
|
+
children: de
|
|
2032
|
+
}
|
|
2033
|
+
);
|
|
2034
|
+
});
|
|
2035
|
+
Ba.displayName = "AppointmentDetailsPanel";
|
|
2036
|
+
function ls({
|
|
2037
|
+
eventId: t,
|
|
2038
|
+
load: n,
|
|
2039
|
+
reloadKey: i
|
|
2040
|
+
}) {
|
|
2041
|
+
const { t: r } = te("ui"), c = R("");
|
|
2042
|
+
c.current = r("emptyState.error.description");
|
|
2043
|
+
const o = R(n);
|
|
2044
|
+
pe(() => {
|
|
2045
|
+
o.current = n;
|
|
2046
|
+
});
|
|
2047
|
+
const [p, f] = H(0), [m, a] = H(), l = JSON.stringify([i ?? null, p]), [d, A] = H({ eventId: t, count: 0 }), v = d.eventId === t ? d.count : d.count + 1;
|
|
2048
|
+
d.eventId !== t && A({ eventId: t, count: v }), we(() => {
|
|
2049
|
+
if (t === null) {
|
|
2050
|
+
a(void 0);
|
|
2051
|
+
return;
|
|
2052
|
+
}
|
|
2053
|
+
const L = new AbortController(), P = (C) => {
|
|
2054
|
+
L.signal.aborted || a({ eventId: t, selection: v, request: l, value: C });
|
|
2055
|
+
};
|
|
2056
|
+
return Promise.resolve().then(() => o.current(t, { signal: L.signal })).then((C) => {
|
|
2057
|
+
var M, D;
|
|
2058
|
+
if (C.status !== "ready") {
|
|
2059
|
+
P({
|
|
2060
|
+
status: "refused",
|
|
2061
|
+
eventId: t,
|
|
2062
|
+
reason: C.reason,
|
|
2063
|
+
retryable: C.retryable
|
|
2064
|
+
});
|
|
2065
|
+
return;
|
|
2066
|
+
}
|
|
2067
|
+
if (((M = C.details) == null ? void 0 : M.eventId) !== t || !On((D = C.details.appointment) == null ? void 0 : D.startIso))
|
|
2068
|
+
throw new Error(c.current);
|
|
2069
|
+
P({ status: "ready", read: C.details });
|
|
2070
|
+
}).catch((C) => {
|
|
2071
|
+
P({
|
|
2072
|
+
status: "error",
|
|
2073
|
+
eventId: t,
|
|
2074
|
+
message: ot(C, c.current)
|
|
2075
|
+
});
|
|
2076
|
+
}), () => L.abort();
|
|
2077
|
+
}, [t, v, l]);
|
|
2078
|
+
const y = ln(() => f((L) => L + 1), []);
|
|
2079
|
+
if (t === null) return { state: null, retry: y };
|
|
2080
|
+
const g = (m == null ? void 0 : m.eventId) === t && m.selection === v ? m : void 0;
|
|
2081
|
+
let x = { status: "loading", eventId: t };
|
|
2082
|
+
return (g == null ? void 0 : g.request) === l ? x = g.value : (g == null ? void 0 : g.value.status) === "ready" && (x = { status: "ready", read: g.value.read, refreshing: !0 }), { state: x, retry: y };
|
|
2083
|
+
}
|
|
2084
|
+
export {
|
|
2085
|
+
Ba as A,
|
|
2086
|
+
ue as D,
|
|
2087
|
+
ga as a,
|
|
2088
|
+
ha as s,
|
|
2089
|
+
ls as u
|
|
2090
|
+
};
|
|
2091
|
+
//# sourceMappingURL=use-appointment-details-read-BR3TQOHx.js.map
|