@alfadocs/ui-kit 0.72.2 → 0.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{agenda-tray-loL2A3Cx.js → agenda-tray-CVf-jfWU.js} +3 -3
- package/dist/_chunks/{ai-consent-banner-Bke9m8VS.js → ai-consent-banner-DUhr1yNj.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-TVI95hJD.js → ai-prompt-input-DFm58UjY.js} +2 -2
- package/dist/_chunks/{alia-sidebar-BV5lBSFR.js → alia-sidebar-w6B0TEx7.js} +8 -8
- package/dist/_chunks/{anamnesis-card-CWO4Ui9c.js → anamnesis-card-CJ5MNbkc.js} +2 -2
- package/dist/_chunks/{antenatal-schedule-timeline-CY-VsLok.js → antenatal-schedule-timeline-BzJZqS-8.js} +3 -3
- package/dist/_chunks/{appointment-card-Cy4FOkGP.js → appointment-card-DgKI5QKD.js} +2 -2
- package/dist/_chunks/{appointment-timeline-BWAPPk8F.js → appointment-timeline-DQTG0btW.js} +6 -6
- package/dist/_chunks/{appointment-tray-D3mk04TT.js → appointment-tray-ezyCZN8v.js} +4 -4
- package/dist/_chunks/{ar-BOqyIfoY.js → ar-B1GhtlBP.js} +2 -2
- package/dist/_chunks/arrow-up-right-C2v_MKsK.js +15 -0
- package/dist/_chunks/{audio-recorder-BbjG55dP.js → audio-recorder-CjAY0GAc.js} +3 -3
- package/dist/_chunks/{benefit-card-Xnxj4Gmo.js → benefit-card-DB1Kdrmc.js} +4 -2
- package/dist/_chunks/{bishop-score-C6eoak_j.js → bishop-score-Bs6t6Zv1.js} +2 -2
- package/dist/_chunks/{bmi-calculator-BmQfoEGP.js → bmi-calculator-Bk2GAju7.js} +2 -2
- package/dist/_chunks/{booking-B62CMY5k.js → booking-CWnZhZ5g.js} +8 -8
- package/dist/_chunks/{button-DD_0Xdmr.js → button-CPGiR_bH.js} +56 -35
- package/dist/_chunks/button-group-DzV5wgnx.js +289 -0
- package/dist/_chunks/camera-VSklPDCv.js +21 -0
- package/dist/_chunks/{care-plan-card-DhXbfGzE.js → care-plan-card-CfIP3Vc1.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-D3YGD6rj.js → care-plan-entry-card-CRbS-G00.js} +3 -3
- package/dist/_chunks/{care-plan-header-DtQxyfOb.js → care-plan-header-BXvRpGG8.js} +2 -2
- package/dist/_chunks/{carousel.agent-j7hWxJWr.js → carousel.agent-CtAAdsAd.js} +2 -2
- package/dist/_chunks/{chat-container-BVCoN06N.js → chat-container-HlFnoEIl.js} +4 -2
- package/dist/_chunks/{chat-input-Btq_uuMZ.js → chat-input-BTCDqUDX.js} +2 -2
- package/dist/_chunks/{chat-message-DXjjM8z9.js → chat-message-CdjWqZjo.js} +3 -3
- package/dist/_chunks/{code-block-Cwi7e3HM.js → code-block-BwanBjRh.js} +2 -2
- package/dist/_chunks/{connection-status-0HajXMXM.js → connection-status-oEUyrvev.js} +3 -3
- package/dist/_chunks/{contact-profile-card-IggiUVpN.js → contact-profile-card-veMV3W4J.js} +2 -2
- package/dist/_chunks/{control-room-rail-DaGcsdZ6.js → control-room-rail-CdfrZ6Vr.js} +3 -3
- package/dist/_chunks/{copy-field-PAp0-Wr5.js → copy-field-DBc9QquW.js} +2 -2
- package/dist/_chunks/{cycle-calculator-BNILyVas.js → cycle-calculator-OQp8Ik5U.js} +4 -4
- package/dist/_chunks/{date-picker-CVkD_lOi.js → date-picker-DzQS8mvt.js} +2 -2
- package/dist/_chunks/{date-picker-variants-DLg-ZrIo.js → date-picker-variants-CYQAm1Gk.js} +116 -115
- package/dist/_chunks/{date-range-picker-Dw12DgV8.js → date-range-picker-Cbz1SKhm.js} +3 -3
- package/dist/_chunks/{date-time-picker-Cd_OJtOy.js → date-time-picker-B5IpU-nd.js} +2 -2
- package/dist/_chunks/{de-DFLsUxeV.js → de-DETDHQ0o.js} +2 -2
- package/dist/_chunks/{description-list-CmBVxIF5.js → description-list-ClNLdRMy.js} +2 -2
- package/dist/_chunks/{document-scanner-B23j4w7X.js → document-scanner-BE6Jz4Ob.js} +198 -230
- package/dist/_chunks/{due-date-calculator-CmdAl_JO.js → due-date-calculator-DASNRgnH.js} +4 -4
- package/dist/_chunks/{editable-currency-cell-renderer-z9fJFw6Z.js → editable-currency-cell-renderer-GwfA9tTR.js} +3 -3
- package/dist/_chunks/{editor-overlay-BIOzr8v7.js → editor-overlay-DE3esyio.js} +2 -2
- package/dist/_chunks/{el-OVjBKytp.js → el-HV3jOI0z.js} +2 -2
- package/dist/_chunks/{empty-state-BLy7tigq.js → empty-state-CrLsi0XI.js} +2 -2
- package/dist/_chunks/{entity-summary-DpGziDv5.js → entity-summary--vP698Jn.js} +3 -3
- package/dist/_chunks/eraser-CHOGQfVv.js +21 -0
- package/dist/_chunks/{es-DKDNrHXG.js → es-Dpo7Olwo.js} +2 -2
- package/dist/_chunks/face-scheme-C0rk21gg.js +3146 -0
- package/dist/_chunks/{fetal-weight-CVAH8sJ3.js → fetal-weight-1F9N4IMx.js} +2 -2
- package/dist/_chunks/{field-array-CDzc3hTM.js → field-array-DH3Mb1i8.js} +3 -3
- package/dist/_chunks/{field-value-Dj3i52H2.js → field-value-DCXJXKab.js} +5 -5
- package/dist/_chunks/{file-upload-Kw1rdvFw.js → file-upload-B2SXhRiN.js} +104 -111
- package/dist/_chunks/{finished-terminal-Di4gtZ50.js → finished-terminal-C0_mefrf.js} +11 -11
- package/dist/_chunks/{fiscal-code-input-DKNXFXs3.js → fiscal-code-input-DWA6C8x8.js} +2 -2
- package/dist/_chunks/{fr-BfMvQh-v.js → fr-CgD4Jvtq.js} +2 -2
- package/dist/_chunks/{freemium-paywall-DFoeedwh.js → freemium-paywall-CmV642PA.js} +7 -3
- package/dist/_chunks/{gestational-age-calculator-BwCBPAGX.js → gestational-age-calculator-C9Dfis4I.js} +6 -6
- package/dist/_chunks/{hcg-doubling-CSsWxEJc.js → hcg-doubling-Dqj-EqMT.js} +3 -3
- package/dist/_chunks/{header-DaXWDw0M.js → header-CjwasYnn.js} +88 -79
- package/dist/_chunks/{header-settings-B0G_u-wV.js → header-settings-CRQDCYgr.js} +4 -4
- package/dist/_chunks/{hi-C0GEMwlD.js → hi-Bf8CAP6b.js} +2 -2
- package/dist/_chunks/highlighter-DSkckT2Q.js +15 -0
- package/dist/_chunks/{icon-button-LqoiKcUN.js → icon-button-C_kbcd7I.js} +2 -2
- package/dist/_chunks/icon-button-group-C_lqXTAj.js +391 -0
- package/dist/_chunks/{icon-picker-Di6uYDG-.js → icon-picker-BePK27S-.js} +3 -3
- package/dist/_chunks/{image-cropper-CdmWFrMC.js → image-cropper-DKe4AORY.js} +2 -2
- package/dist/_chunks/{insert-result-C7xSDb8q.js → insert-result-D074GtHX.js} +58 -68
- package/dist/_chunks/{isSameWeek-HddDAyJG.js → isSameWeek-BYl5poz_.js} +2 -2
- package/dist/_chunks/{it-5f4hiT2e.js → it-mt1V2DFS.js} +3 -3
- package/dist/_chunks/{ja-U0_2inl_.js → ja-CbOHn2TO.js} +2 -2
- package/dist/_chunks/{key-value-pair-Byyyc_9J.js → key-value-pair-LHKfDT_9.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-BCppbMec.js → link-cell-renderer-CLI7sBkX.js} +803 -778
- package/dist/_chunks/{locale-picker-DzF7Q5Y8.js → locale-picker-Cbfqc0_N.js} +3 -3
- package/dist/_chunks/{map-view-ByPvWG_9.js → map-view-CsaHfoo6.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-BCYiOvKZ.js → marketplace-app-shell-Dm6S-hun.js} +6 -6
- package/dist/_chunks/{message-card-BZnnffyB.js → message-card-ievotOFa.js} +3 -3
- package/dist/_chunks/{message-tray-cUHOCdU0.js → message-tray-BFlu8clI.js} +4 -4
- package/dist/_chunks/{nl-CDVnnx1U.js → nl-C6Y0QXnm.js} +2 -2
- package/dist/_chunks/{notes-panel-CMyjUXD4.js → notes-panel-B_8-Mebz.js} +3 -3
- package/dist/_chunks/{notification-card-BHJ07FkH.js → notification-card-D29_sVA1.js} +3 -3
- package/dist/_chunks/{notification-tray-Dzm1c3Wy.js → notification-tray-CzIzz3bX.js} +4 -4
- package/dist/_chunks/optical-prescription-BQ75_kf6.js +1260 -0
- package/dist/_chunks/{patient-details-pU_E5xM2.js → patient-details-JkOI3Ijd.js} +6 -6
- package/dist/_chunks/{patient-search-X9SUZGpy.js → patient-search-BaUJ_Y-N.js} +47 -45
- package/dist/_chunks/{patient-summary-card--t3BjTdU.js → patient-summary-card-CQOLMH3E.js} +4 -4
- package/dist/_chunks/{patient-table-BgWgNIMf.js → patient-table-B_mOe-ZT.js} +2 -2
- package/dist/_chunks/{payment-request-card-2ts7ITxd.js → payment-request-card-C0fqlKqO.js} +25 -24
- package/dist/_chunks/pen-line-D0De5zdl.js +21 -0
- package/dist/_chunks/{periodontal-chart-card-6c6Lt4ws.js → periodontal-chart-card-WVjJAheq.js} +2 -2
- package/dist/_chunks/{pl-BWNumNrg.js → pl-BdazJAOp.js} +3 -3
- package/dist/_chunks/{popover-uJ6BvEU3.js → popover-DGTKfLWh.js} +2 -2
- package/dist/_chunks/{practice-results-CSEHTH2V.js → practice-results-BCr7jMt1.js} +5 -5
- package/dist/_chunks/{pregnancy-dating-CxVAA6_4.js → pregnancy-dating-IsDVfqJX.js} +6 -6
- package/dist/_chunks/{pregnancy-weight-gain-C7zyrwow.js → pregnancy-weight-gain-B-CkVYnU.js} +2 -2
- package/dist/_chunks/{privacy-lock-DrRmK8C7.js → privacy-lock-YYBiI_bY.js} +3 -3
- package/dist/_chunks/{product-hub-panel-CaZqttvm.js → product-hub-panel-CTld1r5V.js} +3 -3
- package/dist/_chunks/{pt-zqdQuryr.js → pt-B3UKvhHp.js} +2 -2
- package/dist/_chunks/{public-header.agent-C-opZaOw.js → public-header.agent-rX_VA6hd.js} +107 -103
- package/dist/_chunks/{radiograph-panel.agent-D1x33moc.js → radiograph-panel.agent-e488ooH8.js} +40 -57
- package/dist/_chunks/{reviews-panel-liUj6OPX.js → reviews-panel-DmOjvmyH.js} +4 -4
- package/dist/_chunks/{rich-text-editor-DUgznqOf.js → rich-text-editor-CgA2bYwi.js} +186 -195
- package/dist/_chunks/{ro-CornQr64.js → ro-DVTEQpPK.js} +2 -2
- package/dist/_chunks/{ru-CKAXNYVD.js → ru-C-Mp40SC.js} +3 -3
- package/dist/_chunks/{session-countdown-qr8EO5QY.js → session-countdown-C8AsE072.js} +2 -2
- package/dist/_chunks/{sheet-B_X54aZo.js → sheet-D5K0LB3q.js} +2 -2
- package/dist/_chunks/{sidebar-B0OBmJrC.js → sidebar-CtU35PIX.js} +70 -67
- package/dist/_chunks/{sign-document-nK03S73h.js → sign-document-Bfk0WpWV.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-LppxjlFt.js → sign-in-with-alfadocs-button-UlYefZpI.js} +2 -2
- package/dist/_chunks/{signature-capture-Ct_4Md4e.js → signature-capture-DN52VNKL.js} +206 -189
- package/dist/_chunks/{signature-field-jgwYgUhO.js → signature-field-0rFODJlW.js} +47 -41
- package/dist/_chunks/{slot-grid-FsqumOaS.js → slot-grid-CQSULZjd.js} +4 -4
- package/dist/_chunks/{sq-CIIvqXZv.js → sq-DierVlw-.js} +2 -2
- package/dist/_chunks/{streaming-text-Cedc05ya.js → streaming-text-C5bYz7LL.js} +2 -2
- package/dist/_chunks/subDays-DIKRViZm.js +8 -0
- package/dist/_chunks/{sv-Kpk1pzjz.js → sv-gQWo_19z.js} +2 -2
- package/dist/_chunks/{task-tray-DP5A3Qnc.js → task-tray-Br3vc0O1.js} +3 -3
- package/dist/_chunks/{tasks-panel-BuxaYtEF.js → tasks-panel-LCK5ZXvU.js} +5 -5
- package/dist/_chunks/{theme-toggle-dtdy5EaL.js → theme-toggle-BJCz_UOi.js} +3 -3
- package/dist/_chunks/{toast.agent-BSxl057x.js → toast.agent-uV8CeAy6.js} +2 -2
- package/dist/_chunks/{token-insert-menu-Pok4nExI.js → token-insert-menu-BYv6yoZI.js} +2 -2
- package/dist/_chunks/{tool-rail-BZx0-yIr.js → tool-rail-AaTqxkIM.js} +2 -2
- package/dist/_chunks/{tooth-scheme-D_rso4uu.js → tooth-scheme-CX49GycY.js} +3 -3
- package/dist/_chunks/{tr-DHaeLFxG.js → tr-Btm6M3Km.js} +2 -2
- package/dist/_chunks/{transaction-chip-B6iWoVmU.js → transaction-chip-DJCstquX.js} +41 -51
- package/dist/_chunks/type-ggmfVs23.js +16 -0
- package/dist/_chunks/{unit-converter-fEqluT8b.js → unit-converter-3uL_tMCm.js} +2 -2
- package/dist/_chunks/upload-BfT2hzMg.js +16 -0
- package/dist/_chunks/use-priority-overflow-c9SjxZkZ.js +101 -0
- package/dist/_chunks/use-visual-viewport-pin-ChurOsHM.js +31 -0
- package/dist/_chunks/{warning-stack-BaMI7-n7.js → warning-stack-BlG_Ujy3.js} +3 -3
- package/dist/_chunks/{workflow-map-qWsgCldq.js → workflow-map-C643Q43h.js} +5 -5
- package/dist/_chunks/{zh-CN-BncsTBwM.js → zh-CN-DkVN4vsB.js} +3 -3
- package/dist/agent-catalog.json +845 -1034
- package/dist/agent-i18n/en.json +42 -69
- package/dist/brand/product-lockup/product-lockup.d.ts +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/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/benefit-card/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/button.d.ts +8 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/button-group/button-group.d.ts +16 -0
- 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/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chat-container/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/connection-status/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/counter/counter.d.ts +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/data-table.d.ts +2 -8
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/data-table/toolbar.d.ts +4 -10
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/description-list/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/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/face-scheme/face-scheme-data.d.ts +167 -0
- package/dist/components/face-scheme/face-scheme.d.ts +112 -2
- package/dist/components/face-scheme/index.d.ts +2 -2
- package/dist/components/face-scheme/index.js +25 -14
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/field-array/index.js +1 -1
- package/dist/components/file-upload/file-upload.d.ts +1 -0
- package/dist/components/file-upload/index.d.ts +1 -1
- package/dist/components/file-upload/index.js +4 -3
- package/dist/components/finished-terminal/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/flag/flag.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/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button-group/icon-button-group.d.ts +6 -0
- 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 +0 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/link/link.d.ts +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/matrix-rain/matrix-rain.d.ts +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/optical-prescription/index.d.ts +4 -2
- package/dist/components/optical-prescription/index.js +29 -26
- package/dist/components/optical-prescription/optical-prescription-charts.d.ts +78 -0
- package/dist/components/optical-prescription/optical-prescription-data.d.ts +29 -0
- package/dist/components/optical-prescription/optical-prescription.d.ts +9 -0
- 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-card/index.js +1 -1
- package/dist/components/popover/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/public-header/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/radiograph-panel/radiograph-panel.d.ts +2 -2
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/signature-field/index.js +1 -1
- package/dist/components/signature-field/signature-field.d.ts +7 -0
- package/dist/components/skeleton-scheme/index.js +1194 -0
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/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/transaction-chip/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +40 -35
- package/dist/hooks/use-priority-overflow.d.ts +63 -0
- package/dist/hooks/use-visual-viewport-pin.d.ts +32 -0
- package/dist/i18n/locales/ar.d.ts +170 -9
- package/dist/i18n/locales/ar.js +173 -12
- package/dist/i18n/locales/de.d.ts +170 -9
- package/dist/i18n/locales/de.js +173 -12
- package/dist/i18n/locales/el.d.ts +170 -9
- package/dist/i18n/locales/el.js +173 -12
- package/dist/i18n/locales/en.d.ts +170 -9
- package/dist/i18n/locales/en.js +173 -12
- package/dist/i18n/locales/es.d.ts +170 -9
- package/dist/i18n/locales/es.js +173 -12
- package/dist/i18n/locales/fr.d.ts +170 -9
- package/dist/i18n/locales/fr.js +173 -12
- package/dist/i18n/locales/hi.d.ts +170 -9
- package/dist/i18n/locales/hi.js +173 -12
- package/dist/i18n/locales/it.d.ts +170 -9
- package/dist/i18n/locales/it.js +173 -12
- package/dist/i18n/locales/ja.d.ts +170 -9
- package/dist/i18n/locales/ja.js +173 -12
- package/dist/i18n/locales/nl.d.ts +170 -9
- package/dist/i18n/locales/nl.js +173 -12
- package/dist/i18n/locales/pl.d.ts +170 -9
- package/dist/i18n/locales/pl.js +173 -12
- package/dist/i18n/locales/pt.d.ts +170 -9
- package/dist/i18n/locales/pt.js +173 -12
- package/dist/i18n/locales/ro.d.ts +170 -9
- package/dist/i18n/locales/ro.js +173 -12
- package/dist/i18n/locales/ru.d.ts +170 -9
- package/dist/i18n/locales/ru.js +173 -12
- package/dist/i18n/locales/sq.d.ts +170 -9
- package/dist/i18n/locales/sq.js +173 -12
- package/dist/i18n/locales/sv.d.ts +170 -9
- package/dist/i18n/locales/sv.js +173 -12
- package/dist/i18n/locales/tr.d.ts +170 -9
- package/dist/i18n/locales/tr.js +173 -12
- package/dist/i18n/locales/zh.d.ts +170 -9
- package/dist/i18n/locales/zh.js +173 -12
- package/dist/index.js +774 -761
- package/dist/locales/ar.json +173 -12
- package/dist/locales/de.json +173 -12
- package/dist/locales/el.json +173 -12
- package/dist/locales/en.json +173 -12
- package/dist/locales/es.json +173 -12
- package/dist/locales/fr.json +173 -12
- package/dist/locales/hi.json +173 -12
- package/dist/locales/it.json +173 -12
- package/dist/locales/ja.json +173 -12
- package/dist/locales/nl.json +173 -12
- package/dist/locales/pl.json +173 -12
- package/dist/locales/pt.json +173 -12
- package/dist/locales/ro.json +173 -12
- package/dist/locales/ru.json +173 -12
- package/dist/locales/sq.json +173 -12
- package/dist/locales/sv.json +173 -12
- package/dist/locales/tr.json +173 -12
- package/dist/locales/zh.json +173 -12
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +1 -1
- package/dist/tokens.css +2 -2
- package/package.json +5 -5
- package/dist/_chunks/button-group-CvEnVzY7.js +0 -119
- package/dist/_chunks/face-scheme-BT9_KdL0.js +0 -1450
- package/dist/_chunks/icon-button-group-C48khLE0.js +0 -206
- package/dist/_chunks/optical-prescription-Bmlbuopi.js +0 -653
- package/dist/_chunks/patient-shell-oiIRqEAl.js +0 -162
- package/dist/_chunks/subDays-DGSOp9d9.js +0 -8
- package/dist/patterns/patient-shell/index.d.ts +0 -12
- package/dist/patterns/patient-shell/index.js +0 -5
- package/dist/patterns/patient-shell/patient-shell.d.ts +0 -62
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { S as
|
|
4
|
-
import { E as
|
|
5
|
-
import { c as
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { useGridFilter as
|
|
8
|
-
import { ModuleRegistry as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { T as
|
|
1
|
+
import { jsx as n, jsxs as A } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as O, forwardRef as G, useState as k, useCallback as q, useEffect as P, useRef as ke, createContext as Ee, useContext as Ae, isValidElement as Oe, cloneElement as ze, useImperativeHandle as ht } from "react";
|
|
3
|
+
import { S as vt } from "./skeleton-CZbwyJAA.js";
|
|
4
|
+
import { E as Tt } from "./empty-state-CrLsi0XI.js";
|
|
5
|
+
import { c as yt } from "./index-D2ZczOXr.js";
|
|
6
|
+
import { useTranslation as D } from "react-i18next";
|
|
7
|
+
import { useGridFilter as ee, AgGridReact as Ct } from "ag-grid-react";
|
|
8
|
+
import { ModuleRegistry as xt, AllCommunityModule as St } from "ag-grid-community";
|
|
9
|
+
import { I as Pe } from "./icon-button-group-C_lqXTAj.js";
|
|
10
|
+
import { B } from "./button-CPGiR_bH.js";
|
|
11
|
+
import { I as V } from "./icon-button-C_kbcd7I.js";
|
|
12
|
+
import { P as ae } from "./popover-DGTKfLWh.js";
|
|
13
|
+
import { C as Me } from "./checkbox-BuZ1u__2.js";
|
|
14
|
+
import { T as me } from "./text-input-CUvCb6ST.js";
|
|
15
|
+
import { T as oe } from "./tag-3wgkwwDB.js";
|
|
15
16
|
import { D as _ } from "./dropdown-menu-DU-Hrf33.js";
|
|
16
|
-
import { X as
|
|
17
|
-
import { R as
|
|
18
|
-
import { S as
|
|
19
|
-
import { C as
|
|
20
|
-
import { G as
|
|
21
|
-
import { P as
|
|
22
|
-
import { F as
|
|
23
|
-
import { D as
|
|
24
|
-
import { F as
|
|
25
|
-
import
|
|
26
|
-
import { S as
|
|
27
|
-
import { u as
|
|
28
|
-
import { u as
|
|
29
|
-
import { u as
|
|
30
|
-
import { D as
|
|
31
|
-
import { M as
|
|
32
|
-
import { S as
|
|
33
|
-
import { A as
|
|
34
|
-
import { N as
|
|
35
|
-
import { B as
|
|
36
|
-
import { A as
|
|
37
|
-
import { T as
|
|
38
|
-
import { T as
|
|
39
|
-
import { I as Mt } from "./icon-button-group-C48khLE0.js";
|
|
17
|
+
import { X as qe } from "./x-B5YnXwCz.js";
|
|
18
|
+
import { R as wt } from "./refresh-cw-DnI0cLFC.js";
|
|
19
|
+
import { S as ge } from "./search-QbWPlY5f.js";
|
|
20
|
+
import { C as Nt } from "./columns-2-8lq4-b8e.js";
|
|
21
|
+
import { G as Ft } from "./grip-vertical-onSb1JXO.js";
|
|
22
|
+
import { P as Rt } from "./printer-rkK0T1gi.js";
|
|
23
|
+
import { F as je } from "./file-text-5yv6r2ls.js";
|
|
24
|
+
import { D as se } from "./download-CfYKJO_j.js";
|
|
25
|
+
import { F as Dt } from "./file-spreadsheet-DmwyfV4O.js";
|
|
26
|
+
import It from "i18next";
|
|
27
|
+
import { S as Le } from "./select-BmCbJMJS.js";
|
|
28
|
+
import { u as kt } from "./registry-DvAUVLHh.js";
|
|
29
|
+
import { u as Et } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
30
|
+
import { u as At } from "./use-theme-CAuo6EYT.js";
|
|
31
|
+
import { D as Ge } from "./date-range-picker-Cbz1SKhm.js";
|
|
32
|
+
import { M as Ot } from "./multi-select-D5QLBJM1.js";
|
|
33
|
+
import { S as zt } from "./scroll-area-BZOvUhwQ.js";
|
|
34
|
+
import { A as Be } from "./autocomplete-BrONKN8l.js";
|
|
35
|
+
import { N as re } from "./number-input-DjWzmlEY.js";
|
|
36
|
+
import { B as Pt } from "./badge-DCOqV9mI.js";
|
|
37
|
+
import { A as $e } from "./avatar-BNQNhoyL.js";
|
|
38
|
+
import { T as Mt } from "./tooltip-DvmfrNvB.js";
|
|
39
|
+
import { T as Ne } from "./timestamp-BV2lC-wV.js";
|
|
40
40
|
import { E as qt } from "./ellipsis-dRo9ouSU.js";
|
|
41
|
-
function
|
|
42
|
-
if (!
|
|
41
|
+
function jt(t) {
|
|
42
|
+
if (!Oe(t)) return t;
|
|
43
43
|
const e = t, a = e.props.className ?? "", r = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} ds:size-4`.trim();
|
|
44
|
-
return
|
|
44
|
+
return ze(e, { className: r, size: e.props.size ?? 16 });
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
function
|
|
48
|
-
const e =
|
|
46
|
+
const _e = Ee(null);
|
|
47
|
+
function $(t) {
|
|
48
|
+
const e = Ae(_e);
|
|
49
49
|
if (!e)
|
|
50
50
|
throw new Error(
|
|
51
51
|
`${t} must be rendered inside <DataTable.Toolbar> as a descendant of <DataTable>.`
|
|
52
52
|
);
|
|
53
53
|
return e;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Lt({
|
|
56
56
|
getApi: t,
|
|
57
57
|
selectionCount: e,
|
|
58
58
|
onPrint: a,
|
|
59
59
|
children: r
|
|
60
60
|
}) {
|
|
61
|
-
const o =
|
|
61
|
+
const o = O(
|
|
62
62
|
() => ({ getApi: t, selectionCount: e, onPrint: a }),
|
|
63
63
|
[t, e, a]
|
|
64
64
|
);
|
|
65
|
-
return /* @__PURE__ */ n(
|
|
65
|
+
return /* @__PURE__ */ n(_e.Provider, { value: o, children: r });
|
|
66
66
|
}
|
|
67
67
|
const Gt = [
|
|
68
68
|
"data-table-toolbar",
|
|
@@ -72,18 +72,11 @@ const Gt = [
|
|
|
72
72
|
// desktop width (1024 / 1280 / 1440) — the QuickSearch slot shrinks via
|
|
73
73
|
// its own `min-w-0` instead of pushing the trailing Actions to a new row.
|
|
74
74
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
75
|
-
"ds:sm:flex-nowrap ds:min-w-0"
|
|
76
|
-
//
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
|
|
80
|
-
// standard `--card-border` outline (same recipe as `<Card>`) so the
|
|
81
|
-
// toolbar reads as a discrete surface in both light and dark themes.
|
|
82
|
-
"ds:bg-[var(--card)] ds:rounded-[var(--radius-md)]",
|
|
83
|
-
"ds:border ds:border-[color:var(--card-border)]",
|
|
84
|
-
"ds:shadow-[var(--shadow-sm)]",
|
|
85
|
-
"ds:py-[var(--spacing-sm)] ds:px-[var(--spacing-md)]"
|
|
86
|
-
].join(" "), Pe = G(
|
|
75
|
+
"ds:sm:flex-nowrap ds:min-w-0"
|
|
76
|
+
// No card surface: the toolbar sits directly on the page background,
|
|
77
|
+
// matching the header-tools layout the Patients / Care Plan List
|
|
78
|
+
// patterns established (the old bg-card + border + shadow bar is gone).
|
|
79
|
+
].join(" "), Ve = G(
|
|
87
80
|
({ className: t, children: e, ...a }, r) => /* @__PURE__ */ n(
|
|
88
81
|
"div",
|
|
89
82
|
{
|
|
@@ -95,8 +88,8 @@ const Gt = [
|
|
|
95
88
|
}
|
|
96
89
|
)
|
|
97
90
|
);
|
|
98
|
-
|
|
99
|
-
const
|
|
91
|
+
Ve.displayName = "DataTable.Toolbar";
|
|
92
|
+
const We = G(
|
|
100
93
|
({ className: t, children: e, ...a }, r) => /* @__PURE__ */ n(
|
|
101
94
|
"div",
|
|
102
95
|
{
|
|
@@ -115,8 +108,8 @@ const Me = G(
|
|
|
115
108
|
}
|
|
116
109
|
)
|
|
117
110
|
);
|
|
118
|
-
|
|
119
|
-
const
|
|
111
|
+
We.displayName = "DataTable.Toolbar.FilterBar";
|
|
112
|
+
const Ke = G(
|
|
120
113
|
({ className: t, children: e, ...a }, r) => /* @__PURE__ */ n(
|
|
121
114
|
"div",
|
|
122
115
|
{
|
|
@@ -131,12 +124,12 @@ const qe = G(
|
|
|
131
124
|
}
|
|
132
125
|
)
|
|
133
126
|
);
|
|
134
|
-
|
|
135
|
-
const
|
|
127
|
+
Ke.displayName = "DataTable.Toolbar.Actions";
|
|
128
|
+
const be = G(
|
|
136
129
|
({ label: t, onExport: e, intent: a = "outline", ...r }, o) => {
|
|
137
|
-
const { t: s } =
|
|
138
|
-
const
|
|
139
|
-
|
|
130
|
+
const { t: s } = D(), { getApi: i } = $("DataTable.Toolbar.ExportCsv"), p = q(() => {
|
|
131
|
+
const c = i();
|
|
132
|
+
c && (e ? e(c) : c.exportDataAsCsv());
|
|
140
133
|
}, [i, e]);
|
|
141
134
|
return /* @__PURE__ */ n(
|
|
142
135
|
V,
|
|
@@ -144,7 +137,7 @@ const Le = G(
|
|
|
144
137
|
ref: o,
|
|
145
138
|
type: "button",
|
|
146
139
|
intent: a,
|
|
147
|
-
icon: /* @__PURE__ */ n(
|
|
140
|
+
icon: /* @__PURE__ */ n(se, { "aria-hidden": !0 }),
|
|
148
141
|
tooltip: t ?? s("dataTable.exportCsv"),
|
|
149
142
|
onClick: p,
|
|
150
143
|
...r
|
|
@@ -152,8 +145,8 @@ const Le = G(
|
|
|
152
145
|
);
|
|
153
146
|
}
|
|
154
147
|
);
|
|
155
|
-
|
|
156
|
-
function
|
|
148
|
+
be.displayName = "DataTable.Toolbar.ExportCsv";
|
|
149
|
+
function J(t, e = [30, 30, 30]) {
|
|
157
150
|
if (typeof document > "u") return e;
|
|
158
151
|
const a = document.createElement("span");
|
|
159
152
|
a.style.color = `hsl(var(${t}))`, a.style.position = "absolute", a.style.visibility = "hidden", document.body.appendChild(a);
|
|
@@ -162,49 +155,49 @@ function Q(t, e = [30, 30, 30]) {
|
|
|
162
155
|
const o = r.match(/rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)/i);
|
|
163
156
|
return o ? [Number(o[1]), Number(o[2]), Number(o[3])] : e;
|
|
164
157
|
}
|
|
165
|
-
async function
|
|
158
|
+
async function Ue(t, e) {
|
|
166
159
|
if (!t) return;
|
|
167
160
|
const [{ jsPDF: a }, { default: r }] = await Promise.all([
|
|
168
|
-
import("./jspdf.es.min-DaapWjR1.js").then((
|
|
161
|
+
import("./jspdf.es.min-DaapWjR1.js").then((f) => f.j),
|
|
169
162
|
import("./jspdf.plugin.autotable-CSiDNyPn.js")
|
|
170
|
-
]), s = (t.getColumns() ?? []).filter((
|
|
171
|
-
s.map((
|
|
163
|
+
]), s = (t.getColumns() ?? []).filter((f) => f.isVisible()), i = [
|
|
164
|
+
s.map((f) => t.getDisplayNameForColumn(f, null) ?? "")
|
|
172
165
|
], p = [];
|
|
173
|
-
t.forEachNodeAfterFilterAndSort((
|
|
174
|
-
if (!
|
|
175
|
-
const
|
|
176
|
-
const
|
|
177
|
-
rowNode:
|
|
178
|
-
colKey:
|
|
166
|
+
t.forEachNodeAfterFilterAndSort((f) => {
|
|
167
|
+
if (!f.data) return;
|
|
168
|
+
const h = s.map((T) => {
|
|
169
|
+
const w = t.getCellValue({
|
|
170
|
+
rowNode: f,
|
|
171
|
+
colKey: T,
|
|
179
172
|
useFormatter: !0
|
|
180
173
|
});
|
|
181
|
-
return
|
|
174
|
+
return w == null ? "" : String(w);
|
|
182
175
|
});
|
|
183
|
-
p.push(
|
|
176
|
+
p.push(h);
|
|
184
177
|
});
|
|
185
|
-
const
|
|
186
|
-
r(
|
|
178
|
+
const c = J("--muted", [240, 240, 240]), d = J("--foreground", [30, 30, 30]), l = J("--card-foreground", [30, 30, 30]), u = J("--card", [250, 250, 250]), b = new a({ orientation: "landscape" });
|
|
179
|
+
r(b, {
|
|
187
180
|
head: i,
|
|
188
181
|
body: p,
|
|
189
|
-
headStyles: { fillColor:
|
|
190
|
-
bodyStyles: { textColor:
|
|
182
|
+
headStyles: { fillColor: c, textColor: d },
|
|
183
|
+
bodyStyles: { textColor: l },
|
|
191
184
|
alternateRowStyles: { fillColor: u },
|
|
192
185
|
styles: {
|
|
193
186
|
font: "helvetica",
|
|
194
187
|
fontSize: 10,
|
|
195
188
|
cellPadding: 4
|
|
196
189
|
}
|
|
197
|
-
}),
|
|
190
|
+
}), b.save(e.fileName);
|
|
198
191
|
}
|
|
199
|
-
const
|
|
192
|
+
const he = G(
|
|
200
193
|
({ label: t, onClick: e, fileName: a, intent: r = "outline", ...o }, s) => {
|
|
201
|
-
const { t: i } =
|
|
194
|
+
const { t: i } = D(), { getApi: p } = $("DataTable.Toolbar.ExportPdf"), c = q(() => {
|
|
202
195
|
const d = p();
|
|
203
196
|
if (e) {
|
|
204
197
|
e(d);
|
|
205
198
|
return;
|
|
206
199
|
}
|
|
207
|
-
|
|
200
|
+
Ue(d, {
|
|
208
201
|
fileName: a ?? "data-table-export.pdf"
|
|
209
202
|
});
|
|
210
203
|
}, [p, e, a]);
|
|
@@ -214,25 +207,25 @@ const Ge = G(
|
|
|
214
207
|
ref: s,
|
|
215
208
|
type: "button",
|
|
216
209
|
intent: r,
|
|
217
|
-
icon: /* @__PURE__ */ n(
|
|
210
|
+
icon: /* @__PURE__ */ n(je, { "aria-hidden": !0 }),
|
|
218
211
|
tooltip: t ?? i("dataTable.exportPdf"),
|
|
219
|
-
onClick:
|
|
212
|
+
onClick: c,
|
|
220
213
|
...o
|
|
221
214
|
}
|
|
222
215
|
);
|
|
223
216
|
}
|
|
224
217
|
);
|
|
225
|
-
|
|
226
|
-
const
|
|
218
|
+
he.displayName = "DataTable.Toolbar.ExportPdf";
|
|
219
|
+
const ve = G(
|
|
227
220
|
({ label: t, intent: e = "outline", ...a }, r) => {
|
|
228
|
-
const { t: o } =
|
|
221
|
+
const { t: o } = D(), { onPrint: s } = $("DataTable.Toolbar.Print");
|
|
229
222
|
return /* @__PURE__ */ n(
|
|
230
223
|
V,
|
|
231
224
|
{
|
|
232
225
|
ref: r,
|
|
233
226
|
type: "button",
|
|
234
227
|
intent: e,
|
|
235
|
-
icon: /* @__PURE__ */ n(
|
|
228
|
+
icon: /* @__PURE__ */ n(Rt, { "aria-hidden": !0 }),
|
|
236
229
|
tooltip: t ?? o("dataTable.print"),
|
|
237
230
|
onClick: s,
|
|
238
231
|
...a
|
|
@@ -240,10 +233,10 @@ const Be = G(
|
|
|
240
233
|
);
|
|
241
234
|
}
|
|
242
235
|
);
|
|
243
|
-
|
|
244
|
-
const
|
|
245
|
-
const { t: a } =
|
|
246
|
-
return
|
|
236
|
+
ve.displayName = "DataTable.Toolbar.Print";
|
|
237
|
+
const He = ({ placeholder: t, debounceMs: e = 150 }) => {
|
|
238
|
+
const { t: a } = D(), { getApi: r } = $("DataTable.Toolbar.QuickSearch"), [o, s] = k(""), i = ke(void 0);
|
|
239
|
+
return P(() => (i.current && window.clearTimeout(i.current), i.current = window.setTimeout(() => {
|
|
247
240
|
const p = r();
|
|
248
241
|
p && p.setGridOption("quickFilterText", o);
|
|
249
242
|
}, e), () => {
|
|
@@ -256,31 +249,31 @@ const $e = ({ placeholder: t, debounceMs: e = 150 }) => {
|
|
|
256
249
|
// `--toolbar-search-max` token in the kit yet — see this component's
|
|
257
250
|
// summary for a follow-up note recommending we add one.
|
|
258
251
|
/* @__PURE__ */ n("div", { className: "ds:w-full ds:max-w-[24rem] ds:min-w-0", children: /* @__PURE__ */ n(
|
|
259
|
-
|
|
252
|
+
me,
|
|
260
253
|
{
|
|
261
254
|
type: "search",
|
|
262
255
|
size: "sm",
|
|
263
256
|
value: o,
|
|
264
257
|
onChange: (p) => s(p.target.value),
|
|
265
258
|
placeholder: t ?? a("dataTable.quickSearch.placeholder", "Search…"),
|
|
266
|
-
startAdornment: /* @__PURE__ */ n(
|
|
259
|
+
startAdornment: /* @__PURE__ */ n(ge, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
267
260
|
clearable: !0,
|
|
268
261
|
onClear: () => s(""),
|
|
269
262
|
"aria-label": a("dataTable.quickSearch.label", "Quick search")
|
|
270
263
|
}
|
|
271
264
|
) });
|
|
272
265
|
};
|
|
273
|
-
|
|
274
|
-
const
|
|
266
|
+
He.displayName = "DataTable.Toolbar.QuickSearch";
|
|
267
|
+
const Te = G(
|
|
275
268
|
({ onRefresh: t, label: e, intent: a = "outline", ...r }, o) => {
|
|
276
|
-
const { t: s } =
|
|
269
|
+
const { t: s } = D();
|
|
277
270
|
return /* @__PURE__ */ n(
|
|
278
271
|
V,
|
|
279
272
|
{
|
|
280
273
|
ref: o,
|
|
281
274
|
type: "button",
|
|
282
275
|
intent: a,
|
|
283
|
-
icon: /* @__PURE__ */ n(
|
|
276
|
+
icon: /* @__PURE__ */ n(wt, { "aria-hidden": !0 }),
|
|
284
277
|
tooltip: e ?? s("dataTable.refresh", "Refresh"),
|
|
285
278
|
onClick: t,
|
|
286
279
|
...r
|
|
@@ -288,7 +281,7 @@ const _e = G(
|
|
|
288
281
|
);
|
|
289
282
|
}
|
|
290
283
|
);
|
|
291
|
-
|
|
284
|
+
Te.displayName = "DataTable.Toolbar.Refresh";
|
|
292
285
|
function Bt(t) {
|
|
293
286
|
if (!t || typeof t != "object") return "";
|
|
294
287
|
const e = t;
|
|
@@ -298,51 +291,51 @@ function Bt(t) {
|
|
|
298
291
|
}
|
|
299
292
|
return typeof e.dateFrom == "string" ? typeof e.dateTo == "string" && e.dateTo ? `${e.dateFrom} – ${e.dateTo}` : String(e.dateFrom) : Array.isArray(e.values) ? e.values.map(String).join(", ") : "";
|
|
300
293
|
}
|
|
301
|
-
const
|
|
302
|
-
const { t } =
|
|
303
|
-
const
|
|
304
|
-
if (!
|
|
294
|
+
const Qe = () => {
|
|
295
|
+
const { t } = D(), { getApi: e } = $("DataTable.Toolbar.FilterChips"), [a, r] = k([]), [o, s] = k(""), i = q(() => {
|
|
296
|
+
const l = e();
|
|
297
|
+
if (!l) {
|
|
305
298
|
r([]), s("");
|
|
306
299
|
return;
|
|
307
300
|
}
|
|
308
|
-
const u =
|
|
309
|
-
for (const
|
|
310
|
-
const
|
|
311
|
-
|
|
312
|
-
colId:
|
|
313
|
-
headerName:
|
|
314
|
-
text: Bt(u[
|
|
301
|
+
const u = l.getFilterModel() ?? {}, b = l.getColumns() ?? [], f = [];
|
|
302
|
+
for (const T of Object.keys(u)) {
|
|
303
|
+
const w = b.find((m) => m.getColId() === T), g = l.getDisplayNameForColumn(w, null) ?? T;
|
|
304
|
+
f.push({
|
|
305
|
+
colId: T,
|
|
306
|
+
headerName: g,
|
|
307
|
+
text: Bt(u[T])
|
|
315
308
|
});
|
|
316
309
|
}
|
|
317
|
-
r(
|
|
318
|
-
const
|
|
319
|
-
s(typeof
|
|
310
|
+
r(f);
|
|
311
|
+
const h = l.getGridOption("quickFilterText");
|
|
312
|
+
s(typeof h == "string" ? h : "");
|
|
320
313
|
}, [e]);
|
|
321
|
-
if (
|
|
322
|
-
let
|
|
323
|
-
const u = (
|
|
324
|
-
|
|
325
|
-
},
|
|
326
|
-
if (
|
|
327
|
-
|
|
314
|
+
if (P(() => {
|
|
315
|
+
let l;
|
|
316
|
+
const u = (h) => i(), b = (h) => {
|
|
317
|
+
h.addEventListener("filterChanged", u), i(), l = () => h.removeEventListener("filterChanged", u);
|
|
318
|
+
}, f = e();
|
|
319
|
+
if (f)
|
|
320
|
+
b(f);
|
|
328
321
|
else {
|
|
329
|
-
const
|
|
330
|
-
const
|
|
331
|
-
|
|
322
|
+
const h = window.setInterval(() => {
|
|
323
|
+
const T = e();
|
|
324
|
+
T && (window.clearInterval(h), b(T));
|
|
332
325
|
}, 50);
|
|
333
|
-
|
|
326
|
+
l = () => window.clearInterval(h);
|
|
334
327
|
}
|
|
335
|
-
return () =>
|
|
328
|
+
return () => l == null ? void 0 : l();
|
|
336
329
|
}, [e, i]), a.length + (o ? 1 : 0) === 0) return null;
|
|
337
|
-
function l
|
|
330
|
+
function c(l) {
|
|
338
331
|
const u = e();
|
|
339
|
-
u && u.destroyFilter(
|
|
332
|
+
u && u.destroyFilter(l);
|
|
340
333
|
}
|
|
341
334
|
function d() {
|
|
342
|
-
const
|
|
343
|
-
|
|
335
|
+
const l = e();
|
|
336
|
+
l && (l.setFilterModel(null), l.setGridOption("quickFilterText", ""), s(""));
|
|
344
337
|
}
|
|
345
|
-
return /* @__PURE__ */
|
|
338
|
+
return /* @__PURE__ */ A(
|
|
346
339
|
"div",
|
|
347
340
|
{
|
|
348
341
|
role: "group",
|
|
@@ -350,35 +343,35 @@ const Ve = () => {
|
|
|
350
343
|
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
351
344
|
children: [
|
|
352
345
|
o && /* @__PURE__ */ n(
|
|
353
|
-
|
|
346
|
+
oe,
|
|
354
347
|
{
|
|
355
348
|
label: `${t("dataTable.quickSearch.label", "Quick search")}: ${o}`,
|
|
356
349
|
size: "sm",
|
|
357
350
|
fill: "outline",
|
|
358
351
|
onRemove: () => {
|
|
359
|
-
const
|
|
360
|
-
|
|
352
|
+
const l = e();
|
|
353
|
+
l == null || l.setGridOption("quickFilterText", ""), s("");
|
|
361
354
|
}
|
|
362
355
|
}
|
|
363
356
|
),
|
|
364
|
-
a.map((
|
|
365
|
-
|
|
357
|
+
a.map((l) => /* @__PURE__ */ n(
|
|
358
|
+
oe,
|
|
366
359
|
{
|
|
367
|
-
label:
|
|
360
|
+
label: l.text ? `${l.headerName}: ${l.text}` : l.headerName,
|
|
368
361
|
size: "sm",
|
|
369
362
|
fill: "outline",
|
|
370
|
-
onRemove: () => l
|
|
363
|
+
onRemove: () => c(l.colId)
|
|
371
364
|
},
|
|
372
|
-
|
|
365
|
+
l.colId
|
|
373
366
|
)),
|
|
374
367
|
/* @__PURE__ */ n(
|
|
375
|
-
|
|
368
|
+
B,
|
|
376
369
|
{
|
|
377
370
|
type: "button",
|
|
378
371
|
intent: "ghost",
|
|
379
372
|
size: "sm",
|
|
380
373
|
onClick: d,
|
|
381
|
-
startIcon: /* @__PURE__ */ n(
|
|
374
|
+
startIcon: /* @__PURE__ */ n(qe, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
382
375
|
children: t("dataTable.filterChips.clearAll", "Clear all")
|
|
383
376
|
}
|
|
384
377
|
)
|
|
@@ -386,24 +379,24 @@ const Ve = () => {
|
|
|
386
379
|
}
|
|
387
380
|
);
|
|
388
381
|
};
|
|
389
|
-
|
|
390
|
-
const
|
|
382
|
+
Qe.displayName = "DataTable.Toolbar.FilterChips";
|
|
383
|
+
const Je = ({
|
|
391
384
|
field: t,
|
|
392
385
|
options: e,
|
|
393
386
|
label: a
|
|
394
387
|
}) => {
|
|
395
|
-
const { t: r } =
|
|
396
|
-
function p(
|
|
397
|
-
i(
|
|
388
|
+
const { t: r } = D(), { getApi: o } = $("DataTable.Toolbar.FacetFilter"), [s, i] = k(null);
|
|
389
|
+
function p(c) {
|
|
390
|
+
i(c);
|
|
398
391
|
const d = o();
|
|
399
392
|
if (d) {
|
|
400
|
-
if (
|
|
393
|
+
if (c === null) {
|
|
401
394
|
d.destroyFilter(t);
|
|
402
395
|
return;
|
|
403
396
|
}
|
|
404
397
|
d.setColumnFilterModel(t, {
|
|
405
398
|
type: "equals",
|
|
406
|
-
filter:
|
|
399
|
+
filter: c
|
|
407
400
|
}), d.onFilterChanged();
|
|
408
401
|
}
|
|
409
402
|
}
|
|
@@ -413,105 +406,109 @@ const We = ({
|
|
|
413
406
|
role: "group",
|
|
414
407
|
"aria-label": a ?? r("dataTable.facetFilter.label", "Filter"),
|
|
415
408
|
className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
416
|
-
children: e.map((
|
|
417
|
-
const d = s ===
|
|
409
|
+
children: e.map((c) => {
|
|
410
|
+
const d = s === c.value;
|
|
418
411
|
return /* @__PURE__ */ n(
|
|
419
|
-
|
|
412
|
+
B,
|
|
420
413
|
{
|
|
421
414
|
type: "button",
|
|
422
415
|
size: "sm",
|
|
423
416
|
intent: d ? "primary" : "secondary",
|
|
424
417
|
"aria-pressed": d,
|
|
425
|
-
onClick: () => p(
|
|
426
|
-
children:
|
|
418
|
+
onClick: () => p(c.value),
|
|
419
|
+
children: c.label
|
|
427
420
|
},
|
|
428
|
-
String(
|
|
421
|
+
String(c.value)
|
|
429
422
|
);
|
|
430
423
|
})
|
|
431
424
|
}
|
|
432
425
|
);
|
|
433
426
|
};
|
|
434
|
-
|
|
427
|
+
Je.displayName = "DataTable.Toolbar.FacetFilter";
|
|
435
428
|
const $t = ["csv", "xlsx", "pdf"];
|
|
436
429
|
async function _t(t, e) {
|
|
437
430
|
if (!t) return;
|
|
438
|
-
const a = await import("./exceljs.min-DUJ-5CGx.js").then((
|
|
431
|
+
const a = await import("./exceljs.min-DUJ-5CGx.js").then((T) => T.e), r = new a.Workbook(), o = r.addWorksheet("Sheet1"), i = (t.getColumns() ?? []).filter((T) => T.isVisible());
|
|
439
432
|
o.addRow(
|
|
440
433
|
i.map(
|
|
441
|
-
(
|
|
434
|
+
(T) => t.getDisplayNameForColumn(T, null) ?? T.getColId()
|
|
442
435
|
)
|
|
443
|
-
), t.forEachNodeAfterFilterAndSort((
|
|
444
|
-
|
|
445
|
-
i.map((
|
|
446
|
-
const
|
|
447
|
-
rowNode:
|
|
448
|
-
colKey:
|
|
436
|
+
), t.forEachNodeAfterFilterAndSort((T) => {
|
|
437
|
+
T.data && o.addRow(
|
|
438
|
+
i.map((w) => {
|
|
439
|
+
const g = t.getCellValue({
|
|
440
|
+
rowNode: T,
|
|
441
|
+
colKey: w,
|
|
449
442
|
useFormatter: !0
|
|
450
443
|
});
|
|
451
|
-
return
|
|
444
|
+
return g ?? "";
|
|
452
445
|
})
|
|
453
446
|
);
|
|
454
447
|
});
|
|
455
|
-
const p =
|
|
456
|
-
d.eachCell((
|
|
457
|
-
|
|
448
|
+
const p = J("--muted", [240, 240, 240]), c = J("--foreground", [30, 30, 30]), d = o.getRow(1), l = ([T, w, g]) => `${T.toString(16).padStart(2, "0")}${w.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}`.toUpperCase();
|
|
449
|
+
d.eachCell((T) => {
|
|
450
|
+
T.font = { bold: !0, color: { argb: `FF${l(c)}` } }, T.fill = {
|
|
458
451
|
type: "pattern",
|
|
459
452
|
pattern: "solid",
|
|
460
|
-
fgColor: { argb: `FF${
|
|
453
|
+
fgColor: { argb: `FF${l(p)}` }
|
|
461
454
|
};
|
|
462
455
|
});
|
|
463
|
-
const u = await r.xlsx.writeBuffer(),
|
|
456
|
+
const u = await r.xlsx.writeBuffer(), b = new Blob([u], {
|
|
464
457
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
465
|
-
}),
|
|
466
|
-
|
|
458
|
+
}), f = URL.createObjectURL(b), h = document.createElement("a");
|
|
459
|
+
h.href = f, h.download = e.fileName, document.body.appendChild(h), h.click(), document.body.removeChild(h), URL.revokeObjectURL(f);
|
|
467
460
|
}
|
|
468
|
-
const
|
|
461
|
+
const Xe = Ee(null);
|
|
469
462
|
function Vt() {
|
|
470
|
-
const t =
|
|
463
|
+
const t = Ae(Xe);
|
|
471
464
|
if (!t)
|
|
472
465
|
throw new Error(
|
|
473
466
|
"DataTable.Toolbar.ExportMenu.Item must be rendered inside DataTable.Toolbar.ExportMenu."
|
|
474
467
|
);
|
|
475
468
|
return t;
|
|
476
469
|
}
|
|
477
|
-
const
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
/* @__PURE__ */ n(
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}
|
|
494
|
-
|
|
470
|
+
const ye = G(
|
|
471
|
+
({ children: t, label: e, intent: a = "outline", ...r }, o) => {
|
|
472
|
+
const { t: s } = D(), { getApi: i } = $("DataTable.Toolbar.ExportMenu"), p = O(() => ({ getApi: i }), [i]), c = t ?? $t.map((d) => /* @__PURE__ */ n(Ce, { format: d }, d));
|
|
473
|
+
return /* @__PURE__ */ n(Xe.Provider, { value: p, children: /* @__PURE__ */ A(_.Root, { children: [
|
|
474
|
+
/* @__PURE__ */ n(_.Trigger, { asChild: !0, children: /* @__PURE__ */ n(
|
|
475
|
+
V,
|
|
476
|
+
{
|
|
477
|
+
ref: o,
|
|
478
|
+
type: "button",
|
|
479
|
+
intent: a,
|
|
480
|
+
icon: /* @__PURE__ */ n(se, { "aria-hidden": !0 }),
|
|
481
|
+
tooltip: e ?? s("dataTable.export.menu", "Export"),
|
|
482
|
+
"aria-label": e ?? s("dataTable.export.menu", "Export"),
|
|
483
|
+
"aria-haspopup": "menu",
|
|
484
|
+
...r
|
|
485
|
+
}
|
|
486
|
+
) }),
|
|
487
|
+
/* @__PURE__ */ n(_.Content, { align: "end", sideOffset: 4, children: c })
|
|
488
|
+
] }) });
|
|
489
|
+
}
|
|
490
|
+
);
|
|
491
|
+
ye.displayName = "DataTable.Toolbar.ExportMenu";
|
|
495
492
|
function Wt(t, e) {
|
|
496
493
|
return e === "csv" ? t("dataTable.export.csv", "Export CSV") : e === "xlsx" ? t("dataTable.export.xlsx", "Export Excel") : e === "pdf" ? t("dataTable.export.pdf", "Export PDF") : t("dataTable.export.custom", "Export");
|
|
497
494
|
}
|
|
498
495
|
function Kt(t) {
|
|
499
|
-
return t === "csv" ? /* @__PURE__ */ n(
|
|
496
|
+
return t === "csv" ? /* @__PURE__ */ n(se, { "aria-hidden": !0, className: "ds:size-4" }) : t === "xlsx" ? /* @__PURE__ */ n(Dt, { "aria-hidden": !0, className: "ds:size-4" }) : t === "pdf" ? /* @__PURE__ */ n(je, { "aria-hidden": !0, className: "ds:size-4" }) : /* @__PURE__ */ n(se, { "aria-hidden": !0, className: "ds:size-4" });
|
|
500
497
|
}
|
|
501
|
-
const
|
|
498
|
+
const Ce = ({
|
|
502
499
|
format: t,
|
|
503
500
|
label: e,
|
|
504
501
|
onClick: a,
|
|
505
502
|
fileName: r
|
|
506
503
|
}) => {
|
|
507
|
-
const { t: o } =
|
|
504
|
+
const { t: o } = D(), { getApi: s } = Vt(), i = q(() => {
|
|
508
505
|
const p = s();
|
|
509
506
|
if (t === "csv") {
|
|
510
507
|
p == null || p.exportDataAsCsv();
|
|
511
508
|
return;
|
|
512
509
|
}
|
|
513
510
|
if (t === "pdf") {
|
|
514
|
-
|
|
511
|
+
Ue(p, {
|
|
515
512
|
fileName: r ?? "data-table-export.pdf"
|
|
516
513
|
});
|
|
517
514
|
return;
|
|
@@ -524,12 +521,12 @@ const me = ({
|
|
|
524
521
|
}
|
|
525
522
|
a == null || a(p);
|
|
526
523
|
}, [t, r, a, s]);
|
|
527
|
-
return /* @__PURE__ */ n(_.Item, { onSelect: i, children: /* @__PURE__ */
|
|
524
|
+
return /* @__PURE__ */ n(_.Item, { onSelect: i, children: /* @__PURE__ */ A("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
528
525
|
Kt(t),
|
|
529
526
|
/* @__PURE__ */ n("span", { children: e ?? Wt(o, t) })
|
|
530
527
|
] }) });
|
|
531
528
|
};
|
|
532
|
-
|
|
529
|
+
Ce.displayName = "DataTable.Toolbar.ExportMenu.Item";
|
|
533
530
|
function Ut(t) {
|
|
534
531
|
return t ? (t.getAllGridColumns() ?? []).map((a) => a.getColDef().hide === void 0 && a.getColId().startsWith("ag-Grid-") ? null : {
|
|
535
532
|
colId: a.getColId(),
|
|
@@ -537,127 +534,134 @@ function Ut(t) {
|
|
|
537
534
|
visible: a.isVisible()
|
|
538
535
|
}).filter((a) => a !== null) : [];
|
|
539
536
|
}
|
|
540
|
-
const
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
(
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
/* @__PURE__ */
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
type: "button",
|
|
576
|
-
intent: "outline",
|
|
577
|
-
icon: e ?? /* @__PURE__ */ n(wt, { "aria-hidden": !0 }),
|
|
578
|
-
"aria-label": S,
|
|
579
|
-
"aria-haspopup": "dialog"
|
|
580
|
-
}
|
|
581
|
-
) }),
|
|
582
|
-
/* @__PURE__ */ I(Z.Content, { size: "sm", align: "end", children: [
|
|
583
|
-
/* @__PURE__ */ n(Z.Heading, { children: S }),
|
|
584
|
-
r ? /* @__PURE__ */ n("div", { className: "ds:mb-[var(--spacing-xs)] ds:border-b ds:border-[color:var(--border)] ds:pb-[var(--spacing-sm)]", children: r }) : null,
|
|
585
|
-
/* @__PURE__ */ n(
|
|
586
|
-
"ul",
|
|
537
|
+
const xe = G(
|
|
538
|
+
function({ label: e, icon: a, footer: r, header: o, intent: s = "outline", ...i }, p) {
|
|
539
|
+
const { t: c } = D(), { getApi: d } = $("DataTable.Toolbar.ColumnToggle"), [l, u] = k(!1), [b, f] = k([]), [h, T] = k(null), [w, g] = k(null);
|
|
540
|
+
P(() => {
|
|
541
|
+
l && f(Ut(d()));
|
|
542
|
+
}, [l, d]);
|
|
543
|
+
const m = q(
|
|
544
|
+
(C, E) => {
|
|
545
|
+
const R = d();
|
|
546
|
+
R && (R.setColumnsVisible([C], E), f(
|
|
547
|
+
(I) => I.map(
|
|
548
|
+
(N) => N.colId === C ? { ...N, visible: E } : N
|
|
549
|
+
)
|
|
550
|
+
));
|
|
551
|
+
},
|
|
552
|
+
[d]
|
|
553
|
+
), y = q(
|
|
554
|
+
(C, E) => {
|
|
555
|
+
if (C === E) return;
|
|
556
|
+
const R = d();
|
|
557
|
+
if (!R) return;
|
|
558
|
+
f((N) => {
|
|
559
|
+
const U = N.findIndex((Y) => Y.colId === C), te = N.findIndex((Y) => Y.colId === E);
|
|
560
|
+
if (U < 0 || te < 0) return N;
|
|
561
|
+
const W = [...N], [Z] = W.splice(U, 1);
|
|
562
|
+
return W.splice(te, 0, Z), W;
|
|
563
|
+
});
|
|
564
|
+
const I = b.findIndex((N) => N.colId === E);
|
|
565
|
+
I >= 0 && R.moveColumns([C], I);
|
|
566
|
+
},
|
|
567
|
+
[d, b]
|
|
568
|
+
), S = e ?? c("dataTable.columnToggle");
|
|
569
|
+
return /* @__PURE__ */ A(ae.Root, { open: l, onOpenChange: u, children: [
|
|
570
|
+
/* @__PURE__ */ n(ae.Trigger, { asChild: !0, children: /* @__PURE__ */ n(
|
|
571
|
+
V,
|
|
587
572
|
{
|
|
588
|
-
|
|
573
|
+
ref: p,
|
|
574
|
+
type: "button",
|
|
575
|
+
intent: s,
|
|
576
|
+
icon: a ?? /* @__PURE__ */ n(Nt, { "aria-hidden": !0 }),
|
|
577
|
+
tooltip: S,
|
|
589
578
|
"aria-label": S,
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
return /* @__PURE__ */ I(
|
|
593
|
-
"li",
|
|
594
|
-
{
|
|
595
|
-
draggable: !0,
|
|
596
|
-
onDragStart: (h) => {
|
|
597
|
-
u(f.colId), h.dataTransfer.effectAllowed = "move", h.dataTransfer.setData("text/plain", f.colId);
|
|
598
|
-
},
|
|
599
|
-
onDragOver: (h) => {
|
|
600
|
-
h.preventDefault(), h.dataTransfer.dropEffect = "move", g(f.colId);
|
|
601
|
-
},
|
|
602
|
-
onDragLeave: () => {
|
|
603
|
-
g((h) => h === f.colId ? null : h);
|
|
604
|
-
},
|
|
605
|
-
onDrop: (h) => {
|
|
606
|
-
h.preventDefault();
|
|
607
|
-
const w = h.dataTransfer.getData("text/plain");
|
|
608
|
-
w && C(w, f.colId), u(null), g(null);
|
|
609
|
-
},
|
|
610
|
-
onDragEnd: () => {
|
|
611
|
-
u(null), g(null);
|
|
612
|
-
},
|
|
613
|
-
className: [
|
|
614
|
-
"ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-xs)] ds:py-[var(--spacing-2xs,var(--spacing-xs))] ds:transition-colors",
|
|
615
|
-
m ? "ds:opacity-50" : "",
|
|
616
|
-
b ? "ds:bg-[color:color-mix(in_srgb,var(--primary)_8%,transparent)]" : ""
|
|
617
|
-
].filter(Boolean).join(" "),
|
|
618
|
-
children: [
|
|
619
|
-
/* @__PURE__ */ n(
|
|
620
|
-
"span",
|
|
621
|
-
{
|
|
622
|
-
"aria-hidden": "true",
|
|
623
|
-
className: "ds:cursor-grab ds:text-[color:var(--muted-foreground)] ds:active:cursor-grabbing",
|
|
624
|
-
children: /* @__PURE__ */ n(Nt, { className: "ds:size-4" })
|
|
625
|
-
}
|
|
626
|
-
),
|
|
627
|
-
/* @__PURE__ */ n(
|
|
628
|
-
Re,
|
|
629
|
-
{
|
|
630
|
-
label: f.displayName,
|
|
631
|
-
checked: f.visible,
|
|
632
|
-
onCheckedChange: (h) => T(f.colId, h === !0)
|
|
633
|
-
}
|
|
634
|
-
)
|
|
635
|
-
]
|
|
636
|
-
},
|
|
637
|
-
f.colId
|
|
638
|
-
);
|
|
639
|
-
})
|
|
579
|
+
"aria-haspopup": "dialog",
|
|
580
|
+
...i
|
|
640
581
|
}
|
|
641
|
-
),
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
582
|
+
) }),
|
|
583
|
+
/* @__PURE__ */ A(ae.Content, { size: "sm", align: "end", children: [
|
|
584
|
+
/* @__PURE__ */ n(ae.Heading, { children: S }),
|
|
585
|
+
o ? /* @__PURE__ */ n("div", { className: "ds:mb-[var(--spacing-xs)] ds:border-b ds:border-[color:var(--border)] ds:pb-[var(--spacing-sm)]", children: o }) : null,
|
|
586
|
+
/* @__PURE__ */ n(
|
|
587
|
+
"ul",
|
|
588
|
+
{
|
|
589
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
590
|
+
"aria-label": S,
|
|
591
|
+
children: b.map((C) => {
|
|
592
|
+
const E = h === C.colId, R = w === C.colId && h !== C.colId;
|
|
593
|
+
return /* @__PURE__ */ A(
|
|
594
|
+
"li",
|
|
595
|
+
{
|
|
596
|
+
draggable: !0,
|
|
597
|
+
onDragStart: (I) => {
|
|
598
|
+
T(C.colId), I.dataTransfer.effectAllowed = "move", I.dataTransfer.setData("text/plain", C.colId);
|
|
599
|
+
},
|
|
600
|
+
onDragOver: (I) => {
|
|
601
|
+
I.preventDefault(), I.dataTransfer.dropEffect = "move", g(C.colId);
|
|
602
|
+
},
|
|
603
|
+
onDragLeave: () => {
|
|
604
|
+
g(
|
|
605
|
+
(I) => I === C.colId ? null : I
|
|
606
|
+
);
|
|
607
|
+
},
|
|
608
|
+
onDrop: (I) => {
|
|
609
|
+
I.preventDefault();
|
|
610
|
+
const N = I.dataTransfer.getData("text/plain");
|
|
611
|
+
N && y(N, C.colId), T(null), g(null);
|
|
612
|
+
},
|
|
613
|
+
onDragEnd: () => {
|
|
614
|
+
T(null), g(null);
|
|
615
|
+
},
|
|
616
|
+
className: [
|
|
617
|
+
"ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-xs)] ds:py-[var(--spacing-2xs,var(--spacing-xs))] ds:transition-colors",
|
|
618
|
+
E ? "ds:opacity-50" : "",
|
|
619
|
+
R ? "ds:bg-[color:color-mix(in_srgb,var(--primary)_8%,transparent)]" : ""
|
|
620
|
+
].filter(Boolean).join(" "),
|
|
621
|
+
children: [
|
|
622
|
+
/* @__PURE__ */ n(
|
|
623
|
+
"span",
|
|
624
|
+
{
|
|
625
|
+
"aria-hidden": "true",
|
|
626
|
+
className: "ds:cursor-grab ds:text-[color:var(--muted-foreground)] ds:active:cursor-grabbing",
|
|
627
|
+
children: /* @__PURE__ */ n(Ft, { className: "ds:size-4" })
|
|
628
|
+
}
|
|
629
|
+
),
|
|
630
|
+
/* @__PURE__ */ n(
|
|
631
|
+
Me,
|
|
632
|
+
{
|
|
633
|
+
label: C.displayName,
|
|
634
|
+
checked: C.visible,
|
|
635
|
+
onCheckedChange: (I) => m(C.colId, I === !0)
|
|
636
|
+
}
|
|
637
|
+
)
|
|
638
|
+
]
|
|
639
|
+
},
|
|
640
|
+
C.colId
|
|
641
|
+
);
|
|
642
|
+
})
|
|
643
|
+
}
|
|
644
|
+
),
|
|
645
|
+
r ? /* @__PURE__ */ n("div", { className: "ds:mt-[var(--spacing-xs)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-sm)]", children: r }) : null
|
|
646
|
+
] })
|
|
647
|
+
] });
|
|
648
|
+
}
|
|
649
|
+
);
|
|
650
|
+
xe.displayName = "DataTable.Toolbar.ColumnToggle";
|
|
651
|
+
const Ze = G(
|
|
648
652
|
({ label: t, icon: e, onClick: a, variant: r = "default", size: o = "sm", ...s }, i) => {
|
|
649
|
-
const { t: p } =
|
|
653
|
+
const { t: p } = D(), { getApi: c, selectionCount: d } = $(
|
|
650
654
|
"DataTable.Toolbar.BulkAction"
|
|
651
655
|
);
|
|
652
|
-
return d === 0 ? null : /* @__PURE__ */
|
|
653
|
-
|
|
656
|
+
return d === 0 ? null : /* @__PURE__ */ A(
|
|
657
|
+
B,
|
|
654
658
|
{
|
|
655
659
|
ref: i,
|
|
656
660
|
type: "button",
|
|
657
661
|
intent: r === "destructive" ? "destructive" : "secondary",
|
|
658
662
|
size: o,
|
|
659
|
-
startIcon:
|
|
660
|
-
onClick: () => a(
|
|
663
|
+
startIcon: jt(e),
|
|
664
|
+
onClick: () => a(c()),
|
|
661
665
|
"aria-label": `${t} (${p("dataTable.bulkAction", { count: d })})`,
|
|
662
666
|
...s,
|
|
663
667
|
children: [
|
|
@@ -675,23 +679,32 @@ const Qe = G(
|
|
|
675
679
|
);
|
|
676
680
|
}
|
|
677
681
|
);
|
|
678
|
-
|
|
679
|
-
const
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
682
|
+
Ze.displayName = "DataTable.Toolbar.BulkAction";
|
|
683
|
+
for (const t of [
|
|
684
|
+
be,
|
|
685
|
+
he,
|
|
686
|
+
ve,
|
|
687
|
+
Te,
|
|
688
|
+
ye,
|
|
689
|
+
xe
|
|
690
|
+
])
|
|
691
|
+
t.rendersIconButton = !0;
|
|
692
|
+
const Ht = Object.assign(ye, {
|
|
693
|
+
Item: Ce
|
|
694
|
+
}), ne = Object.assign(Ve, {
|
|
695
|
+
FilterBar: We,
|
|
696
|
+
Actions: Ke,
|
|
684
697
|
/** @deprecated Use `Toolbar.ExportMenu` with a `csv` item. */
|
|
685
|
-
ExportCsv:
|
|
698
|
+
ExportCsv: be,
|
|
686
699
|
/** @deprecated Use `Toolbar.ExportMenu` with a `pdf` item. */
|
|
687
|
-
ExportPdf:
|
|
688
|
-
Print:
|
|
689
|
-
ColumnToggle:
|
|
690
|
-
BulkAction:
|
|
691
|
-
QuickSearch:
|
|
692
|
-
Refresh:
|
|
693
|
-
FilterChips:
|
|
694
|
-
FacetFilter:
|
|
700
|
+
ExportPdf: he,
|
|
701
|
+
Print: ve,
|
|
702
|
+
ColumnToggle: xe,
|
|
703
|
+
BulkAction: Ze,
|
|
704
|
+
QuickSearch: He,
|
|
705
|
+
Refresh: Te,
|
|
706
|
+
FilterChips: Qe,
|
|
707
|
+
FacetFilter: Je,
|
|
695
708
|
ExportMenu: Ht
|
|
696
709
|
}), Qt = [
|
|
697
710
|
"contains",
|
|
@@ -727,125 +740,125 @@ function Xt(t) {
|
|
|
727
740
|
return t == null ? null : typeof t == "string" ? t : String(t);
|
|
728
741
|
}
|
|
729
742
|
function Zt(t) {
|
|
730
|
-
const { model: e, onModelChange: a, getValue: r, placeholder: o, defaultOperator: s } = t, { t: i } =
|
|
731
|
-
|
|
743
|
+
const { model: e, onModelChange: a, getValue: r, placeholder: o, defaultOperator: s } = t, { t: i } = D("ui"), p = (e == null ? void 0 : e.type) ?? s ?? "contains", [c, d] = k(p), [l, u] = k((e == null ? void 0 : e.filter) ?? "");
|
|
744
|
+
P(() => {
|
|
732
745
|
d((e == null ? void 0 : e.type) ?? s ?? "contains"), u((e == null ? void 0 : e.filter) ?? "");
|
|
733
746
|
}, [e, s]);
|
|
734
|
-
const
|
|
735
|
-
|
|
736
|
-
doesFilterPass: (
|
|
747
|
+
const b = O(() => Jt(It.language), []);
|
|
748
|
+
ee({
|
|
749
|
+
doesFilterPass: (g) => {
|
|
737
750
|
const m = e;
|
|
738
751
|
if (!m || m.filter === "") return !0;
|
|
739
|
-
const
|
|
740
|
-
if (
|
|
752
|
+
const y = Xt(r(g.node));
|
|
753
|
+
if (y === null) return !1;
|
|
741
754
|
switch (m.type) {
|
|
742
755
|
case "equals":
|
|
743
|
-
return
|
|
756
|
+
return b.equals(y, m.filter);
|
|
744
757
|
case "contains":
|
|
745
|
-
return
|
|
758
|
+
return b.contains(y, m.filter);
|
|
746
759
|
case "startsWith":
|
|
747
|
-
return
|
|
760
|
+
return b.startsWith(y, m.filter);
|
|
748
761
|
case "endsWith":
|
|
749
|
-
return
|
|
762
|
+
return b.endsWith(y, m.filter);
|
|
750
763
|
case "notContains":
|
|
751
|
-
return !
|
|
764
|
+
return !b.contains(y, m.filter);
|
|
752
765
|
default:
|
|
753
766
|
return !0;
|
|
754
767
|
}
|
|
755
768
|
}
|
|
756
769
|
});
|
|
757
|
-
function
|
|
758
|
-
if (
|
|
770
|
+
function f() {
|
|
771
|
+
if (l.trim() === "") {
|
|
759
772
|
a(null);
|
|
760
773
|
return;
|
|
761
774
|
}
|
|
762
|
-
a({ type:
|
|
775
|
+
a({ type: c, filter: l });
|
|
763
776
|
}
|
|
764
|
-
function
|
|
777
|
+
function h() {
|
|
765
778
|
u(""), d(s ?? "contains"), a(null);
|
|
766
779
|
}
|
|
767
|
-
const
|
|
768
|
-
(
|
|
769
|
-
value:
|
|
770
|
-
label: i(`dataTable.textFilter.operators.${
|
|
780
|
+
const T = Qt.map(
|
|
781
|
+
(g) => ({
|
|
782
|
+
value: g,
|
|
783
|
+
label: i(`dataTable.textFilter.operators.${g}`)
|
|
771
784
|
})
|
|
772
|
-
),
|
|
773
|
-
return /* @__PURE__ */
|
|
785
|
+
), w = o ?? i("dataTable.textFilter.placeholder");
|
|
786
|
+
return /* @__PURE__ */ A(
|
|
774
787
|
"div",
|
|
775
788
|
{
|
|
776
789
|
"data-component": "text-filter",
|
|
777
790
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
|
|
778
791
|
children: [
|
|
779
792
|
/* @__PURE__ */ n(
|
|
780
|
-
|
|
793
|
+
Le,
|
|
781
794
|
{
|
|
782
795
|
size: "sm",
|
|
783
|
-
options:
|
|
784
|
-
value:
|
|
785
|
-
onValueChange: (
|
|
786
|
-
|
|
796
|
+
options: T,
|
|
797
|
+
value: c,
|
|
798
|
+
onValueChange: (g) => {
|
|
799
|
+
g !== "" && d(g);
|
|
787
800
|
},
|
|
788
801
|
"aria-label": i("dataTable.textFilter.operators.contains")
|
|
789
802
|
}
|
|
790
803
|
),
|
|
791
804
|
/* @__PURE__ */ n(
|
|
792
|
-
|
|
805
|
+
me,
|
|
793
806
|
{
|
|
794
807
|
size: "sm",
|
|
795
|
-
value:
|
|
796
|
-
onChange: (
|
|
797
|
-
onKeyDown: (
|
|
798
|
-
|
|
808
|
+
value: l,
|
|
809
|
+
onChange: (g) => u(g.target.value),
|
|
810
|
+
onKeyDown: (g) => {
|
|
811
|
+
g.key === "Enter" && (g.preventDefault(), f());
|
|
799
812
|
},
|
|
800
|
-
placeholder:
|
|
801
|
-
"aria-label":
|
|
802
|
-
startAdornment: /* @__PURE__ */ n(
|
|
813
|
+
placeholder: w,
|
|
814
|
+
"aria-label": w,
|
|
815
|
+
startAdornment: /* @__PURE__ */ n(ge, { "aria-hidden": "true", className: "ds:size-4" })
|
|
803
816
|
}
|
|
804
817
|
),
|
|
805
|
-
/* @__PURE__ */
|
|
806
|
-
/* @__PURE__ */ n(
|
|
807
|
-
/* @__PURE__ */ n(
|
|
818
|
+
/* @__PURE__ */ A("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
|
|
819
|
+
/* @__PURE__ */ n(B, { intent: "ghost", size: "sm", onClick: h, type: "button", children: i("dataTable.textFilter.clear") }),
|
|
820
|
+
/* @__PURE__ */ n(B, { intent: "primary", size: "sm", onClick: f, type: "button", children: i("dataTable.textFilter.apply") })
|
|
808
821
|
] })
|
|
809
822
|
]
|
|
810
823
|
}
|
|
811
824
|
);
|
|
812
825
|
}
|
|
813
826
|
function Yt(t) {
|
|
814
|
-
var u,
|
|
815
|
-
const { model: e, onModelChange: a, column: r } = t, { t: o } =
|
|
816
|
-
|
|
827
|
+
var u, b;
|
|
828
|
+
const { model: e, onModelChange: a, column: r } = t, { t: o } = D("ui"), s = ((b = (u = r == null ? void 0 : r.getColDef) == null ? void 0 : u.call(r)) == null ? void 0 : b.filterParams) ?? {}, i = s.defaultOperator ?? "contains", p = s.placeholder ?? o("dataTable.textFilter.placeholder"), [c, d] = k((e == null ? void 0 : e.filter) ?? "");
|
|
829
|
+
P(() => {
|
|
817
830
|
d((e == null ? void 0 : e.filter) ?? "");
|
|
818
|
-
}, [e == null ? void 0 : e.filter]),
|
|
819
|
-
if (
|
|
820
|
-
const
|
|
821
|
-
if (
|
|
831
|
+
}, [e == null ? void 0 : e.filter]), P(() => {
|
|
832
|
+
if (c === ((e == null ? void 0 : e.filter) ?? "")) return;
|
|
833
|
+
const f = setTimeout(() => {
|
|
834
|
+
if (c === "") {
|
|
822
835
|
e && a(null);
|
|
823
836
|
return;
|
|
824
837
|
}
|
|
825
|
-
a({ type: i, filter:
|
|
838
|
+
a({ type: i, filter: c });
|
|
826
839
|
}, 200);
|
|
827
|
-
return () => clearTimeout(
|
|
828
|
-
}, [
|
|
829
|
-
function
|
|
840
|
+
return () => clearTimeout(f);
|
|
841
|
+
}, [c, i, e, a]);
|
|
842
|
+
function l() {
|
|
830
843
|
d(""), e && a(null);
|
|
831
844
|
}
|
|
832
845
|
return /* @__PURE__ */ n("div", { "data-component": "text-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ n(
|
|
833
|
-
|
|
846
|
+
me,
|
|
834
847
|
{
|
|
835
848
|
size: "sm",
|
|
836
|
-
value:
|
|
837
|
-
onChange: (
|
|
849
|
+
value: c,
|
|
850
|
+
onChange: (f) => d(f.target.value),
|
|
838
851
|
placeholder: p,
|
|
839
852
|
"aria-label": p,
|
|
840
|
-
startAdornment: /* @__PURE__ */ n(
|
|
841
|
-
endAdornment:
|
|
853
|
+
startAdornment: /* @__PURE__ */ n(ge, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
854
|
+
endAdornment: c.length > 0 ? /* @__PURE__ */ n(
|
|
842
855
|
"button",
|
|
843
856
|
{
|
|
844
857
|
type: "button",
|
|
845
858
|
"aria-label": o("dataTable.textFilter.clear"),
|
|
846
|
-
onClick:
|
|
859
|
+
onClick: l,
|
|
847
860
|
className: "ds:pointer-events-auto ds:flex ds:items-center ds:text-[var(--muted-foreground)] ds:hover:text-[var(--foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
848
|
-
children: /* @__PURE__ */ n(
|
|
861
|
+
children: /* @__PURE__ */ n(qe, { "aria-hidden": "true", className: "ds:size-4" })
|
|
849
862
|
}
|
|
850
863
|
) : void 0
|
|
851
864
|
}
|
|
@@ -1043,8 +1056,8 @@ const ea = {
|
|
|
1043
1056
|
}
|
|
1044
1057
|
}
|
|
1045
1058
|
};
|
|
1046
|
-
|
|
1047
|
-
const ta =
|
|
1059
|
+
xt.registerModules([St]);
|
|
1060
|
+
const ta = yt("ag-theme-alfadocs ds:w-full", {
|
|
1048
1061
|
variants: {
|
|
1049
1062
|
density: {
|
|
1050
1063
|
default: "",
|
|
@@ -1062,8 +1075,8 @@ const ta = Tt("ag-theme-alfadocs ds:w-full", {
|
|
|
1062
1075
|
}
|
|
1063
1076
|
});
|
|
1064
1077
|
function aa() {
|
|
1065
|
-
const { t } =
|
|
1066
|
-
return
|
|
1078
|
+
const { t } = D();
|
|
1079
|
+
return O(
|
|
1067
1080
|
() => ({
|
|
1068
1081
|
// Filter strings
|
|
1069
1082
|
contains: t("dataTable.agGrid.contains"),
|
|
@@ -1103,7 +1116,7 @@ function ra() {
|
|
|
1103
1116
|
"aria-live": "polite",
|
|
1104
1117
|
className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]",
|
|
1105
1118
|
children: Array.from({ length: 5 }).map((t, e) => /* @__PURE__ */ n(
|
|
1106
|
-
|
|
1119
|
+
vt,
|
|
1107
1120
|
{
|
|
1108
1121
|
variant: "rectangular",
|
|
1109
1122
|
className: "ds:h-[var(--min-target-size)] ds:w-full"
|
|
@@ -1114,9 +1127,9 @@ function ra() {
|
|
|
1114
1127
|
);
|
|
1115
1128
|
}
|
|
1116
1129
|
function na() {
|
|
1117
|
-
const { t } =
|
|
1130
|
+
const { t } = D();
|
|
1118
1131
|
return /* @__PURE__ */ n(
|
|
1119
|
-
|
|
1132
|
+
Tt,
|
|
1120
1133
|
{
|
|
1121
1134
|
variant: "no-results",
|
|
1122
1135
|
size: "sm",
|
|
@@ -1142,7 +1155,7 @@ function sa(t, e) {
|
|
|
1142
1155
|
} catch {
|
|
1143
1156
|
}
|
|
1144
1157
|
}
|
|
1145
|
-
function
|
|
1158
|
+
function la(t, e) {
|
|
1146
1159
|
const {
|
|
1147
1160
|
columnDefs: a,
|
|
1148
1161
|
rowData: r,
|
|
@@ -1150,197 +1163,209 @@ function ia(t, e) {
|
|
|
1150
1163
|
pagination: s = !1,
|
|
1151
1164
|
paginationPageSize: i = 25,
|
|
1152
1165
|
paginationPageSizeSelector: p = [10, 25, 50, 100],
|
|
1153
|
-
gridId:
|
|
1166
|
+
gridId: c,
|
|
1154
1167
|
onSelectionChanged: d,
|
|
1155
|
-
onSortChanged:
|
|
1168
|
+
onSortChanged: l,
|
|
1156
1169
|
onFilterChanged: u,
|
|
1157
|
-
noRowsOverlay:
|
|
1158
|
-
loadingOverlay:
|
|
1159
|
-
gridOptions:
|
|
1160
|
-
density:
|
|
1161
|
-
bordered:
|
|
1162
|
-
heightClass:
|
|
1170
|
+
noRowsOverlay: b,
|
|
1171
|
+
loadingOverlay: f,
|
|
1172
|
+
gridOptions: h,
|
|
1173
|
+
density: T,
|
|
1174
|
+
bordered: w,
|
|
1175
|
+
heightClass: g = "ds:h-[500px]",
|
|
1163
1176
|
className: m,
|
|
1164
|
-
getRowClass:
|
|
1165
|
-
pinnedBottomRowData:
|
|
1166
|
-
printMode:
|
|
1167
|
-
children:
|
|
1168
|
-
} = t, { t:
|
|
1177
|
+
getRowClass: y,
|
|
1178
|
+
pinnedBottomRowData: S,
|
|
1179
|
+
printMode: C = !1,
|
|
1180
|
+
children: E
|
|
1181
|
+
} = t, { t: R, i18n: I } = D(), N = ke(null), [U, te] = k(0), [W, Z] = k(""), Y = aa(), ie = O(
|
|
1169
1182
|
() => ({
|
|
1170
1183
|
getSelection: () => {
|
|
1171
|
-
var
|
|
1172
|
-
const v = (
|
|
1184
|
+
var F;
|
|
1185
|
+
const v = (F = N.current) == null ? void 0 : F.api;
|
|
1173
1186
|
if (!v) return [];
|
|
1174
1187
|
const x = [];
|
|
1175
|
-
for (const
|
|
1176
|
-
|
|
1188
|
+
for (const M of v.getSelectedNodes())
|
|
1189
|
+
M.id != null && x.push(M.id);
|
|
1177
1190
|
return x;
|
|
1178
1191
|
},
|
|
1179
1192
|
setSelection: (v) => {
|
|
1180
|
-
var
|
|
1181
|
-
const x = (
|
|
1193
|
+
var M;
|
|
1194
|
+
const x = (M = N.current) == null ? void 0 : M.api;
|
|
1182
1195
|
if (!x) return;
|
|
1183
|
-
const
|
|
1184
|
-
x.forEachNode((
|
|
1185
|
-
|
|
1196
|
+
const F = new Set(v);
|
|
1197
|
+
x.forEachNode((z) => {
|
|
1198
|
+
z.id != null && z.setSelected(F.has(z.id));
|
|
1186
1199
|
});
|
|
1187
1200
|
},
|
|
1188
1201
|
selectRange: (v, x) => {
|
|
1189
|
-
var
|
|
1190
|
-
const
|
|
1191
|
-
if (!
|
|
1192
|
-
const
|
|
1193
|
-
|
|
1194
|
-
|
|
1202
|
+
var we;
|
|
1203
|
+
const F = (we = N.current) == null ? void 0 : we.api;
|
|
1204
|
+
if (!F) return;
|
|
1205
|
+
const M = [];
|
|
1206
|
+
F.forEachNodeAfterFilterAndSort((H) => {
|
|
1207
|
+
H.id != null && M.push(H.id);
|
|
1195
1208
|
});
|
|
1196
|
-
const
|
|
1197
|
-
if (
|
|
1198
|
-
const [K,
|
|
1199
|
-
|
|
1200
|
-
|
|
1209
|
+
const z = M.indexOf(v), j = M.indexOf(x);
|
|
1210
|
+
if (z < 0 || j < 0) return;
|
|
1211
|
+
const [K, de] = z <= j ? [z, j] : [j, z], ue = new Set(M.slice(K, de + 1));
|
|
1212
|
+
F.forEachNode((H) => {
|
|
1213
|
+
H.id != null && H.setSelected(ue.has(H.id));
|
|
1201
1214
|
});
|
|
1202
1215
|
},
|
|
1203
1216
|
clearSelection: () => {
|
|
1204
1217
|
var v, x;
|
|
1205
|
-
(x = (v =
|
|
1218
|
+
(x = (v = N.current) == null ? void 0 : v.api) == null || x.deselectAll();
|
|
1206
1219
|
},
|
|
1207
1220
|
getFilter: () => {
|
|
1208
1221
|
var v, x;
|
|
1209
|
-
return ((x = (v =
|
|
1222
|
+
return ((x = (v = N.current) == null ? void 0 : v.api) == null ? void 0 : x.getFilterModel()) ?? {};
|
|
1210
1223
|
},
|
|
1211
1224
|
setFilter: (v) => {
|
|
1212
|
-
var x,
|
|
1213
|
-
(
|
|
1225
|
+
var x, F;
|
|
1226
|
+
(F = (x = N.current) == null ? void 0 : x.api) == null || F.setFilterModel(v);
|
|
1214
1227
|
},
|
|
1215
1228
|
getSort: () => {
|
|
1216
1229
|
var x;
|
|
1217
|
-
const v = (x =
|
|
1218
|
-
return v ? v.getColumnState().filter((
|
|
1230
|
+
const v = (x = N.current) == null ? void 0 : x.api;
|
|
1231
|
+
return v ? v.getColumnState().filter((F) => F.sort === "asc" || F.sort === "desc").map((F) => ({ colId: F.colId, sort: F.sort })) : [];
|
|
1219
1232
|
},
|
|
1220
1233
|
setSort: (v) => {
|
|
1221
|
-
var
|
|
1222
|
-
const x = (
|
|
1234
|
+
var M;
|
|
1235
|
+
const x = (M = N.current) == null ? void 0 : M.api;
|
|
1223
1236
|
if (!x) return;
|
|
1224
|
-
const
|
|
1225
|
-
const
|
|
1226
|
-
return { ...
|
|
1237
|
+
const F = x.getColumnState().map((z) => {
|
|
1238
|
+
const j = v.find((K) => K.colId === z.colId);
|
|
1239
|
+
return { ...z, sort: j ? j.sort : null };
|
|
1227
1240
|
});
|
|
1228
|
-
x.applyColumnState({ state:
|
|
1241
|
+
x.applyColumnState({ state: F, defaultState: { sort: null } });
|
|
1229
1242
|
},
|
|
1230
1243
|
getCurrentPage: () => {
|
|
1231
1244
|
var v, x;
|
|
1232
|
-
return ((x = (v =
|
|
1245
|
+
return ((x = (v = N.current) == null ? void 0 : v.api) == null ? void 0 : x.paginationGetCurrentPage()) ?? 0;
|
|
1233
1246
|
},
|
|
1234
1247
|
goToPage: (v) => {
|
|
1235
|
-
var x,
|
|
1236
|
-
(
|
|
1248
|
+
var x, F;
|
|
1249
|
+
(F = (x = N.current) == null ? void 0 : x.api) == null || F.paginationGoToPage(v);
|
|
1237
1250
|
},
|
|
1238
1251
|
getRawApi: () => {
|
|
1239
1252
|
var v;
|
|
1240
|
-
return (v =
|
|
1253
|
+
return (v = N.current) == null ? void 0 : v.api;
|
|
1241
1254
|
}
|
|
1242
1255
|
}),
|
|
1243
1256
|
[]
|
|
1244
1257
|
);
|
|
1245
|
-
|
|
1246
|
-
const
|
|
1258
|
+
ht(e, () => ie, [ie]), kt(ea, ie, c);
|
|
1259
|
+
const et = I.dir() === "rtl", tt = r === void 0, at = Et(), { resolvedTheme: Se } = At(), rt = (Se === "light-accessible" || Se === "dark-accessible") && T === "compact" ? "default" : T, nt = O(() => {
|
|
1247
1260
|
if (o)
|
|
1248
1261
|
return o === "single" ? { mode: "singleRow" } : {
|
|
1249
1262
|
mode: "multiRow",
|
|
1250
1263
|
headerCheckbox: !0,
|
|
1251
1264
|
checkboxes: !0
|
|
1252
1265
|
};
|
|
1253
|
-
}, [o]),
|
|
1266
|
+
}, [o]), ot = q(() => {
|
|
1254
1267
|
var x;
|
|
1255
|
-
if (!
|
|
1256
|
-
const v = oa(
|
|
1257
|
-
v &&
|
|
1268
|
+
if (!c || !((x = N.current) != null && x.api)) return;
|
|
1269
|
+
const v = oa(c);
|
|
1270
|
+
v && N.current.api.applyColumnState({
|
|
1258
1271
|
state: v,
|
|
1259
1272
|
applyOrder: !0
|
|
1260
1273
|
});
|
|
1261
|
-
}, [
|
|
1274
|
+
}, [c]), ce = q(() => {
|
|
1262
1275
|
var v;
|
|
1263
|
-
|
|
1264
|
-
}, [
|
|
1265
|
-
if (!
|
|
1266
|
-
const v = { ...
|
|
1276
|
+
c && ((v = N.current) != null && v.api) && sa(c, N.current.api);
|
|
1277
|
+
}, [c]), st = O(() => {
|
|
1278
|
+
if (!h) return;
|
|
1279
|
+
const v = { ...h };
|
|
1267
1280
|
return delete v.defaultColDef, v;
|
|
1268
|
-
}, [
|
|
1269
|
-
var
|
|
1270
|
-
const v = (
|
|
1281
|
+
}, [h]), lt = q(() => {
|
|
1282
|
+
var F;
|
|
1283
|
+
const v = (F = N.current) == null ? void 0 : F.api;
|
|
1271
1284
|
if (!v) return;
|
|
1272
1285
|
const x = v.getSelectedRows();
|
|
1273
|
-
|
|
1274
|
-
}, [d]), it =
|
|
1286
|
+
te(x.length), d == null || d(x);
|
|
1287
|
+
}, [d]), it = q(
|
|
1275
1288
|
(v) => {
|
|
1276
|
-
var
|
|
1277
|
-
const x = (
|
|
1289
|
+
var F;
|
|
1290
|
+
const x = (F = N.current) == null ? void 0 : F.api;
|
|
1278
1291
|
if (x) {
|
|
1279
|
-
const
|
|
1280
|
-
if (
|
|
1281
|
-
const
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
column:
|
|
1285
|
-
direction:
|
|
1292
|
+
const z = x.getColumnState().find((j) => j.sort);
|
|
1293
|
+
if (z) {
|
|
1294
|
+
const j = z.colId, K = x.getColumnDef(j), de = (K == null ? void 0 : K.headerName) ?? j, ue = z.sort === "asc" ? "dataTable.sortAscending" : "dataTable.sortDescending";
|
|
1295
|
+
Z(
|
|
1296
|
+
R("dataTable.sortAnnounce", {
|
|
1297
|
+
column: de,
|
|
1298
|
+
direction: R(ue)
|
|
1286
1299
|
})
|
|
1287
1300
|
);
|
|
1288
1301
|
} else
|
|
1289
|
-
|
|
1302
|
+
Z("");
|
|
1290
1303
|
}
|
|
1291
|
-
|
|
1304
|
+
l == null || l(v);
|
|
1292
1305
|
},
|
|
1293
|
-
[
|
|
1294
|
-
),
|
|
1306
|
+
[l, R]
|
|
1307
|
+
), ct = q(
|
|
1295
1308
|
(v) => {
|
|
1296
1309
|
u == null || u(v);
|
|
1297
1310
|
},
|
|
1298
1311
|
[u]
|
|
1299
1312
|
);
|
|
1300
|
-
|
|
1301
|
-
if (!
|
|
1302
|
-
const v = setTimeout(() =>
|
|
1313
|
+
P(() => {
|
|
1314
|
+
if (!W) return;
|
|
1315
|
+
const v = setTimeout(() => Z(""), 3e3);
|
|
1303
1316
|
return () => clearTimeout(v);
|
|
1304
|
-
}, [
|
|
1305
|
-
const
|
|
1317
|
+
}, [W]);
|
|
1318
|
+
const dt = b ?? na, ut = f ?? ra, pt = q(
|
|
1306
1319
|
() => {
|
|
1307
1320
|
var v;
|
|
1308
|
-
return (v =
|
|
1321
|
+
return (v = N.current) == null ? void 0 : v.api;
|
|
1309
1322
|
},
|
|
1310
1323
|
[]
|
|
1311
|
-
),
|
|
1324
|
+
), ft = q(() => {
|
|
1312
1325
|
typeof window < "u" && window.print();
|
|
1313
|
-
}, []),
|
|
1314
|
-
density:
|
|
1315
|
-
bordered:
|
|
1326
|
+
}, []), mt = ta({
|
|
1327
|
+
density: rt,
|
|
1328
|
+
bordered: w,
|
|
1316
1329
|
className: m
|
|
1317
|
-
}),
|
|
1318
|
-
|
|
1330
|
+
}), gt = E ?? /* @__PURE__ */ n("div", { className: "data-table-toolbar ds:flex ds:justify-end", children: /* @__PURE__ */ A(
|
|
1331
|
+
Pe,
|
|
1332
|
+
{
|
|
1333
|
+
role: "toolbar",
|
|
1334
|
+
"aria-label": R("dataTable.tableActions"),
|
|
1335
|
+
className: "ds:bg-[var(--background)]",
|
|
1336
|
+
children: [
|
|
1337
|
+
/* @__PURE__ */ n(ne.ExportMenu, {}),
|
|
1338
|
+
/* @__PURE__ */ n(ne.Print, {}),
|
|
1339
|
+
/* @__PURE__ */ n(ne.ColumnToggle, {})
|
|
1340
|
+
]
|
|
1341
|
+
}
|
|
1342
|
+
) }), bt = C ? !1 : s;
|
|
1343
|
+
return /* @__PURE__ */ A(
|
|
1319
1344
|
"div",
|
|
1320
1345
|
{
|
|
1321
1346
|
className: "ds:flex ds:w-full ds:min-h-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1322
|
-
"aria-busy":
|
|
1347
|
+
"aria-busy": tt ? "true" : void 0,
|
|
1323
1348
|
"data-component": "data-table",
|
|
1324
|
-
"data-component-id":
|
|
1325
|
-
"data-print-mode":
|
|
1349
|
+
"data-component-id": c,
|
|
1350
|
+
"data-print-mode": C ? "true" : void 0,
|
|
1326
1351
|
children: [
|
|
1327
|
-
!
|
|
1328
|
-
|
|
1352
|
+
!C && /* @__PURE__ */ n(
|
|
1353
|
+
Lt,
|
|
1329
1354
|
{
|
|
1330
|
-
getApi:
|
|
1331
|
-
selectionCount:
|
|
1332
|
-
onPrint:
|
|
1333
|
-
children:
|
|
1355
|
+
getApi: pt,
|
|
1356
|
+
selectionCount: U,
|
|
1357
|
+
onPrint: ft,
|
|
1358
|
+
children: gt
|
|
1334
1359
|
}
|
|
1335
1360
|
),
|
|
1336
1361
|
/* @__PURE__ */ n(
|
|
1337
1362
|
"div",
|
|
1338
1363
|
{
|
|
1339
|
-
className: [
|
|
1364
|
+
className: [mt, C ? "" : g].join(" ").trim(),
|
|
1340
1365
|
children: /* @__PURE__ */ n(
|
|
1341
|
-
|
|
1366
|
+
Ct,
|
|
1342
1367
|
{
|
|
1343
|
-
ref:
|
|
1368
|
+
ref: N,
|
|
1344
1369
|
theme: "legacy",
|
|
1345
1370
|
columnDefs: a,
|
|
1346
1371
|
rowData: r,
|
|
@@ -1358,15 +1383,15 @@ function ia(t, e) {
|
|
|
1358
1383
|
// §13d — faint sort icon advertises which columns are
|
|
1359
1384
|
// sortable. v33+ moved this from grid-level to defaultColDef.
|
|
1360
1385
|
unSortIcon: !0,
|
|
1361
|
-
...
|
|
1386
|
+
...h == null ? void 0 : h.defaultColDef
|
|
1362
1387
|
},
|
|
1363
|
-
rowSelection:
|
|
1364
|
-
pagination:
|
|
1388
|
+
rowSelection: nt,
|
|
1389
|
+
pagination: bt,
|
|
1365
1390
|
paginationPageSize: i,
|
|
1366
1391
|
paginationPageSizeSelector: p,
|
|
1367
|
-
paginationNumberFormatter: (v) => new Intl.NumberFormat(
|
|
1368
|
-
animateRows: !
|
|
1369
|
-
enableRtl:
|
|
1392
|
+
paginationNumberFormatter: (v) => new Intl.NumberFormat(I.language).format(v.value),
|
|
1393
|
+
animateRows: !at,
|
|
1394
|
+
enableRtl: et,
|
|
1370
1395
|
ensureDomOrder: !0,
|
|
1371
1396
|
enableCellSpan: !0,
|
|
1372
1397
|
enableCellTextSelection: !0,
|
|
@@ -1384,36 +1409,36 @@ function ia(t, e) {
|
|
|
1384
1409
|
undoRedoCellEditingLimit: 20,
|
|
1385
1410
|
suppressCellFocus: !1,
|
|
1386
1411
|
rowBuffer: 10,
|
|
1387
|
-
localeText:
|
|
1388
|
-
noRowsOverlayComponent:
|
|
1389
|
-
loadingOverlayComponent:
|
|
1390
|
-
getRowClass:
|
|
1391
|
-
pinnedBottomRowData:
|
|
1392
|
-
domLayout:
|
|
1393
|
-
onGridReady:
|
|
1394
|
-
onColumnMoved:
|
|
1395
|
-
onColumnResized:
|
|
1396
|
-
onColumnPinned:
|
|
1412
|
+
localeText: Y,
|
|
1413
|
+
noRowsOverlayComponent: dt,
|
|
1414
|
+
loadingOverlayComponent: ut,
|
|
1415
|
+
getRowClass: y,
|
|
1416
|
+
pinnedBottomRowData: S,
|
|
1417
|
+
domLayout: C ? "autoHeight" : void 0,
|
|
1418
|
+
onGridReady: ot,
|
|
1419
|
+
onColumnMoved: ce,
|
|
1420
|
+
onColumnResized: ce,
|
|
1421
|
+
onColumnPinned: ce,
|
|
1397
1422
|
onSortChanged: it,
|
|
1398
|
-
onFilterChanged:
|
|
1399
|
-
onSelectionChanged:
|
|
1400
|
-
...
|
|
1423
|
+
onFilterChanged: ct,
|
|
1424
|
+
onSelectionChanged: lt,
|
|
1425
|
+
...st
|
|
1401
1426
|
}
|
|
1402
1427
|
)
|
|
1403
1428
|
}
|
|
1404
1429
|
),
|
|
1405
|
-
!
|
|
1406
|
-
/* @__PURE__ */ n("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children:
|
|
1430
|
+
!C && /* @__PURE__ */ n("div", { className: "ds:flex ds:items-center ds:justify-between type-body-sm ds:text-[color:var(--muted-foreground)]", children: U > 0 ? /* @__PURE__ */ n("span", { children: R("dataTable.selected", { count: U }) }) : /* @__PURE__ */ n("span", {}) }),
|
|
1431
|
+
/* @__PURE__ */ n("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: W })
|
|
1407
1432
|
]
|
|
1408
1433
|
}
|
|
1409
1434
|
);
|
|
1410
1435
|
}
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1413
|
-
const sr = Object.assign(
|
|
1414
|
-
Toolbar:
|
|
1436
|
+
const Ye = G(la);
|
|
1437
|
+
Ye.displayName = "DataTable";
|
|
1438
|
+
const sr = Object.assign(Ye, {
|
|
1439
|
+
Toolbar: ne
|
|
1415
1440
|
});
|
|
1416
|
-
function
|
|
1441
|
+
function le(t) {
|
|
1417
1442
|
return t ? t.toISOString().slice(0, 10) : null;
|
|
1418
1443
|
}
|
|
1419
1444
|
function L(t) {
|
|
@@ -1421,64 +1446,64 @@ function L(t) {
|
|
|
1421
1446
|
const e = new Date(t);
|
|
1422
1447
|
return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
1423
1448
|
}
|
|
1424
|
-
function
|
|
1425
|
-
const { model: e, onModelChange: a, getValue: r, doesRowPassOtherFilter: o } = t, [s, i] =
|
|
1449
|
+
function lr(t) {
|
|
1450
|
+
const { model: e, onModelChange: a, getValue: r, doesRowPassOtherFilter: o } = t, [s, i] = k(() => ({
|
|
1426
1451
|
from: L(e == null ? void 0 : e.dateFrom),
|
|
1427
1452
|
to: L(e == null ? void 0 : e.dateTo)
|
|
1428
1453
|
}));
|
|
1429
|
-
|
|
1454
|
+
P(() => {
|
|
1430
1455
|
i({
|
|
1431
1456
|
from: L(e == null ? void 0 : e.dateFrom),
|
|
1432
1457
|
to: L(e == null ? void 0 : e.dateTo)
|
|
1433
1458
|
});
|
|
1434
|
-
}, [e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo]),
|
|
1435
|
-
doesFilterPass: (
|
|
1436
|
-
const d = L(e == null ? void 0 : e.dateFrom),
|
|
1437
|
-
if (!d && !
|
|
1438
|
-
const u = r(
|
|
1459
|
+
}, [e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo]), ee({
|
|
1460
|
+
doesFilterPass: (c) => {
|
|
1461
|
+
const d = L(e == null ? void 0 : e.dateFrom), l = L(e == null ? void 0 : e.dateTo);
|
|
1462
|
+
if (!d && !l) return !0;
|
|
1463
|
+
const u = r(c.node);
|
|
1439
1464
|
if (!u) return !1;
|
|
1440
|
-
const
|
|
1441
|
-
return !(!
|
|
1465
|
+
const b = u instanceof Date ? u : L(String(u));
|
|
1466
|
+
return !(!b || d && b < d || l && b > l);
|
|
1442
1467
|
}
|
|
1443
1468
|
});
|
|
1444
|
-
function p(
|
|
1445
|
-
if (i(
|
|
1469
|
+
function p(c) {
|
|
1470
|
+
if (i(c), !c.from && !c.to) {
|
|
1446
1471
|
a(null);
|
|
1447
1472
|
return;
|
|
1448
1473
|
}
|
|
1449
1474
|
a({
|
|
1450
1475
|
type: "inRange",
|
|
1451
|
-
dateFrom:
|
|
1452
|
-
dateTo:
|
|
1476
|
+
dateFrom: le(c.from),
|
|
1477
|
+
dateTo: le(c.to)
|
|
1453
1478
|
});
|
|
1454
1479
|
}
|
|
1455
|
-
return /* @__PURE__ */ n("div", { className: "ds:p-[var(--spacing-sm)] ds:min-w-[280px]", children: /* @__PURE__ */ n(
|
|
1480
|
+
return /* @__PURE__ */ n("div", { className: "ds:p-[var(--spacing-sm)] ds:min-w-[280px]", children: /* @__PURE__ */ n(Ge, { value: s, onChange: p, size: "sm" }) });
|
|
1456
1481
|
}
|
|
1457
|
-
function
|
|
1458
|
-
var
|
|
1459
|
-
const { model: e, onModelChange: a, column: r } = t, o = ((d = (
|
|
1482
|
+
function ir(t) {
|
|
1483
|
+
var c, d;
|
|
1484
|
+
const { model: e, onModelChange: a, column: r } = t, o = ((d = (c = r == null ? void 0 : r.getColDef) == null ? void 0 : c.call(r)) == null ? void 0 : d.filterParams) ?? {}, [s, i] = k(() => ({
|
|
1460
1485
|
from: L(e == null ? void 0 : e.dateFrom),
|
|
1461
1486
|
to: L(e == null ? void 0 : e.dateTo)
|
|
1462
1487
|
}));
|
|
1463
|
-
|
|
1488
|
+
P(() => {
|
|
1464
1489
|
i({
|
|
1465
1490
|
from: L(e == null ? void 0 : e.dateFrom),
|
|
1466
1491
|
to: L(e == null ? void 0 : e.dateTo)
|
|
1467
1492
|
});
|
|
1468
1493
|
}, [e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo]);
|
|
1469
|
-
function p(
|
|
1470
|
-
if (i(
|
|
1494
|
+
function p(l) {
|
|
1495
|
+
if (i(l), !l.from && !l.to) {
|
|
1471
1496
|
a(null);
|
|
1472
1497
|
return;
|
|
1473
1498
|
}
|
|
1474
1499
|
a({
|
|
1475
1500
|
type: "inRange",
|
|
1476
|
-
dateFrom:
|
|
1477
|
-
dateTo:
|
|
1501
|
+
dateFrom: le(l.from),
|
|
1502
|
+
dateTo: le(l.to)
|
|
1478
1503
|
});
|
|
1479
1504
|
}
|
|
1480
1505
|
return /* @__PURE__ */ n("div", { "data-component": "date-range-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ n(
|
|
1481
|
-
|
|
1506
|
+
Ge,
|
|
1482
1507
|
{
|
|
1483
1508
|
value: s,
|
|
1484
1509
|
onChange: p,
|
|
@@ -1487,128 +1512,128 @@ function lr(t) {
|
|
|
1487
1512
|
}
|
|
1488
1513
|
) });
|
|
1489
1514
|
}
|
|
1490
|
-
function
|
|
1515
|
+
function Q(t) {
|
|
1491
1516
|
return typeof t == "number" ? `n:${t}` : `s:${t}`;
|
|
1492
1517
|
}
|
|
1493
1518
|
function cr(t) {
|
|
1494
|
-
const { model: e, onModelChange: a, getValue: r, api: o, column: s, options: i, placeholder: p } = t, { t:
|
|
1519
|
+
const { model: e, onModelChange: a, getValue: r, api: o, column: s, options: i, placeholder: p } = t, { t: c } = D("ui"), d = O(() => {
|
|
1495
1520
|
if (i && i.length > 0) return i;
|
|
1496
1521
|
if (!o || !s) return [];
|
|
1497
|
-
const
|
|
1522
|
+
const g = /* @__PURE__ */ new Map();
|
|
1498
1523
|
return o.forEachNode((m) => {
|
|
1499
|
-
const
|
|
1500
|
-
if (
|
|
1501
|
-
const
|
|
1502
|
-
|
|
1503
|
-
}), Array.from(
|
|
1504
|
-
(m,
|
|
1524
|
+
const y = r(m);
|
|
1525
|
+
if (y == null) return;
|
|
1526
|
+
const S = typeof y == "string" || typeof y == "number" ? y : String(y), C = Q(S);
|
|
1527
|
+
g.has(C) || g.set(C, { value: S, label: String(S) });
|
|
1528
|
+
}), Array.from(g.values()).sort(
|
|
1529
|
+
(m, y) => String(m.label).localeCompare(String(y.label))
|
|
1505
1530
|
);
|
|
1506
|
-
}, [i, o, s, r]),
|
|
1507
|
-
const
|
|
1508
|
-
for (const
|
|
1509
|
-
return
|
|
1510
|
-
}, [e]), [u,
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
}, [
|
|
1514
|
-
doesFilterPass: (
|
|
1531
|
+
}, [i, o, s, r]), l = O(() => {
|
|
1532
|
+
const g = /* @__PURE__ */ new Set(), m = (e == null ? void 0 : e.values) ?? [];
|
|
1533
|
+
for (const y of m) g.add(Q(y));
|
|
1534
|
+
return g;
|
|
1535
|
+
}, [e]), [u, b] = k(l);
|
|
1536
|
+
P(() => {
|
|
1537
|
+
b(l);
|
|
1538
|
+
}, [l]), ee({
|
|
1539
|
+
doesFilterPass: (g) => {
|
|
1515
1540
|
const m = e == null ? void 0 : e.values;
|
|
1516
1541
|
if (!m || m.length === 0) return !0;
|
|
1517
|
-
const
|
|
1518
|
-
if (
|
|
1519
|
-
const
|
|
1520
|
-
return m.some((
|
|
1542
|
+
const y = r(g.node);
|
|
1543
|
+
if (y == null) return !1;
|
|
1544
|
+
const S = typeof y == "string" || typeof y == "number" ? y : String(y), C = Q(S);
|
|
1545
|
+
return m.some((E) => Q(E) === C);
|
|
1521
1546
|
}
|
|
1522
1547
|
});
|
|
1523
|
-
function g
|
|
1524
|
-
|
|
1525
|
-
const
|
|
1526
|
-
return
|
|
1548
|
+
function f(g) {
|
|
1549
|
+
b((m) => {
|
|
1550
|
+
const y = new Set(m);
|
|
1551
|
+
return y.has(g) ? y.delete(g) : y.add(g), y;
|
|
1527
1552
|
});
|
|
1528
1553
|
}
|
|
1529
|
-
function
|
|
1554
|
+
function h() {
|
|
1530
1555
|
if (u.size === 0) {
|
|
1531
1556
|
a(null);
|
|
1532
1557
|
return;
|
|
1533
1558
|
}
|
|
1534
|
-
const
|
|
1559
|
+
const g = [];
|
|
1535
1560
|
for (const m of d)
|
|
1536
|
-
u.has(
|
|
1537
|
-
a({ type: "set", values:
|
|
1561
|
+
u.has(Q(m.value)) && g.push(m.value);
|
|
1562
|
+
a({ type: "set", values: g });
|
|
1538
1563
|
}
|
|
1539
|
-
function
|
|
1540
|
-
|
|
1564
|
+
function T() {
|
|
1565
|
+
b(/* @__PURE__ */ new Set()), a(null);
|
|
1541
1566
|
}
|
|
1542
|
-
const
|
|
1543
|
-
return /* @__PURE__ */
|
|
1567
|
+
const w = p ?? c("dataTable.selectFilter.all");
|
|
1568
|
+
return /* @__PURE__ */ A(
|
|
1544
1569
|
"div",
|
|
1545
1570
|
{
|
|
1546
1571
|
"data-component": "select-filter",
|
|
1547
1572
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[200px] ds:max-w-[260px]",
|
|
1548
1573
|
children: [
|
|
1549
|
-
/* @__PURE__ */ n(
|
|
1574
|
+
/* @__PURE__ */ n(zt, { orientation: "vertical", className: "ds:max-h-[240px]", children: /* @__PURE__ */ n(
|
|
1550
1575
|
"div",
|
|
1551
1576
|
{
|
|
1552
1577
|
role: "group",
|
|
1553
|
-
"aria-label":
|
|
1578
|
+
"aria-label": w,
|
|
1554
1579
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
1555
|
-
children: d.length === 0 ? /* @__PURE__ */ n("p", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[var(--muted-foreground)] ds:py-[var(--spacing-xs)]", children:
|
|
1556
|
-
const m =
|
|
1580
|
+
children: d.length === 0 ? /* @__PURE__ */ n("p", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[var(--muted-foreground)] ds:py-[var(--spacing-xs)]", children: c("dataTable.agGrid.noRowsToShow") }) : d.map((g) => {
|
|
1581
|
+
const m = Q(g.value);
|
|
1557
1582
|
return /* @__PURE__ */ n(
|
|
1558
|
-
|
|
1583
|
+
Me,
|
|
1559
1584
|
{
|
|
1560
1585
|
size: "sm",
|
|
1561
|
-
label:
|
|
1586
|
+
label: g.label,
|
|
1562
1587
|
checked: u.has(m),
|
|
1563
|
-
onCheckedChange: () =>
|
|
1588
|
+
onCheckedChange: () => f(m)
|
|
1564
1589
|
},
|
|
1565
1590
|
m
|
|
1566
1591
|
);
|
|
1567
1592
|
})
|
|
1568
1593
|
}
|
|
1569
1594
|
) }),
|
|
1570
|
-
/* @__PURE__ */
|
|
1571
|
-
/* @__PURE__ */ n(
|
|
1572
|
-
/* @__PURE__ */ n(
|
|
1595
|
+
/* @__PURE__ */ A("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
|
|
1596
|
+
/* @__PURE__ */ n(B, { intent: "ghost", size: "sm", onClick: T, type: "button", children: c("dataTable.selectFilter.clear") }),
|
|
1597
|
+
/* @__PURE__ */ n(B, { intent: "primary", size: "sm", onClick: h, type: "button", children: c("dataTable.selectFilter.apply") })
|
|
1573
1598
|
] })
|
|
1574
1599
|
]
|
|
1575
1600
|
}
|
|
1576
1601
|
);
|
|
1577
1602
|
}
|
|
1578
1603
|
function dr(t) {
|
|
1579
|
-
var
|
|
1580
|
-
const { model: e, onModelChange: a, column: r } = t, o = (
|
|
1581
|
-
const
|
|
1582
|
-
for (const
|
|
1583
|
-
return
|
|
1584
|
-
}, [i]), d =
|
|
1585
|
-
() => i.map((
|
|
1586
|
-
value: String(
|
|
1587
|
-
label:
|
|
1604
|
+
var b;
|
|
1605
|
+
const { model: e, onModelChange: a, column: r } = t, o = (b = r == null ? void 0 : r.getColDef) == null ? void 0 : b.call(r), s = (o == null ? void 0 : o.filterParams) ?? {}, i = s.options ?? [], p = s.placeholder ?? (typeof (o == null ? void 0 : o.headerName) == "string" ? o.headerName : void 0), c = O(() => {
|
|
1606
|
+
const f = /* @__PURE__ */ new Map();
|
|
1607
|
+
for (const h of i) f.set(String(h.value), h.value);
|
|
1608
|
+
return f;
|
|
1609
|
+
}, [i]), d = O(
|
|
1610
|
+
() => i.map((f) => ({
|
|
1611
|
+
value: String(f.value),
|
|
1612
|
+
label: f.label
|
|
1588
1613
|
})),
|
|
1589
1614
|
[i]
|
|
1590
|
-
),
|
|
1591
|
-
() => ((e == null ? void 0 : e.values) ?? []).map((
|
|
1615
|
+
), l = O(
|
|
1616
|
+
() => ((e == null ? void 0 : e.values) ?? []).map((f) => String(f)),
|
|
1592
1617
|
[e]
|
|
1593
1618
|
);
|
|
1594
|
-
function u(
|
|
1595
|
-
if (
|
|
1619
|
+
function u(f) {
|
|
1620
|
+
if (f.length === 0) {
|
|
1596
1621
|
a(null);
|
|
1597
1622
|
return;
|
|
1598
1623
|
}
|
|
1599
|
-
const
|
|
1600
|
-
for (const
|
|
1601
|
-
const
|
|
1602
|
-
|
|
1624
|
+
const h = [];
|
|
1625
|
+
for (const T of f) {
|
|
1626
|
+
const w = c.get(T);
|
|
1627
|
+
w !== void 0 && h.push(w);
|
|
1603
1628
|
}
|
|
1604
|
-
a({ type: "set", values:
|
|
1629
|
+
a({ type: "set", values: h });
|
|
1605
1630
|
}
|
|
1606
1631
|
return /* @__PURE__ */ n("div", { "data-component": "select-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ n(
|
|
1607
|
-
|
|
1632
|
+
Ot,
|
|
1608
1633
|
{
|
|
1609
1634
|
size: "sm",
|
|
1610
1635
|
options: d,
|
|
1611
|
-
value:
|
|
1636
|
+
value: l,
|
|
1612
1637
|
onChange: u,
|
|
1613
1638
|
placeholder: s.placeholder,
|
|
1614
1639
|
"aria-label": p,
|
|
@@ -1616,7 +1641,7 @@ function dr(t) {
|
|
|
1616
1641
|
}
|
|
1617
1642
|
) });
|
|
1618
1643
|
}
|
|
1619
|
-
function
|
|
1644
|
+
function X(t) {
|
|
1620
1645
|
return t.trim().toLocaleLowerCase();
|
|
1621
1646
|
}
|
|
1622
1647
|
function ur(t) {
|
|
@@ -1628,101 +1653,101 @@ function ur(t) {
|
|
|
1628
1653
|
column: s,
|
|
1629
1654
|
options: i,
|
|
1630
1655
|
loadOptions: p,
|
|
1631
|
-
placeholder:
|
|
1632
|
-
} = t, { t: d } =
|
|
1656
|
+
placeholder: c
|
|
1657
|
+
} = t, { t: d } = D("ui"), l = O(() => {
|
|
1633
1658
|
if (i && i.length > 0) return i;
|
|
1634
1659
|
if (!o || !s) return [];
|
|
1635
1660
|
const m = /* @__PURE__ */ new Map();
|
|
1636
|
-
return o.forEachNode((
|
|
1637
|
-
const
|
|
1638
|
-
if (
|
|
1639
|
-
const
|
|
1640
|
-
m.has(
|
|
1661
|
+
return o.forEachNode((y) => {
|
|
1662
|
+
const S = r(y);
|
|
1663
|
+
if (S == null) return;
|
|
1664
|
+
const C = typeof S == "string" ? S : String(S);
|
|
1665
|
+
m.has(C) || m.set(C, { value: C, label: C });
|
|
1641
1666
|
}), Array.from(m.values()).sort(
|
|
1642
|
-
(
|
|
1667
|
+
(y, S) => y.label.localeCompare(S.label)
|
|
1643
1668
|
);
|
|
1644
|
-
}, [i, o, s, r]), u =
|
|
1669
|
+
}, [i, o, s, r]), u = O(() => async (m, y) => {
|
|
1645
1670
|
if (p)
|
|
1646
|
-
return (await p(m,
|
|
1647
|
-
const
|
|
1648
|
-
return (
|
|
1649
|
-
}, [p,
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
}, [e == null ? void 0 : e.value]),
|
|
1671
|
+
return (await p(m, y)).map((R) => ({ value: R.value, label: R.label }));
|
|
1672
|
+
const S = X(m);
|
|
1673
|
+
return (S ? l.filter((E) => X(E.label).includes(S)) : l).slice(0, 50).map((E) => ({ value: E.value, label: E.label }));
|
|
1674
|
+
}, [p, l]), [b, f] = k((e == null ? void 0 : e.value) ?? "");
|
|
1675
|
+
P(() => {
|
|
1676
|
+
f((e == null ? void 0 : e.value) ?? "");
|
|
1677
|
+
}, [e == null ? void 0 : e.value]), ee({
|
|
1653
1678
|
doesFilterPass: (m) => {
|
|
1654
|
-
const
|
|
1655
|
-
if (!
|
|
1656
|
-
const
|
|
1657
|
-
if (
|
|
1658
|
-
const
|
|
1659
|
-
return
|
|
1679
|
+
const y = e == null ? void 0 : e.value;
|
|
1680
|
+
if (!y) return !0;
|
|
1681
|
+
const S = r(m.node);
|
|
1682
|
+
if (S == null) return !1;
|
|
1683
|
+
const C = typeof S == "string" ? S : String(S);
|
|
1684
|
+
return X(C) === X(y);
|
|
1660
1685
|
}
|
|
1661
1686
|
});
|
|
1687
|
+
function h(m) {
|
|
1688
|
+
f(m.label), a({ type: "equals", value: m.value });
|
|
1689
|
+
}
|
|
1662
1690
|
function T(m) {
|
|
1663
|
-
|
|
1691
|
+
f(m), m === "" && e && a(null);
|
|
1664
1692
|
}
|
|
1665
|
-
function
|
|
1666
|
-
|
|
1693
|
+
function w() {
|
|
1694
|
+
f(""), a(null);
|
|
1667
1695
|
}
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
}
|
|
1671
|
-
const f = l ?? d("dataTable.typeaheadFilter.placeholder");
|
|
1672
|
-
return /* @__PURE__ */ I(
|
|
1696
|
+
const g = c ?? d("dataTable.typeaheadFilter.placeholder");
|
|
1697
|
+
return /* @__PURE__ */ A(
|
|
1673
1698
|
"div",
|
|
1674
1699
|
{
|
|
1675
1700
|
"data-component": "typeahead-filter",
|
|
1676
1701
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
|
|
1677
1702
|
children: [
|
|
1678
1703
|
/* @__PURE__ */ n(
|
|
1679
|
-
|
|
1704
|
+
Be,
|
|
1680
1705
|
{
|
|
1681
1706
|
size: "sm",
|
|
1682
|
-
value:
|
|
1683
|
-
onChange:
|
|
1684
|
-
onSelect:
|
|
1707
|
+
value: b,
|
|
1708
|
+
onChange: T,
|
|
1709
|
+
onSelect: h,
|
|
1685
1710
|
loadOptions: u,
|
|
1686
|
-
placeholder:
|
|
1687
|
-
"aria-label":
|
|
1711
|
+
placeholder: g,
|
|
1712
|
+
"aria-label": g
|
|
1688
1713
|
}
|
|
1689
1714
|
),
|
|
1690
|
-
/* @__PURE__ */ n("div", { className: "ds:flex ds:items-center ds:justify-end ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: /* @__PURE__ */ n(
|
|
1715
|
+
/* @__PURE__ */ n("div", { className: "ds:flex ds:items-center ds:justify-end ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: /* @__PURE__ */ n(B, { intent: "ghost", size: "sm", onClick: w, type: "button", children: d("dataTable.typeaheadFilter.clear") }) })
|
|
1691
1716
|
]
|
|
1692
1717
|
}
|
|
1693
1718
|
);
|
|
1694
1719
|
}
|
|
1695
1720
|
function pr(t) {
|
|
1696
|
-
var
|
|
1697
|
-
const { model: e, onModelChange: a, column: r } = t, { t: o } =
|
|
1721
|
+
var h, T;
|
|
1722
|
+
const { model: e, onModelChange: a, column: r } = t, { t: o } = D("ui"), s = ((T = (h = r == null ? void 0 : r.getColDef) == null ? void 0 : h.call(r)) == null ? void 0 : T.filterParams) ?? {}, i = s.options ?? [], p = s.loadOptions, c = s.placeholder ?? o("dataTable.typeaheadFilter.placeholder"), d = O(() => async (w, g) => {
|
|
1698
1723
|
if (p)
|
|
1699
|
-
return (await p(
|
|
1700
|
-
const m =
|
|
1701
|
-
return (m ? i.filter((
|
|
1702
|
-
}, [p, i]), [
|
|
1703
|
-
|
|
1724
|
+
return (await p(w, g)).map((C) => ({ value: C.value, label: C.label }));
|
|
1725
|
+
const m = X(w);
|
|
1726
|
+
return (m ? i.filter((S) => X(S.label).includes(m)) : i).slice(0, 50).map((S) => ({ value: S.value, label: S.label }));
|
|
1727
|
+
}, [p, i]), [l, u] = k((e == null ? void 0 : e.value) ?? "");
|
|
1728
|
+
P(() => {
|
|
1704
1729
|
u((e == null ? void 0 : e.value) ?? "");
|
|
1705
1730
|
}, [e == null ? void 0 : e.value]);
|
|
1706
|
-
function
|
|
1707
|
-
u(
|
|
1731
|
+
function b(w) {
|
|
1732
|
+
u(w.label), a({ type: "equals", value: w.value });
|
|
1708
1733
|
}
|
|
1709
|
-
function
|
|
1710
|
-
u(
|
|
1734
|
+
function f(w) {
|
|
1735
|
+
u(w), w === "" && e && a(null);
|
|
1711
1736
|
}
|
|
1712
1737
|
return /* @__PURE__ */ n("div", { "data-component": "typeahead-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ n(
|
|
1713
|
-
|
|
1738
|
+
Be,
|
|
1714
1739
|
{
|
|
1715
1740
|
size: "sm",
|
|
1716
|
-
value:
|
|
1717
|
-
onChange:
|
|
1718
|
-
onSelect:
|
|
1741
|
+
value: l,
|
|
1742
|
+
onChange: f,
|
|
1743
|
+
onSelect: b,
|
|
1719
1744
|
loadOptions: d,
|
|
1720
|
-
placeholder:
|
|
1721
|
-
"aria-label":
|
|
1745
|
+
placeholder: c,
|
|
1746
|
+
"aria-label": c
|
|
1722
1747
|
}
|
|
1723
1748
|
) });
|
|
1724
1749
|
}
|
|
1725
|
-
const
|
|
1750
|
+
const ia = [
|
|
1726
1751
|
"equals",
|
|
1727
1752
|
"notEqual",
|
|
1728
1753
|
"greaterThan",
|
|
@@ -1733,10 +1758,10 @@ const la = [
|
|
|
1733
1758
|
"blank",
|
|
1734
1759
|
"notBlank"
|
|
1735
1760
|
];
|
|
1736
|
-
function
|
|
1761
|
+
function Fe(t) {
|
|
1737
1762
|
return t !== "blank" && t !== "notBlank";
|
|
1738
1763
|
}
|
|
1739
|
-
function
|
|
1764
|
+
function Re(t) {
|
|
1740
1765
|
return t === "inRange";
|
|
1741
1766
|
}
|
|
1742
1767
|
function ca(t, e, a, r) {
|
|
@@ -1780,82 +1805,82 @@ function fr(t) {
|
|
|
1780
1805
|
min: s,
|
|
1781
1806
|
max: i,
|
|
1782
1807
|
step: p,
|
|
1783
|
-
placeholder:
|
|
1784
|
-
} = t, { t: d } =
|
|
1808
|
+
placeholder: c
|
|
1809
|
+
} = t, { t: d } = D("ui"), l = (e == null ? void 0 : e.type) ?? o ?? "equals", [u, b] = k(l), [f, h] = k((e == null ? void 0 : e.filter) ?? null), [T, w] = k(
|
|
1785
1810
|
(e == null ? void 0 : e.filterTo) ?? null
|
|
1786
1811
|
);
|
|
1787
|
-
|
|
1812
|
+
P(() => {
|
|
1788
1813
|
if (e === null) {
|
|
1789
|
-
|
|
1814
|
+
b(o ?? "equals"), h(null), w(null);
|
|
1790
1815
|
return;
|
|
1791
1816
|
}
|
|
1792
|
-
|
|
1793
|
-
}, [e, o]),
|
|
1794
|
-
doesFilterPass: (
|
|
1817
|
+
b(e.type), h(e.filter ?? null), w(e.filterTo ?? null);
|
|
1818
|
+
}, [e, o]), ee({
|
|
1819
|
+
doesFilterPass: (R) => {
|
|
1795
1820
|
if (!e) return !0;
|
|
1796
|
-
const
|
|
1821
|
+
const I = da(r(R.node));
|
|
1797
1822
|
return ca(
|
|
1798
1823
|
e.type,
|
|
1799
|
-
|
|
1824
|
+
I,
|
|
1800
1825
|
e.filter ?? null,
|
|
1801
1826
|
e.filterTo ?? null
|
|
1802
1827
|
);
|
|
1803
1828
|
}
|
|
1804
1829
|
});
|
|
1805
|
-
const
|
|
1806
|
-
() =>
|
|
1807
|
-
value:
|
|
1808
|
-
label: d(`dataTable.numberFilter.operators.${
|
|
1830
|
+
const g = O(
|
|
1831
|
+
() => ia.map((R) => ({
|
|
1832
|
+
value: R,
|
|
1833
|
+
label: d(`dataTable.numberFilter.operators.${R}`)
|
|
1809
1834
|
})),
|
|
1810
1835
|
[d]
|
|
1811
|
-
), m =
|
|
1812
|
-
function
|
|
1813
|
-
if (!
|
|
1836
|
+
), m = c ?? d("dataTable.numberFilter.placeholder");
|
|
1837
|
+
function y() {
|
|
1838
|
+
if (!Fe(u)) {
|
|
1814
1839
|
a({ type: u, filter: 0 });
|
|
1815
1840
|
return;
|
|
1816
1841
|
}
|
|
1817
|
-
if (
|
|
1842
|
+
if (f === null) {
|
|
1818
1843
|
a(null);
|
|
1819
1844
|
return;
|
|
1820
1845
|
}
|
|
1821
|
-
if (
|
|
1846
|
+
if (Re(u)) {
|
|
1822
1847
|
a({
|
|
1823
1848
|
type: u,
|
|
1824
|
-
filter:
|
|
1825
|
-
filterTo:
|
|
1849
|
+
filter: f,
|
|
1850
|
+
filterTo: T ?? void 0
|
|
1826
1851
|
});
|
|
1827
1852
|
return;
|
|
1828
1853
|
}
|
|
1829
|
-
a({ type: u, filter:
|
|
1854
|
+
a({ type: u, filter: f });
|
|
1830
1855
|
}
|
|
1831
|
-
function
|
|
1832
|
-
|
|
1856
|
+
function S() {
|
|
1857
|
+
b(o ?? "equals"), h(null), w(null), a(null);
|
|
1833
1858
|
}
|
|
1834
|
-
const
|
|
1835
|
-
return /* @__PURE__ */
|
|
1859
|
+
const C = Fe(u), E = Re(u);
|
|
1860
|
+
return /* @__PURE__ */ A(
|
|
1836
1861
|
"div",
|
|
1837
1862
|
{
|
|
1838
1863
|
"data-component": "number-filter",
|
|
1839
1864
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
|
|
1840
1865
|
children: [
|
|
1841
1866
|
/* @__PURE__ */ n(
|
|
1842
|
-
|
|
1867
|
+
Le,
|
|
1843
1868
|
{
|
|
1844
1869
|
size: "sm",
|
|
1845
|
-
options:
|
|
1870
|
+
options: g,
|
|
1846
1871
|
value: u,
|
|
1847
|
-
onValueChange: (
|
|
1848
|
-
|
|
1872
|
+
onValueChange: (R) => {
|
|
1873
|
+
R !== "" && b(R);
|
|
1849
1874
|
},
|
|
1850
1875
|
"aria-label": d("dataTable.numberFilter.operators.equals")
|
|
1851
1876
|
}
|
|
1852
1877
|
),
|
|
1853
|
-
|
|
1854
|
-
|
|
1878
|
+
C && !E && /* @__PURE__ */ n(
|
|
1879
|
+
re,
|
|
1855
1880
|
{
|
|
1856
1881
|
size: "sm",
|
|
1857
|
-
value:
|
|
1858
|
-
onChange:
|
|
1882
|
+
value: f,
|
|
1883
|
+
onChange: h,
|
|
1859
1884
|
min: s,
|
|
1860
1885
|
max: i,
|
|
1861
1886
|
step: p,
|
|
@@ -1863,13 +1888,13 @@ function fr(t) {
|
|
|
1863
1888
|
"aria-label": m
|
|
1864
1889
|
}
|
|
1865
1890
|
),
|
|
1866
|
-
|
|
1891
|
+
E && /* @__PURE__ */ A("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1867
1892
|
/* @__PURE__ */ n(
|
|
1868
|
-
|
|
1893
|
+
re,
|
|
1869
1894
|
{
|
|
1870
1895
|
size: "sm",
|
|
1871
|
-
value:
|
|
1872
|
-
onChange:
|
|
1896
|
+
value: f,
|
|
1897
|
+
onChange: h,
|
|
1873
1898
|
min: s,
|
|
1874
1899
|
max: i,
|
|
1875
1900
|
step: p,
|
|
@@ -1878,11 +1903,11 @@ function fr(t) {
|
|
|
1878
1903
|
}
|
|
1879
1904
|
),
|
|
1880
1905
|
/* @__PURE__ */ n(
|
|
1881
|
-
|
|
1906
|
+
re,
|
|
1882
1907
|
{
|
|
1883
1908
|
size: "sm",
|
|
1884
|
-
value:
|
|
1885
|
-
onChange:
|
|
1909
|
+
value: T,
|
|
1910
|
+
onChange: w,
|
|
1886
1911
|
min: s,
|
|
1887
1912
|
max: i,
|
|
1888
1913
|
step: p,
|
|
@@ -1891,34 +1916,34 @@ function fr(t) {
|
|
|
1891
1916
|
}
|
|
1892
1917
|
)
|
|
1893
1918
|
] }),
|
|
1894
|
-
/* @__PURE__ */
|
|
1895
|
-
/* @__PURE__ */ n(
|
|
1896
|
-
/* @__PURE__ */ n(
|
|
1919
|
+
/* @__PURE__ */ A("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
|
|
1920
|
+
/* @__PURE__ */ n(B, { intent: "ghost", size: "sm", onClick: S, type: "button", children: d("dataTable.numberFilter.clear") }),
|
|
1921
|
+
/* @__PURE__ */ n(B, { intent: "primary", size: "sm", onClick: y, type: "button", children: d("dataTable.numberFilter.apply") })
|
|
1897
1922
|
] })
|
|
1898
1923
|
]
|
|
1899
1924
|
}
|
|
1900
1925
|
);
|
|
1901
1926
|
}
|
|
1902
1927
|
function mr(t) {
|
|
1903
|
-
var
|
|
1904
|
-
const { model: e, onModelChange: a, column: r } = t, { t: o } =
|
|
1905
|
-
return
|
|
1928
|
+
var l, u;
|
|
1929
|
+
const { model: e, onModelChange: a, column: r } = t, { t: o } = D("ui"), s = ((u = (l = r == null ? void 0 : r.getColDef) == null ? void 0 : l.call(r)) == null ? void 0 : u.filterParams) ?? {}, i = s.defaultOperator ?? "equals", p = s.placeholder ?? o("dataTable.numberFilter.placeholder"), [c, d] = k((e == null ? void 0 : e.filter) ?? null);
|
|
1930
|
+
return P(() => {
|
|
1906
1931
|
d((e == null ? void 0 : e.filter) ?? null);
|
|
1907
|
-
}, [e == null ? void 0 : e.filter]),
|
|
1908
|
-
if (
|
|
1909
|
-
const
|
|
1910
|
-
if (
|
|
1932
|
+
}, [e == null ? void 0 : e.filter]), P(() => {
|
|
1933
|
+
if (c === ((e == null ? void 0 : e.filter) ?? null)) return;
|
|
1934
|
+
const b = setTimeout(() => {
|
|
1935
|
+
if (c === null || Number.isNaN(c)) {
|
|
1911
1936
|
a(null);
|
|
1912
1937
|
return;
|
|
1913
1938
|
}
|
|
1914
|
-
a({ type: i, filter:
|
|
1939
|
+
a({ type: i, filter: c });
|
|
1915
1940
|
}, 200);
|
|
1916
|
-
return () => clearTimeout(
|
|
1917
|
-
}, [
|
|
1918
|
-
|
|
1941
|
+
return () => clearTimeout(b);
|
|
1942
|
+
}, [c, i]), /* @__PURE__ */ n("div", { "data-component": "number-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ n(
|
|
1943
|
+
re,
|
|
1919
1944
|
{
|
|
1920
1945
|
size: "sm",
|
|
1921
|
-
value:
|
|
1946
|
+
value: c,
|
|
1922
1947
|
onChange: d,
|
|
1923
1948
|
min: s.min,
|
|
1924
1949
|
max: s.max,
|
|
@@ -1930,12 +1955,12 @@ function mr(t) {
|
|
|
1930
1955
|
}
|
|
1931
1956
|
function gr(t) {
|
|
1932
1957
|
const { value: e, variantMap: a } = t, r = (a == null ? void 0 : a[e]) ?? "neutral";
|
|
1933
|
-
return /* @__PURE__ */ n(
|
|
1958
|
+
return /* @__PURE__ */ n(Pt, { variant: r, withDot: !0, size: "sm", children: String(e ?? "") });
|
|
1934
1959
|
}
|
|
1935
1960
|
function br(t) {
|
|
1936
1961
|
const { value: e } = t;
|
|
1937
|
-
return e ? /* @__PURE__ */
|
|
1938
|
-
/* @__PURE__ */ n(
|
|
1962
|
+
return e ? /* @__PURE__ */ A("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
1963
|
+
/* @__PURE__ */ n($e, { name: e.name, src: e.src, size: "sm" }),
|
|
1939
1964
|
/* @__PURE__ */ n("span", { children: e.name })
|
|
1940
1965
|
] }) : null;
|
|
1941
1966
|
}
|
|
@@ -1948,7 +1973,7 @@ const ua = {
|
|
|
1948
1973
|
rounded: "ds:rounded-[var(--radius-md)]",
|
|
1949
1974
|
circle: "ds:rounded-[var(--radius-full)]"
|
|
1950
1975
|
};
|
|
1951
|
-
function
|
|
1976
|
+
function pe(t, e) {
|
|
1952
1977
|
if (!t || typeof t != "object") return;
|
|
1953
1978
|
const a = t[e];
|
|
1954
1979
|
return typeof a == "string" ? a : void 0;
|
|
@@ -1970,11 +1995,11 @@ function hr(t) {
|
|
|
1970
1995
|
shape: i = "rounded"
|
|
1971
1996
|
} = t;
|
|
1972
1997
|
if (!e) return null;
|
|
1973
|
-
const p =
|
|
1974
|
-
return
|
|
1998
|
+
const p = pe(e, a), c = ma(p), d = r ? pe(e, r) ?? "" : "", l = o ? pe(e, o) : void 0;
|
|
1999
|
+
return c ? /* @__PURE__ */ n(
|
|
1975
2000
|
"img",
|
|
1976
2001
|
{
|
|
1977
|
-
src:
|
|
2002
|
+
src: c,
|
|
1978
2003
|
alt: d,
|
|
1979
2004
|
loading: "lazy",
|
|
1980
2005
|
decoding: "async",
|
|
@@ -1982,16 +2007,16 @@ function hr(t) {
|
|
|
1982
2007
|
" "
|
|
1983
2008
|
)
|
|
1984
2009
|
}
|
|
1985
|
-
) :
|
|
2010
|
+
) : l ? /* @__PURE__ */ n($e, { name: l, size: s }) : null;
|
|
1986
2011
|
}
|
|
1987
2012
|
function vr(t) {
|
|
1988
|
-
const { value: e, maxVisible: a = 3 } = t, { t: r } =
|
|
2013
|
+
const { value: e, maxVisible: a = 3 } = t, { t: r } = D();
|
|
1989
2014
|
if (!Array.isArray(e) || e.length === 0) return null;
|
|
1990
2015
|
const o = e.slice(0, a), s = e.length - a;
|
|
1991
|
-
return /* @__PURE__ */
|
|
1992
|
-
o.map((i) => /* @__PURE__ */ n(
|
|
1993
|
-
s > 0 && /* @__PURE__ */ n(
|
|
1994
|
-
|
|
2016
|
+
return /* @__PURE__ */ A("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
2017
|
+
o.map((i) => /* @__PURE__ */ n(oe, { label: i, size: "sm" }, i)),
|
|
2018
|
+
s > 0 && /* @__PURE__ */ n(Mt, { label: e.slice(a).join(", "), children: /* @__PURE__ */ n(
|
|
2019
|
+
oe,
|
|
1995
2020
|
{
|
|
1996
2021
|
label: r("inputs.multiSelect.overflow", { count: s }),
|
|
1997
2022
|
size: "sm",
|
|
@@ -2014,8 +2039,8 @@ const ga = {
|
|
|
2014
2039
|
};
|
|
2015
2040
|
function Tr(t) {
|
|
2016
2041
|
const { value: e, format: a = "date", options: r } = t;
|
|
2017
|
-
return e == null || e === "" ? null : a === "relative" && !r ? /* @__PURE__ */ n(
|
|
2018
|
-
|
|
2042
|
+
return e == null || e === "" ? null : a === "relative" && !r ? /* @__PURE__ */ n(Ne, { value: e, shape: "bare" }) : /* @__PURE__ */ n(
|
|
2043
|
+
Ne,
|
|
2019
2044
|
{
|
|
2020
2045
|
value: e,
|
|
2021
2046
|
format: "absolute",
|
|
@@ -2036,33 +2061,33 @@ function yr(t) {
|
|
|
2036
2061
|
colorNegative: r,
|
|
2037
2062
|
strikethrough: o,
|
|
2038
2063
|
options: s
|
|
2039
|
-
} = t, { i18n: i } =
|
|
2064
|
+
} = t, { i18n: i } = D(), p = ba(e);
|
|
2040
2065
|
if (p === null) return null;
|
|
2041
|
-
const
|
|
2066
|
+
const c = i.language || "en", d = new Intl.NumberFormat(c, {
|
|
2042
2067
|
style: "currency",
|
|
2043
2068
|
currency: a,
|
|
2044
2069
|
...s
|
|
2045
|
-
}).format(p),
|
|
2046
|
-
return r && p < 0 &&
|
|
2070
|
+
}).format(p), l = ["ds:tabular-nums"];
|
|
2071
|
+
return r && p < 0 && l.push("ds:text-[color:var(--destructive)]"), o && l.push("line-through"), /* @__PURE__ */ n("span", { className: l.join(" "), children: d });
|
|
2047
2072
|
}
|
|
2048
|
-
function
|
|
2049
|
-
if (!
|
|
2073
|
+
function De(t) {
|
|
2074
|
+
if (!Oe(t)) return t;
|
|
2050
2075
|
const e = t, a = e.props.className ?? "", r = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} size-4`.trim();
|
|
2051
|
-
return
|
|
2076
|
+
return ze(e, { className: r, size: e.props.size ?? 16 });
|
|
2052
2077
|
}
|
|
2053
2078
|
function Cr(t) {
|
|
2054
2079
|
return Math.max(1, t) * 32 + 26;
|
|
2055
2080
|
}
|
|
2056
|
-
function
|
|
2081
|
+
function fe(t, e) {
|
|
2057
2082
|
return typeof t == "function" ? t(e) : !!t;
|
|
2058
2083
|
}
|
|
2059
2084
|
const ha = "ds:text-[color:var(--destructive)] ds:hover:text-[color:var(--destructive-hover)]";
|
|
2060
2085
|
function xr(t) {
|
|
2061
|
-
const { data: e, actions: a, intent: r = "ghost", group: o, label: s, collapsed: i } = t, { t: p } =
|
|
2086
|
+
const { data: e, actions: a, intent: r = "ghost", group: o, label: s, collapsed: i } = t, { t: p } = D();
|
|
2062
2087
|
if (!e) return null;
|
|
2063
|
-
const
|
|
2088
|
+
const c = a.filter((u) => !fe(u.hidden, e));
|
|
2064
2089
|
if (typeof i == "function" ? i() : !!i)
|
|
2065
|
-
return /* @__PURE__ */
|
|
2090
|
+
return /* @__PURE__ */ A(_.Root, { children: [
|
|
2066
2091
|
/* @__PURE__ */ n(_.Trigger, { asChild: !0, children: /* @__PURE__ */ n(
|
|
2067
2092
|
V,
|
|
2068
2093
|
{
|
|
@@ -2072,47 +2097,47 @@ function xr(t) {
|
|
|
2072
2097
|
"aria-label": s ?? p("dataTable.actions", "Actions")
|
|
2073
2098
|
}
|
|
2074
2099
|
) }),
|
|
2075
|
-
/* @__PURE__ */ n(_.Content, { align: "end", children:
|
|
2100
|
+
/* @__PURE__ */ n(_.Content, { align: "end", children: c.map((u, b) => /* @__PURE__ */ n(
|
|
2076
2101
|
_.Item,
|
|
2077
2102
|
{
|
|
2078
|
-
startIcon:
|
|
2079
|
-
disabled:
|
|
2103
|
+
startIcon: De(u.icon),
|
|
2104
|
+
disabled: fe(u.disabled, e),
|
|
2080
2105
|
onSelect: () => u.onClick(e),
|
|
2081
2106
|
className: u.variant === "destructive" ? "ds:text-[color:var(--destructive)]" : void 0,
|
|
2082
2107
|
children: u.label
|
|
2083
2108
|
},
|
|
2084
|
-
|
|
2109
|
+
b
|
|
2085
2110
|
)) })
|
|
2086
2111
|
] });
|
|
2087
|
-
const
|
|
2088
|
-
const
|
|
2112
|
+
const l = c.map((u, b) => {
|
|
2113
|
+
const f = fe(u.disabled, e), h = f && u.disabledReason ? u.disabledReason : u.label;
|
|
2089
2114
|
return /* @__PURE__ */ n(
|
|
2090
2115
|
V,
|
|
2091
2116
|
{
|
|
2092
2117
|
size: "sm",
|
|
2093
2118
|
intent: r,
|
|
2094
|
-
icon:
|
|
2095
|
-
tooltip:
|
|
2119
|
+
icon: De(u.icon),
|
|
2120
|
+
tooltip: h,
|
|
2096
2121
|
"aria-label": u.label,
|
|
2097
|
-
disabled:
|
|
2098
|
-
onClick: (
|
|
2099
|
-
|
|
2122
|
+
disabled: f,
|
|
2123
|
+
onClick: (T) => {
|
|
2124
|
+
T.stopPropagation(), u.onClick(e);
|
|
2100
2125
|
},
|
|
2101
2126
|
className: u.variant === "destructive" ? ha : void 0
|
|
2102
2127
|
},
|
|
2103
|
-
|
|
2128
|
+
b
|
|
2104
2129
|
);
|
|
2105
2130
|
});
|
|
2106
2131
|
return o ? /* @__PURE__ */ n(
|
|
2107
|
-
|
|
2132
|
+
Pe,
|
|
2108
2133
|
{
|
|
2109
2134
|
"aria-label": s ?? p("dataTable.actions", "Actions"),
|
|
2110
2135
|
size: "sm",
|
|
2111
|
-
children:
|
|
2136
|
+
children: l
|
|
2112
2137
|
}
|
|
2113
|
-
) : /* @__PURE__ */ n("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children:
|
|
2138
|
+
) : /* @__PURE__ */ n("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: l });
|
|
2114
2139
|
}
|
|
2115
|
-
function
|
|
2140
|
+
function Ie(t, e) {
|
|
2116
2141
|
return typeof t == "function" ? t(e) : t;
|
|
2117
2142
|
}
|
|
2118
2143
|
function va(t) {
|
|
@@ -2121,7 +2146,7 @@ function va(t) {
|
|
|
2121
2146
|
function Sr(t) {
|
|
2122
2147
|
const { value: e, data: a, href: r, onClick: o, secondary: s } = t;
|
|
2123
2148
|
if (!a) return null;
|
|
2124
|
-
const i =
|
|
2149
|
+
const i = Ie(r, a), p = Ie(s, a), c = e == null || e === "" ? "" : String(e), d = [
|
|
2125
2150
|
"ds:text-[color:var(--primary)]",
|
|
2126
2151
|
"ds:hover:underline",
|
|
2127
2152
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
@@ -2129,28 +2154,28 @@ function Sr(t) {
|
|
|
2129
2154
|
"ds:focus-visible:outline-[color:var(--ring)]",
|
|
2130
2155
|
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
2131
2156
|
"ds:rounded-[var(--radius-sm)]"
|
|
2132
|
-
].join(" "),
|
|
2157
|
+
].join(" "), l = (u) => {
|
|
2133
2158
|
o && (i || u.preventDefault(), u.stopPropagation(), o(a));
|
|
2134
2159
|
};
|
|
2135
|
-
return /* @__PURE__ */
|
|
2160
|
+
return /* @__PURE__ */ A("span", { className: "ds:flex ds:flex-col ds:leading-tight", children: [
|
|
2136
2161
|
i ? /* @__PURE__ */ n(
|
|
2137
2162
|
"a",
|
|
2138
2163
|
{
|
|
2139
2164
|
href: va(i),
|
|
2140
|
-
onClick:
|
|
2165
|
+
onClick: l,
|
|
2141
2166
|
className: d,
|
|
2142
|
-
children:
|
|
2167
|
+
children: c
|
|
2143
2168
|
}
|
|
2144
2169
|
) : /* @__PURE__ */ n(
|
|
2145
2170
|
"button",
|
|
2146
2171
|
{
|
|
2147
2172
|
type: "button",
|
|
2148
|
-
onClick:
|
|
2173
|
+
onClick: l,
|
|
2149
2174
|
className: [
|
|
2150
2175
|
"ds:appearance-none ds:bg-transparent ds:p-0 ds:text-start",
|
|
2151
2176
|
d
|
|
2152
2177
|
].join(" "),
|
|
2153
|
-
children:
|
|
2178
|
+
children: c
|
|
2154
2179
|
}
|
|
2155
2180
|
),
|
|
2156
2181
|
p ? /* @__PURE__ */ n("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: p }) : null
|
|
@@ -2167,19 +2192,19 @@ export {
|
|
|
2167
2192
|
vr as T,
|
|
2168
2193
|
br as U,
|
|
2169
2194
|
Tr as a,
|
|
2170
|
-
|
|
2171
|
-
|
|
2195
|
+
lr as b,
|
|
2196
|
+
ir as c,
|
|
2172
2197
|
mr as d,
|
|
2173
2198
|
dr as e,
|
|
2174
2199
|
gr as f,
|
|
2175
2200
|
Zt as g,
|
|
2176
2201
|
Yt as h,
|
|
2177
|
-
|
|
2178
|
-
|
|
2202
|
+
ne as i,
|
|
2203
|
+
Lt as j,
|
|
2179
2204
|
ur as k,
|
|
2180
2205
|
pr as l,
|
|
2181
2206
|
Cr as m,
|
|
2182
2207
|
ea as n,
|
|
2183
|
-
|
|
2208
|
+
Ue as o
|
|
2184
2209
|
};
|
|
2185
|
-
//# sourceMappingURL=link-cell-renderer-
|
|
2210
|
+
//# sourceMappingURL=link-cell-renderer-CLI7sBkX.js.map
|