@carbon/ibm-products 2.33.0 → 2.35.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +31990 -32061
- 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 +38 -17
- 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 +636 -24096
- 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 +2342 -17830
- 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/ActionSet/ActionSet.d.ts +38 -2
- package/es/components/ActionSet/ActionSet.js +3 -5
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
- package/es/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
- package/es/components/ConditionBuilder/ConditionBuilder.js +125 -0
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +92 -0
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +88 -0
- package/es/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
- package/es/components/ConditionBuilder/index.d.ts +1 -0
- package/es/components/CreateFullPage/CreateFullPage.js +3 -19
- package/es/components/CreateFullPage/CreateFullPageStep.js +22 -7
- package/es/components/CreateSidePanel/CreateSidePanel.d.ts +81 -2
- package/es/components/CreateSidePanel/CreateSidePanel.js +5 -2
- package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +5 -117
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +12 -111
- package/es/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
- package/es/components/DataSpreadsheet/utils/commonEventHandlers.js +304 -0
- package/es/components/Datagrid/Datagrid/DatagridContent.js +2 -1
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
- package/es/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +6 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
- package/es/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
- package/es/components/Datagrid/useEditableCell.js +15 -0
- package/es/components/DelimitedList/DelimitedList.d.ts +27 -2
- package/es/components/DelimitedList/DelimitedList.js +0 -1
- package/es/components/EditInPlace/EditInPlace.d.ts +97 -5
- package/es/components/EditInPlace/EditInPlace.js +10 -6
- package/es/components/EditSidePanel/EditSidePanel.d.ts +92 -2
- package/es/components/EditSidePanel/EditSidePanel.js +8 -10
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
- package/es/components/ExportModal/ExportModal.d.ts +110 -2
- package/es/components/ExportModal/ExportModal.js +10 -4
- package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +83 -0
- package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +94 -0
- package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +8 -10
- package/es/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
- package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
- package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +157 -0
- package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +72 -0
- package/es/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +2 -2
- package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +92 -0
- package/es/components/FilterPanel/index.d.ts +5 -0
- package/es/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
- package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
- package/es/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
- package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
- package/es/components/ImportModal/ImportModal.d.ts +136 -2
- package/es/components/ImportModal/ImportModal.js +3 -2
- package/es/components/InlineTip/InlineTip.d.ts +90 -2
- package/es/components/InlineTip/InlineTip.js +3 -2
- package/es/components/Nav/Nav.js +1 -1
- package/es/components/Nav/NavList.js +7 -7
- package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
- package/es/components/OptionsTile/OptionsTile.d.ts +77 -3
- package/es/components/OptionsTile/OptionsTile.js +9 -20
- package/es/components/PageHeader/PageHeader.js +3 -3
- package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/es/components/PageHeader/PageHeaderUtils.js +4 -3
- package/es/components/RemoveModal/RemoveModal.d.ts +81 -7
- package/es/components/RemoveModal/RemoveModal.js +1 -0
- package/es/components/ScrollGradient/ScrollGradient.d.ts +5 -0
- package/es/components/ScrollGradient/ScrollGradient.js +156 -0
- package/es/components/ScrollGradient/constants.d.ts +15 -0
- package/es/components/ScrollGradient/constants.js +121 -0
- package/es/components/ScrollGradient/index.d.ts +1 -0
- package/es/components/SidePanel/SidePanel.d.ts +144 -2
- package/es/components/SidePanel/SidePanel.js +100 -75
- package/es/components/StatusIcon/StatusIcon.d.ts +34 -2
- package/es/components/StatusIcon/StatusIcon.js +97 -95
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
- package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/es/components/TagOverflow/TagOverflow.js +209 -0
- package/es/components/TagOverflow/constants.d.ts +14 -0
- package/es/components/TagOverflow/constants.js +30 -0
- package/es/components/TagOverflow/index.d.ts +1 -0
- package/es/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
- package/es/components/Tearsheet/TearsheetNarrow.js +6 -1
- package/es/components/Toolbar/Toolbar.d.ts +23 -5
- package/es/components/Toolbar/Toolbar.js +30 -26
- package/es/components/TruncatedList/TruncatedList.js +5 -3
- package/es/components/UserAvatar/UserAvatar.js +7 -4
- package/es/components/index.d.ts +5 -2
- package/es/global/js/package-settings.d.ts +8 -0
- package/es/global/js/package-settings.js +8 -0
- package/es/index.js +9 -0
- package/es/settings.d.ts +8 -0
- package/lib/components/ActionSet/ActionSet.d.ts +38 -2
- package/lib/components/ActionSet/ActionSet.js +3 -5
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
- package/lib/components/ConditionBuilder/ConditionBuilder.js +132 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +100 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +98 -0
- package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
- package/lib/components/ConditionBuilder/index.d.ts +1 -0
- package/lib/components/CreateFullPage/CreateFullPage.js +2 -18
- package/lib/components/CreateFullPage/CreateFullPageStep.js +20 -5
- package/lib/components/CreateSidePanel/CreateSidePanel.d.ts +81 -2
- package/lib/components/CreateSidePanel/CreateSidePanel.js +5 -2
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +5 -117
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +12 -111
- package/lib/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
- package/lib/components/DataSpreadsheet/utils/commonEventHandlers.js +311 -0
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
- package/lib/components/Datagrid/useEditableCell.js +19 -0
- package/lib/components/DelimitedList/DelimitedList.d.ts +27 -2
- package/lib/components/DelimitedList/DelimitedList.js +0 -1
- package/lib/components/EditInPlace/EditInPlace.d.ts +97 -5
- package/lib/components/EditInPlace/EditInPlace.js +10 -6
- package/lib/components/EditSidePanel/EditSidePanel.d.ts +92 -2
- package/lib/components/EditSidePanel/EditSidePanel.js +8 -10
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
- package/lib/components/ExportModal/ExportModal.d.ts +110 -2
- package/lib/components/ExportModal/ExportModal.js +10 -4
- package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +90 -0
- package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +101 -0
- package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +8 -10
- package/lib/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +164 -0
- package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +79 -0
- package/lib/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +2 -2
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +99 -0
- package/lib/components/FilterPanel/index.d.ts +5 -0
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
- package/lib/components/ImportModal/ImportModal.d.ts +136 -2
- package/lib/components/ImportModal/ImportModal.js +3 -2
- package/lib/components/InlineTip/InlineTip.d.ts +90 -2
- package/lib/components/InlineTip/InlineTip.js +3 -2
- package/lib/components/Nav/Nav.js +1 -1
- package/lib/components/Nav/NavList.js +7 -7
- package/lib/components/NotificationsPanel/NotificationsPanel.js +1 -1
- package/lib/components/OptionsTile/OptionsTile.d.ts +77 -3
- package/lib/components/OptionsTile/OptionsTile.js +9 -20
- package/lib/components/PageHeader/PageHeader.js +3 -3
- package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/lib/components/PageHeader/PageHeaderUtils.js +4 -3
- package/lib/components/RemoveModal/RemoveModal.d.ts +81 -7
- package/lib/components/RemoveModal/RemoveModal.js +1 -0
- package/lib/components/ScrollGradient/ScrollGradient.d.ts +5 -0
- package/lib/components/ScrollGradient/ScrollGradient.js +163 -0
- package/lib/components/ScrollGradient/constants.d.ts +15 -0
- package/lib/components/ScrollGradient/constants.js +128 -0
- package/lib/components/ScrollGradient/index.d.ts +1 -0
- package/lib/components/SidePanel/SidePanel.d.ts +144 -2
- package/lib/components/SidePanel/SidePanel.js +100 -75
- package/lib/components/StatusIcon/StatusIcon.d.ts +34 -2
- package/lib/components/StatusIcon/StatusIcon.js +97 -95
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
- package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/lib/components/TagOverflow/TagOverflow.js +216 -0
- package/lib/components/TagOverflow/constants.d.ts +14 -0
- package/lib/components/TagOverflow/constants.js +34 -0
- package/lib/components/TagOverflow/index.d.ts +1 -0
- package/lib/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
- package/lib/components/Tearsheet/TearsheetNarrow.js +6 -1
- package/lib/components/Toolbar/Toolbar.d.ts +23 -5
- package/lib/components/Toolbar/Toolbar.js +30 -26
- package/lib/components/TruncatedList/TruncatedList.js +5 -3
- package/lib/components/UserAvatar/UserAvatar.js +7 -4
- package/lib/components/index.d.ts +5 -2
- package/lib/global/js/package-settings.d.ts +8 -0
- package/lib/global/js/package-settings.js +8 -0
- package/lib/index.js +42 -0
- package/lib/settings.d.ts +8 -0
- package/package.json +3 -3
- package/scss/components/Coachmark/_coachmark-dragbar.scss +0 -1
- package/scss/components/Coachmark/_coachmark-tagline.scss +2 -2
- package/scss/components/ConditionBuilder/_carbon-imports.scss +9 -0
- package/scss/components/ConditionBuilder/_condition-builder.scss +25 -0
- package/scss/components/ConditionBuilder/_index-with-carbon.scss +9 -0
- package/scss/components/ConditionBuilder/_index.scss +8 -0
- package/scss/components/CreateFullPage/_create-full-page.scss +10 -10
- package/scss/components/Datagrid/styles/_useNestedRows.scss +5 -1
- package/scss/components/FilterPanel/_carbon-imports.scss +5 -0
- package/scss/components/FilterPanel/_filter-panel-accordion-item.scss +54 -0
- package/scss/components/FilterPanel/_filter-panel-accordion.scss +6 -0
- package/scss/components/FilterPanel/_filter-panel-checkbox-with-overflow.scss +60 -0
- package/scss/components/FilterPanel/_filter-panel-checkbox.scss +24 -3
- package/scss/components/FilterPanel/_filter-panel-group.scss +39 -0
- package/scss/components/FilterPanel/_filter-panel-label.scss +0 -8
- package/scss/components/FilterPanel/_filter-panel-search.scss +38 -0
- package/scss/components/FilterPanel/_filter-panel.scss +2 -0
- package/scss/components/FilterPanel/_index-with-carbon.scss +5 -0
- package/scss/components/FilterPanel/_index.scss +5 -0
- package/scss/components/Guidebanner/_guidebanner.scss +1 -1
- package/scss/components/InlineTip/_inline-tip.scss +1 -1
- package/scss/components/ProductiveCard/_productive-card.scss +13 -0
- package/scss/components/ScrollGradient/_carbon-imports.scss +9 -0
- package/scss/components/ScrollGradient/_index-with-carbon.scss +9 -0
- package/scss/components/ScrollGradient/_index.scss +8 -0
- package/scss/components/ScrollGradient/_scroll-gradient.scss +102 -0
- package/scss/components/SidePanel/_side-panel.scss +9 -9
- package/scss/components/TagOverflow/_carbon-imports.scss +9 -0
- package/scss/components/TagOverflow/_index-with-carbon.scss +9 -0
- package/scss/components/TagOverflow/_index.scss +8 -0
- package/scss/components/TagOverflow/_tag-overflow.scss +55 -0
- package/scss/components/Tearsheet/_tearsheet.scss +10 -0
- package/scss/components/UserAvatar/_user-avatar.scss +38 -4
- package/scss/components/_index-with-carbon.scss +3 -0
- package/scss/components/_index.scss +3 -0
package/es/index.js
CHANGED
@@ -78,6 +78,7 @@ export { default as useInlineEdit } from './components/Datagrid/useInlineEdit.js
|
|
78
78
|
export { default as useFiltering } from './components/Datagrid/useFiltering.js';
|
79
79
|
export { getAutoSizedColumnWidth } from './components/Datagrid/utils/getAutoSizedColumnWidth.js';
|
80
80
|
export { default as useFilterContext } from './components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js';
|
81
|
+
export { default as useEditableCell } from './components/Datagrid/useEditableCell.js';
|
81
82
|
export { EditTearsheet } from './components/EditTearsheet/EditTearsheet.js';
|
82
83
|
export { EditTearsheetForm } from './components/EditTearsheet/EditTearsheetForm.js';
|
83
84
|
export { EditTearsheetNarrow } from './components/EditTearsheetNarrow/EditTearsheetNarrow.js';
|
@@ -118,8 +119,16 @@ export { SearchBar } from './components/SearchBar/SearchBar.js';
|
|
118
119
|
export { Nav } from './components/Nav/Nav.js';
|
119
120
|
export { StringFormatter } from './components/StringFormatter/StringFormatter.js';
|
120
121
|
export { UserAvatar } from './components/UserAvatar/UserAvatar.js';
|
122
|
+
export { ScrollGradient } from './components/ScrollGradient/ScrollGradient.js';
|
121
123
|
export { StatusIndicator } from './components/StatusIndicator/StatusIndicator.js';
|
124
|
+
export { TagOverflow } from './components/TagOverflow/TagOverflow.js';
|
122
125
|
export { ActionBar } from './components/ActionBar/ActionBar.js';
|
123
126
|
export { FilterPanel } from './components/FilterPanel/FilterPanel.js';
|
127
|
+
export { FilterPanelAccordion } from './components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js';
|
128
|
+
export { FilterPanelAccordionItem } from './components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js';
|
124
129
|
export { FilterPanelCheckbox } from './components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js';
|
130
|
+
export { FilterPanelCheckboxWithOverflow } from './components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js';
|
131
|
+
export { FilterPanelGroup } from './components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js';
|
125
132
|
export { FilterPanelLabel } from './components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js';
|
133
|
+
export { FilterPanelSearch } from './components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js';
|
134
|
+
export { ConditionBuilder } from './components/ConditionBuilder/ConditionBuilder.js';
|
package/es/settings.d.ts
CHANGED
@@ -66,13 +66,21 @@ export const pkg: {
|
|
66
66
|
TruncatedList: boolean;
|
67
67
|
DelimitedList: boolean;
|
68
68
|
FullPageError: boolean;
|
69
|
+
ScrollGradient: boolean;
|
69
70
|
StringFormatter: boolean;
|
70
71
|
StatusIndicator: boolean;
|
71
72
|
StatusIndicatorStep: boolean;
|
73
|
+
TagOverflow: boolean;
|
72
74
|
ActionBar: boolean;
|
73
75
|
FilterPanel: boolean;
|
76
|
+
FilterPanelAccordion: boolean;
|
77
|
+
FilterPanelAccordionItem: boolean;
|
74
78
|
FilterPanelCheckbox: boolean;
|
79
|
+
FilterPanelCheckboxWithOverflow: boolean;
|
80
|
+
FilterPanelGroup: boolean;
|
75
81
|
FilterPanelLabel: boolean;
|
82
|
+
FilterPanelSearch: boolean;
|
83
|
+
ConditionBuilder: boolean;
|
76
84
|
Coachmark: boolean;
|
77
85
|
CoachmarkBeacon: boolean;
|
78
86
|
CoachmarkButton: boolean;
|
@@ -1,3 +1,39 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2021, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/// <reference path="../../../src/custom-typings/index.d.ts" />
|
8
|
+
import React from 'react';
|
9
|
+
import { ButtonProps } from '@carbon/react';
|
10
|
+
export declare const ButtonSizes: readonly ["sm", "md", "lg", "xl", "2xl"];
|
11
|
+
export type ButtonSize = (typeof ButtonSizes)[number];
|
12
|
+
interface ActionSetProps {
|
13
|
+
/**
|
14
|
+
* The action buttons to show. Each action is specified as an object
|
15
|
+
* representation of a Carbon button.
|
16
|
+
*
|
17
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
|
18
|
+
*/
|
19
|
+
actions: ButtonProps[];
|
20
|
+
/**
|
21
|
+
* The size of buttons to use for the actions. The allowed values are
|
22
|
+
* those for the size prop of carbon Button. If this prop is specified, all
|
23
|
+
* the buttons will be set to this size, overriding any 'size' values (if any)
|
24
|
+
* supplied in the actions array (if any).
|
25
|
+
*/
|
26
|
+
buttonSize?: ButtonSize;
|
27
|
+
/**
|
28
|
+
* An optional class or classes to be added to the outermost element.
|
29
|
+
*/
|
30
|
+
className?: string;
|
31
|
+
/**
|
32
|
+
* The size of the action set. Different button arrangements are used at
|
33
|
+
* different sizes, to make best use of the available space.
|
34
|
+
*/
|
35
|
+
size?: ButtonSize;
|
36
|
+
}
|
1
37
|
/**
|
2
38
|
* An ActionSet presents a set of action buttons, constructed from bundles
|
3
39
|
* of prop values and applying some layout rules. When the size is 'sm'
|
@@ -10,5 +46,5 @@
|
|
10
46
|
* it appears at the left side. If there is a primary button it appears at the
|
11
47
|
* right.
|
12
48
|
*/
|
13
|
-
export const ActionSet: React.ForwardRefExoticComponent<React.RefAttributes<
|
14
|
-
|
49
|
+
export declare const ActionSet: React.ForwardRefExoticComponent<ActionSetProps & React.RefAttributes<HTMLDivElement>>;
|
50
|
+
export {};
|
@@ -27,9 +27,6 @@ var _excluded = ["className", "disabled", "kind", "label", "loading", "isExpress
|
|
27
27
|
_excluded2 = ["actions", "buttonSize", "className", "size"];
|
28
28
|
var blockClass = "".concat(settings.pkg.prefix, "--action-set");
|
29
29
|
var componentName = 'ActionSet';
|
30
|
-
|
31
|
-
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
32
|
-
|
33
30
|
var ActionSetButton = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
34
31
|
var className = _ref.className,
|
35
32
|
disabled = _ref.disabled,
|
@@ -62,7 +59,6 @@ var willStack = function willStack(size, numberOfActions) {
|
|
62
59
|
var defaults = {
|
63
60
|
size: 'md'
|
64
61
|
};
|
65
|
-
|
66
62
|
/**
|
67
63
|
* An ActionSet presents a set of action buttons, constructed from bundles
|
68
64
|
* of prop values and applying some layout rules. When the size is 'sm'
|
@@ -133,6 +129,7 @@ ActionSet.displayName = componentName;
|
|
133
129
|
* @returns null if the actions meet the requirements, or an Error object with
|
134
130
|
* an explanatory message.
|
135
131
|
*/
|
132
|
+
/**@ts-ignore*/
|
136
133
|
ActionSet.validateActions = function (sizeFn) {
|
137
134
|
return function (props, propName, componentName, location, propFullName) {
|
138
135
|
var name = propFullName || propName;
|
@@ -175,7 +172,8 @@ ActionSet.propTypes = {
|
|
175
172
|
*
|
176
173
|
* See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
|
177
174
|
*/
|
178
|
-
actions: propsHelper.allPropTypes([
|
175
|
+
actions: propsHelper.allPropTypes([/**@ts-ignore*/
|
176
|
+
ActionSet.validateActions(), index["default"].arrayOf(index["default"].shape(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, react.Button.propTypes), {}, {
|
179
177
|
kind: index["default"].oneOf(['ghost', 'danger--ghost', 'secondary', 'danger', 'primary']),
|
180
178
|
label: index["default"].string,
|
181
179
|
loading: index["default"].bool,
|
@@ -94,7 +94,7 @@ exports.CoachmarkFixed = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
94
94
|
}
|
95
95
|
}, [prefersReducedMotion.matches]);
|
96
96
|
var handleTransitionEnd = function handleTransitionEnd(e) {
|
97
|
-
console.log('
|
97
|
+
console.log('Here at transition end... ', e.propertyName === 'transform' && !fixedIsVisible);
|
98
98
|
if (e.propertyName === 'transform' && !fixedIsVisible) {
|
99
99
|
setIsOpen(false);
|
100
100
|
onClose();
|
@@ -0,0 +1,132 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
'use strict';
|
9
|
+
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
11
|
+
|
12
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
13
|
+
var React = require('react');
|
14
|
+
var react = require('@carbon/react');
|
15
|
+
var index = require('../../node_modules/prop-types/index.js');
|
16
|
+
var cx = require('classnames');
|
17
|
+
var devtools = require('../../global/js/utils/devtools.js');
|
18
|
+
var settings = require('../../settings.js');
|
19
|
+
var ConditionBuilderContent = require('./ConditionBuilderContent/ConditionBuilderContent.js');
|
20
|
+
var DataTreeContext = require('./ConditionBuilderContext/DataTreeContext.js');
|
21
|
+
|
22
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
23
|
+
|
24
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
25
|
+
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
26
|
+
|
27
|
+
var _excluded = ["className", "inputConfig", "startConditionLabel", "popOverSearchThreshold"];
|
28
|
+
|
29
|
+
// Carbon and package components we use.
|
30
|
+
/* TODO: @import(s) of carbon components and other package components. */
|
31
|
+
|
32
|
+
// The block part of our conventional BEM class names (blockClass__E--M).
|
33
|
+
var blockClass = "".concat(settings.pkg.prefix, "--condition-builder");
|
34
|
+
var componentName = 'ConditionBuilder';
|
35
|
+
|
36
|
+
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
37
|
+
|
38
|
+
// Default values can be included here and then assigned to the prop params,
|
39
|
+
// e.g. prop = defaults.prop,
|
40
|
+
// This gathers default values together neatly and ensures non-primitive
|
41
|
+
// values are initialized early to avoid react making unnecessary re-renders.
|
42
|
+
// Note that default values are not required for props that are 'required',
|
43
|
+
// nor for props where the component can apply undefined values reasonably.
|
44
|
+
// Default values should be provided when the component needs to make a choice
|
45
|
+
// or assumption when a prop is not supplied.
|
46
|
+
|
47
|
+
// Default values for props
|
48
|
+
// const defaults = {
|
49
|
+
// /* TODO: add defaults for relevant props if needed */
|
50
|
+
// };
|
51
|
+
|
52
|
+
/**
|
53
|
+
* TODO: A description of the component.
|
54
|
+
*/
|
55
|
+
|
56
|
+
exports.ConditionBuilder = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
57
|
+
var className = _ref.className,
|
58
|
+
inputConfig = _ref.inputConfig,
|
59
|
+
startConditionLabel = _ref.startConditionLabel,
|
60
|
+
popOverSearchThreshold = _ref.popOverSearchThreshold,
|
61
|
+
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
62
|
+
return /*#__PURE__*/React__default["default"].createElement(DataTreeContext.ConditionBuilderProvider, {
|
63
|
+
inputConfig: inputConfig,
|
64
|
+
popOverSearchThreshold: popOverSearchThreshold
|
65
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
|
66
|
+
className: cx__default["default"](blockClass,
|
67
|
+
// Apply the block class to the main HTML element
|
68
|
+
className,
|
69
|
+
// Apply any supplied class names to the main HTML element.
|
70
|
+
// example: `${blockClass}__template-string-class-${kind}-n-${size}`,
|
71
|
+
{
|
72
|
+
// switched classes dependant on props or state
|
73
|
+
// example: [`${blockClass}__here-if-small`]: size === 'sm',
|
74
|
+
}),
|
75
|
+
ref: ref,
|
76
|
+
role: "main"
|
77
|
+
}, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React__default["default"].createElement(react.VStack, null, /*#__PURE__*/React__default["default"].createElement(ConditionBuilderContent["default"], {
|
78
|
+
startConditionLabel: startConditionLabel
|
79
|
+
}))));
|
80
|
+
});
|
81
|
+
|
82
|
+
// Return a placeholder if not released and not enabled by feature flag
|
83
|
+
exports.ConditionBuilder = settings.pkg.checkComponentEnabled(exports.ConditionBuilder, componentName);
|
84
|
+
|
85
|
+
// The display name of the component, used by React. Note that displayName
|
86
|
+
// is used in preference to relying on function.name.
|
87
|
+
exports.ConditionBuilder.displayName = componentName;
|
88
|
+
|
89
|
+
// The types and DocGen commentary for the component props,
|
90
|
+
// in alphabetical order (for consistency).
|
91
|
+
// See https://www.npmjs.com/package/prop-types#usage.
|
92
|
+
exports.ConditionBuilder.propTypes = {
|
93
|
+
/**
|
94
|
+
* Provide the contents of the ConditionBuilder.
|
95
|
+
*/
|
96
|
+
//children: PropTypes.node.isRequired,
|
97
|
+
|
98
|
+
/**
|
99
|
+
* Provide an optional class to be applied to the containing node.
|
100
|
+
*/
|
101
|
+
className: index["default"].string,
|
102
|
+
/**
|
103
|
+
* This is a mandatory prop that defines the input to the condition builder.
|
104
|
+
|
105
|
+
*/
|
106
|
+
inputConfig: index["default"].shape({
|
107
|
+
properties: index["default"].arrayOf(index["default"].shape({
|
108
|
+
id: index["default"].string,
|
109
|
+
label: index["default"].string,
|
110
|
+
icon: index["default"].func,
|
111
|
+
type: index["default"].oneOf(['text', 'number', 'date', 'option']),
|
112
|
+
config: index["default"].shape({
|
113
|
+
options: index["default"].arrayOf(index["default"].shape({
|
114
|
+
id: index["default"].string,
|
115
|
+
label: index["default"].string,
|
116
|
+
icon: index["default"].func
|
117
|
+
})),
|
118
|
+
includeSearch: index["default"].bool
|
119
|
+
})
|
120
|
+
}))
|
121
|
+
}).isRequired,
|
122
|
+
/**
|
123
|
+
* Provide an mandatory numeric value that will be used to enable search option in the popovers with list.
|
124
|
+
*/
|
125
|
+
popOverSearchThreshold: index["default"].number.isRequired,
|
126
|
+
/**
|
127
|
+
* Provide a label to the button that starts condition builder
|
128
|
+
*/
|
129
|
+
startConditionLabel: index["default"].string.isRequired
|
130
|
+
|
131
|
+
/* TODO: add types and DocGen for all props. */
|
132
|
+
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export default ConditionBuilderContent;
|
2
|
+
declare function ConditionBuilderContent({ startConditionLabel }: {
|
3
|
+
startConditionLabel: any;
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
5
|
+
declare namespace ConditionBuilderContent {
|
6
|
+
namespace propTypes {
|
7
|
+
let startConditionLabel: PropTypes.Validator<string>;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
import PropTypes from 'prop-types';
|
@@ -0,0 +1,100 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
'use strict';
|
9
|
+
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
11
|
+
|
12
|
+
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
13
|
+
var React = require('react');
|
14
|
+
var settings = require('../../../settings.js');
|
15
|
+
var index = require('../../../node_modules/prop-types/index.js');
|
16
|
+
var react = require('@carbon/react');
|
17
|
+
var icons = require('@carbon/react/icons');
|
18
|
+
var DataTreeContext = require('../ConditionBuilderContext/DataTreeContext.js');
|
19
|
+
|
20
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
21
|
+
|
22
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
23
|
+
|
24
|
+
var blockClass = "".concat(settings.pkg.prefix, "--condition-builder");
|
25
|
+
function ConditionBuilderContent(_ref) {
|
26
|
+
var _rootState$groups2;
|
27
|
+
var startConditionLabel = _ref.startConditionLabel;
|
28
|
+
var _useContext = React.useContext(DataTreeContext.ConditionBuilderContext),
|
29
|
+
rootState = _useContext.rootState,
|
30
|
+
setRootState = _useContext.setRootState;
|
31
|
+
var _useState = React.useState(true),
|
32
|
+
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
33
|
+
isConditionBuilderActive = _useState2[0],
|
34
|
+
setIsConditionBuilderActive = _useState2[1];
|
35
|
+
var conditionBuilderRef = React.useRef();
|
36
|
+
React.useEffect(function () {
|
37
|
+
var _rootState$groups;
|
38
|
+
if (rootState !== null && rootState !== void 0 && (_rootState$groups = rootState.groups) !== null && _rootState$groups !== void 0 && _rootState$groups.length) {
|
39
|
+
setIsConditionBuilderActive(false);
|
40
|
+
if (rootState.groups[0].conditions.length == 1 && rootState.groups[0].conditions[0].property == undefined) {
|
41
|
+
// when the add condition clicked to start the condition building, we by default open the popover of the first property
|
42
|
+
setTimeout(function () {
|
43
|
+
conditionBuilderRef.current.querySelector('.propertyField').click();
|
44
|
+
}, 0);
|
45
|
+
}
|
46
|
+
} else {
|
47
|
+
setIsConditionBuilderActive(true);
|
48
|
+
}
|
49
|
+
}, [rootState]);
|
50
|
+
var onStartConditionBuilder = function onStartConditionBuilder() {
|
51
|
+
//when add condition button is clicked.
|
52
|
+
setIsConditionBuilderActive(false);
|
53
|
+
setRootState(DataTreeContext.emptyState); //here we can set an empty skeleton object for an empty condition builder,
|
54
|
+
//or we can even pre-populate some existing builder and continue editing
|
55
|
+
};
|
56
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
57
|
+
ref: conditionBuilderRef,
|
58
|
+
className: "".concat(blockClass, "__content-container")
|
59
|
+
}, isConditionBuilderActive && /*#__PURE__*/React__default["default"].createElement(react.Button, {
|
60
|
+
className: "".concat(blockClass, "__condition-builder"),
|
61
|
+
renderIcon: function renderIcon(props) {
|
62
|
+
return /*#__PURE__*/React__default["default"].createElement(icons.Add, _rollupPluginBabelHelpers["extends"]({
|
63
|
+
size: 16
|
64
|
+
}, props));
|
65
|
+
},
|
66
|
+
iconDescription: startConditionLabel,
|
67
|
+
kind: "ghost",
|
68
|
+
size: "sm",
|
69
|
+
onClick: onStartConditionBuilder
|
70
|
+
}, startConditionLabel), rootState && (rootState === null || rootState === void 0 || (_rootState$groups2 = rootState.groups) === null || _rootState$groups2 === void 0 ? void 0 : _rootState$groups2.map(function () {
|
71
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, "conditionBuilder group renders here")
|
72
|
+
// <ConditionBuilderGroup
|
73
|
+
// state={eachGroup}
|
74
|
+
// onRemove={() => {
|
75
|
+
// onRemove(groupIndex);
|
76
|
+
// }}
|
77
|
+
// onChange={(updatedGroup) => {
|
78
|
+
// /**
|
79
|
+
// * This method is triggered from inner components. This will be called every time when any change is to be updated in the rootState.
|
80
|
+
// * This gets the updated group as argument.
|
81
|
+
// */
|
82
|
+
// setRootState({
|
83
|
+
// ...rootState,
|
84
|
+
// groups: rootState.groups.map((group, gIndex) =>
|
85
|
+
// groupIndex === gIndex ? updatedGroup : group
|
86
|
+
// ),
|
87
|
+
// });
|
88
|
+
// }}
|
89
|
+
//>
|
90
|
+
;
|
91
|
+
})));
|
92
|
+
}
|
93
|
+
ConditionBuilderContent.propTypes = {
|
94
|
+
/**
|
95
|
+
* Provide a label to the button that starts condition builder
|
96
|
+
*/
|
97
|
+
startConditionLabel: index["default"].string.isRequired
|
98
|
+
};
|
99
|
+
|
100
|
+
exports["default"] = ConditionBuilderContent;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
export namespace emptyState {
|
2
|
+
let groups: {
|
3
|
+
groupSeparateOperator: null;
|
4
|
+
groupOperator: string;
|
5
|
+
statement: string;
|
6
|
+
conditions: {
|
7
|
+
property: undefined;
|
8
|
+
operator: string;
|
9
|
+
value: string;
|
10
|
+
}[];
|
11
|
+
}[];
|
12
|
+
}
|
13
|
+
export const ConditionBuilderContext: React.Context<any>;
|
14
|
+
export function ConditionBuilderProvider(props: any): import("react/jsx-runtime").JSX.Element;
|
15
|
+
export namespace ConditionBuilderProvider {
|
16
|
+
namespace propTypes {
|
17
|
+
let children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
18
|
+
let inputConfig: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
19
|
+
properties: PropTypes.Requireable<(PropTypes.InferProps<{
|
20
|
+
id: PropTypes.Requireable<string>;
|
21
|
+
label: PropTypes.Requireable<string>;
|
22
|
+
icon: PropTypes.Requireable<(...args: any[]) => any>;
|
23
|
+
type: PropTypes.Requireable<string>;
|
24
|
+
config: PropTypes.Requireable<PropTypes.InferProps<{
|
25
|
+
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
26
|
+
id: PropTypes.Requireable<string>;
|
27
|
+
label: PropTypes.Requireable<string>;
|
28
|
+
icon: PropTypes.Requireable<(...args: any[]) => any>;
|
29
|
+
}> | null | undefined)[]>;
|
30
|
+
includeSearch: PropTypes.Requireable<boolean>;
|
31
|
+
}>>;
|
32
|
+
}> | null | undefined)[]>;
|
33
|
+
}>>>;
|
34
|
+
let popOverSearchThreshold: PropTypes.Validator<number>;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
import React from 'react';
|
38
|
+
import PropTypes from 'prop-types';
|
@@ -0,0 +1,98 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
'use strict';
|
9
|
+
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
11
|
+
|
12
|
+
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
13
|
+
var React = require('react');
|
14
|
+
var index = require('../../../node_modules/prop-types/index.js');
|
15
|
+
|
16
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
17
|
+
|
18
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
19
|
+
|
20
|
+
var emptyState = {
|
21
|
+
groups: [{
|
22
|
+
groupSeparateOperator: null,
|
23
|
+
groupOperator: 'and',
|
24
|
+
statement: 'if',
|
25
|
+
conditions: [{
|
26
|
+
property: undefined,
|
27
|
+
operator: '',
|
28
|
+
value: ''
|
29
|
+
}]
|
30
|
+
}]
|
31
|
+
};
|
32
|
+
var ConditionBuilderContext = /*#__PURE__*/React.createContext();
|
33
|
+
|
34
|
+
// const rootReducer=(state,action)=>{
|
35
|
+
// switch(action.type){
|
36
|
+
// case 'update':
|
37
|
+
// ;
|
38
|
+
// return {
|
39
|
+
// ...state,
|
40
|
+
// ...action.payload
|
41
|
+
// }
|
42
|
+
// break;
|
43
|
+
// default:
|
44
|
+
// return state;
|
45
|
+
// }
|
46
|
+
|
47
|
+
// }
|
48
|
+
|
49
|
+
var ConditionBuilderProvider = function ConditionBuilderProvider(props) {
|
50
|
+
var _useState = React.useState({
|
51
|
+
groups: []
|
52
|
+
}),
|
53
|
+
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
54
|
+
rootState = _useState2[0],
|
55
|
+
setRootState = _useState2[1];
|
56
|
+
return /*#__PURE__*/React__default["default"].createElement(ConditionBuilderContext.Provider, {
|
57
|
+
value: {
|
58
|
+
rootState: rootState,
|
59
|
+
setRootState: setRootState,
|
60
|
+
inputConfig: props.inputConfig,
|
61
|
+
popOverSearchThreshold: props.popOverSearchThreshold
|
62
|
+
}
|
63
|
+
},
|
64
|
+
// eslint-disable-next-line react/prop-types
|
65
|
+
props.children);
|
66
|
+
};
|
67
|
+
ConditionBuilderProvider.propTypes = {
|
68
|
+
/**
|
69
|
+
* Provide the contents of the ConditionBuilder.
|
70
|
+
*/
|
71
|
+
children: index["default"].node.isRequired,
|
72
|
+
/**
|
73
|
+
* This is a mandatory prop that defines the input to the condition builder.
|
74
|
+
|
75
|
+
*/
|
76
|
+
inputConfig: index["default"].shape({
|
77
|
+
properties: index["default"].arrayOf(index["default"].shape({
|
78
|
+
id: index["default"].string,
|
79
|
+
label: index["default"].string,
|
80
|
+
icon: index["default"].func,
|
81
|
+
type: index["default"].oneOf(['text', 'number', 'date', 'option']),
|
82
|
+
config: index["default"].shape({
|
83
|
+
options: index["default"].arrayOf(index["default"].shape({
|
84
|
+
id: index["default"].string,
|
85
|
+
label: index["default"].string,
|
86
|
+
icon: index["default"].func
|
87
|
+
})),
|
88
|
+
includeSearch: index["default"].bool
|
89
|
+
})
|
90
|
+
}))
|
91
|
+
}).isRequired,
|
92
|
+
popOverSearchThreshold: index["default"].number.isRequired
|
93
|
+
/* TODO: add types and DocGen for all props. */
|
94
|
+
};
|
95
|
+
|
96
|
+
exports.ConditionBuilderContext = ConditionBuilderContext;
|
97
|
+
exports.ConditionBuilderProvider = ConditionBuilderProvider;
|
98
|
+
exports.emptyState = emptyState;
|
@@ -0,0 +1,58 @@
|
|
1
|
+
export declare const inputData: {
|
2
|
+
properties: ({
|
3
|
+
id: string;
|
4
|
+
label: string;
|
5
|
+
icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
|
6
|
+
type: string;
|
7
|
+
config: {
|
8
|
+
options: {
|
9
|
+
label: string;
|
10
|
+
id: string;
|
11
|
+
}[];
|
12
|
+
includeSearch?: undefined;
|
13
|
+
min?: undefined;
|
14
|
+
step?: undefined;
|
15
|
+
unit?: undefined;
|
16
|
+
};
|
17
|
+
} | {
|
18
|
+
id: string;
|
19
|
+
label: string;
|
20
|
+
icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
|
21
|
+
type: string;
|
22
|
+
config: {
|
23
|
+
options: {
|
24
|
+
label: string;
|
25
|
+
id: string;
|
26
|
+
icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
|
27
|
+
}[];
|
28
|
+
includeSearch: boolean;
|
29
|
+
min?: undefined;
|
30
|
+
step?: undefined;
|
31
|
+
unit?: undefined;
|
32
|
+
};
|
33
|
+
} | {
|
34
|
+
id: string;
|
35
|
+
label: string;
|
36
|
+
icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
|
37
|
+
type: string;
|
38
|
+
config: {
|
39
|
+
options?: undefined;
|
40
|
+
includeSearch?: undefined;
|
41
|
+
min?: undefined;
|
42
|
+
step?: undefined;
|
43
|
+
unit?: undefined;
|
44
|
+
};
|
45
|
+
} | {
|
46
|
+
id: string;
|
47
|
+
label: string;
|
48
|
+
icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
|
49
|
+
type: string;
|
50
|
+
config: {
|
51
|
+
min: number;
|
52
|
+
step: number;
|
53
|
+
unit: string;
|
54
|
+
options?: undefined;
|
55
|
+
includeSearch?: undefined;
|
56
|
+
};
|
57
|
+
})[];
|
58
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { ConditionBuilder } from "./ConditionBuilder";
|
@@ -127,11 +127,6 @@ exports.CreateFullPage = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
127
127
|
_useState22 = _rollupPluginBabelHelpers.slicedToArray(_useState21, 2),
|
128
128
|
lastIncludedStep = _useState22[0],
|
129
129
|
setLastIncludedStep = _useState22[1];
|
130
|
-
var _useState23 = React.useState(0),
|
131
|
-
_useState24 = _rollupPluginBabelHelpers.slicedToArray(_useState23, 2),
|
132
|
-
headerHeight = _useState24[0],
|
133
|
-
setHeaderHeight = _useState24[1];
|
134
|
-
var headerRef = React.useRef(null);
|
135
130
|
React.useEffect(function () {
|
136
131
|
var firstItem = stepData.findIndex(function (item) {
|
137
132
|
return item === null || item === void 0 ? void 0 : item.shouldIncludeStep;
|
@@ -148,13 +143,6 @@ exports.CreateFullPage = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
148
143
|
setCurrentStep(Number(initialStep + numberOfHiddenSteps));
|
149
144
|
}
|
150
145
|
}, [stepData, firstIncludedStep, lastIncludedStep, initialStep]);
|
151
|
-
React.useEffect(function () {
|
152
|
-
var headerHeight = 0;
|
153
|
-
if (title || (breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) > 0) {
|
154
|
-
headerHeight = headerRef.current.getBoundingClientRect().height;
|
155
|
-
}
|
156
|
-
setHeaderHeight(headerHeight);
|
157
|
-
}, [title, breadcrumbs]);
|
158
146
|
useCreateComponentFocus.useCreateComponentFocus({
|
159
147
|
previousState: previousState,
|
160
148
|
currentStep: currentStep,
|
@@ -202,8 +190,7 @@ exports.CreateFullPage = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
202
190
|
ref: ref,
|
203
191
|
className: cx__default["default"](blockClass, className)
|
204
192
|
}, devtools.getDevtoolsProps(componentName)), (title || (breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) > 0) && /*#__PURE__*/React__default["default"].createElement("div", {
|
205
|
-
className: "".concat(blockClass, "__header")
|
206
|
-
ref: headerRef
|
193
|
+
className: "".concat(blockClass, "__header")
|
207
194
|
}, /*#__PURE__*/React__default["default"].createElement(SimpleHeader.SimpleHeader, {
|
208
195
|
title: title,
|
209
196
|
breadcrumbs: breadcrumbs,
|
@@ -211,10 +198,7 @@ exports.CreateFullPage = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
211
198
|
overflowAriaLabel: breadcrumbsOverflowAriaLabel,
|
212
199
|
maxVisible: maxVisibleBreadcrumbs
|
213
200
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
214
|
-
className: "".concat(blockClass, "__influencer-and-body-container")
|
215
|
-
style: {
|
216
|
-
height: "calc(100vh - ".concat(headerHeight, "px)")
|
217
|
-
}
|
201
|
+
className: "".concat(blockClass, "__influencer-and-body-container")
|
218
202
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
219
203
|
className: "".concat(blockClass, "__influencer")
|
220
204
|
}, /*#__PURE__*/React__default["default"].createElement(CreateInfluencer.CreateInfluencer, {
|