@carbon/ibm-products 2.42.1-canary.2 → 2.42.1-canary.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. package/css/index-full-carbon.css +302 -9
  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.css +302 -9
  6. package/css/index-without-carbon.css.map +1 -1
  7. package/css/index-without-carbon.min.css +1 -1
  8. package/css/index-without-carbon.min.css.map +1 -1
  9. package/css/index.css +302 -9
  10. package/css/index.css.map +1 -1
  11. package/css/index.min.css +1 -1
  12. package/css/index.min.css.map +1 -1
  13. package/es/components/Carousel/Carousel.d.ts +1 -1
  14. package/es/components/Carousel/Carousel.js +1 -1
  15. package/es/components/Coachmark/CoachmarkDragbar.d.ts +1 -1
  16. package/es/components/Coachmark/CoachmarkDragbar.js +1 -1
  17. package/es/components/Coachmark/CoachmarkHeader.d.ts +1 -1
  18. package/es/components/Coachmark/CoachmarkHeader.js +1 -1
  19. package/es/components/Coachmark/CoachmarkOverlay.d.ts +1 -1
  20. package/es/components/Coachmark/CoachmarkOverlay.js +1 -1
  21. package/es/components/Coachmark/CoachmarkTagline.d.ts +1 -1
  22. package/es/components/Coachmark/CoachmarkTagline.js +1 -1
  23. package/es/components/CoachmarkStack/CoachmarkStackHome.d.ts +1 -1
  24. package/es/components/CoachmarkStack/CoachmarkStackHome.js +2 -2
  25. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +6 -0
  26. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +74 -33
  27. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +15 -1
  28. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +95 -12
  29. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +11 -2
  30. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +27 -9
  31. package/es/components/ConditionBuilder/{ConditionConnector → ConditionBuilderConnector}/ConditionConnector.js +38 -33
  32. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +2 -0
  33. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +44 -0
  34. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +5 -0
  35. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +95 -14
  36. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +1 -0
  37. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +1 -0
  38. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +7 -0
  39. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +8 -1
  40. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -1
  41. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +197 -67
  42. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +10 -0
  43. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +69 -0
  44. package/es/components/ConditionBuilder/utils/util.d.ts +1 -0
  45. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -1
  46. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +7 -4
  47. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.d.ts +7 -1
  48. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +1 -0
  49. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +13 -3
  50. package/es/components/Datagrid/types/index.d.ts +2 -0
  51. package/es/components/Datagrid/useColumnOrder.d.ts +7 -1
  52. package/es/components/Datagrid/useNestedRows.js +24 -2
  53. package/es/components/Datagrid/useOnRowClick.d.ts +8 -1
  54. package/es/components/Datagrid/useOnRowClick.js +2 -1
  55. package/es/components/Datagrid/useRowIsMouseOver.d.ts +2 -1
  56. package/es/components/Datagrid/useRowIsMouseOver.js +1 -1
  57. package/es/components/Datagrid/useSelectRows.d.ts +8 -1
  58. package/es/components/Datagrid/useSelectRows.js +3 -2
  59. package/es/components/Datagrid/useSortableColumns.d.ts +10 -3
  60. package/es/components/Datagrid/useSortableColumns.js +3 -2
  61. package/es/components/Datagrid/utils/getAutoSizedColumnWidth.d.ts +8 -1
  62. package/es/components/Datagrid/utils/getAutoSizedColumnWidth.js +0 -7
  63. package/es/components/InterstitialScreenView/InterstitialScreenView.d.ts +1 -1
  64. package/es/components/InterstitialScreenView/InterstitialScreenView.js +1 -1
  65. package/es/components/SidePanel/SidePanel.d.ts +2 -2
  66. package/es/components/SidePanel/SidePanel.js +5 -3
  67. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +1 -1
  68. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +1 -1
  69. package/es/feature-flags.js +18 -0
  70. package/es/global/js/package-settings.js +2 -2
  71. package/es/index.d.ts +1 -0
  72. package/es/index.js +1 -0
  73. package/lib/components/Carousel/Carousel.d.ts +1 -1
  74. package/lib/components/Carousel/Carousel.js +1 -1
  75. package/lib/components/Coachmark/CoachmarkDragbar.d.ts +1 -1
  76. package/lib/components/Coachmark/CoachmarkDragbar.js +1 -1
  77. package/lib/components/Coachmark/CoachmarkHeader.d.ts +1 -1
  78. package/lib/components/Coachmark/CoachmarkHeader.js +1 -1
  79. package/lib/components/Coachmark/CoachmarkOverlay.d.ts +1 -1
  80. package/lib/components/Coachmark/CoachmarkOverlay.js +1 -1
  81. package/lib/components/Coachmark/CoachmarkTagline.d.ts +1 -1
  82. package/lib/components/Coachmark/CoachmarkTagline.js +1 -1
  83. package/lib/components/CoachmarkStack/CoachmarkStackHome.d.ts +1 -1
  84. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +2 -2
  85. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +6 -0
  86. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +73 -32
  87. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +15 -1
  88. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +92 -9
  89. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +11 -2
  90. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +26 -8
  91. package/lib/components/ConditionBuilder/{ConditionConnector → ConditionBuilderConnector}/ConditionConnector.js +36 -31
  92. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +2 -0
  93. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +52 -0
  94. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +5 -0
  95. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +92 -11
  96. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +1 -0
  97. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +1 -0
  98. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +7 -0
  99. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +8 -1
  100. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -1
  101. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +195 -64
  102. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +10 -0
  103. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +77 -0
  104. package/lib/components/ConditionBuilder/utils/util.d.ts +1 -0
  105. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -1
  106. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +7 -4
  107. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.d.ts +7 -1
  108. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +1 -0
  109. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +13 -3
  110. package/lib/components/Datagrid/types/index.d.ts +2 -0
  111. package/lib/components/Datagrid/useColumnOrder.d.ts +7 -1
  112. package/lib/components/Datagrid/useNestedRows.js +24 -2
  113. package/lib/components/Datagrid/useOnRowClick.d.ts +8 -1
  114. package/lib/components/Datagrid/useOnRowClick.js +2 -1
  115. package/lib/components/Datagrid/useRowIsMouseOver.d.ts +2 -1
  116. package/lib/components/Datagrid/useRowIsMouseOver.js +1 -1
  117. package/lib/components/Datagrid/useSelectRows.d.ts +8 -1
  118. package/lib/components/Datagrid/useSelectRows.js +3 -2
  119. package/lib/components/Datagrid/useSortableColumns.d.ts +10 -3
  120. package/lib/components/Datagrid/useSortableColumns.js +3 -2
  121. package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.d.ts +8 -1
  122. package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.js +0 -7
  123. package/lib/components/InterstitialScreenView/InterstitialScreenView.d.ts +1 -1
  124. package/lib/components/InterstitialScreenView/InterstitialScreenView.js +1 -1
  125. package/lib/components/SidePanel/SidePanel.d.ts +2 -2
  126. package/lib/components/SidePanel/SidePanel.js +5 -3
  127. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +1 -1
  128. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +1 -1
  129. package/lib/feature-flags.js +40 -0
  130. package/lib/global/js/package-settings.js +2 -2
  131. package/lib/index.d.ts +1 -0
  132. package/lib/index.js +1 -0
  133. package/package.json +3 -3
  134. package/scss/components/ConditionBuilder/_condition-builder.scss +21 -1
  135. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +22 -3
  136. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +58 -21
  137. package/scss/components/NonLinearReading/_non-linear-reading.scss +1 -1
  138. /package/es/components/ConditionBuilder/{ConditionConnector → ConditionBuilderConnector}/ConditionConnector.d.ts +0 -0
  139. /package/lib/components/ConditionBuilder/{ConditionConnector → ConditionBuilderConnector}/ConditionConnector.d.ts +0 -0
