@atlaskit/link-datasource 2.11.14 → 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 +9 -0
- package/dist/cjs/ui/issue-like-table/table-cell-content/inline-edit.js +5 -1
- package/dist/es2019/ui/issue-like-table/table-cell-content/inline-edit.js +6 -1
- 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 +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
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
|
+
|
|
3
12
|
## 2.11.14
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -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), {
|
|
@@ -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), {
|
|
@@ -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;
|