@qualtrics/ui-react 2.23.1-alpha.0 → 2.23.1-alpha.1
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/package.json +1 -1
- package/dist/__node_modules/style-inject/dist/style-inject.es.js +0 -28
- package/dist/__shared/cjs/index-7f78e01b.js +0 -2058
- package/dist/__shared/cjs/index-cf860ea0.js +0 -12504
- package/dist/components/Accordion/Accordion.js +0 -90
- package/dist/components/Accordion/Accordion2.js +0 -8
- package/dist/components/Accordion/AccordionContext.js +0 -13
- package/dist/components/Accordion/AccordionHeader.js +0 -72
- package/dist/components/Accordion/AccordionPanel.js +0 -30
- package/dist/components/Accordion/AccordionSection.js +0 -40
- package/dist/components/Accordion/index.js +0 -4
- package/dist/components/Banner/Banner.css.js +0 -21
- package/dist/components/Banner/Banner.css.ts.vanilla.js +0 -8
- package/dist/components/Banner/Banner.js +0 -105
- package/dist/components/Banner/index.js +0 -1
- package/dist/components/BreakpointSwitch/Breakpoint.js +0 -16
- package/dist/components/BreakpointSwitch/BreakpointContext.js +0 -9
- package/dist/components/BreakpointSwitch/BreakpointSwitch.js +0 -34
- package/dist/components/BreakpointSwitch/index.js +0 -2
- package/dist/components/Button/Button.js +0 -8
- package/dist/components/Button/Button2.js +0 -51
- package/dist/components/Button/index.js +0 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +0 -40
- package/dist/components/ButtonGroup/ButtonGroup2.js +0 -8
- package/dist/components/ButtonGroup/index.js +0 -1
- package/dist/components/Checkbox/Check.js +0 -18
- package/dist/components/Checkbox/Checkbox.js +0 -54
- package/dist/components/Checkbox/Checkbox2.js +0 -8
- package/dist/components/Checkbox/CheckboxField.js +0 -42
- package/dist/components/Checkbox/VisualCheckbox.js +0 -31
- package/dist/components/Checkbox/VisualCheckbox2.js +0 -8
- package/dist/components/Checkbox/index.js +0 -2
- package/dist/components/ColorPicker/Alpha.js +0 -106
- package/dist/components/ColorPicker/ColorPicker.js +0 -306
- package/dist/components/ColorPicker/ColorPicker2.js +0 -8
- package/dist/components/ColorPicker/ColorPickerFlyout.js +0 -100
- package/dist/components/ColorPicker/ColorPickerFlyoutInputs.js +0 -204
- package/dist/components/ColorPicker/Hue.js +0 -107
- package/dist/components/ColorPicker/Palette.js +0 -137
- package/dist/components/ColorPicker/Saturation.js +0 -129
- package/dist/components/ColorPicker/index.js +0 -1
- package/dist/components/ColorPicker/utils/calculateTargetId.js +0 -43
- package/dist/components/ColorPicker/utils/defaultColorPalette.js +0 -57
- package/dist/components/ColorPicker/utils/getMousePosition.js +0 -20
- package/dist/components/ColorPicker/utils/hexToHsv.js +0 -44
- package/dist/components/ColorPicker/utils/hexToRgb.js +0 -12
- package/dist/components/ColorPicker/utils/hexToRgbaString.js +0 -10
- package/dist/components/ColorPicker/utils/hsvToHex.js +0 -58
- package/dist/components/ColorPicker/utils/index.js +0 -9
- package/dist/components/ColorPicker/utils/rgbToHex.js +0 -13
- package/dist/components/ColorPicker/utils/validateHex.js +0 -43
- package/dist/components/Combobox/Combobox.js +0 -455
- package/dist/components/Combobox/Combobox2.js +0 -8
- package/dist/components/Combobox/ComboboxContext.js +0 -9
- package/dist/components/Combobox/ComboboxHeader.js +0 -21
- package/dist/components/Combobox/ComboboxIcon.js +0 -47
- package/dist/components/Combobox/ComboboxInput.js +0 -90
- package/dist/components/Combobox/ComboboxList.js +0 -57
- package/dist/components/Combobox/ComboboxOption.js +0 -25
- package/dist/components/Combobox/index.js +0 -5
- package/dist/components/ConfigPane/ConfigPane.js +0 -176
- package/dist/components/ConfigPane/ConfigPane2.js +0 -8
- package/dist/components/ConfigPane/constants.js +0 -9
- package/dist/components/ConfigPane/index.js +0 -1
- package/dist/components/Divider/Divider.js +0 -18
- package/dist/components/Divider/Divider2.js +0 -8
- package/dist/components/Divider/index.js +0 -1
- package/dist/components/Dropdown/ChildIndexContext/index.js +0 -34
- package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +0 -178
- package/dist/components/Dropdown/Dropdown.js +0 -285
- package/dist/components/Dropdown/Dropdown2.js +0 -8
- package/dist/components/Dropdown/DropdownButton.js +0 -161
- package/dist/components/Dropdown/DropdownContext.js +0 -9
- package/dist/components/Dropdown/DropdownHeader.js +0 -32
- package/dist/components/Dropdown/DropdownHeaderContext.js +0 -9
- package/dist/components/Dropdown/DropdownList.js +0 -106
- package/dist/components/Dropdown/DropdownOption.js +0 -112
- package/dist/components/Dropdown/DropdownSearch.js +0 -108
- package/dist/components/Dropdown/index.js +0 -5
- package/dist/components/FilePicker/FilePicker.js +0 -119
- package/dist/components/FilePicker/FilePicker2.js +0 -8
- package/dist/components/FilePicker/index.js +0 -1
- package/dist/components/FormField/Caption.js +0 -8
- package/dist/components/FormField/ErrorText.js +0 -25
- package/dist/components/FormField/FormField.js +0 -64
- package/dist/components/FormField/FormField2.js +0 -8
- package/dist/components/FormField/FormFieldContext.js +0 -40
- package/dist/components/FormField/HelperText.js +0 -19
- package/dist/components/FormField/ReadOnlyText.js +0 -28
- package/dist/components/FormField/index.js +0 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover.js +0 -79
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +0 -8
- package/dist/components/FullScreenTakeover/index.js +0 -1
- package/dist/components/Icon/Icon.js +0 -52
- package/dist/components/Icon/IconTypes.js +0 -499
- package/dist/components/Icon/index.js +0 -2
- package/dist/components/IconButton/IconButton.js +0 -58
- package/dist/components/IconButton/IconButton2.js +0 -8
- package/dist/components/IconButton/index.js +0 -3
- package/dist/components/InlineInput/InlineInput.js +0 -131
- package/dist/components/InlineInput/InlineInput2.js +0 -8
- package/dist/components/InlineInput/index.js +0 -1
- package/dist/components/Input/Input.js +0 -59
- package/dist/components/Input/Input2.js +0 -8
- package/dist/components/Input/InputField.js +0 -57
- package/dist/components/Input/index.js +0 -2
- package/dist/components/InputGroup/InputGroup.js +0 -33
- package/dist/components/InputGroup/InputGroup2.js +0 -8
- package/dist/components/InputGroup/InputGroupAddon.js +0 -23
- package/dist/components/InputGroup/InputGroupProvider.js +0 -33
- package/dist/components/InputGroup/index.js +0 -2
- package/dist/components/Label/Label.js +0 -27
- package/dist/components/Label/Label2.js +0 -8
- package/dist/components/Label/index.js +0 -1
- package/dist/components/Link/Link.js +0 -25
- package/dist/components/Link/Link2.js +0 -8
- package/dist/components/Link/index.js +0 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.js +0 -51
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +0 -8
- package/dist/components/LoadingSpinner/index.js +0 -1
- package/dist/components/LogicEditor/ConditionContainer.js +0 -33
- package/dist/components/LogicEditor/ConditionSet.js +0 -181
- package/dist/components/LogicEditor/Controls.js +0 -99
- package/dist/components/LogicEditor/LogicEditor.js +0 -126
- package/dist/components/LogicEditor/LogicEditor2.js +0 -8
- package/dist/components/LogicEditor/LogicEditorContext.js +0 -9
- package/dist/components/LogicEditor/index.js +0 -1
- package/dist/components/LogicEditor/utils.js +0 -140
- package/dist/components/Modal/Modal.js +0 -270
- package/dist/components/Modal/Modal2.js +0 -8
- package/dist/components/Modal/ModalContext.js +0 -9
- package/dist/components/Modal/index.js +0 -1
- package/dist/components/NewMenu/BaseMenu.js +0 -429
- package/dist/components/NewMenu/Menu/Menu.js +0 -24
- package/dist/components/NewMenu/Menu/index.js +0 -1
- package/dist/components/NewMenu/NewMenu.js +0 -8
- package/dist/components/NewMenu/SelectMenu/SelectMenu.js +0 -27
- package/dist/components/NewMenu/SelectMenu/index.js +0 -1
- package/dist/components/NewMenu/index.js +0 -3
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +0 -169
- package/dist/components/NewMenu/parts/ArrowNav/index.js +0 -1
- package/dist/components/NewMenu/parts/MenuAnchor.js +0 -55
- package/dist/components/NewMenu/parts/MenuContext.js +0 -9
- package/dist/components/NewMenu/parts/MenuItem.js +0 -64
- package/dist/components/NewMenu/parts/MenuSearchBox.js +0 -34
- package/dist/components/NewMenu/parts/MenuSpinner.js +0 -13
- package/dist/components/NewMenu/parts/SubmenuAnchor.js +0 -25
- package/dist/components/NewMenu/parts/index.js +0 -7
- package/dist/components/NumberStepper/NumberStepper.js +0 -284
- package/dist/components/NumberStepper/NumberStepper2.js +0 -8
- package/dist/components/NumberStepper/NumberStepperContext.js +0 -9
- package/dist/components/NumberStepper/NumberStepperDecrement.js +0 -65
- package/dist/components/NumberStepper/NumberStepperIncrement.js +0 -65
- package/dist/components/NumberStepper/NumberStepperInput.js +0 -136
- package/dist/components/NumberStepper/index.js +0 -4
- package/dist/components/PageLayout/MainContent.js +0 -17
- package/dist/components/PageLayout/PageContainer.js +0 -17
- package/dist/components/PageLayout/PageHeader.js +0 -17
- package/dist/components/PageLayout/PageLayout.js +0 -8
- package/dist/components/PageLayout/index.js +0 -3
- package/dist/components/Pagination/Pagination.js +0 -87
- package/dist/components/Pagination/Pagination2.js +0 -8
- package/dist/components/Pagination/PaginationContext.js +0 -9
- package/dist/components/Pagination/PaginationNextButton.js +0 -67
- package/dist/components/Pagination/PaginationPageInput.js +0 -125
- package/dist/components/Pagination/PaginationPreviousButton.js +0 -66
- package/dist/components/Pagination/index.js +0 -4
- package/dist/components/Popover/Popover.js +0 -126
- package/dist/components/Popover/Popover2.js +0 -8
- package/dist/components/Popover/index.js +0 -1
- package/dist/components/QuickSearch/QuickSearch.js +0 -66
- package/dist/components/QuickSearch/QuickSearch2.js +0 -8
- package/dist/components/QuickSearch/QuickSearchInput.js +0 -135
- package/dist/components/QuickSearch/index.js +0 -1
- package/dist/components/Radio/Radio.js +0 -61
- package/dist/components/Radio/Radio2.js +0 -8
- package/dist/components/Radio/RadioGroup.js +0 -34
- package/dist/components/Radio/RadioGroupContext.js +0 -9
- package/dist/components/Radio/RadioOption.js +0 -36
- package/dist/components/Radio/index.js +0 -3
- package/dist/components/SearchInput/SearchInput.js +0 -113
- package/dist/components/SearchInput/SearchInput2.js +0 -8
- package/dist/components/SearchInput/index.js +0 -3
- package/dist/components/SidebarNav/ExpandCollapseButton.js +0 -52
- package/dist/components/SidebarNav/SidebarNav.js +0 -69
- package/dist/components/SidebarNav/SidebarNav2.js +0 -8
- package/dist/components/SidebarNav/SidebarNavContext.js +0 -9
- package/dist/components/SidebarNav/SidebarNavLink.js +0 -59
- package/dist/components/SidebarNav/constants.js +0 -9
- package/dist/components/SidebarNav/index.js +0 -2
- package/dist/components/Slider/RangeSlider.js +0 -139
- package/dist/components/Slider/Slider.js +0 -137
- package/dist/components/Slider/Slider2.js +0 -8
- package/dist/components/Slider/SliderButton.js +0 -80
- package/dist/components/Slider/index.js +0 -2
- package/dist/components/Switch/Switch.js +0 -54
- package/dist/components/Switch/Switch2.js +0 -8
- package/dist/components/Switch/SwitchField.js +0 -42
- package/dist/components/Switch/index.js +0 -2
- package/dist/components/Table/Table.js +0 -18
- package/dist/components/Table/Table2.js +0 -8
- package/dist/components/Table/TableBody.js +0 -18
- package/dist/components/Table/TableCell.js +0 -18
- package/dist/components/Table/TableHead.js +0 -18
- package/dist/components/Table/TableHeaderCell.js +0 -18
- package/dist/components/Table/TableRow.js +0 -18
- package/dist/components/Table/index.js +0 -6
- package/dist/components/Tabs/Tab.js +0 -51
- package/dist/components/Tabs/TabContextProvider.js +0 -33
- package/dist/components/Tabs/TabList.js +0 -108
- package/dist/components/Tabs/TabPanel.js +0 -35
- package/dist/components/Tabs/TabPanels.js +0 -19
- package/dist/components/Tabs/Tabs.js +0 -37
- package/dist/components/Tabs/Tabs2.js +0 -8
- package/dist/components/Tabs/index.js +0 -5
- package/dist/components/Tooltip/Tooltip.js +0 -238
- package/dist/components/Tooltip/Tooltip2.js +0 -8
- package/dist/components/Tooltip/index.js +0 -1
- package/dist/components/UIProvider/PortalTargetContext.js +0 -19
- package/dist/components/UIProvider/UIProvider.js +0 -19
- package/dist/components/UIProvider/index.js +0 -2
- package/dist/components/deprecated_ColorPicker/Alpha.js +0 -90
- package/dist/components/deprecated_ColorPicker/Color.js +0 -275
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +0 -128
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +0 -8
- package/dist/components/deprecated_ColorPicker/DEFAULT_SWATCH_COLORS.js +0 -4
- package/dist/components/deprecated_ColorPicker/HexInput.js +0 -66
- package/dist/components/deprecated_ColorPicker/Hue.js +0 -87
- package/dist/components/deprecated_ColorPicker/Saturation.js +0 -120
- package/dist/components/deprecated_ColorPicker/Swatch.js +0 -30
- package/dist/components/deprecated_ColorPicker/index.js +0 -4
- package/dist/components/deprecated_ColorPicker/isMouseEvent.js +0 -5
- package/dist/components/deprecated_ColorPicker/useMouseDrag.js +0 -24
- package/dist/components/deprecated_NumberStepper/NumberStepper.js +0 -195
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +0 -8
- package/dist/components/deprecated_NumberStepper/NumberStepperContext.js +0 -9
- package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +0 -71
- package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +0 -71
- package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +0 -147
- package/dist/components/deprecated_NumberStepper/index.js +0 -6
- package/dist/components/deprecated_Tabs/Tab.js +0 -37
- package/dist/components/deprecated_Tabs/TabContextProvider.js +0 -9
- package/dist/components/deprecated_Tabs/Tabs.js +0 -131
- package/dist/components/deprecated_Tabs/Tabs2.js +0 -8
- package/dist/components/deprecated_Tabs/index.js +0 -4
- package/dist/components/deprecated_Toolbar/IconButtonWithLabel.js +0 -26
- package/dist/components/deprecated_Toolbar/Toolbar.js +0 -44
- package/dist/components/deprecated_Toolbar/Toolbar2.js +0 -8
- package/dist/components/deprecated_Toolbar/ToolbarContext.js +0 -9
- package/dist/components/deprecated_Toolbar/ToolbarPanel.js +0 -46
- package/dist/components/deprecated_Toolbar/ToolbarPanels.js +0 -140
- package/dist/components/deprecated_Toolbar/ToolbarTab.js +0 -141
- package/dist/components/deprecated_Toolbar/ToolbarTabs.js +0 -150
- package/dist/components/deprecated_Toolbar/index.js +0 -7
- package/dist/components/index.js +0 -43
- package/dist/hooks/index.js +0 -19
- package/dist/hooks/useBreakpoints/index.js +0 -1
- package/dist/hooks/useBreakpoints/useBreakpoints.js +0 -46
- package/dist/hooks/useClickOutside/index.js +0 -1
- package/dist/hooks/useClickOutside/useClickOutside.js +0 -30
- package/dist/hooks/useClickOutsidePortals/index.js +0 -1
- package/dist/hooks/useClickOutsidePortals/useClickOutsidePortals.js +0 -34
- package/dist/hooks/useControllableState/index.js +0 -1
- package/dist/hooks/useControllableState/useControllableState.js +0 -88
- package/dist/hooks/useDidUpdate/index.js +0 -1
- package/dist/hooks/useDidUpdate/useDidUpdate.js +0 -30
- package/dist/hooks/useEventCallback/index.js +0 -1
- package/dist/hooks/useEventCallback/useEventCallback.js +0 -22
- package/dist/hooks/useEventListener/index.js +0 -1
- package/dist/hooks/useEventListener/useEventListener.js +0 -40
- package/dist/hooks/useFocusSequence/index.js +0 -1
- package/dist/hooks/useFocusSequence/useFocusSequence.js +0 -123
- package/dist/hooks/useId/index.js +0 -1
- package/dist/hooks/useId/useId.js +0 -14
- package/dist/hooks/useIsFocused/index.js +0 -1
- package/dist/hooks/useIsFocused/useIsFocused.js +0 -17
- package/dist/hooks/useIsHovered/index.js +0 -1
- package/dist/hooks/useIsHovered/useIsHovered.js +0 -17
- package/dist/hooks/useIsTruncated/index.js +0 -1
- package/dist/hooks/useIsTruncated/useIsTruncated.js +0 -40
- package/dist/hooks/useLatest/index.js +0 -1
- package/dist/hooks/useLatest/useLatest.js +0 -16
- package/dist/hooks/useMounted/index.js +0 -1
- package/dist/hooks/useMounted/useMounted.js +0 -20
- package/dist/hooks/useMouseDrag/index.js +0 -1
- package/dist/hooks/useMouseDrag/useMouseDrag.js +0 -29
- package/dist/hooks/useOverlay/index.js +0 -1
- package/dist/hooks/useOverlay/useOverlay.js +0 -68
- package/dist/hooks/useOverlay/useOverlay2.js +0 -8
- package/dist/hooks/usePrevious/index.js +0 -1
- package/dist/hooks/usePrevious/usePrevious.js +0 -16
- package/dist/hooks/useResponsiveValue/index.js +0 -1
- package/dist/hooks/useResponsiveValue/useResponsiveValue.js +0 -19
- package/dist/hooks/useSSRLayoutEffect/index.js +0 -1
- package/dist/hooks/useSSRLayoutEffect/useSSRLayoutEffect.js +0 -10
- package/dist/hooks/useScreenReaderAnnouncement/index.js +0 -1
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +0 -72
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +0 -8
- package/dist/icons/Icon.js +0 -8
- package/dist/icons/components/ABCIcon.js +0 -6
- package/dist/icons/components/AIIcon.js +0 -6
- package/dist/icons/components/AccessibilityIcon.js +0 -6
- package/dist/icons/components/AccountIcon.js +0 -6
- package/dist/icons/components/AccountsTableIcon.js +0 -6
- package/dist/icons/components/ActionPlanningIcon.js +0 -6
- package/dist/icons/components/ActiveIcon.js +0 -6
- package/dist/icons/components/AddIcon.js +0 -6
- package/dist/icons/components/AddItemIcon.js +0 -6
- package/dist/icons/components/AddonsIcon.js +0 -6
- package/dist/icons/components/AdminGearsIcon.js +0 -6
- package/dist/icons/components/AgentLeftIcon.js +0 -6
- package/dist/icons/components/AgentPerformanceIcon.js +0 -6
- package/dist/icons/components/AgentRightIcon.js +0 -6
- package/dist/icons/components/AggregateFunctionIcon.js +0 -6
- package/dist/icons/components/AlignImageBottomIcon.js +0 -6
- package/dist/icons/components/AlignImageCenterIcon.js +0 -6
- package/dist/icons/components/AlignImageLeftIcon.js +0 -6
- package/dist/icons/components/AlignImageMiddleIcon.js +0 -6
- package/dist/icons/components/AlignImageRightIcon.js +0 -6
- package/dist/icons/components/AlignImageTopIcon.js +0 -6
- package/dist/icons/components/AlignTextBottomIcon.js +0 -6
- package/dist/icons/components/AlignTextLeftIcon.js +0 -6
- package/dist/icons/components/AlignTextRightIcon.js +0 -6
- package/dist/icons/components/AlignTextTopIcon.js +0 -6
- package/dist/icons/components/AnimationIcon.js +0 -6
- package/dist/icons/components/AreaChartIcon.js +0 -6
- package/dist/icons/components/ArrayIcon.js +0 -6
- package/dist/icons/components/ArrowDownIcon.js +0 -6
- package/dist/icons/components/ArrowLeftIcon.js +0 -6
- package/dist/icons/components/ArrowRightIcon.js +0 -6
- package/dist/icons/components/ArrowUpIcon.js +0 -6
- package/dist/icons/components/AssignUserIcon.js +0 -6
- package/dist/icons/components/AutomatedSetupIcon.js +0 -6
- package/dist/icons/components/BarChartIcon.js +0 -6
- package/dist/icons/components/BellIcon.js +0 -6
- package/dist/icons/components/BellSnoozeIcon.js +0 -6
- package/dist/icons/components/BenchmarkGraphIcon.js +0 -6
- package/dist/icons/components/BinderClipIcon.js +0 -6
- package/dist/icons/components/BinocularsIcon.js +0 -6
- package/dist/icons/components/BlogIcon.js +0 -6
- package/dist/icons/components/BookmarkFillIcon.js +0 -6
- package/dist/icons/components/BookmarkIcon.js +0 -6
- package/dist/icons/components/BooksIcon.js +0 -6
- package/dist/icons/components/BooleanIcon.js +0 -6
- package/dist/icons/components/BorderColorElement1Icon.js +0 -6
- package/dist/icons/components/BorderColorIcon.js +0 -6
- package/dist/icons/components/BranchContinueIcon.js +0 -6
- package/dist/icons/components/BranchEndIcon.js +0 -6
- package/dist/icons/components/BranchExtensionIcon.js +0 -6
- package/dist/icons/components/BubbleCashIcon.js +0 -6
- package/dist/icons/components/BubbleChartIcon.js +0 -6
- package/dist/icons/components/BubbleClockIcon.js +0 -6
- package/dist/icons/components/BubbleDotsIcon.js +0 -6
- package/dist/icons/components/BubbleHelpIcon.js +0 -6
- package/dist/icons/components/BubbleIcon.js +0 -6
- package/dist/icons/components/BubbleInfoIcon.js +0 -6
- package/dist/icons/components/BubbleTranslateIcon.js +0 -6
- package/dist/icons/components/BugsIcon.js +0 -6
- package/dist/icons/components/BusinessImpactIcon.js +0 -6
- package/dist/icons/components/ButtonIcon.js +0 -6
- package/dist/icons/components/BxLogoIcon.js +0 -6
- package/dist/icons/components/CalendarAddIcon.js +0 -6
- package/dist/icons/components/CalendarCheckIcon.js +0 -6
- package/dist/icons/components/CalendarIcon.js +0 -6
- package/dist/icons/components/CameraIcon.js +0 -6
- package/dist/icons/components/CaretDownIcon.js +0 -6
- package/dist/icons/components/CaretLeftIcon.js +0 -6
- package/dist/icons/components/CaretRightIcon.js +0 -6
- package/dist/icons/components/CaretUpIcon.js +0 -6
- package/dist/icons/components/CarryForwardChoicesIcon.js +0 -6
- package/dist/icons/components/CatalogIcon.js +0 -6
- package/dist/icons/components/CenterXIcon.js +0 -6
- package/dist/icons/components/CenterYIcon.js +0 -6
- package/dist/icons/components/Chart19Icon.js +0 -6
- package/dist/icons/components/ChartImpactIcon.js +0 -6
- package/dist/icons/components/ChartParetoIcon.js +0 -6
- package/dist/icons/components/ChartPolarIcon.js +0 -6
- package/dist/icons/components/CheckIcon.js +0 -6
- package/dist/icons/components/ChevronDownIcon.js +0 -6
- package/dist/icons/components/ChevronLeftIcon.js +0 -6
- package/dist/icons/components/ChevronRightIcon.js +0 -6
- package/dist/icons/components/ChevronSetIcon.js +0 -6
- package/dist/icons/components/ChevronSkipBackIcon.js +0 -6
- package/dist/icons/components/ChevronSkipForwardIcon.js +0 -6
- package/dist/icons/components/ChevronUpIcon.js +0 -6
- package/dist/icons/components/ClassIcon.js +0 -6
- package/dist/icons/components/ClearFormattingIcon.js +0 -6
- package/dist/icons/components/ClipboardIcon.js +0 -6
- package/dist/icons/components/ClockIcon.js +0 -6
- package/dist/icons/components/CloseCaptioningIcon.js +0 -6
- package/dist/icons/components/CloseIcon.js +0 -6
- package/dist/icons/components/ClosePanelLeftIcon.js +0 -6
- package/dist/icons/components/ClosePanelRightIcon.js +0 -6
- package/dist/icons/components/CloudyIcon.js +0 -6
- package/dist/icons/components/CoachingPrioritiesIcon.js +0 -6
- package/dist/icons/components/CodeBracketsIcon.js +0 -6
- package/dist/icons/components/CoffeeIcon.js +0 -6
- package/dist/icons/components/ColumnFilterIcon.js +0 -6
- package/dist/icons/components/ColumnsIcon.js +0 -6
- package/dist/icons/components/CommentsIcon.js +0 -6
- package/dist/icons/components/ConditionIcon.js +0 -6
- package/dist/icons/components/ConstantSumIcon.js +0 -6
- package/dist/icons/components/ContactIcon.js +0 -6
- package/dist/icons/components/ContactListIcon.js +0 -6
- package/dist/icons/components/ContactsIcon.js +0 -6
- package/dist/icons/components/ConversationAgentIcon.js +0 -6
- package/dist/icons/components/ConversationCustomerIcon.js +0 -6
- package/dist/icons/components/ConversationSilenceIcon.js +0 -6
- package/dist/icons/components/ConversionIcon.js +0 -6
- package/dist/icons/components/CopyIcon.js +0 -6
- package/dist/icons/components/CoreXMIcon.js +0 -6
- package/dist/icons/components/CreditCardIcon.js +0 -6
- package/dist/icons/components/CrossAnalyticsIcon.js +0 -6
- package/dist/icons/components/CustomMetricIcon.js +0 -6
- package/dist/icons/components/CustomerLeftIcon.js +0 -6
- package/dist/icons/components/CustomerRightIcon.js +0 -6
- package/dist/icons/components/CxLogoIcon.js +0 -6
- package/dist/icons/components/DashboardIcon.js +0 -6
- package/dist/icons/components/DataAnalysisIcon.js +0 -6
- package/dist/icons/components/DataSourceIcon.js +0 -6
- package/dist/icons/components/DatabaseIcon.js +0 -6
- package/dist/icons/components/DeadClickIcon.js +0 -6
- package/dist/icons/components/DecimalIcon.js +0 -6
- package/dist/icons/components/DefaultChoiceIcon.js +0 -6
- package/dist/icons/components/DeltaIcon.js +0 -6
- package/dist/icons/components/DeniedIcon.js +0 -6
- package/dist/icons/components/DescriptiveTextIcon.js +0 -6
- package/dist/icons/components/DesktopIcon.js +0 -6
- package/dist/icons/components/DetectedIcon.js +0 -6
- package/dist/icons/components/DiamondIcon.js +0 -6
- package/dist/icons/components/DirectoryIcon.js +0 -6
- package/dist/icons/components/DisplayLogicIcon.js +0 -6
- package/dist/icons/components/DistributionSummaryIcon.js +0 -6
- package/dist/icons/components/DocumentAlertIcon.js +0 -6
- package/dist/icons/components/DogIcon.js +0 -6
- package/dist/icons/components/DonutChartIcon.js +0 -6
- package/dist/icons/components/DownloadIcon.js +0 -6
- package/dist/icons/components/DownvoteFilledIcon.js +0 -6
- package/dist/icons/components/DownvoteIcon.js +0 -6
- package/dist/icons/components/DraftIcon.js +0 -6
- package/dist/icons/components/DragAndDropIcon.js +0 -6
- package/dist/icons/components/DragIcon.js +0 -6
- package/dist/icons/components/DrilldownIcon.js +0 -6
- package/dist/icons/components/DropIcon.js +0 -6
- package/dist/icons/components/EXCOVIDReturnToWorkIcon.js +0 -6
- package/dist/icons/components/EXCOVIDSolutionIcon.js +0 -6
- package/dist/icons/components/EditorGenericIcon.js +0 -6
- package/dist/icons/components/EffortEasyIcon.js +0 -6
- package/dist/icons/components/EffortHardIcon.js +0 -6
- package/dist/icons/components/EffortIcon.js +0 -6
- package/dist/icons/components/EffortMixedIcon.js +0 -6
- package/dist/icons/components/EffortNegativeIcon.js +0 -6
- package/dist/icons/components/EffortNeutralIcon.js +0 -6
- package/dist/icons/components/EffortPositiveIcon.js +0 -6
- package/dist/icons/components/EffortVeryEasyIcon.js +0 -6
- package/dist/icons/components/EffortVeryHardIcon.js +0 -6
- package/dist/icons/components/EllipsisHorizontalIcon.js +0 -6
- package/dist/icons/components/EllipsisVerticalIcon.js +0 -6
- package/dist/icons/components/EmojiColorAngryIcon.js +0 -6
- package/dist/icons/components/EmojiColorHappiestIcon.js +0 -6
- package/dist/icons/components/EmojiColorHappyIcon.js +0 -6
- package/dist/icons/components/EmojiColorNotGreatIcon.js +0 -6
- package/dist/icons/components/EmojiColorOKIcon.js +0 -6
- package/dist/icons/components/EmojiColorPrettyGoodIcon.js +0 -6
- package/dist/icons/components/EmojiColorSadIcon.js +0 -6
- package/dist/icons/components/EmojiColorUnhappyIcon.js +0 -6
- package/dist/icons/components/EmojiMonoAngryIcon.js +0 -6
- package/dist/icons/components/EmojiMonoHappiestIcon.js +0 -6
- package/dist/icons/components/EmojiMonoHappyIcon.js +0 -6
- package/dist/icons/components/EmojiMonoNotGreatIcon.js +0 -6
- package/dist/icons/components/EmojiMonoOKIcon.js +0 -6
- package/dist/icons/components/EmojiMonoPrettyGoodIcon.js +0 -6
- package/dist/icons/components/EmojiMonoUnhappyIcon.js +0 -6
- package/dist/icons/components/Employee360Icon.js +0 -6
- package/dist/icons/components/EmployeeAdHocIcon.js +0 -6
- package/dist/icons/components/EmployeeEngagementIcon.js +0 -6
- package/dist/icons/components/EmployeeLifecycleIcon.js +0 -6
- package/dist/icons/components/EmployeePulseIcon.js +0 -6
- package/dist/icons/components/EmptyBoxIcon.js +0 -6
- package/dist/icons/components/EnvelopeClosedIcon.js +0 -6
- package/dist/icons/components/EnvelopeOpenedIcon.js +0 -6
- package/dist/icons/components/EnvelopeOptedOutIcon.js +0 -6
- package/dist/icons/components/ErrorClickIcon.js +0 -6
- package/dist/icons/components/ErrorIcon.js +0 -6
- package/dist/icons/components/EventTriggerIcon.js +0 -6
- package/dist/icons/components/ExLogoIcon.js +0 -6
- package/dist/icons/components/ExampleProjectIcon.js +0 -6
- package/dist/icons/components/ExcludeIcon.js +0 -6
- package/dist/icons/components/ExclusiveAnswerIcon.js +0 -6
- package/dist/icons/components/ExternalLinkIcon.js +0 -6
- package/dist/icons/components/EyeDropperIcon.js +0 -6
- package/dist/icons/components/FastForwardIcon.js +0 -6
- package/dist/icons/components/FastReplyIcon.js +0 -6
- package/dist/icons/components/FeedbackIcon.js +0 -6
- package/dist/icons/components/FileAudioIcon.js +0 -6
- package/dist/icons/components/FileExcelIcon.js +0 -6
- package/dist/icons/components/FileIcon.js +0 -6
- package/dist/icons/components/FilePdfIcon.js +0 -6
- package/dist/icons/components/FilterIcon.js +0 -6
- package/dist/icons/components/FingerprintIcon.js +0 -6
- package/dist/icons/components/FireIcon.js +0 -6
- package/dist/icons/components/FlagIcon.js +0 -6
- package/dist/icons/components/FolderFullIcon.js +0 -6
- package/dist/icons/components/FolderIcon.js +0 -6
- package/dist/icons/components/FolderOpenFullIcon.js +0 -6
- package/dist/icons/components/FolderOpenIcon.js +0 -6
- package/dist/icons/components/FontSizeIcon.js +0 -6
- package/dist/icons/components/FormFieldIcon.js +0 -6
- package/dist/icons/components/GalleryIcon.js +0 -6
- package/dist/icons/components/GaugeChartIcon.js +0 -6
- package/dist/icons/components/GlobeIcon.js +0 -6
- package/dist/icons/components/GraphicSliderIcon.js +0 -6
- package/dist/icons/components/GridViewIcon.js +0 -6
- package/dist/icons/components/HamburgerMenuIcon.js +0 -6
- package/dist/icons/components/HeadphonesIcon.js +0 -6
- package/dist/icons/components/HeadsetIcon.js +0 -6
- package/dist/icons/components/HealthWellnessIcon.js +0 -6
- package/dist/icons/components/HeatMapIcon.js +0 -6
- package/dist/icons/components/HelpIcon.js +0 -6
- package/dist/icons/components/HighVolumeIcon.js +0 -6
- package/dist/icons/components/HighlightIcon.js +0 -6
- package/dist/icons/components/HistoryIcon.js +0 -6
- package/dist/icons/components/HomeIcon.js +0 -6
- package/dist/icons/components/HotspotIcon.js +0 -6
- package/dist/icons/components/HyperlinkIcon.js +0 -6
- package/dist/icons/components/IceCreamIcon.js +0 -6
- package/dist/icons/components/IgnoredIcon.js +0 -6
- package/dist/icons/components/ImageIcon.js +0 -6
- package/dist/icons/components/ImportedDataIcon.js +0 -6
- package/dist/icons/components/InactiveIcon.js +0 -6
- package/dist/icons/components/IncompleteTranslationsIcon.js +0 -6
- package/dist/icons/components/IndentMoreIcon.js +0 -6
- package/dist/icons/components/InformationIcon.js +0 -6
- package/dist/icons/components/InlineQuestionIcon.js +0 -6
- package/dist/icons/components/InsertLineIcon.js +0 -6
- package/dist/icons/components/IntegerIcon.js +0 -6
- package/dist/icons/components/IntegrationIcon.js +0 -6
- package/dist/icons/components/IntensityHighIcon.js +0 -6
- package/dist/icons/components/IntensityLowIcon.js +0 -6
- package/dist/icons/components/IntensityMediumIcon.js +0 -6
- package/dist/icons/components/InterceptIcon.js +0 -6
- package/dist/icons/components/JoinInnerIcon.js +0 -6
- package/dist/icons/components/JoinLeftOuterIcon.js +0 -6
- package/dist/icons/components/JoinOuterIcon.js +0 -6
- package/dist/icons/components/JoinRightOuterIcon.js +0 -6
- package/dist/icons/components/JourneyMapIcon.js +0 -6
- package/dist/icons/components/KeyboardIcon.js +0 -6
- package/dist/icons/components/LibrariesIcon.js +0 -6
- package/dist/icons/components/LibraryLinkIcon.js +0 -6
- package/dist/icons/components/LightBulbIcon.js +0 -6
- package/dist/icons/components/LightningBoltIcon.js +0 -6
- package/dist/icons/components/LineChartIcon.js +0 -6
- package/dist/icons/components/ListBulletsIcon.js +0 -6
- package/dist/icons/components/ListCheckedIcon.js +0 -6
- package/dist/icons/components/ListNumbersIcon.js +0 -6
- package/dist/icons/components/LocationIcon.js +0 -6
- package/dist/icons/components/LockIcon.js +0 -6
- package/dist/icons/components/LogicTreeIcon.js +0 -6
- package/dist/icons/components/LookAndFeelIcon.js +0 -6
- package/dist/icons/components/LoopAndMergeIcon.js +0 -6
- package/dist/icons/components/LowerCaseIcon.js +0 -6
- package/dist/icons/components/MailboxIcon.js +0 -6
- package/dist/icons/components/MarkerIcon.js +0 -6
- package/dist/icons/components/MatrixTableIcon.js +0 -6
- package/dist/icons/components/MaximizeIcon.js +0 -6
- package/dist/icons/components/MegaphoneIcon.js +0 -6
- package/dist/icons/components/MergeIcon.js +0 -6
- package/dist/icons/components/MetadataIcon.js +0 -6
- package/dist/icons/components/MicrophoneIcon.js +0 -6
- package/dist/icons/components/MicrophoneMuteIcon.js +0 -6
- package/dist/icons/components/MinimizeIcon.js +0 -6
- package/dist/icons/components/MobileLandscapeIcon.js +0 -6
- package/dist/icons/components/MobilePortraitIcon.js +0 -6
- package/dist/icons/components/ModelsIcon.js +0 -6
- package/dist/icons/components/MoonIcon.js +0 -6
- package/dist/icons/components/MouseThrashIcon.js +0 -6
- package/dist/icons/components/MouseTrailIcon.js +0 -6
- package/dist/icons/components/MoveIcon.js +0 -6
- package/dist/icons/components/MultipleChoiceIcon.js +0 -6
- package/dist/icons/components/MusicNoteIcon.js +0 -6
- package/dist/icons/components/NPSIcon.js +0 -6
- package/dist/icons/components/NewCustomerIcon.js +0 -6
- package/dist/icons/components/NewTemplateIcon.js +0 -6
- package/dist/icons/components/NewspaperIcon.js +0 -6
- package/dist/icons/components/NotInFlowIcon.js +0 -6
- package/dist/icons/components/NumbersIcon.js +0 -6
- package/dist/icons/components/ObjectIcon.js +0 -6
- package/dist/icons/components/OnlinePanelIcon.js +0 -6
- package/dist/icons/components/OpenPanelLeftIcon.js +0 -6
- package/dist/icons/components/OpenPanelRightIcon.js +0 -6
- package/dist/icons/components/OrgHierarchyIcon.js +0 -6
- package/dist/icons/components/OutboxIcon.js +0 -6
- package/dist/icons/components/OutdentIcon.js +0 -6
- package/dist/icons/components/PageBreakIcon.js +0 -6
- package/dist/icons/components/PagesIcon.js +0 -6
- package/dist/icons/components/PaginateFilterIcon.js +0 -6
- package/dist/icons/components/PaintBrushIcon.js +0 -6
- package/dist/icons/components/PaintBrushRoundIcon.js +0 -6
- package/dist/icons/components/PaintBucketIcon.js +0 -6
- package/dist/icons/components/PaperClipIcon.js +0 -6
- package/dist/icons/components/ParagraphIcon.js +0 -6
- package/dist/icons/components/ParticipantInviteAutomationIcon.js +0 -6
- package/dist/icons/components/ParticipantPortalIcon.js +0 -6
- package/dist/icons/components/PartlyCloudyIcon.js +0 -6
- package/dist/icons/components/PasswordLockIcon.js +0 -6
- package/dist/icons/components/PauseCircleIcon.js +0 -6
- package/dist/icons/components/PauseIcon.js +0 -6
- package/dist/icons/components/PencilIcon.js +0 -6
- package/dist/icons/components/PercentageIcon.js +0 -6
- package/dist/icons/components/PhoneIcon.js +0 -6
- package/dist/icons/components/PickGroupRankIcon.js +0 -6
- package/dist/icons/components/PieChartIcon.js +0 -6
- package/dist/icons/components/PinIcon.js +0 -6
- package/dist/icons/components/PinToIcon.js +0 -6
- package/dist/icons/components/PipedTextIcon.js +0 -6
- package/dist/icons/components/PlayIcon.js +0 -6
- package/dist/icons/components/PlaybookIcon.js +0 -6
- package/dist/icons/components/PodcastIcon.js +0 -6
- package/dist/icons/components/PointerHandCursorIcon.js +0 -6
- package/dist/icons/components/PortalConfigIcon.js +0 -6
- package/dist/icons/components/PostcardIcon.js +0 -6
- package/dist/icons/components/PowerIcon.js +0 -6
- package/dist/icons/components/PreIcon.js +0 -6
- package/dist/icons/components/PresentationIcon.js +0 -6
- package/dist/icons/components/PrinterIcon.js +0 -6
- package/dist/icons/components/Priority1Icon.js +0 -6
- package/dist/icons/components/Priority2Icon.js +0 -6
- package/dist/icons/components/Priority3Icon.js +0 -6
- package/dist/icons/components/Priority4Icon.js +0 -6
- package/dist/icons/components/PrivateDataIcon.js +0 -6
- package/dist/icons/components/ProgramIcon.js +0 -6
- package/dist/icons/components/ProjectBarIcon.js +0 -6
- package/dist/icons/components/ProjectIcon.js +0 -6
- package/dist/icons/components/PublishIcon.js +0 -6
- package/dist/icons/components/PxLogoIcon.js +0 -6
- package/dist/icons/components/QRCodeIcon.js +0 -6
- package/dist/icons/components/QuestionBlockIcon.js +0 -6
- package/dist/icons/components/QuoteBoxIcon.js +0 -6
- package/dist/icons/components/QuotesIcon.js +0 -6
- package/dist/icons/components/RSSIcon.js +0 -6
- package/dist/icons/components/RageClickIcon.js +0 -6
- package/dist/icons/components/RainyIcon.js +0 -6
- package/dist/icons/components/RaiseHandIcon.js +0 -6
- package/dist/icons/components/RecodedValuesIcon.js +0 -6
- package/dist/icons/components/RecordIcon.js +0 -6
- package/dist/icons/components/RedoIcon.js +0 -6
- package/dist/icons/components/ReferenceBlockIcon.js +0 -6
- package/dist/icons/components/RefreshIcon.js +0 -6
- package/dist/icons/components/RemoveItemIcon.js +0 -6
- package/dist/icons/components/RemoveLinkIcon.js +0 -6
- package/dist/icons/components/ReplyIcon.js +0 -6
- package/dist/icons/components/ReportIcon.js +0 -6
- package/dist/icons/components/ReputationManagementIcon.js +0 -6
- package/dist/icons/components/RetweetIcon.js +0 -6
- package/dist/icons/components/ReusableChoicesIcon.js +0 -6
- package/dist/icons/components/ReverseIcon.js +0 -6
- package/dist/icons/components/RhoIcon.js +0 -6
- package/dist/icons/components/RichTextEditorIcon.js +0 -6
- package/dist/icons/components/RiskIcon.js +0 -6
- package/dist/icons/components/RobotIcon.js +0 -6
- package/dist/icons/components/RolesIcon.js +0 -6
- package/dist/icons/components/SMSIcon.js +0 -6
- package/dist/icons/components/SatisfactionChartsIcon.js +0 -6
- package/dist/icons/components/SaveIcon.js +0 -6
- package/dist/icons/components/ScheduledIcon.js +0 -6
- package/dist/icons/components/SchemaDataIcon.js +0 -6
- package/dist/icons/components/SchemaEditorIcon.js +0 -6
- package/dist/icons/components/ScorecardIcon.js +0 -6
- package/dist/icons/components/ScreenCaptureIcon.js +0 -6
- package/dist/icons/components/SearchAddIcon.js +0 -6
- package/dist/icons/components/SearchIcon.js +0 -6
- package/dist/icons/components/SegmentIcon.js +0 -6
- package/dist/icons/components/SelectColumnIcon.js +0 -6
- package/dist/icons/components/SendIcon.js +0 -6
- package/dist/icons/components/SentenceCaseIcon.js +0 -6
- package/dist/icons/components/SentimentMixedIcon.js +0 -6
- package/dist/icons/components/SentimentNegativeIcon.js +0 -6
- package/dist/icons/components/SentimentNeutralIcon.js +0 -6
- package/dist/icons/components/SentimentPositiveIcon.js +0 -6
- package/dist/icons/components/SentimentVeryNegativeIcon.js +0 -6
- package/dist/icons/components/SentimentVeryPositiveIcon.js +0 -6
- package/dist/icons/components/SettingsIcon.js +0 -6
- package/dist/icons/components/ShareIcon.js +0 -6
- package/dist/icons/components/SharedFolderIcon.js +0 -6
- package/dist/icons/components/ShieldIcon.js +0 -6
- package/dist/icons/components/ShuffleIcon.js +0 -6
- package/dist/icons/components/SideBySideIcon.js +0 -6
- package/dist/icons/components/SignatureIcon.js +0 -6
- package/dist/icons/components/SkipBackIcon.js +0 -6
- package/dist/icons/components/SkipForwardIcon.js +0 -6
- package/dist/icons/components/SkipIcon.js +0 -6
- package/dist/icons/components/SliderIcon.js +0 -6
- package/dist/icons/components/SliderOptionsIcon.js +0 -6
- package/dist/icons/components/SmallCapsIcon.js +0 -6
- package/dist/icons/components/SocialResponseIcon.js +0 -6
- package/dist/icons/components/SortAlphabeticAscendingIcon.js +0 -6
- package/dist/icons/components/SortAlphabeticDescendingIcon.js +0 -6
- package/dist/icons/components/SortBothIcon.js +0 -6
- package/dist/icons/components/SortDownIcon.js +0 -6
- package/dist/icons/components/SortNumberAscendingIcon.js +0 -6
- package/dist/icons/components/SortNumberDescendingIcon.js +0 -6
- package/dist/icons/components/SortUpIcon.js +0 -6
- package/dist/icons/components/SparkleIcon.js +0 -6
- package/dist/icons/components/SpecialCharactersIcon.js +0 -6
- package/dist/icons/components/SpinnerIcon.js +0 -6
- package/dist/icons/components/SquareMinusIcon.js +0 -6
- package/dist/icons/components/SquarePlusIcon.js +0 -6
- package/dist/icons/components/StarFilledIcon.js +0 -6
- package/dist/icons/components/StarHalfIcon.js +0 -6
- package/dist/icons/components/StarOutlinedIcon.js +0 -6
- package/dist/icons/components/StarRankingIcon.js +0 -6
- package/dist/icons/components/StatsAnalysisIcon.js +0 -6
- package/dist/icons/components/StopRecordingIcon.js +0 -6
- package/dist/icons/components/StormyIcon.js +0 -6
- package/dist/icons/components/StrategicAccountsIcon.js +0 -6
- package/dist/icons/components/StudentIcon.js +0 -6
- package/dist/icons/components/SubscriptIcon.js +0 -6
- package/dist/icons/components/SubtractIcon.js +0 -6
- package/dist/icons/components/SuccessIcon.js +0 -6
- package/dist/icons/components/SumIcon.js +0 -6
- package/dist/icons/components/SunnyIcon.js +0 -6
- package/dist/icons/components/SuperscriptIcon.js +0 -6
- package/dist/icons/components/SurveyCompleteIcon.js +0 -6
- package/dist/icons/components/SurveyDirectorIcon.js +0 -6
- package/dist/icons/components/SurveyExpiredIcon.js +0 -6
- package/dist/icons/components/SurveyIQIcon.js +0 -6
- package/dist/icons/components/SurveyIcon.js +0 -6
- package/dist/icons/components/SurveyInviteIcon.js +0 -6
- package/dist/icons/components/TableAppendIcon.js +0 -6
- package/dist/icons/components/TableIcon.js +0 -6
- package/dist/icons/components/TabletIcon.js +0 -6
- package/dist/icons/components/TagIcon.js +0 -6
- package/dist/icons/components/TeacherIcon.js +0 -6
- package/dist/icons/components/TemplateIcon.js +0 -6
- package/dist/icons/components/TextAlignCenterIcon.js +0 -6
- package/dist/icons/components/TextAlignJustifiedIcon.js +0 -6
- package/dist/icons/components/TextAlignLeftIcon.js +0 -6
- package/dist/icons/components/TextAlignRightIcon.js +0 -6
- package/dist/icons/components/TextAnalysisIcon.js +0 -6
- package/dist/icons/components/TextBlockIcon.js +0 -6
- package/dist/icons/components/TextBoldIcon.js +0 -6
- package/dist/icons/components/TextBottomToTopIcon.js +0 -6
- package/dist/icons/components/TextColorIcon.js +0 -6
- package/dist/icons/components/TextColorLetterIcon.js +0 -6
- package/dist/icons/components/TextColorSwatchIcon.js +0 -6
- package/dist/icons/components/TextEntryIcon.js +0 -6
- package/dist/icons/components/TextItalicIcon.js +0 -6
- package/dist/icons/components/TextLeftToRightIcon.js +0 -6
- package/dist/icons/components/TextRightToLeftIcon.js +0 -6
- package/dist/icons/components/TextStrikeThroughIcon.js +0 -6
- package/dist/icons/components/TextUnderlineIcon.js +0 -6
- package/dist/icons/components/ThirdPartyQuestionIcon.js +0 -6
- package/dist/icons/components/ThreeSixtyProjectIcon.js +0 -6
- package/dist/icons/components/ThumbsDownIcon.js +0 -6
- package/dist/icons/components/ThumbsUpIcon.js +0 -6
- package/dist/icons/components/TicketsIcon.js +0 -6
- package/dist/icons/components/TimingIcon.js +0 -6
- package/dist/icons/components/ToolsIcon.js +0 -6
- package/dist/icons/components/TransactionIcon.js +0 -6
- package/dist/icons/components/TranslationIcon.js +0 -6
- package/dist/icons/components/TrashIcon.js +0 -6
- package/dist/icons/components/UndetectedIcon.js +0 -6
- package/dist/icons/components/UndoIcon.js +0 -6
- package/dist/icons/components/UnionIcon.js +0 -6
- package/dist/icons/components/UniqueLinkIcon.js +0 -6
- package/dist/icons/components/UnlinkIcon.js +0 -6
- package/dist/icons/components/UnlockIcon.js +0 -6
- package/dist/icons/components/UnpinIcon.js +0 -6
- package/dist/icons/components/UpDownIcon.js +0 -6
- package/dist/icons/components/UploadIcon.js +0 -6
- package/dist/icons/components/UpperCaseIcon.js +0 -6
- package/dist/icons/components/UpvoteFilledIcon.js +0 -6
- package/dist/icons/components/UpvoteIcon.js +0 -6
- package/dist/icons/components/UserGroupIcon.js +0 -6
- package/dist/icons/components/UserIcon.js +0 -6
- package/dist/icons/components/UserLockedIcon.js +0 -6
- package/dist/icons/components/ValidationIcon.js +0 -6
- package/dist/icons/components/VariableNamingIcon.js +0 -6
- package/dist/icons/components/VideoIcon.js +0 -6
- package/dist/icons/components/ViewOffIcon.js +0 -6
- package/dist/icons/components/ViewOnIcon.js +0 -6
- package/dist/icons/components/VocalizeDashboardIcon.js +0 -6
- package/dist/icons/components/VolumeIcon.js +0 -6
- package/dist/icons/components/VolumeLowIcon.js +0 -6
- package/dist/icons/components/VolumeMuteIcon.js +0 -6
- package/dist/icons/components/WaffleMenuIcon.js +0 -6
- package/dist/icons/components/WarningIcon.js +0 -6
- package/dist/icons/components/WebhookIcon.js +0 -6
- package/dist/icons/components/WhatsAppIcon.js +0 -6
- package/dist/icons/components/WidgetsIcon.js +0 -6
- package/dist/icons/components/WifiIcon.js +0 -6
- package/dist/icons/components/WorkflowsIcon.js +0 -6
- package/dist/icons/components/WorkingFromHomeIcon.js +0 -6
- package/dist/icons/createIconComponent.js +0 -41
- package/dist/icons/index.d.ts +0 -1004
- package/dist/icons/index.es.js +0 -496
- package/dist/icons/index.js +0 -505
- package/dist/index.d.ts +0 -2100
- package/dist/index.es.js +0 -106
- package/dist/index.js +0 -128
- package/dist/next/AdvancedTable/AdvancedTable.js +0 -913
- package/dist/next/AdvancedTable/AdvancedTable2.js +0 -8
- package/dist/next/AdvancedTable/AdvancedTableCell.js +0 -104
- package/dist/next/AdvancedTable/AdvancedTableCheckbox.js +0 -51
- package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +0 -330
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +0 -141
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaders.js +0 -24
- package/dist/next/AdvancedTable/AdvancedTableDragPreview.js +0 -35
- package/dist/next/AdvancedTable/AdvancedTableHiddenDescription.js +0 -20
- package/dist/next/AdvancedTable/AdvancedTablePagination.js +0 -36
- package/dist/next/AdvancedTable/AdvancedTableRow.js +0 -35
- package/dist/next/AdvancedTable/AdvancedTableRowExpandButton.js +0 -45
- package/dist/next/AdvancedTable/AdvancedTableTypes.js +0 -18
- package/dist/next/AdvancedTable/index.js +0 -3
- package/dist/next/AdvancedTable/useAdvancedTableDragAndDrop.js +0 -171
- package/dist/next/AdvancedTable/useComputedWidth.js +0 -9
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +0 -133
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +0 -8
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInputIconButton.js +0 -30
- package/dist/next/CollapsibleSearchInput/index.js +0 -1
- package/dist/next/Combobox/Combobox.js +0 -85
- package/dist/next/Combobox/Combobox2.js +0 -8
- package/dist/next/Combobox/ComboboxContext.js +0 -9
- package/dist/next/Combobox/ComboboxFlyout.js +0 -53
- package/dist/next/Combobox/ComboboxGroup.js +0 -55
- package/dist/next/Combobox/ComboboxGroupContext.js +0 -19
- package/dist/next/Combobox/ComboboxInput.js +0 -154
- package/dist/next/Combobox/ComboboxOption.js +0 -76
- package/dist/next/Combobox/hooks/index.js +0 -7
- package/dist/next/Combobox/hooks/useComboboxFilteredGroup/index.js +0 -1
- package/dist/next/Combobox/hooks/useComboboxFilteredGroup/useComboboxFilteredGroup.js +0 -43
- package/dist/next/Combobox/hooks/useComboboxFocusSequence/index.js +0 -1
- package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +0 -290
- package/dist/next/Combobox/hooks/useComboboxLoadingState/index.js +0 -1
- package/dist/next/Combobox/hooks/useComboboxLoadingState/useComboboxLoadingState.js +0 -56
- package/dist/next/Combobox/hooks/useComboboxValue/index.js +0 -1
- package/dist/next/Combobox/hooks/useComboboxValue/useComboboxValue.js +0 -35
- package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/index.js +0 -1
- package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/useListboxFlyoutDimensions.js +0 -54
- package/dist/next/Combobox/hooks/useSelectedOptionScroll/index.js +0 -1
- package/dist/next/Combobox/hooks/useSelectedOptionScroll/useSelectedOptionScroll.js +0 -32
- package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/index.js +0 -1
- package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/useShouldRenderGroupHeader.js +0 -28
- package/dist/next/Combobox/index.js +0 -5
- package/dist/next/Combobox/utils/index.js +0 -1
- package/dist/next/Combobox/utils/nodeRegistration/index.js +0 -1
- package/dist/next/Combobox/utils/nodeRegistration/nodeRegistration.js +0 -35
- package/dist/next/Drawer/Drawer.js +0 -134
- package/dist/next/Drawer/Drawer2.js +0 -8
- package/dist/next/Drawer/index.js +0 -1
- package/dist/next/FilterAnchor/FilterAnchor.js +0 -101
- package/dist/next/FilterAnchor/FilterAnchor2.js +0 -8
- package/dist/next/FilterAnchor/index.js +0 -1
- package/dist/next/Input/Input.js +0 -75
- package/dist/next/Input/Input2.js +0 -8
- package/dist/next/Input/index.js +0 -1
- package/dist/next/Menu/Menu.js +0 -90
- package/dist/next/Menu/Menu2.js +0 -8
- package/dist/next/Menu/MenuButton.js +0 -64
- package/dist/next/Menu/MenuContext.js +0 -39
- package/dist/next/Menu/MenuItem.js +0 -81
- package/dist/next/Menu/MenuPane.js +0 -178
- package/dist/next/Menu/MenuSearch.js +0 -37
- package/dist/next/Menu/SubMenu.js +0 -208
- package/dist/next/Menu/constants.js +0 -19
- package/dist/next/Menu/index.js +0 -5
- package/dist/next/Menu/useCSSVariable.js +0 -10
- package/dist/next/Menu/useMutationObserver.js +0 -17
- package/dist/next/Menu/usePaneSearch.js +0 -126
- package/dist/next/PhoneNumberInput/PhoneNumberInput.js +0 -121
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +0 -8
- package/dist/next/PhoneNumberInput/index.js +0 -1
- package/dist/next/SplitButton/SplitButton.js +0 -96
- package/dist/next/SplitButton/SplitButton2.js +0 -8
- package/dist/next/SplitButton/SplitButtonOption.js +0 -22
- package/dist/next/SplitButton/index.js +0 -2
- package/dist/next/Stack/HStack.js +0 -11
- package/dist/next/Stack/Stack.js +0 -95
- package/dist/next/Stack/StackItem.js +0 -37
- package/dist/next/Stack/VStack.js +0 -11
- package/dist/next/Stack/index.js +0 -3
- package/dist/next/TimePicker/TimeDropdown.js +0 -77
- package/dist/next/TimePicker/TimeInput.js +0 -86
- package/dist/next/TimePicker/TimePicker.js +0 -234
- package/dist/next/TimePicker/TimePicker2.js +0 -8
- package/dist/next/TimePicker/TimePickerIcon.js +0 -35
- package/dist/next/TimePicker/index.js +0 -1
- package/dist/next/TimePicker/utils.js +0 -176
- package/dist/next/ToggleButton/ToggleButton.js +0 -74
- package/dist/next/ToggleButton/ToggleButtonGroup.js +0 -40
- package/dist/next/ToggleButton/ToggleButtonGroupContext.js +0 -9
- package/dist/next/ToggleButton/index.js +0 -2
- package/dist/next/ToggleButton/styles.js +0 -8
- package/dist/next/index.d.ts +0 -471
- package/dist/next/index.es.js +0 -38
- package/dist/next/index.js +0 -4965
- package/dist/translations-en.js +0 -69
- package/dist/utils/Flyout/Flyout.js +0 -58
- package/dist/utils/Flyout/Flyout2.js +0 -8
- package/dist/utils/Flyout/FlyoutHeader.js +0 -24
- package/dist/utils/Flyout/FlyoutOption.js +0 -31
- package/dist/utils/Flyout/index.js +0 -3
- package/dist/utils/Popper/Popper.js +0 -191
- package/dist/utils/Popper/Popper2.js +0 -8
- package/dist/utils/Popper/PopperContext.js +0 -11
- package/dist/utils/Popper/index.js +0 -1
- package/dist/utils/Portal/Portal.js +0 -26
- package/dist/utils/Portal/index.js +0 -1
- package/dist/utils/Text/Text.js +0 -38
- package/dist/utils/Text/index.js +0 -1
- package/dist/utils/TextOverflowTooltip/TextOverflowTooltip.js +0 -50
- package/dist/utils/TextOverflowTooltip/index.js +0 -1
- package/dist/utils/Translation/Translate.js +0 -65
- package/dist/utils/Translation/TranslationProvider.js +0 -26
- package/dist/utils/Translation/containsComponentOrElement.js +0 -22
- package/dist/utils/Translation/index.js +0 -3
- package/dist/utils/Translation/insertPlaceholders.js +0 -13
- package/dist/utils/Translation/useTranslation.js +0 -50
- package/dist/utils/canUseDOM/canUseDOM.js +0 -9
- package/dist/utils/canUseDOM/index.js +0 -1
- package/dist/utils/concatIds/concatIds.js +0 -13
- package/dist/utils/concatIds/index.js +0 -1
- package/dist/utils/constants.js +0 -25
- package/dist/utils/createContextUtilities/createContextUtilities.js +0 -19
- package/dist/utils/createContextUtilities/index.js +0 -1
- package/dist/utils/filterChildren/filterChildren.js +0 -53
- package/dist/utils/filterChildren/index.js +0 -1
- package/dist/utils/getSubDataTestId/getSubDataTestId.js +0 -14
- package/dist/utils/getSubDataTestId/index.js +0 -1
- package/dist/utils/index.js +0 -16
- package/dist/utils/mediaQueryManager/index.js +0 -1
- package/dist/utils/mediaQueryManager/mediaQueryManager.js +0 -48
- package/dist/utils/mergeRefs/index.js +0 -1
- package/dist/utils/mergeRefs/mergeRefs.js +0 -27
- package/dist/utils/sharedTypes.js +0 -1
- package/dist/utils/wrapAround/index.js +0 -1
- package/dist/utils/wrapAround/wrapAround.js +0 -23
- package/dist/utils/wrapEvent/index.js +0 -1
- package/dist/utils/wrapEvent/wrapEvent.js +0 -18
- package/icons/package.json +0 -24
- package/next/package.json +0 -27
|
@@ -1,913 +0,0 @@
|
|
|
1
|
-
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
-
import React__default, { useMemo, useState, useCallback, useEffect, useRef } from 'react';
|
|
3
|
-
import classNames from 'classnames';
|
|
4
|
-
import { DndProvider } from 'react-dnd';
|
|
5
|
-
import { HTML5Backend } from 'react-dnd-html5-backend';
|
|
6
|
-
import useResizeObserver from '@react-hook/resize-observer';
|
|
7
|
-
import '../../utils/index.js';
|
|
8
|
-
import '../../hooks/index.js';
|
|
9
|
-
import styles from './AdvancedTable2.js';
|
|
10
|
-
import AdvancedTableColumnHeader from './AdvancedTableColumnHeader.js';
|
|
11
|
-
import AdvancedTableCell from './AdvancedTableCell.js';
|
|
12
|
-
import AdvancedTableRow from './AdvancedTableRow.js';
|
|
13
|
-
import AdvancedTableColumnHeaders from './AdvancedTableColumnHeaders.js';
|
|
14
|
-
import AdvancedTableCheckbox from './AdvancedTableCheckbox.js';
|
|
15
|
-
import AdvancedTableHiddenDescription from './AdvancedTableHiddenDescription.js';
|
|
16
|
-
import AdvancedTableDragPreview from './AdvancedTableDragPreview.js';
|
|
17
|
-
import '../../icons/index.es.js';
|
|
18
|
-
import '../../components/IconButton/index.js';
|
|
19
|
-
import '../../components/Dropdown/index.js';
|
|
20
|
-
import AdvancedTablePagination from './AdvancedTablePagination.js';
|
|
21
|
-
import AdvancedTableRowExpandButton from './AdvancedTableRowExpandButton.js';
|
|
22
|
-
import useId from '../../hooks/useId/useId.js';
|
|
23
|
-
import Dropdown from '../../components/Dropdown/Dropdown.js';
|
|
24
|
-
import DropdownButton from '../../components/Dropdown/DropdownButton.js';
|
|
25
|
-
import IconButton from '../../components/IconButton/IconButton.js';
|
|
26
|
-
import EllipsisHorizontalIcon from '../../icons/components/EllipsisHorizontalIcon.js';
|
|
27
|
-
import DropdownList from '../../components/Dropdown/DropdownList.js';
|
|
28
|
-
import DropdownOption from '../../components/Dropdown/DropdownOption.js';
|
|
29
|
-
import DropdownHeader from '../../components/Dropdown/DropdownHeader.js';
|
|
30
|
-
import concatIds from '../../utils/concatIds/concatIds.js';
|
|
31
|
-
import useControllableState from '../../hooks/useControllableState/useControllableState.js';
|
|
32
|
-
import { useDidUpdate } from '../../hooks/useDidUpdate/useDidUpdate.js';
|
|
33
|
-
import useEventCallback from '../../hooks/useEventCallback/useEventCallback.js';
|
|
34
|
-
import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
|
|
35
|
-
import useLatest from '../../hooks/useLatest/useLatest.js';
|
|
36
|
-
import wrapAround from '../../utils/wrapAround/wrapAround.js';
|
|
37
|
-
|
|
38
|
-
const AdvancedTable = _ref => {
|
|
39
|
-
var _ref5;
|
|
40
|
-
let {
|
|
41
|
-
columnConfigs: externalColumnConfigs,
|
|
42
|
-
rows: rowsPropExternal,
|
|
43
|
-
onRowsChange,
|
|
44
|
-
onRowSelect,
|
|
45
|
-
selectedRowId: externalSelectedRowId,
|
|
46
|
-
onCheckedRowIdsChange,
|
|
47
|
-
checkedRowIds: externalCheckedRowIds,
|
|
48
|
-
onSelectedSortOptionChange,
|
|
49
|
-
defaultSelectedSortOption = {
|
|
50
|
-
columnId: '',
|
|
51
|
-
index: -1,
|
|
52
|
-
direction: 'none'
|
|
53
|
-
},
|
|
54
|
-
selectedSortOption: externalSelectedSortOption,
|
|
55
|
-
disableUserPinnableColumns = false,
|
|
56
|
-
initialPinnedColumns = [],
|
|
57
|
-
pinnedColumns: exteralPinnedColumns,
|
|
58
|
-
onPinnedColumnsChange,
|
|
59
|
-
disableUserReorderableColumns = false,
|
|
60
|
-
columnOrder: externalColumnOrder,
|
|
61
|
-
onColumnOrderChange,
|
|
62
|
-
disableUserResizableColumns,
|
|
63
|
-
columnWidths: externalColumnWidths,
|
|
64
|
-
onColumnWidthsChange,
|
|
65
|
-
id: externalTableId,
|
|
66
|
-
rowsPerPage,
|
|
67
|
-
initialPage,
|
|
68
|
-
onPageChange,
|
|
69
|
-
paginationAriaLabel,
|
|
70
|
-
'aria-labelledby': ariaLabelledBy,
|
|
71
|
-
'aria-label': ariaLabel,
|
|
72
|
-
'aria-describedby': externalAriaDescribedBy,
|
|
73
|
-
'data-testid': dataTestId,
|
|
74
|
-
rowActions,
|
|
75
|
-
rowActionsButtonAriaLabel,
|
|
76
|
-
headerMaxLines
|
|
77
|
-
} = _ref;
|
|
78
|
-
// This handles an edge case where no rows are passed in
|
|
79
|
-
// and the internal row transforms cause infinite state updates using a standard default assignment
|
|
80
|
-
const stableDefaultArray = useMemo(() => [], []);
|
|
81
|
-
const rowsProp = rowsPropExternal !== null && rowsPropExternal !== void 0 ? rowsPropExternal : stableDefaultArray;
|
|
82
|
-
const rows = useMemo(() => {
|
|
83
|
-
let filteredRows = [];
|
|
84
|
-
rowsProp.forEach((row, i) => {
|
|
85
|
-
filteredRows = filteredRows.concat(mapExternalRowToInternalRows(row, rowsProp.length + 1, i + 1) // add 1 to account for table header
|
|
86
|
-
);
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
return filteredRows;
|
|
90
|
-
}, [rowsProp]);
|
|
91
|
-
const rowActionsColumnConfigId = useId();
|
|
92
|
-
let rowActionsColumnConfig;
|
|
93
|
-
const columnConfigs = useMemo(() => [...externalColumnConfigs],
|
|
94
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
95
|
-
[externalColumnConfigs, rows] // columnConfigs has an implicit dependency on rows because it is initially computed using rows data
|
|
96
|
-
);
|
|
97
|
-
|
|
98
|
-
const [currentPage, setCurrentPage] = useState(initialPage !== null && initialPage !== void 0 ? initialPage : 1);
|
|
99
|
-
const [tableHeight, setTableHeight] = useState();
|
|
100
|
-
const getPaginatedRowIndex = useCallback(universalRowIndex => rowsPerPage ? universalRowIndex + rowsPerPage * (currentPage - 1) : universalRowIndex, [rowsPerPage, currentPage]);
|
|
101
|
-
const paginatedRows = useMemo(() => {
|
|
102
|
-
if (!rows || !rowsPerPage || !currentPage) {
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
const startingRowIndex = (currentPage - 1) * rowsPerPage;
|
|
106
|
-
const endingRowIndex = startingRowIndex + rowsPerPage;
|
|
107
|
-
return rows.slice(startingRowIndex, endingRowIndex);
|
|
108
|
-
}, [rows, rowsPerPage, currentPage]);
|
|
109
|
-
useEffect(() => {
|
|
110
|
-
if (rows && rowsPerPage) {
|
|
111
|
-
const pageCount = Math.ceil(rows.length / rowsPerPage);
|
|
112
|
-
if (currentPage > pageCount) setCurrentPage(Math.max(pageCount, 1));
|
|
113
|
-
}
|
|
114
|
-
}, [rows, rowsPerPage, paginatedRows, currentPage]);
|
|
115
|
-
if (rowActions && columnConfigs[columnConfigs.length - 1].id !== rowActionsColumnConfigId) {
|
|
116
|
-
rowActionsColumnConfig = {
|
|
117
|
-
id: rowActionsColumnConfigId,
|
|
118
|
-
width: '44px',
|
|
119
|
-
alignment: 'center',
|
|
120
|
-
renderCellContent: _ref2 => {
|
|
121
|
-
let {
|
|
122
|
-
rowIndex,
|
|
123
|
-
isEditing,
|
|
124
|
-
focusCell,
|
|
125
|
-
focusableElementRef
|
|
126
|
-
} = _ref2;
|
|
127
|
-
return /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
128
|
-
value: 0
|
|
129
|
-
}, /*#__PURE__*/React__default.createElement(DropdownButton, null, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
130
|
-
"aria-label": rowActionsButtonAriaLabel,
|
|
131
|
-
tabIndex: isEditing ? 0 : -1,
|
|
132
|
-
ref: focusableElementRef,
|
|
133
|
-
onKeyDown: e => {
|
|
134
|
-
if (e.key === 'Escape') {
|
|
135
|
-
focusCell();
|
|
136
|
-
e.preventDefault(); // Prevent Safari from exiting full-screen mode
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}, /*#__PURE__*/React__default.createElement(EllipsisHorizontalIcon, null))), /*#__PURE__*/React__default.createElement(DropdownList, {
|
|
140
|
-
className: styles.rowActionMenuPane
|
|
141
|
-
}, !rows ? [] : rowActions === null || rowActions === void 0 ? void 0 : rowActions.map((actionGroup, groupIndex) => {
|
|
142
|
-
var _actionGroup$actions;
|
|
143
|
-
const row = rows[rowIndex];
|
|
144
|
-
const actions = !row ? [] : (_actionGroup$actions = actionGroup.actions) === null || _actionGroup$actions === void 0 ? void 0 : _actionGroup$actions.map((action, actionIndex) => /*#__PURE__*/React__default.createElement(DropdownOption
|
|
145
|
-
// React Docs: "We don't recommend using indexes for keys if the order of items may change." These will not change; the alternative is to require an id from the consumer.
|
|
146
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
147
|
-
, {
|
|
148
|
-
key: "".concat(groupIndex, "-").concat(actionIndex),
|
|
149
|
-
disabled: typeof action.isDisabled === 'function' ? action.isDisabled(row && row.rowPropReference) : action.isDisabled,
|
|
150
|
-
onSelect: () => action.action(row && row.rowPropReference),
|
|
151
|
-
value: "",
|
|
152
|
-
label: ""
|
|
153
|
-
}, typeof action.label === 'function' ? action.label(row.rowPropReference) : action.label));
|
|
154
|
-
if (actionGroup.header) {
|
|
155
|
-
return /*#__PURE__*/React__default.createElement(DropdownHeader
|
|
156
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
157
|
-
, {
|
|
158
|
-
key: groupIndex,
|
|
159
|
-
title: actionGroup.header
|
|
160
|
-
}, actions);
|
|
161
|
-
}
|
|
162
|
-
return actions;
|
|
163
|
-
})));
|
|
164
|
-
},
|
|
165
|
-
headerLabel: ''
|
|
166
|
-
};
|
|
167
|
-
columnConfigs.push(rowActionsColumnConfig);
|
|
168
|
-
}
|
|
169
|
-
const tableRef = useRef(null);
|
|
170
|
-
const hasOnRowSelect = typeof onRowSelect === 'function';
|
|
171
|
-
const hasCheckboxColumn = typeof onCheckedRowIdsChange === 'function';
|
|
172
|
-
const hasFocusableRows = hasOnRowSelect || hasCheckboxColumn;
|
|
173
|
-
const headerRowIndex = -1; // The header row (the first row in the table) gets an index of -1 so that the data rows can be zero-indexed
|
|
174
|
-
const minRowIndex = useMemo(() => rowsPerPage ? rowsPerPage * (currentPage - 1) : 0, [rowsPerPage, currentPage]);
|
|
175
|
-
const maxRowIndex = useMemo(() => !rows ? 0 : rowsPerPage ? Math.min(rowsPerPage + rowsPerPage * (currentPage - 1) - 1, rows.length - 1) : rows.length - 1, [rowsPerPage, currentPage, rows]);
|
|
176
|
-
const maxRowDepth = useMemo(() => !rows ? 0 : Math.max(...rows.map(r => r.depth)), [rows]);
|
|
177
|
-
const widthBufferWidth = 36;
|
|
178
|
-
const columnWidthBuffers = useMemo(() => {
|
|
179
|
-
const buffers = [0];
|
|
180
|
-
for (let i = 0; i < maxRowDepth + 1; i += 1) {
|
|
181
|
-
buffers[i] = widthBufferWidth * (maxRowDepth - i);
|
|
182
|
-
}
|
|
183
|
-
return buffers;
|
|
184
|
-
}, [maxRowDepth]);
|
|
185
|
-
const minColumnIndex = hasFocusableRows ? -1 : 0; // When entire rows are focusable, they get an index of -1 so that the columns can be zero-indexed
|
|
186
|
-
const maxColumnIndex = columnConfigs.length - 1;
|
|
187
|
-
const tableId = useId(externalTableId);
|
|
188
|
-
const arrowKeyDescriptionId = "".concat(tableId, "-arrowKeyDescription");
|
|
189
|
-
const rowActionDescriptionId = "".concat(tableId, "-rowActionDescription");
|
|
190
|
-
const rowCheckboxDescriptionId = "".concat(tableId, "-rowCheckboxDescription");
|
|
191
|
-
useResizeObserver(tableRef, entry => {
|
|
192
|
-
setTableHeight(entry.contentRect.height);
|
|
193
|
-
});
|
|
194
|
-
const ariaDescribedBy = concatIds(externalAriaDescribedBy, arrowKeyDescriptionId, hasOnRowSelect && rowActionDescriptionId, hasCheckboxColumn && rowCheckboxDescriptionId);
|
|
195
|
-
const [pinnedColumns, setPinnedColumns] = useControllableState(initialPinnedColumns, onPinnedColumnsChange, exteralPinnedColumns);
|
|
196
|
-
const [columnWidths, setColumnWidths] = useControllableState({}, onColumnWidthsChange, externalColumnWidths);
|
|
197
|
-
const columnConfigsOrder = useMemo(() => columnConfigs.map(c => c.id), [columnConfigs]);
|
|
198
|
-
const [internalColumnOrder, setInternalColumnOrder] = useState(columnConfigsOrder);
|
|
199
|
-
|
|
200
|
-
// If columnConfigs changes, the internal column order may need to be updated (this is why useControllableState isn't being used).
|
|
201
|
-
useDidUpdate(() => {
|
|
202
|
-
setInternalColumnOrder(columnConfigsOrder);
|
|
203
|
-
}, [JSON.stringify(columnConfigsOrder)]);
|
|
204
|
-
const columnOrder = externalColumnOrder !== null && externalColumnOrder !== void 0 ? externalColumnOrder : internalColumnOrder;
|
|
205
|
-
const setColumnOrder = useEventCallback(value => {
|
|
206
|
-
const newColumnOrder = typeof value === 'function' ? value(columnOrder) : value;
|
|
207
|
-
setInternalColumnOrder(newColumnOrder);
|
|
208
|
-
onColumnOrderChange === null || onColumnOrderChange === void 0 ? void 0 : onColumnOrderChange(newColumnOrder);
|
|
209
|
-
});
|
|
210
|
-
const {
|
|
211
|
-
pinnedColumnConfigs,
|
|
212
|
-
unpinnedColumnConfigs,
|
|
213
|
-
pinnedUnpinnedColumnOrder
|
|
214
|
-
} = useMemo(() => {
|
|
215
|
-
// Set and Map used for faster lookups
|
|
216
|
-
const pinnedColumnsSet = new Set(pinnedColumns);
|
|
217
|
-
const columnConfigsMap = new Map();
|
|
218
|
-
columnConfigs.forEach(c => {
|
|
219
|
-
columnConfigsMap.set(c.id, c);
|
|
220
|
-
});
|
|
221
|
-
const pinnedColumnConfigs = pinnedColumns.map(id => columnConfigsMap.get(id));
|
|
222
|
-
const unpinnedColumnOrder = columnOrder.filter(id => !pinnedColumnsSet.has(id) && columnConfigsMap.has(id));
|
|
223
|
-
const unpinnedColumnConfigs = unpinnedColumnOrder.map(id => columnConfigsMap.get(id));
|
|
224
|
-
const pinnedUnpinnedColumnOrder = [...pinnedColumnConfigs.map(c => c.id), ...unpinnedColumnConfigs.map(c => c.id)];
|
|
225
|
-
return {
|
|
226
|
-
pinnedColumnConfigs,
|
|
227
|
-
unpinnedColumnConfigs,
|
|
228
|
-
pinnedUnpinnedColumnOrder
|
|
229
|
-
};
|
|
230
|
-
}, [columnConfigs, pinnedColumns, columnOrder]);
|
|
231
|
-
const [selectedRowId, setSelectedRowId] = useControllableState('', undefined, externalSelectedRowId);
|
|
232
|
-
const [checkedRowIds, setCheckedRowIds] = useControllableState([], onCheckedRowIdsChange, externalCheckedRowIds);
|
|
233
|
-
const [selectedSortOption, setSelectedSortOption] = useControllableState(defaultSelectedSortOption, onSelectedSortOptionChange, externalSelectedSortOption);
|
|
234
|
-
const [dragSource, setDragSource] = useState('');
|
|
235
|
-
const [dropTarget, setDropTarget] = useState('');
|
|
236
|
-
const [dropTargetSide, setDropTargetSide] = useState();
|
|
237
|
-
const [lastToggledRowId, setLastToggledRowId] = useState('');
|
|
238
|
-
|
|
239
|
-
// Enables using Set.prototype.has() vs Array.prototype.includes() for better performance at scale
|
|
240
|
-
const [checkedRowIdsSet, setCheckedRowIdsSet] = useState(new Set(checkedRowIds));
|
|
241
|
-
useSortedRows({
|
|
242
|
-
columnConfigs,
|
|
243
|
-
onRowsChange,
|
|
244
|
-
selectedSortOption,
|
|
245
|
-
setCurrentPage
|
|
246
|
-
});
|
|
247
|
-
useEffect(() => {
|
|
248
|
-
setCheckedRowIdsSet(new Set(checkedRowIds));
|
|
249
|
-
}, [checkedRowIds]);
|
|
250
|
-
const {
|
|
251
|
-
focusedRowIndex,
|
|
252
|
-
focusedColumnIndex,
|
|
253
|
-
updateRowFocusIndex,
|
|
254
|
-
updateColumnFocusIndex,
|
|
255
|
-
setFocusedColumnId,
|
|
256
|
-
createRef,
|
|
257
|
-
createPinnedContainerRef,
|
|
258
|
-
cellRefs
|
|
259
|
-
} = useFocusState({
|
|
260
|
-
headerRowIndex,
|
|
261
|
-
maxRowIndex,
|
|
262
|
-
minColumnIndex,
|
|
263
|
-
maxColumnIndex,
|
|
264
|
-
hasFocusableRows,
|
|
265
|
-
pinnedUnpinnedColumnOrder,
|
|
266
|
-
tableRef,
|
|
267
|
-
currentPage
|
|
268
|
-
});
|
|
269
|
-
const getAllRowIds = useCallback(function () {
|
|
270
|
-
let rowsToScan = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : rowsProp;
|
|
271
|
-
let ids = [];
|
|
272
|
-
rowsToScan.forEach(row => {
|
|
273
|
-
ids.push(row.id);
|
|
274
|
-
if (row.childRows && row.childRows.length) {
|
|
275
|
-
ids = ids.concat(getAllRowIds(row.childRows));
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
return ids;
|
|
279
|
-
}, [rowsProp]);
|
|
280
|
-
const totalRowsCountWithExpansion = useMemo(() => getAllRowIds().length, [getAllRowIds]);
|
|
281
|
-
const hasExpandableRows = useMemo(() => rows === null || rows === void 0 ? void 0 : rows.some(_ref3 => {
|
|
282
|
-
let {
|
|
283
|
-
hasChildRows
|
|
284
|
-
} = _ref3;
|
|
285
|
-
return hasChildRows;
|
|
286
|
-
}), [rows]);
|
|
287
|
-
const updateExpandedRowIds = (index, expand) => {
|
|
288
|
-
if (!rows || !rows[index]) {
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
const {
|
|
292
|
-
isExpanded,
|
|
293
|
-
rowPropReference
|
|
294
|
-
} = rows[index];
|
|
295
|
-
if (isExpanded && expand !== true) {
|
|
296
|
-
rowPropReference.isExpanded = false;
|
|
297
|
-
} else if (expand !== false) {
|
|
298
|
-
rowPropReference.isExpanded = true;
|
|
299
|
-
}
|
|
300
|
-
onRowsChange === null || onRowsChange === void 0 ? void 0 : onRowsChange([...rowsProp]);
|
|
301
|
-
};
|
|
302
|
-
const getLastToggledRowIndex = () => {
|
|
303
|
-
const index = rows === null || rows === void 0 ? void 0 : rows.findIndex(_ref4 => {
|
|
304
|
-
let {
|
|
305
|
-
id
|
|
306
|
-
} = _ref4;
|
|
307
|
-
return id === lastToggledRowId;
|
|
308
|
-
});
|
|
309
|
-
return index === -1 ? 0 : index;
|
|
310
|
-
};
|
|
311
|
-
const getCheckboxStateForRow = row => {
|
|
312
|
-
if (checkedRowIdsSet.has(row.id)) {
|
|
313
|
-
return 'true';
|
|
314
|
-
}
|
|
315
|
-
if (row.hasChildRows && getAllRowIds(row.rowPropReference.childRows).some(id => checkedRowIdsSet.has(id))) {
|
|
316
|
-
return 'mixed';
|
|
317
|
-
}
|
|
318
|
-
return 'false';
|
|
319
|
-
};
|
|
320
|
-
const handleColumnHeaderCheckboxToggle = () => {
|
|
321
|
-
setLastToggledRowId('');
|
|
322
|
-
if (checkedRowIds.length === totalRowsCountWithExpansion) {
|
|
323
|
-
setCheckedRowIds([]);
|
|
324
|
-
} else {
|
|
325
|
-
setCheckedRowIds(getAllRowIds());
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
|
-
const multiUpdateCheckedRowIds = (startIndex, endIndex) => {
|
|
329
|
-
var _rows$endIndex;
|
|
330
|
-
if (!rows || startIndex === headerRowIndex || endIndex === headerRowIndex) {
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
const endRowId = rows === null || rows === void 0 || (_rows$endIndex = rows[endIndex]) === null || _rows$endIndex === void 0 ? void 0 : _rows$endIndex.id;
|
|
334
|
-
const isEndIndexChecked = checkedRowIdsSet.has(endRowId);
|
|
335
|
-
let newCheckedRowIds = [...checkedRowIds];
|
|
336
|
-
const increment = startIndex < endIndex ? 1 : -1;
|
|
337
|
-
for (let i = startIndex; i !== endIndex + increment; i += increment) {
|
|
338
|
-
const {
|
|
339
|
-
id: rowId,
|
|
340
|
-
hasChildRows,
|
|
341
|
-
rowPropReference
|
|
342
|
-
} = rows[i];
|
|
343
|
-
if (isEndIndexChecked) {
|
|
344
|
-
let idsToUncheck = [rowId];
|
|
345
|
-
if (hasChildRows) {
|
|
346
|
-
idsToUncheck = idsToUncheck.concat(getAllRowIds(rowPropReference.childRows));
|
|
347
|
-
}
|
|
348
|
-
if (hasChildRows) {
|
|
349
|
-
idsToUncheck = idsToUncheck.concat(getAllRowIds(rowPropReference.childRows));
|
|
350
|
-
}
|
|
351
|
-
newCheckedRowIds = newCheckedRowIds.filter(id => !idsToUncheck.includes(id));
|
|
352
|
-
} else if (!checkedRowIdsSet.has(rowId)) {
|
|
353
|
-
let idsToCheck = [rowId];
|
|
354
|
-
if (hasChildRows) {
|
|
355
|
-
idsToCheck = idsToCheck.concat(getAllRowIds(rowPropReference.childRows));
|
|
356
|
-
}
|
|
357
|
-
newCheckedRowIds = newCheckedRowIds.concat(idsToCheck);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
setLastToggledRowId(endRowId);
|
|
361
|
-
setCheckedRowIds(newCheckedRowIds);
|
|
362
|
-
};
|
|
363
|
-
const singleUpdateCheckedRowIds = index => {
|
|
364
|
-
if (!rows) {
|
|
365
|
-
return;
|
|
366
|
-
}
|
|
367
|
-
const {
|
|
368
|
-
id: rowId,
|
|
369
|
-
rowPropReference,
|
|
370
|
-
hasChildRows
|
|
371
|
-
} = rows[index];
|
|
372
|
-
setLastToggledRowId(rowId);
|
|
373
|
-
if (checkedRowIdsSet.has(rowId)) {
|
|
374
|
-
let idsToUncheck = [rowId];
|
|
375
|
-
if (hasChildRows) {
|
|
376
|
-
idsToUncheck = idsToUncheck.concat(getAllRowIds(rowPropReference.childRows));
|
|
377
|
-
}
|
|
378
|
-
setCheckedRowIds(checkedRowIds.filter(id => !idsToUncheck.includes(id)));
|
|
379
|
-
} else {
|
|
380
|
-
let idsToCheck = [rowId];
|
|
381
|
-
if (hasChildRows) {
|
|
382
|
-
idsToCheck = idsToCheck.concat(getAllRowIds(rowPropReference.childRows).filter(r => !checkedRowIdsSet.has(r)));
|
|
383
|
-
}
|
|
384
|
-
setCheckedRowIds([...checkedRowIds, ...idsToCheck]);
|
|
385
|
-
}
|
|
386
|
-
};
|
|
387
|
-
const onCellFocus = (rowIndex, columnIndex) => () => {
|
|
388
|
-
updateRowFocusIndex(rowIndex);
|
|
389
|
-
updateColumnFocusIndex(columnIndex);
|
|
390
|
-
};
|
|
391
|
-
const onRowFocus = (rowIndex, columnIndex) => e => {
|
|
392
|
-
if (e.target !== e.currentTarget) return;
|
|
393
|
-
updateRowFocusIndex(rowIndex);
|
|
394
|
-
updateColumnFocusIndex(columnIndex);
|
|
395
|
-
};
|
|
396
|
-
const onKeyDown = rowIndex => e => {
|
|
397
|
-
if (!rows || e.target !== e.currentTarget) return; // Ensures only rows/cells trigger grid navigation
|
|
398
|
-
let newFocusedRowIndex;
|
|
399
|
-
const currentRow = rows[rowIndex];
|
|
400
|
-
const rowOrFirstColumnIsFocused = focusedColumnIndex <= 0;
|
|
401
|
-
const rowCanExpand = (currentRow === null || currentRow === void 0 ? void 0 : currentRow.hasChildRows) && !(currentRow !== null && currentRow !== void 0 && currentRow.isExpanded);
|
|
402
|
-
const rowCanCollapse = (currentRow === null || currentRow === void 0 ? void 0 : currentRow.hasChildRows) && (currentRow === null || currentRow === void 0 ? void 0 : currentRow.isExpanded);
|
|
403
|
-
switch (e.key) {
|
|
404
|
-
case 'ArrowUp':
|
|
405
|
-
e.preventDefault(); // prevent scroll
|
|
406
|
-
newFocusedRowIndex = updateRowFocusIndex(rowIndex === minRowIndex ? headerRowIndex : rowIndex - 1);
|
|
407
|
-
if (e.shiftKey) {
|
|
408
|
-
multiUpdateCheckedRowIds(rowIndex, newFocusedRowIndex);
|
|
409
|
-
}
|
|
410
|
-
break;
|
|
411
|
-
case 'ArrowDown':
|
|
412
|
-
e.preventDefault(); // prevent scroll
|
|
413
|
-
newFocusedRowIndex = updateRowFocusIndex(rowIndex === headerRowIndex ? minRowIndex : rowIndex + 1);
|
|
414
|
-
if (e.shiftKey) {
|
|
415
|
-
multiUpdateCheckedRowIds(rowIndex, newFocusedRowIndex);
|
|
416
|
-
}
|
|
417
|
-
break;
|
|
418
|
-
case 'ArrowLeft':
|
|
419
|
-
e.preventDefault(); // prevent scroll
|
|
420
|
-
// If the row is expanded and on the first cell, collapse the row
|
|
421
|
-
if (e.shiftKey || rowOrFirstColumnIsFocused && rowCanCollapse) {
|
|
422
|
-
updateExpandedRowIds(rowIndex, false);
|
|
423
|
-
break;
|
|
424
|
-
}
|
|
425
|
-
updateColumnFocusIndex(focusedColumnIndex - 1);
|
|
426
|
-
break;
|
|
427
|
-
case 'ArrowRight':
|
|
428
|
-
e.preventDefault(); // prevent scroll
|
|
429
|
-
// If the row is collapsed and on the first cell, expand the row
|
|
430
|
-
if (e.shiftKey || rowOrFirstColumnIsFocused && rowCanExpand) {
|
|
431
|
-
updateExpandedRowIds(rowIndex, true);
|
|
432
|
-
break;
|
|
433
|
-
}
|
|
434
|
-
updateColumnFocusIndex(focusedColumnIndex + 1);
|
|
435
|
-
break;
|
|
436
|
-
case 'PageUp':
|
|
437
|
-
e.preventDefault(); // prevent scroll
|
|
438
|
-
updateRowFocusIndex(headerRowIndex);
|
|
439
|
-
break;
|
|
440
|
-
case 'PageDown':
|
|
441
|
-
e.preventDefault(); // prevent scroll
|
|
442
|
-
updateRowFocusIndex(maxRowIndex);
|
|
443
|
-
break;
|
|
444
|
-
case 'Home':
|
|
445
|
-
e.preventDefault(); // prevent scroll
|
|
446
|
-
updateColumnFocusIndex(minColumnIndex);
|
|
447
|
-
if (e.ctrlKey) {
|
|
448
|
-
updateRowFocusIndex(headerRowIndex);
|
|
449
|
-
}
|
|
450
|
-
break;
|
|
451
|
-
case 'End':
|
|
452
|
-
e.preventDefault(); // prevent scroll
|
|
453
|
-
updateColumnFocusIndex(maxColumnIndex);
|
|
454
|
-
if (e.ctrlKey) {
|
|
455
|
-
updateRowFocusIndex(maxRowIndex);
|
|
456
|
-
}
|
|
457
|
-
break;
|
|
458
|
-
case ' ':
|
|
459
|
-
e.preventDefault(); // prevent scroll
|
|
460
|
-
if (rowIndex === headerRowIndex) {
|
|
461
|
-
handleColumnHeaderCheckboxToggle();
|
|
462
|
-
} else if (e.shiftKey) {
|
|
463
|
-
multiUpdateCheckedRowIds(getLastToggledRowIndex(), rowIndex);
|
|
464
|
-
} else {
|
|
465
|
-
singleUpdateCheckedRowIds(rowIndex);
|
|
466
|
-
}
|
|
467
|
-
break;
|
|
468
|
-
default:
|
|
469
|
-
break;
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
const getColumnHeaderProps = (columnConfig, columnIndex, isPinned) => {
|
|
473
|
-
var _columnWidths$id;
|
|
474
|
-
const rowIndex = headerRowIndex;
|
|
475
|
-
const {
|
|
476
|
-
id,
|
|
477
|
-
headerLabel,
|
|
478
|
-
width,
|
|
479
|
-
alignment,
|
|
480
|
-
sortOptions
|
|
481
|
-
} = columnConfig;
|
|
482
|
-
const isRowActionMenuColumn = rowActionsColumnConfigId === id;
|
|
483
|
-
return {
|
|
484
|
-
id,
|
|
485
|
-
isRowActionMenuColumn,
|
|
486
|
-
'data-testid': dataTestId && id ? "".concat(dataTestId, "-").concat(id) : undefined,
|
|
487
|
-
label: headerLabel,
|
|
488
|
-
width: (_columnWidths$id = columnWidths[id]) !== null && _columnWidths$id !== void 0 ? _columnWidths$id : width,
|
|
489
|
-
widthBuffer: columnIndex === 0 && maxRowDepth > 0 ? columnWidthBuffers[0] : undefined,
|
|
490
|
-
onWidthChange: disableUserResizableColumns || isRowActionMenuColumn ? undefined : newWidth => {
|
|
491
|
-
setColumnWidths(currentColumnWidths => {
|
|
492
|
-
const newColumnsWidths = columnOrder.reduce((map, colId, index) => {
|
|
493
|
-
if (colId === id) {
|
|
494
|
-
map[colId] = newWidth;
|
|
495
|
-
} else if (currentColumnWidths[colId]) {
|
|
496
|
-
map[colId] = currentColumnWidths[colId];
|
|
497
|
-
} else {
|
|
498
|
-
var _cellRefs$current;
|
|
499
|
-
const colRef = (_cellRefs$current = cellRefs.current) === null || _cellRefs$current === void 0 || (_cellRefs$current = _cellRefs$current[headerRowIndex]) === null || _cellRefs$current === void 0 ? void 0 : _cellRefs$current[index];
|
|
500
|
-
map[colId] = colRef === null || colRef === void 0 ? void 0 : colRef.getBoundingClientRect().width;
|
|
501
|
-
}
|
|
502
|
-
return map;
|
|
503
|
-
}, {});
|
|
504
|
-
return newColumnsWidths;
|
|
505
|
-
});
|
|
506
|
-
},
|
|
507
|
-
alignment,
|
|
508
|
-
columnIndex,
|
|
509
|
-
isFocused: rowIndex === focusedRowIndex && columnIndex === focusedColumnIndex,
|
|
510
|
-
onFocus: onCellFocus(rowIndex, columnIndex),
|
|
511
|
-
setFocusedColumnId,
|
|
512
|
-
sortOptions,
|
|
513
|
-
selectedSortOption,
|
|
514
|
-
setSelectedSortOption,
|
|
515
|
-
onKeyDown: onKeyDown(rowIndex),
|
|
516
|
-
minUnpinnedColumnIndex: pinnedColumns.length,
|
|
517
|
-
maxUnpinnedColumnIndex: maxColumnIndex,
|
|
518
|
-
disableUserPinnableColumns,
|
|
519
|
-
isPinned,
|
|
520
|
-
setPinnedColumns,
|
|
521
|
-
disableUserReorderableColumns,
|
|
522
|
-
setColumnOrder,
|
|
523
|
-
isDragging: dragSource === id,
|
|
524
|
-
setDragSource,
|
|
525
|
-
setDropTarget,
|
|
526
|
-
setDropTargetSide,
|
|
527
|
-
dropTargetSide: dropTarget === id ? dropTargetSide : undefined,
|
|
528
|
-
tableId,
|
|
529
|
-
tableHeight,
|
|
530
|
-
key: id,
|
|
531
|
-
ref: createRef(rowIndex, columnIndex),
|
|
532
|
-
headerMaxLines
|
|
533
|
-
};
|
|
534
|
-
};
|
|
535
|
-
const getAdvancedTableRowExpandButton = (rowId, isExpanded, rowIndex) => /*#__PURE__*/React__default.createElement(AdvancedTableRowExpandButton, {
|
|
536
|
-
"data-testid": dataTestId && rowId ? "".concat(dataTestId, "-row-").concat(rowId, "-expand-button") : undefined,
|
|
537
|
-
isRowExpanded: !!isExpanded,
|
|
538
|
-
onClick: e => {
|
|
539
|
-
e.stopPropagation(); // prevent onRowSelect
|
|
540
|
-
e.preventDefault();
|
|
541
|
-
updateExpandedRowIds(rowIndex);
|
|
542
|
-
}
|
|
543
|
-
});
|
|
544
|
-
const getExpandableRowsSpacer = function (width, inHeader) {
|
|
545
|
-
let children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
546
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
547
|
-
className: classNames(styles.advancedTableExpandRowSpacer, {
|
|
548
|
-
[styles.header]: inHeader
|
|
549
|
-
}),
|
|
550
|
-
style: {
|
|
551
|
-
width
|
|
552
|
-
},
|
|
553
|
-
role: "presentation"
|
|
554
|
-
}, children);
|
|
555
|
-
};
|
|
556
|
-
const getCellProps = (columnConfig, columnIndex, data, rowIndex, rowId, depth) => {
|
|
557
|
-
var _columnWidths$columnI;
|
|
558
|
-
const {
|
|
559
|
-
id: columnId,
|
|
560
|
-
width,
|
|
561
|
-
alignment,
|
|
562
|
-
renderCellContent,
|
|
563
|
-
isCellContentInteractive
|
|
564
|
-
} = columnConfig;
|
|
565
|
-
const value = data[columnId];
|
|
566
|
-
return {
|
|
567
|
-
value,
|
|
568
|
-
setValue: newValue => {
|
|
569
|
-
const newRows = [...rowsProp];
|
|
570
|
-
newRows[rowIndex].data[columnId] = newValue;
|
|
571
|
-
onRowsChange === null || onRowsChange === void 0 ? void 0 : onRowsChange(newRows);
|
|
572
|
-
},
|
|
573
|
-
renderCellContent,
|
|
574
|
-
isCellContentInteractive,
|
|
575
|
-
width: (_columnWidths$columnI = columnWidths[columnId]) !== null && _columnWidths$columnI !== void 0 ? _columnWidths$columnI : width,
|
|
576
|
-
widthBuffer: columnIndex === 0 && maxRowDepth > 0 ? columnWidthBuffers[depth] : undefined,
|
|
577
|
-
alignment,
|
|
578
|
-
rowId,
|
|
579
|
-
columnId,
|
|
580
|
-
rowIndex,
|
|
581
|
-
columnIndex,
|
|
582
|
-
'data-testid': dataTestId && rowId && columnId ? "".concat(dataTestId, "-cell-").concat(rowId, "-").concat(columnId) : undefined,
|
|
583
|
-
isFocused: rowIndex === focusedRowIndex && columnIndex === focusedColumnIndex,
|
|
584
|
-
onFocus: onCellFocus(rowIndex, columnIndex),
|
|
585
|
-
onKeyDown: onKeyDown(rowIndex),
|
|
586
|
-
isDragging: columnId === dragSource,
|
|
587
|
-
key: columnId,
|
|
588
|
-
ref: createRef(rowIndex, columnIndex)
|
|
589
|
-
};
|
|
590
|
-
};
|
|
591
|
-
return /*#__PURE__*/React__default.createElement(DndProvider, {
|
|
592
|
-
backend: HTML5Backend
|
|
593
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
594
|
-
className: styles.advancedTable,
|
|
595
|
-
ref: tableRef
|
|
596
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
597
|
-
role: hasExpandableRows ? 'treegrid' : 'grid',
|
|
598
|
-
"aria-multiselectable": hasExpandableRows && hasCheckboxColumn ? true : undefined,
|
|
599
|
-
"aria-rowcount": rows ? rows.length + 1 : 0,
|
|
600
|
-
"aria-colcount": columnConfigs.length,
|
|
601
|
-
"aria-labelledby": ariaLabelledBy,
|
|
602
|
-
"aria-label": ariaLabel,
|
|
603
|
-
"aria-describedby": ariaDescribedBy,
|
|
604
|
-
"data-testid": dataTestId
|
|
605
|
-
}, dragSource && !disableUserPinnableColumns && !disableUserReorderableColumns ? /*#__PURE__*/React__default.createElement(AdvancedTableDragPreview, {
|
|
606
|
-
tableRef: tableRef,
|
|
607
|
-
columnHeaderRefs: cellRefs.current[-1]
|
|
608
|
-
}) : null, /*#__PURE__*/React__default.createElement(AdvancedTableHiddenDescription, {
|
|
609
|
-
id: arrowKeyDescriptionId,
|
|
610
|
-
messageKey: "advancedTable.arrowKeyDescription"
|
|
611
|
-
}), hasOnRowSelect && /*#__PURE__*/React__default.createElement(AdvancedTableHiddenDescription, {
|
|
612
|
-
id: rowActionDescriptionId,
|
|
613
|
-
messageKey: "advancedTable.rowActionDescription"
|
|
614
|
-
}), hasCheckboxColumn && /*#__PURE__*/React__default.createElement(AdvancedTableHiddenDescription, {
|
|
615
|
-
id: rowCheckboxDescriptionId,
|
|
616
|
-
messageKey: "advancedTable.rowCheckboxDescription"
|
|
617
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
618
|
-
role: "rowgroup",
|
|
619
|
-
className: classNames(styles.advancedTableColumnHeadersRowGroup, styles.advancedTableRowGroup)
|
|
620
|
-
}, /*#__PURE__*/React__default.createElement(AdvancedTableColumnHeaders, {
|
|
621
|
-
"aria-rowindex": hasExpandableRows ? undefined : 1,
|
|
622
|
-
"aria-level": hasExpandableRows ? 1 : undefined // aria-level is one-indexed
|
|
623
|
-
,
|
|
624
|
-
|
|
625
|
-
"aria-setsize": hasExpandableRows ? rowsProp.length + 1 : undefined,
|
|
626
|
-
"aria-posinset": hasExpandableRows ? 1 : undefined // aria-posinset is one-indexed
|
|
627
|
-
,
|
|
628
|
-
isFocusable: hasFocusableRows,
|
|
629
|
-
isFocused: headerRowIndex === focusedRowIndex && minColumnIndex === focusedColumnIndex,
|
|
630
|
-
onKeyDown: onKeyDown(headerRowIndex),
|
|
631
|
-
onFocus: onRowFocus(headerRowIndex, minColumnIndex),
|
|
632
|
-
ref: createRef(headerRowIndex, -1)
|
|
633
|
-
}, hasCheckboxColumn || pinnedColumnConfigs.length ? /*#__PURE__*/React__default.createElement("div", {
|
|
634
|
-
role: "presentation",
|
|
635
|
-
className: classNames(styles.pinnedContainer, styles.advancedTableRowChild),
|
|
636
|
-
ref: createPinnedContainerRef(headerRowIndex)
|
|
637
|
-
}, hasCheckboxColumn && /*#__PURE__*/React__default.createElement(AdvancedTableCheckbox, {
|
|
638
|
-
state: checkedRowIds.length === totalRowsCountWithExpansion ? 'true' : checkedRowIds.length === 0 ? 'false' : 'mixed',
|
|
639
|
-
isRowFocused: headerRowIndex === focusedRowIndex,
|
|
640
|
-
onClick: handleColumnHeaderCheckboxToggle,
|
|
641
|
-
variant: "header"
|
|
642
|
-
}), hasExpandableRows && pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth, "px"), true) : undefined, pinnedColumnConfigs.map((columnConfigs, i) => {
|
|
643
|
-
const props = getColumnHeaderProps(columnConfigs, i, true);
|
|
644
|
-
return /*#__PURE__*/React__default.createElement(AdvancedTableColumnHeader, props);
|
|
645
|
-
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth, "px"), true) : undefined, unpinnedColumnConfigs.map((columnConfigs, i) => {
|
|
646
|
-
const props = getColumnHeaderProps(columnConfigs, i + pinnedColumnConfigs.length, false);
|
|
647
|
-
return /*#__PURE__*/React__default.createElement(AdvancedTableColumnHeader, props);
|
|
648
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
649
|
-
role: "rowgroup",
|
|
650
|
-
className: styles.advancedTableRowGroup
|
|
651
|
-
}, ((_ref5 = paginatedRows !== null && paginatedRows !== void 0 ? paginatedRows : rows) !== null && _ref5 !== void 0 ? _ref5 : []).map((row, rowIndex) => {
|
|
652
|
-
const {
|
|
653
|
-
id: rowId,
|
|
654
|
-
data,
|
|
655
|
-
isExpanded,
|
|
656
|
-
depth = 0,
|
|
657
|
-
depthSize,
|
|
658
|
-
depthIndex,
|
|
659
|
-
parentId,
|
|
660
|
-
rowProps,
|
|
661
|
-
hasChildRows
|
|
662
|
-
} = row;
|
|
663
|
-
const paginatedRowIndex = getPaginatedRowIndex(rowIndex);
|
|
664
|
-
const onSelect = e => {
|
|
665
|
-
e.preventDefault(); // stops event from triggering on new target when focus is changed during onSelect
|
|
666
|
-
if (hasOnRowSelect) {
|
|
667
|
-
onRowSelect === null || onRowSelect === void 0 ? void 0 : onRowSelect(row.rowPropReference);
|
|
668
|
-
setSelectedRowId(rowId);
|
|
669
|
-
}
|
|
670
|
-
};
|
|
671
|
-
const onRowKeyDown = e => {
|
|
672
|
-
if (e.target !== e.currentTarget) return;
|
|
673
|
-
onKeyDown(paginatedRowIndex)(e);
|
|
674
|
-
if (e.key === 'Enter') {
|
|
675
|
-
onSelect(e);
|
|
676
|
-
}
|
|
677
|
-
};
|
|
678
|
-
return /*#__PURE__*/React__default.createElement(AdvancedTableRow, _extends({}, rowProps, {
|
|
679
|
-
"aria-rowindex": hasExpandableRows ? undefined : paginatedRowIndex + 2 // aria-rowindex is one-indexed + the column headers row is the first row in the table
|
|
680
|
-
,
|
|
681
|
-
|
|
682
|
-
"aria-expanded": hasChildRows ? !!isExpanded : undefined,
|
|
683
|
-
"data-testid": dataTestId && rowId ? "".concat(dataTestId, "-row-").concat(rowId) : undefined,
|
|
684
|
-
hasOnRowSelect: hasOnRowSelect,
|
|
685
|
-
isFocusable: hasFocusableRows,
|
|
686
|
-
isFocused: paginatedRowIndex === focusedRowIndex && minColumnIndex === focusedColumnIndex,
|
|
687
|
-
isSelected: selectedRowId === rowId,
|
|
688
|
-
onKeyDown: onRowKeyDown,
|
|
689
|
-
onFocus: onRowFocus(paginatedRowIndex, minColumnIndex),
|
|
690
|
-
onClick: e => onSelect(e),
|
|
691
|
-
key: "".concat(rowId).concat(depth).concat(parentId),
|
|
692
|
-
ref: createRef(paginatedRowIndex, minColumnIndex),
|
|
693
|
-
"aria-level": hasExpandableRows ? depth + 1 : undefined // aria-level is one-indexed
|
|
694
|
-
,
|
|
695
|
-
|
|
696
|
-
"aria-setsize": hasExpandableRows ? depthSize : undefined,
|
|
697
|
-
"aria-posinset": hasExpandableRows ? depthIndex + 1 : undefined // aria-posinset is one-indexed
|
|
698
|
-
}), hasCheckboxColumn || pinnedColumnConfigs.length ? /*#__PURE__*/React__default.createElement("div", {
|
|
699
|
-
className: classNames(styles.pinnedContainer, styles.advancedTableRowChild),
|
|
700
|
-
ref: createPinnedContainerRef(paginatedRowIndex)
|
|
701
|
-
}, hasCheckboxColumn && /*#__PURE__*/React__default.createElement(AdvancedTableCheckbox, {
|
|
702
|
-
state: getCheckboxStateForRow(row),
|
|
703
|
-
isRowFocused: paginatedRowIndex === focusedRowIndex,
|
|
704
|
-
onClick: e => {
|
|
705
|
-
e.stopPropagation(); // prevent onRowSelect
|
|
706
|
-
if (e.shiftKey) {
|
|
707
|
-
multiUpdateCheckedRowIds(getLastToggledRowIndex(), paginatedRowIndex);
|
|
708
|
-
} else {
|
|
709
|
-
singleUpdateCheckedRowIds(paginatedRowIndex);
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
}), hasExpandableRows && pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth * (depth + 1), "px"), false, hasChildRows ? getAdvancedTableRowExpandButton(rowId, isExpanded, rowIndex) : undefined) : undefined, pinnedColumnConfigs.map((c, i) => {
|
|
713
|
-
const props = getCellProps(c, i, data, paginatedRowIndex, rowId, depth);
|
|
714
|
-
return /*#__PURE__*/React__default.createElement(AdvancedTableCell, _extends({}, props, {
|
|
715
|
-
"aria-rowindex": hasExpandableRows ? undefined : rowIndex + 2 // aria-rowindex is one-indexed + the column headers row is the first row in the table
|
|
716
|
-
,
|
|
717
|
-
"aria-colindex": i + 1 // aria-colindex is one-indexed
|
|
718
|
-
}));
|
|
719
|
-
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth * (depth + 1), "px"), false, hasChildRows ? getAdvancedTableRowExpandButton(rowId, isExpanded, rowIndex) : undefined) : undefined, unpinnedColumnConfigs.map((c, i) => {
|
|
720
|
-
const props = getCellProps(c, i + pinnedColumnConfigs.length, data, paginatedRowIndex, rowId, depth);
|
|
721
|
-
return /*#__PURE__*/React__default.createElement(AdvancedTableCell, _extends({}, props, {
|
|
722
|
-
className: styles.advancedTableRowChild,
|
|
723
|
-
"aria-rowindex": hasExpandableRows ? undefined : rowIndex + 2 // aria-rowindex is one-indexed + the column headers row is the first row in the table
|
|
724
|
-
,
|
|
725
|
-
"aria-colindex": i + 1 // aria-colindex is one-indexed
|
|
726
|
-
}));
|
|
727
|
-
}));
|
|
728
|
-
}))), rowsPerPage ? /*#__PURE__*/React__default.createElement(AdvancedTablePagination, {
|
|
729
|
-
rowsPerPage: rowsPerPage,
|
|
730
|
-
onPageChange: onPageChange,
|
|
731
|
-
ariaLabel: paginationAriaLabel,
|
|
732
|
-
rows: rowsProp,
|
|
733
|
-
currentPage: currentPage,
|
|
734
|
-
setCurrentPage: setCurrentPage,
|
|
735
|
-
"data-testid": getSubDataTestId(dataTestId, 'TablePagination')
|
|
736
|
-
}) : null));
|
|
737
|
-
};
|
|
738
|
-
|
|
739
|
-
// TODO: move hook to separate file
|
|
740
|
-
function useSortedRows(_ref6) {
|
|
741
|
-
let {
|
|
742
|
-
columnConfigs,
|
|
743
|
-
onRowsChange,
|
|
744
|
-
selectedSortOption,
|
|
745
|
-
setCurrentPage
|
|
746
|
-
} = _ref6;
|
|
747
|
-
const columnConfigsRef = useLatest(columnConfigs);
|
|
748
|
-
const onRowsChangeRef = useLatest(onRowsChange);
|
|
749
|
-
useDidUpdate(() => {
|
|
750
|
-
var _columnConfigsRef$cur;
|
|
751
|
-
const {
|
|
752
|
-
columnId,
|
|
753
|
-
index
|
|
754
|
-
} = selectedSortOption;
|
|
755
|
-
const sort = (_columnConfigsRef$cur = columnConfigsRef.current.find(_ref7 => {
|
|
756
|
-
let {
|
|
757
|
-
id
|
|
758
|
-
} = _ref7;
|
|
759
|
-
return id === columnId;
|
|
760
|
-
})) === null || _columnConfigsRef$cur === void 0 || (_columnConfigsRef$cur = _columnConfigsRef$cur.sortOptions) === null || _columnConfigsRef$cur === void 0 || (_columnConfigsRef$cur = _columnConfigsRef$cur[index]) === null || _columnConfigsRef$cur === void 0 ? void 0 : _columnConfigsRef$cur.sort;
|
|
761
|
-
if (typeof sort === 'function' && onRowsChangeRef.current) {
|
|
762
|
-
onRowsChangeRef.current(sort(selectedSortOption));
|
|
763
|
-
setCurrentPage(1);
|
|
764
|
-
}
|
|
765
|
-
}, [columnConfigsRef, onRowsChangeRef, selectedSortOption]);
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
// TODO: move hook to separate file
|
|
769
|
-
function useFocusState(_ref8) {
|
|
770
|
-
let {
|
|
771
|
-
headerRowIndex,
|
|
772
|
-
maxRowIndex,
|
|
773
|
-
minColumnIndex,
|
|
774
|
-
maxColumnIndex,
|
|
775
|
-
hasFocusableRows,
|
|
776
|
-
pinnedUnpinnedColumnOrder,
|
|
777
|
-
tableRef,
|
|
778
|
-
currentPage
|
|
779
|
-
} = _ref8;
|
|
780
|
-
const cellRefs = useRef({});
|
|
781
|
-
const pinnedContainersRef = useRef({});
|
|
782
|
-
const [focusedRowIndex, setFocusedRowIndex] = useState(headerRowIndex);
|
|
783
|
-
const [focusedColumnIndex, setFocusedColumnIndex] = useState(minColumnIndex);
|
|
784
|
-
const [focusedColumnId, setFocusedColumnId] = useState();
|
|
785
|
-
const createRef = (rowIndex, columnIndex) => node => {
|
|
786
|
-
if (!cellRefs.current[rowIndex]) {
|
|
787
|
-
cellRefs.current[rowIndex] = {};
|
|
788
|
-
}
|
|
789
|
-
cellRefs.current[rowIndex][columnIndex] = node;
|
|
790
|
-
};
|
|
791
|
-
const createPinnedContainerRef = rowIndex => node => {
|
|
792
|
-
pinnedContainersRef.current[rowIndex] = node;
|
|
793
|
-
};
|
|
794
|
-
const updateRowFocusIndex = index => {
|
|
795
|
-
const newIndex = wrapAround(index, headerRowIndex, maxRowIndex);
|
|
796
|
-
setFocusedRowIndex(newIndex);
|
|
797
|
-
return newIndex;
|
|
798
|
-
};
|
|
799
|
-
const updateColumnFocusIndex = index => {
|
|
800
|
-
const newIndex = wrapAround(index, minColumnIndex, maxColumnIndex);
|
|
801
|
-
setFocusedColumnIndex(newIndex);
|
|
802
|
-
return newIndex;
|
|
803
|
-
};
|
|
804
|
-
const focusCell = useEventCallback(cell => {
|
|
805
|
-
var _tableRef$current, _cellRefs$current2;
|
|
806
|
-
// Manually scroll cells/rows into view if needed
|
|
807
|
-
const tablePos = (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.getBoundingClientRect();
|
|
808
|
-
const header = (_cellRefs$current2 = cellRefs.current) === null || _cellRefs$current2 === void 0 || (_cellRefs$current2 = _cellRefs$current2[headerRowIndex]) === null || _cellRefs$current2 === void 0 ? void 0 : _cellRefs$current2[-1];
|
|
809
|
-
const headerPos = header === null || header === void 0 ? void 0 : header.getBoundingClientRect();
|
|
810
|
-
let cellPos = cell === null || cell === void 0 ? void 0 : cell.getBoundingClientRect();
|
|
811
|
-
|
|
812
|
-
// Vertical scroll
|
|
813
|
-
if (cell !== header && !header.contains(cell)) {
|
|
814
|
-
if (cellPos.top < headerPos.top + headerPos.height) {
|
|
815
|
-
// Scroll down if cell covered by header
|
|
816
|
-
tableRef.current.scrollTop -= headerPos.top + headerPos.height - cellPos.top;
|
|
817
|
-
} else if (cellPos.top < tablePos.top) {
|
|
818
|
-
// Scroll down if cell out of view above table
|
|
819
|
-
tableRef.current.scrollTop -= tablePos.top - cellPos.top;
|
|
820
|
-
} else if (cellPos.bottom > tablePos.bottom) {
|
|
821
|
-
// Scroll up if cell out of view below table
|
|
822
|
-
tableRef.current.scrollTop += cellPos.bottom - tablePos.bottom;
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
// Horizontal scroll
|
|
827
|
-
// Scroll left if an entire row is focused
|
|
828
|
-
if (minColumnIndex === -1 && focusedColumnIndex === minColumnIndex) {
|
|
829
|
-
tableRef.current.scrollLeft -= tablePos.left - cellPos.left;
|
|
830
|
-
} else {
|
|
831
|
-
var _pinnedContainersRef$;
|
|
832
|
-
if (cellPos.left < tablePos.left) {
|
|
833
|
-
// Scroll right if cell out of view to the left of the table
|
|
834
|
-
tableRef.current.scrollLeft -= tablePos.left - cellPos.left;
|
|
835
|
-
} else if (cellPos.right > tablePos.right) {
|
|
836
|
-
// Scroll left if cell out of view to the right of the table
|
|
837
|
-
tableRef.current.scrollLeft += cellPos.right - tablePos.right;
|
|
838
|
-
}
|
|
839
|
-
const pinnedContainer = (_pinnedContainersRef$ = pinnedContainersRef.current) === null || _pinnedContainersRef$ === void 0 ? void 0 : _pinnedContainersRef$[focusedRowIndex];
|
|
840
|
-
const pinnedContainerPos = pinnedContainer === null || pinnedContainer === void 0 ? void 0 : pinnedContainer.getBoundingClientRect();
|
|
841
|
-
cellPos = cell === null || cell === void 0 ? void 0 : cell.getBoundingClientRect();
|
|
842
|
-
|
|
843
|
-
// Scroll right if cell covered by pinned columns
|
|
844
|
-
if (pinnedContainer && cellPos.left < pinnedContainerPos.left + pinnedContainerPos.width && !pinnedContainer.contains(cell)) {
|
|
845
|
-
tableRef.current.scrollLeft -= pinnedContainerPos.left + pinnedContainerPos.width - cellPos.left;
|
|
846
|
-
}
|
|
847
|
-
}
|
|
848
|
-
cell === null || cell === void 0 ? void 0 : cell.focus();
|
|
849
|
-
});
|
|
850
|
-
|
|
851
|
-
// Focus header cell when the focused column id changes. Used when pinning/unpinning columns since a new DOM element is created.
|
|
852
|
-
useDidUpdate(() => {
|
|
853
|
-
if (focusedColumnId) {
|
|
854
|
-
var _cellRefs$current3;
|
|
855
|
-
const columnIndex = pinnedUnpinnedColumnOrder.indexOf(focusedColumnId);
|
|
856
|
-
focusCell((_cellRefs$current3 = cellRefs.current) === null || _cellRefs$current3 === void 0 || (_cellRefs$current3 = _cellRefs$current3[focusedRowIndex]) === null || _cellRefs$current3 === void 0 ? void 0 : _cellRefs$current3[columnIndex]);
|
|
857
|
-
setFocusedColumnIndex(columnIndex);
|
|
858
|
-
setFocusedColumnId(undefined);
|
|
859
|
-
}
|
|
860
|
-
}, [focusedColumnId, pinnedUnpinnedColumnOrder]);
|
|
861
|
-
|
|
862
|
-
// Focus cell when the focused indices change
|
|
863
|
-
useDidUpdate(() => {
|
|
864
|
-
var _cellRefs$current4;
|
|
865
|
-
const newFocusedCell = (_cellRefs$current4 = cellRefs.current) === null || _cellRefs$current4 === void 0 || (_cellRefs$current4 = _cellRefs$current4[focusedRowIndex]) === null || _cellRefs$current4 === void 0 ? void 0 : _cellRefs$current4[focusedColumnIndex];
|
|
866
|
-
|
|
867
|
-
/* Prevent cells from stealing focus from their children when they
|
|
868
|
-
* receive focus, but still allow focus to move from a cell to a row.
|
|
869
|
-
*/
|
|
870
|
-
if (!newFocusedCell.contains(document.activeElement) || hasFocusableRows && focusedColumnIndex === minColumnIndex) {
|
|
871
|
-
focusCell(newFocusedCell);
|
|
872
|
-
}
|
|
873
|
-
}, [focusedRowIndex, focusedColumnIndex, hasFocusableRows, minColumnIndex, cellRefs]);
|
|
874
|
-
useDidUpdate(() => {
|
|
875
|
-
setFocusedRowIndex(headerRowIndex);
|
|
876
|
-
setFocusedColumnIndex(minColumnIndex);
|
|
877
|
-
}, [currentPage]);
|
|
878
|
-
return {
|
|
879
|
-
focusedRowIndex,
|
|
880
|
-
focusedColumnIndex,
|
|
881
|
-
updateRowFocusIndex,
|
|
882
|
-
updateColumnFocusIndex,
|
|
883
|
-
setFocusedColumnId,
|
|
884
|
-
createRef,
|
|
885
|
-
createPinnedContainerRef,
|
|
886
|
-
cellRefs
|
|
887
|
-
};
|
|
888
|
-
}
|
|
889
|
-
function mapExternalRowToInternalRows(row, depthSize, depthIndex, parentId) {
|
|
890
|
-
let depth = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
891
|
-
let mappedRows = [];
|
|
892
|
-
const hasChildRows = !!row.childRows && row.childRows.length > 0;
|
|
893
|
-
mappedRows.push({
|
|
894
|
-
id: row.id,
|
|
895
|
-
data: row.data,
|
|
896
|
-
hasChildRows,
|
|
897
|
-
parentId,
|
|
898
|
-
depth,
|
|
899
|
-
depthSize,
|
|
900
|
-
depthIndex,
|
|
901
|
-
isExpanded: row.isExpanded,
|
|
902
|
-
rowProps: row.unsafe_rowProps,
|
|
903
|
-
rowPropReference: row
|
|
904
|
-
});
|
|
905
|
-
if (row.isExpanded && row.childRows !== undefined && hasChildRows) {
|
|
906
|
-
row.childRows.forEach((child, i) => {
|
|
907
|
-
mappedRows = mappedRows.concat(mapExternalRowToInternalRows(child, row.childRows !== undefined ? row.childRows.length : 0, i, row.id, depth + 1));
|
|
908
|
-
});
|
|
909
|
-
}
|
|
910
|
-
return mappedRows;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
export { AdvancedTable };
|