@carbon/ibm-products 1.73.1 → 1.73.3
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 +33 -55
- 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 +24 -41
- 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 +26 -49
- 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 +30 -53
- 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/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 +6 -11
- 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 +13 -13
- package/scss/components/AboutModal/_about-modal.scss +1 -2
- package/scss/components/Checklist/_checklist.scss +0 -1
- package/scss/components/Coachmark/styles/_coachmark-tagline.scss +1 -4
- package/scss/components/Datagrid/_datagrid.scss +0 -1
- package/scss/components/Datagrid/styles/_datagrid.scss +1 -2
- package/scss/components/SidePanel/_side-panel.scss +1 -4
@@ -19,8 +19,14 @@ var _CreateFullPage = require("./CreateFullPage");
|
|
19
19
|
var _hooks = require("../../global/js/hooks");
|
20
20
|
var _pconsole = _interopRequireDefault(require("../../global/js/utils/pconsole"));
|
21
21
|
var _excluded = ["children", "className", "subtitle", "description", "disableSubmit", "includeStep", "introStep", "title", "hasFieldset", "fieldsetLegendText", "onNext", "onMount", "secondaryLabel"];
|
22
|
-
|
23
|
-
|
22
|
+
/**
|
23
|
+
* Copyright IBM Corp. 2021, 2022
|
24
|
+
*
|
25
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
26
|
+
* LICENSE file in the root directory of this source tree.
|
27
|
+
*/
|
28
|
+
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); }
|
29
|
+
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; }
|
24
30
|
var componentName = 'CreateFullPageStep';
|
25
31
|
var blockClass = "".concat(_settings.pkg.prefix, "--create-full-page__step");
|
26
32
|
|
@@ -28,8 +34,7 @@ var blockClass = "".concat(_settings.pkg.prefix, "--create-full-page__step");
|
|
28
34
|
var defaults = {
|
29
35
|
includeStep: true
|
30
36
|
};
|
31
|
-
var CreateFullPageStep = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
32
|
-
var _cx;
|
37
|
+
var CreateFullPageStep = exports.CreateFullPageStep = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
33
38
|
var children = _ref.children,
|
34
39
|
className = _ref.className,
|
35
40
|
subtitle = _ref.subtitle,
|
@@ -67,7 +72,7 @@ var CreateFullPageStep = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref
|
|
67
72
|
// in the appropriate custom hooks.
|
68
73
|
(0, _react.useEffect)(function () {
|
69
74
|
if (stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep) && (previousState === null || previousState === void 0 ? void 0 : previousState.currentStep) !== (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)) {
|
70
|
-
stepsContext === null || stepsContext === void 0
|
75
|
+
stepsContext === null || stepsContext === void 0 || stepsContext.setOnMount(onMount);
|
71
76
|
}
|
72
77
|
}, [onMount, stepsContext, stepNumber, previousState === null || previousState === void 0 ? void 0 : previousState.currentStep]);
|
73
78
|
(0, _react.useEffect)(function () {
|
@@ -79,11 +84,11 @@ var CreateFullPageStep = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref
|
|
79
84
|
(0, _react.useEffect)(function () {
|
80
85
|
if (stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)) {
|
81
86
|
stepsContext.setIsDisabled(disableSubmit);
|
82
|
-
stepsContext === null || stepsContext === void 0
|
87
|
+
stepsContext === null || stepsContext === void 0 || stepsContext.setOnNext(onNext); // needs to be updated here otherwise there could be stale state values from only initially setting onNext
|
83
88
|
}
|
84
89
|
}, [stepsContext, stepNumber, disableSubmit, onNext]);
|
85
90
|
return stepsContext ? /*#__PURE__*/_react.default.createElement("section", (0, _extends2.default)({}, rest, {
|
86
|
-
className: (0, _classnames.default)(blockClass, className, (
|
91
|
+
className: (0, _classnames.default)(blockClass, className, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__step--hidden-step"), stepNumber !== (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)), "".concat(blockClass, "__step--visible-step"), stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep))),
|
87
92
|
ref: ref
|
88
93
|
}), /*#__PURE__*/_react.default.createElement("h5", {
|
89
94
|
className: "".concat(blockClass, "-title")
|
@@ -98,7 +103,6 @@ var CreateFullPageStep = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref
|
|
98
103
|
});
|
99
104
|
|
100
105
|
// Return a placeholder if not released and not enabled by feature flag
|
101
|
-
exports.CreateFullPageStep = CreateFullPageStep;
|
102
106
|
exports.CreateFullPageStep = CreateFullPageStep = _settings.pkg.checkComponentEnabled(CreateFullPageStep, componentName);
|
103
107
|
CreateFullPageStep.propTypes = {
|
104
108
|
/**
|
@@ -23,7 +23,7 @@ var _settings = require("../../settings");
|
|
23
23
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
24
24
|
var blockClass = "".concat(_settings.pkg.prefix, "--create-influencer");
|
25
25
|
var componentName = 'CreateInfluencer';
|
26
|
-
var CreateInfluencer = function CreateInfluencer(_ref) {
|
26
|
+
var CreateInfluencer = exports.CreateInfluencer = function CreateInfluencer(_ref) {
|
27
27
|
var className = _ref.className,
|
28
28
|
currentStep = _ref.currentStep,
|
29
29
|
stepData = _ref.stepData;
|
@@ -58,7 +58,6 @@ var CreateInfluencer = function CreateInfluencer(_ref) {
|
|
58
58
|
currentIndex: (_stepData$2 = stepData[0]) !== null && _stepData$2 !== void 0 && _stepData$2.introStep ? currentStep - totalDynamicSteps - 2 // minus 2 because we need to account for the intro step in addition to `currentIndex` being 0 index based and our steps being 1 index based
|
59
59
|
: currentStep - totalDynamicSteps - 1 // minus 1 because ProgressIndicator currentIndex prop is 0 index based, but our steps are 1 index based
|
60
60
|
,
|
61
|
-
|
62
61
|
spaceEqually: true,
|
63
62
|
vertical: true,
|
64
63
|
className: (0, _classnames.default)("".concat(blockClass, "__progress-indicator"))
|
@@ -77,7 +76,6 @@ var CreateInfluencer = function CreateInfluencer(_ref) {
|
|
77
76
|
|
78
77
|
// The display name of the component, used by React. Note that displayName
|
79
78
|
// is used in preference to relying on function.name.
|
80
|
-
exports.CreateInfluencer = CreateInfluencer;
|
81
79
|
CreateInfluencer.displayName = componentName;
|
82
80
|
CreateInfluencer.propTypes = {
|
83
81
|
/**
|
@@ -14,6 +14,14 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
14
|
var _devtools = require("../../global/js/utils/devtools");
|
15
15
|
var _settings = require("../../settings");
|
16
16
|
var _excluded = ["className", "children", "onRequestClose", "onRequestSubmit", "open", "title", "subtitle", "description", "secondaryButtonText", "primaryButtonText", "disableSubmit", "selectorPrimaryFocus"];
|
17
|
+
/**
|
18
|
+
* Copyright IBM Corp. 2021, 2021
|
19
|
+
*
|
20
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
21
|
+
* LICENSE file in the root directory of this source tree.
|
22
|
+
*/
|
23
|
+
// Import portions of React that are needed.
|
24
|
+
// Carbon and package components we use.
|
17
25
|
var componentName = 'CreateModal';
|
18
26
|
var blockClass = "".concat(_settings.pkg.prefix, "--create-modal");
|
19
27
|
|
@@ -27,7 +35,7 @@ var isValidChildren = function isValidChildren() {
|
|
27
35
|
return;
|
28
36
|
};
|
29
37
|
};
|
30
|
-
var CreateModal = /*#__PURE__*/_react.default.forwardRef(function (_ref2, ref) {
|
38
|
+
var CreateModal = exports.CreateModal = /*#__PURE__*/_react.default.forwardRef(function (_ref2, ref) {
|
31
39
|
var className = _ref2.className,
|
32
40
|
children = _ref2.children,
|
33
41
|
onRequestClose = _ref2.onRequestClose,
|
@@ -50,7 +58,7 @@ var CreateModal = /*#__PURE__*/_react.default.forwardRef(function (_ref2, ref) {
|
|
50
58
|
size: "sm",
|
51
59
|
preventCloseOnClickOutside: true,
|
52
60
|
onClose: function onClose() {
|
53
|
-
onRequestClose === null || onRequestClose === void 0
|
61
|
+
onRequestClose === null || onRequestClose === void 0 || onRequestClose();
|
54
62
|
return false;
|
55
63
|
}
|
56
64
|
}, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.ModalHeader, {
|
@@ -78,7 +86,6 @@ var CreateModal = /*#__PURE__*/_react.default.forwardRef(function (_ref2, ref) {
|
|
78
86
|
});
|
79
87
|
|
80
88
|
// Return a placeholder if not released and not enabled by feature flag
|
81
|
-
exports.CreateModal = CreateModal;
|
82
89
|
exports.CreateModal = CreateModal = _settings.pkg.checkComponentEnabled(CreateModal, componentName);
|
83
90
|
CreateModal.propTypes = {
|
84
91
|
/**
|
@@ -17,8 +17,17 @@ var _carbonComponentsReact = require("carbon-components-react");
|
|
17
17
|
var _SidePanel = require("../SidePanel");
|
18
18
|
var _uuidv = _interopRequireDefault(require("../../global/js/utils/uuidv4"));
|
19
19
|
var _excluded = ["className", "children", "disableSubmit", "formTitle", "formDescription", "onRequestClose", "onRequestSubmit", "open", "primaryButtonText", "secondaryButtonText", "selectorPageContent", "selectorPrimaryFocus", "subtitle", "title"];
|
20
|
-
|
21
|
-
|
20
|
+
/**
|
21
|
+
* Copyright IBM Corp. 2021, 2021
|
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
|
+
*/
|
26
|
+
// Import portions of React that are needed.
|
27
|
+
// Other standard imports.
|
28
|
+
// Carbon and package components we use.
|
29
|
+
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; }
|
30
|
+
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; }
|
22
31
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
23
32
|
var blockClass = "".concat(_settings.pkg.prefix, "--create-side-panel");
|
24
33
|
var componentName = 'CreateSidePanel';
|
@@ -28,7 +37,7 @@ var componentName = 'CreateSidePanel';
|
|
28
37
|
/**
|
29
38
|
* This is an example component to show relevant conventions and usage.
|
30
39
|
*/
|
31
|
-
var CreateSidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
40
|
+
var CreateSidePanel = exports.CreateSidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
32
41
|
var className = _ref.className,
|
33
42
|
children = _ref.children,
|
34
43
|
disableSubmit = _ref.disableSubmit,
|
@@ -84,7 +93,6 @@ var CreateSidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref
|
|
84
93
|
"aria-labelledby": formTitleId
|
85
94
|
}, children));
|
86
95
|
});
|
87
|
-
exports.CreateSidePanel = CreateSidePanel;
|
88
96
|
exports.CreateSidePanel = CreateSidePanel = _settings.pkg.checkComponentEnabled(CreateSidePanel, componentName);
|
89
97
|
CreateSidePanel.displayName = componentName;
|
90
98
|
CreateSidePanel.propTypes = {
|
@@ -22,28 +22,32 @@ var _devtools = require("../../global/js/utils/devtools");
|
|
22
22
|
var _lastIndexInArray = require("../../global/js/utils/lastIndexInArray");
|
23
23
|
var _getNumberOfHiddenSteps = require("../../global/js/utils/getNumberOfHiddenSteps");
|
24
24
|
var _excluded = ["backButtonText", "cancelButtonText", "children", "className", "description", "influencerWidth", "initialStep", "label", "nextButtonText", "onClose", "onRequestSubmit", "open", "firstFocusElement", "submitButtonText", "title", "verticalPosition"];
|
25
|
-
|
26
|
-
|
25
|
+
/**
|
26
|
+
* Copyright IBM Corp. 2021, 2022
|
27
|
+
*
|
28
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
29
|
+
* LICENSE file in the root directory of this source tree.
|
30
|
+
*/
|
31
|
+
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); }
|
32
|
+
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
33
|
var componentName = 'CreateTearsheet';
|
28
34
|
var blockClass = "".concat(_settings.pkg.prefix, "--tearsheet-create");
|
29
35
|
|
30
36
|
// This is a general context for the steps container
|
31
37
|
// containing information about the state of the container
|
32
38
|
// and providing some callback methods for steps to use
|
33
|
-
var StepsContext = /*#__PURE__*/(0, _react.createContext)(null);
|
39
|
+
var StepsContext = exports.StepsContext = /*#__PURE__*/(0, _react.createContext)(null);
|
34
40
|
|
35
41
|
// This is a context supplied separately to each step in the container
|
36
42
|
// to let it know what number it is in the sequence of steps
|
37
|
-
exports.
|
38
|
-
var StepNumberContext = /*#__PURE__*/(0, _react.createContext)(-1);
|
43
|
+
var StepNumberContext = exports.StepNumberContext = /*#__PURE__*/(0, _react.createContext)(-1);
|
39
44
|
|
40
45
|
// Default values for props
|
41
|
-
exports.StepNumberContext = StepNumberContext;
|
42
46
|
var defaults = {
|
43
47
|
verticalPosition: 'normal',
|
44
48
|
influencerWidth: 'narrow'
|
45
49
|
};
|
46
|
-
var CreateTearsheet = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
50
|
+
var CreateTearsheet = exports.CreateTearsheet = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
47
51
|
var backButtonText = _ref.backButtonText,
|
48
52
|
cancelButtonText = _ref.cancelButtonText,
|
49
53
|
children = _ref.children,
|
@@ -228,7 +232,6 @@ var CreateTearsheet = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
228
232
|
});
|
229
233
|
|
230
234
|
// Return a placeholder if not released and not enabled by feature flag
|
231
|
-
exports.CreateTearsheet = CreateTearsheet;
|
232
235
|
exports.CreateTearsheet = CreateTearsheet = _settings.pkg.checkComponentEnabled(CreateTearsheet, componentName);
|
233
236
|
|
234
237
|
// The display name of the component, used by React. Note that displayName
|
@@ -13,11 +13,17 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
14
14
|
var _settings = require("../../settings");
|
15
15
|
var _excluded = ["className"];
|
16
|
-
|
17
|
-
|
16
|
+
/**
|
17
|
+
* Copyright IBM Corp. 2021, 2021
|
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; }
|
18
24
|
var componentName = 'CreateTearsheetDivider';
|
19
25
|
var blockClass = "".concat(_settings.pkg.prefix, "--tearsheet-create__section--divider");
|
20
|
-
var CreateTearsheetDivider = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
26
|
+
var CreateTearsheetDivider = exports.CreateTearsheetDivider = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
21
27
|
var className = _ref.className,
|
22
28
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
23
29
|
return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({}, rest, {
|
@@ -27,7 +33,6 @@ var CreateTearsheetDivider = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
27
33
|
});
|
28
34
|
|
29
35
|
// Return a placeholder if not released and not enabled by feature flag
|
30
|
-
exports.CreateTearsheetDivider = CreateTearsheetDivider;
|
31
36
|
exports.CreateTearsheetDivider = CreateTearsheetDivider = _settings.pkg.checkComponentEnabled(CreateTearsheetDivider, componentName);
|
32
37
|
CreateTearsheetDivider.propTypes = {
|
33
38
|
/**
|
@@ -19,8 +19,14 @@ var _settings = require("../../settings");
|
|
19
19
|
var _pconsole = _interopRequireDefault(require("../../global/js/utils/pconsole"));
|
20
20
|
var _hooks = require("../../global/js/hooks");
|
21
21
|
var _excluded = ["children", "className", "description", "disableSubmit", "fieldsetLegendText", "hasFieldset", "includeStep", "introStep", "onNext", "onMount", "secondaryLabel", "subtitle", "title"];
|
22
|
-
|
23
|
-
|
22
|
+
/**
|
23
|
+
* Copyright IBM Corp. 2021, 2022
|
24
|
+
*
|
25
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
26
|
+
* LICENSE file in the root directory of this source tree.
|
27
|
+
*/
|
28
|
+
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); }
|
29
|
+
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; }
|
24
30
|
var componentName = 'CreateTearsheetStep';
|
25
31
|
var blockClass = "".concat(_settings.pkg.prefix, "--tearsheet-create__step");
|
26
32
|
|
@@ -29,8 +35,7 @@ var defaults = {
|
|
29
35
|
hasFieldset: true,
|
30
36
|
includeStep: true
|
31
37
|
};
|
32
|
-
var CreateTearsheetStep = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
33
|
-
var _cx;
|
38
|
+
var CreateTearsheetStep = exports.CreateTearsheetStep = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
34
39
|
var children = _ref.children,
|
35
40
|
className = _ref.className,
|
36
41
|
description = _ref.description,
|
@@ -69,7 +74,7 @@ var CreateTearsheetStep = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
69
74
|
// in the appropriate custom hooks.
|
70
75
|
(0, _react.useEffect)(function () {
|
71
76
|
if (stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep) && (previousState === null || previousState === void 0 ? void 0 : previousState.currentStep) !== (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)) {
|
72
|
-
stepsContext === null || stepsContext === void 0
|
77
|
+
stepsContext === null || stepsContext === void 0 || stepsContext.setOnMount(onMount);
|
73
78
|
}
|
74
79
|
}, [onMount, stepsContext, stepNumber, previousState === null || previousState === void 0 ? void 0 : previousState.currentStep]);
|
75
80
|
|
@@ -83,11 +88,11 @@ var CreateTearsheetStep = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
83
88
|
(0, _react.useEffect)(function () {
|
84
89
|
if (stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)) {
|
85
90
|
stepsContext.setIsDisabled(disableSubmit);
|
86
|
-
stepsContext === null || stepsContext === void 0
|
91
|
+
stepsContext === null || stepsContext === void 0 || stepsContext.setOnNext(onNext); // needs to be updated here otherwise there could be stale state values from only initially setting onNext
|
87
92
|
}
|
88
93
|
}, [stepsContext, stepNumber, disableSubmit, onNext]);
|
89
94
|
return stepsContext ? /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, rest, {
|
90
|
-
className: (0, _classnames.default)(blockClass, className, (
|
95
|
+
className: (0, _classnames.default)(blockClass, className, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__step--hidden-step"), stepNumber !== (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)), "".concat(blockClass, "__step--visible-step"), stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep))),
|
91
96
|
ref: ref
|
92
97
|
}), /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.Row, null, /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.Column, {
|
93
98
|
xlg: 12,
|
@@ -107,7 +112,6 @@ var CreateTearsheetStep = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
107
112
|
});
|
108
113
|
|
109
114
|
// Return a placeholder if not released and not enabled by feature flag
|
110
|
-
exports.CreateTearsheetStep = CreateTearsheetStep;
|
111
115
|
exports.CreateTearsheetStep = CreateTearsheetStep = _settings.pkg.checkComponentEnabled(CreateTearsheetStep, componentName);
|
112
116
|
CreateTearsheetStep.propTypes = {
|
113
117
|
/**
|
@@ -16,8 +16,15 @@ var _settings = require("../../../settings");
|
|
16
16
|
var _CreateTearsheet = require("../CreateTearsheet");
|
17
17
|
var _CreateTearsheetStep = require("../CreateTearsheetStep");
|
18
18
|
var _excluded = ["value1", "setValue1"];
|
19
|
-
|
20
|
-
|
19
|
+
/* eslint-disable react/prop-types */
|
20
|
+
/**
|
21
|
+
* Copyright IBM Corp. 2021, 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
|
+
*/
|
26
|
+
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); }
|
27
|
+
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; }
|
21
28
|
var blockClass = "".concat(_settings.pkg.prefix, "--tearsheet-create-multi-step");
|
22
29
|
var CustomStep = function CustomStep(_ref) {
|
23
30
|
var value1 = _ref.value1,
|
@@ -40,7 +47,7 @@ var CustomStep = function CustomStep(_ref) {
|
|
40
47
|
placeholder: "Enter location"
|
41
48
|
}))));
|
42
49
|
};
|
43
|
-
var MultiStepTearsheet = function MultiStepTearsheet(_ref2) {
|
50
|
+
var MultiStepTearsheet = exports.MultiStepTearsheet = function MultiStepTearsheet(_ref2) {
|
44
51
|
var backButtonText = _ref2.backButtonText,
|
45
52
|
cancelButtonText = _ref2.cancelButtonText,
|
46
53
|
className = _ref2.className,
|
@@ -280,5 +287,4 @@ var MultiStepTearsheet = function MultiStepTearsheet(_ref2) {
|
|
280
287
|
value: "one-month",
|
281
288
|
id: "one-month"
|
282
289
|
})))))));
|
283
|
-
};
|
284
|
-
exports.MultiStepTearsheet = MultiStepTearsheet;
|
290
|
+
};
|
@@ -14,8 +14,8 @@ var _settings = require("../../../settings");
|
|
14
14
|
var _CreateTearsheet = require("../CreateTearsheet");
|
15
15
|
var _CreateTearsheetStep = require("../CreateTearsheetStep");
|
16
16
|
var _NoDataIllustration = require("../../EmptyStates/assets/NoDataIllustration");
|
17
|
-
function _getRequireWildcardCache(
|
18
|
-
function _interopRequireWildcard(
|
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
19
|
/* eslint-disable react/prop-types */
|
20
20
|
/**
|
21
21
|
* Copyright IBM Corp. 2021, 2022
|
@@ -25,7 +25,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
25
25
|
*/
|
26
26
|
|
27
27
|
var blockClass = "".concat(_settings.pkg.prefix, "--tearsheet-create-multi-step");
|
28
|
-
var MultiStepWithIntro = function MultiStepWithIntro(_ref) {
|
28
|
+
var MultiStepWithIntro = exports.MultiStepWithIntro = function MultiStepWithIntro(_ref) {
|
29
29
|
var backButtonText = _ref.backButtonText,
|
30
30
|
cancelButtonText = _ref.cancelButtonText,
|
31
31
|
className = _ref.className,
|
@@ -287,5 +287,4 @@ var MultiStepWithIntro = function MultiStepWithIntro(_ref) {
|
|
287
287
|
value: "one-month",
|
288
288
|
id: "one-month"
|
289
289
|
})))))));
|
290
|
-
};
|
291
|
-
exports.MultiStepWithIntro = MultiStepWithIntro;
|
290
|
+
};
|
@@ -16,6 +16,14 @@ var _settings = require("../../settings");
|
|
16
16
|
var _TearsheetNarrow = require("../Tearsheet/TearsheetNarrow");
|
17
17
|
var _uuidv = _interopRequireDefault(require("../../global/js/utils/uuidv4"));
|
18
18
|
var _excluded = ["children", "className", "description", "disableSubmit", "formDescription", "formTitle", "label", "open", "onRequestClose", "onRequestSubmit", "primaryButtonText", "secondaryButtonText", "selectorPrimaryFocus", "title", "verticalPosition"];
|
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.
|
19
27
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
20
28
|
var blockClass = "".concat(_settings.pkg.prefix, "--create-tearsheet-narrow");
|
21
29
|
var componentName = 'CreateTearsheetNarrow';
|
@@ -26,7 +34,7 @@ var componentName = 'CreateTearsheetNarrow';
|
|
26
34
|
* Use a narrow tearsheet as an alternative to a modal when there is scrolling.
|
27
35
|
* Use when the form fields can be broken down into sections using section headers.
|
28
36
|
*/
|
29
|
-
var CreateTearsheetNarrow = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
37
|
+
var CreateTearsheetNarrow = exports.CreateTearsheetNarrow = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
30
38
|
var children = _ref.children,
|
31
39
|
className = _ref.className,
|
32
40
|
description = _ref.description,
|
@@ -63,7 +71,7 @@ var CreateTearsheetNarrow = /*#__PURE__*/_react.default.forwardRef(function (_re
|
|
63
71
|
open: open,
|
64
72
|
ref: ref,
|
65
73
|
onClose: function onClose() {
|
66
|
-
onRequestClose === null || onRequestClose === void 0
|
74
|
+
onRequestClose === null || onRequestClose === void 0 || onRequestClose();
|
67
75
|
return false;
|
68
76
|
},
|
69
77
|
label: label,
|
@@ -82,7 +90,6 @@ var CreateTearsheetNarrow = /*#__PURE__*/_react.default.forwardRef(function (_re
|
|
82
90
|
});
|
83
91
|
|
84
92
|
// Return a placeholder if not released and not enabled by feature flag
|
85
|
-
exports.CreateTearsheetNarrow = CreateTearsheetNarrow;
|
86
93
|
exports.CreateTearsheetNarrow = CreateTearsheetNarrow = _settings.pkg.checkComponentEnabled(CreateTearsheetNarrow, componentName);
|
87
94
|
|
88
95
|
// The display name of the component, used by React. Note that displayName
|
@@ -36,10 +36,18 @@ var _handleActiveCellInSelectionEnter = require("./utils/handleActiveCellInSelec
|
|
36
36
|
var _handleActiveCellInSelectionTab = require("./utils/handleActiveCellInSelectionTab");
|
37
37
|
var _handleCellDeletion = require("./utils/handleCellDeletion");
|
38
38
|
var _excluded = ["cellSize", "className", "columns", "data", "defaultEmptyRowCount", "onDataUpdate", "id", "onActiveCellChange", "onSelectionAreaChange", "selectAllAriaLabel", "spreadsheetAriaLabel", "theme", "totalVisibleColumns"];
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
/**
|
40
|
+
* Copyright IBM Corp. 2022, 2022
|
41
|
+
*
|
42
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
43
|
+
* LICENSE file in the root directory of this source tree.
|
44
|
+
*/
|
45
|
+
// Import portions of React that are needed.
|
46
|
+
// Other standard imports.
|
47
|
+
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); }
|
48
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(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; }
|
49
|
+
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; }
|
50
|
+
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; }
|
43
51
|
// cspell:words rowcount colcount
|
44
52
|
|
45
53
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
@@ -61,8 +69,7 @@ var defaults = {
|
|
61
69
|
/**
|
62
70
|
* DataSpreadsheet: used to organize and display large amounts of structured data, separated by columns and rows in a grid-like format.
|
63
71
|
*/
|
64
|
-
var DataSpreadsheet = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
65
|
-
var _cx;
|
72
|
+
var DataSpreadsheet = exports.DataSpreadsheet = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
66
73
|
var _ref$cellSize = _ref.cellSize,
|
67
74
|
cellSize = _ref$cellSize === void 0 ? defaults.cellSize : _ref$cellSize,
|
68
75
|
className = _ref.className,
|
@@ -704,7 +711,7 @@ var DataSpreadsheet = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref
|
|
704
711
|
}
|
705
712
|
}, [spreadsheetRef, currentMatcher]);
|
706
713
|
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, rest, getTableProps(), (0, _devtools.getDevtoolsProps)(componentName), {
|
707
|
-
className: (0, _classnames.default)(blockClass, className, "".concat(blockClass, "--interactive-cell-element"), (
|
714
|
+
className: (0, _classnames.default)(blockClass, className, "".concat(blockClass, "--interactive-cell-element"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__container-has-focus"), containerHasFocus), "".concat(blockClass, "__").concat(theme), theme === 'dark')),
|
708
715
|
ref: spreadsheetRef,
|
709
716
|
role: "grid",
|
710
717
|
tabIndex: 0,
|
@@ -812,7 +819,6 @@ var DataSpreadsheet = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref
|
|
812
819
|
});
|
813
820
|
|
814
821
|
// Return a placeholder if not released and not enabled by feature flag
|
815
|
-
exports.DataSpreadsheet = DataSpreadsheet;
|
816
822
|
exports.DataSpreadsheet = DataSpreadsheet = _settings.pkg.checkComponentEnabled(DataSpreadsheet, componentName);
|
817
823
|
|
818
824
|
// The display name of the component, used by React. Note that displayName
|
@@ -839,7 +845,6 @@ DataSpreadsheet.propTypes = {
|
|
839
845
|
accessor: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.func]),
|
840
846
|
Cell: _propTypes.default.func // optional cell formatter
|
841
847
|
})),
|
842
|
-
|
843
848
|
/**
|
844
849
|
* The spreadsheet data that will be rendered in the body of the spreadsheet component
|
845
850
|
*/
|
@@ -26,12 +26,17 @@ var _checkSelectedHeaderCell = require("./utils/checkSelectedHeaderCell");
|
|
26
26
|
var _handleHeaderCellSelection = require("./utils/handleHeaderCellSelection");
|
27
27
|
var _getSpreadsheetWidth = require("./utils/getSpreadsheetWidth");
|
28
28
|
var _hooks2 = require("./hooks");
|
29
|
-
function _getRequireWildcardCache(
|
30
|
-
function _interopRequireWildcard(
|
31
|
-
function ownKeys(
|
32
|
-
function _objectSpread(
|
29
|
+
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); }
|
30
|
+
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; }
|
31
|
+
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; }
|
32
|
+
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; } /**
|
33
|
+
* Copyright IBM Corp. 2022, 2022
|
34
|
+
*
|
35
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
36
|
+
* LICENSE file in the root directory of this source tree.
|
37
|
+
*/
|
33
38
|
var blockClass = "".concat(_settings.pkg.prefix, "--data-spreadsheet");
|
34
|
-
var DataSpreadsheetBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
39
|
+
var DataSpreadsheetBody = exports.DataSpreadsheetBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
35
40
|
var columns = _ref.columns,
|
36
41
|
activeCellCoordinates = _ref.activeCellCoordinates,
|
37
42
|
defaultColumn = _ref.defaultColumn,
|
@@ -73,7 +78,7 @@ var DataSpreadsheetBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
73
78
|
|
74
79
|
// Set custom css property containing the spreadsheet total width
|
75
80
|
(0, _react.useEffect)(function () {
|
76
|
-
ref === null || ref === void 0
|
81
|
+
ref === null || ref === void 0 || ref.current.style.setProperty("--".concat(blockClass, "--total-width"), (0, _layout.px)(totalColumnsWidth + scrollBarSize));
|
77
82
|
}, [ref, scrollBarSize, totalColumnsWidth]);
|
78
83
|
|
79
84
|
// Call the `onSelectionAreaChange` handler to send selection area data
|
@@ -81,7 +86,7 @@ var DataSpreadsheetBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
81
86
|
(0, _react.useEffect)(function () {
|
82
87
|
if (selectionAreaData.length) {
|
83
88
|
var _previousState$select;
|
84
|
-
if (!clickAndHoldActive && previousState !== null && previousState !== void 0 && previousState.clickAndHoldActive || (previousState === null || previousState === void 0
|
89
|
+
if (!clickAndHoldActive && previousState !== null && previousState !== void 0 && previousState.clickAndHoldActive || (previousState === null || previousState === void 0 || (_previousState$select = previousState.selectionAreaData) === null || _previousState$select === void 0 ? void 0 : _previousState$select.length) !== (selectionAreaData === null || selectionAreaData === void 0 ? void 0 : selectionAreaData.length)) {
|
85
90
|
onSelectionAreaChange(selectionAreaData);
|
86
91
|
}
|
87
92
|
}
|
@@ -339,7 +344,7 @@ var DataSpreadsheetBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
339
344
|
(0, _toConsumableArray2.default)(Array(defaultEmptyRowCount)).map(function () {
|
340
345
|
var _headerGroups$;
|
341
346
|
var emptyCell = {};
|
342
|
-
(_headerGroups$ = headerGroups[0]) === null || _headerGroups$ === void 0
|
347
|
+
(_headerGroups$ = headerGroups[0]) === null || _headerGroups$ === void 0 || _headerGroups$.headers.map(function (header) {
|
343
348
|
emptyCell[header.id] = null;
|
344
349
|
});
|
345
350
|
emptyRowData.push(emptyCell);
|
@@ -359,7 +364,6 @@ var DataSpreadsheetBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
359
364
|
style = _ref3.style;
|
360
365
|
var row = rows[index];
|
361
366
|
if (rows && rows.length) {
|
362
|
-
var _cx;
|
363
367
|
prepareRow(row);
|
364
368
|
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, row.getRowProps({
|
365
369
|
style: style
|
@@ -378,7 +382,7 @@ var DataSpreadsheetBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
378
382
|
"data-column-index": "header",
|
379
383
|
type: "button",
|
380
384
|
onClick: handleRowHeaderClick(index),
|
381
|
-
className: (0, _classnames.default)("".concat(blockClass, "__td"), "".concat(blockClass, "__td-th"), "".concat(blockClass, "--interactive-cell-element"), (
|
385
|
+
className: (0, _classnames.default)("".concat(blockClass, "__td"), "".concat(blockClass, "__td-th"), "".concat(blockClass, "--interactive-cell-element"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__td-th--active-header"), (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === index || (0, _checkActiveHeaderCell.checkActiveHeaderCell)(index, selectionAreas, 'row')), "".concat(blockClass, "__td-th--selected-header"), (0, _checkSelectedHeaderCell.checkSelectedHeaderCell)(index, selectionAreas, 'row', columns))),
|
382
386
|
style: {
|
383
387
|
width: defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeaderWidth
|
384
388
|
}
|
@@ -391,7 +395,7 @@ var DataSpreadsheetBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
391
395
|
role: "gridcell",
|
392
396
|
style: _objectSpread(_objectSpread({}, cell.getCellProps().style), {}, {
|
393
397
|
display: 'grid',
|
394
|
-
minWidth: (cell === null || cell === void 0
|
398
|
+
minWidth: (cell === null || cell === void 0 || (_cell$column = cell.column) === null || _cell$column === void 0 ? void 0 : _cell$column.width) || (defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.width)
|
395
399
|
})
|
396
400
|
}), /*#__PURE__*/_react.default.createElement("button", {
|
397
401
|
id: "".concat(blockClass, "__cell--").concat(cell.row.index, "--").concat(index),
|
@@ -426,7 +430,6 @@ var DataSpreadsheetBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
426
430
|
outerRef: contentScrollRef
|
427
431
|
}, rows !== null && rows !== void 0 && rows.length ? RenderRow : RenderEmptyRows));
|
428
432
|
});
|
429
|
-
exports.DataSpreadsheetBody = DataSpreadsheetBody;
|
430
433
|
DataSpreadsheetBody.propTypes = {
|
431
434
|
/**
|
432
435
|
* Object containing the active cell coordinates
|