@carbon/ibm-products 1.73.0 → 1.73.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/index-full-carbon.css +34 -53
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -14
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +25 -40
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -12
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +27 -47
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -14
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +31 -51
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -14
- package/css/index.min.css.map +1 -1
- package/es/components/APIKeyModal/APIKeyDownloader.js +1 -1
- package/es/components/APIKeyModal/APIKeyModal.js +3 -3
- package/es/components/AboutModal/AboutModal.js +2 -2
- package/es/components/ActionBar/ActionBar.js +4 -4
- package/es/components/ActionBar/ActionBarItem.js +2 -2
- package/es/components/ActionSet/ActionSet.js +5 -6
- package/es/components/AddSelect/AddSelectBody.js +4 -4
- package/es/components/AddSelect/AddSelectColumn.js +5 -4
- package/es/components/AddSelect/AddSelectFilter.js +2 -2
- package/es/components/AddSelect/AddSelectList.js +2 -3
- package/es/components/AddSelect/AddSelectSidebar.js +1 -1
- package/es/components/AddSelect/add-select-utils.js +7 -6
- package/es/components/AddSelect/hooks/usePath.js +2 -2
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +4 -5
- package/es/components/ButtonMenu/ButtonMenu.js +0 -1
- package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +5 -5
- package/es/components/Card/Card.js +3 -4
- package/es/components/Card/CardHeader.js +1 -2
- package/es/components/Cascade/Cascade.js +2 -2
- package/es/components/Coachmark/Coachmark.js +1 -1
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +2 -3
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +1 -2
- package/es/components/CoachmarkStack/CoachmarkStackHome.js +1 -1
- package/es/components/ComboButton/ComboButton.js +2 -2
- package/es/components/CreateFullPage/CreateFullPageStep.js +3 -4
- package/es/components/CreateInfluencer/CreateInfluencer.js +0 -1
- package/es/components/CreateModal/CreateModal.js +1 -1
- package/es/components/CreateSidePanel/CreateSidePanel.js +2 -2
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +3 -4
- package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +1 -1
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +3 -5
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +7 -8
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +4 -5
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +2 -3
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +5 -5
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +4 -4
- package/es/components/DataSpreadsheet/utils/checkSelectedHeaderCell.js +4 -4
- package/es/components/DataSpreadsheet/utils/createActiveCellFn.js +1 -2
- package/es/components/DataSpreadsheet/utils/createCellSelectionArea.js +0 -1
- package/es/components/DataSpreadsheet/utils/generateData.js +2 -2
- package/es/components/DataSpreadsheet/utils/handleActiveCellInSelectionEnter.js +2 -2
- package/es/components/DataSpreadsheet/utils/handleCellDeletion.js +4 -4
- package/es/components/DataSpreadsheet/utils/handleEditSubmit.js +2 -4
- package/es/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +2 -2
- package/es/components/DataSpreadsheet/utils/handleMultipleKeys.js +2 -2
- package/es/components/DataSpreadsheet/utils/selectAllCells.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridContent.js +1 -2
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +4 -5
- package/es/components/Datagrid/Datagrid/DatagridRefBody.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridRow.js +15 -16
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +2 -3
- package/es/components/Datagrid/Datagrid/DraggableElement.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +3 -4
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +11 -11
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +11 -11
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +3 -3
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +5 -5
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +0 -2
- package/es/components/Datagrid/Datagrid/addons/stateReducer.js +5 -5
- package/es/components/Datagrid/Datagrid.stories/common.js +5 -5
- package/es/components/Datagrid/useActionsColumn.js +3 -5
- package/es/components/Datagrid/useColumnCenterAlign.js +2 -2
- package/es/components/Datagrid/useColumnRightAlign.js +2 -2
- package/es/components/Datagrid/useCustomizeColumns.js +2 -2
- package/es/components/Datagrid/useDatagrid.js +2 -2
- package/es/components/Datagrid/useDefaultStringRenderer.js +2 -2
- package/es/components/Datagrid/useDisableSelectRows.js +4 -4
- package/es/components/Datagrid/useExpandedRow.js +2 -2
- package/es/components/Datagrid/useFiltering.js +7 -8
- package/es/components/Datagrid/useFloatingScroll.js +1 -1
- package/es/components/Datagrid/useInitialColumnSort.js +1 -1
- package/es/components/Datagrid/useInlineEdit.js +2 -2
- package/es/components/Datagrid/useNestedRowExpander.js +3 -4
- package/es/components/Datagrid/useNestedRows.js +1 -2
- package/es/components/Datagrid/useRowExpander.js +2 -2
- package/es/components/Datagrid/useRowIsMouseOver.js +2 -2
- package/es/components/Datagrid/useRowRenderer.js +3 -3
- package/es/components/Datagrid/useRowSize.js +2 -2
- package/es/components/Datagrid/useSelectRows.js +4 -5
- package/es/components/Datagrid/useSortableColumns.js +3 -4
- package/es/components/Datagrid/useStickyColumn.js +5 -7
- package/es/components/Datagrid/utils/DatagridPagination.js +0 -1
- package/es/components/Datagrid/utils/filterPropsForTesting.js +2 -3
- package/es/components/Datagrid/utils/makeData.js +5 -5
- package/es/components/EditInPlace/EditInPlace.js +2 -2
- package/es/components/EditSidePanel/EditSidePanel.js +2 -2
- package/es/components/EditTearsheet/EditTearsheetForm.js +1 -2
- package/es/components/EmptyStates/EmptyState.js +2 -2
- package/es/components/EmptyStates/EmptyStateContent.js +2 -2
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +2 -2
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +2 -2
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +2 -2
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +2 -2
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +2 -2
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +2 -2
- package/es/components/ExampleComponent/ExampleComponent.js +2 -2
- package/es/components/ExportModal/ExportModal.js +5 -5
- package/es/components/FilterSummary/FilterSummary.js +3 -3
- package/es/components/HTTPErrors/HTTPErrorContent.js +2 -2
- package/es/components/ImportModal/ImportModal.js +3 -3
- package/es/components/InlineEdit/InlineEdit.js +2 -2
- package/es/components/InlineEditV1/InlineEditV1.js +5 -4
- package/es/components/InlineEditV2/InlineEditV2.js +3 -4
- package/es/components/InlineTip/utils.js +6 -5
- package/es/components/InterstitialScreen/InterstitialScreen.js +4 -5
- package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +0 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +2 -3
- package/es/components/PageHeader/PageHeader.js +11 -13
- package/es/components/PageHeader/PageHeaderUtils.js +2 -2
- package/es/components/ProductiveCard/ProductiveCard.js +2 -2
- package/es/components/RemoveModal/RemoveModal.js +2 -2
- package/es/components/Saving/Saving.js +6 -6
- package/es/components/SidePanel/SidePanel.js +17 -18
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +2 -2
- package/es/components/TagSet/TagSet.js +4 -4
- package/es/components/TagSet/TagSetModal.js +5 -5
- package/es/components/TagSet/TagSetOverflow.js +1 -2
- package/es/components/Tearsheet/Tearsheet.js +2 -2
- package/es/components/Tearsheet/TearsheetNarrow.js +2 -2
- package/es/components/Tearsheet/TearsheetShell.js +10 -11
- package/es/components/WebTerminal/WebTerminal.js +3 -4
- package/es/global/js/hooks/useCreateComponentFocus.js +1 -1
- package/es/global/js/hooks/useCreateComponentStepChange.js +3 -3
- package/es/global/js/hooks/useFocus.js +4 -4
- package/es/global/js/hooks/useWindowResize.js +2 -2
- package/es/global/js/package-settings.js +2 -3
- package/es/global/js/utils/Wrap.js +3 -3
- package/es/global/js/utils/deepCloneObject.js +4 -3
- package/es/global/js/utils/getNodeTextContent.js +6 -5
- package/es/global/js/utils/motionConstants.js +0 -1
- package/es/global/js/utils/props-helper.js +3 -3
- package/es/global/js/utils/scrollableAncestor.js +3 -3
- package/es/global/js/utils/story-helper.js +1 -1
- package/es/global/js/utils/test-helper.js +1 -1
- package/es/global/js/utils/unwrap-if-fragment.js +6 -6
- package/lib/components/APIKeyModal/APIKeyDownloader.js +4 -5
- package/lib/components/APIKeyModal/APIKeyModal.js +12 -8
- package/lib/components/AboutModal/AboutModal.js +14 -6
- package/lib/components/ActionBar/ActionBar.js +16 -9
- package/lib/components/ActionBar/ActionBarItem.js +12 -5
- package/lib/components/ActionBar/ActionBarOverflowItems.js +3 -4
- package/lib/components/ActionSet/ActionSet.js +15 -8
- package/lib/components/ActionSet/actions.js +4 -7
- package/lib/components/AddSelect/AddSelect.js +9 -5
- package/lib/components/AddSelect/AddSelectBody.js +13 -9
- package/lib/components/AddSelect/AddSelectBreadcrumbs.js +1 -2
- package/lib/components/AddSelect/AddSelectColumn.js +12 -8
- package/lib/components/AddSelect/AddSelectFilter.js +10 -6
- package/lib/components/AddSelect/AddSelectList.js +3 -5
- package/lib/components/AddSelect/AddSelectMetaPanel.js +3 -4
- package/lib/components/AddSelect/AddSelectSidebar.js +8 -4
- package/lib/components/AddSelect/AddSelectSort.js +1 -2
- package/lib/components/AddSelect/add-select-utils.js +10 -14
- package/lib/components/AddSelect/hooks/useItemSort.js +2 -3
- package/lib/components/AddSelect/hooks/useParentSelect.js +1 -2
- package/lib/components/AddSelect/hooks/usePath.js +8 -4
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +16 -10
- package/lib/components/ButtonMenu/ButtonMenu.js +10 -3
- package/lib/components/ButtonMenu/ButtonMenuItem.js +1 -2
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +13 -9
- package/lib/components/Card/Card.js +12 -9
- package/lib/components/Card/CardFooter.js +1 -2
- package/lib/components/Card/CardHeader.js +2 -4
- package/lib/components/Carousel/Carousel.js +9 -4
- package/lib/components/Carousel/CarouselItem.js +8 -2
- package/lib/components/Cascade/Cascade.js +11 -7
- package/lib/components/Checklist/Checklist.js +19 -4
- package/lib/components/Checklist/ChecklistChart.js +15 -2
- package/lib/components/Checklist/ChecklistIcon.js +17 -2
- package/lib/components/Coachmark/Coachmark.js +10 -5
- package/lib/components/Coachmark/CoachmarkDragbar.js +11 -4
- package/lib/components/Coachmark/CoachmarkHeader.js +9 -2
- package/lib/components/Coachmark/CoachmarkOverlay.js +11 -4
- package/lib/components/Coachmark/CoachmarkTagline.js +9 -2
- package/lib/components/Coachmark/utils/constants.js +2 -3
- package/lib/components/Coachmark/utils/context.js +3 -5
- package/lib/components/Coachmark/utils/enums.js +4 -7
- package/lib/components/Coachmark/utils/hooks.js +2 -3
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +11 -5
- package/lib/components/CoachmarkButton/CoachmarkButton.js +9 -2
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +12 -6
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +9 -2
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +11 -4
- package/lib/components/CoachmarkStack/CoachmarkStack.js +9 -4
- package/lib/components/CoachmarkStack/CoachmarkStackHome.js +10 -5
- package/lib/components/ComboButton/ComboButton.js +11 -6
- package/lib/components/ComboButton/ComboButtonItem/index.js +1 -2
- package/lib/components/CreateFullPage/CreateFullPage.js +14 -8
- package/lib/components/CreateFullPage/CreateFullPageStep.js +12 -8
- package/lib/components/CreateInfluencer/CreateInfluencer.js +1 -3
- package/lib/components/CreateModal/CreateModal.js +10 -3
- package/lib/components/CreateSidePanel/CreateSidePanel.js +12 -4
- package/lib/components/CreateTearsheet/CreateTearsheet.js +11 -8
- package/lib/components/CreateTearsheet/CreateTearsheetDivider.js +9 -4
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +12 -8
- package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +11 -5
- package/lib/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +4 -5
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +10 -3
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +14 -9
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +15 -12
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +12 -9
- package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.js +2 -3
- package/lib/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +2 -3
- package/lib/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +2 -3
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +4 -6
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +7 -8
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +11 -7
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +2 -3
- package/lib/components/DataSpreadsheet/utils/checkActiveHeaderCell.js +2 -3
- package/lib/components/DataSpreadsheet/utils/checkSelectedHeaderCell.js +6 -7
- package/lib/components/DataSpreadsheet/utils/createActiveCellFn.js +3 -5
- package/lib/components/DataSpreadsheet/utils/createCellSelectionArea.js +2 -4
- package/lib/components/DataSpreadsheet/utils/generateData.js +4 -5
- package/lib/components/DataSpreadsheet/utils/getCellSize.js +2 -3
- package/lib/components/DataSpreadsheet/utils/getSelectionAreaPoints.js +2 -3
- package/lib/components/DataSpreadsheet/utils/getSpreadsheetWidth.js +2 -3
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionEnter.js +9 -5
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionTab.js +2 -3
- package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +6 -7
- package/lib/components/DataSpreadsheet/utils/handleEditSubmit.js +9 -7
- package/lib/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +4 -5
- package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +11 -9
- package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +2 -3
- package/lib/components/DataSpreadsheet/utils/removeCellSelections.js +2 -3
- package/lib/components/DataSpreadsheet/utils/selectAllCells.js +9 -5
- package/lib/components/Datagrid/Datagrid/Datagrid.js +7 -2
- package/lib/components/Datagrid/Datagrid/DatagridBody.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +4 -6
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridHead.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +12 -9
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +9 -4
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +21 -18
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +11 -6
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +9 -4
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +9 -4
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +9 -4
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +10 -7
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +2 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +9 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +10 -6
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +8 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +9 -4
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/common.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +4 -6
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -8
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +12 -10
- package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +15 -30
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +19 -15
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useSubscribeToEventEmitter.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +4 -7
- package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +3 -5
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +19 -15
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +11 -8
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/getCellIdAsObject.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +10 -6
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridFocus.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +12 -8
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +3 -4
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +10 -5
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +3 -6
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +16 -16
- package/lib/components/Datagrid/Datagrid.stories/CustomizeColumnStory.js +2 -3
- package/lib/components/Datagrid/Datagrid.stories/RowSizeDropdownStory.js +2 -3
- package/lib/components/Datagrid/Datagrid.stories/SelectAllWithToggleStory.js +2 -3
- package/lib/components/Datagrid/Datagrid.stories/common.js +9 -12
- package/lib/components/Datagrid/common-column-ids.js +1 -2
- package/lib/components/Datagrid/useActionsColumn.js +10 -7
- package/lib/components/Datagrid/useColumnCenterAlign.js +8 -4
- package/lib/components/Datagrid/useColumnOrder.js +1 -2
- package/lib/components/Datagrid/useColumnRightAlign.js +8 -4
- package/lib/components/Datagrid/useCustomizeColumns.js +10 -6
- package/lib/components/Datagrid/useDatagrid.js +9 -4
- package/lib/components/Datagrid/useDefaultStringRenderer.js +9 -4
- package/lib/components/Datagrid/useDisableSelectRows.js +5 -6
- package/lib/components/Datagrid/useEditableCell.js +1 -2
- package/lib/components/Datagrid/useExpandedRow.js +8 -4
- package/lib/components/Datagrid/useFiltering.js +13 -10
- package/lib/components/Datagrid/useFlexResize.js +1 -2
- package/lib/components/Datagrid/useFloatingScroll.js +2 -3
- package/lib/components/Datagrid/useFocusRowExpander.js +2 -3
- package/lib/components/Datagrid/useInfiniteScroll.js +1 -2
- package/lib/components/Datagrid/useInitialColumnSort.js +3 -4
- package/lib/components/Datagrid/useInlineEdit.js +5 -6
- package/lib/components/Datagrid/useNestedRowExpander.js +11 -8
- package/lib/components/Datagrid/useNestedRows.js +2 -4
- package/lib/components/Datagrid/useOnRowClick.js +1 -2
- package/lib/components/Datagrid/useParentDimensions.js +1 -2
- package/lib/components/Datagrid/useResizeTable.js +1 -2
- package/lib/components/Datagrid/useRowExpander.js +10 -6
- package/lib/components/Datagrid/useRowIsMouseOver.js +9 -4
- package/lib/components/Datagrid/useRowRenderer.js +4 -5
- package/lib/components/Datagrid/useRowSize.js +9 -4
- package/lib/components/Datagrid/useSelectAllToggle.js +3 -4
- package/lib/components/Datagrid/useSelectRows.js +12 -9
- package/lib/components/Datagrid/useSkeletonRows.js +1 -2
- package/lib/components/Datagrid/useSortableColumns.js +10 -8
- package/lib/components/Datagrid/useStickyColumn.js +11 -9
- package/lib/components/Datagrid/utils/DatagridActions.js +4 -5
- package/lib/components/Datagrid/utils/DatagridPagination.js +2 -4
- package/lib/components/Datagrid/utils/Wrapper.js +2 -3
- package/lib/components/Datagrid/utils/filterPropsForTesting.js +5 -8
- package/lib/components/Datagrid/utils/getArgTypes.js +2 -3
- package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.js +2 -3
- package/lib/components/Datagrid/utils/getInlineEditColumns.js +3 -5
- package/lib/components/Datagrid/utils/handleFilterTagLabelText.js +2 -3
- package/lib/components/Datagrid/utils/makeData.js +13 -11
- package/lib/components/EditFullPage/EditFullPage.js +9 -2
- package/lib/components/EditInPlace/EditInPlace.js +11 -6
- package/lib/components/EditSidePanel/EditSidePanel.js +12 -4
- package/lib/components/EditTearsheet/EditTearsheet.js +11 -8
- package/lib/components/EditTearsheet/EditTearsheetForm.js +10 -6
- package/lib/components/EditTearsheet/preview-components/MultiFormEditTearsheet.js +4 -5
- package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +9 -2
- package/lib/components/EditUpdateCards/EditUpdateCards.js +9 -2
- package/lib/components/EmptyStates/EmptyState.js +12 -6
- package/lib/components/EmptyStates/EmptyStateContent.js +10 -4
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +11 -4
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +11 -4
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +11 -4
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +11 -4
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +11 -4
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +11 -4
- package/lib/components/EmptyStates/assets/ErrorIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +9 -2
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +9 -2
- package/lib/components/ExampleComponent/ExampleComponent.js +14 -6
- package/lib/components/ExampleComponent/useExample.js +1 -2
- package/lib/components/ExportModal/ExportModal.js +14 -10
- package/lib/components/ExpressiveCard/ExpressiveCard.js +3 -4
- package/lib/components/FilterSummary/FilterSummary.js +12 -7
- package/lib/components/Guidebanner/Guidebanner.js +11 -4
- package/lib/components/Guidebanner/GuidebannerElement.js +9 -2
- package/lib/components/Guidebanner/GuidebannerElementButton.js +9 -2
- package/lib/components/Guidebanner/GuidebannerElementLink.js +9 -2
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +9 -2
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +9 -2
- package/lib/components/HTTPErrors/HTTPErrorContent.js +10 -4
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +9 -2
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +1 -2
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +1 -2
- package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +1 -2
- package/lib/components/ImportModal/ImportModal.js +12 -8
- package/lib/components/InlineEdit/InlineEdit.js +11 -6
- package/lib/components/InlineEditV1/InlineEditV1.js +18 -8
- package/lib/components/InlineEditV2/InlineEditV2.js +13 -10
- package/lib/components/InlineTip/InlineTip.js +11 -4
- package/lib/components/InlineTip/InlineTipButton.js +9 -2
- package/lib/components/InlineTip/InlineTipLink.js +9 -2
- package/lib/components/InlineTip/utils.js +5 -6
- package/lib/components/InterstitialScreen/InterstitialScreen.js +15 -9
- package/lib/components/InterstitialScreen/assets/index.js +4 -8
- package/lib/components/InterstitialScreenView/InterstitialScreenView.js +9 -2
- package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +9 -3
- package/lib/components/ModifiedTabs/ModifiedTabLabelNew.js +1 -2
- package/lib/components/ModifiedTabs/ModifiedTabLabelWithClose.js +1 -2
- package/lib/components/ModifiedTabs/ModifiedTabs.js +3 -4
- package/lib/components/MultiAddSelect/MultiAddSelect.js +3 -4
- package/lib/components/NonLinearReading/NonLinearReading.js +9 -4
- package/lib/components/NotificationsPanel/NotificationsPanel.js +14 -7
- package/lib/components/NotificationsPanel/NotificationsPanel_data.js +1 -2
- package/lib/components/NotificationsPanel/preview-components/UnreadNotificationBell.js +2 -3
- package/lib/components/NotificationsPanel/utils.js +1 -2
- package/lib/components/OptionsTile/OptionsTile.js +12 -4
- package/lib/components/PageHeader/PageHeader.js +21 -20
- package/lib/components/PageHeader/PageHeaderDemo.data.js +3 -4
- package/lib/components/PageHeader/PageHeaderTitle.js +2 -4
- package/lib/components/PageHeader/PageHeaderUtils.js +12 -11
- package/lib/components/ProductiveCard/ProductiveCard.js +11 -7
- package/lib/components/RemoveModal/RemoveModal.js +11 -7
- package/lib/components/Saving/Saving.js +15 -10
- package/lib/components/SidePanel/SidePanel.js +29 -22
- package/lib/components/SidePanel/constants.js +2 -3
- package/lib/components/SidePanel/motion/variants.js +3 -5
- package/lib/components/SingleAddSelect/SingleAddSelect.js +3 -4
- package/lib/components/StatusIcon/StatusIcon.js +7 -2
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +13 -6
- package/lib/components/SteppedAnimatedMedia/assets/index.js +3 -6
- package/lib/components/TagSet/TagSet.js +15 -13
- package/lib/components/TagSet/TagSetModal.js +14 -10
- package/lib/components/TagSet/TagSetOverflow.js +10 -7
- package/lib/components/Tearsheet/Tearsheet.js +13 -6
- package/lib/components/Tearsheet/TearsheetNarrow.js +13 -6
- package/lib/components/Tearsheet/TearsheetShell.js +26 -23
- package/lib/components/Toolbar/Toolbar.js +12 -10
- package/lib/components/Toolbar/ToolbarButton.js +10 -6
- package/lib/components/Toolbar/ToolbarGroup.js +9 -4
- package/lib/components/UserProfileImage/UserProfileImage.js +10 -2
- package/lib/components/WebTerminal/WebTerminal.js +15 -8
- package/lib/components/WebTerminal/WebTerminalContentWrapper.js +9 -2
- package/lib/components/WebTerminal/hooks/index.js +6 -9
- package/lib/components/WebTerminal/preview-components/Navigation.js +1 -2
- package/lib/components/WebTerminal/preview-components/documentationLinks.js +2 -3
- package/lib/components/_Canary/Canary.js +11 -2
- package/lib/global/js/hooks/useActiveElement.js +2 -3
- package/lib/global/js/hooks/useClickOutside.js +2 -3
- package/lib/global/js/hooks/useCreateComponentFocus.js +3 -4
- package/lib/global/js/hooks/useCreateComponentStepChange.js +5 -6
- package/lib/global/js/hooks/useFocus.js +6 -7
- package/lib/global/js/hooks/useIsomorphicEffect.js +1 -2
- package/lib/global/js/hooks/usePrefix.js +2 -3
- package/lib/global/js/hooks/usePreviousValue.js +2 -3
- package/lib/global/js/hooks/useResetCreateComponent.js +2 -3
- package/lib/global/js/hooks/useResizeObserver.js +2 -3
- package/lib/global/js/hooks/useRetrieveStepData.js +2 -3
- package/lib/global/js/hooks/useValidCreateStepCount.js +2 -3
- package/lib/global/js/hooks/useWindowResize.js +4 -5
- package/lib/global/js/package-settings.js +9 -6
- package/lib/global/js/utils/ClickListener.js +3 -4
- package/lib/global/js/utils/DisplayBox.js +1 -2
- package/lib/global/js/utils/Wrap.js +12 -5
- package/lib/global/js/utils/deepCloneObject.js +3 -4
- package/lib/global/js/utils/devtools.js +1 -2
- package/lib/global/js/utils/getBezierValues.js +2 -3
- package/lib/global/js/utils/getFocusableElements.js +2 -3
- package/lib/global/js/utils/getNodeTextContent.js +5 -6
- package/lib/global/js/utils/getNumberOfHiddenSteps.js +2 -3
- package/lib/global/js/utils/getScrollbarWidth.js +2 -3
- package/lib/global/js/utils/keyboardNavigation.js +4 -8
- package/lib/global/js/utils/lastIndexInArray.js +2 -3
- package/lib/global/js/utils/motionConstants.js +3 -5
- package/lib/global/js/utils/pconsole.js +8 -15
- package/lib/global/js/utils/props-helper.js +15 -17
- package/lib/global/js/utils/rangeWithCallback.js +2 -3
- package/lib/global/js/utils/scrollableAncestor.js +5 -6
- package/lib/global/js/utils/story-helper.js +7 -12
- package/lib/global/js/utils/test-helper.js +15 -28
- package/lib/global/js/utils/unwrap-if-fragment.js +7 -8
- package/lib/global/js/utils/uuidv4.js +1 -2
- package/lib/global/js/utils/wait.js +1 -2
- package/lib/global/js/utils/wrapFocus.js +1 -2
- package/lib/settings.js +2 -4
- package/package.json +4 -4
- package/scss/components/AboutModal/_about-modal.scss +1 -2
- package/scss/components/Coachmark/styles/_coachmark-tagline.scss +1 -4
- package/scss/components/Datagrid/styles/_datagrid.scss +1 -2
- package/scss/components/Datagrid/styles/_useStickyColumn.scss +1 -0
- package/scss/components/SidePanel/_side-panel.scss +1 -4
@@ -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, 2023
|
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 useRowExpander = function useRowExpander(hooks) {
|
23
28
|
var tempState = (0, _react.useRef)();
|
@@ -72,5 +77,4 @@ var useRowExpander = function useRowExpander(hooks) {
|
|
72
77
|
hooks.visibleColumns.push(visibleColumns);
|
73
78
|
hooks.useInstance.push(useInstance);
|
74
79
|
};
|
75
|
-
var _default = useRowExpander;
|
76
|
-
exports.default = _default;
|
80
|
+
var _default = exports.default = useRowExpander;
|
@@ -9,8 +9,14 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
10
10
|
var _react = require("react");
|
11
11
|
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
12
|
-
function ownKeys(
|
13
|
-
function _objectSpread(
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /*
|
14
|
+
* Licensed Materials - Property of IBM
|
15
|
+
* 5724-Q36
|
16
|
+
* (c) Copyright IBM Corp. 2020
|
17
|
+
* US Government Users Restricted Rights - Use, duplication or disclosure
|
18
|
+
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
19
|
+
*/
|
14
20
|
var useRowIsMouseOver = function useRowIsMouseOver(hooks) {
|
15
21
|
var useInstance = function useInstance(instance) {
|
16
22
|
var _useState = (0, _react.useState)(),
|
@@ -50,5 +56,4 @@ var useDebounce = function useDebounce(fn, wait) {
|
|
50
56
|
(0, _react.useCallback)((0, _debounce.default)(fn, wait), [])
|
51
57
|
);
|
52
58
|
};
|
53
|
-
var _default = useRowIsMouseOver;
|
54
|
-
exports.default = _default;
|
59
|
+
var _default = exports.default = useRowIsMouseOver;
|
@@ -17,18 +17,17 @@ var _DatagridRow = _interopRequireDefault(require("./Datagrid/DatagridRow"));
|
|
17
17
|
var useRowRenderer = function useRowRenderer(hooks) {
|
18
18
|
var useInstance = function useInstance(instance) {
|
19
19
|
var rows = instance.rows;
|
20
|
-
var
|
20
|
+
var _addRowRenderer = function addRowRenderer(row) {
|
21
21
|
return Object.assign(row, {
|
22
22
|
RowRenderer: _DatagridRow.default,
|
23
|
-
subRows: (row.subRows || []).map(
|
23
|
+
subRows: (row.subRows || []).map(_addRowRenderer)
|
24
24
|
});
|
25
25
|
};
|
26
|
-
var rowsWithRenderer = rows.map(
|
26
|
+
var rowsWithRenderer = rows.map(_addRowRenderer);
|
27
27
|
Object.assign(instance, {
|
28
28
|
rows: rowsWithRenderer
|
29
29
|
});
|
30
30
|
};
|
31
31
|
hooks.useInstance.push(useInstance);
|
32
32
|
};
|
33
|
-
var _default = useRowRenderer;
|
34
|
-
exports.default = _default;
|
33
|
+
var _default = exports.default = useRowRenderer;
|
@@ -9,8 +9,14 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
10
10
|
var _react = require("react");
|
11
11
|
var _RowSize = require("./Datagrid/addons/RowSize");
|
12
|
-
function ownKeys(
|
13
|
-
function _objectSpread(
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /*
|
14
|
+
* Licensed Materials - Property of IBM
|
15
|
+
* 5724-Q36
|
16
|
+
* (c) Copyright IBM Corp. 2020, 2021
|
17
|
+
* US Government Users Restricted Rights - Use, duplication or disclosure
|
18
|
+
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
19
|
+
*/
|
14
20
|
var useRowSize = function useRowSize(hooks) {
|
15
21
|
var _useState = (0, _react.useState)(''),
|
16
22
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
@@ -51,5 +57,4 @@ var useRowSize = function useRowSize(hooks) {
|
|
51
57
|
};
|
52
58
|
hooks.getTableProps.push(getTableProps);
|
53
59
|
};
|
54
|
-
var _default = useRowSize;
|
55
|
-
exports.default = _default;
|
60
|
+
var _default = exports.default = useRowSize;
|
@@ -14,8 +14,8 @@ var _commonColumnIds = require("./common-column-ids");
|
|
14
14
|
var _DatagridSelectAllWithToggle = _interopRequireDefault(require("./Datagrid/DatagridSelectAllWithToggle"));
|
15
15
|
var _settings = require("../../settings");
|
16
16
|
var _hooks = require("../../global/js/hooks");
|
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
|
/**
|
20
20
|
* Copyright IBM Corp. 2021, 2024
|
21
21
|
*
|
@@ -98,5 +98,4 @@ var Header = function Header(gridState) {
|
|
98
98
|
};
|
99
99
|
return /*#__PURE__*/_react.default.createElement(_DatagridSelectAllWithToggle.default, props);
|
100
100
|
};
|
101
|
-
var _default = useSelectAllToggle;
|
102
|
-
exports.default = _default;
|
101
|
+
var _default = exports.default = useSelectAllToggle;
|
@@ -19,10 +19,15 @@ var _commonColumnIds = require("./common-column-ids");
|
|
19
19
|
var _settings = require("../../settings");
|
20
20
|
var _stateReducer = require("./Datagrid/addons/stateReducer");
|
21
21
|
var _excluded = ["onChange", "title"];
|
22
|
-
function _getRequireWildcardCache(
|
23
|
-
function _interopRequireWildcard(
|
24
|
-
function ownKeys(
|
25
|
-
function _objectSpread(
|
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; }
|
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; } /**
|
26
|
+
* Copyright IBM Corp. 2020, 2024
|
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
|
+
*/
|
26
31
|
var blockClass = "".concat(_settings.pkg.prefix, "--datagrid");
|
27
32
|
var checkboxClass = "".concat(blockClass, "__checkbox-cell");
|
28
33
|
var useSelectRows = function useSelectRows(hooks) {
|
@@ -65,12 +70,11 @@ var useSelectRows = function useSelectRows(hooks) {
|
|
65
70
|
};
|
66
71
|
var useHighlightSelection = function useHighlightSelection(hooks) {
|
67
72
|
var getRowProps = function getRowProps(props, _ref) {
|
68
|
-
var _ref2;
|
69
73
|
var row = _ref.row;
|
70
74
|
var _row$getToggleRowSele = row.getToggleRowSelectedProps(),
|
71
75
|
checked = _row$getToggleRowSele.checked;
|
72
76
|
return [props, {
|
73
|
-
className: (0, _classnames.default)(["".concat(blockClass, "__carbon-row"), (
|
77
|
+
className: (0, _classnames.default)(["".concat(blockClass, "__carbon-row"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(_settings.carbon.prefix, "--data-table--selected"), checked), "".concat(blockClass, "__active-row"), checked)])
|
74
78
|
}];
|
75
79
|
};
|
76
80
|
hooks.getRowProps.push(getRowProps);
|
@@ -119,7 +123,7 @@ var SelectRow = function SelectRow(datagridState) {
|
|
119
123
|
}
|
120
124
|
}
|
121
125
|
onChange(event);
|
122
|
-
onRowSelect === null || onRowSelect === void 0
|
126
|
+
onRowSelect === null || onRowSelect === void 0 || onRowSelect(row, event);
|
123
127
|
(0, _stateReducer.handleToggleRowSelected)({
|
124
128
|
dispatch: dispatch,
|
125
129
|
rowData: row,
|
@@ -139,5 +143,4 @@ var SelectRow = function SelectRow(datagridState) {
|
|
139
143
|
disabled: selectDisabled
|
140
144
|
}));
|
141
145
|
};
|
142
|
-
var _default = useSelectRows;
|
143
|
-
exports.default = _default;
|
146
|
+
var _default = exports.default = useSelectRows;
|
@@ -13,15 +13,20 @@ var _settings = require("../../settings");
|
|
13
13
|
var _carbonComponentsReact = require("carbon-components-react");
|
14
14
|
var _iconsReact = require("@carbon/icons-react");
|
15
15
|
var _DatagridSelectAll = require("./Datagrid/DatagridSelectAll");
|
16
|
-
function ownKeys(
|
17
|
-
function _objectSpread(
|
16
|
+
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; }
|
17
|
+
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; } /**
|
18
|
+
* Copyright IBM Corp. 2020, 2023
|
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
|
+
*/
|
18
23
|
var blockClass = "".concat(_settings.pkg.prefix, "--datagrid");
|
19
24
|
var ordering = {
|
20
25
|
ASC: 'ASC',
|
21
26
|
DESC: 'DESC',
|
22
27
|
NONE: 'NONE'
|
23
28
|
};
|
24
|
-
var getNewSortOrder = function getNewSortOrder(sortOrder) {
|
29
|
+
var getNewSortOrder = exports.getNewSortOrder = function getNewSortOrder(sortOrder) {
|
25
30
|
var order = {
|
26
31
|
newSortDesc: undefined,
|
27
32
|
newOrder: ordering.NONE
|
@@ -36,7 +41,6 @@ var getNewSortOrder = function getNewSortOrder(sortOrder) {
|
|
36
41
|
}
|
37
42
|
return order;
|
38
43
|
};
|
39
|
-
exports.getNewSortOrder = getNewSortOrder;
|
40
44
|
var getAriaSortValue = function getAriaSortValue(col, _ref) {
|
41
45
|
var ascendingSortableLabelText = _ref.ascendingSortableLabelText,
|
42
46
|
descendingSortableLabelText = _ref.descendingSortableLabelText,
|
@@ -106,7 +110,6 @@ var useSortableColumns = function useSortableColumns(hooks) {
|
|
106
110
|
};
|
107
111
|
};
|
108
112
|
var Header = function Header(headerProp) {
|
109
|
-
var _cx;
|
110
113
|
return column.disableSortBy === true || column.id === 'datagridSelection' || column.isAction ? column.disableSortBy || column.isAction ? column.Header : /*#__PURE__*/_react.default.createElement(_DatagridSelectAll.SelectAll, instance) : /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.Button, {
|
111
114
|
"aria-sort": getAriaSortValue(headerProp === null || headerProp === void 0 ? void 0 : headerProp.column, {
|
112
115
|
ascendingSortableLabelText: ascendingSortableLabelText,
|
@@ -118,7 +121,7 @@ var useSortableColumns = function useSortableColumns(hooks) {
|
|
118
121
|
},
|
119
122
|
kind: "ghost",
|
120
123
|
renderIcon: icon(headerProp === null || headerProp === void 0 ? void 0 : headerProp.column),
|
121
|
-
className: (0, _classnames.default)("".concat(_settings.carbon.prefix, "--table-sort ").concat(blockClass, "--table-sort"), (
|
124
|
+
className: (0, _classnames.default)("".concat(_settings.carbon.prefix, "--table-sort ").concat(blockClass, "--table-sort"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "--table-sort--desc"), headerProp === null || headerProp === void 0 ? void 0 : headerProp.column.isSortedDesc), "".concat(blockClass, "--table-sort--asc"), (headerProp === null || headerProp === void 0 ? void 0 : headerProp.column.isSortedDesc) === false))
|
122
125
|
}, column.Header);
|
123
126
|
};
|
124
127
|
return _objectSpread(_objectSpread({}, column), {}, {
|
@@ -138,5 +141,4 @@ var useSortableColumns = function useSortableColumns(hooks) {
|
|
138
141
|
hooks.visibleColumns.push(sortableVisibleColumns);
|
139
142
|
hooks.useInstance.push(sortInstanceProps);
|
140
143
|
};
|
141
|
-
var _default = useSortableColumns;
|
142
|
-
exports.default = _default;
|
144
|
+
var _default = exports.default = useSortableColumns;
|
@@ -11,8 +11,13 @@ var _react = require("react");
|
|
11
11
|
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
13
13
|
var _settings = require("../../settings");
|
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. 2021, 2023
|
17
|
+
*
|
18
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
20
|
+
*/
|
16
21
|
var blockClass = "".concat(_settings.pkg.prefix, "--datagrid");
|
17
22
|
var styleClassPrefix = "".concat(blockClass, "__right-sticky-column");
|
18
23
|
var leftStickyStyleClassPrefix = "".concat(blockClass, "__left-sticky-column");
|
@@ -48,7 +53,6 @@ var useStickyColumn = function useStickyColumn(hooks) {
|
|
48
53
|
})
|
49
54
|
}];
|
50
55
|
});
|
51
|
-
|
52
56
|
var useEventListener = function useEventListener(instance) {
|
53
57
|
(0, _react.useEffect)(function () {
|
54
58
|
var tableBodyElement = tableBodyRef.current;
|
@@ -143,17 +147,16 @@ var addTableBodyProps = function addTableBodyProps(tableBodyRef, props) {
|
|
143
147
|
var changeProps = function changeProps(elementName, headerCellRef, windowSize, props, data) {
|
144
148
|
var column = data.column || data.cell.column;
|
145
149
|
if (column.sticky === 'right') {
|
146
|
-
var _cx;
|
147
150
|
return [props, _objectSpread({
|
148
|
-
className: (0, _classnames.default)((
|
151
|
+
className: (0, _classnames.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(styleClassPrefix, "-").concat(elementName), true), "".concat(blockClass, "__resizableColumn"), false), "".concat(blockClass, "__sortableColumn"), false))
|
149
152
|
}, headerCellRef && {
|
150
153
|
ref: headerCellRef
|
151
154
|
})];
|
152
155
|
}
|
153
156
|
if (column.sticky === 'left') {
|
154
|
-
var _data$instance
|
157
|
+
var _data$instance;
|
155
158
|
return [props, _objectSpread({
|
156
|
-
className: (0, _classnames.default)((
|
159
|
+
className: (0, _classnames.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(leftStickyStyleClassPrefix, "-").concat(elementName), true && windowSize > 671), "".concat(leftStickyStyleClassPrefix, "-").concat(elementName, "--with-extra-select-column"), (data === null || data === void 0 || (_data$instance = data.instance) === null || _data$instance === void 0 ? void 0 : _data$instance.withSelectRows) && windowSize > 671))
|
157
160
|
}, headerCellRef && {
|
158
161
|
ref: headerCellRef
|
159
162
|
})];
|
@@ -193,5 +196,4 @@ var hasVertScroll = function hasVertScroll(element) {
|
|
193
196
|
clientHeight = element.clientHeight;
|
194
197
|
return scrollHeight > clientHeight;
|
195
198
|
};
|
196
|
-
var _default = useStickyColumn;
|
197
|
-
exports.default = _default;
|
199
|
+
var _default = exports.default = useStickyColumn;
|
@@ -14,8 +14,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _addonActions = require("@storybook/addon-actions");
|
15
15
|
var _settings = require("../../../settings");
|
16
16
|
var _hooks = require("../Datagrid/addons/Filtering/hooks");
|
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
|
/**
|
20
20
|
* Copyright IBM Corp. 2020, 2022
|
21
21
|
*
|
@@ -24,7 +24,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
24
24
|
*/
|
25
25
|
|
26
26
|
var blockClass = "".concat(_settings.pkg.prefix, "--datagrid");
|
27
|
-
var DatagridActions = function DatagridActions(datagridState) {
|
27
|
+
var DatagridActions = exports.DatagridActions = function DatagridActions(datagridState) {
|
28
28
|
var _useFilterContext = (0, _hooks.useFilterContext)(),
|
29
29
|
setPanelOpen = _useFilterContext.setPanelOpen;
|
30
30
|
var selectedFlatRows = datagridState.selectedFlatRows,
|
@@ -248,5 +248,4 @@ var DatagridActions = function DatagridActions(datagridState) {
|
|
248
248
|
primaryButtonText: "Apply",
|
249
249
|
secondaryButtonText: "Cancel"
|
250
250
|
}))));
|
251
|
-
};
|
252
|
-
exports.DatagridActions = DatagridActions;
|
251
|
+
};
|
@@ -15,7 +15,7 @@ var _carbonComponentsReact = require("carbon-components-react");
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
16
16
|
*/
|
17
17
|
|
18
|
-
var DatagridPagination = function DatagridPagination(_ref) {
|
18
|
+
var DatagridPagination = exports.DatagridPagination = function DatagridPagination(_ref) {
|
19
19
|
var state = _ref.state,
|
20
20
|
setPageSize = _ref.setPageSize,
|
21
21
|
gotoPage = _ref.gotoPage,
|
@@ -27,7 +27,6 @@ var DatagridPagination = function DatagridPagination(_ref) {
|
|
27
27
|
setPageSize(pageSize);
|
28
28
|
gotoPage(page - 1); // Carbon is non-zero-based
|
29
29
|
};
|
30
|
-
|
31
30
|
return /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.Pagination, {
|
32
31
|
page: state.pageIndex + 1 // react-table is zero-based
|
33
32
|
,
|
@@ -36,5 +35,4 @@ var DatagridPagination = function DatagridPagination(_ref) {
|
|
36
35
|
totalItems: rows.length,
|
37
36
|
onChange: updatePagination
|
38
37
|
});
|
39
|
-
};
|
40
|
-
exports.DatagridPagination = DatagridPagination;
|
38
|
+
};
|
@@ -14,7 +14,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
15
15
|
*/
|
16
16
|
|
17
|
-
var Wrapper = function Wrapper(_ref) {
|
17
|
+
var Wrapper = exports.Wrapper = function Wrapper(_ref) {
|
18
18
|
var children = _ref.children;
|
19
19
|
return /*#__PURE__*/_react.default.createElement("div", {
|
20
20
|
style: {
|
@@ -25,5 +25,4 @@ var Wrapper = function Wrapper(_ref) {
|
|
25
25
|
zIndex: '0'
|
26
26
|
}
|
27
27
|
}, children);
|
28
|
-
};
|
29
|
-
exports.Wrapper = Wrapper;
|
28
|
+
};
|
@@ -15,7 +15,7 @@ var _handleFilterTagLabelText = require("./handleFilterTagLabelText");
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
16
16
|
*/
|
17
17
|
|
18
|
-
var generateDummyCheckboxes = Array(25).fill(null).map(function (_, index) {
|
18
|
+
var generateDummyCheckboxes = exports.generateDummyCheckboxes = Array(25).fill(null).map(function (_, index) {
|
19
19
|
return {
|
20
20
|
id: "".concat(index),
|
21
21
|
labelText: "Dummy checkbox ".concat(index + 1),
|
@@ -23,9 +23,7 @@ var generateDummyCheckboxes = Array(25).fill(null).map(function (_, index) {
|
|
23
23
|
disabled: true
|
24
24
|
};
|
25
25
|
});
|
26
|
-
exports.
|
27
|
-
var filterProps = function filterProps() {
|
28
|
-
var _Dropdown;
|
26
|
+
var filterProps = exports.filterProps = function filterProps() {
|
29
27
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
30
28
|
_ref$includeManyCheck = _ref.includeManyCheckboxes,
|
31
29
|
includeManyCheckboxes = _ref$includeManyCheck === void 0 ? false : _ref$includeManyCheck,
|
@@ -80,9 +78,9 @@ var filterProps = function filterProps() {
|
|
80
78
|
type: 'dropdown',
|
81
79
|
column: 'status',
|
82
80
|
props: {
|
83
|
-
Dropdown: (
|
81
|
+
Dropdown: (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
84
82
|
id: 'marital-status-dropdown'
|
85
|
-
},
|
83
|
+
}, 'aria-label', 'Marital status dropdown'), "items", ['relationship', 'complicated', 'single']), "label", 'Marital status'), "titleText", 'Marital status'), "onChange", dropdownOnChange)
|
86
84
|
}
|
87
85
|
}
|
88
86
|
}]
|
@@ -155,5 +153,4 @@ var filterProps = function filterProps() {
|
|
155
153
|
return "".concat(startDateObj.toLocaleDateString(), " - ").concat(endDateObj.toLocaleDateString());
|
156
154
|
}
|
157
155
|
};
|
158
|
-
};
|
159
|
-
exports.filterProps = filterProps;
|
156
|
+
};
|
@@ -11,7 +11,7 @@ exports.ARG_TYPES = void 0;
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
12
12
|
*/
|
13
13
|
|
14
|
-
var ARG_TYPES = {
|
14
|
+
var ARG_TYPES = exports.ARG_TYPES = {
|
15
15
|
gridTitle: {
|
16
16
|
name: 'gridTitle',
|
17
17
|
control: 'text',
|
@@ -123,5 +123,4 @@ var ARG_TYPES = {
|
|
123
123
|
options: ['flex-start', 'space-between'],
|
124
124
|
description: 'This sets the alignment of content inside expanded row.'
|
125
125
|
}
|
126
|
-
};
|
127
|
-
exports.ARG_TYPES = ARG_TYPES;
|
126
|
+
};
|
@@ -20,7 +20,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
20
20
|
* @param {string} headerText - The header text for the column
|
21
21
|
*/
|
22
22
|
|
23
|
-
var getAutoSizedColumnWidth = function getAutoSizedColumnWidth(rows, accessor, headerText) {
|
23
|
+
var getAutoSizedColumnWidth = exports.getAutoSizedColumnWidth = function getAutoSizedColumnWidth(rows, accessor, headerText) {
|
24
24
|
var maxWidth = 400;
|
25
25
|
var minWidth = 58;
|
26
26
|
var letterSpacing = 10;
|
@@ -31,5 +31,4 @@ var getAutoSizedColumnWidth = function getAutoSizedColumnWidth(rows, accessor, h
|
|
31
31
|
return minWidth;
|
32
32
|
}
|
33
33
|
return Math.min(maxWidth, cellLength * letterSpacing + 16);
|
34
|
-
};
|
35
|
-
exports.getAutoSizedColumnWidth = getAutoSizedColumnWidth;
|
34
|
+
};
|
@@ -12,7 +12,7 @@ var _iconsReact = require("@carbon/icons-react");
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
13
13
|
*/
|
14
14
|
|
15
|
-
var inlineEditSelectItems = [{
|
15
|
+
var inlineEditSelectItems = exports.inlineEditSelectItems = [{
|
16
16
|
id: 'option-0',
|
17
17
|
icon: _iconsReact.ChartColumnFloating16,
|
18
18
|
text: 'Column Chart'
|
@@ -25,8 +25,7 @@ var inlineEditSelectItems = [{
|
|
25
25
|
icon: _iconsReact.ChartVennDiagram16,
|
26
26
|
text: 'Venn Diagram'
|
27
27
|
}];
|
28
|
-
exports.
|
29
|
-
var getInlineEditColumns = function getInlineEditColumns() {
|
28
|
+
var getInlineEditColumns = exports.getInlineEditColumns = function getInlineEditColumns() {
|
30
29
|
return [{
|
31
30
|
Header: 'Row Index',
|
32
31
|
accessor: function accessor(row, i) {
|
@@ -148,5 +147,4 @@ var getInlineEditColumns = function getInlineEditColumns() {
|
|
148
147
|
Header: 'Someone 10',
|
149
148
|
accessor: 'someone10'
|
150
149
|
}];
|
151
|
-
};
|
152
|
-
exports.getInlineEditColumns = getInlineEditColumns;
|
150
|
+
};
|
@@ -14,7 +14,7 @@ exports.handleFilterTagLabelText = void 0;
|
|
14
14
|
// Example usage for custom filter tag labels, in practice this
|
15
15
|
// is where a translation service would be utilized. This
|
16
16
|
// utility is for storybook demonstration purposes only.
|
17
|
-
var handleFilterTagLabelText = function handleFilterTagLabelText(key, value) {
|
17
|
+
var handleFilterTagLabelText = exports.handleFilterTagLabelText = function handleFilterTagLabelText(key, value) {
|
18
18
|
switch (key) {
|
19
19
|
case 'role':
|
20
20
|
return "Role: ".concat(value);
|
@@ -29,5 +29,4 @@ var handleFilterTagLabelText = function handleFilterTagLabelText(key, value) {
|
|
29
29
|
default:
|
30
30
|
return "".concat(key, ": ").concat(value);
|
31
31
|
}
|
32
|
-
};
|
33
|
-
exports.handleFilterTagLabelText = handleFilterTagLabelText;
|
32
|
+
};
|
@@ -9,8 +9,13 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
10
10
|
var _namor = _interopRequireDefault(require("namor"));
|
11
11
|
var _getInlineEditColumns = require("./getInlineEditColumns");
|
12
|
-
function ownKeys(
|
13
|
-
function _objectSpread(
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
|
14
|
+
* Copyright IBM Corp. 2022, 2022
|
15
|
+
*
|
16
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
18
|
+
*/
|
14
19
|
var getRandomInteger = function getRandomInteger(min, max, decimalPlaces) {
|
15
20
|
var roundedMin = Math.ceil(min);
|
16
21
|
var roundedMax = Math.floor(max);
|
@@ -21,23 +26,22 @@ var getRandomInteger = function getRandomInteger(min, max, decimalPlaces) {
|
|
21
26
|
var power = Math.pow(10, decimalPlaces);
|
22
27
|
return Math.floor(randomNumber * power) / power;
|
23
28
|
};
|
24
|
-
var makeData = function makeData() {
|
29
|
+
var makeData = exports.makeData = function makeData() {
|
25
30
|
for (var _len = arguments.length, lens = new Array(_len), _key = 0; _key < _len; _key++) {
|
26
31
|
lens[_key] = arguments[_key];
|
27
32
|
}
|
28
|
-
var
|
33
|
+
var _makeDataLevel = function makeDataLevel() {
|
29
34
|
var depth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
30
35
|
var len = lens[depth];
|
31
36
|
return range(len).map(function () {
|
32
37
|
return _objectSpread(_objectSpread({}, newPerson()), {}, {
|
33
|
-
subRows: lens[depth + 1] ?
|
38
|
+
subRows: lens[depth + 1] ? _makeDataLevel(depth + 1) : undefined
|
34
39
|
});
|
35
40
|
});
|
36
41
|
};
|
37
|
-
return
|
42
|
+
return _makeDataLevel();
|
38
43
|
};
|
39
|
-
exports.
|
40
|
-
var range = function range(len) {
|
44
|
+
var range = exports.range = function range(len) {
|
41
45
|
var arr = [];
|
42
46
|
for (var i = 0; i < len; i++) {
|
43
47
|
arr.push(i);
|
@@ -46,7 +50,6 @@ var range = function range(len) {
|
|
46
50
|
};
|
47
51
|
|
48
52
|
/** This function is only to create a random data point when the person joined */
|
49
|
-
exports.range = range;
|
50
53
|
var getRandomDateJoined = function getRandomDateJoined() {
|
51
54
|
return randomDate(new Date(2022, 0, 1), new Date());
|
52
55
|
};
|
@@ -174,7 +177,7 @@ var newPerson = function newPerson() {
|
|
174
177
|
doc_link: renderDocLink()
|
175
178
|
};
|
176
179
|
};
|
177
|
-
var newPersonWithTwoLines = function newPersonWithTwoLines() {
|
180
|
+
var newPersonWithTwoLines = exports.newPersonWithTwoLines = function newPersonWithTwoLines() {
|
178
181
|
return {
|
179
182
|
firstName: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, _namor.default.generate({
|
180
183
|
words: 1,
|
@@ -190,7 +193,6 @@ var newPersonWithTwoLines = function newPersonWithTwoLines() {
|
|
190
193
|
age: Math.floor(Math.random() * 30)
|
191
194
|
};
|
192
195
|
};
|
193
|
-
exports.newPersonWithTwoLines = newPersonWithTwoLines;
|
194
196
|
var randomDate = function randomDate(start, end) {
|
195
197
|
return new Date(start.getTime() + Math.random() * (end.getTime() - start.getTime()));
|
196
198
|
};
|