@@ -108,7 +108,8 @@ var SelectRow = function SelectRow(datagridState) {
108
108
  dispatch: dispatch,
109
109
  rowData: row,
110
110
  isChecked: event.target.checked,
111
- getRowId: getRowId
111
+ getRowId: getRowId,
112
+ selectAll: null
112
113
  });
113
114
  };
114
115
  var selectDisabled = isFetching || row.getRowProps().disabled;
@@ -128,7 +129,7 @@ var SelectRow = function SelectRow(datagridState) {
128
129
  onSelect: onSelectHandler,
129
130
  id: rowId,
130
131
  name: "".concat(rowId, "-name"),
131
- className: cx([checkboxClass, cellProps.className, _defineProperty({}, "".concat(checkboxClass, "-sticky-left"), isFirstColumnStickyLeft && windowSize > 671)]),
132
+ className: cx([checkboxClass, cellProps.className, _defineProperty({}, "".concat(checkboxClass, "-sticky-left"), isFirstColumnStickyLeft && Number(windowSize) > 671)]),
132
133
  ariaLabel: title,
133
134
  disabled: selectDisabled
134
135
  }));
@@ -1,6 +1,13 @@
1
- export function getNewSortOrder(sortOrder: any): {
2
- newSortDesc: undefined;
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
+ import { Hooks } from 'react-table';
8
+ export declare const getNewSortOrder: (sortOrder?: boolean | string) => {
9
+ newSortDesc: boolean;
3
10
  newOrder: string;
4
11
  };
12
+ declare const useSortableColumns: (hooks: Hooks) => void;
5
13
  export default useSortableColumns;
6
- declare function useSortableColumns(hooks: any): void;
@@ -22,7 +22,7 @@ var ordering = {
22
22
  };
23
23
  var getNewSortOrder = function getNewSortOrder(sortOrder) {
24
24
  var order = {
25
- newSortDesc: undefined,
25
+ newSortDesc: false,
26
26
  newOrder: ordering.NONE
27
27
  };
28
28
  if (sortOrder === false || sortOrder === ordering.DESC) {
@@ -137,7 +137,8 @@ var useSortableColumns = function useSortableColumns(hooks) {
137
137
  return (_instance$customizeCo = instance.customizeColumnsProps) !== null && _instance$customizeCo !== void 0 && _instance$customizeCo.isTearsheetOpen ? visibleColumns : _toConsumableArray(sortableColumns);
138
138
  };
139
139
  var sortInstanceProps = function sortInstanceProps(instance) {
140
- var onSort = instance.onSort;
140
+ var _ref3 = instance,
141
+ onSort = _ref3.onSort;
141
142
  Object.assign(instance, {
142
143
  manualSortBy: !!onSort,
143
144
  isTableSortable: true
@@ -1 +1,8 @@
1
- export function getAutoSizedColumnWidth(rows: Array<object>, accessor: string, headerText: string): number;
1
+ /**
2
+ * Copyright IBM Corp. 2023, 2023
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 { Row } from 'react-table';
8
+ export declare const getAutoSizedColumnWidth: (rows: Array<Row<object>>, accessor: string, headerText: string) => number;
@@ -14,13 +14,6 @@ import { toConsumableArray as _toConsumableArray } from '../../../_virtual/_roll
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
16
 
17
- /**
18
- * Calculates the auto sized width of a column
19
- * @param {Array<object>} rows - The datagrid rows
20
- * @param {string} accessor - The accessor for the column
21
- * @param {string} headerText - The header text for the column
22
- */
23
-
24
17
  var getAutoSizedColumnWidth = function getAutoSizedColumnWidth(rows, accessor, headerText) {
25
18
  var maxWidth = 400;
26
19
  var minWidth = 58;
@@ -20,7 +20,7 @@ interface InterstitialScreenViewProps extends PropsWithChildren {
20
20
  stepTitle: string;
21
21
  }
22
22
  /**
23
- * A Novice to Pro component intended to be used as the child elements of the InterstitialScreen component.
23
+ * An Onboarding component intended to be used as the child elements of the InterstitialScreen component.
24
24
  */
25
25
  export declare let InterstitialScreenView: React.ForwardRefExoticComponent<InterstitialScreenViewProps & React.RefAttributes<HTMLDivElement>>;
26
26
  export {};
@@ -21,7 +21,7 @@ var _excluded = ["children", "className", "stepTitle"];
21
21
  var blockClass = "".concat(pkg.prefix, "--interstitial-screen-view");
22
22
  var componentName = 'InterstitialScreenView';
23
23
  /**
24
- * A Novice to Pro component intended to be used as the child elements of the InterstitialScreen component.
24
+ * An Onboarding component intended to be used as the child elements of the InterstitialScreen component.
25
25
  */
26
26
  var InterstitialScreenView = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
27
27
  var children = _ref.children,
@@ -11,7 +11,7 @@ type SidePanelBaseProps = {
11
11
  /**
12
12
  * Sets the action toolbar buttons
13
13
  */
14
- actionToolbarButtons?: ButtonProps[];
14
+ actionToolbarButtons?: ButtonProps<any>[];
15
15
  /**
16
16
  * The primary actions to be shown in the side panel. Each action is
17
17
  * specified as an object that will render expressive Buttons. Any Button
@@ -20,7 +20,7 @@ type SidePanelBaseProps = {
20
20
  *
21
21
  * See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
22
22
  */
23
- actions?: ButtonProps[];
23
+ actions?: ButtonProps<any>[];
24
24
  /**
25
25
  * Determines if the title will animate on scroll
26
26
  */
@@ -323,12 +323,12 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
323
323
  if (primeFocusEl) {
324
324
  primeFocusEl === null || primeFocusEl === void 0 || primeFocusEl.focus();
325
325
  }
326
- } else {
326
+ } else if (!slideIn) {
327
327
  firstElement === null || firstElement === void 0 || firstElement.focus();
328
328
  }
329
329
  }, 0);
330
330
  }
331
- }, [animationComplete, firstElement, open, selectorPrimaryFocus]);
331
+ }, [animationComplete, firstElement, open, selectorPrimaryFocus, slideIn]);
332
332
  var primaryActionContainerClassNames = cx(["".concat(blockClass, "__actions-container"), _defineProperty({}, "".concat(blockClass, "__actions-container--condensed"), condensedActions)]);
