@alfadocs/ui-kit-debug 1.128.0 → 1.130.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{appointment-card-0PebvrOS.js → appointment-card-vbUsDh70.js} +49 -72
- package/dist/_chunks/appointment-card-vbUsDh70.js.map +1 -0
- package/dist/_chunks/{appointment-timeline-Czd4PBkF.js → appointment-timeline-B5pfBl-b.js} +2 -2
- package/dist/_chunks/{appointment-timeline-Czd4PBkF.js.map → appointment-timeline-B5pfBl-b.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-B04zKY7g.js → appointment-tray-BhiXetjs.js} +2 -2
- package/dist/_chunks/{appointment-tray-B04zKY7g.js.map → appointment-tray-BhiXetjs.js.map} +1 -1
- package/dist/_chunks/{calendar-_sgjuH3L.js → calendar-DzR-vdJ5.js} +614 -563
- package/dist/_chunks/calendar-DzR-vdJ5.js.map +1 -0
- package/dist/_chunks/calendar-appointment-editor-dialog-CXch4Pmu.js +13663 -0
- package/dist/_chunks/calendar-appointment-editor-dialog-CXch4Pmu.js.map +1 -0
- package/dist/_chunks/{calendar-event-card-DXAYWH6k.js → calendar-event-card-BNEzkjm-.js} +142 -132
- package/dist/_chunks/calendar-event-card-BNEzkjm-.js.map +1 -0
- package/dist/_chunks/{care-plan-card-bGTIliXc.js → care-plan-card-CwgkImOD.js} +2 -2
- package/dist/_chunks/{care-plan-card-bGTIliXc.js.map → care-plan-card-CwgkImOD.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-k8FslxsU.js → care-plan-header-Dx5OMkc9.js} +2 -2
- package/dist/_chunks/{care-plan-header-k8FslxsU.js.map → care-plan-header-Dx5OMkc9.js.map} +1 -1
- package/dist/_chunks/{clinical-note-card-DHn5W_bv.js → clinical-note-card-pPaeWWnu.js} +2 -2
- package/dist/_chunks/{clinical-note-card-DHn5W_bv.js.map → clinical-note-card-pPaeWWnu.js.map} +1 -1
- package/dist/_chunks/{contact-card-CGpbYuxl.js → contact-card-BSY2YpLZ.js} +2 -2
- package/dist/_chunks/{contact-card-CGpbYuxl.js.map → contact-card-BSY2YpLZ.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-CCgf0Ntt.js → contact-profile-card-CsZNMlws.js} +2 -2
- package/dist/_chunks/{contact-profile-card-CCgf0Ntt.js.map → contact-profile-card-CsZNMlws.js.map} +1 -1
- package/dist/_chunks/contact-round-DiSvB3LP.js +18 -0
- package/dist/_chunks/contact-round-DiSvB3LP.js.map +1 -0
- package/dist/_chunks/{default-tabs-DOuHEKI5.js → default-tabs-BnB6FUEW.js} +2 -2
- package/dist/_chunks/{default-tabs-DOuHEKI5.js.map → default-tabs-BnB6FUEW.js.map} +1 -1
- package/dist/_chunks/{entity-summary-BanguTa6.js → entity-summary-KHM0PnSI.js} +56 -68
- package/dist/_chunks/entity-summary-KHM0PnSI.js.map +1 -0
- package/dist/_chunks/file-pen-line-k4uMBM3h.js +29 -0
- package/dist/_chunks/file-pen-line-k4uMBM3h.js.map +1 -0
- package/dist/_chunks/{header-settings-DsvheAOt.js → header-settings-ZGvYAuKF.js} +101 -97
- package/dist/_chunks/header-settings-ZGvYAuKF.js.map +1 -0
- package/dist/_chunks/{info-tip-C-MPkShR.js → info-tip-B3cn3fY2.js} +2 -2
- package/dist/_chunks/{info-tip-C-MPkShR.js.map → info-tip-B3cn3fY2.js.map} +1 -1
- package/dist/_chunks/{link-DtCfnLnF.js → link-CeV7FoI6.js} +2 -2
- package/dist/_chunks/{link-DtCfnLnF.js.map → link-CeV7FoI6.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-BOBWmzoT.js → marketplace-app-shell-D_HA8CKx.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-BOBWmzoT.js.map → marketplace-app-shell-D_HA8CKx.js.map} +1 -1
- package/dist/_chunks/{nav-grid-D2xVcHTO.js → nav-grid-dEgDAri3.js} +2 -2
- package/dist/_chunks/{nav-grid-D2xVcHTO.js.map → nav-grid-dEgDAri3.js.map} +1 -1
- package/dist/_chunks/{note-attachment-cnj2JRrg.js → note-attachment-MNTIqdSz.js} +2 -2
- package/dist/_chunks/{note-attachment-cnj2JRrg.js.map → note-attachment-MNTIqdSz.js.map} +1 -1
- package/dist/_chunks/{note-timeline-BrjHBQfx.js → note-timeline-BQeW0VZY.js} +2 -2
- package/dist/_chunks/{note-timeline-BrjHBQfx.js.map → note-timeline-BQeW0VZY.js.map} +1 -1
- package/dist/_chunks/{notes-panel-n1JFNQ5u.js → notes-panel-DIY7eNsq.js} +2 -2
- package/dist/_chunks/{notes-panel-n1JFNQ5u.js.map → notes-panel-DIY7eNsq.js.map} +1 -1
- package/dist/_chunks/{patient-details-Cba9HQj_.js → patient-details-DBtEITfE.js} +2 -2
- package/dist/_chunks/{patient-details-Cba9HQj_.js.map → patient-details-DBtEITfE.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-CtDihADs.js → patient-field-row-a5d4QijH.js} +2 -2
- package/dist/_chunks/{patient-field-row-CtDihADs.js.map → patient-field-row-a5d4QijH.js.map} +1 -1
- package/dist/_chunks/{patient-search-D_S7joff.js → patient-search-OAwFgOW3.js} +2 -2
- package/dist/_chunks/{patient-search-D_S7joff.js.map → patient-search-OAwFgOW3.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-DnLdbtsw.js → patient-summary-card-BUcZ-gaL.js} +3 -3
- package/dist/_chunks/{patient-summary-card-DnLdbtsw.js.map → patient-summary-card-BUcZ-gaL.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-CEIalOtr.js → payment-request-card-Dv4WbRBe.js} +2 -2
- package/dist/_chunks/{payment-request-card-CEIalOtr.js.map → payment-request-card-Dv4WbRBe.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-CqRJlmb7.js → product-hub-panel-a8wdVOUt.js} +2 -2
- package/dist/_chunks/{product-hub-panel-CqRJlmb7.js.map → product-hub-panel-a8wdVOUt.js.map} +1 -1
- package/dist/_chunks/{public-footer-C8UIzqLJ.js → public-footer-D0cqScpz.js} +2 -2
- package/dist/_chunks/{public-footer-C8UIzqLJ.js.map → public-footer-D0cqScpz.js.map} +1 -1
- package/dist/_chunks/{signature-request-Dzs0jZsd.js → signature-request-DW2PSp66.js} +3 -3
- package/dist/_chunks/{signature-request-Dzs0jZsd.js.map → signature-request-DW2PSp66.js.map} +1 -1
- package/dist/_chunks/{signed-out-frame-fUf7tqs3.js → signed-out-frame-Oa2e1yps.js} +2 -2
- package/dist/_chunks/{signed-out-frame-fUf7tqs3.js.map → signed-out-frame-Oa2e1yps.js.map} +1 -1
- package/dist/_chunks/task-editor-CVRrDqpe.js +1256 -0
- package/dist/_chunks/task-editor-CVRrDqpe.js.map +1 -0
- package/dist/_chunks/{toast-BNoN8Qjh.js → toast-DQ1Zu1kk.js} +264 -251
- package/dist/_chunks/{toast-BNoN8Qjh.js.map → toast-DQ1Zu1kk.js.map} +1 -1
- package/dist/_chunks/{treatment-receipt-1VnuinhY.js → treatment-receipt-BZzwvsnY.js} +73 -56
- package/dist/_chunks/treatment-receipt-BZzwvsnY.js.map +1 -0
- package/dist/_chunks/use-appointment-details-read-BrykoTOR.js +2475 -0
- package/dist/_chunks/use-appointment-details-read-BrykoTOR.js.map +1 -0
- package/dist/_chunks/{whatsapp-button-DV9JFmtq.js → whatsapp-button-XbozeDl_.js} +32 -25
- package/dist/_chunks/whatsapp-button-XbozeDl_.js.map +1 -0
- package/dist/agent-catalog.json +49 -16
- package/dist/agent-i18n/en.json +5 -5
- package/dist/browser-support.js +1 -1
- package/dist/components/_shared/patient-picker.d.ts +10 -0
- package/dist/components/_shared/patient-picker.d.ts.map +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +30 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts.map +1 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.links.d.ts +15 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.links.d.ts.map +1 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.recurrence.d.ts +9 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.recurrence.d.ts.map +1 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +12 -3
- package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts.map +1 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +63 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts.map +1 -1
- package/dist/components/appointment-details-panel/index.d.ts +2 -1
- package/dist/components/appointment-details-panel/index.d.ts.map +1 -1
- package/dist/components/appointment-details-panel/index.js +5 -4
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/calendar/calendar.d.ts +22 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/calendar-event-card.d.ts +8 -0
- package/dist/components/calendar-event-card/calendar-event-card.d.ts.map +1 -1
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts.map +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/nav-grid/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/toast.d.ts.map +1 -1
- package/dist/components/treatment-receipt/index.d.ts +2 -2
- package/dist/components/treatment-receipt/index.d.ts.map +1 -1
- package/dist/components/treatment-receipt/index.js +2 -1
- package/dist/components/treatment-receipt/treatment-receipt.d.ts +11 -1
- package/dist/components/treatment-receipt/treatment-receipt.d.ts.map +1 -1
- package/dist/components/whatsapp-button/index.js +1 -1
- package/dist/components/whatsapp-button/whatsapp-button.d.ts.map +1 -1
- package/dist/core.css +1 -1
- package/dist/fullcalendar.css +5 -1
- package/dist/host-compat.css +4 -1
- package/dist/i18n/locales/ar.d.ts +119 -4
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +130 -15
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +119 -4
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +130 -15
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +119 -4
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +130 -15
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +119 -4
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +122 -10
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +119 -4
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +130 -15
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +119 -4
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +130 -15
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +119 -4
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +130 -15
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +119 -4
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +130 -15
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +119 -4
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +130 -15
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +119 -4
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +130 -15
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +119 -4
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +130 -15
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +119 -4
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +130 -15
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +119 -4
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +130 -15
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +119 -4
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +130 -15
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +119 -4
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +130 -15
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +119 -4
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +130 -15
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +119 -4
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +130 -15
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +119 -4
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +130 -15
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +1112 -1107
- package/dist/locales/ar.json +130 -15
- package/dist/locales/de.json +130 -15
- package/dist/locales/el.json +130 -15
- package/dist/locales/en.json +122 -7
- package/dist/locales/es.json +130 -15
- package/dist/locales/fr.json +130 -15
- package/dist/locales/hi.json +130 -15
- package/dist/locales/it.json +130 -15
- package/dist/locales/ja.json +130 -15
- package/dist/locales/nl.json +130 -15
- package/dist/locales/pl.json +130 -15
- package/dist/locales/pt.json +130 -15
- package/dist/locales/ro.json +130 -15
- package/dist/locales/ru.json +130 -15
- package/dist/locales/sq.json +130 -15
- package/dist/locales/sv.json +130 -15
- package/dist/locales/tr.json +130 -15
- package/dist/locales/zh.json +130 -15
- package/dist/patterns/calendar/calendar-appointment-details.d.ts +83 -2
- package/dist/patterns/calendar/calendar-appointment-details.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-appointment-editor-dialog.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-archive.d.ts +12 -0
- package/dist/patterns/calendar/calendar-archive.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-bookings-panel.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-care-rules.d.ts +19 -23
- package/dist/patterns/calendar/calendar-care-rules.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-delete-confirm.d.ts +18 -0
- package/dist/patterns/calendar/calendar-delete-confirm.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-document-scope-confirm.d.ts +12 -0
- package/dist/patterns/calendar/calendar-document-scope-confirm.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-editor-guard.d.ts +12 -0
- package/dist/patterns/calendar/calendar-editor-guard.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-editor-hydration.d.ts +13 -2
- package/dist/patterns/calendar/calendar-editor-hydration.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-load-error.d.ts +11 -0
- package/dist/patterns/calendar/calendar-load-error.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-patient-locked.d.ts +13 -0
- package/dist/patterns/calendar/calendar-patient-locked.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-patient-picker.d.ts +6 -1
- package/dist/patterns/calendar/calendar-patient-picker.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-prompts.d.ts +11 -0
- package/dist/patterns/calendar/calendar-prompts.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-settings-ical.d.ts +11 -0
- package/dist/patterns/calendar/calendar-settings-ical.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-settings-overlay.d.ts +73 -0
- package/dist/patterns/calendar/calendar-settings-overlay.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-settings-panel.d.ts +62 -0
- package/dist/patterns/calendar/calendar-settings-panel.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-settings-practice.d.ts +20 -0
- package/dist/patterns/calendar/calendar-settings-practice.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-status-colours.d.ts +18 -0
- package/dist/patterns/calendar/calendar-status-colours.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-upcoming-panel.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-waiting-list-panel.d.ts +17 -2
- package/dist/patterns/calendar/calendar-waiting-list-panel.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-workspace.d.ts +285 -6
- package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-workspace.model.d.ts +103 -17
- package/dist/patterns/calendar/calendar-workspace.model.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.data.d.ts +9 -3
- package/dist/patterns/calendar/calendar.data.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.journey.d.ts +69 -5
- package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.model.d.ts +129 -22
- package/dist/patterns/calendar/calendar.model.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.preferences.d.ts +4 -0
- package/dist/patterns/calendar/calendar.preferences.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.sheets.d.ts +129 -18
- package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.surface.d.ts +64 -6
- package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.types.d.ts +231 -6
- package/dist/patterns/calendar/calendar.types.d.ts.map +1 -1
- package/dist/patterns/calendar/index.d.ts +9 -6
- package/dist/patterns/calendar/index.d.ts.map +1 -1
- package/dist/patterns/calendar/index.js +18 -15
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/tokens.css +5 -1
- package/package.json +1 -1
- package/dist/_chunks/appointment-card-0PebvrOS.js.map +0 -1
- package/dist/_chunks/calendar-_sgjuH3L.js.map +0 -1
- package/dist/_chunks/calendar-appointment-editor-dialog-CGDDGMdo.js +0 -10974
- package/dist/_chunks/calendar-appointment-editor-dialog-CGDDGMdo.js.map +0 -1
- package/dist/_chunks/calendar-event-card-DXAYWH6k.js.map +0 -1
- package/dist/_chunks/entity-summary-BanguTa6.js.map +0 -1
- package/dist/_chunks/header-settings-DsvheAOt.js.map +0 -1
- package/dist/_chunks/task-editor-C05yx7JJ.js +0 -1218
- package/dist/_chunks/task-editor-C05yx7JJ.js.map +0 -1
- package/dist/_chunks/treatment-receipt-1VnuinhY.js.map +0 -1
- package/dist/_chunks/use-appointment-details-read-Bm408XzX.js +0 -2198
- package/dist/_chunks/use-appointment-details-read-Bm408XzX.js.map +0 -1
- package/dist/_chunks/whatsapp-button-DV9JFmtq.js.map +0 -1
|
@@ -0,0 +1,1256 @@
|
|
|
1
|
+
import { jsx as n, jsxs as k, Fragment as Ne } from "react/jsx-runtime";
|
|
2
|
+
import { useState as V, useRef as S, useEffect as qe, forwardRef as xt, useId as At, useMemo as Oe } from "react";
|
|
3
|
+
import { c as ht } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as gt } from "react-i18next";
|
|
5
|
+
import { A as q } from "./alert-C4WKViaS.js";
|
|
6
|
+
import { B as Te } from "./button-DohK_Ak_.js";
|
|
7
|
+
import { I as We } from "./icon-button-S8_weU3g.js";
|
|
8
|
+
import { C as Qe } from "./combobox-BBCVQS-S.js";
|
|
9
|
+
import { D as de } from "./dialog-CIUn5oLb.js";
|
|
10
|
+
import { D as Pt } from "./date-picker-BmVBVpVu.js";
|
|
11
|
+
import { F as H } from "./form-field-CyHfOVKF.js";
|
|
12
|
+
import { I as Ft } from "./icon-button-group-BKtkVZ1W.js";
|
|
13
|
+
import { P as Ot } from "./panel-header-CbtlTe85.js";
|
|
14
|
+
import { P as jt } from "./panel-subview-DCyvn-49.js";
|
|
15
|
+
import { R as je } from "./radio-BZQs6_36.js";
|
|
16
|
+
import { R as Mt } from "./radio-group-ChIKyeSJ.js";
|
|
17
|
+
import { S as $t } from "./scroll-area-CY5SLYNw.js";
|
|
18
|
+
import { S as Ke } from "./select-uESzXTX6.js";
|
|
19
|
+
import { S as He } from "./skeleton-tTWJpvAq.js";
|
|
20
|
+
import { S as qt } from "./switch-DO6uC4HJ.js";
|
|
21
|
+
import { T as Vt } from "./text-area-COMVJ1yE.js";
|
|
22
|
+
import { T as Me } from "./text-input-B6iAgCr3.js";
|
|
23
|
+
import { T as _t } from "./time-picker-DDr5vhwQ.js";
|
|
24
|
+
import { u as zt } from "./registry-DvAUVLHh.js";
|
|
25
|
+
import { u as Lt } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
26
|
+
import { c as Ut } from "./compose-refs-C0k0tdqF.js";
|
|
27
|
+
import { E as Wt, a as Kt } from "./compact-editor-fields-cP6yh7xv.js";
|
|
28
|
+
import { n as Ht } from "./normalize-diacritics-BNGbFNlJ.js";
|
|
29
|
+
import { P as Gt } from "./privacy-mask-DJ1gee4c.js";
|
|
30
|
+
import { g as $e, h as Qt } from "./handled-rejection-6gqCf5vt.js";
|
|
31
|
+
import { L as Yt } from "./lock-ClAFG1gy.js";
|
|
32
|
+
import { X as Xt } from "./x-B5YnXwCz.js";
|
|
33
|
+
import { C as Jt } from "./circle-off-DuT9pVy2.js";
|
|
34
|
+
import { U as Zt } from "./user-B12p7bVF.js";
|
|
35
|
+
import { B as en } from "./building-2-D33bLCWL.js";
|
|
36
|
+
import { S as tn } from "./stethoscope-sZXGC43m.js";
|
|
37
|
+
import { T as dt } from "./trash-2-uumy3fy1.js";
|
|
38
|
+
import { S as ct } from "./square-check-big-dj0o8yA3.js";
|
|
39
|
+
import { p as nn } from "./privacy-mask-text-B8YfzB7L.js";
|
|
40
|
+
import { L as on } from "./loader-circle-BECIU_8N.js";
|
|
41
|
+
import { c as rn } from "./createLucideIcon-DhHxpK9K.js";
|
|
42
|
+
/**
|
|
43
|
+
* @license lucide-react v1.22.0 - ISC
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the ISC license.
|
|
46
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/
|
|
48
|
+
const an = [
|
|
49
|
+
[
|
|
50
|
+
"path",
|
|
51
|
+
{
|
|
52
|
+
d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
|
|
53
|
+
key: "1c8476"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
57
|
+
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
58
|
+
], sn = rn("save", an);
|
|
59
|
+
function vt({
|
|
60
|
+
action: o,
|
|
61
|
+
typedRef: s
|
|
62
|
+
}) {
|
|
63
|
+
return /* @__PURE__ */ n(
|
|
64
|
+
Te,
|
|
65
|
+
{
|
|
66
|
+
type: "button",
|
|
67
|
+
size: "sm",
|
|
68
|
+
intent: "outline",
|
|
69
|
+
className: "ds:self-start",
|
|
70
|
+
loading: o.loading,
|
|
71
|
+
"data-action": "create-patient",
|
|
72
|
+
onClick: () => o.onCreate(s.current),
|
|
73
|
+
children: o.label
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
function dn({
|
|
78
|
+
patients: o = [],
|
|
79
|
+
searchPatients: s,
|
|
80
|
+
...v
|
|
81
|
+
}) {
|
|
82
|
+
return s ? /* @__PURE__ */ n(ln, { ...v, searchPatients: s }) : /* @__PURE__ */ n(cn, { ...v, patients: o });
|
|
83
|
+
}
|
|
84
|
+
function cn({
|
|
85
|
+
value: o,
|
|
86
|
+
onValueChange: s,
|
|
87
|
+
patients: v,
|
|
88
|
+
selectedLabel: D,
|
|
89
|
+
placeholder: O,
|
|
90
|
+
size: R,
|
|
91
|
+
disabled: G,
|
|
92
|
+
createAction: T
|
|
93
|
+
}) {
|
|
94
|
+
const A = S(""), z = /* @__PURE__ */ n(
|
|
95
|
+
Qe,
|
|
96
|
+
{
|
|
97
|
+
value: o,
|
|
98
|
+
onValueChange: s,
|
|
99
|
+
onQueryChange: (w) => {
|
|
100
|
+
A.current = w;
|
|
101
|
+
},
|
|
102
|
+
options: [
|
|
103
|
+
...o && !v.some((w) => w.id === o) ? [{ value: o, label: D ?? "" }] : [],
|
|
104
|
+
...v.map((w) => ({ value: w.id, label: w.name }))
|
|
105
|
+
],
|
|
106
|
+
placeholder: O,
|
|
107
|
+
size: R,
|
|
108
|
+
disabled: G,
|
|
109
|
+
clearable: !0
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
return T ? /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
113
|
+
z,
|
|
114
|
+
o || G ? null : /* @__PURE__ */ n(vt, { action: T, typedRef: A })
|
|
115
|
+
] }) : z;
|
|
116
|
+
}
|
|
117
|
+
function ln({
|
|
118
|
+
value: o,
|
|
119
|
+
onValueChange: s,
|
|
120
|
+
selectedLabel: v,
|
|
121
|
+
placeholder: D,
|
|
122
|
+
size: O,
|
|
123
|
+
disabled: R,
|
|
124
|
+
searchPatients: G,
|
|
125
|
+
createAction: T
|
|
126
|
+
}) {
|
|
127
|
+
const { t: A } = gt("ui"), [z, w] = V(""), [J, Z] = V(0), [Q, ee] = V(), [j, M] = V(), re = S(null), L = S(""), U = z.trim();
|
|
128
|
+
qe(() => {
|
|
129
|
+
if (!U) return;
|
|
130
|
+
const m = new AbortController(), f = { query: U, source: G };
|
|
131
|
+
M({ ...f, status: "loading", patients: [] });
|
|
132
|
+
const u = setTimeout(() => {
|
|
133
|
+
Promise.resolve().then(() => G(U, { signal: m.signal })).then(
|
|
134
|
+
(ie) => {
|
|
135
|
+
m.signal.aborted || M({ ...f, status: "ready", patients: ie });
|
|
136
|
+
},
|
|
137
|
+
() => {
|
|
138
|
+
m.signal.aborted || M({ ...f, status: "error", patients: [] });
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
}, 250);
|
|
142
|
+
return () => {
|
|
143
|
+
clearTimeout(u), m.abort();
|
|
144
|
+
};
|
|
145
|
+
}, [U, G, J]);
|
|
146
|
+
const pe = (j == null ? void 0 : j.query) === U && j.source === G, P = U ? pe ? j.status : "loading" : "idle", N = pe && P === "ready" ? j.patients : [], ae = P === "loading" ? A("inputs.search.loading") : P === "error" ? A("emptyState.error.description") : P === "idle" ? D : N.length === 0 ? A("inputs.combobox.empty") : "", we = !!T && !o && !R, me = N.map((m) => ({
|
|
147
|
+
value: m.id,
|
|
148
|
+
label: m.name
|
|
149
|
+
}));
|
|
150
|
+
return o && !N.some((m) => m.id === o) && me.push({
|
|
151
|
+
value: o,
|
|
152
|
+
label: (Q == null ? void 0 : Q.id) === o ? Q.name : v ?? ""
|
|
153
|
+
}), /* @__PURE__ */ k(
|
|
154
|
+
"div",
|
|
155
|
+
{
|
|
156
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
157
|
+
"data-component": "patient-picker",
|
|
158
|
+
"data-status": P,
|
|
159
|
+
children: [
|
|
160
|
+
/* @__PURE__ */ n(
|
|
161
|
+
Qe,
|
|
162
|
+
{
|
|
163
|
+
ref: re,
|
|
164
|
+
options: me,
|
|
165
|
+
value: o,
|
|
166
|
+
onValueChange: (m) => {
|
|
167
|
+
ee(
|
|
168
|
+
(f) => N.find((u) => u.id === m) ?? ((f == null ? void 0 : f.id) === m ? f : void 0)
|
|
169
|
+
), s(m);
|
|
170
|
+
},
|
|
171
|
+
onQueryChange: (m) => {
|
|
172
|
+
L.current = m, w(m);
|
|
173
|
+
},
|
|
174
|
+
onOpenChange: (m) => {
|
|
175
|
+
!m && P !== "error" && w("");
|
|
176
|
+
},
|
|
177
|
+
filter: (m) => !U || N.some((f) => Ht(f.id) === m) ? 1 : 0,
|
|
178
|
+
size: O,
|
|
179
|
+
disabled: R,
|
|
180
|
+
placeholder: D,
|
|
181
|
+
emptyMessage: ae || void 0,
|
|
182
|
+
clearable: !0
|
|
183
|
+
}
|
|
184
|
+
),
|
|
185
|
+
/* @__PURE__ */ n("p", { role: "status", className: "type-body-sm ds:text-muted-foreground", children: ae }),
|
|
186
|
+
we && T ? /* @__PURE__ */ n(vt, { action: T, typedRef: L }) : null,
|
|
187
|
+
P === "error" ? /* @__PURE__ */ n(
|
|
188
|
+
Te,
|
|
189
|
+
{
|
|
190
|
+
size: "sm",
|
|
191
|
+
intent: "ghost",
|
|
192
|
+
onClick: () => {
|
|
193
|
+
var m;
|
|
194
|
+
Z((f) => f + 1), (m = re.current) == null || m.focus();
|
|
195
|
+
},
|
|
196
|
+
children: A("emptyState.error.cta")
|
|
197
|
+
}
|
|
198
|
+
) : null
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
const un = {
|
|
204
|
+
id: "task-editor",
|
|
205
|
+
// set_value backs set_fields and set_done; submit backs save; dismiss
|
|
206
|
+
// backs cancel.
|
|
207
|
+
capabilities: ["set_value", "submit", "dismiss"],
|
|
208
|
+
state: {
|
|
209
|
+
status: {
|
|
210
|
+
type: "'loading' | 'ready' | 'error' | 'locked' | 'withheld'",
|
|
211
|
+
descriptionKey: "ui.agent.taskEditor.state.status",
|
|
212
|
+
description: "Where the form is: loading the task, ready, failed to load, locked (edit mode with nothing to load) or withheld behind the privacy notice. Writes need 'ready'.",
|
|
213
|
+
read: (o) => o.getStatus()
|
|
214
|
+
},
|
|
215
|
+
draft: {
|
|
216
|
+
type: "{ mode: string; dateIso: string | null; about: string; patientId: string | null; companyId: string | null; operatorId: string | null; typeId: string | null; assigneeId: string | null; done: boolean; hasNote: boolean; noteLength: number }",
|
|
217
|
+
descriptionKey: "ui.agent.taskEditor.state.draft",
|
|
218
|
+
description: "The draft as Save would send it: ids and structure only, never the note body. done is the last value the host confirmed.",
|
|
219
|
+
read: (o) => o.getDraft()
|
|
220
|
+
},
|
|
221
|
+
canSave: {
|
|
222
|
+
type: "boolean",
|
|
223
|
+
descriptionKey: "ui.agent.taskEditor.state.canSave",
|
|
224
|
+
description: "Whether save would reach the host now: the form is ready, the note is filled, a chosen counterpart has an id and no write is pending.",
|
|
225
|
+
read: (o) => o.canSave()
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
actions: {
|
|
229
|
+
set_fields: {
|
|
230
|
+
safety: "phi",
|
|
231
|
+
argsType: "{ dateIso?: string; note?: string; typeId?: string; assigneeId?: string | null; about?: 'nobody' | 'patient' | 'company' | 'operator'; patientId?: string; companyId?: string; operatorId?: string }",
|
|
232
|
+
argsSchema: {
|
|
233
|
+
type: "object",
|
|
234
|
+
properties: {
|
|
235
|
+
dateIso: { type: "string", format: "date-time" },
|
|
236
|
+
note: { type: "string" },
|
|
237
|
+
typeId: { type: "string" },
|
|
238
|
+
assigneeId: { type: ["string", "null"] },
|
|
239
|
+
about: {
|
|
240
|
+
type: "string",
|
|
241
|
+
enum: ["nobody", "patient", "company", "operator"]
|
|
242
|
+
},
|
|
243
|
+
patientId: { type: "string" },
|
|
244
|
+
companyId: { type: "string" },
|
|
245
|
+
operatorId: { type: "string" }
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
idempotent: !0,
|
|
249
|
+
errors: [
|
|
250
|
+
"An id the host lists, its patient search or the stored task do not resolve.",
|
|
251
|
+
"More than one of patientId, companyId and operatorId.",
|
|
252
|
+
"The form is not ready, is read-only or is withheld."
|
|
253
|
+
],
|
|
254
|
+
descriptionKey: "ui.agent.taskEditor.actions.setFields",
|
|
255
|
+
description: "Set draft fields. Ids must come from the host lists, a patient the host search returned, or equal the stored one. At most one counterpart per call, and it selects its branch; assigneeId null is nobody. Nothing is saved.",
|
|
256
|
+
invoke: (o, s) => {
|
|
257
|
+
o.setFields(s);
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
save: {
|
|
261
|
+
safety: "phi",
|
|
262
|
+
// Reaches the host's data source; the result is the host's promise.
|
|
263
|
+
openWorld: !0,
|
|
264
|
+
descriptionKey: "ui.agent.taskEditor.actions.save",
|
|
265
|
+
description: "Save the task through the host. Resolves once the write lands and rejects with the host error, which the form also shows.",
|
|
266
|
+
invoke: (o) => o.save()
|
|
267
|
+
},
|
|
268
|
+
set_done: {
|
|
269
|
+
safety: "write",
|
|
270
|
+
argsType: "{ done: boolean }",
|
|
271
|
+
argsSchema: {
|
|
272
|
+
type: "object",
|
|
273
|
+
properties: { done: { type: "boolean" } },
|
|
274
|
+
required: ["done"]
|
|
275
|
+
},
|
|
276
|
+
openWorld: !0,
|
|
277
|
+
errors: [
|
|
278
|
+
"The form is not ready, is read-only or has no Done seam.",
|
|
279
|
+
"A save, a delete or another Done change is in flight.",
|
|
280
|
+
"The task was already saved or deleted in this session."
|
|
281
|
+
],
|
|
282
|
+
descriptionKey: "ui.agent.taskEditor.actions.setDone",
|
|
283
|
+
description: "Mark an existing task done or not done through the host. A rejection rolls the switch back.",
|
|
284
|
+
invoke: (o, s) => o.setDone(s.done)
|
|
285
|
+
},
|
|
286
|
+
delete: {
|
|
287
|
+
safety: "destructive",
|
|
288
|
+
idempotent: !0,
|
|
289
|
+
openWorld: !0,
|
|
290
|
+
descriptionKey: "ui.agent.taskEditor.actions.delete",
|
|
291
|
+
description: "Delete the task through the host, without the confirmation dialog. Resolves once the delete lands.",
|
|
292
|
+
invoke: (o) => o.deleteTask()
|
|
293
|
+
},
|
|
294
|
+
cancel: {
|
|
295
|
+
safety: "destructive",
|
|
296
|
+
errors: ["A save or delete is in flight: wait for it to settle."],
|
|
297
|
+
descriptionKey: "ui.agent.taskEditor.actions.cancel",
|
|
298
|
+
description: "Close the editor without saving. Anything typed since the last save is lost. Refused while a save or delete is in flight.",
|
|
299
|
+
invoke: (o) => {
|
|
300
|
+
o.cancel();
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
domHooks: {
|
|
305
|
+
root: {
|
|
306
|
+
attr: "data-component",
|
|
307
|
+
value: "task-editor",
|
|
308
|
+
description: "Marks the TaskEditor body. It also carries data-variant and data-status. In the subview variant it sits inside the panel-subview section, which repeats data-component-id, data-variant and data-status and holds the heading and footer."
|
|
309
|
+
},
|
|
310
|
+
instanceId: {
|
|
311
|
+
attr: "data-component-id",
|
|
312
|
+
sourceProp: "id",
|
|
313
|
+
description: "Sourced from the id prop, or generated. Addresses one editor from the agent. [data-component-id] reaches the footer actions in both variants."
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}, _ = "none", lt = {
|
|
317
|
+
showError: !1,
|
|
318
|
+
saving: !1,
|
|
319
|
+
saveError: void 0,
|
|
320
|
+
done: !1,
|
|
321
|
+
confirmedDone: !1,
|
|
322
|
+
donePending: !1,
|
|
323
|
+
doneError: void 0,
|
|
324
|
+
deleting: !1,
|
|
325
|
+
deleteError: void 0,
|
|
326
|
+
confirmDeleteOpen: !1,
|
|
327
|
+
accepted: !1
|
|
328
|
+
};
|
|
329
|
+
function pn(o) {
|
|
330
|
+
return o.patientId ? "patient" : o.companyId ? "company" : o.operatorId ? "operator" : "nobody";
|
|
331
|
+
}
|
|
332
|
+
function Ye(o) {
|
|
333
|
+
return { hours: o.getHours(), minutes: o.getMinutes() };
|
|
334
|
+
}
|
|
335
|
+
function ut(o) {
|
|
336
|
+
const s = o ?? /* @__PURE__ */ new Date();
|
|
337
|
+
return {
|
|
338
|
+
date: s,
|
|
339
|
+
time: Ye(s),
|
|
340
|
+
note: "",
|
|
341
|
+
operatorId: _,
|
|
342
|
+
typeId: "",
|
|
343
|
+
assigneeId: _,
|
|
344
|
+
about: "nobody",
|
|
345
|
+
patientId: "",
|
|
346
|
+
companyId: ""
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
function mn(o) {
|
|
350
|
+
const s = new Date(o.dateIso);
|
|
351
|
+
return {
|
|
352
|
+
date: s,
|
|
353
|
+
time: Ye(s),
|
|
354
|
+
note: o.note,
|
|
355
|
+
/* `||`, not `??`: a host's '' is unset, like patient and company. */
|
|
356
|
+
operatorId: o.operatorId || _,
|
|
357
|
+
/* A stored type wins. With none, '' falls through to the first entry. */
|
|
358
|
+
typeId: o.typeId ?? "",
|
|
359
|
+
/* `||` too: '' would become a Select option with an empty value. */
|
|
360
|
+
assigneeId: o.assigneeId || _,
|
|
361
|
+
about: pn(o),
|
|
362
|
+
patientId: o.patientId ?? "",
|
|
363
|
+
companyId: o.companyId ?? ""
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
const fn = [
|
|
367
|
+
["patientId", "patient"],
|
|
368
|
+
["companyId", "company"],
|
|
369
|
+
["operatorId", "operator"]
|
|
370
|
+
];
|
|
371
|
+
function hn({
|
|
372
|
+
mode: o,
|
|
373
|
+
taskId: s,
|
|
374
|
+
initialDate: v,
|
|
375
|
+
active: D,
|
|
376
|
+
taskTypes: O,
|
|
377
|
+
assignees: R,
|
|
378
|
+
companies: G,
|
|
379
|
+
operators: T,
|
|
380
|
+
patients: A,
|
|
381
|
+
searchedPatients: z,
|
|
382
|
+
resolvePatientLabel: w,
|
|
383
|
+
loadTask: J,
|
|
384
|
+
onCreateTask: Z,
|
|
385
|
+
onUpdateTask: Q,
|
|
386
|
+
onDeleteTask: ee,
|
|
387
|
+
onSetTaskDone: j,
|
|
388
|
+
onSaved: M,
|
|
389
|
+
onDeleted: re,
|
|
390
|
+
readOnly: L,
|
|
391
|
+
withheld: U,
|
|
392
|
+
maskPatient: pe,
|
|
393
|
+
fallbackError: P
|
|
394
|
+
}) {
|
|
395
|
+
var Ce;
|
|
396
|
+
const N = o === "edit", [ae, we] = V(0), [me, m] = V(D);
|
|
397
|
+
me !== D && (m(D), D && we((e) => e + 1));
|
|
398
|
+
const f = `${o}|${s ?? ""}|${ae}`, [u, ie] = V(
|
|
399
|
+
() => ut(v)
|
|
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
|
+
he !== f && (te(f), ie(ut(v)), Ee(lt), r(void 0));
|
|
402
|
+
const F = S({
|
|
403
|
+
subject: f,
|
|
404
|
+
saving: !1,
|
|
405
|
+
deleting: !1,
|
|
406
|
+
donePending: !1,
|
|
407
|
+
accepted: !1
|
|
408
|
+
});
|
|
409
|
+
F.current.subject !== f && (F.current = {
|
|
410
|
+
subject: f,
|
|
411
|
+
saving: !1,
|
|
412
|
+
deleting: !1,
|
|
413
|
+
donePending: !1,
|
|
414
|
+
accepted: !1
|
|
415
|
+
});
|
|
416
|
+
const ge = S(!0);
|
|
417
|
+
qe(() => (ge.current = !0, () => {
|
|
418
|
+
ge.current = !1;
|
|
419
|
+
}), []);
|
|
420
|
+
const B = (e) => ge.current && F.current === e, ce = S(J);
|
|
421
|
+
ce.current = J;
|
|
422
|
+
const c = !!J, [x, l] = V(0), [d, h] = V(null), ke = S(d);
|
|
423
|
+
ke.current = d;
|
|
424
|
+
const ve = D && N && !!s && c && !U;
|
|
425
|
+
qe(() => {
|
|
426
|
+
const e = ce.current;
|
|
427
|
+
if (!ve || !s || !e) return;
|
|
428
|
+
const i = F.current, g = ke.current;
|
|
429
|
+
if ((g == null ? void 0 : g.subject) === i.subject && g.status === "ready")
|
|
430
|
+
return;
|
|
431
|
+
const p = new AbortController();
|
|
432
|
+
return Promise.resolve().then(
|
|
433
|
+
() => (
|
|
434
|
+
/* Cleaned up before this ran (StrictMode's replay, a quick re-run):
|
|
435
|
+
never call the host with a signal already aborted. */
|
|
436
|
+
p.signal.aborted ? Promise.reject(p.signal.reason) : e(s, { signal: p.signal })
|
|
437
|
+
)
|
|
438
|
+
).then(
|
|
439
|
+
(y) => {
|
|
440
|
+
p.signal.aborted || !B(i) || (ie(mn(y)), E({ done: y.done, confirmedDone: y.done }), r(y), h({ subject: i.subject, status: "ready" }));
|
|
441
|
+
},
|
|
442
|
+
(y) => {
|
|
443
|
+
p.signal.aborted || !B(i) || h({
|
|
444
|
+
subject: i.subject,
|
|
445
|
+
status: "error",
|
|
446
|
+
message: $e(y, P)
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
), () => p.abort();
|
|
450
|
+
}, [ve, f, x]);
|
|
451
|
+
const $ = N ? !s || !c ? "locked" : U ? "withheld" : (d == null ? void 0 : d.subject) === f ? d.status : "loading" : "ready", X = () => {
|
|
452
|
+
$ === "error" && (h(null), l((e) => e + 1));
|
|
453
|
+
}, le = u.typeId || (((Ce = O[0]) == null ? void 0 : Ce.id) ?? ""), Ve = u.about === "nobody" || u.about === "patient" && u.patientId !== "" || u.about === "company" && u.companyId !== "" || u.about === "operator" && u.operatorId !== _, ue = !L && u.note.trim() !== "" && u.date !== void 0 && Ve && /* Required whenever the host offers a list. */
|
|
454
|
+
(O.length === 0 || le !== "") && !Y.saving && !Y.donePending, ye = N ? Q : Z, Se = () => {
|
|
455
|
+
const { date: e, time: i } = u;
|
|
456
|
+
return e ? {
|
|
457
|
+
dateIso: new Date(
|
|
458
|
+
e.getFullYear(),
|
|
459
|
+
e.getMonth(),
|
|
460
|
+
e.getDate(),
|
|
461
|
+
i.hours,
|
|
462
|
+
i.minutes,
|
|
463
|
+
0,
|
|
464
|
+
0
|
|
465
|
+
).toISOString(),
|
|
466
|
+
note: u.note.trim(),
|
|
467
|
+
/* Sent whatever the host's list says, including a value the list no
|
|
468
|
+
longer resolves: a real link must survive a Save that never
|
|
469
|
+
offered to change it. */
|
|
470
|
+
typeId: le === "" ? void 0 : le,
|
|
471
|
+
assigneeId: u.assigneeId === _ ? void 0 : u.assigneeId,
|
|
472
|
+
/* ONE counterpart, decided by `about` alone: the platform refuses a
|
|
473
|
+
task carrying two. Never gated on a list being loaded, or a list
|
|
474
|
+
that empties mid-edit would unlink the task on Save. */
|
|
475
|
+
patientId: u.about === "patient" && u.patientId ? u.patientId : void 0,
|
|
476
|
+
companyId: u.about === "company" && u.companyId ? u.companyId : void 0,
|
|
477
|
+
operatorId: u.about === "operator" && u.operatorId !== _ ? u.operatorId : void 0,
|
|
478
|
+
/* The last CONFIRMED value only, never an optimistic or rolled-back
|
|
479
|
+
toggle. */
|
|
480
|
+
done: Y.confirmedDone
|
|
481
|
+
} : void 0;
|
|
482
|
+
}, C = (e) => Qt(new Error(`TaskEditor: ${e}`)), Be = () => {
|
|
483
|
+
const e = F.current;
|
|
484
|
+
if ($ !== "ready") return C(`cannot save while ${$}.`);
|
|
485
|
+
if (!ye) return C("the host gave no save seam.");
|
|
486
|
+
if (e.accepted) return C("this task was already saved.");
|
|
487
|
+
if (e.deleting) return C("a delete is in flight.");
|
|
488
|
+
if (e.saving || !ue) return C("the task cannot be saved.");
|
|
489
|
+
const i = Se();
|
|
490
|
+
if (!i)
|
|
491
|
+
return E({ showError: !0 }), C("the task has no date.");
|
|
492
|
+
const g = s;
|
|
493
|
+
e.saving = !0, E({ saving: !0, saveError: void 0 });
|
|
494
|
+
const p = (async () => {
|
|
495
|
+
try {
|
|
496
|
+
if (N)
|
|
497
|
+
await (Q == null ? void 0 : Q(g, i)), e.accepted = !0, B(e) && (E({ accepted: !0 }), M == null || M({
|
|
498
|
+
...i,
|
|
499
|
+
id: g,
|
|
500
|
+
done: i.done ?? !1
|
|
501
|
+
}));
|
|
502
|
+
else {
|
|
503
|
+
const y = await (Z == null ? void 0 : Z(i));
|
|
504
|
+
e.accepted = !0, B(e) && (E({ accepted: !0 }), y && (M == null || M(y)));
|
|
505
|
+
}
|
|
506
|
+
} catch (y) {
|
|
507
|
+
throw B(e) && E({ saveError: $e(y, P) }), y;
|
|
508
|
+
} finally {
|
|
509
|
+
e.saving = !1, B(e) && E({ saving: !1 });
|
|
510
|
+
}
|
|
511
|
+
})();
|
|
512
|
+
return p.catch(() => {
|
|
513
|
+
}), p;
|
|
514
|
+
}, xe = (e) => {
|
|
515
|
+
const i = F.current;
|
|
516
|
+
if ($ !== "ready")
|
|
517
|
+
return C(`cannot change Done while ${$}.`);
|
|
518
|
+
if (!N || !s || !j || L)
|
|
519
|
+
return C("the host gave no Done seam.");
|
|
520
|
+
if (i.donePending) return C("a Done change is already pending.");
|
|
521
|
+
if (i.saving || i.deleting)
|
|
522
|
+
return C("a save or delete is in flight.");
|
|
523
|
+
if (i.accepted)
|
|
524
|
+
return C("this task was already saved or deleted.");
|
|
525
|
+
if (e === Y.done) return Promise.resolve();
|
|
526
|
+
const g = Y.confirmedDone, p = s;
|
|
527
|
+
i.donePending = !0, E({ done: e, donePending: !0, doneError: void 0 });
|
|
528
|
+
const y = (async () => {
|
|
529
|
+
try {
|
|
530
|
+
await j(p, e), B(i) && E({ confirmedDone: e });
|
|
531
|
+
} catch (W) {
|
|
532
|
+
throw B(i) && E({
|
|
533
|
+
done: g,
|
|
534
|
+
doneError: $e(W, P)
|
|
535
|
+
}), W;
|
|
536
|
+
} finally {
|
|
537
|
+
i.donePending = !1, B(i) && E({ donePending: !1 });
|
|
538
|
+
}
|
|
539
|
+
})();
|
|
540
|
+
return y.catch(() => {
|
|
541
|
+
}), y;
|
|
542
|
+
}, Ae = () => {
|
|
543
|
+
const e = F.current;
|
|
544
|
+
if ($ !== "ready") return C(`cannot delete while ${$}.`);
|
|
545
|
+
if (!N || !s || !ee || L)
|
|
546
|
+
return C("the host gave no delete seam.");
|
|
547
|
+
if (e.saving || e.accepted || e.deleting)
|
|
548
|
+
return C("the task cannot be deleted now.");
|
|
549
|
+
const i = s;
|
|
550
|
+
e.deleting = !0, E({ deleting: !0, deleteError: void 0 });
|
|
551
|
+
const g = (async () => {
|
|
552
|
+
try {
|
|
553
|
+
await ee(i), e.accepted = !0, B(e) && (E({ accepted: !0, confirmDeleteOpen: !1 }), re == null || re(i));
|
|
554
|
+
} catch (p) {
|
|
555
|
+
throw B(e) && E({ deleteError: $e(p, P) }), p;
|
|
556
|
+
} finally {
|
|
557
|
+
e.deleting = !1, B(e) && E({ deleting: !1 });
|
|
558
|
+
}
|
|
559
|
+
})();
|
|
560
|
+
return g.catch(() => {
|
|
561
|
+
}), g;
|
|
562
|
+
}, se = (e, i, g) => (
|
|
563
|
+
/* '' is never an id, even when the stored record holds one. */
|
|
564
|
+
i !== "" && (i === g || e.some((p) => p.id === i))
|
|
565
|
+
), be = (e) => {
|
|
566
|
+
var y;
|
|
567
|
+
if ($ !== "ready")
|
|
568
|
+
throw new Error(`TaskEditor: cannot set fields while ${$}.`);
|
|
569
|
+
if (L) throw new Error("TaskEditor: the task is read-only.");
|
|
570
|
+
const i = fn.filter(([W]) => e[W] !== void 0);
|
|
571
|
+
if (i.length > 1)
|
|
572
|
+
throw new Error(
|
|
573
|
+
"TaskEditor: set at most one of patientId, companyId and operatorId."
|
|
574
|
+
);
|
|
575
|
+
const g = (y = i[0]) == null ? void 0 : y[1];
|
|
576
|
+
if (e.about !== void 0 && g && e.about !== g)
|
|
577
|
+
throw new Error(
|
|
578
|
+
`TaskEditor: about "${e.about}" does not match the ${g} id.`
|
|
579
|
+
);
|
|
580
|
+
if (e.typeId !== void 0 && !se(O, e.typeId, I == null ? void 0 : I.typeId))
|
|
581
|
+
throw new Error(`TaskEditor: unknown typeId "${e.typeId}".`);
|
|
582
|
+
if (e.assigneeId !== void 0 && e.assigneeId !== null && !se(R, e.assigneeId, I == null ? void 0 : I.assigneeId))
|
|
583
|
+
throw new Error(`TaskEditor: unknown assigneeId "${e.assigneeId}".`);
|
|
584
|
+
if (e.companyId !== void 0 && !se(G, e.companyId, I == null ? void 0 : I.companyId))
|
|
585
|
+
throw new Error(`TaskEditor: unknown companyId "${e.companyId}".`);
|
|
586
|
+
if (e.operatorId !== void 0 && !se(T, e.operatorId, I == null ? void 0 : I.operatorId))
|
|
587
|
+
throw new Error(`TaskEditor: unknown operatorId "${e.operatorId}".`);
|
|
588
|
+
if (e.patientId !== void 0) {
|
|
589
|
+
if (pe)
|
|
590
|
+
throw new Error("TaskEditor: no patient can be set in privacy mode.");
|
|
591
|
+
if (!(se(A, e.patientId, I == null ? void 0 : I.patientId) || z.has(e.patientId) || (w == null ? void 0 : w(e.patientId)) !== void 0))
|
|
592
|
+
throw new Error(`TaskEditor: unknown patientId "${e.patientId}".`);
|
|
593
|
+
}
|
|
594
|
+
const p = {};
|
|
595
|
+
if (e.dateIso !== void 0) {
|
|
596
|
+
const W = new Date(e.dateIso);
|
|
597
|
+
if (Number.isNaN(W.getTime()))
|
|
598
|
+
throw new Error(`TaskEditor: "${e.dateIso}" is not a date.`);
|
|
599
|
+
p.date = W, p.time = Ye(W);
|
|
600
|
+
}
|
|
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
|
+
}, Pe = () => {
|
|
603
|
+
const e = Se();
|
|
604
|
+
return {
|
|
605
|
+
mode: o,
|
|
606
|
+
dateIso: (e == null ? void 0 : e.dateIso) ?? null,
|
|
607
|
+
about: u.about,
|
|
608
|
+
patientId: (e == null ? void 0 : e.patientId) ?? null,
|
|
609
|
+
companyId: (e == null ? void 0 : e.companyId) ?? null,
|
|
610
|
+
operatorId: (e == null ? void 0 : e.operatorId) ?? null,
|
|
611
|
+
typeId: (e == null ? void 0 : e.typeId) ?? null,
|
|
612
|
+
assigneeId: (e == null ? void 0 : e.assigneeId) ?? null,
|
|
613
|
+
done: Y.confirmedDone,
|
|
614
|
+
hasNote: u.note.trim() !== "",
|
|
615
|
+
noteLength: u.note.trim().length
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
return {
|
|
619
|
+
status: $,
|
|
620
|
+
loadError: (d == null ? void 0 : d.subject) === f ? d.message : void 0,
|
|
621
|
+
retry: X,
|
|
622
|
+
fields: u,
|
|
623
|
+
patchFields: fe,
|
|
624
|
+
stored: I,
|
|
625
|
+
chosenTypeId: le,
|
|
626
|
+
canSave: ue,
|
|
627
|
+
/** What the agent's `canSave` reports: the button's rule plus the
|
|
628
|
+
* status, the seam and a save that has not landed yet. */
|
|
629
|
+
agentCanSave: $ === "ready" && !!ye && ue && !Y.accepted,
|
|
630
|
+
showSave: !L && !!ye,
|
|
631
|
+
showDelete: N && !L && !!ee && !!s,
|
|
632
|
+
showDone: N && !L && !!j,
|
|
633
|
+
ui: Y,
|
|
634
|
+
patchUi: E,
|
|
635
|
+
/** True once a save or delete landed in this session. */
|
|
636
|
+
isAccepted: () => F.current.accepted,
|
|
637
|
+
/** A save or delete is in flight: closing now would lose its outcome. */
|
|
638
|
+
isBusy: () => F.current.saving || F.current.deleting,
|
|
639
|
+
submit: Be,
|
|
640
|
+
setDone: xe,
|
|
641
|
+
remove: Ae,
|
|
642
|
+
applyPatch: be,
|
|
643
|
+
draftState: Pe
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
const pt = ht("ds:flex ds:min-h-0 ds:flex-col", {
|
|
647
|
+
variants: {
|
|
648
|
+
/** The panel fills its box; the subview body sits in its scroll area. */
|
|
649
|
+
variant: {
|
|
650
|
+
/* Focusable from script only, as the subview section is: where focus
|
|
651
|
+
waits when a control takes itself away. */
|
|
652
|
+
panel: "ds:h-full ds:focus-visible:outline-none",
|
|
653
|
+
/* The states pad themselves, so the subview's ring inset is cancelled. */
|
|
654
|
+
subview: "ds:-m-[var(--panel-subview-inset)]"
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
defaultVariants: { variant: "panel" }
|
|
658
|
+
}), mt = ht(
|
|
659
|
+
`ds:m-0 ds:min-w-0 ds:border-0 ds:p-[var(--spacing-md)] ${Kt}`,
|
|
660
|
+
{
|
|
661
|
+
variants: {
|
|
662
|
+
/** 'form': the fields in a column. 'notice': the locked notice. */
|
|
663
|
+
layout: {
|
|
664
|
+
form: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
665
|
+
notice: "ds:flex-1"
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
defaultVariants: { layout: "form" }
|
|
669
|
+
}
|
|
670
|
+
), a = (o) => `calendarWorkspace.taskEditor.${o}`, gn = (o, s, v) => v.includes(s) ? 1 : 0, Re = [], Ge = (o, s) => Array.from(o.querySelectorAll("[data-task-id]")).filter(
|
|
671
|
+
(v) => !s.contains(v)
|
|
672
|
+
), vn = 'button:not([disabled]), a[href], input:not([disabled]), [tabindex]:not([tabindex="-1"])', ft = (o, s) => {
|
|
673
|
+
if (!o) return [];
|
|
674
|
+
const v = Array.from(
|
|
675
|
+
o.querySelectorAll("[data-action]")
|
|
676
|
+
);
|
|
677
|
+
return [
|
|
678
|
+
...v.filter((D) => s && D.dataset.action === s),
|
|
679
|
+
...v.filter((D) => D.dataset.action === "open-task"),
|
|
680
|
+
...Array.from(o.querySelectorAll(vn))
|
|
681
|
+
];
|
|
682
|
+
}, yn = xt(
|
|
683
|
+
({
|
|
684
|
+
id: o,
|
|
685
|
+
mode: s,
|
|
686
|
+
taskId: v,
|
|
687
|
+
initialDate: D,
|
|
688
|
+
variant: O = "panel",
|
|
689
|
+
open: R = !0,
|
|
690
|
+
onExited: G,
|
|
691
|
+
taskTypes: T = Re,
|
|
692
|
+
assignees: A = Re,
|
|
693
|
+
companies: z = Re,
|
|
694
|
+
operators: w = Re,
|
|
695
|
+
patients: J = Re,
|
|
696
|
+
searchPatients: Z,
|
|
697
|
+
patientLabel: Q,
|
|
698
|
+
resolvePatientLabel: ee,
|
|
699
|
+
companyLabel: j,
|
|
700
|
+
operatorLabel: M,
|
|
701
|
+
backLabel: re,
|
|
702
|
+
loadTask: L,
|
|
703
|
+
onCreateTask: U,
|
|
704
|
+
onUpdateTask: pe,
|
|
705
|
+
onDeleteTask: P,
|
|
706
|
+
onSetTaskDone: N,
|
|
707
|
+
onCancel: ae,
|
|
708
|
+
onSaved: we,
|
|
709
|
+
onDeleted: me,
|
|
710
|
+
readOnly: m = !1,
|
|
711
|
+
privacy: f = !1,
|
|
712
|
+
privacyMode: u = "notice",
|
|
713
|
+
onPrivacyOff: ie,
|
|
714
|
+
className: Y,
|
|
715
|
+
...Ee
|
|
716
|
+
}, I) => {
|
|
717
|
+
const { t: r } = gt("ui"), E = At(), fe = o ?? E, he = s === "edit", te = O === "subview", F = !te || R, ge = f && he && u === "notice", B = f && !ge, [ce] = V(() => /* @__PURE__ */ new Map()), c = hn({
|
|
718
|
+
mode: s,
|
|
719
|
+
taskId: v,
|
|
720
|
+
initialDate: D,
|
|
721
|
+
active: F,
|
|
722
|
+
taskTypes: T,
|
|
723
|
+
assignees: A,
|
|
724
|
+
companies: z,
|
|
725
|
+
operators: w,
|
|
726
|
+
patients: J,
|
|
727
|
+
searchedPatients: ce,
|
|
728
|
+
resolvePatientLabel: ee,
|
|
729
|
+
loadTask: L,
|
|
730
|
+
onCreateTask: U,
|
|
731
|
+
onUpdateTask: pe,
|
|
732
|
+
onDeleteTask: P,
|
|
733
|
+
onSetTaskDone: N,
|
|
734
|
+
onSaved: we,
|
|
735
|
+
onDeleted: me,
|
|
736
|
+
readOnly: m,
|
|
737
|
+
withheld: ge,
|
|
738
|
+
maskPatient: B,
|
|
739
|
+
fallbackError: r("emptyState.error.title")
|
|
740
|
+
}), { status: x, fields: l, ui: d, stored: h } = c, ke = S(Z);
|
|
741
|
+
ke.current = Z;
|
|
742
|
+
const ve = !!Z, $ = Oe(
|
|
743
|
+
() => ve ? async (t, b) => {
|
|
744
|
+
const K = await ke.current(t, b);
|
|
745
|
+
for (const oe of K)
|
|
746
|
+
ce.set(oe.id, oe.name);
|
|
747
|
+
return K;
|
|
748
|
+
} : void 0,
|
|
749
|
+
[ve, ce]
|
|
750
|
+
), X = S(c);
|
|
751
|
+
X.current = c;
|
|
752
|
+
const le = S(ae);
|
|
753
|
+
le.current = ae;
|
|
754
|
+
const Ve = Oe(
|
|
755
|
+
() => ({
|
|
756
|
+
getStatus: () => X.current.status,
|
|
757
|
+
getDraft: () => X.current.draftState(),
|
|
758
|
+
canSave: () => X.current.agentCanSave,
|
|
759
|
+
setFields: (t) => X.current.applyPatch(t),
|
|
760
|
+
save: () => X.current.submit(),
|
|
761
|
+
setDone: (t) => X.current.setDone(t),
|
|
762
|
+
deleteTask: () => X.current.remove(),
|
|
763
|
+
cancel: () => {
|
|
764
|
+
if (X.current.isBusy())
|
|
765
|
+
throw new Error("TaskEditor: a save or delete is in flight.");
|
|
766
|
+
le.current();
|
|
767
|
+
}
|
|
768
|
+
}),
|
|
769
|
+
[]
|
|
770
|
+
);
|
|
771
|
+
zt(un, F ? Ve : null, fe);
|
|
772
|
+
const ue = S(null), ye = Oe(
|
|
773
|
+
() => Ut(I, ue),
|
|
774
|
+
[I]
|
|
775
|
+
), Se = S(null), C = S(null), Be = S(!1);
|
|
776
|
+
te && R && !Be.current && (C.current = typeof document < "u" && document.activeElement instanceof HTMLElement ? document.activeElement : null), Be.current = te && R;
|
|
777
|
+
const xe = S(R);
|
|
778
|
+
xe.current = R;
|
|
779
|
+
const Ae = S(v);
|
|
780
|
+
Ae.current = he ? v : void 0, qe(() => {
|
|
781
|
+
var st;
|
|
782
|
+
const t = ue.current, b = t == null ? void 0 : t.parentElement;
|
|
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((Fe) => Fe.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
|
+
return () => {
|
|
786
|
+
if (xe.current && t.isConnected) return;
|
|
787
|
+
const Fe = document.activeElement;
|
|
788
|
+
if (!b.isConnected || Fe && Fe !== document.body) return;
|
|
789
|
+
const Ue = Ge(b, t), Bt = [
|
|
790
|
+
...ft(
|
|
791
|
+
Ue.find((Ie) => rt !== void 0 && Ie.dataset.taskId === rt),
|
|
792
|
+
at
|
|
793
|
+
),
|
|
794
|
+
/* The row that took its place, or the last row when it was last. */
|
|
795
|
+
...it >= 0 ? ft(Ue[Math.min(it, Ue.length - 1)], at) : [],
|
|
796
|
+
b.querySelector('[data-action="add-task"]'),
|
|
797
|
+
b.querySelector("[data-tasks-panel-region]")
|
|
798
|
+
];
|
|
799
|
+
for (const Ie of Bt)
|
|
800
|
+
if (!(!Ie || t.contains(Ie)) && (Ie.focus(), document.activeElement === Ie))
|
|
801
|
+
return;
|
|
802
|
+
};
|
|
803
|
+
}, [R, te]);
|
|
804
|
+
const se = S(null), be = S(!1), Pe = (t) => () => {
|
|
805
|
+
be.current = !0, t();
|
|
806
|
+
};
|
|
807
|
+
Lt(() => {
|
|
808
|
+
var K;
|
|
809
|
+
if (!be.current) return;
|
|
810
|
+
const t = ue.current, b = document.activeElement;
|
|
811
|
+
if (b && b !== document.body && b !== t) {
|
|
812
|
+
be.current = !1;
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
x !== "loading" && (be.current = !1), (K = x === "error" ? se.current : t) == null || K.focus({
|
|
816
|
+
preventScroll: !0
|
|
817
|
+
});
|
|
818
|
+
}, [x]);
|
|
819
|
+
const Ce = r(a(he ? "editTitle" : "title")), e = z.length > 0, i = w.length > 0, g = ve || J.length > 0, p = Oe(
|
|
820
|
+
() => z.map((t) => ({ value: t.id, label: t.label })),
|
|
821
|
+
[z]
|
|
822
|
+
), y = (t) => {
|
|
823
|
+
var b;
|
|
824
|
+
return (ee == null ? void 0 : ee(t)) ?? ((b = J.find((K) => K.id === t)) == null ? void 0 : b.name) ?? ce.get(t) ?? (t === (h == null ? void 0 : h.patientId) ? Q : void 0) ?? r("calendarWorkspace.details.patientNotLoaded");
|
|
825
|
+
}, W = (t) => t === (h == null ? void 0 : h.operatorId) && M ? M : r(a("operatorUnresolved"), { id: t }), yt = [
|
|
826
|
+
{ value: _, label: r(a("operatorNone")) },
|
|
827
|
+
...w.map((t) => ({ value: t.id, label: t.label })),
|
|
828
|
+
/* An operator the roster no longer lists is still a real link, so it
|
|
829
|
+
stays pickable and survives a Save. */
|
|
830
|
+
...l.operatorId !== _ && !w.some((t) => t.id === l.operatorId) ? [
|
|
831
|
+
{
|
|
832
|
+
value: l.operatorId,
|
|
833
|
+
label: W(l.operatorId)
|
|
834
|
+
}
|
|
835
|
+
] : []
|
|
836
|
+
], bt = T.some((t) => t.custom) && T.some((t) => !t.custom), It = [
|
|
837
|
+
...T.map((t) => ({
|
|
838
|
+
value: t.id,
|
|
839
|
+
label: t.label,
|
|
840
|
+
group: bt ? r(a(t.custom ? "typeGroupCustom" : "typeGroupStandard")) : void 0
|
|
841
|
+
})),
|
|
842
|
+
/* An id the list no longer resolves is still a real link: offered as
|
|
843
|
+
its own option so Save re-sends it. */
|
|
844
|
+
...c.chosenTypeId && !T.some((t) => t.id === c.chosenTypeId) ? [
|
|
845
|
+
{
|
|
846
|
+
value: c.chosenTypeId,
|
|
847
|
+
label: r(a("typeUnresolved"), { id: c.chosenTypeId })
|
|
848
|
+
}
|
|
849
|
+
] : []
|
|
850
|
+
], wt = [
|
|
851
|
+
{ value: _, label: r(a("assigneeNone")) },
|
|
852
|
+
...A.map((t) => ({ value: t.id, label: t.label })),
|
|
853
|
+
...l.assigneeId !== _ && !A.some((t) => t.id === l.assigneeId) ? [
|
|
854
|
+
{
|
|
855
|
+
value: l.assigneeId,
|
|
856
|
+
label: r(a("assigneeUnresolved"), { id: l.assigneeId })
|
|
857
|
+
}
|
|
858
|
+
] : []
|
|
859
|
+
], ne = l.about === "company" && l.companyId && !z.some((t) => t.id === l.companyId) ? l.companyId : void 0, Et = ne && ne === (h == null ? void 0 : h.companyId) && j ? j : r(a("companyUnresolved"), { id: ne }), Xe = /* @__PURE__ */ k(q, { variant: "info", announce: "off", icon: /* @__PURE__ */ n(Yt, { "aria-hidden": "true" }), children: [
|
|
860
|
+
/* @__PURE__ */ n(q.Title, { as: "p", children: r("calendarWorkspace.details.readOnlyTitle") }),
|
|
861
|
+
/* @__PURE__ */ n(q.Description, { children: r(a("readOnlyBody")) })
|
|
862
|
+
] }), _e = d.saving || d.deleting, Je = () => {
|
|
863
|
+
c.isBusy() || ae();
|
|
864
|
+
}, kt = /* @__PURE__ */ n(
|
|
865
|
+
We,
|
|
866
|
+
{
|
|
867
|
+
size: "sm",
|
|
868
|
+
intent: "outline",
|
|
869
|
+
icon: /* @__PURE__ */ n(Xt, { "aria-hidden": "true" }),
|
|
870
|
+
"aria-label": r(a("cancel")),
|
|
871
|
+
tooltip: r(a("cancel")),
|
|
872
|
+
"data-action": "cancel-task",
|
|
873
|
+
disabled: _e,
|
|
874
|
+
onClick: Je
|
|
875
|
+
}
|
|
876
|
+
), ze = d.saving || d.accepted, Ze = (t) => /* @__PURE__ */ k(Ne, { children: [
|
|
877
|
+
t && c.showDelete ? /* @__PURE__ */ n(
|
|
878
|
+
We,
|
|
879
|
+
{
|
|
880
|
+
ref: Se,
|
|
881
|
+
size: "sm",
|
|
882
|
+
intent: "destructiveOutline",
|
|
883
|
+
icon: /* @__PURE__ */ n(dt, { "aria-hidden": "true" }),
|
|
884
|
+
"aria-label": r(a("delete")),
|
|
885
|
+
tooltip: r(a("delete")),
|
|
886
|
+
"data-action": "delete-task",
|
|
887
|
+
disabled: _e || d.accepted,
|
|
888
|
+
onClick: () => c.patchUi({ confirmDeleteOpen: !0, deleteError: void 0 })
|
|
889
|
+
}
|
|
890
|
+
) : null,
|
|
891
|
+
/* @__PURE__ */ k(
|
|
892
|
+
Ft,
|
|
893
|
+
{
|
|
894
|
+
role: "toolbar",
|
|
895
|
+
"aria-label": r(a("actionsLabel")),
|
|
896
|
+
className: "ds:ms-auto",
|
|
897
|
+
children: [
|
|
898
|
+
kt,
|
|
899
|
+
t && c.showSave ? /* @__PURE__ */ n(
|
|
900
|
+
We,
|
|
901
|
+
{
|
|
902
|
+
size: "sm",
|
|
903
|
+
intent: "primary",
|
|
904
|
+
icon: d.saving ? /* @__PURE__ */ n(
|
|
905
|
+
on,
|
|
906
|
+
{
|
|
907
|
+
"aria-hidden": "true",
|
|
908
|
+
className: "ds:animate-spin ds:motion-reduce:animate-none"
|
|
909
|
+
}
|
|
910
|
+
) : /* @__PURE__ */ n(sn, { "aria-hidden": "true" }),
|
|
911
|
+
"aria-label": r(a("save")),
|
|
912
|
+
tooltip: r(a("save")),
|
|
913
|
+
disabled: !ze && !c.canSave,
|
|
914
|
+
"aria-disabled": ze || void 0,
|
|
915
|
+
"aria-busy": d.saving || void 0,
|
|
916
|
+
"data-action": "save-task",
|
|
917
|
+
onClick: () => {
|
|
918
|
+
ze || c.submit();
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
) : null
|
|
922
|
+
]
|
|
923
|
+
}
|
|
924
|
+
),
|
|
925
|
+
t && c.showSave ? (
|
|
926
|
+
/* Out of flow, so it never moves the footer's two ends. */
|
|
927
|
+
/* @__PURE__ */ n("span", { role: "status", className: "ds:sr-only", children: d.saving ? r(a("saving")) : "" })
|
|
928
|
+
) : null
|
|
929
|
+
] }), St = /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
|
|
930
|
+
/* @__PURE__ */ n("span", { role: "status", className: "ds:sr-only", children: r("common.loading") }),
|
|
931
|
+
/* @__PURE__ */ k(
|
|
932
|
+
"div",
|
|
933
|
+
{
|
|
934
|
+
"aria-hidden": "true",
|
|
935
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
936
|
+
children: [
|
|
937
|
+
/* @__PURE__ */ n(
|
|
938
|
+
He,
|
|
939
|
+
{
|
|
940
|
+
variant: "rounded",
|
|
941
|
+
height: "calc(var(--spacing-xl) + var(--spacing-sm))"
|
|
942
|
+
}
|
|
943
|
+
),
|
|
944
|
+
/* @__PURE__ */ n(
|
|
945
|
+
He,
|
|
946
|
+
{
|
|
947
|
+
variant: "rounded",
|
|
948
|
+
height: "calc(var(--spacing-xl) * 3)",
|
|
949
|
+
stagger: 1
|
|
950
|
+
}
|
|
951
|
+
),
|
|
952
|
+
/* @__PURE__ */ n(
|
|
953
|
+
He,
|
|
954
|
+
{
|
|
955
|
+
variant: "rounded",
|
|
956
|
+
height: "calc(var(--spacing-xl) + var(--spacing-sm))",
|
|
957
|
+
stagger: 2
|
|
958
|
+
}
|
|
959
|
+
)
|
|
960
|
+
]
|
|
961
|
+
}
|
|
962
|
+
)
|
|
963
|
+
] }), Ct = /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
|
|
964
|
+
/* @__PURE__ */ n(q, { variant: "error", children: /* @__PURE__ */ n(q.Description, { children: c.loadError }) }),
|
|
965
|
+
/* @__PURE__ */ n(
|
|
966
|
+
Te,
|
|
967
|
+
{
|
|
968
|
+
ref: se,
|
|
969
|
+
intent: "outline",
|
|
970
|
+
"data-action": "retry-load",
|
|
971
|
+
onClick: Pe(c.retry),
|
|
972
|
+
children: r("emptyState.error.cta")
|
|
973
|
+
}
|
|
974
|
+
)
|
|
975
|
+
] }), Dt = /* @__PURE__ */ n("fieldset", { disabled: !0, className: mt({ layout: "notice" }), children: Xe }), Nt = () => l.about !== "patient" ? null : B ? /* @__PURE__ */ n(H, { label: r(a("aboutPatient")), children: /* @__PURE__ */ n(Me, { value: nn(), disabled: !0, readOnly: !0 }) }) : g ? /* @__PURE__ */ n(H, { label: r(a("aboutPatient")), children: /* @__PURE__ */ n(
|
|
976
|
+
dn,
|
|
977
|
+
{
|
|
978
|
+
value: l.patientId,
|
|
979
|
+
onValueChange: (t) => c.patchFields({ patientId: t }),
|
|
980
|
+
patients: J,
|
|
981
|
+
searchPatients: $,
|
|
982
|
+
selectedLabel: l.patientId ? y(l.patientId) : void 0,
|
|
983
|
+
placeholder: r("calendarWorkspace.editor.patientSearch"),
|
|
984
|
+
disabled: m
|
|
985
|
+
}
|
|
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
|
+
m ? Xe : null,
|
|
988
|
+
/* @__PURE__ */ n(H, { label: r(a("date")), children: /* @__PURE__ */ n(
|
|
989
|
+
Pt,
|
|
990
|
+
{
|
|
991
|
+
value: l.date,
|
|
992
|
+
onChange: (t) => c.patchFields({ date: t })
|
|
993
|
+
}
|
|
994
|
+
) }),
|
|
995
|
+
/* @__PURE__ */ n(H, { label: r(a("time")), children: /* @__PURE__ */ n(
|
|
996
|
+
_t,
|
|
997
|
+
{
|
|
998
|
+
value: l.time,
|
|
999
|
+
onChange: (t) => c.patchFields({ time: t })
|
|
1000
|
+
}
|
|
1001
|
+
) }),
|
|
1002
|
+
/* @__PURE__ */ n(
|
|
1003
|
+
H,
|
|
1004
|
+
{
|
|
1005
|
+
label: r(a("note")),
|
|
1006
|
+
required: !0,
|
|
1007
|
+
error: d.showError && l.note.trim() === "" ? r(a("noteRequired")) : void 0,
|
|
1008
|
+
children: /* @__PURE__ */ n(
|
|
1009
|
+
Vt,
|
|
1010
|
+
{
|
|
1011
|
+
value: l.note,
|
|
1012
|
+
onChange: (t) => {
|
|
1013
|
+
c.patchFields({ note: t.target.value }), c.patchUi({ showError: !1 });
|
|
1014
|
+
},
|
|
1015
|
+
minRows: 3,
|
|
1016
|
+
autoResize: !0
|
|
1017
|
+
}
|
|
1018
|
+
)
|
|
1019
|
+
}
|
|
1020
|
+
),
|
|
1021
|
+
T.length > 0 ? /* @__PURE__ */ n(H, { label: r(a("type")), required: !0, children: /* @__PURE__ */ n(
|
|
1022
|
+
Ke,
|
|
1023
|
+
{
|
|
1024
|
+
options: It,
|
|
1025
|
+
value: c.chosenTypeId,
|
|
1026
|
+
onValueChange: (t) => t && c.patchFields({ typeId: t })
|
|
1027
|
+
}
|
|
1028
|
+
) }) : null,
|
|
1029
|
+
A.length > 0 ? /* @__PURE__ */ n(H, { label: r(a("assignee")), children: /* @__PURE__ */ n(
|
|
1030
|
+
Ke,
|
|
1031
|
+
{
|
|
1032
|
+
options: wt,
|
|
1033
|
+
value: l.assigneeId,
|
|
1034
|
+
onValueChange: (t) => t && c.patchFields({ assigneeId: t })
|
|
1035
|
+
}
|
|
1036
|
+
) }) : null,
|
|
1037
|
+
/* @__PURE__ */ k(
|
|
1038
|
+
Mt,
|
|
1039
|
+
{
|
|
1040
|
+
label: r(a("about")),
|
|
1041
|
+
variant: "segmented",
|
|
1042
|
+
className: Wt,
|
|
1043
|
+
value: l.about,
|
|
1044
|
+
onValueChange: (t) => c.patchFields({ about: t }),
|
|
1045
|
+
children: [
|
|
1046
|
+
/* @__PURE__ */ n(
|
|
1047
|
+
je,
|
|
1048
|
+
{
|
|
1049
|
+
value: "nobody",
|
|
1050
|
+
label: r(a("aboutNobody")),
|
|
1051
|
+
icon: /* @__PURE__ */ n(Jt, { "aria-hidden": "true" })
|
|
1052
|
+
}
|
|
1053
|
+
),
|
|
1054
|
+
g || l.about === "patient" || h != null && h.patientId ? /* @__PURE__ */ n(
|
|
1055
|
+
je,
|
|
1056
|
+
{
|
|
1057
|
+
value: "patient",
|
|
1058
|
+
label: r(a("aboutPatient")),
|
|
1059
|
+
icon: /* @__PURE__ */ n(Zt, { "aria-hidden": "true" })
|
|
1060
|
+
}
|
|
1061
|
+
) : null,
|
|
1062
|
+
e || l.about === "company" || h != null && h.companyId ? /* @__PURE__ */ n(
|
|
1063
|
+
je,
|
|
1064
|
+
{
|
|
1065
|
+
value: "company",
|
|
1066
|
+
label: r(a("aboutCompany")),
|
|
1067
|
+
icon: /* @__PURE__ */ n(en, { "aria-hidden": "true" })
|
|
1068
|
+
}
|
|
1069
|
+
) : null,
|
|
1070
|
+
i || l.about === "operator" || h != null && h.operatorId ? /* @__PURE__ */ n(
|
|
1071
|
+
je,
|
|
1072
|
+
{
|
|
1073
|
+
value: "operator",
|
|
1074
|
+
label: r(a("aboutOperator")),
|
|
1075
|
+
icon: /* @__PURE__ */ n(tn, { "aria-hidden": "true" })
|
|
1076
|
+
}
|
|
1077
|
+
) : null
|
|
1078
|
+
]
|
|
1079
|
+
}
|
|
1080
|
+
),
|
|
1081
|
+
Nt(),
|
|
1082
|
+
l.about === "company" ? /* @__PURE__ */ k(Ne, { children: [
|
|
1083
|
+
ne ? /* @__PURE__ */ n(H, { label: r(a("companyName")), children: /* @__PURE__ */ n(Me, { value: Et, disabled: !0, readOnly: !0 }) }) : null,
|
|
1084
|
+
e ? /* @__PURE__ */ n(
|
|
1085
|
+
H,
|
|
1086
|
+
{
|
|
1087
|
+
label: r(
|
|
1088
|
+
a(ne ? "companyReplace" : "companyName")
|
|
1089
|
+
),
|
|
1090
|
+
children: /* @__PURE__ */ n(
|
|
1091
|
+
Qe,
|
|
1092
|
+
{
|
|
1093
|
+
options: p,
|
|
1094
|
+
value: ne ? "" : l.companyId,
|
|
1095
|
+
onValueChange: (t) => ne ? t && c.patchFields({ companyId: t }) : c.patchFields({ companyId: t }),
|
|
1096
|
+
clearable: !ne && !m,
|
|
1097
|
+
filter: gn,
|
|
1098
|
+
placeholder: r(a("companySearch")),
|
|
1099
|
+
"aria-label": r(
|
|
1100
|
+
a(ne ? "companyReplace" : "companyName")
|
|
1101
|
+
)
|
|
1102
|
+
}
|
|
1103
|
+
)
|
|
1104
|
+
}
|
|
1105
|
+
) : null
|
|
1106
|
+
] }) : null,
|
|
1107
|
+
l.about === "operator" ? i ? /* @__PURE__ */ n(H, { label: r(a("operator")), children: /* @__PURE__ */ n(
|
|
1108
|
+
Ke,
|
|
1109
|
+
{
|
|
1110
|
+
options: yt,
|
|
1111
|
+
value: l.operatorId,
|
|
1112
|
+
onValueChange: (t) => t && c.patchFields({ operatorId: t })
|
|
1113
|
+
}
|
|
1114
|
+
) }) : l.operatorId !== _ ? (
|
|
1115
|
+
/* No roster to pick from: name the link read-only. */
|
|
1116
|
+
/* @__PURE__ */ n(H, { label: r(a("operator")), children: /* @__PURE__ */ n(
|
|
1117
|
+
Me,
|
|
1118
|
+
{
|
|
1119
|
+
value: W(l.operatorId),
|
|
1120
|
+
disabled: !0,
|
|
1121
|
+
readOnly: !0
|
|
1122
|
+
}
|
|
1123
|
+
) })
|
|
1124
|
+
) : null : null,
|
|
1125
|
+
c.showDone ? /* @__PURE__ */ k(Ne, { children: [
|
|
1126
|
+
/* @__PURE__ */ n(
|
|
1127
|
+
qt,
|
|
1128
|
+
{
|
|
1129
|
+
label: r(a("done")),
|
|
1130
|
+
checked: d.done,
|
|
1131
|
+
disabled: _e || d.accepted,
|
|
1132
|
+
"aria-disabled": d.donePending || void 0,
|
|
1133
|
+
"aria-busy": d.donePending || void 0,
|
|
1134
|
+
className: "ds:aria-disabled:cursor-progress",
|
|
1135
|
+
onCheckedChange: (t) => {
|
|
1136
|
+
d.donePending || c.setDone(t);
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
),
|
|
1140
|
+
d.doneError ? /* @__PURE__ */ n(q, { variant: "error", children: /* @__PURE__ */ n(q.Description, { children: d.doneError }) }) : null
|
|
1141
|
+
] }) : null,
|
|
1142
|
+
d.saveError ? /* @__PURE__ */ n(q, { variant: "error", children: /* @__PURE__ */ n(q.Description, { children: d.saveError }) }) : null,
|
|
1143
|
+
d.deleteError && !d.confirmDeleteOpen ? /* @__PURE__ */ n(q, { variant: "error", children: /* @__PURE__ */ n(q.Description, { children: d.deleteError }) }) : null
|
|
1144
|
+
] }), tt = x === "loading" ? St : x === "error" ? Ct : x === "locked" ? Dt : x === "withheld" ? /* @__PURE__ */ n(
|
|
1145
|
+
Gt,
|
|
1146
|
+
{
|
|
1147
|
+
onTurnOff: ie ? Pe(ie) : void 0
|
|
1148
|
+
}
|
|
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
|
+
de,
|
|
1151
|
+
{
|
|
1152
|
+
open: d.confirmDeleteOpen && F,
|
|
1153
|
+
onOpenChange: (t) => {
|
|
1154
|
+
d.deleting || c.patchUi(
|
|
1155
|
+
t ? { confirmDeleteOpen: !0 } : { confirmDeleteOpen: !1, deleteError: void 0 }
|
|
1156
|
+
);
|
|
1157
|
+
},
|
|
1158
|
+
children: /* @__PURE__ */ k(
|
|
1159
|
+
de.Content,
|
|
1160
|
+
{
|
|
1161
|
+
size: "sm",
|
|
1162
|
+
variant: "alert",
|
|
1163
|
+
onCloseAutoFocus: (t) => {
|
|
1164
|
+
var b;
|
|
1165
|
+
t.preventDefault(), c.isAccepted() || (b = Se.current) == null || b.focus();
|
|
1166
|
+
},
|
|
1167
|
+
children: [
|
|
1168
|
+
/* @__PURE__ */ k(de.Header, { children: [
|
|
1169
|
+
/* @__PURE__ */ n(de.Title, { children: r(a("deleteConfirmTitle")) }),
|
|
1170
|
+
/* @__PURE__ */ n(de.Description, { children: r(a("deleteConfirmBody")) })
|
|
1171
|
+
] }),
|
|
1172
|
+
d.deleteError ? /* @__PURE__ */ n(de.Body, { children: /* @__PURE__ */ n(q, { variant: "error", children: /* @__PURE__ */ n(q.Description, { children: d.deleteError }) }) }) : null,
|
|
1173
|
+
/* @__PURE__ */ k(de.Footer, { divider: !0, children: [
|
|
1174
|
+
/* @__PURE__ */ n(de.Close, { asChild: !0, children: /* @__PURE__ */ n(Te, { intent: "outline", "aria-disabled": d.deleting || void 0, children: r(a("deleteCancel")) }) }),
|
|
1175
|
+
/* @__PURE__ */ n(
|
|
1176
|
+
Te,
|
|
1177
|
+
{
|
|
1178
|
+
intent: "destructive",
|
|
1179
|
+
startIcon: /* @__PURE__ */ n(dt, { "aria-hidden": "true" }),
|
|
1180
|
+
"aria-disabled": d.deleting || void 0,
|
|
1181
|
+
"aria-busy": d.deleting || void 0,
|
|
1182
|
+
onClick: () => {
|
|
1183
|
+
d.deleting || c.remove();
|
|
1184
|
+
},
|
|
1185
|
+
children: r(a("deleteConfirm"))
|
|
1186
|
+
}
|
|
1187
|
+
)
|
|
1188
|
+
] })
|
|
1189
|
+
]
|
|
1190
|
+
}
|
|
1191
|
+
)
|
|
1192
|
+
}
|
|
1193
|
+
) : null, ot = {
|
|
1194
|
+
"data-component": "task-editor",
|
|
1195
|
+
"data-component-id": fe,
|
|
1196
|
+
"data-variant": O,
|
|
1197
|
+
"data-status": x
|
|
1198
|
+
};
|
|
1199
|
+
return te ? /* @__PURE__ */ k(Ne, { children: [
|
|
1200
|
+
/* @__PURE__ */ n(
|
|
1201
|
+
jt,
|
|
1202
|
+
{
|
|
1203
|
+
...Ee,
|
|
1204
|
+
"data-component-id": fe,
|
|
1205
|
+
"data-variant": O,
|
|
1206
|
+
"data-status": x,
|
|
1207
|
+
ref: ye,
|
|
1208
|
+
open: R,
|
|
1209
|
+
onBack: Je,
|
|
1210
|
+
onExited: G,
|
|
1211
|
+
title: Ce,
|
|
1212
|
+
icon: /* @__PURE__ */ n(ct, { "aria-hidden": "true" }),
|
|
1213
|
+
backLabel: re ?? r(a("back")),
|
|
1214
|
+
footer: Le,
|
|
1215
|
+
footerAlign: Rt ? "between" : "end",
|
|
1216
|
+
className: Y,
|
|
1217
|
+
children: /* @__PURE__ */ n("div", { ...ot, className: pt({ variant: O }), children: tt })
|
|
1218
|
+
}
|
|
1219
|
+
),
|
|
1220
|
+
nt
|
|
1221
|
+
] }) : /* @__PURE__ */ k(Ne, { children: [
|
|
1222
|
+
/* @__PURE__ */ k(
|
|
1223
|
+
"div",
|
|
1224
|
+
{
|
|
1225
|
+
tabIndex: -1,
|
|
1226
|
+
...Ee,
|
|
1227
|
+
...ot,
|
|
1228
|
+
ref: ye,
|
|
1229
|
+
className: pt({ variant: O, className: Y }),
|
|
1230
|
+
children: [
|
|
1231
|
+
/* @__PURE__ */ n(
|
|
1232
|
+
Ot,
|
|
1233
|
+
{
|
|
1234
|
+
title: Ce,
|
|
1235
|
+
icon: /* @__PURE__ */ n(ct, { "aria-hidden": "true" }),
|
|
1236
|
+
sticky: !0,
|
|
1237
|
+
divider: !0
|
|
1238
|
+
}
|
|
1239
|
+
),
|
|
1240
|
+
tt,
|
|
1241
|
+
Le ? /* @__PURE__ */ n("div", { className: "ds:relative ds:z-[var(--z-sticky)] ds:shrink-0 ds:border-t ds:border-[color:var(--border)] ds:bg-[var(--background)]", children: /* @__PURE__ */ n("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: Le }) }) : null
|
|
1242
|
+
]
|
|
1243
|
+
}
|
|
1244
|
+
),
|
|
1245
|
+
nt
|
|
1246
|
+
] });
|
|
1247
|
+
}
|
|
1248
|
+
);
|
|
1249
|
+
yn.displayName = "TaskEditor";
|
|
1250
|
+
export {
|
|
1251
|
+
dn as P,
|
|
1252
|
+
sn as S,
|
|
1253
|
+
yn as T,
|
|
1254
|
+
un as t
|
|
1255
|
+
};
|
|
1256
|
+
//# sourceMappingURL=task-editor-CVRrDqpe.js.map
|