@carbon/ibm-products 2.56.1-rc.0 → 2.57.0-rc.0

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 (81) hide show
  1. package/css/index-full-carbon.css +66 -20
  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 +28 -12
  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 +28 -12
  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 +29 -12
  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/APIKeyModal/APIKeyDownloader.d.ts +1 -1
  18. package/es/components/APIKeyModal/APIKeyDownloader.js +1 -1
  19. package/es/components/APIKeyModal/APIKeyModal.d.ts +13 -0
  20. package/es/components/APIKeyModal/APIKeyModal.js +69 -25
  21. package/es/components/APIKeyModal/APIKeyModal.types.d.ts +16 -2
  22. package/es/components/Card/Card.js +3 -4
  23. package/es/components/Coachmark/CoachmarkOverlay.js +4 -0
  24. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +12 -0
  25. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +39 -8
  26. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +9 -5
  27. package/es/components/CreateTearsheet/CreateTearsheet.js +2 -1
  28. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +31 -2
  29. package/es/components/FilterSummary/FilterSummary.js +1 -1
  30. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  31. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  32. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
  33. package/es/components/InterstitialScreen/InterstitialScreen.js +2 -3
  34. package/es/components/PageHeader/PageHeader.js +13 -3
  35. package/es/components/PageHeader/PageHeaderTitle.js +10 -29
  36. package/es/components/ProductiveCard/ProductiveCard.d.ts +6 -2
  37. package/es/components/ProductiveCard/ProductiveCard.js +7 -5
  38. package/es/components/SidePanel/SidePanel.d.ts +6 -1
  39. package/es/components/SidePanel/SidePanel.js +41 -26
  40. package/es/components/TagOverflow/TagOverflow.js +2 -5
  41. package/es/components/Tearsheet/TearsheetShell.d.ts +4 -0
  42. package/es/components/Tearsheet/TearsheetShell.js +5 -37
  43. package/es/global/js/hooks/useFocus.d.ts +1 -1
  44. package/es/global/js/hooks/useFocus.js +7 -4
  45. package/es/global/js/utils/checkForOverflow.d.ts +5 -0
  46. package/es/global/js/utils/checkForOverflow.js +31 -0
  47. package/lib/components/APIKeyModal/APIKeyDownloader.d.ts +1 -1
  48. package/lib/components/APIKeyModal/APIKeyDownloader.js +1 -1
  49. package/lib/components/APIKeyModal/APIKeyModal.d.ts +13 -0
  50. package/lib/components/APIKeyModal/APIKeyModal.js +68 -22
  51. package/lib/components/APIKeyModal/APIKeyModal.types.d.ts +16 -2
  52. package/lib/components/Card/Card.js +3 -4
  53. package/lib/components/Coachmark/CoachmarkOverlay.js +4 -0
  54. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +12 -0
  55. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +39 -8
  56. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +9 -5
  57. package/lib/components/CreateTearsheet/CreateTearsheet.js +2 -1
  58. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +30 -1
  59. package/lib/components/FilterSummary/FilterSummary.js +1 -1
  60. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  61. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  62. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
  63. package/lib/components/InterstitialScreen/InterstitialScreen.js +2 -3
  64. package/lib/components/PageHeader/PageHeader.js +12 -2
  65. package/lib/components/PageHeader/PageHeaderTitle.js +8 -27
  66. package/lib/components/ProductiveCard/ProductiveCard.d.ts +6 -2
  67. package/lib/components/ProductiveCard/ProductiveCard.js +7 -5
  68. package/lib/components/SidePanel/SidePanel.d.ts +6 -1
  69. package/lib/components/SidePanel/SidePanel.js +41 -26
  70. package/lib/components/TagOverflow/TagOverflow.js +1 -4
  71. package/lib/components/Tearsheet/TearsheetShell.d.ts +4 -0
  72. package/lib/components/Tearsheet/TearsheetShell.js +5 -37
  73. package/lib/global/js/hooks/useFocus.d.ts +1 -1
  74. package/lib/global/js/hooks/useFocus.js +7 -4
  75. package/lib/global/js/utils/checkForOverflow.d.ts +5 -0
  76. package/lib/global/js/utils/checkForOverflow.js +34 -0
  77. package/package.json +8 -8
  78. package/scss/components/APIKeyModal/_api-key-modal.scss +4 -0
  79. package/scss/components/PageHeader/_page-header.scss +18 -6
  80. package/scss/components/SidePanel/_side-panel.scss +13 -6
  81. package/telemetry.yml +4 -0
@@ -23,7 +23,7 @@ var useFocus = require('../../global/js/hooks/useFocus.js');
23
23
  var usePreviousValue = require('../../global/js/hooks/usePreviousValue.js');
24
24
 
25
25
  var _ErrorFilled, _InformationFilled;