333
333
  var mainPanelClassNames = cx([blockClass, className, "".concat(blockClass), "".concat(blockClass, "--").concat(size), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "--right-placement"), placement === 'right'), "".concat(blockClass, "--left-placement"), placement === 'left'), "".concat(blockClass, "--slide-in"), slideIn), "".concat(blockClass, "--has-slug"), slug), "".concat(blockClass, "--condensed-actions"), condensedActions), "".concat(blockClass, "--has-overlay"), includeOverlay)]);
334
334
  var renderTitle = function renderTitle() {
@@ -448,7 +448,7 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
448
448
  placement: placement,
449
449
  shouldReduceMotion: shouldReduceMotion
450
450
  },
451
- onKeyDown: keyDownListener
451
+ onKeyDown: slideIn ? undefined : keyDownListener
452
452
  }), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, renderHeader(), renderMain()), /*#__PURE__*/React__default.createElement(MotionActionSet, {
453
453
  actions: actions !== null && actions !== void 0 ? actions : [],
454
454
  className: primaryActionContainerClassNames,
@@ -471,6 +471,7 @@ SidePanel.propTypes = {
471
471
  /**
472
472
  * Sets the action toolbar buttons
473
473
  */
474
+ /**@ts-ignore */
474
475
  actionToolbarButtons: PropTypes.arrayOf(PropTypes.shape({
475
476
  label: PropTypes.string,
476
477
  leading: PropTypes.bool,
@@ -504,6 +505,7 @@ SidePanel.propTypes = {
504
505
  label: PropTypes.string,
505
506
  loading: PropTypes.bool,
506
507
  // we duplicate this Button prop to improve the DocGen here
508
+ /**@ts-ignore */
507
509
  onClick: Button.propTypes.onClick
508
510
  })))]),
509
511
  /**
@@ -20,7 +20,7 @@ interface SteppedAnimatedMediaProps {
20
20
  playStep?: number;
21
21
  }
22
22
  /**
23
- * The SteppedAnimatedMedia is a Novice to Pro internal component and is not intended for general use.
23
+ * The SteppedAnimatedMedia is an Onboarding internal component and is not intended for general use.
24
24
  */
25
25
  export declare const SteppedAnimatedMedia: React.ForwardRefExoticComponent<SteppedAnimatedMediaProps & React.RefAttributes<HTMLDivElement>>;
26
26
  export {};
@@ -27,7 +27,7 @@ var defaults = {
27
27
  playStep: 0
28
28
  };
29
29
  /**
30
- * The SteppedAnimatedMedia is a Novice to Pro internal component and is not intended for general use.
30
+ * The SteppedAnimatedMedia is an Onboarding internal component and is not intended for general use.
31
31
  */
32
32
  var SteppedAnimatedMedia = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
33
33
  var className = _ref.className,
@@ -0,0 +1,18 @@
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 * as FeatureFlags from '@carbon/feature-flags';
9
+
10
+ FeatureFlags.merge({
11
+ 'default-portal-target-body': true,
12
+ 'enable-datagrid-useInlineEdit': false,
13
+ 'enable-datagrid-useEditableCell': false,
14
+ 'enable-datagrid-useCustomizeColumns': false,
15
+ 'ExampleComponent.secondaryIcon': false,
16
+ 'ExampleComponent.useExample': false,
17
+ 'enable-example-flag': false
18
+ });
@@ -98,7 +98,7 @@ var defaults = {
98
98
  GetStartedCard: false,
99
99
  /* new component flags here - comment used by generate CLI */
100
100
 
101
- // Novice to pro components not yet reviewed and released:
101
+ // Onboarding components not yet reviewed and released:
102
102
  Coachmark: false,
103
103
  CoachmarkBeacon: false,
104
104
  CoachmarkButton: false,
@@ -118,7 +118,7 @@ var defaults = {
118
118
  UserAvatar: false,
119
119
  /* new component flags here - comment used by generate CLI */
120
120
 
121
- // Novice to pro components not yet reviewed and released:
121
+ // Onboarding components not yet reviewed and released:
122
122
  EmptyStateV2: false,
123
123
  Guidebanner: false,
124
124
  GuidebannerElement: false,
package/es/index.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
+ import './feature-flags';
7
8
  export { pkg } from './settings';
8
9
  export { usePrefix } from './global/js/hooks';
9
10
  export * from './components';
package/es/index.js CHANGED
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ import './feature-flags.js';
8
9
  export { pkg } from './settings.js';
9
10
  export { useColumnOrder } from 'react-table';
10
11
  export { usePrefix } from './global/js/hooks/usePrefix.js';
@@ -47,7 +47,7 @@ export interface CarouselProps {
47
47
  [key: string]: any;
48
48
  }
49
49
  /**
50
- * The Carousel acts as a scaffold for other Novice to Pro content.
50
+ * The Carousel acts as a scaffold for other Onboarding content.
51
51
  *
52
52
  * This component is not intended for general use.
53
53
  *
@@ -35,7 +35,7 @@ var defaults = {
35
35
  };
36
36
 
37
37
  /**
38
- * The Carousel acts as a scaffold for other Novice to Pro content.
38
+ * The Carousel acts as a scaffold for other Onboarding content.
39
39
  *
40
40
  * This component is not intended for general use.
41
41
  *
@@ -38,7 +38,7 @@ interface CoachmarkDragbarProps {
38
38
  }
39
39
  /**
40
40
  * DO NOT USE. This component is for the exclusive use
41
- * of other Novice to Pro components.
41
+ * of other Onboarding components.
42
42
  */
43
43
  export declare let CoachmarkDragbar: React.ForwardRefExoticComponent<Omit<CoachmarkDragbarProps, "ref"> & React.RefAttributes<HTMLElement>>;
44
44
  export {};
@@ -42,7 +42,7 @@ var defaults = {
42
42
  };
43
43
  /**
44
44
  * DO NOT USE. This component is for the exclusive use
45
- * of other Novice to Pro components.
45
+ * of other Onboarding components.
46
46
  */
47
47
  exports.CoachmarkDragbar = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
48
48
  var a11yKeyboardHandler = _ref.a11yKeyboardHandler,
@@ -25,7 +25,7 @@ interface CoachmarkHeaderProps {
25
25
  }
26
26
  /**
27
27
  * DO NOT USE. This component is for the exclusive use
28
- * of other Novice to Pro components.
28
+ * of other Onboarding components.
29
29
  */
30
30
  export declare let CoachmarkHeader: React.ForwardRefExoticComponent<CoachmarkHeaderProps & React.RefAttributes<HTMLElement>>;
31
31
  export {};
@@ -37,7 +37,7 @@ var defaults = {
37
37
  };
38
38
  /**
39
39
  * DO NOT USE. This component is for the exclusive use
40
- * of other Novice to Pro components.
40
+ * of other Onboarding components.
41
41
  */
42
42
  exports.CoachmarkHeader = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
43
43
  var _ref$closeIconDescrip = _ref.closeIconDescription,
@@ -40,7 +40,7 @@ interface CoachmarkOverlayProps {
40
40
  }
41
41
  /**
42
42
  * DO NOT USE. This component is for the exclusive use
43
- * of other Novice to Pro components.
43
+ * of other Onboarding components.
44
44
  */
45
45
  export declare let CoachmarkOverlay: React.ForwardRefExoticComponent<Omit<CoachmarkOverlayProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
46
46
  export {};
@@ -41,7 +41,7 @@ var defaults = {
41
41
  };
42
42
  /**
43
43
  * DO NOT USE. This component is for the exclusive use
44
- * of other Novice to Pro components.
44
+ * of other Onboarding components.
45
45
  */
46
46
  exports.CoachmarkOverlay = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
47
47
  var children = _ref.children,
@@ -25,7 +25,7 @@ interface CoachmarkTaglineProps {
25
25
  }
26
26
  /**
27
27
  * DO NOT USE. This component is for the exclusive use
28
- * of other Novice to Pro components.
28
+ * of other Onboarding components.
29
29
  */
30
30
  export declare let CoachmarkTagline: React.ForwardRefExoticComponent<CoachmarkTaglineProps & React.RefAttributes<HTMLDivElement>>;
31
31
  export {};
@@ -37,7 +37,7 @@ var defaults = {
37
37
  };
38
38
  /**
39
39
  * DO NOT USE. This component is for the exclusive use
40
- * of other Novice to Pro components.
40
+ * of other Onboarding components.
41
41
  */
42
42
  exports.CoachmarkTagline = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
43
43
  var _ref$closeIconDescrip = _ref.closeIconDescription,
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DO NOT USE. This component is for the exclusive use
3
- * of other Novice to Pro components.
3
+ * of other Onboarding components.
4
4
  */
5
5
  export let CoachmarkStackHome: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
6
6
  import React from 'react';
@@ -39,7 +39,7 @@ var componentName = 'CoachmarkStackHome';
39
39
 
40
40
  /**
41
41
  * DO NOT USE. This component is for the exclusive use
42
- * of other Novice to Pro components.
42
+ * of other Onboarding components.
43
43
  */
44
44
  exports.CoachmarkStackHome = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
45
45
  var _document$querySelect;
@@ -67,7 +67,7 @@ exports.CoachmarkStackHome = /*#__PURE__*/React.forwardRef(function (_ref, ref)
67
67
  }, 100);
68
68
  }, [isOpen]);
