@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.
- package/css/index-full-carbon.css +957 -567
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +67 -74
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +227 -206
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +443 -247
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/Coachmark/utils/enums.d.ts +36 -22
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
- package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
- package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
- package/es/components/ConditionBuilder/assets/sampleInput.d.ts +5 -5
- package/es/components/CreateFullPage/CreateFullPage.d.ts +121 -4
- package/es/components/CreateFullPage/CreateFullPage.js +12 -8
- package/es/components/CreateTearsheet/CreateTearsheet.js +2 -0
- package/es/components/Datagrid/Datagrid/DatagridRow.js +4 -3
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +10 -6
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
- package/es/components/EditFullPage/EditFullPage.d.ts +19 -2
- package/es/components/EditFullPage/EditFullPage.js +3 -3
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
- package/es/components/FullPageError/FullPageError.d.ts +2 -1
- package/es/components/FullPageError/FullPageError.js +24 -49
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
- package/es/components/InlineTip/InlineTipLink.d.ts +19 -2
- package/es/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
- package/es/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
- package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
- package/es/components/NonLinearReading/NonLinearReading.d.ts +28 -2
- package/es/components/NonLinearReading/NonLinearReading.js +2 -7
- package/es/components/SearchBar/SearchBar.d.ts +51 -3
- package/es/components/SearchBar/SearchBar.js +5 -6
- package/es/components/SidePanel/SidePanel.js +10 -5
- package/es/components/TruncatedList/TruncatedList.d.ts +47 -2
- package/es/components/TruncatedList/TruncatedList.js +5 -4
- package/lib/components/Coachmark/utils/enums.d.ts +36 -22
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
- package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +5 -5
- package/lib/components/CreateFullPage/CreateFullPage.d.ts +121 -4
- package/lib/components/CreateFullPage/CreateFullPage.js +12 -8
- package/lib/components/CreateTearsheet/CreateTearsheet.js +2 -0
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +4 -3
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +11 -7
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
- package/lib/components/EditFullPage/EditFullPage.d.ts +19 -2
- package/lib/components/EditFullPage/EditFullPage.js +3 -3
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
- package/lib/components/FullPageError/FullPageError.d.ts +2 -1
- package/lib/components/FullPageError/FullPageError.js +24 -49
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
- package/lib/components/InlineTip/InlineTipLink.d.ts +19 -2
- package/lib/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
- package/lib/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
- package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
- package/lib/components/NonLinearReading/NonLinearReading.d.ts +28 -2
- package/lib/components/NonLinearReading/NonLinearReading.js +2 -7
- package/lib/components/SearchBar/SearchBar.d.ts +51 -3
- package/lib/components/SearchBar/SearchBar.js +5 -6
- package/lib/components/SidePanel/SidePanel.js +10 -5
- package/lib/components/TruncatedList/TruncatedList.d.ts +47 -2
- package/lib/components/TruncatedList/TruncatedList.js +5 -4
- package/package.json +4 -4
- package/scss/components/Datagrid/styles/_useSortableColumns.scss +2 -0
- package/scss/components/FullPageError/_full-page-error.scss +10 -10
- package/scss/components/UserAvatar/_user-avatar.scss +6 -3
@@ -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<
|
7
|
-
|
32
|
+
export declare let CoachmarkOverlayElement: React.ForwardRefExoticComponent<CoachmarkOverlayElementProps & React.RefAttributes<HTMLDivElement>>;
|
33
|
+
export {};
|
@@ -17,7 +17,6 @@ var _excluded = ["button", "className", "description", "title"];
|
|
17
17
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
18
18
|
var blockClass = "".concat(pkg.prefix, "--coachmark-overlay-element");
|
19
19
|
var componentName = 'CoachmarkOverlayElement';
|
20
|
-
|
21
20
|
/**
|
22
21
|
* Component to be displayed within a CoachmarkOverlayElements container.
|
23
22
|
* 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/
|
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/
|
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/
|
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/
|
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/
|
48
|
+
icon: import("@carbon/react/icons").CarbonIconType;
|
49
49
|
type: string;
|
50
50
|
config: {
|
51
51
|
min: number;
|
@@ -1,5 +1,122 @@
|
|
1
|
-
|
2
|
-
|
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<
|
16
|
-
|
132
|
+
export declare let CreateFullPage: React.ForwardRefExoticComponent<CreateFullPageProps & React.RefAttributes<HTMLDivElement>>;
|
133
|
+
export {};
|
@@ -35,7 +35,6 @@ var StepsContext = /*#__PURE__*/createContext(null);
|
|
35
35
|
// This is a context supplied separately to each step in the container
|
36
36
|
// to let it know what number it is in the sequence of steps
|
37
37
|
var StepNumberContext = /*#__PURE__*/createContext(-1);
|
38
|
-
|
39
38
|
/**
|
40
39
|
* Use with creations that must be completed in order for a service to be usable.
|
41
40
|
*
|
@@ -114,7 +113,7 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
114
113
|
_useState20 = _slicedToArray(_useState19, 2),
|
115
114
|
firstIncludedStep = _useState20[0],
|
116
115
|
setFirstIncludedStep = _useState20[1];
|
117
|
-
var _useState21 = useState(
|
116
|
+
var _useState21 = useState(),
|
118
117
|
_useState22 = _slicedToArray(_useState21, 2),
|
119
118
|
lastIncludedStep = _useState22[0],
|
120
119
|
setLastIncludedStep = _useState22[1];
|
@@ -129,11 +128,13 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
129
128
|
if (lastItem !== lastIncludedStep) {
|
130
129
|
setLastIncludedStep(lastItem);
|
131
130
|
}
|
131
|
+
|
132
|
+
/**@ts-ignore */
|
132
133
|
if (open && initialStep) {
|
133
134
|
var numberOfHiddenSteps = getNumberOfHiddenSteps(stepData, initialStep);
|
134
135
|
setCurrentStep(Number(initialStep + numberOfHiddenSteps));
|
135
136
|
}
|
136
|
-
}, [stepData, firstIncludedStep, lastIncludedStep, initialStep]);
|
137
|
+
}, [stepData, firstIncludedStep, lastIncludedStep, initialStep, modalIsOpen]);
|
137
138
|
useCreateComponentFocus({
|
138
139
|
previousState: previousState,
|
139
140
|
currentStep: currentStep,
|
@@ -145,9 +146,11 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
145
146
|
useResetCreateComponent({
|
146
147
|
firstIncludedStep: firstIncludedStep,
|
147
148
|
previousState: previousState,
|
149
|
+
/**@ts-ignore */
|
148
150
|
open: open,
|
149
151
|
setCurrentStep: setCurrentStep,
|
150
152
|
stepData: stepData,
|
153
|
+
/**@ts-ignore */
|
151
154
|
initialStep: initialStep,
|
152
155
|
totalSteps: stepData === null || stepData === void 0 ? void 0 : stepData.length,
|
153
156
|
componentName: componentName
|
@@ -160,6 +163,7 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
160
163
|
isSubmitDisabled: isDisabled,
|
161
164
|
setCurrentStep: setCurrentStep,
|
162
165
|
setIsSubmitting: setIsSubmitting,
|
166
|
+
/**@ts-ignore */
|
163
167
|
setShouldViewAll: setShouldViewAll,
|
164
168
|
onClose: onClose,
|
165
169
|
onRequestSubmit: onRequestSubmit,
|
@@ -180,15 +184,14 @@ var CreateFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
180
184
|
return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
181
185
|
ref: ref,
|
182
186
|
className: cx(blockClass, className)
|
183
|
-
}, getDevtoolsProps(componentName)), (title ||
|
184
|
-
className: "".concat(blockClass, "__header")
|
185
|
-
}, /*#__PURE__*/React__default.createElement(SimpleHeader, {
|
187
|
+
}, getDevtoolsProps(componentName)), (title || breadcrumbs) && /*#__PURE__*/React__default.createElement(SimpleHeader, {
|
186
188
|
title: title,
|
187
189
|
breadcrumbs: breadcrumbs,
|
188
190
|
noTrailingSlash: noTrailingSlash,
|
189
191
|
overflowAriaLabel: breadcrumbsOverflowAriaLabel,
|
190
|
-
maxVisible: maxVisibleBreadcrumbs
|
191
|
-
|
192
|
+
maxVisible: maxVisibleBreadcrumbs,
|
193
|
+
className: "".concat(blockClass, "__header")
|
194
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
192
195
|
className: "".concat(blockClass, "__influencer-and-body-container")
|
193
196
|
}, /*#__PURE__*/React__default.createElement("div", {
|
194
197
|
className: "".concat(blockClass, "__influencer")
|
@@ -271,6 +274,7 @@ CreateFullPage.propTypes = {
|
|
271
274
|
*/
|
272
275
|
backButtonText: PropTypes.string.isRequired,
|
273
276
|
/** The header breadcrumbs */
|
277
|
+
/**@ts-ignore */
|
274
278
|
breadcrumbs: PropTypes.arrayOf(PropTypes.shape({
|
275
279
|
/** breadcrumb item key */
|
276
280
|
key: PropTypes.string.isRequired,
|
@@ -129,6 +129,8 @@ var CreateTearsheet = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
129
129
|
if (open && initialStep) {
|
130
130
|
var numberOfHiddenSteps = getNumberOfHiddenSteps(stepData, initialStep);
|
131
131
|
setCurrentStep(Number(initialStep + numberOfHiddenSteps));
|
132
|
+
} else {
|
133
|
+
setCurrentStep(firstIncludedStep);
|
132
134
|
}
|
133
135
|
}, [stepData, firstIncludedStep, lastIncludedStep, initialStep, open]);
|
134
136
|
useCreateComponentFocus({
|
@@ -135,14 +135,15 @@ var DatagridRow = function DatagridRow(datagridState) {
|
|
135
135
|
})) : /*#__PURE__*/React__default.createElement("td", {
|
136
136
|
className: "".concat(blockClass, "__table-row-ai-spacer")
|
137
137
|
}) : null, row.cells.map(function (cell, index) {
|
138
|
-
var _cell$column, _content$props, _associatedHeader$;
|
138
|
+
var _cell$column, _cell$column2, _content$props, _associatedHeader$;
|
139
139
|
var cellProps = cell.getCellProps();
|
140
140
|
// eslint-disable-next-line no-unused-vars
|
141
141
|
var children = cellProps.children;
|
142
142
|
cellProps.role;
|
143
143
|
var restProps = _objectWithoutProperties(cellProps, _excluded2);
|
144
|
+
var columnClassname = cell === null || cell === void 0 || (_cell$column = cell.column) === null || _cell$column === void 0 ? void 0 : _cell$column.className;
|
144
145
|
var content = children || /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !row.isSkeleton && cell.render('Cell'), row.isSkeleton && (_SkeletonText || (_SkeletonText = /*#__PURE__*/React__default.createElement(SkeletonText, null))));
|
145
|
-
if ((cell === null || cell === void 0 || (_cell$
|
146
|
+
if ((cell === null || cell === void 0 || (_cell$column2 = cell.column) === null || _cell$column2 === void 0 ? void 0 : _cell$column2.id) === selectionColumnId) {
|
146
147
|
// directly render component without the wrapping TableCell
|
147
148
|
return cell.render('Cell', {
|
148
149
|
key: cell.column.id
|
@@ -153,7 +154,7 @@ var DatagridRow = function DatagridRow(datagridState) {
|
|
153
154
|
return h.id === cell.column.id;
|
154
155
|
});
|
155
156
|
return /*#__PURE__*/React__default.createElement(TableCell, _extends({
|
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
|
+
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)), columnClassname)
|
157
158
|
}, restProps, {
|
158
159
|
key: cell.column.id,
|
159
160
|
title: title
|
@@ -166,9 +166,10 @@ var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
166
166
|
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;
|
167
167
|
var highlightedText = res !== null ? res[0] === '' ? "<strong>".concat(firstWord, "</strong>") + res[2] : firstWord + "<strong>".concat(res[1], "</strong>") + res[2] : colHeaderTitle;
|
168
168
|
var isFrozenColumn = !!colDef.sticky;
|
169
|
+
var isDisabled = colDef.disabled;
|
169
170
|
var listContents = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Checkbox, {
|
170
171
|
checked: isColumnVisible(colDef),
|
171
|
-
disabled: isFrozenColumn,
|
172
|
+
disabled: isDisabled || isFrozenColumn,
|
172
173
|
onChange: function onChange(_, _ref2) {
|
173
174
|
var checked = _ref2.checked;
|
174
175
|
return onSelectColumn(colDef, checked);
|
@@ -6,14 +6,14 @@
|
|
6
6
|
*/
|
7
7
|
|
8
8
|
import { slicedToArray as _slicedToArray, defineProperty as _defineProperty } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
9
|
-
import {
|
9
|
+
import { BATCH, INSTANT, FLYOUT, CLEAR_FILTERS } from './constants.js';
|
10
10
|
import { usePrefix, IconButton } from '@carbon/react';
|
11
|
-
import cx from 'classnames';
|
12
|
-
import PropTypes from '../../../../../node_modules/prop-types/index.js';
|
13
11
|
import React__default, { useState, useRef, useEffect } from 'react';
|
14
|
-
import { pkg } from '../../../../../settings.js';
|
15
|
-
import { BATCH, INSTANT, FLYOUT, CLEAR_FILTERS } from './constants.js';
|
16
12
|
import { breakpoints, px } from '@carbon/layout';
|
13
|
+
import { Filter } from '@carbon/react/icons';
|
14
|
+
import PropTypes from '../../../../../node_modules/prop-types/index.js';
|
15
|
+
import cx from 'classnames';
|
16
|
+
import { pkg } from '../../../../../settings.js';
|
17
17
|
import useFilters from './hooks/useFilters.js';
|
18
18
|
import useShouldDisableButtons from './hooks/useShouldDisableButtons.js';
|
19
19
|
import { useWindowResize } from '../../../../../global/js/hooks/useWindowResize.js';
|
@@ -154,7 +154,11 @@ var FilterFlyout = function FilterFlyout(_ref) {
|
|
154
154
|
setAllFilters(filtersObjectArray);
|
155
155
|
closeFlyout();
|
156
156
|
// From the user
|
157
|
-
onApply(
|
157
|
+
onApply({
|
158
|
+
filtersState: filtersState,
|
159
|
+
filtersObjectArray: filtersObjectArray,
|
160
|
+
lastAppliedFilters: lastAppliedFilters
|
161
|
+
});
|
158
162
|
// When the user clicks apply, the action set buttons should be disabled again
|
159
163
|
setShouldDisableButtons(true);
|
160
164
|
|
@@ -10,11 +10,11 @@ import { Button, Layer, Search, Accordion, AccordionItem } from '@carbon/react';
|
|
10
10
|
import { PANEL, BATCH, CLEAR_FILTERS, INSTANT } from './constants.js';
|
11
11
|
import React__default, { useState, useContext, useRef, useMemo, useEffect } from 'react';
|
12
12
|
import { panelVariants, innerContainerVariants, actionSetVariants } from './motion/variants.js';
|
13
|
+
import { motion, useReducedMotion } from 'framer-motion';
|
13
14
|
import { Close } from '@carbon/react/icons';
|
14
15
|
import { FilterContext } from './FilterProvider.js';
|
15
16
|
import PropTypes from '../../../../../node_modules/prop-types/index.js';
|
16
17
|
import cx from 'classnames';
|
17
|
-
import { motion, useReducedMotion } from 'framer-motion';
|
18
18
|
import { pkg } from '../../../../../settings.js';
|
19
19
|
import { rem } from '@carbon/layout';
|
20
20
|
import { ActionSet } from '../../../../ActionSet/ActionSet.js';
|
@@ -127,7 +127,11 @@ var FilterPanel = function FilterPanel(_ref) {
|
|
127
127
|
var apply = function apply() {
|
128
128
|
setAllFilters(filtersObjectArray);
|
129
129
|
// From the user
|
130
|
-
onApply(
|
130
|
+
onApply({
|
131
|
+
filtersState: filtersState,
|
132
|
+
filtersObjectArray: filtersObjectArray,
|
133
|
+
lastAppliedFilters: lastAppliedFilters
|
134
|
+
});
|
131
135
|
// When the user clicks apply, the action set buttons should be disabled again
|
132
136
|
setShouldDisableButtons(true);
|
133
137
|
|
@@ -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<
|
6
|
-
|
22
|
+
export declare let EditFullPage: React.ForwardRefExoticComponent<EditFullPageProps & React.RefAttributes<HTMLDivElement>>;
|
23
|
+
export {};
|
@@ -12,7 +12,7 @@ import cx from 'classnames';
|
|
12
12
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
13
13
|
import { pkg } from '../../settings.js';
|
14
14
|
|
15
|
-
var _excluded = ["
|
15
|
+
var _excluded = ["className", "children"];
|
16
16
|
|
17
17
|
// Carbon and package components we use.
|
18
18
|
/* TODO: @import(s) of carbon components and other package components. */
|
@@ -42,8 +42,8 @@ var componentName = 'EditFullPage';
|
|
42
42
|
* See usage guidance for further details.
|
43
43
|
*/
|
44
44
|
var EditFullPage = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
45
|
-
var
|
46
|
-
|
45
|
+
var className = _ref.className,
|
46
|
+
children = _ref.children,
|
47
47
|
rest = _objectWithoutProperties(_ref, _excluded);
|
48
48
|
return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
49
49
|
className: cx(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<
|
5
|
-
|
63
|
+
export declare let NoTagsEmptyState: React.ForwardRefExoticComponent<NoTagsEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
64
|
+
export {};
|
@@ -17,11 +17,9 @@ import NoTagsIllustration from '../assets/NoTagsIllustration.js';
|
|
17
17
|
import { defaults } from '../EmptyState.js';
|
18
18
|
|
19
19
|
var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
|
20
|
-
|
21
20
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
22
21
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
23
22
|
var componentName = 'NoTagsEmptyState';
|
24
|
-
|
25
23
|
/**
|
26
24
|
* 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.
|
27
25
|
*/
|
@@ -50,7 +48,7 @@ var NoTagsEmptyState = /*#__PURE__*/React__default.forwardRef(function (_ref, re
|
|
50
48
|
link: link,
|
51
49
|
size: size,
|
52
50
|
subtitle: subtitle,
|
53
|
-
title: title
|
51
|
+
title: title = ''
|
54
52
|
}));
|
55
53
|
});
|
56
54
|
|
@@ -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 UnauthorizedEmptyStateProps {
|
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 UnauthorizedEmptyState: React.ForwardRefExoticComponent<React.RefAttributes<
|
5
|
-
|
63
|
+
export declare let UnauthorizedEmptyState: React.ForwardRefExoticComponent<UnauthorizedEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
64
|
+
export {};
|
@@ -21,7 +21,6 @@ var _excluded = ["action", "className", "illustrationPosition", "illustrationThe
|
|
21
21
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
22
22
|
var blockClass = "".concat(pkg.prefix, "--empty-state");
|
23
23
|
var componentName = 'UnauthorizedEmptyState';
|
24
|
-
|
25
24
|
/**
|
26
25
|
* 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.
|
27
26
|
*/
|
@@ -50,7 +49,7 @@ var UnauthorizedEmptyState = /*#__PURE__*/React__default.forwardRef(function (_r
|
|
50
49
|
link: link,
|
51
50
|
size: size,
|
52
51
|
subtitle: subtitle,
|
53
|
-
title: title
|
52
|
+
title: title || ''
|
54
53
|
}));
|
55
54
|
});
|
56
55
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* Display a full-page error when the requested page is unavailable to the user.
|
3
|
+
* This is typically caused by issues with the requested URL or access permissions.
|
3
4
|
*/
|
4
5
|
export let FullPageError: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
5
6
|
import React from 'react';
|