@alfadocs/ui-kit 1.47.1 → 1.48.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/{actions-cell-renderer-B5m9lwgC.js → actions-cell-renderer-DMittsR3.js} +4 -4
- package/dist/_chunks/{address-autocomplete-Bq-1n1UX.js → address-autocomplete-Dp5uMvKP.js} +61 -60
- package/dist/_chunks/{address-fields-jFfjxOQR.js → address-fields-QfC-N3pw.js} +5 -5
- package/dist/_chunks/{agenda-card-DyQtHb9z.js → agenda-card-C4h0xMGi.js} +2 -2
- package/dist/_chunks/{agenda-tray-CBaJASb5.js → agenda-tray-DNZYW2xt.js} +4 -4
- package/dist/_chunks/{ai-credits-notice-xszqOZTC.js → ai-credits-notice-C-kz_RrY.js} +3 -3
- package/dist/_chunks/{ai-permission-notice-D7I2U-cz.js → ai-permission-notice-BRZeS3mT.js} +3 -3
- package/dist/_chunks/{ai-prompt-input-DXknpQCB.js → ai-prompt-input-CxvnXsAs.js} +82 -82
- package/dist/_chunks/{alia-sidebar-CUqaJNPQ.js → alia-sidebar-Crn8OGPF.js} +7 -7
- package/dist/_chunks/{anamnesis-card-xtEhyojD.js → anamnesis-card-D8Si-2GV.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-card-CclBbiXg.js → anamnesis-summary-card-DPyScUMM.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-DI-UX5r6.js → anamnesis-summary-rows-CZirLRuv.js} +12 -12
- package/dist/_chunks/{antenatal-schedule-timeline-CXk_tzWG.js → antenatal-schedule-timeline-8fm3vPSV.js} +2 -2
- package/dist/_chunks/{appointment-card-DluZy8Iv.js → appointment-card-CvGU0QP6.js} +5 -5
- package/dist/_chunks/{appointment-peek-BsfCpiJs.js → appointment-peek--dmWznLZ.js} +5 -5
- package/dist/_chunks/{appointment-timeline-Cs5f9viN.js → appointment-timeline-y9uYZMUd.js} +6 -6
- package/dist/_chunks/{appointment-tray-CLrGGnKR.js → appointment-tray-BTecNeSb.js} +4 -4
- package/dist/_chunks/appointment-workflow-status-CS8ufF1f.js +66 -0
- package/dist/_chunks/{audio-recorder-B7dT-Y3v.js → audio-recorder-DZBtAvLH.js} +4 -4
- package/dist/_chunks/{autocomplete-MpBhz-fG.js → autocomplete-DSasZUf6.js} +65 -64
- package/dist/_chunks/{badge-BudgzTe_.js → badge-BAkd6_Pj.js} +24 -17
- package/dist/_chunks/{balance-badge-cell-YGrYdrvR.js → balance-badge-cell-CA0YNJMR.js} +6 -6
- package/dist/_chunks/{bishop-score-Cu70iv9C.js → bishop-score-BMLRvXYF.js} +4 -4
- package/dist/_chunks/{bmi-calculator-C9N19aLX.js → bmi-calculator-DUhRyyrA.js} +3 -3
- package/dist/_chunks/{booking-C4MwImkS.js → booking-BQYFDcrz.js} +10 -10
- package/dist/_chunks/{breadcrumb-agut0PwN.js → breadcrumb-D3boYzD4.js} +50 -49
- package/dist/_chunks/{button-CaUe1uyd.js → button-18oBsI3n.js} +54 -50
- package/dist/_chunks/button-group-BSDqso_C.js +408 -0
- package/dist/_chunks/{calendar-OzSeTb4V.js → calendar-DjoJ9ovF.js} +11 -17
- package/dist/_chunks/{calendar-event-card-B6N5h1dO.js → calendar-event-card-BUbKBPv_.js} +55 -73
- package/dist/_chunks/calendar-workspace-D8zX9JWm.js +10423 -0
- package/dist/_chunks/{care-plan-card-BOv0NRle.js → care-plan-card-ciBaaguw.js} +4 -4
- package/dist/_chunks/{care-plan-entry-card-d-rZD4li.js → care-plan-entry-card-D7A0whiZ.js} +5 -5
- package/dist/_chunks/{care-plan-header-CEmBXn6-.js → care-plan-header-DKV1gLqv.js} +4 -4
- package/dist/_chunks/{carousel.agent-z1yLBpyC.js → carousel.agent-DqDGR2yH.js} +2 -2
- package/dist/_chunks/{chart-D8ucl8hH.js → chart-VjuXDXOZ.js} +3 -3
- package/dist/_chunks/{chat-input-Cj7ZYQr5.js → chat-input-BVho_SqP.js} +2 -2
- package/dist/_chunks/{chat-message-BMVxiUIX.js → chat-message-Co_NRGM4.js} +3 -3
- package/dist/_chunks/{smartphone-DaPcFw-X.js → circle-dashed-CUj6o2cA.js} +3 -14
- package/dist/_chunks/{city-input-DaQc-Hbj.js → city-input-BGYc4lRV.js} +2 -2
- package/dist/_chunks/{clinical-note-card-DdsGYMmI.js → clinical-note-card-DYDQ3q2x.js} +89 -74
- package/dist/_chunks/{code-block-BB-viuTn.js → code-block-C_eNHWaa.js} +2 -2
- package/dist/_chunks/combobox-B_rLwmSv.js +578 -0
- package/dist/_chunks/{command-palette-DQl_SNEv.js → command-palette-DhgGo7GJ.js} +82 -80
- package/dist/_chunks/{connection-status-BmA9T0UO.js → connection-status-Cfux3TvH.js} +4 -4
- package/dist/_chunks/{contact-profile-card-C0WpwpVV.js → contact-profile-card-Dj4NgBL-.js} +3 -3
- package/dist/_chunks/control-room-rail-DAO0qfOI.js +379 -0
- package/dist/_chunks/{copy-field-B8XRVmQv.js → copy-field-Cm4y5Bff.js} +2 -2
- package/dist/_chunks/{country-select-CfDNFG5c.js → country-select-C5jZjO8O.js} +2 -2
- package/dist/_chunks/{cycle-calculator-BH2StWoT.js → cycle-calculator-B9lBRNiZ.js} +3 -3
- package/dist/_chunks/{dashboard-grid-BcXWL5S9.js → dashboard-grid-uX7x1ePj.js} +2 -2
- package/dist/_chunks/{data-table-DnKOmEVw.js → data-table-DWOSxlsy.js} +9 -9
- package/dist/_chunks/{data-table-tabs-B9SXA5VP.js → data-table-tabs-CzYYKp2_.js} +3 -3
- package/dist/_chunks/{dependent-selector-BHDP0nBB.js → dependent-selector-BR_8D2Qu.js} +2 -2
- package/dist/_chunks/{description-list-BsJ_6CQE.js → description-list-1A2DEbE6.js} +2 -2
- package/dist/_chunks/{document-preview-COV0BC6n.js → document-preview-Od2Hz4z5.js} +13 -12
- package/dist/_chunks/{document-scanner-B1abl-A4.js → document-scanner-p0aGlzCy.js} +3 -3
- package/dist/_chunks/{dropdown-menu-DU-Hrf33.js → dropdown-menu-C8PaW3lR.js} +110 -96
- package/dist/_chunks/{due-date-calculator-Buh_mVHq.js → due-date-calculator-BVqJaxzd.js} +4 -4
- package/dist/_chunks/{editable-currency-cell-renderer-OUkUv7U4.js → editable-currency-cell-renderer-D_G2Ap61.js} +4 -4
- package/dist/_chunks/{editable-description-ADMVFPUz.js → editable-description-B4NVdjvd.js} +3 -3
- package/dist/_chunks/{editor-overlay-DwNKaI22.js → editor-overlay-BDiBvQmL.js} +2 -2
- package/dist/_chunks/{empty-state-BUN_UAWf.js → empty-state-DTBZ1ENT.js} +2 -2
- package/dist/_chunks/{entity-card-I-Gio5wo.js → entity-card-D1Yrh9wf.js} +2 -1
- package/dist/_chunks/{entity-summary-DXejuQ8i.js → entity-summary-Ckz_U00H.js} +3 -3
- package/dist/_chunks/{error-boundary-BNT2iQ1w.js → error-boundary-BxTqEXqj.js} +2 -2
- package/dist/_chunks/euro-Dsuz4ixO.js +22 -0
- package/dist/_chunks/{face-scheme-mIhwrQXt.js → face-scheme-fku-RShg.js} +71 -71
- package/dist/_chunks/{fetal-weight-wx4ycKc6.js → fetal-weight-B69yOS9W.js} +3 -3
- package/dist/_chunks/{field-array-BW9KeeXG.js → field-array-lIXrFWS0.js} +3 -3
- package/dist/_chunks/file-BuG1VMAy.js +21 -0
- package/dist/_chunks/{file-Cwe9VC1A.js → file-image-cDgE-BTy.js} +2 -19
- package/dist/_chunks/{file-manager-DOcJGIx2.js → file-manager-CqgxLqoA.js} +15 -14
- package/dist/_chunks/{file-upload-BDpb08GM.js → file-upload-B242a_Y1.js} +53 -52
- package/dist/_chunks/{finished-terminal-DJd7Z_po.js → finished-terminal-B2oqXO0Y.js} +2 -2
- package/dist/_chunks/fiscal-code-input-BEF8eKIG.js +572 -0
- package/dist/_chunks/{freemium-paywall-BaW5ODc9.js → freemium-paywall-B6JITu4l.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-CwbecTul.js → gestational-age-calculator-DsGN6_HS.js} +5 -5
- package/dist/_chunks/handled-rejection-6gqCf5vt.js +13 -0
- package/dist/_chunks/{hcg-doubling-BcXriXJe.js → hcg-doubling-D2SH-e7t.js} +3 -3
- package/dist/_chunks/{header-3o9o9v_T.js → header-CCjp5GvE.js} +2 -2
- package/dist/_chunks/{header-settings-BEfx_-TF.js → header-settings-ZXa6hXuu.js} +5 -5
- package/dist/_chunks/{help-me-write-templates-DHIwa4xR.js → help-me-write-templates-DQtT1qs_.js} +5 -5
- package/dist/_chunks/history-CK2JaU2g.js +16 -0
- package/dist/_chunks/{hover-card-nUae8NPJ.js → hover-card-BplP5SzQ.js} +2 -2
- package/dist/_chunks/{icon-button-CehAeZoP.js → icon-button-CY7GU_Se.js} +2 -2
- package/dist/_chunks/icon-button-group-B_426QN_.js +431 -0
- package/dist/_chunks/{icon-picker-DMEelg9v.js → icon-picker-ZLebyB0U.js} +3 -3
- package/dist/_chunks/{image-cropper-BjPjT7wU.js → image-cropper-_HiNN79d.js} +2 -2
- package/dist/_chunks/{info-tip-iP2Pm9dh.js → info-tip-laBxZhKu.js} +2 -2
- package/dist/_chunks/{insert-result-DPnOBD85.js → insert-result-CSuPQyKL.js} +2 -2
- package/dist/_chunks/{key-value-pair-DaQI_LZB.js → key-value-pair-Dcdl3Gni.js} +2 -2
- package/dist/_chunks/{kit-extensions-DuoFF1R3.js → kit-extensions-BTJSnM_H.js} +6 -6
- package/dist/_chunks/{link-cell-renderer-s3oHzOwi.js → link-cell-renderer-Tswqf6BT.js} +7 -7
- package/dist/_chunks/{locale-picker-CH3kfrIG.js → locale-picker-DGkQmhV9.js} +170 -180
- package/dist/_chunks/{map-view-CHw4RL6w.js → map-view-Bb7ClKSF.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-PB89Dkk_.js → marketplace-app-shell-Dehuxbi-.js} +6 -6
- package/dist/_chunks/menu-row-BAr8bx1I.js +95 -0
- package/dist/_chunks/{message-card-V3sFPiQI.js → message-card-DKOtnBHy.js} +3 -3
- package/dist/_chunks/{message-tray-CrRIHfiQ.js → message-tray-COMEtmyr.js} +4 -4
- package/dist/_chunks/{multi-select-CtPd7g4x.js → multi-select-N4Smh-gj.js} +114 -113
- package/dist/_chunks/{muscle-scheme-UVz_x4iE.js → muscle-scheme-Co0NIgbU.js} +3 -3
- package/dist/_chunks/{note-attachment-CwDir3kK.js → note-attachment-CGjNTrAC.js} +2 -2
- package/dist/_chunks/{note-timeline-Dn_XTo1s.js → note-timeline-CVnKL0p6.js} +2 -2
- package/dist/_chunks/notes-panel-BiOxZL_0.js +1111 -0
- package/dist/_chunks/{notification-card-B2gLO6dK.js → notification-card-DDzBCi8l.js} +3 -3
- package/dist/_chunks/{notification-tray-BOEKegVV.js → notification-tray-PnH2PBlZ.js} +4 -4
- package/dist/_chunks/{operator-hero-XIdwDmN2.js → operator-hero-5061fkY5.js} +3 -3
- package/dist/_chunks/{optical-prescription-LGgmtcST.js → optical-prescription-DUufWXfZ.js} +3 -3
- package/dist/_chunks/{pagination-EkD5SiCK.js → pagination-B0N2qGy_.js} +83 -82
- package/dist/_chunks/panel-subview-CzHutkA8.js +217 -0
- package/dist/_chunks/{patient-details-yrgkSeEY.js → patient-details-C23Hdm8v.js} +3 -3
- package/dist/_chunks/{patient-field-row-DCMkFGqI.js → patient-field-row-DElFbpKc.js} +12 -12
- package/dist/_chunks/{patient-search-5QcmQKJD.js → patient-search-DgXdGkhK.js} +4 -4
- package/dist/_chunks/{patient-summary-card-CmEFflGS.js → patient-summary-card-C36L3h7h.js} +7 -7
- package/dist/_chunks/{payment-automation-upsell-BKmBXU4i.js → payment-automation-upsell-ugi4np1l.js} +3 -3
- package/dist/_chunks/{payment-request-card-Cer6XXCn.js → payment-request-card-DMJB57Tv.js} +5 -5
- package/dist/_chunks/{periodontal-chart-DJoZS_o7.js → periodontal-chart-DbGzKDj7.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-Nd1ZoYWb.js → periodontal-chart-card-DvHyP47v.js} +3 -3
- package/dist/_chunks/{periodontal-diagnosis-C7pfPOct.js → periodontal-diagnosis-B8WqI0eU.js} +2 -2
- package/dist/_chunks/{periodontal-risk-chart-B2tNFa15.js → periodontal-risk-chart-DsFRFFSz.js} +2 -2
- package/dist/_chunks/{phone-input-IWrGOCwm.js → phone-input-sQj-zi59.js} +85 -86
- package/dist/_chunks/{popover-DO-pssF3.js → popover-Dvb40vPH.js} +2 -2
- package/dist/_chunks/{practice-profile-hero-DxoLlQr5.js → practice-profile-hero-CPy5h2yI.js} +2 -2
- package/dist/_chunks/{practice-results-D11Zpt27.js → practice-results-t2BHht91.js} +7 -7
- package/dist/_chunks/{pregnancy-dating-DcyV9ZRD.js → pregnancy-dating-lfjjZVZH.js} +5 -5
- package/dist/_chunks/{pregnancy-weight-gain-Bfq4Kwt5.js → pregnancy-weight-gain-WpNt-S0q.js} +3 -3
- package/dist/_chunks/{privacy-lock-CbFCAMM3.js → privacy-lock-D6gq0GDg.js} +3 -3
- package/dist/_chunks/privacy-mask-BC5lw2zB.js +81 -0
- package/dist/_chunks/{product-hub-panel-w40-_-1s.js → product-hub-panel-CKeSCSeE.js} +3 -3
- package/dist/_chunks/{province-select-BaUnkg4S.js → province-select-BiszMRRY.js} +2 -2
- package/dist/_chunks/{public-header.agent-D-EBVskf.js → public-header.agent-B9wDmUeB.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-LrILY2lN.js → radiograph-panel.agent-TmyIvTOa.js} +6 -6
- package/dist/_chunks/{reviews-panel-2GVuxGeT.js → reviews-panel-BdwFp_0c.js} +4 -4
- package/dist/_chunks/{rich-text-editor-BwDV2XkZ.js → rich-text-editor-y6ML0KeV.js} +12 -11
- package/dist/_chunks/{search-bar-CCmViqaa.js → search-bar-6bHatpYJ.js} +69 -67
- package/dist/_chunks/{select-CLSUnKjF.js → select-upNAltly.js} +89 -88
- package/dist/_chunks/{session-countdown-BqppPrw6.js → session-countdown-ACJyTXH2.js} +2 -2
- package/dist/_chunks/{sheet-C8WIDFS8.js → sheet-D0Lh0KR2.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-DWwBJtyE.js → sign-in-with-alfadocs-button-CDyJAIzW.js} +2 -2
- package/dist/_chunks/{signature-request-D_j2aQu1.js → signature-request-15D363w5.js} +6 -6
- package/dist/_chunks/{signature-status-chip-D4NsrdeI.js → signature-status-chip-Dz6sS2oA.js} +2 -2
- package/dist/_chunks/{slot-grid-B3eOPkKD.js → slot-grid-4fWH3Euk.js} +4 -4
- package/dist/_chunks/smartphone-C0rFF2if.js +15 -0
- package/dist/_chunks/{streaming-text-CE1u_oGa.js → streaming-text-eRiizArc.js} +2 -2
- package/dist/_chunks/{tab-bar-Cw9UK18Z.js → tab-bar-BHFf6knq.js} +9 -9
- package/dist/_chunks/{tabs-BnRaLT0y.js → tabs-CFsuMQ5H.js} +82 -81
- package/dist/_chunks/{tag-Ci3xJPcH.js → tag-B65tLWvD.js} +24 -21
- package/dist/_chunks/{task-card-qTKD1fIT.js → task-card-CTTQfPS6.js} +72 -55
- package/dist/_chunks/task-editor-DlvTwAfv.js +1243 -0
- package/dist/_chunks/{task-tray-DIwjAIes.js → task-tray-JA-qp_pB.js} +4 -4
- package/dist/_chunks/tasks-panel-C_dVDQKJ.js +1243 -0
- package/dist/_chunks/{theme-toggle-BP0XRGMM.js → theme-toggle-LUBxlNDm.js} +4 -4
- package/dist/_chunks/{toast-ZZfhA5u0.js → toast-CT8hjr9r.js} +2 -2
- package/dist/_chunks/{token-insert-menu-A9B5AJw6.js → token-insert-menu-klwbxVKh.js} +3 -3
- package/dist/_chunks/{tool-rail-CCFqDfAn.js → tool-rail-DEeX4PdN.js} +144 -137
- package/dist/_chunks/{tooth-scheme-DPAq0vQK.js → tooth-scheme-BkjhkI8g.js} +4 -4
- package/dist/_chunks/{treatment-receipt-DU0OewqH.js → treatment-receipt-C-gWZ6uv.js} +3 -3
- package/dist/_chunks/{unit-converter-C-LpGzrN.js → unit-converter-Dp_KDxE6.js} +3 -3
- package/dist/_chunks/use-appointment-details-read-D2FH-cHF.js +2045 -0
- package/dist/_chunks/use-list-reflow-C7O4Uqnl.js +133 -0
- package/dist/_chunks/use-priority-overflow-Cdmb5EiR.js +108 -0
- package/dist/_chunks/{variables-menu-vXUaSBj4.js → variables-menu-aJLKJ_cu.js} +127 -136
- package/dist/_chunks/{warning-stack-C0glSB7p.js → warning-stack-CEgYkI1z.js} +3 -3
- package/dist/_chunks/{widget-picker-B1sj6uyf.js → widget-picker-CilQvcNL.js} +2 -2
- package/dist/_chunks/{workflow-map-DhR_h5yw.js → workflow-map-qGkQTNvS.js} +30 -29
- package/dist/_chunks/{workflow-status-CuJAOuKL.js → workflow-status-ClHfz4Kr.js} +209 -167
- package/dist/agent-catalog.json +371 -26
- package/dist/agent-i18n/en.json +41 -9
- package/dist/components/_shared/appointment-format.d.ts +52 -0
- package/dist/{patterns/calendar/calendar-editor-fields.d.ts → components/_shared/compact-editor-fields.d.ts} +6 -5
- package/dist/components/_shared/handled-rejection.d.ts +2 -0
- package/dist/components/_shared/menu-row.d.ts +17 -0
- package/dist/components/_shared/patient-identity.d.ts +7 -0
- package/dist/components/_shared/patient-picker.d.ts +24 -0
- package/dist/components/_shared/privacy-mask.d.ts +29 -0
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-credits-notice/index.js +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/appointment-details-panel.agent.d.ts +4 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +134 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.focus.d.ts +7 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.history.d.ts +12 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.identity.d.ts +41 -0
- package/dist/{patterns/calendar/calendar-info-hover.d.ts → components/appointment-details-panel/appointment-details-panel.info-hover.d.ts} +1 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +51 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +326 -0
- package/dist/components/appointment-details-panel/index.d.ts +8 -0
- package/dist/components/appointment-details-panel/index.js +8 -0
- package/dist/components/appointment-details-panel/use-appointment-details-read.d.ts +32 -0
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/button.d.ts +2 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/button-group/button-group.d.ts +19 -2
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calendar/calendar.d.ts +5 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/city-input/index.js +1 -1
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +13 -5
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/combobox/combobox.d.ts +9 -4
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/control-room-rail.d.ts +14 -3
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +4 -4
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editable-description/index.js +1 -1
- package/dist/components/editor-overlay/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/fetal-weight/index.js +1 -1
- package/dist/components/field-array/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/finished-terminal/index.js +1 -1
- package/dist/components/fiscal-code-input/fiscal-code-input.d.ts +7 -0
- package/dist/components/fiscal-code-input/index.d.ts +1 -1
- package/dist/components/fiscal-code-input/index.js +8 -7
- package/dist/components/fiscal-code-input/is-valid-codice-fiscale.d.ts +19 -4
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/image-cropper/index.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/index.d.ts +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +102 -26
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/panel-subview/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/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/periodontal-risk-chart/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/province-select/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/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/signature-field/signature-field.d.ts +1 -1
- package/dist/components/signature-status-chip/index.js +1 -1
- package/dist/components/skeleton-scheme/index.js +17 -17
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-card/task-card.d.ts +6 -0
- package/dist/components/task-editor/index.d.ts +4 -0
- package/dist/components/task-editor/index.js +6 -0
- package/dist/components/task-editor/task-editor.agent.d.ts +4 -0
- package/dist/components/task-editor/task-editor.d.ts +240 -0
- package/dist/components/task-editor/use-task-editor-form.d.ts +101 -0
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.d.ts +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/tasks-panel/tasks-panel.d.ts +84 -12
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/token-insert-menu/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/treatment-receipt/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/variables-menu/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/components/workflow-status/appointment-workflow-status.d.ts +55 -0
- package/dist/components/workflow-status/index.d.ts +2 -0
- package/dist/components/workflow-status/index.js +7 -2
- package/dist/components/workflow-status/workflow-status.d.ts +35 -0
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/use-exit-transition.d.ts +5 -0
- package/dist/hooks/use-priority-overflow.d.ts +11 -2
- package/dist/host-compat.css +7 -1
- package/dist/i18n/locales/ar.d.ts +29 -10
- package/dist/i18n/locales/ar.js +33 -14
- package/dist/i18n/locales/de.d.ts +29 -10
- package/dist/i18n/locales/de.js +33 -14
- package/dist/i18n/locales/el.d.ts +29 -10
- package/dist/i18n/locales/el.js +33 -14
- package/dist/i18n/locales/en.d.ts +29 -10
- package/dist/i18n/locales/en.js +33 -14
- package/dist/i18n/locales/es.d.ts +29 -10
- package/dist/i18n/locales/es.js +33 -14
- package/dist/i18n/locales/fr.d.ts +29 -10
- package/dist/i18n/locales/fr.js +33 -14
- package/dist/i18n/locales/hi.d.ts +29 -10
- package/dist/i18n/locales/hi.js +33 -14
- package/dist/i18n/locales/it.d.ts +29 -10
- package/dist/i18n/locales/it.js +33 -14
- package/dist/i18n/locales/ja.d.ts +29 -10
- package/dist/i18n/locales/ja.js +33 -14
- package/dist/i18n/locales/nl.d.ts +29 -10
- package/dist/i18n/locales/nl.js +33 -14
- package/dist/i18n/locales/pl.d.ts +29 -10
- package/dist/i18n/locales/pl.js +33 -14
- package/dist/i18n/locales/pt.d.ts +29 -10
- package/dist/i18n/locales/pt.js +33 -14
- package/dist/i18n/locales/ro.d.ts +29 -10
- package/dist/i18n/locales/ro.js +33 -14
- package/dist/i18n/locales/ru.d.ts +29 -10
- package/dist/i18n/locales/ru.js +33 -14
- package/dist/i18n/locales/sq.d.ts +29 -10
- package/dist/i18n/locales/sq.js +33 -14
- package/dist/i18n/locales/sv.d.ts +29 -10
- package/dist/i18n/locales/sv.js +33 -14
- package/dist/i18n/locales/tr.d.ts +29 -10
- package/dist/i18n/locales/tr.js +33 -14
- package/dist/i18n/locales/zh.d.ts +29 -10
- package/dist/i18n/locales/zh.js +33 -14
- package/dist/i18n/registerUiBundle.d.ts +5 -9
- package/dist/index.js +742 -728
- package/dist/locales/ar.json +33 -14
- package/dist/locales/de.json +33 -14
- package/dist/locales/el.json +33 -14
- package/dist/locales/en.json +33 -14
- package/dist/locales/es.json +33 -14
- package/dist/locales/fr.json +33 -14
- package/dist/locales/hi.json +33 -14
- package/dist/locales/it.json +33 -14
- package/dist/locales/ja.json +33 -14
- package/dist/locales/nl.json +33 -14
- package/dist/locales/pl.json +33 -14
- package/dist/locales/pt.json +33 -14
- package/dist/locales/ro.json +33 -14
- package/dist/locales/ru.json +33 -14
- package/dist/locales/sq.json +33 -14
- package/dist/locales/sv.json +33 -14
- package/dist/locales/tr.json +33 -14
- package/dist/locales/zh.json +33 -14
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/calendar-appointment-details.d.ts +25 -95
- package/dist/patterns/calendar/calendar-patient-picker.d.ts +4 -3
- package/dist/patterns/calendar/calendar-privacy.d.ts +1 -22
- package/dist/patterns/calendar/calendar-sticky-offset.d.ts +20 -13
- package/dist/patterns/calendar/calendar-task-editor.d.ts +9 -13
- package/dist/patterns/calendar/calendar-workspace.d.ts +79 -8
- package/dist/patterns/calendar/calendar-workspace.model.d.ts +17 -12
- package/dist/patterns/calendar/calendar.journey.d.ts +40 -6
- package/dist/patterns/calendar/calendar.model.d.ts +10 -17
- package/dist/patterns/calendar/calendar.sheets.d.ts +18 -16
- package/dist/patterns/calendar/calendar.types.d.ts +24 -100
- package/dist/patterns/calendar/index.d.ts +4 -3
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +22 -5
- package/dist/_chunks/button-group-CA1tmu39.js +0 -325
- package/dist/_chunks/calendar-workspace-BmscntRR.js +0 -12528
- package/dist/_chunks/combobox-DnSdYssy.js +0 -522
- package/dist/_chunks/control-room-rail-CdBOXIqX.js +0 -366
- package/dist/_chunks/fiscal-code-input-ODQRd_Sw.js +0 -553
- package/dist/_chunks/icon-button-group-DZKC6KGf.js +0 -428
- package/dist/_chunks/notes-panel-CHbDDMx8.js +0 -683
- package/dist/_chunks/panel-subview-CYnuX-KR.js +0 -171
- package/dist/_chunks/tasks-panel-DncuBPIZ.js +0 -844
- package/dist/_chunks/use-list-reflow-Cw43nxw5.js +0 -100
- package/dist/_chunks/use-priority-overflow-c9SjxZkZ.js +0 -101
- package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +0 -37
|
@@ -0,0 +1,1111 @@
|
|
|
1
|
+
import { jsxs as b, jsx as i, Fragment as _n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Ln, useRef as u, useState as C, useId as qn, useEffect as S, useCallback as W, useMemo as pt, useImperativeHandle as Dn } from "react";
|
|
3
|
+
import { c as Et } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as kn } from "react-i18next";
|
|
5
|
+
import { g as mt, h as Rt } from "./handled-rejection-6gqCf5vt.js";
|
|
6
|
+
import { u as zn } from "./registry-DvAUVLHh.js";
|
|
7
|
+
import { C as Hn } from "./clinical-note-card-DYDQ3q2x.js";
|
|
8
|
+
import { R as Mn } from "./rich-text-editor-y6ML0KeV.js";
|
|
9
|
+
import { T as Wn } from "./text-area-Bt3p7Pt0.js";
|
|
10
|
+
import { A as j } from "./alert-CiQ5Pa3Q.js";
|
|
11
|
+
import { B as te } from "./button-18oBsI3n.js";
|
|
12
|
+
import { I as vt } from "./icon-button-CY7GU_Se.js";
|
|
13
|
+
import { S as $n } from "./switch-OILsBLWo.js";
|
|
14
|
+
import { T as Bn } from "./tooltip-Cp-PLePW.js";
|
|
15
|
+
import { C as yt } from "./card-DPmk26CL.js";
|
|
16
|
+
import { C as Kn, S as ve } from "./skeleton-B1KTdJ4N.js";
|
|
17
|
+
import { D as _ } from "./dialog-BJiLqhx6.js";
|
|
18
|
+
import { P as In } from "./panel-header-D_mTdhUp.js";
|
|
19
|
+
import { a as Yn, u as Gn, R as Jn } from "./use-list-reflow-C7O4Uqnl.js";
|
|
20
|
+
import { u as Qn } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
21
|
+
import { u as Un } from "./use-theme-CAuo6EYT.js";
|
|
22
|
+
import { N as Xn } from "./notebook-pen-CO7HoM-W.js";
|
|
23
|
+
import { P as Zn } from "./pencil-B1sKKyuT.js";
|
|
24
|
+
import { T as er } from "./trash-2-uumy3fy1.js";
|
|
25
|
+
const tr = {
|
|
26
|
+
id: "notes-panel",
|
|
27
|
+
// 'submit' backs add_note (compose + commit a note). pin / flag are toggles
|
|
28
|
+
// with no dedicated capability in the closed vocabulary.
|
|
29
|
+
capabilities: ["submit"],
|
|
30
|
+
state: {
|
|
31
|
+
notes: {
|
|
32
|
+
type: "Array<{ id?: string; pinned: boolean; flagged: boolean; clinical: boolean; deleted: boolean }>",
|
|
33
|
+
descriptionKey: "ui.agent.notesPanel.state.notes",
|
|
34
|
+
description: "Timeline note ids + pinned / flagged / clinical / deleted flags. Never the note body or author (both PHI). A note whose delete is in flight is left out; a pin or flag in flight is reported with its new value. A deleted note takes no pin or flag.",
|
|
35
|
+
read: (o) => o.getNotes()
|
|
36
|
+
},
|
|
37
|
+
canAddClinical: {
|
|
38
|
+
type: "boolean",
|
|
39
|
+
descriptionKey: "ui.agent.notesPanel.state.canAddClinical",
|
|
40
|
+
description: "Whether the current user may write clinical notes (the practice_add_clinical_note permission gate).",
|
|
41
|
+
read: (o) => o.canAddClinical()
|
|
42
|
+
},
|
|
43
|
+
currentNoteId: {
|
|
44
|
+
type: "string | null",
|
|
45
|
+
descriptionKey: "ui.agent.notesPanel.state.currentNoteId",
|
|
46
|
+
description: "Id of the note the host has addressed — the one marked, scrolled to and focused. Null when none is. An id only, never note content.",
|
|
47
|
+
read: (o) => o.getCurrentNoteId()
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
actions: {
|
|
51
|
+
add_note: {
|
|
52
|
+
// Writes a clinical/admin note body — patient-identifiable content. PHI.
|
|
53
|
+
safety: "phi",
|
|
54
|
+
argsType: "{ content: string; clinical: boolean }",
|
|
55
|
+
argsSchema: {
|
|
56
|
+
type: "object",
|
|
57
|
+
properties: {
|
|
58
|
+
content: {
|
|
59
|
+
type: "string",
|
|
60
|
+
description: "Note body. Rich HTML for the rich composer, else plain text."
|
|
61
|
+
},
|
|
62
|
+
clinical: {
|
|
63
|
+
type: "boolean",
|
|
64
|
+
description: "Whether the note is clinical. Requires the clinical-note permission; the submission is dropped when the gate is closed."
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
required: ["content", "clinical"]
|
|
68
|
+
},
|
|
69
|
+
openWorld: !0,
|
|
70
|
+
descriptionKey: "ui.agent.notesPanel.actions.addNote",
|
|
71
|
+
description: "Compose and commit a new note. A clinical note requires the clinical-note permission (read canAddClinical first).",
|
|
72
|
+
examples: [
|
|
73
|
+
{
|
|
74
|
+
args: { content: "Patient reported improvement.", clinical: !0 },
|
|
75
|
+
note: "Add a clinical note."
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
invoke: (o, f) => o.addNote(f)
|
|
79
|
+
},
|
|
80
|
+
toggle_pin: {
|
|
81
|
+
// A host write; it re-orders the timeline (pinned notes lead).
|
|
82
|
+
safety: "write",
|
|
83
|
+
argsType: "{ id: string }",
|
|
84
|
+
argsSchema: {
|
|
85
|
+
type: "object",
|
|
86
|
+
properties: { id: { type: "string" } },
|
|
87
|
+
required: ["id"]
|
|
88
|
+
},
|
|
89
|
+
idempotent: !1,
|
|
90
|
+
// Reaches the host's data source; the result is the host's promise.
|
|
91
|
+
openWorld: !0,
|
|
92
|
+
errors: [
|
|
93
|
+
"The panel offers no pin here: no onTogglePin, no note with this id, a deleted note, or actions.pin is false.",
|
|
94
|
+
"A pin or delete for this note is still pending. Read notes again once it has settled.",
|
|
95
|
+
"The host refused the change. The pin is restored and the panel shows the host's message."
|
|
96
|
+
],
|
|
97
|
+
descriptionKey: "ui.agent.notesPanel.actions.togglePin",
|
|
98
|
+
description: "Toggle the pinned state of the note with the given id. Returns the host's promise; a refusal restores the pin and the panel shows the host's message. Rejects without reaching the host when the panel refuses: a deleted note, actions.pin false, or a write for the note still pending.",
|
|
99
|
+
invoke: (o, f) => o.togglePin(f.id)
|
|
100
|
+
},
|
|
101
|
+
toggle_flag: {
|
|
102
|
+
safety: "write",
|
|
103
|
+
argsType: "{ id: string }",
|
|
104
|
+
argsSchema: {
|
|
105
|
+
type: "object",
|
|
106
|
+
properties: { id: { type: "string" } },
|
|
107
|
+
required: ["id"]
|
|
108
|
+
},
|
|
109
|
+
idempotent: !1,
|
|
110
|
+
// Reaches the host's data source; the result is the host's promise.
|
|
111
|
+
openWorld: !0,
|
|
112
|
+
errors: [
|
|
113
|
+
"The panel offers no flag here: no onToggleFlag, no note with this id, or a deleted note.",
|
|
114
|
+
"A flag or delete for this note is still pending. Read notes again once it has settled.",
|
|
115
|
+
"The host refused the change. The flag is restored and the panel shows the host's message."
|
|
116
|
+
],
|
|
117
|
+
descriptionKey: "ui.agent.notesPanel.actions.toggleFlag",
|
|
118
|
+
description: "Toggle the flagged state of the note with the given id. Returns the host's promise; a refusal restores the flag and the panel shows the host's message. Rejects without reaching the host when the panel refuses: a deleted note, or a write for the note still pending.",
|
|
119
|
+
invoke: (o, f) => o.toggleFlag(f.id)
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
domHooks: {
|
|
123
|
+
root: {
|
|
124
|
+
attr: "data-component",
|
|
125
|
+
value: "notes-panel",
|
|
126
|
+
description: "Marks the NotesPanel region."
|
|
127
|
+
},
|
|
128
|
+
instanceId: {
|
|
129
|
+
attr: "data-component-id",
|
|
130
|
+
sourceProp: "id",
|
|
131
|
+
description: "Sourced from the id prop. Required to address a specific notes panel from the agent."
|
|
132
|
+
},
|
|
133
|
+
item: {
|
|
134
|
+
attr: "data-note-id",
|
|
135
|
+
description: "Stable note id on each rendered note row. Row controls carry data-note-action: edit, delete, pin or flag."
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}, nr = "ds:isolate ds:[&_[data-component=card]>*]:relative ds:[&_[data-component=card]>*]:z-[1]", rr = Et(
|
|
139
|
+
"ds:relative ds:flex ds:flex-col ds:rounded-[var(--radius-lg)]",
|
|
140
|
+
{
|
|
141
|
+
variants: {
|
|
142
|
+
current: {
|
|
143
|
+
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)]",
|
|
144
|
+
false: ""
|
|
145
|
+
},
|
|
146
|
+
washed: { true: nr, false: "" }
|
|
147
|
+
},
|
|
148
|
+
defaultVariants: { current: !1, washed: !1 }
|
|
149
|
+
}
|
|
150
|
+
), bt = Et(
|
|
151
|
+
"ds:pointer-events-none ds:absolute ds:inset-0 ds:rounded-[var(--radius-lg)] ds:bg-[color:var(--accent)]",
|
|
152
|
+
{
|
|
153
|
+
variants: {
|
|
154
|
+
state: {
|
|
155
|
+
addressed: [
|
|
156
|
+
"ds:opacity-0",
|
|
157
|
+
"ds:animate-[note-addressed_calc(var(--animation-duration)*9)_var(--ease-in-out)]",
|
|
158
|
+
"ds:motion-reduce:animate-none ds:motion-reduce:opacity-[var(--opacity-12)]",
|
|
159
|
+
"ds:[.theme-accessible_&]:animate-none ds:[.theme-accessible_&]:opacity-[var(--opacity-12)]"
|
|
160
|
+
].join(" "),
|
|
161
|
+
editing: "ds:opacity-[var(--opacity-12)]"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
), Nt = [
|
|
166
|
+
"ds:rounded-[var(--radius-lg)] ds:outline-none",
|
|
167
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
168
|
+
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
169
|
+
].join(" "), sr = ["ds:flex ds:flex-col", Nt].join(" "), ir = "ds:opacity-0", lr = [
|
|
170
|
+
"ds:transition-opacity ds:duration-[var(--animation-duration)]",
|
|
171
|
+
"ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
|
|
172
|
+
].join(" "), ar = [3, 2, 3];
|
|
173
|
+
function wt(o) {
|
|
174
|
+
return o ? /<img\b/i.test(o) ? !0 : o.replace(/<[^>]*>/g, "").replace(/ /gi, " ").trim().length > 0 : !1;
|
|
175
|
+
}
|
|
176
|
+
function Pt(o, f, y) {
|
|
177
|
+
const p = o == null ? void 0 : o.toggle(f, y), m = p ? p.refusal : "the panel is not mounted";
|
|
178
|
+
return m === void 0 ? p == null ? void 0 : p.result : Rt(new Error(`NotesPanel: ${y} refused (${m}).`));
|
|
179
|
+
}
|
|
180
|
+
const Tt = /* @__PURE__ */ new Map(), xt = /* @__PURE__ */ new Set();
|
|
181
|
+
function ye(o) {
|
|
182
|
+
return o.map(
|
|
183
|
+
(f) => `${f.id ?? ""}:${f.pinned ? 1 : 0}${f.flagged ? 1 : 0}${f.deleted ? 1 : 0}`
|
|
184
|
+
).join("|");
|
|
185
|
+
}
|
|
186
|
+
function Ct(o) {
|
|
187
|
+
return typeof (o == null ? void 0 : o.then) == "function";
|
|
188
|
+
}
|
|
189
|
+
function St(o, f, y) {
|
|
190
|
+
const p = o.indexOf(y);
|
|
191
|
+
if (p >= 0) return p;
|
|
192
|
+
const m = f.indexOf(y);
|
|
193
|
+
if (m < 0) return -1;
|
|
194
|
+
const ne = new Set(o);
|
|
195
|
+
return f.slice(0, m).filter((E) => ne.has(E)).length;
|
|
196
|
+
}
|
|
197
|
+
function or(o) {
|
|
198
|
+
if (o.hasAttribute("tabindex")) {
|
|
199
|
+
o.focus();
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const f = () => o.removeAttribute("tabindex");
|
|
203
|
+
o.setAttribute("tabindex", "-1"), o.focus(), document.activeElement === o ? o.addEventListener("blur", f, { once: !0 }) : f();
|
|
204
|
+
}
|
|
205
|
+
const jr = Ln(
|
|
206
|
+
function({
|
|
207
|
+
id: f,
|
|
208
|
+
notes: y,
|
|
209
|
+
onAddNote: p,
|
|
210
|
+
status: m = "ready",
|
|
211
|
+
onRetry: ne,
|
|
212
|
+
currentNoteId: E,
|
|
213
|
+
currentNoteKey: Le,
|
|
214
|
+
composer: F = "rich",
|
|
215
|
+
editorToolbar: At = "standard",
|
|
216
|
+
redactor: Ft,
|
|
217
|
+
imageUploadUrl: Vt,
|
|
218
|
+
showClinicalToggle: Ot = !0,
|
|
219
|
+
canAddClinicalNote: re = !0,
|
|
220
|
+
clinicalGatedReason: jt,
|
|
221
|
+
defaultClinical: $ = !1,
|
|
222
|
+
onRequestAiDraft: _t,
|
|
223
|
+
aiDraftFormat: Lt,
|
|
224
|
+
aiPrivacyNotice: qt,
|
|
225
|
+
onDictate: Dt,
|
|
226
|
+
onProofread: kt,
|
|
227
|
+
onAutoFormat: zt,
|
|
228
|
+
aiConsent: Ht,
|
|
229
|
+
variables: Mt,
|
|
230
|
+
validateVariable: Wt,
|
|
231
|
+
onVariableValidityChange: $t,
|
|
232
|
+
renderHelpMeWrite: Bt,
|
|
233
|
+
aiTemplates: Kt,
|
|
234
|
+
onAiApplied: It,
|
|
235
|
+
onUploadImage: Yt,
|
|
236
|
+
onAiCreditsExhausted: Gt,
|
|
237
|
+
showExtensions: Jt,
|
|
238
|
+
aiCreditsNotice: Qt,
|
|
239
|
+
extensions: Ut,
|
|
240
|
+
extensionContext: Xt,
|
|
241
|
+
onExtensionRun: Zt,
|
|
242
|
+
composerBefore: en,
|
|
243
|
+
composerAfter: tn,
|
|
244
|
+
onTogglePin: qe,
|
|
245
|
+
onToggleFlag: De,
|
|
246
|
+
noteActions: ke,
|
|
247
|
+
onEditNote: B,
|
|
248
|
+
editClinical: nn = !1,
|
|
249
|
+
onDeleteNote: K,
|
|
250
|
+
onWriteError: ze,
|
|
251
|
+
confirmDelete: He = !0,
|
|
252
|
+
title: rn,
|
|
253
|
+
composerPlaceholder: sn,
|
|
254
|
+
addNoteLabel: ln,
|
|
255
|
+
emptyState: an,
|
|
256
|
+
className: on,
|
|
257
|
+
"aria-label": be,
|
|
258
|
+
...dn
|
|
259
|
+
}, cn) {
|
|
260
|
+
var ht;
|
|
261
|
+
const { t: a, i18n: Me } = kn(), L = u(null), [k, I] = C(""), [se, ie] = C($), [P, We] = C(!1), [$e, le] = C(null), [g, we] = C(null), Be = u(g);
|
|
262
|
+
Be.current = g;
|
|
263
|
+
const Ke = u(!1);
|
|
264
|
+
m === "loading" && (Ke.current = !0);
|
|
265
|
+
const un = Ke.current ? Kn : "", fn = rn ?? a("notesPanel.title", { defaultValue: "Notes" }), Ie = qn(), Ye = sn ?? a("notesPanel.placeholder", { defaultValue: "Add a note…" }), Ge = g !== null ? a("notesPanel.edit", { defaultValue: "Edit note" }) : a("notesPanel.composerLabel", { defaultValue: "New note" }), gn = F === "rich" ? wt(k) : k.trim().length > 0, R = u(y);
|
|
266
|
+
R.current = y;
|
|
267
|
+
const [Y, hn] = C(Tt), N = u(Tt), [pn, mn] = C(xt), G = u(xt), V = u(!0);
|
|
268
|
+
S(() => (V.current = !0, () => {
|
|
269
|
+
V.current = !1;
|
|
270
|
+
}), []);
|
|
271
|
+
const q = u(null), D = u(ze);
|
|
272
|
+
D.current = ze;
|
|
273
|
+
const Pe = W(() => {
|
|
274
|
+
const e = q.current;
|
|
275
|
+
return !V.current || !e || e.closest('[hidden],[inert],[aria-hidden="true"]') ? !1 : typeof e.checkVisibility == "function" ? e.checkVisibility() : !0;
|
|
276
|
+
}, []), J = u([]), [vn, yn] = C(0), Te = W((e) => {
|
|
277
|
+
if (!V.current) {
|
|
278
|
+
e(!1);
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
J.current.push(e), yn((t) => t + 1);
|
|
282
|
+
}, []);
|
|
283
|
+
S(() => {
|
|
284
|
+
const e = J.current;
|
|
285
|
+
J.current = [], e.forEach((t) => t(!0));
|
|
286
|
+
}, [vn]), S(
|
|
287
|
+
() => () => {
|
|
288
|
+
const e = J.current;
|
|
289
|
+
J.current = [], e.forEach((t) => t(!1));
|
|
290
|
+
},
|
|
291
|
+
[]
|
|
292
|
+
);
|
|
293
|
+
const Je = (e) => {
|
|
294
|
+
const t = new Map(N.current);
|
|
295
|
+
e(t), N.current = t, hn(t);
|
|
296
|
+
}, xe = (e) => {
|
|
297
|
+
const t = new Set(G.current);
|
|
298
|
+
e(t), G.current = t, mn(t);
|
|
299
|
+
}, ae = (e, t) => {
|
|
300
|
+
var n;
|
|
301
|
+
return (n = N.current.get(e)) == null ? void 0 : n[t];
|
|
302
|
+
}, Q = (e, t, n) => Je((l) => {
|
|
303
|
+
const s = { ...l.get(e) };
|
|
304
|
+
n ? s[t] = n : delete s[t], Object.keys(s).length > 0 ? l.set(e, s) : l.delete(e);
|
|
305
|
+
}), Qe = (e) => {
|
|
306
|
+
var t;
|
|
307
|
+
return e != null && !!((t = N.current.get(e)) != null && t.delete);
|
|
308
|
+
}, bn = W(() => {
|
|
309
|
+
var h;
|
|
310
|
+
if (!(g !== null ? B : p) || P) return;
|
|
311
|
+
const t = F === "rich", n = t ? ((h = L.current) == null ? void 0 : h.getHTML()) ?? k : k.trim();
|
|
312
|
+
if (t ? !wt(n) : !n) return;
|
|
313
|
+
const l = () => {
|
|
314
|
+
var c;
|
|
315
|
+
t && ((c = L.current) == null || c.clear()), I(""), ie($), we(null);
|
|
316
|
+
};
|
|
317
|
+
le(null);
|
|
318
|
+
const s = g, r = (c) => Te((v) => {
|
|
319
|
+
var A;
|
|
320
|
+
const T = v && (s === null || Be.current === s && R.current.some((x) => x.id === s && !x.deleted));
|
|
321
|
+
T && le(mt(c, a("notesPanel.addFailed"))), (A = D.current) == null || A.call(D, {
|
|
322
|
+
kind: s !== null ? "edit" : "add",
|
|
323
|
+
noteId: s ?? void 0,
|
|
324
|
+
error: c,
|
|
325
|
+
shown: T && Pe()
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
let d;
|
|
329
|
+
try {
|
|
330
|
+
d = g !== null && B ? B(g, { content: n, clinical: se }) : p == null ? void 0 : p({ content: n, clinical: se });
|
|
331
|
+
} catch (c) {
|
|
332
|
+
r(c);
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
if (!d || typeof d.then != "function") return l();
|
|
336
|
+
We(!0), Promise.resolve(d).then(l, r).finally(() => We(!1));
|
|
337
|
+
}, [
|
|
338
|
+
F,
|
|
339
|
+
k,
|
|
340
|
+
se,
|
|
341
|
+
$,
|
|
342
|
+
g,
|
|
343
|
+
Te,
|
|
344
|
+
p,
|
|
345
|
+
B,
|
|
346
|
+
Pe,
|
|
347
|
+
P,
|
|
348
|
+
a
|
|
349
|
+
]), Ue = Ot && (g === null || nn), wn = g !== null && !!((ht = Y.get(g)) != null && ht.delete), oe = W(
|
|
350
|
+
(e) => {
|
|
351
|
+
try {
|
|
352
|
+
return new Intl.DateTimeFormat(Me.language, {
|
|
353
|
+
day: "numeric",
|
|
354
|
+
month: "long",
|
|
355
|
+
year: "numeric",
|
|
356
|
+
hour: "2-digit",
|
|
357
|
+
minute: "2-digit"
|
|
358
|
+
}).format(new Date(e.dateIso));
|
|
359
|
+
} catch {
|
|
360
|
+
return e.dateIso;
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
[Me.language]
|
|
364
|
+
), Pn = W(
|
|
365
|
+
(e) => {
|
|
366
|
+
var n, l, s, r;
|
|
367
|
+
if (!e.id || P || (n = N.current.get(e.id)) != null && n.delete) return;
|
|
368
|
+
const t = e.content ?? "";
|
|
369
|
+
le(null), we(e.id), ie(e.clinical ?? !1), I(t), F === "rich" && ((l = L.current) == null || l.clear(), (s = L.current) == null || s.insertAtCursor(t, { asHtml: !0 })), (r = L.current) == null || r.focus();
|
|
370
|
+
},
|
|
371
|
+
[F, P]
|
|
372
|
+
), de = W(() => {
|
|
373
|
+
var e;
|
|
374
|
+
F === "rich" && ((e = L.current) == null || e.clear()), I(""), ie($), le(null), we(null);
|
|
375
|
+
}, [F, $]), Xe = g === null || y.some((e) => e.id === g && !e.deleted);
|
|
376
|
+
S(() => {
|
|
377
|
+
Xe || de();
|
|
378
|
+
}, [Xe, de]);
|
|
379
|
+
const Ce = (e) => {
|
|
380
|
+
var t, n;
|
|
381
|
+
return (e.id ? (n = (t = Y.get(e.id)) == null ? void 0 : t.pin) == null ? void 0 : n.next : void 0) ?? !!e.pinned;
|
|
382
|
+
}, Tn = (e) => {
|
|
383
|
+
var t, n;
|
|
384
|
+
return (e.id ? (n = (t = Y.get(e.id)) == null ? void 0 : t.flag) == null ? void 0 : n.next : void 0) ?? !!e.flagged;
|
|
385
|
+
}, z = y.filter((e) => !e.id || !pn.has(e.id)).sort((e, t) => Number(Ce(t)) - Number(Ce(e))), Ze = z.flatMap((e) => e.id ? [e.id] : []), H = u([]);
|
|
386
|
+
H.current = Ze.filter(
|
|
387
|
+
(e) => {
|
|
388
|
+
var t;
|
|
389
|
+
return !((t = Y.get(e)) != null && t.delete);
|
|
390
|
+
}
|
|
391
|
+
);
|
|
392
|
+
const Se = u([]);
|
|
393
|
+
Se.current = Ze;
|
|
394
|
+
const { resolvedTheme: xn } = Un(), et = xn.endsWith("-accessible") || void 0, { containerRef: Cn } = Yn({
|
|
395
|
+
key: z.map((e) => e.id).join(),
|
|
396
|
+
reduceMotion: et
|
|
397
|
+
}), ce = Gn({ reduceMotion: et }), [w, ue] = C(null), tt = u(0), Ee = u(0), nt = () => {
|
|
398
|
+
Ee.current += 1, ue(null);
|
|
399
|
+
}, fe = (e, t, n, l = !0) => {
|
|
400
|
+
const s = Ee.current;
|
|
401
|
+
Te((r) => {
|
|
402
|
+
var h;
|
|
403
|
+
const d = r && l && s === Ee.current && Pe() && R.current.some((c) => c.id === t) && (e === "delete" || !Qe(t) && !G.current.has(t));
|
|
404
|
+
d && (tt.current += 1, ue({
|
|
405
|
+
kind: e,
|
|
406
|
+
noteId: t,
|
|
407
|
+
message: mt(n, ""),
|
|
408
|
+
seq: tt.current
|
|
409
|
+
})), (h = D.current) == null || h.call(D, { kind: e, noteId: t, error: n, shown: d });
|
|
410
|
+
});
|
|
411
|
+
}, Sn = (e) => {
|
|
412
|
+
const t = y.find((l) => l.id === e.noteId), n = t != null && t.dateIso ? oe(t) : "";
|
|
413
|
+
if (n)
|
|
414
|
+
switch (e.kind) {
|
|
415
|
+
case "delete":
|
|
416
|
+
return a("notesPanel.deleteFailedNamed", { date: n });
|
|
417
|
+
case "pin":
|
|
418
|
+
return a("notesPanel.pinFailedNamed", { date: n });
|
|
419
|
+
case "unpin":
|
|
420
|
+
return a("notesPanel.unpinFailedNamed", { date: n });
|
|
421
|
+
case "flag":
|
|
422
|
+
return a("notesPanel.flagFailedNamed", { date: n });
|
|
423
|
+
default:
|
|
424
|
+
return a("notesPanel.unflagFailedNamed", { date: n });
|
|
425
|
+
}
|
|
426
|
+
switch (e.kind) {
|
|
427
|
+
case "delete":
|
|
428
|
+
return a("notesPanel.deleteFailed");
|
|
429
|
+
case "pin":
|
|
430
|
+
return a("notesPanel.pinFailed");
|
|
431
|
+
case "unpin":
|
|
432
|
+
return a("notesPanel.unpinFailed");
|
|
433
|
+
case "flag":
|
|
434
|
+
return a("notesPanel.flagFailed");
|
|
435
|
+
default:
|
|
436
|
+
return a("notesPanel.unflagFailed");
|
|
437
|
+
}
|
|
438
|
+
}, ge = w !== null && y.some((e) => e.id === w.noteId), rt = u(null);
|
|
439
|
+
w && ge && (rt.current = w), S(() => {
|
|
440
|
+
w && !ge && ue(null);
|
|
441
|
+
}, [w, ge]);
|
|
442
|
+
const [Re, st] = C({ text: "", seq: 0 }), Ne = u(void 0), it = (e) => {
|
|
443
|
+
st((t) => ({ text: e, seq: t.seq + 1 })), window.clearTimeout(Ne.current), Ne.current = window.setTimeout(
|
|
444
|
+
() => st((t) => ({ ...t, text: "" })),
|
|
445
|
+
1e3
|
|
446
|
+
);
|
|
447
|
+
};
|
|
448
|
+
S(() => () => window.clearTimeout(Ne.current), []);
|
|
449
|
+
const lt = () => it(a("notesPanel.deleted")), he = u(0), at = u(m);
|
|
450
|
+
S(() => {
|
|
451
|
+
at.current === "loading" && m === "ready" && (he.current += 1), at.current = m;
|
|
452
|
+
}, [m]);
|
|
453
|
+
const ot = () => {
|
|
454
|
+
const e = R.current, t = ye(e), n = new Map(e.map((r) => [r.id, r])), l = [];
|
|
455
|
+
if (N.current.forEach((r, d) => {
|
|
456
|
+
const h = n.get(d);
|
|
457
|
+
Object.keys(r).forEach((c) => {
|
|
458
|
+
const v = r[c];
|
|
459
|
+
if (!v) return;
|
|
460
|
+
if (!h) {
|
|
461
|
+
l.push([d, c]);
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
if (!v.settled) return;
|
|
465
|
+
const T = c === "delete" ? h.deleted === !0 : (c === "pin" ? !!h.pinned : !!h.flagged) === v.next, A = he.current > v.edgeAtSettle || c !== "delete" && t !== v.sigAtSettle;
|
|
466
|
+
(T || A) && l.push([d, c]);
|
|
467
|
+
});
|
|
468
|
+
}), l.length === 0) return;
|
|
469
|
+
Je(
|
|
470
|
+
(r) => l.forEach(([d, h]) => {
|
|
471
|
+
const c = { ...r.get(d) };
|
|
472
|
+
delete c[h], Object.keys(c).length > 0 ? r.set(d, c) : r.delete(d);
|
|
473
|
+
})
|
|
474
|
+
);
|
|
475
|
+
const s = l.filter(([, r]) => r === "delete").map(([r]) => r);
|
|
476
|
+
s.some((r) => G.current.has(r)) && xe((r) => s.forEach((d) => r.delete(d))), s.forEach((r) => ce.cancel(r));
|
|
477
|
+
}, dt = (e, t, n) => {
|
|
478
|
+
ae(e, t) === n && (Q(e, t, {
|
|
479
|
+
...n,
|
|
480
|
+
settled: !0,
|
|
481
|
+
edgeAtSettle: he.current,
|
|
482
|
+
sigAtSettle: ye(R.current)
|
|
483
|
+
}), ot());
|
|
484
|
+
}, ct = (e, t, n) => ae(e, t) !== n ? !1 : (Q(e, t, void 0), t !== "delete" || (G.current.has(e) && xe((l) => l.delete(e)), ce.cancel(e)), !0), En = pt(() => ye(y), [y]);
|
|
485
|
+
S(() => {
|
|
486
|
+
ot();
|
|
487
|
+
}, [En, m]);
|
|
488
|
+
const Ae = (e, t) => {
|
|
489
|
+
var A;
|
|
490
|
+
const n = t === "pin" ? qe : De, l = (x) => ({
|
|
491
|
+
started: !1,
|
|
492
|
+
refusal: x
|
|
493
|
+
});
|
|
494
|
+
if (!n)
|
|
495
|
+
return l(t === "pin" ? "no onTogglePin" : "no onToggleFlag");
|
|
496
|
+
const s = R.current.find((x) => x.id === e);
|
|
497
|
+
if (!s) return l("no note has this id");
|
|
498
|
+
if (s.deleted) return l("the note is deleted");
|
|
499
|
+
if (t === "pin" && ((A = s.actions) == null ? void 0 : A.pin) === !1)
|
|
500
|
+
return l("actions.pin is false for this note");
|
|
501
|
+
const r = N.current.get(e);
|
|
502
|
+
if (r != null && r.delete) return l("the note is being deleted");
|
|
503
|
+
if (r != null && r[t])
|
|
504
|
+
return l(`a ${t} write for this note is still pending`);
|
|
505
|
+
const d = !(t === "pin" ? s.pinned : s.flagged), h = t === "pin" ? d ? "pin" : "unpin" : d ? "flag" : "unflag";
|
|
506
|
+
nt();
|
|
507
|
+
let c;
|
|
508
|
+
try {
|
|
509
|
+
c = n(e, d);
|
|
510
|
+
} catch (x) {
|
|
511
|
+
return fe(h, e, x), { started: !1, result: Rt(x) };
|
|
512
|
+
}
|
|
513
|
+
if (!Ct(c)) return { started: !0, result: c };
|
|
514
|
+
const v = {
|
|
515
|
+
next: d,
|
|
516
|
+
settled: !1,
|
|
517
|
+
edgeAtSettle: 0,
|
|
518
|
+
sigAtSettle: ""
|
|
519
|
+
};
|
|
520
|
+
Q(e, t, v);
|
|
521
|
+
const T = Promise.resolve(c);
|
|
522
|
+
return T.then(
|
|
523
|
+
() => {
|
|
524
|
+
V.current && dt(e, t, v);
|
|
525
|
+
},
|
|
526
|
+
(x) => {
|
|
527
|
+
const jn = V.current && ct(e, t, v);
|
|
528
|
+
fe(h, e, x, jn);
|
|
529
|
+
}
|
|
530
|
+
), { started: !0, result: T };
|
|
531
|
+
}, ut = (e) => {
|
|
532
|
+
var l;
|
|
533
|
+
if (!K) return !1;
|
|
534
|
+
const t = R.current.find((s) => s.id === e);
|
|
535
|
+
if (!t || t.deleted || ((l = t.actions) == null ? void 0 : l.delete) === !1 || ae(e, "delete")) return !1;
|
|
536
|
+
nt();
|
|
537
|
+
let n;
|
|
538
|
+
try {
|
|
539
|
+
n = K(e);
|
|
540
|
+
} catch (s) {
|
|
541
|
+
return fe("delete", e, s), !1;
|
|
542
|
+
}
|
|
543
|
+
if (Ct(n)) {
|
|
544
|
+
const s = {
|
|
545
|
+
settled: !1,
|
|
546
|
+
edgeAtSettle: 0,
|
|
547
|
+
sigAtSettle: ""
|
|
548
|
+
};
|
|
549
|
+
Q(e, "delete", s), t.keptOnDelete && it(
|
|
550
|
+
t.dateIso ? a("notesPanel.deletingNamed", { date: oe(t) }) : a("notesPanel.deleting")
|
|
551
|
+
), Promise.resolve(n).then(
|
|
552
|
+
() => {
|
|
553
|
+
V.current && (lt(), dt(e, "delete", s));
|
|
554
|
+
},
|
|
555
|
+
(r) => {
|
|
556
|
+
const d = V.current && ct(e, "delete", s);
|
|
557
|
+
fe("delete", e, r, d);
|
|
558
|
+
}
|
|
559
|
+
);
|
|
560
|
+
} else
|
|
561
|
+
Q(e, "delete", {
|
|
562
|
+
settled: !0,
|
|
563
|
+
edgeAtSettle: he.current,
|
|
564
|
+
sigAtSettle: ye(R.current)
|
|
565
|
+
}), lt();
|
|
566
|
+
return t.keptOnDelete || ce.leave(e, () => {
|
|
567
|
+
ae(e, "delete") && xe((s) => s.add(e));
|
|
568
|
+
}), !0;
|
|
569
|
+
}, [U, X] = C(null), pe = u(null), Rn = (e) => {
|
|
570
|
+
if (!(!K || Qe(e)) && !(P && g === e)) {
|
|
571
|
+
if (!He) {
|
|
572
|
+
ut(e);
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
575
|
+
pe.current = { noteId: e, index: -1, started: !1 }, X(e);
|
|
576
|
+
}
|
|
577
|
+
}, Nn = () => {
|
|
578
|
+
const e = U;
|
|
579
|
+
if (!e) return;
|
|
580
|
+
const t = H.current.indexOf(e);
|
|
581
|
+
ut(e) && (pe.current = { noteId: e, index: t, started: !0 }), X(null);
|
|
582
|
+
}, Fe = U !== null && y.some((e) => e.id === U && !e.deleted);
|
|
583
|
+
S(() => {
|
|
584
|
+
U !== null && !Fe && X(null);
|
|
585
|
+
}, [U, Fe]), Dn(cn, () => q.current, []);
|
|
586
|
+
const O = (e, t) => {
|
|
587
|
+
var n;
|
|
588
|
+
return e ? ((n = q.current) == null ? void 0 : n.querySelector(
|
|
589
|
+
`[data-note-id="${CSS.escape(e)}"] ${t ? `[data-note-action="${CSS.escape(t)}"]` : "[data-note-action]"}`
|
|
590
|
+
)) ?? null : null;
|
|
591
|
+
}, me = (e, t) => {
|
|
592
|
+
const n = H.current;
|
|
593
|
+
return O(n[e], t) ?? O(n[e - 1], t) ?? O(n[e], null) ?? O(n[e - 1], null);
|
|
594
|
+
}, An = () => {
|
|
595
|
+
const e = q.current, t = (e == null ? void 0 : e.querySelector("[data-notes-panel-empty]")) ?? e;
|
|
596
|
+
t && or(t);
|
|
597
|
+
}, Z = (e) => {
|
|
598
|
+
e ? e.focus() : An();
|
|
599
|
+
}, Fn = (e) => {
|
|
600
|
+
const t = pe.current;
|
|
601
|
+
if (pe.current = null, !t) return;
|
|
602
|
+
e.preventDefault();
|
|
603
|
+
const n = O(t.noteId, "delete");
|
|
604
|
+
Z(
|
|
605
|
+
t.started ? me(t.index, "delete") ?? n : n
|
|
606
|
+
);
|
|
607
|
+
}, Ve = u(null), ft = (e) => {
|
|
608
|
+
const t = e.kind === "delete" ? "delete" : e.kind.endsWith("pin") ? "pin" : "flag", n = H.current.indexOf(e.noteId);
|
|
609
|
+
return O(e.noteId, t) ?? O(e.noteId, null) ?? (n >= 0 ? me(n, t) : null);
|
|
610
|
+
}, Vn = (e) => {
|
|
611
|
+
var t;
|
|
612
|
+
(t = Ve.current) != null && t.contains(document.activeElement) && Z(ft(e)), ue(null);
|
|
613
|
+
}, M = u(null);
|
|
614
|
+
S(() => {
|
|
615
|
+
const e = q.current;
|
|
616
|
+
if (!e) return;
|
|
617
|
+
const t = (l) => {
|
|
618
|
+
var d, h;
|
|
619
|
+
const s = l.target;
|
|
620
|
+
if (!(s instanceof HTMLElement)) return;
|
|
621
|
+
const r = ((d = s.closest("[data-note-id]")) == null ? void 0 : d.dataset.noteId) ?? null;
|
|
622
|
+
M.current = {
|
|
623
|
+
el: s,
|
|
624
|
+
noteId: r,
|
|
625
|
+
action: ((h = s.closest("[data-note-action]")) == null ? void 0 : h.dataset.noteAction) ?? null,
|
|
626
|
+
index: r ? St(H.current, Se.current, r) : -1,
|
|
627
|
+
inWriteError: !!s.closest("[data-notes-panel-write-error]")
|
|
628
|
+
};
|
|
629
|
+
}, n = (l) => {
|
|
630
|
+
const s = l.relatedTarget;
|
|
631
|
+
if (s instanceof Node) {
|
|
632
|
+
e.contains(s) || (M.current = null);
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
635
|
+
const r = l.target;
|
|
636
|
+
queueMicrotask(() => {
|
|
637
|
+
const d = M.current;
|
|
638
|
+
d && d.el === r && d.el.isConnected && document.activeElement !== d.el && (M.current = null);
|
|
639
|
+
});
|
|
640
|
+
};
|
|
641
|
+
return e.addEventListener("focusin", t), e.addEventListener("focusout", n), () => {
|
|
642
|
+
e.removeEventListener("focusin", t), e.removeEventListener("focusout", n);
|
|
643
|
+
};
|
|
644
|
+
}, []), Qn(() => {
|
|
645
|
+
var l;
|
|
646
|
+
const e = M.current;
|
|
647
|
+
if (!e || !q.current) return;
|
|
648
|
+
if (e.el.isConnected) {
|
|
649
|
+
const s = e.noteId ? St(
|
|
650
|
+
H.current,
|
|
651
|
+
Se.current,
|
|
652
|
+
e.noteId
|
|
653
|
+
) : -1;
|
|
654
|
+
s >= 0 && (e.index = s);
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
M.current = null;
|
|
658
|
+
const t = document.activeElement;
|
|
659
|
+
if (t && t !== document.body) return;
|
|
660
|
+
const n = e.action ? O(e.noteId, e.action) : null;
|
|
661
|
+
if (n) n.focus();
|
|
662
|
+
else if (e.noteId)
|
|
663
|
+
Z(me(e.index, e.action));
|
|
664
|
+
else if (e.el.hasAttribute("data-notes-panel-empty"))
|
|
665
|
+
Z(me(0, "delete"));
|
|
666
|
+
else if (e.inWriteError) {
|
|
667
|
+
const s = (l = Ve.current) == null ? void 0 : l.querySelector(
|
|
668
|
+
"[data-alert-dismiss]"
|
|
669
|
+
), r = rt.current;
|
|
670
|
+
s ? s.focus() : Z(r ? ft(r) : null);
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
const Oe = u(null);
|
|
674
|
+
S(() => {
|
|
675
|
+
var e, t;
|
|
676
|
+
E && ((e = Oe.current) == null || e.scrollIntoView({ block: "center" }), (t = Oe.current) == null || t.focus());
|
|
677
|
+
}, [E, Le]);
|
|
678
|
+
const ee = u(p);
|
|
679
|
+
ee.current = p;
|
|
680
|
+
const je = u(re);
|
|
681
|
+
je.current = re;
|
|
682
|
+
const gt = u(E);
|
|
683
|
+
gt.current = E;
|
|
684
|
+
const _e = u(null);
|
|
685
|
+
_e.current = { toggle: Ae };
|
|
686
|
+
const On = pt(
|
|
687
|
+
() => ({
|
|
688
|
+
// Ids + flags only — never the note body or author (both PHI).
|
|
689
|
+
getNotes: () => R.current.filter((e) => {
|
|
690
|
+
var t;
|
|
691
|
+
return !(e.id && ((t = N.current.get(e.id)) != null && t.delete));
|
|
692
|
+
}).map((e) => {
|
|
693
|
+
var n, l;
|
|
694
|
+
const t = e.id ? N.current.get(e.id) : void 0;
|
|
695
|
+
return {
|
|
696
|
+
id: e.id,
|
|
697
|
+
pinned: ((n = t == null ? void 0 : t.pin) == null ? void 0 : n.next) ?? !!e.pinned,
|
|
698
|
+
flagged: ((l = t == null ? void 0 : t.flag) == null ? void 0 : l.next) ?? !!e.flagged,
|
|
699
|
+
clinical: !!e.clinical,
|
|
700
|
+
deleted: !!e.deleted
|
|
701
|
+
};
|
|
702
|
+
}),
|
|
703
|
+
canAddNote: () => !!ee.current,
|
|
704
|
+
canAddClinical: () => je.current,
|
|
705
|
+
getCurrentNoteId: () => gt.current ?? null,
|
|
706
|
+
addNote: (e) => {
|
|
707
|
+
var t;
|
|
708
|
+
if (!(e.clinical && !je.current))
|
|
709
|
+
return (t = ee.current) == null ? void 0 : t.call(ee, e);
|
|
710
|
+
},
|
|
711
|
+
togglePin: (e) => Pt(_e.current, e, "pin"),
|
|
712
|
+
toggleFlag: (e) => Pt(_e.current, e, "flag")
|
|
713
|
+
}),
|
|
714
|
+
[]
|
|
715
|
+
);
|
|
716
|
+
return zn(tr, On, f), /* @__PURE__ */ b(
|
|
717
|
+
"section",
|
|
718
|
+
{
|
|
719
|
+
ref: q,
|
|
720
|
+
"data-component": "notes-panel",
|
|
721
|
+
"data-component-id": f,
|
|
722
|
+
"aria-labelledby": be ? void 0 : Ie,
|
|
723
|
+
"aria-label": be,
|
|
724
|
+
className: [sr, on].filter(Boolean).join(" "),
|
|
725
|
+
...dn,
|
|
726
|
+
children: [
|
|
727
|
+
/* @__PURE__ */ i(
|
|
728
|
+
In,
|
|
729
|
+
{
|
|
730
|
+
title: fn,
|
|
731
|
+
icon: /* @__PURE__ */ i(Xn, { "aria-hidden": "true" }),
|
|
732
|
+
headingId: be ? void 0 : Ie,
|
|
733
|
+
sticky: !0,
|
|
734
|
+
divider: !0
|
|
735
|
+
}
|
|
736
|
+
),
|
|
737
|
+
/* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
|
|
738
|
+
p || g !== null ? /* @__PURE__ */ b(
|
|
739
|
+
"div",
|
|
740
|
+
{
|
|
741
|
+
"data-notes-panel-composer": g !== null ? "edit" : "add",
|
|
742
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
743
|
+
children: [
|
|
744
|
+
en,
|
|
745
|
+
F === "rich" ? /* @__PURE__ */ i(
|
|
746
|
+
Mn,
|
|
747
|
+
{
|
|
748
|
+
ref: L,
|
|
749
|
+
ariaLabel: Ge,
|
|
750
|
+
placeholder: Ye,
|
|
751
|
+
toolbar: At,
|
|
752
|
+
minHeight: "fill",
|
|
753
|
+
redactor: Ft,
|
|
754
|
+
imageUploadUrl: Vt,
|
|
755
|
+
readOnly: P,
|
|
756
|
+
onChange: ({ html: e }) => I(e),
|
|
757
|
+
onRequestAiDraft: _t,
|
|
758
|
+
aiDraftFormat: Lt,
|
|
759
|
+
aiPrivacyNotice: qt,
|
|
760
|
+
onDictate: Dt,
|
|
761
|
+
onProofread: kt,
|
|
762
|
+
onAutoFormat: zt,
|
|
763
|
+
aiConsent: Ht,
|
|
764
|
+
variables: Mt,
|
|
765
|
+
validateVariable: Wt,
|
|
766
|
+
onVariableValidityChange: $t,
|
|
767
|
+
renderHelpMeWrite: Bt,
|
|
768
|
+
aiTemplates: Kt,
|
|
769
|
+
onAiApplied: It,
|
|
770
|
+
onUploadImage: Yt,
|
|
771
|
+
onAiCreditsExhausted: Gt,
|
|
772
|
+
showExtensions: Jt,
|
|
773
|
+
aiCreditsNotice: Qt,
|
|
774
|
+
extensions: Ut,
|
|
775
|
+
extensionContext: Xt,
|
|
776
|
+
onExtensionRun: Zt,
|
|
777
|
+
aiConsentHeadingLevel: 3
|
|
778
|
+
}
|
|
779
|
+
) : /* @__PURE__ */ i(
|
|
780
|
+
Wn,
|
|
781
|
+
{
|
|
782
|
+
value: k,
|
|
783
|
+
readOnly: P,
|
|
784
|
+
onChange: (e) => I(e.target.value),
|
|
785
|
+
placeholder: Ye,
|
|
786
|
+
autoResize: !0,
|
|
787
|
+
minRows: 2,
|
|
788
|
+
maxRows: 6,
|
|
789
|
+
"aria-label": Ge
|
|
790
|
+
}
|
|
791
|
+
),
|
|
792
|
+
/* @__PURE__ */ b(
|
|
793
|
+
"div",
|
|
794
|
+
{
|
|
795
|
+
className: [
|
|
796
|
+
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
797
|
+
Ue ? "ds:justify-between" : "ds:justify-end"
|
|
798
|
+
].join(" "),
|
|
799
|
+
children: [
|
|
800
|
+
Ue ? (() => {
|
|
801
|
+
const e = P || !re, t = re ? void 0 : jt ?? a("notesPanel.clinicalGated", {
|
|
802
|
+
defaultValue: "You do not have permission to write clinical notes."
|
|
803
|
+
}), n = /* @__PURE__ */ i(
|
|
804
|
+
$n,
|
|
805
|
+
{
|
|
806
|
+
size: "sm",
|
|
807
|
+
label: a("notesPanel.clinicalToggle", {
|
|
808
|
+
defaultValue: "Clinical note"
|
|
809
|
+
}),
|
|
810
|
+
checked: se,
|
|
811
|
+
onCheckedChange: ie,
|
|
812
|
+
disabled: e
|
|
813
|
+
}
|
|
814
|
+
);
|
|
815
|
+
return e && t ? /* @__PURE__ */ i(Bn, { label: t, children: /* @__PURE__ */ i("span", { tabIndex: 0, children: n }) }) : n;
|
|
816
|
+
})() : null,
|
|
817
|
+
/* @__PURE__ */ b("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
818
|
+
g !== null ? /* @__PURE__ */ i(
|
|
819
|
+
te,
|
|
820
|
+
{
|
|
821
|
+
type: "button",
|
|
822
|
+
size: "sm",
|
|
823
|
+
intent: "ghost",
|
|
824
|
+
onClick: de,
|
|
825
|
+
disabled: P,
|
|
826
|
+
children: a("notesPanel.cancelEdit", { defaultValue: "Cancel" })
|
|
827
|
+
}
|
|
828
|
+
) : null,
|
|
829
|
+
/* @__PURE__ */ i(
|
|
830
|
+
te,
|
|
831
|
+
{
|
|
832
|
+
type: "button",
|
|
833
|
+
size: "sm",
|
|
834
|
+
onClick: bn,
|
|
835
|
+
disabled: !gn || wn,
|
|
836
|
+
loading: P,
|
|
837
|
+
children: g !== null ? a("notesPanel.saveEdit", { defaultValue: "Save note" }) : ln ?? a("notesPanel.add", { defaultValue: "Add note" })
|
|
838
|
+
}
|
|
839
|
+
)
|
|
840
|
+
] })
|
|
841
|
+
]
|
|
842
|
+
}
|
|
843
|
+
),
|
|
844
|
+
$e ? /* @__PURE__ */ i(j, { variant: "error", children: /* @__PURE__ */ i(j.Description, { children: $e }) }) : null,
|
|
845
|
+
tn
|
|
846
|
+
]
|
|
847
|
+
}
|
|
848
|
+
) : null,
|
|
849
|
+
m === "loading" && z.length === 0 ? (
|
|
850
|
+
/* Note-shaped placeholders, not a spinner: the reader sees where
|
|
851
|
+
the notes will land and how many to expect. The status text is
|
|
852
|
+
for assistive tech only; sighted readers get the motion. */
|
|
853
|
+
/* @__PURE__ */ b(
|
|
854
|
+
"div",
|
|
855
|
+
{
|
|
856
|
+
"data-notes-panel-loading": "",
|
|
857
|
+
"aria-busy": "true",
|
|
858
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
859
|
+
children: [
|
|
860
|
+
/* @__PURE__ */ i("span", { role: "status", className: "ds:sr-only", children: a("notesPanel.loading") }),
|
|
861
|
+
ar.map((e, t) => /* @__PURE__ */ i(yt, { variant: "elevated", "aria-hidden": "true", children: /* @__PURE__ */ i(yt.Body, { children: /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
862
|
+
/* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
863
|
+
/* @__PURE__ */ i(
|
|
864
|
+
ve,
|
|
865
|
+
{
|
|
866
|
+
variant: "circular",
|
|
867
|
+
size: "sm",
|
|
868
|
+
stagger: t * 2
|
|
869
|
+
}
|
|
870
|
+
),
|
|
871
|
+
/* @__PURE__ */ b("div", { className: "ds:flex ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
872
|
+
/* @__PURE__ */ i(
|
|
873
|
+
ve,
|
|
874
|
+
{
|
|
875
|
+
variant: "text",
|
|
876
|
+
size: "sm",
|
|
877
|
+
stagger: t * 2,
|
|
878
|
+
width: "40%"
|
|
879
|
+
}
|
|
880
|
+
),
|
|
881
|
+
/* @__PURE__ */ i(
|
|
882
|
+
ve,
|
|
883
|
+
{
|
|
884
|
+
variant: "text",
|
|
885
|
+
size: "sm",
|
|
886
|
+
stagger: t * 2,
|
|
887
|
+
width: "25%"
|
|
888
|
+
}
|
|
889
|
+
)
|
|
890
|
+
] })
|
|
891
|
+
] }),
|
|
892
|
+
/* @__PURE__ */ i(
|
|
893
|
+
ve,
|
|
894
|
+
{
|
|
895
|
+
variant: "text",
|
|
896
|
+
size: "sm",
|
|
897
|
+
lines: e,
|
|
898
|
+
stagger: t * 2 + 1
|
|
899
|
+
}
|
|
900
|
+
)
|
|
901
|
+
] }) }) }, t))
|
|
902
|
+
]
|
|
903
|
+
}
|
|
904
|
+
)
|
|
905
|
+
) : m === "error" ? /* @__PURE__ */ b(j, { variant: "error", children: [
|
|
906
|
+
/* @__PURE__ */ i(j.Description, { children: a("notesPanel.loadError") }),
|
|
907
|
+
ne ? /* @__PURE__ */ i(j.Action, { children: /* @__PURE__ */ i(te, { intent: "secondary", size: "sm", onClick: ne, children: a("notesPanel.retry") }) }) : null
|
|
908
|
+
] }) : null,
|
|
909
|
+
w && ge ? /* @__PURE__ */ b(
|
|
910
|
+
j,
|
|
911
|
+
{
|
|
912
|
+
ref: Ve,
|
|
913
|
+
variant: "error",
|
|
914
|
+
dismissible: !0,
|
|
915
|
+
onOpenChange: (e) => {
|
|
916
|
+
e || Vn(w);
|
|
917
|
+
},
|
|
918
|
+
"data-notes-panel-write-error": w.kind,
|
|
919
|
+
children: [
|
|
920
|
+
/* @__PURE__ */ i(j.Title, { as: "p", children: Sn(w) }),
|
|
921
|
+
w.message ? /* @__PURE__ */ i(j.Description, { children: w.message }) : null
|
|
922
|
+
]
|
|
923
|
+
},
|
|
924
|
+
w.seq
|
|
925
|
+
) : null,
|
|
926
|
+
/* @__PURE__ */ i(
|
|
927
|
+
"span",
|
|
928
|
+
{
|
|
929
|
+
"aria-live": "polite",
|
|
930
|
+
"aria-atomic": "true",
|
|
931
|
+
"data-notes-panel-announcer": "",
|
|
932
|
+
className: "ds:sr-only",
|
|
933
|
+
children: Re.text ? /* @__PURE__ */ i("span", { children: Re.text }, Re.seq) : null
|
|
934
|
+
}
|
|
935
|
+
),
|
|
936
|
+
m === "loading" && z.length > 0 ? /* @__PURE__ */ i("span", { role: "status", className: "ds:sr-only", children: a("notesPanel.loading") }) : null,
|
|
937
|
+
z.length > 0 ? /* @__PURE__ */ i(
|
|
938
|
+
"ul",
|
|
939
|
+
{
|
|
940
|
+
ref: Cn,
|
|
941
|
+
"aria-busy": m === "loading" || void 0,
|
|
942
|
+
className: `ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0 ${un}`.trim(),
|
|
943
|
+
children: z.map(({ actions: e, keptOnDelete: t, ...n }, l) => {
|
|
944
|
+
const s = E != null && n.id === E, r = n.id, d = r != null && g === r, h = r != null && ce.isLeaving(r), c = r ? Y.get(r) : void 0, v = !!(c != null && c.delete), T = v && !!t, A = P && d;
|
|
945
|
+
return /* @__PURE__ */ b(
|
|
946
|
+
"li",
|
|
947
|
+
{
|
|
948
|
+
ref: s ? Oe : void 0,
|
|
949
|
+
"data-note-id": r,
|
|
950
|
+
tabIndex: s ? -1 : void 0,
|
|
951
|
+
"aria-current": s ? "true" : void 0,
|
|
952
|
+
"data-reflow-id": r,
|
|
953
|
+
"data-leaving": h ? "" : void 0,
|
|
954
|
+
"data-editing": d ? "" : void 0,
|
|
955
|
+
"aria-busy": T || void 0,
|
|
956
|
+
className: [
|
|
957
|
+
rr({
|
|
958
|
+
current: s,
|
|
959
|
+
washed: s || d
|
|
960
|
+
}),
|
|
961
|
+
lr,
|
|
962
|
+
Jn,
|
|
963
|
+
h ? ir : ""
|
|
964
|
+
].filter(Boolean).join(" "),
|
|
965
|
+
children: [
|
|
966
|
+
s ? /* @__PURE__ */ i("span", { className: "ds:sr-only", children: a("notesPanel.current", {
|
|
967
|
+
defaultValue: "Current note"
|
|
968
|
+
}) }) : null,
|
|
969
|
+
T ? /* @__PURE__ */ i("span", { "data-notes-panel-deleting": "", className: "ds:sr-only", children: a("notesPanel.deleting") }) : null,
|
|
970
|
+
d ? /* @__PURE__ */ i(
|
|
971
|
+
"span",
|
|
972
|
+
{
|
|
973
|
+
"aria-hidden": "true",
|
|
974
|
+
"data-notes-panel-wash": "editing",
|
|
975
|
+
className: bt({ state: "editing" })
|
|
976
|
+
}
|
|
977
|
+
) : s ? /* @__PURE__ */ i(
|
|
978
|
+
"span",
|
|
979
|
+
{
|
|
980
|
+
"aria-hidden": "true",
|
|
981
|
+
"data-notes-panel-wash": "addressed",
|
|
982
|
+
className: bt({ state: "addressed" })
|
|
983
|
+
},
|
|
984
|
+
`${E}:${Le ?? ""}`
|
|
985
|
+
) : null,
|
|
986
|
+
/* @__PURE__ */ i(
|
|
987
|
+
Hn,
|
|
988
|
+
{
|
|
989
|
+
surface: "elevated",
|
|
990
|
+
truncate: !s,
|
|
991
|
+
headerActions: /* @__PURE__ */ b(_n, { children: [
|
|
992
|
+
ke ? ke(
|
|
993
|
+
{ ...n, actions: e, keptOnDelete: t },
|
|
994
|
+
{ deleting: v }
|
|
995
|
+
) : null,
|
|
996
|
+
B && r && !n.deleted && (e == null ? void 0 : e.edit) !== !1 ? /* @__PURE__ */ i(
|
|
997
|
+
vt,
|
|
998
|
+
{
|
|
999
|
+
icon: /* @__PURE__ */ i(Zn, {}),
|
|
1000
|
+
intent: "ghost",
|
|
1001
|
+
size: "sm",
|
|
1002
|
+
"aria-label": a("notesPanel.editNamed", {
|
|
1003
|
+
date: oe(n),
|
|
1004
|
+
defaultValue: "Edit note · {{date}}"
|
|
1005
|
+
}),
|
|
1006
|
+
tooltip: a("notesPanel.edit", {
|
|
1007
|
+
defaultValue: "Edit note"
|
|
1008
|
+
}),
|
|
1009
|
+
"aria-pressed": g === r,
|
|
1010
|
+
disabled: P || v,
|
|
1011
|
+
"data-notes-panel-edit": "",
|
|
1012
|
+
"data-note-action": "edit",
|
|
1013
|
+
onClick: () => g === r ? de() : Pn(n)
|
|
1014
|
+
}
|
|
1015
|
+
) : null,
|
|
1016
|
+
K && r && !n.deleted && (e == null ? void 0 : e.delete) !== !1 ? /* @__PURE__ */ i(
|
|
1017
|
+
vt,
|
|
1018
|
+
{
|
|
1019
|
+
icon: /* @__PURE__ */ i(er, {}),
|
|
1020
|
+
intent: "ghost",
|
|
1021
|
+
size: "sm",
|
|
1022
|
+
"aria-label": a("notesPanel.deleteNamed", {
|
|
1023
|
+
date: oe(n),
|
|
1024
|
+
defaultValue: "Delete note · {{date}}"
|
|
1025
|
+
}),
|
|
1026
|
+
tooltip: a("notesPanel.delete", {
|
|
1027
|
+
defaultValue: "Delete note"
|
|
1028
|
+
}),
|
|
1029
|
+
"data-note-action": "delete",
|
|
1030
|
+
"aria-disabled": T || A || void 0,
|
|
1031
|
+
"aria-busy": T || void 0,
|
|
1032
|
+
onClick: () => Rn(r)
|
|
1033
|
+
}
|
|
1034
|
+
) : null
|
|
1035
|
+
] }),
|
|
1036
|
+
...n,
|
|
1037
|
+
pinned: Ce(n),
|
|
1038
|
+
flagged: Tn(n),
|
|
1039
|
+
pinPending: !!(c != null && c.pin) || v,
|
|
1040
|
+
flagPending: !!(c != null && c.flag) || v,
|
|
1041
|
+
onTogglePin: qe && r && (e == null ? void 0 : e.pin) !== !1 && !n.deleted ? () => Ae(r, "pin") : void 0,
|
|
1042
|
+
onToggleFlag: De && r && !n.deleted ? () => Ae(r, "flag") : void 0
|
|
1043
|
+
}
|
|
1044
|
+
)
|
|
1045
|
+
]
|
|
1046
|
+
},
|
|
1047
|
+
n.id ?? l
|
|
1048
|
+
);
|
|
1049
|
+
})
|
|
1050
|
+
}
|
|
1051
|
+
) : m !== "ready" ? null : (
|
|
1052
|
+
/* Where focus lands, from script, when the last note leaves. */
|
|
1053
|
+
/* @__PURE__ */ i("div", { "data-notes-panel-empty": "", className: Nt, children: an ?? /* @__PURE__ */ i("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: a("notesPanel.empty", { defaultValue: "No notes yet." }) }) })
|
|
1054
|
+
)
|
|
1055
|
+
] }),
|
|
1056
|
+
K && He ? /* @__PURE__ */ i(
|
|
1057
|
+
_,
|
|
1058
|
+
{
|
|
1059
|
+
open: Fe,
|
|
1060
|
+
onOpenChange: (e) => !e && X(null),
|
|
1061
|
+
children: /* @__PURE__ */ b(
|
|
1062
|
+
_.Content,
|
|
1063
|
+
{
|
|
1064
|
+
variant: "alert",
|
|
1065
|
+
size: "sm",
|
|
1066
|
+
onCloseAutoFocus: Fn,
|
|
1067
|
+
children: [
|
|
1068
|
+
/* @__PURE__ */ i(_.Header, { children: /* @__PURE__ */ i(_.Title, { children: a("notesPanel.deleteConfirmTitle", {
|
|
1069
|
+
defaultValue: "Delete this note?"
|
|
1070
|
+
}) }) }),
|
|
1071
|
+
/* @__PURE__ */ i(_.Body, { children: /* @__PURE__ */ i(_.Description, { children: a("notesPanel.deleteConfirmBody", {
|
|
1072
|
+
defaultValue: "The note will be removed from the record."
|
|
1073
|
+
}) }) }),
|
|
1074
|
+
/* @__PURE__ */ b(_.Footer, { children: [
|
|
1075
|
+
/* @__PURE__ */ i(_.Close, { asChild: !0, children: /* @__PURE__ */ i(
|
|
1076
|
+
te,
|
|
1077
|
+
{
|
|
1078
|
+
intent: "secondary",
|
|
1079
|
+
size: "sm",
|
|
1080
|
+
onClick: () => X(null),
|
|
1081
|
+
children: a("notesPanel.deleteConfirmCancel", {
|
|
1082
|
+
defaultValue: "Cancel"
|
|
1083
|
+
})
|
|
1084
|
+
}
|
|
1085
|
+
) }),
|
|
1086
|
+
/* @__PURE__ */ i(
|
|
1087
|
+
te,
|
|
1088
|
+
{
|
|
1089
|
+
intent: "destructive",
|
|
1090
|
+
size: "sm",
|
|
1091
|
+
onClick: Nn,
|
|
1092
|
+
children: a("notesPanel.deleteConfirmAction", {
|
|
1093
|
+
defaultValue: "Delete"
|
|
1094
|
+
})
|
|
1095
|
+
}
|
|
1096
|
+
)
|
|
1097
|
+
] })
|
|
1098
|
+
]
|
|
1099
|
+
}
|
|
1100
|
+
)
|
|
1101
|
+
}
|
|
1102
|
+
) : null
|
|
1103
|
+
]
|
|
1104
|
+
}
|
|
1105
|
+
);
|
|
1106
|
+
}
|
|
1107
|
+
);
|
|
1108
|
+
export {
|
|
1109
|
+
jr as N
|
|
1110
|
+
};
|
|
1111
|
+
//# sourceMappingURL=notes-panel-BiOxZL_0.js.map
|