@hazelcast/ui 2.0.4 → 3.0.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Alert.js +116 -50
- package/lib/components/Alert.js.map +1 -1
- package/lib/components/Alert.module.scss.js +8 -0
- package/lib/components/Alert.module.scss.js.map +1 -0
- package/lib/components/AppHeader/AppHeader.js +39 -17
- package/lib/components/AppHeader/AppHeader.js.map +1 -1
- package/lib/components/AppHeader/AppHeader.module.scss.js +8 -0
- package/lib/components/AppHeader/AppHeader.module.scss.js.map +1 -0
- package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.js +24 -7
- package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.js.map +1 -1
- package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.module.scss.js +8 -0
- package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.module.scss.js.map +1 -0
- package/lib/components/AppHeader/AppHeaderLogo/index.js +8 -2
- package/lib/components/AppHeader/AppHeaderLogo/index.js.map +1 -1
- package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.js +46 -14
- package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.js.map +1 -1
- package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.module.scss.js +8 -0
- package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.module.scss.js.map +1 -0
- package/lib/components/AppHeader/AppHeaderMenu/index.js +8 -2
- package/lib/components/AppHeader/AppHeaderMenu/index.js.map +1 -1
- package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.js +19 -9
- package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.js.map +1 -1
- package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.module.scss.js +8 -0
- package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.module.scss.js.map +1 -0
- package/lib/components/AppHeader/EnvironmentBadge/index.js +8 -2
- package/lib/components/AppHeader/EnvironmentBadge/index.js.map +1 -1
- package/lib/components/AppHeader/SelectCluster/SelectCluster.js +72 -32
- package/lib/components/AppHeader/SelectCluster/SelectCluster.js.map +1 -1
- package/lib/components/AppHeader/SelectCluster/SelectCluster.module.scss.js +8 -0
- package/lib/components/AppHeader/SelectCluster/SelectCluster.module.scss.js.map +1 -0
- package/lib/components/AppHeader/SelectCluster/index.js +8 -2
- package/lib/components/AppHeader/SelectCluster/index.js.map +1 -1
- package/lib/components/AppHeader/index.js +8 -2
- package/lib/components/AppHeader/index.js.map +1 -1
- package/lib/components/AppSidebar/AppSidebar.js +56 -30
- package/lib/components/AppSidebar/AppSidebar.js.map +1 -1
- package/lib/components/AppSidebar/AppSidebar.module.scss.js +8 -0
- package/lib/components/AppSidebar/AppSidebar.module.scss.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.js +37 -21
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.js.map +1 -1
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.module.scss.js +8 -0
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.module.scss.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/index.js +8 -2
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/index.js.map +1 -1
- package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.js +31 -10
- package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.js.map +1 -1
- package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.module.scss.js +8 -0
- package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.module.scss.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarFavorites/index.js +8 -2
- package/lib/components/AppSidebar/AppSidebarFavorites/index.js.map +1 -1
- package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.js +77 -22
- package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.js.map +1 -1
- package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.module.scss.js +8 -0
- package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.module.scss.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarItem/index.js +8 -2
- package/lib/components/AppSidebar/AppSidebarItem/index.js.map +1 -1
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.js +17 -6
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.js.map +1 -1
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.module.scss.js +8 -0
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.module.scss.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/index.js +8 -2
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/index.js.map +1 -1
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.js +39 -14
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.js.map +1 -1
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.module.scss.js +8 -0
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.module.scss.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSectionExpandable.js +94 -53
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSectionExpandable.js.map +1 -1
- package/lib/components/AppSidebar/AppSidebarSection/appSidebarSectionContext.js +8 -3
- package/lib/components/AppSidebar/AppSidebarSection/appSidebarSectionContext.js.map +1 -1
- package/lib/components/AppSidebar/AppSidebarSection/index.js +8 -2
- package/lib/components/AppSidebar/AppSidebarSection/index.js.map +1 -1
- package/lib/components/AppSidebar/appSidebarContext.js +14 -9
- package/lib/components/AppSidebar/appSidebarContext.js.map +1 -1
- package/lib/components/AppSidebar/index.js +16 -6
- package/lib/components/AppSidebar/index.js.map +1 -1
- package/lib/components/AutocompleteField.js +229 -154
- package/lib/components/AutocompleteField.js.map +1 -1
- package/lib/components/AutocompleteField.module.scss.js +8 -0
- package/lib/components/AutocompleteField.module.scss.js.map +1 -0
- package/lib/components/AutocompleteFieldFormik.js +41 -18
- package/lib/components/AutocompleteFieldFormik.js.map +1 -1
- package/lib/components/Badge.js +66 -42
- package/lib/components/Badge.js.map +1 -1
- package/lib/components/Badge.module.scss.js +8 -0
- package/lib/components/Badge.module.scss.js.map +1 -0
- package/lib/components/Button.js +115 -42
- package/lib/components/Button.js.map +1 -1
- package/lib/components/Button.module.scss.js +8 -0
- package/lib/components/Button.module.scss.js.map +1 -0
- package/lib/components/Calendar/Calendar.d.ts +6 -4
- package/lib/components/Calendar/Calendar.js +77 -34
- package/lib/components/Calendar/Calendar.js.map +1 -1
- package/lib/components/Calendar/Calendar.module.scss.js +8 -0
- package/lib/components/Calendar/Calendar.module.scss.js.map +1 -0
- package/lib/components/Calendar/CalendarRange.js +60 -12
- package/lib/components/Calendar/CalendarRange.js.map +1 -1
- package/lib/components/Calendar/CalendarRange.module.scss.js +8 -0
- package/lib/components/Calendar/CalendarRange.module.scss.js.map +1 -0
- package/lib/components/Calendar/components/CalendarHeader.d.ts +2 -2
- package/lib/components/Calendar/components/CalendarHeader.js +35 -12
- package/lib/components/Calendar/components/CalendarHeader.js.map +1 -1
- package/lib/components/Calendar/components/CalendarInput.js +39 -9
- package/lib/components/Calendar/components/CalendarInput.js.map +1 -1
- package/lib/components/Calendar/components/CalendarTime.js +104 -66
- package/lib/components/Calendar/components/CalendarTime.js.map +1 -1
- package/lib/components/Calendar/components/CalendarTime.module.scss.js +8 -0
- package/lib/components/Calendar/components/CalendarTime.module.scss.js.map +1 -0
- package/lib/components/Calendar/helpers/consts.js +8 -100
- package/lib/components/Calendar/helpers/consts.js.map +1 -1
- package/lib/components/Card.js +60 -14
- package/lib/components/Card.js.map +1 -1
- package/lib/components/Card.module.scss.js +8 -0
- package/lib/components/Card.module.scss.js.map +1 -0
- package/lib/components/Carousel.js +60 -27
- package/lib/components/Carousel.js.map +1 -1
- package/lib/components/Carousel.module.scss.js +8 -0
- package/lib/components/Carousel.module.scss.js.map +1 -0
- package/lib/components/CenteredLoader.js +18 -6
- package/lib/components/CenteredLoader.js.map +1 -1
- package/lib/components/CenteredLoader.module.scss.js +8 -0
- package/lib/components/CenteredLoader.module.scss.js.map +1 -0
- package/lib/components/Checkbox.d.ts +2 -2
- package/lib/components/Checkbox.js +87 -26
- package/lib/components/Checkbox.js.map +1 -1
- package/lib/components/Checkbox.module.scss.js +8 -0
- package/lib/components/Checkbox.module.scss.js.map +1 -0
- package/lib/components/CheckboxFormik.js +37 -16
- package/lib/components/CheckboxFormik.js.map +1 -1
- package/lib/components/CircularProgressBar.js +78 -27
- package/lib/components/CircularProgressBar.js.map +1 -1
- package/lib/components/CircularProgressBar.module.scss.js +8 -0
- package/lib/components/CircularProgressBar.module.scss.js.map +1 -0
- package/lib/components/ContextMenu.js +86 -60
- package/lib/components/ContextMenu.js.map +1 -1
- package/lib/components/ContextMenu.module.scss.js +8 -0
- package/lib/components/ContextMenu.module.scss.js.map +1 -0
- package/lib/components/Dialog.js +50 -30
- package/lib/components/Dialog.js.map +1 -1
- package/lib/components/Dialog.module.scss.js +8 -0
- package/lib/components/Dialog.module.scss.js.map +1 -0
- package/lib/components/EmptyState.js +66 -20
- package/lib/components/EmptyState.js.map +1 -1
- package/lib/components/EmptyState.module.scss.js +8 -0
- package/lib/components/EmptyState.module.scss.js.map +1 -0
- package/lib/components/Error.js +28 -7
- package/lib/components/Error.js.map +1 -1
- package/lib/components/Error.module.scss.js +8 -0
- package/lib/components/Error.module.scss.js.map +1 -0
- package/lib/components/FieldHeader.js +43 -14
- package/lib/components/FieldHeader.js.map +1 -1
- package/lib/components/FieldHeader.module.scss.js +8 -0
- package/lib/components/FieldHeader.module.scss.js.map +1 -0
- package/lib/components/Help.d.ts +0 -1
- package/lib/components/Help.js +42 -13
- package/lib/components/Help.js.map +1 -1
- package/lib/components/Help.module.scss.js +8 -0
- package/lib/components/Help.module.scss.js.map +1 -0
- package/lib/components/Icon.js +48 -25
- package/lib/components/Icon.js.map +1 -1
- package/lib/components/Icon.module.scss.js +8 -0
- package/lib/components/Icon.module.scss.js.map +1 -0
- package/lib/components/IconButton.js +81 -23
- package/lib/components/IconButton.js.map +1 -1
- package/lib/components/IconButton.module.scss.js +8 -0
- package/lib/components/IconButton.module.scss.js.map +1 -0
- package/lib/components/InteractiveList.js +115 -41
- package/lib/components/InteractiveList.js.map +1 -1
- package/lib/components/InteractiveList.module.scss.js +8 -0
- package/lib/components/InteractiveList.module.scss.js.map +1 -0
- package/lib/components/InteractiveListFormik.js +110 -81
- package/lib/components/InteractiveListFormik.js.map +1 -1
- package/lib/components/Label.js +20 -5
- package/lib/components/Label.js.map +1 -1
- package/lib/components/Label.module.scss.js +8 -0
- package/lib/components/Label.module.scss.js.map +1 -0
- package/lib/components/Link.js +59 -31
- package/lib/components/Link.js.map +1 -1
- package/lib/components/Link.module.scss.js +8 -0
- package/lib/components/Link.module.scss.js.map +1 -0
- package/lib/components/Loader.js +82 -23
- package/lib/components/Loader.js.map +1 -1
- package/lib/components/Loader.module.scss.js +8 -0
- package/lib/components/Loader.module.scss.js.map +1 -0
- package/lib/components/Modal.js +93 -26
- package/lib/components/Modal.js.map +1 -1
- package/lib/components/Modal.module.scss.js +8 -0
- package/lib/components/Modal.module.scss.js.map +1 -0
- package/lib/components/Notification.js +75 -37
- package/lib/components/Notification.js.map +1 -1
- package/lib/components/Notification.module.scss.js +8 -0
- package/lib/components/Notification.module.scss.js.map +1 -0
- package/lib/components/NumberBadge.js +18 -7
- package/lib/components/NumberBadge.js.map +1 -1
- package/lib/components/NumberBadge.module.scss.js +8 -0
- package/lib/components/NumberBadge.module.scss.js.map +1 -0
- package/lib/components/NumberField.js +181 -140
- package/lib/components/NumberField.js.map +1 -1
- package/lib/components/NumberField.module.scss.js +8 -0
- package/lib/components/NumberField.module.scss.js.map +1 -0
- package/lib/components/NumberFieldFormik.js +69 -49
- package/lib/components/NumberFieldFormik.js.map +1 -1
- package/lib/components/Overlay.js +92 -29
- package/lib/components/Overlay.js.map +1 -1
- package/lib/components/Overlay.module.scss.js +8 -0
- package/lib/components/Overlay.module.scss.js.map +1 -0
- package/lib/components/Pagination.js +198 -91
- package/lib/components/Pagination.js.map +1 -1
- package/lib/components/Pagination.module.scss.js +8 -0
- package/lib/components/Pagination.module.scss.js.map +1 -0
- package/lib/components/PasswordField.js +61 -25
- package/lib/components/PasswordField.js.map +1 -1
- package/lib/components/PasswordField.module.scss.js +8 -0
- package/lib/components/PasswordField.module.scss.js.map +1 -0
- package/lib/components/PasswordFieldFormik.js +37 -16
- package/lib/components/PasswordFieldFormik.js.map +1 -1
- package/lib/components/Popover.d.ts +3 -10
- package/lib/components/Popover.js +85 -119
- package/lib/components/Popover.js.map +1 -1
- package/lib/components/Popover.module.scss.js +8 -0
- package/lib/components/Popover.module.scss.js.map +1 -0
- package/lib/components/Radio.d.ts +2 -2
- package/lib/components/Radio.js +67 -26
- package/lib/components/Radio.js.map +1 -1
- package/lib/components/Radio.module.scss.js +8 -0
- package/lib/components/Radio.module.scss.js.map +1 -0
- package/lib/components/RadioFormik.js +26 -11
- package/lib/components/RadioFormik.js.map +1 -1
- package/lib/components/RadioGroup.js +51 -18
- package/lib/components/RadioGroup.js.map +1 -1
- package/lib/components/RadioGroup.module.scss.js +8 -0
- package/lib/components/RadioGroup.module.scss.js.map +1 -0
- package/lib/components/RadioGroupContext.js +10 -3
- package/lib/components/RadioGroupContext.js.map +1 -1
- package/lib/components/RadioGroupFormik.js +34 -16
- package/lib/components/RadioGroupFormik.js.map +1 -1
- package/lib/components/SegmentedControl.js +43 -9
- package/lib/components/SegmentedControl.js.map +1 -1
- package/lib/components/SegmentedControl.module.scss.js +8 -0
- package/lib/components/SegmentedControl.module.scss.js.map +1 -0
- package/lib/components/SegmentedControlFormik.js +30 -12
- package/lib/components/SegmentedControlFormik.js.map +1 -1
- package/lib/components/Select/CheckableSelectField.js +178 -75
- package/lib/components/Select/CheckableSelectField.js.map +1 -1
- package/lib/components/Select/CheckableSelectField.module.scss.js +8 -0
- package/lib/components/Select/CheckableSelectField.module.scss.js.map +1 -0
- package/lib/components/Select/CheckableSelectFieldFormik.js +41 -18
- package/lib/components/Select/CheckableSelectFieldFormik.js.map +1 -1
- package/lib/components/Select/Common.js +87 -44
- package/lib/components/Select/Common.js.map +1 -1
- package/lib/components/Select/Common.module.scss.js +8 -0
- package/lib/components/Select/Common.module.scss.js.map +1 -0
- package/lib/components/Select/MultiSelectField.js +187 -107
- package/lib/components/Select/MultiSelectField.js.map +1 -1
- package/lib/components/Select/MultiSelectField.module.scss.js +8 -0
- package/lib/components/Select/MultiSelectField.module.scss.js.map +1 -0
- package/lib/components/Select/MultiSelectFieldFormik.js +41 -18
- package/lib/components/Select/MultiSelectFieldFormik.js.map +1 -1
- package/lib/components/Select/SelectField.js +169 -100
- package/lib/components/Select/SelectField.js.map +1 -1
- package/lib/components/Select/SelectField.module.scss.js +8 -0
- package/lib/components/Select/SelectField.module.scss.js.map +1 -0
- package/lib/components/Select/SelectFieldFormik.js +38 -18
- package/lib/components/Select/SelectFieldFormik.js.map +1 -1
- package/lib/components/Select/helpers.js +30 -25
- package/lib/components/Select/helpers.js.map +1 -1
- package/lib/components/Select/index.js +21 -8
- package/lib/components/Select/index.js.map +1 -1
- package/lib/components/SimpleTable.js +36 -13
- package/lib/components/SimpleTable.js.map +1 -1
- package/lib/components/SimpleTable.module.scss.js +8 -0
- package/lib/components/SimpleTable.module.scss.js.map +1 -0
- package/lib/components/Slider.js +294 -173
- package/lib/components/Slider.js.map +1 -1
- package/lib/components/Slider.module.scss.js +8 -0
- package/lib/components/Slider.module.scss.js.map +1 -0
- package/lib/components/SliderFormik.js +30 -13
- package/lib/components/SliderFormik.js.map +1 -1
- package/lib/components/Table/Cell.js +111 -58
- package/lib/components/Table/Cell.js.map +1 -1
- package/lib/components/Table/Cell.module.scss.js +8 -0
- package/lib/components/Table/Cell.module.scss.js.map +1 -0
- package/lib/components/Table/CellWrapper.js +44 -27
- package/lib/components/Table/CellWrapper.js.map +1 -1
- package/lib/components/Table/EnhancedRenderers.js +31 -12
- package/lib/components/Table/EnhancedRenderers.js.map +1 -1
- package/lib/components/Table/Header.js +141 -92
- package/lib/components/Table/Header.js.map +1 -1
- package/lib/components/Table/Header.module.scss.js +8 -0
- package/lib/components/Table/Header.module.scss.js.map +1 -0
- package/lib/components/Table/Row.js +77 -22
- package/lib/components/Table/Row.js.map +1 -1
- package/lib/components/Table/Row.module.scss.js +8 -0
- package/lib/components/Table/Row.module.scss.js.map +1 -0
- package/lib/components/Table/Table.js +456 -245
- package/lib/components/Table/Table.js.map +1 -1
- package/lib/components/Table/Table.module.scss.js +8 -0
- package/lib/components/Table/Table.module.scss.js.map +1 -0
- package/lib/components/Table/TableContent.js +129 -57
- package/lib/components/Table/TableContent.js.map +1 -1
- package/lib/components/Table/TableContent.module.scss.js +8 -0
- package/lib/components/Table/TableContent.module.scss.js.map +1 -0
- package/lib/components/Table/constants.js +8 -3
- package/lib/components/Table/constants.js.map +1 -1
- package/lib/components/Table/features/columnsSelection/CellCopyablePopover.js +39 -12
- package/lib/components/Table/features/columnsSelection/CellCopyablePopover.js.map +1 -1
- package/lib/components/Table/features/columnsSelection/CellCopyablePopover.module.scss.js +8 -0
- package/lib/components/Table/features/columnsSelection/CellCopyablePopover.module.scss.js.map +1 -0
- package/lib/components/Table/features/columnsSelection/ContextMenu/ContextMenu.js +23 -16
- package/lib/components/Table/features/columnsSelection/ContextMenu/ContextMenu.js.map +1 -1
- package/lib/components/Table/features/columnsSelection/ContextMenu/ContextMenu.module.scss.js +8 -0
- package/lib/components/Table/features/columnsSelection/ContextMenu/ContextMenu.module.scss.js.map +1 -0
- package/lib/components/Table/features/columnsSelection/ContextMenu/index.js +8 -2
- package/lib/components/Table/features/columnsSelection/ContextMenu/index.js.map +1 -1
- package/lib/components/Table/features/columnsSelection/columnsSelection.d.ts +2 -2
- package/lib/components/Table/features/columnsSelection/columnsSelection.js +76 -68
- package/lib/components/Table/features/columnsSelection/columnsSelection.js.map +1 -1
- package/lib/components/Table/features/columnsSelection/helpers.js +28 -22
- package/lib/components/Table/features/columnsSelection/helpers.js.map +1 -1
- package/lib/components/Table/features/columnsSelection/index.js +16 -5
- package/lib/components/Table/features/columnsSelection/index.js.map +1 -1
- package/lib/components/Table/helpers.js +17 -9
- package/lib/components/Table/helpers.js.map +1 -1
- package/lib/components/Table/tableTypes.js +3 -2
- package/lib/components/Table/tableTypes.js.map +1 -1
- package/lib/components/Table/useTrackTableState.js +43 -29
- package/lib/components/Table/useTrackTableState.js.map +1 -1
- package/lib/components/Table/utils.js +176 -111
- package/lib/components/Table/utils.js.map +1 -1
- package/lib/components/Tabs/Tab.js +61 -27
- package/lib/components/Tabs/Tab.js.map +1 -1
- package/lib/components/Tabs/Tab.module.scss.js +8 -0
- package/lib/components/Tabs/Tab.module.scss.js.map +1 -0
- package/lib/components/Tabs/TabContext.js +51 -26
- package/lib/components/Tabs/TabContext.js.map +1 -1
- package/lib/components/Tabs/TabList.js +62 -49
- package/lib/components/Tabs/TabList.js.map +1 -1
- package/lib/components/Tabs/TabList.module.scss.js +8 -0
- package/lib/components/Tabs/TabList.module.scss.js.map +1 -0
- package/lib/components/Tabs/TabPanel.js +29 -9
- package/lib/components/Tabs/TabPanel.js.map +1 -1
- package/lib/components/Tabs/TabPanel.module.scss.js +8 -0
- package/lib/components/Tabs/TabPanel.module.scss.js.map +1 -0
- package/lib/components/Tabs/index.js +20 -5
- package/lib/components/Tabs/index.js.map +1 -1
- package/lib/components/Terminal.js +179 -108
- package/lib/components/Terminal.js.map +1 -1
- package/lib/components/Terminal.module.scss.js +8 -0
- package/lib/components/Terminal.module.scss.js.map +1 -0
- package/lib/components/TextArea.js +79 -30
- package/lib/components/TextArea.js.map +1 -1
- package/lib/components/TextArea.module.scss.js +8 -0
- package/lib/components/TextArea.module.scss.js.map +1 -0
- package/lib/components/TextAreaFormik.js +26 -10
- package/lib/components/TextAreaFormik.js.map +1 -1
- package/lib/components/TextField.js +154 -48
- package/lib/components/TextField.js.map +1 -1
- package/lib/components/TextField.module.scss.js +8 -0
- package/lib/components/TextField.module.scss.js.map +1 -0
- package/lib/components/TextFieldFormik.js +46 -22
- package/lib/components/TextFieldFormik.js.map +1 -1
- package/lib/components/TimeField.js +62 -14
- package/lib/components/TimeField.js.map +1 -1
- package/lib/components/TimeField.module.scss.js +8 -0
- package/lib/components/TimeField.module.scss.js.map +1 -0
- package/lib/components/TimeFieldFormik.js +26 -10
- package/lib/components/TimeFieldFormik.js.map +1 -1
- package/lib/components/Toast.js +79 -44
- package/lib/components/Toast.js.map +1 -1
- package/lib/components/Toast.module.scss.js +8 -0
- package/lib/components/Toast.module.scss.js.map +1 -0
- package/lib/components/Toggle.js +71 -21
- package/lib/components/Toggle.js.map +1 -1
- package/lib/components/Toggle.module.scss.js +8 -0
- package/lib/components/Toggle.module.scss.js.map +1 -0
- package/lib/components/ToggleFormik.js +27 -11
- package/lib/components/ToggleFormik.js.map +1 -1
- package/lib/components/Tooltip.d.ts +4 -12
- package/lib/components/Tooltip.js +79 -122
- package/lib/components/Tooltip.js.map +1 -1
- package/lib/components/Tooltip.module.scss.js +8 -0
- package/lib/components/Tooltip.module.scss.js.map +1 -0
- package/lib/components/TruncatedText.d.ts +0 -1
- package/lib/components/TruncatedText.js +49 -22
- package/lib/components/TruncatedText.js.map +1 -1
- package/lib/components/TruncatedText.module.scss.js +8 -0
- package/lib/components/TruncatedText.module.scss.js.map +1 -0
- package/lib/helpers/array.js +26 -17
- package/lib/helpers/array.js.map +1 -1
- package/lib/helpers/escapeHtml.js +10 -6
- package/lib/helpers/escapeHtml.js.map +1 -1
- package/lib/helpers/forms.js +20 -14
- package/lib/helpers/forms.js.map +1 -1
- package/lib/helpers/math.js +10 -6
- package/lib/helpers/math.js.map +1 -1
- package/lib/helpers/types.js +6 -2
- package/lib/helpers/types.js.map +1 -1
- package/lib/hooks/index.js +17 -7
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useCloseOnResize.js +17 -12
- package/lib/hooks/useCloseOnResize.js.map +1 -1
- package/lib/hooks/useDeepCompareMemo.js +12 -7
- package/lib/hooks/useDeepCompareMemo.js.map +1 -1
- package/lib/hooks/useDeepEqual.js +14 -9
- package/lib/hooks/useDeepEqual.js.map +1 -1
- package/lib/hooks/useDimensions.d.ts +1 -1
- package/lib/hooks/useDimensions.js +26 -15
- package/lib/hooks/useDimensions.js.map +1 -1
- package/lib/hooks/useIsMounted.js +16 -11
- package/lib/hooks/useIsMounted.js.map +1 -1
- package/lib/hooks/useOnClickOutside.js +41 -32
- package/lib/hooks/useOnClickOutside.js.map +1 -1
- package/lib/hooks/useOpenCloseState.js +18 -13
- package/lib/hooks/useOpenCloseState.js.map +1 -1
- package/lib/hooks/usePagination.js +64 -60
- package/lib/hooks/usePagination.js.map +1 -1
- package/lib/hooks/usePersistedState.js +35 -33
- package/lib/hooks/usePersistedState.js.map +1 -1
- package/lib/hooks/usePrevious.js +13 -8
- package/lib/hooks/usePrevious.js.map +1 -1
- package/lib/hooks/useRefValue.js +13 -8
- package/lib/hooks/useRefValue.js.map +1 -1
- package/lib/icons/Cluster.js +44 -7
- package/lib/icons/Cluster.js.map +1 -1
- package/lib/icons/Compare.js +46 -7
- package/lib/icons/Compare.js.map +1 -1
- package/lib/icons/Compute.js +43 -7
- package/lib/icons/Compute.js.map +1 -1
- package/lib/icons/Folder.js +25 -4
- package/lib/icons/Folder.js.map +1 -1
- package/lib/icons/PlusCircle.js +37 -6
- package/lib/icons/PlusCircle.js.map +1 -1
- package/lib/icons/Streaming.js +45 -8
- package/lib/icons/Streaming.js.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.js +185 -75
- package/lib/index.js.map +1 -1
- package/lib/services/logger.js +85 -75
- package/lib/services/logger.js.map +1 -1
- package/lib/services/time.js +18 -14
- package/lib/services/time.js.map +1 -1
- package/lib/styles/constants/export.module.scss.js +8 -0
- package/lib/styles/constants/export.module.scss.js.map +1 -0
- package/lib/styles.css +1 -0
- package/lib/test-helpers/render.js +32 -20
- package/lib/test-helpers/render.js.map +1 -1
- package/lib/test-helpers/time.js +9 -2
- package/lib/test-helpers/time.js.map +1 -1
- package/lib/test-helpers/utils.js +13 -9
- package/lib/test-helpers/utils.js.map +1 -1
- package/lib/types.js +3 -2
- package/lib/types.js.map +1 -1
- package/lib/utils/formik.js +12 -7
- package/lib/utils/formik.js.map +1 -1
- package/lib/utils/keyboard.js +8 -3
- package/lib/utils/keyboard.js.map +1 -1
- package/lib/utils/portal.js +19 -14
- package/lib/utils/portal.js.map +1 -1
- package/lib/utils/ssr.js +6 -2
- package/lib/utils/ssr.js.map +1 -1
- package/lib/utils/types.js +3 -2
- package/lib/utils/types.js.map +1 -1
- package/package.json +25 -16
- package/lib/components/Alert.module.scss +0 -141
- package/lib/components/AppHeader/AppHeader.module.scss +0 -29
- package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.module.scss +0 -29
- package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.module.scss +0 -20
- package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.module.scss +0 -13
- package/lib/components/AppHeader/SelectCluster/SelectCluster.module.scss +0 -101
- package/lib/components/AppSidebar/AppSidebar.module.scss +0 -66
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.module.scss +0 -16
- package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.module.scss +0 -13
- package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.module.scss +0 -92
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.module.scss +0 -24
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.module.scss +0 -58
- package/lib/components/AutocompleteField.module.scss +0 -164
- package/lib/components/Badge.module.scss +0 -55
- package/lib/components/Button.module.scss +0 -329
- package/lib/components/Calendar/Calendar.module.scss +0 -185
- package/lib/components/Calendar/CalendarRange.module.scss +0 -21
- package/lib/components/Calendar/components/CalendarTime.module.scss +0 -72
- package/lib/components/Card.module.scss +0 -92
- package/lib/components/Carousel.module.scss +0 -43
- package/lib/components/CenteredLoader.module.scss +0 -11
- package/lib/components/Checkbox.module.scss +0 -106
- package/lib/components/CircularProgressBar.module.scss +0 -37
- package/lib/components/ContextMenu.module.scss +0 -37
- package/lib/components/Dialog.module.scss +0 -62
- package/lib/components/EmptyState.module.scss +0 -87
- package/lib/components/Error.module.scss +0 -12
- package/lib/components/FieldHeader.module.scss +0 -20
- package/lib/components/Help.module.scss +0 -9
- package/lib/components/Icon.module.scss +0 -33
- package/lib/components/IconButton.module.scss +0 -59
- package/lib/components/InteractiveList.module.scss +0 -72
- package/lib/components/Label.module.scss +0 -12
- package/lib/components/Link.module.scss +0 -64
- package/lib/components/Loader.module.scss +0 -74
- package/lib/components/Modal.module.scss +0 -109
- package/lib/components/Notification.module.scss +0 -97
- package/lib/components/NumberBadge.module.scss +0 -13
- package/lib/components/NumberField.module.scss +0 -76
- package/lib/components/Overlay.module.scss +0 -108
- package/lib/components/Pagination.module.scss +0 -117
- package/lib/components/PasswordField.module.scss +0 -26
- package/lib/components/Popover.module.scss +0 -12
- package/lib/components/Radio.module.scss +0 -112
- package/lib/components/RadioGroup.module.scss +0 -21
- package/lib/components/SegmentedControl.module.scss +0 -81
- package/lib/components/Select/CheckableSelectField.module.scss +0 -100
- package/lib/components/Select/Common.module.scss +0 -69
- package/lib/components/Select/MultiSelectField.module.scss +0 -72
- package/lib/components/Select/SelectField.module.scss +0 -194
- package/lib/components/SimpleTable.module.scss +0 -28
- package/lib/components/Slider.module.scss +0 -277
- package/lib/components/Table/Cell.module.scss +0 -61
- package/lib/components/Table/Header.module.scss +0 -128
- package/lib/components/Table/Row.module.scss +0 -59
- package/lib/components/Table/Table.module.scss +0 -31
- package/lib/components/Table/TableContent.module.scss +0 -21
- package/lib/components/Table/features/columnsSelection/CellCopyablePopover.module.scss +0 -12
- package/lib/components/Table/features/columnsSelection/ContextMenu/ContextMenu.module.scss +0 -6
- package/lib/components/Tabs/Tab.module.scss +0 -58
- package/lib/components/Tabs/TabList.module.scss +0 -3
- package/lib/components/Tabs/TabPanel.module.scss +0 -7
- package/lib/components/Terminal.module.scss +0 -109
- package/lib/components/TextArea.module.scss +0 -144
- package/lib/components/TextField.module.scss +0 -209
- package/lib/components/TimeField.module.scss +0 -4
- package/lib/components/Toast.module.scss +0 -53
- package/lib/components/Toggle.module.scss +0 -175
- package/lib/components/Tooltip.module.scss +0 -175
- package/lib/components/TruncatedText.module.scss +0 -9
- package/lib/hooks/useResizeAware.d.ts +0 -3
- package/lib/hooks/useResizeAware.js +0 -25
- package/lib/hooks/useResizeAware.js.map +0 -1
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var debounce = require('lodash/debounce');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var cn = require('classnames');
|
|
6
|
+
var HotKeys = require('react-hot-keys');
|
|
7
|
+
var reactTable = require('@tanstack/react-table');
|
|
8
|
+
var reactFeather = require('react-feather');
|
|
9
|
+
var components_Pagination = require('../Pagination.js');
|
|
10
|
+
var components_Table_Cell = require('./Cell.js');
|
|
11
|
+
var components_Table_EnhancedRenderers = require('./EnhancedRenderers.js');
|
|
12
|
+
var components_Table_Header = require('./Header.js');
|
|
13
|
+
var components_Table_Row = require('./Row.js');
|
|
14
|
+
var components_Loader = require('../Loader.js');
|
|
15
|
+
var components_EmptyState = require('../EmptyState.js');
|
|
16
|
+
var hooks_usePrevious = require('../../hooks/usePrevious.js');
|
|
17
|
+
var components_Icon = require('../Icon.js');
|
|
18
|
+
var components_Table_TableContent = require('./TableContent.js');
|
|
19
|
+
var components_Table_constants = require('./constants.js');
|
|
20
|
+
var components_Table_features_columnsSelection_columnsSelection = require('./features/columnsSelection/columnsSelection.js');
|
|
21
|
+
var components_Table_features_columnsSelection_ContextMenu_ContextMenu = require('./features/columnsSelection/ContextMenu/ContextMenu.js');
|
|
22
|
+
var components_Table_useTrackTableState = require('./useTrackTableState.js');
|
|
23
|
+
var components_Table_utils = require('./utils.js');
|
|
24
|
+
var Table_module = require('./Table.module.scss.js');
|
|
25
|
+
var export_module = require('../../styles/constants/export.module.scss.js');
|
|
26
|
+
var hooks_useRefValue = require('../../hooks/useRefValue.js');
|
|
27
|
+
|
|
25
28
|
/**
|
|
26
29
|
* ### Purpose
|
|
27
30
|
* Table component allows to arrange data in rows and columns.
|
|
@@ -33,228 +36,436 @@ export * from './tableTypes';
|
|
|
33
36
|
* - Is able to resize columns out of the box
|
|
34
37
|
*/
|
|
35
38
|
// Inspiration here: https://react-table.tanstack.com/docs/examples/basic
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
39
|
+
const Table = ({
|
|
40
|
+
'data-test': dataTest,
|
|
41
|
+
columns: propColumns,
|
|
42
|
+
data,
|
|
43
|
+
disableSortBy,
|
|
44
|
+
onPaginationChange,
|
|
45
|
+
onSortingChange,
|
|
46
|
+
manualPagination,
|
|
47
|
+
onRenderedContentChange,
|
|
48
|
+
hidePagination = false,
|
|
49
|
+
pageCount: controlledPageCount,
|
|
50
|
+
defaultPageSize = 10,
|
|
51
|
+
paginationOptions,
|
|
52
|
+
onRowClick,
|
|
53
|
+
getHref,
|
|
54
|
+
AnchorComponent,
|
|
55
|
+
getCustomRowProps,
|
|
56
|
+
getCustomCellProps,
|
|
57
|
+
loading,
|
|
58
|
+
noDataTitle = 'The table is empty',
|
|
59
|
+
pageIndex: incomingPageIndex,
|
|
60
|
+
initialState = {
|
|
61
|
+
paginationOptions: {
|
|
62
|
+
pageIndex: incomingPageIndex || 0,
|
|
63
|
+
pageSize: defaultPageSize
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
className = '',
|
|
67
|
+
headerClassName = '',
|
|
68
|
+
contentClassName = '',
|
|
69
|
+
footerClassName = '',
|
|
70
|
+
searchValue,
|
|
71
|
+
hideHeader,
|
|
72
|
+
onPageChange,
|
|
73
|
+
overlayLoading,
|
|
74
|
+
onRowSelect,
|
|
75
|
+
columnsOrdering = false,
|
|
76
|
+
children,
|
|
77
|
+
renderRowSubComponent,
|
|
78
|
+
onCopy,
|
|
79
|
+
canExpand,
|
|
80
|
+
onStateChange
|
|
81
|
+
}) => {
|
|
82
|
+
var _a;
|
|
83
|
+
const getOncopy = hooks_useRefValue.useRefValue(onCopy);
|
|
84
|
+
const getCanExpand = hooks_useRefValue.useRefValue(canExpand);
|
|
85
|
+
const getRenderRowSubComponent = hooks_useRefValue.useRefValue(renderRowSubComponent);
|
|
86
|
+
const [contextMenuAnchorEl, setContextMenuAnchorEl] = React.useState(null);
|
|
87
|
+
const draggedColumnRef = React.useRef(null);
|
|
88
|
+
const previousIncomingPageIndex = hooks_usePrevious.usePrevious(incomingPageIndex);
|
|
89
|
+
const columns = React.useMemo(() => {
|
|
90
|
+
if (renderRowSubComponent || data.some(item => 'subRows' in item)) {
|
|
91
|
+
const expander = {
|
|
92
|
+
width: 60,
|
|
93
|
+
disableResizing: true,
|
|
94
|
+
id: components_Table_constants.ROW_EXPANDER_COLUMN_ID,
|
|
95
|
+
Header: () => /*#__PURE__*/React.createElement("span", {
|
|
96
|
+
role: "contentinfo",
|
|
97
|
+
"aria-label": "row-expander-column-header"
|
|
98
|
+
}),
|
|
99
|
+
Cell: ({
|
|
100
|
+
row
|
|
101
|
+
}) => {
|
|
102
|
+
if (row.getCanExpand()) {
|
|
103
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
104
|
+
tabIndex: 0,
|
|
105
|
+
role: "button",
|
|
106
|
+
"data-test": "row-expander",
|
|
107
|
+
"aria-expanded": row.getIsExpanded(),
|
|
108
|
+
className: Table_module.default.expander,
|
|
109
|
+
onClick: e => {
|
|
110
|
+
e.preventDefault();
|
|
111
|
+
row.getToggleExpandedHandler()();
|
|
112
|
+
}
|
|
113
|
+
}, /*#__PURE__*/React.createElement(components_Icon.Icon, {
|
|
114
|
+
icon: row.getIsExpanded() ? reactFeather.ChevronUp : reactFeather.ChevronDown,
|
|
115
|
+
ariaLabel: "row-expander"
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, null);
|
|
63
119
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
120
|
+
};
|
|
121
|
+
return [expander, ...propColumns].map(components_Table_utils.getColumnDef);
|
|
122
|
+
}
|
|
123
|
+
return propColumns.map(components_Table_utils.getColumnDef);
|
|
124
|
+
}, [propColumns, data, renderRowSubComponent]);
|
|
125
|
+
const defaultColumn = React.useMemo(() => ({
|
|
126
|
+
cell: props => /*#__PURE__*/React.createElement(components_Table_EnhancedRenderers.EnhancedCellRenderer, {
|
|
127
|
+
cell: props.cell,
|
|
128
|
+
columnResizing: props.column.getIsResizing()
|
|
129
|
+
}),
|
|
130
|
+
minSize: Number(export_module.default.tableColumnMinWidth),
|
|
131
|
+
// minWidth is only used as a limit for resizing
|
|
132
|
+
size: Number(export_module.default.tableColumnWidth),
|
|
133
|
+
// width is used for both the flex-basis and flex-grow
|
|
134
|
+
maxSize: Number(export_module.default.tableColumnMaxWidth) // maxWidth is only used as a limit for resizing
|
|
135
|
+
}), []);
|
|
136
|
+
const tableInitialState = React.useMemo(() => components_Table_utils.getTableInitialState(initialState), [initialState]);
|
|
137
|
+
const tableInstance = reactTable.useReactTable({
|
|
138
|
+
columns,
|
|
139
|
+
data,
|
|
140
|
+
enableSorting: !disableSortBy,
|
|
141
|
+
enableMultiSort: false,
|
|
142
|
+
// Pass our hoisted table state
|
|
143
|
+
initialState: tableInitialState,
|
|
144
|
+
// Tell the usePagination hook that we'll handle our own data fetching
|
|
145
|
+
manualPagination: manualPagination,
|
|
146
|
+
// This means we'll also have to provide our own pageCount
|
|
147
|
+
pageCount: controlledPageCount,
|
|
148
|
+
defaultColumn,
|
|
149
|
+
columnResizeMode: 'onChange',
|
|
150
|
+
paginateExpandedRows: false,
|
|
151
|
+
autoResetPageIndex: false,
|
|
152
|
+
getSubRows: React.useCallback(row => row.subRows, []),
|
|
153
|
+
getRowCanExpand: React.useCallback(row => {
|
|
154
|
+
var _a;
|
|
155
|
+
const cb = getCanExpand();
|
|
156
|
+
if (cb) {
|
|
157
|
+
return cb(components_Table_utils.prepareRow(row));
|
|
158
|
+
}
|
|
159
|
+
if (getRenderRowSubComponent()) {
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
return ((_a = row.subRows) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
163
|
+
}, [getCanExpand, getRenderRowSubComponent]),
|
|
164
|
+
getCoreRowModel: reactTable.getCoreRowModel(),
|
|
165
|
+
getPaginationRowModel: reactTable.getPaginationRowModel(),
|
|
166
|
+
getSortedRowModel: reactTable.getSortedRowModel(),
|
|
167
|
+
getExpandedRowModel: reactTable.getExpandedRowModel(),
|
|
168
|
+
getFilteredRowModel: reactTable.getFilteredRowModel()
|
|
169
|
+
});
|
|
170
|
+
const {
|
|
171
|
+
getVisibleFlatColumns,
|
|
172
|
+
nextPage,
|
|
173
|
+
setPageIndex: goToPage,
|
|
174
|
+
getRowCount,
|
|
175
|
+
getState,
|
|
176
|
+
previousPage,
|
|
177
|
+
setPageSize,
|
|
178
|
+
setGlobalFilter,
|
|
179
|
+
setColumnOrder,
|
|
180
|
+
getPageCount,
|
|
181
|
+
getCanNextPage,
|
|
182
|
+
getCanPreviousPage,
|
|
183
|
+
getFooterGroups
|
|
184
|
+
} = tableInstance;
|
|
185
|
+
components_Table_useTrackTableState.useTrackTableState(tableInstance, onStateChange);
|
|
186
|
+
const footerGroups = getFooterGroups();
|
|
187
|
+
const page = tableInstance.getPaginationRowModel().rows;
|
|
188
|
+
const rowsPerPage = getRowCount();
|
|
189
|
+
const pageCount = getPageCount();
|
|
190
|
+
const {
|
|
191
|
+
sorting: sortBy,
|
|
192
|
+
columnOrder,
|
|
193
|
+
columnSizing: columnResizing,
|
|
194
|
+
rowSelection: selectedRowIds,
|
|
195
|
+
pagination: {
|
|
196
|
+
pageIndex,
|
|
197
|
+
pageSize
|
|
198
|
+
}
|
|
199
|
+
} = getState();
|
|
200
|
+
const getColumnOrder = hooks_useRefValue.useRefValue(columnOrder);
|
|
201
|
+
// drag and drop
|
|
202
|
+
const onDragStart = React.useCallback(e => {
|
|
203
|
+
draggedColumnRef.current = Number(e.dataTransfer.getData('text/plain'));
|
|
204
|
+
}, []);
|
|
205
|
+
const onDrop = React.useCallback((_, columnIndex) => {
|
|
206
|
+
if (draggedColumnRef.current !== null && columnIndex !== draggedColumnRef.current) {
|
|
207
|
+
const visibleColumns = getColumnOrder() || getVisibleFlatColumns().map(({
|
|
208
|
+
id
|
|
209
|
+
}) => id);
|
|
210
|
+
const newColumns = [...visibleColumns];
|
|
211
|
+
newColumns[columnIndex] = visibleColumns[draggedColumnRef.current];
|
|
212
|
+
newColumns[draggedColumnRef.current] = visibleColumns[columnIndex];
|
|
213
|
+
setColumnOrder(newColumns);
|
|
214
|
+
}
|
|
215
|
+
}, [getColumnOrder, getVisibleFlatColumns, setColumnOrder]);
|
|
216
|
+
const columnsSelectionProps = components_Table_features_columnsSelection_columnsSelection.useColumnsSelection({
|
|
217
|
+
rowsPerPage,
|
|
218
|
+
columnsPerRow: columns.length
|
|
219
|
+
});
|
|
220
|
+
const {
|
|
221
|
+
onEndSelection,
|
|
222
|
+
getSelectedColumns,
|
|
223
|
+
selectedColumnValuesRef
|
|
224
|
+
} = columnsSelectionProps;
|
|
225
|
+
const onPaginationChangeDebounced = React.useMemo(() => onPaginationChange ? debounce(onPaginationChange, 200) : undefined, [onPaginationChange]);
|
|
226
|
+
const onKeyUp = React.useCallback(() => {
|
|
227
|
+
const callback = getOncopy();
|
|
228
|
+
if (callback) {
|
|
229
|
+
const {
|
|
74
230
|
columns,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
});
|
|
131
|
-
const { onEndSelection, getSelectedColumns, selectedColumnValuesRef } = columnsSelectionProps;
|
|
132
|
-
const onPaginationChangeDebounced = useMemo(() => (onPaginationChange ? debounce(onPaginationChange, 200) : undefined), [onPaginationChange]);
|
|
133
|
-
const onKeyUp = useCallback(() => {
|
|
134
|
-
const callback = getOncopy();
|
|
135
|
-
if (callback) {
|
|
136
|
-
const { columns, range } = getSelectedColumns();
|
|
137
|
-
if (columns.size || (range[0] !== undefined && range[0] !== undefined)) {
|
|
138
|
-
callback(selectedColumnValuesRef === null || selectedColumnValuesRef === void 0 ? void 0 : selectedColumnValuesRef.current);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}, [getOncopy, getSelectedColumns, selectedColumnValuesRef]);
|
|
142
|
-
useEffect(() => {
|
|
143
|
-
return () => {
|
|
144
|
-
document.body.removeEventListener('mouseup', onEndSelection);
|
|
145
|
-
document.body.removeEventListener('contextmenu', onEndSelection);
|
|
146
|
-
document.body.removeEventListener('keyup', onKeyUp);
|
|
147
|
-
};
|
|
148
|
-
}, [onKeyUp, onEndSelection]);
|
|
149
|
-
// Listen for changes in pagination and use the state to fetch new data. This is a recommended way to fetch new data: https://react-table.tanstack.com/docs/faq#how-can-i-use-the-table-state-to-fetch-new-data
|
|
150
|
-
useEffect(() => {
|
|
151
|
-
if (onPaginationChangeDebounced) {
|
|
152
|
-
onPaginationChangeDebounced({ pageIndex, pageSize });
|
|
153
|
-
}
|
|
154
|
-
}, [onPaginationChangeDebounced, pageIndex, pageSize]);
|
|
155
|
-
useEffect(() => {
|
|
156
|
-
if (onSortingChange) {
|
|
157
|
-
onSortingChange(sortBy);
|
|
158
|
-
}
|
|
159
|
-
}, [sortBy, onSortingChange]);
|
|
160
|
-
// Debounce our `fetchData` call for 200ms.
|
|
161
|
-
const onRenderedContentChangeDebounced = useMemo(() => (onRenderedContentChange ? debounce(onRenderedContentChange, 200) : undefined), [onRenderedContentChange]);
|
|
162
|
-
// Listen for changes in pagination and use the state to fetch new data. This is a recommended way to fetch new data: https://react-table.tanstack.com/docs/faq#how-can-i-use-the-table-state-to-fetch-new-data
|
|
163
|
-
useEffect(() => {
|
|
164
|
-
if (onRenderedContentChangeDebounced) {
|
|
165
|
-
onRenderedContentChangeDebounced(page.map(prepareRow));
|
|
166
|
-
}
|
|
167
|
-
}, [onRenderedContentChangeDebounced, page]);
|
|
168
|
-
// Apply global filter when searchValue changes
|
|
169
|
-
useEffect(() => {
|
|
170
|
-
if (searchValue !== undefined) {
|
|
171
|
-
;
|
|
172
|
-
setGlobalFilter(searchValue);
|
|
173
|
-
}
|
|
174
|
-
}, [searchValue, setGlobalFilter]);
|
|
175
|
-
useEffect(() => {
|
|
176
|
-
if (pageCount < pageIndex + 1) {
|
|
177
|
-
goToPage(pageCount - 1);
|
|
178
|
-
}
|
|
179
|
-
}, [pageIndex, pageCount, goToPage]);
|
|
180
|
-
useEffect(() => {
|
|
181
|
-
if (incomingPageIndex !== undefined && incomingPageIndex !== previousIncomingPageIndex) {
|
|
182
|
-
goToPage(incomingPageIndex);
|
|
183
|
-
}
|
|
184
|
-
}, [goToPage, incomingPageIndex, previousIncomingPageIndex]);
|
|
185
|
-
useEffect(() => {
|
|
186
|
-
if (onRowSelect) {
|
|
187
|
-
onRowSelect(Object.keys(selectedRowIds));
|
|
188
|
-
}
|
|
189
|
-
}, [onRowSelect, selectedRowIds]);
|
|
190
|
-
const hasData = data.length > 0;
|
|
191
|
-
// If at least one of the columns has footer then we display the footer row
|
|
192
|
-
const hasFooter = !loading && hasData && columns.some((col) => !!col.footer);
|
|
193
|
-
// Header row has always aria-rowindex = 1.
|
|
194
|
-
const headerIndex = 1;
|
|
195
|
-
// We're using this offset to display correct aria-rowindex when pagination is in action.
|
|
196
|
-
const cellIndexOffset = pageSize * pageIndex + headerIndex;
|
|
197
|
-
// Total row count.
|
|
198
|
-
const rowCount = data.length + headerIndex + (hasFooter ? 1 : 0);
|
|
199
|
-
const content = (React.createElement(React.Fragment, null,
|
|
200
|
-
React.createElement("div", { "data-test": dataTest !== null && dataTest !== void 0 ? dataTest : 'table-wrapper', className: className },
|
|
201
|
-
React.createElement("div", { className: cn(styles.container, {
|
|
202
|
-
[styles.spaceBottom]: !hidePagination,
|
|
203
|
-
}) },
|
|
204
|
-
React.createElement("div", { "data-test": "table", role: "table", "aria-rowcount": rowCount },
|
|
205
|
-
!hideHeader && (React.createElement("div", { "data-test": "table-header-row-group", role: "rowgroup", className: headerClassName }, tableInstance.getHeaderGroups().map((headerGroup) => (React.createElement(HeaderRow, { key: headerGroup.id, role: "row", ariaRowIndex: headerIndex, style: getRowStyle({ totalSize: tableInstance.getTotalSize() }) }, headerGroup.headers.map((header, i) => {
|
|
206
|
-
var _a, _b;
|
|
207
|
-
const canSort = header.column.getCanSort();
|
|
208
|
-
const isDraggable = columnsOrdering && header.id !== 'expander';
|
|
209
|
-
return (React.createElement(Header, { index: i, colSpan: 1, key: header.id, role: "columnheader", onDragStart: onDragStart, style: getCellStyle({ size: header.getSize(), minSize: header.column.columnDef.minSize || header.getSize() }), canSort: canSort, isSorted: !!header.column.getIsSorted(), isSortedDesc: (_a = sortBy[header.column.getSortIndex()]) === null || _a === void 0 ? void 0 : _a.desc, canResize: header.column.getCanResize(), onDrop: isDraggable ? onDrop : undefined, resizeHandler: header.getResizeHandler(), isResizing: header.column.getIsResizing(), align: (_b = header.column.columnDef.meta) === null || _b === void 0 ? void 0 : _b.align, onClick: canSort ? header.column.getToggleSortingHandler() : undefined },
|
|
210
|
-
React.createElement(EnhancedHeaderFooterRenderer, { type: "header", context: header.getContext() })));
|
|
211
|
-
})))))),
|
|
212
|
-
!overlayLoading && loading ? (React.createElement(Row, { role: "row" },
|
|
213
|
-
React.createElement(Cell, { role: "cell", align: "center", colSpan: columns.length, "data-test": "table-loader-cell" },
|
|
214
|
-
React.createElement(Loader, null)))) : hasData ? (React.createElement(HotKeys, { keyName: "ctrl+c, command+c", onKeyUp: onKeyUp },
|
|
215
|
-
React.createElement("div", { "data-test": "table-cell-row-group", className: styles.hotKeys },
|
|
216
|
-
React.createElement(TableContent, { page: page, onCopy: onCopy, getHref: getHref, totalSize: tableInstance.getTotalSize(), rootRef: setContextMenuAnchorEl, ...columnsSelectionProps, onRowClick: onRowClick, className: contentClassName, columnResizing: columnResizing, AnchorComponent: AnchorComponent, cellIndexOffset: cellIndexOffset, getCustomRowProps: getCustomRowProps, getCustomCellProps: getCustomCellProps, renderRowSubComponent: renderRowSubComponent })))) : (React.createElement("div", { role: "row" },
|
|
217
|
-
React.createElement("div", { role: "cell" },
|
|
218
|
-
React.createElement(EmptyState, { "data-test": "table-no-data", className: styles.empty, title: noDataTitle, icon: AlertTriangle, iconLabel: "Alert" })))),
|
|
219
|
-
hasFooter && (React.createElement("div", { "data-test": "table-footer-row-group", role: "rowgroup", className: footerClassName }, footerGroups.map((group) => {
|
|
220
|
-
const { id: footerGroupKey } = group;
|
|
221
|
-
return (
|
|
222
|
-
// Footer props getters do not provide role attributes
|
|
223
|
-
React.createElement(Row, { key: footerGroupKey, ariaRowIndex: rowCount, style: getRowStyle({ totalSize: tableInstance.getTotalSize() }), role: "row" }, group.headers.map((column) => {
|
|
224
|
-
var _a;
|
|
225
|
-
const { id: footerKey, column: { columnDef }, } = column;
|
|
226
|
-
return (
|
|
227
|
-
// Footer props getters do not provide role attributes
|
|
228
|
-
React.createElement(Cell, { key: footerKey, colSpan: 1, align: (_a = columnDef.meta) === null || _a === void 0 ? void 0 : _a.align, style: getCellStyle({ size: column.getSize(), maxSize: columnDef.maxSize, minSize: columnDef.minSize }), role: "cell" },
|
|
229
|
-
React.createElement(EnhancedHeaderFooterRenderer, { context: column.getContext(), type: "footer" })));
|
|
230
|
-
})));
|
|
231
|
-
}))))),
|
|
232
|
-
!hidePagination && hasData && (React.createElement(Pagination, { pageCount: pageCount, currentPage: pageIndex + 1, canPreviousPage: getCanPreviousPage(), canNextPage: getCanNextPage(), goToPage: (p) => {
|
|
233
|
-
if (onPageChange) {
|
|
234
|
-
onPageChange(p - 1);
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
goToPage(p - 1);
|
|
238
|
-
}
|
|
239
|
-
}, nextPage: () => {
|
|
240
|
-
if (onPageChange) {
|
|
241
|
-
onPageChange(pageIndex + 1);
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
nextPage();
|
|
245
|
-
}
|
|
246
|
-
}, previousPage: () => {
|
|
247
|
-
if (onPageChange) {
|
|
248
|
-
onPageChange(pageIndex - 1);
|
|
249
|
-
}
|
|
250
|
-
else {
|
|
251
|
-
previousPage();
|
|
252
|
-
}
|
|
253
|
-
}, pageSize: pageSize, setPageSize: setPageSize, numberOfItems: data.length, pageSizeOptions: (_a = paginationOptions === null || paginationOptions === void 0 ? void 0 : paginationOptions.pageSizeOptions) !== null && _a !== void 0 ? _a : [5, 10, 20] }))),
|
|
254
|
-
onCopy && React.createElement(ContextMenu, { anchorElement: contextMenuAnchorEl, onCopy: onKeyUp })));
|
|
255
|
-
if (children) {
|
|
256
|
-
return children(content);
|
|
231
|
+
range
|
|
232
|
+
} = getSelectedColumns();
|
|
233
|
+
if (columns.size || range[0] !== undefined && range[0] !== undefined) {
|
|
234
|
+
callback(selectedColumnValuesRef === null || selectedColumnValuesRef === void 0 ? void 0 : selectedColumnValuesRef.current);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}, [getOncopy, getSelectedColumns, selectedColumnValuesRef]);
|
|
238
|
+
React.useEffect(() => {
|
|
239
|
+
return () => {
|
|
240
|
+
document.body.removeEventListener('mouseup', onEndSelection);
|
|
241
|
+
document.body.removeEventListener('contextmenu', onEndSelection);
|
|
242
|
+
document.body.removeEventListener('keyup', onKeyUp);
|
|
243
|
+
};
|
|
244
|
+
}, [onKeyUp, onEndSelection]);
|
|
245
|
+
// Listen for changes in pagination and use the state to fetch new data. This is a recommended way to fetch new data: https://react-table.tanstack.com/docs/faq#how-can-i-use-the-table-state-to-fetch-new-data
|
|
246
|
+
React.useEffect(() => {
|
|
247
|
+
if (onPaginationChangeDebounced) {
|
|
248
|
+
onPaginationChangeDebounced({
|
|
249
|
+
pageIndex,
|
|
250
|
+
pageSize
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}, [onPaginationChangeDebounced, pageIndex, pageSize]);
|
|
254
|
+
React.useEffect(() => {
|
|
255
|
+
if (onSortingChange) {
|
|
256
|
+
onSortingChange(sortBy);
|
|
257
|
+
}
|
|
258
|
+
}, [sortBy, onSortingChange]);
|
|
259
|
+
// Debounce our `fetchData` call for 200ms.
|
|
260
|
+
const onRenderedContentChangeDebounced = React.useMemo(() => onRenderedContentChange ? debounce(onRenderedContentChange, 200) : undefined, [onRenderedContentChange]);
|
|
261
|
+
// Listen for changes in pagination and use the state to fetch new data. This is a recommended way to fetch new data: https://react-table.tanstack.com/docs/faq#how-can-i-use-the-table-state-to-fetch-new-data
|
|
262
|
+
React.useEffect(() => {
|
|
263
|
+
if (onRenderedContentChangeDebounced) {
|
|
264
|
+
onRenderedContentChangeDebounced(page.map(components_Table_utils.prepareRow));
|
|
265
|
+
}
|
|
266
|
+
}, [onRenderedContentChangeDebounced, page]);
|
|
267
|
+
// Apply global filter when searchValue changes
|
|
268
|
+
React.useEffect(() => {
|
|
269
|
+
if (searchValue !== undefined) {
|
|
270
|
+
setGlobalFilter(searchValue);
|
|
271
|
+
}
|
|
272
|
+
}, [searchValue, setGlobalFilter]);
|
|
273
|
+
React.useEffect(() => {
|
|
274
|
+
if (pageCount < pageIndex + 1) {
|
|
275
|
+
goToPage(pageCount - 1);
|
|
276
|
+
}
|
|
277
|
+
}, [pageIndex, pageCount, goToPage]);
|
|
278
|
+
React.useEffect(() => {
|
|
279
|
+
if (incomingPageIndex !== undefined && incomingPageIndex !== previousIncomingPageIndex) {
|
|
280
|
+
goToPage(incomingPageIndex);
|
|
281
|
+
}
|
|
282
|
+
}, [goToPage, incomingPageIndex, previousIncomingPageIndex]);
|
|
283
|
+
React.useEffect(() => {
|
|
284
|
+
if (onRowSelect) {
|
|
285
|
+
onRowSelect(Object.keys(selectedRowIds));
|
|
257
286
|
}
|
|
258
|
-
|
|
287
|
+
}, [onRowSelect, selectedRowIds]);
|
|
288
|
+
const hasData = data.length > 0;
|
|
289
|
+
// If at least one of the columns has footer then we display the footer row
|
|
290
|
+
const hasFooter = !loading && hasData && columns.some(col => !!col.footer);
|
|
291
|
+
// Header row has always aria-rowindex = 1.
|
|
292
|
+
const headerIndex = 1;
|
|
293
|
+
// We're using this offset to display correct aria-rowindex when pagination is in action.
|
|
294
|
+
const cellIndexOffset = pageSize * pageIndex + headerIndex;
|
|
295
|
+
// Total row count.
|
|
296
|
+
const rowCount = data.length + headerIndex + (hasFooter ? 1 : 0);
|
|
297
|
+
const content = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
298
|
+
"data-test": dataTest !== null && dataTest !== void 0 ? dataTest : 'table-wrapper',
|
|
299
|
+
className: className
|
|
300
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
301
|
+
className: cn(Table_module.default.container, {
|
|
302
|
+
[Table_module.default.spaceBottom]: !hidePagination
|
|
303
|
+
})
|
|
304
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
305
|
+
"data-test": "table",
|
|
306
|
+
role: "table",
|
|
307
|
+
"aria-rowcount": rowCount
|
|
308
|
+
}, !hideHeader && (/*#__PURE__*/React.createElement("div", {
|
|
309
|
+
"data-test": "table-header-row-group",
|
|
310
|
+
role: "rowgroup",
|
|
311
|
+
className: headerClassName
|
|
312
|
+
}, tableInstance.getHeaderGroups().map(headerGroup => (/*#__PURE__*/React.createElement(components_Table_Row.HeaderRow, {
|
|
313
|
+
key: headerGroup.id,
|
|
314
|
+
role: "row",
|
|
315
|
+
ariaRowIndex: headerIndex,
|
|
316
|
+
style: components_Table_utils.getRowStyle({
|
|
317
|
+
totalSize: tableInstance.getTotalSize()
|
|
318
|
+
})
|
|
319
|
+
}, headerGroup.headers.map((header, i) => {
|
|
320
|
+
var _a, _b;
|
|
321
|
+
const canSort = header.column.getCanSort();
|
|
322
|
+
const isDraggable = columnsOrdering && header.id !== 'expander';
|
|
323
|
+
return /*#__PURE__*/React.createElement(components_Table_Header.Header, {
|
|
324
|
+
index: i,
|
|
325
|
+
colSpan: 1,
|
|
326
|
+
key: header.id,
|
|
327
|
+
role: "columnheader",
|
|
328
|
+
onDragStart: onDragStart,
|
|
329
|
+
style: components_Table_utils.getCellStyle({
|
|
330
|
+
size: header.getSize(),
|
|
331
|
+
minSize: header.column.columnDef.minSize || header.getSize()
|
|
332
|
+
}),
|
|
333
|
+
canSort: canSort,
|
|
334
|
+
isSorted: !!header.column.getIsSorted(),
|
|
335
|
+
isSortedDesc: (_a = sortBy[header.column.getSortIndex()]) === null || _a === void 0 ? void 0 : _a.desc,
|
|
336
|
+
canResize: header.column.getCanResize(),
|
|
337
|
+
onDrop: isDraggable ? onDrop : undefined,
|
|
338
|
+
resizeHandler: header.getResizeHandler(),
|
|
339
|
+
isResizing: header.column.getIsResizing(),
|
|
340
|
+
align: (_b = header.column.columnDef.meta) === null || _b === void 0 ? void 0 : _b.align,
|
|
341
|
+
onClick: canSort ? header.column.getToggleSortingHandler() : undefined
|
|
342
|
+
}, /*#__PURE__*/React.createElement(components_Table_EnhancedRenderers.EnhancedHeaderFooterRenderer, {
|
|
343
|
+
type: "header",
|
|
344
|
+
context: header.getContext()
|
|
345
|
+
}));
|
|
346
|
+
})))))), !overlayLoading && loading ? (/*#__PURE__*/React.createElement(components_Table_Row.Row, {
|
|
347
|
+
role: "row"
|
|
348
|
+
}, /*#__PURE__*/React.createElement(components_Table_Cell.Cell, {
|
|
349
|
+
role: "cell",
|
|
350
|
+
align: "center",
|
|
351
|
+
colSpan: columns.length,
|
|
352
|
+
"data-test": "table-loader-cell"
|
|
353
|
+
}, /*#__PURE__*/React.createElement(components_Loader.Loader, null)))) : hasData ? (/*#__PURE__*/React.createElement(HotKeys, {
|
|
354
|
+
keyName: "ctrl+c, command+c",
|
|
355
|
+
onKeyUp: onKeyUp
|
|
356
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
357
|
+
"data-test": "table-cell-row-group",
|
|
358
|
+
className: Table_module.default.hotKeys
|
|
359
|
+
}, /*#__PURE__*/React.createElement(components_Table_TableContent.TableContent, {
|
|
360
|
+
page: page,
|
|
361
|
+
onCopy: onCopy,
|
|
362
|
+
getHref: getHref,
|
|
363
|
+
totalSize: tableInstance.getTotalSize(),
|
|
364
|
+
rootRef: setContextMenuAnchorEl,
|
|
365
|
+
...columnsSelectionProps,
|
|
366
|
+
onRowClick: onRowClick,
|
|
367
|
+
className: contentClassName,
|
|
368
|
+
columnResizing: columnResizing,
|
|
369
|
+
AnchorComponent: AnchorComponent,
|
|
370
|
+
cellIndexOffset: cellIndexOffset,
|
|
371
|
+
getCustomRowProps: getCustomRowProps,
|
|
372
|
+
getCustomCellProps: getCustomCellProps,
|
|
373
|
+
renderRowSubComponent: renderRowSubComponent
|
|
374
|
+
})))) : (/*#__PURE__*/React.createElement("div", {
|
|
375
|
+
role: "row"
|
|
376
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
377
|
+
role: "cell"
|
|
378
|
+
}, /*#__PURE__*/React.createElement(components_EmptyState.EmptyState, {
|
|
379
|
+
"data-test": "table-no-data",
|
|
380
|
+
className: Table_module.default.empty,
|
|
381
|
+
title: noDataTitle,
|
|
382
|
+
icon: reactFeather.AlertTriangle,
|
|
383
|
+
iconLabel: "Alert"
|
|
384
|
+
})))), hasFooter && (/*#__PURE__*/React.createElement("div", {
|
|
385
|
+
"data-test": "table-footer-row-group",
|
|
386
|
+
role: "rowgroup",
|
|
387
|
+
className: footerClassName
|
|
388
|
+
}, footerGroups.map(group => {
|
|
389
|
+
const {
|
|
390
|
+
id: footerGroupKey
|
|
391
|
+
} = group;
|
|
392
|
+
return (
|
|
393
|
+
/*#__PURE__*/
|
|
394
|
+
// Footer props getters do not provide role attributes
|
|
395
|
+
React.createElement(components_Table_Row.Row, {
|
|
396
|
+
key: footerGroupKey,
|
|
397
|
+
ariaRowIndex: rowCount,
|
|
398
|
+
style: components_Table_utils.getRowStyle({
|
|
399
|
+
totalSize: tableInstance.getTotalSize()
|
|
400
|
+
}),
|
|
401
|
+
role: "row"
|
|
402
|
+
}, group.headers.map(column => {
|
|
403
|
+
var _a;
|
|
404
|
+
const {
|
|
405
|
+
id: footerKey,
|
|
406
|
+
column: {
|
|
407
|
+
columnDef
|
|
408
|
+
}
|
|
409
|
+
} = column;
|
|
410
|
+
return (
|
|
411
|
+
/*#__PURE__*/
|
|
412
|
+
// Footer props getters do not provide role attributes
|
|
413
|
+
React.createElement(components_Table_Cell.Cell, {
|
|
414
|
+
key: footerKey,
|
|
415
|
+
colSpan: 1,
|
|
416
|
+
align: (_a = columnDef.meta) === null || _a === void 0 ? void 0 : _a.align,
|
|
417
|
+
style: components_Table_utils.getCellStyle({
|
|
418
|
+
size: column.getSize(),
|
|
419
|
+
maxSize: columnDef.maxSize,
|
|
420
|
+
minSize: columnDef.minSize
|
|
421
|
+
}),
|
|
422
|
+
role: "cell"
|
|
423
|
+
}, /*#__PURE__*/React.createElement(components_Table_EnhancedRenderers.EnhancedHeaderFooterRenderer, {
|
|
424
|
+
context: column.getContext(),
|
|
425
|
+
type: "footer"
|
|
426
|
+
}))
|
|
427
|
+
);
|
|
428
|
+
}))
|
|
429
|
+
);
|
|
430
|
+
}))))), !hidePagination && hasData && (/*#__PURE__*/React.createElement(components_Pagination.Pagination, {
|
|
431
|
+
pageCount: pageCount,
|
|
432
|
+
currentPage: pageIndex + 1,
|
|
433
|
+
canPreviousPage: getCanPreviousPage(),
|
|
434
|
+
canNextPage: getCanNextPage(),
|
|
435
|
+
goToPage: p => {
|
|
436
|
+
if (onPageChange) {
|
|
437
|
+
onPageChange(p - 1);
|
|
438
|
+
} else {
|
|
439
|
+
goToPage(p - 1);
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
nextPage: () => {
|
|
443
|
+
if (onPageChange) {
|
|
444
|
+
onPageChange(pageIndex + 1);
|
|
445
|
+
} else {
|
|
446
|
+
nextPage();
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
previousPage: () => {
|
|
450
|
+
if (onPageChange) {
|
|
451
|
+
onPageChange(pageIndex - 1);
|
|
452
|
+
} else {
|
|
453
|
+
previousPage();
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
pageSize: pageSize,
|
|
457
|
+
setPageSize: setPageSize,
|
|
458
|
+
numberOfItems: data.length,
|
|
459
|
+
pageSizeOptions: (_a = paginationOptions === null || paginationOptions === void 0 ? void 0 : paginationOptions.pageSizeOptions) !== null && _a !== void 0 ? _a : [5, 10, 20]
|
|
460
|
+
}))), onCopy && /*#__PURE__*/React.createElement(components_Table_features_columnsSelection_ContextMenu_ContextMenu.ContextMenu, {
|
|
461
|
+
anchorElement: contextMenuAnchorEl,
|
|
462
|
+
onCopy: onKeyUp
|
|
463
|
+
}));
|
|
464
|
+
if (children) {
|
|
465
|
+
return children(content);
|
|
466
|
+
}
|
|
467
|
+
return content;
|
|
259
468
|
};
|
|
260
|
-
|
|
469
|
+
|
|
470
|
+
exports.Table = Table;
|
|
471
|
+
//# sourceMappingURL=Table.js.map
|