@carbon/ibm-products 1.73.0 → 1.73.2
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 +34 -53
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -14
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +25 -40
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -12
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +27 -47
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -14
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +31 -51
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -14
- package/css/index.min.css.map +1 -1
- package/es/components/APIKeyModal/APIKeyDownloader.js +1 -1
- package/es/components/APIKeyModal/APIKeyModal.js +3 -3
- package/es/components/AboutModal/AboutModal.js +2 -2
- package/es/components/ActionBar/ActionBar.js +4 -4
- package/es/components/ActionBar/ActionBarItem.js +2 -2
- package/es/components/ActionSet/ActionSet.js +5 -6
- package/es/components/AddSelect/AddSelectBody.js +4 -4
- package/es/components/AddSelect/AddSelectColumn.js +5 -4
- package/es/components/AddSelect/AddSelectFilter.js +2 -2
- package/es/components/AddSelect/AddSelectList.js +2 -3
- package/es/components/AddSelect/AddSelectSidebar.js +1 -1
- package/es/components/AddSelect/add-select-utils.js +7 -6
- package/es/components/AddSelect/hooks/usePath.js +2 -2
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +4 -5
- package/es/components/ButtonMenu/ButtonMenu.js +0 -1
- package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +5 -5
- package/es/components/Card/Card.js +3 -4
- package/es/components/Card/CardHeader.js +1 -2
- package/es/components/Cascade/Cascade.js +2 -2
- package/es/components/Coachmark/Coachmark.js +1 -1
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +2 -3
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +1 -2
- package/es/components/CoachmarkStack/CoachmarkStackHome.js +1 -1
- package/es/components/ComboButton/ComboButton.js +2 -2
- package/es/components/CreateFullPage/CreateFullPageStep.js +3 -4
- package/es/components/CreateInfluencer/CreateInfluencer.js +0 -1
- package/es/components/CreateModal/CreateModal.js +1 -1
- package/es/components/CreateSidePanel/CreateSidePanel.js +2 -2
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +3 -4
- package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +1 -1
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +3 -5
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +7 -8
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +4 -5
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +2 -3
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +5 -5
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +4 -4
- package/es/components/DataSpreadsheet/utils/checkSelectedHeaderCell.js +4 -4
- package/es/components/DataSpreadsheet/utils/createActiveCellFn.js +1 -2
- package/es/components/DataSpreadsheet/utils/createCellSelectionArea.js +0 -1
- package/es/components/DataSpreadsheet/utils/generateData.js +2 -2
- package/es/components/DataSpreadsheet/utils/handleActiveCellInSelectionEnter.js +2 -2
- package/es/components/DataSpreadsheet/utils/handleCellDeletion.js +4 -4
- package/es/components/DataSpreadsheet/utils/handleEditSubmit.js +2 -4
- package/es/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +2 -2
- package/es/components/DataSpreadsheet/utils/handleMultipleKeys.js +2 -2
- package/es/components/DataSpreadsheet/utils/selectAllCells.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridContent.js +1 -2
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +4 -5
- package/es/components/Datagrid/Datagrid/DatagridRefBody.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridRow.js +15 -16
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +2 -3
- package/es/components/Datagrid/Datagrid/DraggableElement.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +3 -4
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +11 -11
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +11 -11
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +3 -3
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +5 -5
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +0 -2
- package/es/components/Datagrid/Datagrid/addons/stateReducer.js +5 -5
- package/es/components/Datagrid/Datagrid.stories/common.js +5 -5
- package/es/components/Datagrid/useActionsColumn.js +3 -5
- package/es/components/Datagrid/useColumnCenterAlign.js +2 -2
- package/es/components/Datagrid/useColumnRightAlign.js +2 -2
- package/es/components/Datagrid/useCustomizeColumns.js +2 -2
- package/es/components/Datagrid/useDatagrid.js +2 -2
- package/es/components/Datagrid/useDefaultStringRenderer.js +2 -2
- package/es/components/Datagrid/useDisableSelectRows.js +4 -4
- package/es/components/Datagrid/useExpandedRow.js +2 -2
- package/es/components/Datagrid/useFiltering.js +7 -8
- package/es/components/Datagrid/useFloatingScroll.js +1 -1
- package/es/components/Datagrid/useInitialColumnSort.js +1 -1
- package/es/components/Datagrid/useInlineEdit.js +2 -2
- package/es/components/Datagrid/useNestedRowExpander.js +3 -4
- package/es/components/Datagrid/useNestedRows.js +1 -2
- package/es/components/Datagrid/useRowExpander.js +2 -2
- package/es/components/Datagrid/useRowIsMouseOver.js +2 -2
- package/es/components/Datagrid/useRowRenderer.js +3 -3
- package/es/components/Datagrid/useRowSize.js +2 -2
- package/es/components/Datagrid/useSelectRows.js +4 -5
- package/es/components/Datagrid/useSortableColumns.js +3 -4
- package/es/components/Datagrid/useStickyColumn.js +5 -7
- package/es/components/Datagrid/utils/DatagridPagination.js +0 -1
- package/es/components/Datagrid/utils/filterPropsForTesting.js +2 -3
- package/es/components/Datagrid/utils/makeData.js +5 -5
- package/es/components/EditInPlace/EditInPlace.js +2 -2
- package/es/components/EditSidePanel/EditSidePanel.js +2 -2
- package/es/components/EditTearsheet/EditTearsheetForm.js +1 -2
- package/es/components/EmptyStates/EmptyState.js +2 -2
- package/es/components/EmptyStates/EmptyStateContent.js +2 -2
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +2 -2
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +2 -2
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +2 -2
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +2 -2
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +2 -2
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +2 -2
- package/es/components/ExampleComponent/ExampleComponent.js +2 -2
- package/es/components/ExportModal/ExportModal.js +5 -5
- package/es/components/FilterSummary/FilterSummary.js +3 -3
- package/es/components/HTTPErrors/HTTPErrorContent.js +2 -2
- package/es/components/ImportModal/ImportModal.js +3 -3
- package/es/components/InlineEdit/InlineEdit.js +2 -2
- package/es/components/InlineEditV1/InlineEditV1.js +5 -4
- package/es/components/InlineEditV2/InlineEditV2.js +3 -4
- package/es/components/InlineTip/utils.js +6 -5
- package/es/components/InterstitialScreen/InterstitialScreen.js +4 -5
- package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +0 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +2 -3
- package/es/components/PageHeader/PageHeader.js +11 -13
- package/es/components/PageHeader/PageHeaderUtils.js +2 -2
- package/es/components/ProductiveCard/ProductiveCard.js +2 -2
- package/es/components/RemoveModal/RemoveModal.js +2 -2
- package/es/components/Saving/Saving.js +6 -6
- package/es/components/SidePanel/SidePanel.js +17 -18
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +2 -2
- package/es/components/TagSet/TagSet.js +4 -4
- package/es/components/TagSet/TagSetModal.js +5 -5
- package/es/components/TagSet/TagSetOverflow.js +1 -2
- package/es/components/Tearsheet/Tearsheet.js +2 -2
- package/es/components/Tearsheet/TearsheetNarrow.js +2 -2
- package/es/components/Tearsheet/TearsheetShell.js +10 -11
- package/es/components/WebTerminal/WebTerminal.js +3 -4
- package/es/global/js/hooks/useCreateComponentFocus.js +1 -1
- package/es/global/js/hooks/useCreateComponentStepChange.js +3 -3
- package/es/global/js/hooks/useFocus.js +4 -4
- package/es/global/js/hooks/useWindowResize.js +2 -2
- package/es/global/js/package-settings.js +2 -3
- package/es/global/js/utils/Wrap.js +3 -3
- package/es/global/js/utils/deepCloneObject.js +4 -3
- package/es/global/js/utils/getNodeTextContent.js +6 -5
- package/es/global/js/utils/motionConstants.js +0 -1
- package/es/global/js/utils/props-helper.js +3 -3
- package/es/global/js/utils/scrollableAncestor.js +3 -3
- package/es/global/js/utils/story-helper.js +1 -1
- package/es/global/js/utils/test-helper.js +1 -1
- package/es/global/js/utils/unwrap-if-fragment.js +6 -6
- package/lib/components/APIKeyModal/APIKeyDownloader.js +4 -5
- package/lib/components/APIKeyModal/APIKeyModal.js +12 -8
- package/lib/components/AboutModal/AboutModal.js +14 -6
- package/lib/components/ActionBar/ActionBar.js +16 -9
- package/lib/components/ActionBar/ActionBarItem.js +12 -5
- package/lib/components/ActionBar/ActionBarOverflowItems.js +3 -4
- package/lib/components/ActionSet/ActionSet.js +15 -8
- package/lib/components/ActionSet/actions.js +4 -7
- package/lib/components/AddSelect/AddSelect.js +9 -5
- package/lib/components/AddSelect/AddSelectBody.js +13 -9
- package/lib/components/AddSelect/AddSelectBreadcrumbs.js +1 -2
- package/lib/components/AddSelect/AddSelectColumn.js +12 -8
- package/lib/components/AddSelect/AddSelectFilter.js +10 -6
- package/lib/components/AddSelect/AddSelectList.js +3 -5
- package/lib/components/AddSelect/AddSelectMetaPanel.js +3 -4
- package/lib/components/AddSelect/AddSelectSidebar.js +8 -4
- package/lib/components/AddSelect/AddSelectSort.js +1 -2
- package/lib/components/AddSelect/add-select-utils.js +10 -14
- package/lib/components/AddSelect/hooks/useItemSort.js +2 -3
- package/lib/components/AddSelect/hooks/useParentSelect.js +1 -2
- package/lib/components/AddSelect/hooks/usePath.js +8 -4
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +16 -10
- package/lib/components/ButtonMenu/ButtonMenu.js +10 -3
- package/lib/components/ButtonMenu/ButtonMenuItem.js +1 -2
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +13 -9
- package/lib/components/Card/Card.js +12 -9
- package/lib/components/Card/CardFooter.js +1 -2
- package/lib/components/Card/CardHeader.js +2 -4
- package/lib/components/Carousel/Carousel.js +9 -4
- package/lib/components/Carousel/CarouselItem.js +8 -2
- package/lib/components/Cascade/Cascade.js +11 -7
- package/lib/components/Checklist/Checklist.js +19 -4
- package/lib/components/Checklist/ChecklistChart.js +15 -2
- package/lib/components/Checklist/ChecklistIcon.js +17 -2
- package/lib/components/Coachmark/Coachmark.js +10 -5
- package/lib/components/Coachmark/CoachmarkDragbar.js +11 -4
- package/lib/components/Coachmark/CoachmarkHeader.js +9 -2
- package/lib/components/Coachmark/CoachmarkOverlay.js +11 -4
- package/lib/components/Coachmark/CoachmarkTagline.js +9 -2
- package/lib/components/Coachmark/utils/constants.js +2 -3
- package/lib/components/Coachmark/utils/context.js +3 -5
- package/lib/components/Coachmark/utils/enums.js +4 -7
- package/lib/components/Coachmark/utils/hooks.js +2 -3
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +11 -5
- package/lib/components/CoachmarkButton/CoachmarkButton.js +9 -2
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +12 -6
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +9 -2
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +11 -4
- package/lib/components/CoachmarkStack/CoachmarkStack.js +9 -4
- package/lib/components/CoachmarkStack/CoachmarkStackHome.js +10 -5
- package/lib/components/ComboButton/ComboButton.js +11 -6
- package/lib/components/ComboButton/ComboButtonItem/index.js +1 -2
- package/lib/components/CreateFullPage/CreateFullPage.js +14 -8
- package/lib/components/CreateFullPage/CreateFullPageStep.js +12 -8
- package/lib/components/CreateInfluencer/CreateInfluencer.js +1 -3
- package/lib/components/CreateModal/CreateModal.js +10 -3
- package/lib/components/CreateSidePanel/CreateSidePanel.js +12 -4
- package/lib/components/CreateTearsheet/CreateTearsheet.js +11 -8
- package/lib/components/CreateTearsheet/CreateTearsheetDivider.js +9 -4
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +12 -8
- package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +11 -5
- package/lib/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +4 -5
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +10 -3
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +14 -9
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +15 -12
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +12 -9
- package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.js +2 -3
- package/lib/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +2 -3
- package/lib/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +2 -3
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +4 -6
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +7 -8
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +11 -7
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +2 -3
- package/lib/components/DataSpreadsheet/utils/checkActiveHeaderCell.js +2 -3
- package/lib/components/DataSpreadsheet/utils/checkSelectedHeaderCell.js +6 -7
- package/lib/components/DataSpreadsheet/utils/createActiveCellFn.js +3 -5
- package/lib/components/DataSpreadsheet/utils/createCellSelectionArea.js +2 -4
- package/lib/components/DataSpreadsheet/utils/generateData.js +4 -5
- package/lib/components/DataSpreadsheet/utils/getCellSize.js +2 -3
- package/lib/components/DataSpreadsheet/utils/getSelectionAreaPoints.js +2 -3
- package/lib/components/DataSpreadsheet/utils/getSpreadsheetWidth.js +2 -3
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionEnter.js +9 -5
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionTab.js +2 -3
- package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +6 -7
- package/lib/components/DataSpreadsheet/utils/handleEditSubmit.js +9 -7
- package/lib/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +4 -5
- package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +11 -9
- package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +2 -3
- package/lib/components/DataSpreadsheet/utils/removeCellSelections.js +2 -3
- package/lib/components/DataSpreadsheet/utils/selectAllCells.js +9 -5
- package/lib/components/Datagrid/Datagrid/Datagrid.js +7 -2
- package/lib/components/Datagrid/Datagrid/DatagridBody.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +4 -6
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridHead.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +12 -9
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +9 -4
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +21 -18
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +11 -6
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +9 -4
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +9 -4
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +9 -4
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +10 -7
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +2 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +9 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +10 -6
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +8 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +9 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/common.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +4 -6
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -8
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +12 -10
- package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +15 -30
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +19 -15
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useSubscribeToEventEmitter.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +4 -7
- package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +3 -5
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +19 -15
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +11 -8
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/getCellIdAsObject.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +10 -6
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridFocus.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +12 -8
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +10 -5
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +3 -6
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +16 -16
- package/lib/components/Datagrid/Datagrid.stories/CustomizeColumnStory.js +2 -3
- package/lib/components/Datagrid/Datagrid.stories/RowSizeDropdownStory.js +2 -3
- package/lib/components/Datagrid/Datagrid.stories/SelectAllWithToggleStory.js +2 -3
- package/lib/components/Datagrid/Datagrid.stories/common.js +9 -12
- package/lib/components/Datagrid/common-column-ids.js +1 -2
- package/lib/components/Datagrid/useActionsColumn.js +10 -7
- package/lib/components/Datagrid/useColumnCenterAlign.js +8 -4
- package/lib/components/Datagrid/useColumnOrder.js +1 -2
- package/lib/components/Datagrid/useColumnRightAlign.js +8 -4
- package/lib/components/Datagrid/useCustomizeColumns.js +10 -6
- package/lib/components/Datagrid/useDatagrid.js +9 -4
- package/lib/components/Datagrid/useDefaultStringRenderer.js +9 -4
- package/lib/components/Datagrid/useDisableSelectRows.js +5 -6
- package/lib/components/Datagrid/useEditableCell.js +1 -2
- package/lib/components/Datagrid/useExpandedRow.js +8 -4
- package/lib/components/Datagrid/useFiltering.js +13 -10
- package/lib/components/Datagrid/useFlexResize.js +1 -2
- package/lib/components/Datagrid/useFloatingScroll.js +2 -3
- package/lib/components/Datagrid/useFocusRowExpander.js +2 -3
- package/lib/components/Datagrid/useInfiniteScroll.js +1 -2
- package/lib/components/Datagrid/useInitialColumnSort.js +3 -4
- package/lib/components/Datagrid/useInlineEdit.js +5 -6
- package/lib/components/Datagrid/useNestedRowExpander.js +11 -8
- package/lib/components/Datagrid/useNestedRows.js +2 -4
- package/lib/components/Datagrid/useOnRowClick.js +1 -2
- package/lib/components/Datagrid/useParentDimensions.js +1 -2
- package/lib/components/Datagrid/useResizeTable.js +1 -2
- package/lib/components/Datagrid/useRowExpander.js +10 -6
- package/lib/components/Datagrid/useRowIsMouseOver.js +9 -4
- package/lib/components/Datagrid/useRowRenderer.js +4 -5
- package/lib/components/Datagrid/useRowSize.js +9 -4
- package/lib/components/Datagrid/useSelectAllToggle.js +3 -4
- package/lib/components/Datagrid/useSelectRows.js +12 -9
- package/lib/components/Datagrid/useSkeletonRows.js +1 -2
- package/lib/components/Datagrid/useSortableColumns.js +10 -8
- package/lib/components/Datagrid/useStickyColumn.js +11 -9
- package/lib/components/Datagrid/utils/DatagridActions.js +4 -5
- package/lib/components/Datagrid/utils/DatagridPagination.js +2 -4
- package/lib/components/Datagrid/utils/Wrapper.js +2 -3
- package/lib/components/Datagrid/utils/filterPropsForTesting.js +5 -8
- package/lib/components/Datagrid/utils/getArgTypes.js +2 -3
- package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.js +2 -3
- package/lib/components/Datagrid/utils/getInlineEditColumns.js +3 -5
- package/lib/components/Datagrid/utils/handleFilterTagLabelText.js +2 -3
- package/lib/components/Datagrid/utils/makeData.js +13 -11
- package/lib/components/EditFullPage/EditFullPage.js +9 -2
- package/lib/components/EditInPlace/EditInPlace.js +11 -6
- package/lib/components/EditSidePanel/EditSidePanel.js +12 -4
- package/lib/components/EditTearsheet/EditTearsheet.js +11 -8
- package/lib/components/EditTearsheet/EditTearsheetForm.js +10 -6
- package/lib/components/EditTearsheet/preview-components/MultiFormEditTearsheet.js +4 -5
- package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +9 -2
- package/lib/components/EditUpdateCards/EditUpdateCards.js +9 -2
- package/lib/components/EmptyStates/EmptyState.js +12 -6
- package/lib/components/EmptyStates/EmptyStateContent.js +10 -4
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +11 -4
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +11 -4
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +11 -4
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +11 -4
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +11 -4
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +11 -4
- package/lib/components/EmptyStates/assets/ErrorIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +9 -2
- package/lib/components/ExampleComponent/ExampleComponent.js +14 -6
- package/lib/components/ExampleComponent/useExample.js +1 -2
- package/lib/components/ExportModal/ExportModal.js +14 -10
- package/lib/components/ExpressiveCard/ExpressiveCard.js +3 -4
- package/lib/components/FilterSummary/FilterSummary.js +12 -7
- package/lib/components/Guidebanner/Guidebanner.js +11 -4
- package/lib/components/Guidebanner/GuidebannerElement.js +9 -2
- package/lib/components/Guidebanner/GuidebannerElementButton.js +9 -2
- package/lib/components/Guidebanner/GuidebannerElementLink.js +9 -2
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +9 -2
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +9 -2
- package/lib/components/HTTPErrors/HTTPErrorContent.js +10 -4
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +9 -2
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +1 -2
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +1 -2
- package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +1 -2
- package/lib/components/ImportModal/ImportModal.js +12 -8
- package/lib/components/InlineEdit/InlineEdit.js +11 -6
- package/lib/components/InlineEditV1/InlineEditV1.js +18 -8
- package/lib/components/InlineEditV2/InlineEditV2.js +13 -10
- package/lib/components/InlineTip/InlineTip.js +11 -4
- package/lib/components/InlineTip/InlineTipButton.js +9 -2
- package/lib/components/InlineTip/InlineTipLink.js +9 -2
- package/lib/components/InlineTip/utils.js +5 -6
- package/lib/components/InterstitialScreen/InterstitialScreen.js +15 -9
- package/lib/components/InterstitialScreen/assets/index.js +4 -8
- package/lib/components/InterstitialScreenView/InterstitialScreenView.js +9 -2
- package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +9 -3
- package/lib/components/ModifiedTabs/ModifiedTabLabelNew.js +1 -2
- package/lib/components/ModifiedTabs/ModifiedTabLabelWithClose.js +1 -2
- package/lib/components/ModifiedTabs/ModifiedTabs.js +3 -4
- package/lib/components/MultiAddSelect/MultiAddSelect.js +3 -4
- package/lib/components/NonLinearReading/NonLinearReading.js +9 -4
- package/lib/components/NotificationsPanel/NotificationsPanel.js +14 -7
- package/lib/components/NotificationsPanel/NotificationsPanel_data.js +1 -2
- package/lib/components/NotificationsPanel/preview-components/UnreadNotificationBell.js +2 -3
- package/lib/components/NotificationsPanel/utils.js +1 -2
- package/lib/components/OptionsTile/OptionsTile.js +12 -4
- package/lib/components/PageHeader/PageHeader.js +21 -20
- package/lib/components/PageHeader/PageHeaderDemo.data.js +3 -4
- package/lib/components/PageHeader/PageHeaderTitle.js +2 -4
- package/lib/components/PageHeader/PageHeaderUtils.js +12 -11
- package/lib/components/ProductiveCard/ProductiveCard.js +11 -7
- package/lib/components/RemoveModal/RemoveModal.js +11 -7
- package/lib/components/Saving/Saving.js +15 -10
- package/lib/components/SidePanel/SidePanel.js +29 -22
- package/lib/components/SidePanel/constants.js +2 -3
- package/lib/components/SidePanel/motion/variants.js +3 -5
- package/lib/components/SingleAddSelect/SingleAddSelect.js +3 -4
- package/lib/components/StatusIcon/StatusIcon.js +7 -2
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +13 -6
- package/lib/components/SteppedAnimatedMedia/assets/index.js +3 -6
- package/lib/components/TagSet/TagSet.js +15 -13
- package/lib/components/TagSet/TagSetModal.js +14 -10
- package/lib/components/TagSet/TagSetOverflow.js +10 -7
- package/lib/components/Tearsheet/Tearsheet.js +13 -6
- package/lib/components/Tearsheet/TearsheetNarrow.js +13 -6
- package/lib/components/Tearsheet/TearsheetShell.js +26 -23
- package/lib/components/Toolbar/Toolbar.js +12 -10
- package/lib/components/Toolbar/ToolbarButton.js +10 -6
- package/lib/components/Toolbar/ToolbarGroup.js +9 -4
- package/lib/components/UserProfileImage/UserProfileImage.js +10 -2
- package/lib/components/WebTerminal/WebTerminal.js +15 -8
- package/lib/components/WebTerminal/WebTerminalContentWrapper.js +9 -2
- package/lib/components/WebTerminal/hooks/index.js +6 -9
- package/lib/components/WebTerminal/preview-components/Navigation.js +1 -2
- package/lib/components/WebTerminal/preview-components/documentationLinks.js +2 -3
- package/lib/components/_Canary/Canary.js +11 -2
- package/lib/global/js/hooks/useActiveElement.js +2 -3
- package/lib/global/js/hooks/useClickOutside.js +2 -3
- package/lib/global/js/hooks/useCreateComponentFocus.js +3 -4
- package/lib/global/js/hooks/useCreateComponentStepChange.js +5 -6
- package/lib/global/js/hooks/useFocus.js +6 -7
- package/lib/global/js/hooks/useIsomorphicEffect.js +1 -2
- package/lib/global/js/hooks/usePrefix.js +2 -3
- package/lib/global/js/hooks/usePreviousValue.js +2 -3
- package/lib/global/js/hooks/useResetCreateComponent.js +2 -3
- package/lib/global/js/hooks/useResizeObserver.js +2 -3
- package/lib/global/js/hooks/useRetrieveStepData.js +2 -3
- package/lib/global/js/hooks/useValidCreateStepCount.js +2 -3
- package/lib/global/js/hooks/useWindowResize.js +4 -5
- package/lib/global/js/package-settings.js +9 -6
- package/lib/global/js/utils/ClickListener.js +3 -4
- package/lib/global/js/utils/DisplayBox.js +1 -2
- package/lib/global/js/utils/Wrap.js +12 -5
- package/lib/global/js/utils/deepCloneObject.js +3 -4
- package/lib/global/js/utils/devtools.js +1 -2
- package/lib/global/js/utils/getBezierValues.js +2 -3
- package/lib/global/js/utils/getFocusableElements.js +2 -3
- package/lib/global/js/utils/getNodeTextContent.js +5 -6
- package/lib/global/js/utils/getNumberOfHiddenSteps.js +2 -3
- package/lib/global/js/utils/getScrollbarWidth.js +2 -3
- package/lib/global/js/utils/keyboardNavigation.js +4 -8
- package/lib/global/js/utils/lastIndexInArray.js +2 -3
- package/lib/global/js/utils/motionConstants.js +3 -5
- package/lib/global/js/utils/pconsole.js +8 -15
- package/lib/global/js/utils/props-helper.js +15 -17
- package/lib/global/js/utils/rangeWithCallback.js +2 -3
- package/lib/global/js/utils/scrollableAncestor.js +5 -6
- package/lib/global/js/utils/story-helper.js +7 -12
- package/lib/global/js/utils/test-helper.js +15 -28
- package/lib/global/js/utils/unwrap-if-fragment.js +7 -8
- package/lib/global/js/utils/uuidv4.js +1 -2
- package/lib/global/js/utils/wait.js +1 -2
- package/lib/global/js/utils/wrapFocus.js +1 -2
- package/lib/settings.js +2 -4
- package/package.json +4 -4
- package/scss/components/AboutModal/_about-modal.scss +1 -2
- package/scss/components/Coachmark/styles/_coachmark-tagline.scss +1 -4
- package/scss/components/Datagrid/styles/_datagrid.scss +1 -2
- package/scss/components/Datagrid/styles/_useStickyColumn.scss +1 -0
- package/scss/components/SidePanel/_side-panel.scss +1 -4
@@ -16,15 +16,23 @@ var _propsHelper = require("../../global/js/utils/props-helper");
|
|
16
16
|
var _carbonComponentsReact = require("carbon-components-react");
|
17
17
|
var _excluded = ["className", "disabled", "kind", "label", "loading", "isExpressive"],
|
18
18
|
_excluded2 = ["actions", "buttonSize", "className", "size"];
|
19
|
-
|
20
|
-
|
19
|
+
/**
|
20
|
+
* Copyright IBM Corp. 2021, 2021
|
21
|
+
*
|
22
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
23
|
+
* LICENSE file in the root directory of this source tree.
|
24
|
+
*/
|
25
|
+
// Import portions of React that are needed.
|
26
|
+
// Other standard imports.
|
27
|
+
// Carbon and package components we use.
|
28
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
29
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
21
30
|
var blockClass = "".concat(_settings.pkg.prefix, "--action-set");
|
22
31
|
var componentName = 'ActionSet';
|
23
32
|
|
24
33
|
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
25
34
|
|
26
35
|
var ActionSetButton = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
27
|
-
var _ref2;
|
28
36
|
var className = _ref.className,
|
29
37
|
disabled = _ref.disabled,
|
30
38
|
kind = _ref.kind,
|
@@ -35,7 +43,7 @@ var ActionSetButton = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref
|
|
35
43
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
36
44
|
return /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.Button, (0, _extends2.default)({}, rest, {
|
37
45
|
isExpressive: isExpressive,
|
38
|
-
className: (0, _classnames.default)(className, ["".concat(blockClass, "__action-button"), (
|
46
|
+
className: (0, _classnames.default)(className, ["".concat(blockClass, "__action-button"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__action-button--ghost"), kind === 'ghost' || kind === 'danger--ghost'), "".concat(blockClass, "__action-button--expressive"), isExpressive)]),
|
39
47
|
disabled: disabled || loading || false,
|
40
48
|
kind: kind,
|
41
49
|
ref: ref
|
@@ -69,8 +77,8 @@ var defaults = {
|
|
69
77
|
* it appears at the left side. If there is a primary button it appears at the
|
70
78
|
* right.
|
71
79
|
*/
|
72
|
-
var ActionSet = /*#__PURE__*/_react.default.forwardRef(function (_ref3, ref) {
|
73
|
-
var _actions$slice
|
80
|
+
var ActionSet = exports.ActionSet = /*#__PURE__*/_react.default.forwardRef(function (_ref3, ref) {
|
81
|
+
var _actions$slice;
|
74
82
|
var actions = _ref3.actions,
|
75
83
|
buttonSize = _ref3.buttonSize,
|
76
84
|
className = _ref3.className,
|
@@ -100,7 +108,7 @@ var ActionSet = /*#__PURE__*/_react.default.forwardRef(function (_ref3, ref) {
|
|
100
108
|
return (buttonOrder(action1.kind || defaultKind) - buttonOrder(action2.kind || defaultKind)) * (stacking ? -1 : 1);
|
101
109
|
});
|
102
110
|
return /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.ButtonSet, (0, _extends2.default)({}, rest, {
|
103
|
-
className: (0, _classnames.default)(blockClass, className, (
|
111
|
+
className: (0, _classnames.default)(blockClass, className, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "--row-single"), !stacking && buttons.length === 1), "".concat(blockClass, "--row-double"), !stacking && buttons.length === 2), "".concat(blockClass, "--row-triple"), !stacking && buttons.length === 3), "".concat(blockClass, "--row-quadruple"), !stacking && buttons.length >= 4), "".concat(blockClass, "--stacking"), stacking), "".concat(blockClass, "--").concat(size)),
|
104
112
|
ref: ref,
|
105
113
|
role: "presentation",
|
106
114
|
stacked: stacking
|
@@ -112,7 +120,6 @@ var ActionSet = /*#__PURE__*/_react.default.forwardRef(function (_ref3, ref) {
|
|
112
120
|
}));
|
113
121
|
}));
|
114
122
|
});
|
115
|
-
exports.ActionSet = ActionSet;
|
116
123
|
ActionSet.displayName = componentName;
|
117
124
|
|
118
125
|
/**
|
@@ -11,9 +11,8 @@ exports.actionsOptions = exports.actionsMapping = exports.actionsLabels = void 0
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
12
12
|
*/
|
13
13
|
|
14
|
-
var actionsOptions = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
15
|
-
exports.
|
16
|
-
var actionsLabels = {
|
14
|
+
var actionsOptions = exports.actionsOptions = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
15
|
+
var actionsLabels = exports.actionsLabels = {
|
17
16
|
0: 'None',
|
18
17
|
1: 'One button',
|
19
18
|
2: 'A danger button',
|
@@ -26,8 +25,7 @@ var actionsLabels = {
|
|
26
25
|
9: 'Four buttons with one ghost',
|
27
26
|
10: 'Four buttons with two danger'
|
28
27
|
};
|
29
|
-
exports.
|
30
|
-
var actionsMapping = function actionsMapping(labels, action) {
|
28
|
+
var actionsMapping = exports.actionsMapping = function actionsMapping(labels, action) {
|
31
29
|
var _labels$primary, _labels$danger, _labels$secondary, _labels$secondary2, _labels$dangerGhost, _labels$ghost;
|
32
30
|
var act = function act(label, kind, key) {
|
33
31
|
var actionCall = action && action("Click on '".concat(label, "'"));
|
@@ -60,5 +58,4 @@ var actionsMapping = function actionsMapping(labels, action) {
|
|
60
58
|
9: [primary, secondary, secondary2, ghost],
|
61
59
|
10: [danger, secondary, secondary2, dangerGhost]
|
62
60
|
};
|
63
|
-
};
|
64
|
-
exports.actionsMapping = actionsMapping;
|
61
|
+
};
|
@@ -13,11 +13,16 @@ var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
14
14
|
var _AddSelectBody = require("./AddSelectBody");
|
15
15
|
var _addSelectUtils = require("./add-select-utils");
|
16
|
-
var _excluded = ["items", "globalFilters"];
|
17
|
-
|
18
|
-
|
16
|
+
var _excluded = ["items", "globalFilters"]; //
|
17
|
+
// Copyright IBM Corp. 2022
|
18
|
+
//
|
19
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
20
|
+
// LICENSE file in the root directory of this source tree.
|
21
|
+
//
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
19
24
|
var componentName = 'AddSelect';
|
20
|
-
var AddSelect = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
25
|
+
var AddSelect = exports.AddSelect = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
21
26
|
var items = _ref.items,
|
22
27
|
globalFilters = _ref.globalFilters,
|
23
28
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
@@ -41,7 +46,6 @@ var AddSelect = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
41
46
|
defaultModifiers: defaultModifiers
|
42
47
|
}));
|
43
48
|
});
|
44
|
-
exports.AddSelect = AddSelect;
|
45
49
|
AddSelect.propTypes = {
|
46
50
|
className: _propTypes.default.string,
|
47
51
|
clearFiltersText: _propTypes.default.string,
|
@@ -27,15 +27,20 @@ var _useItemSort2 = require("./hooks/useItemSort");
|
|
27
27
|
var _useParentSelect2 = _interopRequireDefault(require("./hooks/useParentSelect"));
|
28
28
|
var _usePath2 = _interopRequireDefault(require("./hooks/usePath"));
|
29
29
|
var _settings = require("../../settings");
|
30
|
-
var _excluded = ["className", "clearFiltersText", "closeIconDescription", "columnInputPlaceholder", "defaultModifiers", "description", "globalFilterOpts", "globalFiltersLabel", "globalFiltersIconDescription", "globalFiltersPlaceholderText", "globalFiltersPrimaryButtonText", "globalFiltersSecondaryButtonText", "globalSearchLabel", "globalSearchPlaceholder", "globalSortBy", "illustrationTheme", "influencerTitle", "items", "itemsLabel", "metaIconDescription", "metaPanelTitle", "multi", "navIconDescription", "noResultsDescription", "noResultsTitle", "noSelectionDescription", "noSelectionTitle", "normalizedItems", "onClose", "onCloseButtonText", "onSubmit", "onSubmitButtonText", "open", "portalTarget", "searchResultsTitle", "title", "useNormalizedItems"];
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
var _excluded = ["className", "clearFiltersText", "closeIconDescription", "columnInputPlaceholder", "defaultModifiers", "description", "globalFilterOpts", "globalFiltersLabel", "globalFiltersIconDescription", "globalFiltersPlaceholderText", "globalFiltersPrimaryButtonText", "globalFiltersSecondaryButtonText", "globalSearchLabel", "globalSearchPlaceholder", "globalSortBy", "illustrationTheme", "influencerTitle", "items", "itemsLabel", "metaIconDescription", "metaPanelTitle", "multi", "navIconDescription", "noResultsDescription", "noResultsTitle", "noSelectionDescription", "noSelectionTitle", "normalizedItems", "onClose", "onCloseButtonText", "onSubmit", "onSubmitButtonText", "open", "portalTarget", "searchResultsTitle", "title", "useNormalizedItems"]; //
|
31
|
+
// Copyright IBM Corp. 2022
|
32
|
+
//
|
33
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
34
|
+
// LICENSE file in the root directory of this source tree.
|
35
|
+
//
|
36
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
37
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
38
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
39
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
35
40
|
var blockClass = "".concat(_settings.pkg.prefix, "--add-select");
|
36
41
|
var componentName = 'AddSelectBody';
|
37
|
-
var AddSelectBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
38
|
-
var
|
42
|
+
var AddSelectBody = exports.AddSelectBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
43
|
+
var _path$;
|
39
44
|
var className = _ref.className,
|
40
45
|
clearFiltersText = _ref.clearFiltersText,
|
41
46
|
closeIconDescription = _ref.closeIconDescription,
|
@@ -128,7 +133,7 @@ var AddSelectBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
128
133
|
resetState();
|
129
134
|
onClose();
|
130
135
|
};
|
131
|
-
var tearsheetClassnames = (0, _classnames.default)(className, blockClass, (
|
136
|
+
var tearsheetClassnames = (0, _classnames.default)(className, blockClass, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__single"), !multi), "".concat(blockClass, "__multi"), multi));
|
132
137
|
var globalFilterKeys = Object.keys(appliedGlobalFilters);
|
133
138
|
var globalFiltersApplied = globalFilterKeys.length > 0;
|
134
139
|
|
@@ -295,7 +300,6 @@ var AddSelectBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
295
300
|
}
|
296
301
|
return /*#__PURE__*/_react.default.createElement(_Tearsheet.TearsheetNarrow, commonTearsheetProps, body);
|
297
302
|
});
|
298
|
-
exports.AddSelectBody = AddSelectBody;
|
299
303
|
AddSelectBody.propTypes = {
|
300
304
|
className: _propTypes.default.string,
|
301
305
|
clearFiltersText: _propTypes.default.string,
|
@@ -20,7 +20,7 @@ var _settings = require("../../settings");
|
|
20
20
|
|
21
21
|
var blockClass = "".concat(_settings.pkg.prefix, "--add-select__breadcrumbs");
|
22
22
|
var componentName = 'AddSelectBreadcrumbs';
|
23
|
-
var AddSelectBreadcrumbs = function AddSelectBreadcrumbs(_ref) {
|
23
|
+
var AddSelectBreadcrumbs = exports.AddSelectBreadcrumbs = function AddSelectBreadcrumbs(_ref) {
|
24
24
|
var multi = _ref.multi,
|
25
25
|
onClick = _ref.onClick,
|
26
26
|
path = _ref.path;
|
@@ -44,7 +44,6 @@ var AddSelectBreadcrumbs = function AddSelectBreadcrumbs(_ref) {
|
|
44
44
|
}, entry.title);
|
45
45
|
}));
|
46
46
|
};
|
47
|
-
exports.AddSelectBreadcrumbs = AddSelectBreadcrumbs;
|
48
47
|
AddSelectBreadcrumbs.propTypes = {
|
49
48
|
multi: _propTypes.default.bool,
|
50
49
|
onClick: _propTypes.default.func,
|
@@ -21,13 +21,18 @@ var _addSelectUtils = require("./add-select-utils");
|
|
21
21
|
var _useItemSort2 = require("./hooks/useItemSort");
|
22
22
|
var _uuidv = _interopRequireDefault(require("../../global/js/utils/uuidv4"));
|
23
23
|
var _useParentSelect2 = _interopRequireDefault(require("./hooks/useParentSelect"));
|
24
|
-
var _excluded = ["columnInputPlaceholder", "header", "items", "multiSelection", "parentId", "path", "setMultiSelection", "setPath"];
|
25
|
-
|
26
|
-
|
24
|
+
var _excluded = ["columnInputPlaceholder", "header", "items", "multiSelection", "parentId", "path", "setMultiSelection", "setPath"]; //
|
25
|
+
// Copyright IBM Corp. 2022
|
26
|
+
//
|
27
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
28
|
+
// LICENSE file in the root directory of this source tree.
|
29
|
+
//
|
30
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
31
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
27
32
|
var blockClass = "".concat(_settings.pkg.prefix, "--add-select");
|
28
33
|
var colClass = "".concat(blockClass, "__column");
|
29
34
|
var componentName = 'AddSelectColumn';
|
30
|
-
var AddSelectColumn = function AddSelectColumn(_ref) {
|
35
|
+
var _AddSelectColumn = exports.AddSelectColumn = function AddSelectColumn(_ref) {
|
31
36
|
var columnInputPlaceholder = _ref.columnInputPlaceholder,
|
32
37
|
header = _ref.header,
|
33
38
|
items = _ref.items,
|
@@ -204,7 +209,7 @@ var AddSelectColumn = function AddSelectColumn(_ref) {
|
|
204
209
|
setMultiSelection: setMultiSelection,
|
205
210
|
multiSelection: multiSelection,
|
206
211
|
setParentSelected: parentSelectionHandler
|
207
|
-
}))), selectedItem && itemInPath && /*#__PURE__*/_react.default.createElement(
|
212
|
+
}))), selectedItem && itemInPath && /*#__PURE__*/_react.default.createElement(_AddSelectColumn, (0, _extends2.default)({
|
208
213
|
columnInputPlaceholder: columnInputPlaceholder,
|
209
214
|
header: selectedItem.title,
|
210
215
|
items: selectedItem.children,
|
@@ -215,8 +220,7 @@ var AddSelectColumn = function AddSelectColumn(_ref) {
|
|
215
220
|
path: path
|
216
221
|
}, props)));
|
217
222
|
};
|
218
|
-
|
219
|
-
AddSelectColumn.propTypes = {
|
223
|
+
_AddSelectColumn.propTypes = {
|
220
224
|
columnInputPlaceholder: _propTypes.default.string,
|
221
225
|
header: _propTypes.default.string,
|
222
226
|
items: _propTypes.default.object,
|
@@ -226,4 +230,4 @@ AddSelectColumn.propTypes = {
|
|
226
230
|
setMultiSelection: _propTypes.default.func,
|
227
231
|
setPath: _propTypes.default.func
|
228
232
|
};
|
229
|
-
|
233
|
+
_AddSelectColumn.displayName = componentName;
|
@@ -14,13 +14,18 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
15
15
|
var _iconsReact = require("@carbon/icons-react");
|
16
16
|
var _settings = require("../../settings");
|
17
|
-
function _getRequireWildcardCache(
|
18
|
-
function _interopRequireWildcard(
|
19
|
-
function ownKeys(
|
20
|
-
function _objectSpread(
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
19
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
20
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } //
|
21
|
+
// Copyright IBM Corp. 2022
|
22
|
+
//
|
23
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
24
|
+
// LICENSE file in the root directory of this source tree.
|
25
|
+
//
|
21
26
|
var blockClass = "".concat(_settings.pkg.prefix, "--add-select__global-filter");
|
22
27
|
var componentName = 'AddSelectFilter';
|
23
|
-
var AddSelectFilter = function AddSelectFilter(_ref) {
|
28
|
+
var AddSelectFilter = exports.AddSelectFilter = function AddSelectFilter(_ref) {
|
24
29
|
var appliedFilters = _ref.appliedFilters,
|
25
30
|
clearFiltersText = _ref.clearFiltersText,
|
26
31
|
filterOpts = _ref.filterOpts,
|
@@ -150,7 +155,6 @@ var AddSelectFilter = function AddSelectFilter(_ref) {
|
|
150
155
|
onClick: clearFilters
|
151
156
|
}, clearFiltersText)));
|
152
157
|
};
|
153
|
-
exports.AddSelectFilter = AddSelectFilter;
|
154
158
|
AddSelectFilter.propTypes = {
|
155
159
|
appliedFilters: _propTypes.default.object,
|
156
160
|
clearFiltersText: _propTypes.default.string,
|
@@ -23,7 +23,7 @@ var _UserProfileImage = require("../UserProfileImage");
|
|
23
23
|
|
24
24
|
var blockClass = "".concat(_settings.pkg.prefix, "--add-select__selections");
|
25
25
|
var componentName = 'AddSelectList';
|
26
|
-
var AddSelectList = function AddSelectList(_ref) {
|
26
|
+
var AddSelectList = exports.AddSelectList = function AddSelectList(_ref) {
|
27
27
|
var _modifiers$options;
|
28
28
|
var appliedModifiers = _ref.appliedModifiers,
|
29
29
|
displayMetalPanel = _ref.displayMetalPanel,
|
@@ -40,7 +40,7 @@ var AddSelectList = function AddSelectList(_ref) {
|
|
40
40
|
setParentSelected = _ref.setParentSelected,
|
41
41
|
setSingleSelection = _ref.setSingleSelection,
|
42
42
|
singleSelection = _ref.singleSelection;
|
43
|
-
var hasModifiers = (modifiers === null || modifiers === void 0
|
43
|
+
var hasModifiers = (modifiers === null || modifiers === void 0 || (_modifiers$options = modifiers.options) === null || _modifiers$options === void 0 ? void 0 : _modifiers$options.length) > 0;
|
44
44
|
var handleSingleSelection = function handleSingleSelection(value) {
|
45
45
|
setSingleSelection(value);
|
46
46
|
};
|
@@ -111,10 +111,9 @@ var AddSelectList = function AddSelectList(_ref) {
|
|
111
111
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
112
112
|
className: "".concat(blockClass, "-body")
|
113
113
|
}, filteredItems.map(function (item) {
|
114
|
-
var _cx2;
|
115
114
|
return /*#__PURE__*/_react.default.createElement("div", {
|
116
115
|
key: item.id,
|
117
|
-
className: (0, _classnames.default)("".concat(blockClass, "-row"), (
|
116
|
+
className: (0, _classnames.default)("".concat(blockClass, "-row"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "-row--selected"), isSelected(item.id)), "".concat(blockClass, "-row-meta--selected"), isInMetaPanel(item.id)))
|
118
117
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
119
118
|
className: "".concat(blockClass, "-cell")
|
120
119
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
@@ -188,7 +187,6 @@ var AddSelectList = function AddSelectList(_ref) {
|
|
188
187
|
}))));
|
189
188
|
}))));
|
190
189
|
};
|
191
|
-
exports.AddSelectList = AddSelectList;
|
192
190
|
AddSelectList.propTypes = {
|
193
191
|
appliedModifiers: _propTypes.default.array,
|
194
192
|
displayMetalPanel: _propTypes.default.object,
|
@@ -11,8 +11,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
var _iconsReact = require("@carbon/icons-react");
|
12
12
|
var _carbonComponentsReact = require("carbon-components-react");
|
13
13
|
var _settings = require("../../settings");
|
14
|
-
function _getRequireWildcardCache(
|
15
|
-
function _interopRequireWildcard(
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
16
16
|
//
|
17
17
|
// Copyright IBM Corp. 2022
|
18
18
|
//
|
@@ -22,7 +22,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
22
22
|
|
23
23
|
var blockClass = "".concat(_settings.pkg.prefix, "--add-select__meta-panel");
|
24
24
|
var componentName = 'AddSelectMetaPanel';
|
25
|
-
var AddSelectMetaPanel = function AddSelectMetaPanel(_ref) {
|
25
|
+
var AddSelectMetaPanel = exports.AddSelectMetaPanel = function AddSelectMetaPanel(_ref) {
|
26
26
|
var closeIconDescription = _ref.closeIconDescription,
|
27
27
|
meta = _ref.meta,
|
28
28
|
setDisplayMetaPanel = _ref.setDisplayMetaPanel,
|
@@ -57,7 +57,6 @@ var AddSelectMetaPanel = function AddSelectMetaPanel(_ref) {
|
|
57
57
|
}, entry === null || entry === void 0 ? void 0 : entry.value));
|
58
58
|
}));
|
59
59
|
};
|
60
|
-
exports.AddSelectMetaPanel = AddSelectMetaPanel;
|
61
60
|
AddSelectMetaPanel.propTypes = {
|
62
61
|
closeIconDescription: _propTypes.default.string.isRequired,
|
63
62
|
meta: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.shape({
|
@@ -12,10 +12,15 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _NoDataEmptyState = require("../../components/EmptyStates/NoDataEmptyState");
|
13
13
|
var _settings = require("../../settings");
|
14
14
|
var _AddSelectMetaPanel = require("./AddSelectMetaPanel");
|
15
|
-
var _excluded = ["meta", "icon", "avatar"];
|
15
|
+
var _excluded = ["meta", "icon", "avatar"]; //
|
16
|
+
// Copyright IBM Corp. 2022
|
17
|
+
//
|
18
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
19
|
+
// LICENSE file in the root directory of this source tree.
|
20
|
+
//
|
16
21
|
var blockClass = "".concat(_settings.pkg.prefix, "--add-select__sidebar");
|
17
22
|
var componentName = 'AddSelectSidebar';
|
18
|
-
var AddSelectSidebar = function AddSelectSidebar(_ref) {
|
23
|
+
var AddSelectSidebar = exports.AddSelectSidebar = function AddSelectSidebar(_ref) {
|
19
24
|
var _modifiers$options;
|
20
25
|
var appliedModifiers = _ref.appliedModifiers,
|
21
26
|
closeIconDescription = _ref.closeIconDescription,
|
@@ -29,7 +34,7 @@ var AddSelectSidebar = function AddSelectSidebar(_ref) {
|
|
29
34
|
noSelectionDescription = _ref.noSelectionDescription,
|
30
35
|
noSelectionTitle = _ref.noSelectionTitle,
|
31
36
|
setDisplayMetaPanel = _ref.setDisplayMetaPanel;
|
32
|
-
var hasModifiers = (modifiers === null || modifiers === void 0
|
37
|
+
var hasModifiers = (modifiers === null || modifiers === void 0 || (_modifiers$options = modifiers.options) === null || _modifiers$options === void 0 ? void 0 : _modifiers$options.length) > 0;
|
33
38
|
var hasSelections = multiSelection.length > 0;
|
34
39
|
var getNewItem = function getNewItem(item) {
|
35
40
|
// certain properties should not be displayed in the sidebar
|
@@ -104,7 +109,6 @@ var AddSelectSidebar = function AddSelectSidebar(_ref) {
|
|
104
109
|
illustrationTheme: illustrationTheme
|
105
110
|
})));
|
106
111
|
};
|
107
|
-
exports.AddSelectSidebar = AddSelectSidebar;
|
108
112
|
AddSelectSidebar.propTypes = {
|
109
113
|
appliedModifiers: _propTypes.default.array,
|
110
114
|
closeIconDescription: _propTypes.default.string,
|
@@ -20,7 +20,7 @@ var _settings = require("../../settings");
|
|
20
20
|
|
21
21
|
var blockClass = "".concat(_settings.pkg.prefix, "--add-select-sort");
|
22
22
|
var componentName = 'AddSelectSort';
|
23
|
-
var AddSelectSort = function AddSelectSort(_ref) {
|
23
|
+
var AddSelectSort = exports.AddSelectSort = function AddSelectSort(_ref) {
|
24
24
|
var setSortAttribute = _ref.setSortAttribute,
|
25
25
|
setSortDirection = _ref.setSortDirection,
|
26
26
|
sortBy = _ref.sortBy;
|
@@ -63,7 +63,6 @@ var AddSelectSort = function AddSelectSort(_ref) {
|
|
63
63
|
});
|
64
64
|
})));
|
65
65
|
};
|
66
|
-
exports.AddSelectSort = AddSelectSort;
|
67
66
|
AddSelectSort.propTypes = {
|
68
67
|
setSortAttribute: _propTypes.default.func,
|
69
68
|
setSortDirection: _propTypes.default.func,
|
@@ -8,8 +8,8 @@ exports.sortItems = exports.normalize = exports.getGlobalFilterValues = exports.
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
10
10
|
var _excluded = ["children"];
|
11
|
-
function ownKeys(
|
12
|
-
function _objectSpread(
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
13
13
|
//
|
14
14
|
// Copyright IBM Corp. 2022
|
15
15
|
//
|
@@ -24,13 +24,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
24
24
|
* @param {object} data
|
25
25
|
* @returns an object of normalized data
|
26
26
|
*/
|
27
|
-
var normalize = function normalize(data) {
|
27
|
+
var _normalize = exports.normalize = function normalize(data) {
|
28
28
|
var items = data.entries.reduce(function (prev, cur) {
|
29
29
|
var children = cur.children,
|
30
30
|
item = (0, _objectWithoutProperties2.default)(cur, _excluded);
|
31
31
|
prev[item.id] = item;
|
32
32
|
if (children) {
|
33
|
-
var childItems =
|
33
|
+
var childItems = _normalize(children);
|
34
34
|
return _objectSpread(_objectSpread({}, prev), childItems);
|
35
35
|
}
|
36
36
|
return prev;
|
@@ -48,8 +48,7 @@ var normalize = function normalize(data) {
|
|
48
48
|
* @param {Array} items - items to search through
|
49
49
|
* @returns an array of filter values
|
50
50
|
*/
|
51
|
-
exports.
|
52
|
-
var getGlobalFilterValues = function getGlobalFilterValues(globalFilters, items) {
|
51
|
+
var getGlobalFilterValues = exports.getGlobalFilterValues = function getGlobalFilterValues(globalFilters, items) {
|
53
52
|
var itemIds = Object.keys(items);
|
54
53
|
var results = globalFilters.reduce(function (prevFilter, curFilter) {
|
55
54
|
var filterId = curFilter.id;
|
@@ -68,8 +67,7 @@ var getGlobalFilterValues = function getGlobalFilterValues(globalFilters, items)
|
|
68
67
|
}, []);
|
69
68
|
return results;
|
70
69
|
};
|
71
|
-
exports.
|
72
|
-
var sortItems = function sortItems(attribute, direction) {
|
70
|
+
var sortItems = exports.sortItems = function sortItems(attribute, direction) {
|
73
71
|
return function (a, b) {
|
74
72
|
var _a$attribute, _b$attribute;
|
75
73
|
var valueA = (_a$attribute = a[attribute]) === null || _a$attribute === void 0 ? void 0 : _a$attribute.split(' ').join('');
|
@@ -80,8 +78,7 @@ var sortItems = function sortItems(attribute, direction) {
|
|
80
78
|
return valueA < valueB ? -1 : 1;
|
81
79
|
};
|
82
80
|
};
|
83
|
-
exports.
|
84
|
-
var getFilteredItems = function getFilteredItems(useNormalizedItems, normalizedItems, searchTerm, globalFiltersApplied, globalFilterKeys, appliedGlobalFilters, sortFn, multi, items, path) {
|
81
|
+
var getFilteredItems = exports.getFilteredItems = function getFilteredItems(useNormalizedItems, normalizedItems, searchTerm, globalFiltersApplied, globalFilterKeys, appliedGlobalFilters, sortFn, multi, items, path) {
|
85
82
|
/**
|
86
83
|
* useNormalizedItems just specifies if the data is hierarchical. the data structure
|
87
84
|
* is an object and not an array.
|
@@ -114,14 +111,14 @@ var getFilteredItems = function getFilteredItems(useNormalizedItems, normalizedI
|
|
114
111
|
*/
|
115
112
|
if (path.length > 1) {
|
116
113
|
return path.reduce(function (prev, cur, curIdx) {
|
117
|
-
var _prev$find
|
114
|
+
var _prev$find;
|
118
115
|
// because the root of the path never changes we can skip it
|
119
116
|
if (curIdx === 0) {
|
120
117
|
return prev;
|
121
118
|
}
|
122
119
|
var item = (_prev$find = prev.find(function (item) {
|
123
120
|
return item.id === cur.id;
|
124
|
-
})) === null || _prev$find === void 0
|
121
|
+
})) === null || _prev$find === void 0 || (_prev$find = _prev$find.children) === null || _prev$find === void 0 ? void 0 : _prev$find.entries;
|
125
122
|
return item;
|
126
123
|
}, items.entries);
|
127
124
|
}
|
@@ -134,5 +131,4 @@ var getFilteredItems = function getFilteredItems(useNormalizedItems, normalizedI
|
|
134
131
|
}
|
135
132
|
return items.entries;
|
136
133
|
}
|
137
|
-
};
|
138
|
-
exports.getFilteredItems = getFilteredItems;
|
134
|
+
};
|
@@ -14,7 +14,7 @@ var _react = require("react");
|
|
14
14
|
// LICENSE file in the root directory of this source tree.
|
15
15
|
//
|
16
16
|
|
17
|
-
var useItemSort = function useItemSort() {
|
17
|
+
var useItemSort = exports.useItemSort = function useItemSort() {
|
18
18
|
var _useState = (0, _react.useState)(''),
|
19
19
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
20
20
|
sortDirection = _useState2[0],
|
@@ -29,5 +29,4 @@ var useItemSort = function useItemSort() {
|
|
29
29
|
sortAttribute: sortAttribute,
|
30
30
|
setSortAttribute: setSortAttribute
|
31
31
|
};
|
32
|
-
};
|
33
|
-
exports.useItemSort = useItemSort;
|
32
|
+
};
|
@@ -9,8 +9,13 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
11
11
|
var _react = require("react");
|
12
|
-
function ownKeys(
|
13
|
-
function _objectSpread(
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } //
|
14
|
+
// Copyright IBM Corp. 2022
|
15
|
+
//
|
16
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
17
|
+
// LICENSE file in the root directory of this source tree.
|
18
|
+
//
|
14
19
|
var usePath = function usePath() {
|
15
20
|
var itemsLabel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
16
21
|
var _useState = (0, _react.useState)([{
|
@@ -69,5 +74,4 @@ var usePath = function usePath() {
|
|
69
74
|
resetPath: resetPath
|
70
75
|
};
|
71
76
|
};
|
72
|
-
var _default = usePath;
|
73
|
-
exports.default = _default;
|
77
|
+
var _default = exports.default = usePath;
|