@carbon/ibm-products 2.43.2-canary.4 → 2.43.2-canary.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/css/index-full-carbon.css +52 -3
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +12 -0
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +52 -3
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +52 -3
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +23 -21
  18. package/es/components/ConditionBuilder/ConditionBuilder.js +67 -20
  19. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
  20. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +129 -0
  21. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +6 -4
  22. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +5 -1
  23. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +16 -4
  24. package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +2 -2
  25. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +2 -2
  26. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -11
  27. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +36 -32
  28. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +0 -1
  29. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +7 -2
  30. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +6 -1
  31. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +18 -10
  32. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +39 -36
  33. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +12 -10
  34. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +1 -1
  35. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +24 -16
  36. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +19 -4
  37. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
  38. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +109 -0
  39. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
  40. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +58 -33
  41. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +4 -6
  42. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +14 -5
  43. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +1 -2
  44. package/es/components/ConditionBuilder/utils/util.d.ts +1 -0
  45. package/es/components/ConditionBuilder/utils/util.js +16 -1
  46. package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +12 -0
  47. package/es/components/DataSpreadsheet/DataSpreadsheet.js +51 -19
  48. package/es/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +21 -1
  49. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +40 -8
  50. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +8 -0
  51. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +20 -6
  52. package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +4 -1
  53. package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.d.ts +3 -1
  54. package/es/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +15 -3
  55. package/es/components/DataSpreadsheet/types/index.d.ts +1 -1
  56. package/es/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +34 -2
  57. package/es/components/Datagrid/Datagrid/Datagrid.js +2 -1
  58. package/es/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  59. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +11 -1
  60. package/es/components/Datagrid/Datagrid/DatagridRow.js +13 -2
  61. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
  62. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
  63. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -1
  64. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +6 -3
  65. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
  66. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +21 -16
  67. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +1 -1
  68. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +74 -11
  69. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
  70. package/es/components/Datagrid/types/index.d.ts +37 -4
  71. package/es/components/Datagrid/useActionsColumn.d.ts +8 -1
  72. package/es/components/Datagrid/useActionsColumn.js +7 -6
  73. package/es/components/Datagrid/useColumnRightAlign.d.ts +8 -1
  74. package/es/components/Datagrid/useColumnRightAlign.js +4 -3
  75. package/es/components/Datagrid/useCustomizeColumns.d.ts +8 -1
  76. package/es/components/Datagrid/useCustomizeColumns.js +4 -3
  77. package/es/components/Datagrid/useInlineEdit.js +12 -2
  78. package/es/components/Datagrid/useNestedRows.js +32 -13
  79. package/es/components/Decorator/Decorator.js +2 -1
  80. package/es/components/DecoratorBase/DecoratorBase.js +3 -5
  81. package/es/components/DecoratorDualButton/DecoratorDualButton.js +2 -1
  82. package/es/components/DecoratorLink/DecoratorLink.js +2 -1
  83. package/es/components/DecoratorSingleButton/DecoratorSingleButton.js +2 -1
  84. package/es/components/EditTearsheet/EditTearsheet.d.ts +5 -1
  85. package/es/components/EditTearsheet/EditTearsheet.js +0 -1
  86. package/es/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
  87. package/es/components/EditTearsheet/EditTearsheetForm.js +3 -0
  88. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
  89. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
  90. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
  91. package/es/components/PageHeader/PageHeader.js +1 -0
  92. package/es/components/RemoveModal/RemoveModal.d.ts +4 -0
  93. package/es/components/RemoveModal/RemoveModal.js +7 -1
  94. package/es/components/StatusIndicator/StatusIndicatorStep.js +87 -0
  95. package/es/components/Tearsheet/Tearsheet.d.ts +8 -1
  96. package/es/components/Tearsheet/Tearsheet.js +9 -1
  97. package/es/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
  98. package/es/components/Tearsheet/TearsheetNarrow.js +12 -0
  99. package/es/components/Tearsheet/TearsheetShell.d.ts +10 -0
  100. package/es/components/Tearsheet/TearsheetShell.js +17 -3
  101. package/es/components/Toolbar/ToolbarButton.js +1 -1
  102. package/es/components/index.d.ts +1 -1
  103. package/es/index.js +1 -0
  104. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +23 -21
  105. package/lib/components/ConditionBuilder/ConditionBuilder.js +67 -20
  106. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
  107. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +137 -0
  108. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +6 -3
  109. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +5 -1
  110. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +16 -4
  111. package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +2 -2
  112. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +2 -2
  113. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -11
  114. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +36 -32
  115. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +0 -1
  116. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +7 -2
  117. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +6 -1
  118. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +18 -10
  119. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +39 -36
  120. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +12 -10
  121. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +1 -1
  122. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +23 -15
  123. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +20 -5
  124. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
  125. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +117 -0
  126. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
  127. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +56 -31
  128. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +4 -6
  129. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +14 -4
  130. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +1 -2
  131. package/lib/components/ConditionBuilder/utils/util.d.ts +1 -0
  132. package/lib/components/ConditionBuilder/utils/util.js +17 -0
  133. package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +12 -0
  134. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +51 -19
  135. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +21 -1
  136. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +40 -8
  137. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +8 -0
  138. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +20 -6
  139. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseMove.js +4 -1
  140. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.d.ts +3 -1
  141. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetMouseUp.js +15 -3
  142. package/lib/components/DataSpreadsheet/types/index.d.ts +1 -1
  143. package/lib/components/DataSpreadsheet/utils/moveColumnIndicatorLine.js +34 -2
  144. package/lib/components/Datagrid/Datagrid/Datagrid.js +2 -1
  145. package/lib/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  146. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +11 -1
  147. package/lib/components/Datagrid/Datagrid/DatagridRow.js +13 -2
  148. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
  149. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
  150. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -1
  151. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +6 -3
  152. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
  153. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +21 -16
  154. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +1 -1
  155. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +73 -10
  156. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
  157. package/lib/components/Datagrid/types/index.d.ts +37 -4
  158. package/lib/components/Datagrid/useActionsColumn.d.ts +8 -1
  159. package/lib/components/Datagrid/useActionsColumn.js +7 -6
  160. package/lib/components/Datagrid/useColumnRightAlign.d.ts +8 -1
  161. package/lib/components/Datagrid/useColumnRightAlign.js +4 -3
  162. package/lib/components/Datagrid/useCustomizeColumns.d.ts +8 -1
  163. package/lib/components/Datagrid/useCustomizeColumns.js +4 -3
  164. package/lib/components/Datagrid/useInlineEdit.js +12 -2
  165. package/lib/components/Datagrid/useNestedRows.js +32 -13
  166. package/lib/components/Decorator/Decorator.js +2 -1
  167. package/lib/components/DecoratorBase/DecoratorBase.js +3 -5
  168. package/lib/components/DecoratorDualButton/DecoratorDualButton.js +2 -1
  169. package/lib/components/DecoratorLink/DecoratorLink.js +2 -1
  170. package/lib/components/DecoratorSingleButton/DecoratorSingleButton.js +2 -1
  171. package/lib/components/EditTearsheet/EditTearsheet.d.ts +5 -1
  172. package/lib/components/EditTearsheet/EditTearsheet.js +0 -1
  173. package/lib/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
  174. package/lib/components/EditTearsheet/EditTearsheetForm.js +3 -0
  175. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
  176. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
  177. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
  178. package/lib/components/PageHeader/PageHeader.js +1 -0
  179. package/lib/components/RemoveModal/RemoveModal.d.ts +4 -0
  180. package/lib/components/RemoveModal/RemoveModal.js +7 -1
  181. package/lib/components/StatusIndicator/StatusIndicatorStep.js +94 -0
  182. package/lib/components/Tearsheet/Tearsheet.d.ts +8 -1
  183. package/lib/components/Tearsheet/Tearsheet.js +9 -1
  184. package/lib/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
  185. package/lib/components/Tearsheet/TearsheetNarrow.js +12 -0
  186. package/lib/components/Tearsheet/TearsheetShell.d.ts +10 -0
  187. package/lib/components/Tearsheet/TearsheetShell.js +16 -2
  188. package/lib/components/Toolbar/ToolbarButton.js +1 -1
  189. package/lib/components/index.d.ts +1 -1
  190. package/lib/index.js +5 -0
  191. package/package.json +7 -6
  192. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +9 -1
  193. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +26 -1
  194. package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +8 -0
  195. package/scss/components/Datagrid/styles/_useInlineEdit.scss +13 -0
  196. package/scss/components/StatusIcon/_status-icon.scss +4 -4
  197. package/scss/components/StringFormatter/_string-formatter.scss +2 -2
  198. package/scss/components/UserProfileImage/_user-profile-image.scss +6 -2
  199. package/telemetry.yml +8 -3
  200. package/es/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
  201. package/es/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -16
  202. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
  203. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -20
