@carbon/ibm-products 2.56.1 → 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
@@ -5,12 +5,12 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, objectSpread2 as _objectSpread2, asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../../_virtual/_rollupPluginBabelHelpers.js';
8
+ import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends, asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import React__default, { forwardRef, useState, useRef, useEffect } from 'react';
10
10
  import PropTypes from '../../_virtual/index.js';
11
11
  import cx from 'classnames';
12
12
  import { unstable_FeatureFlags, ComposedModal, ModalHeader, ModalBody, PasswordInput, TextInput, Form, InlineLoading, ModalFooter, Button } from '@carbon/react';
13
- import { ErrorFilled, InformationFilled, Copy } from '@carbon/react/icons';
13
+ import { ErrorFilled, InformationFilled, CheckmarkFilled, Copy } from '@carbon/react/icons';
14
14
  import { APIKeyDownloader } from './APIKeyDownloader.js';
15
15
  import { pkg } from '../../settings.js';
16
16
  import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
@@ -21,7 +21,7 @@ import { useFocus, claimFocus } from '../../global/js/hooks/useFocus.js';
21
21
  import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
22
22
 
23
23
  var _ErrorFilled, _InformationFilled;
24
- 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"];
24
+ 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"];
25
25
  var componentName = 'APIKeyModal';
26
26
 
27
27
  // Default values for props
@@ -52,12 +52,14 @@ var APIKeyModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
52
52
  editButtonText = _ref.editButtonText,
53
53
  editSuccess = _ref.editSuccess,
54
54
  editSuccessTitle = _ref.editSuccessTitle,
55
+ editSuccessMessage = _ref.editSuccessMessage,
55
56
  editing = _ref.editing,
56
57
  error = _ref.error,
57
58
  errorText = _ref.errorText,
58
59
  generateButtonText = _ref.generateButtonText,
59
60
  generateSuccessBody = _ref.generateSuccessBody,
60
61
  generateSuccessTitle = _ref.generateSuccessTitle,
62
+ generateSuccessMessage = _ref.generateSuccessMessage,
61
63
  generateTitle = _ref.generateTitle,
62
64
  hasAPIKeyVisibilityToggle = _ref.hasAPIKeyVisibilityToggle,
63
65
  hasDownloadLink = _ref.hasDownloadLink,
@@ -80,23 +82,28 @@ var APIKeyModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
80
82
  previousStepButtonText = _ref.previousStepButtonText,
81
83
  selectorPrimaryFocus = _ref.selectorPrimaryFocus,
82
84
  showAPIKeyLabel = _ref.showAPIKeyLabel,
85
+ helperText = _ref.helperText,
83
86
  rest = _objectWithoutProperties(_ref, _excluded);
84
87
  var _useState = useState(null),
85
88
  _useState2 = _slicedToArray(_useState, 2),
86
89
  title = _useState2[0],
87
90
  setTitle = _useState2[1];
88
- var _useState3 = useState(false),
91
+ var _useState3 = useState(null),
89
92
  _useState4 = _slicedToArray(_useState3, 2),
90
- copyError = _useState4[0],
91
- setCopyError = _useState4[1];
92
- var _useState5 = useState(apiKeyName),
93
+ successMessage = _useState4[0],
94
+ setSuccessMessage = _useState4[1];
95
+ var _useState5 = useState(false),
93
96
  _useState6 = _slicedToArray(_useState5, 2),
94
- name = _useState6[0],
95
- setName = _useState6[1];
96
- var _useState7 = useState(0),
97
+ copyError = _useState6[0],
98
+ setCopyError = _useState6[1];
99
+ var _useState7 = useState(apiKeyName),
97
100
  _useState8 = _slicedToArray(_useState7, 2),
98
- currentStep = _useState8[0],
99
- setCurrentStep = _useState8[1];
101
+ name = _useState8[0],
102
+ setName = _useState8[1];
103
+ var _useState9 = useState(0),
104
+ _useState10 = _slicedToArray(_useState9, 2),
105
+ currentStep = _useState10[0],
106
+ setCurrentStep = _useState10[1];
100
107
  var copyRef = useRef(undefined);
