@carbon/ibm-products 2.29.0-alpha.10 → 2.30.0-alpha.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. package/css/index-full-carbon.css +1405 -3
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +39 -3
  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 +1405 -3
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +1405 -3
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/AboutModal/AboutModal.d.ts +73 -2
  18. package/es/components/AboutModal/AboutModal.js +10 -28
  19. package/es/components/DataSpreadsheet/DataSpreadsheet.js +120 -145
  20. package/es/components/Datagrid/Datagrid/DatagridRow.js +1 -1
  21. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +6 -3
  22. package/es/components/Datagrid/useActionsColumn.js +6 -2
  23. package/es/components/Decorator/Decorator.d.ts +5 -0
  24. package/es/components/Decorator/Decorator.js +348 -0
  25. package/es/components/Decorator/DecoratorIcon.d.ts +5 -0
  26. package/es/components/Decorator/DecoratorIcon.js +95 -0
  27. package/es/components/Decorator/index.d.ts +1 -0
  28. package/es/components/Decorator/utils.d.ts +8 -0
  29. package/es/components/Decorator/utils.js +43 -0
  30. package/es/components/Toolbar/ToolbarButton.d.ts +24 -3
  31. package/es/components/Toolbar/ToolbarButton.js +2 -2
  32. package/es/components/index.d.ts +1 -0
  33. package/es/global/js/package-settings.d.ts +1 -0
  34. package/es/global/js/package-settings.js +1 -0
  35. package/es/index.js +1 -0
  36. package/es/settings.d.ts +1 -0
  37. package/lib/components/AboutModal/AboutModal.d.ts +73 -2
  38. package/lib/components/AboutModal/AboutModal.js +8 -26
  39. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +120 -145
  40. package/lib/components/Datagrid/Datagrid/DatagridRow.js +1 -1
  41. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +6 -3
  42. package/lib/components/Datagrid/useActionsColumn.js +6 -2
  43. package/lib/components/Decorator/Decorator.d.ts +5 -0
  44. package/lib/components/Decorator/Decorator.js +355 -0
  45. package/lib/components/Decorator/DecoratorIcon.d.ts +5 -0
  46. package/lib/components/Decorator/DecoratorIcon.js +102 -0
  47. package/lib/components/Decorator/index.d.ts +1 -0
  48. package/lib/components/Decorator/utils.d.ts +8 -0
  49. package/lib/components/Decorator/utils.js +48 -0
  50. package/lib/components/Toolbar/ToolbarButton.d.ts +24 -3
  51. package/lib/components/Toolbar/ToolbarButton.js +2 -2
  52. package/lib/components/index.d.ts +1 -0
  53. package/lib/global/js/package-settings.d.ts +1 -0
  54. package/lib/global/js/package-settings.js +1 -0
  55. package/lib/index.js +5 -0
  56. package/lib/settings.d.ts +1 -0
  57. package/package.json +5 -5
  58. package/scss/components/AboutModal/_about-modal.scss +7 -2
  59. package/scss/components/Datagrid/styles/_useExpandedRow.scss +8 -0
  60. package/scss/components/Datagrid/styles/_useNestedRows.scss +54 -0
  61. package/scss/components/Datagrid/styles/addons/_FilterPanel.scss +1 -1
  62. package/scss/components/Decorator/_carbon-imports.scss +9 -0
  63. package/scss/components/Decorator/_decorator.scss +400 -0
  64. package/scss/components/Decorator/_index-with-carbon.scss +9 -0
  65. package/scss/components/Decorator/_index.scss +8 -0
  66. package/scss/components/TagSet/_tag-set.scss +1 -0
  67. package/scss/components/_index-with-carbon.scss +1 -0
  68. package/scss/components/_index.scss +1 -0
