@carbon/ibm-products 2.43.2-canary.78 → 2.43.2-canary.81

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 (86) hide show
  1. package/css/index-full-carbon.css +252 -58
  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 +3 -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 +72 -20
  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 +173 -44
  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/ActionBar/ActionBarItem.js +1 -1
  18. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +20 -14
  19. package/es/components/ConditionBuilder/ConditionBuilder.js +3 -3
  20. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +8 -5
  21. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +4 -2
  22. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +2 -2
  23. package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +4 -3
  24. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +1 -3
  25. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +4 -10
  26. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +1 -0
  27. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +6 -1
  28. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +3 -1
  29. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +4 -2
  30. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +3 -1
  31. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +47 -23
  32. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +1 -1
  33. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +3 -3
  34. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +6 -3
  35. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +3 -2
  36. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
  37. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +52 -32
  38. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -0
  39. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +51 -44
  40. package/es/components/ConditionBuilder/utils/util.d.ts +6 -4
  41. package/es/components/ConditionBuilder/utils/util.js +35 -17
  42. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +33 -1
  43. package/es/components/StringFormatter/StringFormatter.js +14 -3
  44. package/es/components/StringFormatter/utils/enums.d.ts +20 -1
  45. package/es/components/StringFormatter/utils/enums.js +22 -2
  46. package/es/node_modules/@carbon/icon-helpers/es/index.js +49 -62
  47. package/es/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1020 -1058
  48. package/es/node_modules/@carbon/icons-react/es/generated/bucket-9.js +881 -758
  49. package/lib/components/ActionBar/ActionBarItem.js +1 -1
  50. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +19 -13
  51. package/lib/components/ConditionBuilder/ConditionBuilder.js +3 -3
  52. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +8 -5
  53. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +4 -2
  54. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +2 -2
  55. package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +4 -3
  56. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +1 -3
  57. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +4 -10
  58. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +1 -0
  59. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +6 -1
  60. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +3 -1
  61. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +4 -2
  62. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +3 -1
  63. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +46 -22
  64. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +1 -1
  65. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +3 -3
  66. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +6 -3
  67. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +3 -2
  68. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
  69. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +51 -31
  70. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -0
  71. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +50 -42
  72. package/lib/components/ConditionBuilder/utils/util.d.ts +6 -4
  73. package/lib/components/ConditionBuilder/utils/util.js +36 -16
  74. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +32 -0
  75. package/lib/components/StringFormatter/StringFormatter.js +13 -2
  76. package/lib/components/StringFormatter/utils/enums.d.ts +20 -1
  77. package/lib/components/StringFormatter/utils/enums.js +23 -1
  78. package/lib/node_modules/@carbon/icon-helpers/es/index.js +49 -62
  79. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1036 -1074
  80. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-9.js +946 -823
  81. package/package.json +5 -5
  82. package/scss/components/ConditionBuilder/_condition-builder.scss +4 -0
  83. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +6 -1
  84. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +1 -1
  85. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +7 -5
  86. package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +5 -4
@@ -5,19 +5,17 @@ export default ConditionGroupBuilder;
5
5
  * All the inner components of group are called from here.
6
6
  * @returns
7
7
  */
8
- declare function ConditionGroupBuilder({ group, aria, onRemove, onChange, conditionBuilderRef, className, }: {
8
+ declare function ConditionGroupBuilder({ group, aria, onRemove, onChange, className, }: {
9
9
  group: any;
10
10
  aria: any;
11
11
  onRemove: any;
12
12
  onChange: any;
13
- conditionBuilderRef: any;
14
13
  className: any;
15
14
  }): import("react/jsx-runtime").JSX.Element;
16
15
  declare namespace ConditionGroupBuilder {
17
16
  namespace propTypes {
18
17
  let aria: PropTypes.Requireable<object>;
19
18
  let className: PropTypes.Requireable<string>;
20
- let conditionBuilderRef: PropTypes.Requireable<object>;
21
19
  let group: PropTypes.Requireable<object>;
22
20
  let onChange: PropTypes.Requireable<(...args: any[]) => any>;
23
21
  let onRemove: PropTypes.Requireable<(...args: any[]) => any>;
@@ -42,14 +42,15 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
42
42
  aria = _ref.aria,
43
43
  onRemove = _ref.onRemove,
44
44
  onChange = _ref.onChange,
45
- conditionBuilderRef = _ref.conditionBuilderRef,
46
45
  className = _ref.className;
47
- var _useTranslations = useTranslations.useTranslations(['condition_builder_group', 'conditionText']),
48
- _useTranslations2 = _rollupPluginBabelHelpers.slicedToArray(_useTranslations, 2),
46
+ var _useTranslations = useTranslations.useTranslations(['conditionBuilderGroupText', 'conditionText', 'conditionBuilderText']),
47
+ _useTranslations2 = _rollupPluginBabelHelpers.slicedToArray(_useTranslations, 3),
49
48
  conditionBuilderGroupText = _useTranslations2[0],
50
- conditionText = _useTranslations2[1];
49
+ conditionText = _useTranslations2[1],
50
+ conditionBuilderText = _useTranslations2[2];
51
51
  var _useContext = React.useContext(ConditionBuilderProvider.ConditionBuilderContext),
52
- variant = _useContext.variant;
52
+ variant = _useContext.variant,
53
+ conditionBuilderRef = _useContext.conditionBuilderRef;
53
54
  var _useState = React.useState(-1),
54
55
  _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
55
56
  showConditionPreview = _useState2[0],
@@ -62,11 +63,40 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
62
63
  var onRemoveHandler = function onRemoveHandler(conditionId, evt, conditionIndex) {
63
64
  if (group.conditions.length > 1) {
64
65
  variant == 'tree' ? handleFocusOnCloseTree(evt) : handleFocusOnClose(evt, conditionIndex);
65
- onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, group), {}, {
66
- conditions: group.conditions.filter(function (condition) {
67
- return conditionId !== condition.id;
68
- })
69
- }));
66
+ if (group.conditions[1].conditions) {
67
+ //when we remove every plain conditions of a group without deleting the subgroup, we need to restructure the group
68
+ //the inner group become outer group and same level subgroups become plain conditions
69
+
70
+ //spreading out the condition inside the subgroup
71
+ var allConditions = group.conditions.reduce(function (acc, item) {
72
+ if (item.conditions) {
73
+ return acc.concat(item.conditions);
74
+ }
75
+ return acc;
76
+ }, []);
77
+
78
+ //we always have conditions first and then subgroups, so ordering accordingly
79
+ var groupedItems = {
80
+ groups: [],
81
+ conditions: []
82
+ };
83
+ allConditions.forEach(function (item) {
84
+ if (item.conditions) {
85
+ groupedItems.groups.push(item);
86
+ } else {
87
+ groupedItems.conditions.push(item);
88
+ }
89
+ });
90
+ onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, group), {}, {
91
+ conditions: [].concat(_rollupPluginBabelHelpers.toConsumableArray(groupedItems.conditions), _rollupPluginBabelHelpers.toConsumableArray(groupedItems.groups))
92
+ }));
93
+ } else {
94
+ onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, group), {}, {
95
+ conditions: group.conditions.filter(function (condition) {
96
+ return conditionId !== condition.id;
97
+ })
98
+ }));
99
+ }
70
100
  } else {
71
101
  onRemove(evt);
72
102
  }