101
108
  var apiKeyInputId = useRef(uuidv4());
102
109
  var nameInputId = useRef(uuidv4());
@@ -116,6 +123,7 @@ var APIKeyModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
116
123
  };
117
124
  var blockClass = "".concat(pkg.prefix, "--apikey-modal");
118
125
  var localRef = useRef(undefined);
126
+ var PasswordInputRef = useRef(null);
119
127
  var modalRef = ref || localRef;
120
128
  var _useFocus = useFocus(modalRef, selectorPrimaryFocus),
121
129
  firstElement = _useFocus.firstElement,
@@ -125,6 +133,9 @@ var APIKeyModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
125
133
  if (copyRef.current && open && apiKeyLoaded) {
126
134
  copyRef.current.focus();
127
135
  }
136
+ if (PasswordInputRef !== null && PasswordInputRef !== void 0 && PasswordInputRef.current) {
137
+ PasswordInputRef === null || PasswordInputRef === void 0 || PasswordInputRef.current.setAttribute('readOnly', 'true');
138
+ }
128
139
  }, [open, apiKeyLoaded]);
129
140
  useEffect(function () {
130
141
  if (open) {
@@ -172,16 +183,18 @@ var APIKeyModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
172
183
  };
173
184
  useEffect(function () {
174
185
  if (editing && editSuccess) {
175
- setTitle(editSuccessTitle);
186
+ setTitle(generateTitle);
187
+ setSuccessMessage(editSuccessMessage !== null && editSuccessMessage !== void 0 ? editSuccessMessage : editSuccessTitle);
176
188
  } else if (apiKeyLoaded) {
177
- setTitle(generateSuccessTitle);
189
+ setTitle(generateTitle);
190
+ setSuccessMessage(generateSuccessMessage !== null && generateSuccessMessage !== void 0 ? generateSuccessMessage : generateSuccessTitle);
178
191
  } else if (hasSteps) {
179
192
  var _customSteps$currentS2;
180
193
  setTitle((_customSteps$currentS2 = customSteps[currentStep]) === null || _customSteps$currentS2 === void 0 ? void 0 : _customSteps$currentS2.title);
181
194
  } else {
182
195
  setTitle(generateTitle);
183
196
  }
184
- }, [apiKeyLoaded, editing, editSuccess, editSuccessTitle, hasSteps, generateSuccessTitle, generateTitle, currentStep, customSteps]);
197
+ }, [apiKeyLoaded, loading, editing, editSuccess, editSuccessTitle, editSuccessMessage, hasSteps, generateSuccessTitle, generateSuccessMessage, generateTitle, currentStep, customSteps]);
185
198
  var setNameHandler = function setNameHandler(evt) {
186
199
  setName(evt.target.value);
187
200
  };
@@ -279,7 +292,9 @@ var APIKeyModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
279
292
  id: apiKeyInputId.current,
280
293
  showPasswordLabel: showAPIKeyLabel,
281
294
  hidePasswordLabel: hideAPIKeyLabel,
