@atlaskit/link-datasource 2.11.13 → 2.11.15
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 +18 -0
- package/dist/cjs/state/actions/index.js +5 -2
- package/dist/cjs/ui/issue-like-table/table-cell-content/inline-edit.js +5 -1
- package/dist/es2019/state/actions/index.js +5 -2
- package/dist/es2019/ui/issue-like-table/table-cell-content/inline-edit.js +6 -1
- package/dist/esm/state/actions/index.js +5 -2
- package/dist/esm/ui/issue-like-table/table-cell-content/inline-edit.js +5 -1
- package/dist/types/analytics/generated/analytics.types.d.ts +5 -1
- package/dist/types-ts4.5/analytics/generated/analytics.types.d.ts +5 -1
- package/package.json +5 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 2.11.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#136349](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136349)
|
|
8
|
+
[`a1c9a8ac45907`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a1c9a8ac45907) -
|
|
9
|
+
Adds the ui.form.submitted.inlineEdit analytic event to be fired on when users attempts to update
|
|
10
|
+
via inline edit.
|
|
11
|
+
|
|
12
|
+
## 2.11.14
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#134332](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/134332)
|
|
17
|
+
[`ba2a672c564ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ba2a672c564ec) -
|
|
18
|
+
Fix displaying cached data after inline edit updates
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 2.11.13
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -178,7 +178,8 @@ var useExecuteAtomicAction = exports.useExecuteAtomicAction = function useExecut
|
|
|
178
178
|
_useAtomicUpdateActio2 = (0, _slicedToArray2.default)(_useAtomicUpdateActio, 1),
|
|
179
179
|
schema = _useAtomicUpdateActio2[0];
|
|
180
180
|
var _useDatasourceClientE2 = (0, _linkClientExtension.useDatasourceClientExtension)(),
|
|
181
|
-
executeAction = _useDatasourceClientE2.executeAtomicAction
|
|
181
|
+
executeAction = _useDatasourceClientE2.executeAtomicAction,
|
|
182
|
+
invalidateDatasourceDataCacheByAri = _useDatasourceClientE2.invalidateDatasourceDataCacheByAri;
|
|
182
183
|
var _useDatasourceAnalyti = (0, _analytics.useDatasourceAnalyticsEvents)(),
|
|
183
184
|
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
184
185
|
var _useErrorLogger = (0, _useErrorLogger2.default)({
|
|
@@ -199,6 +200,8 @@ var useExecuteAtomicAction = exports.useExecuteAtomicAction = function useExecut
|
|
|
199
200
|
}
|
|
200
201
|
}
|
|
201
202
|
}).then(function (resp) {
|
|
203
|
+
// Force data to refresh after update
|
|
204
|
+
invalidateDatasourceDataCacheByAri(ari);
|
|
202
205
|
fireEvent('operational.actionExecution.success', {
|
|
203
206
|
integrationKey: integrationKey,
|
|
204
207
|
experience: 'datasource'
|
|
@@ -209,7 +212,7 @@ var useExecuteAtomicAction = exports.useExecuteAtomicAction = function useExecut
|
|
|
209
212
|
// Rethrow up to component for flags and other handling
|
|
210
213
|
throw error;
|
|
211
214
|
});
|
|
212
|
-
}, [schema, executeAction, integrationKey, fieldKey, ari, fireEvent, captureError]);
|
|
215
|
+
}, [schema, executeAction, integrationKey, fieldKey, ari, invalidateDatasourceDataCacheByAri, fireEvent, captureError]);
|
|
213
216
|
if (!schema) {
|
|
214
217
|
return {};
|
|
215
218
|
}
|
|
@@ -13,6 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _inlineEdit = _interopRequireDefault(require("@atlaskit/inline-edit"));
|
|
15
15
|
var _primitives = require("@atlaskit/primitives");
|
|
16
|
+
var _analytics = require("../../../analytics");
|
|
16
17
|
var _useDatasourceTableFlag = require("../../../hooks/useDatasourceTableFlag");
|
|
17
18
|
var _state = require("../../../state");
|
|
18
19
|
var _editType = require("../edit-type");
|
|
@@ -53,6 +54,8 @@ var InlineEdit = exports.InlineEdit = function InlineEdit(_ref) {
|
|
|
53
54
|
showErrorFlag = _useDatasourceTableFl.showErrorFlag;
|
|
54
55
|
var _useDatasourceActions = (0, _state.useDatasourceActions)(),
|
|
55
56
|
onUpdateItem = _useDatasourceActions.onUpdateItem;
|
|
57
|
+
var _useDatasourceAnalyti = (0, _analytics.useDatasourceAnalyticsEvents)(),
|
|
58
|
+
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
56
59
|
var onCommitUpdate = (0, _react.useCallback)(function (value) {
|
|
57
60
|
if (!item) {
|
|
58
61
|
setIsEditing(false);
|
|
@@ -65,6 +68,7 @@ var InlineEdit = exports.InlineEdit = function InlineEdit(_ref) {
|
|
|
65
68
|
return;
|
|
66
69
|
}
|
|
67
70
|
onUpdateItem(ari, newItem);
|
|
71
|
+
fireEvent('ui.form.submitted.inlineEdit', {});
|
|
68
72
|
execute(value).catch(function (error) {
|
|
69
73
|
var status = error && (0, _typeof2.default)(error) === 'object' ? error.status : undefined;
|
|
70
74
|
showErrorFlag({
|
|
@@ -73,7 +77,7 @@ var InlineEdit = exports.InlineEdit = function InlineEdit(_ref) {
|
|
|
73
77
|
onUpdateItem(ari, existingData);
|
|
74
78
|
});
|
|
75
79
|
setIsEditing(false);
|
|
76
|
-
}, [
|
|
80
|
+
}, [item, datasourceTypeWithValues.type, columnKey, onUpdateItem, ari, execute, fireEvent, showErrorFlag]);
|
|
77
81
|
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
78
82
|
xcss: editContainerStyles
|
|
79
83
|
}, /*#__PURE__*/_react.default.createElement(_inlineEdit.default, (0, _extends2.default)({}, (0, _editType.editType)(datasourceTypeWithValues), {
|
|
@@ -156,7 +156,8 @@ export const useExecuteAtomicAction = ({
|
|
|
156
156
|
integrationKey
|
|
157
157
|
});
|
|
158
158
|
const {
|
|
159
|
-
executeAtomicAction: executeAction
|
|
159
|
+
executeAtomicAction: executeAction,
|
|
160
|
+
invalidateDatasourceDataCacheByAri
|
|
160
161
|
} = useDatasourceClientExtension();
|
|
161
162
|
const {
|
|
162
163
|
fireEvent
|
|
@@ -182,6 +183,8 @@ export const useExecuteAtomicAction = ({
|
|
|
182
183
|
}
|
|
183
184
|
}
|
|
184
185
|
}).then(resp => {
|
|
186
|
+
// Force data to refresh after update
|
|
187
|
+
invalidateDatasourceDataCacheByAri(ari);
|
|
185
188
|
fireEvent('operational.actionExecution.success', {
|
|
186
189
|
integrationKey: integrationKey,
|
|
187
190
|
experience: 'datasource'
|
|
@@ -192,7 +195,7 @@ export const useExecuteAtomicAction = ({
|
|
|
192
195
|
// Rethrow up to component for flags and other handling
|
|
193
196
|
throw error;
|
|
194
197
|
});
|
|
195
|
-
}, [schema, executeAction, integrationKey, fieldKey, ari, fireEvent, captureError]);
|
|
198
|
+
}, [schema, executeAction, integrationKey, fieldKey, ari, invalidateDatasourceDataCacheByAri, fireEvent, captureError]);
|
|
196
199
|
if (!schema) {
|
|
197
200
|
return {};
|
|
198
201
|
}
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useCallback, useState } from 'react';
|
|
3
3
|
import AKInlineEdit from '@atlaskit/inline-edit';
|
|
4
4
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
5
|
+
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
5
6
|
import { useDatasourceTableFlag } from '../../../hooks/useDatasourceTableFlag';
|
|
6
7
|
import { useDatasourceActions, useDatasourceItem } from '../../../state';
|
|
7
8
|
import { editType } from '../edit-type';
|
|
@@ -41,6 +42,9 @@ export const InlineEdit = ({
|
|
|
41
42
|
const {
|
|
42
43
|
onUpdateItem
|
|
43
44
|
} = useDatasourceActions();
|
|
45
|
+
const {
|
|
46
|
+
fireEvent
|
|
47
|
+
} = useDatasourceAnalyticsEvents();
|
|
44
48
|
const onCommitUpdate = useCallback(value => {
|
|
45
49
|
if (!item) {
|
|
46
50
|
setIsEditing(false);
|
|
@@ -53,6 +57,7 @@ export const InlineEdit = ({
|
|
|
53
57
|
return;
|
|
54
58
|
}
|
|
55
59
|
onUpdateItem(ari, newItem);
|
|
60
|
+
fireEvent('ui.form.submitted.inlineEdit', {});
|
|
56
61
|
execute(value).catch(error => {
|
|
57
62
|
const status = error && typeof error === 'object' ? error.status : undefined;
|
|
58
63
|
showErrorFlag({
|
|
@@ -61,7 +66,7 @@ export const InlineEdit = ({
|
|
|
61
66
|
onUpdateItem(ari, existingData);
|
|
62
67
|
});
|
|
63
68
|
setIsEditing(false);
|
|
64
|
-
}, [
|
|
69
|
+
}, [item, datasourceTypeWithValues.type, columnKey, onUpdateItem, ari, execute, fireEvent, showErrorFlag]);
|
|
65
70
|
return /*#__PURE__*/React.createElement(Box, {
|
|
66
71
|
xcss: editContainerStyles
|
|
67
72
|
}, /*#__PURE__*/React.createElement(AKInlineEdit, _extends({}, editType(datasourceTypeWithValues), {
|
|
@@ -172,7 +172,8 @@ export var useExecuteAtomicAction = function useExecuteAtomicAction(_ref5) {
|
|
|
172
172
|
_useAtomicUpdateActio2 = _slicedToArray(_useAtomicUpdateActio, 1),
|
|
173
173
|
schema = _useAtomicUpdateActio2[0];
|
|
174
174
|
var _useDatasourceClientE2 = useDatasourceClientExtension(),
|
|
175
|
-
executeAction = _useDatasourceClientE2.executeAtomicAction
|
|
175
|
+
executeAction = _useDatasourceClientE2.executeAtomicAction,
|
|
176
|
+
invalidateDatasourceDataCacheByAri = _useDatasourceClientE2.invalidateDatasourceDataCacheByAri;
|
|
176
177
|
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
177
178
|
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
178
179
|
var _useErrorLogger = useErrorLogger({
|
|
@@ -193,6 +194,8 @@ export var useExecuteAtomicAction = function useExecuteAtomicAction(_ref5) {
|
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
196
|
}).then(function (resp) {
|
|
197
|
+
// Force data to refresh after update
|
|
198
|
+
invalidateDatasourceDataCacheByAri(ari);
|
|
196
199
|
fireEvent('operational.actionExecution.success', {
|
|
197
200
|
integrationKey: integrationKey,
|
|
198
201
|
experience: 'datasource'
|
|
@@ -203,7 +206,7 @@ export var useExecuteAtomicAction = function useExecuteAtomicAction(_ref5) {
|
|
|
203
206
|
// Rethrow up to component for flags and other handling
|
|
204
207
|
throw error;
|
|
205
208
|
});
|
|
206
|
-
}, [schema, executeAction, integrationKey, fieldKey, ari, fireEvent, captureError]);
|
|
209
|
+
}, [schema, executeAction, integrationKey, fieldKey, ari, invalidateDatasourceDataCacheByAri, fireEvent, captureError]);
|
|
207
210
|
if (!schema) {
|
|
208
211
|
return {};
|
|
209
212
|
}
|
|
@@ -7,6 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import React, { useCallback, useState } from 'react';
|
|
8
8
|
import AKInlineEdit from '@atlaskit/inline-edit';
|
|
9
9
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
10
|
+
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
10
11
|
import { useDatasourceTableFlag } from '../../../hooks/useDatasourceTableFlag';
|
|
11
12
|
import { useDatasourceActions, useDatasourceItem } from '../../../state';
|
|
12
13
|
import { editType } from '../edit-type';
|
|
@@ -43,6 +44,8 @@ export var InlineEdit = function InlineEdit(_ref) {
|
|
|
43
44
|
showErrorFlag = _useDatasourceTableFl.showErrorFlag;
|
|
44
45
|
var _useDatasourceActions = useDatasourceActions(),
|
|
45
46
|
onUpdateItem = _useDatasourceActions.onUpdateItem;
|
|
47
|
+
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
48
|
+
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
46
49
|
var onCommitUpdate = useCallback(function (value) {
|
|
47
50
|
if (!item) {
|
|
48
51
|
setIsEditing(false);
|
|
@@ -55,6 +58,7 @@ export var InlineEdit = function InlineEdit(_ref) {
|
|
|
55
58
|
return;
|
|
56
59
|
}
|
|
57
60
|
onUpdateItem(ari, newItem);
|
|
61
|
+
fireEvent('ui.form.submitted.inlineEdit', {});
|
|
58
62
|
execute(value).catch(function (error) {
|
|
59
63
|
var status = error && _typeof(error) === 'object' ? error.status : undefined;
|
|
60
64
|
showErrorFlag({
|
|
@@ -63,7 +67,7 @@ export var InlineEdit = function InlineEdit(_ref) {
|
|
|
63
67
|
onUpdateItem(ari, existingData);
|
|
64
68
|
});
|
|
65
69
|
setIsEditing(false);
|
|
66
|
-
}, [
|
|
70
|
+
}, [item, datasourceTypeWithValues.type, columnKey, onUpdateItem, ari, execute, fireEvent, showErrorFlag]);
|
|
67
71
|
return /*#__PURE__*/React.createElement(Box, {
|
|
68
72
|
xcss: editContainerStyles
|
|
69
73
|
}, /*#__PURE__*/React.createElement(AKInlineEdit, _extends({}, editType(datasourceTypeWithValues), {
|
|
@@ -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::b545a6ba498c7d701c956e5ca94c24cf>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type ComponentMetaDataType = {
|
|
@@ -151,6 +151,7 @@ export type ActionDiscoverySuccessAttributesType = {
|
|
|
151
151
|
integrationKey: string | null;
|
|
152
152
|
datasourceId: string | null;
|
|
153
153
|
};
|
|
154
|
+
export type FormSubmittedInlineEditAttributesType = {};
|
|
154
155
|
export type AnalyticsEventAttributes = {
|
|
155
156
|
/**
|
|
156
157
|
* Fires when user sees modal dialog. */
|
|
@@ -266,5 +267,8 @@ export type AnalyticsEventAttributes = {
|
|
|
266
267
|
/**
|
|
267
268
|
* Fired when the action discovery and permissions request is successful. */
|
|
268
269
|
'operational.actionDiscovery.success': ActionDiscoverySuccessAttributesType;
|
|
270
|
+
/**
|
|
271
|
+
* Fired when the user initiates an update via inline edit through enter key press or submit */
|
|
272
|
+
'ui.form.submitted.inlineEdit': FormSubmittedInlineEditAttributesType;
|
|
269
273
|
};
|
|
270
274
|
export type EventKey = keyof AnalyticsEventAttributes;
|
|
@@ -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::b545a6ba498c7d701c956e5ca94c24cf>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type ComponentMetaDataType = {
|
|
@@ -151,6 +151,7 @@ export type ActionDiscoverySuccessAttributesType = {
|
|
|
151
151
|
integrationKey: string | null;
|
|
152
152
|
datasourceId: string | null;
|
|
153
153
|
};
|
|
154
|
+
export type FormSubmittedInlineEditAttributesType = {};
|
|
154
155
|
export type AnalyticsEventAttributes = {
|
|
155
156
|
/**
|
|
156
157
|
* Fires when user sees modal dialog. */
|
|
@@ -266,5 +267,8 @@ export type AnalyticsEventAttributes = {
|
|
|
266
267
|
/**
|
|
267
268
|
* Fired when the action discovery and permissions request is successful. */
|
|
268
269
|
'operational.actionDiscovery.success': ActionDiscoverySuccessAttributesType;
|
|
270
|
+
/**
|
|
271
|
+
* Fired when the user initiates an update via inline edit through enter key press or submit */
|
|
272
|
+
'ui.form.submitted.inlineEdit': FormSubmittedInlineEditAttributesType;
|
|
269
273
|
};
|
|
270
274
|
export type EventKey = keyof AnalyticsEventAttributes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.15",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
"atlaskit:src": "src/index.ts",
|
|
25
25
|
"atlassian": {
|
|
26
26
|
"team": "Linking Platform",
|
|
27
|
-
"inPublicMirror": false,
|
|
28
|
-
"releaseModel": "continuous",
|
|
29
27
|
"i18n": true,
|
|
30
28
|
"website": {
|
|
31
29
|
"name": "Link Datasource"
|
|
@@ -56,10 +54,10 @@
|
|
|
56
54
|
"@atlaskit/inline-edit": "^13.7.0",
|
|
57
55
|
"@atlaskit/intl-messages-provider": "^1.0.0",
|
|
58
56
|
"@atlaskit/jql-ast": "^3.3.0",
|
|
59
|
-
"@atlaskit/jql-editor": "^4.
|
|
57
|
+
"@atlaskit/jql-editor": "^4.6.0",
|
|
60
58
|
"@atlaskit/jql-editor-autocomplete-rest": "^2.0.0",
|
|
61
59
|
"@atlaskit/layering": "^0.4.0",
|
|
62
|
-
"@atlaskit/link-client-extension": "^2.
|
|
60
|
+
"@atlaskit/link-client-extension": "^2.3.0",
|
|
63
61
|
"@atlaskit/linking-common": "^5.11.0",
|
|
64
62
|
"@atlaskit/linking-types": "^9.0.0",
|
|
65
63
|
"@atlaskit/logo": "^14.2.0",
|
|
@@ -67,12 +65,12 @@
|
|
|
67
65
|
"@atlaskit/modal-dialog": "^12.15.0",
|
|
68
66
|
"@atlaskit/outbound-auth-flow-client": "^3.4.5",
|
|
69
67
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
70
|
-
"@atlaskit/popup": "^1.
|
|
68
|
+
"@atlaskit/popup": "^1.24.0",
|
|
71
69
|
"@atlaskit/pragmatic-drag-and-drop": "^1.3.0",
|
|
72
70
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
|
|
73
71
|
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^1.2.0",
|
|
74
72
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.1.0",
|
|
75
|
-
"@atlaskit/primitives": "^12.
|
|
73
|
+
"@atlaskit/primitives": "^12.1.0",
|
|
76
74
|
"@atlaskit/select": "^17.15.0",
|
|
77
75
|
"@atlaskit/smart-card": "^27.19.0",
|
|
78
76
|
"@atlaskit/smart-user-picker": "6.10.2",
|