@qualtrics/ui-react 2.21.0 → 2.22.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/CHANGELOG.md +18 -0
- package/dist/__shared/cjs/{index-0ae99de2.js → index-75d9309a.js} +4 -4
- package/dist/__shared/cjs/{index-201e8786.js → index-a8c1a789.js} +678 -568
- package/dist/components/Accordion/Accordion.js +2 -3
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Accordion/AccordionHeader.js +5 -4
- package/dist/components/Accordion/AccordionPanel.js +3 -3
- package/dist/components/Accordion/AccordionSection.js +1 -2
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/Button2.js +2 -2
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- 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/VisualCheckbox2.js +3 -3
- package/dist/components/ColorPicker/Alpha.js +12 -9
- package/dist/components/ColorPicker/ColorPicker.js +10 -8
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/ColorPicker/ColorPickerFlyoutInputs.js +8 -6
- package/dist/components/ColorPicker/Hue.js +3 -2
- package/dist/components/ColorPicker/Palette.js +7 -5
- package/dist/components/ColorPicker/Saturation.js +9 -8
- package/dist/components/ColorPicker/utils/hexToRgbaString.js +3 -2
- package/dist/components/ColorPicker/utils/rgbToHex.js +1 -1
- package/dist/components/ColorPicker/utils/validateHex.js +10 -9
- package/dist/components/Combobox/Combobox.js +48 -29
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/Combobox/ComboboxHeader.js +1 -1
- package/dist/components/Combobox/ComboboxIcon.js +3 -2
- package/dist/components/Combobox/ComboboxInput.js +4 -4
- package/dist/components/Combobox/ComboboxList.js +2 -2
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +5 -2
- package/dist/components/Dropdown/Dropdown.js +14 -9
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/Dropdown/DropdownButton.js +23 -19
- package/dist/components/Dropdown/DropdownList.js +4 -4
- package/dist/components/Dropdown/DropdownOption.js +6 -9
- package/dist/components/Dropdown/DropdownSearch.js +12 -6
- package/dist/components/FilePicker/FilePicker.js +13 -6
- 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 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover.js +5 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput.js +12 -9
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/Input/InputField.js +2 -2
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- 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/ConditionSet.js +5 -5
- package/dist/components/LogicEditor/LogicEditor.js +1 -1
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/LogicEditor/utils.js +2 -1
- package/dist/components/Modal/Modal.js +14 -13
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/BaseMenu.js +44 -36
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/SelectMenu/SelectMenu.js +2 -2
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +10 -7
- package/dist/components/NewMenu/parts/MenuItem.js +1 -1
- package/dist/components/NumberStepper/NumberStepper.js +7 -6
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/NumberStepper/NumberStepperDecrement.js +1 -1
- package/dist/components/NumberStepper/NumberStepperIncrement.js +1 -1
- package/dist/components/NumberStepper/NumberStepperInput.js +3 -3
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Pagination/PaginationNextButton.js +5 -5
- package/dist/components/Pagination/PaginationPageInput.js +11 -9
- package/dist/components/Pagination/PaginationPreviousButton.js +5 -5
- package/dist/components/Popover/Popover.js +9 -7
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch.js +4 -3
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/QuickSearch/QuickSearchInput.js +4 -4
- package/dist/components/Radio/Radio.js +12 -11
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput.js +4 -3
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/SidebarNav.js +2 -1
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/SidebarNav/SidebarNavLink.js +1 -1
- package/dist/components/Slider/RangeSlider.js +2 -2
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Slider/SliderButton.js +1 -1
- 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/TabList.js +6 -5
- package/dist/components/Tabs/TabPanel.js +3 -3
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +10 -4
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/UIProvider/UIProvider.js +2 -2
- package/dist/components/deprecated_ColorPicker/Alpha.js +4 -4
- package/dist/components/deprecated_ColorPicker/Color.js +6 -6
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +2 -2
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_ColorPicker/HexInput.js +1 -1
- package/dist/components/deprecated_ColorPicker/Hue.js +3 -3
- package/dist/components/deprecated_ColorPicker/Saturation.js +5 -5
- package/dist/components/deprecated_ColorPicker/Swatch.js +2 -2
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +2 -2
- package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +2 -2
- package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +8 -8
- package/dist/components/deprecated_Tabs/Tabs.js +11 -7
- 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 +4 -2
- package/dist/components/deprecated_Toolbar/ToolbarTab.js +8 -8
- package/dist/components/deprecated_Toolbar/ToolbarTabs.js +6 -3
- package/dist/hooks/useBreakpoints/useBreakpoints.js +1 -1
- package/dist/hooks/useClickOutside/useClickOutside.js +2 -1
- package/dist/hooks/useControllableState/useControllableState.js +2 -1
- package/dist/hooks/useEventListener/useEventListener.js +1 -1
- package/dist/hooks/useId/useId.js +1 -1
- package/dist/hooks/useOverlay/useOverlay.js +7 -6
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/useResponsiveValue/useResponsiveValue.js +2 -1
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +4 -2
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/createIconComponent.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +14 -7
- package/dist/index.es.js +1 -1
- package/dist/index.js +3 -4
- package/dist/next/AdvancedTable/AdvancedTable.js +62 -52
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableCell.js +6 -4
- package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +18 -10
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +7 -6
- package/dist/next/AdvancedTable/AdvancedTableDragPreview.js +5 -4
- package/dist/next/AdvancedTable/AdvancedTablePagination.js +1 -1
- package/dist/next/AdvancedTable/AdvancedTableTypes.js +6 -6
- package/dist/next/AdvancedTable/useAdvancedTableDragAndDrop.js +3 -2
- package/dist/next/AdvancedTable/useComputedWidth.js +1 -1
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +5 -3
- 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 +2 -2
- package/dist/next/Combobox/ComboboxGroup.js +1 -1
- package/dist/next/Combobox/ComboboxInput.js +2 -2
- package/dist/next/Combobox/ComboboxOption.js +1 -1
- package/dist/next/Combobox/hooks/useComboboxFilteredGroup/useComboboxFilteredGroup.js +1 -1
- package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +12 -8
- package/dist/next/Combobox/hooks/useComboboxValue/useComboboxValue.js +1 -1
- package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/useListboxFlyoutDimensions.js +3 -2
- package/dist/next/Combobox/hooks/useSelectedOptionScroll/useSelectedOptionScroll.js +2 -1
- package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/useShouldRenderGroupHeader.js +2 -1
- package/dist/next/Combobox/utils/nodeRegistration/nodeRegistration.js +1 -1
- package/dist/next/Drawer/Drawer.js +7 -4
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Input/Input.js +2 -2
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/Menu/Menu.js +5 -3
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuItem.js +8 -9
- package/dist/next/Menu/MenuPane.js +20 -8
- package/dist/next/Menu/SubMenu.js +16 -18
- package/dist/next/Menu/useMutationObserver.js +1 -1
- package/dist/next/Menu/usePaneSearch.js +31 -21
- package/dist/next/PhoneNumberInput/PhoneNumberInput.js +7 -6
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/SplitButton/SplitButton.js +8 -2
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimeDropdown.js +4 -4
- package/dist/next/TimePicker/TimeInput.js +2 -2
- package/dist/next/TimePicker/TimePicker.js +4 -4
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/TimePicker/TimePickerIcon.js +2 -1
- package/dist/next/TimePicker/utils.js +14 -27
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/index.d.ts +1 -1
- package/dist/next/index.js +317 -260
- package/dist/utils/Flyout/Flyout.js +1 -1
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/dist/utils/Popper/Popper.js +9 -5
- package/dist/utils/TextOverflowTooltip/TextOverflowTooltip.js +2 -1
- package/dist/utils/Translation/containsComponentOrElement.js +1 -3
- package/dist/utils/Translation/useTranslation.js +4 -5
- package/dist/utils/filterChildren/filterChildren.js +2 -1
- package/dist/utils/getSubDataTestId/getSubDataTestId.js +1 -1
- package/dist/utils/mediaQueryManager/mediaQueryManager.js +1 -1
- package/dist/utils/mergeRefs/mergeRefs.js +1 -1
- package/dist/utils/wrapEvent/wrapEvent.js +2 -2
- package/next/package.json +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -59,14 +59,21 @@ declare interface BaseNavLinkProps {
|
|
|
59
59
|
'data-testid'?: string;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export declare function Breakpoint({ size, children, }:
|
|
63
|
-
|
|
62
|
+
export declare function Breakpoint({ size, children, }: BreakpointProps): null;
|
|
63
|
+
|
|
64
|
+
export declare interface BreakpointProps {
|
|
65
|
+
/** The content to display when the breakpoint threshold is met. */
|
|
64
66
|
children: React.ReactNode;
|
|
65
|
-
|
|
67
|
+
/** The breakpoint size threshold to use. */
|
|
68
|
+
size: DefaultBreakpoints;
|
|
69
|
+
}
|
|
66
70
|
|
|
67
|
-
export declare function BreakpointSwitch({ children, }:
|
|
71
|
+
export declare function BreakpointSwitch({ children, }: BreakpointSwitchProps): ReactElement;
|
|
72
|
+
|
|
73
|
+
export declare interface BreakpointSwitchProps {
|
|
74
|
+
/** List of `Breakpoint` components */
|
|
68
75
|
children: React_2.ReactNode;
|
|
69
|
-
}
|
|
76
|
+
}
|
|
70
77
|
|
|
71
78
|
export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
72
79
|
|
|
@@ -314,7 +321,7 @@ export declare const DEFAULT_BREAKPOINTS: {
|
|
|
314
321
|
xl: number;
|
|
315
322
|
};
|
|
316
323
|
|
|
317
|
-
declare type
|
|
324
|
+
export declare type DefaultBreakpoints = keyof typeof DEFAULT_BREAKPOINTS;
|
|
318
325
|
|
|
319
326
|
export declare interface deprecated_ColorHsb {
|
|
320
327
|
h: number;
|
|
@@ -2001,7 +2008,7 @@ export declare interface UIProviderProps {
|
|
|
2001
2008
|
children?: ReactNode;
|
|
2002
2009
|
}
|
|
2003
2010
|
|
|
2004
|
-
export declare function useBreakpoints<T extends Record<string, number> | undefined = undefined>(breakpoints?: T, unit?: 'em' | 'px'): T extends Record<string, number> ? Record<keyof T, boolean> : Record<
|
|
2011
|
+
export declare function useBreakpoints<T extends Record<string, number> | undefined = undefined>(breakpoints?: T, unit?: 'em' | 'px'): T extends Record<string, number> ? Record<keyof T, boolean> : Record<DefaultBreakpoints, boolean>;
|
|
2005
2012
|
|
|
2006
2013
|
export declare function useResponsiveValue<V, C = typeof DEFAULT_BREAKPOINTS>(values: {
|
|
2007
2014
|
[K in keyof V]: K extends keyof C ? V[K] : never;
|
package/dist/index.es.js
CHANGED
|
@@ -100,6 +100,6 @@ export { default as deprecated_ToolbarPanel } from './components/deprecated_Tool
|
|
|
100
100
|
|
|
101
101
|
/* eslint-disable camelcase */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
const version = '2.
|
|
103
|
+
const version = '2.22.1';
|
|
104
104
|
|
|
105
105
|
export { version };
|
package/dist/index.js
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./__shared/cjs/index-
|
|
6
|
-
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
5
|
+
var index = require('./__shared/cjs/index-a8c1a789.js');
|
|
7
6
|
require('react');
|
|
8
7
|
require('classnames');
|
|
9
|
-
require('./__shared/cjs/index-
|
|
8
|
+
require('./__shared/cjs/index-75d9309a.js');
|
|
10
9
|
require('@babel/runtime-corejs3/helpers/extends');
|
|
11
10
|
require('react-popper');
|
|
12
11
|
require('@popperjs/core');
|
|
@@ -20,7 +19,7 @@ require('throttle-debounce');
|
|
|
20
19
|
|
|
21
20
|
/* eslint-disable camelcase */
|
|
22
21
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
23
|
-
const version = '2.
|
|
22
|
+
const version = '2.22.1';
|
|
24
23
|
|
|
25
24
|
exports.Accordion = index.Accordion;
|
|
26
25
|
exports.AccordionHeader = index.AccordionHeader;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
-
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
3
2
|
import React__default, { useMemo, useState, useCallback, useEffect, useRef } from 'react';
|
|
4
3
|
import classNames from 'classnames';
|
|
5
4
|
import { DndProvider } from 'react-dnd';
|
|
@@ -37,6 +36,7 @@ import useLatest from '../../hooks/useLatest/useLatest.js';
|
|
|
37
36
|
import wrapAround from '../../utils/wrapAround/wrapAround.js';
|
|
38
37
|
|
|
39
38
|
const AdvancedTable = _ref => {
|
|
39
|
+
var _ref5;
|
|
40
40
|
let {
|
|
41
41
|
columnConfigs: externalColumnConfigs,
|
|
42
42
|
rows: rowsPropExternal,
|
|
@@ -78,7 +78,7 @@ const AdvancedTable = _ref => {
|
|
|
78
78
|
// This handles an edge case where no rows are passed in
|
|
79
79
|
// and the internal row transforms cause infinite state updates using a standard default assignment
|
|
80
80
|
const stableDefaultArray = useMemo(() => [], []);
|
|
81
|
-
const rowsProp = rowsPropExternal
|
|
81
|
+
const rowsProp = rowsPropExternal !== null && rowsPropExternal !== void 0 ? rowsPropExternal : stableDefaultArray;
|
|
82
82
|
const [rows, setRows] = useState();
|
|
83
83
|
const rowActionsColumnConfigId = useId();
|
|
84
84
|
let rowActionsColumnConfig;
|
|
@@ -87,7 +87,7 @@ const AdvancedTable = _ref => {
|
|
|
87
87
|
[externalColumnConfigs, rows] // columnConfigs has an implicit dependency on rows because it is initially computed using rows data
|
|
88
88
|
);
|
|
89
89
|
|
|
90
|
-
const [currentPage, setCurrentPage] = useState(initialPage
|
|
90
|
+
const [currentPage, setCurrentPage] = useState(initialPage !== null && initialPage !== void 0 ? initialPage : 1);
|
|
91
91
|
const [tableHeight, setTableHeight] = useState();
|
|
92
92
|
const getPaginatedRowIndex = useCallback(universalRowIndex => rowsPerPage ? universalRowIndex + rowsPerPage * (currentPage - 1) : universalRowIndex, [rowsPerPage, currentPage]);
|
|
93
93
|
const paginatedRows = useMemo(() => {
|
|
@@ -129,13 +129,14 @@ const AdvancedTable = _ref => {
|
|
|
129
129
|
}
|
|
130
130
|
}, /*#__PURE__*/React__default.createElement(EllipsisHorizontalIcon, null))), /*#__PURE__*/React__default.createElement(DropdownList, {
|
|
131
131
|
className: styles.rowActionMenuPane
|
|
132
|
-
}, !rows ? [] : rowActions
|
|
132
|
+
}, !rows ? [] : rowActions === null || rowActions === void 0 ? void 0 : rowActions.map((actionGroup, groupIndex) => {
|
|
133
|
+
var _actionGroup$actions;
|
|
133
134
|
const row = rows[rowIndex];
|
|
134
|
-
const actions = !row ? [] : actionGroup.actions
|
|
135
|
+
const actions = !row ? [] : (_actionGroup$actions = actionGroup.actions) === null || _actionGroup$actions === void 0 ? void 0 : _actionGroup$actions.map((action, actionIndex) => /*#__PURE__*/React__default.createElement(DropdownOption
|
|
135
136
|
// 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.
|
|
136
137
|
// eslint-disable-next-line react/no-array-index-key
|
|
137
138
|
, {
|
|
138
|
-
key:
|
|
139
|
+
key: "".concat(groupIndex, "-").concat(actionIndex),
|
|
139
140
|
disabled: typeof action.isDisabled === 'function' ? action.isDisabled(row && row.rowPropReference) : action.isDisabled,
|
|
140
141
|
onSelect: () => action.action(row && row.rowPropReference),
|
|
141
142
|
value: "",
|
|
@@ -175,9 +176,9 @@ const AdvancedTable = _ref => {
|
|
|
175
176
|
const minColumnIndex = hasFocusableRows ? -1 : 0; // When entire rows are focusable, they get an index of -1 so that the columns can be zero-indexed
|
|
176
177
|
const maxColumnIndex = columnConfigs.length - 1;
|
|
177
178
|
const tableId = useId(externalTableId);
|
|
178
|
-
const arrowKeyDescriptionId =
|
|
179
|
-
const rowActionDescriptionId =
|
|
180
|
-
const rowCheckboxDescriptionId =
|
|
179
|
+
const arrowKeyDescriptionId = "".concat(tableId, "-arrowKeyDescription");
|
|
180
|
+
const rowActionDescriptionId = "".concat(tableId, "-rowActionDescription");
|
|
181
|
+
const rowCheckboxDescriptionId = "".concat(tableId, "-rowCheckboxDescription");
|
|
181
182
|
useResizeObserver(tableRef, entry => {
|
|
182
183
|
setTableHeight(entry.contentRect.height);
|
|
183
184
|
});
|
|
@@ -191,11 +192,11 @@ const AdvancedTable = _ref => {
|
|
|
191
192
|
useDidUpdate(() => {
|
|
192
193
|
setInternalColumnOrder(columnConfigsOrder);
|
|
193
194
|
}, [JSON.stringify(columnConfigsOrder)]);
|
|
194
|
-
const columnOrder = externalColumnOrder
|
|
195
|
+
const columnOrder = externalColumnOrder !== null && externalColumnOrder !== void 0 ? externalColumnOrder : internalColumnOrder;
|
|
195
196
|
const setColumnOrder = useEventCallback(value => {
|
|
196
197
|
const newColumnOrder = typeof value === 'function' ? value(columnOrder) : value;
|
|
197
198
|
setInternalColumnOrder(newColumnOrder);
|
|
198
|
-
onColumnOrderChange
|
|
199
|
+
onColumnOrderChange === null || onColumnOrderChange === void 0 ? void 0 : onColumnOrderChange(newColumnOrder);
|
|
199
200
|
});
|
|
200
201
|
const {
|
|
201
202
|
pinnedColumnConfigs,
|
|
@@ -302,7 +303,7 @@ const AdvancedTable = _ref => {
|
|
|
302
303
|
return ids;
|
|
303
304
|
}, [rowsProp]);
|
|
304
305
|
const totalRowsCountWithExpansion = useMemo(() => getAllRowIds().length, [getAllRowIds]);
|
|
305
|
-
const hasExpandableRows = useMemo(() => rows
|
|
306
|
+
const hasExpandableRows = useMemo(() => rows === null || rows === void 0 ? void 0 : rows.some(_ref3 => {
|
|
306
307
|
let {
|
|
307
308
|
hasChildRows
|
|
308
309
|
} = _ref3;
|
|
@@ -321,10 +322,10 @@ const AdvancedTable = _ref => {
|
|
|
321
322
|
} else if (expand !== false) {
|
|
322
323
|
rowPropReference.isExpanded = true;
|
|
323
324
|
}
|
|
324
|
-
onRowsChange
|
|
325
|
+
onRowsChange === null || onRowsChange === void 0 ? void 0 : onRowsChange([...rowsProp]);
|
|
325
326
|
};
|
|
326
327
|
const getLastToggledRowIndex = () => {
|
|
327
|
-
const index = rows
|
|
328
|
+
const index = rows === null || rows === void 0 ? void 0 : rows.findIndex(_ref4 => {
|
|
328
329
|
let {
|
|
329
330
|
id
|
|
330
331
|
} = _ref4;
|
|
@@ -350,10 +351,11 @@ const AdvancedTable = _ref => {
|
|
|
350
351
|
}
|
|
351
352
|
};
|
|
352
353
|
const multiUpdateCheckedRowIds = (startIndex, endIndex) => {
|
|
354
|
+
var _rows$endIndex;
|
|
353
355
|
if (!rows || startIndex === headerRowIndex || endIndex === headerRowIndex) {
|
|
354
356
|
return;
|
|
355
357
|
}
|
|
356
|
-
const endRowId = rows
|
|
358
|
+
const endRowId = rows === null || rows === void 0 || (_rows$endIndex = rows[endIndex]) === null || _rows$endIndex === void 0 ? void 0 : _rows$endIndex.id;
|
|
357
359
|
const isEndIndexChecked = checkedRowIdsSet.has(endRowId);
|
|
358
360
|
let newCheckedRowIds = [...checkedRowIds];
|
|
359
361
|
const increment = startIndex < endIndex ? 1 : -1;
|
|
@@ -371,7 +373,7 @@ const AdvancedTable = _ref => {
|
|
|
371
373
|
if (hasChildRows) {
|
|
372
374
|
idsToUncheck = idsToUncheck.concat(getAllRowIds(rowPropReference.childRows));
|
|
373
375
|
}
|
|
374
|
-
newCheckedRowIds = newCheckedRowIds.filter(id => !
|
|
376
|
+
newCheckedRowIds = newCheckedRowIds.filter(id => !idsToUncheck.includes(id));
|
|
375
377
|
} else if (!checkedRowIdsSet.has(rowId)) {
|
|
376
378
|
let idsToCheck = [rowId];
|
|
377
379
|
if (hasChildRows) {
|
|
@@ -398,7 +400,7 @@ const AdvancedTable = _ref => {
|
|
|
398
400
|
if (hasChildRows) {
|
|
399
401
|
idsToUncheck = idsToUncheck.concat(getAllRowIds(rowPropReference.childRows));
|
|
400
402
|
}
|
|
401
|
-
setCheckedRowIds(checkedRowIds.filter(id => !
|
|
403
|
+
setCheckedRowIds(checkedRowIds.filter(id => !idsToUncheck.includes(id)));
|
|
402
404
|
} else {
|
|
403
405
|
let idsToCheck = [rowId];
|
|
404
406
|
if (hasChildRows) {
|
|
@@ -421,8 +423,8 @@ const AdvancedTable = _ref => {
|
|
|
421
423
|
let newFocusedRowIndex;
|
|
422
424
|
const currentRow = rows[rowIndex];
|
|
423
425
|
const rowOrFirstColumnIsFocused = focusedColumnIndex <= 0;
|
|
424
|
-
const rowCanExpand = currentRow
|
|
425
|
-
const rowCanCollapse = currentRow
|
|
426
|
+
const rowCanExpand = (currentRow === null || currentRow === void 0 ? void 0 : currentRow.hasChildRows) && !(currentRow !== null && currentRow !== void 0 && currentRow.isExpanded);
|
|
427
|
+
const rowCanCollapse = (currentRow === null || currentRow === void 0 ? void 0 : currentRow.hasChildRows) && (currentRow === null || currentRow === void 0 ? void 0 : currentRow.isExpanded);
|
|
426
428
|
switch (e.key) {
|
|
427
429
|
case 'ArrowUp':
|
|
428
430
|
e.preventDefault(); // prevent scroll
|
|
@@ -493,6 +495,7 @@ const AdvancedTable = _ref => {
|
|
|
493
495
|
}
|
|
494
496
|
};
|
|
495
497
|
const getColumnHeaderProps = (columnConfig, columnIndex, isPinned) => {
|
|
498
|
+
var _columnWidths$id;
|
|
496
499
|
const rowIndex = headerRowIndex;
|
|
497
500
|
const {
|
|
498
501
|
id,
|
|
@@ -505,9 +508,9 @@ const AdvancedTable = _ref => {
|
|
|
505
508
|
return {
|
|
506
509
|
id,
|
|
507
510
|
isRowActionMenuColumn,
|
|
508
|
-
'data-testid': dataTestId && id ?
|
|
511
|
+
'data-testid': dataTestId && id ? "".concat(dataTestId, "-").concat(id) : undefined,
|
|
509
512
|
label: headerLabel,
|
|
510
|
-
width: columnWidths[id]
|
|
513
|
+
width: (_columnWidths$id = columnWidths[id]) !== null && _columnWidths$id !== void 0 ? _columnWidths$id : width,
|
|
511
514
|
widthBuffer: columnIndex === 0 && maxRowDepth > 0 ? columnWidthBuffers[0] : undefined,
|
|
512
515
|
onWidthChange: disableUserResizableColumns || isRowActionMenuColumn ? undefined : newWidth => {
|
|
513
516
|
setColumnWidths(currentColumnWidths => {
|
|
@@ -517,8 +520,9 @@ const AdvancedTable = _ref => {
|
|
|
517
520
|
} else if (currentColumnWidths[colId]) {
|
|
518
521
|
map[colId] = currentColumnWidths[colId];
|
|
519
522
|
} else {
|
|
520
|
-
|
|
521
|
-
|
|
523
|
+
var _cellRefs$current;
|
|
524
|
+
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];
|
|
525
|
+
map[colId] = colRef === null || colRef === void 0 ? void 0 : colRef.getBoundingClientRect().width;
|
|
522
526
|
}
|
|
523
527
|
return map;
|
|
524
528
|
}, {});
|
|
@@ -554,7 +558,7 @@ const AdvancedTable = _ref => {
|
|
|
554
558
|
};
|
|
555
559
|
};
|
|
556
560
|
const getAdvancedTableRowExpandButton = (rowId, isExpanded, rowIndex) => /*#__PURE__*/React__default.createElement(AdvancedTableRowExpandButton, {
|
|
557
|
-
"data-testid": dataTestId && rowId ?
|
|
561
|
+
"data-testid": dataTestId && rowId ? "".concat(dataTestId, "-row-").concat(rowId, "-expand-button") : undefined,
|
|
558
562
|
isRowExpanded: !!isExpanded,
|
|
559
563
|
onClick: e => {
|
|
560
564
|
e.stopPropagation(); // prevent onRowSelect
|
|
@@ -575,6 +579,7 @@ const AdvancedTable = _ref => {
|
|
|
575
579
|
}, children);
|
|
576
580
|
};
|
|
577
581
|
const getCellProps = (columnConfig, columnIndex, data, rowIndex, rowId, depth) => {
|
|
582
|
+
var _columnWidths$columnI;
|
|
578
583
|
const {
|
|
579
584
|
id: columnId,
|
|
580
585
|
width,
|
|
@@ -588,18 +593,18 @@ const AdvancedTable = _ref => {
|
|
|
588
593
|
setValue: newValue => {
|
|
589
594
|
const newRows = [...rowsProp];
|
|
590
595
|
newRows[rowIndex].data[columnId] = newValue;
|
|
591
|
-
onRowsChange
|
|
596
|
+
onRowsChange === null || onRowsChange === void 0 ? void 0 : onRowsChange(newRows);
|
|
592
597
|
},
|
|
593
598
|
renderCellContent,
|
|
594
599
|
isCellContentInteractive,
|
|
595
|
-
width: columnWidths[columnId]
|
|
600
|
+
width: (_columnWidths$columnI = columnWidths[columnId]) !== null && _columnWidths$columnI !== void 0 ? _columnWidths$columnI : width,
|
|
596
601
|
widthBuffer: columnIndex === 0 && maxRowDepth > 0 ? columnWidthBuffers[depth] : undefined,
|
|
597
602
|
alignment,
|
|
598
603
|
rowId,
|
|
599
604
|
columnId,
|
|
600
605
|
rowIndex,
|
|
601
606
|
columnIndex,
|
|
602
|
-
'data-testid': dataTestId && rowId && columnId ?
|
|
607
|
+
'data-testid': dataTestId && rowId && columnId ? "".concat(dataTestId, "-cell-").concat(rowId, "-").concat(columnId) : undefined,
|
|
603
608
|
isFocused: rowIndex === focusedRowIndex && columnIndex === focusedColumnIndex,
|
|
604
609
|
onFocus: onCellFocus(rowIndex, columnIndex),
|
|
605
610
|
onKeyDown: onKeyDown(rowIndex),
|
|
@@ -659,16 +664,16 @@ const AdvancedTable = _ref => {
|
|
|
659
664
|
onClick: handleColumnHeaderCheckboxToggle,
|
|
660
665
|
onFocus: onRowFocus(headerRowIndex, minColumnIndex),
|
|
661
666
|
variant: "header"
|
|
662
|
-
}), hasExpandableRows && pinnedColumnConfigs.length ? getExpandableRowsSpacer(
|
|
667
|
+
}), hasExpandableRows && pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth, "px"), true) : undefined, pinnedColumnConfigs.map((columnConfigs, i) => {
|
|
663
668
|
const props = getColumnHeaderProps(columnConfigs, i, true);
|
|
664
669
|
return /*#__PURE__*/React__default.createElement(AdvancedTableColumnHeader, props);
|
|
665
|
-
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer(
|
|
670
|
+
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth, "px"), true) : undefined, unpinnedColumnConfigs.map((columnConfigs, i) => {
|
|
666
671
|
const props = getColumnHeaderProps(columnConfigs, i + pinnedColumnConfigs.length, false);
|
|
667
672
|
return /*#__PURE__*/React__default.createElement(AdvancedTableColumnHeader, props);
|
|
668
673
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
669
674
|
role: "rowgroup",
|
|
670
675
|
className: styles.advancedTableRowGroup
|
|
671
|
-
}, (paginatedRows
|
|
676
|
+
}, ((_ref5 = paginatedRows !== null && paginatedRows !== void 0 ? paginatedRows : rows) !== null && _ref5 !== void 0 ? _ref5 : []).map((row, rowIndex) => {
|
|
672
677
|
const {
|
|
673
678
|
id: rowId,
|
|
674
679
|
data,
|
|
@@ -685,7 +690,7 @@ const AdvancedTable = _ref => {
|
|
|
685
690
|
const onSelect = e => {
|
|
686
691
|
e.preventDefault(); // stops event from triggering on new target when focus is changed during onSelect
|
|
687
692
|
if (hasOnRowSelect) {
|
|
688
|
-
onRowSelect
|
|
693
|
+
onRowSelect === null || onRowSelect === void 0 ? void 0 : onRowSelect(row.rowPropReference);
|
|
689
694
|
setSelectedRowId(rowId);
|
|
690
695
|
}
|
|
691
696
|
};
|
|
@@ -700,7 +705,7 @@ const AdvancedTable = _ref => {
|
|
|
700
705
|
"aria-rowindex": hasExpandableRows ? undefined : paginatedRowIndex + 2 // aria-rowindex is one-indexed + the column headers row is the first row in the table
|
|
701
706
|
,
|
|
702
707
|
|
|
703
|
-
"data-testid": dataTestId && rowId ?
|
|
708
|
+
"data-testid": dataTestId && rowId ? "".concat(dataTestId, "-row-").concat(rowId) : undefined,
|
|
704
709
|
hasOnRowSelect: hasOnRowSelect,
|
|
705
710
|
isFocusable: hasFocusableRows,
|
|
706
711
|
isFocused: paginatedRowIndex === focusedRowIndex && minColumnIndex === focusedColumnIndex,
|
|
@@ -709,7 +714,7 @@ const AdvancedTable = _ref => {
|
|
|
709
714
|
onKeyDown: onRowKeyDown,
|
|
710
715
|
onFocus: onRowFocus(paginatedRowIndex, minColumnIndex),
|
|
711
716
|
onClick: e => onSelect(e),
|
|
712
|
-
key:
|
|
717
|
+
key: "".concat(rowId).concat(depth).concat(parentId),
|
|
713
718
|
ref: createRef(paginatedRowIndex, minColumnIndex),
|
|
714
719
|
"aria-level": hasExpandableRows ? depth + 1 : undefined // aria-level is one-indexed
|
|
715
720
|
,
|
|
@@ -733,14 +738,14 @@ const AdvancedTable = _ref => {
|
|
|
733
738
|
onMouseEnter: () => setIsCheckboxHovered(true),
|
|
734
739
|
onMouseLeave: () => setIsCheckboxHovered(false),
|
|
735
740
|
onFocus: onRowFocus(paginatedRowIndex, minColumnIndex)
|
|
736
|
-
}), hasExpandableRows && pinnedColumnConfigs.length ? getExpandableRowsSpacer(
|
|
741
|
+
}), hasExpandableRows && pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth * (depth + 1), "px"), false, hasChildRows ? getAdvancedTableRowExpandButton(rowId, isExpanded, rowIndex) : undefined) : undefined, pinnedColumnConfigs.map((c, i) => {
|
|
737
742
|
const props = getCellProps(c, i, data, paginatedRowIndex, rowId, depth);
|
|
738
743
|
return /*#__PURE__*/React__default.createElement(AdvancedTableCell, _extends({}, props, {
|
|
739
744
|
"aria-rowindex": hasExpandableRows ? undefined : rowIndex + 2 // aria-rowindex is one-indexed + the column headers row is the first row in the table
|
|
740
745
|
,
|
|
741
746
|
"aria-colindex": i + 1 // aria-colindex is one-indexed
|
|
742
747
|
}));
|
|
743
|
-
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer(
|
|
748
|
+
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth * (depth + 1), "px"), false, hasChildRows ? getAdvancedTableRowExpandButton(rowId, isExpanded, rowIndex) : undefined) : undefined, unpinnedColumnConfigs.map((c, i) => {
|
|
744
749
|
const props = getCellProps(c, i + pinnedColumnConfigs.length, data, paginatedRowIndex, rowId, depth);
|
|
745
750
|
return /*#__PURE__*/React__default.createElement(AdvancedTableCell, _extends({}, props, {
|
|
746
751
|
className: styles.advancedTableRowChild,
|
|
@@ -761,26 +766,27 @@ const AdvancedTable = _ref => {
|
|
|
761
766
|
};
|
|
762
767
|
|
|
763
768
|
// TODO: move hook to separate file
|
|
764
|
-
function useSortedRows(
|
|
769
|
+
function useSortedRows(_ref6) {
|
|
765
770
|
let {
|
|
766
771
|
columnConfigs,
|
|
767
772
|
onRowsChange,
|
|
768
773
|
selectedSortOption,
|
|
769
774
|
setCurrentPage
|
|
770
|
-
} =
|
|
775
|
+
} = _ref6;
|
|
771
776
|
const columnConfigsRef = useLatest(columnConfigs);
|
|
772
777
|
const onRowsChangeRef = useLatest(onRowsChange);
|
|
773
778
|
useDidUpdate(() => {
|
|
779
|
+
var _columnConfigsRef$cur;
|
|
774
780
|
const {
|
|
775
781
|
columnId,
|
|
776
782
|
index
|
|
777
783
|
} = selectedSortOption;
|
|
778
|
-
const sort = columnConfigsRef.current.find(
|
|
784
|
+
const sort = (_columnConfigsRef$cur = columnConfigsRef.current.find(_ref7 => {
|
|
779
785
|
let {
|
|
780
786
|
id
|
|
781
|
-
} =
|
|
787
|
+
} = _ref7;
|
|
782
788
|
return id === columnId;
|
|
783
|
-
})
|
|
789
|
+
})) === 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;
|
|
784
790
|
if (typeof sort === 'function' && onRowsChangeRef.current) {
|
|
785
791
|
onRowsChangeRef.current(sort(selectedSortOption));
|
|
786
792
|
setCurrentPage(1);
|
|
@@ -789,7 +795,7 @@ function useSortedRows(_ref5) {
|
|
|
789
795
|
}
|
|
790
796
|
|
|
791
797
|
// TODO: move hook to separate file
|
|
792
|
-
function useFocusState(
|
|
798
|
+
function useFocusState(_ref8) {
|
|
793
799
|
let {
|
|
794
800
|
headerRowIndex,
|
|
795
801
|
maxRowIndex,
|
|
@@ -799,7 +805,7 @@ function useFocusState(_ref7) {
|
|
|
799
805
|
pinnedUnpinnedColumnOrder,
|
|
800
806
|
tableRef,
|
|
801
807
|
currentPage
|
|
802
|
-
} =
|
|
808
|
+
} = _ref8;
|
|
803
809
|
const cellRefs = useRef({});
|
|
804
810
|
const pinnedContainersRef = useRef({});
|
|
805
811
|
const [focusedRowIndex, setFocusedRowIndex] = useState(headerRowIndex);
|
|
@@ -825,11 +831,12 @@ function useFocusState(_ref7) {
|
|
|
825
831
|
return newIndex;
|
|
826
832
|
};
|
|
827
833
|
const focusCell = useEventCallback(cell => {
|
|
834
|
+
var _tableRef$current, _cellRefs$current2;
|
|
828
835
|
// Manually scroll cells/rows into view if needed
|
|
829
|
-
const tablePos = tableRef.current
|
|
830
|
-
const header = cellRefs.current
|
|
831
|
-
const headerPos = header
|
|
832
|
-
let cellPos = cell
|
|
836
|
+
const tablePos = (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.getBoundingClientRect();
|
|
837
|
+
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];
|
|
838
|
+
const headerPos = header === null || header === void 0 ? void 0 : header.getBoundingClientRect();
|
|
839
|
+
let cellPos = cell === null || cell === void 0 ? void 0 : cell.getBoundingClientRect();
|
|
833
840
|
|
|
834
841
|
// Vertical scroll
|
|
835
842
|
if (cell !== header && !header.contains(cell)) {
|
|
@@ -850,6 +857,7 @@ function useFocusState(_ref7) {
|
|
|
850
857
|
if (minColumnIndex === -1 && focusedColumnIndex === minColumnIndex) {
|
|
851
858
|
tableRef.current.scrollLeft -= tablePos.left - cellPos.left;
|
|
852
859
|
} else {
|
|
860
|
+
var _pinnedContainersRef$;
|
|
853
861
|
if (cellPos.left < tablePos.left) {
|
|
854
862
|
// Scroll right if cell out of view to the left of the table
|
|
855
863
|
tableRef.current.scrollLeft -= tablePos.left - cellPos.left;
|
|
@@ -857,23 +865,24 @@ function useFocusState(_ref7) {
|
|
|
857
865
|
// Scroll left if cell out of view to the right of the table
|
|
858
866
|
tableRef.current.scrollLeft += cellPos.right - tablePos.right;
|
|
859
867
|
}
|
|
860
|
-
const pinnedContainer = pinnedContainersRef.current
|
|
861
|
-
const pinnedContainerPos = pinnedContainer
|
|
862
|
-
cellPos = cell
|
|
868
|
+
const pinnedContainer = (_pinnedContainersRef$ = pinnedContainersRef.current) === null || _pinnedContainersRef$ === void 0 ? void 0 : _pinnedContainersRef$[focusedRowIndex];
|
|
869
|
+
const pinnedContainerPos = pinnedContainer === null || pinnedContainer === void 0 ? void 0 : pinnedContainer.getBoundingClientRect();
|
|
870
|
+
cellPos = cell === null || cell === void 0 ? void 0 : cell.getBoundingClientRect();
|
|
863
871
|
|
|
864
872
|
// Scroll right if cell covered by pinned columns
|
|
865
873
|
if (pinnedContainer && cellPos.left < pinnedContainerPos.left + pinnedContainerPos.width && !pinnedContainer.contains(cell)) {
|
|
866
874
|
tableRef.current.scrollLeft -= pinnedContainerPos.left + pinnedContainerPos.width - cellPos.left;
|
|
867
875
|
}
|
|
868
876
|
}
|
|
869
|
-
cell
|
|
877
|
+
cell === null || cell === void 0 ? void 0 : cell.focus();
|
|
870
878
|
});
|
|
871
879
|
|
|
872
880
|
// Focus header cell when the focused column id changes. Used when pinning/unpinning columns since a new DOM element is created.
|
|
873
881
|
useDidUpdate(() => {
|
|
874
882
|
if (focusedColumnId) {
|
|
883
|
+
var _cellRefs$current3;
|
|
875
884
|
const columnIndex = pinnedUnpinnedColumnOrder.indexOf(focusedColumnId);
|
|
876
|
-
focusCell(cellRefs.current
|
|
885
|
+
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]);
|
|
877
886
|
setFocusedColumnIndex(columnIndex);
|
|
878
887
|
setFocusedColumnId(undefined);
|
|
879
888
|
}
|
|
@@ -881,7 +890,8 @@ function useFocusState(_ref7) {
|
|
|
881
890
|
|
|
882
891
|
// Focus cell when the focused indices change
|
|
883
892
|
useDidUpdate(() => {
|
|
884
|
-
|
|
893
|
+
var _cellRefs$current4;
|
|
894
|
+
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];
|
|
885
895
|
|
|
886
896
|
/* Prevent cells from stealing focus from their children when they
|
|
887
897
|
* receive focus, but still allow focus to move from a cell to a row.
|
|
@@ -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 = "._6fTqQ{overflow:auto;position:relative;max-width:100%;max-height:100%}._6fTqQ,._jSutS{background-color:#fff}._jSutS{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._EA9mc{margin-bottom:4px}._2eXvF{position:-webkit-sticky;position:sticky;top:0;z-index:100}._AwsK9{display:flex}._AwsK9:focus{outline:none}._AwsK9.focus-visible ._jxog1:after,._AwsK9:focus-visible ._jxog1: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}._AwsK9.focus-visible ._jxog1:last-of-type:after,._AwsK9:focus-visible ._jxog1:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._AwsK9.focus-visible ._jxog1:first-of-type:after,._AwsK9:focus-visible ._jxog1:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._AwsK9.focus-visible ._jxog1._YnMZe:after,._AwsK9:focus-visible ._jxog1._YnMZe:after{right:-3px;bottom:1px}._qevTF{padding-right:3px}._mpXMP{display:flex}._mpXMP._HmLHn ._jxog1,._mpXMP._HmLHn ._VByXD{cursor:pointer}._mpXMP._a65aV ._jxog1,._mpXMP._a65aV ._VByXD{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._mpXMP._a65aV ._jxog1._YnMZe,._mpXMP._a65aV ._VByXD._YnMZe{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._mpXMP._a65aV ._jxog1._YnMZe ._IfXyg,._mpXMP._a65aV ._jxog1._YnMZe ._VByXD,._mpXMP._a65aV ._jxog1._YnMZe ._w0rDa,._mpXMP._a65aV ._VByXD._YnMZe ._IfXyg,._mpXMP._a65aV ._VByXD._YnMZe ._VByXD,._mpXMP._a65aV ._VByXD._YnMZe ._w0rDa{background-color:rgba(11,110,208,.08)}._mpXMP._HmLHn:hover:not(._a65aV):not(._Fq5N6) ._jxog1,._mpXMP._HmLHn:hover:not(._a65aV):not(._Fq5N6) ._VByXD{background-color:#f9f9f9}._mpXMP._HmLHn:active:not(._a65aV):not(._Fq5N6) ._jxog1,._mpXMP._HmLHn:active:not(._a65aV):not(._Fq5N6) ._VByXD{background-color:#f3f3f3}._mpXMP:focus{outline:none}._mpXMP.focus-visible ._jxog1:after,._mpXMP:focus-visible ._jxog1: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}._mpXMP.focus-visible ._jxog1:last-of-type:after,._mpXMP:focus-visible ._jxog1:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._mpXMP.focus-visible ._jxog1:first-of-type:after,._mpXMP:focus-visible ._jxog1:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._mpXMP.focus-visible ._jxog1._YnMZe:after,._mpXMP:focus-visible ._jxog1._YnMZe:after{right:-3px;bottom:0}._mpXMP:last-of-type:focus{outline:none}._mpXMP:last-of-type.focus-visible ._jxog1:after,._mpXMP:last-of-type:focus-visible ._jxog1: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}._mpXMP:last-of-type.focus-visible ._jxog1:last-of-type:after,._mpXMP:last-of-type:focus-visible ._jxog1:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._mpXMP:last-of-type.focus-visible ._jxog1:first-of-type:after,._mpXMP:last-of-type:focus-visible ._jxog1:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._mpXMP:last-of-type.focus-visible ._jxog1._YnMZe:after,._mpXMP:last-of-type:focus-visible ._jxog1._YnMZe:after{right:-3px;bottom:1px}._mpXMP:last-of-type ._IfXyg:focus{outline:none}._mpXMP:last-of-type ._IfXyg._MmTsv.focus-visible:after,._mpXMP:last-of-type ._IfXyg._MmTsv:focus-visible:after,._mpXMP:last-of-type ._IfXyg.focus-visible:after,._mpXMP:last-of-type ._IfXyg:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._mpXMP:first-of-type:focus{outline:none}._mpXMP:first-of-type.focus-visible ._jxog1:after,._mpXMP:first-of-type:focus-visible ._jxog1: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}._mpXMP:first-of-type.focus-visible ._jxog1:last-of-type:after,._mpXMP:first-of-type:focus-visible ._jxog1:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._mpXMP:first-of-type.focus-visible ._jxog1:first-of-type:after,._mpXMP:first-of-type:focus-visible ._jxog1:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._mpXMP:first-of-type.focus-visible ._jxog1._YnMZe:after,._mpXMP:first-of-type:focus-visible ._jxog1._YnMZe:after{right:-3px;bottom:0}._mpXMP:first-of-type ._IfXyg:focus{outline:none}._mpXMP:first-of-type ._IfXyg._MmTsv.focus-visible:after,._mpXMP:first-of-type ._IfXyg._MmTsv:focus-visible:after,._mpXMP:first-of-type ._IfXyg.focus-visible:after,._mpXMP:first-of-type ._IfXyg:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._DPfTT{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}._DPfTT._P6xwJ{flex-grow:1}._DPfTT._dsB26{cursor:pointer}._DPfTT._dsB26:hover:not(._Olb-P){background-color:#f9f9f9;border-bottom-color:#6a6d70}._DPfTT._dsB26:active:not(._Olb-P){background-color:#f3f3f3}._DPfTT._1MzJ9:not(._Olb-P){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._DPfTT._Olb-P{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._DPfTT ._yiN0U{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._DPfTT ._yiN0U._BowfZ{left:-1px}._DPfTT ._yiN0U._z8C93{right:0}._DPfTT ._Hw2Dw{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._DPfTT ._Hw2Dw._BowfZ{left:-2px}._DPfTT ._Hw2Dw._z8C93{right:-1px}._DPfTT:first-of-type ._BowfZ._yiN0U{left:0;width:2px;border-left:1px solid #fff}._DPfTT:first-of-type ._BowfZ._Hw2Dw{left:0}._DPfTT:last-of-type ._z8C93._yiN0U{right:0;width:2px;border-right:1px solid #fff}._DPfTT:last-of-type ._z8C93._Hw2Dw{right:0}._DPfTT ._jP6Z1{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._DPfTT ._jP6Z1 ._4mLYf{position:absolute;width:2px;right:2px;top:0;bottom:0}._DPfTT ._jP6Z1 ._4mLYf._Dt96Z{background-color:#0a6ed1}._DPfTT ._jP6Z1:hover ._4mLYf:not(._Dt96Z){background-color:#d9d9d9}._DPfTT ._Cqa0N{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._DPfTT ._Cqa0N._hJx5q{flex-direction:row-reverse;justify-content:flex-start}._DPfTT ._Cqa0N._hJx5q ._OP0Xk{margin:1px 7px 1px 1px}._DPfTT ._Cqa0N ._oWQun{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._DPfTT ._Cqa0N ._OP0Xk{margin:1px 1px 1px 7px;flex-shrink:0}._DPfTT ._37TKw{margin-left:6px;margin-right:4px;flex-shrink:0}._DPfTT ._s5y-S{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._DPfTT:focus{outline:none}._DPfTT._MmTsv.focus-visible:after,._DPfTT._MmTsv:focus-visible:after,._DPfTT.focus-visible:after,._DPfTT:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._vbt-6{margin-right:6px}._YnMZe{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._YnMZe[focus-within]{z-index:30}._YnMZe:focus-within{z-index:30}._IfXyg{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}._IfXyg ._Na-Ah{width:100%;padding:12px 12px 11px;overflow:hidden}._IfXyg._Olb-P{background-color:#efefef;border-bottom-color:#dfdfe1}._IfXyg._P6xwJ{flex-grow:1}._IfXyg:focus{outline:none}._IfXyg._MmTsv.focus-visible:after,._IfXyg._MmTsv:focus-visible:after,._IfXyg.focus-visible:after,._IfXyg:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._VByXD{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._VByXD._JI67L{border-bottom-color:#d9d9d9;background-color:#fff}._w0rDa{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}._w0rDa._JI67L{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._w0rDa:focus input~span,._w0rDa:hover input~span{border-color:#0b6ed0}._w0rDa ._I96O5{position:relative;display:inline-flex}._w0rDa ._I96O5 ._jEufg{margin:0!important}._w0rDa ._I96O5 ._DbdFR{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._7Cc0F{justify-content:flex-start}._IaW7k{justify-content:center;text-align:center}._hJx5q{justify-content:flex-end;text-align:right}._-EmA3{display:none}._aC2UQ{opacity:0;height:0;width:0;overflow:hidden}._aC2UQ,._EefLf{position:absolute}._EefLf{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._2-sF3{width:246px}";
|
|
4
|
+
var styles = {"advancedTable":"_6fTqQ","advancedTablePaginationContainer":"_jSutS","advancedTablePagination":"_EA9mc","advancedTableColumnHeadersRowGroup":"_2eXvF","advancedTableColumnHeaders":"_AwsK9","advancedTableRowChild":"_jxog1","pinnedContainer":"_YnMZe","advancedTableRowGroup":"_qevTF","advancedTableRow":"_mpXMP","hasRowAction":"_HmLHn","advancedTableExpandRowSpacer":"_VByXD","isSelected":"_a65aV","advancedTableCheckbox":"_w0rDa","advancedTableCell":"_IfXyg","isCheckboxHovered":"_Fq5N6","showFocusRing":"_MmTsv","advancedTableColumnHeader":"_DPfTT","fillRemainingSpace":"_P6xwJ","isSortable":"_dsB26","isDragging":"_Olb-P","isSorted":"_1MzJ9","dropTargetLine":"_yiN0U","dropTargetLeft":"_BowfZ","dropTargetRight":"_z8C93","dropTargetMarker":"_Hw2Dw","resizeHandle":"_jP6Z1","resizeLine":"_4mLYf","isResizing":"_Dt96Z","advancedTableColumnHeaderLabel":"_Cqa0N","rightAligned":"_hJx5q","sortIcon":"_OP0Xk","advancedTableColumnHeaderLabelText":"_oWQun","advancedTableColumnHeaderMenu":"_37TKw","advancedTableColumnHeaderMenuHiddenAnchor":"_s5y-S","advancedTableColumnHeaderMenuItemIcon":"_vbt-6","advancedTableCellContainer":"_Na-Ah","header":"_JI67L","checkboxContainer":"_I96O5","checkbox":"_jEufg","mixed":"_DbdFR","leftAligned":"_7Cc0F","centerAligned":"_IaW7k","hiddenDescription":"_-EmA3","hiddenLiveRegion":"_aC2UQ","dragPreview":"_EefLf","rowActionMenuPane":"_2-sF3"};
|
|
5
|
+
var stylesheet="._6fTqQ{overflow:auto;position:relative;max-width:100%;max-height:100%}._6fTqQ,._jSutS{background-color:#fff}._jSutS{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._EA9mc{margin-bottom:4px}._2eXvF{position:-webkit-sticky;position:sticky;top:0;z-index:100}._AwsK9{display:flex}._AwsK9:focus{outline:none}._AwsK9.focus-visible ._jxog1:after,._AwsK9:focus-visible ._jxog1: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}._AwsK9.focus-visible ._jxog1:last-of-type:after,._AwsK9:focus-visible ._jxog1:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._AwsK9.focus-visible ._jxog1:first-of-type:after,._AwsK9:focus-visible ._jxog1:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._AwsK9.focus-visible ._jxog1._YnMZe:after,._AwsK9:focus-visible ._jxog1._YnMZe:after{right:-3px;bottom:1px}._qevTF{padding-right:3px}._mpXMP{display:flex}._mpXMP._HmLHn ._jxog1,._mpXMP._HmLHn ._VByXD{cursor:pointer}._mpXMP._a65aV ._jxog1,._mpXMP._a65aV ._VByXD{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._mpXMP._a65aV ._jxog1._YnMZe,._mpXMP._a65aV ._VByXD._YnMZe{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._mpXMP._a65aV ._jxog1._YnMZe ._IfXyg,._mpXMP._a65aV ._jxog1._YnMZe ._VByXD,._mpXMP._a65aV ._jxog1._YnMZe ._w0rDa,._mpXMP._a65aV ._VByXD._YnMZe ._IfXyg,._mpXMP._a65aV ._VByXD._YnMZe ._VByXD,._mpXMP._a65aV ._VByXD._YnMZe ._w0rDa{background-color:rgba(11,110,208,.08)}._mpXMP._HmLHn:hover:not(._a65aV):not(._Fq5N6) ._jxog1,._mpXMP._HmLHn:hover:not(._a65aV):not(._Fq5N6) ._VByXD{background-color:#f9f9f9}._mpXMP._HmLHn:active:not(._a65aV):not(._Fq5N6) ._jxog1,._mpXMP._HmLHn:active:not(._a65aV):not(._Fq5N6) ._VByXD{background-color:#f3f3f3}._mpXMP:focus{outline:none}._mpXMP.focus-visible ._jxog1:after,._mpXMP:focus-visible ._jxog1: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}._mpXMP.focus-visible ._jxog1:last-of-type:after,._mpXMP:focus-visible ._jxog1:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._mpXMP.focus-visible ._jxog1:first-of-type:after,._mpXMP:focus-visible ._jxog1:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._mpXMP.focus-visible ._jxog1._YnMZe:after,._mpXMP:focus-visible ._jxog1._YnMZe:after{right:-3px;bottom:0}._mpXMP:last-of-type:focus{outline:none}._mpXMP:last-of-type.focus-visible ._jxog1:after,._mpXMP:last-of-type:focus-visible ._jxog1: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}._mpXMP:last-of-type.focus-visible ._jxog1:last-of-type:after,._mpXMP:last-of-type:focus-visible ._jxog1:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._mpXMP:last-of-type.focus-visible ._jxog1:first-of-type:after,._mpXMP:last-of-type:focus-visible ._jxog1:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._mpXMP:last-of-type.focus-visible ._jxog1._YnMZe:after,._mpXMP:last-of-type:focus-visible ._jxog1._YnMZe:after{right:-3px;bottom:1px}._mpXMP:last-of-type ._IfXyg:focus{outline:none}._mpXMP:last-of-type ._IfXyg._MmTsv.focus-visible:after,._mpXMP:last-of-type ._IfXyg._MmTsv:focus-visible:after,._mpXMP:last-of-type ._IfXyg.focus-visible:after,._mpXMP:last-of-type ._IfXyg:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._mpXMP:first-of-type:focus{outline:none}._mpXMP:first-of-type.focus-visible ._jxog1:after,._mpXMP:first-of-type:focus-visible ._jxog1: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}._mpXMP:first-of-type.focus-visible ._jxog1:last-of-type:after,._mpXMP:first-of-type:focus-visible ._jxog1:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._mpXMP:first-of-type.focus-visible ._jxog1:first-of-type:after,._mpXMP:first-of-type:focus-visible ._jxog1:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._mpXMP:first-of-type.focus-visible ._jxog1._YnMZe:after,._mpXMP:first-of-type:focus-visible ._jxog1._YnMZe:after{right:-3px;bottom:0}._mpXMP:first-of-type ._IfXyg:focus{outline:none}._mpXMP:first-of-type ._IfXyg._MmTsv.focus-visible:after,._mpXMP:first-of-type ._IfXyg._MmTsv:focus-visible:after,._mpXMP:first-of-type ._IfXyg.focus-visible:after,._mpXMP:first-of-type ._IfXyg:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._DPfTT{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}._DPfTT._P6xwJ{flex-grow:1}._DPfTT._dsB26{cursor:pointer}._DPfTT._dsB26:hover:not(._Olb-P){background-color:#f9f9f9;border-bottom-color:#6a6d70}._DPfTT._dsB26:active:not(._Olb-P){background-color:#f3f3f3}._DPfTT._1MzJ9:not(._Olb-P){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._DPfTT._Olb-P{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._DPfTT ._yiN0U{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._DPfTT ._yiN0U._BowfZ{left:-1px}._DPfTT ._yiN0U._z8C93{right:0}._DPfTT ._Hw2Dw{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._DPfTT ._Hw2Dw._BowfZ{left:-2px}._DPfTT ._Hw2Dw._z8C93{right:-1px}._DPfTT:first-of-type ._BowfZ._yiN0U{left:0;width:2px;border-left:1px solid #fff}._DPfTT:first-of-type ._BowfZ._Hw2Dw{left:0}._DPfTT:last-of-type ._z8C93._yiN0U{right:0;width:2px;border-right:1px solid #fff}._DPfTT:last-of-type ._z8C93._Hw2Dw{right:0}._DPfTT ._jP6Z1{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._DPfTT ._jP6Z1 ._4mLYf{position:absolute;width:2px;right:2px;top:0;bottom:0}._DPfTT ._jP6Z1 ._4mLYf._Dt96Z{background-color:#0a6ed1}._DPfTT ._jP6Z1:hover ._4mLYf:not(._Dt96Z){background-color:#d9d9d9}._DPfTT ._Cqa0N{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._DPfTT ._Cqa0N._hJx5q{flex-direction:row-reverse;justify-content:flex-start}._DPfTT ._Cqa0N._hJx5q ._OP0Xk{margin:1px 7px 1px 1px}._DPfTT ._Cqa0N ._oWQun{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._DPfTT ._Cqa0N ._OP0Xk{margin:1px 1px 1px 7px;flex-shrink:0}._DPfTT ._37TKw{margin-left:6px;margin-right:4px;flex-shrink:0}._DPfTT ._s5y-S{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._DPfTT:focus{outline:none}._DPfTT._MmTsv.focus-visible:after,._DPfTT._MmTsv:focus-visible:after,._DPfTT.focus-visible:after,._DPfTT:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._vbt-6{margin-right:6px}._YnMZe{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._YnMZe[focus-within]{z-index:30}._YnMZe:focus-within{z-index:30}._IfXyg{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}._IfXyg ._Na-Ah{width:100%;padding:12px 12px 11px;overflow:hidden}._IfXyg._Olb-P{background-color:#efefef;border-bottom-color:#dfdfe1}._IfXyg._P6xwJ{flex-grow:1}._IfXyg:focus{outline:none}._IfXyg._MmTsv.focus-visible:after,._IfXyg._MmTsv:focus-visible:after,._IfXyg.focus-visible:after,._IfXyg:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._VByXD{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._VByXD._JI67L{border-bottom-color:#d9d9d9;background-color:#fff}._w0rDa{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}._w0rDa._JI67L{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._w0rDa:focus input~span,._w0rDa:hover input~span{border-color:#0b6ed0}._w0rDa ._I96O5{position:relative;display:inline-flex}._w0rDa ._I96O5 ._jEufg{margin:0!important}._w0rDa ._I96O5 ._DbdFR{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._7Cc0F{justify-content:flex-start}._IaW7k{justify-content:center;text-align:center}._hJx5q{justify-content:flex-end;text-align:right}._-EmA3{display:none}._aC2UQ{opacity:0;height:0;width:0;overflow:hidden}._aC2UQ,._EefLf{position:absolute}._EefLf{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._2-sF3{width:246px}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -40,14 +40,15 @@ const AdvancedTableCell = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
40
40
|
} : undefined;
|
|
41
41
|
const handleKeyDown = e => {
|
|
42
42
|
if (e.target === e.currentTarget && e.key === 'Enter' && isInteractive) {
|
|
43
|
-
|
|
43
|
+
var _focusableElementRef$;
|
|
44
|
+
(_focusableElementRef$ = focusableElementRef.current) === null || _focusableElementRef$ === void 0 ? void 0 : _focusableElementRef$.focus();
|
|
44
45
|
e.preventDefault(); // Prevent click event from occurring on the focusable element
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
onKeyDown
|
|
48
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
48
49
|
};
|
|
49
50
|
const handleFocus = e => {
|
|
50
|
-
onFocus
|
|
51
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
51
52
|
if (isInteractive) {
|
|
52
53
|
if (e.target !== e.currentTarget) {
|
|
53
54
|
setIsEditing(true);
|
|
@@ -62,7 +63,8 @@ const AdvancedTableCell = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
62
63
|
}
|
|
63
64
|
} : undefined;
|
|
64
65
|
const focusCell = () => {
|
|
65
|
-
|
|
66
|
+
var _cellRef$current;
|
|
67
|
+
(_cellRef$current = cellRef.current) === null || _cellRef$current === void 0 ? void 0 : _cellRef$current.focus();
|
|
66
68
|
};
|
|
67
69
|
const computedWidth = useComputedWidth(widthBuffer, width);
|
|
68
70
|
return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|