@alfadocs/ui-kit 0.69.0 → 0.71.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-fields-CPbFJ8e8.js +246 -0
- package/dist/_chunks/{agenda-card-BxSFkqgY.js → agenda-card-BQ-IKAru.js} +2 -2
- package/dist/_chunks/{agenda-tray-g0kg7HwB.js → agenda-tray-CGXRk58j.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-CXlsNX1c.js → ai-consent-banner-Be-h9mRI.js} +3 -3
- package/dist/_chunks/{ai-prompt-input-CuhTo9mh.js → ai-prompt-input-V4DdOeqv.js} +2 -2
- package/dist/_chunks/{alert-_mUKLmwA.js → alert-CHYZ96tR.js} +150 -96
- package/dist/_chunks/{alia-sidebar-B47qRQb5.js → alia-sidebar-DvIUzIX9.js} +107 -106
- package/dist/_chunks/{anamnesis-card-DRmE24OQ.js → anamnesis-card-DvYCa16e.js} +2 -2
- package/dist/_chunks/anatomy-scheme-CXSk11UJ.js +2445 -0
- package/dist/_chunks/annotation-marker-qt5R9WZX.js +120 -0
- package/dist/_chunks/{antenatal-schedule-timeline-35ebkcZT.js → antenatal-schedule-timeline-CwXrQRm1.js} +2 -2
- package/dist/_chunks/{app-frame-BYx1gcV7.js → app-frame-DIEMIC5V.js} +67 -56
- package/dist/_chunks/appointment-card-DVaeJNVB.js +294 -0
- package/dist/_chunks/appointment-timeline-PJgnrjFb.js +388 -0
- package/dist/_chunks/appointment-tray-B16QPGbm.js +193 -0
- package/dist/_chunks/{audio-recorder-DYXXnGug.js → audio-recorder-DNDsOLqO.js} +3 -3
- package/dist/_chunks/{autocomplete-DOeGouCL.js → autocomplete-BrONKN8l.js} +168 -146
- package/dist/_chunks/{badge-CqGsX32l.js → badge-DCOqV9mI.js} +32 -27
- package/dist/_chunks/{bishop-score-PJI3AXzA.js → bishop-score-Cym_TeQY.js} +3 -3
- package/dist/_chunks/{bmi-calculator-BZtIJ53x.js → bmi-calculator-zjeY4E7J.js} +2 -2
- package/dist/_chunks/{booking-C3VqFReX.js → booking-C7do4vaR.js} +7 -7
- package/dist/_chunks/{button-group-Ciq6J4IW.js → button-group-CvEnVzY7.js} +32 -35
- package/dist/_chunks/{care-plan-card-CvFGXa2z.js → care-plan-card-DzPDYgtK.js} +5 -5
- package/dist/_chunks/{care-plan-entry-card-C3E_gClk.js → care-plan-entry-card-CEnQy7YP.js} +5 -5
- package/dist/_chunks/care-plan-header-DcXFXWit.js +198 -0
- package/dist/_chunks/{chat-message-3V54YipB.js → chat-message-DzpcJR-q.js} +25 -23
- package/dist/_chunks/city-input-Dkgaak7I.js +169 -0
- package/dist/_chunks/clinical-note-card-BUvNMNGL.js +436 -0
- package/dist/_chunks/clipboard-list-S7s-MXQq.js +25 -0
- package/dist/_chunks/{combobox-Clum7gJ1.js → combobox-DnqSF0IH.js} +131 -114
- package/dist/_chunks/connection-status-CY1HV8Wg.js +108 -0
- package/dist/_chunks/{contact-profile-card-Dramqa9C.js → contact-profile-card-DDPwRFiP.js} +2 -2
- package/dist/_chunks/control-room-rail-FAQZrGVL.js +333 -0
- package/dist/_chunks/country-select-BwUZQvTa.js +709 -0
- package/dist/_chunks/{cycle-calculator-DmRGJNaT.js → cycle-calculator-CCmPwcBl.js} +2 -2
- package/dist/_chunks/{dependent-selector-CG_FOHya.js → dependent-selector-DUV4thxX.js} +2 -2
- package/dist/_chunks/{document-scanner-CTubA0-N.js → document-scanner-C_AxLooF.js} +3 -3
- package/dist/_chunks/{due-date-calculator-BTmsIQqD.js → due-date-calculator-Brdj-euS.js} +3 -3
- package/dist/_chunks/editable-currency-cell-renderer-CGELrkIj.js +410 -0
- package/dist/_chunks/email-input-DJ7EXklP.js +397 -0
- package/dist/_chunks/{entity-card-COhmqHly.js → entity-card-DmrgYSEX.js} +38 -20
- package/dist/_chunks/entity-summary-CaM1Y-xE.js +291 -0
- package/dist/_chunks/{fetal-weight-CRz7KE2D.js → fetal-weight-DNCkyeVo.js} +2 -2
- package/dist/_chunks/field-array-siUZzfYe.js +146 -0
- package/dist/_chunks/field-value-3jMM0uDx.js +415 -0
- package/dist/_chunks/{file-upload-5ScQd4fE.js → file-upload-DwZcAK8D.js} +2 -1
- package/dist/_chunks/{freemium-paywall-DZ2mBS3w.js → freemium-paywall-WYlNO7yT.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-BleUdhbI.js → gestational-age-calculator-DKzEV5Qi.js} +4 -4
- package/dist/_chunks/hash-CysBBS_N.js +17 -0
- package/dist/_chunks/{hcg-doubling-CnjDXX6U.js → hcg-doubling-C7bmuaU3.js} +2 -2
- package/dist/_chunks/iban-input-B0TWzR1R.js +436 -0
- package/dist/_chunks/icon-picker-0B7KhrF1.js +272 -0
- package/dist/_chunks/image-cropper-D9jqJy19.js +367 -0
- package/dist/_chunks/{actions-cell-renderer-DrcaxB0w.js → link-cell-renderer-De_SLjSq.js} +792 -668
- package/dist/_chunks/list-checks-BUs75d_o.js +18 -0
- package/dist/_chunks/lock-CKOIn0IK.js +15 -0
- package/dist/_chunks/{marketplace-app-shell-6T9W4Knl.js → marketplace-app-shell-BGqkywsi.js} +5 -5
- package/dist/_chunks/message-card-DsHFFiL1.js +319 -0
- package/dist/_chunks/{message-tray-DwrBLJlf.js → message-tray-C0a6CL1_.js} +172 -135
- package/dist/_chunks/{multi-select-BdHHDrRN.js → multi-select-WE4S9FIF.js} +75 -63
- package/dist/_chunks/nav-grid-9xphY3FM.js +169 -0
- package/dist/_chunks/notes-panel-DXiMfuvp.js +320 -0
- package/dist/_chunks/notification-card-BMqNzCIt.js +290 -0
- package/dist/_chunks/{notification-tray-Btb9oQeZ.js → notification-tray-BmUlCx3g.js} +201 -166
- package/dist/_chunks/{operator-hero-CP2Nhupm.js → operator-hero-BO8TqzX2.js} +3 -3
- package/dist/_chunks/panel-header-D313n_9-.js +105 -0
- package/dist/_chunks/patient-details-DgfTJimE.js +759 -0
- package/dist/_chunks/{patient-search-CBC_ySF6.js → patient-search-CSWQKOSP.js} +3 -3
- package/dist/_chunks/{patient-shell-DV3XEtIB.js → patient-shell-BMwsIKlW.js} +3 -3
- package/dist/_chunks/patient-summary-card-D4NdgYJB.js +452 -0
- package/dist/_chunks/patient-table-CERknpd8.js +1110 -0
- package/dist/_chunks/{payment-form-DvjwYVIT.js → payment-form-CxqIXqw7.js} +2 -2
- package/dist/_chunks/{payment-request-card-DioWKBUq.js → payment-request-card-Blf-MFNY.js} +125 -136
- package/dist/_chunks/{pdf-viewer-D6BPfW2D.js → pdf-viewer-QfebdLOd.js} +192 -214
- package/dist/_chunks/{periodontal-chart-card-BuDEMbHE.js → periodontal-chart-card-hRRJY1NN.js} +2 -2
- package/dist/_chunks/permission-matrix-Bw5oexUt.js +174 -0
- package/dist/_chunks/position-grid-CcvqHaKN.js +169 -0
- package/dist/_chunks/postal-code-input-UCOYuRY2.js +192 -0
- package/dist/_chunks/{practice-results-KrTHqZua.js → practice-results-El5Z-oVp.js} +4 -4
- package/dist/_chunks/{pregnancy-dating-DORUAOHB.js → pregnancy-dating-CunHrOpO.js} +4 -4
- package/dist/_chunks/{pregnancy-weight-gain-DVz4rr7-.js → pregnancy-weight-gain-BUNpTsH-.js} +2 -2
- package/dist/_chunks/{product-hub-panel-e6pW220e.js → product-hub-panel-DtU7KXxm.js} +257 -217
- package/dist/_chunks/province-select-D_TZvix3.js +261 -0
- package/dist/_chunks/{public-header.agent-DqkqA-ca.js → public-header.agent-TxmC_x1I.js} +2 -2
- package/dist/_chunks/radiograph-panel.agent-tWjN2nHX.js +553 -0
- package/dist/_chunks/reviews-panel-DxkSrgMl.js +559 -0
- package/dist/_chunks/rich-text-editor-C8tyGjfb.js +2621 -0
- package/dist/_chunks/{scroll-area-5wNK0Cyz.js → scroll-area-BZOvUhwQ.js} +2 -2
- package/dist/_chunks/{select-DMLG44F5.js → select-KsyRr8WH.js} +114 -102
- package/dist/_chunks/{sheet-BxsE7eQm.js → sheet-umkfZjF6.js} +53 -42
- package/dist/_chunks/{sidebar-DY9jGjgt.js → sidebar-QCp9wHNP.js} +125 -113
- package/dist/_chunks/{sign-document-B4DeRhTe.js → sign-document-By6hMOra.js} +2 -2
- package/dist/_chunks/{stepper-accordion-Dki6r9ZE.js → stepper-accordion-DC-H-8v4.js} +38 -48
- package/dist/_chunks/tab-bar-Bv9nGNdO.js +262 -0
- package/dist/_chunks/{tabs-BxcOziCo.js → tabs-CYZVKKDl.js} +2 -2
- package/dist/_chunks/task-card-DCdsI0ZT.js +189 -0
- package/dist/_chunks/{task-tray-qOEQflu4.js → task-tray-DNVejijD.js} +2 -2
- package/dist/_chunks/tasks-panel-C9odmawT.js +757 -0
- package/dist/_chunks/token-insert-menu-CFQqTe_n.js +147 -0
- package/dist/_chunks/tool-rail-BZx0-yIr.js +524 -0
- package/dist/_chunks/tooth-scheme-DJZtzfeY.js +2133 -0
- package/dist/_chunks/{transaction-chip-DK84XCBU.js → transaction-chip-CscoQbxF.js} +88 -61
- package/dist/_chunks/{transcript-panel-3THQX6nJ.js → transcript-panel-CHGHHHdT.js} +95 -83
- package/dist/_chunks/{unit-converter-YEpD9evj.js → unit-converter-CwlZbfdn.js} +2 -2
- package/dist/_chunks/use-clamp-overflow-DQE2kwZ9.js +20 -0
- package/dist/_chunks/use-overflow-collapse-BIOzKbni.js +32 -0
- package/dist/_chunks/use-persistent-state-nZwZAnE9.js +24 -0
- package/dist/_chunks/{warning-stack-BsgaEbL8.js → warning-stack--sTrrBDA.js} +86 -101
- package/dist/_chunks/{workflow-map-Bdam9pGp.js → workflow-map-M8MBBHQm.js} +107 -119
- package/dist/_chunks/zoom-out-CgVtf2Wx.js +29 -0
- package/dist/agent/index.js +5 -4
- package/dist/agent/types.d.ts +19 -2
- package/dist/agent-catalog.json +3325 -322
- package/dist/agent-i18n/en.json +314 -14
- package/dist/components/_shared/entity-card/entity-card.d.ts +6 -0
- package/dist/components/_shared/entity-card/index.d.ts +1 -1
- package/dist/components/_shared/field-value.d.ts +21 -0
- package/dist/components/_shared/field-visibility-cog.d.ts +20 -0
- package/dist/components/_shared/field-visibility.d.ts +36 -0
- package/dist/components/_shared/option.d.ts +2 -0
- package/dist/components/_shared/patient-fields.d.ts +119 -0
- package/dist/components/address-fields/address-fields.agent.d.ts +9 -0
- package/dist/components/address-fields/address-fields.d.ts +29 -0
- package/dist/components/address-fields/index.d.ts +5 -0
- package/dist/components/address-fields/index.js +6 -0
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/alert/alert.d.ts +5 -0
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anatomy-scheme/anatomy-face-paths.d.ts +15 -0
- package/dist/components/anatomy-scheme/anatomy-muscle-paths.d.ts +20 -0
- package/dist/components/anatomy-scheme/anatomy-scheme-data.d.ts +121 -0
- package/dist/components/anatomy-scheme/anatomy-scheme.agent.d.ts +6 -0
- package/dist/components/anatomy-scheme/anatomy-scheme.d.ts +69 -0
- package/dist/components/anatomy-scheme/index.d.ts +6 -0
- package/dist/components/anatomy-scheme/index.js +17 -0
- package/dist/components/annotation-marker/annotation-marker.d.ts +33 -0
- package/dist/components/annotation-marker/index.d.ts +3 -0
- package/dist/components/annotation-marker/index.js +7 -0
- package/dist/components/app-frame/app-frame.d.ts +2 -2
- package/dist/components/app-frame/index.js +1 -1
- package/dist/components/appointment-card/appointment-card.d.ts +25 -1
- package/dist/components/appointment-card/index.js +6 -5
- package/dist/components/appointment-timeline/appointment-timeline.agent.d.ts +4 -0
- package/dist/components/appointment-timeline/appointment-timeline.d.ts +66 -0
- package/dist/components/appointment-timeline/index.d.ts +4 -0
- package/dist/components/appointment-timeline/index.js +6 -0
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts +10 -0
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/badge/badge.d.ts +6 -2
- 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/button-group/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/care-plan-header.agent.d.ts +4 -0
- package/dist/components/care-plan-header/care-plan-header.d.ts +111 -0
- package/dist/components/care-plan-header/index.d.ts +4 -0
- package/dist/components/care-plan-header/index.js +6 -0
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/city-input/city-input.agent.d.ts +8 -0
- package/dist/components/city-input/city-input.d.ts +57 -0
- package/dist/components/city-input/index.d.ts +5 -0
- package/dist/components/city-input/index.js +6 -0
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +21 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/combobox/combobox.d.ts +17 -0
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/connection-status/connection-status.agent.d.ts +4 -0
- package/dist/components/connection-status/connection-status.d.ts +36 -0
- package/dist/components/connection-status/index.d.ts +4 -0
- package/dist/components/connection-status/index.js +6 -0
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/control-room-context.d.ts +53 -0
- package/dist/components/control-room-rail/control-room-rail.agent.d.ts +4 -0
- package/dist/components/control-room-rail/control-room-rail.d.ts +35 -0
- package/dist/components/control-room-rail/index.d.ts +6 -0
- package/dist/components/control-room-rail/index.js +10 -0
- package/dist/components/counter/counter.d.ts +1 -1
- package/dist/components/country-select/country-select.agent.d.ts +8 -0
- package/dist/components/country-select/country-select.d.ts +51 -0
- package/dist/components/country-select/index.d.ts +6 -0
- package/dist/components/country-select/index.js +9 -0
- package/dist/components/country-select/iso-3166.d.ts +15 -0
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/cell-renderers/actions-cell-renderer.d.ts +18 -0
- package/dist/components/data-table/cell-renderers/reorder-cell-renderer.d.ts +34 -0
- package/dist/components/data-table/index.d.ts +3 -1
- package/dist/components/data-table/index.js +35 -32
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/email-input/index.js +1 -1
- package/dist/components/entity-summary/entity-summary.agent.d.ts +4 -0
- package/dist/components/entity-summary/entity-summary.d.ts +92 -0
- package/dist/components/entity-summary/index.d.ts +3 -0
- package/dist/components/entity-summary/index.js +5 -0
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/field-array/field-array.agent.d.ts +4 -0
- package/dist/components/field-array/field-array.d.ts +45 -0
- package/dist/components/field-array/index.d.ts +4 -0
- package/dist/components/field-array/index.js +6 -0
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/freemium-paywall/freemium-paywall.d.ts +1 -1
- 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/iban-input/iban-input.agent.d.ts +4 -0
- package/dist/components/iban-input/iban-input.d.ts +51 -0
- package/dist/components/iban-input/index.d.ts +5 -0
- package/dist/components/iban-input/index.js +13 -0
- package/dist/components/iban-input/is-valid-iban.d.ts +31 -0
- package/dist/components/icon-picker/icon-picker.agent.d.ts +4 -0
- package/dist/components/icon-picker/icon-picker.d.ts +41 -0
- package/dist/components/icon-picker/index.d.ts +4 -0
- package/dist/components/icon-picker/index.js +6 -0
- package/dist/components/image-cropper/crop-geometry.d.ts +30 -0
- package/dist/components/image-cropper/image-cropper.agent.d.ts +4 -0
- package/dist/components/image-cropper/image-cropper.d.ts +32 -0
- package/dist/components/image-cropper/index.d.ts +5 -0
- package/dist/components/image-cropper/index.js +11 -0
- package/dist/components/index.d.ts +25 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-card/message-card.d.ts +14 -0
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/message-tray/message-tray.d.ts +4 -0
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/nav-grid/index.d.ts +4 -0
- package/dist/components/nav-grid/index.js +7 -0
- package/dist/components/nav-grid/nav-grid.agent.d.ts +4 -0
- package/dist/components/nav-grid/nav-grid.d.ts +41 -0
- package/dist/components/notes-panel/index.d.ts +3 -0
- package/dist/components/notes-panel/index.js +5 -0
- package/dist/components/notes-panel/notes-panel.agent.d.ts +4 -0
- package/dist/components/notes-panel/notes-panel.d.ts +94 -0
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-card/notification-card.d.ts +15 -0
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/notification-tray/notification-tray.d.ts +4 -0
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/panel-header/index.d.ts +3 -0
- package/dist/components/panel-header/index.js +7 -0
- package/dist/components/panel-header/panel-header.d.ts +41 -0
- package/dist/components/patient-details/index.d.ts +5 -0
- package/dist/components/patient-details/index.js +6 -0
- package/dist/components/patient-details/patient-details.agent.d.ts +4 -0
- package/dist/components/patient-details/patient-details.d.ts +96 -0
- package/dist/components/patient-search/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 +40 -1
- package/dist/components/patient-table/columns.d.ts +69 -40
- package/dist/components/patient-table/index.d.ts +2 -6
- package/dist/components/patient-table/index.js +8 -9
- package/dist/components/patient-table/patient-table.d.ts +38 -4
- package/dist/components/patient-table/types.d.ts +52 -2
- package/dist/components/patient-table/use-responsive-columns.d.ts +8 -6
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/permission-matrix/index.d.ts +4 -0
- package/dist/components/permission-matrix/index.js +7 -0
- package/dist/components/permission-matrix/permission-matrix.agent.d.ts +4 -0
- package/dist/components/permission-matrix/permission-matrix.d.ts +47 -0
- package/dist/components/position-grid/index.d.ts +4 -0
- package/dist/components/position-grid/index.js +7 -0
- package/dist/components/position-grid/position-grid.agent.d.ts +4 -0
- package/dist/components/position-grid/position-grid.d.ts +39 -0
- package/dist/components/postal-code-input/index.d.ts +5 -0
- package/dist/components/postal-code-input/index.js +6 -0
- package/dist/components/postal-code-input/postal-code-input.agent.d.ts +8 -0
- package/dist/components/postal-code-input/postal-code-input.d.ts +27 -0
- 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/product-hub-tray/index.js +1 -1
- package/dist/components/product-hub-tray/product-hub-tray.d.ts +13 -1
- package/dist/components/province-select/index.d.ts +6 -0
- package/dist/components/province-select/index.js +7 -0
- package/dist/components/province-select/it-provinces.d.ts +8 -0
- package/dist/components/province-select/province-select.agent.d.ts +8 -0
- package/dist/components/province-select/province-select.d.ts +38 -0
- package/dist/components/public-footer/public-footer.d.ts +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/radiograph-panel/index.d.ts +4 -0
- package/dist/components/radiograph-panel/index.js +7 -0
- package/dist/components/radiograph-panel/radiograph-panel.agent.d.ts +13 -0
- package/dist/components/radiograph-panel/radiograph-panel.d.ts +36 -0
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +17 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts +8 -2
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +2 -2
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/skeleton/skeleton.d.ts +1 -1
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +18 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-card/task-card.d.ts +14 -6
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.d.ts +4 -0
- package/dist/components/tasks-panel/index.js +6 -0
- package/dist/components/tasks-panel/tasks-panel.agent.d.ts +4 -0
- package/dist/components/tasks-panel/tasks-panel.d.ts +152 -0
- package/dist/components/token-insert-menu/index.d.ts +4 -0
- package/dist/components/token-insert-menu/index.js +6 -0
- package/dist/components/token-insert-menu/token-insert-menu.agent.d.ts +4 -0
- package/dist/components/token-insert-menu/token-insert-menu.d.ts +33 -0
- package/dist/components/tool-rail/index.d.ts +4 -0
- package/dist/components/tool-rail/index.js +6 -0
- package/dist/components/tool-rail/tool-rail.agent.d.ts +4 -0
- package/dist/components/tool-rail/tool-rail.d.ts +160 -0
- package/dist/components/tooth-scheme/index.d.ts +2 -2
- package/dist/components/tooth-scheme/index.js +30 -23
- package/dist/components/tooth-scheme/tooth-data.d.ts +112 -1
- package/dist/components/tooth-scheme/tooth-scheme.agent.d.ts +2 -2
- package/dist/components/tooth-scheme/tooth-scheme.d.ts +84 -11
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +2 -2
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/transcript-panel/transcript-panel.d.ts +2 -2
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/warning-stack/warning-stack.d.ts +10 -7
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +24 -22
- package/dist/hooks/use-clamp-overflow.d.ts +19 -0
- package/dist/hooks/use-edge-resize.d.ts +2 -2
- package/dist/hooks/use-overflow-collapse.d.ts +46 -0
- package/dist/hooks/use-persistent-state.d.ts +7 -1
- package/dist/hooks/use-scroll-overflow.d.ts +36 -0
- package/dist/i18n/locales/ar.d.ts +475 -26
- package/dist/i18n/locales/ar.js +478 -31
- package/dist/i18n/locales/de.d.ts +475 -26
- package/dist/i18n/locales/de.js +480 -31
- package/dist/i18n/locales/el.d.ts +475 -26
- package/dist/i18n/locales/el.js +485 -31
- package/dist/i18n/locales/en.d.ts +476 -34
- package/dist/i18n/locales/en.js +492 -39
- package/dist/i18n/locales/es.d.ts +475 -26
- package/dist/i18n/locales/es.js +477 -31
- package/dist/i18n/locales/fr.d.ts +475 -26
- package/dist/i18n/locales/fr.js +480 -31
- package/dist/i18n/locales/hi.d.ts +475 -26
- package/dist/i18n/locales/hi.js +476 -31
- package/dist/i18n/locales/it.d.ts +475 -26
- package/dist/i18n/locales/it.js +480 -31
- package/dist/i18n/locales/ja.d.ts +475 -26
- package/dist/i18n/locales/ja.js +481 -31
- package/dist/i18n/locales/nl.d.ts +475 -26
- package/dist/i18n/locales/nl.js +473 -31
- package/dist/i18n/locales/pl.d.ts +475 -26
- package/dist/i18n/locales/pl.js +481 -31
- package/dist/i18n/locales/pt.d.ts +475 -26
- package/dist/i18n/locales/pt.js +485 -31
- package/dist/i18n/locales/ro.d.ts +475 -26
- package/dist/i18n/locales/ro.js +485 -31
- package/dist/i18n/locales/ru.d.ts +475 -26
- package/dist/i18n/locales/ru.js +478 -31
- package/dist/i18n/locales/sq.d.ts +475 -26
- package/dist/i18n/locales/sq.js +482 -31
- package/dist/i18n/locales/sv.d.ts +475 -26
- package/dist/i18n/locales/sv.js +480 -31
- package/dist/i18n/locales/tr.d.ts +475 -26
- package/dist/i18n/locales/tr.js +478 -31
- package/dist/i18n/locales/zh.d.ts +475 -26
- package/dist/i18n/locales/zh.js +473 -31
- package/dist/index.js +826 -709
- package/dist/locales/ar.json +480 -31
- package/dist/locales/de.json +480 -31
- package/dist/locales/el.json +480 -31
- package/dist/locales/en.json +480 -31
- package/dist/locales/es.json +480 -31
- package/dist/locales/fr.json +480 -31
- package/dist/locales/hi.json +480 -31
- package/dist/locales/it.json +480 -31
- package/dist/locales/ja.json +480 -31
- package/dist/locales/nl.json +480 -31
- package/dist/locales/pl.json +480 -31
- package/dist/locales/pt.json +480 -31
- package/dist/locales/ro.json +480 -31
- package/dist/locales/ru.json +480 -31
- package/dist/locales/sq.json +480 -31
- package/dist/locales/sv.json +480 -31
- package/dist/locales/tr.json +480 -31
- package/dist/locales/zh.json +480 -31
- package/dist/patterns/alia-assistant/alia-types.d.ts +9 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +9 -1
- package/package.json +101 -5
- package/dist/_chunks/ai-tools-rail-BA_sqy1A.js +0 -373
- package/dist/_chunks/appointment-tray-CZtvtaH-.js +0 -431
- package/dist/_chunks/clinical-note-card-DqQYf_D4.js +0 -333
- package/dist/_chunks/editable-currency-cell-renderer-kgqp_mIw.js +0 -448
- package/dist/_chunks/email-input-B_Y55f5G.js +0 -396
- package/dist/_chunks/message-card-Bx4GmLvf.js +0 -277
- package/dist/_chunks/notification-card-BiESdm8q.js +0 -255
- package/dist/_chunks/patient-summary-card-B836_fDB.js +0 -435
- package/dist/_chunks/patient-table-CDuosVru.js +0 -889
- package/dist/_chunks/reviews-panel-Dq7LMDcH.js +0 -555
- package/dist/_chunks/rich-text-editor-BsV7zUdg.js +0 -2142
- package/dist/_chunks/tab-bar-B1ovILzh.js +0 -105
- package/dist/_chunks/task-card-BwY9jaV1.js +0 -124
- package/dist/_chunks/tooth-scheme-yBr53cvv.js +0 -1330
- package/dist/_chunks/use-persistent-state-i23OWy6G.js +0 -24
- package/dist/components/ai-tools-rail/ai-tools-rail.agent.d.ts +0 -4
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +0 -68
- package/dist/components/ai-tools-rail/index.d.ts +0 -4
- package/dist/components/ai-tools-rail/index.js +0 -6
- package/dist/components/patient-table/cell-renderers/contact-cell.d.ts +0 -45
- package/dist/components/patient-table/cell-renderers/patient-identity-cell.d.ts +0 -26
|
@@ -0,0 +1,1110 @@
|
|
|
1
|
+
import { jsxs as O, jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as x, useRef as k, useEffect as ee, useCallback as z, forwardRef as he, useState as te, useImperativeHandle as pe, useMemo as Y } from "react";
|
|
3
|
+
import { useTranslation as $ } from "react-i18next";
|
|
4
|
+
import { I as be, h as p, g as b, L as ge, c as L, b as _, d as U, N as H, e as F, S as R, T as ne, a as K, C as Ce, l as ve, k as Ne, U as we, f as Te, A as Fe, m as ae, D as P, n as Re } from "./link-cell-renderer-De_SLjSq.js";
|
|
5
|
+
import { S as Ie } from "./select-KsyRr8WH.js";
|
|
6
|
+
import { u as ye } from "./registry-DvAUVLHh.js";
|
|
7
|
+
import { B as ie } from "./badge-DCOqV9mI.js";
|
|
8
|
+
import { c as Pe } from "./index-D2ZczOXr.js";
|
|
9
|
+
import { T as We } from "./timestamp-BV2lC-wV.js";
|
|
10
|
+
import { C as Se } from "./calendar-clock-CYkcqdwl.js";
|
|
11
|
+
import { E as Ae } from "./eye-LHlSU38h.js";
|
|
12
|
+
import { P as Be } from "./pencil-CfQX-0Qc.js";
|
|
13
|
+
import { M as De } from "./mail-C8irm52s.js";
|
|
14
|
+
import { c as Ve } from "./createLucideIcon-CrFbzy84.js";
|
|
15
|
+
import { U as xe } from "./users-MBVtUzwd.js";
|
|
16
|
+
import { T as Ee } from "./trash-2-rPAKaRgB.js";
|
|
17
|
+
/**
|
|
18
|
+
* @license lucide-react v1.8.0 - ISC
|
|
19
|
+
*
|
|
20
|
+
* This source code is licensed under the ISC license.
|
|
21
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
+
*/
|
|
23
|
+
const Oe = [
|
|
24
|
+
[
|
|
25
|
+
"path",
|
|
26
|
+
{
|
|
27
|
+
d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
|
|
28
|
+
key: "18887p"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
], ke = Ve("message-square", Oe), Ge = 5e4;
|
|
32
|
+
function Me(e) {
|
|
33
|
+
return e === 0 ? { variant: "success", statusKey: "settled" } : e <= Ge ? { variant: "warning", statusKey: "pending" } : { variant: "error", statusKey: "overdue" };
|
|
34
|
+
}
|
|
35
|
+
function Le(e) {
|
|
36
|
+
if (e == null || e === "") return null;
|
|
37
|
+
const i = typeof e == "number" ? e : Number(e);
|
|
38
|
+
return Number.isFinite(i) ? i : null;
|
|
39
|
+
}
|
|
40
|
+
function _e(e) {
|
|
41
|
+
const { value: i, currency: d = "EUR", options: s } = e, { t: a, i18n: r } = $("ui"), c = Le(i);
|
|
42
|
+
if (c === null) return null;
|
|
43
|
+
const h = r.language || "en", m = new Intl.NumberFormat(h, {
|
|
44
|
+
style: "currency",
|
|
45
|
+
currency: d,
|
|
46
|
+
...s
|
|
47
|
+
}).format(c / 100), { variant: u, statusKey: C } = Me(c), l = a(`patientTable.balance.status.${C}`);
|
|
48
|
+
return /* @__PURE__ */ O(ie, { variant: u, withDot: !0, size: "sm", className: "ds:tabular-nums", children: [
|
|
49
|
+
/* @__PURE__ */ g("span", { children: m }),
|
|
50
|
+
/* @__PURE__ */ g("span", { className: "ds:sr-only", children: l })
|
|
51
|
+
] });
|
|
52
|
+
}
|
|
53
|
+
const Ue = {
|
|
54
|
+
accepted: "success",
|
|
55
|
+
estimate: "info",
|
|
56
|
+
none: "neutral"
|
|
57
|
+
};
|
|
58
|
+
function He(e) {
|
|
59
|
+
return e === "accepted" || e === "estimate" || e === "none";
|
|
60
|
+
}
|
|
61
|
+
function ze(e) {
|
|
62
|
+
const { t: i } = $("ui"), { data: d, value: s, size: a = "sm" } = e, r = (d == null ? void 0 : d.carePlanStatus) ?? s;
|
|
63
|
+
if (!He(r)) return null;
|
|
64
|
+
const c = Ue[r];
|
|
65
|
+
return /* @__PURE__ */ g(ie, { variant: c, withDot: !0, size: a, children: i(`patientTable.carePlanStatus.${r}`) });
|
|
66
|
+
}
|
|
67
|
+
const J = Pe(
|
|
68
|
+
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] ds:whitespace-nowrap",
|
|
69
|
+
{
|
|
70
|
+
variants: {
|
|
71
|
+
tone: {
|
|
72
|
+
default: "",
|
|
73
|
+
// Imminent visit: warning foreground token + medium weight. Fully
|
|
74
|
+
// token-bound — no literal colour, no AG Grid cellStyle.
|
|
75
|
+
soon: "ds:text-[color:var(--warning-foreground)] ds:font-medium",
|
|
76
|
+
// Absent appointment: muted empty state.
|
|
77
|
+
empty: "ds:text-[color:var(--muted-foreground)]"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
defaultVariants: { tone: "default" }
|
|
81
|
+
}
|
|
82
|
+
), $e = 1440 * 60 * 1e3, je = 7;
|
|
83
|
+
function Ke(e) {
|
|
84
|
+
if (e == null || e === "") return null;
|
|
85
|
+
const i = e instanceof Date ? e.getTime() : typeof e == "number" ? e : new Date(String(e)).getTime();
|
|
86
|
+
return Number.isNaN(i) ? null : i;
|
|
87
|
+
}
|
|
88
|
+
function Ye(e, i) {
|
|
89
|
+
if (i <= 0) return "default";
|
|
90
|
+
const d = e - Date.now();
|
|
91
|
+
return d < 0 ? "default" : d <= i * $e ? "soon" : "default";
|
|
92
|
+
}
|
|
93
|
+
function qe(e) {
|
|
94
|
+
const { t: i } = $("ui"), { data: d, value: s, soonWithinDays: a = je } = e, r = Ke((d == null ? void 0 : d.nextAppointment) ?? s);
|
|
95
|
+
if (r === null)
|
|
96
|
+
return /* @__PURE__ */ g("span", { className: J({ tone: "empty" }), children: i("patientTable.nextAppointment.none") });
|
|
97
|
+
const c = Ye(r, a);
|
|
98
|
+
return /* @__PURE__ */ O("span", { className: J({ tone: c }), children: [
|
|
99
|
+
c === "soon" ? /* @__PURE__ */ g(Se, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }) : null,
|
|
100
|
+
/* @__PURE__ */ g(We, { value: r, format: "relative", shape: "bare" })
|
|
101
|
+
] });
|
|
102
|
+
}
|
|
103
|
+
function q(e) {
|
|
104
|
+
return e.responsiveTier;
|
|
105
|
+
}
|
|
106
|
+
const Qe = 6;
|
|
107
|
+
function Xe(e, i) {
|
|
108
|
+
const d = (a) => (r) => {
|
|
109
|
+
i == null || i(a, r);
|
|
110
|
+
}, s = (a, r) => ({
|
|
111
|
+
icon: a.icon,
|
|
112
|
+
label: a.label,
|
|
113
|
+
variant: a.variant,
|
|
114
|
+
onClick: d(a),
|
|
115
|
+
...r
|
|
116
|
+
});
|
|
117
|
+
return [
|
|
118
|
+
s(
|
|
119
|
+
{
|
|
120
|
+
id: "show",
|
|
121
|
+
label: e("patientTable.actions.show"),
|
|
122
|
+
icon: x(Ae, { "aria-hidden": "true" })
|
|
123
|
+
},
|
|
124
|
+
{}
|
|
125
|
+
),
|
|
126
|
+
s(
|
|
127
|
+
{
|
|
128
|
+
id: "edit",
|
|
129
|
+
label: e("patientTable.actions.edit"),
|
|
130
|
+
icon: x(Be, { "aria-hidden": "true" })
|
|
131
|
+
},
|
|
132
|
+
{}
|
|
133
|
+
),
|
|
134
|
+
s(
|
|
135
|
+
{
|
|
136
|
+
id: "sendEmailReminder",
|
|
137
|
+
label: e("patientTable.actions.sendEmailReminder"),
|
|
138
|
+
icon: x(De, { "aria-hidden": "true" })
|
|
139
|
+
},
|
|
140
|
+
// Hidden when the patient has email contact disabled (spec).
|
|
141
|
+
{ hidden: (a) => !a.emailEnabled }
|
|
142
|
+
),
|
|
143
|
+
s(
|
|
144
|
+
{
|
|
145
|
+
id: "sendSmsReminder",
|
|
146
|
+
label: e("patientTable.actions.sendSmsReminder"),
|
|
147
|
+
icon: x(ke, { "aria-hidden": "true" })
|
|
148
|
+
},
|
|
149
|
+
// Hidden when no phone number is SMS-enabled (spec).
|
|
150
|
+
{
|
|
151
|
+
hidden: (a) => !(a.phoneNumbers ?? []).some((r) => r.smsEnabled)
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
s(
|
|
155
|
+
{
|
|
156
|
+
id: "reassign",
|
|
157
|
+
label: e("patientTable.actions.reassign"),
|
|
158
|
+
icon: x(xe, { "aria-hidden": "true" })
|
|
159
|
+
},
|
|
160
|
+
{}
|
|
161
|
+
),
|
|
162
|
+
s(
|
|
163
|
+
{
|
|
164
|
+
id: "delete",
|
|
165
|
+
label: e("patientTable.actions.delete"),
|
|
166
|
+
icon: x(Ee, { "aria-hidden": "true" }),
|
|
167
|
+
variant: "destructive"
|
|
168
|
+
},
|
|
169
|
+
// Disabled (with a reason) for archived patients — the row model's
|
|
170
|
+
// closest "cannot delete" signal. Surfaced as the inline tooltip.
|
|
171
|
+
{
|
|
172
|
+
disabled: (a) => !!a.isArchived,
|
|
173
|
+
disabledReason: e("patientTable.actions.deleteLocked")
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
];
|
|
177
|
+
}
|
|
178
|
+
const Je = () => !1, B = "✓", W = "—";
|
|
179
|
+
function Ze(e) {
|
|
180
|
+
if (!e) return null;
|
|
181
|
+
const i = new Date(e), d = i.getTime();
|
|
182
|
+
if (Number.isNaN(d)) return null;
|
|
183
|
+
const s = /* @__PURE__ */ new Date();
|
|
184
|
+
let a = s.getFullYear() - i.getFullYear();
|
|
185
|
+
const r = s.getMonth() - i.getMonth();
|
|
186
|
+
return (r < 0 || r === 0 && s.getDate() < i.getDate()) && (a -= 1), a >= 0 ? a : null;
|
|
187
|
+
}
|
|
188
|
+
function et(e) {
|
|
189
|
+
return e.map((i) => {
|
|
190
|
+
const s = {
|
|
191
|
+
colId: `custom:${i.fieldName}`,
|
|
192
|
+
headerName: i.label,
|
|
193
|
+
hide: !0
|
|
194
|
+
// No tier — custom fields are opt-in via ColumnToggle only.
|
|
195
|
+
};
|
|
196
|
+
return i.type === "checkbox" ? {
|
|
197
|
+
...s,
|
|
198
|
+
valueGetter: (a) => {
|
|
199
|
+
var r, c;
|
|
200
|
+
return ((c = (r = a.data) == null ? void 0 : r.customFields) == null ? void 0 : c[i.fieldName]) === !0;
|
|
201
|
+
},
|
|
202
|
+
valueFormatter: (a) => a.value === !0 ? B : W,
|
|
203
|
+
filter: R,
|
|
204
|
+
floatingFilterComponent: F,
|
|
205
|
+
filterParams: {
|
|
206
|
+
options: [
|
|
207
|
+
{ value: !0, label: B },
|
|
208
|
+
{ value: !1, label: W }
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
minWidth: 110,
|
|
212
|
+
width: 130
|
|
213
|
+
} : i.type === "dropdown" ? {
|
|
214
|
+
...s,
|
|
215
|
+
// TagListCellRenderer expects an array; wrap the single value.
|
|
216
|
+
valueGetter: (a) => {
|
|
217
|
+
var c, h;
|
|
218
|
+
const r = (h = (c = a.data) == null ? void 0 : c.customFields) == null ? void 0 : h[i.fieldName];
|
|
219
|
+
return typeof r == "string" && r ? [r] : [];
|
|
220
|
+
},
|
|
221
|
+
cellRenderer: ne,
|
|
222
|
+
filterValueGetter: (a) => {
|
|
223
|
+
var c, h;
|
|
224
|
+
const r = (h = (c = a.data) == null ? void 0 : c.customFields) == null ? void 0 : h[i.fieldName];
|
|
225
|
+
return typeof r == "string" ? r : "";
|
|
226
|
+
},
|
|
227
|
+
filter: R,
|
|
228
|
+
floatingFilterComponent: F,
|
|
229
|
+
filterParams: {
|
|
230
|
+
options: (i.options ?? []).map((a) => ({
|
|
231
|
+
value: a,
|
|
232
|
+
label: a
|
|
233
|
+
}))
|
|
234
|
+
},
|
|
235
|
+
sortable: !1,
|
|
236
|
+
minWidth: 130,
|
|
237
|
+
width: 160
|
|
238
|
+
} : {
|
|
239
|
+
...s,
|
|
240
|
+
valueGetter: (a) => {
|
|
241
|
+
var c, h;
|
|
242
|
+
const r = (h = (c = a.data) == null ? void 0 : c.customFields) == null ? void 0 : h[i.fieldName];
|
|
243
|
+
return typeof r == "string" ? r : "";
|
|
244
|
+
},
|
|
245
|
+
filter: b,
|
|
246
|
+
floatingFilterComponent: p,
|
|
247
|
+
minWidth: 140,
|
|
248
|
+
width: 170
|
|
249
|
+
};
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
function tt(e, i = {}) {
|
|
253
|
+
const {
|
|
254
|
+
hideDetails: d = !1,
|
|
255
|
+
getActionsCompact: s = Je,
|
|
256
|
+
onRowAction: a,
|
|
257
|
+
identityHref: r,
|
|
258
|
+
customFields: c = []
|
|
259
|
+
} = i, h = Xe(e, a), m = {
|
|
260
|
+
m: e("patientTable.gender.m"),
|
|
261
|
+
f: e("patientTable.gender.f"),
|
|
262
|
+
x: e("patientTable.gender.x")
|
|
263
|
+
}, u = {
|
|
264
|
+
yes: e("patientTable.consent.yes"),
|
|
265
|
+
no: e("patientTable.consent.no"),
|
|
266
|
+
notSpecified: e("patientTable.consent.notSpecified")
|
|
267
|
+
}, C = {
|
|
268
|
+
[u.yes]: "success",
|
|
269
|
+
[u.no]: "error",
|
|
270
|
+
[u.notSpecified]: "neutral"
|
|
271
|
+
}, l = (t) => e(`patientTable.column.${t}`);
|
|
272
|
+
return [
|
|
273
|
+
/* ── Avatar (P0, pinned-start) ─────────────────────────────────── */
|
|
274
|
+
{
|
|
275
|
+
colId: "avatar",
|
|
276
|
+
// sr-only header — the photo column needs no visible label, but AG Grid
|
|
277
|
+
// and AT still want a name. `headerName` reads "Photo"; the visible header
|
|
278
|
+
// TEXT is clipped via the kit's `sr-only-th` convention (clips only
|
|
279
|
+
// `.ag-header-cell-text`, keeping the header-cell box in the grid chrome
|
|
280
|
+
// and the name in the a11y tree — see ag-grid-theme.css).
|
|
281
|
+
headerName: l("avatar"),
|
|
282
|
+
headerClass: "sr-only-th",
|
|
283
|
+
pinned: "left",
|
|
284
|
+
cellRenderer: be,
|
|
285
|
+
cellRendererParams: {
|
|
286
|
+
srcField: "avatarUrl",
|
|
287
|
+
fallbackField: "lastName",
|
|
288
|
+
size: "sm",
|
|
289
|
+
shape: "circle"
|
|
290
|
+
},
|
|
291
|
+
sortable: !1,
|
|
292
|
+
filter: !1,
|
|
293
|
+
resizable: !1,
|
|
294
|
+
// Hug the 32px (size="sm") avatar + cell padding — a tight fixed column,
|
|
295
|
+
// not a wide empty one. width === minWidth === maxWidth pins it to size so
|
|
296
|
+
// the pinned group can't stretch it (pinned columns never flex).
|
|
297
|
+
width: 52,
|
|
298
|
+
minWidth: 52,
|
|
299
|
+
maxWidth: 52
|
|
300
|
+
// Anchor — never auto-hidden (no tier).
|
|
301
|
+
},
|
|
302
|
+
/* ── First name (P0, pinned-start) — plain text ────────────────── */
|
|
303
|
+
{
|
|
304
|
+
colId: "firstName",
|
|
305
|
+
headerName: l("firstName"),
|
|
306
|
+
pinned: "left",
|
|
307
|
+
field: "firstName",
|
|
308
|
+
filter: b,
|
|
309
|
+
floatingFilterComponent: p,
|
|
310
|
+
// Size to content: width === minWidth so the pinned column sits tight with
|
|
311
|
+
// no dead space before the next pinned column (pinned columns can't flex).
|
|
312
|
+
width: 140,
|
|
313
|
+
minWidth: 120
|
|
314
|
+
// Anchor — never auto-hidden (no tier).
|
|
315
|
+
},
|
|
316
|
+
/* ── Last name (P0, pinned-start) — the patient-detail link ────── */
|
|
317
|
+
{
|
|
318
|
+
colId: "lastName",
|
|
319
|
+
headerName: l("lastName"),
|
|
320
|
+
pinned: "left",
|
|
321
|
+
field: "lastName",
|
|
322
|
+
cellRenderer: ge,
|
|
323
|
+
cellRendererParams: {
|
|
324
|
+
href: r,
|
|
325
|
+
// When no detail href is supplied the cell renders a button; route its
|
|
326
|
+
// click through the same `show` row action.
|
|
327
|
+
onClick: a ? (t) => a(
|
|
328
|
+
{ id: "show", label: e("patientTable.actions.show") },
|
|
329
|
+
t
|
|
330
|
+
) : void 0
|
|
331
|
+
},
|
|
332
|
+
filter: b,
|
|
333
|
+
floatingFilterComponent: p,
|
|
334
|
+
// Size to content: a modest pinned width with no stretched default, so the
|
|
335
|
+
// avatar + first + last group ends tight against the scrollable columns.
|
|
336
|
+
width: 150,
|
|
337
|
+
minWidth: 130
|
|
338
|
+
// Anchor — never auto-hidden (no tier).
|
|
339
|
+
},
|
|
340
|
+
/* ── Phone (P1) ────────────────────────────────────────────────── */
|
|
341
|
+
{
|
|
342
|
+
colId: "phone",
|
|
343
|
+
headerName: l("phone"),
|
|
344
|
+
responsiveTier: "P1",
|
|
345
|
+
// The primary phone number string (prefix + number).
|
|
346
|
+
valueGetter: (t) => {
|
|
347
|
+
var n, o, f;
|
|
348
|
+
return ((f = (o = (n = t.data) == null ? void 0 : n.phoneNumbers) == null ? void 0 : o[0]) == null ? void 0 : f.number) ?? "";
|
|
349
|
+
},
|
|
350
|
+
filter: b,
|
|
351
|
+
floatingFilterComponent: p,
|
|
352
|
+
minWidth: 160,
|
|
353
|
+
width: 180
|
|
354
|
+
},
|
|
355
|
+
/* ── Next appointment (P1) ─────────────────────────────────────── */
|
|
356
|
+
{
|
|
357
|
+
colId: "nextAppointment",
|
|
358
|
+
headerName: l("nextAppointment"),
|
|
359
|
+
responsiveTier: "P1",
|
|
360
|
+
field: "nextAppointment",
|
|
361
|
+
cellRenderer: qe,
|
|
362
|
+
filter: _,
|
|
363
|
+
floatingFilterComponent: L,
|
|
364
|
+
minWidth: 160,
|
|
365
|
+
width: 180
|
|
366
|
+
},
|
|
367
|
+
/* ── Unpaid balance (P1) ───────────────────────────────────────── */
|
|
368
|
+
{
|
|
369
|
+
colId: "unpaidBalance",
|
|
370
|
+
headerName: l("unpaidBalance"),
|
|
371
|
+
responsiveTier: "P1",
|
|
372
|
+
field: "unpaidAmount",
|
|
373
|
+
type: "numericColumn",
|
|
374
|
+
cellRenderer: _e,
|
|
375
|
+
filter: H,
|
|
376
|
+
floatingFilterComponent: U,
|
|
377
|
+
// Money is integer cents; the inRange filter compares cents directly.
|
|
378
|
+
filterParams: { defaultOperator: "inRange", min: 0 },
|
|
379
|
+
minWidth: 150,
|
|
380
|
+
width: 170
|
|
381
|
+
},
|
|
382
|
+
/* ── Email (P2) — hidden when masking ──────────────────────────── */
|
|
383
|
+
{
|
|
384
|
+
colId: "email",
|
|
385
|
+
headerName: l("email"),
|
|
386
|
+
responsiveTier: "P2",
|
|
387
|
+
field: "email",
|
|
388
|
+
// Emit `hide` ONLY when masking (never a literal `hide: false`). A static
|
|
389
|
+
// `hide: false` is re-applied by AG Grid on every `columnDefs` reconcile,
|
|
390
|
+
// clobbering a runtime hide from the ViewSwitcher / responsive hook.
|
|
391
|
+
hide: d || void 0,
|
|
392
|
+
filter: b,
|
|
393
|
+
floatingFilterComponent: p,
|
|
394
|
+
minWidth: 200,
|
|
395
|
+
width: 240
|
|
396
|
+
},
|
|
397
|
+
/* ── Care-plan status (P2) ─────────────────────────────────────── */
|
|
398
|
+
{
|
|
399
|
+
colId: "carePlanStatus",
|
|
400
|
+
headerName: l("carePlanStatus"),
|
|
401
|
+
responsiveTier: "P2",
|
|
402
|
+
field: "carePlanStatus",
|
|
403
|
+
cellRenderer: ze,
|
|
404
|
+
filter: R,
|
|
405
|
+
floatingFilterComponent: F,
|
|
406
|
+
filterParams: {
|
|
407
|
+
options: [
|
|
408
|
+
{
|
|
409
|
+
value: "accepted",
|
|
410
|
+
label: e("patientTable.carePlanStatus.accepted")
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
value: "estimate",
|
|
414
|
+
label: e("patientTable.carePlanStatus.estimate")
|
|
415
|
+
},
|
|
416
|
+
{ value: "none", label: e("patientTable.carePlanStatus.none") }
|
|
417
|
+
]
|
|
418
|
+
},
|
|
419
|
+
sortable: !1,
|
|
420
|
+
minWidth: 130,
|
|
421
|
+
width: 150
|
|
422
|
+
},
|
|
423
|
+
/* ── Fiscal code (P3, text) ────────────────────────────────────── */
|
|
424
|
+
{
|
|
425
|
+
colId: "fiscalCode",
|
|
426
|
+
headerName: l("fiscalCode"),
|
|
427
|
+
responsiveTier: "P3",
|
|
428
|
+
field: "italianFiscalCode",
|
|
429
|
+
filter: b,
|
|
430
|
+
floatingFilterComponent: p,
|
|
431
|
+
minWidth: 160,
|
|
432
|
+
width: 180
|
|
433
|
+
},
|
|
434
|
+
/* ── Age (P3, derived numeric) ─────────────────────────────────── */
|
|
435
|
+
{
|
|
436
|
+
colId: "age",
|
|
437
|
+
headerName: l("age"),
|
|
438
|
+
responsiveTier: "P3",
|
|
439
|
+
// Left-aligned like the text columns — `numericColumn` (which right-aligns
|
|
440
|
+
// header + cell) is for ledger figures, not a 2-digit age. Sort stays
|
|
441
|
+
// numeric because the valueGetter returns a number.
|
|
442
|
+
valueGetter: (t) => {
|
|
443
|
+
var n;
|
|
444
|
+
return Ze((n = t.data) == null ? void 0 : n.dateOfBirth) ?? void 0;
|
|
445
|
+
},
|
|
446
|
+
filter: H,
|
|
447
|
+
floatingFilterComponent: U,
|
|
448
|
+
minWidth: 90,
|
|
449
|
+
width: 110
|
|
450
|
+
},
|
|
451
|
+
/* ── Gender (P3) ───────────────────────────────────────────────── */
|
|
452
|
+
{
|
|
453
|
+
colId: "gender",
|
|
454
|
+
headerName: l("gender"),
|
|
455
|
+
responsiveTier: "P3",
|
|
456
|
+
// Map the raw code to a localised label for both cell + set filter.
|
|
457
|
+
valueGetter: (t) => {
|
|
458
|
+
var n;
|
|
459
|
+
return (n = t.data) != null && n.gender ? m[t.data.gender] : W;
|
|
460
|
+
},
|
|
461
|
+
filter: R,
|
|
462
|
+
floatingFilterComponent: F,
|
|
463
|
+
filterParams: {
|
|
464
|
+
options: [
|
|
465
|
+
{ value: m.m, label: m.m },
|
|
466
|
+
{ value: m.f, label: m.f },
|
|
467
|
+
{ value: m.x, label: m.x }
|
|
468
|
+
]
|
|
469
|
+
},
|
|
470
|
+
minWidth: 110,
|
|
471
|
+
width: 130
|
|
472
|
+
},
|
|
473
|
+
/* ── Source (P3) ───────────────────────────────────────────────── */
|
|
474
|
+
{
|
|
475
|
+
colId: "source",
|
|
476
|
+
headerName: l("source"),
|
|
477
|
+
responsiveTier: "P3",
|
|
478
|
+
// TagListCellRenderer expects an array; wrap the resolved source string.
|
|
479
|
+
valueGetter: (t) => {
|
|
480
|
+
var o, f;
|
|
481
|
+
const n = ((o = t.data) == null ? void 0 : o.source) ?? ((f = t.data) == null ? void 0 : f.customSource);
|
|
482
|
+
return n ? [n] : [];
|
|
483
|
+
},
|
|
484
|
+
cellRenderer: ne,
|
|
485
|
+
filterValueGetter: (t) => {
|
|
486
|
+
var n, o;
|
|
487
|
+
return ((n = t.data) == null ? void 0 : n.source) ?? ((o = t.data) == null ? void 0 : o.customSource) ?? "";
|
|
488
|
+
},
|
|
489
|
+
filter: R,
|
|
490
|
+
floatingFilterComponent: F,
|
|
491
|
+
sortable: !1,
|
|
492
|
+
minWidth: 120,
|
|
493
|
+
width: 150
|
|
494
|
+
},
|
|
495
|
+
/* ── Grouped: Identity — hidden by default ─────────────────────── */
|
|
496
|
+
{
|
|
497
|
+
colId: "dateOfBirth",
|
|
498
|
+
headerName: l("dateOfBirth"),
|
|
499
|
+
hide: !0,
|
|
500
|
+
field: "dateOfBirth",
|
|
501
|
+
cellRenderer: K,
|
|
502
|
+
cellRendererParams: { format: "date" },
|
|
503
|
+
filter: _,
|
|
504
|
+
floatingFilterComponent: L,
|
|
505
|
+
minWidth: 140,
|
|
506
|
+
width: 160
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
colId: "placeOfBirth",
|
|
510
|
+
headerName: l("placeOfBirth"),
|
|
511
|
+
hide: !0,
|
|
512
|
+
field: "placeOfBirth",
|
|
513
|
+
filter: b,
|
|
514
|
+
floatingFilterComponent: p,
|
|
515
|
+
minWidth: 140,
|
|
516
|
+
width: 160
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
colId: "countryOfBirth",
|
|
520
|
+
headerName: l("countryOfBirth"),
|
|
521
|
+
hide: !0,
|
|
522
|
+
field: "countryOfBirth",
|
|
523
|
+
filter: b,
|
|
524
|
+
floatingFilterComponent: p,
|
|
525
|
+
minWidth: 130,
|
|
526
|
+
width: 150
|
|
527
|
+
},
|
|
528
|
+
/* ── Grouped: Contact — hidden by default ──────────────────────── */
|
|
529
|
+
{
|
|
530
|
+
colId: "smsReminders",
|
|
531
|
+
headerName: l("smsReminders"),
|
|
532
|
+
hide: !0,
|
|
533
|
+
valueGetter: (t) => {
|
|
534
|
+
var n;
|
|
535
|
+
return !!((n = t.data) != null && n.smsReminderEligible);
|
|
536
|
+
},
|
|
537
|
+
valueFormatter: (t) => t.value === !0 ? B : W,
|
|
538
|
+
filter: R,
|
|
539
|
+
floatingFilterComponent: F,
|
|
540
|
+
filterParams: {
|
|
541
|
+
options: [
|
|
542
|
+
{ value: !0, label: B },
|
|
543
|
+
{ value: !1, label: W }
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
minWidth: 120,
|
|
547
|
+
width: 140
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
colId: "emailReminders",
|
|
551
|
+
headerName: l("emailReminders"),
|
|
552
|
+
hide: !0,
|
|
553
|
+
valueGetter: (t) => {
|
|
554
|
+
var n;
|
|
555
|
+
return !!((n = t.data) != null && n.emailReminderEligible);
|
|
556
|
+
},
|
|
557
|
+
valueFormatter: (t) => t.value === !0 ? B : W,
|
|
558
|
+
filter: R,
|
|
559
|
+
floatingFilterComponent: F,
|
|
560
|
+
filterParams: {
|
|
561
|
+
options: [
|
|
562
|
+
{ value: !0, label: B },
|
|
563
|
+
{ value: !1, label: W }
|
|
564
|
+
]
|
|
565
|
+
},
|
|
566
|
+
minWidth: 120,
|
|
567
|
+
width: 140
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
colId: "pec",
|
|
571
|
+
headerName: l("pec"),
|
|
572
|
+
hide: !0,
|
|
573
|
+
field: "pecAddress",
|
|
574
|
+
filter: b,
|
|
575
|
+
floatingFilterComponent: p,
|
|
576
|
+
minWidth: 200,
|
|
577
|
+
width: 240
|
|
578
|
+
},
|
|
579
|
+
/* ── Grouped: Appointments — hidden by default ─────────────────── */
|
|
580
|
+
{
|
|
581
|
+
colId: "lastVisit",
|
|
582
|
+
headerName: l("lastVisit"),
|
|
583
|
+
hide: !0,
|
|
584
|
+
field: "lastAppointment",
|
|
585
|
+
cellRenderer: K,
|
|
586
|
+
cellRendererParams: { format: "relative" },
|
|
587
|
+
filter: _,
|
|
588
|
+
floatingFilterComponent: L,
|
|
589
|
+
minWidth: 140,
|
|
590
|
+
width: 160
|
|
591
|
+
},
|
|
592
|
+
/* ── Grouped: Financial — hidden by default ────────────────────── */
|
|
593
|
+
{
|
|
594
|
+
colId: "billableAmount",
|
|
595
|
+
headerName: l("billableAmount"),
|
|
596
|
+
hide: !0,
|
|
597
|
+
type: "numericColumn",
|
|
598
|
+
cellRenderer: Ce,
|
|
599
|
+
// Cents → major unit at the render boundary. No `field` — the valueGetter
|
|
600
|
+
// takes precedence over `field` in AG Grid for both cell + sort, so a
|
|
601
|
+
// `field: 'billableAmount'` would be dead (and misleadingly imply the raw
|
|
602
|
+
// cents drive the renderer).
|
|
603
|
+
valueGetter: (t) => t.data ? t.data.billableAmount / 100 : void 0,
|
|
604
|
+
filter: H,
|
|
605
|
+
floatingFilterComponent: U,
|
|
606
|
+
minWidth: 140,
|
|
607
|
+
width: 160
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
colId: "discount",
|
|
611
|
+
headerName: l("discount"),
|
|
612
|
+
hide: !0,
|
|
613
|
+
field: "defaultDiscount",
|
|
614
|
+
type: "numericColumn",
|
|
615
|
+
valueFormatter: (t) => t.value == null ? "" : `${t.value}%`,
|
|
616
|
+
filter: H,
|
|
617
|
+
floatingFilterComponent: U,
|
|
618
|
+
minWidth: 110,
|
|
619
|
+
width: 130
|
|
620
|
+
},
|
|
621
|
+
/* ── Grouped: Clinical — hidden by default ─────────────────────── */
|
|
622
|
+
{
|
|
623
|
+
colId: "diagnosis",
|
|
624
|
+
headerName: l("diagnosis"),
|
|
625
|
+
hide: !0,
|
|
626
|
+
field: "diagnosis",
|
|
627
|
+
filter: b,
|
|
628
|
+
floatingFilterComponent: p,
|
|
629
|
+
minWidth: 180,
|
|
630
|
+
width: 220
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
colId: "insurance",
|
|
634
|
+
headerName: l("insurance"),
|
|
635
|
+
hide: !0,
|
|
636
|
+
field: "defaultInsurance",
|
|
637
|
+
filter: R,
|
|
638
|
+
floatingFilterComponent: F,
|
|
639
|
+
minWidth: 140,
|
|
640
|
+
width: 160
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
colId: "assignedTo",
|
|
644
|
+
headerName: l("assignedTo"),
|
|
645
|
+
hide: !0,
|
|
646
|
+
cellRenderer: we,
|
|
647
|
+
valueGetter: (t) => {
|
|
648
|
+
var n;
|
|
649
|
+
return (n = t.data) != null && n.personalAssistant ? { name: t.data.personalAssistant } : null;
|
|
650
|
+
},
|
|
651
|
+
comparator: (t, n) => ((t == null ? void 0 : t.name) ?? "").localeCompare((n == null ? void 0 : n.name) ?? ""),
|
|
652
|
+
filterValueGetter: (t) => {
|
|
653
|
+
var n;
|
|
654
|
+
return ((n = t.data) == null ? void 0 : n.personalAssistant) ?? "";
|
|
655
|
+
},
|
|
656
|
+
filter: Ne,
|
|
657
|
+
floatingFilterComponent: ve,
|
|
658
|
+
minWidth: 160,
|
|
659
|
+
width: 180
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
colId: "job",
|
|
663
|
+
headerName: l("job"),
|
|
664
|
+
hide: !0,
|
|
665
|
+
field: "job",
|
|
666
|
+
filter: b,
|
|
667
|
+
floatingFilterComponent: p,
|
|
668
|
+
minWidth: 140,
|
|
669
|
+
width: 160
|
|
670
|
+
},
|
|
671
|
+
/* ── Grouped: Admin — hidden by default ────────────────────────── */
|
|
672
|
+
{
|
|
673
|
+
colId: "marketingConsent",
|
|
674
|
+
headerName: l("marketingConsent"),
|
|
675
|
+
hide: !0,
|
|
676
|
+
cellRenderer: Te,
|
|
677
|
+
cellRendererParams: {
|
|
678
|
+
variantMap: C
|
|
679
|
+
},
|
|
680
|
+
valueGetter: (t) => {
|
|
681
|
+
var n;
|
|
682
|
+
switch ((n = t.data) == null ? void 0 : n.marketingConsent) {
|
|
683
|
+
case 1:
|
|
684
|
+
return u.yes;
|
|
685
|
+
case 0:
|
|
686
|
+
return u.no;
|
|
687
|
+
default:
|
|
688
|
+
return u.notSpecified;
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
filter: R,
|
|
692
|
+
floatingFilterComponent: F,
|
|
693
|
+
filterParams: {
|
|
694
|
+
options: [
|
|
695
|
+
{ value: u.yes, label: u.yes },
|
|
696
|
+
{ value: u.no, label: u.no },
|
|
697
|
+
{
|
|
698
|
+
value: u.notSpecified,
|
|
699
|
+
label: u.notSpecified
|
|
700
|
+
}
|
|
701
|
+
]
|
|
702
|
+
},
|
|
703
|
+
sortable: !1,
|
|
704
|
+
minWidth: 150,
|
|
705
|
+
width: 170
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
colId: "patientNumber",
|
|
709
|
+
headerName: l("patientNumber"),
|
|
710
|
+
hide: !0,
|
|
711
|
+
// `YYYY/N` yearly numbering.
|
|
712
|
+
valueGetter: (t) => {
|
|
713
|
+
var f, v;
|
|
714
|
+
const n = (f = t.data) == null ? void 0 : f.yearlyNumberingYear, o = (v = t.data) == null ? void 0 : v.yearlyNumberingNumber;
|
|
715
|
+
return n != null && o != null ? `${n}/${o}` : "";
|
|
716
|
+
},
|
|
717
|
+
filter: b,
|
|
718
|
+
floatingFilterComponent: p,
|
|
719
|
+
minWidth: 120,
|
|
720
|
+
width: 140
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
colId: "portal",
|
|
724
|
+
headerName: l("portal"),
|
|
725
|
+
hide: !0,
|
|
726
|
+
valueGetter: (t) => {
|
|
727
|
+
var n;
|
|
728
|
+
return !!((n = t.data) != null && n.mydentista);
|
|
729
|
+
},
|
|
730
|
+
valueFormatter: (t) => t.value === !0 ? B : W,
|
|
731
|
+
filter: R,
|
|
732
|
+
floatingFilterComponent: F,
|
|
733
|
+
filterParams: {
|
|
734
|
+
options: [
|
|
735
|
+
{ value: !0, label: B },
|
|
736
|
+
{ value: !1, label: W }
|
|
737
|
+
]
|
|
738
|
+
},
|
|
739
|
+
minWidth: 110,
|
|
740
|
+
width: 130
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
colId: "createdAt",
|
|
744
|
+
headerName: l("createdAt"),
|
|
745
|
+
hide: !0,
|
|
746
|
+
field: "createdAt",
|
|
747
|
+
cellRenderer: K,
|
|
748
|
+
cellRendererParams: { format: "date" },
|
|
749
|
+
filter: _,
|
|
750
|
+
floatingFilterComponent: L,
|
|
751
|
+
minWidth: 140,
|
|
752
|
+
width: 160
|
|
753
|
+
},
|
|
754
|
+
/* ── Grouped: Address — hidden by default ──────────────────────── */
|
|
755
|
+
{
|
|
756
|
+
colId: "city",
|
|
757
|
+
headerName: l("city"),
|
|
758
|
+
hide: !0,
|
|
759
|
+
field: "city",
|
|
760
|
+
filter: b,
|
|
761
|
+
floatingFilterComponent: p,
|
|
762
|
+
minWidth: 120,
|
|
763
|
+
width: 150
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
colId: "province",
|
|
767
|
+
headerName: l("province"),
|
|
768
|
+
hide: !0,
|
|
769
|
+
field: "province",
|
|
770
|
+
filter: b,
|
|
771
|
+
floatingFilterComponent: p,
|
|
772
|
+
minWidth: 100,
|
|
773
|
+
width: 120
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
colId: "postcode",
|
|
777
|
+
headerName: l("postcode"),
|
|
778
|
+
hide: !0,
|
|
779
|
+
field: "postcode",
|
|
780
|
+
filter: b,
|
|
781
|
+
floatingFilterComponent: p,
|
|
782
|
+
minWidth: 110,
|
|
783
|
+
width: 130
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
colId: "country",
|
|
787
|
+
headerName: l("country"),
|
|
788
|
+
hide: !0,
|
|
789
|
+
field: "countryCode",
|
|
790
|
+
filter: b,
|
|
791
|
+
floatingFilterComponent: p,
|
|
792
|
+
minWidth: 110,
|
|
793
|
+
width: 130
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
colId: "street",
|
|
797
|
+
headerName: l("street"),
|
|
798
|
+
hide: !0,
|
|
799
|
+
field: "street",
|
|
800
|
+
filter: b,
|
|
801
|
+
floatingFilterComponent: p,
|
|
802
|
+
minWidth: 180,
|
|
803
|
+
width: 220
|
|
804
|
+
},
|
|
805
|
+
/* ── Custom fields (per-practice, dynamic) — appended, hidden ──── */
|
|
806
|
+
...et(c),
|
|
807
|
+
/* ── Actions (P0, pinned-end) ──────────────────────────────────── */
|
|
808
|
+
{
|
|
809
|
+
colId: "actions",
|
|
810
|
+
headerName: l("actions"),
|
|
811
|
+
// Pinned to the inline-end edge so actions stay reachable while the field
|
|
812
|
+
// columns scroll. AG Grid `pinned` is physical — the grid's `enableRtl`
|
|
813
|
+
// flips this to the start edge under RTL.
|
|
814
|
+
pinned: "right",
|
|
815
|
+
// Header + action group left-aligned (justify-start), consistent with every
|
|
816
|
+
// other column — no right-aligned header (the actions still sit at the
|
|
817
|
+
// pinned inline-end edge, the group just starts at the cell's leading edge).
|
|
818
|
+
cellClass: "ds:justify-start",
|
|
819
|
+
cellRenderer: Fe,
|
|
820
|
+
cellRendererParams: {
|
|
821
|
+
actions: h,
|
|
822
|
+
intent: "ghost",
|
|
823
|
+
group: !0,
|
|
824
|
+
label: e("patientTable.actions.group"),
|
|
825
|
+
collapsed: s
|
|
826
|
+
},
|
|
827
|
+
sortable: !1,
|
|
828
|
+
filter: !1,
|
|
829
|
+
resizable: !1,
|
|
830
|
+
// The renderer collapses to a single overflow trigger via
|
|
831
|
+
// `getActionsCompact`; the expanded width is DERIVED from the action count
|
|
832
|
+
// so a row showing every action can't clip — 88px collapsed → fits-all.
|
|
833
|
+
width: ae(h.length),
|
|
834
|
+
minWidth: 88
|
|
835
|
+
// Anchor — never auto-hidden (no tier).
|
|
836
|
+
}
|
|
837
|
+
];
|
|
838
|
+
}
|
|
839
|
+
const nt = [
|
|
840
|
+
{ minWidth: 0, tier: "P0" },
|
|
841
|
+
{ minWidth: 640, tier: "P1" },
|
|
842
|
+
{ minWidth: 900, tier: "P2" },
|
|
843
|
+
{ minWidth: 1200, tier: "P3" }
|
|
844
|
+
];
|
|
845
|
+
function Z(e, i) {
|
|
846
|
+
const d = /* @__PURE__ */ new Set();
|
|
847
|
+
for (const s of i)
|
|
848
|
+
e >= s.minWidth && d.add(s.tier);
|
|
849
|
+
return d.add("P0"), d;
|
|
850
|
+
}
|
|
851
|
+
function at(e, i) {
|
|
852
|
+
const {
|
|
853
|
+
containerRef: d,
|
|
854
|
+
enabled: s = !0,
|
|
855
|
+
breakpoints: a = nt
|
|
856
|
+
} = i, r = k(/* @__PURE__ */ new Set()), c = k(!1);
|
|
857
|
+
return ee(() => {
|
|
858
|
+
const m = d.current;
|
|
859
|
+
if (!s || !m) return;
|
|
860
|
+
const u = () => {
|
|
861
|
+
var o;
|
|
862
|
+
return (o = e.current) == null ? void 0 : o.getRawApi();
|
|
863
|
+
}, C = (o) => {
|
|
864
|
+
if (c.current || o.source === "api") return;
|
|
865
|
+
const f = o.columns ?? (o.column ? [o.column] : []);
|
|
866
|
+
for (const v of f)
|
|
867
|
+
r.current.add(v.getColId());
|
|
868
|
+
};
|
|
869
|
+
let l = !1;
|
|
870
|
+
const w = (o) => {
|
|
871
|
+
if (l) return;
|
|
872
|
+
l = !0;
|
|
873
|
+
const f = o.getColumns(), v = m.getBoundingClientRect().width, D = Z(v, a);
|
|
874
|
+
if (f)
|
|
875
|
+
for (const T of f) {
|
|
876
|
+
const I = q(T.getColDef());
|
|
877
|
+
I && !T.isVisible() && D.has(I) && r.current.add(T.getColId());
|
|
878
|
+
}
|
|
879
|
+
o.addEventListener("columnVisible", C);
|
|
880
|
+
}, t = () => {
|
|
881
|
+
const o = u();
|
|
882
|
+
if (!o) return;
|
|
883
|
+
w(o);
|
|
884
|
+
const f = o.getColumns();
|
|
885
|
+
if (!f) return;
|
|
886
|
+
const v = m.getBoundingClientRect().width, D = Z(v, a), T = [], I = [];
|
|
887
|
+
for (const S of f) {
|
|
888
|
+
const V = S.getColId();
|
|
889
|
+
if (r.current.has(V)) continue;
|
|
890
|
+
const A = q(S.getColDef());
|
|
891
|
+
if (!A) continue;
|
|
892
|
+
const E = D.has(A);
|
|
893
|
+
E && !S.isVisible() ? T.push(S) : !E && S.isVisible() && I.push(S);
|
|
894
|
+
}
|
|
895
|
+
if (!(T.length === 0 && I.length === 0)) {
|
|
896
|
+
c.current = !0;
|
|
897
|
+
try {
|
|
898
|
+
T.length > 0 && o.setColumnsVisible(T, !0), I.length > 0 && o.setColumnsVisible(I, !1);
|
|
899
|
+
} finally {
|
|
900
|
+
c.current = !1;
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
}, n = new ResizeObserver(() => t());
|
|
904
|
+
return n.observe(m), t(), () => {
|
|
905
|
+
var o;
|
|
906
|
+
n.disconnect(), (o = u()) == null || o.removeEventListener("columnVisible", C);
|
|
907
|
+
};
|
|
908
|
+
}, [d, s, a, e]), { lockColumns: z((m) => {
|
|
909
|
+
for (const u of m) r.current.add(u);
|
|
910
|
+
}, []) };
|
|
911
|
+
}
|
|
912
|
+
function it(e) {
|
|
913
|
+
var i;
|
|
914
|
+
return (i = e.data) != null && i.isArchived ? "data-table-row-archived" : void 0;
|
|
915
|
+
}
|
|
916
|
+
function lt(e) {
|
|
917
|
+
return e.data.id;
|
|
918
|
+
}
|
|
919
|
+
function rt({
|
|
920
|
+
views: e,
|
|
921
|
+
handleRef: i,
|
|
922
|
+
lockColumns: d,
|
|
923
|
+
label: s
|
|
924
|
+
}) {
|
|
925
|
+
const [a, r] = te(""), c = Y(
|
|
926
|
+
() => e.map((u) => ({ value: u.id, label: u.label })),
|
|
927
|
+
[e]
|
|
928
|
+
), h = z(
|
|
929
|
+
(u) => {
|
|
930
|
+
const C = e.find((t) => t.id === u), l = i.current;
|
|
931
|
+
if (!C || !l) return;
|
|
932
|
+
const w = l.getRawApi();
|
|
933
|
+
if (w) {
|
|
934
|
+
const t = new Set(C.columns), n = [], o = [];
|
|
935
|
+
for (const f of w.getColumns() ?? []) {
|
|
936
|
+
if (q(f.getColDef()) === void 0) continue;
|
|
937
|
+
const v = f.getColId();
|
|
938
|
+
t.has(v) ? n.push(v) : o.push(v);
|
|
939
|
+
}
|
|
940
|
+
d([...n, ...o]), n.length > 0 && w.setColumnsVisible(n, !0), o.length > 0 && w.setColumnsVisible(o, !1);
|
|
941
|
+
}
|
|
942
|
+
l.setFilter(C.filterModel), l.setSort(C.sortModel), w == null || w.onFilterChanged();
|
|
943
|
+
},
|
|
944
|
+
[e, i, d]
|
|
945
|
+
), m = z(
|
|
946
|
+
(u) => {
|
|
947
|
+
r(u), u && h(u);
|
|
948
|
+
},
|
|
949
|
+
[h]
|
|
950
|
+
);
|
|
951
|
+
return (
|
|
952
|
+
// Width-constraining wrapper (same pattern as the toolbar's QuickSearch) so
|
|
953
|
+
// the Select's intrinsic `w-full` trigger sizes to a compact, legible width
|
|
954
|
+
// instead of absorbing the whole FilterBar row.
|
|
955
|
+
/* @__PURE__ */ g("div", { className: "ds:w-[12rem] ds:max-w-full ds:min-w-0 ds:shrink-0", children: /* @__PURE__ */ g(
|
|
956
|
+
Ie,
|
|
957
|
+
{
|
|
958
|
+
options: c,
|
|
959
|
+
value: a,
|
|
960
|
+
onValueChange: m,
|
|
961
|
+
size: "sm",
|
|
962
|
+
"aria-label": s
|
|
963
|
+
}
|
|
964
|
+
) })
|
|
965
|
+
);
|
|
966
|
+
}
|
|
967
|
+
const ot = he(
|
|
968
|
+
function({
|
|
969
|
+
rowData: i,
|
|
970
|
+
columns: d,
|
|
971
|
+
gridId: s,
|
|
972
|
+
density: a,
|
|
973
|
+
actionsCompact: r,
|
|
974
|
+
heightClass: c,
|
|
975
|
+
responsive: h = !0,
|
|
976
|
+
views: m,
|
|
977
|
+
onRowAction: u,
|
|
978
|
+
bulkActions: C,
|
|
979
|
+
loading: l = !1,
|
|
980
|
+
toolbar: w,
|
|
981
|
+
hideQuickSearch: t = !1,
|
|
982
|
+
pagination: n = !0,
|
|
983
|
+
paginationPageSizeSelector: o,
|
|
984
|
+
hideDetails: f = !1,
|
|
985
|
+
identityHref: v,
|
|
986
|
+
customFields: D,
|
|
987
|
+
"aria-label": T,
|
|
988
|
+
className: I
|
|
989
|
+
}, S) {
|
|
990
|
+
const { t: V } = $("ui"), A = k(null), E = k(null), [G, le] = te(null);
|
|
991
|
+
pe(
|
|
992
|
+
S,
|
|
993
|
+
() => G ?? A.current,
|
|
994
|
+
[G]
|
|
995
|
+
);
|
|
996
|
+
const { lockColumns: re } = at(A, {
|
|
997
|
+
containerRef: E,
|
|
998
|
+
enabled: h
|
|
999
|
+
}), M = r ?? a === "compact", Q = k(M), X = z(() => Q.current, []);
|
|
1000
|
+
ee(() => {
|
|
1001
|
+
var y;
|
|
1002
|
+
Q.current = M;
|
|
1003
|
+
const N = (y = A.current) == null ? void 0 : y.getRawApi();
|
|
1004
|
+
N && (N.setColumnWidths([
|
|
1005
|
+
{
|
|
1006
|
+
key: "actions",
|
|
1007
|
+
newWidth: M ? 88 : ae(Qe)
|
|
1008
|
+
}
|
|
1009
|
+
]), N.refreshCells({ force: !0 }));
|
|
1010
|
+
}, [M, G]);
|
|
1011
|
+
const oe = Y(
|
|
1012
|
+
() => d ?? tt(V, {
|
|
1013
|
+
hideDetails: f,
|
|
1014
|
+
onRowAction: u,
|
|
1015
|
+
identityHref: v,
|
|
1016
|
+
customFields: D,
|
|
1017
|
+
getActionsCompact: X
|
|
1018
|
+
}),
|
|
1019
|
+
[
|
|
1020
|
+
d,
|
|
1021
|
+
V,
|
|
1022
|
+
f,
|
|
1023
|
+
u,
|
|
1024
|
+
v,
|
|
1025
|
+
D,
|
|
1026
|
+
X
|
|
1027
|
+
]
|
|
1028
|
+
), se = ((m == null ? void 0 : m.length) ?? 0) > 0, de = /* @__PURE__ */ O(P.Toolbar, { children: [
|
|
1029
|
+
/* @__PURE__ */ O(P.Toolbar.FilterBar, { children: [
|
|
1030
|
+
se && m ? /* @__PURE__ */ g(
|
|
1031
|
+
rt,
|
|
1032
|
+
{
|
|
1033
|
+
views: m,
|
|
1034
|
+
handleRef: A,
|
|
1035
|
+
lockColumns: re,
|
|
1036
|
+
label: V("patientTable.views.label")
|
|
1037
|
+
}
|
|
1038
|
+
) : null,
|
|
1039
|
+
t ? null : /* @__PURE__ */ g(P.Toolbar.QuickSearch, {}),
|
|
1040
|
+
/* @__PURE__ */ g(P.Toolbar.FilterChips, {})
|
|
1041
|
+
] }),
|
|
1042
|
+
/* @__PURE__ */ O(P.Toolbar.Actions, { children: [
|
|
1043
|
+
C == null ? void 0 : C.map((N) => /* @__PURE__ */ g(
|
|
1044
|
+
P.Toolbar.BulkAction,
|
|
1045
|
+
{
|
|
1046
|
+
label: N.label,
|
|
1047
|
+
icon: N.icon,
|
|
1048
|
+
variant: N.variant,
|
|
1049
|
+
onClick: (y) => {
|
|
1050
|
+
const fe = (y == null ? void 0 : y.getSelectedNodes().map((j) => j.id).filter((j) => j != null)) ?? [];
|
|
1051
|
+
N.onSelect(fe);
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1054
|
+
N.id
|
|
1055
|
+
)),
|
|
1056
|
+
/* @__PURE__ */ g(P.Toolbar.ColumnToggle, {}),
|
|
1057
|
+
/* @__PURE__ */ g(P.Toolbar.ExportMenu, {})
|
|
1058
|
+
] })
|
|
1059
|
+
] }), ce = w ?? de, ue = l ? void 0 : i, me = Y(() => ({ getRowId: lt }), []);
|
|
1060
|
+
return ye(
|
|
1061
|
+
Re,
|
|
1062
|
+
G,
|
|
1063
|
+
s
|
|
1064
|
+
), /* @__PURE__ */ g(
|
|
1065
|
+
"div",
|
|
1066
|
+
{
|
|
1067
|
+
ref: E,
|
|
1068
|
+
role: "region",
|
|
1069
|
+
"aria-label": T ?? V("patientTable.regionLabel"),
|
|
1070
|
+
"data-component": "patient-table",
|
|
1071
|
+
"data-component-id": s,
|
|
1072
|
+
className: "ds:flex ds:w-full ds:min-h-0 ds:flex-1 ds:flex-col",
|
|
1073
|
+
children: /* @__PURE__ */ g(
|
|
1074
|
+
P,
|
|
1075
|
+
{
|
|
1076
|
+
ref: (N) => {
|
|
1077
|
+
A.current = N, le(
|
|
1078
|
+
(y) => y === N ? y : N
|
|
1079
|
+
);
|
|
1080
|
+
},
|
|
1081
|
+
gridId: s,
|
|
1082
|
+
columnDefs: oe,
|
|
1083
|
+
rowData: ue,
|
|
1084
|
+
rowSelection: "multiple",
|
|
1085
|
+
pagination: n,
|
|
1086
|
+
...c !== void 0 ? { heightClass: c } : {},
|
|
1087
|
+
...o !== void 0 ? { paginationPageSizeSelector: o } : {},
|
|
1088
|
+
density: a,
|
|
1089
|
+
getRowClass: it,
|
|
1090
|
+
gridOptions: me,
|
|
1091
|
+
className: I,
|
|
1092
|
+
children: ce
|
|
1093
|
+
}
|
|
1094
|
+
)
|
|
1095
|
+
}
|
|
1096
|
+
);
|
|
1097
|
+
}
|
|
1098
|
+
);
|
|
1099
|
+
ot.displayName = "PatientTable";
|
|
1100
|
+
export {
|
|
1101
|
+
_e as B,
|
|
1102
|
+
ze as C,
|
|
1103
|
+
qe as N,
|
|
1104
|
+
Qe as P,
|
|
1105
|
+
ot as a,
|
|
1106
|
+
tt as b,
|
|
1107
|
+
q as g,
|
|
1108
|
+
at as u
|
|
1109
|
+
};
|
|
1110
|
+
//# sourceMappingURL=patient-table-CERknpd8.js.map
|