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