@@ -96,11 +126,9 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
96
126
  //or focus the next one.
97
127
  var currentGroupCloseButtons = (_e$currentTarget$clos = e.currentTarget.closest(".".concat(DataConfigs.blockClass, "__group"))) === null || _e$currentTarget$clos === void 0 ? void 0 : _e$currentTarget$clos.querySelectorAll('[data-name="closeCondition"]');
98
128
  if (conditionIndex == currentGroupCloseButtons.length - 1) {
99
- var _currentGroupCloseBut;
100
- (_currentGroupCloseBut = currentGroupCloseButtons[conditionIndex - 1]) === null || _currentGroupCloseBut === void 0 || _currentGroupCloseBut.focus();
129
+ util.manageTabIndexAndFocus(currentGroupCloseButtons[conditionIndex - 1], conditionBuilderRef);
101
130
  } else {
102
- var _currentGroupCloseBut2;
103
- (_currentGroupCloseBut2 = currentGroupCloseButtons[conditionIndex + 1]) === null || _currentGroupCloseBut2 === void 0 || _currentGroupCloseBut2.focus();
131
+ util.manageTabIndexAndFocus(currentGroupCloseButtons[conditionIndex + 1], conditionBuilderRef);
104
132
  }
105
133
  };
106
134
  var handleFocusOnCloseTree = function handleFocusOnCloseTree(evt) {
@@ -116,11 +144,9 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
116
144
  //Otherwise , check the previous item is a valid condition
117
145
 
118
146
  if (nextElement !== null && nextElement !== void 0 && nextElement.classList.contains("".concat(DataConfigs.blockClass, "__condition-block"))) {
119
- var _nextElement$querySel;
120
- nextElement === null || nextElement === void 0 || (_nextElement$querySel = nextElement.querySelector('[data-name="closeCondition"]')) === null || _nextElement$querySel === void 0 || _nextElement$querySel.focus();
147
+ util.manageTabIndexAndFocus(nextElement === null || nextElement === void 0 ? void 0 : nextElement.querySelector('[data-name="closeCondition"]'), conditionBuilderRef);
121
148
  } else if (prevElement !== null && prevElement !== void 0 && prevElement.classList.contains("".concat(DataConfigs.blockClass, "__condition-block"))) {
122
- var _prevElement$querySel;
123
- prevElement === null || prevElement === void 0 || (_prevElement$querySel = prevElement.querySelector('[data-name="closeCondition"]')) === null || _prevElement$querySel === void 0 || _prevElement$querySel.focus();
149
+ util.manageTabIndexAndFocus(prevElement === null || prevElement === void 0 ? void 0 : prevElement.querySelector('[data-name="closeCondition"]'), conditionBuilderRef);
124
150
  }
125
151
  //If there are no valid condition in this group, focus next or previous row
126
152
  else {
@@ -128,10 +154,10 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
128
154
  var prevRows = (_conditionBuilderCont3 = conditionBuilderContentRef.current) === null || _conditionBuilderCont3 === void 0 ? void 0 : _conditionBuilderCont3.querySelectorAll("[aria-level=\"".concat(Number(currentLevel) - 1, "\"][role=\"row\"]"));
129
155
  var nextRow = (_conditionBuilderCont4 = conditionBuilderContentRef.current) === null || _conditionBuilderCont4 === void 0 ? void 0 : _conditionBuilderCont4.querySelector("[aria-level=\"".concat(Number(currentLevel) + 1, "\"][role=\"row\"]"));
130
156
  if (nextRow) {
131
- nextRow === null || nextRow === void 0 || nextRow.focus();
157
+ util.manageTabIndexAndFocus(nextRow, conditionBuilderRef);
132
158
  } else if ((prevRows === null || prevRows === void 0 ? void 0 : prevRows.length) > 1) {
133
- var _prevRows;
134
- (_prevRows = prevRows[prevRows.length - 2]) === null || _prevRows === void 0 || _prevRows.focus();
159
+ // prevRows[prevRows.length - 2].setAttribute('tabindex', '0');
160
+ util.manageTabIndexAndFocus(prevRows[prevRows.length - 2], conditionBuilderRef);
135
161
  }
136
162
  }
137
163
  };
