@carbon/ibm-products 2.61.0 → 2.62.0-rc.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
@@ -45,12 +45,12 @@ var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
45
45
|
var children = _ref.children,
|
46
46
|
className = _ref.className,
|
47
47
|
_ref$onClose = _ref.onClose,
|
48
|
-
onClose = _ref$onClose ===
|
48
|
+
onClose = _ref$onClose === void 0 ? defaults.onClose : _ref$onClose,
|
49
49
|
portalTarget = _ref.portalTarget,
|
50
50
|
_ref$tagline = _ref.tagline,
|
51
|
-
tagline = _ref$tagline ===
|
51
|
+
tagline = _ref$tagline === void 0 ? defaults.tagline : _ref$tagline,
|
52
52
|
_ref$theme = _ref.theme,
|
53
|
-
theme = _ref$theme ===
|
53
|
+
theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
|
54
54
|
rest = _objectWithoutProperties(_ref, _excluded);
|
55
55
|
var overlayRef = useRef(null);
|
56
56
|
var portalNode = useRef(null);
|
@@ -80,7 +80,7 @@ var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
80
80
|
var shouldReduceMotion = usePrefersReducedMotion();
|
81
81
|
useIsomorphicEffect(function () {
|
82
82
|
var _document$querySelect, _document, _document2, _document3;
|
83
|
-
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document ===
|
83
|
+
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
|
84
84
|
}, [portalTarget]);
|
85
85
|
var handleClose = useCallback(function () {
|
86
86
|
if (shouldReduceMotion) {
|
@@ -168,7 +168,7 @@ var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
168
168
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement(CoachmarkTagline, {
|
169
169
|
title: tagline,
|
170
170
|
onClose: onClose
|
171
|
-
}), isOpen && (portalNode === null || portalNode ===
|
171
|
+
}), isOpen && (portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) && /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement(CoachmarkOverlay, {
|
172
172
|
ref: overlayRef,
|
173
173
|
fixedIsVisible: fixedIsVisible,
|
174
174
|
kind: COACHMARK_OVERLAY_KIND.FIXED,
|
@@ -177,7 +177,7 @@ var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
177
177
|
theme: theme,
|
178
178
|
className: cx(fixedIsVisible && "".concat(overlayBlockClass, "--is-visible"), overlayBlockClass)
|
179
179
|
}, children), // Default to `document.body` when `portalNode` is `null`
|
180
|
-
portalNode === null || portalNode ===
|
180
|
+
portalNode === null || portalNode === void 0 ? void 0 : portalNode.current)));
|
181
181
|
});
|
182
182
|
|
183
183
|
// Return a placeholder if not released and not enabled by feature flag
|
@@ -20,16 +20,6 @@ export interface CoachmarkOverlayElementsProps {
|
|
20
20
|
* managed in the parent component.
|
21
21
|
*/
|
22
22
|
isVisible?: boolean;
|
23
|
-
/**
|
24
|
-
* The object describing an image in one of two shapes.
|
25
|
-
* If a single media element is required, use `{render}`.
|
26
|
-
* If a stepped animation is required, use `{filePaths}`.
|
27
|
-
* * @deprecated please use the `renderMedia` prop
|
28
|
-
*/
|
29
|
-
media?: {
|
30
|
-
render?: () => ReactNode;
|
31
|
-
filePaths?: string[];
|
32
|
-
};
|
33
23
|
/**
|
34
24
|
* Optional prop to render any media like images or any animated media.
|
35
25
|
*/
|
@@ -11,7 +11,6 @@ import React__default, { useRef, useState, Children, useMemo, useEffect } from '
|
|
11
11
|
import { Carousel } from '../Carousel/Carousel.js';
|
12
12
|
import '../Carousel/CarouselItem.js';
|
13
13
|
import PropTypes from '../../_virtual/index.js';
|
14
|
-
import { SteppedAnimatedMedia } from '../SteppedAnimatedMedia/SteppedAnimatedMedia.js';
|
15
14
|
import { clamp } from '../../global/js/utils/clamp.js';
|
16
15
|
import cx from 'classnames';
|
17
16
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
@@ -20,7 +19,7 @@ import { pkg } from '../../settings.js';
|
|
20
19
|
import '../Coachmark/Coachmark.js';
|
21
20
|
import { useCoachmark } from '../Coachmark/utils/context.js';
|
22
21
|
|
23
|
-
var _excluded = ["className", "children", "isVisible", "
|
22
|
+
var _excluded = ["className", "children", "isVisible", "renderMedia", "currentStep", "nextButtonText", "previousButtonLabel", "closeButtonLabel", "onNext", "onBack"];
|
24
23
|
|
25
24
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
26
25
|
var blockClass = "".concat(pkg.prefix, "--coachmark-overlay-elements");
|
@@ -54,21 +53,20 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
|
|
54
53
|
var className = _ref.className,
|
55
54
|
children = _ref.children,
|
56
55
|
_ref$isVisible = _ref.isVisible,
|
57
|
-
isVisible = _ref$isVisible ===
|
58
|
-
media = _ref.media,
|
56
|
+
isVisible = _ref$isVisible === void 0 ? defaults.isVisible : _ref$isVisible,
|
59
57
|
renderMedia = _ref.renderMedia,
|
60
58
|
_ref$currentStep = _ref.currentStep,
|
61
|
-
currentStep = _ref$currentStep ===
|
59
|
+
currentStep = _ref$currentStep === void 0 ? defaults.currentStep : _ref$currentStep,
|
62
60
|
_ref$nextButtonText = _ref.nextButtonText,
|
63
|
-
nextButtonText = _ref$nextButtonText ===
|
61
|
+
nextButtonText = _ref$nextButtonText === void 0 ? defaults.nextButtonText : _ref$nextButtonText,
|
64
62
|
_ref$previousButtonLa = _ref.previousButtonLabel,
|
65
|
-
previousButtonLabel = _ref$previousButtonLa ===
|
63
|
+
previousButtonLabel = _ref$previousButtonLa === void 0 ? defaults.previousButtonLabel : _ref$previousButtonLa,
|
66
64
|
_ref$closeButtonLabel = _ref.closeButtonLabel,
|
67
|
-
closeButtonLabel = _ref$closeButtonLabel ===
|
65
|
+
closeButtonLabel = _ref$closeButtonLabel === void 0 ? defaults.closeButtonLabel : _ref$closeButtonLabel,
|
68
66
|
_ref$onNext = _ref.onNext,
|
69
|
-
onNext = _ref$onNext ===
|
67
|
+
onNext = _ref$onNext === void 0 ? defaults.onNext : _ref$onNext,
|
70
68
|
_ref$onBack = _ref.onBack,
|
71
|
-
onBack = _ref$onBack ===
|
69
|
+
onBack = _ref$onBack === void 0 ? defaults.onBack : _ref$onBack,
|
72
70
|
rest = _objectWithoutProperties(_ref, _excluded);
|
73
71
|
var buttonFocusRef = useRef(undefined);
|
74
72
|
var scrollRef = useRef(undefined);
|
@@ -81,12 +79,11 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
|
|
81
79
|
currentProgStep = _useState4[0],
|
82
80
|
_setCurrentProgStep = _useState4[1];
|
83
81
|
var coachmark = useCoachmark();
|
84
|
-
var hasMedia = media || renderMedia;
|
85
82
|
var setCurrentProgStep = function setCurrentProgStep(value) {
|
86
83
|
if (currentProgStep > 0 && value === 0 && buttonFocusRef.current) {
|
87
84
|
setTimeout(function () {
|
88
85
|
var _buttonFocusRef$curre;
|
89
|
-
(_buttonFocusRef$curre = buttonFocusRef.current) === null || _buttonFocusRef$curre ===
|
86
|
+
(_buttonFocusRef$curre = buttonFocusRef.current) === null || _buttonFocusRef$curre === void 0 || _buttonFocusRef$curre.focus();
|
90
87
|
}, 1000);
|
91
88
|
}
|
92
89
|
_setCurrentProgStep(value);
|
@@ -95,7 +92,7 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
|
|
95
92
|
var progStepFloor = 0;
|
96
93
|
var progStepCeil = numProgSteps - 1;
|
97
94
|
var renderMediaContent = useMemo(function () {
|
98
|
-
return renderMedia === null || renderMedia ===
|
95
|
+
return renderMedia === null || renderMedia === void 0 ? void 0 : renderMedia({
|
99
96
|
playStep: currentProgStep
|
100
97
|
});
|
101
98
|
}, [currentProgStep, renderMedia]);
|
@@ -104,7 +101,7 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
|
|
104
101
|
// When current step is set by props
|
105
102
|
// scroll to the appropriate view on the carrousel
|
106
103
|
var targetStep = clamp(currentStep, progStepFloor, progStepCeil);
|
107
|
-
scrollRef === null || scrollRef ===
|
104
|
+
scrollRef === null || scrollRef === void 0 || (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || (_scrollRef$current$sc = _scrollRef$current.scrollToView) === null || _scrollRef$current$sc === void 0 || _scrollRef$current$sc.call(_scrollRef$current, targetStep);
|
108
105
|
// Avoid circular call to this hook
|
109
106
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
110
107
|
}, [currentStep]);
|
@@ -136,11 +133,7 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
|
|
136
133
|
// example: [`${blockClass}__here-if-small`]: size === 'sm',
|
137
134
|
}),
|
138
135
|
ref: ref
|
139
|
-
}, getDevtoolsProps(componentName)),
|
140
|
-
className: "".concat(blockClass, "__element-stepped-media"),
|
141
|
-
filePaths: media.filePaths,
|
142
|
-
playStep: currentProgStep
|
143
|
-
}), hasMedia && renderMedia && /*#__PURE__*/React__default.createElement("div", {
|
136
|
+
}, getDevtoolsProps(componentName)), renderMedia && /*#__PURE__*/React__default.createElement("div", {
|
144
137
|
className: "".concat(blockClass, "__element-stepped-media")
|
145
138
|
}, renderMediaContent), numProgSteps === 1 ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, children, closeButtonLabel && /*#__PURE__*/React__default.createElement("div", {
|
146
139
|
className: cx("".concat(blockClass, "__footer"), 'coachmark-carousel-controls')
|
@@ -165,9 +158,9 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
|
|
165
158
|
onClick: function onClick() {
|
166
159
|
var _scrollRef$current2, _scrollRef$current2$s;
|
167
160
|
var targetStep = clamp(currentProgStep - 1, progStepFloor, progStepCeil);
|
168
|
-
scrollRef === null || scrollRef ===
|
161
|
+
scrollRef === null || scrollRef === void 0 || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 || (_scrollRef$current2$s = _scrollRef$current2.scrollToView) === null || _scrollRef$current2$s === void 0 || _scrollRef$current2$s.call(_scrollRef$current2, targetStep);
|
169
162
|
setCurrentProgStep(targetStep);
|
170
|
-
onBack === null || onBack ===
|
163
|
+
onBack === null || onBack === void 0 || onBack();
|
171
164
|
}
|
172
165
|
}, previousButtonLabel), currentProgStep < progStepCeil ? /*#__PURE__*/React__default.createElement(Button, {
|
173
166
|
size: "sm",
|
@@ -177,9 +170,9 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
|
|
177
170
|
onClick: function onClick() {
|
178
171
|
var _scrollRef$current3, _scrollRef$current3$s;
|
179
172
|
var targetStep = clamp(currentProgStep + 1, progStepFloor, progStepCeil);
|
180
|
-
scrollRef === null || scrollRef ===
|
173
|
+
scrollRef === null || scrollRef === void 0 || (_scrollRef$current3 = scrollRef.current) === null || _scrollRef$current3 === void 0 || (_scrollRef$current3$s = _scrollRef$current3.scrollToView) === null || _scrollRef$current3$s === void 0 || _scrollRef$current3$s.call(_scrollRef$current3, targetStep);
|
181
174
|
setCurrentProgStep(targetStep);
|
182
|
-
onNext === null || onNext ===
|
175
|
+
onNext === null || onNext === void 0 || onNext();
|
183
176
|
}
|
184
177
|
}, nextButtonText) : closeButtonLabel && /*#__PURE__*/React__default.createElement(Button, _extends({
|
185
178
|
size: "sm",
|
@@ -222,18 +215,6 @@ CoachmarkOverlayElements.propTypes = {
|
|
222
215
|
* managed in the parent component.
|
223
216
|
*/
|
224
217
|
isVisible: PropTypes.bool,
|
225
|
-
/**
|
226
|
-
* The object describing an image in one of two shapes.
|
227
|
-
* If a single media element is required, use `{render}`.
|
228
|
-
* If a stepped animation is required, use `{filePaths}`.
|
229
|
-
* @deprecated please use the `renderMedia` prop
|
230
|
-
*/
|
231
|
-
/**@ts-ignore*/
|
232
|
-
media: PropTypes.oneOfType([PropTypes.shape({
|
233
|
-
render: PropTypes.func
|
234
|
-
}), PropTypes.shape({
|
235
|
-
filePaths: PropTypes.arrayOf(PropTypes.string)
|
236
|
-
})]),
|
237
218
|
/**
|
238
219
|
* The label for the Next button.
|
239
220
|
*/
|
@@ -5,11 +5,6 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
import React, { ReactNode } from 'react';
|
8
|
-
type Media = {
|
9
|
-
render?: () => ReactNode;
|
10
|
-
} | {
|
11
|
-
filePaths?: string[];
|
12
|
-
};
|
13
8
|
interface CoachmarkStackProps {
|
14
9
|
/**
|
15
10
|
* CoachmarkStack should use a single CoachmarkOverlayElements component as a child.
|
@@ -28,15 +23,9 @@ interface CoachmarkStackProps {
|
|
28
23
|
*/
|
29
24
|
description: ReactNode;
|
30
25
|
/**
|
31
|
-
*
|
32
|
-
*
|
33
|
-
* If a single media element is required, use `{render}`.
|
34
|
-
*
|
35
|
-
* If a stepped animation is required, use `{filePaths}`.
|
36
|
-
*
|
37
|
-
* @see {@link MEDIA_PROP_TYPE}.
|
26
|
+
* Optional prop to render any media like images or any animated media.
|
38
27
|
*/
|
39
|
-
|
28
|
+
renderMedia?: (params: any) => ReactNode;
|
40
29
|
/**
|
41
30
|
* The labels used to link to the stackable Coachmarks.
|
42
31
|
*/
|
@@ -19,7 +19,7 @@ import { CoachmarkContext } from '../Coachmark/utils/context.js';
|
|
19
19
|
import { COACHMARK_OVERLAY_KIND } from '../Coachmark/utils/enums.js';
|
20
20
|
import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
|
21
21
|
|
22
|
-
var _excluded = ["children", "className", "onClose", "description", "
|
22
|
+
var _excluded = ["children", "className", "onClose", "description", "renderMedia", "navLinkLabels", "portalTarget", "closeButtonLabel", "tagline", "theme", "title"];
|
23
23
|
|
24
24
|
// Carbon and package components we use.
|
25
25
|
/* TODO: @import(s) of carbon components and other package components. */
|
@@ -52,22 +52,22 @@ var CoachmarkStack = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
52
52
|
var children = _ref.children,
|
53
53
|
className = _ref.className,
|
54
54
|
_ref$onClose = _ref.onClose,
|
55
|
-
onClose = _ref$onClose ===
|
55
|
+
onClose = _ref$onClose === void 0 ? defaults.onClose : _ref$onClose,
|
56
56
|
description = _ref.description,
|
57
|
-
|
57
|
+
renderMedia = _ref.renderMedia,
|
58
58
|
navLinkLabels = _ref.navLinkLabels,
|
59
59
|
_ref$portalTarget = _ref.portalTarget,
|
60
|
-
portalTarget = _ref$portalTarget ===
|
60
|
+
portalTarget = _ref$portalTarget === void 0 ? defaults.portalTarget : _ref$portalTarget,
|
61
61
|
closeButtonLabel = _ref.closeButtonLabel,
|
62
62
|
tagline = _ref.tagline,
|
63
63
|
_ref$theme = _ref.theme,
|
64
|
-
theme = _ref$theme ===
|
64
|
+
theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
|
65
65
|
title = _ref.title,
|
66
66
|
rest = _objectWithoutProperties(_ref, _excluded);
|
67
67
|
var portalNode = useRef(null);
|
68
68
|
useIsomorphicEffect(function () {
|
69
69
|
var _document$querySelect, _document, _document2, _document3;
|
70
|
-
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document ===
|
70
|
+
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
|
71
71
|
}, [portalTarget]);
|
72
72
|
var stackHomeRef = useRef(null);
|
73
73
|
var stackedCoachmarkRefs = useRef([]);
|
@@ -212,7 +212,7 @@ var CoachmarkStack = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
212
212
|
className: cx("".concat(pkg.prefix, "--coachmark-overlay"), "".concat(pkg.prefix, "--coachmark-overlay__").concat(theme), elementBlockClass, selectedItemNumber > 0 && "".concat(elementBlockClass, "--is-stacked"), selectedItemNumber > 0 && "".concat(elementBlockClass, "--is-stacked__").concat(theme), isOpen && "".concat(elementBlockClass, "--is-visible"), mountedRef.current && "".concat(elementBlockClass, "--is-mounted")),
|
213
213
|
isOpen: isOpen && selectedItemNumber < 1,
|
214
214
|
description: description,
|
215
|
-
|
215
|
+
renderMedia: renderMedia,
|
216
216
|
navLinkLabels: navLinkLabels,
|
217
217
|
onClickNavItem: handleClickNavItem,
|
218
218
|
onClose: function onClose() {
|
@@ -221,7 +221,7 @@ var CoachmarkStack = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
221
221
|
portalTarget: portalTarget,
|
222
222
|
closeButtonLabel: closeButtonLabel,
|
223
223
|
title: title
|
224
|
-
}), portalNode !== null && portalNode !==
|
224
|
+
}), portalNode !== null && portalNode !== void 0 && portalNode.current ? /*#__PURE__*/createPortal(wrappedChildren, portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) : null));
|
225
225
|
});
|
226
226
|
|
227
227
|
// Return a placeholder if not released and not enabled by feature flag
|
@@ -252,20 +252,6 @@ CoachmarkStack.propTypes = {
|
|
252
252
|
* The description of the Coachmark.
|
253
253
|
*/
|
254
254
|
description: PropTypes.node.isRequired,
|
255
|
-
/**
|
256
|
-
* The object describing an image in one of two shapes.
|
257
|
-
*
|
258
|
-
* If a single media element is required, use `{render}`.
|
259
|
-
*
|
260
|
-
* If a stepped animation is required, use `{filePaths}`.
|
261
|
-
*
|
262
|
-
* @see {@link MEDIA_PROP_TYPE}.
|
263
|
-
*/
|
264
|
-
media: PropTypes.oneOfType([PropTypes.shape({
|
265
|
-
render: PropTypes.func
|
266
|
-
}), PropTypes.shape({
|
267
|
-
filePaths: PropTypes.arrayOf(PropTypes.string)
|
268
|
-
})]),
|
269
255
|
/**
|
270
256
|
* The labels used to link to the stackable Coachmarks.
|
271
257
|
*/
|
@@ -279,6 +265,10 @@ CoachmarkStack.propTypes = {
|
|
279
265
|
* The default is `document.body`.
|
280
266
|
*/
|
281
267
|
portalTarget: PropTypes.string,
|
268
|
+
/**
|
269
|
+
* Optional prop to render any media like images or animated media.
|
270
|
+
*/
|
271
|
+
renderMedia: PropTypes.func,
|
282
272
|
/**
|
283
273
|
* The tagline title which will be fixed to the bottom right of the window and will serve as the display trigger.
|
284
274
|
*/
|
@@ -5,13 +5,6 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
import React, { ReactNode } from 'react';
|
8
|
-
type Media = {
|
9
|
-
render?: () => ReactNode;
|
10
|
-
filePaths?: never;
|
11
|
-
} | {
|
12
|
-
render?: never;
|
13
|
-
filePaths?: string[];
|
14
|
-
};
|
15
8
|
interface CoachmarkStackHomeProps {
|
16
9
|
/**
|
17
10
|
* Optional class name for this component.
|
@@ -29,16 +22,6 @@ interface CoachmarkStackHomeProps {
|
|
29
22
|
* If the stack home is open.
|
30
23
|
*/
|
31
24
|
isOpen: boolean;
|
32
|
-
/**
|
33
|
-
* The object describing an image in one of two shapes.
|
34
|
-
*
|
35
|
-
* If a single media element is required, use `{render}`.
|
36
|
-
*
|
37
|
-
* If a stepped animation is required, use `{filePaths}`.
|
38
|
-
*
|
39
|
-
* @see {@link MEDIA_PROP_TYPE}.
|
40
|
-
*/
|
41
|
-
media?: Media;
|
42
25
|
/**
|
43
26
|
* Optional prop to render any media like images or any animated media.
|
44
27
|
*/
|
@@ -16,11 +16,9 @@ import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
|
16
16
|
import { pkg } from '../../settings.js';
|
17
17
|
import { createPortal } from 'react-dom';
|
18
18
|
import { CoachmarkHeader } from '../Coachmark/CoachmarkHeader.js';
|
19
|
-
import { SteppedAnimatedMedia } from '../SteppedAnimatedMedia/SteppedAnimatedMedia.js';
|
20
|
-
import { deprecateProp } from '../../global/js/utils/props-helper.js';
|
21
19
|
import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
|
22
20
|
|
23
|
-
var _excluded = ["className", "description", "isOpen", "
|
21
|
+
var _excluded = ["className", "description", "isOpen", "renderMedia", "navLinkLabels", "onClickNavItem", "onClose", "portalTarget", "closeButtonLabel", "title"];
|
24
22
|
// Carbon and package components we use.
|
25
23
|
/* TODO: @import(s) of carbon components and other package components. */
|
26
24
|
|
@@ -37,7 +35,6 @@ var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
37
35
|
var className = _ref.className,
|
38
36
|
description = _ref.description,
|
39
37
|
isOpen = _ref.isOpen,
|
40
|
-
media = _ref.media,
|
41
38
|
renderMedia = _ref.renderMedia,
|
42
39
|
navLinkLabels = _ref.navLinkLabels,
|
43
40
|
onClickNavItem = _ref.onClickNavItem,
|
@@ -51,7 +48,6 @@ var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
51
48
|
_useState2 = _slicedToArray(_useState, 2),
|
52
49
|
linkFocusIndex = _useState2[0],
|
53
50
|
setLinkFocusIndex = _useState2[1];
|
54
|
-
var hasMedia = media || renderMedia;
|
55
51
|
useEffect(function () {
|
56
52
|
setTimeout(function () {
|
57
53
|
if (isOpen && buttonFocusRef.current) {
|
@@ -62,7 +58,7 @@ var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
62
58
|
var portalNode = useRef(null);
|
63
59
|
useIsomorphicEffect(function () {
|
64
60
|
var _document$querySelect, _document, _document2, _document3;
|
65
|
-
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document ===
|
61
|
+
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
|
66
62
|
}, [portalTarget]);
|
67
63
|
if (!navLinkLabels) {
|
68
64
|
return pconsole.warn("".concat(componentName, " is an Onboarding internal component and is not intended for general use."));
|
@@ -81,7 +77,7 @@ var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
81
77
|
ref: ref
|
82
78
|
}, label));
|
83
79
|
}
|
84
|
-
return portalNode !== null && portalNode !==
|
80
|
+
return portalNode !== null && portalNode !== void 0 && portalNode.current ? /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
85
81
|
className: cx(blockClass, className),
|
86
82
|
ref: ref
|
87
83
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement(CoachmarkHeader, {
|
@@ -93,14 +89,10 @@ var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
93
89
|
className: "".concat(overlayClass, "__body")
|
94
90
|
}, /*#__PURE__*/React__default.createElement("div", {
|
95
91
|
className: "".concat(overlayClass, "-element")
|
96
|
-
}, !
|
92
|
+
}, !renderMedia && /*#__PURE__*/React__default.createElement(Idea, {
|
97
93
|
size: 20,
|
98
94
|
className: "".concat(blockClass, "__icon-idea")
|
99
|
-
}),
|
100
|
-
className: "".concat(blockClass, "__element-stepped-media"),
|
101
|
-
filePaths: media.filePaths,
|
102
|
-
playStep: 0
|
103
|
-
}), hasMedia && renderMedia && /*#__PURE__*/React__default.createElement("div", {
|
95
|
+
}), renderMedia && /*#__PURE__*/React__default.createElement("div", {
|
104
96
|
className: "".concat(blockClass, "__element-stepped-media")
|
105
97
|
}, renderMedia({
|
106
98
|
playStep: 0
|
@@ -125,7 +117,7 @@ var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
125
117
|
setLinkFocusIndex(0);
|
126
118
|
_onClose();
|
127
119
|
}
|
128
|
-
}, closeButtonLabel))))), portalNode === null || portalNode ===
|
120
|
+
}, closeButtonLabel))))), portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) : null;
|
129
121
|
});
|
130
122
|
|
131
123
|
// Return a placeholder if not released and not enabled by feature flag
|
@@ -155,21 +147,6 @@ CoachmarkStackHome.propTypes = {
|
|
155
147
|
* If the stack home is open.
|
156
148
|
*/
|
157
149
|
isOpen: PropTypes.bool.isRequired,
|
158
|
-
/**
|
159
|
-
* The object describing an image in one of two shapes.
|
160
|
-
*
|
161
|
-
* If a single media element is required, use `{render}`.
|
162
|
-
*
|
163
|
-
* If a stepped animation is required, use `{filePaths}`.
|
164
|
-
*
|
165
|
-
* @see {@link MEDIA_PROP_TYPE}.
|
166
|
-
* @deprecated please use the `renderMedia` prop
|
167
|
-
*/
|
168
|
-
media: deprecateProp(PropTypes.oneOfType([PropTypes.shape({
|
169
|
-
render: PropTypes.func
|
170
|
-
}), PropTypes.shape({
|
171
|
-
filePaths: PropTypes.arrayOf(PropTypes.string)
|
172
|
-
})]), ''),
|
173
150
|
/**
|
174
151
|
* The labels used to link to the stackable Coachmarks.
|
175
152
|
*/
|
@@ -33,7 +33,7 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
33
33
|
var onRemove = props.onRemove,
|
34
34
|
onChange = props.onChange,
|
35
35
|
_props$condition = props.condition,
|
36
|
-
condition = _props$condition ===
|
36
|
+
condition = _props$condition === void 0 ? {} : _props$condition,
|
37
37
|
conjunction = props.conjunction,
|
38
38
|
onConnectorOperatorChange = props.onConnectorOperatorChange,
|
39
39
|
isStatement = props.isStatement,
|
@@ -77,9 +77,9 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
77
77
|
//filtering the current property to access its properties and config options
|
78
78
|
var getCurrentConfig = function getCurrentConfig(property) {
|
79
79
|
var _inputConfig$properti, _inputConfig$properti2;
|
80
|
-
return (_inputConfig$properti = inputConfig === null || inputConfig ===
|
80
|
+
return (_inputConfig$properti = inputConfig === null || inputConfig === void 0 || (_inputConfig$properti2 = inputConfig.properties) === null || _inputConfig$properti2 === void 0 ? void 0 : _inputConfig$properti2.find(function (eachProperty) {
|
81
81
|
return eachProperty.id == property;
|
82
|
-
})) !== null && _inputConfig$properti !==
|
82
|
+
})) !== null && _inputConfig$properti !== void 0 ? _inputConfig$properti : {};
|
83
83
|
};
|
84
84
|
var _ref = getCurrentConfig(property),
|
85
85
|
icon = _ref.icon,
|
@@ -95,7 +95,7 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
95
95
|
date: ConditionBuilderItemDate,
|
96
96
|
time: ConditionBuilderItemTime,
|
97
97
|
option: ItemOptionForValueField,
|
98
|
-
custom: config === null || config ===
|
98
|
+
custom: config === null || config === void 0 ? void 0 : config.component,
|
99
99
|
textarea: ConditionBuilderItemText
|
100
100
|
};
|
101
101
|
var ItemComponent = itemComponents[type];
|
@@ -107,7 +107,7 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
107
107
|
};
|
108
108
|
var onStatementChangeHandler = function onStatementChangeHandler(v, evt) {
|
109
109
|
focusThisField(evt, conditionBuilderRef);
|
110
|
-
onStatementChange === null || onStatementChange ===
|
110
|
+
onStatementChange === null || onStatementChange === void 0 || onStatementChange(v);
|
111
111
|
};
|
112
112
|
var onPropertyChangeHandler = function onPropertyChangeHandler(newProperty) {
|
113
113
|
onChange(_objectSpread2(_objectSpread2({}, condition), {}, {
|
@@ -145,7 +145,7 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
145
145
|
};
|
146
146
|
var getOperators = function getOperators() {
|
147
147
|
// @ts-ignore
|
148
|
-
if (config !== null && config !==
|
148
|
+
if (config !== null && config !== void 0 && config.operators) {
|
149
149
|
// @ts-ignore
|
150
150
|
return config.operators;
|
151
151
|
}
|
@@ -187,7 +187,7 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
187
187
|
className: "".concat(blockClass, "__gap"),
|
188
188
|
operator: conjunction,
|
189
189
|
onChange: function onChange(op) {
|
190
|
-
return onConnectorOperatorChange === null || onConnectorOperatorChange ===
|
190
|
+
return onConnectorOperatorChange === null || onConnectorOperatorChange === void 0 ? void 0 : onConnectorOperatorChange(op);
|
191
191
|
}
|
192
192
|
}) : '', isStatement && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
193
193
|
label: group.statement,
|
@@ -207,9 +207,9 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
207
207
|
isStatement: true
|
208
208
|
}
|
209
209
|
})), /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
210
|
-
label: label !== null && label !==
|
210
|
+
label: label !== null && label !== void 0 ? label : condition === null || condition === void 0 ? void 0 : condition.property,
|
211
211
|
title: propertyText,
|
212
|
-
renderIcon: icon !== null && icon !==
|
212
|
+
renderIcon: icon !== null && icon !== void 0 ? icon : undefined,
|
213
213
|
className: "".concat(blockClass, "__property-field"),
|
214
214
|
"data-name": "propertyField",
|
215
215
|
condition: condition,
|
@@ -223,7 +223,7 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
223
223
|
},
|
224
224
|
onChange: onPropertyChangeHandler,
|
225
225
|
config: {
|
226
|
-
options: inputConfig === null || inputConfig ===
|
226
|
+
options: inputConfig === null || inputConfig === void 0 ? void 0 : inputConfig.properties
|
227
227
|
}
|
228
228
|
})), checkIsValid(property) && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
229
229
|
label: operator,
|
@@ -269,10 +269,10 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
269
269
|
wrapperClassName: "".concat(blockClass, "__close-condition-wrapper")
|
270
270
|
})), manageActionButtons(conditionIndex, group.conditions) && /*#__PURE__*/React__default.createElement(ConditionBuilderAdd, {
|
271
271
|
onClick: function onClick() {
|
272
|
-
addConditionHandler === null || addConditionHandler ===
|
272
|
+
addConditionHandler === null || addConditionHandler === void 0 || addConditionHandler(conditionIndex);
|
273
273
|
},
|
274
274
|
addConditionSubGroupHandler: function addConditionSubGroupHandler() {
|
275
|
-
_addConditionSubGroupHandler === null || _addConditionSubGroupHandler ===
|
275
|
+
_addConditionSubGroupHandler === null || _addConditionSubGroupHandler === void 0 || _addConditionSubGroupHandler(conditionIndex);
|
276
276
|
},
|
277
277
|
showConditionSubGroupPreviewHandler: showConditionSubGroupPreviewHandler,
|
278
278
|
hideConditionSubGroupPreviewHandler: hideConditionSubGroupPreviewHandler,
|
@@ -48,14 +48,14 @@ var ConditionBuilder = /*#__PURE__*/React__default.forwardRef(function (_ref, re
|
|
48
48
|
var className = _ref.className,
|
49
49
|
inputConfig = _ref.inputConfig,
|
50
50
|
_ref$startConditionLa = _ref.startConditionLabel,
|
51
|
-
startConditionLabel = _ref$startConditionLa ===
|
51
|
+
startConditionLabel = _ref$startConditionLa === void 0 ? 'Add Condition' : _ref$startConditionLa,
|
52
52
|
popOverSearchThreshold = _ref.popOverSearchThreshold,
|
53
53
|
getOptions = _ref.getOptions,
|
54
54
|
initialState = _ref.initialState,
|
55
55
|
getConditionState = _ref.getConditionState,
|
56
56
|
getActionsState = _ref.getActionsState,
|
57
57
|
_ref$variant = _ref.variant,
|
58
|
-
variant = _ref$variant ===
|
58
|
+
variant = _ref$variant === void 0 ? NON_HIERARCHICAL_VARIANT : _ref$variant,
|
59
59
|
actions = _ref.actions,
|
60
60
|
translateWithId = _ref.translateWithId,
|
61
61
|
statementConfigCustom = _ref.statementConfigCustom,
|
@@ -25,7 +25,7 @@ var ConditionBuilderActions = function ConditionBuilderActions(_ref) {
|
|
25
25
|
className = _ref.className;
|
26
26
|
var _useContext = useContext(ConditionBuilderContext),
|
27
27
|
_useContext$actionSta = _useContext.actionState,
|
28
|
-
actionState = _useContext$actionSta ===
|
28
|
+
actionState = _useContext$actionSta === void 0 ? [] : _useContext$actionSta,
|
29
29
|
setActionState = _useContext.setActionState;
|
30
30
|
var _useState = useState(-1),
|
31
31
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -45,7 +45,7 @@ var ConditionBuilderActions = function ConditionBuilderActions(_ref) {
|
|
45
45
|
label: undefined,
|
46
46
|
popoverToOpen: 'valueField'
|
47
47
|
};
|
48
|
-
setActionState === null || setActionState ===
|
48
|
+
setActionState === null || setActionState === void 0 || setActionState([].concat(_toConsumableArray(actionState), [action]));
|
49
49
|
};
|
50
50
|
var onchangeHandler = function onchangeHandler(selectedId, actionIndex) {
|
51
51
|
var action = actions.find(function (action) {
|
@@ -56,10 +56,10 @@ var ConditionBuilderActions = function ConditionBuilderActions(_ref) {
|
|
56
56
|
var newAction = _objectSpread2(_objectSpread2({}, action), {}, {
|
57
57
|
id: actionState[actionIndex].id
|
58
58
|
});
|
59
|
-
setActionState === null || setActionState ===
|
59
|
+
setActionState === null || setActionState === void 0 || setActionState([].concat(_toConsumableArray(actionState.slice(0, actionIndex)), [newAction], _toConsumableArray(actionState.slice(actionIndex + 1))));
|
60
60
|
};
|
61
61
|
var onRemove = function onRemove(selectedId) {
|
62
|
-
setActionState === null || setActionState ===
|
62
|
+
setActionState === null || setActionState === void 0 || setActionState(actionState.filter(function (action) {
|
63
63
|
return action.id !== selectedId;
|
64
64
|
}));
|
65
65
|
};
|
@@ -78,7 +78,7 @@ var ConditionBuilderActions = function ConditionBuilderActions(_ref) {
|
|
78
78
|
className: "".concat(blockClass, "__condition-wrapper"),
|
79
79
|
role: "grid",
|
80
80
|
"aria-label": actionSectionText
|
81
|
-
}, actionState === null || actionState ===
|
81
|
+
}, actionState === null || actionState === void 0 ? void 0 : actionState.map(function (action, index) {
|
82
82
|
return /*#__PURE__*/React__default.createElement("div", {
|
83
83
|
key: action.id,
|
84
84
|
role: "row",
|
@@ -31,7 +31,7 @@ var ConditionBuilderAdd = function ConditionBuilderAdd(_ref) {
|
|
31
31
|
addConditionRowText = _useTranslations2[1],
|
32
32
|
addSubgroupText = _useTranslations2[2];
|
33
33
|
var onClickHandler = function onClickHandler() {
|
34
|
-
hideConditionPreviewHandler === null || hideConditionPreviewHandler ===
|
34
|
+
hideConditionPreviewHandler === null || hideConditionPreviewHandler === void 0 || hideConditionPreviewHandler();
|
35
35
|
onClick();
|
36
36
|
};
|
37
37
|
var previewHandlers = function previewHandlers() {
|
@@ -68,7 +68,7 @@ var ConditionBuilderAdd = function ConditionBuilderAdd(_ref) {
|
|
68
68
|
className: "".concat(blockClass, "__add-button"),
|
69
69
|
hideLabel: true,
|
70
70
|
"data-name": "addButton",
|
71
|
-
label: buttonLabel !== null && buttonLabel !==
|
71
|
+
label: buttonLabel !== null && buttonLabel !== void 0 ? buttonLabel : addConditionText,
|
72
72
|
tabIndex: tabIndex,
|
73
73
|
wrapperClassName: "".concat(blockClass, "__add-condition-wrapper")
|
74
74
|
})), enableSubGroup && /*#__PURE__*/React__default.createElement(ConditionBuilderButton, _extends({
|
@@ -38,7 +38,7 @@ var ConditionBuilderButton = function ConditionBuilderButton(_ref) {
|
|
38
38
|
var carbonPrefix = usePrefix();
|
39
39
|
var Button = function Button() {
|
40
40
|
var _rest$dataName;
|
41
|
-
var dataName = (_rest$dataName = rest['data-name']) !== null && _rest$dataName !==
|
41
|
+
var dataName = (_rest$dataName = rest['data-name']) !== null && _rest$dataName !== void 0 ? _rest$dataName : '';
|
42
42
|
return /*#__PURE__*/React__default.createElement("button", _extends({
|
43
43
|
tabIndex: tabIndex !== undefined ? tabIndex : -1,
|
44
44
|
className: cx([className, "".concat(blockClass, "__button"), _defineProperty({}, "".concat(blockClass, "__text-ellipsis"), showToolTip && !hideLabel && !isInvalid), _defineProperty({}, "".concat(blockClass, "__invalid-input"), isInvalid)]),
|
@@ -38,15 +38,15 @@ var ConditionConnector = function ConditionConnector(_ref) {
|
|
38
38
|
}
|
39
39
|
}, []);
|
40
40
|
var activeConnectorHandler = function activeConnectorHandler(evt) {
|
41
|
-
var parentGroup = evt === null || evt ===
|
41
|
+
var parentGroup = evt === null || evt === void 0 ? void 0 : evt.currentTarget.closest('.eachGroup');
|
42
42
|
handleConnectorHover(parentGroup, true);
|
43
43
|
};
|
44
44
|
var inActiveConnectorHandler = function inActiveConnectorHandler(evt) {
|
45
|
-
var parentGroup = evt === null || evt ===
|
45
|
+
var parentGroup = evt === null || evt === void 0 ? void 0 : evt.currentTarget.closest('.eachGroup');
|
46
46
|
handleConnectorHover(parentGroup, false);
|
47
47
|
};
|
48
48
|
var onChangeHandler = function onChangeHandler(op, evt) {
|
49
|
-
onChange === null || onChange ===
|
49
|
+
onChange === null || onChange === void 0 || onChange(op);
|
50
50
|
focusThisField(evt, conditionBuilderRef);
|
51
51
|
};
|
52
52
|
return variant == HIERARCHICAL_VARIANT ? /*#__PURE__*/React__default.createElement("span", {
|