282
- tooltipPosition: "left"
295
+ tooltipPosition: "left",
296
+ helperText: helperText,
297
+ ref: PasswordInputRef
283
298
  }), !editing && apiKey && !hasAPIKeyVisibilityToggle && /*#__PURE__*/React__default.createElement(TextInput, {
284
299
  value: apiKey,
285
300
  labelText: apiKeyLabel,
@@ -307,7 +322,9 @@ var APIKeyModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
307
322
  }, _ErrorFilled || (_ErrorFilled = /*#__PURE__*/React__default.createElement(ErrorFilled, {
308
323
  size: 16
309
324
  }))), /*#__PURE__*/React__default.createElement("p", {
310
- className: "".concat(blockClass, "__messaging-text")
325
+ className: "".concat(blockClass, "__messaging-text"),
326
+ role: "alert",
327
+ "aria-live": "assertive"
311
328
  }, copyError ? copyErrorText : errorText)), apiKeyLoaded && /*#__PURE__*/React__default.createElement("div", {
312
329
  className: "".concat(blockClass, "__messaging")
313
330
  }, _InformationFilled || (_InformationFilled = /*#__PURE__*/React__default.createElement(InformationFilled, {
@@ -320,8 +337,19 @@ var APIKeyModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
320
337
  fileType: downloadFileType,
321
338
  downloadLinkLabel: downloadLinkLabel
322
339
  }) : /*#__PURE__*/React__default.createElement("div", {
323
- className: "".concat(blockClass, "__messaging-text")
324
- }, generateSuccessBody)))), /*#__PURE__*/React__default.createElement(ModalFooter, {
340
+ className: "".concat(blockClass, "__messaging-text"),
341
+ role: "alert",
342
+ "aria-live": "assertive"
343
+ }, generateSuccessBody)), (editSuccess || apiKeyLoaded && successMessage) && /*#__PURE__*/React__default.createElement("div", {
344
+ className: "".concat(blockClass, "__messaging")
345
+ }, /*#__PURE__*/React__default.createElement(CheckmarkFilled, {
346
+ size: 16,
347
+ className: "".concat(blockClass, "__checkmark-icon")
348
+ }), /*#__PURE__*/React__default.createElement("p", {
349
+ className: "".concat(blockClass, "__messaging-text"),
350
+ role: "alert",
351
+ "aria-live": "assertive"
352
+ }, successMessage)))), /*#__PURE__*/React__default.createElement(ModalFooter, {
325
353
  className: "".concat(blockClass, "__footer")
326
354
  }, /*#__PURE__*/React__default.createElement(Button, {
327
355
  type: "button",
@@ -355,7 +383,19 @@ var downloadRequiredProps = function downloadRequiredProps(type) {
355
383
 
356
384
  // Return a placeholder if not released and not enabled by feature flag
357
385
  APIKeyModal = pkg.checkComponentEnabled(APIKeyModal, componentName);
358
- APIKeyModal.propTypes = {
386
+ var deprecatedProps = {
387
+ /**
388
+ * deprecated
389
+ * title for a successful edit
390
+ */
391
+ editSuccessTitle: PropTypes.string,
392
+ /**
393
+ * deprecated
394
+ * title for a successful key generation
395
+ */
396
+ generateSuccessTitle: PropTypes.string
397
+ };
398
+ APIKeyModal.propTypes = _objectSpread2({
359
399
  /**
360
400
  * the api key that's displayed to the user when a request to create is fulfilled.
361
401
  */
@@ -413,7 +453,7 @@ APIKeyModal.propTypes = {
413
453
  /**
414
454
  * the content that appears that indicates the key is downloadable
415
455
  */
416
- downloadBodyText: downloadRequiredProps(PropTypes.string),
456
+ downloadBodyText: PropTypes.string,
417
457
  /**
418
458
  * designates the name of downloadable json file with the key. if not specified will default to 'apikey'
419
459
  */
@@ -441,7 +481,7 @@ APIKeyModal.propTypes = {
441
481
  /**
442
482
  * title for a successful edit
443
483
  */
444
- editSuccessTitle: editRequiredProps(PropTypes.string),
484
+ editSuccessMessage: editRequiredProps(PropTypes.string),
445
485
  /**
446
486
  * designates if the modal is in the edit mode
447
487
  */
@@ -467,7 +507,7 @@ APIKeyModal.propTypes = {
467
507
  /**
468
508
  * title for a successful key generation
469
509
  */
470
- generateSuccessTitle: PropTypes.string,
510
+ generateSuccessMessage: PropTypes.string,
471
511
  /**
472
512
  * default title for the modal in generate key mode
473
513
  */
@@ -480,6 +520,10 @@ APIKeyModal.propTypes = {
480
520
  * designates if user is able to download the api key
481
521
  */
482
522
  hasDownloadLink: PropTypes.bool,
523
+ /**
524
+ * helper text for password input
525
+ */
526
+ helperText: PropTypes.string,
483
527
  /**
484
528
  * label text that's displayed when hovering over visibility toggler to hide key
485
529
  */
@@ -559,7 +603,7 @@ APIKeyModal.propTypes = {
559
603
  * label text that's displayed when hovering over visibility toggler to show key
560
604
  */
561
605
  showAPIKeyLabel: PropTypes.string
562
- };
606
+ }, deprecatedProps);
563
607
  APIKeyModal.displayName = componentName;
564
608
 
565
- export { APIKeyModal };
609
+ export { APIKeyModal, 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
  */
@@ -16,7 +16,7 @@ import { CardFooter } from './CardFooter.js';
16
16
  import { pkg } from '../../settings.js';
17
17
 
18
18
  var _Incomplete, _CheckmarkOutline;
19
- 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"],
19
+ 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"],
20
20
  _excluded2 = ["id", "itemText"],
21
21
  _excluded3 = ["id", "icon", "onClick", "iconDescription", "href"];
22
22
  var componentName = 'Card';
@@ -43,10 +43,10 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
43
43
  onClick = _ref.onClick,
44
44
  onKeyDown = _ref.onKeyDown,
45
45
  onPrimaryButtonClick = _ref.onPrimaryButtonClick,
46
+ onSecondaryButtonClick = _ref.onSecondaryButtonClick,
46
47
  _ref$overflowActions = _ref.overflowActions,
47
48
  overflowActions = _ref$overflowActions === void 0 ? Object.freeze([]) : _ref$overflowActions,
48
49
  overflowAriaLabel = _ref.overflowAriaLabel,
49
- onSecondaryButtonClick = _ref.onSecondaryButtonClick,
50
50
  Pictogram = _ref.pictogram,
51
51
  primaryButtonDisabled = _ref.primaryButtonDisabled,
52
52
  primaryButtonHref = _ref.primaryButtonHref,
@@ -105,8 +105,7 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
105
105
  autoAlign: true,
106
106
  menuAlignment: pos,
107
107
  size: size,
108
- "aria-label": overflowAriaLabel,
109
- label: iconDescription
108
+ label: overflowAriaLabel || iconDescription
110
109
  }, overflowActions.map(function (_ref2) {
111
110
  var id = _ref2.id,
112
111
  itemText = _ref2.itemText,
@@ -60,6 +60,7 @@ var CoachmarkOverlay = /*#__PURE__*/forwardRef(function (_ref, ref) {
60
60
  var handleKeyPress = function handleKeyPress(event) {
61
61
  var shiftKey = event.shiftKey,
62
62
  key = event.key;
63
+ /* istanbul ignore next */
63
64
  if (key === 'Enter' || key === ' ') {
64
65
  setA11yDragMode(function (prevVal) {
65
66
  return !prevVal;
@@ -103,6 +104,8 @@ var CoachmarkOverlay = /*#__PURE__*/forwardRef(function (_ref, ref) {
103
104
  }
104
105
  return style;
105
106
  }, [isBeacon, isDraggable, coachmark, kind]);
107
+
108
+ /* istanbul ignore next */
106
109
  function handleDragBounds(x, y) {
107
110
  var xRes = x;
108
111
  var yRes = y;
@@ -191,6 +194,7 @@ var useWindowDimensions = function useWindowDimensions() {
191
194
  windowDimensions = _useState4[0],
192
195
  setWindowDimensions = _useState4[1];
193
196
  useEffect(function () {
197
+ /* istanbul ignore next */
194
198
  function handleResize() {
195
199
  setWindowDimensions(getWindowDimensions());
196
200
  }
@@ -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
@@ -20,7 +20,7 @@ import { pkg } from '../../settings.js';
20
20
  import '../Coachmark/Coachmark.js';
21
21
  import { useCoachmark } from '../Coachmark/utils/context.js';
22
22
 
23
- var _excluded = ["className", "children", "isVisible", "media", "renderMedia", "nextButtonText", "previousButtonLabel", "closeButtonLabel"];
23
+ var _excluded = ["className", "children", "isVisible", "media", "renderMedia", "currentStep", "nextButtonText", "previousButtonLabel", "closeButtonLabel", "onNext", "onBack"];
24
24
 
25
25
  // The block part of our conventional BEM class names (blockClass__E--M).
26
26
  var blockClass = "".concat(pkg.prefix, "--coachmark-overlay-elements");
@@ -41,7 +41,10 @@ var defaults = {
41
41
  isVisible: false,
42
42
  nextButtonText: 'Next',
43
43
  previousButtonLabel: 'Back',
44
- closeButtonLabel: 'Got it'
44
+ closeButtonLabel: 'Got it',
45
+ onNext: undefined,
46
+ onBack: undefined,
47
+ currentStep: 0
45
48
  };
46
49
  /**
47
50
  * Composable container to allow for the displaying of CoachmarkOverlayElement
@@ -54,12 +57,18 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
54
57
  isVisible = _ref$isVisible === void 0 ? defaults.isVisible : _ref$isVisible,
55
58
  media = _ref.media,
56
59
  renderMedia = _ref.renderMedia,
60
+ _ref$currentStep = _ref.currentStep,
61
+ currentStep = _ref$currentStep === void 0 ? defaults.currentStep : _ref$currentStep,
57
62
  _ref$nextButtonText = _ref.nextButtonText,
58
63
  nextButtonText = _ref$nextButtonText === void 0 ? defaults.nextButtonText : _ref$nextButtonText,
59
64
  _ref$previousButtonLa = _ref.previousButtonLabel,
60
65
  previousButtonLabel = _ref$previousButtonLa === void 0 ? defaults.previousButtonLabel : _ref$previousButtonLa,
61
66
  _ref$closeButtonLabel = _ref.closeButtonLabel,
62
67
  closeButtonLabel = _ref$closeButtonLabel === void 0 ? defaults.closeButtonLabel : _ref$closeButtonLabel,
68
+ _ref$onNext = _ref.onNext,
69
+ onNext = _ref$onNext === void 0 ? defaults.onNext : _ref$onNext,
70
+ _ref$onBack = _ref.onBack,
71
+ onBack = _ref$onBack === void 0 ? defaults.onBack : _ref$onBack,
63
72
  rest = _objectWithoutProperties(_ref, _excluded);
64
73
  var buttonFocusRef = useRef(undefined);
65
74
  var scrollRef = useRef(undefined);
@@ -67,7 +76,7 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
67
76
  _useState2 = _slicedToArray(_useState, 2),
68
77
  scrollPosition = _useState2[0],
69
78
  setScrollPosition = _useState2[1];
70
- var _useState3 = useState(0),
79
+ var _useState3 = useState(currentStep),
71
80
  _useState4 = _slicedToArray(_useState3, 2),
72
81
  currentProgStep = _useState4[0],
73
82
  _setCurrentProgStep = _useState4[1];
@@ -90,6 +99,15 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
90
99
  playStep: currentProgStep
91
100
  });
92
101
  }, [currentProgStep, renderMedia]);
102
+ useEffect(function () {
103
+ var _scrollRef$current, _scrollRef$current$sc;
104
+ // When current step is set by props
105
+ // scroll to the appropriate view on the carrousel
106
+ var targetStep = clamp(currentStep, progStepFloor, progStepCeil);
107
+ 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);
108
+ // Avoid circular call to this hook
109
+ // eslint-disable-next-line react-hooks/exhaustive-deps
110
+ }, [currentStep]);
93
111
  useEffect(function () {
94
112
  // On mount, one of the two primary buttons ("next" or "close")
95
113
  // will be rendered and must have focus. (a11y)
@@ -131,7 +149,6 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
131
149
  }, coachmark.closeButtonProps, {
132
150
  ref: buttonFocusRef
133
151
  }), closeButtonLabel))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Carousel, {
134
- disableArrowScroll: true,
135
152
  ref: scrollRef,
136
153
  onScroll: function onScroll(scrollPercent) {
137
154
  setScrollPosition(scrollPercent);
@@ -146,10 +163,11 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
146
163
  title: previousButtonLabel,
147
164
  disabled: scrollPosition === 0,
148
165
  onClick: function onClick() {
149
- var _scrollRef$current, _scrollRef$current$sc;
166
+ var _scrollRef$current2, _scrollRef$current2$s;
150
167
  var targetStep = clamp(currentProgStep - 1, progStepFloor, progStepCeil);
151
- 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);
168
+ 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);
152
169
  setCurrentProgStep(targetStep);
170
+ onBack === null || onBack === void 0 || onBack();
153
171
  }
154
172
  }, previousButtonLabel), currentProgStep < progStepCeil ? /*#__PURE__*/React__default.createElement(Button, {
155
173
  size: "sm",
@@ -157,10 +175,11 @@ var CoachmarkOverlayElements = /*#__PURE__*/React__default.forwardRef(function (
157
175
  title: nextButtonText,
158
176
  disabled: scrollPosition === 1,
159
177
  onClick: function onClick() {
160
- var _scrollRef$current2, _scrollRef$current2$s;
178
+ var _scrollRef$current3, _scrollRef$current3$s;
161
179
  var targetStep = clamp(currentProgStep + 1, progStepFloor, progStepCeil);
162
- 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);
180
+ 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);
163
181
  setCurrentProgStep(targetStep);
182
+ onNext === null || onNext === void 0 || onNext();
164
183
  }
165
184
  }, nextButtonText) : closeButtonLabel && /*#__PURE__*/React__default.createElement(Button, _extends({
166
185
  size: "sm",
@@ -194,6 +213,10 @@ CoachmarkOverlayElements.propTypes = {
194
213
  * The label for the Close button.
195
214
  */
196
215
  closeButtonLabel: PropTypes.string,
216
+ /**
217
+ * Current step of the coachmarks
218
+ */
219
+ currentStep: PropTypes.number,
197
220
  /**
198
221
  * The visibility of CoachmarkOverlayElements is
199
222
  * managed in the parent component.
@@ -215,6 +238,14 @@ CoachmarkOverlayElements.propTypes = {
215
238
  * The label for the Next button.
216
239
  */
217
240
  nextButtonText: PropTypes.string,
241
+ /**
242
+ * Optional callback called when clicking on the Previous button.
243
+ */
244
+ onBack: PropTypes.func,
245
+ /**
246
+ * Optional callback called when clicking on the Next button.
247
+ */
248
+ onNext: PropTypes.func,
218
249
  /**
219
250
  * The label for the Previous button.
220
251
  */
@@ -72,8 +72,7 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
72
72
  }, [actionState]);
73
73
  useEffect(function () {
74
74
  if (initialState !== null && initialState !== void 0 && initialState.enabledDefault) {
75
- setRootState === null || setRootState === void 0 || setRootState(initialConditionState.current);
76
- initialConditionState.current = null;
75
+ setRootState === null || setRootState === void 0 || setRootState(initialState.state);
77
76
  }
78
77
  // eslint-disable-next-line react-hooks/exhaustive-deps
79
78
  }, [initialState]);
@@ -92,11 +91,16 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
92
91
  };
93
92
  var _onRemove = useCallback(function (groupId) {
94
93
  var _rootState$groups2;
94
+ var groups = rootState === null || rootState === void 0 || (_rootState$groups2 = rootState.groups) === null || _rootState$groups2 === void 0 ? void 0 : _rootState$groups2.filter(function (group) {
95
+ return groupId !== (group === null || group === void 0 ? void 0 : group.id);
96
+ });
95
97
  setRootState === null || setRootState === void 0 || setRootState(_objectSpread2(_objectSpread2({}, rootState), {}, {
96
- groups: rootState ? rootState === null || rootState === void 0 || (_rootState$groups2 = rootState.groups) === null || _rootState$groups2 === void 0 ? void 0 : _rootState$groups2.filter(function (group) {
97
- return groupId !== (group === null || group === void 0 ? void 0 : group.id);
98
- }) : []
98
+ groups: rootState ? groups : []
99
99
  }));
100
+ //set the initial state to empty.
101
+ if ((groups === null || groups === void 0 ? void 0 : groups.length) === 0) {
102
+ initialConditionState.current = null;
103
+ }
100
104
  }, [setRootState, rootState]);
101
105
  var onChangeHandler = function onChangeHandler(updatedGroup, groupIndex) {
102
106
  /**
@@ -196,7 +196,8 @@ var CreateTearsheet = /*#__PURE__*/forwardRef(function (_ref, ref) {
196
196
  slug: slug,
197
197
  title: title,
198
198
  verticalPosition: verticalPosition,
199
- closeIconDescription: ''
199
+ closeIconDescription: '',
200
+ currentStep: currentStep
200
201
  }), /*#__PURE__*/React__default.createElement("div", {
201
202
  className: "".concat(blockClass, "__content"),
202
203
  ref: contentRef
@@ -10,7 +10,7 @@ import React__default, { useState, useLayoutEffect } from 'react';
10
10
  import { TableSelectAll } from '@carbon/react';
11
11
  import cx from 'classnames';
12
12
  import { pkg } from '../../../settings.js';
13
- import { handleOnPageSelectAllRowData } from './addons/stateReducer.js';
13
+ import { handleOnPageSelectAllRowData, handleSelectAllRowData } from './addons/stateReducer.js';
14
14
 
15
15
  var _excluded = ["onChange"];
16
16
  var blockClass = "".concat(pkg.prefix, "--datagrid");
@@ -45,6 +45,8 @@ var SelectAll = function SelectAll(datagridState) {
45
45
  dispatch = datagridState.dispatch,
46
46
  rows = datagridState.rows,
47
47
  getRowId = datagridState.getRowId,
48
+ toggleAllRowsSelected = datagridState.toggleAllRowsSelected,
49
+ withVirtualScroll = datagridState.withVirtualScroll,
48
50
  onAllRowSelect = datagridState.onAllRowSelect;
49
51
  var isFirstColumnStickyLeft = ((_columns$ = columns[0]) === null || _columns$ === void 0 ? void 0 : _columns$.sticky) === 'left' && withStickyColumn;
50
52
  if (hideSelectAll || radio) {
@@ -69,12 +71,39 @@ var SelectAll = function SelectAll(datagridState) {
69
71
  onAllRowSelect === null || onAllRowSelect === void 0 || onAllRowSelect(rows, event);
70
72
  return onChange === null || onChange === void 0 ? void 0 : onChange(event);
71
73
  };
74
+ var handleSelectAllChange = function handleSelectAllChange(event) {
75
+ if (indeterminate) {
76
+ handleSelectAllRowData({
77
+ dispatch: dispatch,
78
+ rows: rows,
79
+ getRowId: getRowId,
80
+ indeterminate: true,
81
+ isChecked: undefined
82
+ });
83
+ toggleAllRowsSelected(false);
84
+ onAllRowSelect === null || onAllRowSelect === void 0 || onAllRowSelect(rows, event);
85
+ return onChange === null || onChange === void 0 ? void 0 : onChange({
86
+ target: {
87
+ checked: false
88
+ }
89
+ });
90
+ }
91
+ handleSelectAllRowData({
92
+ dispatch: dispatch,
93
+ rows: rows,
94
+ getRowId: getRowId,
95
+ isChecked: event.target.checked,
96
+ indeterminate: indeterminate
97
+ });
98
+ onAllRowSelect === null || onAllRowSelect === void 0 || onAllRowSelect(rows, event);
99
+ return onChange === null || onChange === void 0 ? void 0 : onChange(event);
100
+ };
72
101
  return /*#__PURE__*/React__default.createElement(TableSelectAll, _extends({}, selectProps, {
73
102
  checked: (selectProps === null || selectProps === void 0 ? void 0 : selectProps.checked) || false,
74
103
  className: cx("".concat(blockClass, "__head-select-all"), "".concat(blockClass, "__checkbox-cell"), _defineProperty({}, "".concat(blockClass, "__checkbox-cell-sticky-left"), /* istanbul ignore next */
75
104
  isFirstColumnStickyLeft && Number(windowSize) > 671)),
76
105
  name: "".concat(tableId, "-select-all-checkbox-name"),
77
- onSelect: handleOnPageSelectAllChange,
106
+ onSelect: withVirtualScroll ? handleSelectAllChange : handleOnPageSelectAllChange,
78
107
  disabled: isFetching || (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled),
79
108
  id: "".concat(tableId, "-select-all-checkbox-id")
80
109
  }));
@@ -126,7 +126,7 @@ var FilterSummary = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
126
126
  ref: localRef,
127
127
  className: cx([blockClass, className], _defineProperty({}, "".concat(blockClass, "__expanded"), multiline))
128
128
  }), /*#__PURE__*/React__default.createElement(AnimatePresence, {
129
- exitBeforeEnter: true
129
+ mode: "wait"
130
130
  }, !multiline && renderTagSet('single'), multiline && renderTagSet('multiline')), /*#__PURE__*/React__default.createElement(Button, {
131
131
  kind: "ghost",
132
132
  size: "sm",
@@ -48,7 +48,7 @@ var HTTPError403 = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
48
48
  /**@ts-ignore*/
49
49
  HTTPError403.deprecated = {
50
50
  level: 'warn',
51
- details: "Please replace ".concat(componentName, " with FullPageError")
51
+ details: "".concat(componentName, " is deprecated. Please migrate to FullPageError by running npx @carbon/upgrade migrate ibm-products-update-http-errors --write")
52
52
  };
53
53
 
54
54
  // Return a placeholder if not released and not enabled by feature flag
@@ -48,7 +48,7 @@ var HTTPError404 = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
48
48
  /**@ts-ignore*/
49
49
  HTTPError404.deprecated = {
50
50
  level: 'warn',
51
- details: "Please replace ".concat(componentName, " with FullPageError")
51
+ details: "".concat(componentName, " is deprecated. Please migrate to FullPageError by running npx @carbon/upgrade migrate ibm-products-update-http-errors --write")
52
52
  };
53
53
 
54
54
  // Return a placeholder if not released and not enabled by feature flag
@@ -48,7 +48,7 @@ var HTTPErrorOther = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
48
48
  /**@ts-ignore*/
49
49
  HTTPErrorOther.deprecated = {
50
50
  level: 'warn',
51
- details: "Please replace ".concat(componentName, " with FullPageError")
51
+ details: "".concat(componentName, " is deprecated. Please migrate to FullPageError by running npx @carbon/upgrade migrate ibm-products-update-http-errors --write")
52
52
  };
53
53
 
54
54
  // Return a placeholder if not released and not enabled by feature flag
@@ -184,14 +184,13 @@ var InterstitialScreen = /*#__PURE__*/React__default.forwardRef(function (_ref,
184
184
  className // Apply any supplied class names to the main HTML element.
185
185
  ),
186
186
  size: "lg",
187
- onClose: onClose,
187
+ onClose: handleClose,
188
188
  open: isOpen,
189
189
  ref: _forwardedRef,
190
190
  "aria-label": interstitialAriaLabel
191
191
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement(ModalHeader, {
192
192
  className: cx(headerBlockClass, headerTitle && "".concat(headerBlockClass, "--has-title"), headerClassName),
193
- iconDescription: closeIconDescription,
194
- buttonOnClick: handleClose
193
+ iconDescription: closeIconDescription
195
194
  }, headerTitle && (_h || (_h = /*#__PURE__*/React__default.createElement("h2", null, headerTitle))), !hideProgressIndicator && /*#__PURE__*/React__default.createElement("div", {
196
195
  className: "".concat(blockClass, "--progress")
197
196
  }, /*#__PURE__*/React__default.createElement(ProgressIndicator, {