@carbon/ibm-products 1.4.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +527 -90
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +9 -3
- package/css/index-full-carbon.min.css.map +1 -0
- package/css/index-without-carbon-released-only.css +157 -67
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +3 -3
- package/css/index-without-carbon-released-only.min.css.map +1 -0
- package/css/index-without-carbon.css +468 -84
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +9 -3
- package/css/index-without-carbon.min.css.map +1 -0
- package/css/index.css +470 -86
- package/css/index.css.map +1 -1
- package/css/index.min.css +9 -3
- package/css/index.min.css.map +1 -0
- package/es/components/ActionSet/ActionSet.js +23 -11
- package/es/components/ActionSet/actions.js +25 -17
- package/es/components/AddSelect/AddSelect.js +115 -67
- package/es/components/AddSelect/AddSelectBreadcrumbs.js +56 -0
- package/es/components/AddSelect/AddSelectList.js +94 -0
- package/es/components/AddSelect/AddSelectSidebar.js +110 -0
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +5 -2
- package/es/components/ButtonMenu/ButtonMenu.js +1 -1
- package/es/components/CancelableTextEdit/CancelableTextEdit.js +2 -2
- package/es/components/Card/Card.js +6 -4
- package/es/components/CreateFullPage/CreateFullPage.js +30 -5
- package/es/components/CreateFullPage/CreateFullPageStep.js +40 -32
- package/es/components/CreateInfluencer/CreateInfluencer.js +25 -3
- package/es/components/CreateTearsheet/CreateTearsheet.js +32 -6
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +45 -38
- package/es/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +24 -4
- package/es/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +8 -6
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +154 -0
- package/es/components/DataSpreadsheet/generateData.js +47 -0
- package/es/components/DataSpreadsheet/index.js +7 -0
- package/es/components/EmptyStates/EmptyState.js +1 -1
- package/es/components/EmptyStates/EmptyStateContent.js +2 -2
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
- package/es/components/ExportModal/ExportModal.js +39 -12
- package/es/components/InlineEdit/InlineEdit.js +250 -80
- package/es/components/NotificationsPanel/NotificationsPanel.js +16 -3
- package/es/components/PageHeader/PageHeader.js +9 -6
- package/es/components/PageHeader/PageHeaderTitle.js +10 -6
- package/es/components/SidePanel/SidePanel.js +33 -16
- package/es/components/Tearsheet/Tearsheet.js +1 -1
- package/es/components/Tearsheet/TearsheetNarrow.js +1 -1
- package/es/components/Tearsheet/TearsheetShell.js +4 -5
- package/es/components/WebTerminal/WebTerminal.js +1 -1
- package/es/components/index.js +2 -1
- package/es/global/js/hooks/index.js +1 -0
- package/es/global/js/hooks/useCreateComponentStepChange.js +31 -11
- package/es/global/js/hooks/useResetCreateComponent.js +7 -4
- package/es/global/js/hooks/useRetrieveStepData.js +51 -0
- package/es/global/js/package-settings.js +2 -1
- package/es/global/js/utils/getScrollbarWidth.js +14 -0
- package/es/global/js/utils/lastIndexInArray.js +26 -0
- package/es/settings.js +0 -5
- package/lib/components/ActionSet/ActionSet.js +23 -11
- package/lib/components/ActionSet/actions.js +25 -17
- package/lib/components/AddSelect/AddSelect.js +119 -67
- package/lib/components/AddSelect/AddSelectBreadcrumbs.js +71 -0
- package/lib/components/AddSelect/AddSelectList.js +112 -0
- package/lib/components/AddSelect/AddSelectSidebar.js +122 -0
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +5 -2
- package/lib/components/ButtonMenu/ButtonMenu.js +1 -1
- package/lib/components/CancelableTextEdit/CancelableTextEdit.js +1 -1
- package/lib/components/Card/Card.js +6 -4
- package/lib/components/CreateFullPage/CreateFullPage.js +29 -4
- package/lib/components/CreateFullPage/CreateFullPageStep.js +38 -30
- package/lib/components/CreateInfluencer/CreateInfluencer.js +25 -3
- package/lib/components/CreateTearsheet/CreateTearsheet.js +31 -5
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +43 -36
- package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +22 -2
- package/lib/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +8 -6
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +171 -0
- package/lib/components/DataSpreadsheet/generateData.js +58 -0
- package/lib/components/DataSpreadsheet/index.js +13 -0
- package/lib/components/EmptyStates/EmptyState.js +1 -1
- package/lib/components/EmptyStates/EmptyStateContent.js +2 -2
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
- package/lib/components/ExportModal/ExportModal.js +36 -11
- package/lib/components/InlineEdit/InlineEdit.js +247 -79
- package/lib/components/NotificationsPanel/NotificationsPanel.js +13 -1
- package/lib/components/PageHeader/PageHeader.js +9 -6
- package/lib/components/PageHeader/PageHeaderTitle.js +10 -6
- package/lib/components/SidePanel/SidePanel.js +33 -16
- package/lib/components/Tearsheet/Tearsheet.js +1 -1
- package/lib/components/Tearsheet/TearsheetNarrow.js +1 -1
- package/lib/components/Tearsheet/TearsheetShell.js +3 -4
- package/lib/components/WebTerminal/WebTerminal.js +1 -1
- package/lib/components/index.js +9 -1
- package/lib/global/js/hooks/index.js +8 -0
- package/lib/global/js/hooks/useCreateComponentStepChange.js +31 -11
- package/lib/global/js/hooks/useResetCreateComponent.js +7 -4
- package/lib/global/js/hooks/useRetrieveStepData.js +62 -0
- package/lib/global/js/package-settings.js +2 -1
- package/lib/global/js/utils/getScrollbarWidth.js +23 -0
- package/lib/global/js/utils/lastIndexInArray.js +35 -0
- package/lib/settings.js +0 -6
- package/package.json +27 -25
- package/scss/components/AddSelect/_add-select.scss +59 -5
- package/scss/components/BreadcrumbWithOverflow/_index.scss +1 -1
- package/scss/components/CancelableTextEdit/_cancelable-text-edit.scss +1 -0
- package/scss/components/CancelableTextEdit/_storybook-styles.scss +0 -7
- package/scss/components/CreateInfluencer/_create-influencer.scss +4 -4
- package/scss/components/CreateTearsheet/_create-tearsheet.scss +2 -2
- package/scss/components/CreateTearsheetNarrow/_storybook-styles.scss +0 -6
- package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +79 -0
- package/scss/components/DataSpreadsheet/_index.scss +8 -0
- package/scss/components/DataSpreadsheet/_storybook-styles.scss +6 -0
- package/scss/components/EditSidePanel/_storybook-styles.scss +0 -8
- package/scss/components/InlineEdit/_inline-edit.scss +288 -10
- package/scss/components/InlineEdit/_storybook-styles.scss +12 -6
- package/scss/components/LoadingBar/_storybook-styles.scss +0 -5
- package/scss/components/NotificationsPanel/_notifications-panel.scss +2 -2
- package/scss/components/OptionsTile/_storybook-styles.scss +0 -7
- package/scss/components/PageHeader/_index.scss +1 -1
- package/scss/components/PageHeader/_page-header.scss +4 -1
- package/scss/components/ProductiveCard/_productive-card.scss +0 -4
- package/scss/components/SidePanel/_side-panel.scss +15 -6
- package/scss/components/StatusIcon/_index.scss +1 -1
- package/scss/components/StatusIcon/_status-icon.scss +6 -4
- package/scss/components/TagSet/_index.scss +1 -1
- package/scss/components/UserProfileImage/_index.scss +1 -1
- package/scss/components/UserProfileImage/_user-profile-image.scss +2 -2
- package/scss/components/WebTerminal/_web-terminal.scss +2 -2
- package/scss/components/_index.scss +1 -0
- package/scss/global/styles/_project-settings.scss +5 -1
- package/es/generated/feature-flags/feature-flags.js +0 -15
- package/lib/generated/feature-flags/feature-flags.js +0 -22
- package/scss/generated/feature-flags/_feature-flags.scss +0 -19
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
5
|
-
var _excluded = ["body", "className", "error", "errorMessage", "filename", "inputLabel", "invalidInputText", "loading", "loadingMessage", "onClose", "onRequestSubmit", "open", "preformattedExtensions", "preformattedExtensionsLabel", "primaryButtonText", "secondaryButtonText", "successMessage", "successful", "title", "validExtensions"];
|
5
|
+
var _excluded = ["body", "className", "error", "errorMessage", "filename", "hidePasswordLabel", "inputLabel", "inputType", "invalidInputText", "loading", "loadingMessage", "onClose", "onRequestSubmit", "open", "preformattedExtensions", "preformattedExtensionsLabel", "primaryButtonText", "secondaryButtonText", "showPasswordLabel", "successMessage", "successful", "title", "validExtensions"];
|
6
6
|
|
7
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
8
8
|
|
@@ -15,7 +15,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
15
15
|
// LICENSE file in the root directory of this source tree.
|
16
16
|
//
|
17
17
|
import React, { useState, useRef, forwardRef } from 'react';
|
18
|
-
import { Button, ComposedModal, ModalHeader, ModalFooter, ModalBody, TextInput, RadioButton, RadioButtonGroup, FormGroup, Loading } from 'carbon-components-react';
|
18
|
+
import { Button, ComposedModal, ModalHeader, ModalFooter, ModalBody, TextInput, RadioButton, RadioButtonGroup, FormGroup, Loading, PasswordInput } from 'carbon-components-react';
|
19
19
|
import cx from 'classnames';
|
20
20
|
import { ErrorFilled16, CheckmarkFilled16 } from '@carbon/icons-react';
|
21
21
|
import PropTypes from 'prop-types';
|
@@ -31,7 +31,9 @@ export var ExportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
31
31
|
error = _ref.error,
|
32
32
|
errorMessage = _ref.errorMessage,
|
33
33
|
filename = _ref.filename,
|
34
|
+
hidePasswordLabel = _ref.hidePasswordLabel,
|
34
35
|
inputLabel = _ref.inputLabel,
|
36
|
+
inputType = _ref.inputType,
|
35
37
|
invalidInputText = _ref.invalidInputText,
|
36
38
|
loading = _ref.loading,
|
37
39
|
loadingMessage = _ref.loadingMessage,
|
@@ -42,6 +44,7 @@ export var ExportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
42
44
|
preformattedExtensionsLabel = _ref.preformattedExtensionsLabel,
|
43
45
|
primaryButtonText = _ref.primaryButtonText,
|
44
46
|
secondaryButtonText = _ref.secondaryButtonText,
|
47
|
+
showPasswordLabel = _ref.showPasswordLabel,
|
45
48
|
successMessage = _ref.successMessage,
|
46
49
|
successful = _ref.successful,
|
47
50
|
title = _ref.title,
|
@@ -103,6 +106,17 @@ export var ExportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
103
106
|
var internalId = useRef(uuidv4());
|
104
107
|
var primaryButtonDisabled = loading || !name || hasInvalidExtension();
|
105
108
|
var submitted = loading || error || successful;
|
109
|
+
|
110
|
+
var commonInputProps = _defineProperty({
|
111
|
+
id: "text-input--".concat(internalId.current),
|
112
|
+
value: name,
|
113
|
+
onChange: onNameChangeHandler,
|
114
|
+
labelText: inputLabel,
|
115
|
+
invalid: hasInvalidExtension(),
|
116
|
+
invalidText: invalidInputText,
|
117
|
+
onBlur: onBlurHandler
|
118
|
+
}, 'data-modal-primary-focus', true);
|
119
|
+
|
106
120
|
return /*#__PURE__*/React.createElement(ComposedModal, _extends({}, rest, {
|
107
121
|
className: cx(blockClass, className),
|
108
122
|
"aria-label": title,
|
@@ -134,16 +148,13 @@ export var ExportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
134
148
|
labelText: "".concat(o.extension, " (").concat(o.description, ")"),
|
135
149
|
"data-modal-primary-focus": true
|
136
150
|
});
|
137
|
-
}))) : /*#__PURE__*/React.createElement(
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
onBlur: onBlurHandler,
|
145
|
-
"data-modal-primary-focus": true
|
146
|
-
})), /*#__PURE__*/React.createElement("div", {
|
151
|
+
}))) : /*#__PURE__*/React.createElement("div", {
|
152
|
+
className: "".concat(blockClass, "__input-container")
|
153
|
+
}, inputType === 'text' ? /*#__PURE__*/React.createElement(TextInput, commonInputProps) : /*#__PURE__*/React.createElement(PasswordInput, _extends({}, commonInputProps, {
|
154
|
+
showPasswordLabel: showPasswordLabel,
|
155
|
+
hidePasswordLabel: hidePasswordLabel,
|
156
|
+
tooltipPosition: "left"
|
157
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
147
158
|
className: "".concat(blockClass, "__messaging")
|
148
159
|
}, loading && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Loading, {
|
149
160
|
small: true,
|
@@ -193,11 +204,21 @@ ExportModal.propTypes = {
|
|
193
204
|
*/
|
194
205
|
filename: PropTypes.string.isRequired,
|
195
206
|
|
207
|
+
/**
|
208
|
+
* label text that's displayed when hovering over visibility toggler to hide key
|
209
|
+
*/
|
210
|
+
hidePasswordLabel: PropTypes.string,
|
211
|
+
|
196
212
|
/**
|
197
213
|
* label for the text input
|
198
214
|
*/
|
199
215
|
inputLabel: PropTypes.string,
|
200
216
|
|
217
|
+
/**
|
218
|
+
* specify the type of text input
|
219
|
+
*/
|
220
|
+
inputType: PropTypes.oneOf(['text', 'password']),
|
221
|
+
|
201
222
|
/**
|
202
223
|
* text for an invalid input
|
203
224
|
*/
|
@@ -251,6 +272,11 @@ ExportModal.propTypes = {
|
|
251
272
|
*/
|
252
273
|
secondaryButtonText: PropTypes.string.isRequired,
|
253
274
|
|
275
|
+
/**
|
276
|
+
* label text that's displayed when hovering over visibility toggler to show key
|
277
|
+
*/
|
278
|
+
showPasswordLabel: PropTypes.string,
|
279
|
+
|
254
280
|
/**
|
255
281
|
* messaging to display if the export was successful
|
256
282
|
*/
|
@@ -272,6 +298,7 @@ ExportModal.propTypes = {
|
|
272
298
|
validExtensions: PropTypes.array
|
273
299
|
};
|
274
300
|
ExportModal.defaultProps = {
|
301
|
+
inputType: 'text',
|
275
302
|
preformattedExtensions: [],
|
276
303
|
validExtensions: []
|
277
304
|
};
|
@@ -2,11 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
5
|
-
var _excluded = ["className", "disabled", "editDescription", "
|
6
|
-
|
7
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
8
|
-
|
9
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
5
|
+
var _excluded = ["cancelDescription", "className", "disabled", "editDescription", "editVisibleOnHoverOnly", "id", "invalid", "invalidText", "labelText", "light", "onCancel", "onSave", "onChange", "placeholder", "saveDescription", "size", "value", "warn", "warnText"];
|
10
6
|
|
11
7
|
/**
|
12
8
|
* Copyright IBM Corp. 2022, 2022
|
@@ -15,7 +11,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
15
11
|
* LICENSE file in the root directory of this source tree.
|
16
12
|
*/
|
17
13
|
// Import portions of React that are needed.
|
18
|
-
import React, { useState } from 'react'; // Other standard imports.
|
14
|
+
import React, { useRef, useState } from 'react'; // Other standard imports.
|
19
15
|
|
20
16
|
import PropTypes from 'prop-types';
|
21
17
|
import cx from 'classnames';
|
@@ -24,9 +20,8 @@ import { pkg, carbon } from '../../settings'; // Carbon and package components w
|
|
24
20
|
|
25
21
|
/* TODO: @import(s) of carbon components and other package components. */
|
26
22
|
|
27
|
-
import { CancelableTextEdit } from '../';
|
28
23
|
import { Button } from 'carbon-components-react';
|
29
|
-
import { Edit16, EditOff16 } from '@carbon/icons-react'; // The block part of our conventional BEM class names (blockClass__E--M).
|
24
|
+
import { Close16, Edit16, EditOff16, Checkmark16, WarningFilled16, WarningAltFilled16 } from '@carbon/icons-react'; // The block part of our conventional BEM class names (blockClass__E--M).
|
30
25
|
|
31
26
|
var blockClass = "".concat(pkg.prefix, "--inline-edit");
|
32
27
|
var componentName = 'InlineEdit'; // NOTE: the component SCSS is not imported here: it is rolled up separately.
|
@@ -35,83 +30,249 @@ var componentName = 'InlineEdit'; // NOTE: the component SCSS is not imported he
|
|
35
30
|
* TODO: A description of the component.
|
36
31
|
*/
|
37
32
|
|
38
|
-
export var InlineEdit = /*#__PURE__*/React.forwardRef(function (_ref,
|
39
|
-
var
|
33
|
+
export var InlineEdit = /*#__PURE__*/React.forwardRef(function (_ref, refIn) {
|
34
|
+
var _cx, _cx3;
|
35
|
+
|
36
|
+
var cancelDescription = _ref.cancelDescription,
|
37
|
+
className = _ref.className,
|
40
38
|
disabled = _ref.disabled,
|
41
39
|
editDescription = _ref.editDescription,
|
40
|
+
editVisibleOnHoverOnly = _ref.editVisibleOnHoverOnly,
|
42
41
|
id = _ref.id,
|
43
|
-
inline = _ref.inline,
|
44
42
|
invalid = _ref.invalid,
|
45
43
|
invalidText = _ref.invalidText,
|
46
44
|
labelText = _ref.labelText,
|
45
|
+
light = _ref.light,
|
46
|
+
onCancel = _ref.onCancel,
|
47
|
+
onSave = _ref.onSave,
|
47
48
|
onChange = _ref.onChange,
|
48
|
-
|
49
|
-
onRevert = _ref.onRevert,
|
50
|
-
revertDescription = _ref.revertDescription,
|
49
|
+
placeholder = _ref.placeholder,
|
51
50
|
saveDescription = _ref.saveDescription,
|
52
|
-
saveDisabled = _ref.saveDisabled,
|
53
51
|
size = _ref.size,
|
54
52
|
value = _ref.value,
|
55
53
|
warn = _ref.warn,
|
56
54
|
warnText = _ref.warnText,
|
57
55
|
rest = _objectWithoutProperties(_ref, _excluded);
|
58
56
|
|
57
|
+
var refInput = useRef(null);
|
58
|
+
var localRef = useRef(null);
|
59
|
+
var ref = refIn || localRef;
|
60
|
+
|
59
61
|
var _useState = useState(false),
|
60
62
|
_useState2 = _slicedToArray(_useState, 2),
|
61
63
|
editing = _useState2[0],
|
62
64
|
setEditing = _useState2[1];
|
63
65
|
|
64
|
-
var
|
65
|
-
|
66
|
-
|
67
|
-
|
66
|
+
var _useState3 = useState(value),
|
67
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
68
|
+
internalValue = _useState4[0],
|
69
|
+
setInternalValue = _useState4[1];
|
70
|
+
|
71
|
+
var showValidation = invalid || warn;
|
72
|
+
var validationText = invalidText || warnText;
|
73
|
+
var validationIcon = showValidation ? invalid ? /*#__PURE__*/React.createElement(WarningFilled16, null) : /*#__PURE__*/React.createElement(WarningAltFilled16, null) : null;
|
74
|
+
|
75
|
+
var doSetEditing = function doSetEditing(value) {
|
76
|
+
if (value === false) {
|
77
|
+
// move scroll to start
|
78
|
+
refInput.current.scrollLeft = 0;
|
79
|
+
}
|
80
|
+
|
81
|
+
setEditing(!disabled && value);
|
68
82
|
};
|
69
83
|
|
70
|
-
var
|
71
|
-
|
72
|
-
|
84
|
+
var handleEdit = function handleEdit(ev) {
|
85
|
+
if (!disabled) {
|
86
|
+
var rightOfInput = ev.currentTarget.classList.contains("".concat(blockClass, "__edit")) || ev.target.classList.contains("".concat(blockClass, "__after-input-elements"));
|
87
|
+
var leftOfInput = ev.currentTarget = ev.target.classList.contains("".concat(blockClass)); // clicking on the content editable element should not set either of these to true
|
88
|
+
|
89
|
+
if (rightOfInput || leftOfInput) {
|
90
|
+
doSetEditing(true);
|
91
|
+
setTimeout(function () {
|
92
|
+
refInput.current.focus(); // select all the content
|
93
|
+
|
94
|
+
document.getSelection().selectAllChildren(refInput.current);
|
95
|
+
|
96
|
+
if (rightOfInput) {
|
97
|
+
document.getSelection().collapseToEnd();
|
98
|
+
refInput.current.scrollLeft = 9999; // never going to get there but ensures at end.
|
99
|
+
} else {
|
100
|
+
document.getSelection().collapseToStart();
|
101
|
+
refInput.current.scrollLeft = 0; // scroll to start
|
102
|
+
}
|
103
|
+
}, 0);
|
104
|
+
}
|
105
|
+
}
|
106
|
+
};
|
107
|
+
|
108
|
+
var handleFocus = function handleFocus(ev) {
|
109
|
+
ev.preventDefault();
|
110
|
+
|
111
|
+
if (!editing && ev.target.classList.contains("".concat(blockClass, "__input"))) {
|
112
|
+
doSetEditing(true);
|
113
|
+
}
|
114
|
+
};
|
115
|
+
|
116
|
+
var handleSave = function handleSave() {
|
117
|
+
doSetEditing(false);
|
118
|
+
document.getSelection().removeAllRanges();
|
119
|
+
|
120
|
+
if (onSave) {
|
121
|
+
onSave(refInput.current.innerText);
|
122
|
+
}
|
73
123
|
};
|
74
124
|
|
75
|
-
var
|
76
|
-
|
77
|
-
|
125
|
+
var handleInput = function handleInput() {
|
126
|
+
setInternalValue(refInput.current.innerText);
|
127
|
+
|
128
|
+
if (onChange) {
|
129
|
+
onChange(refInput.current.innerText);
|
130
|
+
}
|
131
|
+
};
|
132
|
+
|
133
|
+
var handlePaste = function handlePaste(ev) {
|
134
|
+
ev.preventDefault(); // Get clipboard as plain text
|
135
|
+
|
136
|
+
var text = (ev.clipboardData || window.clipboardData).getData('text/plain'); // remove \n
|
137
|
+
|
138
|
+
var sanitizedText = text.replaceAll(/\n/g, '') // remove carriage returns
|
139
|
+
.replaceAll(/\t/g, ' '); // replace tab with two spaces
|
140
|
+
|
141
|
+
if (document.queryCommandSupported('insertText')) {
|
142
|
+
document.execCommand('insertText', false, sanitizedText);
|
143
|
+
} else {
|
144
|
+
// Insert text at the current position of caret
|
145
|
+
var range = document.getSelection().getRangeAt(0);
|
146
|
+
range.deleteContents();
|
147
|
+
var textNode = document.createTextNode(sanitizedText);
|
148
|
+
range.insertNode(textNode); // move selection end of textNode
|
149
|
+
|
150
|
+
range.selectNodeContents(textNode);
|
151
|
+
range.collapse(false); // remove existing range
|
152
|
+
|
153
|
+
var selection = document.getSelection();
|
154
|
+
selection.removeAllRanges(); // set the new range
|
155
|
+
|
156
|
+
selection.addRange(range);
|
157
|
+
}
|
158
|
+
};
|
159
|
+
|
160
|
+
var handleCancel = function handleCancel() {
|
161
|
+
refInput.current.innerText = value;
|
162
|
+
handleInput(value);
|
163
|
+
doSetEditing(false);
|
164
|
+
document.getSelection().removeAllRanges();
|
165
|
+
|
166
|
+
if (onCancel) {
|
167
|
+
onCancel(value);
|
168
|
+
}
|
78
169
|
};
|
79
170
|
|
80
|
-
var
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
171
|
+
var handleBlur = function handleBlur(ev) {
|
172
|
+
if (!ref.current.contains(ev.relatedTarget)) {
|
173
|
+
handleSave();
|
174
|
+
}
|
175
|
+
};
|
176
|
+
|
177
|
+
var handleKeyDown = function handleKeyDown(ev) {
|
178
|
+
if (ev.key === 'Enter') {
|
179
|
+
ev.preventDefault();
|
180
|
+
refInput.current.blur(); // will cause save
|
181
|
+
}
|
182
|
+
};
|
183
|
+
/*
|
184
|
+
The HTML is structured as follows:
|
185
|
+
<container>
|
186
|
+
<!-- margin left of input to match Carbon -->
|
187
|
+
<content-editable>
|
188
|
+
<-- margin right of input space for after-input-elements -->
|
189
|
+
<after-input-elements>
|
190
|
+
</container>
|
191
|
+
NOTE:
|
192
|
+
- An input is not used as this would not permit a heading tag e.g. <h2>.
|
193
|
+
- Some padding is added to the left 16px standard for a Carbon text input
|
194
|
+
- The after-input-elements are position absolute with a margin to on the input to reserve space. Using inline-flex
|
195
|
+
- does not measure space properly for the input otherwise.
|
196
|
+
- The content editable is not expected to change size when buttons are added, to ensure the text does not move space
|
197
|
+
is reserved up front for buttons and invalid icon. Mostly this is only noticed if the width of the component is not 100%.
|
198
|
+
which can be shown by setting inlineEditFullWidth to false in storybook.
|
199
|
+
In making content-editable behave like an input of type text we have to account for.
|
200
|
+
- Enforcing a single line
|
201
|
+
- Pasting of non-text e.g. html or text with carriage returns
|
202
|
+
- The padding and border not hiding typed in text.
|
203
|
+
- Placing the cursor at the start or end depending on area clicked (before for left-padding)
|
204
|
+
*/
|
205
|
+
|
206
|
+
|
207
|
+
var toolbarAnimation = true;
|
208
|
+
return (
|
209
|
+
/*#__PURE__*/
|
210
|
+
// eslint-disable-next-line
|
211
|
+
React.createElement("div", {
|
212
|
+
className: cx(blockClass, // Apply the block class to the main HTML element
|
213
|
+
className, // Apply any supplied class names to the main HTML element.
|
214
|
+
"".concat(blockClass, "--").concat(size), (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "--disabled"), disabled), _defineProperty(_cx, "".concat(blockClass, "--editing"), editing), _defineProperty(_cx, "".concat(blockClass, "--invalid"), invalid), _defineProperty(_cx, "".concat(blockClass, "--warn"), warn), _defineProperty(_cx, "".concat(blockClass, "--light"), light), _defineProperty(_cx, "".concat(blockClass, "--overflows"), refInput.current && refInput.current.scrollWidth > refInput.current.offsetWidth), _cx)),
|
215
|
+
onClick: handleEdit // disabled eslint for click handler
|
216
|
+
,
|
217
|
+
onBlur: handleBlur,
|
218
|
+
ref: ref
|
219
|
+
}, /*#__PURE__*/React.createElement("div", _extends({}, rest, getDevtoolsProps(componentName), {
|
220
|
+
id: id,
|
221
|
+
size: size,
|
222
|
+
className: cx("".concat(blockClass, "__input"), _defineProperty({}, "".concat(blockClass, "__input--empty"), refInput.current && refInput.current.innerText.length === 0)),
|
223
|
+
contentEditable: true,
|
224
|
+
"aria-label": labelText,
|
225
|
+
role: "textbox",
|
226
|
+
tabIndex: disabled ? -1 : 0,
|
227
|
+
onFocus: handleFocus,
|
228
|
+
onInput: handleInput,
|
229
|
+
onKeyDown: handleKeyDown,
|
230
|
+
onPaste: handlePaste,
|
231
|
+
suppressContentEditableWarning: true,
|
232
|
+
ref: refInput,
|
233
|
+
"data-placeholder": placeholder !== null && placeholder !== void 0 ? placeholder : labelText
|
234
|
+
}), value), /*#__PURE__*/React.createElement("div", {
|
235
|
+
className: cx("".concat(blockClass, "__after-input-elements")) // tabindex -1 fixes blur target test when clicking on after-input-elements background
|
236
|
+
,
|
237
|
+
tabIndex: "-1"
|
238
|
+
}, /*#__PURE__*/React.createElement("div", {
|
239
|
+
className: "".concat(blockClass, "__ellipsis"),
|
240
|
+
"aria-hidden": !editing
|
241
|
+
}, "\u2026"), /*#__PURE__*/React.createElement("div", {
|
242
|
+
className: cx("".concat(blockClass, "__toolbar"), (_cx3 = {}, _defineProperty(_cx3, "".concat(blockClass, "__toolbar--animation"), toolbarAnimation), _defineProperty(_cx3, "".concat(blockClass, "__toolbar--saveable"), refInput.current && value !== internalValue), _cx3))
|
243
|
+
}, showValidation && /*#__PURE__*/React.createElement("div", {
|
244
|
+
className: "".concat(blockClass, "__validation-icon")
|
245
|
+
}, validationIcon), editing ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
246
|
+
className: "".concat(blockClass, "__cancel"),
|
247
|
+
kind: "ghost",
|
248
|
+
hasIconOnly: true,
|
249
|
+
iconDescription: cancelDescription,
|
250
|
+
onClick: handleCancel,
|
251
|
+
renderIcon: Close16
|
252
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
253
|
+
className: "".concat(blockClass, "__save"),
|
254
|
+
kind: "ghost",
|
255
|
+
hasIconOnly: true,
|
256
|
+
iconDescription: saveDescription,
|
257
|
+
onClick: handleSave,
|
258
|
+
renderIcon: Checkmark16,
|
259
|
+
disabled: value === internalValue
|
260
|
+
})) : /*#__PURE__*/React.createElement(Button, {
|
261
|
+
"aria-hidden": "true",
|
262
|
+
className: cx("".concat(blockClass, "__edit"), _defineProperty({}, "".concat(blockClass, "__edit--hover-visible"), editVisibleOnHoverOnly)),
|
263
|
+
kind: "ghost",
|
264
|
+
hasIconOnly: true,
|
265
|
+
iconDescription: editDescription,
|
266
|
+
onClick: handleEdit,
|
267
|
+
renderIcon: disabled ? EditOff16 : Edit16,
|
268
|
+
disabled: disabled,
|
269
|
+
tabIndex: -1
|
270
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
271
|
+
className: cx("".concat(blockClass, "__disabled-cover"))
|
272
|
+
}), showValidation && validationText && validationText.length > 0 && /*#__PURE__*/React.createElement("div", {
|
273
|
+
className: "".concat(blockClass, "__validation-text ").concat(carbon.prefix, "--form-requirement")
|
274
|
+
}, validationText))
|
275
|
+
);
|
115
276
|
}); // Return a placeholder if not released and not enabled by feature flag
|
116
277
|
|
117
278
|
InlineEdit = pkg.checkComponentEnabled(InlineEdit, componentName); // The display name of the component, used by React. Note that displayName
|
@@ -122,6 +283,11 @@ InlineEdit.displayName = componentName; // The types and DocGen commentary for t
|
|
122
283
|
// See https://www.npmjs.com/package/prop-types#usage.
|
123
284
|
|
124
285
|
InlineEdit.propTypes = {
|
286
|
+
/**
|
287
|
+
* label for cancel button
|
288
|
+
*/
|
289
|
+
cancelDescription: PropTypes.string.isRequired,
|
290
|
+
|
125
291
|
/**
|
126
292
|
* Provide an optional class to be applied to the containing node.
|
127
293
|
*/
|
@@ -138,16 +304,15 @@ InlineEdit.propTypes = {
|
|
138
304
|
editDescription: PropTypes.string.isRequired,
|
139
305
|
|
140
306
|
/**
|
141
|
-
*
|
307
|
+
* In some scenarios the edit icon only needs to be shown on hover. These cases are where continual visibility of
|
308
|
+
* the edit icon is redundant. E.g. a spreadsheet a property panel.
|
142
309
|
*/
|
143
|
-
|
144
|
-
|
145
|
-
/* TODO: add types and DocGen for all props. */
|
310
|
+
editVisibleOnHoverOnly: PropTypes.bool,
|
146
311
|
|
147
312
|
/**
|
148
|
-
|
149
|
-
|
150
|
-
|
313
|
+
* ID for inline edit
|
314
|
+
*/
|
315
|
+
id: PropTypes.string,
|
151
316
|
|
152
317
|
/**
|
153
318
|
* set invalid state for input
|
@@ -165,34 +330,38 @@ InlineEdit.propTypes = {
|
|
165
330
|
labelText: PropTypes.string,
|
166
331
|
|
167
332
|
/**
|
168
|
-
*
|
333
|
+
* change background to light version (mimic React TextInput)
|
169
334
|
*/
|
170
|
-
|
335
|
+
light: PropTypes.bool,
|
171
336
|
|
172
337
|
/**
|
173
|
-
* method called on
|
338
|
+
* method called on cancel event
|
174
339
|
*/
|
175
|
-
|
340
|
+
onCancel: PropTypes.func,
|
176
341
|
|
177
342
|
/**
|
178
|
-
* method called on
|
343
|
+
* method called on input event (it's a React thing onChange behaves like on input).
|
344
|
+
*
|
345
|
+
* NOTE: caller to handle invalid/warn states and associated text
|
179
346
|
*/
|
180
|
-
|
347
|
+
onChange: PropTypes.func,
|
181
348
|
|
182
349
|
/**
|
183
|
-
*
|
350
|
+
* method called on change event
|
351
|
+
*
|
352
|
+
* NOTE: caller to handle invalid/warn states and associated text
|
184
353
|
*/
|
185
|
-
|
354
|
+
onSave: PropTypes.func,
|
186
355
|
|
187
356
|
/**
|
188
|
-
*
|
357
|
+
* placeholder for text input
|
189
358
|
*/
|
190
|
-
|
359
|
+
placeholder: PropTypes.string,
|
191
360
|
|
192
361
|
/**
|
193
|
-
*
|
362
|
+
* label for save button
|
194
363
|
*/
|
195
|
-
|
364
|
+
saveDescription: PropTypes.string.isRequired,
|
196
365
|
|
197
366
|
/**
|
198
367
|
* vertical size of control
|
@@ -219,6 +388,7 @@ InlineEdit.propTypes = {
|
|
219
388
|
// component needs to make a choice or assumption when a prop is not supplied.
|
220
389
|
|
221
390
|
InlineEdit.defaultProps = {
|
222
|
-
|
391
|
+
light: true,
|
392
|
+
// defaults to true to reflect design
|
223
393
|
size: 'md'
|
224
394
|
};
|
@@ -5,7 +5,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
5
5
|
var _excluded = ["className", "data", "daysAgoText", "dismissAllLabel", "dismissSingleNotificationIconDescription", "doNotDisturbDefaultToggled", "doNotDisturbLabel", "emptyStateLabel", "hoursAgoText", "hourAgoText", "minuteAgoText", "minutesAgoText", "monthsAgoText", "monthAgoText", "nowText", "onClickOutside", "onDismissAllNotifications", "onDismissSingleNotification", "onDoNotDisturbChange", "onSettingsClick", "onViewAllClick", "open", "previousLabel", "readLessLabel", "readMoreLabel", "secondsAgoText", "settingsIconDescription", "title", "todayLabel", "viewAllLabel", "yearsAgoText", "yearAgoText", "yesterdayAtText", "yesterdayLabel"];
|
6
6
|
|
7
7
|
/**
|
8
|
-
* Copyright IBM Corp. 2020,
|
8
|
+
* Copyright IBM Corp. 2020, 2022
|
9
9
|
*
|
10
10
|
* This source code is licensed under the Apache-2.0 license found in the
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
@@ -22,7 +22,8 @@ import { timeAgo } from './utils';
|
|
22
22
|
import { NotificationsEmptyState } from '../EmptyStates/NotificationsEmptyState'; // Carbon and package components we use.
|
23
23
|
|
24
24
|
import { Button, Link, Toggle } from 'carbon-components-react';
|
25
|
-
import { ErrorFilled16, WarningAltFilled16, CheckmarkFilled16, InformationSquareFilled16, ChevronDown16, Close16, Settings16 } from '@carbon/icons-react';
|
25
|
+
import { ErrorFilled16, WarningAltFilled16, CheckmarkFilled16, InformationSquareFilled16, ChevronDown16, Close16, Settings16 } from '@carbon/icons-react';
|
26
|
+
import { usePreviousValue } from '../../global/js/hooks'; // The block part of our conventional BEM class names (blockClass__E--M).
|
26
27
|
|
27
28
|
var componentName = 'NotificationsPanel';
|
28
29
|
var blockClass = "".concat(pkg.prefix, "--notifications-panel");
|
@@ -75,6 +76,12 @@ export var NotificationsPanel = /*#__PURE__*/React.forwardRef(function (_ref, re
|
|
75
76
|
allNotifications = _useState4[0],
|
76
77
|
setAllNotifications = _useState4[1];
|
77
78
|
|
79
|
+
var previousState = usePreviousValue({
|
80
|
+
open: open
|
81
|
+
});
|
82
|
+
var reducedMotion = window && window.matchMedia ? window.matchMedia('(prefers-reduced-motion: reduce)') : {
|
83
|
+
matches: true
|
84
|
+
};
|
78
85
|
useEffect(function () {
|
79
86
|
// Set the notifications passed to the state within this component
|
80
87
|
setAllNotifications(data);
|
@@ -94,6 +101,12 @@ export var NotificationsPanel = /*#__PURE__*/React.forwardRef(function (_ref, re
|
|
94
101
|
!open && setRender(false);
|
95
102
|
};
|
96
103
|
|
104
|
+
useEffect(function () {
|
105
|
+
if (!open && previousState !== null && previousState !== void 0 && previousState.open && reducedMotion.matches) {
|
106
|
+
setRender(false);
|
107
|
+
}
|
108
|
+
}, [open, reducedMotion.matches, previousState === null || previousState === void 0 ? void 0 : previousState.open]);
|
109
|
+
|
97
110
|
var sortChronologically = function sortChronologically(arr) {
|
98
111
|
if (!arr || arr && !arr.length) {
|
99
112
|
return;
|
@@ -233,7 +246,7 @@ export var NotificationsPanel = /*#__PURE__*/React.forwardRef(function (_ref, re
|
|
233
246
|
id: blockClass,
|
234
247
|
className: cx(blockClass, className, "".concat(blockClass, "__container")),
|
235
248
|
style: {
|
236
|
-
animation: "".concat(open ? '
|
249
|
+
animation: !reducedMotion.matches ? "".concat(open ? 'fade-in 250ms' : 'fade-out 250ms') : null
|
237
250
|
},
|
238
251
|
onAnimationEnd: onAnimationEnd,
|
239
252
|
ref: ref || notificationPanelRef
|
@@ -361,16 +361,17 @@ export var PageHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
361
361
|
}, /*#__PURE__*/React.createElement("div", {
|
362
362
|
className: "".concat(blockClass, "__non-navigation-row-content")
|
363
363
|
}, hasBreadcrumbRow ? /*#__PURE__*/React.createElement(Row, {
|
364
|
-
className: cx("".concat(blockClass, "__breadcrumb-row"), (_cx2 = {}, _defineProperty(_cx2, "".concat(blockClass, "__breadcrumb-row--next-to-tabs"), nextToTabsCheck()), _defineProperty(_cx2, "".concat(blockClass, "__breadcrumb-row--has-breadcrumbs"), breadcrumbs), _defineProperty(_cx2, "".concat(blockClass, "__breadcrumb-row--has-action-bar"), hasActionBar || widthIsNarrow), _defineProperty(_cx2, "".concat(blockClass, "__has-page-actions-without-action-bar"), !hasActionBar && !widthIsNarrow && pageActions), _cx2))
|
364
|
+
className: cx("".concat(blockClass, "__breadcrumb-row"), (_cx2 = {}, _defineProperty(_cx2, "".concat(blockClass, "__breadcrumb-row--next-to-tabs"), nextToTabsCheck()), _defineProperty(_cx2, "".concat(blockClass, "__breadcrumb-row--has-breadcrumbs"), breadcrumbs || breadcrumbItemForTitle), _defineProperty(_cx2, "".concat(blockClass, "__breadcrumb-row--has-action-bar"), hasActionBar || widthIsNarrow), _defineProperty(_cx2, "".concat(blockClass, "__has-page-actions-without-action-bar"), !hasActionBar && !widthIsNarrow && pageActions), _cx2))
|
365
365
|
}, /*#__PURE__*/React.createElement("div", {
|
366
366
|
className: "".concat(blockClass, "__breadcrumb-row--container")
|
367
367
|
}, /*#__PURE__*/React.createElement(Column, {
|
368
368
|
className: cx("".concat(blockClass, "__breadcrumb-column"), _defineProperty({}, "".concat(blockClass, "__breadcrumb-column--background"), !!breadcrumbs || hasActionBar || widthIsNarrow))
|
369
|
-
}, breadcrumbs ? /*#__PURE__*/React.createElement(BreadcrumbWithOverflow, {
|
369
|
+
}, breadcrumbs || breadcrumbItemForTitle ? /*#__PURE__*/React.createElement(BreadcrumbWithOverflow, {
|
370
370
|
className: "".concat(blockClass, "__breadcrumb"),
|
371
371
|
noTrailingSlash: !!title,
|
372
372
|
overflowAriaLabel: breadcrumbOverflowAriaLabel,
|
373
|
-
breadcrumbs: breadcrumbs
|
373
|
+
breadcrumbs: breadcrumbs && breadcrumbItemForTitle ? breadcrumbs.concat(breadcrumbItemForTitle) : breadcrumbItemForTitle ? [breadcrumbItemForTitle] : breadcrumbs // breadcrumbs may be null or undefined
|
374
|
+
|
374
375
|
}) : null), /*#__PURE__*/React.createElement(Column, {
|
375
376
|
className: cx(["".concat(blockClass, "__action-bar-column ").concat(blockClass, "__action-bar-column--background"), (_ref7 = {}, _defineProperty(_ref7, "".concat(blockClass, "__action-bar-column--has-page-actions"), pageActions), _defineProperty(_ref7, "".concat(blockClass, "__action-bar-column--influenced-by-collapse-button"), spaceForCollapseButton), _ref7)])
|
376
377
|
}, /*#__PURE__*/React.createElement("div", {
|
@@ -766,9 +767,10 @@ PageHeader.propTypes = _objectSpread({
|
|
766
767
|
* - text: title string
|
767
768
|
* - icon: optional icon
|
768
769
|
* - loading: boolean shows loading indicator if true
|
769
|
-
* - onChange: function to process
|
770
|
+
* - onChange: function to process the live value (React change === HTML Input)
|
771
|
+
* - onSave: function to process a confirmed change
|
770
772
|
* - editableLabel: label for edit required if onChange supplied
|
771
|
-
* -
|
773
|
+
* - cancelDescription: label for edit cancel button
|
772
774
|
* - saveDescription: label for edit save button
|
773
775
|
* - Object containing user defined contents. These must fit within the area defined for the title in both main part of the header and the breadcrumb.
|
774
776
|
* - content: title or name of current location shown in main part of page header
|
@@ -786,7 +788,8 @@ PageHeader.propTypes = _objectSpread({
|
|
786
788
|
id: PropTypes.string,
|
787
789
|
// .isRequired.if(inlineEditRequired),
|
788
790
|
onChange: PropTypes.func,
|
789
|
-
|
791
|
+
onSave: PropTypes.func,
|
792
|
+
cancelDescription: PropTypes.string,
|
790
793
|
//.isRequired.if(inlineEditRequired),
|
791
794
|
saveDescription: PropTypes.string //.isRequired.if(inlineEditRequired),
|
792
795
|
// Update docgen if changed
|