@carbon/ibm-products 2.43.2-canary.1 → 2.43.2-canary.100
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +428 -143
- 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 +218 -9
- 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 +248 -105
- 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 +349 -129
- 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/ActionBarItem.js +1 -1
- package/es/components/Coachmark/Coachmark.d.ts +6 -1
- package/es/components/Coachmark/Coachmark.js +47 -11
- package/es/components/Coachmark/CoachmarkOverlay.js +2 -4
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -7
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
- package/es/components/CoachmarkStack/CoachmarkStack.js +7 -3
- package/es/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +76 -55
- package/es/components/ConditionBuilder/ConditionBuilder.js +82 -25
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +154 -0
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +29 -13
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +8 -1
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +30 -8
- package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +14 -9
- package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +19 -11
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -13
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +75 -62
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +13 -7
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +31 -8
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +8 -2
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +35 -24
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +40 -36
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +40 -36
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +6 -2
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +98 -40
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +27 -9
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +114 -0
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +71 -38
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +22 -9
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +121 -40
- package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
- package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +45 -19
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +2 -1
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +137 -40
- package/es/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
- package/es/components/ConditionBuilder/utils/useTranslations.js +26 -0
- package/es/components/ConditionBuilder/utils/util.d.ts +6 -4
- package/es/components/ConditionBuilder/utils/util.js +42 -17
- package/es/components/CreateFullPage/CreateFullPage.js +2 -2
- package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +26 -0
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +140 -54
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +25 -1
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +50 -9
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +16 -0
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +32 -8
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +4 -1
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.d.ts +3 -1
- package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +15 -3
- package/es/components/DataSpreadsheet/types/index.d.ts +2 -1
- package/es/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +34 -2
- package/es/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
- package/es/components/Datagrid/Datagrid/Datagrid.js +4 -9
- package/es/components/Datagrid/Datagrid/DatagridContent.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -8
- package/es/components/Datagrid/Datagrid/DatagridRow.js +21 -8
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -1
- package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +34 -10
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +7 -4
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +54 -17
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +75 -12
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
- package/es/components/Datagrid/types/index.d.ts +61 -9
- package/es/components/Datagrid/useActionsColumn.d.ts +8 -1
- package/es/components/Datagrid/useActionsColumn.js +7 -6
- package/es/components/Datagrid/useColumnCenterAlign.d.ts +8 -1
- package/es/components/Datagrid/useColumnCenterAlign.js +1 -1
- package/es/components/Datagrid/useColumnRightAlign.d.ts +8 -1
- package/es/components/Datagrid/useColumnRightAlign.js +4 -3
- package/es/components/Datagrid/useCustomizeColumns.d.ts +8 -1
- package/es/components/Datagrid/useCustomizeColumns.js +4 -3
- package/es/components/Datagrid/useDefaultStringRenderer.js +0 -1
- package/es/components/Datagrid/useDisableSelectRows.d.ts +2 -1
- package/es/components/Datagrid/useDisableSelectRows.js +27 -22
- package/es/components/Datagrid/useInlineEdit.d.ts +8 -1
- package/es/components/Datagrid/useInlineEdit.js +13 -3
- package/es/components/Datagrid/useNestedRowExpander.js +1 -3
- package/es/components/Datagrid/useNestedRows.js +32 -13
- package/es/components/Datagrid/useRowExpander.js +1 -3
- package/es/components/Datagrid/useSelectRows.js +2 -1
- package/es/components/Datagrid/useStickyColumn.d.ts +8 -1
- package/es/components/Datagrid/useStickyColumn.js +12 -9
- package/es/components/Decorator/Decorator.js +2 -1
- package/es/components/DecoratorBase/DecoratorBase.js +3 -5
- package/es/components/DecoratorDualButton/DecoratorDualButton.js +2 -1
- package/es/components/DecoratorLink/DecoratorLink.js +2 -1
- package/es/components/DecoratorSingleButton/DecoratorSingleButton.js +2 -1
- package/es/components/EditInPlace/EditInPlace.d.ts +4 -0
- package/es/components/EditInPlace/EditInPlace.js +21 -10
- package/es/components/EditTearsheet/EditTearsheet.d.ts +7 -2
- package/es/components/EditTearsheet/EditTearsheet.js +44 -10
- package/es/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
- package/es/components/EditTearsheet/EditTearsheetForm.js +3 -0
- package/es/components/EmptyStates/EmptyStateV2.d.ts +63 -2
- package/es/components/EmptyStates/EmptyStateV2.js +2 -1
- package/es/components/FullPageError/FullPageError.d.ts +36 -2
- package/es/components/FullPageError/FullPageError.js +0 -3
- package/es/components/GetStartedCard/GetStartedCard.d.ts +61 -2
- package/es/components/GetStartedCard/GetStartedCard.js +9 -8
- package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
- package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
- package/es/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
- package/es/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
- package/es/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
- package/es/components/Nav/NavItem.js +12 -3
- package/es/components/OptionsTile/OptionsTile.js +11 -6
- package/es/components/PageHeader/PageHeader.js +1 -0
- package/es/components/RemoveModal/RemoveModal.d.ts +4 -0
- package/es/components/RemoveModal/RemoveModal.js +7 -1
- package/es/components/SearchBar/SearchBar.d.ts +1 -1
- package/es/components/SearchBar/SearchBar.js +2 -2
- package/es/components/SidePanel/SidePanel.js +17 -21
- package/es/components/SidePanel/motion/variants.d.ts +4 -6
- package/es/components/SidePanel/motion/variants.js +10 -11
- package/es/components/StatusIndicator/StatusIndicatorStep.js +87 -0
- package/es/components/StringFormatter/StringFormatter.js +14 -3
- package/es/components/StringFormatter/utils/enums.d.ts +20 -1
- package/es/components/StringFormatter/utils/enums.js +22 -2
- package/es/components/TagOverflow/TagOverflow.d.ts +35 -4
- package/es/components/TagOverflow/TagOverflow.js +47 -64
- package/es/components/TagOverflow/TagOverflowModal.js +4 -6
- package/es/components/TagOverflow/TagOverflowPopover.d.ts +13 -1
- package/es/components/TagOverflow/TagOverflowPopover.js +38 -41
- package/es/components/Tearsheet/Tearsheet.d.ts +8 -1
- package/es/components/Tearsheet/Tearsheet.js +9 -1
- package/es/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
- package/es/components/Tearsheet/TearsheetNarrow.js +12 -0
- package/es/components/Tearsheet/TearsheetShell.d.ts +11 -1
- package/es/components/Tearsheet/TearsheetShell.js +28 -7
- package/es/components/Toolbar/ToolbarButton.js +1 -1
- package/es/components/WebTerminal/WebTerminal.js +10 -12
- package/es/components/index.d.ts +1 -1
- package/es/global/js/hooks/useFocus.d.ts +1 -0
- package/es/global/js/hooks/useFocus.js +5 -2
- package/es/global/js/hooks/usePrefersReducedMotion.js +14 -8
- package/es/global/js/package-settings.d.ts +1 -1
- package/es/global/js/package-settings.js +1 -1
- package/es/index.js +1 -0
- package/es/node_modules/@carbon/icon-helpers/es/index.js +49 -62
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1020 -1058
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-9.js +881 -758
- package/es/settings.d.ts +1 -1
- package/lib/components/ActionBar/ActionBarItem.js +1 -1
- package/lib/components/Coachmark/Coachmark.d.ts +6 -1
- package/lib/components/Coachmark/Coachmark.js +46 -10
- package/lib/components/Coachmark/CoachmarkOverlay.js +2 -4
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -7
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
- package/lib/components/CoachmarkStack/CoachmarkStack.js +7 -3
- package/lib/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +74 -53
- package/lib/components/ConditionBuilder/ConditionBuilder.js +82 -25
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +163 -0
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +28 -11
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +8 -1
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +29 -7
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +12 -7
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +18 -10
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -13
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +73 -60
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +13 -7
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +31 -8
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +8 -2
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +34 -24
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +40 -36
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +40 -36
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +6 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +96 -38
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +28 -10
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +122 -0
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +68 -35
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +21 -8
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +118 -37
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +44 -17
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +2 -1
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +137 -39
- package/lib/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
- package/lib/components/ConditionBuilder/utils/useTranslations.js +30 -0
- package/lib/components/ConditionBuilder/utils/util.d.ts +6 -4
- package/lib/components/ConditionBuilder/utils/util.js +44 -16
- package/lib/components/CreateFullPage/CreateFullPage.js +2 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +26 -0
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +140 -54
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +25 -1
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +50 -9
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +16 -0
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +32 -8
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +4 -1
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.d.ts +3 -1
- package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +15 -3
- package/lib/components/DataSpreadsheet/types/index.d.ts +2 -1
- package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +34 -2
- package/lib/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
- package/lib/components/Datagrid/Datagrid/Datagrid.js +4 -9
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -8
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +21 -8
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +34 -10
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +7 -4
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +53 -16
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +74 -11
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
- package/lib/components/Datagrid/types/index.d.ts +61 -9
- package/lib/components/Datagrid/useActionsColumn.d.ts +8 -1
- package/lib/components/Datagrid/useActionsColumn.js +7 -6
- package/lib/components/Datagrid/useColumnCenterAlign.d.ts +8 -1
- package/lib/components/Datagrid/useColumnCenterAlign.js +1 -1
- package/lib/components/Datagrid/useColumnRightAlign.d.ts +8 -1
- package/lib/components/Datagrid/useColumnRightAlign.js +4 -3
- package/lib/components/Datagrid/useCustomizeColumns.d.ts +8 -1
- package/lib/components/Datagrid/useCustomizeColumns.js +4 -3
- package/lib/components/Datagrid/useDefaultStringRenderer.js +0 -1
- package/lib/components/Datagrid/useDisableSelectRows.d.ts +2 -1
- package/lib/components/Datagrid/useDisableSelectRows.js +27 -22
- package/lib/components/Datagrid/useInlineEdit.d.ts +8 -1
- package/lib/components/Datagrid/useInlineEdit.js +13 -3
- package/lib/components/Datagrid/useNestedRowExpander.js +1 -3
- package/lib/components/Datagrid/useNestedRows.js +32 -13
- package/lib/components/Datagrid/useRowExpander.js +1 -3
- package/lib/components/Datagrid/useSelectRows.js +2 -1
- package/lib/components/Datagrid/useStickyColumn.d.ts +8 -1
- package/lib/components/Datagrid/useStickyColumn.js +12 -9
- package/lib/components/Decorator/Decorator.js +2 -1
- package/lib/components/DecoratorBase/DecoratorBase.js +3 -5
- package/lib/components/DecoratorDualButton/DecoratorDualButton.js +2 -1
- package/lib/components/DecoratorLink/DecoratorLink.js +2 -1
- package/lib/components/DecoratorSingleButton/DecoratorSingleButton.js +2 -1
- package/lib/components/EditInPlace/EditInPlace.d.ts +4 -0
- package/lib/components/EditInPlace/EditInPlace.js +21 -10
- package/lib/components/EditTearsheet/EditTearsheet.d.ts +7 -2
- package/lib/components/EditTearsheet/EditTearsheet.js +43 -9
- package/lib/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
- package/lib/components/EditTearsheet/EditTearsheetForm.js +3 -0
- package/lib/components/EmptyStates/EmptyStateV2.d.ts +63 -2
- package/lib/components/EmptyStates/EmptyStateV2.js +2 -1
- package/lib/components/FullPageError/FullPageError.d.ts +36 -2
- package/lib/components/FullPageError/FullPageError.js +0 -3
- package/lib/components/GetStartedCard/GetStartedCard.d.ts +61 -2
- package/lib/components/GetStartedCard/GetStartedCard.js +8 -7
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
- package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
- package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
- package/lib/components/Nav/NavItem.js +10 -1
- package/lib/components/OptionsTile/OptionsTile.js +11 -6
- package/lib/components/PageHeader/PageHeader.js +1 -0
- package/lib/components/RemoveModal/RemoveModal.d.ts +4 -0
- package/lib/components/RemoveModal/RemoveModal.js +7 -1
- package/lib/components/SearchBar/SearchBar.d.ts +1 -1
- package/lib/components/SearchBar/SearchBar.js +2 -2
- package/lib/components/SidePanel/SidePanel.js +16 -20
- package/lib/components/SidePanel/motion/variants.d.ts +4 -6
- package/lib/components/SidePanel/motion/variants.js +10 -11
- package/lib/components/StatusIndicator/StatusIndicatorStep.js +94 -0
- package/lib/components/StringFormatter/StringFormatter.js +13 -2
- package/lib/components/StringFormatter/utils/enums.d.ts +20 -1
- package/lib/components/StringFormatter/utils/enums.js +23 -1
- package/lib/components/TagOverflow/TagOverflow.d.ts +35 -4
- package/lib/components/TagOverflow/TagOverflow.js +46 -63
- package/lib/components/TagOverflow/TagOverflowModal.js +4 -6
- package/lib/components/TagOverflow/TagOverflowPopover.d.ts +13 -1
- package/lib/components/TagOverflow/TagOverflowPopover.js +37 -40
- package/lib/components/Tearsheet/Tearsheet.d.ts +8 -1
- package/lib/components/Tearsheet/Tearsheet.js +9 -1
- package/lib/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
- package/lib/components/Tearsheet/TearsheetNarrow.js +12 -0
- package/lib/components/Tearsheet/TearsheetShell.d.ts +11 -1
- package/lib/components/Tearsheet/TearsheetShell.js +26 -5
- package/lib/components/Toolbar/ToolbarButton.js +1 -1
- package/lib/components/WebTerminal/WebTerminal.js +10 -12
- package/lib/components/index.d.ts +1 -1
- package/lib/global/js/hooks/useFocus.d.ts +1 -0
- package/lib/global/js/hooks/useFocus.js +5 -1
- package/lib/global/js/hooks/usePrefersReducedMotion.js +13 -7
- package/lib/global/js/package-settings.d.ts +1 -1
- package/lib/global/js/package-settings.js +1 -1
- package/lib/index.js +5 -0
- package/lib/node_modules/@carbon/icon-helpers/es/index.js +49 -62
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1036 -1074
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-9.js +946 -823
- package/lib/settings.d.ts +1 -1
- package/package.json +9 -8
- package/scss/components/Coachmark/_coachmark-overlay.scss +6 -70
- package/scss/components/Coachmark/_coachmark.scss +5 -4
- package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +1 -3
- package/scss/components/ConditionBuilder/_condition-builder.scss +5 -1
- package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +20 -3
- package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +32 -3
- package/scss/components/CreateModal/_create-modal.scss +0 -4
- package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +17 -2
- package/scss/components/Datagrid/_datagrid.scss +0 -4
- package/scss/components/Datagrid/styles/_useInlineEdit.scss +13 -0
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +7 -5
- package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +5 -4
- package/scss/components/HTTPErrors/_http-errors.scss +77 -0
- package/scss/components/OptionsTile/_options-tile.scss +6 -6
- package/scss/components/SidePanel/_side-panel.scss +1 -1
- package/scss/components/StatusIcon/_status-icon.scss +4 -4
- package/scss/components/StringFormatter/_string-formatter.scss +2 -2
- package/scss/components/UserProfileImage/_user-profile-image.scss +6 -2
- package/scss/components/_index-released-only.scss +1 -0
- package/telemetry.yml +32 -19
- package/es/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
- package/es/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -16
- package/es/global/js/utils/window.d.ts +0 -2
- package/es/global/js/utils/window.js +0 -12
- package/lib/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
- package/lib/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -20
- package/lib/global/js/utils/window.d.ts +0 -2
- package/lib/global/js/utils/window.js +0 -16
@@ -5,7 +5,7 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
-
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
8
|
+
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, objectSpread2 as _objectSpread2, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
9
9
|
import React__default, { forwardRef, useState, useRef, useCallback, useEffect } from 'react';
|
10
10
|
import cx from 'classnames';
|
11
11
|
import PropTypes from '../../node_modules/prop-types/index.js';
|
@@ -17,8 +17,11 @@ import { useClickOutsideElement, useWindowEvent } from './utils/hooks.js';
|
|
17
17
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
18
18
|
import { pkg } from '../../settings.js';
|
19
19
|
import { throttle } from 'lodash';
|
20
|
+
import { Popover, PopoverContent } from '@carbon/react';
|
21
|
+
import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
|
22
|
+
|
23
|
+
var _excluded = ["align", "autoAlign", "children", "className", "onClose", "overlayClassName", "overlayKind", "overlayRef", "positionTune", "portalTarget", "target", "theme"];
|
20
24
|
|
21
|
-
var _excluded = ["align", "children", "className", "onClose", "overlayClassName", "overlayKind", "overlayRef", "portalTarget", "positionTune", "target", "theme"];
|
22
25
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
23
26
|
var blockClass = "".concat(pkg.prefix, "--coachmark");
|
24
27
|
var overlayBlockClass = "".concat(blockClass, "-overlay");
|
@@ -36,9 +39,10 @@ var defaults = {
|
|
36
39
|
*/
|
37
40
|
|
38
41
|
var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
39
|
-
var
|
42
|
+
var _positionTune$y, _positionTune$x;
|
40
43
|
var _ref$align = _ref.align,
|
41
44
|
align = _ref$align === void 0 ? defaults.align : _ref$align,
|
45
|
+
autoAlign = _ref.autoAlign,
|
42
46
|
children = _ref.children,
|
43
47
|
className = _ref.className,
|
44
48
|
_ref$onClose = _ref.onClose,
|
@@ -47,15 +51,14 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
47
51
|
_ref$overlayKind = _ref.overlayKind,
|
48
52
|
overlayKind = _ref$overlayKind === void 0 ? defaults.overlayKind : _ref$overlayKind,
|
49
53
|
overlayRef = _ref.overlayRef,
|
50
|
-
portalTarget = _ref.portalTarget,
|
51
54
|
positionTune = _ref.positionTune,
|
55
|
+
portalTarget = _ref.portalTarget,
|
52
56
|
target = _ref.target,
|
53
57
|
_ref$theme = _ref.theme,
|
54
58
|
theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
|
55
59
|
rest = _objectWithoutProperties(_ref, _excluded);
|
56
60
|
var isBeacon = overlayKind === COACHMARK_OVERLAY_KIND.TOOLTIP;
|
57
61
|
var isStacked = overlayKind === COACHMARK_OVERLAY_KIND.STACKED;
|
58
|
-
var portalNode = portalTarget ? (_document$querySelect = document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector('body') : document.querySelector('body');
|
59
62
|
var _useState = useState(isStacked),
|
60
63
|
_useState2 = _slicedToArray(_useState, 2),
|
61
64
|
isOpen = _useState2[0],
|
@@ -79,6 +82,11 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
79
82
|
var backupRef = useRef();
|
80
83
|
var _coachmarkRef = ref || backupRef;
|
81
84
|
var _overlayRef = overlayRef || overlayBackupRef;
|
85
|
+
var portalNode = useRef(null);
|
86
|
+
useIsomorphicEffect(function () {
|
87
|
+
var _document$querySelect, _document, _document2, _document3;
|
88
|
+
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
|
89
|
+
}, [portalTarget]);
|
82
90
|
var closeOverlay = function closeOverlay() {
|
83
91
|
setIsOpen(false);
|
84
92
|
};
|
@@ -120,6 +128,10 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
120
128
|
setShouldResetPosition(true);
|
121
129
|
}
|
122
130
|
};
|
131
|
+
var overlayPositionStyle = {
|
132
|
+
top: ((_positionTune$y = positionTune === null || positionTune === void 0 ? void 0 : positionTune.y) !== null && _positionTune$y !== void 0 ? _positionTune$y : 0) - 16,
|
133
|
+
left: ((_positionTune$x = positionTune === null || positionTune === void 0 ? void 0 : positionTune.x) !== null && _positionTune$x !== void 0 ? _positionTune$x : 0) - 16
|
134
|
+
};
|
123
135
|
var contextValue = {
|
124
136
|
buttonProps: {
|
125
137
|
'aria-expanded': isOpen,
|
@@ -135,7 +147,8 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
135
147
|
targetRect: targetRect,
|
136
148
|
targetOffset: targetOffset,
|
137
149
|
align: align,
|
138
|
-
positionTune: positionTune
|
150
|
+
positionTune: positionTune,
|
151
|
+
isOpen: isOpen
|
139
152
|
};
|
140
153
|
var handleResize = throttle(function () {
|
141
154
|
closeOverlay();
|
@@ -169,18 +182,35 @@ var Coachmark = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
169
182
|
}, /*#__PURE__*/React__default.createElement("div", _extends({
|
170
183
|
className: cx(blockClass, "".concat(blockClass, "__").concat(theme), className),
|
171
184
|
ref: _coachmarkRef
|
172
|
-
}, rest, getDevtoolsProps(componentName)), target, isOpen && /*#__PURE__*/createPortal( /*#__PURE__*/React__default.createElement(CoachmarkOverlay, {
|
185
|
+
}, rest, getDevtoolsProps(componentName)), overlayKind !== 'tooltip' ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, target, isOpen && (portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) && /*#__PURE__*/createPortal( /*#__PURE__*/React__default.createElement(CoachmarkOverlay, {
|
173
186
|
ref: _overlayRef,
|
174
187
|
fixedIsVisible: false,
|
175
188
|
kind: overlayKind,
|
176
189
|
onClose: handleClose,
|
177
190
|
theme: theme,
|
178
191
|
className: cx(overlayClassName, "".concat(overlayBlockClass, "--is-visible"))
|
179
|
-
}, children),
|
180
|
-
|
181
|
-
|
192
|
+
}, children), // Default to `document.body` when `portalNode` is `null`
|
193
|
+
portalNode === null || portalNode === void 0 ? void 0 : portalNode.current)) : /*#__PURE__*/React__default.createElement(Popover, {
|
194
|
+
highContrast: true,
|
195
|
+
caret: true,
|
196
|
+
style: _objectSpread2({
|
197
|
+
position: 'absolute'
|
198
|
+
}, overlayPositionStyle),
|
199
|
+
align: align,
|
200
|
+
autoAlign: autoAlign,
|
201
|
+
open: isOpen
|
202
|
+
}, target, /*#__PURE__*/React__default.createElement(PopoverContent, null, isOpen && /*#__PURE__*/React__default.createElement(CoachmarkOverlay, {
|
203
|
+
ref: _overlayRef,
|
204
|
+
fixedIsVisible: false,
|
205
|
+
kind: overlayKind,
|
206
|
+
onClose: handleClose,
|
207
|
+
theme: theme,
|
208
|
+
className: cx(overlayClassName, _defineProperty({}, "".concat(overlayBlockClass, "--is-visible"), isOpen))
|
209
|
+
}, children)))));
|
182
210
|
});
|
183
|
-
var overlayRefType = typeof HTMLElement === 'undefined' ? PropTypes.object :
|
211
|
+
var overlayRefType = typeof HTMLElement === 'undefined' ? PropTypes.object :
|
212
|
+
// eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
|
213
|
+
PropTypes.instanceOf(HTMLElement);
|
184
214
|
|
185
215
|
// Return a placeholder if not released and not enabled by feature flag
|
186
216
|
Coachmark = pkg.checkComponentEnabled(Coachmark, componentName);
|
@@ -199,6 +229,11 @@ Coachmark.propTypes = {
|
|
199
229
|
* @see COACHMARK_ALIGNMENT
|
200
230
|
*/
|
201
231
|
align: PropTypes.oneOf(['bottom', 'bottom-left', 'bottom-right', 'left', 'left-top', 'left-bottom', 'right', 'right-top', 'right-bottom', 'top', 'top-left', 'top-right']),
|
232
|
+
/**
|
233
|
+
* Auto aligns the coachmark based on screen boundaries
|
234
|
+
* Applies only to Tooltip Coachmarks.
|
235
|
+
*/
|
236
|
+
autoAlign: PropTypes.bool,
|
202
237
|
/**
|
203
238
|
* Coachmark should use a single CoachmarkOverlayElements component as a child.
|
204
239
|
* @see CoachmarkOverlayElements
|
@@ -237,6 +272,7 @@ Coachmark.propTypes = {
|
|
237
272
|
/**
|
238
273
|
* Fine tune the position of the target in pixels. Applies only to Beacons.
|
239
274
|
*/
|
275
|
+
// @ts-ignore
|
240
276
|
positionTune: PropTypes.shape({
|
241
277
|
x: PropTypes.number,
|
242
278
|
y: PropTypes.number
|
@@ -55,7 +55,7 @@ var CoachmarkOverlay = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
55
55
|
var coachmark = useCoachmark();
|
56
56
|
var isBeacon = kind === COACHMARK_OVERLAY_KIND.TOOLTIP;
|
57
57
|
var isDraggable = kind === COACHMARK_OVERLAY_KIND.FLOATING;
|
58
|
-
var isVisible = className
|
58
|
+
var isVisible = className === null || className === void 0 ? void 0 : className.includes('is-visible');
|
59
59
|
var handleKeyPress = function handleKeyPress(event) {
|
60
60
|
var shiftKey = event.shiftKey,
|
61
61
|
key = event.key;
|
@@ -163,9 +163,7 @@ var CoachmarkOverlay = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
163
163
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
164
164
|
isVisible: isVisible
|
165
165
|
});
|
166
|
-
}))
|
167
|
-
className: "".concat(blockClass, "__caret")
|
168
|
-
}));
|
166
|
+
})));
|
169
167
|
});
|
170
168
|
function getWindowDimensions() {
|
171
169
|
var _window = window,
|
@@ -26,7 +26,6 @@ var defaults = {
|
|
26
26
|
* Use beacon for the target prop of a Coachmark component.
|
27
27
|
*/
|
28
28
|
var CoachmarkBeacon = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
29
|
-
var _coachmark$positionTu, _coachmark$positionTu2, _coachmark$positionTu3, _coachmark$positionTu4;
|
30
29
|
var label = _ref.label,
|
31
30
|
className = _ref.className,
|
32
31
|
_ref$kind = _ref.kind,
|
@@ -36,14 +35,9 @@ var CoachmarkBeacon = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
|
|
36
35
|
if (!coachmark) {
|
37
36
|
return _div || (_div = /*#__PURE__*/React__default.createElement("div", null, "CoachmarkBeacon is to be use exclusively within the target prop of Coachmark"));
|
38
37
|
}
|
39
|
-
var overlayPositionStyle = {
|
40
|
-
top: (_coachmark$positionTu = (_coachmark$positionTu2 = coachmark.positionTune) === null || _coachmark$positionTu2 === void 0 ? void 0 : _coachmark$positionTu2.y) !== null && _coachmark$positionTu !== void 0 ? _coachmark$positionTu : 0,
|
41
|
-
left: (_coachmark$positionTu3 = (_coachmark$positionTu4 = coachmark.positionTune) === null || _coachmark$positionTu4 === void 0 ? void 0 : _coachmark$positionTu4.x) !== null && _coachmark$positionTu3 !== void 0 ? _coachmark$positionTu3 : 0
|
42
|
-
};
|
43
38
|
return /*#__PURE__*/React__default.createElement("span", _extends({}, rest, {
|
44
39
|
className: cx(blockClass, "".concat(blockClass, "-").concat(kind), className),
|
45
|
-
ref: ref
|
46
|
-
style: overlayPositionStyle
|
40
|
+
ref: ref
|
47
41
|
}, getDevtoolsProps(componentName), {
|
48
42
|
role: "tooltip"
|
49
43
|
}), /*#__PURE__*/React__default.createElement("button", _extends({
|
@@ -16,6 +16,8 @@ import { CoachmarkOverlay } from '../Coachmark/CoachmarkOverlay.js';
|
|
16
16
|
import { CoachmarkTagline } from '../Coachmark/CoachmarkTagline.js';
|
17
17
|
import { CoachmarkContext } from '../Coachmark/utils/context.js';
|
18
18
|
import { COACHMARK_OVERLAY_KIND } from '../Coachmark/utils/enums.js';
|
19
|
+
import { useReducedMotion } from 'framer-motion';
|
20
|
+
import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
|
19
21
|
|
20
22
|
var _excluded = ["children", "className", "onClose", "portalTarget", "tagline", "theme"];
|
21
23
|
// Carbon and package components we use.
|
@@ -39,7 +41,6 @@ var defaults = {
|
|
39
41
|
* This variant allows the a coachmark overlay to be displayed by interacting with the tagline.
|
40
42
|
*/
|
41
43
|
var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
42
|
-
var _document$querySelect;
|
43
44
|
var children = _ref.children,
|
44
45
|
className = _ref.className,
|
45
46
|
_ref$onClose = _ref.onClose,
|
@@ -51,7 +52,7 @@ var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
51
52
|
theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
|
52
53
|
rest = _objectWithoutProperties(_ref, _excluded);
|
53
54
|
var overlayRef = useRef(null);
|
54
|
-
var portalNode =
|
55
|
+
var portalNode = useRef(null);
|
55
56
|
var _useState = useState(false),
|
56
57
|
_useState2 = _slicedToArray(_useState, 2),
|
57
58
|
isOpen = _useState2[0],
|
@@ -75,17 +76,19 @@ var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
75
76
|
_useState10 = _slicedToArray(_useState9, 2),
|
76
77
|
fixedIsVisible = _useState10[0],
|
77
78
|
setFixedIsVisible = _useState10[1];
|
78
|
-
var
|
79
|
+
var shouldReduceMotion = useReducedMotion();
|
80
|
+
useIsomorphicEffect(function () {
|
81
|
+
var _document$querySelect, _document, _document2, _document3;
|
82
|
+
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
|
83
|
+
}, [portalTarget]);
|
79
84
|
var handleClose = useCallback(function () {
|
80
|
-
|
81
|
-
if (prefersReducedMotion.matches) {
|
85
|
+
if (shouldReduceMotion) {
|
82
86
|
setIsOpen(false);
|
83
87
|
} else {
|
84
88
|
setFixedIsVisible(false);
|
85
89
|
}
|
86
|
-
}, [
|
90
|
+
}, [shouldReduceMotion]);
|
87
91
|
var handleTransitionEnd = function handleTransitionEnd(e) {
|
88
|
-
console.log('Here at transition end... ', e.propertyName === 'transform' && !fixedIsVisible);
|
89
92
|
if (e.propertyName === 'transform' && !fixedIsVisible) {
|
90
93
|
setIsOpen(false);
|
91
94
|
onClose();
|
@@ -164,7 +167,7 @@ var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
164
167
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement(CoachmarkTagline, {
|
165
168
|
title: tagline,
|
166
169
|
onClose: onClose
|
167
|
-
}), isOpen && /*#__PURE__*/createPortal( /*#__PURE__*/React__default.createElement(CoachmarkOverlay, {
|
170
|
+
}), isOpen && (portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) && /*#__PURE__*/createPortal( /*#__PURE__*/React__default.createElement(CoachmarkOverlay, {
|
168
171
|
ref: overlayRef,
|
169
172
|
fixedIsVisible: fixedIsVisible,
|
170
173
|
kind: COACHMARK_OVERLAY_KIND.FIXED,
|
@@ -172,9 +175,8 @@ var CoachmarkFixed = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
172
175
|
onTransitionEnd: handleTransitionEnd,
|
173
176
|
theme: theme,
|
174
177
|
className: cx(fixedIsVisible && "".concat(overlayBlockClass, "--is-visible"), overlayBlockClass)
|
175
|
-
}, children),
|
176
|
-
|
177
|
-
portalNode || document.body)));
|
178
|
+
}, children), // Default to `document.body` when `portalNode` is `null`
|
179
|
+
portalNode === null || portalNode === void 0 ? void 0 : portalNode.current)));
|
178
180
|
});
|
179
181
|
|
180
182
|
// Return a placeholder if not released and not enabled by feature flag
|
@@ -17,6 +17,7 @@ import { CoachmarkStackHome } from './CoachmarkStackHome.js';
|
|
17
17
|
import { CoachmarkTagline } from '../Coachmark/CoachmarkTagline.js';
|
18
18
|
import { CoachmarkContext } from '../Coachmark/utils/context.js';
|
19
19
|
import { COACHMARK_OVERLAY_KIND } from '../Coachmark/utils/enums.js';
|
20
|
+
import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
|
20
21
|
|
21
22
|
var _excluded = ["children", "className", "onClose", "description", "media", "navLinkLabels", "portalTarget", "closeButtonLabel", "tagline", "theme", "title"];
|
22
23
|
|
@@ -47,7 +48,6 @@ var defaults = {
|
|
47
48
|
* This variant allows the stacking of multiple coachmark overlays to be displayed by interacting with the tagline.
|
48
49
|
*/
|
49
50
|
var CoachmarkStack = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
50
|
-
var _document$querySelect;
|
51
51
|
var children = _ref.children,
|
52
52
|
className = _ref.className,
|
53
53
|
_ref$onClose = _ref.onClose,
|
@@ -63,7 +63,11 @@ var CoachmarkStack = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
63
63
|
theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
|
64
64
|
title = _ref.title,
|
65
65
|
rest = _objectWithoutProperties(_ref, _excluded);
|
66
|
-
var portalNode =
|
66
|
+
var portalNode = useRef();
|
67
|
+
useIsomorphicEffect(function () {
|
68
|
+
var _document$querySelect, _document, _document2, _document3;
|
69
|
+
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
|
70
|
+
}, [portalTarget]);
|
67
71
|
var stackHomeRef = useRef();
|
68
72
|
var stackedCoachmarkRefs = useRef([]);
|
69
73
|
var _useState = useState(false),
|
@@ -206,7 +210,7 @@ var CoachmarkStack = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
206
210
|
portalTarget: portalTarget,
|
207
211
|
closeButtonLabel: closeButtonLabel,
|
208
212
|
title: title
|
209
|
-
}), /*#__PURE__*/createPortal(wrappedChildren, portalNode)));
|
213
|
+
}), portalNode !== null && portalNode !== void 0 && portalNode.current ? /*#__PURE__*/createPortal(wrappedChildren, portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) : null));
|
210
214
|
});
|
211
215
|
|
212
216
|
// Return a placeholder if not released and not enabled by feature flag
|
@@ -16,6 +16,7 @@ import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
|
16
16
|
import { pkg } from '../../settings.js';
|
17
17
|
import { createPortal } from 'react-dom';
|
18
18
|
import { CoachmarkHeader } from '../Coachmark/CoachmarkHeader.js';
|
19
|
+
import { useIsomorphicEffect } from '../../global/js/hooks/useIsomorphicEffect.js';
|
19
20
|
import { SteppedAnimatedMedia } from '../SteppedAnimatedMedia/SteppedAnimatedMedia.js';
|
20
21
|
|
21
22
|
var _excluded = ["className", "description", "isOpen", "media", "navLinkLabels", "onClickNavItem", "onClose", "portalTarget", "closeButtonLabel", "title"];
|
@@ -33,7 +34,6 @@ var componentName = 'CoachmarkStackHome';
|
|
33
34
|
* of other Onboarding components.
|
34
35
|
*/
|
35
36
|
var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
36
|
-
var _document$querySelect;
|
37
37
|
var className = _ref.className,
|
38
38
|
description = _ref.description,
|
39
39
|
isOpen = _ref.isOpen,
|
@@ -57,11 +57,15 @@ var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
57
57
|
}
|
58
58
|
}, 100);
|
59
59
|
}, [isOpen]);
|
60
|
+
var portalNode = useRef();
|
61
|
+
useIsomorphicEffect(function () {
|
62
|
+
var _document$querySelect, _document, _document2, _document3;
|
63
|
+
portalNode.current = portalTarget ? (_document$querySelect = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('body') : (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelector('body');
|
64
|
+
}, [portalTarget]);
|
60
65
|
if (!navLinkLabels) {
|
61
66
|
return pconsole.warn("".concat(componentName, " is an Onboarding internal component and is not intended for general use."));
|
62
67
|
}
|
63
|
-
|
64
|
-
return /*#__PURE__*/createPortal( /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
68
|
+
return portalNode !== null && portalNode !== void 0 && portalNode.current ? /*#__PURE__*/createPortal( /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
65
69
|
className: cx(blockClass, className),
|
66
70
|
ref: ref,
|
67
71
|
role: "main"
|
@@ -103,7 +107,7 @@ var CoachmarkStackHome = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
103
107
|
setLinkFocusIndex(0);
|
104
108
|
_onClose();
|
105
109
|
}
|
106
|
-
}, closeButtonLabel))))), portalNode);
|
110
|
+
}, closeButtonLabel))))), portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) : null;
|
107
111
|
function renderNavLink(index, label) {
|
108
112
|
var ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
109
113
|
return /*#__PURE__*/React__default.createElement("li", {
|
@@ -10,8 +10,7 @@ import React__default, { useContext, useState } from 'react';
|
|
10
10
|
import { Close } from '@carbon/react/icons';
|
11
11
|
import { ConditionBuilderItem } from '../ConditionBuilderItem/ConditionBuilderItem.js';
|
12
12
|
import PropTypes from '../../../node_modules/prop-types/index.js';
|
13
|
-
import { blockClass,
|
14
|
-
import { ConditionBuilderItemOption } from '../ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js';
|
13
|
+
import { blockClass, statementConfig, operatorConfig } from '../ConditionBuilderContext/DataConfigs.js';
|
15
14
|
import cx from 'classnames';
|
16
15
|
import ConditionConnector from '../ConditionBuilderConnector/ConditionConnector.js';
|
17
16
|
import { ConditionBuilderItemNumber } from '../ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js';
|
@@ -19,11 +18,15 @@ import { ConditionBuilderItemText } from '../ConditionBuilderItem/ConditionBuild
|
|
19
18
|
import { ConditionBuilderItemDate } from '../ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js';
|
20
19
|
import { ConditionBuilderContext } from '../ConditionBuilderContext/ConditionBuilderProvider.js';
|
21
20
|
import { ConditionBuilderButton } from '../ConditionBuilderButton/ConditionBuilderButton.js';
|
22
|
-
import { focusThisField } from '../utils/util.js';
|
21
|
+
import { checkIsValid, focusThisField } from '../utils/util.js';
|
23
22
|
import { ConditionBuilderItemTime } from '../ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js';
|
24
23
|
import ConditionBuilderAdd from '../ConditionBuilderAdd/ConditionBuilderAdd.js';
|
24
|
+
import { ItemOption } from '../ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js';
|
25
|
+
import { ItemOptionForValueField } from '../ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js';
|
26
|
+
import { useTranslations } from '../utils/useTranslations.js';
|
25
27
|
|
26
28
|
var _div;
|
29
|
+
|
27
30
|
/**
|
28
31
|
* This component build each block of condition consisting of property, operator value and close button.
|
29
32
|
*/
|
@@ -52,41 +55,46 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
52
55
|
isLastCondition = props.isLastCondition;
|
53
56
|
var _useContext = useContext(ConditionBuilderContext),
|
54
57
|
inputConfig = _useContext.inputConfig,
|
55
|
-
variant = _useContext.variant
|
56
|
-
|
57
|
-
var itemComponents = {
|
58
|
-
option: ConditionBuilderItemOption,
|
59
|
-
text: ConditionBuilderItemText,
|
60
|
-
number: ConditionBuilderItemNumber,
|
61
|
-
date: ConditionBuilderItemDate,
|
62
|
-
time: ConditionBuilderItemTime
|
63
|
-
};
|
58
|
+
variant = _useContext.variant,
|
59
|
+
conditionBuilderRef = _useContext.conditionBuilderRef;
|
64
60
|
var _useState = useState(false),
|
65
61
|
_useState2 = _slicedToArray(_useState, 2),
|
66
62
|
showDeletionPreview = _useState2[0],
|
67
63
|
setShowDeletionPreview = _useState2[1];
|
64
|
+
var _useTranslations = useTranslations(['conditionRowText', 'conditionText', 'propertyText', 'operatorText', 'removeConditionText']),
|
65
|
+
_useTranslations2 = _slicedToArray(_useTranslations, 5),
|
66
|
+
conditionRowText = _useTranslations2[0],
|
67
|
+
conditionText = _useTranslations2[1],
|
68
|
+
propertyText = _useTranslations2[2],
|
69
|
+
operatorText = _useTranslations2[3],
|
70
|
+
removeConditionText = _useTranslations2[4];
|
68
71
|
|
69
72
|
//filtering the current property to access its properties and config options
|
70
73
|
var getCurrentConfig = function getCurrentConfig(property) {
|
71
74
|
var _inputConfig$properti, _inputConfig$properti2;
|
72
|
-
return (_inputConfig$properti = (_inputConfig$properti2 = inputConfig.properties) === null || _inputConfig$properti2 === void 0 ? void 0 : _inputConfig$properti2.
|
75
|
+
return (_inputConfig$properti = (_inputConfig$properti2 = inputConfig.properties) === null || _inputConfig$properti2 === void 0 ? void 0 : _inputConfig$properti2.find(function (eachProperty) {
|
73
76
|
return eachProperty.id == property;
|
74
|
-
})
|
77
|
+
})) !== null && _inputConfig$properti !== void 0 ? _inputConfig$properti : {};
|
75
78
|
};
|
76
79
|
var _getCurrentConfig = getCurrentConfig(property),
|
77
80
|
icon = _getCurrentConfig.icon,
|
78
81
|
type = _getCurrentConfig.type,
|
79
82
|
config = _getCurrentConfig.config,
|
80
83
|
label = _getCurrentConfig.label;
|
81
|
-
var ItemComponent;
|
82
|
-
// if (type == 'custom') {
|
83
|
-
// ItemComponent = config.component;
|
84
|
-
// } else {
|
85
|
-
ItemComponent = property ? itemComponents[type] : null;
|
86
|
-
//}
|
87
84
|
|
85
|
+
//Below possible input types expected for value field.
|
86
|
+
var itemComponents = {
|
87
|
+
text: ConditionBuilderItemText,
|
88
|
+
number: ConditionBuilderItemNumber,
|
89
|
+
date: ConditionBuilderItemDate,
|
90
|
+
time: ConditionBuilderItemTime,
|
91
|
+
option: ItemOptionForValueField,
|
92
|
+
custom: config === null || config === void 0 ? void 0 : config.component,
|
93
|
+
textarea: ConditionBuilderItemText
|
94
|
+
};
|
95
|
+
var ItemComponent = property ? itemComponents[type] : null;
|
88
96
|
var onStatementChangeHandler = function onStatementChangeHandler(v, evt) {
|
89
|
-
focusThisField(evt);
|
97
|
+
focusThisField(evt, conditionBuilderRef);
|
90
98
|
onStatementChange(v);
|
91
99
|
};
|
92
100
|
var onPropertyChangeHandler = function onPropertyChangeHandler(newProperty) {
|
@@ -94,20 +102,22 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
94
102
|
property: newProperty,
|
95
103
|
operator: undefined,
|
96
104
|
value: '',
|
97
|
-
popoverToOpen: 'operatorField'
|
105
|
+
popoverToOpen: checkIsValid(newProperty) ? 'operatorField' : ''
|
98
106
|
}));
|
99
107
|
};
|
100
108
|
var onOperatorChangeHandler = function onOperatorChangeHandler(newOperator) {
|
101
109
|
onChange(_objectSpread2(_objectSpread2({}, condition), {}, {
|
102
110
|
operator: newOperator,
|
103
111
|
value: undefined,
|
104
|
-
popoverToOpen: 'valueField'
|
112
|
+
popoverToOpen: checkIsValid(newOperator) ? 'valueField' : ''
|
105
113
|
}));
|
106
114
|
};
|
107
|
-
var onValueChangeHandler = function onValueChangeHandler(newValue) {
|
108
|
-
|
109
|
-
|
110
|
-
|
115
|
+
var onValueChangeHandler = function onValueChangeHandler(newValue, evt) {
|
116
|
+
var currentCondition = _objectSpread2({}, condition);
|
117
|
+
delete currentCondition.popoverToOpen;
|
118
|
+
focusThisField(evt, conditionBuilderRef);
|
119
|
+
onChange(_objectSpread2(_objectSpread2({}, currentCondition), {}, {
|
120
|
+
value: newValue
|
111
121
|
}));
|
112
122
|
};
|
113
123
|
var handleShowDeletionPreview = function handleShowDeletionPreview() {
|
@@ -117,6 +127,9 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
117
127
|
setShowDeletionPreview(false);
|
118
128
|
};
|
119
129
|
var getOperators = function getOperators() {
|
130
|
+
if (config !== null && config !== void 0 && config.operators) {
|
131
|
+
return config.operators;
|
132
|
+
}
|
120
133
|
return operatorConfig.filter(function (operator) {
|
121
134
|
return operator.type.indexOf(type) != -1 || operator.type == 'all';
|
122
135
|
});
|
@@ -128,11 +141,24 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
128
141
|
'aria-setsize': aria.setsize
|
129
142
|
} : {};
|
130
143
|
};
|
144
|
+
var renderChildren = function renderChildren(popoverRef) {
|
145
|
+
return /*#__PURE__*/React__default.createElement(ItemComponent, {
|
146
|
+
conditionState: {
|
147
|
+
property: property,
|
148
|
+
operator: operator,
|
149
|
+
value: value
|
150
|
+
},
|
151
|
+
onChange: onValueChangeHandler,
|
152
|
+
config: config,
|
153
|
+
"data-name": "valueField",
|
154
|
+
parentRef: popoverRef,
|
155
|
+
type: type
|
156
|
+
});
|
157
|
+
};
|
131
158
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
132
159
|
className: cx("".concat(blockClass, "__condition-block"), _defineProperty({}, "".concat(blockClass, "__condition__deletion-preview"), showDeletionPreview), _defineProperty({}, "".concat(blockClass, "__gap-bottom"), variant == 'tree' && !(conditionIndex + 1 >= group.conditions.length)), _defineProperty({}, "".concat(blockClass, "__gap ").concat(blockClass, "__gap-bottom"), variant == 'sentence')),
|
133
160
|
role: "row",
|
134
|
-
"aria-label":
|
135
|
-
tabIndex: -1
|
161
|
+
"aria-label": conditionRowText
|
136
162
|
}, getAriaAttributes()), conjunction ? /*#__PURE__*/React__default.createElement(ConditionConnector, {
|
137
163
|
className: "".concat(blockClass, "__gap"),
|
138
164
|
operator: conjunction,
|
@@ -143,74 +169,69 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
143
169
|
role: "gridcell"
|
144
170
|
})), isStatement && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
145
171
|
label: group.statement,
|
146
|
-
title:
|
172
|
+
title: conditionText,
|
147
173
|
"data-name": "connectorField",
|
148
174
|
popOverClassName: "".concat(blockClass, "__gap"),
|
149
175
|
className: "".concat(blockClass, "__statement-button")
|
150
|
-
}, /*#__PURE__*/React__default.createElement(
|
176
|
+
}, /*#__PURE__*/React__default.createElement(ItemOption, {
|
151
177
|
conditionState: {
|
152
178
|
value: group.statement,
|
153
|
-
label:
|
179
|
+
label: conditionText
|
154
180
|
},
|
155
181
|
onChange: onStatementChangeHandler,
|
156
182
|
config: {
|
157
183
|
options: statementConfig
|
158
184
|
}
|
159
185
|
})), /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
160
|
-
label: label,
|
161
|
-
title:
|
186
|
+
label: label !== null && label !== void 0 ? label : condition === null || condition === void 0 ? void 0 : condition.property,
|
187
|
+
title: propertyText,
|
162
188
|
renderIcon: icon !== null && icon !== void 0 ? icon : null,
|
163
189
|
className: "".concat(blockClass, "__property-field"),
|
164
190
|
"data-name": "propertyField",
|
165
191
|
condition: condition,
|
166
|
-
type: type
|
167
|
-
|
192
|
+
type: type,
|
193
|
+
onChange: onPropertyChangeHandler
|
194
|
+
}, /*#__PURE__*/React__default.createElement(ItemOption, {
|
168
195
|
conditionState: {
|
169
196
|
value: property,
|
170
|
-
label:
|
197
|
+
label: propertyText
|
171
198
|
},
|
172
199
|
onChange: onPropertyChangeHandler,
|
173
200
|
config: {
|
174
201
|
options: inputConfig.properties
|
175
202
|
}
|
176
|
-
})), property && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
203
|
+
})), checkIsValid(property) && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
177
204
|
label: operator,
|
178
|
-
title:
|
205
|
+
title: operatorText,
|
179
206
|
"data-name": "operatorField",
|
180
207
|
condition: condition,
|
181
|
-
type: type
|
182
|
-
|
208
|
+
type: type,
|
209
|
+
onChange: onOperatorChangeHandler
|
210
|
+
}, /*#__PURE__*/React__default.createElement(ItemOption, {
|
183
211
|
config: {
|
184
212
|
options: getOperators()
|
185
213
|
},
|
186
214
|
conditionState: {
|
187
215
|
value: operator,
|
188
|
-
label:
|
216
|
+
label: operatorText
|
189
217
|
},
|
190
218
|
onChange: onOperatorChangeHandler
|
191
|
-
})), property && operator && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
219
|
+
})), checkIsValid(property) && checkIsValid(operator) && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
192
220
|
label: value,
|
193
221
|
type: type,
|
194
222
|
title: label,
|
195
223
|
showToolTip: true,
|
196
224
|
"data-name": "valueField",
|
197
225
|
condition: condition,
|
198
|
-
config: config
|
199
|
-
}, /*#__PURE__*/React__default.createElement(ItemComponent, {
|
200
|
-
conditionState: {
|
201
|
-
property: property,
|
202
|
-
operator: operator,
|
203
|
-
value: value
|
204
|
-
},
|
205
|
-
onChange: onValueChangeHandler,
|
206
226
|
config: config,
|
207
|
-
|
208
|
-
|
227
|
+
onChange: onValueChangeHandler,
|
228
|
+
renderChildren: renderChildren
|
229
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
209
230
|
role: "gridcell",
|
210
|
-
"aria-label":
|
231
|
+
"aria-label": removeConditionText
|
211
232
|
}, /*#__PURE__*/React__default.createElement(ConditionBuilderButton, {
|
212
233
|
hideLabel: true,
|
213
|
-
label:
|
234
|
+
label: removeConditionText,
|
214
235
|
onClick: onRemove,
|
215
236
|
onMouseEnter: handleShowDeletionPreview,
|
216
237
|
onMouseLeave: handleHideDeletionPreview,
|