@oracle/oraclejet-preact 20.0.4 → 20.1.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/amd/BarChart-e3c190b5.js +2 -0
- package/amd/BarChart-e3c190b5.js.map +1 -0
- package/amd/BaseDiagram-b9695479.js +2 -0
- package/amd/BaseDiagram-b9695479.js.map +1 -0
- package/amd/ButtonSetButton-ded680bb.js +2 -0
- package/amd/ButtonSetButton-ded680bb.js.map +1 -0
- package/amd/ButtonSetIconButton-c4dcbd9a.js +2 -0
- package/amd/ButtonSetIconButton-c4dcbd9a.js.map +1 -0
- package/amd/ButtonSetItem-4d644b7d.js +2 -0
- package/amd/ButtonSetItem-4d644b7d.js.map +1 -0
- package/amd/Chart-00a1b01f.js +2 -0
- package/amd/Chart-00a1b01f.js.map +1 -0
- package/amd/CheckboxSet-f000e5c2.js +2 -0
- package/amd/CheckboxSet-f000e5c2.js.map +1 -0
- package/amd/ComboChart-36e22cb8.js +2 -0
- package/amd/ComboChart-36e22cb8.js.map +1 -0
- package/amd/ContainerDiagram-6f41a26a.js +2 -0
- package/amd/ContainerDiagram-6f41a26a.js.map +1 -0
- package/amd/DatePicker-cf0e3fcd.js +2 -0
- package/amd/DatePicker-cf0e3fcd.js.map +1 -0
- package/amd/DatePickerHeader-406aa5c6.js +2 -0
- package/amd/DatePickerHeader-406aa5c6.js.map +1 -0
- package/amd/Diagram-6072b867.js +2 -0
- package/amd/Diagram-6072b867.js.map +1 -0
- package/amd/Dropdown-7cc463f6.js +2 -0
- package/amd/Dropdown-7cc463f6.js.map +1 -0
- package/amd/IconMenuButton-ec28ecfb.js +2 -0
- package/amd/IconMenuButton-ec28ecfb.js.map +1 -0
- package/amd/IconSwitchButton-28f4854a.js +2 -0
- package/amd/IconSwitchButton-28f4854a.js.map +1 -0
- package/amd/IconToggleButton-56035aa0.js +2 -0
- package/amd/IconToggleButton-56035aa0.js.map +1 -0
- package/amd/InlineSelectSingle-a1c1f520.js +2 -0
- package/amd/InlineSelectSingle-a1c1f520.js.map +1 -0
- package/amd/InputColor-bde91b03.js +2 -0
- package/amd/InputColor-bde91b03.js.map +1 -0
- package/amd/InputDatePicker-3351af0f.js +2 -0
- package/amd/InputDatePicker-3351af0f.js.map +1 -0
- package/amd/InputPassword-59369c13.js +2 -0
- package/amd/InputPassword-59369c13.js.map +1 -0
- package/amd/InputSensitiveText-ad79acc4.js +2 -0
- package/amd/InputSensitiveText-ad79acc4.js.map +1 -0
- package/amd/Legend-482f99eb.js +2 -0
- package/amd/Legend-482f99eb.js.map +1 -0
- package/amd/LineAreaChart-6f5dabc1.js +2 -0
- package/amd/LineAreaChart-6f5dabc1.js.map +1 -0
- package/amd/Link-20f7e72d.js +2 -0
- package/amd/Link-20f7e72d.js.map +1 -0
- package/amd/LinkVariants.styles.css +0 -1
- package/amd/LinkVariants.styles2.css +0 -1
- package/amd/ListView-dfbd3f41.js +2 -0
- package/amd/ListView-dfbd3f41.js.map +1 -0
- package/amd/Menu-0c8295f2.js +2 -0
- package/amd/Menu-0c8295f2.js.map +1 -0
- package/amd/MenuButton-1fbc486e.js +2 -0
- package/amd/MenuButton-1fbc486e.js.map +1 -0
- package/amd/MenuItem-f3de5e35.js +2 -0
- package/amd/MenuItem-f3de5e35.js.map +1 -0
- package/amd/MonthView-effa60a5.js +2 -0
- package/amd/MonthView-effa60a5.js.map +1 -0
- package/amd/NavigationListItem-0e162c3e.js +2 -0
- package/amd/NavigationListItem-0e162c3e.js.map +1 -0
- package/amd/OverflowTabBar-aa6557e2.js +2 -0
- package/amd/OverflowTabBar-aa6557e2.js.map +1 -0
- package/amd/OverflowTabBarItem-f05a778f.js +2 -0
- package/amd/OverflowTabBarItem-f05a778f.js.map +1 -0
- package/amd/PRIVATE_BaseDiagram.js +1 -1
- package/amd/PRIVATE_Chart.js +1 -1
- package/amd/PRIVATE_DatePickerHeader.js +1 -1
- package/amd/PRIVATE_FormControls.js +1 -1
- package/amd/PRIVATE_IconSwitchButton.js +1 -1
- package/amd/PRIVATE_MonthView.js +1 -1
- package/amd/PRIVATE_MonthYearGridView.js +1 -1
- package/amd/PRIVATE_RevealToggleIcon.js +1 -1
- package/amd/PRIVATE_SelectCommon.js +1 -1
- package/amd/PRIVATE_StyledDatePickerButton/themes/StyledDatePickerButtonStyles.css.js +1 -1
- package/amd/PRIVATE_StyledDatePickerButton.js +1 -1
- package/amd/PRIVATE_Table.js +1 -1
- package/amd/PRIVATE_TableList.js +1 -1
- package/amd/PRIVATE_TruncatingLink.js +1 -1
- package/amd/PictoChart-c303675a.js +2 -0
- package/amd/PictoChart-c303675a.js.map +1 -0
- package/amd/PieChart-df15d363.js +2 -0
- package/amd/PieChart-df15d363.js.map +1 -0
- package/amd/ReorderableTabBar-e82d2982.js +2 -0
- package/amd/ReorderableTabBar-e82d2982.js.map +1 -0
- package/amd/RevealToggleIcon-be164a7b.js +2 -0
- package/amd/RevealToggleIcon-be164a7b.js.map +1 -0
- package/amd/ScatterChart-88bc2872.js +2 -0
- package/amd/ScatterChart-88bc2872.js.map +1 -0
- package/amd/SectionalLegend-3bae380b.js +2 -0
- package/amd/SectionalLegend-3bae380b.js.map +1 -0
- package/amd/SectionedContent-878a2df1.js +2 -0
- package/amd/SectionedContent-878a2df1.js.map +1 -0
- package/amd/SelectMenuItem-5bd09f45.js +2 -0
- package/amd/SelectMenuItem-5bd09f45.js.map +1 -0
- package/amd/SelectMobileFieldInput-d8be9c82.js +2 -0
- package/amd/SelectMobileFieldInput-d8be9c82.js.map +1 -0
- package/amd/SelectMultiple-467c640d.js +2 -0
- package/amd/SelectMultiple-467c640d.js.map +1 -0
- package/amd/SelectSingle-a600e403.js +2 -0
- package/amd/SelectSingle-a600e403.js.map +1 -0
- package/amd/SplitMenuButton-42f95b11.js +2 -0
- package/amd/SplitMenuButton-42f95b11.js.map +1 -0
- package/amd/StyledDatePickerButton-416ddc14.js +2 -0
- package/amd/StyledDatePickerButton-416ddc14.js.map +1 -0
- package/amd/StyledDatePickerButtonStyles.styles.css +18 -12
- package/amd/Submenu-f8ab8c2e.js +2 -0
- package/amd/Submenu-f8ab8c2e.js.map +1 -0
- package/amd/TabBar-61d65c39.js +2 -0
- package/amd/TabBar-61d65c39.js.map +1 -0
- package/amd/TabBarContextMenu-6977866c.js +2 -0
- package/amd/TabBarContextMenu-6977866c.js.map +1 -0
- package/amd/TabBarMixed-092116bd.js +2 -0
- package/amd/TabBarMixed-092116bd.js.map +1 -0
- package/amd/Table-225ba4db.js +2 -0
- package/amd/Table-225ba4db.js.map +1 -0
- package/amd/TableView-f7990126.js +2 -0
- package/amd/TableView-f7990126.js.map +1 -0
- package/amd/TagCloud-69af60c1.js +2 -0
- package/amd/TagCloud-69af60c1.js.map +1 -0
- package/amd/TextArea-345f89d4.js +2 -0
- package/amd/TextArea-345f89d4.js.map +1 -0
- package/amd/TextAreaAutosize-01dfd98e.js +2 -0
- package/amd/TextAreaAutosize-01dfd98e.js.map +1 -0
- package/amd/Theme-redwood/theme.css +218 -218
- package/amd/Theme-stable/theme.css +360 -360
- package/amd/ToggleButton-c9e433d4.js +2 -0
- package/amd/ToggleButton-c9e433d4.js.map +1 -0
- package/amd/ToggleButtonLabel-367494b8.js +2 -0
- package/amd/ToggleButtonLabel-367494b8.js.map +1 -0
- package/amd/TruncatingLink-2e947915.js +2 -0
- package/amd/TruncatingLink-2e947915.js.map +1 -0
- package/amd/UNSAFE_BarChart/__test__/BarChart.spec.js +1 -1
- package/amd/UNSAFE_BarChart.js +1 -1
- package/amd/UNSAFE_ButtonLayout/tests/ButtonLayout.spec.js +1 -1
- package/amd/UNSAFE_ButtonSetButton.js +1 -1
- package/amd/UNSAFE_ButtonSetIconButton.js +1 -1
- package/amd/UNSAFE_ButtonSetItem.js +1 -1
- package/amd/UNSAFE_CheckboxItem.js +1 -1
- package/amd/UNSAFE_CheckboxItem.js.map +1 -1
- package/amd/UNSAFE_CheckboxSet.js +1 -1
- package/amd/UNSAFE_CheckboxSet.js.map +1 -1
- package/amd/UNSAFE_ComboChart.js +1 -1
- package/amd/UNSAFE_ContainerDiagram.js +1 -1
- package/amd/UNSAFE_DatePicker.js +1 -1
- package/amd/UNSAFE_Diagram.js +1 -1
- package/amd/UNSAFE_Dropdown.js +1 -1
- package/amd/UNSAFE_IconMenuButton.js +1 -1
- package/amd/UNSAFE_IconToggleButton.js +1 -1
- package/amd/UNSAFE_InlineSelectSingle.js +1 -1
- package/amd/UNSAFE_InputColor.js +1 -1
- package/amd/UNSAFE_InputDatePicker.js +1 -1
- package/amd/UNSAFE_InputPassword.js +1 -1
- package/amd/UNSAFE_InputSensitiveText.js +1 -1
- package/amd/UNSAFE_LabelledLink.js +1 -1
- package/amd/UNSAFE_LabelledLink.js.map +1 -1
- package/amd/UNSAFE_Legend.js +1 -1
- package/amd/UNSAFE_LineAreaChart.js +1 -1
- package/amd/UNSAFE_Link/themes/LinkStyles.css.js +1 -1
- package/amd/UNSAFE_Link.js +1 -1
- package/amd/UNSAFE_ListView.js +1 -1
- package/amd/UNSAFE_Menu.js +1 -1
- package/amd/UNSAFE_MenuButton.js +1 -1
- package/amd/UNSAFE_NavigationList.js +1 -1
- package/amd/UNSAFE_OverflowTabBar.js +1 -1
- package/amd/UNSAFE_PictoChart.js +1 -1
- package/amd/UNSAFE_PieChart/__test__/PieChart.spec.js +1 -1
- package/amd/UNSAFE_PieChart.js +1 -1
- package/amd/UNSAFE_ReorderableTabBar.js +1 -1
- package/amd/UNSAFE_RichCheckboxSet.js +1 -1
- package/amd/UNSAFE_RichCheckboxSet.js.map +1 -1
- package/amd/UNSAFE_RichSelectionItem.js +1 -1
- package/amd/UNSAFE_RichSelectionItem.js.map +1 -1
- package/amd/UNSAFE_ScatterChart.js +1 -1
- package/amd/UNSAFE_SectionalLegend.js +1 -1
- package/amd/UNSAFE_SelectMultiple.js +1 -1
- package/amd/UNSAFE_SelectSingle.js +1 -1
- package/amd/UNSAFE_SplitMenuButton.js +1 -1
- package/amd/UNSAFE_TabBar.js +1 -1
- package/amd/UNSAFE_TabBarCommon.js +1 -1
- package/amd/UNSAFE_TabBarMixed.js +1 -1
- package/amd/UNSAFE_TableView.js +1 -1
- package/amd/UNSAFE_TagCloud.js +1 -1
- package/amd/UNSAFE_TextArea.js +1 -1
- package/amd/UNSAFE_TextAreaAutosize.js +1 -1
- package/amd/UNSAFE_ToggleButton.js +1 -1
- package/amd/UNSAFE_ToggleButtonLabel.js +1 -1
- package/amd/UNSAFE_Toolbar/tests/Toolbar.spec.js +1 -1
- package/amd/YearsGridView-09b45b4e.js +2 -0
- package/amd/YearsGridView-09b45b4e.js.map +1 -0
- package/amd/hooks/PRIVATE_useChartContextMenu.js +1 -1
- package/amd/hooks/PRIVATE_useChartMarquee.js +1 -1
- package/amd/hooks/PRIVATE_useMiddleEllipsis.js +2 -0
- package/amd/hooks/PRIVATE_useMiddleEllipsis.js.map +1 -0
- package/amd/hooks/PRIVATE_useTabBar.js +1 -1
- package/amd/hooks/PRIVATE_useVisContextMenu.js +1 -1
- package/amd/hooks/PRIVATE_useVisDragModeControls.js +1 -1
- package/amd/listViewSelectionTests-e7898c59.js +2 -0
- package/amd/listViewSelectionTests-e7898c59.js.map +1 -0
- package/amd/useChartContextMenu-9abf418f.js +2 -0
- package/amd/useChartContextMenu-9abf418f.js.map +1 -0
- package/amd/useChartMarquee-ec70d86c.js +2 -0
- package/amd/useChartMarquee-ec70d86c.js.map +1 -0
- package/amd/useContextMenu-49bd8ffb.js +2 -0
- package/amd/useContextMenu-49bd8ffb.js.map +1 -0
- package/amd/useDisplayValue-8b0c1851.js +2 -0
- package/amd/useDisplayValue-8b0c1851.js.map +1 -0
- package/amd/useLegendContextMenu-90023a78.js +2 -0
- package/amd/useLegendContextMenu-90023a78.js.map +1 -0
- package/amd/useMiddleEllipsis-9ade43e6.js +2 -0
- package/amd/useMiddleEllipsis-9ade43e6.js.map +1 -0
- package/amd/useSelectCommon-af642fe7.js +2 -0
- package/amd/useSelectCommon-af642fe7.js.map +1 -0
- package/amd/useTabBar-430d9e32.js +2 -0
- package/amd/useTabBar-430d9e32.js.map +1 -0
- package/amd/useVisDragModeControls-c1d2abc6.js +2 -0
- package/amd/useVisDragModeControls-c1d2abc6.js.map +1 -0
- package/cjs/BaseButton-15b86552.js +86 -0
- package/cjs/BaseButton-15b86552.js.map +1 -0
- package/cjs/BaseCardView-ba63723a.js +6 -6
- package/cjs/BaseDiagram-576c2a13.js +2956 -0
- package/cjs/BaseDiagram-576c2a13.js.map +1 -0
- package/cjs/BaseRichSelection-c7cad1af.js +9 -9
- package/cjs/BaseSelector-2dc69917.js +1 -1
- package/cjs/BaseSwatchView-76da473f.js +2 -2
- package/cjs/Button-d79df225.js +24 -0
- package/cjs/Button-d79df225.js.map +1 -0
- package/cjs/ButtonSet-ed013090.js +2 -2
- package/cjs/ButtonSetButton-a7384fb3.js +35 -0
- package/cjs/ButtonSetButton-a7384fb3.js.map +1 -0
- package/cjs/ButtonSetIconButton-345ead86.js +40 -0
- package/cjs/ButtonSetIconButton-345ead86.js.map +1 -0
- package/cjs/ButtonSetItem-1f2f6742.js +67 -0
- package/cjs/ButtonSetItem-1f2f6742.js.map +1 -0
- package/cjs/Center-a23cf0cd.js +18 -0
- package/cjs/Center-a23cf0cd.js.map +1 -0
- package/cjs/Chart-3360191e.js +754 -0
- package/cjs/Chart-3360191e.js.map +1 -0
- package/cjs/CheckboxControl-d37c7764.js +6 -6
- package/cjs/CheckboxRadioField-24e06523.js +6 -6
- package/cjs/CheckboxRadioLabelValueLayout-0ed43779.js +1 -1
- package/cjs/CheckboxSetContext-c62db26d.js +12 -0
- package/cjs/CheckboxSetContext-c62db26d.js.map +1 -0
- package/cjs/Chip-b2dd59ed.js +1 -1
- package/cjs/ClearIcon-f61fc0b9.js +1 -1
- package/cjs/CollapseIcon-9fbe13a9.js +1 -1
- package/cjs/Collapsible-9315585f.js +2 -2
- package/cjs/ColorPalette-9f041744.js +83 -0
- package/cjs/ColorPalette-9f041744.js.map +1 -0
- package/cjs/ColorPicker-24ca67b6.js +25 -0
- package/cjs/ColorPicker-24ca67b6.js.map +1 -0
- package/cjs/ColorSwatch-cddebd6b.js +4 -4
- package/cjs/CompactLabelAssistance-f7b3b814.js +95 -0
- package/cjs/CompactLabelAssistance-f7b3b814.js.map +1 -0
- package/cjs/CompactUserAssistance-a5f1bb2b.js +5 -5
- package/cjs/ComponentMessageContainer-b692adf3.js +4 -4
- package/cjs/DatePicker-c4d49200.js +601 -0
- package/cjs/DatePicker-c4d49200.js.map +1 -0
- package/cjs/DatePickerHeader-9bcd2308.js +48 -0
- package/cjs/DatePickerHeader-9bcd2308.js.map +1 -0
- package/cjs/Dialog-871d9a7c.js +389 -0
- package/cjs/Dialog-871d9a7c.js.map +1 -0
- package/cjs/DirectionalCollapseArrowIcon-392d6599.js +1 -1
- package/cjs/DirectionalExpandArrowIcon-ff9f6f78.js +1 -1
- package/cjs/Dropdown-b73f547b.js +337 -0
- package/cjs/Dropdown-b73f547b.js.map +1 -0
- package/cjs/EmbeddedIconButton-f2e69758.js +13 -0
- package/cjs/EmbeddedIconButton-f2e69758.js.map +1 -0
- package/cjs/EnvironmentProvider-932667b2.js +61 -0
- package/cjs/EnvironmentProvider-932667b2.js.map +1 -0
- package/cjs/Expander-f4c574e5.js +1 -1
- package/cjs/Flex-ec48072d.js +32 -0
- package/cjs/Flex-ec48072d.js.map +1 -0
- package/cjs/Floating-de219e52.js +467 -0
- package/cjs/Floating-de219e52.js.map +1 -0
- package/cjs/Grid-156807d4.js +29 -0
- package/cjs/Grid-156807d4.js.map +1 -0
- package/cjs/GroupLoadingIndicator-7e035ba2.js +1 -1
- package/cjs/HighlightText-93f2fea0.js +33 -0
- package/cjs/HighlightText-93f2fea0.js.map +1 -0
- package/cjs/Icon-56789beb.js +3 -3
- package/cjs/IconButton-7503293b.js +4 -4
- package/cjs/IconSwitchButton-550d6ced.js +44 -0
- package/cjs/IconSwitchButton-550d6ced.js.map +1 -0
- package/cjs/IconToggleButton-b7a72539.js +43 -0
- package/cjs/IconToggleButton-b7a72539.js.map +1 -0
- package/cjs/IconUserAssistance-848c227c.js +76 -0
- package/cjs/IconUserAssistance-848c227c.js.map +1 -0
- package/cjs/InlineHelp-2add2d34.js +1 -1
- package/cjs/InlineUserAssistance-cfaa3d3e.js +5 -5
- package/cjs/InputDateMask-c7baadd4.js +7 -7
- package/cjs/Label-eb654b0e.js +8 -8
- package/cjs/LabelValueLayout-d67109b3.js +1 -1
- package/cjs/Layer-06e11b9c.js +94 -0
- package/cjs/Layer-06e11b9c.js.map +1 -0
- package/cjs/LayerHost-21391a0d.js +46 -0
- package/cjs/LayerHost-21391a0d.js.map +1 -0
- package/cjs/LayerManager-fd7f4d2f.js +36 -0
- package/cjs/LayerManager-fd7f4d2f.js.map +1 -0
- package/cjs/Link-f8403e9f.js +35 -0
- package/cjs/Link-f8403e9f.js.map +1 -0
- package/cjs/LinkVariants.styles.css +0 -1
- package/cjs/LinkVariants.styles2.css +0 -1
- package/cjs/List-afcfa338.js +5 -5
- package/cjs/LiveRegion-60535481.js +41 -0
- package/cjs/LiveRegion-60535481.js.map +1 -0
- package/cjs/MaxLengthLiveRegion-82e6c492.js +28 -0
- package/cjs/MaxLengthLiveRegion-82e6c492.js.map +1 -0
- package/cjs/Message-258e59da.js +2 -2
- package/cjs/MessageLayer-a18a7c26.js +61 -0
- package/cjs/MessageLayer-a18a7c26.js.map +1 -0
- package/cjs/MessagesManager-cba4bc60.js +3 -3
- package/cjs/Modal-b751b643.js +3 -3
- package/cjs/MonthView-25653876.js +231 -0
- package/cjs/MonthView-25653876.js.map +1 -0
- package/cjs/NavigationListItem-ef597eb9.js +312 -0
- package/cjs/NavigationListItem-ef597eb9.js.map +1 -0
- package/cjs/NavigationListLinkItem-62c3912e.js +5 -5
- package/cjs/NumberInputText-36164d46.js +6 -6
- package/cjs/OverflowTabBarItem-4053a20b.js +262 -0
- package/cjs/OverflowTabBarItem-4053a20b.js.map +1 -0
- package/cjs/PRIVATE_BaseCardView.js +22 -22
- package/cjs/PRIVATE_BaseDiagram.js +38 -38
- package/cjs/PRIVATE_BaseSelector.js +17 -17
- package/cjs/PRIVATE_BaseSwatchView.js +18 -18
- package/cjs/PRIVATE_Chart.js +48 -48
- package/cjs/PRIVATE_CheckboxControl.js +25 -25
- package/cjs/PRIVATE_CheckboxRadioField.js +27 -27
- package/cjs/PRIVATE_ClearIcon.js +18 -18
- package/cjs/PRIVATE_CollapsibleNavigationList.js +20 -20
- package/cjs/PRIVATE_DatePickerHeader.js +23 -23
- package/cjs/PRIVATE_DatePickerLayout.js +4 -4
- package/cjs/PRIVATE_EmbeddedIconButton.js +6 -6
- package/cjs/PRIVATE_Expander.js +19 -19
- package/cjs/PRIVATE_FormControls.js +21 -21
- package/cjs/PRIVATE_IconSwitchButton.js +19 -19
- package/cjs/PRIVATE_Icons/CheckboxCrossed.js +16 -16
- package/cjs/PRIVATE_Icons/CheckboxMixed.js +16 -16
- package/cjs/PRIVATE_Icons/CheckboxOff.js +16 -16
- package/cjs/PRIVATE_Icons/CheckboxOn.js +16 -16
- package/cjs/PRIVATE_Icons/DragV.js +16 -16
- package/cjs/PRIVATE_Icons/None.js +16 -16
- package/cjs/PRIVATE_List.js +21 -21
- package/cjs/PRIVATE_Message.js +20 -20
- package/cjs/PRIVATE_MessageLayer.js +12 -12
- package/cjs/PRIVATE_MonthView.js +81 -8
- package/cjs/PRIVATE_MonthView.js.map +1 -1
- package/cjs/PRIVATE_MonthYearGridView.js +8 -8
- package/cjs/PRIVATE_PlotArea.js +5 -5
- package/cjs/PRIVATE_RevealToggleIcon.js +21 -21
- package/cjs/PRIVATE_RichSelectionCommon.js +28 -28
- package/cjs/PRIVATE_SelectCommon.js +34 -34
- package/cjs/PRIVATE_StyledCard.js +3 -3
- package/cjs/PRIVATE_StyledCheckbox.js +16 -16
- package/cjs/PRIVATE_StyledDatePickerButton/themes/StyledDatePickerButtonStyles.css.js +1 -1
- package/cjs/PRIVATE_StyledDatePickerButton.js +1 -1
- package/cjs/PRIVATE_StyledSwitch.js +4 -4
- package/cjs/PRIVATE_SwatchFlexView.js +18 -18
- package/cjs/PRIVATE_Table.js +38 -38
- package/cjs/PRIVATE_TableDisplay.js +19 -19
- package/cjs/PRIVATE_TableList.js +27 -27
- package/cjs/PRIVATE_ThemedIcons/CalendarIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/ChartMarqueeSelectIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/ChartPanIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/ChartZoomIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CheckIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CheckboxCrossedIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CheckboxMixedIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CheckboxOffIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CheckboxOnIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CloseIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CollapseIcon.js +17 -17
- package/cjs/PRIVATE_ThemedIcons/CollapseUpIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/DecrementIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/DeleteIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/DirectionalCollapseArrowIcon.js +17 -17
- package/cjs/PRIVATE_ThemedIcons/DirectionalExpandArrowIcon.js +17 -17
- package/cjs/PRIVATE_ThemedIcons/DragHandleIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/DropdownArrowIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/ExpandIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/HelpIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/IncrementIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/MenuButtonDropdownIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/MessageConfirmationIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/MessageErrorIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/MessageInfoIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/MessageWarningIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/MinusIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/NavDownIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/None.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/OverviewHorizontalDragHandleIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/PlusIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/RadioOffIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/RadioOnIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/SortAscendingIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/SortDescendingIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/ViewHideIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/ViewIcon.js +16 -16
- package/cjs/PRIVATE_TimeComponent.js +19 -19
- package/cjs/PRIVATE_TruncatingLink.js +20 -17
- package/cjs/PRIVATE_TruncatingLink.js.map +1 -1
- package/cjs/PRIVATE_VisOverview.js +16 -16
- package/cjs/PRIVATE_VisStatusMessage.js +5 -5
- package/cjs/PRIVATE_VisTabularDatatip.js +4 -4
- package/cjs/Popup-6de390dd.js +300 -0
- package/cjs/Popup-6de390dd.js.map +1 -0
- package/cjs/ProgressButtonLabelLayout-2e429893.js +3 -3
- package/cjs/ProgressCircle-f9c43168.js +50 -0
- package/cjs/ProgressCircle-f9c43168.js.map +1 -0
- package/cjs/RadioItem-c74ac827.js +6 -6
- package/cjs/ReadonlyTextFieldInput-60965d77.js +1 -1
- package/cjs/ReferenceLineArea-d00d2b33.js +592 -0
- package/cjs/ReferenceLineArea-d00d2b33.js.map +1 -0
- package/cjs/RevealToggleIcon-6a86726c.js +28 -0
- package/cjs/RevealToggleIcon-6a86726c.js.map +1 -0
- package/cjs/SectionedContent-463bf70e.js +68 -0
- package/cjs/SectionedContent-463bf70e.js.map +1 -0
- package/cjs/SelectMenuGroupContext-002c9144.js +563 -0
- package/cjs/SelectMenuGroupContext-002c9144.js.map +1 -0
- package/cjs/SelectMobileFieldInput-2adf002d.js +248 -0
- package/cjs/SelectMobileFieldInput-2adf002d.js.map +1 -0
- package/cjs/SelectorAll-2905a1c9.js +53 -0
- package/cjs/SelectorAll-2905a1c9.js.map +1 -0
- package/cjs/Sheet-1d6e8cf8.js +2 -2
- package/cjs/SortControl-8c15705b.js +3 -3
- package/cjs/StyledCard-13c323e4.js +1 -1
- package/cjs/StyledDatePickerButton-f20c0596.js +34 -0
- package/cjs/StyledDatePickerButton-f20c0596.js.map +1 -0
- package/cjs/StyledDatePickerButtonStyles.styles.css +18 -12
- package/cjs/StyledLabelValueLayout-3ee66ef1.js +22 -0
- package/cjs/StyledLabelValueLayout-3ee66ef1.js.map +1 -0
- package/cjs/StyledSwitch-17127a03.js +2 -2
- package/cjs/StyledTextField-7839c90d.js +5 -5
- package/cjs/Submenu-fb652ff4.js +251 -0
- package/cjs/Submenu-fb652ff4.js.map +1 -0
- package/cjs/TabBar-1e6a97b5.js +73 -0
- package/cjs/TabBar-1e6a97b5.js.map +1 -0
- package/cjs/TabBarContextMenu-f7acee3d.js +102 -0
- package/cjs/TabBarContextMenu-f7acee3d.js.map +1 -0
- package/cjs/TabBarLayout-ca8af14b.js +1 -1
- package/cjs/TabBarLinkItem-8f54f16d.js +15 -0
- package/cjs/TabBarLinkItem-8f54f16d.js.map +1 -0
- package/cjs/Table-daa93733.js +4114 -0
- package/cjs/Table-daa93733.js.map +1 -0
- package/cjs/TableColGroup-b7e1e296.js +1 -1
- package/cjs/TextArea-85d34b3e.js +229 -0
- package/cjs/TextArea-85d34b3e.js.map +1 -0
- package/cjs/TextField-5c164264.js +3 -3
- package/cjs/Theme-redwood/theme.css +136 -136
- package/cjs/Theme-stable/theme.css +209 -209
- package/cjs/TimeComponentCanvas2D-baa58795.js +6 -6
- package/cjs/ToggleButton-0ec0c75b.js +30 -0
- package/cjs/ToggleButton-0ec0c75b.js.map +1 -0
- package/cjs/ToggleButtonLabel-ce19879c.js +77 -0
- package/cjs/ToggleButtonLabel-ce19879c.js.map +1 -0
- package/cjs/TruncatingLink-f6a80ee5.js +95 -0
- package/cjs/TruncatingLink-f6a80ee5.js.map +1 -0
- package/cjs/TruncatingText-ac1f6793.js +1 -1
- package/cjs/UNSAFE_AccordionItemMultiple.js +18 -18
- package/cjs/UNSAFE_AccordionItemSingle.js +18 -18
- package/cjs/UNSAFE_ActionCard.js +2 -2
- package/cjs/UNSAFE_BarChart.js +49 -49
- package/cjs/UNSAFE_BareButton.js +2 -2
- package/cjs/UNSAFE_BaseButton.js +5 -5
- package/cjs/UNSAFE_Button.js +6 -6
- package/cjs/UNSAFE_ButtonSet.js +4 -4
- package/cjs/UNSAFE_ButtonSetButton.js +7 -7
- package/cjs/UNSAFE_ButtonSetIconButton.js +19 -19
- package/cjs/UNSAFE_ButtonSetItem.js +22 -22
- package/cjs/UNSAFE_ButtonSetMultiple.js +4 -4
- package/cjs/UNSAFE_ButtonSetSingle.js +4 -4
- package/cjs/UNSAFE_Card.js +3 -3
- package/cjs/UNSAFE_CardFlexView.js +22 -22
- package/cjs/UNSAFE_CardGridView.js +22 -22
- package/cjs/UNSAFE_Center.js +5 -5
- package/cjs/UNSAFE_Checkbox.js +25 -25
- package/cjs/UNSAFE_CheckboxItem.js +71 -132
- package/cjs/UNSAFE_CheckboxItem.js.map +1 -1
- package/cjs/UNSAFE_CheckboxRadioField.js +4 -4
- package/cjs/UNSAFE_CheckboxSet.js +75 -46
- package/cjs/UNSAFE_CheckboxSet.js.map +1 -1
- package/cjs/UNSAFE_Chip.js +2 -2
- package/cjs/UNSAFE_Collapsible.js +18 -18
- package/cjs/UNSAFE_ColorPalette.js +95 -95
- package/cjs/UNSAFE_ColorPicker.js +77 -77
- package/cjs/UNSAFE_ColorSwatch.js +17 -17
- package/cjs/UNSAFE_ComboChart.js +49 -49
- package/cjs/UNSAFE_ComponentMessage.js +20 -20
- package/cjs/UNSAFE_ContainerDiagram.js +38 -38
- package/cjs/UNSAFE_ConveyorBelt.js +18 -18
- package/cjs/UNSAFE_DatePicker.js +54 -31
- package/cjs/UNSAFE_DatePicker.js.map +1 -1
- package/cjs/UNSAFE_Diagram.js +38 -38
- package/cjs/UNSAFE_Dialog.js +22 -22
- package/cjs/UNSAFE_DragHandle.js +17 -17
- package/cjs/UNSAFE_DrawerLayout.js +12 -12
- package/cjs/UNSAFE_DrawerPopup.js +11 -11
- package/cjs/UNSAFE_Dropdown.js +15 -15
- package/cjs/UNSAFE_Environment.js +4 -4
- package/cjs/UNSAFE_ExpandableList.js +25 -25
- package/cjs/UNSAFE_FilePicker.js +4 -4
- package/cjs/UNSAFE_FlatTreeView.js +25 -25
- package/cjs/UNSAFE_Flex.js +4 -4
- package/cjs/UNSAFE_Floating.js +11 -11
- package/cjs/UNSAFE_FormLayout.js +2 -2
- package/cjs/UNSAFE_Gantt.js +23 -23
- package/cjs/UNSAFE_Grid.js +4 -4
- package/cjs/UNSAFE_HighlightText.js +4 -4
- package/cjs/UNSAFE_Icon.js +16 -16
- package/cjs/UNSAFE_IconButton.js +17 -17
- package/cjs/UNSAFE_IconMenuButton.js +26 -26
- package/cjs/UNSAFE_IconProgressButton.js +21 -21
- package/cjs/UNSAFE_IconToggleButton.js +19 -19
- package/cjs/UNSAFE_Indexer.js +19 -19
- package/cjs/UNSAFE_InlineSelectSingle.js +34 -34
- package/cjs/UNSAFE_InputColor.js +42 -42
- package/cjs/UNSAFE_InputDateMask.js +26 -26
- package/cjs/UNSAFE_InputDatePicker.js +149 -127
- package/cjs/UNSAFE_InputDatePicker.js.map +1 -1
- package/cjs/UNSAFE_InputPassword.js +29 -29
- package/cjs/UNSAFE_InputSensitiveText.js +30 -30
- package/cjs/UNSAFE_InputText.js +28 -28
- package/cjs/UNSAFE_InputTimeMask.js +26 -26
- package/cjs/UNSAFE_Label.js +25 -25
- package/cjs/UNSAFE_LabelValueLayout.js +4 -4
- package/cjs/UNSAFE_LabelledLink.js +36 -31
- package/cjs/UNSAFE_LabelledLink.js.map +1 -1
- package/cjs/UNSAFE_Layer.js +8 -8
- package/cjs/UNSAFE_Legend.js +30 -30
- package/cjs/UNSAFE_LineAreaChart.js +49 -49
- package/cjs/UNSAFE_Link/themes/LinkStyles.css.js +1 -1
- package/cjs/UNSAFE_Link.js +3 -3
- package/cjs/UNSAFE_ListItemLayout.js +4 -4
- package/cjs/UNSAFE_ListView.js +29 -29
- package/cjs/UNSAFE_LiveRegion.js +4 -4
- package/cjs/UNSAFE_Menu.js +28 -28
- package/cjs/UNSAFE_MenuButton.js +26 -26
- package/cjs/UNSAFE_MessageBanner.js +20 -20
- package/cjs/UNSAFE_MessageToast.js +22 -22
- package/cjs/UNSAFE_MeterBar.js +16 -16
- package/cjs/UNSAFE_MeterCircle.js +17 -17
- package/cjs/UNSAFE_Modal.js +8 -8
- package/cjs/UNSAFE_NavigationList.js +41 -41
- package/cjs/UNSAFE_NavigationListCommon.js +20 -20
- package/cjs/UNSAFE_NumberInputText.js +28 -28
- package/cjs/UNSAFE_OverflowTabBar.js +34 -34
- package/cjs/UNSAFE_PictoChart.js +27 -27
- package/cjs/UNSAFE_PieChart.js +28 -28
- package/cjs/UNSAFE_Popup.js +18 -18
- package/cjs/UNSAFE_ProgressBar.js +4 -4
- package/cjs/UNSAFE_ProgressButton.js +21 -21
- package/cjs/UNSAFE_ProgressButtonLabelLayout.js +10 -10
- package/cjs/UNSAFE_ProgressCircle.js +4 -4
- package/cjs/UNSAFE_RadioItem.js +25 -25
- package/cjs/UNSAFE_RadioSet.js +27 -27
- package/cjs/UNSAFE_RatingGauge.js +18 -18
- package/cjs/UNSAFE_ReorderableTabBar.js +31 -31
- package/cjs/UNSAFE_RichCheckboxSet.js +64 -68
- package/cjs/UNSAFE_RichCheckboxSet.js.map +1 -1
- package/cjs/UNSAFE_RichRadioSet.js +29 -29
- package/cjs/UNSAFE_RichSelectionItem.js +112 -175
- package/cjs/UNSAFE_RichSelectionItem.js.map +1 -1
- package/cjs/UNSAFE_ScatterChart.js +49 -49
- package/cjs/UNSAFE_SectionalLegend.js +30 -30
- package/cjs/UNSAFE_SelectMultiple.js +38 -38
- package/cjs/UNSAFE_SelectSingle.js +38 -38
- package/cjs/UNSAFE_SelectionCard.js +3 -3
- package/cjs/UNSAFE_Selector.js +17 -17
- package/cjs/UNSAFE_SelectorAll.js +19 -19
- package/cjs/UNSAFE_Sheet.js +11 -11
- package/cjs/UNSAFE_SortControl.js +20 -20
- package/cjs/UNSAFE_SplitMenuButton.js +27 -27
- package/cjs/UNSAFE_SplitMenuButton.js.map +1 -1
- package/cjs/UNSAFE_Switch.js +26 -26
- package/cjs/UNSAFE_TabBar.js +35 -35
- package/cjs/UNSAFE_TabBarCommon.js +33 -33
- package/cjs/UNSAFE_TabBarMixed.js +33 -33
- package/cjs/UNSAFE_TableView.js +38 -38
- package/cjs/UNSAFE_TagCloud.js +28 -28
- package/cjs/UNSAFE_TextArea.js +119 -234
- package/cjs/UNSAFE_TextArea.js.map +1 -1
- package/cjs/UNSAFE_TextAreaAutosize.js +30 -30
- package/cjs/UNSAFE_TextAreaAutosize.js.map +1 -1
- package/cjs/UNSAFE_TextField.js +20 -20
- package/cjs/UNSAFE_ToggleButton.js +7 -7
- package/cjs/UNSAFE_ToggleButtonLabel.js +1 -1
- package/cjs/UNSAFE_Toolbar.js +4 -4
- package/cjs/UNSAFE_Train.js +17 -17
- package/cjs/UNSAFE_TruncatingBadge.js +17 -17
- package/cjs/UNSAFE_TruncatingText.js +17 -17
- package/cjs/UNSAFE_UserAssistance.js +26 -26
- package/cjs/UNSAFE_View.js +7 -7
- package/cjs/UNSAFE_VirtualizedListView.js +21 -21
- package/cjs/UNSAFE_VisInvalidDataMessage.js +6 -6
- package/cjs/UNSAFE_VisNoDataMessage.js +6 -6
- package/cjs/UNSAFE_VisProgressiveLoader.js +5 -5
- package/cjs/UNSAFE_WindowOverlay.js +4 -4
- package/cjs/View-67ff7d0e.js +170 -0
- package/cjs/View-67ff7d0e.js.map +1 -0
- package/cjs/VisStatusMessage-3ca153ac.js +31 -0
- package/cjs/VisStatusMessage-3ca153ac.js.map +1 -0
- package/cjs/VisTabularDatatip-e79da9de.js +26 -0
- package/cjs/VisTabularDatatip-e79da9de.js.map +1 -0
- package/cjs/WindowOverlay-b9595d88.js +112 -0
- package/cjs/WindowOverlay-b9595d88.js.map +1 -0
- package/cjs/YearsGridView-9fd78c0f.js +190 -0
- package/cjs/YearsGridView-9fd78c0f.js.map +1 -0
- package/cjs/hoc/PRIVATE_withDirectionIcon.js +4 -4
- package/cjs/hoc/PRIVATE_withThemeIcon.js +3 -3
- package/cjs/hoc/UNSAFE_withThemeProps.js +3 -3
- package/cjs/hooks/PRIVATE_useChartContextMenu.js +26 -26
- package/cjs/hooks/PRIVATE_useChartDatatip.js +14 -14
- package/cjs/hooks/PRIVATE_useChartEvents.js +19 -19
- package/cjs/hooks/PRIVATE_useChartMarquee.js +26 -26
- package/cjs/hooks/PRIVATE_useCollectionFocusRing.js +17 -17
- package/cjs/hooks/PRIVATE_useCssVars.js +7 -7
- package/cjs/hooks/PRIVATE_useCurrentKey.js +4 -4
- package/cjs/hooks/PRIVATE_useDatatip.js +12 -12
- package/cjs/hooks/PRIVATE_useDetectHorizontalOverflow.js +16 -16
- package/cjs/hooks/PRIVATE_useFloating.js +4 -4
- package/cjs/hooks/PRIVATE_useItemAction.js +17 -17
- package/cjs/hooks/PRIVATE_useListCommon.js +19 -19
- package/cjs/hooks/PRIVATE_useMiddleEllipsis.js +12 -0
- package/cjs/hooks/PRIVATE_useMiddleEllipsis.js.map +1 -0
- package/cjs/hooks/PRIVATE_useOutsideMousedown.js +9 -9
- package/cjs/hooks/PRIVATE_useRadioFocusManager.js +4 -4
- package/cjs/hooks/PRIVATE_useReorderable.js +19 -19
- package/cjs/hooks/PRIVATE_useRovingTabIndexContainer.js +4 -4
- package/cjs/hooks/PRIVATE_useSelection.js +4 -4
- package/cjs/hooks/PRIVATE_useTabBar.js +29 -29
- package/cjs/hooks/PRIVATE_useTabbableModeSet.js +17 -17
- package/cjs/hooks/PRIVATE_useTooltipOnTruncation.js +17 -17
- package/cjs/hooks/PRIVATE_useVisContextMenu.js +25 -25
- package/cjs/hooks/PRIVATE_useVisDragModeControls.js +25 -25
- package/cjs/hooks/PRIVATE_useVisEvents.js +4 -4
- package/cjs/hooks/PRIVATE_useVisMeterEvents.js +14 -14
- package/cjs/hooks/PRIVATE_useVisSelection.js +15 -15
- package/cjs/hooks/UNSAFE_useBareButton.js +2 -2
- package/cjs/hooks/UNSAFE_useColorScheme.js +3 -3
- package/cjs/hooks/UNSAFE_useCurrentBgColor.js +2 -2
- package/cjs/hooks/UNSAFE_useDensity.js +3 -3
- package/cjs/hooks/UNSAFE_useHiddenTestMethod.js +3 -3
- package/cjs/hooks/UNSAFE_useOutsideClick.js +8 -8
- package/cjs/hooks/UNSAFE_usePrefixSuffix.js +4 -4
- package/cjs/hooks/UNSAFE_useScale.js +3 -3
- package/cjs/hooks/UNSAFE_useTestId.js +3 -3
- package/cjs/hooks/UNSAFE_useTheme.js +3 -3
- package/cjs/hooks/UNSAFE_useThemeInterpolations.js +6 -6
- package/cjs/hooks/UNSAFE_useTooltip.js +17 -17
- package/cjs/hooks/UNSAFE_useTranslationBundle.js +3 -3
- package/cjs/hooks/UNSAFE_useUser.js +3 -3
- package/cjs/popupUtils-79656e59.js +31 -0
- package/cjs/popupUtils-79656e59.js.map +1 -0
- package/cjs/tooltipUtils-c554343d.js +115 -0
- package/cjs/tooltipUtils-c554343d.js.map +1 -0
- package/cjs/useBareButton-463210c9.js +1 -1
- package/cjs/useCellNavigation-09201a92.js +1 -1
- package/cjs/useChartContextMenu-c961873c.js +125 -0
- package/cjs/useChartContextMenu-c961873c.js.map +1 -0
- package/cjs/useChartDatatip-0ead533e.js +341 -0
- package/cjs/useChartDatatip-0ead533e.js.map +1 -0
- package/cjs/useChartMarquee-ade8e91c.js +306 -0
- package/cjs/useChartMarquee-ade8e91c.js.map +1 -0
- package/cjs/useColorScheme-852ec82e.js +21 -0
- package/cjs/useColorScheme-852ec82e.js.map +1 -0
- package/cjs/useContextMenu-c02f8dee.js +119 -0
- package/cjs/useContextMenu-c02f8dee.js.map +1 -0
- package/cjs/useCssVars-b7192b44.js +60 -0
- package/cjs/useCssVars-b7192b44.js.map +1 -0
- package/cjs/useCurrentKey-b66cf089.js +85 -0
- package/cjs/useCurrentKey-b66cf089.js.map +1 -0
- package/cjs/useDatatip-3462cc49.js +96 -0
- package/cjs/useDatatip-3462cc49.js.map +1 -0
- package/cjs/useDensity-2a45f4dd.js +21 -0
- package/cjs/useDensity-2a45f4dd.js.map +1 -0
- package/cjs/useDisplayValue-047ff360.js +82 -0
- package/cjs/useDisplayValue-047ff360.js.map +1 -0
- package/cjs/useExpandCollapse-359c0224.js +72 -0
- package/cjs/useExpandCollapse-359c0224.js.map +1 -0
- package/cjs/useFloating-c408d4be.js +1926 -0
- package/cjs/useFloating-c408d4be.js.map +1 -0
- package/cjs/useHiddenTestMethod-620e91e0.js +30 -0
- package/cjs/useHiddenTestMethod-620e91e0.js.map +1 -0
- package/cjs/useKeyboardEvents-d9528b16.js +88 -0
- package/cjs/useKeyboardEvents-d9528b16.js.map +1 -0
- package/cjs/useLegendContextMenu-b7993cf0.js +285 -0
- package/cjs/useLegendContextMenu-b7993cf0.js.map +1 -0
- package/cjs/useMeterDatatip-fdab9ee5.js +76 -0
- package/cjs/useMeterDatatip-fdab9ee5.js.map +1 -0
- package/cjs/useMiddleEllipsis-792e61a9.js +230 -0
- package/cjs/useMiddleEllipsis-792e61a9.js.map +1 -0
- package/cjs/useNavigation-fa3f5a50.js +1 -1
- package/cjs/useOutsideClick-5c31ee35.js +117 -0
- package/cjs/useOutsideClick-5c31ee35.js.map +1 -0
- package/cjs/useOutsideMousedown-eda95637.js +50 -0
- package/cjs/useOutsideMousedown-eda95637.js.map +1 -0
- package/cjs/usePopupAnimation-985e90a2.js +87 -0
- package/cjs/usePopupAnimation-985e90a2.js.map +1 -0
- package/cjs/usePrefixSuffix-a6a1b772.js +72 -0
- package/cjs/usePrefixSuffix-a6a1b772.js.map +1 -0
- package/cjs/useRadioFocusManager-58e51026.js +110 -0
- package/cjs/useRadioFocusManager-58e51026.js.map +1 -0
- package/cjs/useReorderableItem-969a3eac.js +299 -0
- package/cjs/useReorderableItem-969a3eac.js.map +1 -0
- package/cjs/useRovingTabIndexContainer-46b897fd.js +108 -0
- package/cjs/useRovingTabIndexContainer-46b897fd.js.map +1 -0
- package/cjs/useScale-529046e3.js +21 -0
- package/cjs/useScale-529046e3.js.map +1 -0
- package/cjs/useSelectCommon-728573f9.js +507 -0
- package/cjs/useSelectCommon-728573f9.js.map +1 -0
- package/cjs/useSelectDrill-813d4fbe.js +114 -0
- package/cjs/useSelectDrill-813d4fbe.js.map +1 -0
- package/cjs/useSelection-0b3dd2cf.js +188 -0
- package/cjs/useSelection-0b3dd2cf.js.map +1 -0
- package/cjs/useSelection-0ef0ee3c.js +260 -0
- package/cjs/useSelection-0ef0ee3c.js.map +1 -0
- package/cjs/useTabBar-114caa2f.js +309 -0
- package/cjs/useTabBar-114caa2f.js.map +1 -0
- package/cjs/useTestId-a8b07506.js +23 -0
- package/cjs/useTestId-a8b07506.js.map +1 -0
- package/cjs/useTheme-71e406b0.js +21 -0
- package/cjs/useTheme-71e406b0.js.map +1 -0
- package/cjs/useThemeInterpolations-ca3ddfd9.js +71 -0
- package/cjs/useThemeInterpolations-ca3ddfd9.js.map +1 -0
- package/cjs/useTooltip-d1200aff.js +51 -0
- package/cjs/useTooltip-d1200aff.js.map +1 -0
- package/cjs/useTooltipControlled-0dc34549.js +376 -0
- package/cjs/useTooltipControlled-0dc34549.js.map +1 -0
- package/cjs/useTooltipOnTruncation-d8253c7e.js +29 -0
- package/cjs/useTooltipOnTruncation-d8253c7e.js.map +1 -0
- package/cjs/useTranslationBundle-990e7928.js +31 -0
- package/cjs/useTranslationBundle-990e7928.js.map +1 -0
- package/cjs/useUser-cc045b3e.js +21 -0
- package/cjs/useUser-cc045b3e.js.map +1 -0
- package/cjs/useVisDragModeControls-737aa2dd.js +89 -0
- package/cjs/useVisDragModeControls-737aa2dd.js.map +1 -0
- package/cjs/useVisEvents-4ad7b798.js +155 -0
- package/cjs/useVisEvents-4ad7b798.js.map +1 -0
- package/cjs/utils/PRIVATE_collectionUtils.js +17 -17
- package/cjs/utils/PRIVATE_tabBarUtils.js +17 -17
- package/cjs/utils/PRIVATE_tooltipUtils.js +14 -14
- package/cjs/utils/PRIVATE_visTestUtils.js +4 -4
- package/cjs/utils/UNSAFE_popupUtils.js +8 -8
- package/cjs/withDirectionIcon-a14b071b.js +16 -0
- package/cjs/withDirectionIcon-a14b071b.js.map +1 -0
- package/cjs/withThemeProps-894a40fc.js +2 -2
- package/es/BaseButton-243d200f.js +84 -0
- package/es/BaseButton-243d200f.js.map +1 -0
- package/es/BaseCardView-85b9a71e.js +6 -6
- package/es/BaseDiagram-19f481a0.js +2954 -0
- package/es/BaseDiagram-19f481a0.js.map +1 -0
- package/es/BaseRichSelection-223d9830.js +9 -9
- package/es/BaseSelector-7cbc48bc.js +1 -1
- package/es/BaseSwatchView-2e1e6bd2.js +2 -2
- package/es/Button-a76ecfa8.js +22 -0
- package/es/Button-a76ecfa8.js.map +1 -0
- package/es/ButtonLayoutVariants.styles.css +2 -2
- package/es/ButtonLayoutVariants.styles2.css +2 -2
- package/es/ButtonSet-b7464e9a.js +2 -2
- package/es/ButtonSetButton-5e07834a.js +33 -0
- package/es/ButtonSetButton-5e07834a.js.map +1 -0
- package/es/ButtonSetIconButton-7e6573a0.js +38 -0
- package/es/ButtonSetIconButton-7e6573a0.js.map +1 -0
- package/es/ButtonSetItem-08dd9bd2.js +65 -0
- package/es/ButtonSetItem-08dd9bd2.js.map +1 -0
- package/es/Center-3860fe60.js +16 -0
- package/es/Center-3860fe60.js.map +1 -0
- package/es/Chart-aeda6a0c.js +752 -0
- package/es/Chart-aeda6a0c.js.map +1 -0
- package/es/CheckboxControl-c008372a.js +6 -6
- package/es/CheckboxRadioField-a387b3cb.js +6 -6
- package/es/CheckboxRadioLabelValueLayout-e3845f16.js +1 -1
- package/es/CheckboxSet-3aab5935.js +51 -0
- package/es/CheckboxSet-3aab5935.js.map +1 -0
- package/es/Chip-4efea02e.js +1 -1
- package/es/ClearIcon-f85ea340.js +1 -1
- package/es/CollapseIcon-84f6ba8e.js +1 -1
- package/es/Collapsible-2608ce3b.js +2 -2
- package/es/ColorPalette-950c6fc6.js +2 -2
- package/es/ColorPicker-8c297849.js +23 -0
- package/es/ColorPicker-8c297849.js.map +1 -0
- package/es/ColorSwatch-8339ee2f.js +4 -4
- package/es/CompactLabelAssistance-50ff3f7e.js +92 -0
- package/es/CompactLabelAssistance-50ff3f7e.js.map +1 -0
- package/es/CompactUserAssistance-6aa8894b.js +5 -5
- package/es/ComponentMessageContainer-d16c8b1f.js +4 -4
- package/es/DatePicker-6861ae90.js +599 -0
- package/es/DatePicker-6861ae90.js.map +1 -0
- package/es/DatePickerHeader-1a050945.js +46 -0
- package/es/DatePickerHeader-1a050945.js.map +1 -0
- package/es/DiagramStyles.styles2.css +10 -16
- package/es/DiagramStyles.styles3.css +16 -10
- package/es/Dialog-d1de5b06.js +387 -0
- package/es/Dialog-d1de5b06.js.map +1 -0
- package/es/DirectionalCollapseArrowIcon-132761da.js +1 -1
- package/es/DirectionalExpandArrowIcon-5bc45cad.js +1 -1
- package/es/Dropdown-f7992670.js +322 -0
- package/es/Dropdown-f7992670.js.map +1 -0
- package/es/EmbeddedIconButton-9f0e56b7.js +11 -0
- package/es/EmbeddedIconButton-9f0e56b7.js.map +1 -0
- package/es/EnvironmentProvider-6cf8ed37.js +58 -0
- package/es/EnvironmentProvider-6cf8ed37.js.map +1 -0
- package/es/Expander-1347e769.js +1 -1
- package/es/Flex-fc483125.js +30 -0
- package/es/Flex-fc483125.js.map +1 -0
- package/es/Floating-be4c0cb6.js +465 -0
- package/es/Floating-be4c0cb6.js.map +1 -0
- package/es/Grid-6f92d323.js +27 -0
- package/es/Grid-6f92d323.js.map +1 -0
- package/es/GroupLoadingIndicator-19c6545a.js +1 -1
- package/es/HighlightText-dd484ffd.js +31 -0
- package/es/HighlightText-dd484ffd.js.map +1 -0
- package/es/Icon-4983d06e.js +3 -3
- package/es/IconButton-7f91481c.js +4 -4
- package/es/IconSwitchButton-0ef3178f.js +42 -0
- package/es/IconSwitchButton-0ef3178f.js.map +1 -0
- package/es/IconToggleButton-7d9efcb3.js +41 -0
- package/es/IconToggleButton-7d9efcb3.js.map +1 -0
- package/es/IconUserAssistance-6abc7837.js +74 -0
- package/es/IconUserAssistance-6abc7837.js.map +1 -0
- package/es/InlineHelp-9eaac91c.js +1 -1
- package/es/InlineUserAssistance-890293dd.js +5 -5
- package/es/InputDateMask-ec27aee7.js +7 -7
- package/es/Label-5d1ae8d7.js +8 -8
- package/es/LabelValueLayout-c6b9945a.js +1 -1
- package/es/Layer-6c27170e.js +91 -0
- package/es/Layer-6c27170e.js.map +1 -0
- package/es/LayerHost-3cf255a6.js +41 -0
- package/es/LayerHost-3cf255a6.js.map +1 -0
- package/es/LayerManager-e30fbfd6.js +34 -0
- package/es/LayerManager-e30fbfd6.js.map +1 -0
- package/es/Link-db2fdeab.js +33 -0
- package/es/Link-db2fdeab.js.map +1 -0
- package/es/LinkVariants.styles.css +0 -1
- package/es/LinkVariants.styles2.css +0 -1
- package/es/List-4636ba9b.js +5 -5
- package/es/LiveRegion-2e8830ae.js +39 -0
- package/es/LiveRegion-2e8830ae.js.map +1 -0
- package/es/MaxLengthLiveRegion-8f552ae2.js +26 -0
- package/es/MaxLengthLiveRegion-8f552ae2.js.map +1 -0
- package/es/Message-510c2db8.js +2 -2
- package/es/MessageLayer-1dbdc0b6.js +58 -0
- package/es/MessageLayer-1dbdc0b6.js.map +1 -0
- package/es/MessagesManager-47000438.js +3 -3
- package/es/Modal-c0f730b8.js +3 -3
- package/es/MonthView-6628071f.js +229 -0
- package/es/MonthView-6628071f.js.map +1 -0
- package/es/NavigationListItem-3a9e0951.js +291 -0
- package/es/NavigationListItem-3a9e0951.js.map +1 -0
- package/es/NavigationListLinkItem-e28fd846.js +5 -5
- package/es/NumberInputText-60be5757.js +6 -6
- package/es/OverflowTabBarItem-ee746856.js +257 -0
- package/es/OverflowTabBarItem-ee746856.js.map +1 -0
- package/es/PRIVATE_BaseCardView.js +22 -22
- package/es/PRIVATE_BaseDiagram.js +38 -38
- package/es/PRIVATE_BaseSelector.js +17 -17
- package/es/PRIVATE_BaseSwatchView.js +18 -18
- package/es/PRIVATE_Chart.js +45 -45
- package/es/PRIVATE_CheckboxControl.js +25 -25
- package/es/PRIVATE_CheckboxRadioField.js +27 -27
- package/es/PRIVATE_ClearIcon.js +18 -18
- package/es/PRIVATE_CollapsibleNavigationList.js +43 -43
- package/es/PRIVATE_DatePickerHeader.js +23 -23
- package/es/PRIVATE_DatePickerLayout.js +4 -4
- package/es/PRIVATE_EmbeddedIconButton.js +6 -6
- package/es/PRIVATE_Expander.js +19 -19
- package/es/PRIVATE_FormControls.js +21 -21
- package/es/PRIVATE_IconSwitchButton.js +19 -19
- package/es/PRIVATE_Icons/CheckboxCrossed.js +16 -16
- package/es/PRIVATE_Icons/CheckboxMixed.js +16 -16
- package/es/PRIVATE_Icons/CheckboxOff.js +16 -16
- package/es/PRIVATE_Icons/CheckboxOn.js +16 -16
- package/es/PRIVATE_Icons/DragV.js +16 -16
- package/es/PRIVATE_Icons/None.js +16 -16
- package/es/PRIVATE_List.js +21 -21
- package/es/PRIVATE_Message.js +20 -20
- package/es/PRIVATE_MessageLayer.js +12 -12
- package/es/PRIVATE_MonthView.js +81 -8
- package/es/PRIVATE_MonthView.js.map +1 -1
- package/es/PRIVATE_MonthYearGridView.js +8 -8
- package/es/PRIVATE_PlotArea.js +5 -5
- package/es/PRIVATE_RevealToggleIcon.js +21 -21
- package/es/PRIVATE_RichSelectionCommon.js +28 -28
- package/es/PRIVATE_SelectCommon.js +34 -34
- package/es/PRIVATE_StyledCard.js +3 -3
- package/es/PRIVATE_StyledCheckbox.js +16 -16
- package/es/PRIVATE_StyledDatePickerButton/themes/StyledDatePickerButtonStyles.css.js +1 -1
- package/es/PRIVATE_StyledDatePickerButton.js +1 -1
- package/es/PRIVATE_StyledSwitch.js +4 -4
- package/es/PRIVATE_SwatchFlexView.js +18 -18
- package/es/PRIVATE_Table.js +38 -38
- package/es/PRIVATE_TableDisplay.js +19 -19
- package/es/PRIVATE_TableList.js +27 -27
- package/es/PRIVATE_ThemedIcons/CalendarIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/ChartMarqueeSelectIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/ChartPanIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/ChartZoomIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CheckIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CheckboxCrossedIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CheckboxMixedIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CheckboxOffIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CheckboxOnIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CloseIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CollapseIcon.js +17 -17
- package/es/PRIVATE_ThemedIcons/CollapseUpIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/DecrementIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/DeleteIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/DirectionalCollapseArrowIcon.js +17 -17
- package/es/PRIVATE_ThemedIcons/DirectionalExpandArrowIcon.js +17 -17
- package/es/PRIVATE_ThemedIcons/DragHandleIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/DropdownArrowIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/ExpandIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/HelpIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/IncrementIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/MenuButtonDropdownIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/MessageConfirmationIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/MessageErrorIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/MessageInfoIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/MessageWarningIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/MinusIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/NavDownIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/None.js +16 -16
- package/es/PRIVATE_ThemedIcons/OverviewHorizontalDragHandleIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/PlusIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/RadioOffIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/RadioOnIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/SortAscendingIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/SortDescendingIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/ViewHideIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/ViewIcon.js +16 -16
- package/es/PRIVATE_TimeComponent.js +19 -19
- package/es/PRIVATE_TruncatingLink.js +20 -17
- package/es/PRIVATE_TruncatingLink.js.map +1 -1
- package/es/PRIVATE_VisOverview.js +16 -16
- package/es/PRIVATE_VisStatusMessage.js +5 -5
- package/es/PRIVATE_VisTabularDatatip.js +4 -4
- package/es/Popup-22d51095.js +298 -0
- package/es/Popup-22d51095.js.map +1 -0
- package/es/ProgressButtonLabelLayout-69549cf9.js +3 -3
- package/es/ProgressCircle-bce87dad.js +48 -0
- package/es/ProgressCircle-bce87dad.js.map +1 -0
- package/es/RadioItem-94909632.js +6 -6
- package/es/ReadonlyTextFieldInput-106ce959.js +1 -1
- package/es/ReferenceLineArea-cc72b070.js +586 -0
- package/es/ReferenceLineArea-cc72b070.js.map +1 -0
- package/es/RevealToggleIcon-c5d9d731.js +26 -0
- package/es/RevealToggleIcon-c5d9d731.js.map +1 -0
- package/es/SectionedContent-ac90a3d0.js +65 -0
- package/es/SectionedContent-ac90a3d0.js.map +1 -0
- package/es/SelectMenuGroupContext-130a850c.js +554 -0
- package/es/SelectMenuGroupContext-130a850c.js.map +1 -0
- package/es/SelectMobileFieldInput-5ca800d5.js +241 -0
- package/es/SelectMobileFieldInput-5ca800d5.js.map +1 -0
- package/es/SelectorAll-3d39196b.js +51 -0
- package/es/SelectorAll-3d39196b.js.map +1 -0
- package/es/Sheet-f9f8a4a4.js +2 -2
- package/es/SortControl-1044fcd9.js +3 -3
- package/es/StyledCard-77623731.js +1 -1
- package/es/StyledDatePickerButton-a7782821.js +32 -0
- package/es/StyledDatePickerButton-a7782821.js.map +1 -0
- package/es/StyledDatePickerButtonStyles.styles.css +18 -12
- package/es/StyledLabelValueLayout-bddfb884.js +18 -0
- package/es/StyledLabelValueLayout-bddfb884.js.map +1 -0
- package/es/StyledSwitch-dbf29d95.js +2 -2
- package/es/StyledTextField-7605d76a.js +5 -5
- package/es/Submenu-fa7c2b4f.js +247 -0
- package/es/Submenu-fa7c2b4f.js.map +1 -0
- package/es/TabBar-fd31ca03.js +69 -0
- package/es/TabBar-fd31ca03.js.map +1 -0
- package/es/TabBarContextMenu-3bf4dc64.js +99 -0
- package/es/TabBarContextMenu-3bf4dc64.js.map +1 -0
- package/es/TabBarLayout-9b67d1b6.js +1 -1
- package/es/TabBarLinkItem-43854314.js +13 -0
- package/es/TabBarLinkItem-43854314.js.map +1 -0
- package/es/Table-535987d0.js +4112 -0
- package/es/Table-535987d0.js.map +1 -0
- package/es/TableColGroup-d74bd4f5.js +1 -1
- package/es/TextField-7884fcd7.js +3 -3
- package/es/Theme-redwood/theme.css +369 -369
- package/es/Theme-stable/theme.css +521 -521
- package/es/TimeComponentCanvas2D-cfb0066d.js +6 -6
- package/es/ToggleButton-65f5d293.js +28 -0
- package/es/ToggleButton-65f5d293.js.map +1 -0
- package/es/ToggleButtonLabel-bf4e1599.js +75 -0
- package/es/ToggleButtonLabel-bf4e1599.js.map +1 -0
- package/es/TrainVariants.styles.css +6 -6
- package/es/TrainVariants.styles2.css +6 -6
- package/es/TruncatingLink-6aaf40b9.js +93 -0
- package/es/TruncatingLink-6aaf40b9.js.map +1 -0
- package/es/TruncatingText-1bf00351.js +1 -1
- package/es/UNSAFE_AccordionItemMultiple.js +18 -18
- package/es/UNSAFE_AccordionItemSingle.js +18 -18
- package/es/UNSAFE_ActionCard.js +2 -2
- package/es/UNSAFE_BarChart.js +46 -46
- package/es/UNSAFE_BareButton.js +2 -2
- package/es/UNSAFE_BaseButton.js +5 -5
- package/es/UNSAFE_Button.js +6 -6
- package/es/UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutTheme.js +1 -1
- package/es/UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutVariants.css.js +1 -1
- package/es/UNSAFE_ButtonLayout/themes/stable/ButtonLayoutTheme.js +1 -1
- package/es/UNSAFE_ButtonLayout/themes/stable/ButtonLayoutVariants.css.js +1 -1
- package/es/UNSAFE_ButtonLayout.js +1 -1
- package/es/UNSAFE_ButtonSet.js +4 -4
- package/es/UNSAFE_ButtonSetButton.js +7 -7
- package/es/UNSAFE_ButtonSetIconButton.js +19 -19
- package/es/UNSAFE_ButtonSetItem.js +22 -22
- package/es/UNSAFE_ButtonSetMultiple.js +4 -4
- package/es/UNSAFE_ButtonSetSingle.js +4 -4
- package/es/UNSAFE_Card.js +3 -3
- package/es/UNSAFE_CardFlexView.js +22 -22
- package/es/UNSAFE_CardGridView.js +22 -22
- package/es/UNSAFE_Center.js +5 -5
- package/es/UNSAFE_Checkbox.js +25 -25
- package/es/UNSAFE_CheckboxItem.js +137 -76
- package/es/UNSAFE_CheckboxItem.js.map +1 -1
- package/es/UNSAFE_CheckboxRadioField.js +4 -4
- package/es/UNSAFE_CheckboxSet.js +40 -74
- package/es/UNSAFE_CheckboxSet.js.map +1 -1
- package/es/UNSAFE_Chip.js +2 -2
- package/es/UNSAFE_Collapsible.js +18 -18
- package/es/UNSAFE_ColorPalette.js +19 -19
- package/es/UNSAFE_ColorPicker.js +44 -44
- package/es/UNSAFE_ColorSwatch.js +17 -17
- package/es/UNSAFE_ComboChart.js +46 -46
- package/es/UNSAFE_ComponentMessage.js +20 -20
- package/es/UNSAFE_ContainerDiagram/themes/DiagramStyles.css.js +1 -1
- package/es/UNSAFE_ContainerDiagram.js +38 -38
- package/es/UNSAFE_ConveyorBelt.js +18 -18
- package/es/UNSAFE_DatePicker.js +54 -31
- package/es/UNSAFE_DatePicker.js.map +1 -1
- package/es/UNSAFE_Diagram/themes/DiagramStyles.css.js +1 -1
- package/es/UNSAFE_Diagram.js +38 -38
- package/es/UNSAFE_Dialog.js +22 -22
- package/es/UNSAFE_DragHandle.js +17 -17
- package/es/UNSAFE_DrawerLayout.js +12 -12
- package/es/UNSAFE_DrawerPopup.js +11 -11
- package/es/UNSAFE_Dropdown.js +15 -15
- package/es/UNSAFE_Environment.js +4 -4
- package/es/UNSAFE_ExpandableList.js +25 -25
- package/es/UNSAFE_FilePicker.js +4 -4
- package/es/UNSAFE_FlatTreeView.js +39 -39
- package/es/UNSAFE_Flex.js +4 -4
- package/es/UNSAFE_Floating.js +11 -11
- package/es/UNSAFE_FormLayout.js +2 -2
- package/es/UNSAFE_Gantt.js +23 -23
- package/es/UNSAFE_Grid.js +4 -4
- package/es/UNSAFE_HighlightText.js +4 -4
- package/es/UNSAFE_Icon.js +16 -16
- package/es/UNSAFE_IconButton.js +17 -17
- package/es/UNSAFE_IconMenuButton.js +26 -26
- package/es/UNSAFE_IconProgressButton.js +21 -21
- package/es/UNSAFE_IconToggleButton.js +19 -19
- package/es/UNSAFE_Indexer.js +19 -19
- package/es/UNSAFE_InlineSelectSingle.js +34 -34
- package/es/UNSAFE_InputColor.js +33 -33
- package/es/UNSAFE_InputDateMask.js +26 -26
- package/es/UNSAFE_InputDatePicker.js +63 -41
- package/es/UNSAFE_InputDatePicker.js.map +1 -1
- package/es/UNSAFE_InputPassword.js +29 -29
- package/es/UNSAFE_InputSensitiveText.js +30 -30
- package/es/UNSAFE_InputText.js +28 -28
- package/es/UNSAFE_InputTimeMask.js +26 -26
- package/es/UNSAFE_Label.js +25 -25
- package/es/UNSAFE_LabelValueLayout.js +4 -4
- package/es/UNSAFE_LabelledLink.js +36 -31
- package/es/UNSAFE_LabelledLink.js.map +1 -1
- package/es/UNSAFE_Layer.js +8 -8
- package/es/UNSAFE_Legend.js +30 -30
- package/es/UNSAFE_LineAreaChart.js +46 -46
- package/es/UNSAFE_Link/themes/LinkStyles.css.js +1 -1
- package/es/UNSAFE_Link.js +3 -3
- package/es/UNSAFE_ListItemLayout.js +4 -4
- package/es/UNSAFE_ListView.js +29 -29
- package/es/UNSAFE_LiveRegion.js +4 -4
- package/es/UNSAFE_Menu.js +29 -29
- package/es/UNSAFE_MenuButton.js +26 -26
- package/es/UNSAFE_MessageBanner.js +20 -20
- package/es/UNSAFE_MessageToast.js +22 -22
- package/es/UNSAFE_MeterBar.js +16 -16
- package/es/UNSAFE_MeterCircle.js +17 -17
- package/es/UNSAFE_Modal.js +8 -8
- package/es/UNSAFE_NavigationList.js +42 -42
- package/es/UNSAFE_NavigationListCommon.js +20 -20
- package/es/UNSAFE_NumberInputText.js +28 -28
- package/es/UNSAFE_OverflowTabBar.js +34 -34
- package/es/UNSAFE_PictoChart.js +27 -27
- package/es/UNSAFE_PieChart.js +28 -28
- package/es/UNSAFE_Popup.js +18 -18
- package/es/UNSAFE_ProgressBar.js +4 -4
- package/es/UNSAFE_ProgressButton.js +21 -21
- package/es/UNSAFE_ProgressButtonLabelLayout.js +10 -10
- package/es/UNSAFE_ProgressCircle.js +4 -4
- package/es/UNSAFE_RadioItem.js +25 -25
- package/es/UNSAFE_RadioSet.js +27 -27
- package/es/UNSAFE_RatingGauge.js +18 -18
- package/es/UNSAFE_ReorderableTabBar.js +31 -31
- package/es/UNSAFE_RichCheckboxSet.js +68 -64
- package/es/UNSAFE_RichCheckboxSet.js.map +1 -1
- package/es/UNSAFE_RichRadioSet.js +29 -29
- package/es/UNSAFE_RichSelectionItem.js +174 -111
- package/es/UNSAFE_RichSelectionItem.js.map +1 -1
- package/es/UNSAFE_ScatterChart.js +46 -46
- package/es/UNSAFE_SectionalLegend.js +30 -30
- package/es/UNSAFE_SelectMultiple.js +38 -38
- package/es/UNSAFE_SelectSingle.js +38 -38
- package/es/UNSAFE_SelectionCard.js +3 -3
- package/es/UNSAFE_Selector.js +17 -17
- package/es/UNSAFE_SelectorAll.js +19 -19
- package/es/UNSAFE_Sheet.js +11 -11
- package/es/UNSAFE_SortControl.js +20 -20
- package/es/UNSAFE_SplitMenuButton.js +27 -27
- package/es/UNSAFE_SplitMenuButton.js.map +1 -1
- package/es/UNSAFE_Switch.js +26 -26
- package/es/UNSAFE_TabBar.js +35 -35
- package/es/UNSAFE_TabBarCommon.js +33 -33
- package/es/UNSAFE_TabBarMixed.js +33 -33
- package/es/UNSAFE_TableView.js +38 -38
- package/es/UNSAFE_TagCloud.js +28 -28
- package/es/UNSAFE_TextArea.js +27 -27
- package/es/UNSAFE_TextAreaAutosize.js +27 -27
- package/es/UNSAFE_TextField.js +20 -20
- package/es/UNSAFE_ToggleButton.js +7 -7
- package/es/UNSAFE_ToggleButtonLabel.js +1 -1
- package/es/UNSAFE_Toolbar.js +5 -5
- package/es/UNSAFE_Train/themes/redwood/TrainTheme.js +1 -1
- package/es/UNSAFE_Train/themes/redwood/TrainVariants.css.js +1 -1
- package/es/UNSAFE_Train/themes/stable/TrainTheme.js +1 -1
- package/es/UNSAFE_Train/themes/stable/TrainVariants.css.js +1 -1
- package/es/UNSAFE_Train.js +18 -18
- package/es/UNSAFE_TruncatingBadge.js +17 -17
- package/es/UNSAFE_TruncatingText.js +17 -17
- package/es/UNSAFE_UserAssistance.js +26 -26
- package/es/UNSAFE_View.js +7 -7
- package/es/UNSAFE_VirtualizedListView.js +21 -21
- package/es/UNSAFE_VisInvalidDataMessage.js +6 -6
- package/es/UNSAFE_VisNoDataMessage.js +6 -6
- package/es/UNSAFE_VisProgressiveLoader.js +5 -5
- package/es/UNSAFE_WindowOverlay.js +4 -4
- package/es/View-818f2f31.js +167 -0
- package/es/View-818f2f31.js.map +1 -0
- package/es/VisStatusMessage-09c532e3.js +29 -0
- package/es/VisStatusMessage-09c532e3.js.map +1 -0
- package/es/VisTabularDatatip-f45069f1.js +24 -0
- package/es/VisTabularDatatip-f45069f1.js.map +1 -0
- package/es/WindowOverlay-467c2d12.js +110 -0
- package/es/WindowOverlay-467c2d12.js.map +1 -0
- package/es/YearsGridView-27d6fa06.js +187 -0
- package/es/YearsGridView-27d6fa06.js.map +1 -0
- package/es/hoc/PRIVATE_withDirectionIcon.js +4 -4
- package/es/hoc/PRIVATE_withThemeIcon.js +3 -3
- package/es/hoc/UNSAFE_withThemeProps.js +3 -3
- package/es/hooks/PRIVATE_useChartContextMenu.js +26 -26
- package/es/hooks/PRIVATE_useChartDatatip.js +14 -14
- package/es/hooks/PRIVATE_useChartEvents.js +19 -19
- package/es/hooks/PRIVATE_useChartMarquee.js +26 -26
- package/es/hooks/PRIVATE_useCollectionFocusRing.js +17 -17
- package/es/hooks/PRIVATE_useCssVars.js +7 -7
- package/es/hooks/PRIVATE_useCurrentKey.js +4 -4
- package/es/hooks/PRIVATE_useDatatip.js +12 -12
- package/es/hooks/PRIVATE_useDetectHorizontalOverflow.js +16 -16
- package/es/hooks/PRIVATE_useFloating.js +4 -4
- package/es/hooks/PRIVATE_useItemAction.js +17 -17
- package/es/hooks/PRIVATE_useListCommon.js +19 -19
- package/es/hooks/PRIVATE_useMiddleEllipsis.js +4 -0
- package/es/hooks/PRIVATE_useMiddleEllipsis.js.map +1 -0
- package/es/hooks/PRIVATE_useOutsideMousedown.js +9 -9
- package/es/hooks/PRIVATE_useRadioFocusManager.js +4 -4
- package/es/hooks/PRIVATE_useReorderable.js +19 -19
- package/es/hooks/PRIVATE_useRovingTabIndexContainer.js +4 -4
- package/es/hooks/PRIVATE_useSelection.js +4 -4
- package/es/hooks/PRIVATE_useTabBar.js +29 -29
- package/es/hooks/PRIVATE_useTabbableModeSet.js +17 -17
- package/es/hooks/PRIVATE_useTooltipOnTruncation.js +17 -17
- package/es/hooks/PRIVATE_useVisContextMenu.js +25 -25
- package/es/hooks/PRIVATE_useVisDragModeControls.js +25 -25
- package/es/hooks/PRIVATE_useVisEvents.js +4 -4
- package/es/hooks/PRIVATE_useVisMeterEvents.js +14 -14
- package/es/hooks/PRIVATE_useVisSelection.js +15 -15
- package/es/hooks/UNSAFE_useBareButton.js +2 -2
- package/es/hooks/UNSAFE_useColorScheme.js +3 -3
- package/es/hooks/UNSAFE_useCurrentBgColor.js +2 -2
- package/es/hooks/UNSAFE_useDensity.js +3 -3
- package/es/hooks/UNSAFE_useHiddenTestMethod.js +3 -3
- package/es/hooks/UNSAFE_useOutsideClick.js +8 -8
- package/es/hooks/UNSAFE_usePrefixSuffix.js +4 -4
- package/es/hooks/UNSAFE_useScale.js +3 -3
- package/es/hooks/UNSAFE_useTestId.js +3 -3
- package/es/hooks/UNSAFE_useTheme.js +3 -3
- package/es/hooks/UNSAFE_useThemeInterpolations.js +6 -6
- package/es/hooks/UNSAFE_useTooltip.js +17 -17
- package/es/hooks/UNSAFE_useTranslationBundle.js +3 -3
- package/es/hooks/UNSAFE_useUser.js +3 -3
- package/es/popupUtils-7774330e.js +29 -0
- package/es/popupUtils-7774330e.js.map +1 -0
- package/es/tooltipUtils-90fb656f.js +110 -0
- package/es/tooltipUtils-90fb656f.js.map +1 -0
- package/es/useBareButton-ff4bd21e.js +1 -1
- package/es/useCellNavigation-0565b6dd.js +1 -1
- package/es/useChartContextMenu-933091d8.js +123 -0
- package/es/useChartContextMenu-933091d8.js.map +1 -0
- package/es/useChartDatatip-cba78e0f.js +336 -0
- package/es/useChartDatatip-cba78e0f.js.map +1 -0
- package/es/useChartMarquee-914929b6.js +304 -0
- package/es/useChartMarquee-914929b6.js.map +1 -0
- package/es/useColorScheme-67245285.js +19 -0
- package/es/useColorScheme-67245285.js.map +1 -0
- package/es/useContextMenu-8a1230a3.js +116 -0
- package/es/useContextMenu-8a1230a3.js.map +1 -0
- package/es/useCssVars-048a52d8.js +58 -0
- package/es/useCssVars-048a52d8.js.map +1 -0
- package/es/useCurrentKey-38e5f097.js +83 -0
- package/es/useCurrentKey-38e5f097.js.map +1 -0
- package/es/useDatatip-ef5c47a7.js +94 -0
- package/es/useDatatip-ef5c47a7.js.map +1 -0
- package/es/useDensity-969273f3.js +19 -0
- package/es/useDensity-969273f3.js.map +1 -0
- package/es/useDisplayValue-29f03329.js +78 -0
- package/es/useDisplayValue-29f03329.js.map +1 -0
- package/es/useExpandCollapse-51f9bb4b.js +70 -0
- package/es/useExpandCollapse-51f9bb4b.js.map +1 -0
- package/es/useFloating-c74a7f54.js +1916 -0
- package/es/useFloating-c74a7f54.js.map +1 -0
- package/es/useHiddenTestMethod-ec7b3989.js +28 -0
- package/es/useHiddenTestMethod-ec7b3989.js.map +1 -0
- package/es/useKeyboardEvents-a1495728.js +85 -0
- package/es/useKeyboardEvents-a1495728.js.map +1 -0
- package/es/useLegendContextMenu-6ea00771.js +279 -0
- package/es/useLegendContextMenu-6ea00771.js.map +1 -0
- package/es/useMeterDatatip-f61ca3e0.js +73 -0
- package/es/useMeterDatatip-f61ca3e0.js.map +1 -0
- package/es/useMiddleEllipsis-b073ca6b.js +228 -0
- package/es/useMiddleEllipsis-b073ca6b.js.map +1 -0
- package/es/useNavigation-b257c33a.js +1 -1
- package/es/useOutsideClick-01f3d3e1.js +115 -0
- package/es/useOutsideClick-01f3d3e1.js.map +1 -0
- package/es/useOutsideMousedown-e0866d58.js +48 -0
- package/es/useOutsideMousedown-e0866d58.js.map +1 -0
- package/es/usePopupAnimation-7c5db425.js +85 -0
- package/es/usePopupAnimation-7c5db425.js.map +1 -0
- package/es/usePrefixSuffix-95fc00fd.js +70 -0
- package/es/usePrefixSuffix-95fc00fd.js.map +1 -0
- package/es/useRadioFocusManager-d9eecfb4.js +108 -0
- package/es/useRadioFocusManager-d9eecfb4.js.map +1 -0
- package/es/useReorderableItem-06bd7a7b.js +296 -0
- package/es/useReorderableItem-06bd7a7b.js.map +1 -0
- package/es/useRovingTabIndexContainer-c0356f5d.js +106 -0
- package/es/useRovingTabIndexContainer-c0356f5d.js.map +1 -0
- package/es/useScale-93490e54.js +19 -0
- package/es/useScale-93490e54.js.map +1 -0
- package/es/useSelectCommon-c70bb10f.js +489 -0
- package/es/useSelectCommon-c70bb10f.js.map +1 -0
- package/es/useSelectDrill-2f855daa.js +111 -0
- package/es/useSelectDrill-2f855daa.js.map +1 -0
- package/es/useSelection-10ed8060.js +186 -0
- package/es/useSelection-10ed8060.js.map +1 -0
- package/es/useSelection-d6fefa3d.js +258 -0
- package/es/useSelection-d6fefa3d.js.map +1 -0
- package/es/useTabBar-27e8c4ea.js +305 -0
- package/es/useTabBar-27e8c4ea.js.map +1 -0
- package/es/useTestId-ab1bede6.js +21 -0
- package/es/useTestId-ab1bede6.js.map +1 -0
- package/es/useTheme-c2cfbc29.js +19 -0
- package/es/useTheme-c2cfbc29.js.map +1 -0
- package/es/useThemeInterpolations-5f358139.js +68 -0
- package/es/useThemeInterpolations-5f358139.js.map +1 -0
- package/es/useTooltip-ab739df0.js +49 -0
- package/es/useTooltip-ab739df0.js.map +1 -0
- package/es/useTooltipControlled-b7f30aee.js +373 -0
- package/es/useTooltipControlled-b7f30aee.js.map +1 -0
- package/es/useTooltipOnTruncation-31afc3f2.js +27 -0
- package/es/useTooltipOnTruncation-31afc3f2.js.map +1 -0
- package/es/useTranslationBundle-bc6e0896.js +29 -0
- package/es/useTranslationBundle-bc6e0896.js.map +1 -0
- package/es/useUser-e543b73c.js +19 -0
- package/es/useUser-e543b73c.js.map +1 -0
- package/es/useVisDragModeControls-6865056f.js +87 -0
- package/es/useVisDragModeControls-6865056f.js.map +1 -0
- package/es/useVisEvents-0edc925f.js +153 -0
- package/es/useVisEvents-0edc925f.js.map +1 -0
- package/es/utils/PRIVATE_collectionUtils.js +17 -17
- package/es/utils/PRIVATE_tabBarUtils.js +17 -17
- package/es/utils/PRIVATE_tooltipUtils.js +14 -14
- package/es/utils/PRIVATE_visTestUtils.js +4 -4
- package/es/utils/UNSAFE_popupUtils.js +8 -8
- package/es/withDirectionIcon-b725a6d7.js +14 -0
- package/es/withDirectionIcon-b725a6d7.js.map +1 -0
- package/es/withThemeProps-dbd4fedf.js +2 -2
- package/package.json +2 -2
- package/types/UNSAFE_Dropdown/Dropdown.d.ts +5 -1
- package/types/UNSAFE_LabelledLink/LabelledLink.d.ts +5 -1
- package/types/UNSAFE_Link/themes/LinkStyles.css.d.ts +0 -1
- package/types/UNSAFE_Link/themes/redwood/LinkVariants.css.d.ts +0 -1
- package/types/UNSAFE_Link/themes/stable/LinkVariants.css.d.ts +0 -1
- package/types/UNSAFE_Menu/DropdownMenu.d.ts +1 -0
- package/amd/BarChart-994cb8f0.js +0 -2
- package/amd/BarChart-994cb8f0.js.map +0 -1
- package/amd/BaseDiagram-00ea8628.js +0 -2
- package/amd/BaseDiagram-00ea8628.js.map +0 -1
- package/amd/ButtonSetButton-fa0256aa.js +0 -2
- package/amd/ButtonSetButton-fa0256aa.js.map +0 -1
- package/amd/ButtonSetIconButton-9010f20c.js +0 -2
- package/amd/ButtonSetIconButton-9010f20c.js.map +0 -1
- package/amd/ButtonSetItem-4b29107a.js +0 -2
- package/amd/ButtonSetItem-4b29107a.js.map +0 -1
- package/amd/Chart-d9eafc7a.js +0 -2
- package/amd/Chart-d9eafc7a.js.map +0 -1
- package/amd/CheckboxSetContext-2e486ea8.js +0 -2
- package/amd/CheckboxSetContext-2e486ea8.js.map +0 -1
- package/amd/ComboChart-5a6f6c8a.js +0 -2
- package/amd/ComboChart-5a6f6c8a.js.map +0 -1
- package/amd/ContainerDiagram-678f9746.js +0 -2
- package/amd/ContainerDiagram-678f9746.js.map +0 -1
- package/amd/DatePicker-bf521b1c.js +0 -2
- package/amd/DatePicker-bf521b1c.js.map +0 -1
- package/amd/DatePickerHeader-82f4f285.js +0 -2
- package/amd/DatePickerHeader-82f4f285.js.map +0 -1
- package/amd/Diagram-492f8b21.js +0 -2
- package/amd/Diagram-492f8b21.js.map +0 -1
- package/amd/Dropdown-7eca9554.js +0 -2
- package/amd/Dropdown-7eca9554.js.map +0 -1
- package/amd/IconMenuButton-82b8431d.js +0 -2
- package/amd/IconMenuButton-82b8431d.js.map +0 -1
- package/amd/IconSwitchButton-c44e0edf.js +0 -2
- package/amd/IconSwitchButton-c44e0edf.js.map +0 -1
- package/amd/IconToggleButton-0ab34b44.js +0 -2
- package/amd/IconToggleButton-0ab34b44.js.map +0 -1
- package/amd/InlineSelectSingle-87bc8a45.js +0 -2
- package/amd/InlineSelectSingle-87bc8a45.js.map +0 -1
- package/amd/InputColor-58e3fce3.js +0 -2
- package/amd/InputColor-58e3fce3.js.map +0 -1
- package/amd/InputDatePicker-7227a858.js +0 -2
- package/amd/InputDatePicker-7227a858.js.map +0 -1
- package/amd/InputPassword-450915c8.js +0 -2
- package/amd/InputPassword-450915c8.js.map +0 -1
- package/amd/InputSensitiveText-d94d24f0.js +0 -2
- package/amd/InputSensitiveText-d94d24f0.js.map +0 -1
- package/amd/Legend-47a1bf23.js +0 -2
- package/amd/Legend-47a1bf23.js.map +0 -1
- package/amd/LineAreaChart-47fc17d2.js +0 -2
- package/amd/LineAreaChart-47fc17d2.js.map +0 -1
- package/amd/Link-a8fad252.js +0 -2
- package/amd/Link-a8fad252.js.map +0 -1
- package/amd/ListView-02a92d18.js +0 -2
- package/amd/ListView-02a92d18.js.map +0 -1
- package/amd/Menu-1b8fefc5.js +0 -2
- package/amd/Menu-1b8fefc5.js.map +0 -1
- package/amd/MenuButton-2fe1ef2c.js +0 -2
- package/amd/MenuButton-2fe1ef2c.js.map +0 -1
- package/amd/MenuItem-85e4ffdc.js +0 -2
- package/amd/MenuItem-85e4ffdc.js.map +0 -1
- package/amd/MonthView-96fafba4.js +0 -2
- package/amd/MonthView-96fafba4.js.map +0 -1
- package/amd/NavigationListItem-9df5446c.js +0 -2
- package/amd/NavigationListItem-9df5446c.js.map +0 -1
- package/amd/OverflowTabBar-5ff68da7.js +0 -2
- package/amd/OverflowTabBar-5ff68da7.js.map +0 -1
- package/amd/OverflowTabBarItem-926b0c8a.js +0 -2
- package/amd/OverflowTabBarItem-926b0c8a.js.map +0 -1
- package/amd/PictoChart-ab426a71.js +0 -2
- package/amd/PictoChart-ab426a71.js.map +0 -1
- package/amd/PieChart-57ffe4c0.js +0 -2
- package/amd/PieChart-57ffe4c0.js.map +0 -1
- package/amd/ReorderableTabBar-0c69bfd4.js +0 -2
- package/amd/ReorderableTabBar-0c69bfd4.js.map +0 -1
- package/amd/RevealToggleIcon-093f60c4.js +0 -2
- package/amd/RevealToggleIcon-093f60c4.js.map +0 -1
- package/amd/ScatterChart-7bd0f601.js +0 -2
- package/amd/ScatterChart-7bd0f601.js.map +0 -1
- package/amd/SectionalLegend-bd980f3f.js +0 -2
- package/amd/SectionalLegend-bd980f3f.js.map +0 -1
- package/amd/SectionedContent-74559d9d.js +0 -2
- package/amd/SectionedContent-74559d9d.js.map +0 -1
- package/amd/SelectMenuItem-affab9f3.js +0 -2
- package/amd/SelectMenuItem-affab9f3.js.map +0 -1
- package/amd/SelectMobileFieldInput-4795a794.js +0 -2
- package/amd/SelectMobileFieldInput-4795a794.js.map +0 -1
- package/amd/SelectMultiple-e216b16c.js +0 -2
- package/amd/SelectMultiple-e216b16c.js.map +0 -1
- package/amd/SelectSingle-d53cf202.js +0 -2
- package/amd/SelectSingle-d53cf202.js.map +0 -1
- package/amd/SplitMenuButton-76adec12.js +0 -2
- package/amd/SplitMenuButton-76adec12.js.map +0 -1
- package/amd/StyledDatePickerButton-bceb62e1.js +0 -2
- package/amd/StyledDatePickerButton-bceb62e1.js.map +0 -1
- package/amd/Submenu-52ec8bfb.js +0 -2
- package/amd/Submenu-52ec8bfb.js.map +0 -1
- package/amd/TabBar-de723fbc.js +0 -2
- package/amd/TabBar-de723fbc.js.map +0 -1
- package/amd/TabBarContextMenu-6a167e27.js +0 -2
- package/amd/TabBarContextMenu-6a167e27.js.map +0 -1
- package/amd/TabBarMixed-cfd346bf.js +0 -2
- package/amd/TabBarMixed-cfd346bf.js.map +0 -1
- package/amd/Table-74566993.js +0 -2
- package/amd/Table-74566993.js.map +0 -1
- package/amd/TableView-3d82855c.js +0 -2
- package/amd/TableView-3d82855c.js.map +0 -1
- package/amd/TagCloud-c10a166e.js +0 -2
- package/amd/TagCloud-c10a166e.js.map +0 -1
- package/amd/TextArea-4a3b8b56.js +0 -2
- package/amd/TextArea-4a3b8b56.js.map +0 -1
- package/amd/TextAreaAutosize-3a13ebb2.js +0 -2
- package/amd/TextAreaAutosize-3a13ebb2.js.map +0 -1
- package/amd/ToggleButton-b77486fe.js +0 -2
- package/amd/ToggleButton-b77486fe.js.map +0 -1
- package/amd/ToggleButtonLabel-87364773.js +0 -2
- package/amd/ToggleButtonLabel-87364773.js.map +0 -1
- package/amd/TruncatingLink-591e7ff1.js +0 -2
- package/amd/TruncatingLink-591e7ff1.js.map +0 -1
- package/amd/YearsGridView-561c3074.js +0 -2
- package/amd/YearsGridView-561c3074.js.map +0 -1
- package/amd/listViewSelectionTests-7d18f09e.js +0 -2
- package/amd/listViewSelectionTests-7d18f09e.js.map +0 -1
- package/amd/useChartContextMenu-abadeabc.js +0 -2
- package/amd/useChartContextMenu-abadeabc.js.map +0 -1
- package/amd/useChartMarquee-3865426f.js +0 -2
- package/amd/useChartMarquee-3865426f.js.map +0 -1
- package/amd/useContextMenu-67972d45.js +0 -2
- package/amd/useContextMenu-67972d45.js.map +0 -1
- package/amd/useDisplayValue-9b671893.js +0 -2
- package/amd/useDisplayValue-9b671893.js.map +0 -1
- package/amd/useLegendContextMenu-55fedade.js +0 -2
- package/amd/useLegendContextMenu-55fedade.js.map +0 -1
- package/amd/useSelectCommon-f33709d2.js +0 -2
- package/amd/useSelectCommon-f33709d2.js.map +0 -1
- package/amd/useTabBar-b05edef0.js +0 -2
- package/amd/useTabBar-b05edef0.js.map +0 -1
- package/amd/useTextAreaAltEnter-32272da6.js +0 -2
- package/amd/useTextAreaAltEnter-32272da6.js.map +0 -1
- package/amd/useVisDragModeControls-5f059d09.js +0 -2
- package/amd/useVisDragModeControls-5f059d09.js.map +0 -1
- package/cjs/BaseButton-d8f96bfa.js +0 -86
- package/cjs/BaseButton-d8f96bfa.js.map +0 -1
- package/cjs/BaseDiagram-ce4f1a20.js +0 -2956
- package/cjs/BaseDiagram-ce4f1a20.js.map +0 -1
- package/cjs/Button-020e0381.js +0 -24
- package/cjs/Button-020e0381.js.map +0 -1
- package/cjs/ButtonSetButton-569e0efb.js +0 -35
- package/cjs/ButtonSetButton-569e0efb.js.map +0 -1
- package/cjs/ButtonSetIconButton-3778ac7b.js +0 -40
- package/cjs/ButtonSetIconButton-3778ac7b.js.map +0 -1
- package/cjs/ButtonSetItem-4322c957.js +0 -67
- package/cjs/ButtonSetItem-4322c957.js.map +0 -1
- package/cjs/Center-9a0ee4f3.js +0 -18
- package/cjs/Center-9a0ee4f3.js.map +0 -1
- package/cjs/Chart-966da017.js +0 -754
- package/cjs/Chart-966da017.js.map +0 -1
- package/cjs/CheckboxSet-6865f4fd.js +0 -55
- package/cjs/CheckboxSet-6865f4fd.js.map +0 -1
- package/cjs/ColorPalette-b14114d8.js +0 -83
- package/cjs/ColorPalette-b14114d8.js.map +0 -1
- package/cjs/ColorPicker-8f0b6000.js +0 -25
- package/cjs/ColorPicker-8f0b6000.js.map +0 -1
- package/cjs/CompactLabelAssistance-e910bb56.js +0 -95
- package/cjs/CompactLabelAssistance-e910bb56.js.map +0 -1
- package/cjs/DatePicker-b60f8a7e.js +0 -601
- package/cjs/DatePicker-b60f8a7e.js.map +0 -1
- package/cjs/DatePickerHeader-1010204c.js +0 -48
- package/cjs/DatePickerHeader-1010204c.js.map +0 -1
- package/cjs/Dialog-8b65180c.js +0 -389
- package/cjs/Dialog-8b65180c.js.map +0 -1
- package/cjs/Dropdown-1ba432a8.js +0 -333
- package/cjs/Dropdown-1ba432a8.js.map +0 -1
- package/cjs/EmbeddedIconButton-cc159a01.js +0 -13
- package/cjs/EmbeddedIconButton-cc159a01.js.map +0 -1
- package/cjs/EnvironmentProvider-5f2435e6.js +0 -61
- package/cjs/EnvironmentProvider-5f2435e6.js.map +0 -1
- package/cjs/Flex-3a257bc3.js +0 -32
- package/cjs/Flex-3a257bc3.js.map +0 -1
- package/cjs/Floating-79cbe5ad.js +0 -467
- package/cjs/Floating-79cbe5ad.js.map +0 -1
- package/cjs/Grid-cef20569.js +0 -29
- package/cjs/Grid-cef20569.js.map +0 -1
- package/cjs/HighlightText-f4535f3d.js +0 -33
- package/cjs/HighlightText-f4535f3d.js.map +0 -1
- package/cjs/IconSwitchButton-9b0df2d6.js +0 -44
- package/cjs/IconSwitchButton-9b0df2d6.js.map +0 -1
- package/cjs/IconToggleButton-d2147159.js +0 -43
- package/cjs/IconToggleButton-d2147159.js.map +0 -1
- package/cjs/IconUserAssistance-89913ad1.js +0 -76
- package/cjs/IconUserAssistance-89913ad1.js.map +0 -1
- package/cjs/Layer-b60deb1b.js +0 -94
- package/cjs/Layer-b60deb1b.js.map +0 -1
- package/cjs/LayerHost-3cd73603.js +0 -46
- package/cjs/LayerHost-3cd73603.js.map +0 -1
- package/cjs/LayerManager-c535d963.js +0 -36
- package/cjs/LayerManager-c535d963.js.map +0 -1
- package/cjs/Link-cc34e4c1.js +0 -35
- package/cjs/Link-cc34e4c1.js.map +0 -1
- package/cjs/LiveRegion-62ce9ac7.js +0 -41
- package/cjs/LiveRegion-62ce9ac7.js.map +0 -1
- package/cjs/MaxLengthLiveRegion-0a6ba765.js +0 -28
- package/cjs/MaxLengthLiveRegion-0a6ba765.js.map +0 -1
- package/cjs/MessageLayer-8e6e3d98.js +0 -61
- package/cjs/MessageLayer-8e6e3d98.js.map +0 -1
- package/cjs/MonthView-a2661a58.js +0 -210
- package/cjs/MonthView-a2661a58.js.map +0 -1
- package/cjs/NavigationListItem-3b9eb0fb.js +0 -294
- package/cjs/NavigationListItem-3b9eb0fb.js.map +0 -1
- package/cjs/OverflowTabBarItem-abcd2327.js +0 -262
- package/cjs/OverflowTabBarItem-abcd2327.js.map +0 -1
- package/cjs/Popup-de16d915.js +0 -300
- package/cjs/Popup-de16d915.js.map +0 -1
- package/cjs/ProgressCircle-cac3c03a.js +0 -50
- package/cjs/ProgressCircle-cac3c03a.js.map +0 -1
- package/cjs/ReferenceLineArea-7bc34276.js +0 -592
- package/cjs/ReferenceLineArea-7bc34276.js.map +0 -1
- package/cjs/RevealToggleIcon-a6a4f8db.js +0 -28
- package/cjs/RevealToggleIcon-a6a4f8db.js.map +0 -1
- package/cjs/SectionedContent-5eff5dce.js +0 -68
- package/cjs/SectionedContent-5eff5dce.js.map +0 -1
- package/cjs/SelectMenuGroupContext-a349d259.js +0 -551
- package/cjs/SelectMenuGroupContext-a349d259.js.map +0 -1
- package/cjs/SelectMobileFieldInput-cbf57541.js +0 -248
- package/cjs/SelectMobileFieldInput-cbf57541.js.map +0 -1
- package/cjs/SelectorAll-9118eb07.js +0 -53
- package/cjs/SelectorAll-9118eb07.js.map +0 -1
- package/cjs/StyledDatePickerButton-becd2a7d.js +0 -33
- package/cjs/StyledDatePickerButton-becd2a7d.js.map +0 -1
- package/cjs/StyledLabelValueLayout-48da61b9.js +0 -22
- package/cjs/StyledLabelValueLayout-48da61b9.js.map +0 -1
- package/cjs/Submenu-8e92469f.js +0 -251
- package/cjs/Submenu-8e92469f.js.map +0 -1
- package/cjs/TabBar-4bc753a9.js +0 -73
- package/cjs/TabBar-4bc753a9.js.map +0 -1
- package/cjs/TabBarContextMenu-d9bf65c2.js +0 -102
- package/cjs/TabBarContextMenu-d9bf65c2.js.map +0 -1
- package/cjs/TabBarLinkItem-b0c4b100.js +0 -15
- package/cjs/TabBarLinkItem-b0c4b100.js.map +0 -1
- package/cjs/Table-a102e1ee.js +0 -4114
- package/cjs/Table-a102e1ee.js.map +0 -1
- package/cjs/ToggleButton-5ebfe20e.js +0 -30
- package/cjs/ToggleButton-5ebfe20e.js.map +0 -1
- package/cjs/ToggleButtonLabel-c8f36317.js +0 -73
- package/cjs/ToggleButtonLabel-c8f36317.js.map +0 -1
- package/cjs/TruncatingLink-867da10e.js +0 -58
- package/cjs/TruncatingLink-867da10e.js.map +0 -1
- package/cjs/View-ed116d78.js +0 -170
- package/cjs/View-ed116d78.js.map +0 -1
- package/cjs/VisStatusMessage-07e63c6e.js +0 -31
- package/cjs/VisStatusMessage-07e63c6e.js.map +0 -1
- package/cjs/VisTabularDatatip-abfef042.js +0 -26
- package/cjs/VisTabularDatatip-abfef042.js.map +0 -1
- package/cjs/WindowOverlay-85d999fa.js +0 -112
- package/cjs/WindowOverlay-85d999fa.js.map +0 -1
- package/cjs/YearsGridView-d0d4e8e1.js +0 -190
- package/cjs/YearsGridView-d0d4e8e1.js.map +0 -1
- package/cjs/popupUtils-1d123cbe.js +0 -31
- package/cjs/popupUtils-1d123cbe.js.map +0 -1
- package/cjs/tooltipUtils-2bc15136.js +0 -115
- package/cjs/tooltipUtils-2bc15136.js.map +0 -1
- package/cjs/useChartContextMenu-af989b4f.js +0 -125
- package/cjs/useChartContextMenu-af989b4f.js.map +0 -1
- package/cjs/useChartDatatip-1bceba5d.js +0 -341
- package/cjs/useChartDatatip-1bceba5d.js.map +0 -1
- package/cjs/useChartMarquee-ede5cae4.js +0 -306
- package/cjs/useChartMarquee-ede5cae4.js.map +0 -1
- package/cjs/useColorScheme-f8b1447d.js +0 -21
- package/cjs/useColorScheme-f8b1447d.js.map +0 -1
- package/cjs/useContextMenu-2500df06.js +0 -119
- package/cjs/useContextMenu-2500df06.js.map +0 -1
- package/cjs/useCssVars-8e83d496.js +0 -60
- package/cjs/useCssVars-8e83d496.js.map +0 -1
- package/cjs/useCurrentKey-1b9e3382.js +0 -85
- package/cjs/useCurrentKey-1b9e3382.js.map +0 -1
- package/cjs/useDatatip-b7b4f13f.js +0 -96
- package/cjs/useDatatip-b7b4f13f.js.map +0 -1
- package/cjs/useDensity-0b9fd9ca.js +0 -21
- package/cjs/useDensity-0b9fd9ca.js.map +0 -1
- package/cjs/useDisplayValue-4ace417c.js +0 -82
- package/cjs/useDisplayValue-4ace417c.js.map +0 -1
- package/cjs/useExpandCollapse-ef990199.js +0 -72
- package/cjs/useExpandCollapse-ef990199.js.map +0 -1
- package/cjs/useFloating-c753a7f9.js +0 -1926
- package/cjs/useFloating-c753a7f9.js.map +0 -1
- package/cjs/useHiddenTestMethod-eae1d48b.js +0 -30
- package/cjs/useHiddenTestMethod-eae1d48b.js.map +0 -1
- package/cjs/useKeyboardEvents-0ab70381.js +0 -88
- package/cjs/useKeyboardEvents-0ab70381.js.map +0 -1
- package/cjs/useLegendContextMenu-2cf579d7.js +0 -285
- package/cjs/useLegendContextMenu-2cf579d7.js.map +0 -1
- package/cjs/useMeterDatatip-92ca91d9.js +0 -76
- package/cjs/useMeterDatatip-92ca91d9.js.map +0 -1
- package/cjs/useOutsideClick-dbf3d604.js +0 -117
- package/cjs/useOutsideClick-dbf3d604.js.map +0 -1
- package/cjs/useOutsideMousedown-70f36cca.js +0 -50
- package/cjs/useOutsideMousedown-70f36cca.js.map +0 -1
- package/cjs/usePopupAnimation-f3b34413.js +0 -87
- package/cjs/usePopupAnimation-f3b34413.js.map +0 -1
- package/cjs/usePrefixSuffix-23d1cc33.js +0 -72
- package/cjs/usePrefixSuffix-23d1cc33.js.map +0 -1
- package/cjs/useRadioFocusManager-a11750e7.js +0 -110
- package/cjs/useRadioFocusManager-a11750e7.js.map +0 -1
- package/cjs/useReorderableItem-64be8d2b.js +0 -299
- package/cjs/useReorderableItem-64be8d2b.js.map +0 -1
- package/cjs/useRovingTabIndexContainer-0ce4681d.js +0 -108
- package/cjs/useRovingTabIndexContainer-0ce4681d.js.map +0 -1
- package/cjs/useScale-db16c2b8.js +0 -21
- package/cjs/useScale-db16c2b8.js.map +0 -1
- package/cjs/useSelectCommon-27afecfa.js +0 -507
- package/cjs/useSelectCommon-27afecfa.js.map +0 -1
- package/cjs/useSelectDrill-0b4b47ec.js +0 -114
- package/cjs/useSelectDrill-0b4b47ec.js.map +0 -1
- package/cjs/useSelection-37939f09.js +0 -260
- package/cjs/useSelection-37939f09.js.map +0 -1
- package/cjs/useSelection-da64e28e.js +0 -188
- package/cjs/useSelection-da64e28e.js.map +0 -1
- package/cjs/useTabBar-35b73d10.js +0 -309
- package/cjs/useTabBar-35b73d10.js.map +0 -1
- package/cjs/useTestId-4f53d561.js +0 -23
- package/cjs/useTestId-4f53d561.js.map +0 -1
- package/cjs/useTextAreaAltEnter-11424062.js +0 -64
- package/cjs/useTextAreaAltEnter-11424062.js.map +0 -1
- package/cjs/useTheme-2a034a21.js +0 -21
- package/cjs/useTheme-2a034a21.js.map +0 -1
- package/cjs/useThemeInterpolations-a37b37d9.js +0 -71
- package/cjs/useThemeInterpolations-a37b37d9.js.map +0 -1
- package/cjs/useTooltip-34accecc.js +0 -51
- package/cjs/useTooltip-34accecc.js.map +0 -1
- package/cjs/useTooltipControlled-0a95856c.js +0 -376
- package/cjs/useTooltipControlled-0a95856c.js.map +0 -1
- package/cjs/useTooltipOnTruncation-8867b10e.js +0 -29
- package/cjs/useTooltipOnTruncation-8867b10e.js.map +0 -1
- package/cjs/useTranslationBundle-12dd087d.js +0 -31
- package/cjs/useTranslationBundle-12dd087d.js.map +0 -1
- package/cjs/useUser-1295b5cb.js +0 -21
- package/cjs/useUser-1295b5cb.js.map +0 -1
- package/cjs/useVisDragModeControls-2443a4e0.js +0 -89
- package/cjs/useVisDragModeControls-2443a4e0.js.map +0 -1
- package/cjs/useVisEvents-334c2c8d.js +0 -155
- package/cjs/useVisEvents-334c2c8d.js.map +0 -1
- package/cjs/withDirectionIcon-4940a248.js +0 -16
- package/cjs/withDirectionIcon-4940a248.js.map +0 -1
- package/es/BaseButton-41068c85.js +0 -84
- package/es/BaseButton-41068c85.js.map +0 -1
- package/es/BaseDiagram-b5b22e53.js +0 -2954
- package/es/BaseDiagram-b5b22e53.js.map +0 -1
- package/es/Button-956f51c7.js +0 -22
- package/es/Button-956f51c7.js.map +0 -1
- package/es/ButtonSetButton-8685c752.js +0 -33
- package/es/ButtonSetButton-8685c752.js.map +0 -1
- package/es/ButtonSetIconButton-c8ed85f9.js +0 -38
- package/es/ButtonSetIconButton-c8ed85f9.js.map +0 -1
- package/es/ButtonSetItem-280755f3.js +0 -65
- package/es/ButtonSetItem-280755f3.js.map +0 -1
- package/es/Center-71a03e65.js +0 -16
- package/es/Center-71a03e65.js.map +0 -1
- package/es/Chart-8c63da28.js +0 -752
- package/es/Chart-8c63da28.js.map +0 -1
- package/es/CheckboxSetContext-1be56556.js +0 -9
- package/es/CheckboxSetContext-1be56556.js.map +0 -1
- package/es/ColorPicker-fa103067.js +0 -23
- package/es/ColorPicker-fa103067.js.map +0 -1
- package/es/CompactLabelAssistance-e2fcfcab.js +0 -92
- package/es/CompactLabelAssistance-e2fcfcab.js.map +0 -1
- package/es/DatePicker-7287f0f9.js +0 -599
- package/es/DatePicker-7287f0f9.js.map +0 -1
- package/es/DatePickerHeader-f8cf86bb.js +0 -46
- package/es/DatePickerHeader-f8cf86bb.js.map +0 -1
- package/es/Dialog-83368f52.js +0 -387
- package/es/Dialog-83368f52.js.map +0 -1
- package/es/Dropdown-019aba37.js +0 -318
- package/es/Dropdown-019aba37.js.map +0 -1
- package/es/EmbeddedIconButton-46434710.js +0 -11
- package/es/EmbeddedIconButton-46434710.js.map +0 -1
- package/es/EnvironmentProvider-6a0a8212.js +0 -58
- package/es/EnvironmentProvider-6a0a8212.js.map +0 -1
- package/es/Flex-03129963.js +0 -30
- package/es/Flex-03129963.js.map +0 -1
- package/es/Floating-4a82db94.js +0 -465
- package/es/Floating-4a82db94.js.map +0 -1
- package/es/Grid-9e4b4f19.js +0 -27
- package/es/Grid-9e4b4f19.js.map +0 -1
- package/es/HighlightText-0205faef.js +0 -31
- package/es/HighlightText-0205faef.js.map +0 -1
- package/es/IconSwitchButton-05f1f602.js +0 -42
- package/es/IconSwitchButton-05f1f602.js.map +0 -1
- package/es/IconToggleButton-808818f5.js +0 -41
- package/es/IconToggleButton-808818f5.js.map +0 -1
- package/es/IconUserAssistance-61978211.js +0 -74
- package/es/IconUserAssistance-61978211.js.map +0 -1
- package/es/Layer-535577b5.js +0 -91
- package/es/Layer-535577b5.js.map +0 -1
- package/es/LayerHost-7931b424.js +0 -41
- package/es/LayerHost-7931b424.js.map +0 -1
- package/es/LayerManager-52a26c55.js +0 -34
- package/es/LayerManager-52a26c55.js.map +0 -1
- package/es/Link-8503aab2.js +0 -33
- package/es/Link-8503aab2.js.map +0 -1
- package/es/LiveRegion-cebac18d.js +0 -39
- package/es/LiveRegion-cebac18d.js.map +0 -1
- package/es/MaxLengthLiveRegion-8099fde5.js +0 -26
- package/es/MaxLengthLiveRegion-8099fde5.js.map +0 -1
- package/es/MessageLayer-2a7fdec7.js +0 -58
- package/es/MessageLayer-2a7fdec7.js.map +0 -1
- package/es/MonthView-4b2b483a.js +0 -208
- package/es/MonthView-4b2b483a.js.map +0 -1
- package/es/NavigationListItem-340ab770.js +0 -309
- package/es/NavigationListItem-340ab770.js.map +0 -1
- package/es/OverflowTabBarItem-aa0ce915.js +0 -257
- package/es/OverflowTabBarItem-aa0ce915.js.map +0 -1
- package/es/Popup-992b6c27.js +0 -298
- package/es/Popup-992b6c27.js.map +0 -1
- package/es/ProgressCircle-46084d0b.js +0 -48
- package/es/ProgressCircle-46084d0b.js.map +0 -1
- package/es/ReferenceLineArea-53129f72.js +0 -586
- package/es/ReferenceLineArea-53129f72.js.map +0 -1
- package/es/RevealToggleIcon-2d622d8f.js +0 -26
- package/es/RevealToggleIcon-2d622d8f.js.map +0 -1
- package/es/SectionedContent-30e5bf98.js +0 -65
- package/es/SectionedContent-30e5bf98.js.map +0 -1
- package/es/SelectMenuGroupContext-aa1fe822.js +0 -542
- package/es/SelectMenuGroupContext-aa1fe822.js.map +0 -1
- package/es/SelectMobileFieldInput-345c4d45.js +0 -241
- package/es/SelectMobileFieldInput-345c4d45.js.map +0 -1
- package/es/SelectorAll-de7ba2e1.js +0 -51
- package/es/SelectorAll-de7ba2e1.js.map +0 -1
- package/es/StyledDatePickerButton-78f2f6e8.js +0 -31
- package/es/StyledDatePickerButton-78f2f6e8.js.map +0 -1
- package/es/StyledLabelValueLayout-bb05f474.js +0 -18
- package/es/StyledLabelValueLayout-bb05f474.js.map +0 -1
- package/es/Submenu-cbd77756.js +0 -247
- package/es/Submenu-cbd77756.js.map +0 -1
- package/es/TabBar-10488830.js +0 -69
- package/es/TabBar-10488830.js.map +0 -1
- package/es/TabBarContextMenu-c3326d67.js +0 -99
- package/es/TabBarContextMenu-c3326d67.js.map +0 -1
- package/es/TabBarLinkItem-e7be54fa.js +0 -13
- package/es/TabBarLinkItem-e7be54fa.js.map +0 -1
- package/es/Table-2f197c6a.js +0 -4112
- package/es/Table-2f197c6a.js.map +0 -1
- package/es/ToggleButton-bb69cf10.js +0 -28
- package/es/ToggleButton-bb69cf10.js.map +0 -1
- package/es/ToggleButtonLabel-7f53fbee.js +0 -71
- package/es/ToggleButtonLabel-7f53fbee.js.map +0 -1
- package/es/TruncatingLink-298c6343.js +0 -56
- package/es/TruncatingLink-298c6343.js.map +0 -1
- package/es/View-5bdd9b3c.js +0 -167
- package/es/View-5bdd9b3c.js.map +0 -1
- package/es/VisStatusMessage-e2d629bb.js +0 -29
- package/es/VisStatusMessage-e2d629bb.js.map +0 -1
- package/es/VisTabularDatatip-85b00c1b.js +0 -24
- package/es/VisTabularDatatip-85b00c1b.js.map +0 -1
- package/es/WindowOverlay-7264c44a.js +0 -110
- package/es/WindowOverlay-7264c44a.js.map +0 -1
- package/es/YearsGridView-6c18094a.js +0 -187
- package/es/YearsGridView-6c18094a.js.map +0 -1
- package/es/popupUtils-51366a29.js +0 -29
- package/es/popupUtils-51366a29.js.map +0 -1
- package/es/tooltipUtils-af0abd38.js +0 -110
- package/es/tooltipUtils-af0abd38.js.map +0 -1
- package/es/useChartContextMenu-5de82cd7.js +0 -123
- package/es/useChartContextMenu-5de82cd7.js.map +0 -1
- package/es/useChartDatatip-8dd22b71.js +0 -336
- package/es/useChartDatatip-8dd22b71.js.map +0 -1
- package/es/useChartMarquee-761eb7db.js +0 -304
- package/es/useChartMarquee-761eb7db.js.map +0 -1
- package/es/useColorScheme-c4f6caab.js +0 -19
- package/es/useColorScheme-c4f6caab.js.map +0 -1
- package/es/useContextMenu-730d6c12.js +0 -116
- package/es/useContextMenu-730d6c12.js.map +0 -1
- package/es/useCssVars-bc2527ac.js +0 -58
- package/es/useCssVars-bc2527ac.js.map +0 -1
- package/es/useCurrentKey-5f865bbd.js +0 -83
- package/es/useCurrentKey-5f865bbd.js.map +0 -1
- package/es/useDatatip-4895a07a.js +0 -94
- package/es/useDatatip-4895a07a.js.map +0 -1
- package/es/useDensity-1acb0153.js +0 -19
- package/es/useDensity-1acb0153.js.map +0 -1
- package/es/useDisplayValue-65bbc74e.js +0 -78
- package/es/useDisplayValue-65bbc74e.js.map +0 -1
- package/es/useExpandCollapse-5739cfd2.js +0 -70
- package/es/useExpandCollapse-5739cfd2.js.map +0 -1
- package/es/useFloating-b9d680f7.js +0 -1916
- package/es/useFloating-b9d680f7.js.map +0 -1
- package/es/useHiddenTestMethod-f3f25093.js +0 -28
- package/es/useHiddenTestMethod-f3f25093.js.map +0 -1
- package/es/useKeyboardEvents-9aae7ea3.js +0 -85
- package/es/useKeyboardEvents-9aae7ea3.js.map +0 -1
- package/es/useLegendContextMenu-a678b26f.js +0 -279
- package/es/useLegendContextMenu-a678b26f.js.map +0 -1
- package/es/useMeterDatatip-538a4d53.js +0 -73
- package/es/useMeterDatatip-538a4d53.js.map +0 -1
- package/es/useOutsideClick-b777a43e.js +0 -115
- package/es/useOutsideClick-b777a43e.js.map +0 -1
- package/es/useOutsideMousedown-c45c22c0.js +0 -48
- package/es/useOutsideMousedown-c45c22c0.js.map +0 -1
- package/es/usePopupAnimation-96d2bc83.js +0 -85
- package/es/usePopupAnimation-96d2bc83.js.map +0 -1
- package/es/usePrefixSuffix-f981b65f.js +0 -70
- package/es/usePrefixSuffix-f981b65f.js.map +0 -1
- package/es/useRadioFocusManager-36eb283e.js +0 -108
- package/es/useRadioFocusManager-36eb283e.js.map +0 -1
- package/es/useReorderableItem-857636b7.js +0 -296
- package/es/useReorderableItem-857636b7.js.map +0 -1
- package/es/useRovingTabIndexContainer-5992e107.js +0 -106
- package/es/useRovingTabIndexContainer-5992e107.js.map +0 -1
- package/es/useScale-434ad939.js +0 -19
- package/es/useScale-434ad939.js.map +0 -1
- package/es/useSelectCommon-a3c69d60.js +0 -489
- package/es/useSelectCommon-a3c69d60.js.map +0 -1
- package/es/useSelectDrill-f669e729.js +0 -111
- package/es/useSelectDrill-f669e729.js.map +0 -1
- package/es/useSelection-65134722.js +0 -258
- package/es/useSelection-65134722.js.map +0 -1
- package/es/useSelection-82bec039.js +0 -186
- package/es/useSelection-82bec039.js.map +0 -1
- package/es/useTabBar-c5558e77.js +0 -305
- package/es/useTabBar-c5558e77.js.map +0 -1
- package/es/useTestId-f24ac480.js +0 -21
- package/es/useTestId-f24ac480.js.map +0 -1
- package/es/useTheme-0e7497db.js +0 -19
- package/es/useTheme-0e7497db.js.map +0 -1
- package/es/useThemeInterpolations-e144e8ec.js +0 -68
- package/es/useThemeInterpolations-e144e8ec.js.map +0 -1
- package/es/useTooltip-94af94d4.js +0 -49
- package/es/useTooltip-94af94d4.js.map +0 -1
- package/es/useTooltipControlled-f2cfa454.js +0 -373
- package/es/useTooltipControlled-f2cfa454.js.map +0 -1
- package/es/useTooltipOnTruncation-94282e75.js +0 -27
- package/es/useTooltipOnTruncation-94282e75.js.map +0 -1
- package/es/useTranslationBundle-4822502f.js +0 -29
- package/es/useTranslationBundle-4822502f.js.map +0 -1
- package/es/useUser-06d34d19.js +0 -19
- package/es/useUser-06d34d19.js.map +0 -1
- package/es/useVisDragModeControls-af64848c.js +0 -87
- package/es/useVisDragModeControls-af64848c.js.map +0 -1
- package/es/useVisEvents-256dee29.js +0 -153
- package/es/useVisEvents-256dee29.js.map +0 -1
- package/es/withDirectionIcon-a8d84a3d.js +0 -14
- package/es/withDirectionIcon-a8d84a3d.js.map +0 -1
package/cjs/Table-a102e1ee.js
DELETED
|
@@ -1,4114 +0,0 @@
|
|
|
1
|
-
/* @oracle/oraclejet-preact: undefined */
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
var jsxRuntime = require('preact/jsx-runtime');
|
|
5
|
-
var preact = require('preact');
|
|
6
|
-
var compat = require('preact/compat');
|
|
7
|
-
var hooks = require('preact/hooks');
|
|
8
|
-
require('./CollectionInteractionContext-f84ff7a1.js');
|
|
9
|
-
var useCollectionInteractionContext = require('./useCollectionInteractionContext-6fc0200e.js');
|
|
10
|
-
var useComponentTheme = require('./useComponentTheme-082fc8e4.js');
|
|
11
|
-
var useId = require('./useId-6c0eeb27.js');
|
|
12
|
-
var TabbableModeContext = require('./TabbableModeContext-e99d527e.js');
|
|
13
|
-
var useTestId = require('./useTestId-4f53d561.js');
|
|
14
|
-
var useUser = require('./useUser-1295b5cb.js');
|
|
15
|
-
var classNames = require('./classNames-c14c6ef3.js');
|
|
16
|
-
var FocusTracker = require('./FocusTracker-e2ea43c3.js');
|
|
17
|
-
var ScrollUtils = require('./ScrollUtils-e8076071.js');
|
|
18
|
-
var mergeProps = require('./mergeProps-e3da7237.js');
|
|
19
|
-
var useContextMenuGesture = require('./useContextMenuGesture-530ef8dd.js');
|
|
20
|
-
var TableColGroup = require('./TableColGroup-b7e1e296.js');
|
|
21
|
-
var useTranslationBundle = require('./useTranslationBundle-12dd087d.js');
|
|
22
|
-
var Button = require('./Button-020e0381.js');
|
|
23
|
-
var Dialog = require('./Dialog-8b65180c.js');
|
|
24
|
-
var Flex = require('./Flex-3a257bc3.js');
|
|
25
|
-
var SelectMenuGroupContext = require('./SelectMenuGroupContext-a349d259.js');
|
|
26
|
-
var Submenu = require('./Submenu-8e92469f.js');
|
|
27
|
-
require('./logger-2b636482.js');
|
|
28
|
-
require('./UNSAFE_Separator/themes/SeparatorStyles.css.js');
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
require('./UNSAFE_Menu/themes/redwood/MenuSeparatorVariants.css.js');
|
|
32
|
-
var NumberInputText = require('./NumberInputText-36164d46.js');
|
|
33
|
-
var useColorScheme = require('./useColorScheme-f8b1447d.js');
|
|
34
|
-
var useScale = require('./useScale-db16c2b8.js');
|
|
35
|
-
var useTooltipControlled = require('./useTooltipControlled-0a95856c.js');
|
|
36
|
-
var tooltipUtils = require('./tooltipUtils-2bc15136.js');
|
|
37
|
-
var collectionUtils = require('./collectionUtils-f1d3183f.js');
|
|
38
|
-
var tabbableUtils = require('./tabbableUtils-22a50472.js');
|
|
39
|
-
var EventUtils = require('./EventUtils-404fa5be.js');
|
|
40
|
-
var keys = require('./keys-25710458.js');
|
|
41
|
-
var clientHints = require('./clientHints-c40c5250.js');
|
|
42
|
-
var textSelectionUtils = require('./textSelectionUtils-57082239.js');
|
|
43
|
-
var PRIVATE_Table_themes_Table_css = require('./PRIVATE_Table/themes/Table.css.js');
|
|
44
|
-
var PRIVATE_Table_themes_TableSkeletonStyles_css = require('./PRIVATE_Table/themes/TableSkeletonStyles.css.js');
|
|
45
|
-
var PRIVATE_Table_themes_redwood_TableTheme = require('./PRIVATE_Table/themes/redwood/TableTheme.js');
|
|
46
|
-
var LoadMoreCollection = require('./LoadMoreCollection-eb1f2603.js');
|
|
47
|
-
var PRIVATE_Table_themes_TableRowStyles_css = require('./PRIVATE_Table/themes/TableRowStyles.css.js');
|
|
48
|
-
var PRIVATE_Table_themes_redwood_TableNoDataTheme = require('./PRIVATE_Table/themes/redwood/TableNoDataTheme.js');
|
|
49
|
-
var useInteractionStyle = require('./useInteractionStyle-c203a8a0.js');
|
|
50
|
-
var Selector = require('./Selector-6550b8e0.js');
|
|
51
|
-
var FormContext = require('./FormContext-d1d05967.js');
|
|
52
|
-
var PRIVATE_TableCommon_themes_Common_css = require('./PRIVATE_TableCommon/themes/Common.css.js');
|
|
53
|
-
var useSortableContext = require('./useSortableContext-0510fd8e.js');
|
|
54
|
-
var SelectorAll = require('./SelectorAll-9118eb07.js');
|
|
55
|
-
var SortControl = require('./SortControl-8c15705b.js');
|
|
56
|
-
var PRIVATE_Table_themes_TableHeaderCellStyles_css = require('./PRIVATE_Table/themes/TableHeaderCellStyles.css.js');
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* The internal component used to render a custom context menu on the Table
|
|
60
|
-
*/
|
|
61
|
-
function TableContextMenu({ contextMenuConfig, contextMenuContext, ...menuProps }) {
|
|
62
|
-
const translations = useTranslationBundle.useTranslationBundle('@oracle/oraclejet-preact');
|
|
63
|
-
const accessibleLabel = contextMenuConfig.accessibleLabel != null
|
|
64
|
-
? contextMenuConfig.accessibleLabel
|
|
65
|
-
: translations.accContextMenuLabel();
|
|
66
|
-
return contextMenuConfig.itemsRenderer(contextMenuContext) != null ? (jsxRuntime.jsx(SelectMenuGroupContext.Menu, { "aria-label": accessibleLabel, ...menuProps, children: menuProps.isOpen && contextMenuConfig.itemsRenderer(contextMenuContext) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {}));
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* The internal component used to render the context menu sort item on the Table
|
|
70
|
-
*/
|
|
71
|
-
function TableContextMenuSort({ columnKey, isDisabled, currentSortDirection, onSortCriterionChange }) {
|
|
72
|
-
const translations = useTranslationBundle.useTranslationBundle('@oracle/oraclejet-preact');
|
|
73
|
-
const _handleSort = ({ value }) => {
|
|
74
|
-
if (onSortCriterionChange != null && value !== currentSortDirection) {
|
|
75
|
-
onSortCriterionChange([
|
|
76
|
-
{ key: columnKey, sortDirection: value === 'ascending' ? 'ascending' : 'descending' }
|
|
77
|
-
]);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
return (jsxRuntime.jsx(Submenu.Submenu, { label: translations.collection_sortColumnMenu(), children: jsxRuntime.jsxs(Submenu.SelectSingleMenuGroup, { value: currentSortDirection, onCommit: _handleSort, children: [jsxRuntime.jsx(Submenu.SelectMenuItem, { isDisabled: isDisabled, value: "ascending", label: translations.collection_sortAscendingSubMenu() }), jsxRuntime.jsx(Submenu.SelectMenuItem, { isDisabled: isDisabled, value: "descending", label: translations.collection_sortDescendingSubMenu() })] }) }));
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* The internal component used to render the context menu column resize item on the Table
|
|
84
|
-
*/
|
|
85
|
-
function TableContextMenuResize({ isDisabled, setIsResizeDialogOpen }) {
|
|
86
|
-
const translations = useTranslationBundle.useTranslationBundle('@oracle/oraclejet-preact');
|
|
87
|
-
const handleResize = () => {
|
|
88
|
-
setIsResizeDialogOpen(true);
|
|
89
|
-
};
|
|
90
|
-
return (jsxRuntime.jsx(SelectMenuGroupContext.MenuItem, { label: translations.collection_resizeColumnMenu(), onAction: handleResize, isDisabled: isDisabled }));
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* The internal component used to render the column resize dialog on the Table
|
|
94
|
-
*/
|
|
95
|
-
function TableResizeColumnDialog({ isOpen, columnKey, onColumnResize, appliedColumnWidths, setIsResizeDialogOpen }) {
|
|
96
|
-
const translations = useTranslationBundle.useTranslationBundle('@oracle/oraclejet-preact');
|
|
97
|
-
const initialWidth = Math.round(appliedColumnWidths.netColumnWidths[columnKey]);
|
|
98
|
-
const initialWidthRef = hooks.useRef(initialWidth);
|
|
99
|
-
const numberInputRef = hooks.useRef(null);
|
|
100
|
-
const [widthValue, setWidthValue] = hooks.useState(String(initialWidth));
|
|
101
|
-
let isDisabled;
|
|
102
|
-
let messages;
|
|
103
|
-
if (widthValue == null ||
|
|
104
|
-
Number.isNaN(parseInt(widthValue)) ||
|
|
105
|
-
String(parseInt(widthValue)) !== widthValue.trim() ||
|
|
106
|
-
parseInt(widthValue) < 16 ||
|
|
107
|
-
parseInt(widthValue) > 100000) {
|
|
108
|
-
messages = [
|
|
109
|
-
{
|
|
110
|
-
severity: 'error',
|
|
111
|
-
detail: translations.collection_resizeMessageDetail({ MIN: '16', MAX: '100000' })
|
|
112
|
-
}
|
|
113
|
-
];
|
|
114
|
-
isDisabled = true;
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
isDisabled = false;
|
|
118
|
-
}
|
|
119
|
-
const apply = hooks.useCallback(() => {
|
|
120
|
-
if (columnKey != null && onColumnResize != null && widthValue != null) {
|
|
121
|
-
if (parseInt(widthValue) !== initialWidthRef.current) {
|
|
122
|
-
onColumnResize({
|
|
123
|
-
key: columnKey,
|
|
124
|
-
newWidth: parseInt(widthValue),
|
|
125
|
-
allColumnWidths: appliedColumnWidths.netColumnWidths,
|
|
126
|
-
paddingWidth: appliedColumnWidths.totalBorderOffset,
|
|
127
|
-
gesture: 'contextMenu',
|
|
128
|
-
type: 'absolute'
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
setIsResizeDialogOpen(false);
|
|
133
|
-
}, [columnKey, onColumnResize, widthValue, appliedColumnWidths, setIsResizeDialogOpen]);
|
|
134
|
-
const handleKeyDown = hooks.useCallback((event) => {
|
|
135
|
-
if (event.key === 'Enter' && !isDisabled) {
|
|
136
|
-
apply();
|
|
137
|
-
}
|
|
138
|
-
}, [apply, isDisabled]);
|
|
139
|
-
const cancel = hooks.useCallback(() => {
|
|
140
|
-
setIsResizeDialogOpen(false);
|
|
141
|
-
}, [setIsResizeDialogOpen]);
|
|
142
|
-
const handleOnInput = hooks.useCallback((detail) => {
|
|
143
|
-
setWidthValue(detail.value);
|
|
144
|
-
}, []);
|
|
145
|
-
const footer = (jsxRuntime.jsxs(Flex.Flex, { gap: "2x", children: [jsxRuntime.jsx(Button.Button, { onAction: cancel, label: translations.collection_cancel() }), jsxRuntime.jsx(Button.Button, { variant: "callToAction", onAction: apply, label: translations.collection_apply(), isDisabled: isDisabled })] }));
|
|
146
|
-
return (jsxRuntime.jsx(Dialog.Dialog, { autoFocusRef: numberInputRef, isOpen: isOpen, modality: 'modal', header: translations.collection_resizeColumnDialog(), footer: footer, children: jsxRuntime.jsx("div", { onKeyDown: handleKeyDown, children: jsxRuntime.jsx(NumberInputText.NumberInputText, { label: translations.collection_width(), onInput: handleOnInput, suffix: translations.collection_pixels(), messages: messages, isRequired: true, isRequiredShown: true, ref: numberInputRef, value: widthValue }) }) }));
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Helper function to determine if a given active cell represents a 'transient' state.
|
|
151
|
-
*/
|
|
152
|
-
function isTransientCell(activeCell) {
|
|
153
|
-
return (activeCell != null &&
|
|
154
|
-
(activeCell.type === 'loadMore' ||
|
|
155
|
-
activeCell.type === 'loading' ||
|
|
156
|
-
activeCell.type === 'pending'));
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Helper function to compare two given cell descriptors.
|
|
160
|
-
*/
|
|
161
|
-
function cellComparator(cell1, cell2) {
|
|
162
|
-
if (cell1 == null) {
|
|
163
|
-
return cell2 == null;
|
|
164
|
-
}
|
|
165
|
-
if (cell2 == null) {
|
|
166
|
-
return false;
|
|
167
|
-
}
|
|
168
|
-
if (cell1.type === cell2.type && cell1.rowKey === cell2.rowKey) {
|
|
169
|
-
// special case the transient 'loading' cell types as column keys are hints used for when a user
|
|
170
|
-
// navigates back to another region using the keyboard - otherwise we'd go to the first column
|
|
171
|
-
if (cell1.type === 'loading' || cell1.type === 'loadMore' || cell1.type === 'pending') {
|
|
172
|
-
return true;
|
|
173
|
-
}
|
|
174
|
-
return cell1.columnKey === cell2.columnKey;
|
|
175
|
-
}
|
|
176
|
-
return false;
|
|
177
|
-
}
|
|
178
|
-
function getCellContextMenuContextFromCell(tableData, columnsArray, setIsResizeDialogOpen, cell, sortCriterion, onSortCriterionChange) {
|
|
179
|
-
if (cell?.type === 'data' || cell?.type === 'header' || cell?.type === 'footer') {
|
|
180
|
-
let isSortable = false;
|
|
181
|
-
let isResizable = false;
|
|
182
|
-
for (let i = 0; i < columnsArray.length; i++) {
|
|
183
|
-
const column = columnsArray[i];
|
|
184
|
-
if (column.key === cell.columnKey) {
|
|
185
|
-
isSortable = column.value.sortable === 'enabled';
|
|
186
|
-
isResizable = column.value.resizable === 'enabled';
|
|
187
|
-
break;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
let currentSortDirection;
|
|
191
|
-
if (sortCriterion != null) {
|
|
192
|
-
for (const criterion of sortCriterion) {
|
|
193
|
-
if (criterion.key === cell.columnKey) {
|
|
194
|
-
currentSortDirection = criterion.sortDirection;
|
|
195
|
-
break;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
const allMenuItems = {
|
|
200
|
-
resizeColumn: (jsxRuntime.jsx(TableContextMenuResize, { isDisabled: !isResizable, setIsResizeDialogOpen: setIsResizeDialogOpen })),
|
|
201
|
-
sortColumn: (jsxRuntime.jsx(TableContextMenuSort, { columnKey: cell.columnKey, isDisabled: !isSortable, currentSortDirection: currentSortDirection, onSortCriterionChange: onSortCriterionChange }))
|
|
202
|
-
};
|
|
203
|
-
const hasResizableColumns = columnsArray.some((column) => {
|
|
204
|
-
return column.value.resizable === 'enabled';
|
|
205
|
-
});
|
|
206
|
-
const hasSortableColumns = columnsArray.some((column) => {
|
|
207
|
-
return column.value.sortable === 'enabled';
|
|
208
|
-
});
|
|
209
|
-
const defaultMenuItems = hasResizableColumns || hasSortableColumns ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasResizableColumns ? allMenuItems['resizeColumn'] : undefined, hasSortableColumns ? allMenuItems['sortColumn'] : undefined] })) : undefined;
|
|
210
|
-
if (cell.type === 'data') {
|
|
211
|
-
for (const rowData of tableData) {
|
|
212
|
-
if (rowData.metadata.key === cell.rowKey) {
|
|
213
|
-
return {
|
|
214
|
-
allMenuItems,
|
|
215
|
-
defaultMenuItems,
|
|
216
|
-
rowData: rowData.data,
|
|
217
|
-
rowKey: cell.rowKey,
|
|
218
|
-
columnKey: cell.columnKey,
|
|
219
|
-
type: 'data'
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
return {
|
|
226
|
-
allMenuItems,
|
|
227
|
-
defaultMenuItems,
|
|
228
|
-
columnKey: cell.columnKey,
|
|
229
|
-
type: cell.type
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
return undefined;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* Helper function to determine the resulting cell from a cell override.
|
|
237
|
-
*/
|
|
238
|
-
function _getCellFromCellOverride(tableData, columnsArray, cellOverride, currentCell) {
|
|
239
|
-
let cellType;
|
|
240
|
-
let cellRowKey;
|
|
241
|
-
let cellColumnKey;
|
|
242
|
-
if (cellOverride.rowKey != null) {
|
|
243
|
-
cellType = 'data';
|
|
244
|
-
cellRowKey = cellOverride.rowKey;
|
|
245
|
-
if (cellOverride.columnKey != null) {
|
|
246
|
-
cellColumnKey = cellOverride.columnKey;
|
|
247
|
-
}
|
|
248
|
-
else if (currentCell?.columnKey != null) {
|
|
249
|
-
cellColumnKey = currentCell.columnKey;
|
|
250
|
-
}
|
|
251
|
-
else {
|
|
252
|
-
cellColumnKey = TableColGroup.getBoundaryColumnKey(columnsArray, true);
|
|
253
|
-
}
|
|
254
|
-
if (cellColumnKey == null) {
|
|
255
|
-
return undefined;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
else if (cellOverride.columnKey != null) {
|
|
259
|
-
cellColumnKey = cellOverride.columnKey;
|
|
260
|
-
if (cellOverride.type != null) {
|
|
261
|
-
cellType = cellOverride.type;
|
|
262
|
-
}
|
|
263
|
-
else if (currentCell?.type != null && currentCell.type !== 'noData') {
|
|
264
|
-
cellType = currentCell.type;
|
|
265
|
-
}
|
|
266
|
-
else {
|
|
267
|
-
cellType = 'header';
|
|
268
|
-
}
|
|
269
|
-
if (cellType === 'data') {
|
|
270
|
-
if (currentCell?.rowKey != null) {
|
|
271
|
-
cellRowKey = currentCell.rowKey;
|
|
272
|
-
}
|
|
273
|
-
else if (tableData.length > 0) {
|
|
274
|
-
cellRowKey = tableData[0].metadata.key;
|
|
275
|
-
}
|
|
276
|
-
if (cellRowKey == null) {
|
|
277
|
-
return undefined;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
else if (cellOverride.type != null) {
|
|
282
|
-
cellType = cellOverride.type;
|
|
283
|
-
if (cellType !== 'noData') {
|
|
284
|
-
if (currentCell?.columnKey != null) {
|
|
285
|
-
cellColumnKey = currentCell.columnKey;
|
|
286
|
-
}
|
|
287
|
-
else {
|
|
288
|
-
cellColumnKey = TableColGroup.getBoundaryColumnKey(columnsArray, true);
|
|
289
|
-
}
|
|
290
|
-
if (cellColumnKey == null) {
|
|
291
|
-
return undefined;
|
|
292
|
-
}
|
|
293
|
-
if (cellType === 'data') {
|
|
294
|
-
if (currentCell?.rowKey != null) {
|
|
295
|
-
cellRowKey = currentCell.rowKey;
|
|
296
|
-
}
|
|
297
|
-
else if (tableData.length > 0) {
|
|
298
|
-
cellRowKey = tableData[0].metadata.key;
|
|
299
|
-
}
|
|
300
|
-
if (cellRowKey == null) {
|
|
301
|
-
return undefined;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
else {
|
|
307
|
-
return undefined;
|
|
308
|
-
}
|
|
309
|
-
return { type: cellType, rowKey: cellRowKey, columnKey: cellColumnKey };
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* Helper function to determine the resulting cell type from a cell override.
|
|
313
|
-
*/
|
|
314
|
-
function _getCellTypeFromCellOverride(cellOverride, currentCell) {
|
|
315
|
-
if (cellOverride.type != null) {
|
|
316
|
-
return cellOverride.type;
|
|
317
|
-
}
|
|
318
|
-
if (cellOverride.rowKey != null) {
|
|
319
|
-
return 'data';
|
|
320
|
-
}
|
|
321
|
-
// if no type or rowKey was given, a columnKey must have been given
|
|
322
|
-
if (currentCell?.type != null && currentCell.type !== 'noData') {
|
|
323
|
-
return currentCell.type;
|
|
324
|
-
}
|
|
325
|
-
return 'header';
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* Helper function to apply a current cell override if necessary.
|
|
329
|
-
*/
|
|
330
|
-
function applyCurrentCellOverride(rootElement, scrollerElement, viewportInfo, tableId, tableData, columnsArray, stickyColumnInfo, sizingInfo, overflowInfo, currencyStatusRef, onActiveCellChanged, isEmbeddedSelect, isPendingLayout, isDataLoaded, isRtl, currentCellOverride, appliedColumnWidths) {
|
|
331
|
-
// when embedded select, use most recent non-null current cell value as override base
|
|
332
|
-
const currentCell = isEmbeddedSelect
|
|
333
|
-
? currencyStatusRef.current.previousEmbeddedSelectCurrentCell
|
|
334
|
-
: currencyStatusRef.current.currentCell;
|
|
335
|
-
// ensure any new currentCellOverride settings are applied if necessary
|
|
336
|
-
if (currencyStatusRef.current.hasPendingCurrentCellOverride ||
|
|
337
|
-
currencyStatusRef.current.currentCellOverride !== currentCellOverride) {
|
|
338
|
-
if (currentCellOverride != null) {
|
|
339
|
-
// attempt to find the cell the override specifies
|
|
340
|
-
const realizedCell = _getCellFromCellOverride(tableData, columnsArray, currentCellOverride, currentCell);
|
|
341
|
-
if (realizedCell != null) {
|
|
342
|
-
// override cell was determined - apply the override immediately
|
|
343
|
-
onActiveCellChanged({ value: realizedCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, realizedCell), false, true);
|
|
344
|
-
currencyStatusRef.current.currentCellOverride = currentCellOverride;
|
|
345
|
-
currencyStatusRef.current.hasPendingCurrentCellOverride = false;
|
|
346
|
-
if (isEmbeddedSelect) {
|
|
347
|
-
// scroll 'current-cell-override' vertically into view immediately for embedded select
|
|
348
|
-
// otherwise, cell will be scrolled into view once the component or cell receives focus
|
|
349
|
-
if (!isPendingLayout && TableColGroup.getElementFromCell(rootElement, tableId, realizedCell) != null) {
|
|
350
|
-
TableColGroup.applyScrollDetail(rootElement, scrollerElement, viewportInfo, tableId, columnsArray, stickyColumnInfo, sizingInfo, overflowInfo, { cell: realizedCell, locationY: 'inView' }, isRtl, appliedColumnWidths);
|
|
351
|
-
currencyStatusRef.current.hasPendingCurrentCellOverrideScroll = false;
|
|
352
|
-
}
|
|
353
|
-
else if (isPendingLayout || !isDataLoaded) {
|
|
354
|
-
// corresponding element was not found - data is not ready for scrolling
|
|
355
|
-
currencyStatusRef.current.hasPendingCurrentCellOverrideScroll = true;
|
|
356
|
-
}
|
|
357
|
-
else {
|
|
358
|
-
// corresponding element was not found - value was garbage
|
|
359
|
-
currencyStatusRef.current.hasPendingCurrentCellOverrideScroll = false;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
else {
|
|
363
|
-
// not in an embedded select, so no scrolling should be performed
|
|
364
|
-
currencyStatusRef.current.hasPendingCurrentCellOverrideScroll = false;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
else if (!isDataLoaded) {
|
|
368
|
-
// override cell could not be determined - data is still fetching
|
|
369
|
-
currencyStatusRef.current.hasPendingCurrentCellOverride = true;
|
|
370
|
-
}
|
|
371
|
-
else {
|
|
372
|
-
// override cell could not be determined - value was garbage
|
|
373
|
-
currencyStatusRef.current.currentCellOverride = currentCellOverride;
|
|
374
|
-
currencyStatusRef.current.hasPendingCurrentCellOverride = false;
|
|
375
|
-
currencyStatusRef.current.hasPendingCurrentCellOverrideScroll = false;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
else {
|
|
379
|
-
// override is set to clear the current cell
|
|
380
|
-
onActiveCellChanged({ value: currentCellOverride });
|
|
381
|
-
currencyStatusRef.current.currentCellOverride = currentCellOverride;
|
|
382
|
-
currencyStatusRef.current.hasPendingCurrentCellOverride = false;
|
|
383
|
-
if (isEmbeddedSelect) {
|
|
384
|
-
// scroll back to the top for embedded select
|
|
385
|
-
TableColGroup.resetVerticalScrollPosition(scrollerElement);
|
|
386
|
-
}
|
|
387
|
-
currencyStatusRef.current.hasPendingCurrentCellOverrideScroll = false;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
else if (currencyStatusRef.current.hasPendingCurrentCellOverrideScroll) {
|
|
391
|
-
// try and apply any pending scroll from a previous cell override at this time
|
|
392
|
-
if (currencyStatusRef.current.currentCell != null) {
|
|
393
|
-
if (!isPendingLayout &&
|
|
394
|
-
TableColGroup.getElementFromCell(rootElement, tableId, currencyStatusRef.current.currentCell) != null) {
|
|
395
|
-
TableColGroup.applyScrollDetail(rootElement, scrollerElement, viewportInfo, tableId, columnsArray, stickyColumnInfo, sizingInfo, overflowInfo, { cell: currencyStatusRef.current.currentCell, locationY: 'inView' }, isRtl, appliedColumnWidths);
|
|
396
|
-
currencyStatusRef.current.hasPendingCurrentCellOverrideScroll = false;
|
|
397
|
-
}
|
|
398
|
-
else if (!isPendingLayout && isDataLoaded) {
|
|
399
|
-
// corresponding element was not found - value was garbage
|
|
400
|
-
currencyStatusRef.current.hasPendingCurrentCellOverrideScroll = false;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
else {
|
|
404
|
-
// there is no longer a current cell to try and scroll to
|
|
405
|
-
currencyStatusRef.current.hasPendingCurrentCellOverrideScroll = false;
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
/**
|
|
410
|
-
* Helper to determine if the given render state includes the cell specified.
|
|
411
|
-
*/
|
|
412
|
-
function _renderIncludesCell(cell, columnsArray, tableData, hasMore, isPendingLayout, hasFooters) {
|
|
413
|
-
// pending layout is special as other regions exist, but are not yet navigable
|
|
414
|
-
if (isPendingLayout) {
|
|
415
|
-
return cell.type === 'pending';
|
|
416
|
-
}
|
|
417
|
-
if (cell.type === 'header' || (hasFooters && cell.type === 'footer')) {
|
|
418
|
-
for (let i = 0; i < columnsArray.length; i++) {
|
|
419
|
-
if (columnsArray[i].key === cell.columnKey) {
|
|
420
|
-
return true;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
else if (tableData.length > 0) {
|
|
425
|
-
if (cell.type === 'loadMore') {
|
|
426
|
-
return hasMore;
|
|
427
|
-
}
|
|
428
|
-
if (cell.type === 'data') {
|
|
429
|
-
let isColumnValid = false;
|
|
430
|
-
for (let i = 0; i < columnsArray.length; i++) {
|
|
431
|
-
if (columnsArray[i].key === cell.columnKey) {
|
|
432
|
-
isColumnValid = true;
|
|
433
|
-
break;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
if (isColumnValid) {
|
|
437
|
-
for (let i = 0; i < tableData.length; i++) {
|
|
438
|
-
if (tableData[i].metadata.key === cell.rowKey) {
|
|
439
|
-
return true;
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
else {
|
|
446
|
-
return (cell.type === 'loading' && hasMore) || (cell.type === 'noData' && !hasMore);
|
|
447
|
-
}
|
|
448
|
-
return false;
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* Helper to get the cell that should currently be a tab stop for the given render state.
|
|
452
|
-
*/
|
|
453
|
-
function determineActiveCell(columnsArray, currencyStatusRef, tableData, hasMore, isPendingLayout, isEmbeddedSelect, hasFooters, currentCellOverride) {
|
|
454
|
-
if (isPendingLayout) {
|
|
455
|
-
return { type: 'pending' };
|
|
456
|
-
}
|
|
457
|
-
// if no columns are specified, it is a special case 'noData' display
|
|
458
|
-
const firstColumnKey = TableColGroup.getBoundaryColumnKey(columnsArray, true);
|
|
459
|
-
if (firstColumnKey == null) {
|
|
460
|
-
return { type: 'noData' };
|
|
461
|
-
}
|
|
462
|
-
// if nothing specifies where focus should go, use the first header cell
|
|
463
|
-
const defaultFirstCell = {
|
|
464
|
-
type: 'header',
|
|
465
|
-
columnKey: firstColumnKey
|
|
466
|
-
};
|
|
467
|
-
// when embedded select, use most recent non-null current cell value as override base
|
|
468
|
-
const currentCell = isEmbeddedSelect
|
|
469
|
-
? currencyStatusRef.current.previousEmbeddedSelectCurrentCell
|
|
470
|
-
: currencyStatusRef.current.currentCell;
|
|
471
|
-
if (currencyStatusRef.current.hasPendingCurrentCellOverride ||
|
|
472
|
-
currencyStatusRef.current.currentCellOverride !== currentCellOverride) {
|
|
473
|
-
if (currentCellOverride != null) {
|
|
474
|
-
// attempt to find the cell the override specifies
|
|
475
|
-
const realizedCell = _getCellFromCellOverride(tableData, columnsArray, currentCellOverride, currentCell);
|
|
476
|
-
if (realizedCell != null &&
|
|
477
|
-
_renderIncludesCell(realizedCell, columnsArray, tableData, hasMore, isPendingLayout, hasFooters)) {
|
|
478
|
-
return realizedCell;
|
|
479
|
-
}
|
|
480
|
-
// if here, the resulting cell from the override could not be determined or was not valid
|
|
481
|
-
const overrideCellType = _getCellTypeFromCellOverride(currentCellOverride, currentCell);
|
|
482
|
-
if (overrideCellType === 'data') {
|
|
483
|
-
if (tableData.length === 0 && hasMore) {
|
|
484
|
-
// pending 'data' override when 'loading' skeletons are shown
|
|
485
|
-
return { type: 'loading', columnKey: currentCell?.columnKey };
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
else if (overrideCellType === 'noData' && tableData.length === 0 && hasMore) {
|
|
489
|
-
// pending 'noData' override when 'loading' skeletons are shown
|
|
490
|
-
return { type: 'loading', columnKey: currentCell?.columnKey };
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
else if (_renderIncludesCell(defaultFirstCell, columnsArray, tableData, hasMore, isPendingLayout, hasFooters)) {
|
|
494
|
-
return defaultFirstCell;
|
|
495
|
-
}
|
|
496
|
-
else {
|
|
497
|
-
return undefined;
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
// if here, there is no current cell override that can be applied during this render
|
|
501
|
-
const activeCell = currencyStatusRef.current.activeCell;
|
|
502
|
-
if (activeCell != null) {
|
|
503
|
-
if (activeCell.type === 'loadMore') {
|
|
504
|
-
const initialData = currencyStatusRef.current.loadMoreInitialData;
|
|
505
|
-
// if loadMore skeletons are no longer shown, or the data has changed, shift to
|
|
506
|
-
// the next row in the data set if possible - otherwise just the closest row
|
|
507
|
-
if (tableData.length > 0 && tableData !== initialData) {
|
|
508
|
-
const rowKey = initialData != null && tableData.length > initialData.length
|
|
509
|
-
? tableData[initialData.length].metadata.key
|
|
510
|
-
: tableData[tableData.length - 1].metadata.key;
|
|
511
|
-
const columnKey = currentCell?.columnKey != null ? currentCell.columnKey : firstColumnKey;
|
|
512
|
-
const cell = { type: 'data', rowKey: rowKey, columnKey: columnKey };
|
|
513
|
-
if (_renderIncludesCell(cell, columnsArray, tableData, hasMore, isPendingLayout, hasFooters)) {
|
|
514
|
-
return cell;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
else if (tableData.length === 0) {
|
|
518
|
-
if (hasMore) {
|
|
519
|
-
return { type: 'loading', columnKey: currentCell?.columnKey };
|
|
520
|
-
}
|
|
521
|
-
else {
|
|
522
|
-
return { type: 'noData' };
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
if (_renderIncludesCell(activeCell, columnsArray, tableData, hasMore, isPendingLayout, hasFooters)) {
|
|
527
|
-
return activeCell;
|
|
528
|
-
}
|
|
529
|
-
else if (activeCell.type === 'loading') {
|
|
530
|
-
if (currentCell != null && (currentCell.type === 'data' || currentCell.type === 'noData')) {
|
|
531
|
-
// if the current cell is already set to 'data' or 'noData', and is now available, return it
|
|
532
|
-
if (_renderIncludesCell(currentCell, columnsArray, tableData, hasMore, isPendingLayout, hasFooters)) {
|
|
533
|
-
return currentCell;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
// otherwise, find the first row if available, and try and maintain the columnKey
|
|
537
|
-
if (tableData.length > 0) {
|
|
538
|
-
const rowKey = tableData[0].metadata.key;
|
|
539
|
-
const columnKey = currentCell?.columnKey != null ? currentCell.columnKey : firstColumnKey;
|
|
540
|
-
const cell = { type: 'data', rowKey: rowKey, columnKey: columnKey };
|
|
541
|
-
if (_renderIncludesCell(cell, columnsArray, tableData, hasMore, isPendingLayout, hasFooters)) {
|
|
542
|
-
return cell;
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
else {
|
|
546
|
-
return { type: 'noData' };
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
// if here, there is no active cell, or the active cell is no longer valid
|
|
551
|
-
if (currentCell != null) {
|
|
552
|
-
if (_renderIncludesCell(currentCell, columnsArray, tableData, hasMore, isPendingLayout, hasFooters)) {
|
|
553
|
-
return currentCell;
|
|
554
|
-
}
|
|
555
|
-
if (currentCell.type === 'data') {
|
|
556
|
-
if (tableData.length === 0 && hasMore) {
|
|
557
|
-
// pending 'data' override when 'loading' skeletons are shown
|
|
558
|
-
return { type: 'loading', columnKey: currentCell.columnKey };
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
else if (currentCell.type === 'noData' && tableData.length === 0 && hasMore) {
|
|
562
|
-
// pending 'noData' override when 'loading' skeletons are shown
|
|
563
|
-
return { type: 'loading', columnKey: firstColumnKey };
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
if (_renderIncludesCell(defaultFirstCell, columnsArray, tableData, hasMore, isPendingLayout, hasFooters)) {
|
|
567
|
-
return defaultFirstCell;
|
|
568
|
-
}
|
|
569
|
-
return undefined;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
const TOUCH_OFFSET_VALUE = 40;
|
|
573
|
-
const menuPropGestureStates = {
|
|
574
|
-
mouse: {
|
|
575
|
-
initialFocus: 'menu',
|
|
576
|
-
placement: 'bottom-start',
|
|
577
|
-
offsetValue: 2
|
|
578
|
-
},
|
|
579
|
-
keyboard: {
|
|
580
|
-
initialFocus: 'firstItem',
|
|
581
|
-
placement: 'bottom-start',
|
|
582
|
-
offsetValue: 0
|
|
583
|
-
},
|
|
584
|
-
touch: {
|
|
585
|
-
initialFocus: 'menu',
|
|
586
|
-
placement: 'end',
|
|
587
|
-
offsetValue: TOUCH_OFFSET_VALUE
|
|
588
|
-
}
|
|
589
|
-
};
|
|
590
|
-
const _initialMenuProps = {
|
|
591
|
-
isOpen: false,
|
|
592
|
-
initialFocus: 'menu',
|
|
593
|
-
placement: 'bottom-start',
|
|
594
|
-
offsetValue: 0,
|
|
595
|
-
anchorRef: { current: null }
|
|
596
|
-
};
|
|
597
|
-
const useContextMenu = (rootRef, tableId, tableData, columnsArray, contextMenuConfig, sortCriterion, onSortCriterionChange) => {
|
|
598
|
-
const [contextMenuContext, setContextMenuContext] = hooks.useState();
|
|
599
|
-
const [menuProps, setMenuProps] = hooks.useState(_initialMenuProps);
|
|
600
|
-
const currentCellElementRef = hooks.useRef();
|
|
601
|
-
const [isResizeDialogOpen, setIsResizeDialogOpen] = hooks.useState(false);
|
|
602
|
-
const { triggerProps } = useContextMenuGesture.useContextMenuGesture(({ gesture, anchor, target }) => {
|
|
603
|
-
if (rootRef.current) {
|
|
604
|
-
// find the cell element the menu is being launched from
|
|
605
|
-
const cellElement = target.closest(`[${TableColGroup.TABLE_FOCUSABLE_SELECTOR}='${tableId}']`);
|
|
606
|
-
if (cellElement != null) {
|
|
607
|
-
const targetCell = TableColGroup.logicalCellExtractor(cellElement, tableId, columnsArray);
|
|
608
|
-
if (targetCell != null) {
|
|
609
|
-
const cellContextMenuContext = getCellContextMenuContextFromCell(tableData, columnsArray, setIsResizeDialogOpen, targetCell, sortCriterion, onSortCriterionChange);
|
|
610
|
-
if (cellContextMenuContext != null) {
|
|
611
|
-
currentCellElementRef.current = cellElement;
|
|
612
|
-
const anchorBasedOnGesture = gesture === 'keyboard' ? cellElement : anchor;
|
|
613
|
-
setContextMenuContext(cellContextMenuContext);
|
|
614
|
-
setMenuProps({
|
|
615
|
-
...menuPropGestureStates[gesture],
|
|
616
|
-
anchorRef: { current: anchorBasedOnGesture },
|
|
617
|
-
isOpen: true
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
}, { isDisabled: !contextMenuConfig });
|
|
624
|
-
const handleCloseContextMenu = hooks.useCallback((detail) => {
|
|
625
|
-
// set focus back on the cell that was determined as the initial target
|
|
626
|
-
if (detail.reason === 'dismissed' || detail.reason === 'itemAction') {
|
|
627
|
-
currentCellElementRef.current?.focus({ preventScroll: true });
|
|
628
|
-
}
|
|
629
|
-
// close the menu
|
|
630
|
-
setMenuProps({ ..._initialMenuProps });
|
|
631
|
-
}, []);
|
|
632
|
-
return {
|
|
633
|
-
menuProps: { ...menuProps, onClose: handleCloseContextMenu },
|
|
634
|
-
contextMenuContext: contextMenuContext,
|
|
635
|
-
contextMenuTriggerProps: triggerProps,
|
|
636
|
-
isResizeDialogOpen: isResizeDialogOpen,
|
|
637
|
-
setIsResizeDialogOpen: setIsResizeDialogOpen
|
|
638
|
-
};
|
|
639
|
-
};
|
|
640
|
-
|
|
641
|
-
/**
|
|
642
|
-
* Browser zoom levels are not handled identically between Range sizes and Element sizes, so this offset
|
|
643
|
-
* should be used when comparing horizontal widths. Using a smaller value (0.01 for example) causes false
|
|
644
|
-
* positives, while using a larger value (0.05 for example) causes actual truncations to be missed.
|
|
645
|
-
*/
|
|
646
|
-
const HORIZONTAL_TRUNCATION_OFFSET = 0.015;
|
|
647
|
-
/**
|
|
648
|
-
* Default Redwood line-height overrides cause false positives as the Range sizes are always for a 'normal'
|
|
649
|
-
* line-height, and none of the default scale fonts have 'normal' line-height values. This causes offsets
|
|
650
|
-
* of between 0.5px and 1.5px. As a true truncation will cause an offset of closer to a full line height
|
|
651
|
-
* (at least 12px for 2xs text), use a larger offset value than the currently observed 1.5px max for safety.
|
|
652
|
-
*/
|
|
653
|
-
const VERTICAL_TRUNCATION_OFFSET = 5;
|
|
654
|
-
/**
|
|
655
|
-
* Helper method to determine if a given cell contains truncated text.
|
|
656
|
-
*/
|
|
657
|
-
const hasTruncatedText = (cellElement) => {
|
|
658
|
-
if (cellElement.getAttribute('data-oj-table-tooltip') !== 'enabled') {
|
|
659
|
-
return false;
|
|
660
|
-
}
|
|
661
|
-
const innerText = String(cellElement.innerText).trim();
|
|
662
|
-
if (innerText === '') {
|
|
663
|
-
return false;
|
|
664
|
-
}
|
|
665
|
-
const walker = document.createTreeWalker(cellElement, NodeFilter.SHOW_TEXT);
|
|
666
|
-
while (walker.nextNode()) {
|
|
667
|
-
const range = new Range();
|
|
668
|
-
const textNode = walker.currentNode;
|
|
669
|
-
range.selectNodeContents(textNode);
|
|
670
|
-
const untruncatedTextLength = range.getBoundingClientRect().width;
|
|
671
|
-
const untruncatedTextHeight = range.getBoundingClientRect().height;
|
|
672
|
-
let firstParent = true;
|
|
673
|
-
let parentElement = textNode.parentElement;
|
|
674
|
-
while (parentElement != null) {
|
|
675
|
-
const parentStyles = getComputedStyle(parentElement);
|
|
676
|
-
if (firstParent) {
|
|
677
|
-
// only verify truncation status of 'visible' text nodes
|
|
678
|
-
if (untruncatedTextLength === 0 || parentStyles.visibility === 'hidden') {
|
|
679
|
-
break;
|
|
680
|
-
}
|
|
681
|
-
firstParent = false;
|
|
682
|
-
}
|
|
683
|
-
const horizontalPadding = parseFloat(parentStyles.paddingLeft) + parseFloat(parentStyles.paddingRight);
|
|
684
|
-
const horizontalBorder = parseFloat(parentStyles.borderLeft) + parseFloat(parentStyles.borderRight);
|
|
685
|
-
const renderedTextLength = parentElement.getBoundingClientRect().width - horizontalPadding - horizontalBorder;
|
|
686
|
-
const verticalPadding = parseFloat(parentStyles.paddingTop) + parseFloat(parentStyles.paddingBottom);
|
|
687
|
-
const verticalBorder = parseFloat(parentStyles.borderTop) + parseFloat(parentStyles.borderBottom);
|
|
688
|
-
const renderedTextHeight = parentElement.getBoundingClientRect().height - verticalPadding - verticalBorder;
|
|
689
|
-
if (untruncatedTextLength - renderedTextLength > HORIZONTAL_TRUNCATION_OFFSET ||
|
|
690
|
-
untruncatedTextHeight - renderedTextHeight > VERTICAL_TRUNCATION_OFFSET) {
|
|
691
|
-
return true;
|
|
692
|
-
}
|
|
693
|
-
if (parentElement === cellElement) {
|
|
694
|
-
break;
|
|
695
|
-
}
|
|
696
|
-
parentElement = parentElement.parentElement;
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
return false;
|
|
700
|
-
};
|
|
701
|
-
/**
|
|
702
|
-
* Helper function to handle updating the Table's tooltip due to a focus navigation gesture.
|
|
703
|
-
*/
|
|
704
|
-
function handleNavigationTooltipGesture(rootElement, tableId, cell, showTooltip, hideTooltip) {
|
|
705
|
-
hideTooltip(true);
|
|
706
|
-
if (cell.type === 'data' || cell.type === 'header' || cell.type === 'footer') {
|
|
707
|
-
const cellElement = TableColGroup.getElementFromCell(rootElement, tableId, cell);
|
|
708
|
-
if (cellElement != null) {
|
|
709
|
-
showTooltip(cell);
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
/**
|
|
714
|
-
* Helper function to handle updating the Table's tooltip due to a pointer move gesture.
|
|
715
|
-
*/
|
|
716
|
-
function handleMoveTooltipGesture(tableId, columnsArray, event, showTooltip, hideTooltip, tooltipId) {
|
|
717
|
-
let tooltipShown = false;
|
|
718
|
-
const targetElement = event.relatedTarget;
|
|
719
|
-
if (targetElement != null && targetElement.closest(`#${tooltipId}`) != null) {
|
|
720
|
-
return;
|
|
721
|
-
}
|
|
722
|
-
const cellElement = event.target.closest(`[${TableColGroup.TABLE_FOCUSABLE_SELECTOR}='${tableId}']`);
|
|
723
|
-
if (cellElement != null) {
|
|
724
|
-
const type = ScrollUtils.getCellType(cellElement);
|
|
725
|
-
if (type === 'data' || type === 'header' || type === 'footer') {
|
|
726
|
-
showTooltip(TableColGroup.logicalCellExtractor(cellElement, tableId, columnsArray));
|
|
727
|
-
tooltipShown = true;
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
if (!tooltipShown) {
|
|
731
|
-
hideTooltip();
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
/**
|
|
735
|
-
* Helper function to handle updating the Table's tooltip due to a pointer leave gesture.
|
|
736
|
-
*/
|
|
737
|
-
const handleLeaveTableTooltipGesture = (rootElement, event, hideTooltip, tooltipId) => {
|
|
738
|
-
const targetElement = event.relatedTarget;
|
|
739
|
-
if (targetElement != null && targetElement.closest(`#${tooltipId}`) != null) {
|
|
740
|
-
// the pointer 'left' the table, but is only over a cell tooltip - in most cases, we want
|
|
741
|
-
// to just return here as the pointer is still 'over' the table. however, this can also
|
|
742
|
-
// occur when the pointer is technically outside of the table's bounds, and in that case
|
|
743
|
-
// we don't actually want to return as we should clear out our cell tooltip as expected
|
|
744
|
-
const boundingRect = rootElement.getBoundingClientRect();
|
|
745
|
-
const isOutOfBounds = event.clientX < boundingRect.left ||
|
|
746
|
-
event.clientX > boundingRect.right ||
|
|
747
|
-
event.clientY < boundingRect.top ||
|
|
748
|
-
event.clientY > boundingRect.bottom;
|
|
749
|
-
if (!isOutOfBounds) {
|
|
750
|
-
return;
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
hideTooltip();
|
|
754
|
-
};
|
|
755
|
-
|
|
756
|
-
// delay small interaction times concerning a tooltip
|
|
757
|
-
const SMALL_INTERACTION_DELAY = 50;
|
|
758
|
-
const TABLE_HIDE_TOOLTIP_DELAY = Math.max(Math.min(tooltipUtils.SHOW_TOOLTIP_DELAY - SMALL_INTERACTION_DELAY, tooltipUtils.HIDE_TOOLTIP_DELAY), 0);
|
|
759
|
-
/**
|
|
760
|
-
* Hook that manages cell template tooltip interactions on the Table when truncation is present.
|
|
761
|
-
*/
|
|
762
|
-
function useTruncationTooltip({ rootRef, tableId, resizeInfoRef }) {
|
|
763
|
-
const globalTooltipManager = tooltipUtils.getGlobalTooltipManager();
|
|
764
|
-
const tooltipId = useId.useId();
|
|
765
|
-
const tooltipCellRef = hooks.useRef();
|
|
766
|
-
const pendingShowTooltipCellRef = hooks.useRef();
|
|
767
|
-
const tooltipAnchorRef = hooks.useRef();
|
|
768
|
-
const tooltipTextRef = hooks.useRef();
|
|
769
|
-
const [tooltipText, setTooltipText] = hooks.useState();
|
|
770
|
-
const pointerDownRef = hooks.useRef(false);
|
|
771
|
-
const pointerDownTimeoutRef = hooks.useRef();
|
|
772
|
-
const showTooltipTimeoutRef = hooks.useRef();
|
|
773
|
-
const hideTooltipTimeoutRef = hooks.useRef();
|
|
774
|
-
// helper method for clearing the hide tooltip timeout
|
|
775
|
-
const _clearHideTooltipTimeout = hooks.useCallback(() => {
|
|
776
|
-
clearTimeout(hideTooltipTimeoutRef.current);
|
|
777
|
-
hideTooltipTimeoutRef.current = undefined;
|
|
778
|
-
}, []);
|
|
779
|
-
// helper method for clearing the show tooltip timeout
|
|
780
|
-
const _clearShowTooltipTimeout = hooks.useCallback(() => {
|
|
781
|
-
clearTimeout(showTooltipTimeoutRef.current);
|
|
782
|
-
showTooltipTimeoutRef.current = undefined;
|
|
783
|
-
pendingShowTooltipCellRef.current = undefined;
|
|
784
|
-
}, []);
|
|
785
|
-
// helper method for setting up the show tooltip timeout
|
|
786
|
-
const _setupShowTooltipTimeout = hooks.useCallback(() => {
|
|
787
|
-
showTooltipTimeoutRef.current = setTimeout(function () {
|
|
788
|
-
// when showing a tooltip, clear any pending 'clear tooltip timeouts'
|
|
789
|
-
if (hideTooltipTimeoutRef.current != null) {
|
|
790
|
-
_clearHideTooltipTimeout();
|
|
791
|
-
}
|
|
792
|
-
// only show a tooltip if not currently performing a column resize gesture
|
|
793
|
-
if (!resizeInfoRef.current.isResizing) {
|
|
794
|
-
showTooltipTimeoutRef.current = undefined;
|
|
795
|
-
const cell = pendingShowTooltipCellRef.current;
|
|
796
|
-
const rootElement = rootRef.current;
|
|
797
|
-
if (rootElement != null && cell != null) {
|
|
798
|
-
const cellElement = TableColGroup.getElementFromCell(rootElement, tableId, cell);
|
|
799
|
-
if (cellElement != null && hasTruncatedText(cellElement)) {
|
|
800
|
-
setTooltipText(String(cellElement.innerText).trim());
|
|
801
|
-
tooltipAnchorRef.current = cellElement;
|
|
802
|
-
tooltipCellRef.current = cell;
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
pendingShowTooltipCellRef.current = undefined;
|
|
807
|
-
}, tooltipUtils.SHOW_TOOLTIP_DELAY);
|
|
808
|
-
}, [rootRef, tableId, resizeInfoRef, _clearHideTooltipTimeout]);
|
|
809
|
-
// helper method for setting up the hide tooltip timeout
|
|
810
|
-
const _setupHideTooltipTimeout = hooks.useCallback(() => {
|
|
811
|
-
hideTooltipTimeoutRef.current = setTimeout(function () {
|
|
812
|
-
// unlike in the showtooltip timeout logic, we do not want to clear
|
|
813
|
-
// pending show tooltip timeouts when clearing a tooltip as it could
|
|
814
|
-
// still be waiting to be shown in another location at this time
|
|
815
|
-
hideTooltipTimeoutRef.current = undefined;
|
|
816
|
-
setTooltipText(undefined);
|
|
817
|
-
tooltipAnchorRef.current = undefined;
|
|
818
|
-
tooltipCellRef.current = undefined;
|
|
819
|
-
}, TABLE_HIDE_TOOLTIP_DELAY);
|
|
820
|
-
}, []);
|
|
821
|
-
// callback method to signal a tooltip is desired on the given cell
|
|
822
|
-
const showTooltip = hooks.useCallback((anchorCell) => {
|
|
823
|
-
if (cellComparator(tooltipCellRef.current, anchorCell)) {
|
|
824
|
-
// if the tooltip is already showing in the right cell, clear all timeouts
|
|
825
|
-
if (showTooltipTimeoutRef.current != null) {
|
|
826
|
-
_clearShowTooltipTimeout();
|
|
827
|
-
}
|
|
828
|
-
if (hideTooltipTimeoutRef.current != null) {
|
|
829
|
-
_clearHideTooltipTimeout();
|
|
830
|
-
}
|
|
831
|
-
return;
|
|
832
|
-
}
|
|
833
|
-
if (showTooltipTimeoutRef.current == null) {
|
|
834
|
-
// if no tooltip is already pending, start a new tooltip timeout
|
|
835
|
-
pendingShowTooltipCellRef.current = anchorCell;
|
|
836
|
-
_setupShowTooltipTimeout();
|
|
837
|
-
}
|
|
838
|
-
else if (!cellComparator(pendingShowTooltipCellRef.current, anchorCell)) {
|
|
839
|
-
// if a different tooltip is already pending, start a new tooltip timeout
|
|
840
|
-
_clearShowTooltipTimeout();
|
|
841
|
-
pendingShowTooltipCellRef.current = anchorCell;
|
|
842
|
-
_setupShowTooltipTimeout();
|
|
843
|
-
}
|
|
844
|
-
if (tooltipCellRef.current != null && hideTooltipTimeoutRef.current == null) {
|
|
845
|
-
// if the tooltip is showing on a different cell, ensure a hide timeout is setup
|
|
846
|
-
_setupHideTooltipTimeout();
|
|
847
|
-
}
|
|
848
|
-
}, [
|
|
849
|
-
_setupShowTooltipTimeout,
|
|
850
|
-
_setupHideTooltipTimeout,
|
|
851
|
-
_clearShowTooltipTimeout,
|
|
852
|
-
_clearHideTooltipTimeout
|
|
853
|
-
]);
|
|
854
|
-
// callback method to signal the current tooltip is no longer desired
|
|
855
|
-
const hideTooltip = hooks.useCallback((isImmediate) => {
|
|
856
|
-
// ignore hide tooltip calls if due to focus loss from a pointer down on the tooltip itself
|
|
857
|
-
if (pointerDownRef.current) {
|
|
858
|
-
return;
|
|
859
|
-
}
|
|
860
|
-
if (showTooltipTimeoutRef.current != null) {
|
|
861
|
-
_clearShowTooltipTimeout();
|
|
862
|
-
}
|
|
863
|
-
if (isImmediate) {
|
|
864
|
-
if (hideTooltipTimeoutRef.current != null) {
|
|
865
|
-
_clearHideTooltipTimeout();
|
|
866
|
-
}
|
|
867
|
-
setTooltipText(undefined);
|
|
868
|
-
tooltipAnchorRef.current = undefined;
|
|
869
|
-
tooltipCellRef.current = undefined;
|
|
870
|
-
}
|
|
871
|
-
else if (hideTooltipTimeoutRef.current == null) {
|
|
872
|
-
_setupHideTooltipTimeout();
|
|
873
|
-
}
|
|
874
|
-
}, [_setupHideTooltipTimeout, _clearShowTooltipTimeout, _clearHideTooltipTimeout]);
|
|
875
|
-
// Pointer move handler for the tooltip.
|
|
876
|
-
const _pointerMoveHandler = hooks.useCallback((_event) => {
|
|
877
|
-
if (showTooltipTimeoutRef.current != null) {
|
|
878
|
-
clearTimeout(showTooltipTimeoutRef.current);
|
|
879
|
-
showTooltipTimeoutRef.current = undefined;
|
|
880
|
-
pendingShowTooltipCellRef.current = undefined;
|
|
881
|
-
}
|
|
882
|
-
if (hideTooltipTimeoutRef.current != null) {
|
|
883
|
-
clearTimeout(hideTooltipTimeoutRef.current);
|
|
884
|
-
hideTooltipTimeoutRef.current = undefined;
|
|
885
|
-
}
|
|
886
|
-
}, []);
|
|
887
|
-
// Pointer leave handler for the tooltip.
|
|
888
|
-
const _pointerLeaveHandler = hooks.useCallback((event) => {
|
|
889
|
-
const targetElement = event.relatedTarget;
|
|
890
|
-
if (targetElement != null && targetElement.closest(`#${tableId}`) != null) {
|
|
891
|
-
return;
|
|
892
|
-
}
|
|
893
|
-
hideTooltip();
|
|
894
|
-
}, [tableId, hideTooltip]);
|
|
895
|
-
// Pointer down handler for the tooltip.
|
|
896
|
-
const _pointerDownHandler = hooks.useCallback((_event) => {
|
|
897
|
-
pointerDownRef.current = true;
|
|
898
|
-
if (pointerDownTimeoutRef.current != null) {
|
|
899
|
-
clearTimeout(pointerDownTimeoutRef.current);
|
|
900
|
-
}
|
|
901
|
-
pointerDownTimeoutRef.current = setTimeout(function () {
|
|
902
|
-
pointerDownRef.current = false;
|
|
903
|
-
pointerDownTimeoutRef.current = undefined;
|
|
904
|
-
}, SMALL_INTERACTION_DELAY);
|
|
905
|
-
}, []);
|
|
906
|
-
// handles logic involving competing tooltips managed outside of the TableView.
|
|
907
|
-
// make sure this check runs BEFORE the rendered content is created below
|
|
908
|
-
const isOpenOverrideRef = hooks.useRef(true);
|
|
909
|
-
if (tooltipText != null && tooltipText !== tooltipTextRef.current) {
|
|
910
|
-
isOpenOverrideRef.current = true;
|
|
911
|
-
}
|
|
912
|
-
const tooltipPointerProps = {
|
|
913
|
-
onPointerLeave: _pointerLeaveHandler,
|
|
914
|
-
onPointerMove: _pointerMoveHandler,
|
|
915
|
-
onPointerDown: _pointerDownHandler
|
|
916
|
-
};
|
|
917
|
-
// avoid applying undefined text after initial render completes as it can appear
|
|
918
|
-
// while the tooltip is going through its closing animation and looks broken
|
|
919
|
-
const renderRawContent = (jsxRuntime.jsx(useTooltipControlled.TooltipContent, { ...tooltipPointerProps, id: tooltipId, isOpen: isOpenOverrideRef.current, isDatatip: false, children: tooltipText != null ? tooltipText : tooltipTextRef.current }));
|
|
920
|
-
// make sure these are in sync AFTER the rendered content is created above - this helps ensure
|
|
921
|
-
// that empty text does not show up while the tooltip is going through a closing animation.
|
|
922
|
-
tooltipTextRef.current = tooltipText;
|
|
923
|
-
// offsets attempt to show the tooltip without overlapping content of nearby cells
|
|
924
|
-
const scale = useScale.useScale();
|
|
925
|
-
let mainAxisOffset = -8;
|
|
926
|
-
let crossAxisOffset = -14;
|
|
927
|
-
if (scale === 'md') {
|
|
928
|
-
mainAxisOffset = -7;
|
|
929
|
-
crossAxisOffset = -12;
|
|
930
|
-
}
|
|
931
|
-
else if (scale === 'sm') {
|
|
932
|
-
mainAxisOffset = -6;
|
|
933
|
-
crossAxisOffset = -11;
|
|
934
|
-
}
|
|
935
|
-
const currentColorScheme = useColorScheme.useColorScheme();
|
|
936
|
-
const tooltipContent = tooltipAnchorRef.current != null
|
|
937
|
-
? tooltipUtils.getWrappedTooltipContent(renderRawContent, 'tooltip', currentColorScheme, tooltipAnchorRef, 'end-top', { mainAxis: mainAxisOffset, crossAxis: crossAxisOffset })
|
|
938
|
-
: undefined;
|
|
939
|
-
const destroyCallback = hooks.useCallback(() => {
|
|
940
|
-
hideTooltip(true);
|
|
941
|
-
}, [hideTooltip]);
|
|
942
|
-
hooks.useEffect(() => {
|
|
943
|
-
if (isOpenOverrideRef.current && tooltipAnchorRef.current != null) {
|
|
944
|
-
globalTooltipManager.register(destroyCallback);
|
|
945
|
-
}
|
|
946
|
-
else {
|
|
947
|
-
globalTooltipManager.unregister(destroyCallback);
|
|
948
|
-
}
|
|
949
|
-
}, [tooltipAnchorRef, destroyCallback, tooltipText, globalTooltipManager]);
|
|
950
|
-
return { tooltipContent, tooltipId, showTooltip, hideTooltip, tooltipAnchorRef };
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
// constant timeout values for delays following a input gesture until enabling focus rings
|
|
954
|
-
const MOUSE_FOCUS_SHIFT_TIMEOUT = 100;
|
|
955
|
-
const TOUCH_FOCUS_SHIFT_TIMEOUT = 200;
|
|
956
|
-
// constant event.key values that trigger focus ring logic
|
|
957
|
-
const NAVIGATION_KEYS = [
|
|
958
|
-
' ',
|
|
959
|
-
'F2',
|
|
960
|
-
'Enter',
|
|
961
|
-
'Esc', // Firefox 36 and earlier uses 'Esc' instead of 'Escape'
|
|
962
|
-
'Escape',
|
|
963
|
-
'ArrowLeft',
|
|
964
|
-
'ArrowUp',
|
|
965
|
-
'ArrowRight',
|
|
966
|
-
'ArrowDown',
|
|
967
|
-
'Home',
|
|
968
|
-
'End',
|
|
969
|
-
'PageUp',
|
|
970
|
-
'PageDown'
|
|
971
|
-
];
|
|
972
|
-
// constant event.key values that trigger 'scroll to current' logic
|
|
973
|
-
const SCROLL_KEYS = [
|
|
974
|
-
' ',
|
|
975
|
-
'F2',
|
|
976
|
-
'Enter',
|
|
977
|
-
'Esc', // Firefox 36 and earlier uses 'Esc' instead of 'Escape'
|
|
978
|
-
'Escape'
|
|
979
|
-
];
|
|
980
|
-
/**
|
|
981
|
-
* Hook that manages focus interactions on the Preact Table
|
|
982
|
-
*/
|
|
983
|
-
function useFocusHandling({ rootRef, viewportInfo, tableId, isRtl, tableData, hasMore, hasFooters, columnsArray, stickyColumnInfo, sizingInfoRef, overflowInfoRef, selectionExtensionElementRef, cellSupportsTabbable, appliedColumnWidths, currentCellOverride, onPersistCurrentCell, showTooltip, hideTooltip, isPendingLayout, isEmbedded, isDataLoaded }) {
|
|
984
|
-
// tracks whether the most recent 'blur' was caused by focus being lost by the browser window (or iframe)
|
|
985
|
-
// used when determining whether scrolling active into view should be skipped when focus is regained
|
|
986
|
-
const blurFromWindowRef = hooks.useRef(false);
|
|
987
|
-
// tracks whether a keydown 'tab' is currently detected - used when handling a keyup 'tab' event to scroll
|
|
988
|
-
// the active cell into view in the event that focus is received from outside of the page (or iframe)
|
|
989
|
-
const isTabDownDetectedRef = hooks.useRef(false);
|
|
990
|
-
// tracks focus loss during render cycle for potential focus recapture cases
|
|
991
|
-
const isRenderCycle = hooks.useRef(true);
|
|
992
|
-
isRenderCycle.current = true;
|
|
993
|
-
const blurredRenderCycleElementRef = hooks.useRef(null);
|
|
994
|
-
const isPendingLayoutFocusRef = hooks.useRef(false);
|
|
995
|
-
// track current 'focus info' state
|
|
996
|
-
const hasFocusRef = hooks.useRef(false);
|
|
997
|
-
const [isTabbableMode, setIsTabbableMode] = hooks.useState(false);
|
|
998
|
-
const [isShowFocusRing, setIsShowFocusRing] = hooks.useState(false);
|
|
999
|
-
// track pointer down information
|
|
1000
|
-
const recentPointerRef = hooks.useRef(false);
|
|
1001
|
-
const pointerTimerRef = hooks.useRef(null);
|
|
1002
|
-
const isShowFocusRingOverrideRef = hooks.useRef(null);
|
|
1003
|
-
// track the active and current cell information
|
|
1004
|
-
const [activeCell, setActiveCell] = hooks.useState(undefined);
|
|
1005
|
-
const currencyStatusRef = hooks.useRef({
|
|
1006
|
-
hasPendingCurrentCellOverride: false,
|
|
1007
|
-
hasPendingCurrentCellOverrideScroll: false
|
|
1008
|
-
});
|
|
1009
|
-
// track pending scrolls to minimize 'flash' of focus rings when scrolling
|
|
1010
|
-
const [deferredScrollDetail, setDeferredScrollDetail] = hooks.useState(undefined);
|
|
1011
|
-
const deferredScrollDetailRef = hooks.useRef();
|
|
1012
|
-
// keep state and ref in-sync to avoid edge cases where a gesture updating the scroll detail is handled
|
|
1013
|
-
// inbetween a render cycle that changes the scroll detail and the useEffect that applies the detail
|
|
1014
|
-
const updateDeferredScrollDetail = hooks.useCallback((scrollDetail) => {
|
|
1015
|
-
setDeferredScrollDetail(scrollDetail);
|
|
1016
|
-
deferredScrollDetailRef.current = scrollDetail;
|
|
1017
|
-
}, []);
|
|
1018
|
-
const wasTransient = isTransientCell(currencyStatusRef.current.activeCell);
|
|
1019
|
-
const currentActiveCell = determineActiveCell(columnsArray, currencyStatusRef, tableData, hasMore, isPendingLayout, isEmbedded, hasFooters, currentCellOverride);
|
|
1020
|
-
// intercept onPersistCurrentCell calls to ensure internal state is updated appropriately
|
|
1021
|
-
const onActiveCellChanged = hooks.useMemo(() => {
|
|
1022
|
-
return (detail, isAutoFocus, isSelectionExtension, skipScrollCellIntoView) => {
|
|
1023
|
-
const newActiveCell = detail.value;
|
|
1024
|
-
if (!cellComparator(currencyStatusRef.current.activeCell, newActiveCell)) {
|
|
1025
|
-
setActiveCell(newActiveCell);
|
|
1026
|
-
currencyStatusRef.current.activeCell = newActiveCell;
|
|
1027
|
-
if (!isTransientCell(newActiveCell)) {
|
|
1028
|
-
const newCurrentCell = newActiveCell;
|
|
1029
|
-
// only update current cell when 'active' is not one of the transient 'skeleton' regions
|
|
1030
|
-
if (onPersistCurrentCell != null) {
|
|
1031
|
-
onPersistCurrentCell({ value: newCurrentCell });
|
|
1032
|
-
}
|
|
1033
|
-
currencyStatusRef.current.currentCell = newCurrentCell;
|
|
1034
|
-
// make sure pending current cell override states are updated on current changed
|
|
1035
|
-
if (newCurrentCell != null) {
|
|
1036
|
-
currencyStatusRef.current.previousEmbeddedSelectCurrentCell = newCurrentCell;
|
|
1037
|
-
}
|
|
1038
|
-
currencyStatusRef.current.currentCellOverride = currentCellOverride;
|
|
1039
|
-
currencyStatusRef.current.hasPendingCurrentCellOverride = false;
|
|
1040
|
-
currencyStatusRef.current.hasPendingCurrentCellOverrideScroll = false;
|
|
1041
|
-
}
|
|
1042
|
-
else if (newActiveCell?.type === 'loadMore') {
|
|
1043
|
-
currencyStatusRef.current.loadMoreInitialData = tableData;
|
|
1044
|
-
}
|
|
1045
|
-
if (!isSelectionExtension) {
|
|
1046
|
-
selectionExtensionElementRef.current = undefined;
|
|
1047
|
-
if (isAutoFocus && newActiveCell != null && cellSupportsTabbable(newActiveCell)) {
|
|
1048
|
-
// attempt to auto-focus cell contents
|
|
1049
|
-
setIsTabbableMode(true);
|
|
1050
|
-
setIsShowFocusRing(false);
|
|
1051
|
-
}
|
|
1052
|
-
else if (isTabbableMode) {
|
|
1053
|
-
// exit tabbable mode when navigating away from auto-focus cell
|
|
1054
|
-
setIsTabbableMode(false);
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
|
-
if (newActiveCell != null && !recentPointerRef.current && !skipScrollCellIntoView) {
|
|
1059
|
-
updateDeferredScrollDetail({
|
|
1060
|
-
cell: newActiveCell,
|
|
1061
|
-
locationX: 'inView',
|
|
1062
|
-
locationY: 'inView'
|
|
1063
|
-
});
|
|
1064
|
-
}
|
|
1065
|
-
};
|
|
1066
|
-
}, [
|
|
1067
|
-
currentCellOverride,
|
|
1068
|
-
isTabbableMode,
|
|
1069
|
-
cellSupportsTabbable,
|
|
1070
|
-
tableData,
|
|
1071
|
-
onPersistCurrentCell,
|
|
1072
|
-
selectionExtensionElementRef,
|
|
1073
|
-
updateDeferredScrollDetail
|
|
1074
|
-
]);
|
|
1075
|
-
// Helper function to set the Table's focus tracking state to reflect that it is inactive.
|
|
1076
|
-
const _setAsInactive = hooks.useCallback(() => {
|
|
1077
|
-
hasFocusRef.current = false;
|
|
1078
|
-
isPendingLayoutFocusRef.current = false;
|
|
1079
|
-
setIsTabbableMode(false);
|
|
1080
|
-
setIsShowFocusRing(false);
|
|
1081
|
-
hideTooltip();
|
|
1082
|
-
}, [hideTooltip]);
|
|
1083
|
-
// Helper function to set the Table's focus tracking state to reflect that one of its cells has focus.
|
|
1084
|
-
const _enableNavigationMode = hooks.useCallback((cell, skipScrollCellIntoView) => {
|
|
1085
|
-
const rootElement = rootRef.current;
|
|
1086
|
-
const scrollerElement = viewportInfo.viewportConfig.scrollerRef.current;
|
|
1087
|
-
if (rootElement != null && scrollerElement != null) {
|
|
1088
|
-
setIsTabbableMode(false);
|
|
1089
|
-
const focusRingState = isShowFocusRingOverrideRef.current !== null
|
|
1090
|
-
? isShowFocusRingOverrideRef.current
|
|
1091
|
-
: !recentPointerRef.current;
|
|
1092
|
-
setIsShowFocusRing(focusRingState);
|
|
1093
|
-
if (focusRingState) {
|
|
1094
|
-
handleNavigationTooltipGesture(rootElement, tableId, cell, showTooltip, hideTooltip);
|
|
1095
|
-
}
|
|
1096
|
-
onActiveCellChanged({ value: cell }, false, false, skipScrollCellIntoView);
|
|
1097
|
-
}
|
|
1098
|
-
}, [rootRef, viewportInfo, tableId, onActiveCellChanged, showTooltip, hideTooltip]);
|
|
1099
|
-
// Helper function to set the Table's focus tracking state to reflect that it is tabbable.
|
|
1100
|
-
const _enableTabbableMode = hooks.useCallback((cell, isKeyboard, skipScrollCellIntoView) => {
|
|
1101
|
-
const rootElement = rootRef.current;
|
|
1102
|
-
const scrollerElement = viewportInfo.viewportConfig.scrollerRef.current;
|
|
1103
|
-
if (rootElement != null && scrollerElement != null) {
|
|
1104
|
-
setIsTabbableMode(true);
|
|
1105
|
-
if (!isKeyboard) {
|
|
1106
|
-
setIsShowFocusRing(false);
|
|
1107
|
-
onActiveCellChanged({ value: cell }, true, false, skipScrollCellIntoView);
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
}, [rootRef, viewportInfo, onActiveCellChanged]);
|
|
1111
|
-
// Helper function to set the Table's focus tracking state to reflect that a user has
|
|
1112
|
-
// exited tabbable mode via the keyboard (esc or 'F2')
|
|
1113
|
-
const _disableTabbableMode = hooks.useCallback((cell) => {
|
|
1114
|
-
const rootElement = rootRef.current;
|
|
1115
|
-
if (rootElement != null) {
|
|
1116
|
-
setIsTabbableMode(false);
|
|
1117
|
-
const cellElement = TableColGroup.getElementFromCell(rootElement, tableId, cell);
|
|
1118
|
-
if (cellElement != null) {
|
|
1119
|
-
cellElement.focus({ preventScroll: true });
|
|
1120
|
-
}
|
|
1121
|
-
else {
|
|
1122
|
-
rootElement.focus({ preventScroll: true });
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
}, [rootRef, tableId]);
|
|
1126
|
-
const notifyFocusFromPointer = hooks.useCallback((isTouch) => {
|
|
1127
|
-
if (pointerTimerRef.current != null) {
|
|
1128
|
-
clearTimeout(pointerTimerRef.current);
|
|
1129
|
-
}
|
|
1130
|
-
recentPointerRef.current = true;
|
|
1131
|
-
pointerTimerRef.current = setTimeout(() => {
|
|
1132
|
-
recentPointerRef.current = false;
|
|
1133
|
-
}, isTouch ? TOUCH_FOCUS_SHIFT_TIMEOUT : MOUSE_FOCUS_SHIFT_TIMEOUT);
|
|
1134
|
-
}, []);
|
|
1135
|
-
// PointerDown handler for the outer Table. Focus transfers that occur following a pointerdown
|
|
1136
|
-
// on desktop devices should not result in a focus ring being shown on the focused element
|
|
1137
|
-
const _pointerDownHandler = hooks.useCallback((event) => {
|
|
1138
|
-
if (isShowFocusRing) {
|
|
1139
|
-
setIsShowFocusRing(false);
|
|
1140
|
-
}
|
|
1141
|
-
if (event.pointerType !== 'touch') {
|
|
1142
|
-
notifyFocusFromPointer(false);
|
|
1143
|
-
}
|
|
1144
|
-
}, [isShowFocusRing, notifyFocusFromPointer]);
|
|
1145
|
-
// PointerUp handler for the outer Table. Focus transfers that occur following a pointerup
|
|
1146
|
-
// on any type of device should not result in a focus ring being shown on the focused element
|
|
1147
|
-
const _pointerUpHandler = hooks.useCallback((event) => {
|
|
1148
|
-
notifyFocusFromPointer(event.pointerType === 'touch');
|
|
1149
|
-
}, [notifyFocusFromPointer]);
|
|
1150
|
-
// Focus handler for the outer Table. On focus, a focusable area needs to be 'active'.
|
|
1151
|
-
// If an 'active' area already exists, nothing further is needed. Otherwise, the first
|
|
1152
|
-
// focusable element should be made 'active'.
|
|
1153
|
-
const _onFocusHandler = (event) => {
|
|
1154
|
-
hasFocusRef.current = true;
|
|
1155
|
-
const rootElement = rootRef.current;
|
|
1156
|
-
const scrollerElement = viewportInfo.viewportConfig.scrollerRef.current;
|
|
1157
|
-
if (rootElement != null) {
|
|
1158
|
-
// don't scroll active into view if previous blur was due to window focus loss
|
|
1159
|
-
const skipScrollCellIntoView = blurFromWindowRef.current || isPendingLayout;
|
|
1160
|
-
blurFromWindowRef.current = false;
|
|
1161
|
-
const targetElement = event.target;
|
|
1162
|
-
if (targetElement === rootElement || targetElement === scrollerElement) {
|
|
1163
|
-
if (currentActiveCell != null) {
|
|
1164
|
-
_enableNavigationMode(currentActiveCell, skipScrollCellIntoView);
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
else {
|
|
1168
|
-
const cell = TableColGroup.logicalCellExtractor(targetElement, tableId, columnsArray);
|
|
1169
|
-
if (cell != null) {
|
|
1170
|
-
if (ScrollUtils.getCellType(targetElement) != null) {
|
|
1171
|
-
// handle individual focusable regions receiving focus
|
|
1172
|
-
_enableNavigationMode(cell, skipScrollCellIntoView);
|
|
1173
|
-
}
|
|
1174
|
-
else {
|
|
1175
|
-
_enableTabbableMode(cell, false, skipScrollCellIntoView);
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
isShowFocusRingOverrideRef.current = null;
|
|
1181
|
-
};
|
|
1182
|
-
// Blur handler for the outer Table. When a blur is caused by the browser window itself
|
|
1183
|
-
// losing focus (changing tabs or leaving an iframe for example), an eventual re-focus due
|
|
1184
|
-
// to the window re-gaining focus needs to be handled differently (no auto-scroll mostly).
|
|
1185
|
-
const _onBlurHandler = hooks.useCallback((event) => {
|
|
1186
|
-
const rootElement = rootRef.current;
|
|
1187
|
-
if (rootElement != null) {
|
|
1188
|
-
if (event.target === document.activeElement) {
|
|
1189
|
-
// save focus ring state so it's set once focus comes back
|
|
1190
|
-
isShowFocusRingOverrideRef.current = isShowFocusRing;
|
|
1191
|
-
}
|
|
1192
|
-
const relatedTarget = event.relatedTarget;
|
|
1193
|
-
const isUnknownRelatedTarget = relatedTarget == null;
|
|
1194
|
-
blurFromWindowRef.current = isUnknownRelatedTarget;
|
|
1195
|
-
if (isUnknownRelatedTarget || !collectionUtils.getElementContainsFunc(rootElement, true)(relatedTarget)) {
|
|
1196
|
-
_setAsInactive();
|
|
1197
|
-
if (isRenderCycle.current) {
|
|
1198
|
-
// store element that loses focus during a render cycle for recapturing focus logic
|
|
1199
|
-
blurredRenderCycleElementRef.current = event.target;
|
|
1200
|
-
}
|
|
1201
|
-
// reset tab down detection when component loses focus
|
|
1202
|
-
isTabDownDetectedRef.current = false;
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
}, [rootRef, isShowFocusRing, _setAsInactive]);
|
|
1206
|
-
// KeyDown handler for the outer Table. This specific handler tracks 'focus' transfer keys
|
|
1207
|
-
// Esc, F2, Enter, and Tab. It also ensures the active cell is scrolled into view on any key
|
|
1208
|
-
const _onKeyDownHandler = hooks.useCallback((event) => {
|
|
1209
|
-
if (event.key === 'Tab') {
|
|
1210
|
-
isTabDownDetectedRef.current = true;
|
|
1211
|
-
}
|
|
1212
|
-
const rootElement = rootRef.current;
|
|
1213
|
-
const scrollerElement = viewportInfo.viewportConfig.scrollerRef.current;
|
|
1214
|
-
if (rootElement != null && scrollerElement != null) {
|
|
1215
|
-
const isNavigationKey = NAVIGATION_KEYS.indexOf(event.key) > -1;
|
|
1216
|
-
if (isNavigationKey) {
|
|
1217
|
-
if (pointerTimerRef.current != null) {
|
|
1218
|
-
clearTimeout(pointerTimerRef.current);
|
|
1219
|
-
}
|
|
1220
|
-
pointerTimerRef.current = null;
|
|
1221
|
-
recentPointerRef.current = false;
|
|
1222
|
-
}
|
|
1223
|
-
if (isPendingLayout) {
|
|
1224
|
-
if (isNavigationKey) {
|
|
1225
|
-
setIsShowFocusRing(true);
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
else if (activeCell != null) {
|
|
1229
|
-
if (cellSupportsTabbable(activeCell)) {
|
|
1230
|
-
if (event.key === 'F2') {
|
|
1231
|
-
if (isTabbableMode) {
|
|
1232
|
-
_disableTabbableMode(activeCell);
|
|
1233
|
-
}
|
|
1234
|
-
else {
|
|
1235
|
-
_enableTabbableMode(activeCell, true);
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
else if (event.key === 'Esc' || event.key === 'Escape') {
|
|
1239
|
-
// Firefox 36 and earlier uses 'Esc' instead of 'Escape'
|
|
1240
|
-
_disableTabbableMode(activeCell);
|
|
1241
|
-
}
|
|
1242
|
-
else if (event.key === 'Enter' && !isTabbableMode && !isEmbedded) {
|
|
1243
|
-
_enableTabbableMode(activeCell, true);
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
if (!isTabbableMode) {
|
|
1247
|
-
if (isNavigationKey) {
|
|
1248
|
-
setIsShowFocusRing(true);
|
|
1249
|
-
}
|
|
1250
|
-
if (SCROLL_KEYS.indexOf(event.key) > -1) {
|
|
1251
|
-
updateDeferredScrollDetail({
|
|
1252
|
-
cell: activeCell,
|
|
1253
|
-
locationX: 'inView',
|
|
1254
|
-
locationY: 'inView'
|
|
1255
|
-
});
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
}, [
|
|
1261
|
-
rootRef,
|
|
1262
|
-
viewportInfo,
|
|
1263
|
-
isTabbableMode,
|
|
1264
|
-
isEmbedded,
|
|
1265
|
-
activeCell,
|
|
1266
|
-
cellSupportsTabbable,
|
|
1267
|
-
isPendingLayout,
|
|
1268
|
-
_enableTabbableMode,
|
|
1269
|
-
_disableTabbableMode,
|
|
1270
|
-
updateDeferredScrollDetail
|
|
1271
|
-
]);
|
|
1272
|
-
// KeyUp handler for the outer Table. This specific handler tracks the 'tab' key
|
|
1273
|
-
// It ensures the active cell is scrolled into view when tabbing into the component
|
|
1274
|
-
const _onKeyUpHandler = hooks.useCallback((event) => {
|
|
1275
|
-
if (event.key === 'Tab') {
|
|
1276
|
-
// if a keyup 'tab' event is detected without a matching keydown 'tab', scroll active
|
|
1277
|
-
// cell into view to handle case where focus is gained from outside the page (or iframe)
|
|
1278
|
-
if (activeCell != null && !isTabDownDetectedRef.current) {
|
|
1279
|
-
updateDeferredScrollDetail({
|
|
1280
|
-
cell: activeCell,
|
|
1281
|
-
locationX: 'inView',
|
|
1282
|
-
locationY: 'inView'
|
|
1283
|
-
});
|
|
1284
|
-
}
|
|
1285
|
-
isTabDownDetectedRef.current = false;
|
|
1286
|
-
}
|
|
1287
|
-
}, [activeCell, updateDeferredScrollDetail]);
|
|
1288
|
-
// Callback for the outer Table's FocusTracker usage.
|
|
1289
|
-
const onStartFocusTracking = hooks.useCallback((detail) => {
|
|
1290
|
-
const rootElement = rootRef.current;
|
|
1291
|
-
if (rootElement != null && activeCell != null) {
|
|
1292
|
-
collectionUtils.handleEnterActionableMode(detail.hasFocusWithin && ScrollUtils.getCellType(detail.activeElement) == null, tabbableUtils.allTabbableElements(TableColGroup.getElementFromCell(rootElement, tableId, activeCell)), (value) => {
|
|
1293
|
-
setIsTabbableMode(value != undefined);
|
|
1294
|
-
});
|
|
1295
|
-
}
|
|
1296
|
-
}, [rootRef, activeCell, tableId]);
|
|
1297
|
-
// Callback for the outer Table's FocusTracker usage.
|
|
1298
|
-
const onFocusStartEdge = hooks.useCallback((detail) => {
|
|
1299
|
-
collectionUtils.handleWrapActionableFocus(true, detail.tabbableElements, (value) => {
|
|
1300
|
-
setIsTabbableMode(value != undefined);
|
|
1301
|
-
});
|
|
1302
|
-
}, []);
|
|
1303
|
-
// Callback for the outer Table's FocusTracker usage.
|
|
1304
|
-
const onFocusEndEdge = hooks.useCallback((detail) => {
|
|
1305
|
-
collectionUtils.handleWrapActionableFocus(false, detail.tabbableElements, (value) => {
|
|
1306
|
-
setIsTabbableMode(value != undefined);
|
|
1307
|
-
});
|
|
1308
|
-
}, []);
|
|
1309
|
-
// Ensure focus is properly set at the completion of every render cycle
|
|
1310
|
-
// NO DEPENDENCY ARRAY HERE TO ENSURE THIS RUNS ON EVERY RENDER CYCLE
|
|
1311
|
-
hooks.useEffect(() => {
|
|
1312
|
-
const rootElement = rootRef.current;
|
|
1313
|
-
const scrollerElement = viewportInfo.viewportConfig.scrollerRef.current;
|
|
1314
|
-
if (rootElement != null && scrollerElement != null) {
|
|
1315
|
-
// internal method responsible for ensuring focus is applied to the appropriate cells or contents
|
|
1316
|
-
const _applyInternalFocus = (rootElement, activeElement, isCaptureFocus) => {
|
|
1317
|
-
if (currentActiveCell != null) {
|
|
1318
|
-
// ensure real browser focus is on the correct cell element
|
|
1319
|
-
const cellElement = TableColGroup.getElementFromCell(rootElement, tableId, currentActiveCell);
|
|
1320
|
-
if (cellElement != null) {
|
|
1321
|
-
if (isCaptureFocus) {
|
|
1322
|
-
TableColGroup.applyScrollDetail(rootElement, scrollerElement, viewportInfo, tableId, columnsArray, stickyColumnInfo, sizingInfoRef.current, overflowInfoRef.current, {
|
|
1323
|
-
cell: currentActiveCell,
|
|
1324
|
-
locationX: 'inView',
|
|
1325
|
-
locationY: 'inView'
|
|
1326
|
-
}, isRtl, appliedColumnWidths);
|
|
1327
|
-
}
|
|
1328
|
-
// cell is valid, so set focus on it if needed
|
|
1329
|
-
if (!isTabbableMode && activeElement !== cellElement) {
|
|
1330
|
-
if (wasTransient &&
|
|
1331
|
-
!isTransientCell(currentActiveCell) &&
|
|
1332
|
-
TableColGroup.isAutoFocusCell(rootElement, tableId, currentActiveCell) &&
|
|
1333
|
-
cellSupportsTabbable(currentActiveCell)) {
|
|
1334
|
-
_enableTabbableMode(currentActiveCell);
|
|
1335
|
-
}
|
|
1336
|
-
else {
|
|
1337
|
-
cellElement.focus({ preventScroll: true });
|
|
1338
|
-
}
|
|
1339
|
-
return;
|
|
1340
|
-
}
|
|
1341
|
-
else if (isTabbableMode &&
|
|
1342
|
-
!collectionUtils.getElementContainsFunc(cellElement, true)(activeElement)) {
|
|
1343
|
-
if (isCaptureFocus && !TableColGroup.isAutoFocusCell(rootElement, tableId, currentActiveCell)) {
|
|
1344
|
-
_disableTabbableMode(currentActiveCell);
|
|
1345
|
-
}
|
|
1346
|
-
else {
|
|
1347
|
-
collectionUtils.handleEnterActionableMode(false, tabbableUtils.allTabbableElements(cellElement), (value) => {
|
|
1348
|
-
setIsTabbableMode(value != undefined);
|
|
1349
|
-
if (isCaptureFocus) {
|
|
1350
|
-
rootElement.focus({ preventScroll: true });
|
|
1351
|
-
}
|
|
1352
|
-
}, true);
|
|
1353
|
-
}
|
|
1354
|
-
return;
|
|
1355
|
-
}
|
|
1356
|
-
else if (activeCell !== currentActiveCell) {
|
|
1357
|
-
// if element is already focused, ensure state is up to date
|
|
1358
|
-
onActiveCellChanged({ value: currentActiveCell }, false, false, true);
|
|
1359
|
-
}
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1362
|
-
if (isCaptureFocus) {
|
|
1363
|
-
rootElement.focus({ preventScroll: true });
|
|
1364
|
-
}
|
|
1365
|
-
};
|
|
1366
|
-
// ensure the current cell is scrolled into view when necessary
|
|
1367
|
-
// only run if the state and ref match - otherwise another render cycle may be pending
|
|
1368
|
-
if (deferredScrollDetail != null &&
|
|
1369
|
-
deferredScrollDetail === deferredScrollDetailRef.current) {
|
|
1370
|
-
TableColGroup.applyScrollDetail(rootElement, scrollerElement, viewportInfo, tableId, columnsArray, stickyColumnInfo, sizingInfoRef.current, overflowInfoRef.current, deferredScrollDetail, isRtl, appliedColumnWidths);
|
|
1371
|
-
deferredScrollDetailRef.current = undefined;
|
|
1372
|
-
}
|
|
1373
|
-
// ensure current-cell-override is up to date on each render
|
|
1374
|
-
applyCurrentCellOverride(rootElement, scrollerElement, viewportInfo, tableId, tableData, columnsArray, stickyColumnInfo, sizingInfoRef.current, overflowInfoRef.current, currencyStatusRef, onActiveCellChanged, isEmbedded, isPendingLayout, isDataLoaded, isRtl, currentCellOverride, appliedColumnWidths);
|
|
1375
|
-
const blurredRenderCycleElement = blurredRenderCycleElementRef.current;
|
|
1376
|
-
blurredRenderCycleElementRef.current = null;
|
|
1377
|
-
isRenderCycle.current = false;
|
|
1378
|
-
const activeElement = tabbableUtils.getActiveElement(rootElement);
|
|
1379
|
-
// if we were tracking focus during the render cycle, ensure we recapture focus if needed
|
|
1380
|
-
if (blurredRenderCycleElement != null &&
|
|
1381
|
-
activeElement === tabbableUtils.getBodyElement(rootElement) &&
|
|
1382
|
-
(!collectionUtils.getElementContainsFunc(rootElement, true)(blurredRenderCycleElement) ||
|
|
1383
|
-
!tabbableUtils.isTabbableElement(blurredRenderCycleElement, true))) {
|
|
1384
|
-
deferredScrollDetailRef.current = undefined;
|
|
1385
|
-
_applyInternalFocus(rootElement, activeElement, true);
|
|
1386
|
-
}
|
|
1387
|
-
else if (hasFocusRef.current &&
|
|
1388
|
-
cellComparator(activeCell, currencyStatusRef.current.activeCell)) {
|
|
1389
|
-
_applyInternalFocus(rootElement, activeElement);
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
});
|
|
1393
|
-
return {
|
|
1394
|
-
focusHandlingProps: {
|
|
1395
|
-
onPointerDown: _pointerDownHandler,
|
|
1396
|
-
onPointerUp: _pointerUpHandler,
|
|
1397
|
-
onFocus: _onFocusHandler,
|
|
1398
|
-
onBlur: _onBlurHandler,
|
|
1399
|
-
onKeyDown: _onKeyDownHandler,
|
|
1400
|
-
onKeyUp: _onKeyUpHandler
|
|
1401
|
-
},
|
|
1402
|
-
activeCell,
|
|
1403
|
-
onActiveCellChanged,
|
|
1404
|
-
currentCell: currencyStatusRef.current.currentCell,
|
|
1405
|
-
currentActiveCell,
|
|
1406
|
-
isShowFocusRing,
|
|
1407
|
-
isTabbableMode,
|
|
1408
|
-
onStartFocusTracking,
|
|
1409
|
-
onFocusStartEdge,
|
|
1410
|
-
onFocusEndEdge,
|
|
1411
|
-
updateDeferredScrollDetail
|
|
1412
|
-
};
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
/**
|
|
1416
|
-
* Helper function to get the row action context from row information
|
|
1417
|
-
*/
|
|
1418
|
-
const getActionContext = (_index, key, data) => {
|
|
1419
|
-
return { key, data };
|
|
1420
|
-
};
|
|
1421
|
-
/**
|
|
1422
|
-
* Helper function to determine if a pointer or keyboard event should trigger a sort action gesture
|
|
1423
|
-
*/
|
|
1424
|
-
const isSortActionGesture = (columnsArray, columnKey) => {
|
|
1425
|
-
for (const column of columnsArray) {
|
|
1426
|
-
if (column.key === columnKey) {
|
|
1427
|
-
return column.value.sortable === 'enabled';
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
return false;
|
|
1431
|
-
};
|
|
1432
|
-
/**
|
|
1433
|
-
* Helper function to handle a sort action gesture
|
|
1434
|
-
*/
|
|
1435
|
-
const handleSortActionGesture = (columnsArray, columnKey, onSortCriterionChange, sortCriterion) => {
|
|
1436
|
-
if (isSortActionGesture(columnsArray, columnKey)) {
|
|
1437
|
-
let sortDirection;
|
|
1438
|
-
if (sortCriterion != null) {
|
|
1439
|
-
for (const criterion of sortCriterion) {
|
|
1440
|
-
if (criterion.key === columnKey) {
|
|
1441
|
-
sortDirection = criterion.sortDirection;
|
|
1442
|
-
break;
|
|
1443
|
-
}
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
const newDirection = sortDirection === 'ascending' ? 'descending' : 'ascending';
|
|
1447
|
-
onSortCriterionChange([{ key: columnKey, sortDirection: newDirection }]);
|
|
1448
|
-
return true;
|
|
1449
|
-
}
|
|
1450
|
-
return false;
|
|
1451
|
-
};
|
|
1452
|
-
|
|
1453
|
-
/**
|
|
1454
|
-
* Helper function to handle a hover gesture over a column header or footer region.
|
|
1455
|
-
*/
|
|
1456
|
-
function handleOverColumnHeaderFooterGesture(tableId, event, setHoverStyleColumnInfo, hoverStyleColumnInfo) {
|
|
1457
|
-
// only track 'hover' information for mouse events
|
|
1458
|
-
if (event.pointerType === 'mouse') {
|
|
1459
|
-
const cellElement = event.target.closest(`[${TableColGroup.TABLE_FOCUSABLE_SELECTOR}='${tableId}']`);
|
|
1460
|
-
if (cellElement != null) {
|
|
1461
|
-
const cellType = ScrollUtils.getCellType(cellElement);
|
|
1462
|
-
if (cellType === 'header' || cellType === 'footer') {
|
|
1463
|
-
const isHeader = cellType === 'header';
|
|
1464
|
-
const columnKey = TableColGroup.getColumnKey(cellElement);
|
|
1465
|
-
if (columnKey !== hoverStyleColumnInfo?.key ||
|
|
1466
|
-
!hoverStyleColumnInfo?.isHeader !== isHeader) {
|
|
1467
|
-
setHoverStyleColumnInfo({ key: columnKey, isHeader: cellType === 'header' });
|
|
1468
|
-
return;
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
handleEndInteractionColumnHeaderFooterGesture(setHoverStyleColumnInfo, hoverStyleColumnInfo);
|
|
1474
|
-
}
|
|
1475
|
-
/**
|
|
1476
|
-
* Helper function to handle an active gesture over a column header or footer region.
|
|
1477
|
-
*/
|
|
1478
|
-
function handleActiveColumnHeaderFooterGesture(tableId, event, setActiveStyleColumnInfo, activeStyleColumnInfo, activeCell) {
|
|
1479
|
-
let cellType;
|
|
1480
|
-
let columnKey;
|
|
1481
|
-
if (activeCell != null) {
|
|
1482
|
-
cellType = activeCell.type;
|
|
1483
|
-
columnKey = activeCell.columnKey;
|
|
1484
|
-
}
|
|
1485
|
-
else if (event instanceof PointerEvent && event.pointerType === 'touch') {
|
|
1486
|
-
// only handle touch events since hover events have the same treatment
|
|
1487
|
-
const cellElement = event.target.closest(`[${TableColGroup.TABLE_FOCUSABLE_SELECTOR}='${tableId}']`);
|
|
1488
|
-
if (cellElement != null) {
|
|
1489
|
-
cellType = ScrollUtils.getCellType(cellElement);
|
|
1490
|
-
columnKey = TableColGroup.getColumnKey(cellElement);
|
|
1491
|
-
}
|
|
1492
|
-
}
|
|
1493
|
-
if (columnKey != null && (cellType === 'header' || cellType === 'footer')) {
|
|
1494
|
-
const isHeader = cellType === 'header';
|
|
1495
|
-
if (columnKey !== activeStyleColumnInfo?.key || !activeStyleColumnInfo?.isHeader !== isHeader) {
|
|
1496
|
-
setActiveStyleColumnInfo({ key: columnKey, isHeader: cellType === 'header' });
|
|
1497
|
-
return;
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
handleEndInteractionColumnHeaderFooterGesture(setActiveStyleColumnInfo, activeStyleColumnInfo);
|
|
1501
|
-
}
|
|
1502
|
-
/**
|
|
1503
|
-
* Helper function to handle the end of an interaction style gesture for the table region.
|
|
1504
|
-
*/
|
|
1505
|
-
function handleEndInteractionColumnHeaderFooterGesture(setInteractionStyleColumnInfo, interactionStyleColumnInfo) {
|
|
1506
|
-
if (interactionStyleColumnInfo != null) {
|
|
1507
|
-
setInteractionStyleColumnInfo(undefined);
|
|
1508
|
-
}
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
/**
|
|
1512
|
-
* Helper function to handle an 'Up' or 'Down' arrow key press.
|
|
1513
|
-
* Up - Moves to the same cell in the previous row (including headers and footers). No op if already on the first row.
|
|
1514
|
-
* Down - Moves to the same cell in the next row (including headers and footers). No op if already on the last row.
|
|
1515
|
-
*/
|
|
1516
|
-
function handleAdjacentRowGesture(rootElement, tableId, columnsArray, initialCell, onActiveCellChanged, isPrevious, isExtendSelectionGesture, hideTooltip, updateDeferredScrollDetail) {
|
|
1517
|
-
const firstColumnKey = TableColGroup.getBoundaryColumnKey(columnsArray, true);
|
|
1518
|
-
if (firstColumnKey == null) {
|
|
1519
|
-
return;
|
|
1520
|
-
}
|
|
1521
|
-
let newCell = initialCell;
|
|
1522
|
-
const cellType = initialCell.type;
|
|
1523
|
-
if (cellType === 'noData') {
|
|
1524
|
-
const newColumnKey = firstColumnKey;
|
|
1525
|
-
if (isPrevious) {
|
|
1526
|
-
newCell = { columnKey: newColumnKey, type: 'header' };
|
|
1527
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1528
|
-
}
|
|
1529
|
-
else if (TableColGroup.hasFooterCells(rootElement, tableId)) {
|
|
1530
|
-
newCell = { columnKey: newColumnKey, type: 'footer' };
|
|
1531
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
else if (cellType === 'loading') {
|
|
1535
|
-
if (isPrevious) {
|
|
1536
|
-
newCell = { columnKey: initialCell.columnKey, type: 'header' };
|
|
1537
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1538
|
-
}
|
|
1539
|
-
else if (TableColGroup.hasFooterCells(rootElement, tableId)) {
|
|
1540
|
-
newCell = { columnKey: initialCell.columnKey, type: 'footer' };
|
|
1541
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
else if (cellType === 'loadMore') {
|
|
1545
|
-
if (isPrevious) {
|
|
1546
|
-
const rowKey = TableColGroup.getLastRenderedRowKey(rootElement, tableId);
|
|
1547
|
-
if (rowKey != null) {
|
|
1548
|
-
newCell = { rowKey: rowKey, columnKey: initialCell.columnKey, type: 'data' };
|
|
1549
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
else if (TableColGroup.hasFooterCells(rootElement, tableId)) {
|
|
1553
|
-
newCell = { columnKey: initialCell.columnKey, type: 'footer' };
|
|
1554
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1555
|
-
}
|
|
1556
|
-
}
|
|
1557
|
-
else if (cellType !== 'pending') {
|
|
1558
|
-
if (cellType === 'data') {
|
|
1559
|
-
const currentRowKey = initialCell.rowKey;
|
|
1560
|
-
const currentRowElement = collectionUtils.findElementByKey(rootElement, currentRowKey, `[${TableColGroup.TABLE_ROW_SELECTOR}='${tableId}']`);
|
|
1561
|
-
if (currentRowElement != null) {
|
|
1562
|
-
const rowElements = [
|
|
1563
|
-
...rootElement.querySelectorAll(`[${TableColGroup.TABLE_ROW_SELECTOR}='${tableId}']`)
|
|
1564
|
-
];
|
|
1565
|
-
const currentRowIndex = rowElements.indexOf(currentRowElement);
|
|
1566
|
-
let adjacentRowElement;
|
|
1567
|
-
if (isPrevious && currentRowIndex > 0) {
|
|
1568
|
-
adjacentRowElement = rowElements[currentRowIndex - 1];
|
|
1569
|
-
}
|
|
1570
|
-
else if (!isPrevious && currentRowIndex < rowElements.length - 1) {
|
|
1571
|
-
adjacentRowElement = rowElements[currentRowIndex + 1];
|
|
1572
|
-
}
|
|
1573
|
-
if (adjacentRowElement != null) {
|
|
1574
|
-
const rowKey = ScrollUtils.getRowKey(adjacentRowElement);
|
|
1575
|
-
if (rowKey != null) {
|
|
1576
|
-
newCell = { rowKey: rowKey, columnKey: initialCell.columnKey, type: 'data' };
|
|
1577
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell), isExtendSelectionGesture);
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
else if (!isExtendSelectionGesture) {
|
|
1581
|
-
if (isPrevious) {
|
|
1582
|
-
newCell = { columnKey: initialCell.columnKey, type: 'header' };
|
|
1583
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1584
|
-
}
|
|
1585
|
-
else if (TableColGroup.hasLoadMoreCell(rootElement, tableId)) {
|
|
1586
|
-
newCell = { columnKey: initialCell.columnKey, type: 'loadMore' };
|
|
1587
|
-
if (TableColGroup.getElementFromCell(rootElement, tableId, newCell) != null) {
|
|
1588
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
else if (TableColGroup.hasFooterCells(rootElement, tableId)) {
|
|
1592
|
-
newCell = { columnKey: initialCell.columnKey, type: 'footer' };
|
|
1593
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1594
|
-
}
|
|
1595
|
-
}
|
|
1596
|
-
}
|
|
1597
|
-
}
|
|
1598
|
-
else if (cellType === 'header' && !isPrevious) {
|
|
1599
|
-
const rowKey = TableColGroup.getFirstRenderedRowKey(rootElement, tableId);
|
|
1600
|
-
if (rowKey != null) {
|
|
1601
|
-
newCell = { rowKey: rowKey, columnKey: initialCell.columnKey, type: 'data' };
|
|
1602
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1603
|
-
}
|
|
1604
|
-
else if (TableColGroup.hasNoDataCell(rootElement, tableId)) {
|
|
1605
|
-
newCell = { type: 'noData' };
|
|
1606
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1607
|
-
}
|
|
1608
|
-
else {
|
|
1609
|
-
newCell = { columnKey: initialCell.columnKey, type: 'loading' };
|
|
1610
|
-
if (TableColGroup.getElementFromCell(rootElement, tableId, newCell) != null) {
|
|
1611
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1612
|
-
}
|
|
1613
|
-
else if (TableColGroup.hasFooterCells(rootElement, tableId)) {
|
|
1614
|
-
newCell = { columnKey: initialCell.columnKey, type: 'footer' };
|
|
1615
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
else if (cellType === 'footer' && isPrevious) {
|
|
1620
|
-
if (TableColGroup.hasNoDataCell(rootElement, tableId)) {
|
|
1621
|
-
newCell = { type: 'noData' };
|
|
1622
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1623
|
-
}
|
|
1624
|
-
else {
|
|
1625
|
-
newCell = { columnKey: initialCell.columnKey, type: 'loading' };
|
|
1626
|
-
if (TableColGroup.getElementFromCell(rootElement, tableId, newCell) != null) {
|
|
1627
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1628
|
-
}
|
|
1629
|
-
else {
|
|
1630
|
-
newCell = { columnKey: initialCell.columnKey, type: 'loadMore' };
|
|
1631
|
-
if (TableColGroup.getElementFromCell(rootElement, tableId, newCell) != null) {
|
|
1632
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1633
|
-
}
|
|
1634
|
-
else {
|
|
1635
|
-
const rowKey = TableColGroup.getLastRenderedRowKey(rootElement, tableId);
|
|
1636
|
-
if (rowKey != null) {
|
|
1637
|
-
newCell = { rowKey: rowKey, columnKey: initialCell.columnKey, type: 'data' };
|
|
1638
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1639
|
-
}
|
|
1640
|
-
else {
|
|
1641
|
-
newCell = { columnKey: initialCell.columnKey, type: 'header' };
|
|
1642
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1643
|
-
}
|
|
1644
|
-
}
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
}
|
|
1649
|
-
if (!cellComparator(initialCell, newCell)) {
|
|
1650
|
-
hideTooltip(true);
|
|
1651
|
-
}
|
|
1652
|
-
else {
|
|
1653
|
-
updateDeferredScrollDetail({ cell: newCell, locationX: 'inView', locationY: 'inView' });
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
/**
|
|
1657
|
-
* Helper function to handle a 'PageUp' or 'PageDown' arrow key press.
|
|
1658
|
-
* PageUp - Moves to the same cell in the first visible row in the current viewport,
|
|
1659
|
-
* and scrolls the Table so it becomes the last visible row in the viewport when able.
|
|
1660
|
-
* PageDown - Moves to the same cell in the last visible row in the current viewport,
|
|
1661
|
-
* and scrolls the Table so it becomes the first visible row in the viewport when able.
|
|
1662
|
-
*/
|
|
1663
|
-
function handlePageRowGesture(rootElement, scrollerElement, viewportInfo, tableId, sizingInfo, initialCell, onActiveCellChanged, isPrevious, hideTooltip, updateDeferredScrollDetail) {
|
|
1664
|
-
if (initialCell.type !== 'noData' && initialCell.type !== 'pending') {
|
|
1665
|
-
const rowElements = rootElement.querySelectorAll(`[${TableColGroup.TABLE_ROW_SELECTOR}='${tableId}']`);
|
|
1666
|
-
if (rowElements.length > 0) {
|
|
1667
|
-
const verticalScrollPosition = TableColGroup.getVerticalScrollPosition(rootElement, scrollerElement, viewportInfo, tableId);
|
|
1668
|
-
const verticalRowIndex = TableColGroup.getRowIndexForRowKey(rootElement, tableId, verticalScrollPosition.rowKey);
|
|
1669
|
-
let targetRowIndex;
|
|
1670
|
-
if (isPrevious) {
|
|
1671
|
-
if (verticalScrollPosition.offsetY === 0) {
|
|
1672
|
-
targetRowIndex = Math.max(verticalRowIndex - 1, 0);
|
|
1673
|
-
}
|
|
1674
|
-
else {
|
|
1675
|
-
targetRowIndex = verticalRowIndex;
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
else {
|
|
1679
|
-
const scrollerBottom = TableColGroup.getScrollerBottom(rootElement, scrollerElement, viewportInfo.viewportConfig, sizingInfo, tableId);
|
|
1680
|
-
targetRowIndex = verticalRowIndex;
|
|
1681
|
-
while (rowElements.length > targetRowIndex + 1) {
|
|
1682
|
-
targetRowIndex += 1;
|
|
1683
|
-
const elementBottom = rowElements[targetRowIndex].getBoundingClientRect().bottom;
|
|
1684
|
-
if (elementBottom > scrollerBottom) {
|
|
1685
|
-
break;
|
|
1686
|
-
}
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
const newRowKey = TableColGroup.getRowKeyForRowIndex(rootElement, tableId, targetRowIndex);
|
|
1690
|
-
if (newRowKey != null) {
|
|
1691
|
-
const newCell = {
|
|
1692
|
-
rowKey: newRowKey,
|
|
1693
|
-
columnKey: initialCell.columnKey,
|
|
1694
|
-
type: 'data'
|
|
1695
|
-
};
|
|
1696
|
-
if (newRowKey !== initialCell.rowKey) {
|
|
1697
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell), false, true);
|
|
1698
|
-
}
|
|
1699
|
-
if (!cellComparator(initialCell, newCell)) {
|
|
1700
|
-
hideTooltip(true);
|
|
1701
|
-
}
|
|
1702
|
-
updateDeferredScrollDetail({
|
|
1703
|
-
cell: newCell,
|
|
1704
|
-
locationX: 'inView',
|
|
1705
|
-
locationY: isPrevious ? 'bottom' : 'top'
|
|
1706
|
-
});
|
|
1707
|
-
}
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
/**
|
|
1712
|
-
* Helper function to get the column key next to the given column key in the specified direction. Returns
|
|
1713
|
-
* null if there is no adjacent column in the direction specified.
|
|
1714
|
-
*/
|
|
1715
|
-
function _getAdjacentColumnKey(initialKey, columnsArray, isPrevious) {
|
|
1716
|
-
let currentIndex = -1;
|
|
1717
|
-
const columnsCount = columnsArray.length;
|
|
1718
|
-
for (let i = 0; i < columnsCount; i++) {
|
|
1719
|
-
if (columnsArray[i].key === initialKey) {
|
|
1720
|
-
currentIndex = i;
|
|
1721
|
-
break;
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
if (isPrevious && currentIndex !== 0) {
|
|
1725
|
-
return columnsArray[currentIndex - 1].key;
|
|
1726
|
-
}
|
|
1727
|
-
else if (!isPrevious && currentIndex !== columnsCount - 1) {
|
|
1728
|
-
return columnsArray[currentIndex + 1].key;
|
|
1729
|
-
}
|
|
1730
|
-
return undefined;
|
|
1731
|
-
}
|
|
1732
|
-
/**
|
|
1733
|
-
* Helper function to handle a 'Previous' or 'Next' arrow key press.
|
|
1734
|
-
* Previous - Moves to the previous cell in the current row. No op if already on the first cell in that row.
|
|
1735
|
-
* Next - Moves to the next cell in the current row. No op if already on the last cell in that row.
|
|
1736
|
-
*/
|
|
1737
|
-
function handleAdjacentColumnGesture(rootElement, tableId, columnsArray, initialCell, onActiveCellChanged, isPrevious, hideTooltip, updateDeferredScrollDetail) {
|
|
1738
|
-
let newCell = initialCell;
|
|
1739
|
-
const cellType = initialCell.type;
|
|
1740
|
-
if (cellType === 'data' || cellType === 'header' || cellType === 'footer') {
|
|
1741
|
-
const initialKey = initialCell.columnKey;
|
|
1742
|
-
const newKey = _getAdjacentColumnKey(initialKey, columnsArray, isPrevious);
|
|
1743
|
-
if (newKey != null) {
|
|
1744
|
-
if (cellType === 'data') {
|
|
1745
|
-
newCell = { rowKey: initialCell.rowKey, columnKey: newKey, type: cellType };
|
|
1746
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1747
|
-
}
|
|
1748
|
-
else {
|
|
1749
|
-
newCell = { columnKey: newKey, type: cellType };
|
|
1750
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
}
|
|
1754
|
-
if (!cellComparator(initialCell, newCell)) {
|
|
1755
|
-
hideTooltip(true);
|
|
1756
|
-
}
|
|
1757
|
-
else {
|
|
1758
|
-
updateDeferredScrollDetail({ cell: newCell, locationX: 'inView', locationY: 'inView' });
|
|
1759
|
-
}
|
|
1760
|
-
}
|
|
1761
|
-
/**
|
|
1762
|
-
* Helper function to handle a 'Home' or 'End' key press.
|
|
1763
|
-
* Home - Jumps to the first cell in the current row. No op if already on the first cell in that row.
|
|
1764
|
-
* Ctrl/Cmd + Home - Jumps to the first cell in the first data row. If no data rows are present,
|
|
1765
|
-
* jumps to the first cell in the current region (header or footer). No op if already on that cell.
|
|
1766
|
-
* End - Jumps to the last cell in the current row. No op if already on the last cell in that row.
|
|
1767
|
-
* Ctrl/Cmd + End - Jumps to the last cell in the last data row. If no data rows are present,
|
|
1768
|
-
* jumps to the last cell in the current region (header or footer). No op if already on that cell.
|
|
1769
|
-
*/
|
|
1770
|
-
function handleJumpColumnGesture(rootElement, tableId, columnsArray, initialCell, onActiveCellChanged, isPrevious, includeRows, hideTooltip, updateDeferredScrollDetail) {
|
|
1771
|
-
const newKey = TableColGroup.getBoundaryColumnKey(columnsArray, isPrevious);
|
|
1772
|
-
if (newKey == null) {
|
|
1773
|
-
return;
|
|
1774
|
-
}
|
|
1775
|
-
let newCell = initialCell;
|
|
1776
|
-
const cellType = initialCell.type;
|
|
1777
|
-
if (cellType === 'data' || cellType === 'header' || cellType === 'footer') {
|
|
1778
|
-
const initialKey = initialCell.columnKey;
|
|
1779
|
-
if (includeRows) {
|
|
1780
|
-
if (TableColGroup.hasNoDataCell(rootElement, tableId)) {
|
|
1781
|
-
newCell = { type: 'noData' };
|
|
1782
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1783
|
-
}
|
|
1784
|
-
else {
|
|
1785
|
-
const newRowKey = isPrevious
|
|
1786
|
-
? TableColGroup.getFirstRenderedRowKey(rootElement, tableId)
|
|
1787
|
-
: TableColGroup.getLastRenderedRowKey(rootElement, tableId);
|
|
1788
|
-
if (newRowKey != null) {
|
|
1789
|
-
newCell = { rowKey: newRowKey, columnKey: newKey, type: 'data' };
|
|
1790
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1791
|
-
}
|
|
1792
|
-
}
|
|
1793
|
-
}
|
|
1794
|
-
else if (newKey !== initialKey) {
|
|
1795
|
-
if (cellType === 'data') {
|
|
1796
|
-
newCell = { rowKey: initialCell.rowKey, columnKey: newKey, type: cellType };
|
|
1797
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1798
|
-
}
|
|
1799
|
-
else {
|
|
1800
|
-
newCell = { columnKey: newKey, type: cellType };
|
|
1801
|
-
onActiveCellChanged({ value: newCell }, TableColGroup.isAutoFocusCell(rootElement, tableId, newCell));
|
|
1802
|
-
}
|
|
1803
|
-
}
|
|
1804
|
-
}
|
|
1805
|
-
if (!cellComparator(initialCell, newCell)) {
|
|
1806
|
-
hideTooltip(true);
|
|
1807
|
-
}
|
|
1808
|
-
else {
|
|
1809
|
-
updateDeferredScrollDetail({ cell: newCell, locationX: 'inView', locationY: 'inView' });
|
|
1810
|
-
}
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
/**
|
|
1814
|
-
* Helper function to handle a selection gesture (click, spacebar, etc...)
|
|
1815
|
-
*/
|
|
1816
|
-
function handleSelectionGesture(rootElement, tableId, columnsArray, targetElement, isModifierKey, onSelectionChange, isDropDownSelection, selectionMode, selected) {
|
|
1817
|
-
const emptyKeys = { all: false, keys: new Set() };
|
|
1818
|
-
let selectedRows = selected?.row != null ? selected.row : emptyKeys;
|
|
1819
|
-
let selectedColumns = selected?.column != null ? selected.column : emptyKeys;
|
|
1820
|
-
const newRowKey = collectionUtils.keyExtractor(targetElement, `[${TableColGroup.TABLE_ROW_SELECTOR}='${tableId}']`);
|
|
1821
|
-
if (newRowKey != null) {
|
|
1822
|
-
if (selectionMode?.row === 'single' ||
|
|
1823
|
-
selectionMode?.row === 'multiple' ||
|
|
1824
|
-
selectionMode?.row === 'multipleToggle') {
|
|
1825
|
-
const isToggleSelectionMode = isDropDownSelection || selectionMode.row === 'multipleToggle';
|
|
1826
|
-
const isMultiSelectRowGesture = isModifierKey || isToggleSelectionMode;
|
|
1827
|
-
if (selectedRows == null) {
|
|
1828
|
-
selectedRows = { all: false, keys: new Set([newRowKey]) };
|
|
1829
|
-
}
|
|
1830
|
-
else if (!keys.containsKey(selectedRows, newRowKey)) {
|
|
1831
|
-
if (isMultiSelectRowGesture && selectionMode.row !== 'single') {
|
|
1832
|
-
selectedRows = keys.addKey(selectedRows, newRowKey);
|
|
1833
|
-
}
|
|
1834
|
-
else {
|
|
1835
|
-
selectedRows = { all: false, keys: new Set([newRowKey]) };
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
else if (isMultiSelectRowGesture) {
|
|
1839
|
-
selectedRows = keys.removeKey(selectedRows, newRowKey, false);
|
|
1840
|
-
}
|
|
1841
|
-
else {
|
|
1842
|
-
selectedRows = { all: false, keys: new Set([newRowKey]) };
|
|
1843
|
-
}
|
|
1844
|
-
selectedColumns = emptyKeys;
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
else if (selectionMode?.column === 'single' || selectionMode?.column === 'multiple') {
|
|
1848
|
-
const cellElement = targetElement.closest(`[${TableColGroup.TABLE_FOCUSABLE_SELECTOR}='${tableId}']`);
|
|
1849
|
-
if (cellElement != null) {
|
|
1850
|
-
const cellType = ScrollUtils.getCellType(cellElement);
|
|
1851
|
-
if (cellType === 'header' || cellType === 'footer') {
|
|
1852
|
-
const index = TableColGroup.getColumnIndexForHeaderFooterElement(rootElement, tableId, cellElement, cellType === 'header');
|
|
1853
|
-
if (index != null) {
|
|
1854
|
-
const column = columnsArray[index];
|
|
1855
|
-
if (column.value.selectable !== 'disabled') {
|
|
1856
|
-
if (selectedColumns == null) {
|
|
1857
|
-
selectedColumns = { all: false, keys: new Set([column.key]) };
|
|
1858
|
-
}
|
|
1859
|
-
else if (!keys.containsKey(selectedColumns, column.key)) {
|
|
1860
|
-
if (isModifierKey && selectionMode.column === 'multiple') {
|
|
1861
|
-
selectedColumns = keys.addKey(selectedColumns, column.key);
|
|
1862
|
-
}
|
|
1863
|
-
else {
|
|
1864
|
-
selectedColumns = { all: false, keys: new Set([column.key]) };
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
else if (isModifierKey) {
|
|
1868
|
-
selectedColumns = keys.removeKey(selectedColumns, column.key, false);
|
|
1869
|
-
}
|
|
1870
|
-
else {
|
|
1871
|
-
selectedColumns = { all: false, keys: new Set([column.key]) };
|
|
1872
|
-
}
|
|
1873
|
-
selectedRows = emptyKeys;
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1876
|
-
}
|
|
1877
|
-
}
|
|
1878
|
-
}
|
|
1879
|
-
if (!keys.isSameKey(selectedRows, selected?.row) || !keys.isSameKey(selectedColumns, selected?.column)) {
|
|
1880
|
-
onSelectionChange({ value: { row: selectedRows, column: selectedColumns }, target: targetElement }, false);
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
/**
|
|
1884
|
-
* Helper function to calculate and apply a new selection state corresponding to the range provided
|
|
1885
|
-
*/
|
|
1886
|
-
function _applyRangeSelection(rootElement, tableId, columnsArray, targetElement, startIndex, endIndex, isRowGesture, onSelectionChange, isDropDownSelection, selectionMode, selected, previousEndIndex) {
|
|
1887
|
-
const emptyKeys = { all: false, keys: new Set() };
|
|
1888
|
-
let selectedRows = selected?.row != null ? selected.row : emptyKeys;
|
|
1889
|
-
let selectedColumns = selected?.column != null ? selected.column : emptyKeys;
|
|
1890
|
-
if (isRowGesture) {
|
|
1891
|
-
selectedColumns = emptyKeys;
|
|
1892
|
-
if (selectionMode?.row === 'multiple' || selectionMode?.row === 'multipleToggle') {
|
|
1893
|
-
const isToggleSelectionMode = isDropDownSelection || selectionMode.row === 'multipleToggle';
|
|
1894
|
-
selectedRows = isToggleSelectionMode ? selectedRows : emptyKeys;
|
|
1895
|
-
// selected rows should be added in the order that they are selected
|
|
1896
|
-
if (startIndex <= endIndex) {
|
|
1897
|
-
for (let i = startIndex; i <= endIndex; i++) {
|
|
1898
|
-
const key = TableColGroup.getRowKeyForRowIndex(rootElement, tableId, i);
|
|
1899
|
-
selectedRows = keys.addKey(selectedRows, key);
|
|
1900
|
-
}
|
|
1901
|
-
// toggle selection gesture is additive except for rows added from previous gesture
|
|
1902
|
-
if (isToggleSelectionMode && previousEndIndex != null) {
|
|
1903
|
-
if (previousEndIndex > endIndex) {
|
|
1904
|
-
for (let i = previousEndIndex; i > endIndex; i--) {
|
|
1905
|
-
const key = TableColGroup.getRowKeyForRowIndex(rootElement, tableId, i);
|
|
1906
|
-
selectedRows = keys.removeKey(selectedRows, key, false);
|
|
1907
|
-
}
|
|
1908
|
-
}
|
|
1909
|
-
else if (previousEndIndex < startIndex) {
|
|
1910
|
-
for (let i = previousEndIndex; i < startIndex; i++) {
|
|
1911
|
-
const key = TableColGroup.getRowKeyForRowIndex(rootElement, tableId, i);
|
|
1912
|
-
selectedRows = keys.removeKey(selectedRows, key, false);
|
|
1913
|
-
}
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
}
|
|
1917
|
-
else {
|
|
1918
|
-
for (let i = startIndex; i >= endIndex; i--) {
|
|
1919
|
-
const key = TableColGroup.getRowKeyForRowIndex(rootElement, tableId, i);
|
|
1920
|
-
selectedRows = keys.addKey(selectedRows, key);
|
|
1921
|
-
}
|
|
1922
|
-
// toggle selection gesture is additive except for rows added from previous gesture
|
|
1923
|
-
if (isToggleSelectionMode && previousEndIndex != null) {
|
|
1924
|
-
if (previousEndIndex < endIndex) {
|
|
1925
|
-
for (let i = previousEndIndex; i < endIndex; i++) {
|
|
1926
|
-
const key = TableColGroup.getRowKeyForRowIndex(rootElement, tableId, i);
|
|
1927
|
-
selectedRows = keys.removeKey(selectedRows, key, false);
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
else if (previousEndIndex > startIndex) {
|
|
1931
|
-
for (let i = previousEndIndex; i > startIndex; i--) {
|
|
1932
|
-
const key = TableColGroup.getRowKeyForRowIndex(rootElement, tableId, i);
|
|
1933
|
-
selectedRows = keys.removeKey(selectedRows, key, false);
|
|
1934
|
-
}
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
}
|
|
1940
|
-
else {
|
|
1941
|
-
selectedRows = emptyKeys;
|
|
1942
|
-
if (selectionMode?.column === 'multiple') {
|
|
1943
|
-
selectedColumns = emptyKeys;
|
|
1944
|
-
// selected columns should be added in the order that they are selected
|
|
1945
|
-
if (startIndex <= endIndex) {
|
|
1946
|
-
for (let i = startIndex; i <= endIndex; i++) {
|
|
1947
|
-
const column = columnsArray[i];
|
|
1948
|
-
if (column.value.selectable !== 'disabled') {
|
|
1949
|
-
selectedColumns = keys.addKey(selectedColumns, column.key);
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
else {
|
|
1954
|
-
for (let i = startIndex; i >= endIndex; i--) {
|
|
1955
|
-
const column = columnsArray[i];
|
|
1956
|
-
if (column.value.selectable !== 'disabled') {
|
|
1957
|
-
selectedColumns = keys.addKey(selectedColumns, column.key);
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
|
-
}
|
|
1961
|
-
}
|
|
1962
|
-
}
|
|
1963
|
-
if (!keys.isSameKey(selectedRows, selected?.row) || !keys.isSameKey(selectedColumns, selected?.column)) {
|
|
1964
|
-
onSelectionChange({ value: { row: selectedRows, column: selectedColumns }, target: targetElement }, true);
|
|
1965
|
-
}
|
|
1966
|
-
}
|
|
1967
|
-
/**
|
|
1968
|
-
* Determines whether a potential range selection gesture is valid based on the given target
|
|
1969
|
-
*/
|
|
1970
|
-
function isRangeSelectionGesture(rootElement, tableId, columnsArray, targetElement, activeCell, selectionMode) {
|
|
1971
|
-
const targetCell = TableColGroup.logicalCellExtractor(targetElement, tableId, columnsArray);
|
|
1972
|
-
if ((((selectionMode?.row === 'multiple' || selectionMode?.row === 'multipleToggle') &&
|
|
1973
|
-
activeCell.type === 'data') ||
|
|
1974
|
-
(selectionMode?.column === 'multiple' &&
|
|
1975
|
-
(activeCell.type === 'header' || activeCell.type === 'footer'))) &&
|
|
1976
|
-
targetCell?.type === activeCell.type) {
|
|
1977
|
-
const activeCellElement = TableColGroup.getElementFromCell(rootElement, tableId, activeCell);
|
|
1978
|
-
const targetCellElement = TableColGroup.getElementFromCell(rootElement, tableId, targetCell);
|
|
1979
|
-
if (activeCellElement != null && targetCellElement != null) {
|
|
1980
|
-
const isRow = targetCell.type === 'data';
|
|
1981
|
-
if (isRow) {
|
|
1982
|
-
return (TableColGroup.getRowIndexForRowElement(rootElement, tableId, activeCellElement.parentElement) != null &&
|
|
1983
|
-
TableColGroup.getRowIndexForRowElement(rootElement, tableId, targetCellElement.parentElement) != null);
|
|
1984
|
-
}
|
|
1985
|
-
else if (targetCell.type === 'header' || targetCell.type === 'footer') {
|
|
1986
|
-
const isHeader = targetCell.type === 'header';
|
|
1987
|
-
return (TableColGroup.getColumnIndexForHeaderFooterElement(rootElement, tableId, activeCellElement, isHeader) !=
|
|
1988
|
-
null &&
|
|
1989
|
-
TableColGroup.getColumnIndexForHeaderFooterElement(rootElement, tableId, targetCellElement, isHeader) !=
|
|
1990
|
-
null);
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
}
|
|
1994
|
-
return false;
|
|
1995
|
-
}
|
|
1996
|
-
/**
|
|
1997
|
-
* Helper function to handle a range selection gesture (shift+click)
|
|
1998
|
-
*/
|
|
1999
|
-
function handleRangeSelectionGesture(rootElement, tableId, columnsArray, targetElement, activeCell, onActiveCellChanged, selectionExtensionElementRef, onSelectionChange, isDropDownSelection, selectionMode, selected) {
|
|
2000
|
-
const targetCell = TableColGroup.logicalCellExtractor(targetElement, tableId, columnsArray);
|
|
2001
|
-
if (targetCell != null) {
|
|
2002
|
-
const activeCellElement = TableColGroup.getElementFromCell(rootElement, tableId, activeCell);
|
|
2003
|
-
const targetCellElement = TableColGroup.getElementFromCell(rootElement, tableId, targetCell);
|
|
2004
|
-
if (activeCellElement != null && targetCellElement != null) {
|
|
2005
|
-
if ((((selectionMode?.row === 'multiple' || selectionMode?.row === 'multipleToggle') &&
|
|
2006
|
-
targetCell.type === 'data') ||
|
|
2007
|
-
(selectionMode?.column === 'multiple' &&
|
|
2008
|
-
(targetCell.type === 'header' || targetCell.type === 'footer'))) &&
|
|
2009
|
-
targetCell.type === activeCell.type) {
|
|
2010
|
-
let startIndex;
|
|
2011
|
-
let endIndex;
|
|
2012
|
-
let previousEndIndex;
|
|
2013
|
-
let endElement;
|
|
2014
|
-
const isToggleSelectionMode = isDropDownSelection || selectionMode.row === 'multipleToggle';
|
|
2015
|
-
const isRow = targetCell.type === 'data';
|
|
2016
|
-
if (isRow) {
|
|
2017
|
-
endElement = targetCellElement.parentElement;
|
|
2018
|
-
const startElement = isToggleSelectionMode && selectionExtensionElementRef.current != null
|
|
2019
|
-
? selectionExtensionElementRef.current
|
|
2020
|
-
: activeCellElement.parentElement;
|
|
2021
|
-
startIndex = TableColGroup.getRowIndexForRowElement(rootElement, tableId, startElement);
|
|
2022
|
-
endIndex = TableColGroup.getRowIndexForRowElement(rootElement, tableId, endElement);
|
|
2023
|
-
const previousElement = isToggleSelectionMode
|
|
2024
|
-
? activeCellElement.parentElement
|
|
2025
|
-
: selectionExtensionElementRef.current;
|
|
2026
|
-
if (previousElement != null) {
|
|
2027
|
-
previousEndIndex = TableColGroup.getRowIndexForRowElement(rootElement, tableId, previousElement);
|
|
2028
|
-
}
|
|
2029
|
-
}
|
|
2030
|
-
else if (targetCell.type === 'header' || targetCell.type === 'footer') {
|
|
2031
|
-
const isHeader = targetCell.type === 'header';
|
|
2032
|
-
endElement = targetCellElement;
|
|
2033
|
-
startIndex = TableColGroup.getColumnIndexForHeaderFooterElement(rootElement, tableId, activeCellElement, isHeader);
|
|
2034
|
-
endIndex = TableColGroup.getColumnIndexForHeaderFooterElement(rootElement, tableId, targetCellElement, isHeader);
|
|
2035
|
-
}
|
|
2036
|
-
if (startIndex != null && endIndex != null) {
|
|
2037
|
-
if (!isRow || !isToggleSelectionMode) {
|
|
2038
|
-
selectionExtensionElementRef.current = endElement;
|
|
2039
|
-
}
|
|
2040
|
-
else {
|
|
2041
|
-
if (selectionExtensionElementRef.current == null) {
|
|
2042
|
-
selectionExtensionElementRef.current = activeCellElement.parentElement;
|
|
2043
|
-
}
|
|
2044
|
-
onActiveCellChanged({ value: targetCell }, false, true);
|
|
2045
|
-
targetCellElement.focus({ preventScroll: true });
|
|
2046
|
-
}
|
|
2047
|
-
_applyRangeSelection(rootElement, tableId, columnsArray, targetElement, startIndex, endIndex, isRow, onSelectionChange, isDropDownSelection, selectionMode, selected, previousEndIndex);
|
|
2048
|
-
return true;
|
|
2049
|
-
}
|
|
2050
|
-
}
|
|
2051
|
-
}
|
|
2052
|
-
}
|
|
2053
|
-
return false;
|
|
2054
|
-
}
|
|
2055
|
-
/**
|
|
2056
|
-
* Helper function to handle a selection extension gesture (shift+arrow key)
|
|
2057
|
-
*/
|
|
2058
|
-
function handleExtendSelectionGesture(rootElement, tableId, columnsArray, targetElement, isPrevious, activeCell, selectionExtensionElementRef, onSelectionChange, isDropDownSelection, updateDeferredScrollDetail, selectionMode, selected) {
|
|
2059
|
-
const activeCellElement = TableColGroup.getElementFromCell(rootElement, tableId, activeCell);
|
|
2060
|
-
if (activeCellElement != null) {
|
|
2061
|
-
let startIndex;
|
|
2062
|
-
let startElement;
|
|
2063
|
-
const isToggleSelectionMode = isDropDownSelection || selectionMode?.row === 'multipleToggle';
|
|
2064
|
-
const isRow = activeCell.type === 'data';
|
|
2065
|
-
const isHeader = activeCell.type === 'header';
|
|
2066
|
-
if (isRow) {
|
|
2067
|
-
startElement =
|
|
2068
|
-
isToggleSelectionMode && selectionExtensionElementRef.current != null
|
|
2069
|
-
? selectionExtensionElementRef.current
|
|
2070
|
-
: activeCellElement.parentElement;
|
|
2071
|
-
startIndex = TableColGroup.getRowIndexForRowElement(rootElement, tableId, startElement);
|
|
2072
|
-
}
|
|
2073
|
-
else {
|
|
2074
|
-
startElement = activeCellElement;
|
|
2075
|
-
startIndex = TableColGroup.getColumnIndexForHeaderFooterElement(rootElement, tableId, startElement, isHeader);
|
|
2076
|
-
}
|
|
2077
|
-
if (startIndex != null) {
|
|
2078
|
-
let endIndex;
|
|
2079
|
-
let previousEndIndex;
|
|
2080
|
-
let extendedElement;
|
|
2081
|
-
const cursorElement = isToggleSelectionMode && isRow
|
|
2082
|
-
? activeCellElement.parentElement
|
|
2083
|
-
: selectionExtensionElementRef.current;
|
|
2084
|
-
if (cursorElement != null) {
|
|
2085
|
-
previousEndIndex = isRow
|
|
2086
|
-
? TableColGroup.getRowIndexForRowElement(rootElement, tableId, cursorElement)
|
|
2087
|
-
: TableColGroup.getColumnIndexForHeaderFooterElement(rootElement, tableId, cursorElement, isHeader);
|
|
2088
|
-
extendedElement = isPrevious
|
|
2089
|
-
? cursorElement.previousElementSibling
|
|
2090
|
-
: cursorElement.nextElementSibling;
|
|
2091
|
-
if (extendedElement != null && (!isRow || (isRow && ScrollUtils.getRowKey(extendedElement) != null))) {
|
|
2092
|
-
if (!isToggleSelectionMode || !isRow) {
|
|
2093
|
-
selectionExtensionElementRef.current = extendedElement;
|
|
2094
|
-
}
|
|
2095
|
-
else if (selectionExtensionElementRef.current == null) {
|
|
2096
|
-
selectionExtensionElementRef.current = activeCellElement.parentElement;
|
|
2097
|
-
}
|
|
2098
|
-
endIndex = isRow
|
|
2099
|
-
? TableColGroup.getRowIndexForRowElement(rootElement, tableId, extendedElement)
|
|
2100
|
-
: TableColGroup.getColumnIndexForHeaderFooterElement(rootElement, tableId, extendedElement, isHeader);
|
|
2101
|
-
}
|
|
2102
|
-
else {
|
|
2103
|
-
endIndex = isRow
|
|
2104
|
-
? TableColGroup.getRowIndexForRowElement(rootElement, tableId, cursorElement)
|
|
2105
|
-
: TableColGroup.getColumnIndexForHeaderFooterElement(rootElement, tableId, cursorElement, isHeader);
|
|
2106
|
-
}
|
|
2107
|
-
}
|
|
2108
|
-
else {
|
|
2109
|
-
extendedElement = isPrevious
|
|
2110
|
-
? startElement.previousElementSibling
|
|
2111
|
-
: startElement.nextElementSibling;
|
|
2112
|
-
if (extendedElement != null && (!isRow || (isRow && ScrollUtils.getRowKey(extendedElement) != null))) {
|
|
2113
|
-
selectionExtensionElementRef.current = extendedElement;
|
|
2114
|
-
endIndex = isRow
|
|
2115
|
-
? TableColGroup.getRowIndexForRowElement(rootElement, tableId, extendedElement)
|
|
2116
|
-
: TableColGroup.getColumnIndexForHeaderFooterElement(rootElement, tableId, extendedElement, isHeader);
|
|
2117
|
-
}
|
|
2118
|
-
else {
|
|
2119
|
-
endIndex = startIndex;
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2122
|
-
if (endIndex != null) {
|
|
2123
|
-
_applyRangeSelection(rootElement, tableId, columnsArray, targetElement, startIndex, endIndex, isRow, onSelectionChange, isDropDownSelection, selectionMode, selected, previousEndIndex);
|
|
2124
|
-
}
|
|
2125
|
-
// scroll 'extensionElement' into view if focus is not shifted
|
|
2126
|
-
if (!isRow || !isToggleSelectionMode) {
|
|
2127
|
-
const extensionElement = selectionExtensionElementRef.current != null
|
|
2128
|
-
? selectionExtensionElementRef.current
|
|
2129
|
-
: activeCellElement;
|
|
2130
|
-
let extensionCell;
|
|
2131
|
-
if (isRow) {
|
|
2132
|
-
const rowKey = collectionUtils.keyExtractor(extensionElement, `[${TableColGroup.TABLE_ROW_SELECTOR}='${tableId}']`);
|
|
2133
|
-
if (rowKey != null) {
|
|
2134
|
-
extensionCell = {
|
|
2135
|
-
type: activeCell.type,
|
|
2136
|
-
rowKey: rowKey,
|
|
2137
|
-
columnKey: activeCell.columnKey
|
|
2138
|
-
};
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
else {
|
|
2142
|
-
extensionCell = TableColGroup.logicalCellExtractor(extensionElement, tableId, columnsArray);
|
|
2143
|
-
}
|
|
2144
|
-
if (extensionCell != null) {
|
|
2145
|
-
updateDeferredScrollDetail({
|
|
2146
|
-
cell: extensionCell,
|
|
2147
|
-
locationX: 'inView',
|
|
2148
|
-
locationY: 'inView'
|
|
2149
|
-
});
|
|
2150
|
-
}
|
|
2151
|
-
}
|
|
2152
|
-
}
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
|
|
2156
|
-
/**
|
|
2157
|
-
* Hook that manages keyboard interactions on the Preact Table
|
|
2158
|
-
*/
|
|
2159
|
-
function useKeyboardHandling({ rootRef, viewportInfo, tableId, tableData, isRtl, isTabbableMode, columnsArray, sizingInfoRef, selectionExtensionElementRef, activeCell, onActiveCellChanged, isDropDownSelection, selectionMode, selected, onTableSelectionChange, activeStyleColumnInfo, setActiveStyleColumnInfo, onRowAction, sortCriterion, onSortCriterionChange, hideTooltip, updateDeferredScrollDetail }) {
|
|
2160
|
-
// state for the key that a space or enter keydown occurrs on for matching keyup handling
|
|
2161
|
-
const triggerDownKeyRef = hooks.useRef();
|
|
2162
|
-
// Keydown handler for the outer Table. This handles all internal
|
|
2163
|
-
// keyboard navigation for the Table.
|
|
2164
|
-
const _keyDownHandler = hooks.useCallback((event) => {
|
|
2165
|
-
const rootElement = rootRef.current;
|
|
2166
|
-
const scrollerElement = viewportInfo.viewportConfig.scrollerRef.current;
|
|
2167
|
-
if (rootElement != null && scrollerElement != null) {
|
|
2168
|
-
const keyHandlers = {
|
|
2169
|
-
' ': function () {
|
|
2170
|
-
if (activeCell != null) {
|
|
2171
|
-
triggerDownKeyRef.current = activeCell.rowKey;
|
|
2172
|
-
if (!isTabbableMode) {
|
|
2173
|
-
handleActiveColumnHeaderFooterGesture(tableId, event, setActiveStyleColumnInfo, activeStyleColumnInfo, activeCell);
|
|
2174
|
-
// prevent default action on space to avoid scrolling during a selection
|
|
2175
|
-
event.preventDefault();
|
|
2176
|
-
}
|
|
2177
|
-
if (onRowAction != null &&
|
|
2178
|
-
EventUtils.getRowActionGestureContext(tableId, tableData, event.target, TableColGroup.TABLE_ROW_SELECTOR, getActionContext, activeCell) != null) {
|
|
2179
|
-
event.stopPropagation();
|
|
2180
|
-
}
|
|
2181
|
-
}
|
|
2182
|
-
},
|
|
2183
|
-
Enter: function () {
|
|
2184
|
-
if (activeCell != null) {
|
|
2185
|
-
triggerDownKeyRef.current = activeCell.rowKey;
|
|
2186
|
-
if (activeCell.type === 'data') {
|
|
2187
|
-
if (isDropDownSelection && !isTabbableMode) {
|
|
2188
|
-
event.preventDefault();
|
|
2189
|
-
}
|
|
2190
|
-
if (onRowAction != null &&
|
|
2191
|
-
EventUtils.getRowActionGestureContext(tableId, tableData, event.target, TableColGroup.TABLE_ROW_SELECTOR, getActionContext, activeCell) != null) {
|
|
2192
|
-
event.stopPropagation();
|
|
2193
|
-
}
|
|
2194
|
-
}
|
|
2195
|
-
else if (activeCell.type === 'header' &&
|
|
2196
|
-
!isTabbableMode &&
|
|
2197
|
-
onSortCriterionChange != null &&
|
|
2198
|
-
isSortActionGesture(columnsArray, activeCell.columnKey)) {
|
|
2199
|
-
event.stopPropagation();
|
|
2200
|
-
}
|
|
2201
|
-
}
|
|
2202
|
-
},
|
|
2203
|
-
ArrowUp: function () {
|
|
2204
|
-
if (activeCell != null &&
|
|
2205
|
-
(!isTabbableMode || TableColGroup.isAutoFocusCell(rootElement, tableId, activeCell))) {
|
|
2206
|
-
let isExtendSelectionGesture = false;
|
|
2207
|
-
if (!isTabbableMode &&
|
|
2208
|
-
activeCell.type === 'data' &&
|
|
2209
|
-
event.shiftKey &&
|
|
2210
|
-
onTableSelectionChange != null &&
|
|
2211
|
-
(selectionMode?.row === 'multiple' || selectionMode?.row === 'multipleToggle')) {
|
|
2212
|
-
handleExtendSelectionGesture(rootElement, tableId, columnsArray, rootElement, true, activeCell, selectionExtensionElementRef, onTableSelectionChange, isDropDownSelection, updateDeferredScrollDetail, selectionMode, selected);
|
|
2213
|
-
isExtendSelectionGesture = true;
|
|
2214
|
-
}
|
|
2215
|
-
if (!isExtendSelectionGesture ||
|
|
2216
|
-
isDropDownSelection ||
|
|
2217
|
-
selectionMode?.row === 'multipleToggle') {
|
|
2218
|
-
handleAdjacentRowGesture(rootElement, tableId, columnsArray, activeCell, onActiveCellChanged, true, isExtendSelectionGesture, hideTooltip, updateDeferredScrollDetail);
|
|
2219
|
-
}
|
|
2220
|
-
event.preventDefault();
|
|
2221
|
-
}
|
|
2222
|
-
},
|
|
2223
|
-
ArrowDown: function () {
|
|
2224
|
-
if (activeCell != null &&
|
|
2225
|
-
(!isTabbableMode || TableColGroup.isAutoFocusCell(rootElement, tableId, activeCell))) {
|
|
2226
|
-
let isExtendSelectionGesture = false;
|
|
2227
|
-
if (!isTabbableMode &&
|
|
2228
|
-
activeCell.type === 'data' &&
|
|
2229
|
-
event.shiftKey &&
|
|
2230
|
-
onTableSelectionChange != null &&
|
|
2231
|
-
(selectionMode?.row === 'multiple' || selectionMode?.row === 'multipleToggle')) {
|
|
2232
|
-
handleExtendSelectionGesture(rootElement, tableId, columnsArray, rootElement, false, activeCell, selectionExtensionElementRef, onTableSelectionChange, isDropDownSelection, updateDeferredScrollDetail, selectionMode, selected);
|
|
2233
|
-
isExtendSelectionGesture = true;
|
|
2234
|
-
}
|
|
2235
|
-
if (!isExtendSelectionGesture ||
|
|
2236
|
-
isDropDownSelection ||
|
|
2237
|
-
selectionMode?.row === 'multipleToggle') {
|
|
2238
|
-
handleAdjacentRowGesture(rootElement, tableId, columnsArray, activeCell, onActiveCellChanged, false, isExtendSelectionGesture, hideTooltip, updateDeferredScrollDetail);
|
|
2239
|
-
}
|
|
2240
|
-
event.preventDefault();
|
|
2241
|
-
}
|
|
2242
|
-
},
|
|
2243
|
-
ArrowLeft: function () {
|
|
2244
|
-
if (activeCell != null &&
|
|
2245
|
-
(!isTabbableMode || TableColGroup.isAutoFocusCell(rootElement, tableId, activeCell))) {
|
|
2246
|
-
if (!isTabbableMode &&
|
|
2247
|
-
(activeCell.type === 'header' || activeCell.type === 'footer') &&
|
|
2248
|
-
event.shiftKey &&
|
|
2249
|
-
onTableSelectionChange != null &&
|
|
2250
|
-
selectionMode?.column === 'multiple') {
|
|
2251
|
-
handleExtendSelectionGesture(rootElement, tableId, columnsArray, rootElement, true, activeCell, selectionExtensionElementRef, onTableSelectionChange, isDropDownSelection, updateDeferredScrollDetail, selectionMode, selected);
|
|
2252
|
-
}
|
|
2253
|
-
else {
|
|
2254
|
-
handleAdjacentColumnGesture(rootElement, tableId, columnsArray, activeCell, onActiveCellChanged, !isRtl, hideTooltip, updateDeferredScrollDetail);
|
|
2255
|
-
}
|
|
2256
|
-
event.preventDefault();
|
|
2257
|
-
}
|
|
2258
|
-
},
|
|
2259
|
-
ArrowRight: function () {
|
|
2260
|
-
if (activeCell != null &&
|
|
2261
|
-
(!isTabbableMode || TableColGroup.isAutoFocusCell(rootElement, tableId, activeCell))) {
|
|
2262
|
-
if (!isTabbableMode &&
|
|
2263
|
-
(activeCell.type === 'header' || activeCell.type === 'footer') &&
|
|
2264
|
-
event.shiftKey &&
|
|
2265
|
-
onTableSelectionChange != null &&
|
|
2266
|
-
selectionMode?.column === 'multiple') {
|
|
2267
|
-
handleExtendSelectionGesture(rootElement, tableId, columnsArray, rootElement, false, activeCell, selectionExtensionElementRef, onTableSelectionChange, isDropDownSelection, updateDeferredScrollDetail, selectionMode, selected);
|
|
2268
|
-
}
|
|
2269
|
-
else {
|
|
2270
|
-
handleAdjacentColumnGesture(rootElement, tableId, columnsArray, activeCell, onActiveCellChanged, isRtl, hideTooltip, updateDeferredScrollDetail);
|
|
2271
|
-
}
|
|
2272
|
-
event.preventDefault();
|
|
2273
|
-
}
|
|
2274
|
-
},
|
|
2275
|
-
PageUp: function () {
|
|
2276
|
-
if (activeCell != null &&
|
|
2277
|
-
(!isTabbableMode || TableColGroup.isAutoFocusCell(rootElement, tableId, activeCell))) {
|
|
2278
|
-
handlePageRowGesture(rootElement, scrollerElement, viewportInfo, tableId, sizingInfoRef.current, activeCell, onActiveCellChanged, true, hideTooltip, updateDeferredScrollDetail);
|
|
2279
|
-
event.preventDefault();
|
|
2280
|
-
}
|
|
2281
|
-
},
|
|
2282
|
-
PageDown: function () {
|
|
2283
|
-
if (activeCell != null &&
|
|
2284
|
-
(!isTabbableMode || TableColGroup.isAutoFocusCell(rootElement, tableId, activeCell))) {
|
|
2285
|
-
handlePageRowGesture(rootElement, scrollerElement, viewportInfo, tableId, sizingInfoRef.current, activeCell, onActiveCellChanged, false, hideTooltip, updateDeferredScrollDetail);
|
|
2286
|
-
event.preventDefault();
|
|
2287
|
-
}
|
|
2288
|
-
},
|
|
2289
|
-
Home: function () {
|
|
2290
|
-
if (activeCell != null &&
|
|
2291
|
-
(!isTabbableMode || TableColGroup.isAutoFocusCell(rootElement, tableId, activeCell))) {
|
|
2292
|
-
handleJumpColumnGesture(rootElement, tableId, columnsArray, activeCell, onActiveCellChanged, true, EventUtils.isLogicalCtrl(event), hideTooltip, updateDeferredScrollDetail);
|
|
2293
|
-
event.preventDefault();
|
|
2294
|
-
}
|
|
2295
|
-
},
|
|
2296
|
-
End: function () {
|
|
2297
|
-
if (activeCell != null &&
|
|
2298
|
-
(!isTabbableMode || TableColGroup.isAutoFocusCell(rootElement, tableId, activeCell))) {
|
|
2299
|
-
handleJumpColumnGesture(rootElement, tableId, columnsArray, activeCell, onActiveCellChanged, false, EventUtils.isLogicalCtrl(event), hideTooltip, updateDeferredScrollDetail);
|
|
2300
|
-
event.preventDefault();
|
|
2301
|
-
}
|
|
2302
|
-
}
|
|
2303
|
-
};
|
|
2304
|
-
if (Object.keys(keyHandlers).includes(event.key)) {
|
|
2305
|
-
keyHandlers[event.key]();
|
|
2306
|
-
}
|
|
2307
|
-
}
|
|
2308
|
-
}, [
|
|
2309
|
-
rootRef,
|
|
2310
|
-
viewportInfo,
|
|
2311
|
-
tableId,
|
|
2312
|
-
tableData,
|
|
2313
|
-
isRtl,
|
|
2314
|
-
isTabbableMode,
|
|
2315
|
-
columnsArray,
|
|
2316
|
-
sizingInfoRef,
|
|
2317
|
-
selectionExtensionElementRef,
|
|
2318
|
-
activeCell,
|
|
2319
|
-
onActiveCellChanged,
|
|
2320
|
-
isDropDownSelection,
|
|
2321
|
-
selectionMode,
|
|
2322
|
-
selected,
|
|
2323
|
-
onTableSelectionChange,
|
|
2324
|
-
activeStyleColumnInfo,
|
|
2325
|
-
setActiveStyleColumnInfo,
|
|
2326
|
-
onRowAction,
|
|
2327
|
-
onSortCriterionChange,
|
|
2328
|
-
hideTooltip,
|
|
2329
|
-
updateDeferredScrollDetail
|
|
2330
|
-
]);
|
|
2331
|
-
// Keyup handler for the outer Table.
|
|
2332
|
-
const _keyUpHandler = hooks.useCallback((event) => {
|
|
2333
|
-
const rootElement = rootRef.current;
|
|
2334
|
-
const scrollerElement = viewportInfo.viewportConfig.scrollerRef.current;
|
|
2335
|
-
if (rootElement != null && scrollerElement != null) {
|
|
2336
|
-
const keyHandlers = {
|
|
2337
|
-
' ': function () {
|
|
2338
|
-
if (activeCell != null) {
|
|
2339
|
-
handleEndInteractionColumnHeaderFooterGesture(setActiveStyleColumnInfo, activeStyleColumnInfo);
|
|
2340
|
-
if (triggerDownKeyRef.current === activeCell.rowKey) {
|
|
2341
|
-
if (!isTabbableMode) {
|
|
2342
|
-
if (onTableSelectionChange != null) {
|
|
2343
|
-
handleSelectionGesture(rootElement, tableId, columnsArray, TableColGroup.getElementFromCell(rootElement, tableId, activeCell), true, onTableSelectionChange, isDropDownSelection, selectionMode, selected);
|
|
2344
|
-
}
|
|
2345
|
-
}
|
|
2346
|
-
if (onRowAction != null &&
|
|
2347
|
-
EventUtils.handleRowActionGesture(tableId, tableData, onRowAction, event.target, TableColGroup.TABLE_ROW_SELECTOR, getActionContext, activeCell)) {
|
|
2348
|
-
event.stopPropagation();
|
|
2349
|
-
}
|
|
2350
|
-
}
|
|
2351
|
-
triggerDownKeyRef.current = undefined;
|
|
2352
|
-
}
|
|
2353
|
-
},
|
|
2354
|
-
Enter: function () {
|
|
2355
|
-
if (activeCell != null && triggerDownKeyRef.current === activeCell.rowKey) {
|
|
2356
|
-
if (activeCell.type === 'data') {
|
|
2357
|
-
if (isDropDownSelection && !isTabbableMode) {
|
|
2358
|
-
if (onTableSelectionChange != null) {
|
|
2359
|
-
handleSelectionGesture(rootElement, tableId, columnsArray, TableColGroup.getElementFromCell(rootElement, tableId, activeCell), true, onTableSelectionChange, isDropDownSelection, selectionMode, selected);
|
|
2360
|
-
}
|
|
2361
|
-
}
|
|
2362
|
-
if (onRowAction != null &&
|
|
2363
|
-
EventUtils.handleRowActionGesture(tableId, tableData, onRowAction, event.target, TableColGroup.TABLE_ROW_SELECTOR, getActionContext, activeCell)) {
|
|
2364
|
-
event.stopPropagation();
|
|
2365
|
-
}
|
|
2366
|
-
}
|
|
2367
|
-
else if (activeCell.type === 'header' &&
|
|
2368
|
-
!isTabbableMode &&
|
|
2369
|
-
onSortCriterionChange != null &&
|
|
2370
|
-
handleSortActionGesture(columnsArray, activeCell.columnKey, onSortCriterionChange, sortCriterion)) {
|
|
2371
|
-
event.stopPropagation();
|
|
2372
|
-
}
|
|
2373
|
-
}
|
|
2374
|
-
triggerDownKeyRef.current = undefined;
|
|
2375
|
-
}
|
|
2376
|
-
};
|
|
2377
|
-
if (Object.keys(keyHandlers).includes(event.key)) {
|
|
2378
|
-
keyHandlers[event.key]();
|
|
2379
|
-
}
|
|
2380
|
-
}
|
|
2381
|
-
}, [
|
|
2382
|
-
rootRef,
|
|
2383
|
-
viewportInfo,
|
|
2384
|
-
tableId,
|
|
2385
|
-
tableData,
|
|
2386
|
-
isTabbableMode,
|
|
2387
|
-
columnsArray,
|
|
2388
|
-
activeCell,
|
|
2389
|
-
activeStyleColumnInfo,
|
|
2390
|
-
setActiveStyleColumnInfo,
|
|
2391
|
-
isDropDownSelection,
|
|
2392
|
-
selectionMode,
|
|
2393
|
-
selected,
|
|
2394
|
-
onTableSelectionChange,
|
|
2395
|
-
onRowAction,
|
|
2396
|
-
sortCriterion,
|
|
2397
|
-
onSortCriterionChange
|
|
2398
|
-
]);
|
|
2399
|
-
return { onKeyDown: _keyDownHandler, onKeyUp: _keyUpHandler };
|
|
2400
|
-
}
|
|
2401
|
-
|
|
2402
|
-
/**
|
|
2403
|
-
* Helper function to handle a hover over a resizable column region gesture.
|
|
2404
|
-
*/
|
|
2405
|
-
function handleOverResizeRegionGesture(rootElement, tableId, event, columnsArray, resizeInfoRef, isRtl) {
|
|
2406
|
-
// handle hover feedback around potentially resizable columns
|
|
2407
|
-
_updateResizingState(rootElement, tableId, event, columnsArray, resizeInfoRef, isRtl);
|
|
2408
|
-
}
|
|
2409
|
-
/**
|
|
2410
|
-
* Helper function to handle a column resize start gesture (pointer down).
|
|
2411
|
-
*/
|
|
2412
|
-
function handleColumnResizeStartGesture(rootElement, scrollerElement, tableId, event, columnsArray, appliedColumnWidths, resizeInfoRef, isRtl, hideTooltip, onColumnResizing) {
|
|
2413
|
-
if (resizeInfoRef.current.key == null) {
|
|
2414
|
-
_updateResizingState(rootElement, tableId, event, columnsArray, resizeInfoRef, isRtl);
|
|
2415
|
-
}
|
|
2416
|
-
if (resizeInfoRef.current.key != null) {
|
|
2417
|
-
const rect = scrollerElement.getBoundingClientRect();
|
|
2418
|
-
const pointerX = isRtl ? rect.right - event.clientX : event.clientX - rect.left;
|
|
2419
|
-
resizeInfoRef.current = {
|
|
2420
|
-
isResizing: true,
|
|
2421
|
-
isResizeHover: true,
|
|
2422
|
-
key: resizeInfoRef.current.key,
|
|
2423
|
-
startX: pointerX,
|
|
2424
|
-
delta: 0,
|
|
2425
|
-
ignoreClick: resizeInfoRef.current.ignoreClick
|
|
2426
|
-
};
|
|
2427
|
-
if (onColumnResizing != null) {
|
|
2428
|
-
onColumnResizing({
|
|
2429
|
-
key: resizeInfoRef.current.key,
|
|
2430
|
-
delta: 0,
|
|
2431
|
-
allColumnWidths: appliedColumnWidths.netColumnWidths,
|
|
2432
|
-
paddingWidth: appliedColumnWidths.totalBorderOffset
|
|
2433
|
-
});
|
|
2434
|
-
}
|
|
2435
|
-
hideTooltip(true);
|
|
2436
|
-
return true;
|
|
2437
|
-
}
|
|
2438
|
-
return false;
|
|
2439
|
-
}
|
|
2440
|
-
/**
|
|
2441
|
-
* Helper function to ensure the resizing state is updated based on the latest pointer event.
|
|
2442
|
-
*/
|
|
2443
|
-
function _updateResizingState(rootElement, tableId, event, columnsArray, resizeInfoRef, isRtl) {
|
|
2444
|
-
const headerRowElement = TableColGroup.getHeaderRowElement(rootElement, tableId);
|
|
2445
|
-
if (headerRowElement != null) {
|
|
2446
|
-
const headerElements = headerRowElement.querySelectorAll(`[${TableColGroup.TABLE_HEADER_SELECTOR}='${tableId}']`);
|
|
2447
|
-
if (collectionUtils.getElementContainsFunc(headerRowElement)(event.target)) {
|
|
2448
|
-
let isResizeHover = false;
|
|
2449
|
-
for (let i = 0; i < headerElements.length; i++) {
|
|
2450
|
-
const headerElement = headerElements[i];
|
|
2451
|
-
const cellRect = headerElement.getBoundingClientRect();
|
|
2452
|
-
const endEdge = isRtl ? cellRect.left : cellRect.right;
|
|
2453
|
-
if (Math.abs(endEdge - event.pageX) <= 8) {
|
|
2454
|
-
if (columnsArray[i].value.edgeResizable !== 'enabled') {
|
|
2455
|
-
break;
|
|
2456
|
-
}
|
|
2457
|
-
// resize operation on end side of header cell
|
|
2458
|
-
resizeInfoRef.current.key = columnsArray[i].key;
|
|
2459
|
-
headerRowElement.style.cursor = 'col-resize';
|
|
2460
|
-
isResizeHover = true;
|
|
2461
|
-
resizeInfoRef.current.isResizeHover = true;
|
|
2462
|
-
}
|
|
2463
|
-
}
|
|
2464
|
-
if (!isResizeHover) {
|
|
2465
|
-
headerRowElement.style.cursor = '';
|
|
2466
|
-
resizeInfoRef.current.key = undefined;
|
|
2467
|
-
resizeInfoRef.current.isResizeHover = false;
|
|
2468
|
-
}
|
|
2469
|
-
}
|
|
2470
|
-
else {
|
|
2471
|
-
if (headerRowElement != null) {
|
|
2472
|
-
headerRowElement.style.cursor = '';
|
|
2473
|
-
}
|
|
2474
|
-
resizeInfoRef.current.key = undefined;
|
|
2475
|
-
resizeInfoRef.current.isResizeHover = false;
|
|
2476
|
-
}
|
|
2477
|
-
}
|
|
2478
|
-
}
|
|
2479
|
-
/**
|
|
2480
|
-
* Helper function to handle a pointer move gesture during a column resize.
|
|
2481
|
-
*/
|
|
2482
|
-
function handleColumnResizingGesture(scrollerElement, event, appliedColumnWidths, resizeInfoRef, isRtl, onColumnResizing) {
|
|
2483
|
-
if (resizeInfoRef.current.isResizing) {
|
|
2484
|
-
const rect = scrollerElement.getBoundingClientRect();
|
|
2485
|
-
const currentX = isRtl ? rect.right - event.clientX : event.clientX - rect.left;
|
|
2486
|
-
resizeInfoRef.current.delta = currentX - resizeInfoRef.current.startX;
|
|
2487
|
-
// handle resize move operation
|
|
2488
|
-
if (onColumnResizing != null) {
|
|
2489
|
-
onColumnResizing({
|
|
2490
|
-
key: resizeInfoRef.current.key,
|
|
2491
|
-
delta: resizeInfoRef.current.delta,
|
|
2492
|
-
allColumnWidths: appliedColumnWidths.netColumnWidths,
|
|
2493
|
-
paddingWidth: appliedColumnWidths.totalBorderOffset
|
|
2494
|
-
});
|
|
2495
|
-
}
|
|
2496
|
-
}
|
|
2497
|
-
}
|
|
2498
|
-
/**
|
|
2499
|
-
* Helper function to handle a column resize end gesture (pointer up).
|
|
2500
|
-
*/
|
|
2501
|
-
function handleColumnResizeEndGesture(scrollerElement, event, appliedColumnWidths, resizeInfoRef, isRtl, onColumnResize) {
|
|
2502
|
-
if (resizeInfoRef.current.isResizing) {
|
|
2503
|
-
if (onColumnResize != null) {
|
|
2504
|
-
const rect = scrollerElement.getBoundingClientRect();
|
|
2505
|
-
const currentX = isRtl ? rect.right - event.clientX : event.clientX - rect.left;
|
|
2506
|
-
resizeInfoRef.current.delta = currentX - resizeInfoRef.current.startX;
|
|
2507
|
-
onColumnResize({
|
|
2508
|
-
key: resizeInfoRef.current.key,
|
|
2509
|
-
delta: resizeInfoRef.current.delta,
|
|
2510
|
-
allColumnWidths: appliedColumnWidths.netColumnWidths,
|
|
2511
|
-
paddingWidth: appliedColumnWidths.totalBorderOffset,
|
|
2512
|
-
gesture: 'pointer',
|
|
2513
|
-
type: 'delta'
|
|
2514
|
-
});
|
|
2515
|
-
}
|
|
2516
|
-
}
|
|
2517
|
-
resizeInfoRef.current = {
|
|
2518
|
-
isResizing: false,
|
|
2519
|
-
isResizeHover: resizeInfoRef.current.isResizeHover,
|
|
2520
|
-
ignoreClick: resizeInfoRef.current.ignoreClick
|
|
2521
|
-
};
|
|
2522
|
-
}
|
|
2523
|
-
/**
|
|
2524
|
-
* Helper function to handle the pointer leaving the entire Table when previously hovering
|
|
2525
|
-
* over a column resize region.
|
|
2526
|
-
*/
|
|
2527
|
-
function handleLeaveResizingGesture(rootElement, tableId, resizeInfoRef) {
|
|
2528
|
-
if (!resizeInfoRef.current.isResizing) {
|
|
2529
|
-
const headerRowElement = TableColGroup.getHeaderRowElement(rootElement, tableId);
|
|
2530
|
-
if (headerRowElement != null) {
|
|
2531
|
-
headerRowElement.style.cursor = '';
|
|
2532
|
-
}
|
|
2533
|
-
resizeInfoRef.current.isResizeHover = false;
|
|
2534
|
-
}
|
|
2535
|
-
}
|
|
2536
|
-
/**
|
|
2537
|
-
* Helper function to handle a pointer entering the Table when it was previously handling
|
|
2538
|
-
* a column resize gesture.
|
|
2539
|
-
*/
|
|
2540
|
-
function handleEnterResizingGesture(scrollerElement, event, appliedColumnWidths, resizeInfoRef, isRtl, onColumnResize) {
|
|
2541
|
-
// handle case where user was resizing, moved pointer out of the Table,
|
|
2542
|
-
// released the button, and has now entered the table once again
|
|
2543
|
-
if (resizeInfoRef.current.isResizing && event.buttons === 0) {
|
|
2544
|
-
handleColumnResizeEndGesture(scrollerElement, event, appliedColumnWidths, resizeInfoRef, isRtl, onColumnResize);
|
|
2545
|
-
}
|
|
2546
|
-
}
|
|
2547
|
-
|
|
2548
|
-
/**
|
|
2549
|
-
* Hook that manages pointer interactions on the Preact Table
|
|
2550
|
-
*/
|
|
2551
|
-
function usePointerHandling({ rootRef, viewportInfo, tableId, tableData, isRtl, columnsArray, appliedColumnWidths, resizeInfoRef, selectionExtensionElementRef, onColumnResizing, onColumnResize, activeCell, onActiveCellChanged, isDropDownSelection, selectionMode, selected, onTableSelectionChange, activeStyleColumnInfo, setActiveStyleColumnInfo, onRowAction, showTooltip, hideTooltip, tooltipId }) {
|
|
2552
|
-
// tracks whether the most recent 'pointerdown' event was due to a touch gesture
|
|
2553
|
-
const selectionTouchRef = hooks.useRef(false);
|
|
2554
|
-
// tracks the column key for any header or footer being hovered over
|
|
2555
|
-
const [hoverStyleColumnInfo, setHoverStyleColumnInfo] = hooks.useState();
|
|
2556
|
-
// tracks the current 'pointer over' element for comparison during 'click' event handling to
|
|
2557
|
-
// prevent screen readers from triggering undesired selection gestures from simulated events
|
|
2558
|
-
const pointerInfoRef = hooks.useRef();
|
|
2559
|
-
// Pointer move handler for the outer Table.
|
|
2560
|
-
const _pointerMoveHandler = hooks.useCallback((event) => {
|
|
2561
|
-
const rootElement = rootRef.current;
|
|
2562
|
-
const scrollerElement = viewportInfo.viewportConfig.scrollerRef.current;
|
|
2563
|
-
if (rootElement != null) {
|
|
2564
|
-
pointerInfoRef.current = { target: event.target, x: event.clientX, y: event.clientY };
|
|
2565
|
-
handleMoveTooltipGesture(tableId, columnsArray, event, showTooltip, hideTooltip, tooltipId);
|
|
2566
|
-
if (onColumnResizing != null) {
|
|
2567
|
-
if (!resizeInfoRef.current.isResizing) {
|
|
2568
|
-
handleOverResizeRegionGesture(rootElement, tableId, event, columnsArray, resizeInfoRef, isRtl);
|
|
2569
|
-
}
|
|
2570
|
-
else if (scrollerElement != null && appliedColumnWidths != null) {
|
|
2571
|
-
handleColumnResizingGesture(scrollerElement, event, appliedColumnWidths, resizeInfoRef, isRtl, onColumnResizing);
|
|
2572
|
-
}
|
|
2573
|
-
}
|
|
2574
|
-
}
|
|
2575
|
-
}, [
|
|
2576
|
-
rootRef,
|
|
2577
|
-
viewportInfo,
|
|
2578
|
-
tableId,
|
|
2579
|
-
columnsArray,
|
|
2580
|
-
appliedColumnWidths,
|
|
2581
|
-
resizeInfoRef,
|
|
2582
|
-
isRtl,
|
|
2583
|
-
onColumnResizing,
|
|
2584
|
-
showTooltip,
|
|
2585
|
-
hideTooltip,
|
|
2586
|
-
tooltipId
|
|
2587
|
-
]);
|
|
2588
|
-
// Pointer over handler for the outer Table.
|
|
2589
|
-
const _pointerOverHandler = hooks.useCallback((event) => {
|
|
2590
|
-
const rootElement = rootRef.current;
|
|
2591
|
-
if (rootElement != null) {
|
|
2592
|
-
pointerInfoRef.current = { target: event.target, x: event.clientX, y: event.clientY };
|
|
2593
|
-
handleOverColumnHeaderFooterGesture(tableId, event, setHoverStyleColumnInfo, hoverStyleColumnInfo);
|
|
2594
|
-
}
|
|
2595
|
-
}, [rootRef, tableId, hoverStyleColumnInfo]);
|
|
2596
|
-
// Pointer down handler for the outer Table. It ensures the area targeted is 'current'.
|
|
2597
|
-
// NOTE - This event handling is triggered prior to 'onFocus' handling and ensures the
|
|
2598
|
-
// 'pending current' area is set when an initial pointer interaction focuses the Table.
|
|
2599
|
-
const _pointerDownHandler = hooks.useCallback((event) => {
|
|
2600
|
-
handleActiveColumnHeaderFooterGesture(tableId, event, setActiveStyleColumnInfo, activeStyleColumnInfo);
|
|
2601
|
-
const rootElement = rootRef.current;
|
|
2602
|
-
const scrollerElement = viewportInfo.viewportConfig.scrollerRef.current;
|
|
2603
|
-
if (rootElement != null) {
|
|
2604
|
-
selectionTouchRef.current = event.pointerType === 'touch';
|
|
2605
|
-
const targetElement = event.target;
|
|
2606
|
-
if (onTableSelectionChange != null &&
|
|
2607
|
-
activeCell != null &&
|
|
2608
|
-
event.shiftKey &&
|
|
2609
|
-
isRangeSelectionGesture(rootElement, tableId, columnsArray, targetElement, activeCell, selectionMode)) {
|
|
2610
|
-
// prevent focus change on selection extension gesture
|
|
2611
|
-
if (!textSelectionUtils.getIsSelectionPending()) {
|
|
2612
|
-
event.preventDefault();
|
|
2613
|
-
}
|
|
2614
|
-
}
|
|
2615
|
-
else if (scrollerElement != null &&
|
|
2616
|
-
appliedColumnWidths != null &&
|
|
2617
|
-
handleColumnResizeStartGesture(rootElement, scrollerElement, tableId, event, columnsArray, appliedColumnWidths, resizeInfoRef, isRtl, hideTooltip, onColumnResizing)) {
|
|
2618
|
-
// prevent focus change on column resize gesture
|
|
2619
|
-
event.preventDefault();
|
|
2620
|
-
resizeInfoRef.current.ignoreClick = true;
|
|
2621
|
-
}
|
|
2622
|
-
else if (TableColGroup.logicalCellExtractor(targetElement, tableId, columnsArray) == null) {
|
|
2623
|
-
// prevent focus shift when interacting with 'non-focusable' regions (ie - scrollbar)
|
|
2624
|
-
event.preventDefault();
|
|
2625
|
-
}
|
|
2626
|
-
else {
|
|
2627
|
-
// in firefox, ctrl/cmd + click triggers browser selection of <tr> elements, which
|
|
2628
|
-
// conflicts with our multiple row selection gesture. to prevent this, schedule a
|
|
2629
|
-
// macro-task to remove any node-based selection to ensure there is no 'pending'
|
|
2630
|
-
// browser selection found during eventual click event handling
|
|
2631
|
-
if (clientHints.getClientHints().browser === 'firefox' && EventUtils.isLogicalCtrl(event)) {
|
|
2632
|
-
setTimeout(() => {
|
|
2633
|
-
textSelectionUtils.clearElementSelection();
|
|
2634
|
-
}, 0);
|
|
2635
|
-
}
|
|
2636
|
-
}
|
|
2637
|
-
}
|
|
2638
|
-
}, [
|
|
2639
|
-
rootRef,
|
|
2640
|
-
viewportInfo,
|
|
2641
|
-
tableId,
|
|
2642
|
-
columnsArray,
|
|
2643
|
-
appliedColumnWidths,
|
|
2644
|
-
resizeInfoRef,
|
|
2645
|
-
activeStyleColumnInfo,
|
|
2646
|
-
setActiveStyleColumnInfo,
|
|
2647
|
-
isRtl,
|
|
2648
|
-
hideTooltip,
|
|
2649
|
-
activeCell,
|
|
2650
|
-
selectionMode,
|
|
2651
|
-
onTableSelectionChange,
|
|
2652
|
-
onColumnResizing
|
|
2653
|
-
]);
|
|
2654
|
-
// Pointer up handler for the outer Table.
|
|
2655
|
-
const _pointerUpHandler = hooks.useCallback((event) => {
|
|
2656
|
-
handleEndInteractionColumnHeaderFooterGesture(setActiveStyleColumnInfo, activeStyleColumnInfo);
|
|
2657
|
-
const scrollerElement = viewportInfo.viewportConfig.scrollerRef.current;
|
|
2658
|
-
if (scrollerElement != null && appliedColumnWidths != null) {
|
|
2659
|
-
handleColumnResizeEndGesture(scrollerElement, event, appliedColumnWidths, resizeInfoRef, isRtl, onColumnResize);
|
|
2660
|
-
}
|
|
2661
|
-
}, [
|
|
2662
|
-
viewportInfo,
|
|
2663
|
-
appliedColumnWidths,
|
|
2664
|
-
resizeInfoRef,
|
|
2665
|
-
activeStyleColumnInfo,
|
|
2666
|
-
setActiveStyleColumnInfo,
|
|
2667
|
-
isRtl,
|
|
2668
|
-
onColumnResize
|
|
2669
|
-
]);
|
|
2670
|
-
// Pointer leave handler for the outer Table.
|
|
2671
|
-
const _pointerLeaveHandler = hooks.useCallback((event) => {
|
|
2672
|
-
handleEndInteractionColumnHeaderFooterGesture(setHoverStyleColumnInfo, hoverStyleColumnInfo);
|
|
2673
|
-
handleEndInteractionColumnHeaderFooterGesture(setActiveStyleColumnInfo, activeStyleColumnInfo);
|
|
2674
|
-
const rootElement = rootRef.current;
|
|
2675
|
-
if (rootElement != null) {
|
|
2676
|
-
handleLeaveResizingGesture(rootElement, tableId, resizeInfoRef);
|
|
2677
|
-
handleLeaveTableTooltipGesture(rootElement, event, hideTooltip, tooltipId);
|
|
2678
|
-
}
|
|
2679
|
-
pointerInfoRef.current = undefined;
|
|
2680
|
-
}, [
|
|
2681
|
-
rootRef,
|
|
2682
|
-
tableId,
|
|
2683
|
-
resizeInfoRef,
|
|
2684
|
-
activeStyleColumnInfo,
|
|
2685
|
-
setActiveStyleColumnInfo,
|
|
2686
|
-
hoverStyleColumnInfo,
|
|
2687
|
-
hideTooltip,
|
|
2688
|
-
tooltipId
|
|
2689
|
-
]);
|
|
2690
|
-
// Pointer enter handler for the outer Table.
|
|
2691
|
-
const _pointerEnterHandler = hooks.useCallback((event) => {
|
|
2692
|
-
const scrollerElement = viewportInfo.viewportConfig.scrollerRef.current;
|
|
2693
|
-
if (scrollerElement != null && appliedColumnWidths != null) {
|
|
2694
|
-
handleEnterResizingGesture(scrollerElement, event, appliedColumnWidths, resizeInfoRef, isRtl, onColumnResize);
|
|
2695
|
-
}
|
|
2696
|
-
}, [viewportInfo, appliedColumnWidths, resizeInfoRef, isRtl, onColumnResize]);
|
|
2697
|
-
// Click handler for the outer Table. It ensures the Table's selection state is
|
|
2698
|
-
// updated to reflect the area targeted, and any action events are fired correctly.
|
|
2699
|
-
const _clickHandler = hooks.useCallback((event) => {
|
|
2700
|
-
const rootElement = rootRef.current;
|
|
2701
|
-
if (rootElement != null) {
|
|
2702
|
-
// only handle click events that match the latest mouse over/move info to prevent screen readers
|
|
2703
|
-
// from triggering undesired selections due to simulated click events when transferring focus
|
|
2704
|
-
if (selectionTouchRef.current ||
|
|
2705
|
-
(pointerInfoRef.current != null &&
|
|
2706
|
-
pointerInfoRef.current.target === event.target &&
|
|
2707
|
-
Math.abs(pointerInfoRef.current.x - event.clientX) <= 1 &&
|
|
2708
|
-
Math.abs(pointerInfoRef.current.y - event.clientY) <= 1)) {
|
|
2709
|
-
let isSelectionExtension = false;
|
|
2710
|
-
const target = event.target;
|
|
2711
|
-
if (onTableSelectionChange != null &&
|
|
2712
|
-
!resizeInfoRef.current.ignoreClick &&
|
|
2713
|
-
!textSelectionUtils.getIsSelectionPending()) {
|
|
2714
|
-
if (activeCell != null && event.shiftKey) {
|
|
2715
|
-
isSelectionExtension = handleRangeSelectionGesture(rootElement, tableId, columnsArray, target, activeCell, onActiveCellChanged, selectionExtensionElementRef, onTableSelectionChange, isDropDownSelection, selectionMode, selected);
|
|
2716
|
-
}
|
|
2717
|
-
if (!isSelectionExtension) {
|
|
2718
|
-
handleSelectionGesture(rootElement, tableId, columnsArray, target, EventUtils.isLogicalCtrl(event) || selectionTouchRef.current, onTableSelectionChange, isDropDownSelection, selectionMode, selected);
|
|
2719
|
-
}
|
|
2720
|
-
}
|
|
2721
|
-
if (onRowAction != null &&
|
|
2722
|
-
!textSelectionUtils.getIsSelectionPending() &&
|
|
2723
|
-
EventUtils.handleRowActionGesture(tableId, tableData, onRowAction, target, TableColGroup.TABLE_ROW_SELECTOR, getActionContext)) {
|
|
2724
|
-
event.stopPropagation();
|
|
2725
|
-
}
|
|
2726
|
-
}
|
|
2727
|
-
}
|
|
2728
|
-
resizeInfoRef.current.ignoreClick = false;
|
|
2729
|
-
}, [
|
|
2730
|
-
rootRef,
|
|
2731
|
-
tableId,
|
|
2732
|
-
columnsArray,
|
|
2733
|
-
tableData,
|
|
2734
|
-
resizeInfoRef,
|
|
2735
|
-
selectionExtensionElementRef,
|
|
2736
|
-
activeCell,
|
|
2737
|
-
onActiveCellChanged,
|
|
2738
|
-
isDropDownSelection,
|
|
2739
|
-
selectionMode,
|
|
2740
|
-
selected,
|
|
2741
|
-
onTableSelectionChange,
|
|
2742
|
-
onRowAction
|
|
2743
|
-
]);
|
|
2744
|
-
return {
|
|
2745
|
-
pointerHandlingProps: {
|
|
2746
|
-
onPointerOver: _pointerOverHandler,
|
|
2747
|
-
onPointerMove: _pointerMoveHandler,
|
|
2748
|
-
onPointerDown: _pointerDownHandler,
|
|
2749
|
-
onPointerUp: _pointerUpHandler,
|
|
2750
|
-
onPointerLeave: _pointerLeaveHandler,
|
|
2751
|
-
onPointerEnter: _pointerEnterHandler,
|
|
2752
|
-
onClick: _clickHandler
|
|
2753
|
-
},
|
|
2754
|
-
hoverStyleColumnInfo
|
|
2755
|
-
};
|
|
2756
|
-
}
|
|
2757
|
-
|
|
2758
|
-
const _defaultDisabledRowInteractionKeys = ['enter'];
|
|
2759
|
-
/**
|
|
2760
|
-
* Hook that manages interactions and events on the Preact Table
|
|
2761
|
-
*/
|
|
2762
|
-
function useInteractionManager({ rootRef, viewportInfo, ref, tableId, tableData, hasMore, hasFooters, isRtl, columnsArray, stickyColumnInfo, appliedColumnWidths, isLayoutRequired, sizingInfoRef, overflowInfoRef, stickyEdgesState, setStickyEdgesState, cellHasRenderer, horizontalScrollPositionOverride, verticalScrollPositionOverride, onColumnResizing, onColumnResize, currentCellOverride, onPersistCurrentCell, selectionMode, selected, onSelectionChange, onRowAction, sortCriterion, onSortCriterionChange, isPendingLayout, isEmbedded, contextMenuConfig }) {
|
|
2763
|
-
// tracks the current column resize state
|
|
2764
|
-
const resizeInfoRef = hooks.useRef({
|
|
2765
|
-
isResizing: false,
|
|
2766
|
-
isResizeHover: false,
|
|
2767
|
-
ignoreClick: false
|
|
2768
|
-
});
|
|
2769
|
-
// tracks the column key for any header or footer being hovered over
|
|
2770
|
-
const [activeStyleColumnInfo, setActiveStyleColumnInfo] = hooks.useState();
|
|
2771
|
-
// handles default tooltip state management
|
|
2772
|
-
const { tooltipContent, tooltipId, tooltipAnchorRef, showTooltip, hideTooltip } = useTruncationTooltip({ rootRef, tableId, resizeInfoRef });
|
|
2773
|
-
// whether row selection is triggered on 'enter' keypresses in addition to 'spacebar'
|
|
2774
|
-
const disabledRowInteractionKeys = isEmbedded ? undefined : _defaultDisabledRowInteractionKeys;
|
|
2775
|
-
// tracks the current selection extension element (if any)
|
|
2776
|
-
const selectionExtensionElementRef = hooks.useRef();
|
|
2777
|
-
// intercept onSelectionChange calls to ensure local selectionExtensionElementRef is cleared
|
|
2778
|
-
const onTableSelectionChange = hooks.useMemo(() => {
|
|
2779
|
-
return onSelectionChange != null
|
|
2780
|
-
? (detail, isExtendableSelection) => {
|
|
2781
|
-
if (!isExtendableSelection) {
|
|
2782
|
-
selectionExtensionElementRef.current = undefined;
|
|
2783
|
-
}
|
|
2784
|
-
onSelectionChange(detail);
|
|
2785
|
-
}
|
|
2786
|
-
: undefined;
|
|
2787
|
-
}, [onSelectionChange]);
|
|
2788
|
-
// setup focus tracking using the useFocusHandling hook
|
|
2789
|
-
const { focusHandlingProps, activeCell, onActiveCellChanged, currentActiveCell, currentCell, isShowFocusRing, isTabbableMode, onStartFocusTracking, onFocusStartEdge, onFocusEndEdge, updateDeferredScrollDetail } = useFocusHandling({
|
|
2790
|
-
rootRef,
|
|
2791
|
-
viewportInfo,
|
|
2792
|
-
tableId,
|
|
2793
|
-
tableData,
|
|
2794
|
-
hasMore,
|
|
2795
|
-
hasFooters,
|
|
2796
|
-
columnsArray,
|
|
2797
|
-
stickyColumnInfo,
|
|
2798
|
-
sizingInfoRef,
|
|
2799
|
-
overflowInfoRef,
|
|
2800
|
-
selectionExtensionElementRef,
|
|
2801
|
-
isRtl,
|
|
2802
|
-
cellSupportsTabbable: cellHasRenderer,
|
|
2803
|
-
appliedColumnWidths,
|
|
2804
|
-
currentCellOverride,
|
|
2805
|
-
onPersistCurrentCell,
|
|
2806
|
-
showTooltip,
|
|
2807
|
-
hideTooltip,
|
|
2808
|
-
isPendingLayout,
|
|
2809
|
-
isEmbedded,
|
|
2810
|
-
isDataLoaded: !hasMore || tableData.length > 0
|
|
2811
|
-
});
|
|
2812
|
-
const keyboardHandlingProps = useKeyboardHandling({
|
|
2813
|
-
rootRef,
|
|
2814
|
-
viewportInfo,
|
|
2815
|
-
tableId,
|
|
2816
|
-
tableData,
|
|
2817
|
-
isRtl,
|
|
2818
|
-
isTabbableMode,
|
|
2819
|
-
columnsArray,
|
|
2820
|
-
sizingInfoRef,
|
|
2821
|
-
selectionExtensionElementRef,
|
|
2822
|
-
activeCell,
|
|
2823
|
-
onActiveCellChanged,
|
|
2824
|
-
isDropDownSelection: isEmbedded,
|
|
2825
|
-
selectionMode,
|
|
2826
|
-
selected,
|
|
2827
|
-
onTableSelectionChange,
|
|
2828
|
-
activeStyleColumnInfo,
|
|
2829
|
-
setActiveStyleColumnInfo,
|
|
2830
|
-
onRowAction,
|
|
2831
|
-
sortCriterion,
|
|
2832
|
-
onSortCriterionChange,
|
|
2833
|
-
hideTooltip,
|
|
2834
|
-
updateDeferredScrollDetail
|
|
2835
|
-
});
|
|
2836
|
-
const { hoverStyleColumnInfo, pointerHandlingProps } = usePointerHandling({
|
|
2837
|
-
rootRef,
|
|
2838
|
-
viewportInfo,
|
|
2839
|
-
tableId,
|
|
2840
|
-
tableData,
|
|
2841
|
-
isRtl,
|
|
2842
|
-
columnsArray,
|
|
2843
|
-
appliedColumnWidths,
|
|
2844
|
-
resizeInfoRef,
|
|
2845
|
-
selectionExtensionElementRef,
|
|
2846
|
-
onColumnResizing,
|
|
2847
|
-
onColumnResize,
|
|
2848
|
-
activeCell,
|
|
2849
|
-
onActiveCellChanged,
|
|
2850
|
-
isDropDownSelection: isEmbedded,
|
|
2851
|
-
selectionMode,
|
|
2852
|
-
selected,
|
|
2853
|
-
onTableSelectionChange,
|
|
2854
|
-
activeStyleColumnInfo,
|
|
2855
|
-
setActiveStyleColumnInfo,
|
|
2856
|
-
onRowAction,
|
|
2857
|
-
showTooltip,
|
|
2858
|
-
hideTooltip,
|
|
2859
|
-
tooltipId
|
|
2860
|
-
});
|
|
2861
|
-
const scrollHandlingProps = TableColGroup.useScrollHandling({
|
|
2862
|
-
rootRef,
|
|
2863
|
-
viewportInfo,
|
|
2864
|
-
tableId,
|
|
2865
|
-
isLayoutRequired,
|
|
2866
|
-
sizingInfoRef,
|
|
2867
|
-
overflowInfoRef,
|
|
2868
|
-
columnsArray,
|
|
2869
|
-
stickyColumnInfo,
|
|
2870
|
-
stickyEdgesState,
|
|
2871
|
-
setStickyEdgesState,
|
|
2872
|
-
fullColumnWidths: appliedColumnWidths?.fullColumnWidths,
|
|
2873
|
-
horizontalScrollPositionOverride,
|
|
2874
|
-
verticalScrollPositionOverride,
|
|
2875
|
-
tooltipAnchorRef,
|
|
2876
|
-
hideTooltip,
|
|
2877
|
-
isPendingLayout,
|
|
2878
|
-
isRtl
|
|
2879
|
-
});
|
|
2880
|
-
const { contextMenuTriggerProps, menuProps, contextMenuContext, isResizeDialogOpen, setIsResizeDialogOpen } = useContextMenu(rootRef, tableId, tableData, columnsArray, contextMenuConfig, sortCriterion, onSortCriterionChange);
|
|
2881
|
-
const interactionManagerProps = !isPendingLayout
|
|
2882
|
-
? mergeProps.mergeProps(focusHandlingProps, keyboardHandlingProps, pointerHandlingProps, contextMenuTriggerProps)
|
|
2883
|
-
: focusHandlingProps;
|
|
2884
|
-
// setup imperative handle implementation
|
|
2885
|
-
hooks.useImperativeHandle(ref, () => {
|
|
2886
|
-
const rootElement = rootRef.current;
|
|
2887
|
-
const scrollerElement = viewportInfo.viewportConfig.scrollerRef.current;
|
|
2888
|
-
return {
|
|
2889
|
-
focus: () => {
|
|
2890
|
-
if (rootElement != null) {
|
|
2891
|
-
if (currentActiveCell != null) {
|
|
2892
|
-
const cellElement = TableColGroup.getElementFromCell(rootElement, tableId, currentActiveCell);
|
|
2893
|
-
if (cellElement != null) {
|
|
2894
|
-
cellElement.focus();
|
|
2895
|
-
return;
|
|
2896
|
-
}
|
|
2897
|
-
}
|
|
2898
|
-
// if no current cell element was found, just focus the root element
|
|
2899
|
-
rootElement.focus();
|
|
2900
|
-
}
|
|
2901
|
-
},
|
|
2902
|
-
getHorizontalScrollPosition: () => {
|
|
2903
|
-
if (rootElement == null ||
|
|
2904
|
-
scrollerElement == null ||
|
|
2905
|
-
isLayoutRequired ||
|
|
2906
|
-
appliedColumnWidths == null) {
|
|
2907
|
-
return {};
|
|
2908
|
-
}
|
|
2909
|
-
return TableColGroup.getHorizontalScrollPosition(rootElement, scrollerElement, viewportInfo, sizingInfoRef.current, overflowInfoRef.current, columnsArray, appliedColumnWidths.fullColumnWidths, isRtl);
|
|
2910
|
-
},
|
|
2911
|
-
getVerticalScrollPosition: () => {
|
|
2912
|
-
if (rootElement == null || scrollerElement == null || isLayoutRequired) {
|
|
2913
|
-
return {};
|
|
2914
|
-
}
|
|
2915
|
-
return TableColGroup.getVerticalScrollPosition(rootElement, scrollerElement, viewportInfo, tableId);
|
|
2916
|
-
}
|
|
2917
|
-
};
|
|
2918
|
-
}, [
|
|
2919
|
-
rootRef,
|
|
2920
|
-
viewportInfo,
|
|
2921
|
-
tableId,
|
|
2922
|
-
columnsArray,
|
|
2923
|
-
currentActiveCell,
|
|
2924
|
-
isLayoutRequired,
|
|
2925
|
-
appliedColumnWidths,
|
|
2926
|
-
sizingInfoRef,
|
|
2927
|
-
overflowInfoRef,
|
|
2928
|
-
isRtl
|
|
2929
|
-
]);
|
|
2930
|
-
return {
|
|
2931
|
-
interactionManagerProps,
|
|
2932
|
-
scrollHandlingProps,
|
|
2933
|
-
onTableSelectionChange,
|
|
2934
|
-
isShowFocusRing,
|
|
2935
|
-
isTabbableMode,
|
|
2936
|
-
currentCell,
|
|
2937
|
-
currentActiveCell,
|
|
2938
|
-
resizeInfoRef,
|
|
2939
|
-
onStartFocusTracking,
|
|
2940
|
-
onFocusStartEdge,
|
|
2941
|
-
onFocusEndEdge,
|
|
2942
|
-
activeStyleColumnInfo,
|
|
2943
|
-
hoverStyleColumnInfo,
|
|
2944
|
-
tooltipContent,
|
|
2945
|
-
contextMenuContext,
|
|
2946
|
-
menuProps,
|
|
2947
|
-
isResizeDialogOpen,
|
|
2948
|
-
setIsResizeDialogOpen,
|
|
2949
|
-
disabledRowInteractionKeys
|
|
2950
|
-
};
|
|
2951
|
-
}
|
|
2952
|
-
|
|
2953
|
-
/**
|
|
2954
|
-
* The internal component used to render an empty table cell in a TableBody.
|
|
2955
|
-
*/
|
|
2956
|
-
function TableNoData({ rootRef, tableId, columnsCount, isShowFocusRing, hasTabIndex, isTabbableMode, ariaRowIndex, renderer }) {
|
|
2957
|
-
const browser = clientHints.getClientHints().browser;
|
|
2958
|
-
const translations = useTranslationBundle.useTranslationBundle('@oracle/oraclejet-preact');
|
|
2959
|
-
const rowClasses = classNames.classNames([PRIVATE_Table_themes_TableRowStyles_css.tableRowStyles.base]);
|
|
2960
|
-
const { classes: themeClasses } = useComponentTheme.useComponentTheme(PRIVATE_Table_themes_redwood_TableNoDataTheme.TableNoDataRedwoodTheme, {
|
|
2961
|
-
defaultRenderer: renderer == null ? 'isDefaultRenderer' : 'notDefaultRenderer',
|
|
2962
|
-
showFocusRing: isShowFocusRing ? 'isShowFocusRing' : 'notShowFocusRing'
|
|
2963
|
-
});
|
|
2964
|
-
const cellClasses = classNames.classNames([themeClasses]);
|
|
2965
|
-
function defaultContentRenderer() {
|
|
2966
|
-
return translations.collection_noData();
|
|
2967
|
-
}
|
|
2968
|
-
const contentRenderer = renderer != null ? renderer : defaultContentRenderer;
|
|
2969
|
-
// in firefox, table element heights are not stretched unless explicitly set in some cases
|
|
2970
|
-
hooks.useLayoutEffect(() => {
|
|
2971
|
-
if (browser === 'firefox') {
|
|
2972
|
-
const rootElement = rootRef.current;
|
|
2973
|
-
if (rootElement != null) {
|
|
2974
|
-
const tableBodyElement = TableColGroup.getTableBodyElement(rootElement, tableId);
|
|
2975
|
-
const noDataElement = TableColGroup.getNoDataCellElement(rootElement, tableId);
|
|
2976
|
-
if (tableBodyElement != null && noDataElement != null) {
|
|
2977
|
-
noDataElement.style.height = '';
|
|
2978
|
-
noDataElement.style.height = `${tableBodyElement.getBoundingClientRect().height}px`;
|
|
2979
|
-
}
|
|
2980
|
-
}
|
|
2981
|
-
}
|
|
2982
|
-
});
|
|
2983
|
-
return (jsxRuntime.jsx("tr", { "aria-rowindex": ariaRowIndex, class: rowClasses, role: 'row', children: jsxRuntime.jsx("td", { "aria-colindex": 1, class: cellClasses, style: browser !== 'firefox' ? 'height: 100%;' : undefined, tabIndex: hasTabIndex ? 0 : -1, role: 'gridcell', colSpan: columnsCount, "data-oj-cell-type": 'noData', "data-oj-table-focusable": tableId, "data-oj-table-nodata": tableId, children: contentRenderer({ isTabbable: isTabbableMode }) }) }));
|
|
2984
|
-
}
|
|
2985
|
-
|
|
2986
|
-
/**
|
|
2987
|
-
* @license
|
|
2988
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
2989
|
-
* The Universal Permissive License (UPL), Version 1.0
|
|
2990
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
2991
|
-
* @ignore
|
|
2992
|
-
*/
|
|
2993
|
-
// Pointer Enter handler for elements that need to prevent default browser tooltips
|
|
2994
|
-
const _pointerEnterHandler = (event) => {
|
|
2995
|
-
const targetElement = event.target;
|
|
2996
|
-
targetElement.classList.add(PRIVATE_TableCommon_themes_Common_css.preventBrowserTooltipStyle);
|
|
2997
|
-
};
|
|
2998
|
-
// Pointer Leave handler for elements that need to prevent default browser tooltips
|
|
2999
|
-
const _pointerLeaveHandler = (event) => {
|
|
3000
|
-
const targetElement = event.target;
|
|
3001
|
-
targetElement.classList.remove(PRIVATE_TableCommon_themes_Common_css.preventBrowserTooltipStyle);
|
|
3002
|
-
};
|
|
3003
|
-
/*
|
|
3004
|
-
* Props that can be spread on elements that need to prevent default browser tooltips
|
|
3005
|
-
*/
|
|
3006
|
-
const preventBrowserTooltipProps = {
|
|
3007
|
-
onPointerEnter: _pointerEnterHandler,
|
|
3008
|
-
onPointerLeave: _pointerLeaveHandler
|
|
3009
|
-
};
|
|
3010
|
-
|
|
3011
|
-
function _defaultCellRenderer({ rowData, field }) {
|
|
3012
|
-
return field != null ? String(rowData[field]) : undefined;
|
|
3013
|
-
}
|
|
3014
|
-
/**
|
|
3015
|
-
* The internal component used to render a single cell in a TableRow.
|
|
3016
|
-
*/
|
|
3017
|
-
function TableCell({ tableId, rowData, field, columnKey, columnIndex, rowKey, rowIndex, isFinalRowIndex, isFinalColumnIndex, isFirstLogicalColumnIndex, isFinalLogicalColumnIndex, hasVerticalGridlines, hasHorizontalGridlines, hasFooters, hasVerticalUnderflow, hasMore, isRowSelected, isPreviousRowSelected, isColumnSelected, isNextColumnSelected, isPreviousColumnSelected, isSticky, isShowFocusRing, hasTabIndex, isTabbableMode, isAccRowHeader, focusTarget = 'cell', renderer = _defaultCellRenderer, selectorRenderer, isRowSelectionEnabled, isRowSingleSelection, variant, applyActiveStyle, applyHoverStyle, applyPseudoHoverStyle, isStickyStartEdge, isStickyEndEdge, hasStartEdge, hasEndEdge, isRtl, isHighContrast, padding, tooltip, horizontalAlignment = 'start', verticalAlignment = 'center' }) {
|
|
3018
|
-
const browser = clientHints.getClientHints().browser;
|
|
3019
|
-
const rowContext = { key: rowKey, data: rowData };
|
|
3020
|
-
const columnPadding = typeof padding === 'function' ? padding(rowContext) : padding;
|
|
3021
|
-
const columnTooltip = typeof tooltip === 'function' ? tooltip(rowContext) : tooltip;
|
|
3022
|
-
const supportsDefaultTooltip = columnTooltip !== 'disabled';
|
|
3023
|
-
const hasLastHorizontalGridline = hasHorizontalGridlines && (hasMore || hasVerticalUnderflow || !hasFooters);
|
|
3024
|
-
const cellClasses = classNames.classNames(TableColGroup.getDataCellClassArray({
|
|
3025
|
-
isFirstColumnIndex: columnIndex === 0 || isFirstLogicalColumnIndex,
|
|
3026
|
-
isFinalColumnIndex: isFinalColumnIndex || isFinalLogicalColumnIndex,
|
|
3027
|
-
isFirstRowIndex: rowIndex === 0,
|
|
3028
|
-
isFinalRowIndex,
|
|
3029
|
-
hasVerticalGridlines,
|
|
3030
|
-
hasHorizontalGridlines,
|
|
3031
|
-
hasLastHorizontalGridline,
|
|
3032
|
-
isRowSelected,
|
|
3033
|
-
isPreviousRowSelected,
|
|
3034
|
-
isColumnSelected,
|
|
3035
|
-
isNextColumnSelected,
|
|
3036
|
-
isPreviousColumnSelected,
|
|
3037
|
-
isSticky,
|
|
3038
|
-
hasStartEdge,
|
|
3039
|
-
hasEndEdge,
|
|
3040
|
-
isShowFocusRing,
|
|
3041
|
-
isRowSelectionEnabled,
|
|
3042
|
-
isRowSingleSelection,
|
|
3043
|
-
isActive: applyActiveStyle,
|
|
3044
|
-
isHover: applyHoverStyle,
|
|
3045
|
-
isPseudoHover: applyPseudoHoverStyle,
|
|
3046
|
-
isStickyStartEdge,
|
|
3047
|
-
isStickyEndEdge,
|
|
3048
|
-
isRtl,
|
|
3049
|
-
isHighContrast,
|
|
3050
|
-
horizontalAlignment,
|
|
3051
|
-
verticalAlignment,
|
|
3052
|
-
variant,
|
|
3053
|
-
padding: columnPadding
|
|
3054
|
-
}));
|
|
3055
|
-
const cellRendererProps = {
|
|
3056
|
-
rowData: rowData,
|
|
3057
|
-
rowKey: rowKey,
|
|
3058
|
-
field: field,
|
|
3059
|
-
columnKey: columnKey,
|
|
3060
|
-
selector: selectorRenderer,
|
|
3061
|
-
isTabbable: isTabbableMode
|
|
3062
|
-
};
|
|
3063
|
-
const supportsAutoFocus = typeof focusTarget === 'function'
|
|
3064
|
-
? focusTarget(rowContext) === 'content'
|
|
3065
|
-
: focusTarget === 'content';
|
|
3066
|
-
return (jsxRuntime.jsx("td", { "aria-colindex": columnIndex + 1, class: cellClasses, tabIndex: hasTabIndex ? 0 : -1, role: isAccRowHeader ? 'rowheader' : 'gridcell', "data-oj-cell-type": 'data', "data-oj-column-key": columnKey, "data-oj-table-focusable": tableId, "data-oj-table-data": tableId, "data-oj-table-tooltip": supportsDefaultTooltip ? 'enabled' : undefined, "data-oj-table-auto-focus": supportsAutoFocus ? 'enabled' : undefined, ...(supportsDefaultTooltip && browser === 'safari' ? preventBrowserTooltipProps : {}), ...(isColumnSelected ? { 'aria-selected': true } : {}), children: jsxRuntime.jsx(FormContext.FormContext.Provider, { value: { textAlign: TableColGroup.getFormTextAlign(horizontalAlignment, isRtl) }, children: renderer(cellRendererProps) }) }));
|
|
3067
|
-
}
|
|
3068
|
-
|
|
3069
|
-
/**
|
|
3070
|
-
* The internal component used to render a single row in Table.
|
|
3071
|
-
*/
|
|
3072
|
-
function TableRow({ tableId, rowKey, rowData, rowIndex, isFinalRow, columnsArray, rowHeaderColumnKeys, hasVerticalGridlines, hasHorizontalGridlines, hasFooters, hasVerticalUnderflow, hasMore, isSelected, isPreviousSelected, isRowSelectionEnabled, isSingleRowSelectionEnabled, selectedRowKeys = { all: false, keys: new Set() }, isShowFocusRing, activeColumnKey, isTabbableMode, selectedColumnKeys = { all: false, keys: new Set() }, variant, disabledInteractionKeys, onSelectionChange, startStickyEdge, endStickyEdge, firstStickyColumnIndex, finalStickyColumnIndex, columnBorderEdges, isRtl, isHighContrast }) {
|
|
3073
|
-
const translations = useTranslationBundle.useTranslationBundle('@oracle/oraclejet-preact');
|
|
3074
|
-
const { interactionProps, applyActiveStyle, applyHoverStyle, applyPseudoHoverStyle } = useInteractionStyle.useInteractionStyle({ disabledKeys: disabledInteractionKeys });
|
|
3075
|
-
const rowStyles = isHighContrast ? PRIVATE_Table_themes_TableRowStyles_css.tableRowStylesHC : PRIVATE_Table_themes_TableRowStyles_css.tableRowStyles;
|
|
3076
|
-
const classArray = [rowStyles.base, isFinalRow ? rowStyles.lastRowHeight : rowStyles.rowHeight];
|
|
3077
|
-
const classes = classNames.classNames(classArray);
|
|
3078
|
-
const accessibleRowName = (rowIndex + 2).toString();
|
|
3079
|
-
const handleRowSelectorChange = (detail) => {
|
|
3080
|
-
if (onSelectionChange != null) {
|
|
3081
|
-
onSelectionChange({
|
|
3082
|
-
value: {
|
|
3083
|
-
row: detail.value,
|
|
3084
|
-
column: { all: false, keys: new Set() }
|
|
3085
|
-
},
|
|
3086
|
-
target: detail.target
|
|
3087
|
-
}, false);
|
|
3088
|
-
}
|
|
3089
|
-
};
|
|
3090
|
-
const selectorRenderer = isRowSelectionEnabled && !isSingleRowSelectionEnabled
|
|
3091
|
-
? () => {
|
|
3092
|
-
// conversion from 0-based index and adding the header row as it is always rendered
|
|
3093
|
-
return (jsxRuntime.jsx(Selector.Selector, { "aria-label": translations.collection_selectRow({ ROW_NAME: accessibleRowName }), onChange: handleRowSelectorChange, rowKey: rowKey, selectedKeys: selectedRowKeys }));
|
|
3094
|
-
}
|
|
3095
|
-
: undefined;
|
|
3096
|
-
let isPreviousColumnSelected = false;
|
|
3097
|
-
let isPreviousStickyColumnSelected = false;
|
|
3098
|
-
return (jsxRuntime.jsx("tr", { "aria-rowindex": rowIndex + 2, class: classes, role: 'row', "data-oj-key": rowKey, "data-oj-table-row": tableId, ...(isRowSelectionEnabled
|
|
3099
|
-
? isSelected
|
|
3100
|
-
? { 'aria-selected': true }
|
|
3101
|
-
: { 'aria-selected': false }
|
|
3102
|
-
: {}), ...(typeof rowKey === 'number' && { 'data-oj-key-type': 'number' }), ...(isRowSelectionEnabled && interactionProps), children: columnsArray.map((column, columnIndex) => {
|
|
3103
|
-
const columnKey = column.key;
|
|
3104
|
-
const isColumnSelected = keys.containsKey(selectedColumnKeys, columnKey);
|
|
3105
|
-
const isActive = columnKey === activeColumnKey;
|
|
3106
|
-
const hasTabIndex = isActive && !isTabbableMode;
|
|
3107
|
-
const isSticky = column.value.sticky === 'enabled';
|
|
3108
|
-
let nextVisibleColumn;
|
|
3109
|
-
let isNextVisibleColumnSelected = false;
|
|
3110
|
-
let isPreviousVisibleColumnSelected = false;
|
|
3111
|
-
let isFirstLogicalColumnIndex = false;
|
|
3112
|
-
let isFinalLogicalColumnIndex = false;
|
|
3113
|
-
if (isSticky) {
|
|
3114
|
-
if (startStickyEdge != null && firstStickyColumnIndex === columnIndex) {
|
|
3115
|
-
isFirstLogicalColumnIndex = true;
|
|
3116
|
-
}
|
|
3117
|
-
if (endStickyEdge != null && finalStickyColumnIndex === columnIndex) {
|
|
3118
|
-
isFinalLogicalColumnIndex = true;
|
|
3119
|
-
}
|
|
3120
|
-
if ((startStickyEdge != null && startStickyEdge > columnIndex) ||
|
|
3121
|
-
(endStickyEdge != null && endStickyEdge <= columnIndex)) {
|
|
3122
|
-
for (let i = columnIndex + 1; i < columnsArray.length; i++) {
|
|
3123
|
-
if (columnsArray[i].value.sticky === 'enabled') {
|
|
3124
|
-
nextVisibleColumn = columnsArray[i];
|
|
3125
|
-
break;
|
|
3126
|
-
}
|
|
3127
|
-
}
|
|
3128
|
-
}
|
|
3129
|
-
else {
|
|
3130
|
-
nextVisibleColumn =
|
|
3131
|
-
columnIndex < columnsArray.length - 1 ? columnsArray[columnIndex + 1] : undefined;
|
|
3132
|
-
}
|
|
3133
|
-
isNextVisibleColumnSelected =
|
|
3134
|
-
startStickyEdge === columnIndex
|
|
3135
|
-
? false
|
|
3136
|
-
: nextVisibleColumn != null && keys.containsKey(selectedColumnKeys, nextVisibleColumn.key);
|
|
3137
|
-
if ((startStickyEdge != null && startStickyEdge >= columnIndex) ||
|
|
3138
|
-
(endStickyEdge != null && endStickyEdge < columnIndex)) {
|
|
3139
|
-
isPreviousVisibleColumnSelected = isPreviousStickyColumnSelected;
|
|
3140
|
-
}
|
|
3141
|
-
else if (endStickyEdge !== columnIndex) {
|
|
3142
|
-
isPreviousVisibleColumnSelected = isPreviousColumnSelected;
|
|
3143
|
-
}
|
|
3144
|
-
}
|
|
3145
|
-
else {
|
|
3146
|
-
isPreviousVisibleColumnSelected = isPreviousColumnSelected;
|
|
3147
|
-
}
|
|
3148
|
-
const cellProps = {
|
|
3149
|
-
tableId: tableId,
|
|
3150
|
-
rowData: rowData,
|
|
3151
|
-
field: column.value.field,
|
|
3152
|
-
stickyColumn: column.value.sticky,
|
|
3153
|
-
columnKey: columnKey,
|
|
3154
|
-
columnIndex: columnIndex,
|
|
3155
|
-
rowKey: rowKey,
|
|
3156
|
-
rowIndex: rowIndex,
|
|
3157
|
-
isFinalRowIndex: isFinalRow,
|
|
3158
|
-
isFinalColumnIndex: columnIndex === columnsArray.length - 1,
|
|
3159
|
-
isFirstLogicalColumnIndex: isFirstLogicalColumnIndex,
|
|
3160
|
-
isFinalLogicalColumnIndex: isFinalLogicalColumnIndex,
|
|
3161
|
-
hasVerticalGridlines: hasVerticalGridlines,
|
|
3162
|
-
hasHorizontalGridlines: hasHorizontalGridlines,
|
|
3163
|
-
hasFooters: hasFooters,
|
|
3164
|
-
hasVerticalUnderflow: hasVerticalUnderflow,
|
|
3165
|
-
hasMore: hasMore,
|
|
3166
|
-
isRowSelected: isSelected,
|
|
3167
|
-
isPreviousRowSelected: isPreviousSelected,
|
|
3168
|
-
isSticky: isSticky,
|
|
3169
|
-
isColumnSelected: isColumnSelected,
|
|
3170
|
-
isNextColumnSelected: isNextVisibleColumnSelected,
|
|
3171
|
-
isPreviousColumnSelected: isPreviousVisibleColumnSelected,
|
|
3172
|
-
isShowFocusRing: isShowFocusRing && isActive,
|
|
3173
|
-
hasTabIndex: hasTabIndex,
|
|
3174
|
-
isTabbableMode: isTabbableMode,
|
|
3175
|
-
isAccRowHeader: rowHeaderColumnKeys.has(column.key),
|
|
3176
|
-
renderer: column.value.renderer,
|
|
3177
|
-
selectorRenderer: selectorRenderer,
|
|
3178
|
-
isRowSelectionEnabled: isRowSelectionEnabled,
|
|
3179
|
-
variant: variant,
|
|
3180
|
-
isRowSingleSelection: isSingleRowSelectionEnabled,
|
|
3181
|
-
applyActiveStyle: applyActiveStyle,
|
|
3182
|
-
applyHoverStyle: applyHoverStyle,
|
|
3183
|
-
applyPseudoHoverStyle: applyPseudoHoverStyle,
|
|
3184
|
-
isStickyStartEdge: columnIndex === startStickyEdge,
|
|
3185
|
-
isStickyEndEdge: columnIndex === endStickyEdge,
|
|
3186
|
-
hasStartEdge: columnBorderEdges[columnIndex].hasStart,
|
|
3187
|
-
hasEndEdge: columnBorderEdges[columnIndex].hasEnd,
|
|
3188
|
-
isRtl: isRtl,
|
|
3189
|
-
isHighContrast: isHighContrast,
|
|
3190
|
-
padding: column.value.padding,
|
|
3191
|
-
tooltip: column.value.tooltip,
|
|
3192
|
-
focusTarget: column.value.focusTarget,
|
|
3193
|
-
horizontalAlignment: column.value.alignment?.horizontal != null
|
|
3194
|
-
? column.value.alignment.horizontal
|
|
3195
|
-
: column.value.horizontalAlignment,
|
|
3196
|
-
verticalAlignment: column.value.alignment?.vertical
|
|
3197
|
-
};
|
|
3198
|
-
isPreviousColumnSelected = isColumnSelected;
|
|
3199
|
-
if (isSticky) {
|
|
3200
|
-
isPreviousStickyColumnSelected = isColumnSelected;
|
|
3201
|
-
}
|
|
3202
|
-
return jsxRuntime.jsx(TableCell, { ...cellProps });
|
|
3203
|
-
}) }, rowKey));
|
|
3204
|
-
}
|
|
3205
|
-
const _areStringSetsEquivalent = (set1, set2) => {
|
|
3206
|
-
if (set1 == null) {
|
|
3207
|
-
return set2 == null;
|
|
3208
|
-
}
|
|
3209
|
-
if (set2 == null) {
|
|
3210
|
-
return false;
|
|
3211
|
-
}
|
|
3212
|
-
return set1.size === set2.size && [...set1].every((x) => set2.has(x));
|
|
3213
|
-
};
|
|
3214
|
-
const _areColumnsArraysEquivalent = (columnsArray1, columnsArray2) => {
|
|
3215
|
-
if (columnsArray1.length === columnsArray2.length) {
|
|
3216
|
-
for (let i = 0; i < columnsArray1.length; i++) {
|
|
3217
|
-
if (columnsArray1[i].key !== columnsArray2[i].key ||
|
|
3218
|
-
columnsArray1[i].value !== columnsArray2[i].value) {
|
|
3219
|
-
return false;
|
|
3220
|
-
}
|
|
3221
|
-
}
|
|
3222
|
-
return true;
|
|
3223
|
-
}
|
|
3224
|
-
return false;
|
|
3225
|
-
};
|
|
3226
|
-
const MemoizeTableRow = compat.memo(TableRow, (prev, next) => {
|
|
3227
|
-
if (prev && next) {
|
|
3228
|
-
return (prev.tableId === next.tableId &&
|
|
3229
|
-
prev.rowKey === next.rowKey &&
|
|
3230
|
-
prev.rowData === next.rowData &&
|
|
3231
|
-
prev.rowIndex === next.rowIndex &&
|
|
3232
|
-
prev.isFinalRow === next.isFinalRow &&
|
|
3233
|
-
_areColumnsArraysEquivalent(prev.columnsArray, next.columnsArray) &&
|
|
3234
|
-
prev.hasHorizontalGridlines === next.hasHorizontalGridlines &&
|
|
3235
|
-
prev.hasVerticalGridlines === next.hasVerticalGridlines &&
|
|
3236
|
-
(!next.isFinalRow ||
|
|
3237
|
-
(prev.hasFooters === next.hasFooters &&
|
|
3238
|
-
prev.hasVerticalUnderflow === next.hasVerticalUnderflow &&
|
|
3239
|
-
prev.hasMore === next.hasMore)) &&
|
|
3240
|
-
_areStringSetsEquivalent(prev.rowHeaderColumnKeys, next.rowHeaderColumnKeys) &&
|
|
3241
|
-
prev.isSelected === next.isSelected &&
|
|
3242
|
-
prev.isPreviousSelected === next.isPreviousSelected &&
|
|
3243
|
-
prev.isRowSelectionEnabled === next.isRowSelectionEnabled &&
|
|
3244
|
-
prev.isSingleRowSelectionEnabled === next.isSingleRowSelectionEnabled &&
|
|
3245
|
-
(prev.isRowSelectionEnabled && !prev.isSingleRowSelectionEnabled
|
|
3246
|
-
? keys.isSameKey(prev.selectedRowKeys, next.selectedRowKeys)
|
|
3247
|
-
: true) &&
|
|
3248
|
-
keys.isSameKey(prev.selectedColumnKeys, next.selectedColumnKeys) &&
|
|
3249
|
-
prev.isShowFocusRing === next.isShowFocusRing &&
|
|
3250
|
-
prev.activeColumnKey === next.activeColumnKey &&
|
|
3251
|
-
prev.isTabbableMode === next.isTabbableMode &&
|
|
3252
|
-
prev.variant === next.variant &&
|
|
3253
|
-
prev.onSelectionChange === next.onSelectionChange &&
|
|
3254
|
-
prev.startStickyEdge === next.startStickyEdge &&
|
|
3255
|
-
prev.endStickyEdge === next.endStickyEdge &&
|
|
3256
|
-
prev.firstStickyColumnIndex === next.firstStickyColumnIndex &&
|
|
3257
|
-
prev.finalStickyColumnIndex === next.finalStickyColumnIndex &&
|
|
3258
|
-
prev.columnBorderEdges === next.columnBorderEdges &&
|
|
3259
|
-
prev.isRtl === next.isRtl &&
|
|
3260
|
-
prev.isHighContrast === next.isHighContrast &&
|
|
3261
|
-
prev.disabledInteractionKeys === next.disabledInteractionKeys);
|
|
3262
|
-
}
|
|
3263
|
-
return false;
|
|
3264
|
-
});
|
|
3265
|
-
|
|
3266
|
-
/**
|
|
3267
|
-
* The internal component used to render the tbody of a Table.
|
|
3268
|
-
*/
|
|
3269
|
-
function TableBody({ rootRef, viewportInfo, tableId, isValidRender, getAccessibleRowHeaders, tableData, columnsArray, hasVerticalGridlines, hasHorizontalGridlines, hasFooters, hasVerticalUnderflow, isShowFocusRing, isTabbableMode, hasMore, onLoadMore, activeCell, currentRowKey, currentRowVariant, selected, isRowSelectionEnabled, isSingleRowSelectionEnabled, disabledInteractionKeys, onSelectionChange, noDataRenderer, startStickyEdge, endStickyEdge, firstStickyColumnIndex, finalStickyColumnIndex, columnBorderEdges, isRtl, isEmbedded, isHighContrast }) {
|
|
3270
|
-
const browser = clientHints.getClientHints().browser;
|
|
3271
|
-
// returns a TableRowContext based on ItemContext (added key)
|
|
3272
|
-
const getRowContext = hooks.useCallback((context) => {
|
|
3273
|
-
return {
|
|
3274
|
-
index: context.index,
|
|
3275
|
-
data: context.data.data,
|
|
3276
|
-
key: context.data.metadata.key
|
|
3277
|
-
};
|
|
3278
|
-
}, []);
|
|
3279
|
-
let isPreviousSelected = false;
|
|
3280
|
-
const collectionChildrenFunc = (context) => {
|
|
3281
|
-
const tableRowContext = getRowContext(context);
|
|
3282
|
-
const rowKey = tableRowContext.key;
|
|
3283
|
-
const containsActiveCell = activeCell?.rowKey === rowKey;
|
|
3284
|
-
const activeColumnKey = containsActiveCell ? activeCell.columnKey : undefined;
|
|
3285
|
-
const isSelected = keys.containsKey(selected.row, rowKey);
|
|
3286
|
-
const rowProps = {
|
|
3287
|
-
tableId,
|
|
3288
|
-
columnsArray,
|
|
3289
|
-
rowHeaderColumnKeys: getAccessibleRowHeaders(tableRowContext),
|
|
3290
|
-
hasVerticalGridlines,
|
|
3291
|
-
hasHorizontalGridlines,
|
|
3292
|
-
hasFooters,
|
|
3293
|
-
hasVerticalUnderflow,
|
|
3294
|
-
hasMore,
|
|
3295
|
-
isSelected,
|
|
3296
|
-
isPreviousSelected,
|
|
3297
|
-
disabledInteractionKeys,
|
|
3298
|
-
onSelectionChange,
|
|
3299
|
-
isRowSelectionEnabled,
|
|
3300
|
-
isSingleRowSelectionEnabled,
|
|
3301
|
-
variant: currentRowKey === rowKey ? currentRowVariant : 'none',
|
|
3302
|
-
isShowFocusRing: isShowFocusRing && containsActiveCell,
|
|
3303
|
-
activeColumnKey,
|
|
3304
|
-
isTabbableMode,
|
|
3305
|
-
selectedRowKeys: selected.row,
|
|
3306
|
-
selectedColumnKeys: selected.column,
|
|
3307
|
-
rowIndex: tableRowContext.index,
|
|
3308
|
-
rowKey,
|
|
3309
|
-
rowData: tableRowContext.data,
|
|
3310
|
-
isFinalRow: tableRowContext.index === tableData.length - 1,
|
|
3311
|
-
startStickyEdge,
|
|
3312
|
-
endStickyEdge,
|
|
3313
|
-
firstStickyColumnIndex: firstStickyColumnIndex,
|
|
3314
|
-
finalStickyColumnIndex: finalStickyColumnIndex,
|
|
3315
|
-
columnBorderEdges,
|
|
3316
|
-
isRtl,
|
|
3317
|
-
isHighContrast
|
|
3318
|
-
};
|
|
3319
|
-
isPreviousSelected = isSelected;
|
|
3320
|
-
return jsxRuntime.jsx(MemoizeTableRow, { ...rowProps });
|
|
3321
|
-
};
|
|
3322
|
-
const getNoDataProps = () => {
|
|
3323
|
-
const isActive = activeCell?.type === 'noData';
|
|
3324
|
-
const hasTabIndex = isActive && !isTabbableMode;
|
|
3325
|
-
return {
|
|
3326
|
-
rootRef,
|
|
3327
|
-
tableId,
|
|
3328
|
-
columnsCount: columnsArray.length,
|
|
3329
|
-
isShowFocusRing: isShowFocusRing && isActive,
|
|
3330
|
-
hasTabIndex,
|
|
3331
|
-
isTabbableMode,
|
|
3332
|
-
ariaRowIndex: isValidRender ? 2 : 1,
|
|
3333
|
-
renderer: isValidRender ? noDataRenderer : undefined
|
|
3334
|
-
};
|
|
3335
|
-
};
|
|
3336
|
-
const isShowEmptyLoading = tableData.length === 0 && hasMore;
|
|
3337
|
-
const isShowNoData = tableData.length === 0 && !hasMore;
|
|
3338
|
-
return (jsxRuntime.jsx("tbody", { class: PRIVATE_Table_themes_Table_css.backgroundStyles.inherit, role: 'presentation', "data-oj-table-body": tableId, children: isShowNoData || !isValidRender ? (jsxRuntime.jsx(TableNoData, { ...getNoDataProps() })) : (jsxRuntime.jsxs(preact.Fragment, { children: [jsxRuntime.jsx(LoadMoreCollection.LoadMoreCollection, { data: tableData, loadMoreIndicator: jsxRuntime.jsx(TableColGroup.TableSkeletonRow, { tableId: tableId, hasTabIndex: isShowEmptyLoading
|
|
3339
|
-
? activeCell?.type === 'loading'
|
|
3340
|
-
: activeCell?.type === 'loadMore', colspan: columnsArray.length, isLoadMore: !isShowEmptyLoading, isShowFocusRing: isShowFocusRing &&
|
|
3341
|
-
(isShowEmptyLoading
|
|
3342
|
-
? activeCell?.type === 'loading'
|
|
3343
|
-
: activeCell?.type === 'loadMore'), isEmbedded: isEmbedded, isHighContrast: isHighContrast }), hasMore: hasMore, onLoadMore: onLoadMore, viewportConfig: viewportInfo.viewportConfig, children: collectionChildrenFunc }), jsxRuntime.jsx("tr", { style: browser !== 'firefox' ? 'height: 100%;' : undefined, role: 'presentation', "data-oj-table-spacer": tableId })] })) }));
|
|
3344
|
-
}
|
|
3345
|
-
|
|
3346
|
-
/**
|
|
3347
|
-
* The internal component used to render a drag indicator line in the Table.
|
|
3348
|
-
*/
|
|
3349
|
-
function TableDragIndicator({ position, isRtl, height }) {
|
|
3350
|
-
const tableDragIndicatorClasses = classNames.classNames([PRIVATE_Table_themes_Table_css.tableDragIndicatorStyles.base]);
|
|
3351
|
-
const getDragIndicatorStyle = () => {
|
|
3352
|
-
const heightString = height != null ? `height:${height}px;` : '';
|
|
3353
|
-
if (position != null) {
|
|
3354
|
-
return isRtl
|
|
3355
|
-
? `right:${position}px;cursor:col-resize;${heightString}`
|
|
3356
|
-
: `left:${position}px;cursor:col-resize;${heightString}`;
|
|
3357
|
-
}
|
|
3358
|
-
return `display:none;`;
|
|
3359
|
-
};
|
|
3360
|
-
return jsxRuntime.jsx("div", { class: tableDragIndicatorClasses, style: getDragIndicatorStyle() });
|
|
3361
|
-
}
|
|
3362
|
-
|
|
3363
|
-
function _defaultFooterCellRenderer({ footerText }) {
|
|
3364
|
-
return footerText != null ? footerText : undefined;
|
|
3365
|
-
}
|
|
3366
|
-
/**
|
|
3367
|
-
* The internal component used to render a single cell in a TableFooterRow.
|
|
3368
|
-
*/
|
|
3369
|
-
function TableFooterCell({ tableId, columnKey, columnIndex, isFinalColumnIndex, isFirstLogicalColumnIndex, isFinalLogicalColumnIndex, hasVerticalGridlines, isSelected, isNextColumnSelected, isPreviousColumnSelected, isSticky, isColumnSelectable, isShowFocusRing, hasTabIndex, isTabbableMode, stickyBottomOffset = 0, focusTarget = 'cell', footerText, renderer = _defaultFooterCellRenderer, isStickyStartEdge, isStickyEndEdge, hasStartEdge, hasEndEdge, isActiveStyle, isHoverStyle, isPreviousCellActiveStyle, isPreviousCellHoverStyle, isRtl, isHighContrast, padding, tooltip, horizontalAlignment = 'start', verticalAlignment = 'center' }) {
|
|
3370
|
-
const browser = clientHints.getClientHints().browser;
|
|
3371
|
-
const supportsDefaultTooltip = tooltip !== 'disabled';
|
|
3372
|
-
const supportsAutoFocus = focusTarget === 'content';
|
|
3373
|
-
const cellClasses = classNames.classNames(TableColGroup.getHeaderFooterCellClassArray({
|
|
3374
|
-
isHeader: false,
|
|
3375
|
-
isActiveStyle,
|
|
3376
|
-
isHoverStyle,
|
|
3377
|
-
isPreviousCellActiveStyle,
|
|
3378
|
-
isPreviousCellHoverStyle,
|
|
3379
|
-
isFirstColumnIndex: columnIndex === 0 || isFirstLogicalColumnIndex,
|
|
3380
|
-
isFinalColumnIndex: isFinalColumnIndex || isFinalLogicalColumnIndex,
|
|
3381
|
-
hasVerticalGridlines,
|
|
3382
|
-
isSelected,
|
|
3383
|
-
isNextColumnSelected,
|
|
3384
|
-
isPreviousColumnSelected,
|
|
3385
|
-
isSticky,
|
|
3386
|
-
hasStartEdge,
|
|
3387
|
-
hasEndEdge,
|
|
3388
|
-
isShowFocusRing,
|
|
3389
|
-
isStickyStartEdge,
|
|
3390
|
-
isStickyEndEdge,
|
|
3391
|
-
isRtl,
|
|
3392
|
-
horizontalAlignment,
|
|
3393
|
-
verticalAlignment,
|
|
3394
|
-
isHighContrast,
|
|
3395
|
-
padding
|
|
3396
|
-
}));
|
|
3397
|
-
const footerCellRendererProps = {
|
|
3398
|
-
key: columnKey,
|
|
3399
|
-
footerText: footerText,
|
|
3400
|
-
isTabbable: isTabbableMode
|
|
3401
|
-
};
|
|
3402
|
-
return (jsxRuntime.jsx("td", { "aria-colindex": columnIndex + 1, ...(isSelected
|
|
3403
|
-
? { 'aria-selected': true }
|
|
3404
|
-
: isColumnSelectable
|
|
3405
|
-
? { 'aria-selected': false }
|
|
3406
|
-
: {}), class: cellClasses, style: `bottom:${stickyBottomOffset}px;`, tabIndex: hasTabIndex ? 0 : -1, role: 'gridcell', "data-oj-cell-type": 'footer', "data-oj-column-key": columnKey, "data-oj-table-focusable": tableId, "data-oj-table-footer": tableId, "data-oj-table-tooltip": supportsDefaultTooltip ? 'enabled' : undefined, "data-oj-table-auto-focus": supportsAutoFocus ? 'enabled' : undefined, ...(supportsDefaultTooltip && browser === 'safari' ? preventBrowserTooltipProps : {}), children: jsxRuntime.jsx(FormContext.FormContext.Provider, { value: { textAlign: TableColGroup.getFormTextAlign(horizontalAlignment, isRtl) }, children: renderer(footerCellRendererProps) }) }));
|
|
3407
|
-
}
|
|
3408
|
-
|
|
3409
|
-
/**
|
|
3410
|
-
* The internal component used to render a footer region in Table.
|
|
3411
|
-
*/
|
|
3412
|
-
function TableFooter({ tableId, isRendered, columnsArray, hasVerticalGridlines, activeKey, isTabbableMode, isShowFocusRing, selectedColumnKeys, isColumnSelectionEnabled, activeStyleKey, hoverStyleKey, stickyBottomOffset, startStickyEdge, endStickyEdge, firstStickyColumnIndex, finalStickyColumnIndex, columnBorderEdges, dataRowCount, isRtl, isHighContrast }) {
|
|
3413
|
-
const rowClasses = classNames.classNames([PRIVATE_Table_themes_Table_css.tableFooterRowStyles.base]);
|
|
3414
|
-
let previousColumnKey;
|
|
3415
|
-
let previousStickyColumnKey;
|
|
3416
|
-
let isPreviousSelectable = false;
|
|
3417
|
-
let isPreviousStickySelectable = false;
|
|
3418
|
-
let isPreviousColumnSelected = false;
|
|
3419
|
-
let isPreviousStickyColumnSelected = false;
|
|
3420
|
-
return isRendered ? (jsxRuntime.jsx("tfoot", { class: PRIVATE_Table_themes_Table_css.backgroundStyles.inherit, role: 'presentation', children: jsxRuntime.jsx("tr", { "aria-rowindex": Math.max(dataRowCount, 1) + 2, class: rowClasses, role: 'row', "data-oj-table-footer-row": tableId, children: columnsArray.map((column, columnIndex) => {
|
|
3421
|
-
const columnKey = column.key;
|
|
3422
|
-
const isSticky = column.value.sticky === 'enabled';
|
|
3423
|
-
const isSelectable = isColumnSelectionEnabled && column.value.selectable !== 'disabled';
|
|
3424
|
-
const isSelected = keys.containsKey(selectedColumnKeys, columnKey);
|
|
3425
|
-
const isActive = columnKey === activeKey;
|
|
3426
|
-
const hasTabIndex = isActive && !isTabbableMode;
|
|
3427
|
-
let previousVisibleColumnKey;
|
|
3428
|
-
let isPreviousVisibleColumnSelectable = false;
|
|
3429
|
-
let isPreviousVisibleColumnSelected = false;
|
|
3430
|
-
let nextVisibleColumn;
|
|
3431
|
-
let isNextVisibleColumnSelected = false;
|
|
3432
|
-
let isFirstLogicalColumnIndex = false;
|
|
3433
|
-
let isFinalLogicalColumnIndex = false;
|
|
3434
|
-
if (isSticky) {
|
|
3435
|
-
if (startStickyEdge != null && firstStickyColumnIndex === columnIndex) {
|
|
3436
|
-
isFirstLogicalColumnIndex = true;
|
|
3437
|
-
}
|
|
3438
|
-
if (endStickyEdge != null && finalStickyColumnIndex === columnIndex) {
|
|
3439
|
-
isFinalLogicalColumnIndex = true;
|
|
3440
|
-
}
|
|
3441
|
-
if ((startStickyEdge != null && startStickyEdge > columnIndex) ||
|
|
3442
|
-
(endStickyEdge != null && endStickyEdge <= columnIndex)) {
|
|
3443
|
-
for (let i = columnIndex + 1; i < columnsArray.length; i++) {
|
|
3444
|
-
if (columnsArray[i].value.sticky === 'enabled') {
|
|
3445
|
-
nextVisibleColumn = columnsArray[i];
|
|
3446
|
-
break;
|
|
3447
|
-
}
|
|
3448
|
-
}
|
|
3449
|
-
}
|
|
3450
|
-
else {
|
|
3451
|
-
nextVisibleColumn =
|
|
3452
|
-
columnIndex < columnsArray.length - 1 ? columnsArray[columnIndex + 1] : undefined;
|
|
3453
|
-
}
|
|
3454
|
-
isNextVisibleColumnSelected =
|
|
3455
|
-
startStickyEdge === columnIndex
|
|
3456
|
-
? false
|
|
3457
|
-
: nextVisibleColumn != null &&
|
|
3458
|
-
keys.containsKey(selectedColumnKeys, nextVisibleColumn.key);
|
|
3459
|
-
if ((startStickyEdge != null && startStickyEdge >= columnIndex) ||
|
|
3460
|
-
(endStickyEdge != null && endStickyEdge < columnIndex)) {
|
|
3461
|
-
previousVisibleColumnKey = previousStickyColumnKey;
|
|
3462
|
-
isPreviousVisibleColumnSelectable = isPreviousStickySelectable;
|
|
3463
|
-
isPreviousVisibleColumnSelected = isPreviousStickyColumnSelected;
|
|
3464
|
-
}
|
|
3465
|
-
else if (endStickyEdge !== columnIndex) {
|
|
3466
|
-
previousVisibleColumnKey = previousColumnKey;
|
|
3467
|
-
isPreviousVisibleColumnSelectable = isPreviousSelectable;
|
|
3468
|
-
isPreviousVisibleColumnSelected = isPreviousColumnSelected;
|
|
3469
|
-
}
|
|
3470
|
-
}
|
|
3471
|
-
else {
|
|
3472
|
-
previousVisibleColumnKey = previousColumnKey;
|
|
3473
|
-
isPreviousVisibleColumnSelectable = isPreviousSelectable;
|
|
3474
|
-
isPreviousVisibleColumnSelected = isPreviousColumnSelected;
|
|
3475
|
-
}
|
|
3476
|
-
const footerCellProps = {
|
|
3477
|
-
tableId: tableId,
|
|
3478
|
-
columnKey: columnKey,
|
|
3479
|
-
columnIndex: columnIndex,
|
|
3480
|
-
isFinalColumnIndex: columnIndex === columnsArray.length - 1,
|
|
3481
|
-
isFirstLogicalColumnIndex: isFirstLogicalColumnIndex,
|
|
3482
|
-
isFinalLogicalColumnIndex: isFinalLogicalColumnIndex,
|
|
3483
|
-
hasVerticalGridlines: hasVerticalGridlines,
|
|
3484
|
-
stickyBottomOffset: stickyBottomOffset,
|
|
3485
|
-
isSticky: isSticky,
|
|
3486
|
-
isSelected: isSelected,
|
|
3487
|
-
isNextColumnSelected: isNextVisibleColumnSelected,
|
|
3488
|
-
isPreviousColumnSelected: isPreviousVisibleColumnSelected,
|
|
3489
|
-
hasStartEdge: columnBorderEdges[columnIndex].hasStart,
|
|
3490
|
-
hasEndEdge: columnBorderEdges[columnIndex].hasEnd,
|
|
3491
|
-
isColumnSelectable: isSelectable,
|
|
3492
|
-
isShowFocusRing: isShowFocusRing && isActive,
|
|
3493
|
-
hasTabIndex: hasTabIndex,
|
|
3494
|
-
isTabbableMode: isTabbableMode,
|
|
3495
|
-
footerText: column.value.footerText,
|
|
3496
|
-
renderer: column.value.footerRenderer,
|
|
3497
|
-
isStickyStartEdge: columnIndex === startStickyEdge,
|
|
3498
|
-
isStickyEndEdge: columnIndex === endStickyEdge,
|
|
3499
|
-
isActiveStyle: isSelectable && activeStyleKey === columnKey,
|
|
3500
|
-
isHoverStyle: isSelectable && hoverStyleKey === columnKey,
|
|
3501
|
-
isPreviousCellActiveStyle: activeStyleKey != null &&
|
|
3502
|
-
activeStyleKey === previousVisibleColumnKey &&
|
|
3503
|
-
isPreviousVisibleColumnSelectable,
|
|
3504
|
-
isPreviousCellHoverStyle: hoverStyleKey != null &&
|
|
3505
|
-
hoverStyleKey === previousVisibleColumnKey &&
|
|
3506
|
-
isPreviousVisibleColumnSelectable,
|
|
3507
|
-
isRtl: isRtl,
|
|
3508
|
-
isHighContrast: isHighContrast,
|
|
3509
|
-
padding: column.value.footerPadding,
|
|
3510
|
-
tooltip: column.value.footerTooltip,
|
|
3511
|
-
focusTarget: column.value.footerFocusTarget,
|
|
3512
|
-
horizontalAlignment: column.value.footerAlignment?.horizontal != null
|
|
3513
|
-
? column.value.footerAlignment.horizontal
|
|
3514
|
-
: column.value.horizontalAlignment,
|
|
3515
|
-
verticalAlignment: column.value.footerAlignment?.vertical
|
|
3516
|
-
};
|
|
3517
|
-
previousColumnKey = columnKey;
|
|
3518
|
-
isPreviousSelectable = isSelectable;
|
|
3519
|
-
isPreviousColumnSelected = isSelected;
|
|
3520
|
-
if (isSticky) {
|
|
3521
|
-
previousStickyColumnKey = columnKey;
|
|
3522
|
-
isPreviousStickySelectable = isSelectable;
|
|
3523
|
-
isPreviousStickyColumnSelected = isSelected;
|
|
3524
|
-
}
|
|
3525
|
-
return jsxRuntime.jsx(TableFooterCell, { ...footerCellProps });
|
|
3526
|
-
}) }) })) : null;
|
|
3527
|
-
}
|
|
3528
|
-
|
|
3529
|
-
/**
|
|
3530
|
-
* The internal component used to render a single cell in a TableHeaderRow.
|
|
3531
|
-
*/
|
|
3532
|
-
function TableHeaderCell({ tableId, columnKey, columnIndex, isFinalColumnIndex, isFirstLogicalColumnIndex, isFinalLogicalColumnIndex, hasVerticalGridlines, isSelected, isNextColumnSelected, isPreviousColumnSelected, isSticky, isColumnSelectable, isRowSelectionEnabled, selectedRowKeys = { all: false, keys: new Set() }, isShowFocusRing, hasTabIndex, isTabbableMode, headerText, stickyTopOffset = 0, focusTarget = 'cell', renderer, onSelectionChange, isShowSortIcon, sortable = 'disabled', sortDirection = 'unsorted', onSortCriterionChange, isStickyStartEdge, isStickyEndEdge, hasStartEdge, hasEndEdge, isActiveStyle, isHoverStyle, isPreviousCellActiveStyle, isPreviousCellHoverStyle, isRtl, isAccColumnHeader, isHighContrast, padding, tooltip, horizontalAlignment = 'start', verticalAlignment = 'center' }) {
|
|
3533
|
-
const browser = clientHints.getClientHints().browser;
|
|
3534
|
-
const supportsDefaultTooltip = tooltip !== 'disabled';
|
|
3535
|
-
const supportsAutoFocus = focusTarget === 'content';
|
|
3536
|
-
const translations = useTranslationBundle.useTranslationBundle('@oracle/oraclejet-preact');
|
|
3537
|
-
const cellClasses = classNames.classNames(TableColGroup.getHeaderFooterCellClassArray({
|
|
3538
|
-
isHeader: true,
|
|
3539
|
-
isActiveStyle,
|
|
3540
|
-
isHoverStyle,
|
|
3541
|
-
isPreviousCellActiveStyle,
|
|
3542
|
-
isPreviousCellHoverStyle,
|
|
3543
|
-
isFirstColumnIndex: columnIndex === 0 || isFirstLogicalColumnIndex,
|
|
3544
|
-
isFinalColumnIndex: isFinalColumnIndex || isFinalLogicalColumnIndex,
|
|
3545
|
-
hasVerticalGridlines,
|
|
3546
|
-
isSelected,
|
|
3547
|
-
isNextColumnSelected,
|
|
3548
|
-
isPreviousColumnSelected,
|
|
3549
|
-
isSticky,
|
|
3550
|
-
isShowFocusRing,
|
|
3551
|
-
isStickyStartEdge,
|
|
3552
|
-
isStickyEndEdge,
|
|
3553
|
-
hasStartEdge,
|
|
3554
|
-
hasEndEdge,
|
|
3555
|
-
isRtl,
|
|
3556
|
-
horizontalAlignment,
|
|
3557
|
-
verticalAlignment,
|
|
3558
|
-
isHighContrast,
|
|
3559
|
-
padding
|
|
3560
|
-
}));
|
|
3561
|
-
let selectorAllState;
|
|
3562
|
-
if (keys.isSameKey(selectedRowKeys, { all: true, deletedKeys: new Set() })) {
|
|
3563
|
-
selectorAllState = 'all';
|
|
3564
|
-
}
|
|
3565
|
-
else if (keys.isSameKey(selectedRowKeys, { all: false, keys: new Set() })) {
|
|
3566
|
-
selectorAllState = 'none';
|
|
3567
|
-
}
|
|
3568
|
-
else {
|
|
3569
|
-
selectorAllState = 'partial';
|
|
3570
|
-
}
|
|
3571
|
-
const handleSelectorChange = (detail) => {
|
|
3572
|
-
if (onSelectionChange != null) {
|
|
3573
|
-
onSelectionChange({
|
|
3574
|
-
value: {
|
|
3575
|
-
row: detail.value,
|
|
3576
|
-
column: { all: false, keys: new Set() }
|
|
3577
|
-
},
|
|
3578
|
-
target: detail.target
|
|
3579
|
-
}, false);
|
|
3580
|
-
}
|
|
3581
|
-
};
|
|
3582
|
-
const selectorRenderer = isRowSelectionEnabled
|
|
3583
|
-
? () => (jsxRuntime.jsx(SelectorAll.SelectorAll, { "aria-label": translations.collection_selectAllRows(), onChange: handleSelectorChange, selected: selectorAllState }))
|
|
3584
|
-
: undefined;
|
|
3585
|
-
const handleSortGesture = hooks.useCallback(() => {
|
|
3586
|
-
if (onSortCriterionChange != null) {
|
|
3587
|
-
const newDirection = sortDirection === 'ascending' ? 'descending' : 'ascending';
|
|
3588
|
-
onSortCriterionChange([{ key: columnKey, sortDirection: newDirection }]);
|
|
3589
|
-
}
|
|
3590
|
-
}, [columnKey, sortDirection, onSortCriterionChange]);
|
|
3591
|
-
const headerCellRendererProps = {
|
|
3592
|
-
key: columnKey,
|
|
3593
|
-
headerText: headerText,
|
|
3594
|
-
sortable: sortable,
|
|
3595
|
-
sortDirection: sortDirection,
|
|
3596
|
-
selector: selectorRenderer,
|
|
3597
|
-
isTabbable: isTabbableMode
|
|
3598
|
-
};
|
|
3599
|
-
const getHeaderCellRenderer = hooks.useCallback(() => {
|
|
3600
|
-
if (renderer != null) {
|
|
3601
|
-
return renderer;
|
|
3602
|
-
}
|
|
3603
|
-
return ({ headerText, sortable, sortDirection }) => {
|
|
3604
|
-
const text = headerText != null ? (jsxRuntime.jsx("div", { class: PRIVATE_Table_themes_Table_css.tableHeaderCellTextStyles.base, children: jsxRuntime.jsx("span", { class: PRIVATE_Table_themes_TableHeaderCellStyles_css.tableHeaderCellStyles.defaultRendererSpan, children: headerText }) })) : undefined;
|
|
3605
|
-
if (sortable === 'enabled' || sortDirection !== 'unsorted') {
|
|
3606
|
-
const isIconFirst = horizontalAlignment === 'end' ||
|
|
3607
|
-
(!isRtl && horizontalAlignment === 'right') ||
|
|
3608
|
-
(isRtl && horizontalAlignment === 'left');
|
|
3609
|
-
const containerClasses = classNames.classNames([
|
|
3610
|
-
PRIVATE_Table_themes_Table_css.tableHeaderSortContainerStyles.base,
|
|
3611
|
-
PRIVATE_TableCommon_themes_Common_css.justifyContentStyles[horizontalAlignment]
|
|
3612
|
-
]);
|
|
3613
|
-
return (jsxRuntime.jsxs("div", { class: containerClasses, children: [isIconFirst && jsxRuntime.jsx(SortControl.SortControl, {}), text, !isIconFirst && jsxRuntime.jsx(SortControl.SortControl, {})] }));
|
|
3614
|
-
}
|
|
3615
|
-
return text;
|
|
3616
|
-
};
|
|
3617
|
-
}, [renderer, horizontalAlignment, isRtl]);
|
|
3618
|
-
const getAriaSelected = () => {
|
|
3619
|
-
if (isSelected) {
|
|
3620
|
-
return { 'aria-selected': true };
|
|
3621
|
-
}
|
|
3622
|
-
return isColumnSelectable ? { 'aria-selected': false } : undefined;
|
|
3623
|
-
};
|
|
3624
|
-
const getAriaSort = () => {
|
|
3625
|
-
if (sortDirection === 'ascending' || sortDirection === 'descending') {
|
|
3626
|
-
return { 'aria-sort': sortDirection };
|
|
3627
|
-
}
|
|
3628
|
-
return undefined;
|
|
3629
|
-
};
|
|
3630
|
-
return (jsxRuntime.jsx(useSortableContext.SortableContext.Provider, { value: { isRendered: isShowSortIcon, sortable, sortDirection, onSort: handleSortGesture }, children: jsxRuntime.jsx("th", { "aria-colindex": columnIndex + 1, ...getAriaSelected(), ...getAriaSort(), class: cellClasses, style: `top:${stickyTopOffset}px;`, tabIndex: hasTabIndex ? 0 : -1, role: isAccColumnHeader ? 'columnheader' : 'gridcell', "data-oj-cell-type": 'header', "data-oj-column-key": columnKey, "data-oj-table-focusable": tableId, "data-oj-table-header": tableId, "data-oj-table-tooltip": supportsDefaultTooltip ? 'enabled' : undefined, "data-oj-table-auto-focus": supportsAutoFocus ? 'enabled' : undefined, ...(supportsDefaultTooltip && browser === 'safari' ? preventBrowserTooltipProps : {}), children: jsxRuntime.jsx(FormContext.FormContext.Provider, { value: { textAlign: TableColGroup.getFormTextAlign(horizontalAlignment, isRtl) }, children: getHeaderCellRenderer()(headerCellRendererProps) }) }) }));
|
|
3631
|
-
}
|
|
3632
|
-
|
|
3633
|
-
/**
|
|
3634
|
-
* The internal component used to render a header region in Table.
|
|
3635
|
-
*/
|
|
3636
|
-
function TableHeader({ tableId, isRendered, columnsArray, hasVerticalGridlines, activeKey, isTabbableMode, isShowFocusRing, selectedColumnKeys, selectedRowKeys, isColumnSelectionEnabled, isRowSelectionEnabled, onSelectionChange, isForceSortIcons, activeStyleKey, hoverStyleKey, sortCriterion, onSortCriterionChange, stickyTopOffset, startStickyEdge, endStickyEdge, firstStickyColumnIndex, finalStickyColumnIndex, columnBorderEdges, isResizeHover, isRtl, isHighContrast }) {
|
|
3637
|
-
const rowClasses = classNames.classNames([PRIVATE_Table_themes_Table_css.tableHeaderRowStyles.base]);
|
|
3638
|
-
const getStyle = () => {
|
|
3639
|
-
return isResizeHover ? 'cursor: col-resize;' : '';
|
|
3640
|
-
};
|
|
3641
|
-
let previousColumnKey;
|
|
3642
|
-
let previousStickyColumnKey;
|
|
3643
|
-
let isPreviousSelectable = false;
|
|
3644
|
-
let isPreviousStickySelectable = false;
|
|
3645
|
-
let isPreviousColumnSelected = false;
|
|
3646
|
-
let isPreviousStickyColumnSelected = false;
|
|
3647
|
-
return isRendered ? (jsxRuntime.jsx("thead", { class: PRIVATE_Table_themes_Table_css.backgroundStyles.inherit, role: 'presentation', children: jsxRuntime.jsx("tr", { "aria-rowindex": 1, class: rowClasses, role: 'row', style: getStyle(), "data-oj-table-header-row": tableId, children: columnsArray.map((column, columnIndex) => {
|
|
3648
|
-
const columnKey = column.key;
|
|
3649
|
-
let sortDirection;
|
|
3650
|
-
if (sortCriterion != null) {
|
|
3651
|
-
for (const criterion of sortCriterion) {
|
|
3652
|
-
if (criterion.key === columnKey) {
|
|
3653
|
-
sortDirection = criterion.sortDirection;
|
|
3654
|
-
break;
|
|
3655
|
-
}
|
|
3656
|
-
}
|
|
3657
|
-
}
|
|
3658
|
-
const sortable = column.value.sortable;
|
|
3659
|
-
const hasSortIcon = sortable === 'enabled' || sortDirection != null;
|
|
3660
|
-
const isShowSortIcon = hasSortIcon &&
|
|
3661
|
-
(isForceSortIcons || sortDirection != null || hoverStyleKey === columnKey);
|
|
3662
|
-
const isSticky = column.value.sticky === 'enabled';
|
|
3663
|
-
const isSelectable = isColumnSelectionEnabled && column.value.selectable !== 'disabled';
|
|
3664
|
-
const isSelected = keys.containsKey(selectedColumnKeys, columnKey);
|
|
3665
|
-
const isActive = columnKey === activeKey;
|
|
3666
|
-
const hasTabIndex = isActive && !isTabbableMode;
|
|
3667
|
-
let previousVisibleColumnKey;
|
|
3668
|
-
let isPreviousVisibleColumnSelectable = false;
|
|
3669
|
-
let isPreviousVisibleColumnSelected = false;
|
|
3670
|
-
let nextVisibleColumn;
|
|
3671
|
-
let isNextVisibleColumnSelected = false;
|
|
3672
|
-
let isFirstLogicalColumnIndex = false;
|
|
3673
|
-
let isFinalLogicalColumnIndex = false;
|
|
3674
|
-
if (isSticky) {
|
|
3675
|
-
if (startStickyEdge != null && firstStickyColumnIndex === columnIndex) {
|
|
3676
|
-
isFirstLogicalColumnIndex = true;
|
|
3677
|
-
}
|
|
3678
|
-
if (endStickyEdge != null && finalStickyColumnIndex === columnIndex) {
|
|
3679
|
-
isFinalLogicalColumnIndex = true;
|
|
3680
|
-
}
|
|
3681
|
-
if ((startStickyEdge != null && startStickyEdge > columnIndex) ||
|
|
3682
|
-
(endStickyEdge != null && endStickyEdge <= columnIndex)) {
|
|
3683
|
-
for (let i = columnIndex + 1; i < columnsArray.length; i++) {
|
|
3684
|
-
if (columnsArray[i].value.sticky === 'enabled') {
|
|
3685
|
-
nextVisibleColumn = columnsArray[i];
|
|
3686
|
-
break;
|
|
3687
|
-
}
|
|
3688
|
-
}
|
|
3689
|
-
}
|
|
3690
|
-
else {
|
|
3691
|
-
nextVisibleColumn =
|
|
3692
|
-
columnIndex < columnsArray.length - 1 ? columnsArray[columnIndex + 1] : undefined;
|
|
3693
|
-
}
|
|
3694
|
-
isNextVisibleColumnSelected =
|
|
3695
|
-
startStickyEdge === columnIndex
|
|
3696
|
-
? false
|
|
3697
|
-
: nextVisibleColumn != null &&
|
|
3698
|
-
keys.containsKey(selectedColumnKeys, nextVisibleColumn.key);
|
|
3699
|
-
if ((startStickyEdge != null && startStickyEdge >= columnIndex) ||
|
|
3700
|
-
(endStickyEdge != null && endStickyEdge < columnIndex)) {
|
|
3701
|
-
previousVisibleColumnKey = previousStickyColumnKey;
|
|
3702
|
-
isPreviousVisibleColumnSelectable = isPreviousStickySelectable;
|
|
3703
|
-
isPreviousVisibleColumnSelected = isPreviousStickyColumnSelected;
|
|
3704
|
-
}
|
|
3705
|
-
else if (endStickyEdge !== columnIndex) {
|
|
3706
|
-
previousVisibleColumnKey = previousColumnKey;
|
|
3707
|
-
isPreviousVisibleColumnSelectable = isPreviousSelectable;
|
|
3708
|
-
isPreviousVisibleColumnSelected = isPreviousColumnSelected;
|
|
3709
|
-
}
|
|
3710
|
-
}
|
|
3711
|
-
else {
|
|
3712
|
-
previousVisibleColumnKey = previousColumnKey;
|
|
3713
|
-
isPreviousVisibleColumnSelectable = isPreviousSelectable;
|
|
3714
|
-
isPreviousVisibleColumnSelected = isPreviousColumnSelected;
|
|
3715
|
-
}
|
|
3716
|
-
const headerCellProps = {
|
|
3717
|
-
tableId: tableId,
|
|
3718
|
-
hasVerticalGridlines: hasVerticalGridlines,
|
|
3719
|
-
columnKey: columnKey,
|
|
3720
|
-
columnIndex: columnIndex,
|
|
3721
|
-
isFinalColumnIndex: columnIndex === columnsArray.length - 1,
|
|
3722
|
-
isFirstLogicalColumnIndex: isFirstLogicalColumnIndex,
|
|
3723
|
-
isFinalLogicalColumnIndex: isFinalLogicalColumnIndex,
|
|
3724
|
-
stickyTopOffset: stickyTopOffset,
|
|
3725
|
-
isSticky: isSticky,
|
|
3726
|
-
isSelected: isSelected,
|
|
3727
|
-
isNextColumnSelected: isNextVisibleColumnSelected,
|
|
3728
|
-
isPreviousColumnSelected: isPreviousVisibleColumnSelected,
|
|
3729
|
-
hasStartEdge: columnBorderEdges[columnIndex].hasStart,
|
|
3730
|
-
hasEndEdge: columnBorderEdges[columnIndex].hasEnd,
|
|
3731
|
-
selectedRowKeys: selectedRowKeys,
|
|
3732
|
-
isColumnSelectable: isSelectable,
|
|
3733
|
-
isRowSelectionEnabled: isRowSelectionEnabled,
|
|
3734
|
-
isShowFocusRing: isShowFocusRing && isActive,
|
|
3735
|
-
hasTabIndex: hasTabIndex,
|
|
3736
|
-
isTabbableMode: isTabbableMode,
|
|
3737
|
-
headerText: column.value.headerText,
|
|
3738
|
-
renderer: column.value.headerRenderer,
|
|
3739
|
-
onSelectionChange: onSelectionChange,
|
|
3740
|
-
isShowSortIcon: isShowSortIcon,
|
|
3741
|
-
sortable: sortable,
|
|
3742
|
-
sortDirection: sortDirection,
|
|
3743
|
-
onSortCriterionChange: onSortCriterionChange,
|
|
3744
|
-
isStickyStartEdge: columnIndex === startStickyEdge,
|
|
3745
|
-
isStickyEndEdge: columnIndex === endStickyEdge,
|
|
3746
|
-
isActiveStyle: isSelectable && activeStyleKey === columnKey,
|
|
3747
|
-
isHoverStyle: isSelectable && hoverStyleKey === columnKey,
|
|
3748
|
-
isPreviousCellActiveStyle: activeStyleKey != null &&
|
|
3749
|
-
activeStyleKey === previousVisibleColumnKey &&
|
|
3750
|
-
isPreviousVisibleColumnSelectable,
|
|
3751
|
-
isPreviousCellHoverStyle: hoverStyleKey != null &&
|
|
3752
|
-
hoverStyleKey === previousVisibleColumnKey &&
|
|
3753
|
-
isPreviousVisibleColumnSelectable,
|
|
3754
|
-
isRtl: isRtl,
|
|
3755
|
-
isAccColumnHeader: column.value.accessibleColumnHeader !== 'disabled',
|
|
3756
|
-
isHighContrast: isHighContrast,
|
|
3757
|
-
padding: column.value.headerPadding,
|
|
3758
|
-
tooltip: column.value.headerTooltip,
|
|
3759
|
-
focusTarget: column.value.headerFocusTarget,
|
|
3760
|
-
horizontalAlignment: column.value.headerAlignment?.horizontal != null
|
|
3761
|
-
? column.value.headerAlignment.horizontal
|
|
3762
|
-
: column.value.horizontalAlignment,
|
|
3763
|
-
verticalAlignment: column.value.headerAlignment?.vertical
|
|
3764
|
-
};
|
|
3765
|
-
previousColumnKey = columnKey;
|
|
3766
|
-
isPreviousSelectable = isSelectable;
|
|
3767
|
-
isPreviousColumnSelected = isSelected;
|
|
3768
|
-
if (isSticky) {
|
|
3769
|
-
previousStickyColumnKey = columnKey;
|
|
3770
|
-
isPreviousStickySelectable = isSelectable;
|
|
3771
|
-
isPreviousStickyColumnSelected = isSelected;
|
|
3772
|
-
}
|
|
3773
|
-
return jsxRuntime.jsx(TableHeaderCell, { ...headerCellProps });
|
|
3774
|
-
}) }) })) : null;
|
|
3775
|
-
}
|
|
3776
|
-
|
|
3777
|
-
const _defaultSelected = {
|
|
3778
|
-
row: { all: false, keys: new Set() },
|
|
3779
|
-
column: { all: false, keys: new Set() }
|
|
3780
|
-
};
|
|
3781
|
-
const _disabledHeaderFooterInteractionKeys = ['enter'];
|
|
3782
|
-
/**
|
|
3783
|
-
* Component that renders data in a flat table.
|
|
3784
|
-
*/
|
|
3785
|
-
const Table = compat.forwardRef(function Table({ 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, getAccessibleRowHeaders, columns, columnOrder, columnWidths, contextMenuConfig, viewportConfig, layout = 'contents', data, getRowKey, hasMore = false, onLoadMore = () => { }, currentCellOverride, onPersistCurrentCell, currentRowVariant, gridlines, selectionMode, selected = _defaultSelected, onSelectionChange, onRowAction, sortCriterion, onSortCriterionChange, horizontalScrollPositionOverride, verticalScrollPositionOverride, columnResizingIndicator, onColumnResizing, onColumnResize, noDataRenderer, scrollerRef, testId }, ref) {
|
|
3786
|
-
const tableId = useId.useId();
|
|
3787
|
-
const testIdProps = useTestId.useTestId(testId);
|
|
3788
|
-
// rootRef is callback-based to meet useResizeObserver hook's state management requirements
|
|
3789
|
-
const [rootRef, setRootRef] = hooks.useState(preact.createRef());
|
|
3790
|
-
const rootRefCallback = hooks.useCallback((node) => {
|
|
3791
|
-
setRootRef({ current: node });
|
|
3792
|
-
}, []);
|
|
3793
|
-
// innerTableRef is callback-based to meet useResizeObserver hook's state management requirements
|
|
3794
|
-
const [innerTableRef, setInnerTableRef] = hooks.useState(preact.createRef());
|
|
3795
|
-
const innerTableRefCallback = hooks.useCallback((node) => {
|
|
3796
|
-
setInnerTableRef({ current: node });
|
|
3797
|
-
}, []);
|
|
3798
|
-
const { direction, forcedColors } = useUser.useUser();
|
|
3799
|
-
const isHighContrast = forcedColors === 'active';
|
|
3800
|
-
const isRtl = direction === 'rtl';
|
|
3801
|
-
const isEmbedded = useCollectionInteractionContext.useCollectionInteractionContext() === 'embedded';
|
|
3802
|
-
const rowVariant = currentRowVariant ?? isEmbedded ? 'highlight' : 'none';
|
|
3803
|
-
const { managedData: tableData, onManagedLoadMore: onTableLoadMore } = ScrollUtils.useDataManager({
|
|
3804
|
-
data,
|
|
3805
|
-
getRowKey,
|
|
3806
|
-
hasMore,
|
|
3807
|
-
onLoadMore
|
|
3808
|
-
});
|
|
3809
|
-
const { columnBorderEdges, isLayoutRequired, viewportInfo, columnsArray, appliedColumnWidths, sizingInfoRef, overflowInfoRef, innerTableHeight, hasVerticalUnderflow, stickyEdgesState, setStickyEdgesState, stickyColumnInfo, scrollerRefCallback } = TableColGroup.useSizingManager({
|
|
3810
|
-
rootRef,
|
|
3811
|
-
innerTableRef,
|
|
3812
|
-
tableId,
|
|
3813
|
-
tableData,
|
|
3814
|
-
viewportConfig,
|
|
3815
|
-
externalScrollerAccessRef: scrollerRef,
|
|
3816
|
-
layout,
|
|
3817
|
-
columns,
|
|
3818
|
-
columnOrder,
|
|
3819
|
-
columnWidths,
|
|
3820
|
-
isRtl,
|
|
3821
|
-
isHighContrast
|
|
3822
|
-
});
|
|
3823
|
-
const cellHasRenderer = hooks.useCallback((cell) => {
|
|
3824
|
-
let hasRenderer = false;
|
|
3825
|
-
if (cell.type === 'noData') {
|
|
3826
|
-
hasRenderer = noDataRenderer != null;
|
|
3827
|
-
}
|
|
3828
|
-
else if (cell.type !== 'loadMore' && cell.type !== 'loading' && cell.type !== 'pending') {
|
|
3829
|
-
for (const column of columnsArray) {
|
|
3830
|
-
if (column.key === cell.columnKey) {
|
|
3831
|
-
if (cell.type === 'data') {
|
|
3832
|
-
hasRenderer = column.value.renderer != null;
|
|
3833
|
-
}
|
|
3834
|
-
else if (cell.type === 'header') {
|
|
3835
|
-
hasRenderer = column.value.headerRenderer != null;
|
|
3836
|
-
}
|
|
3837
|
-
else if (cell.type === 'footer') {
|
|
3838
|
-
hasRenderer = column.value.footerRenderer != null;
|
|
3839
|
-
}
|
|
3840
|
-
break;
|
|
3841
|
-
}
|
|
3842
|
-
}
|
|
3843
|
-
}
|
|
3844
|
-
return hasRenderer;
|
|
3845
|
-
}, [columnsArray, noDataRenderer]);
|
|
3846
|
-
const isPendingLayout = layout === 'pending';
|
|
3847
|
-
// aria-rowcount includes header and footer rows
|
|
3848
|
-
const hasFooters = columnsArray.some((column) => {
|
|
3849
|
-
return column.value.footerRenderer != null || column.value.footerText != null;
|
|
3850
|
-
});
|
|
3851
|
-
const ariaRowCount = hasMore || isPendingLayout ? -1 : tableData.length + (hasFooters ? 2 : 1);
|
|
3852
|
-
const ariaColumnCount = Math.max(columnsArray.length, 1);
|
|
3853
|
-
const { interactionManagerProps, scrollHandlingProps, onTableSelectionChange, isShowFocusRing, isTabbableMode, currentCell, currentActiveCell, resizeInfoRef, onStartFocusTracking, onFocusStartEdge, onFocusEndEdge, activeStyleColumnInfo, hoverStyleColumnInfo, tooltipContent, contextMenuContext, menuProps, isResizeDialogOpen, setIsResizeDialogOpen, disabledRowInteractionKeys } = useInteractionManager({
|
|
3854
|
-
rootRef,
|
|
3855
|
-
viewportInfo,
|
|
3856
|
-
ref,
|
|
3857
|
-
tableId,
|
|
3858
|
-
tableData,
|
|
3859
|
-
hasMore,
|
|
3860
|
-
hasFooters,
|
|
3861
|
-
isRtl,
|
|
3862
|
-
columnsArray,
|
|
3863
|
-
stickyColumnInfo,
|
|
3864
|
-
appliedColumnWidths,
|
|
3865
|
-
isLayoutRequired,
|
|
3866
|
-
sizingInfoRef,
|
|
3867
|
-
overflowInfoRef,
|
|
3868
|
-
stickyEdgesState,
|
|
3869
|
-
setStickyEdgesState,
|
|
3870
|
-
cellHasRenderer,
|
|
3871
|
-
horizontalScrollPositionOverride,
|
|
3872
|
-
verticalScrollPositionOverride,
|
|
3873
|
-
onColumnResizing,
|
|
3874
|
-
onColumnResize,
|
|
3875
|
-
currentCellOverride,
|
|
3876
|
-
onPersistCurrentCell,
|
|
3877
|
-
selectionMode,
|
|
3878
|
-
selected,
|
|
3879
|
-
onSelectionChange,
|
|
3880
|
-
onRowAction,
|
|
3881
|
-
sortCriterion,
|
|
3882
|
-
onSortCriterionChange,
|
|
3883
|
-
isPendingLayout,
|
|
3884
|
-
isEmbedded,
|
|
3885
|
-
contextMenuConfig
|
|
3886
|
-
});
|
|
3887
|
-
// initialize base Table style classes
|
|
3888
|
-
const { classes: themeClasses } = useComponentTheme.useComponentTheme(PRIVATE_Table_themes_redwood_TableTheme.TableRedwoodTheme, {
|
|
3889
|
-
pendingLayout: isPendingLayout ? 'isPendingLayout' : 'notPendingLayout',
|
|
3890
|
-
showFocusRing: isShowFocusRing ? 'isShowFocusRing' : 'notShowFocusRing',
|
|
3891
|
-
externalScroller: viewportInfo.isExternalScroller ? 'isExternalScroller' : 'notExternalScroller'
|
|
3892
|
-
});
|
|
3893
|
-
let scrollerStyle;
|
|
3894
|
-
let scrollerPadding = '';
|
|
3895
|
-
const scrollerClassArray = [PRIVATE_Table_themes_Table_css.scrollerStyles.base];
|
|
3896
|
-
if (viewportInfo.isExternalScroller) {
|
|
3897
|
-
scrollerClassArray.push(PRIVATE_Table_themes_Table_css.scrollerStyles.externalScroller);
|
|
3898
|
-
}
|
|
3899
|
-
else if (!sizingInfoRef.current.isScrollbarSizeKnown) {
|
|
3900
|
-
scrollerClassArray.push(PRIVATE_Table_themes_Table_css.scrollerStyles.forceScroll);
|
|
3901
|
-
}
|
|
3902
|
-
else {
|
|
3903
|
-
if (overflowInfoRef.current.isHorizontal) {
|
|
3904
|
-
scrollerClassArray.push(PRIVATE_Table_themes_Table_css.scrollerStyles.horizontalScroll);
|
|
3905
|
-
}
|
|
3906
|
-
else {
|
|
3907
|
-
scrollerClassArray.push(PRIVATE_Table_themes_Table_css.scrollerStyles.noHorizontalScroll);
|
|
3908
|
-
}
|
|
3909
|
-
if (overflowInfoRef.current.isVertical) {
|
|
3910
|
-
scrollerClassArray.push(PRIVATE_Table_themes_Table_css.scrollerStyles.verticalScroll);
|
|
3911
|
-
}
|
|
3912
|
-
else {
|
|
3913
|
-
scrollerClassArray.push(PRIVATE_Table_themes_Table_css.scrollerStyles.noVerticalScroll);
|
|
3914
|
-
scrollerPadding = `padding-inline-end: ${sizingInfoRef.current.defaultScrollbarWidth}px;`;
|
|
3915
|
-
}
|
|
3916
|
-
}
|
|
3917
|
-
// hide the table contents when layout is required and otherwise valid
|
|
3918
|
-
if (isLayoutRequired && columnsArray.length > 0) {
|
|
3919
|
-
scrollerStyle = `${scrollerPadding}opacity:0.001;`;
|
|
3920
|
-
}
|
|
3921
|
-
else {
|
|
3922
|
-
scrollerStyle = scrollerPadding;
|
|
3923
|
-
}
|
|
3924
|
-
const scrollerClasses = classNames.classNames(scrollerClassArray);
|
|
3925
|
-
const allowBrowserContextMenu = !(clientHints.getClientHints().platform === 'ios' || clientHints.getClientHints().platform === 'android');
|
|
3926
|
-
const classArray = [themeClasses];
|
|
3927
|
-
if (!allowBrowserContextMenu) {
|
|
3928
|
-
classArray.push(PRIVATE_Table_themes_Table_css.userSelectStyles.userSelect);
|
|
3929
|
-
}
|
|
3930
|
-
const classes = classNames.classNames(classArray);
|
|
3931
|
-
const tableClasses = classNames.classNames([PRIVATE_Table_themes_Table_css.innerTableStyles.base]);
|
|
3932
|
-
const startStickyEdge = stickyEdgesState.start;
|
|
3933
|
-
const endStickyEdge = stickyEdgesState.end;
|
|
3934
|
-
const hasVerticalGridlines = gridlines?.vertical === 'visible';
|
|
3935
|
-
const hasHorizontalGridlines = gridlines?.horizontal !== 'hidden';
|
|
3936
|
-
const isRowSelectionEnabled = selectionMode?.row === 'single' ||
|
|
3937
|
-
selectionMode?.row === 'multiple' ||
|
|
3938
|
-
selectionMode?.row === 'multipleToggle';
|
|
3939
|
-
const isColumnSelectionEnabled = selectionMode?.column === 'single' || selectionMode?.column === 'multiple';
|
|
3940
|
-
const supportsMultipleSelection = selectionMode?.column === 'multiple' ||
|
|
3941
|
-
selectionMode?.row === 'multiple' ||
|
|
3942
|
-
selectionMode?.row === 'multipleToggle';
|
|
3943
|
-
const getTableBodyProps = () => {
|
|
3944
|
-
return {
|
|
3945
|
-
rootRef,
|
|
3946
|
-
viewportInfo,
|
|
3947
|
-
tableId,
|
|
3948
|
-
isValidRender: columnsArray.length > 0,
|
|
3949
|
-
tableData,
|
|
3950
|
-
columnsArray,
|
|
3951
|
-
getAccessibleRowHeaders,
|
|
3952
|
-
hasVerticalGridlines,
|
|
3953
|
-
hasHorizontalGridlines,
|
|
3954
|
-
hasFooters,
|
|
3955
|
-
hasVerticalUnderflow,
|
|
3956
|
-
selected,
|
|
3957
|
-
isRowSelectionEnabled,
|
|
3958
|
-
isSingleRowSelectionEnabled: selectionMode?.row === 'single',
|
|
3959
|
-
activeCell: currentActiveCell,
|
|
3960
|
-
currentRowKey: currentCell?.type === 'data' ? currentCell.rowKey : undefined,
|
|
3961
|
-
currentRowVariant: rowVariant,
|
|
3962
|
-
isShowFocusRing,
|
|
3963
|
-
isTabbableMode,
|
|
3964
|
-
hasMore,
|
|
3965
|
-
onLoadMore: onTableLoadMore,
|
|
3966
|
-
noDataRenderer,
|
|
3967
|
-
disabledInteractionKeys: disabledRowInteractionKeys,
|
|
3968
|
-
onSelectionChange: onTableSelectionChange,
|
|
3969
|
-
startStickyEdge,
|
|
3970
|
-
endStickyEdge,
|
|
3971
|
-
firstStickyColumnIndex: stickyColumnInfo.firstStickyColumnIndex,
|
|
3972
|
-
finalStickyColumnIndex: stickyColumnInfo.finalStickyColumnIndex,
|
|
3973
|
-
columnBorderEdges,
|
|
3974
|
-
isRtl,
|
|
3975
|
-
isEmbedded,
|
|
3976
|
-
isHighContrast
|
|
3977
|
-
};
|
|
3978
|
-
};
|
|
3979
|
-
const getTableColGroupProps = () => {
|
|
3980
|
-
let columnWidthsArray;
|
|
3981
|
-
if (!isLayoutRequired && appliedColumnWidths?.realColumnWidths != null) {
|
|
3982
|
-
columnWidthsArray = appliedColumnWidths.realColumnWidths;
|
|
3983
|
-
}
|
|
3984
|
-
else if (layout === 'fixed') {
|
|
3985
|
-
// default to 100px for each column when layout is not yet available
|
|
3986
|
-
columnWidthsArray = [];
|
|
3987
|
-
for (let i = 0; i < columnsArray.length; i++) {
|
|
3988
|
-
columnWidthsArray[i] = 100;
|
|
3989
|
-
}
|
|
3990
|
-
}
|
|
3991
|
-
else {
|
|
3992
|
-
columnWidthsArray = [];
|
|
3993
|
-
for (let i = 0; i < columnsArray.length; i++) {
|
|
3994
|
-
columnWidthsArray[i] = undefined;
|
|
3995
|
-
}
|
|
3996
|
-
}
|
|
3997
|
-
return {
|
|
3998
|
-
tableId,
|
|
3999
|
-
isRendered: columnsArray.length > 0,
|
|
4000
|
-
columnWidthsArray
|
|
4001
|
-
};
|
|
4002
|
-
};
|
|
4003
|
-
const getTableHeaderProps = () => {
|
|
4004
|
-
return {
|
|
4005
|
-
tableId,
|
|
4006
|
-
isRendered: columnsArray.length > 0,
|
|
4007
|
-
columnsArray,
|
|
4008
|
-
hasVerticalGridlines,
|
|
4009
|
-
activeKey: currentActiveCell?.type === 'header' ? currentActiveCell.columnKey : undefined,
|
|
4010
|
-
isTabbableMode,
|
|
4011
|
-
selectedColumnKeys: selected.column,
|
|
4012
|
-
selectedRowKeys: selected.row,
|
|
4013
|
-
isColumnSelectionEnabled,
|
|
4014
|
-
isRowSelectionEnabled,
|
|
4015
|
-
disabledInteractionKeys: _disabledHeaderFooterInteractionKeys,
|
|
4016
|
-
onSelectionChange: onTableSelectionChange,
|
|
4017
|
-
isForceSortIcons: layout === 'contents' && isLayoutRequired,
|
|
4018
|
-
activeStyleKey: activeStyleColumnInfo?.isHeader ? activeStyleColumnInfo?.key : undefined,
|
|
4019
|
-
hoverStyleKey: hoverStyleColumnInfo?.isHeader ? hoverStyleColumnInfo?.key : undefined,
|
|
4020
|
-
sortCriterion,
|
|
4021
|
-
onSortCriterionChange,
|
|
4022
|
-
isShowFocusRing,
|
|
4023
|
-
stickyTopOffset: viewportInfo.viewportConfig.scrollerOffsetTop,
|
|
4024
|
-
startStickyEdge,
|
|
4025
|
-
endStickyEdge,
|
|
4026
|
-
firstStickyColumnIndex: stickyColumnInfo.firstStickyColumnIndex,
|
|
4027
|
-
finalStickyColumnIndex: stickyColumnInfo.finalStickyColumnIndex,
|
|
4028
|
-
columnBorderEdges,
|
|
4029
|
-
isResizeHover: resizeInfoRef.current.isResizeHover,
|
|
4030
|
-
isRtl,
|
|
4031
|
-
isHighContrast
|
|
4032
|
-
};
|
|
4033
|
-
};
|
|
4034
|
-
const getTableFooterProps = () => {
|
|
4035
|
-
return {
|
|
4036
|
-
tableId,
|
|
4037
|
-
isRendered: hasFooters,
|
|
4038
|
-
columnsArray,
|
|
4039
|
-
hasVerticalGridlines,
|
|
4040
|
-
activeKey: currentActiveCell?.type === 'footer' ? currentActiveCell.columnKey : undefined,
|
|
4041
|
-
isTabbableMode,
|
|
4042
|
-
selectedColumnKeys: selected.column,
|
|
4043
|
-
isColumnSelectionEnabled,
|
|
4044
|
-
activeStyleKey: !activeStyleColumnInfo?.isHeader ? activeStyleColumnInfo?.key : undefined,
|
|
4045
|
-
hoverStyleKey: !hoverStyleColumnInfo?.isHeader ? hoverStyleColumnInfo?.key : undefined,
|
|
4046
|
-
isShowFocusRing,
|
|
4047
|
-
disabledInteractionKeys: _disabledHeaderFooterInteractionKeys,
|
|
4048
|
-
stickyBottomOffset: viewportInfo.viewportConfig.scrollerOffsetBottom,
|
|
4049
|
-
startStickyEdge,
|
|
4050
|
-
endStickyEdge,
|
|
4051
|
-
firstStickyColumnIndex: stickyColumnInfo.firstStickyColumnIndex,
|
|
4052
|
-
finalStickyColumnIndex: stickyColumnInfo.finalStickyColumnIndex,
|
|
4053
|
-
columnBorderEdges,
|
|
4054
|
-
dataRowCount: tableData.length,
|
|
4055
|
-
isRtl,
|
|
4056
|
-
isHighContrast
|
|
4057
|
-
};
|
|
4058
|
-
};
|
|
4059
|
-
const getTableDragIndicator = () => {
|
|
4060
|
-
if (columnResizingIndicator != null &&
|
|
4061
|
-
!isLayoutRequired &&
|
|
4062
|
-
appliedColumnWidths?.fullColumnWidths != null) {
|
|
4063
|
-
let position = 0;
|
|
4064
|
-
for (let i = 0; i < columnsArray.length; i++) {
|
|
4065
|
-
position += appliedColumnWidths.fullColumnWidths[i];
|
|
4066
|
-
if (columnsArray[i].key === columnResizingIndicator.key) {
|
|
4067
|
-
if (columnResizingIndicator.delta != null) {
|
|
4068
|
-
position += columnResizingIndicator.delta;
|
|
4069
|
-
}
|
|
4070
|
-
break;
|
|
4071
|
-
}
|
|
4072
|
-
}
|
|
4073
|
-
return jsxRuntime.jsx(TableDragIndicator, { position: position, isRtl: isRtl, height: innerTableHeight });
|
|
4074
|
-
}
|
|
4075
|
-
return undefined;
|
|
4076
|
-
};
|
|
4077
|
-
const getTableStyle = () => {
|
|
4078
|
-
if (!isLayoutRequired && appliedColumnWidths?.realColumnWidths != null) {
|
|
4079
|
-
let totalWidth = 0;
|
|
4080
|
-
for (let i = 0; i < appliedColumnWidths.realColumnWidths.length; i++) {
|
|
4081
|
-
totalWidth += appliedColumnWidths.realColumnWidths[i];
|
|
4082
|
-
}
|
|
4083
|
-
return `width:${totalWidth}px;table-layout:fixed;`;
|
|
4084
|
-
}
|
|
4085
|
-
else if (columnsArray.length > 0) {
|
|
4086
|
-
if (layout === 'fixed') {
|
|
4087
|
-
// default to 100px for each column when layout is not yet available
|
|
4088
|
-
return `width:${columnsArray.length * 100}px;table-layout:fixed;`;
|
|
4089
|
-
}
|
|
4090
|
-
else {
|
|
4091
|
-
// shrink table down as much as possible when a 'contents' layout is required, otherwise
|
|
4092
|
-
// the sampled column widths will not reflect the true weight sizes with line-clamping
|
|
4093
|
-
return 'width:max-content;will-change:width;';
|
|
4094
|
-
}
|
|
4095
|
-
}
|
|
4096
|
-
// no columns are present
|
|
4097
|
-
return 'width:100%;';
|
|
4098
|
-
};
|
|
4099
|
-
const skeletonStyles = isHighContrast ? PRIVATE_Table_themes_TableSkeletonStyles_css.tableSkeletonStylesHC : PRIVATE_Table_themes_TableSkeletonStyles_css.tableSkeletonStyles;
|
|
4100
|
-
const getPendingLayoutSkeletons = () => {
|
|
4101
|
-
return isPendingLayout ? (jsxRuntime.jsx("div", { class: skeletonStyles.pendingLayout, children: jsxRuntime.jsx("table", { role: 'presentation', style: 'width:100%;table-layout:fixed;', children: jsxRuntime.jsx("tbody", { role: 'presentation', children: jsxRuntime.jsx(TableColGroup.TableSkeletonRow, { tableId: tableId, hasTabIndex: currentActiveCell?.type === 'pending', colspan: ariaColumnCount, isPendingLayout: true, isShowFocusRing: false, isEmbedded: isEmbedded, isHighContrast: isHighContrast }) }) }) })) : undefined;
|
|
4102
|
-
};
|
|
4103
|
-
const ariaMultiSelectableProps = supportsMultipleSelection
|
|
4104
|
-
? { 'aria-multiselectable': true }
|
|
4105
|
-
: isRowSelectionEnabled || isColumnSelectionEnabled
|
|
4106
|
-
? { 'aria-multiselectable': false }
|
|
4107
|
-
: {};
|
|
4108
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { ...testIdProps, ref: rootRefCallback, "aria-colcount": ariaColumnCount, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-rowcount": ariaRowCount, ...ariaMultiSelectableProps, class: classes, id: tableId, role: 'grid', tabIndex: currentActiveCell != null ? -1 : 0, ...interactionManagerProps, children: [jsxRuntime.jsxs("div", { ref: scrollerRefCallback, class: scrollerClasses, role: 'rowgroup', style: scrollerStyle, tabIndex: -1, ...scrollHandlingProps, children: [jsxRuntime.jsxs(FocusTracker.FocusTracker, { isDisabled: !isTabbableMode, onFocusStartEdge: onFocusStartEdge, onFocusEndEdge: onFocusEndEdge, onStartTracking: onStartFocusTracking, children: [jsxRuntime.jsx(TabbableModeContext.TabbableModeContext.Provider, { value: { isTabbable: isTabbableMode }, children: jsxRuntime.jsxs("table", { ref: innerTableRefCallback, "aria-hidden": isPendingLayout ? true : undefined, class: tableClasses, role: 'presentation', style: getTableStyle(), "data-oj-table-inner-table": tableId, children: [jsxRuntime.jsx(TableColGroup.TableColGroup, { ...getTableColGroupProps() }), jsxRuntime.jsx(TableHeader, { ...getTableHeaderProps() }), jsxRuntime.jsx(TableBody, { ...getTableBodyProps() }), jsxRuntime.jsx(TableFooter, { ...getTableFooterProps() })] }) }), getTableDragIndicator()] }), tooltipContent] }), getPendingLayoutSkeletons()] }), contextMenuConfig != null && contextMenuContext != null && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TableContextMenu, { ...menuProps, contextMenuConfig: contextMenuConfig, contextMenuContext: contextMenuContext }), isResizeDialogOpen &&
|
|
4109
|
-
currentActiveCell?.columnKey != null &&
|
|
4110
|
-
appliedColumnWidths != null ? (jsxRuntime.jsx(TableResizeColumnDialog, { isOpen: isResizeDialogOpen, columnKey: currentActiveCell.columnKey, appliedColumnWidths: appliedColumnWidths, onColumnResize: onColumnResize, setIsResizeDialogOpen: setIsResizeDialogOpen })) : undefined] }))] }));
|
|
4111
|
-
});
|
|
4112
|
-
|
|
4113
|
-
exports.Table = Table;
|
|
4114
|
-
//# sourceMappingURL=Table-a102e1ee.js.map
|