@oracle/oraclejet-preact 18.1.5 → 18.1.6
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-0ad4ca6d.js +2 -0
- package/amd/BarChart-0ad4ca6d.js.map +1 -0
- package/amd/BaseButton-c86afd54.js +2 -0
- package/amd/BaseButton-c86afd54.js.map +1 -0
- package/amd/BaseCardView-a1c5a21d.js +2 -0
- package/amd/BaseCardView-a1c5a21d.js.map +1 -0
- package/amd/BaseCardViewSelectionTest-36a03079.js +2 -0
- package/amd/BaseCardViewSelectionTest-36a03079.js.map +1 -0
- package/amd/BaseRichSelection-33a97275.js +2 -0
- package/amd/BaseRichSelection-33a97275.js.map +1 -0
- package/amd/Button-cb88d20f.js +2 -0
- package/amd/Button-cb88d20f.js.map +1 -0
- package/amd/ButtonSetButton-819e99a8.js +2 -0
- package/amd/ButtonSetButton-819e99a8.js.map +1 -0
- package/amd/ButtonSetIconButton-9f171b1e.js +2 -0
- package/amd/ButtonSetIconButton-9f171b1e.js.map +1 -0
- package/amd/ButtonSetItem-8a51cd2a.js +2 -0
- package/amd/ButtonSetItem-8a51cd2a.js.map +1 -0
- package/amd/CardFlexView-f7fdfac8.js +2 -0
- package/amd/CardFlexView-f7fdfac8.js.map +1 -0
- package/amd/CardGridView-b8a60fae.js +2 -0
- package/amd/CardGridView-b8a60fae.js.map +1 -0
- package/amd/Chart-79cfc878.js +2 -0
- package/amd/Chart-79cfc878.js.map +1 -0
- package/amd/Checkbox-49753599.js +2 -0
- package/amd/Checkbox-49753599.js.map +1 -0
- package/amd/CheckboxControl-c6a380b3.js +2 -0
- package/amd/CheckboxControl-c6a380b3.js.map +1 -0
- package/amd/CheckboxRadioField-1987c75d.js +2 -0
- package/amd/CheckboxRadioField-1987c75d.js.map +1 -0
- package/amd/CheckboxSet-05423d28.js +2 -0
- package/amd/CheckboxSet-05423d28.js.map +1 -0
- package/amd/CheckboxStyles.styles.css +6 -0
- package/amd/ClearIcon-d73689cc.js +2 -0
- package/amd/ClearIcon-d73689cc.js.map +1 -0
- package/amd/ComboChart-72eda15f.js +2 -0
- package/amd/ComboChart-72eda15f.js.map +1 -0
- package/amd/CompactUserAssistance-3799998f.js +2 -0
- package/amd/CompactUserAssistance-3799998f.js.map +1 -0
- package/amd/ComponentMessageContainer-cf186eeb.js +2 -0
- package/amd/ComponentMessageContainer-cf186eeb.js.map +1 -0
- package/amd/ConveyorBeltItem-e3002f4a.js +2 -0
- package/amd/ConveyorBeltItem-e3002f4a.js.map +1 -0
- package/amd/DatePicker-9115226e.js +2 -0
- package/amd/DatePicker-9115226e.js.map +1 -0
- package/amd/DatePickerHeader-a0da70a0.js +2 -0
- package/amd/DatePickerHeader-a0da70a0.js.map +1 -0
- package/amd/Diagram-14fa4924.js +2 -0
- package/amd/Diagram-14fa4924.js.map +1 -0
- package/amd/Dialog-896c0bfd.js +2 -0
- package/amd/Dialog-896c0bfd.js.map +1 -0
- package/amd/EmbeddedIconButton-3608bfb4.js +2 -0
- package/amd/EmbeddedIconButton-3608bfb4.js.map +1 -0
- package/amd/ExpandableList-daabc548.js +2 -0
- package/amd/ExpandableList-daabc548.js.map +1 -0
- package/amd/Gantt-7265d4ce.js +2 -0
- package/amd/Gantt-7265d4ce.js.map +1 -0
- package/amd/GroupLoadingIndicator-9fd33355.js +1 -1
- package/amd/IconButton-368fba34.js +2 -0
- package/amd/IconButton-368fba34.js.map +1 -0
- package/amd/IconMenuButton-3f3c2386.js +2 -0
- package/amd/IconMenuButton-3f3c2386.js.map +1 -0
- package/amd/IconProgressButton-11c44c28.js +2 -0
- package/amd/IconProgressButton-11c44c28.js.map +1 -0
- package/amd/IconSwitchButton-1a400cdf.js +2 -0
- package/amd/IconSwitchButton-1a400cdf.js.map +1 -0
- package/amd/IconToggleButton-ea46b246.js +2 -0
- package/amd/IconToggleButton-ea46b246.js.map +1 -0
- package/amd/Indexer-5df524f2.js +2 -0
- package/amd/Indexer-5df524f2.js.map +1 -0
- package/amd/InlineUserAssistance-a97e0011.js +2 -0
- package/amd/InlineUserAssistance-a97e0011.js.map +1 -0
- package/amd/InputDateMask-09989b51.js +2 -0
- package/amd/InputDateMask-09989b51.js.map +1 -0
- package/amd/InputDatePicker-03bdeb95.js +2 -0
- package/amd/InputDatePicker-03bdeb95.js.map +1 -0
- package/amd/InputPassword-57a5e072.js +2 -0
- package/amd/InputPassword-57a5e072.js.map +1 -0
- package/amd/InputText-a72eb1c3.js +2 -0
- package/amd/InputText-a72eb1c3.js.map +1 -0
- package/amd/Label-41b672b4.js +2 -0
- package/amd/Label-41b672b4.js.map +1 -0
- package/amd/LineAreaChart-3aff0c1a.js +2 -0
- package/amd/LineAreaChart-3aff0c1a.js.map +1 -0
- package/amd/Link-1f126248.js +2 -0
- package/amd/Link-1f126248.js.map +1 -0
- package/amd/LinkVariants.styles.css +2 -1
- package/amd/LinkVariants.styles2.css +2 -1
- package/amd/List-0da6ee9c.js +2 -0
- package/amd/List-0da6ee9c.js.map +1 -0
- package/amd/ListView-cdfac903.js +2 -0
- package/amd/ListView-cdfac903.js.map +1 -0
- package/amd/LoadMoreCollection-a6adbc3f.js +2 -0
- package/amd/LoadMoreCollection-a6adbc3f.js.map +1 -0
- package/amd/MenuButton-66e5430a.js +2 -0
- package/amd/MenuButton-66e5430a.js.map +1 -0
- package/amd/Message-d66cc7e9.js +2 -0
- package/amd/Message-d66cc7e9.js.map +1 -0
- package/amd/MessageToast-19703f73.js +2 -0
- package/amd/MessageToast-19703f73.js.map +1 -0
- package/amd/MonthView-67179db3.js +2 -0
- package/amd/MonthView-67179db3.js.map +1 -0
- package/amd/NumberInputText-e2cf1795.js +2 -0
- package/amd/NumberInputText-e2cf1795.js.map +1 -0
- package/amd/OverflowTabBar-1dd5c327.js +2 -0
- package/amd/OverflowTabBar-1dd5c327.js.map +1 -0
- package/amd/OverflowTabBarItem-f8128e3d.js +2 -0
- package/amd/OverflowTabBarItem-f8128e3d.js.map +1 -0
- package/amd/PRIVATE_BaseCardView.js +1 -1
- package/amd/PRIVATE_Chart.js +1 -1
- package/amd/PRIVATE_CheckboxControl.js +1 -1
- package/amd/PRIVATE_CheckboxRadioField.js +1 -1
- package/amd/PRIVATE_ClearIcon.js +1 -1
- package/amd/PRIVATE_DatePickerHeader.js +1 -1
- package/amd/PRIVATE_EmbeddedIconButton.js +1 -1
- package/amd/PRIVATE_IconSwitchButton.js +1 -1
- package/amd/PRIVATE_List.js +1 -1
- package/amd/PRIVATE_LoadMoreCollection.js +1 -1
- package/amd/PRIVATE_Message.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_RichSelectionCommon.js +1 -1
- package/amd/PRIVATE_SelectCommon.js +1 -1
- package/amd/PRIVATE_Table.js +1 -1
- package/amd/PRIVATE_TimeComponent.js +1 -1
- package/amd/PRIVATE_VirtualizedCollection.js +1 -1
- package/amd/PictoChart-98b892fb.js +2 -0
- package/amd/PictoChart-98b892fb.js.map +1 -0
- package/amd/ProgressButton-cd0c21df.js +2 -0
- package/amd/ProgressButton-cd0c21df.js.map +1 -0
- package/amd/RadioItem-1a02d3dc.js +2 -0
- package/amd/RadioItem-1a02d3dc.js.map +1 -0
- package/amd/RadioSet-94d12876.js +2 -0
- package/amd/RadioSet-94d12876.js.map +1 -0
- package/amd/RemovableNavigationListItem-1f69907c.js +2 -0
- package/amd/RemovableNavigationListItem-1f69907c.js.map +1 -0
- package/amd/RemovableTabBarItem-5c240801.js +2 -0
- package/amd/RemovableTabBarItem-5c240801.js.map +1 -0
- package/amd/RevealToggleIcon-c22626da.js +2 -0
- package/amd/RevealToggleIcon-c22626da.js.map +1 -0
- package/amd/ScatterChart-e6f8d49a.js +2 -0
- package/amd/ScatterChart-e6f8d49a.js.map +1 -0
- package/amd/SelectMultiple-a159ccbf.js +2 -0
- package/amd/SelectMultiple-a159ccbf.js.map +1 -0
- package/amd/SelectSingle-e3d0d8d2.js +2 -0
- package/amd/SelectSingle-e3d0d8d2.js.map +1 -0
- package/amd/SplitMenuButton-a2001b04.js +2 -0
- package/amd/SplitMenuButton-a2001b04.js.map +1 -0
- package/amd/Table-f5ebf3d4.js +2 -0
- package/amd/Table-f5ebf3d4.js.map +1 -0
- package/amd/TableView-e8cab364.js +2 -0
- package/amd/TableView-e8cab364.js.map +1 -0
- package/amd/TagCloud-39552a78.js +2 -0
- package/amd/TagCloud-39552a78.js.map +1 -0
- package/amd/TextArea-0ec1a311.js +2 -0
- package/amd/TextArea-0ec1a311.js.map +1 -0
- package/amd/TextAreaAutosize-8cac0a54.js +2 -0
- package/amd/TextAreaAutosize-8cac0a54.js.map +1 -0
- package/amd/Theme-redwood/theme.css +209 -209
- package/amd/Theme-stable/theme.css +415 -415
- package/amd/TimeComponentCanvas2D-82ebf0c7.js +2 -0
- package/amd/TimeComponentCanvas2D-82ebf0c7.js.map +1 -0
- package/amd/ToggleButton-f8845804.js +2 -0
- package/amd/ToggleButton-f8845804.js.map +1 -0
- package/amd/UNSAFE_BarChart/__test__/BarChart.spec.js +1 -1
- package/amd/UNSAFE_BarChart.js +1 -1
- package/amd/UNSAFE_BaseButton.js +1 -1
- package/amd/UNSAFE_Button.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_CardFlexView.js +1 -1
- package/amd/UNSAFE_CardGridView.js +1 -1
- package/amd/UNSAFE_Checkbox/themes/CheckboxStyles.css.js +1 -1
- package/amd/UNSAFE_Checkbox/themes/redwood/CheckboxTheme.js +1 -1
- package/amd/UNSAFE_Checkbox/themes/redwood/CheckboxTheme.js.map +1 -1
- package/amd/UNSAFE_Checkbox/themes/redwood/CheckboxVariants.css.js +1 -1
- package/amd/UNSAFE_Checkbox/themes/stable/CheckboxTheme.js +1 -1
- package/amd/UNSAFE_Checkbox/themes/stable/CheckboxTheme.js.map +1 -1
- package/amd/UNSAFE_Checkbox/themes/stable/CheckboxVariants.css.js +1 -1
- package/amd/UNSAFE_Checkbox.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_ComponentMessage.js +1 -1
- package/amd/UNSAFE_ConveyorBelt.js +1 -1
- package/amd/UNSAFE_DatePicker.js +1 -1
- package/amd/UNSAFE_Diagram.js +1 -1
- package/amd/UNSAFE_Dialog.js +1 -1
- package/amd/UNSAFE_ExpandableList.js +1 -1
- package/amd/UNSAFE_Gantt.js +1 -1
- package/amd/UNSAFE_IconButton.js +1 -1
- package/amd/UNSAFE_IconMenuButton.js +1 -1
- package/amd/UNSAFE_IconProgressButton.js +1 -1
- package/amd/UNSAFE_IconToggleButton.js +1 -1
- package/amd/UNSAFE_Indexer.js +1 -1
- package/amd/UNSAFE_InputDateMask.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_InputText.js +1 -1
- package/amd/UNSAFE_InputTimeMask.js +1 -1
- package/amd/UNSAFE_Label.js +1 -1
- package/amd/UNSAFE_LabelledLink.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_MenuButton.js +1 -1
- package/amd/UNSAFE_MessageBanner.js +1 -1
- package/amd/UNSAFE_MessageToast.js +1 -1
- package/amd/UNSAFE_NavigationList.js +1 -1
- package/amd/UNSAFE_NavigationListCommon.js +1 -1
- package/amd/UNSAFE_NumberInputText.js +1 -1
- package/amd/UNSAFE_OverflowTabBar.js +1 -1
- package/amd/UNSAFE_PictoChart.js +1 -1
- package/amd/UNSAFE_ProgressButton.js +1 -1
- package/amd/UNSAFE_RadioItem.js +1 -1
- package/amd/UNSAFE_RadioSet.js +1 -1
- package/amd/UNSAFE_RichCheckboxSet.js +1 -1
- package/amd/UNSAFE_RichCheckboxSet.js.map +1 -1
- package/amd/UNSAFE_RichRadioSet.js +1 -1
- package/amd/UNSAFE_RichRadioSet.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_SelectMultiple.js +1 -1
- package/amd/UNSAFE_SelectSingle.js +1 -1
- package/amd/UNSAFE_Sheet/__test__/Sheet.spec.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_Toolbar/tests/Toolbar.spec.js +1 -1
- package/amd/UNSAFE_UserAssistance.js +1 -1
- package/amd/UNSAFE_VirtualizedListView.js +1 -1
- package/amd/VirtualizedCollection-63223f5e.js +2 -0
- package/amd/VirtualizedCollection-63223f5e.js.map +1 -0
- package/amd/VirtualizedListView-d353d174.js +2 -0
- package/amd/VirtualizedListView-d353d174.js.map +1 -0
- package/amd/YearsGridView-e645d5de.js +2 -0
- package/amd/YearsGridView-e645d5de.js.map +1 -0
- package/amd/hooks/PRIVATE_useChartEvents.js +1 -1
- package/amd/hooks/PRIVATE_useChartMarquee.js +1 -1
- package/amd/hooks/PRIVATE_useVisDragModeControls.js +1 -1
- package/amd/hooks/PRIVATE_useVisSelection.js +1 -1
- package/amd/hooks/UNSAFE_usePressClick.js +1 -1
- package/amd/useCellNavigation-4138513e.js +2 -0
- package/amd/useCellNavigation-4138513e.js.map +1 -0
- package/amd/useChartMarquee-2f7d51c4.js +2 -0
- package/amd/useChartMarquee-2f7d51c4.js.map +1 -0
- package/amd/usePressClick-b5bf4243.js +2 -0
- package/amd/usePressClick-b5bf4243.js.map +1 -0
- package/amd/useSelectCommon-380baecd.js +2 -0
- package/amd/useSelectCommon-380baecd.js.map +1 -0
- package/amd/useSelectDrill-113ae3ae.js +2 -0
- package/amd/useSelectDrill-113ae3ae.js.map +1 -0
- package/amd/useSelection-80e262f2.js +2 -0
- package/amd/useSelection-80e262f2.js.map +1 -0
- package/amd/useVisDragModeControls-f187d8b2.js +2 -0
- package/amd/useVisDragModeControls-f187d8b2.js.map +1 -0
- package/cjs/BarChart-66dbe5be.js +181 -0
- package/cjs/BarChart-66dbe5be.js.map +1 -0
- package/cjs/BaseButton-590432e4.js +174 -0
- package/cjs/BaseButton-590432e4.js.map +1 -0
- package/cjs/BaseCardView-5c483f52.js +687 -0
- package/cjs/BaseCardView-5c483f52.js.map +1 -0
- package/cjs/BaseCardViewSelectionTest-f29b3ecf.js +734 -0
- package/cjs/BaseCardViewSelectionTest-f29b3ecf.js.map +1 -0
- package/cjs/BaseRichSelection-07d33b2a.js +344 -0
- package/cjs/BaseRichSelection-07d33b2a.js.map +1 -0
- package/cjs/Button-2427b7df.js +24 -0
- package/cjs/Button-2427b7df.js.map +1 -0
- package/cjs/ButtonSetButton-a23b6b7d.js +35 -0
- package/cjs/ButtonSetButton-a23b6b7d.js.map +1 -0
- package/cjs/ButtonSetIconButton-c632a294.js +42 -0
- package/cjs/ButtonSetIconButton-c632a294.js.map +1 -0
- package/cjs/ButtonSetItem-b260b6a5.js +67 -0
- package/cjs/ButtonSetItem-b260b6a5.js.map +1 -0
- package/cjs/CardFlexView-385f1b2d.js +29 -0
- package/cjs/CardFlexView-385f1b2d.js.map +1 -0
- package/cjs/CardGridView-d337b9f4.js +17 -0
- package/cjs/CardGridView-d337b9f4.js.map +1 -0
- package/cjs/Chart-13ccd345.js +493 -0
- package/cjs/Chart-13ccd345.js.map +1 -0
- package/cjs/Checkbox-07e4794b.js +106 -0
- package/cjs/Checkbox-07e4794b.js.map +1 -0
- package/cjs/CheckboxControl-697725cb.js +111 -0
- package/cjs/CheckboxControl-697725cb.js.map +1 -0
- package/cjs/CheckboxRadioField-1bb0d57d.js +185 -0
- package/cjs/CheckboxRadioField-1bb0d57d.js.map +1 -0
- package/cjs/CheckboxStyles.styles.css +6 -0
- package/cjs/ClearIcon-22a24975.js +23 -0
- package/cjs/ClearIcon-22a24975.js.map +1 -0
- package/cjs/ComboChart-7188af92.js +174 -0
- package/cjs/ComboChart-7188af92.js.map +1 -0
- package/cjs/CompactUserAssistance-54247e7e.js +49 -0
- package/cjs/CompactUserAssistance-54247e7e.js.map +1 -0
- package/cjs/ComponentMessageContainer-f8dc57aa.js +71 -0
- package/cjs/ComponentMessageContainer-f8dc57aa.js.map +1 -0
- package/cjs/ConveyorBeltItem-324014ba.js +641 -0
- package/cjs/ConveyorBeltItem-324014ba.js.map +1 -0
- package/cjs/DatePicker-9c362a68.js +566 -0
- package/cjs/DatePicker-9c362a68.js.map +1 -0
- package/cjs/DatePickerHeader-4223c919.js +46 -0
- package/cjs/DatePickerHeader-4223c919.js.map +1 -0
- package/cjs/Diagram-151103ac.js +2037 -0
- package/cjs/Diagram-151103ac.js.map +1 -0
- package/cjs/Dialog-40a1b708.js +346 -0
- package/cjs/Dialog-40a1b708.js.map +1 -0
- package/cjs/EmbeddedIconButton-f3f6e8f6.js +13 -0
- package/cjs/EmbeddedIconButton-f3f6e8f6.js.map +1 -0
- package/cjs/ExpandableList-0a0d75b3.js +169 -0
- package/cjs/ExpandableList-0a0d75b3.js.map +1 -0
- package/cjs/Gantt-aa6f41d6.js +3819 -0
- package/cjs/Gantt-aa6f41d6.js.map +1 -0
- package/cjs/GroupLoadingIndicator-824d658f.js +1 -1
- package/cjs/IconButton-fad4e4b2.js +39 -0
- package/cjs/IconButton-fad4e4b2.js.map +1 -0
- package/cjs/IconMenuButton-70ef4775.js +58 -0
- package/cjs/IconMenuButton-70ef4775.js.map +1 -0
- package/cjs/IconProgressButton-b4116a09.js +49 -0
- package/cjs/IconProgressButton-b4116a09.js.map +1 -0
- package/cjs/IconSwitchButton-2f946274.js +46 -0
- package/cjs/IconSwitchButton-2f946274.js.map +1 -0
- package/cjs/IconToggleButton-493cf27c.js +45 -0
- package/cjs/IconToggleButton-493cf27c.js.map +1 -0
- package/cjs/Indexer-a4a2d6b8.js +339 -0
- package/cjs/Indexer-a4a2d6b8.js.map +1 -0
- package/cjs/InlineUserAssistance-6c6d3250.js +85 -0
- package/cjs/InlineUserAssistance-6c6d3250.js.map +1 -0
- package/cjs/InputDateMask-d6b1a660.js +1060 -0
- package/cjs/InputDateMask-d6b1a660.js.map +1 -0
- package/cjs/InputDatePicker-7eb5931a.js +309 -0
- package/cjs/InputDatePicker-7eb5931a.js.map +1 -0
- package/cjs/InputPassword-e15aa37b.js +157 -0
- package/cjs/InputPassword-e15aa37b.js.map +1 -0
- package/cjs/InputText-6a6ae7e5.js +199 -0
- package/cjs/InputText-6a6ae7e5.js.map +1 -0
- package/cjs/Label-c51bd5de.js +85 -0
- package/cjs/Label-c51bd5de.js.map +1 -0
- package/cjs/LineAreaChart-05a58ac5.js +172 -0
- package/cjs/LineAreaChart-05a58ac5.js.map +1 -0
- package/cjs/Link-c928d5f1.js +35 -0
- package/cjs/Link-c928d5f1.js.map +1 -0
- package/cjs/LinkVariants.styles.css +2 -1
- package/cjs/LinkVariants.styles2.css +2 -1
- package/cjs/List-bad74e43.js +723 -0
- package/cjs/List-bad74e43.js.map +1 -0
- package/cjs/ListView-80a9c725.js +430 -0
- package/cjs/ListView-80a9c725.js.map +1 -0
- package/cjs/LoadMoreCollection-73112ff0.js +34 -0
- package/cjs/LoadMoreCollection-73112ff0.js.map +1 -0
- package/cjs/MenuButton-e6eb6e3e.js +63 -0
- package/cjs/MenuButton-e6eb6e3e.js.map +1 -0
- package/cjs/Message-20bc90cd.js +208 -0
- package/cjs/Message-20bc90cd.js.map +1 -0
- package/cjs/MessageToast-c0730ed5.js +243 -0
- package/cjs/MessageToast-c0730ed5.js.map +1 -0
- package/cjs/MonthView-03da0bd2.js +210 -0
- package/cjs/MonthView-03da0bd2.js.map +1 -0
- package/cjs/NavigationListItem-0a49d6b5.js +166 -0
- package/cjs/NavigationListItem-0a49d6b5.js.map +1 -0
- package/cjs/NumberInputText-c58f78da.js +223 -0
- package/cjs/NumberInputText-c58f78da.js.map +1 -0
- package/cjs/OverflowTabBar-c70fb3bf.js +71 -0
- package/cjs/OverflowTabBar-c70fb3bf.js.map +1 -0
- package/cjs/OverflowTabBarItem-70484f54.js +88 -0
- package/cjs/OverflowTabBarItem-70484f54.js.map +1 -0
- package/cjs/PRIVATE_BaseCardView.js +3 -3
- package/cjs/PRIVATE_Chart.js +14 -14
- package/cjs/PRIVATE_CheckboxControl.js +5 -4
- package/cjs/PRIVATE_CheckboxControl.js.map +1 -1
- package/cjs/PRIVATE_CheckboxRadioField.js +8 -7
- package/cjs/PRIVATE_CheckboxRadioField.js.map +1 -1
- package/cjs/PRIVATE_ClearIcon.js +4 -4
- package/cjs/PRIVATE_DatePickerHeader.js +5 -5
- package/cjs/PRIVATE_EmbeddedIconButton.js +3 -3
- package/cjs/PRIVATE_IconSwitchButton.js +3 -3
- package/cjs/PRIVATE_List.js +4 -4
- package/cjs/PRIVATE_LoadMoreCollection.js +2 -2
- package/cjs/PRIVATE_Message.js +4 -4
- package/cjs/PRIVATE_MonthView.js +2 -2
- package/cjs/PRIVATE_MonthYearGridView.js +2 -2
- package/cjs/PRIVATE_RevealToggleIcon.js +4 -4
- package/cjs/PRIVATE_RichSelectionCommon.js +8 -7
- package/cjs/PRIVATE_RichSelectionCommon.js.map +1 -1
- package/cjs/PRIVATE_SelectCommon.js +11 -11
- package/cjs/PRIVATE_Table.js +6 -6
- package/cjs/PRIVATE_TimeComponent.js +3 -3
- package/cjs/PRIVATE_VirtualizedCollection.js +2 -2
- package/cjs/PictoChart-fd613c80.js +747 -0
- package/cjs/PictoChart-fd613c80.js.map +1 -0
- package/cjs/ProgressButton-81474622.js +58 -0
- package/cjs/ProgressButton-81474622.js.map +1 -0
- package/cjs/RadioItem-3cc743ff.js +115 -0
- package/cjs/RadioItem-3cc743ff.js.map +1 -0
- package/cjs/RadioSet-f4ee4f80.js +45 -0
- package/cjs/RadioSet-f4ee4f80.js.map +1 -0
- package/cjs/RemovableNavigationListItem-f3ad6e8e.js +26 -0
- package/cjs/RemovableNavigationListItem-f3ad6e8e.js.map +1 -0
- package/cjs/RemovableTabBarItem-5c05fa32.js +38 -0
- package/cjs/RemovableTabBarItem-5c05fa32.js.map +1 -0
- package/cjs/RevealToggleIcon-4ec10dbe.js +28 -0
- package/cjs/RevealToggleIcon-4ec10dbe.js.map +1 -0
- package/cjs/ScatterChart-9226c20d.js +105 -0
- package/cjs/ScatterChart-9226c20d.js.map +1 -0
- package/cjs/SelectMultiple-3569988d.js +1299 -0
- package/cjs/SelectMultiple-3569988d.js.map +1 -0
- package/cjs/SelectSingle-43d6953e.js +732 -0
- package/cjs/SelectSingle-43d6953e.js.map +1 -0
- package/cjs/SplitMenuButton-9c1b081c.js +141 -0
- package/cjs/SplitMenuButton-9c1b081c.js.map +1 -0
- package/cjs/Table-6987731e.js +5499 -0
- package/cjs/Table-6987731e.js.map +1 -0
- package/cjs/TableView-1bed3e0b.js +33 -0
- package/cjs/TableView-1bed3e0b.js.map +1 -0
- package/cjs/TagCloud-2715c0e8.js +826 -0
- package/cjs/TagCloud-2715c0e8.js.map +1 -0
- package/cjs/TextArea-d8516f11.js +162 -0
- package/cjs/TextArea-d8516f11.js.map +1 -0
- package/cjs/TextAreaAutosize-1797d5b7.js +246 -0
- package/cjs/TextAreaAutosize-1797d5b7.js.map +1 -0
- package/cjs/Theme-redwood/theme.css +157 -157
- package/cjs/Theme-stable/theme.css +252 -252
- package/cjs/TimeComponentCanvas2D-13c06086.js +591 -0
- package/cjs/TimeComponentCanvas2D-13c06086.js.map +1 -0
- package/cjs/ToggleButton-c614bbec.js +30 -0
- package/cjs/ToggleButton-c614bbec.js.map +1 -0
- package/cjs/UNSAFE_BarChart/__test__/BarChart.spec.js +15 -15
- package/cjs/UNSAFE_BarChart.js +15 -15
- package/cjs/UNSAFE_BaseButton.js +2 -2
- package/cjs/UNSAFE_Button.js +3 -3
- package/cjs/UNSAFE_ButtonLayout/tests/ButtonLayout.spec.js +5 -5
- package/cjs/UNSAFE_ButtonSetButton.js +3 -3
- package/cjs/UNSAFE_ButtonSetIconButton.js +3 -3
- package/cjs/UNSAFE_ButtonSetItem.js +5 -5
- package/cjs/UNSAFE_CardFlexView.js +4 -4
- package/cjs/UNSAFE_CardGridView.js +4 -4
- package/cjs/UNSAFE_Checkbox/themes/CheckboxStyles.css.js +1 -0
- package/cjs/UNSAFE_Checkbox/themes/CheckboxStyles.css.js.map +1 -1
- package/cjs/UNSAFE_Checkbox/themes/redwood/CheckboxTheme.js +1 -0
- package/cjs/UNSAFE_Checkbox/themes/redwood/CheckboxTheme.js.map +1 -1
- package/cjs/UNSAFE_Checkbox/themes/redwood/CheckboxVariants.css.js +1 -0
- package/cjs/UNSAFE_Checkbox/themes/redwood/CheckboxVariants.css.js.map +1 -1
- package/cjs/UNSAFE_Checkbox/themes/stable/CheckboxTheme.js +1 -0
- package/cjs/UNSAFE_Checkbox/themes/stable/CheckboxTheme.js.map +1 -1
- package/cjs/UNSAFE_Checkbox/themes/stable/CheckboxVariants.css.js +1 -0
- package/cjs/UNSAFE_Checkbox/themes/stable/CheckboxVariants.css.js.map +1 -1
- package/cjs/UNSAFE_Checkbox.js +8 -7
- package/cjs/UNSAFE_Checkbox.js.map +1 -1
- package/cjs/UNSAFE_CheckboxItem.js +5 -4
- package/cjs/UNSAFE_CheckboxItem.js.map +1 -1
- package/cjs/UNSAFE_CheckboxSet.js +8 -7
- package/cjs/UNSAFE_CheckboxSet.js.map +1 -1
- package/cjs/UNSAFE_ComboChart.js +15 -15
- package/cjs/UNSAFE_ComponentMessage.js +4 -4
- package/cjs/UNSAFE_ConveyorBelt.js +3 -3
- package/cjs/UNSAFE_DatePicker.js +10 -10
- package/cjs/UNSAFE_Diagram.js +9 -9
- package/cjs/UNSAFE_Dialog.js +4 -4
- package/cjs/UNSAFE_ExpandableList.js +7 -7
- package/cjs/UNSAFE_Gantt.js +5 -5
- package/cjs/UNSAFE_IconButton.js +3 -3
- package/cjs/UNSAFE_IconMenuButton.js +3 -3
- package/cjs/UNSAFE_IconProgressButton.js +3 -3
- package/cjs/UNSAFE_IconToggleButton.js +3 -3
- package/cjs/UNSAFE_Indexer.js +2 -2
- package/cjs/UNSAFE_InputDateMask.js +8 -8
- package/cjs/UNSAFE_InputDatePicker.js +95 -95
- package/cjs/UNSAFE_InputPassword.js +11 -11
- package/cjs/UNSAFE_InputSensitiveText.js +10 -10
- package/cjs/UNSAFE_InputText.js +9 -9
- package/cjs/UNSAFE_InputTimeMask.js +7 -7
- package/cjs/UNSAFE_Label.js +4 -4
- package/cjs/UNSAFE_LabelledLink.js +7 -7
- package/cjs/UNSAFE_LineAreaChart.js +15 -15
- package/cjs/UNSAFE_Link/themes/LinkStyles.css.js +1 -1
- package/cjs/UNSAFE_Link.js +2 -2
- package/cjs/UNSAFE_ListView.js +5 -5
- package/cjs/UNSAFE_MenuButton.js +3 -3
- package/cjs/UNSAFE_MessageBanner.js +4 -4
- package/cjs/UNSAFE_MessageToast.js +5 -5
- package/cjs/UNSAFE_NavigationList.js +8 -8
- package/cjs/UNSAFE_NavigationListCommon.js +4 -4
- package/cjs/UNSAFE_NumberInputText.js +8 -8
- package/cjs/UNSAFE_OverflowTabBar.js +8 -8
- package/cjs/UNSAFE_PictoChart.js +4 -4
- package/cjs/UNSAFE_ProgressButton.js +3 -3
- package/cjs/UNSAFE_RadioItem.js +4 -4
- package/cjs/UNSAFE_RadioSet.js +9 -8
- package/cjs/UNSAFE_RadioSet.js.map +1 -1
- package/cjs/UNSAFE_RichCheckboxSet.js +8 -7
- package/cjs/UNSAFE_RichCheckboxSet.js.map +1 -1
- package/cjs/UNSAFE_RichRadioSet.js +8 -7
- package/cjs/UNSAFE_RichRadioSet.js.map +1 -1
- package/cjs/UNSAFE_ScatterChart.js +15 -15
- package/cjs/UNSAFE_SelectMultiple.js +15 -15
- package/cjs/UNSAFE_SelectSingle.js +14 -14
- package/cjs/UNSAFE_Sheet/__test__/Sheet.spec.js +3 -3
- package/cjs/UNSAFE_SplitMenuButton.js +3 -3
- package/cjs/UNSAFE_TabBar.js +7 -7
- package/cjs/UNSAFE_TabBarCommon.js +7 -7
- package/cjs/UNSAFE_TabBarMixed.js +7 -7
- package/cjs/UNSAFE_TableView.js +7 -7
- package/cjs/UNSAFE_TagCloud.js +4 -4
- package/cjs/UNSAFE_TextArea.js +8 -8
- package/cjs/UNSAFE_TextAreaAutosize.js +8 -8
- package/cjs/UNSAFE_ToggleButton.js +3 -3
- package/cjs/UNSAFE_Toolbar/tests/Toolbar.spec.js +5 -5
- package/cjs/UNSAFE_UserAssistance.js +6 -6
- package/cjs/UNSAFE_VirtualizedListView.js +5 -5
- package/cjs/VirtualizedCollection-00aedb8b.js +180 -0
- package/cjs/VirtualizedCollection-00aedb8b.js.map +1 -0
- package/cjs/VirtualizedListView-ad3219ba.js +16 -0
- package/cjs/VirtualizedListView-ad3219ba.js.map +1 -0
- package/cjs/YearsGridView-67ce0a3a.js +190 -0
- package/cjs/YearsGridView-67ce0a3a.js.map +1 -0
- package/cjs/hooks/PRIVATE_useChartEvents.js +4 -4
- package/cjs/hooks/PRIVATE_useChartMarquee.js +8 -8
- package/cjs/hooks/PRIVATE_useVisDragModeControls.js +7 -7
- package/cjs/hooks/PRIVATE_useVisSelection.js +3 -3
- package/cjs/hooks/UNSAFE_usePressClick.js +1 -1
- package/cjs/useCellNavigation-d503e35f.js +124 -0
- package/cjs/useCellNavigation-d503e35f.js.map +1 -0
- package/cjs/useChartMarquee-7ffcda9e.js +295 -0
- package/cjs/useChartMarquee-7ffcda9e.js.map +1 -0
- package/cjs/usePressClick-7a34624a.js +41 -0
- package/cjs/usePressClick-7a34624a.js.map +1 -0
- package/cjs/useSelectCommon-38a38427.js +709 -0
- package/cjs/useSelectCommon-38a38427.js.map +1 -0
- package/cjs/useSelectDrill-ad5864fd.js +107 -0
- package/cjs/useSelectDrill-ad5864fd.js.map +1 -0
- package/cjs/useSelection-8f68a23a.js +188 -0
- package/cjs/useSelection-8f68a23a.js.map +1 -0
- package/cjs/useVisDragModeControls-d3a7aa57.js +89 -0
- package/cjs/useVisDragModeControls-d3a7aa57.js.map +1 -0
- package/es/ActionCard-bac27bb9.js +1 -1
- package/es/BarChart-43dec3b7.js +179 -0
- package/es/BarChart-43dec3b7.js.map +1 -0
- package/es/BarGroup-dbf70e2c.js +1 -1
- package/es/BaseButton-61f6baa8.js +172 -0
- package/es/BaseButton-61f6baa8.js.map +1 -0
- package/es/BaseCardView-724422f3.js +7 -7
- package/es/BaseCardViewSelectionTest-ef070684.js +721 -0
- package/es/BaseCardViewSelectionTest-ef070684.js.map +1 -0
- package/es/BaseNavigationListItem-1c75c13f.js +47 -0
- package/es/BaseNavigationListItem-1c75c13f.js.map +1 -0
- package/es/BaseRichSelection-72edca7c.js +342 -0
- package/es/BaseRichSelection-72edca7c.js.map +1 -0
- package/es/Button-f90514b2.js +22 -0
- package/es/Button-f90514b2.js.map +1 -0
- package/es/ButtonSet-9b2c41be.js +2 -2
- package/es/ButtonSetButton-974fc462.js +33 -0
- package/es/ButtonSetButton-974fc462.js.map +1 -0
- package/es/ButtonSetIconButton-0081167a.js +40 -0
- package/es/ButtonSetIconButton-0081167a.js.map +1 -0
- package/es/ButtonSetItem-eb2d43d4.js +65 -0
- package/es/ButtonSetItem-eb2d43d4.js.map +1 -0
- package/es/Card-31dc8dc2.js +15 -0
- package/es/Card-31dc8dc2.js.map +1 -0
- package/es/Center-2be68188.js +16 -0
- package/es/Center-2be68188.js.map +1 -0
- package/es/Chart-4ec13697.js +491 -0
- package/es/Chart-4ec13697.js.map +1 -0
- package/es/Checkbox-74259575.js +104 -0
- package/es/Checkbox-74259575.js.map +1 -0
- package/es/CheckboxControl-c3c34028.js +109 -0
- package/es/CheckboxControl-c3c34028.js.map +1 -0
- package/es/CheckboxRadioField-294463ba.js +183 -0
- package/es/CheckboxRadioField-294463ba.js.map +1 -0
- package/es/CheckboxSetContext-1be56556.js +9 -0
- package/es/CheckboxSetContext-1be56556.js.map +1 -0
- package/es/CheckboxStyles.styles.css +6 -0
- package/es/Chip-8fd813ce.js +1 -1
- package/es/ClearIcon-acca9670.js +21 -0
- package/es/ClearIcon-acca9670.js.map +1 -0
- package/es/CollapseIcon-152e59b4.js +1 -1
- package/es/Collapsible-4dddc4f7.js +2 -2
- package/es/ComboChart-d1c3e17a.js +172 -0
- package/es/ComboChart-d1c3e17a.js.map +1 -0
- package/es/CompactHelpSource-c3044924.js +2 -2
- package/es/CompactLabelAssistance-0d70fceb.js +34 -0
- package/es/CompactLabelAssistance-0d70fceb.js.map +1 -0
- package/es/CompactUserAssistance-4f0ff3fc.js +47 -0
- package/es/CompactUserAssistance-4f0ff3fc.js.map +1 -0
- package/es/ComponentMessageContainer-13005c12.js +68 -0
- package/es/ComponentMessageContainer-13005c12.js.map +1 -0
- package/es/ConveyorBeltItem-53f383e1.js +638 -0
- package/es/ConveyorBeltItem-53f383e1.js.map +1 -0
- package/es/DatePicker-a57b08b1.js +564 -0
- package/es/DatePicker-a57b08b1.js.map +1 -0
- package/es/DatePickerHeader-8eee60aa.js +44 -0
- package/es/DatePickerHeader-8eee60aa.js.map +1 -0
- package/es/Diagram-29d78c10.js +2035 -0
- package/es/Diagram-29d78c10.js.map +1 -0
- package/es/Dialog-8a9a90a2.js +344 -0
- package/es/Dialog-8a9a90a2.js.map +1 -0
- package/es/DirectionalCollapseArrowIcon-e1b04846.js +1 -1
- package/es/DirectionalExpandArrowIcon-c9218fa7.js +1 -1
- package/es/DragHandle-198c3118.js +22 -0
- package/es/DragHandle-198c3118.js.map +1 -0
- package/es/DrawerPopup-5292bdfc.js +381 -0
- package/es/DrawerPopup-5292bdfc.js.map +1 -0
- package/es/Dropdown-698afbc6.js +80 -0
- package/es/Dropdown-698afbc6.js.map +1 -0
- package/es/EmbeddedIconButton-7215a912.js +11 -0
- package/es/EmbeddedIconButton-7215a912.js.map +1 -0
- package/es/EnvironmentProvider-713d0dec.js +58 -0
- package/es/EnvironmentProvider-713d0dec.js.map +1 -0
- package/es/ExpandableList-27f4f0d4.js +167 -0
- package/es/ExpandableList-27f4f0d4.js.map +1 -0
- package/es/FilePicker-c3f06d6f.js +2 -2
- package/es/Flex-2d9ebee9.js +30 -0
- package/es/Flex-2d9ebee9.js.map +1 -0
- package/es/Floating-5191a9e6.js +462 -0
- package/es/Floating-5191a9e6.js.map +1 -0
- package/es/FormLayout-b2993e0c.js +1 -1
- package/es/Gantt-e156bd33.js +3817 -0
- package/es/Gantt-e156bd33.js.map +1 -0
- package/es/Grid-238d8757.js +27 -0
- package/es/Grid-238d8757.js.map +1 -0
- package/es/Gridlines-d37f55d2.js +168 -0
- package/es/Gridlines-d37f55d2.js.map +1 -0
- package/es/GroupLoadingIndicator-93bcf33f.js +1 -1
- package/es/HighlightText-fef35694.js +31 -0
- package/es/HighlightText-fef35694.js.map +1 -0
- package/es/Icon-030b6dd4.js +3 -3
- package/es/IconButton-19fcf0a8.js +37 -0
- package/es/IconButton-19fcf0a8.js.map +1 -0
- package/es/IconMenuButton-4118bde6.js +56 -0
- package/es/IconMenuButton-4118bde6.js.map +1 -0
- package/es/IconProgressButton-a595c052.js +47 -0
- package/es/IconProgressButton-a595c052.js.map +1 -0
- package/es/IconSwitchButton-dcafa86c.js +44 -0
- package/es/IconSwitchButton-dcafa86c.js.map +1 -0
- package/es/IconToggleButton-94cbea2b.js +43 -0
- package/es/IconToggleButton-94cbea2b.js.map +1 -0
- package/es/IconUserAssistance-d9bc82d4.js +73 -0
- package/es/IconUserAssistance-d9bc82d4.js.map +1 -0
- package/es/Indexer-18ec7af3.js +4 -4
- package/es/InlineHelpSource-5ed4bb7d.js +1 -1
- package/es/InlineUserAssistance-65ca8810.js +81 -0
- package/es/InlineUserAssistance-65ca8810.js.map +1 -0
- package/es/InputDateMask-8258be53.js +1056 -0
- package/es/InputDateMask-8258be53.js.map +1 -0
- package/es/InputDatePicker-a659ed3a.js +307 -0
- package/es/InputDatePicker-a659ed3a.js.map +1 -0
- package/es/InputPassword-65336899.js +155 -0
- package/es/InputPassword-65336899.js.map +1 -0
- package/es/InputText-21591785.js +197 -0
- package/es/InputText-21591785.js.map +1 -0
- package/es/Label-25eba25e.js +83 -0
- package/es/Label-25eba25e.js.map +1 -0
- package/es/LabelValueLayout-1db91391.js +1 -1
- package/es/Layer-1eb18747.js +91 -0
- package/es/Layer-1eb18747.js.map +1 -0
- package/es/LayerHost-8b98d97d.js +41 -0
- package/es/LayerHost-8b98d97d.js.map +1 -0
- package/es/LayerManager-221afe20.js +34 -0
- package/es/LayerManager-221afe20.js.map +1 -0
- package/es/Legend-0e274097.js +3 -3
- package/es/LineAreaChart-6fabda31.js +170 -0
- package/es/LineAreaChart-6fabda31.js.map +1 -0
- package/es/LineSeries-139bda1a.js +109 -0
- package/es/LineSeries-139bda1a.js.map +1 -0
- package/es/Link-c7061441.js +33 -0
- package/es/Link-c7061441.js.map +1 -0
- package/es/LinkVariants.styles.css +2 -1
- package/es/LinkVariants.styles2.css +2 -1
- package/es/List-58b8d3c9.js +5 -5
- package/es/ListItemLayout-af86b17d.js +110 -0
- package/es/ListItemLayout-af86b17d.js.map +1 -0
- package/es/ListView-be2e2736.js +3 -3
- package/es/LiveRegion-c7bf2f21.js +39 -0
- package/es/LiveRegion-c7bf2f21.js.map +1 -0
- package/es/MaxLengthLiveRegion-d790e55c.js +23 -0
- package/es/MaxLengthLiveRegion-d790e55c.js.map +1 -0
- package/es/Menu-a5bf756f.js +6 -6
- package/es/MenuButton-e012a909.js +61 -0
- package/es/MenuButton-e012a909.js.map +1 -0
- package/es/MenuItem-54015ca3.js +1 -1
- package/es/Message-b0150c6f.js +203 -0
- package/es/Message-b0150c6f.js.map +1 -0
- package/es/MessageLayer-d9129e22.js +58 -0
- package/es/MessageLayer-d9129e22.js.map +1 -0
- package/es/MessageToast-933a0339.js +241 -0
- package/es/MessageToast-933a0339.js.map +1 -0
- package/es/MessagesManager-91ade5dc.js +3 -3
- package/es/MeterBar-732e3b2c.js +5 -5
- package/es/MeterCircle-2156d7ff.js +5 -5
- package/es/Modal-9980f6d1.js +288 -0
- package/es/Modal-9980f6d1.js.map +1 -0
- package/es/MonthView-d60a5df7.js +208 -0
- package/es/MonthView-d60a5df7.js.map +1 -0
- package/es/NavigationList-fb05e081.js +159 -0
- package/es/NavigationList-fb05e081.js.map +1 -0
- package/es/NavigationListItem-193a315a.js +10 -0
- package/es/NavigationListItem-193a315a.js.map +1 -0
- package/es/NumberInputText-2d1aef12.js +220 -0
- package/es/NumberInputText-2d1aef12.js.map +1 -0
- package/es/OverflowTabBar-894c7cd9.js +69 -0
- package/es/OverflowTabBar-894c7cd9.js.map +1 -0
- package/es/OverflowTabBarItem-a578401b.js +87 -0
- package/es/OverflowTabBarItem-a578401b.js.map +1 -0
- package/es/PRIVATE_BaseCardView.js +21 -21
- package/es/PRIVATE_Chart.js +43 -43
- package/es/PRIVATE_CheckboxControl.js +28 -27
- package/es/PRIVATE_CheckboxControl.js.map +1 -1
- package/es/PRIVATE_CheckboxRadioField.js +33 -32
- package/es/PRIVATE_CheckboxRadioField.js.map +1 -1
- package/es/PRIVATE_ClearIcon.js +21 -21
- package/es/PRIVATE_DatePickerHeader.js +23 -23
- package/es/PRIVATE_DatePickerLayout.js +4 -4
- package/es/PRIVATE_EmbeddedIconButton.js +6 -6
- package/es/PRIVATE_FormControls.js +19 -19
- package/es/PRIVATE_IconSwitchButton.js +18 -18
- package/es/PRIVATE_Icons/CheckboxMixed.js +15 -15
- package/es/PRIVATE_Icons/CheckboxOff.js +15 -15
- package/es/PRIVATE_Icons/CheckboxOn.js +15 -15
- package/es/PRIVATE_Icons/DragV.js +15 -15
- package/es/PRIVATE_Icons/WarningS.js +15 -15
- package/es/PRIVATE_List.js +19 -19
- package/es/PRIVATE_Message.js +22 -22
- package/es/PRIVATE_MessageLayer.js +12 -12
- package/es/PRIVATE_MonthView.js +8 -8
- package/es/PRIVATE_MonthYearGridView.js +8 -8
- package/es/PRIVATE_PlotArea.js +4 -4
- package/es/PRIVATE_RevealToggleIcon.js +20 -20
- package/es/PRIVATE_RichSelectionCommon.js +34 -33
- package/es/PRIVATE_RichSelectionCommon.js.map +1 -1
- package/es/PRIVATE_SelectCommon.js +35 -35
- package/es/PRIVATE_StyledCard.js +4 -4
- package/es/PRIVATE_StyledCheckbox.js +15 -15
- package/es/PRIVATE_Table.js +28 -28
- package/es/PRIVATE_ThemedIcons/CalendarIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/ChartMarqueeSelectIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/ChartPanIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/ChartZoomIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/CheckIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/CheckboxMixedIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/CheckboxOffIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/CheckboxOnIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/CloseIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/CollapseIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CollapseUpIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/DecrementIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/DeleteIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/DirectionalCollapseArrowIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/DirectionalExpandArrowIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/DragHandleIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/DropdownArrowIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/ExpandIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/HelpIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/IncrementIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/MenuButtonDropdownIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/MessageConfirmationIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/MessageErrorIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/MessageInfoIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/MessageWarningIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/MinusIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/NavDownIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/OverviewHorizontalDragHandleIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/PlusIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/RadioOffIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/RadioOnIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/SortAscendingIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/SortDescendingIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/ViewHideIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/ViewIcon.js +15 -15
- package/es/PRIVATE_TimeComponent.js +20 -20
- package/es/PRIVATE_VisOverview.js +15 -15
- package/es/PRIVATE_VisTabularDatatip.js +4 -4
- package/es/PictoChart-9624c62e.js +744 -0
- package/es/PictoChart-9624c62e.js.map +1 -0
- package/es/PieChart-87a2913f.js +6 -6
- package/es/Popup-f6774b40.js +258 -0
- package/es/Popup-f6774b40.js.map +1 -0
- package/es/ProgressBar-6d816723.js +62 -0
- package/es/ProgressBar-6d816723.js.map +1 -0
- package/es/ProgressButton-bb52347a.js +56 -0
- package/es/ProgressButton-bb52347a.js.map +1 -0
- package/es/ProgressButtonLabelLayout-f1d097d6.js +3 -3
- package/es/ProgressCircle-bbcf67fd.js +48 -0
- package/es/ProgressCircle-bbcf67fd.js.map +1 -0
- package/es/RadioItem-81e9e082.js +113 -0
- package/es/RadioItem-81e9e082.js.map +1 -0
- package/es/RadioSet-d2820846.js +43 -0
- package/es/RadioSet-d2820846.js.map +1 -0
- package/es/RatingGauge-5e1e75b4.js +8 -8
- package/es/ReadonlyTextFieldInput-f407b86c.js +1 -1
- package/es/RemovableNavigationListItem-21cd36b7.js +25 -0
- package/es/RemovableNavigationListItem-21cd36b7.js.map +1 -0
- package/es/RemovableTabBarItem-60574a52.js +36 -0
- package/es/RemovableTabBarItem-60574a52.js.map +1 -0
- package/es/ReorderableTabBar-c280e7d4.js +77 -0
- package/es/ReorderableTabBar-c280e7d4.js.map +1 -0
- package/es/RevealToggleIcon-8e650973.js +26 -0
- package/es/RevealToggleIcon-8e650973.js.map +1 -0
- package/es/ScatterChart-1f818935.js +103 -0
- package/es/ScatterChart-1f818935.js.map +1 -0
- package/es/SectionalLegend-64670096.js +4 -4
- package/es/SectionedContent-48fa242f.js +64 -0
- package/es/SectionedContent-48fa242f.js.map +1 -0
- package/es/SelectMultiple-c7f9e747.js +1297 -0
- package/es/SelectMultiple-c7f9e747.js.map +1 -0
- package/es/SelectSingle-75270526.js +730 -0
- package/es/SelectSingle-75270526.js.map +1 -0
- package/es/SelectionCard-ce3012e8.js +16 -0
- package/es/SelectionCard-ce3012e8.js.map +1 -0
- package/es/Selector-41618991.js +1 -1
- package/es/SelectorAll-27744634.js +69 -0
- package/es/SelectorAll-27744634.js.map +1 -0
- package/es/Sheet-924cfdab.js +158 -0
- package/es/Sheet-924cfdab.js.map +1 -0
- package/es/SplitMenuButton-5cb6e8db.js +139 -0
- package/es/SplitMenuButton-5cb6e8db.js.map +1 -0
- package/es/StyledCard-c8d9836f.js +105 -0
- package/es/StyledCard-c8d9836f.js.map +1 -0
- package/es/StyledLabelValueLayout-5b9a731a.js +18 -0
- package/es/StyledLabelValueLayout-5b9a731a.js.map +1 -0
- package/es/StyledTextField-6d6dd43e.js +3 -3
- package/es/TabBar-4d7054f7.js +82 -0
- package/es/TabBar-4d7054f7.js.map +1 -0
- package/es/TabBarItem-b97091e4.js +3 -3
- package/es/TabBarLayout-bb3f9f69.js +1 -1
- package/es/TabBarMixed-b8e2427c.js +83 -0
- package/es/TabBarMixed-b8e2427c.js.map +1 -0
- package/es/TabBarMixedSeparator-7669e2f0.js +19 -0
- package/es/TabBarMixedSeparator-7669e2f0.js.map +1 -0
- package/es/Table-b8c41429.js +5497 -0
- package/es/Table-b8c41429.js.map +1 -0
- package/es/TableView-2261b9de.js +31 -0
- package/es/TableView-2261b9de.js.map +1 -0
- package/es/TagCloud-0fe9b648.js +824 -0
- package/es/TagCloud-0fe9b648.js.map +1 -0
- package/es/TextArea-6584935d.js +177 -0
- package/es/TextArea-6584935d.js.map +1 -0
- package/es/TextAreaAutosize-2ca5256e.js +244 -0
- package/es/TextAreaAutosize-2ca5256e.js.map +1 -0
- package/es/TextField-500c0227.js +3 -3
- package/es/TextFieldInput-cb551f4e.js +1 -1
- package/es/Theme-redwood/theme.css +590 -590
- package/es/Theme-stable/theme.css +476 -476
- package/es/TimeComponentCanvas2D-a5baa5f6.js +568 -0
- package/es/TimeComponentCanvas2D-a5baa5f6.js.map +1 -0
- package/es/ToggleButton-c50ac048.js +28 -0
- package/es/ToggleButton-c50ac048.js.map +1 -0
- package/es/Toolbar-35426a1b.js +1 -1
- package/es/TruncatingBadge-69621d89.js +1 -1
- package/es/TruncatingText-fd66e0e0.js +1 -1
- package/es/UNSAFE_ActionCard.js +3 -3
- package/es/UNSAFE_BarChart/__test__/BarChart.spec.js +44 -44
- package/es/UNSAFE_BarChart.js +44 -44
- package/es/UNSAFE_BaseButton.js +5 -5
- package/es/UNSAFE_Button.js +6 -6
- package/es/UNSAFE_ButtonLayout/tests/ButtonLayout.spec.js +26 -26
- package/es/UNSAFE_ButtonSet.js +4 -4
- package/es/UNSAFE_ButtonSetButton.js +6 -6
- package/es/UNSAFE_ButtonSetIconButton.js +18 -18
- package/es/UNSAFE_ButtonSetItem.js +20 -20
- package/es/UNSAFE_ButtonSetMultiple.js +4 -4
- package/es/UNSAFE_ButtonSetSingle.js +4 -4
- package/es/UNSAFE_Card.js +5 -5
- package/es/UNSAFE_CardFlexView.js +21 -21
- package/es/UNSAFE_CardGridView.js +21 -21
- package/es/UNSAFE_Center.js +5 -5
- package/es/UNSAFE_Checkbox/themes/CheckboxStyles.css.js +1 -0
- package/es/UNSAFE_Checkbox/themes/CheckboxStyles.css.js.map +1 -1
- package/es/UNSAFE_Checkbox/themes/redwood/CheckboxTheme.js +1 -0
- package/es/UNSAFE_Checkbox/themes/redwood/CheckboxTheme.js.map +1 -1
- package/es/UNSAFE_Checkbox/themes/redwood/CheckboxVariants.css.js +1 -0
- package/es/UNSAFE_Checkbox/themes/redwood/CheckboxVariants.css.js.map +1 -1
- package/es/UNSAFE_Checkbox/themes/stable/CheckboxTheme.js +1 -0
- package/es/UNSAFE_Checkbox/themes/stable/CheckboxTheme.js.map +1 -1
- package/es/UNSAFE_Checkbox/themes/stable/CheckboxVariants.css.js +1 -0
- package/es/UNSAFE_Checkbox/themes/stable/CheckboxVariants.css.js.map +1 -1
- package/es/UNSAFE_Checkbox.js +31 -30
- package/es/UNSAFE_Checkbox.js.map +1 -1
- package/es/UNSAFE_CheckboxItem.js +57 -108
- package/es/UNSAFE_CheckboxItem.js.map +1 -1
- package/es/UNSAFE_CheckboxSet.js +75 -40
- package/es/UNSAFE_CheckboxSet.js.map +1 -1
- package/es/UNSAFE_Chip.js +2 -2
- package/es/UNSAFE_Collapsible.js +17 -17
- package/es/UNSAFE_ComboChart.js +46 -46
- package/es/UNSAFE_ComponentMessage.js +22 -22
- package/es/UNSAFE_ConveyorBelt.js +18 -18
- package/es/UNSAFE_DatePicker.js +30 -30
- package/es/UNSAFE_Diagram.js +27 -27
- package/es/UNSAFE_Dialog.js +24 -24
- package/es/UNSAFE_DragHandle.js +17 -17
- package/es/UNSAFE_DrawerLayout.js +12 -12
- package/es/UNSAFE_DrawerPopup.js +13 -13
- package/es/UNSAFE_Dropdown.js +13 -13
- package/es/UNSAFE_Environment.js +4 -4
- package/es/UNSAFE_ExpandableList.js +26 -26
- package/es/UNSAFE_FilePicker.js +4 -4
- 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 +26 -26
- package/es/UNSAFE_Grid.js +4 -4
- package/es/UNSAFE_HighlightText.js +4 -4
- package/es/UNSAFE_Icon.js +15 -15
- package/es/UNSAFE_IconButton.js +18 -18
- package/es/UNSAFE_IconMenuButton.js +24 -24
- package/es/UNSAFE_IconProgressButton.js +21 -21
- package/es/UNSAFE_IconToggleButton.js +18 -18
- package/es/UNSAFE_Indexer.js +6 -6
- package/es/UNSAFE_InputDateMask.js +33 -33
- package/es/UNSAFE_InputDatePicker.js +119 -119
- package/es/UNSAFE_InputPassword.js +35 -35
- package/es/UNSAFE_InputSensitiveText.js +36 -36
- package/es/UNSAFE_InputText.js +36 -36
- package/es/UNSAFE_InputTimeMask.js +32 -32
- package/es/UNSAFE_Label.js +27 -27
- package/es/UNSAFE_LabelValueLayout.js +4 -4
- package/es/UNSAFE_LabelledLink.js +32 -32
- package/es/UNSAFE_Layer.js +8 -8
- package/es/UNSAFE_Legend.js +25 -25
- package/es/UNSAFE_LineAreaChart.js +46 -46
- package/es/UNSAFE_Link/themes/LinkStyles.css.js +1 -1
- package/es/UNSAFE_Link.js +4 -4
- package/es/UNSAFE_ListItemLayout.js +5 -5
- package/es/UNSAFE_ListView.js +28 -28
- package/es/UNSAFE_LiveRegion.js +4 -4
- package/es/UNSAFE_Menu.js +23 -23
- package/es/UNSAFE_MenuButton.js +24 -24
- package/es/UNSAFE_MessageBanner.js +22 -22
- package/es/UNSAFE_MessageToast.js +26 -26
- package/es/UNSAFE_MeterBar.js +16 -16
- package/es/UNSAFE_MeterCircle.js +17 -17
- package/es/UNSAFE_Modal.js +9 -9
- package/es/UNSAFE_NavigationList.js +45 -43
- package/es/UNSAFE_NavigationList.js.map +1 -1
- package/es/UNSAFE_NavigationListCommon.js +74 -73
- package/es/UNSAFE_NavigationListCommon.js.map +1 -1
- package/es/UNSAFE_NumberInputText.js +34 -34
- package/es/UNSAFE_OverflowTabBar.js +56 -54
- package/es/UNSAFE_OverflowTabBar.js.map +1 -1
- package/es/UNSAFE_PictoChart.js +17 -17
- package/es/UNSAFE_PieChart/__test__/PieChart.spec.js +22 -22
- package/es/UNSAFE_PieChart.js +22 -22
- package/es/UNSAFE_Popup.js +17 -17
- package/es/UNSAFE_ProgressBar.js +5 -5
- 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 +27 -27
- package/es/UNSAFE_RadioSet.js +33 -32
- package/es/UNSAFE_RadioSet.js.map +1 -1
- package/es/UNSAFE_RatingGauge.js +17 -17
- package/es/UNSAFE_ReorderableTabBar.js +49 -38
- package/es/UNSAFE_ReorderableTabBar.js.map +1 -1
- package/es/UNSAFE_RichCheckboxSet.js +54 -56
- package/es/UNSAFE_RichCheckboxSet.js.map +1 -1
- package/es/UNSAFE_RichRadioSet.js +34 -33
- package/es/UNSAFE_RichRadioSet.js.map +1 -1
- package/es/UNSAFE_RichSelectionItem.js +58 -196
- package/es/UNSAFE_RichSelectionItem.js.map +1 -1
- package/es/UNSAFE_ScatterChart.js +46 -46
- package/es/UNSAFE_SectionalLegend.js +26 -26
- package/es/UNSAFE_SelectMultiple.js +42 -42
- package/es/UNSAFE_SelectSingle.js +41 -41
- package/es/UNSAFE_SelectionCard.js +5 -5
- package/es/UNSAFE_Selector.js +15 -15
- package/es/UNSAFE_SelectorAll.js +19 -19
- package/es/UNSAFE_Sheet/__test__/Sheet.spec.js +18 -18
- package/es/UNSAFE_Sheet.js +12 -12
- package/es/UNSAFE_SplitMenuButton.js +24 -24
- package/es/UNSAFE_TabBar.js +56 -54
- package/es/UNSAFE_TabBar.js.map +1 -1
- package/es/UNSAFE_TabBarCommon.js +48 -46
- package/es/UNSAFE_TabBarCommon.js.map +1 -1
- package/es/UNSAFE_TabBarMixed.js +66 -64
- package/es/UNSAFE_TabBarMixed.js.map +1 -1
- package/es/UNSAFE_TableView.js +29 -29
- package/es/UNSAFE_TagCloud.js +27 -27
- package/es/UNSAFE_TextArea.js +35 -36
- package/es/UNSAFE_TextArea.js.map +1 -1
- package/es/UNSAFE_TextAreaAutosize.js +36 -36
- package/es/UNSAFE_TextField.js +8 -8
- package/es/UNSAFE_ToggleButton.js +6 -6
- package/es/UNSAFE_Toolbar/tests/Toolbar.spec.js +28 -28
- package/es/UNSAFE_Toolbar.js +4 -4
- package/es/UNSAFE_Train.js +16 -16
- package/es/UNSAFE_TruncatingBadge.js +16 -16
- package/es/UNSAFE_TruncatingText.js +16 -16
- package/es/UNSAFE_UserAssistance.js +30 -30
- package/es/UNSAFE_View.js +7 -7
- package/es/UNSAFE_VirtualizedListView.js +19 -19
- package/es/UNSAFE_VisProgressiveLoader/__test__/VisProgressiveLoader.spec.js +8 -8
- package/es/UNSAFE_VisProgressiveLoader.js +6 -6
- package/es/UNSAFE_VisStatusMessage.js +6 -6
- package/es/UNSAFE_WindowOverlay.js +4 -4
- package/es/View-cf6dfd8e.js +167 -0
- package/es/View-cf6dfd8e.js.map +1 -0
- package/es/VisNoData-d6e475d8.js +32 -0
- package/es/VisNoData-d6e475d8.js.map +1 -0
- package/es/VisProgressiveLoader-36053d5a.js +51 -0
- package/es/VisProgressiveLoader-36053d5a.js.map +1 -0
- package/es/VisTabularDatatip-3497f5ff.js +24 -0
- package/es/VisTabularDatatip-3497f5ff.js.map +1 -0
- package/es/WindowOverlay-ca2baa48.js +110 -0
- package/es/WindowOverlay-ca2baa48.js.map +1 -0
- package/es/YearsGridView-2c978d9f.js +187 -0
- package/es/YearsGridView-2c978d9f.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 +21 -21
- package/es/hooks/PRIVATE_useChartDatatip.js +14 -14
- package/es/hooks/PRIVATE_useChartEvents.js +20 -20
- package/es/hooks/PRIVATE_useChartMarquee.js +25 -25
- 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_useFloating.js +4 -4
- package/es/hooks/PRIVATE_useReorderable.js +5 -5
- package/es/hooks/PRIVATE_useRovingTabIndexContainer.js +4 -4
- package/es/hooks/PRIVATE_useSelection.js +4 -4
- package/es/hooks/PRIVATE_useTabBar.js +4 -4
- package/es/hooks/PRIVATE_useTooltipOnTruncation.js +16 -16
- package/es/hooks/PRIVATE_useVisContextMenu.js +21 -21
- package/es/hooks/PRIVATE_useVisDragModeControls.js +24 -24
- 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_useColorScheme.js +3 -3
- package/es/hooks/UNSAFE_useCurrentBgColor.js +3 -3
- package/es/hooks/UNSAFE_useDensity.js +3 -3
- package/es/hooks/UNSAFE_useOutsideClick.js +8 -8
- package/es/hooks/UNSAFE_usePrefixSuffix.js +4 -4
- package/es/hooks/UNSAFE_usePressClick.js +1 -1
- 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 +16 -16
- package/es/hooks/UNSAFE_useTranslationBundle.js +3 -3
- package/es/hooks/UNSAFE_useUser.js +3 -3
- package/es/index-3fdaba9a.js +11 -0
- package/es/index-3fdaba9a.js.map +1 -0
- package/es/listViewSelectionTests-d1f64e6f.js +3 -3
- package/es/popupUtils-24a723a0.js +29 -0
- package/es/popupUtils-24a723a0.js.map +1 -0
- package/es/render-4d96f0d2.js +34 -0
- package/es/render-4d96f0d2.js.map +1 -0
- package/es/tabbableUtils-070beeed.js +79 -0
- package/es/tabbableUtils-070beeed.js.map +1 -0
- package/es/testData-e1df8616.js +256 -0
- package/es/testData-e1df8616.js.map +1 -0
- package/es/tooltipUtils-35655bd6.js +93 -0
- package/es/tooltipUtils-35655bd6.js.map +1 -0
- package/es/useCellNavigation-bdb3248d.js +121 -0
- package/es/useCellNavigation-bdb3248d.js.map +1 -0
- package/es/useChartContextMenu-61fe46b8.js +2 -2
- package/es/useChartDatatip-b0d35cfe.js +165 -0
- package/es/useChartDatatip-b0d35cfe.js.map +1 -0
- package/es/useChartMarquee-7cd47205.js +293 -0
- package/es/useChartMarquee-7cd47205.js.map +1 -0
- package/es/useColorScheme-8e5e458d.js +19 -0
- package/es/useColorScheme-8e5e458d.js.map +1 -0
- package/es/useContextMenu-3c62d9eb.js +2 -2
- package/es/useCssVars-608cb842.js +58 -0
- package/es/useCssVars-608cb842.js.map +1 -0
- package/es/useCurrentBgColor-ee671513.js +19 -0
- package/es/useCurrentBgColor-ee671513.js.map +1 -0
- package/es/useCurrentKey-b8e62707.js +81 -0
- package/es/useCurrentKey-b8e62707.js.map +1 -0
- package/es/useDatatip-daec4346.js +90 -0
- package/es/useDatatip-daec4346.js.map +1 -0
- package/es/useDensity-556ca8b2.js +19 -0
- package/es/useDensity-556ca8b2.js.map +1 -0
- package/es/useFloating-abfd69eb.js +1916 -0
- package/es/useFloating-abfd69eb.js.map +1 -0
- package/es/useKeyboardEvents-7202253d.js +78 -0
- package/es/useKeyboardEvents-7202253d.js.map +1 -0
- package/es/useLegendContextMenu-66d6eb7e.js +4 -4
- package/es/useMeterDatatip-dcd2a05e.js +73 -0
- package/es/useMeterDatatip-dcd2a05e.js.map +1 -0
- package/es/useNavigationListItem-a28f2c34.js +81 -0
- package/es/useNavigationListItem-a28f2c34.js.map +1 -0
- package/es/useOutsideClick-817bf098.js +101 -0
- package/es/useOutsideClick-817bf098.js.map +1 -0
- package/es/usePopupAnimation-6e0781b5.js +85 -0
- package/es/usePopupAnimation-6e0781b5.js.map +1 -0
- package/es/usePrefixSuffix-0874343c.js +70 -0
- package/es/usePrefixSuffix-0874343c.js.map +1 -0
- package/es/usePressClick-945cc43b.js +39 -0
- package/es/usePressClick-945cc43b.js.map +1 -0
- package/es/useReorderableItem-99a9dbce.js +268 -0
- package/es/useReorderableItem-99a9dbce.js.map +1 -0
- package/es/useRovingTabIndexContainer-f7972085.js +98 -0
- package/es/useRovingTabIndexContainer-f7972085.js.map +1 -0
- package/es/useScale-1cdb639e.js +19 -0
- package/es/useScale-1cdb639e.js.map +1 -0
- package/es/useSelectCommon-896b594a.js +686 -0
- package/es/useSelectCommon-896b594a.js.map +1 -0
- package/es/useSelectDrill-5525e5a3.js +104 -0
- package/es/useSelectDrill-5525e5a3.js.map +1 -0
- package/es/useSelection-2d26ab04.js +239 -0
- package/es/useSelection-2d26ab04.js.map +1 -0
- package/es/useSelection-8be05a70.js +186 -0
- package/es/useSelection-8be05a70.js.map +1 -0
- package/es/useTabBar-cbac0c2e.js +1 -1
- package/es/useTestId-474ac6ca.js +21 -0
- package/es/useTestId-474ac6ca.js.map +1 -0
- package/es/useTheme-5aa36f52.js +19 -0
- package/es/useTheme-5aa36f52.js.map +1 -0
- package/es/useThemeInterpolations-05e58770.js +57 -0
- package/es/useThemeInterpolations-05e58770.js.map +1 -0
- package/es/useTooltip-138c94ee.js +424 -0
- package/es/useTooltip-138c94ee.js.map +1 -0
- package/es/useTooltipOnTruncation-a97211b6.js +27 -0
- package/es/useTooltipOnTruncation-a97211b6.js.map +1 -0
- package/es/useTranslationBundle-2df40edf.js +29 -0
- package/es/useTranslationBundle-2df40edf.js.map +1 -0
- package/es/useUser-6b2e271a.js +19 -0
- package/es/useUser-6b2e271a.js.map +1 -0
- package/es/useVisDragModeControls-ed260d12.js +87 -0
- package/es/useVisDragModeControls-ed260d12.js.map +1 -0
- package/es/useVisEvents-d8652100.js +153 -0
- package/es/useVisEvents-d8652100.js.map +1 -0
- package/es/utils/PRIVATE_tooltipUtils.js +14 -14
- package/es/utils/PRIVATE_visTestUtils.js +6 -6
- package/es/utils/UNSAFE_popupUtils.js +8 -8
- package/es/withDirectionIcon-fe0b69a7.js +14 -0
- package/es/withDirectionIcon-fe0b69a7.js.map +1 -0
- package/es/withThemeProps-1621f692.js +2 -2
- package/package.json +2 -2
- package/types/UNSAFE_DatePicker/useCellNavigation.d.ts +0 -1
- package/types/UNSAFE_Link/themes/LinkStyles.css.d.ts +2 -1
- package/types/UNSAFE_Link/themes/redwood/LinkVariants.css.d.ts +2 -1
- package/types/UNSAFE_Link/themes/stable/LinkVariants.css.d.ts +2 -1
- package/types/hooks/UNSAFE_usePressClick/usePressClick.d.ts +1 -0
- package/amd/BarChart-1be56919.js +0 -2
- package/amd/BarChart-1be56919.js.map +0 -1
- package/amd/BaseButton-771c5db8.js +0 -2
- package/amd/BaseButton-771c5db8.js.map +0 -1
- package/amd/BaseCardView-4f88499c.js +0 -2
- package/amd/BaseCardView-4f88499c.js.map +0 -1
- package/amd/BaseCardViewSelectionTest-adaca8ca.js +0 -2
- package/amd/BaseCardViewSelectionTest-adaca8ca.js.map +0 -1
- package/amd/BaseRichSelection-eb93f0e2.js +0 -2
- package/amd/BaseRichSelection-eb93f0e2.js.map +0 -1
- package/amd/Button-af88bb81.js +0 -2
- package/amd/Button-af88bb81.js.map +0 -1
- package/amd/ButtonSetButton-00612cdd.js +0 -2
- package/amd/ButtonSetButton-00612cdd.js.map +0 -1
- package/amd/ButtonSetIconButton-d0684966.js +0 -2
- package/amd/ButtonSetIconButton-d0684966.js.map +0 -1
- package/amd/ButtonSetItem-1d88a72d.js +0 -2
- package/amd/ButtonSetItem-1d88a72d.js.map +0 -1
- package/amd/CardFlexView-86cb369a.js +0 -2
- package/amd/CardFlexView-86cb369a.js.map +0 -1
- package/amd/CardGridView-b3f11290.js +0 -2
- package/amd/CardGridView-b3f11290.js.map +0 -1
- package/amd/Chart-0a3205dd.js +0 -2
- package/amd/Chart-0a3205dd.js.map +0 -1
- package/amd/Checkbox-3a25138e.js +0 -2
- package/amd/Checkbox-3a25138e.js.map +0 -1
- package/amd/CheckboxControl-232e227d.js +0 -2
- package/amd/CheckboxControl-232e227d.js.map +0 -1
- package/amd/CheckboxRadioField-9b73f66b.js +0 -2
- package/amd/CheckboxRadioField-9b73f66b.js.map +0 -1
- package/amd/CheckboxSetContext-2e486ea8.js +0 -2
- package/amd/CheckboxSetContext-2e486ea8.js.map +0 -1
- package/amd/ClearIcon-f1befe37.js +0 -2
- package/amd/ClearIcon-f1befe37.js.map +0 -1
- package/amd/ComboChart-5dba7db4.js +0 -2
- package/amd/ComboChart-5dba7db4.js.map +0 -1
- package/amd/CompactUserAssistance-f962b357.js +0 -2
- package/amd/CompactUserAssistance-f962b357.js.map +0 -1
- package/amd/ComponentMessageContainer-13e53260.js +0 -2
- package/amd/ComponentMessageContainer-13e53260.js.map +0 -1
- package/amd/ConveyorBeltItem-1dfb412e.js +0 -2
- package/amd/ConveyorBeltItem-1dfb412e.js.map +0 -1
- package/amd/DatePicker-b907fb97.js +0 -2
- package/amd/DatePicker-b907fb97.js.map +0 -1
- package/amd/DatePickerHeader-d95959a6.js +0 -2
- package/amd/DatePickerHeader-d95959a6.js.map +0 -1
- package/amd/Diagram-92f409e0.js +0 -2
- package/amd/Diagram-92f409e0.js.map +0 -1
- package/amd/Dialog-b9dd8533.js +0 -2
- package/amd/Dialog-b9dd8533.js.map +0 -1
- package/amd/EmbeddedIconButton-8635fed8.js +0 -2
- package/amd/EmbeddedIconButton-8635fed8.js.map +0 -1
- package/amd/ExpandableList-c372fe68.js +0 -2
- package/amd/ExpandableList-c372fe68.js.map +0 -1
- package/amd/Gantt-f6a53a90.js +0 -2
- package/amd/Gantt-f6a53a90.js.map +0 -1
- package/amd/IconButton-05c6b793.js +0 -2
- package/amd/IconButton-05c6b793.js.map +0 -1
- package/amd/IconMenuButton-82a7258c.js +0 -2
- package/amd/IconMenuButton-82a7258c.js.map +0 -1
- package/amd/IconProgressButton-3bff5384.js +0 -2
- package/amd/IconProgressButton-3bff5384.js.map +0 -1
- package/amd/IconSwitchButton-faf2b405.js +0 -2
- package/amd/IconSwitchButton-faf2b405.js.map +0 -1
- package/amd/IconToggleButton-d5112634.js +0 -2
- package/amd/IconToggleButton-d5112634.js.map +0 -1
- package/amd/Indexer-510aaf3a.js +0 -2
- package/amd/Indexer-510aaf3a.js.map +0 -1
- package/amd/InlineUserAssistance-3d3e72a9.js +0 -2
- package/amd/InlineUserAssistance-3d3e72a9.js.map +0 -1
- package/amd/InputDateMask-55fcbf50.js +0 -2
- package/amd/InputDateMask-55fcbf50.js.map +0 -1
- package/amd/InputDatePicker-ecd4a7ce.js +0 -2
- package/amd/InputDatePicker-ecd4a7ce.js.map +0 -1
- package/amd/InputPassword-61090b77.js +0 -2
- package/amd/InputPassword-61090b77.js.map +0 -1
- package/amd/InputText-32954a14.js +0 -2
- package/amd/InputText-32954a14.js.map +0 -1
- package/amd/Label-7cbbe3b7.js +0 -2
- package/amd/Label-7cbbe3b7.js.map +0 -1
- package/amd/LineAreaChart-190b3d46.js +0 -2
- package/amd/LineAreaChart-190b3d46.js.map +0 -1
- package/amd/Link-2dae4de2.js +0 -2
- package/amd/Link-2dae4de2.js.map +0 -1
- package/amd/List-37e37948.js +0 -2
- package/amd/List-37e37948.js.map +0 -1
- package/amd/ListView-325e1814.js +0 -2
- package/amd/ListView-325e1814.js.map +0 -1
- package/amd/LoadMoreCollection-83413a59.js +0 -2
- package/amd/LoadMoreCollection-83413a59.js.map +0 -1
- package/amd/MenuButton-233a631a.js +0 -2
- package/amd/MenuButton-233a631a.js.map +0 -1
- package/amd/Message-40182dfc.js +0 -2
- package/amd/Message-40182dfc.js.map +0 -1
- package/amd/MessageToast-236687bd.js +0 -2
- package/amd/MessageToast-236687bd.js.map +0 -1
- package/amd/MonthView-c8a6ab15.js +0 -2
- package/amd/MonthView-c8a6ab15.js.map +0 -1
- package/amd/NumberInputText-91b73dcb.js +0 -2
- package/amd/NumberInputText-91b73dcb.js.map +0 -1
- package/amd/OverflowTabBar-ef21bcd3.js +0 -2
- package/amd/OverflowTabBar-ef21bcd3.js.map +0 -1
- package/amd/OverflowTabBarItem-db77f3d3.js +0 -2
- package/amd/OverflowTabBarItem-db77f3d3.js.map +0 -1
- package/amd/PictoChart-d5bedf82.js +0 -2
- package/amd/PictoChart-d5bedf82.js.map +0 -1
- package/amd/ProgressButton-e30c909b.js +0 -2
- package/amd/ProgressButton-e30c909b.js.map +0 -1
- package/amd/RadioItem-7ebada33.js +0 -2
- package/amd/RadioItem-7ebada33.js.map +0 -1
- package/amd/RadioSet-5e4b6669.js +0 -2
- package/amd/RadioSet-5e4b6669.js.map +0 -1
- package/amd/RemovableNavigationListItem-9950c473.js +0 -2
- package/amd/RemovableNavigationListItem-9950c473.js.map +0 -1
- package/amd/RemovableTabBarItem-fcada993.js +0 -2
- package/amd/RemovableTabBarItem-fcada993.js.map +0 -1
- package/amd/RevealToggleIcon-411d7a73.js +0 -2
- package/amd/RevealToggleIcon-411d7a73.js.map +0 -1
- package/amd/ScatterChart-3f6024a2.js +0 -2
- package/amd/ScatterChart-3f6024a2.js.map +0 -1
- package/amd/SelectMultiple-d3196bcd.js +0 -2
- package/amd/SelectMultiple-d3196bcd.js.map +0 -1
- package/amd/SelectSingle-007ab01c.js +0 -2
- package/amd/SelectSingle-007ab01c.js.map +0 -1
- package/amd/SplitMenuButton-65acf4d4.js +0 -2
- package/amd/SplitMenuButton-65acf4d4.js.map +0 -1
- package/amd/Table-52c72d48.js +0 -2
- package/amd/Table-52c72d48.js.map +0 -1
- package/amd/TableView-dc0766a7.js +0 -2
- package/amd/TableView-dc0766a7.js.map +0 -1
- package/amd/TagCloud-6afc73f7.js +0 -2
- package/amd/TagCloud-6afc73f7.js.map +0 -1
- package/amd/TextArea-f6b13c73.js +0 -2
- package/amd/TextArea-f6b13c73.js.map +0 -1
- package/amd/TextAreaAutosize-af350c32.js +0 -2
- package/amd/TextAreaAutosize-af350c32.js.map +0 -1
- package/amd/TimeComponentCanvas2D-27e55de9.js +0 -2
- package/amd/TimeComponentCanvas2D-27e55de9.js.map +0 -1
- package/amd/ToggleButton-a999647d.js +0 -2
- package/amd/ToggleButton-a999647d.js.map +0 -1
- package/amd/VirtualizedCollection-897516a5.js +0 -2
- package/amd/VirtualizedCollection-897516a5.js.map +0 -1
- package/amd/VirtualizedListView-0b9e1c53.js +0 -2
- package/amd/VirtualizedListView-0b9e1c53.js.map +0 -1
- package/amd/YearsGridView-c09d1d19.js +0 -2
- package/amd/YearsGridView-c09d1d19.js.map +0 -1
- package/amd/useCellNavigation-47060bc3.js +0 -2
- package/amd/useCellNavigation-47060bc3.js.map +0 -1
- package/amd/useChartMarquee-8ce16d57.js +0 -2
- package/amd/useChartMarquee-8ce16d57.js.map +0 -1
- package/amd/usePressClick-b7b38da2.js +0 -2
- package/amd/usePressClick-b7b38da2.js.map +0 -1
- package/amd/useSelectCommon-fd0e7664.js +0 -2
- package/amd/useSelectCommon-fd0e7664.js.map +0 -1
- package/amd/useSelectDrill-332195a7.js +0 -2
- package/amd/useSelectDrill-332195a7.js.map +0 -1
- package/amd/useSelection-04d131fa.js +0 -2
- package/amd/useSelection-04d131fa.js.map +0 -1
- package/amd/useVisDragModeControls-69001c64.js +0 -2
- package/amd/useVisDragModeControls-69001c64.js.map +0 -1
- package/cjs/BarChart-fae84003.js +0 -181
- package/cjs/BarChart-fae84003.js.map +0 -1
- package/cjs/BaseButton-97ec7696.js +0 -174
- package/cjs/BaseButton-97ec7696.js.map +0 -1
- package/cjs/BaseCardView-0be36db0.js +0 -687
- package/cjs/BaseCardView-0be36db0.js.map +0 -1
- package/cjs/BaseCardViewSelectionTest-d91b3015.js +0 -734
- package/cjs/BaseCardViewSelectionTest-d91b3015.js.map +0 -1
- package/cjs/BaseRichSelection-e2a38380.js +0 -344
- package/cjs/BaseRichSelection-e2a38380.js.map +0 -1
- package/cjs/Button-371573d5.js +0 -24
- package/cjs/Button-371573d5.js.map +0 -1
- package/cjs/ButtonSetButton-c6621073.js +0 -35
- package/cjs/ButtonSetButton-c6621073.js.map +0 -1
- package/cjs/ButtonSetIconButton-8645f3a5.js +0 -42
- package/cjs/ButtonSetIconButton-8645f3a5.js.map +0 -1
- package/cjs/ButtonSetItem-aa4211b4.js +0 -67
- package/cjs/ButtonSetItem-aa4211b4.js.map +0 -1
- package/cjs/CardFlexView-2547fc13.js +0 -29
- package/cjs/CardFlexView-2547fc13.js.map +0 -1
- package/cjs/CardGridView-c355e9d4.js +0 -17
- package/cjs/CardGridView-c355e9d4.js.map +0 -1
- package/cjs/Chart-b79289a8.js +0 -493
- package/cjs/Chart-b79289a8.js.map +0 -1
- package/cjs/Checkbox-5bfd221f.js +0 -106
- package/cjs/Checkbox-5bfd221f.js.map +0 -1
- package/cjs/CheckboxControl-3be46530.js +0 -111
- package/cjs/CheckboxControl-3be46530.js.map +0 -1
- package/cjs/CheckboxRadioField-037cddb9.js +0 -185
- package/cjs/CheckboxRadioField-037cddb9.js.map +0 -1
- package/cjs/ClearIcon-02e093be.js +0 -23
- package/cjs/ClearIcon-02e093be.js.map +0 -1
- package/cjs/ComboChart-e17d5863.js +0 -174
- package/cjs/ComboChart-e17d5863.js.map +0 -1
- package/cjs/CompactUserAssistance-b3c3929e.js +0 -49
- package/cjs/CompactUserAssistance-b3c3929e.js.map +0 -1
- package/cjs/ComponentMessageContainer-1cea67f6.js +0 -71
- package/cjs/ComponentMessageContainer-1cea67f6.js.map +0 -1
- package/cjs/ConveyorBeltItem-2577c86d.js +0 -641
- package/cjs/ConveyorBeltItem-2577c86d.js.map +0 -1
- package/cjs/DatePicker-c770df48.js +0 -566
- package/cjs/DatePicker-c770df48.js.map +0 -1
- package/cjs/DatePickerHeader-da8173f7.js +0 -46
- package/cjs/DatePickerHeader-da8173f7.js.map +0 -1
- package/cjs/Diagram-c4064fd7.js +0 -2037
- package/cjs/Diagram-c4064fd7.js.map +0 -1
- package/cjs/Dialog-c6c8024c.js +0 -346
- package/cjs/Dialog-c6c8024c.js.map +0 -1
- package/cjs/EmbeddedIconButton-89616e5f.js +0 -13
- package/cjs/EmbeddedIconButton-89616e5f.js.map +0 -1
- package/cjs/ExpandableList-d1823448.js +0 -169
- package/cjs/ExpandableList-d1823448.js.map +0 -1
- package/cjs/Gantt-674a89f8.js +0 -3819
- package/cjs/Gantt-674a89f8.js.map +0 -1
- package/cjs/IconButton-e7a68b4b.js +0 -39
- package/cjs/IconButton-e7a68b4b.js.map +0 -1
- package/cjs/IconMenuButton-3e540f38.js +0 -58
- package/cjs/IconMenuButton-3e540f38.js.map +0 -1
- package/cjs/IconProgressButton-3aa70c31.js +0 -49
- package/cjs/IconProgressButton-3aa70c31.js.map +0 -1
- package/cjs/IconSwitchButton-6bab813f.js +0 -46
- package/cjs/IconSwitchButton-6bab813f.js.map +0 -1
- package/cjs/IconToggleButton-7ec8c084.js +0 -45
- package/cjs/IconToggleButton-7ec8c084.js.map +0 -1
- package/cjs/Indexer-099ecbad.js +0 -339
- package/cjs/Indexer-099ecbad.js.map +0 -1
- package/cjs/InlineUserAssistance-5d6bac7a.js +0 -85
- package/cjs/InlineUserAssistance-5d6bac7a.js.map +0 -1
- package/cjs/InputDateMask-946f6dfa.js +0 -1060
- package/cjs/InputDateMask-946f6dfa.js.map +0 -1
- package/cjs/InputDatePicker-3dace90c.js +0 -309
- package/cjs/InputDatePicker-3dace90c.js.map +0 -1
- package/cjs/InputPassword-564260d2.js +0 -157
- package/cjs/InputPassword-564260d2.js.map +0 -1
- package/cjs/InputText-a9d46813.js +0 -199
- package/cjs/InputText-a9d46813.js.map +0 -1
- package/cjs/Label-2e05c87f.js +0 -85
- package/cjs/Label-2e05c87f.js.map +0 -1
- package/cjs/LineAreaChart-523ae108.js +0 -172
- package/cjs/LineAreaChart-523ae108.js.map +0 -1
- package/cjs/Link-a829e7f1.js +0 -35
- package/cjs/Link-a829e7f1.js.map +0 -1
- package/cjs/List-24abb3df.js +0 -722
- package/cjs/List-24abb3df.js.map +0 -1
- package/cjs/ListView-7e894199.js +0 -430
- package/cjs/ListView-7e894199.js.map +0 -1
- package/cjs/LoadMoreCollection-69bc038c.js +0 -34
- package/cjs/LoadMoreCollection-69bc038c.js.map +0 -1
- package/cjs/MenuButton-b811e5e4.js +0 -63
- package/cjs/MenuButton-b811e5e4.js.map +0 -1
- package/cjs/Message-d1d5538e.js +0 -208
- package/cjs/Message-d1d5538e.js.map +0 -1
- package/cjs/MessageToast-9154f05f.js +0 -243
- package/cjs/MessageToast-9154f05f.js.map +0 -1
- package/cjs/MonthView-35623a0e.js +0 -210
- package/cjs/MonthView-35623a0e.js.map +0 -1
- package/cjs/NavigationListItem-9b3d3258.js +0 -153
- package/cjs/NavigationListItem-9b3d3258.js.map +0 -1
- package/cjs/NumberInputText-6032717d.js +0 -223
- package/cjs/NumberInputText-6032717d.js.map +0 -1
- package/cjs/OverflowTabBar-794b4c93.js +0 -71
- package/cjs/OverflowTabBar-794b4c93.js.map +0 -1
- package/cjs/OverflowTabBarItem-43956479.js +0 -88
- package/cjs/OverflowTabBarItem-43956479.js.map +0 -1
- package/cjs/PictoChart-b650c050.js +0 -747
- package/cjs/PictoChart-b650c050.js.map +0 -1
- package/cjs/ProgressButton-1a01d49b.js +0 -58
- package/cjs/ProgressButton-1a01d49b.js.map +0 -1
- package/cjs/RadioItem-68304596.js +0 -115
- package/cjs/RadioItem-68304596.js.map +0 -1
- package/cjs/RadioSet-a16f664b.js +0 -45
- package/cjs/RadioSet-a16f664b.js.map +0 -1
- package/cjs/RemovableNavigationListItem-b13b3516.js +0 -26
- package/cjs/RemovableNavigationListItem-b13b3516.js.map +0 -1
- package/cjs/RemovableTabBarItem-e71b7be3.js +0 -38
- package/cjs/RemovableTabBarItem-e71b7be3.js.map +0 -1
- package/cjs/RevealToggleIcon-06b0b035.js +0 -28
- package/cjs/RevealToggleIcon-06b0b035.js.map +0 -1
- package/cjs/ScatterChart-bd2e0ebb.js +0 -105
- package/cjs/ScatterChart-bd2e0ebb.js.map +0 -1
- package/cjs/SelectMultiple-0d809f25.js +0 -1299
- package/cjs/SelectMultiple-0d809f25.js.map +0 -1
- package/cjs/SelectSingle-f5dd375a.js +0 -732
- package/cjs/SelectSingle-f5dd375a.js.map +0 -1
- package/cjs/SplitMenuButton-e7fd9b79.js +0 -141
- package/cjs/SplitMenuButton-e7fd9b79.js.map +0 -1
- package/cjs/Table-65e94df9.js +0 -5499
- package/cjs/Table-65e94df9.js.map +0 -1
- package/cjs/TableView-dfc37f9f.js +0 -33
- package/cjs/TableView-dfc37f9f.js.map +0 -1
- package/cjs/TagCloud-0aee2c72.js +0 -826
- package/cjs/TagCloud-0aee2c72.js.map +0 -1
- package/cjs/TextArea-a11875f3.js +0 -162
- package/cjs/TextArea-a11875f3.js.map +0 -1
- package/cjs/TextAreaAutosize-5a8e8335.js +0 -246
- package/cjs/TextAreaAutosize-5a8e8335.js.map +0 -1
- package/cjs/TimeComponentCanvas2D-e6be22d4.js +0 -591
- package/cjs/TimeComponentCanvas2D-e6be22d4.js.map +0 -1
- package/cjs/ToggleButton-8ac0ff29.js +0 -30
- package/cjs/ToggleButton-8ac0ff29.js.map +0 -1
- package/cjs/VirtualizedCollection-9e8c48b9.js +0 -180
- package/cjs/VirtualizedCollection-9e8c48b9.js.map +0 -1
- package/cjs/VirtualizedListView-0a4f07ca.js +0 -16
- package/cjs/VirtualizedListView-0a4f07ca.js.map +0 -1
- package/cjs/YearsGridView-83c7e684.js +0 -190
- package/cjs/YearsGridView-83c7e684.js.map +0 -1
- package/cjs/useCellNavigation-7a24d0c0.js +0 -129
- package/cjs/useCellNavigation-7a24d0c0.js.map +0 -1
- package/cjs/useChartMarquee-7c09d6ef.js +0 -295
- package/cjs/useChartMarquee-7c09d6ef.js.map +0 -1
- package/cjs/usePressClick-421494df.js +0 -33
- package/cjs/usePressClick-421494df.js.map +0 -1
- package/cjs/useSelectCommon-d593ef26.js +0 -709
- package/cjs/useSelectCommon-d593ef26.js.map +0 -1
- package/cjs/useSelectDrill-ddca7003.js +0 -107
- package/cjs/useSelectDrill-ddca7003.js.map +0 -1
- package/cjs/useSelection-810ecdc6.js +0 -188
- package/cjs/useSelection-810ecdc6.js.map +0 -1
- package/cjs/useVisDragModeControls-388926ea.js +0 -89
- package/cjs/useVisDragModeControls-388926ea.js.map +0 -1
- package/es/BarChart-bbc688ef.js +0 -179
- package/es/BarChart-bbc688ef.js.map +0 -1
- package/es/BaseButton-a0534b4d.js +0 -172
- package/es/BaseButton-a0534b4d.js.map +0 -1
- package/es/BaseCardViewSelectionTest-2e5f019a.js +0 -721
- package/es/BaseCardViewSelectionTest-2e5f019a.js.map +0 -1
- package/es/BaseNavigationListItem-af84a9ee.js +0 -119
- package/es/BaseNavigationListItem-af84a9ee.js.map +0 -1
- package/es/BaseRichSelection-9f2f2b59.js +0 -342
- package/es/BaseRichSelection-9f2f2b59.js.map +0 -1
- package/es/Button-f55c264d.js +0 -22
- package/es/Button-f55c264d.js.map +0 -1
- package/es/ButtonSetButton-226c9e73.js +0 -33
- package/es/ButtonSetButton-226c9e73.js.map +0 -1
- package/es/ButtonSetIconButton-2a046c9c.js +0 -40
- package/es/ButtonSetIconButton-2a046c9c.js.map +0 -1
- package/es/ButtonSetItem-43ef9553.js +0 -65
- package/es/ButtonSetItem-43ef9553.js.map +0 -1
- package/es/Card-f3b7c723.js +0 -15
- package/es/Card-f3b7c723.js.map +0 -1
- package/es/Center-76b761ea.js +0 -16
- package/es/Center-76b761ea.js.map +0 -1
- package/es/Chart-6291ad48.js +0 -491
- package/es/Chart-6291ad48.js.map +0 -1
- package/es/Checkbox-34816a7d.js +0 -104
- package/es/Checkbox-34816a7d.js.map +0 -1
- package/es/CheckboxControl-a9d4d9d5.js +0 -109
- package/es/CheckboxControl-a9d4d9d5.js.map +0 -1
- package/es/CheckboxRadioField-922ab9ff.js +0 -183
- package/es/CheckboxRadioField-922ab9ff.js.map +0 -1
- package/es/CheckboxSet-28953b25.js +0 -49
- package/es/CheckboxSet-28953b25.js.map +0 -1
- package/es/ClearIcon-29781882.js +0 -21
- package/es/ClearIcon-29781882.js.map +0 -1
- package/es/ComboChart-4738f936.js +0 -172
- package/es/ComboChart-4738f936.js.map +0 -1
- package/es/CompactLabelAssistance-fd3fb481.js +0 -34
- package/es/CompactLabelAssistance-fd3fb481.js.map +0 -1
- package/es/CompactUserAssistance-bd24e31a.js +0 -47
- package/es/CompactUserAssistance-bd24e31a.js.map +0 -1
- package/es/ComponentMessageContainer-6c106a09.js +0 -68
- package/es/ComponentMessageContainer-6c106a09.js.map +0 -1
- package/es/ConveyorBeltItem-ce67a451.js +0 -638
- package/es/ConveyorBeltItem-ce67a451.js.map +0 -1
- package/es/DatePicker-e7f2ef3c.js +0 -564
- package/es/DatePicker-e7f2ef3c.js.map +0 -1
- package/es/DatePickerHeader-9c0d4332.js +0 -44
- package/es/DatePickerHeader-9c0d4332.js.map +0 -1
- package/es/Diagram-b1f6a590.js +0 -2035
- package/es/Diagram-b1f6a590.js.map +0 -1
- package/es/Dialog-0ca362cc.js +0 -344
- package/es/Dialog-0ca362cc.js.map +0 -1
- package/es/DragHandle-99d4c921.js +0 -22
- package/es/DragHandle-99d4c921.js.map +0 -1
- package/es/DrawerPopup-9cdb203a.js +0 -381
- package/es/DrawerPopup-9cdb203a.js.map +0 -1
- package/es/Dropdown-60833900.js +0 -80
- package/es/Dropdown-60833900.js.map +0 -1
- package/es/EmbeddedIconButton-0c3562a1.js +0 -11
- package/es/EmbeddedIconButton-0c3562a1.js.map +0 -1
- package/es/EnvironmentProvider-bada8909.js +0 -58
- package/es/EnvironmentProvider-bada8909.js.map +0 -1
- package/es/ExpandableList-cbf9ae2c.js +0 -167
- package/es/ExpandableList-cbf9ae2c.js.map +0 -1
- package/es/Flex-ce31b351.js +0 -30
- package/es/Flex-ce31b351.js.map +0 -1
- package/es/Floating-f02677ba.js +0 -462
- package/es/Floating-f02677ba.js.map +0 -1
- package/es/Gantt-5a395647.js +0 -3817
- package/es/Gantt-5a395647.js.map +0 -1
- package/es/Grid-421eb560.js +0 -27
- package/es/Grid-421eb560.js.map +0 -1
- package/es/Gridlines-6098cb5b.js +0 -168
- package/es/Gridlines-6098cb5b.js.map +0 -1
- package/es/HighlightText-86d92552.js +0 -31
- package/es/HighlightText-86d92552.js.map +0 -1
- package/es/IconButton-f3f7af21.js +0 -37
- package/es/IconButton-f3f7af21.js.map +0 -1
- package/es/IconMenuButton-48909b85.js +0 -56
- package/es/IconMenuButton-48909b85.js.map +0 -1
- package/es/IconProgressButton-1c4d65c3.js +0 -47
- package/es/IconProgressButton-1c4d65c3.js.map +0 -1
- package/es/IconSwitchButton-5db4ae26.js +0 -44
- package/es/IconSwitchButton-5db4ae26.js.map +0 -1
- package/es/IconToggleButton-be6c0ba1.js +0 -43
- package/es/IconToggleButton-be6c0ba1.js.map +0 -1
- package/es/IconUserAssistance-92be9618.js +0 -73
- package/es/IconUserAssistance-92be9618.js.map +0 -1
- package/es/InlineUserAssistance-2677a1eb.js +0 -81
- package/es/InlineUserAssistance-2677a1eb.js.map +0 -1
- package/es/InputDateMask-76493bee.js +0 -1056
- package/es/InputDateMask-76493bee.js.map +0 -1
- package/es/InputDatePicker-836ee6f7.js +0 -307
- package/es/InputDatePicker-836ee6f7.js.map +0 -1
- package/es/InputPassword-fa63ac17.js +0 -155
- package/es/InputPassword-fa63ac17.js.map +0 -1
- package/es/InputText-ce2272a8.js +0 -197
- package/es/InputText-ce2272a8.js.map +0 -1
- package/es/Label-56ca049f.js +0 -83
- package/es/Label-56ca049f.js.map +0 -1
- package/es/Layer-446bf21e.js +0 -91
- package/es/Layer-446bf21e.js.map +0 -1
- package/es/LayerHost-e6402730.js +0 -41
- package/es/LayerHost-e6402730.js.map +0 -1
- package/es/LayerManager-fa745cec.js +0 -34
- package/es/LayerManager-fa745cec.js.map +0 -1
- package/es/LineAreaChart-d3586935.js +0 -170
- package/es/LineAreaChart-d3586935.js.map +0 -1
- package/es/LineSeries-fc167ea2.js +0 -109
- package/es/LineSeries-fc167ea2.js.map +0 -1
- package/es/Link-98742013.js +0 -33
- package/es/Link-98742013.js.map +0 -1
- package/es/ListItemLayout-e9854821.js +0 -110
- package/es/ListItemLayout-e9854821.js.map +0 -1
- package/es/LiveRegion-b56a1aa2.js +0 -39
- package/es/LiveRegion-b56a1aa2.js.map +0 -1
- package/es/MaxLengthCounter-181b4fc9.js +0 -25
- package/es/MaxLengthCounter-181b4fc9.js.map +0 -1
- package/es/MaxLengthLiveRegion-2f3d34cf.js +0 -23
- package/es/MaxLengthLiveRegion-2f3d34cf.js.map +0 -1
- package/es/MenuButton-c00e269e.js +0 -61
- package/es/MenuButton-c00e269e.js.map +0 -1
- package/es/Message-b9e16c1c.js +0 -203
- package/es/Message-b9e16c1c.js.map +0 -1
- package/es/MessageLayer-7e3184aa.js +0 -58
- package/es/MessageLayer-7e3184aa.js.map +0 -1
- package/es/MessageToast-f9b0a234.js +0 -241
- package/es/MessageToast-f9b0a234.js.map +0 -1
- package/es/Modal-24a0bf4b.js +0 -288
- package/es/Modal-24a0bf4b.js.map +0 -1
- package/es/MonthView-5e633194.js +0 -208
- package/es/MonthView-5e633194.js.map +0 -1
- package/es/NavigationListItem-37edc23b.js +0 -150
- package/es/NavigationListItem-37edc23b.js.map +0 -1
- package/es/NumberInputText-f5d01daa.js +0 -220
- package/es/NumberInputText-f5d01daa.js.map +0 -1
- package/es/OverflowTabBar-87b36877.js +0 -69
- package/es/OverflowTabBar-87b36877.js.map +0 -1
- package/es/OverflowTabBarItem-a2684d2b.js +0 -86
- package/es/OverflowTabBarItem-a2684d2b.js.map +0 -1
- package/es/PictoChart-5b71908b.js +0 -744
- package/es/PictoChart-5b71908b.js.map +0 -1
- package/es/Popup-d8bf7f4d.js +0 -258
- package/es/Popup-d8bf7f4d.js.map +0 -1
- package/es/ProgressBar-2fa99d6f.js +0 -62
- package/es/ProgressBar-2fa99d6f.js.map +0 -1
- package/es/ProgressButton-9390070e.js +0 -56
- package/es/ProgressButton-9390070e.js.map +0 -1
- package/es/ProgressCircle-faf79b79.js +0 -48
- package/es/ProgressCircle-faf79b79.js.map +0 -1
- package/es/RadioItem-96cbf0ed.js +0 -113
- package/es/RadioItem-96cbf0ed.js.map +0 -1
- package/es/RadioSet-c51b3d56.js +0 -43
- package/es/RadioSet-c51b3d56.js.map +0 -1
- package/es/RemovableNavigationListItem-517d59b0.js +0 -24
- package/es/RemovableNavigationListItem-517d59b0.js.map +0 -1
- package/es/RemovableTabBarItem-87ba87ca.js +0 -36
- package/es/RemovableTabBarItem-87ba87ca.js.map +0 -1
- package/es/ReorderableTabBar-fc76a33b.js +0 -77
- package/es/ReorderableTabBar-fc76a33b.js.map +0 -1
- package/es/RevealToggleIcon-35baaadf.js +0 -26
- package/es/RevealToggleIcon-35baaadf.js.map +0 -1
- package/es/ScatterChart-449ec029.js +0 -103
- package/es/ScatterChart-449ec029.js.map +0 -1
- package/es/SectionedContent-3274d8f9.js +0 -64
- package/es/SectionedContent-3274d8f9.js.map +0 -1
- package/es/SelectMultiple-50995ef7.js +0 -1297
- package/es/SelectMultiple-50995ef7.js.map +0 -1
- package/es/SelectSingle-dcf0e9b1.js +0 -730
- package/es/SelectSingle-dcf0e9b1.js.map +0 -1
- package/es/SelectionCard-1ed9cf08.js +0 -16
- package/es/SelectionCard-1ed9cf08.js.map +0 -1
- package/es/SelectorAll-f52550a6.js +0 -69
- package/es/SelectorAll-f52550a6.js.map +0 -1
- package/es/Sheet-da412baf.js +0 -158
- package/es/Sheet-da412baf.js.map +0 -1
- package/es/SplitMenuButton-f44064de.js +0 -139
- package/es/SplitMenuButton-f44064de.js.map +0 -1
- package/es/StyledCard-362bd74b.js +0 -105
- package/es/StyledCard-362bd74b.js.map +0 -1
- package/es/StyledLabelValueLayout-d4881d3b.js +0 -18
- package/es/StyledLabelValueLayout-d4881d3b.js.map +0 -1
- package/es/TabBar-2858ff9c.js +0 -77
- package/es/TabBar-2858ff9c.js.map +0 -1
- package/es/TabBarMixed-a4beabce.js +0 -78
- package/es/TabBarMixed-a4beabce.js.map +0 -1
- package/es/TabBarMixedSeparator-51c518a1.js +0 -19
- package/es/TabBarMixedSeparator-51c518a1.js.map +0 -1
- package/es/Table-9919625b.js +0 -5497
- package/es/Table-9919625b.js.map +0 -1
- package/es/TableView-c97ef8ee.js +0 -31
- package/es/TableView-c97ef8ee.js.map +0 -1
- package/es/TagCloud-3f81d651.js +0 -824
- package/es/TagCloud-3f81d651.js.map +0 -1
- package/es/TextArea-2eb362ec.js +0 -160
- package/es/TextArea-2eb362ec.js.map +0 -1
- package/es/TextAreaAutosize-35a923c3.js +0 -244
- package/es/TextAreaAutosize-35a923c3.js.map +0 -1
- package/es/TimeComponentCanvas2D-9fd1f811.js +0 -568
- package/es/TimeComponentCanvas2D-9fd1f811.js.map +0 -1
- package/es/ToggleButton-cf8226d9.js +0 -28
- package/es/ToggleButton-cf8226d9.js.map +0 -1
- package/es/View-afe98b65.js +0 -167
- package/es/View-afe98b65.js.map +0 -1
- package/es/VisNoData-9ceb58f4.js +0 -32
- package/es/VisNoData-9ceb58f4.js.map +0 -1
- package/es/VisProgressiveLoader-36c728ac.js +0 -51
- package/es/VisProgressiveLoader-36c728ac.js.map +0 -1
- package/es/VisTabularDatatip-59629377.js +0 -24
- package/es/VisTabularDatatip-59629377.js.map +0 -1
- package/es/WindowOverlay-a07b2e24.js +0 -110
- package/es/WindowOverlay-a07b2e24.js.map +0 -1
- package/es/YearsGridView-d859edba.js +0 -187
- package/es/YearsGridView-d859edba.js.map +0 -1
- package/es/index-e33bcd96.js +0 -11
- package/es/index-e33bcd96.js.map +0 -1
- package/es/popupUtils-58411a98.js +0 -29
- package/es/popupUtils-58411a98.js.map +0 -1
- package/es/render-343557e9.js +0 -34
- package/es/render-343557e9.js.map +0 -1
- package/es/tabbableUtils-d6485f5e.js +0 -79
- package/es/tabbableUtils-d6485f5e.js.map +0 -1
- package/es/testData-d5181e9f.js +0 -256
- package/es/testData-d5181e9f.js.map +0 -1
- package/es/tooltipUtils-768450a7.js +0 -93
- package/es/tooltipUtils-768450a7.js.map +0 -1
- package/es/useCellNavigation-88a1754f.js +0 -126
- package/es/useCellNavigation-88a1754f.js.map +0 -1
- package/es/useChartDatatip-d6a6c5e1.js +0 -165
- package/es/useChartDatatip-d6a6c5e1.js.map +0 -1
- package/es/useChartMarquee-6587dbec.js +0 -293
- package/es/useChartMarquee-6587dbec.js.map +0 -1
- package/es/useColorScheme-c4e237ad.js +0 -19
- package/es/useColorScheme-c4e237ad.js.map +0 -1
- package/es/useCssVars-d72a8439.js +0 -58
- package/es/useCssVars-d72a8439.js.map +0 -1
- package/es/useCurrentBgColor-14745af3.js +0 -19
- package/es/useCurrentBgColor-14745af3.js.map +0 -1
- package/es/useCurrentKey-7287061f.js +0 -81
- package/es/useCurrentKey-7287061f.js.map +0 -1
- package/es/useDatatip-9635bc2f.js +0 -90
- package/es/useDatatip-9635bc2f.js.map +0 -1
- package/es/useDensity-c17603b2.js +0 -19
- package/es/useDensity-c17603b2.js.map +0 -1
- package/es/useFloating-953362cf.js +0 -1916
- package/es/useFloating-953362cf.js.map +0 -1
- package/es/useKeyboardEvents-2378a650.js +0 -78
- package/es/useKeyboardEvents-2378a650.js.map +0 -1
- package/es/useMeterDatatip-834e67e1.js +0 -73
- package/es/useMeterDatatip-834e67e1.js.map +0 -1
- package/es/useOutsideClick-fd9ad806.js +0 -101
- package/es/useOutsideClick-fd9ad806.js.map +0 -1
- package/es/usePopupAnimation-f017bc43.js +0 -85
- package/es/usePopupAnimation-f017bc43.js.map +0 -1
- package/es/usePrefixSuffix-5a74f2c4.js +0 -70
- package/es/usePrefixSuffix-5a74f2c4.js.map +0 -1
- package/es/usePressClick-2ec8e098.js +0 -31
- package/es/usePressClick-2ec8e098.js.map +0 -1
- package/es/useReorderableItem-22ea4c46.js +0 -268
- package/es/useReorderableItem-22ea4c46.js.map +0 -1
- package/es/useRovingTabIndexContainer-bc7ae447.js +0 -98
- package/es/useRovingTabIndexContainer-bc7ae447.js.map +0 -1
- package/es/useScale-83881775.js +0 -19
- package/es/useScale-83881775.js.map +0 -1
- package/es/useSelectCommon-34645d9a.js +0 -686
- package/es/useSelectCommon-34645d9a.js.map +0 -1
- package/es/useSelectDrill-88337c1a.js +0 -104
- package/es/useSelectDrill-88337c1a.js.map +0 -1
- package/es/useSelection-01b28be6.js +0 -186
- package/es/useSelection-01b28be6.js.map +0 -1
- package/es/useSelection-649fd4f1.js +0 -239
- package/es/useSelection-649fd4f1.js.map +0 -1
- package/es/useTestId-9b504481.js +0 -21
- package/es/useTestId-9b504481.js.map +0 -1
- package/es/useTheme-93c07059.js +0 -19
- package/es/useTheme-93c07059.js.map +0 -1
- package/es/useThemeInterpolations-8dd8029f.js +0 -57
- package/es/useThemeInterpolations-8dd8029f.js.map +0 -1
- package/es/useTooltip-89ca3f3e.js +0 -424
- package/es/useTooltip-89ca3f3e.js.map +0 -1
- package/es/useTooltipOnTruncation-175bf8a6.js +0 -27
- package/es/useTooltipOnTruncation-175bf8a6.js.map +0 -1
- package/es/useTranslationBundle-09302c20.js +0 -29
- package/es/useTranslationBundle-09302c20.js.map +0 -1
- package/es/useUser-1cd223a9.js +0 -19
- package/es/useUser-1cd223a9.js.map +0 -1
- package/es/useVisDragModeControls-40fc83b5.js +0 -87
- package/es/useVisDragModeControls-40fc83b5.js.map +0 -1
- package/es/useVisEvents-8877743b.js +0 -153
- package/es/useVisEvents-8877743b.js.map +0 -1
- package/es/withDirectionIcon-19a1d777.js +0 -14
- package/es/withDirectionIcon-19a1d777.js.map +0 -1
package/es/Gantt-5a395647.js
DELETED
|
@@ -1,3817 +0,0 @@
|
|
|
1
|
-
/* @oracle/oraclejet-preact: undefined */
|
|
2
|
-
import { jsx, jsxs, Fragment } from 'preact/jsx-runtime';
|
|
3
|
-
import { useRef, useState, useMemo } from 'preact/hooks';
|
|
4
|
-
import { c as classNames } from './classNames-4e12b00d.js';
|
|
5
|
-
import { styles, bridgeValues } from './PRIVATE_TimeComponent/themes/TimeComponentStyles.css.js';
|
|
6
|
-
import { styles as styles$1, rowAxisLayoutStyles, rowAxisStyles, rowBackgroundStyles, timeAxisDataBodyStyles, horizontalGridlinesStyles, taskMobileAccStyles, taskLabelLayerStyles, bridgeValues as bridgeValues$1 } from './UNSAFE_Gantt/themes/GanttStyles.css.js';
|
|
7
|
-
import { s as sizeToCSS } from './size-18139a3a.js';
|
|
8
|
-
import { u as useTestId } from './useTestId-9b504481.js';
|
|
9
|
-
import { T as TrackResizeContainer } from './TrackResizeContainer-04a2c642.js';
|
|
10
|
-
import { T as Text } from './Text-f8d4ff78.js';
|
|
11
|
-
import { g as generateAriaLabel, s as supportsMobileScreenReader } from './accUtils-ce2d6588.js';
|
|
12
|
-
import { k as getTimePosition, p as parseDate, u as useDrag, l as useWheel, z as zoomTime, m as getGestureZoomFactor, n as getPositionTime, o as getISOString, q as getDefaultDateFormatter, j as TimeComponentCanvas2D, T as TimeComponentLayersStack, g as TimeComponentVerticalGridlines, a as TimeComponentPanZoomLayout, b as TimeComponentZoomControls, c as TimeComponentVerticalScrollbarContainer, d as TimeComponentVerticalScrollbar, e as TimeComponentHorizontalScrollbarContainer, f as TimeComponentHorizontalScrollbar, h as TimeComponentHorizontalTimeAxis, D as DEFAULT_ZOOM_OUT_FACTOR, r as DEFAULT_ZOOM_IN_FACTOR } from './TimeComponentCanvas2D-9fd1f811.js';
|
|
13
|
-
import { u as useUser } from './useUser-1cd223a9.js';
|
|
14
|
-
import { L as Layer } from './Layer-446bf21e.js';
|
|
15
|
-
import 'preact/compat';
|
|
16
|
-
import './LayerHost-e6402730.js';
|
|
17
|
-
import { F as Floating } from './Floating-f02677ba.js';
|
|
18
|
-
import { styles as styles$2 } from './hooks/PRIVATE_useDatatip/themes/useDatatip.css.js';
|
|
19
|
-
import { u as useId } from './useId-03dbfdf0.js';
|
|
20
|
-
import { D as DATATIP_OFFSET } from './datatipUtils-13ab34b7.js';
|
|
21
|
-
import { c as calculateOffset, g as getRandomId } from './layoutUtils-d7613d0c.js';
|
|
22
|
-
import { m as mergeProps } from './mergeProps-88ea8306.js';
|
|
23
|
-
import { u as usePinch } from './usePinch-301da5f6.js';
|
|
24
|
-
import { u as useSelection } from './useSelection-01b28be6.js';
|
|
25
|
-
import { V as VisTabularDatatip } from './VisTabularDatatip-59629377.js';
|
|
26
|
-
import { u as useTranslationBundle } from './useTranslationBundle-09302c20.js';
|
|
27
|
-
import { r as rectangleWithBorderRadius } from './pathUtils-1a478322.js';
|
|
28
|
-
import { u as useCssVars } from './useCssVars-d72a8439.js';
|
|
29
|
-
import { u as useTextDimensions } from './useTextDimensions-e08928cc.js';
|
|
30
|
-
import { typographyVars, baseVars } from './Common/themes/themeContract.css.js';
|
|
31
|
-
import { x as xUnits } from './utils-a4102e03.js';
|
|
32
|
-
import { c as cancelEvent } from './eventsUtils-e5fc62d5.js';
|
|
33
|
-
|
|
34
|
-
function GanttContainer({ innerRef, width, height, testId, children, ...otherProps }) {
|
|
35
|
-
const testIdProps = useTestId(testId);
|
|
36
|
-
return (jsx("div", { ref: innerRef, tabIndex: 0, ...testIdProps, ...otherProps, class: classNames([styles.baseStyle, styles$1.baseStyle]), style: { width: width && sizeToCSS(width), height: height && sizeToCSS(height) }, children: children }));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function GanttWithRowAxisLayout({ rowAxisTopGap = '0', rowAxisBottomGap = '0', resolvedRowAxisWidth, resolvedRowAxisMaxWidth, rowAxis, ganttView }) {
|
|
40
|
-
const isRelativeWidth = resolvedRowAxisWidth.suffix === '%';
|
|
41
|
-
const isRelativeMaxWidth = resolvedRowAxisMaxWidth.suffix === '%';
|
|
42
|
-
return isRelativeWidth || isRelativeMaxWidth ? (jsx(TrackResizeContainer, { width: "100%", height: "100%", children: (width, _) => (jsxs("div", { class: rowAxisLayoutStyles.base, style: { gridTemplateRows: `${rowAxisTopGap} minmax(0, 1fr) ${rowAxisBottomGap}` }, children: [jsx("div", { class: rowAxisLayoutStyles.rowAxis, children: rowAxis(isRelativeWidth
|
|
43
|
-
? width * (resolvedRowAxisWidth.value / 100)
|
|
44
|
-
: resolvedRowAxisWidth.value, isRelativeMaxWidth
|
|
45
|
-
? width * (resolvedRowAxisMaxWidth.value / 100)
|
|
46
|
-
: resolvedRowAxisMaxWidth.value) }), jsx("div", { class: rowAxisLayoutStyles.ganttView, children: ganttView })] })) })) : (jsxs("div", { class: rowAxisLayoutStyles.base, style: { gridTemplateRows: `${rowAxisTopGap} minmax(0, 1fr) ${rowAxisBottomGap}` }, children: [jsx("div", { class: rowAxisLayoutStyles.rowAxis, children: rowAxis(resolvedRowAxisWidth.value, resolvedRowAxisMaxWidth.value) }), jsx("div", { class: rowAxisLayoutStyles.ganttView, children: ganttView })] }));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Gets the default row axis label renderer.
|
|
51
|
-
* @param param0
|
|
52
|
-
* @returns The default renderer.
|
|
53
|
-
*/
|
|
54
|
-
const defaultRowAxisLabelRender = ({ maxWidth, maxHeight, data: { label = '', labelStyle } }) => {
|
|
55
|
-
return (jsx("div", { style: {
|
|
56
|
-
width: maxWidth > -1 ? maxWidth : undefined,
|
|
57
|
-
height: maxHeight,
|
|
58
|
-
display: 'flex',
|
|
59
|
-
alignItems: 'center',
|
|
60
|
-
...labelStyle
|
|
61
|
-
}, children: jsx(Text, { size: "md", variant: labelStyle?.color ? 'inherit' : 'primary', truncation: "ellipsis", children: label }) }));
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Gets the row label renderer context.
|
|
65
|
-
* @param layoutObj The row layout object.
|
|
66
|
-
* @param rowData The rows data.
|
|
67
|
-
* @param maxWidth The max width of the row axis.
|
|
68
|
-
* @returns The renderer context.
|
|
69
|
-
*/
|
|
70
|
-
const getRenderContext$1 = (layoutObj, rowData, maxWidth) => {
|
|
71
|
-
return {
|
|
72
|
-
maxWidth,
|
|
73
|
-
maxHeight: layoutObj.height,
|
|
74
|
-
data: rowData[layoutObj.index]
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
class FlatQueue {
|
|
79
|
-
|
|
80
|
-
constructor() {
|
|
81
|
-
this.ids = [];
|
|
82
|
-
this.values = [];
|
|
83
|
-
this.length = 0;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
clear() {
|
|
87
|
-
this.length = 0;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
push(id, value) {
|
|
91
|
-
let pos = this.length++;
|
|
92
|
-
|
|
93
|
-
while (pos > 0) {
|
|
94
|
-
const parent = (pos - 1) >> 1;
|
|
95
|
-
const parentValue = this.values[parent];
|
|
96
|
-
if (value >= parentValue) break;
|
|
97
|
-
this.ids[pos] = this.ids[parent];
|
|
98
|
-
this.values[pos] = parentValue;
|
|
99
|
-
pos = parent;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
this.ids[pos] = id;
|
|
103
|
-
this.values[pos] = value;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
pop() {
|
|
107
|
-
if (this.length === 0) return undefined;
|
|
108
|
-
|
|
109
|
-
const top = this.ids[0];
|
|
110
|
-
this.length--;
|
|
111
|
-
|
|
112
|
-
if (this.length > 0) {
|
|
113
|
-
const id = this.ids[0] = this.ids[this.length];
|
|
114
|
-
const value = this.values[0] = this.values[this.length];
|
|
115
|
-
const halfLength = this.length >> 1;
|
|
116
|
-
let pos = 0;
|
|
117
|
-
|
|
118
|
-
while (pos < halfLength) {
|
|
119
|
-
let left = (pos << 1) + 1;
|
|
120
|
-
const right = left + 1;
|
|
121
|
-
let bestIndex = this.ids[left];
|
|
122
|
-
let bestValue = this.values[left];
|
|
123
|
-
const rightValue = this.values[right];
|
|
124
|
-
|
|
125
|
-
if (right < this.length && rightValue < bestValue) {
|
|
126
|
-
left = right;
|
|
127
|
-
bestIndex = this.ids[right];
|
|
128
|
-
bestValue = rightValue;
|
|
129
|
-
}
|
|
130
|
-
if (bestValue >= value) break;
|
|
131
|
-
|
|
132
|
-
this.ids[pos] = bestIndex;
|
|
133
|
-
this.values[pos] = bestValue;
|
|
134
|
-
pos = left;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
this.ids[pos] = id;
|
|
138
|
-
this.values[pos] = value;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
return top;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
peek() {
|
|
145
|
-
if (this.length === 0) return undefined;
|
|
146
|
-
return this.ids[0];
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
peekValue() {
|
|
150
|
-
if (this.length === 0) return undefined;
|
|
151
|
-
return this.values[0];
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
shrink() {
|
|
155
|
-
this.ids.length = this.values.length = this.length;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
const ARRAY_TYPES = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array];
|
|
160
|
-
const VERSION = 3; // serialized format version
|
|
161
|
-
|
|
162
|
-
/** @typedef {Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor} TypedArrayConstructor */
|
|
163
|
-
|
|
164
|
-
class Flatbush {
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Recreate a Flatbush index from raw `ArrayBuffer` or `SharedArrayBuffer` data.
|
|
168
|
-
* @param {ArrayBuffer | SharedArrayBuffer} data
|
|
169
|
-
* @returns {Flatbush} index
|
|
170
|
-
*/
|
|
171
|
-
static from(data) {
|
|
172
|
-
// @ts-expect-error duck typing array buffers
|
|
173
|
-
if (!data || data.byteLength === undefined || data.buffer) {
|
|
174
|
-
throw new Error('Data must be an instance of ArrayBuffer or SharedArrayBuffer.');
|
|
175
|
-
}
|
|
176
|
-
const [magic, versionAndType] = new Uint8Array(data, 0, 2);
|
|
177
|
-
if (magic !== 0xfb) {
|
|
178
|
-
throw new Error('Data does not appear to be in a Flatbush format.');
|
|
179
|
-
}
|
|
180
|
-
const version = versionAndType >> 4;
|
|
181
|
-
if (version !== VERSION) {
|
|
182
|
-
throw new Error(`Got v${version} data when expected v${VERSION}.`);
|
|
183
|
-
}
|
|
184
|
-
const ArrayType = ARRAY_TYPES[versionAndType & 0x0f];
|
|
185
|
-
if (!ArrayType) {
|
|
186
|
-
throw new Error('Unrecognized array type.');
|
|
187
|
-
}
|
|
188
|
-
const [nodeSize] = new Uint16Array(data, 2, 1);
|
|
189
|
-
const [numItems] = new Uint32Array(data, 4, 1);
|
|
190
|
-
|
|
191
|
-
return new Flatbush(numItems, nodeSize, ArrayType, undefined, data);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Create a Flatbush index that will hold a given number of items.
|
|
196
|
-
* @param {number} numItems
|
|
197
|
-
* @param {number} [nodeSize=16] Size of the tree node (16 by default).
|
|
198
|
-
* @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).
|
|
199
|
-
* @param {ArrayBufferConstructor | SharedArrayBufferConstructor} [ArrayBufferType=ArrayBuffer] The array buffer type used to store data (`ArrayBuffer` by default).
|
|
200
|
-
* @param {ArrayBuffer | SharedArrayBuffer} [data] (Only used internally)
|
|
201
|
-
*/
|
|
202
|
-
constructor(numItems, nodeSize = 16, ArrayType = Float64Array, ArrayBufferType = ArrayBuffer, data) {
|
|
203
|
-
if (numItems === undefined) throw new Error('Missing required argument: numItems.');
|
|
204
|
-
if (isNaN(numItems) || numItems <= 0) throw new Error(`Unexpected numItems value: ${numItems}.`);
|
|
205
|
-
|
|
206
|
-
this.numItems = +numItems;
|
|
207
|
-
this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);
|
|
208
|
-
|
|
209
|
-
// calculate the total number of nodes in the R-tree to allocate space for
|
|
210
|
-
// and the index of each tree level (used in search later)
|
|
211
|
-
let n = numItems;
|
|
212
|
-
let numNodes = n;
|
|
213
|
-
this._levelBounds = [n * 4];
|
|
214
|
-
do {
|
|
215
|
-
n = Math.ceil(n / this.nodeSize);
|
|
216
|
-
numNodes += n;
|
|
217
|
-
this._levelBounds.push(numNodes * 4);
|
|
218
|
-
} while (n !== 1);
|
|
219
|
-
|
|
220
|
-
this.ArrayType = ArrayType;
|
|
221
|
-
this.IndexArrayType = numNodes < 16384 ? Uint16Array : Uint32Array;
|
|
222
|
-
|
|
223
|
-
const arrayTypeIndex = ARRAY_TYPES.indexOf(this.ArrayType);
|
|
224
|
-
const nodesByteSize = numNodes * 4 * this.ArrayType.BYTES_PER_ELEMENT;
|
|
225
|
-
|
|
226
|
-
if (arrayTypeIndex < 0) {
|
|
227
|
-
throw new Error(`Unexpected typed array class: ${ArrayType}.`);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// @ts-expect-error duck typing array buffers
|
|
231
|
-
if (data && data.byteLength !== undefined && !data.buffer) {
|
|
232
|
-
this.data = data;
|
|
233
|
-
this._boxes = new this.ArrayType(this.data, 8, numNodes * 4);
|
|
234
|
-
this._indices = new this.IndexArrayType(this.data, 8 + nodesByteSize, numNodes);
|
|
235
|
-
|
|
236
|
-
this._pos = numNodes * 4;
|
|
237
|
-
this.minX = this._boxes[this._pos - 4];
|
|
238
|
-
this.minY = this._boxes[this._pos - 3];
|
|
239
|
-
this.maxX = this._boxes[this._pos - 2];
|
|
240
|
-
this.maxY = this._boxes[this._pos - 1];
|
|
241
|
-
|
|
242
|
-
} else {
|
|
243
|
-
this.data = new ArrayBufferType(8 + nodesByteSize + numNodes * this.IndexArrayType.BYTES_PER_ELEMENT);
|
|
244
|
-
this._boxes = new this.ArrayType(this.data, 8, numNodes * 4);
|
|
245
|
-
this._indices = new this.IndexArrayType(this.data, 8 + nodesByteSize, numNodes);
|
|
246
|
-
this._pos = 0;
|
|
247
|
-
this.minX = Infinity;
|
|
248
|
-
this.minY = Infinity;
|
|
249
|
-
this.maxX = -Infinity;
|
|
250
|
-
this.maxY = -Infinity;
|
|
251
|
-
|
|
252
|
-
new Uint8Array(this.data, 0, 2).set([0xfb, (VERSION << 4) + arrayTypeIndex]);
|
|
253
|
-
new Uint16Array(this.data, 2, 1)[0] = nodeSize;
|
|
254
|
-
new Uint32Array(this.data, 4, 1)[0] = numItems;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// a priority queue for k-nearest-neighbors queries
|
|
258
|
-
/** @type FlatQueue<number> */
|
|
259
|
-
this._queue = new FlatQueue();
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Add a given rectangle to the index.
|
|
264
|
-
* @param {number} minX
|
|
265
|
-
* @param {number} minY
|
|
266
|
-
* @param {number} maxX
|
|
267
|
-
* @param {number} maxY
|
|
268
|
-
* @returns {number} A zero-based, incremental number that represents the newly added rectangle.
|
|
269
|
-
*/
|
|
270
|
-
add(minX, minY, maxX, maxY) {
|
|
271
|
-
const index = this._pos >> 2;
|
|
272
|
-
const boxes = this._boxes;
|
|
273
|
-
this._indices[index] = index;
|
|
274
|
-
boxes[this._pos++] = minX;
|
|
275
|
-
boxes[this._pos++] = minY;
|
|
276
|
-
boxes[this._pos++] = maxX;
|
|
277
|
-
boxes[this._pos++] = maxY;
|
|
278
|
-
|
|
279
|
-
if (minX < this.minX) this.minX = minX;
|
|
280
|
-
if (minY < this.minY) this.minY = minY;
|
|
281
|
-
if (maxX > this.maxX) this.maxX = maxX;
|
|
282
|
-
if (maxY > this.maxY) this.maxY = maxY;
|
|
283
|
-
|
|
284
|
-
return index;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
/** Perform indexing of the added rectangles. */
|
|
288
|
-
finish() {
|
|
289
|
-
if (this._pos >> 2 !== this.numItems) {
|
|
290
|
-
throw new Error(`Added ${this._pos >> 2} items when expected ${this.numItems}.`);
|
|
291
|
-
}
|
|
292
|
-
const boxes = this._boxes;
|
|
293
|
-
|
|
294
|
-
if (this.numItems <= this.nodeSize) {
|
|
295
|
-
// only one node, skip sorting and just fill the root box
|
|
296
|
-
boxes[this._pos++] = this.minX;
|
|
297
|
-
boxes[this._pos++] = this.minY;
|
|
298
|
-
boxes[this._pos++] = this.maxX;
|
|
299
|
-
boxes[this._pos++] = this.maxY;
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
const width = (this.maxX - this.minX) || 1;
|
|
304
|
-
const height = (this.maxY - this.minY) || 1;
|
|
305
|
-
const hilbertValues = new Uint32Array(this.numItems);
|
|
306
|
-
const hilbertMax = (1 << 16) - 1;
|
|
307
|
-
|
|
308
|
-
// map item centers into Hilbert coordinate space and calculate Hilbert values
|
|
309
|
-
for (let i = 0, pos = 0; i < this.numItems; i++) {
|
|
310
|
-
const minX = boxes[pos++];
|
|
311
|
-
const minY = boxes[pos++];
|
|
312
|
-
const maxX = boxes[pos++];
|
|
313
|
-
const maxY = boxes[pos++];
|
|
314
|
-
const x = Math.floor(hilbertMax * ((minX + maxX) / 2 - this.minX) / width);
|
|
315
|
-
const y = Math.floor(hilbertMax * ((minY + maxY) / 2 - this.minY) / height);
|
|
316
|
-
hilbertValues[i] = hilbert(x, y);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
// sort items by their Hilbert value (for packing later)
|
|
320
|
-
sort(hilbertValues, boxes, this._indices, 0, this.numItems - 1, this.nodeSize);
|
|
321
|
-
|
|
322
|
-
// generate nodes at each tree level, bottom-up
|
|
323
|
-
for (let i = 0, pos = 0; i < this._levelBounds.length - 1; i++) {
|
|
324
|
-
const end = this._levelBounds[i];
|
|
325
|
-
|
|
326
|
-
// generate a parent node for each block of consecutive <nodeSize> nodes
|
|
327
|
-
while (pos < end) {
|
|
328
|
-
const nodeIndex = pos;
|
|
329
|
-
|
|
330
|
-
// calculate bbox for the new node
|
|
331
|
-
let nodeMinX = boxes[pos++];
|
|
332
|
-
let nodeMinY = boxes[pos++];
|
|
333
|
-
let nodeMaxX = boxes[pos++];
|
|
334
|
-
let nodeMaxY = boxes[pos++];
|
|
335
|
-
for (let j = 1; j < this.nodeSize && pos < end; j++) {
|
|
336
|
-
nodeMinX = Math.min(nodeMinX, boxes[pos++]);
|
|
337
|
-
nodeMinY = Math.min(nodeMinY, boxes[pos++]);
|
|
338
|
-
nodeMaxX = Math.max(nodeMaxX, boxes[pos++]);
|
|
339
|
-
nodeMaxY = Math.max(nodeMaxY, boxes[pos++]);
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
// add the new node to the tree data
|
|
343
|
-
this._indices[this._pos >> 2] = nodeIndex;
|
|
344
|
-
boxes[this._pos++] = nodeMinX;
|
|
345
|
-
boxes[this._pos++] = nodeMinY;
|
|
346
|
-
boxes[this._pos++] = nodeMaxX;
|
|
347
|
-
boxes[this._pos++] = nodeMaxY;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* Search the index by a bounding box.
|
|
354
|
-
* @param {number} minX
|
|
355
|
-
* @param {number} minY
|
|
356
|
-
* @param {number} maxX
|
|
357
|
-
* @param {number} maxY
|
|
358
|
-
* @param {(index: number) => boolean} [filterFn] An optional function for filtering the results.
|
|
359
|
-
* @returns {number[]} An array of indices of items intersecting or touching the given bounding box.
|
|
360
|
-
*/
|
|
361
|
-
search(minX, minY, maxX, maxY, filterFn) {
|
|
362
|
-
if (this._pos !== this._boxes.length) {
|
|
363
|
-
throw new Error('Data not yet indexed - call index.finish().');
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/** @type number | undefined */
|
|
367
|
-
let nodeIndex = this._boxes.length - 4;
|
|
368
|
-
const queue = [];
|
|
369
|
-
const results = [];
|
|
370
|
-
|
|
371
|
-
while (nodeIndex !== undefined) {
|
|
372
|
-
// find the end index of the node
|
|
373
|
-
const end = Math.min(nodeIndex + this.nodeSize * 4, upperBound(nodeIndex, this._levelBounds));
|
|
374
|
-
|
|
375
|
-
// search through child nodes
|
|
376
|
-
for (let /** @type number */ pos = nodeIndex; pos < end; pos += 4) {
|
|
377
|
-
// check if node bbox intersects with query bbox
|
|
378
|
-
if (maxX < this._boxes[pos]) continue; // maxX < nodeMinX
|
|
379
|
-
if (maxY < this._boxes[pos + 1]) continue; // maxY < nodeMinY
|
|
380
|
-
if (minX > this._boxes[pos + 2]) continue; // minX > nodeMaxX
|
|
381
|
-
if (minY > this._boxes[pos + 3]) continue; // minY > nodeMaxY
|
|
382
|
-
|
|
383
|
-
const index = this._indices[pos >> 2] | 0;
|
|
384
|
-
|
|
385
|
-
if (nodeIndex >= this.numItems * 4) {
|
|
386
|
-
queue.push(index); // node; add it to the search queue
|
|
387
|
-
|
|
388
|
-
} else if (filterFn === undefined || filterFn(index)) {
|
|
389
|
-
results.push(index); // leaf item
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
nodeIndex = queue.pop();
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
return results;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* Search items in order of distance from the given point.
|
|
401
|
-
* @param {number} x
|
|
402
|
-
* @param {number} y
|
|
403
|
-
* @param {number} [maxResults=Infinity]
|
|
404
|
-
* @param {number} [maxDistance=Infinity]
|
|
405
|
-
* @param {(index: number) => boolean} [filterFn] An optional function for filtering the results.
|
|
406
|
-
* @returns {number[]} An array of indices of items found.
|
|
407
|
-
*/
|
|
408
|
-
neighbors(x, y, maxResults = Infinity, maxDistance = Infinity, filterFn) {
|
|
409
|
-
if (this._pos !== this._boxes.length) {
|
|
410
|
-
throw new Error('Data not yet indexed - call index.finish().');
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
/** @type number | undefined */
|
|
414
|
-
let nodeIndex = this._boxes.length - 4;
|
|
415
|
-
const q = this._queue;
|
|
416
|
-
const results = [];
|
|
417
|
-
const maxDistSquared = maxDistance * maxDistance;
|
|
418
|
-
|
|
419
|
-
outer: while (nodeIndex !== undefined) {
|
|
420
|
-
// find the end index of the node
|
|
421
|
-
const end = Math.min(nodeIndex + this.nodeSize * 4, upperBound(nodeIndex, this._levelBounds));
|
|
422
|
-
|
|
423
|
-
// add child nodes to the queue
|
|
424
|
-
for (let pos = nodeIndex; pos < end; pos += 4) {
|
|
425
|
-
const index = this._indices[pos >> 2] | 0;
|
|
426
|
-
|
|
427
|
-
const dx = axisDist(x, this._boxes[pos], this._boxes[pos + 2]);
|
|
428
|
-
const dy = axisDist(y, this._boxes[pos + 1], this._boxes[pos + 3]);
|
|
429
|
-
const dist = dx * dx + dy * dy;
|
|
430
|
-
if (dist > maxDistSquared) continue;
|
|
431
|
-
|
|
432
|
-
if (nodeIndex >= this.numItems * 4) {
|
|
433
|
-
q.push(index << 1, dist); // node (use even id)
|
|
434
|
-
|
|
435
|
-
} else if (filterFn === undefined || filterFn(index)) {
|
|
436
|
-
q.push((index << 1) + 1, dist); // leaf item (use odd id)
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
// pop items from the queue
|
|
441
|
-
// @ts-expect-error q.length check eliminates undefined values
|
|
442
|
-
while (q.length && (q.peek() & 1)) {
|
|
443
|
-
const dist = q.peekValue();
|
|
444
|
-
// @ts-expect-error
|
|
445
|
-
if (dist > maxDistSquared) break outer;
|
|
446
|
-
// @ts-expect-error
|
|
447
|
-
results.push(q.pop() >> 1);
|
|
448
|
-
if (results.length === maxResults) break outer;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
// @ts-expect-error
|
|
452
|
-
nodeIndex = q.length ? q.pop() >> 1 : undefined;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
q.clear();
|
|
456
|
-
return results;
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* 1D distance from a value to a range.
|
|
462
|
-
* @param {number} k
|
|
463
|
-
* @param {number} min
|
|
464
|
-
* @param {number} max
|
|
465
|
-
*/
|
|
466
|
-
function axisDist(k, min, max) {
|
|
467
|
-
return k < min ? min - k : k <= max ? 0 : k - max;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* Binary search for the first value in the array bigger than the given.
|
|
472
|
-
* @param {number} value
|
|
473
|
-
* @param {number[]} arr
|
|
474
|
-
*/
|
|
475
|
-
function upperBound(value, arr) {
|
|
476
|
-
let i = 0;
|
|
477
|
-
let j = arr.length - 1;
|
|
478
|
-
while (i < j) {
|
|
479
|
-
const m = (i + j) >> 1;
|
|
480
|
-
if (arr[m] > value) {
|
|
481
|
-
j = m;
|
|
482
|
-
} else {
|
|
483
|
-
i = m + 1;
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
return arr[i];
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
* Custom quicksort that partially sorts bbox data alongside the hilbert values.
|
|
491
|
-
* @param {Uint32Array} values
|
|
492
|
-
* @param {InstanceType<TypedArrayConstructor>} boxes
|
|
493
|
-
* @param {Uint16Array | Uint32Array} indices
|
|
494
|
-
* @param {number} left
|
|
495
|
-
* @param {number} right
|
|
496
|
-
* @param {number} nodeSize
|
|
497
|
-
*/
|
|
498
|
-
function sort(values, boxes, indices, left, right, nodeSize) {
|
|
499
|
-
if (Math.floor(left / nodeSize) >= Math.floor(right / nodeSize)) return;
|
|
500
|
-
|
|
501
|
-
const pivot = values[(left + right) >> 1];
|
|
502
|
-
let i = left - 1;
|
|
503
|
-
let j = right + 1;
|
|
504
|
-
|
|
505
|
-
while (true) {
|
|
506
|
-
do i++; while (values[i] < pivot);
|
|
507
|
-
do j--; while (values[j] > pivot);
|
|
508
|
-
if (i >= j) break;
|
|
509
|
-
swap(values, boxes, indices, i, j);
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
sort(values, boxes, indices, left, j, nodeSize);
|
|
513
|
-
sort(values, boxes, indices, j + 1, right, nodeSize);
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
* Swap two values and two corresponding boxes.
|
|
518
|
-
* @param {Uint32Array} values
|
|
519
|
-
* @param {InstanceType<TypedArrayConstructor>} boxes
|
|
520
|
-
* @param {Uint16Array | Uint32Array} indices
|
|
521
|
-
* @param {number} i
|
|
522
|
-
* @param {number} j
|
|
523
|
-
*/
|
|
524
|
-
function swap(values, boxes, indices, i, j) {
|
|
525
|
-
const temp = values[i];
|
|
526
|
-
values[i] = values[j];
|
|
527
|
-
values[j] = temp;
|
|
528
|
-
|
|
529
|
-
const k = 4 * i;
|
|
530
|
-
const m = 4 * j;
|
|
531
|
-
|
|
532
|
-
const a = boxes[k];
|
|
533
|
-
const b = boxes[k + 1];
|
|
534
|
-
const c = boxes[k + 2];
|
|
535
|
-
const d = boxes[k + 3];
|
|
536
|
-
boxes[k] = boxes[m];
|
|
537
|
-
boxes[k + 1] = boxes[m + 1];
|
|
538
|
-
boxes[k + 2] = boxes[m + 2];
|
|
539
|
-
boxes[k + 3] = boxes[m + 3];
|
|
540
|
-
boxes[m] = a;
|
|
541
|
-
boxes[m + 1] = b;
|
|
542
|
-
boxes[m + 2] = c;
|
|
543
|
-
boxes[m + 3] = d;
|
|
544
|
-
|
|
545
|
-
const e = indices[i];
|
|
546
|
-
indices[i] = indices[j];
|
|
547
|
-
indices[j] = e;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
/**
|
|
551
|
-
* Fast Hilbert curve algorithm by http://threadlocalmutex.com/
|
|
552
|
-
* Ported from C++ https://github.com/rawrunprotected/hilbert_curves (public domain)
|
|
553
|
-
* @param {number} x
|
|
554
|
-
* @param {number} y
|
|
555
|
-
*/
|
|
556
|
-
function hilbert(x, y) {
|
|
557
|
-
let a = x ^ y;
|
|
558
|
-
let b = 0xFFFF ^ a;
|
|
559
|
-
let c = 0xFFFF ^ (x | y);
|
|
560
|
-
let d = x & (y ^ 0xFFFF);
|
|
561
|
-
|
|
562
|
-
let A = a | (b >> 1);
|
|
563
|
-
let B = (a >> 1) ^ a;
|
|
564
|
-
let C = ((c >> 1) ^ (b & (d >> 1))) ^ c;
|
|
565
|
-
let D = ((a & (c >> 1)) ^ (d >> 1)) ^ d;
|
|
566
|
-
|
|
567
|
-
a = A; b = B; c = C; d = D;
|
|
568
|
-
A = ((a & (a >> 2)) ^ (b & (b >> 2)));
|
|
569
|
-
B = ((a & (b >> 2)) ^ (b & ((a ^ b) >> 2)));
|
|
570
|
-
C ^= ((a & (c >> 2)) ^ (b & (d >> 2)));
|
|
571
|
-
D ^= ((b & (c >> 2)) ^ ((a ^ b) & (d >> 2)));
|
|
572
|
-
|
|
573
|
-
a = A; b = B; c = C; d = D;
|
|
574
|
-
A = ((a & (a >> 4)) ^ (b & (b >> 4)));
|
|
575
|
-
B = ((a & (b >> 4)) ^ (b & ((a ^ b) >> 4)));
|
|
576
|
-
C ^= ((a & (c >> 4)) ^ (b & (d >> 4)));
|
|
577
|
-
D ^= ((b & (c >> 4)) ^ ((a ^ b) & (d >> 4)));
|
|
578
|
-
|
|
579
|
-
a = A; b = B; c = C; d = D;
|
|
580
|
-
C ^= ((a & (c >> 8)) ^ (b & (d >> 8)));
|
|
581
|
-
D ^= ((b & (c >> 8)) ^ ((a ^ b) & (d >> 8)));
|
|
582
|
-
|
|
583
|
-
a = C ^ (C >> 1);
|
|
584
|
-
b = D ^ (D >> 1);
|
|
585
|
-
|
|
586
|
-
let i0 = x ^ y;
|
|
587
|
-
let i1 = b | (0xFFFF ^ (i0 | a));
|
|
588
|
-
|
|
589
|
-
i0 = (i0 | (i0 << 8)) & 0x00FF00FF;
|
|
590
|
-
i0 = (i0 | (i0 << 4)) & 0x0F0F0F0F;
|
|
591
|
-
i0 = (i0 | (i0 << 2)) & 0x33333333;
|
|
592
|
-
i0 = (i0 | (i0 << 1)) & 0x55555555;
|
|
593
|
-
|
|
594
|
-
i1 = (i1 | (i1 << 8)) & 0x00FF00FF;
|
|
595
|
-
i1 = (i1 | (i1 << 4)) & 0x0F0F0F0F;
|
|
596
|
-
i1 = (i1 | (i1 << 2)) & 0x33333333;
|
|
597
|
-
i1 = (i1 | (i1 << 1)) & 0x55555555;
|
|
598
|
-
|
|
599
|
-
return ((i1 << 1) | i0) >>> 0;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* @license
|
|
604
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
605
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
606
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
607
|
-
* @ignore
|
|
608
|
-
*/
|
|
609
|
-
/**
|
|
610
|
-
* Gets the task spatial index.
|
|
611
|
-
* @param rowObjs The row layout objects (for the entier dataset).
|
|
612
|
-
* @returns The task spatial index.
|
|
613
|
-
*/
|
|
614
|
-
const getTasksSpatialIndex = (rowObjs) => {
|
|
615
|
-
const numTasks = rowObjs.map((r) => r.taskObjs.length).reduce((a, b) => a + b, 0);
|
|
616
|
-
const index = new Flatbush(numTasks);
|
|
617
|
-
rowObjs.forEach((r) => r.taskObjs.forEach(({ overallStartTime, overallEndTime, y, height }) => {
|
|
618
|
-
index.add(overallStartTime, y, overallEndTime, y + height);
|
|
619
|
-
}));
|
|
620
|
-
index.finish();
|
|
621
|
-
return index;
|
|
622
|
-
};
|
|
623
|
-
/**
|
|
624
|
-
* Gets all spatial indices of the component.
|
|
625
|
-
* @param rowObjs The row layout objects (for the entier dataset).
|
|
626
|
-
* @returns The spatial indices.
|
|
627
|
-
*/
|
|
628
|
-
const getSpatialIndex = (rowObjs) => {
|
|
629
|
-
// TODO: add more spatial indices for non task bar stuff
|
|
630
|
-
return {
|
|
631
|
-
tasks: getTasksSpatialIndex(rowObjs)
|
|
632
|
-
};
|
|
633
|
-
};
|
|
634
|
-
/**
|
|
635
|
-
* Returns the target task that overlaps with the given point.
|
|
636
|
-
* @param rowObjs The row layout objects (for the entier dataset).
|
|
637
|
-
* @param index The spatial index to query.
|
|
638
|
-
* @param param2 The point.
|
|
639
|
-
* @returns The target task.
|
|
640
|
-
*/
|
|
641
|
-
const queryTasksSpatialIndex = (rowObjs, index, { time, y }) => {
|
|
642
|
-
const found = index.search(time, y, time, y);
|
|
643
|
-
if (found.length === 0)
|
|
644
|
-
return;
|
|
645
|
-
// TODO: Handle task overlaps. Not a problem yet for V1.
|
|
646
|
-
// Instead of depending on order gaurantees from Flatbush (there might not be any), we should
|
|
647
|
-
// just check chronological task order and overlap behavior (when we support that API)
|
|
648
|
-
// to figure out the topmost task in the search result.
|
|
649
|
-
let flatIndex = found[0];
|
|
650
|
-
// TODO: improve this with binary search
|
|
651
|
-
for (let i = 0; i < rowObjs.length; i++) {
|
|
652
|
-
const rowObj = rowObjs[i];
|
|
653
|
-
for (let j = 0; j < rowObj.taskObjs.length; j++) {
|
|
654
|
-
if (flatIndex === 0)
|
|
655
|
-
return { rowIndex: i, taskIndex: j };
|
|
656
|
-
flatIndex -= 1;
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
return;
|
|
660
|
-
};
|
|
661
|
-
|
|
662
|
-
/**
|
|
663
|
-
* Determines whether given two intervals overlap
|
|
664
|
-
* @param s1 interval 1 start
|
|
665
|
-
* @param e1 interval 1 end
|
|
666
|
-
* @param s2 interval 2 start
|
|
667
|
-
* @param e2 interval 2 end
|
|
668
|
-
* @param isClosedComparison True if closed interval comparison, else open
|
|
669
|
-
* @returns Whether the two intervals overlap
|
|
670
|
-
*/
|
|
671
|
-
const isIntervalOverlap = (s1, e1, s2, e2, isClosedComparison = true) => (isClosedComparison ? s1 <= e2 && s2 <= e1 : s1 < e2 && s2 < e1);
|
|
672
|
-
/**
|
|
673
|
-
* Determines whether given two tasks overlap chronologically
|
|
674
|
-
* @param taskObj1 task layout object
|
|
675
|
-
* @param taskObj2 task layout object
|
|
676
|
-
* @returns Whether the two tasks overlap chronologically
|
|
677
|
-
*/
|
|
678
|
-
const isOverlap = (taskObj1, taskObj2) => {
|
|
679
|
-
// Open interval comparison: if interval 1 ends at the same time interval 2 starts, they are still NOT overlapping.
|
|
680
|
-
return isIntervalOverlap(taskObj1.overallStartTime, taskObj1.overallEndTime, taskObj2.overallStartTime, taskObj2.overallEndTime, false);
|
|
681
|
-
};
|
|
682
|
-
/**
|
|
683
|
-
* Binary search for the index of the leftmost element that equals the target.
|
|
684
|
-
* If the target is not in the array, then the returned value is:
|
|
685
|
-
* - the index of rightmost element less than the target if approximateMode is 'predecessor'
|
|
686
|
-
* - the index of the leftmost element greater than the target if approximateMode is 'successor'
|
|
687
|
-
* Search is O(lgN), N being the length of the array.
|
|
688
|
-
* @param array The array
|
|
689
|
-
* @param target The target
|
|
690
|
-
* @param approximateMode The behavior if target is not in the array. 'predecessor' or 'successor'
|
|
691
|
-
* @returns The leftmost index at which the target is found, or the index of the predecessor/successor element as per approximateMode param
|
|
692
|
-
*/
|
|
693
|
-
const binarySearchLeftMost = (array, target, approximateMode) => {
|
|
694
|
-
if (array.length === 0)
|
|
695
|
-
return 0;
|
|
696
|
-
let L = 0;
|
|
697
|
-
let R = array.length;
|
|
698
|
-
while (L < R) {
|
|
699
|
-
const m = Math.floor((L + R) / 2);
|
|
700
|
-
const value = array[m];
|
|
701
|
-
if (value < target)
|
|
702
|
-
L = m + 1;
|
|
703
|
-
else
|
|
704
|
-
R = m;
|
|
705
|
-
}
|
|
706
|
-
// If target is not in the array, then L at this point is the rank of the target in the array,
|
|
707
|
-
// i.e. the number of elements in the array that are less than the target.
|
|
708
|
-
if (L < array.length) {
|
|
709
|
-
const value = array[L];
|
|
710
|
-
if (value === target || approximateMode === 'successor')
|
|
711
|
-
return L;
|
|
712
|
-
}
|
|
713
|
-
// L - 1 would give the index of the rightmost element less than the target (predecessor)
|
|
714
|
-
return L > 0 ? L - 1 : 0;
|
|
715
|
-
};
|
|
716
|
-
/**
|
|
717
|
-
* Finds the minimum and maximum row indices relevant to the given viewport bounds
|
|
718
|
-
* @param rowYs The row y coords
|
|
719
|
-
* @param yMin The minimum y bound
|
|
720
|
-
* @param yMax The maximum y bound
|
|
721
|
-
* @returns The minimum and maximum row indices
|
|
722
|
-
*/
|
|
723
|
-
const findRowIndRange = (rowYs, yMin, yMax) => {
|
|
724
|
-
// O(lgN) binary search for first row (intersecting yMin)
|
|
725
|
-
const minRowInd = binarySearchLeftMost(rowYs, yMin, 'predecessor');
|
|
726
|
-
let maxRowInd = minRowInd;
|
|
727
|
-
// linear search from that row to search for last row (intersecting yMax)
|
|
728
|
-
for (let i = minRowInd; i < rowYs.length; i++) {
|
|
729
|
-
if (rowYs[i] <= yMax) {
|
|
730
|
-
maxRowInd = i;
|
|
731
|
-
}
|
|
732
|
-
else {
|
|
733
|
-
break;
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
return { minRowInd, maxRowInd };
|
|
737
|
-
};
|
|
738
|
-
/**
|
|
739
|
-
* Gets the height of an empty row.
|
|
740
|
-
* @param resolvedVars The resolved CSS vars.
|
|
741
|
-
* @returns The height of an empty row.
|
|
742
|
-
*/
|
|
743
|
-
const getEmptyRowHeight = (resolvedVars) => resolvedVars.rowPaddingTop + resolvedVars.taskHeight + resolvedVars.rowPaddingBottom;
|
|
744
|
-
/**
|
|
745
|
-
* Computes the vertical layout of the given row and its tasks.
|
|
746
|
-
* This method modifies the given task layout objects with resolved layout information.
|
|
747
|
-
* @param param0
|
|
748
|
-
* @returns The resolved height of the row.
|
|
749
|
-
*/
|
|
750
|
-
const calcRowTaskVerticalLayout = ({ rowHeight, rowY, taskObjs, resolvedVars }) => {
|
|
751
|
-
if (taskObjs.length === 0)
|
|
752
|
-
return getEmptyRowHeight(resolvedVars);
|
|
753
|
-
taskObjs[0].rowLevel = 0;
|
|
754
|
-
taskObjs[0].y = 0;
|
|
755
|
-
const overlapChains = [[taskObjs[0]]];
|
|
756
|
-
const rowLevelRecentTaskObjs = [taskObjs[0]];
|
|
757
|
-
for (let i = 1; i < taskObjs.length; i++) {
|
|
758
|
-
const taskObj = taskObjs[i];
|
|
759
|
-
// Handle properly in the future when we support these APIs
|
|
760
|
-
const overlapBehavior = 'stack';
|
|
761
|
-
const previousTaskObj = taskObjs[i - 1];
|
|
762
|
-
const thisOverlapsPrevious = isOverlap(taskObj, previousTaskObj);
|
|
763
|
-
if (thisOverlapsPrevious) {
|
|
764
|
-
overlapChains[overlapChains.length - 1].push(taskObj);
|
|
765
|
-
}
|
|
766
|
-
else {
|
|
767
|
-
overlapChains.push([taskObj]);
|
|
768
|
-
}
|
|
769
|
-
let rowLevel = 0;
|
|
770
|
-
let previousAdjacentTaskObj;
|
|
771
|
-
switch (overlapBehavior) {
|
|
772
|
-
case 'stack': {
|
|
773
|
-
let promote = true;
|
|
774
|
-
for (let j = 0; j < rowLevelRecentTaskObjs.length; j++) {
|
|
775
|
-
previousAdjacentTaskObj = undefined;
|
|
776
|
-
if (isOverlap(taskObj, rowLevelRecentTaskObjs[j])) {
|
|
777
|
-
rowLevel += 1;
|
|
778
|
-
}
|
|
779
|
-
else {
|
|
780
|
-
previousAdjacentTaskObj = rowLevelRecentTaskObjs[j];
|
|
781
|
-
rowLevelRecentTaskObjs[j] = taskObj;
|
|
782
|
-
promote = false;
|
|
783
|
-
break;
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
if (promote) {
|
|
787
|
-
rowLevelRecentTaskObjs.push(taskObj);
|
|
788
|
-
}
|
|
789
|
-
taskObj.y = 0;
|
|
790
|
-
if (previousAdjacentTaskObj) {
|
|
791
|
-
taskObj.previousAdjacentTaskObj = previousAdjacentTaskObj;
|
|
792
|
-
previousAdjacentTaskObj.nextAdjacentTaskObj = taskObj;
|
|
793
|
-
}
|
|
794
|
-
break;
|
|
795
|
-
}
|
|
796
|
-
// More cases in the future when we support the overlap behavior APIs
|
|
797
|
-
default: {
|
|
798
|
-
const _exhaustiveCheck = overlapBehavior;
|
|
799
|
-
return _exhaustiveCheck;
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
taskObj.rowLevel = rowLevel;
|
|
803
|
-
}
|
|
804
|
-
// Add padding to task y when row height is not fixed
|
|
805
|
-
const rowPaddingTop = resolvedVars.rowPaddingTop;
|
|
806
|
-
const rowPaddingBottom = resolvedVars.rowPaddingBottom;
|
|
807
|
-
const rowLevelHeights = rowLevelRecentTaskObjs.map(() => 0);
|
|
808
|
-
if (rowHeight === undefined) {
|
|
809
|
-
// Figure out offset based on row level height
|
|
810
|
-
{
|
|
811
|
-
taskObjs.forEach((taskObj) => {
|
|
812
|
-
if (taskObj.height > rowLevelHeights[taskObj.rowLevel]) {
|
|
813
|
-
rowLevelHeights[taskObj.rowLevel] = taskObj.height;
|
|
814
|
-
}
|
|
815
|
-
});
|
|
816
|
-
const rowLevelCumHeightsWithPadding = rowLevelHeights
|
|
817
|
-
.map((rowLevelHeight) => rowLevelHeight + rowPaddingTop + rowPaddingBottom)
|
|
818
|
-
.reduce((acc, curr, i) => {
|
|
819
|
-
acc.push((acc[i - 1] || 0) + curr);
|
|
820
|
-
return acc;
|
|
821
|
-
}, []);
|
|
822
|
-
taskObjs.forEach((taskObj) => {
|
|
823
|
-
taskObj.y += (rowLevelCumHeightsWithPadding[taskObj.rowLevel - 1] || 0) + rowPaddingTop;
|
|
824
|
-
});
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
const overlapChainHeights = overlapChains.map((chain) => {
|
|
828
|
-
let chainHeight = 0;
|
|
829
|
-
chain.forEach((chainTaskObj) => {
|
|
830
|
-
const distanceFromBottomToRowTop = chainTaskObj.y + chainTaskObj.height;
|
|
831
|
-
if (distanceFromBottomToRowTop > chainHeight) {
|
|
832
|
-
chainHeight = distanceFromBottomToRowTop;
|
|
833
|
-
}
|
|
834
|
-
});
|
|
835
|
-
return chainHeight;
|
|
836
|
-
});
|
|
837
|
-
let resolvedRowHeight;
|
|
838
|
-
if (rowHeight === undefined) {
|
|
839
|
-
// Grow the row height to accommodate everything
|
|
840
|
-
resolvedRowHeight =
|
|
841
|
-
overlapChainHeights.reduce((a, b) => {
|
|
842
|
-
return Math.max(a, b);
|
|
843
|
-
}) + rowPaddingTop;
|
|
844
|
-
// If no overlapping offset specified: Mid align task within its row level
|
|
845
|
-
{
|
|
846
|
-
overlapChains.forEach((chain) => {
|
|
847
|
-
chain.forEach((taskObj) => {
|
|
848
|
-
const rowLevelHeight = rowLevelHeights[taskObj.rowLevel];
|
|
849
|
-
taskObj.y += (rowLevelHeight - taskObj.height) / 2 + rowY;
|
|
850
|
-
});
|
|
851
|
-
});
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
else {
|
|
855
|
-
// Fix the row height and mid align everything
|
|
856
|
-
resolvedRowHeight = rowHeight;
|
|
857
|
-
overlapChains.forEach((chain, i) => {
|
|
858
|
-
const chainHeight = overlapChainHeights[i];
|
|
859
|
-
let minTaskY = Number.MAX_VALUE;
|
|
860
|
-
chain.forEach((taskObj) => {
|
|
861
|
-
taskObj.y += Math.floor((resolvedRowHeight - taskObj.height) / 2);
|
|
862
|
-
if (taskObj.y < minTaskY) {
|
|
863
|
-
minTaskY = taskObj.y;
|
|
864
|
-
}
|
|
865
|
-
});
|
|
866
|
-
const offsetFromRowCenter = Math.floor((resolvedRowHeight - chainHeight) / 2) - minTaskY;
|
|
867
|
-
chain.forEach((taskObj) => {
|
|
868
|
-
taskObj.y += rowY + offsetFromRowCenter;
|
|
869
|
-
});
|
|
870
|
-
});
|
|
871
|
-
}
|
|
872
|
-
return resolvedRowHeight;
|
|
873
|
-
};
|
|
874
|
-
/**
|
|
875
|
-
* Computes the (unresolved) task labels layout.
|
|
876
|
-
* This method modifies the given task layout objects with resolved layout information.
|
|
877
|
-
* @param taskObjs The task layout object.
|
|
878
|
-
* @param rowData The rows data.
|
|
879
|
-
*/
|
|
880
|
-
const calcTaskLabelLayout = (taskObjs, rowData) => {
|
|
881
|
-
// TODO: Support other label positions when we get to exposing those APIs
|
|
882
|
-
// For now, just take care of label position "innerCenter"
|
|
883
|
-
taskObjs.forEach((taskObj) => {
|
|
884
|
-
const { index, rowIndex } = taskObj;
|
|
885
|
-
const labelText = rowData[rowIndex].tasks[index].label;
|
|
886
|
-
if (labelText) {
|
|
887
|
-
taskObj.labelObj = {
|
|
888
|
-
startTime: taskObj.startTime,
|
|
889
|
-
endTime: taskObj.endTime,
|
|
890
|
-
label: labelText,
|
|
891
|
-
isInner: true,
|
|
892
|
-
position: 'center' // Future: unless inner, 'start' if labelPosition is 'end', 'end if labelPosition is 'start'
|
|
893
|
-
// TODO: Handle contrast color
|
|
894
|
-
};
|
|
895
|
-
}
|
|
896
|
-
});
|
|
897
|
-
};
|
|
898
|
-
/**
|
|
899
|
-
* Computes the resolved task label layout given the unresolved label layout and the viewport.
|
|
900
|
-
* @param labelObj The unresolved label layout object.
|
|
901
|
-
* @param labelStyle The label style.
|
|
902
|
-
* @param y The y position of the task.
|
|
903
|
-
* @param height The height of the task.
|
|
904
|
-
* @param viewportStartTime The viewport start time.
|
|
905
|
-
* @param viewportEndTime The viewport end time.
|
|
906
|
-
* @param viewportWidth The viewport width.
|
|
907
|
-
* @param isRTL Whether the reading direction is rtl.
|
|
908
|
-
* @returns The resolved label layout object.
|
|
909
|
-
*/
|
|
910
|
-
const getResolvedTaskLabelLayout = (labelObj, labelStyle, y, height, viewportStartTime, viewportEndTime, viewportWidth, isRTL) => {
|
|
911
|
-
if (!labelObj)
|
|
912
|
-
return;
|
|
913
|
-
const startPos = getTimePosition(labelObj.startTime, viewportStartTime, viewportEndTime, viewportWidth, isRTL);
|
|
914
|
-
const endPos = getTimePosition(labelObj.endTime, viewportStartTime, viewportEndTime, viewportWidth, isRTL);
|
|
915
|
-
let textAlign;
|
|
916
|
-
switch (labelObj.position) {
|
|
917
|
-
case 'center':
|
|
918
|
-
textAlign = 'center';
|
|
919
|
-
break;
|
|
920
|
-
case 'start':
|
|
921
|
-
textAlign = isRTL ? 'right' : 'left';
|
|
922
|
-
break;
|
|
923
|
-
case 'end':
|
|
924
|
-
textAlign = isRTL ? 'left' : 'right';
|
|
925
|
-
break;
|
|
926
|
-
default: {
|
|
927
|
-
const _exhaustiveCheck = labelObj.position;
|
|
928
|
-
return _exhaustiveCheck;
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
return {
|
|
932
|
-
x: isRTL ? endPos : startPos,
|
|
933
|
-
y,
|
|
934
|
-
width: isRTL ? startPos - endPos : endPos - startPos,
|
|
935
|
-
height,
|
|
936
|
-
label: labelObj.label,
|
|
937
|
-
isInner: labelObj.isInner,
|
|
938
|
-
textAlign,
|
|
939
|
-
labelStyle
|
|
940
|
-
};
|
|
941
|
-
};
|
|
942
|
-
/**
|
|
943
|
-
* Gets normalized start and end date strings from props,
|
|
944
|
-
* e.g. one of them may be undefined in the props, but that really means both
|
|
945
|
-
* start and end are the same.
|
|
946
|
-
* @param task The task data containing the start and end date strings.
|
|
947
|
-
* @returns Normalized start and end date strings.
|
|
948
|
-
*/
|
|
949
|
-
const getNormalizedStartEnd = (task) => {
|
|
950
|
-
const start = task.start ? task.start : task.end;
|
|
951
|
-
const end = task.end ? task.end : task.start;
|
|
952
|
-
return { start, end };
|
|
953
|
-
};
|
|
954
|
-
/**
|
|
955
|
-
* Returns whether selection is supported given the selection mode.
|
|
956
|
-
* @param selectionMode The selection mode from props.
|
|
957
|
-
* @returns Whether selection is supported.
|
|
958
|
-
*/
|
|
959
|
-
const supportsSelection = (selectionMode) => {
|
|
960
|
-
return !!(selectionMode && selectionMode !== 'none');
|
|
961
|
-
};
|
|
962
|
-
/**
|
|
963
|
-
* Gets the (unresolved) rows data layout. Note that this is done for all rows in the data.
|
|
964
|
-
* @param rowData The rows data.
|
|
965
|
-
* @param resolvedVars The resolved CSS vars.
|
|
966
|
-
* @param gridlines The gridlines prop value.
|
|
967
|
-
* @param selectionProps The selection related props.
|
|
968
|
-
* @returns The (unresolved) rows data layout.
|
|
969
|
-
*/
|
|
970
|
-
const getRowDataLayout = (rowData, resolvedVars, gridlines, selectionProps) => {
|
|
971
|
-
const selectionEnabled = supportsSelection(selectionProps.selectionMode);
|
|
972
|
-
const selectedIds = new Set(selectionProps.selectedIds);
|
|
973
|
-
let rowY = 0;
|
|
974
|
-
const rowObjs = rowData.map((row, i) => {
|
|
975
|
-
const taskObjs = row.tasks.map((task, j) => {
|
|
976
|
-
const { start, end } = getNormalizedStartEnd(task);
|
|
977
|
-
const startTime = parseDate(start);
|
|
978
|
-
const endTime = parseDate(end);
|
|
979
|
-
return {
|
|
980
|
-
id: task.id,
|
|
981
|
-
renderIndex: 0, // calculated downstream
|
|
982
|
-
index: j,
|
|
983
|
-
rowIndex: i,
|
|
984
|
-
y: -1, // calculated downstream
|
|
985
|
-
startTime,
|
|
986
|
-
endTime,
|
|
987
|
-
overallStartTime: startTime,
|
|
988
|
-
overallEndTime: endTime,
|
|
989
|
-
rowLevel: 0, // calculated downstream
|
|
990
|
-
height: task.height !== undefined ? task.height : resolvedVars.taskHeight,
|
|
991
|
-
borderRadius: task.borderRadius !== undefined
|
|
992
|
-
? task.borderRadius.toString()
|
|
993
|
-
: resolvedVars.taskBorderRadius,
|
|
994
|
-
fill: task.color ? task.color : resolvedVars.taskBgColor,
|
|
995
|
-
stroke: resolvedVars.taskBorderColor,
|
|
996
|
-
strokeWidth: 1,
|
|
997
|
-
isSelectable: selectionEnabled,
|
|
998
|
-
isSelected: selectedIds.has(task.id),
|
|
999
|
-
selectionEffect: {
|
|
1000
|
-
stroke: resolvedVars.taskEffectBorderColor,
|
|
1001
|
-
strokeWidth: 2,
|
|
1002
|
-
padding: 2
|
|
1003
|
-
},
|
|
1004
|
-
hoverEffect: {
|
|
1005
|
-
stroke: resolvedVars.taskEffectBorderColor,
|
|
1006
|
-
strokeWidth: 1,
|
|
1007
|
-
padding: 0,
|
|
1008
|
-
shadow: {
|
|
1009
|
-
...resolvedVars.taskEffectBoxShadow
|
|
1010
|
-
}
|
|
1011
|
-
},
|
|
1012
|
-
focusEffect: {
|
|
1013
|
-
stroke: resolvedVars.taskEffectBorderColor,
|
|
1014
|
-
strokeWidth: 1,
|
|
1015
|
-
padding: 2
|
|
1016
|
-
}
|
|
1017
|
-
};
|
|
1018
|
-
});
|
|
1019
|
-
taskObjs.sort((a, b) => a.startTime - b.startTime);
|
|
1020
|
-
taskObjs.forEach((t, i) => (t.renderIndex = i));
|
|
1021
|
-
const resolvedRowHeight = calcRowTaskVerticalLayout({
|
|
1022
|
-
rowHeight: row.height,
|
|
1023
|
-
rowY,
|
|
1024
|
-
taskObjs,
|
|
1025
|
-
resolvedVars
|
|
1026
|
-
});
|
|
1027
|
-
calcTaskLabelLayout(taskObjs, rowData);
|
|
1028
|
-
const rowObj = {
|
|
1029
|
-
id: row.id,
|
|
1030
|
-
y: rowY,
|
|
1031
|
-
height: resolvedRowHeight,
|
|
1032
|
-
index: i,
|
|
1033
|
-
isSelected: taskObjs.some((t) => t.isSelected),
|
|
1034
|
-
taskObjs
|
|
1035
|
-
};
|
|
1036
|
-
const horizontalLineHeightOffset = gridlines.horizontal === 'on' ? 1 : 0;
|
|
1037
|
-
rowY += resolvedRowHeight + horizontalLineHeightOffset;
|
|
1038
|
-
return rowObj;
|
|
1039
|
-
});
|
|
1040
|
-
const lastRowLayoutObj = rowObjs[rowObjs.length - 1];
|
|
1041
|
-
const totalRowsHeight = lastRowLayoutObj ? lastRowLayoutObj.y + lastRowLayoutObj.height : 0;
|
|
1042
|
-
const idTaskObjMap = new Map();
|
|
1043
|
-
rowObjs.forEach((rowObj) => rowObj.taskObjs.forEach((taskObj) => idTaskObjMap.set(taskObj.id, taskObj)));
|
|
1044
|
-
const idRowObjMap = new Map();
|
|
1045
|
-
rowObjs.forEach((rowObj) => idRowObjMap.set(rowObj.id, rowObj));
|
|
1046
|
-
const spatialIndex = getSpatialIndex(rowObjs);
|
|
1047
|
-
return {
|
|
1048
|
-
rowData,
|
|
1049
|
-
rowObjs,
|
|
1050
|
-
rowPadding: resolvedVars.rowPaddingTop,
|
|
1051
|
-
totalRowsHeight,
|
|
1052
|
-
gridlines,
|
|
1053
|
-
spatialIndex,
|
|
1054
|
-
idRowObjMap,
|
|
1055
|
-
idTaskObjMap,
|
|
1056
|
-
getTaskDataById: (id) => {
|
|
1057
|
-
const data = idTaskObjMap.get(id);
|
|
1058
|
-
return data && rowData[data.rowIndex].tasks[data.index];
|
|
1059
|
-
}
|
|
1060
|
-
};
|
|
1061
|
-
};
|
|
1062
|
-
/**
|
|
1063
|
-
* Gets the corresponding task layout object given the id of the tasks, for each effect.
|
|
1064
|
-
* @param effectProps The task ids associated with each effect.
|
|
1065
|
-
* @param idTaskObjMap A Map between task ids and task layout objects.
|
|
1066
|
-
* @returns The task layout objects for each effect.
|
|
1067
|
-
*/
|
|
1068
|
-
const getEffectTaskObjs = (effectProps, idTaskObjMap) => {
|
|
1069
|
-
// TODO: Decide whether the task selection source of truth should be in
|
|
1070
|
-
// the rowObjs layout, or determined dynamically here, or both.
|
|
1071
|
-
// Right now it's in both places.
|
|
1072
|
-
// Let's decide after we figure out where eactly to memo for performance.
|
|
1073
|
-
//
|
|
1074
|
-
// Note we're rendering selectedIds regardless of selectionMode.
|
|
1075
|
-
const selectedIds = effectProps.selectionProps.selectedIds || [];
|
|
1076
|
-
const selectedTaskObjs = [];
|
|
1077
|
-
selectedIds.forEach((id) => {
|
|
1078
|
-
const selectedTaskObj = idTaskObjMap.get(id);
|
|
1079
|
-
if (selectedTaskObj)
|
|
1080
|
-
selectedTaskObjs.push(selectedTaskObj);
|
|
1081
|
-
});
|
|
1082
|
-
const hoveredId = supportsSelection(effectProps.selectionProps.selectionMode)
|
|
1083
|
-
? effectProps.hoverProps.hoveredTaskId
|
|
1084
|
-
: undefined;
|
|
1085
|
-
const hoveredTaskObj = hoveredId !== undefined ? idTaskObjMap.get(hoveredId) : undefined;
|
|
1086
|
-
const currentTask = effectProps.currentProps.currentTask;
|
|
1087
|
-
const isTaskFocused = currentTask?.isFocused === true;
|
|
1088
|
-
const currentTaskId = currentTask?.id;
|
|
1089
|
-
const focusedTaskObj = isTaskFocused && currentTaskId !== undefined ? idTaskObjMap.get(currentTaskId) : undefined;
|
|
1090
|
-
return {
|
|
1091
|
-
selectedTaskObjs,
|
|
1092
|
-
hoveredTaskObj,
|
|
1093
|
-
focusedTaskObj
|
|
1094
|
-
};
|
|
1095
|
-
};
|
|
1096
|
-
/**
|
|
1097
|
-
* Gets the resolved task layout object for the given viewport, given the unresolved task layout object.
|
|
1098
|
-
* @param taskObj The unresolved task layout object.
|
|
1099
|
-
* @param viewportStartTime The viewport start time.
|
|
1100
|
-
* @param viewportEndTime The viewport end time.
|
|
1101
|
-
* @param viewportWidth The viewport width.
|
|
1102
|
-
* @param scrollPosition The scroll position.
|
|
1103
|
-
* @param isRTL Whether the reading direction is rtl.
|
|
1104
|
-
* @returns The resolved task layout object.
|
|
1105
|
-
*/
|
|
1106
|
-
const getResolvedTaskObj = (taskObj, viewportStartTime, viewportEndTime, viewportWidth, scrollPosition, isRTL) => {
|
|
1107
|
-
const startPos = getTimePosition(taskObj.startTime, viewportStartTime, viewportEndTime, viewportWidth, isRTL);
|
|
1108
|
-
const endPos = getTimePosition(taskObj.endTime, viewportStartTime, viewportEndTime, viewportWidth, isRTL);
|
|
1109
|
-
return {
|
|
1110
|
-
...taskObj,
|
|
1111
|
-
x: isRTL ? endPos : startPos,
|
|
1112
|
-
y: taskObj.y - scrollPosition,
|
|
1113
|
-
width: isRTL ? startPos - endPos : endPos - startPos
|
|
1114
|
-
};
|
|
1115
|
-
};
|
|
1116
|
-
/**
|
|
1117
|
-
* Gets the resolved rows data layout for the given viewport.
|
|
1118
|
-
* @param rowDataLayout The unresolved rows data layout object for all data.
|
|
1119
|
-
* @param viewportStartTime The viewport start time.
|
|
1120
|
-
* @param viewportEndTime The viewport end time.
|
|
1121
|
-
* @param scrollPosition The scroll position.
|
|
1122
|
-
* @param viewportWidth The viewport width.
|
|
1123
|
-
* @param viewportHeight The viewport height.
|
|
1124
|
-
* @param isRTL Whether the reading direction is rtl.
|
|
1125
|
-
* @returns The resolved rows data layout for the given viewport.
|
|
1126
|
-
*/
|
|
1127
|
-
const getResolvedViewportLayout = (rowDataLayout, viewportStartTime, viewportEndTime, scrollPosition, viewportWidth, viewportHeight, isRTL) => {
|
|
1128
|
-
const viewportYMin = scrollPosition;
|
|
1129
|
-
const viewportYMax = scrollPosition + viewportHeight;
|
|
1130
|
-
const rowYs = rowDataLayout.rowObjs.map((r) => r.y);
|
|
1131
|
-
const { minRowInd, maxRowInd } = findRowIndRange(rowYs, viewportYMin, viewportYMax);
|
|
1132
|
-
const viewportRowsLayout = [];
|
|
1133
|
-
for (let i = minRowInd; i <= maxRowInd; i++) {
|
|
1134
|
-
const rowObj = rowDataLayout.rowObjs[i];
|
|
1135
|
-
const viewportTaskObjs = rowObj.taskObjs.filter(({ overallStartTime, overallEndTime }) => isIntervalOverlap(overallStartTime, overallEndTime, viewportStartTime, viewportEndTime));
|
|
1136
|
-
const resolvedViewportTaskObjs = viewportTaskObjs.map((taskObj) => getResolvedTaskObj(taskObj, viewportStartTime, viewportEndTime, viewportWidth, scrollPosition, isRTL));
|
|
1137
|
-
const resolvedViewportRowObjs = {
|
|
1138
|
-
...rowObj,
|
|
1139
|
-
y: rowObj.y - scrollPosition,
|
|
1140
|
-
taskObjs: resolvedViewportTaskObjs
|
|
1141
|
-
};
|
|
1142
|
-
viewportRowsLayout.push(resolvedViewportRowObjs);
|
|
1143
|
-
}
|
|
1144
|
-
const viewportTaskLabelsLayout = [];
|
|
1145
|
-
viewportRowsLayout.forEach((rowObj) => {
|
|
1146
|
-
rowObj.taskObjs.forEach(({ index, rowIndex, labelObj, y, height }) => {
|
|
1147
|
-
const labelStyle = rowDataLayout.rowData[rowIndex].tasks[index].labelStyle;
|
|
1148
|
-
const labelLayout = getResolvedTaskLabelLayout(labelObj, labelStyle, y, height, viewportStartTime, viewportEndTime, viewportWidth, isRTL);
|
|
1149
|
-
if (labelLayout)
|
|
1150
|
-
viewportTaskLabelsLayout.push(labelLayout);
|
|
1151
|
-
});
|
|
1152
|
-
});
|
|
1153
|
-
// due to pixel hinting, odd value stroke width needs it's position to be offset by 0.5 to ensure consistent behavior across browsers
|
|
1154
|
-
// i.e. pos = pos + (strokeWidth % 2) * 0.5
|
|
1155
|
-
// e.g. stroke-width of 1px means 0.5px above and below the reference coordinate. With pixel hinting, some browsers
|
|
1156
|
-
// renders 1px above the reference, some renders 1px below the reference. If we offset the reference by 0.5px, the stroke location
|
|
1157
|
-
// becomes unambiguous (it'll lock onto whole pixel grid) so all browsers will render this consistently.
|
|
1158
|
-
const horizontalGridlinesPos = rowDataLayout.gridlines.horizontal === 'on'
|
|
1159
|
-
? viewportRowsLayout.map(({ y, height }) => y + height + 0.5)
|
|
1160
|
-
: undefined;
|
|
1161
|
-
const idTaskObjMap = new Map();
|
|
1162
|
-
viewportRowsLayout.forEach((rowObj) => rowObj.taskObjs.forEach((taskObj) => idTaskObjMap.set(taskObj.id, taskObj)));
|
|
1163
|
-
return {
|
|
1164
|
-
spatialIndex: rowDataLayout.spatialIndex,
|
|
1165
|
-
gridlines: rowDataLayout.gridlines,
|
|
1166
|
-
horizontalGridlinesPos,
|
|
1167
|
-
rowData: rowDataLayout.rowData,
|
|
1168
|
-
allRowObjs: rowDataLayout.rowObjs,
|
|
1169
|
-
allIdTaskObjMap: rowDataLayout.idTaskObjMap,
|
|
1170
|
-
allIdRowObjMap: rowDataLayout.idRowObjMap,
|
|
1171
|
-
rowPadding: rowDataLayout.rowPadding,
|
|
1172
|
-
rowObjs: viewportRowsLayout,
|
|
1173
|
-
taskLabelObjs: viewportTaskLabelsLayout,
|
|
1174
|
-
idTaskObjMap,
|
|
1175
|
-
getTaskDataById: rowDataLayout.getTaskDataById
|
|
1176
|
-
};
|
|
1177
|
-
};
|
|
1178
|
-
|
|
1179
|
-
/**
|
|
1180
|
-
* @license
|
|
1181
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
1182
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
1183
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
1184
|
-
* @ignore
|
|
1185
|
-
*/
|
|
1186
|
-
/**
|
|
1187
|
-
* Gets the default aria label for the task.
|
|
1188
|
-
* @param taskObj The task layout object.
|
|
1189
|
-
* @param rowData The rows data.
|
|
1190
|
-
* @param dateFormatter The date formatter.
|
|
1191
|
-
* @param translations The translations bundle.
|
|
1192
|
-
* @returns The default aria label.
|
|
1193
|
-
*/
|
|
1194
|
-
const getDefaultTaskAccessibleLabel = (taskObj, rowData,
|
|
1195
|
-
// TODO: take valueFormats instead of dateFormatter when we support the API
|
|
1196
|
-
dateFormatter, translations) => {
|
|
1197
|
-
const row = rowData[taskObj.rowIndex];
|
|
1198
|
-
const task = row.tasks[taskObj.index];
|
|
1199
|
-
const { start, end } = getNormalizedStartEnd(task);
|
|
1200
|
-
const isMilestone = start === end;
|
|
1201
|
-
const desc = [];
|
|
1202
|
-
if (row.label) {
|
|
1203
|
-
const rowDesc = translations.vis_labelAndValue({
|
|
1204
|
-
LABEL: translations.gantt_labelRow(),
|
|
1205
|
-
VALUE: row.label
|
|
1206
|
-
});
|
|
1207
|
-
desc.push(rowDesc);
|
|
1208
|
-
}
|
|
1209
|
-
if (!isMilestone) {
|
|
1210
|
-
const startDesc = translations.vis_labelAndValue({
|
|
1211
|
-
LABEL: translations.gantt_labelStart(),
|
|
1212
|
-
VALUE: dateFormatter(start)
|
|
1213
|
-
});
|
|
1214
|
-
const endDesc = translations.vis_labelAndValue({
|
|
1215
|
-
LABEL: translations.gantt_labelEnd(),
|
|
1216
|
-
VALUE: dateFormatter(end)
|
|
1217
|
-
});
|
|
1218
|
-
desc.push(startDesc);
|
|
1219
|
-
desc.push(endDesc);
|
|
1220
|
-
}
|
|
1221
|
-
else {
|
|
1222
|
-
const dateDesc = translations.vis_labelAndValue({
|
|
1223
|
-
LABEL: translations.gantt_labelDate(),
|
|
1224
|
-
VALUE: dateFormatter(start)
|
|
1225
|
-
});
|
|
1226
|
-
desc.push(dateDesc);
|
|
1227
|
-
}
|
|
1228
|
-
if (task.label) {
|
|
1229
|
-
const labelDesc = translations.vis_labelAndValue({
|
|
1230
|
-
LABEL: translations.gantt_labelLabel(),
|
|
1231
|
-
VALUE: task.label
|
|
1232
|
-
});
|
|
1233
|
-
desc.push(labelDesc);
|
|
1234
|
-
}
|
|
1235
|
-
return desc.join('; ');
|
|
1236
|
-
};
|
|
1237
|
-
/**
|
|
1238
|
-
* Gets the aria label for the task.
|
|
1239
|
-
* @param taskObj The task layout object.
|
|
1240
|
-
* @param rowData The rows data.
|
|
1241
|
-
* @param dateFormatter The date formatter.
|
|
1242
|
-
* @param translations The translations bundle.
|
|
1243
|
-
* @returns The aria label for the task.
|
|
1244
|
-
*/
|
|
1245
|
-
const getTaskAriaLabel = (taskObj, rowData, dateFormatter, translations) => {
|
|
1246
|
-
const data = rowData[taskObj.rowIndex].tasks[taskObj.index];
|
|
1247
|
-
const accessibleLabel = data.accessibleLabel !== undefined
|
|
1248
|
-
? data.accessibleLabel
|
|
1249
|
-
: getDefaultTaskAccessibleLabel(taskObj, rowData, dateFormatter, translations);
|
|
1250
|
-
return generateAriaLabel(translations, accessibleLabel, { isSelected: taskObj.isSelected });
|
|
1251
|
-
};
|
|
1252
|
-
/**
|
|
1253
|
-
* Gets the aria label for the row label
|
|
1254
|
-
* @param rowObj The row layout object.
|
|
1255
|
-
* @param rowData The rows data.
|
|
1256
|
-
* @returns The aria label for the row label.
|
|
1257
|
-
*/
|
|
1258
|
-
const getRowLabelAriaLabel = (rowObj, rowData) => {
|
|
1259
|
-
// TODO: There will be states when we support tree data
|
|
1260
|
-
const data = rowData[rowObj.index];
|
|
1261
|
-
const accessibleLabel = data.accessibleLabel || data.label;
|
|
1262
|
-
return accessibleLabel;
|
|
1263
|
-
};
|
|
1264
|
-
|
|
1265
|
-
function GanttRowLabelContainer({ rowObj, rowData, isRowSelected, isFocused, isHorizontalGridlinesVisible, ariaActive, children }) {
|
|
1266
|
-
const ariaLabel = getRowLabelAriaLabel(rowObj, rowData);
|
|
1267
|
-
return (jsx("div", { id: ariaActive?.dataId === rowObj.id ? ariaActive.ariaId : undefined, "data-oj-row-index": rowObj.index, role: "row", "aria-label": ariaLabel, class: classNames([
|
|
1268
|
-
rowAxisStyles.labelContainer,
|
|
1269
|
-
isRowSelected && rowBackgroundStyles.selected,
|
|
1270
|
-
isFocused && rowAxisStyles.labelContainerFocused,
|
|
1271
|
-
isHorizontalGridlinesVisible && rowAxisStyles.withLabelSeparatorBottom
|
|
1272
|
-
]), children: jsx("div", { role: "rowheader", children: children }) }, rowObj.id));
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
/**
|
|
1276
|
-
* The hook to support custom datatip in visualization components.
|
|
1277
|
-
* TODO: THIS IS A TEMPORARY FORK OF PRIVATE_useDatatip until Gantt moves state up.
|
|
1278
|
-
*/
|
|
1279
|
-
function useDatatip({ content, placement = 'top-end-corner', offset, borderColor, anchor, targetFocusRef }) {
|
|
1280
|
-
const uniqueIdRef = useRef(useId());
|
|
1281
|
-
const [coords, setCoords] = useState({ x: 0, y: 0 });
|
|
1282
|
-
const offsetValue = offset || { mainAxis: DATATIP_OFFSET, crossAxis: -1 * DATATIP_OFFSET };
|
|
1283
|
-
const targetRef = useRef(null);
|
|
1284
|
-
const onPointerMove = (event) => {
|
|
1285
|
-
setCoords({ x: event.clientX, y: event.clientY });
|
|
1286
|
-
};
|
|
1287
|
-
const onFocus = (event) => {
|
|
1288
|
-
if (event.eventPhase === Event.AT_TARGET || event.eventPhase === Event.BUBBLING_PHASE) {
|
|
1289
|
-
targetRef.current = event.target;
|
|
1290
|
-
}
|
|
1291
|
-
};
|
|
1292
|
-
const onShowFocusDatatip = () => {
|
|
1293
|
-
targetRef.current = targetFocusRef.current;
|
|
1294
|
-
};
|
|
1295
|
-
const onPointerEnter = (event) => {
|
|
1296
|
-
if (event.eventPhase === Event.AT_TARGET || event.eventPhase === Event.BUBBLING_PHASE) {
|
|
1297
|
-
targetRef.current = event.currentTarget;
|
|
1298
|
-
}
|
|
1299
|
-
};
|
|
1300
|
-
// TODO: Why don't others need this? Find a way to remove this workaround
|
|
1301
|
-
const onPointerLeave = () => {
|
|
1302
|
-
setCoords({ x: -10000, y: -10000 });
|
|
1303
|
-
};
|
|
1304
|
-
const anchorRef = anchor === 'element' ? targetRef : { current: coords };
|
|
1305
|
-
const datatipContent = content != null ? (jsx(Layer, { children: jsx(Floating, { anchorRef: anchorRef, placement: placement, offsetValue: offsetValue, flipOptions: { crossAxis: true, mainAxis: true }, shiftOptions: { crossAxis: false, mainAxis: false }, children: jsx("div", { id: uniqueIdRef.current, className: styles$2.visDatatipStyle, style: { borderColor }, children: content }) }) })) : null;
|
|
1306
|
-
return {
|
|
1307
|
-
datatipContent,
|
|
1308
|
-
datatipProps: {
|
|
1309
|
-
'aria-describedby': uniqueIdRef.current,
|
|
1310
|
-
onPointerEnter,
|
|
1311
|
-
onPointerLeave,
|
|
1312
|
-
onPointerMove,
|
|
1313
|
-
onFocus,
|
|
1314
|
-
onShowFocusDatatip
|
|
1315
|
-
}
|
|
1316
|
-
};
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
/**
|
|
1320
|
-
* @license
|
|
1321
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
1322
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
1323
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
1324
|
-
* @ignore
|
|
1325
|
-
*/
|
|
1326
|
-
/**
|
|
1327
|
-
* Hook that handles row label datatip.
|
|
1328
|
-
*/
|
|
1329
|
-
const useGanttRowLabelDatatip = ({ targetRef, rowData, hoveredRowObj, focusedRowObj, currentRowLabelInteraction, rowAxisRegion }) => {
|
|
1330
|
-
const { direction } = useUser();
|
|
1331
|
-
const isRTL = direction === 'rtl';
|
|
1332
|
-
const config = {
|
|
1333
|
-
hover: {
|
|
1334
|
-
rowObj: hoveredRowObj,
|
|
1335
|
-
anchor: 'pointer'
|
|
1336
|
-
},
|
|
1337
|
-
focus: {
|
|
1338
|
-
rowObj: focusedRowObj,
|
|
1339
|
-
anchor: 'element'
|
|
1340
|
-
},
|
|
1341
|
-
none: {
|
|
1342
|
-
rowObj: undefined,
|
|
1343
|
-
anchor: 'pointer'
|
|
1344
|
-
}
|
|
1345
|
-
};
|
|
1346
|
-
const { anchor, rowObj: activeRowObj } = config[currentRowLabelInteraction];
|
|
1347
|
-
const content = activeRowObj ? rowData[activeRowObj.index].accessibleLabel : undefined;
|
|
1348
|
-
const elementBounds = activeRowObj && anchor === 'element'
|
|
1349
|
-
? {
|
|
1350
|
-
x: 0,
|
|
1351
|
-
y: activeRowObj.y + rowAxisRegion.y,
|
|
1352
|
-
width: rowAxisRegion.w,
|
|
1353
|
-
height: activeRowObj.height
|
|
1354
|
-
}
|
|
1355
|
-
: undefined;
|
|
1356
|
-
return useDatatip({
|
|
1357
|
-
content,
|
|
1358
|
-
anchor,
|
|
1359
|
-
placement: 'top-start',
|
|
1360
|
-
offset: calculateOffset(isRTL, rowAxisRegion.w, elementBounds),
|
|
1361
|
-
targetFocusRef: targetRef
|
|
1362
|
-
});
|
|
1363
|
-
};
|
|
1364
|
-
|
|
1365
|
-
/**
|
|
1366
|
-
* Hook that handles row labels pointer gestures.
|
|
1367
|
-
*/
|
|
1368
|
-
const useGanttRowLabelPointerGestures = ({ rowObjs, hoverProps }) => {
|
|
1369
|
-
const idExtracter = (event) => {
|
|
1370
|
-
const { clientX: x, clientY: y } = event;
|
|
1371
|
-
// Just for fun, an alternative to getInfo -> getElementData that Chart is doing.
|
|
1372
|
-
// TODO: think about whether this is more useful if we were to have a
|
|
1373
|
-
// Visualization shared "points to elements" system. At face value, this actually might be slightly less
|
|
1374
|
-
// efficient than the Chart method right now *in general*, because elementsFromPoint gives us ancestors
|
|
1375
|
-
// beyond the root. For our row labels purpose however, there's no "non-rowlabel" whitespace
|
|
1376
|
-
// so we'll definitely hit the element we want in like 2ish iterations so poor performance is not a concern.
|
|
1377
|
-
const elements = document.elementsFromPoint(x, y);
|
|
1378
|
-
for (let i = 0; i < elements.length; i++) {
|
|
1379
|
-
const dataRowIndex = elements[i].dataset['ojRowIndex'];
|
|
1380
|
-
if (dataRowIndex) {
|
|
1381
|
-
return rowObjs[Number(dataRowIndex)].id;
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
return undefined;
|
|
1385
|
-
};
|
|
1386
|
-
const onPointerMove = (event) => {
|
|
1387
|
-
const id = idExtracter(event);
|
|
1388
|
-
if (id !== hoverProps.hoveredRowLabelId) {
|
|
1389
|
-
hoverProps.onRowLabelHoverChange({ id });
|
|
1390
|
-
}
|
|
1391
|
-
};
|
|
1392
|
-
return { onPointerMove };
|
|
1393
|
-
};
|
|
1394
|
-
|
|
1395
|
-
function GanttRowAxis({ innerRef, scrollPosition, resolvedWidth, resolvedMaxWidth, currentRowLabel, currentRowLabelInteraction, hoveredRowLabelId, onRowLabelHoverChange, layoutObj: { labelPaddingInlineStart, labelPaddingInlineEnd, rowData, rowObjs, idRowObjMap, isHorizontalGridlinesVisible }, ariaActive, children }) {
|
|
1396
|
-
const width = resolvedWidth !== Infinity ? resolvedWidth : undefined;
|
|
1397
|
-
const maxWidth = resolvedMaxWidth !== Infinity ? resolvedMaxWidth : undefined;
|
|
1398
|
-
const availableWidth = Math.min(resolvedWidth, resolvedMaxWidth);
|
|
1399
|
-
const contextMaxWidth = availableWidth === Infinity
|
|
1400
|
-
? -1
|
|
1401
|
-
: availableWidth - (labelPaddingInlineStart + labelPaddingInlineEnd);
|
|
1402
|
-
const gestureProps = useGanttRowLabelPointerGestures({
|
|
1403
|
-
rowObjs,
|
|
1404
|
-
hoverProps: { hoveredRowLabelId, onRowLabelHoverChange }
|
|
1405
|
-
});
|
|
1406
|
-
const { datatipContent, datatipProps } = useGanttRowLabelDatatip({
|
|
1407
|
-
rowData,
|
|
1408
|
-
hoveredRowObj: hoveredRowLabelId && idRowObjMap.get(hoveredRowLabelId),
|
|
1409
|
-
focusedRowObj: currentRowLabel?.isFocused ? idRowObjMap.get(currentRowLabel.id) : undefined,
|
|
1410
|
-
currentRowLabelInteraction,
|
|
1411
|
-
// TODO: Evaluate whether we should get real element bounds by measuring.
|
|
1412
|
-
// It's unfortunate that we need to measure JUST for keyboard datatip positioning...
|
|
1413
|
-
rowAxisRegion: {
|
|
1414
|
-
x: 0,
|
|
1415
|
-
y: -scrollPosition,
|
|
1416
|
-
w: (labelPaddingInlineStart + labelPaddingInlineEnd) * 2,
|
|
1417
|
-
h: -1
|
|
1418
|
-
},
|
|
1419
|
-
targetRef: innerRef
|
|
1420
|
-
});
|
|
1421
|
-
return (jsxs("div", { ref: innerRef, ...mergeProps(gestureProps, datatipProps), class: classNames([
|
|
1422
|
-
rowAxisStyles.base,
|
|
1423
|
-
isHorizontalGridlinesVisible && rowAxisStyles.withSeparatorTop
|
|
1424
|
-
]), style: { width, maxWidth }, children: [jsx("div", { role: "grid", class: rowAxisStyles.contentContainer, style: { top: -scrollPosition }, children: rowObjs.map((rowObj) => {
|
|
1425
|
-
return (jsx(GanttRowLabelContainer, { ariaActive: ariaActive, rowObj: rowObj, rowData: rowData, isRowSelected: rowObj.isSelected, isFocused: !!currentRowLabel?.isFocused && currentRowLabel.id === rowObj.id, isHorizontalGridlinesVisible: isHorizontalGridlinesVisible, children: children(getRenderContext$1(rowObj, rowData, contextMaxWidth)) }));
|
|
1426
|
-
}) }), datatipContent] }));
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
/**
|
|
1430
|
-
* Gets the new range given the initial, global, and range ratio to apply. This applies a linear scale.
|
|
1431
|
-
* @param rangeRatio The range ratio to scale by.
|
|
1432
|
-
* @param initialRange The initial range.
|
|
1433
|
-
* @param globalRange The global range.
|
|
1434
|
-
* @returns The new linearly scaled range.
|
|
1435
|
-
*/
|
|
1436
|
-
const getNewRange = (rangeRatio, initialRange, globalRange) => {
|
|
1437
|
-
const dRangeMin = initialRange.max - globalRange.max;
|
|
1438
|
-
const dRangeMax = initialRange.min - globalRange.min;
|
|
1439
|
-
const dRange = rangeRatio * (initialRange.max - initialRange.min);
|
|
1440
|
-
const dRangeClamped = Math.max(dRangeMin, Math.min(dRange, dRangeMax));
|
|
1441
|
-
return {
|
|
1442
|
-
// Ensure positive min;
|
|
1443
|
-
// For vertical scroll for example,
|
|
1444
|
-
// it's possible for globalRange to be smaller than initialRange
|
|
1445
|
-
// due to the component being taller than the height the data occupies
|
|
1446
|
-
// e.g. tall Gantt with 1 row
|
|
1447
|
-
min: Math.max(0, initialRange.min - dRangeClamped),
|
|
1448
|
-
max: initialRange.max - dRangeClamped
|
|
1449
|
-
};
|
|
1450
|
-
};
|
|
1451
|
-
/**
|
|
1452
|
-
* Performs a pan, by invoking the given onRangeChange callback with the new range.
|
|
1453
|
-
* @param rangeRatio The range ratio to scale by.
|
|
1454
|
-
* @param initialRange The initial range.
|
|
1455
|
-
* @param prevRange The previous range.
|
|
1456
|
-
* @param globalRange The global range.
|
|
1457
|
-
* @param onRangeChange The callback to invoke with the new range.
|
|
1458
|
-
* @returns The new range and whether the range actually changed.
|
|
1459
|
-
*/
|
|
1460
|
-
const pan = (rangeRatio, initialRange, prevRange, globalRange, onRangeChange) => {
|
|
1461
|
-
const newRange = getNewRange(rangeRatio, initialRange, globalRange);
|
|
1462
|
-
const { min: prevMin, max: prevMax } = prevRange;
|
|
1463
|
-
const isRangeChanged = newRange.min !== prevMin || newRange.max !== prevMax;
|
|
1464
|
-
isRangeChanged && onRangeChange(newRange);
|
|
1465
|
-
return { newRange, isRangeChanged };
|
|
1466
|
-
};
|
|
1467
|
-
|
|
1468
|
-
/**
|
|
1469
|
-
* Hook that enables and handles drag pan gestures.
|
|
1470
|
-
*/
|
|
1471
|
-
const useDragPan = ({ captureTargetRef, width, height, getRangeX, getRangeY, globalRangeX, globalRangeY, onRangeXChange, onRangeYChange, onDragPanStart, onDragPanEnd, isDisabled = false }) => {
|
|
1472
|
-
const { direction } = useUser();
|
|
1473
|
-
const prevRangeX = useRef({ min: 0, max: 0 });
|
|
1474
|
-
const prevRangeY = useRef({ min: 0, max: 0 });
|
|
1475
|
-
const initialRangeX = useRef({ min: 0, max: 0 });
|
|
1476
|
-
const initialRangeY = useRef({ min: 0, max: 0 });
|
|
1477
|
-
const isPanning = useRef(false);
|
|
1478
|
-
const dragProps = useDrag({
|
|
1479
|
-
captureTargetRef,
|
|
1480
|
-
onDragStart: () => {
|
|
1481
|
-
initialRangeX.current = getRangeX();
|
|
1482
|
-
initialRangeY.current = getRangeY();
|
|
1483
|
-
onDragPanStart && onDragPanStart();
|
|
1484
|
-
},
|
|
1485
|
-
onDragMove: ({ dx, dy }) => {
|
|
1486
|
-
isPanning.current = true;
|
|
1487
|
-
const { newRange: newRangeX } = pan(((direction === 'rtl' ? -1 : 1) * dx) / width, initialRangeX.current, prevRangeX.current, globalRangeX, onRangeXChange);
|
|
1488
|
-
prevRangeX.current = newRangeX;
|
|
1489
|
-
const { newRange: newRangeY } = pan(dy / height, initialRangeY.current, prevRangeY.current, globalRangeY, onRangeYChange);
|
|
1490
|
-
prevRangeY.current = newRangeY;
|
|
1491
|
-
},
|
|
1492
|
-
onDragEnd: ({ originalEvent }) => {
|
|
1493
|
-
// If panning occurred, call preventDefault to prevent selection from occurring
|
|
1494
|
-
if (isPanning.current)
|
|
1495
|
-
originalEvent.preventDefault();
|
|
1496
|
-
isPanning.current = false;
|
|
1497
|
-
onDragPanEnd && onDragPanEnd();
|
|
1498
|
-
},
|
|
1499
|
-
isDisabled
|
|
1500
|
-
});
|
|
1501
|
-
return isDisabled ? {} : dragProps;
|
|
1502
|
-
};
|
|
1503
|
-
|
|
1504
|
-
/**
|
|
1505
|
-
* @license
|
|
1506
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
1507
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
1508
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
1509
|
-
* @ignore
|
|
1510
|
-
*/
|
|
1511
|
-
/**
|
|
1512
|
-
* Hook that enables and handles wheel pan gestures.
|
|
1513
|
-
*/
|
|
1514
|
-
const useWheelPan = ({ width, height, getRangeX, getRangeY, globalRangeX, globalRangeY, onRangeXChange, onRangeYChange, isDisabled = false }) => {
|
|
1515
|
-
const { direction } = useUser();
|
|
1516
|
-
const prevRangeX = useRef({ min: 0, max: 0 });
|
|
1517
|
-
const prevRangeY = useRef({ min: 0, max: 0 });
|
|
1518
|
-
const wheelProps = useWheel({
|
|
1519
|
-
onWheel: ({ deltaX: dx, deltaY: dy, ctrlKey }) => {
|
|
1520
|
-
// WheelEvent with ctrlKey means pinch/zoom gesture
|
|
1521
|
-
if (ctrlKey)
|
|
1522
|
-
return;
|
|
1523
|
-
const { newRange: newRangeX } = pan(((direction === 'rtl' ? -1 : 1) * dx) / width, getRangeX(), prevRangeX.current, globalRangeX, onRangeXChange);
|
|
1524
|
-
prevRangeX.current = newRangeX;
|
|
1525
|
-
const { newRange: newRangeY } = pan(dy / height, getRangeY(), prevRangeY.current, globalRangeY, onRangeYChange);
|
|
1526
|
-
prevRangeY.current = newRangeY;
|
|
1527
|
-
},
|
|
1528
|
-
isDisabled
|
|
1529
|
-
});
|
|
1530
|
-
return isDisabled ? {} : wheelProps;
|
|
1531
|
-
};
|
|
1532
|
-
|
|
1533
|
-
/**
|
|
1534
|
-
* Hook that enables and handles pinch zoom gestures.
|
|
1535
|
-
*/
|
|
1536
|
-
const usePinchZoom = ({ captureTargetRef, width, startTime, endTime, viewportStartTime, viewportEndTime, majorAxisZoomOrder, majorAxisZoomOrderIndex, minorAxisZoomOrder, minorAxisZoomOrderIndex, zoomOrderViewDurationThresholds, minZoomViewportDuration, maxZoomViewportDuration, onViewportChange, isDisabled = false }) => {
|
|
1537
|
-
const { direction } = useUser();
|
|
1538
|
-
const isRTL = direction === 'rtl';
|
|
1539
|
-
const pinchProps = usePinch({
|
|
1540
|
-
captureTargetRef,
|
|
1541
|
-
onPinchZoomChange: ({ origin: { x }, delta }) => {
|
|
1542
|
-
const time = getPositionTime(x, viewportStartTime, viewportEndTime, width, isRTL);
|
|
1543
|
-
zoomTime(time, viewportStartTime, viewportEndTime, startTime, endTime, getGestureZoomFactor(delta), minZoomViewportDuration, maxZoomViewportDuration, zoomOrderViewDurationThresholds, minorAxisZoomOrder, minorAxisZoomOrderIndex, majorAxisZoomOrder, majorAxisZoomOrderIndex, onViewportChange);
|
|
1544
|
-
},
|
|
1545
|
-
isDisabled
|
|
1546
|
-
});
|
|
1547
|
-
return isDisabled ? {} : pinchProps;
|
|
1548
|
-
};
|
|
1549
|
-
|
|
1550
|
-
/**
|
|
1551
|
-
* @license
|
|
1552
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
1553
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
1554
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
1555
|
-
* @ignore
|
|
1556
|
-
*/
|
|
1557
|
-
/**
|
|
1558
|
-
* Hook that enables and handles wheen zoom gestures.
|
|
1559
|
-
*/
|
|
1560
|
-
const useWheelZoom = ({ width, startTime, endTime, viewportStartTime, viewportEndTime, majorAxisZoomOrder, majorAxisZoomOrderIndex, minorAxisZoomOrder, minorAxisZoomOrderIndex, zoomOrderViewDurationThresholds, minZoomViewportDuration, maxZoomViewportDuration, onViewportChange, isDisabled = false }) => {
|
|
1561
|
-
const { direction } = useUser();
|
|
1562
|
-
const isRTL = direction === 'rtl';
|
|
1563
|
-
const wheelProps = useWheel({
|
|
1564
|
-
onWheel: ({ x, deltaY, ctrlKey }) => {
|
|
1565
|
-
// WheelEvent with ctrlKey means pinch/zoom gesture
|
|
1566
|
-
if (!ctrlKey)
|
|
1567
|
-
return;
|
|
1568
|
-
const time = getPositionTime(x, viewportStartTime, viewportEndTime, width, isRTL);
|
|
1569
|
-
zoomTime(time, viewportStartTime, viewportEndTime, startTime, endTime, getGestureZoomFactor(deltaY), minZoomViewportDuration, maxZoomViewportDuration, zoomOrderViewDurationThresholds, minorAxisZoomOrder, minorAxisZoomOrderIndex, majorAxisZoomOrder, majorAxisZoomOrderIndex, onViewportChange);
|
|
1570
|
-
},
|
|
1571
|
-
isDisabled
|
|
1572
|
-
});
|
|
1573
|
-
return isDisabled ? {} : wheelProps;
|
|
1574
|
-
};
|
|
1575
|
-
|
|
1576
|
-
/**
|
|
1577
|
-
* @license
|
|
1578
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
1579
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
1580
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
1581
|
-
* @ignore
|
|
1582
|
-
*/
|
|
1583
|
-
/**
|
|
1584
|
-
* Hook that enables and handles keyboard zooming gestures.
|
|
1585
|
-
*/
|
|
1586
|
-
const useKbZoom = ({ startTime, endTime, viewportStartTime, viewportEndTime, majorAxisZoomOrder, majorAxisZoomOrderIndex, minorAxisZoomOrder, minorAxisZoomOrderIndex, zoomOrderViewDurationThresholds, minZoomViewportDuration, maxZoomViewportDuration, onViewportChange, isDisabled = false }) => {
|
|
1587
|
-
const onKbZoomIn = (e) => {
|
|
1588
|
-
const viewportCenter = viewportStartTime + (viewportEndTime - viewportStartTime) / 2;
|
|
1589
|
-
zoomTime(viewportCenter, viewportStartTime, viewportEndTime, startTime, endTime, e.detail.zoomFactor, minZoomViewportDuration, maxZoomViewportDuration, zoomOrderViewDurationThresholds, minorAxisZoomOrder, minorAxisZoomOrderIndex, majorAxisZoomOrder, majorAxisZoomOrderIndex, onViewportChange);
|
|
1590
|
-
};
|
|
1591
|
-
const onKbZoomOut = (e) => {
|
|
1592
|
-
const viewportCenter = viewportStartTime + (viewportEndTime - viewportStartTime) / 2;
|
|
1593
|
-
zoomTime(viewportCenter, viewportStartTime, viewportEndTime, startTime, endTime, e.detail.zoomFactor, minZoomViewportDuration, maxZoomViewportDuration, zoomOrderViewDurationThresholds, minorAxisZoomOrder, minorAxisZoomOrderIndex, majorAxisZoomOrder, majorAxisZoomOrderIndex, onViewportChange);
|
|
1594
|
-
};
|
|
1595
|
-
return isDisabled
|
|
1596
|
-
? {}
|
|
1597
|
-
: {
|
|
1598
|
-
onKbZoomIn,
|
|
1599
|
-
onKbZoomOut
|
|
1600
|
-
};
|
|
1601
|
-
};
|
|
1602
|
-
|
|
1603
|
-
/**
|
|
1604
|
-
* @license
|
|
1605
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
1606
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
1607
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
1608
|
-
* @ignore
|
|
1609
|
-
*/
|
|
1610
|
-
/**
|
|
1611
|
-
* Hook that enables and handles keyboard panning gesture.
|
|
1612
|
-
*/
|
|
1613
|
-
const useKbPan = ({ getRangeX, getRangeY, globalRangeX, globalRangeY, onRangeXChange, onRangeYChange, isDisabled = false }) => {
|
|
1614
|
-
const prevRangeX = useRef({ min: 0, max: 0 });
|
|
1615
|
-
const prevRangeY = useRef({ min: 0, max: 0 });
|
|
1616
|
-
const onKbPanHorizontal = (e) => {
|
|
1617
|
-
const { detail: { rangeRatio } } = e;
|
|
1618
|
-
const { newRange: newRangeX } = pan(rangeRatio, getRangeX(), prevRangeX.current, globalRangeX, onRangeXChange);
|
|
1619
|
-
prevRangeX.current = newRangeX;
|
|
1620
|
-
};
|
|
1621
|
-
const onKbPanVertical = (e) => {
|
|
1622
|
-
const { detail: { rangeRatio } } = e;
|
|
1623
|
-
const { newRange: newRangeY } = pan(rangeRatio, getRangeY(), prevRangeY.current, globalRangeY, onRangeYChange);
|
|
1624
|
-
prevRangeY.current = newRangeY;
|
|
1625
|
-
};
|
|
1626
|
-
return isDisabled
|
|
1627
|
-
? {}
|
|
1628
|
-
: {
|
|
1629
|
-
onKbPanHorizontal,
|
|
1630
|
-
onKbPanVertical
|
|
1631
|
-
};
|
|
1632
|
-
};
|
|
1633
|
-
|
|
1634
|
-
/**
|
|
1635
|
-
* Gets the default task to initially receive logical focus upon component focus.
|
|
1636
|
-
* @param param0 The (unresolved) row data layout.
|
|
1637
|
-
* @returns The task (if there are any) to receive focus.
|
|
1638
|
-
*/
|
|
1639
|
-
const getDefaultInitialFocusTask = ({ rowObjs }) => {
|
|
1640
|
-
// Default to the first task of the first row (if it exists)
|
|
1641
|
-
if (rowObjs.length === 0)
|
|
1642
|
-
return;
|
|
1643
|
-
if (rowObjs[0].taskObjs.length === 0)
|
|
1644
|
-
return;
|
|
1645
|
-
return { id: rowObjs[0].taskObjs[0].id, isFocused: true };
|
|
1646
|
-
};
|
|
1647
|
-
/**
|
|
1648
|
-
* Gets next or previous navigable task from the current task.
|
|
1649
|
-
* @param currentTask The current task.
|
|
1650
|
-
* @param param1 The (unresolved) row data layout.
|
|
1651
|
-
* @param direction 'next' or 'prev'
|
|
1652
|
-
* @returns The adjacent navigable task according to the given direction.
|
|
1653
|
-
*/
|
|
1654
|
-
const getAdjacentTaskNavigable = (currentTask, { rowObjs, idTaskObjMap }, direction) => {
|
|
1655
|
-
const currentTaskObj = idTaskObjMap.get(currentTask);
|
|
1656
|
-
if (!currentTaskObj)
|
|
1657
|
-
return;
|
|
1658
|
-
const indexOffset = direction === 'next' ? 1 : -1;
|
|
1659
|
-
const { rowIndex, renderIndex: index } = currentTaskObj;
|
|
1660
|
-
// Return adjacent task in the row if it exists
|
|
1661
|
-
const adjTaskObj = rowObjs[rowIndex].taskObjs[index + indexOffset];
|
|
1662
|
-
if (adjTaskObj)
|
|
1663
|
-
return adjTaskObj.id;
|
|
1664
|
-
// Return a task in adjacent row if it exists
|
|
1665
|
-
// For 'next' direction, this is the first task of the next row
|
|
1666
|
-
// For 'prev' direction, this is the last task of the previous row
|
|
1667
|
-
const adjRowObj = rowObjs[rowIndex + indexOffset];
|
|
1668
|
-
if (adjRowObj) {
|
|
1669
|
-
const adjTaskObj = direction === 'next'
|
|
1670
|
-
? adjRowObj.taskObjs[0]
|
|
1671
|
-
: adjRowObj.taskObjs[adjRowObj.taskObjs.length - 1];
|
|
1672
|
-
if (adjTaskObj)
|
|
1673
|
-
return adjTaskObj.id;
|
|
1674
|
-
}
|
|
1675
|
-
return;
|
|
1676
|
-
};
|
|
1677
|
-
/**
|
|
1678
|
-
* Gets above or below navigable task from the current task.
|
|
1679
|
-
* @param currentTask The current task.
|
|
1680
|
-
* @param param1 The (unresolved) row data layout.
|
|
1681
|
-
* @param direction 'up' or 'down'
|
|
1682
|
-
* @returns The adjacent navigable task according to the given direction.
|
|
1683
|
-
*/
|
|
1684
|
-
const getVerticalTaskNavigable = (currentTask, { rowObjs, idTaskObjMap }, direction) => {
|
|
1685
|
-
const currentTaskObj = idTaskObjMap.get(currentTask);
|
|
1686
|
-
if (!currentTaskObj)
|
|
1687
|
-
return;
|
|
1688
|
-
const rowIndexOffset = direction === 'down' ? 1 : -1;
|
|
1689
|
-
const { rowIndex } = currentTaskObj;
|
|
1690
|
-
// Return first task in the adjacent row if it exists
|
|
1691
|
-
const adjRowObj = rowObjs[rowIndex + rowIndexOffset];
|
|
1692
|
-
if (!adjRowObj)
|
|
1693
|
-
return;
|
|
1694
|
-
const adjTaskObj = adjRowObj.taskObjs[0];
|
|
1695
|
-
if (adjTaskObj)
|
|
1696
|
-
return adjTaskObj.id;
|
|
1697
|
-
return;
|
|
1698
|
-
};
|
|
1699
|
-
/**
|
|
1700
|
-
* Gets the next navigable task from the current task.
|
|
1701
|
-
* @param currentTask The current task.
|
|
1702
|
-
* @param rowDataLayout The (unresolved) row data layout.
|
|
1703
|
-
* @returns The next navigable task.
|
|
1704
|
-
*/
|
|
1705
|
-
const getNextTaskNavigable = (currentTask, rowDataLayout) => getAdjacentTaskNavigable(currentTask, rowDataLayout, 'next');
|
|
1706
|
-
/**
|
|
1707
|
-
* Gets the previous navigable task from the current task.
|
|
1708
|
-
* @param currentTask The current task.
|
|
1709
|
-
* @param rowDataLayout The (unresolved) row data layout.
|
|
1710
|
-
* @returns The previous navigable task.
|
|
1711
|
-
*/
|
|
1712
|
-
const getPrevTaskNavigable = (currentTask, rowDataLayout) => getAdjacentTaskNavigable(currentTask, rowDataLayout, 'prev');
|
|
1713
|
-
/**
|
|
1714
|
-
* Gets the navigable task above the current task.
|
|
1715
|
-
* @param currentTask The current task.
|
|
1716
|
-
* @param rowDataLayout The (unresolved) row data layout.
|
|
1717
|
-
* @returns The navigable task above.
|
|
1718
|
-
*/
|
|
1719
|
-
const getAboveTaskNavigable = (currentTask, rowDataLayout) => getVerticalTaskNavigable(currentTask, rowDataLayout, 'up');
|
|
1720
|
-
/**
|
|
1721
|
-
* Gets the navigable task below the current task.
|
|
1722
|
-
* @param currentTask The current task.
|
|
1723
|
-
* @param rowDataLayout The (unresolved) row data layout.
|
|
1724
|
-
* @returns The navigable task below.
|
|
1725
|
-
*/
|
|
1726
|
-
const getBelowTaskNavigable = (currentTask, rowDataLayout) => getVerticalTaskNavigable(currentTask, rowDataLayout, 'down');
|
|
1727
|
-
/**
|
|
1728
|
-
* Gets above or below navigable row label from the current row label.
|
|
1729
|
-
* @param currentRowLabel The current row label.
|
|
1730
|
-
* @param param1 The (unresolved) row data layout.
|
|
1731
|
-
* @param direction 'up' or 'down'
|
|
1732
|
-
* @returns The adjacent navigable row label according to the given direction.
|
|
1733
|
-
*/
|
|
1734
|
-
const getAdjacentRowLabelNavigable = (currentRowLabel, { rowObjs, idRowObjMap }, direction) => {
|
|
1735
|
-
const currentRowObj = idRowObjMap.get(currentRowLabel);
|
|
1736
|
-
if (!currentRowObj)
|
|
1737
|
-
return;
|
|
1738
|
-
const rowIndexOffset = direction === 'down' ? 1 : -1;
|
|
1739
|
-
const { index: rowIndex } = currentRowObj;
|
|
1740
|
-
const adjRowObj = rowObjs[rowIndex + rowIndexOffset];
|
|
1741
|
-
if (!adjRowObj)
|
|
1742
|
-
return;
|
|
1743
|
-
return adjRowObj.id;
|
|
1744
|
-
};
|
|
1745
|
-
/**
|
|
1746
|
-
* Gets the navigable row label above the current row label.
|
|
1747
|
-
* @param currentRowLabel The current row label.
|
|
1748
|
-
* @param rowDataLayout The (unresolved) row data layout.
|
|
1749
|
-
* @returns The navigable row label above.
|
|
1750
|
-
*/
|
|
1751
|
-
const getAboveRowLabelNavigable = (currentRowLabel, rowDataLayout) => getAdjacentRowLabelNavigable(currentRowLabel, rowDataLayout, 'up');
|
|
1752
|
-
/**
|
|
1753
|
-
* Gets the navigable row label below the current row label.
|
|
1754
|
-
* @param currentRowLabel The current row label.
|
|
1755
|
-
* @param rowDataLayout The (unresolved) row data layout.
|
|
1756
|
-
* @returns The navigable row label below.
|
|
1757
|
-
*/
|
|
1758
|
-
const getBelowRowLabelNavigable = (currentRowLabel, rowDataLayout) => getAdjacentRowLabelNavigable(currentRowLabel, rowDataLayout, 'down');
|
|
1759
|
-
/**
|
|
1760
|
-
* Gets the row label navigable from the current task.
|
|
1761
|
-
* @param currentTask The current task.
|
|
1762
|
-
* @param rowDataLayout The (unresolved) row data layout.
|
|
1763
|
-
* @returns The row label navigable from the current task.
|
|
1764
|
-
*/
|
|
1765
|
-
const getRowLabelNavigableFromTask = (currentTask, rowDataLayout) => {
|
|
1766
|
-
// taskObj should not be undefined because you must start from
|
|
1767
|
-
// a focused task to get to a rowlabel.
|
|
1768
|
-
const taskObj = rowDataLayout.idTaskObjMap.get(currentTask);
|
|
1769
|
-
const { rowIndex } = taskObj;
|
|
1770
|
-
const rowObj = rowDataLayout.rowObjs[rowIndex];
|
|
1771
|
-
return rowObj.id;
|
|
1772
|
-
};
|
|
1773
|
-
/**
|
|
1774
|
-
* Gets the task navigable from the current row label.
|
|
1775
|
-
* @param currentRowLabel The current row label.
|
|
1776
|
-
* @param rowDataLayout The (unresolved) row data layout.
|
|
1777
|
-
* @param currentTask If any, the last current task (e.g. the last focused task).
|
|
1778
|
-
* @returns The task navigable from the current row label.
|
|
1779
|
-
*/
|
|
1780
|
-
const getTaskNavigableFromRowLabel = (currentRowLabel, rowDataLayout, currentTask) => {
|
|
1781
|
-
if (currentTask !== undefined) {
|
|
1782
|
-
const taskObj = rowDataLayout.idTaskObjMap.get(currentTask);
|
|
1783
|
-
if (taskObj) {
|
|
1784
|
-
const { rowIndex } = taskObj;
|
|
1785
|
-
const rowObj = rowDataLayout.rowObjs[rowIndex];
|
|
1786
|
-
if (rowObj.id === currentRowLabel) {
|
|
1787
|
-
return currentTask;
|
|
1788
|
-
}
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
const rowObj = rowDataLayout.idRowObjMap.get(currentRowLabel);
|
|
1792
|
-
const firstTaskObj = rowObj?.taskObjs[0];
|
|
1793
|
-
if (firstTaskObj) {
|
|
1794
|
-
return firstTaskObj.id;
|
|
1795
|
-
}
|
|
1796
|
-
const defaultTask = getDefaultInitialFocusTask(rowDataLayout);
|
|
1797
|
-
return defaultTask?.id;
|
|
1798
|
-
};
|
|
1799
|
-
/**
|
|
1800
|
-
* Gets the dx and dy necessary to pan the given region into view.
|
|
1801
|
-
* @param region The target region to pan into view.
|
|
1802
|
-
* @param viewportRegion The viewport region.
|
|
1803
|
-
* @param isRTL Whether the reading direction is rtl.
|
|
1804
|
-
* @param xPriority The side in the x direction to prioritize scroll into view.
|
|
1805
|
-
* @param yPriority The side in the y direction to prioritize scroll into view.
|
|
1806
|
-
* @param overShoot The extra amount of space to pan by.
|
|
1807
|
-
* @returns The dx and dy values.
|
|
1808
|
-
*/
|
|
1809
|
-
const getPanIntoViewValues = (region, viewportRegion, isRTL, xPriority = 'auto', yPriority = 'auto', overShoot = 0) => {
|
|
1810
|
-
const deltaXLeftVisible = Math.min(region.x - viewportRegion.x - overShoot, 0);
|
|
1811
|
-
const deltaXRightVisible = Math.max(0, region.x + region.w - (viewportRegion.x + viewportRegion.w) + overShoot);
|
|
1812
|
-
const deltaXStartVisible = isRTL ? deltaXRightVisible : deltaXLeftVisible;
|
|
1813
|
-
const deltaXEndVisible = isRTL ? deltaXLeftVisible : deltaXRightVisible;
|
|
1814
|
-
let deltaX = 0;
|
|
1815
|
-
switch (xPriority) {
|
|
1816
|
-
case 'start':
|
|
1817
|
-
deltaX = deltaXStartVisible;
|
|
1818
|
-
break;
|
|
1819
|
-
case 'end':
|
|
1820
|
-
deltaX = deltaXEndVisible;
|
|
1821
|
-
break;
|
|
1822
|
-
case 'auto':
|
|
1823
|
-
deltaX = (!isRTL ? deltaXEndVisible > 0 : deltaXEndVisible < 0)
|
|
1824
|
-
? deltaXEndVisible
|
|
1825
|
-
: deltaXStartVisible; // 'end' wins if just 'end', or both sides, require panning. 'start' otherwise.
|
|
1826
|
-
break;
|
|
1827
|
-
default: {
|
|
1828
|
-
const _exhaustiveCheck = xPriority;
|
|
1829
|
-
return _exhaustiveCheck;
|
|
1830
|
-
}
|
|
1831
|
-
}
|
|
1832
|
-
const deltaYTopVisible = Math.min(region.y - viewportRegion.y - overShoot, 0);
|
|
1833
|
-
const deltaYBottomVisible = Math.max(0, region.y + region.h - (viewportRegion.y + viewportRegion.h) + overShoot);
|
|
1834
|
-
let deltaY = 0;
|
|
1835
|
-
switch (yPriority) {
|
|
1836
|
-
case 'top':
|
|
1837
|
-
deltaY = deltaYTopVisible;
|
|
1838
|
-
break;
|
|
1839
|
-
case 'bottom':
|
|
1840
|
-
deltaY = deltaYBottomVisible;
|
|
1841
|
-
break;
|
|
1842
|
-
case 'auto':
|
|
1843
|
-
deltaY = deltaYTopVisible < 0 ? deltaYTopVisible : deltaYBottomVisible; // 'top' wins if just 'top', or both sides, require panning. 'bottom' otherwise.
|
|
1844
|
-
break;
|
|
1845
|
-
default: {
|
|
1846
|
-
const _exhaustiveCheck = yPriority;
|
|
1847
|
-
return _exhaustiveCheck;
|
|
1848
|
-
}
|
|
1849
|
-
}
|
|
1850
|
-
return { dx: -deltaX, dy: -deltaY };
|
|
1851
|
-
};
|
|
1852
|
-
|
|
1853
|
-
/**
|
|
1854
|
-
* Hook that handles keyboard panning related gestures on a Gantt.
|
|
1855
|
-
*/
|
|
1856
|
-
const useGanttKbPan = ({ viewportLayout, dataBodyWidth, dataBodyHeight, viewportStartTime, viewportEndTime, scrollPosition, ...panOptions }) => {
|
|
1857
|
-
const { direction } = useUser();
|
|
1858
|
-
const isRTL = direction === 'rtl';
|
|
1859
|
-
const kbPanProps = useKbPan(panOptions);
|
|
1860
|
-
const prevRangeX = useRef({ min: 0, max: 0 });
|
|
1861
|
-
const prevRangeY = useRef({ min: 0, max: 0 });
|
|
1862
|
-
const panBy = (dx = 0, dy = 0) => {
|
|
1863
|
-
if (dx !== 0) {
|
|
1864
|
-
const { newRange: newRangeX } = pan(dx / dataBodyWidth, panOptions.getRangeX(), prevRangeX.current, panOptions.globalRangeX, panOptions.onRangeXChange);
|
|
1865
|
-
prevRangeX.current = newRangeX;
|
|
1866
|
-
}
|
|
1867
|
-
if (dy !== 0) {
|
|
1868
|
-
const { newRange: newRangeY } = pan(dy / dataBodyHeight, panOptions.getRangeY(), prevRangeY.current, panOptions.globalRangeY, panOptions.onRangeYChange);
|
|
1869
|
-
prevRangeY.current = newRangeY;
|
|
1870
|
-
}
|
|
1871
|
-
};
|
|
1872
|
-
const onKbPanTaskIntoView = (e) => {
|
|
1873
|
-
let taskObj = viewportLayout.idTaskObjMap.get(e.detail.id);
|
|
1874
|
-
if (!taskObj) {
|
|
1875
|
-
// task may be outside viewport
|
|
1876
|
-
const unresolvedTaskObj = viewportLayout.allIdTaskObjMap.get(e.detail.id);
|
|
1877
|
-
if (!unresolvedTaskObj)
|
|
1878
|
-
return;
|
|
1879
|
-
taskObj = getResolvedTaskObj(unresolvedTaskObj, viewportStartTime, viewportEndTime, dataBodyWidth, scrollPosition, isRTL);
|
|
1880
|
-
}
|
|
1881
|
-
const { x, y, width: w, height: h } = taskObj;
|
|
1882
|
-
const region = { x, y, w, h };
|
|
1883
|
-
const viewportRegion = { x: 0, y: 0, w: dataBodyWidth, h: dataBodyHeight };
|
|
1884
|
-
const overShoot = viewportLayout.rowPadding;
|
|
1885
|
-
const { dx, dy } = getPanIntoViewValues(region, viewportRegion, isRTL, 'auto', 'auto', overShoot);
|
|
1886
|
-
panBy(dx, dy);
|
|
1887
|
-
};
|
|
1888
|
-
const onKbPanRowIntoView = (e) => {
|
|
1889
|
-
const rowObj = viewportLayout.allIdRowObjMap.get(e.detail.id);
|
|
1890
|
-
if (!rowObj)
|
|
1891
|
-
return;
|
|
1892
|
-
const region = { x: 0, y: rowObj.y - scrollPosition, w: dataBodyWidth, h: rowObj.height };
|
|
1893
|
-
const viewportRegion = { x: 0, y: 0, w: dataBodyWidth, h: dataBodyHeight };
|
|
1894
|
-
const overShoot = viewportLayout.rowPadding;
|
|
1895
|
-
const { dy } = getPanIntoViewValues(region, viewportRegion, isRTL, 'auto', 'auto', overShoot);
|
|
1896
|
-
panBy(0, dy);
|
|
1897
|
-
};
|
|
1898
|
-
return panOptions.isDisabled
|
|
1899
|
-
? {}
|
|
1900
|
-
: {
|
|
1901
|
-
...kbPanProps,
|
|
1902
|
-
onKbPanTaskIntoView,
|
|
1903
|
-
onKbPanRowIntoView
|
|
1904
|
-
};
|
|
1905
|
-
};
|
|
1906
|
-
|
|
1907
|
-
/**
|
|
1908
|
-
* Hook that handles pan/zoom related gestures on a Gantt.
|
|
1909
|
-
*/
|
|
1910
|
-
const useGanttPanZoomGestures = ({ captureTargetRef, width, height, viewportStartTime, viewportEndTime, majorAxisScale, minorAxisScale, startTime, endTime, zoomParameters, scrollPosition, dataBodyHeight, totalRowsHeight, viewportLayout, onViewportChange, onScrollPositionChange, onCursorChange, isPanDisabled, isZoomDisabled }) => {
|
|
1911
|
-
const panOptions = {
|
|
1912
|
-
captureTargetRef,
|
|
1913
|
-
width,
|
|
1914
|
-
height,
|
|
1915
|
-
getRangeX: () => ({ min: viewportStartTime, max: viewportEndTime }),
|
|
1916
|
-
getRangeY: () => ({ min: scrollPosition, max: scrollPosition + dataBodyHeight }),
|
|
1917
|
-
globalRangeX: { min: startTime, max: endTime },
|
|
1918
|
-
globalRangeY: { min: 0, max: totalRowsHeight },
|
|
1919
|
-
onRangeXChange: (newRange) => {
|
|
1920
|
-
onViewportChange?.({
|
|
1921
|
-
viewportStart: getISOString(newRange.min),
|
|
1922
|
-
viewportEnd: getISOString(newRange.max),
|
|
1923
|
-
majorAxisScale,
|
|
1924
|
-
minorAxisScale
|
|
1925
|
-
});
|
|
1926
|
-
},
|
|
1927
|
-
onRangeYChange: (newRange) => {
|
|
1928
|
-
onScrollPositionChange?.({
|
|
1929
|
-
y: newRange.min
|
|
1930
|
-
});
|
|
1931
|
-
},
|
|
1932
|
-
isDisabled: isPanDisabled
|
|
1933
|
-
};
|
|
1934
|
-
const { getZoomOrderViewDurationThresholds, ...restZoomParameters } = zoomParameters;
|
|
1935
|
-
const zoomOrderViewDurationThresholds = getZoomOrderViewDurationThresholds(width);
|
|
1936
|
-
const zoomOptions = {
|
|
1937
|
-
captureTargetRef,
|
|
1938
|
-
width,
|
|
1939
|
-
...restZoomParameters,
|
|
1940
|
-
zoomOrderViewDurationThresholds,
|
|
1941
|
-
onViewportChange,
|
|
1942
|
-
isDisabled: isZoomDisabled
|
|
1943
|
-
};
|
|
1944
|
-
const dragPanProps = useDragPan({
|
|
1945
|
-
...panOptions,
|
|
1946
|
-
onDragPanStart: () => onCursorChange?.({ cursor: 'grabbing' }),
|
|
1947
|
-
onDragPanEnd: () => onCursorChange?.({ cursor: 'grabbingUnset' })
|
|
1948
|
-
});
|
|
1949
|
-
const wheelPanProps = useWheelPan(panOptions);
|
|
1950
|
-
const kbPanProps = useGanttKbPan({
|
|
1951
|
-
...panOptions,
|
|
1952
|
-
viewportLayout,
|
|
1953
|
-
dataBodyWidth: width,
|
|
1954
|
-
dataBodyHeight,
|
|
1955
|
-
viewportStartTime,
|
|
1956
|
-
viewportEndTime,
|
|
1957
|
-
scrollPosition
|
|
1958
|
-
});
|
|
1959
|
-
const pinchZoomProps = usePinchZoom(zoomOptions);
|
|
1960
|
-
const wheelZoomProps = useWheelZoom(zoomOptions);
|
|
1961
|
-
const kbZoomProps = useKbZoom(zoomOptions);
|
|
1962
|
-
const gestureProps = mergeProps(dragPanProps, wheelPanProps, kbPanProps, pinchZoomProps, wheelZoomProps, kbZoomProps);
|
|
1963
|
-
return { gestureProps };
|
|
1964
|
-
};
|
|
1965
|
-
|
|
1966
|
-
/**
|
|
1967
|
-
* @license
|
|
1968
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
1969
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
1970
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
1971
|
-
* @ignore
|
|
1972
|
-
*/
|
|
1973
|
-
/**
|
|
1974
|
-
* Hook that handles task pointer gestures.
|
|
1975
|
-
*/
|
|
1976
|
-
const useGanttTaskPointerGestures = ({ viewportLayout, viewportYOffset, dataBodyRegion, viewportStartTime, viewportEndTime, width, isRTL, selectionProps, hoverProps, currentProps, onCursorChange }) => {
|
|
1977
|
-
const { x: dbx, y: dby, w: dbw, h: dbh } = dataBodyRegion;
|
|
1978
|
-
const selectionSupported = supportsSelection(selectionProps.selectionMode);
|
|
1979
|
-
const idExtracter = (event) => {
|
|
1980
|
-
const rowObjs = viewportLayout.allRowObjs;
|
|
1981
|
-
const spatialIndex = viewportLayout.spatialIndex;
|
|
1982
|
-
const { offsetX: x, offsetY: y } = event;
|
|
1983
|
-
const inDataBody = !(x < dbx || x > dbx + dbw || y < dby || y > dby + dbh);
|
|
1984
|
-
if (!inDataBody)
|
|
1985
|
-
return;
|
|
1986
|
-
const timePoint = {
|
|
1987
|
-
time: getPositionTime(x, viewportStartTime, viewportEndTime, width, isRTL),
|
|
1988
|
-
y: y + viewportYOffset
|
|
1989
|
-
};
|
|
1990
|
-
const targetIndices = queryTasksSpatialIndex(rowObjs, spatialIndex.tasks, timePoint);
|
|
1991
|
-
if (!targetIndices)
|
|
1992
|
-
return;
|
|
1993
|
-
const { rowIndex, taskIndex } = targetIndices;
|
|
1994
|
-
return rowObjs[rowIndex].taskObjs[taskIndex].id;
|
|
1995
|
-
};
|
|
1996
|
-
const onPointerMove = (event) => {
|
|
1997
|
-
const id = idExtracter(event);
|
|
1998
|
-
if (id !== hoverProps.hoveredTaskId) {
|
|
1999
|
-
hoverProps.onTaskHoverChange({ id });
|
|
2000
|
-
}
|
|
2001
|
-
selectionSupported &&
|
|
2002
|
-
onCursorChange?.({ cursor: id !== undefined ? 'pointer' : 'pointerUnset' });
|
|
2003
|
-
};
|
|
2004
|
-
const onPointerUp = (event) => {
|
|
2005
|
-
const id = idExtracter(event);
|
|
2006
|
-
if (id !== undefined) {
|
|
2007
|
-
selectionSupported && onCursorChange?.({ cursor: 'pointer' });
|
|
2008
|
-
if (id !== currentProps?.currentTask?.id) {
|
|
2009
|
-
currentProps.onCurrentTaskChange({ id, isFocused: false });
|
|
2010
|
-
}
|
|
2011
|
-
}
|
|
2012
|
-
};
|
|
2013
|
-
const hoverPointerGestureProps = { onPointerMove };
|
|
2014
|
-
const focusPointerGestureProps = { onPointerUp };
|
|
2015
|
-
const { selectionProps: { onKeyUp, ...selectionPointerGestureProps }, selectionContent } = useSelection({
|
|
2016
|
-
idExtracter,
|
|
2017
|
-
selection: selectionProps.selectedIds,
|
|
2018
|
-
selectionMode: selectionProps.selectionMode,
|
|
2019
|
-
onChange: selectionProps.onSelectionChange,
|
|
2020
|
-
getDataById: viewportLayout.getTaskDataById
|
|
2021
|
-
});
|
|
2022
|
-
const gestureProps = mergeProps(hoverPointerGestureProps, focusPointerGestureProps, selectionPointerGestureProps);
|
|
2023
|
-
return { gestureProps, selectionContent };
|
|
2024
|
-
};
|
|
2025
|
-
|
|
2026
|
-
/**
|
|
2027
|
-
* Gets the default datatip renderer.
|
|
2028
|
-
* @param options Relevant information.
|
|
2029
|
-
* @returns The default datatip renderer.
|
|
2030
|
-
*/
|
|
2031
|
-
const getDefaultDatatipRenderer = (options) => {
|
|
2032
|
-
const { translations, dateFormatter } = options;
|
|
2033
|
-
const defaultDatatipRenderer = ({ data, rowData }) => {
|
|
2034
|
-
if (data.accessibleLabel !== undefined) {
|
|
2035
|
-
return { content: data.accessibleLabel };
|
|
2036
|
-
}
|
|
2037
|
-
const { start, end } = getNormalizedStartEnd(data);
|
|
2038
|
-
const isMilestone = start === end;
|
|
2039
|
-
const tableData = [];
|
|
2040
|
-
if (rowData.label) {
|
|
2041
|
-
tableData.push({ key: translations.gantt_labelRow(), value: rowData.label });
|
|
2042
|
-
}
|
|
2043
|
-
if (!isMilestone) {
|
|
2044
|
-
tableData.push({ key: translations.gantt_labelStart(), value: dateFormatter(start) });
|
|
2045
|
-
tableData.push({ key: translations.gantt_labelEnd(), value: dateFormatter(end) });
|
|
2046
|
-
}
|
|
2047
|
-
else {
|
|
2048
|
-
tableData.push({ key: translations.gantt_labelDate(), value: dateFormatter(start) });
|
|
2049
|
-
}
|
|
2050
|
-
if (data.label) {
|
|
2051
|
-
tableData.push({ key: translations.gantt_labelLabel(), value: data.label });
|
|
2052
|
-
}
|
|
2053
|
-
const content = jsx(VisTabularDatatip, { tableData: tableData });
|
|
2054
|
-
return { content };
|
|
2055
|
-
};
|
|
2056
|
-
return defaultDatatipRenderer;
|
|
2057
|
-
};
|
|
2058
|
-
/**
|
|
2059
|
-
* Gets the datatip renderer context.
|
|
2060
|
-
* @param rows The rows data.
|
|
2061
|
-
* @param layoutObj The task layout object.
|
|
2062
|
-
* @returns
|
|
2063
|
-
*/
|
|
2064
|
-
const getRenderContext = (rows, layoutObj) => {
|
|
2065
|
-
const { index, rowIndex } = layoutObj;
|
|
2066
|
-
return {
|
|
2067
|
-
data: rows[rowIndex].tasks[index],
|
|
2068
|
-
rowData: rows[rowIndex]
|
|
2069
|
-
};
|
|
2070
|
-
};
|
|
2071
|
-
|
|
2072
|
-
/**
|
|
2073
|
-
* @license
|
|
2074
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
2075
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
2076
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
2077
|
-
* @ignore
|
|
2078
|
-
*/
|
|
2079
|
-
/**
|
|
2080
|
-
* Hook that handles task datatip.
|
|
2081
|
-
*/
|
|
2082
|
-
const useGanttTaskDatatip = ({ targetRef, datatip, rowData, dateFormatter, hoveredTaskObj, focusedTaskObj, currentTaskInteraction, dataBodyRegion }) => {
|
|
2083
|
-
const { direction } = useUser();
|
|
2084
|
-
const isRTL = direction === 'rtl';
|
|
2085
|
-
const translations = useTranslationBundle('@oracle/oraclejet-preact');
|
|
2086
|
-
const config = {
|
|
2087
|
-
hover: {
|
|
2088
|
-
taskObj: hoveredTaskObj,
|
|
2089
|
-
anchor: 'pointer'
|
|
2090
|
-
},
|
|
2091
|
-
focus: {
|
|
2092
|
-
taskObj: focusedTaskObj,
|
|
2093
|
-
anchor: 'element'
|
|
2094
|
-
},
|
|
2095
|
-
none: {
|
|
2096
|
-
taskObj: undefined,
|
|
2097
|
-
anchor: 'pointer'
|
|
2098
|
-
}
|
|
2099
|
-
};
|
|
2100
|
-
const { anchor, taskObj: activeTaskObj } = config[currentTaskInteraction];
|
|
2101
|
-
const datatipRenderer = datatip ??
|
|
2102
|
-
getDefaultDatatipRenderer({
|
|
2103
|
-
translations,
|
|
2104
|
-
dateFormatter,
|
|
2105
|
-
isRTL
|
|
2106
|
-
});
|
|
2107
|
-
const { content, borderColor } = activeTaskObj
|
|
2108
|
-
? datatipRenderer(getRenderContext(rowData, activeTaskObj))
|
|
2109
|
-
: { content: undefined, borderColor: undefined };
|
|
2110
|
-
const elementBounds = activeTaskObj && anchor === 'element'
|
|
2111
|
-
? {
|
|
2112
|
-
x: activeTaskObj.x,
|
|
2113
|
-
y: activeTaskObj.y + dataBodyRegion.y,
|
|
2114
|
-
width: activeTaskObj.width,
|
|
2115
|
-
height: activeTaskObj.height
|
|
2116
|
-
}
|
|
2117
|
-
: undefined;
|
|
2118
|
-
return useDatatip({
|
|
2119
|
-
content,
|
|
2120
|
-
anchor,
|
|
2121
|
-
placement: 'top-start',
|
|
2122
|
-
offset: calculateOffset(isRTL, dataBodyRegion.w, elementBounds),
|
|
2123
|
-
borderColor,
|
|
2124
|
-
targetFocusRef: targetRef
|
|
2125
|
-
});
|
|
2126
|
-
};
|
|
2127
|
-
|
|
2128
|
-
function GanttTimeAxisDataBody({ innerRef, isRTL, scrollPosition, onScrollPositionChange, isViewportDefined, onViewportChange, zoomParameters, zooming, selectedIds, selectionMode, onSelectionChange, hoveredTaskId, onTaskHoverChange, currentTask, onCurrentTaskChange, currentTaskInteraction, ariaActive, getTimeAxesLayout, getResolvedViewportLayout, rowDataLayout, rowAxisSeparator, datatip, majorAxis, minorAxis, dataBody }) {
|
|
2129
|
-
if (!isViewportDefined) {
|
|
2130
|
-
return (jsx(TrackResizeContainer, { width: "100%", height: "100%", children: (width) => {
|
|
2131
|
-
const timeAxesLayout = getTimeAxesLayout(width);
|
|
2132
|
-
const { majorAxis: majorAxisLayout, minorAxis: minorAxisLayout, viewportStartTime, viewportEndTime } = timeAxesLayout;
|
|
2133
|
-
const majorAxisScale = majorAxisLayout && majorAxisLayout.zoomOrder[majorAxisLayout.zoomOrderIndex];
|
|
2134
|
-
const minorAxisScale = minorAxisLayout.zoomOrder[minorAxisLayout.zoomOrderIndex];
|
|
2135
|
-
onViewportChange?.({
|
|
2136
|
-
viewportStart: getISOString(viewportStartTime),
|
|
2137
|
-
viewportEnd: getISOString(viewportEndTime),
|
|
2138
|
-
majorAxisScale,
|
|
2139
|
-
minorAxisScale
|
|
2140
|
-
});
|
|
2141
|
-
return null;
|
|
2142
|
-
} }));
|
|
2143
|
-
}
|
|
2144
|
-
return (jsx(TrackResizeContainer, { width: "100%", height: "100%", children: function _(width, height) {
|
|
2145
|
-
const timeAxesLayout = getTimeAxesLayout(width);
|
|
2146
|
-
const { position, majorAxis: majorAxisLayout, minorAxis: minorAxisLayout, viewportStartTime, viewportEndTime, startTime, endTime } = timeAxesLayout;
|
|
2147
|
-
const majorAxisScale = majorAxisLayout && majorAxisLayout.zoomOrder[majorAxisLayout.zoomOrderIndex];
|
|
2148
|
-
const minorAxisScale = minorAxisLayout.zoomOrder[minorAxisLayout.zoomOrderIndex];
|
|
2149
|
-
const majorAxisHeight = majorAxisLayout ? majorAxisLayout.height : 0;
|
|
2150
|
-
const { height: minorAxisHeight } = minorAxisLayout;
|
|
2151
|
-
const dataBodyHeight = height - (majorAxisHeight + minorAxisHeight);
|
|
2152
|
-
const viewportLayout = getResolvedViewportLayout(rowDataLayout, viewportStartTime, viewportEndTime, scrollPosition, width, dataBodyHeight, isRTL);
|
|
2153
|
-
const effectsLayout = getEffectTaskObjs({
|
|
2154
|
-
selectionProps: { selectedIds, selectionMode },
|
|
2155
|
-
hoverProps: { hoveredTaskId },
|
|
2156
|
-
currentProps: { currentTask }
|
|
2157
|
-
}, viewportLayout.idTaskObjMap);
|
|
2158
|
-
const defaultDateFormatter = getDefaultDateFormatter(minorAxisScale, viewportStartTime);
|
|
2159
|
-
const majorAxisComp = majorAxisLayout && majorAxis(majorAxisLayout);
|
|
2160
|
-
const minorAxisComp = minorAxis(minorAxisLayout);
|
|
2161
|
-
const dataBodyComp = dataBody({
|
|
2162
|
-
width,
|
|
2163
|
-
height: dataBodyHeight,
|
|
2164
|
-
viewportLayout,
|
|
2165
|
-
minorAxisLayout,
|
|
2166
|
-
effectsLayout,
|
|
2167
|
-
dateFormatter: defaultDateFormatter,
|
|
2168
|
-
ariaActiveTask: ariaActive
|
|
2169
|
-
});
|
|
2170
|
-
const layout = {
|
|
2171
|
-
top: {
|
|
2172
|
-
components: [majorAxisComp, minorAxisComp, dataBodyComp],
|
|
2173
|
-
dataBodyPos: height - dataBodyHeight
|
|
2174
|
-
},
|
|
2175
|
-
bottom: {
|
|
2176
|
-
components: [dataBodyComp, minorAxisComp, majorAxisComp],
|
|
2177
|
-
dataBodyPos: 0
|
|
2178
|
-
}
|
|
2179
|
-
};
|
|
2180
|
-
// Temporary; this will be a Gantt prop when we add marquee selection support
|
|
2181
|
-
const dragMode = 'pan';
|
|
2182
|
-
// TODO: think about a better cursor management system
|
|
2183
|
-
const [cursor, setCursor] = useState();
|
|
2184
|
-
const onCursorChange = (detail) => setCursor((prevCursor) => {
|
|
2185
|
-
if (prevCursor === undefined)
|
|
2186
|
-
return detail.cursor;
|
|
2187
|
-
if (prevCursor === 'grabbing' && detail.cursor !== 'grabbingUnset')
|
|
2188
|
-
return 'grabbing';
|
|
2189
|
-
if (detail.cursor === 'grabbingUnset' || detail.cursor === 'pointerUnset')
|
|
2190
|
-
return undefined;
|
|
2191
|
-
return detail.cursor;
|
|
2192
|
-
});
|
|
2193
|
-
const { gestureProps: panZoomGestureProps } = useGanttPanZoomGestures({
|
|
2194
|
-
captureTargetRef: innerRef,
|
|
2195
|
-
width,
|
|
2196
|
-
height,
|
|
2197
|
-
viewportStartTime,
|
|
2198
|
-
viewportEndTime,
|
|
2199
|
-
majorAxisScale,
|
|
2200
|
-
minorAxisScale,
|
|
2201
|
-
startTime,
|
|
2202
|
-
endTime,
|
|
2203
|
-
zoomParameters: zoomParameters,
|
|
2204
|
-
scrollPosition,
|
|
2205
|
-
dataBodyHeight,
|
|
2206
|
-
totalRowsHeight: rowDataLayout.totalRowsHeight,
|
|
2207
|
-
viewportLayout,
|
|
2208
|
-
onViewportChange: (args) => {
|
|
2209
|
-
if (onViewportChange) {
|
|
2210
|
-
onViewportChange(args);
|
|
2211
|
-
// TODO: Evaluate whether it's okay to clear hover behavior on pan and zoom
|
|
2212
|
-
onTaskHoverChange({ id: undefined });
|
|
2213
|
-
}
|
|
2214
|
-
},
|
|
2215
|
-
onScrollPositionChange: (args) => {
|
|
2216
|
-
if (onScrollPositionChange) {
|
|
2217
|
-
onScrollPositionChange(args);
|
|
2218
|
-
// TODO: Evaluate whether it's okay to clear hover behavior on pan
|
|
2219
|
-
onTaskHoverChange({ id: undefined });
|
|
2220
|
-
}
|
|
2221
|
-
},
|
|
2222
|
-
onCursorChange,
|
|
2223
|
-
isPanDisabled: dragMode !== 'pan',
|
|
2224
|
-
isZoomDisabled: zooming === 'off'
|
|
2225
|
-
});
|
|
2226
|
-
const dataBodyRegion = {
|
|
2227
|
-
x: 0,
|
|
2228
|
-
y: layout[position].dataBodyPos,
|
|
2229
|
-
w: width,
|
|
2230
|
-
h: dataBodyHeight
|
|
2231
|
-
};
|
|
2232
|
-
const { gestureProps: taskGestureProps, selectionContent } = useGanttTaskPointerGestures({
|
|
2233
|
-
viewportLayout,
|
|
2234
|
-
viewportYOffset: scrollPosition - layout[position].dataBodyPos,
|
|
2235
|
-
dataBodyRegion,
|
|
2236
|
-
viewportStartTime,
|
|
2237
|
-
viewportEndTime,
|
|
2238
|
-
width,
|
|
2239
|
-
isRTL,
|
|
2240
|
-
selectionProps: { selectedIds, selectionMode, onSelectionChange },
|
|
2241
|
-
hoverProps: { hoveredTaskId, onTaskHoverChange },
|
|
2242
|
-
currentProps: { currentTask, onCurrentTaskChange },
|
|
2243
|
-
onCursorChange
|
|
2244
|
-
});
|
|
2245
|
-
const { datatipContent, datatipProps } = useGanttTaskDatatip({
|
|
2246
|
-
datatip,
|
|
2247
|
-
rowData: viewportLayout.rowData,
|
|
2248
|
-
dateFormatter: defaultDateFormatter,
|
|
2249
|
-
hoveredTaskObj: hoveredTaskId && viewportLayout.idTaskObjMap.get(hoveredTaskId),
|
|
2250
|
-
focusedTaskObj: effectsLayout.focusedTaskObj,
|
|
2251
|
-
currentTaskInteraction,
|
|
2252
|
-
dataBodyRegion,
|
|
2253
|
-
targetRef: innerRef
|
|
2254
|
-
});
|
|
2255
|
-
const gestureProps = mergeProps(panZoomGestureProps, taskGestureProps, datatipProps);
|
|
2256
|
-
return (jsxs("div", { ref: innerRef, ...gestureProps, class: classNames([
|
|
2257
|
-
timeAxisDataBodyStyles.base,
|
|
2258
|
-
timeAxisDataBodyStyles.pannable,
|
|
2259
|
-
isRTL
|
|
2260
|
-
? rowAxisSeparator && timeAxisDataBodyStyles.withRowAxisSeparatorRight
|
|
2261
|
-
: rowAxisSeparator && timeAxisDataBodyStyles.withRowAxisSeparatorLeft
|
|
2262
|
-
]), style: { cursor }, children: [layout[position].components, datatipContent, selectionContent] }));
|
|
2263
|
-
} }));
|
|
2264
|
-
}
|
|
2265
|
-
|
|
2266
|
-
function GanttHorizontalGridlinesLayer({ width, height, positions }) {
|
|
2267
|
-
const cmd = positions.map((p) => `M0,${p} H${width}`).join(' ');
|
|
2268
|
-
return (jsx("svg", { width: width, height: height, children: jsx("path", { class: horizontalGridlinesStyles.base, d: cmd }) }));
|
|
2269
|
-
}
|
|
2270
|
-
|
|
2271
|
-
function GanttDesktopTaskAccContent({ width, height, rowData, dateFormatter, ariaActiveId, ariaActiveTaskObj }) {
|
|
2272
|
-
const translations = useTranslationBundle('@oracle/oraclejet-preact');
|
|
2273
|
-
const idIndex = useRef(0);
|
|
2274
|
-
const ids = useMemo(() => {
|
|
2275
|
-
const ids = idIndex.current === 0 ? [ariaActiveId, getRandomId()] : [getRandomId(), ariaActiveId];
|
|
2276
|
-
idIndex.current = Math.abs(idIndex.current - 1);
|
|
2277
|
-
return ids;
|
|
2278
|
-
}, [ariaActiveId]);
|
|
2279
|
-
const ariaLabel = ariaActiveTaskObj && getTaskAriaLabel(ariaActiveTaskObj, rowData, dateFormatter, translations);
|
|
2280
|
-
return (jsxs("div", { style: { width, height }, children: [jsx("div", { role: "img", id: ids[0], "aria-label": ariaLabel }), jsx("div", { role: "img", id: ids[1], "aria-label": ariaLabel })] }));
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2283
|
-
function GanttMobileTaskAccContent({ width, height, rowData, dateFormatter, layoutObjs }) {
|
|
2284
|
-
const translations = useTranslationBundle('@oracle/oraclejet-preact');
|
|
2285
|
-
const content = [];
|
|
2286
|
-
layoutObjs.forEach((rowObj) => {
|
|
2287
|
-
rowObj.taskObjs.forEach((taskObj) => {
|
|
2288
|
-
const ariaLabel = getTaskAriaLabel(taskObj, rowData, dateFormatter, translations);
|
|
2289
|
-
content.push(jsx("div", { role: "img", "aria-label": ariaLabel, class: taskMobileAccStyles.content, style: {
|
|
2290
|
-
width: taskObj.width,
|
|
2291
|
-
height: taskObj.height,
|
|
2292
|
-
top: taskObj.y,
|
|
2293
|
-
left: taskObj.x
|
|
2294
|
-
} }));
|
|
2295
|
-
});
|
|
2296
|
-
});
|
|
2297
|
-
return (jsx("div", { class: taskMobileAccStyles.base, style: { width, height }, children: content }));
|
|
2298
|
-
}
|
|
2299
|
-
|
|
2300
|
-
function GanttTaskAccLayer({ width, height, rowData, dateFormatter, ariaActiveId, ariaActiveTaskObj, layoutObjs }) {
|
|
2301
|
-
return supportsMobileScreenReader ? (jsx(GanttMobileTaskAccContent, { width: width, height: height, layoutObjs: layoutObjs, rowData: rowData, dateFormatter: dateFormatter })) : (jsx(GanttDesktopTaskAccContent, { width: width, height: height, rowData: rowData, dateFormatter: dateFormatter, ariaActiveId: ariaActiveId, ariaActiveTaskObj: ariaActiveTaskObj }));
|
|
2302
|
-
}
|
|
2303
|
-
|
|
2304
|
-
function GanttRowBackgroundsLayer({ width, height, layoutObjs }) {
|
|
2305
|
-
const selectedRowObjs = layoutObjs.filter((rowObj) => rowObj.isSelected);
|
|
2306
|
-
const selectedRowsCmd = selectedRowObjs
|
|
2307
|
-
.map(({ y, height }) => {
|
|
2308
|
-
// Reduce left and right edge by 1px to ensure the rendering doesn't
|
|
2309
|
-
// interfere with the row axis separator
|
|
2310
|
-
return `M1,${y} H${width - 1} V${y + height} H${1} Z`;
|
|
2311
|
-
})
|
|
2312
|
-
.join(' ');
|
|
2313
|
-
return selectedRowObjs.length > 0 ? (jsx("svg", { width: width, height: height, children: jsx("path", { class: rowBackgroundStyles.selected, d: selectedRowsCmd }) })) : null;
|
|
2314
|
-
}
|
|
2315
|
-
|
|
2316
|
-
/**
|
|
2317
|
-
* @license
|
|
2318
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
2319
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
2320
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
2321
|
-
* @ignore
|
|
2322
|
-
*/
|
|
2323
|
-
/**
|
|
2324
|
-
* Draws a given task effect onto a given Canvas.
|
|
2325
|
-
* @param ctx The Canvas's 2D context.
|
|
2326
|
-
* @param effectLayout The task effect layout object.
|
|
2327
|
-
*/
|
|
2328
|
-
const drawTaskEffectRing = (ctx, effectLayout) => {
|
|
2329
|
-
const { x, y, width, height, borderRadius, stroke, strokeWidth, padding } = effectLayout;
|
|
2330
|
-
const ringX = x - padding;
|
|
2331
|
-
const ringY = y - padding;
|
|
2332
|
-
const ringWidth = width + 2 * padding;
|
|
2333
|
-
const ringHeight = height + 2 * padding;
|
|
2334
|
-
const effectRingCmd = rectangleWithBorderRadius(ringX, ringY, ringWidth, ringHeight, borderRadius, Math.min(ringWidth, ringHeight), '0');
|
|
2335
|
-
const effectRingPath = new Path2D(effectRingCmd);
|
|
2336
|
-
ctx.strokeStyle = stroke;
|
|
2337
|
-
ctx.lineWidth = strokeWidth;
|
|
2338
|
-
ctx.stroke(effectRingPath);
|
|
2339
|
-
};
|
|
2340
|
-
/**
|
|
2341
|
-
* Draws a given task effect shadow onto a given Canvas.
|
|
2342
|
-
* @param ctx The Canvas's 2D context.
|
|
2343
|
-
* @param shadow The shadow definition.
|
|
2344
|
-
*/
|
|
2345
|
-
const drawTaskEffectShadow = (ctx, shadow) => {
|
|
2346
|
-
ctx.shadowColor = shadow.shadowColor;
|
|
2347
|
-
ctx.shadowOffsetX = shadow.shadowOffsetX;
|
|
2348
|
-
ctx.shadowOffsetY = shadow.shadowOffsetY;
|
|
2349
|
-
ctx.shadowBlur = shadow.shadowBlur;
|
|
2350
|
-
};
|
|
2351
|
-
/**
|
|
2352
|
-
* Resets any shadow settings in the Canvas's context.
|
|
2353
|
-
* @param ctx The Canvas's 2D context.
|
|
2354
|
-
*/
|
|
2355
|
-
const resetShadow = (ctx) => {
|
|
2356
|
-
ctx.shadowColor = 'transparent';
|
|
2357
|
-
ctx.shadowOffsetX = 0;
|
|
2358
|
-
ctx.shadowOffsetY = 0;
|
|
2359
|
-
ctx.shadowBlur = 0;
|
|
2360
|
-
};
|
|
2361
|
-
/**
|
|
2362
|
-
* Draws a given task onto a given Canvas.
|
|
2363
|
-
* @param ctx The Canvas's 2D context.
|
|
2364
|
-
* @param taskLayoutObj The task layout object.
|
|
2365
|
-
* @param state The task's state.
|
|
2366
|
-
*/
|
|
2367
|
-
const drawTask = (ctx, taskLayoutObj, state) => {
|
|
2368
|
-
const drawShadow = state === 'hovered';
|
|
2369
|
-
const { x, y, width, height, borderRadius, fill, stroke, strokeWidth } = taskLayoutObj;
|
|
2370
|
-
const roundRectCmd = rectangleWithBorderRadius(x, y, width, height, borderRadius, Math.min(width, height), '0');
|
|
2371
|
-
const roundRectPath = new Path2D(roundRectCmd);
|
|
2372
|
-
// Draw white task backdrop
|
|
2373
|
-
if (drawShadow)
|
|
2374
|
-
drawTaskEffectShadow(ctx, taskLayoutObj.hoverEffect.shadow);
|
|
2375
|
-
ctx.fillStyle = '#ffffff';
|
|
2376
|
-
ctx.fill(roundRectPath);
|
|
2377
|
-
if (drawShadow)
|
|
2378
|
-
resetShadow(ctx);
|
|
2379
|
-
// Draw task
|
|
2380
|
-
ctx.strokeStyle = stroke;
|
|
2381
|
-
ctx.fillStyle = fill;
|
|
2382
|
-
ctx.lineWidth = strokeWidth;
|
|
2383
|
-
ctx.fill(roundRectPath);
|
|
2384
|
-
ctx.stroke(roundRectPath);
|
|
2385
|
-
switch (state) {
|
|
2386
|
-
case 'selected': {
|
|
2387
|
-
drawTaskEffectRing(ctx, {
|
|
2388
|
-
x,
|
|
2389
|
-
y,
|
|
2390
|
-
width,
|
|
2391
|
-
height,
|
|
2392
|
-
borderRadius,
|
|
2393
|
-
...taskLayoutObj.selectionEffect
|
|
2394
|
-
});
|
|
2395
|
-
break;
|
|
2396
|
-
}
|
|
2397
|
-
case 'hovered': {
|
|
2398
|
-
drawTaskEffectRing(ctx, { x, y, width, height, borderRadius, ...taskLayoutObj.hoverEffect });
|
|
2399
|
-
break;
|
|
2400
|
-
}
|
|
2401
|
-
case 'focused': {
|
|
2402
|
-
drawTaskEffectRing(ctx, { x, y, width, height, borderRadius, ...taskLayoutObj.focusEffect });
|
|
2403
|
-
break;
|
|
2404
|
-
}
|
|
2405
|
-
case undefined: {
|
|
2406
|
-
// No effect
|
|
2407
|
-
break;
|
|
2408
|
-
}
|
|
2409
|
-
default: {
|
|
2410
|
-
const _exhaustiveCheck = state;
|
|
2411
|
-
return _exhaustiveCheck;
|
|
2412
|
-
}
|
|
2413
|
-
}
|
|
2414
|
-
};
|
|
2415
|
-
|
|
2416
|
-
function GanttTaskFocusEffectsLayer({ width, height, layoutObj: taskObj }) {
|
|
2417
|
-
const draw = (ctx) => {
|
|
2418
|
-
taskObj && drawTask(ctx, taskObj, 'focused');
|
|
2419
|
-
};
|
|
2420
|
-
return jsx(TimeComponentCanvas2D, { width: width, height: height, draw: draw });
|
|
2421
|
-
}
|
|
2422
|
-
|
|
2423
|
-
function GanttTaskHoverEffectsLayer({ width, height, layoutObj: taskObj }) {
|
|
2424
|
-
const draw = (ctx) => {
|
|
2425
|
-
taskObj && drawTask(ctx, taskObj, 'hovered');
|
|
2426
|
-
};
|
|
2427
|
-
return jsx(TimeComponentCanvas2D, { width: width, height: height, draw: draw });
|
|
2428
|
-
}
|
|
2429
|
-
|
|
2430
|
-
function GanttTaskSelectionEffectsLayer({ width, height, layoutObjs }) {
|
|
2431
|
-
const draw = (ctx) => {
|
|
2432
|
-
layoutObjs.forEach((taskObj) => drawTask(ctx, taskObj, 'selected'));
|
|
2433
|
-
};
|
|
2434
|
-
return jsx(TimeComponentCanvas2D, { width: width, height: height, draw: draw });
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
|
-
function GanttTaskEffectsLayer({ width, height, layoutObjs: { selectedTaskObjs, hoveredTaskObj, focusedTaskObj } }) {
|
|
2438
|
-
return (jsxs(TimeComponentLayersStack, { width: `${width}px`, height: `${height}px`, children: [jsx(GanttTaskFocusEffectsLayer, { width: width, height: height, layoutObj: focusedTaskObj }), jsx(GanttTaskSelectionEffectsLayer, { width: width, height: height, layoutObjs: selectedTaskObjs }), jsx(GanttTaskHoverEffectsLayer, { width: width, height: height, layoutObj: hoveredTaskObj })] }));
|
|
2439
|
-
}
|
|
2440
|
-
|
|
2441
|
-
function GanttTaskLabel({ x, y, width, height, label, isInner, textAlign, labelStyle }) {
|
|
2442
|
-
return (jsx("div", { "aria-hidden": "true", class: classNames([taskLabelLayerStyles.label, isInner && taskLabelLayerStyles.innerLabel]), style: {
|
|
2443
|
-
left: x,
|
|
2444
|
-
top: y,
|
|
2445
|
-
width,
|
|
2446
|
-
height,
|
|
2447
|
-
textAlign,
|
|
2448
|
-
...labelStyle
|
|
2449
|
-
}, children: jsx(Text, { variant: labelStyle?.color ? 'inherit' : 'primary', truncation: "ellipsis", size: "md", weight: "inherit", children: label }) }));
|
|
2450
|
-
}
|
|
2451
|
-
|
|
2452
|
-
function GanttTaskLabelsLayer({ width, height, layoutObjs }) {
|
|
2453
|
-
return (jsx("div", { class: taskLabelLayerStyles.base, style: { width, height }, children: layoutObjs.map((labelObj) => (jsx(GanttTaskLabel, { ...labelObj }))) }));
|
|
2454
|
-
}
|
|
2455
|
-
|
|
2456
|
-
function GanttTasksLayer({ width, height, layoutObjs }) {
|
|
2457
|
-
const draw = (ctx) => {
|
|
2458
|
-
layoutObjs.forEach((rowObj) => {
|
|
2459
|
-
rowObj.taskObjs.forEach((taskObj) => drawTask(ctx, taskObj));
|
|
2460
|
-
});
|
|
2461
|
-
};
|
|
2462
|
-
return jsx(TimeComponentCanvas2D, { width: width, height: height, draw: draw });
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
function GanttDataBody({ width, height, minorAxisLayout: { minorGridTicksPos, majorGridTicksPos }, viewportLayout: { gridlines, rowData, rowObjs, taskLabelObjs, horizontalGridlinesPos, idTaskObjMap }, effectsLayout, dateFormatter, ariaActiveTask }) {
|
|
2466
|
-
return (jsxs(TimeComponentLayersStack, { width: `${width}px`, height: `${height}px`, children: [jsx(GanttRowBackgroundsLayer, { width: width, height: height, layoutObjs: rowObjs }), gridlines.vertical === 'on' && (jsx(TimeComponentVerticalGridlines, { width: width, height: height, positions: minorGridTicksPos, variant: "minor" })), gridlines.vertical === 'on' && majorGridTicksPos && (jsx(TimeComponentVerticalGridlines, { width: width, height: height, positions: majorGridTicksPos, variant: "major" })), horizontalGridlinesPos && (jsx(GanttHorizontalGridlinesLayer, { width: width, height: height, positions: horizontalGridlinesPos })), jsx(GanttTaskAccLayer, { width: width, height: height, layoutObjs: rowObjs, rowData: rowData, dateFormatter: dateFormatter, ariaActiveId: ariaActiveTask?.ariaId, ariaActiveTaskObj: ariaActiveTask && idTaskObjMap.get(ariaActiveTask.dataId) }), jsx(GanttTasksLayer, { width: width, height: height, layoutObjs: rowObjs }), jsx(GanttTaskEffectsLayer, { width: width, height: height, layoutObjs: effectsLayout }), jsx(GanttTaskLabelsLayer, { width: width, height: height, layoutObjs: taskLabelObjs })] }));
|
|
2467
|
-
}
|
|
2468
|
-
|
|
2469
|
-
function GanttView({ visRef, overlayControlsContainerRef, panZoomLayout, getTimeAxesLayout, getHorizontalScrollbarLayout, onHorizontalScrollChange, getVerticalScrollbarLayout, onVerticalScrollChange, rowAxisSeparator = false, zoomParameters, zooming = 'on', isViewportDefined, onViewportChange, getResolvedViewportLayout, datatip, rowDataLayout, isRTL, scrollPosition, onScrollPositionChange, selectedIds, selectionMode, onSelectionChange, hoveredTaskId, onTaskHoverChange, currentTask, onCurrentTaskChange, currentTaskInteraction, ariaActive, width, height }) {
|
|
2470
|
-
return (jsx(TimeComponentPanZoomLayout, { overlayControlsContainerRef: overlayControlsContainerRef, ...panZoomLayout, width: width, height: height, overlayControls: zooming === 'on' && zoomParameters && isViewportDefined ? (jsx(TimeComponentZoomControls, { position: panZoomLayout.overlayControlsPosition, zoomParameters: zoomParameters, onViewportChange: onViewportChange })) : undefined, verticalControl: jsx(TimeComponentVerticalScrollbarContainer, { getLayout: getVerticalScrollbarLayout, onRangeChange: onVerticalScrollChange, children: (layout) => jsx(TimeComponentVerticalScrollbar, { ...layout }) }), horizontalControl: jsx(TimeComponentHorizontalScrollbarContainer, { getLayout: getHorizontalScrollbarLayout, onRangeChange: onHorizontalScrollChange, children: (layout) => jsx(TimeComponentHorizontalScrollbar, { ...layout }) }), vis: jsx(GanttTimeAxisDataBody, { innerRef: visRef, isRTL: isRTL, scrollPosition: scrollPosition, onScrollPositionChange: onScrollPositionChange, isViewportDefined: isViewportDefined, onViewportChange: onViewportChange, zoomParameters: zoomParameters, zooming: zooming, rowAxisSeparator: rowAxisSeparator, selectedIds: selectedIds, selectionMode: selectionMode, onSelectionChange: onSelectionChange, hoveredTaskId: hoveredTaskId, onTaskHoverChange: onTaskHoverChange, currentTask: currentTask, onCurrentTaskChange: onCurrentTaskChange, currentTaskInteraction: currentTaskInteraction, ariaActive: ariaActive, getTimeAxesLayout: getTimeAxesLayout, getResolvedViewportLayout: getResolvedViewportLayout, rowDataLayout: rowDataLayout, datatip: datatip, majorAxis: (layout) => jsx(TimeComponentHorizontalTimeAxis, { ...layout }), minorAxis: (layout) => jsx(TimeComponentHorizontalTimeAxis, { ...layout }), dataBody: (layout) => jsx(GanttDataBody, { ...layout }) }) }));
|
|
2471
|
-
}
|
|
2472
|
-
|
|
2473
|
-
/**
|
|
2474
|
-
* @license
|
|
2475
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
2476
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
2477
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
2478
|
-
* @ignore
|
|
2479
|
-
*/
|
|
2480
|
-
// TODO: Remove and replace this with the future useTextDimensions batch text measurements solution.
|
|
2481
|
-
// We also just need width, so maybe we can make useTextDimensions optimize for that case too
|
|
2482
|
-
// e.g. use canvas backend for width only measurements, etc.
|
|
2483
|
-
/**
|
|
2484
|
-
* Gets the text dimensions of the given array of texts.
|
|
2485
|
-
* @param getTextDimensions The measurement function.
|
|
2486
|
-
* @param texts An array of texts.
|
|
2487
|
-
* @param font The font of the texts.
|
|
2488
|
-
* @returns An array of text dimensions.
|
|
2489
|
-
*/
|
|
2490
|
-
const getBatchTextDimensions = (getTextDimensions, texts, font) => texts.map((text) => getTextDimensions(text, font));
|
|
2491
|
-
/**
|
|
2492
|
-
* Gets the (unresolved) time axis height.
|
|
2493
|
-
* @param axisProps The axis props.
|
|
2494
|
-
* @returns The (unresolved) height.
|
|
2495
|
-
*/
|
|
2496
|
-
const getUnresolvedTimeAxisHeight = (axisProps) => {
|
|
2497
|
-
return axisProps === undefined
|
|
2498
|
-
? '0px'
|
|
2499
|
-
: axisProps.height !== undefined
|
|
2500
|
-
? `${axisProps.height}px`
|
|
2501
|
-
: bridgeValues.horizontalTimeAxisHeight;
|
|
2502
|
-
};
|
|
2503
|
-
/**
|
|
2504
|
-
* Gets the unresolved time axis layout.
|
|
2505
|
-
* @param axisPosition The axis position.
|
|
2506
|
-
* @param minorAxis The minor axis props.
|
|
2507
|
-
* @param majorAxis The major axis props.
|
|
2508
|
-
* @returns The unresovled time axis layout.
|
|
2509
|
-
*/
|
|
2510
|
-
const getUnresolvedTimeAxesLayout = (axisPosition, minorAxis, majorAxis) => {
|
|
2511
|
-
const minorAxisHeight = getUnresolvedTimeAxisHeight(minorAxis);
|
|
2512
|
-
const majorAxisHeight = getUnresolvedTimeAxisHeight(majorAxis);
|
|
2513
|
-
const totalHeight = `calc(${majorAxisHeight} + ${minorAxisHeight})`;
|
|
2514
|
-
return {
|
|
2515
|
-
position: axisPosition,
|
|
2516
|
-
height: totalHeight
|
|
2517
|
-
};
|
|
2518
|
-
};
|
|
2519
|
-
/**
|
|
2520
|
-
* Gets the resolved time axis height.
|
|
2521
|
-
* @param defaultHeight The default time axis height.
|
|
2522
|
-
* @param axisProps The axis props.
|
|
2523
|
-
* @returns The time axis height in pixels.
|
|
2524
|
-
*/
|
|
2525
|
-
const getResolvedTimeAxisHeight = (defaultHeight, axisProps) => {
|
|
2526
|
-
return axisProps === undefined
|
|
2527
|
-
? 0
|
|
2528
|
-
: axisProps.height !== undefined
|
|
2529
|
-
? axisProps.height
|
|
2530
|
-
: defaultHeight;
|
|
2531
|
-
};
|
|
2532
|
-
/**
|
|
2533
|
-
* Gets the resolved time axis props.
|
|
2534
|
-
* @param defaultHeight The default time axis height.
|
|
2535
|
-
* @param axisProps The axis props.
|
|
2536
|
-
* @returns The resolved axis props.
|
|
2537
|
-
*/
|
|
2538
|
-
const getResolvedTimeAxisProps = (defaultHeight, axisProps) => {
|
|
2539
|
-
const height = getResolvedTimeAxisHeight(defaultHeight, axisProps);
|
|
2540
|
-
const { scale, zoomOrder = [axisProps.scale] } = axisProps;
|
|
2541
|
-
return {
|
|
2542
|
-
height,
|
|
2543
|
-
zoomOrder,
|
|
2544
|
-
zoomOrderIndex: zoomOrder.indexOf(scale)
|
|
2545
|
-
};
|
|
2546
|
-
};
|
|
2547
|
-
/**
|
|
2548
|
-
* Gets the interval start time relative to the given time according to the given scale.
|
|
2549
|
-
* @param scale The time scale.
|
|
2550
|
-
* @param time The query time.
|
|
2551
|
-
* @returns The interval start time.
|
|
2552
|
-
*/
|
|
2553
|
-
const getPreviousTime = (scale, time) => {
|
|
2554
|
-
return Date.parse(scale.getPreviousDate(new Date(time).toISOString()));
|
|
2555
|
-
};
|
|
2556
|
-
/**
|
|
2557
|
-
* Gets the interval end time relative to the given time according to the given scale.
|
|
2558
|
-
* @param scale The time scale.
|
|
2559
|
-
* @param time The query time.
|
|
2560
|
-
* @returns The interval end time.
|
|
2561
|
-
*/
|
|
2562
|
-
const getNextTime = (scale, time) => {
|
|
2563
|
-
return Date.parse(scale.getNextDate(new Date(time).toISOString()));
|
|
2564
|
-
};
|
|
2565
|
-
/**
|
|
2566
|
-
* Gets the time axis ticks in the given viewport.
|
|
2567
|
-
* @param scale The time scale.
|
|
2568
|
-
* @param viewportStartTime The viewport start time.
|
|
2569
|
-
* @param viewportEndTime The viewport end time.
|
|
2570
|
-
* @returns The ticks (in time).
|
|
2571
|
-
*/
|
|
2572
|
-
const getViewportTicks = (scale, viewportStartTime, viewportEndTime) => {
|
|
2573
|
-
const times = [getPreviousTime(scale, viewportStartTime)];
|
|
2574
|
-
while (times[times.length - 1] < viewportEndTime) {
|
|
2575
|
-
times.push(getNextTime(scale, times[times.length - 1]));
|
|
2576
|
-
}
|
|
2577
|
-
return times;
|
|
2578
|
-
};
|
|
2579
|
-
/**
|
|
2580
|
-
* Returns a set of date intervals sampled using the following procedure:
|
|
2581
|
-
* 1. Divide up the time range into numSections sections
|
|
2582
|
-
* 2. For each section, take the first numIntervalsPerSection intervals from the start,
|
|
2583
|
-
* plus the last interval of the section.
|
|
2584
|
-
* 3. Consolidate all of them and return
|
|
2585
|
-
* @param scale
|
|
2586
|
-
* @param startTime
|
|
2587
|
-
* @param endTime
|
|
2588
|
-
* @param numSections
|
|
2589
|
-
* @param numIntervalsPerSection
|
|
2590
|
-
* @returns The unique intervals retrieved (as a Map of <start time, end time>)
|
|
2591
|
-
*/
|
|
2592
|
-
const sampleIntervals = (scale, startTime, endTime, numSections, numIntervalsPerSection) => {
|
|
2593
|
-
// key: interval start time, value: interval end time
|
|
2594
|
-
// Use Map to prevent duplicate intervals
|
|
2595
|
-
const intervals = new Map();
|
|
2596
|
-
const sectionInterval = Math.floor((endTime - startTime) / numSections);
|
|
2597
|
-
for (let i = 0; i < numSections; i++) {
|
|
2598
|
-
const sectionStartTime = startTime + sectionInterval * i;
|
|
2599
|
-
const sectionEndTime = Math.min(startTime + sectionInterval * (i + 1), endTime);
|
|
2600
|
-
let prevTime = getPreviousTime(scale, sectionStartTime);
|
|
2601
|
-
for (let j = 0; j < numIntervalsPerSection; j++) {
|
|
2602
|
-
if (prevTime >= sectionEndTime) {
|
|
2603
|
-
break;
|
|
2604
|
-
}
|
|
2605
|
-
const currTime = getNextTime(scale, prevTime);
|
|
2606
|
-
intervals.set(prevTime, currTime);
|
|
2607
|
-
prevTime = currTime;
|
|
2608
|
-
}
|
|
2609
|
-
// Also consider last label at the end of the section
|
|
2610
|
-
prevTime = getPreviousTime(scale, sectionEndTime - 1);
|
|
2611
|
-
intervals.set(prevTime, getNextTime(scale, prevTime));
|
|
2612
|
-
}
|
|
2613
|
-
return intervals;
|
|
2614
|
-
};
|
|
2615
|
-
/**
|
|
2616
|
-
* Gets (a representative set of) the time intervals in the given time scale.
|
|
2617
|
-
* @param scale The time scale.
|
|
2618
|
-
* @param samplingStrategy The sampling strategy to use.
|
|
2619
|
-
* The 'exact' type would retrieve ALL intervals in the given range and scale.
|
|
2620
|
-
* 'approximate' would retrieve only a representative subset of intervals.
|
|
2621
|
-
* @returns (A representative set of) the time intervals in the given time scale.
|
|
2622
|
-
*/
|
|
2623
|
-
const getTimeAxisIntervals = (scale, samplingStrategy) => {
|
|
2624
|
-
const { type, params } = samplingStrategy;
|
|
2625
|
-
switch (type) {
|
|
2626
|
-
case 'exact': {
|
|
2627
|
-
const intervals = new Map();
|
|
2628
|
-
const viewportTimes = getViewportTicks(scale, params.startTime, params.endTime);
|
|
2629
|
-
for (let i = 0; i < viewportTimes.length - 1; i++) {
|
|
2630
|
-
intervals.set(viewportTimes[i], viewportTimes[i + 1]);
|
|
2631
|
-
}
|
|
2632
|
-
return { intervals, numIntervals: intervals.size };
|
|
2633
|
-
}
|
|
2634
|
-
case 'approximate': {
|
|
2635
|
-
// Rather than computing all dates (and labels) to obtain exact dimensions,
|
|
2636
|
-
// heuristically sample a subset of dates for better performance.
|
|
2637
|
-
// Assumption is that in many usecases, label widths have small variance.
|
|
2638
|
-
// Even if our estimation is off and cause a label trunction, users can manually zoom in to see the full label.
|
|
2639
|
-
const { startTime, endTime, numSections, numIntervalsPerSection } = params;
|
|
2640
|
-
const intervals = sampleIntervals(scale, startTime, endTime, numSections, numIntervalsPerSection);
|
|
2641
|
-
// Estimate real number of intervals
|
|
2642
|
-
const intervalStartTimes = [...intervals.keys()];
|
|
2643
|
-
const avgTimePerInterval = intervalStartTimes.reduce((sum, prevTime) => {
|
|
2644
|
-
return sum + (intervals.get(prevTime) - Number(prevTime));
|
|
2645
|
-
}, 0) / intervalStartTimes.length;
|
|
2646
|
-
const estNumIntervals = (endTime - startTime) / avgTimePerInterval;
|
|
2647
|
-
return { intervals, numIntervals: estNumIntervals };
|
|
2648
|
-
}
|
|
2649
|
-
default: {
|
|
2650
|
-
const _exhaustiveCheck = type;
|
|
2651
|
-
return _exhaustiveCheck;
|
|
2652
|
-
}
|
|
2653
|
-
}
|
|
2654
|
-
};
|
|
2655
|
-
/**
|
|
2656
|
-
* Gets the zoom order characteristics based on the given time intervals, and widths of those intervals.
|
|
2657
|
-
* @param getTextDimensions The text measurement function.
|
|
2658
|
-
* @param intervalPaddingStart The interval padding start.
|
|
2659
|
-
* @param intervalPaddingEnd The interval padding end.
|
|
2660
|
-
* @param minIntervalWidth The minimum interval width.
|
|
2661
|
-
* @param axisFont The font.
|
|
2662
|
-
* @param zoomOrder The zoom order.
|
|
2663
|
-
* @param samplingStrategy The sampling strategy to use to retrieve intervals.
|
|
2664
|
-
* @returns The min length factor for each scale in the zoom order, and (an estimate of) the max number of intervals in the time axis across all scales in the zoom order.
|
|
2665
|
-
*/
|
|
2666
|
-
const getZoomOrderCharacteristics = (getTextDimensions, intervalPaddingStart, intervalPaddingEnd, minIntervalWidth, axisFont, zoomOrder, samplingStrategy) => {
|
|
2667
|
-
const intervalPadding = intervalPaddingStart + intervalPaddingEnd;
|
|
2668
|
-
const zoomLevelIntervals = zoomOrder.map((scale) => getTimeAxisIntervals(scale, samplingStrategy));
|
|
2669
|
-
const maxNumIntervals = Math.max(...zoomLevelIntervals.map(({ numIntervals }) => numIntervals));
|
|
2670
|
-
const zoomOrderMinLengthFactor = zoomLevelIntervals.map(({ intervals }, i) => {
|
|
2671
|
-
const scale = zoomOrder[i];
|
|
2672
|
-
const prevTimes = [...intervals.keys()];
|
|
2673
|
-
const labels = prevTimes.map((prevTime) => getTimeLabel(scale, intervals.get(prevTime)));
|
|
2674
|
-
const intervalDurations = prevTimes.map((prevTime) => intervals.get(prevTime) - prevTime);
|
|
2675
|
-
const intervalLabelDimensions = getBatchTextDimensions(getTextDimensions, labels, axisFont);
|
|
2676
|
-
const minLengthFactor = Math.min(...intervalDurations.map((duration, i) => {
|
|
2677
|
-
const contentWidth = Math.max(minIntervalWidth, intervalLabelDimensions[i].width + intervalPadding);
|
|
2678
|
-
return duration / contentWidth;
|
|
2679
|
-
}));
|
|
2680
|
-
return minLengthFactor;
|
|
2681
|
-
});
|
|
2682
|
-
return {
|
|
2683
|
-
zoomOrderMinLengthFactor,
|
|
2684
|
-
maxNumIntervals
|
|
2685
|
-
};
|
|
2686
|
-
};
|
|
2687
|
-
/**
|
|
2688
|
-
* Gets the resolved viewport range given the range constraints.
|
|
2689
|
-
* @param viewportDuration The viewport duration.
|
|
2690
|
-
* @param startTime The start time.
|
|
2691
|
-
* @param endTime The end time.
|
|
2692
|
-
* @param viewportStartTime The viewport start time.
|
|
2693
|
-
* @param viewportEndTime The viewport end time.
|
|
2694
|
-
* @returns The resolved viewport range.
|
|
2695
|
-
*/
|
|
2696
|
-
const getResolvedViewport = (viewportDuration, startTime, endTime, viewportStartTime, viewportEndTime) => {
|
|
2697
|
-
if (viewportStartTime !== undefined && viewportEndTime !== undefined) {
|
|
2698
|
-
return { viewportStartTime, viewportEndTime };
|
|
2699
|
-
}
|
|
2700
|
-
if (viewportStartTime !== undefined && viewportEndTime === undefined) {
|
|
2701
|
-
return {
|
|
2702
|
-
viewportStartTime,
|
|
2703
|
-
viewportEndTime: Math.min(endTime, viewportStartTime + viewportDuration)
|
|
2704
|
-
};
|
|
2705
|
-
}
|
|
2706
|
-
if (viewportStartTime === undefined && viewportEndTime !== undefined) {
|
|
2707
|
-
return {
|
|
2708
|
-
viewportStartTime: Math.max(startTime, viewportEndTime - viewportDuration),
|
|
2709
|
-
viewportEndTime
|
|
2710
|
-
};
|
|
2711
|
-
}
|
|
2712
|
-
return {
|
|
2713
|
-
viewportStartTime: startTime,
|
|
2714
|
-
viewportEndTime: Math.min(endTime, startTime + viewportDuration)
|
|
2715
|
-
};
|
|
2716
|
-
};
|
|
2717
|
-
/**
|
|
2718
|
-
* Gets the formatted string for the given time in the given scale.
|
|
2719
|
-
* This is used for the time axis interval labels.
|
|
2720
|
-
* @param scale The time scale.
|
|
2721
|
-
* @param time The time.
|
|
2722
|
-
* @returns The formatted string.
|
|
2723
|
-
*/
|
|
2724
|
-
const getTimeLabel = (scale, time) => scale.formatter(new Date(time).toISOString());
|
|
2725
|
-
/**
|
|
2726
|
-
* Gets the viewport axis ticks and labels for the given scale.
|
|
2727
|
-
* @param scale The time scale.
|
|
2728
|
-
* @param viewportStartTime The viewport start time.
|
|
2729
|
-
* @param viewportEndTime The viewport end time.
|
|
2730
|
-
* @returns The ticks and labels.
|
|
2731
|
-
*/
|
|
2732
|
-
const getViewportLabelsTicks = (scale, viewportStartTime, viewportEndTime) => {
|
|
2733
|
-
// ticks.length >= 2 always, because there's always the first and last tick.
|
|
2734
|
-
const ticks = getViewportTicks(scale, viewportStartTime, viewportEndTime);
|
|
2735
|
-
// We don't need the label of the last tick.
|
|
2736
|
-
const labels = ticks.slice(0, ticks.length - 1).map((t) => getTimeLabel(scale, t));
|
|
2737
|
-
return { ticks, labels };
|
|
2738
|
-
};
|
|
2739
|
-
/**
|
|
2740
|
-
* Gets the time axis layout.
|
|
2741
|
-
* @param getTextDimensions The text measurement function.
|
|
2742
|
-
* @param labelPaddingStart The interval label padding start.
|
|
2743
|
-
* @param labelPaddingEnd The interval label padding end.
|
|
2744
|
-
* @param font The font.
|
|
2745
|
-
* @param labelPosition The label position.
|
|
2746
|
-
* @param ticks The ticks (in time).
|
|
2747
|
-
* @param gridTicks The subset of visible ticks that mark the vertical tick lines (in time).
|
|
2748
|
-
* @param labels The interval labels.
|
|
2749
|
-
* @param startTime The start time.
|
|
2750
|
-
* @param endTime The end time.
|
|
2751
|
-
* @param viewportStartTime The viewport start time.
|
|
2752
|
-
* @param viewportEndTime The viewport end time.
|
|
2753
|
-
* @param width The viewport width.
|
|
2754
|
-
* @param isRTL Whether the reading direction is rtl.
|
|
2755
|
-
* @returns The time axis layout.
|
|
2756
|
-
*/
|
|
2757
|
-
const getTimeAxisLayout = (getTextDimensions, labelPaddingStart, labelPaddingEnd, font, labelPosition = 'start', ticks, gridTicks, labels, startTime, endTime, viewportStartTime, viewportEndTime, width, isRTL) => {
|
|
2758
|
-
const intervalPadding = labelPaddingStart + labelPaddingEnd;
|
|
2759
|
-
const vs = viewportStartTime;
|
|
2760
|
-
const ve = viewportEndTime;
|
|
2761
|
-
const labelTicks = ticks.slice(0, ticks.length - 1);
|
|
2762
|
-
const gridTicksPos = gridTicks.map((t) => getTimePosition(t, vs, ve, width, isRTL));
|
|
2763
|
-
const ticksPos = ticks.map((t) => getTimePosition(t, vs, ve, width, isRTL));
|
|
2764
|
-
const intervalWidths = ticksPos
|
|
2765
|
-
.slice(1)
|
|
2766
|
-
.map((p, i) => (isRTL ? ticksPos[i] - p : p - ticksPos[i]));
|
|
2767
|
-
// Labels that start before the startTime or ends after the endTime need to be truncated
|
|
2768
|
-
const isIntervalStartTruncated = ticks[0] < startTime;
|
|
2769
|
-
if (isIntervalStartTruncated) {
|
|
2770
|
-
ticksPos[0] = 0;
|
|
2771
|
-
intervalWidths[0] = ticksPos[1];
|
|
2772
|
-
}
|
|
2773
|
-
if (ticks[ticks.length - 1] > endTime) {
|
|
2774
|
-
ticksPos[ticksPos.length - 1] = isRTL ? 0 : width;
|
|
2775
|
-
intervalWidths[intervalWidths.length - 1] = isRTL
|
|
2776
|
-
? ticksPos[ticksPos.length - 2] - ticksPos[ticksPos.length - 1]
|
|
2777
|
-
: ticksPos[ticksPos.length - 1] - ticksPos[ticksPos.length - 2];
|
|
2778
|
-
}
|
|
2779
|
-
const labelPositions = ticksPos
|
|
2780
|
-
.slice(0, ticksPos.length - 1)
|
|
2781
|
-
.map((p, i) => (isRTL ? p - intervalWidths[i] : p));
|
|
2782
|
-
const isLabelTruncated = getBatchTextDimensions(getTextDimensions, labels, font).map(({ width }, i) => Math.floor(width) - Math.floor(intervalWidths[i] - intervalPadding) > 0);
|
|
2783
|
-
return {
|
|
2784
|
-
font,
|
|
2785
|
-
labelPosition,
|
|
2786
|
-
labels,
|
|
2787
|
-
labelTicks,
|
|
2788
|
-
labelPositions,
|
|
2789
|
-
isLabelTruncated,
|
|
2790
|
-
isIntervalStartTruncated,
|
|
2791
|
-
intervalWidths,
|
|
2792
|
-
gridTicksPos,
|
|
2793
|
-
isRTL
|
|
2794
|
-
};
|
|
2795
|
-
};
|
|
2796
|
-
/**
|
|
2797
|
-
* Gets the time axes layout for the viewport.
|
|
2798
|
-
* @param getTextDimensions The text measurement function.
|
|
2799
|
-
* @param labelPaddingStart The interval label padding start.
|
|
2800
|
-
* @param labelPaddingEnd The interval label padding end.
|
|
2801
|
-
* @param majorAxisFont The major axis font.
|
|
2802
|
-
* @param minorAxisFont The minor axis font.
|
|
2803
|
-
* @param startTime The start time.
|
|
2804
|
-
* @param endTime The end time.
|
|
2805
|
-
* @param viewportStartTime The viewport start time.
|
|
2806
|
-
* @param viewportEndTime The viewport end time.
|
|
2807
|
-
* @param width The viewport width.
|
|
2808
|
-
* @param isRTL Whether the reading direction is rtl.
|
|
2809
|
-
* @param minorAxisScale The minor axis scale.
|
|
2810
|
-
* @param majorAxisScale The major axis scale.
|
|
2811
|
-
* @returns The time axes layout for the viewport.
|
|
2812
|
-
*/
|
|
2813
|
-
const getTimeAxesViewportLayout = (getTextDimensions, labelPaddingStart, labelPaddingEnd, majorAxisFont, minorAxisFont, startTime, endTime, viewportStartTime, viewportEndTime, width, isRTL, minorAxisScale, majorAxisScale) => {
|
|
2814
|
-
const majorAxisLabelsTicks = majorAxisScale
|
|
2815
|
-
? getViewportLabelsTicks(majorAxisScale, viewportStartTime, viewportEndTime)
|
|
2816
|
-
: { ticks: [], labels: [] };
|
|
2817
|
-
const minorAxisLabelsTicks = getViewportLabelsTicks(minorAxisScale, viewportStartTime, viewportEndTime);
|
|
2818
|
-
// Determine whether to render secondary major gridlines
|
|
2819
|
-
// If major dates is a subset of minor dates, then the two grids line up.
|
|
2820
|
-
// Don't render the minor dates at overlap
|
|
2821
|
-
// (due to opacity, minor line would show through major line otherwise).
|
|
2822
|
-
// Otherwise the major and minor axis do not "line up"
|
|
2823
|
-
// (e.g. months and weeks scale together). Render minor lines only.
|
|
2824
|
-
const { ticks: majorTicks, labels: majorLabels } = majorAxisLabelsTicks;
|
|
2825
|
-
const { ticks: minorTicks, labels: minorLabels } = minorAxisLabelsTicks;
|
|
2826
|
-
const majorTicksSet = new Set(majorTicks);
|
|
2827
|
-
const minorTicksSet = new Set(minorTicks);
|
|
2828
|
-
// only consider major dates that are in range (e.g. first and/or last ticks may be out of range)
|
|
2829
|
-
const showMajorTicks = majorTicks.filter((t) => t > viewportStartTime && t < viewportEndTime && !minorTicksSet.has(t))
|
|
2830
|
-
.length === 0;
|
|
2831
|
-
const minorGridTicks = showMajorTicks
|
|
2832
|
-
? minorTicks.filter((t) => !majorTicksSet.has(t))
|
|
2833
|
-
: minorTicks;
|
|
2834
|
-
const majorAxisLayout = majorAxisScale &&
|
|
2835
|
-
getTimeAxisLayout(getTextDimensions, labelPaddingStart, labelPaddingEnd, majorAxisFont, majorAxisScale.labelPosition, majorTicks, majorTicks, majorLabels, startTime, endTime, viewportStartTime, viewportEndTime, width, isRTL);
|
|
2836
|
-
const minorAxisLayout = getTimeAxisLayout(getTextDimensions, labelPaddingStart, labelPaddingEnd, minorAxisFont, minorAxisScale.labelPosition, minorTicks, minorGridTicks, minorLabels, startTime, endTime, viewportStartTime, viewportEndTime, width, isRTL);
|
|
2837
|
-
return {
|
|
2838
|
-
minorAxisLayout: {
|
|
2839
|
-
majorGridTicksPos: showMajorTicks && majorAxisLayout ? majorAxisLayout.gridTicksPos : undefined,
|
|
2840
|
-
minorGridTicksPos: minorAxisLayout.gridTicksPos,
|
|
2841
|
-
variant: 'minor',
|
|
2842
|
-
...minorAxisLayout
|
|
2843
|
-
},
|
|
2844
|
-
majorAxisLayout: majorAxisLayout && {
|
|
2845
|
-
majorGridTicksPos: majorAxisLayout.gridTicksPos,
|
|
2846
|
-
minorGridTicksPos: undefined,
|
|
2847
|
-
variant: 'major',
|
|
2848
|
-
...majorAxisLayout
|
|
2849
|
-
}
|
|
2850
|
-
};
|
|
2851
|
-
};
|
|
2852
|
-
/**
|
|
2853
|
-
* Gets the time axes zoom parameters.
|
|
2854
|
-
* @param getTextDimensions The text measurement function.
|
|
2855
|
-
* @param labelPaddingStart The interval label padding start.
|
|
2856
|
-
* @param labelPaddingEnd The interval label padding end.
|
|
2857
|
-
* @param labelMinWidth The interval label min width.
|
|
2858
|
-
* @param minorAxisFont The minor axis font.
|
|
2859
|
-
* @param startTime The start time.
|
|
2860
|
-
* @param endTime The end time.
|
|
2861
|
-
* @param minorAxisZoomOrder The minor axis zoom order.
|
|
2862
|
-
* @returns The time axes zoom parameters.
|
|
2863
|
-
*/
|
|
2864
|
-
const getTimeAxesZoomParameters = (getTextDimensions, labelPaddingStart, labelPaddingEnd, labelMinWidth, minorAxisFont, startTime, endTime, minorAxisZoomOrder) => {
|
|
2865
|
-
const { zoomOrderMinLengthFactor, maxNumIntervals } = getZoomOrderCharacteristics(getTextDimensions, labelPaddingStart, labelPaddingEnd, labelMinWidth, minorAxisFont, minorAxisZoomOrder,
|
|
2866
|
-
// 4 sections and 10 interval sections is arbitrary, which samples some labels at every quarter.
|
|
2867
|
-
// This is more than enough for the current default scales and labels because they're very equally spaced.
|
|
2868
|
-
// but this may not work well with weird custom scales such as reptitions of e.g. [3 weeks, 7 days, 2 months]
|
|
2869
|
-
// for a span of 1 year, in which case we may only see weeks and months in our sample, but not days,
|
|
2870
|
-
// and we underestimate the content lengths.
|
|
2871
|
-
// But even then, users may still be able to zoom in sufficiently to see everything they need.
|
|
2872
|
-
// If it turns out this doesn't work well for some common cases, we can bump these params up
|
|
2873
|
-
// to cover more intervals in the future.
|
|
2874
|
-
{
|
|
2875
|
-
type: 'approximate',
|
|
2876
|
-
params: { numSections: 4, numIntervalsPerSection: 10, startTime, endTime }
|
|
2877
|
-
});
|
|
2878
|
-
const getZoomOrderViewDurationThresholds = (width) => zoomOrderMinLengthFactor.map((l) => width * l);
|
|
2879
|
-
const minZoomViewportDuration = (endTime - startTime) / maxNumIntervals;
|
|
2880
|
-
const maxZoomViewportDuration = endTime - startTime;
|
|
2881
|
-
return {
|
|
2882
|
-
getZoomOrderViewDurationThresholds,
|
|
2883
|
-
minorAxisZoomOrder,
|
|
2884
|
-
minZoomViewportDuration,
|
|
2885
|
-
maxZoomViewportDuration,
|
|
2886
|
-
startTime,
|
|
2887
|
-
endTime
|
|
2888
|
-
};
|
|
2889
|
-
};
|
|
2890
|
-
/**
|
|
2891
|
-
* Returns a function that given the viewport width, returns the resolved time axes layout for the given viewport.
|
|
2892
|
-
* @param getTextDimensions The text measurement function.
|
|
2893
|
-
* @param labelPaddingStart The interval label padding start.
|
|
2894
|
-
* @param labelPaddingEnd The interval label padding end.
|
|
2895
|
-
* @param majorAxisFont The major axis font.
|
|
2896
|
-
* @param minorAxisFont The minor axis font.
|
|
2897
|
-
* @param getZoomOrderViewDurationThresholds A function that given the viewport width, returns the zoom order viewport duration thresholds.
|
|
2898
|
-
* @param axisPosition The axis position.
|
|
2899
|
-
* @param startTime The start time.
|
|
2900
|
-
* @param endTime The end time.
|
|
2901
|
-
* @param isRTL Whether the reading direction is rtl.
|
|
2902
|
-
* @param resolvedMinorAxisProps The resolved minor axis props.
|
|
2903
|
-
* @param resolvedMajorAxisProps The resolved major axis props.
|
|
2904
|
-
* @param viewportStartTime The viewport start time.
|
|
2905
|
-
* @param viewportEndTime The viewport end time.
|
|
2906
|
-
* @returns A function that given the viewport width, returns the resolved time axes layout for the given viewport.
|
|
2907
|
-
*/
|
|
2908
|
-
const getResolvedTimeAxesLayout = (getTextDimensions, labelPaddingStart, labelPaddingEnd, majorAxisFont, minorAxisFont, getZoomOrderViewDurationThresholds, axisPosition, startTime, endTime, isRTL, resolvedMinorAxisProps, resolvedMajorAxisProps, viewportStartTime, viewportEndTime) => {
|
|
2909
|
-
return (width) => {
|
|
2910
|
-
const { zoomOrder, zoomOrderIndex } = resolvedMinorAxisProps;
|
|
2911
|
-
const zoomOrderViewDurationThresholds = getZoomOrderViewDurationThresholds(width);
|
|
2912
|
-
const { viewportStartTime: resolvedViewportStartTime, viewportEndTime: resolvedViewportEndTime } = getResolvedViewport(zoomOrderViewDurationThresholds[zoomOrderIndex], startTime, endTime, viewportStartTime, viewportEndTime);
|
|
2913
|
-
const { majorAxisLayout, minorAxisLayout } = getTimeAxesViewportLayout(getTextDimensions, labelPaddingStart, labelPaddingEnd, majorAxisFont, minorAxisFont, startTime, endTime, resolvedViewportStartTime, resolvedViewportEndTime, width, isRTL, zoomOrder[zoomOrderIndex], resolvedMajorAxisProps &&
|
|
2914
|
-
resolvedMajorAxisProps.zoomOrder[resolvedMajorAxisProps.zoomOrderIndex]);
|
|
2915
|
-
return {
|
|
2916
|
-
position: axisPosition,
|
|
2917
|
-
startTime,
|
|
2918
|
-
endTime,
|
|
2919
|
-
viewportStartTime: resolvedViewportStartTime,
|
|
2920
|
-
viewportEndTime: resolvedViewportEndTime,
|
|
2921
|
-
width,
|
|
2922
|
-
majorAxis: majorAxisLayout && { width, ...resolvedMajorAxisProps, ...majorAxisLayout },
|
|
2923
|
-
minorAxis: { width, ...resolvedMinorAxisProps, ...minorAxisLayout }
|
|
2924
|
-
};
|
|
2925
|
-
};
|
|
2926
|
-
};
|
|
2927
|
-
|
|
2928
|
-
/**
|
|
2929
|
-
* @license
|
|
2930
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
2931
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
2932
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
2933
|
-
* @ignore
|
|
2934
|
-
*/
|
|
2935
|
-
/**
|
|
2936
|
-
* Returns whether the given configration is valid.
|
|
2937
|
-
* @param startTime The start time.
|
|
2938
|
-
* @param endTime The end time.
|
|
2939
|
-
* @param viewportStartTime The viewport start time.
|
|
2940
|
-
* @param viewportEndTime The viewport end time.
|
|
2941
|
-
* @returns Whether the given configuration is valid.
|
|
2942
|
-
*/
|
|
2943
|
-
const hasValidTimeConfig = (startTime, endTime, viewportStartTime, viewportEndTime) => {
|
|
2944
|
-
const hasValidStartAndEnd = endTime > startTime;
|
|
2945
|
-
const hasValidViewport = viewportStartTime !== undefined && viewportEndTime !== undefined
|
|
2946
|
-
? viewportEndTime > viewportStartTime
|
|
2947
|
-
: true;
|
|
2948
|
-
const hasValidViewportStart = viewportStartTime !== undefined
|
|
2949
|
-
? viewportStartTime >= startTime && viewportStartTime < endTime
|
|
2950
|
-
: true;
|
|
2951
|
-
const hasValidViewportEnd = viewportEndTime !== undefined
|
|
2952
|
-
? viewportEndTime > startTime && viewportEndTime <= endTime
|
|
2953
|
-
: true;
|
|
2954
|
-
return hasValidStartAndEnd && hasValidViewport && hasValidViewportStart && hasValidViewportEnd;
|
|
2955
|
-
};
|
|
2956
|
-
/**
|
|
2957
|
-
* Gets the parsed time axis params.
|
|
2958
|
-
* @param start The start date string.
|
|
2959
|
-
* @param end The end date string.
|
|
2960
|
-
* @param viewportStart The viewport start date string.
|
|
2961
|
-
* @param viewportEnd The viewport end date string.
|
|
2962
|
-
* @returns The parsed params.
|
|
2963
|
-
*/
|
|
2964
|
-
const getParsedTimeAxisParams = (start, end, viewportStart, viewportEnd) => {
|
|
2965
|
-
const startTime = parseDate(start);
|
|
2966
|
-
const endTime = parseDate(end);
|
|
2967
|
-
const viewportStartTime = viewportStart ? parseDate(viewportStart) : undefined;
|
|
2968
|
-
const viewportEndTime = viewportEnd ? parseDate(viewportEnd) : undefined;
|
|
2969
|
-
const isValidTimeConfig = hasValidTimeConfig(startTime, endTime, viewportStartTime, viewportEndTime);
|
|
2970
|
-
return { startTime, endTime, viewportStartTime, viewportEndTime, isValidTimeConfig };
|
|
2971
|
-
};
|
|
2972
|
-
|
|
2973
|
-
const timeComponentUnresolvedVars = [
|
|
2974
|
-
{
|
|
2975
|
-
tokenVar: bridgeValues.horizontalTimeAxisHeight,
|
|
2976
|
-
key: 'defaultTimeAxisHeight',
|
|
2977
|
-
cssProp: 'height'
|
|
2978
|
-
},
|
|
2979
|
-
{
|
|
2980
|
-
tokenVar: bridgeValues.horizontalTimeAxisLabelPaddingInlineStart,
|
|
2981
|
-
key: 'timeAxisLabelPaddingInlineStart',
|
|
2982
|
-
cssProp: 'margin-inline-start'
|
|
2983
|
-
},
|
|
2984
|
-
{
|
|
2985
|
-
tokenVar: bridgeValues.horizontalTimeAxisLabelPaddingInlineEnd,
|
|
2986
|
-
key: 'timeAxisLabelPaddingInlineEnd',
|
|
2987
|
-
cssProp: 'margin-inline-end'
|
|
2988
|
-
},
|
|
2989
|
-
{
|
|
2990
|
-
tokenVar: xUnits(12.5),
|
|
2991
|
-
key: 'timeAxisLabelMinWidth',
|
|
2992
|
-
cssProp: 'min-width'
|
|
2993
|
-
},
|
|
2994
|
-
{
|
|
2995
|
-
tokenVar: typographyVars.body.md.fontSize,
|
|
2996
|
-
key: 'majorAxisFontSize',
|
|
2997
|
-
cssProp: 'font-size'
|
|
2998
|
-
},
|
|
2999
|
-
{
|
|
3000
|
-
tokenVar: typographyVars.body.sm.fontSize,
|
|
3001
|
-
key: 'minorAxisFontSize',
|
|
3002
|
-
cssProp: 'margin-block-start'
|
|
3003
|
-
},
|
|
3004
|
-
{
|
|
3005
|
-
tokenVar: typographyVars.body.md.fontWeight.semibold,
|
|
3006
|
-
key: 'majorAxisFontWeight'
|
|
3007
|
-
},
|
|
3008
|
-
{
|
|
3009
|
-
tokenVar: typographyVars.body.sm.fontWeight.regular,
|
|
3010
|
-
key: 'minorAxisFontWeight'
|
|
3011
|
-
}
|
|
3012
|
-
];
|
|
3013
|
-
/**
|
|
3014
|
-
* Gets the resolved time axis related CSS vars.
|
|
3015
|
-
* @param resolvedVars The resolved CSS vars.
|
|
3016
|
-
* @returns The resolved values.
|
|
3017
|
-
*/
|
|
3018
|
-
const getResolvedTimeAxisVars = (resolvedVars) => ({
|
|
3019
|
-
defaultTimeAxisHeight: pxToNumber(resolvedVars['defaultTimeAxisHeight']),
|
|
3020
|
-
timeAxisLabelPaddingInlineStart: pxToNumber(resolvedVars['timeAxisLabelPaddingInlineStart']),
|
|
3021
|
-
timeAxisLabelPaddingInlineEnd: pxToNumber(resolvedVars['timeAxisLabelPaddingInlineEnd']),
|
|
3022
|
-
timeAxisLabelMinWidth: pxToNumber(resolvedVars['timeAxisLabelMinWidth']),
|
|
3023
|
-
majorAxisFont: {
|
|
3024
|
-
fontSize: resolvedVars['majorAxisFontSize'],
|
|
3025
|
-
fontWeight: resolvedVars['majorAxisFontWeight']
|
|
3026
|
-
},
|
|
3027
|
-
minorAxisFont: {
|
|
3028
|
-
fontSize: resolvedVars['minorAxisFontSize'],
|
|
3029
|
-
fontWeight: resolvedVars['minorAxisFontWeight']
|
|
3030
|
-
}
|
|
3031
|
-
});
|
|
3032
|
-
// TODO: Export this from useCssVars? Or make useCssVars output number for px strings?
|
|
3033
|
-
/**
|
|
3034
|
-
* Parses the number from a pixel string.
|
|
3035
|
-
* @param length The pixel string.
|
|
3036
|
-
* @returns The number.
|
|
3037
|
-
*/
|
|
3038
|
-
const pxToNumber = (length) => length === '0' ? 0 : Number(length.substring(0, length.length - 2));
|
|
3039
|
-
|
|
3040
|
-
const ganttUnresolvedVars = [
|
|
3041
|
-
{
|
|
3042
|
-
tokenVar: bridgeValues$1.rowLabelPaddingInlineStart,
|
|
3043
|
-
key: 'rowLabelPaddingInlineStart',
|
|
3044
|
-
cssProp: 'padding-inline-start'
|
|
3045
|
-
},
|
|
3046
|
-
{
|
|
3047
|
-
tokenVar: bridgeValues$1.rowLabelPaddingInlineStart,
|
|
3048
|
-
key: 'rowLabelPaddingInlineEnd',
|
|
3049
|
-
cssProp: 'padding-inline-end'
|
|
3050
|
-
},
|
|
3051
|
-
{
|
|
3052
|
-
tokenVar: xUnits(3),
|
|
3053
|
-
key: 'rowPaddingTop',
|
|
3054
|
-
cssProp: 'padding-top'
|
|
3055
|
-
},
|
|
3056
|
-
{
|
|
3057
|
-
tokenVar: xUnits(3),
|
|
3058
|
-
key: 'rowPaddingBottom',
|
|
3059
|
-
cssProp: 'padding-bottom'
|
|
3060
|
-
},
|
|
3061
|
-
{
|
|
3062
|
-
tokenVar: xUnits(6),
|
|
3063
|
-
key: 'taskHeight',
|
|
3064
|
-
cssProp: 'min-height'
|
|
3065
|
-
},
|
|
3066
|
-
{
|
|
3067
|
-
tokenVar: xUnits(1),
|
|
3068
|
-
key: 'taskBorderRadius',
|
|
3069
|
-
cssProp: 'border-radius'
|
|
3070
|
-
},
|
|
3071
|
-
{
|
|
3072
|
-
tokenVar: bridgeValues$1.taskBgColor,
|
|
3073
|
-
key: 'taskBgColor',
|
|
3074
|
-
cssProp: 'background-color'
|
|
3075
|
-
},
|
|
3076
|
-
{
|
|
3077
|
-
tokenVar: bridgeValues$1.taskBorderColor,
|
|
3078
|
-
key: 'taskBorderColor',
|
|
3079
|
-
cssProp: 'border-color'
|
|
3080
|
-
},
|
|
3081
|
-
{
|
|
3082
|
-
tokenVar: bridgeValues$1.taskEffectBorderColor,
|
|
3083
|
-
key: 'taskEffectBorderColor',
|
|
3084
|
-
cssProp: 'outline-color'
|
|
3085
|
-
},
|
|
3086
|
-
{
|
|
3087
|
-
tokenVar: baseVars.boxShadow.md,
|
|
3088
|
-
key: 'taskEffectBoxShadow',
|
|
3089
|
-
cssProp: 'box-shadow'
|
|
3090
|
-
}
|
|
3091
|
-
];
|
|
3092
|
-
/**
|
|
3093
|
-
* Parses a CSS box-shadow string.
|
|
3094
|
-
* @param boxShadow A CSS box-shadow string, of the form "color offsetX offsetY blur spread".
|
|
3095
|
-
* @returns The components of the box-shadow.
|
|
3096
|
-
*/
|
|
3097
|
-
const parseBoxShadow = (boxShadow) => {
|
|
3098
|
-
// boxShadow: "color offsetX offsetY blur spread"
|
|
3099
|
-
// color may have spaces e.g. rgb(0, 0, 0, 0.2)
|
|
3100
|
-
const [_, shadowBlur, shadowOffsetY, shadowOffsetX, ...rest] = boxShadow.split(' ').reverse();
|
|
3101
|
-
const shadowColor = rest.reverse().join(' ');
|
|
3102
|
-
return {
|
|
3103
|
-
shadowColor,
|
|
3104
|
-
shadowOffsetX: pxToNumber(shadowOffsetX ?? '0'),
|
|
3105
|
-
shadowOffsetY: pxToNumber(shadowOffsetY ?? '0'),
|
|
3106
|
-
shadowBlur: pxToNumber(shadowBlur ?? '0')
|
|
3107
|
-
};
|
|
3108
|
-
};
|
|
3109
|
-
/**
|
|
3110
|
-
* Gets the resolved row axis related CSS vars.
|
|
3111
|
-
* @param resolvedVars The resolved CSS vars.
|
|
3112
|
-
* @returns The resolved values.
|
|
3113
|
-
*/
|
|
3114
|
-
const getResolvedRowAxisVars = (resolvedVars) => ({
|
|
3115
|
-
rowLabelPaddingInlineStart: pxToNumber(resolvedVars['rowLabelPaddingInlineStart']),
|
|
3116
|
-
rowLabelPaddingInlineEnd: pxToNumber(resolvedVars['rowLabelPaddingInlineEnd'])
|
|
3117
|
-
});
|
|
3118
|
-
/**
|
|
3119
|
-
* Gets the resolved row related CSS vars.
|
|
3120
|
-
* @param resolvedVars The resolved CSS vars.
|
|
3121
|
-
* @returns The resolved values.
|
|
3122
|
-
*/
|
|
3123
|
-
const getResolvedRowVars = (resolvedVars) => ({
|
|
3124
|
-
rowPaddingTop: pxToNumber(resolvedVars['rowPaddingTop']),
|
|
3125
|
-
rowPaddingBottom: pxToNumber(resolvedVars['rowPaddingBottom'])
|
|
3126
|
-
});
|
|
3127
|
-
/**
|
|
3128
|
-
* Gets the resolved task related CSS vars.
|
|
3129
|
-
* @param resolvedVars The resolved CSS vars.
|
|
3130
|
-
* @returns The resolved values.
|
|
3131
|
-
*/
|
|
3132
|
-
const getResolvedTaskVars = (resolvedVars) => ({
|
|
3133
|
-
taskHeight: pxToNumber(resolvedVars['taskHeight']),
|
|
3134
|
-
taskBorderRadius: resolvedVars['taskBorderRadius'],
|
|
3135
|
-
taskBgColor: resolvedVars['taskBgColor'],
|
|
3136
|
-
taskBorderColor: resolvedVars['taskBorderColor'],
|
|
3137
|
-
taskEffectBorderColor: resolvedVars['taskEffectBorderColor'],
|
|
3138
|
-
taskEffectBoxShadow: parseBoxShadow(resolvedVars['taskEffectBoxShadow'])
|
|
3139
|
-
});
|
|
3140
|
-
|
|
3141
|
-
/**
|
|
3142
|
-
* Gets the pan zoom canvas layout given the time axes layout.
|
|
3143
|
-
* @param timeAxesLayout The time axes layout.
|
|
3144
|
-
* @returns The pan zoom canvas layout.
|
|
3145
|
-
*/
|
|
3146
|
-
const getPanZoomCanvasLayout = (timeAxesLayout) => {
|
|
3147
|
-
const layout = {
|
|
3148
|
-
top: {
|
|
3149
|
-
overlayControlsPosition: 'topEnd',
|
|
3150
|
-
verticalControlTopGap: timeAxesLayout.height,
|
|
3151
|
-
verticalControlBottomGap: '0'
|
|
3152
|
-
},
|
|
3153
|
-
bottom: {
|
|
3154
|
-
overlayControlsPosition: 'bottomEnd',
|
|
3155
|
-
verticalControlTopGap: '0',
|
|
3156
|
-
verticalControlBottomGap: timeAxesLayout.height
|
|
3157
|
-
}
|
|
3158
|
-
};
|
|
3159
|
-
return layout[timeAxesLayout.position];
|
|
3160
|
-
};
|
|
3161
|
-
|
|
3162
|
-
/**
|
|
3163
|
-
* Gets the row axis layout.
|
|
3164
|
-
* @param timeAxesLayout The time axes layout.
|
|
3165
|
-
* @param rowAxisProps The row axis props.
|
|
3166
|
-
* @returns
|
|
3167
|
-
*/
|
|
3168
|
-
const getWithRowAxisLayout = (timeAxesLayout, rowAxisProps) => {
|
|
3169
|
-
const horiScrollbarHeight = `${xUnits(1)} + ${bridgeValues.horizontalScrollbarHeight}`;
|
|
3170
|
-
const generalLayout = {
|
|
3171
|
-
top: {
|
|
3172
|
-
rowAxisTopGap: timeAxesLayout.height,
|
|
3173
|
-
rowAxisBottomGap: `calc(${horiScrollbarHeight})`
|
|
3174
|
-
},
|
|
3175
|
-
bottom: {
|
|
3176
|
-
rowAxisTopGap: '0',
|
|
3177
|
-
rowAxisBottomGap: `calc(${timeAxesLayout.height} + ${horiScrollbarHeight})`
|
|
3178
|
-
}
|
|
3179
|
-
};
|
|
3180
|
-
const resolvedWidth = getResolvedLength(rowAxisProps.width);
|
|
3181
|
-
const resolvedMaxWidth = getResolvedLength(rowAxisProps.maxWidth);
|
|
3182
|
-
return {
|
|
3183
|
-
...generalLayout[timeAxesLayout.position],
|
|
3184
|
-
resolvedRowAxisWidth: resolvedWidth,
|
|
3185
|
-
resolvedRowAxisMaxWidth: resolvedMaxWidth,
|
|
3186
|
-
label: rowAxisProps.label
|
|
3187
|
-
};
|
|
3188
|
-
};
|
|
3189
|
-
/**
|
|
3190
|
-
* Gets the parsed length given the values that the row axis accepts.
|
|
3191
|
-
* @param length The length values that the row axis accepts.
|
|
3192
|
-
* @returns The parsed length.
|
|
3193
|
-
*/
|
|
3194
|
-
const getResolvedLength = (length) => {
|
|
3195
|
-
if (length.endsWith('px')) {
|
|
3196
|
-
return {
|
|
3197
|
-
value: Number(length.substring(0, length.length - 2)),
|
|
3198
|
-
suffix: 'px'
|
|
3199
|
-
};
|
|
3200
|
-
}
|
|
3201
|
-
if (length.endsWith('%')) {
|
|
3202
|
-
return {
|
|
3203
|
-
value: Number(length.substring(0, length.length - 1)),
|
|
3204
|
-
suffix: '%'
|
|
3205
|
-
};
|
|
3206
|
-
}
|
|
3207
|
-
// length is 'max-content' for width and 'none' for max-width
|
|
3208
|
-
return {
|
|
3209
|
-
value: Infinity,
|
|
3210
|
-
suffix: undefined
|
|
3211
|
-
};
|
|
3212
|
-
};
|
|
3213
|
-
|
|
3214
|
-
/**
|
|
3215
|
-
* @license
|
|
3216
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
3217
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
3218
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
3219
|
-
* @ignore
|
|
3220
|
-
*/
|
|
3221
|
-
/**
|
|
3222
|
-
* Gets the resolved horizontal scrollbar layout.
|
|
3223
|
-
* @param min The range min.
|
|
3224
|
-
* @param max The range max.
|
|
3225
|
-
* @param globalMin The global min.
|
|
3226
|
-
* @param globalMax The global max.
|
|
3227
|
-
* @param isRTL Whether the reading direction is rtl.
|
|
3228
|
-
* @returns The resolved horizontal scrollbar layout.
|
|
3229
|
-
*/
|
|
3230
|
-
const getResolvedHorizontalScrollbarLayout = (min, max, globalMin, globalMax, isRTL) => {
|
|
3231
|
-
return (width) => {
|
|
3232
|
-
const localRange = max - min;
|
|
3233
|
-
const globalRange = globalMax - globalMin;
|
|
3234
|
-
const thumbWidth = (width * localRange) / globalRange;
|
|
3235
|
-
const thumbStartOffset = (width * (min - globalMin)) / globalRange;
|
|
3236
|
-
const logicalThumbLeft = isRTL ? width - thumbStartOffset - thumbWidth : thumbStartOffset;
|
|
3237
|
-
const thumbLeft = isRTL ? undefined : thumbStartOffset;
|
|
3238
|
-
const thumbRight = isRTL ? thumbStartOffset : undefined;
|
|
3239
|
-
const draggableRegion = {
|
|
3240
|
-
xMin: logicalThumbLeft,
|
|
3241
|
-
xMax: logicalThumbLeft + thumbWidth,
|
|
3242
|
-
yMin: -Infinity,
|
|
3243
|
-
yMax: Infinity
|
|
3244
|
-
};
|
|
3245
|
-
const getNewRange = (newThumbLeft) => {
|
|
3246
|
-
const p = isRTL ? Math.max(0, width - newThumbLeft - thumbWidth) : newThumbLeft;
|
|
3247
|
-
const newMin = Math.min(globalMin + (p / width) * globalRange, globalMax - localRange);
|
|
3248
|
-
const newMax = newMin + localRange;
|
|
3249
|
-
return { newMin, newMax };
|
|
3250
|
-
};
|
|
3251
|
-
return {
|
|
3252
|
-
thumbWidth,
|
|
3253
|
-
thumbLeft,
|
|
3254
|
-
thumbRight,
|
|
3255
|
-
draggableRegion,
|
|
3256
|
-
getNewRange
|
|
3257
|
-
};
|
|
3258
|
-
};
|
|
3259
|
-
};
|
|
3260
|
-
/**
|
|
3261
|
-
* Gets the resolved vertical scrollbar layout.
|
|
3262
|
-
* @param min The range min.
|
|
3263
|
-
* @param max The range max (if any).
|
|
3264
|
-
* @param globalMin The global min.
|
|
3265
|
-
* @param globalMax The global max.
|
|
3266
|
-
* @returns The resolved vertical scrollbar layout.
|
|
3267
|
-
*/
|
|
3268
|
-
const getResolvedVerticalScrollbarLayout = (min, max, globalMin, globalMax) => {
|
|
3269
|
-
return (height) => {
|
|
3270
|
-
// It's possible for globalRange to be smaller than localRange
|
|
3271
|
-
// due to the component being taller than the height the data occupies
|
|
3272
|
-
// e.g. tall Gantt with 1 row
|
|
3273
|
-
// So throughout this code we make sure to clamp thumb dimensions and ranges
|
|
3274
|
-
const localRange = (max ?? height + min) - min;
|
|
3275
|
-
const globalRange = globalMax - globalMin;
|
|
3276
|
-
const thumbHeight = Math.min(height, (height * localRange) / globalRange);
|
|
3277
|
-
const thumbTop = Math.max(0, (height * (min - globalMin)) / globalRange);
|
|
3278
|
-
const draggableRegion = {
|
|
3279
|
-
xMin: -Infinity,
|
|
3280
|
-
xMax: Infinity,
|
|
3281
|
-
yMin: thumbTop,
|
|
3282
|
-
yMax: thumbTop + thumbHeight
|
|
3283
|
-
};
|
|
3284
|
-
const getNewRange = (newThumbTop) => {
|
|
3285
|
-
const newMin = Math.max(0, Math.min(globalMin + (newThumbTop / height) * globalRange, globalMax - localRange));
|
|
3286
|
-
const newMax = newMin + localRange;
|
|
3287
|
-
return { newMin, newMax };
|
|
3288
|
-
};
|
|
3289
|
-
return {
|
|
3290
|
-
thumbHeight,
|
|
3291
|
-
thumbTop,
|
|
3292
|
-
draggableRegion,
|
|
3293
|
-
getNewRange
|
|
3294
|
-
};
|
|
3295
|
-
};
|
|
3296
|
-
};
|
|
3297
|
-
|
|
3298
|
-
const cssVars = timeComponentUnresolvedVars.concat(ganttUnresolvedVars);
|
|
3299
|
-
/**
|
|
3300
|
-
* Hook that computes layout related information for the Gantt.
|
|
3301
|
-
*/
|
|
3302
|
-
const useGanttLayout = ({ rowAxis: rowAxisProps, gridlines: { horizontal: gridlinesHorizontal = 'off', vertical: gridlinesVertical = 'on' } = {
|
|
3303
|
-
horizontal: 'off',
|
|
3304
|
-
vertical: 'on'
|
|
3305
|
-
}, axisPosition = 'top', minorAxis, majorAxis, start, end, viewportStart, viewportEnd, onViewportChange, scrollPosition: { y: scrollPosition = 0 } = { y: 0 }, onScrollPositionChange, rows, selectedIds, selectionMode = 'none' }) => {
|
|
3306
|
-
const { direction } = useUser();
|
|
3307
|
-
const { resolvedVars, cssContent } = useCssVars(cssVars);
|
|
3308
|
-
const { textMeasureContent, getTextDimensions } = useTextDimensions();
|
|
3309
|
-
const isRTL = direction === 'rtl';
|
|
3310
|
-
const layoutContent = (jsxs(Fragment, { children: [textMeasureContent, cssContent] }));
|
|
3311
|
-
const { startTime, endTime, viewportStartTime, viewportEndTime, isValidTimeConfig: isValidConfig } = getParsedTimeAxisParams(start, end, viewportStart, viewportEnd);
|
|
3312
|
-
// TODO: take a look a useCssVars and see if we can tighten the types more and make the following check nicer.
|
|
3313
|
-
if (!getTextDimensions || Object.keys(resolvedVars).length === 0) {
|
|
3314
|
-
return { isRTL, layoutContent, isValidConfig, isReady: false };
|
|
3315
|
-
}
|
|
3316
|
-
if (!isValidConfig) {
|
|
3317
|
-
return { isRTL, layoutContent, isValidConfig, isReady: true };
|
|
3318
|
-
}
|
|
3319
|
-
// Resolve row axis props
|
|
3320
|
-
const rowAxisRendered = rowAxisProps === undefined ? 'off' : 'on';
|
|
3321
|
-
const rowAxis = rowAxisProps === 'on' ? {} : rowAxisProps;
|
|
3322
|
-
const rowAxisWidth = rowAxis?.width ?? 'max-content';
|
|
3323
|
-
const rowAxisMaxWidth = rowAxis?.maxWidth ?? 'none';
|
|
3324
|
-
const rowAxisLabelRender = rowAxis?.labelRenderer ?? defaultRowAxisLabelRender;
|
|
3325
|
-
// General layout
|
|
3326
|
-
const unresolvedTimeAxesLayout = getUnresolvedTimeAxesLayout(axisPosition, minorAxis, majorAxis);
|
|
3327
|
-
const panZoomLayout = getPanZoomCanvasLayout(unresolvedTimeAxesLayout);
|
|
3328
|
-
const withRowAxisLayout = rowAxisRendered === 'on'
|
|
3329
|
-
? getWithRowAxisLayout(unresolvedTimeAxesLayout, {
|
|
3330
|
-
width: rowAxisWidth,
|
|
3331
|
-
maxWidth: rowAxisMaxWidth,
|
|
3332
|
-
label: rowAxisLabelRender
|
|
3333
|
-
})
|
|
3334
|
-
: undefined;
|
|
3335
|
-
// Time axes layout and Zoom parameters
|
|
3336
|
-
const timeAxisResolvedVars = getResolvedTimeAxisVars(resolvedVars);
|
|
3337
|
-
const resolvedMajorAxisProps = majorAxis && getResolvedTimeAxisProps(timeAxisResolvedVars.defaultTimeAxisHeight, majorAxis);
|
|
3338
|
-
const resolvedMinorAxisProps = getResolvedTimeAxisProps(timeAxisResolvedVars.defaultTimeAxisHeight, minorAxis);
|
|
3339
|
-
// TODO: see if we need to useMemo this
|
|
3340
|
-
const zoomParameters = getTimeAxesZoomParameters(getTextDimensions, timeAxisResolvedVars.timeAxisLabelPaddingInlineStart, timeAxisResolvedVars.timeAxisLabelPaddingInlineEnd, timeAxisResolvedVars.timeAxisLabelMinWidth, timeAxisResolvedVars.minorAxisFont, startTime, endTime, resolvedMinorAxisProps.zoomOrder);
|
|
3341
|
-
const getTimeAxesLayout = getResolvedTimeAxesLayout(getTextDimensions, timeAxisResolvedVars.timeAxisLabelPaddingInlineStart, timeAxisResolvedVars.timeAxisLabelPaddingInlineEnd, timeAxisResolvedVars.majorAxisFont, timeAxisResolvedVars.minorAxisFont, zoomParameters.getZoomOrderViewDurationThresholds, axisPosition, startTime, endTime, isRTL, resolvedMinorAxisProps, resolvedMajorAxisProps, viewportStartTime, viewportEndTime);
|
|
3342
|
-
// Row data layout
|
|
3343
|
-
const rowResolvedVars = getResolvedRowVars(resolvedVars);
|
|
3344
|
-
const taskResolvedVars = getResolvedTaskVars(resolvedVars);
|
|
3345
|
-
const gridlines = { horizontal: gridlinesHorizontal, vertical: gridlinesVertical };
|
|
3346
|
-
const rowDataLayout = getRowDataLayout(rows, { ...rowResolvedVars, ...taskResolvedVars }, gridlines, { selectedIds, selectionMode });
|
|
3347
|
-
// Row axis layout
|
|
3348
|
-
const rowAxisResolvedVars = getResolvedRowAxisVars(resolvedVars);
|
|
3349
|
-
const rowAxisLayout = {
|
|
3350
|
-
labelPaddingInlineStart: rowAxisResolvedVars.rowLabelPaddingInlineStart,
|
|
3351
|
-
labelPaddingInlineEnd: rowAxisResolvedVars.rowLabelPaddingInlineEnd,
|
|
3352
|
-
rowData: rowDataLayout.rowData,
|
|
3353
|
-
rowObjs: rowDataLayout.rowObjs,
|
|
3354
|
-
idRowObjMap: rowDataLayout.idRowObjMap,
|
|
3355
|
-
isHorizontalGridlinesVisible: gridlinesHorizontal === 'on'
|
|
3356
|
-
};
|
|
3357
|
-
// Horizontal scrollbar layout
|
|
3358
|
-
const getHorizontalScrollbarLayout = getResolvedHorizontalScrollbarLayout(viewportStartTime ?? startTime, viewportEndTime ?? endTime, startTime, endTime, isRTL);
|
|
3359
|
-
const onHorizontalScrollChange = (newViewStartTime, newViewEndTime) => {
|
|
3360
|
-
onViewportChange?.({
|
|
3361
|
-
viewportStart: getISOString(newViewStartTime),
|
|
3362
|
-
viewportEnd: getISOString(newViewEndTime),
|
|
3363
|
-
majorAxisScale: majorAxis?.scale,
|
|
3364
|
-
minorAxisScale: minorAxis.scale
|
|
3365
|
-
});
|
|
3366
|
-
};
|
|
3367
|
-
// Vertical scrollbar layout
|
|
3368
|
-
const getVerticalScrollbarLayout = getResolvedVerticalScrollbarLayout(scrollPosition, undefined, 0, rowDataLayout.totalRowsHeight);
|
|
3369
|
-
const onVerticalScrollChange = (newScrollPosition) => {
|
|
3370
|
-
onScrollPositionChange?.({ y: newScrollPosition });
|
|
3371
|
-
};
|
|
3372
|
-
return {
|
|
3373
|
-
scrollPosition,
|
|
3374
|
-
panZoomLayout,
|
|
3375
|
-
withRowAxisLayout,
|
|
3376
|
-
getTimeAxesLayout,
|
|
3377
|
-
zoomParameters: viewportStartTime !== undefined && viewportEndTime !== undefined
|
|
3378
|
-
? {
|
|
3379
|
-
viewportStartTime,
|
|
3380
|
-
viewportEndTime,
|
|
3381
|
-
minorAxisZoomOrderIndex: resolvedMinorAxisProps.zoomOrderIndex,
|
|
3382
|
-
majorAxisZoomOrder: resolvedMajorAxisProps?.zoomOrder,
|
|
3383
|
-
majorAxisZoomOrderIndex: resolvedMajorAxisProps?.zoomOrderIndex,
|
|
3384
|
-
...zoomParameters
|
|
3385
|
-
}
|
|
3386
|
-
: undefined,
|
|
3387
|
-
rowDataLayout,
|
|
3388
|
-
rowAxisLayout,
|
|
3389
|
-
getResolvedViewportLayout,
|
|
3390
|
-
getHorizontalScrollbarLayout,
|
|
3391
|
-
onHorizontalScrollChange,
|
|
3392
|
-
getVerticalScrollbarLayout,
|
|
3393
|
-
onVerticalScrollChange,
|
|
3394
|
-
isRTL,
|
|
3395
|
-
layoutContent,
|
|
3396
|
-
isValidConfig,
|
|
3397
|
-
isReady: true
|
|
3398
|
-
};
|
|
3399
|
-
};
|
|
3400
|
-
|
|
3401
|
-
/**
|
|
3402
|
-
* Hook that handles various Time Component gestures.
|
|
3403
|
-
*/
|
|
3404
|
-
const useTimeComponentEvents = ({ rootRef, overlayControlsContainerRef, isDisabled = false }) => {
|
|
3405
|
-
const isFocused = useRef(false);
|
|
3406
|
-
const dispatchControlsShow = () => {
|
|
3407
|
-
const e = new Event('ControlsShow');
|
|
3408
|
-
overlayControlsContainerRef.current?.dispatchEvent(e);
|
|
3409
|
-
};
|
|
3410
|
-
const dispatchControlsHide = () => {
|
|
3411
|
-
const e = new Event('ControlsHide');
|
|
3412
|
-
overlayControlsContainerRef.current?.dispatchEvent(e);
|
|
3413
|
-
};
|
|
3414
|
-
const onFocus = () => {
|
|
3415
|
-
isFocused.current = true;
|
|
3416
|
-
dispatchControlsShow();
|
|
3417
|
-
};
|
|
3418
|
-
const onBlur = (e) => {
|
|
3419
|
-
if (!e.relatedTarget || !rootRef.current?.contains(e.relatedTarget)) {
|
|
3420
|
-
isFocused.current = false;
|
|
3421
|
-
dispatchControlsHide();
|
|
3422
|
-
}
|
|
3423
|
-
};
|
|
3424
|
-
const onPointerDown = (e) => {
|
|
3425
|
-
if (e.pointerType !== 'mouse') {
|
|
3426
|
-
// Ensure component is focused upon interaction
|
|
3427
|
-
// e.g. on touch devices, if the component is not initially focused
|
|
3428
|
-
// then one tries to drag pan the component, the component is still
|
|
3429
|
-
// not focused. This is not a problem with mouse devices.
|
|
3430
|
-
rootRef.current?.focus();
|
|
3431
|
-
}
|
|
3432
|
-
};
|
|
3433
|
-
const onPointerOver = (e) => {
|
|
3434
|
-
if (e.pointerType === 'mouse') {
|
|
3435
|
-
dispatchControlsShow();
|
|
3436
|
-
}
|
|
3437
|
-
};
|
|
3438
|
-
const onPointerOut = (e) => {
|
|
3439
|
-
if (e.pointerType === 'mouse') {
|
|
3440
|
-
if (!isFocused.current)
|
|
3441
|
-
dispatchControlsHide();
|
|
3442
|
-
}
|
|
3443
|
-
};
|
|
3444
|
-
return isDisabled
|
|
3445
|
-
? {}
|
|
3446
|
-
: {
|
|
3447
|
-
onFocus,
|
|
3448
|
-
onBlur,
|
|
3449
|
-
onPointerDown,
|
|
3450
|
-
onPointerOver,
|
|
3451
|
-
onPointerOut
|
|
3452
|
-
};
|
|
3453
|
-
};
|
|
3454
|
-
|
|
3455
|
-
/**
|
|
3456
|
-
* @license
|
|
3457
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
3458
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
3459
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
3460
|
-
* @ignore
|
|
3461
|
-
*/
|
|
3462
|
-
const DEFAULT_PAN_UP_RANGE_RATIO = 0.25;
|
|
3463
|
-
const DEFAULT_PAN_DOWN_RANGE_RATIO = -0.25;
|
|
3464
|
-
const DEFAULT_PAN_START_RANGE_RATIO = 0.25;
|
|
3465
|
-
const DEFAULT_PAN_END_RANGE_RATIO = -0.25;
|
|
3466
|
-
const createKbPanUpEvent = () => new CustomEvent('KbPanVertical', { detail: { rangeRatio: DEFAULT_PAN_UP_RANGE_RATIO } });
|
|
3467
|
-
const createKbPanDownEvent = () => new CustomEvent('KbPanVertical', { detail: { rangeRatio: DEFAULT_PAN_DOWN_RANGE_RATIO } });
|
|
3468
|
-
const createKbPanStartEvent = () => new CustomEvent('KbPanHorizontal', { detail: { rangeRatio: DEFAULT_PAN_START_RANGE_RATIO } });
|
|
3469
|
-
const createKbPanEndEvent = () => new CustomEvent('KbPanHorizontal', { detail: { rangeRatio: DEFAULT_PAN_END_RANGE_RATIO } });
|
|
3470
|
-
const createKbZoomInEvent = () => new CustomEvent('KbZoomIn', { detail: { zoomFactor: DEFAULT_ZOOM_IN_FACTOR } });
|
|
3471
|
-
const createKbZoomOutEvent = () => new CustomEvent('KbZoomIn', { detail: { zoomFactor: DEFAULT_ZOOM_OUT_FACTOR } });
|
|
3472
|
-
|
|
3473
|
-
/**
|
|
3474
|
-
* Hook that handles various Time Component keyboard gestures.
|
|
3475
|
-
*/
|
|
3476
|
-
const useTimeComponentKeyboard = ({ visRef, isDisabled = false }) => {
|
|
3477
|
-
const onKeyDown = (event) => {
|
|
3478
|
-
const key = event.key;
|
|
3479
|
-
switch (key) {
|
|
3480
|
-
case '=':
|
|
3481
|
-
case '+': {
|
|
3482
|
-
const e = createKbZoomInEvent();
|
|
3483
|
-
visRef.current?.dispatchEvent(e);
|
|
3484
|
-
cancelEvent(event);
|
|
3485
|
-
break;
|
|
3486
|
-
}
|
|
3487
|
-
case '-':
|
|
3488
|
-
case '_': {
|
|
3489
|
-
const e = createKbZoomOutEvent();
|
|
3490
|
-
visRef.current?.dispatchEvent(e);
|
|
3491
|
-
cancelEvent(event);
|
|
3492
|
-
break;
|
|
3493
|
-
}
|
|
3494
|
-
case 'PageUp': {
|
|
3495
|
-
const e = event.shiftKey ? createKbPanStartEvent() : createKbPanUpEvent();
|
|
3496
|
-
visRef.current?.dispatchEvent(e);
|
|
3497
|
-
cancelEvent(event);
|
|
3498
|
-
break;
|
|
3499
|
-
}
|
|
3500
|
-
case 'PageDown': {
|
|
3501
|
-
const e = event.shiftKey ? createKbPanEndEvent() : createKbPanDownEvent();
|
|
3502
|
-
visRef.current?.dispatchEvent(e);
|
|
3503
|
-
cancelEvent(event);
|
|
3504
|
-
break;
|
|
3505
|
-
}
|
|
3506
|
-
}
|
|
3507
|
-
};
|
|
3508
|
-
return isDisabled ? {} : { onKeyDown };
|
|
3509
|
-
};
|
|
3510
|
-
|
|
3511
|
-
/**
|
|
3512
|
-
* @license
|
|
3513
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
3514
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
3515
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
3516
|
-
* @ignore
|
|
3517
|
-
*/
|
|
3518
|
-
/**
|
|
3519
|
-
* Hook that handles row labels keyboard navigation.
|
|
3520
|
-
*/
|
|
3521
|
-
const useGanttTaskNavigation = ({ rowDataLayout, currentTask, onCurrentTaskChange, isRTL, isDisabled = false }) => {
|
|
3522
|
-
const onKeyDown = (event) => {
|
|
3523
|
-
const key = event.key;
|
|
3524
|
-
switch (key) {
|
|
3525
|
-
case 'ArrowRight': {
|
|
3526
|
-
const nextTaskId = currentTask &&
|
|
3527
|
-
(!isRTL
|
|
3528
|
-
? getNextTaskNavigable(currentTask.id, rowDataLayout)
|
|
3529
|
-
: getPrevTaskNavigable(currentTask.id, rowDataLayout));
|
|
3530
|
-
if (nextTaskId !== undefined) {
|
|
3531
|
-
onCurrentTaskChange({ id: nextTaskId, isFocused: true });
|
|
3532
|
-
}
|
|
3533
|
-
cancelEvent(event);
|
|
3534
|
-
break;
|
|
3535
|
-
}
|
|
3536
|
-
case 'ArrowLeft': {
|
|
3537
|
-
const prevTaskId = currentTask &&
|
|
3538
|
-
(!isRTL
|
|
3539
|
-
? getPrevTaskNavigable(currentTask.id, rowDataLayout)
|
|
3540
|
-
: getNextTaskNavigable(currentTask.id, rowDataLayout));
|
|
3541
|
-
if (prevTaskId !== undefined) {
|
|
3542
|
-
onCurrentTaskChange({ id: prevTaskId, isFocused: true });
|
|
3543
|
-
}
|
|
3544
|
-
cancelEvent(event);
|
|
3545
|
-
break;
|
|
3546
|
-
}
|
|
3547
|
-
case 'ArrowUp': {
|
|
3548
|
-
const aboveTaskId = currentTask && getAboveTaskNavigable(currentTask.id, rowDataLayout);
|
|
3549
|
-
if (aboveTaskId !== undefined) {
|
|
3550
|
-
onCurrentTaskChange({ id: aboveTaskId, isFocused: true });
|
|
3551
|
-
}
|
|
3552
|
-
cancelEvent(event);
|
|
3553
|
-
break;
|
|
3554
|
-
}
|
|
3555
|
-
case 'ArrowDown': {
|
|
3556
|
-
const belowTaskId = currentTask && getBelowTaskNavigable(currentTask.id, rowDataLayout);
|
|
3557
|
-
if (belowTaskId !== undefined) {
|
|
3558
|
-
onCurrentTaskChange({ id: belowTaskId, isFocused: true });
|
|
3559
|
-
}
|
|
3560
|
-
cancelEvent(event);
|
|
3561
|
-
break;
|
|
3562
|
-
}
|
|
3563
|
-
}
|
|
3564
|
-
};
|
|
3565
|
-
return isDisabled ? {} : { onKeyDown };
|
|
3566
|
-
};
|
|
3567
|
-
|
|
3568
|
-
/**
|
|
3569
|
-
* @license
|
|
3570
|
-
* Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.
|
|
3571
|
-
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
3572
|
-
* as shown at https://oss.oracle.com/licenses/upl/
|
|
3573
|
-
* @ignore
|
|
3574
|
-
*/
|
|
3575
|
-
/**
|
|
3576
|
-
* Hook that handles row labels keyboard navigation.
|
|
3577
|
-
*/
|
|
3578
|
-
const useGanttRowLabelNavigation = ({ rowDataLayout, currentRowLabel, onCurrentRowLabelChange, isDisabled = false }) => {
|
|
3579
|
-
const onKeyDown = (event) => {
|
|
3580
|
-
const key = event.key;
|
|
3581
|
-
switch (key) {
|
|
3582
|
-
case 'ArrowUp': {
|
|
3583
|
-
const aboveRowId = currentRowLabel && getAboveRowLabelNavigable(currentRowLabel.id, rowDataLayout);
|
|
3584
|
-
if (aboveRowId !== undefined) {
|
|
3585
|
-
onCurrentRowLabelChange({ id: aboveRowId, isFocused: true });
|
|
3586
|
-
}
|
|
3587
|
-
cancelEvent(event);
|
|
3588
|
-
break;
|
|
3589
|
-
}
|
|
3590
|
-
case 'ArrowDown': {
|
|
3591
|
-
const belowRowId = currentRowLabel && getBelowRowLabelNavigable(currentRowLabel.id, rowDataLayout);
|
|
3592
|
-
if (belowRowId !== undefined) {
|
|
3593
|
-
onCurrentRowLabelChange({ id: belowRowId, isFocused: true });
|
|
3594
|
-
}
|
|
3595
|
-
cancelEvent(event);
|
|
3596
|
-
break;
|
|
3597
|
-
}
|
|
3598
|
-
}
|
|
3599
|
-
};
|
|
3600
|
-
return isDisabled ? {} : { onKeyDown };
|
|
3601
|
-
};
|
|
3602
|
-
|
|
3603
|
-
const useGanttKeyboard = ({ visRef, rowAxisRef, rowDataLayout, navigationModes, selectionProps, isRTL, isDisabled = false }) => {
|
|
3604
|
-
const currentNavMode = useRef('tasks');
|
|
3605
|
-
const idExtracter = (event) => {
|
|
3606
|
-
if (currentNavMode.current !== 'tasks' || event.type !== 'keyup')
|
|
3607
|
-
return;
|
|
3608
|
-
return navigationModes.tasks.currentItem?.id;
|
|
3609
|
-
};
|
|
3610
|
-
const { onKeyUp: selectionKeyup } = useSelection({
|
|
3611
|
-
idExtracter,
|
|
3612
|
-
selection: selectionProps.selectedIds,
|
|
3613
|
-
selectionMode: selectionProps.selectionMode,
|
|
3614
|
-
onChange: selectionProps.onSelectionChange,
|
|
3615
|
-
// TODO: rowDataLayout is undefined when isDisabled is true. Let's reevalute the lifecycle when we work on JET-62889
|
|
3616
|
-
getDataById: rowDataLayout?.getTaskDataById || (() => undefined)
|
|
3617
|
-
}).selectionProps;
|
|
3618
|
-
const selectionKeyboardProps = currentNavMode.current === 'tasks' ? { onKeyUp: selectionKeyup } : {};
|
|
3619
|
-
const keyboardProps = useTimeComponentKeyboard({
|
|
3620
|
-
visRef,
|
|
3621
|
-
isDisabled
|
|
3622
|
-
});
|
|
3623
|
-
const taskNavProps = useGanttTaskNavigation({
|
|
3624
|
-
rowDataLayout,
|
|
3625
|
-
currentTask: navigationModes.tasks.currentItem,
|
|
3626
|
-
onCurrentTaskChange: navigationModes.tasks.onCurrentItemChange,
|
|
3627
|
-
isRTL
|
|
3628
|
-
});
|
|
3629
|
-
const rowLabelNavProps = useGanttRowLabelNavigation({
|
|
3630
|
-
rowDataLayout,
|
|
3631
|
-
currentRowLabel: navigationModes.rowLabels.currentItem,
|
|
3632
|
-
onCurrentRowLabelChange: navigationModes.rowLabels.onCurrentItemChange
|
|
3633
|
-
});
|
|
3634
|
-
const onKeyDown = (event) => {
|
|
3635
|
-
let stopImmediatePropagation = false;
|
|
3636
|
-
const applyFocus = (item) => {
|
|
3637
|
-
const { onCurrentItemChange } = navigationModes[item.type];
|
|
3638
|
-
onCurrentItemChange({ id: item.id, isFocused: true });
|
|
3639
|
-
};
|
|
3640
|
-
const removeFocus = (navType) => {
|
|
3641
|
-
const { currentItem, onCurrentItemChange } = navigationModes[navType];
|
|
3642
|
-
currentItem && onCurrentItemChange({ id: currentItem.id, isFocused: false });
|
|
3643
|
-
};
|
|
3644
|
-
const enterRowLabelsNavigation = () => {
|
|
3645
|
-
const id = getRowLabelNavigableFromTask(navigationModes.tasks.currentItem.id, rowDataLayout);
|
|
3646
|
-
applyFocus({ id, type: 'rowLabels' });
|
|
3647
|
-
removeFocus('tasks');
|
|
3648
|
-
currentNavMode.current = 'rowLabels';
|
|
3649
|
-
stopImmediatePropagation = true;
|
|
3650
|
-
cancelEvent(event);
|
|
3651
|
-
};
|
|
3652
|
-
const enterTasksNavigation = () => {
|
|
3653
|
-
const id = getTaskNavigableFromRowLabel(navigationModes.rowLabels.currentItem.id, rowDataLayout, navigationModes.tasks.currentItem?.id);
|
|
3654
|
-
id !== undefined && applyFocus({ id, type: 'tasks' });
|
|
3655
|
-
removeFocus('rowLabels');
|
|
3656
|
-
currentNavMode.current = 'tasks';
|
|
3657
|
-
stopImmediatePropagation = true;
|
|
3658
|
-
cancelEvent(event);
|
|
3659
|
-
};
|
|
3660
|
-
const key = event.key;
|
|
3661
|
-
switch (key) {
|
|
3662
|
-
case 'Tab': {
|
|
3663
|
-
// Tab OUT of component
|
|
3664
|
-
// Remove focus visuals
|
|
3665
|
-
removeFocus(currentNavMode.current);
|
|
3666
|
-
break;
|
|
3667
|
-
}
|
|
3668
|
-
case 'ArrowLeft': {
|
|
3669
|
-
if (event.altKey) {
|
|
3670
|
-
if (!isRTL && currentNavMode.current === 'tasks') {
|
|
3671
|
-
enterRowLabelsNavigation();
|
|
3672
|
-
}
|
|
3673
|
-
else if (isRTL && currentNavMode.current === 'rowLabels') {
|
|
3674
|
-
enterTasksNavigation();
|
|
3675
|
-
}
|
|
3676
|
-
}
|
|
3677
|
-
break;
|
|
3678
|
-
}
|
|
3679
|
-
case 'ArrowRight': {
|
|
3680
|
-
if (event.altKey) {
|
|
3681
|
-
if (!isRTL && currentNavMode.current === 'rowLabels') {
|
|
3682
|
-
enterTasksNavigation();
|
|
3683
|
-
}
|
|
3684
|
-
else if (isRTL && currentNavMode.current === 'tasks') {
|
|
3685
|
-
enterRowLabelsNavigation();
|
|
3686
|
-
}
|
|
3687
|
-
}
|
|
3688
|
-
break;
|
|
3689
|
-
}
|
|
3690
|
-
}
|
|
3691
|
-
if (!stopImmediatePropagation) {
|
|
3692
|
-
switch (currentNavMode.current) {
|
|
3693
|
-
case 'tasks':
|
|
3694
|
-
taskNavProps.onKeyDown?.(event);
|
|
3695
|
-
break;
|
|
3696
|
-
case 'rowLabels':
|
|
3697
|
-
rowLabelNavProps.onKeyDown?.(event);
|
|
3698
|
-
break;
|
|
3699
|
-
default: {
|
|
3700
|
-
const _exhaustiveCheck = currentNavMode.current;
|
|
3701
|
-
return _exhaustiveCheck;
|
|
3702
|
-
}
|
|
3703
|
-
}
|
|
3704
|
-
}
|
|
3705
|
-
};
|
|
3706
|
-
const onKeyUp = (event) => {
|
|
3707
|
-
const key = event.key;
|
|
3708
|
-
switch (key) {
|
|
3709
|
-
case 'Tab': {
|
|
3710
|
-
// Tab INTO component
|
|
3711
|
-
const { currentItem, onCurrentItemChange } = navigationModes[currentNavMode.current];
|
|
3712
|
-
// currentItem should only ever be undefined on first Tab
|
|
3713
|
-
const itemToFocus = currentItem ? currentItem : getDefaultInitialFocusTask(rowDataLayout);
|
|
3714
|
-
itemToFocus && onCurrentItemChange({ id: itemToFocus.id, isFocused: true });
|
|
3715
|
-
cancelEvent(event);
|
|
3716
|
-
break;
|
|
3717
|
-
}
|
|
3718
|
-
}
|
|
3719
|
-
};
|
|
3720
|
-
// TODO: JET-62887: Avoid this temporary hack to get keyboard datatip to work (until we find a way to get rid of all these dispatchEvents)
|
|
3721
|
-
const focusDatatipProps = {
|
|
3722
|
-
onFocus: () => {
|
|
3723
|
-
const e = new Event('ShowFocusDatatip');
|
|
3724
|
-
visRef.current?.dispatchEvent(e);
|
|
3725
|
-
rowAxisRef.current?.dispatchEvent(e);
|
|
3726
|
-
}
|
|
3727
|
-
};
|
|
3728
|
-
return isDisabled
|
|
3729
|
-
? {}
|
|
3730
|
-
: mergeProps(keyboardProps, focusDatatipProps, { onKeyDown, onKeyUp }, selectionKeyboardProps);
|
|
3731
|
-
};
|
|
3732
|
-
|
|
3733
|
-
/**
|
|
3734
|
-
* A gantt displays scheduling information graphically, making it easier to plan, coordinate, and track various tasks and resources.
|
|
3735
|
-
*/
|
|
3736
|
-
function Gantt({ width, height, testId, ...props }) {
|
|
3737
|
-
const ref = useRef(null);
|
|
3738
|
-
const { scrollPosition, panZoomLayout, withRowAxisLayout, getTimeAxesLayout, zoomParameters, rowDataLayout, rowAxisLayout, getResolvedViewportLayout, getHorizontalScrollbarLayout, onHorizontalScrollChange, getVerticalScrollbarLayout, onVerticalScrollChange, isRTL, layoutContent, isValidConfig, isReady } = useGanttLayout(props);
|
|
3739
|
-
const ariaProps = {
|
|
3740
|
-
'aria-label': props['aria-label'],
|
|
3741
|
-
'aria-describedby': props['aria-describedby'],
|
|
3742
|
-
'aria-labelledby': props['aria-labelledby'],
|
|
3743
|
-
role: 'application'
|
|
3744
|
-
};
|
|
3745
|
-
const isViewportDefined = props.viewportStart !== undefined && props.viewportEnd !== undefined;
|
|
3746
|
-
const [ariaActive, setAriaActive] = useState();
|
|
3747
|
-
const [currentTaskInteraction, setCurrentTaskInteraction] = useState('none');
|
|
3748
|
-
const [hoveredTaskId, setHoveredTaskId] = useState();
|
|
3749
|
-
const onTaskHoverChange = (detail) => {
|
|
3750
|
-
detail.id !== undefined &&
|
|
3751
|
-
setAriaActive({ dataId: detail.id, ariaId: getRandomId(), type: 'task' });
|
|
3752
|
-
setCurrentTaskInteraction(detail.id !== undefined ? 'hover' : 'none');
|
|
3753
|
-
setHoveredTaskId(detail.id);
|
|
3754
|
-
};
|
|
3755
|
-
const [currentRowLabelInteraction, setCurrentRowLabelInteraction] = useState('none');
|
|
3756
|
-
const [hoveredRowLabelId, setHoveredRowLabelId] = useState();
|
|
3757
|
-
const onRowLabelHoverChange = (detail) => {
|
|
3758
|
-
detail.id !== undefined &&
|
|
3759
|
-
setAriaActive({ dataId: detail.id, ariaId: getRandomId(), type: 'rowLabel' });
|
|
3760
|
-
setCurrentRowLabelInteraction(detail.id !== undefined ? 'hover' : 'none');
|
|
3761
|
-
setHoveredRowLabelId(detail.id);
|
|
3762
|
-
};
|
|
3763
|
-
const [currentTask, setCurrentTask] = useState();
|
|
3764
|
-
const onCurrentTaskChange = (detail) => {
|
|
3765
|
-
if (detail.isFocused) {
|
|
3766
|
-
const e = new CustomEvent('KbPanTaskIntoView', { detail: { id: detail.id } });
|
|
3767
|
-
visRef.current?.dispatchEvent(e);
|
|
3768
|
-
setAriaActive({ dataId: detail.id, ariaId: getRandomId(), type: 'task' });
|
|
3769
|
-
setCurrentTaskInteraction('focus');
|
|
3770
|
-
}
|
|
3771
|
-
setCurrentTask(detail);
|
|
3772
|
-
};
|
|
3773
|
-
const [currentRowLabel, setCurrentRowLabel] = useState();
|
|
3774
|
-
const onCurrentRowLabelChange = (detail) => {
|
|
3775
|
-
if (detail.isFocused) {
|
|
3776
|
-
const e = new CustomEvent('KbPanRowIntoView', { detail: { id: detail.id } });
|
|
3777
|
-
visRef.current?.dispatchEvent(e);
|
|
3778
|
-
setAriaActive({ dataId: detail.id, ariaId: getRandomId(), type: 'rowLabel' });
|
|
3779
|
-
setCurrentRowLabelInteraction('focus');
|
|
3780
|
-
}
|
|
3781
|
-
setCurrentRowLabel(detail);
|
|
3782
|
-
};
|
|
3783
|
-
const visRef = useRef(null);
|
|
3784
|
-
const rowAxisRef = useRef(null);
|
|
3785
|
-
const overlayControlsContainerRef = useRef(null);
|
|
3786
|
-
const eventProps = useTimeComponentEvents({
|
|
3787
|
-
rootRef: ref,
|
|
3788
|
-
overlayControlsContainerRef,
|
|
3789
|
-
isDisabled: !isViewportDefined
|
|
3790
|
-
});
|
|
3791
|
-
const keyboardProps = useGanttKeyboard({
|
|
3792
|
-
visRef,
|
|
3793
|
-
rowAxisRef,
|
|
3794
|
-
navigationModes: {
|
|
3795
|
-
tasks: { currentItem: currentTask, onCurrentItemChange: onCurrentTaskChange },
|
|
3796
|
-
rowLabels: { currentItem: currentRowLabel, onCurrentItemChange: onCurrentRowLabelChange }
|
|
3797
|
-
},
|
|
3798
|
-
rowDataLayout: rowDataLayout,
|
|
3799
|
-
selectionProps: {
|
|
3800
|
-
selectedIds: props.selectedIds,
|
|
3801
|
-
selectionMode: props.selectionMode,
|
|
3802
|
-
onSelectionChange: props.onSelectionChange
|
|
3803
|
-
},
|
|
3804
|
-
isRTL,
|
|
3805
|
-
isDisabled: !isViewportDefined
|
|
3806
|
-
});
|
|
3807
|
-
// TODO: Move check to util and call in corepack to decide whether to render invalid data state?
|
|
3808
|
-
if (!isReady || !isValidConfig) {
|
|
3809
|
-
return (jsx(GanttContainer, { innerRef: ref, width: width, height: height, ...ariaProps, children: layoutContent }));
|
|
3810
|
-
}
|
|
3811
|
-
const ganttView = (jsx(GanttView, { visRef: visRef, overlayControlsContainerRef: overlayControlsContainerRef, isRTL: isRTL, isViewportDefined: isViewportDefined, scrollPosition: scrollPosition, onScrollPositionChange: props.onScrollPositionChange, onViewportChange: props.onViewportChange, rowAxisSeparator: !!withRowAxisLayout, zoomParameters: zoomParameters, zooming: props.zooming, panZoomLayout: panZoomLayout, getTimeAxesLayout: getTimeAxesLayout, getHorizontalScrollbarLayout: getHorizontalScrollbarLayout, onHorizontalScrollChange: onHorizontalScrollChange, getVerticalScrollbarLayout: getVerticalScrollbarLayout, onVerticalScrollChange: onVerticalScrollChange, getResolvedViewportLayout: getResolvedViewportLayout, rowDataLayout: rowDataLayout, datatip: props.datatip, selectedIds: props.selectedIds, selectionMode: props.selectionMode, onSelectionChange: props.onSelectionChange, hoveredTaskId: hoveredTaskId, onTaskHoverChange: onTaskHoverChange, currentTask: currentTask, onCurrentTaskChange: onCurrentTaskChange, currentTaskInteraction: currentTaskInteraction, ariaActive: ariaActive?.type === 'task' ? ariaActive : undefined }));
|
|
3812
|
-
const ganttViewWithRowAxis = withRowAxisLayout && (jsx(GanttWithRowAxisLayout, { ...withRowAxisLayout, rowAxis: (resolvedWidth, resolvedMaxWidth) => (jsx(GanttRowAxis, { innerRef: rowAxisRef, resolvedWidth: resolvedWidth, resolvedMaxWidth: resolvedMaxWidth, currentRowLabel: currentRowLabel, hoveredRowLabelId: hoveredRowLabelId, onRowLabelHoverChange: onRowLabelHoverChange, currentRowLabelInteraction: currentRowLabelInteraction, ariaActive: ariaActive?.type === 'rowLabel' ? ariaActive : undefined, layoutObj: rowAxisLayout, scrollPosition: scrollPosition, children: withRowAxisLayout.label })), ganttView: ganttView }));
|
|
3813
|
-
return (jsxs(GanttContainer, { innerRef: ref, width: width, height: height, testId: testId, ...ariaProps, ...mergeProps(keyboardProps, eventProps), "aria-activedescendant": ariaActive?.ariaId, children: [ganttViewWithRowAxis || ganttView, layoutContent] }));
|
|
3814
|
-
}
|
|
3815
|
-
|
|
3816
|
-
export { Gantt as G };
|
|
3817
|
-
//# sourceMappingURL=Gantt-5a395647.js.map
|