@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-preview-DLVIrOYV.js","sources":["../../node_modules/lucide-react/dist/esm/icons/files.mjs","../../src/components/document-preview/document-preview.agent.ts","../../src/components/document-preview/document-preview.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8\", key: \"14sh0y\" }],\n [\n \"path\",\n {\n d: \"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z\",\n key: \"1970lx\"\n }\n ],\n [\"path\", { d: \"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1\", key: \"l4dndm\" }]\n];\nconst Files = createLucideIcon(\"files\", __iconNode);\n\nexport { __iconNode, Files as default };\n//# sourceMappingURL=files.mjs.map\n","/* -------------------------------------------------------------------- */\n/* Agent adapter: DocumentPreview. */\n/* */\n/* A viewer that only calls its host. `close` is host-delegated: the */\n/* component declares no imperative handle for it, the host that gave */\n/* `onClose` performs the close (as NotificationCard does with dismiss). */\n/* Download has no entry in the closed capability vocabulary, so it is */\n/* described in the root hook only. The always-on state slot carries */\n/* only the structural */\n/* render `kind` (pdf / image / metadata / empty): never the document */\n/* name. */\n/* */\n/* PHI rule (PRS §26 §7): the document display name can identify a */\n/* patient (e.g. \"Rossi Maria — referto 2026.pdf\"). It renders as text */\n/* (fine) but the only name-returning read is the deliberate get_name */\n/* action with `safety: 'phi'`, so the host gates it behind confirm + */\n/* audit. No name is ever emitted in a data-* hook. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { DocumentPreviewHandle } from './document-preview';\n\nexport const documentPreviewAgent: AgentAdapter<DocumentPreviewHandle> = {\n id: 'document-preview',\n capabilities: ['close'],\n state: {\n kind: {\n type: \"'pdf' | 'image' | 'metadata' | 'empty'\",\n descriptionKey: 'ui.agent.documentPreview.state.kind',\n description:\n 'Which render branch is active: pdf, image, metadata (no inline preview), or empty (no document). Structural — never the document name.',\n read: (handle) => handle.getKind(),\n },\n },\n actions: {\n get_name: {\n // phi (not read): resolves the document display name, which can identify\n // patients. PRS §26, phi outranks read so the host gates it behind\n // stricter confirm + audit. The always-on kind slot stays name-free.\n safety: 'phi',\n returns: 'string | undefined',\n returnsSchema: { type: ['string', 'null'] },\n idempotent: true,\n descriptionKey: 'ui.agent.documentPreview.actions.getName',\n description:\n 'Read the display name of the previewed document. May identify a patient (PHI).',\n invoke: (handle) => handle.getName(),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'document-preview',\n description:\n 'Marks the DocumentPreview region. When the host passes onClose and onDownload, the header buttons carry data-action=\"close-document\" and data-action=\"download-document\"; both only call the host.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","/* -------------------------------------------------------------------- */\n/* DocumentPreview: a standalone, reusable document viewer. */\n/* */\n/* Decoupled from FileManager: it takes primitive props (name, mimeType, */\n/* src, metadata) rather than a FileManagerItem, so signing, the patient */\n/* portal, and the Control Room rail can all reuse it. The body is an */\n/* elevated Card: a bounded preview viewport (PDF → kit PDFViewer; */\n/* image/* → <img>; otherwise a MIME-icon placeholder) above an always-on */\n/* Details block (badges + every structural field the host supplies), so */\n/* the metadata is never dropped when a real preview renders. No name → */\n/* EmptyState. */\n/* */\n/* Title lives in the canonical PanelHeader (the same header every rail */\n/* panel adopts) so the Control Room rail can inject its pin / close */\n/* controls into it. Pass `documents` (≥ 2) to preview a SELECTION as */\n/* tabs: one tab per document, the active one shown below; a single */\n/* entry (or the single-document props) renders without a tab strip. */\n/* */\n/* Host actions, all optional: `onDownload` and `onClose` each add an */\n/* icon button to the PanelHeader's action cluster, only when given. The */\n/* component never fetches, saves or hides anything itself, so an inline */\n/* viewer or a modal stays the host's choice. `locale` sets the format */\n/* of the Details dates and file size; the active tab can be controlled. */\n/* */\n/* The root is a `<section>` (region landmark) so the PanelHeader's */\n/* <header> is scoped and never exposed as a page banner: the same */\n/* shape RadiographPanel uses. It is also a keyboard-focusable scroll */\n/* region (tabIndex 0 + labelled focus ring). */\n/* */\n/* Privacy: `privacy` swaps every place the name would show (header, */\n/* tabs, Download label) for a generic label and hides the \"Created by\" */\n/* row. The document itself (the PDF viewer or the image) is withheld */\n/* behind the shared PrivacyNotice and never mounts; the type badge, */\n/* the other details, Close and Download stay. */\n/* */\n/* PHI: the visible name renders as text (fine), but the only */\n/* name-returning handle read is surfaced by document-preview.agent.ts */\n/* as a `safety: 'phi'` action: never in always-on state, never in a */\n/* data-* hook. In tabbed mode the handle reflects the ACTIVE tab. */\n/* -------------------------------------------------------------------- */\n\nimport {\n forwardRef,\n Fragment,\n useImperativeHandle,\n useMemo,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport {\n Download,\n File as FileIcon,\n FileImage,\n FileText,\n Files,\n X,\n type LucideIcon,\n} from 'lucide-react';\nimport { Badge } from '../badge';\nimport { IconButton } from '../button/icon-button';\nimport { Card } from '../card';\nimport { EmptyState } from '../empty-state';\nimport { PanelHeader } from '../panel-header';\nimport { PDFViewer } from '../pdf-viewer';\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../tabs';\nimport { formatNumber } from '../_shared/format-number';\nimport { canonicalLocale } from '../_shared/intl-locale';\nimport { PrivacyNotice } from '../_shared/privacy-mask';\nimport { useControllableState } from '../../hooks/use-controllable-state';\nimport { useAgentRegistration } from '../../agent';\nimport { documentPreviewAgent } from './document-preview.agent';\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type DocumentPreviewSignatureStatus = 'none' | 'pending' | 'signed';\n\n/** Which render branch DocumentPreview is showing, structural, never PHI. */\nexport type DocumentPreviewKind = 'pdf' | 'image' | 'metadata' | 'empty';\n\nexport interface DocumentPreviewMetadata {\n /** Size in bytes. */\n size?: number;\n /** Display name of whoever created the document (host-supplied). */\n createdBy?: string;\n /** ISO 8601 timestamp the document was created. */\n createdAt?: string;\n /** ISO 8601 timestamp of the last modification. */\n updatedAt?: string;\n /** ISO 8601 timestamp a signature was requested from the patient. */\n signatureRequestedAt?: string;\n /** ISO 8601 timestamp the document was signed. */\n signedAt?: string;\n /** ISO 8601 timestamp the document was shared with the patient. */\n sharedAt?: string;\n /** Open document-type category (non-identifying), e.g. `'xray'`. */\n documentType?: string;\n /** Signature workflow state. */\n signatureStatus?: DocumentPreviewSignatureStatus;\n /** Clinical-document flag (host-defined semantics). */\n clinical?: boolean;\n /** ISO 8601 expiry (e.g. identification documents). */\n expiresAt?: string;\n}\n\n/**\n * A single previewable document. In multi-document mode each becomes a tab;\n * `id` is the tab value (never a patient name) and `name` is the tab label.\n */\nexport interface DocumentPreviewDocument {\n /** Stable, non-identifying id. Emitted as the tab value, never PHI. */\n id: string;\n /** Display name (PHI). Also the tab label in multi-document mode. */\n name: string;\n /** MIME type, drives the render branch and the fallback icon. */\n mimeType?: string;\n /** Resolved URL / data URI for the PDF or image viewer. */\n src?: string;\n /** Structural metadata rendered by the metadata-card branch. */\n metadata?: DocumentPreviewMetadata;\n}\n\nexport interface DocumentPreviewProps extends VariantProps<\n typeof documentPreviewVariants\n> {\n /** Opaque instance id, emitted as `data-component-id` for the agent registry. */\n id?: string;\n /** Display name. Absent (and no `documents`) → empty state. PHI. */\n name?: string;\n /** MIME type, drives the render branch and the fallback icon. */\n mimeType?: string;\n /** Resolved URL / data URI for the PDF or image viewer. The host owns auth. */\n src?: string;\n /** Structural metadata rendered by the metadata-card branch. */\n metadata?: DocumentPreviewMetadata;\n /**\n * Multiple documents to preview as tabs, e.g. a multi-row selection. Two\n * or more render a tab per document (label = name) with the active one\n * shown below; a single entry renders without a tab strip. When non-empty\n * this takes precedence over the single-document props. Names are PHI.\n */\n documents?: DocumentPreviewDocument[];\n /**\n * Tabbed mode only: the id of the document on screen, for controlled use.\n * Pair it with `onActiveDocumentChange`. An id that is not in `documents`\n * shows the first document.\n */\n activeDocumentId?: string;\n /**\n * Tabbed mode only: the id of the document shown first, for uncontrolled\n * use. Default: the first entry of `documents`.\n */\n defaultActiveDocumentId?: string;\n /**\n * Tabbed mode only: called with the document id when the user picks\n * another tab. Fires in controlled and uncontrolled use.\n */\n onActiveDocumentChange?: (documentId: string) => void;\n /**\n * Adds a Download button to the header and calls this when it is pressed.\n * Without it no button renders (the default). The component never fetches\n * or saves the file: the host does. The button acts on the document on\n * screen (the active tab when tabbed) and its label names that document.\n * The empty state has no header, so the button shows with a document only.\n */\n onDownload?: () => void;\n /**\n * Adds a Close button to the header and calls this when it is pressed.\n * Without it no button renders (the default). The host hides the inline\n * viewer or closes its own dialog, and decides where focus goes next, for\n * example back to the control that opened the document. The empty state\n * has no header, so the button shows with a document only. Leave it out\n * when the preview is docked in `ControlRoomRail`: the rail injects its\n * own close.\n */\n onClose?: () => void;\n /**\n * Privacy mode. The document name is replaced by a generic label in the\n * header, the tabs and the Download label, and the \"Created by\" row is\n * hidden. The document itself (the PDF viewer or the image) is withheld\n * behind the privacy notice and never mounts; a document with no preview\n * keeps its placeholder. The type badge, the other details, Close and\n * Download stay. A display mask on top of the host's own server-side\n * masking, never instead of it. Default `false`: unchanged.\n */\n privacy?: boolean;\n /**\n * BCP 47 locale for the dates and the file size in the Details block, for\n * example `\"it-IT\"` or `\"en-GB\"`. Default: the UI language\n * (`i18n.language`), as before. A POSIX tag such as `it_IT` is read as its\n * BCP 47 form; a tag `Intl` cannot use falls back to the UI language.\n */\n locale?: string;\n /** Extra classes for the root `<section>`, merged after the base classes. */\n className?: string;\n}\n\nexport interface DocumentPreviewHandle {\n /** Which render branch is active, structural, safe for always-on reads.\n * Under privacy a pdf or an image keeps its kind while the notice\n * withholds it. */\n getKind: () => DocumentPreviewKind;\n /** The active document's display name (PHI). Surfaced by the adapter as a `phi` action. */\n getName: () => string | undefined;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst documentPreviewVariants = cva(\n [\n 'ds:flex ds:h-full ds:min-h-0 ds:min-w-0 ds:flex-col ds:overflow-auto',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)]',\n 'ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring',\n // Drawn inside the box: the region fills its host, and a clipping\n // ancestor would hide a ring drawn outside it.\n 'ds:focus-visible:outline-offset-[length:calc(var(--focus-ring-width)*-1)]',\n ].join(' '),\n);\n\n/* The preview viewport above the Details. A document is clipped to its 4:3\n frame; the privacy notice that withholds one keeps the frame as its least\n height and grows past it on a narrow rail, so its button is never cut. */\nconst viewportVariants = cva(\n [\n 'ds:flex ds:aspect-[4/3] ds:items-center ds:justify-center',\n 'ds:border-b ds:border-[color:var(--card-border)] ds:bg-muted',\n ].join(' '),\n {\n variants: {\n withheld: {\n false: 'ds:min-h-0 ds:overflow-hidden',\n true: '',\n },\n },\n defaultVariants: { withheld: false },\n },\n);\n\nconst SIGNATURE_VARIANT: Record<\n Exclude<DocumentPreviewSignatureStatus, 'none'>,\n 'success' | 'warning'\n> = {\n signed: 'success',\n pending: 'warning',\n};\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\nfunction resolveKind(\n name: string | undefined,\n mimeType: string | undefined,\n src: string | undefined,\n): DocumentPreviewKind {\n if (!name) return 'empty';\n const mime = mimeType ?? '';\n if (mime === 'application/pdf' && src) return 'pdf';\n if (mime.startsWith('image/') && src) return 'image';\n return 'metadata';\n}\n\n/** Fallback icon for the header / metadata card, a small MIME-family lookup. */\nfunction iconForMime(mimeType: string | undefined): LucideIcon {\n const mime = mimeType ?? '';\n if (mime.startsWith('image/')) return FileImage;\n if (\n mime === 'application/pdf' ||\n mime.startsWith('text/') ||\n mime.includes('word')\n ) {\n return FileText;\n }\n return FileIcon;\n}\n\nconst UNIT_KEYS = [\n 'documentPreview.units.bytes',\n 'documentPreview.units.kilobytes',\n 'documentPreview.units.megabytes',\n 'documentPreview.units.gigabytes',\n] as const;\n\nconst UNIT_FALLBACKS = ['B', 'KB', 'MB', 'GB'] as const;\n\nfunction formatBytes(\n bytes: number,\n locale: string,\n t: (key: string, fallback: string) => string,\n): string {\n let value = bytes;\n let unitIndex = 0;\n while (value >= 1024 && unitIndex < UNIT_FALLBACKS.length - 1) {\n value /= 1024;\n unitIndex++;\n }\n // The shared helper, not a bare Intl.NumberFormat: it reads a POSIX tag\n // as BCP 47 and keeps Albanian separators on engines without its data.\n const formatted = formatNumber(value, locale, {\n maximumFractionDigits: unitIndex === 0 ? 0 : 1,\n });\n return `${formatted} ${t(UNIT_KEYS[unitIndex], UNIT_FALLBACKS[unitIndex])}`;\n}\n\n/* ------------------------------------------------------------------ */\n/* Component */\n/* ------------------------------------------------------------------ */\n\nexport const DocumentPreview = forwardRef<\n DocumentPreviewHandle,\n DocumentPreviewProps\n>((props, ref) => {\n const {\n id,\n name,\n mimeType,\n src,\n metadata,\n documents,\n activeDocumentId,\n defaultActiveDocumentId,\n onActiveDocumentChange,\n onDownload,\n onClose,\n privacy = false,\n locale,\n className,\n } = props;\n const { t, i18n } = useTranslation('ui');\n\n // Dates and the file size use the host's `locale` when given, otherwise the\n // UI language as before. A POSIX tag (it_IT) reads as BCP 47; a tag Intl\n // cannot use falls back to the UI language rather than breaking the render.\n const formatTag = canonicalLocale(\n locale ?? i18n.language ?? 'en',\n i18n.language,\n );\n const dateFormat = useMemo(\n () => new Intl.DateTimeFormat(formatTag, { dateStyle: 'medium' }),\n [formatTag],\n );\n\n // Resolve the document list: an explicit `documents` list wins; otherwise\n // the single-document props form a one-item list; nothing → empty. The\n // synthetic single-doc id is never emitted as a tab value (a lone doc\n // renders without a tab strip), so falling back to the name is PHI-safe.\n const docs = useMemo<DocumentPreviewDocument[]>(() => {\n if (documents && documents.length > 0) return documents;\n if (name) return [{ id: id ?? name, name, mimeType, src, metadata }];\n return [];\n }, [documents, id, name, mimeType, src, metadata]);\n\n const isTabbed = docs.length > 1;\n\n // What stands for a document's name on screen and in accessible names:\n // the name itself, or under privacy a generic label.\n const privateName = t('documentPreview.privateName', 'Document');\n const labelFor = (doc: DocumentPreviewDocument, index: number): string =>\n !privacy\n ? doc.name\n : isTabbed\n ? t('documentPreview.privateTab', 'Document {{position}}', {\n position: index + 1,\n })\n : privateName;\n\n // Active tab (multi mode): controlled through `activeDocumentId`, or\n // internal state seeded from `defaultActiveDocumentId`. A stale or unknown\n // id falls back to the first document, so no reconciling effect is needed.\n const [activeId, setActiveId] = useControllableState<string>({\n value: activeDocumentId,\n defaultValue: defaultActiveDocumentId,\n onChange: onActiveDocumentChange,\n });\n const activeDoc = docs.find((doc) => doc.id === activeId) ?? docs[0];\n\n const handle = useMemo<DocumentPreviewHandle>(\n () => ({\n getKind: () =>\n activeDoc\n ? resolveKind(activeDoc.name, activeDoc.mimeType, activeDoc.src)\n : 'empty',\n getName: () => activeDoc?.name,\n }),\n [activeDoc],\n );\n useImperativeHandle(ref, () => handle, [handle]);\n useAgentRegistration(documentPreviewAgent, handle, id);\n\n /* The per-document body: an elevated Card with a bounded preview viewport\n (pdf / image / placeholder) above an always-on Details block. The title is\n NOT rendered here (the PanelHeader owns it, or the tab label in multi mode). */\n const renderBody = (doc: DocumentPreviewDocument): ReactNode => {\n const kind = resolveKind(doc.name, doc.mimeType, doc.src);\n const meta = doc.metadata;\n const PlaceholderIcon = iconForMime(doc.mimeType);\n // Under privacy the PDF or the image never mounts: it could only show by\n // revealing what the mask hides, so the shared notice stands in for it.\n const withheld = privacy && (kind === 'pdf' || kind === 'image');\n\n // Preview viewport, the rendered document, or a MIME-icon placeholder when\n // no source resolves. Bounded to a consistent aspect so the Details below\n // stay reachable in the rail.\n let viewport: ReactNode;\n if (withheld) {\n viewport = <PrivacyNotice />;\n } else if (kind === 'pdf' && doc.src) {\n viewport = (\n <PDFViewer\n src={doc.src}\n toolbarVariant=\"minimal\"\n // Name the embedded viewer after the document so it stays distinct\n // from the surrounding \"Document preview\" region (nested landmarks\n // must not share an accessible name). Mirrors visible header text.\n ariaLabel={doc.name}\n className=\"ds:h-full ds:w-full\"\n />\n );\n } else if (kind === 'image' && doc.src) {\n viewport = (\n <img\n src={doc.src}\n alt={t('documentPreview.imageAlt', 'Preview of {{name}}', {\n name: doc.name,\n })}\n className=\"ds:max-h-full ds:max-w-full ds:object-contain\"\n />\n );\n } else {\n viewport = (\n <span className=\"ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)] ds:text-muted-foreground\">\n <PlaceholderIcon aria-hidden=\"true\" className=\"ds:size-10\" />\n <span className=\"type-body-sm\">\n {t('documentPreview.noPreview', 'No preview available.')}\n </span>\n </span>\n );\n }\n\n // Badges: type / clinical / signature status.\n const status = meta?.signatureStatus;\n const hasBadges =\n Boolean(meta?.documentType) ||\n Boolean(meta?.clinical) ||\n (status !== undefined && status !== 'none');\n\n // Detail rows, every structural field the host supplies, so nothing is\n // dropped when a real preview renders. Only present fields render a row.\n const fmtDate = (iso: string): string => dateFormat.format(new Date(iso));\n const rows: Array<{ key: string; label: string; value: string }> = [];\n if (meta?.createdBy && !privacy)\n rows.push({\n key: 'createdBy',\n label: t('documentPreview.fields.createdBy', 'Created by'),\n value: meta.createdBy,\n });\n if (meta?.createdAt)\n rows.push({\n key: 'created',\n label: t('documentPreview.fields.created', 'Created'),\n value: fmtDate(meta.createdAt),\n });\n if (meta?.updatedAt)\n rows.push({\n key: 'modified',\n label: t('documentPreview.fields.modified', 'Modified'),\n value: fmtDate(meta.updatedAt),\n });\n if (meta?.signatureRequestedAt)\n rows.push({\n key: 'signatureRequested',\n label: t(\n 'documentPreview.fields.signatureRequested',\n 'Signature requested',\n ),\n value: fmtDate(meta.signatureRequestedAt),\n });\n if (meta?.signedAt)\n rows.push({\n key: 'signed',\n label: t('documentPreview.fields.signed', 'Signed'),\n value: fmtDate(meta.signedAt),\n });\n if (meta?.sharedAt)\n rows.push({\n key: 'sharedWithPatient',\n label: t(\n 'documentPreview.fields.sharedWithPatient',\n 'Shared with patient',\n ),\n value: fmtDate(meta.sharedAt),\n });\n if (meta?.size !== undefined)\n rows.push({\n key: 'size',\n label: t('documentPreview.fields.size', 'Size'),\n value: formatBytes(meta.size, formatTag, t),\n });\n if (meta?.expiresAt)\n rows.push({\n key: 'expires',\n label: t('documentPreview.fields.expires', 'Expires'),\n value: fmtDate(meta.expiresAt),\n });\n\n const hasDetails = hasBadges || rows.length > 0;\n\n return (\n <div className=\"ds:p-[var(--spacing-md)]\">\n <Card\n variant=\"elevated\"\n className=\"ds:flex ds:flex-col ds:overflow-hidden\"\n >\n <div className={viewportVariants({ withheld })}>{viewport}</div>\n {hasDetails && (\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n <h3 className=\"type-eyebrow ds:m-0 ds:text-muted-foreground\">\n {t('documentPreview.detailsTitle', 'Details')}\n </h3>\n {hasBadges && (\n <span className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]\">\n {meta?.documentType && (\n <Badge variant=\"neutral\" size=\"sm\">\n {meta.documentType}\n </Badge>\n )}\n {meta?.clinical && (\n <Badge variant=\"info\" size=\"sm\">\n {t('documentPreview.clinical', 'Clinical')}\n </Badge>\n )}\n {status && status !== 'none' && (\n <Badge\n variant={SIGNATURE_VARIANT[status]}\n size=\"sm\"\n withDot\n >\n {t(`documentPreview.signature.${status}`, status)}\n </Badge>\n )}\n </span>\n )}\n {rows.length > 0 && (\n <dl className=\"ds:grid ds:grid-cols-[auto_1fr] ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] type-body-sm\">\n {rows.map((row) => (\n <Fragment key={row.key}>\n <dt className=\"ds:text-muted-foreground\">{row.label}</dt>\n <dd className=\"ds:m-0\">{row.value}</dd>\n </Fragment>\n ))}\n </dl>\n )}\n </Card.Body>\n )}\n </Card>\n </div>\n );\n };\n\n // Header: a MIME icon + the document name for a single doc; a Files glyph +\n // a count badge (RadiographPanel's title-plus-badge shape) when tabbed.\n const HeaderMimeIcon = iconForMime(activeDoc?.mimeType);\n const headerIcon = isTabbed ? (\n <Files aria-hidden=\"true\" />\n ) : (\n <HeaderMimeIcon aria-hidden=\"true\" />\n );\n const headerTitle: ReactNode = isTabbed ? (\n <>\n {t('documentPreview.multiTitle', 'Documents')}\n <Badge variant=\"neutral\" size=\"sm\">\n {docs.length}\n </Badge>\n </>\n ) : activeDoc ? (\n privacy ? (\n privateName\n ) : (\n <span dir=\"auto\">{activeDoc.name}</span>\n )\n ) : undefined;\n\n // Header actions: an icon button per host callback, only when given, so\n // the header is unchanged without them. Download acts on the document on\n // screen (the active tab when tabbed), so its label names that document;\n // Close closes the whole preview. Both only call the host.\n const hasActions = Boolean(onDownload || onClose);\n const downloadLabel = privacy\n ? t('documentPreview.downloadPrivate', 'Download document')\n : t('documentPreview.download', 'Download {{name}}', {\n name: activeDoc?.name ?? '',\n });\n const closeLabel = t('documentPreview.close', 'Close preview');\n // The accessible themes promise 48 px targets (AAA). IconButton sm is 32 px\n // and its enlarged hit area stops at 640 px, so grow the box itself there (the Button size sm sets `sm:min-h-0`, hence\n // the same `sm:` variant).\n const accessibleTargetClass =\n 'ds:sm:[min-block-size:var(--accessible-target-floor,0px)] ds:[min-inline-size:var(--accessible-target-floor,auto)]';\n const headerActions: ReactNode = hasActions ? (\n <>\n {onDownload ? (\n <IconButton\n icon={<Download aria-hidden=\"true\" />}\n intent=\"ghost\"\n size=\"sm\"\n className={accessibleTargetClass}\n aria-label={downloadLabel}\n tooltip={downloadLabel}\n data-action=\"download-document\"\n onClick={() => onDownload()}\n />\n ) : null}\n {onClose ? (\n <IconButton\n icon={<X aria-hidden=\"true\" />}\n intent=\"ghost\"\n size=\"sm\"\n className={accessibleTargetClass}\n aria-label={closeLabel}\n tooltip={closeLabel}\n data-action=\"close-document\"\n onClick={() => onClose()}\n />\n ) : null}\n </>\n ) : undefined;\n\n let content: ReactNode;\n if (docs.length === 0) {\n content = (\n <EmptyState\n variant=\"first-use\"\n size=\"sm\"\n title={t('documentPreview.emptyTitle', 'No document selected')}\n description={t(\n 'documentPreview.emptyDescription',\n 'Select a document to preview it here.',\n )}\n />\n );\n } else if (isTabbed) {\n content = (\n <Tabs\n value={activeDoc?.id ?? ''}\n onValueChange={setActiveId}\n variant=\"underlined\"\n size=\"sm\"\n // Each tab shows its full file name when there's room and shrinks with\n // an ellipsis only when the tabs would otherwise overflow the width\n // (`min-inline-size:0` lets a tab shrink below its content; the label\n // truncates). The full name stays the accessible name and shows in the\n // body, so nothing is lost.\n className=\"ds:min-h-0 ds:flex-1 ds:pt-[var(--spacing-sm)]\"\n >\n <TabsList\n aria-label={t('documentPreview.tabsLabel', 'Selected documents')}\n className=\"ds:gap-[var(--spacing-sm)]\"\n >\n {docs.map((doc, index) => {\n const TabIcon = iconForMime(doc.mimeType);\n return (\n <TabsTrigger\n key={doc.id}\n value={doc.id}\n // Match the header glyph: same 16px size (never larger) and the\n // accent tint that marks a file across the grid and the rail.\n icon={\n <TabIcon\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-[color:var(--accent)]\"\n />\n }\n className=\"ds:[min-inline-size:0]\"\n >\n <span\n dir={privacy ? undefined : 'auto'}\n className=\"ds:block ds:truncate ds:[min-inline-size:0]\"\n >\n {labelFor(doc, index)}\n </span>\n </TabsTrigger>\n );\n })}\n </TabsList>\n {docs.map((doc) => (\n <TabsContent\n key={doc.id}\n value={doc.id}\n className=\"ds:min-h-0 ds:flex-1\"\n >\n {renderBody(doc)}\n </TabsContent>\n ))}\n </Tabs>\n );\n } else {\n content = renderBody(activeDoc);\n }\n\n return (\n <section\n data-component=\"document-preview\"\n data-component-id={id}\n // The preview body scrolls (PDF pages, tall images, long metadata), so\n // the region needs a keyboard tab stop (axe scrollable-region-focusable).\n // A labelled <section> is a region landmark, which also scopes the\n // PanelHeader's <header> so it is never exposed as a page banner.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- keyboard-focusable scroll region (see comment above)\n tabIndex={0}\n aria-label={t('documentPreview.regionLabel', 'Document preview')}\n className={documentPreviewVariants({ className })}\n >\n {docs.length > 0 && (\n <PanelHeader\n sticky\n icon={headerIcon}\n title={headerTitle}\n titleTooltip={\n !isTabbed && activeDoc ? labelFor(activeDoc, 0) : undefined\n }\n actions={headerActions}\n />\n )}\n {content}\n </section>\n );\n});\n\nDocumentPreview.displayName = 'DocumentPreview';\n"],"names":["__iconNode","Files","createLucideIcon","documentPreviewAgent","handle","documentPreviewVariants","cva","viewportVariants","SIGNATURE_VARIANT","resolveKind","name","mimeType","src","mime","iconForMime","FileImage","FileText","FileIcon","UNIT_KEYS","UNIT_FALLBACKS","formatBytes","bytes","locale","t","value","unitIndex","formatNumber","DocumentPreview","forwardRef","props","ref","id","metadata","documents","activeDocumentId","defaultActiveDocumentId","onActiveDocumentChange","onDownload","onClose","privacy","className","i18n","useTranslation","formatTag","canonicalLocale","dateFormat","useMemo","docs","isTabbed","privateName","labelFor","doc","index","activeId","setActiveId","useControllableState","activeDoc","useImperativeHandle","useAgentRegistration","renderBody","kind","meta","PlaceholderIcon","withheld","viewport","PrivacyNotice","jsx","PDFViewer","jsxs","status","hasBadges","fmtDate","iso","rows","hasDetails","Card","Badge","row","Fragment","HeaderMimeIcon","headerIcon","headerTitle","hasActions","downloadLabel","closeLabel","accessibleTargetClass","headerActions","IconButton","Download","X","content","EmptyState","Tabs","TabsList","TabIcon","TabsTrigger","TabsContent","PanelHeader"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,6DAA6D,KAAK,SAAQ,CAAE;AAAA,EAC1F;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AAAA,EACE,CAAC,QAAQ,EAAE,GAAG,2DAA2D,KAAK,SAAQ,CAAE;AAC1F,GACMC,KAAQC,GAAiB,SAASF,EAAU,GCErCG,KAA4D;AAAA,EACvE,IAAI;AAAA,EACJ,cAAc,CAAC,OAAO;AAAA,EACtB,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,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,IAAA;AAAA,MACC,kBAAe;AAAA,MACf,qBAAmBrC;AAAA,MAMnB,UAAU;AAAA,MACV,cAAYR,EAAE,+BAA+B,kBAAkB;AAAA,MAC/D,WAAWlB,GAAwB,EAAE,WAAAmC,GAAW;AAAA,MAE/C,UAAA;AAAA,QAAAO,EAAK,SAAS,KACb,gBAAAmB;AAAA,UAAC+B;AAAA,UAAA;AAAA,YACC,QAAM;AAAA,YACN,MAAMjB;AAAA,YACN,OAAOC;AAAA,YACP,cACE,CAACjC,KAAYQ,IAAYN,EAASM,GAAW,CAAC,IAAI;AAAA,YAEpD,SAAS8B;AAAA,UAAA;AAAA,QAAA;AAAA,QAGZI;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;AAED/D,GAAgB,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { c as t } from "./index-D2ZczOXr.js";
|
|
2
|
-
import { U as c,
|
|
2
|
+
import { U as c, T as s } from "./user-x-BJZg4kaP.js";
|
|
3
|
+
import { B as i } from "./ban-CiSCCcOE.js";
|
|
3
4
|
import { C as d } from "./check-DrFSN__t.js";
|
|
4
5
|
import { S as l } from "./stethoscope-sZXGC43m.js";
|
|
5
6
|
import { C as e } from "./clock-Drd4Wtis.js";
|
|
6
|
-
const
|
|
7
|
+
const _ = t(
|
|
7
8
|
[
|
|
8
9
|
"ds:relative ds:rounded-[var(--radius-lg)]",
|
|
9
10
|
"ds:text-[color:var(--card-foreground)]",
|
|
@@ -28,20 +29,20 @@ const T = t(
|
|
|
28
29
|
density: "comfortable"
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
|
-
),
|
|
32
|
+
), I = {
|
|
32
33
|
estimate: "info",
|
|
33
34
|
accepted: "success",
|
|
34
35
|
discarded: "error",
|
|
35
36
|
closed: "neutral"
|
|
36
37
|
}, v = {
|
|
37
|
-
confirmed: { tone: "success", Icon:
|
|
38
|
+
confirmed: { tone: "success", Icon: s },
|
|
38
39
|
waiting: { tone: "info", Icon: e },
|
|
39
40
|
in_care: { tone: "accent", Icon: l },
|
|
40
41
|
done: { tone: "success", Icon: d },
|
|
41
|
-
cancelled: { tone: "error", Icon:
|
|
42
|
+
cancelled: { tone: "error", Icon: i },
|
|
42
43
|
absent: { tone: "warning", Icon: c }
|
|
43
44
|
};
|
|
44
|
-
function
|
|
45
|
+
function O(r) {
|
|
45
46
|
return v[r] ?? { tone: "neutral", Icon: e };
|
|
46
47
|
}
|
|
47
48
|
const a = [
|
|
@@ -55,7 +56,7 @@ const a = [
|
|
|
55
56
|
"var(--color-indigo-500)",
|
|
56
57
|
"var(--color-orange-500)",
|
|
57
58
|
"var(--color-fuchsia-500)"
|
|
58
|
-
], u = "var(--color-grey-700)",
|
|
59
|
+
], u = "var(--color-grey-700)", m = [
|
|
59
60
|
"var(--color-violet-700)",
|
|
60
61
|
"var(--color-purple-700)",
|
|
61
62
|
"var(--color-magenta-700)",
|
|
@@ -66,26 +67,26 @@ const a = [
|
|
|
66
67
|
"var(--color-indigo-700)",
|
|
67
68
|
"var(--color-orange-700)",
|
|
68
69
|
"var(--color-fuchsia-700)"
|
|
69
|
-
],
|
|
70
|
+
], f = "var(--color-grey-900)";
|
|
70
71
|
function n(r) {
|
|
71
72
|
if (r == null) return -1;
|
|
72
73
|
const o = typeof r == "number" ? r : Number.parseInt(r, 10);
|
|
73
74
|
return Number.isFinite(o) ? (Math.trunc(o) % a.length + a.length) % a.length : -1;
|
|
74
75
|
}
|
|
75
|
-
function
|
|
76
|
+
function C(r) {
|
|
76
77
|
const o = n(r);
|
|
77
78
|
return o < 0 ? u : a[o];
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function w(r) {
|
|
80
81
|
const o = n(r);
|
|
81
|
-
return o < 0 ?
|
|
82
|
+
return o < 0 ? f : m[o];
|
|
82
83
|
}
|
|
83
84
|
export {
|
|
84
85
|
v as A,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
I as C,
|
|
87
|
+
O as a,
|
|
88
|
+
w as b,
|
|
89
|
+
C as c,
|
|
90
|
+
_ as e
|
|
90
91
|
};
|
|
91
|
-
//# sourceMappingURL=entity-card-
|
|
92
|
+
//# sourceMappingURL=entity-card-p-LANpYt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-card-fpm-KUKc.js","sources":["../../src/components/_shared/entity-card/entity-card.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport {\n Ban,\n Check,\n Clock,\n Stethoscope,\n ThumbsUp,\n UserX,\n type LucideIcon,\n} from 'lucide-react';\nimport type { BadgeProps } from '../../badge/badge';\nimport type { WorkflowStatusTone } from '../../workflow-status/workflow-status';\n\n/* ------------------------------------------------------------------ */\n/* Shared helpers for the entity-card family */\n/* ------------------------------------------------------------------ */\n/*\n * Cross-cutting building blocks every \"entity card\" (AgendaCard,\n * MessageCard, NotificationCard, TaskCard, care-plan / appointment cards,\n * …) composes: the surface CVA, the state→Badge-variant lookups, and a\n * colour-id → palette-token resolver. All visual values reference kit\n * tokens — no hardcoded colour/spacing/radius literals.\n */\n\n/** The closed set of Badge variants the entity cards may use. */\ntype BadgeVariant = NonNullable<BadgeProps['variant']>;\n\n/* ------------------------------------------------------------------ */\n/* Surface CVA */\n/* ------------------------------------------------------------------ */\n/**\n * Shared card surface — `elevated` paints the kit card chrome (fill,\n * hairline border, shadow); `flat` drops it for use inside an existing\n * Card / Sheet. `density` tunes the internal padding.\n */\nexport const entitySurfaceVariants = cva(\n [\n 'ds:relative ds:rounded-[var(--radius-lg)]',\n 'ds:text-[color:var(--card-foreground)]',\n 'ds:transition-shadow ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n ].join(' '),\n {\n variants: {\n surface: {\n flat: '',\n elevated: [\n 'ds:bg-[var(--card)] ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--card-border)]',\n 'ds:shadow-[var(--shadow-card)]',\n ].join(' '),\n },\n density: {\n comfortable: 'ds:p-[var(--spacing-md)]',\n compact: 'ds:p-[var(--spacing-sm)]',\n },\n },\n defaultVariants: {\n surface: 'elevated',\n density: 'comfortable',\n },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* State → Badge variant lookups */\n/* ------------------------------------------------------------------ */\n\n/** Care-plan lifecycle state → Badge variant. */\nexport const CARE_PLAN_STATE_BADGE = {\n estimate: 'info',\n accepted: 'success',\n discarded: 'error',\n closed: 'neutral',\n} as const satisfies Record<string, BadgeVariant>;\n\nexport type CarePlanState = keyof typeof CARE_PLAN_STATE_BADGE;\n\n/** Appointment lifecycle state → Badge variant. */\nexport const APPOINTMENT_STATE_BADGE = {\n absent: 'error',\n waiting: 'warning',\n in_care: 'info',\n done: 'success',\n cancelled: 'error',\n confirmed: 'success',\n} as const satisfies Record<string, BadgeVariant>;\n\nexport type AppointmentState = keyof typeof APPOINTMENT_STATE_BADGE;\n\n/**\n * Appointment lifecycle state → the WorkflowStatus tone and glyph.\n *\n * The SAME status shown on a card, in a details footer, in a hover preview\n * and in a history entry has to wear one face, so the tone and the glyph live\n * here rather than being chosen per surface. `absent` is `UserX`, not a\n * lightning bolt: the old glyph said nothing about a missed appointment.\n *\n * Kept beside the Badge map rather than replacing it — a surface that needs a\n * plain chip (a dense table row) still has one.\n */\nexport const APPOINTMENT_STATE_WORKFLOW = {\n confirmed: { tone: 'success', Icon: ThumbsUp },\n waiting: { tone: 'info', Icon: Clock },\n in_care: { tone: 'accent', Icon: Stethoscope },\n done: { tone: 'success', Icon: Check },\n cancelled: { tone: 'error', Icon: Ban },\n absent: { tone: 'warning', Icon: UserX },\n} as const satisfies Record<\n AppointmentState,\n { tone: WorkflowStatusTone; Icon: LucideIcon }\n>;\n\n/** Resolve a state to its workflow tone + glyph, neutral for the unknown. */\nexport function appointmentStateWorkflow(state: string): {\n tone: WorkflowStatusTone;\n Icon: LucideIcon;\n} {\n return (\n (\n APPOINTMENT_STATE_WORKFLOW as Record<\n string,\n { tone: WorkflowStatusTone; Icon: LucideIcon }\n >\n )[state] ?? { tone: 'neutral', Icon: Clock }\n );\n}\n\n/** Fallback variant for an unknown / out-of-vocabulary appointment state. */\nexport const APPOINTMENT_STATE_BADGE_DEFAULT: BadgeVariant = 'neutral';\n\n/**\n * Resolve an appointment state to its Badge variant, falling back to a\n * neutral chip for any value outside the known vocabulary.\n */\nexport function appointmentStateBadge(state: string): BadgeVariant {\n return (\n (APPOINTMENT_STATE_BADGE as Record<string, BadgeVariant>)[state] ??\n APPOINTMENT_STATE_BADGE_DEFAULT\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Colour-id → palette token */\n/* ------------------------------------------------------------------ */\n/**\n * AlfaDocs assigns operators / categories a numeric colour id. Map it onto\n * a closed set of EXISTING kit palette tokens — the six brand families plus\n * the semantic ramps. Unknown ids fall back to the neutral grey step. The\n * value is a `var(--…)` token, never a literal, so consumers feed it to a\n * token-driven surface (e.g. via `--avatar-color-override`).\n */\nconst COLOR_ID_TOKENS = [\n 'var(--color-violet-500)',\n 'var(--color-purple-500)',\n 'var(--color-magenta-500)',\n 'var(--color-blue-500)',\n 'var(--color-green-500)',\n 'var(--color-red-500)',\n 'var(--color-yellow-500)',\n 'var(--color-indigo-500)',\n 'var(--color-orange-500)',\n 'var(--color-fuchsia-500)',\n] as const;\n\nconst COLOR_ID_FALLBACK = 'var(--color-grey-700)';\n\n/**\n * Darker, AA-safe counterparts of {@link COLOR_ID_TOKENS}, keyed by the same\n * index. The bright -500 steps are fine for a decorative dot but fail WCAG AA\n * under the Avatar's light initials; these clear ≥4.5:1 against the avatar's\n * cream text (yellow needs -800; the rest -700). Use for any swatch that bears\n * text — keep {@link colorIdToToken} for decorative fills (dots, accents).\n */\nconst COLOR_ID_AVATAR_TOKENS = [\n 'var(--color-violet-700)',\n 'var(--color-purple-700)',\n 'var(--color-magenta-700)',\n 'var(--color-blue-700)',\n 'var(--color-green-700)',\n 'var(--color-red-700)',\n 'var(--color-yellow-800)',\n 'var(--color-indigo-700)',\n 'var(--color-orange-700)',\n 'var(--color-fuchsia-700)',\n] as const;\n\nconst COLOR_ID_AVATAR_FALLBACK = 'var(--color-grey-900)';\n\n/** Resolve a colour id to a 0-based index into the closed token ramps. */\nfunction colorIdIndex(colorId: number | string | null | undefined): number {\n if (colorId === null || colorId === undefined) return -1;\n const n =\n typeof colorId === 'number' ? colorId : Number.parseInt(colorId, 10);\n if (!Number.isFinite(n)) return -1;\n return (\n ((Math.trunc(n) % COLOR_ID_TOKENS.length) + COLOR_ID_TOKENS.length) %\n COLOR_ID_TOKENS.length\n );\n}\n\nexport function colorIdToToken(\n colorId: number | string | null | undefined,\n): string {\n const index = colorIdIndex(colorId);\n return index < 0 ? COLOR_ID_FALLBACK : COLOR_ID_TOKENS[index];\n}\n\n/**\n * Avatar-fill variant of {@link colorIdToToken} — returns the same operator\n * hue at an AA-safe darkness for swatches that carry the Avatar's light\n * initials. Pair it with the bright -500 dot from {@link colorIdToToken}.\n */\nexport function colorIdToAvatarToken(\n colorId: number | string | null | undefined,\n): string {\n const index = colorIdIndex(colorId);\n return index < 0 ? COLOR_ID_AVATAR_FALLBACK : COLOR_ID_AVATAR_TOKENS[index];\n}\n\n/* ------------------------------------------------------------------ */\n/* Re-exports */\n/* ------------------------------------------------------------------ */\n\nexport { isSafeEntityUrl } from '../is-safe-url';\n"],"names":["entitySurfaceVariants","cva","CARE_PLAN_STATE_BADGE","APPOINTMENT_STATE_WORKFLOW","ThumbsUp","Clock","Stethoscope","Check","Ban","UserX","appointmentStateWorkflow","state","COLOR_ID_TOKENS","COLOR_ID_FALLBACK","COLOR_ID_AVATAR_TOKENS","COLOR_ID_AVATAR_FALLBACK","colorIdIndex","colorId","n","colorIdToToken","index","colorIdToAvatarToken"],"mappings":";;;;;AAmCO,MAAMA,IAAwBC;AAAA,EACnC;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,EAAA,EACA,KAAK,GAAG;AAAA,EACV;AAA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K,OAAO,SAASC,CAAC,KAElB,KAAK,MAAMA,CAAC,IAAIN,EAAgB,SAAUA,EAAgB,UAC5DA,EAAgB,SAHc;AAKlC;AAEO,SAASO,EACdF,GACQ;AACR,QAAMG,IAAQJ,EAAaC,CAAO;AAClC,SAAOG,IAAQ,IAAIP,IAAoBD,EAAgBQ,CAAK;AAC9D;AAOO,SAASC,EACdJ,GACQ;AACR,QAAMG,IAAQJ,EAAaC,CAAO;AAClC,SAAOG,IAAQ,IAAIL,IAA2BD,EAAuBM,CAAK;AAC5E;"}
|
|
1
|
+
{"version":3,"file":"entity-card-p-LANpYt.js","sources":["../../src/components/_shared/entity-card/entity-card.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport {\n Ban,\n Check,\n Clock,\n Stethoscope,\n ThumbsUp,\n UserX,\n type LucideIcon,\n} from 'lucide-react';\nimport type { BadgeProps } from '../../badge/badge';\nimport type { WorkflowStatusTone } from '../../workflow-status/workflow-status';\n\n/* ------------------------------------------------------------------ */\n/* Shared helpers for the entity-card family */\n/* ------------------------------------------------------------------ */\n/*\n * Cross-cutting building blocks every \"entity card\" (AgendaCard,\n * MessageCard, NotificationCard, TaskCard, care-plan / appointment cards,\n * …) composes: the surface CVA, the state→Badge-variant lookups, and a\n * colour-id → palette-token resolver. All visual values reference kit\n * tokens — no hardcoded colour/spacing/radius literals.\n */\n\n/** The closed set of Badge variants the entity cards may use. */\ntype BadgeVariant = NonNullable<BadgeProps['variant']>;\n\n/* ------------------------------------------------------------------ */\n/* Surface CVA */\n/* ------------------------------------------------------------------ */\n/**\n * Shared card surface — `elevated` paints the kit card chrome (fill,\n * hairline border, shadow); `flat` drops it for use inside an existing\n * Card / Sheet. `density` tunes the internal padding.\n */\nexport const entitySurfaceVariants = cva(\n [\n 'ds:relative ds:rounded-[var(--radius-lg)]',\n 'ds:text-[color:var(--card-foreground)]',\n 'ds:transition-shadow ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n ].join(' '),\n {\n variants: {\n surface: {\n flat: '',\n elevated: [\n 'ds:bg-[var(--card)] ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--card-border)]',\n 'ds:shadow-[var(--shadow-card)]',\n ].join(' '),\n },\n density: {\n comfortable: 'ds:p-[var(--spacing-md)]',\n compact: 'ds:p-[var(--spacing-sm)]',\n },\n },\n defaultVariants: {\n surface: 'elevated',\n density: 'comfortable',\n },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* State → Badge variant lookups */\n/* ------------------------------------------------------------------ */\n\n/** Care-plan lifecycle state → Badge variant. */\nexport const CARE_PLAN_STATE_BADGE = {\n estimate: 'info',\n accepted: 'success',\n discarded: 'error',\n closed: 'neutral',\n} as const satisfies Record<string, BadgeVariant>;\n\nexport type CarePlanState = keyof typeof CARE_PLAN_STATE_BADGE;\n\n/** Appointment lifecycle state → Badge variant. */\nexport const APPOINTMENT_STATE_BADGE = {\n absent: 'error',\n waiting: 'warning',\n in_care: 'info',\n done: 'success',\n cancelled: 'error',\n confirmed: 'success',\n} as const satisfies Record<string, BadgeVariant>;\n\nexport type AppointmentState = keyof typeof APPOINTMENT_STATE_BADGE;\n\n/**\n * Appointment lifecycle state → the WorkflowStatus tone and glyph.\n *\n * The SAME status shown on a card, in a details footer, in a hover preview\n * and in a history entry has to wear one face, so the tone and the glyph live\n * here rather than being chosen per surface. `absent` is `UserX`, not a\n * lightning bolt: the old glyph said nothing about a missed appointment.\n *\n * Kept beside the Badge map rather than replacing it — a surface that needs a\n * plain chip (a dense table row) still has one.\n */\nexport const APPOINTMENT_STATE_WORKFLOW = {\n confirmed: { tone: 'success', Icon: ThumbsUp },\n waiting: { tone: 'info', Icon: Clock },\n in_care: { tone: 'accent', Icon: Stethoscope },\n done: { tone: 'success', Icon: Check },\n cancelled: { tone: 'error', Icon: Ban },\n absent: { tone: 'warning', Icon: UserX },\n} as const satisfies Record<\n AppointmentState,\n { tone: WorkflowStatusTone; Icon: LucideIcon }\n>;\n\n/** Resolve a state to its workflow tone + glyph, neutral for the unknown. */\nexport function appointmentStateWorkflow(state: string): {\n tone: WorkflowStatusTone;\n Icon: LucideIcon;\n} {\n return (\n (\n APPOINTMENT_STATE_WORKFLOW as Record<\n string,\n { tone: WorkflowStatusTone; Icon: LucideIcon }\n >\n )[state] ?? { tone: 'neutral', Icon: Clock }\n );\n}\n\n/** Fallback variant for an unknown / out-of-vocabulary appointment state. */\nexport const APPOINTMENT_STATE_BADGE_DEFAULT: BadgeVariant = 'neutral';\n\n/**\n * Resolve an appointment state to its Badge variant, falling back to a\n * neutral chip for any value outside the known vocabulary.\n */\nexport function appointmentStateBadge(state: string): BadgeVariant {\n return (\n (APPOINTMENT_STATE_BADGE as Record<string, BadgeVariant>)[state] ??\n APPOINTMENT_STATE_BADGE_DEFAULT\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Colour-id → palette token */\n/* ------------------------------------------------------------------ */\n/**\n * AlfaDocs assigns operators / categories a numeric colour id. Map it onto\n * a closed set of EXISTING kit palette tokens — the six brand families plus\n * the semantic ramps. Unknown ids fall back to the neutral grey step. The\n * value is a `var(--…)` token, never a literal, so consumers feed it to a\n * token-driven surface (e.g. via `--avatar-color-override`).\n */\nconst COLOR_ID_TOKENS = [\n 'var(--color-violet-500)',\n 'var(--color-purple-500)',\n 'var(--color-magenta-500)',\n 'var(--color-blue-500)',\n 'var(--color-green-500)',\n 'var(--color-red-500)',\n 'var(--color-yellow-500)',\n 'var(--color-indigo-500)',\n 'var(--color-orange-500)',\n 'var(--color-fuchsia-500)',\n] as const;\n\nconst COLOR_ID_FALLBACK = 'var(--color-grey-700)';\n\n/**\n * Darker, AA-safe counterparts of {@link COLOR_ID_TOKENS}, keyed by the same\n * index. The bright -500 steps are fine for a decorative dot but fail WCAG AA\n * under the Avatar's light initials; these clear ≥4.5:1 against the avatar's\n * cream text (yellow needs -800; the rest -700). Use for any swatch that bears\n * text — keep {@link colorIdToToken} for decorative fills (dots, accents).\n */\nconst COLOR_ID_AVATAR_TOKENS = [\n 'var(--color-violet-700)',\n 'var(--color-purple-700)',\n 'var(--color-magenta-700)',\n 'var(--color-blue-700)',\n 'var(--color-green-700)',\n 'var(--color-red-700)',\n 'var(--color-yellow-800)',\n 'var(--color-indigo-700)',\n 'var(--color-orange-700)',\n 'var(--color-fuchsia-700)',\n] as const;\n\nconst COLOR_ID_AVATAR_FALLBACK = 'var(--color-grey-900)';\n\n/** Resolve a colour id to a 0-based index into the closed token ramps. */\nfunction colorIdIndex(colorId: number | string | null | undefined): number {\n if (colorId === null || colorId === undefined) return -1;\n const n =\n typeof colorId === 'number' ? colorId : Number.parseInt(colorId, 10);\n if (!Number.isFinite(n)) return -1;\n return (\n ((Math.trunc(n) % COLOR_ID_TOKENS.length) + COLOR_ID_TOKENS.length) %\n COLOR_ID_TOKENS.length\n );\n}\n\nexport function colorIdToToken(\n colorId: number | string | null | undefined,\n): string {\n const index = colorIdIndex(colorId);\n return index < 0 ? COLOR_ID_FALLBACK : COLOR_ID_TOKENS[index];\n}\n\n/**\n * Avatar-fill variant of {@link colorIdToToken} — returns the same operator\n * hue at an AA-safe darkness for swatches that carry the Avatar's light\n * initials. Pair it with the bright -500 dot from {@link colorIdToToken}.\n */\nexport function colorIdToAvatarToken(\n colorId: number | string | null | undefined,\n): string {\n const index = colorIdIndex(colorId);\n return index < 0 ? COLOR_ID_AVATAR_FALLBACK : COLOR_ID_AVATAR_TOKENS[index];\n}\n\n/* ------------------------------------------------------------------ */\n/* Re-exports */\n/* ------------------------------------------------------------------ */\n\nexport { isSafeEntityUrl } from '../is-safe-url';\n"],"names":["entitySurfaceVariants","cva","CARE_PLAN_STATE_BADGE","APPOINTMENT_STATE_WORKFLOW","ThumbsUp","Clock","Stethoscope","Check","Ban","UserX","appointmentStateWorkflow","state","COLOR_ID_TOKENS","COLOR_ID_FALLBACK","COLOR_ID_AVATAR_TOKENS","COLOR_ID_AVATAR_FALLBACK","colorIdIndex","colorId","n","colorIdToToken","index","colorIdToAvatarTo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,EAAaC,GAAqD;AACzE,MAAIA,KAAY,KAA+B,QAAO;AACtD,QAAMC,IACJ,OAAOD,KAAY,WAAWA,IAAU,OAAO,SAASA,GAAS,EAAE;AACrE,SAAK,OAAO,SAASC,CAAC,KAElB,KAAK,MAAMA,CAAC,IAAIN,EAAgB,SAAUA,EAAgB,UAC5DA,EAAgB,SAHc;AAKlC;AAEO,SAASO,EACdF,GACQ;AACR,QAAMG,IAAQJ,EAAaC,CAAO;AAClC,SAAOG,IAAQ,IAAIP,IAAoBD,EAAgBQ,CAAK;AAC9D;AAOO,SAASC,EACdJ,GACQ;AACR,QAAMG,IAAQJ,EAAaC,CAAO;AAClC,SAAOG,IAAQ,IAAIL,IAA2BD,EAAuBM,CAAK;AAC5E;"}
|
|
@@ -1,43 +1,28 @@
|
|
|
1
1
|
import { jsx as t, jsxs as L } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as me, useMemo as ue, useState as M, useEffect as I, useRef as Y, useId as ge } from "react";
|
|
3
3
|
import { useTranslation as fe } from "react-i18next";
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as he } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { B as S } from "./button-DohK_Ak_.js";
|
|
6
|
-
import { L as
|
|
7
|
-
import { i as
|
|
8
|
-
import { i as
|
|
9
|
-
import { a as
|
|
10
|
-
import { loadLocale as
|
|
11
|
-
import { R as
|
|
12
|
-
import { L as
|
|
13
|
-
import {
|
|
6
|
+
import { L as pe } from "./logo-hIsyVE96.js";
|
|
7
|
+
import { i as ye } from "./is-development-CLUAnsU7.js";
|
|
8
|
+
import { i as be } from "./safe-href-5dbsfbQn.js";
|
|
9
|
+
import { a as ve } from "./error-page-illustration-BdJLuMdV.js";
|
|
10
|
+
import { loadLocale as ke, LOCALES_WITH_BUNDLES as we } from "../i18n/config.js";
|
|
11
|
+
import { R as Pe } from "./rotate-ccw-BBQnIVTr.js";
|
|
12
|
+
import { L as xe } from "./log-in-OQUEoGhX.js";
|
|
13
|
+
import { H as Ee } from "./house-DGCypGTo.js";
|
|
14
|
+
import { c as Le } from "./createLucideIcon-DhHxpK9K.js";
|
|
14
15
|
/**
|
|
15
16
|
* @license lucide-react v1.22.0 - ISC
|
|
16
17
|
*
|
|
17
18
|
* This source code is licensed under the ISC license.
|
|
18
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
19
20
|
*/
|
|
20
|
-
const
|
|
21
|
+
const Se = [
|
|
21
22
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
22
23
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
23
24
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
24
|
-
],
|
|
25
|
-
/**
|
|
26
|
-
* @license lucide-react v1.22.0 - ISC
|
|
27
|
-
*
|
|
28
|
-
* This source code is licensed under the ISC license.
|
|
29
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/
|
|
31
|
-
const Ne = [
|
|
32
|
-
["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
|
|
33
|
-
[
|
|
34
|
-
"path",
|
|
35
|
-
{
|
|
36
|
-
d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",
|
|
37
|
-
key: "r6nss1"
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
], Re = V("house", Ne), Te = [
|
|
25
|
+
], Ne = Le("circle-question-mark", Se), Re = [
|
|
41
26
|
400,
|
|
42
27
|
401,
|
|
43
28
|
403,
|
|
@@ -69,10 +54,10 @@ const Ne = [
|
|
|
69
54
|
maintenance: { key: "maintenance", mood: "rebuild", primary: "retry" },
|
|
70
55
|
generic: { key: "generic", mood: "puzzled", primary: "home" }
|
|
71
56
|
};
|
|
72
|
-
function
|
|
73
|
-
return
|
|
57
|
+
function Te(e) {
|
|
58
|
+
return Re.includes(e) ? j[e] : j.generic;
|
|
74
59
|
}
|
|
75
|
-
const
|
|
60
|
+
const Ce = {
|
|
76
61
|
statusLabel: "Error {{status}}",
|
|
77
62
|
reference: "Reference: {{id}}",
|
|
78
63
|
referenceHint: "If you contact support, quote this reference.",
|
|
@@ -141,32 +126,32 @@ const Ie = {
|
|
|
141
126
|
message: "Please try again, or go to the home page."
|
|
142
127
|
}
|
|
143
128
|
}
|
|
144
|
-
},
|
|
129
|
+
}, Ie = "alfadocs-ui.locale", _e = "it", ze = (e) => {
|
|
145
130
|
if (!e) return;
|
|
146
|
-
const
|
|
147
|
-
return
|
|
148
|
-
},
|
|
131
|
+
const o = e.toLowerCase().replaceAll("_", "-").split("-")[0], n = o === "cn" ? "zh" : o;
|
|
132
|
+
return we.includes(n) ? n : void 0;
|
|
133
|
+
}, $e = () => {
|
|
149
134
|
try {
|
|
150
|
-
return window.localStorage.getItem(
|
|
135
|
+
return window.localStorage.getItem(Ie);
|
|
151
136
|
} catch {
|
|
152
137
|
return null;
|
|
153
138
|
}
|
|
154
139
|
};
|
|
155
|
-
function
|
|
156
|
-
var
|
|
157
|
-
const
|
|
140
|
+
function Be(e = {}) {
|
|
141
|
+
var h;
|
|
142
|
+
const o = typeof window < "u", n = e.saved !== void 0 ? e.saved : o ? $e() : null, m = e.browser ?? (o && typeof navigator < "u" ? (h = navigator.languages) != null && h.length ? navigator.languages : [navigator.language] : []), f = e.document ?? (typeof document < "u" ? document.documentElement.lang : ""), b = [
|
|
158
143
|
e.locale,
|
|
159
144
|
n,
|
|
160
145
|
...m,
|
|
161
|
-
e.hostLocaleIsDefault ? void 0 :
|
|
146
|
+
e.hostLocaleIsDefault ? void 0 : f
|
|
162
147
|
];
|
|
163
148
|
for (const v of b) {
|
|
164
|
-
const p =
|
|
149
|
+
const p = ze(v);
|
|
165
150
|
if (p) return p;
|
|
166
151
|
}
|
|
167
|
-
return
|
|
152
|
+
return _e;
|
|
168
153
|
}
|
|
169
|
-
const H = (e,
|
|
154
|
+
const H = (e, o) => ke(e, o), De = he(
|
|
170
155
|
"ds:flex ds:flex-col ds:items-center ds:justify-center ds:bg-[var(--background)] ds:text-[var(--foreground)] ds:px-[var(--spacing-md)] ds:py-[var(--spacing-2xl)]",
|
|
171
156
|
{
|
|
172
157
|
variants: {
|
|
@@ -186,97 +171,97 @@ const H = (e, a) => we(e, a), Fe = pe(
|
|
|
186
171
|
},
|
|
187
172
|
defaultVariants: { layout: "page", surface: "background" }
|
|
188
173
|
}
|
|
189
|
-
),
|
|
190
|
-
function
|
|
174
|
+
), Fe = /* @__PURE__ */ new Set(["ar"]), Ge = 1500;
|
|
175
|
+
function qe(e, o) {
|
|
191
176
|
const n = e instanceof Date ? e : new Date(e);
|
|
192
177
|
if (Number.isNaN(n.getTime())) return;
|
|
193
|
-
const m = /* @__PURE__ */ new Date(),
|
|
178
|
+
const m = /* @__PURE__ */ new Date(), f = m.toDateString() === n.toDateString() ? {} : {
|
|
194
179
|
day: "numeric",
|
|
195
180
|
month: "short",
|
|
196
181
|
...m.getFullYear() === n.getFullYear() ? {} : { year: "numeric" }
|
|
197
182
|
};
|
|
198
|
-
return new Intl.DateTimeFormat(
|
|
199
|
-
...
|
|
183
|
+
return new Intl.DateTimeFormat(o === "en" ? "en-GB" : o, {
|
|
184
|
+
...f,
|
|
200
185
|
hour: "2-digit",
|
|
201
186
|
minute: "2-digit"
|
|
202
187
|
}).format(n);
|
|
203
188
|
}
|
|
204
|
-
const _ = (e,
|
|
189
|
+
const _ = (e, o) => !!e.getResource(o, "ui", "errorPage"), O = (e) => be(e) ? e : "#", Ae = me(
|
|
205
190
|
({
|
|
206
191
|
status: e,
|
|
207
|
-
homeHref:
|
|
192
|
+
homeHref: o = "/",
|
|
208
193
|
loginHref: n,
|
|
209
194
|
supportHref: m,
|
|
210
|
-
onRetry:
|
|
195
|
+
onRetry: f,
|
|
211
196
|
requestId: b,
|
|
212
|
-
backAt:
|
|
197
|
+
backAt: h,
|
|
213
198
|
locale: v,
|
|
214
199
|
hostLocaleIsDefault: p = !1,
|
|
215
|
-
title:
|
|
216
|
-
message:
|
|
200
|
+
title: V,
|
|
201
|
+
message: U,
|
|
217
202
|
primaryAction: s,
|
|
218
|
-
showHomeLink:
|
|
219
|
-
mood:
|
|
220
|
-
showStatusLabel:
|
|
221
|
-
showLogo:
|
|
222
|
-
as:
|
|
203
|
+
showHomeLink: K = !0,
|
|
204
|
+
mood: Q,
|
|
205
|
+
showStatusLabel: J = !0,
|
|
206
|
+
showLogo: X = !0,
|
|
207
|
+
as: Z,
|
|
223
208
|
focusHeading: z = !0,
|
|
224
|
-
focusKey:
|
|
209
|
+
focusKey: ee,
|
|
225
210
|
scrollOnFocus: $ = !1,
|
|
226
|
-
headingLevel:
|
|
227
|
-
layout:
|
|
211
|
+
headingLevel: te = 1,
|
|
212
|
+
layout: re,
|
|
228
213
|
surface: B,
|
|
229
214
|
className: oe,
|
|
230
|
-
...
|
|
231
|
-
},
|
|
232
|
-
const { i18n: d } = fe("ui", { useSuspense: !1 }),
|
|
233
|
-
() =>
|
|
215
|
+
...ae
|
|
216
|
+
}, ne) => {
|
|
217
|
+
const { i18n: d } = fe("ui", { useSuspense: !1 }), a = ue(
|
|
218
|
+
() => Be({ locale: v, hostLocaleIsDefault: p }),
|
|
234
219
|
[v, p]
|
|
235
|
-
), [k, D] =
|
|
236
|
-
for:
|
|
237
|
-
shown: _(d,
|
|
238
|
-
})), i = k.shown, [,
|
|
220
|
+
), [k, D] = M(() => ({
|
|
221
|
+
for: a,
|
|
222
|
+
shown: _(d, a) ? a : null
|
|
223
|
+
})), i = k.shown, [, se] = M(0);
|
|
239
224
|
I(() => {
|
|
240
225
|
let r = !0;
|
|
241
|
-
const P = _(d,
|
|
242
|
-
(C) => C.for ===
|
|
226
|
+
const P = _(d, a), x = (l) => D(
|
|
227
|
+
(C) => C.for === a && C.shown === l ? C : { for: a, shown: l }
|
|
243
228
|
), E = () => D(
|
|
244
|
-
(l) => l.for ===
|
|
229
|
+
(l) => l.for === a && l.shown ? l : { for: a, shown: "en" }
|
|
245
230
|
);
|
|
246
|
-
x(P ?
|
|
231
|
+
x(P ? a : null), _(d, "en") || d.addResourceBundle(
|
|
247
232
|
"en",
|
|
248
233
|
"ui",
|
|
249
|
-
{ errorPage:
|
|
234
|
+
{ errorPage: Ce },
|
|
250
235
|
!0,
|
|
251
236
|
!1
|
|
252
237
|
);
|
|
253
|
-
const
|
|
254
|
-
H("en", d).then(
|
|
238
|
+
const W = () => r && se((l) => l + 1);
|
|
239
|
+
H("en", d).then(W).catch(() => {
|
|
255
240
|
});
|
|
256
|
-
const
|
|
257
|
-
return H(
|
|
258
|
-
r && (x(
|
|
241
|
+
const le = P ? void 0 : setTimeout(() => r && E(), Ge);
|
|
242
|
+
return H(a, d).then(() => {
|
|
243
|
+
r && (x(a), W());
|
|
259
244
|
}).catch(() => r && E()), () => {
|
|
260
|
-
r = !1, clearTimeout(
|
|
245
|
+
r = !1, clearTimeout(le);
|
|
261
246
|
};
|
|
262
|
-
}, [d,
|
|
247
|
+
}, [d, a]);
|
|
263
248
|
const c = d.getFixedT(
|
|
264
249
|
i && i !== "en" ? [i, "en"] : "en",
|
|
265
250
|
"ui"
|
|
266
|
-
), u =
|
|
251
|
+
), u = Te(e), N = u.key === "maintenance" && h ? qe(h, i ?? "en") : void 0, F = Y(null), y = ge(), R = `${String(e)}:${ee ?? ""}`, G = Y(null);
|
|
267
252
|
I(() => {
|
|
268
|
-
if (!z || !k.shown || k.for !==
|
|
253
|
+
if (!z || !k.shown || k.for !== a || G.current === R) return;
|
|
269
254
|
G.current = R;
|
|
270
255
|
const r = F.current;
|
|
271
256
|
r == null || r.focus({ preventScroll: !0 }), $ && (r == null || r.scrollIntoView({ block: "nearest" }));
|
|
272
|
-
}, [k,
|
|
273
|
-
const
|
|
257
|
+
}, [k, a, z, R, $]);
|
|
258
|
+
const ie = ["h1", "h2", "h3"][te - 1], q = s !== void 0 && (typeof s.label != "string" || s.label.trim() === "");
|
|
274
259
|
I(() => {
|
|
275
|
-
|
|
260
|
+
q && ye() && console.warn(
|
|
276
261
|
"ErrorPage: `primaryAction.label` is empty, so its button has no accessible name. Pass the label, already translated."
|
|
277
262
|
);
|
|
278
|
-
}, [
|
|
279
|
-
const
|
|
263
|
+
}, [q]);
|
|
264
|
+
const A = B === "card", de = Z ?? (A ? "div" : "main"), ce = f ?? (() => window.location.reload()), w = u.primary === "login" && !n ? "retry" : u.primary, T = (r, P, x, E) => /* @__PURE__ */ t(
|
|
280
265
|
S,
|
|
281
266
|
{
|
|
282
267
|
intent: E,
|
|
@@ -326,61 +311,61 @@ const _ = (e, a) => !!e.getResource(a, "ui", "errorPage"), O = (e) => ve(e) ? e
|
|
|
326
311
|
{
|
|
327
312
|
intent: "primary",
|
|
328
313
|
size: "lg",
|
|
329
|
-
startIcon: /* @__PURE__ */ t(
|
|
330
|
-
onClick:
|
|
314
|
+
startIcon: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" }),
|
|
315
|
+
onClick: ce,
|
|
331
316
|
"data-action": "retry",
|
|
332
317
|
children: c("errorPage.actions.retry")
|
|
333
318
|
},
|
|
334
319
|
"retry"
|
|
335
320
|
)
|
|
336
321
|
) : w === "login" && n && g.push(
|
|
337
|
-
T("login", n, /* @__PURE__ */ t(
|
|
338
|
-
),
|
|
322
|
+
T("login", n, /* @__PURE__ */ t(xe, { "aria-hidden": "true" }), "primary")
|
|
323
|
+
), K && e !== "offline" && u.key !== "maintenance" && !(s && w === "home") && g.push(
|
|
339
324
|
T(
|
|
340
325
|
"home",
|
|
341
|
-
|
|
342
|
-
/* @__PURE__ */ t(
|
|
326
|
+
o,
|
|
327
|
+
/* @__PURE__ */ t(Ee, { "aria-hidden": "true" }),
|
|
343
328
|
w === "home" ? "primary" : "secondary"
|
|
344
329
|
)
|
|
345
330
|
), m && g.push(
|
|
346
331
|
T(
|
|
347
332
|
"support",
|
|
348
333
|
m,
|
|
349
|
-
/* @__PURE__ */ t(
|
|
334
|
+
/* @__PURE__ */ t(Ne, { "aria-hidden": "true" }),
|
|
350
335
|
"ghost"
|
|
351
336
|
)
|
|
352
337
|
), /* @__PURE__ */ t(
|
|
353
|
-
|
|
338
|
+
de,
|
|
354
339
|
{
|
|
355
|
-
ref:
|
|
340
|
+
ref: ne,
|
|
356
341
|
"data-component": "error-page",
|
|
357
342
|
"data-status": String(e),
|
|
358
343
|
lang: i ?? void 0,
|
|
359
344
|
"aria-busy": i ? void 0 : !0,
|
|
360
|
-
dir: i &&
|
|
361
|
-
className:
|
|
362
|
-
layout:
|
|
345
|
+
dir: i && Fe.has(i) ? "rtl" : "ltr",
|
|
346
|
+
className: De({
|
|
347
|
+
layout: re ?? (A ? "embedded" : void 0),
|
|
363
348
|
surface: B,
|
|
364
349
|
className: oe
|
|
365
350
|
}),
|
|
366
|
-
...
|
|
351
|
+
...ae,
|
|
367
352
|
children: /* @__PURE__ */ L(
|
|
368
353
|
"div",
|
|
369
354
|
{
|
|
370
355
|
className: i ? "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-lg)] ds:text-center ds:[max-inline-size:32rem]" : "ds:invisible",
|
|
371
356
|
children: [
|
|
372
|
-
/* @__PURE__ */ t(
|
|
357
|
+
/* @__PURE__ */ t(ve, { mood: Q ?? u.mood }),
|
|
373
358
|
/* @__PURE__ */ L("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
374
359
|
/* @__PURE__ */ L(
|
|
375
|
-
|
|
360
|
+
ie,
|
|
376
361
|
{
|
|
377
362
|
ref: F,
|
|
378
363
|
tabIndex: -1,
|
|
379
364
|
"aria-describedby": N ? `${y}-message ${y}-back` : `${y}-message`,
|
|
380
365
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:outline-none",
|
|
381
366
|
children: [
|
|
382
|
-
|
|
383
|
-
/* @__PURE__ */ t("span", { className: "type-title-page", children:
|
|
367
|
+
J && typeof e == "number" && /* @__PURE__ */ t("span", { className: "type-label ds:text-[var(--muted-foreground)]", children: c("errorPage.statusLabel", { status: e }) }),
|
|
368
|
+
/* @__PURE__ */ t("span", { className: "type-title-page", children: V ?? c(`errorPage.status.${u.key}.title`) })
|
|
384
369
|
]
|
|
385
370
|
}
|
|
386
371
|
),
|
|
@@ -389,7 +374,7 @@ const _ = (e, a) => !!e.getResource(a, "ui", "errorPage"), O = (e) => ve(e) ? e
|
|
|
389
374
|
{
|
|
390
375
|
id: `${y}-message`,
|
|
391
376
|
className: "type-body ds:text-[var(--muted-foreground)]",
|
|
392
|
-
children:
|
|
377
|
+
children: U ?? c(`errorPage.status.${u.key}.message`)
|
|
393
378
|
}
|
|
394
379
|
),
|
|
395
380
|
N && /* @__PURE__ */ t("p", { id: `${y}-back`, className: "type-body ds:font-semibold", children: c("errorPage.backAt", { time: N }) })
|
|
@@ -400,7 +385,7 @@ const _ = (e, a) => !!e.getResource(a, "ui", "errorPage"), O = (e) => ve(e) ? e
|
|
|
400
385
|
/* @__PURE__ */ t("br", {}),
|
|
401
386
|
c("errorPage.referenceHint")
|
|
402
387
|
] }),
|
|
403
|
-
|
|
388
|
+
X && /* @__PURE__ */ t(pe, { decorative: !0, size: "sm", className: "ds:opacity-70" })
|
|
404
389
|
]
|
|
405
390
|
}
|
|
406
391
|
)
|
|
@@ -408,12 +393,12 @@ const _ = (e, a) => !!e.getResource(a, "ui", "errorPage"), O = (e) => ve(e) ? e
|
|
|
408
393
|
);
|
|
409
394
|
}
|
|
410
395
|
);
|
|
411
|
-
|
|
396
|
+
Ae.displayName = "ErrorPage";
|
|
412
397
|
export {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
398
|
+
_e as E,
|
|
399
|
+
Re as a,
|
|
400
|
+
Ae as b,
|
|
401
|
+
Te as e,
|
|
402
|
+
Be as r
|
|
418
403
|
};
|
|
419
|
-
//# sourceMappingURL=error-page-
|
|
404
|
+
//# sourceMappingURL=error-page-WLhmWUTq.js.map
|