@atlaskit/inline-edit 13.7.8 → 13.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/inline-edit.js +35 -32
- package/dist/es2019/inline-edit.js +4 -2
- package/dist/esm/inline-edit.js +35 -32
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
package/dist/cjs/inline-edit.js
CHANGED
|
@@ -33,7 +33,7 @@ var fieldStyles = (0, _react2.css)({
|
|
|
33
33
|
var analyticsAttributes = {
|
|
34
34
|
componentName: 'inlineEdit',
|
|
35
35
|
packageName: "@atlaskit/inline-edit",
|
|
36
|
-
packageVersion: "13.7.
|
|
36
|
+
packageVersion: "13.7.9"
|
|
37
37
|
};
|
|
38
38
|
var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
39
39
|
var _props$startWithEditV = props.startWithEditViewOpen,
|
|
@@ -207,38 +207,41 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
207
207
|
}, function (_ref2) {
|
|
208
208
|
var fieldProps = _ref2.fieldProps,
|
|
209
209
|
error = _ref2.error;
|
|
210
|
-
return (
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
210
|
+
return (
|
|
211
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
212
|
+
(0, _react2.jsx)("div", {
|
|
213
|
+
css: fieldStyles,
|
|
214
|
+
onBlur: function onBlur(e) {
|
|
215
|
+
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
216
|
+
onEditViewWrapperBlur(fieldProps.isInvalid, onSubmit, formRef);
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
onFocus: onEditViewWrapperFocus
|
|
220
|
+
}, editView(_objectSpread(_objectSpread({}, fieldProps), {}, {
|
|
221
|
+
errorMessage: error
|
|
222
|
+
}), editViewRef), !hideActionButtons ? (0, _react2.jsx)(_buttons.default, {
|
|
223
|
+
testId: testId,
|
|
224
|
+
cancelButtonLabel: cancelButtonLabel,
|
|
225
|
+
confirmButtonLabel: confirmButtonLabel,
|
|
226
|
+
onMouseDown: function onMouseDown() {
|
|
227
|
+
/**
|
|
228
|
+
* Prevents focus on edit button only if mouse is used to click button, but not when keyboard is used
|
|
229
|
+
*/
|
|
230
|
+
doNotFocusOnEditButton();
|
|
231
|
+
},
|
|
232
|
+
onCancelClick: function onCancelClick(e) {
|
|
233
|
+
reset();
|
|
234
|
+
_onCancelClick(e);
|
|
215
235
|
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Prevents focus on edit button only if mouse is used to click button, but not when keyboard is used
|
|
227
|
-
*/
|
|
228
|
-
doNotFocusOnEditButton();
|
|
229
|
-
},
|
|
230
|
-
onCancelClick: function onCancelClick(e) {
|
|
231
|
-
reset();
|
|
232
|
-
_onCancelClick(e);
|
|
233
|
-
}
|
|
234
|
-
}) :
|
|
235
|
-
/**
|
|
236
|
-
* This is to allow Ctrl + Enter to submit without action buttons
|
|
237
|
-
*/
|
|
238
|
-
(0, _react2.jsx)(_pressable.default, {
|
|
239
|
-
hidden: true,
|
|
240
|
-
type: "submit"
|
|
241
|
-
}, (0, _react2.jsx)(_visuallyHidden.default, null, "Submit")));
|
|
236
|
+
}) :
|
|
237
|
+
/**
|
|
238
|
+
* This is to allow Ctrl + Enter to submit without action buttons
|
|
239
|
+
*/
|
|
240
|
+
(0, _react2.jsx)(_pressable.default, {
|
|
241
|
+
hidden: true,
|
|
242
|
+
type: "submit"
|
|
243
|
+
}, (0, _react2.jsx)(_visuallyHidden.default, null, "Submit")))
|
|
244
|
+
);
|
|
242
245
|
}) :
|
|
243
246
|
/**
|
|
244
247
|
* Field is used here only for the label and spacing
|
|
@@ -22,7 +22,7 @@ const fieldStyles = css({
|
|
|
22
22
|
const analyticsAttributes = {
|
|
23
23
|
componentName: 'inlineEdit',
|
|
24
24
|
packageName: "@atlaskit/inline-edit",
|
|
25
|
-
packageVersion: "13.7.
|
|
25
|
+
packageVersion: "13.7.9"
|
|
26
26
|
};
|
|
27
27
|
const InnerInlineEdit = props => {
|
|
28
28
|
const {
|
|
@@ -185,7 +185,9 @@ const InnerInlineEdit = props => {
|
|
|
185
185
|
}, ({
|
|
186
186
|
fieldProps,
|
|
187
187
|
error
|
|
188
|
-
}) =>
|
|
188
|
+
}) =>
|
|
189
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
190
|
+
jsx("div", {
|
|
189
191
|
css: fieldStyles,
|
|
190
192
|
onBlur: e => {
|
|
191
193
|
if (!e.currentTarget.contains(e.relatedTarget)) {
|
package/dist/esm/inline-edit.js
CHANGED
|
@@ -26,7 +26,7 @@ var fieldStyles = css({
|
|
|
26
26
|
var analyticsAttributes = {
|
|
27
27
|
componentName: 'inlineEdit',
|
|
28
28
|
packageName: "@atlaskit/inline-edit",
|
|
29
|
-
packageVersion: "13.7.
|
|
29
|
+
packageVersion: "13.7.9"
|
|
30
30
|
};
|
|
31
31
|
var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
32
32
|
var _props$startWithEditV = props.startWithEditViewOpen,
|
|
@@ -200,38 +200,41 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
200
200
|
}, function (_ref2) {
|
|
201
201
|
var fieldProps = _ref2.fieldProps,
|
|
202
202
|
error = _ref2.error;
|
|
203
|
-
return
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
203
|
+
return (
|
|
204
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
205
|
+
jsx("div", {
|
|
206
|
+
css: fieldStyles,
|
|
207
|
+
onBlur: function onBlur(e) {
|
|
208
|
+
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
209
|
+
onEditViewWrapperBlur(fieldProps.isInvalid, onSubmit, formRef);
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
onFocus: onEditViewWrapperFocus
|
|
213
|
+
}, editView(_objectSpread(_objectSpread({}, fieldProps), {}, {
|
|
214
|
+
errorMessage: error
|
|
215
|
+
}), editViewRef), !hideActionButtons ? jsx(Buttons, {
|
|
216
|
+
testId: testId,
|
|
217
|
+
cancelButtonLabel: cancelButtonLabel,
|
|
218
|
+
confirmButtonLabel: confirmButtonLabel,
|
|
219
|
+
onMouseDown: function onMouseDown() {
|
|
220
|
+
/**
|
|
221
|
+
* Prevents focus on edit button only if mouse is used to click button, but not when keyboard is used
|
|
222
|
+
*/
|
|
223
|
+
doNotFocusOnEditButton();
|
|
224
|
+
},
|
|
225
|
+
onCancelClick: function onCancelClick(e) {
|
|
226
|
+
reset();
|
|
227
|
+
_onCancelClick(e);
|
|
208
228
|
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Prevents focus on edit button only if mouse is used to click button, but not when keyboard is used
|
|
220
|
-
*/
|
|
221
|
-
doNotFocusOnEditButton();
|
|
222
|
-
},
|
|
223
|
-
onCancelClick: function onCancelClick(e) {
|
|
224
|
-
reset();
|
|
225
|
-
_onCancelClick(e);
|
|
226
|
-
}
|
|
227
|
-
}) :
|
|
228
|
-
/**
|
|
229
|
-
* This is to allow Ctrl + Enter to submit without action buttons
|
|
230
|
-
*/
|
|
231
|
-
jsx(Pressable, {
|
|
232
|
-
hidden: true,
|
|
233
|
-
type: "submit"
|
|
234
|
-
}, jsx(VisuallyHidden, null, "Submit")));
|
|
229
|
+
}) :
|
|
230
|
+
/**
|
|
231
|
+
* This is to allow Ctrl + Enter to submit without action buttons
|
|
232
|
+
*/
|
|
233
|
+
jsx(Pressable, {
|
|
234
|
+
hidden: true,
|
|
235
|
+
type: "submit"
|
|
236
|
+
}, jsx(VisuallyHidden, null, "Submit")))
|
|
237
|
+
);
|
|
235
238
|
}) :
|
|
236
239
|
/**
|
|
237
240
|
* Field is used here only for the label and spacing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/inline-edit",
|
|
3
|
-
"version": "13.7.
|
|
3
|
+
"version": "13.7.9",
|
|
4
4
|
"description": "An inline edit displays a custom input component that switches between reading and editing on the same page.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"team": "Design System Team",
|
|
30
30
|
"website": {
|
|
31
31
|
"name": "Inline edit",
|
|
32
|
-
"category": "
|
|
32
|
+
"category": "Text and data display"
|
|
33
33
|
},
|
|
34
34
|
"runReact18": true
|
|
35
35
|
},
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
38
38
|
"@atlaskit/button": "^20.3.0",
|
|
39
39
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
40
|
-
"@atlaskit/form": "^10.
|
|
41
|
-
"@atlaskit/icon": "^
|
|
42
|
-
"@atlaskit/inline-dialog": "^15.
|
|
40
|
+
"@atlaskit/form": "^10.6.0",
|
|
41
|
+
"@atlaskit/icon": "^23.0.0",
|
|
42
|
+
"@atlaskit/inline-dialog": "^15.3.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
44
|
-
"@atlaskit/primitives": "^13.
|
|
45
|
-
"@atlaskit/textfield": "^6.
|
|
44
|
+
"@atlaskit/primitives": "^13.3.0",
|
|
45
|
+
"@atlaskit/textfield": "^6.6.0",
|
|
46
46
|
"@atlaskit/theme": "^14.0.0",
|
|
47
|
-
"@atlaskit/tokens": "^2.
|
|
47
|
+
"@atlaskit/tokens": "^2.4.0",
|
|
48
48
|
"@atlaskit/visually-hidden": "^1.5.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"@emotion/react": "^11.7.1"
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"@af/integration-testing": "*",
|
|
58
58
|
"@atlaskit/datetime-picker": "^15.9.0",
|
|
59
59
|
"@atlaskit/docs": "*",
|
|
60
|
-
"@atlaskit/ds-lib": "^3.
|
|
61
|
-
"@atlaskit/section-message": "^6.
|
|
62
|
-
"@atlaskit/select": "^18.
|
|
60
|
+
"@atlaskit/ds-lib": "^3.3.0",
|
|
61
|
+
"@atlaskit/section-message": "^6.8.0",
|
|
62
|
+
"@atlaskit/select": "^18.7.0",
|
|
63
63
|
"@atlaskit/ssr": "*",
|
|
64
64
|
"@atlaskit/tag": "^12.6.0",
|
|
65
|
-
"@atlaskit/tag-group": "^
|
|
65
|
+
"@atlaskit/tag-group": "^11.0.0",
|
|
66
66
|
"@atlaskit/textarea": "^5.6.0",
|
|
67
67
|
"@atlaskit/visual-regression": "*",
|
|
68
68
|
"@atlassian/feature-flags-test-utils": "*",
|