@@ -111,7 +111,8 @@ DecoratorDualButton.propTypes = {
111
111
  */
112
112
  small: PropTypes.bool,
113
113
  /**
114
- * Determines the theme of the component.
114
+ * Override the default theme of the component.
115
+ * Useful if you want "invert" the component's theme.
115
116
  */
116
117
  theme: PropTypes.oneOf(['light', 'dark']),
117
118
  /**
@@ -101,7 +101,8 @@ DecoratorLink.propTypes = {
101
101
  */
102
102
  small: PropTypes.bool,
103
103
  /**
104
- * Determines the theme of the component.
104
+ * Override the default theme of the component.
105
+ * Useful if you want "invert" the component's theme.
105
106
  */
106
107
  theme: PropTypes.oneOf(['light', 'dark']),
107
108
  /**
@@ -101,7 +101,8 @@ DecoratorSingleButton.propTypes = {
101
101
  */
102
102
  small: PropTypes.bool,
103
103
  /**
104
- * Determines the theme of the component.
104
+ * Override the default theme of the component.
105
+ * Useful if you want "invert" the component's theme.
105
106
  */
106
107
  theme: PropTypes.oneOf(['light', 'dark']),
107
108
  /**
@@ -5,7 +5,11 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React, { ReactNode, PropsWithChildren } from 'react';
8
- export declare const FormContext: React.Context<null>;
8
+ export type FormContextType = {
9
+ currentForm: number;
10
+ setFormTitle: () => void;
11
+ };
12
+ export declare const FormContext: React.Context<FormContextType | null>;
9
13
  export declare const FormNumberContext: React.Context<number>;
10
14
  interface EditTearsheetProps extends PropsWithChildren {
11
15
  /**
@@ -18,7 +18,6 @@ import { prepareProps } from '../../global/js/utils/props-helper.js';
18
18
  var _excluded = ["cancelButtonText", "children", "className", "description", "influencerWidth", "label", "onClose", "open", "submitButtonText", "title", "verticalPosition", "onRequestSubmit", "onFormChange", "sideNavAriaLabel"];
19
19
  var componentName = 'EditTearsheet';
20
20
  var blockClass = "".concat(pkg.prefix, "--tearsheet-edit");
21
-
22
21
  // This is a general context for the forms container
23
22
  // containing information about the state of the container
24
23
  // and providing some callback methods for forms to use
@@ -1,2 +1,45 @@
1
- export let EditTearsheetForm: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
- import React from 'react';
1
+ /**
2
+ * Copyright IBM Corp. 2022, 2022
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
+ import React, { ReactNode } from 'react';
8
+ interface EditTearsheetFormBaseProps {
9
+ /**
10
+ * Content that shows in the tearsheet form
11
+ */
12
+ children?: ReactNode;
13
+ /**
14
+ * Sets an optional className to be added to the tearsheet form
15
+ */
16
+ className?: string;
17
+ /**
18
+ * Sets an optional description on the form component
19
+ */
20
+ description?: string;
21
+ /**
22
+ * This optional prop will render your form content inside of a fieldset html element
23
+ * and is defaulted to true.
24
+ * You can set this prop to `false` if you have multiple fieldset elements or want to control the children of your Full Page's form content.
25
+ */
26
+ hasFieldset?: boolean;
27
+ /**
28
+ * Sets an optional subtitle on the form component
29
+ */
30
+ subtitle?: string;
31
+ /**
32
+ * Sets the title text for a tearsheet form
33
+ */
34
+ title: ReactNode;
35
+ }
36
+ type EditTearsheetFormFieldsetTypes = {
37
+ hasFieldset?: false;
38
+ fieldsetLegendText: string;
39
+ } | {
40
+ hasFieldset: true;
41
+ fieldsetLegendText: string;
42
+ };
43
+ type EditTearsheetFormProps = EditTearsheetFormBaseProps & EditTearsheetFormFieldsetTypes;
44
+ export declare let EditTearsheetForm: React.ForwardRefExoticComponent<EditTearsheetFormProps & React.RefAttributes<HTMLDivElement>>;
45
+ export {};
@@ -82,6 +82,7 @@ EditTearsheetForm.propTypes = {
82
82
  * You can set the `hasFieldset` prop to false if you have multiple fieldset elements or want to control the children of your Full Page's form content.
83
83
  * Otherwise, use CSS to hide/remove this label text.
84
84
  */
85
+ /**@ts-ignore */
85
86
  fieldsetLegendText: PropTypes.string.isRequired.if(function (_ref2) {
86
87
  var hasFieldset = _ref2.hasFieldset;
87
88
  return !!hasFieldset;
@@ -91,10 +92,12 @@ EditTearsheetForm.propTypes = {
91
92
  * and is defaulted to true.
92
93
  * You can set this prop to `false` if you have multiple fieldset elements or want to control the children of your Full Page's form content.
93
94
  */
95
+ /**@ts-ignore*/
94
96
  hasFieldset: PropTypes.bool,
95
97
  /**
96
98
  * Sets an optional subtitle on the form component
97
99
  */
100
+ /**@ts-ignore*/
98
101
  subtitle: PropTypes.string,
99
102
  /**
100
103
  * Sets the title text for a tearsheet form
@@ -44,6 +44,12 @@ var HTTPError403 = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
44
44
  }));
45
45
  });
46
46
 
47
+ /**@ts-ignore*/
48
+ HTTPError403.deprecated = {
49
+ level: 'warn',
50
+ details: "Please replace ".concat(componentName, " with FullPageError")
51
+ };
52
+
47
53
  // Return a placeholder if not released and not enabled by feature flag
48
54
  HTTPError403 = pkg.checkComponentEnabled(HTTPError403, componentName);
49
55
 
@@ -44,6 +44,12 @@ var HTTPError404 = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
44
44
  }));
45
45
  });
