@alfadocs/ui-kit-debug 1.133.0 → 1.134.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/{agenda-card-B8hV3dZV.js → agenda-card-B9wgX_Ed.js} +2 -2
- package/dist/_chunks/{agenda-card-B8hV3dZV.js.map → agenda-card-B9wgX_Ed.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-Bu46s3dI.js → agenda-tray-CGcS_qoM.js} +2 -2
- package/dist/_chunks/{agenda-tray-Bu46s3dI.js.map → agenda-tray-CGcS_qoM.js.map} +1 -1
- package/dist/_chunks/appointment-card-DG3m9yN-.js +504 -0
- package/dist/_chunks/appointment-card-DG3m9yN-.js.map +1 -0
- package/dist/_chunks/{appointment-peek-DZa6xyUb.js → appointment-peek-BK0tDs4C.js} +2 -2
- package/dist/_chunks/{appointment-peek-DZa6xyUb.js.map → appointment-peek-BK0tDs4C.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-DQePqpyH.js → appointment-timeline-BiI2riRZ.js} +2 -2
- package/dist/_chunks/{appointment-timeline-DQePqpyH.js.map → appointment-timeline-BiI2riRZ.js.map} +1 -1
- package/dist/_chunks/appointment-tray-ClJCtYQj.js +200 -0
- package/dist/_chunks/appointment-tray-ClJCtYQj.js.map +1 -0
- package/dist/_chunks/{appointment-workflow-status-DMjuIK90.js → appointment-workflow-status-S-lx81Yz.js} +2 -2
- package/dist/_chunks/{appointment-workflow-status-DMjuIK90.js.map → appointment-workflow-status-S-lx81Yz.js.map} +1 -1
- package/dist/_chunks/ban-CiSCCcOE.js +15 -0
- package/dist/_chunks/ban-CiSCCcOE.js.map +1 -0
- package/dist/_chunks/{calendar-BIoOeBTT.js → calendar-CyLtLBNP.js} +2 -2
- package/dist/_chunks/{calendar-BIoOeBTT.js.map → calendar-CyLtLBNP.js.map} +1 -1
- package/dist/_chunks/{calendar-appointment-editor-dialog-BHx6kUhX.js → calendar-appointment-editor-dialog-BSkIYGlW.js} +13 -13
- package/dist/_chunks/{calendar-appointment-editor-dialog-BHx6kUhX.js.map → calendar-appointment-editor-dialog-BSkIYGlW.js.map} +1 -1
- package/dist/_chunks/{calendar-event-card-BNEzkjm-.js → calendar-event-card-BJifpYZQ.js} +7 -6
- package/dist/_chunks/{calendar-event-card-BNEzkjm-.js.map → calendar-event-card-BJifpYZQ.js.map} +1 -1
- package/dist/_chunks/{care-plan-card-DKScH9Ss.js → care-plan-card-CjHq6PLo.js} +6 -6
- package/dist/_chunks/{care-plan-card-DKScH9Ss.js.map → care-plan-card-CjHq6PLo.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-AG1y3nyW.js → care-plan-entry-card-DY1toF6E.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-AG1y3nyW.js.map → care-plan-entry-card-DY1toF6E.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-Dx5OMkc9.js → care-plan-header-CeFXUDnL.js} +6 -6
- package/dist/_chunks/{care-plan-header-Dx5OMkc9.js.map → care-plan-header-CeFXUDnL.js.map} +1 -1
- package/dist/_chunks/check-in-documents-CEVcgcYZ.js +136 -0
- package/dist/_chunks/check-in-documents-CEVcgcYZ.js.map +1 -0
- package/dist/_chunks/{clinical-note-card-pPaeWWnu.js → clinical-note-card-D--IwbZa.js} +2 -2
- package/dist/_chunks/{clinical-note-card-pPaeWWnu.js.map → clinical-note-card-D--IwbZa.js.map} +1 -1
- package/dist/_chunks/document-preview-DLVIrOYV.js +385 -0
- package/dist/_chunks/document-preview-DLVIrOYV.js.map +1 -0
- package/dist/_chunks/{entity-card-fpm-KUKc.js → entity-card-p-LANpYt.js} +18 -17
- package/dist/_chunks/{entity-card-fpm-KUKc.js.map → entity-card-p-LANpYt.js.map} +1 -1
- package/dist/_chunks/{error-page-B0fGNTRB.js → error-page-WLhmWUTq.js} +100 -115
- package/dist/_chunks/error-page-WLhmWUTq.js.map +1 -0
- package/dist/_chunks/finished-terminal-unDnXT4j.js +191 -0
- package/dist/_chunks/finished-terminal-unDnXT4j.js.map +1 -0
- package/dist/_chunks/house-DGCypGTo.js +21 -0
- package/dist/_chunks/house-DGCypGTo.js.map +1 -0
- package/dist/_chunks/is-safe-url-CEy9CEml.js +8 -0
- package/dist/_chunks/is-safe-url-CEy9CEml.js.map +1 -0
- package/dist/_chunks/keypad-DBH_keVs.js +152 -0
- package/dist/_chunks/keypad-DBH_keVs.js.map +1 -0
- package/dist/_chunks/keypad-button-mOaPQRrH.js +114 -0
- package/dist/_chunks/keypad-button-mOaPQRrH.js.map +1 -0
- package/dist/_chunks/{message-card-BG3_3nN1.js → message-card-Bw_q1qKx.js} +2 -2
- package/dist/_chunks/{message-card-BG3_3nN1.js.map → message-card-Bw_q1qKx.js.map} +1 -1
- package/dist/_chunks/{message-tray-BjZv0Fsk.js → message-tray-pLGgLmoG.js} +2 -2
- package/dist/_chunks/{message-tray-BjZv0Fsk.js.map → message-tray-pLGgLmoG.js.map} +1 -1
- package/dist/_chunks/{note-attachment-MNTIqdSz.js → note-attachment-JTIy9iXN.js} +2 -2
- package/dist/_chunks/{note-attachment-MNTIqdSz.js.map → note-attachment-JTIy9iXN.js.map} +1 -1
- package/dist/_chunks/{note-timeline-BQeW0VZY.js → note-timeline-BbjHMhkL.js} +2 -2
- package/dist/_chunks/{note-timeline-BQeW0VZY.js.map → note-timeline-BbjHMhkL.js.map} +1 -1
- package/dist/_chunks/{notes-panel-Cm-_pCRJ.js → notes-panel-BAyPOr8N.js} +2 -2
- package/dist/_chunks/{notes-panel-Cm-_pCRJ.js.map → notes-panel-BAyPOr8N.js.map} +1 -1
- package/dist/_chunks/{operator-hero-CnfWckNQ.js → operator-hero-D4wfVu2l.js} +2 -2
- package/dist/_chunks/{operator-hero-CnfWckNQ.js.map → operator-hero-D4wfVu2l.js.map} +1 -1
- package/dist/_chunks/otp-input-BNOTlxq3.js +342 -0
- package/dist/_chunks/otp-input-BNOTlxq3.js.map +1 -0
- package/dist/_chunks/patient-account-settings-BkAtIxJW.js +546 -0
- package/dist/_chunks/patient-account-settings-BkAtIxJW.js.map +1 -0
- package/dist/_chunks/patient-card-DTh3QTyS.js +125 -0
- package/dist/_chunks/patient-card-DTh3QTyS.js.map +1 -0
- package/dist/_chunks/patient-check-in-resume-xhqjC6gf.js +742 -0
- package/dist/_chunks/patient-check-in-resume-xhqjC6gf.js.map +1 -0
- package/dist/_chunks/patient-sign-in-pin-CDBqV254.js +432 -0
- package/dist/_chunks/patient-sign-in-pin-CDBqV254.js.map +1 -0
- package/dist/_chunks/patient-sign-in-steps-C2JSqlok.js +199 -0
- package/dist/_chunks/patient-sign-in-steps-C2JSqlok.js.map +1 -0
- package/dist/_chunks/{patient-summary-card-BUcZ-gaL.js → patient-summary-card-Bl2NknPe.js} +2 -2
- package/dist/_chunks/{patient-summary-card-BUcZ-gaL.js.map → patient-summary-card-Bl2NknPe.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-Dv4WbRBe.js → payment-request-card-CNW00DCx.js} +6 -6
- package/dist/_chunks/{payment-request-card-Dv4WbRBe.js.map → payment-request-card-CNW00DCx.js.map} +1 -1
- package/dist/_chunks/{pdf-viewer-BnBKdx0y.js → pdf-viewer-TRC5jEm5.js} +472 -425
- package/dist/_chunks/pdf-viewer-TRC5jEm5.js.map +1 -0
- package/dist/_chunks/pin-entry-BugWQMOS.js +219 -0
- package/dist/_chunks/pin-entry-BugWQMOS.js.map +1 -0
- package/dist/_chunks/pin-indicator-Cb-n40UI.js +124 -0
- package/dist/_chunks/pin-indicator-Cb-n40UI.js.map +1 -0
- package/dist/_chunks/portal-details-CTEsm705.js +478 -0
- package/dist/_chunks/portal-details-CTEsm705.js.map +1 -0
- package/dist/_chunks/portal-documents-D8skew0h.js +902 -0
- package/dist/_chunks/portal-documents-D8skew0h.js.map +1 -0
- package/dist/_chunks/portal-parts-BdR29P7z.js +285 -0
- package/dist/_chunks/portal-parts-BdR29P7z.js.map +1 -0
- package/dist/_chunks/{privacy-mask-DJ1gee4c.js → privacy-mask-C19dJFMk.js} +5 -5
- package/dist/_chunks/{privacy-mask-DJ1gee4c.js.map → privacy-mask-C19dJFMk.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-a8wdVOUt.js → product-hub-panel-K4QbULG7.js} +2 -2
- package/dist/_chunks/{product-hub-panel-a8wdVOUt.js.map → product-hub-panel-K4QbULG7.js.map} +1 -1
- package/dist/_chunks/{registration-form-CwbhtKcy.js → registration-form-DS3RuKHu.js} +2 -2
- package/dist/_chunks/{registration-form-CwbhtKcy.js.map → registration-form-DS3RuKHu.js.map} +1 -1
- package/dist/_chunks/{reserved.agent-W8mR179D.js → reserved.agent-DOzOBUW7.js} +2 -2
- package/dist/_chunks/{reserved.agent-W8mR179D.js.map → reserved.agent-DOzOBUW7.js.map} +1 -1
- package/dist/_chunks/session-countdown-DOx1IBUB.js +232 -0
- package/dist/_chunks/session-countdown-DOx1IBUB.js.map +1 -0
- package/dist/_chunks/{sign-document-CQZVzfpk.js → sign-document-DDZbmYHu.js} +2 -2
- package/dist/_chunks/{sign-document-CQZVzfpk.js.map → sign-document-DDZbmYHu.js.map} +1 -1
- package/dist/_chunks/{signature-field-DjabvRZm.js → signature-field-BjlY_yXH.js} +39 -34
- package/dist/_chunks/signature-field-BjlY_yXH.js.map +1 -0
- package/dist/_chunks/{signature-request-4pGq3YBe.js → signature-request-CHsM_iWi.js} +2 -2
- package/dist/_chunks/{signature-request-4pGq3YBe.js.map → signature-request-CHsM_iWi.js.map} +1 -1
- package/dist/_chunks/{signature-status-chip-pIoQjvH8.js → signature-status-chip-DS9hHwIt.js} +66 -69
- package/dist/_chunks/signature-status-chip-DS9hHwIt.js.map +1 -0
- package/dist/_chunks/signing-end-screen-an9P8DOT.js +1041 -0
- package/dist/_chunks/signing-end-screen-an9P8DOT.js.map +1 -0
- package/dist/_chunks/sms-code-entry-Dgp4GwlM.js +316 -0
- package/dist/_chunks/sms-code-entry-Dgp4GwlM.js.map +1 -0
- package/dist/_chunks/step-up-dialog-C2JqJmCA.js +132 -0
- package/dist/_chunks/step-up-dialog-C2JqJmCA.js.map +1 -0
- package/dist/_chunks/{task-editor-BL2hHxNz.js → task-editor-g1AGfxhr.js} +38 -38
- package/dist/_chunks/{task-editor-BL2hHxNz.js.map → task-editor-g1AGfxhr.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-_b7FRB1x.js → use-appointment-details-read-Dzc6fEzG.js} +6 -6
- package/dist/_chunks/{use-appointment-details-read-_b7FRB1x.js.map → use-appointment-details-read-Dzc6fEzG.js.map} +1 -1
- package/dist/_chunks/use-zoom-drilldown-Cr1baU5X.js +221 -0
- package/dist/_chunks/use-zoom-drilldown-Cr1baU5X.js.map +1 -0
- package/dist/_chunks/{user-x-DYszNtIg.js → user-x-BJZg4kaP.js} +8 -19
- package/dist/_chunks/user-x-BJZg4kaP.js.map +1 -0
- package/dist/_chunks/{verify-identity-types-CxtrBXsZ.js → verify-identity-types-C6Bam8v6.js} +2 -2
- package/dist/_chunks/{verify-identity-types-CxtrBXsZ.js.map → verify-identity-types-C6Bam8v6.js.map} +1 -1
- package/dist/agent-catalog.json +723 -364
- package/dist/agent-i18n/en.json +75 -18
- package/dist/browser-support.js +1 -1
- package/dist/components/_shared/is-safe-url.d.ts +3 -1
- package/dist/components/_shared/is-safe-url.d.ts.map +1 -1
- package/dist/components/agenda-card/index.js +2 -2
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/appointment-card/appointment-card.d.ts +45 -0
- package/dist/components/appointment-card/appointment-card.d.ts.map +1 -1
- package/dist/components/appointment-card/appointment-tray.agent.d.ts.map +1 -1
- package/dist/components/appointment-card/appointment-tray.d.ts +11 -0
- package/dist/components/appointment-card/appointment-tray.d.ts.map +1 -1
- package/dist/components/appointment-card/index.js +3 -3
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/document-preview/document-preview.agent.d.ts.map +1 -1
- package/dist/components/document-preview/document-preview.d.ts +61 -7
- package/dist/components/document-preview/document-preview.d.ts.map +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/finished-terminal/finished-terminal.d.ts +63 -6
- package/dist/components/finished-terminal/finished-terminal.d.ts.map +1 -1
- package/dist/components/finished-terminal/index.d.ts +1 -1
- package/dist/components/finished-terminal/index.d.ts.map +1 -1
- package/dist/components/finished-terminal/index.js +1 -1
- package/dist/components/index.d.ts +12 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/keypad/index.d.ts +3 -0
- package/dist/components/keypad/index.d.ts.map +1 -0
- package/dist/components/keypad/index.js +6 -0
- package/dist/components/keypad/index.js.map +1 -0
- package/dist/components/keypad/keypad.d.ts +54 -0
- package/dist/components/keypad/keypad.d.ts.map +1 -0
- package/dist/components/keypad-button/index.d.ts +3 -0
- package/dist/components/keypad-button/index.d.ts.map +1 -0
- package/dist/components/keypad-button/index.js +6 -0
- package/dist/components/keypad-button/index.js.map +1 -0
- package/dist/components/keypad-button/keypad-button.d.ts +33 -0
- package/dist/components/keypad-button/keypad-button.d.ts.map +1 -0
- package/dist/components/message-card/index.js +2 -2
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/otp-input/otp-input.d.ts +11 -0
- package/dist/components/otp-input/otp-input.d.ts.map +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.agent.d.ts.map +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts +7 -0
- package/dist/components/pdf-viewer/pdf-viewer.d.ts.map +1 -1
- package/dist/components/pin-entry/index.d.ts +3 -0
- package/dist/components/pin-entry/index.d.ts.map +1 -0
- package/dist/components/pin-entry/index.js +5 -0
- package/dist/components/pin-entry/index.js.map +1 -0
- package/dist/components/pin-entry/pin-entry.agent.d.ts +4 -0
- package/dist/components/pin-entry/pin-entry.agent.d.ts.map +1 -0
- package/dist/components/pin-entry/pin-entry.d.ts +64 -0
- package/dist/components/pin-entry/pin-entry.d.ts.map +1 -0
- package/dist/components/pin-indicator/index.d.ts +3 -0
- package/dist/components/pin-indicator/index.d.ts.map +1 -0
- package/dist/components/pin-indicator/index.js +9 -0
- package/dist/components/pin-indicator/index.js.map +1 -0
- package/dist/components/pin-indicator/pin-indicator.d.ts +34 -0
- package/dist/components/pin-indicator/pin-indicator.d.ts.map +1 -0
- package/dist/components/product-hub-tray/index.js +2 -2
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/session-countdown/session-countdown.d.ts +19 -0
- package/dist/components/session-countdown/session-countdown.d.ts.map +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/signature-field/index.js +1 -1
- package/dist/components/signature-field/signature-field.d.ts +17 -6
- package/dist/components/signature-field/signature-field.d.ts.map +1 -1
- package/dist/components/signature-status-chip/index.js +1 -1
- package/dist/components/signature-status-chip/signature-status-chip.d.ts +3 -2
- package/dist/components/signature-status-chip/signature-status-chip.d.ts.map +1 -1
- package/dist/components/sms-code-entry/index.d.ts +3 -0
- package/dist/components/sms-code-entry/index.d.ts.map +1 -0
- package/dist/components/sms-code-entry/index.js +5 -0
- package/dist/components/sms-code-entry/index.js.map +1 -0
- package/dist/components/sms-code-entry/sms-code-entry.agent.d.ts +4 -0
- package/dist/components/sms-code-entry/sms-code-entry.agent.d.ts.map +1 -0
- package/dist/components/sms-code-entry/sms-code-entry.d.ts +156 -0
- package/dist/components/sms-code-entry/sms-code-entry.d.ts.map +1 -0
- package/dist/components/step-up-dialog/index.d.ts +3 -0
- package/dist/components/step-up-dialog/index.d.ts.map +1 -0
- package/dist/components/step-up-dialog/index.js +5 -0
- package/dist/components/step-up-dialog/index.js.map +1 -0
- package/dist/components/step-up-dialog/step-up-dialog.d.ts +108 -0
- package/dist/components/step-up-dialog/step-up-dialog.d.ts.map +1 -0
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/workflow-status/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-signing-session.d.ts +7 -2
- package/dist/hooks/use-signing-session.d.ts.map +1 -1
- package/dist/host-compat.css +10 -1
- package/dist/i18n/locales/ar.d.ts +512 -1
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +509 -3
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +512 -1
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +517 -4
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +512 -1
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +512 -4
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +514 -1
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +520 -4
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +512 -1
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +510 -4
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +512 -1
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +510 -4
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +512 -1
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +510 -4
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +512 -1
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +517 -4
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +512 -1
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +510 -4
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +512 -1
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +517 -4
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +512 -1
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +517 -4
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +512 -1
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +517 -4
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +512 -1
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +517 -4
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +512 -1
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +509 -3
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +512 -1
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +510 -4
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +512 -1
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +510 -4
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +512 -1
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +512 -4
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +512 -1
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +510 -4
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +1271 -1204
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +513 -2
- package/dist/locales/de.json +514 -3
- package/dist/locales/el.json +514 -3
- package/dist/locales/en.json +514 -3
- package/dist/locales/es.json +514 -3
- package/dist/locales/fr.json +514 -3
- package/dist/locales/hi.json +514 -3
- package/dist/locales/it.json +514 -3
- package/dist/locales/ja.json +514 -3
- package/dist/locales/nl.json +514 -3
- package/dist/locales/pl.json +514 -3
- package/dist/locales/pt.json +514 -3
- package/dist/locales/ro.json +514 -3
- package/dist/locales/ru.json +513 -2
- package/dist/locales/sq.json +514 -3
- package/dist/locales/sv.json +514 -3
- package/dist/locales/tr.json +514 -3
- package/dist/locales/zh.json +514 -3
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/check-in-documents/check-in-documents.d.ts +61 -0
- package/dist/patterns/check-in-documents/check-in-documents.d.ts.map +1 -0
- package/dist/patterns/check-in-documents/check-in-signable-document.d.ts +32 -0
- package/dist/patterns/check-in-documents/check-in-signable-document.d.ts.map +1 -0
- package/dist/patterns/check-in-documents/index.d.ts +4 -0
- package/dist/patterns/check-in-documents/index.d.ts.map +1 -0
- package/dist/patterns/check-in-documents/index.js +5 -0
- package/dist/patterns/check-in-documents/index.js.map +1 -0
- package/dist/patterns/error-page/index.js +1 -1
- package/dist/patterns/patient-account-settings/index.d.ts +4 -0
- package/dist/patterns/patient-account-settings/index.d.ts.map +1 -0
- package/dist/patterns/patient-account-settings/index.js +5 -0
- package/dist/patterns/patient-account-settings/index.js.map +1 -0
- package/dist/patterns/patient-account-settings/patient-account-settings-panels.d.ts +36 -0
- package/dist/patterns/patient-account-settings/patient-account-settings-panels.d.ts.map +1 -0
- package/dist/patterns/patient-account-settings/patient-account-settings.d.ts +94 -0
- package/dist/patterns/patient-account-settings/patient-account-settings.d.ts.map +1 -0
- package/dist/patterns/patient-account-settings/patient-account-settings.types.d.ts +91 -0
- package/dist/patterns/patient-account-settings/patient-account-settings.types.d.ts.map +1 -0
- package/dist/patterns/patient-check-in/index.d.ts +20 -0
- package/dist/patterns/patient-check-in/index.d.ts.map +1 -0
- package/dist/patterns/patient-check-in/index.js +13 -0
- package/dist/patterns/patient-check-in/index.js.map +1 -0
- package/dist/patterns/patient-check-in/patient-check-in-changed.d.ts +33 -0
- package/dist/patterns/patient-check-in/patient-check-in-changed.d.ts.map +1 -0
- package/dist/patterns/patient-check-in/patient-check-in-connection-notice.d.ts +29 -0
- package/dist/patterns/patient-check-in/patient-check-in-connection-notice.d.ts.map +1 -0
- package/dist/patterns/patient-check-in/patient-check-in-done.d.ts +25 -0
- package/dist/patterns/patient-check-in/patient-check-in-done.d.ts.map +1 -0
- package/dist/patterns/patient-check-in/patient-check-in-entry.d.ts +29 -0
- package/dist/patterns/patient-check-in/patient-check-in-entry.d.ts.map +1 -0
- package/dist/patterns/patient-check-in/patient-check-in-hub-empty.d.ts +23 -0
- package/dist/patterns/patient-check-in/patient-check-in-hub-empty.d.ts.map +1 -0
- package/dist/patterns/patient-check-in/patient-check-in-hub.d.ts +61 -0
- package/dist/patterns/patient-check-in/patient-check-in-hub.d.ts.map +1 -0
- package/dist/patterns/patient-check-in/patient-check-in-personal-data.d.ts +73 -0
- package/dist/patterns/patient-check-in/patient-check-in-personal-data.d.ts.map +1 -0
- package/dist/patterns/patient-check-in/patient-check-in-privacy.d.ts +9 -0
- package/dist/patterns/patient-check-in/patient-check-in-privacy.d.ts.map +1 -0
- package/dist/patterns/patient-check-in/patient-check-in-resume.d.ts +29 -0
- package/dist/patterns/patient-check-in/patient-check-in-resume.d.ts.map +1 -0
- package/dist/patterns/patient-check-in/patient-check-in-shell.d.ts +60 -0
- package/dist/patterns/patient-check-in/patient-check-in-shell.d.ts.map +1 -0
- package/dist/patterns/patient-check-in/patient-check-in-types.d.ts +92 -0
- package/dist/patterns/patient-check-in/patient-check-in-types.d.ts.map +1 -0
- package/dist/patterns/patient-portal/index.d.ts +12 -0
- package/dist/patterns/patient-portal/index.d.ts.map +1 -0
- package/dist/patterns/patient-portal/index.js +13 -0
- package/dist/patterns/patient-portal/index.js.map +1 -0
- package/dist/patterns/patient-portal/portal-appointments.d.ts +70 -0
- package/dist/patterns/patient-portal/portal-appointments.d.ts.map +1 -0
- package/dist/patterns/patient-portal/portal-details.d.ts +148 -0
- package/dist/patterns/patient-portal/portal-details.d.ts.map +1 -0
- package/dist/patterns/patient-portal/portal-documents.d.ts +74 -0
- package/dist/patterns/patient-portal/portal-documents.d.ts.map +1 -0
- package/dist/patterns/patient-portal/portal-format.d.ts +14 -0
- package/dist/patterns/patient-portal/portal-format.d.ts.map +1 -0
- package/dist/patterns/patient-portal/portal-home.d.ts +71 -0
- package/dist/patterns/patient-portal/portal-home.d.ts.map +1 -0
- package/dist/patterns/patient-portal/portal-parts.d.ts +107 -0
- package/dist/patterns/patient-portal/portal-parts.d.ts.map +1 -0
- package/dist/patterns/patient-portal/portal-shell.d.ts +84 -0
- package/dist/patterns/patient-portal/portal-shell.d.ts.map +1 -0
- package/dist/patterns/patient-portal/portal-types.d.ts +157 -0
- package/dist/patterns/patient-portal/portal-types.d.ts.map +1 -0
- package/dist/patterns/patient-sign-in/index.d.ts +7 -0
- package/dist/patterns/patient-sign-in/index.d.ts.map +1 -0
- package/dist/patterns/patient-sign-in/index.js +15 -0
- package/dist/patterns/patient-sign-in/index.js.map +1 -0
- package/dist/patterns/patient-sign-in/patient-card.d.ts +74 -0
- package/dist/patterns/patient-sign-in/patient-card.d.ts.map +1 -0
- package/dist/patterns/patient-sign-in/patient-sign-in-email.d.ts +109 -0
- package/dist/patterns/patient-sign-in/patient-sign-in-email.d.ts.map +1 -0
- package/dist/patterns/patient-sign-in/patient-sign-in-pin.d.ts +157 -0
- package/dist/patterns/patient-sign-in/patient-sign-in-pin.d.ts.map +1 -0
- package/dist/patterns/patient-sign-in/patient-sign-in-steps.d.ts +143 -0
- package/dist/patterns/patient-sign-in/patient-sign-in-steps.d.ts.map +1 -0
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signing/index.d.ts +25 -0
- package/dist/patterns/signing/index.d.ts.map +1 -0
- package/dist/patterns/signing/index.js +16 -0
- package/dist/patterns/signing/index.js.map +1 -0
- package/dist/patterns/signing/multi-field-signer.d.ts +117 -0
- package/dist/patterns/signing/multi-field-signer.d.ts.map +1 -0
- package/dist/patterns/signing/signing-awaiting-screen.d.ts +25 -0
- package/dist/patterns/signing/signing-awaiting-screen.d.ts.map +1 -0
- package/dist/patterns/signing/signing-chrome.d.ts +30 -0
- package/dist/patterns/signing/signing-chrome.d.ts.map +1 -0
- package/dist/patterns/signing/signing-document-screen.d.ts +87 -0
- package/dist/patterns/signing/signing-document-screen.d.ts.map +1 -0
- package/dist/patterns/signing/signing-end-screen.d.ts +27 -0
- package/dist/patterns/signing/signing-end-screen.d.ts.map +1 -0
- package/dist/patterns/signing/signing-finished-screen.d.ts +34 -0
- package/dist/patterns/signing/signing-finished-screen.d.ts.map +1 -0
- package/dist/patterns/signing/signing-footer.d.ts +56 -0
- package/dist/patterns/signing/signing-footer.d.ts.map +1 -0
- package/dist/patterns/signing/signing-handoff-screen.d.ts +37 -0
- package/dist/patterns/signing/signing-handoff-screen.d.ts.map +1 -0
- package/dist/patterns/signing/signing-message-dialog.d.ts +29 -0
- package/dist/patterns/signing/signing-message-dialog.d.ts.map +1 -0
- package/dist/patterns/signing/signing-progress-chip.d.ts +27 -0
- package/dist/patterns/signing/signing-progress-chip.d.ts.map +1 -0
- package/dist/patterns/signing/signing-roster.d.ts +44 -0
- package/dist/patterns/signing/signing-roster.d.ts.map +1 -0
- package/dist/patterns/signing/signing-staff-id-confirmation.d.ts +49 -0
- package/dist/patterns/signing/signing-staff-id-confirmation.d.ts.map +1 -0
- package/dist/patterns/verify-identity/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +49 -1
- package/dist/_chunks/appointment-card-OAOur8lH.js +0 -434
- package/dist/_chunks/appointment-card-OAOur8lH.js.map +0 -1
- package/dist/_chunks/appointment-tray-DSFqO5Rm.js +0 -193
- package/dist/_chunks/appointment-tray-DSFqO5Rm.js.map +0 -1
- package/dist/_chunks/document-preview-_kQ9QvZV.js +0 -291
- package/dist/_chunks/document-preview-_kQ9QvZV.js.map +0 -1
- package/dist/_chunks/error-page-B0fGNTRB.js.map +0 -1
- package/dist/_chunks/finished-terminal-FR8uc_Ws.js +0 -122
- package/dist/_chunks/finished-terminal-FR8uc_Ws.js.map +0 -1
- package/dist/_chunks/is-safe-url-DkETxeHz.js +0 -7
- package/dist/_chunks/is-safe-url-DkETxeHz.js.map +0 -1
- package/dist/_chunks/otp-input-gV1446Dw.js +0 -301
- package/dist/_chunks/otp-input-gV1446Dw.js.map +0 -1
- package/dist/_chunks/pdf-viewer-BnBKdx0y.js.map +0 -1
- package/dist/_chunks/session-countdown-C4tzbJVc.js +0 -223
- package/dist/_chunks/session-countdown-C4tzbJVc.js.map +0 -1
- package/dist/_chunks/signature-field-DjabvRZm.js.map +0 -1
- package/dist/_chunks/signature-status-chip-pIoQjvH8.js.map +0 -1
- package/dist/_chunks/use-zoom-drilldown-qCX34w9I.js +0 -210
- package/dist/_chunks/use-zoom-drilldown-qCX34w9I.js.map +0 -1
- package/dist/_chunks/user-x-DYszNtIg.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment-peek-DZa6xyUb.js","sources":["../../src/components/appointment-peek/appointment-peek.tsx"],"sourcesContent":["import {\n forwardRef,\n isValidElement,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Armchair, Clock, EyeOff, Video } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { Avatar } from '../avatar';\nimport { DescriptionList } from '../description-list';\nimport { HoverCard } from '../hover-card';\nimport { WorkflowStatusDisplay } from '../workflow-status';\nimport {\n appointmentStateWorkflow,\n type AppointmentState,\n} from '../_shared/entity-card';\n\n/* -------------------------------------------------------------------- */\n/* AppointmentPeek */\n/* */\n/* The body of a calendar hover card: who, when, where, and the status */\n/* in the kit's one status face. Renders inside `HoverCard.Content`; its */\n/* name is a `HoverCard.Heading`, so the card takes its accessible name */\n/* from the patient without the host wiring it. */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n 'ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)]',\n);\n\nexport interface AppointmentPeekDetail {\n /** Leading glyph, decorative. */\n icon?: ReactNode;\n /** The term, already translated: \"Care\", \"Operator\". */\n label: string;\n value: ReactNode;\n}\n\nexport interface AppointmentPeekProps extends HTMLAttributes<HTMLDivElement> {\n /** Patient name, or the event title for an appointment with no patient. */\n name: string;\n /** Photo for the avatar; initials are drawn from `name` without one. */\n avatarSrc?: string;\n /** Host-formatted time range, e.g. \"09:30–11:00\". */\n time: string;\n /** Chair or room, already translated. With `telehealth`, the visit type. */\n location?: string;\n /** Swaps the chair glyph for a video camera. */\n telehealth?: boolean;\n /**\n * Appointment status, shown through `WorkflowStatusDisplay`. Leave it out\n * when the host has none recorded: no status is not the same as\n * confirmed, so the card shows no status face at all.\n */\n status?: AppointmentState;\n /**\n * Override the status caption, e.g. \"Arrived · waiting 12 min\". Still shown\n * under `privacy`, so keep it free of patient data. Ignored without\n * `status`.\n */\n statusLabel?: string;\n /** Extra rows after time and location: care, operator. */\n details?: AppointmentPeekDetail[];\n /** Event suffix fallback when appointment metadata is absent. Hidden in privacy. */\n treatment?: string;\n /** Indicator chips (Badges): booked online, anamnesis. Never status. */\n flags?: ReactNode;\n /**\n * Masks the name and drops everything personal: avatar, details and\n * flags. Time, place and status stay; they\n * are not patient data.\n */\n privacy?: boolean;\n}\n\nexport const AppointmentPeek = forwardRef<HTMLDivElement, AppointmentPeekProps>(\n (\n {\n name,\n avatarSrc,\n time,\n location,\n telehealth = false,\n status,\n statusLabel,\n details,\n treatment,\n flags,\n privacy = false,\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const workflow = status ? appointmentStateWorkflow(status) : null;\n const StatusIcon = workflow?.Icon;\n\n const LocationIcon = telehealth ? Video : Armchair;\n const showClinical = !privacy;\n\n const rows: {\n icon: ReactElement | null;\n label: string;\n value: ReactNode;\n }[] = [\n { icon: <Clock />, label: t('appointmentPeek.time'), value: time },\n ...(location\n ? [\n {\n icon: <LocationIcon />,\n label: t('appointmentPeek.location'),\n value: location,\n },\n ]\n : []),\n ...(showClinical && treatment\n ? [\n {\n icon: null,\n label: t('calendarWorkspace.details.care'),\n value: treatment,\n },\n ]\n : []),\n ...(showClinical && details\n ? details.map((detail) => ({\n icon: isValidElement(detail.icon) ? detail.icon : null,\n label: detail.label,\n value: detail.value,\n }))\n : []),\n ];\n\n return (\n <div\n ref={ref}\n data-component=\"appointment-peek\"\n data-status={status}\n className={rootVariants({ className })}\n {...props}\n >\n {/* Avatar, name and the indicator chips together, every fact on its\n own row below, status last: the same identity block as\n PatientDetails. */}\n <div className=\"ds:flex ds:min-w-0 ds:items-start ds:gap-[var(--spacing-sm)]\">\n {privacy ? null : (\n <Avatar\n size=\"sm\"\n name={name}\n src={avatarSrc}\n aria-hidden=\"true\"\n className=\"ds:shrink-0\"\n />\n )}\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <HoverCard.Heading className=\"ds:min-w-0\">\n {privacy ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <EyeOff\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0\"\n />\n {t('appointmentPeek.hiddenName')}\n </span>\n ) : (\n name\n )}\n </HoverCard.Heading>\n {showClinical && flags ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]\">\n {flags}\n </div>\n ) : null}\n </div>\n </div>\n\n <DescriptionList\n layout=\"inline\"\n density=\"compact\"\n divider=\"none\"\n // Label icons in the accent, as in PatientDetails.\n className=\"ds:[--description-list-icon-color:var(--accent)]\"\n >\n {rows.map((row, index) => (\n <DescriptionList.Row key={index} icon={row.icon}>\n <DescriptionList.Term>{row.label}</DescriptionList.Term>\n <DescriptionList.Detail>{row.value}</DescriptionList.Detail>\n </DescriptionList.Row>\n ))}\n </DescriptionList>\n\n {/* The kit's one status face: the same display the details panel,\n AppointmentCard and the history use, so a status never reads\n differently on the grid. Last, so the card reads who, what, then\n where it stands. Nothing at all when none is recorded. */}\n {status && workflow && StatusIcon ? (\n <div data-slot=\"workflow\">\n <WorkflowStatusDisplay\n size=\"sm\"\n value={status}\n option={{\n value: status,\n label: statusLabel ?? t(`appointmentCard.state.${status}`),\n icon: <StatusIcon aria-hidden=\"true\" />,\n tone: workflow.tone,\n }}\n />\n </div>\n ) : null}\n </div>\n );\n },\n);\nAppointmentPeek.displayName = 'AppointmentPeek';\n"],"names":["rootVariants","cva","AppointmentPeek","forwardRef","name","avatarSrc","time","location","telehealth","status","statusLabel","details","treatment","flags","privacy","className","props","ref","t","useTranslation","workflow","appointmentStateWorkflow","StatusIcon","LocationIcon","Video","Armchair","showClinical","rows","jsx","Clock","detail","isValidElement","jsxs","Avatar","HoverCard","EyeOff","DescriptionList","row","index","WorkflowStatusDisplay"],"mappings":";;;;;;;;;;;;;AA4BA,MAAMA,IAAeC;AAAA,EACnB;AACF,GA+CaC,IAAkBC;AAAA,EAC7B,CACE;AAAA,IACE,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,QAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,WAAAC;AAAA,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MF,EAAS;AAAA,cAAA;AAAA,YACjB;AAAA,UAAA,GAEJ,IACE;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AACAlB,EAAgB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"appointment-peek-BK0tDs4C.js","sources":["../../src/components/appointment-peek/appointment-peek.tsx"],"sourcesContent":["import {\n forwardRef,\n isValidElement,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Armchair, Clock, EyeOff, Video } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { Avatar } from '../avatar';\nimport { DescriptionList } from '../description-list';\nimport { HoverCard } from '../hover-card';\nimport { WorkflowStatusDisplay } from '../workflow-status';\nimport {\n appointmentStateWorkflow,\n type AppointmentState,\n} from '../_shared/entity-card';\n\n/* -------------------------------------------------------------------- */\n/* AppointmentPeek */\n/* */\n/* The body of a calendar hover card: who, when, where, and the status */\n/* in the kit's one status face. Renders inside `HoverCard.Content`; its */\n/* name is a `HoverCard.Heading`, so the card takes its accessible name */\n/* from the patient without the host wiring it. */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n 'ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-sm)]',\n);\n\nexport interface AppointmentPeekDetail {\n /** Leading glyph, decorative. */\n icon?: ReactNode;\n /** The term, already translated: \"Care\", \"Operator\". */\n label: string;\n value: ReactNode;\n}\n\nexport interface AppointmentPeekProps extends HTMLAttributes<HTMLDivElement> {\n /** Patient name, or the event title for an appointment with no patient. */\n name: string;\n /** Photo for the avatar; initials are drawn from `name` without one. */\n avatarSrc?: string;\n /** Host-formatted time range, e.g. \"09:30–11:00\". */\n time: string;\n /** Chair or room, already translated. With `telehealth`, the visit type. */\n location?: string;\n /** Swaps the chair glyph for a video camera. */\n telehealth?: boolean;\n /**\n * Appointment status, shown through `WorkflowStatusDisplay`. Leave it out\n * when the host has none recorded: no status is not the same as\n * confirmed, so the card shows no status face at all.\n */\n status?: AppointmentState;\n /**\n * Override the status caption, e.g. \"Arrived · waiting 12 min\". Still shown\n * under `privacy`, so keep it free of patient data. Ignored without\n * `status`.\n */\n statusLabel?: string;\n /** Extra rows after time and location: care, operator. */\n details?: AppointmentPeekDetail[];\n /** Event suffix fallback when appointment metadata is absent. Hidden in privacy. */\n treatment?: string;\n /** Indicator chips (Badges): booked online, anamnesis. Never status. */\n flags?: ReactNode;\n /**\n * Masks the name and drops everything personal: avatar, details and\n * flags. Time, place and status stay; they\n * are not patient data.\n */\n privacy?: boolean;\n}\n\nexport const AppointmentPeek = forwardRef<HTMLDivElement, AppointmentPeekProps>(\n (\n {\n name,\n avatarSrc,\n time,\n location,\n telehealth = false,\n status,\n statusLabel,\n details,\n treatment,\n flags,\n privacy = false,\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const workflow = status ? appointmentStateWorkflow(status) : null;\n const StatusIcon = workflow?.Icon;\n\n const LocationIcon = telehealth ? Video : Armchair;\n const showClinical = !privacy;\n\n const rows: {\n icon: ReactElement | null;\n label: string;\n value: ReactNode;\n }[] = [\n { icon: <Clock />, label: t('appointmentPeek.time'), value: time },\n ...(location\n ? [\n {\n icon: <LocationIcon />,\n label: t('appointmentPeek.location'),\n value: location,\n },\n ]\n : []),\n ...(showClinical && treatment\n ? [\n {\n icon: null,\n label: t('calendarWorkspace.details.care'),\n value: treatment,\n },\n ]\n : []),\n ...(showClinical && details\n ? details.map((detail) => ({\n icon: isValidElement(detail.icon) ? detail.icon : null,\n label: detail.label,\n value: detail.value,\n }))\n : []),\n ];\n\n return (\n <div\n ref={ref}\n data-component=\"appointment-peek\"\n data-status={status}\n className={rootVariants({ className })}\n {...props}\n >\n {/* Avatar, name and the indicator chips together, every fact on its\n own row below, status last: the same identity block as\n PatientDetails. */}\n <div className=\"ds:flex ds:min-w-0 ds:items-start ds:gap-[var(--spacing-sm)]\">\n {privacy ? null : (\n <Avatar\n size=\"sm\"\n name={name}\n src={avatarSrc}\n aria-hidden=\"true\"\n className=\"ds:shrink-0\"\n />\n )}\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <HoverCard.Heading className=\"ds:min-w-0\">\n {privacy ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <EyeOff\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0\"\n />\n {t('appointmentPeek.hiddenName')}\n </span>\n ) : (\n name\n )}\n </HoverCard.Heading>\n {showClinical && flags ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]\">\n {flags}\n </div>\n ) : null}\n </div>\n </div>\n\n <DescriptionList\n layout=\"inline\"\n density=\"compact\"\n divider=\"none\"\n // Label icons in the accent, as in PatientDetails.\n className=\"ds:[--description-list-icon-color:var(--accent)]\"\n >\n {rows.map((row, index) => (\n <DescriptionList.Row key={index} icon={row.icon}>\n <DescriptionList.Term>{row.label}</DescriptionList.Term>\n <DescriptionList.Detail>{row.value}</DescriptionList.Detail>\n </DescriptionList.Row>\n ))}\n </DescriptionList>\n\n {/* The kit's one status face: the same display the details panel,\n AppointmentCard and the history use, so a status never reads\n differently on the grid. Last, so the card reads who, what, then\n where it stands. Nothing at all when none is recorded. */}\n {status && workflow && StatusIcon ? (\n <div data-slot=\"workflow\">\n <WorkflowStatusDisplay\n size=\"sm\"\n value={status}\n option={{\n value: status,\n label: statusLabel ?? t(`appointmentCard.state.${status}`),\n icon: <StatusIcon aria-hidden=\"true\" />,\n tone: workflow.tone,\n }}\n />\n </div>\n ) : null}\n </div>\n );\n },\n);\nAppointmentPeek.displayName = 'AppointmentPeek';\n"],"names":["rootVariants","cva","AppointmentPeek","forwardRef","name","avatarSrc","time","location","telehealth","status","statusLabel","details","treatment","flags","privacy","className","props","ref","t","useTranslation","workflow","appointmentStateWorkflow","StatusIcon","LocationIcon","Video","Armchair","showClinical","rows","jsx","Clock","detail","isValidElement","jsxs","Avatar","HoverCard","EyeOff","DescriptionList","row","index","WorkflowStatusDisplay"],"mappings":";;;;;;;;;;;;;AA4BA,MAAMA,IAAeC;AAAA,EACnB;AACF,GA+CaC,IAAkBC;AAAA,EAC7B,CACE;AAAA,IACE,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,QAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,IAAI,GAC3BC,IAAWX,IAASY,EAAyBZ,CAAM,IAAI,MACvDa,IAAaF,KAAA,gBAAAA,EAAU,MAEvBG,IAAef,IAAagB,IAAQC,GACpCC,IAAe,CAACZ,GAEhBa,IAIA;AAAA,MACJ,EAAE,MAAM,gBAAAC,EAACC,GAAA,EAAM,GAAI,OAAOX,EAAE,sBAAsB,GAAG,OAAOZ,EAAA;AAAA,MAC5D,GAAIC,IACA;AAAA,QACE;AAAA,UACE,wBAAOgB,GAAA,EAAa;AAAA,UACpB,OAAOL,EAAE,0BAA0B;AAAA,UACnC,OAAOX;AAAA,QAAA;AAAA,MACT,IAEF,CAAA;AAAA,MACJ,GAAImB,KAAgBd,IAChB;AAAA,QACE;AAAA,UACE,MAAM;AAAA,UACN,OAAOM,EAAE,gCAAgC;AAAA,UACzC,OAAON;AAAA,QAAA;AAAA,MACT,IAEF,CAAA;AAAA,MACJ,GAAIc,KAAgBf,IAChBA,EAAQ,IAAI,CAACmB,OAAY;AAAA,QACvB,MAAMC,EAAeD,EAAO,IAAI,IAAIA,EAAO,OAAO;AAAA,QAClD,OAAOA,EAAO;AAAA,QACd,OAAOA,EAAO;AAAA,MAAA,EACd,IACF,CAAA;AAAA,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,YAAI,MAAA,CAAM;AAAA,cAAA,EAAA,GAFXE,CAG1B,CACD;AAAA,YAAA;AAAA,UAAA;AAAA,UAOF7B,KAAUW,KAAYE,IACrB,gBAAAM,EAAC,OAAA,EAAI,aAAU,YACb,UAAA,gBAAAA;AAAA,YAACW;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,OAAO9B;AAAA,cACP,QAAQ;AAAA,gBACN,OAAOA;AAAA,gBACP,OAAOC,KAAeQ,EAAE,yBAAyBT,CAAM,EAAE;AAAA,gBACzD,MAAM,gBAAAmB,EAACN,GAAA,EAAW,eAAY,OAAA,CAAO;AAAA,gBACrC,MAAMF,EAAS;AAAA,cAAA;AAAA,YACjB;AAAA,UAAA,GAEJ,IACE;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AACAlB,EAAgB,cAAc;"}
|
|
@@ -2,7 +2,7 @@ import { jsxs as x, jsx as o, Fragment as He } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as Me, useId as Ne, useMemo as j, useRef as y, useState as $, useEffect as Fe, useCallback as b, useImperativeHandle as _e } from "react";
|
|
3
3
|
import { c as ze } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as Ae } from "react-i18next";
|
|
5
|
-
import { A as ne } from "./appointment-card-
|
|
5
|
+
import { A as ne } from "./appointment-card-DG3m9yN-.js";
|
|
6
6
|
import { B as P } from "./button-DohK_Ak_.js";
|
|
7
7
|
import { B as Be } from "./button-group-DuQuuulC.js";
|
|
8
8
|
import { D as Ke } from "./date-picker-BmVBVpVu.js";
|
|
@@ -449,4 +449,4 @@ export {
|
|
|
449
449
|
Ze as A,
|
|
450
450
|
Oe as a
|
|
451
451
|
};
|
|
452
|
-
//# sourceMappingURL=appointment-timeline-
|
|
452
|
+
//# sourceMappingURL=appointment-timeline-BiI2riRZ.js.map
|
package/dist/_chunks/{appointment-timeline-DQePqpyH.js.map → appointment-timeline-BiI2riRZ.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment-timeline-DQePqpyH.js","sources":["../../src/components/appointment-timeline/appointment-timeline.agent.ts","../../src/components/appointment-timeline/appointment-timeline.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — AppointmentTimeline. */\n/* */\n/* Timeline surface: read appointment ids + lifecycle state (never */\n/* patient names / treatments), activate a row through the curated handle, */\n/* and re-anchor the scroll on today. In-page (no open/close). */\n/* `showPatient` is presentation only — it changes which name each row */\n/* leads with, never what the adapter reads or exposes. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { AppointmentTimelineHandle } from './appointment-timeline';\n\nexport const appointmentTimelineAgent: AgentAdapter<AppointmentTimelineHandle> =\n {\n id: 'appointment-timeline',\n // 'pick' backs select_item (non-persisting activation through\n // onOpenAppointment); 'scroll' backs jump_to_today, which re-anchors the\n // scroll viewport (mirrors practice-results' scroll_to_result).\n capabilities: ['scroll', 'pick'],\n state: {\n items: {\n type: 'Array<{ id: string; state: string }>',\n descriptionKey: 'ui.agent.appointmentTimeline.state.items',\n description:\n 'Currently-rendered appointments. Ids + lifecycle state only — never patient identity.',\n read: (handle) => handle.getItems(),\n },\n },\n actions: {\n select_item: {\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.appointmentTimeline.actions.selectItem',\n description: 'Activate the appointment with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.selectItem(args.id);\n },\n },\n jump_to_today: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.appointmentTimeline.actions.jumpToToday',\n description: \"Re-anchor the timeline scroll on today's appointments.\",\n invoke: (handle) => {\n handle.jumpToToday();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'appointment-timeline',\n description: 'Marks the AppointmentTimeline wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific timeline from the agent.',\n },\n item: {\n attr: 'data-appointment-id',\n description:\n 'Stable appointment id emitted on each rendered AppointmentCard inside the timeline.',\n },\n },\n };\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CalendarDays } from 'lucide-react';\nimport { AppointmentCard, type AppointmentItem } from '../appointment-card';\nimport { Button } from '../button';\nimport { ButtonGroup } from '../button-group';\nimport { DatePicker } from '../date-picker';\nimport { PanelHeader } from '../panel-header';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { usePrefersReducedMotion } from '../../hooks/use-prefers-reduced-motion';\nimport { REFLOW_ROW_CLASS, useListReflow } from '../../hooks/use-list-reflow';\nimport { useExitTransition } from '../../hooks/use-exit-transition';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { appointmentTimelineAgent } from './appointment-timeline.agent';\n\n/* -------------------------------------------------------------------- */\n/* AppointmentTimeline */\n/* */\n/* A vertical, day-grouped appointment timeline for the Control Room */\n/* rail. Unlike AppointmentTray (a bordered card of a flat list), this */\n/* fills the rail edge-to-edge: appointments are grouped under day */\n/* headers, the scroll is anchored on TODAY, and it scrolls infinitely */\n/* into the past and future — the consumer feeds more via onLoadEarlier */\n/* / onLoadLater as either edge is reached (scroll position is preserved */\n/* when earlier items prepend). Date-filter presets + a jump-to-date */\n/* picker re-anchor the scroll. Top + bottom transparent gradient fades */\n/* (a block-axis mask) signal more content beyond each edge. */\n/* */\n/* Each row reuses AppointmentCard (care-plan + chair chips included). */\n/* All visible text flows through useTranslation('ui') against the */\n/* `appointmentTimeline.*` namespace; no PHI reaches the agent adapter. */\n/* -------------------------------------------------------------------- */\n\n/* How close (px) to an edge before the matching load callback fires. */\nconst EDGE_LOAD_THRESHOLD = 96;\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/** Curated imperative handle — identifiers + lifecycle state only. */\nexport interface AppointmentTimelineHandle {\n getItems: () => Array<{ id: string; state: string }>;\n selectItem: (id: string) => void;\n jumpToToday: () => void;\n}\n\nexport interface AppointmentTimelineProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'onClick' | 'id' | 'title'\n> {\n /** Stable instance id, surfaced as `data-component-id`. */\n id?: string;\n /** Appointments to render — any order; grouped + sorted internally. */\n items: AppointmentItem[];\n /**\n * ISO-8601 \"now\" anchor — the timeline scrolls to this day on mount and the\n * \"Today\" preset returns to it. Defaults to the current instant. Stories pass\n * a fixed value for deterministic snapshots.\n */\n nowIso?: string;\n /** Panel heading. Defaults to the localised \"Appointments\". */\n title?: string;\n /** BCP-47 locale override for day headers + each AppointmentCard. */\n locale?: string;\n /** ISO-4217 currency code passed to each AppointmentCard. */\n currency?: string;\n /** Visual density passed to each AppointmentCard. */\n size?: 'sm' | 'md';\n /**\n * Lead each row with the PATIENT (avatar + name as the row title) rather\n * than the operator. Default `false`: the timeline was built for a\n * patient-scoped rail, where repeating the name on every row is noise. A\n * clinic-wide agenda — \"who is coming in next\" across the practice —\n * passes `true`, and rows with no patient read as \"No patient\".\n */\n showPatient?: boolean;\n /** Fires when a row is activated. */\n onOpenAppointment?: (item: AppointmentItem) => void;\n /**\n * The id of the currently selected appointment. The matching card\n * renders with `selected` (info-tinted accent + `aria-current`) so the\n * eye keeps its place in the list after a click.\n */\n selectedId?: string;\n\n /* ----- Infinite scroll ----- */\n /** Load earlier (past) appointments — fired when the top edge is reached. */\n onLoadEarlier?: () => void;\n /** Load later (future) appointments — fired when the bottom edge is reached. */\n onLoadLater?: () => void;\n /** Whether more past appointments exist. Defaults to `true` when `onLoadEarlier` is set. */\n hasMoreEarlier?: boolean;\n /** Whether more future appointments exist. Defaults to `true` when `onLoadLater` is set. */\n hasMoreLater?: boolean;\n /** Show a loading row at the top edge. */\n loadingEarlier?: boolean;\n /** Show a loading row at the bottom edge. */\n loadingLater?: boolean;\n\n /* ----- Filters ----- */\n /** Show the date-filter row (presets + jump-to-date). Default `true`. */\n showFilters?: boolean;\n /**\n * Fired when a jump-to-date / preset targets a day outside the loaded range,\n * so the consumer can load it. The timeline scrolls to the nearest rendered\n * day until then.\n */\n onJumpToDate?: (dateIso: string) => void;\n\n /* ----- Empty ----- */\n emptyTitle?: string;\n emptyDescription?: string;\n\n /** Accessible name for the panel region (defaults to `title`). */\n 'aria-label'?: string;\n\n /**\n * Content rendered between the header/filter row and the scroll region —\n * a summary strip, a \"happening now\" band, anything the host needs\n * ahead of the day-grouped list. Omitted by default (no change to\n * today's layout). Not part of the scroll region: it stays fixed like\n * the header above it.\n */\n headerExtra?: ReactNode;\n /**\n * Forwarded to every row's `AppointmentCard`: withhold the lifecycle\n * badge for the default/expected state (`confirmed`). Default `false`\n * (today's behaviour — every state shows its badge).\n */\n hideDefaultStatus?: boolean;\n}\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n [\n 'ds:flex ds:flex-col ds:h-full ds:min-h-0',\n 'ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]',\n ].join(' '),\n { variants: { size: { sm: '', md: '' } }, defaultVariants: { size: 'sm' } },\n);\n\n/* Scroll region with a block-axis fade mask. The CSS custom properties flip to\n `transparent` at whichever edge has more content (data-fade-top /\n data-fade-bottom), mirroring the TabBar edge-mask technique on the Y axis.\n Disabled under reduced-motion, the accessible theme, and forced-colors. */\nconst scrollRegionClasses = [\n 'ds:flex-1 ds:min-h-0 ds:overflow-y-auto',\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]',\n 'ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]',\n 'ds:[--atl-mask-top:black] ds:[--atl-mask-bottom:black]',\n 'ds:data-[fade-top=true]:[--atl-mask-top:transparent]',\n 'ds:data-[fade-bottom=true]:[--atl-mask-bottom:transparent]',\n 'ds:[mask-image:var(--accessible-off,linear-gradient(to_bottom,var(--atl-mask-top)_0,black_var(--atl-fade-distance,var(--spacing-lg)),black_calc(100%-var(--atl-fade-distance,var(--spacing-lg))),var(--atl-mask-bottom)_100%))]',\n 'ds:motion-reduce:[mask-image:none]',\n 'ds:forced-colors:[mask-image:none]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:[outline-offset:-2px]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n].join(' ');\n\n/* -------------------------------------------------------------------- */\n/* Day grouping + header labels */\n/* -------------------------------------------------------------------- */\n\ninterface DayGroup {\n key: string;\n date: Date;\n items: AppointmentItem[];\n}\n\n/** Local calendar day key (`YYYY-MM-DD`) — sorts chronologically as a string. */\nfunction localDayKey(d: Date): string {\n const m = `${d.getMonth() + 1}`.padStart(2, '0');\n const day = `${d.getDate()}`.padStart(2, '0');\n return `${d.getFullYear()}-${m}-${day}`;\n}\n\nfunction groupByDay(items: AppointmentItem[]): DayGroup[] {\n const sorted = [...items].sort(\n (a, b) => +new Date(a.startIso) - +new Date(b.startIso),\n );\n const map = new Map<string, DayGroup>();\n for (const item of sorted) {\n const d = new Date(item.startIso);\n const key = localDayKey(d);\n let group = map.get(key);\n if (!group) {\n group = {\n key,\n date: new Date(d.getFullYear(), d.getMonth(), d.getDate()),\n items: [],\n };\n map.set(key, group);\n }\n group.items.push(item);\n }\n return [...map.values()];\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const AppointmentTimeline = forwardRef<\n HTMLElement,\n AppointmentTimelineProps\n>(\n (\n {\n id,\n items,\n nowIso,\n title,\n locale,\n currency,\n size = 'sm',\n showPatient = false,\n onOpenAppointment,\n selectedId,\n onLoadEarlier,\n onLoadLater,\n hasMoreEarlier,\n hasMoreLater,\n loadingEarlier = false,\n loadingLater = false,\n showFilters = true,\n onJumpToDate,\n emptyTitle,\n emptyDescription,\n className,\n 'aria-label': ariaLabel,\n headerExtra,\n hideDefaultStatus = false,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation('ui');\n const jumpId = useId();\n const prefersReducedMotion = usePrefersReducedMotion();\n const resolvedLocale = locale ?? i18n.language;\n\n const heading = title ?? t('appointmentTimeline.title');\n const now = useMemo(\n () => (nowIso ? new Date(nowIso) : new Date()),\n [nowIso],\n );\n\n const groups = useMemo(() => groupByDay(items), [items]);\n\n /* Reflow + exit transitions — the same pair notes and tasks use. When\n an appointment is added or removed, surviving cards slide to their\n new positions instead of snapping; a removed card fades out in place\n before the host drops it, so the removal reads as a removal. */\n const reduceMotion = prefersReducedMotion || undefined;\n const flatItemIds = useMemo(\n () => groups.flatMap((g) => g.items.map((i) => i.id)).join(),\n [groups],\n );\n const { containerRef: reflowRef } = useListReflow<HTMLOListElement>({\n key: flatItemIds,\n reduceMotion,\n });\n const exitTransition = useExitTransition({ reduceMotion });\n\n /* Track removed items so they can fade out in place. The previous\n items array is diffed against the current one; removed ids are held\n in `leavingItems` and rendered after the live groups, faded, until\n the exit transition elapses and drops them. */\n const prevItemsRef = useRef(items);\n const [leavingItems, setLeavingItems] = useState<AppointmentItem[]>([]);\n useEffect(() => {\n const prev = prevItemsRef.current;\n if (prev === items) return;\n const currentIds = new Set(items.map((i) => i.id));\n const removed = prev.filter((i) => !currentIds.has(i.id));\n if (removed.length > 0) {\n setLeavingItems((prev) => [...prev, ...removed]);\n removed.forEach((item) => {\n exitTransition.leave(item.id, () => {\n setLeavingItems((prev) => prev.filter((i) => i.id !== item.id));\n });\n });\n }\n prevItemsRef.current = items;\n }, [items, exitTransition]);\n\n const moreEarlier = hasMoreEarlier ?? !!onLoadEarlier;\n const moreLater = hasMoreLater ?? !!onLoadLater;\n\n /* The day to anchor on: today if present, else the nearest upcoming day,\n else the last day we have. */\n const anchorKey = useMemo(() => {\n if (groups.length === 0) return undefined;\n const todayKey = localDayKey(now);\n const keys = groups.map((g) => g.key);\n if (keys.includes(todayKey)) return todayKey;\n return keys.find((k) => k >= todayKey) ?? keys[keys.length - 1];\n }, [groups, now]);\n\n const scrollRef = useRef<HTMLDivElement>(null);\n const dayElRefs = useRef<Map<string, HTMLElement>>(new Map());\n const hasAnchored = useRef(false);\n const prevFirstKey = useRef<string | undefined>(undefined);\n const prevScrollHeight = useRef(0);\n\n const [fadeTop, setFadeTop] = useState(false);\n const [fadeBottom, setFadeBottom] = useState(false);\n\n const updateEdges = useCallback(() => {\n const region = scrollRef.current;\n if (!region) return;\n const { scrollTop, scrollHeight, clientHeight } = region;\n setFadeTop(scrollTop > 1);\n setFadeBottom(scrollTop + clientHeight < scrollHeight - 1);\n }, []);\n\n /* Scroll a day into view at the top of the region. Falls back to the\n nearest rendered day on/after the target (presets may land on an empty\n day). Uses getBoundingClientRect so it is offsetParent-agnostic. */\n const scrollToKey = useCallback(\n (targetKey: string, smooth: boolean) => {\n const region = scrollRef.current;\n if (!region) return;\n let el = dayElRefs.current.get(targetKey);\n if (!el) {\n const keys = [...dayElRefs.current.keys()].sort();\n const next =\n keys.find((k) => k >= targetKey) ?? keys[keys.length - 1];\n el = next ? dayElRefs.current.get(next) : undefined;\n }\n if (!el) return;\n const delta =\n el.getBoundingClientRect().top - region.getBoundingClientRect().top;\n region.scrollTo({\n top: region.scrollTop + delta,\n behavior: smooth && !prefersReducedMotion ? 'smooth' : 'auto',\n });\n },\n [prefersReducedMotion],\n );\n\n /* Anchor on mount; preserve the viewport when earlier days prepend. */\n useIsomorphicLayoutEffect(() => {\n const region = scrollRef.current;\n if (!region) return;\n const firstKey = groups[0]?.key;\n if (!hasAnchored.current) {\n if (groups.length > 0 && anchorKey) {\n scrollToKey(anchorKey, false);\n hasAnchored.current = true;\n }\n } else if (\n prevFirstKey.current &&\n firstKey &&\n firstKey < prevFirstKey.current\n ) {\n const grew = region.scrollHeight - prevScrollHeight.current;\n if (grew > 0) region.scrollTop += grew;\n }\n prevFirstKey.current = firstKey;\n prevScrollHeight.current = region.scrollHeight;\n updateEdges();\n }, [groups, anchorKey, scrollToKey, updateEdges]);\n\n /* Recompute the fades when the region resizes. */\n useIsomorphicLayoutEffect(() => {\n const region = scrollRef.current;\n if (!region || typeof ResizeObserver === 'undefined') return undefined;\n const observer = new ResizeObserver(updateEdges);\n observer.observe(region);\n return () => observer.disconnect();\n }, [updateEdges]);\n\n const handleScroll = useCallback(() => {\n updateEdges();\n const region = scrollRef.current;\n if (!region) return;\n const { scrollTop, scrollHeight, clientHeight } = region;\n if (\n onLoadEarlier &&\n moreEarlier &&\n !loadingEarlier &&\n scrollTop <= EDGE_LOAD_THRESHOLD\n ) {\n onLoadEarlier();\n }\n if (\n onLoadLater &&\n moreLater &&\n !loadingLater &&\n scrollHeight - scrollTop - clientHeight <= EDGE_LOAD_THRESHOLD\n ) {\n onLoadLater();\n }\n }, [\n updateEdges,\n onLoadEarlier,\n onLoadLater,\n moreEarlier,\n moreLater,\n loadingEarlier,\n loadingLater,\n ]);\n\n /* ----- Filter actions ----- */\n const jumpTo = useCallback(\n (date: Date) => {\n const key = localDayKey(date);\n const known = dayElRefs.current.has(key);\n scrollToKey(key, true);\n if (!known) onJumpToDate?.(date.toISOString());\n },\n [scrollToKey, onJumpToDate],\n );\n\n const handleToday = useCallback(() => jumpTo(now), [jumpTo, now]);\n const handleThisWeek = useCallback(() => {\n const start = new Date(now);\n const dow = (start.getDay() + 6) % 7; // Monday-based week start\n start.setDate(start.getDate() - dow);\n jumpTo(start);\n }, [jumpTo, now]);\n const handleThisMonth = useCallback(() => {\n jumpTo(new Date(now.getFullYear(), now.getMonth(), 1));\n }, [jumpTo, now]);\n\n /* ----- Agent handle ----- */\n const itemsRef = useRef<AppointmentItem[]>(items);\n itemsRef.current = items;\n const innerRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => innerRef.current as HTMLElement, []);\n\n const handle = useMemo<AppointmentTimelineHandle>(\n () => ({\n getItems: () =>\n itemsRef.current.map((i) => ({ id: i.id, state: i.state })),\n selectItem: (targetId: string) => {\n const found = itemsRef.current.find((i) => i.id === targetId);\n if (found) onOpenAppointment?.(found);\n },\n jumpToToday: () => scrollToKey(localDayKey(now), true),\n }),\n [onOpenAppointment, scrollToKey, now],\n );\n useAgentRegistration(appointmentTimelineAgent, handle, id);\n\n const isEmpty = groups.length === 0 && !loadingEarlier && !loadingLater;\n\n const loadingRow = (key: string) => (\n <div\n key={key}\n aria-hidden=\"true\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:py-[var(--spacing-xs)]\"\n >\n <Skeleton variant=\"rectangular\" height=\"3.5rem\" />\n </div>\n );\n\n return (\n <section\n ref={innerRef}\n data-component=\"appointment-timeline\"\n data-component-id={id}\n aria-label={ariaLabel ?? heading}\n className={rootVariants({ size, className })}\n {...rest}\n >\n {/* Shared rail header: title + (optional) filter row + divider. This\n panel owns its own scroll/fill, so the header stays a fixed band\n (sticky={false}). The rail injects the favourite/close cluster via\n PanelHeaderActionsProvider; standalone it renders none. */}\n <PanelHeader\n icon={<CalendarDays />}\n title={heading}\n filters={\n showFilters ? (\n <>\n <ButtonGroup label={t('appointmentTimeline.filtersLabel')}>\n <Button intent=\"outline\" size=\"sm\" onClick={handleToday}>\n {t('appointmentTimeline.today')}\n </Button>\n <Button intent=\"outline\" size=\"sm\" onClick={handleThisWeek}>\n {t('appointmentTimeline.thisWeek')}\n </Button>\n <Button intent=\"outline\" size=\"sm\" onClick={handleThisMonth}>\n {t('appointmentTimeline.thisMonth')}\n </Button>\n </ButtonGroup>\n <label htmlFor={jumpId} className=\"ds:sr-only\">\n {t('appointmentTimeline.jumpToDate')}\n </label>\n <DatePicker\n id={jumpId}\n size=\"sm\"\n placeholder={t('appointmentTimeline.jumpToDate')}\n onChange={(date) => {\n if (date) jumpTo(date);\n }}\n />\n </>\n ) : undefined\n }\n />\n\n {headerExtra}\n\n {isEmpty ? (\n <div className=\"ds:flex-1 ds:p-[var(--spacing-md)]\">\n <EmptyState\n variant=\"first-use\"\n size=\"sm\"\n title={emptyTitle ?? t('appointmentTimeline.empty.title')}\n description={\n emptyDescription ?? t('appointmentTimeline.empty.description')\n }\n />\n </div>\n ) : (\n <div\n ref={scrollRef}\n // The scroll region must be keyboard-focusable so arrow / Home /\n // End can drive it (axe scrollable-region-focusable); jsx-a11y's\n // generic rule doesn't know this element scrolls.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n onScroll={handleScroll}\n data-fade-top={fadeTop ? 'true' : undefined}\n data-fade-bottom={fadeBottom ? 'true' : undefined}\n className={scrollRegionClasses}\n >\n {loadingEarlier ? loadingRow('loading-earlier') : null}\n {/* eslint-disable-next-line jsx-a11y/no-redundant-roles -- role=\"list\" is NOT redundant: WebKit drops implicit list semantics when list-style is none */}\n <ol\n ref={reflowRef}\n role=\"list\"\n className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-md)] ds:p-0\"\n >\n {groups.map((group) => (\n <li\n key={group.key}\n ref={(node) => {\n if (node) dayElRefs.current.set(group.key, node);\n else dayElRefs.current.delete(group.key);\n }}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\"\n >\n <DayHeader\n date={group.date}\n now={now}\n locale={resolvedLocale}\n todayLabel={t('appointmentTimeline.today')}\n tomorrowLabel={t('appointmentTimeline.tomorrow')}\n yesterdayLabel={t('appointmentTimeline.yesterday')}\n />\n {/* eslint-disable-next-line jsx-a11y/no-redundant-roles -- role=\"list\" is NOT redundant: WebKit drops implicit list semantics when list-style is none */}\n <ul\n role=\"list\"\n className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0\"\n >\n {group.items.map((item) => (\n <AppointmentCard\n key={item.id}\n item={item}\n size={size}\n surface=\"elevated\"\n showPatient={showPatient}\n locale={resolvedLocale}\n currency={currency}\n onActivate={onOpenAppointment}\n selected={item.id === selectedId}\n hideDefaultStatus={hideDefaultStatus}\n data-appointment-id={item.id}\n data-reflow-id={item.id}\n className={REFLOW_ROW_CLASS}\n />\n ))}\n </ul>\n </li>\n ))}\n {/* Leaving cards: removed from state but held for the exit\n fade. Rendered without `data-reflow-id` so the reflow hook\n ignores them; faded via `data-leaving`. */}\n {leavingItems.length > 0\n ? leavingItems.map((item) => (\n <AppointmentCard\n key={`leaving-${item.id}`}\n item={item}\n size={size}\n surface=\"elevated\"\n showPatient={showPatient}\n locale={resolvedLocale}\n currency={currency}\n aria-hidden=\"true\"\n data-leaving\n className={[\n 'ds:opacity-0',\n 'ds:transition-opacity',\n 'ds:duration-[var(--animation-duration)]',\n 'ds:ease-[var(--ease-out)]',\n 'ds:motion-reduce:transition-none',\n ].join(' ')}\n />\n ))\n : null}\n </ol>\n {loadingLater ? loadingRow('loading-later') : null}\n </div>\n )}\n </section>\n );\n },\n);\n\nAppointmentTimeline.displayName = 'AppointmentTimeline';\n\n/* -------------------------------------------------------------------- */\n/* Day header — sticky label per day group */\n/* -------------------------------------------------------------------- */\n\ninterface DayHeaderProps {\n date: Date;\n now: Date;\n locale: string | undefined;\n todayLabel: string;\n tomorrowLabel: string;\n yesterdayLabel: string;\n}\n\nfunction DayHeader({\n date,\n now,\n locale,\n todayLabel,\n tomorrowLabel,\n yesterdayLabel,\n}: DayHeaderProps): ReactNode {\n const key = localDayKey(date);\n const todayKey = localDayKey(now);\n const tomorrow = new Date(now);\n tomorrow.setDate(now.getDate() + 1);\n const yesterday = new Date(now);\n yesterday.setDate(now.getDate() - 1);\n\n const isToday = key === todayKey;\n\n let label: string;\n if (isToday) label = todayLabel;\n else if (key === localDayKey(tomorrow)) label = tomorrowLabel;\n else if (key === localDayKey(yesterday)) label = yesterdayLabel;\n else {\n const sameYear = date.getFullYear() === now.getFullYear();\n label = new Intl.DateTimeFormat(locale, {\n weekday: 'short',\n day: 'numeric',\n month: 'short',\n ...(sameYear ? {} : { year: 'numeric' }),\n }).format(date);\n }\n\n // Today's group is marked with the brand colour + a leading dot so the\n // current day reads at a glance. `--primary` clears AA on the card in every\n // theme (violet-500 light, magenta on dark); the dot is decorative.\n return (\n <div\n data-today={isToday ? 'true' : undefined}\n className={[\n 'ds:sticky ds:top-0 ds:z-[1] ds:bg-[color:var(--card)] ds:py-[var(--spacing-2xs)]',\n 'ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] type-eyebrow',\n isToday\n ? 'ds:text-[color:var(--primary)] ds:font-semibold'\n : 'ds:text-[color:var(--muted-foreground)]',\n ].join(' ')}\n >\n {isToday ? (\n <span\n aria-hidden=\"true\"\n className=\"ds:size-1.5 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--primary)]\"\n />\n ) : null}\n {label}\n </div>\n );\n}\n\n/** Re-export of the size variant union for downstream typing. */\nexport type AppointmentTimelineSize = NonNullable<\n VariantProps<typeof rootVariants>['size']\n>;\n"],"names":["appointmentTimelineAgent","handle","args","EDGE_LOAD_THRESHOLD","rootVariants","cva","scrollRegionClasses","localDayKey","d","m","day","groupByDay","items","sorted","a","b","map","item","key","group","AppointmentTimeline","forwardRef","id","nowIso","title","locale","currency","size","showPatient","onOpenAppointment","selectedId","onLoadEarlier","onLoadLater","hasMoreEarlier","hasMoreLater","loadingEarlier","loadingLater","showFilters","onJumpToDate","emptyTitle","emptyDescription","className","ariaLabel","headerExtra","hideDefaultStatus","rest","ref","t","i18n","useTranslation","jumpId","useId","prefersReducedMotion","usePrefersReducedMotion","resolvedLocale","heading","now","useMemo","groups","reduceMotion","flatItemIds","g","i","reflowRef","useListReflow","exitTransition","useExitTransition","prevItemsRef","useRef","leavingItems","setLeavingItems","useState","useEffect","prev","currentIds","removed","moreEarlier","moreLater","anchorKey","todayKey","keys","k","scrollRef","dayElRefs","hasAnchored","prevFirstKey","prevScrollHeight","fadeTop","setFadeTop","fadeBottom","setFadeBottom","updateEdges","useCallback","region","scrollTop","scrollHeight","clientHeight","scrollToKey","targetKey","smooth","el","next","delta","useIsomorphicLayoutEffect","firstKey","_a","grew","observer","handleScroll","jumpTo","date","known","handleToday","handleThisWeek","start","dow","handleThisMonth","itemsRef","innerRef","useImperativeHandle","targetId","found","useAgentRegistration","isEmpty","loadingRow","jsx","Skeleton","jsxs","PanelHeader","CalendarDays","Fragment","ButtonGroup","Button","DatePicker","EmptyState","node","DayHeader","AppointmentCard","REFLOW_ROW_CLASS","todayLabel","tomorrowLabel","yesterdayLabel","tomorrow","yesterday","isToday","label","sameYear"],"mappings":";;;;;;;;;;;;;;;;AAaO,MAAMA,KACX;AAAA,EACE,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,cAAc,CAAC,UAAU,MAAM;AAAA,EAC/B,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,EACpC;AAAA,EAEF,SAAS;AAAA,IACP,aAAa;AAAA,MACX,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,IAAI,EAAE,MAAM,WAAS;AAAA,QACnC,UAAU,CAAC,IAAI;AAAA,MAAA;AAAA,MAEjB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,GAAQC,MAAyB;AACxC,QAAAD,EAAO,WAAWC,EAAK,EAAE;AAAA,MAC3B;AAAA,IAAA;AAAA,IAEF,eAAe;AAAA,MACb,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACD,MAAW;AAClB,QAAAA,EAAO,YAAA;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ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AA;AAAA,QAAAA,IACC,gBAAAnB;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,IAEV;AAAA,QACHoB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
1
|
+
{"version":3,"file":"appointment-timeline-BiI2riRZ.js","sources":["../../src/components/appointment-timeline/appointment-timeline.agent.ts","../../src/components/appointment-timeline/appointment-timeline.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — AppointmentTimeline. */\n/* */\n/* Timeline surface: read appointment ids + lifecycle state (never */\n/* patient names / treatments), activate a row through the curated handle, */\n/* and re-anchor the scroll on today. In-page (no open/close). */\n/* `showPatient` is presentation only — it changes which name each row */\n/* leads with, never what the adapter reads or exposes. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { AppointmentTimelineHandle } from './appointment-timeline';\n\nexport const appointmentTimelineAgent: AgentAdapter<AppointmentTimelineHandle> =\n {\n id: 'appointment-timeline',\n // 'pick' backs select_item (non-persisting activation through\n // onOpenAppointment); 'scroll' backs jump_to_today, which re-anchors the\n // scroll viewport (mirrors practice-results' scroll_to_result).\n capabilities: ['scroll', 'pick'],\n state: {\n items: {\n type: 'Array<{ id: string; state: string }>',\n descriptionKey: 'ui.agent.appointmentTimeline.state.items',\n description:\n 'Currently-rendered appointments. Ids + lifecycle state only — never patient identity.',\n read: (handle) => handle.getItems(),\n },\n },\n actions: {\n select_item: {\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.appointmentTimeline.actions.selectItem',\n description: 'Activate the appointment with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.selectItem(args.id);\n },\n },\n jump_to_today: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.appointmentTimeline.actions.jumpToToday',\n description: \"Re-anchor the timeline scroll on today's appointments.\",\n invoke: (handle) => {\n handle.jumpToToday();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'appointment-timeline',\n description: 'Marks the AppointmentTimeline wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific timeline from the agent.',\n },\n item: {\n attr: 'data-appointment-id',\n description:\n 'Stable appointment id emitted on each rendered AppointmentCard inside the timeline.',\n },\n },\n };\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CalendarDays } from 'lucide-react';\nimport { AppointmentCard, type AppointmentItem } from '../appointment-card';\nimport { Button } from '../button';\nimport { ButtonGroup } from '../button-group';\nimport { DatePicker } from '../date-picker';\nimport { PanelHeader } from '../panel-header';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { usePrefersReducedMotion } from '../../hooks/use-prefers-reduced-motion';\nimport { REFLOW_ROW_CLASS, useListReflow } from '../../hooks/use-list-reflow';\nimport { useExitTransition } from '../../hooks/use-exit-transition';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { appointmentTimelineAgent } from './appointment-timeline.agent';\n\n/* -------------------------------------------------------------------- */\n/* AppointmentTimeline */\n/* */\n/* A vertical, day-grouped appointment timeline for the Control Room */\n/* rail. Unlike AppointmentTray (a bordered card of a flat list), this */\n/* fills the rail edge-to-edge: appointments are grouped under day */\n/* headers, the scroll is anchored on TODAY, and it scrolls infinitely */\n/* into the past and future — the consumer feeds more via onLoadEarlier */\n/* / onLoadLater as either edge is reached (scroll position is preserved */\n/* when earlier items prepend). Date-filter presets + a jump-to-date */\n/* picker re-anchor the scroll. Top + bottom transparent gradient fades */\n/* (a block-axis mask) signal more content beyond each edge. */\n/* */\n/* Each row reuses AppointmentCard (care-plan + chair chips included). */\n/* All visible text flows through useTranslation('ui') against the */\n/* `appointmentTimeline.*` namespace; no PHI reaches the agent adapter. */\n/* -------------------------------------------------------------------- */\n\n/* How close (px) to an edge before the matching load callback fires. */\nconst EDGE_LOAD_THRESHOLD = 96;\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/** Curated imperative handle — identifiers + lifecycle state only. */\nexport interface AppointmentTimelineHandle {\n getItems: () => Array<{ id: string; state: string }>;\n selectItem: (id: string) => void;\n jumpToToday: () => void;\n}\n\nexport interface AppointmentTimelineProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'onClick' | 'id' | 'title'\n> {\n /** Stable instance id, surfaced as `data-component-id`. */\n id?: string;\n /** Appointments to render — any order; grouped + sorted internally. */\n items: AppointmentItem[];\n /**\n * ISO-8601 \"now\" anchor — the timeline scrolls to this day on mount and the\n * \"Today\" preset returns to it. Defaults to the current instant. Stories pass\n * a fixed value for deterministic snapshots.\n */\n nowIso?: string;\n /** Panel heading. Defaults to the localised \"Appointments\". */\n title?: string;\n /** BCP-47 locale override for day headers + each AppointmentCard. */\n locale?: string;\n /** ISO-4217 currency code passed to each AppointmentCard. */\n currency?: string;\n /** Visual density passed to each AppointmentCard. */\n size?: 'sm' | 'md';\n /**\n * Lead each row with the PATIENT (avatar + name as the row title) rather\n * than the operator. Default `false`: the timeline was built for a\n * patient-scoped rail, where repeating the name on every row is noise. A\n * clinic-wide agenda — \"who is coming in next\" across the practice —\n * passes `true`, and rows with no patient read as \"No patient\".\n */\n showPatient?: boolean;\n /** Fires when a row is activated. */\n onOpenAppointment?: (item: AppointmentItem) => void;\n /**\n * The id of the currently selected appointment. The matching card\n * renders with `selected` (info-tinted accent + `aria-current`) so the\n * eye keeps its place in the list after a click.\n */\n selectedId?: string;\n\n /* ----- Infinite scroll ----- */\n /** Load earlier (past) appointments — fired when the top edge is reached. */\n onLoadEarlier?: () => void;\n /** Load later (future) appointments — fired when the bottom edge is reached. */\n onLoadLater?: () => void;\n /** Whether more past appointments exist. Defaults to `true` when `onLoadEarlier` is set. */\n hasMoreEarlier?: boolean;\n /** Whether more future appointments exist. Defaults to `true` when `onLoadLater` is set. */\n hasMoreLater?: boolean;\n /** Show a loading row at the top edge. */\n loadingEarlier?: boolean;\n /** Show a loading row at the bottom edge. */\n loadingLater?: boolean;\n\n /* ----- Filters ----- */\n /** Show the date-filter row (presets + jump-to-date). Default `true`. */\n showFilters?: boolean;\n /**\n * Fired when a jump-to-date / preset targets a day outside the loaded range,\n * so the consumer can load it. The timeline scrolls to the nearest rendered\n * day until then.\n */\n onJumpToDate?: (dateIso: string) => void;\n\n /* ----- Empty ----- */\n emptyTitle?: string;\n emptyDescription?: string;\n\n /** Accessible name for the panel region (defaults to `title`). */\n 'aria-label'?: string;\n\n /**\n * Content rendered between the header/filter row and the scroll region —\n * a summary strip, a \"happening now\" band, anything the host needs\n * ahead of the day-grouped list. Omitted by default (no change to\n * today's layout). Not part of the scroll region: it stays fixed like\n * the header above it.\n */\n headerExtra?: ReactNode;\n /**\n * Forwarded to every row's `AppointmentCard`: withhold the lifecycle\n * badge for the default/expected state (`confirmed`). Default `false`\n * (today's behaviour — every state shows its badge).\n */\n hideDefaultStatus?: boolean;\n}\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n [\n 'ds:flex ds:flex-col ds:h-full ds:min-h-0',\n 'ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]',\n ].join(' '),\n { variants: { size: { sm: '', md: '' } }, defaultVariants: { size: 'sm' } },\n);\n\n/* Scroll region with a block-axis fade mask. The CSS custom properties flip to\n `transparent` at whichever edge has more content (data-fade-top /\n data-fade-bottom), mirroring the TabBar edge-mask technique on the Y axis.\n Disabled under reduced-motion, the accessible theme, and forced-colors. */\nconst scrollRegionClasses = [\n 'ds:flex-1 ds:min-h-0 ds:overflow-y-auto',\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]',\n 'ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]',\n 'ds:[--atl-mask-top:black] ds:[--atl-mask-bottom:black]',\n 'ds:data-[fade-top=true]:[--atl-mask-top:transparent]',\n 'ds:data-[fade-bottom=true]:[--atl-mask-bottom:transparent]',\n 'ds:[mask-image:var(--accessible-off,linear-gradient(to_bottom,var(--atl-mask-top)_0,black_var(--atl-fade-distance,var(--spacing-lg)),black_calc(100%-var(--atl-fade-distance,var(--spacing-lg))),var(--atl-mask-bottom)_100%))]',\n 'ds:motion-reduce:[mask-image:none]',\n 'ds:forced-colors:[mask-image:none]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:[outline-offset:-2px]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n].join(' ');\n\n/* -------------------------------------------------------------------- */\n/* Day grouping + header labels */\n/* -------------------------------------------------------------------- */\n\ninterface DayGroup {\n key: string;\n date: Date;\n items: AppointmentItem[];\n}\n\n/** Local calendar day key (`YYYY-MM-DD`) — sorts chronologically as a string. */\nfunction localDayKey(d: Date): string {\n const m = `${d.getMonth() + 1}`.padStart(2, '0');\n const day = `${d.getDate()}`.padStart(2, '0');\n return `${d.getFullYear()}-${m}-${day}`;\n}\n\nfunction groupByDay(items: AppointmentItem[]): DayGroup[] {\n const sorted = [...items].sort(\n (a, b) => +new Date(a.startIso) - +new Date(b.startIso),\n );\n const map = new Map<string, DayGroup>();\n for (const item of sorted) {\n const d = new Date(item.startIso);\n const key = localDayKey(d);\n let group = map.get(key);\n if (!group) {\n group = {\n key,\n date: new Date(d.getFullYear(), d.getMonth(), d.getDate()),\n items: [],\n };\n map.set(key, group);\n }\n group.items.push(item);\n }\n return [...map.values()];\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const AppointmentTimeline = forwardRef<\n HTMLElement,\n AppointmentTimelineProps\n>(\n (\n {\n id,\n items,\n nowIso,\n title,\n locale,\n currency,\n size = 'sm',\n showPatient = false,\n onOpenAppointment,\n selectedId,\n onLoadEarlier,\n onLoadLater,\n hasMoreEarlier,\n hasMoreLater,\n loadingEarlier = false,\n loadingLater = false,\n showFilters = true,\n onJumpToDate,\n emptyTitle,\n emptyDescription,\n className,\n 'aria-label': ariaLabel,\n headerExtra,\n hideDefaultStatus = false,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation('ui');\n const jumpId = useId();\n const prefersReducedMotion = usePrefersReducedMotion();\n const resolvedLocale = locale ?? i18n.language;\n\n const heading = title ?? t('appointmentTimeline.title');\n const now = useMemo(\n () => (nowIso ? new Date(nowIso) : new Date()),\n [nowIso],\n );\n\n const groups = useMemo(() => groupByDay(items), [items]);\n\n /* Reflow + exit transitions — the same pair notes and tasks use. When\n an appointment is added or removed, surviving cards slide to their\n new positions instead of snapping; a removed card fades out in place\n before the host drops it, so the removal reads as a removal. */\n const reduceMotion = prefersReducedMotion || undefined;\n const flatItemIds = useMemo(\n () => groups.flatMap((g) => g.items.map((i) => i.id)).join(),\n [groups],\n );\n const { containerRef: reflowRef } = useListReflow<HTMLOListElement>({\n key: flatItemIds,\n reduceMotion,\n });\n const exitTransition = useExitTransition({ reduceMotion });\n\n /* Track removed items so they can fade out in place. The previous\n items array is diffed against the current one; removed ids are held\n in `leavingItems` and rendered after the live groups, faded, until\n the exit transition elapses and drops them. */\n const prevItemsRef = useRef(items);\n const [leavingItems, setLeavingItems] = useState<AppointmentItem[]>([]);\n useEffect(() => {\n const prev = prevItemsRef.current;\n if (prev === items) return;\n const currentIds = new Set(items.map((i) => i.id));\n const removed = prev.filter((i) => !currentIds.has(i.id));\n if (removed.length > 0) {\n setLeavingItems((prev) => [...prev, ...removed]);\n removed.forEach((item) => {\n exitTransition.leave(item.id, () => {\n setLeavingItems((prev) => prev.filter((i) => i.id !== item.id));\n });\n });\n }\n prevItemsRef.current = items;\n }, [items, exitTransition]);\n\n const moreEarlier = hasMoreEarlier ?? !!onLoadEarlier;\n const moreLater = hasMoreLater ?? !!onLoadLater;\n\n /* The day to anchor on: today if present, else the nearest upcoming day,\n else the last day we have. */\n const anchorKey = useMemo(() => {\n if (groups.length === 0) return undefined;\n const todayKey = localDayKey(now);\n const keys = groups.map((g) => g.key);\n if (keys.includes(todayKey)) return todayKey;\n return keys.find((k) => k >= todayKey) ?? keys[keys.length - 1];\n }, [groups, now]);\n\n const scrollRef = useRef<HTMLDivElement>(null);\n const dayElRefs = useRef<Map<string, HTMLElement>>(new Map());\n const hasAnchored = useRef(false);\n const prevFirstKey = useRef<string | undefined>(undefined);\n const prevScrollHeight = useRef(0);\n\n const [fadeTop, setFadeTop] = useState(false);\n const [fadeBottom, setFadeBottom] = useState(false);\n\n const updateEdges = useCallback(() => {\n const region = scrollRef.current;\n if (!region) return;\n const { scrollTop, scrollHeight, clientHeight } = region;\n setFadeTop(scrollTop > 1);\n setFadeBottom(scrollTop + clientHeight < scrollHeight - 1);\n }, []);\n\n /* Scroll a day into view at the top of the region. Falls back to the\n nearest rendered day on/after the target (presets may land on an empty\n day). Uses getBoundingClientRect so it is offsetParent-agnostic. */\n const scrollToKey = useCallback(\n (targetKey: string, smooth: boolean) => {\n const region = scrollRef.current;\n if (!region) return;\n let el = dayElRefs.current.get(targetKey);\n if (!el) {\n const keys = [...dayElRefs.current.keys()].sort();\n const next =\n keys.find((k) => k >= targetKey) ?? keys[keys.length - 1];\n el = next ? dayElRefs.current.get(next) : undefined;\n }\n if (!el) return;\n const delta =\n el.getBoundingClientRect().top - region.getBoundingClientRect().top;\n region.scrollTo({\n top: region.scrollTop + delta,\n behavior: smooth && !prefersReducedMotion ? 'smooth' : 'auto',\n });\n },\n [prefersReducedMotion],\n );\n\n /* Anchor on mount; preserve the viewport when earlier days prepend. */\n useIsomorphicLayoutEffect(() => {\n const region = scrollRef.current;\n if (!region) return;\n const firstKey = groups[0]?.key;\n if (!hasAnchored.current) {\n if (groups.length > 0 && anchorKey) {\n scrollToKey(anchorKey, false);\n hasAnchored.current = true;\n }\n } else if (\n prevFirstKey.current &&\n firstKey &&\n firstKey < prevFirstKey.current\n ) {\n const grew = region.scrollHeight - prevScrollHeight.current;\n if (grew > 0) region.scrollTop += grew;\n }\n prevFirstKey.current = firstKey;\n prevScrollHeight.current = region.scrollHeight;\n updateEdges();\n }, [groups, anchorKey, scrollToKey, updateEdges]);\n\n /* Recompute the fades when the region resizes. */\n useIsomorphicLayoutEffect(() => {\n const region = scrollRef.current;\n if (!region || typeof ResizeObserver === 'undefined') return undefined;\n const observer = new ResizeObserver(updateEdges);\n observer.observe(region);\n return () => observer.disconnect();\n }, [updateEdges]);\n\n const handleScroll = useCallback(() => {\n updateEdges();\n const region = scrollRef.current;\n if (!region) return;\n const { scrollTop, scrollHeight, clientHeight } = region;\n if (\n onLoadEarlier &&\n moreEarlier &&\n !loadingEarlier &&\n scrollTop <= EDGE_LOAD_THRESHOLD\n ) {\n onLoadEarlier();\n }\n if (\n onLoadLater &&\n moreLater &&\n !loadingLater &&\n scrollHeight - scrollTop - clientHeight <= EDGE_LOAD_THRESHOLD\n ) {\n onLoadLater();\n }\n }, [\n updateEdges,\n onLoadEarlier,\n onLoadLater,\n moreEarlier,\n moreLater,\n loadingEarlier,\n loadingLater,\n ]);\n\n /* ----- Filter actions ----- */\n const jumpTo = useCallback(\n (date: Date) => {\n const key = localDayKey(date);\n const known = dayElRefs.current.has(key);\n scrollToKey(key, true);\n if (!known) onJumpToDate?.(date.toISOString());\n },\n [scrollToKey, onJumpToDate],\n );\n\n const handleToday = useCallback(() => jumpTo(now), [jumpTo, now]);\n const handleThisWeek = useCallback(() => {\n const start = new Date(now);\n const dow = (start.getDay() + 6) % 7; // Monday-based week start\n start.setDate(start.getDate() - dow);\n jumpTo(start);\n }, [jumpTo, now]);\n const handleThisMonth = useCallback(() => {\n jumpTo(new Date(now.getFullYear(), now.getMonth(), 1));\n }, [jumpTo, now]);\n\n /* ----- Agent handle ----- */\n const itemsRef = useRef<AppointmentItem[]>(items);\n itemsRef.current = items;\n const innerRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => innerRef.current as HTMLElement, []);\n\n const handle = useMemo<AppointmentTimelineHandle>(\n () => ({\n getItems: () =>\n itemsRef.current.map((i) => ({ id: i.id, state: i.state })),\n selectItem: (targetId: string) => {\n const found = itemsRef.current.find((i) => i.id === targetId);\n if (found) onOpenAppointment?.(found);\n },\n jumpToToday: () => scrollToKey(localDayKey(now), true),\n }),\n [onOpenAppointment, scrollToKey, now],\n );\n useAgentRegistration(appointmentTimelineAgent, handle, id);\n\n const isEmpty = groups.length === 0 && !loadingEarlier && !loadingLater;\n\n const loadingRow = (key: string) => (\n <div\n key={key}\n aria-hidden=\"true\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:py-[var(--spacing-xs)]\"\n >\n <Skeleton variant=\"rectangular\" height=\"3.5rem\" />\n </div>\n );\n\n return (\n <section\n ref={innerRef}\n data-component=\"appointment-timeline\"\n data-component-id={id}\n aria-label={ariaLabel ?? heading}\n className={rootVariants({ size, className })}\n {...rest}\n >\n {/* Shared rail header: title + (optional) filter row + divider. This\n panel owns its own scroll/fill, so the header stays a fixed band\n (sticky={false}). The rail injects the favourite/close cluster via\n PanelHeaderActionsProvider; standalone it renders none. */}\n <PanelHeader\n icon={<CalendarDays />}\n title={heading}\n filters={\n showFilters ? (\n <>\n <ButtonGroup label={t('appointmentTimeline.filtersLabel')}>\n <Button intent=\"outline\" size=\"sm\" onClick={handleToday}>\n {t('appointmentTimeline.today')}\n </Button>\n <Button intent=\"outline\" size=\"sm\" onClick={handleThisWeek}>\n {t('appointmentTimeline.thisWeek')}\n </Button>\n <Button intent=\"outline\" size=\"sm\" onClick={handleThisMonth}>\n {t('appointmentTimeline.thisMonth')}\n </Button>\n </ButtonGroup>\n <label htmlFor={jumpId} className=\"ds:sr-only\">\n {t('appointmentTimeline.jumpToDate')}\n </label>\n <DatePicker\n id={jumpId}\n size=\"sm\"\n placeholder={t('appointmentTimeline.jumpToDate')}\n onChange={(date) => {\n if (date) jumpTo(date);\n }}\n />\n </>\n ) : undefined\n }\n />\n\n {headerExtra}\n\n {isEmpty ? (\n <div className=\"ds:flex-1 ds:p-[var(--spacing-md)]\">\n <EmptyState\n variant=\"first-use\"\n size=\"sm\"\n title={emptyTitle ?? t('appointmentTimeline.empty.title')}\n description={\n emptyDescription ?? t('appointmentTimeline.empty.description')\n }\n />\n </div>\n ) : (\n <div\n ref={scrollRef}\n // The scroll region must be keyboard-focusable so arrow / Home /\n // End can drive it (axe scrollable-region-focusable); jsx-a11y's\n // generic rule doesn't know this element scrolls.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n onScroll={handleScroll}\n data-fade-top={fadeTop ? 'true' : undefined}\n data-fade-bottom={fadeBottom ? 'true' : undefined}\n className={scrollRegionClasses}\n >\n {loadingEarlier ? loadingRow('loading-earlier') : null}\n {/* eslint-disable-next-line jsx-a11y/no-redundant-roles -- role=\"list\" is NOT redundant: WebKit drops implicit list semantics when list-style is none */}\n <ol\n ref={reflowRef}\n role=\"list\"\n className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-md)] ds:p-0\"\n >\n {groups.map((group) => (\n <li\n key={group.key}\n ref={(node) => {\n if (node) dayElRefs.current.set(group.key, node);\n else dayElRefs.current.delete(group.key);\n }}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\"\n >\n <DayHeader\n date={group.date}\n now={now}\n locale={resolvedLocale}\n todayLabel={t('appointmentTimeline.today')}\n tomorrowLabel={t('appointmentTimeline.tomorrow')}\n yesterdayLabel={t('appointmentTimeline.yesterday')}\n />\n {/* eslint-disable-next-line jsx-a11y/no-redundant-roles -- role=\"list\" is NOT redundant: WebKit drops implicit list semantics when list-style is none */}\n <ul\n role=\"list\"\n className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0\"\n >\n {group.items.map((item) => (\n <AppointmentCard\n key={item.id}\n item={item}\n size={size}\n surface=\"elevated\"\n showPatient={showPatient}\n locale={resolvedLocale}\n currency={currency}\n onActivate={onOpenAppointment}\n selected={item.id === selectedId}\n hideDefaultStatus={hideDefaultStatus}\n data-appointment-id={item.id}\n data-reflow-id={item.id}\n className={REFLOW_ROW_CLASS}\n />\n ))}\n </ul>\n </li>\n ))}\n {/* Leaving cards: removed from state but held for the exit\n fade. Rendered without `data-reflow-id` so the reflow hook\n ignores them; faded via `data-leaving`. */}\n {leavingItems.length > 0\n ? leavingItems.map((item) => (\n <AppointmentCard\n key={`leaving-${item.id}`}\n item={item}\n size={size}\n surface=\"elevated\"\n showPatient={showPatient}\n locale={resolvedLocale}\n currency={currency}\n aria-hidden=\"true\"\n data-leaving\n className={[\n 'ds:opacity-0',\n 'ds:transition-opacity',\n 'ds:duration-[var(--animation-duration)]',\n 'ds:ease-[var(--ease-out)]',\n 'ds:motion-reduce:transition-none',\n ].join(' ')}\n />\n ))\n : null}\n </ol>\n {loadingLater ? loadingRow('loading-later') : null}\n </div>\n )}\n </section>\n );\n },\n);\n\nAppointmentTimeline.displayName = 'AppointmentTimeline';\n\n/* -------------------------------------------------------------------- */\n/* Day header — sticky label per day group */\n/* -------------------------------------------------------------------- */\n\ninterface DayHeaderProps {\n date: Date;\n now: Date;\n locale: string | undefined;\n todayLabel: string;\n tomorrowLabel: string;\n yesterdayLabel: string;\n}\n\nfunction DayHeader({\n date,\n now,\n locale,\n todayLabel,\n tomorrowLabel,\n yesterdayLabel,\n}: DayHeaderProps): ReactNode {\n const key = localDayKey(date);\n const todayKey = localDayKey(now);\n const tomorrow = new Date(now);\n tomorrow.setDate(now.getDate() + 1);\n const yesterday = new Date(now);\n yesterday.setDate(now.getDate() - 1);\n\n const isToday = key === todayKey;\n\n let label: string;\n if (isToday) label = todayLabel;\n else if (key === localDayKey(tomorrow)) label = tomorrowLabel;\n else if (key === localDayKey(yesterday)) label = yesterdayLabel;\n else {\n const sameYear = date.getFullYear() === now.getFullYear();\n label = new Intl.DateTimeFormat(locale, {\n weekday: 'short',\n day: 'numeric',\n month: 'short',\n ...(sameYear ? {} : { year: 'numeric' }),\n }).format(date);\n }\n\n // Today's group is marked with the brand colour + a leading dot so the\n // current day reads at a glance. `--primary` clears AA on the card in every\n // theme (violet-500 light, magenta on dark); the dot is decorative.\n return (\n <div\n data-today={isToday ? 'true' : undefined}\n className={[\n 'ds:sticky ds:top-0 ds:z-[1] ds:bg-[color:var(--card)] ds:py-[var(--spacing-2xs)]',\n 'ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] type-eyebrow',\n isToday\n ? 'ds:text-[color:var(--primary)] ds:font-semibold'\n : 'ds:text-[color:var(--muted-foreground)]',\n ].join(' ')}\n >\n {isToday ? (\n <span\n aria-hidden=\"true\"\n className=\"ds:size-1.5 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--primary)]\"\n />\n ) : null}\n {label}\n </div>\n );\n}\n\n/** Re-export of the size variant union for downstream typing. */\nexport type AppointmentTimelineSize = NonNullable<\n VariantProps<typeof rootVariants>['size']\n>;\n"],"names":["appointmentTimelineAgent","handle","args","EDGE_LOAD_THRESHOLD","rootVariants","cva","scrollRegionClasses","localDayKey","d","m","day","groupByDay","items","sorted","a","b","map","item","key","group","AppointmentTimeline","forwardRef","id","nowIso","title","locale","currency","size","showPatient","onOpenAppointment","selectedId","onLoadEarlier","onLoadLater","hasMoreEarlier","hasMoreLater","loadingEarlier","loadingLater","showFilters","onJumpToDate","emptyTitle","emptyDescription","className","ariaLabel","headerExtra","hideDefaultStatus","rest","ref","t","i18n","useTranslation","jumpId","useId","prefersReducedMotion","usePrefersReducedMotion","resolvedLocale","heading","now","useMemo","groups","reduceMotion","flatItemIds","g","i","reflowRef","useListReflow","exitTransition","useExitTransition","prevItemsRef","useRef","leavingItems","setLeavingItems","useState","useEffect","prev","currentIds","removed","moreEarlier","moreLater","anchorKey","todayKey","keys","k","scrollRef","dayElRefs","hasAnchored","prevFirstKey","prevScrollHeight","fadeTop","setFadeTop","fadeBottom","setFadeBottom","updateEdges","useCallback","region","scrollTop","scrollHeight","clientHeight","scrollToKey","targetKey","smooth","el","next","delta","useIsomorphicLayoutEffect","firstKey","_a","grew","observer","handleScroll","jumpTo","date","known","handleToday","handleThisWeek","start","dow","handleThisMonth","itemsRef","innerRef","useImperativeHandle","targetId","found","useAgentRegistration","isEmpty","loadingRow","jsx","Skeleton","jsxs","PanelHeader","CalendarDays","Fragment","ButtonGroup","Button","DatePicker","EmptyState","node","DayHeader","AppointmentCard","REFLOW_ROW_CLASS","todayLabel","tomorrowLabel","yesterdayLabel","tomorrow","yesterday","isToday","label","sameYear"],"mappings":";;;;;;;;;;;;;;;;AAaO,MAAMA,KACX;AAAA,EACE,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,cAAc,CAAC,UAAU,MAAM;AAAA,EAC/B,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,EACpC;AAAA,EAEF,SAAS;AAAA,IACP,aAAa;AAAA,MACX,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,IAAI,EAAE,MAAM,WAAS;AAAA,QACnC,UAAU,CAAC,IAAI;AAAA,MAAA;AAAA,MAEjB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,GAAQC,MAAyB;AACxC,QAAAD,EAAO,WAAWC,EAAK,EAAE;AAAA,MAC3B;AAAA,IAAA;AAAA,IAEF,eAAe;AAAA,MACb,QAAQ;AAAA,MACR,YAAY;AAAA,M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B;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,cAAYiB,IAAU,SAAS;AAAA,MAC/B,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACAA,IACI,oDACA;AAAA,MAAA,EACJ,KAAK,GAAG;AAAA,MAET,UAAA;AAAA,QAAAA,IACC,gBAAAnB;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,IAEV;AAAA,QACHoB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as P, useRef as v, useImperativeHandle as E, useMemo as H } from "react";
|
|
3
|
+
import { c as M } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as q } from "react-i18next";
|
|
5
|
+
import { I as K } from "./icon-button-S8_weU3g.js";
|
|
6
|
+
import { S as V } from "./skeleton-tTWJpvAq.js";
|
|
7
|
+
import { E as W } from "./empty-state-DwJ5YNzz.js";
|
|
8
|
+
import { A as B } from "./appointment-card-DG3m9yN-.js";
|
|
9
|
+
import { u as D } from "./registry-DvAUVLHh.js";
|
|
10
|
+
import { C as L } from "./calendar-days-BGWklvE-.js";
|
|
11
|
+
import { P as _ } from "./plus-DzMQ_c6b.js";
|
|
12
|
+
const it = {
|
|
13
|
+
id: "appointment-card",
|
|
14
|
+
// 'pick' (non-persisting activation) is host-delegated: the card exposes no
|
|
15
|
+
// handle of its own — its enclosing AppointmentTray performs the pick via
|
|
16
|
+
// `appointment-tray.select_item`, addressing this card by its data-component-id.
|
|
17
|
+
capabilities: ["pick"],
|
|
18
|
+
state: {},
|
|
19
|
+
actions: {},
|
|
20
|
+
domHooks: {
|
|
21
|
+
root: {
|
|
22
|
+
attr: "data-component",
|
|
23
|
+
value: "appointment-card",
|
|
24
|
+
description: 'Marks the element as a kit AppointmentCard. The root also emits data-component-id sourced from item.id, data-state with the appointment lifecycle, and data-type with the delivery channel. When the card is interactive its activator (link or button) carries data-action="open-appointment".'
|
|
25
|
+
},
|
|
26
|
+
instanceId: {
|
|
27
|
+
attr: "data-component-id",
|
|
28
|
+
sourceProp: "item.id",
|
|
29
|
+
description: "Sourced from item.id — the stable appointment identifier."
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}, F = {
|
|
33
|
+
id: "appointment-tray",
|
|
34
|
+
// 'pick' (non-persisting activation): select_item routes an activation
|
|
35
|
+
// through onActivate — it does not persist a "selected appointment" value,
|
|
36
|
+
// so this is a focus/pick, not a select_single.
|
|
37
|
+
capabilities: ["pick"],
|
|
38
|
+
state: {
|
|
39
|
+
items: {
|
|
40
|
+
type: "Array<{ id: string; state: string }>",
|
|
41
|
+
descriptionKey: "ui.agent.appointmentTray.state.items",
|
|
42
|
+
description: "Currently-displayed appointments. Ids + lifecycle state only — never patient identity.",
|
|
43
|
+
read: (a) => a.getItems()
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
actions: {
|
|
47
|
+
select_item: {
|
|
48
|
+
safety: "read",
|
|
49
|
+
argsType: "{ id: string }",
|
|
50
|
+
argsSchema: {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: { id: { type: "string" } },
|
|
53
|
+
required: ["id"]
|
|
54
|
+
},
|
|
55
|
+
idempotent: !0,
|
|
56
|
+
descriptionKey: "ui.agent.appointmentTray.actions.selectItem",
|
|
57
|
+
description: "Activate the appointment with the given id.",
|
|
58
|
+
invoke: (a, s) => {
|
|
59
|
+
a.selectItem(s.id);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
domHooks: {
|
|
64
|
+
root: {
|
|
65
|
+
attr: "data-component",
|
|
66
|
+
value: "appointment-tray",
|
|
67
|
+
description: `Marks the AppointmentTray wrapper. When the host passes onAddAppointment, the header button carries data-action="add-appointment". It only calls the host, so it has a hook but no agent action: creating an appointment writes patient data and belongs to the host's own flow.`
|
|
68
|
+
},
|
|
69
|
+
instanceId: {
|
|
70
|
+
attr: "data-component-id",
|
|
71
|
+
sourceProp: "id",
|
|
72
|
+
description: "Sourced from the id prop. Required to address a specific tray from the agent."
|
|
73
|
+
},
|
|
74
|
+
item: {
|
|
75
|
+
attr: "data-appointment-id",
|
|
76
|
+
description: "Stable appointment id emitted on each rendered AppointmentCard inside the tray."
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}, G = M(
|
|
80
|
+
[
|
|
81
|
+
"ds:flex ds:flex-col",
|
|
82
|
+
"ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)]",
|
|
83
|
+
"ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--card-border)]",
|
|
84
|
+
"ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]",
|
|
85
|
+
"ds:overflow-hidden"
|
|
86
|
+
].join(" "),
|
|
87
|
+
{
|
|
88
|
+
variants: {
|
|
89
|
+
size: {
|
|
90
|
+
sm: "",
|
|
91
|
+
md: ""
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
defaultVariants: {
|
|
95
|
+
size: "sm"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
), J = P(
|
|
99
|
+
({
|
|
100
|
+
id: a,
|
|
101
|
+
items: s,
|
|
102
|
+
title: b,
|
|
103
|
+
caption: c,
|
|
104
|
+
size: m = "sm",
|
|
105
|
+
locale: x,
|
|
106
|
+
currency: w,
|
|
107
|
+
privacy: l = !1,
|
|
108
|
+
privacyTitle: d,
|
|
109
|
+
onOpenAppointment: i,
|
|
110
|
+
onAddAppointment: h,
|
|
111
|
+
addLabel: k,
|
|
112
|
+
loading: f = !1,
|
|
113
|
+
emptyTitle: I,
|
|
114
|
+
emptyDescription: T,
|
|
115
|
+
className: N,
|
|
116
|
+
...A
|
|
117
|
+
}, C) => {
|
|
118
|
+
const { t: r } = q("ui"), u = b ?? r("appointmentTray.title"), S = k ?? r("appointmentTray.add"), R = !f && s.length === 0;
|
|
119
|
+
let n;
|
|
120
|
+
f ? n = /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [0, 1, 2].map((t) => /* @__PURE__ */ e(V, { variant: "rectangular", height: "3.5rem" }, t)) }) : R ? n = /* @__PURE__ */ e("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ e(
|
|
121
|
+
W,
|
|
122
|
+
{
|
|
123
|
+
variant: "first-use",
|
|
124
|
+
size: "sm",
|
|
125
|
+
title: I ?? r("appointmentTray.empty.title"),
|
|
126
|
+
description: T ?? r("appointmentTray.empty.description")
|
|
127
|
+
}
|
|
128
|
+
) }) : n = // Padding at least as wide as the focus ring (offset plus width), so
|
|
129
|
+
// the tray's `overflow-hidden` never clips a focused card's ring.
|
|
130
|
+
/* @__PURE__ */ e("ul", { className: "ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-[var(--spacing-sm)]", children: s.map((t) => /* @__PURE__ */ e(
|
|
131
|
+
B,
|
|
132
|
+
{
|
|
133
|
+
item: t,
|
|
134
|
+
size: m,
|
|
135
|
+
locale: x,
|
|
136
|
+
currency: w,
|
|
137
|
+
privacy: l,
|
|
138
|
+
privacyTitle: l ? d == null ? void 0 : d(t) : void 0,
|
|
139
|
+
onActivate: i,
|
|
140
|
+
"data-appointment-id": t.id
|
|
141
|
+
},
|
|
142
|
+
t.id
|
|
143
|
+
)) });
|
|
144
|
+
const p = v(s);
|
|
145
|
+
p.current = s;
|
|
146
|
+
const g = v(null);
|
|
147
|
+
E(C, () => g.current, []);
|
|
148
|
+
const j = H(
|
|
149
|
+
() => ({
|
|
150
|
+
getItems: () => p.current.map((t) => ({ id: t.id, state: t.state })),
|
|
151
|
+
selectItem: (t) => {
|
|
152
|
+
const y = p.current.find((z) => z.id === t);
|
|
153
|
+
y && (i == null || i(y));
|
|
154
|
+
}
|
|
155
|
+
}),
|
|
156
|
+
[i]
|
|
157
|
+
);
|
|
158
|
+
return D(F, j, a), /* @__PURE__ */ o(
|
|
159
|
+
"section",
|
|
160
|
+
{
|
|
161
|
+
ref: g,
|
|
162
|
+
"aria-label": u,
|
|
163
|
+
"data-component": "appointment-tray",
|
|
164
|
+
"data-component-id": a,
|
|
165
|
+
className: G({ size: m, className: N }),
|
|
166
|
+
...A,
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ o("header", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [
|
|
169
|
+
/* @__PURE__ */ o("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:min-w-0", children: [
|
|
170
|
+
/* @__PURE__ */ o("h3", { className: "ds:m-0 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-card", children: [
|
|
171
|
+
/* @__PURE__ */ e(L, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
172
|
+
u
|
|
173
|
+
] }),
|
|
174
|
+
c ? /* @__PURE__ */ e("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: c }) : null
|
|
175
|
+
] }),
|
|
176
|
+
h ? /* @__PURE__ */ e(
|
|
177
|
+
K,
|
|
178
|
+
{
|
|
179
|
+
icon: /* @__PURE__ */ e(_, {}),
|
|
180
|
+
intent: "outline",
|
|
181
|
+
size: "sm",
|
|
182
|
+
"aria-label": S,
|
|
183
|
+
"data-action": "add-appointment",
|
|
184
|
+
onClick: h
|
|
185
|
+
}
|
|
186
|
+
) : null
|
|
187
|
+
] }),
|
|
188
|
+
n
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
J.displayName = "AppointmentTray";
|
|
195
|
+
export {
|
|
196
|
+
J as A,
|
|
197
|
+
it as a,
|
|
198
|
+
F as b
|
|
199
|
+
};
|
|
200
|
+
//# sourceMappingURL=appointment-tray-ClJCtYQj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appointment-tray-ClJCtYQj.js","sources":["../../src/components/appointment-card/appointment-card.agent.ts","../../src/components/appointment-card/appointment-tray.agent.ts","../../src/components/appointment-card/appointment-tray.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — AppointmentCard. */\n/* */\n/* Single-appointment surface. Activation is owned by the consumer / */\n/* host tray; the card emits a DOM hook so a future MCP UI bridge can */\n/* address one rendered card by its appointment id. Read-only — the card */\n/* exposes no imperative handle of its own (the tray owns activation). */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\n\nexport const appointmentCardAgent: AgentAdapter = {\n id: 'appointment-card',\n // 'pick' (non-persisting activation) is host-delegated: the card exposes no\n // handle of its own — its enclosing AppointmentTray performs the pick via\n // `appointment-tray.select_item`, addressing this card by its data-component-id.\n capabilities: ['pick'],\n state: {},\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'appointment-card',\n description:\n 'Marks the element as a kit AppointmentCard. The root also emits data-component-id sourced from item.id, data-state with the appointment lifecycle, and data-type with the delivery channel. When the card is interactive its activator (link or button) carries data-action=\"open-appointment\".',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'item.id',\n description: 'Sourced from item.id — the stable appointment identifier.',\n },\n },\n};\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — AppointmentTray. */\n/* */\n/* Tray-level surface: read appointment ids + lifecycle state (never */\n/* patient names / treatments), and route an activation through the */\n/* curated handle. AppointmentTray is in-page (no open/close). */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { AppointmentTrayHandle } from './appointment-tray';\n\nexport const appointmentTrayAgent: AgentAdapter<AppointmentTrayHandle> = {\n id: 'appointment-tray',\n // 'pick' (non-persisting activation): select_item routes an activation\n // through onActivate — it does not persist a \"selected appointment\" value,\n // so this is a focus/pick, not a select_single.\n capabilities: ['pick'],\n state: {\n items: {\n type: 'Array<{ id: string; state: string }>',\n descriptionKey: 'ui.agent.appointmentTray.state.items',\n description:\n 'Currently-displayed appointments. Ids + lifecycle state only — never patient identity.',\n read: (handle) => handle.getItems(),\n },\n },\n actions: {\n select_item: {\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.appointmentTray.actions.selectItem',\n description: 'Activate the appointment with the given id.',\n invoke: (handle, args: { id: string }) => {\n handle.selectItem(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'appointment-tray',\n description:\n 'Marks the AppointmentTray wrapper. When the host passes onAddAppointment, the header button carries data-action=\"add-appointment\". It only calls the host, so it has a hook but no agent action: creating an appointment writes patient data and belongs to the host\\'s own flow.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific tray from the agent.',\n },\n item: {\n attr: 'data-appointment-id',\n description:\n 'Stable appointment id emitted on each rendered AppointmentCard inside the tray.',\n },\n },\n};\n","import {\n forwardRef,\n useImperativeHandle,\n useMemo,\n useRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CalendarDays, Plus } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\nimport { Skeleton } from '../skeleton/skeleton';\nimport { EmptyState } from '../empty-state/empty-state';\nimport { AppointmentCard, type AppointmentItem } from './appointment-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { appointmentTrayAgent } from './appointment-tray.agent';\n\n/* -------------------------------------------------------------------- */\n/* AppointmentTray */\n/* */\n/* Bordered panel that hosts a list of AppointmentCards — header with a */\n/* title + optional caption + an \"Add\" affordance, a body that branches */\n/* on loading (Skeleton) / empty (EmptyState) / list. Mirrors AgendaTray */\n/* but composes the richer AppointmentCard row. */\n/* */\n/* All visible text flows through useTranslation('ui') against the */\n/* `appointmentTray.*` namespace. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA — panel surface */\n/* -------------------------------------------------------------------- */\n\nconst appointmentTrayVariants = cva(\n [\n 'ds:flex ds:flex-col',\n 'ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)]',\n 'ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--card-border)]',\n 'ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]',\n 'ds:overflow-hidden',\n ].join(' '),\n {\n variants: {\n size: {\n sm: '',\n md: '',\n },\n },\n defaultVariants: {\n size: 'sm',\n },\n },\n);\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\n/**\n * Curated imperative handle for AppointmentTray — the forwardRef target so a\n * future agent / MCP UI bridge can drive the tray without touching the DOM.\n * Reads identifiers + lifecycle state only, never patient identity. See\n * `appointment-tray.agent.ts`.\n */\nexport interface AppointmentTrayHandle {\n getItems: () => Array<{ id: string; state: string }>;\n selectItem: (id: string) => void;\n}\n\nexport interface AppointmentTrayProps\n extends\n Omit<HTMLAttributes<HTMLElement>, 'onClick' | 'id'>,\n VariantProps<typeof appointmentTrayVariants> {\n /**\n * Stable instance id. Surfaced on the root as `data-component-id` so an\n * agent / MCP UI bridge can address this specific tray.\n */\n id?: string;\n /** The appointments to render. */\n items: AppointmentItem[];\n /** Section title — rendered in the header. Localised by the consumer. */\n title?: string;\n /** Optional small caption (e.g. localised date) shown next to the title. */\n caption?: string;\n /** Visual density passed through to each AppointmentCard. */\n size?: 'sm' | 'md';\n /** BCP-47 locale override passed to each AppointmentCard. */\n locale?: string;\n /** ISO-4217 currency code passed to each AppointmentCard. */\n currency?: string;\n /**\n * Privacy mode, passed to every AppointmentCard: each patient identity is\n * masked and the age, photo, anamnesis chip and money chips are withheld.\n * Default `false`.\n */\n privacy?: boolean;\n /**\n * The mask for one appointment's patient name under `privacy`. Absent, or\n * returning nothing, bullets are shown. Read only under `privacy`.\n */\n privacyTitle?: (item: AppointmentItem) => string | undefined;\n onOpenAppointment?: (item: AppointmentItem) => void;\n onAddAppointment?: () => void;\n /** Localised label for the \"Add\" affordance. */\n addLabel?: string;\n loading?: boolean;\n emptyTitle?: string;\n emptyDescription?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const AppointmentTray = forwardRef<HTMLElement, AppointmentTrayProps>(\n (\n {\n id,\n items,\n title,\n caption,\n size = 'sm',\n locale,\n currency,\n privacy = false,\n privacyTitle,\n onOpenAppointment,\n onAddAppointment,\n addLabel,\n loading = false,\n emptyTitle,\n emptyDescription,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const heading = title ?? t('appointmentTray.title');\n const resolvedAddLabel = addLabel ?? t('appointmentTray.add');\n const isEmpty = !loading && items.length === 0;\n\n let body: ReactNode;\n if (loading) {\n body = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]\">\n {[0, 1, 2].map((i) => (\n <Skeleton key={i} variant=\"rectangular\" height=\"3.5rem\" />\n ))}\n </div>\n );\n } else if (isEmpty) {\n body = (\n <div className=\"ds:p-[var(--spacing-md)]\">\n <EmptyState\n variant=\"first-use\"\n size=\"sm\"\n title={emptyTitle ?? t('appointmentTray.empty.title')}\n description={\n emptyDescription ?? t('appointmentTray.empty.description')\n }\n />\n </div>\n );\n } else {\n body = (\n // Padding at least as wide as the focus ring (offset plus width), so\n // the tray's `overflow-hidden` never clips a focused card's ring.\n <ul className=\"ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-[var(--spacing-sm)]\">\n {items.map((item) => (\n <AppointmentCard\n key={item.id}\n item={item}\n size={size}\n locale={locale}\n currency={currency}\n privacy={privacy}\n privacyTitle={privacy ? privacyTitle?.(item) : undefined}\n onActivate={onOpenAppointment}\n data-appointment-id={item.id}\n />\n ))}\n </ul>\n );\n }\n\n /* Curated imperative handle for agent integration. See\n * appointment-tray.agent.ts. */\n const itemsRef = useRef<AppointmentItem[]>(items);\n itemsRef.current = items;\n\n const innerRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => innerRef.current as HTMLElement, []);\n\n const handle = useMemo<AppointmentTrayHandle>(\n () => ({\n getItems: () =>\n itemsRef.current.map((i) => ({ id: i.id, state: i.state })),\n selectItem: (targetId: string) => {\n const found = itemsRef.current.find((i) => i.id === targetId);\n if (found) onOpenAppointment?.(found);\n },\n }),\n [onOpenAppointment],\n );\n\n useAgentRegistration(appointmentTrayAgent, handle, id);\n\n return (\n <section\n ref={innerRef}\n aria-label={heading}\n data-component=\"appointment-tray\"\n data-component-id={id}\n className={appointmentTrayVariants({ size, className })}\n {...rest}\n >\n <header className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:min-w-0\">\n <h3 className=\"ds:m-0 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-card\">\n <CalendarDays aria-hidden=\"true\" className=\"ds:size-4\" />\n {heading}\n </h3>\n {caption ? (\n <span className=\"type-eyebrow ds:text-[color:var(--muted-foreground)]\">\n {caption}\n </span>\n ) : null}\n </div>\n {onAddAppointment ? (\n <IconButton\n icon={<Plus />}\n intent=\"outline\"\n size=\"sm\"\n aria-label={resolvedAddLabel}\n data-action=\"add-appointment\"\n onClick={onAddAppointment}\n />\n ) : null}\n </header>\n {body}\n </section>\n );\n },\n);\n\nAppointmentTray.displayName = 'AppointmentTray';\n"],"names":["appointmentCardAgent","appointmentTrayAgent","handle","args","appointmentTrayVariants","cva","AppointmentTray","forwardRef","id","items","title","caption","size","locale","currency","privacy","privacyTitle","onOpenAppointment","onAddAppointment","addLabel","loading","emptyTitle","emptyDescription","className","rest","ref","t","useTranslation","heading","resolvedAddLabel","isEmpty","body","jsx","i","Skeleton","EmptyState","item","AppointmentCard","itemsRef","useRef","innerRef","useImperativeHandle","useMemo","targetId","found","useAgentRegistration","jsxs","CalendarDays","IconButton","Plus"],"mappings":";;;;;;;;;;;AAWO,MAAMA,KAAqC;AAAA,EAChD,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,cAAc,CAAC,MAAM;AAAA,EACrB,OAAO,CAAA;AAAA,EACP,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aACE;AAAA,IAAA;AAAA,IAEJ,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GCrBaC,IAA4D;AAAA,EACvE,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,cAAc,CAAC,MAAM;AAAA,EACrB,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,EACpC;AAAA,EAEF,SAAS;AAAA,IACP,aAAa;AAAA,MACX,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,IAAI,EAAE,MAAM,WAAS;AAAA,QACnC,UAAU,CAAC,IAAI;AAAA,MAAA;AAAA,MAEjB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,GAAQC,MAAyB;AACxC,QAAAD,EAAO,WAAWC,EAAK,EAAE;AAAA,MAC3B;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aACE;AAAA,IAAA;AAAA,IAEJ,YAAY;AAA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WJ,EAAwB,EAAE,MAAAQ,GAAM,WAAAW,GAAW;AAAA,QACrD,GAAGC;AAAA,QAEJ,UAAA;AAAA,UAAA,gBAAAsB,EAAC,UAAA,EAAO,WAAU,kGAChB,UAAA;AAAA,YAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,8DACb,UAAA;AAAA,cAAA,gBAAAA,EAAC,MAAA,EAAG,WAAU,oFACZ,UAAA;AAAA,gBAAA,gBAAAd,EAACe,GAAA,EAAa,eAAY,QAAO,WAAU,aAAY;AAAA,gBACtDnB;AAAA,cAAA,GACH;AAAA,cACCjB,IACC,gBAAAqB,EAAC,QAAA,EAAK,WAAU,wDACb,aACH,IACE;AAAA,YAAA,GACN;AAAA,YACCd,IACC,gBAAAc;AAAA,cAACgB;AAAA,cAAA;AAAA,gBACC,wBAAOC,GAAA,EAAK;AAAA,gBACZ,QAAO;AAAA,gBACP,MAAK;AAAA,gBACL,cAAYpB;AAAA,gBACZ,eAAY;AAAA,gBACZ,SAASX;AAAA,cAAA;AAAA,YAAA,IAET;AAAA,UAAA,GACN;AAAA,UACCa;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAzB,EAAgB,cAAc;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as O } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as P } from "react";
|
|
3
3
|
import { useTranslation as h } from "react-i18next";
|
|
4
|
-
import { A as K } from "./entity-card-
|
|
4
|
+
import { A as K } from "./entity-card-p-LANpYt.js";
|
|
5
5
|
import { C as g } from "./circle-dashed-CUj6o2cA.js";
|
|
6
6
|
const d = Object.freeze([
|
|
7
7
|
"confirmed",
|
|
@@ -63,4 +63,4 @@ export {
|
|
|
63
63
|
s as i,
|
|
64
64
|
C as u
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=appointment-workflow-status-
|
|
66
|
+
//# sourceMappingURL=appointment-workflow-status-S-lx81Yz.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment-workflow-status-
|
|
1
|
+
{"version":3,"file":"appointment-workflow-status-S-lx81Yz.js","sources":["../../src/components/workflow-status/appointment-workflow-status.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { CircleDashed } from 'lucide-react';\nimport { APPOINTMENT_STATE_WORKFLOW } from '../_shared/entity-card';\nimport type { CalendarEventStatus } from '../calendar/calendar';\nimport type { WorkflowStatusOption } from './workflow-status';\n\n/* ------------------------------------------------------------------ */\n/* Appointment statuses as WorkflowStatus inputs */\n/* */\n/* One status wears one face everywhere: the tone and glyph come from */\n/* APPOINTMENT_STATE_WORKFLOW (card, peek, details) and the labels */\n/* from calendar.status.*, so a standalone host matches the calendar. */\n/* ------------------------------------------------------------------ */\n\n/** The six appointment statuses, in the order the platform lists them. */\nexport const APPOINTMENT_WORKFLOW_STATUSES: readonly CalendarEventStatus[] =\n Object.freeze([\n 'confirmed',\n 'waiting',\n 'in_care',\n 'done',\n 'cancelled',\n 'absent',\n ]);\n\n/** The control value for an appointment nobody has set a status on. Never\n * a real status. */\nexport const APPOINTMENT_NO_STATUS = 'none' as const;\n\n/** Each status's label key (calendar.status.*). Internal: the calendar\n * pattern and the details panel read it; the package does not export it. */\nexport const APPOINTMENT_STATUS_LABEL_KEY: Record<CalendarEventStatus, string> =\n {\n confirmed: 'calendar.status.confirmed',\n waiting: 'calendar.status.waiting',\n in_care: 'calendar.status.inCare',\n done: 'calendar.status.done',\n cancelled: 'calendar.status.cancelled',\n absent: 'calendar.status.absent',\n };\n\n/** Narrows a WorkflowStatusControl value back to an appointment status.\n * False for APPOINTMENT_NO_STATUS and anything unknown. */\nexport function isCalendarEventStatus(\n value: unknown,\n): value is CalendarEventStatus {\n return (\n typeof value === 'string' &&\n (APPOINTMENT_WORKFLOW_STATUSES as readonly string[]).includes(value)\n );\n}\n\nexport interface UseAppointmentWorkflowStatusOptions {\n /**\n * The statuses the user may choose, in menu order. Pass only the permitted\n * transitions. Default: all six, in APPOINTMENT_WORKFLOW_STATUSES order.\n * The current status is always included. When the user may not set it, it\n * is listed first so the control can show it. Unknown entries and\n * duplicates are dropped.\n */\n statuses?: readonly CalendarEventStatus[];\n /** Statuses shown but not selectable: a transition that must stay visible\n * but is not allowed now. */\n disabledStatuses?: readonly CalendarEventStatus[];\n /**\n * Translated label overrides. Default: the kit's calendar status labels\n * (calendar.status.*) and \"No status\" (workflowStatus.noStatus).\n */\n labels?: Partial<\n Record<CalendarEventStatus | typeof APPOINTMENT_NO_STATUS, string>\n >;\n}\n\nexport interface AppointmentWorkflowStatus {\n /** Pass as `value` to WorkflowStatusControl or WorkflowStatusDisplay: the\n * status, or APPOINTMENT_NO_STATUS. */\n value: string;\n /** Pass as WorkflowStatusControl `options`. Always contains `value`. A\n * missing status leads with a disabled, neutral \"No status\" option. */\n options: WorkflowStatusOption[];\n /** The option for `value`; pass as WorkflowStatusDisplay `option`. */\n option: WorkflowStatusOption;\n /** The option for any status, permitted or not (history lines, chips).\n * Null or unknown gives the \"No status\" option. */\n optionFor: (\n status: CalendarEventStatus | null | undefined,\n ) => WorkflowStatusOption;\n}\n\n/**\n * Builds WorkflowStatusControl / WorkflowStatusDisplay inputs for an\n * appointment status, with the same icon, tone and label the calendar card,\n * peek and details use. Unknown `current` values are treated as no status,\n * which the user may then overwrite, so map every host state onto the six\n * first.\n * Memoised on language, `current`, and the content of `statuses`,\n * `disabledStatuses` and `labels`, so inline arrays are fine.\n */\nexport function useAppointmentWorkflowStatus(\n current: CalendarEventStatus | null | undefined,\n options?: UseAppointmentWorkflowStatusOptions,\n): AppointmentWorkflowStatus {\n /* `t` is rebuilt whenever the language changes, so it keys the memo. */\n const { t } = useTranslation('ui');\n const status = isCalendarEventStatus(current) ? current : null;\n /* Content keys, so a fresh but equal array does not rebuild the options.\n Entries are checked before joining, so no entry can split into two. */\n const statusesKey = (options?.statuses ?? APPOINTMENT_WORKFLOW_STATUSES)\n .filter(isCalendarEventStatus)\n .join(' ');\n const disabledKey = (options?.disabledStatuses ?? [])\n .filter(isCalendarEventStatus)\n .join(' ');\n const labelsKey = JSON.stringify(options?.labels ?? {});\n\n return useMemo(() => {\n const labels = JSON.parse(labelsKey) as NonNullable<\n UseAppointmentWorkflowStatusOptions['labels']\n >;\n const disabled = new Set(disabledKey.split(' '));\n const noStatus: WorkflowStatusOption = {\n value: APPOINTMENT_NO_STATUS,\n label: labels[APPOINTMENT_NO_STATUS] ?? t('workflowStatus.noStatus'),\n icon: <CircleDashed aria-hidden=\"true\" />,\n tone: 'neutral',\n disabled: true,\n };\n const shown = Object.fromEntries(\n APPOINTMENT_WORKFLOW_STATUSES.map((key) => {\n const { tone, Icon } = APPOINTMENT_STATE_WORKFLOW[key];\n const shownOption: WorkflowStatusOption = {\n value: key,\n label: labels[key] ?? t(APPOINTMENT_STATUS_LABEL_KEY[key]),\n icon: <Icon aria-hidden=\"true\" />,\n tone,\n };\n return [key, shownOption];\n }),\n ) as Record<CalendarEventStatus, WorkflowStatusOption>;\n const permitted = Array.from(\n new Set(statusesKey.split(' ').filter(isCalendarEventStatus)),\n );\n const listed =\n status && !permitted.includes(status)\n ? [status, ...permitted]\n : permitted;\n const list: WorkflowStatusOption[] = [\n ...(status ? [] : [noStatus]),\n ...listed.map((key) =>\n disabled.has(key) ? { ...shown[key], disabled: true } : shown[key],\n ),\n ];\n const value = status ?? APPOINTMENT_NO_STATUS;\n return {\n value,\n options: list,\n option: list.find((item) => item.value === value) ?? noStatus,\n optionFor: (key) => (isCalendarEventStatus(key) ? shown[key] : noStatus),\n };\n }, [t, status, statusesKey, disabledKey, labelsKey]);\n}\n"],"names":["APPOINTMENT_WORKFLOW_STATUSES","APPOINTMENT_NO_STATUS","APPOINTMENT_STATUS_LABEL_KEY","isCalendarEventStatus","value","useAppointmentWorkflowStatus","current","options","t","useTranslation","status","statusesKey","disabledKey","labelsKey","useMemo","labels","disabled","noStatus","jsx","CircleDashed","shown","key","tone","Icon","APPOINTMENT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