@qualtrics/ui-react 2.19.0 → 2.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/dist/__shared/cjs/{index-bf07471d.js → index-579c4690.js} +10 -7
- package/dist/__shared/cjs/{index-4e4cc354.js → index-90d4069b.js} +999 -1875
- package/dist/components/Accordion/Accordion.js +1 -5
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Accordion/AccordionHeader.js +8 -10
- package/dist/components/Accordion/AccordionPanel.js +3 -3
- package/dist/components/BreakpointSwitch/Breakpoint.js +0 -2
- package/dist/components/BreakpointSwitch/BreakpointSwitch.js +0 -3
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/Button2.js +2 -7
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -2
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox.js +11 -11
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/Checkbox/VisualCheckbox.js +1 -1
- package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
- package/dist/components/ColorPicker/Alpha.js +9 -30
- package/dist/components/ColorPicker/ColorPicker.js +33 -42
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/ColorPicker/ColorPickerFlyout.js +2 -1
- package/dist/components/ColorPicker/ColorPickerFlyoutInputs.js +20 -23
- package/dist/components/ColorPicker/Hue.js +2 -19
- package/dist/components/ColorPicker/Palette.js +7 -27
- package/dist/components/ColorPicker/Saturation.js +8 -29
- package/dist/components/ColorPicker/utils/calculateTargetId.js +10 -20
- package/dist/components/ColorPicker/utils/getMousePosition.js +4 -3
- package/dist/components/ColorPicker/utils/hexToHsv.js +0 -5
- package/dist/components/ColorPicker/utils/hexToRgbaString.js +2 -4
- package/dist/components/ColorPicker/utils/hsvToHex.js +0 -3
- package/dist/components/ColorPicker/utils/rgbToHex.js +1 -1
- package/dist/components/ColorPicker/utils/validateHex.js +12 -19
- package/dist/components/Combobox/Combobox.js +57 -127
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/Combobox/ComboboxHeader.js +1 -1
- package/dist/components/Combobox/ComboboxIcon.js +2 -4
- package/dist/components/Combobox/ComboboxInput.js +4 -5
- package/dist/components/Combobox/ComboboxList.js +2 -2
- package/dist/components/ConfigPane/ConfigPane.js +0 -7
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/ChildIndexContext/index.js +0 -1
- package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +34 -30
- package/dist/components/Dropdown/Dropdown.js +17 -68
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/Dropdown/DropdownButton.js +23 -33
- package/dist/components/Dropdown/DropdownHeader.js +2 -1
- package/dist/components/Dropdown/DropdownList.js +8 -7
- package/dist/components/Dropdown/DropdownOption.js +3 -10
- package/dist/components/Dropdown/DropdownSearch.js +6 -24
- package/dist/components/FilePicker/FilePicker.js +15 -26
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField.js +2 -2
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FormField/FormFieldContext.js +3 -6
- package/dist/components/FormField/ReadOnlyText.js +2 -1
- package/dist/components/FullScreenTakeover/FullScreenTakeover.js +5 -11
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/Icon/Icon.js +3 -6
- package/dist/components/Icon/IconTypes.js +1 -0
- package/dist/components/IconButton/IconButton.js +1 -6
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput.js +16 -33
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input.js +3 -2
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/Input/InputField.js +2 -5
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/InputGroup/InputGroupProvider.js +0 -2
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner.js +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/ConditionContainer.js +0 -2
- package/dist/components/LogicEditor/ConditionSet.js +8 -25
- package/dist/components/LogicEditor/Controls.js +2 -2
- package/dist/components/LogicEditor/LogicEditor.js +3 -12
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/LogicEditor/utils.js +9 -34
- package/dist/components/Modal/Modal.js +22 -35
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/BaseMenu.js +43 -108
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/SelectMenu/SelectMenu.js +2 -3
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +20 -32
- package/dist/components/NewMenu/parts/MenuItem.js +2 -3
- package/dist/components/NewMenu/parts/MenuSearchBox.js +2 -1
- package/dist/components/NumberStepper/NumberStepper.js +29 -44
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/NumberStepper/NumberStepperDecrement.js +6 -5
- package/dist/components/NumberStepper/NumberStepperIncrement.js +6 -5
- package/dist/components/NumberStepper/NumberStepperInput.js +10 -12
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination.js +10 -6
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Pagination/PaginationNextButton.js +8 -8
- package/dist/components/Pagination/PaginationPageInput.js +17 -22
- package/dist/components/Pagination/PaginationPreviousButton.js +8 -8
- package/dist/components/Popover/Popover.js +9 -18
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch.js +3 -5
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/QuickSearch/QuickSearchInput.js +6 -23
- package/dist/components/Radio/Radio.js +11 -13
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput.js +5 -11
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/ExpandCollapseButton.js +0 -2
- package/dist/components/SidebarNav/SidebarNav.js +5 -4
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/SidebarNav/SidebarNavLink.js +1 -4
- package/dist/components/Slider/RangeSlider.js +8 -22
- package/dist/components/Slider/Slider.js +7 -26
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Slider/SliderButton.js +7 -9
- package/dist/components/Switch/Switch.js +11 -11
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Tabs/Tab.js +3 -3
- package/dist/components/Tabs/TabContextProvider.js +1 -1
- package/dist/components/Tabs/TabList.js +9 -17
- package/dist/components/Tabs/TabPanel.js +3 -3
- package/dist/components/Tabs/TabPanels.js +0 -2
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +13 -42
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/UIProvider/PortalTargetContext.js +0 -1
- package/dist/components/UIProvider/UIProvider.js +2 -2
- package/dist/components/deprecated_ColorPicker/Alpha.js +4 -11
- package/dist/components/deprecated_ColorPicker/Color.js +9 -66
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +2 -8
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_ColorPicker/HexInput.js +1 -7
- package/dist/components/deprecated_ColorPicker/Hue.js +3 -10
- package/dist/components/deprecated_ColorPicker/Saturation.js +7 -14
- package/dist/components/deprecated_ColorPicker/Swatch.js +2 -6
- package/dist/components/deprecated_ColorPicker/useMouseDrag.js +0 -3
- package/dist/components/deprecated_NumberStepper/NumberStepper.js +14 -20
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +7 -6
- package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +7 -6
- package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +16 -17
- package/dist/components/deprecated_Tabs/Tabs.js +9 -25
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/components/deprecated_Toolbar/ToolbarPanel.js +3 -3
- package/dist/components/deprecated_Toolbar/ToolbarPanels.js +3 -17
- package/dist/components/deprecated_Toolbar/ToolbarTab.js +10 -26
- package/dist/components/deprecated_Toolbar/ToolbarTabs.js +6 -18
- package/dist/hooks/useBreakpoints/useBreakpoints.js +3 -4
- package/dist/hooks/useClickOutside/useClickOutside.js +2 -7
- package/dist/hooks/useClickOutsidePortals/useClickOutsidePortals.js +3 -6
- package/dist/hooks/useControllableState/useControllableState.js +5 -10
- package/dist/hooks/useDidUpdate/useDidUpdate.js +2 -4
- package/dist/hooks/useEventCallback/useEventCallback.js +2 -1
- package/dist/hooks/useEventListener/useEventListener.js +1 -4
- package/dist/hooks/useFocusSequence/useFocusSequence.js +10 -17
- package/dist/hooks/useId/useId.js +1 -2
- package/dist/hooks/useIsFocused/useIsFocused.js +0 -1
- package/dist/hooks/useIsHovered/useIsHovered.js +0 -1
- package/dist/hooks/useIsTruncated/useIsTruncated.js +4 -3
- package/dist/hooks/useLatest/useLatest.js +0 -1
- package/dist/hooks/useMounted/useMounted.js +0 -1
- package/dist/hooks/useMouseDrag/useMouseDrag.js +0 -4
- package/dist/hooks/useOverlay/useOverlay.js +4 -10
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/usePrevious/usePrevious.js +0 -1
- package/dist/hooks/useResponsiveValue/useResponsiveValue.js +1 -4
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +11 -16
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/components/HeadsetIcon.js +6 -0
- package/dist/icons/components/PauseCircleIcon.js +1 -1
- package/dist/icons/createIconComponent.js +2 -3
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.es.js +1 -0
- package/dist/icons/index.js +2 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.es.js +4 -3
- package/dist/index.js +6 -5
- package/dist/next/AdvancedTable/AdvancedTable.js +82 -188
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableCell.js +4 -14
- package/dist/next/AdvancedTable/AdvancedTableCheckbox.js +0 -1
- package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +11 -41
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +8 -14
- package/dist/next/AdvancedTable/AdvancedTableDragPreview.js +4 -6
- package/dist/next/AdvancedTable/AdvancedTablePagination.js +1 -4
- package/dist/next/AdvancedTable/AdvancedTableRowExpandButton.js +0 -1
- package/dist/next/AdvancedTable/AdvancedTableTypes.js +1 -3
- package/dist/next/AdvancedTable/useAdvancedTableDragAndDrop.js +8 -13
- package/dist/next/AdvancedTable/useComputedWidth.js +1 -1
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +5 -20
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInputIconButton.js +1 -1
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Combobox/ComboboxFlyout.js +3 -3
- package/dist/next/Combobox/ComboboxGroup.js +1 -1
- package/dist/next/Combobox/ComboboxInput.js +7 -20
- package/dist/next/Combobox/ComboboxOption.js +5 -6
- package/dist/next/Combobox/hooks/useComboboxFilteredGroup/useComboboxFilteredGroup.js +4 -5
- package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +37 -54
- package/dist/next/Combobox/hooks/useComboboxLoadingState/useComboboxLoadingState.js +4 -5
- package/dist/next/Combobox/hooks/useComboboxValue/useComboboxValue.js +5 -3
- package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/useListboxFlyoutDimensions.js +10 -10
- package/dist/next/Combobox/hooks/useSelectedOptionScroll/useSelectedOptionScroll.js +1 -6
- package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/useShouldRenderGroupHeader.js +6 -6
- package/dist/next/Combobox/utils/nodeRegistration/nodeRegistration.js +4 -6
- package/dist/next/Drawer/Drawer.js +5 -16
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor.js +7 -5
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Input/Input.js +5 -8
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/Menu/Menu.js +10 -23
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuButton.js +13 -6
- package/dist/next/Menu/MenuContext.js +0 -2
- package/dist/next/Menu/MenuItem.js +11 -15
- package/dist/next/Menu/MenuPane.js +11 -25
- package/dist/next/Menu/MenuSearch.js +15 -22
- package/dist/next/Menu/SubMenu.js +10 -27
- package/dist/next/Menu/usePaneSearch.js +2 -1
- package/dist/next/PhoneNumberInput/PhoneNumberInput.js +12 -19
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/SplitButton/SplitButton.js +6 -12
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/Stack/Stack.js +0 -3
- package/dist/next/TimePicker/TimeDropdown.js +4 -5
- package/dist/next/TimePicker/TimeInput.js +4 -5
- package/dist/next/TimePicker/TimePicker.js +12 -30
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/TimePicker/TimePickerIcon.js +1 -3
- package/dist/next/TimePicker/utils.js +12 -52
- package/dist/next/ToggleButton/ToggleButton.js +0 -5
- package/dist/next/ToggleButton/ToggleButtonGroup.js +2 -1
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/index.d.ts +5 -4
- package/dist/next/index.js +389 -754
- package/dist/utils/Flyout/Flyout.js +4 -5
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/dist/utils/Popper/Popper.js +18 -25
- package/dist/utils/Portal/Portal.js +2 -1
- package/dist/utils/TextOverflowTooltip/TextOverflowTooltip.js +4 -4
- package/dist/utils/Translation/Translate.js +0 -4
- package/dist/utils/Translation/TranslationProvider.js +0 -1
- package/dist/utils/Translation/containsComponentOrElement.js +1 -5
- package/dist/utils/Translation/insertPlaceholders.js +0 -1
- package/dist/utils/Translation/useTranslation.js +7 -14
- package/dist/utils/concatIds/concatIds.js +0 -1
- package/dist/utils/constants.js +2 -2
- package/dist/utils/createContextUtilities/createContextUtilities.js +0 -4
- package/dist/utils/filterChildren/filterChildren.js +8 -17
- package/dist/utils/getSubDataTestId/getSubDataTestId.js +1 -2
- package/dist/utils/keyboardUser/keyboardUser.js +0 -1
- package/dist/utils/mediaQueryManager/mediaQueryManager.js +1 -12
- package/dist/utils/mergeRefs/mergeRefs.js +1 -2
- package/dist/utils/wrapAround/wrapAround.js +1 -2
- package/dist/utils/wrapEvent/wrapEvent.js +2 -4
- package/icons/package.json +2 -1
- package/next/package.json +5 -1
- package/package.json +9 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"advancedTable":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._y6IPO{overflow:auto;position:relative;max-width:100%;max-height:100%}._eLW3D,._y6IPO{background-color:#fff}._eLW3D{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:sticky;left:0}._fMRlc{margin-bottom:4px}._R5dF-{position:sticky;top:0;z-index:100}._LcNei{display:flex}._LcNei:focus{outline:none}body.keyboard-user ._LcNei:focus ._xiVGF:after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._LcNei:focus ._xiVGF:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._LcNei:focus ._xiVGF:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._LcNei:focus ._xiVGF._C9aKv:after{right:-3px;bottom:1px}._-n1z3{padding-right:3px}._LLZfo{display:flex}._LLZfo._SSaoO ._S8g7r,._LLZfo._SSaoO ._xiVGF{cursor:pointer}._LLZfo._c5VPU ._S8g7r,._LLZfo._c5VPU ._xiVGF{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._LLZfo._c5VPU ._S8g7r._C9aKv,._LLZfo._c5VPU ._xiVGF._C9aKv{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._LLZfo._c5VPU ._S8g7r._C9aKv ._B-WjT,._LLZfo._c5VPU ._S8g7r._C9aKv ._JDRrf,._LLZfo._c5VPU ._S8g7r._C9aKv ._S8g7r,._LLZfo._c5VPU ._xiVGF._C9aKv ._B-WjT,._LLZfo._c5VPU ._xiVGF._C9aKv ._JDRrf,._LLZfo._c5VPU ._xiVGF._C9aKv ._S8g7r{background-color:rgba(11,110,208,.08)}._LLZfo._SSaoO:hover:not(._c5VPU):not(._enirl) ._S8g7r,._LLZfo._SSaoO:hover:not(._c5VPU):not(._enirl) ._xiVGF{background-color:#f9f9f9}._LLZfo._SSaoO:active:not(._c5VPU):not(._enirl) ._S8g7r,._LLZfo._SSaoO:active:not(._c5VPU):not(._enirl) ._xiVGF{background-color:#f3f3f3}._LLZfo:focus{outline:none}body.keyboard-user ._LLZfo:focus ._xiVGF:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._LLZfo:focus ._xiVGF:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._LLZfo:focus ._xiVGF:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._LLZfo:focus ._xiVGF._C9aKv:after{right:-3px;bottom:0}._LLZfo:last-of-type:focus{outline:none}body.keyboard-user ._LLZfo:last-of-type:focus ._xiVGF:after{content:\"\";display:block;position:absolute;top:-2px;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._LLZfo:last-of-type:focus ._xiVGF:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._LLZfo:last-of-type:focus ._xiVGF:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._LLZfo:last-of-type:focus ._xiVGF._C9aKv:after{right:-3px;bottom:1px}._LLZfo:last-of-type ._JDRrf:focus{outline:none}body.keyboard-user ._LLZfo:last-of-type ._JDRrf._hxpYA:after,body.keyboard-user ._LLZfo:last-of-type ._JDRrf:focus:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._LLZfo:first-of-type:focus{outline:none}body.keyboard-user ._LLZfo:first-of-type:focus ._xiVGF:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._LLZfo:first-of-type:focus ._xiVGF:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._LLZfo:first-of-type:focus ._xiVGF:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._LLZfo:first-of-type:focus ._xiVGF._C9aKv:after{right:-3px;bottom:0}._LLZfo:first-of-type ._JDRrf:focus{outline:none}body.keyboard-user ._LLZfo:first-of-type ._JDRrf._hxpYA:after,body.keyboard-user ._LLZfo:first-of-type ._JDRrf:focus:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._mI5Tb{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #d9d9d9;flex-shrink:0;font-size:12px;line-height:16px;font-weight:700;color:#6a6d70;background-color:#fff;position:relative}._mI5Tb._wpx-6{flex-grow:1}._mI5Tb._Qm8VB{cursor:pointer}._mI5Tb._Qm8VB:hover:not(._t4ws-){background-color:#f9f9f9;border-bottom-color:#6a6d70}._mI5Tb._Qm8VB:active:not(._t4ws-){background-color:#f3f3f3}._mI5Tb._kekjL:not(._t4ws-){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._mI5Tb._t4ws-{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._mI5Tb ._CSHW0{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._mI5Tb ._CSHW0._0cS8F{left:-1px}._mI5Tb ._CSHW0._Xefhu{right:0}._mI5Tb ._ViJD-{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._mI5Tb ._ViJD-._0cS8F{left:-2px}._mI5Tb ._ViJD-._Xefhu{right:-1px}._mI5Tb:first-of-type ._0cS8F._CSHW0{left:0;width:2px;border-left:1px solid #fff}._mI5Tb:first-of-type ._0cS8F._ViJD-{left:0}._mI5Tb:last-of-type ._Xefhu._CSHW0{right:0;width:2px;border-right:1px solid #fff}._mI5Tb:last-of-type ._Xefhu._ViJD-{right:0}._mI5Tb ._SHZL3{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._mI5Tb ._SHZL3 ._MjxLB{position:absolute;width:2px;right:2px;top:0;bottom:0}._mI5Tb ._SHZL3 ._MjxLB._BhSpS{background-color:#0a6ed1}._mI5Tb ._SHZL3:hover ._MjxLB:not(._BhSpS){background-color:#d9d9d9}._mI5Tb ._A93nF{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._mI5Tb ._A93nF._JmCZv{flex-direction:row-reverse;justify-content:flex-start}._mI5Tb ._A93nF._JmCZv ._gSscp{margin:1px 7px 1px 1px}._mI5Tb ._A93nF ._YDSVm{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._mI5Tb ._A93nF ._gSscp{margin:1px 1px 1px 7px;flex-shrink:0}._mI5Tb ._IF7re{margin-left:6px;margin-right:4px;flex-shrink:0}._mI5Tb ._RAYRH{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._mI5Tb:focus{outline:none}body.keyboard-user ._mI5Tb._hxpYA:after,body.keyboard-user ._mI5Tb:focus:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._kYT41{margin-right:6px}._C9aKv{display:flex;border-right:3px solid #e5e5e5;position:sticky;left:0;background-color:#fff;z-index:20}._C9aKv[focus-within]{z-index:30}._C9aKv:focus-within{z-index:30}._JDRrf{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #eee;flex-shrink:0;font-size:14px;line-height:20px;overflow-wrap:break-word;color:#32363a;position:relative}._JDRrf ._j5pr3{width:100%;padding:12px 12px 11px;overflow:hidden}._JDRrf._t4ws-{background-color:#efefef;border-bottom-color:#dfdfe1}._JDRrf._wpx-6{flex-grow:1}._JDRrf:focus{outline:none}body.keyboard-user ._JDRrf._hxpYA:after,body.keyboard-user ._JDRrf:focus:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._S8g7r{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._S8g7r._kpRMd{border-bottom-color:#d9d9d9;background-color:#fff}._B-WjT{display:flex;align-items:center;justify-content:center;min-height:44px;width:40px;border-bottom:1px solid #eee;padding:12px 12px 11px;flex-shrink:0;cursor:pointer}._B-WjT._kpRMd{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._B-WjT:focus input~span,._B-WjT:hover input~span{border-color:#0b6ed0}._B-WjT ._C8Dch{position:relative;display:inline-flex}._B-WjT ._C8Dch ._xZ3WO{margin:0!important}._B-WjT ._C8Dch ._ay2Sd{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._ihamV{justify-content:flex-start}._-PYET{justify-content:center;text-align:center}._JmCZv{justify-content:flex-end;text-align:right}._C6xBg{display:none}._Lk3Me{opacity:0;height:0;width:0;overflow:hidden}._Lk3Me,._RlQyJ{position:absolute}._RlQyJ{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._akeWj{width:246px}";
|
|
4
|
+
var styles = {"advancedTable":"_y6IPO","advancedTablePaginationContainer":"_eLW3D","advancedTablePagination":"_fMRlc","advancedTableColumnHeadersRowGroup":"_R5dF-","advancedTableColumnHeaders":"_LcNei","advancedTableRowChild":"_xiVGF","pinnedContainer":"_C9aKv","advancedTableRowGroup":"_-n1z3","advancedTableRow":"_LLZfo","hasRowAction":"_SSaoO","advancedTableExpandRowSpacer":"_S8g7r","isSelected":"_c5VPU","advancedTableCheckbox":"_B-WjT","advancedTableCell":"_JDRrf","isCheckboxHovered":"_enirl","showFocusRing":"_hxpYA","advancedTableColumnHeader":"_mI5Tb","fillRemainingSpace":"_wpx-6","isSortable":"_Qm8VB","isDragging":"_t4ws-","isSorted":"_kekjL","dropTargetLine":"_CSHW0","dropTargetLeft":"_0cS8F","dropTargetRight":"_Xefhu","dropTargetMarker":"_ViJD-","resizeHandle":"_SHZL3","resizeLine":"_MjxLB","isResizing":"_BhSpS","advancedTableColumnHeaderLabel":"_A93nF","rightAligned":"_JmCZv","sortIcon":"_gSscp","advancedTableColumnHeaderLabelText":"_YDSVm","advancedTableColumnHeaderMenu":"_IF7re","advancedTableColumnHeaderMenuHiddenAnchor":"_RAYRH","advancedTableColumnHeaderMenuItemIcon":"_kYT41","advancedTableCellContainer":"_j5pr3","header":"_kpRMd","checkboxContainer":"_C8Dch","checkbox":"_xZ3WO","mixed":"_ay2Sd","leftAligned":"_ihamV","centerAligned":"_-PYET","hiddenDescription":"_C6xBg","hiddenLiveRegion":"_Lk3Me","dragPreview":"_RlQyJ","rowActionMenuPane":"_akeWj"};
|
|
5
|
+
var stylesheet="._y6IPO{overflow:auto;position:relative;max-width:100%;max-height:100%}._eLW3D,._y6IPO{background-color:#fff}._eLW3D{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:sticky;left:0}._fMRlc{margin-bottom:4px}._R5dF-{position:sticky;top:0;z-index:100}._LcNei{display:flex}._LcNei:focus{outline:none}body.keyboard-user ._LcNei:focus ._xiVGF:after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._LcNei:focus ._xiVGF:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._LcNei:focus ._xiVGF:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._LcNei:focus ._xiVGF._C9aKv:after{right:-3px;bottom:1px}._-n1z3{padding-right:3px}._LLZfo{display:flex}._LLZfo._SSaoO ._S8g7r,._LLZfo._SSaoO ._xiVGF{cursor:pointer}._LLZfo._c5VPU ._S8g7r,._LLZfo._c5VPU ._xiVGF{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._LLZfo._c5VPU ._S8g7r._C9aKv,._LLZfo._c5VPU ._xiVGF._C9aKv{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._LLZfo._c5VPU ._S8g7r._C9aKv ._B-WjT,._LLZfo._c5VPU ._S8g7r._C9aKv ._JDRrf,._LLZfo._c5VPU ._S8g7r._C9aKv ._S8g7r,._LLZfo._c5VPU ._xiVGF._C9aKv ._B-WjT,._LLZfo._c5VPU ._xiVGF._C9aKv ._JDRrf,._LLZfo._c5VPU ._xiVGF._C9aKv ._S8g7r{background-color:rgba(11,110,208,.08)}._LLZfo._SSaoO:hover:not(._c5VPU):not(._enirl) ._S8g7r,._LLZfo._SSaoO:hover:not(._c5VPU):not(._enirl) ._xiVGF{background-color:#f9f9f9}._LLZfo._SSaoO:active:not(._c5VPU):not(._enirl) ._S8g7r,._LLZfo._SSaoO:active:not(._c5VPU):not(._enirl) ._xiVGF{background-color:#f3f3f3}._LLZfo:focus{outline:none}body.keyboard-user ._LLZfo:focus ._xiVGF:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._LLZfo:focus ._xiVGF:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._LLZfo:focus ._xiVGF:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._LLZfo:focus ._xiVGF._C9aKv:after{right:-3px;bottom:0}._LLZfo:last-of-type:focus{outline:none}body.keyboard-user ._LLZfo:last-of-type:focus ._xiVGF:after{content:\"\";display:block;position:absolute;top:-2px;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._LLZfo:last-of-type:focus ._xiVGF:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._LLZfo:last-of-type:focus ._xiVGF:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._LLZfo:last-of-type:focus ._xiVGF._C9aKv:after{right:-3px;bottom:1px}._LLZfo:last-of-type ._JDRrf:focus{outline:none}body.keyboard-user ._LLZfo:last-of-type ._JDRrf._hxpYA:after,body.keyboard-user ._LLZfo:last-of-type ._JDRrf:focus:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._LLZfo:first-of-type:focus{outline:none}body.keyboard-user ._LLZfo:first-of-type:focus ._xiVGF:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._LLZfo:first-of-type:focus ._xiVGF:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._LLZfo:first-of-type:focus ._xiVGF:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._LLZfo:first-of-type:focus ._xiVGF._C9aKv:after{right:-3px;bottom:0}._LLZfo:first-of-type ._JDRrf:focus{outline:none}body.keyboard-user ._LLZfo:first-of-type ._JDRrf._hxpYA:after,body.keyboard-user ._LLZfo:first-of-type ._JDRrf:focus:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._mI5Tb{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #d9d9d9;flex-shrink:0;font-size:12px;line-height:16px;font-weight:700;color:#6a6d70;background-color:#fff;position:relative}._mI5Tb._wpx-6{flex-grow:1}._mI5Tb._Qm8VB{cursor:pointer}._mI5Tb._Qm8VB:hover:not(._t4ws-){background-color:#f9f9f9;border-bottom-color:#6a6d70}._mI5Tb._Qm8VB:active:not(._t4ws-){background-color:#f3f3f3}._mI5Tb._kekjL:not(._t4ws-){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._mI5Tb._t4ws-{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._mI5Tb ._CSHW0{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._mI5Tb ._CSHW0._0cS8F{left:-1px}._mI5Tb ._CSHW0._Xefhu{right:0}._mI5Tb ._ViJD-{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._mI5Tb ._ViJD-._0cS8F{left:-2px}._mI5Tb ._ViJD-._Xefhu{right:-1px}._mI5Tb:first-of-type ._0cS8F._CSHW0{left:0;width:2px;border-left:1px solid #fff}._mI5Tb:first-of-type ._0cS8F._ViJD-{left:0}._mI5Tb:last-of-type ._Xefhu._CSHW0{right:0;width:2px;border-right:1px solid #fff}._mI5Tb:last-of-type ._Xefhu._ViJD-{right:0}._mI5Tb ._SHZL3{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._mI5Tb ._SHZL3 ._MjxLB{position:absolute;width:2px;right:2px;top:0;bottom:0}._mI5Tb ._SHZL3 ._MjxLB._BhSpS{background-color:#0a6ed1}._mI5Tb ._SHZL3:hover ._MjxLB:not(._BhSpS){background-color:#d9d9d9}._mI5Tb ._A93nF{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._mI5Tb ._A93nF._JmCZv{flex-direction:row-reverse;justify-content:flex-start}._mI5Tb ._A93nF._JmCZv ._gSscp{margin:1px 7px 1px 1px}._mI5Tb ._A93nF ._YDSVm{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._mI5Tb ._A93nF ._gSscp{margin:1px 1px 1px 7px;flex-shrink:0}._mI5Tb ._IF7re{margin-left:6px;margin-right:4px;flex-shrink:0}._mI5Tb ._RAYRH{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._mI5Tb:focus{outline:none}body.keyboard-user ._mI5Tb._hxpYA:after,body.keyboard-user ._mI5Tb:focus:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._kYT41{margin-right:6px}._C9aKv{display:flex;border-right:3px solid #e5e5e5;position:sticky;left:0;background-color:#fff;z-index:20}._C9aKv[focus-within]{z-index:30}._C9aKv:focus-within{z-index:30}._JDRrf{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #eee;flex-shrink:0;font-size:14px;line-height:20px;overflow-wrap:break-word;color:#32363a;position:relative}._JDRrf ._j5pr3{width:100%;padding:12px 12px 11px;overflow:hidden}._JDRrf._t4ws-{background-color:#efefef;border-bottom-color:#dfdfe1}._JDRrf._wpx-6{flex-grow:1}._JDRrf:focus{outline:none}body.keyboard-user ._JDRrf._hxpYA:after,body.keyboard-user ._JDRrf:focus:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._S8g7r{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._S8g7r._kpRMd{border-bottom-color:#d9d9d9;background-color:#fff}._B-WjT{display:flex;align-items:center;justify-content:center;min-height:44px;width:40px;border-bottom:1px solid #eee;padding:12px 12px 11px;flex-shrink:0;cursor:pointer}._B-WjT._kpRMd{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._B-WjT:focus input~span,._B-WjT:hover input~span{border-color:#0b6ed0}._B-WjT ._C8Dch{position:relative;display:inline-flex}._B-WjT ._C8Dch ._xZ3WO{margin:0!important}._B-WjT ._C8Dch ._ay2Sd{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._ihamV{justify-content:flex-start}._-PYET{justify-content:center;text-align:center}._JmCZv{justify-content:flex-end;text-align:right}._C6xBg{display:none}._Lk3Me{opacity:0;height:0;width:0;overflow:hidden}._Lk3Me,._RlQyJ{position:absolute}._RlQyJ{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._akeWj{width:246px}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -38,21 +38,16 @@ const AdvancedTableCell = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
38
38
|
e.stopPropagation(); // Prevent click event from causing row selection with interactive cell content
|
|
39
39
|
}
|
|
40
40
|
} : undefined;
|
|
41
|
-
|
|
42
41
|
const handleKeyDown = e => {
|
|
43
42
|
if (e.target === e.currentTarget && e.key === 'Enter' && isInteractive) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
(_focusableElementRef$ = focusableElementRef.current) === null || _focusableElementRef$ === void 0 ? void 0 : _focusableElementRef$.focus();
|
|
43
|
+
focusableElementRef.current?.focus();
|
|
47
44
|
e.preventDefault(); // Prevent click event from occurring on the focusable element
|
|
48
45
|
}
|
|
49
46
|
|
|
50
|
-
onKeyDown
|
|
47
|
+
onKeyDown?.(e);
|
|
51
48
|
};
|
|
52
|
-
|
|
53
49
|
const handleFocus = e => {
|
|
54
|
-
onFocus
|
|
55
|
-
|
|
50
|
+
onFocus?.(e);
|
|
56
51
|
if (isInteractive) {
|
|
57
52
|
if (e.target !== e.currentTarget) {
|
|
58
53
|
setIsEditing(true);
|
|
@@ -61,19 +56,14 @@ const AdvancedTableCell = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
61
56
|
}
|
|
62
57
|
}
|
|
63
58
|
};
|
|
64
|
-
|
|
65
59
|
const handleBlur = isInteractive ? e => {
|
|
66
60
|
if (e.target !== e.currentTarget) {
|
|
67
61
|
setIsEditing(false);
|
|
68
62
|
}
|
|
69
63
|
} : undefined;
|
|
70
|
-
|
|
71
64
|
const focusCell = () => {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
(_cellRef$current = cellRef.current) === null || _cellRef$current === void 0 ? void 0 : _cellRef$current.focus();
|
|
65
|
+
cellRef.current?.focus();
|
|
75
66
|
};
|
|
76
|
-
|
|
77
67
|
const computedWidth = useComputedWidth(widthBuffer, width);
|
|
78
68
|
return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
|
79
69
|
role: "gridcell",
|
|
@@ -55,8 +55,8 @@ const AdvancedTableColumnHeader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
55
55
|
const [ellipsisShown, setEllipsisShown] = useState();
|
|
56
56
|
const columnHeaderRef = useRef(null);
|
|
57
57
|
const labelContainerRef = useRef(null);
|
|
58
|
-
const isSortable = Boolean(sortOptions
|
|
59
|
-
const isSorted = isSortable && selectedSortOption.columnId === id && selectedSortOption.index >= 0 && selectedSortOption.index <
|
|
58
|
+
const isSortable = Boolean(sortOptions?.length);
|
|
59
|
+
const isSorted = isSortable && selectedSortOption.columnId === id && selectedSortOption.index >= 0 && selectedSortOption.index < sortOptions?.length && (selectedSortOption.direction === 'ascending' || selectedSortOption.direction === 'descending');
|
|
60
60
|
const selectedSortIndex = isSorted ? selectedSortOption.index : -1;
|
|
61
61
|
const arrowUpSvgContent = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("path", {
|
|
62
62
|
fillRule: "evenodd",
|
|
@@ -108,41 +108,31 @@ const AdvancedTableColumnHeader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
108
108
|
dropTargetSide,
|
|
109
109
|
setDropTargetSide
|
|
110
110
|
});
|
|
111
|
+
|
|
111
112
|
/**
|
|
112
113
|
* Note: Screen reader descriptions (aria-describedby) of column header keyboard shorcuts were not added due to a suboptimal
|
|
113
114
|
* VoiceOver experience in multiple browsers: description read twice, description read before the header contents, etc. Keep
|
|
114
115
|
* in mind this is not a WCAG 2.0 AA violation.
|
|
115
116
|
*/
|
|
116
|
-
|
|
117
117
|
const handleKeyDown = e => {
|
|
118
118
|
if (e.target !== e.currentTarget) return;
|
|
119
|
-
|
|
120
119
|
if (hasMenu && e.key === 'Enter') {
|
|
121
120
|
setIsHiddenMenuOpen(true);
|
|
122
121
|
setHiddenMenuHighlightedIndex(0);
|
|
123
122
|
} else if (onWidthChange && e.key === 'ArrowRight' && e.shiftKey) {
|
|
124
|
-
var _columnHeaderRef$curr;
|
|
125
|
-
|
|
126
123
|
e.preventDefault(); // prevent scroll
|
|
127
|
-
|
|
128
|
-
const newWidth = ((_columnHeaderRef$curr = columnHeaderRef.current) === null || _columnHeaderRef$curr === void 0 ? void 0 : _columnHeaderRef$curr.getBoundingClientRect().width) + 10;
|
|
124
|
+
const newWidth = columnHeaderRef.current?.getBoundingClientRect().width + 10;
|
|
129
125
|
onWidthChange(newWidth);
|
|
130
126
|
} else if (onWidthChange && e.key === 'ArrowLeft' && e.shiftKey) {
|
|
131
|
-
var _columnHeaderRef$curr2;
|
|
132
|
-
|
|
133
127
|
e.preventDefault(); // prevent scroll
|
|
134
|
-
|
|
135
|
-
const newWidth = Math.max(80, ((_columnHeaderRef$curr2 = columnHeaderRef.current) === null || _columnHeaderRef$curr2 === void 0 ? void 0 : _columnHeaderRef$curr2.getBoundingClientRect().width) - 10);
|
|
128
|
+
const newWidth = Math.max(80, columnHeaderRef.current?.getBoundingClientRect().width - 10);
|
|
136
129
|
onWidthChange(newWidth);
|
|
137
130
|
} else {
|
|
138
|
-
onKeyDown
|
|
131
|
+
onKeyDown?.(e);
|
|
139
132
|
}
|
|
140
133
|
};
|
|
141
|
-
|
|
142
134
|
const handleClick = e => {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
if (e.target === e.currentTarget || (_labelContainerRef$cu = labelContainerRef.current) !== null && _labelContainerRef$cu !== void 0 && _labelContainerRef$cu.contains(e.target)) {
|
|
135
|
+
if (e.target === e.currentTarget || labelContainerRef.current?.contains(e.target)) {
|
|
146
136
|
const newIndex = isSorted ? selectedSortIndex : 0;
|
|
147
137
|
const newDirection = isSorted && selectedSortOption.direction === 'ascending' ? 'descending' : 'ascending';
|
|
148
138
|
setSelectedSortOption({
|
|
@@ -152,17 +142,14 @@ const AdvancedTableColumnHeader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
152
142
|
});
|
|
153
143
|
}
|
|
154
144
|
};
|
|
155
|
-
|
|
156
145
|
const handleIsPinnedChange = newIsPinned => {
|
|
157
146
|
if (newIsPinned) {
|
|
158
147
|
setPinnedColumns(currentPinnedColumns => [...currentPinnedColumns, id]);
|
|
159
148
|
} else {
|
|
160
149
|
setPinnedColumns(currentPinnedColumns => currentPinnedColumns.filter(pinnedColumnId => id !== pinnedColumnId));
|
|
161
150
|
}
|
|
162
|
-
|
|
163
151
|
setFocusedColumnId(id);
|
|
164
152
|
};
|
|
165
|
-
|
|
166
153
|
const handleMoveLeft = () => {
|
|
167
154
|
if (isPinned) {
|
|
168
155
|
setPinnedColumns(currentPinnedColumns => {
|
|
@@ -180,10 +167,8 @@ const AdvancedTableColumnHeader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
180
167
|
return newColumnOrder;
|
|
181
168
|
});
|
|
182
169
|
}
|
|
183
|
-
|
|
184
170
|
setFocusedColumnId(id);
|
|
185
171
|
};
|
|
186
|
-
|
|
187
172
|
const handleMoveRight = () => {
|
|
188
173
|
if (isPinned) {
|
|
189
174
|
setPinnedColumns(currentPinnedColumns => {
|
|
@@ -201,36 +186,27 @@ const AdvancedTableColumnHeader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
201
186
|
return newColumnOrder;
|
|
202
187
|
});
|
|
203
188
|
}
|
|
204
|
-
|
|
205
189
|
setFocusedColumnId(id);
|
|
206
190
|
};
|
|
207
|
-
|
|
208
191
|
const handleMouseDown = e => {
|
|
209
192
|
if (e.button === 0) {
|
|
210
193
|
// left mouse button
|
|
211
194
|
e.preventDefault(); // prevent focus from changing
|
|
212
|
-
|
|
213
195
|
e.stopPropagation(); // prevent columns from being clicked and changing sort direction
|
|
214
|
-
|
|
215
196
|
setIsResizing(true);
|
|
216
197
|
}
|
|
217
198
|
};
|
|
218
|
-
|
|
219
199
|
const handleMouseMove = e => {
|
|
220
|
-
var _columnHeaderRef$curr3;
|
|
221
|
-
|
|
222
200
|
const mouseX = e.clientX;
|
|
223
|
-
const headerX =
|
|
201
|
+
const headerX = columnHeaderRef.current?.getBoundingClientRect().x;
|
|
224
202
|
const newWidth = Math.max(80, mouseX - headerX);
|
|
225
|
-
onWidthChange
|
|
203
|
+
onWidthChange?.(newWidth);
|
|
226
204
|
};
|
|
227
|
-
|
|
228
205
|
const handleMouseUp = e => {
|
|
229
206
|
if (e.button === 0) {
|
|
230
207
|
setIsResizing(false);
|
|
231
208
|
}
|
|
232
209
|
};
|
|
233
|
-
|
|
234
210
|
const options = {
|
|
235
211
|
isDisabled: !isResizing
|
|
236
212
|
};
|
|
@@ -244,11 +220,7 @@ const AdvancedTableColumnHeader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
244
220
|
onIsPinnedChange: disableUserPinnableColumns ? undefined : handleIsPinnedChange,
|
|
245
221
|
onMoveLeft: disableUserReorderableColumns || isPinned && columnIndex === 0 || !isPinned && columnIndex === minUnpinnedColumnIndex ? undefined : handleMoveLeft,
|
|
246
222
|
onMoveRight: disableUserReorderableColumns || isPinned && columnIndex === minUnpinnedColumnIndex - 1 || !isPinned && columnIndex === maxUnpinnedColumnIndex ? undefined : handleMoveRight,
|
|
247
|
-
onFocus: () =>
|
|
248
|
-
var _columnHeaderRef$curr4;
|
|
249
|
-
|
|
250
|
-
return (_columnHeaderRef$curr4 = columnHeaderRef.current) === null || _columnHeaderRef$curr4 === void 0 ? void 0 : _columnHeaderRef$curr4.focus();
|
|
251
|
-
},
|
|
223
|
+
onFocus: () => columnHeaderRef.current?.focus(),
|
|
252
224
|
columnId: id,
|
|
253
225
|
columnHeaderRef,
|
|
254
226
|
'data-testid': dataTestId
|
|
@@ -316,9 +288,7 @@ const AdvancedTableColumnHeader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
316
288
|
tabIndex: -1,
|
|
317
289
|
"aria-hidden": "true",
|
|
318
290
|
onFocus: () => {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
(_columnHeaderRef$curr5 = columnHeaderRef.current) === null || _columnHeaderRef$curr5 === void 0 ? void 0 : _columnHeaderRef$curr5.focus();
|
|
291
|
+
columnHeaderRef.current?.focus();
|
|
322
292
|
},
|
|
323
293
|
className: styles.advancedTableColumnHeaderMenuHiddenAnchor
|
|
324
294
|
})
|
|
@@ -41,7 +41,6 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
41
41
|
} = useTranslation();
|
|
42
42
|
const id = useId();
|
|
43
43
|
const selectedValue = JSON.stringify(selectedSortOption);
|
|
44
|
-
|
|
45
44
|
const getActionMenuItem = _ref2 => {
|
|
46
45
|
let {
|
|
47
46
|
onSelect,
|
|
@@ -53,13 +52,10 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
53
52
|
role: "menuitem" // Enables having an action menu item inside of a SelectMenu
|
|
54
53
|
,
|
|
55
54
|
onSelect: e => {
|
|
56
|
-
var _columnHeaderRef$curr;
|
|
57
|
-
|
|
58
55
|
e.preventDefault(); // prevents SelectMenu value from changing
|
|
59
|
-
|
|
60
56
|
setIsOpen(false);
|
|
61
|
-
|
|
62
|
-
onSelect
|
|
57
|
+
columnHeaderRef.current?.focus();
|
|
58
|
+
onSelect?.();
|
|
63
59
|
},
|
|
64
60
|
"date-testid": menuItemDataTestId
|
|
65
61
|
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
@@ -68,9 +64,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
68
64
|
"aria-hidden": "true"
|
|
69
65
|
}), label);
|
|
70
66
|
};
|
|
71
|
-
|
|
72
67
|
let pinItem;
|
|
73
|
-
|
|
74
68
|
if (onIsPinnedChange) {
|
|
75
69
|
const pinIcon = isPinned ? UnpinIcon : PinIcon;
|
|
76
70
|
const pinLabel = translate(isPinned ? 'advancedTable.unpinColumn' : 'advancedTable.pinColumn');
|
|
@@ -81,9 +75,9 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
81
75
|
'data-testid': getSubDataTestId(dataTestId, 'ColumnHeaderMenu-PinColumn')
|
|
82
76
|
});
|
|
83
77
|
}
|
|
84
|
-
|
|
85
78
|
return /*#__PURE__*/React__default.createElement(SelectMenu, _extends({
|
|
86
|
-
key:
|
|
79
|
+
key:
|
|
80
|
+
// A hack since SelectMenu can't be controlled
|
|
87
81
|
selectedSortOption.columnId === columnId ? selectedValue : columnId,
|
|
88
82
|
id: id,
|
|
89
83
|
defaultValue: selectedValue,
|
|
@@ -92,7 +86,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
92
86
|
},
|
|
93
87
|
isOpen: isOpen,
|
|
94
88
|
onIsOpenChange: setIsOpen
|
|
95
|
-
}, rest), sortOptions
|
|
89
|
+
}, rest), sortOptions?.map((_ref3, index) => {
|
|
96
90
|
let {
|
|
97
91
|
ascendingLabel,
|
|
98
92
|
ascendingIcon,
|
|
@@ -115,7 +109,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
115
109
|
key: ascendingValue,
|
|
116
110
|
value: ascendingValue,
|
|
117
111
|
label: ascendingLabel,
|
|
118
|
-
"data-testid": getSubDataTestId(dataTestId,
|
|
112
|
+
"data-testid": getSubDataTestId(dataTestId, `ColumnHeaderMenu-Sort-${index}-${SortDirections.Ascending}`)
|
|
119
113
|
}, /*#__PURE__*/React__default.createElement(AscendingIconComponent, {
|
|
120
114
|
size: "small",
|
|
121
115
|
className: styles.advancedTableColumnHeaderMenuItemIcon,
|
|
@@ -124,13 +118,13 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
124
118
|
key: descendingValue,
|
|
125
119
|
value: descendingValue,
|
|
126
120
|
label: descendingLabel,
|
|
127
|
-
"data-testid": getSubDataTestId(dataTestId,
|
|
121
|
+
"data-testid": getSubDataTestId(dataTestId, `ColumnHeaderMenu-Sort-${index}-${SortDirections.Descending}`)
|
|
128
122
|
}, /*#__PURE__*/React__default.createElement(DescendingIconComponent, {
|
|
129
123
|
size: "small",
|
|
130
124
|
className: styles.advancedTableColumnHeaderMenuItemIcon,
|
|
131
125
|
"aria-hidden": "true"
|
|
132
126
|
}), descendingLabel)];
|
|
133
|
-
}),
|
|
127
|
+
}), sortOptions?.length && (onIsPinnedChange || onMoveLeft || onMoveRight) && /*#__PURE__*/React__default.createElement(Divider, null), pinItem, onMoveLeft && getActionMenuItem({
|
|
134
128
|
onSelect: onMoveLeft,
|
|
135
129
|
Icon: ArrowLeftIcon,
|
|
136
130
|
label: translate('advancedTable.moveColumnLeft'),
|
|
@@ -5,8 +5,6 @@ import styles from './AdvancedTable2.js';
|
|
|
5
5
|
import Portal from '../../utils/Portal/Portal.js';
|
|
6
6
|
|
|
7
7
|
const AdvancedTableDragPreview = _ref => {
|
|
8
|
-
var _columnHeaderRefs$ite, _columnHeaderRefs$ite2, _tableRef$current, _tableRef$current$get;
|
|
9
|
-
|
|
10
8
|
let {
|
|
11
9
|
tableRef,
|
|
12
10
|
columnHeaderRefs
|
|
@@ -18,10 +16,10 @@ const AdvancedTableDragPreview = _ref => {
|
|
|
18
16
|
item: monitor.getItem(),
|
|
19
17
|
currentOffset: monitor.getSourceClientOffset()
|
|
20
18
|
}));
|
|
21
|
-
const width = columnHeaderRefs
|
|
22
|
-
const height =
|
|
23
|
-
const top =
|
|
24
|
-
const left =
|
|
19
|
+
const width = columnHeaderRefs?.[item?.columnIndex]?.getBoundingClientRect()?.width;
|
|
20
|
+
const height = tableRef.current?.getBoundingClientRect()?.height;
|
|
21
|
+
const top = currentOffset?.y || 0;
|
|
22
|
+
const left = currentOffset?.x || 0;
|
|
25
23
|
return /*#__PURE__*/React__default.createElement(Portal, null, /*#__PURE__*/React__default.createElement("div", {
|
|
26
24
|
className: styles.dragPreview,
|
|
27
25
|
style: {
|
|
@@ -4,7 +4,6 @@ import '../../components/Pagination/index.js';
|
|
|
4
4
|
import Pagination from '../../components/Pagination/Pagination.js';
|
|
5
5
|
|
|
6
6
|
/* eslint-disable no-nested-ternary */
|
|
7
|
-
|
|
8
7
|
const AdvancedTablePagination = _ref => {
|
|
9
8
|
let {
|
|
10
9
|
rowsPerPage,
|
|
@@ -15,15 +14,13 @@ const AdvancedTablePagination = _ref => {
|
|
|
15
14
|
onPageChange,
|
|
16
15
|
'data-testid': dataTestId
|
|
17
16
|
} = _ref;
|
|
18
|
-
|
|
19
17
|
const handlePageChange = _ref2 => {
|
|
20
18
|
let {
|
|
21
19
|
page
|
|
22
20
|
} = _ref2;
|
|
23
21
|
setCurrentPage(page);
|
|
24
|
-
onPageChange
|
|
22
|
+
onPageChange?.(page);
|
|
25
23
|
};
|
|
26
|
-
|
|
27
24
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
28
25
|
className: styles.advancedTablePaginationContainer
|
|
29
26
|
}, /*#__PURE__*/React__default.createElement(Pagination, {
|
|
@@ -8,7 +8,6 @@ import CaretDownIcon from '../../icons/components/CaretDownIcon.js';
|
|
|
8
8
|
import CaretRightIcon from '../../icons/components/CaretRightIcon.js';
|
|
9
9
|
|
|
10
10
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
11
|
-
|
|
12
11
|
const AdvancedTableRowExpandButton = _ref => {
|
|
13
12
|
let {
|
|
14
13
|
isRowExpanded,
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
// TODO: Move the imported types into this file to avoid a ciruclar dependency warning.
|
|
2
2
|
// Also Alignment, etc can be defined directly and have AdvancedTableColumnConfig use them instead of the reverse like now.
|
|
3
3
|
// Context: Zach was trying to make type-doc work better, but it's probably not worth the weird organization.
|
|
4
|
-
let SortDirections;
|
|
5
4
|
|
|
5
|
+
let SortDirections;
|
|
6
6
|
(function (SortDirections) {
|
|
7
7
|
SortDirections["Ascending"] = "ascending";
|
|
8
8
|
SortDirections["Descending"] = "descending";
|
|
9
9
|
SortDirections["None"] = "none";
|
|
10
10
|
})(SortDirections || (SortDirections = {}));
|
|
11
|
-
|
|
12
11
|
let Alignments;
|
|
13
|
-
|
|
14
12
|
(function (Alignments) {
|
|
15
13
|
Alignments["Left"] = "left";
|
|
16
14
|
Alignments["Right"] = "right";
|
|
@@ -38,8 +38,9 @@ const useDragAndDrop = _ref => {
|
|
|
38
38
|
options: {
|
|
39
39
|
dropEffect: 'move'
|
|
40
40
|
}
|
|
41
|
-
}), [id, tableId, isPinned, columnIndex, isEnabled, setDragSource, setDropTarget, setDropTargetSide]);
|
|
41
|
+
}), [id, tableId, isPinned, columnIndex, isEnabled, setDragSource, setDropTarget, setDropTargetSide]);
|
|
42
42
|
|
|
43
|
+
// Remove HTML5 DnD preview
|
|
43
44
|
useEffect(() => {
|
|
44
45
|
dragPreviewRef(getEmptyImage(), {
|
|
45
46
|
captureDraggingState: false
|
|
@@ -52,29 +53,25 @@ const useDragAndDrop = _ref => {
|
|
|
52
53
|
}, dropRef] = useDrop(() => ({
|
|
53
54
|
accept: tableId,
|
|
54
55
|
hover: (item, monitor) => {
|
|
55
|
-
var _monitor$getClientOff, _columnHeaderRef$curr;
|
|
56
|
-
|
|
57
56
|
const {
|
|
58
57
|
id: dragSourceId,
|
|
59
58
|
columnIndex: dragSourceColumnIndex,
|
|
60
59
|
isPinned: dragSourceIsPinned
|
|
61
60
|
} = item;
|
|
62
61
|
setDropTarget(id);
|
|
63
|
-
|
|
64
62
|
if (id === dragSourceId) {
|
|
65
63
|
setDropTargetSide(undefined);
|
|
66
64
|
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
65
|
+
}
|
|
69
66
|
|
|
70
|
-
|
|
67
|
+
// Calculate which column line is closest
|
|
68
|
+
const dropX = monitor.getClientOffset()?.x;
|
|
71
69
|
const {
|
|
72
70
|
x,
|
|
73
71
|
width
|
|
74
|
-
} =
|
|
72
|
+
} = columnHeaderRef.current?.getBoundingClientRect();
|
|
75
73
|
const diffLeft = Math.abs(dropX - x) || 0;
|
|
76
74
|
const diffRight = Math.abs(dropX - (x + width)) || 0;
|
|
77
|
-
|
|
78
75
|
if (diffLeft < diffRight) {
|
|
79
76
|
// hover over left side
|
|
80
77
|
if (columnIndex - dragSourceColumnIndex === 1 && isPinned === dragSourceIsPinned) {
|
|
@@ -97,11 +94,9 @@ const useDragAndDrop = _ref => {
|
|
|
97
94
|
columnIndex: dragSourceColumnIndex,
|
|
98
95
|
isPinned: dragSourceIsPinned
|
|
99
96
|
} = item;
|
|
100
|
-
|
|
101
97
|
if (id === dragSourceId || dropTargetSideRef.current === undefined) {
|
|
102
98
|
return;
|
|
103
99
|
}
|
|
104
|
-
|
|
105
100
|
if (isPinned && !dragSourceIsPinned) {
|
|
106
101
|
// Dragging from an unpinned column onto a pinned column
|
|
107
102
|
setPinnedColumns(pinnedColumns => {
|
|
@@ -152,8 +147,9 @@ const useDragAndDrop = _ref => {
|
|
|
152
147
|
collect: monitor => ({
|
|
153
148
|
isOver: monitor.isOver()
|
|
154
149
|
})
|
|
155
|
-
}), [id, tableId, isPinned, columnIndex, isEnabled, setDropTarget, dropTargetSideRef, setDropTargetSide]);
|
|
150
|
+
}), [id, tableId, isPinned, columnIndex, isEnabled, setDropTarget, dropTargetSideRef, setDropTargetSide]);
|
|
156
151
|
|
|
152
|
+
// Clear dropTarget when header is no longer being hovered
|
|
157
153
|
useEffect(() => {
|
|
158
154
|
if (!isOver) {
|
|
159
155
|
setDropTarget(currentDropTarget => {
|
|
@@ -161,7 +157,6 @@ const useDragAndDrop = _ref => {
|
|
|
161
157
|
setDropTargetSide(undefined);
|
|
162
158
|
return '';
|
|
163
159
|
}
|
|
164
|
-
|
|
165
160
|
return currentDropTarget;
|
|
166
161
|
});
|
|
167
162
|
}
|
|
@@ -3,7 +3,7 @@ import { useMemo } from 'react';
|
|
|
3
3
|
function useComputedWidth() {
|
|
4
4
|
let widthBuffer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
5
5
|
let defaultWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
|
|
6
|
-
return useMemo(() => typeof defaultWidth === 'number' ?
|
|
6
|
+
return useMemo(() => typeof defaultWidth === 'number' ? `${defaultWidth + widthBuffer}px` : `calc(${widthBuffer}px + ${defaultWidth})`, [widthBuffer, defaultWidth]);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export { useComputedWidth as default };
|