@carbon/ibm-products 2.50.0 → 2.51.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/css/index-full-carbon.css +56 -29
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +3 -10
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +3 -10
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +34 -28
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/ActionBar/ActionBarOverflowItems.js +5 -0
- package/es/components/AddSelect/AddSelectBody.js +1 -1
- package/es/components/BigNumbers/BigNumbers.js +1 -1
- package/es/components/Coachmark/utils/enums.js +1 -0
- package/es/components/ConditionBuilder/ConditionBuilder.js +26 -20
- package/es/components/ConditionBuilder/ConditionBuilder.types.d.ts +6 -2
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +11 -8
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +44 -24
- package/es/components/CreateFullPage/CreateFullPage.d.ts +4 -2
- package/es/components/CreateFullPage/CreateFullPage.js +10 -3
- package/es/components/CreateFullPage/CreateFullPageStep.d.ts +3 -1
- package/es/components/CreateFullPage/CreateFullPageStep.js +5 -2
- package/es/components/Datagrid/Datagrid/Datagrid.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/Datagrid.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +12 -1
- package/es/components/Datagrid/Datagrid/DraggableElement.js +1 -0
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +3 -8
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +15 -13
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +17 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +13 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -12
- package/es/components/Datagrid/types/index.d.ts +4 -0
- package/es/components/Datagrid/useSelectRows.js +40 -19
- package/es/components/EditInPlace/EditInPlace.js +0 -3
- package/es/components/ExportModal/ExportModal.js +18 -5
- package/es/components/NotificationsPanel/NotificationsPanel.d.ts +5 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +14 -1
- package/es/components/OptionsTile/OptionsTile.d.ts +1 -1
- package/es/components/OptionsTile/OptionsTile.js +0 -1
- package/es/components/ProductiveCard/ProductiveCard.d.ts +4 -0
- package/es/components/ProductiveCard/ProductiveCard.js +4 -0
- package/es/components/ScrollGradient/ScrollGradient.js +1 -1
- package/es/components/SimpleHeader/SimpleHeader.d.ts +3 -1
- package/es/components/SimpleHeader/SimpleHeader.js +9 -2
- package/es/components/StringFormatter/StringFormatter.js +1 -1
- package/es/components/TagSet/TagSet.js +5 -0
- package/es/components/TagSet/TagSetOverflow.d.ts +4 -0
- package/es/components/TagSet/TagSetOverflow.js +13 -6
- package/es/components/Tearsheet/TearsheetShell.js +9 -2
- package/es/components/UserProfileImage/UserProfileImage.d.ts +1 -1
- package/es/components/UserProfileImage/UserProfileImage.js +1 -1
- package/es/global/js/utils/Wrap.d.ts +4 -0
- package/es/global/js/utils/Wrap.js +9 -3
- package/es/global/js/utils/devtools.js +1 -2
- package/es/node_modules/@carbon/icon-helpers/es/index.js +3 -3
- package/lib/_virtual/_commonjsHelpers.js +0 -2
- package/lib/_virtual/_rollupPluginBabelHelpers.js +2 -4
- package/lib/_virtual/index.js +0 -2
- package/lib/components/APIKeyModal/APIKeyDownloader.js +8 -14
- package/lib/components/APIKeyModal/APIKeyModal.js +70 -77
- package/lib/components/AboutModal/AboutModal.js +29 -36
- package/lib/components/ActionBar/ActionBar.js +26 -33
- package/lib/components/ActionBar/ActionBarItem.js +9 -16
- package/lib/components/ActionBar/ActionBarOverflowItems.js +23 -25
- package/lib/components/ActionSet/ActionSet.js +17 -24
- package/lib/components/AddSelect/AddSelect.js +62 -68
- package/lib/components/AddSelect/AddSelectBody.js +82 -89
- package/lib/components/AddSelect/AddSelectBreadcrumbs.js +6 -13
- package/lib/components/AddSelect/AddSelectColumn.js +29 -35
- package/lib/components/AddSelect/AddSelectFilter.js +30 -37
- package/lib/components/AddSelect/AddSelectFormControl.js +15 -21
- package/lib/components/AddSelect/AddSelectList.js +9 -16
- package/lib/components/AddSelect/AddSelectMetaPanel.js +16 -22
- package/lib/components/AddSelect/AddSelectRow.js +32 -39
- package/lib/components/AddSelect/AddSelectSidebar.js +29 -35
- package/lib/components/AddSelect/AddSelectSort.js +10 -16
- package/lib/components/AddSelect/add-select-utils.js +0 -2
- package/lib/components/AddSelect/hooks/useFocus.js +1 -1
- package/lib/components/AddSelect/hooks/useItemSort.js +0 -2
- package/lib/components/AddSelect/hooks/useParentSelect.js +1 -1
- package/lib/components/AddSelect/hooks/usePath.js +1 -1
- package/lib/components/BigNumbers/BigNumbers.js +39 -46
- package/lib/components/BigNumbers/constants.js +0 -2
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +35 -42
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +22 -29
- package/lib/components/Card/Card.js +73 -80
- package/lib/components/Card/CardFooter.js +28 -35
- package/lib/components/Card/CardHeader.js +37 -44
- package/lib/components/Carousel/Carousel.js +21 -28
- package/lib/components/Carousel/CarouselItem.js +5 -12
- package/lib/components/Cascade/Cascade.js +15 -22
- package/lib/components/Checklist/Checklist.js +50 -57
- package/lib/components/Checklist/Checklist.types.js +0 -2
- package/lib/components/Checklist/ChecklistChart.js +7 -15
- package/lib/components/Checklist/ChecklistIcon.js +7 -14
- package/lib/components/Coachmark/Coachmark.js +24 -31
- package/lib/components/Coachmark/CoachmarkDragbar.js +12 -19
- package/lib/components/Coachmark/CoachmarkHeader.js +9 -16
- package/lib/components/Coachmark/CoachmarkOverlay.js +14 -21
- package/lib/components/Coachmark/CoachmarkTagline.js +12 -19
- package/lib/components/Coachmark/utils/constants.js +0 -2
- package/lib/components/Coachmark/utils/context.js +0 -2
- package/lib/components/Coachmark/utils/enums.js +1 -2
- package/lib/components/Coachmark/utils/hooks.js +0 -2
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +10 -17
- package/lib/components/CoachmarkButton/CoachmarkButton.js +6 -13
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +13 -20
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +11 -18
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +25 -32
- package/lib/components/CoachmarkStack/CoachmarkStack.js +23 -30
- package/lib/components/CoachmarkStack/CoachmarkStackHome.js +29 -36
- package/lib/components/ComboButton/ComboButton.js +11 -18
- package/lib/components/ComboButton/ComboButtonItem/index.js +2 -8
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +34 -39
- package/lib/components/ConditionBuilder/ConditionBuilder.js +58 -59
- package/lib/components/ConditionBuilder/ConditionBuilder.types.d.ts +6 -2
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +18 -23
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +15 -20
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +20 -27
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +8 -12
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +4 -8
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +11 -8
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +63 -47
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +25 -31
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +0 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +17 -23
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +9 -15
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +5 -11
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +13 -19
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +17 -23
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +6 -12
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +9 -15
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +27 -32
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +25 -30
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +0 -2
- package/lib/components/ConditionBuilder/utils/useDataConfigs.js +0 -2
- package/lib/components/ConditionBuilder/utils/useTranslations.js +0 -2
- package/lib/components/ConditionBuilder/utils/util.js +0 -2
- package/lib/components/CreateFullPage/CreateFullPage.d.ts +4 -2
- package/lib/components/CreateFullPage/CreateFullPage.js +53 -53
- package/lib/components/CreateFullPage/CreateFullPageStep.d.ts +3 -1
- package/lib/components/CreateFullPage/CreateFullPageStep.js +27 -31
- package/lib/components/CreateInfluencer/CreateInfluencer.js +15 -22
- package/lib/components/CreateModal/CreateModal.js +22 -29
- package/lib/components/CreateSidePanel/CreateSidePanel.js +24 -31
- package/lib/components/CreateTearsheet/CreateTearsheet.js +26 -33
- package/lib/components/CreateTearsheet/CreateTearsheetDivider.js +3 -10
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +31 -38
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +24 -31
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +37 -44
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +54 -61
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +37 -44
- package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.js +0 -2
- package/lib/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +0 -2
- package/lib/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +0 -2
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetEdit.js +0 -2
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +0 -2
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +0 -2
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +0 -2
- package/lib/components/DataSpreadsheet/utils/checkActiveHeaderCell.js +0 -2
- package/lib/components/DataSpreadsheet/utils/checkForHoldingKey.js +0 -2
- package/lib/components/DataSpreadsheet/utils/checkSelectedHeaderCell.js +0 -2
- package/lib/components/DataSpreadsheet/utils/commonEventHandlers.js +1 -3
- package/lib/components/DataSpreadsheet/utils/createActiveCellFn.js +0 -2
- package/lib/components/DataSpreadsheet/utils/createCellSelectionArea.js +0 -2
- package/lib/components/DataSpreadsheet/utils/getCellSize.js +0 -2
- package/lib/components/DataSpreadsheet/utils/getSelectionAreaPoints.js +0 -2
- package/lib/components/DataSpreadsheet/utils/getSpreadsheetWidth.js +0 -2
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionEnter.js +0 -2
- package/lib/components/DataSpreadsheet/utils/handleActiveCellInSelectionTab.js +0 -2
- package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +0 -2
- package/lib/components/DataSpreadsheet/utils/handleEditSubmit.js +1 -3
- package/lib/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +1 -3
- package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +2 -4
- package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +0 -2
- package/lib/components/DataSpreadsheet/utils/removeCellSelections.js +0 -2
- package/lib/components/DataSpreadsheet/utils/selectAllCells.js +1 -3
- package/lib/components/Datagrid/Datagrid/Datagrid.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/Datagrid.js +10 -17
- package/lib/components/Datagrid/Datagrid/DatagridBody.js +5 -9
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +43 -50
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -8
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +6 -11
- package/lib/components/Datagrid/Datagrid/DatagridHead.js +2 -6
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +12 -17
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +3 -8
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +12 -17
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -11
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +18 -23
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +3 -8
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +26 -20
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -9
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +18 -22
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +11 -12
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +10 -11
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +25 -31
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +21 -30
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +7 -13
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +18 -20
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/common.js +1 -7
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +49 -39
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +54 -48
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +5 -11
- package/lib/components/Datagrid/Datagrid/addons/Filtering/OverflowCheckboxes.js +11 -15
- package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/handleCheckboxChange.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +16 -31
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +2 -6
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useSubscribeToEventEmitter.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +18 -25
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +32 -39
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/InlineEditContext.js +2 -8
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/getCellIdAsObject.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditContext/returnUpdatedActiveCell.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridFocus.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +0 -2
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +12 -17
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +11 -16
- package/lib/components/Datagrid/Datagrid/addons/Slug/DatagridSlug.js +2 -8
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +0 -2
- package/lib/components/Datagrid/common-column-ids.js +0 -2
- package/lib/components/Datagrid/types/index.d.ts +4 -0
- package/lib/components/Datagrid/useActionsColumn.js +12 -17
- package/lib/components/Datagrid/useColumnCenterAlign.js +4 -9
- package/lib/components/Datagrid/useColumnRightAlign.js +4 -9
- package/lib/components/Datagrid/useCustomizeColumns.js +6 -7
- package/lib/components/Datagrid/useDatagrid.js +4 -8
- package/lib/components/Datagrid/useDefaultStringRenderer.js +5 -10
- package/lib/components/Datagrid/useDisableSelectRows.js +1 -1
- package/lib/components/Datagrid/useEditableCell.js +2 -2
- package/lib/components/Datagrid/useExpandedRow.js +3 -3
- package/lib/components/Datagrid/useFiltering.js +5 -5
- package/lib/components/Datagrid/useFlexResize.js +1 -1
- package/lib/components/Datagrid/useFloatingScroll.js +2 -6
- package/lib/components/Datagrid/useFocusRowExpander.js +0 -2
- package/lib/components/Datagrid/useInfiniteScroll.js +4 -8
- package/lib/components/Datagrid/useInitialColumnSort.js +0 -2
- package/lib/components/Datagrid/useInlineEdit.js +7 -12
- package/lib/components/Datagrid/useNestedRowExpander.js +5 -10
- package/lib/components/Datagrid/useNestedRows.js +3 -7
- package/lib/components/Datagrid/useOnRowClick.js +1 -1
- package/lib/components/Datagrid/useParentDimensions.js +1 -1
- package/lib/components/Datagrid/useResizeTable.js +1 -1
- package/lib/components/Datagrid/useRowExpander.js +5 -10
- package/lib/components/Datagrid/useRowIsMouseOver.js +2 -6
- package/lib/components/Datagrid/useRowRenderer.js +2 -2
- package/lib/components/Datagrid/useRowSize.js +2 -2
- package/lib/components/Datagrid/useSelectAllToggle.js +3 -8
- package/lib/components/Datagrid/useSelectRows.js +45 -29
- package/lib/components/Datagrid/useSkeletonRows.js +1 -1
- package/lib/components/Datagrid/useSortableColumns.js +8 -13
- package/lib/components/Datagrid/useStickyColumn.js +4 -9
- package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.js +0 -2
- package/lib/components/Decorator/Decorator.js +16 -22
- package/lib/components/DecoratorBase/DecoratorBase.js +41 -48
- package/lib/components/DecoratorBase/DecoratorIcon.js +6 -13
- package/lib/components/DecoratorBase/utils.js +0 -2
- package/lib/components/DecoratorDualButton/DecoratorDualButton.js +21 -27
- package/lib/components/DecoratorLink/DecoratorLink.js +19 -25
- package/lib/components/DecoratorSingleButton/DecoratorSingleButton.js +19 -25
- package/lib/components/DelimitedList/DelimitedList.js +7 -14
- package/lib/components/DescriptionList/DescriptionList.js +8 -15
- package/lib/components/DescriptionList/DescriptionListBody.js +5 -12
- package/lib/components/DescriptionList/DescriptionListCell.js +5 -12
- package/lib/components/DescriptionList/DescriptionListRow.js +5 -12
- package/lib/components/DescriptionList/constants.js +0 -2
- package/lib/components/EditFullPage/EditFullPage.js +5 -12
- package/lib/components/EditInPlace/EditInPlace.js +35 -45
- package/lib/components/EditSidePanel/EditSidePanel.js +26 -33
- package/lib/components/EditTearsheet/EditTearsheet.js +24 -31
- package/lib/components/EditTearsheet/EditTearsheetForm.js +16 -23
- package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +5 -12
- package/lib/components/EditUpdateCards/EditUpdateCards.js +32 -39
- package/lib/components/EmptyStates/EmptyState.js +22 -29
- package/lib/components/EmptyStates/EmptyStateContent.js +18 -25
- package/lib/components/EmptyStates/EmptyStateIllustration.js +3 -7
- package/lib/components/EmptyStates/EmptyStateV2.js +25 -32
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +19 -26
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +19 -26
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +19 -26
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +19 -26
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +19 -26
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +19 -26
- package/lib/components/EmptyStates/assets/ErrorIllustration.js +53 -58
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +43 -48
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +114 -119
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +84 -89
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +81 -86
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +74 -79
- package/lib/components/ExportModal/ExportModal.js +59 -53
- package/lib/components/ExpressiveCard/ExpressiveCard.js +28 -34
- package/lib/components/FeatureFlags/index.js +3 -9
- package/lib/components/FilterPanel/FilterPanel.js +7 -14
- package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +10 -17
- package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +13 -20
- package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +9 -16
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +17 -24
- package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +11 -18
- package/lib/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +9 -16
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +9 -16
- package/lib/components/FilterSummary/FilterSummary.js +22 -28
- package/lib/components/FullPageError/FullPageError.js +21 -28
- package/lib/components/FullPageError/assets/Error403SVG.js +129 -135
- package/lib/components/FullPageError/assets/Error404SVG.js +114 -120
- package/lib/components/FullPageError/assets/ErrorGenericSVG.js +128 -134
- package/lib/components/GetStartedCard/GetStartedCard.js +16 -22
- package/lib/components/Guidebanner/Guidebanner.js +32 -39
- package/lib/components/Guidebanner/GuidebannerElement.js +10 -17
- package/lib/components/Guidebanner/GuidebannerElementButton.js +9 -16
- package/lib/components/Guidebanner/GuidebannerElementLink.js +5 -12
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +5 -12
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +5 -12
- package/lib/components/HTTPErrors/HTTPErrorContent.js +5 -11
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +5 -12
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +358 -364
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +309 -315
- package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +321 -327
- package/lib/components/ImportModal/ImportModal.js +48 -55
- package/lib/components/InlineTip/InlineTip.js +38 -45
- package/lib/components/InlineTip/InlineTipButton.js +5 -12
- package/lib/components/InlineTip/InlineTipLink.js +6 -13
- package/lib/components/InlineTip/utils.js +2 -4
- package/lib/components/InterstitialScreen/InterstitialScreen.js +73 -80
- package/lib/components/InterstitialScreenView/InterstitialScreenView.js +6 -13
- package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +8 -15
- package/lib/components/MultiAddSelect/MultiAddSelect.js +45 -51
- package/lib/components/Nav/Nav.js +14 -21
- package/lib/components/Nav/NavItem.js +19 -24
- package/lib/components/Nav/NavItemLink.js +4 -8
- package/lib/components/Nav/NavList.js +12 -17
- package/lib/components/NonLinearReading/NonLinearReading.js +12 -19
- package/lib/components/NotificationsPanel/NotificationsPanel.d.ts +5 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.js +104 -98
- package/lib/components/NotificationsPanel/utils.js +0 -2
- package/lib/components/OptionsTile/OptionsTile.d.ts +1 -1
- package/lib/components/OptionsTile/OptionsTile.js +40 -48
- package/lib/components/PageHeader/PageHeader.js +105 -112
- package/lib/components/PageHeader/PageHeaderTitle.js +23 -30
- package/lib/components/PageHeader/PageHeaderUtils.js +2 -9
- package/lib/components/ProductiveCard/ProductiveCard.d.ts +4 -0
- package/lib/components/ProductiveCard/ProductiveCard.js +39 -41
- package/lib/components/RemoveModal/RemoveModal.js +27 -34
- package/lib/components/Saving/Saving.js +27 -34
- package/lib/components/ScrollGradient/ScrollGradient.js +17 -24
- package/lib/components/ScrollGradient/constants.js +0 -2
- package/lib/components/SearchBar/SearchBar.js +22 -29
- package/lib/components/SidePanel/SidePanel.js +66 -73
- package/lib/components/SidePanel/constants.js +0 -2
- package/lib/components/SidePanel/motion/variants.js +0 -2
- package/lib/components/SimpleHeader/SimpleHeader.d.ts +3 -1
- package/lib/components/SimpleHeader/SimpleHeader.js +27 -27
- package/lib/components/SingleAddSelect/SingleAddSelect.js +21 -27
- package/lib/components/StatusIcon/StatusIcon.js +52 -59
- package/lib/components/StatusIndicator/StatusIndicator.js +13 -20
- package/lib/components/StatusIndicator/StatusIndicatorStep.js +14 -21
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +8 -17
- package/lib/components/StringFormatter/StringFormatter.js +12 -19
- package/lib/components/StringFormatter/utils/enums.js +0 -2
- package/lib/components/TagOverflow/TagOverflow.js +26 -33
- package/lib/components/TagOverflow/TagOverflowModal.js +17 -24
- package/lib/components/TagOverflow/TagOverflowPopover.js +22 -29
- package/lib/components/TagOverflow/constants.js +0 -2
- package/lib/components/TagSet/TagSet.js +39 -41
- package/lib/components/TagSet/TagSetModal.js +16 -23
- package/lib/components/TagSet/TagSetOverflow.d.ts +4 -0
- package/lib/components/TagSet/TagSetOverflow.js +32 -32
- package/lib/components/Tearsheet/Tearsheet.js +23 -29
- package/lib/components/Tearsheet/TearsheetNarrow.js +18 -24
- package/lib/components/Tearsheet/TearsheetShell.js +63 -63
- package/lib/components/Toolbar/Toolbar.js +3 -10
- package/lib/components/Toolbar/ToolbarButton.js +3 -10
- package/lib/components/Toolbar/ToolbarGroup.js +2 -9
- package/lib/components/TooltipTrigger/TooltipTrigger.js +4 -11
- package/lib/components/TruncatedList/TruncatedList.js +15 -22
- package/lib/components/UserAvatar/UserAvatar.js +18 -25
- package/lib/components/UserProfileImage/UserProfileImage.d.ts +1 -1
- package/lib/components/UserProfileImage/UserProfileImage.js +25 -32
- package/lib/components/WebTerminal/WebTerminal.js +26 -33
- package/lib/components/WebTerminal/WebTerminalContentWrapper.js +4 -11
- package/lib/components/WebTerminal/hooks/index.js +2 -8
- package/lib/components/_Canary/Canary.js +7 -14
- package/lib/feature-flags.js +3 -4
- package/lib/global/js/hooks/useActiveElement.js +0 -2
- package/lib/global/js/hooks/useClickOutside.js +0 -2
- package/lib/global/js/hooks/useControllableState.js +2 -4
- package/lib/global/js/hooks/useCreateComponentFocus.js +1 -3
- package/lib/global/js/hooks/useCreateComponentStepChange.js +0 -2
- package/lib/global/js/hooks/useFocus.js +1 -3
- package/lib/global/js/hooks/useIsomorphicEffect.js +0 -2
- package/lib/global/js/hooks/usePortalTarget.js +0 -2
- package/lib/global/js/hooks/usePrefersReducedMotion.js +1 -1
- package/lib/global/js/hooks/usePrefix.js +1 -3
- package/lib/global/js/hooks/usePreviousValue.js +0 -2
- package/lib/global/js/hooks/useResetCreateComponent.js +0 -2
- package/lib/global/js/hooks/useResizeObserver.js +0 -2
- package/lib/global/js/hooks/useRetrieveFormTitles.js +0 -2
- package/lib/global/js/hooks/useRetrieveStepData.js +0 -2
- package/lib/global/js/hooks/useValidCreateStepCount.js +0 -2
- package/lib/global/js/hooks/useWindowResize.js +1 -3
- package/lib/global/js/hooks/useWindowScroll.js +1 -3
- package/lib/global/js/package-settings.js +1 -1
- package/lib/global/js/utils/Wrap.d.ts +4 -0
- package/lib/global/js/utils/Wrap.js +16 -16
- package/lib/global/js/utils/deepCloneObject.js +1 -3
- package/lib/global/js/utils/devtools.js +0 -2
- package/lib/global/js/utils/getBezierValues.js +0 -2
- package/lib/global/js/utils/getFocusableElements.js +0 -2
- package/lib/global/js/utils/getNodeTextContent.js +1 -3
- package/lib/global/js/utils/getNumberOfHiddenSteps.js +0 -2
- package/lib/global/js/utils/getScrollbarWidth.js +0 -2
- package/lib/global/js/utils/keyboardNavigation.js +0 -2
- package/lib/global/js/utils/lastIndexInArray.js +0 -2
- package/lib/global/js/utils/motionConstants.js +0 -2
- package/lib/global/js/utils/pconsole.js +1 -1
- package/lib/global/js/utils/props-helper.js +10 -12
- package/lib/global/js/utils/rangeWithCallback.js +0 -2
- package/lib/global/js/utils/scrollableAncestor.js +1 -3
- package/lib/global/js/utils/uuidv4.js +1 -1
- package/lib/global/js/utils/wait.js +1 -1
- package/lib/global/js/utils/wrapFocus.js +1 -1
- package/lib/index.js +19 -21
- package/lib/node_modules/@carbon/colors/es/index.js +0 -2
- package/lib/node_modules/@carbon/icon-helpers/es/index.js +6 -8
- package/lib/node_modules/@carbon/icons-react/es/Icon.js +14 -18
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-2.js +525 -531
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-9.js +500 -506
- package/lib/node_modules/@carbon/icons-react/es/iconPropTypes-4cbeb95d.js +1 -3
- package/lib/node_modules/object-assign/index.js +0 -2
- package/lib/node_modules/prop-types/checkPropTypes.js +2 -4
- package/lib/node_modules/prop-types/factoryWithThrowingShims.js +0 -2
- package/lib/node_modules/prop-types/factoryWithTypeCheckers.js +4 -10
- package/lib/node_modules/prop-types/index.js +2 -6
- package/lib/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -2
- package/lib/node_modules/prop-types/lib/has.js +0 -2
- package/lib/settings.js +9 -15
- package/package.json +11 -11
- package/scss/components/EditInPlace/_edit-in-place.scss +0 -11
- package/scss/components/SidePanel/_side-panel.scss +1 -0
- package/scss/components/TagSet/_tag-set.scss +2 -0
- package/telemetry.yml +3 -3
@@ -18,10 +18,6 @@ var useTranslations = require('../utils/useTranslations.js');
|
|
18
18
|
var util = require('../utils/util.js');
|
19
19
|
var useDataConfigs = require('../utils/useDataConfigs.js');
|
20
20
|
|
21
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
22
|
-
|
23
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
24
|
-
|
25
21
|
var GroupConnector = function GroupConnector() {
|
26
22
|
var _useContext = React.useContext(ConditionBuilderProvider.ConditionBuilderContext),
|
27
23
|
rootState = _useContext.rootState,
|
@@ -36,18 +32,18 @@ var GroupConnector = function GroupConnector() {
|
|
36
32
|
operator: updatedStatement
|
37
33
|
}));
|
38
34
|
};
|
39
|
-
return /*#__PURE__*/
|
35
|
+
return /*#__PURE__*/React.createElement("div", {
|
40
36
|
className: "".concat(util.blockClass, "__group-separator ").concat(util.blockClass, "__group-separator-row"),
|
41
37
|
role: "row",
|
42
38
|
tabIndex: -1,
|
43
39
|
"aria-level": 1
|
44
|
-
}, /*#__PURE__*/
|
40
|
+
}, /*#__PURE__*/React.createElement(ConditionBuilderItem.ConditionBuilderItem, {
|
45
41
|
label: rootState.operator,
|
46
42
|
title: conditionText,
|
47
43
|
"data-name": "connectorField",
|
48
44
|
popOverClassName: "".concat(util.blockClass, "__gap"),
|
49
45
|
className: "".concat(util.blockClass, "__statement-button")
|
50
|
-
}, /*#__PURE__*/
|
46
|
+
}, /*#__PURE__*/React.createElement(ItemOption.ItemOption, {
|
51
47
|
conditionState: {
|
52
48
|
value: rootState.operator,
|
53
49
|
label: conditionText
|
@@ -60,4 +56,4 @@ var GroupConnector = function GroupConnector() {
|
|
60
56
|
};
|
61
57
|
var GroupConnector$1 = GroupConnector;
|
62
58
|
|
63
|
-
exports
|
59
|
+
exports.default = GroupConnector$1;
|
package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
import PropTypes from 'prop-types';
|
8
|
-
import { Action, ConditionBuilderState } from '../ConditionBuilder.types';
|
8
|
+
import { Action, ConditionBuilderState, InitialState } from '../ConditionBuilder.types';
|
9
9
|
interface ConditionBuilderContentProps {
|
10
10
|
startConditionLabel: string;
|
11
11
|
getConditionState: (state: ConditionBuilderState) => void;
|
12
12
|
getActionsState?: (state: Action[]) => void;
|
13
|
-
initialState?:
|
13
|
+
initialState?: InitialState;
|
14
14
|
actions?: Action[];
|
15
15
|
}
|
16
16
|
declare const ConditionBuilderContent: {
|
@@ -35,12 +35,15 @@ declare const ConditionBuilderContent: {
|
|
35
35
|
* Optional prop if the condition building need to start from a predefined initial state
|
36
36
|
*/
|
37
37
|
initialState: PropTypes.Requireable<PropTypes.InferProps<{
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
38
|
+
state: PropTypes.Requireable<PropTypes.InferProps<{
|
39
|
+
groups: PropTypes.Requireable<(PropTypes.InferProps<{
|
40
|
+
groupOperator: PropTypes.Requireable<string>;
|
41
|
+
statement: PropTypes.Requireable<string>;
|
42
|
+
conditions: PropTypes.Requireable<(object | null | undefined)[]>;
|
43
|
+
}> | null | undefined)[]>;
|
44
|
+
operator: PropTypes.Requireable<string>;
|
45
|
+
}>>;
|
46
|
+
enabledDefault: PropTypes.Requireable<boolean>;
|
44
47
|
}>>;
|
45
48
|
startConditionLabel: PropTypes.Validator<string>;
|
46
49
|
};
|
@@ -24,10 +24,6 @@ var ConditionBuilderActions = require('../ConditionBuilderActions/ConditionBuild
|
|
24
24
|
var useTranslations = require('../utils/useTranslations.js');
|
25
25
|
var util = require('../utils/util.js');
|
26
26
|
|
27
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
28
|
-
|
29
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
30
|
-
|
31
27
|
var _GroupConnector;
|
32
28
|
var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
33
29
|
var _rootState$groups4;
|
@@ -41,6 +37,7 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
41
37
|
setRootState = _useContext.setRootState,
|
42
38
|
variant = _useContext.variant,
|
43
39
|
actionState = _useContext.actionState;
|
40
|
+
var initialConditionState = React.useRef(initialState !== null && initialState !== void 0 && initialState.state ? JSON.parse(JSON.stringify(initialState === null || initialState === void 0 ? void 0 : initialState.state)) : null);
|
44
41
|
var _useState = React.useState(false),
|
45
42
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
46
43
|
isConditionBuilderActive = _useState2[0],
|
@@ -77,10 +74,24 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
77
74
|
getActionsState === null || getActionsState === void 0 || getActionsState(actionState !== null && actionState !== void 0 ? actionState : []);
|
78
75
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
79
76
|
}, [actionState]);
|
77
|
+
React.useEffect(function () {
|
78
|
+
if (initialState !== null && initialState !== void 0 && initialState.enabledDefault) {
|
79
|
+
setRootState === null || setRootState === void 0 || setRootState(initialConditionState.current);
|
80
|
+
initialConditionState.current = null;
|
81
|
+
}
|
82
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
83
|
+
}, [initialState]);
|
80
84
|
var onStartConditionBuilder = function onStartConditionBuilder() {
|
85
|
+
var _initialConditionStat;
|
81
86
|
//when add condition button is clicked.
|
82
87
|
setIsConditionBuilderActive(true);
|
83
|
-
|
88
|
+
if (initialConditionState !== null && initialConditionState !== void 0 && (_initialConditionStat = initialConditionState.current) !== null && _initialConditionStat !== void 0 && (_initialConditionStat = _initialConditionStat.groups) !== null && _initialConditionStat !== void 0 && _initialConditionStat.length) {
|
89
|
+
setRootState === null || setRootState === void 0 || setRootState(initialConditionState.current);
|
90
|
+
initialConditionState.current = null;
|
91
|
+
} else {
|
92
|
+
setRootState === null || setRootState === void 0 || setRootState(ConditionBuilderProvider.emptyState); //here we can set an empty skeleton object for an empty condition builder,
|
93
|
+
}
|
94
|
+
|
84
95
|
//or we can even pre-populate some existing builder and continue editing
|
85
96
|
};
|
86
97
|
var _onRemove = React.useCallback(function (groupId) {
|
@@ -108,13 +119,13 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
108
119
|
statement: 'ifAll',
|
109
120
|
// 'if|exclude if',
|
110
121
|
groupOperator: 'and',
|
111
|
-
id: uuidv4
|
122
|
+
id: uuidv4.default(),
|
112
123
|
conditions: [{
|
113
124
|
property: undefined,
|
114
125
|
operator: '',
|
115
126
|
value: '',
|
116
127
|
popoverToOpen: 'propertyField',
|
117
|
-
id: uuidv4
|
128
|
+
id: uuidv4.default()
|
118
129
|
}]
|
119
130
|
};
|
120
131
|
setRootState === null || setRootState === void 0 || setRootState(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, rootState), {}, {
|
@@ -127,10 +138,10 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
127
138
|
return groupLength % 5;
|
128
139
|
};
|
129
140
|
if (!isConditionBuilderActive) {
|
130
|
-
return /*#__PURE__*/
|
141
|
+
return /*#__PURE__*/React.createElement(react.Button, {
|
131
142
|
className: "".concat(util.blockClass, "__addConditionText-button"),
|
132
143
|
renderIcon: function renderIcon(props) {
|
133
|
-
return /*#__PURE__*/
|
144
|
+
return /*#__PURE__*/React.createElement(icons.Add, props);
|
134
145
|
},
|
135
146
|
iconDescription: startConditionLabel,
|
136
147
|
kind: "ghost",
|
@@ -138,19 +149,21 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
138
149
|
onClick: onStartConditionBuilder
|
139
150
|
}, startConditionLabel);
|
140
151
|
}
|
141
|
-
|
152
|
+
var wrapperRole = variant === util.HIERARCHICAL_VARIANT ? {
|
153
|
+
role: 'treegrid',
|
154
|
+
'aria-label': conditionBuilderHierarchicalText
|
155
|
+
} : null;
|
156
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(react.Section, {
|
142
157
|
className: "".concat(util.blockClass, "__heading"),
|
143
158
|
level: 4
|
144
|
-
}, /*#__PURE__*/
|
145
|
-
className: "".concat(util.blockClass, "__content-container")
|
146
|
-
|
147
|
-
"aria-label": conditionBuilderHierarchicalText
|
148
|
-
}, rootState && (rootState === null || rootState === void 0 || (_rootState$groups4 = rootState.groups) === null || _rootState$groups4 === void 0 ? void 0 : _rootState$groups4.map(function (eachGroup, groupIndex) {
|
159
|
+
}, /*#__PURE__*/React.createElement(react.Heading, null, conditionHeadingText)), /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
160
|
+
className: "".concat(util.blockClass, "__content-container")
|
161
|
+
}, wrapperRole), rootState && (rootState === null || rootState === void 0 || (_rootState$groups4 = rootState.groups) === null || _rootState$groups4 === void 0 ? void 0 : _rootState$groups4.map(function (eachGroup, groupIndex) {
|
149
162
|
var _ref2;
|
150
|
-
return /*#__PURE__*/
|
163
|
+
return /*#__PURE__*/React.createElement("div", {
|
151
164
|
key: eachGroup.id,
|
152
165
|
className: "".concat(util.blockClass, "__group-wrapper")
|
153
|
-
}, /*#__PURE__*/
|
166
|
+
}, /*#__PURE__*/React.createElement(ConditionGroupBuilder.default, {
|
154
167
|
className: "".concat(util.blockClass, "__group"),
|
155
168
|
aria: {
|
156
169
|
level: 1,
|
@@ -164,13 +177,13 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
164
177
|
onChange: function onChange(updatedGroup) {
|
165
178
|
onChangeHandler(updatedGroup, groupIndex);
|
166
179
|
}
|
167
|
-
}), rootState.groups && groupIndex < rootState.groups.length - 1 && (_GroupConnector || (_GroupConnector = /*#__PURE__*/
|
168
|
-
})), variant == util.HIERARCHICAL_VARIANT && /*#__PURE__*/
|
180
|
+
}), rootState.groups && groupIndex < rootState.groups.length - 1 && (_GroupConnector || (_GroupConnector = /*#__PURE__*/React.createElement(GroupConnector.default, null))));
|
181
|
+
})), variant == util.HIERARCHICAL_VARIANT && /*#__PURE__*/React.createElement("div", {
|
169
182
|
role: "row",
|
170
183
|
tabIndex: -1,
|
171
184
|
"aria-level": 1,
|
172
185
|
className: "".concat(util.blockClass, "__add-group")
|
173
|
-
}, /*#__PURE__*/
|
186
|
+
}, /*#__PURE__*/React.createElement(ConditionBuilderButton.ConditionBuilderButton, {
|
174
187
|
renderIcon: icons.TextNewLine,
|
175
188
|
onClick: addConditionGroupHandler,
|
176
189
|
onMouseEnter: showConditionGroupPreviewHandler,
|
@@ -184,14 +197,14 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
184
197
|
role: 'gridcell',
|
185
198
|
'aria-label': addConditionGroupText
|
186
199
|
}
|
187
|
-
})), showConditionGroupPreview && /*#__PURE__*/
|
200
|
+
})), showConditionGroupPreview && /*#__PURE__*/React.createElement(ConditionPreview.default, {
|
188
201
|
previewType: "newGroup",
|
189
202
|
colorIndex: getColorIndex(),
|
190
203
|
group: {
|
191
204
|
groupOperator: rootState === null || rootState === void 0 ? void 0 : rootState.operator,
|
192
|
-
id: uuidv4
|
205
|
+
id: uuidv4.default()
|
193
206
|
}
|
194
|
-
})), actions && /*#__PURE__*/
|
207
|
+
})), actions && /*#__PURE__*/React.createElement(ConditionBuilderActions.default, {
|
195
208
|
actions: actions,
|
196
209
|
className: "".concat(util.blockClass, "__actions-container")
|
197
210
|
}));
|
@@ -200,42 +213,45 @@ ConditionBuilderContent.propTypes = {
|
|
200
213
|
/**
|
201
214
|
* optional array of object that give the list of actions.
|
202
215
|
*/
|
203
|
-
actions: index
|
204
|
-
id: index
|
205
|
-
label: index
|
216
|
+
actions: index.default.arrayOf(index.default.shape({
|
217
|
+
id: index.default.oneOfType([index.default.string, index.default.number]).isRequired,
|
218
|
+
label: index.default.string.isRequired
|
206
219
|
})),
|
207
220
|
/**
|
208
221
|
* callback functions that will provide the updated action state back.
|
209
222
|
*/
|
210
|
-
getActionsState: index
|
223
|
+
getActionsState: index.default.func,
|
211
224
|
/**
|
212
225
|
* This is a callback function that returns the updated state
|
213
226
|
*/
|
214
|
-
getConditionState: index
|
227
|
+
getConditionState: index.default.func.isRequired,
|
215
228
|
/**
|
216
229
|
* Optional prop if the condition building need to start from a predefined initial state
|
217
230
|
*/
|
218
|
-
initialState: index
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
231
|
+
initialState: index.default.shape({
|
232
|
+
state: index.default.shape({
|
233
|
+
groups: index.default.arrayOf(index.default.shape({
|
234
|
+
groupOperator: index.default.string,
|
235
|
+
statement: index.default.string,
|
236
|
+
conditions: index.default.arrayOf(index.default.oneOfType([index.default.shape({
|
237
|
+
property: index.default.string,
|
238
|
+
operator: index.default.string,
|
239
|
+
value: index.default.oneOfType([index.default.string, index.default.arrayOf(index.default.shape({
|
240
|
+
id: index.default.string,
|
241
|
+
label: index.default.string
|
242
|
+
})), index.default.shape({
|
243
|
+
id: index.default.string,
|
244
|
+
label: index.default.string
|
245
|
+
})])
|
246
|
+
}), index.default.object]))
|
247
|
+
})),
|
248
|
+
operator: index.default.string
|
249
|
+
}),
|
250
|
+
enabledDefault: index.default.bool
|
235
251
|
}),
|
236
252
|
/* Provide a label to the button that starts condition builder
|
237
253
|
*/
|
238
|
-
startConditionLabel: index
|
254
|
+
startConditionLabel: index.default.string.isRequired
|
239
255
|
};
|
240
256
|
|
241
|
-
exports
|
257
|
+
exports.default = ConditionBuilderContent;
|
@@ -7,29 +7,23 @@
|
|
7
7
|
|
8
8
|
'use strict';
|
9
9
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
11
|
-
|
12
10
|
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
13
11
|
var React = require('react');
|
14
12
|
var index = require('../../../node_modules/prop-types/index.js');
|
15
13
|
var uuidv4 = require('../../../global/js/utils/uuidv4.js');
|
16
14
|
|
17
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
18
|
-
|
19
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
20
|
-
|
21
15
|
var emptyState = {
|
22
16
|
operator: 'or',
|
23
17
|
groups: [{
|
24
18
|
groupOperator: 'and',
|
25
19
|
statement: 'ifAll',
|
26
|
-
id: uuidv4
|
20
|
+
id: uuidv4.default(),
|
27
21
|
conditions: [{
|
28
22
|
property: undefined,
|
29
23
|
operator: '',
|
30
24
|
value: '',
|
31
25
|
popoverToOpen: 'propertyField',
|
32
|
-
id: uuidv4
|
26
|
+
id: uuidv4.default()
|
33
27
|
}]
|
34
28
|
}]
|
35
29
|
};
|
@@ -61,7 +55,7 @@ var ConditionBuilderProvider = function ConditionBuilderProvider(props) {
|
|
61
55
|
translateWithId: props.translateWithId,
|
62
56
|
conditionBuilderRef: props.conditionBuilderRef
|
63
57
|
};
|
64
|
-
return /*#__PURE__*/
|
58
|
+
return /*#__PURE__*/React.createElement(ConditionBuilderContext.Provider, {
|
65
59
|
value: contextValue
|
66
60
|
},
|
67
61
|
// eslint-disable-next-line react/prop-types
|
@@ -71,12 +65,12 @@ ConditionBuilderProvider.propTypes = {
|
|
71
65
|
/**
|
72
66
|
* Provide the contents of the ConditionBuilder.
|
73
67
|
*/
|
74
|
-
children: index
|
68
|
+
children: index.default.node.isRequired,
|
75
69
|
/**
|
76
70
|
* ref of condition builder
|
77
71
|
*/
|
78
72
|
/**@ts-ignore */
|
79
|
-
conditionBuilderRef: index
|
73
|
+
conditionBuilderRef: index.default.object,
|
80
74
|
/**
|
81
75
|
* This is an optional callback function that will be triggered when options array is not passed in the inputConfig against a property.
|
82
76
|
* This can be a asynchronous function that need to return a promise, so it will allow to fetch options from API call.
|
@@ -86,48 +80,48 @@ ConditionBuilderProvider.propTypes = {
|
|
86
80
|
id: 'id',
|
87
81
|
},...]
|
88
82
|
*/
|
89
|
-
getOptions: index
|
83
|
+
getOptions: index.default.func,
|
90
84
|
/**
|
91
85
|
* This is a mandatory prop that defines the input to the condition builder.
|
92
86
|
|
93
87
|
*/
|
94
88
|
/**@ts-ignore */
|
95
|
-
inputConfig: index
|
96
|
-
properties: index
|
97
|
-
id: index
|
98
|
-
label: index
|
99
|
-
icon: index
|
100
|
-
type: index
|
101
|
-
config: index
|
102
|
-
options: index
|
103
|
-
id: index
|
104
|
-
label: index
|
105
|
-
icon: index
|
89
|
+
inputConfig: index.default.shape({
|
90
|
+
properties: index.default.arrayOf(index.default.shape({
|
91
|
+
id: index.default.string.isRequired,
|
92
|
+
label: index.default.string.isRequired,
|
93
|
+
icon: index.default.oneOfType([index.default.func, index.default.object]),
|
94
|
+
type: index.default.oneOf(['text', 'textarea', 'number', 'date', 'option', 'time', 'custom']).isRequired,
|
95
|
+
config: index.default.shape({
|
96
|
+
options: index.default.arrayOf(index.default.shape({
|
97
|
+
id: index.default.string.isRequired,
|
98
|
+
label: index.default.string.isRequired,
|
99
|
+
icon: index.default.oneOfType([index.default.func, index.default.object])
|
106
100
|
})),
|
107
|
-
component: index
|
108
|
-
operators: index
|
109
|
-
id: index
|
110
|
-
label: index
|
101
|
+
component: index.default.func,
|
102
|
+
operators: index.default.arrayOf(index.default.shape({
|
103
|
+
id: index.default.string.isRequired,
|
104
|
+
label: index.default.string.isRequired
|
111
105
|
})),
|
112
|
-
long: index
|
106
|
+
long: index.default.bool
|
113
107
|
})
|
114
108
|
}))
|
115
109
|
}).isRequired,
|
116
110
|
/**
|
117
111
|
* Provide an mandatory numeric value that will be used to enable search option in the popovers with list.
|
118
112
|
*/
|
119
|
-
popOverSearchThreshold: index
|
113
|
+
popOverSearchThreshold: index.default.number.isRequired,
|
120
114
|
/**
|
121
115
|
* Optional prop if you want to pass translation to the texts used . Otherwise this will the defined defaults.
|
122
116
|
* This callback function will receive the message id and you need to return the corresponding text for that id.
|
123
117
|
* The message key will be one of [ "ifText", "addConditionText", "addConditionGroupText", "addSubgroupText", "conditionText", "propertyText", "operatorText", "valueText", "connectorText", "conditionRowText", "removeConditionText", "addConditionRowText", "startText", "endText", "clearSearchText", "actionsText", "then", "removeActionText", "addActionText", "invalidText", "invalidNumberWarnText"
|
124
118
|
]
|
125
119
|
*/
|
126
|
-
translateWithId: index
|
120
|
+
translateWithId: index.default.func,
|
127
121
|
/**
|
128
122
|
* Provide the condition builder variant: Non-Hierarchical/ Hierarchical
|
129
123
|
*/
|
130
|
-
variant: index
|
124
|
+
variant: index.default.string.isRequired
|
131
125
|
};
|
132
126
|
|
133
127
|
exports.ConditionBuilderContext = ConditionBuilderContext;
|
@@ -7,8 +7,6 @@
|
|
7
7
|
|
8
8
|
'use strict';
|
9
9
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
11
|
-
|
12
10
|
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
13
11
|
var React = require('react');
|
14
12
|
var react = require('@carbon/react');
|
@@ -20,10 +18,6 @@ var ConditionBuilderProvider = require('../ConditionBuilderContext/ConditionBuil
|
|
20
18
|
var handleKeyboardEvents = require('../utils/handleKeyboardEvents.js');
|
21
19
|
var util = require('../utils/util.js');
|
22
20
|
|
23
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
24
|
-
|
25
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
26
|
-
|
27
21
|
var _excluded = ["children", "className", "label", "renderIcon", "title", "type", "showToolTip", "condition", "popOverClassName", "config", "renderChildren", "onChange"];
|
28
22
|
var ConditionBuilderItem = function ConditionBuilderItem(_ref) {
|
29
23
|
var children = _ref.children,
|
@@ -156,14 +150,14 @@ var ConditionBuilderItem = function ConditionBuilderItem(_ref) {
|
|
156
150
|
return addConditionText;
|
157
151
|
}
|
158
152
|
};
|
159
|
-
return /*#__PURE__*/
|
153
|
+
return /*#__PURE__*/React.createElement(react.Popover, {
|
160
154
|
open: open,
|
161
155
|
isTabTip: true,
|
162
156
|
role: "gridcell",
|
163
157
|
className: "".concat(popOverClassName, " ").concat(util.blockClass, "__popover"),
|
164
158
|
ref: popoverRef,
|
165
159
|
onRequestClose: closePopover
|
166
|
-
}, /*#__PURE__*/
|
160
|
+
}, /*#__PURE__*/React.createElement(ConditionBuilderButton.ConditionBuilderButton, _rollupPluginBabelHelpers.extends({
|
167
161
|
label: getLabel(),
|
168
162
|
hideLabel: !label ? true : false,
|
169
163
|
onClick: togglePopover,
|
@@ -173,14 +167,14 @@ var ConditionBuilderItem = function ConditionBuilderItem(_ref) {
|
|
173
167
|
renderIcon: renderIcon ? renderIcon : label == undefined ? icons.Add : undefined,
|
174
168
|
showToolTip: showToolTip,
|
175
169
|
isInvalid: isInvalid
|
176
|
-
}, rest)), open && /*#__PURE__*/
|
170
|
+
}, rest)), open && /*#__PURE__*/React.createElement(react.PopoverContent, {
|
177
171
|
className: "".concat(util.blockClass, "__popover-content-wrapper"),
|
178
172
|
role: "dialog",
|
179
173
|
"aria-label": title,
|
180
174
|
onKeyDown: handleKeyDownHandler
|
181
|
-
}, /*#__PURE__*/
|
175
|
+
}, /*#__PURE__*/React.createElement(react.Layer, null, /*#__PURE__*/React.createElement("h1", {
|
182
176
|
className: "".concat(util.blockClass, "__item__title")
|
183
|
-
}, title), /*#__PURE__*/
|
177
|
+
}, title), /*#__PURE__*/React.createElement("div", {
|
184
178
|
className: "".concat(util.blockClass, "__popover-content")
|
185
179
|
}, renderChildren ? renderChildren(popoverRef) : children))));
|
186
180
|
};
|
@@ -188,52 +182,52 @@ ConditionBuilderItem.propTypes = {
|
|
188
182
|
/**
|
189
183
|
* provide the contents of the popover
|
190
184
|
*/
|
191
|
-
children: index
|
185
|
+
children: index.default.node,
|
192
186
|
/**
|
193
187
|
* Provide an optional class to be applied to the containing node.
|
194
188
|
*/
|
195
|
-
className: index
|
189
|
+
className: index.default.string,
|
196
190
|
/**
|
197
191
|
* current condition state object
|
198
192
|
*/
|
199
|
-
condition: index
|
193
|
+
condition: index.default.object,
|
200
194
|
/**
|
201
195
|
* this is the config object again the current property from inputConfig
|
202
196
|
*/
|
203
197
|
|
204
|
-
config: index
|
198
|
+
config: index.default.object,
|
205
199
|
/**
|
206
200
|
* text to be displayed in the field
|
207
201
|
*/
|
208
|
-
label: index
|
202
|
+
label: index.default.oneOfType([index.default.string, index.default.array, index.default.object]),
|
209
203
|
/**
|
210
204
|
* callback to update the current condition of the state tree
|
211
205
|
*/
|
212
|
-
onChange: index
|
206
|
+
onChange: index.default.func,
|
213
207
|
/**
|
214
208
|
* class name for popover
|
215
209
|
*/
|
216
|
-
popOverClassName: index
|
210
|
+
popOverClassName: index.default.string,
|
217
211
|
/**
|
218
212
|
* callback prop that returns the jsx for children
|
219
213
|
*/
|
220
|
-
renderChildren: index
|
214
|
+
renderChildren: index.default.func,
|
221
215
|
/**
|
222
216
|
* Optional prop to allow overriding the icon rendering.
|
223
217
|
*/
|
224
|
-
renderIcon: index
|
218
|
+
renderIcon: index.default.oneOfType([index.default.func, index.default.object]),
|
225
219
|
/**
|
226
220
|
* show tool tip
|
227
221
|
*/
|
228
|
-
showToolTip: index
|
222
|
+
showToolTip: index.default.bool,
|
229
223
|
/**
|
230
224
|
* title of the popover
|
231
225
|
*/
|
232
|
-
title: index
|
226
|
+
title: index.default.string,
|
233
227
|
/**
|
234
228
|
* input type
|
235
229
|
*/
|
236
|
-
type: index
|
230
|
+
type: index.default.string
|
237
231
|
};
|
238
232
|
|
239
233
|
exports.ConditionBuilderItem = ConditionBuilderItem;
|
@@ -7,8 +7,6 @@
|
|
7
7
|
|
8
8
|
'use strict';
|
9
9
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
11
|
-
|
12
10
|
var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
|
13
11
|
var React = require('react');
|
14
12
|
var react = require('@carbon/react');
|
@@ -16,10 +14,6 @@ var index = require('../../../../node_modules/prop-types/index.js');
|
|
16
14
|
var useTranslations = require('../../utils/useTranslations.js');
|
17
15
|
var util = require('../../utils/util.js');
|
18
16
|
|
19
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
20
|
-
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
22
|
-
|
23
17
|
var ConditionBuilderItemDate = function ConditionBuilderItemDate(_ref) {
|
24
18
|
var conditionState = _ref.conditionState,
|
25
19
|
onChange = _ref.onChange,
|
@@ -33,31 +27,31 @@ var ConditionBuilderItemDate = function ConditionBuilderItemDate(_ref) {
|
|
33
27
|
var onCloseHandler = function onCloseHandler(selectedDate) {
|
34
28
|
onChange(selectedDate && selectedDate.length > 0 ? selectedDate : 'INVALID');
|
35
29
|
};
|
36
|
-
return /*#__PURE__*/
|
30
|
+
return /*#__PURE__*/React.createElement("div", {
|
37
31
|
className: "".concat(util.blockClass, "__item-date ")
|
38
|
-
}, datePickerType == 'single' && /*#__PURE__*/
|
32
|
+
}, datePickerType == 'single' && /*#__PURE__*/React.createElement(react.DatePicker, {
|
39
33
|
ref: DatePickerInputRef,
|
40
34
|
dateFormat: "d/m/Y",
|
41
35
|
datePickerType: "single",
|
42
36
|
value: conditionState.value,
|
43
37
|
onClose: onCloseHandler,
|
44
38
|
appendTo: parentRef === null || parentRef === void 0 ? void 0 : parentRef.current
|
45
|
-
}, /*#__PURE__*/
|
39
|
+
}, /*#__PURE__*/React.createElement(react.DatePickerInput, {
|
46
40
|
id: "datePicker",
|
47
41
|
placeholder: "dd/mm/yyyy",
|
48
42
|
labelText: conditionState.property
|
49
|
-
})), datePickerType == 'range' && /*#__PURE__*/
|
43
|
+
})), datePickerType == 'range' && /*#__PURE__*/React.createElement(react.DatePicker, {
|
50
44
|
ref: DatePickerInputRef,
|
51
45
|
dateFormat: "d/m/Y",
|
52
46
|
datePickerType: datePickerType,
|
53
47
|
onClose: onCloseHandler,
|
54
48
|
value: conditionState.value,
|
55
49
|
appendTo: parentRef === null || parentRef === void 0 ? void 0 : parentRef.current
|
56
|
-
}, /*#__PURE__*/
|
50
|
+
}, /*#__PURE__*/React.createElement(react.DatePickerInput, {
|
57
51
|
id: "datePickerStart",
|
58
52
|
placeholder: "dd/mm/yyyy",
|
59
53
|
labelText: startText
|
60
|
-
}), /*#__PURE__*/
|
54
|
+
}), /*#__PURE__*/React.createElement(react.DatePickerInput, {
|
61
55
|
id: "datePickerEnd",
|
62
56
|
placeholder: "dd/mm/yyyy",
|
63
57
|
labelText: endText
|
@@ -67,15 +61,15 @@ ConditionBuilderItemDate.propTypes = {
|
|
67
61
|
/**
|
68
62
|
* current condition object
|
69
63
|
*/
|
70
|
-
conditionState: index
|
64
|
+
conditionState: index.default.object,
|
71
65
|
/**
|
72
66
|
* callback to update state oin date change
|
73
67
|
*/
|
74
|
-
onChange: index
|
68
|
+
onChange: index.default.func,
|
75
69
|
/**
|
76
70
|
* reference to the popover node
|
77
71
|
*/
|
78
|
-
parentRef: index
|
72
|
+
parentRef: index.default.object
|
79
73
|
};
|
80
74
|
|
81
75
|
exports.ConditionBuilderItemDate = ConditionBuilderItemDate;
|