46
46
 
47
+ /**@ts-ignore*/
48
+ HTTPError404.deprecated = {
49
+ level: 'warn',
50
+ details: "Please replace ".concat(componentName, " with FullPageError")
51
+ };
52
+
47
53
  // Return a placeholder if not released and not enabled by feature flag
48
54
  HTTPError404 = pkg.checkComponentEnabled(HTTPError404, componentName);
49
55
 
@@ -44,6 +44,12 @@ var HTTPErrorOther = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
44
44
  }));
45
45
  });
46
46
 
47
+ /**@ts-ignore*/
48
+ HTTPErrorOther.deprecated = {
49
+ level: 'warn',
50
+ details: "Please replace ".concat(componentName, " with FullPageError")
51
+ };
52
+
47
53
  // Return a placeholder if not released and not enabled by feature flag
48
54
  HTTPErrorOther = pkg.checkComponentEnabled(HTTPErrorOther, componentName);
49
55
 
@@ -27,6 +27,7 @@ import { ButtonSetWithOverflow } from '../ButtonSetWithOverflow/ButtonSetWithOve
27
27
 
28
28
  var _excluded = ["actionBarItems", "actionBarMenuOptionsClass", "actionBarOverflowAriaLabel", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "allTagsModalTitle", "hasBackgroundAlways", "breadcrumbOverflowAriaLabel", "breadcrumbs", "children", "className", "collapseHeader", "collapseHeaderIconDescription", "collapseTitle", "disableBreadcrumbScroll", "enableBreadcrumbScroll", "expandHeaderIconDescription", "fullWidthGrid", "hasCollapseHeaderToggle", "narrowGrid", "navigation", "pageActions", "pageActionsOverflowLabel", "pageActionsMenuOptionsClass", "showAllTagsLabel", "subtitle", "tags", "title", "withoutBackground", "breadcrumbOverflowTooltipAlign"];
