@alfadocs/ui-kit-debug 1.132.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-BSkIYGlW.js +13773 -0
- package/dist/_chunks/calendar-appointment-editor-dialog-BSkIYGlW.js.map +1 -0
- 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 +514 -1
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +512 -4
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +514 -1
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +520 -5
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +514 -1
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +515 -5
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +516 -1
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +522 -4
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +514 -1
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +513 -5
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +514 -1
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +513 -5
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +514 -1
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +513 -5
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +514 -1
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +520 -5
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +514 -1
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +513 -5
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +514 -1
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +520 -5
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +514 -1
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +520 -5
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +514 -1
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +520 -5
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +514 -1
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +520 -5
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +514 -1
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +512 -4
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +514 -1
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +513 -5
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +514 -1
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +513 -5
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +514 -1
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +515 -5
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +514 -1
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +513 -5
- 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 +516 -3
- package/dist/locales/de.json +517 -4
- package/dist/locales/el.json +517 -4
- package/dist/locales/en.json +516 -3
- package/dist/locales/es.json +517 -4
- package/dist/locales/fr.json +517 -4
- package/dist/locales/hi.json +517 -4
- package/dist/locales/it.json +517 -4
- package/dist/locales/ja.json +517 -4
- package/dist/locales/nl.json +517 -4
- package/dist/locales/pl.json +517 -4
- package/dist/locales/pt.json +517 -4
- package/dist/locales/ro.json +517 -4
- package/dist/locales/ru.json +516 -3
- package/dist/locales/sq.json +517 -4
- package/dist/locales/sv.json +517 -4
- package/dist/locales/tr.json +517 -4
- package/dist/locales/zh.json +517 -4
- package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-workspace.model.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.journey.d.ts +4 -0
- package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.surface.d.ts +15 -1
- package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.types.d.ts +4 -0
- package/dist/patterns/calendar/calendar.types.d.ts.map +1 -1
- 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/calendar-appointment-editor-dialog-WW6V1SGh.js +0 -13663
- package/dist/_chunks/calendar-appointment-editor-dialog-WW6V1SGh.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":"sms-code-entry-Dgp4GwlM.js","sources":["../../src/components/sms-code-entry/sms-code-entry.agent.ts","../../src/components/sms-code-entry/sms-code-entry.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter: SmsCodeEntry. */\n/* */\n/* An SMS code is a one-time credential. As for PinEntry, an agent may */\n/* see how many digits are typed, whether the code is complete and what */\n/* the host reported, and it may clear or focus the boxes. It can neither */\n/* read nor type the code. The adapter exposes no submit or resend action: */\n/* the person presses those buttons. So there is no `value` state slot */\n/* and no `set_value`, `submit` or `resend` action. The buttons still */\n/* carry `data-action=\"submit-code\"` and `\"resend-code\"` as DOM hooks, */\n/* which any external tool can address; the adapter does not offer them. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { SmsCodeEntryHandle } from './sms-code-entry';\n\nexport const smsCodeEntryAgent: AgentAdapter<SmsCodeEntryHandle> = {\n id: 'sms-code-entry',\n capabilities: [],\n state: {\n filledCount: {\n type: 'number',\n descriptionKey: 'ui.agent.smsCodeEntry.state.filledCount',\n description: 'How many digits are typed. Never the digits themselves.',\n read: (handle) => handle.getFilledCount(),\n },\n length: {\n type: 'number',\n descriptionKey: 'ui.agent.smsCodeEntry.state.length',\n description: 'How many digits the code has.',\n read: (handle) => handle.getLength(),\n },\n isComplete: {\n type: 'boolean',\n descriptionKey: 'ui.agent.smsCodeEntry.state.isComplete',\n description:\n 'Whether every box is filled, so the person can press the submit button.',\n read: (handle) => handle.isComplete(),\n },\n error: {\n type: \"'wrong' | 'expired' | 'locked' | 'send-failed' | 'resend-limit' | null\",\n descriptionKey: 'ui.agent.smsCodeEntry.state.error',\n description:\n 'What the host reported about the code: wrong, expired, locked, send-failed or resend-limit, or null when it reported nothing.',\n read: (handle) => handle.getError(),\n },\n },\n actions: {\n clear: {\n safety: 'destructive',\n idempotent: true,\n descriptionKey: 'ui.agent.smsCodeEntry.actions.clear',\n description: 'Empty the boxes. Loses the digits typed so far.',\n invoke: (handle) => {\n handle.clear();\n },\n },\n focus: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.smsCodeEntry.actions.focus',\n description:\n 'Move keyboard focus to the code boxes, so the person can type or paste the code. Does nothing while the boxes are disabled.',\n invoke: (handle) => {\n handle.focus();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'sms-code-entry',\n description:\n 'Marks the SMS code step: the sentence naming the masked mobile, the code boxes (an OTPInput), the notes, \"Send a new code\" and the submit button.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { CircleAlert } from 'lucide-react';\nimport { Trans, useTranslation } from 'react-i18next';\nimport { useAgentRegistration } from '../../agent';\nimport { useControllableState } from '../../hooks/use-controllable-state';\nimport { formatNumber } from '../_shared/format-number';\nimport { Alert } from '../alert';\nimport { Button } from '../button';\nimport { OTPInput, type OTPInputHandle } from '../otp-input';\nimport { smsCodeEntryAgent } from './sms-code-entry.agent';\n\n/** What the host reports about the code. See `SmsCodeEntryProps.error`. */\nexport type SmsCodeEntryError =\n | 'wrong'\n | 'expired'\n | 'locked'\n | 'send-failed'\n | 'resend-limit';\n\n/**\n * Agent-readiness curated handle for SmsCodeEntry. The code is a one-time\n * credential: the handle never returns the digits, and it can neither\n * submit the code nor ask for a new one. The person presses those buttons.\n */\nexport interface SmsCodeEntryHandle {\n /** Empties the boxes. If a box had focus, focus waits in the first box. */\n clear: () => void;\n /** Moves focus to the boxes. Does nothing while they are disabled. */\n focus: () => void;\n /** How many digits are typed. Never the digits themselves. */\n getFilledCount: () => number;\n /** How many digits the code has. */\n getLength: () => number;\n /** Whether every box is filled. */\n isComplete: () => boolean;\n /** What the host reported about the code (`error`), or null. */\n getError: () => SmsCodeEntryError | null;\n}\n\nconst rootVariants = cva(\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:break-words',\n);\n\n/** The quiet lines: the notes under the boxes, the wait, the contact hint. */\nconst lineVariants = cva(\n 'type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]',\n);\n\n/** A live region that stays mounted, out of the layout while it is empty. */\nconst regionVariants = cva('', {\n variants: { empty: { true: 'ds:sr-only', false: '' } },\n defaultVariants: { empty: true },\n});\n\nconst DEFAULT_LENGTH = 6;\n\n/** OTPInput's own clamp (3 to 10 boxes), so the checks count the boxes. */\nfunction resolveLength(length: number): number {\n const n = Number.isFinite(length) ? Math.floor(length) : DEFAULT_LENGTH;\n return Math.min(10, Math.max(3, n));\n}\n\n/** Digits only, Arabic-Indic digits folded as OTPInput folds them. */\nfunction toCode(raw: string, length: number): string {\n return raw\n .replace(/[٠-٩]/g, (c) => String(c.charCodeAt(0) - 0x0660))\n .replace(/[۰-۹]/g, (c) => String(c.charCodeAt(0) - 0x06f0))\n .replace(/\\D/g, '')\n .slice(0, length);\n}\n\n/** Whole seconds left in the host's wait; anything unusable is no wait. */\nfunction toWaitSeconds(seconds: number | undefined): number {\n return typeof seconds === 'number' && Number.isFinite(seconds)\n ? Math.max(0, Math.ceil(seconds))\n : 0;\n}\n\n/** A usable number of minutes, or undefined. */\nfunction toMinutes(value: number | undefined): number | undefined {\n const ok = typeof value === 'number' && Number.isFinite(value) && value > 0;\n return ok ? value : undefined;\n}\n\nexport interface SmsCodeEntryProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'onSubmit'\n> {\n /**\n * The masked mobile the code went to, as the host formats it, for example\n * \"+39 ••• ••• 4521\" (the last four digits). Shown inside\n * `<bdi dir=\"ltr\">`. Under `privacy`, or when absent, the sentence says\n * \"your mobile\" instead.\n */\n destination?: string;\n /**\n * Replaces the default sentence that names the destination. Rendered as\n * given, also under `privacy`: keep it free of personal data there.\n */\n body?: ReactNode;\n /**\n * Number of digit boxes, passed to `OTPInput`. Default 6. OTPInput draws\n * 3 to 10 boxes and clamps anything else into that range. The boxes sit\n * in groups of three that wrap onto more lines on a narrow screen.\n */\n length?: number;\n /** The digits, when controlled. Pair with `onValueChange`. */\n value?: string;\n /** The first digits, when uncontrolled. */\n defaultValue?: string;\n /**\n * Called with the digits on every change, controlled or not, including\n * the empty string when the boxes empty after a submit or a resend.\n */\n onValueChange?: (value: string) => void;\n /**\n * Called with the code when the submit button is pressed with every box\n * filled; the boxes then empty for the next attempt. The host decides\n * right or wrong. Never called as the last digit lands (WCAG 3.2.2).\n */\n onSubmit?: (code: string) => void;\n /**\n * Submit button text. Default \"Verify\"; the step-up dialog passes\n * \"Confirm\". Rendered as given, also under `privacy`: keep it free of\n * personal data there.\n */\n submitLabel?: string;\n /**\n * The host is checking the code: the submit button shows a spinner and\n * keeps focus; the boxes and \"Send a new code\" are disabled.\n */\n submitting?: boolean;\n /**\n * What the host reports. `wrong` and `expired` sit on the field and the\n * entry stays open; after a new attempt, focus returns to the first box.\n * `locked` and `send-failed` disable the entry and show an alert.\n * `resend-limit` hides \"Send a new code\" only: the last code still works.\n * A field error is read out when it appears, so set `submitting` while the\n * host checks the next code: the message then mounts again on each result.\n */\n error?: SmsCodeEntryError | null;\n /**\n * Host text that replaces the default message for the current `error`,\n * for example how long a lock lasts. Rendered as given, also under\n * `privacy`: keep it free of personal data there.\n */\n errorText?: string;\n /**\n * Seconds until \"Send a new code\" unlocks, counted down by the host. Until\n * then a line says how long is left; 0 or absent shows the button. The\n * component runs no timer. A screen reader hears the wait only when it\n * starts and when it ends.\n */\n remainingSeconds?: number;\n /**\n * Called when \"Send a new code\" is pressed. The button shows only when\n * this is given. The boxes empty and focus waits in the first one.\n */\n onResend?: () => void;\n /**\n * Shows \"A new code is on its way\" in a polite live region. Hidden while\n * an `error` is shown.\n */\n resent?: boolean;\n /**\n * Adds the line \"The code works for N minutes\", for example 10 at\n * sign-in. The figure is the host's. Plural through i18n.\n */\n validityMinutes?: number;\n /**\n * An extra line under the boxes. Rendered as given, also under `privacy`:\n * keep it free of personal data there.\n */\n note?: ReactNode;\n /**\n * Default true: shows the line that the phone may fill in the code, and\n * turns on `OTPInput`'s `webOtp` (D117). A filled code is never submitted\n * for the person.\n */\n autofillHint?: boolean;\n /**\n * Shows \"No SMS? Contact the practice.\" once a new code may be sent (no\n * wait left) or the entry is stopped (AUTH-01: a landline takes the SMS\n * silently).\n */\n contactPracticeHint?: boolean;\n /** Disables the boxes and both buttons. */\n disabled?: boolean;\n /** Moves focus to the first empty box on mount. */\n autoFocus?: boolean;\n /**\n * Posts the code under this name, through `OTPInput`'s hidden field. The\n * boxes empty when the submit button is pressed, so a surrounding native\n * form carries the code only if the host submits it synchronously inside\n * `onSubmit` (for example `form.requestSubmit()`).\n */\n name?: string;\n /**\n * The root's id, also written as `data-component-id` and used as the\n * agent-registry key.\n */\n id?: string;\n /** Extra classes for the root. */\n className?: string;\n /**\n * Privacy mode: the sentence says \"your mobile\" instead of the masked\n * number. Nothing else the component writes is personal. Text the host\n * passes in (`body`, `note`, `errorText`, `submitLabel`) is rendered as\n * given, also under `privacy`.\n */\n privacy?: boolean;\n}\n\n/**\n * The SMS code step of sign-in, the step-up dialog, the check before a\n * document opens and check-in: the masked mobile, one box per digit, resend\n * and the code's states. Presentational: the host reports `error`,\n * `remainingSeconds` and `resent`, and decides what a code means. Nothing\n * here fetches, counts tries, compares codes or runs a timer. No email.\n */\nexport const SmsCodeEntry = forwardRef<HTMLDivElement, SmsCodeEntryProps>(\n (\n {\n destination,\n body,\n length = DEFAULT_LENGTH,\n value,\n defaultValue,\n onValueChange,\n onSubmit,\n submitLabel,\n submitting = false,\n error = null,\n errorText,\n remainingSeconds,\n onResend,\n resent = false,\n validityMinutes,\n note,\n autofillHint = true,\n contactPracticeHint = false,\n disabled = false,\n autoFocus = false,\n name,\n id,\n className,\n privacy = false,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation('ui');\n const uid = useId();\n const bodyId = `${uid}-body`;\n const notesId = `${uid}-notes`;\n const errorId = `${uid}-error`;\n const otp = useRef<OTPInputHandle>(null);\n const codeLength = resolveLength(length);\n const lengthText = formatNumber(codeLength, i18n.language);\n\n const [rawCode, setCode] = useControllableState<string>({\n value,\n defaultValue: defaultValue ?? '',\n onChange: onValueChange,\n });\n const code = toCode(rawCode ?? '', codeLength);\n const complete = code.length === codeLength;\n\n // Bumped by each submit, resend and clear: the boxes remount empty, so\n // OTPInput's roving focus starts again at the first box.\n const [round, setRound] = useState(0);\n // Set by a submit: after one, a wrong or expired code refocuses box one.\n const submitted = useRef(false);\n const rootRef = useRef<HTMLDivElement | null>(null);\n const submitRef = useRef<HTMLButtonElement | null>(null);\n // True while focus is inside the entry, so a stop can move it on.\n const focusInside = useRef(false);\n // Set by \"Send a new code\", and by a clear while a box had focus: once\n // the boxes remount, focus waits in the first one.\n const focusFirstBox = useRef(false);\n\n const stopped = error === 'locked' || error === 'send-failed';\n const limited = error === 'resend-limit';\n const codeError = error === 'wrong' || error === 'expired';\n const inactive = disabled || submitting || stopped;\n const hostText = errorText?.trim() ? errorText : undefined;\n\n // Hidden while the host checks, so each result mounts the alert again.\n const fieldError = submitting\n ? undefined\n : error === 'wrong'\n ? (hostText ?? t('smsCodeEntry.wrong'))\n : error === 'expired'\n ? (hostText ?? t('smsCodeEntry.expired'))\n : undefined;\n const stopText =\n error === 'locked'\n ? (hostText ?? t('smsCodeEntry.locked'))\n : error === 'send-failed'\n ? (hostText ?? t('smsCodeEntry.sendFailed'))\n : undefined;\n const showResent = resent && !error;\n\n const waitSeconds = toWaitSeconds(remainingSeconds);\n const inWait = waitSeconds > 0;\n const canResend = Boolean(onResend) && !stopped && !limited;\n const resendWaiting = canResend && inWait;\n const resendReady = canResend && !inWait;\n const showContactHint = contactPracticeHint && (stopped || !inWait);\n const waitText = t('smsCodeEntry.resendIn', {\n count: waitSeconds,\n seconds: formatNumber(waitSeconds, i18n.language),\n });\n\n const minutes = toMinutes(validityMinutes);\n const hasNotes = autofillHint || minutes !== undefined || Boolean(note);\n const describedBy = hasNotes ? `${bodyId} ${notesId}` : bodyId;\n const named = !privacy && Boolean(destination?.trim());\n const notReady = !submitting && (stopped || !complete);\n const submitText = submitLabel?.trim()\n ? submitLabel\n : t('smsCodeEntry.submit');\n const lineClass = lineVariants();\n\n // The wait is announced when it starts and when it ends, never each\n // second (05, one-time codes). The region mounts empty, so a wait that\n // opens with the step is read too.\n const [announcement, setAnnouncement] = useState('');\n const wasWaiting = useRef(false);\n useEffect(() => {\n if (resendWaiting === wasWaiting.current) return;\n wasWaiting.current = resendWaiting;\n const next = resendWaiting\n ? waitText\n : resendReady\n ? t('smsCodeEntry.resendReady')\n : '';\n setAnnouncement(next);\n }, [resendWaiting, resendReady, waitText, t]);\n\n // After a submit, once the host reports a wrong or expired code and the\n // boxes are usable, focus returns to the first box. Never on mount: a\n // step that opens on an error leaves focus where it is.\n useEffect(() => {\n if (!submitted.current || !codeError || inactive) return;\n submitted.current = false;\n otp.current?.focus();\n }, [round, codeError, inactive]);\n\n // A stop disables the boxes under the person: move focus to the submit\n // button, which stays focusable through aria-disabled.\n useEffect(() => {\n if (!stopped || !focusInside.current) return;\n const active = document.activeElement;\n if (active === null || active === document.body) {\n submitRef.current?.focus();\n }\n }, [stopped]);\n\n // After \"Send a new code\", focus waits in the first box for the new code;\n // after a clear under focus, it waits there for the next attempt.\n useEffect(() => {\n if (!focusFirstBox.current || inactive) return;\n focusFirstBox.current = false;\n otp.current?.focus();\n }, [round, inactive]);\n\n useEffect(() => {\n if (autoFocus) otp.current?.focus();\n }, [autoFocus]);\n\n const handleSubmit = () => {\n // Only a press with every box filled sends the code (WCAG 3.2.2).\n if (inactive || !complete) return;\n onSubmit?.(code);\n // The boxes empty: a refused code is typed again from the start.\n setCode('');\n setRound((n) => n + 1);\n submitted.current = true;\n };\n\n const handleResend = () => {\n if (disabled || submitting) return;\n onResend?.();\n setCode('');\n focusFirstBox.current = true;\n setRound((n) => n + 1);\n };\n\n // The handle reads the latest values through this ref, so it stays the\n // same object from one render to the next.\n const live = useRef({ code, length: codeLength, error });\n live.current = { code, length: codeLength, error };\n\n const handle = useMemo<SmsCodeEntryHandle>(\n () => ({\n clear: () => {\n const active = document.activeElement;\n const boxHadFocus =\n active instanceof HTMLInputElement &&\n Boolean(rootRef.current?.contains(active));\n if (boxHadFocus) focusFirstBox.current = true;\n // The boxes remount empty, so the roving focus starts again at\n // the first box, as after a submit.\n setCode('');\n setRound((n) => n + 1);\n },\n focus: () => {\n otp.current?.focus();\n },\n getFilledCount: () => live.current.code.length,\n getLength: () => live.current.length,\n isComplete: () => live.current.code.length === live.current.length,\n getError: () => live.current.error,\n }),\n [setCode],\n );\n useAgentRegistration(smsCodeEntryAgent, handle, id);\n\n return (\n <div\n {...rest}\n ref={(node) => {\n rootRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n }}\n id={id}\n onFocus={(event) => {\n focusInside.current = true;\n rest.onFocus?.(event);\n }}\n onBlur={(event) => {\n const next = event.relatedTarget;\n if (next instanceof Node && !event.currentTarget.contains(next)) {\n focusInside.current = false;\n }\n rest.onBlur?.(event);\n }}\n data-component=\"sms-code-entry\"\n data-component-id={id}\n data-privacy={privacy ? 'masked' : undefined}\n className={rootVariants({ className })}\n >\n {body != null ? (\n <div id={bodyId} className=\"type-body\">\n {body}\n </div>\n ) : (\n <p id={bodyId} className=\"type-body ds:m-0\">\n {named ? (\n <Trans\n t={t}\n ns=\"ui\"\n i18nKey=\"smsCodeEntry.body\"\n count={codeLength}\n values={{ length: lengthText, destination }}\n components={{\n dest: <bdi dir=\"ltr\" className=\"ds:font-semibold\" />,\n }}\n />\n ) : (\n t('smsCodeEntry.bodyYourMobile', {\n count: codeLength,\n length: lengthText,\n })\n )}\n </p>\n )}\n {stopText ? (\n <Alert variant=\"error\" announce=\"assertive\">\n <Alert.Description>{stopText}</Alert.Description>\n </Alert>\n ) : null}\n {/* Always mounted: a live region reads a change, not what it held\n when it appeared. */}\n <div\n role=\"status\"\n className={regionVariants({ empty: !limited && !showResent })}\n >\n {limited ? (\n <Alert variant=\"warning\" announce=\"off\">\n <Alert.Description>\n {hostText ?? t('smsCodeEntry.resendLimit')}\n </Alert.Description>\n </Alert>\n ) : null}\n {showResent ? (\n <Alert variant=\"success\" announce=\"off\">\n <Alert.Description>{t('smsCodeEntry.resent')}</Alert.Description>\n </Alert>\n ) : null}\n </div>\n {/* A field of its own, so the code has a label and an error slot. */}\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <OTPInput\n // Never pass an `id` here: an id registers OTPInput's own agent\n // adapter, whose `value` slot would expose the digits.\n label={t('smsCodeEntry.label')}\n key={round}\n ref={otp}\n length={codeLength}\n // Groups of three (two for the 6-digit code) that wrap onto the\n // next line when one line does not fit (WCAG 1.4.10 at 320 px).\n groupSize={3}\n value={code}\n onChange={setCode}\n disabled={inactive}\n webOtp={autofillHint}\n name={name}\n error={Boolean(fieldError)}\n aria-describedby={\n fieldError ? `${errorId} ${describedBy}` : describedBy\n }\n />\n {fieldError ? (\n <p\n id={errorId}\n role=\"alert\"\n data-slot=\"error\"\n className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-body-sm ds:text-destructive\"\n >\n <CircleAlert\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0\"\n />\n <span>{fieldError}</span>\n </p>\n ) : null}\n </div>\n {hasNotes ? (\n <div\n id={notesId}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\"\n >\n {autofillHint ? (\n <p className={lineClass}>{t('smsCodeEntry.autofill')}</p>\n ) : null}\n {minutes !== undefined ? (\n <p className={lineClass}>\n {t('smsCodeEntry.validity', {\n count: minutes,\n minutes: formatNumber(minutes, i18n.language),\n })}\n </p>\n ) : null}\n {note ? <div className={lineClass}>{note}</div> : null}\n </div>\n ) : null}\n {resendWaiting || resendReady || showContactHint ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n {resendWaiting ? <p className={lineClass}>{waitText}</p> : null}\n {resendReady ? (\n <Button\n intent=\"ghost\"\n className=\"ds:min-h-[var(--min-target-size)]\"\n data-action=\"resend-code\"\n disabled={disabled || submitting}\n onClick={handleResend}\n >\n {t('smsCodeEntry.resend')}\n </Button>\n ) : null}\n {showContactHint ? (\n <p className={lineClass}>{t('smsCodeEntry.contactPractice')}</p>\n ) : null}\n </div>\n ) : null}\n <div role=\"status\" className=\"ds:sr-only\">\n {announcement}\n </div>\n <Button\n intent=\"primary\"\n ref={submitRef}\n className=\"ds:w-full ds:min-h-[var(--min-target-size)]\"\n data-action=\"submit-code\"\n loading={submitting}\n disabled={disabled}\n // Not native `disabled` while the code is short or the entry is\n // stopped: the button keeps focus as the boxes empty after a\n // press, as it does while `loading`.\n aria-disabled={notReady || undefined}\n onClick={handleSubmit}\n >\n {submitText}\n </Button>\n </div>\n );\n },\n);\n\nSmsCodeEntry.displayName = 'SmsCodeEntry';\n"],"names":["smsCodeEntryAgent","handle","rootVariants","cva","lineVariants","regionVariants","DEFAULT_LENGTH","resolveLength","length","n","toCode","raw","c","toWaitSeconds","seconds","toMinutes","value","SmsCodeEntry","forwardRef","destination","body","defaultValue","onValueChange","onSubmit","submitLabel","submitting","error","errorText","remainingSeconds","onResend","resent","validityMinutes","note","autofillHint","contactPracticeHint","disabled","autoFocus","name","id","className","privacy","rest","ref","t","i18n","useTranslation","uid","useId","bodyId","notesId","errorId","otp","useRef","codeLength","lengthText","formatNumber","rawCode","setCode","useControllableState","code","complete","round","setRound","useState","submitted","rootRef","submitRef","focusInside","focusFirstBox","stopped","limited","codeError","inactive","hostText","fieldError","stopText","showResent","waitSeconds","inWait","canResend","resendWaiting","resendReady","showContactHint","waitText","minutes","hasNotes","describedBy","named","notReady","submitText","lineClass","announcement","setAnnouncement","wasWaiting","useEffect","next","_a","active","handleSubmit","handleResend","live","useMemo","useAgentRegistration","jsxs","node","event","jsx","Trans","Alert","OTPInput","CircleAlert","Button"],"mappings":";;;;;;;;;;;AAkBO,MAAMA,KAAsD;AAAA,EACjE,IAAI;AAAA,EACJ,cAAc,CAAA;AAAA,EACd,OAAO;AAAA,IACL,aAAa;AAAA,MACX,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,eAAA;AAAA,IAAe;AAAA,IAE1C,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACA,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,YAAY;AAAA,MACV,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,WAAA;AAAA,IAAW;AAAA,IAEtC,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,EACpC;AAAA,EAEF,SAAS;AAAA,IACP,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,MAAA;AAAA,MACT;AAAA,IAAA;AAAA,IAEF,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,MAAA;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM;AAAA,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AC,OAAA,EAAI,WAAU,sFACZ,UAAA;AAAA,YAAAvB,IAAgB,gBAAA0B,EAAC,KAAA,EAAE,WAAWhB,GAAY,aAAS,IAAO;AAAA,YAC1DT,IACC,gBAAAyB;AAAA,cAACK;AAAA,cAAA;AAAA,gBACC,QAAO;AAAA,gBACP,WAAU;AAAA,gBACV,eAAY;AAAA,gBACZ,UAAU5E,KAAYV;AAAA,gBACtB,SAAS0E;AAAA,gBAER,YAAE,qBAAqB;AAAA,cAAA;AAAA,YAAA,IAExB;AAAA,YACHjB,uBACE,KAAA,EAAE,WAAWQ,GAAY,UAAA/C,EAAE,8BAA8B,GAAE,IAC1D;AAAA,UAAA,EAAA,CACN,IACE;AAAA,4BACH,OAAA,EAAI,MAAK,UAAS,WAAU,cAC1B,UAAAgD,IACH;AAAA,UACA,gBAAAe;AAAA,YAACK;AAAA,YAAA;AAAA,cACC,QAAO;AAAA,cACP,KAAK7C;AAAA,cACL,WAAU;AAAA,cACV,eAAY;AAAA,cACZ,SAASzC;AAAA,cACT,UAAAU;AAAA,cAIA,iBAAeqD,MAAY;AAAA,cAC3B,SAASU;AAAA,cAER,UAAAT;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAxE,GAAa,cAAc;"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as _, useRef as $ } from "react";
|
|
3
|
+
import { c as y } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as j } from "react-i18next";
|
|
5
|
+
import { B as L } from "./button-DohK_Ak_.js";
|
|
6
|
+
import { D as o } from "./dialog-CVTxyR0v.js";
|
|
7
|
+
import { S as M } from "./sms-code-entry-Dgp4GwlM.js";
|
|
8
|
+
const b = y(
|
|
9
|
+
"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:break-words"
|
|
10
|
+
), ee = y(
|
|
11
|
+
"type-body ds:m-0 ds:text-[color:var(--foreground)]"
|
|
12
|
+
), te = _(
|
|
13
|
+
({
|
|
14
|
+
open: D,
|
|
15
|
+
defaultOpen: S,
|
|
16
|
+
onOpenChange: l,
|
|
17
|
+
title: i,
|
|
18
|
+
subject: s,
|
|
19
|
+
noMobile: n = !1,
|
|
20
|
+
noMobileText: x,
|
|
21
|
+
onCancel: d,
|
|
22
|
+
onSubmit: E,
|
|
23
|
+
submitLabel: a,
|
|
24
|
+
submitting: T,
|
|
25
|
+
disabled: F,
|
|
26
|
+
autoFocus: A = !0,
|
|
27
|
+
name: B,
|
|
28
|
+
privacy: p = !1,
|
|
29
|
+
id: f,
|
|
30
|
+
className: C,
|
|
31
|
+
destination: H,
|
|
32
|
+
length: N,
|
|
33
|
+
value: R,
|
|
34
|
+
defaultValue: U,
|
|
35
|
+
onValueChange: k,
|
|
36
|
+
error: w,
|
|
37
|
+
errorText: z,
|
|
38
|
+
remainingSeconds: V,
|
|
39
|
+
onResend: q,
|
|
40
|
+
resent: G,
|
|
41
|
+
validityMinutes: I,
|
|
42
|
+
note: J,
|
|
43
|
+
autofillHint: K,
|
|
44
|
+
contactPracticeHint: O,
|
|
45
|
+
...P
|
|
46
|
+
}, Q) => {
|
|
47
|
+
const { t: c } = j("ui"), m = $(null), W = i != null && i.trim() ? i : c("stepUpDialog.title"), h = s != null && typeof s != "boolean" && !(typeof s == "string" && s.trim() === ""), g = h || n, X = (t) => {
|
|
48
|
+
l == null || l(t), t || d == null || d();
|
|
49
|
+
}, Y = (t) => {
|
|
50
|
+
const r = document.activeElement;
|
|
51
|
+
m.current = r instanceof HTMLElement && r !== document.body ? r : null, !A && (t.preventDefault(), t.target instanceof HTMLElement && t.target.focus({ preventScroll: !0 }));
|
|
52
|
+
}, Z = (t) => {
|
|
53
|
+
if (t.target instanceof HTMLElement && t.target.isConnected)
|
|
54
|
+
return;
|
|
55
|
+
const r = m.current;
|
|
56
|
+
m.current = null;
|
|
57
|
+
const v = document.activeElement;
|
|
58
|
+
v !== null && v !== document.body || r === null || !r.isConnected || (t.preventDefault(), r.focus({ preventScroll: !0 }));
|
|
59
|
+
};
|
|
60
|
+
return /* @__PURE__ */ e(
|
|
61
|
+
o.Root,
|
|
62
|
+
{
|
|
63
|
+
id: f,
|
|
64
|
+
open: D,
|
|
65
|
+
defaultOpen: S,
|
|
66
|
+
onOpenChange: X,
|
|
67
|
+
children: /* @__PURE__ */ e(
|
|
68
|
+
o.Content,
|
|
69
|
+
{
|
|
70
|
+
...g ? {} : { "aria-describedby": void 0 },
|
|
71
|
+
...P,
|
|
72
|
+
ref: Q,
|
|
73
|
+
size: "sm",
|
|
74
|
+
hideCloseButton: !0,
|
|
75
|
+
className: C,
|
|
76
|
+
"data-privacy": p ? "masked" : void 0,
|
|
77
|
+
onOpenAutoFocus: Y,
|
|
78
|
+
onCloseAutoFocus: Z,
|
|
79
|
+
children: /* @__PURE__ */ u("div", { "data-component": "step-up-dialog", "data-component-id": f, children: [
|
|
80
|
+
/* @__PURE__ */ u(o.Header, { children: [
|
|
81
|
+
/* @__PURE__ */ e(o.Title, { children: W }),
|
|
82
|
+
g ? /* @__PURE__ */ e(o.Description, { asChild: !0, children: /* @__PURE__ */ u("div", { className: b(), children: [
|
|
83
|
+
h ? /* @__PURE__ */ e("div", { children: s }) : null,
|
|
84
|
+
n ? /* @__PURE__ */ e("p", { className: ee(), children: x ?? c("stepUpDialog.noMobile") }) : null
|
|
85
|
+
] }) }) : null
|
|
86
|
+
] }),
|
|
87
|
+
n ? null : /* @__PURE__ */ e(o.Body, { children: /* @__PURE__ */ e(
|
|
88
|
+
M,
|
|
89
|
+
{
|
|
90
|
+
destination: H,
|
|
91
|
+
length: N,
|
|
92
|
+
value: R,
|
|
93
|
+
defaultValue: U,
|
|
94
|
+
onValueChange: k,
|
|
95
|
+
onSubmit: E,
|
|
96
|
+
submitLabel: a != null && a.trim() ? a : c("common.confirm"),
|
|
97
|
+
submitting: T,
|
|
98
|
+
error: w,
|
|
99
|
+
errorText: z,
|
|
100
|
+
remainingSeconds: V,
|
|
101
|
+
onResend: q,
|
|
102
|
+
resent: G,
|
|
103
|
+
validityMinutes: I,
|
|
104
|
+
note: J,
|
|
105
|
+
autofillHint: K,
|
|
106
|
+
contactPracticeHint: O,
|
|
107
|
+
disabled: F,
|
|
108
|
+
name: B,
|
|
109
|
+
privacy: p
|
|
110
|
+
}
|
|
111
|
+
) }),
|
|
112
|
+
/* @__PURE__ */ e(o.Footer, { children: /* @__PURE__ */ e(o.Close, { asChild: !0, children: /* @__PURE__ */ e(
|
|
113
|
+
L,
|
|
114
|
+
{
|
|
115
|
+
intent: n ? "primary" : "outline",
|
|
116
|
+
className: "ds:min-h-[var(--min-target-size)]",
|
|
117
|
+
"data-action": n ? "close" : "cancel",
|
|
118
|
+
children: c(n ? "common.close" : "common.cancel")
|
|
119
|
+
}
|
|
120
|
+
) }) })
|
|
121
|
+
] })
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
te.displayName = "StepUpDialog";
|
|
129
|
+
export {
|
|
130
|
+
te as S
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=step-up-dialog-C2JqJmCA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-up-dialog-C2JqJmCA.js","sources":["../../src/components/step-up-dialog/step-up-dialog.tsx"],"sourcesContent":["import { forwardRef, useRef, type HTMLAttributes, type ReactNode } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '../button';\nimport { Dialog } from '../dialog';\nimport { SmsCodeEntry, type SmsCodeEntryProps } from '../sms-code-entry';\n\n/** What the check is for and, with no mobile, why no code can come. */\nconst descriptionVariants = cva(\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:break-words',\n);\n\n/** The no-mobile refusal reads as body text, not as the muted subject. */\nconst refusalVariants = cva(\n 'type-body ds:m-0 ds:text-[color:var(--foreground)]',\n);\n\n/** The `SmsCodeEntry` props the dialog passes through as they are. */\ntype EntryProps = Pick<\n SmsCodeEntryProps,\n | 'destination'\n | 'length'\n | 'value'\n | 'defaultValue'\n | 'onValueChange'\n | 'error'\n | 'errorText'\n | 'remainingSeconds'\n | 'onResend'\n | 'resent'\n | 'validityMinutes'\n | 'note'\n | 'autofillHint'\n | 'contactPracticeHint'\n>;\n\n/** Attributes for the dialog surface. The dialog owns its role and content. */\ntype SurfaceProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n | 'autoFocus'\n | 'children'\n | 'className'\n | 'dangerouslySetInnerHTML'\n | 'defaultValue'\n | 'id'\n | 'onChange'\n | 'onSubmit'\n | 'role'\n | 'title'\n>;\n\nexport interface StepUpDialogProps extends EntryProps, SurfaceProps {\n /** Controlled open state. Pair with `onOpenChange`. */\n open?: boolean;\n /**\n * Initial open state, when uncontrolled. Uncontrolled, the dialog closes\n * only when the person leaves: to close it after a passed check, control\n * `open` or unmount it.\n */\n defaultOpen?: boolean;\n /**\n * Called when the dialog asks to open or close: Cancel, Close, Escape or\n * a click on the scrim. The host's own `open={false}`, after a passed\n * check, does not call it.\n */\n onOpenChange?: (open: boolean) => void;\n /** The dialog title. Default \"Confirm it's you\". */\n title?: string;\n /**\n * What the check is for, under the title, for example \"Cancel your\n * appointment on 12 March\". Rendered as given, also under `privacy`:\n * keep personal data out of it there.\n */\n subject?: ReactNode;\n /**\n * No verified mobile on file (D99, D140): the code entry gives way to a\n * line saying so and \"Contact the practice\", and Cancel becomes Close.\n * There is no other way through: no email code and no tick box.\n */\n noMobile?: boolean;\n /**\n * Replaces the default no-mobile sentence (\"There is no verified mobile\n * number on your record…\") when `noMobile` is set, for a host whose\n * refusal differs, for example one with no contact at all to send a code\n * to. Rendered as given. Has no effect without `noMobile`.\n */\n noMobileText?: ReactNode;\n /**\n * Called whenever the person leaves without a passed check: Cancel,\n * Close, Escape or the scrim, after `onOpenChange(false)`. The host keeps\n * the change unsaved.\n */\n onCancel?: () => void;\n /**\n * Called with the code when Confirm is pressed with every box filled.\n * The host checks it: on a pass it closes the dialog through `open`, on\n * a fail it reports `error`. The dialog never closes itself on submit.\n */\n onSubmit?: (code: string) => void;\n /** Submit button text. Default \"Confirm\". */\n submitLabel?: string;\n /**\n * The host is checking the code: Confirm shows a spinner, and the boxes\n * and \"Send a new code\" are disabled. Cancel stays available.\n */\n submitting?: boolean;\n /**\n * Disables the boxes, Confirm and \"Send a new code\". Cancel stays\n * available, so the person can always leave.\n */\n disabled?: boolean;\n /**\n * Default true: on open, focus moves to the first box (to Close in the\n * no-mobile view). False keeps focus on the dialog itself, so a screen\n * reader starts at the title.\n */\n autoFocus?: boolean;\n /**\n * Passed to the entry, which posts the code under this name through\n * `OTPInput`'s hidden field. The dialog renders in a portal, outside the\n * host's form, so a form does not receive it: take the code from\n * `onSubmit`.\n */\n name?: string;\n /**\n * Privacy mode: the entry says \"your mobile\" instead of the masked\n * number, and the dialog carries `data-privacy=\"masked\"`. The subject is\n * shown as given.\n */\n privacy?: boolean;\n /**\n * Instance id, written as `data-component-id` in two places: on the\n * dialog surface, which keeps the Dialog's own `data-component=\"dialog\"`,\n * and on the step-up body wrapper (`data-component=\"step-up-dialog\"`).\n * The composed Dialog registers its agent handle (open, close, dismiss)\n * under it.\n */\n id?: string;\n /** Extra classes for the dialog surface. */\n className?: string;\n}\n\n/**\n * The SMS check before a sensitive step: cancelling, opening documents,\n * editing details and every change of login email, mobile or PIN (D95,\n * D122). A Radix dialog around `SmsCodeEntry`: focus moves to the first box\n * on open and Escape cancels. Presentational: the host sends and checks the\n * code, reports `error` and closes the dialog once the check passes. Nothing\n * here fetches, counts tries, compares codes or remembers a passed check.\n * The ref points at the dialog surface.\n */\nexport const StepUpDialog = forwardRef<HTMLDivElement, StepUpDialogProps>(\n (\n {\n open,\n defaultOpen,\n onOpenChange,\n title,\n subject,\n noMobile = false,\n noMobileText,\n onCancel,\n onSubmit,\n submitLabel,\n submitting,\n disabled,\n autoFocus = true,\n name,\n privacy = false,\n id,\n className,\n destination,\n length,\n value,\n defaultValue,\n onValueChange,\n error,\n errorText,\n remainingSeconds,\n onResend,\n resent,\n validityMinutes,\n note,\n autofillHint,\n contactPracticeHint,\n ...surface\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n // Where focus was when the dialog opened. There is no Dialog.Trigger\n // for Radix to hand focus back to, so the dialog does it on close.\n const openerRef = useRef<HTMLElement | null>(null);\n\n const titleText = title?.trim() ? title : t('stepUpDialog.title');\n const hasSubject =\n subject != null &&\n typeof subject !== 'boolean' &&\n !(typeof subject === 'string' && subject.trim() === '');\n // With no mobile, focus lands on Close: the refusal must be read then.\n const described = hasSubject || noMobile;\n\n const handleOpenChange = (next: boolean) => {\n onOpenChange?.(next);\n if (!next) onCancel?.();\n };\n\n // Radix calls this only while focus is still outside the dialog.\n const handleOpenAutoFocus = (event: Event) => {\n const active = document.activeElement;\n openerRef.current =\n active instanceof HTMLElement && active !== document.body\n ? active\n : null;\n // Left alone, Radix focuses the first control: the first box.\n if (autoFocus) return;\n event.preventDefault();\n if (event.target instanceof HTMLElement) {\n event.target.focus({ preventScroll: true });\n }\n };\n\n const handleCloseAutoFocus = (event: Event) => {\n // A surface still on the page is a StrictMode remount, not a close.\n if (event.target instanceof HTMLElement && event.target.isConnected) {\n return;\n }\n const opener = openerRef.current;\n openerRef.current = null;\n // Hand focus back only if nothing else, such as the host, took it.\n const active = document.activeElement;\n if (active !== null && active !== document.body) return;\n if (opener === null || !opener.isConnected) return;\n event.preventDefault();\n opener.focus({ preventScroll: true });\n };\n\n return (\n <Dialog.Root\n id={id}\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={handleOpenChange}\n >\n <Dialog.Content\n // Nothing to describe: no pointer to a description that is not there.\n {...(described ? {} : { 'aria-describedby': undefined })}\n {...surface}\n ref={ref}\n size=\"sm\"\n // Cancel, or Close with no mobile, is the visible way out.\n hideCloseButton\n className={className}\n data-privacy={privacy ? 'masked' : undefined}\n onOpenAutoFocus={handleOpenAutoFocus}\n onCloseAutoFocus={handleCloseAutoFocus}\n >\n {/* The step-up hook sits on this body wrapper; the surface keeps\n the Dialog's own `data-component=\"dialog\"`, which owns the\n open state. Both carry the id (CalculatorDialog precedent). */}\n <div data-component=\"step-up-dialog\" data-component-id={id}>\n <Dialog.Header>\n <Dialog.Title>{titleText}</Dialog.Title>\n {described ? (\n <Dialog.Description asChild>\n <div className={descriptionVariants()}>\n {hasSubject ? <div>{subject}</div> : null}\n {noMobile ? (\n <p className={refusalVariants()}>\n {noMobileText ?? t('stepUpDialog.noMobile')}\n </p>\n ) : null}\n </div>\n </Dialog.Description>\n ) : null}\n </Dialog.Header>\n {noMobile ? null : (\n <Dialog.Body>\n <SmsCodeEntry\n destination={destination}\n length={length}\n value={value}\n defaultValue={defaultValue}\n onValueChange={onValueChange}\n onSubmit={onSubmit}\n submitLabel={\n submitLabel?.trim() ? submitLabel : t('common.confirm')\n }\n submitting={submitting}\n error={error}\n errorText={errorText}\n remainingSeconds={remainingSeconds}\n onResend={onResend}\n resent={resent}\n validityMinutes={validityMinutes}\n note={note}\n autofillHint={autofillHint}\n contactPracticeHint={contactPracticeHint}\n disabled={disabled}\n name={name}\n privacy={privacy}\n />\n </Dialog.Body>\n )}\n <Dialog.Footer>\n <Dialog.Close asChild>\n <Button\n intent={noMobile ? 'primary' : 'outline'}\n className=\"ds:min-h-[var(--min-target-size)]\"\n data-action={noMobile ? 'close' : 'cancel'}\n >\n {noMobile ? t('common.close') : t('common.cancel')}\n </Button>\n </Dialog.Close>\n </Dialog.Footer>\n </div>\n </Dialog.Content>\n </Dialog.Root>\n );\n },\n);\n\nStepUpDialog.displayName = 'StepUpDialog';\n"],"names":["descriptionVariants","cva","refusalVariants","StepUpDialog","forwardRef","open","defaultOpen","onOpenChange","title","subject","noMobile","noMobileText","onCancel","onSubmit","submitLabel","submitting","disabled","autoFocus","name","privacy","id","className","destination","length","value","defaultValue","onValueChange","error","errorText","remainingSeconds","onResend","resent","validityMinutes","note","autofillHint","contactPracticeHint","surface","ref","t","useTranslation","openerRef","useRef","titleText","hasSubject","described","handleOpenChange","next","handleOpenAutoFocus","event","active","handleCloseAutoFocus","opener","jsx","Dialog","jsxs","SmsCodeEntry","Button"],"mappings":";;;;;;;AAQA,MAAMA,IAAsBC;AAAA,EAC1B;AACF,GAGMC,KAAkBD;AAAA,EACtB;AACF,GAwIaE,KAAeC;AAAA,EAC1B,CACE;AAAA,IACE,MAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,MAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,IAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,eAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,IAAI,GAG3BC,IAAYC,EAA2B,IAAI,GAE3CC,IAAYlC,KAAA,QAAAA,EAAO,SAASA,IAAQ8B,EAAE,oBAAoB,GAC1DK,IACJlC,KAAW,QACX,OAAOA,KAAY,aACnB,EAAE,OAAOA,KAAY,YAAYA,EAAQ,KAAA,MAAW,KAEhDmC,IAAYD,KAAcjC,GAE1BmC,IAAmB,CAACC,MAAkB;AAC1C,MAAAv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,CACF;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAGN;AACF;AAEAP,GAAa,cAAc;"}
|
|
@@ -7,9 +7,9 @@ import { B as Te } from "./button-DohK_Ak_.js";
|
|
|
7
7
|
import { I as We } from "./icon-button-S8_weU3g.js";
|
|
8
8
|
import { C as Qe } from "./combobox-BBCVQS-S.js";
|
|
9
9
|
import { D as de } from "./dialog-CVTxyR0v.js";
|
|
10
|
-
import { D as
|
|
10
|
+
import { D as Ft } from "./date-picker-BmVBVpVu.js";
|
|
11
11
|
import { F as H } from "./form-field-CyHfOVKF.js";
|
|
12
|
-
import { I as
|
|
12
|
+
import { I as Pt } from "./icon-button-group-SmkdVCNx.js";
|
|
13
13
|
import { P as Ot } from "./panel-header-CbtlTe85.js";
|
|
14
14
|
import { P as jt } from "./panel-subview-DCyvn-49.js";
|
|
15
15
|
import { R as je } from "./radio-BZQs6_36.js";
|
|
@@ -26,7 +26,7 @@ import { u as Lt } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
|
26
26
|
import { c as Ut } from "./compose-refs-C0k0tdqF.js";
|
|
27
27
|
import { E as Wt, a as Kt } from "./compact-editor-fields-cP6yh7xv.js";
|
|
28
28
|
import { n as Ht } from "./normalize-diacritics-BNGbFNlJ.js";
|
|
29
|
-
import {
|
|
29
|
+
import { a as Gt } from "./privacy-mask-C19dJFMk.js";
|
|
30
30
|
import { g as $e, h as Qt } from "./handled-rejection-6gqCf5vt.js";
|
|
31
31
|
import { L as Yt } from "./lock-ClAFG1gy.js";
|
|
32
32
|
import { X as Xt } from "./x-B5YnXwCz.js";
|
|
@@ -143,7 +143,7 @@ function ln({
|
|
|
143
143
|
clearTimeout(u), m.abort();
|
|
144
144
|
};
|
|
145
145
|
}, [U, G, J]);
|
|
146
|
-
const pe = (j == null ? void 0 : j.query) === U && j.source === G,
|
|
146
|
+
const pe = (j == null ? void 0 : j.query) === U && j.source === G, F = U ? pe ? j.status : "loading" : "idle", N = pe && F === "ready" ? j.patients : [], ae = F === "loading" ? A("inputs.search.loading") : F === "error" ? A("emptyState.error.description") : F === "idle" ? D : N.length === 0 ? A("inputs.combobox.empty") : "", we = !!T && !o && !R, me = N.map((m) => ({
|
|
147
147
|
value: m.id,
|
|
148
148
|
label: m.name
|
|
149
149
|
}));
|
|
@@ -155,7 +155,7 @@ function ln({
|
|
|
155
155
|
{
|
|
156
156
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
157
157
|
"data-component": "patient-picker",
|
|
158
|
-
"data-status":
|
|
158
|
+
"data-status": F,
|
|
159
159
|
children: [
|
|
160
160
|
/* @__PURE__ */ n(
|
|
161
161
|
Qe,
|
|
@@ -172,7 +172,7 @@ function ln({
|
|
|
172
172
|
L.current = m, w(m);
|
|
173
173
|
},
|
|
174
174
|
onOpenChange: (m) => {
|
|
175
|
-
!m &&
|
|
175
|
+
!m && F !== "error" && w("");
|
|
176
176
|
},
|
|
177
177
|
filter: (m) => !U || N.some((f) => Ht(f.id) === m) ? 1 : 0,
|
|
178
178
|
size: O,
|
|
@@ -184,7 +184,7 @@ function ln({
|
|
|
184
184
|
),
|
|
185
185
|
/* @__PURE__ */ n("p", { role: "status", className: "type-body-sm ds:text-muted-foreground", children: ae }),
|
|
186
186
|
we && T ? /* @__PURE__ */ n(vt, { action: T, typedRef: L }) : null,
|
|
187
|
-
|
|
187
|
+
F === "error" ? /* @__PURE__ */ n(
|
|
188
188
|
Te,
|
|
189
189
|
{
|
|
190
190
|
size: "sm",
|
|
@@ -390,7 +390,7 @@ function hn({
|
|
|
390
390
|
readOnly: L,
|
|
391
391
|
withheld: U,
|
|
392
392
|
maskPatient: pe,
|
|
393
|
-
fallbackError:
|
|
393
|
+
fallbackError: F
|
|
394
394
|
}) {
|
|
395
395
|
var Ce;
|
|
396
396
|
const N = o === "edit", [ae, we] = V(0), [me, m] = V(D);
|
|
@@ -399,14 +399,14 @@ function hn({
|
|
|
399
399
|
() => ut(v)
|
|
400
400
|
), [Y, Ee] = V(lt), [I, r] = V(), E = (e) => Ee((i) => ({ ...i, ...e })), fe = (e) => ie((i) => ({ ...i, ...e })), [he, te] = V(f);
|
|
401
401
|
he !== f && (te(f), ie(ut(v)), Ee(lt), r(void 0));
|
|
402
|
-
const
|
|
402
|
+
const P = S({
|
|
403
403
|
subject: f,
|
|
404
404
|
saving: !1,
|
|
405
405
|
deleting: !1,
|
|
406
406
|
donePending: !1,
|
|
407
407
|
accepted: !1
|
|
408
408
|
});
|
|
409
|
-
|
|
409
|
+
P.current.subject !== f && (P.current = {
|
|
410
410
|
subject: f,
|
|
411
411
|
saving: !1,
|
|
412
412
|
deleting: !1,
|
|
@@ -417,7 +417,7 @@ function hn({
|
|
|
417
417
|
qe(() => (ge.current = !0, () => {
|
|
418
418
|
ge.current = !1;
|
|
419
419
|
}), []);
|
|
420
|
-
const B = (e) => ge.current &&
|
|
420
|
+
const B = (e) => ge.current && P.current === e, ce = S(J);
|
|
421
421
|
ce.current = J;
|
|
422
422
|
const c = !!J, [x, l] = V(0), [d, h] = V(null), ke = S(d);
|
|
423
423
|
ke.current = d;
|
|
@@ -425,7 +425,7 @@ function hn({
|
|
|
425
425
|
qe(() => {
|
|
426
426
|
const e = ce.current;
|
|
427
427
|
if (!ve || !s || !e) return;
|
|
428
|
-
const i =
|
|
428
|
+
const i = P.current, g = ke.current;
|
|
429
429
|
if ((g == null ? void 0 : g.subject) === i.subject && g.status === "ready")
|
|
430
430
|
return;
|
|
431
431
|
const p = new AbortController();
|
|
@@ -443,7 +443,7 @@ function hn({
|
|
|
443
443
|
p.signal.aborted || !B(i) || h({
|
|
444
444
|
subject: i.subject,
|
|
445
445
|
status: "error",
|
|
446
|
-
message: $e(y,
|
|
446
|
+
message: $e(y, F)
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
449
|
), () => p.abort();
|
|
@@ -480,7 +480,7 @@ function hn({
|
|
|
480
480
|
done: Y.confirmedDone
|
|
481
481
|
} : void 0;
|
|
482
482
|
}, C = (e) => Qt(new Error(`TaskEditor: ${e}`)), Be = () => {
|
|
483
|
-
const e =
|
|
483
|
+
const e = P.current;
|
|
484
484
|
if ($ !== "ready") return C(`cannot save while ${$}.`);
|
|
485
485
|
if (!ye) return C("the host gave no save seam.");
|
|
486
486
|
if (e.accepted) return C("this task was already saved.");
|
|
@@ -504,7 +504,7 @@ function hn({
|
|
|
504
504
|
e.accepted = !0, B(e) && (E({ accepted: !0 }), y && (M == null || M(y)));
|
|
505
505
|
}
|
|
506
506
|
} catch (y) {
|
|
507
|
-
throw B(e) && E({ saveError: $e(y,
|
|
507
|
+
throw B(e) && E({ saveError: $e(y, F) }), y;
|
|
508
508
|
} finally {
|
|
509
509
|
e.saving = !1, B(e) && E({ saving: !1 });
|
|
510
510
|
}
|
|
@@ -512,7 +512,7 @@ function hn({
|
|
|
512
512
|
return p.catch(() => {
|
|
513
513
|
}), p;
|
|
514
514
|
}, xe = (e) => {
|
|
515
|
-
const i =
|
|
515
|
+
const i = P.current;
|
|
516
516
|
if ($ !== "ready")
|
|
517
517
|
return C(`cannot change Done while ${$}.`);
|
|
518
518
|
if (!N || !s || !j || L)
|
|
@@ -531,7 +531,7 @@ function hn({
|
|
|
531
531
|
} catch (W) {
|
|
532
532
|
throw B(i) && E({
|
|
533
533
|
done: g,
|
|
534
|
-
doneError: $e(W,
|
|
534
|
+
doneError: $e(W, F)
|
|
535
535
|
}), W;
|
|
536
536
|
} finally {
|
|
537
537
|
i.donePending = !1, B(i) && E({ donePending: !1 });
|
|
@@ -540,7 +540,7 @@ function hn({
|
|
|
540
540
|
return y.catch(() => {
|
|
541
541
|
}), y;
|
|
542
542
|
}, Ae = () => {
|
|
543
|
-
const e =
|
|
543
|
+
const e = P.current;
|
|
544
544
|
if ($ !== "ready") return C(`cannot delete while ${$}.`);
|
|
545
545
|
if (!N || !s || !ee || L)
|
|
546
546
|
return C("the host gave no delete seam.");
|
|
@@ -552,7 +552,7 @@ function hn({
|
|
|
552
552
|
try {
|
|
553
553
|
await ee(i), e.accepted = !0, B(e) && (E({ accepted: !0, confirmDeleteOpen: !1 }), re == null || re(i));
|
|
554
554
|
} catch (p) {
|
|
555
|
-
throw B(e) && E({ deleteError: $e(p,
|
|
555
|
+
throw B(e) && E({ deleteError: $e(p, F) }), p;
|
|
556
556
|
} finally {
|
|
557
557
|
e.deleting = !1, B(e) && E({ deleting: !1 });
|
|
558
558
|
}
|
|
@@ -599,7 +599,7 @@ function hn({
|
|
|
599
599
|
p.date = W, p.time = Ye(W);
|
|
600
600
|
}
|
|
601
601
|
e.note !== void 0 && (p.note = e.note), e.typeId !== void 0 && (p.typeId = e.typeId), e.assigneeId !== void 0 && (p.assigneeId = e.assigneeId ?? _), e.about !== void 0 && (p.about = e.about), e.patientId !== void 0 && (p.patientId = e.patientId, p.about = "patient"), e.companyId !== void 0 && (p.companyId = e.companyId, p.about = "company"), e.operatorId !== void 0 && (p.operatorId = e.operatorId, p.about = "operator"), fe(p);
|
|
602
|
-
},
|
|
602
|
+
}, Fe = () => {
|
|
603
603
|
const e = Se();
|
|
604
604
|
return {
|
|
605
605
|
mode: o,
|
|
@@ -633,14 +633,14 @@ function hn({
|
|
|
633
633
|
ui: Y,
|
|
634
634
|
patchUi: E,
|
|
635
635
|
/** True once a save or delete landed in this session. */
|
|
636
|
-
isAccepted: () =>
|
|
636
|
+
isAccepted: () => P.current.accepted,
|
|
637
637
|
/** A save or delete is in flight: closing now would lose its outcome. */
|
|
638
|
-
isBusy: () =>
|
|
638
|
+
isBusy: () => P.current.saving || P.current.deleting,
|
|
639
639
|
submit: Be,
|
|
640
640
|
setDone: xe,
|
|
641
641
|
remove: Ae,
|
|
642
642
|
applyPatch: be,
|
|
643
|
-
draftState:
|
|
643
|
+
draftState: Fe
|
|
644
644
|
};
|
|
645
645
|
}
|
|
646
646
|
const pt = ht("ds:flex ds:min-h-0 ds:flex-col", {
|
|
@@ -702,7 +702,7 @@ const pt = ht("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
702
702
|
loadTask: L,
|
|
703
703
|
onCreateTask: U,
|
|
704
704
|
onUpdateTask: pe,
|
|
705
|
-
onDeleteTask:
|
|
705
|
+
onDeleteTask: F,
|
|
706
706
|
onSetTaskDone: N,
|
|
707
707
|
onCancel: ae,
|
|
708
708
|
onSaved: we,
|
|
@@ -714,11 +714,11 @@ const pt = ht("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
714
714
|
className: Y,
|
|
715
715
|
...Ee
|
|
716
716
|
}, I) => {
|
|
717
|
-
const { t: r } = gt("ui"), E = At(), fe = o ?? E, he = s === "edit", te = O === "subview",
|
|
717
|
+
const { t: r } = gt("ui"), E = At(), fe = o ?? E, he = s === "edit", te = O === "subview", P = !te || R, ge = f && he && u === "notice", B = f && !ge, [ce] = V(() => /* @__PURE__ */ new Map()), c = hn({
|
|
718
718
|
mode: s,
|
|
719
719
|
taskId: v,
|
|
720
720
|
initialDate: D,
|
|
721
|
-
active:
|
|
721
|
+
active: P,
|
|
722
722
|
taskTypes: T,
|
|
723
723
|
assignees: A,
|
|
724
724
|
companies: z,
|
|
@@ -729,7 +729,7 @@ const pt = ht("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
729
729
|
loadTask: L,
|
|
730
730
|
onCreateTask: U,
|
|
731
731
|
onUpdateTask: pe,
|
|
732
|
-
onDeleteTask:
|
|
732
|
+
onDeleteTask: F,
|
|
733
733
|
onSetTaskDone: N,
|
|
734
734
|
onSaved: we,
|
|
735
735
|
onDeleted: me,
|
|
@@ -768,7 +768,7 @@ const pt = ht("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
768
768
|
}),
|
|
769
769
|
[]
|
|
770
770
|
);
|
|
771
|
-
zt(un,
|
|
771
|
+
zt(un, P ? Ve : null, fe);
|
|
772
772
|
const ue = S(null), ye = Oe(
|
|
773
773
|
() => Ut(I, ue),
|
|
774
774
|
[I]
|
|
@@ -781,11 +781,11 @@ const pt = ht("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
781
781
|
var st;
|
|
782
782
|
const t = ue.current, b = t == null ? void 0 : t.parentElement;
|
|
783
783
|
if (!te || !R || !t || !b) return;
|
|
784
|
-
const K = C.current, oe = K && b.contains(K) && !t.contains(K) ? K : null, Tt = Ae.current, De = (oe == null ? void 0 : oe.closest("[data-task-id]")) ?? Ge(b, t).find((
|
|
784
|
+
const K = C.current, oe = K && b.contains(K) && !t.contains(K) ? K : null, Tt = Ae.current, De = (oe == null ? void 0 : oe.closest("[data-task-id]")) ?? Ge(b, t).find((Pe) => Pe.dataset.taskId === Tt), rt = De == null ? void 0 : De.dataset.taskId, at = (st = oe == null ? void 0 : oe.closest("[data-action]")) == null ? void 0 : st.dataset.action, it = De ? Ge(b, t).indexOf(De) : -1;
|
|
785
785
|
return () => {
|
|
786
786
|
if (xe.current && t.isConnected) return;
|
|
787
|
-
const
|
|
788
|
-
if (!b.isConnected ||
|
|
787
|
+
const Pe = document.activeElement;
|
|
788
|
+
if (!b.isConnected || Pe && Pe !== document.body) return;
|
|
789
789
|
const Ue = Ge(b, t), Bt = [
|
|
790
790
|
...ft(
|
|
791
791
|
Ue.find((Ie) => rt !== void 0 && Ie.dataset.taskId === rt),
|
|
@@ -801,7 +801,7 @@ const pt = ht("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
801
801
|
return;
|
|
802
802
|
};
|
|
803
803
|
}, [R, te]);
|
|
804
|
-
const se = S(null), be = S(!1),
|
|
804
|
+
const se = S(null), be = S(!1), Fe = (t) => () => {
|
|
805
805
|
be.current = !0, t();
|
|
806
806
|
};
|
|
807
807
|
Lt(() => {
|
|
@@ -889,7 +889,7 @@ const pt = ht("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
889
889
|
}
|
|
890
890
|
) : null,
|
|
891
891
|
/* @__PURE__ */ k(
|
|
892
|
-
|
|
892
|
+
Pt,
|
|
893
893
|
{
|
|
894
894
|
role: "toolbar",
|
|
895
895
|
"aria-label": r(a("actionsLabel")),
|
|
@@ -968,7 +968,7 @@ const pt = ht("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
968
968
|
ref: se,
|
|
969
969
|
intent: "outline",
|
|
970
970
|
"data-action": "retry-load",
|
|
971
|
-
onClick:
|
|
971
|
+
onClick: Fe(c.retry),
|
|
972
972
|
children: r("emptyState.error.cta")
|
|
973
973
|
}
|
|
974
974
|
)
|
|
@@ -986,7 +986,7 @@ const pt = ht("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
986
986
|
) }) : l.patientId ? /* @__PURE__ */ n(H, { label: r(a("aboutPatient")), children: /* @__PURE__ */ n(Me, { value: y(l.patientId), disabled: !0, readOnly: !0 }) }) : null, et = /* @__PURE__ */ k("fieldset", { disabled: m, className: mt(), children: [
|
|
987
987
|
m ? Xe : null,
|
|
988
988
|
/* @__PURE__ */ n(H, { label: r(a("date")), children: /* @__PURE__ */ n(
|
|
989
|
-
|
|
989
|
+
Ft,
|
|
990
990
|
{
|
|
991
991
|
value: l.date,
|
|
992
992
|
onChange: (t) => c.patchFields({ date: t })
|
|
@@ -1144,12 +1144,12 @@ const pt = ht("ds:flex ds:min-h-0 ds:flex-col", {
|
|
|
1144
1144
|
] }), tt = x === "loading" ? St : x === "error" ? Ct : x === "locked" ? Dt : x === "withheld" ? /* @__PURE__ */ n(
|
|
1145
1145
|
Gt,
|
|
1146
1146
|
{
|
|
1147
|
-
onTurnOff: ie ?
|
|
1147
|
+
onTurnOff: ie ? Fe(ie) : void 0
|
|
1148
1148
|
}
|
|
1149
1149
|
) : te ? et : /* @__PURE__ */ n($t, { orientation: "vertical", className: "ds:min-h-0 ds:flex-1", children: et }), Le = x === "ready" ? Ze(!0) : x === "locked" || x === "withheld" ? Ze(!1) : null, Rt = x === "ready" && c.showDelete, nt = he ? /* @__PURE__ */ n(
|
|
1150
1150
|
de,
|
|
1151
1151
|
{
|
|
1152
|
-
open: d.confirmDeleteOpen &&
|
|
1152
|
+
open: d.confirmDeleteOpen && P,
|
|
1153
1153
|
onOpenChange: (t) => {
|
|
1154
1154
|
d.deleting || c.patchUi(
|
|
1155
1155
|
t ? { confirmDeleteOpen: !0 } : { confirmDeleteOpen: !1, deleteError: void 0 }
|
|
@@ -1253,4 +1253,4 @@ export {
|
|
|
1253
1253
|
yn as T,
|
|
1254
1254
|
un as t
|
|
1255
1255
|
};
|
|
1256
|
-
//# sourceMappingURL=task-editor-
|
|
1256
|
+
//# sourceMappingURL=task-editor-g1AGfxhr.js.map
|