@@ -1,3 +1,74 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2021
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React, { ReactNode } from 'react';
8
+ interface AboutModalProps {
9
+ /**
10
+ * If you are legally required to display logos of technologies used
11
+ * to build your product you can provide this in the additionalInfo.
12
+ * Additional information will be displayed in the footer.
13
+ */
14
+ additionalInfo?: ReactNode;
15
+ /**
16
+ * Provide an optional class to be applied to the modal root node.
17
+ */
18
+ className?: string;
19
+ /**
20
+ * The accessibility title for the close icon.
21
+ */
22
+ closeIconDescription: string;
23
+ /**
24
+ * Subhead text providing any relevant product disclaimers including
25
+ * legal information (optional)
26
+ */
27
+ content?: ReactNode;
28
+ /**
29
+ * Trademark and copyright information. Displays first year of
30
+ * product release to current year.
31
+ */
32
+ copyrightText: string;
33
+ /**
34
+ * An array of Carbon `Link` component if there are additional information
35
+ * to call out within the card. The about modal should be used to display
36
+ * the product information and not where users go to find help (optional)
37
+ */
38
+ links?: ReactNode[];
39
+ /**
40
+ * A visual symbol used to represent the product.
41
+ */
42
+ logo: ReactNode;
43
+ /**
44
+ * Specifies aria label for AboutModal
45
+ */
46
+ modalAriaLabel?: string;
47
+ /**
48
+ * Specifies an optional handler which is called when the AboutModal
49
+ * is closed. Returning `false` prevents the AboutModal from closing.
50
+ */
51
+ onClose?: () => void | boolean;
52
+ /**
53
+ * Specifies whether the AboutModal is open or not.
54
+ */
55
+ open?: boolean;
56
+ /**
57
+ * The DOM node the tearsheet should be rendered within. Defaults to document.body.
58
+ */
59
+ portalTarget?: ReactNode;
60
+ /**
61
+ * Header text that provides the product name. The IBM Services logo
62
+ * consists of two discrete, but required, elements: the iconic
63
+ * IBM 8-bar logo represented alongside the IBM Services logotype.
64
+ * Please follow these guidelines to ensure proper execution.
65
+ */
66
+ title: ReactNode;
67
+ /**
68
+ * Text that provides information on the version number of your product.
69
+ */
70
+ version: string;
71
+ }
1
72
  /**
2
73
  * The `AboutModal` component provides a way to communicate product information
3
74
  * to users. It is triggered by a user’s action, appears on top of the main
@@ -5,5 +76,5 @@
5
76
  * should be immediately apparent to the user, with a clear and obvious path
6
77
  * to completion.
7
78
  */
8
- export let AboutModal: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
9
- import React from 'react';
79
+ export declare let AboutModal: React.ForwardRefExoticComponent<AboutModalProps & React.RefAttributes<HTMLDivElement>>;
80
+ export {};
@@ -5,23 +5,21 @@
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 } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
- import React__default, { useState, useRef, useEffect } from 'react';
10
- import { useResizeObserver } from '../../global/js/hooks/useResizeObserver.js';
8
+ import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
+ import { ComposedModal, ModalHeader, ModalBody, Theme, ModalFooter } from '@carbon/react';
10
+ import React__default, { useRef, useEffect } from 'react';
11
11
  import PropTypes from '../../node_modules/prop-types/index.js';
12
12
  import cx from 'classnames';
13
- import { pkg } from '../../settings.js';
14
- import uuidv4 from '../../global/js/utils/uuidv4.js';
15
13
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
16
- import { ComposedModal, ModalHeader, ModalBody, Theme, ModalFooter } from '@carbon/react';
14
+ import { pkg } from '../../settings.js';
17
15
  import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
16
+ import uuidv4 from '../../global/js/utils/uuidv4.js';
18
17
 
19
18
  var _excluded = ["additionalInfo", "className", "closeIconDescription", "copyrightText", "content", "links", "logo", "modalAriaLabel", "onClose", "open", "portalTarget", "title", "version"];
20
19
 
21
20
  // The block part of our conventional BEM class names (blockClass__E--M).
