@servicetitan/anvil2 3.16.1 → 3.17.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/CHANGELOG.md +37 -0
- package/dist/{AiMark-BfmK30vL.js → AiMark-CYXbKuCA.js} +2 -2
- package/dist/{AiMark-BfmK30vL.js.map → AiMark-CYXbKuCA.js.map} +1 -1
- package/dist/AiMark.js +1 -1
- package/dist/{Alert-lLo1N7Tj.js → Alert-CYpl0czJ.js} +3 -3
- package/dist/{Alert-lLo1N7Tj.js.map → Alert-CYpl0czJ.js.map} +1 -1
- package/dist/Alert.js +1 -1
- package/dist/{Announcement-PfnsVVz1.js → Announcement-AN9HnhZ-.js} +2 -2
- package/dist/{Announcement-PfnsVVz1.js.map → Announcement-AN9HnhZ-.js.map} +1 -1
- package/dist/Announcement.js +1 -1
- package/dist/{Breadcrumbs-RdL4Fvmu.js → Breadcrumbs-C0CXs9Ma.js} +2 -2
- package/dist/{Breadcrumbs-RdL4Fvmu.js.map → Breadcrumbs-C0CXs9Ma.js.map} +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/{Button-Dn6-01xl.js → Button-B_E6ybA-.js} +3 -3
- package/dist/{Button-Dn6-01xl.js.map → Button-B_E6ybA-.js.map} +1 -1
- package/dist/Button.js +1 -1
- package/dist/{ButtonToggle-BSU8GBxr.js → ButtonToggle-D0eXySEM.js} +2 -2
- package/dist/{ButtonToggle-BSU8GBxr.js.map → ButtonToggle-D0eXySEM.js.map} +1 -1
- package/dist/ButtonToggle.js +1 -1
- package/dist/{luxon-wpz4A-OQ.js → Calendar-BAIyDHX9.js} +1761 -3
- package/dist/Calendar-BAIyDHX9.js.map +1 -0
- package/dist/{Calendar-DoLRAWLp.js → Calendar-C_NPqjx3.js} +2 -2
- package/dist/{Calendar-DoLRAWLp.js.map → Calendar-C_NPqjx3.js.map} +1 -1
- package/dist/Calendar.js +2 -2
- package/dist/{Checkbox-U-kuWhgc.js → Checkbox-4Ow8rCbD.js} +2 -2
- package/dist/{Checkbox-U-kuWhgc.js.map → Checkbox-4Ow8rCbD.js.map} +1 -1
- package/dist/{Checkbox-CVxbe-iN.js → Checkbox-f1vutjn0.js} +3 -3
- package/dist/{Checkbox-CVxbe-iN.js.map → Checkbox-f1vutjn0.js.map} +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/{Chip-2OydLs66.js → Chip-AIF0WiNS.js} +2 -2
- package/dist/{Chip-2OydLs66.js.map → Chip-AIF0WiNS.js.map} +1 -1
- package/dist/Chip.js +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-DIXP9-Bx.js → DataTableEditColumnsDrawer-DRgJgso9.js} +1288 -263
- package/dist/DataTableEditColumnsDrawer-DRgJgso9.js.map +1 -0
- package/dist/{DataTable.css → DataTableEditColumnsDrawer.css} +41 -0
- package/dist/{DateFieldRange-X2jdOTYY.js → DateFieldRange-D9PA985Z.js} +6 -7
- package/dist/{DateFieldRange-X2jdOTYY.js.map → DateFieldRange-D9PA985Z.js.map} +1 -1
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-BJ16tpOz.js → DateFieldSingle-CMLojOb3.js} +6 -7
- package/dist/{DateFieldSingle-BJ16tpOz.js.map → DateFieldSingle-CMLojOb3.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-CMm8vtz_.js → DateFieldYearless-B5IyR75v.js} +4 -4
- package/dist/{DateFieldYearless-CMm8vtz_.js.map → DateFieldYearless-B5IyR75v.js.map} +1 -1
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DateFieldYearlessRange-BHHs-Z1Q.js → DateFieldYearlessRange-8yXILjx7.js} +3 -3
- package/dist/{DateFieldYearlessRange-BHHs-Z1Q.js.map → DateFieldYearlessRange-8yXILjx7.js.map} +1 -1
- package/dist/DateFieldYearlessRange.js +1 -1
- package/dist/{DaysOfTheWeek-BHXxs0Bo.js → DaysOfTheWeek-Cxp5VdYK.js} +3 -3
- package/dist/{DaysOfTheWeek-BHXxs0Bo.js.map → DaysOfTheWeek-Cxp5VdYK.js.map} +1 -1
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Dialog-_tHqOsbr.js → Dialog-KDAJphrA.js} +8 -7
- package/dist/Dialog-KDAJphrA.js.map +1 -0
- package/dist/Dialog.js +1 -1
- package/dist/{DialogCancelButton-C0r8hJ8Z.js → DialogCancelButton-CplrFu69.js} +2 -2
- package/dist/{DialogCancelButton-C0r8hJ8Z.js.map → DialogCancelButton-CplrFu69.js.map} +1 -1
- package/dist/Dnd.js +2 -2
- package/dist/{DndHandleButton-BRlodkDO.js → DndHandleButton-BJqj2hc0.js} +6 -4
- package/dist/DndHandleButton-BJqj2hc0.js.map +1 -0
- package/dist/DndSort.js +2 -2
- package/dist/{Drawer-D-ThWNp0.js → Drawer-C7E2NNnH.js} +9 -8
- package/dist/Drawer-C7E2NNnH.js.map +1 -0
- package/dist/Drawer.js +1 -1
- package/dist/DrillDown.css +41 -34
- package/dist/DrillDown.js +1 -1
- package/dist/DrillDown.module-BFE5BcJB.js +28 -0
- package/dist/DrillDown.module-BFE5BcJB.js.map +1 -0
- package/dist/{EditCard-B6l2vhBS.js → EditCard-CutlsXfK.js} +3 -3
- package/dist/{EditCard-B6l2vhBS.js.map → EditCard-CutlsXfK.js.map} +1 -1
- package/dist/EditCard.js +1 -1
- package/dist/{FieldLabel-ThEmUiAq.js → FieldLabel-DYcUS3A4.js} +2 -2
- package/dist/{FieldLabel-ThEmUiAq.js.map → FieldLabel-DYcUS3A4.js.map} +1 -1
- package/dist/FieldLabel.js +1 -1
- package/dist/{FilterBar-CGsDg6Hy.js → FilterBar-DbDfZph-.js} +7 -7
- package/dist/{FilterBar-CGsDg6Hy.js.map → FilterBar-DbDfZph-.js.map} +1 -1
- package/dist/FilterBar.js +1 -1
- package/dist/{InputMask-BQigi5oW.js → InputMask-BxdQc1ld.js} +3 -3
- package/dist/{InputMask-BQigi5oW.js.map → InputMask-BxdQc1ld.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{ListView-YJscfG4x.js → ListView-BVanVvBk.js} +87 -108
- package/dist/ListView-BVanVvBk.js.map +1 -0
- package/dist/ListView.js +1 -1
- package/dist/{Listbox-CD9ZptSZ.js → Listbox-BR0YQIee.js} +2 -2
- package/dist/{Listbox-CD9ZptSZ.js.map → Listbox-BR0YQIee.js.map} +1 -1
- package/dist/Listbox.js +1 -1
- package/dist/{Menu-Da2OEN0o.js → Menu-DqP7YQgE.js} +2 -2
- package/dist/{Menu-Da2OEN0o.js.map → Menu-DqP7YQgE.js.map} +1 -1
- package/dist/Menu.js +1 -1
- package/dist/{MenuFooter-D__gg92C.js → MenuFooter-Dzhv0EfD.js} +2 -2
- package/dist/{MenuFooter-D__gg92C.js.map → MenuFooter-Dzhv0EfD.js.map} +1 -1
- package/dist/MultiSelectField.js +1 -1
- package/dist/{MultiSelectFieldSync-Cq5sena6.js → MultiSelectFieldSync-9253tott.js} +7 -7
- package/dist/{MultiSelectFieldSync-Cq5sena6.js.map → MultiSelectFieldSync-9253tott.js.map} +1 -1
- package/dist/MultiSelectMenu.js +1 -1
- package/dist/{MultiSelectMenuSync-BhNXsgAN.js → MultiSelectMenuSync-BUJbWN2I.js} +5 -5
- package/dist/{MultiSelectMenuSync-BhNXsgAN.js.map → MultiSelectMenuSync-BUJbWN2I.js.map} +1 -1
- package/dist/{useNumberField-CXFYUZ_n.js → NumberField-DhxywJVp.js} +251 -5
- package/dist/NumberField-DhxywJVp.js.map +1 -0
- package/dist/NumberField.js +1 -1
- package/dist/{Page-ZSHNJs7z.js → Page-D_KL2tdK.js} +14 -13
- package/dist/{Page-ZSHNJs7z.js.map → Page-D_KL2tdK.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Pagination-Bsl99RRI.js → Pagination-DYpUtMha.js} +5 -5
- package/dist/{Pagination-Bsl99RRI.js.map → Pagination-DYpUtMha.js.map} +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/{Popover-CIh1CsoJ.js → Popover-B2ix8Ji4.js} +2 -2
- package/dist/{Popover-CIh1CsoJ.js.map → Popover-B2ix8Ji4.js.map} +1 -1
- package/dist/Popover.js +1 -1
- package/dist/{ProgressBar-zPKYv4Il.js → ProgressBar-CjoOuJCi.js} +2 -2
- package/dist/{ProgressBar-zPKYv4Il.js.map → ProgressBar-CjoOuJCi.js.map} +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-C1VnatcL.js → Radio-Bz36_d0V.js} +2 -2
- package/dist/{Radio-C1VnatcL.js.map → Radio-Bz36_d0V.js.map} +1 -1
- package/dist/{Radio-BYowelK2.js → Radio-DOD1d9Vw.js} +3 -3
- package/dist/{Radio-BYowelK2.js.map → Radio-DOD1d9Vw.js.map} +1 -1
- package/dist/Radio.js +1 -1
- package/dist/{RichTextEditor-DcAVqd2d.js → RichTextEditor-BORVXVDw.js} +11 -11
- package/dist/{RichTextEditor-DcAVqd2d.js.map → RichTextEditor-BORVXVDw.js.map} +1 -1
- package/dist/RichTextEditor.js +1 -1
- package/dist/{SavedFiltersButton-BLvi8j1T.js → SavedFiltersButton-vq_Kt4Qc.js} +10 -10
- package/dist/{SavedFiltersButton-BLvi8j1T.js.map → SavedFiltersButton-vq_Kt4Qc.js.map} +1 -1
- package/dist/SavedFiltersButton.js +1 -1
- package/dist/{SegmentedControl-BHVJmmTH.js → SegmentedControl-BCqWq65N.js} +3 -3
- package/dist/{SegmentedControl-BHVJmmTH.js.map → SegmentedControl-BCqWq65N.js.map} +1 -1
- package/dist/SegmentedControl.js +1 -1
- package/dist/{SelectCard-DrmMU_GD.js → SelectCard-CJwetC1k.js} +3 -3
- package/dist/{SelectCard-DrmMU_GD.js.map → SelectCard-CJwetC1k.js.map} +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/{SelectFieldLabel-BxsKvfqo.js → SelectFieldLabel-BTKqybZm.js} +2 -2
- package/dist/{SelectFieldLabel-BxsKvfqo.js.map → SelectFieldLabel-BTKqybZm.js.map} +1 -1
- package/dist/{SelectFieldSync-CeazN-gI.js → SelectFieldSync-CoUi-BYw.js} +6 -6
- package/dist/{SelectFieldSync-CeazN-gI.js.map → SelectFieldSync-CoUi-BYw.js.map} +1 -1
- package/dist/SelectMenu.js +1 -1
- package/dist/{SelectMenuSync-CPpE6vUG.js → SelectMenuSync-CvXx-6uU.js} +5 -5
- package/dist/{SelectMenuSync-CPpE6vUG.js.map → SelectMenuSync-CvXx-6uU.js.map} +1 -1
- package/dist/{SelectOptions-BDAu_9dv.js → SelectOptions-CGRUCyf4.js} +2 -2
- package/dist/{SelectOptions-BDAu_9dv.js.map → SelectOptions-CGRUCyf4.js.map} +1 -1
- package/dist/{SelectTrigger-B4OUTO9S.js → SelectTrigger-CRbl804u.js} +2 -2
- package/dist/{SelectTrigger-B4OUTO9S.js.map → SelectTrigger-CRbl804u.js.map} +1 -1
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-BTWSaiQ-.js → SelectTriggerBase-BRUW_Zgc.js} +4 -4
- package/dist/{SelectTriggerBase-BTWSaiQ-.js.map → SelectTriggerBase-BRUW_Zgc.js.map} +1 -1
- package/dist/{Stepper-l_P6VPOv.js → Stepper-D3SHXfX1.js} +3 -3
- package/dist/{Stepper-l_P6VPOv.js.map → Stepper-D3SHXfX1.js.map} +1 -1
- package/dist/Stepper.js +1 -1
- package/dist/{Switch-1iNdXTik.js → Switch-rPPL4yEa.js} +2 -2
- package/dist/{Switch-1iNdXTik.js.map → Switch-rPPL4yEa.js.map} +1 -1
- package/dist/Switch.js +1 -1
- package/dist/{Tab-DR5YYXkq.js → Tab-CXwVQ5-G.js} +11 -7
- package/dist/Tab-CXwVQ5-G.js.map +1 -0
- package/dist/Tab.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/{Text-rihxXHSe.js → Text-BRbkPr5s.js} +2 -2
- package/dist/{Text-rihxXHSe.js.map → Text-BRbkPr5s.js.map} +1 -1
- package/dist/Text.js +1 -1
- package/dist/{TextField-vuS7xeo-.js → TextField-B9hivHsD.js} +3 -3
- package/dist/{TextField-vuS7xeo-.js.map → TextField-B9hivHsD.js.map} +1 -1
- package/dist/{TextField-Bxd-Qzoi.js → TextField-DGRVg_Cw.js} +2 -2
- package/dist/{TextField-Bxd-Qzoi.js.map → TextField-DGRVg_Cw.js.map} +1 -1
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-ppapJUwh.js → Textarea-DNqfV8rJ.js} +3 -3
- package/dist/{Textarea-ppapJUwh.js.map → Textarea-DNqfV8rJ.js.map} +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/{TimeField-Hwt_oRbg.js → TimeField-DldMBNAj.js} +5 -5
- package/dist/{TimeField-Hwt_oRbg.js.map → TimeField-DldMBNAj.js.map} +1 -1
- package/dist/TimeField.js +1 -1
- package/dist/{TimezoneMessage-BrKB_psP.js → TimezoneMessage-CgVNxYpM.js} +2 -2
- package/dist/{TimezoneMessage-BrKB_psP.js.map → TimezoneMessage-CgVNxYpM.js.map} +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toaster-dVGVVcat.js → Toaster-Bcy9XN3c.js} +2 -2
- package/dist/{Toaster-dVGVVcat.js.map → Toaster-Bcy9XN3c.js.map} +1 -1
- package/dist/{Toaster-SqkX0Kes.js → Toaster-C66ra4BK.js} +6 -8
- package/dist/Toaster-C66ra4BK.js.map +1 -0
- package/dist/{Toolbar-CMulzswf.js → Toolbar-Br-5yBxq.js} +5 -5
- package/dist/{Toolbar-CMulzswf.js.map → Toolbar-Br-5yBxq.js.map} +1 -1
- package/dist/{Toolbar-DGHZpFi9.js → Toolbar-DgPah7M3.js} +5 -5
- package/dist/{Toolbar-DGHZpFi9.js.map → Toolbar-DgPah7M3.js.map} +1 -1
- package/dist/Toolbar.js +2 -2
- package/dist/{ToolbarButtonToggle-T8YnSJ5x.js → ToolbarButtonToggle-BDfoHeie.js} +2 -2
- package/dist/{ToolbarButtonToggle-T8YnSJ5x.js.map → ToolbarButtonToggle-BDfoHeie.js.map} +1 -1
- package/dist/TreeSelectField.js +1 -1
- package/dist/{TreeSelectFieldSync-DT6uZ3Ca.js → TreeSelectFieldSync-1psUeqtG.js} +6 -6
- package/dist/{TreeSelectFieldSync-DT6uZ3Ca.js.map → TreeSelectFieldSync-1psUeqtG.js.map} +1 -1
- package/dist/TreeSelectMenu.js +1 -1
- package/dist/{TreeSelectMenuSync-D2TvKxP-.js → TreeSelectMenuSync-DIPSYUnE.js} +4 -4
- package/dist/{TreeSelectMenuSync-D2TvKxP-.js.map → TreeSelectMenuSync-DIPSYUnE.js.map} +1 -1
- package/dist/{TypeaheadTextField-DgazozK7.js → TypeaheadTextField-Di9ulOBl.js} +3 -3
- package/dist/{TypeaheadTextField-DgazozK7.js.map → TypeaheadTextField-Di9ulOBl.js.map} +1 -1
- package/dist/TypeaheadTextField.js +1 -1
- package/dist/{YearlessDateInputWithPicker-Bc8a33D5.js → YearlessDateInputWithPicker-CQ2-6Uj4.js} +3 -3
- package/dist/{YearlessDateInputWithPicker-Bc8a33D5.js.map → YearlessDateInputWithPicker-CQ2-6Uj4.js.map} +1 -1
- package/dist/assets/icons/st/gnav_messages_active.svg +1 -0
- package/dist/assets/icons/st/gnav_messages_inactive.svg +1 -0
- package/dist/assets/icons/st.ts +2 -0
- package/dist/beta.js +17 -17
- package/dist/{bulkActionTypes-SukoplGV.js → bulkActionTypes-B71ZHjVu.js} +2 -2
- package/dist/{bulkActionTypes-SukoplGV.js.map → bulkActionTypes-B71ZHjVu.js.map} +1 -1
- package/dist/{filter-state-D3-SYfuy.js → filter-state-Lw9qL0zP.js} +23 -23
- package/dist/{filter-state-D3-SYfuy.js.map → filter-state-Lw9qL0zP.js.map} +1 -1
- package/dist/{index-C2dOrf4N.js → index-B3WhDZeI.js} +2 -2
- package/dist/{index-C2dOrf4N.js.map → index-B3WhDZeI.js.map} +1 -1
- package/dist/{index-Bldaza5t.js → index-CyN5oapA.js} +2 -2
- package/dist/{index-Bldaza5t.js.map → index-CyN5oapA.js.map} +1 -1
- package/dist/index-DfZCfS0S.js +36 -0
- package/dist/index-DfZCfS0S.js.map +1 -0
- package/dist/{index.esm-C2ZhC_8d.js → index.esm-CQXMoq5w.js} +2 -2
- package/dist/{index.esm-C2ZhC_8d.js.map → index.esm-CQXMoq5w.js.map} +1 -1
- package/dist/index.js +55 -53
- package/dist/index.js.map +1 -1
- package/dist/{react-ORV84FjM.js → react-CG1BUt2y.js} +5 -38
- package/dist/react-CG1BUt2y.js.map +1 -0
- package/dist/src/beta/components/Table/DataTable/DataTable.d.ts +31 -4
- package/dist/src/beta/components/Table/DataTable/DataTableEditColumnsDrawer.d.ts +18 -0
- package/dist/src/beta/components/Table/DataTable/index.d.ts +1 -0
- package/dist/src/beta/components/Table/DataTable/internal/DataTableAddRow.d.ts +11 -0
- package/dist/src/beta/components/Table/DataTable/internal/DataTableBulkActionBar.d.ts +23 -0
- package/dist/src/beta/components/Table/DataTable/internal/DataTableFilterToolbar.d.ts +12 -0
- package/dist/src/beta/components/Table/DataTable/internal/columnEditing/EditColumnsDrawer.d.ts +29 -0
- package/dist/src/beta/components/Table/DataTable/internal/columnEditing/columnLayout.d.ts +43 -0
- package/dist/src/beta/components/Table/DataTable/internal/columnEditing/toEditColumnsSection.d.ts +7 -0
- package/dist/src/beta/components/Table/DataTable/parts.d.ts +17 -0
- package/dist/src/beta/components/Table/DataTable/types.d.ts +245 -2
- package/dist/src/beta/components/Table/types.d.ts +6 -0
- package/dist/src/components/DrillDown/DrillDownHeader.d.ts +11 -2
- package/dist/src/components/DrillDown/index.d.ts +1 -1
- package/dist/src/components/DrillDown/internal/DrillDownContext.d.ts +7 -2
- package/dist/src/components/DrillDown/internal/useDrillDownContextState.d.ts +6 -3
- package/dist/src/hooks/usePrefersReducedMotion/index.d.ts +2 -0
- package/dist/src/hooks/usePrefersReducedMotion/prefersReducedMotion.d.ts +6 -0
- package/dist/src/hooks/usePrefersReducedMotion/useReducedMotion.d.ts +5 -0
- package/dist/{stripInlineMarkdown-BhYLEiXu.js → stripInlineMarkdown-B6lAJb4-.js} +2 -2
- package/dist/{stripInlineMarkdown-BhYLEiXu.js.map → stripInlineMarkdown-B6lAJb4-.js.map} +1 -1
- package/dist/{syncFilterUtils-SMop8ckR.js → syncFilterUtils-DnhuqY1S.js} +4 -4
- package/dist/{syncFilterUtils-SMop8ckR.js.map → syncFilterUtils-DnhuqY1S.js.map} +1 -1
- package/dist/token/core/component-variables.scss +49 -49
- package/dist/token/core/component.js +49 -49
- package/dist/token/core/component.scss +40 -40
- package/dist/token.js +49 -49
- package/dist/token.js.map +1 -1
- package/dist/{treeSync-B38r1dRQ.js → treeSync-BDwht_1r.js} +3 -3
- package/dist/{treeSync-B38r1dRQ.js.map → treeSync-BDwht_1r.js.map} +1 -1
- package/dist/{use-reduced-motion-yYB9Tb0D.js → use-reduced-motion-CUshwaEW.js} +2 -2
- package/dist/{use-reduced-motion-yYB9Tb0D.js.map → use-reduced-motion-CUshwaEW.js.map} +1 -1
- package/dist/{useDrillDownContext-D5_NjqY4.js → useDrillDownContext-BLDjyNEt.js} +2 -2
- package/dist/{useDrillDownContext-D5_NjqY4.js.map → useDrillDownContext-BLDjyNEt.js.map} +1 -1
- package/dist/{useDrilldown-BOeeNUsy.js → useDrilldown-CGdhHs8L.js} +54 -21
- package/dist/{useDrilldown-BOeeNUsy.js.map → useDrilldown-CGdhHs8L.js.map} +1 -1
- package/dist/{useInfiniteCombobox-ynkeFngn.js → useInfiniteCombobox-Db0kaxCj.js} +4 -4
- package/dist/{useInfiniteCombobox-ynkeFngn.js.map → useInfiniteCombobox-Db0kaxCj.js.map} +1 -1
- package/dist/{useInitialFocus-CGybEc6x.js → useInitialFocus-fBiTU9l8.js} +7 -4
- package/dist/useInitialFocus-fBiTU9l8.js.map +1 -0
- package/dist/{useInvalidateOnOptionsChange-BD2VBpbK.js → useInvalidateOnOptionsChange-PweyDORd.js} +4 -4
- package/dist/{useInvalidateOnOptionsChange-BD2VBpbK.js.map → useInvalidateOnOptionsChange-PweyDORd.js.map} +1 -1
- package/dist/{usePrefersReducedMotion-DR9B_D6w.js → usePrefersReducedMotion-BLoVFiJL.js} +11 -3
- package/dist/usePrefersReducedMotion-BLoVFiJL.js.map +1 -0
- package/dist/usePrefersReducedMotion.js +2 -1
- package/dist/usePrefersReducedMotion.js.map +1 -1
- package/package.json +3 -3
- package/dist/Calendar-IzXG1aJw.js +0 -1761
- package/dist/Calendar-IzXG1aJw.js.map +0 -1
- package/dist/DataTable-DIXP9-Bx.js.map +0 -1
- package/dist/Dialog-_tHqOsbr.js.map +0 -1
- package/dist/DndHandleButton-BRlodkDO.js.map +0 -1
- package/dist/Drawer-D-ThWNp0.js.map +0 -1
- package/dist/DrillDown.module-1VBKDZRA.js +0 -27
- package/dist/DrillDown.module-1VBKDZRA.js.map +0 -1
- package/dist/Lato.css +0 -24
- package/dist/ListView-YJscfG4x.js.map +0 -1
- package/dist/NumberField-CxmJx4gs.js +0 -252
- package/dist/NumberField-CxmJx4gs.js.map +0 -1
- package/dist/Tab-DR5YYXkq.js.map +0 -1
- package/dist/Toaster-SqkX0Kes.js.map +0 -1
- package/dist/app-css.379821199ec8105f2efd.bundle.css +0 -57579
- package/dist/bugfix-71.1orion.css +0 -491
- package/dist/design-system.859a127fc3b66175f0f0.bundle.css +0 -34599
- package/dist/drag_indicator-BRHAPLSJ.js +0 -6
- package/dist/drag_indicator-BRHAPLSJ.js.map +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/kendo-css.ed976099efbbcc8b0639.bundle.css +0 -20601
- package/dist/luxon-wpz4A-OQ.js.map +0 -1
- package/dist/main.e26f249642be9a4bd747.bundle.css +0 -50386
- package/dist/react-ORV84FjM.js.map +0 -1
- package/dist/sui.a9dc22e36a27b7ea1ee8.bundle.css +0 -41149
- package/dist/useInitialFocus-CGybEc6x.js.map +0 -1
- package/dist/useNumberField-CXFYUZ_n.js.map +0 -1
- package/dist/usePrefersReducedMotion-DR9B_D6w.js.map +0 -1
- package/dist/vite.svg +0 -1
|
@@ -1,42 +1,53 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { C as Chip } from './Chip-
|
|
2
|
+
import { C as Chip } from './Chip-AIF0WiNS.js';
|
|
3
3
|
import { F as Flex } from './Flex-CRF7gj0_.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useId, useRef, useCallback, useMemo, createContext, forwardRef, useState, useEffect, useContext, useLayoutEffect, useImperativeHandle, memo as memo$1, Fragment as Fragment$1, isValidElement } from 'react';
|
|
6
6
|
import { T as Tooltip } from './Tooltip-C_VcYS9P.js';
|
|
7
7
|
import { c as cx } from './index-De1g9FRV.js';
|
|
8
|
-
import { D as DateTime } from './
|
|
8
|
+
import { D as DateTime } from './Calendar-BAIyDHX9.js';
|
|
9
9
|
import { A as ANV_PART_ATTR } from './anvParts-DFVq7-Cm.js';
|
|
10
|
-
import { C as Checkbox } from './Checkbox-
|
|
11
|
-
import { B as Button } from './Button-
|
|
10
|
+
import { C as Checkbox } from './Checkbox-4Ow8rCbD.js';
|
|
11
|
+
import { B as Button } from './Button-B_E6ybA-.js';
|
|
12
12
|
import { S as SvgChevronRight } from './chevron_right-BdpsxX7x.js';
|
|
13
13
|
import { S as SvgEdit } from './edit-DQOiktcu.js';
|
|
14
14
|
import { I as Icon } from './Icon-B5zwN7GD.js';
|
|
15
15
|
import { S as SrOnly } from './SrOnly-pnf8ajnh.js';
|
|
16
|
-
import { u as useNumberField } from './
|
|
16
|
+
import { u as useNumberField } from './NumberField-DhxywJVp.js';
|
|
17
17
|
import { u as useMergeRefs, m as mergeRefs } from './useMergeRefs-Dfmtq9cI.js';
|
|
18
|
-
import { a as SelectMenuSync, S as SelectMenu } from './SelectMenuSync-
|
|
19
|
-
import { a as MultiSelectMenuSync, M as MultiSelectMenu } from './MultiSelectMenuSync-
|
|
18
|
+
import { a as SelectMenuSync, S as SelectMenu } from './SelectMenuSync-CvXx-6uU.js';
|
|
19
|
+
import { a as MultiSelectMenuSync, M as MultiSelectMenu } from './MultiSelectMenuSync-BUJbWN2I.js';
|
|
20
20
|
import { S as SvgClose } from './close-DZj38AEh.js';
|
|
21
|
-
import { S as SvgDragIndicator } from './
|
|
21
|
+
import { S as SvgDragIndicator } from './DndHandleButton-BJqj2hc0.js';
|
|
22
22
|
import { u as usePortalScopeStyle, p as portalScopeClassNames } from './portalScopeClassNames-DA28LrXe.js';
|
|
23
23
|
import { a as useOnClickOutside, r as registerLayer, u as unregisterLayer } from './useOnClickOutside-Zw5vzxSq.js';
|
|
24
24
|
import { u as useBreakpoint } from './useBreakpoint-BBNRlMGZ.js';
|
|
25
25
|
import { c as computePosition, o as offset, h as autoPlacement, d as shift, g as size, a as autoUpdate, s as safeShowPopover, b as safeHidePopover } from './floating-ui.react-dom-BIKT960u.js';
|
|
26
|
-
import { F as FieldLabel } from './FieldLabel-
|
|
26
|
+
import { F as FieldLabel } from './FieldLabel-DYcUS3A4.js';
|
|
27
27
|
import { S as StatusIcon } from './StatusIcon-BqorkNJf.js';
|
|
28
28
|
import { flushSync } from 'react-dom';
|
|
29
29
|
import { u as useLayoutPropsUtil } from './useLayoutPropsUtil-DjqeAJZ9.js';
|
|
30
30
|
import { S as SvgKeyboardArrowLeft } from './keyboard_arrow_left-CiE1n99w.js';
|
|
31
31
|
import { S as SvgKeyboardArrowRight } from './keyboard_arrow_right-DMloHg_F.js';
|
|
32
|
-
import { a as PARTS$1, b as Pagination, P as Pagination$1 } from './Pagination-
|
|
32
|
+
import { a as PARTS$1, b as Pagination, P as Pagination$1 } from './Pagination-DYpUtMha.js';
|
|
33
33
|
import { useTrackingId } from './useTrackingId.js';
|
|
34
34
|
import { T as ThemeProviderContext } from './ThemeProviderContext-l52GohYT.js';
|
|
35
35
|
import { u as useVirtualizer } from './index-DXeGMe23.js';
|
|
36
|
+
import { M as Menu } from './Menu-DqP7YQgE.js';
|
|
37
|
+
import { F as FilterBar } from './FilterBar-DbDfZph-.js';
|
|
38
|
+
import { T as Toolbar, a as ToolbarButton } from './Toolbar-DgPah7M3.js';
|
|
39
|
+
import { S as SvgAdd } from './add-BcQkAUip.js';
|
|
36
40
|
import { u as useOptionallyControlledState } from './useOptionallyControlledState-DbDuos5L.js';
|
|
37
41
|
import { S as Spinner } from './Spinner-B7tTWcP6.js';
|
|
42
|
+
import { C as Card } from './Card-Bt0F6RTq.js';
|
|
43
|
+
import { D as Dialog } from './Dialog-KDAJphrA.js';
|
|
44
|
+
import { D as Divider } from './Divider-C7fp5Xb6.js';
|
|
45
|
+
import { DndSort } from './DndSort.js';
|
|
46
|
+
import { D as Drawer } from './Drawer-C7E2NNnH.js';
|
|
47
|
+
import { G as Grid } from './Grid-BPCDtqoT.js';
|
|
48
|
+
import { T as Text } from './Text-BRbkPr5s.js';
|
|
38
49
|
|
|
39
|
-
import './
|
|
50
|
+
import './DataTableEditColumnsDrawer.css';const SvgResizeWindowAlt = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M4.4 21 21 4.425 19.575 3 3 19.575zm10.025 0L21 14.425 19.575 13 13 19.575z" }));
|
|
40
51
|
|
|
41
52
|
const SURFACE_VIEWPORT_PADDING = 8;
|
|
42
53
|
const SURFACE_MIN_WIDTH = 240;
|
|
@@ -232,7 +243,7 @@ const surface = "_surface_9apry_1";
|
|
|
232
243
|
const header = "_header_9apry_55";
|
|
233
244
|
const title = "_title_9apry_83";
|
|
234
245
|
const content = "_content_9apry_110";
|
|
235
|
-
const styles$
|
|
246
|
+
const styles$j = {
|
|
236
247
|
surface: surface,
|
|
237
248
|
header: header,
|
|
238
249
|
"header-bottom-border": "_header-bottom-border_9apry_71",
|
|
@@ -822,7 +833,7 @@ const SurfaceContent = forwardRef(
|
|
|
822
833
|
popover: "manual",
|
|
823
834
|
...dialogProps,
|
|
824
835
|
tabIndex: -1,
|
|
825
|
-
className: cx(className, styles$
|
|
836
|
+
className: cx(className, styles$j["surface"], portalScopeClassNames),
|
|
826
837
|
style: portalSurfaceStyle,
|
|
827
838
|
onKeyDown: handleSurfaceKeyDown,
|
|
828
839
|
"data-anv": "surface-content",
|
|
@@ -832,19 +843,19 @@ const SurfaceContent = forwardRef(
|
|
|
832
843
|
/* @__PURE__ */ jsxs(
|
|
833
844
|
"div",
|
|
834
845
|
{
|
|
835
|
-
className: cx(styles$
|
|
836
|
-
[styles$
|
|
846
|
+
className: cx(styles$j["header"], {
|
|
847
|
+
[styles$j["header-bottom-border"]]: title
|
|
837
848
|
}),
|
|
838
849
|
children: [
|
|
839
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
840
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
850
|
+
/* @__PURE__ */ jsx("div", { className: styles$j["header-copy"], children: title ? /* @__PURE__ */ jsx("div", { id: titleId, className: styles$j["title"], children: title }) : null }),
|
|
851
|
+
/* @__PURE__ */ jsxs("div", { className: styles$j["header-actions"], children: [
|
|
841
852
|
headerContent,
|
|
842
853
|
!isDrawerMode ? /* @__PURE__ */ jsx(
|
|
843
854
|
Button,
|
|
844
855
|
{
|
|
845
856
|
appearance: "ghost",
|
|
846
857
|
"aria-label": "Move surface",
|
|
847
|
-
className: styles$
|
|
858
|
+
className: styles$j["drag-handle"],
|
|
848
859
|
"data-anv": "surface-drag-handle",
|
|
849
860
|
icon: SvgDragIndicator,
|
|
850
861
|
onBlur: handleDragKeyboardInteractionBlur,
|
|
@@ -863,7 +874,7 @@ const SurfaceContent = forwardRef(
|
|
|
863
874
|
{
|
|
864
875
|
appearance: "ghost",
|
|
865
876
|
"aria-label": closeButtonLabel,
|
|
866
|
-
className: styles$
|
|
877
|
+
className: styles$j["close-button"],
|
|
867
878
|
"data-anv": "surface-close-button",
|
|
868
879
|
icon: SvgClose,
|
|
869
880
|
onClick: onClose,
|
|
@@ -878,8 +889,8 @@ const SurfaceContent = forwardRef(
|
|
|
878
889
|
/* @__PURE__ */ jsx(
|
|
879
890
|
"div",
|
|
880
891
|
{
|
|
881
|
-
className: cx(styles$
|
|
882
|
-
[styles$
|
|
892
|
+
className: cx(styles$j["content"], {
|
|
893
|
+
[styles$j["content-title-spacing"]]: title
|
|
883
894
|
}),
|
|
884
895
|
children
|
|
885
896
|
}
|
|
@@ -888,7 +899,7 @@ const SurfaceContent = forwardRef(
|
|
|
888
899
|
"button",
|
|
889
900
|
{
|
|
890
901
|
"aria-label": "Resize surface",
|
|
891
|
-
className: styles$
|
|
902
|
+
className: styles$j["resize-handle"],
|
|
892
903
|
"data-anv": "surface-resize-handle",
|
|
893
904
|
onBlur: handleResizeKeyboardInteractionBlur,
|
|
894
905
|
onKeyDown: handleResizeKeyDown,
|
|
@@ -945,7 +956,7 @@ const booleanFormatter = (value, { trueLabel = "True", falseLabel = "False" } =
|
|
|
945
956
|
return value ? trueLabel : falseLabel;
|
|
946
957
|
};
|
|
947
958
|
|
|
948
|
-
const styles$
|
|
959
|
+
const styles$i = {
|
|
949
960
|
"table-header-cell": "_table-header-cell_185r9_4",
|
|
950
961
|
"table-body-cell": "_table-body-cell_185r9_5",
|
|
951
962
|
"table-footer-cell": "_table-footer-cell_185r9_6",
|
|
@@ -960,10 +971,10 @@ const styles$h = {
|
|
|
960
971
|
};
|
|
961
972
|
|
|
962
973
|
const TableEmptyCellContent = () => {
|
|
963
|
-
return /* @__PURE__ */ jsx("span", { "aria-label": "empty table cell", className: styles$
|
|
974
|
+
return /* @__PURE__ */ jsx("span", { "aria-label": "empty table cell", className: styles$i["empty-cell"], children: "—" });
|
|
964
975
|
};
|
|
965
976
|
|
|
966
|
-
const styles$
|
|
977
|
+
const styles$h = {
|
|
967
978
|
"truncate-chips": "_truncate-chips_16wxd_4",
|
|
968
979
|
"truncate-chips-measurement": "_truncate-chips-measurement_16wxd_17"
|
|
969
980
|
};
|
|
@@ -1046,7 +1057,7 @@ const TruncateChips = ({
|
|
|
1046
1057
|
{
|
|
1047
1058
|
ref: containerRef,
|
|
1048
1059
|
"data-anv": "truncate-chips",
|
|
1049
|
-
className: cx(styles$
|
|
1060
|
+
className: cx(styles$h["truncate-chips"], className),
|
|
1050
1061
|
style: { visibility: visibleCount === null ? "hidden" : void 0 },
|
|
1051
1062
|
...rest,
|
|
1052
1063
|
children: [
|
|
@@ -1055,7 +1066,7 @@ const TruncateChips = ({
|
|
|
1055
1066
|
{
|
|
1056
1067
|
ref: measurementRef,
|
|
1057
1068
|
"data-anv": "truncate-chips-measurement",
|
|
1058
|
-
className: styles$
|
|
1069
|
+
className: styles$h["truncate-chips-measurement"],
|
|
1059
1070
|
"aria-hidden": true,
|
|
1060
1071
|
children: [
|
|
1061
1072
|
items.map((chip, index) => /* @__PURE__ */ jsx(Chip, { ...chip }, index)),
|
|
@@ -1375,7 +1386,7 @@ const container = "_container_16fej_23";
|
|
|
1375
1386
|
const heading1 = "_heading1_16fej_29";
|
|
1376
1387
|
const heading2 = "_heading2_16fej_30";
|
|
1377
1388
|
const heading3 = "_heading3_16fej_31";
|
|
1378
|
-
const styles$
|
|
1389
|
+
const styles$g = {
|
|
1379
1390
|
highlight: highlight,
|
|
1380
1391
|
code: code,
|
|
1381
1392
|
list: list,
|
|
@@ -1410,11 +1421,11 @@ function parseInline(text) {
|
|
|
1410
1421
|
parts.push(/* @__PURE__ */ jsx("em", { children: parseInline(match[3]) }, key));
|
|
1411
1422
|
} else if (match[4]) {
|
|
1412
1423
|
parts.push(
|
|
1413
|
-
/* @__PURE__ */ jsx("mark", { className: styles$
|
|
1424
|
+
/* @__PURE__ */ jsx("mark", { className: styles$g.highlight, children: parseInline(match[4]) }, key)
|
|
1414
1425
|
);
|
|
1415
1426
|
} else if (match[5]) {
|
|
1416
1427
|
parts.push(
|
|
1417
|
-
/* @__PURE__ */ jsx("code", { className: styles$
|
|
1428
|
+
/* @__PURE__ */ jsx("code", { className: styles$g.code, children: match[5] }, key)
|
|
1418
1429
|
);
|
|
1419
1430
|
} else if (match[6]) {
|
|
1420
1431
|
parts.push(/* @__PURE__ */ jsx("s", { children: parseInline(match[6]) }, key));
|
|
@@ -1478,11 +1489,11 @@ function renderBlocks(blocks) {
|
|
|
1478
1489
|
case "text":
|
|
1479
1490
|
return /* @__PURE__ */ jsx("span", { children: parseInline(block.content) }, index);
|
|
1480
1491
|
case "heading":
|
|
1481
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
1492
|
+
return /* @__PURE__ */ jsx("span", { className: styles$g[`heading${block.level}`], children: parseInline(block.content) }, index);
|
|
1482
1493
|
case "ul":
|
|
1483
|
-
return /* @__PURE__ */ jsx("ul", { className: styles$
|
|
1494
|
+
return /* @__PURE__ */ jsx("ul", { className: styles$g.list, children: block.items.map((item, i) => /* @__PURE__ */ jsx("li", { children: parseInline(item) }, i)) }, index);
|
|
1484
1495
|
case "ol":
|
|
1485
|
-
return /* @__PURE__ */ jsx("ol", { className: styles$
|
|
1496
|
+
return /* @__PURE__ */ jsx("ol", { className: styles$g.list, children: block.items.map((item, i) => /* @__PURE__ */ jsx("li", { children: parseInline(item) }, i)) }, index);
|
|
1486
1497
|
}
|
|
1487
1498
|
});
|
|
1488
1499
|
}
|
|
@@ -1494,7 +1505,7 @@ const markdownFormatter = (value) => {
|
|
|
1494
1505
|
if (blocks.length === 1 && blocks[0].type === "text") {
|
|
1495
1506
|
return /* @__PURE__ */ jsx(Fragment, { children: parseInline(blocks[0].content) });
|
|
1496
1507
|
}
|
|
1497
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
1508
|
+
return /* @__PURE__ */ jsx("div", { className: styles$g.container, children: renderBlocks(blocks) });
|
|
1498
1509
|
};
|
|
1499
1510
|
|
|
1500
1511
|
const htmlFormatter = (value) => {
|
|
@@ -2567,7 +2578,7 @@ const unique = (columnId, leafRows) => {
|
|
|
2567
2578
|
const uniqueCount = (columnId, leafRows) => {
|
|
2568
2579
|
return new Set(leafRows.map(d => d.getValue(columnId))).size;
|
|
2569
2580
|
};
|
|
2570
|
-
const count = (_columnId, leafRows) => {
|
|
2581
|
+
const count$1 = (_columnId, leafRows) => {
|
|
2571
2582
|
return leafRows.length;
|
|
2572
2583
|
};
|
|
2573
2584
|
const aggregationFns = {
|
|
@@ -2579,7 +2590,7 @@ const aggregationFns = {
|
|
|
2579
2590
|
median,
|
|
2580
2591
|
unique,
|
|
2581
2592
|
uniqueCount,
|
|
2582
|
-
count
|
|
2593
|
+
count: count$1
|
|
2583
2594
|
};
|
|
2584
2595
|
|
|
2585
2596
|
//
|
|
@@ -4886,7 +4897,24 @@ const PARTS = {
|
|
|
4886
4897
|
expandButton: "expand-button",
|
|
4887
4898
|
expandAllButton: "expand-all-button",
|
|
4888
4899
|
resizeHandle: "resize-handle",
|
|
4889
|
-
editableInput: "editable-input"
|
|
4900
|
+
editableInput: "editable-input",
|
|
4901
|
+
bulkActionBar: "bulk-action-bar",
|
|
4902
|
+
bulkSelectAllButton: "bulk-select-all-button",
|
|
4903
|
+
bulkCancelButton: "bulk-cancel-button",
|
|
4904
|
+
bulkActionsMenuButton: "bulk-actions-menu-button",
|
|
4905
|
+
bulkActionButton: "bulk-action-button",
|
|
4906
|
+
bulkActionMenuItem: "bulk-action-menu-item",
|
|
4907
|
+
rowAddButton: "row-add-button",
|
|
4908
|
+
editColumnsButton: "edit-columns-button",
|
|
4909
|
+
editColumnsDrawer: "edit-columns-drawer",
|
|
4910
|
+
columnsSection: "columns-section",
|
|
4911
|
+
columnCard: "column-card",
|
|
4912
|
+
pinColumnButton: "pin-column-button",
|
|
4913
|
+
hideColumnButton: "hide-column-button",
|
|
4914
|
+
resetColumnsButton: "reset-columns-button",
|
|
4915
|
+
applyButton: "apply-button",
|
|
4916
|
+
cancelButton: "cancel-button",
|
|
4917
|
+
confirmButton: "confirm-button"
|
|
4890
4918
|
};
|
|
4891
4919
|
|
|
4892
4920
|
const DTFocusStateContext = createContext({
|
|
@@ -4944,7 +4972,7 @@ function useDTFocusDispatchContext() {
|
|
|
4944
4972
|
};
|
|
4945
4973
|
}
|
|
4946
4974
|
|
|
4947
|
-
const styles$
|
|
4975
|
+
const styles$f = {
|
|
4948
4976
|
"table-base": "_table-base_1tsp8_4",
|
|
4949
4977
|
"data-table-base": "_data-table-base_1tsp8_21"
|
|
4950
4978
|
};
|
|
@@ -4954,7 +4982,7 @@ const SimpleTableBase = ({
|
|
|
4954
4982
|
className,
|
|
4955
4983
|
...rest
|
|
4956
4984
|
}) => {
|
|
4957
|
-
const tableBaseClassNames = cx(className, styles$
|
|
4985
|
+
const tableBaseClassNames = cx(className, styles$f["table-base"]);
|
|
4958
4986
|
return /* @__PURE__ */ jsx(
|
|
4959
4987
|
"table",
|
|
4960
4988
|
{
|
|
@@ -4973,7 +5001,7 @@ const DataTableBase = ({
|
|
|
4973
5001
|
hasSubRows,
|
|
4974
5002
|
...rest
|
|
4975
5003
|
}) => {
|
|
4976
|
-
const tableBaseClassNames = cx(className, styles$
|
|
5004
|
+
const tableBaseClassNames = cx(className, styles$f["data-table-base"]);
|
|
4977
5005
|
const { focusTableGenerally, blur, moveFocusToCell } = useDTFocusDispatchContext();
|
|
4978
5006
|
const handleBlur = (event) => {
|
|
4979
5007
|
if (!event.currentTarget.contains(event.relatedTarget)) {
|
|
@@ -5027,12 +5055,12 @@ const TableBase = ({ type, ...rest }) => {
|
|
|
5027
5055
|
}
|
|
5028
5056
|
};
|
|
5029
5057
|
|
|
5030
|
-
const styles$
|
|
5058
|
+
const styles$e = {
|
|
5031
5059
|
"table-body": "_table-body_z02xk_4"
|
|
5032
5060
|
};
|
|
5033
5061
|
|
|
5034
5062
|
function TableBody({ type, children, ...rest }) {
|
|
5035
|
-
const classes = cx(styles$
|
|
5063
|
+
const classes = cx(styles$e["table-body"], rest.className);
|
|
5036
5064
|
const Element = type === "simple" ? "tbody" : "div";
|
|
5037
5065
|
return /* @__PURE__ */ jsx(
|
|
5038
5066
|
Element,
|
|
@@ -5050,20 +5078,20 @@ const getCommonPinningClasses = (column) => {
|
|
|
5050
5078
|
const isPinned = column.getIsPinned();
|
|
5051
5079
|
if (!isPinned) return void 0;
|
|
5052
5080
|
return cx({
|
|
5053
|
-
[styles$
|
|
5054
|
-
[styles$
|
|
5055
|
-
[styles$
|
|
5056
|
-
[styles$
|
|
5081
|
+
[styles$i["first-pinned-left-column"]]: isPinned === "left" && column.getIsFirstColumn("left"),
|
|
5082
|
+
[styles$i["last-pinned-left-column"]]: isPinned === "left" && column.getIsLastColumn("left"),
|
|
5083
|
+
[styles$i["first-pinned-right-column"]]: isPinned === "right" && column.getIsFirstColumn("right"),
|
|
5084
|
+
[styles$i["last-pinned-right-column"]]: isPinned === "right" && column.getIsLastColumn("right")
|
|
5057
5085
|
});
|
|
5058
5086
|
};
|
|
5059
5087
|
|
|
5060
|
-
const styles$
|
|
5088
|
+
const styles$d = {
|
|
5061
5089
|
"data-table-body-cell-affordance-container": "_data-table-body-cell-affordance-container_1eir6_1",
|
|
5062
5090
|
"data-table-body-cell-affordance-host": "_data-table-body-cell-affordance-host_1eir6_6",
|
|
5063
5091
|
"data-table-body-cell-affordance-container-interactive": "_data-table-body-cell-affordance-container-interactive_1eir6_21"
|
|
5064
5092
|
};
|
|
5065
5093
|
|
|
5066
|
-
const dataTableCellAffordanceHostClassName = styles$
|
|
5094
|
+
const dataTableCellAffordanceHostClassName = styles$d["data-table-body-cell-affordance-host"];
|
|
5067
5095
|
|
|
5068
5096
|
function DataTableCellAffordance({
|
|
5069
5097
|
children,
|
|
@@ -5072,8 +5100,8 @@ function DataTableCellAffordance({
|
|
|
5072
5100
|
return /* @__PURE__ */ jsx(
|
|
5073
5101
|
"span",
|
|
5074
5102
|
{
|
|
5075
|
-
className: cx(styles$
|
|
5076
|
-
[styles$
|
|
5103
|
+
className: cx(styles$d["data-table-body-cell-affordance-container"], {
|
|
5104
|
+
[styles$d["data-table-body-cell-affordance-container-interactive"]]: interactive
|
|
5077
5105
|
}),
|
|
5078
5106
|
"aria-hidden": true,
|
|
5079
5107
|
children
|
|
@@ -5086,9 +5114,9 @@ const DataTableEditableCellEditIcon = () => {
|
|
|
5086
5114
|
};
|
|
5087
5115
|
|
|
5088
5116
|
const TableBodyCell = forwardRef(({ type, children, className, isExpandCell, isSelectCell, ...rest }, ref) => {
|
|
5089
|
-
const classes = cx(styles$
|
|
5090
|
-
[styles$
|
|
5091
|
-
[styles$
|
|
5117
|
+
const classes = cx(styles$i["table-body-cell"], className, {
|
|
5118
|
+
[styles$i["table-cell-internal-expand"]]: isExpandCell,
|
|
5119
|
+
[styles$i["table-cell-internal-select"]]: isSelectCell
|
|
5092
5120
|
});
|
|
5093
5121
|
const CellElement = type === "simple" ? "td" : "div";
|
|
5094
5122
|
return /* @__PURE__ */ jsx(
|
|
@@ -5105,10 +5133,10 @@ const TableBodyCell = forwardRef(({ type, children, className, isExpandCell, isS
|
|
|
5105
5133
|
});
|
|
5106
5134
|
TableBodyCell.displayName = "TableBodyCell";
|
|
5107
5135
|
|
|
5108
|
-
const styles$
|
|
5136
|
+
const styles$c = {
|
|
5109
5137
|
"data-table-body-cell-input": "_data-table-body-cell-input_1t30b_4"};
|
|
5110
5138
|
|
|
5111
|
-
const styles$
|
|
5139
|
+
const styles$b = {
|
|
5112
5140
|
"data-table-body-cell": "_data-table-body-cell_1gi7u_4",
|
|
5113
5141
|
"data-table-body-cell-input": "_data-table-body-cell-input_1gi7u_5",
|
|
5114
5142
|
"table-body-cell": "_table-body-cell_1gi7u_10",
|
|
@@ -5244,11 +5272,11 @@ function DataTableBodyImmutableCell(props) {
|
|
|
5244
5272
|
const meta = cell.row.original.meta;
|
|
5245
5273
|
const cellError = meta?.errors?.[column.id];
|
|
5246
5274
|
const cellWarning = meta?.warnings?.[column.id];
|
|
5247
|
-
const classes = cx(styles$
|
|
5248
|
-
[styles$
|
|
5249
|
-
[styles$
|
|
5250
|
-
[styles$
|
|
5251
|
-
[styles$
|
|
5275
|
+
const classes = cx(styles$b["data-table-body-cell"], rest.className, {
|
|
5276
|
+
[styles$b["data-table-body-cell-error"]]: !!cellError,
|
|
5277
|
+
[styles$b["data-table-body-cell-warning"]]: !cellError && !!cellWarning,
|
|
5278
|
+
[styles$i["table-cell-internal-expand"]]: isExpandCell,
|
|
5279
|
+
[styles$i["table-cell-internal-select"]]: isSelectCell
|
|
5252
5280
|
});
|
|
5253
5281
|
const commonPinningStyles = useCommonPinningStyles(column);
|
|
5254
5282
|
const { jumpFocus, moveFocus } = useDTFocusDispatchContext();
|
|
@@ -5488,10 +5516,10 @@ function DataTableEditableTextCellInner(props, ref) {
|
|
|
5488
5516
|
}, [commitValue]);
|
|
5489
5517
|
const classes = cx(
|
|
5490
5518
|
dataTableCellAffordanceHostClassName,
|
|
5491
|
-
styles$
|
|
5519
|
+
styles$c["data-table-body-cell-editable"],
|
|
5492
5520
|
cellProps.className,
|
|
5493
5521
|
{
|
|
5494
|
-
[styles$
|
|
5522
|
+
[styles$b["data-table-body-cell-editing"]]: isEditing
|
|
5495
5523
|
}
|
|
5496
5524
|
);
|
|
5497
5525
|
const handleCellKeyDown = useCallback(
|
|
@@ -5562,7 +5590,7 @@ function DataTableEditableTextCellInner(props, ref) {
|
|
|
5562
5590
|
type: "text",
|
|
5563
5591
|
name: `${cell.column.id}-row-${cellPosition.rowIndex}`,
|
|
5564
5592
|
value: draftValue,
|
|
5565
|
-
className: styles$
|
|
5593
|
+
className: styles$c["data-table-body-cell-input"],
|
|
5566
5594
|
onChange: handleInputChange,
|
|
5567
5595
|
onBlur: handleInputBlur,
|
|
5568
5596
|
onKeyDown: handleInputKeyDown,
|
|
@@ -5684,10 +5712,10 @@ function DataTableEditableNumberCellInner(props, ref) {
|
|
|
5684
5712
|
commitValue();
|
|
5685
5713
|
}, [commitValue]);
|
|
5686
5714
|
const classes = cx(
|
|
5687
|
-
styles$
|
|
5715
|
+
styles$c["data-table-body-cell-editable"],
|
|
5688
5716
|
cellProps.className,
|
|
5689
5717
|
{
|
|
5690
|
-
[styles$
|
|
5718
|
+
[styles$b["data-table-body-cell-editing"]]: isEditing
|
|
5691
5719
|
}
|
|
5692
5720
|
);
|
|
5693
5721
|
const handleCellKeyDown = useCallback(
|
|
@@ -5759,7 +5787,7 @@ function DataTableEditableNumberCellInner(props, ref) {
|
|
|
5759
5787
|
name: `${cell.column.id}-row-${cellPosition.rowIndex}`,
|
|
5760
5788
|
"aria-label": inputAriaLabel,
|
|
5761
5789
|
"aria-describedby": instructionsId,
|
|
5762
|
-
className: styles$
|
|
5790
|
+
className: styles$c["data-table-body-cell-input"],
|
|
5763
5791
|
onBlur: handleInputBlur,
|
|
5764
5792
|
onKeyDown: handleInputKeyDown,
|
|
5765
5793
|
...{ [ANV_PART_ATTR]: PARTS.editableInput }
|
|
@@ -5925,7 +5953,7 @@ function DataTableEditableSelectCellInner(props, ref) {
|
|
|
5925
5953
|
...restCellProps,
|
|
5926
5954
|
className: cx(
|
|
5927
5955
|
dataTableCellAffordanceHostClassName,
|
|
5928
|
-
styles$
|
|
5956
|
+
styles$c["data-table-body-cell-editable"],
|
|
5929
5957
|
className
|
|
5930
5958
|
),
|
|
5931
5959
|
onMouseDown: handleCellMouseDown(onClick),
|
|
@@ -6074,7 +6102,7 @@ function DataTableEditableSelectAsyncCellInner(props, ref) {
|
|
|
6074
6102
|
tabIndex,
|
|
6075
6103
|
type: "data-table",
|
|
6076
6104
|
...restCellProps,
|
|
6077
|
-
className: cx(styles$
|
|
6105
|
+
className: cx(styles$c["data-table-body-cell-editable"], className),
|
|
6078
6106
|
onMouseDown: handleCellMouseDown(onClick),
|
|
6079
6107
|
onBlur: handleCellBlur,
|
|
6080
6108
|
onFocus: handleCellFocus,
|
|
@@ -6186,7 +6214,7 @@ function DataTableEditableMultiselectCellInner(props, ref) {
|
|
|
6186
6214
|
tabIndex,
|
|
6187
6215
|
type: "data-table",
|
|
6188
6216
|
...restCellProps,
|
|
6189
|
-
className: cx(styles$
|
|
6217
|
+
className: cx(styles$c["data-table-body-cell-editable"], className),
|
|
6190
6218
|
onMouseDown: handleCellMouseDown(onClick),
|
|
6191
6219
|
onBlur: handleCellBlur,
|
|
6192
6220
|
onFocus: handleCellFocus,
|
|
@@ -6333,7 +6361,7 @@ function DataTableEditableMultiselectAsyncCellInner(props, ref) {
|
|
|
6333
6361
|
tabIndex,
|
|
6334
6362
|
type: "data-table",
|
|
6335
6363
|
...restCellProps,
|
|
6336
|
-
className: cx(styles$
|
|
6364
|
+
className: cx(styles$c["data-table-body-cell-editable"], className),
|
|
6337
6365
|
onMouseDown: handleCellMouseDown(onClick),
|
|
6338
6366
|
onBlur: handleCellBlur,
|
|
6339
6367
|
onFocus: handleCellFocus,
|
|
@@ -6471,7 +6499,7 @@ function DataTableEditableBooleanCellInner(props, ref) {
|
|
|
6471
6499
|
tabIndex,
|
|
6472
6500
|
type: "data-table",
|
|
6473
6501
|
...restCellProps,
|
|
6474
|
-
className: cx(styles$
|
|
6502
|
+
className: cx(styles$c["data-table-body-cell-editable"], className),
|
|
6475
6503
|
onMouseDown: handleCellMouseDown(onClick),
|
|
6476
6504
|
onBlur: handleCellBlur,
|
|
6477
6505
|
onFocus: handleCellFocus,
|
|
@@ -6948,10 +6976,10 @@ function DataTableEditableCustomCellInner(props, ref) {
|
|
|
6948
6976
|
);
|
|
6949
6977
|
const classes = cx(
|
|
6950
6978
|
dataTableCellAffordanceHostClassName,
|
|
6951
|
-
styles$
|
|
6979
|
+
styles$c["data-table-body-cell-editable"],
|
|
6952
6980
|
cellProps.className,
|
|
6953
6981
|
{
|
|
6954
|
-
[styles$
|
|
6982
|
+
[styles$b["data-table-body-cell-editing"]]: isOpen
|
|
6955
6983
|
}
|
|
6956
6984
|
);
|
|
6957
6985
|
const handleCellKeyDown = useCallback(
|
|
@@ -7079,12 +7107,12 @@ function DataTableBodyMutableCell(props) {
|
|
|
7079
7107
|
const cellError = meta?.errors?.[column.id];
|
|
7080
7108
|
const cellWarning = meta?.warnings?.[column.id];
|
|
7081
7109
|
const classes = cx(
|
|
7082
|
-
styles$
|
|
7110
|
+
styles$b["data-table-body-cell"],
|
|
7083
7111
|
dataTableCellAffordanceHostClassName,
|
|
7084
7112
|
rest.className,
|
|
7085
7113
|
{
|
|
7086
|
-
[styles$
|
|
7087
|
-
[styles$
|
|
7114
|
+
[styles$b["data-table-body-cell-error"]]: !!cellError,
|
|
7115
|
+
[styles$b["data-table-body-cell-warning"]]: !cellError && !!cellWarning
|
|
7088
7116
|
}
|
|
7089
7117
|
);
|
|
7090
7118
|
const commonPinningStyles = useCommonPinningStyles(column);
|
|
@@ -7186,7 +7214,7 @@ function DataTableBodyMutableCell(props) {
|
|
|
7186
7214
|
|
|
7187
7215
|
const SvgOpenInFull = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M21 8.59V4c0-.55-.45-1-1-1h-4.59c-.89 0-1.34 1.08-.71 1.71l1.59 1.59-10 10-1.59-1.59c-.62-.63-1.7-.19-1.7.7V20c0 .55.45 1 1 1h4.59c.89 0 1.34-1.08.71-1.71L7.71 17.7l10-10 1.59 1.59c.62.63 1.7.19 1.7-.7z" }));
|
|
7188
7216
|
|
|
7189
|
-
const styles$
|
|
7217
|
+
const styles$a = {
|
|
7190
7218
|
"data-table-body-cell-overflow": "_data-table-body-cell-overflow_1xy0x_1",
|
|
7191
7219
|
"data-table-body-cell-overflow-viewport": "_data-table-body-cell-overflow-viewport_1xy0x_5",
|
|
7192
7220
|
"data-table-body-cell-overflow-content": "_data-table-body-cell-overflow-content_1xy0x_11",
|
|
@@ -7419,21 +7447,21 @@ function DataTableOverflowCell(props) {
|
|
|
7419
7447
|
const hasSurfaceTrigger = isClipped || isOpen;
|
|
7420
7448
|
const hasCellInstructions = isClipped || isOpen;
|
|
7421
7449
|
const classes = cx(
|
|
7422
|
-
styles$
|
|
7450
|
+
styles$b["data-table-body-cell"],
|
|
7423
7451
|
{
|
|
7424
7452
|
[dataTableCellAffordanceHostClassName]: isClipped,
|
|
7425
|
-
[styles$
|
|
7426
|
-
[styles$
|
|
7453
|
+
[styles$b["data-table-body-cell-error"]]: !!cellError,
|
|
7454
|
+
[styles$b["data-table-body-cell-warning"]]: !cellError && !!cellWarning
|
|
7427
7455
|
},
|
|
7428
|
-
styles$
|
|
7456
|
+
styles$a["data-table-body-cell-overflow"],
|
|
7429
7457
|
rest.className
|
|
7430
7458
|
);
|
|
7431
7459
|
const content = /* @__PURE__ */ jsx(
|
|
7432
7460
|
"div",
|
|
7433
7461
|
{
|
|
7434
7462
|
ref: viewportRef,
|
|
7435
|
-
className: styles$
|
|
7436
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$
|
|
7463
|
+
className: styles$a["data-table-body-cell-overflow-viewport"],
|
|
7464
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$a["data-table-body-cell-overflow-content"], children })
|
|
7437
7465
|
}
|
|
7438
7466
|
);
|
|
7439
7467
|
return /* @__PURE__ */ jsxs(Surface, { id: surfaceId, open: isOpen, children: [
|
|
@@ -7486,7 +7514,7 @@ function DataTableOverflowCell(props) {
|
|
|
7486
7514
|
{
|
|
7487
7515
|
ref: surfaceContentRef,
|
|
7488
7516
|
tabIndex: -1,
|
|
7489
|
-
className: styles$
|
|
7517
|
+
className: styles$a["data-table-body-cell-overflow-surface-content"],
|
|
7490
7518
|
children
|
|
7491
7519
|
}
|
|
7492
7520
|
)
|
|
@@ -7514,7 +7542,7 @@ function DataTableBodyCell(props) {
|
|
|
7514
7542
|
);
|
|
7515
7543
|
}
|
|
7516
7544
|
|
|
7517
|
-
const styles$
|
|
7545
|
+
const styles$9 = {
|
|
7518
7546
|
"data-table-body-row": "_data-table-body-row_1sv3s_4",
|
|
7519
7547
|
"data-table-body-row-read-only": "_data-table-body-row-read-only_1sv3s_28",
|
|
7520
7548
|
"data-table-body-sub-component-row": "_data-table-body-sub-component-row_1sv3s_35",
|
|
@@ -7660,8 +7688,8 @@ function DataTableBodyRowInner({
|
|
|
7660
7688
|
onMouseLeave: handleMouseLeave,
|
|
7661
7689
|
onClick: isRowClickable ? handleRowClick : void 0,
|
|
7662
7690
|
...isRowClickable ? { "data-anv-row-clickable": "true" } : {},
|
|
7663
|
-
className: cx(styles$
|
|
7664
|
-
[styles$
|
|
7691
|
+
className: cx(styles$9["data-table-body-row"], {
|
|
7692
|
+
[styles$9["data-table-body-row-read-only"]]: isReadOnly
|
|
7665
7693
|
}),
|
|
7666
7694
|
style: depth > 0 ? { "--a2-row-depth": depth } : void 0,
|
|
7667
7695
|
children: (() => {
|
|
@@ -7676,9 +7704,9 @@ function DataTableBodyRowInner({
|
|
|
7676
7704
|
firstDataCellClaimed = true;
|
|
7677
7705
|
}
|
|
7678
7706
|
const cellClasses = cx(getCommonPinningClasses(cell.column), {
|
|
7679
|
-
[styles$
|
|
7680
|
-
[styles$
|
|
7681
|
-
[styles$
|
|
7707
|
+
[styles$9["data-table-body-cell-group"]]: "columns" in cell.column.columnDef || cell.column.parent && isLastInParentGroup,
|
|
7708
|
+
[styles$9["data-table-body-cell-depth-indent"]]: isFirstDataCell,
|
|
7709
|
+
[styles$9["data-table-body-cell-action-depth-indent"]]: isExpandColumn
|
|
7682
7710
|
});
|
|
7683
7711
|
const columnIndex = columnIndexMap.get(cell.column.getIndex()) ?? -1;
|
|
7684
7712
|
return /* @__PURE__ */ jsx(
|
|
@@ -7705,10 +7733,10 @@ function DataTableBodyRowInner({
|
|
|
7705
7733
|
"aria-hidden": !isExpanded,
|
|
7706
7734
|
...{ [HAS_SUB_COMPONENT_ATTR]: "true" },
|
|
7707
7735
|
...isSelectedRow ? { [SELECTED_ATTR]: "true" } : {},
|
|
7708
|
-
className: styles$
|
|
7736
|
+
className: styles$9["data-table-body-sub-component-row"],
|
|
7709
7737
|
onMouseEnter: handleSubComponentMouseEnter,
|
|
7710
7738
|
onMouseLeave: handleSubComponentMouseLeave,
|
|
7711
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$
|
|
7739
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$9["data-table-body-sub-component-container"], children: /* @__PURE__ */ jsx(Flex, { className: styles$9["data-table-body-sub-component-content"], children: original.subComponent }) })
|
|
7712
7740
|
}
|
|
7713
7741
|
)
|
|
7714
7742
|
] }, row.id);
|
|
@@ -7813,7 +7841,7 @@ function VirtualizedContent({
|
|
|
7813
7841
|
return /* @__PURE__ */ jsx(
|
|
7814
7842
|
"div",
|
|
7815
7843
|
{
|
|
7816
|
-
className: styles$
|
|
7844
|
+
className: styles$9["data-table-body-virtualized"],
|
|
7817
7845
|
"data-virtualized-body": "true",
|
|
7818
7846
|
style: { height: `${totalSize}px` },
|
|
7819
7847
|
children: virtualItems.map((virtualRow) => {
|
|
@@ -7824,7 +7852,7 @@ function VirtualizedContent({
|
|
|
7824
7852
|
{
|
|
7825
7853
|
ref: measureRef,
|
|
7826
7854
|
"data-index": virtualRow.index,
|
|
7827
|
-
className: styles$
|
|
7855
|
+
className: styles$9["data-table-body-row-virtualized"],
|
|
7828
7856
|
style: { transform: `translateY(${virtualRow.start}px)` },
|
|
7829
7857
|
children: /* @__PURE__ */ jsx(
|
|
7830
7858
|
DataTableBodyRow,
|
|
@@ -7881,11 +7909,11 @@ function DataTableBody(props) {
|
|
|
7881
7909
|
) });
|
|
7882
7910
|
}
|
|
7883
7911
|
|
|
7884
|
-
const styles$
|
|
7912
|
+
const styles$8 = {
|
|
7885
7913
|
"table-footer": "_table-footer_1olw1_4"};
|
|
7886
7914
|
|
|
7887
7915
|
function TableFooter({ type, children, ...rest }) {
|
|
7888
|
-
const classes = cx(styles$
|
|
7916
|
+
const classes = cx(styles$8["table-footer"], rest.className);
|
|
7889
7917
|
const Element = type === "simple" ? "tfoot" : "div";
|
|
7890
7918
|
return /* @__PURE__ */ jsx(
|
|
7891
7919
|
Element,
|
|
@@ -7900,7 +7928,7 @@ function TableFooter({ type, children, ...rest }) {
|
|
|
7900
7928
|
|
|
7901
7929
|
const TableFooterCell = forwardRef((props, ref) => {
|
|
7902
7930
|
const { type, children, className, ...rest } = props;
|
|
7903
|
-
const classes = cx(styles$
|
|
7931
|
+
const classes = cx(styles$i["table-footer-cell"], className);
|
|
7904
7932
|
const CellElement = type === "simple" ? "td" : "div";
|
|
7905
7933
|
return /* @__PURE__ */ jsx(
|
|
7906
7934
|
CellElement,
|
|
@@ -7961,14 +7989,14 @@ function DataTableFooterCell(props) {
|
|
|
7961
7989
|
ref: footerCellRef,
|
|
7962
7990
|
tabIndex: -1,
|
|
7963
7991
|
onKeyDown: handleKeyDown,
|
|
7964
|
-
className: cx(styles$
|
|
7992
|
+
className: cx(styles$b["data-table-footer-cell"], className),
|
|
7965
7993
|
"data-cell-pos": formatCellPositionString(cellPosition),
|
|
7966
7994
|
children
|
|
7967
7995
|
}
|
|
7968
7996
|
);
|
|
7969
7997
|
}
|
|
7970
7998
|
|
|
7971
|
-
const styles$
|
|
7999
|
+
const styles$7 = {
|
|
7972
8000
|
"data-table-footer": "_data-table-footer_e7sq6_4",
|
|
7973
8001
|
"data-table-footer-row": "_data-table-footer-row_e7sq6_8"
|
|
7974
8002
|
};
|
|
@@ -8019,7 +8047,7 @@ function DefaultTableFooterRows({
|
|
|
8019
8047
|
{
|
|
8020
8048
|
role: "row",
|
|
8021
8049
|
"data-anv": "table-footer-row",
|
|
8022
|
-
className: styles$
|
|
8050
|
+
className: styles$7["data-table-footer-row"],
|
|
8023
8051
|
"aria-rowindex": rowIndex + 1,
|
|
8024
8052
|
children: table.getFlatHeaders().filter((header) => {
|
|
8025
8053
|
const column = findColumnById(columns, header.column.id);
|
|
@@ -8061,7 +8089,7 @@ function CustomTableFooterRows({
|
|
|
8061
8089
|
{
|
|
8062
8090
|
role: "row",
|
|
8063
8091
|
"data-anv": "table-footer-row",
|
|
8064
|
-
className: styles$
|
|
8092
|
+
className: styles$7["data-table-footer-row"],
|
|
8065
8093
|
"aria-rowindex": rowIndex + 1,
|
|
8066
8094
|
children: (() => {
|
|
8067
8095
|
let columnIndex = 0;
|
|
@@ -8099,7 +8127,7 @@ function DataTableFooter({
|
|
|
8099
8127
|
...rest
|
|
8100
8128
|
}) {
|
|
8101
8129
|
const columnCount = table.getFlatHeaders().length;
|
|
8102
|
-
const classes = cx(styles$
|
|
8130
|
+
const classes = cx(styles$7["data-table-footer"], rest.className);
|
|
8103
8131
|
return /* @__PURE__ */ jsx(TableFooter, { type: "data-table", ...rest, className: classes, children: customFooter ? /* @__PURE__ */ jsx(
|
|
8104
8132
|
CustomTableFooterRows,
|
|
8105
8133
|
{
|
|
@@ -8152,14 +8180,14 @@ function CellStatus({ status, variant }) {
|
|
|
8152
8180
|
{
|
|
8153
8181
|
variant,
|
|
8154
8182
|
size: "small",
|
|
8155
|
-
className: styles$
|
|
8183
|
+
className: styles$b[config.className],
|
|
8156
8184
|
rootProps: {
|
|
8157
8185
|
"aria-label": message ? `${config.label}: ${message}` : `${config.label}.`
|
|
8158
8186
|
}
|
|
8159
8187
|
}
|
|
8160
8188
|
);
|
|
8161
8189
|
if (!message) {
|
|
8162
|
-
return /* @__PURE__ */ jsx("span", { ref, className: styles$
|
|
8190
|
+
return /* @__PURE__ */ jsx("span", { ref, className: styles$b["cell-status"], children: icon });
|
|
8163
8191
|
}
|
|
8164
8192
|
const isTooltipOpen = isCellFocused || isHovered;
|
|
8165
8193
|
return /* @__PURE__ */ jsxs(Tooltip, { open: isTooltipOpen, children: [
|
|
@@ -8167,7 +8195,7 @@ function CellStatus({ status, variant }) {
|
|
|
8167
8195
|
Tooltip.Trigger,
|
|
8168
8196
|
{
|
|
8169
8197
|
ref,
|
|
8170
|
-
className: styles$
|
|
8198
|
+
className: styles$b["cell-status"],
|
|
8171
8199
|
onMouseEnter: () => setIsHovered(true),
|
|
8172
8200
|
onMouseLeave: () => setIsHovered(false),
|
|
8173
8201
|
children: icon
|
|
@@ -8362,8 +8390,8 @@ function getTanStackColumnDef({
|
|
|
8362
8390
|
return /* @__PURE__ */ jsxs(
|
|
8363
8391
|
"div",
|
|
8364
8392
|
{
|
|
8365
|
-
className: cx(styles$
|
|
8366
|
-
[styles$
|
|
8393
|
+
className: cx(styles$b["data-table-cell-content"], {
|
|
8394
|
+
[styles$b["data-table-cell-overflow-content"]]: leafColumnDef.overflow
|
|
8367
8395
|
}),
|
|
8368
8396
|
"data-align": resolvedAlign ?? "start",
|
|
8369
8397
|
children: [
|
|
@@ -8443,12 +8471,12 @@ const SvgArrowUpward = (props) => /* @__PURE__ */ React.createElement("svg", { x
|
|
|
8443
8471
|
|
|
8444
8472
|
const SvgArrowDownward = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M11 5v11.17l-4.88-4.88c-.39-.39-1.03-.39-1.42 0a.996.996 0 0 0 0 1.41l6.59 6.59c.39.39 1.02.39 1.41 0l6.59-6.59a.996.996 0 1 0-1.41-1.41L13 16.17V5c0-.55-.45-1-1-1s-1 .45-1 1z" }));
|
|
8445
8473
|
|
|
8446
|
-
const styles$
|
|
8474
|
+
const styles$6 = {
|
|
8447
8475
|
"table-header": "_table-header_1sk5h_4"
|
|
8448
8476
|
};
|
|
8449
8477
|
|
|
8450
8478
|
function TableHeader({ type, children, ...rest }) {
|
|
8451
|
-
const classes = cx(styles$
|
|
8479
|
+
const classes = cx(styles$6["table-header"], rest.className);
|
|
8452
8480
|
const Element = type === "simple" ? "thead" : "div";
|
|
8453
8481
|
return /* @__PURE__ */ jsx(
|
|
8454
8482
|
Element,
|
|
@@ -8473,12 +8501,12 @@ const TableHeaderCell = forwardRef(
|
|
|
8473
8501
|
isExpandCell,
|
|
8474
8502
|
...rest
|
|
8475
8503
|
}, ref) => {
|
|
8476
|
-
const classes = cx(styles$
|
|
8477
|
-
[styles$
|
|
8478
|
-
[styles$
|
|
8479
|
-
[styles$
|
|
8480
|
-
[styles$
|
|
8481
|
-
[styles$
|
|
8504
|
+
const classes = cx(styles$i["table-header-cell"], className, {
|
|
8505
|
+
[styles$i["table-header-cell-group"]]: isGroup,
|
|
8506
|
+
[styles$i["table-header-cell-sortable"]]: isSortable,
|
|
8507
|
+
[styles$i["table-header-cell-interactive"]]: isInteractiveHeaderCell,
|
|
8508
|
+
[styles$i["table-cell-internal-expand"]]: isExpandCell,
|
|
8509
|
+
[styles$i["table-cell-internal-select"]]: isSelectCell
|
|
8482
8510
|
});
|
|
8483
8511
|
const CellElement = type === "simple" ? "th" : "div";
|
|
8484
8512
|
return /* @__PURE__ */ jsx(
|
|
@@ -8634,7 +8662,7 @@ function DataTableHeaderCellInner(props, forwardedRef) {
|
|
|
8634
8662
|
onPointerDownCapture: handlePointerDownCapture,
|
|
8635
8663
|
onClick: handleClick,
|
|
8636
8664
|
onKeyDown: handleKeyDown,
|
|
8637
|
-
className: cx(styles$
|
|
8665
|
+
className: cx(styles$b["data-table-header-cell"], className),
|
|
8638
8666
|
"data-cell-pos": formatCellPositionString(cellPosition),
|
|
8639
8667
|
...isSortingCell ? { [ANV_PART_ATTR]: PARTS.sortToggle } : {},
|
|
8640
8668
|
"aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : void 0,
|
|
@@ -8652,7 +8680,7 @@ function DataTableHeaderCellInner(props, forwardedRef) {
|
|
|
8652
8680
|
const DataTableHeaderCell = forwardRef(DataTableHeaderCellInner);
|
|
8653
8681
|
|
|
8654
8682
|
const resizing = "_resizing_18cik_35";
|
|
8655
|
-
const styles$
|
|
8683
|
+
const styles$5 = {
|
|
8656
8684
|
"resize-handle": "_resize-handle_18cik_4",
|
|
8657
8685
|
resizing: resizing
|
|
8658
8686
|
};
|
|
@@ -8664,8 +8692,8 @@ function ResizeHandle({
|
|
|
8664
8692
|
className,
|
|
8665
8693
|
...rest
|
|
8666
8694
|
}) {
|
|
8667
|
-
const classes = cx(styles$
|
|
8668
|
-
[styles$
|
|
8695
|
+
const classes = cx(styles$5["resize-handle"], className, {
|
|
8696
|
+
[styles$5["resizing"]]: header.column.getIsResizing()
|
|
8669
8697
|
});
|
|
8670
8698
|
const handleResizeStart = (e) => {
|
|
8671
8699
|
onResizeStart?.();
|
|
@@ -8690,7 +8718,7 @@ function ResizeHandle({
|
|
|
8690
8718
|
);
|
|
8691
8719
|
}
|
|
8692
8720
|
|
|
8693
|
-
const styles$
|
|
8721
|
+
const styles$4 = {
|
|
8694
8722
|
"data-table-header-row": "_data-table-header-row_1n8uq_4"
|
|
8695
8723
|
};
|
|
8696
8724
|
|
|
@@ -8754,7 +8782,7 @@ function DataTableHeader({
|
|
|
8754
8782
|
return /* @__PURE__ */ jsx(TableHeader, { type: "data-table", children: table.getHeaderGroups().map((headerGroup, index) => /* @__PURE__ */ jsx(
|
|
8755
8783
|
"div",
|
|
8756
8784
|
{
|
|
8757
|
-
className: styles$
|
|
8785
|
+
className: styles$4["data-table-header-row"],
|
|
8758
8786
|
role: "row",
|
|
8759
8787
|
"aria-rowindex": index + 1,
|
|
8760
8788
|
children: headerGroup.headers.map((header) => {
|
|
@@ -8864,7 +8892,7 @@ function DataTableHeader({
|
|
|
8864
8892
|
)) });
|
|
8865
8893
|
}
|
|
8866
8894
|
|
|
8867
|
-
const styles$
|
|
8895
|
+
const styles$3 = {
|
|
8868
8896
|
"table-container": "_table-container_pfo9z_4",
|
|
8869
8897
|
"table-scroll-container": "_table-scroll-container_pfo9z_55"
|
|
8870
8898
|
};
|
|
@@ -8873,7 +8901,7 @@ const TableContainer = forwardRef(
|
|
|
8873
8901
|
(props, ref) => {
|
|
8874
8902
|
const { layoutStyles, componentProps } = useLayoutPropsUtil(props);
|
|
8875
8903
|
const { children, className, style, ...rest } = componentProps;
|
|
8876
|
-
const tableContainerClassNames = cx(className, styles$
|
|
8904
|
+
const tableContainerClassNames = cx(className, styles$3["table-container"]);
|
|
8877
8905
|
const styleCombined = {
|
|
8878
8906
|
...style,
|
|
8879
8907
|
...layoutStyles
|
|
@@ -8889,7 +8917,7 @@ const TableContainer = forwardRef(
|
|
|
8889
8917
|
children: /* @__PURE__ */ jsx(
|
|
8890
8918
|
"div",
|
|
8891
8919
|
{
|
|
8892
|
-
className: styles$
|
|
8920
|
+
className: styles$3["table-scroll-container"],
|
|
8893
8921
|
"data-anv": "table-scroll-container",
|
|
8894
8922
|
children
|
|
8895
8923
|
}
|
|
@@ -8901,7 +8929,7 @@ const TableContainer = forwardRef(
|
|
|
8901
8929
|
TableContainer.displayName = "TableContainer";
|
|
8902
8930
|
|
|
8903
8931
|
const pagination = "_pagination_rmbrh_4";
|
|
8904
|
-
const styles$
|
|
8932
|
+
const styles$2 = {
|
|
8905
8933
|
"cursor-pagination-list": "_cursor-pagination-list_rmbrh_30",
|
|
8906
8934
|
"cursor-pagination-item": "_cursor-pagination-item_rmbrh_47",
|
|
8907
8935
|
pagination: pagination
|
|
@@ -8914,7 +8942,7 @@ const DataTablePagination = ({
|
|
|
8914
8942
|
return /* @__PURE__ */ jsx(
|
|
8915
8943
|
Pagination$1,
|
|
8916
8944
|
{
|
|
8917
|
-
className: styles$
|
|
8945
|
+
className: styles$2["pagination"],
|
|
8918
8946
|
...props,
|
|
8919
8947
|
showCount
|
|
8920
8948
|
}
|
|
@@ -8942,12 +8970,12 @@ const DataTableCursorPagination = ({
|
|
|
8942
8970
|
return /* @__PURE__ */ jsxs(
|
|
8943
8971
|
"nav",
|
|
8944
8972
|
{
|
|
8945
|
-
className: styles$
|
|
8973
|
+
className: styles$2["pagination"],
|
|
8946
8974
|
"aria-label": "Pagination navigation",
|
|
8947
8975
|
"data-tracking-id": trackingId,
|
|
8948
8976
|
children: [
|
|
8949
|
-
/* @__PURE__ */ jsxs("ul", { className: styles$
|
|
8950
|
-
/* @__PURE__ */ jsx("li", { className: styles$
|
|
8977
|
+
/* @__PURE__ */ jsxs("ul", { className: styles$2["cursor-pagination-list"], children: [
|
|
8978
|
+
/* @__PURE__ */ jsx("li", { className: styles$2["cursor-pagination-item"], children: /* @__PURE__ */ jsx(
|
|
8951
8979
|
Button,
|
|
8952
8980
|
{
|
|
8953
8981
|
appearance: "ghost",
|
|
@@ -8963,7 +8991,7 @@ const DataTableCursorPagination = ({
|
|
|
8963
8991
|
...{ [ANV_PART_ATTR]: PARTS$1.prevPageButton }
|
|
8964
8992
|
}
|
|
8965
8993
|
) }),
|
|
8966
|
-
/* @__PURE__ */ jsx("li", { className: styles$
|
|
8994
|
+
/* @__PURE__ */ jsx("li", { className: styles$2["cursor-pagination-item"], children: /* @__PURE__ */ jsx(
|
|
8967
8995
|
Button,
|
|
8968
8996
|
{
|
|
8969
8997
|
appearance: "ghost",
|
|
@@ -9006,7 +9034,7 @@ const DataTableCursorPagination = ({
|
|
|
9006
9034
|
};
|
|
9007
9035
|
|
|
9008
9036
|
const expanded = "_expanded_1elu6_34";
|
|
9009
|
-
const styles = {
|
|
9037
|
+
const styles$1 = {
|
|
9010
9038
|
"data-table-container": "_data-table-container_1elu6_4",
|
|
9011
9039
|
"container-with-pagination": "_container-with-pagination_1elu6_11",
|
|
9012
9040
|
"footer-with-pagination": "_footer-with-pagination_1elu6_15",
|
|
@@ -9470,6 +9498,822 @@ function useDataTableVirtualizer({
|
|
|
9470
9498
|
);
|
|
9471
9499
|
}
|
|
9472
9500
|
|
|
9501
|
+
const selection = "_selection_1enoc_26";
|
|
9502
|
+
const actions = "_actions_1enoc_27";
|
|
9503
|
+
const count = "_count_1enoc_42";
|
|
9504
|
+
const styles = {
|
|
9505
|
+
"bulk-action-bar": "_bulk-action-bar_1enoc_4",
|
|
9506
|
+
selection: selection,
|
|
9507
|
+
actions: actions,
|
|
9508
|
+
count: count
|
|
9509
|
+
};
|
|
9510
|
+
|
|
9511
|
+
const isThenable = (value) => typeof value === "object" && value !== null && typeof value.then === "function";
|
|
9512
|
+
const formatCount = (count) => count.toLocaleString();
|
|
9513
|
+
const getSelectionKey = (selection) => selection.mode === "all" ? `all:${selection.selectedRowCount}` : `rows:${[...selection.rowIds].map(String).sort().join(",")}`;
|
|
9514
|
+
function DataTableBulkActionBar({
|
|
9515
|
+
actions,
|
|
9516
|
+
selectedCount,
|
|
9517
|
+
selectAllCount,
|
|
9518
|
+
hasUnselectableRows,
|
|
9519
|
+
onSelectAll,
|
|
9520
|
+
onCancel,
|
|
9521
|
+
getSelection,
|
|
9522
|
+
onActionComplete,
|
|
9523
|
+
tableRef
|
|
9524
|
+
}) {
|
|
9525
|
+
const { moveFocusToCell } = useDTFocusDispatchContext();
|
|
9526
|
+
const [pendingKey, setPendingKey] = useState(null);
|
|
9527
|
+
const isPending = pendingKey !== null;
|
|
9528
|
+
const getSelectionRef = useRef(getSelection);
|
|
9529
|
+
getSelectionRef.current = getSelection;
|
|
9530
|
+
const selectionRunRef = useRef(0);
|
|
9531
|
+
const isVisible = selectedCount > 0;
|
|
9532
|
+
useEffect(() => {
|
|
9533
|
+
if (!isVisible) {
|
|
9534
|
+
selectionRunRef.current += 1;
|
|
9535
|
+
setPendingKey(null);
|
|
9536
|
+
}
|
|
9537
|
+
}, [isVisible]);
|
|
9538
|
+
const focusSelectAllCell = () => {
|
|
9539
|
+
const checkboxCell = tableRef.current?.querySelector(`[${ANV_PART_ATTR}="${PARTS.selectAllCheckbox}"]`)?.closest("[data-cell-pos]");
|
|
9540
|
+
const [rowIndex = 0, columnIndex = 0] = (checkboxCell?.dataset.cellPos ?? "0,0").split(",").map(Number);
|
|
9541
|
+
moveFocusToCell({ rowIndex, columnIndex });
|
|
9542
|
+
const target = checkboxCell ?? tableRef.current?.querySelector(
|
|
9543
|
+
`[data-cell-pos="${rowIndex},${columnIndex}"]`
|
|
9544
|
+
);
|
|
9545
|
+
if (target && !target.contains(document.activeElement)) {
|
|
9546
|
+
target.focus();
|
|
9547
|
+
}
|
|
9548
|
+
};
|
|
9549
|
+
const completeAction = () => {
|
|
9550
|
+
onActionComplete();
|
|
9551
|
+
requestAnimationFrame(() => {
|
|
9552
|
+
const active = document.activeElement;
|
|
9553
|
+
if (!active || active === document.body) focusSelectAllCell();
|
|
9554
|
+
});
|
|
9555
|
+
};
|
|
9556
|
+
const runAction = (key, action) => {
|
|
9557
|
+
const selection = getSelection();
|
|
9558
|
+
const run = selectionRunRef.current;
|
|
9559
|
+
const result = action.onClick(selection);
|
|
9560
|
+
if (!isThenable(result)) {
|
|
9561
|
+
if (result !== false) completeAction();
|
|
9562
|
+
return;
|
|
9563
|
+
}
|
|
9564
|
+
setPendingKey(key);
|
|
9565
|
+
Promise.resolve(result).then(
|
|
9566
|
+
(resolved) => {
|
|
9567
|
+
if (run !== selectionRunRef.current) return;
|
|
9568
|
+
setPendingKey(null);
|
|
9569
|
+
const isSameSelection = getSelectionKey(getSelectionRef.current()) === getSelectionKey(selection);
|
|
9570
|
+
if (resolved !== false && isSameSelection) completeAction();
|
|
9571
|
+
},
|
|
9572
|
+
// A rejected action keeps the selection; the consumer reports the error.
|
|
9573
|
+
() => {
|
|
9574
|
+
if (run === selectionRunRef.current) setPendingKey(null);
|
|
9575
|
+
}
|
|
9576
|
+
);
|
|
9577
|
+
};
|
|
9578
|
+
const handleCancel = () => {
|
|
9579
|
+
onCancel();
|
|
9580
|
+
focusSelectAllCell();
|
|
9581
|
+
};
|
|
9582
|
+
const getLabel = (label) => typeof label === "function" ? label(selectedCount) : label;
|
|
9583
|
+
const secondaryAction = actions.secondary;
|
|
9584
|
+
const primaryAction = actions.primary;
|
|
9585
|
+
const renderMenuItems = (items) => items.map((item, index) => {
|
|
9586
|
+
const { label, onClick: _onClick, disabled, ...itemProps } = item;
|
|
9587
|
+
return /* @__PURE__ */ jsx(
|
|
9588
|
+
Menu.Item,
|
|
9589
|
+
{
|
|
9590
|
+
...itemProps,
|
|
9591
|
+
label: getLabel(label),
|
|
9592
|
+
disabled: disabled || isPending,
|
|
9593
|
+
onClick: () => runAction(`primary-${index}`, item),
|
|
9594
|
+
...{ [ANV_PART_ATTR]: PARTS.bulkActionMenuItem }
|
|
9595
|
+
},
|
|
9596
|
+
index
|
|
9597
|
+
);
|
|
9598
|
+
});
|
|
9599
|
+
const renderPrimaryMenuTrigger = (primary) => ({ ref, ...triggerProps }) => {
|
|
9600
|
+
const {
|
|
9601
|
+
items: _items,
|
|
9602
|
+
label,
|
|
9603
|
+
appearance = "primary",
|
|
9604
|
+
...buttonProps
|
|
9605
|
+
} = primary;
|
|
9606
|
+
return /* @__PURE__ */ jsx(
|
|
9607
|
+
Button,
|
|
9608
|
+
{
|
|
9609
|
+
size: "small",
|
|
9610
|
+
appearance,
|
|
9611
|
+
...buttonProps,
|
|
9612
|
+
disabled: buttonProps.disabled || isPending,
|
|
9613
|
+
loading: pendingKey?.startsWith("primary-") ?? false,
|
|
9614
|
+
...triggerProps,
|
|
9615
|
+
ref,
|
|
9616
|
+
...{ [ANV_PART_ATTR]: PARTS.bulkActionsMenuButton },
|
|
9617
|
+
children: getLabel(label)
|
|
9618
|
+
}
|
|
9619
|
+
);
|
|
9620
|
+
};
|
|
9621
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9622
|
+
/* @__PURE__ */ jsx(SrOnly, { "aria-live": "polite", "aria-atomic": "true", children: isVisible ? `${formatCount(selectedCount)} ${selectedCount === 1 ? "item" : "items"} selected` : "" }),
|
|
9623
|
+
isVisible && /* @__PURE__ */ jsxs(
|
|
9624
|
+
"div",
|
|
9625
|
+
{
|
|
9626
|
+
role: "group",
|
|
9627
|
+
"aria-label": "Bulk actions",
|
|
9628
|
+
className: styles["bulk-action-bar"],
|
|
9629
|
+
...{ [ANV_PART_ATTR]: PARTS.bulkActionBar },
|
|
9630
|
+
children: [
|
|
9631
|
+
/* @__PURE__ */ jsxs("div", { className: styles["selection"], children: [
|
|
9632
|
+
/* @__PURE__ */ jsxs("span", { className: styles["count"], "aria-hidden": "true", children: [
|
|
9633
|
+
formatCount(selectedCount),
|
|
9634
|
+
" selected"
|
|
9635
|
+
] }),
|
|
9636
|
+
selectAllCount !== void 0 && /* @__PURE__ */ jsxs(
|
|
9637
|
+
Button,
|
|
9638
|
+
{
|
|
9639
|
+
size: "small",
|
|
9640
|
+
appearance: "ghost",
|
|
9641
|
+
onClick: onSelectAll,
|
|
9642
|
+
disabled: isPending,
|
|
9643
|
+
...{ [ANV_PART_ATTR]: PARTS.bulkSelectAllButton },
|
|
9644
|
+
children: [
|
|
9645
|
+
"Select all ",
|
|
9646
|
+
formatCount(selectAllCount),
|
|
9647
|
+
" items",
|
|
9648
|
+
hasUnselectableRows && ` of ${formatCount(selectAllCount)}`
|
|
9649
|
+
]
|
|
9650
|
+
}
|
|
9651
|
+
)
|
|
9652
|
+
] }),
|
|
9653
|
+
/* @__PURE__ */ jsxs("div", { className: styles["actions"], children: [
|
|
9654
|
+
/* @__PURE__ */ jsx(
|
|
9655
|
+
Button,
|
|
9656
|
+
{
|
|
9657
|
+
size: "small",
|
|
9658
|
+
appearance: "ghost",
|
|
9659
|
+
onClick: handleCancel,
|
|
9660
|
+
...{ [ANV_PART_ATTR]: PARTS.bulkCancelButton },
|
|
9661
|
+
children: "Cancel"
|
|
9662
|
+
}
|
|
9663
|
+
),
|
|
9664
|
+
secondaryAction && (() => {
|
|
9665
|
+
const {
|
|
9666
|
+
label,
|
|
9667
|
+
onClick: _onClick,
|
|
9668
|
+
appearance = "secondary",
|
|
9669
|
+
...buttonProps
|
|
9670
|
+
} = secondaryAction;
|
|
9671
|
+
return /* @__PURE__ */ jsx(
|
|
9672
|
+
Button,
|
|
9673
|
+
{
|
|
9674
|
+
size: "small",
|
|
9675
|
+
appearance,
|
|
9676
|
+
...buttonProps,
|
|
9677
|
+
disabled: buttonProps.disabled || isPending,
|
|
9678
|
+
loading: pendingKey === "secondary",
|
|
9679
|
+
onClick: () => runAction("secondary", secondaryAction),
|
|
9680
|
+
...{ [ANV_PART_ATTR]: PARTS.bulkActionButton },
|
|
9681
|
+
children: getLabel(label)
|
|
9682
|
+
}
|
|
9683
|
+
);
|
|
9684
|
+
})(),
|
|
9685
|
+
primaryAction && ("items" in primaryAction ? /* @__PURE__ */ jsx(
|
|
9686
|
+
Menu,
|
|
9687
|
+
{
|
|
9688
|
+
label: getLabel(primaryAction.label),
|
|
9689
|
+
trigger: renderPrimaryMenuTrigger(primaryAction),
|
|
9690
|
+
children: renderMenuItems(primaryAction.items)
|
|
9691
|
+
}
|
|
9692
|
+
) : (() => {
|
|
9693
|
+
const {
|
|
9694
|
+
label,
|
|
9695
|
+
onClick: _onClick,
|
|
9696
|
+
appearance = "primary",
|
|
9697
|
+
...buttonProps
|
|
9698
|
+
} = primaryAction;
|
|
9699
|
+
return /* @__PURE__ */ jsx(
|
|
9700
|
+
Button,
|
|
9701
|
+
{
|
|
9702
|
+
size: "small",
|
|
9703
|
+
appearance,
|
|
9704
|
+
...buttonProps,
|
|
9705
|
+
disabled: buttonProps.disabled || isPending,
|
|
9706
|
+
loading: pendingKey === "primary",
|
|
9707
|
+
onClick: () => runAction("primary", primaryAction),
|
|
9708
|
+
...{ [ANV_PART_ATTR]: PARTS.bulkActionButton },
|
|
9709
|
+
children: getLabel(label)
|
|
9710
|
+
}
|
|
9711
|
+
);
|
|
9712
|
+
})())
|
|
9713
|
+
] })
|
|
9714
|
+
]
|
|
9715
|
+
}
|
|
9716
|
+
)
|
|
9717
|
+
] });
|
|
9718
|
+
}
|
|
9719
|
+
|
|
9720
|
+
const SvgViewColumn = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M14.67 6v12c0 .55-.45 1-1 1h-3.33c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h3.33c.55 0 1 .45 1 1zm2 13H20c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1h-3.33c-.55 0-1 .45-1 1v12c0 .55.44 1 1 1zm-8.34-1V6c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3.33c.56 0 1-.45 1-1z" }));
|
|
9721
|
+
|
|
9722
|
+
const SvgLock = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM9 8V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9z" }));
|
|
9723
|
+
|
|
9724
|
+
const SvgLockOpen = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M12 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6-5h-1V6c0-2.76-2.24-5-5-5-2.28 0-4.27 1.54-4.84 3.75-.14.54.18 1.08.72 1.22a1 1 0 0 0 1.22-.72A2.996 2.996 0 0 1 12 3c1.65 0 3 1.35 3 3v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 11c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1h10c.55 0 1 .45 1 1v8z" }));
|
|
9725
|
+
|
|
9726
|
+
const SvgVisibility = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z" }));
|
|
9727
|
+
|
|
9728
|
+
const SvgVisibilityOff = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24zM2.71 3.16a.996.996 0 0 0 0 1.41l1.97 1.97A11.892 11.892 0 0 0 1 11.5C2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72a.996.996 0 1 0 1.41-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0zM12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5zm2.97-5.33a2.97 2.97 0 0 0-2.64-2.64l2.64 2.64z" }));
|
|
9729
|
+
|
|
9730
|
+
function isEditableColumn(column) {
|
|
9731
|
+
return column.pinned !== "right";
|
|
9732
|
+
}
|
|
9733
|
+
function getColumnLabel(column) {
|
|
9734
|
+
return column.header?.label ?? column.headerLabel ?? String(column.id);
|
|
9735
|
+
}
|
|
9736
|
+
function getLeafColumnIds(columns) {
|
|
9737
|
+
const ids = /* @__PURE__ */ new Set();
|
|
9738
|
+
const visit = (list) => {
|
|
9739
|
+
for (const column of list) {
|
|
9740
|
+
if (column.columns) {
|
|
9741
|
+
visit(column.columns);
|
|
9742
|
+
} else {
|
|
9743
|
+
ids.add(String(column.id));
|
|
9744
|
+
}
|
|
9745
|
+
}
|
|
9746
|
+
};
|
|
9747
|
+
visit(columns);
|
|
9748
|
+
return ids;
|
|
9749
|
+
}
|
|
9750
|
+
function getDefaultLayout(columns) {
|
|
9751
|
+
return columns.filter(isEditableColumn).map((column) => ({
|
|
9752
|
+
id: String(column.id),
|
|
9753
|
+
visible: true,
|
|
9754
|
+
pinned: column.pinned === "left"
|
|
9755
|
+
}));
|
|
9756
|
+
}
|
|
9757
|
+
function mergeLayout(layout, editable) {
|
|
9758
|
+
const byId = new Map(editable.map((column) => [String(column.id), column]));
|
|
9759
|
+
const seen = /* @__PURE__ */ new Set();
|
|
9760
|
+
const merged = [];
|
|
9761
|
+
for (const pref of layout) {
|
|
9762
|
+
const column = byId.get(pref.id);
|
|
9763
|
+
if (column && !seen.has(pref.id)) {
|
|
9764
|
+
seen.add(pref.id);
|
|
9765
|
+
const visible = pref.visible || !!column.alwaysVisible;
|
|
9766
|
+
merged.push({ id: pref.id, visible, pinned: pref.pinned && visible });
|
|
9767
|
+
}
|
|
9768
|
+
}
|
|
9769
|
+
for (const column of editable) {
|
|
9770
|
+
const id = String(column.id);
|
|
9771
|
+
if (!seen.has(id)) {
|
|
9772
|
+
merged.push({ id, visible: true, pinned: column.pinned === "left" });
|
|
9773
|
+
}
|
|
9774
|
+
}
|
|
9775
|
+
return merged;
|
|
9776
|
+
}
|
|
9777
|
+
function applyColumnLayout(columns, layout) {
|
|
9778
|
+
const editable = columns.filter(isEditableColumn);
|
|
9779
|
+
const byId = new Map(editable.map((c) => [String(c.id), c]));
|
|
9780
|
+
let merged = mergeLayout(layout, editable).filter((pref) => pref.visible);
|
|
9781
|
+
if (merged.length === 0 && editable.length === columns.length) {
|
|
9782
|
+
merged = getDefaultLayout(editable);
|
|
9783
|
+
}
|
|
9784
|
+
const ordered = [
|
|
9785
|
+
...merged.filter((p) => p.pinned),
|
|
9786
|
+
...merged.filter((p) => !p.pinned)
|
|
9787
|
+
].map((pref) => ({
|
|
9788
|
+
...byId.get(pref.id),
|
|
9789
|
+
pinned: pref.pinned ? "left" : void 0
|
|
9790
|
+
}));
|
|
9791
|
+
const shown = new Set(merged.map((pref) => pref.id));
|
|
9792
|
+
const next = [];
|
|
9793
|
+
let cursor = 0;
|
|
9794
|
+
for (const column of columns) {
|
|
9795
|
+
if (!isEditableColumn(column)) {
|
|
9796
|
+
next.push(column);
|
|
9797
|
+
} else if (shown.has(String(column.id))) {
|
|
9798
|
+
next.push(ordered[cursor++]);
|
|
9799
|
+
}
|
|
9800
|
+
}
|
|
9801
|
+
return next;
|
|
9802
|
+
}
|
|
9803
|
+
const PINNED = "pinned";
|
|
9804
|
+
const VISIBLE = "visible";
|
|
9805
|
+
const HIDDEN = "hidden";
|
|
9806
|
+
function toBuckets(layout) {
|
|
9807
|
+
const buckets = { [PINNED]: [], [VISIBLE]: [], [HIDDEN]: [] };
|
|
9808
|
+
for (const pref of layout) {
|
|
9809
|
+
const zone = !pref.visible ? HIDDEN : pref.pinned ? PINNED : VISIBLE;
|
|
9810
|
+
buckets[zone].push(pref.id);
|
|
9811
|
+
}
|
|
9812
|
+
return buckets;
|
|
9813
|
+
}
|
|
9814
|
+
function toLayout(buckets) {
|
|
9815
|
+
return [
|
|
9816
|
+
...buckets[PINNED].map((id) => ({ id, visible: true, pinned: true })),
|
|
9817
|
+
...buckets[VISIBLE].map((id) => ({ id, visible: true, pinned: false })),
|
|
9818
|
+
...buckets[HIDDEN].map((id) => ({ id, visible: false, pinned: false }))
|
|
9819
|
+
];
|
|
9820
|
+
}
|
|
9821
|
+
function reorderBucket(prev, bucket, event) {
|
|
9822
|
+
if (!event.valid || event.zoneSort === null) {
|
|
9823
|
+
return prev;
|
|
9824
|
+
}
|
|
9825
|
+
return { ...prev, [bucket]: event.zoneSort.map(String) };
|
|
9826
|
+
}
|
|
9827
|
+
function togglePinnedIn(prev, id) {
|
|
9828
|
+
if (prev[PINNED].includes(id)) {
|
|
9829
|
+
return {
|
|
9830
|
+
...prev,
|
|
9831
|
+
[PINNED]: prev[PINNED].filter((f) => f !== id),
|
|
9832
|
+
[VISIBLE]: [id, ...prev[VISIBLE]]
|
|
9833
|
+
};
|
|
9834
|
+
}
|
|
9835
|
+
if (prev[VISIBLE].includes(id)) {
|
|
9836
|
+
return {
|
|
9837
|
+
...prev,
|
|
9838
|
+
[PINNED]: [...prev[PINNED], id],
|
|
9839
|
+
[VISIBLE]: prev[VISIBLE].filter((f) => f !== id)
|
|
9840
|
+
};
|
|
9841
|
+
}
|
|
9842
|
+
return prev;
|
|
9843
|
+
}
|
|
9844
|
+
function isLastShown(buckets, hasFixedColumns = false) {
|
|
9845
|
+
return !hasFixedColumns && buckets[VISIBLE].length <= 1 && buckets[PINNED].length === 0;
|
|
9846
|
+
}
|
|
9847
|
+
function toggleVisibleIn(prev, id, hasFixedColumns = false) {
|
|
9848
|
+
if (prev[VISIBLE].includes(id)) {
|
|
9849
|
+
if (isLastShown(prev, hasFixedColumns)) {
|
|
9850
|
+
return prev;
|
|
9851
|
+
}
|
|
9852
|
+
return {
|
|
9853
|
+
...prev,
|
|
9854
|
+
[VISIBLE]: prev[VISIBLE].filter((f) => f !== id),
|
|
9855
|
+
[HIDDEN]: [...prev[HIDDEN], id]
|
|
9856
|
+
};
|
|
9857
|
+
}
|
|
9858
|
+
if (prev[HIDDEN].includes(id)) {
|
|
9859
|
+
return {
|
|
9860
|
+
...prev,
|
|
9861
|
+
[VISIBLE]: [...prev[VISIBLE], id],
|
|
9862
|
+
[HIDDEN]: prev[HIDDEN].filter((f) => f !== id)
|
|
9863
|
+
};
|
|
9864
|
+
}
|
|
9865
|
+
return prev;
|
|
9866
|
+
}
|
|
9867
|
+
|
|
9868
|
+
const draftsOf = (sections) => sections.map((section) => toBuckets(section.layout));
|
|
9869
|
+
const bucketsEqual = (a, b) => ["pinned", "visible", "hidden"].every(
|
|
9870
|
+
(name) => a[name].length === b[name].length && a[name].every((id, i) => id === b[name][i])
|
|
9871
|
+
);
|
|
9872
|
+
function EditColumnsDrawer({
|
|
9873
|
+
open,
|
|
9874
|
+
onClose,
|
|
9875
|
+
sections
|
|
9876
|
+
}) {
|
|
9877
|
+
const [drafts, setDrafts] = useState(
|
|
9878
|
+
() => draftsOf(sections)
|
|
9879
|
+
);
|
|
9880
|
+
const [initial, setInitial] = useState(drafts);
|
|
9881
|
+
const [confirm, setConfirm] = useState(null);
|
|
9882
|
+
const wasOpen = useRef(false);
|
|
9883
|
+
useEffect(() => {
|
|
9884
|
+
if (open && !wasOpen.current) {
|
|
9885
|
+
const opening = draftsOf(sections);
|
|
9886
|
+
setDrafts(opening);
|
|
9887
|
+
setInitial(opening);
|
|
9888
|
+
}
|
|
9889
|
+
wasOpen.current = open;
|
|
9890
|
+
}, [open, sections]);
|
|
9891
|
+
const edit = (index, update) => {
|
|
9892
|
+
setDrafts((prev) => prev.map((b, i) => i === index ? update(b) : b));
|
|
9893
|
+
};
|
|
9894
|
+
const dirty = sections.map((_, i) => {
|
|
9895
|
+
const draft = drafts[i];
|
|
9896
|
+
const start = initial[i];
|
|
9897
|
+
return !!draft && !!start && !bucketsEqual(draft, start);
|
|
9898
|
+
});
|
|
9899
|
+
const anyDirty = dirty.some(Boolean);
|
|
9900
|
+
const handleClose = () => anyDirty ? setConfirm("discard") : onClose();
|
|
9901
|
+
const handleApply = () => {
|
|
9902
|
+
sections.forEach((section, i) => {
|
|
9903
|
+
if (dirty[i] && drafts[i]) {
|
|
9904
|
+
section.onApply(toLayout(drafts[i]));
|
|
9905
|
+
}
|
|
9906
|
+
});
|
|
9907
|
+
onClose();
|
|
9908
|
+
};
|
|
9909
|
+
const multiple = sections.length > 1;
|
|
9910
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9911
|
+
/* @__PURE__ */ jsxs(
|
|
9912
|
+
Drawer,
|
|
9913
|
+
{
|
|
9914
|
+
open,
|
|
9915
|
+
onClose: handleClose,
|
|
9916
|
+
size: "medium",
|
|
9917
|
+
...{ [ANV_PART_ATTR]: PARTS.editColumnsDrawer },
|
|
9918
|
+
children: [
|
|
9919
|
+
/* @__PURE__ */ jsx(Drawer.Header, { children: "Edit Columns" }),
|
|
9920
|
+
/* @__PURE__ */ jsx(Drawer.Content, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "6", children: [
|
|
9921
|
+
/* @__PURE__ */ jsx(Text, { children: "Pinned columns stay at the left of the table. Drag columns to reorder them, and use the eye icon to hide or show them." }),
|
|
9922
|
+
sections.map((section, i) => {
|
|
9923
|
+
const buckets = drafts[i];
|
|
9924
|
+
if (!buckets) {
|
|
9925
|
+
return null;
|
|
9926
|
+
}
|
|
9927
|
+
const editor = /* @__PURE__ */ jsx(
|
|
9928
|
+
SectionEditor,
|
|
9929
|
+
{
|
|
9930
|
+
buckets,
|
|
9931
|
+
alwaysVisibleIds: section.alwaysVisibleIds,
|
|
9932
|
+
hasFixedColumns: section.hasFixedColumns,
|
|
9933
|
+
labels: section.labels,
|
|
9934
|
+
onEdit: (update) => edit(i, update),
|
|
9935
|
+
zonePrefix: section.id
|
|
9936
|
+
},
|
|
9937
|
+
section.id
|
|
9938
|
+
);
|
|
9939
|
+
return multiple ? /* @__PURE__ */ jsx(
|
|
9940
|
+
Card,
|
|
9941
|
+
{
|
|
9942
|
+
padding: "medium",
|
|
9943
|
+
...{ [ANV_PART_ATTR]: PARTS.columnsSection },
|
|
9944
|
+
children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "4", grow: 1, children: [
|
|
9945
|
+
/* @__PURE__ */ jsx(Text, { variant: "headline", el: "h3", size: "small", children: section.title ?? section.id }),
|
|
9946
|
+
editor
|
|
9947
|
+
] })
|
|
9948
|
+
},
|
|
9949
|
+
section.id
|
|
9950
|
+
) : /* @__PURE__ */ jsx(Flex, { direction: "column", children: editor }, section.id);
|
|
9951
|
+
})
|
|
9952
|
+
] }) }),
|
|
9953
|
+
/* @__PURE__ */ jsxs(Drawer.Footer, { children: [
|
|
9954
|
+
/* @__PURE__ */ jsx(
|
|
9955
|
+
Button,
|
|
9956
|
+
{
|
|
9957
|
+
appearance: "secondary",
|
|
9958
|
+
onClick: () => setConfirm("reset"),
|
|
9959
|
+
...{ [ANV_PART_ATTR]: PARTS.resetColumnsButton },
|
|
9960
|
+
children: "Reset Defaults"
|
|
9961
|
+
}
|
|
9962
|
+
),
|
|
9963
|
+
/* @__PURE__ */ jsx(Flex, { grow: 1 }),
|
|
9964
|
+
/* @__PURE__ */ jsx(
|
|
9965
|
+
Button,
|
|
9966
|
+
{
|
|
9967
|
+
appearance: "secondary",
|
|
9968
|
+
onClick: handleClose,
|
|
9969
|
+
...{ [ANV_PART_ATTR]: PARTS.cancelButton },
|
|
9970
|
+
children: "Cancel"
|
|
9971
|
+
}
|
|
9972
|
+
),
|
|
9973
|
+
/* @__PURE__ */ jsx(
|
|
9974
|
+
Button,
|
|
9975
|
+
{
|
|
9976
|
+
appearance: "primary",
|
|
9977
|
+
onClick: handleApply,
|
|
9978
|
+
disabled: !anyDirty,
|
|
9979
|
+
...{ [ANV_PART_ATTR]: PARTS.applyButton },
|
|
9980
|
+
children: "Apply"
|
|
9981
|
+
}
|
|
9982
|
+
)
|
|
9983
|
+
] })
|
|
9984
|
+
]
|
|
9985
|
+
}
|
|
9986
|
+
),
|
|
9987
|
+
/* @__PURE__ */ jsx(
|
|
9988
|
+
ConfirmDialog,
|
|
9989
|
+
{
|
|
9990
|
+
open: confirm === "discard",
|
|
9991
|
+
header: "You have unsaved changes",
|
|
9992
|
+
confirmLabel: "Discard",
|
|
9993
|
+
onConfirm: () => {
|
|
9994
|
+
setConfirm(null);
|
|
9995
|
+
onClose();
|
|
9996
|
+
},
|
|
9997
|
+
onClose: () => setConfirm(null),
|
|
9998
|
+
children: "Are you sure you want to close? Your changes will be lost."
|
|
9999
|
+
}
|
|
10000
|
+
),
|
|
10001
|
+
/* @__PURE__ */ jsx(
|
|
10002
|
+
ConfirmDialog,
|
|
10003
|
+
{
|
|
10004
|
+
open: confirm === "reset",
|
|
10005
|
+
header: "Reset columns",
|
|
10006
|
+
confirmLabel: "Reset Defaults",
|
|
10007
|
+
danger: true,
|
|
10008
|
+
onConfirm: () => {
|
|
10009
|
+
setConfirm(null);
|
|
10010
|
+
for (const section of sections) {
|
|
10011
|
+
section.onReset();
|
|
10012
|
+
}
|
|
10013
|
+
onClose();
|
|
10014
|
+
},
|
|
10015
|
+
onClose: () => setConfirm(null),
|
|
10016
|
+
children: multiple ? "Reset every table to its default columns? Your changes will be reverted." : "Reset the table to its default columns? Your changes will be reverted."
|
|
10017
|
+
}
|
|
10018
|
+
)
|
|
10019
|
+
] });
|
|
10020
|
+
}
|
|
10021
|
+
function SectionEditor({
|
|
10022
|
+
alwaysVisibleIds = [],
|
|
10023
|
+
buckets,
|
|
10024
|
+
hasFixedColumns,
|
|
10025
|
+
labels,
|
|
10026
|
+
onEdit,
|
|
10027
|
+
zonePrefix
|
|
10028
|
+
}) {
|
|
10029
|
+
const labelOf = (id) => labels[id] ?? id;
|
|
10030
|
+
const lastShown = isLastShown(buckets, hasFixedColumns);
|
|
10031
|
+
const controls = {
|
|
10032
|
+
labelOf,
|
|
10033
|
+
onTogglePinned: (id) => onEdit((prev) => togglePinnedIn(prev, id)),
|
|
10034
|
+
onToggleVisible: (id) => onEdit((prev) => toggleVisibleIn(prev, id, hasFixedColumns))
|
|
10035
|
+
};
|
|
10036
|
+
const sortableZone = (bucket) => (
|
|
10037
|
+
// A DndSort per zone keeps drags inside it; pinning is the lock button's job.
|
|
10038
|
+
/* @__PURE__ */ jsx(
|
|
10039
|
+
DndSort,
|
|
10040
|
+
{
|
|
10041
|
+
onDrop: (event) => onEdit((prev) => reorderBucket(prev, bucket, event)),
|
|
10042
|
+
children: /* @__PURE__ */ jsx(
|
|
10043
|
+
DndSort.Zone,
|
|
10044
|
+
{
|
|
10045
|
+
id: `${zonePrefix}-${bucket}`,
|
|
10046
|
+
label: bucket === "pinned" ? "Pinned columns" : "Visible columns",
|
|
10047
|
+
orientation: "vertical",
|
|
10048
|
+
sortable: true,
|
|
10049
|
+
sortedIds: buckets[bucket],
|
|
10050
|
+
gap: "2",
|
|
10051
|
+
children: buckets[bucket].map((id) => /* @__PURE__ */ jsx(
|
|
10052
|
+
DndSort.Card,
|
|
10053
|
+
{
|
|
10054
|
+
id,
|
|
10055
|
+
label: labelOf(id),
|
|
10056
|
+
dragOnlyWithHandle: true,
|
|
10057
|
+
padding: "xsmall",
|
|
10058
|
+
...{ [ANV_PART_ATTR]: PARTS.columnCard },
|
|
10059
|
+
children: /* @__PURE__ */ jsx(
|
|
10060
|
+
CardControls,
|
|
10061
|
+
{
|
|
10062
|
+
id,
|
|
10063
|
+
visible: true,
|
|
10064
|
+
pinned: bucket === "pinned",
|
|
10065
|
+
disableHide: bucket === "visible" && lastShown,
|
|
10066
|
+
alwaysVisible: alwaysVisibleIds.includes(id),
|
|
10067
|
+
...controls
|
|
10068
|
+
}
|
|
10069
|
+
)
|
|
10070
|
+
},
|
|
10071
|
+
id
|
|
10072
|
+
))
|
|
10073
|
+
}
|
|
10074
|
+
)
|
|
10075
|
+
}
|
|
10076
|
+
)
|
|
10077
|
+
);
|
|
10078
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "6", children: [
|
|
10079
|
+
buckets.pinned.length > 0 && /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "2", children: [
|
|
10080
|
+
/* @__PURE__ */ jsx(ZoneHeading, { children: "Pinned Columns" }),
|
|
10081
|
+
sortableZone("pinned")
|
|
10082
|
+
] }),
|
|
10083
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "2", children: [
|
|
10084
|
+
/* @__PURE__ */ jsx(ZoneHeading, { children: "Visible Columns" }),
|
|
10085
|
+
sortableZone("visible")
|
|
10086
|
+
] }),
|
|
10087
|
+
buckets.hidden.length > 0 && /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "2", children: [
|
|
10088
|
+
/* @__PURE__ */ jsx(ZoneHeading, { children: "Hidden Columns" }),
|
|
10089
|
+
/* @__PURE__ */ jsx(Grid, { templateColumns: "1fr", gap: "2", children: buckets.hidden.map((id) => /* @__PURE__ */ jsx(
|
|
10090
|
+
Card,
|
|
10091
|
+
{
|
|
10092
|
+
padding: "xsmall",
|
|
10093
|
+
...{ [ANV_PART_ATTR]: PARTS.columnCard },
|
|
10094
|
+
children: /* @__PURE__ */ jsxs(Flex, { alignItems: "center", gap: "2", grow: 1, children: [
|
|
10095
|
+
/* @__PURE__ */ jsx(
|
|
10096
|
+
Icon,
|
|
10097
|
+
{
|
|
10098
|
+
svg: SvgDragIndicator,
|
|
10099
|
+
"aria-hidden": "true",
|
|
10100
|
+
style: { opacity: 0.4 }
|
|
10101
|
+
}
|
|
10102
|
+
),
|
|
10103
|
+
/* @__PURE__ */ jsx(
|
|
10104
|
+
CardControls,
|
|
10105
|
+
{
|
|
10106
|
+
id,
|
|
10107
|
+
visible: false,
|
|
10108
|
+
pinned: false,
|
|
10109
|
+
...controls
|
|
10110
|
+
}
|
|
10111
|
+
)
|
|
10112
|
+
] })
|
|
10113
|
+
},
|
|
10114
|
+
id
|
|
10115
|
+
)) })
|
|
10116
|
+
] })
|
|
10117
|
+
] });
|
|
10118
|
+
}
|
|
10119
|
+
function ConfirmDialog({
|
|
10120
|
+
open,
|
|
10121
|
+
header,
|
|
10122
|
+
confirmLabel,
|
|
10123
|
+
danger,
|
|
10124
|
+
onConfirm,
|
|
10125
|
+
onClose,
|
|
10126
|
+
children
|
|
10127
|
+
}) {
|
|
10128
|
+
return /* @__PURE__ */ jsxs(Dialog, { open, onClose, children: [
|
|
10129
|
+
/* @__PURE__ */ jsx(Dialog.Header, { children: header }),
|
|
10130
|
+
/* @__PURE__ */ jsx(Dialog.Content, { children }),
|
|
10131
|
+
/* @__PURE__ */ jsxs(Dialog.Footer, { children: [
|
|
10132
|
+
/* @__PURE__ */ jsx(Dialog.CancelButton, { children: "Cancel" }),
|
|
10133
|
+
/* @__PURE__ */ jsx(
|
|
10134
|
+
Button,
|
|
10135
|
+
{
|
|
10136
|
+
appearance: danger ? "danger" : "primary",
|
|
10137
|
+
onClick: onConfirm,
|
|
10138
|
+
...{ [ANV_PART_ATTR]: PARTS.confirmButton },
|
|
10139
|
+
children: confirmLabel
|
|
10140
|
+
}
|
|
10141
|
+
)
|
|
10142
|
+
] })
|
|
10143
|
+
] });
|
|
10144
|
+
}
|
|
10145
|
+
function ZoneHeading({ children }) {
|
|
10146
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "row", gap: "1", alignItems: "center", children: [
|
|
10147
|
+
/* @__PURE__ */ jsx(Text, { variant: "eyebrow", size: "large", style: { whiteSpace: "nowrap" }, children }),
|
|
10148
|
+
/* @__PURE__ */ jsx(Divider, {})
|
|
10149
|
+
] });
|
|
10150
|
+
}
|
|
10151
|
+
function CardControls({
|
|
10152
|
+
id,
|
|
10153
|
+
visible,
|
|
10154
|
+
pinned,
|
|
10155
|
+
labelOf,
|
|
10156
|
+
onTogglePinned,
|
|
10157
|
+
onToggleVisible,
|
|
10158
|
+
disableHide,
|
|
10159
|
+
alwaysVisible
|
|
10160
|
+
}) {
|
|
10161
|
+
const label = labelOf(id);
|
|
10162
|
+
const pinBlocked = !visible;
|
|
10163
|
+
const hideBlocked = !!alwaysVisible || pinned || visible && !!disableHide;
|
|
10164
|
+
const pinTip = !visible ? "Hidden columns can't be pinned" : pinned ? "Unpin column" : "Pin column";
|
|
10165
|
+
const visibilityTip = alwaysVisible ? "This column is always visible" : pinned ? "Unpin this column to hide it" : visible && disableHide ? "Show another column before hiding this one" : visible ? "Hide column" : "Show column";
|
|
10166
|
+
return /* @__PURE__ */ jsxs(
|
|
10167
|
+
Grid,
|
|
10168
|
+
{
|
|
10169
|
+
templateColumns: "1fr auto auto",
|
|
10170
|
+
alignItems: "center",
|
|
10171
|
+
gap: "1",
|
|
10172
|
+
style: { flex: 1 },
|
|
10173
|
+
children: [
|
|
10174
|
+
/* @__PURE__ */ jsx(Text, { children: label }),
|
|
10175
|
+
/* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
10176
|
+
/* @__PURE__ */ jsx(Tooltip.Trigger, { children: /* @__PURE__ */ jsx(
|
|
10177
|
+
Button,
|
|
10178
|
+
{
|
|
10179
|
+
appearance: "ghost",
|
|
10180
|
+
size: "xsmall",
|
|
10181
|
+
icon: pinned ? SvgLock : SvgLockOpen,
|
|
10182
|
+
"aria-label": `${pinTip}: ${label}`,
|
|
10183
|
+
"aria-disabled": pinBlocked,
|
|
10184
|
+
onClick: () => {
|
|
10185
|
+
if (!pinBlocked) onTogglePinned(id);
|
|
10186
|
+
},
|
|
10187
|
+
...{ [ANV_PART_ATTR]: PARTS.pinColumnButton }
|
|
10188
|
+
}
|
|
10189
|
+
) }),
|
|
10190
|
+
/* @__PURE__ */ jsx(Tooltip.Content, { children: pinTip })
|
|
10191
|
+
] }),
|
|
10192
|
+
/* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
10193
|
+
/* @__PURE__ */ jsx(Tooltip.Trigger, { children: /* @__PURE__ */ jsx(
|
|
10194
|
+
Button,
|
|
10195
|
+
{
|
|
10196
|
+
appearance: "ghost",
|
|
10197
|
+
size: "xsmall",
|
|
10198
|
+
icon: visible ? SvgVisibility : SvgVisibilityOff,
|
|
10199
|
+
"aria-label": `${visibilityTip}: ${label}`,
|
|
10200
|
+
"aria-disabled": hideBlocked,
|
|
10201
|
+
onClick: () => {
|
|
10202
|
+
if (!hideBlocked) onToggleVisible(id);
|
|
10203
|
+
},
|
|
10204
|
+
...{ [ANV_PART_ATTR]: PARTS.hideColumnButton }
|
|
10205
|
+
}
|
|
10206
|
+
) }),
|
|
10207
|
+
/* @__PURE__ */ jsx(Tooltip.Content, { children: visibilityTip })
|
|
10208
|
+
] })
|
|
10209
|
+
]
|
|
10210
|
+
}
|
|
10211
|
+
);
|
|
10212
|
+
}
|
|
10213
|
+
|
|
10214
|
+
const DEFAULT_FILTER_BAR_SIZE = "small";
|
|
10215
|
+
function DataTableFilterToolbar({
|
|
10216
|
+
filters,
|
|
10217
|
+
tools,
|
|
10218
|
+
onFilterChange,
|
|
10219
|
+
columnEditing
|
|
10220
|
+
}) {
|
|
10221
|
+
const [columnsOpen, setColumnsOpen] = useState(false);
|
|
10222
|
+
const hasFilters = (filters?.items.length ?? 0) > 0;
|
|
10223
|
+
const hasActions = (tools?.actions.length ?? 0) > 0;
|
|
10224
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "row", gap: "2", alignItems: "center", justifyContent: "flex-end", children: [
|
|
10225
|
+
filters && hasFilters && /* @__PURE__ */ jsx(
|
|
10226
|
+
FilterBar,
|
|
10227
|
+
{
|
|
10228
|
+
size: filters.size ?? DEFAULT_FILTER_BAR_SIZE,
|
|
10229
|
+
associatedContent: "table filters",
|
|
10230
|
+
filters: filters.items,
|
|
10231
|
+
onFilterChange,
|
|
10232
|
+
controlledFiltering: filters.controlled,
|
|
10233
|
+
style: { flex: "1 1 auto" }
|
|
10234
|
+
}
|
|
10235
|
+
),
|
|
10236
|
+
(hasActions || columnEditing) && /* @__PURE__ */ jsxs(
|
|
10237
|
+
Toolbar,
|
|
10238
|
+
{
|
|
10239
|
+
size: tools?.size ?? DEFAULT_FILTER_BAR_SIZE,
|
|
10240
|
+
associatedContent: "table actions",
|
|
10241
|
+
style: { flex: "0 0 auto", width: "fit-content" },
|
|
10242
|
+
children: [
|
|
10243
|
+
tools?.actions.map(({ id, ...buttonProps }) => /* @__PURE__ */ jsx(ToolbarButton, { ...buttonProps }, id)),
|
|
10244
|
+
columnEditing && /* @__PURE__ */ jsx(
|
|
10245
|
+
ToolbarButton,
|
|
10246
|
+
{
|
|
10247
|
+
icon: { after: SvgViewColumn },
|
|
10248
|
+
onClick: () => setColumnsOpen(true),
|
|
10249
|
+
...{ [ANV_PART_ATTR]: PARTS.editColumnsButton },
|
|
10250
|
+
children: "Edit Columns"
|
|
10251
|
+
}
|
|
10252
|
+
)
|
|
10253
|
+
]
|
|
10254
|
+
}
|
|
10255
|
+
),
|
|
10256
|
+
columnEditing && /* @__PURE__ */ jsx(
|
|
10257
|
+
EditColumnsDrawer,
|
|
10258
|
+
{
|
|
10259
|
+
open: columnsOpen,
|
|
10260
|
+
onClose: () => setColumnsOpen(false),
|
|
10261
|
+
sections: [columnEditing]
|
|
10262
|
+
}
|
|
10263
|
+
)
|
|
10264
|
+
] });
|
|
10265
|
+
}
|
|
10266
|
+
|
|
10267
|
+
function toEditColumnsSection({ title, columns, layout, onLayoutChange }, id) {
|
|
10268
|
+
const editable = columns.filter(isEditableColumn);
|
|
10269
|
+
return {
|
|
10270
|
+
id,
|
|
10271
|
+
title,
|
|
10272
|
+
hasFixedColumns: editable.length < columns.length || editable.some((c) => c.alwaysVisible),
|
|
10273
|
+
alwaysVisibleIds: editable.filter((column) => column.alwaysVisible).map((column) => String(column.id)),
|
|
10274
|
+
labels: Object.fromEntries(
|
|
10275
|
+
editable.map((column) => [String(column.id), getColumnLabel(column)])
|
|
10276
|
+
),
|
|
10277
|
+
layout: mergeLayout(layout, editable),
|
|
10278
|
+
onApply: (next) => onLayoutChange(next),
|
|
10279
|
+
onReset: () => onLayoutChange(getDefaultLayout(columns))
|
|
10280
|
+
};
|
|
10281
|
+
}
|
|
10282
|
+
|
|
10283
|
+
function DataTableEmptyAddRow({ rowAdd }) {
|
|
10284
|
+
return /* @__PURE__ */ jsx(Flex, { justifyContent: "center", style: { padding: "var(--spacing-2)" }, children: /* @__PURE__ */ jsx(
|
|
10285
|
+
Button,
|
|
10286
|
+
{
|
|
10287
|
+
icon: SvgAdd,
|
|
10288
|
+
...{ [ANV_PART_ATTR]: PARTS.rowAddButton },
|
|
10289
|
+
disabled: rowAdd.disabled,
|
|
10290
|
+
loading: rowAdd.loading,
|
|
10291
|
+
onClick: rowAdd.onAddRow,
|
|
10292
|
+
children: rowAdd.addRowLabel ?? "Add row"
|
|
10293
|
+
}
|
|
10294
|
+
) });
|
|
10295
|
+
}
|
|
10296
|
+
function DataTableAddRow({ rowAdd }) {
|
|
10297
|
+
return /* @__PURE__ */ jsx(
|
|
10298
|
+
Toolbar,
|
|
10299
|
+
{
|
|
10300
|
+
size: rowAdd.size ?? "medium",
|
|
10301
|
+
associatedContent: "table add row",
|
|
10302
|
+
style: { width: "fit-content" },
|
|
10303
|
+
children: /* @__PURE__ */ jsx(
|
|
10304
|
+
ToolbarButton,
|
|
10305
|
+
{
|
|
10306
|
+
icon: SvgAdd,
|
|
10307
|
+
disabled: rowAdd.disabled,
|
|
10308
|
+
loading: rowAdd.loading,
|
|
10309
|
+
onClick: rowAdd.onAddRow,
|
|
10310
|
+
children: rowAdd.addRowLabel ?? "Add row"
|
|
10311
|
+
}
|
|
10312
|
+
)
|
|
10313
|
+
}
|
|
10314
|
+
);
|
|
10315
|
+
}
|
|
10316
|
+
|
|
9473
10317
|
const EMPTY_DATA = [];
|
|
9474
10318
|
const REACT_FORWARD_REF = Symbol.for("react.forward_ref");
|
|
9475
10319
|
const REACT_MEMO = Symbol.for("react.memo");
|
|
@@ -9482,11 +10326,29 @@ function isEmptyStateSvgComponent(value) {
|
|
|
9482
10326
|
}
|
|
9483
10327
|
return type === REACT_MEMO;
|
|
9484
10328
|
}
|
|
10329
|
+
const PARENT_PLACEMENT_KEYS = /* @__PURE__ */ new Set([
|
|
10330
|
+
"flex",
|
|
10331
|
+
"flexGrow",
|
|
10332
|
+
"flexShrink",
|
|
10333
|
+
"flexBasis",
|
|
10334
|
+
"order",
|
|
10335
|
+
"gridArea",
|
|
10336
|
+
"gridColumn",
|
|
10337
|
+
"gridRow",
|
|
10338
|
+
"gridColumnStart",
|
|
10339
|
+
"gridColumnEnd",
|
|
10340
|
+
"gridRowStart",
|
|
10341
|
+
"gridRowEnd",
|
|
10342
|
+
"alignSelf",
|
|
10343
|
+
"justifySelf",
|
|
10344
|
+
"placeSelf"
|
|
10345
|
+
]);
|
|
9485
10346
|
function DataTableInner(props, ref) {
|
|
9486
10347
|
const { layoutStyles, componentProps } = useLayoutPropsUtil(props);
|
|
9487
10348
|
const {
|
|
9488
10349
|
data: dataProp,
|
|
9489
|
-
columns:
|
|
10350
|
+
columns: columnsInput,
|
|
10351
|
+
columnEditing,
|
|
9490
10352
|
customFooter,
|
|
9491
10353
|
defaultExpandedRowIds,
|
|
9492
10354
|
defaultSelectedRowIds,
|
|
@@ -9508,14 +10370,26 @@ function DataTableInner(props, ref) {
|
|
|
9508
10370
|
disableVirtualization,
|
|
9509
10371
|
forceVirtualization,
|
|
9510
10372
|
getRowVersion,
|
|
10373
|
+
filters,
|
|
10374
|
+
tools,
|
|
10375
|
+
bulkActions,
|
|
10376
|
+
rowAdd,
|
|
9511
10377
|
className,
|
|
9512
10378
|
style,
|
|
9513
10379
|
...rest
|
|
9514
10380
|
} = componentProps;
|
|
9515
|
-
const
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
10381
|
+
const columnEditingLayout = columnEditing?.layout;
|
|
10382
|
+
const columnsProp = useMemo(
|
|
10383
|
+
() => columnEditingLayout ? applyColumnLayout(columnsInput, columnEditingLayout) : columnsInput,
|
|
10384
|
+
[columnsInput, columnEditingLayout]
|
|
10385
|
+
);
|
|
10386
|
+
const columnEditingSection = useMemo(
|
|
10387
|
+
() => columnEditing && !columnEditing.hideButton ? toEditColumnsSection(
|
|
10388
|
+
{ columns: columnsInput, ...columnEditing },
|
|
10389
|
+
"table"
|
|
10390
|
+
) : void 0,
|
|
10391
|
+
[columnEditing, columnsInput]
|
|
10392
|
+
);
|
|
9519
10393
|
const tableRef = useRef(null);
|
|
9520
10394
|
const lastBodyHeightRef = useRef(null);
|
|
9521
10395
|
const [rowSelection, setRowSelection] = useOptionallyControlledState({
|
|
@@ -9525,6 +10399,14 @@ function DataTableInner(props, ref) {
|
|
|
9525
10399
|
onSelectRow?.(Object.keys(newRowSelection));
|
|
9526
10400
|
}
|
|
9527
10401
|
});
|
|
10402
|
+
const [isAllRowsSelected, setIsAllRowsSelected] = useState(false);
|
|
10403
|
+
const selectedRowCount = Object.keys(rowSelection ?? {}).filter(
|
|
10404
|
+
(id) => rowSelection[id]
|
|
10405
|
+
).length;
|
|
10406
|
+
const clearSelection = useCallback(() => {
|
|
10407
|
+
setIsAllRowsSelected(false);
|
|
10408
|
+
setRowSelection({});
|
|
10409
|
+
}, [setRowSelection]);
|
|
9528
10410
|
const readOnlyRowMap = useMemo(
|
|
9529
10411
|
() => readOnlyRowIds ? Object.fromEntries(readOnlyRowIds.map((id) => [String(id), true])) : {},
|
|
9530
10412
|
[readOnlyRowIds]
|
|
@@ -9535,13 +10417,19 @@ function DataTableInner(props, ref) {
|
|
|
9535
10417
|
() => sortedColumnId !== void 0 ? [{ id: sortedColumnId, desc: sortedColumnDesc ?? false }] : void 0,
|
|
9536
10418
|
[sortedColumnId, sortedColumnDesc]
|
|
9537
10419
|
);
|
|
9538
|
-
const [
|
|
10420
|
+
const [rawSorting, setSorting] = useOptionallyControlledState({
|
|
9539
10421
|
controlledValue: controlledSorting,
|
|
9540
10422
|
defaultValue: defaultSortedColumn ? [defaultSortedColumn] : void 0,
|
|
9541
10423
|
onChange: (newSorting) => {
|
|
9542
10424
|
onSort?.(newSorting[0]);
|
|
9543
10425
|
}
|
|
9544
10426
|
});
|
|
10427
|
+
const sorting = useMemo(() => {
|
|
10428
|
+
const sortedId = rawSorting?.[0]?.id;
|
|
10429
|
+
if (!columnEditing || sortedId === void 0) return rawSorting ?? [];
|
|
10430
|
+
return getLeafColumnIds(columnsProp).has(sortedId) ? rawSorting : [];
|
|
10431
|
+
}, [rawSorting, columnEditing, columnsProp]);
|
|
10432
|
+
const sortHidden = rawSorting?.[0] !== void 0 && sorting.length === 0;
|
|
9545
10433
|
const isPaginated = !!pagination;
|
|
9546
10434
|
const paginationObject = typeof pagination === "object" ? pagination : void 0;
|
|
9547
10435
|
const rowsPerPage = paginationObject?.rowsPerPage ?? 25;
|
|
@@ -9554,6 +10442,15 @@ function DataTableInner(props, ref) {
|
|
|
9554
10442
|
paginationObject?.onPageChange?.(newPageIndex);
|
|
9555
10443
|
}
|
|
9556
10444
|
});
|
|
10445
|
+
const effectivePageIndex = sortHidden && isPaginated ? 0 : currentPageIndex ?? 0;
|
|
10446
|
+
useEffect(() => {
|
|
10447
|
+
if (sortHidden) {
|
|
10448
|
+
setSorting([]);
|
|
10449
|
+
if (isPaginated) {
|
|
10450
|
+
setCurrentPageIndex(0);
|
|
10451
|
+
}
|
|
10452
|
+
}
|
|
10453
|
+
}, [sortHidden]);
|
|
9557
10454
|
const [refreshCounter, setRefreshCounter] = useState(0);
|
|
9558
10455
|
const pageLoader = paginationObject?.loadPageData;
|
|
9559
10456
|
const isAsyncPaginated = !!pageLoader && typeof pageLoader === "function";
|
|
@@ -9578,9 +10475,10 @@ function DataTableInner(props, ref) {
|
|
|
9578
10475
|
setRefreshCounter((c) => c + 1);
|
|
9579
10476
|
setCurrentPageIndex(0);
|
|
9580
10477
|
},
|
|
9581
|
-
clearCache
|
|
10478
|
+
clearCache,
|
|
10479
|
+
clearSelection
|
|
9582
10480
|
}),
|
|
9583
|
-
[setCurrentPageIndex, clearCache]
|
|
10481
|
+
[setCurrentPageIndex, clearCache, clearSelection]
|
|
9584
10482
|
);
|
|
9585
10483
|
const isFirstRender = useRef(true);
|
|
9586
10484
|
useEffect(() => {
|
|
@@ -9596,10 +10494,10 @@ function DataTableInner(props, ref) {
|
|
|
9596
10494
|
if (!isAsyncPaginated) {
|
|
9597
10495
|
return dataProp;
|
|
9598
10496
|
}
|
|
9599
|
-
return getOrLoad(
|
|
10497
|
+
return getOrLoad(effectivePageIndex, rowsPerPage, sorting?.[0]);
|
|
9600
10498
|
}, [
|
|
9601
10499
|
isAsyncPaginated,
|
|
9602
|
-
|
|
10500
|
+
effectivePageIndex,
|
|
9603
10501
|
rowsPerPage,
|
|
9604
10502
|
dataProp,
|
|
9605
10503
|
refreshKey,
|
|
@@ -9718,8 +10616,8 @@ function DataTableInner(props, ref) {
|
|
|
9718
10616
|
tabIndex: -1,
|
|
9719
10617
|
onClick: table2.getToggleAllRowsExpandedHandler(),
|
|
9720
10618
|
appearance: "ghost",
|
|
9721
|
-
className: cx(styles["expand-button"], {
|
|
9722
|
-
[styles["expanded"]]: table2.getIsAllRowsExpanded()
|
|
10619
|
+
className: cx(styles$1["expand-button"], {
|
|
10620
|
+
[styles$1["expanded"]]: table2.getIsAllRowsExpanded()
|
|
9723
10621
|
}),
|
|
9724
10622
|
size: "small",
|
|
9725
10623
|
icon: SvgChevronRight,
|
|
@@ -9739,8 +10637,8 @@ function DataTableInner(props, ref) {
|
|
|
9739
10637
|
appearance: "ghost",
|
|
9740
10638
|
size: "small",
|
|
9741
10639
|
icon: SvgChevronRight,
|
|
9742
|
-
className: cx(styles["expand-button"], {
|
|
9743
|
-
[styles["expanded"]]: row.getIsExpanded()
|
|
10640
|
+
className: cx(styles$1["expand-button"], {
|
|
10641
|
+
[styles$1["expanded"]]: row.getIsExpanded()
|
|
9744
10642
|
}),
|
|
9745
10643
|
"aria-label": row.getIsExpanded() ? "Collapse row" : "Expand row",
|
|
9746
10644
|
"aria-expanded": hasSubComponent && row.getCanExpand() ? row.getIsExpanded() : void 0,
|
|
@@ -9830,7 +10728,7 @@ function DataTableInner(props, ref) {
|
|
|
9830
10728
|
sorting,
|
|
9831
10729
|
...isPaginated && {
|
|
9832
10730
|
pagination: {
|
|
9833
|
-
pageIndex:
|
|
10731
|
+
pageIndex: effectivePageIndex,
|
|
9834
10732
|
pageSize: rowsPerPage
|
|
9835
10733
|
}
|
|
9836
10734
|
}
|
|
@@ -9863,6 +10761,36 @@ function DataTableInner(props, ref) {
|
|
|
9863
10761
|
}
|
|
9864
10762
|
}
|
|
9865
10763
|
});
|
|
10764
|
+
const previousRowSelectionRef = useRef(rowSelection);
|
|
10765
|
+
const hasLostSelectedRow = Object.keys(previousRowSelectionRef.current).some(
|
|
10766
|
+
(id) => previousRowSelectionRef.current[id] && !rowSelection[id]
|
|
10767
|
+
);
|
|
10768
|
+
previousRowSelectionRef.current = rowSelection;
|
|
10769
|
+
if (isAllRowsSelected && (hasLostSelectedRow || selectedRowCount === 0)) {
|
|
10770
|
+
setIsAllRowsSelected(false);
|
|
10771
|
+
}
|
|
10772
|
+
const hasUnselectedLoadedRow = isAllRowsSelected && table.getCoreRowModel().flatRows.some((row) => row.getCanSelect() && !row.getIsSelected());
|
|
10773
|
+
useLayoutEffect(() => {
|
|
10774
|
+
if (hasUnselectedLoadedRow) {
|
|
10775
|
+
table.toggleAllRowsSelected(true);
|
|
10776
|
+
}
|
|
10777
|
+
}, [hasUnselectedLoadedRow, table]);
|
|
10778
|
+
const isBulkActionBarEnabled = !!bulkActions && !!isSelectable;
|
|
10779
|
+
const isBulkActionBarVisible = isBulkActionBarEnabled && selectedRowCount > 0;
|
|
10780
|
+
const canSelectAllRows = !!bulkActions?.selectAll && isPaginated && !isCursorPagination && totalItemCount !== void 0 && totalItemCount > rowsPerPage && !isAllRowsSelected;
|
|
10781
|
+
let allRowCount = totalItemCount;
|
|
10782
|
+
let selectableRowCount = bulkActions?.selectableRowCount ?? totalItemCount;
|
|
10783
|
+
if (bulkActions?.selectAll && !isAsyncPaginated && !isCursorPagination) {
|
|
10784
|
+
const flatRows = table.getCoreRowModel().flatRows;
|
|
10785
|
+
allRowCount = flatRows.length;
|
|
10786
|
+
selectableRowCount = bulkActions.selectableRowCount ?? flatRows.filter((row) => row.getCanSelect()).length;
|
|
10787
|
+
}
|
|
10788
|
+
const getBulkSelection = () => isAllRowsSelected && selectableRowCount !== void 0 ? { mode: "all", selectedRowCount: selectableRowCount } : {
|
|
10789
|
+
mode: "rows",
|
|
10790
|
+
rowIds: Object.keys(rowSelection).filter(
|
|
10791
|
+
(id) => rowSelection[id]
|
|
10792
|
+
)
|
|
10793
|
+
};
|
|
9866
10794
|
const rowVirtualizer = useDataTableVirtualizer({
|
|
9867
10795
|
rowCount: table.getRowModel().rows.length,
|
|
9868
10796
|
scrollRef: tableRef,
|
|
@@ -9947,10 +10875,41 @@ function DataTableInner(props, ref) {
|
|
|
9947
10875
|
const columnCount = useMemo(() => {
|
|
9948
10876
|
return headers.filter((header) => header.subHeaders?.length === 0).length;
|
|
9949
10877
|
}, [headers]);
|
|
9950
|
-
const containerClassName = cx(styles["data-table-container"], className, {
|
|
9951
|
-
[styles["container-with-pagination"]]: pagination && !isTrulyEmpty
|
|
10878
|
+
const containerClassName = cx(styles$1["data-table-container"], className, {
|
|
10879
|
+
[styles$1["container-with-pagination"]]: pagination && !isTrulyEmpty
|
|
9952
10880
|
});
|
|
9953
|
-
|
|
10881
|
+
const handleFilterChange = useCallback(
|
|
10882
|
+
(next) => {
|
|
10883
|
+
if (isPaginated) {
|
|
10884
|
+
setCurrentPageIndex(0);
|
|
10885
|
+
}
|
|
10886
|
+
if (isAsyncPaginated) {
|
|
10887
|
+
setRefreshCounter((c) => c + 1);
|
|
10888
|
+
}
|
|
10889
|
+
filters?.onChange(next);
|
|
10890
|
+
},
|
|
10891
|
+
[isAsyncPaginated, isPaginated, filters, setCurrentPageIndex]
|
|
10892
|
+
);
|
|
10893
|
+
const hasToolbar = (filters?.items.length ?? 0) > 0 || (tools?.actions.length ?? 0) > 0 || !!columnEditingSection;
|
|
10894
|
+
const hasWrapper = hasToolbar || isBulkActionBarEnabled || !!rowAdd;
|
|
10895
|
+
const { wrapperLayoutStyles, containerLayoutStyles } = (() => {
|
|
10896
|
+
if (!hasWrapper) {
|
|
10897
|
+
return { wrapperLayoutStyles: {}, containerLayoutStyles: layoutStyles };
|
|
10898
|
+
}
|
|
10899
|
+
const wrapper = {};
|
|
10900
|
+
const container = {};
|
|
10901
|
+
for (const [key, value] of Object.entries(layoutStyles ?? {})) {
|
|
10902
|
+
(PARENT_PLACEMENT_KEYS.has(key) ? wrapper : container)[key] = value;
|
|
10903
|
+
}
|
|
10904
|
+
if ("flex" in wrapper || "flexGrow" in wrapper) {
|
|
10905
|
+
container.flex = "1 1 auto";
|
|
10906
|
+
if (style?.minHeight === void 0) {
|
|
10907
|
+
container.minHeight = 0;
|
|
10908
|
+
}
|
|
10909
|
+
}
|
|
10910
|
+
return { wrapperLayoutStyles: wrapper, containerLayoutStyles: container };
|
|
10911
|
+
})();
|
|
10912
|
+
const tableElement = /* @__PURE__ */ jsx(
|
|
9954
10913
|
DTFocusProvider,
|
|
9955
10914
|
{
|
|
9956
10915
|
rowCount,
|
|
@@ -9961,139 +10920,205 @@ function DataTableInner(props, ref) {
|
|
|
9961
10920
|
virtualizer: rowVirtualizer,
|
|
9962
10921
|
headerRowCount,
|
|
9963
10922
|
children: /* @__PURE__ */ jsx(DataTableSurfaceCoordinatorProvider, { intersectionBoundaryRef: tableRef, children: /* @__PURE__ */ jsxs(
|
|
9964
|
-
|
|
10923
|
+
Flex,
|
|
9965
10924
|
{
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
style: {
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
10925
|
+
direction: "column",
|
|
10926
|
+
gap: "2",
|
|
10927
|
+
style: hasWrapper ? {
|
|
10928
|
+
maxHeight: "100%",
|
|
10929
|
+
maxWidth: "100%",
|
|
10930
|
+
minHeight: 0,
|
|
10931
|
+
minWidth: 0,
|
|
10932
|
+
...wrapperLayoutStyles
|
|
10933
|
+
} : { display: "contents" },
|
|
9973
10934
|
children: [
|
|
10935
|
+
hasToolbar && // Hidden rather than unmounted: FilterBar holds uncommitted input.
|
|
10936
|
+
/* @__PURE__ */ jsx("div", { hidden: isBulkActionBarVisible, children: /* @__PURE__ */ jsx(
|
|
10937
|
+
DataTableFilterToolbar,
|
|
10938
|
+
{
|
|
10939
|
+
filters,
|
|
10940
|
+
tools,
|
|
10941
|
+
onFilterChange: handleFilterChange,
|
|
10942
|
+
columnEditing: columnEditingSection
|
|
10943
|
+
}
|
|
10944
|
+
) }),
|
|
10945
|
+
isBulkActionBarEnabled && bulkActions && /* @__PURE__ */ jsx(
|
|
10946
|
+
DataTableBulkActionBar,
|
|
10947
|
+
{
|
|
10948
|
+
actions: bulkActions,
|
|
10949
|
+
selectedCount: isAllRowsSelected && selectableRowCount !== void 0 ? selectableRowCount : selectedRowCount,
|
|
10950
|
+
selectAllCount: canSelectAllRows ? selectableRowCount : void 0,
|
|
10951
|
+
hasUnselectableRows: selectableRowCount !== void 0 && allRowCount !== void 0 && selectableRowCount < allRowCount,
|
|
10952
|
+
onSelectAll: () => {
|
|
10953
|
+
setIsAllRowsSelected(true);
|
|
10954
|
+
table.toggleAllRowsSelected(true);
|
|
10955
|
+
},
|
|
10956
|
+
onCancel: clearSelection,
|
|
10957
|
+
getSelection: getBulkSelection,
|
|
10958
|
+
onActionComplete: clearSelection,
|
|
10959
|
+
tableRef
|
|
10960
|
+
}
|
|
10961
|
+
),
|
|
9974
10962
|
/* @__PURE__ */ jsxs(
|
|
9975
|
-
|
|
10963
|
+
TableContainer,
|
|
9976
10964
|
{
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
|
|
9980
|
-
|
|
9981
|
-
|
|
10965
|
+
...rest,
|
|
10966
|
+
ref: tableRef,
|
|
10967
|
+
style: {
|
|
10968
|
+
...style,
|
|
10969
|
+
...containerLayoutStyles,
|
|
10970
|
+
width: cssVars["--a2-table-width"]
|
|
10971
|
+
},
|
|
10972
|
+
className: containerClassName,
|
|
9982
10973
|
children: [
|
|
9983
|
-
/* @__PURE__ */
|
|
9984
|
-
|
|
9985
|
-
DataTableRowClickProvider,
|
|
10974
|
+
/* @__PURE__ */ jsxs(
|
|
10975
|
+
TableBase,
|
|
9986
10976
|
{
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
readOnlyRowMap
|
|
9997
|
-
}
|
|
9998
|
-
)
|
|
9999
|
-
}
|
|
10000
|
-
),
|
|
10001
|
-
isEmpty && emptyState && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10002
|
-
/* @__PURE__ */ jsx(SrOnly, { children: "No data to display." }),
|
|
10003
|
-
/* @__PURE__ */ jsx("div", { className: styles["empty-state-container"], children: /* @__PURE__ */ jsxs(
|
|
10004
|
-
Flex,
|
|
10005
|
-
{
|
|
10006
|
-
justifyContent: "center",
|
|
10007
|
-
alignItems: "center",
|
|
10008
|
-
direction: "column",
|
|
10009
|
-
gap: 2,
|
|
10010
|
-
children: [
|
|
10011
|
-
EmptyStateSvg && /* @__PURE__ */ jsx(EmptyStateSvg, { "aria-hidden": "true" }),
|
|
10012
|
-
emptyState.content
|
|
10013
|
-
]
|
|
10014
|
-
}
|
|
10015
|
-
) })
|
|
10016
|
-
] }),
|
|
10017
|
-
isLoading && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10018
|
-
/* @__PURE__ */ jsx(SrOnly, { children: "Loading data. Please wait." }),
|
|
10019
|
-
/* @__PURE__ */ jsx(
|
|
10020
|
-
"div",
|
|
10021
|
-
{
|
|
10022
|
-
style: {
|
|
10023
|
-
height: `${loadingSpacerHeight}px`
|
|
10024
|
-
},
|
|
10025
|
-
role: "presentation",
|
|
10026
|
-
"aria-hidden": "true",
|
|
10027
|
-
children: /* @__PURE__ */ jsx(
|
|
10028
|
-
Flex,
|
|
10977
|
+
type: "data-table",
|
|
10978
|
+
style: cssVars,
|
|
10979
|
+
rowCount,
|
|
10980
|
+
colCount: columnCount,
|
|
10981
|
+
hasSubRows,
|
|
10982
|
+
children: [
|
|
10983
|
+
/* @__PURE__ */ jsx(DataTableHeader, { table, tableRef }),
|
|
10984
|
+
/* @__PURE__ */ jsx(
|
|
10985
|
+
DataTableRowClickProvider,
|
|
10029
10986
|
{
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10987
|
+
onClickRow,
|
|
10988
|
+
readOnlyRowMap,
|
|
10989
|
+
children: /* @__PURE__ */ jsx(
|
|
10990
|
+
DataTableBody,
|
|
10991
|
+
{
|
|
10992
|
+
table,
|
|
10993
|
+
hasSubRows,
|
|
10994
|
+
virtualizer: rowVirtualizer,
|
|
10995
|
+
getRowVersion,
|
|
10996
|
+
readOnlyRowMap
|
|
10997
|
+
}
|
|
10998
|
+
)
|
|
10999
|
+
}
|
|
11000
|
+
),
|
|
11001
|
+
isEmpty && emptyState && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11002
|
+
/* @__PURE__ */ jsx(SrOnly, { children: "No data to display." }),
|
|
11003
|
+
/* @__PURE__ */ jsx("div", { className: styles$1["empty-state-container"], children: /* @__PURE__ */ jsxs(
|
|
11004
|
+
Flex,
|
|
11005
|
+
{
|
|
11006
|
+
justifyContent: "center",
|
|
11007
|
+
alignItems: "center",
|
|
11008
|
+
direction: "column",
|
|
11009
|
+
gap: 2,
|
|
11010
|
+
children: [
|
|
11011
|
+
EmptyStateSvg && /* @__PURE__ */ jsx(EmptyStateSvg, { "aria-hidden": "true" }),
|
|
11012
|
+
emptyState.content
|
|
11013
|
+
]
|
|
11014
|
+
}
|
|
11015
|
+
) })
|
|
11016
|
+
] }),
|
|
11017
|
+
isLoading && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11018
|
+
/* @__PURE__ */ jsx(SrOnly, { children: "Loading data. Please wait." }),
|
|
11019
|
+
/* @__PURE__ */ jsx(
|
|
11020
|
+
"div",
|
|
11021
|
+
{
|
|
11022
|
+
style: {
|
|
11023
|
+
height: `${loadingSpacerHeight}px`
|
|
11024
|
+
},
|
|
11025
|
+
role: "presentation",
|
|
11026
|
+
"aria-hidden": "true",
|
|
11027
|
+
children: /* @__PURE__ */ jsx(
|
|
11028
|
+
Flex,
|
|
11029
|
+
{
|
|
11030
|
+
justifyContent: "center",
|
|
11031
|
+
alignItems: "center",
|
|
11032
|
+
style: {
|
|
11033
|
+
position: "absolute",
|
|
11034
|
+
top: 0,
|
|
11035
|
+
bottom: 0,
|
|
11036
|
+
left: 0,
|
|
11037
|
+
right: 0,
|
|
11038
|
+
margin: "auto",
|
|
11039
|
+
zIndex: 3
|
|
11040
|
+
},
|
|
11041
|
+
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
11042
|
+
}
|
|
11043
|
+
)
|
|
11044
|
+
}
|
|
11045
|
+
)
|
|
11046
|
+
] }),
|
|
11047
|
+
hasFooters && !isTrulyEmpty && /* @__PURE__ */ jsx(
|
|
11048
|
+
DataTableFooter,
|
|
11049
|
+
{
|
|
11050
|
+
className: pagination ? styles$1["footer-with-pagination"] : void 0,
|
|
11051
|
+
table,
|
|
11052
|
+
columns: columnsProp,
|
|
11053
|
+
customFooter
|
|
10042
11054
|
}
|
|
10043
11055
|
)
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
11056
|
+
]
|
|
11057
|
+
}
|
|
11058
|
+
),
|
|
11059
|
+
isEmpty && emptyState?.includeAddRow && rowAdd && /* @__PURE__ */ jsx(DataTableEmptyAddRow, { rowAdd }),
|
|
11060
|
+
pagination && !isTrulyEmpty && (isCursorPagination ? /* @__PURE__ */ jsx(
|
|
11061
|
+
DataTableCursorPagination,
|
|
11062
|
+
{
|
|
11063
|
+
itemsPerPage: rowsPerPage,
|
|
11064
|
+
page: effectivePageIndex + 1,
|
|
11065
|
+
hasNextPage: paginationObject?.hasNextPage,
|
|
11066
|
+
hasPrevPage: paginationObject?.hasPrevPage,
|
|
11067
|
+
onPageChange: (page) => {
|
|
11068
|
+
setCurrentPageIndex(page - 1);
|
|
11069
|
+
},
|
|
11070
|
+
onItemsPerPageChange: (itemsPerPage) => {
|
|
11071
|
+
paginationObject?.onRowsPerPageChange?.(itemsPerPage);
|
|
11072
|
+
},
|
|
11073
|
+
itemsPerPageOptions: paginationObject?.onRowsPerPageChange ? paginationObject.rowsPerPageOptions : void 0
|
|
11074
|
+
}
|
|
11075
|
+
) : /* @__PURE__ */ jsx(
|
|
11076
|
+
DataTablePagination,
|
|
10049
11077
|
{
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
11078
|
+
itemsPerPage: rowsPerPage,
|
|
11079
|
+
showCount: paginationObject?.showCount ?? true,
|
|
11080
|
+
page: effectivePageIndex + 1,
|
|
11081
|
+
totalItemCount,
|
|
11082
|
+
onPageChange: (page) => {
|
|
11083
|
+
setCurrentPageIndex(page - 1);
|
|
11084
|
+
},
|
|
11085
|
+
onItemsPerPageChange: (itemsPerPage) => {
|
|
11086
|
+
paginationObject?.onRowsPerPageChange?.(itemsPerPage);
|
|
11087
|
+
},
|
|
11088
|
+
itemsPerPageOptions: paginationObject?.rowsPerPageOptions
|
|
10054
11089
|
}
|
|
10055
|
-
)
|
|
11090
|
+
))
|
|
10056
11091
|
]
|
|
10057
11092
|
}
|
|
10058
11093
|
),
|
|
10059
|
-
|
|
10060
|
-
DataTableCursorPagination,
|
|
10061
|
-
{
|
|
10062
|
-
itemsPerPage: rowsPerPage,
|
|
10063
|
-
page: (currentPageIndex ?? 0) + 1,
|
|
10064
|
-
hasNextPage: paginationObject?.hasNextPage,
|
|
10065
|
-
hasPrevPage: paginationObject?.hasPrevPage,
|
|
10066
|
-
onPageChange: (page) => {
|
|
10067
|
-
setCurrentPageIndex(page - 1);
|
|
10068
|
-
},
|
|
10069
|
-
onItemsPerPageChange: (itemsPerPage) => {
|
|
10070
|
-
paginationObject?.onRowsPerPageChange?.(itemsPerPage);
|
|
10071
|
-
},
|
|
10072
|
-
itemsPerPageOptions: paginationObject?.onRowsPerPageChange ? paginationObject.rowsPerPageOptions : void 0
|
|
10073
|
-
}
|
|
10074
|
-
) : /* @__PURE__ */ jsx(
|
|
10075
|
-
DataTablePagination,
|
|
10076
|
-
{
|
|
10077
|
-
itemsPerPage: rowsPerPage,
|
|
10078
|
-
showCount: paginationObject?.showCount ?? true,
|
|
10079
|
-
page: (currentPageIndex ?? 0) + 1,
|
|
10080
|
-
totalItemCount,
|
|
10081
|
-
onPageChange: (page) => {
|
|
10082
|
-
setCurrentPageIndex(page - 1);
|
|
10083
|
-
},
|
|
10084
|
-
onItemsPerPageChange: (itemsPerPage) => {
|
|
10085
|
-
paginationObject?.onRowsPerPageChange?.(itemsPerPage);
|
|
10086
|
-
},
|
|
10087
|
-
itemsPerPageOptions: paginationObject?.rowsPerPageOptions
|
|
10088
|
-
}
|
|
10089
|
-
))
|
|
11094
|
+
rowAdd && /* @__PURE__ */ jsx(DataTableAddRow, { rowAdd })
|
|
10090
11095
|
]
|
|
10091
11096
|
}
|
|
10092
11097
|
) })
|
|
10093
11098
|
}
|
|
10094
11099
|
);
|
|
11100
|
+
return tableElement;
|
|
10095
11101
|
}
|
|
10096
11102
|
const DataTable = forwardRef(DataTableInner);
|
|
10097
11103
|
|
|
10098
|
-
|
|
10099
|
-
|
|
11104
|
+
function DataTableEditColumnsDrawer({
|
|
11105
|
+
open,
|
|
11106
|
+
onClose,
|
|
11107
|
+
sections
|
|
11108
|
+
}) {
|
|
11109
|
+
const drawerSections = useMemo(
|
|
11110
|
+
() => sections.map((section, i) => toEditColumnsSection(section, `${i}`)),
|
|
11111
|
+
[sections]
|
|
11112
|
+
);
|
|
11113
|
+
return /* @__PURE__ */ jsx(
|
|
11114
|
+
EditColumnsDrawer,
|
|
11115
|
+
{
|
|
11116
|
+
open,
|
|
11117
|
+
onClose,
|
|
11118
|
+
sections: drawerSections
|
|
11119
|
+
}
|
|
11120
|
+
);
|
|
11121
|
+
}
|
|
11122
|
+
|
|
11123
|
+
export { COLUMN_TYPE_DEFAULTS as C, DataTable as D, chipsFormatter as a, booleanFormatter as b, createColumnHelper$1 as c, currencyFormatter as d, dateFormatter as e, dateTimeFormatter as f, getColumnTypeDefaults as g, htmlFormatter as h, dateFormatPresets as i, timeFormatter as j, DataTableEditColumnsDrawer as k, markdownFormatter as m, numberFormatter as n, percentFormatter as p, resolveColumnTypeConfig as r, timeFormatPresets as t, yearlessDateFormatter as y };
|
|
11124
|
+
//# sourceMappingURL=DataTableEditColumnsDrawer-DRgJgso9.js.map
|