brd-ui-kit 0.1.73 → 0.1.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brd-ui-kit.css +1 -1
- package/dist/calendar-B5QCV34E.cjs +2 -0
- package/dist/calendar-B5QCV34E.cjs.map +1 -0
- package/dist/calendar-Ba3kHG6w.js +3112 -0
- package/dist/calendar-Ba3kHG6w.js.map +1 -0
- package/dist/calendar-locale-BHyNJPb2.cjs +2 -0
- package/dist/calendar-locale-BHyNJPb2.cjs.map +1 -0
- package/dist/calendar-locale-DQ9wj0zF.js +592 -0
- package/dist/calendar-locale-DQ9wj0zF.js.map +1 -0
- package/dist/chart-9H_9wEfR.cjs +63 -0
- package/dist/{chart-CgVfpT_X.cjs.map → chart-9H_9wEfR.cjs.map} +1 -1
- package/dist/{chart-D15EtNmb.js → chart-DFbmMKiQ.js} +2956 -2951
- package/dist/{chart-D15EtNmb.js.map → chart-DFbmMKiQ.js.map} +1 -1
- package/dist/components/basic-chart/basic-chart.d.ts +1 -1
- package/dist/components/basic-table/basic-table.d.ts +33 -2
- package/dist/components/basic-table/index.d.ts +1 -1
- package/dist/components/data-table/data-table-actions-column.d.ts +23 -0
- package/dist/components/data-table/data-table-bulk-actions.d.ts +20 -0
- package/dist/components/data-table/data-table-column-visibility.d.ts +17 -0
- package/dist/components/data-table/data-table-editable-column.d.ts +12 -0
- package/dist/components/data-table/data-table-filter.d.ts +12 -0
- package/dist/components/data-table/data-table-row-actions-column.d.ts +53 -0
- package/dist/components/data-table/data-table-select-column.d.ts +2 -0
- package/dist/components/data-table/data-table.d.ts +2 -0
- package/dist/components/data-table/data-table.styles.d.ts +8 -0
- package/dist/components/data-table/index.d.ts +17 -0
- package/dist/components/data-table/use-data-table-editable-rows.d.ts +60 -0
- package/dist/components/data-table.d.ts +2 -0
- package/dist/components/input-field/input-field.d.ts +3 -3
- package/dist/components/input-phone/input-phone.d.ts +4 -4
- package/dist/components/popover-modal/popover-modal.d.ts +4 -4
- package/dist/components/select-field/select-field.d.ts +2 -2
- package/dist/components/textarea-field/index.d.ts +1 -1
- package/dist/components/ui/avatar/avatar.d.ts +7 -7
- package/dist/components/ui/badge/badge.d.ts +2 -2
- package/dist/components/ui/button/button.d.ts +3 -3
- package/dist/components/ui/button/button.styles.d.ts +2 -2
- package/dist/components/ui/calendar/calendar.d.ts +18 -14
- package/dist/components/ui/calendar/calendar.styles.d.ts +60 -2
- package/dist/components/ui/calendar/index.d.ts +3 -2
- package/dist/components/ui/card/card.d.ts +13 -13
- package/dist/components/ui/chart/chart.d.ts +23 -21
- package/dist/components/ui/checkbox/checkbox.d.ts +4 -4
- package/dist/components/ui/combobox/combobox.d.ts +6 -6
- package/dist/components/ui/dialog/dialog.d.ts +11 -11
- package/dist/components/ui/drawer/drawer.d.ts +11 -11
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +102 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.styles.d.ts +9 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +2 -0
- package/dist/components/ui/dropdown-menu.d.ts +2 -0
- package/dist/components/ui/icon/icon-presets.d.ts +5 -5
- package/dist/components/ui/icon/icon.d.ts +5 -4
- package/dist/components/ui/input/input.d.ts +2 -2
- package/dist/components/ui/input-group/input-group.d.ts +7 -7
- package/dist/components/ui/label/label.d.ts +4 -4
- package/dist/components/ui/pagination/pagination.d.ts +11 -10
- package/dist/components/ui/popover/popover.d.ts +8 -8
- package/dist/components/ui/progress/progress.d.ts +4 -4
- package/dist/components/ui/radio-group/radio-group.d.ts +7 -7
- package/dist/components/ui/select/select.d.ts +11 -11
- package/dist/components/ui/select/select.styles.d.ts +2 -2
- package/dist/components/ui/select-calendar-menu/index.d.ts +1 -0
- package/dist/components/ui/select-calendar-menu/select-calendar-menu.d.ts +33 -0
- package/dist/components/ui/select-calendar-menu.d.ts +2 -0
- package/dist/components/ui/separator/separator.d.ts +4 -4
- package/dist/components/ui/switch/switch.d.ts +4 -4
- package/dist/components/ui/table/table.d.ts +17 -17
- package/dist/components/ui/tabs/tabs.d.ts +8 -8
- package/dist/components/ui/toggle/toggle.styles.d.ts +1 -0
- package/dist/components/ui/toggle-group/toggle-group.d.ts +4 -3
- package/dist/components/ui/toggle-group/toggle-group.styles.d.ts +8 -2
- package/dist/components/ui/tooltip/tooltip.d.ts +8 -8
- package/dist/components/ui/typography/typography.d.ts +174 -174
- package/dist/components-app-pagination-app-pagination.cjs +1 -1
- package/dist/components-app-pagination-app-pagination.cjs.map +1 -1
- package/dist/components-app-pagination-app-pagination.js +46 -30
- package/dist/components-app-pagination-app-pagination.js.map +1 -1
- package/dist/components-app-pagination-app-pagination.styles.cjs +2 -2
- package/dist/components-app-pagination-app-pagination.styles.cjs.map +1 -1
- package/dist/components-app-pagination-app-pagination.styles.js +12 -12
- package/dist/components-app-pagination-app-pagination.styles.js.map +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.cjs +2 -2
- package/dist/components-avatar-uploader-avatar-uploader.cjs.map +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.js +37 -36
- package/dist/components-avatar-uploader-avatar-uploader.js.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.cjs +2 -2
- package/dist/components-basic-avatar-basic-avatar.cjs.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.js +7 -5
- package/dist/components-basic-avatar-basic-avatar.js.map +1 -1
- package/dist/components-basic-chart-basic-chart.cjs +2 -2
- package/dist/components-basic-chart-basic-chart.cjs.map +1 -1
- package/dist/components-basic-chart-basic-chart.js +106 -108
- package/dist/components-basic-chart-basic-chart.js.map +1 -1
- package/dist/components-basic-drawer-basic-drawer.cjs +1 -1
- package/dist/components-basic-drawer-basic-drawer.cjs.map +1 -1
- package/dist/components-basic-drawer-basic-drawer.js +13 -14
- package/dist/components-basic-drawer-basic-drawer.js.map +1 -1
- package/dist/components-basic-table-basic-table.cjs +2 -2
- package/dist/components-basic-table-basic-table.cjs.map +1 -1
- package/dist/components-basic-table-basic-table.js +876 -758
- package/dist/components-basic-table-basic-table.js.map +1 -1
- package/dist/components-data-table-data-table-actions-column.cjs +2 -0
- package/dist/components-data-table-data-table-actions-column.cjs.map +1 -0
- package/dist/components-data-table-data-table-actions-column.js +71 -0
- package/dist/components-data-table-data-table-actions-column.js.map +1 -0
- package/dist/components-data-table-data-table-bulk-actions.cjs +2 -0
- package/dist/components-data-table-data-table-bulk-actions.cjs.map +1 -0
- package/dist/components-data-table-data-table-bulk-actions.js +60 -0
- package/dist/components-data-table-data-table-bulk-actions.js.map +1 -0
- package/dist/components-data-table-data-table-column-visibility.cjs +3 -0
- package/dist/components-data-table-data-table-column-visibility.cjs.map +1 -0
- package/dist/components-data-table-data-table-column-visibility.js +100 -0
- package/dist/components-data-table-data-table-column-visibility.js.map +1 -0
- package/dist/components-data-table-data-table-editable-column.cjs +2 -0
- package/dist/components-data-table-data-table-editable-column.cjs.map +1 -0
- package/dist/components-data-table-data-table-editable-column.js +15 -0
- package/dist/components-data-table-data-table-editable-column.js.map +1 -0
- package/dist/components-data-table-data-table-filter.cjs +2 -0
- package/dist/components-data-table-data-table-filter.cjs.map +1 -0
- package/dist/components-data-table-data-table-filter.js +39 -0
- package/dist/components-data-table-data-table-filter.js.map +1 -0
- package/dist/components-data-table-data-table-row-actions-column.cjs +2 -0
- package/dist/components-data-table-data-table-row-actions-column.cjs.map +1 -0
- package/dist/components-data-table-data-table-row-actions-column.js +173 -0
- package/dist/components-data-table-data-table-row-actions-column.js.map +1 -0
- package/dist/components-data-table-data-table-select-column.cjs +2 -0
- package/dist/components-data-table-data-table-select-column.cjs.map +1 -0
- package/dist/components-data-table-data-table-select-column.js +44 -0
- package/dist/components-data-table-data-table-select-column.js.map +1 -0
- package/dist/components-data-table-data-table.cjs +2 -0
- package/dist/components-data-table-data-table.cjs.map +1 -0
- package/dist/components-data-table-data-table.js +37 -0
- package/dist/components-data-table-data-table.js.map +1 -0
- package/dist/components-data-table-data-table.styles.cjs +4 -0
- package/dist/components-data-table-data-table.styles.cjs.map +1 -0
- package/dist/components-data-table-data-table.styles.js +22 -0
- package/dist/components-data-table-data-table.styles.js.map +1 -0
- package/dist/components-data-table-use-data-table-editable-rows.cjs +2 -0
- package/dist/components-data-table-use-data-table-editable-rows.cjs.map +1 -0
- package/dist/components-data-table-use-data-table-editable-rows.js +154 -0
- package/dist/components-data-table-use-data-table-editable-rows.js.map +1 -0
- package/dist/components-data-table.cjs +2 -0
- package/dist/components-data-table.cjs.map +1 -0
- package/dist/components-data-table.js +21 -0
- package/dist/components-data-table.js.map +1 -0
- package/dist/components-files-uploader-files-uploader.cjs.map +1 -1
- package/dist/components-files-uploader-files-uploader.js.map +1 -1
- package/dist/components-input-contact-input-contact.cjs +1 -1
- package/dist/components-input-contact-input-contact.cjs.map +1 -1
- package/dist/components-input-contact-input-contact.js +12 -10
- package/dist/components-input-contact-input-contact.js.map +1 -1
- package/dist/components-input-field-input-field.cjs +1 -1
- package/dist/components-input-field-input-field.cjs.map +1 -1
- package/dist/components-input-field-input-field.js +18 -19
- package/dist/components-input-field-input-field.js.map +1 -1
- package/dist/components-input-password-input-password.cjs +1 -1
- package/dist/components-input-password-input-password.cjs.map +1 -1
- package/dist/components-input-password-input-password.js +8 -6
- package/dist/components-input-password-input-password.js.map +1 -1
- package/dist/components-input-phone-input-phone.cjs.map +1 -1
- package/dist/components-input-phone-input-phone.js.map +1 -1
- package/dist/components-popover-modal-popover-modal.cjs +1 -1
- package/dist/components-popover-modal-popover-modal.cjs.map +1 -1
- package/dist/components-popover-modal-popover-modal.js +53 -35
- package/dist/components-popover-modal-popover-modal.js.map +1 -1
- package/dist/components-select-field-select-field.cjs.map +1 -1
- package/dist/components-select-field-select-field.js.map +1 -1
- package/dist/components-textarea-field-textarea-field.cjs.map +1 -1
- package/dist/components-textarea-field-textarea-field.js.map +1 -1
- package/dist/components-ui-avatar-avatar.cjs +1 -1
- package/dist/components-ui-avatar-avatar.cjs.map +1 -1
- package/dist/components-ui-avatar-avatar.js +12 -13
- package/dist/components-ui-avatar-avatar.js.map +1 -1
- package/dist/components-ui-badge-badge.cjs +1 -1
- package/dist/components-ui-badge-badge.cjs.map +1 -1
- package/dist/components-ui-badge-badge.js +10 -11
- package/dist/components-ui-badge-badge.js.map +1 -1
- package/dist/components-ui-button-button.cjs +1 -1
- package/dist/components-ui-button-button.cjs.map +1 -1
- package/dist/components-ui-button-button.js +10 -11
- package/dist/components-ui-button-button.js.map +1 -1
- package/dist/components-ui-button-button.styles.cjs +18 -8
- package/dist/components-ui-button-button.styles.cjs.map +1 -1
- package/dist/components-ui-button-button.styles.js +49 -33
- package/dist/components-ui-button-button.styles.js.map +1 -1
- package/dist/components-ui-calendar-calendar.cjs +1 -12
- package/dist/components-ui-calendar-calendar.cjs.map +1 -1
- package/dist/components-ui-calendar-calendar.js +12 -3757
- package/dist/components-ui-calendar-calendar.js.map +1 -1
- package/dist/components-ui-calendar-calendar.styles.cjs +17 -13
- package/dist/components-ui-calendar-calendar.styles.cjs.map +1 -1
- package/dist/components-ui-calendar-calendar.styles.js +193 -24
- package/dist/components-ui-calendar-calendar.styles.js.map +1 -1
- package/dist/components-ui-calendar.cjs +1 -1
- package/dist/components-ui-calendar.js +3 -2
- package/dist/components-ui-calendar.js.map +1 -1
- package/dist/components-ui-card-card.cjs +1 -1
- package/dist/components-ui-card-card.cjs.map +1 -1
- package/dist/components-ui-card-card.js +10 -11
- package/dist/components-ui-card-card.js.map +1 -1
- package/dist/components-ui-card-card.styles.cjs +2 -2
- package/dist/components-ui-card-card.styles.cjs.map +1 -1
- package/dist/components-ui-card-card.styles.js +2 -2
- package/dist/components-ui-card-card.styles.js.map +1 -1
- package/dist/components-ui-chart-chart.cjs +1 -1
- package/dist/components-ui-chart-chart.js +1 -1
- package/dist/components-ui-chart.cjs +1 -1
- package/dist/components-ui-chart.js +1 -1
- package/dist/components-ui-checkbox-checkbox.cjs +1 -1
- package/dist/components-ui-checkbox-checkbox.cjs.map +1 -1
- package/dist/components-ui-checkbox-checkbox.js +11 -12
- package/dist/components-ui-checkbox-checkbox.js.map +1 -1
- package/dist/components-ui-combobox-combobox.cjs +5 -5
- package/dist/components-ui-combobox-combobox.cjs.map +1 -1
- package/dist/components-ui-combobox-combobox.js +1477 -1479
- package/dist/components-ui-combobox-combobox.js.map +1 -1
- package/dist/components-ui-dialog-dialog.cjs +1 -1
- package/dist/components-ui-dialog-dialog.cjs.map +1 -1
- package/dist/components-ui-dialog-dialog.js +4 -5
- package/dist/components-ui-dialog-dialog.js.map +1 -1
- package/dist/components-ui-drawer-drawer.cjs +2 -2
- package/dist/components-ui-drawer-drawer.cjs.map +1 -1
- package/dist/components-ui-drawer-drawer.js +16 -19
- package/dist/components-ui-drawer-drawer.js.map +1 -1
- package/dist/components-ui-dropdown-menu-dropdown-menu.cjs +3 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.cjs.map +1 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.js +292 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.js.map +1 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.styles.cjs +29 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.styles.cjs.map +1 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.styles.js +43 -0
- package/dist/components-ui-dropdown-menu-dropdown-menu.styles.js.map +1 -0
- package/dist/components-ui-dropdown-menu.cjs +2 -0
- package/dist/components-ui-dropdown-menu.cjs.map +1 -0
- package/dist/components-ui-dropdown-menu.js +17 -0
- package/dist/components-ui-dropdown-menu.js.map +1 -0
- package/dist/components-ui-field-field.cjs +1 -1
- package/dist/components-ui-field-field.cjs.map +1 -1
- package/dist/components-ui-field-field.js +14 -14
- package/dist/components-ui-field-field.js.map +1 -1
- package/dist/components-ui-icon-icon-presets.cjs +1 -1
- package/dist/components-ui-icon-icon-presets.cjs.map +1 -1
- package/dist/components-ui-icon-icon-presets.js +3 -3
- package/dist/components-ui-icon-icon-presets.js.map +1 -1
- package/dist/components-ui-icon-icon.cjs +1 -1
- package/dist/components-ui-icon-icon.cjs.map +1 -1
- package/dist/components-ui-icon-icon.js +60 -62713
- package/dist/components-ui-icon-icon.js.map +1 -1
- package/dist/components-ui-input-group-input-group.cjs +1 -1
- package/dist/components-ui-input-group-input-group.cjs.map +1 -1
- package/dist/components-ui-input-group-input-group.js +12 -13
- package/dist/components-ui-input-group-input-group.js.map +1 -1
- package/dist/components-ui-input-input.cjs +1 -1
- package/dist/components-ui-input-input.cjs.map +1 -1
- package/dist/components-ui-input-input.js +2 -3
- package/dist/components-ui-input-input.js.map +1 -1
- package/dist/components-ui-label-label.cjs +1 -1
- package/dist/components-ui-label-label.cjs.map +1 -1
- package/dist/components-ui-label-label.js +1 -1
- package/dist/components-ui-label-label.js.map +1 -1
- package/dist/components-ui-pagination-pagination.cjs +2 -1
- package/dist/components-ui-pagination-pagination.cjs.map +1 -1
- package/dist/components-ui-pagination-pagination.js +93 -63
- package/dist/components-ui-pagination-pagination.js.map +1 -1
- package/dist/components-ui-popover-popover.cjs +1 -1
- package/dist/components-ui-popover-popover.cjs.map +1 -1
- package/dist/components-ui-popover-popover.js +36 -31
- package/dist/components-ui-popover-popover.js.map +1 -1
- package/dist/components-ui-popover-popover.styles.cjs.map +1 -1
- package/dist/components-ui-popover-popover.styles.js.map +1 -1
- package/dist/components-ui-progress-progress.cjs +1 -1
- package/dist/components-ui-progress-progress.cjs.map +1 -1
- package/dist/components-ui-progress-progress.js +1 -1
- package/dist/components-ui-progress-progress.js.map +1 -1
- package/dist/components-ui-radio-group-radio-group.cjs +1 -1
- package/dist/components-ui-radio-group-radio-group.cjs.map +1 -1
- package/dist/components-ui-radio-group-radio-group.js +0 -1
- package/dist/components-ui-radio-group-radio-group.js.map +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs +2 -0
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs.map +1 -0
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.js +144 -0
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.js.map +1 -0
- package/dist/components-ui-select-calendar-menu.cjs +2 -0
- package/dist/components-ui-select-calendar-menu.cjs.map +1 -0
- package/dist/components-ui-select-calendar-menu.js +5 -0
- package/dist/components-ui-select-calendar-menu.js.map +1 -0
- package/dist/components-ui-select-select.cjs +1 -1
- package/dist/components-ui-select-select.cjs.map +1 -1
- package/dist/components-ui-select-select.js +21 -22
- package/dist/components-ui-select-select.js.map +1 -1
- package/dist/components-ui-select-select.styles.cjs +2 -2
- package/dist/components-ui-select-select.styles.cjs.map +1 -1
- package/dist/components-ui-select-select.styles.js +5 -5
- package/dist/components-ui-select-select.styles.js.map +1 -1
- package/dist/components-ui-separator-separator.cjs +1 -1
- package/dist/components-ui-separator-separator.cjs.map +1 -1
- package/dist/components-ui-separator-separator.js +11 -12
- package/dist/components-ui-separator-separator.js.map +1 -1
- package/dist/components-ui-sonner-sonner.styles.cjs.map +1 -1
- package/dist/components-ui-sonner-sonner.styles.js.map +1 -1
- package/dist/components-ui-switch-switch.cjs +1 -1
- package/dist/components-ui-switch-switch.cjs.map +1 -1
- package/dist/components-ui-switch-switch.js +6 -7
- package/dist/components-ui-switch-switch.js.map +1 -1
- package/dist/components-ui-table-table.cjs +1 -1
- package/dist/components-ui-table-table.cjs.map +1 -1
- package/dist/components-ui-table-table.js +0 -1
- package/dist/components-ui-table-table.js.map +1 -1
- package/dist/components-ui-tabs-tabs.cjs +2 -2
- package/dist/components-ui-tabs-tabs.cjs.map +1 -1
- package/dist/components-ui-tabs-tabs.js +16 -16
- package/dist/components-ui-tabs-tabs.js.map +1 -1
- package/dist/components-ui-toggle-group-toggle-group.cjs +1 -1
- package/dist/components-ui-toggle-group-toggle-group.cjs.map +1 -1
- package/dist/components-ui-toggle-group-toggle-group.js +52 -42
- package/dist/components-ui-toggle-group-toggle-group.js.map +1 -1
- package/dist/components-ui-toggle-group-toggle-group.styles.cjs +1 -17
- package/dist/components-ui-toggle-group-toggle-group.styles.cjs.map +1 -1
- package/dist/components-ui-toggle-group-toggle-group.styles.js +53 -30
- package/dist/components-ui-toggle-group-toggle-group.styles.js.map +1 -1
- package/dist/components-ui-toggle-toggle.styles.cjs +6 -11
- package/dist/components-ui-toggle-toggle.styles.cjs.map +1 -1
- package/dist/components-ui-toggle-toggle.styles.js +16 -18
- package/dist/components-ui-toggle-toggle.styles.js.map +1 -1
- package/dist/components-ui-tooltip-tooltip.cjs +1 -1
- package/dist/components-ui-tooltip-tooltip.cjs.map +1 -1
- package/dist/components-ui-tooltip-tooltip.js +9 -10
- package/dist/components-ui-tooltip-tooltip.js.map +1 -1
- package/dist/components-ui-typography-typography.cjs +1 -1
- package/dist/components-ui-typography-typography.cjs.map +1 -1
- package/dist/components-ui-typography-typography.js +7 -7
- package/dist/components-ui-typography-typography.js.map +1 -1
- package/dist/constants/calendar-locale.d.ts +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.js +223 -188
- package/dist/index.js.map +1 -1
- package/package.json +44 -17
- package/dist/chart-CgVfpT_X.cjs +0 -63
|
@@ -1,46 +1,49 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsx as y, jsxs as Ge } from "react/jsx-runtime";
|
|
2
|
+
import * as re from "react";
|
|
3
|
+
import { useMemo as Le, useCallback as me, useLayoutEffect as Ae } from "react";
|
|
4
|
+
import { Table as ze, TableHeader as Oe, TableRow as Y, TableHead as Be, TableBody as Ne, TableCell as Se } from "./components-ui-table-table.js";
|
|
5
|
+
import { cn as z } from "./lib-utils.js";
|
|
6
|
+
import { Input as Te } from "./components-ui-input-input.js";
|
|
7
|
+
import { Textarea as qe } from "./components-ui-textarea-textarea.js";
|
|
8
|
+
function G(e, o) {
|
|
6
9
|
return typeof e == "function" ? e(o) : e;
|
|
7
10
|
}
|
|
8
|
-
function
|
|
11
|
+
function P(e, o) {
|
|
9
12
|
return (t) => {
|
|
10
13
|
o.setState((n) => ({
|
|
11
14
|
...n,
|
|
12
|
-
[e]:
|
|
15
|
+
[e]: G(t, n[e])
|
|
13
16
|
}));
|
|
14
17
|
};
|
|
15
18
|
}
|
|
16
|
-
function
|
|
19
|
+
function Q(e) {
|
|
17
20
|
return e instanceof Function;
|
|
18
21
|
}
|
|
19
|
-
function
|
|
22
|
+
function ke(e) {
|
|
20
23
|
return Array.isArray(e) && e.every((o) => typeof o == "number");
|
|
21
24
|
}
|
|
22
|
-
function
|
|
23
|
-
const t = [], n = (
|
|
24
|
-
|
|
25
|
-
t.push(
|
|
26
|
-
const l = o(
|
|
25
|
+
function je(e, o) {
|
|
26
|
+
const t = [], n = (i) => {
|
|
27
|
+
i.forEach((r) => {
|
|
28
|
+
t.push(r);
|
|
29
|
+
const l = o(r);
|
|
27
30
|
l != null && l.length && n(l);
|
|
28
31
|
});
|
|
29
32
|
};
|
|
30
33
|
return n(e), t;
|
|
31
34
|
}
|
|
32
35
|
function S(e, o, t) {
|
|
33
|
-
let n = [],
|
|
34
|
-
return (
|
|
36
|
+
let n = [], i;
|
|
37
|
+
return (r) => {
|
|
35
38
|
let l;
|
|
36
39
|
t.key && t.debug && (l = Date.now());
|
|
37
|
-
const u = e(
|
|
40
|
+
const u = e(r);
|
|
38
41
|
if (!(u.length !== n.length || u.some((c, m) => n[m] !== c)))
|
|
39
|
-
return
|
|
42
|
+
return i;
|
|
40
43
|
n = u;
|
|
41
|
-
let
|
|
42
|
-
if (t.key && t.debug && (
|
|
43
|
-
const c = Math.round((Date.now() - l) * 100) / 100, m = Math.round((Date.now() -
|
|
44
|
+
let g;
|
|
45
|
+
if (t.key && t.debug && (g = Date.now()), i = o(...u), t == null || t.onChange == null || t.onChange(i), t.key && t.debug && t != null && t.debug()) {
|
|
46
|
+
const c = Math.round((Date.now() - l) * 100) / 100, m = Math.round((Date.now() - g) * 100) / 100, d = m / 16, s = (f, p) => {
|
|
44
47
|
for (f = String(f); f.length < p; )
|
|
45
48
|
f = " " + f;
|
|
46
49
|
return f;
|
|
@@ -48,88 +51,88 @@ function S(e, o, t) {
|
|
|
48
51
|
console.info(`%c⏱ ${s(m, 5)} /${s(c, 5)} ms`, `
|
|
49
52
|
font-size: .6rem;
|
|
50
53
|
font-weight: bold;
|
|
51
|
-
color: hsl(${Math.max(0, Math.min(120 - 120 *
|
|
54
|
+
color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t?.key);
|
|
52
55
|
}
|
|
53
|
-
return
|
|
56
|
+
return i;
|
|
54
57
|
};
|
|
55
58
|
}
|
|
56
59
|
function C(e, o, t, n) {
|
|
57
60
|
return {
|
|
58
61
|
debug: () => {
|
|
59
|
-
var
|
|
60
|
-
return (
|
|
62
|
+
var i;
|
|
63
|
+
return (i = e?.debugAll) != null ? i : e[o];
|
|
61
64
|
},
|
|
62
65
|
key: process.env.NODE_ENV === "development" && t,
|
|
63
66
|
onChange: n
|
|
64
67
|
};
|
|
65
68
|
}
|
|
66
|
-
function
|
|
67
|
-
const
|
|
69
|
+
function Ue(e, o, t, n) {
|
|
70
|
+
const i = () => {
|
|
68
71
|
var l;
|
|
69
|
-
return (l =
|
|
70
|
-
},
|
|
72
|
+
return (l = r.getValue()) != null ? l : e.options.renderFallbackValue;
|
|
73
|
+
}, r = {
|
|
71
74
|
id: `${o.id}_${t.id}`,
|
|
72
75
|
row: o,
|
|
73
76
|
column: t,
|
|
74
77
|
getValue: () => o.getValue(n),
|
|
75
|
-
renderValue:
|
|
76
|
-
getContext: S(() => [e, t, o,
|
|
78
|
+
renderValue: i,
|
|
79
|
+
getContext: S(() => [e, t, o, r], (l, u, a, g) => ({
|
|
77
80
|
table: l,
|
|
78
81
|
column: u,
|
|
79
82
|
row: a,
|
|
80
|
-
cell:
|
|
81
|
-
getValue:
|
|
82
|
-
renderValue:
|
|
83
|
+
cell: g,
|
|
84
|
+
getValue: g.getValue,
|
|
85
|
+
renderValue: g.renderValue
|
|
83
86
|
}), C(e.options, "debugCells", "cell.getContext"))
|
|
84
87
|
};
|
|
85
88
|
return e._features.forEach((l) => {
|
|
86
|
-
l.createCell == null || l.createCell(
|
|
87
|
-
}, {}),
|
|
89
|
+
l.createCell == null || l.createCell(r, t, o, e);
|
|
90
|
+
}, {}), r;
|
|
88
91
|
}
|
|
89
|
-
function
|
|
90
|
-
var
|
|
92
|
+
function Ke(e, o, t, n) {
|
|
93
|
+
var i, r;
|
|
91
94
|
const u = {
|
|
92
95
|
...e._getDefaultColumnDef(),
|
|
93
96
|
...o
|
|
94
97
|
}, a = u.accessorKey;
|
|
95
|
-
let
|
|
96
|
-
if (u.accessorFn ? c = u.accessorFn : a && (a.includes(".") ? c = (
|
|
97
|
-
let s =
|
|
98
|
+
let g = (i = (r = u.id) != null ? r : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? i : typeof u.header == "string" ? u.header : void 0, c;
|
|
99
|
+
if (u.accessorFn ? c = u.accessorFn : a && (a.includes(".") ? c = (d) => {
|
|
100
|
+
let s = d;
|
|
98
101
|
for (const p of a.split(".")) {
|
|
99
102
|
var f;
|
|
100
103
|
s = (f = s) == null ? void 0 : f[p], process.env.NODE_ENV !== "production" && s === void 0 && console.warn(`"${p}" in deeply nested key "${a}" returned undefined.`);
|
|
101
104
|
}
|
|
102
105
|
return s;
|
|
103
|
-
} : c = (
|
|
106
|
+
} : c = (d) => d[u.accessorKey]), !g)
|
|
104
107
|
throw process.env.NODE_ENV !== "production" ? new Error(u.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
105
108
|
let m = {
|
|
106
|
-
id: `${String(
|
|
109
|
+
id: `${String(g)}`,
|
|
107
110
|
accessorFn: c,
|
|
108
111
|
parent: n,
|
|
109
112
|
depth: t,
|
|
110
113
|
columnDef: u,
|
|
111
114
|
columns: [],
|
|
112
115
|
getFlatColumns: S(() => [!0], () => {
|
|
113
|
-
var
|
|
114
|
-
return [m, ...(
|
|
116
|
+
var d;
|
|
117
|
+
return [m, ...(d = m.columns) == null ? void 0 : d.flatMap((s) => s.getFlatColumns())];
|
|
115
118
|
}, C(e.options, "debugColumns", "column.getFlatColumns")),
|
|
116
|
-
getLeafColumns: S(() => [e._getOrderColumnsFn()], (
|
|
119
|
+
getLeafColumns: S(() => [e._getOrderColumnsFn()], (d) => {
|
|
117
120
|
var s;
|
|
118
121
|
if ((s = m.columns) != null && s.length) {
|
|
119
122
|
let f = m.columns.flatMap((p) => p.getLeafColumns());
|
|
120
|
-
return
|
|
123
|
+
return d(f);
|
|
121
124
|
}
|
|
122
125
|
return [m];
|
|
123
126
|
}, C(e.options, "debugColumns", "column.getLeafColumns"))
|
|
124
127
|
};
|
|
125
|
-
for (const
|
|
126
|
-
|
|
128
|
+
for (const d of e._features)
|
|
129
|
+
d.createColumn == null || d.createColumn(m, e);
|
|
127
130
|
return m;
|
|
128
131
|
}
|
|
129
|
-
const
|
|
130
|
-
function
|
|
132
|
+
const x = "debugHeaders";
|
|
133
|
+
function Ce(e, o, t) {
|
|
131
134
|
var n;
|
|
132
|
-
let
|
|
135
|
+
let r = {
|
|
133
136
|
id: (n = t.id) != null ? n : o.id,
|
|
134
137
|
column: o,
|
|
135
138
|
index: t.index,
|
|
@@ -144,221 +147,221 @@ function se(e, o, t) {
|
|
|
144
147
|
const l = [], u = (a) => {
|
|
145
148
|
a.subHeaders && a.subHeaders.length && a.subHeaders.map(u), l.push(a);
|
|
146
149
|
};
|
|
147
|
-
return u(
|
|
150
|
+
return u(r), l;
|
|
148
151
|
},
|
|
149
152
|
getContext: () => ({
|
|
150
153
|
table: e,
|
|
151
|
-
header:
|
|
154
|
+
header: r,
|
|
152
155
|
column: o
|
|
153
156
|
})
|
|
154
157
|
};
|
|
155
158
|
return e._features.forEach((l) => {
|
|
156
|
-
l.createHeader == null || l.createHeader(
|
|
157
|
-
}),
|
|
159
|
+
l.createHeader == null || l.createHeader(r, e);
|
|
160
|
+
}), r;
|
|
158
161
|
}
|
|
159
|
-
const
|
|
162
|
+
const Xe = {
|
|
160
163
|
createTable: (e) => {
|
|
161
|
-
e.getHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n,
|
|
162
|
-
var
|
|
163
|
-
const u = (
|
|
164
|
-
return
|
|
165
|
-
}, C(e.options,
|
|
166
|
-
var
|
|
167
|
-
const
|
|
168
|
-
return
|
|
169
|
-
}, C(e.options,
|
|
170
|
-
var
|
|
171
|
-
const
|
|
172
|
-
return
|
|
173
|
-
}, C(e.options,
|
|
164
|
+
e.getHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, i) => {
|
|
165
|
+
var r, l;
|
|
166
|
+
const u = (r = n?.map((m) => t.find((d) => d.id === m)).filter(Boolean)) != null ? r : [], a = (l = i?.map((m) => t.find((d) => d.id === m)).filter(Boolean)) != null ? l : [], g = t.filter((m) => !(n != null && n.includes(m.id)) && !(i != null && i.includes(m.id)));
|
|
167
|
+
return K(o, [...u, ...g, ...a], e);
|
|
168
|
+
}, C(e.options, x, "getHeaderGroups")), e.getCenterHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, i) => (t = t.filter((r) => !(n != null && n.includes(r.id)) && !(i != null && i.includes(r.id))), K(o, t, e, "center")), C(e.options, x, "getCenterHeaderGroups")), e.getLeftHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
|
|
169
|
+
var i;
|
|
170
|
+
const r = (i = n?.map((l) => t.find((u) => u.id === l)).filter(Boolean)) != null ? i : [];
|
|
171
|
+
return K(o, r, e, "left");
|
|
172
|
+
}, C(e.options, x, "getLeftHeaderGroups")), e.getRightHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
|
|
173
|
+
var i;
|
|
174
|
+
const r = (i = n?.map((l) => t.find((u) => u.id === l)).filter(Boolean)) != null ? i : [];
|
|
175
|
+
return K(o, r, e, "right");
|
|
176
|
+
}, C(e.options, x, "getRightHeaderGroups")), e.getFooterGroups = S(() => [e.getHeaderGroups()], (o) => [...o].reverse(), C(e.options, x, "getFooterGroups")), e.getLeftFooterGroups = S(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), C(e.options, x, "getLeftFooterGroups")), e.getCenterFooterGroups = S(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), C(e.options, x, "getCenterFooterGroups")), e.getRightFooterGroups = S(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), C(e.options, x, "getRightFooterGroups")), e.getFlatHeaders = S(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, x, "getFlatHeaders")), e.getLeftFlatHeaders = S(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, x, "getLeftFlatHeaders")), e.getCenterFlatHeaders = S(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, x, "getCenterFlatHeaders")), e.getRightFlatHeaders = S(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, x, "getRightFlatHeaders")), e.getCenterLeafHeaders = S(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
|
|
174
177
|
var n;
|
|
175
178
|
return !((n = t.subHeaders) != null && n.length);
|
|
176
|
-
}), C(e.options,
|
|
179
|
+
}), C(e.options, x, "getCenterLeafHeaders")), e.getLeftLeafHeaders = S(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
|
|
177
180
|
var n;
|
|
178
181
|
return !((n = t.subHeaders) != null && n.length);
|
|
179
|
-
}), C(e.options,
|
|
182
|
+
}), C(e.options, x, "getLeftLeafHeaders")), e.getRightLeafHeaders = S(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
|
|
180
183
|
var n;
|
|
181
184
|
return !((n = t.subHeaders) != null && n.length);
|
|
182
|
-
}), C(e.options,
|
|
183
|
-
var
|
|
184
|
-
return [...(
|
|
185
|
-
}, C(e.options,
|
|
185
|
+
}), C(e.options, x, "getRightLeafHeaders")), e.getLeafHeaders = S(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
|
|
186
|
+
var i, r, l, u, a, g;
|
|
187
|
+
return [...(i = (r = o[0]) == null ? void 0 : r.headers) != null ? i : [], ...(l = (u = t[0]) == null ? void 0 : u.headers) != null ? l : [], ...(a = (g = n[0]) == null ? void 0 : g.headers) != null ? a : []].map((c) => c.getLeafHeaders()).flat();
|
|
188
|
+
}, C(e.options, x, "getLeafHeaders"));
|
|
186
189
|
}
|
|
187
190
|
};
|
|
188
|
-
function
|
|
189
|
-
var
|
|
191
|
+
function K(e, o, t, n) {
|
|
192
|
+
var i, r;
|
|
190
193
|
let l = 0;
|
|
191
|
-
const u = function(
|
|
192
|
-
s === void 0 && (s = 1), l = Math.max(l, s),
|
|
194
|
+
const u = function(d, s) {
|
|
195
|
+
s === void 0 && (s = 1), l = Math.max(l, s), d.filter((f) => f.getIsVisible()).forEach((f) => {
|
|
193
196
|
var p;
|
|
194
197
|
(p = f.columns) != null && p.length && u(f.columns, s + 1);
|
|
195
198
|
}, 0);
|
|
196
199
|
};
|
|
197
200
|
u(e);
|
|
198
201
|
let a = [];
|
|
199
|
-
const
|
|
202
|
+
const g = (d, s) => {
|
|
200
203
|
const f = {
|
|
201
204
|
depth: s,
|
|
202
205
|
id: [n, `${s}`].filter(Boolean).join("_"),
|
|
203
206
|
headers: []
|
|
204
207
|
}, p = [];
|
|
205
|
-
|
|
206
|
-
const w = [...p].reverse()[0],
|
|
207
|
-
let
|
|
208
|
-
if (
|
|
208
|
+
d.forEach((R) => {
|
|
209
|
+
const w = [...p].reverse()[0], v = R.column.depth === f.depth;
|
|
210
|
+
let h, I = !1;
|
|
211
|
+
if (v && R.column.parent ? h = R.column.parent : (h = R.column, I = !0), w && w?.column === h)
|
|
209
212
|
w.subHeaders.push(R);
|
|
210
213
|
else {
|
|
211
|
-
const
|
|
212
|
-
id: [n, s,
|
|
213
|
-
isPlaceholder:
|
|
214
|
-
placeholderId:
|
|
214
|
+
const $ = Ce(t, h, {
|
|
215
|
+
id: [n, s, h.id, R?.id].filter(Boolean).join("_"),
|
|
216
|
+
isPlaceholder: I,
|
|
217
|
+
placeholderId: I ? `${p.filter((H) => H.column === h).length}` : void 0,
|
|
215
218
|
depth: s,
|
|
216
219
|
index: p.length
|
|
217
220
|
});
|
|
218
|
-
|
|
221
|
+
$.subHeaders.push(R), p.push($);
|
|
219
222
|
}
|
|
220
223
|
f.headers.push(R), R.headerGroup = f;
|
|
221
|
-
}), a.push(f), s > 0 &&
|
|
222
|
-
}, c = o.map((
|
|
224
|
+
}), a.push(f), s > 0 && g(p, s - 1);
|
|
225
|
+
}, c = o.map((d, s) => Ce(t, d, {
|
|
223
226
|
depth: l,
|
|
224
227
|
index: s
|
|
225
228
|
}));
|
|
226
|
-
|
|
227
|
-
const m = (
|
|
229
|
+
g(c, l - 1), a.reverse();
|
|
230
|
+
const m = (d) => d.filter((f) => f.column.getIsVisible()).map((f) => {
|
|
228
231
|
let p = 0, R = 0, w = [0];
|
|
229
|
-
f.subHeaders && f.subHeaders.length ? (w = [], m(f.subHeaders).forEach((
|
|
232
|
+
f.subHeaders && f.subHeaders.length ? (w = [], m(f.subHeaders).forEach((h) => {
|
|
230
233
|
let {
|
|
231
|
-
colSpan:
|
|
232
|
-
rowSpan:
|
|
233
|
-
} =
|
|
234
|
-
p +=
|
|
234
|
+
colSpan: I,
|
|
235
|
+
rowSpan: $
|
|
236
|
+
} = h;
|
|
237
|
+
p += I, w.push($);
|
|
235
238
|
})) : p = 1;
|
|
236
|
-
const
|
|
237
|
-
return R = R +
|
|
239
|
+
const v = Math.min(...w);
|
|
240
|
+
return R = R + v, f.colSpan = p, f.rowSpan = R, {
|
|
238
241
|
colSpan: p,
|
|
239
242
|
rowSpan: R
|
|
240
243
|
};
|
|
241
244
|
});
|
|
242
|
-
return m((
|
|
245
|
+
return m((i = (r = a[0]) == null ? void 0 : r.headers) != null ? i : []), a;
|
|
243
246
|
}
|
|
244
|
-
const
|
|
247
|
+
const de = (e, o, t, n, i, r, l) => {
|
|
245
248
|
let u = {
|
|
246
249
|
id: o,
|
|
247
250
|
index: n,
|
|
248
251
|
original: t,
|
|
249
|
-
depth:
|
|
252
|
+
depth: i,
|
|
250
253
|
parentId: l,
|
|
251
254
|
_valuesCache: {},
|
|
252
255
|
_uniqueValuesCache: {},
|
|
253
256
|
getValue: (a) => {
|
|
254
257
|
if (u._valuesCache.hasOwnProperty(a))
|
|
255
258
|
return u._valuesCache[a];
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
258
|
-
return u._valuesCache[a] =
|
|
259
|
+
const g = e.getColumn(a);
|
|
260
|
+
if (g != null && g.accessorFn)
|
|
261
|
+
return u._valuesCache[a] = g.accessorFn(u.original, n), u._valuesCache[a];
|
|
259
262
|
},
|
|
260
263
|
getUniqueValues: (a) => {
|
|
261
264
|
if (u._uniqueValuesCache.hasOwnProperty(a))
|
|
262
265
|
return u._uniqueValuesCache[a];
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
265
|
-
return
|
|
266
|
+
const g = e.getColumn(a);
|
|
267
|
+
if (g != null && g.accessorFn)
|
|
268
|
+
return g.columnDef.getUniqueValues ? (u._uniqueValuesCache[a] = g.columnDef.getUniqueValues(u.original, n), u._uniqueValuesCache[a]) : (u._uniqueValuesCache[a] = [u.getValue(a)], u._uniqueValuesCache[a]);
|
|
266
269
|
},
|
|
267
270
|
renderValue: (a) => {
|
|
268
|
-
var
|
|
269
|
-
return (
|
|
271
|
+
var g;
|
|
272
|
+
return (g = u.getValue(a)) != null ? g : e.options.renderFallbackValue;
|
|
270
273
|
},
|
|
271
274
|
subRows: [],
|
|
272
|
-
getLeafRows: () =>
|
|
275
|
+
getLeafRows: () => je(u.subRows, (a) => a.subRows),
|
|
273
276
|
getParentRow: () => u.parentId ? e.getRow(u.parentId, !0) : void 0,
|
|
274
277
|
getParentRows: () => {
|
|
275
|
-
let a = [],
|
|
278
|
+
let a = [], g = u;
|
|
276
279
|
for (; ; ) {
|
|
277
|
-
const c =
|
|
280
|
+
const c = g.getParentRow();
|
|
278
281
|
if (!c) break;
|
|
279
|
-
a.push(c),
|
|
282
|
+
a.push(c), g = c;
|
|
280
283
|
}
|
|
281
284
|
return a.reverse();
|
|
282
285
|
},
|
|
283
|
-
getAllCells: S(() => [e.getAllLeafColumns()], (a) => a.map((
|
|
284
|
-
_getAllCellsByColumnId: S(() => [u.getAllCells()], (a) => a.reduce((
|
|
286
|
+
getAllCells: S(() => [e.getAllLeafColumns()], (a) => a.map((g) => Ue(e, u, g, g.id)), C(e.options, "debugRows", "getAllCells")),
|
|
287
|
+
_getAllCellsByColumnId: S(() => [u.getAllCells()], (a) => a.reduce((g, c) => (g[c.column.id] = c, g), {}), C(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
285
288
|
};
|
|
286
289
|
for (let a = 0; a < e._features.length; a++) {
|
|
287
|
-
const
|
|
288
|
-
|
|
290
|
+
const g = e._features[a];
|
|
291
|
+
g == null || g.createRow == null || g.createRow(u, e);
|
|
289
292
|
}
|
|
290
293
|
return u;
|
|
291
|
-
},
|
|
294
|
+
}, Je = {
|
|
292
295
|
createColumn: (e, o) => {
|
|
293
296
|
e._getFacetedRowModel = o.options.getFacetedRowModel && o.options.getFacetedRowModel(o, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : o.getPreFilteredRowModel(), e._getFacetedUniqueValues = o.options.getFacetedUniqueValues && o.options.getFacetedUniqueValues(o, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = o.options.getFacetedMinMaxValues && o.options.getFacetedMinMaxValues(o, e.id), e.getFacetedMinMaxValues = () => {
|
|
294
297
|
if (e._getFacetedMinMaxValues)
|
|
295
298
|
return e._getFacetedMinMaxValues();
|
|
296
299
|
};
|
|
297
300
|
}
|
|
298
|
-
},
|
|
299
|
-
var n,
|
|
300
|
-
const
|
|
301
|
-
return !!(!((
|
|
301
|
+
}, ve = (e, o, t) => {
|
|
302
|
+
var n, i;
|
|
303
|
+
const r = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
|
|
304
|
+
return !!(!((i = e.getValue(o)) == null || (i = i.toString()) == null || (i = i.toLowerCase()) == null) && i.includes(r));
|
|
302
305
|
};
|
|
303
|
-
|
|
304
|
-
const
|
|
306
|
+
ve.autoRemove = (e) => E(e);
|
|
307
|
+
const _e = (e, o, t) => {
|
|
305
308
|
var n;
|
|
306
309
|
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
307
310
|
};
|
|
308
|
-
|
|
309
|
-
const
|
|
311
|
+
_e.autoRemove = (e) => E(e);
|
|
312
|
+
const Fe = (e, o, t) => {
|
|
310
313
|
var n;
|
|
311
314
|
return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === t?.toLowerCase();
|
|
312
315
|
};
|
|
313
|
-
|
|
314
|
-
const
|
|
316
|
+
Fe.autoRemove = (e) => E(e);
|
|
317
|
+
const $e = (e, o, t) => {
|
|
315
318
|
var n;
|
|
316
319
|
return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
|
|
317
320
|
};
|
|
318
|
-
|
|
319
|
-
const
|
|
320
|
-
var
|
|
321
|
-
return !((
|
|
321
|
+
$e.autoRemove = (e) => E(e);
|
|
322
|
+
const Ve = (e, o, t) => !t.some((n) => {
|
|
323
|
+
var i;
|
|
324
|
+
return !((i = e.getValue(o)) != null && i.includes(n));
|
|
322
325
|
});
|
|
323
|
-
|
|
324
|
-
const
|
|
325
|
-
var
|
|
326
|
-
return (
|
|
326
|
+
Ve.autoRemove = (e) => E(e) || !(e != null && e.length);
|
|
327
|
+
const Me = (e, o, t) => t.some((n) => {
|
|
328
|
+
var i;
|
|
329
|
+
return (i = e.getValue(o)) == null ? void 0 : i.includes(n);
|
|
327
330
|
});
|
|
328
|
-
|
|
329
|
-
const
|
|
330
|
-
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
const
|
|
334
|
-
let [n,
|
|
335
|
-
const
|
|
336
|
-
return
|
|
331
|
+
Me.autoRemove = (e) => E(e) || !(e != null && e.length);
|
|
332
|
+
const xe = (e, o, t) => e.getValue(o) === t;
|
|
333
|
+
xe.autoRemove = (e) => E(e);
|
|
334
|
+
const Pe = (e, o, t) => e.getValue(o) == t;
|
|
335
|
+
Pe.autoRemove = (e) => E(e);
|
|
336
|
+
const ce = (e, o, t) => {
|
|
337
|
+
let [n, i] = t;
|
|
338
|
+
const r = e.getValue(o);
|
|
339
|
+
return r >= n && r <= i;
|
|
337
340
|
};
|
|
338
|
-
|
|
339
|
-
let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o,
|
|
340
|
-
if (
|
|
341
|
-
const u =
|
|
342
|
-
|
|
341
|
+
ce.resolveFilterValue = (e) => {
|
|
342
|
+
let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, i = typeof t != "number" ? parseFloat(t) : t, r = o === null || Number.isNaN(n) ? -1 / 0 : n, l = t === null || Number.isNaN(i) ? 1 / 0 : i;
|
|
343
|
+
if (r > l) {
|
|
344
|
+
const u = r;
|
|
345
|
+
r = l, l = u;
|
|
343
346
|
}
|
|
344
|
-
return [
|
|
347
|
+
return [r, l];
|
|
345
348
|
};
|
|
346
|
-
|
|
347
|
-
const
|
|
348
|
-
includesString:
|
|
349
|
-
includesStringSensitive:
|
|
350
|
-
equalsString:
|
|
351
|
-
arrIncludes:
|
|
352
|
-
arrIncludesAll:
|
|
353
|
-
arrIncludesSome:
|
|
354
|
-
equals:
|
|
355
|
-
weakEquals:
|
|
356
|
-
inNumberRange:
|
|
349
|
+
ce.autoRemove = (e) => E(e) || E(e[0]) && E(e[1]);
|
|
350
|
+
const D = {
|
|
351
|
+
includesString: ve,
|
|
352
|
+
includesStringSensitive: _e,
|
|
353
|
+
equalsString: Fe,
|
|
354
|
+
arrIncludes: $e,
|
|
355
|
+
arrIncludesAll: Ve,
|
|
356
|
+
arrIncludesSome: Me,
|
|
357
|
+
equals: xe,
|
|
358
|
+
weakEquals: Pe,
|
|
359
|
+
inNumberRange: ce
|
|
357
360
|
};
|
|
358
|
-
function
|
|
361
|
+
function E(e) {
|
|
359
362
|
return e == null || e === "";
|
|
360
363
|
}
|
|
361
|
-
const
|
|
364
|
+
const Qe = {
|
|
362
365
|
getDefaultColumnDef: () => ({
|
|
363
366
|
filterFn: "auto"
|
|
364
367
|
}),
|
|
@@ -367,33 +370,33 @@ const De = {
|
|
|
367
370
|
...e
|
|
368
371
|
}),
|
|
369
372
|
getDefaultOptions: (e) => ({
|
|
370
|
-
onColumnFiltersChange:
|
|
373
|
+
onColumnFiltersChange: P("columnFilters", e),
|
|
371
374
|
filterFromLeafRows: !1,
|
|
372
375
|
maxLeafRowFilterDepth: 100
|
|
373
376
|
}),
|
|
374
377
|
createColumn: (e, o) => {
|
|
375
378
|
e.getAutoFilterFn = () => {
|
|
376
379
|
const t = o.getCoreRowModel().flatRows[0], n = t?.getValue(e.id);
|
|
377
|
-
return typeof n == "string" ?
|
|
380
|
+
return typeof n == "string" ? D.includesString : typeof n == "number" ? D.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? D.equals : Array.isArray(n) ? D.arrIncludes : D.weakEquals;
|
|
378
381
|
}, e.getFilterFn = () => {
|
|
379
382
|
var t, n;
|
|
380
|
-
return
|
|
383
|
+
return Q(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
|
|
381
384
|
// @ts-ignore
|
|
382
|
-
(t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t :
|
|
385
|
+
(t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : D[e.columnDef.filterFn]
|
|
383
386
|
);
|
|
384
387
|
}, e.getCanFilter = () => {
|
|
385
|
-
var t, n,
|
|
386
|
-
return ((t = e.columnDef.enableColumnFilter) != null ? t : !0) && ((n = o.options.enableColumnFilters) != null ? n : !0) && ((
|
|
388
|
+
var t, n, i;
|
|
389
|
+
return ((t = e.columnDef.enableColumnFilter) != null ? t : !0) && ((n = o.options.enableColumnFilters) != null ? n : !0) && ((i = o.options.enableFilters) != null ? i : !0) && !!e.accessorFn;
|
|
387
390
|
}, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
|
|
388
391
|
var t;
|
|
389
392
|
return (t = o.getState().columnFilters) == null || (t = t.find((n) => n.id === e.id)) == null ? void 0 : t.value;
|
|
390
393
|
}, e.getFilterIndex = () => {
|
|
391
394
|
var t, n;
|
|
392
|
-
return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((
|
|
395
|
+
return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((i) => i.id === e.id)) != null ? t : -1;
|
|
393
396
|
}, e.setFilterValue = (t) => {
|
|
394
397
|
o.setColumnFilters((n) => {
|
|
395
|
-
const
|
|
396
|
-
if (
|
|
398
|
+
const i = e.getFilterFn(), r = n?.find((c) => c.id === e.id), l = G(t, r ? r.value : void 0);
|
|
399
|
+
if (Re(i, l, e)) {
|
|
397
400
|
var u;
|
|
398
401
|
return (u = n?.filter((c) => c.id !== e.id)) != null ? u : [];
|
|
399
402
|
}
|
|
@@ -401,9 +404,9 @@ const De = {
|
|
|
401
404
|
id: e.id,
|
|
402
405
|
value: l
|
|
403
406
|
};
|
|
404
|
-
if (
|
|
405
|
-
var
|
|
406
|
-
return (
|
|
407
|
+
if (r) {
|
|
408
|
+
var g;
|
|
409
|
+
return (g = n?.map((c) => c.id === e.id ? a : c)) != null ? g : [];
|
|
407
410
|
}
|
|
408
411
|
return n != null && n.length ? [...n, a] : [a];
|
|
409
412
|
});
|
|
@@ -414,13 +417,13 @@ const De = {
|
|
|
414
417
|
},
|
|
415
418
|
createTable: (e) => {
|
|
416
419
|
e.setColumnFilters = (o) => {
|
|
417
|
-
const t = e.getAllLeafColumns(), n = (
|
|
418
|
-
var
|
|
419
|
-
return (
|
|
420
|
+
const t = e.getAllLeafColumns(), n = (i) => {
|
|
421
|
+
var r;
|
|
422
|
+
return (r = G(o, i)) == null ? void 0 : r.filter((l) => {
|
|
420
423
|
const u = t.find((a) => a.id === l.id);
|
|
421
424
|
if (u) {
|
|
422
425
|
const a = u.getFilterFn();
|
|
423
|
-
if (
|
|
426
|
+
if (Re(a, l.value, u))
|
|
424
427
|
return !1;
|
|
425
428
|
}
|
|
426
429
|
return !0;
|
|
@@ -433,57 +436,57 @@ const De = {
|
|
|
433
436
|
}, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
|
|
434
437
|
}
|
|
435
438
|
};
|
|
436
|
-
function
|
|
439
|
+
function Re(e, o, t) {
|
|
437
440
|
return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
|
|
438
441
|
}
|
|
439
|
-
const
|
|
440
|
-
const
|
|
441
|
-
return n + (typeof
|
|
442
|
-
}, 0),
|
|
442
|
+
const We = (e, o, t) => t.reduce((n, i) => {
|
|
443
|
+
const r = i.getValue(e);
|
|
444
|
+
return n + (typeof r == "number" ? r : 0);
|
|
445
|
+
}, 0), Ye = (e, o, t) => {
|
|
443
446
|
let n;
|
|
444
|
-
return t.forEach((
|
|
445
|
-
const
|
|
446
|
-
|
|
447
|
+
return t.forEach((i) => {
|
|
448
|
+
const r = i.getValue(e);
|
|
449
|
+
r != null && (n > r || n === void 0 && r >= r) && (n = r);
|
|
447
450
|
}), n;
|
|
448
|
-
},
|
|
451
|
+
}, Ze = (e, o, t) => {
|
|
449
452
|
let n;
|
|
450
|
-
return t.forEach((r) => {
|
|
451
|
-
const i = r.getValue(e);
|
|
452
|
-
i != null && (n < i || n === void 0 && i >= i) && (n = i);
|
|
453
|
-
}), n;
|
|
454
|
-
}, Ae = (e, o, t) => {
|
|
455
|
-
let n, r;
|
|
456
453
|
return t.forEach((i) => {
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
}),
|
|
460
|
-
},
|
|
454
|
+
const r = i.getValue(e);
|
|
455
|
+
r != null && (n < r || n === void 0 && r >= r) && (n = r);
|
|
456
|
+
}), n;
|
|
457
|
+
}, be = (e, o, t) => {
|
|
458
|
+
let n, i;
|
|
459
|
+
return t.forEach((r) => {
|
|
460
|
+
const l = r.getValue(e);
|
|
461
|
+
l != null && (n === void 0 ? l >= l && (n = i = l) : (n > l && (n = l), i < l && (i = l)));
|
|
462
|
+
}), [n, i];
|
|
463
|
+
}, et = (e, o) => {
|
|
461
464
|
let t = 0, n = 0;
|
|
462
|
-
if (o.forEach((
|
|
463
|
-
let
|
|
464
|
-
|
|
465
|
+
if (o.forEach((i) => {
|
|
466
|
+
let r = i.getValue(e);
|
|
467
|
+
r != null && (r = +r) >= r && (++t, n += r);
|
|
465
468
|
}), t) return n / t;
|
|
466
|
-
},
|
|
469
|
+
}, tt = (e, o) => {
|
|
467
470
|
if (!o.length)
|
|
468
471
|
return;
|
|
469
|
-
const t = o.map((
|
|
470
|
-
if (!
|
|
472
|
+
const t = o.map((r) => r.getValue(e));
|
|
473
|
+
if (!ke(t))
|
|
471
474
|
return;
|
|
472
475
|
if (t.length === 1)
|
|
473
476
|
return t[0];
|
|
474
|
-
const n = Math.floor(t.length / 2),
|
|
475
|
-
return t.length % 2 !== 0 ?
|
|
476
|
-
},
|
|
477
|
-
sum:
|
|
478
|
-
min:
|
|
479
|
-
max:
|
|
480
|
-
extent:
|
|
481
|
-
mean:
|
|
482
|
-
median:
|
|
483
|
-
unique:
|
|
484
|
-
uniqueCount:
|
|
485
|
-
count:
|
|
486
|
-
},
|
|
477
|
+
const n = Math.floor(t.length / 2), i = t.sort((r, l) => r - l);
|
|
478
|
+
return t.length % 2 !== 0 ? i[n] : (i[n - 1] + i[n]) / 2;
|
|
479
|
+
}, nt = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), ot = (e, o) => new Set(o.map((t) => t.getValue(e))).size, it = (e, o) => o.length, Z = {
|
|
480
|
+
sum: We,
|
|
481
|
+
min: Ye,
|
|
482
|
+
max: Ze,
|
|
483
|
+
extent: be,
|
|
484
|
+
mean: et,
|
|
485
|
+
median: tt,
|
|
486
|
+
unique: nt,
|
|
487
|
+
uniqueCount: ot,
|
|
488
|
+
count: it
|
|
489
|
+
}, rt = {
|
|
487
490
|
getDefaultColumnDef: () => ({
|
|
488
491
|
aggregatedCell: (e) => {
|
|
489
492
|
var o, t;
|
|
@@ -496,7 +499,7 @@ const He = (e, o, t) => t.reduce((n, r) => {
|
|
|
496
499
|
...e
|
|
497
500
|
}),
|
|
498
501
|
getDefaultOptions: (e) => ({
|
|
499
|
-
onGroupingChange:
|
|
502
|
+
onGroupingChange: P("grouping", e),
|
|
500
503
|
groupedColumnMode: "reorder"
|
|
501
504
|
}),
|
|
502
505
|
createColumn: (e, o) => {
|
|
@@ -519,14 +522,14 @@ const He = (e, o, t) => t.reduce((n, r) => {
|
|
|
519
522
|
}, e.getAutoAggregationFn = () => {
|
|
520
523
|
const t = o.getCoreRowModel().flatRows[0], n = t?.getValue(e.id);
|
|
521
524
|
if (typeof n == "number")
|
|
522
|
-
return
|
|
525
|
+
return Z.sum;
|
|
523
526
|
if (Object.prototype.toString.call(n) === "[object Date]")
|
|
524
|
-
return
|
|
527
|
+
return Z.extent;
|
|
525
528
|
}, e.getAggregationFn = () => {
|
|
526
529
|
var t, n;
|
|
527
530
|
if (!e)
|
|
528
531
|
throw new Error();
|
|
529
|
-
return
|
|
532
|
+
return Q(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : Z[e.columnDef.aggregationFn];
|
|
530
533
|
};
|
|
531
534
|
},
|
|
532
535
|
createTable: (e) => {
|
|
@@ -545,173 +548,173 @@ const He = (e, o, t) => t.reduce((n, r) => {
|
|
|
545
548
|
},
|
|
546
549
|
createCell: (e, o, t, n) => {
|
|
547
550
|
e.getIsGrouped = () => o.getIsGrouped() && o.id === t.groupingColumnId, e.getIsPlaceholder = () => !e.getIsGrouped() && o.getIsGrouped(), e.getIsAggregated = () => {
|
|
548
|
-
var
|
|
549
|
-
return !e.getIsGrouped() && !e.getIsPlaceholder() && !!((
|
|
551
|
+
var i;
|
|
552
|
+
return !e.getIsGrouped() && !e.getIsPlaceholder() && !!((i = t.subRows) != null && i.length);
|
|
550
553
|
};
|
|
551
554
|
}
|
|
552
555
|
};
|
|
553
|
-
function
|
|
556
|
+
function lt(e, o, t) {
|
|
554
557
|
if (!(o != null && o.length) || !t)
|
|
555
558
|
return e;
|
|
556
|
-
const n = e.filter((
|
|
557
|
-
return t === "remove" ? n : [...o.map((
|
|
559
|
+
const n = e.filter((r) => !o.includes(r.id));
|
|
560
|
+
return t === "remove" ? n : [...o.map((r) => e.find((l) => l.id === r)).filter(Boolean), ...n];
|
|
558
561
|
}
|
|
559
|
-
const
|
|
562
|
+
const st = {
|
|
560
563
|
getInitialState: (e) => ({
|
|
561
564
|
columnOrder: [],
|
|
562
565
|
...e
|
|
563
566
|
}),
|
|
564
567
|
getDefaultOptions: (e) => ({
|
|
565
|
-
onColumnOrderChange:
|
|
568
|
+
onColumnOrderChange: P("columnOrder", e)
|
|
566
569
|
}),
|
|
567
570
|
createColumn: (e, o) => {
|
|
568
|
-
e.getIndex = S((t) => [
|
|
571
|
+
e.getIndex = S((t) => [k(o, t)], (t) => t.findIndex((n) => n.id === e.id), C(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
569
572
|
var n;
|
|
570
|
-
return ((n =
|
|
573
|
+
return ((n = k(o, t)[0]) == null ? void 0 : n.id) === e.id;
|
|
571
574
|
}, e.getIsLastColumn = (t) => {
|
|
572
575
|
var n;
|
|
573
|
-
const
|
|
574
|
-
return ((n =
|
|
576
|
+
const i = k(o, t);
|
|
577
|
+
return ((n = i[i.length - 1]) == null ? void 0 : n.id) === e.id;
|
|
575
578
|
};
|
|
576
579
|
},
|
|
577
580
|
createTable: (e) => {
|
|
578
581
|
e.setColumnOrder = (o) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(o), e.resetColumnOrder = (o) => {
|
|
579
582
|
var t;
|
|
580
583
|
e.setColumnOrder(o ? [] : (t = e.initialState.columnOrder) != null ? t : []);
|
|
581
|
-
}, e._getOrderColumnsFn = S(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (
|
|
582
|
-
let
|
|
584
|
+
}, e._getOrderColumnsFn = S(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (i) => {
|
|
585
|
+
let r = [];
|
|
583
586
|
if (!(o != null && o.length))
|
|
584
|
-
|
|
587
|
+
r = i;
|
|
585
588
|
else {
|
|
586
|
-
const l = [...o], u = [...
|
|
589
|
+
const l = [...o], u = [...i];
|
|
587
590
|
for (; u.length && l.length; ) {
|
|
588
|
-
const a = l.shift(),
|
|
589
|
-
|
|
591
|
+
const a = l.shift(), g = u.findIndex((c) => c.id === a);
|
|
592
|
+
g > -1 && r.push(u.splice(g, 1)[0]);
|
|
590
593
|
}
|
|
591
|
-
|
|
594
|
+
r = [...r, ...u];
|
|
592
595
|
}
|
|
593
|
-
return
|
|
596
|
+
return lt(r, t, n);
|
|
594
597
|
}, C(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
595
598
|
}
|
|
596
|
-
},
|
|
599
|
+
}, b = () => ({
|
|
597
600
|
left: [],
|
|
598
601
|
right: []
|
|
599
|
-
}),
|
|
602
|
+
}), ut = {
|
|
600
603
|
getInitialState: (e) => ({
|
|
601
|
-
columnPinning:
|
|
604
|
+
columnPinning: b(),
|
|
602
605
|
...e
|
|
603
606
|
}),
|
|
604
607
|
getDefaultOptions: (e) => ({
|
|
605
|
-
onColumnPinningChange:
|
|
608
|
+
onColumnPinningChange: P("columnPinning", e)
|
|
606
609
|
}),
|
|
607
610
|
createColumn: (e, o) => {
|
|
608
611
|
e.pin = (t) => {
|
|
609
|
-
const n = e.getLeafColumns().map((
|
|
610
|
-
o.setColumnPinning((
|
|
611
|
-
var
|
|
612
|
+
const n = e.getLeafColumns().map((i) => i.id).filter(Boolean);
|
|
613
|
+
o.setColumnPinning((i) => {
|
|
614
|
+
var r, l;
|
|
612
615
|
if (t === "right") {
|
|
613
616
|
var u, a;
|
|
614
617
|
return {
|
|
615
|
-
left: ((u =
|
|
616
|
-
right: [...((a =
|
|
618
|
+
left: ((u = i?.left) != null ? u : []).filter((m) => !(n != null && n.includes(m))),
|
|
619
|
+
right: [...((a = i?.right) != null ? a : []).filter((m) => !(n != null && n.includes(m))), ...n]
|
|
617
620
|
};
|
|
618
621
|
}
|
|
619
622
|
if (t === "left") {
|
|
620
|
-
var
|
|
623
|
+
var g, c;
|
|
621
624
|
return {
|
|
622
|
-
left: [...((
|
|
623
|
-
right: ((c =
|
|
625
|
+
left: [...((g = i?.left) != null ? g : []).filter((m) => !(n != null && n.includes(m))), ...n],
|
|
626
|
+
right: ((c = i?.right) != null ? c : []).filter((m) => !(n != null && n.includes(m)))
|
|
624
627
|
};
|
|
625
628
|
}
|
|
626
629
|
return {
|
|
627
|
-
left: ((
|
|
628
|
-
right: ((l =
|
|
630
|
+
left: ((r = i?.left) != null ? r : []).filter((m) => !(n != null && n.includes(m))),
|
|
631
|
+
right: ((l = i?.right) != null ? l : []).filter((m) => !(n != null && n.includes(m)))
|
|
629
632
|
};
|
|
630
633
|
});
|
|
631
634
|
}, e.getCanPin = () => e.getLeafColumns().some((n) => {
|
|
632
|
-
var
|
|
633
|
-
return ((
|
|
635
|
+
var i, r, l;
|
|
636
|
+
return ((i = n.columnDef.enablePinning) != null ? i : !0) && ((r = (l = o.options.enableColumnPinning) != null ? l : o.options.enablePinning) != null ? r : !0);
|
|
634
637
|
}), e.getIsPinned = () => {
|
|
635
638
|
const t = e.getLeafColumns().map((u) => u.id), {
|
|
636
639
|
left: n,
|
|
637
|
-
right:
|
|
638
|
-
} = o.getState().columnPinning,
|
|
639
|
-
return
|
|
640
|
+
right: i
|
|
641
|
+
} = o.getState().columnPinning, r = t.some((u) => n?.includes(u)), l = t.some((u) => i?.includes(u));
|
|
642
|
+
return r ? "left" : l ? "right" : !1;
|
|
640
643
|
}, e.getPinnedIndex = () => {
|
|
641
644
|
var t, n;
|
|
642
|
-
const
|
|
643
|
-
return
|
|
645
|
+
const i = e.getIsPinned();
|
|
646
|
+
return i ? (t = (n = o.getState().columnPinning) == null || (n = n[i]) == null ? void 0 : n.indexOf(e.id)) != null ? t : -1 : 0;
|
|
644
647
|
};
|
|
645
648
|
},
|
|
646
649
|
createRow: (e, o) => {
|
|
647
|
-
e.getCenterVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n,
|
|
648
|
-
const
|
|
649
|
-
return t.filter((l) => !
|
|
650
|
-
}, C(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((
|
|
651
|
-
...
|
|
650
|
+
e.getCenterVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n, i) => {
|
|
651
|
+
const r = [...n ?? [], ...i ?? []];
|
|
652
|
+
return t.filter((l) => !r.includes(l.column.id));
|
|
653
|
+
}, C(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((r) => t.find((l) => l.column.id === r)).filter(Boolean).map((r) => ({
|
|
654
|
+
...r,
|
|
652
655
|
position: "left"
|
|
653
|
-
})), C(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((
|
|
654
|
-
...
|
|
656
|
+
})), C(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((r) => t.find((l) => l.column.id === r)).filter(Boolean).map((r) => ({
|
|
657
|
+
...r,
|
|
655
658
|
position: "right"
|
|
656
659
|
})), C(o.options, "debugRows", "getRightVisibleCells"));
|
|
657
660
|
},
|
|
658
661
|
createTable: (e) => {
|
|
659
662
|
e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
|
|
660
663
|
var t, n;
|
|
661
|
-
return e.setColumnPinning(o ?
|
|
664
|
+
return e.setColumnPinning(o ? b() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : b());
|
|
662
665
|
}, e.getIsSomeColumnsPinned = (o) => {
|
|
663
666
|
var t;
|
|
664
667
|
const n = e.getState().columnPinning;
|
|
665
668
|
if (!o) {
|
|
666
|
-
var
|
|
667
|
-
return !!((
|
|
669
|
+
var i, r;
|
|
670
|
+
return !!((i = n.left) != null && i.length || (r = n.right) != null && r.length);
|
|
668
671
|
}
|
|
669
672
|
return !!((t = n[o]) != null && t.length);
|
|
670
|
-
}, e.getLeftLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((
|
|
671
|
-
const
|
|
672
|
-
return o.filter((
|
|
673
|
+
}, e.getLeftLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((i) => i.id === n)).filter(Boolean), C(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (o, t) => (t ?? []).map((n) => o.find((i) => i.id === n)).filter(Boolean), C(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n) => {
|
|
674
|
+
const i = [...t ?? [], ...n ?? []];
|
|
675
|
+
return o.filter((r) => !i.includes(r.id));
|
|
673
676
|
}, C(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
674
677
|
}
|
|
675
678
|
};
|
|
676
|
-
function
|
|
679
|
+
function at(e) {
|
|
677
680
|
return e || (typeof document < "u" ? document : null);
|
|
678
681
|
}
|
|
679
|
-
const
|
|
682
|
+
const X = {
|
|
680
683
|
size: 150,
|
|
681
684
|
minSize: 20,
|
|
682
685
|
maxSize: Number.MAX_SAFE_INTEGER
|
|
683
|
-
},
|
|
686
|
+
}, ee = () => ({
|
|
684
687
|
startOffset: null,
|
|
685
688
|
startSize: null,
|
|
686
689
|
deltaOffset: null,
|
|
687
690
|
deltaPercentage: null,
|
|
688
691
|
isResizingColumn: !1,
|
|
689
692
|
columnSizingStart: []
|
|
690
|
-
}),
|
|
691
|
-
getDefaultColumnDef: () =>
|
|
693
|
+
}), gt = {
|
|
694
|
+
getDefaultColumnDef: () => X,
|
|
692
695
|
getInitialState: (e) => ({
|
|
693
696
|
columnSizing: {},
|
|
694
|
-
columnSizingInfo:
|
|
697
|
+
columnSizingInfo: ee(),
|
|
695
698
|
...e
|
|
696
699
|
}),
|
|
697
700
|
getDefaultOptions: (e) => ({
|
|
698
701
|
columnResizeMode: "onEnd",
|
|
699
702
|
columnResizeDirection: "ltr",
|
|
700
|
-
onColumnSizingChange:
|
|
701
|
-
onColumnSizingInfoChange:
|
|
703
|
+
onColumnSizingChange: P("columnSizing", e),
|
|
704
|
+
onColumnSizingInfoChange: P("columnSizingInfo", e)
|
|
702
705
|
}),
|
|
703
706
|
createColumn: (e, o) => {
|
|
704
707
|
e.getSize = () => {
|
|
705
|
-
var t, n,
|
|
706
|
-
const
|
|
707
|
-
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t :
|
|
708
|
-
}, e.getStart = S((t) => [t,
|
|
708
|
+
var t, n, i;
|
|
709
|
+
const r = o.getState().columnSizing[e.id];
|
|
710
|
+
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : X.minSize, (n = r ?? e.columnDef.size) != null ? n : X.size), (i = e.columnDef.maxSize) != null ? i : X.maxSize);
|
|
711
|
+
}, e.getStart = S((t) => [t, k(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((i, r) => i + r.getSize(), 0), C(o.options, "debugColumns", "getStart")), e.getAfter = S((t) => [t, k(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((i, r) => i + r.getSize(), 0), C(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
709
712
|
o.setColumnSizing((t) => {
|
|
710
713
|
let {
|
|
711
714
|
[e.id]: n,
|
|
712
|
-
...
|
|
715
|
+
...i
|
|
713
716
|
} = t;
|
|
714
|
-
return
|
|
717
|
+
return i;
|
|
715
718
|
});
|
|
716
719
|
}, e.getCanResize = () => {
|
|
717
720
|
var t, n;
|
|
@@ -721,12 +724,12 @@ const L = {
|
|
|
721
724
|
createHeader: (e, o) => {
|
|
722
725
|
e.getSize = () => {
|
|
723
726
|
let t = 0;
|
|
724
|
-
const n = (
|
|
725
|
-
if (
|
|
726
|
-
|
|
727
|
+
const n = (i) => {
|
|
728
|
+
if (i.subHeaders.length)
|
|
729
|
+
i.subHeaders.forEach(n);
|
|
727
730
|
else {
|
|
728
|
-
var
|
|
729
|
-
t += (
|
|
731
|
+
var r;
|
|
732
|
+
t += (r = i.column.getSize()) != null ? r : 0;
|
|
730
733
|
}
|
|
731
734
|
};
|
|
732
735
|
return n(e), t;
|
|
@@ -737,29 +740,29 @@ const L = {
|
|
|
737
740
|
}
|
|
738
741
|
return 0;
|
|
739
742
|
}, e.getResizeHandler = (t) => {
|
|
740
|
-
const n = o.getColumn(e.column.id),
|
|
741
|
-
return (
|
|
742
|
-
if (!n || !
|
|
743
|
+
const n = o.getColumn(e.column.id), i = n?.getCanResize();
|
|
744
|
+
return (r) => {
|
|
745
|
+
if (!n || !i || (r.persist == null || r.persist(), te(r) && r.touches && r.touches.length > 1))
|
|
743
746
|
return;
|
|
744
|
-
const l = e.getSize(), u = e ? e.getLeafHeaders().map((w) => [w.column.id, w.column.getSize()]) : [[n.id, n.getSize()]], a =
|
|
745
|
-
typeof
|
|
746
|
-
var
|
|
747
|
-
const
|
|
748
|
-
return
|
|
749
|
-
let [
|
|
750
|
-
|
|
747
|
+
const l = e.getSize(), u = e ? e.getLeafHeaders().map((w) => [w.column.id, w.column.getSize()]) : [[n.id, n.getSize()]], a = te(r) ? Math.round(r.touches[0].clientX) : r.clientX, g = {}, c = (w, v) => {
|
|
748
|
+
typeof v == "number" && (o.setColumnSizingInfo((h) => {
|
|
749
|
+
var I, $;
|
|
750
|
+
const H = o.options.columnResizeDirection === "rtl" ? -1 : 1, V = (v - ((I = h?.startOffset) != null ? I : 0)) * H, O = Math.max(V / (($ = h?.startSize) != null ? $ : 0), -0.999999);
|
|
751
|
+
return h.columnSizingStart.forEach((j) => {
|
|
752
|
+
let [B, U] = j;
|
|
753
|
+
g[B] = Math.round(Math.max(U + U * O, 0) * 100) / 100;
|
|
751
754
|
}), {
|
|
752
|
-
...
|
|
753
|
-
deltaOffset:
|
|
754
|
-
deltaPercentage:
|
|
755
|
+
...h,
|
|
756
|
+
deltaOffset: V,
|
|
757
|
+
deltaPercentage: O
|
|
755
758
|
};
|
|
756
|
-
}), (o.options.columnResizeMode === "onChange" || w === "end") && o.setColumnSizing((
|
|
757
|
-
...v,
|
|
758
|
-
...d
|
|
759
|
-
})));
|
|
760
|
-
}, m = (w) => c("move", w), g = (w) => {
|
|
761
|
-
c("end", w), o.setColumnSizingInfo((h) => ({
|
|
759
|
+
}), (o.options.columnResizeMode === "onChange" || w === "end") && o.setColumnSizing((h) => ({
|
|
762
760
|
...h,
|
|
761
|
+
...g
|
|
762
|
+
})));
|
|
763
|
+
}, m = (w) => c("move", w), d = (w) => {
|
|
764
|
+
c("end", w), o.setColumnSizingInfo((v) => ({
|
|
765
|
+
...v,
|
|
763
766
|
isResizingColumn: !1,
|
|
764
767
|
startOffset: null,
|
|
765
768
|
startSize: null,
|
|
@@ -767,21 +770,21 @@ const L = {
|
|
|
767
770
|
deltaPercentage: null,
|
|
768
771
|
columnSizingStart: []
|
|
769
772
|
}));
|
|
770
|
-
}, s =
|
|
773
|
+
}, s = at(t), f = {
|
|
771
774
|
moveHandler: (w) => m(w.clientX),
|
|
772
775
|
upHandler: (w) => {
|
|
773
|
-
s?.removeEventListener("mousemove", f.moveHandler), s?.removeEventListener("mouseup", f.upHandler),
|
|
776
|
+
s?.removeEventListener("mousemove", f.moveHandler), s?.removeEventListener("mouseup", f.upHandler), d(w.clientX);
|
|
774
777
|
}
|
|
775
778
|
}, p = {
|
|
776
779
|
moveHandler: (w) => (w.cancelable && (w.preventDefault(), w.stopPropagation()), m(w.touches[0].clientX), !1),
|
|
777
780
|
upHandler: (w) => {
|
|
778
|
-
var
|
|
779
|
-
s?.removeEventListener("touchmove", p.moveHandler), s?.removeEventListener("touchend", p.upHandler), w.cancelable && (w.preventDefault(), w.stopPropagation()),
|
|
781
|
+
var v;
|
|
782
|
+
s?.removeEventListener("touchmove", p.moveHandler), s?.removeEventListener("touchend", p.upHandler), w.cancelable && (w.preventDefault(), w.stopPropagation()), d((v = w.touches[0]) == null ? void 0 : v.clientX);
|
|
780
783
|
}
|
|
781
|
-
}, R =
|
|
784
|
+
}, R = dt() ? {
|
|
782
785
|
passive: !1
|
|
783
786
|
} : !1;
|
|
784
|
-
|
|
787
|
+
te(r) ? (s?.addEventListener("touchmove", p.moveHandler, R), s?.addEventListener("touchend", p.upHandler, R)) : (s?.addEventListener("mousemove", f.moveHandler, R), s?.addEventListener("mouseup", f.upHandler, R)), o.setColumnSizingInfo((w) => ({
|
|
785
788
|
...w,
|
|
786
789
|
startOffset: a,
|
|
787
790
|
startSize: l,
|
|
@@ -799,25 +802,25 @@ const L = {
|
|
|
799
802
|
e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
|
|
800
803
|
}, e.resetHeaderSizeInfo = (o) => {
|
|
801
804
|
var t;
|
|
802
|
-
e.setColumnSizingInfo(o ?
|
|
805
|
+
e.setColumnSizingInfo(o ? ee() : (t = e.initialState.columnSizingInfo) != null ? t : ee());
|
|
803
806
|
}, e.getTotalSize = () => {
|
|
804
807
|
var o, t;
|
|
805
|
-
return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n,
|
|
808
|
+
return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, i) => n + i.getSize(), 0)) != null ? o : 0;
|
|
806
809
|
}, e.getLeftTotalSize = () => {
|
|
807
810
|
var o, t;
|
|
808
|
-
return (o = (t = e.getLeftHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n,
|
|
811
|
+
return (o = (t = e.getLeftHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, i) => n + i.getSize(), 0)) != null ? o : 0;
|
|
809
812
|
}, e.getCenterTotalSize = () => {
|
|
810
813
|
var o, t;
|
|
811
|
-
return (o = (t = e.getCenterHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n,
|
|
814
|
+
return (o = (t = e.getCenterHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, i) => n + i.getSize(), 0)) != null ? o : 0;
|
|
812
815
|
}, e.getRightTotalSize = () => {
|
|
813
816
|
var o, t;
|
|
814
|
-
return (o = (t = e.getRightHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n,
|
|
817
|
+
return (o = (t = e.getRightHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, i) => n + i.getSize(), 0)) != null ? o : 0;
|
|
815
818
|
};
|
|
816
819
|
}
|
|
817
820
|
};
|
|
818
|
-
let
|
|
819
|
-
function
|
|
820
|
-
if (typeof
|
|
821
|
+
let J = null;
|
|
822
|
+
function dt() {
|
|
823
|
+
if (typeof J == "boolean") return J;
|
|
821
824
|
let e = !1;
|
|
822
825
|
try {
|
|
823
826
|
const o = {
|
|
@@ -830,18 +833,18 @@ function Je() {
|
|
|
830
833
|
} catch {
|
|
831
834
|
e = !1;
|
|
832
835
|
}
|
|
833
|
-
return
|
|
836
|
+
return J = e, J;
|
|
834
837
|
}
|
|
835
|
-
function
|
|
838
|
+
function te(e) {
|
|
836
839
|
return e.type === "touchstart";
|
|
837
840
|
}
|
|
838
|
-
const
|
|
841
|
+
const ct = {
|
|
839
842
|
getInitialState: (e) => ({
|
|
840
843
|
columnVisibility: {},
|
|
841
844
|
...e
|
|
842
845
|
}),
|
|
843
846
|
getDefaultOptions: (e) => ({
|
|
844
|
-
onColumnVisibilityChange:
|
|
847
|
+
onColumnVisibilityChange: P("columnVisibility", e)
|
|
845
848
|
}),
|
|
846
849
|
createColumn: (e, o) => {
|
|
847
850
|
e.toggleVisibility = (t) => {
|
|
@@ -851,8 +854,8 @@ const Qe = {
|
|
|
851
854
|
}));
|
|
852
855
|
}, e.getIsVisible = () => {
|
|
853
856
|
var t, n;
|
|
854
|
-
const
|
|
855
|
-
return (t =
|
|
857
|
+
const i = e.columns;
|
|
858
|
+
return (t = i.length ? i.some((r) => r.getIsVisible()) : (n = o.getState().columnVisibility) == null ? void 0 : n[e.id]) != null ? t : !0;
|
|
856
859
|
}, e.getCanHide = () => {
|
|
857
860
|
var t, n;
|
|
858
861
|
return ((t = e.columnDef.enableHiding) != null ? t : !0) && ((n = o.options.enableHiding) != null ? n : !0);
|
|
@@ -861,18 +864,18 @@ const Qe = {
|
|
|
861
864
|
};
|
|
862
865
|
},
|
|
863
866
|
createRow: (e, o) => {
|
|
864
|
-
e._getAllVisibleCells = S(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), C(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = S(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n,
|
|
867
|
+
e._getAllVisibleCells = S(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), C(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = S(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, i) => [...t, ...n, ...i], C(o.options, "debugRows", "getVisibleCells"));
|
|
865
868
|
},
|
|
866
869
|
createTable: (e) => {
|
|
867
|
-
const o = (t, n) => S(() => [n(), n().filter((
|
|
870
|
+
const o = (t, n) => S(() => [n(), n().filter((i) => i.getIsVisible()).map((i) => i.id).join("_")], (i) => i.filter((r) => r.getIsVisible == null ? void 0 : r.getIsVisible()), C(e.options, "debugColumns", t));
|
|
868
871
|
e.getVisibleFlatColumns = o("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = o("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = o("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = o("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = o("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
|
|
869
872
|
var n;
|
|
870
873
|
e.setColumnVisibility(t ? {} : (n = e.initialState.columnVisibility) != null ? n : {});
|
|
871
874
|
}, e.toggleAllColumnsVisible = (t) => {
|
|
872
875
|
var n;
|
|
873
|
-
t = (n = t) != null ? n : !e.getIsAllColumnsVisible(), e.setColumnVisibility(e.getAllLeafColumns().reduce((
|
|
874
|
-
...
|
|
875
|
-
[
|
|
876
|
+
t = (n = t) != null ? n : !e.getIsAllColumnsVisible(), e.setColumnVisibility(e.getAllLeafColumns().reduce((i, r) => ({
|
|
877
|
+
...i,
|
|
878
|
+
[r.id]: t || !(r.getCanHide != null && r.getCanHide())
|
|
876
879
|
}), {}));
|
|
877
880
|
}, e.getIsAllColumnsVisible = () => !e.getAllLeafColumns().some((t) => !(t.getIsVisible != null && t.getIsVisible())), e.getIsSomeColumnsVisible = () => e.getAllLeafColumns().some((t) => t.getIsVisible == null ? void 0 : t.getIsVisible()), e.getToggleAllColumnsVisibilityHandler = () => (t) => {
|
|
878
881
|
var n;
|
|
@@ -880,23 +883,23 @@ const Qe = {
|
|
|
880
883
|
};
|
|
881
884
|
}
|
|
882
885
|
};
|
|
883
|
-
function
|
|
886
|
+
function k(e, o) {
|
|
884
887
|
return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
885
888
|
}
|
|
886
|
-
const
|
|
889
|
+
const ft = {
|
|
887
890
|
createTable: (e) => {
|
|
888
891
|
e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
|
|
889
892
|
if (e._getGlobalFacetedMinMaxValues)
|
|
890
893
|
return e._getGlobalFacetedMinMaxValues();
|
|
891
894
|
};
|
|
892
895
|
}
|
|
893
|
-
},
|
|
896
|
+
}, pt = {
|
|
894
897
|
getInitialState: (e) => ({
|
|
895
898
|
globalFilter: void 0,
|
|
896
899
|
...e
|
|
897
900
|
}),
|
|
898
901
|
getDefaultOptions: (e) => ({
|
|
899
|
-
onGlobalFilterChange:
|
|
902
|
+
onGlobalFilterChange: P("globalFilter", e),
|
|
900
903
|
globalFilterFn: "auto",
|
|
901
904
|
getColumnCanGlobalFilter: (o) => {
|
|
902
905
|
var t;
|
|
@@ -906,43 +909,43 @@ const We = {
|
|
|
906
909
|
}),
|
|
907
910
|
createColumn: (e, o) => {
|
|
908
911
|
e.getCanGlobalFilter = () => {
|
|
909
|
-
var t, n,
|
|
910
|
-
return ((t = e.columnDef.enableGlobalFilter) != null ? t : !0) && ((n = o.options.enableGlobalFilter) != null ? n : !0) && ((
|
|
912
|
+
var t, n, i, r;
|
|
913
|
+
return ((t = e.columnDef.enableGlobalFilter) != null ? t : !0) && ((n = o.options.enableGlobalFilter) != null ? n : !0) && ((i = o.options.enableFilters) != null ? i : !0) && ((r = o.options.getColumnCanGlobalFilter == null ? void 0 : o.options.getColumnCanGlobalFilter(e)) != null ? r : !0) && !!e.accessorFn;
|
|
911
914
|
};
|
|
912
915
|
},
|
|
913
916
|
createTable: (e) => {
|
|
914
|
-
e.getGlobalAutoFilterFn = () =>
|
|
917
|
+
e.getGlobalAutoFilterFn = () => D.includesString, e.getGlobalFilterFn = () => {
|
|
915
918
|
var o, t;
|
|
916
919
|
const {
|
|
917
920
|
globalFilterFn: n
|
|
918
921
|
} = e.options;
|
|
919
|
-
return
|
|
922
|
+
return Q(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : D[n];
|
|
920
923
|
}, e.setGlobalFilter = (o) => {
|
|
921
924
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
|
|
922
925
|
}, e.resetGlobalFilter = (o) => {
|
|
923
926
|
e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
|
|
924
927
|
};
|
|
925
928
|
}
|
|
926
|
-
},
|
|
929
|
+
}, mt = {
|
|
927
930
|
getInitialState: (e) => ({
|
|
928
931
|
expanded: {},
|
|
929
932
|
...e
|
|
930
933
|
}),
|
|
931
934
|
getDefaultOptions: (e) => ({
|
|
932
|
-
onExpandedChange:
|
|
935
|
+
onExpandedChange: P("expanded", e),
|
|
933
936
|
paginateExpandedRows: !0
|
|
934
937
|
}),
|
|
935
938
|
createTable: (e) => {
|
|
936
939
|
let o = !1, t = !1;
|
|
937
940
|
e._autoResetExpanded = () => {
|
|
938
|
-
var n,
|
|
941
|
+
var n, i;
|
|
939
942
|
if (!o) {
|
|
940
943
|
e._queue(() => {
|
|
941
944
|
o = !0;
|
|
942
945
|
});
|
|
943
946
|
return;
|
|
944
947
|
}
|
|
945
|
-
if ((n = (
|
|
948
|
+
if ((n = (i = e.options.autoResetAll) != null ? i : e.options.autoResetExpanded) != null ? n : !e.options.manualExpanding) {
|
|
946
949
|
if (t) return;
|
|
947
950
|
t = !0, e._queue(() => {
|
|
948
951
|
e.resetExpanded(), t = !1;
|
|
@@ -951,8 +954,8 @@ const We = {
|
|
|
951
954
|
}, e.setExpanded = (n) => e.options.onExpandedChange == null ? void 0 : e.options.onExpandedChange(n), e.toggleAllRowsExpanded = (n) => {
|
|
952
955
|
n ?? !e.getIsAllRowsExpanded() ? e.setExpanded(!0) : e.setExpanded({});
|
|
953
956
|
}, e.resetExpanded = (n) => {
|
|
954
|
-
var
|
|
955
|
-
e.setExpanded(n ? {} : (
|
|
957
|
+
var i, r;
|
|
958
|
+
e.setExpanded(n ? {} : (i = (r = e.initialState) == null ? void 0 : r.expanded) != null ? i : {});
|
|
956
959
|
}, e.getCanSomeRowsExpand = () => e.getPrePaginationRowModel().flatRows.some((n) => n.getCanExpand()), e.getToggleAllRowsExpandedHandler = () => (n) => {
|
|
957
960
|
n.persist == null || n.persist(), e.toggleAllRowsExpanded();
|
|
958
961
|
}, e.getIsSomeRowsExpanded = () => {
|
|
@@ -960,11 +963,11 @@ const We = {
|
|
|
960
963
|
return n === !0 || Object.values(n).some(Boolean);
|
|
961
964
|
}, e.getIsAllRowsExpanded = () => {
|
|
962
965
|
const n = e.getState().expanded;
|
|
963
|
-
return typeof n == "boolean" ? n === !0 : !(!Object.keys(n).length || e.getRowModel().flatRows.some((
|
|
966
|
+
return typeof n == "boolean" ? n === !0 : !(!Object.keys(n).length || e.getRowModel().flatRows.some((i) => !i.getIsExpanded()));
|
|
964
967
|
}, e.getExpandedDepth = () => {
|
|
965
968
|
let n = 0;
|
|
966
|
-
return (e.getState().expanded === !0 ? Object.keys(e.getRowModel().rowsById) : Object.keys(e.getState().expanded)).forEach((
|
|
967
|
-
const l =
|
|
969
|
+
return (e.getState().expanded === !0 ? Object.keys(e.getRowModel().rowsById) : Object.keys(e.getState().expanded)).forEach((r) => {
|
|
970
|
+
const l = r.split(".");
|
|
968
971
|
n = Math.max(n, l.length);
|
|
969
972
|
}), n;
|
|
970
973
|
}, e.getPreExpandedRowModel = () => e.getSortedRowModel(), e.getExpandedRowModel = () => (!e._getExpandedRowModel && e.options.getExpandedRowModel && (e._getExpandedRowModel = e.options.getExpandedRowModel(e)), e.options.manualExpanding || !e._getExpandedRowModel ? e.getPreExpandedRowModel() : e._getExpandedRowModel());
|
|
@@ -972,17 +975,17 @@ const We = {
|
|
|
972
975
|
createRow: (e, o) => {
|
|
973
976
|
e.toggleExpanded = (t) => {
|
|
974
977
|
o.setExpanded((n) => {
|
|
975
|
-
var
|
|
976
|
-
const
|
|
978
|
+
var i;
|
|
979
|
+
const r = n === !0 ? !0 : !!(n != null && n[e.id]);
|
|
977
980
|
let l = {};
|
|
978
981
|
if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((u) => {
|
|
979
982
|
l[u] = !0;
|
|
980
|
-
}) : l = n, t = (
|
|
983
|
+
}) : l = n, t = (i = t) != null ? i : !r, !r && t)
|
|
981
984
|
return {
|
|
982
985
|
...l,
|
|
983
986
|
[e.id]: !0
|
|
984
987
|
};
|
|
985
|
-
if (
|
|
988
|
+
if (r && !t) {
|
|
986
989
|
const {
|
|
987
990
|
[e.id]: u,
|
|
988
991
|
...a
|
|
@@ -996,8 +999,8 @@ const We = {
|
|
|
996
999
|
const n = o.getState().expanded;
|
|
997
1000
|
return !!((t = o.options.getIsRowExpanded == null ? void 0 : o.options.getIsRowExpanded(e)) != null ? t : n === !0 || n?.[e.id]);
|
|
998
1001
|
}, e.getCanExpand = () => {
|
|
999
|
-
var t, n,
|
|
1000
|
-
return (t = o.options.getRowCanExpand == null ? void 0 : o.options.getRowCanExpand(e)) != null ? t : ((n = o.options.enableExpanding) != null ? n : !0) && !!((
|
|
1002
|
+
var t, n, i;
|
|
1003
|
+
return (t = o.options.getRowCanExpand == null ? void 0 : o.options.getRowCanExpand(e)) != null ? t : ((n = o.options.enableExpanding) != null ? n : !0) && !!((i = e.subRows) != null && i.length);
|
|
1001
1004
|
}, e.getIsAllParentsExpanded = () => {
|
|
1002
1005
|
let t = !0, n = e;
|
|
1003
1006
|
for (; t && n.parentId; )
|
|
@@ -1010,81 +1013,81 @@ const We = {
|
|
|
1010
1013
|
};
|
|
1011
1014
|
};
|
|
1012
1015
|
}
|
|
1013
|
-
},
|
|
1014
|
-
pageIndex:
|
|
1015
|
-
pageSize:
|
|
1016
|
-
}),
|
|
1016
|
+
}, le = 0, se = 10, ne = () => ({
|
|
1017
|
+
pageIndex: le,
|
|
1018
|
+
pageSize: se
|
|
1019
|
+
}), St = {
|
|
1017
1020
|
getInitialState: (e) => ({
|
|
1018
1021
|
...e,
|
|
1019
1022
|
pagination: {
|
|
1020
|
-
...
|
|
1023
|
+
...ne(),
|
|
1021
1024
|
...e?.pagination
|
|
1022
1025
|
}
|
|
1023
1026
|
}),
|
|
1024
1027
|
getDefaultOptions: (e) => ({
|
|
1025
|
-
onPaginationChange:
|
|
1028
|
+
onPaginationChange: P("pagination", e)
|
|
1026
1029
|
}),
|
|
1027
1030
|
createTable: (e) => {
|
|
1028
1031
|
let o = !1, t = !1;
|
|
1029
1032
|
e._autoResetPageIndex = () => {
|
|
1030
|
-
var n,
|
|
1033
|
+
var n, i;
|
|
1031
1034
|
if (!o) {
|
|
1032
1035
|
e._queue(() => {
|
|
1033
1036
|
o = !0;
|
|
1034
1037
|
});
|
|
1035
1038
|
return;
|
|
1036
1039
|
}
|
|
1037
|
-
if ((n = (
|
|
1040
|
+
if ((n = (i = e.options.autoResetAll) != null ? i : e.options.autoResetPageIndex) != null ? n : !e.options.manualPagination) {
|
|
1038
1041
|
if (t) return;
|
|
1039
1042
|
t = !0, e._queue(() => {
|
|
1040
1043
|
e.resetPageIndex(), t = !1;
|
|
1041
1044
|
});
|
|
1042
1045
|
}
|
|
1043
1046
|
}, e.setPagination = (n) => {
|
|
1044
|
-
const
|
|
1045
|
-
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(
|
|
1047
|
+
const i = (r) => G(n, r);
|
|
1048
|
+
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(i);
|
|
1046
1049
|
}, e.resetPagination = (n) => {
|
|
1047
|
-
var
|
|
1048
|
-
e.setPagination(n ?
|
|
1050
|
+
var i;
|
|
1051
|
+
e.setPagination(n ? ne() : (i = e.initialState.pagination) != null ? i : ne());
|
|
1049
1052
|
}, e.setPageIndex = (n) => {
|
|
1050
|
-
e.setPagination((
|
|
1051
|
-
let
|
|
1053
|
+
e.setPagination((i) => {
|
|
1054
|
+
let r = G(n, i.pageIndex);
|
|
1052
1055
|
const l = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
|
1053
|
-
return
|
|
1054
|
-
...
|
|
1055
|
-
pageIndex:
|
|
1056
|
+
return r = Math.max(0, Math.min(r, l)), {
|
|
1057
|
+
...i,
|
|
1058
|
+
pageIndex: r
|
|
1056
1059
|
};
|
|
1057
1060
|
});
|
|
1058
1061
|
}, e.resetPageIndex = (n) => {
|
|
1059
|
-
var
|
|
1060
|
-
e.setPageIndex(n ?
|
|
1062
|
+
var i, r;
|
|
1063
|
+
e.setPageIndex(n ? le : (i = (r = e.initialState) == null || (r = r.pagination) == null ? void 0 : r.pageIndex) != null ? i : le);
|
|
1061
1064
|
}, e.resetPageSize = (n) => {
|
|
1062
|
-
var
|
|
1063
|
-
e.setPageSize(n ?
|
|
1065
|
+
var i, r;
|
|
1066
|
+
e.setPageSize(n ? se : (i = (r = e.initialState) == null || (r = r.pagination) == null ? void 0 : r.pageSize) != null ? i : se);
|
|
1064
1067
|
}, e.setPageSize = (n) => {
|
|
1065
|
-
e.setPagination((
|
|
1066
|
-
const
|
|
1068
|
+
e.setPagination((i) => {
|
|
1069
|
+
const r = Math.max(1, G(n, i.pageSize)), l = i.pageSize * i.pageIndex, u = Math.floor(l / r);
|
|
1067
1070
|
return {
|
|
1068
|
-
...
|
|
1071
|
+
...i,
|
|
1069
1072
|
pageIndex: u,
|
|
1070
|
-
pageSize:
|
|
1073
|
+
pageSize: r
|
|
1071
1074
|
};
|
|
1072
1075
|
});
|
|
1073
|
-
}, e.setPageCount = (n) => e.setPagination((
|
|
1074
|
-
var
|
|
1075
|
-
let l =
|
|
1076
|
+
}, e.setPageCount = (n) => e.setPagination((i) => {
|
|
1077
|
+
var r;
|
|
1078
|
+
let l = G(n, (r = e.options.pageCount) != null ? r : -1);
|
|
1076
1079
|
return typeof l == "number" && (l = Math.max(-1, l)), {
|
|
1077
|
-
...
|
|
1080
|
+
...i,
|
|
1078
1081
|
pageCount: l
|
|
1079
1082
|
};
|
|
1080
1083
|
}), e.getPageOptions = S(() => [e.getPageCount()], (n) => {
|
|
1081
|
-
let
|
|
1082
|
-
return n && n > 0 && (
|
|
1084
|
+
let i = [];
|
|
1085
|
+
return n && n > 0 && (i = [...new Array(n)].fill(null).map((r, l) => l)), i;
|
|
1083
1086
|
}, C(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
|
|
1084
1087
|
const {
|
|
1085
1088
|
pageIndex: n
|
|
1086
|
-
} = e.getState().pagination,
|
|
1087
|
-
return
|
|
1089
|
+
} = e.getState().pagination, i = e.getPageCount();
|
|
1090
|
+
return i === -1 ? !0 : i === 0 ? !1 : n < i - 1;
|
|
1088
1091
|
}, e.previousPage = () => e.setPageIndex((n) => n - 1), e.nextPage = () => e.setPageIndex((n) => n + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => {
|
|
1089
1092
|
var n;
|
|
1090
1093
|
return (n = e.options.pageCount) != null ? n : Math.ceil(e.getRowCount() / e.getState().pagination.pageSize);
|
|
@@ -1093,37 +1096,37 @@ const We = {
|
|
|
1093
1096
|
return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
|
|
1094
1097
|
};
|
|
1095
1098
|
}
|
|
1096
|
-
},
|
|
1099
|
+
}, oe = () => ({
|
|
1097
1100
|
top: [],
|
|
1098
1101
|
bottom: []
|
|
1099
|
-
}),
|
|
1102
|
+
}), Ct = {
|
|
1100
1103
|
getInitialState: (e) => ({
|
|
1101
|
-
rowPinning:
|
|
1104
|
+
rowPinning: oe(),
|
|
1102
1105
|
...e
|
|
1103
1106
|
}),
|
|
1104
1107
|
getDefaultOptions: (e) => ({
|
|
1105
|
-
onRowPinningChange:
|
|
1108
|
+
onRowPinningChange: P("rowPinning", e)
|
|
1106
1109
|
}),
|
|
1107
1110
|
createRow: (e, o) => {
|
|
1108
|
-
e.pin = (t, n,
|
|
1109
|
-
const
|
|
1111
|
+
e.pin = (t, n, i) => {
|
|
1112
|
+
const r = n ? e.getLeafRows().map((a) => {
|
|
1110
1113
|
let {
|
|
1111
|
-
id:
|
|
1114
|
+
id: g
|
|
1112
1115
|
} = a;
|
|
1113
|
-
return
|
|
1114
|
-
}) : [], l =
|
|
1116
|
+
return g;
|
|
1117
|
+
}) : [], l = i ? e.getParentRows().map((a) => {
|
|
1115
1118
|
let {
|
|
1116
|
-
id:
|
|
1119
|
+
id: g
|
|
1117
1120
|
} = a;
|
|
1118
|
-
return
|
|
1119
|
-
}) : [], u = /* @__PURE__ */ new Set([...l, e.id, ...
|
|
1121
|
+
return g;
|
|
1122
|
+
}) : [], u = /* @__PURE__ */ new Set([...l, e.id, ...r]);
|
|
1120
1123
|
o.setRowPinning((a) => {
|
|
1121
|
-
var
|
|
1124
|
+
var g, c;
|
|
1122
1125
|
if (t === "bottom") {
|
|
1123
|
-
var m,
|
|
1126
|
+
var m, d;
|
|
1124
1127
|
return {
|
|
1125
1128
|
top: ((m = a?.top) != null ? m : []).filter((p) => !(u != null && u.has(p))),
|
|
1126
|
-
bottom: [...((
|
|
1129
|
+
bottom: [...((d = a?.bottom) != null ? d : []).filter((p) => !(u != null && u.has(p))), ...Array.from(u)]
|
|
1127
1130
|
};
|
|
1128
1131
|
}
|
|
1129
1132
|
if (t === "top") {
|
|
@@ -1134,7 +1137,7 @@ const We = {
|
|
|
1134
1137
|
};
|
|
1135
1138
|
}
|
|
1136
1139
|
return {
|
|
1137
|
-
top: ((
|
|
1140
|
+
top: ((g = a?.top) != null ? g : []).filter((p) => !(u != null && u.has(p))),
|
|
1138
1141
|
bottom: ((c = a?.bottom) != null ? c : []).filter((p) => !(u != null && u.has(p)))
|
|
1139
1142
|
};
|
|
1140
1143
|
});
|
|
@@ -1142,43 +1145,43 @@ const We = {
|
|
|
1142
1145
|
var t;
|
|
1143
1146
|
const {
|
|
1144
1147
|
enableRowPinning: n,
|
|
1145
|
-
enablePinning:
|
|
1148
|
+
enablePinning: i
|
|
1146
1149
|
} = o.options;
|
|
1147
|
-
return typeof n == "function" ? n(e) : (t = n ??
|
|
1150
|
+
return typeof n == "function" ? n(e) : (t = n ?? i) != null ? t : !0;
|
|
1148
1151
|
}, e.getIsPinned = () => {
|
|
1149
1152
|
const t = [e.id], {
|
|
1150
1153
|
top: n,
|
|
1151
|
-
bottom:
|
|
1152
|
-
} = o.getState().rowPinning,
|
|
1153
|
-
return
|
|
1154
|
+
bottom: i
|
|
1155
|
+
} = o.getState().rowPinning, r = t.some((u) => n?.includes(u)), l = t.some((u) => i?.includes(u));
|
|
1156
|
+
return r ? "top" : l ? "bottom" : !1;
|
|
1154
1157
|
}, e.getPinnedIndex = () => {
|
|
1155
1158
|
var t, n;
|
|
1156
|
-
const
|
|
1157
|
-
if (!
|
|
1158
|
-
const
|
|
1159
|
+
const i = e.getIsPinned();
|
|
1160
|
+
if (!i) return -1;
|
|
1161
|
+
const r = (t = i === "top" ? o.getTopRows() : o.getBottomRows()) == null ? void 0 : t.map((l) => {
|
|
1159
1162
|
let {
|
|
1160
1163
|
id: u
|
|
1161
1164
|
} = l;
|
|
1162
1165
|
return u;
|
|
1163
1166
|
});
|
|
1164
|
-
return (n =
|
|
1167
|
+
return (n = r?.indexOf(e.id)) != null ? n : -1;
|
|
1165
1168
|
};
|
|
1166
1169
|
},
|
|
1167
1170
|
createTable: (e) => {
|
|
1168
1171
|
e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
|
|
1169
1172
|
var t, n;
|
|
1170
|
-
return e.setRowPinning(o ?
|
|
1173
|
+
return e.setRowPinning(o ? oe() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : oe());
|
|
1171
1174
|
}, e.getIsSomeRowsPinned = (o) => {
|
|
1172
1175
|
var t;
|
|
1173
1176
|
const n = e.getState().rowPinning;
|
|
1174
1177
|
if (!o) {
|
|
1175
|
-
var
|
|
1176
|
-
return !!((
|
|
1178
|
+
var i, r;
|
|
1179
|
+
return !!((i = n.top) != null && i.length || (r = n.bottom) != null && r.length);
|
|
1177
1180
|
}
|
|
1178
1181
|
return !!((t = n[o]) != null && t.length);
|
|
1179
1182
|
}, e._getPinnedRows = (o, t, n) => {
|
|
1180
|
-
var
|
|
1181
|
-
return ((
|
|
1183
|
+
var i;
|
|
1184
|
+
return ((i = e.options.keepPinnedRows) == null || i ? (
|
|
1182
1185
|
//get all rows that are pinned even if they would not be otherwise visible
|
|
1183
1186
|
//account for expanded parent rows, but not pagination or filtering
|
|
1184
1187
|
(t ?? []).map((l) => {
|
|
@@ -1193,17 +1196,17 @@ const We = {
|
|
|
1193
1196
|
position: n
|
|
1194
1197
|
}));
|
|
1195
1198
|
}, e.getTopRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.top], (o, t) => e._getPinnedRows(o, t, "top"), C(e.options, "debugRows", "getTopRows")), e.getBottomRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (o, t) => e._getPinnedRows(o, t, "bottom"), C(e.options, "debugRows", "getBottomRows")), e.getCenterRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (o, t, n) => {
|
|
1196
|
-
const
|
|
1197
|
-
return o.filter((
|
|
1199
|
+
const i = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
|
|
1200
|
+
return o.filter((r) => !i.has(r.id));
|
|
1198
1201
|
}, C(e.options, "debugRows", "getCenterRows"));
|
|
1199
1202
|
}
|
|
1200
|
-
},
|
|
1203
|
+
}, Rt = {
|
|
1201
1204
|
getInitialState: (e) => ({
|
|
1202
1205
|
rowSelection: {},
|
|
1203
1206
|
...e
|
|
1204
1207
|
}),
|
|
1205
1208
|
getDefaultOptions: (e) => ({
|
|
1206
|
-
onRowSelectionChange:
|
|
1209
|
+
onRowSelectionChange: P("rowSelection", e),
|
|
1207
1210
|
enableRowSelection: !0,
|
|
1208
1211
|
enableMultiRowSelection: !0,
|
|
1209
1212
|
enableSubRowSelection: !0
|
|
@@ -1220,29 +1223,29 @@ const We = {
|
|
|
1220
1223
|
o = typeof o < "u" ? o : !e.getIsAllRowsSelected();
|
|
1221
1224
|
const n = {
|
|
1222
1225
|
...t
|
|
1223
|
-
},
|
|
1224
|
-
return o ?
|
|
1225
|
-
|
|
1226
|
-
}) :
|
|
1227
|
-
delete n[
|
|
1226
|
+
}, i = e.getPreGroupedRowModel().flatRows;
|
|
1227
|
+
return o ? i.forEach((r) => {
|
|
1228
|
+
r.getCanSelect() && (n[r.id] = !0);
|
|
1229
|
+
}) : i.forEach((r) => {
|
|
1230
|
+
delete n[r.id];
|
|
1228
1231
|
}), n;
|
|
1229
1232
|
});
|
|
1230
1233
|
}, e.toggleAllPageRowsSelected = (o) => e.setRowSelection((t) => {
|
|
1231
|
-
const n = typeof o < "u" ? o : !e.getIsAllPageRowsSelected(),
|
|
1234
|
+
const n = typeof o < "u" ? o : !e.getIsAllPageRowsSelected(), i = {
|
|
1232
1235
|
...t
|
|
1233
1236
|
};
|
|
1234
|
-
return e.getRowModel().rows.forEach((
|
|
1235
|
-
|
|
1236
|
-
}),
|
|
1237
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = S(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ?
|
|
1237
|
+
return e.getRowModel().rows.forEach((r) => {
|
|
1238
|
+
ue(i, r.id, n, !0, e);
|
|
1239
|
+
}), i;
|
|
1240
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = S(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? ie(e, t) : {
|
|
1238
1241
|
rows: [],
|
|
1239
1242
|
flatRows: [],
|
|
1240
1243
|
rowsById: {}
|
|
1241
|
-
}, C(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = S(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ?
|
|
1244
|
+
}, C(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = S(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? ie(e, t) : {
|
|
1242
1245
|
rows: [],
|
|
1243
1246
|
flatRows: [],
|
|
1244
1247
|
rowsById: {}
|
|
1245
|
-
}, C(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = S(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ?
|
|
1248
|
+
}, C(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = S(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? ie(e, t) : {
|
|
1246
1249
|
rows: [],
|
|
1247
1250
|
flatRows: [],
|
|
1248
1251
|
rowsById: {}
|
|
@@ -1251,13 +1254,13 @@ const We = {
|
|
|
1251
1254
|
rowSelection: t
|
|
1252
1255
|
} = e.getState();
|
|
1253
1256
|
let n = !!(o.length && Object.keys(t).length);
|
|
1254
|
-
return n && o.some((
|
|
1257
|
+
return n && o.some((i) => i.getCanSelect() && !t[i.id]) && (n = !1), n;
|
|
1255
1258
|
}, e.getIsAllPageRowsSelected = () => {
|
|
1256
|
-
const o = e.getPaginationRowModel().flatRows.filter((
|
|
1259
|
+
const o = e.getPaginationRowModel().flatRows.filter((i) => i.getCanSelect()), {
|
|
1257
1260
|
rowSelection: t
|
|
1258
1261
|
} = e.getState();
|
|
1259
1262
|
let n = !!o.length;
|
|
1260
|
-
return n && o.some((
|
|
1263
|
+
return n && o.some((i) => !t[i.id]) && (n = !1), n;
|
|
1261
1264
|
}, e.getIsSomeRowsSelected = () => {
|
|
1262
1265
|
var o;
|
|
1263
1266
|
const t = Object.keys((o = e.getState().rowSelection) != null ? o : {}).length;
|
|
@@ -1273,31 +1276,31 @@ const We = {
|
|
|
1273
1276
|
},
|
|
1274
1277
|
createRow: (e, o) => {
|
|
1275
1278
|
e.toggleSelected = (t, n) => {
|
|
1276
|
-
const
|
|
1277
|
-
o.setRowSelection((
|
|
1279
|
+
const i = e.getIsSelected();
|
|
1280
|
+
o.setRowSelection((r) => {
|
|
1278
1281
|
var l;
|
|
1279
|
-
if (t = typeof t < "u" ? t : !
|
|
1280
|
-
return
|
|
1282
|
+
if (t = typeof t < "u" ? t : !i, e.getCanSelect() && i === t)
|
|
1283
|
+
return r;
|
|
1281
1284
|
const u = {
|
|
1282
|
-
...
|
|
1285
|
+
...r
|
|
1283
1286
|
};
|
|
1284
|
-
return
|
|
1287
|
+
return ue(u, e.id, t, (l = n?.selectChildren) != null ? l : !0, o), u;
|
|
1285
1288
|
});
|
|
1286
1289
|
}, e.getIsSelected = () => {
|
|
1287
1290
|
const {
|
|
1288
1291
|
rowSelection: t
|
|
1289
1292
|
} = o.getState();
|
|
1290
|
-
return
|
|
1293
|
+
return fe(e, t);
|
|
1291
1294
|
}, e.getIsSomeSelected = () => {
|
|
1292
1295
|
const {
|
|
1293
1296
|
rowSelection: t
|
|
1294
1297
|
} = o.getState();
|
|
1295
|
-
return
|
|
1298
|
+
return ae(e, t) === "some";
|
|
1296
1299
|
}, e.getIsAllSubRowsSelected = () => {
|
|
1297
1300
|
const {
|
|
1298
1301
|
rowSelection: t
|
|
1299
1302
|
} = o.getState();
|
|
1300
|
-
return
|
|
1303
|
+
return ae(e, t) === "all";
|
|
1301
1304
|
}, e.getCanSelect = () => {
|
|
1302
1305
|
var t;
|
|
1303
1306
|
return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
|
|
@@ -1310,67 +1313,67 @@ const We = {
|
|
|
1310
1313
|
}, e.getToggleSelectedHandler = () => {
|
|
1311
1314
|
const t = e.getCanSelect();
|
|
1312
1315
|
return (n) => {
|
|
1313
|
-
var
|
|
1314
|
-
t && e.toggleSelected((
|
|
1316
|
+
var i;
|
|
1317
|
+
t && e.toggleSelected((i = n.target) == null ? void 0 : i.checked);
|
|
1315
1318
|
};
|
|
1316
1319
|
};
|
|
1317
1320
|
}
|
|
1318
|
-
},
|
|
1319
|
-
var
|
|
1320
|
-
const l =
|
|
1321
|
-
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((u) => delete e[u]), l.getCanSelect() && (e[o] = !0)) : delete e[o], n && (
|
|
1321
|
+
}, ue = (e, o, t, n, i) => {
|
|
1322
|
+
var r;
|
|
1323
|
+
const l = i.getRow(o, !0);
|
|
1324
|
+
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((u) => delete e[u]), l.getCanSelect() && (e[o] = !0)) : delete e[o], n && (r = l.subRows) != null && r.length && l.getCanSelectSubRows() && l.subRows.forEach((u) => ue(e, u.id, t, n, i));
|
|
1322
1325
|
};
|
|
1323
|
-
function
|
|
1324
|
-
const t = e.getState().rowSelection, n = [],
|
|
1326
|
+
function ie(e, o) {
|
|
1327
|
+
const t = e.getState().rowSelection, n = [], i = {}, r = function(l, u) {
|
|
1325
1328
|
return l.map((a) => {
|
|
1326
|
-
var
|
|
1327
|
-
const c =
|
|
1328
|
-
if (c && (n.push(a),
|
|
1329
|
+
var g;
|
|
1330
|
+
const c = fe(a, t);
|
|
1331
|
+
if (c && (n.push(a), i[a.id] = a), (g = a.subRows) != null && g.length && (a = {
|
|
1329
1332
|
...a,
|
|
1330
|
-
subRows:
|
|
1333
|
+
subRows: r(a.subRows)
|
|
1331
1334
|
}), c)
|
|
1332
1335
|
return a;
|
|
1333
1336
|
}).filter(Boolean);
|
|
1334
1337
|
};
|
|
1335
1338
|
return {
|
|
1336
|
-
rows:
|
|
1339
|
+
rows: r(o.rows),
|
|
1337
1340
|
flatRows: n,
|
|
1338
|
-
rowsById:
|
|
1341
|
+
rowsById: i
|
|
1339
1342
|
};
|
|
1340
1343
|
}
|
|
1341
|
-
function
|
|
1344
|
+
function fe(e, o) {
|
|
1342
1345
|
var t;
|
|
1343
1346
|
return (t = o[e.id]) != null ? t : !1;
|
|
1344
1347
|
}
|
|
1345
|
-
function
|
|
1348
|
+
function ae(e, o, t) {
|
|
1346
1349
|
var n;
|
|
1347
1350
|
if (!((n = e.subRows) != null && n.length)) return !1;
|
|
1348
|
-
let
|
|
1351
|
+
let i = !0, r = !1;
|
|
1349
1352
|
return e.subRows.forEach((l) => {
|
|
1350
|
-
if (!(
|
|
1351
|
-
const u =
|
|
1352
|
-
u === "all" ?
|
|
1353
|
+
if (!(r && !i) && (l.getCanSelect() && (fe(l, o) ? r = !0 : i = !1), l.subRows && l.subRows.length)) {
|
|
1354
|
+
const u = ae(l, o);
|
|
1355
|
+
u === "all" ? r = !0 : (u === "some" && (r = !0), i = !1);
|
|
1353
1356
|
}
|
|
1354
|
-
}),
|
|
1357
|
+
}), i ? "all" : r ? "some" : !1;
|
|
1355
1358
|
}
|
|
1356
|
-
const
|
|
1357
|
-
const n = e.getValue(t),
|
|
1358
|
-
return n >
|
|
1359
|
-
},
|
|
1360
|
-
function
|
|
1359
|
+
const ge = /([0-9]+)/gm, wt = (e, o, t) => Ie(L(e.getValue(t)).toLowerCase(), L(o.getValue(t)).toLowerCase()), ht = (e, o, t) => Ie(L(e.getValue(t)), L(o.getValue(t))), vt = (e, o, t) => pe(L(e.getValue(t)).toLowerCase(), L(o.getValue(t)).toLowerCase()), _t = (e, o, t) => pe(L(e.getValue(t)), L(o.getValue(t))), Ft = (e, o, t) => {
|
|
1360
|
+
const n = e.getValue(t), i = o.getValue(t);
|
|
1361
|
+
return n > i ? 1 : n < i ? -1 : 0;
|
|
1362
|
+
}, $t = (e, o, t) => pe(e.getValue(t), o.getValue(t));
|
|
1363
|
+
function pe(e, o) {
|
|
1361
1364
|
return e === o ? 0 : e > o ? 1 : -1;
|
|
1362
1365
|
}
|
|
1363
|
-
function
|
|
1366
|
+
function L(e) {
|
|
1364
1367
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
1365
1368
|
}
|
|
1366
|
-
function
|
|
1367
|
-
const t = e.split(
|
|
1369
|
+
function Ie(e, o) {
|
|
1370
|
+
const t = e.split(ge).filter(Boolean), n = o.split(ge).filter(Boolean);
|
|
1368
1371
|
for (; t.length && n.length; ) {
|
|
1369
|
-
const
|
|
1372
|
+
const i = t.shift(), r = n.shift(), l = parseInt(i, 10), u = parseInt(r, 10), a = [l, u].sort();
|
|
1370
1373
|
if (isNaN(a[0])) {
|
|
1371
|
-
if (r > i)
|
|
1372
|
-
return 1;
|
|
1373
1374
|
if (i > r)
|
|
1375
|
+
return 1;
|
|
1376
|
+
if (r > i)
|
|
1374
1377
|
return -1;
|
|
1375
1378
|
continue;
|
|
1376
1379
|
}
|
|
@@ -1383,14 +1386,14 @@ function Re(e, o) {
|
|
|
1383
1386
|
}
|
|
1384
1387
|
return t.length - n.length;
|
|
1385
1388
|
}
|
|
1386
|
-
const
|
|
1387
|
-
alphanumeric:
|
|
1388
|
-
alphanumericCaseSensitive:
|
|
1389
|
-
text:
|
|
1390
|
-
textCaseSensitive:
|
|
1391
|
-
datetime:
|
|
1392
|
-
basic:
|
|
1393
|
-
},
|
|
1389
|
+
const q = {
|
|
1390
|
+
alphanumeric: wt,
|
|
1391
|
+
alphanumericCaseSensitive: ht,
|
|
1392
|
+
text: vt,
|
|
1393
|
+
textCaseSensitive: _t,
|
|
1394
|
+
datetime: Ft,
|
|
1395
|
+
basic: $t
|
|
1396
|
+
}, Vt = {
|
|
1394
1397
|
getInitialState: (e) => ({
|
|
1395
1398
|
sorting: [],
|
|
1396
1399
|
...e
|
|
@@ -1400,21 +1403,21 @@ const D = {
|
|
|
1400
1403
|
sortUndefined: 1
|
|
1401
1404
|
}),
|
|
1402
1405
|
getDefaultOptions: (e) => ({
|
|
1403
|
-
onSortingChange:
|
|
1406
|
+
onSortingChange: P("sorting", e),
|
|
1404
1407
|
isMultiSortEvent: (o) => o.shiftKey
|
|
1405
1408
|
}),
|
|
1406
1409
|
createColumn: (e, o) => {
|
|
1407
1410
|
e.getAutoSortingFn = () => {
|
|
1408
1411
|
const t = o.getFilteredRowModel().flatRows.slice(10);
|
|
1409
1412
|
let n = !1;
|
|
1410
|
-
for (const
|
|
1411
|
-
const
|
|
1412
|
-
if (Object.prototype.toString.call(
|
|
1413
|
-
return
|
|
1414
|
-
if (typeof
|
|
1415
|
-
return
|
|
1413
|
+
for (const i of t) {
|
|
1414
|
+
const r = i?.getValue(e.id);
|
|
1415
|
+
if (Object.prototype.toString.call(r) === "[object Date]")
|
|
1416
|
+
return q.datetime;
|
|
1417
|
+
if (typeof r == "string" && (n = !0, r.split(ge).length > 1))
|
|
1418
|
+
return q.alphanumeric;
|
|
1416
1419
|
}
|
|
1417
|
-
return n ?
|
|
1420
|
+
return n ? q.text : q.basic;
|
|
1418
1421
|
}, e.getAutoSortDir = () => {
|
|
1419
1422
|
const t = o.getFilteredRowModel().flatRows[0];
|
|
1420
1423
|
return typeof t?.getValue(e.id) == "string" ? "asc" : "desc";
|
|
@@ -1422,35 +1425,35 @@ const D = {
|
|
|
1422
1425
|
var t, n;
|
|
1423
1426
|
if (!e)
|
|
1424
1427
|
throw new Error();
|
|
1425
|
-
return
|
|
1428
|
+
return Q(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : q[e.columnDef.sortingFn];
|
|
1426
1429
|
}, e.toggleSorting = (t, n) => {
|
|
1427
|
-
const
|
|
1430
|
+
const i = e.getNextSortingOrder(), r = typeof t < "u" && t !== null;
|
|
1428
1431
|
o.setSorting((l) => {
|
|
1429
1432
|
const u = l?.find((s) => s.id === e.id), a = l?.findIndex((s) => s.id === e.id);
|
|
1430
|
-
let
|
|
1431
|
-
if (l != null && l.length && e.getCanMultiSort() && n ? u ? c = "toggle" : c = "add" : l != null && l.length && a !== l.length - 1 ? c = "replace" : u ? c = "toggle" : c = "replace", c === "toggle" && (
|
|
1432
|
-
var
|
|
1433
|
-
|
|
1433
|
+
let g = [], c, m = r ? t : i === "desc";
|
|
1434
|
+
if (l != null && l.length && e.getCanMultiSort() && n ? u ? c = "toggle" : c = "add" : l != null && l.length && a !== l.length - 1 ? c = "replace" : u ? c = "toggle" : c = "replace", c === "toggle" && (r || i || (c = "remove")), c === "add") {
|
|
1435
|
+
var d;
|
|
1436
|
+
g = [...l, {
|
|
1434
1437
|
id: e.id,
|
|
1435
1438
|
desc: m
|
|
1436
|
-
}],
|
|
1437
|
-
} else c === "toggle" ?
|
|
1439
|
+
}], g.splice(0, g.length - ((d = o.options.maxMultiSortColCount) != null ? d : Number.MAX_SAFE_INTEGER));
|
|
1440
|
+
} else c === "toggle" ? g = l.map((s) => s.id === e.id ? {
|
|
1438
1441
|
...s,
|
|
1439
1442
|
desc: m
|
|
1440
|
-
} : s) : c === "remove" ?
|
|
1443
|
+
} : s) : c === "remove" ? g = l.filter((s) => s.id !== e.id) : g = [{
|
|
1441
1444
|
id: e.id,
|
|
1442
1445
|
desc: m
|
|
1443
1446
|
}];
|
|
1444
|
-
return
|
|
1447
|
+
return g;
|
|
1445
1448
|
});
|
|
1446
1449
|
}, e.getFirstSortDir = () => {
|
|
1447
1450
|
var t, n;
|
|
1448
1451
|
return ((t = (n = e.columnDef.sortDescFirst) != null ? n : o.options.sortDescFirst) != null ? t : e.getAutoSortDir() === "desc") ? "desc" : "asc";
|
|
1449
1452
|
}, e.getNextSortingOrder = (t) => {
|
|
1450
|
-
var n,
|
|
1451
|
-
const
|
|
1452
|
-
return l ? l !==
|
|
1453
|
-
(!(t && (
|
|
1453
|
+
var n, i;
|
|
1454
|
+
const r = e.getFirstSortDir(), l = e.getIsSorted();
|
|
1455
|
+
return l ? l !== r && ((n = o.options.enableSortingRemoval) == null || n) && // If enableSortRemove, enable in general
|
|
1456
|
+
(!(t && (i = o.options.enableMultiRemove) != null) || i) ? !1 : l === "desc" ? "asc" : "desc" : r;
|
|
1454
1457
|
}, e.getCanSort = () => {
|
|
1455
1458
|
var t, n;
|
|
1456
1459
|
return ((t = e.columnDef.enableSorting) != null ? t : !0) && ((n = o.options.enableSorting) != null ? n : !0) && !!e.accessorFn;
|
|
@@ -1459,11 +1462,11 @@ const D = {
|
|
|
1459
1462
|
return (t = (n = e.columnDef.enableMultiSort) != null ? n : o.options.enableMultiSort) != null ? t : !!e.accessorFn;
|
|
1460
1463
|
}, e.getIsSorted = () => {
|
|
1461
1464
|
var t;
|
|
1462
|
-
const n = (t = o.getState().sorting) == null ? void 0 : t.find((
|
|
1465
|
+
const n = (t = o.getState().sorting) == null ? void 0 : t.find((i) => i.id === e.id);
|
|
1463
1466
|
return n ? n.desc ? "desc" : "asc" : !1;
|
|
1464
1467
|
}, e.getSortIndex = () => {
|
|
1465
1468
|
var t, n;
|
|
1466
|
-
return (t = (n = o.getState().sorting) == null ? void 0 : n.findIndex((
|
|
1469
|
+
return (t = (n = o.getState().sorting) == null ? void 0 : n.findIndex((i) => i.id === e.id)) != null ? t : -1;
|
|
1467
1470
|
}, e.clearSorting = () => {
|
|
1468
1471
|
o.setSorting((t) => t != null && t.length ? t.filter((n) => n.id !== e.id) : []);
|
|
1469
1472
|
}, e.getToggleSortingHandler = () => {
|
|
@@ -1479,92 +1482,92 @@ const D = {
|
|
|
1479
1482
|
e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
|
|
1480
1483
|
}, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
|
|
1481
1484
|
}
|
|
1482
|
-
},
|
|
1483
|
-
|
|
1485
|
+
}, Mt = [
|
|
1486
|
+
Xe,
|
|
1487
|
+
ct,
|
|
1488
|
+
st,
|
|
1489
|
+
ut,
|
|
1490
|
+
Je,
|
|
1484
1491
|
Qe,
|
|
1485
|
-
|
|
1486
|
-
Ue,
|
|
1487
|
-
Ee,
|
|
1488
|
-
De,
|
|
1489
|
-
We,
|
|
1492
|
+
ft,
|
|
1490
1493
|
//depends on ColumnFaceting
|
|
1491
|
-
|
|
1494
|
+
pt,
|
|
1492
1495
|
//depends on ColumnFiltering
|
|
1493
|
-
|
|
1494
|
-
|
|
1496
|
+
Vt,
|
|
1497
|
+
rt,
|
|
1495
1498
|
//depends on RowSorting
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1499
|
+
mt,
|
|
1500
|
+
St,
|
|
1501
|
+
Ct,
|
|
1502
|
+
Rt,
|
|
1503
|
+
gt
|
|
1501
1504
|
];
|
|
1502
|
-
function
|
|
1505
|
+
function xt(e) {
|
|
1503
1506
|
var o, t;
|
|
1504
1507
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
1505
|
-
const n = [...
|
|
1506
|
-
let
|
|
1508
|
+
const n = [...Mt, ...(o = e._features) != null ? o : []];
|
|
1509
|
+
let i = {
|
|
1507
1510
|
_features: n
|
|
1508
1511
|
};
|
|
1509
|
-
const
|
|
1510
|
-
...
|
|
1511
|
-
...
|
|
1512
|
+
const r = i._features.reduce((d, s) => Object.assign(d, s.getDefaultOptions == null ? void 0 : s.getDefaultOptions(i)), {}), l = (d) => i.options.mergeOptions ? i.options.mergeOptions(r, d) : {
|
|
1513
|
+
...r,
|
|
1514
|
+
...d
|
|
1512
1515
|
};
|
|
1513
1516
|
let a = {
|
|
1514
1517
|
...{},
|
|
1515
1518
|
...(t = e.initialState) != null ? t : {}
|
|
1516
1519
|
};
|
|
1517
|
-
|
|
1520
|
+
i._features.forEach((d) => {
|
|
1518
1521
|
var s;
|
|
1519
|
-
a = (s =
|
|
1522
|
+
a = (s = d.getInitialState == null ? void 0 : d.getInitialState(a)) != null ? s : a;
|
|
1520
1523
|
});
|
|
1521
|
-
const
|
|
1524
|
+
const g = [];
|
|
1522
1525
|
let c = !1;
|
|
1523
1526
|
const m = {
|
|
1524
1527
|
_features: n,
|
|
1525
1528
|
options: {
|
|
1526
|
-
...
|
|
1529
|
+
...r,
|
|
1527
1530
|
...e
|
|
1528
1531
|
},
|
|
1529
1532
|
initialState: a,
|
|
1530
|
-
_queue: (
|
|
1531
|
-
|
|
1532
|
-
for (;
|
|
1533
|
-
|
|
1533
|
+
_queue: (d) => {
|
|
1534
|
+
g.push(d), c || (c = !0, Promise.resolve().then(() => {
|
|
1535
|
+
for (; g.length; )
|
|
1536
|
+
g.shift()();
|
|
1534
1537
|
c = !1;
|
|
1535
1538
|
}).catch((s) => setTimeout(() => {
|
|
1536
1539
|
throw s;
|
|
1537
1540
|
})));
|
|
1538
1541
|
},
|
|
1539
1542
|
reset: () => {
|
|
1540
|
-
|
|
1543
|
+
i.setState(i.initialState);
|
|
1541
1544
|
},
|
|
1542
|
-
setOptions: (
|
|
1543
|
-
const s =
|
|
1544
|
-
|
|
1545
|
+
setOptions: (d) => {
|
|
1546
|
+
const s = G(d, i.options);
|
|
1547
|
+
i.options = l(s);
|
|
1545
1548
|
},
|
|
1546
|
-
getState: () =>
|
|
1547
|
-
setState: (
|
|
1548
|
-
|
|
1549
|
+
getState: () => i.options.state,
|
|
1550
|
+
setState: (d) => {
|
|
1551
|
+
i.options.onStateChange == null || i.options.onStateChange(d);
|
|
1549
1552
|
},
|
|
1550
|
-
_getRowId: (
|
|
1553
|
+
_getRowId: (d, s, f) => {
|
|
1551
1554
|
var p;
|
|
1552
|
-
return (p =
|
|
1555
|
+
return (p = i.options.getRowId == null ? void 0 : i.options.getRowId(d, s, f)) != null ? p : `${f ? [f.id, s].join(".") : s}`;
|
|
1553
1556
|
},
|
|
1554
|
-
getCoreRowModel: () => (
|
|
1557
|
+
getCoreRowModel: () => (i._getCoreRowModel || (i._getCoreRowModel = i.options.getCoreRowModel(i)), i._getCoreRowModel()),
|
|
1555
1558
|
// The final calls start at the bottom of the model,
|
|
1556
1559
|
// expanded rows, which then work their way up
|
|
1557
|
-
getRowModel: () =>
|
|
1560
|
+
getRowModel: () => i.getPaginationRowModel(),
|
|
1558
1561
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
1559
|
-
getRow: (
|
|
1560
|
-
let f = (s ?
|
|
1561
|
-
if (!f && (f =
|
|
1562
|
-
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${
|
|
1562
|
+
getRow: (d, s) => {
|
|
1563
|
+
let f = (s ? i.getPrePaginationRowModel() : i.getRowModel()).rowsById[d];
|
|
1564
|
+
if (!f && (f = i.getCoreRowModel().rowsById[d], !f))
|
|
1565
|
+
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
|
|
1563
1566
|
return f;
|
|
1564
1567
|
},
|
|
1565
|
-
_getDefaultColumnDef: S(() => [
|
|
1568
|
+
_getDefaultColumnDef: S(() => [i.options.defaultColumn], (d) => {
|
|
1566
1569
|
var s;
|
|
1567
|
-
return
|
|
1570
|
+
return d = (s = d) != null ? s : {}, {
|
|
1568
1571
|
header: (f) => {
|
|
1569
1572
|
const p = f.header.column.columnDef;
|
|
1570
1573
|
return p.accessorKey ? p.accessorKey : p.accessorFn ? p.id : null;
|
|
@@ -1574,52 +1577,52 @@ function gt(e) {
|
|
|
1574
1577
|
var p, R;
|
|
1575
1578
|
return (p = (R = f.renderValue()) == null || R.toString == null ? void 0 : R.toString()) != null ? p : null;
|
|
1576
1579
|
},
|
|
1577
|
-
...
|
|
1578
|
-
...
|
|
1580
|
+
...i._features.reduce((f, p) => Object.assign(f, p.getDefaultColumnDef == null ? void 0 : p.getDefaultColumnDef()), {}),
|
|
1581
|
+
...d
|
|
1579
1582
|
};
|
|
1580
1583
|
}, C(e, "debugColumns", "_getDefaultColumnDef")),
|
|
1581
|
-
_getColumnDefs: () =>
|
|
1582
|
-
getAllColumns: S(() => [
|
|
1584
|
+
_getColumnDefs: () => i.options.columns,
|
|
1585
|
+
getAllColumns: S(() => [i._getColumnDefs()], (d) => {
|
|
1583
1586
|
const s = function(f, p, R) {
|
|
1584
1587
|
return R === void 0 && (R = 0), f.map((w) => {
|
|
1585
|
-
const
|
|
1586
|
-
return
|
|
1588
|
+
const v = Ke(i, w, R, p), h = w;
|
|
1589
|
+
return v.columns = h.columns ? s(h.columns, v, R + 1) : [], v;
|
|
1587
1590
|
});
|
|
1588
1591
|
};
|
|
1589
|
-
return s(
|
|
1592
|
+
return s(d);
|
|
1590
1593
|
}, C(e, "debugColumns", "getAllColumns")),
|
|
1591
|
-
getAllFlatColumns: S(() => [
|
|
1592
|
-
_getAllFlatColumnsById: S(() => [
|
|
1593
|
-
getAllLeafColumns: S(() => [
|
|
1594
|
-
let f =
|
|
1594
|
+
getAllFlatColumns: S(() => [i.getAllColumns()], (d) => d.flatMap((s) => s.getFlatColumns()), C(e, "debugColumns", "getAllFlatColumns")),
|
|
1595
|
+
_getAllFlatColumnsById: S(() => [i.getAllFlatColumns()], (d) => d.reduce((s, f) => (s[f.id] = f, s), {}), C(e, "debugColumns", "getAllFlatColumnsById")),
|
|
1596
|
+
getAllLeafColumns: S(() => [i.getAllColumns(), i._getOrderColumnsFn()], (d, s) => {
|
|
1597
|
+
let f = d.flatMap((p) => p.getLeafColumns());
|
|
1595
1598
|
return s(f);
|
|
1596
1599
|
}, C(e, "debugColumns", "getAllLeafColumns")),
|
|
1597
|
-
getColumn: (
|
|
1598
|
-
const s =
|
|
1599
|
-
return process.env.NODE_ENV !== "production" && !s && console.error(`[Table] Column with id '${
|
|
1600
|
+
getColumn: (d) => {
|
|
1601
|
+
const s = i._getAllFlatColumnsById()[d];
|
|
1602
|
+
return process.env.NODE_ENV !== "production" && !s && console.error(`[Table] Column with id '${d}' does not exist.`), s;
|
|
1600
1603
|
}
|
|
1601
1604
|
};
|
|
1602
|
-
Object.assign(
|
|
1603
|
-
for (let
|
|
1604
|
-
const s =
|
|
1605
|
-
s == null || s.createTable == null || s.createTable(
|
|
1605
|
+
Object.assign(i, m);
|
|
1606
|
+
for (let d = 0; d < i._features.length; d++) {
|
|
1607
|
+
const s = i._features[d];
|
|
1608
|
+
s == null || s.createTable == null || s.createTable(i);
|
|
1606
1609
|
}
|
|
1607
|
-
return
|
|
1610
|
+
return i;
|
|
1608
1611
|
}
|
|
1609
|
-
function
|
|
1612
|
+
function Pt() {
|
|
1610
1613
|
return (e) => S(() => [e.options.data], (o) => {
|
|
1611
1614
|
const t = {
|
|
1612
1615
|
rows: [],
|
|
1613
1616
|
flatRows: [],
|
|
1614
1617
|
rowsById: {}
|
|
1615
|
-
}, n = function(
|
|
1616
|
-
|
|
1618
|
+
}, n = function(i, r, l) {
|
|
1619
|
+
r === void 0 && (r = 0);
|
|
1617
1620
|
const u = [];
|
|
1618
|
-
for (let
|
|
1619
|
-
const c =
|
|
1621
|
+
for (let g = 0; g < i.length; g++) {
|
|
1622
|
+
const c = de(e, e._getRowId(i[g], g, l), i[g], g, r, void 0, l?.id);
|
|
1620
1623
|
if (t.flatRows.push(c), t.rowsById[c.id] = c, u.push(c), e.options.getSubRows) {
|
|
1621
1624
|
var a;
|
|
1622
|
-
c.originalSubRows = e.options.getSubRows(
|
|
1625
|
+
c.originalSubRows = e.options.getSubRows(i[g], g), (a = c.originalSubRows) != null && a.length && (c.subRows = n(c.originalSubRows, r + 1, c));
|
|
1623
1626
|
}
|
|
1624
1627
|
}
|
|
1625
1628
|
return u;
|
|
@@ -1627,10 +1630,10 @@ function dt() {
|
|
|
1627
1630
|
return t.rows = n(o), t;
|
|
1628
1631
|
}, C(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
1629
1632
|
}
|
|
1630
|
-
function
|
|
1633
|
+
function It(e) {
|
|
1631
1634
|
const o = [], t = (n) => {
|
|
1632
|
-
var
|
|
1633
|
-
o.push(n), (
|
|
1635
|
+
var i;
|
|
1636
|
+
o.push(n), (i = n.subRows) != null && i.length && n.getIsExpanded() && n.subRows.forEach(t);
|
|
1634
1637
|
};
|
|
1635
1638
|
return e.rows.forEach(t), {
|
|
1636
1639
|
rows: o,
|
|
@@ -1638,73 +1641,73 @@ function ct(e) {
|
|
|
1638
1641
|
rowsById: e.rowsById
|
|
1639
1642
|
};
|
|
1640
1643
|
}
|
|
1641
|
-
function
|
|
1642
|
-
return t.options.filterFromLeafRows ?
|
|
1644
|
+
function yt(e, o, t) {
|
|
1645
|
+
return t.options.filterFromLeafRows ? Et(e, o, t) : Dt(e, o, t);
|
|
1643
1646
|
}
|
|
1644
|
-
function
|
|
1647
|
+
function Et(e, o, t) {
|
|
1645
1648
|
var n;
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1649
|
+
const i = [], r = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(a, g) {
|
|
1650
|
+
g === void 0 && (g = 0);
|
|
1648
1651
|
const c = [];
|
|
1649
|
-
for (let
|
|
1652
|
+
for (let d = 0; d < a.length; d++) {
|
|
1650
1653
|
var m;
|
|
1651
|
-
let s = a[
|
|
1652
|
-
const f =
|
|
1653
|
-
if (f.columnFilters = s.columnFilters, (m = s.subRows) != null && m.length &&
|
|
1654
|
-
if (f.subRows = u(s.subRows,
|
|
1655
|
-
c.push(s),
|
|
1654
|
+
let s = a[d];
|
|
1655
|
+
const f = de(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
|
|
1656
|
+
if (f.columnFilters = s.columnFilters, (m = s.subRows) != null && m.length && g < l) {
|
|
1657
|
+
if (f.subRows = u(s.subRows, g + 1), s = f, o(s) && !f.subRows.length) {
|
|
1658
|
+
c.push(s), r[s.id] = s, i.push(s);
|
|
1656
1659
|
continue;
|
|
1657
1660
|
}
|
|
1658
1661
|
if (o(s) || f.subRows.length) {
|
|
1659
|
-
c.push(s),
|
|
1662
|
+
c.push(s), r[s.id] = s, i.push(s);
|
|
1660
1663
|
continue;
|
|
1661
1664
|
}
|
|
1662
1665
|
} else
|
|
1663
|
-
s = f, o(s) && (c.push(s),
|
|
1666
|
+
s = f, o(s) && (c.push(s), r[s.id] = s, i.push(s));
|
|
1664
1667
|
}
|
|
1665
1668
|
return c;
|
|
1666
1669
|
};
|
|
1667
1670
|
return {
|
|
1668
1671
|
rows: u(e),
|
|
1669
|
-
flatRows:
|
|
1670
|
-
rowsById:
|
|
1672
|
+
flatRows: i,
|
|
1673
|
+
rowsById: r
|
|
1671
1674
|
};
|
|
1672
1675
|
}
|
|
1673
|
-
function
|
|
1676
|
+
function Dt(e, o, t) {
|
|
1674
1677
|
var n;
|
|
1675
|
-
const
|
|
1676
|
-
|
|
1678
|
+
const i = [], r = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(a, g) {
|
|
1679
|
+
g === void 0 && (g = 0);
|
|
1677
1680
|
const c = [];
|
|
1678
|
-
for (let
|
|
1679
|
-
let s = a[
|
|
1681
|
+
for (let d = 0; d < a.length; d++) {
|
|
1682
|
+
let s = a[d];
|
|
1680
1683
|
if (o(s)) {
|
|
1681
1684
|
var m;
|
|
1682
|
-
if ((m = s.subRows) != null && m.length &&
|
|
1683
|
-
const p =
|
|
1684
|
-
p.subRows = u(s.subRows,
|
|
1685
|
+
if ((m = s.subRows) != null && m.length && g < l) {
|
|
1686
|
+
const p = de(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
|
|
1687
|
+
p.subRows = u(s.subRows, g + 1), s = p;
|
|
1685
1688
|
}
|
|
1686
|
-
c.push(s),
|
|
1689
|
+
c.push(s), i.push(s), r[s.id] = s;
|
|
1687
1690
|
}
|
|
1688
1691
|
}
|
|
1689
1692
|
return c;
|
|
1690
1693
|
};
|
|
1691
1694
|
return {
|
|
1692
1695
|
rows: u(e),
|
|
1693
|
-
flatRows:
|
|
1694
|
-
rowsById:
|
|
1696
|
+
flatRows: i,
|
|
1697
|
+
rowsById: r
|
|
1695
1698
|
};
|
|
1696
1699
|
}
|
|
1697
|
-
function
|
|
1700
|
+
function Ht() {
|
|
1698
1701
|
return (e) => S(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
|
|
1699
1702
|
if (!o.rows.length || !(t != null && t.length) && !n) {
|
|
1700
|
-
for (let
|
|
1701
|
-
o.flatRows[
|
|
1703
|
+
for (let d = 0; d < o.flatRows.length; d++)
|
|
1704
|
+
o.flatRows[d].columnFilters = {}, o.flatRows[d].columnFiltersMeta = {};
|
|
1702
1705
|
return o;
|
|
1703
1706
|
}
|
|
1704
|
-
const
|
|
1705
|
-
(t ?? []).forEach((
|
|
1707
|
+
const i = [], r = [];
|
|
1708
|
+
(t ?? []).forEach((d) => {
|
|
1706
1709
|
var s;
|
|
1707
|
-
const f = e.getColumn(
|
|
1710
|
+
const f = e.getColumn(d.id);
|
|
1708
1711
|
if (!f)
|
|
1709
1712
|
return;
|
|
1710
1713
|
const p = f.getFilterFn();
|
|
@@ -1712,35 +1715,35 @@ function St() {
|
|
|
1712
1715
|
process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${f.id}.`);
|
|
1713
1716
|
return;
|
|
1714
1717
|
}
|
|
1715
|
-
|
|
1716
|
-
id:
|
|
1718
|
+
i.push({
|
|
1719
|
+
id: d.id,
|
|
1717
1720
|
filterFn: p,
|
|
1718
|
-
resolvedValue: (s = p.resolveFilterValue == null ? void 0 : p.resolveFilterValue(
|
|
1721
|
+
resolvedValue: (s = p.resolveFilterValue == null ? void 0 : p.resolveFilterValue(d.value)) != null ? s : d.value
|
|
1719
1722
|
});
|
|
1720
1723
|
});
|
|
1721
|
-
const l = (t ?? []).map((
|
|
1722
|
-
n && u && a.length && (l.push("__global__"), a.forEach((
|
|
1724
|
+
const l = (t ?? []).map((d) => d.id), u = e.getGlobalFilterFn(), a = e.getAllLeafColumns().filter((d) => d.getCanGlobalFilter());
|
|
1725
|
+
n && u && a.length && (l.push("__global__"), a.forEach((d) => {
|
|
1723
1726
|
var s;
|
|
1724
|
-
|
|
1725
|
-
id:
|
|
1727
|
+
r.push({
|
|
1728
|
+
id: d.id,
|
|
1726
1729
|
filterFn: u,
|
|
1727
1730
|
resolvedValue: (s = u.resolveFilterValue == null ? void 0 : u.resolveFilterValue(n)) != null ? s : n
|
|
1728
1731
|
});
|
|
1729
1732
|
}));
|
|
1730
|
-
let
|
|
1731
|
-
for (let
|
|
1732
|
-
const s = o.flatRows[
|
|
1733
|
-
if (s.columnFilters = {},
|
|
1734
|
-
for (let f = 0; f <
|
|
1735
|
-
|
|
1736
|
-
const p =
|
|
1737
|
-
s.columnFilters[p] =
|
|
1733
|
+
let g, c;
|
|
1734
|
+
for (let d = 0; d < o.flatRows.length; d++) {
|
|
1735
|
+
const s = o.flatRows[d];
|
|
1736
|
+
if (s.columnFilters = {}, i.length)
|
|
1737
|
+
for (let f = 0; f < i.length; f++) {
|
|
1738
|
+
g = i[f];
|
|
1739
|
+
const p = g.id;
|
|
1740
|
+
s.columnFilters[p] = g.filterFn(s, p, g.resolvedValue, (R) => {
|
|
1738
1741
|
s.columnFiltersMeta[p] = R;
|
|
1739
1742
|
});
|
|
1740
1743
|
}
|
|
1741
|
-
if (
|
|
1742
|
-
for (let f = 0; f <
|
|
1743
|
-
c =
|
|
1744
|
+
if (r.length) {
|
|
1745
|
+
for (let f = 0; f < r.length; f++) {
|
|
1746
|
+
c = r[f];
|
|
1744
1747
|
const p = c.id;
|
|
1745
1748
|
if (c.filterFn(s, p, c.resolvedValue, (R) => {
|
|
1746
1749
|
s.columnFiltersMeta[p] = R;
|
|
@@ -1752,111 +1755,111 @@ function St() {
|
|
|
1752
1755
|
s.columnFilters.__global__ !== !0 && (s.columnFilters.__global__ = !1);
|
|
1753
1756
|
}
|
|
1754
1757
|
}
|
|
1755
|
-
const m = (
|
|
1758
|
+
const m = (d) => {
|
|
1756
1759
|
for (let s = 0; s < l.length; s++)
|
|
1757
|
-
if (
|
|
1760
|
+
if (d.columnFilters[l[s]] === !1)
|
|
1758
1761
|
return !1;
|
|
1759
1762
|
return !0;
|
|
1760
1763
|
};
|
|
1761
|
-
return
|
|
1764
|
+
return yt(o.rows, m, e);
|
|
1762
1765
|
}, C(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
|
|
1763
1766
|
}
|
|
1764
|
-
function
|
|
1767
|
+
function Gt(e) {
|
|
1765
1768
|
return (o) => S(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
|
|
1766
1769
|
if (!n.rows.length)
|
|
1767
1770
|
return n;
|
|
1768
1771
|
const {
|
|
1769
|
-
pageSize:
|
|
1770
|
-
pageIndex:
|
|
1772
|
+
pageSize: i,
|
|
1773
|
+
pageIndex: r
|
|
1771
1774
|
} = t;
|
|
1772
1775
|
let {
|
|
1773
1776
|
rows: l,
|
|
1774
1777
|
flatRows: u,
|
|
1775
1778
|
rowsById: a
|
|
1776
1779
|
} = n;
|
|
1777
|
-
const
|
|
1778
|
-
l = l.slice(
|
|
1780
|
+
const g = i * r, c = g + i;
|
|
1781
|
+
l = l.slice(g, c);
|
|
1779
1782
|
let m;
|
|
1780
1783
|
o.options.paginateExpandedRows ? m = {
|
|
1781
1784
|
rows: l,
|
|
1782
1785
|
flatRows: u,
|
|
1783
1786
|
rowsById: a
|
|
1784
|
-
} : m =
|
|
1787
|
+
} : m = It({
|
|
1785
1788
|
rows: l,
|
|
1786
1789
|
flatRows: u,
|
|
1787
1790
|
rowsById: a
|
|
1788
1791
|
}), m.flatRows = [];
|
|
1789
|
-
const
|
|
1790
|
-
m.flatRows.push(s), s.subRows.length && s.subRows.forEach(
|
|
1792
|
+
const d = (s) => {
|
|
1793
|
+
m.flatRows.push(s), s.subRows.length && s.subRows.forEach(d);
|
|
1791
1794
|
};
|
|
1792
|
-
return m.rows.forEach(
|
|
1795
|
+
return m.rows.forEach(d), m;
|
|
1793
1796
|
}, C(o.options, "debugTable", "getPaginationRowModel"));
|
|
1794
1797
|
}
|
|
1795
|
-
function
|
|
1798
|
+
function Lt() {
|
|
1796
1799
|
return (e) => S(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
|
|
1797
1800
|
if (!t.rows.length || !(o != null && o.length))
|
|
1798
1801
|
return t;
|
|
1799
|
-
const n = e.getState().sorting,
|
|
1800
|
-
var
|
|
1801
|
-
return (
|
|
1802
|
+
const n = e.getState().sorting, i = [], r = n.filter((a) => {
|
|
1803
|
+
var g;
|
|
1804
|
+
return (g = e.getColumn(a.id)) == null ? void 0 : g.getCanSort();
|
|
1802
1805
|
}), l = {};
|
|
1803
|
-
|
|
1804
|
-
const
|
|
1805
|
-
|
|
1806
|
-
sortUndefined:
|
|
1807
|
-
invertSorting:
|
|
1808
|
-
sortingFn:
|
|
1806
|
+
r.forEach((a) => {
|
|
1807
|
+
const g = e.getColumn(a.id);
|
|
1808
|
+
g && (l[a.id] = {
|
|
1809
|
+
sortUndefined: g.columnDef.sortUndefined,
|
|
1810
|
+
invertSorting: g.columnDef.invertSorting,
|
|
1811
|
+
sortingFn: g.getSortingFn()
|
|
1809
1812
|
});
|
|
1810
1813
|
});
|
|
1811
1814
|
const u = (a) => {
|
|
1812
|
-
const
|
|
1815
|
+
const g = a.map((c) => ({
|
|
1813
1816
|
...c
|
|
1814
1817
|
}));
|
|
1815
|
-
return
|
|
1816
|
-
for (let s = 0; s <
|
|
1817
|
-
var
|
|
1818
|
-
const f =
|
|
1819
|
-
let
|
|
1818
|
+
return g.sort((c, m) => {
|
|
1819
|
+
for (let s = 0; s < r.length; s += 1) {
|
|
1820
|
+
var d;
|
|
1821
|
+
const f = r[s], p = l[f.id], R = p.sortUndefined, w = (d = f?.desc) != null ? d : !1;
|
|
1822
|
+
let v = 0;
|
|
1820
1823
|
if (R) {
|
|
1821
|
-
const
|
|
1822
|
-
if (
|
|
1823
|
-
if (R === "first") return
|
|
1824
|
-
if (R === "last") return
|
|
1825
|
-
|
|
1824
|
+
const h = c.getValue(f.id), I = m.getValue(f.id), $ = h === void 0, H = I === void 0;
|
|
1825
|
+
if ($ || H) {
|
|
1826
|
+
if (R === "first") return $ ? -1 : 1;
|
|
1827
|
+
if (R === "last") return $ ? 1 : -1;
|
|
1828
|
+
v = $ && H ? 0 : $ ? R : -R;
|
|
1826
1829
|
}
|
|
1827
1830
|
}
|
|
1828
|
-
if (
|
|
1829
|
-
return w && (
|
|
1831
|
+
if (v === 0 && (v = p.sortingFn(c, m, f.id)), v !== 0)
|
|
1832
|
+
return w && (v *= -1), p.invertSorting && (v *= -1), v;
|
|
1830
1833
|
}
|
|
1831
1834
|
return c.index - m.index;
|
|
1832
|
-
}),
|
|
1835
|
+
}), g.forEach((c) => {
|
|
1833
1836
|
var m;
|
|
1834
|
-
|
|
1835
|
-
}),
|
|
1837
|
+
i.push(c), (m = c.subRows) != null && m.length && (c.subRows = u(c.subRows));
|
|
1838
|
+
}), g;
|
|
1836
1839
|
};
|
|
1837
1840
|
return {
|
|
1838
1841
|
rows: u(t.rows),
|
|
1839
|
-
flatRows:
|
|
1842
|
+
flatRows: i,
|
|
1840
1843
|
rowsById: t.rowsById
|
|
1841
1844
|
};
|
|
1842
1845
|
}, C(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
|
|
1843
1846
|
}
|
|
1844
|
-
function
|
|
1845
|
-
return e ?
|
|
1847
|
+
function we(e, o) {
|
|
1848
|
+
return e ? At(e) ? /* @__PURE__ */ re.createElement(e, o) : e : null;
|
|
1846
1849
|
}
|
|
1847
|
-
function
|
|
1848
|
-
return
|
|
1850
|
+
function At(e) {
|
|
1851
|
+
return zt(e) || typeof e == "function" || Ot(e);
|
|
1849
1852
|
}
|
|
1850
|
-
function
|
|
1853
|
+
function zt(e) {
|
|
1851
1854
|
return typeof e == "function" && (() => {
|
|
1852
1855
|
const o = Object.getPrototypeOf(e);
|
|
1853
1856
|
return o.prototype && o.prototype.isReactComponent;
|
|
1854
1857
|
})();
|
|
1855
1858
|
}
|
|
1856
|
-
function
|
|
1859
|
+
function Ot(e) {
|
|
1857
1860
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
1858
1861
|
}
|
|
1859
|
-
function
|
|
1862
|
+
function Bt(e) {
|
|
1860
1863
|
const o = {
|
|
1861
1864
|
state: {},
|
|
1862
1865
|
// Dummy state
|
|
@@ -1865,11 +1868,11 @@ function _t(e) {
|
|
|
1865
1868
|
// noop
|
|
1866
1869
|
renderFallbackValue: null,
|
|
1867
1870
|
...e
|
|
1868
|
-
}, [t] =
|
|
1869
|
-
current:
|
|
1870
|
-
})), [n,
|
|
1871
|
-
return t.current.setOptions((
|
|
1872
|
-
...
|
|
1871
|
+
}, [t] = re.useState(() => ({
|
|
1872
|
+
current: xt(o)
|
|
1873
|
+
})), [n, i] = re.useState(() => t.current.initialState);
|
|
1874
|
+
return t.current.setOptions((r) => ({
|
|
1875
|
+
...r,
|
|
1873
1876
|
...e,
|
|
1874
1877
|
state: {
|
|
1875
1878
|
...n,
|
|
@@ -1878,88 +1881,203 @@ function _t(e) {
|
|
|
1878
1881
|
// Similarly, we'll maintain both our internal state and any user-provided
|
|
1879
1882
|
// state.
|
|
1880
1883
|
onStateChange: (l) => {
|
|
1881
|
-
|
|
1884
|
+
i(l), e.onStateChange == null || e.onStateChange(l);
|
|
1882
1885
|
}
|
|
1883
1886
|
})), t.current;
|
|
1884
1887
|
}
|
|
1885
|
-
function
|
|
1888
|
+
function he(e) {
|
|
1889
|
+
return e.meta;
|
|
1890
|
+
}
|
|
1891
|
+
function Nt(e, o) {
|
|
1892
|
+
if (o?.editKey)
|
|
1893
|
+
return o.editKey;
|
|
1894
|
+
if ("accessorKey" in e && typeof e.accessorKey == "string")
|
|
1895
|
+
return e.accessorKey;
|
|
1896
|
+
}
|
|
1897
|
+
function Tt(e, o, t) {
|
|
1898
|
+
const n = t?.getEditValue?.(e) ?? e[o];
|
|
1899
|
+
return typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
|
|
1900
|
+
}
|
|
1901
|
+
function qt() {
|
|
1902
|
+
const e = window.getSelection();
|
|
1903
|
+
return !!e && !e.isCollapsed && e.toString().trim().length > 0;
|
|
1904
|
+
}
|
|
1905
|
+
function Qt({
|
|
1886
1906
|
columns: e,
|
|
1887
1907
|
data: o,
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1908
|
+
emptyState: t,
|
|
1909
|
+
sorting: n,
|
|
1910
|
+
columnFilters: i,
|
|
1911
|
+
columnVisibility: r,
|
|
1912
|
+
onColumnVisibilityChange: l,
|
|
1913
|
+
rowSelection: u,
|
|
1914
|
+
onRowSelectionChange: a,
|
|
1915
|
+
getRowId: g,
|
|
1916
|
+
pagination: c,
|
|
1917
|
+
globalFilter: m,
|
|
1918
|
+
setGlobalFilter: d,
|
|
1919
|
+
onSortingChange: s,
|
|
1920
|
+
onColumnFiltersChange: f,
|
|
1921
|
+
onPaginationChange: p,
|
|
1922
|
+
rowClickable: R = !1,
|
|
1923
|
+
onRowClick: w,
|
|
1924
|
+
onTableChange: v,
|
|
1925
|
+
editableRowId: h,
|
|
1926
|
+
editingValues: I,
|
|
1927
|
+
onEditingValuesChange: $,
|
|
1928
|
+
autoResetPageIndex: H,
|
|
1929
|
+
className: V
|
|
1899
1930
|
}) {
|
|
1900
|
-
const
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1931
|
+
const O = R && !!w, j = l !== void 0, B = a !== void 0, U = Le(
|
|
1932
|
+
() => ({
|
|
1933
|
+
sorting: n,
|
|
1934
|
+
columnFilters: i,
|
|
1935
|
+
...c && { pagination: c },
|
|
1936
|
+
globalFilter: m,
|
|
1937
|
+
...j && { columnVisibility: r ?? {} },
|
|
1938
|
+
...B && { rowSelection: u ?? {} }
|
|
1939
|
+
}),
|
|
1940
|
+
[
|
|
1941
|
+
n,
|
|
1942
|
+
i,
|
|
1943
|
+
c,
|
|
1944
|
+
m,
|
|
1945
|
+
j,
|
|
1946
|
+
r,
|
|
1947
|
+
B,
|
|
1948
|
+
u
|
|
1949
|
+
]
|
|
1950
|
+
), W = me(
|
|
1951
|
+
(_, M) => {
|
|
1952
|
+
$?.((F) => ({
|
|
1953
|
+
...F,
|
|
1954
|
+
[_]: M
|
|
1955
|
+
}));
|
|
1956
|
+
},
|
|
1957
|
+
[$]
|
|
1958
|
+
), A = Bt({
|
|
1906
1959
|
data: o,
|
|
1907
1960
|
columns: e,
|
|
1908
|
-
state:
|
|
1909
|
-
onSortingChange:
|
|
1910
|
-
onColumnFiltersChange:
|
|
1911
|
-
onPaginationChange:
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1961
|
+
state: U,
|
|
1962
|
+
onSortingChange: s,
|
|
1963
|
+
onColumnFiltersChange: f,
|
|
1964
|
+
onPaginationChange: p,
|
|
1965
|
+
onColumnVisibilityChange: l,
|
|
1966
|
+
onRowSelectionChange: a,
|
|
1967
|
+
getRowId: g,
|
|
1968
|
+
enableRowSelection: B,
|
|
1969
|
+
getCoreRowModel: Pt(),
|
|
1970
|
+
getPaginationRowModel: Gt(),
|
|
1971
|
+
getSortedRowModel: Lt(),
|
|
1972
|
+
getFilteredRowModel: Ht(),
|
|
1973
|
+
onGlobalFilterChange: d,
|
|
1974
|
+
globalFilterFn: "includesString",
|
|
1975
|
+
autoResetPageIndex: H
|
|
1918
1976
|
});
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1977
|
+
Ae(() => {
|
|
1978
|
+
v?.(A);
|
|
1979
|
+
}, [v, A]);
|
|
1980
|
+
const ye = me(
|
|
1981
|
+
(_, M, F) => _.editComponent === "textarea" ? /* @__PURE__ */ y(
|
|
1982
|
+
qe,
|
|
1922
1983
|
{
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1984
|
+
value: F,
|
|
1985
|
+
placeholder: _.editPlaceholder,
|
|
1986
|
+
className: _.editClassName,
|
|
1987
|
+
onChange: (N) => W(M, N.target.value)
|
|
1988
|
+
}
|
|
1989
|
+
) : /* @__PURE__ */ y(
|
|
1990
|
+
Te,
|
|
1991
|
+
{
|
|
1992
|
+
value: F,
|
|
1993
|
+
placeholder: _.editPlaceholder,
|
|
1994
|
+
className: _.editClassName,
|
|
1995
|
+
onChange: (N) => W(M, N.target.value)
|
|
1996
|
+
}
|
|
1997
|
+
),
|
|
1998
|
+
[W]
|
|
1999
|
+
);
|
|
2000
|
+
return /* @__PURE__ */ y("div", { className: V?.className, children: /* @__PURE__ */ Ge(ze, { className: V?.tableClassName, children: [
|
|
2001
|
+
/* @__PURE__ */ y(Oe, { className: V?.headerClassName, children: A.getHeaderGroups().map((_) => /* @__PURE__ */ y(
|
|
2002
|
+
Y,
|
|
2003
|
+
{
|
|
2004
|
+
className: z(V?.rowClassName, V?.headRowClassName),
|
|
2005
|
+
children: _.headers.map((M) => {
|
|
2006
|
+
const F = he(M.column.columnDef);
|
|
2007
|
+
return /* @__PURE__ */ y(
|
|
2008
|
+
Be,
|
|
2009
|
+
{
|
|
2010
|
+
className: z(
|
|
2011
|
+
F?.className,
|
|
2012
|
+
F?.headClassName,
|
|
2013
|
+
V?.headCellClassName
|
|
2014
|
+
),
|
|
2015
|
+
style: {
|
|
2016
|
+
...F?.style,
|
|
2017
|
+
...F?.headStyle
|
|
2018
|
+
},
|
|
2019
|
+
children: M.isPlaceholder ? null : we(M.column.columnDef.header, M.getContext())
|
|
2020
|
+
},
|
|
2021
|
+
M.id
|
|
2022
|
+
);
|
|
2023
|
+
})
|
|
1932
2024
|
},
|
|
1933
|
-
|
|
2025
|
+
_.id
|
|
1934
2026
|
)) }),
|
|
1935
|
-
/* @__PURE__ */
|
|
1936
|
-
|
|
2027
|
+
/* @__PURE__ */ y(Ne, { children: A.getRowModel().rows.length ? A.getRowModel().rows.map((_) => /* @__PURE__ */ y(
|
|
2028
|
+
Y,
|
|
1937
2029
|
{
|
|
1938
|
-
className:
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
2030
|
+
className: z(
|
|
2031
|
+
V?.rowClassName,
|
|
2032
|
+
V?.bodyRowClassName,
|
|
2033
|
+
h === _.id && V?.editingRowClassName
|
|
2034
|
+
),
|
|
2035
|
+
"data-state": _.getIsSelected() && "selected",
|
|
2036
|
+
clickable: O && h !== _.id,
|
|
2037
|
+
onClick: O && h !== _.id ? () => {
|
|
2038
|
+
qt() || w?.(_.original);
|
|
2039
|
+
} : void 0,
|
|
2040
|
+
children: _.getVisibleCells().map((M) => {
|
|
2041
|
+
const F = he(M.column.columnDef), N = h === _.id, T = Nt(
|
|
2042
|
+
M.column.columnDef,
|
|
2043
|
+
F
|
|
2044
|
+
), Ee = N && F?.editable === !0 && T !== void 0 && $ !== void 0, De = T !== void 0 ? I?.[T] ?? Tt(_.original, T, F) : "", He = Ee ? ye(F, T, De) : null;
|
|
2045
|
+
return /* @__PURE__ */ y(
|
|
2046
|
+
Se,
|
|
2047
|
+
{
|
|
2048
|
+
className: z(
|
|
2049
|
+
F?.className,
|
|
2050
|
+
F?.cellClassName,
|
|
2051
|
+
V?.cellClassName
|
|
2052
|
+
),
|
|
2053
|
+
style: {
|
|
2054
|
+
...F?.style,
|
|
2055
|
+
...F?.cellStyle
|
|
2056
|
+
},
|
|
2057
|
+
children: He ?? we(M.column.columnDef.cell, M.getContext())
|
|
2058
|
+
},
|
|
2059
|
+
M.id
|
|
2060
|
+
);
|
|
2061
|
+
})
|
|
1950
2062
|
},
|
|
1951
|
-
|
|
1952
|
-
)) : /* @__PURE__ */
|
|
1953
|
-
|
|
2063
|
+
_.id
|
|
2064
|
+
)) : /* @__PURE__ */ y(
|
|
2065
|
+
Y,
|
|
1954
2066
|
{
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
2067
|
+
className: z(V?.rowClassName, V?.emptyRowClassName),
|
|
2068
|
+
children: /* @__PURE__ */ y(
|
|
2069
|
+
Se,
|
|
2070
|
+
{
|
|
2071
|
+
colSpan: Math.max(1, A.getVisibleLeafColumns().length),
|
|
2072
|
+
className: z(V?.cellClassName, V?.emptyCellClassName),
|
|
2073
|
+
children: t ?? "No results."
|
|
2074
|
+
}
|
|
2075
|
+
)
|
|
1958
2076
|
}
|
|
1959
|
-
) })
|
|
2077
|
+
) })
|
|
1960
2078
|
] }) });
|
|
1961
2079
|
}
|
|
1962
2080
|
export {
|
|
1963
|
-
|
|
2081
|
+
Qt as BasicTable
|
|
1964
2082
|
};
|
|
1965
2083
|
//# sourceMappingURL=components-basic-table-basic-table.js.map
|