@carbon/ibm-products 2.35.0 → 2.36.0-alpha.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. package/css/index-full-carbon.css +957 -567
  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 +67 -74
  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 +227 -206
  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 +443 -247
  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/Coachmark/utils/enums.d.ts +36 -22
  18. package/es/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
  19. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
  20. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
  21. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
  22. package/es/components/ConditionBuilder/assets/sampleInput.d.ts +5 -5
  23. package/es/components/CreateFullPage/CreateFullPage.d.ts +121 -4
  24. package/es/components/CreateFullPage/CreateFullPage.js +12 -8
  25. package/es/components/CreateTearsheet/CreateTearsheet.js +2 -0
  26. package/es/components/Datagrid/Datagrid/DatagridRow.js +4 -3
  27. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
  28. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +10 -6
  29. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
  30. package/es/components/EditFullPage/EditFullPage.d.ts +19 -2
  31. package/es/components/EditFullPage/EditFullPage.js +3 -3
  32. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
  33. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
  34. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
  35. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
  36. package/es/components/FullPageError/FullPageError.d.ts +2 -1
  37. package/es/components/FullPageError/FullPageError.js +24 -49
  38. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
  39. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
  40. package/es/components/InlineTip/InlineTipLink.d.ts +19 -2
  41. package/es/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
  42. package/es/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
  43. package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
  44. package/es/components/NonLinearReading/NonLinearReading.d.ts +28 -2
  45. package/es/components/NonLinearReading/NonLinearReading.js +2 -7
  46. package/es/components/SearchBar/SearchBar.d.ts +51 -3
  47. package/es/components/SearchBar/SearchBar.js +5 -6
  48. package/es/components/SidePanel/SidePanel.js +10 -5
  49. package/es/components/TruncatedList/TruncatedList.d.ts +47 -2
  50. package/es/components/TruncatedList/TruncatedList.js +5 -4
  51. package/lib/components/Coachmark/utils/enums.d.ts +36 -22
  52. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
  53. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
  54. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
  55. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
  56. package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +5 -5
  57. package/lib/components/CreateFullPage/CreateFullPage.d.ts +121 -4
  58. package/lib/components/CreateFullPage/CreateFullPage.js +12 -8
  59. package/lib/components/CreateTearsheet/CreateTearsheet.js +2 -0
  60. package/lib/components/Datagrid/Datagrid/DatagridRow.js +4 -3
  61. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
  62. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +11 -7
  63. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
  64. package/lib/components/EditFullPage/EditFullPage.d.ts +19 -2
  65. package/lib/components/EditFullPage/EditFullPage.js +3 -3
  66. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
  67. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
  68. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
  69. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
  70. package/lib/components/FullPageError/FullPageError.d.ts +2 -1
  71. package/lib/components/FullPageError/FullPageError.js +24 -49
  72. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
  73. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
  74. package/lib/components/InlineTip/InlineTipLink.d.ts +19 -2
  75. package/lib/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
  76. package/lib/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
  77. package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
  78. package/lib/components/NonLinearReading/NonLinearReading.d.ts +28 -2
  79. package/lib/components/NonLinearReading/NonLinearReading.js +2 -7
  80. package/lib/components/SearchBar/SearchBar.d.ts +51 -3
  81. package/lib/components/SearchBar/SearchBar.js +5 -6
  82. package/lib/components/SidePanel/SidePanel.js +10 -5
  83. package/lib/components/TruncatedList/TruncatedList.d.ts +47 -2
  84. package/lib/components/TruncatedList/TruncatedList.js +5 -4
  85. package/package.json +4 -4
  86. package/scss/components/Datagrid/styles/_useSortableColumns.scss +2 -0
  87. package/scss/components/FullPageError/_full-page-error.scss +10 -10
  88. package/scss/components/UserAvatar/_user-avatar.scss +6 -3