22
21
  var blockClass = "".concat(pkg.prefix, "--about-modal");
23
22
  var componentName = 'AboutModal';
24
-
25
23
  // NOTE: the component SCSS is not imported here: it is rolled up separately.
26
24
 
27
25
  /**
@@ -46,30 +44,17 @@ var AboutModal = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
46
44
  title = _ref.title,
47
45
  version = _ref.version,
48
46
  rest = _objectWithoutProperties(_ref, _excluded);
49
- var _useState = useState(true),
50
- _useState2 = _slicedToArray(_useState, 2),
51
- hasScrollingContent = _useState2[0],
52
- setHasScrollingContent = _useState2[1];
53
- var bodyRef = useRef();
54
- var contentRef = useRef();
47
+ var bodyRef = useRef(null);
48
+ var contentRef = useRef(null);
55
49
  var contentId = uuidv4();
56
50
  var renderPortalUse = usePortalTarget(portalTargetIn);
57
- var handleResize = function handleResize() {
58
- setHasScrollingContent(
59
- // if our scroll height exceeds the client height enable scrolling
60
- bodyRef.current.clientHeight < (hasScrollingContent ?
61
- // Carbon modal adds 32px bottom margin when scrolling content is enabled
62
- bodyRef.current.scrollHeight - 32 : bodyRef.current.scrollHeight));
63
- };
64
51
 
65
52
  // We can't add a ref directly to the ModalBody, so track it in a ref
66
53
  // as the parent of the current bodyRef element
67
54
  useEffect(function () {
68
- bodyRef.current = contentRef.current.parentElement;
55
+ var _contentRef$current;
56
+ bodyRef.current = (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 ? void 0 : _contentRef$current.parentElement;
69
57
  }, [bodyRef]);
70
-
71
- // Detect resize of the ModalBody to recalculate whether scrolling is enabled
72
- useResizeObserver(bodyRef, handleResize);
73
58
  return renderPortalUse( /*#__PURE__*/React__default.createElement(ComposedModal, _extends({}, rest, {
74
59
  className: cx(blockClass,
75
60
  // Apply the block class to the main HTML element
@@ -89,10 +74,7 @@ var AboutModal = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
89
74
  label: title,
90
75
  labelClassName: "".concat(blockClass, "__title")
91
76
  }), /*#__PURE__*/React__default.createElement(ModalBody, {
92
- "aria-label": hasScrollingContent ? '' : null,
93
- "aria-labelledby": hasScrollingContent ? contentId : null,
94
- className: "".concat(blockClass, "__body"),
95
- hasScrollingContent: hasScrollingContent
77
+ className: "".concat(blockClass, "__body")
96
78
  }, /*#__PURE__*/React__default.createElement("div", {
97
79
  className: "".concat(blockClass, "__body-content"),
98
80
  ref: contentRef,
@@ -292,29 +292,121 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
292
292
  updateActiveCellCoordinates({
293
293
  coords: coordinatesClone,
294
294
  updatedValue: {
295
- column: type === 'home' ? 0 : columns.length - 1
295
+ column: type === 'Home' ? 0 : columns.length - 1
296
296
  }
297
297
  });
298
298
  removeCellSelections({
299
299
  spreadsheetRef: spreadsheetRef
300
300
  });
301
301
  }, [activeCellCoordinates, updateActiveCellCoordinates, spreadsheetRef, columns.length]);
302
+ var checkforReturnConditon = useCallback(function (key) {
303
+ return isEditing || key === 'Meta' || key === 'Control';
304
+ }, [isEditing]);
305
+ var handleArrowkeyPress = useCallback(function (arrowKey) {
306
+ event.preventDefault();
307
+ handleInitialArrowPress();
308
+ var coordinatesClone = _objectSpread2({}, activeCellCoordinates);
309
+ var updatedValue;
310
+ switch (arrowKey) {
311
+ // Left
312
+ case 'ArrowLeft':
313
+ {
314
+ if (coordinatesClone.column === 'header') {
315
+ return;
316
+ }
317
+ if (typeof coordinatesClone.column === 'number') {
318
+ if (coordinatesClone.column === 0) {
319
+ updatedValue = {
320
+ column: 'header'
321
+ };
322
+ } else {
323
+ updatedValue = {
324
+ column: coordinatesClone.column - 1
325
+ };
326
+ }
327
+ }
328
+ break;
329
+ }
330
+ // Up
331
+ case 'ArrowUp':
332
+ {
333
+ if (coordinatesClone.row === 'header') {
334
+ return;
335
+ }
336
+ if (typeof coordinatesClone.row === 'number') {
337
+ // set row back to header if we are at index 0
338
+ if (coordinatesClone.row === 0) {
339
+ updatedValue = {
340
+ row: 'header'
341
+ };
342
+ } else {
343
+ // if we are at any other index than 0, subtract 1 from current row index
344
+ updatedValue = {
345
+ row: coordinatesClone.row - 1
346
+ };
347
+ }
348
+ }
349
+ break;
350
+ }
351
+ // Right
352
+ case 'ArrowRight':
353
+ {
354
+ if (coordinatesClone.column === 'header') {
355
+ updatedValue = {
356
+ column: 0
357
+ };
358
+ }
359
+ if (typeof coordinatesClone.column === 'number') {
360
+ // Prevent active cell coordinates from updating if the active
361
+ // cell is in the last column, ie we can't go any further to the right
362
+ if (columns.length - 1 === coordinatesClone.column) {
363
+ return;
364
+ } else {
365
+ updatedValue = {
366
+ column: coordinatesClone.column + 1
367
+ };
368
+ }
369
+ }
370
+ break;
371
+ }
372
+ // Down
373
+ case 'ArrowDown':
374
+ {
375
+ if (coordinatesClone.row === 'header') {
376
+ updatedValue = {
377
+ row: 0
378
+ };
379
+ }
380
+ if (typeof coordinatesClone.row === 'number') {
381
+ // Prevent active cell coordinates from updating if the active
382
+ // cell is in the last row, ie we can't go any further down since
383
+ // we are in the last row
384
+ if (rows.length - 1 === coordinatesClone.row) {
385
+ return;
386
+ } else {
387
+ updatedValue = {
388
+ row: coordinatesClone.row + 1
389
+ };
390
+ }
391
+ }
392
+ break;
393
+ }
394
+ }
395
+ if (updatedValue) {
396
+ updateActiveCellCoordinates({
397
+ coords: coordinatesClone,
398
+ updatedValue: updatedValue
399
+ });
400
+ }
401
+ }, [handleInitialArrowPress, updateActiveCellCoordinates, activeCellCoordinates, columns, rows]);
302
402
  var handleKeyPress = useCallback(function (event) {
303
403
  var key = event.key;
304
- if (isEditing) {
305
- return;
306
- }
307
404
  // Command keys need to be returned as there is default browser behavior with these keys
308
- if (key === 'Meta' || key === 'Control') {
309
- return;
310
- }
311
- // Prevent arrow keys, home key, and end key from scrolling the page when the data spreadsheet container has focus
312
- if (['End', 'Home', 'ArrowLeft', 'ArrowUp', 'ArrowRight', 'ArrowDown'].indexOf(key) > -1 && !isEditing) {
313
- event.preventDefault();
314
- }
315
- if (['Tab'].indexOf(key) > -1 && isEditing) {
405
+ // Needs to be returned in editing mode
406
+ if (checkforReturnConditon(key)) {
316
407
  return;
317
408
  }
409
+
318
410
  // Clear out all cell selection areas if user uses any arrow key, except if the shift key is being held
319
411
  if (['ArrowLeft', 'ArrowUp', 'ArrowRight', 'ArrowDown'].indexOf(key) > -1) {
320
412
  if (selectionAreas !== null && selectionAreas !== void 0 && selectionAreas.length && keysPressedList.length < 2 && !includesShift(keysPressedList)) {
@@ -325,7 +417,7 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
325
417
  });
326
418
  }
327
419
  }
328
- if (!isEditing && (keysPressedList === null || keysPressedList === void 0 ? void 0 : keysPressedList.length) > 1) {
420
+ if ((keysPressedList === null || keysPressedList === void 0 ? void 0 : keysPressedList.length) > 1) {
329
421
  handleMultipleKeys({
330
422
  activeCellCoordinates: activeCellCoordinates,
331
423
  event: event,
@@ -343,27 +435,24 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
343
435
  usingMac: usingMac
344
436
  });
345
437
  }
346
- var deleteParams = {
347
- selectionAreas: selectionAreas,
348
- currentMatcher: currentMatcher,
349
- rows: rows,
350
- setActiveCellContent: setActiveCellContent,
351
- updateData: updateData,
352
- activeCellCoordinates: activeCellCoordinates
353
- };
438
+
354
439
  // Allow arrow key navigation if there are less than two activeKeys OR
355
440
  // if one of the activeCellCoordinates is in a header position
441
+ // Prevent arrow keys, home key, and end key from scrolling the page when the data spreadsheet container has focus
442
+
356
443
  if (keysPressedList.length < 2 && !includesShift(keysPressedList) || activeCellCoordinates.row === 'header' || activeCellCoordinates.column === 'header') {
357
444
  switch (key) {
358
- // Backspace
359
445
  case 'Backspace':
360
- {
361
- handleCellDeletion(deleteParams);
362
- break;
363
- }
364
- // Delete
365
446
  case 'Delete':
366
447
  {
448
+ var deleteParams = {
449
+ selectionAreas: selectionAreas,
450
+ currentMatcher: currentMatcher,
451
+ rows: rows,
452
+ setActiveCellContent: setActiveCellContent,
453
+ updateData: updateData,
454
+ activeCellCoordinates: activeCellCoordinates
455
+ };
367
456
  handleCellDeletion(deleteParams);
368
457
  break;
369
458
  }
@@ -381,22 +470,14 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
381
470
  }
382
471
  // HOME
383
472
  case 'Home':
384
- {
385
- if (includesResourceKey(keysPressedList, usingMac)) {
386
- return;
387
- }
388
- handleHomeEndKey({
389
- type: 'home'
390
- });
391
- break;
392
- }
393
473
  case 'End':
394
474
  {
475
+ event.preventDefault();
395
476
  if (includesResourceKey(keysPressedList, usingMac)) {
396
477
  return;
397
478
  }
398
479
  handleHomeEndKey({
399
- type: 'end'
480
+ type: key
400
481
  });
401
482
  break;
402
483
  }
@@ -420,122 +501,16 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
420
501
  setActiveCellCoordinates(null);
421
502
  break;
422
503
  }
423
- // Left
424
504
  case 'ArrowLeft':
425
- {
426
- handleInitialArrowPress();
427
- var coordinatesClone = _objectSpread2({}, activeCellCoordinates);
428
- if (coordinatesClone.column === 'header') {
429
- return;
430
- }
431
- if (typeof coordinatesClone.column === 'number') {
432
- if (coordinatesClone.column === 0) {
433
- updateActiveCellCoordinates({
434
- coords: coordinatesClone,
435
- updatedValue: {
436
- column: 'header'
437
- }
438
- });
439
- return;
440
- }
441
- updateActiveCellCoordinates({
442
- coords: coordinatesClone,
443
- updatedValue: {
444
- column: coordinatesClone.column - 1
445
- }
446
- });
447
- }
448
- break;
449
- }
450
- // Up
451
505
  case 'ArrowUp':
452
- {
453
- handleInitialArrowPress();
454
- var _coordinatesClone = _objectSpread2({}, activeCellCoordinates);
455
- if (_coordinatesClone.row === 'header') {
456
- return;
457
- }
458
- if (typeof _coordinatesClone.row === 'number') {
459
- // set row back to header if we are at index 0
460
- if (_coordinatesClone.row === 0) {
461
- updateActiveCellCoordinates({
462
- coords: _coordinatesClone,
463
- updatedValue: {
464
- row: 'header'
465
- }
466
- });
467
- return;
468
- }
469
- // if we are at any other index than 0, subtract 1 from current row index
470
- updateActiveCellCoordinates({
471
- coords: _coordinatesClone,
472
- updatedValue: {
473
- row: _coordinatesClone.row - 1
474
- }
475
- });
476
- }
477
- break;
478
- }
479
- // Right
480
506
  case 'ArrowRight':
481
- {
482
- handleInitialArrowPress();
483
- var _coordinatesClone2 = _objectSpread2({}, activeCellCoordinates);
484
- if (_coordinatesClone2.column === 'header') {
485
- updateActiveCellCoordinates({
486
- coords: _coordinatesClone2,
487
- updatedValue: {
488
- column: 0
489
- }
490
- });
491
- }
492
- if (typeof _coordinatesClone2.column === 'number') {
493
- // Prevent active cell coordinates from updating if the active
494
- // cell is in the last column, ie we can't go any further to the right
495
- if (columns.length - 1 === _coordinatesClone2.column) {
496
- return;
497
- }
498
- updateActiveCellCoordinates({
499
- coords: _coordinatesClone2,
500
- updatedValue: {
501
- column: _coordinatesClone2.column + 1
502
- }
503
- });
504
- }
505
- break;
506
- }
507
- // Down
508
507
  case 'ArrowDown':
509
508
  {
510
- handleInitialArrowPress();
511
- var _coordinatesClone3 = _objectSpread2({}, activeCellCoordinates);
512
- if (_coordinatesClone3.row === 'header') {
513
- updateActiveCellCoordinates({
514
- coords: _coordinatesClone3,
515
- updatedValue: {
516
- row: 0
517
- }
518
- });
519
- }
520
- if (typeof _coordinatesClone3.row === 'number') {
521
- // Prevent active cell coordinates from updating if the active
522
- // cell is in the last row, ie we can't go any further down since
523
- // we are in the last row
524
- if (rows.length - 1 === _coordinatesClone3.row) {
525
- return;
526
- }
527
- updateActiveCellCoordinates({
528
- coords: _coordinatesClone3,
529
- updatedValue: {
530
- row: _coordinatesClone3.row + 1
531
- }
532
- });
533
- }
534
- break;
509
+ handleArrowkeyPress(key);
535
510
  }
536
511
  }
537
512
  }
538
- }, [activeCellInsideSelectionArea, updateActiveCellCoordinates, handleInitialArrowPress, activeCellCoordinates, removeActiveCell, columns, rows, spreadsheetRef, currentMatcher, isEditing, removeCellEditor, selectionAreas, handleHomeEndKey, keysPressedList, usingMac, updateData]);
513
+ }, [activeCellInsideSelectionArea, updateActiveCellCoordinates, activeCellCoordinates, removeActiveCell, columns, rows, spreadsheetRef, currentMatcher, removeCellEditor, selectionAreas, handleHomeEndKey, keysPressedList, usingMac, updateData, checkforReturnConditon, handleArrowkeyPress]);
539
514
  var startEditMode = function startEditMode() {
540
515
  setIsEditing(true);
541
516
  setClickAndHoldActive(false);
@@ -153,7 +153,7 @@ var DatagridRow = function DatagridRow(datagridState) {
153
153
  return h.id === cell.column.id;
154
154
  });
