@alfadocs/ui-kit-debug 0.73.0 → 0.75.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/actions-cell-renderer-DLrcSTK_.js +1546 -0
- package/dist/_chunks/actions-cell-renderer-DLrcSTK_.js.map +1 -0
- package/dist/_chunks/{ai-prompt-input-DFm58UjY.js → ai-prompt-input-DziJCGLe.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-DFm58UjY.js.map → ai-prompt-input-DziJCGLe.js.map} +1 -1
- package/dist/_chunks/{audio-recorder-CjAY0GAc.js → audio-recorder-Cc3KuL9y.js} +2 -2
- package/dist/_chunks/{audio-recorder-CjAY0GAc.js.map → audio-recorder-Cc3KuL9y.js.map} +1 -1
- package/dist/_chunks/{bishop-score-Bs6t6Zv1.js → bishop-score-DDW5-gb9.js} +2 -2
- package/dist/_chunks/{bishop-score-Bs6t6Zv1.js.map → bishop-score-DDW5-gb9.js.map} +1 -1
- package/dist/_chunks/{booking-CWnZhZ5g.js → booking-B1Qkcl3c.js} +2 -2
- package/dist/_chunks/{booking-CWnZhZ5g.js.map → booking-B1Qkcl3c.js.map} +1 -1
- package/dist/_chunks/{care-plan-card-CfIP3Vc1.js → care-plan-card-BrwhyIJI.js} +2 -2
- package/dist/_chunks/{care-plan-card-CfIP3Vc1.js.map → care-plan-card-BrwhyIJI.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-CRbS-G00.js → care-plan-entry-card-DWEdCQM3.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-CRbS-G00.js.map → care-plan-entry-card-DWEdCQM3.js.map} +1 -1
- package/dist/_chunks/data-table-tabs-BEUXiRlu.js +710 -0
- package/dist/_chunks/data-table-tabs-BEUXiRlu.js.map +1 -0
- package/dist/_chunks/document-preview-CGSM_au9.js +181 -0
- package/dist/_chunks/document-preview-CGSM_au9.js.map +1 -0
- package/dist/_chunks/{document-scanner-BE6Jz4Ob.js → document-scanner-B6h1Ir56.js} +2 -2
- package/dist/_chunks/{document-scanner-BE6Jz4Ob.js.map → document-scanner-B6h1Ir56.js.map} +1 -1
- package/dist/_chunks/{field-value-DCXJXKab.js → field-value-DHG6gEKS.js} +2 -2
- package/dist/_chunks/{field-value-DCXJXKab.js.map → field-value-DHG6gEKS.js.map} +1 -1
- package/dist/_chunks/file-Cwe9VC1A.js +40 -0
- package/dist/_chunks/file-Cwe9VC1A.js.map +1 -0
- package/dist/_chunks/file-manager-UF8dkQF1.js +1776 -0
- package/dist/_chunks/file-manager-UF8dkQF1.js.map +1 -0
- package/dist/_chunks/{file-upload-B2SXhRiN.js → file-upload-DENvuhfs.js} +98 -129
- package/dist/_chunks/file-upload-DENvuhfs.js.map +1 -0
- package/dist/_chunks/{gestational-age-calculator-C9Dfis4I.js → gestational-age-calculator-BpYw-WF-.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-C9Dfis4I.js.map → gestational-age-calculator-BpYw-WF-.js.map} +1 -1
- package/dist/_chunks/{header-settings-CRQDCYgr.js → header-settings-4cwQzeFc.js} +2 -2
- package/dist/_chunks/{header-settings-CRQDCYgr.js.map → header-settings-4cwQzeFc.js.map} +1 -1
- package/dist/_chunks/{icon-picker-BePK27S-.js → icon-picker-CM9ubkew.js} +2 -2
- package/dist/_chunks/{icon-picker-BePK27S-.js.map → icon-picker-CM9ubkew.js.map} +1 -1
- package/dist/_chunks/link-cell-renderer-BQGUs45d.js +711 -0
- package/dist/_chunks/link-cell-renderer-BQGUs45d.js.map +1 -0
- package/dist/_chunks/{locale-picker-Cbfqc0_N.js → locale-picker-GNF3lo8K.js} +2 -2
- package/dist/_chunks/{locale-picker-Cbfqc0_N.js.map → locale-picker-GNF3lo8K.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-Dm6S-hun.js → marketplace-app-shell-D_1tF4La.js} +3 -3
- package/dist/_chunks/{marketplace-app-shell-Dm6S-hun.js.map → marketplace-app-shell-D_1tF4La.js.map} +1 -1
- package/dist/_chunks/{muscle-scheme-B9MIkuj0.js → muscle-scheme-CFBE2dme.js} +6 -14
- package/dist/_chunks/{muscle-scheme-B9MIkuj0.js.map → muscle-scheme-CFBE2dme.js.map} +1 -1
- package/dist/_chunks/{notes-panel-B_8-Mebz.js → notes-panel-Cvdp818a.js} +2 -2
- package/dist/_chunks/{notes-panel-B_8-Mebz.js.map → notes-panel-Cvdp818a.js.map} +1 -1
- package/dist/_chunks/{optical-prescription-BQ75_kf6.js → optical-prescription-BEjYQjiO.js} +2 -2
- package/dist/_chunks/{optical-prescription-BQ75_kf6.js.map → optical-prescription-BEjYQjiO.js.map} +1 -1
- package/dist/_chunks/{patient-details-JkOI3Ijd.js → patient-details-DP4wKyq4.js} +3 -3
- package/dist/_chunks/{patient-details-JkOI3Ijd.js.map → patient-details-DP4wKyq4.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-CQOLMH3E.js → patient-summary-card-D6kgdTNn.js} +2 -2
- package/dist/_chunks/{patient-summary-card-CQOLMH3E.js.map → patient-summary-card-D6kgdTNn.js.map} +1 -1
- package/dist/_chunks/{patient-table-B_mOe-ZT.js → patient-table-DweKjiXg.js} +122 -118
- package/dist/_chunks/patient-table-DweKjiXg.js.map +1 -0
- package/dist/_chunks/periodontal-chart-D8hOFmde.js +1173 -0
- package/dist/_chunks/periodontal-chart-D8hOFmde.js.map +1 -0
- package/dist/_chunks/periodontal-diagnosis-cco40xTa.js +345 -0
- package/dist/_chunks/periodontal-diagnosis-cco40xTa.js.map +1 -0
- package/dist/_chunks/periodontal-risk-chart-bUGkMwDg.js +334 -0
- package/dist/_chunks/periodontal-risk-chart-bUGkMwDg.js.map +1 -0
- package/dist/_chunks/{popover-DGTKfLWh.js → popover-Cc0a69sw.js} +31 -28
- package/dist/_chunks/{popover-DGTKfLWh.js.map → popover-Cc0a69sw.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-IsDVfqJX.js → pregnancy-dating-msMl_6wz.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-IsDVfqJX.js.map → pregnancy-dating-msMl_6wz.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-e488ooH8.js → radiograph-panel.agent-CxF9pVxd.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-e488ooH8.js.map → radiograph-panel.agent-CxF9pVxd.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-CgA2bYwi.js → rich-text-editor-CCWjNkbx.js} +186 -177
- package/dist/_chunks/rich-text-editor-CCWjNkbx.js.map +1 -0
- package/dist/_chunks/{select-BmCbJMJS.js → select-BW5ecXlX.js} +13 -13
- package/dist/_chunks/{select-BmCbJMJS.js.map → select-BW5ecXlX.js.map} +1 -1
- package/dist/_chunks/{sidebar-CtU35PIX.js → sidebar-C0PbwJBc.js} +357 -320
- package/dist/_chunks/sidebar-C0PbwJBc.js.map +1 -0
- package/dist/_chunks/signature-request-C-mskXwi.js +318 -0
- package/dist/_chunks/signature-request-C-mskXwi.js.map +1 -0
- package/dist/_chunks/{tabs-DVQ941Sj.js → tabs-CVTukWRD.js} +2 -2
- package/dist/_chunks/{tabs-DVQ941Sj.js.map → tabs-CVTukWRD.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-LCK5ZXvU.js → tasks-panel-CjGAhIN8.js} +2 -2
- package/dist/_chunks/{tasks-panel-LCK5ZXvU.js.map → tasks-panel-CjGAhIN8.js.map} +1 -1
- package/dist/_chunks/tooth-data-BwuoKFf4.js +660 -0
- package/dist/_chunks/tooth-data-BwuoKFf4.js.map +1 -0
- package/dist/_chunks/tooth-scheme-BzJ6rcte.js +1483 -0
- package/dist/_chunks/tooth-scheme-BzJ6rcte.js.map +1 -0
- package/dist/_chunks/{unit-converter-3uL_tMCm.js → unit-converter-CSLWFDQh.js} +2 -2
- package/dist/_chunks/{unit-converter-3uL_tMCm.js.map → unit-converter-CSLWFDQh.js.map} +1 -1
- package/dist/agent-catalog.json +1282 -213
- package/dist/agent-i18n/en.json +84 -5
- package/dist/components/_shared/entity-card/entity-card.d.ts +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/anamnesis-card/anamnesis-card.d.ts +1 -1
- package/dist/components/appointment-card/appointment-card.d.ts +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/card/card.d.ts +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/clinical-note-card/clinical-note-card.d.ts +1 -1
- package/dist/components/contact-profile-card/contact-profile-card.d.ts +1 -1
- package/dist/components/data-table/data-table.d.ts.map +1 -1
- package/dist/components/data-table/filters/number-filter.d.ts.map +1 -1
- package/dist/components/data-table/index.js +35 -34
- package/dist/components/data-table/index.js.map +1 -1
- package/dist/components/data-table/toolbar.d.ts +1 -1
- package/dist/components/data-table/toolbar.d.ts.map +1 -1
- package/dist/components/data-table-tabs/data-table-tabs.agent.d.ts +4 -0
- package/dist/components/data-table-tabs/data-table-tabs.agent.d.ts.map +1 -0
- package/dist/components/data-table-tabs/data-table-tabs.d.ts +93 -0
- package/dist/components/data-table-tabs/data-table-tabs.d.ts.map +1 -0
- package/dist/components/data-table-tabs/index.d.ts +5 -0
- package/dist/components/data-table-tabs/index.d.ts.map +1 -0
- package/dist/components/data-table-tabs/index.js +8 -0
- package/dist/components/data-table-tabs/index.js.map +1 -0
- package/dist/components/data-table-tabs/use-data-table-filter-tabs.d.ts +63 -0
- package/dist/components/data-table-tabs/use-data-table-filter-tabs.d.ts.map +1 -0
- package/dist/components/document-preview/document-preview.agent.d.ts +4 -0
- package/dist/components/document-preview/document-preview.agent.d.ts.map +1 -0
- package/dist/components/document-preview/document-preview.d.ts +41 -0
- package/dist/components/document-preview/document-preview.d.ts.map +1 -0
- package/dist/components/document-preview/index.d.ts +4 -0
- package/dist/components/document-preview/index.d.ts.map +1 -0
- package/dist/components/document-preview/index.js +6 -0
- package/dist/components/document-preview/index.js.map +1 -0
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/file-manager/dialogs.d.ts +48 -0
- package/dist/components/file-manager/dialogs.d.ts.map +1 -0
- package/dist/components/file-manager/file-manager.agent.d.ts +4 -0
- package/dist/components/file-manager/file-manager.agent.d.ts.map +1 -0
- package/dist/components/file-manager/file-manager.d.ts +82 -0
- package/dist/components/file-manager/file-manager.d.ts.map +1 -0
- package/dist/components/file-manager/folder-tree.d.ts +12 -0
- package/dist/components/file-manager/folder-tree.d.ts.map +1 -0
- package/dist/components/file-manager/index.d.ts +5 -0
- package/dist/components/file-manager/index.d.ts.map +1 -0
- package/dist/components/file-manager/index.js +6 -0
- package/dist/components/file-manager/index.js.map +1 -0
- package/dist/components/file-manager/list-view.d.ts +49 -0
- package/dist/components/file-manager/list-view.d.ts.map +1 -0
- package/dist/components/file-manager/toolbar.d.ts +15 -0
- package/dist/components/file-manager/toolbar.d.ts.map +1 -0
- package/dist/components/file-manager/types.d.ts +167 -0
- package/dist/components/file-manager/types.d.ts.map +1 -0
- package/dist/components/file-manager/utils.d.ts +34 -0
- package/dist/components/file-manager/utils.d.ts.map +1 -0
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/message-card/message-card.d.ts +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/muscle-scheme/muscle-scheme.d.ts.map +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notification-card/notification-card.d.ts +1 -1
- package/dist/components/operator-hero/operator-hero.d.ts +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +1 -1
- package/dist/components/patient-table/columns.d.ts.map +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/payment-card.d.ts +1 -1
- package/dist/components/payment-card/payment-request-card.d.ts +1 -1
- package/dist/components/periodontal-chart/index.d.ts +6 -0
- package/dist/components/periodontal-chart/index.d.ts.map +1 -0
- package/dist/components/periodontal-chart/index.js +22 -0
- package/dist/components/periodontal-chart/index.js.map +1 -0
- package/dist/components/periodontal-chart/periodontal-chart-data.d.ts +119 -0
- package/dist/components/periodontal-chart/periodontal-chart-data.d.ts.map +1 -0
- package/dist/components/periodontal-chart/periodontal-chart.agent.d.ts +4 -0
- package/dist/components/periodontal-chart/periodontal-chart.agent.d.ts.map +1 -0
- package/dist/components/periodontal-chart/periodontal-chart.d.ts +69 -0
- package/dist/components/periodontal-chart/periodontal-chart.d.ts.map +1 -0
- package/dist/components/periodontal-chart-card/periodontal-chart-card.d.ts +1 -1
- package/dist/components/periodontal-diagnosis/index.d.ts +6 -0
- package/dist/components/periodontal-diagnosis/index.d.ts.map +1 -0
- package/dist/components/periodontal-diagnosis/index.js +13 -0
- package/dist/components/periodontal-diagnosis/index.js.map +1 -0
- package/dist/components/periodontal-diagnosis/periodontal-diagnosis-data.d.ts +30 -0
- package/dist/components/periodontal-diagnosis/periodontal-diagnosis-data.d.ts.map +1 -0
- package/dist/components/periodontal-diagnosis/periodontal-diagnosis.agent.d.ts +4 -0
- package/dist/components/periodontal-diagnosis/periodontal-diagnosis.agent.d.ts.map +1 -0
- package/dist/components/periodontal-diagnosis/periodontal-diagnosis.d.ts +44 -0
- package/dist/components/periodontal-diagnosis/periodontal-diagnosis.d.ts.map +1 -0
- package/dist/components/periodontal-risk-chart/index.d.ts +6 -0
- package/dist/components/periodontal-risk-chart/index.d.ts.map +1 -0
- package/dist/components/periodontal-risk-chart/index.js +9 -0
- package/dist/components/periodontal-risk-chart/index.js.map +1 -0
- package/dist/components/periodontal-risk-chart/periodontal-risk-chart.agent.d.ts +4 -0
- package/dist/components/periodontal-risk-chart/periodontal-risk-chart.agent.d.ts.map +1 -0
- package/dist/components/periodontal-risk-chart/periodontal-risk-chart.d.ts +28 -0
- package/dist/components/periodontal-risk-chart/periodontal-risk-chart.d.ts.map +1 -0
- package/dist/components/periodontal-risk-chart/periodontal-risk-data.d.ts +47 -0
- package/dist/components/periodontal-risk-chart/periodontal-risk-data.d.ts.map +1 -0
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover.d.ts +1 -0
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/product-hub-tray/product-hub-panel.d.ts +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sidebar/sidebar.d.ts +9 -0
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/skeleton-scheme/index.js +5 -13
- package/dist/components/skeleton-scheme/index.js.map +1 -1
- package/dist/components/stat/stat.d.ts +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +29 -28
- package/dist/components/tooth-scheme/index.js.map +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +320 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +320 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +320 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +320 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +320 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +320 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +320 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +320 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +320 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +320 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +320 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +320 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +320 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +320 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +320 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +320 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +320 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +320 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +320 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +320 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +320 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +320 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +320 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +320 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +320 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +320 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +320 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +320 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +320 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +320 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +320 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +320 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +320 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +320 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +320 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +320 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +832 -782
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +320 -0
- package/dist/locales/de.json +320 -0
- package/dist/locales/el.json +320 -0
- package/dist/locales/en.json +320 -0
- package/dist/locales/es.json +320 -0
- package/dist/locales/fr.json +320 -0
- package/dist/locales/hi.json +320 -0
- package/dist/locales/it.json +320 -0
- package/dist/locales/ja.json +320 -0
- package/dist/locales/nl.json +320 -0
- package/dist/locales/pl.json +320 -0
- package/dist/locales/pt.json +320 -0
- package/dist/locales/ro.json +320 -0
- package/dist/locales/ru.json +320 -0
- package/dist/locales/sq.json +320 -0
- package/dist/locales/sv.json +320 -0
- package/dist/locales/tr.json +320 -0
- package/dist/locales/zh.json +320 -0
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/signature-request/index.d.ts +3 -0
- package/dist/patterns/signature-request/index.d.ts.map +1 -0
- package/dist/patterns/signature-request/index.js +5 -0
- package/dist/patterns/signature-request/index.js.map +1 -0
- package/dist/patterns/signature-request/signature-request.d.ts +81 -0
- package/dist/patterns/signature-request/signature-request.d.ts.map +1 -0
- package/dist/tokens.css +1 -1
- package/package.json +29 -1
- package/dist/_chunks/columns-2-8lq4-b8e.js +0 -15
- package/dist/_chunks/columns-2-8lq4-b8e.js.map +0 -1
- package/dist/_chunks/file-upload-B2SXhRiN.js.map +0 -1
- package/dist/_chunks/link-cell-renderer-CLI7sBkX.js +0 -2210
- package/dist/_chunks/link-cell-renderer-CLI7sBkX.js.map +0 -1
- package/dist/_chunks/patient-table-B_mOe-ZT.js.map +0 -1
- package/dist/_chunks/rich-text-editor-CgA2bYwi.js.map +0 -1
- package/dist/_chunks/sidebar-CtU35PIX.js.map +0 -1
- package/dist/_chunks/tooth-scheme-CX49GycY.js +0 -2133
- package/dist/_chunks/tooth-scheme-CX49GycY.js.map +0 -1
|
@@ -0,0 +1,1546 @@
|
|
|
1
|
+
import { jsx as n, jsxs as O } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as B, forwardRef as P, useState as A, useCallback as k, useEffect as $, useRef as ye, createContext as ve, useContext as xe, isValidElement as Ce, cloneElement as Se, useImperativeHandle as at } from "react";
|
|
3
|
+
import { S as rt } from "./skeleton-CZbwyJAA.js";
|
|
4
|
+
import { E as nt } from "./empty-state-CrLsi0XI.js";
|
|
5
|
+
import { c as ot } from "./index-D2ZczOXr.js";
|
|
6
|
+
import { useTranslation as w } from "react-i18next";
|
|
7
|
+
import { useGridFilter as it, AgGridReact as st } from "ag-grid-react";
|
|
8
|
+
import { ModuleRegistry as lt, AllCommunityModule as dt } from "ag-grid-community";
|
|
9
|
+
import { I as we } from "./icon-button-group-C_lqXTAj.js";
|
|
10
|
+
import { B as J } from "./button-CPGiR_bH.js";
|
|
11
|
+
import { I as q } from "./icon-button-C_kbcd7I.js";
|
|
12
|
+
import { P as Z } from "./popover-Cc0a69sw.js";
|
|
13
|
+
import { C as ct } from "./checkbox-BuZ1u__2.js";
|
|
14
|
+
import { T as ie } from "./text-input-CUvCb6ST.js";
|
|
15
|
+
import { T as he } from "./tag-3wgkwwDB.js";
|
|
16
|
+
import { D as j } from "./dropdown-menu-DU-Hrf33.js";
|
|
17
|
+
import { X as Ne } from "./x-B5YnXwCz.js";
|
|
18
|
+
import { R as ut } from "./refresh-cw-DnI0cLFC.js";
|
|
19
|
+
import { S as se } from "./search-QbWPlY5f.js";
|
|
20
|
+
import { c as pt } from "./createLucideIcon-DhHxpK9K.js";
|
|
21
|
+
import { G as mt } from "./grip-vertical-onSb1JXO.js";
|
|
22
|
+
import { P as ft } from "./printer-rkK0T1gi.js";
|
|
23
|
+
import { F as Ie } from "./file-text-5yv6r2ls.js";
|
|
24
|
+
import { D as ee } from "./download-CfYKJO_j.js";
|
|
25
|
+
import { F as gt } from "./file-spreadsheet-DmwyfV4O.js";
|
|
26
|
+
import bt from "i18next";
|
|
27
|
+
import { S as ht } from "./select-BW5ecXlX.js";
|
|
28
|
+
import { u as Tt } from "./registry-DvAUVLHh.js";
|
|
29
|
+
import { u as yt } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
30
|
+
import { u as vt } from "./use-theme-CAuo6EYT.js";
|
|
31
|
+
import { E as xt } from "./ellipsis-dRo9ouSU.js";
|
|
32
|
+
/**
|
|
33
|
+
* @license lucide-react v1.22.0 - ISC
|
|
34
|
+
*
|
|
35
|
+
* This source code is licensed under the ISC license.
|
|
36
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
+
*/
|
|
38
|
+
const Ct = [
|
|
39
|
+
["path", { d: "M10.5 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v5.5", key: "1g2yzs" }],
|
|
40
|
+
["path", { d: "m14.3 19.6 1-.4", key: "11sv9r" }],
|
|
41
|
+
["path", { d: "M15 3v7.5", key: "7lm50a" }],
|
|
42
|
+
["path", { d: "m15.2 16.9-.9-.3", key: "1t7mvx" }],
|
|
43
|
+
["path", { d: "m16.6 21.7.3-.9", key: "1j67ps" }],
|
|
44
|
+
["path", { d: "m16.8 15.3-.4-1", key: "1ei7r6" }],
|
|
45
|
+
["path", { d: "m19.1 15.2.3-.9", key: "18r7jp" }],
|
|
46
|
+
["path", { d: "m19.6 21.7-.4-1", key: "z2vh2" }],
|
|
47
|
+
["path", { d: "m20.7 16.8 1-.4", key: "19m87a" }],
|
|
48
|
+
["path", { d: "m21.7 19.4-.9-.3", key: "1qgwi9" }],
|
|
49
|
+
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
50
|
+
["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }]
|
|
51
|
+
], St = pt("columns-3-cog", Ct);
|
|
52
|
+
function wt(e) {
|
|
53
|
+
if (!Ce(e)) return e;
|
|
54
|
+
const t = e, a = t.props.className ?? "", r = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} ds:size-4`.trim();
|
|
55
|
+
return Se(t, { className: r, size: t.props.size ?? 16 });
|
|
56
|
+
}
|
|
57
|
+
const De = ve(null);
|
|
58
|
+
function G(e) {
|
|
59
|
+
const t = xe(De);
|
|
60
|
+
if (!t)
|
|
61
|
+
throw new Error(
|
|
62
|
+
`${e} must be rendered inside <DataTable.Toolbar> as a descendant of <DataTable>.`
|
|
63
|
+
);
|
|
64
|
+
return t;
|
|
65
|
+
}
|
|
66
|
+
function Nt({
|
|
67
|
+
getApi: e,
|
|
68
|
+
selectionCount: t,
|
|
69
|
+
onPrint: a,
|
|
70
|
+
children: r
|
|
71
|
+
}) {
|
|
72
|
+
const o = B(
|
|
73
|
+
() => ({ getApi: e, selectionCount: t, onPrint: a }),
|
|
74
|
+
[e, t, a]
|
|
75
|
+
);
|
|
76
|
+
return /* @__PURE__ */ n(De.Provider, { value: o, children: r });
|
|
77
|
+
}
|
|
78
|
+
const It = [
|
|
79
|
+
"data-table-toolbar",
|
|
80
|
+
// Mobile (<sm) keeps `flex-wrap` so a wide QuickSearch can flow above the
|
|
81
|
+
// Actions cluster on narrow screens. From `sm` (≥640px) we switch to
|
|
82
|
+
// `flex-nowrap` + `min-w-0` so the row stays single-line at every common
|
|
83
|
+
// desktop width (1024 / 1280 / 1440) — the QuickSearch slot shrinks via
|
|
84
|
+
// its own `min-w-0` instead of pushing the trailing Actions to a new row.
|
|
85
|
+
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
86
|
+
"ds:sm:flex-nowrap ds:min-w-0"
|
|
87
|
+
// No card surface: the toolbar sits directly on the page background,
|
|
88
|
+
// matching the header-tools layout the Patients / Care Plan List
|
|
89
|
+
// patterns established (the old bg-card + border + shadow bar is gone).
|
|
90
|
+
].join(" "), Fe = P(
|
|
91
|
+
({ className: e, children: t, ...a }, r) => /* @__PURE__ */ n(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
ref: r,
|
|
95
|
+
role: "toolbar",
|
|
96
|
+
className: [It, e ?? ""].join(" ").trim(),
|
|
97
|
+
...a,
|
|
98
|
+
children: t
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
);
|
|
102
|
+
Fe.displayName = "DataTable.Toolbar";
|
|
103
|
+
const Re = P(
|
|
104
|
+
({ className: e, children: t, ...a }, r) => /* @__PURE__ */ n(
|
|
105
|
+
"div",
|
|
106
|
+
{
|
|
107
|
+
ref: r,
|
|
108
|
+
className: [
|
|
109
|
+
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
110
|
+
// `grow` lets FilterBar absorb the free space; `min-w-0` lets the
|
|
111
|
+
// QuickSearch slot inside shrink below its intrinsic width when the
|
|
112
|
+
// toolbar runs `flex-nowrap` at `sm` and above, so the trailing
|
|
113
|
+
// Actions cluster stays pinned on a single row.
|
|
114
|
+
"ds:grow ds:min-w-0",
|
|
115
|
+
e ?? ""
|
|
116
|
+
].join(" ").trim(),
|
|
117
|
+
...a,
|
|
118
|
+
children: t
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
);
|
|
122
|
+
Re.displayName = "DataTable.Toolbar.FilterBar";
|
|
123
|
+
const ke = P(
|
|
124
|
+
({ className: e, children: t, ...a }, r) => /* @__PURE__ */ n(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
ref: r,
|
|
128
|
+
className: [
|
|
129
|
+
"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
130
|
+
"ds:ms-auto",
|
|
131
|
+
e ?? ""
|
|
132
|
+
].join(" ").trim(),
|
|
133
|
+
...a,
|
|
134
|
+
children: t
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
);
|
|
138
|
+
ke.displayName = "DataTable.Toolbar.Actions";
|
|
139
|
+
const le = P(
|
|
140
|
+
({ label: e, onExport: t, intent: a = "outline", ...r }, o) => {
|
|
141
|
+
const { t: s } = w(), { getApi: c } = G("DataTable.Toolbar.ExportCsv"), f = k(() => {
|
|
142
|
+
const d = c();
|
|
143
|
+
d && (t ? t(d) : d.exportDataAsCsv());
|
|
144
|
+
}, [c, t]);
|
|
145
|
+
return /* @__PURE__ */ n(
|
|
146
|
+
q,
|
|
147
|
+
{
|
|
148
|
+
ref: o,
|
|
149
|
+
type: "button",
|
|
150
|
+
intent: a,
|
|
151
|
+
icon: /* @__PURE__ */ n(ee, { "aria-hidden": !0 }),
|
|
152
|
+
tooltip: e ?? s("dataTable.exportCsv"),
|
|
153
|
+
onClick: f,
|
|
154
|
+
...r
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
le.displayName = "DataTable.Toolbar.ExportCsv";
|
|
160
|
+
function U(e, t = [30, 30, 30]) {
|
|
161
|
+
if (typeof document > "u") return t;
|
|
162
|
+
const a = document.createElement("span");
|
|
163
|
+
a.style.color = `hsl(var(${e}))`, a.style.position = "absolute", a.style.visibility = "hidden", document.body.appendChild(a);
|
|
164
|
+
const r = getComputedStyle(a).color;
|
|
165
|
+
document.body.removeChild(a);
|
|
166
|
+
const o = r.match(/rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)/i);
|
|
167
|
+
return o ? [Number(o[1]), Number(o[2]), Number(o[3])] : t;
|
|
168
|
+
}
|
|
169
|
+
async function Ae(e, t) {
|
|
170
|
+
if (!e) return;
|
|
171
|
+
const [{ jsPDF: a }, { default: r }] = await Promise.all([
|
|
172
|
+
import("./jspdf.es.min-DaapWjR1.js").then((b) => b.j),
|
|
173
|
+
import("./jspdf.plugin.autotable-CSiDNyPn.js")
|
|
174
|
+
]), s = (e.getColumns() ?? []).filter((b) => b.isVisible()), c = [
|
|
175
|
+
s.map((b) => e.getDisplayNameForColumn(b, null) ?? "")
|
|
176
|
+
], f = [];
|
|
177
|
+
e.forEachNodeAfterFilterAndSort((b) => {
|
|
178
|
+
if (!b.data) return;
|
|
179
|
+
const T = s.map((g) => {
|
|
180
|
+
const N = e.getCellValue({
|
|
181
|
+
rowNode: b,
|
|
182
|
+
colKey: g,
|
|
183
|
+
useFormatter: !0
|
|
184
|
+
});
|
|
185
|
+
return N == null ? "" : String(N);
|
|
186
|
+
});
|
|
187
|
+
f.push(T);
|
|
188
|
+
});
|
|
189
|
+
const d = U("--muted", [240, 240, 240]), u = U("--foreground", [30, 30, 30]), i = U("--card-foreground", [30, 30, 30]), p = U("--card", [250, 250, 250]), y = new a({ orientation: "landscape" });
|
|
190
|
+
r(y, {
|
|
191
|
+
head: c,
|
|
192
|
+
body: f,
|
|
193
|
+
headStyles: { fillColor: d, textColor: u },
|
|
194
|
+
bodyStyles: { textColor: i },
|
|
195
|
+
alternateRowStyles: { fillColor: p },
|
|
196
|
+
styles: {
|
|
197
|
+
font: "helvetica",
|
|
198
|
+
fontSize: 10,
|
|
199
|
+
cellPadding: 4
|
|
200
|
+
}
|
|
201
|
+
}), y.save(t.fileName);
|
|
202
|
+
}
|
|
203
|
+
const de = P(
|
|
204
|
+
({ label: e, onClick: t, fileName: a, intent: r = "outline", ...o }, s) => {
|
|
205
|
+
const { t: c } = w(), { getApi: f } = G("DataTable.Toolbar.ExportPdf"), d = k(() => {
|
|
206
|
+
const u = f();
|
|
207
|
+
if (t) {
|
|
208
|
+
t(u);
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
Ae(u, {
|
|
212
|
+
fileName: a ?? "data-table-export.pdf"
|
|
213
|
+
});
|
|
214
|
+
}, [f, t, a]);
|
|
215
|
+
return /* @__PURE__ */ n(
|
|
216
|
+
q,
|
|
217
|
+
{
|
|
218
|
+
ref: s,
|
|
219
|
+
type: "button",
|
|
220
|
+
intent: r,
|
|
221
|
+
icon: /* @__PURE__ */ n(Ie, { "aria-hidden": !0 }),
|
|
222
|
+
tooltip: e ?? c("dataTable.exportPdf"),
|
|
223
|
+
onClick: d,
|
|
224
|
+
...o
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
de.displayName = "DataTable.Toolbar.ExportPdf";
|
|
230
|
+
const ce = P(
|
|
231
|
+
({ label: e, intent: t = "outline", ...a }, r) => {
|
|
232
|
+
const { t: o } = w(), { onPrint: s } = G("DataTable.Toolbar.Print");
|
|
233
|
+
return /* @__PURE__ */ n(
|
|
234
|
+
q,
|
|
235
|
+
{
|
|
236
|
+
ref: r,
|
|
237
|
+
type: "button",
|
|
238
|
+
intent: t,
|
|
239
|
+
icon: /* @__PURE__ */ n(ft, { "aria-hidden": !0 }),
|
|
240
|
+
tooltip: e ?? o("dataTable.print"),
|
|
241
|
+
onClick: s,
|
|
242
|
+
...a
|
|
243
|
+
}
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
ce.displayName = "DataTable.Toolbar.Print";
|
|
248
|
+
const Ee = ({ placeholder: e, debounceMs: t = 150 }) => {
|
|
249
|
+
const { t: a } = w(), { getApi: r } = G("DataTable.Toolbar.QuickSearch"), [o, s] = A(""), c = ye(void 0);
|
|
250
|
+
return $(() => (c.current && window.clearTimeout(c.current), c.current = window.setTimeout(() => {
|
|
251
|
+
const f = r();
|
|
252
|
+
f && f.setGridOption("quickFilterText", o);
|
|
253
|
+
}, t), () => {
|
|
254
|
+
c.current && window.clearTimeout(c.current);
|
|
255
|
+
}), [o, t, r]), // Slot wrapper caps the search at a sensible legible width on desktop —
|
|
256
|
+
// without this, TextInput's `w-full` lets the QuickSearch absorb the
|
|
257
|
+
// entire FilterBar row and push trailing Actions onto a second line at
|
|
258
|
+
// 1024 / 1280 / 1440. `min-w-0` lets the slot shrink below `24rem` when
|
|
259
|
+
// the toolbar is squeezed on narrow viewports. There is no
|
|
260
|
+
// `--toolbar-search-max` token in the kit yet — see this component's
|
|
261
|
+
// summary for a follow-up note recommending we add one.
|
|
262
|
+
/* @__PURE__ */ n("div", { className: "ds:w-full ds:max-w-[24rem] ds:min-w-0", children: /* @__PURE__ */ n(
|
|
263
|
+
ie,
|
|
264
|
+
{
|
|
265
|
+
type: "search",
|
|
266
|
+
size: "sm",
|
|
267
|
+
value: o,
|
|
268
|
+
onChange: (f) => s(f.target.value),
|
|
269
|
+
placeholder: e ?? a("dataTable.quickSearch.placeholder", "Search…"),
|
|
270
|
+
startAdornment: /* @__PURE__ */ n(se, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
271
|
+
clearable: !0,
|
|
272
|
+
onClear: () => s(""),
|
|
273
|
+
"aria-label": a("dataTable.quickSearch.label", "Quick search")
|
|
274
|
+
}
|
|
275
|
+
) });
|
|
276
|
+
};
|
|
277
|
+
Ee.displayName = "DataTable.Toolbar.QuickSearch";
|
|
278
|
+
const ue = P(
|
|
279
|
+
({ onRefresh: e, label: t, intent: a = "outline", ...r }, o) => {
|
|
280
|
+
const { t: s } = w();
|
|
281
|
+
return /* @__PURE__ */ n(
|
|
282
|
+
q,
|
|
283
|
+
{
|
|
284
|
+
ref: o,
|
|
285
|
+
type: "button",
|
|
286
|
+
intent: a,
|
|
287
|
+
icon: /* @__PURE__ */ n(ut, { "aria-hidden": !0 }),
|
|
288
|
+
tooltip: t ?? s("dataTable.refresh", "Refresh"),
|
|
289
|
+
onClick: e,
|
|
290
|
+
...r
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
);
|
|
295
|
+
ue.displayName = "DataTable.Toolbar.Refresh";
|
|
296
|
+
function Dt(e) {
|
|
297
|
+
if (!e || typeof e != "object") return "";
|
|
298
|
+
const t = e;
|
|
299
|
+
if (typeof t.filter == "string" || typeof t.filter == "number") {
|
|
300
|
+
const a = typeof t.type == "string" ? t.type : "", r = typeof t.filterTo == "string" || typeof t.filterTo == "number" ? String(t.filterTo) : "";
|
|
301
|
+
return a === "inRange" && r ? `${t.filter} – ${r}` : a ? `${a} ${t.filter}` : String(t.filter);
|
|
302
|
+
}
|
|
303
|
+
return typeof t.dateFrom == "string" ? typeof t.dateTo == "string" && t.dateTo ? `${t.dateFrom} – ${t.dateTo}` : String(t.dateFrom) : Array.isArray(t.values) ? t.values.map(String).join(", ") : "";
|
|
304
|
+
}
|
|
305
|
+
const Oe = () => {
|
|
306
|
+
const { t: e } = w(), { getApi: t } = G("DataTable.Toolbar.FilterChips"), [a, r] = A([]), [o, s] = A(""), c = k(() => {
|
|
307
|
+
const i = t();
|
|
308
|
+
if (!i) {
|
|
309
|
+
r([]), s("");
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
const p = i.getFilterModel() ?? {}, y = i.getColumns() ?? [], b = [];
|
|
313
|
+
for (const g of Object.keys(p)) {
|
|
314
|
+
const N = y.find((D) => D.getColId() === g), x = i.getDisplayNameForColumn(N, null) ?? g;
|
|
315
|
+
b.push({
|
|
316
|
+
colId: g,
|
|
317
|
+
headerName: x,
|
|
318
|
+
text: Dt(p[g])
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
r(b);
|
|
322
|
+
const T = i.getGridOption("quickFilterText");
|
|
323
|
+
s(typeof T == "string" ? T : "");
|
|
324
|
+
}, [t]);
|
|
325
|
+
if ($(() => {
|
|
326
|
+
let i;
|
|
327
|
+
const p = (T) => c(), y = (T) => {
|
|
328
|
+
T.addEventListener("filterChanged", p), c(), i = () => T.removeEventListener("filterChanged", p);
|
|
329
|
+
}, b = t();
|
|
330
|
+
if (b)
|
|
331
|
+
y(b);
|
|
332
|
+
else {
|
|
333
|
+
const T = window.setInterval(() => {
|
|
334
|
+
const g = t();
|
|
335
|
+
g && (window.clearInterval(T), y(g));
|
|
336
|
+
}, 50);
|
|
337
|
+
i = () => window.clearInterval(T);
|
|
338
|
+
}
|
|
339
|
+
return () => i == null ? void 0 : i();
|
|
340
|
+
}, [t, c]), a.length + (o ? 1 : 0) === 0) return null;
|
|
341
|
+
function d(i) {
|
|
342
|
+
const p = t();
|
|
343
|
+
p && p.destroyFilter(i);
|
|
344
|
+
}
|
|
345
|
+
function u() {
|
|
346
|
+
const i = t();
|
|
347
|
+
i && (i.setFilterModel(null), i.setGridOption("quickFilterText", ""), s(""));
|
|
348
|
+
}
|
|
349
|
+
return /* @__PURE__ */ O(
|
|
350
|
+
"div",
|
|
351
|
+
{
|
|
352
|
+
role: "group",
|
|
353
|
+
"aria-label": e("dataTable.filterChips.label", "Active filters"),
|
|
354
|
+
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
355
|
+
children: [
|
|
356
|
+
o && /* @__PURE__ */ n(
|
|
357
|
+
he,
|
|
358
|
+
{
|
|
359
|
+
label: `${e("dataTable.quickSearch.label", "Quick search")}: ${o}`,
|
|
360
|
+
size: "sm",
|
|
361
|
+
fill: "outline",
|
|
362
|
+
onRemove: () => {
|
|
363
|
+
const i = t();
|
|
364
|
+
i == null || i.setGridOption("quickFilterText", ""), s("");
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
),
|
|
368
|
+
a.map((i) => /* @__PURE__ */ n(
|
|
369
|
+
he,
|
|
370
|
+
{
|
|
371
|
+
label: i.text ? `${i.headerName}: ${i.text}` : i.headerName,
|
|
372
|
+
size: "sm",
|
|
373
|
+
fill: "outline",
|
|
374
|
+
onRemove: () => d(i.colId)
|
|
375
|
+
},
|
|
376
|
+
i.colId
|
|
377
|
+
)),
|
|
378
|
+
/* @__PURE__ */ n(
|
|
379
|
+
J,
|
|
380
|
+
{
|
|
381
|
+
type: "button",
|
|
382
|
+
intent: "ghost",
|
|
383
|
+
size: "sm",
|
|
384
|
+
onClick: u,
|
|
385
|
+
startIcon: /* @__PURE__ */ n(Ne, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
386
|
+
children: e("dataTable.filterChips.clearAll", "Clear all")
|
|
387
|
+
}
|
|
388
|
+
)
|
|
389
|
+
]
|
|
390
|
+
}
|
|
391
|
+
);
|
|
392
|
+
};
|
|
393
|
+
Oe.displayName = "DataTable.Toolbar.FilterChips";
|
|
394
|
+
const Pe = ({
|
|
395
|
+
field: e,
|
|
396
|
+
options: t,
|
|
397
|
+
label: a
|
|
398
|
+
}) => {
|
|
399
|
+
const { t: r } = w(), { getApi: o } = G("DataTable.Toolbar.FacetFilter"), [s, c] = A(null);
|
|
400
|
+
function f(d) {
|
|
401
|
+
c(d);
|
|
402
|
+
const u = o();
|
|
403
|
+
if (u) {
|
|
404
|
+
if (d === null) {
|
|
405
|
+
u.destroyFilter(e);
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
u.setColumnFilterModel(e, {
|
|
409
|
+
type: "equals",
|
|
410
|
+
filter: d
|
|
411
|
+
}), u.onFilterChanged();
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
return /* @__PURE__ */ n(
|
|
415
|
+
"div",
|
|
416
|
+
{
|
|
417
|
+
role: "group",
|
|
418
|
+
"aria-label": a ?? r("dataTable.facetFilter.label", "Filter"),
|
|
419
|
+
className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
420
|
+
children: t.map((d) => {
|
|
421
|
+
const u = s === d.value;
|
|
422
|
+
return /* @__PURE__ */ n(
|
|
423
|
+
J,
|
|
424
|
+
{
|
|
425
|
+
type: "button",
|
|
426
|
+
size: "sm",
|
|
427
|
+
intent: u ? "primary" : "secondary",
|
|
428
|
+
"aria-pressed": u,
|
|
429
|
+
onClick: () => f(d.value),
|
|
430
|
+
children: d.label
|
|
431
|
+
},
|
|
432
|
+
String(d.value)
|
|
433
|
+
);
|
|
434
|
+
})
|
|
435
|
+
}
|
|
436
|
+
);
|
|
437
|
+
};
|
|
438
|
+
Pe.displayName = "DataTable.Toolbar.FacetFilter";
|
|
439
|
+
const Ft = ["csv", "xlsx", "pdf"];
|
|
440
|
+
async function Rt(e, t) {
|
|
441
|
+
if (!e) return;
|
|
442
|
+
const a = await import("./exceljs.min-DUJ-5CGx.js").then((g) => g.e), r = new a.Workbook(), o = r.addWorksheet("Sheet1"), c = (e.getColumns() ?? []).filter((g) => g.isVisible());
|
|
443
|
+
o.addRow(
|
|
444
|
+
c.map(
|
|
445
|
+
(g) => e.getDisplayNameForColumn(g, null) ?? g.getColId()
|
|
446
|
+
)
|
|
447
|
+
), e.forEachNodeAfterFilterAndSort((g) => {
|
|
448
|
+
g.data && o.addRow(
|
|
449
|
+
c.map((N) => {
|
|
450
|
+
const x = e.getCellValue({
|
|
451
|
+
rowNode: g,
|
|
452
|
+
colKey: N,
|
|
453
|
+
useFormatter: !0
|
|
454
|
+
});
|
|
455
|
+
return x ?? "";
|
|
456
|
+
})
|
|
457
|
+
);
|
|
458
|
+
});
|
|
459
|
+
const f = U("--muted", [240, 240, 240]), d = U("--foreground", [30, 30, 30]), u = o.getRow(1), i = ([g, N, x]) => `${g.toString(16).padStart(2, "0")}${N.toString(16).padStart(2, "0")}${x.toString(16).padStart(2, "0")}`.toUpperCase();
|
|
460
|
+
u.eachCell((g) => {
|
|
461
|
+
g.font = { bold: !0, color: { argb: `FF${i(d)}` } }, g.fill = {
|
|
462
|
+
type: "pattern",
|
|
463
|
+
pattern: "solid",
|
|
464
|
+
fgColor: { argb: `FF${i(f)}` }
|
|
465
|
+
};
|
|
466
|
+
});
|
|
467
|
+
const p = await r.xlsx.writeBuffer(), y = new Blob([p], {
|
|
468
|
+
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
469
|
+
}), b = URL.createObjectURL(y), T = document.createElement("a");
|
|
470
|
+
T.href = b, T.download = t.fileName, document.body.appendChild(T), T.click(), document.body.removeChild(T), URL.revokeObjectURL(b);
|
|
471
|
+
}
|
|
472
|
+
const ze = ve(null);
|
|
473
|
+
function kt() {
|
|
474
|
+
const e = xe(ze);
|
|
475
|
+
if (!e)
|
|
476
|
+
throw new Error(
|
|
477
|
+
"DataTable.Toolbar.ExportMenu.Item must be rendered inside DataTable.Toolbar.ExportMenu."
|
|
478
|
+
);
|
|
479
|
+
return e;
|
|
480
|
+
}
|
|
481
|
+
const pe = P(
|
|
482
|
+
({ children: e, label: t, intent: a = "outline", ...r }, o) => {
|
|
483
|
+
const { t: s } = w(), { getApi: c } = G("DataTable.Toolbar.ExportMenu"), f = B(() => ({ getApi: c }), [c]), d = e ?? Ft.map((u) => /* @__PURE__ */ n(me, { format: u }, u));
|
|
484
|
+
return /* @__PURE__ */ n(ze.Provider, { value: f, children: /* @__PURE__ */ O(j.Root, { children: [
|
|
485
|
+
/* @__PURE__ */ n(j.Trigger, { asChild: !0, children: /* @__PURE__ */ n(
|
|
486
|
+
q,
|
|
487
|
+
{
|
|
488
|
+
ref: o,
|
|
489
|
+
type: "button",
|
|
490
|
+
intent: a,
|
|
491
|
+
icon: /* @__PURE__ */ n(ee, { "aria-hidden": !0 }),
|
|
492
|
+
tooltip: t ?? s("dataTable.export.menu", "Export"),
|
|
493
|
+
"aria-label": t ?? s("dataTable.export.menu", "Export"),
|
|
494
|
+
"aria-haspopup": "menu",
|
|
495
|
+
...r
|
|
496
|
+
}
|
|
497
|
+
) }),
|
|
498
|
+
/* @__PURE__ */ n(j.Content, { align: "end", sideOffset: 4, children: d })
|
|
499
|
+
] }) });
|
|
500
|
+
}
|
|
501
|
+
);
|
|
502
|
+
pe.displayName = "DataTable.Toolbar.ExportMenu";
|
|
503
|
+
function At(e, t) {
|
|
504
|
+
return t === "csv" ? e("dataTable.export.csv", "Export CSV") : t === "xlsx" ? e("dataTable.export.xlsx", "Export Excel") : t === "pdf" ? e("dataTable.export.pdf", "Export PDF") : e("dataTable.export.custom", "Export");
|
|
505
|
+
}
|
|
506
|
+
function Et(e) {
|
|
507
|
+
return e === "csv" ? /* @__PURE__ */ n(ee, { "aria-hidden": !0, className: "ds:size-4" }) : e === "xlsx" ? /* @__PURE__ */ n(gt, { "aria-hidden": !0, className: "ds:size-4" }) : e === "pdf" ? /* @__PURE__ */ n(Ie, { "aria-hidden": !0, className: "ds:size-4" }) : /* @__PURE__ */ n(ee, { "aria-hidden": !0, className: "ds:size-4" });
|
|
508
|
+
}
|
|
509
|
+
const me = ({
|
|
510
|
+
format: e,
|
|
511
|
+
label: t,
|
|
512
|
+
onClick: a,
|
|
513
|
+
fileName: r
|
|
514
|
+
}) => {
|
|
515
|
+
const { t: o } = w(), { getApi: s } = kt(), c = k(() => {
|
|
516
|
+
const f = s();
|
|
517
|
+
if (e === "csv") {
|
|
518
|
+
f == null || f.exportDataAsCsv();
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
if (e === "pdf") {
|
|
522
|
+
Ae(f, {
|
|
523
|
+
fileName: r ?? "data-table-export.pdf"
|
|
524
|
+
});
|
|
525
|
+
return;
|
|
526
|
+
}
|
|
527
|
+
if (e === "xlsx") {
|
|
528
|
+
Rt(f, {
|
|
529
|
+
fileName: r ?? "data-table-export.xlsx"
|
|
530
|
+
});
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
a == null || a(f);
|
|
534
|
+
}, [e, r, a, s]);
|
|
535
|
+
return /* @__PURE__ */ n(j.Item, { onSelect: c, children: /* @__PURE__ */ O("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
536
|
+
Et(e),
|
|
537
|
+
/* @__PURE__ */ n("span", { children: t ?? At(o, e) })
|
|
538
|
+
] }) });
|
|
539
|
+
};
|
|
540
|
+
me.displayName = "DataTable.Toolbar.ExportMenu.Item";
|
|
541
|
+
function Ot(e) {
|
|
542
|
+
return e ? (e.getAllGridColumns() ?? []).map((a) => a.getColDef().hide === void 0 && a.getColId().startsWith("ag-Grid-") ? null : {
|
|
543
|
+
colId: a.getColId(),
|
|
544
|
+
displayName: e.getDisplayNameForColumn(a, null) || a.getColId(),
|
|
545
|
+
visible: a.isVisible()
|
|
546
|
+
}).filter((a) => a !== null) : [];
|
|
547
|
+
}
|
|
548
|
+
const fe = P(
|
|
549
|
+
function({ label: t, icon: a, footer: r, header: o, intent: s = "outline", ...c }, f) {
|
|
550
|
+
const { t: d } = w(), { getApi: u } = G("DataTable.Toolbar.ColumnToggle"), [i, p] = A(!1), [y, b] = A([]), [T, g] = A(null), [N, x] = A(null);
|
|
551
|
+
$(() => {
|
|
552
|
+
i && b(Ot(u()));
|
|
553
|
+
}, [i, u]);
|
|
554
|
+
const D = k(
|
|
555
|
+
(C, M) => {
|
|
556
|
+
const R = u();
|
|
557
|
+
R && (R.setColumnsVisible([C], M), b(
|
|
558
|
+
(S) => S.map(
|
|
559
|
+
(h) => h.colId === C ? { ...h, visible: M } : h
|
|
560
|
+
)
|
|
561
|
+
));
|
|
562
|
+
},
|
|
563
|
+
[u]
|
|
564
|
+
), z = k(
|
|
565
|
+
(C, M) => {
|
|
566
|
+
if (C === M) return;
|
|
567
|
+
const R = u();
|
|
568
|
+
if (!R) return;
|
|
569
|
+
b((h) => {
|
|
570
|
+
const K = h.findIndex((Q) => Q.colId === C), X = h.findIndex((Q) => Q.colId === M);
|
|
571
|
+
if (K < 0 || X < 0) return h;
|
|
572
|
+
const _ = [...h], [H] = _.splice(K, 1);
|
|
573
|
+
return _.splice(X, 0, H), _;
|
|
574
|
+
});
|
|
575
|
+
const S = y.findIndex((h) => h.colId === M);
|
|
576
|
+
S >= 0 && R.moveColumns([C], S);
|
|
577
|
+
},
|
|
578
|
+
[u, y]
|
|
579
|
+
), W = t ?? d("dataTable.columnToggle");
|
|
580
|
+
return /* @__PURE__ */ O(Z.Root, { open: i, onOpenChange: p, children: [
|
|
581
|
+
/* @__PURE__ */ n(Z.Trigger, { asChild: !0, children: /* @__PURE__ */ n(
|
|
582
|
+
q,
|
|
583
|
+
{
|
|
584
|
+
ref: f,
|
|
585
|
+
type: "button",
|
|
586
|
+
intent: s,
|
|
587
|
+
icon: a ?? /* @__PURE__ */ n(St, { "aria-hidden": !0 }),
|
|
588
|
+
tooltip: W,
|
|
589
|
+
"aria-label": W,
|
|
590
|
+
"aria-haspopup": "dialog",
|
|
591
|
+
...c
|
|
592
|
+
}
|
|
593
|
+
) }),
|
|
594
|
+
/* @__PURE__ */ O(Z.Content, { size: "sm", align: "end", children: [
|
|
595
|
+
/* @__PURE__ */ n(Z.Heading, { children: W }),
|
|
596
|
+
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,
|
|
597
|
+
/* @__PURE__ */ n(
|
|
598
|
+
"ul",
|
|
599
|
+
{
|
|
600
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
601
|
+
"aria-label": W,
|
|
602
|
+
children: y.map((C) => {
|
|
603
|
+
const M = T === C.colId, R = N === C.colId && T !== C.colId;
|
|
604
|
+
return /* @__PURE__ */ O(
|
|
605
|
+
"li",
|
|
606
|
+
{
|
|
607
|
+
draggable: !0,
|
|
608
|
+
onDragStart: (S) => {
|
|
609
|
+
g(C.colId), S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", C.colId);
|
|
610
|
+
},
|
|
611
|
+
onDragOver: (S) => {
|
|
612
|
+
S.preventDefault(), S.dataTransfer.dropEffect = "move", x(C.colId);
|
|
613
|
+
},
|
|
614
|
+
onDragLeave: () => {
|
|
615
|
+
x(
|
|
616
|
+
(S) => S === C.colId ? null : S
|
|
617
|
+
);
|
|
618
|
+
},
|
|
619
|
+
onDrop: (S) => {
|
|
620
|
+
S.preventDefault();
|
|
621
|
+
const h = S.dataTransfer.getData("text/plain");
|
|
622
|
+
h && z(h, C.colId), g(null), x(null);
|
|
623
|
+
},
|
|
624
|
+
onDragEnd: () => {
|
|
625
|
+
g(null), x(null);
|
|
626
|
+
},
|
|
627
|
+
className: [
|
|
628
|
+
"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",
|
|
629
|
+
M ? "ds:opacity-50" : "",
|
|
630
|
+
R ? "ds:bg-[color:color-mix(in_srgb,var(--primary)_8%,transparent)]" : ""
|
|
631
|
+
].filter(Boolean).join(" "),
|
|
632
|
+
children: [
|
|
633
|
+
/* @__PURE__ */ n(
|
|
634
|
+
"span",
|
|
635
|
+
{
|
|
636
|
+
"aria-hidden": "true",
|
|
637
|
+
className: "ds:cursor-grab ds:text-[color:var(--muted-foreground)] ds:active:cursor-grabbing",
|
|
638
|
+
children: /* @__PURE__ */ n(mt, { className: "ds:size-4" })
|
|
639
|
+
}
|
|
640
|
+
),
|
|
641
|
+
/* @__PURE__ */ n(
|
|
642
|
+
ct,
|
|
643
|
+
{
|
|
644
|
+
label: C.displayName,
|
|
645
|
+
checked: C.visible,
|
|
646
|
+
onCheckedChange: (S) => D(C.colId, S === !0)
|
|
647
|
+
}
|
|
648
|
+
)
|
|
649
|
+
]
|
|
650
|
+
},
|
|
651
|
+
C.colId
|
|
652
|
+
);
|
|
653
|
+
})
|
|
654
|
+
}
|
|
655
|
+
),
|
|
656
|
+
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
|
|
657
|
+
] })
|
|
658
|
+
] });
|
|
659
|
+
}
|
|
660
|
+
);
|
|
661
|
+
fe.displayName = "DataTable.Toolbar.ColumnToggle";
|
|
662
|
+
const Me = P(
|
|
663
|
+
({ label: e, icon: t, onClick: a, variant: r = "default", size: o = "sm", ...s }, c) => {
|
|
664
|
+
const { t: f } = w(), { getApi: d, selectionCount: u } = G(
|
|
665
|
+
"DataTable.Toolbar.BulkAction"
|
|
666
|
+
);
|
|
667
|
+
return u === 0 ? null : /* @__PURE__ */ O(
|
|
668
|
+
J,
|
|
669
|
+
{
|
|
670
|
+
ref: c,
|
|
671
|
+
type: "button",
|
|
672
|
+
intent: r === "destructive" ? "destructive" : "secondary",
|
|
673
|
+
size: o,
|
|
674
|
+
startIcon: wt(t),
|
|
675
|
+
onClick: () => a(d()),
|
|
676
|
+
"aria-label": `${e} (${f("dataTable.bulkAction", { count: u })})`,
|
|
677
|
+
...s,
|
|
678
|
+
children: [
|
|
679
|
+
/* @__PURE__ */ n("span", { children: e }),
|
|
680
|
+
/* @__PURE__ */ n(
|
|
681
|
+
"span",
|
|
682
|
+
{
|
|
683
|
+
"aria-hidden": "true",
|
|
684
|
+
className: "ds:ms-[var(--spacing-xs)] ds:opacity-80",
|
|
685
|
+
children: f("dataTable.bulkAction", { count: u })
|
|
686
|
+
}
|
|
687
|
+
)
|
|
688
|
+
]
|
|
689
|
+
}
|
|
690
|
+
);
|
|
691
|
+
}
|
|
692
|
+
);
|
|
693
|
+
Me.displayName = "DataTable.Toolbar.BulkAction";
|
|
694
|
+
for (const e of [
|
|
695
|
+
le,
|
|
696
|
+
de,
|
|
697
|
+
ce,
|
|
698
|
+
ue,
|
|
699
|
+
pe,
|
|
700
|
+
fe
|
|
701
|
+
])
|
|
702
|
+
e.rendersIconButton = !0;
|
|
703
|
+
const Pt = Object.assign(pe, {
|
|
704
|
+
Item: me
|
|
705
|
+
}), Y = Object.assign(Fe, {
|
|
706
|
+
FilterBar: Re,
|
|
707
|
+
Actions: ke,
|
|
708
|
+
/** @deprecated Use `Toolbar.ExportMenu` with a `csv` item. */
|
|
709
|
+
ExportCsv: le,
|
|
710
|
+
/** @deprecated Use `Toolbar.ExportMenu` with a `pdf` item. */
|
|
711
|
+
ExportPdf: de,
|
|
712
|
+
Print: ce,
|
|
713
|
+
ColumnToggle: fe,
|
|
714
|
+
BulkAction: Me,
|
|
715
|
+
QuickSearch: Ee,
|
|
716
|
+
Refresh: ue,
|
|
717
|
+
FilterChips: Oe,
|
|
718
|
+
FacetFilter: Pe,
|
|
719
|
+
ExportMenu: Pt
|
|
720
|
+
}), zt = [
|
|
721
|
+
"contains",
|
|
722
|
+
"equals",
|
|
723
|
+
"startsWith",
|
|
724
|
+
"endsWith",
|
|
725
|
+
"notContains"
|
|
726
|
+
];
|
|
727
|
+
function Mt(e) {
|
|
728
|
+
const t = new Intl.Collator(e, {
|
|
729
|
+
sensitivity: "base",
|
|
730
|
+
usage: "search"
|
|
731
|
+
});
|
|
732
|
+
function a(r, o) {
|
|
733
|
+
if (o.length === 0) return 0;
|
|
734
|
+
if (o.length > r.length) return -1;
|
|
735
|
+
for (let s = 0; s <= r.length - o.length; s += 1)
|
|
736
|
+
if (t.compare(r.slice(s, s + o.length), o) === 0)
|
|
737
|
+
return s;
|
|
738
|
+
return -1;
|
|
739
|
+
}
|
|
740
|
+
return {
|
|
741
|
+
equals: (r, o) => t.compare(r, o) === 0,
|
|
742
|
+
contains: (r, o) => a(r, o) !== -1,
|
|
743
|
+
startsWith: (r, o) => o.length <= r.length && t.compare(r.slice(0, o.length), o) === 0,
|
|
744
|
+
endsWith: (r, o) => o.length <= r.length && t.compare(
|
|
745
|
+
r.slice(r.length - o.length),
|
|
746
|
+
o
|
|
747
|
+
) === 0
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
function Gt(e) {
|
|
751
|
+
return e == null ? null : typeof e == "string" ? e : String(e);
|
|
752
|
+
}
|
|
753
|
+
function jt(e) {
|
|
754
|
+
const { model: t, onModelChange: a, getValue: r, placeholder: o, defaultOperator: s } = e, { t: c } = w("ui"), f = (t == null ? void 0 : t.type) ?? s ?? "contains", [d, u] = A(f), [i, p] = A((t == null ? void 0 : t.filter) ?? "");
|
|
755
|
+
$(() => {
|
|
756
|
+
u((t == null ? void 0 : t.type) ?? s ?? "contains"), p((t == null ? void 0 : t.filter) ?? "");
|
|
757
|
+
}, [t, s]);
|
|
758
|
+
const y = B(() => Mt(bt.language), []);
|
|
759
|
+
it({
|
|
760
|
+
doesFilterPass: (x) => {
|
|
761
|
+
const D = t;
|
|
762
|
+
if (!D || D.filter === "") return !0;
|
|
763
|
+
const z = Gt(r(x.node));
|
|
764
|
+
if (z === null) return !1;
|
|
765
|
+
switch (D.type) {
|
|
766
|
+
case "equals":
|
|
767
|
+
return y.equals(z, D.filter);
|
|
768
|
+
case "contains":
|
|
769
|
+
return y.contains(z, D.filter);
|
|
770
|
+
case "startsWith":
|
|
771
|
+
return y.startsWith(z, D.filter);
|
|
772
|
+
case "endsWith":
|
|
773
|
+
return y.endsWith(z, D.filter);
|
|
774
|
+
case "notContains":
|
|
775
|
+
return !y.contains(z, D.filter);
|
|
776
|
+
default:
|
|
777
|
+
return !0;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
});
|
|
781
|
+
function b() {
|
|
782
|
+
if (i.trim() === "") {
|
|
783
|
+
a(null);
|
|
784
|
+
return;
|
|
785
|
+
}
|
|
786
|
+
a({ type: d, filter: i });
|
|
787
|
+
}
|
|
788
|
+
function T() {
|
|
789
|
+
p(""), u(s ?? "contains"), a(null);
|
|
790
|
+
}
|
|
791
|
+
const g = zt.map(
|
|
792
|
+
(x) => ({
|
|
793
|
+
value: x,
|
|
794
|
+
label: c(`dataTable.textFilter.operators.${x}`)
|
|
795
|
+
})
|
|
796
|
+
), N = o ?? c("dataTable.textFilter.placeholder");
|
|
797
|
+
return /* @__PURE__ */ O(
|
|
798
|
+
"div",
|
|
799
|
+
{
|
|
800
|
+
"data-component": "text-filter",
|
|
801
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
|
|
802
|
+
children: [
|
|
803
|
+
/* @__PURE__ */ n(
|
|
804
|
+
ht,
|
|
805
|
+
{
|
|
806
|
+
size: "sm",
|
|
807
|
+
options: g,
|
|
808
|
+
value: d,
|
|
809
|
+
onValueChange: (x) => {
|
|
810
|
+
x !== "" && u(x);
|
|
811
|
+
},
|
|
812
|
+
"aria-label": c("dataTable.textFilter.operators.contains")
|
|
813
|
+
}
|
|
814
|
+
),
|
|
815
|
+
/* @__PURE__ */ n(
|
|
816
|
+
ie,
|
|
817
|
+
{
|
|
818
|
+
size: "sm",
|
|
819
|
+
value: i,
|
|
820
|
+
onChange: (x) => p(x.target.value),
|
|
821
|
+
onKeyDown: (x) => {
|
|
822
|
+
x.key === "Enter" && (x.preventDefault(), b());
|
|
823
|
+
},
|
|
824
|
+
placeholder: N,
|
|
825
|
+
"aria-label": N,
|
|
826
|
+
startAdornment: /* @__PURE__ */ n(se, { "aria-hidden": "true", className: "ds:size-4" })
|
|
827
|
+
}
|
|
828
|
+
),
|
|
829
|
+
/* @__PURE__ */ O("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: [
|
|
830
|
+
/* @__PURE__ */ n(J, { intent: "ghost", size: "sm", onClick: T, type: "button", children: c("dataTable.textFilter.clear") }),
|
|
831
|
+
/* @__PURE__ */ n(J, { intent: "primary", size: "sm", onClick: b, type: "button", children: c("dataTable.textFilter.apply") })
|
|
832
|
+
] })
|
|
833
|
+
]
|
|
834
|
+
}
|
|
835
|
+
);
|
|
836
|
+
}
|
|
837
|
+
function qt(e) {
|
|
838
|
+
var p, y;
|
|
839
|
+
const { model: t, onModelChange: a, column: r } = e, { t: o } = w("ui"), s = ((y = (p = r == null ? void 0 : r.getColDef) == null ? void 0 : p.call(r)) == null ? void 0 : y.filterParams) ?? {}, c = s.defaultOperator ?? "contains", f = s.placeholder ?? o("dataTable.textFilter.placeholder"), [d, u] = A((t == null ? void 0 : t.filter) ?? "");
|
|
840
|
+
$(() => {
|
|
841
|
+
u((t == null ? void 0 : t.filter) ?? "");
|
|
842
|
+
}, [t == null ? void 0 : t.filter]), $(() => {
|
|
843
|
+
if (d === ((t == null ? void 0 : t.filter) ?? "")) return;
|
|
844
|
+
const b = setTimeout(() => {
|
|
845
|
+
if (d === "") {
|
|
846
|
+
t && a(null);
|
|
847
|
+
return;
|
|
848
|
+
}
|
|
849
|
+
a({ type: c, filter: d });
|
|
850
|
+
}, 200);
|
|
851
|
+
return () => clearTimeout(b);
|
|
852
|
+
}, [d, c, t, a]);
|
|
853
|
+
function i() {
|
|
854
|
+
u(""), t && a(null);
|
|
855
|
+
}
|
|
856
|
+
return /* @__PURE__ */ n("div", { "data-component": "text-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ n(
|
|
857
|
+
ie,
|
|
858
|
+
{
|
|
859
|
+
size: "sm",
|
|
860
|
+
value: d,
|
|
861
|
+
onChange: (b) => u(b.target.value),
|
|
862
|
+
placeholder: f,
|
|
863
|
+
"aria-label": f,
|
|
864
|
+
startAdornment: /* @__PURE__ */ n(se, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
865
|
+
endAdornment: d.length > 0 ? /* @__PURE__ */ n(
|
|
866
|
+
"button",
|
|
867
|
+
{
|
|
868
|
+
type: "button",
|
|
869
|
+
"aria-label": o("dataTable.textFilter.clear"),
|
|
870
|
+
onClick: i,
|
|
871
|
+
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",
|
|
872
|
+
children: /* @__PURE__ */ n(Ne, { "aria-hidden": "true", className: "ds:size-4" })
|
|
873
|
+
}
|
|
874
|
+
) : void 0
|
|
875
|
+
}
|
|
876
|
+
) });
|
|
877
|
+
}
|
|
878
|
+
const _t = {
|
|
879
|
+
id: "data-table",
|
|
880
|
+
capabilities: [
|
|
881
|
+
"select_single",
|
|
882
|
+
"select_multiple",
|
|
883
|
+
"range_pick",
|
|
884
|
+
"filter",
|
|
885
|
+
"sort",
|
|
886
|
+
"paginate"
|
|
887
|
+
],
|
|
888
|
+
state: {
|
|
889
|
+
selection: {
|
|
890
|
+
type: "string[]",
|
|
891
|
+
descriptionKey: "ui.agent.dataTable.state.selection",
|
|
892
|
+
description: "Row ids of currently-selected rows.",
|
|
893
|
+
read: (e) => e.getSelection()
|
|
894
|
+
},
|
|
895
|
+
filter: {
|
|
896
|
+
type: "object",
|
|
897
|
+
descriptionKey: "ui.agent.dataTable.state.filter",
|
|
898
|
+
description: "Current ag-grid filter model, keyed by column id.",
|
|
899
|
+
read: (e) => e.getFilter()
|
|
900
|
+
},
|
|
901
|
+
sort: {
|
|
902
|
+
type: "Array<{ colId, sort }>",
|
|
903
|
+
descriptionKey: "ui.agent.dataTable.state.sort",
|
|
904
|
+
description: "Active sort, in priority order.",
|
|
905
|
+
read: (e) => e.getSort()
|
|
906
|
+
},
|
|
907
|
+
currentPage: {
|
|
908
|
+
type: "number",
|
|
909
|
+
descriptionKey: "ui.agent.dataTable.state.currentPage",
|
|
910
|
+
description: "Zero-indexed page number.",
|
|
911
|
+
read: (e) => e.getCurrentPage()
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
actions: {
|
|
915
|
+
select_rows: {
|
|
916
|
+
// Transient grid selection (data-table convention) — stays read.
|
|
917
|
+
safety: "read",
|
|
918
|
+
argsType: "{ ids: string[] }",
|
|
919
|
+
argsSchema: {
|
|
920
|
+
type: "object",
|
|
921
|
+
properties: {
|
|
922
|
+
ids: {
|
|
923
|
+
type: "array",
|
|
924
|
+
items: { type: "string" },
|
|
925
|
+
description: "Row ids to select (replaces the current selection)."
|
|
926
|
+
}
|
|
927
|
+
},
|
|
928
|
+
required: ["ids"]
|
|
929
|
+
},
|
|
930
|
+
idempotent: !0,
|
|
931
|
+
descriptionKey: "ui.agent.dataTable.actions.selectRows",
|
|
932
|
+
description: "Replace the current selection with the given row ids.",
|
|
933
|
+
examples: [
|
|
934
|
+
{ args: { ids: ["r-1", "r-2"] }, note: "Select the first two rows." }
|
|
935
|
+
],
|
|
936
|
+
invoke: (e, t) => {
|
|
937
|
+
e.setSelection(t.ids);
|
|
938
|
+
}
|
|
939
|
+
},
|
|
940
|
+
select_range: {
|
|
941
|
+
safety: "read",
|
|
942
|
+
argsType: "{ fromId: string, toId: string }",
|
|
943
|
+
argsSchema: {
|
|
944
|
+
type: "object",
|
|
945
|
+
properties: {
|
|
946
|
+
fromId: { type: "string", description: "Start row id (inclusive)." },
|
|
947
|
+
toId: { type: "string", description: "End row id (inclusive)." }
|
|
948
|
+
},
|
|
949
|
+
required: ["fromId", "toId"]
|
|
950
|
+
},
|
|
951
|
+
idempotent: !0,
|
|
952
|
+
descriptionKey: "ui.agent.dataTable.actions.selectRange",
|
|
953
|
+
description: "Select every row between fromId and toId, inclusive, in current sort order.",
|
|
954
|
+
invoke: (e, t) => {
|
|
955
|
+
e.selectRange(t.fromId, t.toId);
|
|
956
|
+
}
|
|
957
|
+
},
|
|
958
|
+
clear_selection: {
|
|
959
|
+
safety: "read",
|
|
960
|
+
idempotent: !0,
|
|
961
|
+
descriptionKey: "ui.agent.dataTable.actions.clearSelection",
|
|
962
|
+
description: "Deselect all rows.",
|
|
963
|
+
invoke: (e) => {
|
|
964
|
+
e.clearSelection();
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
get_selection: {
|
|
968
|
+
safety: "read",
|
|
969
|
+
returns: "string[]",
|
|
970
|
+
returnsSchema: { type: "array", items: { type: "string" } },
|
|
971
|
+
idempotent: !0,
|
|
972
|
+
descriptionKey: "ui.agent.dataTable.actions.getSelection",
|
|
973
|
+
description: "Return the row ids of the currently-selected rows.",
|
|
974
|
+
invoke: (e) => e.getSelection()
|
|
975
|
+
},
|
|
976
|
+
apply_filter: {
|
|
977
|
+
safety: "read",
|
|
978
|
+
argsType: "{ model: Record<string, unknown> }",
|
|
979
|
+
argsSchema: {
|
|
980
|
+
type: "object",
|
|
981
|
+
properties: {
|
|
982
|
+
model: {
|
|
983
|
+
type: "object",
|
|
984
|
+
description: "ag-grid filter model keyed by column id. Opaque per-column filter shapes; replaces the current model.",
|
|
985
|
+
additionalProperties: !0
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
required: ["model"]
|
|
989
|
+
},
|
|
990
|
+
idempotent: !0,
|
|
991
|
+
descriptionKey: "ui.agent.dataTable.actions.applyFilter",
|
|
992
|
+
description: "Replace the filter model with the given object.",
|
|
993
|
+
invoke: (e, t) => {
|
|
994
|
+
e.setFilter(t.model);
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
sort_by: {
|
|
998
|
+
safety: "read",
|
|
999
|
+
argsType: "{ model: DataTableSortEntry[] }",
|
|
1000
|
+
argsSchema: {
|
|
1001
|
+
type: "object",
|
|
1002
|
+
properties: {
|
|
1003
|
+
model: {
|
|
1004
|
+
type: "array",
|
|
1005
|
+
description: "Sort entries in priority order.",
|
|
1006
|
+
items: {
|
|
1007
|
+
type: "object",
|
|
1008
|
+
properties: {
|
|
1009
|
+
colId: { type: "string", description: "Column id to sort by." },
|
|
1010
|
+
sort: { enum: ["asc", "desc"], description: "Sort direction." }
|
|
1011
|
+
},
|
|
1012
|
+
required: ["colId", "sort"]
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
},
|
|
1016
|
+
required: ["model"]
|
|
1017
|
+
},
|
|
1018
|
+
idempotent: !0,
|
|
1019
|
+
descriptionKey: "ui.agent.dataTable.actions.sortBy",
|
|
1020
|
+
description: "Replace the active sort with the given list (priority order).",
|
|
1021
|
+
examples: [
|
|
1022
|
+
{
|
|
1023
|
+
args: { model: [{ colId: "name", sort: "asc" }] },
|
|
1024
|
+
note: "Sort by name ascending."
|
|
1025
|
+
}
|
|
1026
|
+
],
|
|
1027
|
+
invoke: (e, t) => {
|
|
1028
|
+
e.setSort(t.model);
|
|
1029
|
+
}
|
|
1030
|
+
},
|
|
1031
|
+
go_to_page: {
|
|
1032
|
+
safety: "read",
|
|
1033
|
+
argsType: "{ page: number }",
|
|
1034
|
+
argsSchema: {
|
|
1035
|
+
type: "object",
|
|
1036
|
+
properties: {
|
|
1037
|
+
page: {
|
|
1038
|
+
type: "integer",
|
|
1039
|
+
minimum: 0,
|
|
1040
|
+
description: "Zero-indexed page number."
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
required: ["page"]
|
|
1044
|
+
},
|
|
1045
|
+
idempotent: !0,
|
|
1046
|
+
descriptionKey: "ui.agent.dataTable.actions.goToPage",
|
|
1047
|
+
description: "Navigate to the given zero-indexed page.",
|
|
1048
|
+
invoke: (e, t) => {
|
|
1049
|
+
e.goToPage(t.page);
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
domHooks: {
|
|
1054
|
+
root: {
|
|
1055
|
+
attr: "data-component",
|
|
1056
|
+
value: "data-table",
|
|
1057
|
+
description: "Marks the DataTable wrapper."
|
|
1058
|
+
},
|
|
1059
|
+
instanceId: {
|
|
1060
|
+
attr: "data-component-id",
|
|
1061
|
+
sourceProp: "gridId",
|
|
1062
|
+
description: "Sourced from the gridId prop. Required to address a specific table from the agent."
|
|
1063
|
+
},
|
|
1064
|
+
item: {
|
|
1065
|
+
attr: "row-id",
|
|
1066
|
+
description: "Native ag-grid row-id attribute on each rendered row. Selection is performed via the curated handle, not by DOM mutation."
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
};
|
|
1070
|
+
lt.registerModules([dt]);
|
|
1071
|
+
const Lt = ot("ag-theme-alfadocs ds:w-full", {
|
|
1072
|
+
variants: {
|
|
1073
|
+
density: {
|
|
1074
|
+
default: "",
|
|
1075
|
+
compact: "data-table-compact",
|
|
1076
|
+
expanded: "data-table-expanded"
|
|
1077
|
+
},
|
|
1078
|
+
bordered: {
|
|
1079
|
+
true: "",
|
|
1080
|
+
false: "ds:[--ag-borders:none]"
|
|
1081
|
+
}
|
|
1082
|
+
},
|
|
1083
|
+
defaultVariants: {
|
|
1084
|
+
density: "default",
|
|
1085
|
+
bordered: !0
|
|
1086
|
+
}
|
|
1087
|
+
});
|
|
1088
|
+
function Bt() {
|
|
1089
|
+
const { t: e } = w();
|
|
1090
|
+
return B(
|
|
1091
|
+
() => ({
|
|
1092
|
+
// Filter strings
|
|
1093
|
+
contains: e("dataTable.agGrid.contains"),
|
|
1094
|
+
notContains: e("dataTable.agGrid.notContains"),
|
|
1095
|
+
equals: e("dataTable.agGrid.equals"),
|
|
1096
|
+
notEqual: e("dataTable.agGrid.notEqual"),
|
|
1097
|
+
startsWith: e("dataTable.agGrid.startsWith"),
|
|
1098
|
+
endsWith: e("dataTable.agGrid.endsWith"),
|
|
1099
|
+
lessThan: e("dataTable.agGrid.lessThan"),
|
|
1100
|
+
greaterThan: e("dataTable.agGrid.greaterThan"),
|
|
1101
|
+
inRange: e("dataTable.agGrid.inRange"),
|
|
1102
|
+
blank: e("dataTable.agGrid.blank"),
|
|
1103
|
+
notBlank: e("dataTable.agGrid.notBlank"),
|
|
1104
|
+
filterOoo: e("dataTable.agGrid.filterOoo"),
|
|
1105
|
+
applyFilter: e("dataTable.agGrid.applyFilter"),
|
|
1106
|
+
resetFilter: e("dataTable.agGrid.resetFilter"),
|
|
1107
|
+
noRowsToShow: e("dataTable.agGrid.noRowsToShow"),
|
|
1108
|
+
selectAll: e("dataTable.agGrid.selectAll"),
|
|
1109
|
+
// Pagination
|
|
1110
|
+
page: e("dataTable.page"),
|
|
1111
|
+
of: e("dataTable.of"),
|
|
1112
|
+
to: e("dataTable.to"),
|
|
1113
|
+
nextPage: e("dataTable.nextPage"),
|
|
1114
|
+
previousPage: e("dataTable.previousPage"),
|
|
1115
|
+
firstPage: e("dataTable.firstPage"),
|
|
1116
|
+
lastPage: e("dataTable.lastPage"),
|
|
1117
|
+
pageSize: e("dataTable.pageSize")
|
|
1118
|
+
}),
|
|
1119
|
+
[e]
|
|
1120
|
+
);
|
|
1121
|
+
}
|
|
1122
|
+
function $t() {
|
|
1123
|
+
return /* @__PURE__ */ n(
|
|
1124
|
+
"div",
|
|
1125
|
+
{
|
|
1126
|
+
role: "status",
|
|
1127
|
+
"aria-live": "polite",
|
|
1128
|
+
className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]",
|
|
1129
|
+
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ n(
|
|
1130
|
+
rt,
|
|
1131
|
+
{
|
|
1132
|
+
variant: "rectangular",
|
|
1133
|
+
className: "ds:h-[var(--min-target-size)] ds:w-full"
|
|
1134
|
+
},
|
|
1135
|
+
t
|
|
1136
|
+
))
|
|
1137
|
+
}
|
|
1138
|
+
);
|
|
1139
|
+
}
|
|
1140
|
+
function Wt() {
|
|
1141
|
+
const { t: e } = w();
|
|
1142
|
+
return /* @__PURE__ */ n(
|
|
1143
|
+
nt,
|
|
1144
|
+
{
|
|
1145
|
+
variant: "no-results",
|
|
1146
|
+
size: "sm",
|
|
1147
|
+
title: e("dataTable.noRows"),
|
|
1148
|
+
description: e("dataTable.noRowsDescription")
|
|
1149
|
+
}
|
|
1150
|
+
);
|
|
1151
|
+
}
|
|
1152
|
+
function Ge(e) {
|
|
1153
|
+
return e.map(({ hide: t, pinned: a, ...r }) => r);
|
|
1154
|
+
}
|
|
1155
|
+
function Kt(e) {
|
|
1156
|
+
try {
|
|
1157
|
+
const t = localStorage.getItem(`data-table-col-state:${e}`);
|
|
1158
|
+
if (!t) return null;
|
|
1159
|
+
const a = JSON.parse(t);
|
|
1160
|
+
return Array.isArray(a) ? Ge(a) : null;
|
|
1161
|
+
} catch {
|
|
1162
|
+
return null;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
function Vt(e, t) {
|
|
1166
|
+
try {
|
|
1167
|
+
localStorage.setItem(
|
|
1168
|
+
`data-table-col-state:${e}`,
|
|
1169
|
+
JSON.stringify(Ge(t.getColumnState()))
|
|
1170
|
+
);
|
|
1171
|
+
} catch {
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
const Ut = /* @__PURE__ */ new Set([
|
|
1175
|
+
"api",
|
|
1176
|
+
"flex",
|
|
1177
|
+
"gridInitializing",
|
|
1178
|
+
"gridOptionsChanged",
|
|
1179
|
+
"autosizeColumns",
|
|
1180
|
+
"sizeColumnsToFit"
|
|
1181
|
+
]);
|
|
1182
|
+
function Ht(e, t) {
|
|
1183
|
+
const {
|
|
1184
|
+
columnDefs: a,
|
|
1185
|
+
rowData: r,
|
|
1186
|
+
rowSelection: o,
|
|
1187
|
+
pagination: s = !1,
|
|
1188
|
+
paginationPageSize: c = 25,
|
|
1189
|
+
paginationPageSizeSelector: f = [10, 25, 50, 100],
|
|
1190
|
+
gridId: d,
|
|
1191
|
+
onSelectionChanged: u,
|
|
1192
|
+
onSortChanged: i,
|
|
1193
|
+
onFilterChanged: p,
|
|
1194
|
+
noRowsOverlay: y,
|
|
1195
|
+
loadingOverlay: b,
|
|
1196
|
+
gridOptions: T,
|
|
1197
|
+
density: g,
|
|
1198
|
+
bordered: N,
|
|
1199
|
+
heightClass: x = "ds:h-[500px]",
|
|
1200
|
+
className: D,
|
|
1201
|
+
getRowClass: z,
|
|
1202
|
+
pinnedBottomRowData: W,
|
|
1203
|
+
printMode: C = !1,
|
|
1204
|
+
children: M
|
|
1205
|
+
} = e, { t: R, i18n: S } = w(), h = ye(null), [K, X] = A(0), [_, H] = A(""), Q = Bt(), te = B(
|
|
1206
|
+
() => ({
|
|
1207
|
+
getSelection: () => {
|
|
1208
|
+
var v;
|
|
1209
|
+
const l = (v = h.current) == null ? void 0 : v.api;
|
|
1210
|
+
if (!l) return [];
|
|
1211
|
+
const m = [];
|
|
1212
|
+
for (const F of l.getSelectedNodes())
|
|
1213
|
+
F.id != null && m.push(F.id);
|
|
1214
|
+
return m;
|
|
1215
|
+
},
|
|
1216
|
+
setSelection: (l) => {
|
|
1217
|
+
var F;
|
|
1218
|
+
const m = (F = h.current) == null ? void 0 : F.api;
|
|
1219
|
+
if (!m) return;
|
|
1220
|
+
const v = new Set(l);
|
|
1221
|
+
m.forEachNode((I) => {
|
|
1222
|
+
I.id != null && I.setSelected(v.has(I.id));
|
|
1223
|
+
});
|
|
1224
|
+
},
|
|
1225
|
+
selectRange: (l, m) => {
|
|
1226
|
+
var be;
|
|
1227
|
+
const v = (be = h.current) == null ? void 0 : be.api;
|
|
1228
|
+
if (!v) return;
|
|
1229
|
+
const F = [];
|
|
1230
|
+
v.forEachNodeAfterFilterAndSort((V) => {
|
|
1231
|
+
V.id != null && F.push(V.id);
|
|
1232
|
+
});
|
|
1233
|
+
const I = F.indexOf(l), E = F.indexOf(m);
|
|
1234
|
+
if (I < 0 || E < 0) return;
|
|
1235
|
+
const [L, re] = I <= E ? [I, E] : [E, I], ne = new Set(F.slice(L, re + 1));
|
|
1236
|
+
v.forEachNode((V) => {
|
|
1237
|
+
V.id != null && V.setSelected(ne.has(V.id));
|
|
1238
|
+
});
|
|
1239
|
+
},
|
|
1240
|
+
clearSelection: () => {
|
|
1241
|
+
var l, m;
|
|
1242
|
+
(m = (l = h.current) == null ? void 0 : l.api) == null || m.deselectAll();
|
|
1243
|
+
},
|
|
1244
|
+
getFilter: () => {
|
|
1245
|
+
var l, m;
|
|
1246
|
+
return ((m = (l = h.current) == null ? void 0 : l.api) == null ? void 0 : m.getFilterModel()) ?? {};
|
|
1247
|
+
},
|
|
1248
|
+
setFilter: (l) => {
|
|
1249
|
+
var m, v;
|
|
1250
|
+
(v = (m = h.current) == null ? void 0 : m.api) == null || v.setFilterModel(l);
|
|
1251
|
+
},
|
|
1252
|
+
getSort: () => {
|
|
1253
|
+
var m;
|
|
1254
|
+
const l = (m = h.current) == null ? void 0 : m.api;
|
|
1255
|
+
return l ? l.getColumnState().filter((v) => v.sort === "asc" || v.sort === "desc").map((v) => ({ colId: v.colId, sort: v.sort })) : [];
|
|
1256
|
+
},
|
|
1257
|
+
setSort: (l) => {
|
|
1258
|
+
var F;
|
|
1259
|
+
const m = (F = h.current) == null ? void 0 : F.api;
|
|
1260
|
+
if (!m) return;
|
|
1261
|
+
const v = m.getColumnState().map((I) => {
|
|
1262
|
+
const E = l.find((L) => L.colId === I.colId);
|
|
1263
|
+
return { ...I, sort: E ? E.sort : null };
|
|
1264
|
+
});
|
|
1265
|
+
m.applyColumnState({ state: v, defaultState: { sort: null } });
|
|
1266
|
+
},
|
|
1267
|
+
getCurrentPage: () => {
|
|
1268
|
+
var l, m;
|
|
1269
|
+
return ((m = (l = h.current) == null ? void 0 : l.api) == null ? void 0 : m.paginationGetCurrentPage()) ?? 0;
|
|
1270
|
+
},
|
|
1271
|
+
goToPage: (l) => {
|
|
1272
|
+
var m, v;
|
|
1273
|
+
(v = (m = h.current) == null ? void 0 : m.api) == null || v.paginationGoToPage(l);
|
|
1274
|
+
},
|
|
1275
|
+
getRawApi: () => {
|
|
1276
|
+
var l;
|
|
1277
|
+
return (l = h.current) == null ? void 0 : l.api;
|
|
1278
|
+
}
|
|
1279
|
+
}),
|
|
1280
|
+
[]
|
|
1281
|
+
);
|
|
1282
|
+
at(t, () => te, [te]), Tt(_t, te, d);
|
|
1283
|
+
const qe = S.dir() === "rtl", _e = r === void 0, Le = yt(), { resolvedTheme: ge } = vt(), Be = (ge === "light-accessible" || ge === "dark-accessible") && g === "compact" ? "default" : g, $e = B(() => {
|
|
1284
|
+
if (o)
|
|
1285
|
+
return o === "single" ? { mode: "singleRow" } : {
|
|
1286
|
+
mode: "multiRow",
|
|
1287
|
+
headerCheckbox: !0,
|
|
1288
|
+
checkboxes: !0
|
|
1289
|
+
};
|
|
1290
|
+
}, [o]), We = k(() => {
|
|
1291
|
+
var m;
|
|
1292
|
+
if (!d || !((m = h.current) != null && m.api)) return;
|
|
1293
|
+
const l = Kt(d);
|
|
1294
|
+
l && h.current.api.applyColumnState({
|
|
1295
|
+
state: l,
|
|
1296
|
+
applyOrder: !0
|
|
1297
|
+
});
|
|
1298
|
+
}, [d]), ae = k(
|
|
1299
|
+
(l) => {
|
|
1300
|
+
var m;
|
|
1301
|
+
l.source && Ut.has(l.source) || d && ((m = h.current) != null && m.api) && Vt(d, h.current.api);
|
|
1302
|
+
},
|
|
1303
|
+
[d]
|
|
1304
|
+
), Ke = B(() => {
|
|
1305
|
+
if (!T) return;
|
|
1306
|
+
const l = { ...T };
|
|
1307
|
+
return delete l.defaultColDef, l;
|
|
1308
|
+
}, [T]), Ve = k(() => {
|
|
1309
|
+
var v;
|
|
1310
|
+
const l = (v = h.current) == null ? void 0 : v.api;
|
|
1311
|
+
if (!l) return;
|
|
1312
|
+
const m = l.getSelectedRows();
|
|
1313
|
+
X(m.length), u == null || u(m);
|
|
1314
|
+
}, [u]), Ue = k(
|
|
1315
|
+
(l) => {
|
|
1316
|
+
var v;
|
|
1317
|
+
const m = (v = h.current) == null ? void 0 : v.api;
|
|
1318
|
+
if (m) {
|
|
1319
|
+
const I = m.getColumnState().find((E) => E.sort);
|
|
1320
|
+
if (I) {
|
|
1321
|
+
const E = I.colId, L = m.getColumnDef(E), re = (L == null ? void 0 : L.headerName) ?? E, ne = I.sort === "asc" ? "dataTable.sortAscending" : "dataTable.sortDescending";
|
|
1322
|
+
H(
|
|
1323
|
+
R("dataTable.sortAnnounce", {
|
|
1324
|
+
column: re,
|
|
1325
|
+
direction: R(ne)
|
|
1326
|
+
})
|
|
1327
|
+
);
|
|
1328
|
+
} else
|
|
1329
|
+
H("");
|
|
1330
|
+
}
|
|
1331
|
+
i == null || i(l);
|
|
1332
|
+
},
|
|
1333
|
+
[i, R]
|
|
1334
|
+
), He = k(
|
|
1335
|
+
(l) => {
|
|
1336
|
+
p == null || p(l);
|
|
1337
|
+
},
|
|
1338
|
+
[p]
|
|
1339
|
+
);
|
|
1340
|
+
$(() => {
|
|
1341
|
+
if (!_) return;
|
|
1342
|
+
const l = setTimeout(() => H(""), 3e3);
|
|
1343
|
+
return () => clearTimeout(l);
|
|
1344
|
+
}, [_]);
|
|
1345
|
+
const Qe = y ?? Wt, Je = b ?? $t, Xe = k(
|
|
1346
|
+
() => {
|
|
1347
|
+
var l;
|
|
1348
|
+
return (l = h.current) == null ? void 0 : l.api;
|
|
1349
|
+
},
|
|
1350
|
+
[]
|
|
1351
|
+
), Ze = k(() => {
|
|
1352
|
+
typeof window < "u" && window.print();
|
|
1353
|
+
}, []), Ye = Lt({
|
|
1354
|
+
density: Be,
|
|
1355
|
+
bordered: N,
|
|
1356
|
+
className: D
|
|
1357
|
+
}), et = M ?? /* @__PURE__ */ n("div", { className: "data-table-toolbar ds:flex ds:justify-end", children: /* @__PURE__ */ O(
|
|
1358
|
+
we,
|
|
1359
|
+
{
|
|
1360
|
+
role: "toolbar",
|
|
1361
|
+
"aria-label": R("dataTable.tableActions"),
|
|
1362
|
+
className: "ds:bg-[var(--background)]",
|
|
1363
|
+
children: [
|
|
1364
|
+
/* @__PURE__ */ n(Y.ExportMenu, {}),
|
|
1365
|
+
/* @__PURE__ */ n(Y.Print, {}),
|
|
1366
|
+
/* @__PURE__ */ n(Y.ColumnToggle, {})
|
|
1367
|
+
]
|
|
1368
|
+
}
|
|
1369
|
+
) }), tt = C ? !1 : s;
|
|
1370
|
+
return /* @__PURE__ */ O(
|
|
1371
|
+
"div",
|
|
1372
|
+
{
|
|
1373
|
+
className: "ds:flex ds:w-full ds:min-h-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1374
|
+
"aria-busy": _e ? "true" : void 0,
|
|
1375
|
+
"data-component": "data-table",
|
|
1376
|
+
"data-component-id": d,
|
|
1377
|
+
"data-print-mode": C ? "true" : void 0,
|
|
1378
|
+
children: [
|
|
1379
|
+
!C && /* @__PURE__ */ n(
|
|
1380
|
+
Nt,
|
|
1381
|
+
{
|
|
1382
|
+
getApi: Xe,
|
|
1383
|
+
selectionCount: K,
|
|
1384
|
+
onPrint: Ze,
|
|
1385
|
+
children: et
|
|
1386
|
+
}
|
|
1387
|
+
),
|
|
1388
|
+
/* @__PURE__ */ n(
|
|
1389
|
+
"div",
|
|
1390
|
+
{
|
|
1391
|
+
className: [Ye, C ? "" : x].join(" ").trim(),
|
|
1392
|
+
children: /* @__PURE__ */ n(
|
|
1393
|
+
st,
|
|
1394
|
+
{
|
|
1395
|
+
ref: h,
|
|
1396
|
+
theme: "legacy",
|
|
1397
|
+
columnDefs: a,
|
|
1398
|
+
rowData: r,
|
|
1399
|
+
defaultColDef: {
|
|
1400
|
+
sortable: !0,
|
|
1401
|
+
// Default filter = DS-styled text filter so untyped columns
|
|
1402
|
+
// (no explicit `filter:` override) inherit the kit's form
|
|
1403
|
+
// language instead of AG Grid's stock browser-skinned input.
|
|
1404
|
+
// Number / date / select columns opt into their dedicated
|
|
1405
|
+
// wrapper per-column.
|
|
1406
|
+
filter: jt,
|
|
1407
|
+
floatingFilterComponent: qt,
|
|
1408
|
+
resizable: !0,
|
|
1409
|
+
floatingFilter: !0,
|
|
1410
|
+
// §13d — faint sort icon advertises which columns are
|
|
1411
|
+
// sortable. v33+ moved this from grid-level to defaultColDef.
|
|
1412
|
+
unSortIcon: !0,
|
|
1413
|
+
...T == null ? void 0 : T.defaultColDef
|
|
1414
|
+
},
|
|
1415
|
+
rowSelection: $e,
|
|
1416
|
+
pagination: tt,
|
|
1417
|
+
paginationPageSize: c,
|
|
1418
|
+
paginationPageSizeSelector: f,
|
|
1419
|
+
paginationNumberFormatter: (l) => new Intl.NumberFormat(S.language).format(l.value),
|
|
1420
|
+
animateRows: !Le,
|
|
1421
|
+
enableRtl: qe,
|
|
1422
|
+
ensureDomOrder: !0,
|
|
1423
|
+
enableCellSpan: !0,
|
|
1424
|
+
enableCellTextSelection: !0,
|
|
1425
|
+
copyHeadersToClipboard: !0,
|
|
1426
|
+
accentedSort: !0,
|
|
1427
|
+
multiSortKey: "ctrl",
|
|
1428
|
+
suppressDragLeaveHidesColumns: !0,
|
|
1429
|
+
suppressRowClickSelection: o ? !0 : void 0,
|
|
1430
|
+
tooltipShowDelay: 500,
|
|
1431
|
+
tooltipHideDelay: 5e3,
|
|
1432
|
+
tooltipInteraction: !0,
|
|
1433
|
+
stopEditingWhenCellsLoseFocus: !0,
|
|
1434
|
+
maintainColumnOrder: !0,
|
|
1435
|
+
undoRedoCellEditing: !0,
|
|
1436
|
+
undoRedoCellEditingLimit: 20,
|
|
1437
|
+
suppressCellFocus: !1,
|
|
1438
|
+
rowBuffer: 10,
|
|
1439
|
+
localeText: Q,
|
|
1440
|
+
noRowsOverlayComponent: Qe,
|
|
1441
|
+
loadingOverlayComponent: Je,
|
|
1442
|
+
getRowClass: z,
|
|
1443
|
+
pinnedBottomRowData: W,
|
|
1444
|
+
domLayout: C ? "autoHeight" : void 0,
|
|
1445
|
+
onGridReady: We,
|
|
1446
|
+
onColumnMoved: ae,
|
|
1447
|
+
onColumnResized: ae,
|
|
1448
|
+
onColumnPinned: ae,
|
|
1449
|
+
onSortChanged: Ue,
|
|
1450
|
+
onFilterChanged: He,
|
|
1451
|
+
onSelectionChanged: Ve,
|
|
1452
|
+
...Ke
|
|
1453
|
+
}
|
|
1454
|
+
)
|
|
1455
|
+
}
|
|
1456
|
+
),
|
|
1457
|
+
!C && /* @__PURE__ */ n("div", { className: "ds:flex ds:items-center ds:justify-between type-body-sm ds:text-[color:var(--muted-foreground)]", children: K > 0 ? /* @__PURE__ */ n("span", { children: R("dataTable.selected", { count: K }) }) : /* @__PURE__ */ n("span", {}) }),
|
|
1458
|
+
/* @__PURE__ */ n("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: _ })
|
|
1459
|
+
]
|
|
1460
|
+
}
|
|
1461
|
+
);
|
|
1462
|
+
}
|
|
1463
|
+
const je = P(Ht);
|
|
1464
|
+
je.displayName = "DataTable";
|
|
1465
|
+
const Fa = Object.assign(je, {
|
|
1466
|
+
Toolbar: Y
|
|
1467
|
+
});
|
|
1468
|
+
function Te(e) {
|
|
1469
|
+
if (!Ce(e)) return e;
|
|
1470
|
+
const t = e, a = t.props.className ?? "", r = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} size-4`.trim();
|
|
1471
|
+
return Se(t, { className: r, size: t.props.size ?? 16 });
|
|
1472
|
+
}
|
|
1473
|
+
function Ra(e) {
|
|
1474
|
+
return Math.max(1, e) * 32 + 26;
|
|
1475
|
+
}
|
|
1476
|
+
function oe(e, t) {
|
|
1477
|
+
return typeof e == "function" ? e(t) : !!e;
|
|
1478
|
+
}
|
|
1479
|
+
const Qt = "ds:text-[color:var(--destructive)] ds:hover:text-[color:var(--destructive-hover)]";
|
|
1480
|
+
function ka(e) {
|
|
1481
|
+
const { data: t, actions: a, intent: r = "ghost", group: o, label: s, collapsed: c } = e, { t: f } = w();
|
|
1482
|
+
if (!t) return null;
|
|
1483
|
+
const d = a.filter((p) => !oe(p.hidden, t));
|
|
1484
|
+
if (typeof c == "function" ? c() : !!c)
|
|
1485
|
+
return /* @__PURE__ */ O(j.Root, { children: [
|
|
1486
|
+
/* @__PURE__ */ n(j.Trigger, { asChild: !0, children: /* @__PURE__ */ n(
|
|
1487
|
+
q,
|
|
1488
|
+
{
|
|
1489
|
+
size: "sm",
|
|
1490
|
+
intent: r,
|
|
1491
|
+
icon: /* @__PURE__ */ n(xt, { "aria-hidden": !0 }),
|
|
1492
|
+
"aria-label": s ?? f("dataTable.actions", "Actions")
|
|
1493
|
+
}
|
|
1494
|
+
) }),
|
|
1495
|
+
/* @__PURE__ */ n(j.Content, { align: "end", children: d.map((p, y) => /* @__PURE__ */ n(
|
|
1496
|
+
j.Item,
|
|
1497
|
+
{
|
|
1498
|
+
startIcon: Te(p.icon),
|
|
1499
|
+
disabled: oe(p.disabled, t),
|
|
1500
|
+
onSelect: () => p.onClick(t),
|
|
1501
|
+
className: p.variant === "destructive" ? "ds:text-[color:var(--destructive)]" : void 0,
|
|
1502
|
+
children: p.label
|
|
1503
|
+
},
|
|
1504
|
+
y
|
|
1505
|
+
)) })
|
|
1506
|
+
] });
|
|
1507
|
+
const i = d.map((p, y) => {
|
|
1508
|
+
const b = oe(p.disabled, t), T = b && p.disabledReason ? p.disabledReason : p.label;
|
|
1509
|
+
return /* @__PURE__ */ n(
|
|
1510
|
+
q,
|
|
1511
|
+
{
|
|
1512
|
+
size: "sm",
|
|
1513
|
+
intent: r,
|
|
1514
|
+
icon: Te(p.icon),
|
|
1515
|
+
tooltip: T,
|
|
1516
|
+
"aria-label": p.label,
|
|
1517
|
+
disabled: b,
|
|
1518
|
+
onClick: (g) => {
|
|
1519
|
+
g.stopPropagation(), p.onClick(t);
|
|
1520
|
+
},
|
|
1521
|
+
className: p.variant === "destructive" ? Qt : void 0
|
|
1522
|
+
},
|
|
1523
|
+
y
|
|
1524
|
+
);
|
|
1525
|
+
});
|
|
1526
|
+
return o ? /* @__PURE__ */ n(
|
|
1527
|
+
we,
|
|
1528
|
+
{
|
|
1529
|
+
"aria-label": s ?? f("dataTable.actions", "Actions"),
|
|
1530
|
+
size: "sm",
|
|
1531
|
+
children: i
|
|
1532
|
+
}
|
|
1533
|
+
) : /* @__PURE__ */ n("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: i });
|
|
1534
|
+
}
|
|
1535
|
+
export {
|
|
1536
|
+
ka as A,
|
|
1537
|
+
Fa as D,
|
|
1538
|
+
jt as T,
|
|
1539
|
+
qt as a,
|
|
1540
|
+
Y as b,
|
|
1541
|
+
Nt as c,
|
|
1542
|
+
Ra as d,
|
|
1543
|
+
_t as e,
|
|
1544
|
+
Ae as f
|
|
1545
|
+
};
|
|
1546
|
+
//# sourceMappingURL=actions-cell-renderer-DLrcSTK_.js.map
|