@cube-dev/ui-kit 0.190.1 → 0.190.3
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/CHANGELOG.md +12 -0
- package/dist/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/Button.js +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemActionsWrapper.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +1 -1
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuSection.js +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/styled.js +1 -1
- package/dist/components/actions/actions-run.js +1 -1
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/use-action.js +1 -1
- package/dist/components/actions/use-anchored-menu.js +1 -1
- package/dist/components/actions/use-context-menu.js +1 -1
- package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
- package/dist/components/content/Alert/Alert.js +1 -1
- package/dist/components/content/Alert/use-alert.js +1 -1
- package/dist/components/content/Avatar/Avatar.js +1 -1
- package/dist/components/content/Badge/Badge.js +1 -1
- package/dist/components/content/Card/Card.js +1 -1
- package/dist/components/content/Content.js +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +1 -1
- package/dist/components/content/Divider.js +1 -1
- package/dist/components/content/Footer.js +1 -1
- package/dist/components/content/Header.js +1 -1
- package/dist/components/content/HotKeys/HotKeys.js +1 -1
- package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
- package/dist/components/content/InlineInput/InlineInput.js +1 -1
- package/dist/components/content/Item/Item.d.ts +2 -1
- package/dist/components/content/Item/Item.js +393 -334
- package/dist/components/content/Item/Item.js.map +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +1 -1
- package/dist/components/content/Text.js +1 -1
- package/dist/components/content/TextItem/TextItem.js +1 -1
- package/dist/components/content/Title.js +1 -1
- package/dist/components/content/Tree/Tree.js +1 -1
- package/dist/components/content/Tree/TreeNode.js +1 -1
- package/dist/components/content/Tree/styled.js +1 -1
- package/dist/components/content/Tree/tree-index.js +1 -1
- package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
- package/dist/components/content/Tree/use-load-data.js +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.js +200 -133
- package/dist/components/content/use-auto-tooltip.js.map +1 -1
- package/dist/components/data/DataTable/DataTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +439 -352
- package/dist/components/data/ItemTable/ItemTable.js.map +1 -1
- package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
- package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
- package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
- package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
- package/dist/components/data/ItemTable/use-item-table-column-widths.js +97 -0
- package/dist/components/data/ItemTable/use-item-table-column-widths.js.map +1 -0
- package/dist/components/data/ItemTable/use-item-table-drag-drop.js +144 -0
- package/dist/components/data/ItemTable/use-item-table-drag-drop.js.map +1 -0
- package/dist/components/data/ItemTable/use-item-table-pagination.js +143 -0
- package/dist/components/data/ItemTable/use-item-table-pagination.js.map +1 -0
- package/dist/components/data/ItemTable/use-item-table-selection.js +141 -0
- package/dist/components/data/ItemTable/use-item-table-selection.js.map +1 -0
- package/dist/components/data/ItemTable/use-item-table-sort.js +135 -0
- package/dist/components/data/ItemTable/use-item-table-sort.js.map +1 -0
- package/dist/components/data/ItemTable/use-item-table-tree-model.js +107 -0
- package/dist/components/data/ItemTable/use-item-table-tree-model.js.map +1 -0
- package/dist/components/data/TableBase/ColumnResizer.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableView.js +96 -297
- package/dist/components/data/TableBase/TableView.js.map +1 -1
- package/dist/components/data/TableBase/TreeGridTable.js +142 -0
- package/dist/components/data/TableBase/TreeGridTable.js.map +1 -0
- package/dist/components/data/TableBase/column-header.js +94 -0
- package/dist/components/data/TableBase/column-header.js.map +1 -0
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-styles.js +1 -1
- package/dist/components/data/TableBase/column-tint.js +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/styled.js +3 -2
- package/dist/components/data/TableBase/styled.js.map +1 -1
- package/dist/components/data/TableBase/table-tree.js +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- package/dist/components/data/TableBase/use-column-menu.js +166 -0
- package/dist/components/data/TableBase/use-column-menu.js.map +1 -0
- package/dist/components/data/TableBase/use-column-order.js +1 -1
- package/dist/components/data/TableBase/use-container-width.js +1 -1
- package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
- package/dist/components/data/TableBase/use-scrollability.js +1 -1
- package/dist/components/data/TableBase/use-table-columns.js +1 -1
- package/dist/components/data/TableBase/use-table-search.js +1 -1
- package/dist/components/data/TableBase/use-table-selection.js +1 -1
- package/dist/components/data/TableBase/use-table-sort.js +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +1 -1
- package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
- package/dist/components/fields/Checkbox/Checkbox.js +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ColorInput/ColorInput.js +1 -1
- package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
- package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DatePicker.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/period.js +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
- package/dist/components/fields/ListBox/ListBox.js +1 -1
- package/dist/components/fields/ListBox/optionId.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
- package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/fields/Picker/Picker.js +1 -1
- package/dist/components/fields/RadioGroup/Radio.js +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.js +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +1 -1
- package/dist/components/fields/TagInput/TagInput.js +768 -723
- package/dist/components/fields/TagInput/TagInput.js.map +1 -1
- package/dist/components/fields/TagInput/TagList.js +1 -1
- package/dist/components/fields/TagInput/useActiveOption.js +122 -0
- package/dist/components/fields/TagInput/useActiveOption.js.map +1 -0
- package/dist/components/fields/TagInput/useTagError.js +95 -0
- package/dist/components/fields/TagInput/useTagError.js.map +1 -0
- package/dist/components/fields/TextArea/TextArea.js +1 -1
- package/dist/components/fields/TextInput/TextInput.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.js +1 -1
- package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/fields/TriggerActions.js +1 -1
- package/dist/components/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/channels.js +1 -1
- package/dist/components/fields/color/color.js +1 -1
- package/dist/components/fields/color/context.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/Form/Field.js +1 -1
- package/dist/components/form/Form/Form.js +1 -1
- package/dist/components/form/Form/ModernFormRoot.js +1 -1
- package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
- package/dist/components/form/Form/SubmitError.js +1 -1
- package/dist/components/form/Form/backend.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/modern/actions.js +1 -1
- package/dist/components/form/Form/modern/context.js +1 -1
- package/dist/components/form/Form/modern/controller.js +1 -1
- package/dist/components/form/Form/modern/field-binding.js +1 -1
- package/dist/components/form/Form/modern/field.js +1 -1
- package/dist/components/form/Form/modern/react.js +1 -1
- package/dist/components/form/Form/modern/store.js +1 -1
- package/dist/components/form/Form/modern/validation.js +1 -1
- package/dist/components/form/Form/modern/values.js +1 -1
- package/dist/components/form/Form/reset-unbound-controls.js +1 -1
- package/dist/components/form/Form/use-field/use-field-binding.js +1 -1
- package/dist/components/form/Form/use-field/use-field-props.js +1 -1
- package/dist/components/form/Form/use-field/use-field.js +1 -1
- package/dist/components/form/Form/use-form.js +1 -1
- package/dist/components/form/Form/validation.js +1 -1
- package/dist/components/form/Label.js +1 -1
- package/dist/components/form/legacy-tooltip.js +1 -1
- package/dist/components/form/validation/ValidationIndicator.js +1 -1
- package/dist/components/form/validation/resolve-validation-props.js +1 -1
- package/dist/components/form/validation/use-validation-props.js +1 -1
- package/dist/components/form/wrapper.js +1 -1
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/layout/Board/Board.js +1 -1
- package/dist/components/layout/Board/BoardProvider.js +1 -1
- package/dist/components/layout/Board/BoardResponsive.js +1 -1
- package/dist/components/layout/Board/Widget.js +1 -1
- package/dist/components/layout/Board/WidgetHost.js +1 -1
- package/dist/components/layout/Board/board-context.js +1 -1
- package/dist/components/layout/Board/board-store.js +1 -1
- package/dist/components/layout/Board/grid-core/calculate.js +1 -1
- package/dist/components/layout/Board/grid-core/collision-modes.js +1 -1
- package/dist/components/layout/Board/grid-core/collision.js +1 -1
- package/dist/components/layout/Board/grid-core/compactors.js +1 -1
- package/dist/components/layout/Board/grid-core/constraints.js +1 -1
- package/dist/components/layout/Board/grid-core/group-move.js +1 -1
- package/dist/components/layout/Board/grid-core/layout.js +1 -1
- package/dist/components/layout/Board/grid-core/placement.js +1 -1
- package/dist/components/layout/Board/grid-core/sort.js +1 -1
- package/dist/components/layout/Board/index.js +1 -1
- package/dist/components/layout/Board/responsive-utils.js +1 -1
- package/dist/components/layout/Board/use-board-layout.js +1 -1
- package/dist/components/layout/Board/use-board-registry.js +1 -1
- package/dist/components/layout/Board/use-board-select-modifier-key.js +1 -1
- package/dist/components/layout/Board/use-board-selection.js +1 -1
- package/dist/components/layout/Flex.js +1 -1
- package/dist/components/layout/Flow.js +1 -1
- package/dist/components/layout/Grid.js +1 -1
- package/dist/components/layout/Panel.js +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/popover-placement.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +1 -1
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
- package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
- package/dist/components/other/Calendar/Calendar.js +1 -1
- package/dist/components/other/Calendar/CalendarCell.js +1 -1
- package/dist/components/other/Calendar/CalendarGrid.js +1 -1
- package/dist/components/other/Calendar/CalendarHeader.js +1 -1
- package/dist/components/other/Calendar/CalendarPanel.js +1 -1
- package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
- package/dist/components/other/Calendar/PeriodGrid.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/Calendar/styled.js +1 -1
- package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
- package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
- package/dist/components/overlays/Dialog/Dialog.js +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/dist/components/overlays/Dialog/ModernDialogForm.js +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/default-button-text.js +1 -1
- package/dist/components/overlays/Dialog/use-content-overflow.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
- package/dist/components/overlays/Modal/Modal.js +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/Overlay.js +1 -1
- package/dist/components/overlays/Modal/Popover.js +1 -1
- package/dist/components/overlays/Modal/Tray.js +1 -1
- package/dist/components/overlays/Modal/Underlay.js +1 -1
- package/dist/components/overlays/Notifications/Notification.js +1 -1
- package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
- package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
- package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
- package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
- package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
- package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
- package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
- package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
- package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
- package/dist/components/overlays/Notifications/index.js +1 -1
- package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
- package/dist/components/overlays/Notifications/use-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
- package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
- package/dist/components/overlays/Toast/ToastItem.js +1 -1
- package/dist/components/overlays/Toast/index.js +1 -1
- package/dist/components/overlays/Toast/useProgressToast.js +1 -1
- package/dist/components/overlays/Toast/useToast.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +7 -1
- package/dist/components/overlays/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
- package/dist/components/overlays/Tooltip/context.js +1 -1
- package/dist/components/overlays/Tooltip/split-trigger-props.js +1 -1
- package/dist/components/portal/Portal.js +1 -1
- package/dist/components/portal/PortalProvider.js +1 -1
- package/dist/components/portal/usePortal.js +1 -1
- package/dist/components/shared/DraggableCollection.js +1 -1
- package/dist/components/shared/InvalidIcon.js +1 -1
- package/dist/components/shared/ValidIcon.js +1 -1
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
- package/dist/components/status/Spin/Cube.js +1 -1
- package/dist/components/status/Spin/InternalSpinner.js +1 -1
- package/dist/components/status/Spin/Spin.js +1 -1
- package/dist/components/status/Spin/SpinsContainer.js +1 -1
- package/dist/data/item-themes.js +1 -1
- package/dist/data/themes.js +1 -1
- package/dist/eslint-plugin/defaults.generated.js +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/createFormatter.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +1 -1
- package/dist/i18n/locales/en-US/uikit.js +1 -1
- package/dist/i18n/locales/es-ES/uikit.js +1 -1
- package/dist/i18n/locales/es-MX/uikit.js +1 -1
- package/dist/i18n/locales/fr-FR/uikit.js +1 -1
- package/dist/i18n/locales/it-IT/uikit.js +1 -1
- package/dist/i18n/locales/ja-JP/uikit.js +1 -1
- package/dist/i18n/locales/nb-NO/uikit.js +1 -1
- package/dist/i18n/locales/pt-BR/uikit.js +1 -1
- package/dist/i18n/locales/pt-PT/uikit.js +1 -1
- package/dist/i18n/locales/sv-SE/uikit.js +1 -1
- package/dist/i18n/locales/vi-VN/uikit.js +1 -1
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/useFormatter.js +1 -1
- package/dist/i18n/useI18n.js +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
- package/dist/icons/AdjustmentsIcon.js +1 -1
- package/dist/icons/AiIcon.js +1 -1
- package/dist/icons/AreaChartIcon.js +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js +1 -1
- package/dist/icons/BackwardIcon.js +1 -1
- package/dist/icons/BarChartIcon.js +1 -1
- package/dist/icons/BellFilledIcon.js +1 -1
- package/dist/icons/BellIcon.js +1 -1
- package/dist/icons/BooleanIcon.js +1 -1
- package/dist/icons/CalendarEditIcon.js +1 -1
- package/dist/icons/CalendarIcon.js +1 -1
- package/dist/icons/CaretDownIcon.js +1 -1
- package/dist/icons/CaretUpIcon.js +1 -1
- package/dist/icons/ChartAreaStackedIcon.js +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarGroupedIcon.js +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarLineIcon.js +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js +1 -1
- package/dist/icons/ChartBoxPlotIcon.js +1 -1
- package/dist/icons/ChartBubbleIcon.js +1 -1
- package/dist/icons/ChartDonut2Icon.js +1 -1
- package/dist/icons/ChartFunnelIcon.js +1 -1
- package/dist/icons/ChartHeatmapIcon.js +1 -1
- package/dist/icons/ChartKPIIcon.js +1 -1
- package/dist/icons/ChartPie2Icon.js +1 -1
- package/dist/icons/ChartScatterIcon.js +1 -1
- package/dist/icons/CheckCircleFilledIcon.js +1 -1
- package/dist/icons/CheckCircleIcon.js +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CircleFilledIcon.js +1 -1
- package/dist/icons/ClearIcon.js +1 -1
- package/dist/icons/CloseCircleFilledIcon.js +1 -1
- package/dist/icons/CloseCircleIcon.js +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/CodeIcon.js +1 -1
- package/dist/icons/ColumnTotalIcon.js +1 -1
- package/dist/icons/CopyIcon.js +1 -1
- package/dist/icons/CountIcon.js +1 -1
- package/dist/icons/CubeIcon.js +1 -1
- package/dist/icons/CubePauseIcon.js +1 -1
- package/dist/icons/CubePlayIcon.js +1 -1
- package/dist/icons/CurrencyDollarIcon.js +1 -1
- package/dist/icons/DangerIcon.js +1 -1
- package/dist/icons/DashboardIcon.js +1 -1
- package/dist/icons/DatabaseIcon.js +1 -1
- package/dist/icons/DecimalDecreaseIcon.js +1 -1
- package/dist/icons/DecimalIncreaseIcon.js +1 -1
- package/dist/icons/DirectionIcon.js +1 -1
- package/dist/icons/DonutIcon.js +1 -1
- package/dist/icons/DownIcon.js +1 -1
- package/dist/icons/EditIcon.js +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
- package/dist/icons/ExclamationCircleIcon.js +1 -1
- package/dist/icons/ExclamationIcon.js +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeInvisibleIcon.js +1 -1
- package/dist/icons/FilterIcon.js +1 -1
- package/dist/icons/FolderFilledIcon.js +1 -1
- package/dist/icons/FolderIcon.js +1 -1
- package/dist/icons/FolderOpenFilledIcon.js +1 -1
- package/dist/icons/FolderOpenIcon.js +1 -1
- package/dist/icons/ForwardIcon.js +1 -1
- package/dist/icons/GripVerticalIcon.js +1 -1
- package/dist/icons/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/InfoCircleIcon.js +1 -1
- package/dist/icons/InfoIcon.js +1 -1
- package/dist/icons/KeyIcon.js +1 -1
- package/dist/icons/LeftIcon.js +1 -1
- package/dist/icons/LineChartIcon.js +1 -1
- package/dist/icons/LoadingIcon.js +1 -1
- package/dist/icons/LockFilledIcon.js +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/MoreIcon.js +1 -1
- package/dist/icons/NotAllowedIcon.js +1 -1
- package/dist/icons/Number123Icon.js +1 -1
- package/dist/icons/NumberIcon.js +1 -1
- package/dist/icons/PauseCircleFilledIcon.js +1 -1
- package/dist/icons/PauseCircleIcon.js +1 -1
- package/dist/icons/PauseIcon.js +1 -1
- package/dist/icons/PercentageIcon.js +1 -1
- package/dist/icons/PieChartIcon.js +1 -1
- package/dist/icons/PipetteIcon.js +1 -1
- package/dist/icons/PlayCircleIcon.js +1 -1
- package/dist/icons/PlayIcon.js +1 -1
- package/dist/icons/PlusIcon.js +1 -1
- package/dist/icons/ProgressBarIcon.js +1 -1
- package/dist/icons/ReloadIcon.js +1 -1
- package/dist/icons/ReportIcon.js +1 -1
- package/dist/icons/ReturnIcon.js +1 -1
- package/dist/icons/RightIcon.js +1 -1
- package/dist/icons/RowTotalsIcon.js +1 -1
- package/dist/icons/SchemeIcon.js +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/SemanticQueryIcon.js +1 -1
- package/dist/icons/SettingsIcon.js +1 -1
- package/dist/icons/ShieldFilledIcon.js +1 -1
- package/dist/icons/ShieldIcon.js +1 -1
- package/dist/icons/SlashIcon.js +1 -1
- package/dist/icons/SparklesIcon.js +1 -1
- package/dist/icons/SqlIcon.js +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/StopIcon.js +1 -1
- package/dist/icons/StringIcon.js +1 -1
- package/dist/icons/SubtotalsIcon.js +1 -1
- package/dist/icons/SwitchIcon.js +1 -1
- package/dist/icons/TableIcon.js +1 -1
- package/dist/icons/ThumbsDownIcon.js +1 -1
- package/dist/icons/ThumbsUpIcon.js +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js +1 -1
- package/dist/icons/ThunderboltFilledIcon.js +1 -1
- package/dist/icons/ThunderboltIcon.js +1 -1
- package/dist/icons/TimeIcon.js +1 -1
- package/dist/icons/TrashIcon.js +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UpIcon.js +1 -1
- package/dist/icons/UserGroupIcon.js +1 -1
- package/dist/icons/UserIcon.js +1 -1
- package/dist/icons/UserLockIcon.js +1 -1
- package/dist/icons/ViewIcon.js +1 -1
- package/dist/icons/WarningFilledIcon.js +1 -1
- package/dist/icons/WarningIcon.js +1 -1
- package/dist/icons/wrap-icon.js +1 -1
- package/dist/index.js +1 -1
- package/dist/probe/canonicalize.js +1 -1
- package/dist/probe/css.js +1 -1
- package/dist/probe/index.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/tokens/all-tokens.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/legacy-color.js +1 -1
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +1 -1
- package/dist/tokens/resolve.js +1 -1
- package/dist/tokens/shadows.js +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/typography.js +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/dotize.js +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/disabledProps.js +1 -1
- package/dist/utils/react/escapePropagation.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/programmaticFocus.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/useBufferedValue.js +1 -1
- package/dist/utils/react/useCombinedRefs.js +1 -1
- package/dist/utils/react/useControlledFocusVisible.js +1 -1
- package/dist/utils/react/useEventBus.js +1 -1
- package/dist/utils/react/useId.js +1 -1
- package/dist/utils/react/useIsDarwin.js +1 -1
- package/dist/utils/react/useKeySymbols.js +1 -1
- package/dist/utils/react/useLayoutEffect.js +1 -1
- package/dist/utils/react/useLocalStorage.js +1 -1
- package/dist/utils/react/useMergeStyles.js +1 -1
- package/dist/utils/react/useOverlayEscapeGuard.js +1 -1
- package/dist/utils/react/usePopoverSync.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useScheme.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +2 -2
- package/docs/components/content/Item.md +7 -2
- package/docs/components/overlays/Tooltip.md +1 -1
- package/package.json +3 -1
|
@@ -1,34 +1,32 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.190.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.190.3 | Cube Dev Team */
|
|
2
2
|
import { extractStyles, mergeStyleLayers } from "../../../utils/styles.js";
|
|
3
3
|
import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
|
|
4
|
-
import { useEvent } from "../../../_internal/hooks/use-event.js";
|
|
5
|
-
import { useWarn } from "../../../_internal/hooks/use-warn.js";
|
|
6
4
|
import { useI18n } from "../../../i18n/useI18n.js";
|
|
7
5
|
import { DraggableCollection } from "../../shared/DraggableCollection.js";
|
|
8
|
-
import { clampPage, getPageInfo } from "../../navigation/Pagination/use-pagination.js";
|
|
9
6
|
import { ItemTableFooter } from "./ItemTableFooter.js";
|
|
10
|
-
import {
|
|
7
|
+
import { filterTableTree } from "../TableBase/table-tree.js";
|
|
11
8
|
import { ROW_MENU_COLUMN_KEY, ROW_MENU_COLUMN_WIDTH } from "../TableBase/row-menu.js";
|
|
12
|
-
import {
|
|
13
|
-
import { SELECTION_COLUMN_KEY, SELECTION_COLUMN_WIDTH
|
|
9
|
+
import { getColumnText } from "../TableBase/use-table-columns.js";
|
|
10
|
+
import { SELECTION_COLUMN_KEY, SELECTION_COLUMN_WIDTH } from "../TableBase/use-table-selection.js";
|
|
14
11
|
import { TableView } from "../TableBase/TableView.js";
|
|
15
12
|
import { useContainerWidth } from "../TableBase/use-container-width.js";
|
|
16
|
-
import { compareByColumn, useTableSort } from "../TableBase/use-table-sort.js";
|
|
17
13
|
import { useTableStorage } from "../TableBase/use-table-storage.js";
|
|
18
14
|
import { useTableTreeState } from "../TableBase/use-table-tree-state.js";
|
|
19
15
|
import { matchesTableSearch, useTableSearch } from "../TableBase/use-table-search.js";
|
|
20
16
|
import { ItemTableChromeProvider, ItemTableSearch, ItemTableToolbar } from "./ItemTableToolbar.js";
|
|
21
17
|
import { ItemTableBulkBar } from "./ItemTableBulkBar.js";
|
|
22
|
-
import {
|
|
18
|
+
import { useItemTableColumnWidths } from "./use-item-table-column-widths.js";
|
|
19
|
+
import { useItemTableDragDrop } from "./use-item-table-drag-drop.js";
|
|
20
|
+
import { useItemTablePagination } from "./use-item-table-pagination.js";
|
|
21
|
+
import { useItemTableSelection } from "./use-item-table-selection.js";
|
|
22
|
+
import { useItemTableSort } from "./use-item-table-sort.js";
|
|
23
|
+
import { useItemTableTreeModel } from "./use-item-table-tree-model.js";
|
|
24
|
+
import { c } from "react-compiler-runtime";
|
|
23
25
|
import { CONTAINER_STYLES } from "@tenphi/tasty";
|
|
24
|
-
import { forwardRef,
|
|
26
|
+
import { forwardRef, useRef, useState } from "react";
|
|
25
27
|
import { jsx } from "react/jsx-runtime";
|
|
26
|
-
import { useControlledState } from "@react-stately/utils";
|
|
27
|
-
import { useCollator } from "@react-aria/i18n";
|
|
28
28
|
|
|
29
29
|
//#region src/components/data/ItemTable/ItemTable.tsx
|
|
30
|
-
/** Stable identity, so the uncontrolled default does not change every render. */
|
|
31
|
-
const EMPTY_WIDTHS = {};
|
|
32
30
|
function defaultGetRowKey(rowKey) {
|
|
33
31
|
return (row, index) => {
|
|
34
32
|
const value = row?.[rowKey];
|
|
@@ -36,312 +34,411 @@ function defaultGetRowKey(rowKey) {
|
|
|
36
34
|
};
|
|
37
35
|
}
|
|
38
36
|
function ItemTable(props, ref) {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
const $ = c(132);
|
|
38
|
+
const { data, columns, rowKey: t0, getRowKey, getRowChildren, treeColumnKey, expandedKeys, defaultExpandedKeys, onExpand, isLoading: t1, loadingIndicator: t2, selectionMode, bulkActions, rowLink, onRowAction, rowMenu, rowContextMenu: t3, onRowMenuAction, rowMenuTriggerProps, bulkBarPlacement: t4, bulkBarStyles, selectedKeys: selectedKeysProp, defaultSelectedKeys, onSelectionChange, selectAllMode: t5, isRowSelectable, selectionTooltip, disabledKeys, treeSelectionBehavior: t6, skeletonRowCount: t7, emptyLabel, noResultsLabel, error, isFiltered, toolbar, isSearchable: t8, searchMode: t9, searchPlaceholder, searchValue: searchValueProp, defaultSearchValue, onSearchChange, searchDelay: t10, searchFilter, filters, actions, onRefresh, paginationMode: t11, pageSize: pageSizeProp, defaultPageSize: t12, autoHidePagination: t13, onLoadMore, hasMore, isLoadingMore, loadMoreMargin, storageKey, persist, isReorderable: t14, onReorder, dropOnRow, getItemDragInfo, isResizable: t15, columnWidths: columnWidthsProp, defaultColumnWidths, onColumnResize, columnContextMenu, onColumnMenuAction, columnMenuTriggerProps, columnMenuProps, onPageSizeChange, pageSizeOptions: t16, page: pageProp, defaultPage, onPageChange, total: totalProp, totalPages, hasNextPage, summary: t17, footer, footerStart, footerCenter, footerEnd, sortMode, sort: sortProp, defaultSort, onSortChange, shape: t18, size: t19, rowHeight, headerHeight, isStriped: t20, isHeaderHidden: t21, isHeaderSticky: t22, isAutoHeight: t23, isVirtualized: t24, virtualizeThreshold: t25, overscan: t26, getRowProps, ariaLabel, qa, mods, styles, headerStyles, headerCellStyles, headerPreset: t27, toolbarStyles, searchStyles, footerStyles, bodyStyles, rowStyles, cellStyles, isRowMoveAnimated } = props;
|
|
39
|
+
const rowKey = t0 === void 0 ? "id" : t0;
|
|
40
|
+
const isLoading = t1 === void 0 ? false : t1;
|
|
41
|
+
const loadingIndicator = t2 === void 0 ? "overlay" : t2;
|
|
42
|
+
const rowContextMenu = t3 === void 0 ? false : t3;
|
|
43
|
+
const bulkBarPlacement = t4 === void 0 ? "floating" : t4;
|
|
44
|
+
const selectAllMode = t5 === void 0 ? "page" : t5;
|
|
45
|
+
const treeSelectionBehavior = t6 === void 0 ? "cascade" : t6;
|
|
46
|
+
const skeletonRowCount = t7 === void 0 ? 6 : t7;
|
|
47
|
+
const isSearchable = t8 === void 0 ? false : t8;
|
|
48
|
+
const searchMode = t9 === void 0 ? "client" : t9;
|
|
49
|
+
const searchDelay = t10 === void 0 ? 500 : t10;
|
|
50
|
+
const paginationMode = t11 === void 0 ? "client" : t11;
|
|
51
|
+
const defaultPageSize = t12 === void 0 ? 50 : t12;
|
|
52
|
+
const autoHidePagination = t13 === void 0 ? true : t13;
|
|
53
|
+
const isReorderable = t14 === void 0 ? false : t14;
|
|
54
|
+
const isResizable = t15 === void 0 ? false : t15;
|
|
55
|
+
let t28;
|
|
56
|
+
if ($[0] !== t16) {
|
|
57
|
+
t28 = t16 === void 0 ? [
|
|
58
|
+
10,
|
|
59
|
+
20,
|
|
60
|
+
50,
|
|
61
|
+
100,
|
|
62
|
+
500
|
|
63
|
+
] : t16;
|
|
64
|
+
$[0] = t16;
|
|
65
|
+
$[1] = t28;
|
|
66
|
+
} else t28 = $[1];
|
|
67
|
+
const pageSizeOptions = t28;
|
|
68
|
+
const summary = t17 === void 0 ? true : t17;
|
|
69
|
+
const shape = t18 === void 0 ? "plain" : t18;
|
|
70
|
+
const size = t19 === void 0 ? "medium" : t19;
|
|
71
|
+
const isStriped = t20 === void 0 ? false : t20;
|
|
72
|
+
const isHeaderHidden = t21 === void 0 ? false : t21;
|
|
73
|
+
const isHeaderSticky = t22 === void 0 ? true : t22;
|
|
74
|
+
const isAutoHeight = t23 === void 0 ? false : t23;
|
|
75
|
+
const isVirtualized = t24 === void 0 ? "auto" : t24;
|
|
76
|
+
const virtualizeThreshold = t25 === void 0 ? 50 : t25;
|
|
77
|
+
const overscan = t26 === void 0 ? 20 : t26;
|
|
78
|
+
const headerPreset = t27 === void 0 ? "c3" : t27;
|
|
46
79
|
const { t } = useI18n();
|
|
47
80
|
const rootRef = useCombinedRefs(ref, useRef(null));
|
|
48
81
|
const [scrollerEl, setScrollerEl] = useState(null);
|
|
49
82
|
const containerWidth = useContainerWidth(scrollerEl);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
]
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
columns,
|
|
76
|
-
treeColumnKey
|
|
77
|
-
]);
|
|
78
|
-
useWarn(treeModel != null && treeColumnKey != null && resolvedTreeColumnKey !== treeColumnKey, {
|
|
79
|
-
key: ["item-table-tree-column-invalid", treeColumnKey],
|
|
80
|
-
args: ["ItemTable:", "`treeColumnKey` must identify a visible data column. Falling back to the first visible column."]
|
|
81
|
-
});
|
|
82
|
-
const { searchValue, setSearchValue, searchedRows, query, isFiltered: isSearching } = useTableSearch({
|
|
83
|
-
columns,
|
|
84
|
-
rows: data,
|
|
85
|
-
mode: treeModel ? "server" : searchMode,
|
|
86
|
-
value: searchValueProp,
|
|
87
|
-
defaultValue: defaultSearchValue,
|
|
88
|
-
onChange: onSearchChange,
|
|
89
|
-
delay: searchDelay,
|
|
90
|
-
filter: searchFilter
|
|
91
|
-
});
|
|
92
|
-
const searchedTree = useMemo(() => {
|
|
93
|
-
if (!treeModel) return null;
|
|
94
|
-
if (searchMode !== "client" || !query) return {
|
|
95
|
-
roots: treeModel.roots,
|
|
96
|
-
forcedExpandedKeys: /* @__PURE__ */ new Set()
|
|
83
|
+
let t29;
|
|
84
|
+
if ($[2] !== props || $[3] !== styles) {
|
|
85
|
+
t29 = mergeStyleLayers(extractStyles(props, CONTAINER_STYLES), styles);
|
|
86
|
+
$[2] = props;
|
|
87
|
+
$[3] = styles;
|
|
88
|
+
$[4] = t29;
|
|
89
|
+
} else t29 = $[4];
|
|
90
|
+
const rootStyles = t29;
|
|
91
|
+
let t30;
|
|
92
|
+
if ($[5] !== getRowKey || $[6] !== rowKey) {
|
|
93
|
+
t30 = getRowKey ?? defaultGetRowKey(rowKey);
|
|
94
|
+
$[5] = getRowKey;
|
|
95
|
+
$[6] = rowKey;
|
|
96
|
+
$[7] = t30;
|
|
97
|
+
} else t30 = $[7];
|
|
98
|
+
const resolvedGetRowKey = t30;
|
|
99
|
+
let t31;
|
|
100
|
+
if ($[8] !== columns || $[9] !== data || $[10] !== getRowChildren || $[11] !== isReorderable || $[12] !== resolvedGetRowKey || $[13] !== treeColumnKey) {
|
|
101
|
+
t31 = {
|
|
102
|
+
data,
|
|
103
|
+
columns,
|
|
104
|
+
getRowKey: resolvedGetRowKey,
|
|
105
|
+
getRowChildren,
|
|
106
|
+
treeColumnKey,
|
|
107
|
+
isReorderable
|
|
97
108
|
};
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
]
|
|
109
|
+
$[8] = columns;
|
|
110
|
+
$[9] = data;
|
|
111
|
+
$[10] = getRowChildren;
|
|
112
|
+
$[11] = isReorderable;
|
|
113
|
+
$[12] = resolvedGetRowKey;
|
|
114
|
+
$[13] = treeColumnKey;
|
|
115
|
+
$[14] = t31;
|
|
116
|
+
} else t31 = $[14];
|
|
117
|
+
const { treeModel, treeColumnKey: resolvedTreeColumnKey } = useItemTableTreeModel(t31);
|
|
118
|
+
const t32 = treeModel ? "server" : searchMode;
|
|
119
|
+
let t33;
|
|
120
|
+
if ($[15] !== columns || $[16] !== data || $[17] !== defaultSearchValue || $[18] !== onSearchChange || $[19] !== searchDelay || $[20] !== searchFilter || $[21] !== searchValueProp || $[22] !== t32) {
|
|
121
|
+
t33 = {
|
|
122
|
+
columns,
|
|
123
|
+
rows: data,
|
|
124
|
+
mode: t32,
|
|
125
|
+
value: searchValueProp,
|
|
126
|
+
defaultValue: defaultSearchValue,
|
|
127
|
+
onChange: onSearchChange,
|
|
128
|
+
delay: searchDelay,
|
|
129
|
+
filter: searchFilter
|
|
130
|
+
};
|
|
131
|
+
$[15] = columns;
|
|
132
|
+
$[16] = data;
|
|
133
|
+
$[17] = defaultSearchValue;
|
|
134
|
+
$[18] = onSearchChange;
|
|
135
|
+
$[19] = searchDelay;
|
|
136
|
+
$[20] = searchFilter;
|
|
137
|
+
$[21] = searchValueProp;
|
|
138
|
+
$[22] = t32;
|
|
139
|
+
$[23] = t33;
|
|
140
|
+
} else t33 = $[23];
|
|
141
|
+
const { searchValue, setSearchValue, searchedRows, query, isFiltered: isSearching } = useTableSearch(t33);
|
|
142
|
+
let t34;
|
|
143
|
+
bb0: {
|
|
144
|
+
if (!treeModel) {
|
|
145
|
+
t34 = null;
|
|
146
|
+
break bb0;
|
|
147
|
+
}
|
|
148
|
+
if (searchMode !== "client" || !query) {
|
|
149
|
+
let t35;
|
|
150
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
151
|
+
t35 = /* @__PURE__ */ new Set();
|
|
152
|
+
$[24] = t35;
|
|
153
|
+
} else t35 = $[24];
|
|
154
|
+
let t36;
|
|
155
|
+
if ($[25] !== treeModel.roots) {
|
|
156
|
+
t36 = {
|
|
157
|
+
roots: treeModel.roots,
|
|
158
|
+
forcedExpandedKeys: t35
|
|
159
|
+
};
|
|
160
|
+
$[25] = treeModel.roots;
|
|
161
|
+
$[26] = t36;
|
|
162
|
+
} else t36 = $[26];
|
|
163
|
+
t34 = t36;
|
|
164
|
+
break bb0;
|
|
165
|
+
}
|
|
166
|
+
let t35;
|
|
167
|
+
if ($[27] !== columns || $[28] !== query || $[29] !== searchFilter) {
|
|
168
|
+
t35 = (node) => searchFilter ? searchFilter(node.row, query) : matchesTableSearch(columns, node.row, node.sourceIndex, query);
|
|
169
|
+
$[27] = columns;
|
|
170
|
+
$[28] = query;
|
|
171
|
+
$[29] = searchFilter;
|
|
172
|
+
$[30] = t35;
|
|
173
|
+
} else t35 = $[30];
|
|
174
|
+
let t36;
|
|
175
|
+
if ($[31] !== t35 || $[32] !== treeModel.roots) {
|
|
176
|
+
t36 = filterTableTree(treeModel.roots, t35);
|
|
177
|
+
$[31] = t35;
|
|
178
|
+
$[32] = treeModel.roots;
|
|
179
|
+
$[33] = t36;
|
|
180
|
+
} else t36 = $[33];
|
|
181
|
+
t34 = t36;
|
|
182
|
+
}
|
|
183
|
+
const searchedTree = t34;
|
|
106
184
|
const storage = useTableStorage(storageKey, persist);
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const collator = useCollator({
|
|
119
|
-
numeric: true,
|
|
120
|
-
sensitivity: "base"
|
|
121
|
-
});
|
|
122
|
-
const treeSortMode = treeModel ? sortMode ?? (columns.some((column_1) => column_1.isSortable) ? "client" : "off") : resolvedSortMode;
|
|
123
|
-
const processedTreeRoots = useMemo(() => {
|
|
124
|
-
const roots = searchedTree?.roots ?? [];
|
|
125
|
-
if (treeSortMode !== "client" || !sort) return roots;
|
|
126
|
-
const column_2 = columns.find((entry) => entry.key === sort.columnKey);
|
|
127
|
-
if (!column_2) return roots;
|
|
128
|
-
return sortTableTree(roots, (a, b) => {
|
|
129
|
-
return compareByColumn(column_2, collator, a.row, a.sourceIndex, b.row, b.sourceIndex) * (sort.direction === "asc" ? 1 : -1);
|
|
130
|
-
});
|
|
131
|
-
}, [
|
|
132
|
-
searchedTree,
|
|
133
|
-
treeSortMode,
|
|
134
|
-
sort,
|
|
135
|
-
columns,
|
|
136
|
-
collator
|
|
137
|
-
]);
|
|
138
|
-
const [pageSize, setPageSizeState] = useControlledState(pageSizeProp, pageSizeProp === void 0 && storage.has("pageSize") ? storage.initial.pageSize ?? defaultPageSize : defaultPageSize, onPageSizeChange);
|
|
139
|
-
const [page, setPageState] = useControlledState(pageProp, defaultPage ?? 1, onPageChange);
|
|
140
|
-
const isInfinite = paginationMode === "infinite";
|
|
141
|
-
const isPaginated = paginationMode !== "off" && !isInfinite;
|
|
142
|
-
const isServerPaginated = paginationMode === "server";
|
|
143
|
-
const total = isServerPaginated ? totalProp ?? 0 : treeModel ? processedTreeRoots.length : sortedRows.length;
|
|
144
|
-
const pageInfo = getPageInfo({
|
|
145
|
-
page,
|
|
146
|
-
pageSize,
|
|
147
|
-
total,
|
|
148
|
-
totalPages: isServerPaginated ? totalPages : void 0
|
|
149
|
-
});
|
|
150
|
-
const setPage = useEvent((next_0) => setPageState(clampPage(next_0, pageInfo.totalPages)));
|
|
151
|
-
const setPageSize = useEvent((next_1) => {
|
|
152
|
-
setPageSizeState(next_1);
|
|
153
|
-
if (pageSizeProp === void 0) storage.write({ pageSize: next_1 });
|
|
154
|
-
setPageState(1);
|
|
155
|
-
});
|
|
156
|
-
const flatVisibleRows = paginationMode === "client" ? sortedRows.slice((pageInfo.page - 1) * pageSize, pageInfo.page * pageSize) : sortedRows;
|
|
157
|
-
const pageTreeRoots = useMemo(() => reindexTableTree(paginationMode === "client" ? processedTreeRoots.slice((pageInfo.page - 1) * pageSize, pageInfo.page * pageSize) : processedTreeRoots), [
|
|
158
|
-
processedTreeRoots,
|
|
159
|
-
paginationMode,
|
|
160
|
-
pageInfo.page,
|
|
161
|
-
pageSize
|
|
162
|
-
]);
|
|
163
|
-
const treeState = useTableTreeState({
|
|
164
|
-
roots: pageTreeRoots,
|
|
165
|
-
allNodesByKey: treeModel?.byKey ?? /* @__PURE__ */ new Map(),
|
|
166
|
-
expandedKeys,
|
|
167
|
-
defaultExpandedKeys,
|
|
168
|
-
forcedExpandedKeys: searchedTree?.forcedExpandedKeys,
|
|
169
|
-
disabledKeys,
|
|
170
|
-
getTextValue: (node_1) => {
|
|
171
|
-
const column_3 = columns.find((entry_0) => entry_0.key === resolvedTreeColumnKey);
|
|
172
|
-
return column_3 ? getColumnText(column_3, node_1.row, node_1.sourceIndex) ?? String(node_1.key) : String(node_1.key);
|
|
173
|
-
},
|
|
174
|
-
onExpand,
|
|
175
|
-
ariaLabel
|
|
176
|
-
});
|
|
177
|
-
const visibleTreeEntries = treeModel ? treeState.visibleEntries : [];
|
|
178
|
-
const visibleRows = treeModel ? visibleTreeEntries.map((entry_1) => entry_1.row) : flatVisibleRows;
|
|
179
|
-
const visibleRowKeys = treeModel ? visibleTreeEntries.map((entry_2) => entry_2.key) : void 0;
|
|
180
|
-
const pageTreeEntries = treeModel ? flattenTableTree(pageTreeRoots) : [];
|
|
181
|
-
const filteredTreeEntries = treeModel ? flattenTableTree(processedTreeRoots) : [];
|
|
182
|
-
const selectionTree = useMemo(() => {
|
|
183
|
-
if (!treeModel) return void 0;
|
|
184
|
-
const childrenOf = /* @__PURE__ */ new Map();
|
|
185
|
-
const parentOf = /* @__PURE__ */ new Map();
|
|
186
|
-
flattenTableTree(processedTreeRoots).forEach((node_2) => {
|
|
187
|
-
childrenOf.set(node_2.key, node_2.children.map((child) => child.key));
|
|
188
|
-
parentOf.set(node_2.key, node_2.parentKey);
|
|
189
|
-
});
|
|
190
|
-
return {
|
|
191
|
-
rootKeys: processedTreeRoots.map((node_3) => node_3.key),
|
|
192
|
-
childrenOf,
|
|
193
|
-
parentOf,
|
|
194
|
-
behavior: treeSelectionBehavior
|
|
185
|
+
let t35;
|
|
186
|
+
if ($[34] !== columns || $[35] !== defaultSort || $[36] !== onSortChange || $[37] !== searchedRows || $[38] !== searchedTree || $[39] !== sortMode || $[40] !== sortProp || $[41] !== storage) {
|
|
187
|
+
t35 = {
|
|
188
|
+
columns,
|
|
189
|
+
rows: searchedRows,
|
|
190
|
+
tree: searchedTree,
|
|
191
|
+
mode: sortMode,
|
|
192
|
+
sort: sortProp,
|
|
193
|
+
defaultSort,
|
|
194
|
+
onSortChange,
|
|
195
|
+
storage
|
|
195
196
|
};
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
197
|
+
$[34] = columns;
|
|
198
|
+
$[35] = defaultSort;
|
|
199
|
+
$[36] = onSortChange;
|
|
200
|
+
$[37] = searchedRows;
|
|
201
|
+
$[38] = searchedTree;
|
|
202
|
+
$[39] = sortMode;
|
|
203
|
+
$[40] = sortProp;
|
|
204
|
+
$[41] = storage;
|
|
205
|
+
$[42] = t35;
|
|
206
|
+
} else t35 = $[42];
|
|
207
|
+
const { sort, sortedRows, sortedTreeRoots, mode: resolvedSortMode, toggleSort, setColumnSort } = useItemTableSort(t35);
|
|
208
|
+
const t36 = treeModel != null;
|
|
209
|
+
let t37;
|
|
210
|
+
if ($[43] !== autoHidePagination || $[44] !== defaultPage || $[45] !== defaultPageSize || $[46] !== hasNextPage || $[47] !== onPageChange || $[48] !== onPageSizeChange || $[49] !== pageProp || $[50] !== pageSizeOptions || $[51] !== pageSizeProp || $[52] !== paginationMode || $[53] !== sortedRows || $[54] !== sortedTreeRoots || $[55] !== storage || $[56] !== summary || $[57] !== t36 || $[58] !== totalPages || $[59] !== totalProp) {
|
|
211
|
+
t37 = {
|
|
212
|
+
mode: paginationMode,
|
|
213
|
+
rows: sortedRows,
|
|
214
|
+
treeRoots: sortedTreeRoots,
|
|
215
|
+
isTree: t36,
|
|
216
|
+
pageSize: pageSizeProp,
|
|
217
|
+
defaultPageSize,
|
|
218
|
+
onPageSizeChange,
|
|
219
|
+
pageSizeOptions,
|
|
220
|
+
page: pageProp,
|
|
221
|
+
defaultPage,
|
|
222
|
+
onPageChange,
|
|
223
|
+
total: totalProp,
|
|
224
|
+
totalPages,
|
|
225
|
+
hasNextPage,
|
|
226
|
+
summary,
|
|
227
|
+
autoHide: autoHidePagination,
|
|
228
|
+
storage
|
|
229
|
+
};
|
|
230
|
+
$[43] = autoHidePagination;
|
|
231
|
+
$[44] = defaultPage;
|
|
232
|
+
$[45] = defaultPageSize;
|
|
233
|
+
$[46] = hasNextPage;
|
|
234
|
+
$[47] = onPageChange;
|
|
235
|
+
$[48] = onPageSizeChange;
|
|
236
|
+
$[49] = pageProp;
|
|
237
|
+
$[50] = pageSizeOptions;
|
|
238
|
+
$[51] = pageSizeProp;
|
|
239
|
+
$[52] = paginationMode;
|
|
240
|
+
$[53] = sortedRows;
|
|
241
|
+
$[54] = sortedTreeRoots;
|
|
242
|
+
$[55] = storage;
|
|
243
|
+
$[56] = summary;
|
|
244
|
+
$[57] = t36;
|
|
245
|
+
$[58] = totalPages;
|
|
246
|
+
$[59] = totalProp;
|
|
247
|
+
$[60] = t37;
|
|
248
|
+
} else t37 = $[60];
|
|
249
|
+
const pagination = useItemTablePagination(t37);
|
|
250
|
+
let t38;
|
|
251
|
+
if ($[61] !== treeModel?.byKey) {
|
|
252
|
+
t38 = treeModel?.byKey ?? /* @__PURE__ */ new Map();
|
|
253
|
+
$[61] = treeModel?.byKey;
|
|
254
|
+
$[62] = t38;
|
|
255
|
+
} else t38 = $[62];
|
|
256
|
+
const t39 = searchedTree?.forcedExpandedKeys;
|
|
257
|
+
let t40;
|
|
258
|
+
if ($[63] !== columns || $[64] !== resolvedTreeColumnKey) {
|
|
259
|
+
t40 = (node_0) => {
|
|
260
|
+
const column = columns.find((entry) => entry.key === resolvedTreeColumnKey);
|
|
261
|
+
return column ? getColumnText(column, node_0.row, node_0.sourceIndex) ?? String(node_0.key) : String(node_0.key);
|
|
262
|
+
};
|
|
263
|
+
$[63] = columns;
|
|
264
|
+
$[64] = resolvedTreeColumnKey;
|
|
265
|
+
$[65] = t40;
|
|
266
|
+
} else t40 = $[65];
|
|
267
|
+
let t41;
|
|
268
|
+
if ($[66] !== ariaLabel || $[67] !== defaultExpandedKeys || $[68] !== disabledKeys || $[69] !== expandedKeys || $[70] !== onExpand || $[71] !== pagination.pageTreeRoots || $[72] !== t38 || $[73] !== t39 || $[74] !== t40) {
|
|
269
|
+
t41 = {
|
|
270
|
+
roots: pagination.pageTreeRoots,
|
|
271
|
+
allNodesByKey: t38,
|
|
272
|
+
expandedKeys,
|
|
273
|
+
defaultExpandedKeys,
|
|
274
|
+
forcedExpandedKeys: t39,
|
|
275
|
+
disabledKeys,
|
|
276
|
+
getTextValue: t40,
|
|
277
|
+
onExpand,
|
|
278
|
+
ariaLabel
|
|
279
|
+
};
|
|
280
|
+
$[66] = ariaLabel;
|
|
281
|
+
$[67] = defaultExpandedKeys;
|
|
282
|
+
$[68] = disabledKeys;
|
|
283
|
+
$[69] = expandedKeys;
|
|
284
|
+
$[70] = onExpand;
|
|
285
|
+
$[71] = pagination.pageTreeRoots;
|
|
286
|
+
$[72] = t38;
|
|
287
|
+
$[73] = t39;
|
|
288
|
+
$[74] = t40;
|
|
289
|
+
$[75] = t41;
|
|
290
|
+
} else t41 = $[75];
|
|
291
|
+
const treeState = useTableTreeState(t41);
|
|
292
|
+
const visibleTreeEntries = treeModel ? treeState.visibleEntries : [];
|
|
293
|
+
const visibleRows = treeModel ? visibleTreeEntries.map(_temp) : pagination.pageRows;
|
|
294
|
+
const visibleRowKeys = treeModel ? visibleTreeEntries.map(_temp2) : void 0;
|
|
295
|
+
const selection = useItemTableSelection({
|
|
203
296
|
rows: visibleRows,
|
|
204
297
|
rowKeys: visibleRowKeys,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
298
|
+
sortedRows,
|
|
299
|
+
isTree: treeModel != null,
|
|
300
|
+
sortedTreeRoots,
|
|
301
|
+
pageTreeRoots: pagination.pageTreeRoots,
|
|
302
|
+
paginationMode,
|
|
209
303
|
getRowKey: resolvedGetRowKey,
|
|
210
|
-
selectionMode
|
|
304
|
+
selectionMode,
|
|
305
|
+
bulkActions,
|
|
211
306
|
selectedKeys: selectedKeysProp,
|
|
212
307
|
defaultSelectedKeys,
|
|
213
308
|
onSelectionChange,
|
|
214
309
|
selectAllMode,
|
|
215
310
|
isRowSelectable,
|
|
216
311
|
disabledKeys,
|
|
217
|
-
|
|
312
|
+
treeSelectionBehavior
|
|
218
313
|
});
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
314
|
+
let t42;
|
|
315
|
+
if ($[76] !== rowMenu) {
|
|
316
|
+
t42 = rowMenu == null ? void 0 : typeof rowMenu === "function" ? rowMenu : () => rowMenu;
|
|
317
|
+
$[76] = rowMenu;
|
|
318
|
+
$[77] = t42;
|
|
319
|
+
} else t42 = $[77];
|
|
320
|
+
const resolveRowMenu = t42;
|
|
321
|
+
let t43;
|
|
322
|
+
if ($[78] !== resolveRowMenu || $[79] !== rowContextMenu || $[80] !== size) {
|
|
323
|
+
t43 = resolveRowMenu && rowContextMenu === true ? [{
|
|
324
|
+
key: ROW_MENU_COLUMN_KEY,
|
|
325
|
+
width: ROW_MENU_COLUMN_WIDTH[size] ?? ROW_MENU_COLUMN_WIDTH.medium,
|
|
326
|
+
align: "center"
|
|
327
|
+
}] : void 0;
|
|
328
|
+
$[78] = resolveRowMenu;
|
|
329
|
+
$[79] = rowContextMenu;
|
|
330
|
+
$[80] = size;
|
|
331
|
+
$[81] = t43;
|
|
332
|
+
} else t43 = $[81];
|
|
333
|
+
const trailingColumns = t43;
|
|
334
|
+
let t44;
|
|
335
|
+
if ($[82] !== selection.isEnabled || $[83] !== size) {
|
|
336
|
+
t44 = selection.isEnabled ? [{
|
|
337
|
+
key: SELECTION_COLUMN_KEY,
|
|
338
|
+
width: SELECTION_COLUMN_WIDTH[size] ?? SELECTION_COLUMN_WIDTH.medium,
|
|
339
|
+
align: "center"
|
|
340
|
+
}] : void 0;
|
|
341
|
+
$[82] = selection.isEnabled;
|
|
342
|
+
$[83] = size;
|
|
343
|
+
$[84] = t44;
|
|
344
|
+
} else t44 = $[84];
|
|
345
|
+
const leadingColumns = t44;
|
|
346
|
+
let t45;
|
|
347
|
+
if ($[85] !== columnWidthsProp || $[86] !== columns || $[87] !== containerWidth || $[88] !== defaultColumnWidths || $[89] !== leadingColumns || $[90] !== onColumnResize || $[91] !== storage || $[92] !== trailingColumns) {
|
|
348
|
+
t45 = {
|
|
349
|
+
columns,
|
|
350
|
+
containerWidth,
|
|
351
|
+
leadingColumns,
|
|
352
|
+
trailingColumns,
|
|
353
|
+
columnWidths: columnWidthsProp,
|
|
354
|
+
defaultColumnWidths,
|
|
355
|
+
onColumnResize,
|
|
356
|
+
storage
|
|
261
357
|
};
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}
|
|
358
|
+
$[85] = columnWidthsProp;
|
|
359
|
+
$[86] = columns;
|
|
360
|
+
$[87] = containerWidth;
|
|
361
|
+
$[88] = defaultColumnWidths;
|
|
362
|
+
$[89] = leadingColumns;
|
|
363
|
+
$[90] = onColumnResize;
|
|
364
|
+
$[91] = storage;
|
|
365
|
+
$[92] = trailingColumns;
|
|
366
|
+
$[93] = t45;
|
|
367
|
+
} else t45 = $[93];
|
|
368
|
+
const { layout, handleColumnResize, handleColumnResizeEnd } = useItemTableColumnWidths(t45);
|
|
369
|
+
const hasBulkSelection = bulkActions != null && bulkActions.length > 0 && selection.selectedCount > 0;
|
|
370
|
+
let t46;
|
|
371
|
+
if ($[94] !== bulkActions || $[95] !== bulkBarPlacement || $[96] !== bulkBarStyles || $[97] !== hasBulkSelection) {
|
|
372
|
+
t46 = hasBulkSelection ? /* @__PURE__ */ jsx(ItemTableBulkBar, {
|
|
373
|
+
actions: bulkActions,
|
|
374
|
+
placement: bulkBarPlacement,
|
|
375
|
+
styles: bulkBarStyles
|
|
376
|
+
}) : null;
|
|
377
|
+
$[94] = bulkActions;
|
|
378
|
+
$[95] = bulkBarPlacement;
|
|
379
|
+
$[96] = bulkBarStyles;
|
|
380
|
+
$[97] = hasBulkSelection;
|
|
381
|
+
$[98] = t46;
|
|
382
|
+
} else t46 = $[98];
|
|
383
|
+
const bulkBar = t46;
|
|
287
384
|
const isBulkBarInToolbar = bulkBar != null && bulkBarPlacement === "toolbar";
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
385
|
+
const hasToolbar = toolbar !== void 0 || isSearchable || filters != null || actions != null || onRefresh != null || isBulkBarInToolbar;
|
|
386
|
+
let t47;
|
|
387
|
+
if ($[99] !== actions || $[100] !== bulkBar || $[101] !== filters || $[102] !== hasToolbar || $[103] !== isBulkBarInToolbar || $[104] !== isLoading || $[105] !== isSearchable || $[106] !== onRefresh || $[107] !== searchStyles || $[108] !== toolbar || $[109] !== toolbarStyles) {
|
|
388
|
+
t47 = hasToolbar ? toolbar ?? /* @__PURE__ */ jsx(ItemTableToolbar, {
|
|
389
|
+
isSearchable,
|
|
390
|
+
filters,
|
|
391
|
+
actions: isBulkBarInToolbar ? bulkBar : actions,
|
|
392
|
+
isLoading,
|
|
393
|
+
styles: toolbarStyles,
|
|
394
|
+
searchStyles,
|
|
395
|
+
onRefresh
|
|
396
|
+
}) : null;
|
|
397
|
+
$[99] = actions;
|
|
398
|
+
$[100] = bulkBar;
|
|
399
|
+
$[101] = filters;
|
|
400
|
+
$[102] = hasToolbar;
|
|
401
|
+
$[103] = isBulkBarInToolbar;
|
|
402
|
+
$[104] = isLoading;
|
|
403
|
+
$[105] = isSearchable;
|
|
404
|
+
$[106] = onRefresh;
|
|
405
|
+
$[107] = searchStyles;
|
|
406
|
+
$[108] = toolbar;
|
|
407
|
+
$[109] = toolbarStyles;
|
|
408
|
+
$[110] = t47;
|
|
409
|
+
} else t47 = $[110];
|
|
410
|
+
const toolbarNode = t47;
|
|
411
|
+
const hasFooter = footer !== void 0 || pagination.control != null || footerStart != null || footerCenter != null || footerEnd != null;
|
|
412
|
+
let t48;
|
|
413
|
+
if ($[111] !== footer || $[112] !== footerCenter || $[113] !== footerEnd || $[114] !== footerStart || $[115] !== footerStyles || $[116] !== hasFooter || $[117] !== pagination.control) {
|
|
414
|
+
t48 = hasFooter ? footer ?? /* @__PURE__ */ jsx(ItemTableFooter, {
|
|
415
|
+
start: footerStart,
|
|
416
|
+
center: footerCenter,
|
|
417
|
+
end: footerEnd,
|
|
418
|
+
styles: footerStyles,
|
|
419
|
+
pagination: pagination.control
|
|
420
|
+
}) : null;
|
|
421
|
+
$[111] = footer;
|
|
422
|
+
$[112] = footerCenter;
|
|
423
|
+
$[113] = footerEnd;
|
|
424
|
+
$[114] = footerStart;
|
|
425
|
+
$[115] = footerStyles;
|
|
426
|
+
$[116] = hasFooter;
|
|
427
|
+
$[117] = pagination.control;
|
|
428
|
+
$[118] = t48;
|
|
429
|
+
} else t48 = $[118];
|
|
430
|
+
const footerNode = t48;
|
|
326
431
|
const bodyRef = useRef(null);
|
|
327
|
-
const
|
|
328
|
-
visibleRows,
|
|
329
|
-
visibleRowKeys,
|
|
330
|
-
resolvedGetRowKey
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
432
|
+
const drag = useItemTableDragDrop({
|
|
433
|
+
rows: visibleRows,
|
|
434
|
+
rowKeys: visibleRowKeys,
|
|
435
|
+
getRowKey: resolvedGetRowKey,
|
|
436
|
+
treeModel,
|
|
437
|
+
isReorderable,
|
|
438
|
+
onReorder,
|
|
439
|
+
dropOnRow,
|
|
440
|
+
getItemDragInfo
|
|
335
441
|
});
|
|
336
|
-
/**
|
|
337
|
-
* `DraggableCollection` owns the React Aria drag/drop hooks and hands the two
|
|
338
|
-
* states down. It is only mounted when reordering is on, so a plain table
|
|
339
|
-
* pays nothing for it.
|
|
340
|
-
*
|
|
341
|
-
* `RowCollection` and the `SelectionManager` from `useTableSelection` satisfy
|
|
342
|
-
* its structural `state` contract unchanged — both exist even when selection
|
|
343
|
-
* itself is off.
|
|
344
|
-
*/
|
|
345
442
|
const renderTable = (dragState, dropState, collectionProps) => /* @__PURE__ */ jsx(TableView, {
|
|
346
443
|
rootRef,
|
|
347
444
|
dragState,
|
|
@@ -351,8 +448,8 @@ function ItemTable(props, ref) {
|
|
|
351
448
|
qa: qa || "ItemTable",
|
|
352
449
|
rows: visibleRows,
|
|
353
450
|
rowKeys: visibleRowKeys,
|
|
354
|
-
rowIndexOffset: treeModel ? 0 : isPaginated ? (
|
|
355
|
-
totalRowCount: treeModel ? visibleRows.length : total,
|
|
451
|
+
rowIndexOffset: treeModel ? 0 : pagination.isPaginated ? (pagination.page - 1) * pagination.pageSize : 0,
|
|
452
|
+
totalRowCount: treeModel ? visibleRows.length : pagination.total,
|
|
356
453
|
getRowKey: resolvedGetRowKey,
|
|
357
454
|
layout,
|
|
358
455
|
onScrollerRef: setScrollerEl,
|
|
@@ -374,11 +471,11 @@ function ItemTable(props, ref) {
|
|
|
374
471
|
selectionTooltip,
|
|
375
472
|
rowLink,
|
|
376
473
|
onRowAction,
|
|
377
|
-
onLoadMore: isInfinite ? onLoadMore : void 0,
|
|
474
|
+
onLoadMore: pagination.isInfinite ? onLoadMore : void 0,
|
|
378
475
|
hasMore,
|
|
379
476
|
isLoadingMore,
|
|
380
477
|
loadMoreMargin,
|
|
381
|
-
isReorderable:
|
|
478
|
+
isReorderable: drag.isEnabled,
|
|
382
479
|
isResizable,
|
|
383
480
|
onColumnResize: handleColumnResize,
|
|
384
481
|
onColumnResizeEnd: handleColumnResizeEnd,
|
|
@@ -393,7 +490,7 @@ function ItemTable(props, ref) {
|
|
|
393
490
|
toolbar: toolbarNode,
|
|
394
491
|
footer: footerNode,
|
|
395
492
|
isFiltered: isFiltered ?? isSearching,
|
|
396
|
-
sortMode:
|
|
493
|
+
sortMode: resolvedSortMode,
|
|
397
494
|
sort,
|
|
398
495
|
onColumnSort: toggleSort,
|
|
399
496
|
onColumnSortChange: setColumnSort,
|
|
@@ -420,60 +517,24 @@ function ItemTable(props, ref) {
|
|
|
420
517
|
columnKey: resolvedTreeColumnKey
|
|
421
518
|
} : void 0
|
|
422
519
|
});
|
|
423
|
-
const
|
|
424
|
-
const map = /* @__PURE__ */ new Map();
|
|
425
|
-
visibleRows.forEach((row_2, index_1) => map.set(String(visibleRowKeys?.[index_1] ?? resolvedGetRowKey(row_2, index_1)), row_2));
|
|
426
|
-
return map;
|
|
427
|
-
}, [
|
|
428
|
-
visibleRows,
|
|
429
|
-
visibleRowKeys,
|
|
430
|
-
resolvedGetRowKey
|
|
431
|
-
]);
|
|
432
|
-
const handleItemDrop = useEvent((targetKey, draggedKeys) => {
|
|
433
|
-
if (!dropOnRow) return;
|
|
434
|
-
const target = rowByKeyForDrop.get(String(targetKey));
|
|
435
|
-
if (!target) return;
|
|
436
|
-
const draggedKeySet = new Set(draggedKeys);
|
|
437
|
-
const topmostDraggedKeys = treeModel ? draggedKeys.filter((key_2) => {
|
|
438
|
-
let parent = treeModel.parentOf.get(key_2);
|
|
439
|
-
while (parent != null) {
|
|
440
|
-
if (draggedKeySet.has(parent)) return false;
|
|
441
|
-
parent = treeModel.parentOf.get(parent);
|
|
442
|
-
}
|
|
443
|
-
return true;
|
|
444
|
-
}) : draggedKeys;
|
|
445
|
-
if (treeModel && topmostDraggedKeys.some((key_3) => isTableTreeDescendant(treeModel, targetKey, key_3))) return;
|
|
446
|
-
const dragged = topmostDraggedKeys.map((key_4) => rowByKeyForDrop.get(String(key_4))).filter((row_3) => row_3 !== void 0 && row_3 !== target);
|
|
447
|
-
if (!dragged.length) return;
|
|
448
|
-
if (dropOnRow.isAllowed && !dropOnRow.isAllowed(dragged, target)) return;
|
|
449
|
-
dropOnRow.onDrop(dragged, target);
|
|
450
|
-
});
|
|
451
|
-
const renderDragPreview = useEvent((keys) => /* @__PURE__ */ jsx(ItemTableDragPreview, {
|
|
452
|
-
rows: keys.map((key_5) => rowByKeyForDrop.get(String(key_5))).filter((row_4) => row_4 !== void 0),
|
|
453
|
-
getItemDragInfo
|
|
454
|
-
}));
|
|
455
|
-
const shouldAcceptItemDrop = useEvent((targetKey_0) => {
|
|
456
|
-
const target_0 = rowByKeyForDrop.get(String(targetKey_0));
|
|
457
|
-
return target_0 != null && (dropOnRow?.isTarget(target_0) ?? false);
|
|
458
|
-
});
|
|
459
|
-
const isDragEnabled = !treeModel && isReorderable || dropOnRow != null;
|
|
460
|
-
const table = isDragEnabled ? /* @__PURE__ */ jsx(DraggableCollection, {
|
|
520
|
+
const table = drag.isEnabled ? /* @__PURE__ */ jsx(DraggableCollection, {
|
|
461
521
|
state: {
|
|
462
522
|
collection: selection.collection,
|
|
463
523
|
selectionManager: selection.selectionManager,
|
|
464
524
|
disabledKeys: new Set(disabledKeys ?? [])
|
|
465
525
|
},
|
|
466
526
|
listRef: bodyRef,
|
|
467
|
-
orderedKeys:
|
|
527
|
+
orderedKeys: drag.orderedKeys,
|
|
468
528
|
orientation: "vertical",
|
|
469
|
-
onReorder:
|
|
470
|
-
onItemDrop:
|
|
471
|
-
shouldAcceptItemDrop:
|
|
472
|
-
renderPreview:
|
|
529
|
+
onReorder: drag.onReorder,
|
|
530
|
+
onItemDrop: drag.onItemDrop,
|
|
531
|
+
shouldAcceptItemDrop: drag.shouldAcceptItemDrop,
|
|
532
|
+
renderPreview: drag.renderPreview,
|
|
473
533
|
children: (dragState_0, dropState_0, collectionProps_0) => renderTable(dragState_0, dropState_0, collectionProps_0)
|
|
474
534
|
}) : renderTable();
|
|
475
|
-
|
|
476
|
-
|
|
535
|
+
let t49;
|
|
536
|
+
if ($[119] !== isLoading || $[120] !== onRefresh || $[121] !== searchPlaceholder || $[122] !== searchValue || $[123] !== selection.clearSelection || $[124] !== selection.selectedCount || $[125] !== selection.selectedKeys || $[126] !== selection.selectedRows || $[127] !== setSearchValue) {
|
|
537
|
+
t49 = {
|
|
477
538
|
searchValue,
|
|
478
539
|
setSearchValue,
|
|
479
540
|
searchPlaceholder,
|
|
@@ -483,9 +544,35 @@ function ItemTable(props, ref) {
|
|
|
483
544
|
selectedRows: selection.selectedRows,
|
|
484
545
|
selectedCount: selection.selectedCount,
|
|
485
546
|
clearSelection: selection.clearSelection
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
|
|
547
|
+
};
|
|
548
|
+
$[119] = isLoading;
|
|
549
|
+
$[120] = onRefresh;
|
|
550
|
+
$[121] = searchPlaceholder;
|
|
551
|
+
$[122] = searchValue;
|
|
552
|
+
$[123] = selection.clearSelection;
|
|
553
|
+
$[124] = selection.selectedCount;
|
|
554
|
+
$[125] = selection.selectedKeys;
|
|
555
|
+
$[126] = selection.selectedRows;
|
|
556
|
+
$[127] = setSearchValue;
|
|
557
|
+
$[128] = t49;
|
|
558
|
+
} else t49 = $[128];
|
|
559
|
+
let t50;
|
|
560
|
+
if ($[129] !== t49 || $[130] !== table) {
|
|
561
|
+
t50 = /* @__PURE__ */ jsx(ItemTableChromeProvider, {
|
|
562
|
+
value: t49,
|
|
563
|
+
children: table
|
|
564
|
+
});
|
|
565
|
+
$[129] = t49;
|
|
566
|
+
$[130] = table;
|
|
567
|
+
$[131] = t50;
|
|
568
|
+
} else t50 = $[131];
|
|
569
|
+
return t50;
|
|
570
|
+
}
|
|
571
|
+
function _temp2(entry_1) {
|
|
572
|
+
return entry_1.key;
|
|
573
|
+
}
|
|
574
|
+
function _temp(entry_0) {
|
|
575
|
+
return entry_0.row;
|
|
489
576
|
}
|
|
490
577
|
const _ItemTable = Object.assign(forwardRef(ItemTable), {
|
|
491
578
|
Search: ItemTableSearch,
|