@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
@@ -7,6 +7,7 @@
|
|
7
7
|
|
8
8
|
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, defineProperty as _defineProperty, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
9
9
|
import { usePrefix, Button, Toggle, Link, IconButton } from '@carbon/react';
|
10
|
+
import { dateTimeFormat } from '@carbon/utilities';
|
10
11
|
import { Settings, ErrorFilled, CheckmarkFilled, WarningAltFilled, InformationSquareFilled, Close, ChevronDown } from '@carbon/react/icons';
|
11
12
|
import React__default, { useRef, useState, useEffect } from 'react';
|
12
13
|
import '../EmptyStates/EmptyState.js';
|
@@ -19,22 +20,25 @@ import { NotificationsEmptyState } from '../EmptyStates/NotificationsEmptyState/
|
|
19
20
|
import '../EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js';
|
20
21
|
import PropTypes from '../../_virtual/index.js';
|
21
22
|
import cx from 'classnames';
|
23
|
+
import { usePrefersReducedMotion } from '../../global/js/hooks/usePrefersReducedMotion.js';
|
22
24
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
23
|
-
import { pkg } from '../../settings.js';
|
24
25
|
import { prepareProps } from '../../global/js/utils/props-helper.js';
|
25
|
-
import {
|
26
|
+
import { getSupportedLocale } from '../../global/js/utils/getSupportedLocale.js';
|
27
|
+
import { pkg } from '../../settings.js';
|
26
28
|
import { timeAgo } from './utils.js';
|
27
|
-
import {
|
29
|
+
import { usePresence } from '../../global/js/hooks/usePresence.js';
|
28
30
|
import { useClickOutside } from '../../global/js/hooks/useClickOutside.js';
|
29
31
|
|
30
32
|
var _Close;
|
31
|
-
var _excluded = ["className", "data", "daysAgoText", "dismissAllLabel", "dismissSingleNotificationIconDescription", "doNotDisturbDefaultToggled", "doNotDisturbLabel", "emptyStateLabel", "hourAgoText", "hoursAgoText", "illustrationTheme", "minuteAgoText", "minutesAgoText", "monthAgoText", "monthsAgoText", "nowText", "onClickOutside", "onDismissAllNotifications", "onDismissSingleNotification", "onDoNotDisturbChange", "onSettingsClick", "onViewAllClick", "open", "previousLabel", "readLessLabel", "readMoreLabel", "secondsAgoText", "settingsIconDescription", "title", "todayLabel", "viewAllLabel", "yearAgoText", "yearsAgoText", "yesterdayAtText", "yesterdayLabel", "triggerButtonRef"];
|
33
|
+
var _excluded = ["className", "data", "dateTimeLocale", "dateTimeStyle", "daysAgoText", "dismissAllLabel", "dismissSingleNotificationIconDescription", "doNotDisturbDefaultToggled", "doNotDisturbLabel", "emptyStateLabel", "hourAgoText", "hoursAgoText", "illustrationTheme", "minuteAgoText", "minutesAgoText", "monthAgoText", "monthsAgoText", "nowText", "onClickOutside", "onDismissAllNotifications", "onDismissSingleNotification", "onDoNotDisturbChange", "onSettingsClick", "onViewAllClick", "open", "previousLabel", "readLessLabel", "readMoreLabel", "secondsAgoText", "settingsIconDescription", "title", "todayLabel", "viewAllLabel", "yearAgoText", "yearsAgoText", "yesterdayAtText", "yesterdayLabel", "triggerButtonRef"];
|
32
34
|
|
33
35
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
34
36
|
var componentName = 'NotificationsPanel';
|
35
37
|
var blockClass = "".concat(pkg.prefix, "--notifications-panel");
|
38
|
+
var DefaultLocale = 'en-US';
|
36
39
|
// Default values for props
|
37
40
|
var defaults = {
|
41
|
+
dateTimeStyle: 'long',
|
38
42
|
daysAgoText: function daysAgoText(value) {
|
39
43
|
return "".concat(value, " days ago");
|
40
44
|
},
|
@@ -87,126 +91,139 @@ var defaults = {
|
|
87
91
|
},
|
88
92
|
yesterdayLabel: 'Yesterday'
|
89
93
|
};
|
94
|
+
/**
|
95
|
+
* The `NotificationsPanel` sets expectations on the behavior for notifications,
|
96
|
+
* allowing the user to view and interact with them all in one place.
|
97
|
+
*
|
98
|
+
* **To adopt the new localization:**
|
99
|
+
*
|
100
|
+
* **Step 1:** Provide a locale to the `dateTimeLocale` prop, such as "de" or "fr-CA".
|
101
|
+
*
|
102
|
+
* **Step 2:** Remove the now _deprecated_ props: `daysAgoText`,
|
103
|
+
* `hourAgoText`, `hoursAgoText`, `minuteAgoText`, `minutesAgoText`,
|
104
|
+
* `monthAgoText`, `monthsAgoText`, `nowText`, `secondsAgoText`,
|
105
|
+
* `yearAgoText`, `yearsAgoText`, `yesterdayAtText`.
|
106
|
+
*
|
107
|
+
* If you do not provide a locale, the deprecated props will be applied instead.
|
108
|
+
*/
|
90
109
|
var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
91
110
|
var className = _ref.className,
|
92
111
|
data = _ref.data,
|
112
|
+
dateTimeLocale = _ref.dateTimeLocale,
|
113
|
+
_ref$dateTimeStyle = _ref.dateTimeStyle,
|
114
|
+
dateTimeStyle = _ref$dateTimeStyle === void 0 ? defaults.dateTimeStyle : _ref$dateTimeStyle,
|
93
115
|
_ref$daysAgoText = _ref.daysAgoText,
|
94
|
-
daysAgoText = _ref$daysAgoText ===
|
116
|
+
daysAgoText = _ref$daysAgoText === void 0 ? defaults.daysAgoText : _ref$daysAgoText,
|
95
117
|
_ref$dismissAllLabel = _ref.dismissAllLabel,
|
96
|
-
dismissAllLabel = _ref$dismissAllLabel ===
|
118
|
+
dismissAllLabel = _ref$dismissAllLabel === void 0 ? defaults.dismissAllLabel : _ref$dismissAllLabel,
|
97
119
|
_ref$dismissSingleNot = _ref.dismissSingleNotificationIconDescription,
|
98
|
-
dismissSingleNotificationIconDescription = _ref$dismissSingleNot ===
|
120
|
+
dismissSingleNotificationIconDescription = _ref$dismissSingleNot === void 0 ? defaults.dismissSingleNotificationIconDescription : _ref$dismissSingleNot,
|
99
121
|
doNotDisturbDefaultToggled = _ref.doNotDisturbDefaultToggled,
|
100
122
|
_ref$doNotDisturbLabe = _ref.doNotDisturbLabel,
|
101
|
-
doNotDisturbLabel = _ref$doNotDisturbLabe ===
|
123
|
+
doNotDisturbLabel = _ref$doNotDisturbLabe === void 0 ? defaults.doNotDisturbLabel : _ref$doNotDisturbLabe,
|
102
124
|
_ref$emptyStateLabel = _ref.emptyStateLabel,
|
103
|
-
emptyStateLabel = _ref$emptyStateLabel ===
|
125
|
+
emptyStateLabel = _ref$emptyStateLabel === void 0 ? defaults.emptyStateLabel : _ref$emptyStateLabel,
|
104
126
|
_ref$hourAgoText = _ref.hourAgoText,
|
105
|
-
hourAgoText = _ref$hourAgoText ===
|
127
|
+
hourAgoText = _ref$hourAgoText === void 0 ? defaults.hourAgoText : _ref$hourAgoText,
|
106
128
|
_ref$hoursAgoText = _ref.hoursAgoText,
|
107
|
-
hoursAgoText = _ref$hoursAgoText ===
|
129
|
+
hoursAgoText = _ref$hoursAgoText === void 0 ? defaults.hoursAgoText : _ref$hoursAgoText,
|
108
130
|
_ref$illustrationThem = _ref.illustrationTheme,
|
109
|
-
illustrationTheme = _ref$illustrationThem ===
|
131
|
+
illustrationTheme = _ref$illustrationThem === void 0 ? defaults.illustrationTheme : _ref$illustrationThem,
|
110
132
|
_ref$minuteAgoText = _ref.minuteAgoText,
|
111
|
-
minuteAgoText = _ref$minuteAgoText ===
|
133
|
+
minuteAgoText = _ref$minuteAgoText === void 0 ? defaults.minuteAgoText : _ref$minuteAgoText,
|
112
134
|
_ref$minutesAgoText = _ref.minutesAgoText,
|
113
|
-
minutesAgoText = _ref$minutesAgoText ===
|
135
|
+
minutesAgoText = _ref$minutesAgoText === void 0 ? defaults.minutesAgoText : _ref$minutesAgoText,
|
114
136
|
_ref$monthAgoText = _ref.monthAgoText,
|
115
|
-
monthAgoText = _ref$monthAgoText ===
|
137
|
+
monthAgoText = _ref$monthAgoText === void 0 ? defaults.monthAgoText : _ref$monthAgoText,
|
116
138
|
_ref$monthsAgoText = _ref.monthsAgoText,
|
117
|
-
monthsAgoText = _ref$monthsAgoText ===
|
139
|
+
monthsAgoText = _ref$monthsAgoText === void 0 ? defaults.monthsAgoText : _ref$monthsAgoText,
|
118
140
|
_ref$nowText = _ref.nowText,
|
119
|
-
nowText = _ref$nowText ===
|
141
|
+
nowText = _ref$nowText === void 0 ? defaults.nowText : _ref$nowText,
|
120
142
|
onClickOutside = _ref.onClickOutside,
|
121
143
|
_ref$onDismissAllNoti = _ref.onDismissAllNotifications,
|
122
|
-
onDismissAllNotifications = _ref$onDismissAllNoti ===
|
144
|
+
onDismissAllNotifications = _ref$onDismissAllNoti === void 0 ? defaults.onDismissAllNotifications : _ref$onDismissAllNoti,
|
123
145
|
_ref$onDismissSingleN = _ref.onDismissSingleNotification,
|
124
|
-
onDismissSingleNotification = _ref$onDismissSingleN ===
|
146
|
+
onDismissSingleNotification = _ref$onDismissSingleN === void 0 ? defaults.onDismissSingleNotification : _ref$onDismissSingleN,
|
125
147
|
onDoNotDisturbChange = _ref.onDoNotDisturbChange,
|
126
148
|
onSettingsClick = _ref.onSettingsClick,
|
127
149
|
onViewAllClick = _ref.onViewAllClick,
|
128
150
|
open = _ref.open,
|
129
151
|
_ref$previousLabel = _ref.previousLabel,
|
130
|
-
previousLabel = _ref$previousLabel ===
|
152
|
+
previousLabel = _ref$previousLabel === void 0 ? defaults.previousLabel : _ref$previousLabel,
|
131
153
|
_ref$readLessLabel = _ref.readLessLabel,
|
132
|
-
readLessLabel = _ref$readLessLabel ===
|
154
|
+
readLessLabel = _ref$readLessLabel === void 0 ? defaults.readLessLabel : _ref$readLessLabel,
|
133
155
|
_ref$readMoreLabel = _ref.readMoreLabel,
|
134
|
-
readMoreLabel = _ref$readMoreLabel ===
|
156
|
+
readMoreLabel = _ref$readMoreLabel === void 0 ? defaults.readMoreLabel : _ref$readMoreLabel,
|
135
157
|
_ref$secondsAgoText = _ref.secondsAgoText,
|
136
|
-
secondsAgoText = _ref$secondsAgoText ===
|
158
|
+
secondsAgoText = _ref$secondsAgoText === void 0 ? defaults.secondsAgoText : _ref$secondsAgoText,
|
137
159
|
_ref$settingsIconDesc = _ref.settingsIconDescription,
|
138
|
-
settingsIconDescription = _ref$settingsIconDesc ===
|
160
|
+
settingsIconDescription = _ref$settingsIconDesc === void 0 ? defaults.settingsIconDescription : _ref$settingsIconDesc,
|
139
161
|
_ref$title = _ref.title,
|
140
|
-
title = _ref$title ===
|
162
|
+
title = _ref$title === void 0 ? defaults.title : _ref$title,
|
141
163
|
_ref$todayLabel = _ref.todayLabel,
|
142
|
-
todayLabel = _ref$todayLabel ===
|
164
|
+
todayLabel = _ref$todayLabel === void 0 ? defaults.todayLabel : _ref$todayLabel,
|
143
165
|
_ref$viewAllLabel = _ref.viewAllLabel,
|
144
|
-
viewAllLabel = _ref$viewAllLabel ===
|
166
|
+
viewAllLabel = _ref$viewAllLabel === void 0 ? defaults.viewAllLabel : _ref$viewAllLabel,
|
145
167
|
_ref$yearAgoText = _ref.yearAgoText,
|
146
|
-
yearAgoText = _ref$yearAgoText ===
|
168
|
+
yearAgoText = _ref$yearAgoText === void 0 ? defaults.yearAgoText : _ref$yearAgoText,
|
147
169
|
_ref$yearsAgoText = _ref.yearsAgoText,
|
148
|
-
yearsAgoText = _ref$yearsAgoText ===
|
170
|
+
yearsAgoText = _ref$yearsAgoText === void 0 ? defaults.yearsAgoText : _ref$yearsAgoText,
|
149
171
|
_ref$yesterdayAtText = _ref.yesterdayAtText,
|
150
|
-
yesterdayAtText = _ref$yesterdayAtText ===
|
172
|
+
yesterdayAtText = _ref$yesterdayAtText === void 0 ? defaults.yesterdayAtText : _ref$yesterdayAtText,
|
151
173
|
_ref$yesterdayLabel = _ref.yesterdayLabel,
|
152
|
-
yesterdayLabel = _ref$yesterdayLabel ===
|
174
|
+
yesterdayLabel = _ref$yesterdayLabel === void 0 ? defaults.yesterdayLabel : _ref$yesterdayLabel,
|
153
175
|
triggerButtonRef = _ref.triggerButtonRef,
|
154
176
|
rest = _objectWithoutProperties(_ref, _excluded);
|
155
177
|
var notificationPanelRef = useRef(null);
|
156
178
|
var notificationPanelInnerRef = useRef(null);
|
157
179
|
var startSentinel = useRef(null);
|
158
180
|
var endSentinel = useRef(null);
|
159
|
-
var _useState = useState(
|
181
|
+
var _useState = useState([]),
|
160
182
|
_useState2 = _slicedToArray(_useState, 2),
|
161
|
-
|
162
|
-
|
163
|
-
var
|
164
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
165
|
-
allNotifications = _useState4[0],
|
166
|
-
setAllNotifications = _useState4[1];
|
167
|
-
var previousState = usePreviousValue({
|
168
|
-
open: open
|
169
|
-
});
|
170
|
-
var reducedMotion = usePrefersReducedMotion();
|
183
|
+
allNotifications = _useState2[0],
|
184
|
+
setAllNotifications = _useState2[1];
|
185
|
+
var supportedLocale = getSupportedLocale(dateTimeLocale, DefaultLocale);
|
171
186
|
var carbonPrefix = usePrefix();
|
187
|
+
var reducedMotion = usePrefersReducedMotion();
|
188
|
+
var exitAnimationName = reducedMotion ? 'notifications-panel-exit-reduced' : 'notifications-panel-fade-out';
|
189
|
+
var _usePresence = usePresence(open, notificationPanelRef, exitAnimationName),
|
190
|
+
shouldRender = _usePresence.shouldRender;
|
172
191
|
useEffect(function () {
|
173
192
|
// Set the notifications passed to the state within this component
|
174
193
|
setAllNotifications(data);
|
175
194
|
}, [data]);
|
176
195
|
useClickOutside(ref || notificationPanelRef, function () {
|
177
|
-
onClickOutside === null || onClickOutside ===
|
196
|
+
onClickOutside === null || onClickOutside === void 0 || onClickOutside();
|
178
197
|
setTimeout(function () {
|
179
198
|
var _triggerButtonRef$cur;
|
180
|
-
triggerButtonRef === null || triggerButtonRef ===
|
199
|
+
triggerButtonRef === null || triggerButtonRef === void 0 || (_triggerButtonRef$cur = triggerButtonRef.current) === null || _triggerButtonRef$cur === void 0 || _triggerButtonRef$cur.focus();
|
181
200
|
}, 0);
|
182
201
|
});
|
183
202
|
var handleKeydown = function handleKeydown(event) {
|
184
203
|
event.stopPropagation();
|
185
204
|
if (event.key === 'Escape') {
|
186
|
-
|
187
|
-
onClickOutside === null || onClickOutside === undefined || onClickOutside();
|
205
|
+
onClickOutside === null || onClickOutside === void 0 || onClickOutside();
|
188
206
|
setTimeout(function () {
|
189
207
|
var _triggerButtonRef$cur2;
|
190
|
-
triggerButtonRef === null || triggerButtonRef ===
|
208
|
+
triggerButtonRef === null || triggerButtonRef === void 0 || (_triggerButtonRef$cur2 = triggerButtonRef.current) === null || _triggerButtonRef$cur2 === void 0 || _triggerButtonRef$cur2.focus();
|
191
209
|
}, 100);
|
192
210
|
}
|
193
211
|
};
|
194
212
|
useEffect(function () {
|
195
213
|
// initialize the notification panel to open
|
196
214
|
if (open) {
|
197
|
-
setRender(true);
|
198
215
|
var observer = new MutationObserver(function () {
|
199
216
|
if (notificationPanelRef.current) {
|
200
217
|
var _querySelector;
|
201
218
|
var parentElement = notificationPanelRef.current;
|
202
|
-
parentElement === null || parentElement ===
|
219
|
+
parentElement === null || parentElement === void 0 || (_querySelector = parentElement.querySelector(".".concat(blockClass, "__dismiss-button"))) === null || _querySelector === void 0 || _querySelector.focus();
|
203
220
|
observer.disconnect();
|
204
221
|
}
|
205
222
|
});
|
206
223
|
if (notificationPanelRef.current) {
|
207
224
|
var parentElement = notificationPanelRef.current;
|
208
|
-
var button = parentElement === null || parentElement ===
|
209
|
-
button === null || button ===
|
225
|
+
var button = parentElement === null || parentElement === void 0 ? void 0 : parentElement.querySelector(".".concat(blockClass, "__dismiss-button"));
|
226
|
+
button === null || button === void 0 || button.focus();
|
210
227
|
} else {
|
211
228
|
observer.observe(document.body, {
|
212
229
|
childList: true,
|
@@ -218,17 +235,6 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
|
|
218
235
|
};
|
219
236
|
}
|
220
237
|
}, [open]);
|
221
|
-
var onAnimationEnd = function onAnimationEnd() {
|
222
|
-
// initialize the notification panel to close
|
223
|
-
if (!open) {
|
224
|
-
setRender(false);
|
225
|
-
}
|
226
|
-
};
|
227
|
-
useEffect(function () {
|
228
|
-
if (!open && previousState !== null && previousState !== undefined && previousState.open && reducedMotion) {
|
229
|
-
setRender(false);
|
230
|
-
}
|
231
|
-
}, [open, previousState === null || previousState === undefined ? undefined : previousState.open, reducedMotion]);
|
232
238
|
var sortChronologically = function sortChronologically(arr) {
|
233
239
|
if (!arr || arr && !arr.length) {
|
234
240
|
return;
|
@@ -261,9 +267,9 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
|
|
261
267
|
return item.id === id;
|
262
268
|
})[0];
|
263
269
|
var trimLength = 88;
|
264
|
-
var description = notification === null || notification ===
|
265
|
-
var descriptionClassName = cx(["".concat(blockClass, "__notification-description"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__notification-long-description"), notification === null || notification ===
|
266
|
-
var showMoreButtonClassName = cx([_defineProperty(_defineProperty({}, "".concat(blockClass, "__notification-read-less-button"), notification === null || notification ===
|
270
|
+
var description = notification === null || notification === void 0 ? void 0 : notification['description'];
|
271
|
+
var descriptionClassName = cx(["".concat(blockClass, "__notification-description"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__notification-long-description"), notification === null || notification === void 0 ? void 0 : notification['showAll']), "".concat(blockClass, "__notification-short-description"), !(notification !== null && notification !== void 0 && notification['showAll']))]);
|
272
|
+
var showMoreButtonClassName = cx([_defineProperty(_defineProperty({}, "".concat(blockClass, "__notification-read-less-button"), notification === null || notification === void 0 ? void 0 : notification['showAll']), "".concat(blockClass, "__notification-read-more-button"), !(notification !== null && notification !== void 0 && notification['showAll']))]);
|
267
273
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", {
|
268
274
|
className: descriptionClassName
|
269
275
|
}, description), description.length > trimLength && /*#__PURE__*/React__default.createElement(Button, {
|
@@ -274,14 +280,14 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
|
|
274
280
|
size: 16
|
275
281
|
}, props));
|
276
282
|
},
|
277
|
-
iconDescription: notification !== null && notification !==
|
283
|
+
iconDescription: notification !== null && notification !== void 0 && notification['showAll'] ? readLessLabel : readMoreLabel,
|
278
284
|
onClick: function onClick(event) {
|
279
285
|
event.preventDefault();
|
280
286
|
event.stopPropagation();
|
281
287
|
var newData = allNotifications.map(function (item) {
|
282
|
-
if (item.id === (notification === null || notification ===
|
288
|
+
if (item.id === (notification === null || notification === void 0 ? void 0 : notification['id'])) {
|
283
289
|
return Object.assign({}, item, {
|
284
|
-
showAll: !(item !== null && item !==
|
290
|
+
showAll: !(item !== null && item !== void 0 && item['showAll'])
|
285
291
|
});
|
286
292
|
}
|
287
293
|
return item;
|
@@ -289,7 +295,7 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
|
|
289
295
|
setAllNotifications(newData);
|
290
296
|
},
|
291
297
|
className: showMoreButtonClassName
|
292
|
-
}, notification !== null && notification !==
|
298
|
+
}, notification !== null && notification !== void 0 && notification['showAll'] ? readLessLabel : readMoreLabel));
|
293
299
|
};
|
294
300
|
var renderNotification = function renderNotification(group, notification, index) {
|
295
301
|
var notificationClassName = cx(["".concat(blockClass, "__notification"), "".concat(blockClass, "__notification-").concat(group)]);
|
@@ -326,7 +332,10 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
|
|
326
332
|
className: "".concat(blockClass, "__notification-content")
|
327
333
|
}, /*#__PURE__*/React__default.createElement("p", {
|
328
334
|
className: "".concat(blockClass, "__notification-time-label")
|
329
|
-
},
|
335
|
+
}, dateTimeLocale ? dateTimeFormat.relative.format(notification.timestamp, {
|
336
|
+
locale: supportedLocale,
|
337
|
+
style: dateTimeStyle
|
338
|
+
}) : timeAgo({
|
330
339
|
previousTime: notification.timestamp,
|
331
340
|
secondsAgoText: secondsAgoText,
|
332
341
|
minuteAgoText: minuteAgoText,
|
@@ -376,7 +385,6 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
|
|
376
385
|
}, rest, {
|
377
386
|
id: blockClass,
|
378
387
|
className: cx(blockClass, className, "".concat(blockClass, "__container"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__entrance"), open), "".concat(blockClass, "__exit"), !open)),
|
379
|
-
onAnimationEnd: onAnimationEnd,
|
380
388
|
ref: ref || notificationPanelRef
|
381
389
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement("div", {
|
382
390
|
ref: notificationPanelInnerRef
|
@@ -479,6 +487,16 @@ NotificationsPanel.propTypes = {
|
|
479
487
|
unread: PropTypes.bool,
|
480
488
|
onNotificationClick: PropTypes.func
|
481
489
|
})).isRequired,
|
490
|
+
/**
|
491
|
+
* The language for each notification's time stamp.
|
492
|
+
*/
|
493
|
+
dateTimeLocale: PropTypes.string,
|
494
|
+
/**
|
495
|
+
* The date/time format for each notification's time stamp.
|
496
|
+
*
|
497
|
+
* E.g. `long` as "6 minutes ago", `short` as "6m ago".
|
498
|
+
*/
|
499
|
+
dateTimeStyle: PropTypes.string,
|
482
500
|
/**
|
483
501
|
* Sets the `days ago` label text
|
484
502
|
*/
|
@@ -38,7 +38,7 @@ var OptionsTile = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
38
38
|
onToggle = props.onToggle,
|
39
39
|
userOpen = props.open,
|
40
40
|
_props$size = props.size,
|
41
|
-
size = _props$size ===
|
41
|
+
size = _props$size === void 0 ? defaults.size : _props$size,
|
42
42
|
summary = props.summary,
|
43
43
|
title = props.title,
|
44
44
|
userDefinedTitleId = props.titleId,
|
@@ -49,13 +49,13 @@ var OptionsTile = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
49
49
|
_useState2 = _slicedToArray(_useState, 2),
|
50
50
|
closing = _useState2[0],
|
51
51
|
setClosing = _useState2[1];
|
52
|
-
var _useControllableState = useControllableState(userOpen !== null && userOpen !==
|
52
|
+
var _useControllableState = useControllableState(userOpen !== null && userOpen !== void 0 ? userOpen : false, onChange),
|
53
53
|
_useControllableState2 = _slicedToArray(_useControllableState, 2),
|
54
54
|
open = _useControllableState2[0],
|
55
55
|
setOpen = _useControllableState2[1];
|
56
56
|
var detailsRef = useRef(null);
|
57
57
|
var contentRef = useRef(null);
|
58
|
-
var titleId = userDefinedTitleId !== null && userDefinedTitleId !==
|
58
|
+
var titleId = userDefinedTitleId !== null && userDefinedTitleId !== void 0 ? userDefinedTitleId : "".concat(uuidv4(), "-title");
|
59
59
|
var isExpandable = children !== undefined;
|
60
60
|
var isWarn = !invalid && warn;
|
61
61
|
var isLocked = !invalid && !isWarn && locked;
|
@@ -177,6 +177,7 @@ var OptionsTile = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
177
177
|
size: "sm",
|
178
178
|
disabled: isLocked
|
179
179
|
})), isExpandable ? /*#__PURE__*/React__default.createElement("details", {
|
180
|
+
className: "".concat(blockClass, "__details"),
|
180
181
|
open: open,
|
181
182
|
ref: detailsRef
|
182
183
|
}, /*#__PURE__*/React__default.createElement("summary", {
|
@@ -58,10 +58,10 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
58
58
|
enableBreadcrumbScroll = _ref.enableBreadcrumbScroll,
|
59
59
|
expandHeaderIconDescription = _ref.expandHeaderIconDescription,
|
60
60
|
_ref$fullWidthGrid = _ref.fullWidthGrid,
|
61
|
-
fullWidthGrid = _ref$fullWidthGrid ===
|
61
|
+
fullWidthGrid = _ref$fullWidthGrid === void 0 ? defaults.fullWidthGrid : _ref$fullWidthGrid,
|
62
62
|
hasCollapseHeaderToggle = _ref.hasCollapseHeaderToggle,
|
63
63
|
_ref$narrowGrid = _ref.narrowGrid,
|
64
|
-
narrowGrid = _ref$narrowGrid ===
|
64
|
+
narrowGrid = _ref$narrowGrid === void 0 ? defaults.narrowGrid : _ref$narrowGrid,
|
65
65
|
navigation = _ref.navigation,
|
66
66
|
pageActions = _ref.pageActions,
|
67
67
|
pageActionsOverflowLabel = _ref.pageActionsOverflowLabel,
|
@@ -72,20 +72,20 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
72
72
|
title = _ref.title,
|
73
73
|
withoutBackground = _ref.withoutBackground,
|
74
74
|
_ref$breadcrumbOverfl = _ref.breadcrumbOverflowTooltipAlign,
|
75
|
-
breadcrumbOverflowTooltipAlign = _ref$breadcrumbOverfl ===
|
75
|
+
breadcrumbOverflowTooltipAlign = _ref$breadcrumbOverfl === void 0 ? defaults.breadcrumbOverflowTooltipAlign : _ref$breadcrumbOverfl,
|
76
76
|
rest = _objectWithoutProperties(_ref, _excluded);
|
77
77
|
// handle deprecated props - START
|
78
78
|
// if withoutBackground is nullish check deprecated_hasBackgroundAlways and default false
|
79
|
-
withoutBackground !== null && withoutBackground !==
|
79
|
+
withoutBackground !== null && withoutBackground !== void 0 ? withoutBackground : withoutBackground = !(deprecated_hasBackgroundAlways !== null && deprecated_hasBackgroundAlways !== void 0 ? deprecated_hasBackgroundAlways : true);
|
80
80
|
// prefer enabled if nullish check deprecated_disableBreadcrumbScroll and default false
|
81
|
-
enableBreadcrumbScroll !== null && enableBreadcrumbScroll !==
|
81
|
+
enableBreadcrumbScroll !== null && enableBreadcrumbScroll !== void 0 ? enableBreadcrumbScroll : enableBreadcrumbScroll = !(deprecated_disableBreadcrumbScroll !== null && deprecated_disableBreadcrumbScroll !== void 0 ? deprecated_disableBreadcrumbScroll : true);
|
82
82
|
// handle deprecated props - END
|
83
83
|
|
84
84
|
var _useState = useState({}),
|
85
85
|
_useState2 = _slicedToArray(_useState, 2),
|
86
86
|
metrics = _useState2[0],
|
87
87
|
setMetrics = _useState2[1];
|
88
|
-
var _useState3 = useState(_objectSpread2({}, rest === null || rest ===
|
88
|
+
var _useState3 = useState(_objectSpread2({}, rest === null || rest === void 0 ? void 0 : rest.style)),
|
89
89
|
_useState4 = _slicedToArray(_useState3, 2),
|
90
90
|
pageHeaderStyles = _useState4[0],
|
91
91
|
setPageHeaderStyles = _useState4[1];
|
@@ -100,7 +100,7 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
100
100
|
// state based on props only
|
101
101
|
var hasActionBar = actionBarItems && actionBarItems.length > 0;
|
102
102
|
var hasBreadcrumbRow = !!breadcrumbs || !!actionBarItems;
|
103
|
-
if (tags && (tags === null || tags ===
|
103
|
+
if (tags && (tags === null || tags === void 0 ? void 0 : tags.length) > 10) {
|
104
104
|
if (!allTagsModalSearchLabel) {
|
105
105
|
throw new Error("allTagsModalSearchLabel' is required.");
|
106
106
|
}
|
@@ -178,7 +178,7 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
178
178
|
if (minWidth !== actionBarMinWidth || maxWidth !== actionBarMaxWidth) {
|
179
179
|
var _overflowMenuRef$curr;
|
180
180
|
var overflowMenuWidth = 0;
|
181
|
-
var overflowMenu = overflowMenuRef === null || overflowMenuRef ===
|
181
|
+
var overflowMenu = overflowMenuRef === null || overflowMenuRef === void 0 || (_overflowMenuRef$curr = overflowMenuRef.current) === null || _overflowMenuRef$curr === void 0 ? void 0 : _overflowMenuRef$curr.querySelector(".".concat(prefix, "--overflow-menu"));
|
182
182
|
if (overflowMenu) {
|
183
183
|
overflowMenuWidth = overflowMenu.offsetWidth;
|
184
184
|
}
|
@@ -218,13 +218,13 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
218
218
|
checkUpdateVerticalSpace();
|
219
219
|
};
|
220
220
|
var handleCollapseToggle = function handleCollapseToggle() {
|
221
|
-
utilSetCollapsed(!fullyCollapsed, headerRef, metrics === null || metrics ===
|
221
|
+
utilSetCollapsed(!fullyCollapsed, headerRef, metrics === null || metrics === void 0 ? void 0 : metrics.headerOffset, metrics === null || metrics === void 0 ? void 0 : metrics.headerTopValue);
|
222
222
|
};
|
223
223
|
|
224
224
|
// use effects
|
225
225
|
useEffect(function () {
|
226
226
|
/* istanbul ignore else */
|
227
|
-
if (pageActions !== null && pageActions !==
|
227
|
+
if (pageActions !== null && pageActions !== void 0 && pageActions.content) {
|
228
228
|
var _ref5 = pageActions,
|
229
229
|
minWidth = _ref5.minWidth,
|
230
230
|
maxWidth = _ref5.maxWidth;
|
@@ -237,8 +237,8 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
237
237
|
useEffect(function () {
|
238
238
|
// Determine the location of the pageAction buttons
|
239
239
|
/* istanbul ignore next */
|
240
|
-
if (metrics !== null && metrics !==
|
241
|
-
setPageActionsInBreadcrumbRow(collapseTitle || hasActionBar && scrollYValue > (metrics === null || metrics ===
|
240
|
+
if (metrics !== null && metrics !== void 0 && metrics.titleRowSpaceAbove && metrics !== null && metrics !== void 0 && metrics.pageActionsSpaceAbove) {
|
241
|
+
setPageActionsInBreadcrumbRow(collapseTitle || hasActionBar && scrollYValue > (metrics === null || metrics === void 0 ? void 0 : metrics.titleRowSpaceAbove) || widthIsNarrow && scrollYValue > (metrics === null || metrics === void 0 ? void 0 : metrics.pageActionsSpaceAbove));
|
242
242
|
}
|
243
243
|
}, [hasActionBar, metrics.breadcrumbRowSpaceBelow, metrics.titleRowSpaceAbove, metrics.pageActionsSpaceAbove, collapseTitle, scrollYValue, widthIsNarrow]);
|
244
244
|
useEffect(function () {
|
@@ -272,8 +272,8 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
272
272
|
// Updates custom CSS props used to manage scroll behavior
|
273
273
|
/* istanbul ignore next */
|
274
274
|
setPageHeaderStyles(function (prev) {
|
275
|
-
return _objectSpread2(_objectSpread2({}, prev), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "--".concat(blockClass, "--height-px"), "".concat(metrics.headerHeight, "px")), "--".concat(blockClass, "--width-px"), "".concat(metrics.headerWidth, "px")), "--".concat(blockClass, "--header-top"), "".concat(((metrics === null || metrics ===
|
276
|
-
)))), "--".concat(blockClass, "--breadcrumb-row-width-px"), "".concat(metrics === null || metrics ===
|
275
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "--".concat(blockClass, "--height-px"), "".concat(metrics.headerHeight, "px")), "--".concat(blockClass, "--width-px"), "".concat(metrics.headerWidth, "px")), "--".concat(blockClass, "--header-top"), "".concat(((metrics === null || metrics === void 0 ? void 0 : metrics.headerTopValue) || 0) + ((metrics === null || metrics === void 0 ? void 0 : metrics.headerOffset) || 0), "px")), "--".concat(blockClass, "--breadcrumb-title-visibility"), scrollYValue > 0 ? 'visible' : 'hidden'), "--".concat(blockClass, "--scroll"), "".concat(scrollYValue)), "--".concat(blockClass, "--breadcrumb-title-top"), "".concat(metrics.breadcrumbTitleHeight && metrics.titleRowSpaceAbove && Math.max(0, metrics.breadcrumbTitleHeight + metrics.titleRowSpaceAbove - scrollYValue), "px")), "--".concat(blockClass, "--breadcrumb-title-opacity"), "".concat(Math.min(1, Math.max(0, (scrollYValue - (metrics.titleRowSpaceAbove || 0)) / (metrics.breadcrumbTitleHeight || 1) // don't want to divide by zero
|
276
|
+
)))), "--".concat(blockClass, "--breadcrumb-row-width-px"), "".concat(metrics === null || metrics === void 0 ? void 0 : metrics.breadcrumbRowWidth, "px")));
|
277
277
|
});
|
278
278
|
}, [headerRef, enableBreadcrumbScroll, metrics, metrics.breadcrumbRowHeight, metrics.breadcrumbRowSpaceBelow, metrics.breadcrumbTitleHeight, metrics.breadcrumbRowWidth, metrics.headerHeight, metrics.headerWidth, metrics.headerOffset, metrics.headerTopValue, metrics.navigationRowHeight, navigation, scrollYValue, tags]);
|
279
279
|
useNearestScroll(headerRef,
|
@@ -289,7 +289,7 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
289
289
|
|
290
290
|
// set offset for tagset tooltip
|
291
291
|
/* istanbul ignore next */
|
292
|
-
var tagsetTooltipOffset = fullyCollapsed && metrics !== null && metrics !==
|
292
|
+
var tagsetTooltipOffset = fullyCollapsed && metrics !== null && metrics !== void 0 && metrics.headerHeight && metrics !== null && metrics !== void 0 && metrics.headerTopValue && metrics !== null && metrics !== void 0 && metrics.headerOffset ? metrics.headerHeight + metrics.headerTopValue + metrics.headerOffset : (metrics.headerHeight || 0) + (metrics.headerOffset || 0);
|
293
293
|
|
294
294
|
/* istanbul ignore next */
|
295
295
|
document.documentElement.style.setProperty("--".concat(blockClass, "--tagset-tooltip-position"), fullyCollapsed ? 'fixed' : 'absolute');
|
@@ -309,14 +309,14 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
309
309
|
useEffect(function () {
|
310
310
|
// Determines the appropriate header background opacity based on the header config/height/scroll and the withoutBackground setting
|
311
311
|
var result = withoutBackground ? 0 : 1;
|
312
|
-
if (!result && metrics !== null && metrics !==
|
312
|
+
if (!result && metrics !== null && metrics !== void 0 && metrics.headerHeight && metrics.headerHeight > 0 && (breadcrumbs || actionBarItems || tags || navigation)) {
|
313
313
|
var startAddingAt = parseFloat("".concat(spacing[9])) * parseInt("".concat(baseFontSize));
|
314
314
|
var scrollRemaining = metrics.headerHeight - scrollYValue;
|
315
315
|
|
316
316
|
/* don't know how to test resize */
|
317
317
|
/* istanbul ignore if */
|
318
318
|
if (scrollRemaining < startAddingAt) {
|
319
|
-
var distanceAddingOver = startAddingAt - ((metrics === null || metrics ===
|
319
|
+
var distanceAddingOver = startAddingAt - ((metrics === null || metrics === void 0 ? void 0 : metrics.breadcrumbRowHeight) || 0);
|
320
320
|
result = Math.min(1, (startAddingAt - scrollRemaining) / distanceAddingOver);
|
321
321
|
}
|
322
322
|
}
|
@@ -332,7 +332,7 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
332
332
|
}, [withoutBackground, hasCollapseHeaderToggle]);
|
333
333
|
useEffect(function () {
|
334
334
|
// Determine if space is needed in the breadcrumb for a collapse button
|
335
|
-
if (hasCollapseButton && !(navigation || tags) && metrics !== null && metrics !==
|
335
|
+
if (hasCollapseButton && !(navigation || tags) && metrics !== null && metrics !== void 0 && metrics.headerHeight) {
|
336
336
|
setSpaceForCollapseButton(true);
|
337
337
|
} else {
|
338
338
|
setSpaceForCollapseButton(false);
|
@@ -502,7 +502,7 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
502
502
|
className: cx("".concat(blockClass, "__page-actions"), _defineProperty({}, "".concat(blockClass, "__page-actions--in-breadcrumb"), inBreadcrumbRow))
|
503
503
|
}, /*#__PURE__*/React__default.createElement("div", {
|
504
504
|
className: cx("".concat(blockClass, "__page-actions-content"))
|
505
|
-
}, (_content = pageActions === null || pageActions ===
|
505
|
+
}, (_content = pageActions === null || pageActions === void 0 ? void 0 : pageActions.content) !== null && _content !== void 0 ? _content : /*#__PURE__*/React__default.createElement(ButtonSetWithOverflow, {
|
506
506
|
className: "".concat(blockClass, "__button-set-with-overflow"),
|
507
507
|
menuOptionsClass: cx(pageActionsMenuOptionsClass, "".concat(blockClass, "__button-set-menu-options")),
|
508
508
|
onWidthChange: handleWidthChange,
|
@@ -40,7 +40,7 @@ var PageHeaderTitle = function PageHeaderTitle(_ref) {
|
|
40
40
|
cancelDescription = title.cancelDescription,
|
41
41
|
saveDescription = title.saveDescription,
|
42
42
|
_title$tooltipAlignme = title.tooltipAlignment,
|
43
|
-
tooltipAlignment = _title$tooltipAlignme ===
|
43
|
+
tooltipAlignment = _title$tooltipAlignme === void 0 ? 'bottom' : _title$tooltipAlignme,
|
44
44
|
rest = _objectWithoutProperties(title, _excluded);
|
45
45
|
var titleText;
|
46
46
|
var isEditable = !!onSave;
|
@@ -163,7 +163,7 @@ var utilGetBreadcrumbItemForTitle = function utilGetBreadcrumbItemForTitle(block
|
|
163
163
|
var _ref, _title$breadcrumbCont;
|
164
164
|
// user defined content
|
165
165
|
breadcrumbTitle = {
|
166
|
-
label: (_ref = (_title$breadcrumbCont = title.breadcrumbContent) !== null && _title$breadcrumbCont !==
|
166
|
+
label: (_ref = (_title$breadcrumbCont = title.breadcrumbContent) !== null && _title$breadcrumbCont !== void 0 ? _title$breadcrumbCont : title.content) !== null && _ref !== void 0 ? _ref : title.asText,
|
167
167
|
title: title.asText
|
168
168
|
};
|
169
169
|
} else {
|
@@ -17,7 +17,7 @@ var _excluded = ["actionsPlacement"];
|
|
17
17
|
var componentName = 'ProductiveCard';
|
18
18
|
var ProductiveCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
19
19
|
var _ref$actionsPlacement = _ref.actionsPlacement,
|
20
|
-
actionsPlacement = _ref$actionsPlacement ===
|
20
|
+
actionsPlacement = _ref$actionsPlacement === void 0 ? 'top' : _ref$actionsPlacement,
|
21
21
|
rest = _objectWithoutProperties(_ref, _excluded);
|
22
22
|
var validProps = prepareProps(rest, ['media', 'mediaPosition', 'pictogram', 'primaryButtonClick', 'productive', 'secondaryButtonKind']);
|
23
23
|
return /*#__PURE__*/React__default.createElement(Card, _extends({}, _objectSpread2(_objectSpread2({}, validProps), {}, {
|
@@ -74,10 +74,10 @@ var RemoveModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
74
74
|
// the value of the input will still remain: we only want to empty the input value
|
75
75
|
// when open actually changes to false.
|
76
76
|
useEffect(function () {
|
77
|
-
if (!open && previousState !== null && previousState !==
|
77
|
+
if (!open && previousState !== null && previousState !== void 0 && previousState.open) {
|
78
78
|
setUserInput('');
|
79
79
|
}
|
80
|
-
}, [open, previousState === null || previousState ===
|
80
|
+
}, [open, previousState === null || previousState === void 0 ? void 0 : previousState.open]);
|
81
81
|
return renderPortalUse(/*#__PURE__*/React__default.createElement(ComposedModal, _extends({}, rest, {
|
82
82
|
className: cx(blockClass, className),
|
83
83
|
size: "sm",
|
@@ -81,7 +81,7 @@ var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
81
81
|
size: 16
|
82
82
|
}))), /*#__PURE__*/React__default.createElement("p", {
|
83
83
|
className: "".concat(blockClass, "__text")
|
84
|
-
}, (_statusObj$status = statusObj[status]) === null || _statusObj$status ===
|
84
|
+
}, (_statusObj$status = statusObj[status]) === null || _statusObj$status === void 0 ? void 0 : _statusObj$status.text)) : /*#__PURE__*/React__default.createElement("div", {
|
85
85
|
className: "".concat(blockClass, "__buttons")
|
86
86
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
87
87
|
onClick: onRequestCancel,
|
@@ -91,11 +91,11 @@ var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
91
91
|
}, secondaryButtonText), /*#__PURE__*/React__default.createElement(Button, {
|
92
92
|
onClick: onRequestSave,
|
93
93
|
kind: "primary",
|
94
|
-
renderIcon: (_statusObj$status2 = statusObj[status]) === null || _statusObj$status2 ===
|
95
|
-
iconDescription: (_statusObj$status3 = statusObj[status]) === null || _statusObj$status3 ===
|
94
|
+
renderIcon: (_statusObj$status2 = statusObj[status]) === null || _statusObj$status2 === void 0 ? void 0 : _statusObj$status2.icon,
|
95
|
+
iconDescription: (_statusObj$status3 = statusObj[status]) === null || _statusObj$status3 === void 0 ? void 0 : _statusObj$status3.iconDescription,
|
96
96
|
disabled: status === 'in-progress',
|
97
97
|
type: "button"
|
98
|
-
}, (_statusObj$status4 = statusObj[status]) === null || _statusObj$status4 ===
|
98
|
+
}, (_statusObj$status4 = statusObj[status]) === null || _statusObj$status4 === void 0 ? void 0 : _statusObj$status4.text)));
|
99
99
|
});
|
100
100
|
Saving = pkg.checkComponentEnabled(Saving, componentName);
|
101
101
|
Saving.propTypes = {
|
@@ -33,14 +33,14 @@ var ScrollGradient = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
33
33
|
var children = _ref.children,
|
34
34
|
className = _ref.className,
|
35
35
|
_ref$color = _ref.color,
|
36
|
-
color = _ref$color ===
|
36
|
+
color = _ref$color === void 0 ? defaults.color : _ref$color,
|
37
37
|
_ref$onScroll = _ref.onScroll,
|
38
|
-
onScroll = _ref$onScroll ===
|
38
|
+
onScroll = _ref$onScroll === void 0 ? defaults.onScroll : _ref$onScroll,
|
39
39
|
scrollElementClassName = _ref.scrollElementClassName,
|
40
40
|
_ref$getScrollElement = _ref.getScrollElementRef,
|
41
|
-
getScrollElementRef = _ref$getScrollElement ===
|
41
|
+
getScrollElementRef = _ref$getScrollElement === void 0 ? defaults.getScrollElementRef : _ref$getScrollElement,
|
42
42
|
_ref$hideStartGradien = _ref.hideStartGradient,
|
43
|
-
hideStartGradient = _ref$hideStartGradien ===
|
43
|
+
hideStartGradient = _ref$hideStartGradien === void 0 ? defaults.hideStartGradient : _ref$hideStartGradien,
|
44
44
|
rest = _objectWithoutProperties(_ref, _excluded);
|
45
45
|
var intersectionStartRef = useRef();
|
46
46
|
var intersectionEndRef = useRef();
|
@@ -84,11 +84,11 @@ var ScrollGradient = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
84
84
|
if (entry.isIntersecting) {
|
85
85
|
gradientRef.current.style.opacity = 0;
|
86
86
|
gradientRef.current.style.display = 'none';
|
87
|
-
gradientRef === null || gradientRef ===
|
87
|
+
gradientRef === null || gradientRef === void 0 || gradientRef.current.setAttribute('aria-hidden', false);
|
88
88
|
} else {
|
89
89
|
gradientRef.current.style.opacity = 1;
|
90
90
|
gradientRef.current.style.display = 'block';
|
91
|
-
gradientRef === null || gradientRef ===
|
91
|
+
gradientRef === null || gradientRef === void 0 || gradientRef.current.setAttribute('aria-hidden', true);
|
92
92
|
}
|
93
93
|
}
|
94
94
|
};
|