@@ -1,5 +1,29 @@
1
1
  /**
2
- * Use beacon for the target prop of a Coachmark component.
2
+ * Copyright IBM Corp. 2023, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
3
6
  */
4
- export let CoachmarkBeacon: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
7
  import React from 'react';
8
+ import { BEACON_KIND } from '../Coachmark';
9
+ interface CoachmarkBeaconProps {
10
+ /**
11
+ * Optional class name for this component.
12
+ */
13
+ className?: string;
14
+ /**
15
+ * What style of beacon.
16
+ * BEACON_KIND is an exported enum from the Coachmark and can be used for this value.
17
+ * @see {@link BEACON_KIND}
18
+ */
19
+ kind?: BEACON_KIND;
20
+ /**
21
+ * The aria label.
22
+ */
23
+ label: string;
24
+ }
25
+ /**
26
+ * Use beacon for the target prop of a Coachmark component.
27
+ */
28
+ export declare let CoachmarkBeacon: React.ForwardRefExoticComponent<CoachmarkBeaconProps & React.RefAttributes<HTMLDivElement>>;
29
+ export {};
@@ -31,7 +31,6 @@ var componentName = 'CoachmarkBeacon';
31
31
  var defaults = {
32
32
  kind: 'default'
33
33
  };
34
-
35
34
  /**
36
35
  * Use beacon for the target prop of a Coachmark component.
37
36
  */
