@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
@@ -8,8 +8,8 @@ exports.makeData = exports.defaultHeader = exports.Wrapper = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
10
10
|
var _namor = _interopRequireDefault(require("namor"));
|
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
|
var range = function range(len) {
|
14
14
|
var arr = [];
|
15
15
|
for (var i = 0; i < len; i++) {
|
@@ -116,7 +116,7 @@ var newPerson = function newPerson() {
|
|
116
116
|
};
|
117
117
|
|
118
118
|
// eslint-disable-next-line react/prop-types
|
119
|
-
var Wrapper = function Wrapper(_ref) {
|
119
|
+
var Wrapper = exports.Wrapper = function Wrapper(_ref) {
|
120
120
|
var children = _ref.children;
|
121
121
|
return /*#__PURE__*/_react.default.createElement("div", {
|
122
122
|
style: {
|
@@ -128,24 +128,22 @@ var Wrapper = function Wrapper(_ref) {
|
|
128
128
|
}
|
129
129
|
}, children);
|
130
130
|
};
|
131
|
-
exports.
|
132
|
-
var makeData = function makeData() {
|
131
|
+
var makeData = exports.makeData = function makeData() {
|
133
132
|
for (var _len = arguments.length, lens = new Array(_len), _key = 0; _key < _len; _key++) {
|
134
133
|
lens[_key] = arguments[_key];
|
135
134
|
}
|
136
|
-
var
|
135
|
+
var _makeDataLevel = function makeDataLevel() {
|
137
136
|
var depth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
138
137
|
var len = lens[depth];
|
139
138
|
return range(len).map(function () {
|
140
139
|
return _objectSpread(_objectSpread({}, newPerson()), {}, {
|
141
|
-
subRows: lens[depth + 1] ?
|
140
|
+
subRows: lens[depth + 1] ? _makeDataLevel(depth + 1) : undefined
|
142
141
|
});
|
143
142
|
});
|
144
143
|
};
|
145
|
-
return
|
144
|
+
return _makeDataLevel();
|
146
145
|
};
|
147
|
-
exports.
|
148
|
-
var defaultHeader = [{
|
146
|
+
var defaultHeader = exports.defaultHeader = [{
|
149
147
|
Header: 'Row Index',
|
150
148
|
accessor: function accessor(row, i) {
|
151
149
|
return i;
|
@@ -196,5 +194,4 @@ var defaultHeader = [{
|
|
196
194
|
}, {
|
197
195
|
Header: 'Someone 10',
|
198
196
|
accessor: 'someone10'
|
199
|
-
}];
|
200
|
-
exports.defaultHeader = defaultHeader;
|
197
|
+
}];
|
@@ -12,5 +12,4 @@ exports.selectionColumnId = void 0;
|
|
12
12
|
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
13
13
|
*/
|
14
14
|
|
15
|
-
var selectionColumnId = 'datagridSelection';
|
16
|
-
exports.selectionColumnId = selectionColumnId;
|
15
|
+
var selectionColumnId = exports.selectionColumnId = 'datagridSelection';
|
@@ -15,8 +15,14 @@ var _settings = require("../../settings");
|
|
15
15
|
var _propsHelper = require("../../global/js/utils/props-helper");
|
16
16
|
var _excluded = ["id", "itemText", "onClick", "shouldHideMenuItem", "align", "icon"],
|
17
17
|
_excluded2 = ["id", "onClick", "shouldHideMenuItem", "shouldDisableMenuItem", "disabled"];
|
18
|
-
|
19
|
-
|
18
|
+
/**
|
19
|
+
* Copyright IBM Corp. 2021, 2023
|
20
|
+
*
|
21
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
23
|
+
*/
|
24
|
+
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; }
|
25
|
+
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; }
|
20
26
|
var blockClass = "".concat(_settings.pkg.prefix, "--datagrid");
|
21
27
|
var useActionsColumn = function useActionsColumn(hooks) {
|
22
28
|
var useAttachActionsOnInstance = function useAttachActionsOnInstance(instance) {
|
@@ -38,7 +44,6 @@ var useActionsColumn = function useActionsColumn(hooks) {
|
|
38
44
|
var row = cell.row,
|
39
45
|
column = cell.column;
|
40
46
|
if (column.isAction) {
|
41
|
-
var _cx3;
|
42
47
|
var isColumnSticky = !!column.sticky;
|
43
48
|
return [props, {
|
44
49
|
children: /*#__PURE__*/_react.default.createElement("div", {
|
@@ -114,7 +119,7 @@ var useActionsColumn = function useActionsColumn(hooks) {
|
|
114
119
|
key: id
|
115
120
|
}));
|
116
121
|
})))),
|
117
|
-
className: (0, _classnames.default)((
|
122
|
+
className: (0, _classnames.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__actions-column-cell"), true), "".concat(blockClass, "__cell"), true), "".concat(blockClass, "__actions-column-cell-non-sticky"), !isColumnSticky)),
|
118
123
|
style: {
|
119
124
|
width: rowActions.length > 2 || isColumnSticky ? 48 : 96
|
120
125
|
}
|
@@ -138,7 +143,6 @@ var useActionsColumn = function useActionsColumn(hooks) {
|
|
138
143
|
})
|
139
144
|
}];
|
140
145
|
}
|
141
|
-
|
142
146
|
return [props];
|
143
147
|
};
|
144
148
|
hooks.getHeaderProps.push(addHeaderWidth);
|
@@ -147,5 +151,4 @@ var useActionsColumn = function useActionsColumn(hooks) {
|
|
147
151
|
hooks.useInstance.push(useStickyHeaderWidth);
|
148
152
|
hooks.useInstance.push(useAttachActionsOnInstance);
|
149
153
|
};
|
150
|
-
var _default = useActionsColumn;
|
151
|
-
exports.default = _default;
|
154
|
+
var _default = exports.default = useActionsColumn;
|
@@ -10,8 +10,13 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
11
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
12
12
|
var _settings = require("../../settings");
|
13
|
-
function ownKeys(
|
14
|
-
function _objectSpread(
|
13
|
+
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; }
|
14
|
+
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; } /**
|
15
|
+
* Copyright IBM Corp. 2020, 2023
|
16
|
+
*
|
17
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
19
|
+
*/
|
15
20
|
var blockClass = "".concat(_settings.pkg.prefix, "--datagrid");
|
16
21
|
var useColumnCenterAlign = function useColumnCenterAlign(hooks) {
|
17
22
|
var centerAlignRenderer = function centerAlignRenderer(tableProps, column) {
|
@@ -41,5 +46,4 @@ var useColumnCenterAlign = function useColumnCenterAlign(hooks) {
|
|
41
46
|
};
|
42
47
|
hooks.visibleColumns.push(centerAlignedColumns);
|
43
48
|
};
|
44
|
-
var _default = useColumnCenterAlign;
|
45
|
-
exports.default = _default;
|
49
|
+
var _default = exports.default = useColumnCenterAlign;
|
@@ -11,5 +11,4 @@ var _reactTable = require("react-table");
|
|
11
11
|
* This source code is licensed under the Apache-2.0 license found in the
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
13
13
|
*/
|
14
|
-
var _default = _reactTable.useColumnOrder;
|
15
|
-
exports.default = _default;
|
14
|
+
var _default = exports.default = _reactTable.useColumnOrder;
|
@@ -10,8 +10,13 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
11
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
12
12
|
var _settings = require("../../settings");
|
13
|
-
function ownKeys(
|
14
|
-
function _objectSpread(
|
13
|
+
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; }
|
14
|
+
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; } /**
|
15
|
+
* Copyright IBM Corp. 2020, 2023
|
16
|
+
*
|
17
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
19
|
+
*/
|
15
20
|
var blockClass = "".concat(_settings.pkg.prefix, "--datagrid");
|
16
21
|
var useColumnRightAlign = function useColumnRightAlign(hooks) {
|
17
22
|
var RightAlignRenderer = function RightAlignRenderer(tableProps, column) {
|
@@ -41,5 +46,4 @@ var useColumnRightAlign = function useColumnRightAlign(hooks) {
|
|
41
46
|
};
|
42
47
|
hooks.visibleColumns.push(rightAlignedColumns);
|
43
48
|
};
|
44
|
-
var _default = useColumnRightAlign;
|
45
|
-
exports.default = _default;
|
49
|
+
var _default = exports.default = useColumnRightAlign;
|
@@ -12,10 +12,15 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
13
13
|
var _settings = require("../../settings");
|
14
14
|
var _CustomizeColumns = require("./Datagrid/addons/CustomizeColumns");
|
15
|
-
function _getRequireWildcardCache(
|
16
|
-
function _interopRequireWildcard(
|
17
|
-
function ownKeys(
|
18
|
-
function _objectSpread(
|
15
|
+
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); }
|
16
|
+
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; }
|
17
|
+
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; }
|
18
|
+
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; } /**
|
19
|
+
* Copyright IBM Corp. 2022, 2023
|
20
|
+
*
|
21
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
23
|
+
*/
|
19
24
|
var useCustomizeColumns = function useCustomizeColumns(hooks) {
|
20
25
|
React.useEffect(function () {
|
21
26
|
_settings.pkg.checkReportFeatureEnabled('Datagrid.useCustomizeColumns');
|
@@ -44,5 +49,4 @@ var useCustomizeColumns = function useCustomizeColumns(hooks) {
|
|
44
49
|
});
|
45
50
|
});
|
46
51
|
};
|
47
|
-
var _default = useCustomizeColumns;
|
48
|
-
exports.default = _default;
|
52
|
+
var _default = exports.default = useCustomizeColumns;
|
@@ -18,8 +18,14 @@ var _DatagridHeaderRow = _interopRequireDefault(require("./Datagrid/DatagridHead
|
|
18
18
|
var _useFlexResize = _interopRequireDefault(require("./useFlexResize"));
|
19
19
|
var _useFloatingScroll = _interopRequireDefault(require("./useFloatingScroll"));
|
20
20
|
var _stateReducer = require("./Datagrid/addons/stateReducer");
|
21
|
-
function ownKeys(
|
22
|
-
function _objectSpread(
|
21
|
+
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; }
|
22
|
+
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; } /*
|
23
|
+
* Licensed Materials - Property of IBM
|
24
|
+
* 5724-Q36
|
25
|
+
* (c) Copyright IBM Corp. 2020 - 2021
|
26
|
+
* US Government Users Restricted Rights - Use, duplication or disclosure
|
27
|
+
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
28
|
+
*/
|
23
29
|
var useDatagrid = function useDatagrid(params) {
|
24
30
|
var defaultPlugins = [_reactTable.useFlexLayout, _DatagridHeaderRow.default, _useSkeletonRows.default, _reactTable.useResizeColumns, _useRowRenderer.default, _useDefaultStringRenderer.default, _useRowSize.default, _reactTable.useFilters, _reactTable.useGlobalFilter, _reactTable.useSortBy, _reactTable.useExpanded];
|
25
31
|
|
@@ -49,5 +55,4 @@ var useDatagrid = function useDatagrid(params) {
|
|
49
55
|
})].concat(defaultPlugins, plugins, defaultEndPlugins, (0, _toConsumableArray2.default)(clientEndPlugins)));
|
50
56
|
return tableState;
|
51
57
|
};
|
52
|
-
var _default = useDatagrid;
|
53
|
-
exports.default = _default;
|
58
|
+
var _default = exports.default = useDatagrid;
|
@@ -10,8 +10,14 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
11
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
12
12
|
var _settings = require("../../settings");
|
13
|
-
function ownKeys(
|
14
|
-
function _objectSpread(
|
13
|
+
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; }
|
14
|
+
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; } /*
|
15
|
+
* Licensed Materials - Property of IBM
|
16
|
+
* 5724-Q36
|
17
|
+
* (c) Copyright IBM Corp. 2020
|
18
|
+
* US Government Users Restricted Rights - Use, duplication or disclosure
|
19
|
+
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
20
|
+
*/
|
15
21
|
var blockClass = "".concat(_settings.pkg.prefix, "--datagrid");
|
16
22
|
var useDefaultStringRenderer = function useDefaultStringRenderer(hooks) {
|
17
23
|
var StringRenderer = function StringRenderer(tableProps) {
|
@@ -40,5 +46,4 @@ var useDefaultStringRenderer = function useDefaultStringRenderer(hooks) {
|
|
40
46
|
};
|
41
47
|
hooks.visibleColumns.push(visibleColumns);
|
42
48
|
};
|
43
|
-
var _default = useDefaultStringRenderer;
|
44
|
-
exports.default = _default;
|
49
|
+
var _default = exports.default = useDefaultStringRenderer;
|
@@ -26,7 +26,7 @@ var useDisableSelectRows = function useDisableSelectRows(hooks) {
|
|
26
26
|
};
|
27
27
|
var updateSelectAll = function updateSelectAll(hooks) {
|
28
28
|
var getToggleAllRowsSelectedProps = function getToggleAllRowsSelectedProps(props, _ref2) {
|
29
|
-
var _instance$disableSele
|
29
|
+
var _instance$disableSele;
|
30
30
|
var instance = _ref2.instance;
|
31
31
|
var selectableRows = instance.rows.filter(function (row) {
|
32
32
|
return !(instance.shouldDisableSelectRow && instance.shouldDisableSelectRow(row));
|
@@ -46,7 +46,7 @@ var updateSelectAll = function updateSelectAll(hooks) {
|
|
46
46
|
},
|
47
47
|
checked: isAllRowsSelected,
|
48
48
|
disabled: instance.disableSelectAll,
|
49
|
-
title: (instance === null || instance === void 0
|
49
|
+
title: (instance === null || instance === void 0 || (_instance$disableSele = instance.disableSelectRowsProps) === null || _instance$disableSele === void 0 || (_instance$disableSele = _instance$disableSele.labels) === null || _instance$disableSele === void 0 ? void 0 : _instance$disableSele.toggleAllRowsLabel) || 'Toggle All Rows Selected',
|
50
50
|
indeterminate: Boolean(!isAllRowsSelected && Object.keys(instance.state.selectedRowIds).length)
|
51
51
|
}];
|
52
52
|
};
|
@@ -54,7 +54,7 @@ var updateSelectAll = function updateSelectAll(hooks) {
|
|
54
54
|
};
|
55
55
|
var updatePageSelectAll = function updatePageSelectAll(hooks) {
|
56
56
|
var getToggleAllPageRowsSelectedProps = function getToggleAllPageRowsSelectedProps(props, _ref4) {
|
57
|
-
var _instance$
|
57
|
+
var _instance$disableSele2;
|
58
58
|
var instance = _ref4.instance;
|
59
59
|
var selectableRows = instance.page.filter(function (row) {
|
60
60
|
return !(instance.shouldDisableSelectRow && instance.shouldDisableSelectRow(row));
|
@@ -74,7 +74,7 @@ var updatePageSelectAll = function updatePageSelectAll(hooks) {
|
|
74
74
|
},
|
75
75
|
checked: isAllRowsSelected,
|
76
76
|
disabled: instance.disableSelectAll,
|
77
|
-
title: (instance === null || instance === void 0
|
77
|
+
title: (instance === null || instance === void 0 || (_instance$disableSele2 = instance.disableSelectRowsProps) === null || _instance$disableSele2 === void 0 || (_instance$disableSele2 = _instance$disableSele2.labels) === null || _instance$disableSele2 === void 0 ? void 0 : _instance$disableSele2.toggleAllRowsLabel) || 'Toggle All Rows Selected',
|
78
78
|
indeterminate: Boolean(!isAllRowsSelected && instance.page.some(function (_ref6) {
|
79
79
|
var id = _ref6.id;
|
80
80
|
return instance.state.selectedRowIds[id];
|
@@ -83,5 +83,4 @@ var updatePageSelectAll = function updatePageSelectAll(hooks) {
|
|
83
83
|
};
|
84
84
|
hooks.getToggleAllPageRowsSelectedProps.push(getToggleAllPageRowsSelectedProps);
|
85
85
|
};
|
86
|
-
var _default = useDisableSelectRows;
|
87
|
-
exports.default = _default;
|
86
|
+
var _default = exports.default = useDisableSelectRows;
|
@@ -16,5 +16,4 @@ var _useInlineEdit = _interopRequireDefault(require("./useInlineEdit"));
|
|
16
16
|
var useEditableCell = function useEditableCell(hooks) {
|
17
17
|
(0, _useInlineEdit.default)(hooks, 'usingEditableCell');
|
18
18
|
};
|
19
|
-
var _default = useEditableCell;
|
20
|
-
exports.default = _default;
|
19
|
+
var _default = exports.default = useEditableCell;
|
@@ -10,8 +10,13 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
10
10
|
var _react = require("react");
|
11
11
|
var _DatagridExpandedRow = _interopRequireDefault(require("./Datagrid/DatagridExpandedRow"));
|
12
12
|
var _useRowExpander = _interopRequireDefault(require("./useRowExpander"));
|
13
|
-
function ownKeys(
|
14
|
-
function _objectSpread(
|
13
|
+
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; }
|
14
|
+
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; } /**
|
15
|
+
* Copyright IBM Corp. 2020, 2023
|
16
|
+
*
|
17
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
19
|
+
*/
|
15
20
|
var useExpandedRow = function useExpandedRow(hooks) {
|
16
21
|
(0, _useRowExpander.default)(hooks);
|
17
22
|
var useInstance = function useInstance(instance) {
|
@@ -40,5 +45,4 @@ var useExpandedRow = function useExpandedRow(hooks) {
|
|
40
45
|
};
|
41
46
|
hooks.useInstance.push(useInstance);
|
42
47
|
};
|
43
|
-
var _default = useExpandedRow;
|
44
|
-
exports.default = _default;
|
48
|
+
var _default = exports.default = useExpandedRow;
|
@@ -11,8 +11,13 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
11
11
|
var _react = require("react");
|
12
12
|
var _Filtering = require("./Datagrid/addons/Filtering");
|
13
13
|
var _constants = require("./Datagrid/addons/Filtering/constants");
|
14
|
-
function ownKeys(
|
15
|
-
function _objectSpread(
|
14
|
+
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; }
|
15
|
+
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; } /**
|
16
|
+
* Copyright IBM Corp. 2022, 2024
|
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 handleMultiFilter = function handleMultiFilter(rows, id, value) {
|
17
22
|
// gets all the items that are selected and returns their value
|
18
23
|
var selectedItems = value.filter(function (item) {
|
@@ -33,8 +38,7 @@ var handleMultiFilter = function handleMultiFilter(rows, id, value) {
|
|
33
38
|
var useFiltering = function useFiltering(hooks) {
|
34
39
|
/* istanbul ignore next */
|
35
40
|
var filterTypes = (0, _react.useMemo)(function () {
|
36
|
-
|
37
|
-
return _ref3 = {}, (0, _defineProperty2.default)(_ref3, _constants.DATE, function (rows, id, _ref) {
|
41
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants.DATE, function (rows, id, _ref) {
|
38
42
|
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
39
43
|
startDate = _ref2[0],
|
40
44
|
endDate = _ref2[1];
|
@@ -51,7 +55,7 @@ var useFiltering = function useFiltering(hooks) {
|
|
51
55
|
return false;
|
52
56
|
}
|
53
57
|
});
|
54
|
-
}),
|
58
|
+
}), _constants.NUMBER, function (rows, id, value) {
|
55
59
|
if (value === '') {
|
56
60
|
return rows;
|
57
61
|
}
|
@@ -60,11 +64,11 @@ var useFiltering = function useFiltering(hooks) {
|
|
60
64
|
var rowValue = row.values[id];
|
61
65
|
return rowValue === parsedValue;
|
62
66
|
});
|
63
|
-
}),
|
67
|
+
}), _constants.CHECKBOX, function (rows, id, value) {
|
64
68
|
return handleMultiFilter(rows, id, value);
|
65
|
-
}),
|
69
|
+
}), _constants.MULTISELECT, function (rows, id, value) {
|
66
70
|
return handleMultiFilter(rows, id, value);
|
67
|
-
})
|
71
|
+
});
|
68
72
|
}, []);
|
69
73
|
hooks.useInstance.push(function (instance) {
|
70
74
|
var filterProps = instance.filterProps,
|
@@ -95,5 +99,4 @@ var useFiltering = function useFiltering(hooks) {
|
|
95
99
|
});
|
96
100
|
});
|
97
101
|
};
|
98
|
-
var _default = useFiltering;
|
99
|
-
exports.default = _default;
|
102
|
+
var _default = exports.default = useFiltering;
|
@@ -29,7 +29,7 @@ var useFloatingScroll = function useFloatingScroll(hooks) {
|
|
29
29
|
}
|
30
30
|
var datagrid = document.getElementById(tableId);
|
31
31
|
// eslint-disable-next-line no-unused-expressions
|
32
|
-
datagrid === null || datagrid === void 0
|
32
|
+
datagrid === null || datagrid === void 0 || datagrid.classList.add("".concat(blockClass, "__sticky"));
|
33
33
|
}, [ExpandedRowContentComponent, tableId, withVirtualScroll]);
|
34
34
|
};
|
35
35
|
var useAddStickyClass = function useAddStickyClass(instance) {
|
@@ -80,5 +80,4 @@ var useFloatingScroll = function useFloatingScroll(hooks) {
|
|
80
80
|
hooks.useInstance.push(useAddScrollListener);
|
81
81
|
hooks.useInstance.push(useInstance);
|
82
82
|
};
|
83
|
-
var _default = useFloatingScroll;
|
84
|
-
exports.default = _default;
|
83
|
+
var _default = exports.default = useFloatingScroll;
|
@@ -16,7 +16,7 @@ var _react = require("react");
|
|
16
16
|
// We have to add this workaround because react-table is re-rendering the entire row
|
17
17
|
// which removes the focus from the expander and interrupts the keyboard navigation
|
18
18
|
// flow.
|
19
|
-
var useFocusRowExpander = function useFocusRowExpander(_ref) {
|
19
|
+
var useFocusRowExpander = exports.useFocusRowExpander = function useFocusRowExpander(_ref) {
|
20
20
|
var instance = _ref.instance,
|
21
21
|
_ref$lastExpandedRowI = _ref.lastExpandedRowIndex,
|
22
22
|
lastExpandedRowIndex = _ref$lastExpandedRowI === void 0 ? 0 : _ref$lastExpandedRowI,
|
@@ -42,5 +42,4 @@ var useFocusRowExpander = function useFocusRowExpander(_ref) {
|
|
42
42
|
rowExpander.focus();
|
43
43
|
}
|
44
44
|
}, [instance === null || instance === void 0 ? void 0 : instance.tableId, instance === null || instance === void 0 ? void 0 : instance.expandedRows, lastExpandedRowIndex, blockClass, activeElement]);
|
45
|
-
};
|
46
|
-
exports.useFocusRowExpander = useFocusRowExpander;
|
45
|
+
};
|
@@ -15,7 +15,7 @@ var _useSortableColumns = require("./useSortableColumns");
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
16
16
|
*/
|
17
17
|
|
18
|
-
var useInitialColumnSort = function useInitialColumnSort(instance) {
|
18
|
+
var useInitialColumnSort = exports.useInitialColumnSort = function useInitialColumnSort(instance) {
|
19
19
|
var _useState = (0, _react.useState)(false),
|
20
20
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
21
21
|
hasInitialSort = _useState2[0],
|
@@ -38,10 +38,9 @@ var useInitialColumnSort = function useInitialColumnSort(instance) {
|
|
38
38
|
var _getNewSortOrder = (0, _useSortableColumns.getNewSortOrder)(order),
|
39
39
|
newSortDesc = _getNewSortOrder.newSortDesc,
|
40
40
|
newOrder = _getNewSortOrder.newOrder;
|
41
|
-
onSort === null || onSort === void 0
|
41
|
+
onSort === null || onSort === void 0 || onSort(columnId, newOrder);
|
42
42
|
instance.toggleSortBy(columnId, newSortDesc, false);
|
43
43
|
setHasInitialSort(true);
|
44
44
|
}
|
45
45
|
}, [instance, hasInitialSort]);
|
46
|
-
};
|
47
|
-
exports.useInitialColumnSort = useInitialColumnSort;
|
46
|
+
};
|
@@ -12,8 +12,8 @@ var _settings = require("../../settings");
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
13
13
|
var _InlineEditCell = require("./Datagrid/addons/InlineEdit/InlineEditCell");
|
14
14
|
var _pconsole = require("../../global/js/utils/pconsole");
|
15
|
-
function _getRequireWildcardCache(
|
16
|
-
function _interopRequireWildcard(
|
15
|
+
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); }
|
16
|
+
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; }
|
17
17
|
/**
|
18
18
|
* Copyright IBM Corp. 2022, 2023
|
19
19
|
*
|
@@ -32,11 +32,11 @@ var useInlineEdit = function useInlineEdit(hooks, usingEditableCell) {
|
|
32
32
|
}
|
33
33
|
}, [usingEditableCell]);
|
34
34
|
var addInlineEdit = function addInlineEdit(props, _ref) {
|
35
|
-
var _cell$column
|
35
|
+
var _cell$column;
|
36
36
|
var cell = _ref.cell,
|
37
37
|
instance = _ref.instance;
|
38
38
|
var columnInlineEditConfig = cell.column.inlineEdit;
|
39
|
-
var inlineEditType = (_cell$column = cell.column) === null || _cell$column === void 0
|
39
|
+
var inlineEditType = (_cell$column = cell.column) === null || _cell$column === void 0 || (_cell$column = _cell$column.inlineEdit) === null || _cell$column === void 0 ? void 0 : _cell$column.type;
|
40
40
|
var renderInlineEditComponent = function renderInlineEditComponent(type) {
|
41
41
|
return /*#__PURE__*/_react.default.createElement(_InlineEditCell.InlineEditCell, {
|
42
42
|
config: columnInlineEditConfig,
|
@@ -74,5 +74,4 @@ var useInlineEdit = function useInlineEdit(hooks, usingEditableCell) {
|
|
74
74
|
});
|
75
75
|
});
|
76
76
|
};
|
77
|
-
var _default = useInlineEdit;
|
78
|
-
exports.default = _default;
|
77
|
+
var _default = exports.default = useInlineEdit;
|
@@ -14,10 +14,15 @@ var _iconsReact = require("@carbon/icons-react");
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
15
15
|
var _settings = require("../../settings");
|
16
16
|
var _useFocusRowExpander = require("./useFocusRowExpander");
|
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; } /* eslint-disable react/prop-types */ /**
|
21
|
+
* Copyright IBM Corp. 2020, 2024
|
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, "--datagrid");
|
22
27
|
var useNestedRowExpander = function useNestedRowExpander(hooks) {
|
23
28
|
var tempState = (0, _react.useRef)();
|
@@ -35,7 +40,6 @@ var useNestedRowExpander = function useNestedRowExpander(hooks) {
|
|
35
40
|
var expanderColumn = {
|
36
41
|
id: 'expander',
|
37
42
|
Cell: function Cell(_ref) {
|
38
|
-
var _cx;
|
39
43
|
var row = _ref.row;
|
40
44
|
var expanderButtonProps = _objectSpread(_objectSpread({}, row.getToggleRowExpandedProps()), {}, {
|
41
45
|
onClick: function onClick(event) {
|
@@ -58,7 +62,7 @@ var useNestedRowExpander = function useNestedRowExpander(hooks) {
|
|
58
62
|
}, expanderButtonProps, {
|
59
63
|
title: expanderTitle
|
60
64
|
}), /*#__PURE__*/_react.default.createElement(_iconsReact.ChevronRight16, {
|
61
|
-
className: (0, _classnames.default)("".concat(blockClass, "__expander-icon"), "".concat(blockClass, "__row-expander--icon"), (
|
65
|
+
className: (0, _classnames.default)("".concat(blockClass, "__expander-icon"), "".concat(blockClass, "__row-expander--icon"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__expander-icon--not-open"), !row.isExpanded), "".concat(blockClass, "__expander-icon--open"), row.isExpanded))
|
62
66
|
}));
|
63
67
|
},
|
64
68
|
width: 48,
|
@@ -71,5 +75,4 @@ var useNestedRowExpander = function useNestedRowExpander(hooks) {
|
|
71
75
|
hooks.visibleColumns.push(visibleColumns);
|
72
76
|
hooks.useInstance.push(useInstance);
|
73
77
|
};
|
74
|
-
var _default = useNestedRowExpander;
|
75
|
-
exports.default = _default;
|
78
|
+
var _default = exports.default = useNestedRowExpander;
|
@@ -39,10 +39,9 @@ var useNestedRows = function useNestedRows(hooks) {
|
|
39
39
|
}, [instance]);
|
40
40
|
var marginLeft = 24;
|
41
41
|
var getRowProps = function getRowProps(props, _ref) {
|
42
|
-
var _cx;
|
43
42
|
var row = _ref.row;
|
44
43
|
return [props, {
|
45
|
-
className: (0, _classnames.default)((
|
44
|
+
className: (0, _classnames.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__carbon-nested-row"), row.depth > 0), "".concat(blockClass, "__carbon-row-expanded"), row.isExpanded))
|
46
45
|
}];
|
47
46
|
};
|
48
47
|
var getRowStyles = function getRowStyles(props, _ref2) {
|
@@ -75,5 +74,4 @@ var useNestedRows = function useNestedRows(hooks) {
|
|
75
74
|
};
|
76
75
|
hooks.useInstance.push(useInstance);
|
77
76
|
};
|
78
|
-
var _default = useNestedRows;
|
79
|
-
exports.default = _default;
|
77
|
+
var _default = exports.default = useNestedRows;
|