26
- var _excluded = ["apiKey", "apiKeyLabel", "apiKeyName", "body", "className", "closeButtonText", "copyButtonText", "copyErrorText", "copyIconDescription", "customSteps", "downloadBodyText", "downloadFileName", "downloadFileType", "downloadLinkText", "downloadLinkLabel", "editButtonText", "editSuccess", "editSuccessTitle", "editing", "error", "errorText", "generateButtonText", "generateSuccessBody", "generateSuccessTitle", "generateTitle", "hasAPIKeyVisibilityToggle", "hasDownloadLink", "hideAPIKeyLabel", "launcherButtonRef", "loading", "loadingText", "modalLabel", "nameHelperText", "nameLabel", "namePlaceholder", "nameRequired", "nextStepButtonText", "onClose", "onCopy", "onRequestEdit", "onRequestGenerate", "open", "portalTarget", "previousStepButtonText", "selectorPrimaryFocus", "showAPIKeyLabel"];
26
+ var _excluded = ["apiKey", "apiKeyLabel", "apiKeyName", "body", "className", "closeButtonText", "copyButtonText", "copyErrorText", "copyIconDescription", "customSteps", "downloadBodyText", "downloadFileName", "downloadFileType", "downloadLinkText", "downloadLinkLabel", "editButtonText", "editSuccess", "editSuccessTitle", "editSuccessMessage", "editing", "error", "errorText", "generateButtonText", "generateSuccessBody", "generateSuccessTitle", "generateSuccessMessage", "generateTitle", "hasAPIKeyVisibilityToggle", "hasDownloadLink", "hideAPIKeyLabel", "launcherButtonRef", "loading", "loadingText", "modalLabel", "nameHelperText", "nameLabel", "namePlaceholder", "nameRequired", "nextStepButtonText", "onClose", "onCopy", "onRequestEdit", "onRequestGenerate", "open", "portalTarget", "previousStepButtonText", "selectorPrimaryFocus", "showAPIKeyLabel", "helperText"];
27
27
  var componentName = 'APIKeyModal';
28
28
 
29
29
  // Default values for props
@@ -54,12 +54,14 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
54
54
  editButtonText = _ref.editButtonText,
55
55
  editSuccess = _ref.editSuccess,
56
56
  editSuccessTitle = _ref.editSuccessTitle,
57
+ editSuccessMessage = _ref.editSuccessMessage,
57
58
  editing = _ref.editing,
58
59
  error = _ref.error,
59
60
  errorText = _ref.errorText,
60
61
  generateButtonText = _ref.generateButtonText,
61
62
  generateSuccessBody = _ref.generateSuccessBody,
62
63
  generateSuccessTitle = _ref.generateSuccessTitle,
64
+ generateSuccessMessage = _ref.generateSuccessMessage,
63
65
  generateTitle = _ref.generateTitle,
64
66
  hasAPIKeyVisibilityToggle = _ref.hasAPIKeyVisibilityToggle,
65
67
  hasDownloadLink = _ref.hasDownloadLink,
@@ -82,23 +84,28 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
82
84
  previousStepButtonText = _ref.previousStepButtonText,
83
85
  selectorPrimaryFocus = _ref.selectorPrimaryFocus,
84
86
  showAPIKeyLabel = _ref.showAPIKeyLabel,
87
+ helperText = _ref.helperText,
85
88
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
86
89
  var _useState = React.useState(null),
87
90
  _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
88
91
  title = _useState2[0],
89
92
  setTitle = _useState2[1];
90
- var _useState3 = React.useState(false),
93
+ var _useState3 = React.useState(null),
91
94
  _useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
92
- copyError = _useState4[0],
93
- setCopyError = _useState4[1];
94
- var _useState5 = React.useState(apiKeyName),
95
+ successMessage = _useState4[0],
96
+ setSuccessMessage = _useState4[1];
97
+ var _useState5 = React.useState(false),
95
98
  _useState6 = _rollupPluginBabelHelpers.slicedToArray(_useState5, 2),
96
- name = _useState6[0],
97
- setName = _useState6[1];
98
- var _useState7 = React.useState(0),
99
+ copyError = _useState6[0],
100
+ setCopyError = _useState6[1];
101
+ var _useState7 = React.useState(apiKeyName),
99
102
  _useState8 = _rollupPluginBabelHelpers.slicedToArray(_useState7, 2),
100
- currentStep = _useState8[0],
101
- setCurrentStep = _useState8[1];
103
+ name = _useState8[0],
104
+ setName = _useState8[1];
105
+ var _useState9 = React.useState(0),
106
+ _useState10 = _rollupPluginBabelHelpers.slicedToArray(_useState9, 2),
107
+ currentStep = _useState10[0],
108
+ setCurrentStep = _useState10[1];
102
109
  var copyRef = React.useRef(undefined);
103
110
  var apiKeyInputId = React.useRef(uuidv4.default());
104
111
  var nameInputId = React.useRef(uuidv4.default());
@@ -118,6 +125,7 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
118
125
  };
119
126
  var blockClass = "".concat(settings.pkg.prefix, "--apikey-modal");
120
127
  var localRef = React.useRef(undefined);
128
+ var PasswordInputRef = React.useRef(null);
121
129
  var modalRef = ref || localRef;
122
130
  var _useFocus = useFocus.useFocus(modalRef, selectorPrimaryFocus),
123
131
  firstElement = _useFocus.firstElement,
@@ -127,6 +135,9 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
127
135
  if (copyRef.current && open && apiKeyLoaded) {
128
136
  copyRef.current.focus();
129
137
  }