@@ -63,8 +62,7 @@ exports.CoachmarkBeacon = /*#__PURE__*/React__default["default"].forwardRef(func
63
62
  "aria-label": label,
64
63
  className: "".concat(blockClass, "__target")
65
64
  }), /*#__PURE__*/React__default["default"].createElement("svg", {
66
- className: "".concat(blockClass, "__center"),
67
- alt: ""
65
+ className: "".concat(blockClass, "__center")
68
66
  }, _circle || (_circle = /*#__PURE__*/React__default["default"].createElement("circle", {
69
67
  r: 1,
70
68
  cx: 38,
@@ -1,7 +1,33 @@
1
+ /**
2
+ * Copyright IBM Corp. 2023, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React, { ReactNode } from 'react';
8
+ interface CoachmarkOverlayElementProps {
9
+ /**
10
+ * An optional button can be rendered below the description.
11
+ * This can be a link, button, Coachmark button, etc.
12
+ */
13
+ button?: ReactNode;
14
+ /**
15
+ * Optional class name for this component.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * The description of the Coachmark.
20
+ */
21
+ description: ReactNode;
22
+ /**
23
+ * The title of the Coachmark.
24
+ */
25
+ title: string;
26
+ }
1
27
  /**
2
28
  * Component to be displayed within a CoachmarkOverlayElements container.
3
29
  * Can be used 1 to N number, to display content in a Coachmark's overlay
4
30
  * in a carousel fashion.
5
31
  */
6
- export let CoachmarkOverlayElement: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
7
- import React from 'react';
32
+ export declare let CoachmarkOverlayElement: React.ForwardRefExoticComponent<CoachmarkOverlayElementProps & React.RefAttributes<HTMLDivElement>>;
33
+ export {};
@@ -26,7 +26,6 @@ var _excluded = ["button", "className", "description", "title"];
26
26
  // The block part of our conventional BEM class names (blockClass__E--M).
27
27
  var blockClass = "".concat(settings.pkg.prefix, "--coachmark-overlay-element");
28
28
  var componentName = 'CoachmarkOverlayElement';
29
-
30
29
  /**
31
30
  * Component to be displayed within a CoachmarkOverlayElements container.
32
31
  * Can be used 1 to N number, to display content in a Coachmark's overlay
@@ -2,7 +2,7 @@ export declare const inputData: {
2
2
  properties: ({
3
3
  id: string;
4
4
  label: string;
5
- icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
5
+ icon: import("@carbon/react/icons").CarbonIconType;
6
6
  type: string;
7
7
  config: {
8
8
  options: {
@@ -17,13 +17,13 @@ export declare const inputData: {
17
17
  } | {
18
18
  id: string;
19
19
  label: string;
20
- icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
20
+ icon: import("@carbon/react/icons").CarbonIconType;
21
21
  type: string;
22
22
  config: {
23
23
  options: {
24
24
  label: string;
25
25
  id: string;
26
- icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
26
+ icon: import("@carbon/react/icons").CarbonIconType;
27
27
  }[];
28
28
  includeSearch: boolean;
29
29
  min?: undefined;
@@ -33,7 +33,7 @@ export declare const inputData: {
33
33
  } | {
34
34
  id: string;
35
35
  label: string;
36
- icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
36
+ icon: import("@carbon/react/icons").CarbonIconType;
37
37
  type: string;
38
38
  config: {
39
39
  options?: undefined;
@@ -45,7 +45,7 @@ export declare const inputData: {
45
45
  } | {
46
46
  id: string;
47
47
  label: string;
48
- icon: import("@carbon/icons-react/lib/CarbonIcon").CarbonIconType;
48
+ icon: import("@carbon/react/icons").CarbonIconType;
49
49
  type: string;
50
50
  config: {
51
51
  min: number;
@@ -1,5 +1,122 @@
1
- export const StepsContext: React.Context<null>;
2
- export const StepNumberContext: React.Context<number>;
1
+ /**
2
+ * Copyright IBM Corp. 2021, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React, { ReactNode } from 'react';
8
+ export declare const StepsContext: React.Context<null>;
9
+ export declare const StepNumberContext: React.Context<number>;
10
+ interface HeaderBreadcrumbs {
11
+ /** breadcrumb item key */
12
+ key: string;
13
+ /** breadcrumb item label */
14
+ label: string;
15
+ /** breadcrumb item link */
16
+ href?: string;
17
+ /** breadcrumb item title tooltip */
18
+ title?: string;
19
+ /** Provide if this breadcrumb item represents the current page */
20
+ isCurrentPage?: boolean;
21
+ }
22
+ type CreateFullPageBreadcrumbsProps = {
23
+ /** The header breadcrumbs */
24
+ breadcrumbs?: null | undefined;
25
+ /**
26
+ * Label for open/close overflow button used for breadcrumb items that do not fit
27
+ */
28
+ breadcrumbsOverflowAriaLabel?: never;
29
+ } | {
30
+ /** The header breadcrumbs */
31
+ breadcrumbs: HeaderBreadcrumbs;
32
+ /**
33
+ * Label for open/close overflow button used for breadcrumb items that do not fit
34
+ */
35
+ breadcrumbsOverflowAriaLabel: string;
36
+ };
37
+ type CreateFullPageBaseProps = {
38
+ /**
39
+ * The back button text
40
+ */
41
+ backButtonText?: string;
42
+ /**
43
+ * The cancel button text
44
+ */
45
+ cancelButtonText: string;
46
+ /**
47
+ * The main content of the full page
48
+ */
49
+ children?: ReactNode;
50
+ /**
51
+ * Provide an optional class to be applied to the containing node.
52
+ */
53
+ className?: string;
54
+ /**
55
+ * Specifies elements to focus on first on render.
56
+ */
57
+ firstFocusElement?: string;
58
+ /**
59
+ * This can be used to open the component to a step other than the first step.
60
+ * For example, a create flow was previously in progress, data was saved, and
61
+ * is now being completed.
62
+ */
63
+ initialStep?: number;
64
+ /** Maximum visible breadcrumb-items before overflow is used (values less than 1 are treated as 1) */
65
+ maxVisibleBreadcrumbs?: number;
66
+ /**
67
+ * The primary 'danger' button text in the modal
68
+ */
69
+ modalDangerButtonText: string;
70
+ /**
71
+ * The description located below the title in the modal
72
+ */
73
+ modalDescription?: string;
74
+ /**
75
+ * The secondary button text in the modal
76
+ */
77
+ modalSecondaryButtonText: string;
78
+ /**
79
+ * The title located in the header of the modal
80
+ */
81
+ modalTitle: string;
82
+ /**
83
+ * The next button text
84
+ */
85
+ nextButtonText: string;
86
+ /**
87
+ * A prop to omit the trailing slash for the breadcrumbs
88
+ */
89
+ noTrailingSlash?: boolean;
90
+ /**
91
+ * An optional handler that is called when the user closes the full page (by
92
+ * clicking the secondary button, located in the modal, which triggers after
93
+ * clicking the ghost button in the modal
94
+ */
95
+ onClose?: () => void;
96
+ /**
97
+ * Specify a handler for submitting the multi step full page (final step).
98
+ * This function can _optionally_ return a promise that is either resolved or rejected and the CreateFullPage will handle the submitting state of the create button.
99
+ */
100
+ onRequestSubmit: () => void;
101
+ /**
102
+ * A secondary title of the full page, displayed in the influencer area
103
+ */
104
+ secondaryTitle?: string;
105
+ /**
106
+ * @ignore
107
+ * The aria label to be used for the UI Shell SideNav Carbon component
108
+ */
109
+ sideNavAriaLabel?: string;
110
+ /**
111
+ * The submit button text
112
+ */
113
+ submitButtonText: string;
114
+ /**
115
+ * The main title of the full page, displayed in the header area
116
+ */
117
+ title?: string;
118
+ };
119
+ type CreateFullPageProps = CreateFullPageBaseProps & CreateFullPageBreadcrumbsProps;
3
120
  /**
4
121
  * Use with creations that must be completed in order for a service to be usable.
5
122
  *
@@ -12,5 +129,5 @@ on the Carbon's grid system
12
129
  include `<Row>` and `<Column>` components inside of each `CreateFullPageStep`
13
130
  component to get the desired affect.
14
131
  */
15
- export let CreateFullPage: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
16
- import React from 'react';
132
+ export declare let CreateFullPage: React.ForwardRefExoticComponent<CreateFullPageProps & React.RefAttributes<HTMLDivElement>>;
133
+ export {};
@@ -44,7 +44,6 @@ var StepsContext = /*#__PURE__*/React.createContext(null);
44
44
  // This is a context supplied separately to each step in the container
45
45
  // to let it know what number it is in the sequence of steps
46
46
  var StepNumberContext = /*#__PURE__*/React.createContext(-1);
47
-
48
47
  /**
49
48
  * Use with creations that must be completed in order for a service to be usable.
50
49
  *
@@ -123,7 +122,7 @@ exports.CreateFullPage = /*#__PURE__*/React__default["default"].forwardRef(funct
123
122
  _useState20 = _rollupPluginBabelHelpers.slicedToArray(_useState19, 2),
124
123
  firstIncludedStep = _useState20[0],
125
124
  setFirstIncludedStep = _useState20[1];
126
- var _useState21 = React.useState(null),
125
+ var _useState21 = React.useState(),
127
126
  _useState22 = _rollupPluginBabelHelpers.slicedToArray(_useState21, 2),
128
127
  lastIncludedStep = _useState22[0],
129
128
  setLastIncludedStep = _useState22[1];
@@ -138,11 +137,13 @@ exports.CreateFullPage = /*#__PURE__*/React__default["default"].forwardRef(funct
138
137
  if (lastItem !== lastIncludedStep) {
139
138
  setLastIncludedStep(lastItem);
140
139
  }
140
+
141
+ /**@ts-ignore */
141
142
  if (open && initialStep) {
142
143
  var numberOfHiddenSteps = getNumberOfHiddenSteps.getNumberOfHiddenSteps(stepData, initialStep);
143
144
  setCurrentStep(Number(initialStep + numberOfHiddenSteps));
144
145
  }
145
- }, [stepData, firstIncludedStep, lastIncludedStep, initialStep]);
146
+ }, [stepData, firstIncludedStep, lastIncludedStep, initialStep, modalIsOpen]);
146
147
  useCreateComponentFocus.useCreateComponentFocus({
147
148
  previousState: previousState,
148
149
  currentStep: currentStep,
@@ -154,9 +155,11 @@ exports.CreateFullPage = /*#__PURE__*/React__default["default"].forwardRef(funct
154
155
  useResetCreateComponent.useResetCreateComponent({
155
156
  firstIncludedStep: firstIncludedStep,
156
157
  previousState: previousState,
158
+ /**@ts-ignore */
157
159
  open: open,
158
160
  setCurrentStep: setCurrentStep,
159
161
  stepData: stepData,
162
+ /**@ts-ignore */
160
163
  initialStep: initialStep,
161
164
  totalSteps: stepData === null || stepData === void 0 ? void 0 : stepData.length,
162
165
  componentName: componentName
@@ -169,6 +172,7 @@ exports.CreateFullPage = /*#__PURE__*/React__default["default"].forwardRef(funct
169
172
  isSubmitDisabled: isDisabled,
170
173
  setCurrentStep: setCurrentStep,
171
174
  setIsSubmitting: setIsSubmitting,
175
+ /**@ts-ignore */
172
176
  setShouldViewAll: setShouldViewAll,
173
177
  onClose: onClose,
174
178
  onRequestSubmit: onRequestSubmit,
@@ -189,15 +193,14 @@ exports.CreateFullPage = /*#__PURE__*/React__default["default"].forwardRef(funct
189
193
  return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
190
194
  ref: ref,
191
195
  className: cx__default["default"](blockClass, className)
192
- }, devtools.getDevtoolsProps(componentName)), (title || (breadcrumbs === null || breadcrumbs === void 0 ? void 0 : breadcrumbs.length) > 0) && /*#__PURE__*/React__default["default"].createElement("div", {
193
- className: "".concat(blockClass, "__header")
194
- }, /*#__PURE__*/React__default["default"].createElement(SimpleHeader.SimpleHeader, {
196
+ }, devtools.getDevtoolsProps(componentName)), (title || breadcrumbs) && /*#__PURE__*/React__default["default"].createElement(SimpleHeader.SimpleHeader, {
195
197
  title: title,
196
198
  breadcrumbs: breadcrumbs,
197
199
  noTrailingSlash: noTrailingSlash,
198
200
  overflowAriaLabel: breadcrumbsOverflowAriaLabel,
199
- maxVisible: maxVisibleBreadcrumbs
200
- })), /*#__PURE__*/React__default["default"].createElement("div", {
201
+ maxVisible: maxVisibleBreadcrumbs,
202
+ className: "".concat(blockClass, "__header")
203
+ }), /*#__PURE__*/React__default["default"].createElement("div", {
201
204
  className: "".concat(blockClass, "__influencer-and-body-container")
202
205
  }, /*#__PURE__*/React__default["default"].createElement("div", {
203
206
  className: "".concat(blockClass, "__influencer")
@@ -280,6 +283,7 @@ exports.CreateFullPage.propTypes = {
280
283
  */
281
284
  backButtonText: index["default"].string.isRequired,
282
285
  /** The header breadcrumbs */
286
+ /**@ts-ignore */
283
287
  breadcrumbs: index["default"].arrayOf(index["default"].shape({
284
288
  /** breadcrumb item key */
285
289
  key: index["default"].string.isRequired,
@@ -138,6 +138,8 @@ exports.CreateTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
138
138
  if (open && initialStep) {
139
139
  var numberOfHiddenSteps = getNumberOfHiddenSteps.getNumberOfHiddenSteps(stepData, initialStep);
140
140
  setCurrentStep(Number(initialStep + numberOfHiddenSteps));
141
+ } else {
142
+ setCurrentStep(firstIncludedStep);
141
143
  }
142
144
  }, [stepData, firstIncludedStep, lastIncludedStep, initialStep, open]);
143
145
  useCreateComponentFocus.useCreateComponentFocus({
@@ -144,14 +144,15 @@ var DatagridRow = function DatagridRow(datagridState) {
144
144
  })) : /*#__PURE__*/React__default["default"].createElement("td", {
145
145
  className: "".concat(blockClass, "__table-row-ai-spacer")
146
146
  }) : null, row.cells.map(function (cell, index) {
147
- var _cell$column, _content$props, _associatedHeader$;
147
+ var _cell$column, _cell$column2, _content$props, _associatedHeader$;
148
148
  var cellProps = cell.getCellProps();
149
149
  // eslint-disable-next-line no-unused-vars
150
150
  var children = cellProps.children;
151
151
  cellProps.role;
152
152
  var restProps = _rollupPluginBabelHelpers.objectWithoutProperties(cellProps, _excluded2);
153
+ var columnClassname = cell === null || cell === void 0 || (_cell$column = cell.column) === null || _cell$column === void 0 ? void 0 : _cell$column.className;
153
154
  var content = children || /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, !row.isSkeleton && cell.render('Cell'), row.isSkeleton && (_SkeletonText || (_SkeletonText = /*#__PURE__*/React__default["default"].createElement(react.SkeletonText, null))));
154
- if ((cell === null || cell === void 0 || (_cell$column = cell.column) === null || _cell$column === void 0 ? void 0 : _cell$column.id) === commonColumnIds.selectionColumnId) {
155
+ if ((cell === null || cell === void 0 || (_cell$column2 = cell.column) === null || _cell$column2 === void 0 ? void 0 : _cell$column2.id) === commonColumnIds.selectionColumnId) {
155
156
  // directly render component without the wrapping TableCell
156
157
  return cell.render('Cell', {
157
158
  key: cell.column.id
@@ -162,7 +163,7 @@ var DatagridRow = function DatagridRow(datagridState) {
162
163
  return h.id === cell.column.id;
163
164
  });
164
165
  return /*#__PURE__*/React__default["default"].createElement(react.TableCell, _rollupPluginBabelHelpers["extends"]({
165
- className: cx__default["default"]("".concat(blockClass, "__cell"), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.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__*/React.isValidElement((_associatedHeader$ = associatedHeader[0]) === null || _associatedHeader$ === void 0 ? void 0 : _associatedHeader$.slug)))
166
+ className: cx__default["default"]("".concat(blockClass, "__cell"), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.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__*/React.isValidElement((_associatedHeader$ = associatedHeader[0]) === null || _associatedHeader$ === void 0 ? void 0 : _associatedHeader$.slug)), columnClassname)
166
167
  }, restProps, {
167
168
  key: cell.column.id,
168
169
  title: title
@@ -174,9 +174,10 @@ var DraggableItemsList = function DraggableItemsList(_ref) {
174
174
  var firstWord = res !== null ? res[0] === '' ? res[1].charAt(0).toUpperCase() + res[1].substring(1) : res[0].charAt(0).toUpperCase() + res[0].substring(1) : null;
175
175
  var highlightedText = res !== null ? res[0] === '' ? "<strong>".concat(firstWord, "</strong>") + res[2] : firstWord + "<strong>".concat(res[1], "</strong>") + res[2] : colHeaderTitle;
176
176
  var isFrozenColumn = !!colDef.sticky;
177
+ var isDisabled = colDef.disabled;
177
178
  var listContents = /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(react.Checkbox, {
178
179
  checked: common.isColumnVisible(colDef),
179
- disabled: isFrozenColumn,
180
+ disabled: isDisabled || isFrozenColumn,
180
181
  onChange: function onChange(_, _ref2) {
181
182
  var checked = _ref2.checked;
182
183
  return onSelectColumn(colDef, checked);
@@ -10,14 +10,14 @@
10
10
  Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
12
  var _rollupPluginBabelHelpers = require('../../../../../_virtual/_rollupPluginBabelHelpers.js');
13
- var icons = require('@carbon/react/icons');
13
+ var constants = require('./constants.js');
14
14
  var react = require('@carbon/react');
15
- var cx = require('classnames');
16
- var index = require('../../../../../node_modules/prop-types/index.js');
17
15
  var React = require('react');
18
- var settings = require('../../../../../settings.js');
19
- var constants = require('./constants.js');
20
16
  var layout = require('@carbon/layout');
17
+ var icons = require('@carbon/react/icons');
18
+ var index = require('../../../../../node_modules/prop-types/index.js');
19
+ var cx = require('classnames');
20
+ var settings = require('../../../../../settings.js');
21
21
  var useFilters = require('./hooks/useFilters.js');
22
22
  var useShouldDisableButtons = require('./hooks/useShouldDisableButtons.js');
23
23
  var useWindowResize = require('../../../../../global/js/hooks/useWindowResize.js');
@@ -27,8 +27,8 @@ var ActionSet = require('../../../../ActionSet/ActionSet.js');
27
27
 
28
28
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
29
29
 
30
- var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
31
30
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
31
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
32
32
 
33
33
  var _Filter;
34
34
  var blockClass = "".concat(settings.pkg.prefix, "--datagrid");
@@ -163,7 +163,11 @@ var FilterFlyout = function FilterFlyout(_ref) {
163
163
  setAllFilters(filtersObjectArray);
164
164
  closeFlyout();
165
165
  // From the user
166
- onApply();
166
+ onApply({
167
+ filtersState: filtersState,
168
+ filtersObjectArray: filtersObjectArray,
169
+ lastAppliedFilters: lastAppliedFilters
170
+ });
167
171
  // When the user clicks apply, the action set buttons should be disabled again
168
172
  setShouldDisableButtons(true);
169
173
 
@@ -14,11 +14,11 @@ var react = require('@carbon/react');
14
14
  var constants = require('./constants.js');
15
15
  var React = require('react');
16
16
  var variants = require('./motion/variants.js');
17
+ var framerMotion = require('framer-motion');
17
18
  var icons = require('@carbon/react/icons');
18
19
  var FilterProvider = require('./FilterProvider.js');
19
20
  var index = require('../../../../../node_modules/prop-types/index.js');
20
21
  var cx = require('classnames');
21
- var framerMotion = require('framer-motion');
22
22
  var settings = require('../../../../../settings.js');
23
23
  var layout = require('@carbon/layout');
24
24
  var ActionSet = require('../../../../ActionSet/ActionSet.js');
@@ -136,7 +136,11 @@ var FilterPanel = function FilterPanel(_ref) {
136
136
  var apply = function apply() {
137
137
  setAllFilters(filtersObjectArray);
138
138
  // From the user
139
- onApply();
139
+ onApply({
140
+ filtersState: filtersState,
141
+ filtersObjectArray: filtersObjectArray,
142
+ lastAppliedFilters: lastAppliedFilters
143
+ });
140
144
  // When the user clicks apply, the action set buttons should be disabled again
141
145
  setShouldDisableButtons(true);
142
146
 
@@ -1,6 +1,23 @@
1
+ /**
2
+ * Copyright IBM Corp. 2022, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React, { ReactNode } from 'react';
8
+ interface EditFullPageProps {
9
+ /**
10
+ * Provide an optional class to be applied to the containing node.
11
+ */
12
+ className?: string;
13
+ /**
14
+ * Provide the contents of the EditFullPage.
15
+ */
16
+ children: ReactNode;
17
+ }
1
18
  /**
2
19
  * Use when settings on a page need to always be shown in edit mode, or when the context of the page is needed to make several changes.
3
20
  * See usage guidance for further details.
4
21
  */
5
- export let EditFullPage: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
6
- import React from 'react';
22
+ export declare let EditFullPage: React.ForwardRefExoticComponent<EditFullPageProps & React.RefAttributes<HTMLDivElement>>;
23
+ export {};
@@ -21,7 +21,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
21
21
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
22
22
  var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
23
23
 
24
- var _excluded = ["children", "className"];
24
+ var _excluded = ["className", "children"];
25
25
 
26
26
  // Carbon and package components we use.
27
27
  /* TODO: @import(s) of carbon components and other package components. */
@@ -51,8 +51,8 @@ var componentName = 'EditFullPage';
51
51
  * See usage guidance for further details.
52
52
  */
53
53
  exports.EditFullPage = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
54
- var children = _ref.children,
55
- className = _ref.className,
54
+ var className = _ref.className,
55
+ children = _ref.children,
56
56
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
57
57
  return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
58
58
  className: cx__default["default"](blockClass,
@@ -1,5 +1,64 @@
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
+ /// <reference path="../../../../src/custom-typings/index.d.ts" />
8
+ import React, { ReactNode } from 'react';
9
+ import { ButtonProps } from '@carbon/react';
10
+ import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
11
+ interface NoTagsEmptyStateProps {
12
+ /**
13
+ * Empty state action button
14
+ */
15
+ action?: {
16
+ kind?: 'primary' | 'secondary' | 'tertiary';
17
+ renderIcon?: CarbonIconType;
18
+ onClick?: ButtonProps['onClick'];
19
+ text?: string;
20
+ };
21
+ /**
22
+ * Provide an optional class to be applied to the containing node.
23
+ */
24
+ className?: string;
25
+ /**
26
+ * The alt text for empty state svg images. If not provided , title will be used.
27
+ */
28
+ illustrationDescription?: string;
29
+ /**
30
+ * Designates the position of the illustration relative to the content
31
+ */
32
+ illustrationPosition?: 'top' | 'right' | 'bottom' | 'left';
33
+ /**
34
+ * Empty state illustration theme variations.
35
+ * To ensure you use the correct themed illustrations, you can conditionally specify light or dark
36
+ * based on your app's current theme value. Example:
37
+ * `illustrationTheme={appTheme === ('carbon--g100' || 'carbon--g90') ? 'dark' : 'light'}`
38
+ */
39
+ illustrationTheme?: 'light' | 'dark';
40
+ /**
41
+ * Empty state link object
42
+ */
43
+ link?: {
44
+ text?: string | ReactNode;
45
+ href?: string;
46
+ };
47
+ /**
48
+ * Empty state size
49
+ */
50
+ size?: 'lg' | 'sm';
51
+ /**
52
+ * Empty state subtitle
53
+ */
54
+ subtitle?: string | ReactNode;
55
+ /**
56
+ * Empty state title
57
+ */
58
+ title: string | ReactNode;
59
+ }
1
60
  /**
2
61
  * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
3
62
  */
4
- export let NoTagsEmptyState: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
63
+ export declare let NoTagsEmptyState: React.ForwardRefExoticComponent<NoTagsEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
64
+ export {};
@@ -26,11 +26,9 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
26
26
  var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
27
27
 
28
28
  var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
29
-
30
29
  // The block part of our conventional BEM class names (blockClass__E--M).
31
30
  var blockClass = "".concat(settings.pkg.prefix, "--empty-state");
32
31
  var componentName = 'NoTagsEmptyState';
33
-
34
32
  /**
35
33
  * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
36
34
  */
@@ -59,7 +57,7 @@ exports.NoTagsEmptyState = /*#__PURE__*/React__default["default"].forwardRef(fun
59
57
  link: link,
60
58
  size: size,
61
59
  subtitle: subtitle,
62
- title: title
60
+ title: title = ''
63
61
  }));
64
62
  });
65
63