29
29
  var componentName = 'PageHeader';
30
+ pkg._silenceWarnings(true);
30
31
  pkg.component.ActionBar = true;
31
32
 
32
33
  // Default values for props
@@ -58,6 +58,10 @@ interface RemoveModalProps extends React.ComponentProps<typeof ComposedModal> {
58
58
  * Specify the text for the primary button
59
59
  */
60
60
  primaryButtonText?: string;
61
+ /**
62
+ * Specify the danger description on the primary button
63
+ */
64
+ primaryDangerDescription?: string;
61
65
  /**
62
66
  * The name of the resource being acted upon
63
67
  */
@@ -16,7 +16,7 @@ import { pkg } from '../../settings.js';
16
16
  import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
17
17
  import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
18
18
 
19
- var _excluded = ["body", "className", "iconDescription", "inputInvalidText", "inputLabelText", "inputPlaceholderText", "label", "onClose", "onRequestSubmit", "open", "portalTarget", "preventCloseOnClickOutside", "primaryButtonDisabled", "primaryButtonText", "resourceName", "secondaryButtonText", "textConfirmation", "title"];
19
+ var _excluded = ["body", "className", "iconDescription", "inputInvalidText", "inputLabelText", "inputPlaceholderText", "label", "onClose", "onRequestSubmit", "open", "portalTarget", "preventCloseOnClickOutside", "primaryButtonDisabled", "primaryButtonText", "primaryDangerDescription", "resourceName", "secondaryButtonText", "textConfirmation", "title"];
20
20
  var componentName = 'RemoveModal';
21
21
 
22
22
  /**
@@ -40,6 +40,7 @@ var RemoveModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
40
40
  preventCloseOnClickOutside = _ref.preventCloseOnClickOutside,
41
41
  primaryButtonDisabled = _ref.primaryButtonDisabled,
42
42
  primaryButtonText = _ref.primaryButtonText,
43
+ primaryDangerDescription = _ref.primaryDangerDescription,
43
44
  resourceName = _ref.resourceName,
44
45
  secondaryButtonText = _ref.secondaryButtonText,
45
46
  textConfirmation = _ref.textConfirmation,
@@ -109,6 +110,7 @@ var RemoveModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
109
110
  }, secondaryButtonText), /*#__PURE__*/React__default.createElement(Button, {
110
111
  type: "submit",
111
112
  kind: "danger",
113
+ dangerDescription: primaryDangerDescription,
112
114
  onClick: onRequestSubmit,
113
115
  disabled: primaryButtonStatus
114
116
  }, primaryButtonText))));