155
155
  return /*#__PURE__*/React__default.createElement(TableCell, _extends({
156
- className: cx("".concat(blockClass, "__cell"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__expandable-row-cell"), row.canExpand && index === 0), "".concat(blockClass, "__slug--cell"), associatedHeader && associatedHeader.length && /*#__PURE__*/isValidElement((_associatedHeader$ = associatedHeader[0]) === null || _associatedHeader$ === void 0 ? void 0 : _associatedHeader$.slug)))
156
+ className: cx("".concat(blockClass, "__cell"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__expandable-row-cell"), row.canExpand && index === 0), "".concat(blockClass, "__expandable-row-cell--is-expanded"), row.isExpanded && index === 0), "".concat(blockClass, "__slug--cell"), associatedHeader && associatedHeader.length && /*#__PURE__*/isValidElement((_associatedHeader$ = associatedHeader[0]) === null || _associatedHeader$ === void 0 ? void 0 : _associatedHeader$.slug)))
157
157
  }, restProps, {
158
158
  key: cell.column.id,
159
159
  title: title
@@ -403,9 +403,12 @@ var useFilters = function useFilters(_ref) {
403
403
  });
404
404
  return updatedFilters[0];
405
405
  };
406
- setFiltersObjectArray(savedFilters);
407
- var filterStateCopy = cleanFilters(filtersState);
408
- setFiltersState(filterStateCopy);
406
+ if (savedFilters && savedFilters.length) {
407
+ var _cleanFilters;
408
+ setFiltersObjectArray(savedFilters);
409
+ var filterStateCopy = (_cleanFilters = cleanFilters(filtersState)) !== null && _cleanFilters !== void 0 ? _cleanFilters : [];
410
+ setFiltersState(filterStateCopy);
411
+ }
409
412
  }
410
413
  if (!isFetching) {
411
414
  setFetchingReset(false);
@@ -12,7 +12,7 @@ import { IconSkeleton, IconButton, OverflowMenu, OverflowMenuItem } from '@carbo
12
12
  import { pkg } from '../../settings.js';
13
13
  import { prepareProps } from '../../global/js/utils/props-helper.js';
14
14
 
15
- var _excluded = ["align", "id", "itemText", "onClick", "icon", "shouldHideMenuItem"],
15
+ var _excluded = ["align", "id", "itemText", "onClick", "icon", "shouldHideMenuItem", "shouldDisableMenuItem", "disabled"],
16
16
  _excluded2 = ["id", "onClick", "shouldHideMenuItem", "shouldDisableMenuItem", "disabled"];
17
17
  var blockClass = "".concat(pkg.prefix, "--datagrid");
18
18
  var useActionsColumn = function useActionsColumn(hooks) {
@@ -54,8 +54,11 @@ var useActionsColumn = function useActionsColumn(hooks) {
54
54
  _onClick = preparedActionProps.onClick,
55
55
  icon = preparedActionProps.icon,
56
56
  shouldHideMenuItem = preparedActionProps.shouldHideMenuItem,
57
+ shouldDisableMenuItem = preparedActionProps.shouldDisableMenuItem,
58
+ disabled = preparedActionProps.disabled,
57
59
  rest = _objectWithoutProperties(preparedActionProps, _excluded);
58
60
  var hidden = typeof shouldHideMenuItem === 'function' && shouldHideMenuItem(row);
61
+ var isDisabledByRow = typeof shouldDisableMenuItem === 'function' ? shouldDisableMenuItem(row) : disabled;
59
62
  if (hidden) {
60
63
  return null;
61
64
  }
@@ -77,7 +80,8 @@ var useActionsColumn = function useActionsColumn(hooks) {
77
80
  }
78
81
  e.stopPropagation();
79
82
  _onClick(id, row, e);
80
- }
83
+ },
84
+ disabled: isDisabledByRow
81
85
  }), /*#__PURE__*/React__default.createElement(Icon, null)));
82
86
  })), !isFetching && (rowActions.length > 2 || isColumnSticky) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(OverflowMenu, {
83
87
  align: "left",
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The Decorator groups a key/value pair to look and behave like a single UI element.
3
+ */
4
+ export let Decorator: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
+ import React from 'react';