@alfadocs/ui-kit 1.149.1 → 1.151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{address-autocomplete-_LeOFdM7.js → address-autocomplete-Bt1nwxyn.js} +2 -2
- package/dist/_chunks/{address-fields-C4khof4C.js → address-fields-COumFRSX.js} +2 -2
- package/dist/_chunks/{agenda-tray-NgxPuAAz.js → agenda-tray-CmfcYQhc.js} +2 -2
- package/dist/_chunks/{ai-summary-panel-Cdsve-XN.js → ai-summary-panel-DyAHCqaj.js} +4 -4
- package/dist/_chunks/{alia-sidebar-Bjuxk8mU.js → alia-sidebar-BqZjnVoF.js} +2 -2
- package/dist/_chunks/{anamnesis-card-G0qzw0Oi.js → anamnesis-card-CoiG7vDj.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-QCv6zW-J.js → anamnesis-summary-rows-CFpaA1GP.js} +4 -4
- package/dist/_chunks/{app-frame-DUPEwu4E.js → app-frame-XEjLsLGY.js} +2 -2
- package/dist/_chunks/{appointment-card-HOZrABrQ.js → appointment-card-BPZggqck.js} +2 -2
- package/dist/_chunks/{appointment-details-panel.history-BxNqcA-r.js → appointment-details-panel.history-FSsTXj1t.js} +84 -71
- package/dist/_chunks/{appointment-details-panel.identity--_j07UG1.js → appointment-details-panel.identity-9hRo85Lx.js} +91 -79
- package/dist/_chunks/appointment-peek-CmQM4wvx.js +223 -0
- package/dist/_chunks/{appointment-timeline-CuZW-CGT.js → appointment-timeline-COfoHpoJ.js} +4 -4
- package/dist/_chunks/{appointment-tray-CFCxukwq.js → appointment-tray-BlKwDJKi.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-BPz9bQAB.js → balance-badge-cell-OghXENKK.js} +4 -4
- package/dist/_chunks/{bill-line-table-B8Cc2pTH.js → bill-line-table-DxV5_Dmq.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-fQleWmJE.js → calendar-appointment-editor-dialog-BPAfWtm9.js} +590 -583
- package/dist/_chunks/{calendar-editor-discard-host-DWS_kM-a.js → calendar-editor-discard-host-BudLsUZO.js} +5 -5
- package/dist/_chunks/{calendar-waiting-list-panel-BKBHfBpn.js → calendar-waiting-list-panel-DukgSOPH.js} +9 -9
- package/dist/_chunks/{calendar-workspace.model-4zmA3BFE.js → calendar-workspace.model-BulUpy0I.js} +2 -2
- package/dist/_chunks/{calendar.sheets-lgAqJB34.js → calendar.sheets-OmTiQdCg.js} +11 -11
- package/dist/_chunks/{calls-panel-BTTfHnPD.js → calls-panel-eohONLia.js} +5 -5
- package/dist/_chunks/{care-plan-card-2U2LuIJD.js → care-plan-card-DJXNWjKB.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-CUAlQv1c.js → care-plan-entry-card-W5QvNv8m.js} +2 -2
- package/dist/_chunks/code-BfU9G1ZM.js +15 -0
- package/dist/_chunks/{communications-panel-DDzUyoHi.js → communications-panel-CqiFs8BH.js} +4 -4
- package/dist/_chunks/{connection-status-Bi6KPTlh.js → connection-status-C13KmOPL.js} +2 -2
- package/dist/_chunks/control-room-rail-BmpTKtL1.js +456 -0
- package/dist/_chunks/{data-grid-CkzbCZSo.js → data-grid-DTAwrOiq.js} +3 -3
- package/dist/_chunks/{data-table-DFAYYsSc.js → data-table-CgpHO6EZ.js} +2 -2
- package/dist/_chunks/{default-tabs-C45FVzsG.js → default-tabs-CZaDDf1G.js} +4 -4
- package/dist/_chunks/{description-list-DA4TgL_I.js → description-list-DaldSpGy.js} +29 -26
- package/dist/_chunks/dev-bypass-button-DFcNpCQj.js +24 -0
- package/dist/_chunks/{document-preview-oSuJsJ3k.js → document-preview-TbwhY_eK.js} +4 -4
- package/dist/_chunks/{editable-currency-cell-renderer-DXJI0fnU.js → editable-currency-cell-renderer-a3CrwNKm.js} +143 -168
- package/dist/_chunks/{editable-description-BsSjLnSx.js → editable-description-B2F54K4T.js} +34 -33
- package/dist/_chunks/{empty-state-5REM7oDM.js → empty-state-qHtpcasr.js} +65 -77
- package/dist/_chunks/{entity-summary-CZmGcWi2.js → entity-summary-BNnTP1F6.js} +62 -50
- package/dist/_chunks/{error-boundary-BQ5mRqEd.js → error-boundary-BDS1XStO.js} +2 -2
- package/dist/_chunks/{error-page-CdNGIezW.js → error-page-3gWV-Vmj.js} +2 -2
- package/dist/_chunks/{error-page-illustration-BdJLuMdV.js → error-page-illustration-CJCjLk_-.js} +125 -149
- package/dist/_chunks/{face-scheme-BC2whb1S.js → face-scheme-DRYGaszs.js} +255 -264
- package/dist/_chunks/feature-preview-switch-B_8JTya_.js +75 -0
- package/dist/_chunks/{file-manager-Cp3Z4VvM.js → file-manager-DMvYx-Gq.js} +165 -180
- package/dist/_chunks/folder-DvNxod7_.js +36 -0
- package/dist/_chunks/{heatmap-DvsZ-mcL.js → heatmap-BZNkPkDD.js} +4 -4
- package/dist/_chunks/{help-me-write-templates-DlA54nu5.js → help-me-write-templates-VnvlK87x.js} +3 -3
- package/dist/_chunks/{info-tip-cCppV1fD.js → info-tip-DkVISvo-.js} +2 -2
- package/dist/_chunks/{invoice-upload-list-BReimsvV.js → invoice-upload-list-DutydbjC.js} +3 -3
- package/dist/_chunks/{link-cell-renderer-CWLArl5e.js → link-cell-renderer-DTunki79.js} +3 -3
- package/dist/_chunks/{login-dev-card-DqUNJcd7.js → login-dev-card-CQz9yhrU.js} +2 -2
- package/dist/_chunks/{map-view-n6GiDRWM.js → map-view-B67HXWPR.js} +2 -2
- package/dist/_chunks/mark-adrift-LBqHvZwv.js +42 -0
- package/dist/_chunks/{marketplace-app-shell-CGA-R-zt.js → marketplace-app-shell-CclaaAvb.js} +3 -3
- package/dist/_chunks/message-square-warning-DsGGfd0K.js +22 -0
- package/dist/_chunks/{message-tray-Dx2HPcKB.js → message-tray-DysT-DPS.js} +2 -2
- package/dist/_chunks/{note-timeline-BbjHMhkL.js → note-timeline-CS5j2OKD.js} +86 -77
- package/dist/_chunks/notebook-text-spVSekMN.js +21 -0
- package/dist/_chunks/{notes-panel-Cw06dLDm.js → notes-panel-d0I3hOEY.js} +363 -341
- package/dist/_chunks/{notification-tray-BnC5OItw.js → notification-tray-CjGDlwLg.js} +2 -2
- package/dist/_chunks/{optical-prescription-DZvauMiM.js → optical-prescription-CAnXavjq.js} +3 -3
- package/dist/_chunks/{panel-header-CbtlTe85.js → panel-header-DTc5OFUg.js} +78 -66
- package/dist/_chunks/panel-right-CnMHSvLU.js +15 -0
- package/dist/_chunks/{panel-subview-DjBwNV16.js → panel-subview-B5hnQwfQ.js} +3 -3
- package/dist/_chunks/{patient-account-settings-Do0QbDJe.js → patient-account-settings-DQx_9CYV.js} +3 -3
- package/dist/_chunks/{patient-check-in-resume-Bxy1_Pfo.js → patient-check-in-resume-BOHcm9hT.js} +6 -6
- package/dist/_chunks/{patient-details-Cj3dp9GB.js → patient-details-wFIzTz7N.js} +4 -4
- package/dist/_chunks/{patient-field-row-DDjsUsc_.js → patient-field-row-BDgfYLgz.js} +202 -201
- package/dist/_chunks/{patient-summary-card-roM9Esfb.js → patient-summary-card-ZunOre3Q.js} +158 -164
- package/dist/_chunks/{payment-request-card-C9VglWsV.js → payment-request-card-BSSfKrcc.js} +3 -3
- package/dist/_chunks/{portal-details-CKF4yFHs.js → portal-details-R-lwrisO.js} +4 -4
- package/dist/_chunks/{portal-documents-DvpAwmSI.js → portal-documents-C6XlWpEl.js} +3 -3
- package/dist/_chunks/{portal-parts-Cvu4PfIY.js → portal-parts-DlvSUZFX.js} +3 -3
- package/dist/_chunks/{practice-results-D0TAgL8v.js → practice-results-CqoB5YAv.js} +5 -5
- package/dist/_chunks/{prescription-history-CQuJmd4H.js → prescription-history-CxBM3gnm.js} +4 -4
- package/dist/_chunks/{privacy-mask-zVh0ntm0.js → privacy-mask-CaLBAxzj.js} +3 -3
- package/dist/_chunks/{product-hub-panel-NVpRuJeW.js → product-hub-panel-RJzrDcGp.js} +3 -3
- package/dist/_chunks/{public-header.agent-Dzo6ujrE.js → public-header.agent-B2CqVq4s.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-BUZPsuSP.js → radiograph-panel.agent-kgCmmgZk.js} +4 -4
- package/dist/_chunks/{registration-form-AtRCt8n5.js → registration-form-Dbe1sFZb.js} +2 -2
- package/dist/_chunks/{registry-connection-panel-ACOsXu3F.js → registry-connection-panel-BkPPA3Fj.js} +4 -4
- package/dist/_chunks/{reserved.agent-DjvapRF1.js → reserved.agent-C-sMq0pb.js} +5 -5
- package/dist/_chunks/{reviews-panel-Cw5ygAxs.js → reviews-panel-jIz5aP2X.js} +4 -4
- package/dist/_chunks/rich-text-editor-DTadvKa7.js +4716 -0
- package/dist/_chunks/{scroll-area-CY5SLYNw.js → scroll-area-RQtcKkHf.js} +84 -79
- package/dist/_chunks/{sheet-CZDjW9Q-.js → sheet-1LXzej6Q.js} +2 -2
- package/dist/_chunks/{sidebar-D5DFYN5K.js → sidebar-BV9JCgS4.js} +2 -2
- package/dist/_chunks/{signed-out-frame-CC25CgKo.js → signed-out-frame-CKA8SSbU.js} +2 -2
- package/dist/_chunks/{signing-end-screen-Bq6tkFE6.js → signing-end-screen-HXkalppf.js} +2 -2
- package/dist/_chunks/{slot-grid-khIpy8Gx.js → slot-grid-DdqeF6PW.js} +2 -2
- package/dist/_chunks/{sync-tray-BQD-HuA4.js → sync-tray-CSVGzuur.js} +2 -2
- package/dist/_chunks/{task-editor-C-4I2sBa.js → task-editor-aXjGMwYA.js} +6 -6
- package/dist/_chunks/{task-tray-CxxcGGgx.js → task-tray-C48Vq8nt.js} +2 -2
- package/dist/_chunks/{tasks-panel-BDPQPOP6.js → tasks-panel-BdxHb-fX.js} +3 -3
- package/dist/_chunks/text-area-DbxGkpzE.js +269 -0
- package/dist/_chunks/{tool-rail-DjPEiBa2.js → tool-rail-B4p6MmxA.js} +383 -363
- package/dist/_chunks/{toolbar-B9oh9XY9.js → toolbar-B2JJ_XDT.js} +2 -2
- package/dist/_chunks/tooth-chip-DOv925IH.js +41 -0
- package/dist/_chunks/{transaction-chip-CkYd-3ky.js → transaction-chip-6jToArJn.js} +45 -43
- package/dist/_chunks/{transcript-panel-Wr8e4Zgi.js → transcript-panel-Dc0fK4WO.js} +2 -2
- package/dist/_chunks/{treatment-receipt-BZzwvsnY.js → treatment-receipt-CZQV1NkJ.js} +59 -62
- package/dist/_chunks/use-appointment-details-read-BR3TQOHx.js +2091 -0
- package/dist/_chunks/user-round-DZxRG9zq.js +15 -0
- package/dist/_chunks/{week-availability-D0tTll4q.js → week-availability-D00rMjsX.js} +2 -2
- package/dist/_chunks/{workflow-map-F7OThorL.js → workflow-map-DLUTUZ27.js} +2 -2
- package/dist/agent-catalog.json +15 -1
- package/dist/appointment-editor-panel/index.js +4 -4
- package/dist/booking-tools-data/index.js +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/calendar-action-buttons/index.js +1 -1
- package/dist/components/_shared/appointment-format.d.ts +4 -0
- package/dist/components/_shared/mark-adrift.d.ts +12 -0
- package/dist/components/_shared/patient-field-row.d.ts +5 -1
- package/dist/components/_shared/safe-html.d.ts +6 -0
- package/dist/components/_shared/tooth-chip.d.ts +21 -0
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-summary-panel/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/app-frame/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +12 -2
- package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +3 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +12 -2
- package/dist/components/appointment-details-panel/description-length.d.ts +18 -0
- package/dist/components/appointment-details-panel/index.d.ts +1 -0
- package/dist/components/appointment-details-panel/index.js +7 -6
- package/dist/components/appointment-peek/appointment-peek.d.ts +45 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bill-line-table/index.js +1 -1
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calls-panel/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/communications-panel/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/control-room-rail/control-room-rail.d.ts +24 -0
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/data-table/index.js +3 -3
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/dev-bypass-button/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/editable-description/editable-description.d.ts +7 -0
- package/dist/components/editable-description/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/error-boundary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/feature-preview-switch/feature-preview-switch.d.ts +55 -0
- package/dist/components/feature-preview-switch/index.d.ts +2 -0
- package/dist/components/feature-preview-switch/index.js +5 -0
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/invoice-upload-list/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/note-timeline/note-timeline.d.ts +8 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +33 -2
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/panel-header/index.js +1 -1
- package/dist/components/panel-header/panel-header.d.ts +8 -0
- package/dist/components/panel-subview/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +9 -0
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/registry-connection-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +18 -5
- package/dist/components/rich-text-editor/index.d.ts +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/link-bar.d.ts +8 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +25 -3
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/scroll-area/scroll-area.d.ts +6 -0
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/sync-tray/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/text-area/index.js +1 -1
- package/dist/components/text-area/text-area.d.ts +15 -0
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tool-rail/tool-rail.d.ts +23 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +7 -0
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/treatment-receipt/index.js +1 -1
- package/dist/components/treatment-receipt/treatment-receipt.d.ts +6 -1
- package/dist/components/week-availability/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/find-free-slots-panel/index.js +1 -1
- package/dist/host-compat.css +4 -1
- package/dist/host-legacy.css +63 -4
- package/dist/i18n/locales/ar.d.ts +18 -0
- package/dist/i18n/locales/ar.js +18 -3
- package/dist/i18n/locales/de.d.ts +18 -0
- package/dist/i18n/locales/de.js +18 -3
- package/dist/i18n/locales/el.d.ts +18 -0
- package/dist/i18n/locales/el.js +21 -3
- package/dist/i18n/locales/en.d.ts +18 -0
- package/dist/i18n/locales/en.js +21 -3
- package/dist/i18n/locales/es.d.ts +18 -0
- package/dist/i18n/locales/es.js +21 -3
- package/dist/i18n/locales/fr.d.ts +18 -0
- package/dist/i18n/locales/fr.js +21 -3
- package/dist/i18n/locales/hi.d.ts +18 -0
- package/dist/i18n/locales/hi.js +18 -3
- package/dist/i18n/locales/it.d.ts +28 -10
- package/dist/i18n/locales/it.js +31 -13
- package/dist/i18n/locales/ja.d.ts +18 -0
- package/dist/i18n/locales/ja.js +18 -3
- package/dist/i18n/locales/nl.d.ts +18 -0
- package/dist/i18n/locales/nl.js +18 -3
- package/dist/i18n/locales/pl.d.ts +18 -0
- package/dist/i18n/locales/pl.js +21 -3
- package/dist/i18n/locales/pt.d.ts +18 -0
- package/dist/i18n/locales/pt.js +21 -3
- package/dist/i18n/locales/ro.d.ts +18 -0
- package/dist/i18n/locales/ro.js +21 -3
- package/dist/i18n/locales/ru.d.ts +18 -0
- package/dist/i18n/locales/ru.js +18 -3
- package/dist/i18n/locales/sq.d.ts +18 -0
- package/dist/i18n/locales/sq.js +21 -3
- package/dist/i18n/locales/sv.d.ts +18 -0
- package/dist/i18n/locales/sv.js +18 -3
- package/dist/i18n/locales/tr.d.ts +18 -0
- package/dist/i18n/locales/tr.js +18 -3
- package/dist/i18n/locales/zh.d.ts +18 -0
- package/dist/i18n/locales/zh.js +18 -3
- package/dist/index.js +820 -817
- package/dist/locales/ar.json +21 -3
- package/dist/locales/de.json +21 -3
- package/dist/locales/el.json +21 -3
- package/dist/locales/en.json +21 -3
- package/dist/locales/es.json +21 -3
- package/dist/locales/fr.json +21 -3
- package/dist/locales/hi.json +21 -3
- package/dist/locales/it.json +31 -13
- package/dist/locales/ja.json +21 -3
- package/dist/locales/nl.json +21 -3
- package/dist/locales/pl.json +21 -3
- package/dist/locales/pt.json +21 -3
- package/dist/locales/ro.json +21 -3
- package/dist/locales/ru.json +21 -3
- package/dist/locales/sq.json +21 -3
- package/dist/locales/sv.json +21 -3
- package/dist/locales/tr.json +21 -3
- package/dist/locales/zh.json +21 -3
- package/dist/online-bookings-panel/index.js +2 -2
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +4 -4
- package/dist/patterns/error-page/index.js +2 -2
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-account-settings/index.js +1 -1
- package/dist/patterns/patient-check-in/index.js +1 -1
- package/dist/patterns/patient-portal/index.js +2 -2
- package/dist/patterns/prescription/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/patterns/signing/index.js +1 -1
- package/dist/redactor.css +9 -0
- package/dist/safe-html/index.js +33 -19
- package/dist/tokens.css +61 -52
- package/dist/waiting-list-panel/index.js +3 -3
- package/package.json +5 -1
- package/dist/_chunks/appointment-peek-B3raO90X.js +0 -123
- package/dist/_chunks/contact-round-DiSvB3LP.js +0 -18
- package/dist/_chunks/control-room-rail-BQvaYowi.js +0 -416
- package/dist/_chunks/dev-bypass-button-BzfYGPuf.js +0 -33
- package/dist/_chunks/folder-BghC8_S2.js +0 -20
- package/dist/_chunks/rich-text-editor-eGdYDPK2.js +0 -4405
- package/dist/_chunks/text-area-COMVJ1yE.js +0 -258
- package/dist/_chunks/use-appointment-details-read-Bl1DHXQ2.js +0 -1998
- /package/dist/{patterns → components}/_shared/mark-pieces.d.ts +0 -0
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { g as
|
|
6
|
-
import { useSaveOutcomeUnknownMessage as
|
|
7
|
-
import { h as
|
|
8
|
-
import { u as
|
|
9
|
-
import { C as
|
|
10
|
-
import { R as
|
|
11
|
-
import { T as
|
|
1
|
+
import { jsxs as y, jsx as a, Fragment as Kn } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Un, useRef as u, useState as T, useId as Pt, useEffect as S, useCallback as W, useMemo as xt, useImperativeHandle as In } from "react";
|
|
3
|
+
import { c as jt } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as Yn } from "react-i18next";
|
|
5
|
+
import { g as Tt } from "./get-error-message-DbFUzuja.js";
|
|
6
|
+
import { useSaveOutcomeUnknownMessage as Gn, isSaveOutcomeUnknownError as He } from "../save-outcome/index.js";
|
|
7
|
+
import { h as Vt } from "./handled-rejection-C-6Dq0As.js";
|
|
8
|
+
import { u as Jn } from "./registry-DvAUVLHh.js";
|
|
9
|
+
import { C as Qn } from "./clinical-note-card-D-9xmRpf.js";
|
|
10
|
+
import { R as Xn } from "./rich-text-editor-DTadvKa7.js";
|
|
11
|
+
import { T as Zn } from "./text-area-DbxGkpzE.js";
|
|
12
12
|
import { A } from "./alert-C4WKViaS.js";
|
|
13
13
|
import { B as re } from "./button-Dp4j9ygh.js";
|
|
14
|
-
import { I as
|
|
15
|
-
import { S as
|
|
16
|
-
import { T as
|
|
17
|
-
import { C as
|
|
18
|
-
import { C as
|
|
14
|
+
import { I as St } from "./icon-button-u9VMQn3x.js";
|
|
15
|
+
import { S as er } from "./switch-DO6uC4HJ.js";
|
|
16
|
+
import { T as tr } from "./tooltip-uEBdD1-5.js";
|
|
17
|
+
import { C as Ct } from "./card-n6W6LW-N.js";
|
|
18
|
+
import { C as nr, S as be } from "./skeleton-tTWJpvAq.js";
|
|
19
19
|
import { D as L } from "./dialog-239Geb7Z.js";
|
|
20
|
-
import { P as
|
|
21
|
-
import {
|
|
22
|
-
import { u as
|
|
23
|
-
import { u as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
|
|
20
|
+
import { P as rr } from "./panel-header-DTc5OFUg.js";
|
|
21
|
+
import { P as sr } from "./patient-summary-card-ZunOre3Q.js";
|
|
22
|
+
import { a as ar, u as ir, R as lr } from "./use-list-reflow-C7O4Uqnl.js";
|
|
23
|
+
import { u as or } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
24
|
+
import { u as dr } from "./use-resolved-theme-B0f1_oyq.js";
|
|
25
|
+
import { N as cr } from "./notebook-pen-CO7HoM-W.js";
|
|
26
|
+
import { P as ur } from "./pencil-B1sKKyuT.js";
|
|
27
|
+
import { T as fr } from "./trash-2-uumy3fy1.js";
|
|
28
|
+
const gr = {
|
|
28
29
|
id: "notes-panel",
|
|
29
30
|
// 'submit' backs add_note (compose + commit a note). pin / flag are toggles
|
|
30
31
|
// with no dedicated capability in the closed vocabulary.
|
|
@@ -139,7 +140,7 @@ const ar = {
|
|
|
139
140
|
description: "Stable note id on each rendered note row. Row controls carry data-note-action: edit, delete, pin or flag."
|
|
140
141
|
}
|
|
141
142
|
}
|
|
142
|
-
},
|
|
143
|
+
}, hr = "ds:isolate ds:[&_[data-component=card]>*]:relative ds:[&_[data-component=card]>*]:z-[1]", pr = jt(
|
|
143
144
|
"ds:relative ds:flex ds:flex-col ds:rounded-[var(--radius-lg)]",
|
|
144
145
|
{
|
|
145
146
|
variants: {
|
|
@@ -147,11 +148,11 @@ const ar = {
|
|
|
147
148
|
true: "ds:focus:outline-[length:var(--focus-ring-width)] ds:focus:outline-solid ds:focus:outline-[color:var(--ring)] ds:focus:outline-offset-[length:var(--focus-ring-offset)]",
|
|
148
149
|
false: ""
|
|
149
150
|
},
|
|
150
|
-
washed: { true:
|
|
151
|
+
washed: { true: hr, false: "" }
|
|
151
152
|
},
|
|
152
153
|
defaultVariants: { current: !1, washed: !1 }
|
|
153
154
|
}
|
|
154
|
-
),
|
|
155
|
+
), Et = jt(
|
|
155
156
|
"ds:pointer-events-none ds:absolute ds:inset-0 ds:rounded-[var(--radius-lg)] ds:bg-[color:var(--accent)]",
|
|
156
157
|
{
|
|
157
158
|
variants: {
|
|
@@ -167,39 +168,39 @@ const ar = {
|
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
|
-
),
|
|
171
|
+
), Lt = [
|
|
171
172
|
"ds:rounded-[var(--radius-lg)] ds:outline-none",
|
|
172
173
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
173
174
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
174
|
-
].join(" "),
|
|
175
|
+
].join(" "), mr = ["ds:flex ds:flex-col", Lt].join(" "), vr = "ds:opacity-0", wr = [
|
|
175
176
|
"ds:transition-opacity ds:duration-[var(--animation-duration)]",
|
|
176
177
|
"ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
|
|
177
|
-
].join(" "),
|
|
178
|
-
function
|
|
178
|
+
].join(" "), yr = [3, 2, 3];
|
|
179
|
+
function Rt(o) {
|
|
179
180
|
return o ? /<img\b/i.test(o) ? !0 : o.replace(/<[^>]*>/g, "").replace(/ /gi, " ").trim().length > 0 : !1;
|
|
180
181
|
}
|
|
181
|
-
function
|
|
182
|
-
const v = o == null ? void 0 : o.toggle(f,
|
|
183
|
-
return w === void 0 ? v == null ? void 0 : v.result :
|
|
182
|
+
function kt(o, f, b) {
|
|
183
|
+
const v = o == null ? void 0 : o.toggle(f, b), w = v ? v.refusal : "the panel is not mounted";
|
|
184
|
+
return w === void 0 ? v == null ? void 0 : v.result : Vt(new Error(`NotesPanel: ${b} refused (${w}).`));
|
|
184
185
|
}
|
|
185
|
-
const
|
|
186
|
-
function
|
|
186
|
+
const Nt = /* @__PURE__ */ new Map(), At = /* @__PURE__ */ new Set();
|
|
187
|
+
function Pe(o) {
|
|
187
188
|
return o.map(
|
|
188
189
|
(f) => `${f.id ?? ""}:${f.pinned ? 1 : 0}${f.flagged ? 1 : 0}${f.deleted ? 1 : 0}`
|
|
189
190
|
).join("|");
|
|
190
191
|
}
|
|
191
|
-
function
|
|
192
|
+
function Ft(o) {
|
|
192
193
|
return typeof (o == null ? void 0 : o.then) == "function";
|
|
193
194
|
}
|
|
194
|
-
function
|
|
195
|
-
const v = o.indexOf(
|
|
195
|
+
function Ot(o, f, b) {
|
|
196
|
+
const v = o.indexOf(b);
|
|
196
197
|
if (v >= 0) return v;
|
|
197
|
-
const w = f.indexOf(
|
|
198
|
+
const w = f.indexOf(b);
|
|
198
199
|
if (w < 0) return -1;
|
|
199
200
|
const se = new Set(o);
|
|
200
201
|
return f.slice(0, w).filter((C) => se.has(C)).length;
|
|
201
202
|
}
|
|
202
|
-
function
|
|
203
|
+
function br(o) {
|
|
203
204
|
if (o.hasAttribute("tabindex")) {
|
|
204
205
|
o.focus();
|
|
205
206
|
return;
|
|
@@ -207,132 +208,137 @@ function fr(o) {
|
|
|
207
208
|
const f = () => o.removeAttribute("tabindex");
|
|
208
209
|
o.setAttribute("tabindex", "-1"), o.focus(), document.activeElement === o ? o.addEventListener("blur", f, { once: !0 }) : f();
|
|
209
210
|
}
|
|
210
|
-
const
|
|
211
|
+
const Yr = Un(
|
|
211
212
|
function({
|
|
212
213
|
id: f,
|
|
213
|
-
notes:
|
|
214
|
+
notes: b,
|
|
214
215
|
onAddNote: v,
|
|
215
216
|
status: w = "ready",
|
|
216
217
|
onRetry: se,
|
|
217
218
|
currentNoteId: C,
|
|
218
|
-
currentNoteKey:
|
|
219
|
+
currentNoteKey: We,
|
|
219
220
|
composer: F = "rich",
|
|
220
|
-
editorToolbar:
|
|
221
|
-
redactor:
|
|
222
|
-
imageUploadUrl:
|
|
223
|
-
|
|
221
|
+
editorToolbar: qt = "standard",
|
|
222
|
+
redactor: Dt,
|
|
223
|
+
imageUploadUrl: _t,
|
|
224
|
+
editorPlugins: Mt,
|
|
225
|
+
editorTools: zt,
|
|
226
|
+
showClinicalToggle: Ht = !0,
|
|
224
227
|
canAddClinicalNote: ae = !0,
|
|
225
|
-
clinicalGatedReason:
|
|
228
|
+
clinicalGatedReason: Wt,
|
|
226
229
|
defaultClinical: $ = !1,
|
|
227
|
-
onRequestAiDraft:
|
|
228
|
-
aiDraftFormat:
|
|
229
|
-
aiPrivacyNotice:
|
|
230
|
-
onDictate:
|
|
231
|
-
onProofread:
|
|
232
|
-
onAutoFormat:
|
|
233
|
-
aiConsent:
|
|
234
|
-
variables:
|
|
235
|
-
validateVariable:
|
|
236
|
-
onVariableValidityChange:
|
|
237
|
-
renderHelpMeWrite:
|
|
238
|
-
aiTemplates:
|
|
239
|
-
onAiApplied:
|
|
240
|
-
onUploadImage:
|
|
241
|
-
onAiCreditsExhausted:
|
|
242
|
-
showExtensions:
|
|
243
|
-
aiCreditsNotice:
|
|
244
|
-
extensions:
|
|
245
|
-
extensionContext:
|
|
246
|
-
onExtensionRun:
|
|
247
|
-
composerBefore:
|
|
248
|
-
composerAfter:
|
|
249
|
-
onTogglePin:
|
|
250
|
-
onToggleFlag:
|
|
251
|
-
noteActions:
|
|
230
|
+
onRequestAiDraft: $t,
|
|
231
|
+
aiDraftFormat: Bt,
|
|
232
|
+
aiPrivacyNotice: Kt,
|
|
233
|
+
onDictate: Ut,
|
|
234
|
+
onProofread: It,
|
|
235
|
+
onAutoFormat: Yt,
|
|
236
|
+
aiConsent: Gt,
|
|
237
|
+
variables: Jt,
|
|
238
|
+
validateVariable: Qt,
|
|
239
|
+
onVariableValidityChange: Xt,
|
|
240
|
+
renderHelpMeWrite: Zt,
|
|
241
|
+
aiTemplates: en,
|
|
242
|
+
onAiApplied: tn,
|
|
243
|
+
onUploadImage: nn,
|
|
244
|
+
onAiCreditsExhausted: rn,
|
|
245
|
+
showExtensions: sn,
|
|
246
|
+
aiCreditsNotice: an,
|
|
247
|
+
extensions: ln,
|
|
248
|
+
extensionContext: on,
|
|
249
|
+
onExtensionRun: dn,
|
|
250
|
+
composerBefore: cn,
|
|
251
|
+
composerAfter: un,
|
|
252
|
+
onTogglePin: $e,
|
|
253
|
+
onToggleFlag: Be,
|
|
254
|
+
noteActions: Ke,
|
|
252
255
|
onEditNote: B,
|
|
253
|
-
editClinical:
|
|
256
|
+
editClinical: fn = !1,
|
|
254
257
|
onDeleteNote: K,
|
|
255
|
-
onWriteError:
|
|
256
|
-
confirmDelete:
|
|
257
|
-
title:
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
258
|
+
onWriteError: Ue,
|
|
259
|
+
confirmDelete: Ie = !0,
|
|
260
|
+
title: gn,
|
|
261
|
+
patientName: xe,
|
|
262
|
+
patientAvatarSrc: hn,
|
|
263
|
+
patientAction: pn,
|
|
264
|
+
composerPlaceholder: mn,
|
|
265
|
+
addNoteLabel: vn,
|
|
266
|
+
emptyState: wn,
|
|
267
|
+
className: yn,
|
|
268
|
+
"aria-label": Te,
|
|
269
|
+
...bn
|
|
270
|
+
}, Pn) {
|
|
271
|
+
var bt;
|
|
272
|
+
const { t: l, i18n: Ye } = Yn("ui"), Se = Gn(), q = u(null), [_, U] = T(""), [ie, le] = T($), [P, Ge] = T(!1), [I, oe] = T(null), [g, Ce] = T(null), Je = u(g);
|
|
273
|
+
Je.current = g;
|
|
274
|
+
const Qe = u(!1);
|
|
275
|
+
w === "loading" && (Qe.current = !0);
|
|
276
|
+
const xn = Qe.current ? nr : "", Tn = gn ?? l("notesPanel.title", { defaultValue: "Notes" }), Xe = Pt(), Ze = Pt(), de = (xe == null ? void 0 : xe.trim()) || void 0, et = mn ?? l("notesPanel.placeholder", { defaultValue: "Add a note…" }), tt = g !== null ? l("notesPanel.edit", { defaultValue: "Edit note" }) : l("notesPanel.composerLabel", { defaultValue: "New note" }), Sn = F === "rich" ? Rt(_) : _.trim().length > 0, E = u(b);
|
|
277
|
+
E.current = b;
|
|
278
|
+
const [Y, Cn] = T(Nt), R = u(Nt), [En, Rn] = T(At), G = u(At), O = u(!0);
|
|
273
279
|
S(() => (O.current = !0, () => {
|
|
274
280
|
O.current = !1;
|
|
275
281
|
}), []);
|
|
276
|
-
const j = u(null), D = u(
|
|
277
|
-
D.current =
|
|
278
|
-
const
|
|
282
|
+
const j = u(null), D = u(Ue);
|
|
283
|
+
D.current = Ue;
|
|
284
|
+
const Ee = W(() => {
|
|
279
285
|
const e = j.current;
|
|
280
286
|
return !O.current || !e || e.closest('[hidden],[inert],[aria-hidden="true"]') ? !1 : typeof e.checkVisibility == "function" ? e.checkVisibility() : !0;
|
|
281
|
-
}, []), J = u([]), [
|
|
287
|
+
}, []), J = u([]), [kn, Nn] = T(0), Re = W((e) => {
|
|
282
288
|
if (!O.current) {
|
|
283
289
|
e(!1);
|
|
284
290
|
return;
|
|
285
291
|
}
|
|
286
|
-
J.current.push(e),
|
|
292
|
+
J.current.push(e), Nn((t) => t + 1);
|
|
287
293
|
}, []);
|
|
288
294
|
S(() => {
|
|
289
295
|
const e = J.current;
|
|
290
296
|
J.current = [], e.forEach((t) => t(!0));
|
|
291
|
-
}, [
|
|
297
|
+
}, [kn]), S(
|
|
292
298
|
() => () => {
|
|
293
299
|
const e = J.current;
|
|
294
300
|
J.current = [], e.forEach((t) => t(!1));
|
|
295
301
|
},
|
|
296
302
|
[]
|
|
297
303
|
);
|
|
298
|
-
const
|
|
304
|
+
const nt = (e) => {
|
|
299
305
|
const t = new Map(R.current);
|
|
300
|
-
e(t), R.current = t,
|
|
301
|
-
},
|
|
306
|
+
e(t), R.current = t, Cn(t);
|
|
307
|
+
}, ke = (e) => {
|
|
302
308
|
const t = new Set(G.current);
|
|
303
|
-
e(t), G.current = t,
|
|
304
|
-
},
|
|
309
|
+
e(t), G.current = t, Rn(t);
|
|
310
|
+
}, ce = (e, t) => {
|
|
305
311
|
var n;
|
|
306
312
|
return (n = R.current.get(e)) == null ? void 0 : n[t];
|
|
307
|
-
}, Q = (e, t, n) =>
|
|
313
|
+
}, Q = (e, t, n) => nt((i) => {
|
|
308
314
|
const s = { ...i.get(e) };
|
|
309
315
|
n ? s[t] = n : delete s[t], Object.keys(s).length > 0 ? i.set(e, s) : i.delete(e);
|
|
310
|
-
}),
|
|
316
|
+
}), rt = (e) => {
|
|
311
317
|
var t;
|
|
312
318
|
return e != null && !!((t = R.current.get(e)) != null && t.delete);
|
|
313
|
-
},
|
|
319
|
+
}, An = W(() => {
|
|
314
320
|
var h;
|
|
315
321
|
if (!(g !== null ? B : v) || P) return;
|
|
316
322
|
const t = F === "rich", n = t ? ((h = q.current) == null ? void 0 : h.getHTML()) ?? _ : _.trim();
|
|
317
|
-
if (t ? !
|
|
323
|
+
if (t ? !Rt(n) : !n) return;
|
|
318
324
|
const i = () => {
|
|
319
325
|
var c;
|
|
320
|
-
t && ((c = q.current) == null || c.clear()), U(""), le($),
|
|
326
|
+
t && ((c = q.current) == null || c.clear()), U(""), le($), Ce(null);
|
|
321
327
|
};
|
|
322
328
|
oe(null);
|
|
323
|
-
const s = g, r = (c) =>
|
|
329
|
+
const s = g, r = (c) => Re((m) => {
|
|
324
330
|
var k;
|
|
325
|
-
const x = m && (s === null ||
|
|
331
|
+
const x = m && (s === null || Je.current === s && E.current.some((ne) => ne.id === s && !ne.deleted));
|
|
326
332
|
x && oe(
|
|
327
|
-
|
|
328
|
-
text:
|
|
333
|
+
He(c) ? { text: Se, unknown: !0 } : {
|
|
334
|
+
text: Tt(c, l("notesPanel.addFailed")),
|
|
329
335
|
unknown: !1
|
|
330
336
|
}
|
|
331
337
|
), (k = D.current) == null || k.call(D, {
|
|
332
338
|
kind: s !== null ? "edit" : "add",
|
|
333
339
|
noteId: s ?? void 0,
|
|
334
340
|
error: c,
|
|
335
|
-
shown: x &&
|
|
341
|
+
shown: x && Ee()
|
|
336
342
|
});
|
|
337
343
|
});
|
|
338
344
|
let d;
|
|
@@ -343,24 +349,24 @@ const Mr = _n(
|
|
|
343
349
|
return;
|
|
344
350
|
}
|
|
345
351
|
if (!d || typeof d.then != "function") return i();
|
|
346
|
-
|
|
352
|
+
Ge(!0), Promise.resolve(d).then(i, r).finally(() => Ge(!1));
|
|
347
353
|
}, [
|
|
348
354
|
F,
|
|
349
355
|
_,
|
|
350
356
|
ie,
|
|
351
357
|
$,
|
|
352
358
|
g,
|
|
353
|
-
|
|
359
|
+
Re,
|
|
354
360
|
v,
|
|
355
361
|
B,
|
|
356
|
-
|
|
362
|
+
Ee,
|
|
357
363
|
P,
|
|
358
|
-
|
|
364
|
+
Se,
|
|
359
365
|
l
|
|
360
|
-
]),
|
|
366
|
+
]), st = Ht && (g === null || fn), Fn = g !== null && !!((bt = Y.get(g)) != null && bt.delete), ue = W(
|
|
361
367
|
(e) => {
|
|
362
368
|
try {
|
|
363
|
-
return new Intl.DateTimeFormat(
|
|
369
|
+
return new Intl.DateTimeFormat(Ye.language, {
|
|
364
370
|
day: "numeric",
|
|
365
371
|
month: "long",
|
|
366
372
|
year: "numeric",
|
|
@@ -371,57 +377,57 @@ const Mr = _n(
|
|
|
371
377
|
return e.dateIso;
|
|
372
378
|
}
|
|
373
379
|
},
|
|
374
|
-
[
|
|
375
|
-
),
|
|
380
|
+
[Ye.language]
|
|
381
|
+
), On = W(
|
|
376
382
|
(e) => {
|
|
377
383
|
var n, i, s, r;
|
|
378
384
|
if (!e.id || P || (n = R.current.get(e.id)) != null && n.delete) return;
|
|
379
385
|
const t = e.content ?? "";
|
|
380
|
-
oe(null),
|
|
386
|
+
oe(null), Ce(e.id), le(e.clinical ?? !1), U(t), F === "rich" && ((i = q.current) == null || i.clear(), (s = q.current) == null || s.insertAtCursor(t, { asHtml: !0 })), (r = q.current) == null || r.focus();
|
|
381
387
|
},
|
|
382
388
|
[F, P]
|
|
383
|
-
),
|
|
389
|
+
), fe = W(() => {
|
|
384
390
|
var e;
|
|
385
|
-
F === "rich" && ((e = q.current) == null || e.clear()), U(""), le($), oe(null),
|
|
386
|
-
}, [F, $]),
|
|
391
|
+
F === "rich" && ((e = q.current) == null || e.clear()), U(""), le($), oe(null), Ce(null);
|
|
392
|
+
}, [F, $]), at = g === null || b.some((e) => e.id === g && !e.deleted);
|
|
387
393
|
S(() => {
|
|
388
|
-
|
|
389
|
-
}, [
|
|
390
|
-
const
|
|
394
|
+
at || fe();
|
|
395
|
+
}, [at, fe]);
|
|
396
|
+
const Ne = (e) => {
|
|
391
397
|
var t, n;
|
|
392
398
|
return (e.id ? (n = (t = Y.get(e.id)) == null ? void 0 : t.pin) == null ? void 0 : n.next : void 0) ?? !!e.pinned;
|
|
393
|
-
},
|
|
399
|
+
}, jn = (e) => {
|
|
394
400
|
var t, n;
|
|
395
401
|
return (e.id ? (n = (t = Y.get(e.id)) == null ? void 0 : t.flag) == null ? void 0 : n.next : void 0) ?? !!e.flagged;
|
|
396
|
-
}, M =
|
|
397
|
-
z.current =
|
|
402
|
+
}, M = b.filter((e) => !e.id || !En.has(e.id)).sort((e, t) => Number(Ne(t)) - Number(Ne(e))), it = M.flatMap((e) => e.id ? [e.id] : []), z = u([]);
|
|
403
|
+
z.current = it.filter(
|
|
398
404
|
(e) => {
|
|
399
405
|
var t;
|
|
400
406
|
return !((t = Y.get(e)) != null && t.delete);
|
|
401
407
|
}
|
|
402
408
|
);
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
const { isAccessible:
|
|
409
|
+
const Ae = u([]);
|
|
410
|
+
Ae.current = it;
|
|
411
|
+
const { isAccessible: Vn } = dr(j), lt = Vn || void 0, { containerRef: Ln } = ar({
|
|
406
412
|
key: M.map((e) => e.id).join(),
|
|
407
|
-
reduceMotion:
|
|
408
|
-
}),
|
|
409
|
-
|
|
410
|
-
},
|
|
411
|
-
const s =
|
|
412
|
-
|
|
413
|
+
reduceMotion: lt
|
|
414
|
+
}), ge = ir({ reduceMotion: lt }), [p, he] = T(null), ot = u(0), Fe = u(0), dt = () => {
|
|
415
|
+
Fe.current += 1, he(null);
|
|
416
|
+
}, pe = (e, t, n, i = !0) => {
|
|
417
|
+
const s = Fe.current;
|
|
418
|
+
Re((r) => {
|
|
413
419
|
var h;
|
|
414
|
-
const d = r && i && s ===
|
|
415
|
-
d && (
|
|
420
|
+
const d = r && i && s === Fe.current && Ee() && E.current.some((c) => c.id === t) && (e === "delete" || !rt(t) && !G.current.has(t));
|
|
421
|
+
d && (ot.current += 1, he({
|
|
416
422
|
kind: e,
|
|
417
423
|
noteId: t,
|
|
418
|
-
message:
|
|
419
|
-
unknown:
|
|
420
|
-
seq:
|
|
424
|
+
message: Tt(n, ""),
|
|
425
|
+
unknown: He(n),
|
|
426
|
+
seq: ot.current
|
|
421
427
|
})), (h = D.current) == null || h.call(D, { kind: e, noteId: t, error: n, shown: d });
|
|
422
428
|
});
|
|
423
|
-
},
|
|
424
|
-
const t =
|
|
429
|
+
}, qn = (e) => {
|
|
430
|
+
const t = b.find((i) => i.id === e.noteId), n = t != null && t.dateIso ? ue(t) : "";
|
|
425
431
|
if (n)
|
|
426
432
|
switch (e.kind) {
|
|
427
433
|
case "delete":
|
|
@@ -447,23 +453,23 @@ const Mr = _n(
|
|
|
447
453
|
default:
|
|
448
454
|
return l("notesPanel.unflagFailed");
|
|
449
455
|
}
|
|
450
|
-
},
|
|
451
|
-
p &&
|
|
452
|
-
p && !
|
|
453
|
-
}, [p,
|
|
454
|
-
const [
|
|
455
|
-
|
|
456
|
-
() =>
|
|
456
|
+
}, me = p !== null && b.some((e) => e.id === p.noteId), ct = u(null);
|
|
457
|
+
p && me && (ct.current = p), S(() => {
|
|
458
|
+
p && !me && he(null);
|
|
459
|
+
}, [p, me]);
|
|
460
|
+
const [Oe, ut] = T({ text: "", seq: 0 }), je = u(void 0), ft = (e) => {
|
|
461
|
+
ut((t) => ({ text: e, seq: t.seq + 1 })), window.clearTimeout(je.current), je.current = window.setTimeout(
|
|
462
|
+
() => ut((t) => ({ ...t, text: "" })),
|
|
457
463
|
1e3
|
|
458
464
|
);
|
|
459
465
|
};
|
|
460
|
-
S(() => () => window.clearTimeout(
|
|
461
|
-
const
|
|
466
|
+
S(() => () => window.clearTimeout(je.current), []);
|
|
467
|
+
const gt = () => ft(l("notesPanel.deleted")), ve = u(0), ht = u(w);
|
|
462
468
|
S(() => {
|
|
463
|
-
|
|
469
|
+
ht.current === "loading" && w === "ready" && (ve.current += 1), ht.current = w;
|
|
464
470
|
}, [w]);
|
|
465
|
-
const
|
|
466
|
-
const e = E.current, t =
|
|
471
|
+
const pt = () => {
|
|
472
|
+
const e = E.current, t = Pe(e), n = new Map(e.map((r) => [r.id, r])), i = [];
|
|
467
473
|
if (R.current.forEach((r, d) => {
|
|
468
474
|
const h = n.get(d);
|
|
469
475
|
Object.keys(r).forEach((c) => {
|
|
@@ -474,30 +480,30 @@ const Mr = _n(
|
|
|
474
480
|
return;
|
|
475
481
|
}
|
|
476
482
|
if (!m.settled) return;
|
|
477
|
-
const x = c === "delete" ? h.deleted === !0 : (c === "pin" ? !!h.pinned : !!h.flagged) === m.next, k =
|
|
483
|
+
const x = c === "delete" ? h.deleted === !0 : (c === "pin" ? !!h.pinned : !!h.flagged) === m.next, k = ve.current > m.edgeAtSettle || c !== "delete" && t !== m.sigAtSettle;
|
|
478
484
|
(x || k) && i.push([d, c]);
|
|
479
485
|
});
|
|
480
486
|
}), i.length === 0) return;
|
|
481
|
-
|
|
487
|
+
nt(
|
|
482
488
|
(r) => i.forEach(([d, h]) => {
|
|
483
489
|
const c = { ...r.get(d) };
|
|
484
490
|
delete c[h], Object.keys(c).length > 0 ? r.set(d, c) : r.delete(d);
|
|
485
491
|
})
|
|
486
492
|
);
|
|
487
493
|
const s = i.filter(([, r]) => r === "delete").map(([r]) => r);
|
|
488
|
-
s.some((r) => G.current.has(r)) &&
|
|
489
|
-
},
|
|
494
|
+
s.some((r) => G.current.has(r)) && ke((r) => s.forEach((d) => r.delete(d))), s.forEach((r) => ge.cancel(r));
|
|
495
|
+
}, Ve = (e, t, n) => ce(e, t) !== n ? !1 : (Q(e, t, {
|
|
490
496
|
...n,
|
|
491
497
|
settled: !0,
|
|
492
|
-
edgeAtSettle:
|
|
493
|
-
sigAtSettle:
|
|
494
|
-
}),
|
|
498
|
+
edgeAtSettle: ve.current,
|
|
499
|
+
sigAtSettle: Pe(E.current)
|
|
500
|
+
}), pt(), !0), mt = (e, t, n) => ce(e, t) !== n ? !1 : (Q(e, t, void 0), t !== "delete" || (G.current.has(e) && ke((i) => i.delete(e)), ge.cancel(e)), !0), Dn = xt(() => Pe(b), [b]);
|
|
495
501
|
S(() => {
|
|
496
|
-
|
|
497
|
-
}, [
|
|
498
|
-
const
|
|
502
|
+
pt();
|
|
503
|
+
}, [Dn, w]);
|
|
504
|
+
const Le = (e, t) => {
|
|
499
505
|
var k, ne;
|
|
500
|
-
const n = t === "pin" ?
|
|
506
|
+
const n = t === "pin" ? $e : Be, i = (N) => ({
|
|
501
507
|
started: !1,
|
|
502
508
|
refusal: N
|
|
503
509
|
});
|
|
@@ -515,14 +521,14 @@ const Mr = _n(
|
|
|
515
521
|
if (r != null && r[t])
|
|
516
522
|
return i(`a ${t} write for this note is still pending`);
|
|
517
523
|
const d = !(t === "pin" ? s.pinned : s.flagged), h = t === "pin" ? d ? "pin" : "unpin" : d ? "flag" : "unflag";
|
|
518
|
-
|
|
524
|
+
dt();
|
|
519
525
|
let c;
|
|
520
526
|
try {
|
|
521
527
|
c = n(e, d);
|
|
522
528
|
} catch (N) {
|
|
523
|
-
return
|
|
529
|
+
return pe(h, e, N), { started: !1, result: Vt(N) };
|
|
524
530
|
}
|
|
525
|
-
if (!
|
|
531
|
+
if (!Ft(c)) return { started: !0, result: c };
|
|
526
532
|
const m = {
|
|
527
533
|
next: d,
|
|
528
534
|
settled: !1,
|
|
@@ -533,95 +539,95 @@ const Mr = _n(
|
|
|
533
539
|
const x = Promise.resolve(c);
|
|
534
540
|
return x.then(
|
|
535
541
|
() => {
|
|
536
|
-
O.current &&
|
|
542
|
+
O.current && Ve(e, t, m);
|
|
537
543
|
},
|
|
538
544
|
(N) => {
|
|
539
|
-
const
|
|
540
|
-
|
|
545
|
+
const Bn = O.current && (He(N) ? Ve(e, t, m) : mt(e, t, m));
|
|
546
|
+
pe(h, e, N, Bn);
|
|
541
547
|
}
|
|
542
548
|
), { started: !0, result: x };
|
|
543
|
-
},
|
|
549
|
+
}, vt = (e) => {
|
|
544
550
|
var i;
|
|
545
551
|
if (!K) return !1;
|
|
546
552
|
const t = E.current.find((s) => s.id === e);
|
|
547
|
-
if (!t || t.deleted || ((i = t.actions) == null ? void 0 : i.delete) === !1 ||
|
|
548
|
-
|
|
553
|
+
if (!t || t.deleted || ((i = t.actions) == null ? void 0 : i.delete) === !1 || ce(e, "delete")) return !1;
|
|
554
|
+
dt();
|
|
549
555
|
let n;
|
|
550
556
|
try {
|
|
551
557
|
n = K(e);
|
|
552
558
|
} catch (s) {
|
|
553
|
-
return
|
|
559
|
+
return pe("delete", e, s), !1;
|
|
554
560
|
}
|
|
555
|
-
if (
|
|
561
|
+
if (Ft(n)) {
|
|
556
562
|
const s = {
|
|
557
563
|
settled: !1,
|
|
558
564
|
edgeAtSettle: 0,
|
|
559
565
|
sigAtSettle: ""
|
|
560
566
|
};
|
|
561
|
-
Q(e, "delete", s), t.keptOnDelete &&
|
|
562
|
-
t.dateIso ? l("notesPanel.deletingNamed", { date:
|
|
567
|
+
Q(e, "delete", s), t.keptOnDelete && ft(
|
|
568
|
+
t.dateIso ? l("notesPanel.deletingNamed", { date: ue(t) }) : l("notesPanel.deleting")
|
|
563
569
|
), Promise.resolve(n).then(
|
|
564
570
|
() => {
|
|
565
|
-
O.current && (
|
|
571
|
+
O.current && (gt(), Ve(e, "delete", s));
|
|
566
572
|
},
|
|
567
573
|
(r) => {
|
|
568
|
-
const d = O.current &&
|
|
569
|
-
|
|
574
|
+
const d = O.current && mt(e, "delete", s);
|
|
575
|
+
pe("delete", e, r, d);
|
|
570
576
|
}
|
|
571
577
|
);
|
|
572
578
|
} else
|
|
573
579
|
Q(e, "delete", {
|
|
574
580
|
settled: !0,
|
|
575
|
-
edgeAtSettle:
|
|
576
|
-
sigAtSettle:
|
|
577
|
-
}),
|
|
578
|
-
return t.keptOnDelete ||
|
|
579
|
-
|
|
581
|
+
edgeAtSettle: ve.current,
|
|
582
|
+
sigAtSettle: Pe(E.current)
|
|
583
|
+
}), gt();
|
|
584
|
+
return t.keptOnDelete || ge.leave(e, () => {
|
|
585
|
+
ce(e, "delete") && ke((s) => s.add(e));
|
|
580
586
|
}), !0;
|
|
581
|
-
}, [X, Z] = T(null),
|
|
582
|
-
if (!(!K ||
|
|
583
|
-
if (!
|
|
584
|
-
|
|
587
|
+
}, [X, Z] = T(null), we = u(null), _n = (e) => {
|
|
588
|
+
if (!(!K || rt(e)) && !(P && g === e)) {
|
|
589
|
+
if (!Ie) {
|
|
590
|
+
vt(e);
|
|
585
591
|
return;
|
|
586
592
|
}
|
|
587
|
-
|
|
593
|
+
we.current = { noteId: e, index: -1, started: !1 }, Z(e);
|
|
588
594
|
}
|
|
589
|
-
},
|
|
595
|
+
}, Mn = () => {
|
|
590
596
|
const e = X;
|
|
591
597
|
if (!e) return;
|
|
592
598
|
const t = z.current.indexOf(e);
|
|
593
|
-
|
|
594
|
-
},
|
|
599
|
+
vt(e) && (we.current = { noteId: e, index: t, started: !0 }), Z(null);
|
|
600
|
+
}, qe = X !== null && b.some((e) => e.id === X && !e.deleted);
|
|
595
601
|
S(() => {
|
|
596
|
-
X !== null && !
|
|
597
|
-
}, [X,
|
|
602
|
+
X !== null && !qe && Z(null);
|
|
603
|
+
}, [X, qe]), In(Pn, () => j.current, []);
|
|
598
604
|
const V = (e, t) => {
|
|
599
605
|
var n;
|
|
600
606
|
return e ? ((n = j.current) == null ? void 0 : n.querySelector(
|
|
601
607
|
`[data-note-id="${CSS.escape(e)}"] ${t ? `[data-note-action="${CSS.escape(t)}"]` : "[data-note-action]"}`
|
|
602
608
|
)) ?? null : null;
|
|
603
|
-
},
|
|
609
|
+
}, ye = (e, t) => {
|
|
604
610
|
const n = z.current;
|
|
605
611
|
return V(n[e], t) ?? V(n[e - 1], t) ?? V(n[e], null) ?? V(n[e - 1], null);
|
|
606
|
-
},
|
|
612
|
+
}, zn = () => {
|
|
607
613
|
const e = j.current, t = (e == null ? void 0 : e.querySelector("[data-notes-panel-empty]")) ?? e;
|
|
608
|
-
t &&
|
|
614
|
+
t && br(t);
|
|
609
615
|
}, ee = (e) => {
|
|
610
|
-
e ? e.focus() :
|
|
611
|
-
},
|
|
612
|
-
const t =
|
|
613
|
-
if (
|
|
616
|
+
e ? e.focus() : zn();
|
|
617
|
+
}, Hn = (e) => {
|
|
618
|
+
const t = we.current;
|
|
619
|
+
if (we.current = null, !t || e.defaultPrevented) return;
|
|
614
620
|
e.preventDefault();
|
|
615
621
|
const n = V(t.noteId, "delete");
|
|
616
622
|
ee(
|
|
617
|
-
t.started ?
|
|
623
|
+
t.started ? ye(t.index, "delete") ?? n : n
|
|
618
624
|
);
|
|
619
|
-
},
|
|
625
|
+
}, De = u(null), wt = (e) => {
|
|
620
626
|
const t = e.kind === "delete" ? "delete" : e.kind.endsWith("pin") ? "pin" : "flag", n = z.current.indexOf(e.noteId);
|
|
621
|
-
return V(e.noteId, t) ?? V(e.noteId, null) ?? (n >= 0 ?
|
|
622
|
-
},
|
|
627
|
+
return V(e.noteId, t) ?? V(e.noteId, null) ?? (n >= 0 ? ye(n, t) : null);
|
|
628
|
+
}, Wn = (e) => {
|
|
623
629
|
var t;
|
|
624
|
-
(t =
|
|
630
|
+
(t = De.current) != null && t.contains(document.activeElement) && ee(wt(e)), he(null);
|
|
625
631
|
}, H = u(null);
|
|
626
632
|
S(() => {
|
|
627
633
|
const e = j.current;
|
|
@@ -635,7 +641,7 @@ const Mr = _n(
|
|
|
635
641
|
el: s,
|
|
636
642
|
noteId: r,
|
|
637
643
|
action: ((h = s.closest("[data-note-action]")) == null ? void 0 : h.dataset.noteAction) ?? null,
|
|
638
|
-
index: r ?
|
|
644
|
+
index: r ? Ot(z.current, Ae.current, r) : -1,
|
|
639
645
|
inWriteError: !!s.closest("[data-notes-panel-write-error]")
|
|
640
646
|
};
|
|
641
647
|
}, n = (i) => {
|
|
@@ -653,14 +659,14 @@ const Mr = _n(
|
|
|
653
659
|
return e.addEventListener("focusin", t), e.addEventListener("focusout", n), () => {
|
|
654
660
|
e.removeEventListener("focusin", t), e.removeEventListener("focusout", n);
|
|
655
661
|
};
|
|
656
|
-
}, []),
|
|
662
|
+
}, []), or(() => {
|
|
657
663
|
var i;
|
|
658
664
|
const e = H.current;
|
|
659
665
|
if (!e || !j.current) return;
|
|
660
666
|
if (e.el.isConnected) {
|
|
661
|
-
const s = e.noteId ?
|
|
667
|
+
const s = e.noteId ? Ot(
|
|
662
668
|
z.current,
|
|
663
|
-
|
|
669
|
+
Ae.current,
|
|
664
670
|
e.noteId
|
|
665
671
|
) : -1;
|
|
666
672
|
s >= 0 && (e.index = s);
|
|
@@ -672,30 +678,30 @@ const Mr = _n(
|
|
|
672
678
|
const n = e.action ? V(e.noteId, e.action) : null;
|
|
673
679
|
if (n) n.focus();
|
|
674
680
|
else if (e.noteId)
|
|
675
|
-
ee(
|
|
681
|
+
ee(ye(e.index, e.action));
|
|
676
682
|
else if (e.el.hasAttribute("data-notes-panel-empty"))
|
|
677
|
-
ee(
|
|
683
|
+
ee(ye(0, "delete"));
|
|
678
684
|
else if (e.inWriteError) {
|
|
679
|
-
const s = (i =
|
|
685
|
+
const s = (i = De.current) == null ? void 0 : i.querySelector(
|
|
680
686
|
"[data-alert-dismiss]"
|
|
681
|
-
), r =
|
|
682
|
-
s ? s.focus() : ee(r ?
|
|
687
|
+
), r = ct.current;
|
|
688
|
+
s ? s.focus() : ee(r ? wt(r) : null);
|
|
683
689
|
}
|
|
684
690
|
});
|
|
685
|
-
const
|
|
691
|
+
const _e = u(null);
|
|
686
692
|
S(() => {
|
|
687
693
|
var e, t;
|
|
688
|
-
C && ((e =
|
|
689
|
-
}, [C,
|
|
694
|
+
C && ((e = _e.current) == null || e.scrollIntoView({ block: "center" }), (t = _e.current) == null || t.focus());
|
|
695
|
+
}, [C, We]);
|
|
690
696
|
const te = u(v);
|
|
691
697
|
te.current = v;
|
|
692
|
-
const
|
|
693
|
-
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
const
|
|
697
|
-
|
|
698
|
-
const
|
|
698
|
+
const Me = u(ae);
|
|
699
|
+
Me.current = ae;
|
|
700
|
+
const yt = u(C);
|
|
701
|
+
yt.current = C;
|
|
702
|
+
const ze = u(null);
|
|
703
|
+
ze.current = { toggle: Le };
|
|
704
|
+
const $n = xt(
|
|
699
705
|
() => ({
|
|
700
706
|
// Ids + flags only — never the note body or author (both PHI).
|
|
701
707
|
getNotes: () => E.current.filter((e) => {
|
|
@@ -713,107 +719,123 @@ const Mr = _n(
|
|
|
713
719
|
};
|
|
714
720
|
}),
|
|
715
721
|
canAddNote: () => !!te.current,
|
|
716
|
-
canAddClinical: () =>
|
|
717
|
-
getCurrentNoteId: () =>
|
|
722
|
+
canAddClinical: () => Me.current,
|
|
723
|
+
getCurrentNoteId: () => yt.current ?? null,
|
|
718
724
|
addNote: (e) => {
|
|
719
725
|
var t;
|
|
720
|
-
if (!(e.clinical && !
|
|
726
|
+
if (!(e.clinical && !Me.current))
|
|
721
727
|
return (t = te.current) == null ? void 0 : t.call(te, e);
|
|
722
728
|
},
|
|
723
|
-
togglePin: (e) =>
|
|
724
|
-
toggleFlag: (e) =>
|
|
729
|
+
togglePin: (e) => kt(ze.current, e, "pin"),
|
|
730
|
+
toggleFlag: (e) => kt(ze.current, e, "flag")
|
|
725
731
|
}),
|
|
726
732
|
[]
|
|
727
733
|
);
|
|
728
|
-
return
|
|
734
|
+
return Jn(gr, $n, f), /* @__PURE__ */ y(
|
|
729
735
|
"section",
|
|
730
736
|
{
|
|
731
737
|
ref: j,
|
|
732
738
|
"data-component": "notes-panel",
|
|
733
739
|
"data-component-id": f,
|
|
734
|
-
"aria-labelledby":
|
|
735
|
-
"aria-label":
|
|
736
|
-
|
|
737
|
-
|
|
740
|
+
"aria-labelledby": Te ? void 0 : Xe,
|
|
741
|
+
"aria-label": Te,
|
|
742
|
+
"aria-describedby": de ? Ze : void 0,
|
|
743
|
+
className: [mr, yn].filter(Boolean).join(" "),
|
|
744
|
+
...bn,
|
|
738
745
|
children: [
|
|
739
746
|
/* @__PURE__ */ a(
|
|
740
|
-
|
|
747
|
+
rr,
|
|
741
748
|
{
|
|
742
|
-
title:
|
|
743
|
-
icon: /* @__PURE__ */ a(
|
|
744
|
-
headingId:
|
|
749
|
+
title: Tn,
|
|
750
|
+
icon: /* @__PURE__ */ a(cr, { "aria-hidden": "true" }),
|
|
751
|
+
headingId: Te ? void 0 : Xe,
|
|
745
752
|
sticky: !0,
|
|
746
753
|
divider: !0
|
|
747
754
|
}
|
|
748
755
|
),
|
|
749
|
-
/* @__PURE__ */
|
|
750
|
-
|
|
756
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
|
|
757
|
+
de ? /* @__PURE__ */ y("div", { "data-slot": "patient", children: [
|
|
758
|
+
/* @__PURE__ */ a("span", { id: Ze, hidden: !0, children: de }),
|
|
759
|
+
/* @__PURE__ */ a(
|
|
760
|
+
sr,
|
|
761
|
+
{
|
|
762
|
+
name: de,
|
|
763
|
+
avatarUrl: hn,
|
|
764
|
+
actionSlot: pn,
|
|
765
|
+
surface: "elevated",
|
|
766
|
+
density: "compact"
|
|
767
|
+
}
|
|
768
|
+
)
|
|
769
|
+
] }) : null,
|
|
770
|
+
v || g !== null ? /* @__PURE__ */ y(
|
|
751
771
|
"div",
|
|
752
772
|
{
|
|
753
773
|
"data-notes-panel-composer": g !== null ? "edit" : "add",
|
|
754
774
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
755
775
|
children: [
|
|
756
|
-
|
|
776
|
+
cn,
|
|
757
777
|
F === "rich" ? /* @__PURE__ */ a(
|
|
758
|
-
|
|
778
|
+
Xn,
|
|
759
779
|
{
|
|
760
780
|
ref: q,
|
|
761
|
-
ariaLabel:
|
|
762
|
-
placeholder:
|
|
763
|
-
toolbar:
|
|
781
|
+
ariaLabel: tt,
|
|
782
|
+
placeholder: et,
|
|
783
|
+
toolbar: qt,
|
|
764
784
|
minHeight: "fill",
|
|
765
|
-
redactor:
|
|
766
|
-
imageUploadUrl:
|
|
785
|
+
redactor: Dt,
|
|
786
|
+
imageUploadUrl: _t,
|
|
787
|
+
plugins: Mt,
|
|
788
|
+
tools: zt,
|
|
767
789
|
readOnly: P,
|
|
768
790
|
onChange: ({ html: e }) => U(e),
|
|
769
|
-
onRequestAiDraft:
|
|
770
|
-
aiDraftFormat:
|
|
771
|
-
aiPrivacyNotice:
|
|
772
|
-
onDictate:
|
|
773
|
-
onProofread:
|
|
774
|
-
onAutoFormat:
|
|
775
|
-
aiConsent:
|
|
776
|
-
variables:
|
|
777
|
-
validateVariable:
|
|
778
|
-
onVariableValidityChange:
|
|
779
|
-
renderHelpMeWrite:
|
|
780
|
-
aiTemplates:
|
|
781
|
-
onAiApplied:
|
|
782
|
-
onUploadImage:
|
|
783
|
-
onAiCreditsExhausted:
|
|
784
|
-
showExtensions:
|
|
785
|
-
aiCreditsNotice:
|
|
786
|
-
extensions:
|
|
787
|
-
extensionContext:
|
|
788
|
-
onExtensionRun:
|
|
791
|
+
onRequestAiDraft: $t,
|
|
792
|
+
aiDraftFormat: Bt,
|
|
793
|
+
aiPrivacyNotice: Kt,
|
|
794
|
+
onDictate: Ut,
|
|
795
|
+
onProofread: It,
|
|
796
|
+
onAutoFormat: Yt,
|
|
797
|
+
aiConsent: Gt,
|
|
798
|
+
variables: Jt,
|
|
799
|
+
validateVariable: Qt,
|
|
800
|
+
onVariableValidityChange: Xt,
|
|
801
|
+
renderHelpMeWrite: Zt,
|
|
802
|
+
aiTemplates: en,
|
|
803
|
+
onAiApplied: tn,
|
|
804
|
+
onUploadImage: nn,
|
|
805
|
+
onAiCreditsExhausted: rn,
|
|
806
|
+
showExtensions: sn,
|
|
807
|
+
aiCreditsNotice: an,
|
|
808
|
+
extensions: ln,
|
|
809
|
+
extensionContext: on,
|
|
810
|
+
onExtensionRun: dn,
|
|
789
811
|
aiConsentHeadingLevel: 3
|
|
790
812
|
}
|
|
791
813
|
) : /* @__PURE__ */ a(
|
|
792
|
-
|
|
814
|
+
Zn,
|
|
793
815
|
{
|
|
794
816
|
value: _,
|
|
795
817
|
readOnly: P,
|
|
796
818
|
onChange: (e) => U(e.target.value),
|
|
797
|
-
placeholder:
|
|
819
|
+
placeholder: et,
|
|
798
820
|
autoResize: !0,
|
|
799
821
|
minRows: 2,
|
|
800
822
|
maxRows: 6,
|
|
801
|
-
"aria-label":
|
|
823
|
+
"aria-label": tt
|
|
802
824
|
}
|
|
803
825
|
),
|
|
804
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ y(
|
|
805
827
|
"div",
|
|
806
828
|
{
|
|
807
829
|
className: [
|
|
808
830
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
809
|
-
|
|
831
|
+
st ? "ds:justify-between" : "ds:justify-end"
|
|
810
832
|
].join(" "),
|
|
811
833
|
children: [
|
|
812
|
-
|
|
813
|
-
const e = P || !ae, t = ae ? void 0 :
|
|
834
|
+
st ? (() => {
|
|
835
|
+
const e = P || !ae, t = ae ? void 0 : Wt ?? l("notesPanel.clinicalGated", {
|
|
814
836
|
defaultValue: "You do not have permission to write clinical notes."
|
|
815
837
|
}), n = /* @__PURE__ */ a(
|
|
816
|
-
|
|
838
|
+
er,
|
|
817
839
|
{
|
|
818
840
|
size: "sm",
|
|
819
841
|
label: l("notesPanel.clinicalToggle", {
|
|
@@ -824,16 +846,16 @@ const Mr = _n(
|
|
|
824
846
|
disabled: e
|
|
825
847
|
}
|
|
826
848
|
);
|
|
827
|
-
return e && t ? /* @__PURE__ */ a(
|
|
849
|
+
return e && t ? /* @__PURE__ */ a(tr, { label: t, children: /* @__PURE__ */ a("span", { tabIndex: 0, children: n }) }) : n;
|
|
828
850
|
})() : null,
|
|
829
|
-
/* @__PURE__ */
|
|
851
|
+
/* @__PURE__ */ y("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
830
852
|
g !== null ? /* @__PURE__ */ a(
|
|
831
853
|
re,
|
|
832
854
|
{
|
|
833
855
|
type: "button",
|
|
834
856
|
size: "sm",
|
|
835
857
|
intent: "ghost",
|
|
836
|
-
onClick:
|
|
858
|
+
onClick: fe,
|
|
837
859
|
disabled: P,
|
|
838
860
|
children: l("notesPanel.cancelEdit", { defaultValue: "Cancel" })
|
|
839
861
|
}
|
|
@@ -843,10 +865,10 @@ const Mr = _n(
|
|
|
843
865
|
{
|
|
844
866
|
type: "button",
|
|
845
867
|
size: "sm",
|
|
846
|
-
onClick:
|
|
847
|
-
disabled: !
|
|
868
|
+
onClick: An,
|
|
869
|
+
disabled: !Sn || Fn,
|
|
848
870
|
loading: P,
|
|
849
|
-
children: g !== null ? l("notesPanel.saveEdit", { defaultValue: "Save note" }) :
|
|
871
|
+
children: g !== null ? l("notesPanel.saveEdit", { defaultValue: "Save note" }) : vn ?? l("notesPanel.add", { defaultValue: "Add note" })
|
|
850
872
|
}
|
|
851
873
|
)
|
|
852
874
|
] })
|
|
@@ -863,7 +885,7 @@ const Mr = _n(
|
|
|
863
885
|
children: /* @__PURE__ */ a(A.Description, { children: I.text })
|
|
864
886
|
}
|
|
865
887
|
) : null,
|
|
866
|
-
|
|
888
|
+
un
|
|
867
889
|
]
|
|
868
890
|
}
|
|
869
891
|
) : null,
|
|
@@ -871,7 +893,7 @@ const Mr = _n(
|
|
|
871
893
|
/* Note-shaped placeholders, not a spinner: the reader sees where
|
|
872
894
|
the notes will land and how many to expect. The status text is
|
|
873
895
|
for assistive tech only; sighted readers get the motion. */
|
|
874
|
-
/* @__PURE__ */
|
|
896
|
+
/* @__PURE__ */ y(
|
|
875
897
|
"div",
|
|
876
898
|
{
|
|
877
899
|
"data-notes-panel-loading": "",
|
|
@@ -879,19 +901,19 @@ const Mr = _n(
|
|
|
879
901
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
880
902
|
children: [
|
|
881
903
|
/* @__PURE__ */ a("span", { role: "status", className: "ds:sr-only", children: l("notesPanel.loading") }),
|
|
882
|
-
|
|
883
|
-
/* @__PURE__ */
|
|
904
|
+
yr.map((e, t) => /* @__PURE__ */ a(Ct, { variant: "elevated", "aria-hidden": "true", children: /* @__PURE__ */ a(Ct.Body, { children: /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
905
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
884
906
|
/* @__PURE__ */ a(
|
|
885
|
-
|
|
907
|
+
be,
|
|
886
908
|
{
|
|
887
909
|
variant: "circular",
|
|
888
910
|
size: "sm",
|
|
889
911
|
stagger: t * 2
|
|
890
912
|
}
|
|
891
913
|
),
|
|
892
|
-
/* @__PURE__ */
|
|
914
|
+
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
893
915
|
/* @__PURE__ */ a(
|
|
894
|
-
|
|
916
|
+
be,
|
|
895
917
|
{
|
|
896
918
|
variant: "text",
|
|
897
919
|
size: "sm",
|
|
@@ -900,7 +922,7 @@ const Mr = _n(
|
|
|
900
922
|
}
|
|
901
923
|
),
|
|
902
924
|
/* @__PURE__ */ a(
|
|
903
|
-
|
|
925
|
+
be,
|
|
904
926
|
{
|
|
905
927
|
variant: "text",
|
|
906
928
|
size: "sm",
|
|
@@ -911,7 +933,7 @@ const Mr = _n(
|
|
|
911
933
|
] })
|
|
912
934
|
] }),
|
|
913
935
|
/* @__PURE__ */ a(
|
|
914
|
-
|
|
936
|
+
be,
|
|
915
937
|
{
|
|
916
938
|
variant: "text",
|
|
917
939
|
size: "sm",
|
|
@@ -923,24 +945,24 @@ const Mr = _n(
|
|
|
923
945
|
]
|
|
924
946
|
}
|
|
925
947
|
)
|
|
926
|
-
) : w === "error" ? /* @__PURE__ */
|
|
948
|
+
) : w === "error" ? /* @__PURE__ */ y(A, { variant: "error", children: [
|
|
927
949
|
/* @__PURE__ */ a(A.Description, { children: l("notesPanel.loadError") }),
|
|
928
950
|
se ? /* @__PURE__ */ a(A.Action, { children: /* @__PURE__ */ a(re, { intent: "secondary", size: "sm", onClick: se, children: l("notesPanel.retry") }) }) : null
|
|
929
951
|
] }) : null,
|
|
930
|
-
p &&
|
|
952
|
+
p && me ? /* @__PURE__ */ y(
|
|
931
953
|
A,
|
|
932
954
|
{
|
|
933
|
-
ref:
|
|
955
|
+
ref: De,
|
|
934
956
|
variant: p.unknown ? "warning" : "error",
|
|
935
957
|
announce: p.unknown ? "assertive" : void 0,
|
|
936
958
|
dismissible: !0,
|
|
937
959
|
onOpenChange: (e) => {
|
|
938
|
-
e ||
|
|
960
|
+
e || Wn(p);
|
|
939
961
|
},
|
|
940
962
|
"data-notes-panel-write-error": p.kind,
|
|
941
963
|
"data-outcome": p.unknown ? "unknown" : void 0,
|
|
942
964
|
children: [
|
|
943
|
-
p.unknown ? /* @__PURE__ */ a(A.Description, { children:
|
|
965
|
+
p.unknown ? /* @__PURE__ */ a(A.Description, { children: Se }) : /* @__PURE__ */ a(A.Title, { as: "p", children: qn(p) }),
|
|
944
966
|
!p.unknown && p.message ? /* @__PURE__ */ a(A.Description, { children: p.message }) : null
|
|
945
967
|
]
|
|
946
968
|
},
|
|
@@ -953,22 +975,22 @@ const Mr = _n(
|
|
|
953
975
|
"aria-atomic": "true",
|
|
954
976
|
"data-notes-panel-announcer": "",
|
|
955
977
|
className: "ds:sr-only",
|
|
956
|
-
children:
|
|
978
|
+
children: Oe.text ? /* @__PURE__ */ a("span", { children: Oe.text }, Oe.seq) : null
|
|
957
979
|
}
|
|
958
980
|
),
|
|
959
981
|
w === "loading" && M.length > 0 ? /* @__PURE__ */ a("span", { role: "status", className: "ds:sr-only", children: l("notesPanel.loading") }) : null,
|
|
960
982
|
M.length > 0 ? /* @__PURE__ */ a(
|
|
961
983
|
"ul",
|
|
962
984
|
{
|
|
963
|
-
ref:
|
|
985
|
+
ref: Ln,
|
|
964
986
|
"aria-busy": w === "loading" || void 0,
|
|
965
|
-
className: `ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0 ${
|
|
987
|
+
className: `ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0 ${xn}`.trim(),
|
|
966
988
|
children: M.map(({ actions: e, keptOnDelete: t, ...n }, i) => {
|
|
967
|
-
const s = C != null && n.id === C, r = n.id, d = r != null && g === r, h = r != null &&
|
|
968
|
-
return /* @__PURE__ */
|
|
989
|
+
const s = C != null && n.id === C, r = n.id, d = r != null && g === r, h = r != null && ge.isLeaving(r), c = r ? Y.get(r) : void 0, m = !!(c != null && c.delete), x = m && !!t, k = P && d;
|
|
990
|
+
return /* @__PURE__ */ y(
|
|
969
991
|
"li",
|
|
970
992
|
{
|
|
971
|
-
ref: s ?
|
|
993
|
+
ref: s ? _e : void 0,
|
|
972
994
|
"data-note-id": r,
|
|
973
995
|
tabIndex: s ? -1 : void 0,
|
|
974
996
|
"aria-current": s ? "true" : void 0,
|
|
@@ -977,13 +999,13 @@ const Mr = _n(
|
|
|
977
999
|
"data-editing": d ? "" : void 0,
|
|
978
1000
|
"aria-busy": x || void 0,
|
|
979
1001
|
className: [
|
|
980
|
-
|
|
1002
|
+
pr({
|
|
981
1003
|
current: s,
|
|
982
1004
|
washed: s || d
|
|
983
1005
|
}),
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
h ?
|
|
1006
|
+
wr,
|
|
1007
|
+
lr,
|
|
1008
|
+
h ? vr : ""
|
|
987
1009
|
].filter(Boolean).join(" "),
|
|
988
1010
|
children: [
|
|
989
1011
|
s ? /* @__PURE__ */ a("span", { className: "ds:sr-only", children: l("notesPanel.current", {
|
|
@@ -995,35 +1017,35 @@ const Mr = _n(
|
|
|
995
1017
|
{
|
|
996
1018
|
"aria-hidden": "true",
|
|
997
1019
|
"data-notes-panel-wash": "editing",
|
|
998
|
-
className:
|
|
1020
|
+
className: Et({ state: "editing" })
|
|
999
1021
|
}
|
|
1000
1022
|
) : s ? /* @__PURE__ */ a(
|
|
1001
1023
|
"span",
|
|
1002
1024
|
{
|
|
1003
1025
|
"aria-hidden": "true",
|
|
1004
1026
|
"data-notes-panel-wash": "addressed",
|
|
1005
|
-
className:
|
|
1027
|
+
className: Et({ state: "addressed" })
|
|
1006
1028
|
},
|
|
1007
|
-
`${C}:${
|
|
1029
|
+
`${C}:${We ?? ""}`
|
|
1008
1030
|
) : null,
|
|
1009
1031
|
/* @__PURE__ */ a(
|
|
1010
|
-
|
|
1032
|
+
Qn,
|
|
1011
1033
|
{
|
|
1012
1034
|
surface: "elevated",
|
|
1013
1035
|
truncate: !s,
|
|
1014
|
-
headerActions: /* @__PURE__ */
|
|
1015
|
-
|
|
1036
|
+
headerActions: /* @__PURE__ */ y(Kn, { children: [
|
|
1037
|
+
Ke ? Ke(
|
|
1016
1038
|
{ ...n, actions: e, keptOnDelete: t },
|
|
1017
1039
|
{ deleting: m }
|
|
1018
1040
|
) : null,
|
|
1019
1041
|
B && r && !n.deleted && (e == null ? void 0 : e.edit) !== !1 ? /* @__PURE__ */ a(
|
|
1020
|
-
|
|
1042
|
+
St,
|
|
1021
1043
|
{
|
|
1022
|
-
icon: /* @__PURE__ */ a(
|
|
1044
|
+
icon: /* @__PURE__ */ a(ur, {}),
|
|
1023
1045
|
intent: "ghost",
|
|
1024
1046
|
size: "sm",
|
|
1025
1047
|
"aria-label": l("notesPanel.editNamed", {
|
|
1026
|
-
date:
|
|
1048
|
+
date: ue(n),
|
|
1027
1049
|
defaultValue: "Edit note · {{date}}"
|
|
1028
1050
|
}),
|
|
1029
1051
|
tooltip: l("notesPanel.edit", {
|
|
@@ -1033,17 +1055,17 @@ const Mr = _n(
|
|
|
1033
1055
|
disabled: P || m,
|
|
1034
1056
|
"data-notes-panel-edit": "",
|
|
1035
1057
|
"data-note-action": "edit",
|
|
1036
|
-
onClick: () => g === r ?
|
|
1058
|
+
onClick: () => g === r ? fe() : On(n)
|
|
1037
1059
|
}
|
|
1038
1060
|
) : null,
|
|
1039
1061
|
K && r && !n.deleted && (e == null ? void 0 : e.delete) !== !1 ? /* @__PURE__ */ a(
|
|
1040
|
-
|
|
1062
|
+
St,
|
|
1041
1063
|
{
|
|
1042
|
-
icon: /* @__PURE__ */ a(
|
|
1064
|
+
icon: /* @__PURE__ */ a(fr, {}),
|
|
1043
1065
|
intent: "ghost",
|
|
1044
1066
|
size: "sm",
|
|
1045
1067
|
"aria-label": l("notesPanel.deleteNamed", {
|
|
1046
|
-
date:
|
|
1068
|
+
date: ue(n),
|
|
1047
1069
|
defaultValue: "Delete note · {{date}}"
|
|
1048
1070
|
}),
|
|
1049
1071
|
tooltip: l("notesPanel.delete", {
|
|
@@ -1052,17 +1074,17 @@ const Mr = _n(
|
|
|
1052
1074
|
"data-note-action": "delete",
|
|
1053
1075
|
"aria-disabled": x || k || void 0,
|
|
1054
1076
|
"aria-busy": x || void 0,
|
|
1055
|
-
onClick: () =>
|
|
1077
|
+
onClick: () => _n(r)
|
|
1056
1078
|
}
|
|
1057
1079
|
) : null
|
|
1058
1080
|
] }),
|
|
1059
1081
|
...n,
|
|
1060
|
-
pinned:
|
|
1061
|
-
flagged:
|
|
1082
|
+
pinned: Ne(n),
|
|
1083
|
+
flagged: jn(n),
|
|
1062
1084
|
pinPending: !!(c != null && c.pin) || m,
|
|
1063
1085
|
flagPending: !!(c != null && c.flag) || m,
|
|
1064
|
-
onTogglePin:
|
|
1065
|
-
onToggleFlag:
|
|
1086
|
+
onTogglePin: $e && r && (e == null ? void 0 : e.pin) !== !1 && !n.deleted ? () => Le(r, "pin") : void 0,
|
|
1087
|
+
onToggleFlag: Be && r && (e == null ? void 0 : e.flag) !== !1 && !n.deleted ? () => Le(r, "flag") : void 0
|
|
1066
1088
|
}
|
|
1067
1089
|
)
|
|
1068
1090
|
]
|
|
@@ -1073,21 +1095,21 @@ const Mr = _n(
|
|
|
1073
1095
|
}
|
|
1074
1096
|
) : w !== "ready" ? null : (
|
|
1075
1097
|
/* Where focus lands, from script, when the last note leaves. */
|
|
1076
|
-
/* @__PURE__ */ a("div", { "data-notes-panel-empty": "", className:
|
|
1098
|
+
/* @__PURE__ */ a("div", { "data-notes-panel-empty": "", className: Lt, children: wn ?? /* @__PURE__ */ a("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: l("notesPanel.empty", { defaultValue: "No notes yet." }) }) })
|
|
1077
1099
|
)
|
|
1078
1100
|
] }),
|
|
1079
|
-
K &&
|
|
1101
|
+
K && Ie ? /* @__PURE__ */ a(
|
|
1080
1102
|
L,
|
|
1081
1103
|
{
|
|
1082
1104
|
scope: "container",
|
|
1083
|
-
open:
|
|
1105
|
+
open: qe,
|
|
1084
1106
|
onOpenChange: (e) => !e && Z(null),
|
|
1085
|
-
children: /* @__PURE__ */
|
|
1107
|
+
children: /* @__PURE__ */ y(
|
|
1086
1108
|
L.Content,
|
|
1087
1109
|
{
|
|
1088
1110
|
variant: "alert",
|
|
1089
1111
|
size: "sm",
|
|
1090
|
-
onCloseAutoFocus:
|
|
1112
|
+
onCloseAutoFocus: Hn,
|
|
1091
1113
|
children: [
|
|
1092
1114
|
/* @__PURE__ */ a(L.Header, { children: /* @__PURE__ */ a(L.Title, { children: l("notesPanel.deleteConfirmTitle", {
|
|
1093
1115
|
defaultValue: "Delete this note?"
|
|
@@ -1095,7 +1117,7 @@ const Mr = _n(
|
|
|
1095
1117
|
/* @__PURE__ */ a(L.Body, { children: /* @__PURE__ */ a(L.Description, { children: l("notesPanel.deleteConfirmBody", {
|
|
1096
1118
|
defaultValue: "The note will be removed from the record."
|
|
1097
1119
|
}) }) }),
|
|
1098
|
-
/* @__PURE__ */
|
|
1120
|
+
/* @__PURE__ */ y(L.Footer, { children: [
|
|
1099
1121
|
/* @__PURE__ */ a(L.Close, { asChild: !0, children: /* @__PURE__ */ a(
|
|
1100
1122
|
re,
|
|
1101
1123
|
{
|
|
@@ -1112,7 +1134,7 @@ const Mr = _n(
|
|
|
1112
1134
|
{
|
|
1113
1135
|
intent: "destructive",
|
|
1114
1136
|
size: "sm",
|
|
1115
|
-
onClick:
|
|
1137
|
+
onClick: Mn,
|
|
1116
1138
|
children: l("notesPanel.deleteConfirmAction", {
|
|
1117
1139
|
defaultValue: "Delete"
|
|
1118
1140
|
})
|
|
@@ -1130,6 +1152,6 @@ const Mr = _n(
|
|
|
1130
1152
|
}
|
|
1131
1153
|
);
|
|
1132
1154
|
export {
|
|
1133
|
-
|
|
1155
|
+
Yr as N
|
|
1134
1156
|
};
|
|
1135
|
-
//# sourceMappingURL=notes-panel-
|
|
1157
|
+
//# sourceMappingURL=notes-panel-d0I3hOEY.js.map
|