138
+ if (PasswordInputRef !== null && PasswordInputRef !== void 0 && PasswordInputRef.current) {
139
+ PasswordInputRef === null || PasswordInputRef === void 0 || PasswordInputRef.current.setAttribute('readOnly', 'true');
140
+ }
130
141
  }, [open, apiKeyLoaded]);
131
142
  React.useEffect(function () {
132
143
  if (open) {
@@ -174,16 +185,18 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
174
185
  };
175
186
  React.useEffect(function () {
176
187
  if (editing && editSuccess) {
177
- setTitle(editSuccessTitle);
188
+ setTitle(generateTitle);
189
+ setSuccessMessage(editSuccessMessage !== null && editSuccessMessage !== void 0 ? editSuccessMessage : editSuccessTitle);
178
190
  } else if (apiKeyLoaded) {
179
- setTitle(generateSuccessTitle);
191
+ setTitle(generateTitle);
192
+ setSuccessMessage(generateSuccessMessage !== null && generateSuccessMessage !== void 0 ? generateSuccessMessage : generateSuccessTitle);
180
193
  } else if (hasSteps) {
181
194
  var _customSteps$currentS2;
182
195
  setTitle((_customSteps$currentS2 = customSteps[currentStep]) === null || _customSteps$currentS2 === void 0 ? void 0 : _customSteps$currentS2.title);
183
196
  } else {
184
197
  setTitle(generateTitle);
185
198
  }
186
- }, [apiKeyLoaded, editing, editSuccess, editSuccessTitle, hasSteps, generateSuccessTitle, generateTitle, currentStep, customSteps]);
199
+ }, [apiKeyLoaded, loading, editing, editSuccess, editSuccessTitle, editSuccessMessage, hasSteps, generateSuccessTitle, generateSuccessMessage, generateTitle, currentStep, customSteps]);
187
200
  var setNameHandler = function setNameHandler(evt) {
188
201
  setName(evt.target.value);
189
202
  };
@@ -281,7 +294,9 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
281
294
  id: apiKeyInputId.current,
282
295
  showPasswordLabel: showAPIKeyLabel,
283
296
  hidePasswordLabel: hideAPIKeyLabel,