@@ -173,6 +175,10 @@ RemoveModal.propTypes = {
173
175
  * Specify the text for the primary button
174
176
  */
175
177
  primaryButtonText: PropTypes.string,
178
+ /**
179
+ * Specify the danger description on the primary button
180
+ */
181
+ primaryDangerDescription: PropTypes.string,
176
182
  /**
177
183
  * The name of the resource being acted upon
178
184
  */
@@ -0,0 +1,87 @@
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
+ import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
+ import React__default from 'react';
10
+ import PropTypes from '../../node_modules/prop-types/index.js';
11
+ import cx from 'classnames';
12
+ import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
13
+ import { pkg } from '../../settings.js';
14
+ import { InlineLoading } from '@carbon/react';
15
+ import { CircleStroke, ErrorOutline, CheckmarkOutline } from '@carbon/react/icons';
16
+
17
+ var _CircleStroke, _InlineLoading, _ErrorOutline, _CheckmarkOutline;
18
+ var _excluded = ["className", "description", "errorMessage", "status"];
19
+
20
+ // The block part of our conventional BEM class names (blockClass__E--M).
21
+ var blockClass = "".concat(pkg.prefix, "--status-indicator-step");
22
+ var componentName = 'StatusIndicatorStep';
23
+ var defaults = {
24
+ status: 'inactive'
25
+ };
26
+
27
+ /**
28
+ * An icon/description pair that describes one step of the `StatusIndicator`.
29
+ */
30
+ var StatusIndicatorStep = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
31
+ var className = _ref.className,
32
+ description = _ref.description,
33
+ errorMessage = _ref.errorMessage,
34
+ _ref$status = _ref.status,
35
+ status = _ref$status === void 0 ? defaults.status : _ref$status,
36
+ rest = _objectWithoutProperties(_ref, _excluded);
37
+ return /*#__PURE__*/React__default.createElement("li", _extends({}, rest, {
38
+ className: cx(blockClass, className, "".concat(blockClass, "--").concat(status)),
39
+ ref: ref
40
+ }, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement("div", {
41
+ className: "".concat(blockClass, "__details")
42
+ }, /*#__PURE__*/React__default.createElement("div", {
43
+ className: "".concat(blockClass, "__icon")
44
+ }, status === 'inactive' && (_CircleStroke || (_CircleStroke = /*#__PURE__*/React__default.createElement(CircleStroke, {
45
+ size: 16,
46
+ viewBox: "1 1 14 14"
47
+ }))), status === 'active' && (_InlineLoading || (_InlineLoading = /*#__PURE__*/React__default.createElement(InlineLoading, null))), status === 'error' && (_ErrorOutline || (_ErrorOutline = /*#__PURE__*/React__default.createElement(ErrorOutline, {
48
+ size: 16
49
+ }))), status === 'finished' && (_CheckmarkOutline || (_CheckmarkOutline = /*#__PURE__*/React__default.createElement(CheckmarkOutline, {
50
+ size: 16
51
+ })))), /*#__PURE__*/React__default.createElement("div", {
52
+ className: "".concat(blockClass, "__text")
53
+ }, description)), status === 'error' && errorMessage && /*#__PURE__*/React__default.createElement("div", {
54
+ className: "".concat(blockClass, "__error-message")
55
+ }, errorMessage));
56
+ });
57
+
58
+ // Return a placeholder if not released and not enabled by feature flag
59
+ StatusIndicatorStep = pkg.checkComponentEnabled(StatusIndicatorStep, componentName);
60
+
61
+ // The display name of the component, used by React. Note that displayName
62
+ // is used in preference to relying on function.name.
63
+ StatusIndicatorStep.displayName = componentName;
64
+
65
+ // The types and DocGen commentary for the component props,
66
+ // in alphabetical order (for consistency).
67
+ // See https://www.npmjs.com/package/prop-types#usage.
68
+ StatusIndicatorStep.propTypes = {
69
+ /**
70
+ * Provide an optional class to be applied to the containing node.
71
+ */
72
+ className: PropTypes.string,
73
+ /**
74
+ * The text associated with the icon.
75
+ */
76
+ description: PropTypes.string.isRequired,
77
+ /**
78
+ * This message will appear below the description if the `status` is "error".
79
+ */
80
+ errorMessage: PropTypes.string,
81
+ /**
82
+ * Each `status` represents a different icon..
83
+ */
84
+ status: PropTypes.oneOf(['inactive', 'active', 'error', 'finished']).isRequired
85
+ };
86
+
87
+ export { StatusIndicatorStep };
@@ -99,9 +99,16 @@ interface TearsheetProps extends PropsWithChildren {
99
99
  */
100
100
  portalTarget: ReactNode;
101
101
  /**
102
- * Specify a CSS selector that matches the DOM element that should be focused when the Modal opens
102
+ * Specify a CSS selector that matches the DOM element that should be
103
+ * focused when the Modal opens.
103
104
  */
104
105
  selectorPrimaryFocus?: string;
106
+ /**
107
+ * Specify the CSS selectors that match the floating menus.
108
+ *
109
+ * See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
110
+ */
111
+ selectorsFloatingMenus?: string[];
105
112
  /**
106
113
  * The main title of the tearsheet, displayed in the header area.
107
114
  */
@@ -190,9 +190,17 @@ Tearsheet.propTypes = _objectSpread2({
190
190
  /**@ts-ignore */
191
191
  portalTarget: portalType,
192
192
  /**
193
- * Specify a CSS selector that matches the DOM element that should be focused when the Modal opens
193
+ * Specify a CSS selector that matches the DOM element that should be
194
+ * focused when the Modal opens.
194
195
  */
195
196
  selectorPrimaryFocus: PropTypes.string,
197
+ /**
198
+ * Specify the CSS selectors that match the floating menus.
199
+ *
200
+ * See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
201
+ */
202
+ /**@ts-ignore*/
203
+ selectorsFloatingMenus: PropTypes.arrayOf(PropTypes.string),
196
204
  /**
197
205
  * The main title of the tearsheet, displayed in the header area.
198
206
  */
@@ -64,6 +64,17 @@ interface TearsheetNarrowBaseProps extends PropsWithChildren {
64
64
  * The DOM element that the tearsheet should be rendered within. Defaults to document.body.
65
65
  */
66
66
  portalTarget?: ReactNode;
67
+ /**
68
+ * Specify a CSS selector that matches the DOM element that should be
69
+ * focused when the Modal opens.
70
+ */
71
+ selectorPrimaryFocus?: string;
72
+ /**
73
+ * Specify the CSS selectors that match the floating menus.
74
+ *
75
+ * See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
76
+ */
77
+ selectorsFloatingMenus?: string[];
67
78
  /**
68
79
  * The main title of the tearsheet, displayed in the header area.
69
80
  */
@@ -148,6 +148,18 @@ TearsheetNarrow.propTypes = _objectSpread2({
148
148
  */
149
149
  /**@ts-ignore */
150
150
  portalTarget: portalType,
151
+ /**
152
+ * Specify a CSS selector that matches the DOM element that should be
153
+ * focused when the Modal opens.
154
+ */
155
+ selectorPrimaryFocus: PropTypes.string,
156
+ /**
157
+ * Specify the CSS selectors that match the floating menus.
158
+ *
159
+ * See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
160
+ */
161
+ /**@ts-ignore*/
162
+ selectorsFloatingMenus: PropTypes.arrayOf(PropTypes.string),
151
163
  /**
152
164
  * The main title of the tearsheet, displayed in the header area.
153
165
  */
@@ -81,7 +81,17 @@ interface TearsheetShellProps extends PropsWithChildren {
81
81
  * The DOM element that the tearsheet should be rendered within. Defaults to document.body.
82
82
  */
83
83
  portalTarget?: ReactNode;
84
+ /**
85
+ * Specify a CSS selector that matches the DOM element that should be
86
+ * focused when the Modal opens.
87
+ */
84
88
  selectorPrimaryFocus?: string;
89
+ /**
90
+ * Specify the CSS selectors that match the floating menus.
91
+ *
92
+ * See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
93
+ */
94
+ selectorsFloatingMenus?: string[];
85
95
  /**
86
96
  * Specifies the width of the tearsheet, 'narrow' or 'wide'.
87
97
  */
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, defineProperty as _defineProperty, toConsumableArray as _toConsumableArray } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default, { useRef, useState, useEffect } from 'react';
10
10
  import { useResizeObserver } from '../../global/js/hooks/useResizeObserver.js';
11
11
  import PropTypes from '../../node_modules/prop-types/index.js';
@@ -20,7 +20,7 @@ import { useFocus } from '../../global/js/hooks/useFocus.js';
20
20
  import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
21
21
  import { ActionSet } from '../ActionSet/ActionSet.js';
22
22
 
23
- var _excluded = ["actions", "ariaLabel", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "portalTarget", "selectorPrimaryFocus", "size", "slug", "title", "verticalPosition", "launcherButtonRef"];
23
+ var _excluded = ["actions", "ariaLabel", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "portalTarget", "selectorPrimaryFocus", "selectorsFloatingMenus", "size", "slug", "title", "verticalPosition", "launcherButtonRef"];
24
24
 
25
25
  // The block part of our conventional BEM class names (bc__E--M).
26
26
  var bc = "".concat(pkg.prefix, "--tearsheet");
@@ -79,6 +79,8 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
79
79
  open = _ref.open,
80
80
  portalTargetIn = _ref.portalTarget,
81
81
  selectorPrimaryFocus = _ref.selectorPrimaryFocus,
82
+ _ref$selectorsFloatin = _ref.selectorsFloatingMenus,
83
+ selectorsFloatingMenus = _ref$selectorsFloatin === void 0 ? [] : _ref$selectorsFloatin,
82
84
  size = _ref.size,
83
85
  slug = _ref.slug,
84
86
  title = _ref.title,
@@ -249,7 +251,7 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
249
251
  onKeyDown: keyDownListener,
250
252
  preventCloseOnClickOutside: !isPassive,
251
253
  ref: modalRef,
252
- selectorsFloatingMenus: [".".concat(carbonPrefix, "--overflow-menu-options"), ".".concat(carbonPrefix, "--tooltip"), '.flatpickr-calendar', ".".concat(bc, "__container")],
254
+ selectorsFloatingMenus: [".".concat(carbonPrefix, "--overflow-menu-options"), ".".concat(carbonPrefix, "--tooltip"), '.flatpickr-calendar', ".".concat(bc, "__container")].concat(_toConsumableArray(selectorsFloatingMenus)),
253
255
  size: "sm"
254
256
  }), includeHeader && /*#__PURE__*/React__default.createElement(ModalHeader, {
255
257
  className: cx("".concat(bc, "__header"), _defineProperty(_defineProperty({}, "".concat(bc, "__header--with-close-icon"), effectiveHasCloseIcon), "".concat(bc, "__header--with-nav"), navigation)),
@@ -445,6 +447,18 @@ TearsheetShell.propTypes = _objectSpread2({
445
447
  */
446
448
  /**@ts-ignore*/
447
449
  portalTarget: portalType,
450
+ /**
451
+ * Specify a CSS selector that matches the DOM element that should be
452
+ * focused when the Modal opens.
453
+ */
454
+ selectorPrimaryFocus: PropTypes.string,
455
+ /**
456
+ * Specify the CSS selectors that match the floating menus.
457
+ *
458
+ * See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
459
+ */
460
+ /**@ts-ignore*/
461
+ selectorsFloatingMenus: PropTypes.arrayOf(PropTypes.string),
448
462
  /**
449
463
  * Specifies the width of the tearsheet, 'narrow' or 'wide'.
450
464
  */
@@ -28,7 +28,7 @@ var ToolbarButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
28
28
  rest = _objectWithoutProperties(_ref, _excluded);
29
29
  var Icon = renderIcon;
30
30
  return /*#__PURE__*/React__default.createElement(IconButton, _extends({
31
- align: ((_useContext = useContext(ToolbarContext)) === null || _useContext === void 0 ? void 0 : _useContext.vertical) && 'right'
31
+ align: (_useContext = useContext(ToolbarContext)) !== null && _useContext !== void 0 && _useContext.vertical ? 'right' : 'top'
32
32
  }, rest, {
33
33
  label: iconDescription,
34
34
  ref: ref,
@@ -50,7 +50,6 @@ export { Nav } from "./Nav";
50
50
  export { StringFormatter } from "./StringFormatter";
51
51
  export { UserAvatar } from "./UserAvatar";
52
52
  export { ScrollGradient } from "./ScrollGradient";
53
- export { StatusIndicator } from "./StatusIndicator";
54
53
  export { TagOverflow } from "./TagOverflow";
55
54
  export { ActionBar } from "./ActionBar";
56
55
  export { ConditionBuilder } from "./ConditionBuilder";
@@ -68,5 +67,6 @@ export { EditTearsheet, EditTearsheetForm } from "./EditTearsheet";
68
67
  export { Guidebanner, GuidebannerElement, GuidebannerElementButton, GuidebannerElementLink } from "./Guidebanner";
69
68
  export { InlineTip, InlineTipButton, InlineTipLink } from "./InlineTip";
70
69
  export { DescriptionList, DescriptionListBody, DescriptionListCell, DescriptionListRow } from "./DescriptionList";
70
+ export { StatusIndicator, StatusIndicatorStep } from "./StatusIndicator";
71
71
  export { FilterPanel, FilterPanelAccordion, FilterPanelAccordionItem, FilterPanelCheckbox, FilterPanelCheckboxWithOverflow, FilterPanelGroup, FilterPanelLabel, FilterPanelSearch } from "./FilterPanel";
72
72
  export { FeatureFlags as unstable_FeatureFlags, useFeatureFlag as unstable_useFeatureFlag, useFeatureFlags as unstable_useFeatureFlags } from "./FeatureFlags";
package/es/index.js CHANGED
@@ -122,6 +122,7 @@ export { StringFormatter } from './components/StringFormatter/StringFormatter.js
122
122
  export { UserAvatar } from './components/UserAvatar/UserAvatar.js';
123
123
  export { ScrollGradient } from './components/ScrollGradient/ScrollGradient.js';
124
124
  export { StatusIndicator } from './components/StatusIndicator/StatusIndicator.js';
125
+ export { StatusIndicatorStep } from './components/StatusIndicator/StatusIndicatorStep.js';
125
126
  export { TagOverflow } from './components/TagOverflow/TagOverflow.js';
126
127
  export { ActionBar } from './components/ActionBar/ActionBar.js';
127
128
  export { FilterPanel } from './components/FilterPanel/FilterPanel.js';
@@ -15,7 +15,6 @@ var icons = require('@carbon/react/icons');
15
15
  var ConditionBuilderItem = require('../ConditionBuilderItem/ConditionBuilderItem.js');
16
16
  var index = require('../../../node_modules/prop-types/index.js');
17
17
  var DataConfigs = require('../ConditionBuilderContext/DataConfigs.js');
18
- var ConditionBuilderItemOption = require('../ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js');
19
18
  var cx = require('classnames');
20
19
  var ConditionConnector = require('../ConditionBuilderConnector/ConditionConnector.js');
21
20
  var ConditionBuilderItemNumber = require('../ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js');
@@ -26,6 +25,8 @@ var ConditionBuilderButton = require('../ConditionBuilderButton/ConditionBuilder
26
25
  var util = require('../utils/util.js');
27
26
  var ConditionBuilderItemTime = require('../ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js');
28
27
  var ConditionBuilderAdd = require('../ConditionBuilderAdd/ConditionBuilderAdd.js');
28
+ var ItemOption = require('../ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js');
29
+ var ItemOptionForValueField = require('../ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js');
29
30
 
30
31
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
31
32
 
@@ -33,6 +34,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
33
34
  var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
34
35
 
35
36
  var _div;
37
+
36
38
  /**
37
39
  * This component build each block of condition consisting of property, operator value and close button.
38
40
  */
@@ -62,14 +64,6 @@ var ConditionBlock = function ConditionBlock(props) {
62
64
  var _useContext = React.useContext(ConditionBuilderProvider.ConditionBuilderContext),
63
65
  inputConfig = _useContext.inputConfig,
64
66
  variant = _useContext.variant;
65
- //Below possible input types expected for value field.
66
- var itemComponents = {
67
- option: ConditionBuilderItemOption.ConditionBuilderItemOption,
68
- text: ConditionBuilderItemText.ConditionBuilderItemText,
69
- number: ConditionBuilderItemNumber.ConditionBuilderItemNumber,
70
- date: ConditionBuilderItemDate.ConditionBuilderItemDate,
71
- time: ConditionBuilderItemTime.ConditionBuilderItemTime
72
- };
73
67
  var _useState = React.useState(false),
74
68
  _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
75
69
  showDeletionPreview = _useState2[0],
@@ -87,13 +81,17 @@ var ConditionBlock = function ConditionBlock(props) {
87
81
  type = _getCurrentConfig.type,
88
82
  config = _getCurrentConfig.config,
89
83
  label = _getCurrentConfig.label;
90
- var ItemComponent;
91
- // if (type == 'custom') {
92
- // ItemComponent = config.component;
93
- // } else {
94
- ItemComponent = property ? itemComponents[type] : null;
95
- //}
96
84
 
85
+ //Below possible input types expected for value field.
86
+ var itemComponents = {
87
+ text: ConditionBuilderItemText.ConditionBuilderItemText,
88
+ number: ConditionBuilderItemNumber.ConditionBuilderItemNumber,
89
+ date: ConditionBuilderItemDate.ConditionBuilderItemDate,
90
+ time: ConditionBuilderItemTime.ConditionBuilderItemTime,
91
+ option: ItemOptionForValueField.ItemOptionForValueField,
92
+ custom: config === null || config === void 0 ? void 0 : config.component
93
+ };
94
+ var ItemComponent = property ? itemComponents[type] : null;
97
95
  var onStatementChangeHandler = function onStatementChangeHandler(v, evt) {
98
96
  util.focusThisField(evt);
99
97
  onStatementChange(v);
@@ -114,9 +112,10 @@ var ConditionBlock = function ConditionBlock(props) {
114
112
  }));
115
113
  };
116
114
  var onValueChangeHandler = function onValueChangeHandler(newValue) {
117
- onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, condition), {}, {
118
- value: newValue,
119
- popoverToOpen: ''
115
+ var currentCondition = _rollupPluginBabelHelpers.objectSpread2({}, condition);
116
+ delete currentCondition.popoverToOpen;
117
+ onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, currentCondition), {}, {
118
+ value: newValue
120
119
  }));
121
120
  };
122
121
  var handleShowDeletionPreview = function handleShowDeletionPreview() {
@@ -126,6 +125,9 @@ var ConditionBlock = function ConditionBlock(props) {
126
125
  setShowDeletionPreview(false);
127
126
  };
128
127
  var getOperators = function getOperators() {
128
+ if (config !== null && config !== void 0 && config.operators) {
129
+ return config.operators;
130
+ }
129
131
  return DataConfigs.operatorConfig.filter(function (operator) {
130
132
  return operator.type.indexOf(type) != -1 || operator.type == 'all';
131
133
  });
@@ -156,7 +158,7 @@ var ConditionBlock = function ConditionBlock(props) {
156
158
  "data-name": "connectorField",
157
159
  popOverClassName: "".concat(DataConfigs.blockClass, "__gap"),
158
160
  className: "".concat(DataConfigs.blockClass, "__statement-button")
159
- }, /*#__PURE__*/React__default["default"].createElement(ConditionBuilderItemOption.ConditionBuilderItemOption, {
161
+ }, /*#__PURE__*/React__default["default"].createElement(ItemOption.ItemOption, {
160
162
  conditionState: {
161
163
  value: group.statement,
162
164
  label: DataConfigs.translateWithId('condition')
@@ -173,7 +175,7 @@ var ConditionBlock = function ConditionBlock(props) {
173
175
  "data-name": "propertyField",
174
176
  condition: condition,
175
177
  type: type
176
- }, /*#__PURE__*/React__default["default"].createElement(ConditionBuilderItemOption.ConditionBuilderItemOption, {
178
+ }, /*#__PURE__*/React__default["default"].createElement(ItemOption.ItemOption, {
177
179
  conditionState: {
178
180
  value: property,
179
181
  label: DataConfigs.translateWithId('property')
@@ -188,7 +190,7 @@ var ConditionBlock = function ConditionBlock(props) {
188
190
  "data-name": "operatorField",
189
191
  condition: condition,
190
192
  type: type
191
- }, /*#__PURE__*/React__default["default"].createElement(ConditionBuilderItemOption.ConditionBuilderItemOption, {
193
+ }, /*#__PURE__*/React__default["default"].createElement(ItemOption.ItemOption, {
192
194
  config: {
193
195
  options: getOperators()
194
196
  },