69
69
  if (!navLinkLabels) {
70
- return pconsole["default"].warn("".concat(componentName, " is a Novice to Pro internal component and is not intended for general use."));
70
+ return pconsole["default"].warn("".concat(componentName, " is an Onboarding internal component and is not intended for general use."));
71
71
  }
72
72
  var portalNode = portalTarget ? (_document$querySelect = document.querySelector(portalTarget)) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector('body') : document.querySelector('body');
73
73
  return /*#__PURE__*/reactDom.createPortal( /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
@@ -6,17 +6,23 @@ declare function ConditionBlock(props: any): import("react/jsx-runtime").JSX.Ele
6
6
  declare namespace ConditionBlock {
7
7
  namespace propTypes {
8
8
  let addConditionHandler: PropTypes.Requireable<(...args: any[]) => any>;
9
+ let addConditionSubGroupHandler: PropTypes.Requireable<(...args: any[]) => any>;
9
10
  let aria: PropTypes.Requireable<object>;
10
11
  let condition: PropTypes.Requireable<object>;
11
12
  let conditionIndex: PropTypes.Requireable<number>;
12
13
  let conjunction: PropTypes.Requireable<string>;
13
14
  let group: PropTypes.Requireable<object>;
15
+ let hideConditionPreviewHandler: PropTypes.Requireable<(...args: any[]) => any>;
16
+ let hideConditionSubGroupPreviewHandler: PropTypes.Requireable<(...args: any[]) => any>;
14
17
  let isLastCondition: PropTypes.Requireable<(...args: any[]) => any>;
15
18
  let isStatement: PropTypes.Requireable<boolean>;
16
19
  let onChange: PropTypes.Requireable<(...args: any[]) => any>;
17
20
  let onConnectorOperatorChange: PropTypes.Requireable<(...args: any[]) => any>;
18
21
  let onRemove: PropTypes.Requireable<(...args: any[]) => any>;
19
22
  let onStatementChange: PropTypes.Requireable<(...args: any[]) => any>;
23
+ let showConditionPreviewHandler: PropTypes.Requireable<(...args: any[]) => any>;
24
+ let showConditionSubGroupPreviewHandler: PropTypes.Requireable<(...args: any[]) => any>;
25
+ let state: PropTypes.Requireable<object>;
20
26
  }
21
27
  }
22
28
  import PropTypes from 'prop-types';
@@ -17,7 +17,7 @@ var index = require('../../../node_modules/prop-types/index.js');
17
17
  var DataConfigs = require('../ConditionBuilderContext/DataConfigs.js');
18
18
  var ConditionBuilderItemOption = require('../ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js');
19
19
  var cx = require('classnames');
20
- var ConditionConnector = require('../ConditionConnector/ConditionConnector.js');
20
+ var ConditionConnector = require('../ConditionBuilderConnector/ConditionConnector.js');
21
21
  var ConditionBuilderItemNumber = require('../ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js');
22
22
  var ConditionBuilderItemText = require('../ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js');
23
23
  var ConditionBuilderItemDate = require('../ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js');
@@ -32,6 +32,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
32
32
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
33
33
  var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
34
34
 
35
+ var _div;
35
36
  /**
36
37
  * This component build each block of condition consisting of property, operator value and close button.
37
38
  */
@@ -49,11 +50,19 @@ var ConditionBlock = function ConditionBlock(props) {
49
50
  isStatement = props.isStatement,
50
51
  group = props.group,
51
52
  onStatementChange = props.onStatementChange,
52
- addConditionHandler = props.addConditionHandler,
53
53
  conditionIndex = props.conditionIndex,
54
+ addConditionHandler = props.addConditionHandler,
55
+ _addConditionSubGroupHandler = props.addConditionSubGroupHandler,
56
+ aria = props.aria,
57
+ hideConditionSubGroupPreviewHandler = props.hideConditionSubGroupPreviewHandler,
58
+ showConditionSubGroupPreviewHandler = props.showConditionSubGroupPreviewHandler,
59
+ hideConditionPreviewHandler = props.hideConditionPreviewHandler,
60
+ showConditionPreviewHandler = props.showConditionPreviewHandler,
54
61
  isLastCondition = props.isLastCondition;
55
62
  var _useContext = React.useContext(ConditionBuilderProvider.ConditionBuilderContext),
56
- inputConfig = _useContext.inputConfig;
63
+ inputConfig = _useContext.inputConfig,
64
+ variant = _useContext.variant;
65
+ //Below possible input types expected for value field.
57
66
  var itemComponents = {
58
67
  option: ConditionBuilderItemOption.ConditionBuilderItemOption,
59
68
  text: ConditionBuilderItemText.ConditionBuilderItemText,
@@ -78,14 +87,17 @@ var ConditionBlock = function ConditionBlock(props) {
78
87
  type = _getCurrentConfig.type,
79
88
  config = _getCurrentConfig.config,
80
89
  label = _getCurrentConfig.label;
81
- var ItemComponent = property ? itemComponents[type] : null;
90
+ var ItemComponent;
91
+ // if (type == 'custom') {
92
+ // ItemComponent = config.component;
93
+ // } else {
94
+ ItemComponent = property ? itemComponents[type] : null;
95
+ //}
96
+
82
97
  var onStatementChangeHandler = function onStatementChangeHandler(v, evt) {
83
98
  util.focusThisField(evt);
84
99
  onStatementChange(v);
85
100
  };
86
- var onConnectorOperatorChangeHandler = function onConnectorOperatorChangeHandler(op) {
87
- onConnectorOperatorChange(op);
88
- };
89
101
  var onPropertyChangeHandler = function onPropertyChangeHandler(newProperty) {
90
102
  onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, condition), {}, {
91
103
  property: newProperty,
@@ -118,21 +130,32 @@ var ConditionBlock = function ConditionBlock(props) {
118
130
  return operator.type.indexOf(type) != -1 || operator.type == 'all';
119
131
  });
120
132
  };
121
- return /*#__PURE__*/React__default["default"].createElement("div", {
122
- className: cx__default["default"]("".concat(DataConfigs.blockClass, "__condition-block conditionBlockWrapper ").concat(DataConfigs.blockClass, "__gap ").concat(DataConfigs.blockClass, "__gap-bottom"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(DataConfigs.blockClass, "__condition__deletion-preview"), showDeletionPreview)),
123
- key: conditionIndex,
133
+ var getAriaAttributes = function getAriaAttributes() {
134
+ return variant == 'tree' ? {
135
+ 'aria-level': aria.level,
136
+ 'aria-posinset': aria.posinset,
137
+ 'aria-setsize': aria.setsize
138
+ } : {};
139
+ };
140
+ return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
141
+ className: cx__default["default"]("".concat(DataConfigs.blockClass, "__condition-block"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(DataConfigs.blockClass, "__condition__deletion-preview"), showDeletionPreview), _rollupPluginBabelHelpers.defineProperty({}, "".concat(DataConfigs.blockClass, "__gap-bottom"), variant == 'tree' && !(conditionIndex + 1 >= group.conditions.length)), _rollupPluginBabelHelpers.defineProperty({}, "".concat(DataConfigs.blockClass, "__gap ").concat(DataConfigs.blockClass, "__gap-bottom"), variant == 'sentence')),
124
142
  role: "row",
125
143
  "aria-label": DataConfigs.translateWithId('condition_row'),
126
144
  tabIndex: -1
127
- }, isStatement && /*#__PURE__*/React__default["default"].createElement(ConditionBuilderItem.ConditionBuilderItem
128
- // open={false}
129
- , {
145
+ }, getAriaAttributes()), conjunction ? /*#__PURE__*/React__default["default"].createElement(ConditionConnector["default"], {
146
+ className: "".concat(DataConfigs.blockClass, "__gap"),
147
+ operator: conjunction,
148
+ onChange: function onChange(op) {
149
+ return onConnectorOperatorChange(op);
150
+ }
151
+ }) : _div || (_div = /*#__PURE__*/React__default["default"].createElement("div", {
152
+ role: "gridcell"
153
+ })), isStatement && /*#__PURE__*/React__default["default"].createElement(ConditionBuilderItem.ConditionBuilderItem, {
130
154
  label: group.statement,
131
155
  title: DataConfigs.translateWithId('condition'),
132
156
  "data-name": "connectorField",
133
157
  popOverClassName: "".concat(DataConfigs.blockClass, "__gap"),
134
- className: "".concat(DataConfigs.blockClass, "__statement-button"),
135
- tabIndex: 0
158
+ className: "".concat(DataConfigs.blockClass, "__statement-button")
136
159
  }, /*#__PURE__*/React__default["default"].createElement(ConditionBuilderItemOption.ConditionBuilderItemOption, {
137
160
  conditionState: {
138
161
  value: group.statement,
@@ -142,11 +165,7 @@ var ConditionBlock = function ConditionBlock(props) {
142
165
  config: {
143
166
  options: DataConfigs.statementConfig
144
167
  }
145
- })), conjunction && /*#__PURE__*/React__default["default"].createElement(ConditionConnector["default"], {
146
- className: "".concat(DataConfigs.blockClass, "__gap"),
147
- operator: conjunction,
148
- onChange: onConnectorOperatorChangeHandler
149
- }), /*#__PURE__*/React__default["default"].createElement(ConditionBuilderItem.ConditionBuilderItem, {
168
+ })), /*#__PURE__*/React__default["default"].createElement(ConditionBuilderItem.ConditionBuilderItem, {
150
169
  label: label,
151
170
  title: DataConfigs.translateWithId('property'),
152
171
  renderIcon: icon !== null && icon !== void 0 ? icon : null,
@@ -193,7 +212,8 @@ var ConditionBlock = function ConditionBlock(props) {
193
212
  value: value
194
213
  },
195
214
  onChange: onValueChangeHandler,
196
- config: config
215
+ config: config,
216
+ "data-name": "valueField"
197
217
  })), /*#__PURE__*/React__default["default"].createElement("span", {
198
218
  role: "gridcell",
199
219
  "aria-label": DataConfigs.translateWithId('remove_condition')
@@ -211,9 +231,15 @@ var ConditionBlock = function ConditionBlock(props) {
211
231
  })), isLastCondition(conditionIndex, group.conditions) && /*#__PURE__*/React__default["default"].createElement(ConditionBuilderAdd["default"], {
212
232
  onClick: function onClick() {
213
233
  addConditionHandler(conditionIndex);
214
- }
215
- //addConditionSubGroupHandler={()=>{addConditionSubGroupHandler(conditionIndex)}}
216
- ,
234
+ },
235
+ addConditionSubGroupHandler: function addConditionSubGroupHandler() {
236
+ _addConditionSubGroupHandler(conditionIndex);
237
+ },
238
+ showConditionSubGroupPreviewHandler: showConditionSubGroupPreviewHandler,
239
+ hideConditionSubGroupPreviewHandler: hideConditionSubGroupPreviewHandler,
240
+ enableSubGroup: variant == 'tree',
241
+ showConditionPreviewHandler: showConditionPreviewHandler,
242
+ hideConditionPreviewHandler: hideConditionPreviewHandler,
217
243
  className: "".concat(DataConfigs.blockClass, "__gap ").concat(DataConfigs.blockClass, "__gap-left")
218
244
  }));
219
245
  };
@@ -224,16 +250,14 @@ ConditionBlock.propTypes = {
224
250
  */
225
251
  addConditionHandler: index["default"].func,
226
252
  /**
227
- * object hold aria attributes
253
+ * callback to add a new condition subgroup
228
254
  */
229
- aria: index["default"].object,
255
+ addConditionSubGroupHandler: index["default"].func,
230
256
  /**
231
- * object that hold the current condition
257
+ * object hold aria attributes
232
258
  */
259
+ aria: index["default"].object,
233
260
  condition: index["default"].object,
234
- /**
235
- * index of the current condition
236
- */
237
261
  conditionIndex: index["default"].number,
238
262
  /**
239
263
  * string that decides to show the condition connector
@@ -244,8 +268,13 @@ ConditionBlock.propTypes = {
244
268
  */
245
269
  group: index["default"].object,
246
270
  /**
247
- * callback to add a new condition
271
+ * handler for hiding sub group preview
272
+ */
273
+ hideConditionPreviewHandler: index["default"].func,
274
+ /**
275
+ * handler for hiding sub group preview
248
276
  */
277
+ hideConditionSubGroupPreviewHandler: index["default"].func,
249
278
  isLastCondition: index["default"].func,
250
279
  /**
251
280
  * boolean that decides to show the statement(if/ excl.if)
@@ -266,7 +295,19 @@ ConditionBlock.propTypes = {
266
295
  /**
267
296
  * callback to handle the statement(if/ excl.if) change
268
297
  */
269
- onStatementChange: index["default"].func
298
+ onStatementChange: index["default"].func,
299
+ /**
300
+ * handler for showing add condition preview
301
+ */
302
+ showConditionPreviewHandler: index["default"].func,
303
+ /**
304
+ * handler for showing sub group preview
305
+ */
306
+ showConditionSubGroupPreviewHandler: index["default"].func,
307
+ /**
308
+ * object that hold the current condition
309
+ */
310
+ state: index["default"].object
270
311
  };
271
312
 
272
313
  exports["default"] = ConditionBlock$1;
@@ -1,12 +1,26 @@
1
1
  export default ConditionBuilderAdd;
2
- declare function ConditionBuilderAdd({ className, onClick }: {
2
+ declare function ConditionBuilderAdd({ className, onClick, addConditionSubGroupHandler, showConditionSubGroupPreviewHandler, hideConditionSubGroupPreviewHandler, showConditionPreviewHandler, hideConditionPreviewHandler, enableSubGroup, buttonLabel, }: {
3
3
  className: any;
4
4
  onClick: any;
5
+ addConditionSubGroupHandler: any;
6
+ showConditionSubGroupPreviewHandler: any;
7
+ hideConditionSubGroupPreviewHandler: any;
8
+ showConditionPreviewHandler: any;
9
+ hideConditionPreviewHandler: any;
10
+ enableSubGroup: any;
11
+ buttonLabel: any;
5
12
  }): import("react/jsx-runtime").JSX.Element;
6
13
  declare namespace ConditionBuilderAdd {
7
14
  namespace propTypes {
15
+ let addConditionSubGroupHandler: PropTypes.Requireable<(...args: any[]) => any>;
16
+ let buttonLabel: PropTypes.Requireable<string>;
8
17
  let className: PropTypes.Requireable<string>;
18
+ let enableSubGroup: PropTypes.Requireable<boolean>;
19
+ let hideConditionPreviewHandler: PropTypes.Requireable<(...args: any[]) => any>;
20
+ let hideConditionSubGroupPreviewHandler: PropTypes.Requireable<(...args: any[]) => any>;
9
21
  let onClick: PropTypes.Requireable<(...args: any[]) => any>;
22
+ let showConditionPreviewHandler: PropTypes.Requireable<(...args: any[]) => any>;
23
+ let showConditionSubGroupPreviewHandler: PropTypes.Requireable<(...args: any[]) => any>;
10
24
  }
11
25
  }
12
26
  import PropTypes from 'prop-types';