284
- tooltipPosition: "left"
297
+ tooltipPosition: "left",
298
+ helperText: helperText,
299
+ ref: PasswordInputRef
285
300
  }), !editing && apiKey && !hasAPIKeyVisibilityToggle && /*#__PURE__*/React.createElement(react.TextInput, {
286
301
  value: apiKey,
287
302
  labelText: apiKeyLabel,
@@ -309,7 +324,9 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
309
324
  }, _ErrorFilled || (_ErrorFilled = /*#__PURE__*/React.createElement(icons.ErrorFilled, {
310
325
  size: 16
311
326
  }))), /*#__PURE__*/React.createElement("p", {
312
- className: "".concat(blockClass, "__messaging-text")
327
+ className: "".concat(blockClass, "__messaging-text"),
328
+ role: "alert",
329
+ "aria-live": "assertive"
313
330
  }, copyError ? copyErrorText : errorText)), apiKeyLoaded && /*#__PURE__*/React.createElement("div", {
314
331
  className: "".concat(blockClass, "__messaging")
315
332
  }, _InformationFilled || (_InformationFilled = /*#__PURE__*/React.createElement(icons.InformationFilled, {
@@ -322,8 +339,19 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
322
339
  fileType: downloadFileType,
323
340
  downloadLinkLabel: downloadLinkLabel
324
341
  }) : /*#__PURE__*/React.createElement("div", {
325
- className: "".concat(blockClass, "__messaging-text")
326
- }, generateSuccessBody)))), /*#__PURE__*/React.createElement(react.ModalFooter, {
342
+ className: "".concat(blockClass, "__messaging-text"),
343
+ role: "alert",
344
+ "aria-live": "assertive"
345
+ }, generateSuccessBody)), (editSuccess || apiKeyLoaded && successMessage) && /*#__PURE__*/React.createElement("div", {
346
+ className: "".concat(blockClass, "__messaging")
347
+ }, /*#__PURE__*/React.createElement(icons.CheckmarkFilled, {
348
+ size: 16,
349
+ className: "".concat(blockClass, "__checkmark-icon")
350
+ }), /*#__PURE__*/React.createElement("p", {
351
+ className: "".concat(blockClass, "__messaging-text"),
352
+ role: "alert",
353
+ "aria-live": "assertive"
354
+ }, successMessage)))), /*#__PURE__*/React.createElement(react.ModalFooter, {
327
355
  className: "".concat(blockClass, "__footer")
328
356
  }, /*#__PURE__*/React.createElement(react.Button, {
329
357
  type: "button",
@@ -357,7 +385,19 @@ var downloadRequiredProps = function downloadRequiredProps(type) {
357
385
 
358
386
  // Return a placeholder if not released and not enabled by feature flag
359
387
  exports.APIKeyModal = settings.pkg.checkComponentEnabled(exports.APIKeyModal, componentName);
360
- exports.APIKeyModal.propTypes = {
388
+ var deprecatedProps = {
389
+ /**
390
+ * deprecated
391
+ * title for a successful edit
392
+ */
393
+ editSuccessTitle: index.default.string,
394
+ /**
395
+ * deprecated
396
+ * title for a successful key generation
397
+ */
398
+ generateSuccessTitle: index.default.string
399
+ };
400
+ exports.APIKeyModal.propTypes = _rollupPluginBabelHelpers.objectSpread2({
361
401
  /**
362
402
  * the api key that's displayed to the user when a request to create is fulfilled.
363
403
  */
@@ -415,7 +455,7 @@ exports.APIKeyModal.propTypes = {
415
455
  /**
416
456
  * the content that appears that indicates the key is downloadable
417
457
  */
418
- downloadBodyText: downloadRequiredProps(index.default.string),
458
+ downloadBodyText: index.default.string,
419
459
  /**
420
460
  * designates the name of downloadable json file with the key. if not specified will default to 'apikey'
421
461
  */
@@ -443,7 +483,7 @@ exports.APIKeyModal.propTypes = {
443
483
  /**
444
484
  * title for a successful edit
445
485
  */
446
- editSuccessTitle: editRequiredProps(index.default.string),
486
+ editSuccessMessage: editRequiredProps(index.default.string),
447
487
  /**
448
488
  * designates if the modal is in the edit mode
449
489
  */
@@ -469,7 +509,7 @@ exports.APIKeyModal.propTypes = {
469
509
  /**
470
510
  * title for a successful key generation
471
511
  */
472
- generateSuccessTitle: index.default.string,
512
+ generateSuccessMessage: index.default.string,
473
513
  /**
474
514
  * default title for the modal in generate key mode
475
515
  */
@@ -482,6 +522,10 @@ exports.APIKeyModal.propTypes = {
482
522
  * designates if user is able to download the api key
483
523
  */
484
524
  hasDownloadLink: index.default.bool,
525
+ /**
526
+ * helper text for password input
527
+ */
528
+ helperText: index.default.string,
485
529
  /**
486
530
  * label text that's displayed when hovering over visibility toggler to hide key
487
531
  */
@@ -561,5 +605,7 @@ exports.APIKeyModal.propTypes = {
561
605
  * label text that's displayed when hovering over visibility toggler to show key
562
606
  */
563
607
  showAPIKeyLabel: index.default.string
564
- };
608
+ }, deprecatedProps);
565
609
  exports.APIKeyModal.displayName = componentName;
610
+
611
+ exports.deprecatedProps = deprecatedProps;
@@ -73,9 +73,14 @@ interface APIKeyModalCommonProps {
73
73
  */
74
74
  generateSuccessBody?: ReactNode;
75
75
  /**
76
+ * * @deprecated use `generateSuccessMessage` instead
76
77
  * title for a successful key generation
77
78
  */
78
79
  generateSuccessTitle?: string;
80
+ /**
81
+ * success message for a successful key generation
82
+ */
83
+ generateSuccessMessage?: string;
79
84
  /**
80
85
  * default title for the modal in generate key mode
81
86
  */
@@ -158,6 +163,10 @@ interface APIKeyModalCommonProps {
158
163
  * label text that's displayed when hovering over visibility toggler to show key
159
164
  */
160
165
  showAPIKeyLabel?: string;
166
+ /**
167
+ * helper text for password input
168
+ */
169
+ helperText?: string;
161
170
  }
162
171
  type CustomStepConditionalProps = {
163
172
  /**
@@ -191,9 +200,14 @@ type EditingConditionalProps = {
191
200
  */
192
201
  editSuccess: boolean;
193
202
  /**
203
+ * * @deprecated use `editSuccessMessage` instead
194
204
  * title for a successful edit
195
205
  */
196
- editSuccessTitle: string;
206
+ editSuccessTitle?: string;
207
+ /**
208
+ * success message for edit
209
+ */
210
+ editSuccessMessage: string;
197
211
  };
198
212
  type HasDownloadLinkProps = {
199
213
  /**
@@ -203,7 +217,7 @@ type HasDownloadLinkProps = {
203
217
  /**
204
218
  * the content that appears that indicates the key is downloadable
205
219
  */
206
- downloadBodyText: string;
220
+ downloadBodyText?: string;
207
221
  /**
208
222
  * designates the name of downloadable json file with the key. if not specified will default to 'apikey'
209
223
  */
@@ -18,7 +18,7 @@ var CardFooter = require('./CardFooter.js');
18
18
  var settings = require('../../settings.js');
19
19
 
20
20
  var _Incomplete, _CheckmarkOutline;
21
- var _excluded = ["actionIcons", "actionsPlacement", "decorator", "metadata", "children", "className", "clickZone", "description", "disabled", "footerActionIcon", "getStarted", "label", "media", "mediaPosition", "onClick", "onKeyDown", "onPrimaryButtonClick", "overflowActions", "overflowAriaLabel", "onSecondaryButtonClick", "pictogram", "primaryButtonDisabled", "primaryButtonHref", "primaryButtonIcon", "primaryButtonKind", "primaryButtonPlacement", "primaryButtonText", "productive", "secondaryButtonDisabled", "secondaryButtonHref", "secondaryButtonIcon", "secondaryButtonKind", "secondaryButtonPlacement", "secondaryButtonText", "slug", "status", "sequence", "title", "titleSize", "iconDescription"],
21
+ var _excluded = ["actionIcons", "actionsPlacement", "decorator", "metadata", "children", "className", "clickZone", "description", "disabled", "footerActionIcon", "getStarted", "label", "media", "mediaPosition", "onClick", "onKeyDown", "onPrimaryButtonClick", "onSecondaryButtonClick", "overflowActions", "overflowAriaLabel", "pictogram", "primaryButtonDisabled", "primaryButtonHref", "primaryButtonIcon", "primaryButtonKind", "primaryButtonPlacement", "primaryButtonText", "productive", "secondaryButtonDisabled", "secondaryButtonHref", "secondaryButtonIcon", "secondaryButtonKind", "secondaryButtonPlacement", "secondaryButtonText", "slug", "status", "sequence", "title", "titleSize", "iconDescription"],
22
22
  _excluded2 = ["id", "itemText"],
23
23
  _excluded3 = ["id", "icon", "onClick", "iconDescription", "href"];
24
24
  var componentName = 'Card';
@@ -45,10 +45,10 @@ var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
45
45
  onClick = _ref.onClick,
46
46
  onKeyDown = _ref.onKeyDown,
47
47
  onPrimaryButtonClick = _ref.onPrimaryButtonClick,
48
+ onSecondaryButtonClick = _ref.onSecondaryButtonClick,
48
49
  _ref$overflowActions = _ref.overflowActions,
49
50
  overflowActions = _ref$overflowActions === void 0 ? Object.freeze([]) : _ref$overflowActions,
50
51
  overflowAriaLabel = _ref.overflowAriaLabel,
51
- onSecondaryButtonClick = _ref.onSecondaryButtonClick,
52
52
  Pictogram = _ref.pictogram,
53
53
  primaryButtonDisabled = _ref.primaryButtonDisabled,
54
54
  primaryButtonHref = _ref.primaryButtonHref,
@@ -107,8 +107,7 @@ var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
107
107
  autoAlign: true,
108
108
  menuAlignment: pos,
109
109
  size: size,
110
- "aria-label": overflowAriaLabel,
111
- label: iconDescription
110
+ label: overflowAriaLabel || iconDescription
112
111
  }, overflowActions.map(function (_ref2) {
113
112
  var id = _ref2.id,
114
113
  itemText = _ref2.itemText,
@@ -62,6 +62,7 @@ exports.CoachmarkOverlay = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
62
62
  var handleKeyPress = function handleKeyPress(event) {
63
63
  var shiftKey = event.shiftKey,
64
64
  key = event.key;
65
+ /* istanbul ignore next */
65
66
  if (key === 'Enter' || key === ' ') {
66
67
  setA11yDragMode(function (prevVal) {
67
68
  return !prevVal;
@@ -105,6 +106,8 @@ exports.CoachmarkOverlay = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
105
106
  }
106
107
  return style;
107
108
  }, [isBeacon, isDraggable, coachmark, kind]);
109
+
110
+ /* istanbul ignore next */
108
111
  function handleDragBounds(x, y) {
109
112
  var xRes = x;
110
113
  var yRes = y;
@@ -193,6 +196,7 @@ var useWindowDimensions = function useWindowDimensions() {
193
196
  windowDimensions = _useState4[0],
194
197
  setWindowDimensions = _useState4[1];
195
198
  React.useEffect(function () {
199
+ /* istanbul ignore next */
196
200
  function handleResize() {
197
201
  setWindowDimensions(getWindowDimensions());
198
202
  }
@@ -46,6 +46,18 @@ export interface CoachmarkOverlayElementsProps {
46
46
  * The label for the Close button.
47
47
  */
48
48
  closeButtonLabel?: string;
49
+ /**
50
+ * Callback called when clicking on the Next button.
51
+ */
52
+ onNext?: () => void;
53
+ /**
54
+ * Callback called when clicking on the Previous button.
55
+ */
56
+ onBack?: () => void;
57
+ /**
58
+ * Current step of the coachmarks.
59
+ */
60
+ currentStep?: number;
49
61
  }
50
62
  /**
51
63
  * Composable container to allow for the displaying of CoachmarkOverlayElement
@@ -22,7 +22,7 @@ var settings = require('../../settings.js');
22
22
  require('../Coachmark/Coachmark.js');
23
23
  var context = require('../Coachmark/utils/context.js');
24
24
 
25
- var _excluded = ["className", "children", "isVisible", "media", "renderMedia", "nextButtonText", "previousButtonLabel", "closeButtonLabel"];
25
+ var _excluded = ["className", "children", "isVisible", "media", "renderMedia", "currentStep", "nextButtonText", "previousButtonLabel", "closeButtonLabel", "onNext", "onBack"];
26
26
 
27
27
  // The block part of our conventional BEM class names (blockClass__E--M).
28
28
  var blockClass = "".concat(settings.pkg.prefix, "--coachmark-overlay-elements");
@@ -43,7 +43,10 @@ var defaults = {
43
43
  isVisible: false,
44
44
  nextButtonText: 'Next',
45
45
  previousButtonLabel: 'Back',
46
- closeButtonLabel: 'Got it'
46
+ closeButtonLabel: 'Got it',
47
+ onNext: undefined,
48
+ onBack: undefined,
49
+ currentStep: 0
47
50
  };
48
51
  /**
49
52
  * Composable container to allow for the displaying of CoachmarkOverlayElement
@@ -56,12 +59,18 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
56
59
  isVisible = _ref$isVisible === void 0 ? defaults.isVisible : _ref$isVisible,
57
60
  media = _ref.media,
58
61
  renderMedia = _ref.renderMedia,
62
+ _ref$currentStep = _ref.currentStep,
63
+ currentStep = _ref$currentStep === void 0 ? defaults.currentStep : _ref$currentStep,
59
64
  _ref$nextButtonText = _ref.nextButtonText,
60
65
  nextButtonText = _ref$nextButtonText === void 0 ? defaults.nextButtonText : _ref$nextButtonText,
61
66
  _ref$previousButtonLa = _ref.previousButtonLabel,
62
67
  previousButtonLabel = _ref$previousButtonLa === void 0 ? defaults.previousButtonLabel : _ref$previousButtonLa,
63
68
  _ref$closeButtonLabel = _ref.closeButtonLabel,
64
69
  closeButtonLabel = _ref$closeButtonLabel === void 0 ? defaults.closeButtonLabel : _ref$closeButtonLabel,
70
+ _ref$onNext = _ref.onNext,
71
+ onNext = _ref$onNext === void 0 ? defaults.onNext : _ref$onNext,
72
+ _ref$onBack = _ref.onBack,
73
+ onBack = _ref$onBack === void 0 ? defaults.onBack : _ref$onBack,
65
74
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
66
75
  var buttonFocusRef = React.useRef(undefined);
67
76
  var scrollRef = React.useRef(undefined);
@@ -69,7 +78,7 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
69
78
  _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
70
79
  scrollPosition = _useState2[0],
71
80
  setScrollPosition = _useState2[1];
72
- var _useState3 = React.useState(0),
81
+ var _useState3 = React.useState(currentStep),
73
82
  _useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
74
83
  currentProgStep = _useState4[0],
75
84
  _setCurrentProgStep = _useState4[1];
@@ -92,6 +101,15 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
92
101
  playStep: currentProgStep
93
102
  });
94
103
  }, [currentProgStep, renderMedia]);
104
+ React.useEffect(function () {
105
+ var _scrollRef$current, _scrollRef$current$sc;
106
+ // When current step is set by props
107
+ // scroll to the appropriate view on the carrousel
108
+ var targetStep = lodash.clamp(currentStep, progStepFloor, progStepCeil);
109
+ scrollRef === null || scrollRef === void 0 || (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || (_scrollRef$current$sc = _scrollRef$current.scrollToView) === null || _scrollRef$current$sc === void 0 || _scrollRef$current$sc.call(_scrollRef$current, targetStep);
110
+ // Avoid circular call to this hook
111
+ // eslint-disable-next-line react-hooks/exhaustive-deps
112
+ }, [currentStep]);
95
113
  React.useEffect(function () {
96
114
  // On mount, one of the two primary buttons ("next" or "close")
97
115
  // will be rendered and must have focus. (a11y)
@@ -133,7 +151,6 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
133
151
  }, coachmark.closeButtonProps, {
134
152
  ref: buttonFocusRef
135
153
  }), closeButtonLabel))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Carousel.Carousel, {
136
- disableArrowScroll: true,
137
154
  ref: scrollRef,
138
155
  onScroll: function onScroll(scrollPercent) {
139
156
  setScrollPosition(scrollPercent);
@@ -148,10 +165,11 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
148
165
  title: previousButtonLabel,
149
166
  disabled: scrollPosition === 0,
150
167
  onClick: function onClick() {
151
- var _scrollRef$current, _scrollRef$current$sc;
168
+ var _scrollRef$current2, _scrollRef$current2$s;
152
169
  var targetStep = lodash.clamp(currentProgStep - 1, progStepFloor, progStepCeil);
153
- scrollRef === null || scrollRef === void 0 || (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 || (_scrollRef$current$sc = _scrollRef$current.scrollToView) === null || _scrollRef$current$sc === void 0 || _scrollRef$current$sc.call(_scrollRef$current, targetStep);
170
+ scrollRef === null || scrollRef === void 0 || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 || (_scrollRef$current2$s = _scrollRef$current2.scrollToView) === null || _scrollRef$current2$s === void 0 || _scrollRef$current2$s.call(_scrollRef$current2, targetStep);
154
171
  setCurrentProgStep(targetStep);
172
+ onBack === null || onBack === void 0 || onBack();
155
173
  }
156
174
  }, previousButtonLabel), currentProgStep < progStepCeil ? /*#__PURE__*/React.createElement(react.Button, {
157
175
  size: "sm",
@@ -159,10 +177,11 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
159
177
  title: nextButtonText,
160
178
  disabled: scrollPosition === 1,
161
179
  onClick: function onClick() {
162
- var _scrollRef$current2, _scrollRef$current2$s;
180
+ var _scrollRef$current3, _scrollRef$current3$s;
163
181
  var targetStep = lodash.clamp(currentProgStep + 1, progStepFloor, progStepCeil);
164
- scrollRef === null || scrollRef === void 0 || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 || (_scrollRef$current2$s = _scrollRef$current2.scrollToView) === null || _scrollRef$current2$s === void 0 || _scrollRef$current2$s.call(_scrollRef$current2, targetStep);
182
+ scrollRef === null || scrollRef === void 0 || (_scrollRef$current3 = scrollRef.current) === null || _scrollRef$current3 === void 0 || (_scrollRef$current3$s = _scrollRef$current3.scrollToView) === null || _scrollRef$current3$s === void 0 || _scrollRef$current3$s.call(_scrollRef$current3, targetStep);
165
183
  setCurrentProgStep(targetStep);
184
+ onNext === null || onNext === void 0 || onNext();
166
185
  }
167
186
  }, nextButtonText) : closeButtonLabel && /*#__PURE__*/React.createElement(react.Button, _rollupPluginBabelHelpers.extends({
168
187
  size: "sm",
@@ -196,6 +215,10 @@ exports.CoachmarkOverlayElements.propTypes = {
196
215
  * The label for the Close button.
197
216
  */
198
217
  closeButtonLabel: index.default.string,
218
+ /**
219
+ * Current step of the coachmarks
220
+ */
221
+ currentStep: index.default.number,
199
222
  /**
200
223
  * The visibility of CoachmarkOverlayElements is
201
224
  * managed in the parent component.
@@ -217,6 +240,14 @@ exports.CoachmarkOverlayElements.propTypes = {
217
240
  * The label for the Next button.
218
241
  */
219
242
  nextButtonText: index.default.string,
243
+ /**
244
+ * Optional callback called when clicking on the Previous button.
245
+ */
246
+ onBack: index.default.func,
247
+ /**
248
+ * Optional callback called when clicking on the Next button.
249
+ */
250
+ onNext: index.default.func,
220
251
  /**
221
252
  * The label for the Previous button.
222
253
  */
@@ -76,8 +76,7 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
76
76
  }, [actionState]);
77
77
  React.useEffect(function () {
78
78
  if (initialState !== null && initialState !== void 0 && initialState.enabledDefault) {
79
- setRootState === null || setRootState === void 0 || setRootState(initialConditionState.current);
80
- initialConditionState.current = null;
79
+ setRootState === null || setRootState === void 0 || setRootState(initialState.state);
81
80
  }
82
81
  // eslint-disable-next-line react-hooks/exhaustive-deps
83
82
  }, [initialState]);
@@ -96,11 +95,16 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
96
95
  };
97
96
  var _onRemove = React.useCallback(function (groupId) {
98
97
  var _rootState$groups2;
98
+ var groups = rootState === null || rootState === void 0 || (_rootState$groups2 = rootState.groups) === null || _rootState$groups2 === void 0 ? void 0 : _rootState$groups2.filter(function (group) {
99
+ return groupId !== (group === null || group === void 0 ? void 0 : group.id);
100
+ });
99
101
  setRootState === null || setRootState === void 0 || setRootState(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, rootState), {}, {
100
- groups: rootState ? rootState === null || rootState === void 0 || (_rootState$groups2 = rootState.groups) === null || _rootState$groups2 === void 0 ? void 0 : _rootState$groups2.filter(function (group) {
101
- return groupId !== (group === null || group === void 0 ? void 0 : group.id);
102
- }) : []
102
+ groups: rootState ? groups : []
103
103
  }));
104
+ //set the initial state to empty.
105
+ if ((groups === null || groups === void 0 ? void 0 : groups.length) === 0) {
106
+ initialConditionState.current = null;
107
+ }
104
108
  }, [setRootState, rootState]);
105
109
  var onChangeHandler = function onChangeHandler(updatedGroup, groupIndex) {
106
110
  /**
@@ -198,7 +198,8 @@ exports.CreateTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
198
198
  slug: slug,
199
199
  title: title,
200
200
  verticalPosition: verticalPosition,
201
- closeIconDescription: ''
201
+ closeIconDescription: '',
202
+ currentStep: currentStep
202
203
  }), /*#__PURE__*/React.createElement("div", {
203
204
  className: "".concat(blockClass, "__content"),
204
205
  ref: contentRef
@@ -47,6 +47,8 @@ var SelectAll = function SelectAll(datagridState) {
47
47
  dispatch = datagridState.dispatch,
48
48
  rows = datagridState.rows,
49
49
  getRowId = datagridState.getRowId,
50
+ toggleAllRowsSelected = datagridState.toggleAllRowsSelected,
51
+ withVirtualScroll = datagridState.withVirtualScroll,
50
52
  onAllRowSelect = datagridState.onAllRowSelect;
51
53
  var isFirstColumnStickyLeft = ((_columns$ = columns[0]) === null || _columns$ === void 0 ? void 0 : _columns$.sticky) === 'left' && withStickyColumn;
52
54
  if (hideSelectAll || radio) {
@@ -71,12 +73,39 @@ var SelectAll = function SelectAll(datagridState) {
71
73
  onAllRowSelect === null || onAllRowSelect === void 0 || onAllRowSelect(rows, event);
72
74
  return onChange === null || onChange === void 0 ? void 0 : onChange(event);
73
75
  };
76
+ var handleSelectAllChange = function handleSelectAllChange(event) {
77
+ if (indeterminate) {
78
+ stateReducer.handleSelectAllRowData({
79
+ dispatch: dispatch,
80
+ rows: rows,
81
+ getRowId: getRowId,
82
+ indeterminate: true,
83
+ isChecked: undefined
84
+ });
85
+ toggleAllRowsSelected(false);
86
+ onAllRowSelect === null || onAllRowSelect === void 0 || onAllRowSelect(rows, event);
87
+ return onChange === null || onChange === void 0 ? void 0 : onChange({
88
+ target: {
89
+ checked: false
90
+ }
91
+ });
92
+ }
93
+ stateReducer.handleSelectAllRowData({
94
+ dispatch: dispatch,
95
+ rows: rows,
96
+ getRowId: getRowId,
97
+ isChecked: event.target.checked,
98
+ indeterminate: indeterminate
99
+ });
100
+ onAllRowSelect === null || onAllRowSelect === void 0 || onAllRowSelect(rows, event);
101
+ return onChange === null || onChange === void 0 ? void 0 : onChange(event);
102
+ };
74
103
  return /*#__PURE__*/React.createElement(react.TableSelectAll, _rollupPluginBabelHelpers.extends({}, selectProps, {
75
104
  checked: (selectProps === null || selectProps === void 0 ? void 0 : selectProps.checked) || false,
76
105
  className: cx("".concat(blockClass, "__head-select-all"), "".concat(blockClass, "__checkbox-cell"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__checkbox-cell-sticky-left"), /* istanbul ignore next */
77
106
  isFirstColumnStickyLeft && Number(windowSize) > 671)),
78
107
  name: "".concat(tableId, "-select-all-checkbox-name"),
79
- onSelect: handleOnPageSelectAllChange,
108
+ onSelect: withVirtualScroll ? handleSelectAllChange : handleOnPageSelectAllChange,
80
109
  disabled: isFetching || (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled),
81
110
  id: "".concat(tableId, "-select-all-checkbox-id")
82
111
  }));
@@ -130,7 +130,7 @@ var FilterSummary = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
130
130
  ref: localRef,
131
131
  className: cx([blockClass, className], _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__expanded"), multiline))
132
132
  }), /*#__PURE__*/React.createElement(framerMotion.AnimatePresence, {
133
- exitBeforeEnter: true
133
+ mode: "wait"
134
134
  }, !multiline && renderTagSet('single'), multiline && renderTagSet('multiline')), /*#__PURE__*/React.createElement(react.Button, {
135
135
  kind: "ghost",
136
136
  size: "sm",
@@ -50,7 +50,7 @@ exports.HTTPError403 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50
50
  /**@ts-ignore*/
51
51
  exports.HTTPError403.deprecated = {
52
52
  level: 'warn',
53
- details: "Please replace ".concat(componentName, " with FullPageError")
53
+ details: "".concat(componentName, " is deprecated. Please migrate to FullPageError by running npx @carbon/upgrade migrate ibm-products-update-http-errors --write")
54
54
  };
55
55
 
56
56
  // Return a placeholder if not released and not enabled by feature flag
@@ -50,7 +50,7 @@ exports.HTTPError404 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50
50
  /**@ts-ignore*/
51
51
  exports.HTTPError404.deprecated = {
52
52
  level: 'warn',
53
- details: "Please replace ".concat(componentName, " with FullPageError")
53
+ details: "".concat(componentName, " is deprecated. Please migrate to FullPageError by running npx @carbon/upgrade migrate ibm-products-update-http-errors --write")
54
54
  };
55
55
 
56
56
  // Return a placeholder if not released and not enabled by feature flag
@@ -50,7 +50,7 @@ exports.HTTPErrorOther = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50
50
  /**@ts-ignore*/
51
51
  exports.HTTPErrorOther.deprecated = {
52
52
  level: 'warn',
53
- details: "Please replace ".concat(componentName, " with FullPageError")
53
+ details: "".concat(componentName, " is deprecated. Please migrate to FullPageError by running npx @carbon/upgrade migrate ibm-products-update-http-errors --write")
54
54
  };
55
55
 
56
56
  // Return a placeholder if not released and not enabled by feature flag
@@ -186,14 +186,13 @@ exports.InterstitialScreen = /*#__PURE__*/React.forwardRef(function (_ref, ref)
186
186
  className // Apply any supplied class names to the main HTML element.
187
187
  ),
188
188
  size: "lg",
189
- onClose: onClose,
189
+ onClose: handleClose,
190
190
  open: isOpen,
191
191
  ref: _forwardedRef,
192
192
  "aria-label": interstitialAriaLabel
193
193
  }, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(react.ModalHeader, {
194
194
  className: cx(headerBlockClass, headerTitle && "".concat(headerBlockClass, "--has-title"), headerClassName),
195
- iconDescription: closeIconDescription,
196
- buttonOnClick: handleClose
195
+ iconDescription: closeIconDescription
197
196
  }, headerTitle && (_h || (_h = /*#__PURE__*/React.createElement("h2", null, headerTitle))), !hideProgressIndicator && /*#__PURE__*/React.createElement("div", {
198
197
  className: "".concat(blockClass, "--progress")
199
198
  }, /*#__PURE__*/React.createElement(react.ProgressIndicator, {