@atlaskit/link-datasource 2.12.2 → 2.12.4
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 +15 -0
- package/dist/cjs/ui/issue-like-table/table-cell-content/inline-edit.js +11 -3
- package/dist/es2019/ui/issue-like-table/table-cell-content/inline-edit.js +11 -1
- package/dist/esm/ui/issue-like-table/table-cell-content/inline-edit.js +11 -3
- package/dist/types/analytics/generated/analytics.types.d.ts +9 -1
- package/dist/types-ts4.5/analytics/generated/analytics.types.d.ts +9 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 2.12.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.12.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#137785](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137785)
|
|
14
|
+
[`41740396ba9c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/41740396ba9c1) -
|
|
15
|
+
Adds analytic event ui.inlineEdit.cancelled.datasource to be fired when inline edit is cancelled
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 2.12.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -91,6 +91,16 @@ var InlineEdit = exports.InlineEdit = function InlineEdit(_ref) {
|
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
}, [columnKey, entityType, fireEvent, integrationKey]);
|
|
94
|
+
var onCancelEdit = (0, _react.useCallback)(function () {
|
|
95
|
+
setIsEditing(false);
|
|
96
|
+
if (integrationKey && entityType) {
|
|
97
|
+
fireEvent('ui.inlineEdit.cancelled.datasource', {
|
|
98
|
+
integrationKey: integrationKey,
|
|
99
|
+
entityType: entityType,
|
|
100
|
+
fieldKey: columnKey
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}, [columnKey, entityType, fireEvent, integrationKey]);
|
|
94
104
|
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
95
105
|
xcss: editContainerStyles
|
|
96
106
|
}, /*#__PURE__*/_react.default.createElement(_inlineEdit.default, (0, _extends2.default)({}, (0, _editType.editType)(datasourceTypeWithValues), {
|
|
@@ -101,9 +111,7 @@ var InlineEdit = exports.InlineEdit = function InlineEdit(_ref) {
|
|
|
101
111
|
readViewFitContainerWidth: true,
|
|
102
112
|
isEditing: isEditing,
|
|
103
113
|
onEdit: onEdit,
|
|
104
|
-
onCancel:
|
|
105
|
-
return setIsEditing(false);
|
|
106
|
-
},
|
|
114
|
+
onCancel: onCancelEdit,
|
|
107
115
|
onConfirm: onCommitUpdate
|
|
108
116
|
})));
|
|
109
117
|
};
|
|
@@ -81,6 +81,16 @@ export const InlineEdit = ({
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}, [columnKey, entityType, fireEvent, integrationKey]);
|
|
84
|
+
const onCancelEdit = useCallback(() => {
|
|
85
|
+
setIsEditing(false);
|
|
86
|
+
if (integrationKey && entityType) {
|
|
87
|
+
fireEvent('ui.inlineEdit.cancelled.datasource', {
|
|
88
|
+
integrationKey,
|
|
89
|
+
entityType,
|
|
90
|
+
fieldKey: columnKey
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}, [columnKey, entityType, fireEvent, integrationKey]);
|
|
84
94
|
return /*#__PURE__*/React.createElement(Box, {
|
|
85
95
|
xcss: editContainerStyles
|
|
86
96
|
}, /*#__PURE__*/React.createElement(AKInlineEdit, _extends({}, editType(datasourceTypeWithValues), {
|
|
@@ -89,7 +99,7 @@ export const InlineEdit = ({
|
|
|
89
99
|
readViewFitContainerWidth: true,
|
|
90
100
|
isEditing: isEditing,
|
|
91
101
|
onEdit: onEdit,
|
|
92
|
-
onCancel:
|
|
102
|
+
onCancel: onCancelEdit,
|
|
93
103
|
onConfirm: onCommitUpdate
|
|
94
104
|
})));
|
|
95
105
|
};
|
|
@@ -81,6 +81,16 @@ export var InlineEdit = function InlineEdit(_ref) {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}, [columnKey, entityType, fireEvent, integrationKey]);
|
|
84
|
+
var onCancelEdit = useCallback(function () {
|
|
85
|
+
setIsEditing(false);
|
|
86
|
+
if (integrationKey && entityType) {
|
|
87
|
+
fireEvent('ui.inlineEdit.cancelled.datasource', {
|
|
88
|
+
integrationKey: integrationKey,
|
|
89
|
+
entityType: entityType,
|
|
90
|
+
fieldKey: columnKey
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}, [columnKey, entityType, fireEvent, integrationKey]);
|
|
84
94
|
return /*#__PURE__*/React.createElement(Box, {
|
|
85
95
|
xcss: editContainerStyles
|
|
86
96
|
}, /*#__PURE__*/React.createElement(AKInlineEdit, _extends({}, editType(datasourceTypeWithValues), {
|
|
@@ -91,9 +101,7 @@ export var InlineEdit = function InlineEdit(_ref) {
|
|
|
91
101
|
readViewFitContainerWidth: true,
|
|
92
102
|
isEditing: isEditing,
|
|
93
103
|
onEdit: onEdit,
|
|
94
|
-
onCancel:
|
|
95
|
-
return setIsEditing(false);
|
|
96
|
-
},
|
|
104
|
+
onCancel: onCancelEdit,
|
|
97
105
|
onConfirm: onCommitUpdate
|
|
98
106
|
})));
|
|
99
107
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::6d4fa1aa0b65b5fb6e0cbed65f66d66e>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type ComponentMetaDataType = {
|
|
@@ -157,6 +157,11 @@ export type InlineEditClickedDatasourceAttributesType = {
|
|
|
157
157
|
integrationKey: string;
|
|
158
158
|
fieldKey: string;
|
|
159
159
|
};
|
|
160
|
+
export type InlineEditCancelledDatasourceAttributesType = {
|
|
161
|
+
entityType: string;
|
|
162
|
+
integrationKey: string;
|
|
163
|
+
fieldKey: string;
|
|
164
|
+
};
|
|
160
165
|
export type ErrorShownInlineEditAttributesType = {
|
|
161
166
|
reason: 'access_denied' | 'request_failed';
|
|
162
167
|
};
|
|
@@ -281,6 +286,9 @@ export type AnalyticsEventAttributes = {
|
|
|
281
286
|
/**
|
|
282
287
|
* Fired when inline edit is clicked to show edit mode */
|
|
283
288
|
'ui.inlineEdit.clicked.datasource': InlineEditClickedDatasourceAttributesType;
|
|
289
|
+
/**
|
|
290
|
+
* Fired when the user initiates an update via inline edit through enter key press or submit */
|
|
291
|
+
'ui.inlineEdit.cancelled.datasource': InlineEditCancelledDatasourceAttributesType;
|
|
284
292
|
/**
|
|
285
293
|
* Fired when the inline edit failed and the error flag is shown. */
|
|
286
294
|
'ui.error.shown.inlineEdit': ErrorShownInlineEditAttributesType;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::6d4fa1aa0b65b5fb6e0cbed65f66d66e>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type ComponentMetaDataType = {
|
|
@@ -157,6 +157,11 @@ export type InlineEditClickedDatasourceAttributesType = {
|
|
|
157
157
|
integrationKey: string;
|
|
158
158
|
fieldKey: string;
|
|
159
159
|
};
|
|
160
|
+
export type InlineEditCancelledDatasourceAttributesType = {
|
|
161
|
+
entityType: string;
|
|
162
|
+
integrationKey: string;
|
|
163
|
+
fieldKey: string;
|
|
164
|
+
};
|
|
160
165
|
export type ErrorShownInlineEditAttributesType = {
|
|
161
166
|
reason: 'access_denied' | 'request_failed';
|
|
162
167
|
};
|
|
@@ -281,6 +286,9 @@ export type AnalyticsEventAttributes = {
|
|
|
281
286
|
/**
|
|
282
287
|
* Fired when inline edit is clicked to show edit mode */
|
|
283
288
|
'ui.inlineEdit.clicked.datasource': InlineEditClickedDatasourceAttributesType;
|
|
289
|
+
/**
|
|
290
|
+
* Fired when the user initiates an update via inline edit through enter key press or submit */
|
|
291
|
+
'ui.inlineEdit.cancelled.datasource': InlineEditCancelledDatasourceAttributesType;
|
|
284
292
|
/**
|
|
285
293
|
* Fired when the inline edit failed and the error flag is shown. */
|
|
286
294
|
'ui.error.shown.inlineEdit': ErrorShownInlineEditAttributesType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.4",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/flag": "^15.8.0",
|
|
49
49
|
"@atlaskit/form": "^10.5.0",
|
|
50
50
|
"@atlaskit/heading": "^2.4.0",
|
|
51
|
-
"@atlaskit/icon": "^22.
|
|
51
|
+
"@atlaskit/icon": "^22.16.0",
|
|
52
52
|
"@atlaskit/icon-object": "^6.5.0",
|
|
53
53
|
"@atlaskit/image": "^1.3.0",
|
|
54
54
|
"@atlaskit/inline-edit": "^13.7.0",
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.1.0",
|
|
73
73
|
"@atlaskit/primitives": "^12.1.0",
|
|
74
74
|
"@atlaskit/select": "^17.15.0",
|
|
75
|
-
"@atlaskit/smart-card": "^
|
|
75
|
+
"@atlaskit/smart-card": "^28.0.0",
|
|
76
76
|
"@atlaskit/smart-user-picker": "6.10.2",
|
|
77
77
|
"@atlaskit/spinner": "^16.3.0",
|
|
78
|
-
"@atlaskit/tag": "^12.
|
|
78
|
+
"@atlaskit/tag": "^12.6.0",
|
|
79
79
|
"@atlaskit/textfield": "6.5.1",
|
|
80
80
|
"@atlaskit/theme": "^13.0.0",
|
|
81
81
|
"@atlaskit/tokens": "^1.59.0",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@af/integration-testing": "*",
|
|
102
102
|
"@af/visual-regression": "*",
|
|
103
|
-
"@atlaskit/link-provider": "^1.
|
|
103
|
+
"@atlaskit/link-provider": "^1.15.0",
|
|
104
104
|
"@atlaskit/link-test-helpers": "^7.5.0",
|
|
105
105
|
"@atlaskit/ssr": "*",
|
|
106
106
|
"@atlaskit/visual-regression": "*",
|