@carbon/ibm-products 2.61.0 → 2.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/index-full-carbon.css +170 -22
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +170 -22
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +170 -22
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +170 -22
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/_virtual/_rollupPluginBabelHelpers.js +4 -4
- package/es/components/APIKeyModal/APIKeyDownloader.js +2 -2
- package/es/components/APIKeyModal/APIKeyModal.js +16 -16
- package/es/components/AboutModal/AboutModal.js +1 -1
- package/es/components/ActionBar/ActionBar.js +5 -5
- package/es/components/ActionBar/ActionBarOverflowItems.js +3 -3
- package/es/components/ActionSet/ActionSet.js +5 -5
- package/es/components/AddSelect/AddSelect.js +5 -4
- package/es/components/AddSelect/AddSelectBody.js +12 -11
- package/es/components/AddSelect/AddSelectColumn.js +1 -1
- package/es/components/AddSelect/AddSelectFilter.js +1 -1
- package/es/components/AddSelect/AddSelectMetaPanel.js +3 -3
- package/es/components/AddSelect/AddSelectRow.js +21 -13
- package/es/components/AddSelect/AddSelectSidebar.js +14 -4
- package/es/components/AddSelect/AddSelectSort.js +5 -5
- package/es/components/AddSelect/add-select-utils.js +3 -3
- package/es/components/AddSelect/types/index.d.ts +1 -0
- package/es/components/BigNumbers/BigNumbers.js +11 -11
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +4 -4
- package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +4 -4
- package/es/components/Card/Card.js +14 -14
- package/es/components/Card/CardFooter.js +4 -4
- package/es/components/Card/CardHeader.js +2 -2
- package/es/components/Carousel/Carousel.js +16 -16
- package/es/components/Cascade/Cascade.js +2 -2
- package/es/components/Checklist/Checklist.js +11 -11
- package/es/components/Checklist/ChecklistChart.js +1 -1
- package/es/components/Checklist/ChecklistIcon.js +1 -1
- package/es/components/Coachmark/Coachmark.js +10 -10
- package/es/components/Coachmark/CoachmarkDragbar.js +5 -5
- package/es/components/Coachmark/CoachmarkHeader.js +4 -4
- package/es/components/Coachmark/CoachmarkOverlay.js +4 -4
- package/es/components/Coachmark/CoachmarkTagline.js +3 -3
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -1
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +6 -6
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +0 -10
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +16 -35
- package/es/components/CoachmarkStack/CoachmarkStack.d.ts +2 -13
- package/es/components/CoachmarkStack/CoachmarkStack.js +12 -22
- package/es/components/CoachmarkStack/CoachmarkStackHome.d.ts +0 -17
- package/es/components/CoachmarkStack/CoachmarkStackHome.js +6 -29
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +12 -12
- package/es/components/ConditionBuilder/ConditionBuilder.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +5 -5
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +3 -3
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +19 -19
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +7 -7
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +3 -3
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +6 -6
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +6 -6
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +3 -3
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +31 -31
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +15 -15
- package/es/components/ConditionBuilder/utils/useDataConfigs.js +1 -1
- package/es/components/ConditionBuilder/utils/useTranslations.js +2 -2
- package/es/components/ConditionBuilder/utils/util.js +13 -13
- package/es/components/CreateFullPage/CreateFullPage.js +3 -3
- package/es/components/CreateFullPage/CreateFullPageStep.js +9 -9
- package/es/components/CreateInfluencer/CreateInfluencer.js +8 -8
- package/es/components/CreateModal/CreateModal.js +1 -1
- package/es/components/CreateSidePanel/CreateSidePanel.js +1 -1
- package/es/components/CreateTearsheet/CreateTearsheet.js +4 -4
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +16 -16
- package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +1 -1
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +52 -52
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +36 -36
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +26 -26
- package/es/components/DataSpreadsheet/hooks/useMoveActiveCell.js +3 -3
- package/es/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +3 -3
- package/es/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +1 -1
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +16 -16
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +5 -5
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +8 -8
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +1 -1
- package/es/components/DataSpreadsheet/utils/checkActiveHeaderCell.js +3 -3
- package/es/components/DataSpreadsheet/utils/checkSelectedHeaderCell.js +5 -5
- package/es/components/DataSpreadsheet/utils/commonEventHandlers.js +3 -3
- package/es/components/DataSpreadsheet/utils/createActiveCellFn.js +10 -10
- package/es/components/DataSpreadsheet/utils/createCellSelectionArea.js +1 -1
- package/es/components/DataSpreadsheet/utils/getSpreadsheetWidth.js +1 -1
- package/es/components/DataSpreadsheet/utils/handleActiveCellInSelectionEnter.js +6 -6
- package/es/components/DataSpreadsheet/utils/handleActiveCellInSelectionTab.js +6 -6
- package/es/components/DataSpreadsheet/utils/handleCellDeletion.js +6 -6
- package/es/components/DataSpreadsheet/utils/handleEditSubmit.js +3 -3
- package/es/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +10 -10
- package/es/components/DataSpreadsheet/utils/handleMultipleKeys.js +14 -14
- package/es/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +4 -4
- package/es/components/DataSpreadsheet/utils/removeCellSelections.js +1 -1
- package/es/components/Datagrid/Datagrid/Datagrid.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridBody.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridContent.js +14 -14
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +3 -3
- package/es/components/Datagrid/Datagrid/DatagridHead.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -23
- package/es/components/Datagrid/Datagrid/DatagridRefBody.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridRow.js +19 -19
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +9 -9
- package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +7 -7
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +11 -11
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +18 -18
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +9 -9
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +15 -15
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +59 -44
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/constants.js +1 -5
- package/es/components/Datagrid/Datagrid/addons/Filtering/handleCheckboxChange.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +20 -20
- package/es/components/Datagrid/Datagrid/addons/Filtering/utils.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +35 -35
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +6 -6
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +5 -5
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/stateReducer.js +4 -4
- package/es/components/Datagrid/useActionsColumn.js +2 -2
- package/es/components/Datagrid/useColumnRightAlign.js +3 -3
- package/es/components/Datagrid/useCustomizeColumns.js +1 -1
- package/es/components/Datagrid/useDatagrid.js +2 -2
- package/es/components/Datagrid/useDefaultStringRenderer.js +1 -1
- package/es/components/Datagrid/useDisableSelectRows.js +16 -16
- package/es/components/Datagrid/useExpandedRow.js +1 -1
- package/es/components/Datagrid/useFiltering.js +1 -1
- package/es/components/Datagrid/useFloatingScroll.js +2 -2
- package/es/components/Datagrid/useFocusRowExpander.js +4 -4
- package/es/components/Datagrid/useInfiniteScroll.js +1 -1
- package/es/components/Datagrid/useInitialColumnSort.js +1 -1
- package/es/components/Datagrid/useInlineEdit.js +4 -4
- package/es/components/Datagrid/useNestedRowExpander.js +6 -6
- package/es/components/Datagrid/useNestedRows.js +6 -6
- package/es/components/Datagrid/useOnRowClick.js +1 -1
- package/es/components/Datagrid/useRowExpander.js +4 -4
- package/es/components/Datagrid/useRowIsMouseOver.js +1 -1
- package/es/components/Datagrid/useRowRenderer.js +6 -6
- package/es/components/Datagrid/useSelectAllToggle.js +2 -2
- package/es/components/Datagrid/useSelectRows.js +5 -5
- package/es/components/Datagrid/useSortableColumns.js +11 -11
- package/es/components/Datagrid/useStickyColumn.js +8 -8
- package/es/components/DecoratorBase/DecoratorBase.js +8 -8
- package/es/components/DecoratorBase/DecoratorIcon.js +2 -2
- package/es/components/DelimitedList/DelimitedList.js +3 -3
- package/es/components/DescriptionList/DescriptionList.js +2 -2
- package/es/components/EditInPlace/EditInPlace.js +6 -6
- package/es/components/EditSidePanel/EditSidePanel.js +3 -3
- package/es/components/EditTearsheet/EditTearsheet.js +3 -3
- package/es/components/EditTearsheet/EditTearsheetForm.js +2 -2
- package/es/components/EmptyStates/EmptyState.js +5 -5
- package/es/components/EmptyStates/EmptyStateContent.js +2 -2
- package/es/components/EmptyStates/EmptyStateV2.js +2 -2
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +3 -3
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +3 -3
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +3 -3
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +3 -3
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +3 -3
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +3 -3
- package/es/components/ExportModal/ExportModal.js +7 -7
- package/es/components/FeatureFlags/index.js +1 -1
- package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +1 -1
- package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +2 -2
- package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +8 -8
- package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +1 -1
- package/es/components/FilterSummary/FilterSummary.js +18 -34
- package/es/components/FullPageError/FullPageError.js +1 -1
- package/es/components/Guidebanner/Guidebanner.js +8 -8
- package/es/components/Guidebanner/GuidebannerElementButton.js +1 -1
- package/es/components/ImportModal/ImportModal.js +2 -2
- package/es/components/InlineTip/InlineTip.d.ts +0 -14
- package/es/components/InlineTip/InlineTip.js +13 -35
- package/es/components/InlineTip/utils.js +1 -1
- package/es/components/InterstitialScreen/InterstitialScreen.d.ts +0 -26
- package/es/components/InterstitialScreen/InterstitialScreen.js +22 -56
- package/es/components/MultiAddSelect/MultiAddSelect.d.ts +4 -0
- package/es/components/MultiAddSelect/MultiAddSelect.js +2 -1
- package/es/components/Nav/Nav.js +3 -3
- package/es/components/Nav/NavItem.js +8 -9
- package/es/components/Nav/NavList.js +14 -15
- package/es/components/NonLinearReading/NonLinearReading.js +1 -1
- package/es/components/NotificationsPanel/NotificationsPanel.d.ts +53 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +89 -71
- package/es/components/OptionsTile/OptionsTile.js +4 -3
- package/es/components/PageHeader/PageHeader.js +19 -19
- package/es/components/PageHeader/PageHeaderTitle.js +1 -1
- package/es/components/PageHeader/PageHeaderUtils.js +1 -1
- package/es/components/ProductiveCard/ProductiveCard.js +1 -1
- package/es/components/RemoveModal/RemoveModal.js +2 -2
- package/es/components/Saving/Saving.js +4 -4
- package/es/components/ScrollGradient/ScrollGradient.js +6 -6
- package/es/components/SearchBar/SearchBar.js +6 -6
- package/es/components/SidePanel/SidePanel.js +45 -45
- package/es/components/SimpleHeader/SimpleHeader.js +4 -4
- package/es/components/StatusIcon/StatusIcon.js +1 -1
- package/es/components/StatusIndicator/StatusIndicator.js +2 -2
- package/es/components/StatusIndicator/StatusIndicatorStep.js +1 -1
- package/es/components/StringFormatter/StringFormatter.js +4 -4
- package/es/components/TagOverflow/TagOverflow.js +7 -7
- package/es/components/TagOverflow/TagOverflowModal.js +4 -4
- package/es/components/TagOverflow/TagOverflowPopover.js +13 -13
- package/es/components/TagSet/TagSet.js +15 -15
- package/es/components/TagSet/TagSetModal.js +6 -6
- package/es/components/TagSet/TagSetOverflow.js +3 -3
- package/es/components/Tearsheet/Tearsheet.js +2 -2
- package/es/components/Tearsheet/TearsheetNarrow.js +1 -1
- package/es/components/Tearsheet/TearsheetShell.js +6 -6
- package/es/components/Toolbar/Toolbar.js +6 -6
- package/es/components/Toolbar/ToolbarButton.js +4 -4
- package/es/components/TruncatedList/TruncatedList.js +8 -8
- package/es/components/UserAvatar/UserAvatar.js +4 -4
- package/es/components/UserProfileImage/UserProfileImage.js +2 -2
- package/es/components/WebTerminal/WebTerminal.js +8 -8
- package/es/global/js/hooks/useControllableState.js +1 -1
- package/es/global/js/hooks/useCreateComponentFocus.js +1 -1
- package/es/global/js/hooks/useCreateComponentStepChange.js +10 -10
- package/es/global/js/hooks/useFocus.js +19 -19
- package/es/global/js/hooks/useOverflowItems/index.d.ts +7 -0
- package/es/global/js/hooks/{useOverflowItems.js → useOverflowItems/useOverflowItems.js} +16 -16
- package/es/global/js/hooks/useOverflowString.js +6 -6
- package/es/global/js/hooks/usePresence.d.ts +23 -0
- package/es/global/js/hooks/usePresence.js +26 -6
- package/es/global/js/hooks/useResetCreateComponent.js +1 -1
- package/es/global/js/hooks/useResizeObserver.js +5 -5
- package/es/global/js/hooks/useRetrieveStepData.js +1 -1
- package/es/global/js/package-settings.js +4 -4
- package/es/global/js/utils/Wrap.js +2 -2
- package/es/global/js/utils/checkForOverflow.js +1 -1
- package/es/global/js/utils/debounce.d.ts +1 -1
- package/es/global/js/utils/debounce.js +2 -2
- package/es/global/js/utils/getSupportedLocale.d.ts +2 -0
- package/es/global/js/utils/getSupportedLocale.js +2 -0
- package/es/global/js/utils/lastIndexInArray.js +1 -1
- package/es/global/js/utils/props-helper.js +1 -1
- package/es/node_modules/@carbon/icon-helpers/es/index.js +2 -2
- package/es/node_modules/@carbon/icons-react/es/Icon.js +2 -2
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-10.js +894 -863
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-3.js +824 -823
- package/es/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
- package/es/settings.js +2 -2
- package/lib/_virtual/_rollupPluginBabelHelpers.js +4 -4
- package/lib/components/APIKeyModal/APIKeyDownloader.js +2 -2
- package/lib/components/APIKeyModal/APIKeyModal.js +16 -16
- package/lib/components/AboutModal/AboutModal.js +1 -1
- package/lib/components/ActionBar/ActionBar.js +5 -5
- package/lib/components/ActionBar/ActionBarOverflowItems.js +3 -3
- package/lib/components/ActionSet/ActionSet.js +5 -5
- package/lib/components/AddSelect/AddSelect.js +5 -4
- package/lib/components/AddSelect/AddSelectBody.js +12 -11
- package/lib/components/AddSelect/AddSelectColumn.js +1 -1
- package/lib/components/AddSelect/AddSelectFilter.js +1 -1
- package/lib/components/AddSelect/AddSelectMetaPanel.js +3 -3
- package/lib/components/AddSelect/AddSelectRow.js +20 -12
- package/lib/components/AddSelect/AddSelectSidebar.js +14 -4
- package/lib/components/AddSelect/AddSelectSort.js +5 -5
- package/lib/components/AddSelect/add-select-utils.js +3 -3
- package/lib/components/AddSelect/types/index.d.ts +1 -0
- package/lib/components/BigNumbers/BigNumbers.js +10 -10
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +4 -4
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +4 -4
- package/lib/components/Card/Card.js +14 -14
- package/lib/components/Card/CardFooter.js +4 -4
- package/lib/components/Card/CardHeader.js +2 -2
- package/lib/components/Carousel/Carousel.js +16 -16
- package/lib/components/Cascade/Cascade.js +2 -2
- package/lib/components/Checklist/Checklist.js +11 -11
- package/lib/components/Checklist/ChecklistChart.js +1 -1
- package/lib/components/Checklist/ChecklistIcon.js +1 -1
- package/lib/components/Coachmark/Coachmark.js +10 -10
- package/lib/components/Coachmark/CoachmarkDragbar.js +5 -5
- package/lib/components/Coachmark/CoachmarkHeader.js +4 -4
- package/lib/components/Coachmark/CoachmarkOverlay.js +4 -4
- package/lib/components/Coachmark/CoachmarkTagline.js +3 -3
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -1
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +6 -6
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +0 -10
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +16 -35
- package/lib/components/CoachmarkStack/CoachmarkStack.d.ts +2 -13
- package/lib/components/CoachmarkStack/CoachmarkStack.js +12 -22
- package/lib/components/CoachmarkStack/CoachmarkStackHome.d.ts +0 -17
- package/lib/components/CoachmarkStack/CoachmarkStackHome.js +6 -29
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +12 -12
- package/lib/components/ConditionBuilder/ConditionBuilder.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +5 -5
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +3 -3
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +19 -19
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +7 -7
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +3 -3
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +6 -6
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +6 -6
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +3 -3
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +31 -31
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +15 -15
- package/lib/components/ConditionBuilder/utils/useDataConfigs.js +1 -1
- package/lib/components/ConditionBuilder/utils/useTranslations.js +2 -2
- package/lib/components/ConditionBuilder/utils/util.js +13 -13
- package/lib/components/CreateFullPage/CreateFullPage.js +3 -3
- package/lib/components/CreateFullPage/CreateFullPageStep.js +9 -9
- package/lib/components/CreateInfluencer/CreateInfluencer.js +8 -8
- package/lib/components/CreateModal/CreateModal.js +1 -1
- package/lib/components/CreateSidePanel/CreateSidePanel.js +1 -1
- package/lib/components/CreateTearsheet/CreateTearsheet.js +4 -4
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +16 -16
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +1 -1
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +52 -52
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +36 -36
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +26 -26
- package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.js +3 -3
- package/lib/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +3 -3
- package/lib/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +1 -1
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +16 -16
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +5 -5
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +8 -8
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +1 -1
- package/lib/components/DataSpreadsheet/utils/checkActiveHeaderCell.js +3 -3
- package/lib/components/DataSpreadsheet/utils/checkSelectedHeaderCell.js +5 -5
- package/lib/components/DataSpreadsheet/utils/commonEventHandlers.js +3 -3
- package/lib/components/DataSpreadsheet/utils/createActiveCellFn.js +10 -10
- package/lib/components/DataSpreadsheet/utils/createCellSelectionArea.js +1 -1
- package/lib/components/DataSpreadsheet/utils/getSpreadsheetWidth.js +1 -1
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionEnter.js +6 -6
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionTab.js +6 -6
- package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +6 -6
- package/lib/components/DataSpreadsheet/utils/handleEditSubmit.js +3 -3
- package/lib/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +10 -10
- package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +14 -14
- package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +4 -4
- package/lib/components/DataSpreadsheet/utils/removeCellSelections.js +1 -1
- package/lib/components/Datagrid/Datagrid/Datagrid.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridBody.js +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +14 -14
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +3 -3
- package/lib/components/Datagrid/Datagrid/DatagridHead.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -23
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +19 -19
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +9 -9
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +7 -7
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +11 -11
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +18 -18
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +9 -9
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +15 -15
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +59 -44
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +2 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +0 -6
- package/lib/components/Datagrid/Datagrid/addons/Filtering/handleCheckboxChange.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +20 -20
- package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +35 -35
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +6 -6
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +2 -2
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +5 -5
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +4 -4
- package/lib/components/Datagrid/useActionsColumn.js +2 -2
- package/lib/components/Datagrid/useColumnRightAlign.js +3 -3
- package/lib/components/Datagrid/useCustomizeColumns.js +1 -1
- package/lib/components/Datagrid/useDatagrid.js +2 -2
- package/lib/components/Datagrid/useDefaultStringRenderer.js +1 -1
- package/lib/components/Datagrid/useDisableSelectRows.js +16 -16
- package/lib/components/Datagrid/useExpandedRow.js +1 -1
- package/lib/components/Datagrid/useFiltering.js +1 -1
- package/lib/components/Datagrid/useFloatingScroll.js +2 -2
- package/lib/components/Datagrid/useFocusRowExpander.js +4 -4
- package/lib/components/Datagrid/useInfiniteScroll.js +1 -1
- package/lib/components/Datagrid/useInitialColumnSort.js +1 -1
- package/lib/components/Datagrid/useInlineEdit.js +4 -4
- package/lib/components/Datagrid/useNestedRowExpander.js +6 -6
- package/lib/components/Datagrid/useNestedRows.js +6 -6
- package/lib/components/Datagrid/useOnRowClick.js +1 -1
- package/lib/components/Datagrid/useRowExpander.js +4 -4
- package/lib/components/Datagrid/useRowIsMouseOver.js +1 -1
- package/lib/components/Datagrid/useRowRenderer.js +6 -6
- package/lib/components/Datagrid/useSelectAllToggle.js +2 -2
- package/lib/components/Datagrid/useSelectRows.js +5 -5
- package/lib/components/Datagrid/useSortableColumns.js +11 -11
- package/lib/components/Datagrid/useStickyColumn.js +8 -8
- package/lib/components/DecoratorBase/DecoratorBase.js +8 -8
- package/lib/components/DecoratorBase/DecoratorIcon.js +2 -2
- package/lib/components/DelimitedList/DelimitedList.js +3 -3
- package/lib/components/DescriptionList/DescriptionList.js +2 -2
- package/lib/components/EditInPlace/EditInPlace.js +6 -6
- package/lib/components/EditSidePanel/EditSidePanel.js +3 -3
- package/lib/components/EditTearsheet/EditTearsheet.js +3 -3
- package/lib/components/EditTearsheet/EditTearsheetForm.js +2 -2
- package/lib/components/EmptyStates/EmptyState.js +5 -5
- package/lib/components/EmptyStates/EmptyStateContent.js +2 -2
- package/lib/components/EmptyStates/EmptyStateV2.js +2 -2
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +3 -3
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +3 -3
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +3 -3
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +3 -3
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +3 -3
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +3 -3
- package/lib/components/ExportModal/ExportModal.js +7 -7
- package/lib/components/FeatureFlags/index.js +1 -1
- package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +1 -1
- package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +2 -2
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +8 -8
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +1 -1
- package/lib/components/FilterSummary/FilterSummary.js +18 -34
- package/lib/components/FullPageError/FullPageError.js +1 -1
- package/lib/components/Guidebanner/Guidebanner.js +8 -8
- package/lib/components/Guidebanner/GuidebannerElementButton.js +1 -1
- package/lib/components/ImportModal/ImportModal.js +2 -2
- package/lib/components/InlineTip/InlineTip.d.ts +0 -14
- package/lib/components/InlineTip/InlineTip.js +13 -35
- package/lib/components/InlineTip/utils.js +1 -1
- package/lib/components/InterstitialScreen/InterstitialScreen.d.ts +0 -26
- package/lib/components/InterstitialScreen/InterstitialScreen.js +22 -56
- package/lib/components/MultiAddSelect/MultiAddSelect.d.ts +4 -0
- package/lib/components/MultiAddSelect/MultiAddSelect.js +2 -1
- package/lib/components/Nav/Nav.js +3 -3
- package/lib/components/Nav/NavItem.js +12 -13
- package/lib/components/Nav/NavList.js +18 -19
- package/lib/components/NonLinearReading/NonLinearReading.js +1 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.d.ts +53 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.js +89 -71
- package/lib/components/OptionsTile/OptionsTile.js +4 -3
- package/lib/components/PageHeader/PageHeader.js +19 -19
- package/lib/components/PageHeader/PageHeaderTitle.js +1 -1
- package/lib/components/PageHeader/PageHeaderUtils.js +1 -1
- package/lib/components/ProductiveCard/ProductiveCard.js +1 -1
- package/lib/components/RemoveModal/RemoveModal.js +2 -2
- package/lib/components/Saving/Saving.js +4 -4
- package/lib/components/ScrollGradient/ScrollGradient.js +6 -6
- package/lib/components/SearchBar/SearchBar.js +6 -6
- package/lib/components/SidePanel/SidePanel.js +45 -45
- package/lib/components/SimpleHeader/SimpleHeader.js +4 -4
- package/lib/components/StatusIcon/StatusIcon.js +1 -1
- package/lib/components/StatusIndicator/StatusIndicator.js +2 -2
- package/lib/components/StatusIndicator/StatusIndicatorStep.js +1 -1
- package/lib/components/StringFormatter/StringFormatter.js +4 -4
- package/lib/components/TagOverflow/TagOverflow.js +7 -7
- package/lib/components/TagOverflow/TagOverflowModal.js +4 -4
- package/lib/components/TagOverflow/TagOverflowPopover.js +13 -13
- package/lib/components/TagSet/TagSet.js +15 -15
- package/lib/components/TagSet/TagSetModal.js +6 -6
- package/lib/components/TagSet/TagSetOverflow.js +3 -3
- package/lib/components/Tearsheet/Tearsheet.js +2 -2
- package/lib/components/Tearsheet/TearsheetNarrow.js +1 -1
- package/lib/components/Tearsheet/TearsheetShell.js +6 -6
- package/lib/components/Toolbar/Toolbar.js +6 -6
- package/lib/components/Toolbar/ToolbarButton.js +4 -4
- package/lib/components/TruncatedList/TruncatedList.js +8 -8
- package/lib/components/UserAvatar/UserAvatar.js +4 -4
- package/lib/components/UserProfileImage/UserProfileImage.js +2 -2
- package/lib/components/WebTerminal/WebTerminal.js +8 -8
- package/lib/global/js/hooks/useControllableState.js +1 -1
- package/lib/global/js/hooks/useCreateComponentFocus.js +1 -1
- package/lib/global/js/hooks/useCreateComponentStepChange.js +10 -10
- package/lib/global/js/hooks/useFocus.js +19 -19
- package/lib/global/js/hooks/useOverflowItems/index.d.ts +7 -0
- package/lib/global/js/hooks/{useOverflowItems.js → useOverflowItems/useOverflowItems.js} +16 -16
- package/lib/global/js/hooks/useOverflowString.js +6 -6
- package/lib/global/js/hooks/usePresence.d.ts +23 -0
- package/lib/global/js/hooks/usePresence.js +26 -6
- package/lib/global/js/hooks/useResetCreateComponent.js +1 -1
- package/lib/global/js/hooks/useResizeObserver.js +5 -5
- package/lib/global/js/hooks/useRetrieveStepData.js +1 -1
- package/lib/global/js/package-settings.js +4 -4
- package/lib/global/js/utils/Wrap.js +2 -2
- package/lib/global/js/utils/checkForOverflow.js +1 -1
- package/lib/global/js/utils/debounce.d.ts +1 -1
- package/lib/global/js/utils/debounce.js +2 -2
- package/lib/global/js/utils/getSupportedLocale.d.ts +2 -0
- package/lib/global/js/utils/getSupportedLocale.js +2 -0
- package/lib/global/js/utils/lastIndexInArray.js +1 -1
- package/lib/global/js/utils/props-helper.js +1 -1
- package/lib/node_modules/@carbon/icon-helpers/es/index.js +2 -2
- package/lib/node_modules/@carbon/icons-react/es/Icon.js +2 -2
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-10.js +902 -871
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-3.js +824 -823
- package/lib/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
- package/lib/settings.js +2 -2
- package/package.json +19 -19
- package/scss/components/Datagrid/styles/addons/_FilterPanel.scss +100 -22
- package/scss/components/Datagrid/styles/addons/_animations.scss +56 -0
- package/scss/components/FilterSummary/_animations.scss +20 -0
- package/scss/components/FilterSummary/_filter-summary.scss +11 -0
- package/scss/components/FullPageError/_full-page-error.scss +4 -0
- package/scss/components/GetStartedCard/_get-started-card.scss +2 -2
- package/scss/components/NotificationsPanel/_notifications-panel.scss +35 -7
- package/scss/components/SidePanel/_side-panel.scss +4 -2
- package/scss/components/Tearsheet/_tearsheet.scss +6 -12
- package/telemetry.yml +9 -17
- package/es/components/Datagrid/Datagrid/addons/Filtering/motion/variants.d.ts +0 -60
- package/es/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +0 -80
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +0 -25
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +0 -146
- package/es/components/SteppedAnimatedMedia/index.d.ts +0 -8
- package/es/global/js/utils/getBezierValues.d.ts +0 -1
- package/es/global/js/utils/getBezierValues.js +0 -28
- package/es/global/js/utils/motionConstants.d.ts +0 -23
- package/es/global/js/utils/motionConstants.js +0 -39
- package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.d.ts +0 -60
- package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +0 -84
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +0 -25
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +0 -148
- package/lib/components/SteppedAnimatedMedia/index.d.ts +0 -8
- package/lib/global/js/utils/getBezierValues.d.ts +0 -1
- package/lib/global/js/utils/getBezierValues.js +0 -30
- package/lib/global/js/utils/motionConstants.d.ts +0 -23
- package/lib/global/js/utils/motionConstants.js +0 -42
- /package/es/global/js/hooks/{useOverflowItems.d.ts → useOverflowItems/useOverflowItems.d.ts} +0 -0
- /package/lib/global/js/hooks/{useOverflowItems.d.ts → useOverflowItems/useOverflowItems.d.ts} +0 -0
@@ -54,19 +54,19 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
54
54
|
cellSize: cellSize
|
55
55
|
}) || {};
|
56
56
|
useEffect(function () {
|
57
|
-
if ((previousState === null || previousState ===
|
57
|
+
if ((previousState === null || previousState === void 0 ? void 0 : previousState.cellSize) !== cellSize) {
|
58
58
|
var _current;
|
59
|
-
var scrollContainer = ref === null || ref ===
|
60
|
-
var hasScrollBar = (scrollContainer === null || scrollContainer ===
|
59
|
+
var scrollContainer = ref === null || ref === void 0 || (_current = ref.current) === null || _current === void 0 ? void 0 : _current.querySelector(".".concat(blockClass, "__list--container"));
|
60
|
+
var hasScrollBar = (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.scrollHeight) && (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.clientHeight) && (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.scrollHeight) > (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.clientHeight);
|
61
61
|
var scrollBarValue = hasScrollBar ? 0 : scrollBarSize;
|
62
62
|
|
63
63
|
// fix for a11y violation element_scrollable_tabbable
|
64
|
-
if (!(scrollContainer !== null && scrollContainer !==
|
65
|
-
scrollContainer === null || scrollContainer ===
|
64
|
+
if (!(scrollContainer !== null && scrollContainer !== void 0 && scrollContainer.getAttribute('tabIndex'))) {
|
65
|
+
scrollContainer === null || scrollContainer === void 0 || scrollContainer.setAttribute('tabIndex', '0');
|
66
66
|
}
|
67
67
|
setScrollBarSizeValue(scrollBarValue);
|
68
68
|
}
|
69
|
-
}, [cellSize, ref, scrollBarSize, previousState === null || previousState ===
|
69
|
+
}, [cellSize, ref, scrollBarSize, previousState === null || previousState === void 0 ? void 0 : previousState.cellSize]);
|
70
70
|
var handleColumnHeaderClick = function handleColumnHeaderClick(index) {
|
71
71
|
return function (event) {
|
72
72
|
var isHoldingCommandKey = checkForHoldingKey(event, 'cmd');
|
@@ -107,10 +107,10 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
107
107
|
// Remove columns, need to call handleHeaderCellSelection
|
108
108
|
return;
|
109
109
|
}
|
110
|
-
var selectionAreaToClone = selectionAreas === null || selectionAreas ===
|
111
|
-
return (item === null || item ===
|
110
|
+
var selectionAreaToClone = selectionAreas === null || selectionAreas === void 0 ? void 0 : selectionAreas.filter(function (item) {
|
111
|
+
return (item === null || item === void 0 ? void 0 : item.matcher) === currentMatcher;
|
112
112
|
});
|
113
|
-
var selectionAreaElement = ref.current.querySelector("[data-matcher-id=\"".concat(selectionAreaToClone === null || selectionAreaToClone ===
|
113
|
+
var selectionAreaElement = ref.current.querySelector("[data-matcher-id=\"".concat(selectionAreaToClone === null || selectionAreaToClone === void 0 || (_selectionAreaToClone = selectionAreaToClone[0]) === null || _selectionAreaToClone === void 0 ? void 0 : _selectionAreaToClone.matcher, "\"]"));
|
114
114
|
if (selectionAreaElement) {
|
115
115
|
selectionAreaElement.classList.add("".concat(blockClass, "__selection-area--element"));
|
116
116
|
}
|
@@ -121,12 +121,12 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
121
121
|
var headerButtonCoords = event.target.getBoundingClientRect();
|
122
122
|
var headerIndex = event.target.getAttribute('data-column-index');
|
123
123
|
var offsetXValue = clickXPosition - headerButtonCoords.left;
|
124
|
-
var lowestColumnIndexFromSelectionArea = Math.min((selectionAreaToClone === null || selectionAreaToClone ===
|
125
|
-
var selectionAreaCoords = (selectionAreaElement === null || selectionAreaElement ===
|
126
|
-
var updatedOffsetDifference = lowestColumnIndexFromSelectionArea < parseInt(headerIndex) ? offsetXValue + (headerButtonCoords.left - (selectionAreaCoords === null || selectionAreaCoords ===
|
127
|
-
var bodyContainer = (_document = document) === null || _document ===
|
128
|
-
var selectionAreaClonedElement = selectionAreaElement === null || selectionAreaElement ===
|
129
|
-
var reorderIndicatorLine = selectionAreaElement === null || selectionAreaElement ===
|
124
|
+
var lowestColumnIndexFromSelectionArea = Math.min((selectionAreaToClone === null || selectionAreaToClone === void 0 || (_selectionAreaToClone2 = selectionAreaToClone[0]) === null || _selectionAreaToClone2 === void 0 || (_selectionAreaToClone2 = _selectionAreaToClone2.point1) === null || _selectionAreaToClone2 === void 0 ? void 0 : _selectionAreaToClone2.column) || 0, (selectionAreaToClone === null || selectionAreaToClone === void 0 || (_selectionAreaToClone3 = selectionAreaToClone[0]) === null || _selectionAreaToClone3 === void 0 || (_selectionAreaToClone3 = _selectionAreaToClone3.point2) === null || _selectionAreaToClone3 === void 0 ? void 0 : _selectionAreaToClone3.column) || 0);
|
125
|
+
var selectionAreaCoords = (selectionAreaElement === null || selectionAreaElement === void 0 ? void 0 : selectionAreaElement.getBoundingClientRect()) || new DOMRect();
|
126
|
+
var updatedOffsetDifference = lowestColumnIndexFromSelectionArea < parseInt(headerIndex) ? offsetXValue + (headerButtonCoords.left - (selectionAreaCoords === null || selectionAreaCoords === void 0 ? void 0 : selectionAreaCoords.left)) : offsetXValue;
|
127
|
+
var bodyContainer = (_document = document) === null || _document === void 0 || (_document = _document.querySelector(".".concat(blockClass, "__list--container"))) === null || _document === void 0 ? void 0 : _document.firstElementChild;
|
128
|
+
var selectionAreaClonedElement = selectionAreaElement === null || selectionAreaElement === void 0 ? void 0 : selectionAreaElement.cloneNode();
|
129
|
+
var reorderIndicatorLine = selectionAreaElement === null || selectionAreaElement === void 0 ? void 0 : selectionAreaElement.cloneNode();
|
130
130
|
if (reorderIndicatorLine) {
|
131
131
|
reorderIndicatorLine.className = "".concat(blockClass, "__reorder-indicator-line");
|
132
132
|
reorderIndicatorLine.style.width = px(2);
|
@@ -134,9 +134,9 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
134
134
|
selectionAreaClonedElement.classList.add("".concat(blockClass, "__selection-area--element-cloned"));
|
135
135
|
selectionAreaClonedElement.setAttribute('data-clone-offset-x', "".concat(updatedOffsetDifference));
|
136
136
|
selectionAreaClonedElement.setAttribute('data-column-index-original', index);
|
137
|
-
bodyContainer === null || bodyContainer ===
|
138
|
-
bodyContainer === null || bodyContainer ===
|
139
|
-
setHeaderCellHoldActive === null || setHeaderCellHoldActive ===
|
137
|
+
bodyContainer === null || bodyContainer === void 0 || bodyContainer.appendChild(selectionAreaClonedElement);
|
138
|
+
bodyContainer === null || bodyContainer === void 0 || bodyContainer.appendChild(reorderIndicatorLine);
|
139
|
+
setHeaderCellHoldActive === null || setHeaderCellHoldActive === void 0 || setHeaderCellHoldActive(true);
|
140
140
|
};
|
141
141
|
};
|
142
142
|
useSpreadsheetMouseMove({
|
@@ -147,7 +147,7 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
147
147
|
return /*#__PURE__*/React__default.createElement("div", {
|
148
148
|
className: cx("".concat(blockClass, "__header--container")),
|
149
149
|
role: "rowgroup"
|
150
|
-
}, headerGroups === null || headerGroups ===
|
150
|
+
}, headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(function (headerGroup, index) {
|
151
151
|
var headerProps = prepareProps(headerGroup.getHeaderGroupProps(), 'key');
|
152
152
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
153
153
|
key: "header_".concat(index)
|
@@ -169,8 +169,8 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
169
169
|
role: "columnheader",
|
170
170
|
className: "".concat(blockClass, "__select-all-cell-container"),
|
171
171
|
style: {
|
172
|
-
width: defaultColumn === null || defaultColumn ===
|
173
|
-
height: defaultColumn === null || defaultColumn ===
|
172
|
+
width: defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeaderWidth,
|
173
|
+
height: defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeight
|
174
174
|
}
|
175
175
|
}, /*#__PURE__*/React__default.createElement("button", {
|
176
176
|
id: "".concat(blockClass, "__cell--header--header"),
|
@@ -178,12 +178,12 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
178
178
|
"data-column-index": "header",
|
179
179
|
type: "button",
|
180
180
|
style: {
|
181
|
-
width: defaultColumn === null || defaultColumn ===
|
181
|
+
width: defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeaderWidth
|
182
182
|
},
|
183
183
|
tabIndex: -1,
|
184
184
|
"aria-label": selectAllAriaLabel,
|
185
185
|
onClick: handleSelectAllClick,
|
186
|
-
className: cx("".concat(blockClass, "__th"), "".concat(blockClass, "--interactive-cell-element"), "".concat(blockClass, "__th--select-all"), _defineProperty({}, "".concat(blockClass, "__th--active-header"), (activeCellCoordinates === null || activeCellCoordinates ===
|
186
|
+
className: cx("".concat(blockClass, "__th"), "".concat(blockClass, "--interactive-cell-element"), "".concat(blockClass, "__th--select-all"), _defineProperty({}, "".concat(blockClass, "__th--active-header"), (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'header' && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'header'))
|
187
187
|
}, "\xA0")), headerGroup.headers.map(function (column, index) {
|
188
188
|
var colProps = prepareProps(column.getHeaderProps(), 'key');
|
189
189
|
var selectedHeader = checkSelectedHeaderCell(index, selectionAreas, 'column', rows);
|
@@ -202,10 +202,10 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
202
202
|
} : undefined,
|
203
203
|
onClick: !selectedHeader ? handleColumnHeaderClick(index) : undefined,
|
204
204
|
style: {
|
205
|
-
height: defaultColumn === null || defaultColumn ===
|
206
|
-
width: (column === null || column ===
|
205
|
+
height: defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeight,
|
206
|
+
width: (column === null || column === void 0 ? void 0 : column.width) || (defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.width)
|
207
207
|
},
|
208
|
-
className: cx("".concat(blockClass, "__th"), "".concat(blockClass, "--interactive-cell-element"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__th--active-header"), (activeCellCoordinates === null || activeCellCoordinates ===
|
208
|
+
className: cx("".concat(blockClass, "__th"), "".concat(blockClass, "--interactive-cell-element"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__th--active-header"), (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === index || checkActiveHeaderCell(index, selectionAreas, 'column')), "".concat(blockClass, "__th--active-header-disabledSwapping"), disableColumnSwapping || readOnlyTable), "".concat(blockClass, "__th--selected-header"), selectedHeader), "".concat(blockClass, "__th--selected-header-reorder-active"), selectedHeaderReorderActive)),
|
209
209
|
type: "button"
|
210
210
|
}, column.render('Header')));
|
211
211
|
}));
|
@@ -22,9 +22,9 @@ var useMoveActiveCell = function useMoveActiveCell(_ref) {
|
|
22
22
|
performCreateActiveCell();
|
23
23
|
}, [activeCellContent, performCreateActiveCell, isActiveHeaderCellChanged]);
|
24
24
|
performCreateActiveCell = useCallback(function () {
|
25
|
-
var activeCellPlacementElement = spreadsheetRef === null || spreadsheetRef ===
|
26
|
-
var shouldPlaceActiveCellInHeader = (activeCellCoordinates === null || activeCellCoordinates ===
|
27
|
-
var selectAllElement = spreadsheetRef === null || spreadsheetRef ===
|
25
|
+
var activeCellPlacementElement = spreadsheetRef === null || spreadsheetRef === void 0 ? void 0 : spreadsheetRef.current.querySelector("[data-row-index=\"".concat(activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row, "\"][data-column-index=\"").concat(activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column, "\"]"));
|
26
|
+
var shouldPlaceActiveCellInHeader = (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'header' && true;
|
27
|
+
var selectAllElement = spreadsheetRef === null || spreadsheetRef === void 0 ? void 0 : spreadsheetRef.current.querySelector("[data-row-index=\"header\"][data-column-index=\"header\"]");
|
28
28
|
if (containerHasFocus) {
|
29
29
|
createActiveCell({
|
30
30
|
placementElement: activeCellCoordinates ? activeCellPlacementElement : selectAllElement,
|
@@ -98,7 +98,7 @@ var useMultipleKeyTracking = function useMultipleKeyTracking(_ref) {
|
|
98
98
|
}
|
99
99
|
};
|
100
100
|
}
|
101
|
-
if (previousState !== null && previousState !==
|
101
|
+
if (previousState !== null && previousState !== void 0 && previousState.windowFocused && !windowFocused) {
|
102
102
|
setKeysPressedList([]);
|
103
103
|
}
|
104
104
|
// Remove handlers if the spreadsheet container loses focus
|
@@ -106,11 +106,11 @@ var useMultipleKeyTracking = function useMultipleKeyTracking(_ref) {
|
|
106
106
|
if (ref && !containerHasFocus || isEditing) {
|
107
107
|
ref.current.onkeydown = undefined;
|
108
108
|
ref.current.onkeyup = undefined;
|
109
|
-
if (!(previousState !== null && previousState !==
|
109
|
+
if (!(previousState !== null && previousState !== void 0 && previousState.isEditing) && isEditing || previousState !== null && previousState !== void 0 && previousState.containerHasFocus && !containerHasFocus) {
|
110
110
|
setKeysPressedList([]);
|
111
111
|
}
|
112
112
|
}
|
113
|
-
}, [keysPressedList, containerHasFocus, ref, isEditing, previousState === null || previousState ===
|
113
|
+
}, [keysPressedList, containerHasFocus, ref, isEditing, previousState === null || previousState === void 0 ? void 0 : previousState.isEditing, previousState === null || previousState === void 0 ? void 0 : previousState.containerHasFocus, windowFocused, previousState === null || previousState === void 0 ? void 0 : previousState.windowFocused, usingMac]);
|
114
114
|
return {
|
115
115
|
keysPressedList: keysPressedList,
|
116
116
|
windowFocused: windowFocused,
|
@@ -10,7 +10,7 @@ import { pkg } from '../../../settings.js';
|
|
10
10
|
|
11
11
|
var useResetSpreadsheetFocus = function useResetSpreadsheetFocus(_ref) {
|
12
12
|
var _ref$blockClass = _ref.blockClass,
|
13
|
-
blockClass = _ref$blockClass ===
|
13
|
+
blockClass = _ref$blockClass === void 0 ? "".concat(pkg.prefix, "--data-spreadsheet") : _ref$blockClass,
|
14
14
|
focusedElement = _ref.focusedElement,
|
15
15
|
removeActiveCell = _ref.removeActiveCell,
|
16
16
|
setContainerHasFocus = _ref.setContainerHasFocus;
|
@@ -22,7 +22,7 @@ var useSpreadsheetEdit = function useSpreadsheetEdit(_ref) {
|
|
22
22
|
defaultColumn = _ref.defaultColumn,
|
23
23
|
cellEditorValue = _ref.cellEditorValue,
|
24
24
|
_ref$blockClass = _ref.blockClass,
|
25
|
-
blockClass = _ref$blockClass ===
|
25
|
+
blockClass = _ref$blockClass === void 0 ? "".concat(pkg.prefix, "--data-spreadsheet") : _ref$blockClass;
|
26
26
|
var _useState = useState(null),
|
27
27
|
_useState2 = _slicedToArray(_useState, 2),
|
28
28
|
nextIndex = _useState2[0],
|
@@ -31,28 +31,28 @@ var useSpreadsheetEdit = function useSpreadsheetEdit(_ref) {
|
|
31
31
|
nextIndex: nextIndex
|
32
32
|
});
|
33
33
|
useEffect(function () {
|
34
|
-
if (!(previousState !== null && previousState !==
|
35
|
-
setNextIndex(activeCellCoordinates === null || activeCellCoordinates ===
|
34
|
+
if (!(previousState !== null && previousState !== void 0 && previousState.nextIndex)) {
|
35
|
+
setNextIndex(activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column);
|
36
36
|
}
|
37
|
-
}, [previousState === null || previousState ===
|
37
|
+
}, [previousState === null || previousState === void 0 ? void 0 : previousState.nextIndex, activeCellCoordinates]);
|
38
38
|
useEffect(function () {
|
39
39
|
var rulerWidth = cellEditorRulerRef.current.offsetWidth;
|
40
40
|
var cellEditorCurrentWidth = parseInt(cellEditorRef.current.style.width);
|
41
41
|
if (isEditing) {
|
42
42
|
var _rows$activeCellCoord, _cellProps$column, _cellEditorRef$curren;
|
43
|
-
var cellProps = (_rows$activeCellCoord = rows[activeCellCoordinates === null || activeCellCoordinates ===
|
44
|
-
var activeCellLeftPosition = activeCellRef === null || activeCellRef ===
|
45
|
-
var activeCellTopPosition = activeCellRef === null || activeCellRef ===
|
43
|
+
var cellProps = (_rows$activeCellCoord = rows[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row]) === null || _rows$activeCellCoord === void 0 ? void 0 : _rows$activeCellCoord.cells[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column];
|
44
|
+
var activeCellLeftPosition = activeCellRef === null || activeCellRef === void 0 ? void 0 : activeCellRef.current.style.left;
|
45
|
+
var activeCellTopPosition = activeCellRef === null || activeCellRef === void 0 ? void 0 : activeCellRef.current.style.top;
|
46
46
|
cellEditorRef.current.style.left = activeCellLeftPosition;
|
47
47
|
cellEditorRef.current.style.top = activeCellTopPosition;
|
48
48
|
cellEditorRef.current.style.display = 'block';
|
49
|
-
cellEditorRef.current.style.height = activeCellRef === null || activeCellRef ===
|
50
|
-
cellEditorRef.current.style.paddingTop = "".concat((parseInt(activeCellRef === null || activeCellRef ===
|
51
|
-
cellEditorRef.current.style.textAlign = (cellProps === null || cellProps ===
|
52
|
-
(_cellEditorRef$curren = cellEditorRef.current) === null || _cellEditorRef$curren ===
|
49
|
+
cellEditorRef.current.style.height = activeCellRef === null || activeCellRef === void 0 ? void 0 : activeCellRef.current.style.height;
|
50
|
+
cellEditorRef.current.style.paddingTop = "".concat((parseInt(activeCellRef === null || activeCellRef === void 0 ? void 0 : activeCellRef.current.style.height) - 16) / 2 - 1, "px"); // calculate paddingTop based on cellHeight which could be variable depending on the cellSize prop
|
51
|
+
cellEditorRef.current.style.textAlign = (cellProps === null || cellProps === void 0 || (_cellProps$column = cellProps.column) === null || _cellProps$column === void 0 ? void 0 : _cellProps$column.placement) === 'right' ? 'right' : 'left';
|
52
|
+
(_cellEditorRef$curren = cellEditorRef.current) === null || _cellEditorRef$curren === void 0 || _cellEditorRef$curren.focus();
|
53
53
|
if (rulerWidth < cellEditorCurrentWidth) {
|
54
54
|
var _visibleColumns$nextI;
|
55
|
-
var currentColumnWidth = ((_visibleColumns$nextI = visibleColumns[nextIndex]) === null || _visibleColumns$nextI ===
|
55
|
+
var currentColumnWidth = ((_visibleColumns$nextI = visibleColumns[nextIndex]) === null || _visibleColumns$nextI === void 0 ? void 0 : _visibleColumns$nextI.width) || (defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.width);
|
56
56
|
// If the contents of the cell editor is deleted past the point of the next column
|
57
57
|
if (rulerWidth < cellEditorCurrentWidth - currentColumnWidth) {
|
58
58
|
cellEditorRef.current.style.width = px(parseInt(cellEditorRef.current.style.width) - currentColumnWidth);
|
@@ -74,8 +74,8 @@ var useSpreadsheetEdit = function useSpreadsheetEdit(_ref) {
|
|
74
74
|
return prev + 1;
|
75
75
|
});
|
76
76
|
var onLastColumnIndex = nextIndex + 1 === visibleColumns.length;
|
77
|
-
var nextColumnWidth = onLastColumnIndex ? 0 : ((_visibleColumns = visibleColumns[nextIndex + 1]) === null || _visibleColumns ===
|
78
|
-
var startingRowPosition = activeCellCoordinates === null || activeCellCoordinates ===
|
77
|
+
var nextColumnWidth = onLastColumnIndex ? 0 : ((_visibleColumns = visibleColumns[nextIndex + 1]) === null || _visibleColumns === void 0 ? void 0 : _visibleColumns.width) || (defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.width);
|
78
|
+
var startingRowPosition = activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row;
|
79
79
|
var totalRows = rows.length;
|
80
80
|
var totalCellEditorMaxHeight = (totalRows - startingRowPosition) * defaultColumn.rowHeight;
|
81
81
|
cellEditorRef.current.style.maxHeight = px(totalCellEditorMaxHeight);
|
@@ -96,9 +96,9 @@ var useSpreadsheetEdit = function useSpreadsheetEdit(_ref) {
|
|
96
96
|
cellEditorRef.current.style.display = 'none';
|
97
97
|
cellEditorRef.current.blur();
|
98
98
|
activeCellRef.current.focus();
|
99
|
-
setNextIndex(activeCellCoordinates === null || activeCellCoordinates ===
|
99
|
+
setNextIndex(activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column);
|
100
100
|
}
|
101
|
-
}, [isEditing, activeCellCoordinates, rows, cellEditorValue, defaultColumn, activeCellRef, cellEditorRef, cellEditorRulerRef, visibleColumns, blockClass, previousState === null || previousState ===
|
101
|
+
}, [isEditing, activeCellCoordinates, rows, cellEditorValue, defaultColumn, activeCellRef, cellEditorRef, cellEditorRulerRef, visibleColumns, blockClass, previousState === null || previousState === void 0 ? void 0 : previousState.cellEditorValue, nextIndex]);
|
102
102
|
};
|
103
103
|
|
104
104
|
export { useSpreadsheetEdit };
|
@@ -15,7 +15,7 @@ import { moveColumnIndicatorLine } from '../utils/moveColumnIndicatorLine.js';
|
|
15
15
|
var useSpreadsheetMouseMove = function useSpreadsheetMouseMove(_ref) {
|
16
16
|
var ref = _ref.ref,
|
17
17
|
_ref$blockClass = _ref.blockClass,
|
18
|
-
blockClass = _ref$blockClass ===
|
18
|
+
blockClass = _ref$blockClass === void 0 ? "".concat(pkg.prefix, "--data-spreadsheet") : _ref$blockClass,
|
19
19
|
headerCellHoldActive = _ref.headerCellHoldActive,
|
20
20
|
defaultColumn = _ref.defaultColumn;
|
21
21
|
useEffect(function () {
|
@@ -36,10 +36,10 @@ var useSpreadsheetMouseMove = function useSpreadsheetMouseMove(_ref) {
|
|
36
36
|
var spreadsheetWrapperElement = ref.current;
|
37
37
|
spreadsheetWrapperElement.getBoundingClientRect();
|
38
38
|
var xPositionRelativeToSpreadsheet = event.clientX - spreadsheetCoords.left;
|
39
|
-
var offsetXValue = clonedSelectionElement === null || clonedSelectionElement ===
|
39
|
+
var offsetXValue = clonedSelectionElement === null || clonedSelectionElement === void 0 ? void 0 : clonedSelectionElement.getAttribute('data-clone-offset-x');
|
40
40
|
var totalSpreadsheetScrollingWidth = listContainer.scrollWidth;
|
41
41
|
var clonedSelectionWidth = clonedSelectionElement.offsetWidth;
|
42
|
-
var clonePlacement = Math.max(xPositionRelativeToSpreadsheet - offsetXValue, defaultColumn === null || defaultColumn ===
|
42
|
+
var clonePlacement = Math.max(xPositionRelativeToSpreadsheet - offsetXValue, defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeaderWidth);
|
43
43
|
var leftPosition = totalSpreadsheetScrollingWidth - clonedSelectionWidth >= clonePlacement ? clonePlacement + scrollAmount : totalSpreadsheetScrollingWidth - clonedSelectionWidth;
|
44
44
|
// Moves the position of the cloned selection area to follow mouse, and
|
45
45
|
// add the amount horizontally scrolled
|
@@ -52,10 +52,10 @@ var useSpreadsheetMouseMove = function useSpreadsheetMouseMove(_ref) {
|
|
52
52
|
}
|
53
53
|
var spreadsheetRef = ref.current;
|
54
54
|
if (!headerCellHoldActive) {
|
55
|
-
spreadsheetRef === null || spreadsheetRef ===
|
55
|
+
spreadsheetRef === null || spreadsheetRef === void 0 || spreadsheetRef.removeEventListener('mousemove', _handleMouseMove);
|
56
56
|
}
|
57
57
|
return function () {
|
58
|
-
spreadsheetRef === null || spreadsheetRef ===
|
58
|
+
spreadsheetRef === null || spreadsheetRef === void 0 || spreadsheetRef.removeEventListener('mousemove', _handleMouseMove);
|
59
59
|
};
|
60
60
|
});
|
61
61
|
};
|
@@ -20,7 +20,7 @@ var useSpreadsheetMouseUp = function useSpreadsheetMouseUp(_ref) {
|
|
20
20
|
setValidStartingPoint = _ref.setValidStartingPoint,
|
21
21
|
validStartingPoint = _ref.validStartingPoint,
|
22
22
|
_ref$blockClass = _ref.blockClass,
|
23
|
-
blockClass = _ref$blockClass ===
|
23
|
+
blockClass = _ref$blockClass === void 0 ? "".concat(pkg.prefix, "--data-spreadsheet") : _ref$blockClass,
|
24
24
|
ref = _ref.ref,
|
25
25
|
setHeaderCellHoldActive = _ref.setHeaderCellHoldActive,
|
26
26
|
setColumnOrder = _ref.setColumnOrder,
|
@@ -34,7 +34,7 @@ var useSpreadsheetMouseUp = function useSpreadsheetMouseUp(_ref) {
|
|
34
34
|
var handleMouseUp = function handleMouseUp(event) {
|
35
35
|
var _selectionAreas$;
|
36
36
|
var isHoldingColumn = false;
|
37
|
-
if (selectionAreas !== null && selectionAreas !==
|
37
|
+
if (selectionAreas !== null && selectionAreas !== void 0 && (_selectionAreas$ = selectionAreas[0]) !== null && _selectionAreas$ !== void 0 && _selectionAreas$.header && selectionAreas[0].header.type === 'column') {
|
38
38
|
isHoldingColumn = true;
|
39
39
|
}
|
40
40
|
// Remove the cloned selection area on mouse up
|
@@ -49,10 +49,10 @@ var useSpreadsheetMouseUp = function useSpreadsheetMouseUp(_ref) {
|
|
49
49
|
if (selectionAreaCloneElement) {
|
50
50
|
var _selectionAreaElement;
|
51
51
|
var closestCell = event.target.closest(".".concat(blockClass, "--interactive-cell-element"));
|
52
|
-
var newColumnIndex = parseInt === null || parseInt ===
|
53
|
-
var originalColumnIndex = parseInt === null || parseInt ===
|
52
|
+
var newColumnIndex = parseInt === null || parseInt === void 0 ? void 0 : parseInt(closestCell === null || closestCell === void 0 ? void 0 : closestCell.getAttribute('data-column-index'));
|
53
|
+
var originalColumnIndex = parseInt === null || parseInt === void 0 ? void 0 : parseInt(selectionAreaCloneElement === null || selectionAreaCloneElement === void 0 ? void 0 : selectionAreaCloneElement.getAttribute('data-column-index-original'));
|
54
54
|
var selectionAreaToClone = selectionAreas.filter(function (item) {
|
55
|
-
return (item === null || item ===
|
55
|
+
return (item === null || item === void 0 ? void 0 : item.matcher) === currentMatcher;
|
56
56
|
});
|
57
57
|
var selectionAreaIndexArray = selectionAreaToClone[0].header.selectedIndexList;
|
58
58
|
var columnToMoveToElement = ref.current.querySelector("[data-row-index=\"header\"][data-column-index=\"".concat(newColumnIndex, "\"]"));
|
@@ -133,9 +133,9 @@ var useSpreadsheetMouseUp = function useSpreadsheetMouseUp(_ref) {
|
|
133
133
|
}
|
134
134
|
// Remove the cloned column and indicator elements
|
135
135
|
var indicatorLineElement = ref.current.querySelector(".".concat(blockClass, "__reorder-indicator-line"));
|
136
|
-
indicatorLineElement === null || indicatorLineElement ===
|
137
|
-
selectionAreaCloneElement === null || selectionAreaCloneElement ===
|
138
|
-
selectionAreaElement === null || selectionAreaElement ===
|
136
|
+
indicatorLineElement === null || indicatorLineElement === void 0 || indicatorLineElement.remove();
|
137
|
+
selectionAreaCloneElement === null || selectionAreaCloneElement === void 0 || selectionAreaCloneElement.remove();
|
138
|
+
selectionAreaElement === null || selectionAreaElement === void 0 || (_selectionAreaElement = selectionAreaElement.classList) === null || _selectionAreaElement === void 0 || _selectionAreaElement.remove("".concat(blockClass, "__selection-area--element"));
|
139
139
|
setSelectedHeaderReorderActive(false);
|
140
140
|
}
|
141
141
|
}
|
@@ -14,7 +14,7 @@ var useSpreadsheetOutsideClick = function useSpreadsheetOutsideClick(_ref) {
|
|
14
14
|
var isBlurSpreadsheet = _ref.isBlurSpreadsheet,
|
15
15
|
spreadsheetRef = _ref.spreadsheetRef,
|
16
16
|
_ref$blockClass = _ref.blockClass,
|
17
|
-
blockClass = _ref$blockClass ===
|
17
|
+
blockClass = _ref$blockClass === void 0 ? "".concat(pkg.prefix, "--data-spreadsheet") : _ref$blockClass,
|
18
18
|
setActiveCellCoordinates = _ref.setActiveCellCoordinates,
|
19
19
|
setSelectionAreas = _ref.setSelectionAreas,
|
20
20
|
removeActiveCell = _ref.removeActiveCell,
|
@@ -16,14 +16,14 @@ var checkActiveHeaderCell = function checkActiveHeaderCell(headerIndex, selectio
|
|
16
16
|
var activeRowIndexes = [];
|
17
17
|
areasCloned.forEach(function (area) {
|
18
18
|
var _area$point, _area$point2, _area$point3, _area$point4;
|
19
|
-
var greatestRowIndex = Math.max((_area$point = area.point1) === null || _area$point ===
|
20
|
-
var lowestRowIndex = Math.min((_area$point3 = area.point1) === null || _area$point3 ===
|
19
|
+
var greatestRowIndex = Math.max((_area$point = area.point1) === null || _area$point === void 0 ? void 0 : _area$point[headerType], (_area$point2 = area.point2) === null || _area$point2 === void 0 ? void 0 : _area$point2[headerType]);
|
20
|
+
var lowestRowIndex = Math.min((_area$point3 = area.point1) === null || _area$point3 === void 0 ? void 0 : _area$point3[headerType], (_area$point4 = area.point2) === null || _area$point4 === void 0 ? void 0 : _area$point4[headerType]);
|
21
21
|
for (var i = lowestRowIndex; i <= greatestRowIndex; i++) {
|
22
22
|
activeRowIndexes.push(i);
|
23
23
|
}
|
24
24
|
});
|
25
25
|
var activeRowIndexesNoDuplicates = _toConsumableArray(new Set(activeRowIndexes));
|
26
|
-
if (areasCloned !== null && areasCloned !==
|
26
|
+
if (areasCloned !== null && areasCloned !== void 0 && areasCloned.length && activeRowIndexesNoDuplicates.includes(headerIndex)) {
|
27
27
|
return true;
|
28
28
|
}
|
29
29
|
return false;
|
@@ -12,11 +12,11 @@ var checkSelectedHeaderCell = function checkSelectedHeaderCell(headerIndex, sele
|
|
12
12
|
var isSelectedHeader = areasCloned.some(function (area) {
|
13
13
|
var _area$point, _area$point2, _area$point3, _area$point4, _area$point5, _area$point6, _area$point7, _area$point8;
|
14
14
|
var oppositeType = headerType === 'column' ? 'row' : 'column';
|
15
|
-
var minOppositeSelection = Math.min(area === null || area ===
|
16
|
-
var maxOppositeSelection = Math.max(area === null || area ===
|
17
|
-
var minSelection = Math.min(area === null || area ===
|
18
|
-
var maxSelection = Math.max(area === null || area ===
|
19
|
-
var isTrueSelectedState = (items === null || items ===
|
15
|
+
var minOppositeSelection = Math.min(area === null || area === void 0 || (_area$point = area.point1) === null || _area$point === void 0 ? void 0 : _area$point[oppositeType], area === null || area === void 0 || (_area$point2 = area.point2) === null || _area$point2 === void 0 ? void 0 : _area$point2[oppositeType]);
|
16
|
+
var maxOppositeSelection = Math.max(area === null || area === void 0 || (_area$point3 = area.point1) === null || _area$point3 === void 0 ? void 0 : _area$point3[oppositeType], area === null || area === void 0 || (_area$point4 = area.point2) === null || _area$point4 === void 0 ? void 0 : _area$point4[oppositeType]);
|
17
|
+
var minSelection = Math.min(area === null || area === void 0 || (_area$point5 = area.point1) === null || _area$point5 === void 0 ? void 0 : _area$point5[headerType], area === null || area === void 0 || (_area$point6 = area.point2) === null || _area$point6 === void 0 ? void 0 : _area$point6[headerType]);
|
18
|
+
var maxSelection = Math.max(area === null || area === void 0 || (_area$point7 = area.point1) === null || _area$point7 === void 0 ? void 0 : _area$point7[headerType], area === null || area === void 0 || (_area$point8 = area.point2) === null || _area$point8 === void 0 ? void 0 : _area$point8[headerType]);
|
19
|
+
var isTrueSelectedState = (items === null || items === void 0 ? void 0 : items.length) - 1 === maxOppositeSelection && minOppositeSelection === 0;
|
20
20
|
// console.log({minSelection, maxSelection});
|
21
21
|
// Iterate over all columns included in the selection area
|
22
22
|
for (var i = minSelection; i <= maxSelection; i++) {
|
@@ -126,7 +126,7 @@ var handleBodyCellHover = function handleBodyCellHover(cell, columnIndex) {
|
|
126
126
|
return prev;
|
127
127
|
}
|
128
128
|
// Do not update state if you're still hovering on the same cell
|
129
|
-
if (((_selectionAreaClone$i = selectionAreaClone[indexOfItemToUpdate].point2) === null || _selectionAreaClone$i ===
|
129
|
+
if (((_selectionAreaClone$i = selectionAreaClone[indexOfItemToUpdate].point2) === null || _selectionAreaClone$i === void 0 ? void 0 : _selectionAreaClone$i.row) === cellCoordinates.row && ((_selectionAreaClone$i2 = selectionAreaClone[indexOfItemToUpdate].point2) === null || _selectionAreaClone$i2 === void 0 ? void 0 : _selectionAreaClone$i2.column) === cellCoordinates.column) {
|
130
130
|
return prev;
|
131
131
|
}
|
132
132
|
selectionAreaClone[indexOfItemToUpdate].point2 = cellCoordinates;
|
@@ -198,7 +198,7 @@ var handleKeyPress = function handleKeyPress(event) {
|
|
198
198
|
|
199
199
|
// Clear out all cell selection areas if user uses any arrow key, except if the shift key is being held
|
200
200
|
if (['ArrowLeft', 'ArrowUp', 'ArrowRight', 'ArrowDown'].indexOf(key) > -1) {
|
201
|
-
if (selectionAreas !== null && selectionAreas !==
|
201
|
+
if (selectionAreas !== null && selectionAreas !== void 0 && selectionAreas.length && keysPressedList.length < 2 && !includesShift(keysPressedList)) {
|
202
202
|
setSelectionAreas([]);
|
203
203
|
setSelectionAreaData([]);
|
204
204
|
removeCellSelections({
|
@@ -206,7 +206,7 @@ var handleKeyPress = function handleKeyPress(event) {
|
|
206
206
|
});
|
207
207
|
}
|
208
208
|
}
|
209
|
-
if ((keysPressedList === null || keysPressedList ===
|
209
|
+
if ((keysPressedList === null || keysPressedList === void 0 ? void 0 : keysPressedList.length) > 1) {
|
210
210
|
handleMultipleKeys({
|
211
211
|
activeCellCoordinates: activeCellCoordinates,
|
212
212
|
event: event,
|
@@ -12,10 +12,10 @@ var createActiveCellFn = function createActiveCellFn(_ref) {
|
|
12
12
|
var placementElement = _ref.placementElement,
|
13
13
|
coords = _ref.coords,
|
14
14
|
_ref$addToHeader = _ref.addToHeader,
|
15
|
-
addToHeader = _ref$addToHeader ===
|
15
|
+
addToHeader = _ref$addToHeader === void 0 ? false : _ref$addToHeader,
|
16
16
|
contextRef = _ref.contextRef,
|
17
17
|
_ref$blockClass = _ref.blockClass,
|
18
|
-
blockClass = _ref$blockClass ===
|
18
|
+
blockClass = _ref$blockClass === void 0 ? "".concat(pkg.prefix, "--data-spreadsheet") : _ref$blockClass,
|
19
19
|
onActiveCellChange = _ref.onActiveCellChange,
|
20
20
|
activeCellValue = _ref.activeCellValue,
|
21
21
|
activeCellRef = _ref.activeCellRef,
|
@@ -29,27 +29,27 @@ var createActiveCellFn = function createActiveCellFn(_ref) {
|
|
29
29
|
var point1Element = document.querySelector("[data-row-index=\"".concat(coords.row, "\"][data-column-index=\"").concat(coords.column, "\"]")) || document.querySelector(".".concat(blockClass, "__body--td")); // if we can't find the point1 element (this can happen in the case where a virtualized row is not present anymore in the DOM), we get the default height/width of the first body cell we find
|
30
30
|
var selectionAreaCellWidth = point1Element.offsetWidth;
|
31
31
|
var selectionAreaCellHeight = point1Element.offsetHeight;
|
32
|
-
var activeElementContainer = addToHeader ? contextRef === null || contextRef ===
|
32
|
+
var activeElementContainer = addToHeader ? contextRef === null || contextRef === void 0 ? void 0 : contextRef.current.querySelector(".".concat(blockClass, "__header--container")) : contextRef === null || contextRef === void 0 ? void 0 : contextRef.current.querySelector(".".concat(blockClass, "__list--container")).firstElementChild;
|
33
33
|
var relativePosition = {
|
34
34
|
top: placementElement ? placementElement.getBoundingClientRect().top - activeElementContainer.getBoundingClientRect().top : coords.row === 0 ? 0 : selectionAreaCellHeight * coords.row,
|
35
35
|
// calculate top value here if virtualized row is not in DOM
|
36
36
|
left: placementElement ? placementElement.getBoundingClientRect().left - activeElementContainer.getBoundingClientRect().left : coords.column === 0 ? 0 + (defaultColumn.rowHeaderWidth - 4) : selectionAreaCellWidth * coords.column + (defaultColumn.rowHeaderWidth - 4) // calculate left value here if virtualized row is not in DOM, accounting for row header cell width (including borders)
|
37
37
|
};
|
38
|
-
var activeCellButton = activeCellRef === null || activeCellRef ===
|
39
|
-
activeCellButton.style.width = px(placementElement ? placementElement === null || placementElement ===
|
40
|
-
activeCellButton.style.height = px(placementElement ? placementElement === null || placementElement ===
|
38
|
+
var activeCellButton = activeCellRef === null || activeCellRef === void 0 ? void 0 : activeCellRef.current;
|
39
|
+
activeCellButton.style.width = px(placementElement ? placementElement === null || placementElement === void 0 ? void 0 : placementElement.offsetWidth : selectionAreaCellWidth);
|
40
|
+
activeCellButton.style.height = px(placementElement ? placementElement === null || placementElement === void 0 ? void 0 : placementElement.offsetHeight : selectionAreaCellHeight);
|
41
41
|
activeCellButton.style.left = px(relativePosition.left);
|
42
42
|
activeCellButton.style.top = px(relativePosition.top);
|
43
43
|
activeCellButton.style.display = 'block';
|
44
|
-
activeCellButton.setAttribute('data-active-row-index', typeof (coords === null || coords ===
|
45
|
-
activeCellButton.setAttribute('data-active-column-index', typeof (coords === null || coords ===
|
44
|
+
activeCellButton.setAttribute('data-active-row-index', typeof (coords === null || coords === void 0 ? void 0 : coords.row) === 'number' ? coords.row : 'header');
|
45
|
+
activeCellButton.setAttribute('data-active-column-index', typeof (coords === null || coords === void 0 ? void 0 : coords.column) === 'number' ? coords.column : 'header');
|
46
46
|
activeElementContainer.appendChild(activeCellButton);
|
47
47
|
activeCellButton.focus();
|
48
48
|
if (!addToHeader) {
|
49
49
|
activeElementContainer.appendChild(cellEditorRef.current);
|
50
50
|
}
|
51
|
-
if (typeof (coords === null || coords ===
|
52
|
-
onActiveCellChange === null || onActiveCellChange ===
|
51
|
+
if (typeof (coords === null || coords === void 0 ? void 0 : coords.column) === 'number' && typeof (coords === null || coords === void 0 ? void 0 : coords.row) === 'number') {
|
52
|
+
onActiveCellChange === null || onActiveCellChange === void 0 || onActiveCellChange(activeCellValue);
|
53
53
|
}
|
54
54
|
};
|
55
55
|
|
@@ -31,7 +31,7 @@ var createCellSelectionArea = function createCellSelectionArea(_ref) {
|
|
31
31
|
var selectionAreaVariableWidth = 0;
|
32
32
|
visibleColumns.forEach(function (item, index) {
|
33
33
|
if (index >= lowestColumnIndex && index <= greatestColumnIndex) {
|
34
|
-
selectionAreaVariableWidth += (item === null || item ===
|
34
|
+
selectionAreaVariableWidth += (item === null || item === void 0 ? void 0 : item.width) || (defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.width);
|
35
35
|
}
|
36
36
|
});
|
37
37
|
var point1Element = document.querySelector("[data-row-index=\"".concat(area.point1.row, "\"][data-column-index=\"").concat(area.point1.column, "\"]")) || document.querySelector(".".concat(blockClass, "__body--td")); // if we can't find the point1 element (this can happen in the case where a virtualized row is not present anymore in the DOM), we get the default height of the first body cell we find
|
@@ -26,7 +26,7 @@ var getSpreadsheetWidth = function getSpreadsheetWidth(_ref) {
|
|
26
26
|
}
|
27
27
|
if (totalVisibleColumns) {
|
28
28
|
var totalVisibleColumnWidth = visibleColumns.map(function (item, index) {
|
29
|
-
return index <= totalVisibleColumns - 1 && ((item === null || item ===
|
29
|
+
return index <= totalVisibleColumns - 1 && ((item === null || item === void 0 ? void 0 : item.width) || (defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.width));
|
30
30
|
}).reduce(function (prev, curr) {
|
31
31
|
return prev + curr;
|
32
32
|
}, 0);
|
@@ -29,11 +29,11 @@ var handleActiveCellInSelectionEnter = function handleActiveCellInSelectionEnter
|
|
29
29
|
greatestRowIndex = _getSelectionAreaPoin.greatestRowIndex;
|
30
30
|
// Move active cell down one row if possible
|
31
31
|
var coordinatesClone = _objectSpread2({}, activeCellCoordinates);
|
32
|
-
if ((activeCellCoordinates === null || activeCellCoordinates ===
|
32
|
+
if ((activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) < greatestRowIndex) {
|
33
33
|
updateActiveCellCoordinates({
|
34
34
|
coords: coordinatesClone,
|
35
35
|
updatedValue: {
|
36
|
-
row: (coordinatesClone === null || coordinatesClone ===
|
36
|
+
row: (coordinatesClone === null || coordinatesClone === void 0 ? void 0 : coordinatesClone.row) + 1
|
37
37
|
},
|
38
38
|
optOutOfSelectionAreaUpdate: true
|
39
39
|
});
|
@@ -41,12 +41,12 @@ var handleActiveCellInSelectionEnter = function handleActiveCellInSelectionEnter
|
|
41
41
|
// Move active cell to next column of selection area if it exists
|
42
42
|
// If not, find the next selection area and update active cell to
|
43
43
|
// be the first cell in that selection
|
44
|
-
if ((activeCellCoordinates === null || activeCellCoordinates ===
|
45
|
-
if ((activeCellCoordinates === null || activeCellCoordinates ===
|
44
|
+
if ((activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === greatestRowIndex) {
|
45
|
+
if ((activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) < greatestColumnIndex) {
|
46
46
|
updateActiveCellCoordinates({
|
47
47
|
coords: coordinatesClone,
|
48
48
|
updatedValue: {
|
49
|
-
column: (coordinatesClone === null || coordinatesClone ===
|
49
|
+
column: (coordinatesClone === null || coordinatesClone === void 0 ? void 0 : coordinatesClone.column) + 1,
|
50
50
|
row: lowestRowIndex
|
51
51
|
},
|
52
52
|
optOutOfSelectionAreaUpdate: true
|
@@ -54,7 +54,7 @@ var handleActiveCellInSelectionEnter = function handleActiveCellInSelectionEnter
|
|
54
54
|
}
|
55
55
|
// Move to next selection area if there is one, or back to
|
56
56
|
// the beginning of the current selection
|
57
|
-
if ((activeCellCoordinates === null || activeCellCoordinates ===
|
57
|
+
if ((activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === greatestColumnIndex) {
|
58
58
|
if (selectionAreas.length > 1) {
|
59
59
|
if (selectionAreas[activeCellIndexInSelectionAreas + 1]) {
|
60
60
|
// Update activeCellRef data-selection-id attribute to the matcher of the next selection area
|
@@ -27,10 +27,10 @@ var handleActiveCellInSelectionTab = function handleActiveCellInSelectionTab(_re
|
|
27
27
|
greatestColumnIndex = _getSelectionAreaPoin.greatestColumnIndex,
|
28
28
|
greatestRowIndex = _getSelectionAreaPoin.greatestRowIndex;
|
29
29
|
// Move active cell to next column in selection area
|
30
|
-
if ((activeCellCoordinates === null || activeCellCoordinates ===
|
30
|
+
if ((activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) < greatestColumnIndex) {
|
31
31
|
updateActiveCellCoordinates({
|
32
32
|
updatedValue: {
|
33
|
-
column: (activeCellCoordinates === null || activeCellCoordinates ===
|
33
|
+
column: (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) + 1
|
34
34
|
},
|
35
35
|
optOutOfSelectionAreaUpdate: true
|
36
36
|
});
|
@@ -38,19 +38,19 @@ var handleActiveCellInSelectionTab = function handleActiveCellInSelectionTab(_re
|
|
38
38
|
// Move active cell to next row of selection area if it exists
|
39
39
|
// If not, find the next selection area and update active cell to
|
40
40
|
// be the first cell in that selection
|
41
|
-
if ((activeCellCoordinates === null || activeCellCoordinates ===
|
42
|
-
if ((activeCellCoordinates === null || activeCellCoordinates ===
|
41
|
+
if ((activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === greatestColumnIndex) {
|
42
|
+
if ((activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) < greatestRowIndex) {
|
43
43
|
updateActiveCellCoordinates({
|
44
44
|
updatedValue: {
|
45
45
|
column: lowestColumnIndex,
|
46
|
-
row: (activeCellCoordinates === null || activeCellCoordinates ===
|
46
|
+
row: (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) + 1
|
47
47
|
},
|
48
48
|
optOutOfSelectionAreaUpdate: true
|
49
49
|
});
|
50
50
|
}
|
51
51
|
// Move to next selection area if there is on, or back to
|
52
52
|
// the beginning of the current selection
|
53
|
-
if ((activeCellCoordinates === null || activeCellCoordinates ===
|
53
|
+
if ((activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === greatestRowIndex) {
|
54
54
|
if (selectionAreas.length > 1) {
|
55
55
|
if (selectionAreas[activeCellIndexInSelectionAreas + 1]) {
|
56
56
|
// Update activeCellRef data-selection-id attribute to the matcher of the next selection area
|