@@ -188,7 +214,7 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
188
214
  }, /*#__PURE__*/React__default["default"].createElement("div", {
189
215
  className: "".concat(DataConfigs.blockClass, "__condition-wrapper"),
190
216
  role: "grid",
191
- "aria-label": conditionBuilderGroupText
217
+ "aria-label": conditionBuilderText
192
218
  }, group === null || group === void 0 || (_group$conditions = group.conditions) === null || _group$conditions === void 0 ? void 0 : _group$conditions.map(function (eachCondition, conditionIndex) {
193
219
  return /*#__PURE__*/React__default["default"].createElement("div", {
194
220
  key: eachCondition.id,
@@ -242,7 +268,7 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
242
268
  label: conditionText
243
269
  },
244
270
  onChange: function onChange(v, evt) {
245
- util.focusThisField(evt);
271
+ util.focusThisField(evt, conditionBuilderRef);
246
272
  onStatementChangeHandler(v);
247
273
  },
248
274
  config: {
@@ -254,7 +280,7 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
254
280
  }, eachCondition.conditions ? /*#__PURE__*/React__default["default"].createElement("div", {
255
281
  className: cx__default["default"]("".concat(DataConfigs.blockClass, "__condition-block subgroup ").concat(DataConfigs.blockClass, "__gap"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(DataConfigs.blockClass, "__gap-bottom"), group.conditions.length < conditionIndex + 1))
256
282
  }, /*#__PURE__*/React__default["default"].createElement(ConditionConnector["default"], {
257
- className: "".concat(DataConfigs.blockClass, "__gap ").concat(DataConfigs.blockClass, "__groupConnector"),
283
+ className: "".concat(DataConfigs.blockClass, "__gap ").concat(DataConfigs.blockClass, "__gap-bottom ").concat(DataConfigs.blockClass, "__groupConnector"),
258
284
  operator: group.groupOperator,
259
285
  "aria-hidden": true
260
286
  }), /*#__PURE__*/React__default["default"].createElement(ConditionGroupBuilder, {
@@ -270,8 +296,7 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
270
296
  },
271
297
  onRemove: function onRemove(e) {
272
298
  onRemoveHandler(eachCondition.id, e);
273
- },
274
- conditionBuilderRef: conditionBuilderRef
299
+ }
275
300
  })) : /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(ConditionBlock["default"], {
276
301
  conjunction: conditionIndex > 0 ? group.groupOperator : undefined,
277
302
  aria: {
@@ -326,11 +351,6 @@ ConditionGroupBuilder.propTypes = {
326
351
  * Provide an optional class to be applied to the containing node.
327
352
  */
328
353
  className: index["default"].string,
329
- /**
330
- className: PropTypes.string,
331
- * ref of condition builder
332
- */
333
- conditionBuilderRef: index["default"].object,
334
354
  group: index["default"].object,
335
355
  /**
336
356
  * callback to update the current condition of the state tree
@@ -1 +1,2 @@
1
1
  export function handleKeyDown(evt: any, conditionBuilderRef: any, variant: any): void;
2
+ export function handleKeyDownForPopover(evt: any, conditionBuilderRef: any, popoverRef: any): void;
@@ -14,22 +14,24 @@ var DataConfigs = require('../ConditionBuilderContext/DataConfigs.js');
14
14
  var util = require('./util.js');
15
15
 
16
16
  var handleKeyDown = function handleKeyDown(evt, conditionBuilderRef, variant) {
17
+ var _activeElement$closes;
17
18
  var activeElement = document.activeElement;
19
+ if (!((_activeElement$closes = activeElement.closest(".".concat(DataConfigs.blockClass, "__popover"))) !== null && _activeElement$closes !== void 0 && _activeElement$closes.querySelector('[role="dialog"]'))) {
20
+ handleKeyPressForMainContent(evt, conditionBuilderRef, variant);
21
+ }
22
+ };
23
+ var handleKeyDownForPopover = function handleKeyDownForPopover(evt, conditionBuilderRef, popoverRef) {
18
24
  if (excludeKeyPress(evt)) {
19
25
  return;
20
26
  }
21
- if (activeElement.closest("[role=\"dialog\"]")) {
22
- handleKeyPressForPopover(evt, activeElement.closest("[role=\"dialog\"]"));
23
- } else {
24
- handleKeyPressForMainContent(evt, conditionBuilderRef, variant);
25
- }
27
+ handleKeyPressForPopover(evt, popoverRef === null || popoverRef === void 0 ? void 0 : popoverRef.current, conditionBuilderRef);
26
28
  };
29
+
27
30
  //skipping keyboard handling for date and time fields to get take carbon's
28
31
  var excludeKeyPress = function excludeKeyPress(evt) {
29
- var _evt$target$closest, _evt$target$closest2;
30
- return !['Escape'].includes(evt.key) && (((_evt$target$closest = evt.target.closest(".".concat(DataConfigs.blockClass, "__item-date"))) === null || _evt$target$closest === void 0 ? void 0 : _evt$target$closest.length) || ((_evt$target$closest2 = evt.target.closest(".".concat(DataConfigs.blockClass, "__item-time"))) === null || _evt$target$closest2 === void 0 ? void 0 : _evt$target$closest2.length));
32
+ return !['Escape'].includes(evt.key) && (evt.target.closest(".".concat(DataConfigs.blockClass, "__item-date")) || evt.target.closest(".".concat(DataConfigs.blockClass, "__item-time")));
31
33
  };
32
- var handleKeyPressForPopover = function handleKeyPressForPopover(evt, parentContainer) {
34
+ var handleKeyPressForPopover = function handleKeyPressForPopover(evt, parentContainer, conditionBuilderRef) {
33
35
  var _parentContainer$quer;
34
36
  var key = evt.key;
35
37
  var isHoldingShiftKey = util.checkForHoldingKey(evt, 'shiftKey');
@@ -39,22 +41,22 @@ var handleKeyPressForPopover = function handleKeyPressForPopover(evt, parentCont
39
41
  case 'ArrowUp':
40
42
  //traverse through the popover options, search box, selectAll button
41
43
  parentContainer.querySelectorAll("[role=\"option\"]").forEach(function (eachElem, index, allElements) {
42
- util.traverseReverse(eachElem, index, allElements);
44
+ util.traverseReverse(eachElem, index, allElements, null, null, conditionBuilderRef);
43
45
  });
44
46
  break;
45
47
  case 'ArrowDown':
46
48
  //traverse through the popover options, search box, selectAll button
47
49
  parentContainer.querySelectorAll("[role=\"option\"]").forEach(function (eachElem, index, allElements) {
48
- util.traverseClockVise(eachElem, index, allElements);
50
+ util.traverseClockVise(eachElem, index, allElements, null, null, conditionBuilderRef);
49
51
  });
50
52
  break;
51
53
  case 'Tab':
52
54
  allItems = [].concat(_rollupPluginBabelHelpers.toConsumableArray(Array.from(parentContainer.querySelectorAll(".".concat(DataConfigs.blockClass, "__selectAll-button,[role=\"searchbox\"]")))), [parentContainer.querySelector("[role=\"option\"]")]);
53
55
  allItems.forEach(function (eachElem, index, allElements) {
54
56
  if (isHoldingShiftKey) {
55
- util.traverseReverse(eachElem, index, allElements, true, true);
57
+ util.traverseReverse(eachElem, index, allElements, true, true, conditionBuilderRef);
56
58
  } else {
57
- util.traverseClockVise(eachElem, index, allElements, true, true);
59
+ util.traverseClockVise(eachElem, index, allElements, true, true, conditionBuilderRef);
58
60
  }
59
61
  });
60
62
  evt.preventDefault();
@@ -74,40 +76,41 @@ var handleKeyPressForPopover = function handleKeyPressForPopover(evt, parentCont
74
76
  if (document.activeElement.type !== 'button') {
75
77
  var _document$activeEleme2;
76
78
  //for button , enter key is click which already handled by framework, else trigger click
77
- util.focusThisField(evt);
79
+ util.focusThisField(evt, conditionBuilderRef);
78
80
  (_document$activeEleme2 = document.activeElement) === null || _document$activeEleme2 === void 0 || _document$activeEleme2.click();
79
81
  }
80
82
  }
81
83
  break;
82
84
  case 'Escape':
83
- //focus the corresponding field in which the popover is triggered
84
- util.focusThisField(evt);
85
+ //focus the corresponding field in which the popover is triggered\
86
+ util.focusThisField(evt, conditionBuilderRef);
85
87
  break;
86
88
  }
87
89
  };
88
90
  var handleKeyPressForMainContent = function handleKeyPressForMainContent(evt, conditionBuilderRef, variant) {
91
+ var _document$activeEleme3;
89
92
  switch (evt.key) {
90
93
  case 'ArrowRight':
91
94
  evt.preventDefault();
92
95
  if (variant == 'tree') {
93
- var _evt$target$closest3;
94
- var allCellsInRow = Array.from((_evt$target$closest3 = evt.target.closest('[role="row"]')) === null || _evt$target$closest3 === void 0 ? void 0 : _evt$target$closest3.querySelectorAll('[role="gridcell"] button'));
95
- if (evt.target.getAttribute('role') == 'row') {
96
+ var _evt$target$closest;
97
+ var allCellsInRow = Array.from((_evt$target$closest = evt.target.closest('[role="row"]')) === null || _evt$target$closest === void 0 ? void 0 : _evt$target$closest.querySelectorAll('[role="gridcell"] button'));
98
+ if (allCellsInRow.length === 1) {
99
+ evt.target = evt.target.closest('[role="row"]');
100
+ handleRowNavigationTree(evt, conditionBuilderRef, variant);
101
+ //focus next row
102
+ } else if (evt.target.getAttribute('role') == 'row') {
96
103
  //when current focus is on a row, then we need to enter inside and focus the first cell of that row
97
- if (allCellsInRow.length === 1) {
98
- handleRowNavigationTree(evt, conditionBuilderRef, variant);
99
- //focus next row
100
- } else {
101
- var _allCellsInRow$;
102
- (_allCellsInRow$ = allCellsInRow[0]) === null || _allCellsInRow$ === void 0 || _allCellsInRow$.focus();
103
- }
104
+
105
+ //focus first cell
106
+ util.manageTabIndexAndFocus(allCellsInRow[0], conditionBuilderRef);
104
107
  } else {
105
108
  //finding the next cell to be focussed
106
109
  //next cell = current cell index + 1
107
110
 
108
111
  var currentItemIndex = allCellsInRow.indexOf(evt.target);
109
112
  if (currentItemIndex < allCellsInRow.length - 1) {
110
- util.focusThisItem(allCellsInRow[currentItemIndex + 1]);
113
+ util.focusThisItem(allCellsInRow[currentItemIndex + 1], conditionBuilderRef);
111
114
  }
112
115
  }
113
116
  } else {
@@ -118,17 +121,17 @@ var handleKeyPressForMainContent = function handleKeyPressForMainContent(evt, co
118
121
  evt.preventDefault();
119
122
  if (variant == 'tree') {
120
123
  if (evt.target.getAttribute('role') !== 'row') {
121
- var _evt$target$closest4;
124
+ var _evt$target$closest2;
122
125
  //when any cell is focussed, arrow left will select the previous cell or current row
123
126
 
124
- var allItems = Array.from((_evt$target$closest4 = evt.target.closest('[role="row"]')) === null || _evt$target$closest4 === void 0 ? void 0 : _evt$target$closest4.querySelectorAll('[role="gridcell"] button'));
125
- var _currentItemIndex = allItems.indexOf(evt.target);
127
+ var _allCellsInRow = Array.from((_evt$target$closest2 = evt.target.closest('[role="row"]')) === null || _evt$target$closest2 === void 0 ? void 0 : _evt$target$closest2.querySelectorAll('[role="gridcell"] button'));
128
+ var _currentItemIndex = _allCellsInRow.indexOf(evt.target);
126
129
  if (_currentItemIndex > 0) {
127
- util.focusThisItem(allItems[_currentItemIndex - 1]);
130
+ util.focusThisItem(_allCellsInRow[_currentItemIndex - 1], conditionBuilderRef);
128
131
  } else {
129
132
  //focus the row
130
133
  var wrapper = evt.target.closest("[role=\"row\"]");
131
- wrapper.focus();
134
+ util.manageTabIndexAndFocus(wrapper, conditionBuilderRef);
132
135
  }
133
136
  }
134
137
  } else {
@@ -144,6 +147,12 @@ var handleKeyPressForMainContent = function handleKeyPressForMainContent(evt, co
144
147
  handleRowNavigation(evt, conditionBuilderRef, variant);
145
148
  }
146
149
  break;
150
+ case 'Enter':
151
+ if (((_document$activeEleme3 = document.activeElement) === null || _document$activeEleme3 === void 0 || (_document$activeEleme3 = _document$activeEleme3.querySelectorAll("button")) === null || _document$activeEleme3 === void 0 ? void 0 : _document$activeEleme3.length) === 1) {
152
+ var _document$activeEleme4;
153
+ (_document$activeEleme4 = document.activeElement) === null || _document$activeEleme4 === void 0 || (_document$activeEleme4 = _document$activeEleme4.querySelectorAll("button")[0]) === null || _document$activeEleme4 === void 0 || _document$activeEleme4.click();
154
+ }
155
+ break;
147
156
  }
148
157
  };
149
158
  var getRows = function getRows(conditionBuilderRef) {
@@ -159,9 +168,9 @@ var getRowIndex = function getRowIndex(element, conditionBuilderRef) {
159
168
  var handleRowNavigation = function handleRowNavigation(evt, conditionBuilderRef, variant) {
160
169
  var rows = getRows(conditionBuilderRef);
161
170
  var currentRowIndex = getRowIndex(evt.target, conditionBuilderRef);
162
- navigateToNextRowCell(evt, currentRowIndex, rows, variant);
171
+ navigateToNextRowCell(evt, currentRowIndex, rows, variant, conditionBuilderRef);
163
172
  };
164
- function handleRowNavigationTree(evt, conditionBuilderRef, variant) {
173
+ var handleRowNavigationTree = function handleRowNavigationTree(evt, conditionBuilderRef, variant) {
165
174
  var rows = getRows(conditionBuilderRef);
166
175
  var currentRowIndex = getRowIndex(evt.target, conditionBuilderRef);
167
176
  var nextRowIndex = currentRowIndex;
@@ -179,15 +188,13 @@ function handleRowNavigationTree(evt, conditionBuilderRef, variant) {
179
188
  nextRowIndex = rows.length - 1;
180
189
  }
181
190
  if (nextRowIndex !== currentRowIndex) {
182
- rows[currentRowIndex].setAttribute('tabindex', '-1');
183
- rows[nextRowIndex].setAttribute('tabindex', '0');
184
- rows[nextRowIndex].focus();
191
+ util.manageTabIndexAndFocus(rows[nextRowIndex], conditionBuilderRef);
185
192
  }
186
193
  } else {
187
- navigateToNextRowCell(evt, currentRowIndex, rows, variant);
194
+ navigateToNextRowCell(evt, currentRowIndex, rows, variant, conditionBuilderRef);
188
195
  }
189
- }
190
- var navigateToNextRowCell = function navigateToNextRowCell(evt, currentRowIndex, rows, variant) {
196
+ };
197
+ var navigateToNextRowCell = function navigateToNextRowCell(evt, currentRowIndex, rows, variant, conditionBuilderRef) {
191
198
  //when the current focussed element is a cell of any row, arrow up/down will focus the next row same cell.
192
199
 
193
200
  var nextRowIndex = currentRowIndex;
@@ -204,17 +211,18 @@ var navigateToNextRowCell = function navigateToNextRowCell(evt, currentRowIndex,
204
211
  nextRow === null || nextRow === void 0 || (_nextRow$querySelecto = nextRow.querySelector("[data-name=\"".concat(itemName, "\"]"))) === null || _nextRow$querySelecto === void 0 || _nextRow$querySelecto.focus();
205
212
  } else if (variant === 'tree') {
206
213
  //when the next row is a if statement , then that row is focused. From any cell of last row of an group , arrow down select the next row (if)
207
- nextRow === null || nextRow === void 0 || nextRow.focus();
214
+ util.manageTabIndexAndFocus(nextRow, conditionBuilderRef);
208
215
  }
209
216
  };
210
217
  var handleCellNavigation = function handleCellNavigation(evt, conditionBuilderRef) {
211
218
  conditionBuilderRef.current.querySelectorAll("[role=\"gridcell\"] button").forEach(function (eachElem, index, allElements) {
212
219
  if (evt.key === 'ArrowRight') {
213
- util.traverseClockVise(eachElem, index, allElements);
220
+ util.traverseClockVise(eachElem, index, allElements, null, null, conditionBuilderRef);
214
221
  } else {
215
- util.traverseReverse(eachElem, index, allElements);
222
+ util.traverseReverse(eachElem, index, allElements, null, null, conditionBuilderRef);
216
223
  }
217
224
  });
218
225
  };
219
226
 
220
227
  exports.handleKeyDown = handleKeyDown;
228
+ exports.handleKeyDownForPopover = handleKeyDownForPopover;
@@ -1,6 +1,8 @@
1
- export function focusThisField(evt: any): void;
2
- export function focusThisItem(currentElement: any): void;
3
- export function traverseClockVise(eachElem: any, index: any, allElements: any, rotate: any, trapFocus: any): void;
4
- export function traverseReverse(eachElem: any, index: any, allElements: any, rotate: any, trapFocus: any): void;
1
+ export function focusThisField(evt: any, conditionBuilderRef: any): void;
2
+ export function focusThisItem(currentElement: any, conditionBuilderRef: any): void;
3
+ export function traverseClockVise(eachElem: any, index: any, allElements: any, rotate: any, trapFocus: any, conditionBuilderRef: any): void;
4
+ export function traverseReverse(eachElem: any, index: any, allElements: any, rotate: any, trapFocus: any, conditionBuilderRef: any): void;
5
5
  export function checkForHoldingKey(evt: any, key: any): any;
6
6
  export function checkDuplicateAction(actionState: any, selectedId: any, currentActionId: any): boolean;
7
+ export function checkIsValid(item: any): any;
8
+ export function manageTabIndexAndFocus(currentElement: any, conditionBuilderRef: any): void;
@@ -9,40 +9,45 @@
9
9
 
10
10
  Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
- var focusThisField = function focusThisField(evt) {
13
- setTimeout(function () {
14
- var _evt$target$closest, _evt$target$closest2;
15
- (_evt$target$closest = evt.target.closest('[role="gridcell"]')) === null || _evt$target$closest === void 0 || (_evt$target$closest = _evt$target$closest.querySelector('button')) === null || _evt$target$closest === void 0 || _evt$target$closest.click();
16
- (_evt$target$closest2 = evt.target.closest('[role="gridcell"]')) === null || _evt$target$closest2 === void 0 || (_evt$target$closest2 = _evt$target$closest2.querySelector('button')) === null || _evt$target$closest2 === void 0 || _evt$target$closest2.focus();
17
- }, 0);
12
+ var DataConfigs = require('../ConditionBuilderContext/DataConfigs.js');
13
+
14
+ var focusThisField = function focusThisField(evt, conditionBuilderRef) {
15
+ if (evt) {
16
+ setTimeout(function () {
17
+ var _evt$target$closest, _evt$target$closest2, _evt$target$closest3;
18
+ manageTabIndexAndFocus((_evt$target$closest = evt.target.closest('[role="gridcell"]')) === null || _evt$target$closest === void 0 ? void 0 : _evt$target$closest.querySelector('button'), conditionBuilderRef);
19
+ (_evt$target$closest2 = evt.target.closest('[role="gridcell"]')) === null || _evt$target$closest2 === void 0 || (_evt$target$closest2 = _evt$target$closest2.querySelector('button')) === null || _evt$target$closest2 === void 0 || _evt$target$closest2.click();
20
+ (_evt$target$closest3 = evt.target.closest('[role="gridcell"]')) === null || _evt$target$closest3 === void 0 || (_evt$target$closest3 = _evt$target$closest3.querySelector('button')) === null || _evt$target$closest3 === void 0 || _evt$target$closest3.focus();
21
+ }, 0);
22
+ }
18
23
  };
19
- var focusThisItem = function focusThisItem(currentElement) {
24
+ var focusThisItem = function focusThisItem(currentElement, conditionBuilderRef) {
20
25
  setTimeout(function () {
21
26
  //document.activeElement.setAttribute('tabindex', '-1');
22
27
  // currentElement.setAttribute('tabindex', '0');
23
- currentElement === null || currentElement === void 0 || currentElement.focus();
28
+ manageTabIndexAndFocus(currentElement, conditionBuilderRef);
24
29
  }, 0);
25
30
  };
26
- var traverseClockVise = function traverseClockVise(eachElem, index, allElements, rotate, trapFocus) {
31
+ var traverseClockVise = function traverseClockVise(eachElem, index, allElements, rotate, trapFocus, conditionBuilderRef) {
27
32
  if (eachElem == document.activeElement) {
28
33
  if (index !== allElements.length - 1) {
29
- focusThisItem(allElements[index + 1]);
34
+ focusThisItem(allElements[index + 1], conditionBuilderRef);
30
35
  } else {
31
- focusThisItem(allElements[rotate ? 0 : allElements.length - 1]);
36
+ focusThisItem(allElements[rotate ? 0 : allElements.length - 1], conditionBuilderRef);
32
37
  }
33
38
  } else if (Array.from(allElements).indexOf(document.activeElement) == -1 && trapFocus) {
34
- focusThisItem(allElements[0]);
39
+ focusThisItem(allElements[0], conditionBuilderRef);
35
40
  }
36
41
  };
37
- var traverseReverse = function traverseReverse(eachElem, index, allElements, rotate, trapFocus) {
42
+ var traverseReverse = function traverseReverse(eachElem, index, allElements, rotate, trapFocus, conditionBuilderRef) {
38
43
  if (eachElem == document.activeElement) {
39
44
  if (index !== 0) {
40
- focusThisItem(allElements[index - 1]);
45
+ focusThisItem(allElements[index - 1], conditionBuilderRef);
41
46
  } else {
42
- focusThisItem(allElements[rotate ? allElements.length - 1 : 0]);
47
+ focusThisItem(allElements[rotate ? allElements.length - 1 : 0], conditionBuilderRef);
43
48
  }
44
49
  } else if (Array.from(allElements).indexOf(document.activeElement) == -1 && trapFocus) {
45
- focusThisItem(allElements[allElements.length - 1]);
50
+ focusThisItem(allElements[allElements.length - 1], conditionBuilderRef);
46
51
  }
47
52
  };
48
53
  var checkForHoldingKey = function checkForHoldingKey(evt, key) {
@@ -52,9 +57,24 @@ var checkForHoldingKey = function checkForHoldingKey(evt, key) {
52
57
  }
53
58
  return evt[key];
54
59
  };
60
+ var checkIsValid = function checkIsValid(item) {
61
+ return item && item !== 'INVALID';
62
+ };
63
+ var manageTabIndexAndFocus = function manageTabIndexAndFocus(currentElement, conditionBuilderRef) {
64
+ var _currentElement$close, _conditionBuilderRef$;
65
+ var contentContainer = (_currentElement$close = currentElement === null || currentElement === void 0 ? void 0 : currentElement.closest(".".concat(DataConfigs.blockClass, "__content-container"))) !== null && _currentElement$close !== void 0 ? _currentElement$close : currentElement === null || currentElement === void 0 ? void 0 : currentElement.closest(".".concat(DataConfigs.blockClass, "__actions-container"));
66
+ contentContainer && Array.from(contentContainer.querySelectorAll('[tabindex="0"]')).map(function (element) {
67
+ return element === null || element === void 0 ? void 0 : element.setAttribute('tabindex', '-1');
68
+ });
69
+ currentElement === null || currentElement === void 0 || currentElement.setAttribute('tabindex', '0');
70
+ (_conditionBuilderRef$ = conditionBuilderRef.current) === null || _conditionBuilderRef$ === void 0 || (_conditionBuilderRef$ = _conditionBuilderRef$.querySelector(".".concat(DataConfigs.blockClass, "__statement-button"))) === null || _conditionBuilderRef$ === void 0 || _conditionBuilderRef$.setAttribute('tabindex', '1');
71
+ currentElement === null || currentElement === void 0 || currentElement.focus();
72
+ };
55
73
 
56
74
  exports.checkForHoldingKey = checkForHoldingKey;
75
+ exports.checkIsValid = checkIsValid;
57
76
  exports.focusThisField = focusThisField;
58
77
  exports.focusThisItem = focusThisItem;
78
+ exports.manageTabIndexAndFocus = manageTabIndexAndFocus;
59
79
  exports.traverseClockVise = traverseClockVise;
60
80
  exports.traverseReverse = traverseReverse;
@@ -17,6 +17,7 @@ var OverflowCheckboxes = require('../OverflowCheckboxes.js');
17
17
  var utils = require('../utils.js');
18
18
  var FilterProvider = require('../FilterProvider.js');
19
19
  var handleCheckboxChange = require('../handleCheckboxChange.js');
20
+ var uuidv4 = require('../../../../../../global/js/utils/uuidv4.js');
20
21
  var usePreviousValue = require('../../../../../../global/js/hooks/usePreviousValue.js');
21
22
 
22
23
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -55,6 +56,7 @@ var useFilters = function useFilters(_ref) {
55
56
  var previousState = usePreviousValue.usePreviousValue({
56
57
  panelOpen: panelOpen
57
58
  });
59
+ var filteredItemsRef = React.useRef();
58
60
 
59
61
  // When using batch actions we have to store the filters to then apply them later
60
62
  var prevFiltersRef = React.useRef(JSON.stringify(filtersState));
@@ -315,8 +317,18 @@ var useFilters = function useFilters(_ref) {
315
317
  }
316
318
  return null;
317
319
  }).filter(Boolean);
320
+ var isEqual = compareFilterItems(filteredItems);
321
+ if (!isEqual) {
322
+ filteredItemsRef.current = _rollupPluginBabelHelpers.toConsumableArray(filteredItems);
323
+ }
324
+ var getKey = function getKey() {
325
+ return isEqual ? {
326
+ key: uuidv4["default"]()
327
+ } : column;
328
+ };
318
329
  filter = /*#__PURE__*/React__default["default"].createElement(react.MultiSelect, _rollupPluginBabelHelpers["extends"]({}, components.MultiSelect, {
319
330
  selectedItems: filteredItems,
331
+ key: getKey(),
320
332
  onChange: function onChange(_ref9) {
321
333
  var _components$MultiSele, _components$MultiSele2;
322
334
  var selectedItems = _ref9.selectedItems;
@@ -332,6 +344,7 @@ var useFilters = function useFilters(_ref) {
332
344
  }
333
345
  return null;
334
346
  }).filter(Boolean);
347
+ filteredItemsRef.current = _rollupPluginBabelHelpers.toConsumableArray(foundItems);
335
348
 
336
349
  // Change selected state for those items that have been selected
337
350
  allOptions.map(function (a) {
@@ -374,6 +387,25 @@ var useFilters = function useFilters(_ref) {
374
387
  key: column
375
388
  }, filter);
376
389
  };
390
+ var compareFilterItems = function compareFilterItems(filteredItems) {
391
+ var _filteredItems$map, _filteredItemsRef$cur, _filteredItemsRef$cur2;
392
+ var filteredItemsId = (_filteredItems$map = filteredItems.map(function (item) {
393
+ return item.id;
394
+ })) !== null && _filteredItems$map !== void 0 ? _filteredItems$map : [];
395
+ var previousFilteredItemsId = (_filteredItemsRef$cur = filteredItemsRef === null || filteredItemsRef === void 0 || (_filteredItemsRef$cur2 = filteredItemsRef.current) === null || _filteredItemsRef$cur2 === void 0 ? void 0 : _filteredItemsRef$cur2.map(function (item) {
396
+ return item.id;
397
+ })) !== null && _filteredItemsRef$cur !== void 0 ? _filteredItemsRef$cur : [];
398
+ var set1 = new Set(filteredItemsId);
399
+ var set2 = new Set(previousFilteredItemsId);
400
+ // Check if the sets have the same size (same number of unique elements)
401
+ if (set1.size !== set2.size) {
402
+ return false;
403
+ }
404
+ // Check if all elements in set1 are also present in set2 (using spread syntax)
405
+ return _rollupPluginBabelHelpers.toConsumableArray(set1).every(function (element) {
406
+ return set2.has(element);
407
+ });
408
+ };
377
409
 
378
410
  /** This useEffect will properly handle the previous filters when the panel closes
379
411
  * 1. If the panel closes we need to call the reset fn but also store the
@@ -17,6 +17,7 @@ var devtools = require('../../global/js/utils/devtools.js');
17
17
  var settings = require('../../settings.js');
18
18
  var react = require('@carbon/react');
19
19
  var enums = require('./utils/enums.js');
20
+ var propsHelper = require('../../global/js/utils/props-helper.js');
20
21
 
21
22
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
22
23
 
@@ -28,7 +29,7 @@ var blockClass = "".concat(settings.pkg.prefix, "--string-formatter");
28
29
  var componentName = 'StringFormatter';
29
30
  var defaults = {
30
31
  lines: 1,
31
- tooltipDirection: enums.StringFormatterAlignment.BOTTOM_LEFT,
32
+ tooltipDirection: enums.StringFormatterAlignment.BOTTOM_START,
32
33
  truncate: false,
33
34
  width: null
34
35
  };
@@ -68,6 +69,16 @@ exports.StringFormatter = /*#__PURE__*/React__default["default"].forwardRef(func
68
69
  });
69
70
  exports.StringFormatter = settings.pkg.checkComponentEnabled(exports.StringFormatter, componentName);
70
71
  exports.StringFormatter.displayName = componentName;
72
+ exports.StringFormatter.validateAlignment = function () {
73
+ return function (props, propName, componentName) {
74
+ var prop = props[propName];
75
+ var deprecatedAlignValues = Object.values(enums.deprecated_StringFormatterAlignment);
76
+ if (deprecatedAlignValues.includes(prop)) {
77
+ var mappedNewProp = enums.propMappingFunction(prop);
78
+ console.warn("\"".concat(prop, "\" is a deprecated value for the \"").concat(propName, "\" prop on the \"").concat(componentName, "\" component. Use \"").concat(mappedNewProp, "\" instead. Allowable values are: ").concat(Object.values(enums.StringFormatterAlignment).join(', '), "."));
79
+ }
80
+ };
81
+ };
71
82
  exports.StringFormatter.propTypes = {
72
83
  /**
73
84
  * Provide an optional class to be applied to the containing node.
@@ -76,7 +87,7 @@ exports.StringFormatter.propTypes = {
76
87
  /** Number of lines to clamp value. */
77
88
  lines: index["default"].number,
78
89
  /** Specify the direction of the tooltip. Can be either top or bottom. */
79
- tooltipDirection: index["default"].oneOf(Object.values(enums.StringFormatterAlignment)),
90
+ tooltipDirection: propsHelper.allPropTypes([exports.StringFormatter.validateAlignment(), index["default"].oneOf(Object.values(enums.deprecated_StringFormatterAlignment), Object.values(enums.StringFormatterAlignment))]),
80
91
  /** Whether or not the value should be truncated. */
81
92
  truncate: index["default"].bool,
82
93
  /** Value to format. */
@@ -1,4 +1,4 @@
1
- export namespace StringFormatterAlignment {
1
+ export namespace deprecated_StringFormatterAlignment {
2
2
  let TOP: string;
3
3
  let TOP_LEFT: string;
4
4
  let TOP_RIGHT: string;
@@ -12,3 +12,22 @@ export namespace StringFormatterAlignment {
12
12
  let RIGHT_BOTTOM: string;
13
13
  let RIGHT_TOP: string;
14
14
  }
15
+ export namespace StringFormatterAlignment {
16
+ let TOP_1: string;
17
+ export { TOP_1 as TOP };
18
+ export let TOP_START: string;
19
+ export let TOP_END: string;
20
+ let BOTTOM_1: string;
21
+ export { BOTTOM_1 as BOTTOM };
22
+ export let BOTTOM_START: string;
23
+ export let BOTTOM_END: string;
24
+ let LEFT_1: string;
25
+ export { LEFT_1 as LEFT };
26
+ export let LEFT_END: string;
27
+ export let LEFT_START: string;
28
+ let RIGHT_1: string;
29
+ export { RIGHT_1 as RIGHT };
30
+ export let RIGHT_END: string;
31
+ export let RIGHT_START: string;
32
+ }
33
+ export function propMappingFunction(deprecatedValue: any): string;