@atlaskit/editor-plugin-card 34.0.2 → 35.0.0
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 +21 -0
- package/dist/cjs/nodeviews/datasource.js +1 -2
- package/dist/cjs/ui/EditorLinkingPlatformAnalytics/LinkEvents.js +2 -1
- package/dist/cjs/ui/EditorLinkingPlatformAnalytics/common.js +13 -5
- package/dist/es2019/nodeviews/datasource.js +1 -2
- package/dist/es2019/ui/EditorLinkingPlatformAnalytics/LinkEvents.js +3 -2
- package/dist/es2019/ui/EditorLinkingPlatformAnalytics/common.js +9 -0
- package/dist/esm/nodeviews/datasource.js +1 -2
- package/dist/esm/ui/EditorLinkingPlatformAnalytics/LinkEvents.js +3 -2
- package/dist/esm/ui/EditorLinkingPlatformAnalytics/common.js +12 -4
- package/dist/types/ui/EditorLinkingPlatformAnalytics/common.d.ts +1 -0
- package/package.json +18 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 35.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`cd47720f33219`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cd47720f33219) -
|
|
8
|
+
Report team mentions as creationMethod 'linkpicker_searchResult' instead of 'unknown' on the link
|
|
9
|
+
created event, and add a linkCreationType attribute ('mention' | 'conventionalSmartLink' | 'link')
|
|
10
|
+
so mentions can be told apart from conventional smart links. The team mention change is behind the
|
|
11
|
+
`platform_editor_team_mention_link_analytics` gate.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 34.0.3
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`9b0d8af629b68`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9b0d8af629b68) -
|
|
19
|
+
Clean up feature gate `platform_lp_sllv_table_settings_menu`. The table settings menu and bulk
|
|
20
|
+
text wrapping remain permanently enabled, including the column-picker icon button and editor
|
|
21
|
+
wrapping updates. No public API changes.
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 34.0.2
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -24,7 +24,6 @@ var _datasourceTableViewWithWrappers = require("@atlaskit/link-datasource/dataso
|
|
|
24
24
|
var _editorSmartCardProvider = require("@atlaskit/link-provider/editor-smart-card-provider");
|
|
25
25
|
var _editorSmartCardProviderValueGuard = require("@atlaskit/link-provider/editor-smart-card-provider-value-guard");
|
|
26
26
|
var _constants = require("@atlaskit/linking-common/constants");
|
|
27
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
28
27
|
var _datasourceErrorBoundary = require("../ui/datasourceErrorBoundary");
|
|
29
28
|
var _EditorAnalyticsContext = require("../ui/EditorAnalyticsContext");
|
|
30
29
|
function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
@@ -210,7 +209,7 @@ var DatasourceComponent = exports.DatasourceComponent = /*#__PURE__*/function (_
|
|
|
210
209
|
onColumnResize: this.handleColumnResize,
|
|
211
210
|
columnCustomSizes: columnCustomSizes,
|
|
212
211
|
onWrappedColumnChange: this.handleWrappedColumnChange,
|
|
213
|
-
onWrappedColumnsChange:
|
|
212
|
+
onWrappedColumnsChange: this.handleWrappedColumnsChange,
|
|
214
213
|
wrappedColumnKeys: wrappedColumnKeys
|
|
215
214
|
}))));
|
|
216
215
|
}
|
|
@@ -59,7 +59,8 @@ var LinkEventsBinding = exports.LinkEventsBinding = function LinkEventsBinding(_
|
|
|
59
59
|
}, sourceEvent, {
|
|
60
60
|
display: display,
|
|
61
61
|
nodeContext: nodeContext,
|
|
62
|
-
creationMethod: creationMethod
|
|
62
|
+
creationMethod: creationMethod,
|
|
63
|
+
linkCreationType: (0, _common.getLinkCreationType)(metadata, display)
|
|
63
64
|
});
|
|
64
65
|
}), _types.EVENT.UPDATED, function (_ref3) {
|
|
65
66
|
var node = _ref3.node,
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.getUpdateType = exports.getSourceEventFromMetadata = exports.getMethod = exports.getDeleteType = void 0;
|
|
7
|
+
exports.getUpdateType = exports.getSourceEventFromMetadata = exports.getMethod = exports.getLinkCreationType = exports.getDeleteType = void 0;
|
|
8
8
|
var _UIAnalyticsEvent = _interopRequireDefault(require("@atlaskit/analytics-next/UIAnalyticsEvent"));
|
|
9
9
|
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
10
10
|
/**
|
|
@@ -39,6 +39,7 @@ var getMethod = exports.getMethod = withHistoryMethod(function (_ref) {
|
|
|
39
39
|
case _enums.INPUT_METHOD.FORMATTING:
|
|
40
40
|
return 'editor_type';
|
|
41
41
|
case _enums.INPUT_METHOD.TYPEAHEAD:
|
|
42
|
+
case _enums.INPUT_METHOD.MENTION_TYPEAHEAD:
|
|
42
43
|
return 'linkpicker_searchResult';
|
|
43
44
|
case _enums.INPUT_METHOD.MANUAL:
|
|
44
45
|
return 'linkpicker_manual';
|
|
@@ -48,8 +49,15 @@ var getMethod = exports.getMethod = withHistoryMethod(function (_ref) {
|
|
|
48
49
|
return 'unknown';
|
|
49
50
|
}
|
|
50
51
|
});
|
|
51
|
-
var
|
|
52
|
-
var
|
|
52
|
+
var getLinkCreationType = exports.getLinkCreationType = function getLinkCreationType(_ref2, display) {
|
|
53
|
+
var inputMethod = _ref2.inputMethod;
|
|
54
|
+
if (inputMethod === _enums.INPUT_METHOD.MENTION_TYPEAHEAD) {
|
|
55
|
+
return 'mention';
|
|
56
|
+
}
|
|
57
|
+
return display === 'url' ? 'link' : 'conventionalSmartLink';
|
|
58
|
+
};
|
|
59
|
+
var getUpdateType = exports.getUpdateType = withHistoryMethod(function (_ref3) {
|
|
60
|
+
var action = _ref3.action;
|
|
53
61
|
switch (action) {
|
|
54
62
|
case _enums.ACTION.CHANGED_TYPE:
|
|
55
63
|
return 'display_update';
|
|
@@ -59,8 +67,8 @@ var getUpdateType = exports.getUpdateType = withHistoryMethod(function (_ref2) {
|
|
|
59
67
|
return 'unknown';
|
|
60
68
|
}
|
|
61
69
|
});
|
|
62
|
-
var getDeleteType = exports.getDeleteType = withHistoryMethod(function (
|
|
63
|
-
var action =
|
|
70
|
+
var getDeleteType = exports.getDeleteType = withHistoryMethod(function (_ref4) {
|
|
71
|
+
var action = _ref4.action;
|
|
64
72
|
if (action === _enums.ACTION.UNLINK) {
|
|
65
73
|
return 'unlink';
|
|
66
74
|
}
|
|
@@ -16,7 +16,6 @@ import { DatasourceTableViewWithWrappers as DatasourceTableView } from '@atlaski
|
|
|
16
16
|
import { EditorSmartCardProvider } from '@atlaskit/link-provider/editor-smart-card-provider';
|
|
17
17
|
import { EditorSmartCardProviderValueGuard } from '@atlaskit/link-provider/editor-smart-card-provider-value-guard';
|
|
18
18
|
import { DATASOURCE_DEFAULT_LAYOUT } from '@atlaskit/linking-common/constants';
|
|
19
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
20
19
|
import { DatasourceErrorBoundary } from '../ui/datasourceErrorBoundary';
|
|
21
20
|
import { EditorAnalyticsContext } from '../ui/EditorAnalyticsContext';
|
|
22
21
|
const getPosSafely = pos => {
|
|
@@ -175,7 +174,7 @@ export class DatasourceComponent extends React.PureComponent {
|
|
|
175
174
|
onColumnResize: this.handleColumnResize,
|
|
176
175
|
columnCustomSizes: columnCustomSizes,
|
|
177
176
|
onWrappedColumnChange: this.handleWrappedColumnChange,
|
|
178
|
-
onWrappedColumnsChange:
|
|
177
|
+
onWrappedColumnsChange: this.handleWrappedColumnsChange,
|
|
179
178
|
wrappedColumnKeys: wrappedColumnKeys
|
|
180
179
|
}))));
|
|
181
180
|
}
|
|
@@ -2,7 +2,7 @@ import { useEffect, useMemo } from 'react';
|
|
|
2
2
|
import { useSmartLinkLifecycleAnalytics } from '@atlaskit/link-analytics/use-smart-link-lifecycle-analytics';
|
|
3
3
|
import { EVENT, EVENT_SUBJECT } from '../analytics/types';
|
|
4
4
|
import { appearanceForLink, getUrl } from '../analytics/utils';
|
|
5
|
-
import { getDeleteType, getMethod, getSourceEventFromMetadata, getUpdateType } from './common';
|
|
5
|
+
import { getDeleteType, getLinkCreationType, getMethod, getSourceEventFromMetadata, getUpdateType } from './common';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Set display category as `link` if not displaying the link as a smart card
|
|
@@ -52,7 +52,8 @@ export const LinkEventsBinding = ({
|
|
|
52
52
|
}, sourceEvent, {
|
|
53
53
|
display,
|
|
54
54
|
nodeContext,
|
|
55
|
-
creationMethod
|
|
55
|
+
creationMethod,
|
|
56
|
+
linkCreationType: getLinkCreationType(metadata, display)
|
|
56
57
|
});
|
|
57
58
|
},
|
|
58
59
|
[EVENT.UPDATED]: ({
|
|
@@ -35,6 +35,7 @@ export const getMethod = withHistoryMethod(({
|
|
|
35
35
|
case INPUT_METHOD.FORMATTING:
|
|
36
36
|
return 'editor_type';
|
|
37
37
|
case INPUT_METHOD.TYPEAHEAD:
|
|
38
|
+
case INPUT_METHOD.MENTION_TYPEAHEAD:
|
|
38
39
|
return 'linkpicker_searchResult';
|
|
39
40
|
case INPUT_METHOD.MANUAL:
|
|
40
41
|
return 'linkpicker_manual';
|
|
@@ -44,6 +45,14 @@ export const getMethod = withHistoryMethod(({
|
|
|
44
45
|
return 'unknown';
|
|
45
46
|
}
|
|
46
47
|
});
|
|
48
|
+
export const getLinkCreationType = ({
|
|
49
|
+
inputMethod
|
|
50
|
+
}, display) => {
|
|
51
|
+
if (inputMethod === INPUT_METHOD.MENTION_TYPEAHEAD) {
|
|
52
|
+
return 'mention';
|
|
53
|
+
}
|
|
54
|
+
return display === 'url' ? 'link' : 'conventionalSmartLink';
|
|
55
|
+
};
|
|
47
56
|
export const getUpdateType = withHistoryMethod(({
|
|
48
57
|
action
|
|
49
58
|
}) => {
|
|
@@ -28,7 +28,6 @@ import { DatasourceTableViewWithWrappers as DatasourceTableView } from '@atlaski
|
|
|
28
28
|
import { EditorSmartCardProvider } from '@atlaskit/link-provider/editor-smart-card-provider';
|
|
29
29
|
import { EditorSmartCardProviderValueGuard } from '@atlaskit/link-provider/editor-smart-card-provider-value-guard';
|
|
30
30
|
import { DATASOURCE_DEFAULT_LAYOUT } from '@atlaskit/linking-common/constants';
|
|
31
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
32
31
|
import { DatasourceErrorBoundary } from '../ui/datasourceErrorBoundary';
|
|
33
32
|
import { EditorAnalyticsContext } from '../ui/EditorAnalyticsContext';
|
|
34
33
|
var getPosSafely = function getPosSafely(pos) {
|
|
@@ -206,7 +205,7 @@ export var DatasourceComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
206
205
|
onColumnResize: this.handleColumnResize,
|
|
207
206
|
columnCustomSizes: columnCustomSizes,
|
|
208
207
|
onWrappedColumnChange: this.handleWrappedColumnChange,
|
|
209
|
-
onWrappedColumnsChange:
|
|
208
|
+
onWrappedColumnsChange: this.handleWrappedColumnsChange,
|
|
210
209
|
wrappedColumnKeys: wrappedColumnKeys
|
|
211
210
|
}))));
|
|
212
211
|
}
|
|
@@ -7,7 +7,7 @@ import { useEffect, useMemo } from 'react';
|
|
|
7
7
|
import { useSmartLinkLifecycleAnalytics } from '@atlaskit/link-analytics/use-smart-link-lifecycle-analytics';
|
|
8
8
|
import { EVENT, EVENT_SUBJECT } from '../analytics/types';
|
|
9
9
|
import { appearanceForLink, getUrl } from '../analytics/utils';
|
|
10
|
-
import { getDeleteType, getMethod, getSourceEventFromMetadata, getUpdateType } from './common';
|
|
10
|
+
import { getDeleteType, getLinkCreationType, getMethod, getSourceEventFromMetadata, getUpdateType } from './common';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Set display category as `link` if not displaying the link as a smart card
|
|
@@ -53,7 +53,8 @@ export var LinkEventsBinding = function LinkEventsBinding(_ref) {
|
|
|
53
53
|
}, sourceEvent, {
|
|
54
54
|
display: display,
|
|
55
55
|
nodeContext: nodeContext,
|
|
56
|
-
creationMethod: creationMethod
|
|
56
|
+
creationMethod: creationMethod,
|
|
57
|
+
linkCreationType: getLinkCreationType(metadata, display)
|
|
57
58
|
});
|
|
58
59
|
}), EVENT.UPDATED, function (_ref3) {
|
|
59
60
|
var node = _ref3.node,
|
|
@@ -32,6 +32,7 @@ export var getMethod = withHistoryMethod(function (_ref) {
|
|
|
32
32
|
case INPUT_METHOD.FORMATTING:
|
|
33
33
|
return 'editor_type';
|
|
34
34
|
case INPUT_METHOD.TYPEAHEAD:
|
|
35
|
+
case INPUT_METHOD.MENTION_TYPEAHEAD:
|
|
35
36
|
return 'linkpicker_searchResult';
|
|
36
37
|
case INPUT_METHOD.MANUAL:
|
|
37
38
|
return 'linkpicker_manual';
|
|
@@ -41,8 +42,15 @@ export var getMethod = withHistoryMethod(function (_ref) {
|
|
|
41
42
|
return 'unknown';
|
|
42
43
|
}
|
|
43
44
|
});
|
|
44
|
-
export var
|
|
45
|
-
var
|
|
45
|
+
export var getLinkCreationType = function getLinkCreationType(_ref2, display) {
|
|
46
|
+
var inputMethod = _ref2.inputMethod;
|
|
47
|
+
if (inputMethod === INPUT_METHOD.MENTION_TYPEAHEAD) {
|
|
48
|
+
return 'mention';
|
|
49
|
+
}
|
|
50
|
+
return display === 'url' ? 'link' : 'conventionalSmartLink';
|
|
51
|
+
};
|
|
52
|
+
export var getUpdateType = withHistoryMethod(function (_ref3) {
|
|
53
|
+
var action = _ref3.action;
|
|
46
54
|
switch (action) {
|
|
47
55
|
case ACTION.CHANGED_TYPE:
|
|
48
56
|
return 'display_update';
|
|
@@ -52,8 +60,8 @@ export var getUpdateType = withHistoryMethod(function (_ref2) {
|
|
|
52
60
|
return 'unknown';
|
|
53
61
|
}
|
|
54
62
|
});
|
|
55
|
-
export var getDeleteType = withHistoryMethod(function (
|
|
56
|
-
var action =
|
|
63
|
+
export var getDeleteType = withHistoryMethod(function (_ref4) {
|
|
64
|
+
var action = _ref4.action;
|
|
57
65
|
if (action === ACTION.UNLINK) {
|
|
58
66
|
return 'unlink';
|
|
59
67
|
}
|
|
@@ -14,6 +14,7 @@ type EventMetadata = {
|
|
|
14
14
|
sourceEvent?: unknown;
|
|
15
15
|
};
|
|
16
16
|
export declare const getMethod: (metadata: EventMetadata) => string | undefined;
|
|
17
|
+
export declare const getLinkCreationType: ({ inputMethod }: EventMetadata, display: string) => 'mention' | 'conventionalSmartLink' | 'link';
|
|
17
18
|
export declare const getUpdateType: (metadata: EventMetadata) => string | undefined;
|
|
18
19
|
export declare const getDeleteType: (metadata: EventMetadata) => string | undefined;
|
|
19
20
|
export declare const getSourceEventFromMetadata: (metadata: EventMetadata) => UIAnalyticsEvent | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "35.0.0",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,25 +23,25 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@atlaskit/adf-schema": "^57.7.0",
|
|
25
25
|
"@atlaskit/analytics-next": "^12.6.0",
|
|
26
|
-
"@atlaskit/button": "^25.
|
|
26
|
+
"@atlaskit/button": "^25.5.0",
|
|
27
27
|
"@atlaskit/css": "^1.1.0",
|
|
28
28
|
"@atlaskit/custom-steps": "^1.1.0",
|
|
29
29
|
"@atlaskit/editor-card-provider": "^8.1.0",
|
|
30
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
31
|
-
"@atlaskit/editor-plugin-annotation": "^
|
|
32
|
-
"@atlaskit/editor-plugin-base": "^
|
|
33
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
34
|
-
"@atlaskit/editor-plugin-decorations": "^
|
|
35
|
-
"@atlaskit/editor-plugin-editor-disabled": "^
|
|
36
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
37
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
38
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^
|
|
39
|
-
"@atlaskit/editor-plugin-grid": "^
|
|
40
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
41
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
42
|
-
"@atlaskit/editor-plugin-ui-control-registry": "^
|
|
43
|
-
"@atlaskit/editor-plugin-user-intent": "^
|
|
44
|
-
"@atlaskit/editor-plugin-width": "^
|
|
30
|
+
"@atlaskit/editor-plugin-analytics": "^29.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-annotation": "^29.0.0",
|
|
32
|
+
"@atlaskit/editor-plugin-base": "^30.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-connectivity": "^29.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-decorations": "^29.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-editor-disabled": "^29.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^31.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-feature-flags": "^28.0.0",
|
|
38
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^31.0.0",
|
|
39
|
+
"@atlaskit/editor-plugin-grid": "^29.0.0",
|
|
40
|
+
"@atlaskit/editor-plugin-selection": "^29.0.0",
|
|
41
|
+
"@atlaskit/editor-plugin-toolbar": "^26.0.0",
|
|
42
|
+
"@atlaskit/editor-plugin-ui-control-registry": "^23.0.0",
|
|
43
|
+
"@atlaskit/editor-plugin-user-intent": "^27.0.0",
|
|
44
|
+
"@atlaskit/editor-plugin-width": "^30.0.0",
|
|
45
45
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
46
46
|
"@atlaskit/editor-shared-styles": "^4.5.0",
|
|
47
47
|
"@atlaskit/editor-smart-link-draggable": "^1.2.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"uuid": "^11.1.1"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@atlaskit/editor-common": "^
|
|
77
|
+
"@atlaskit/editor-common": "^133.0.0",
|
|
78
78
|
"@atlaskit/link-provider": "^6.0.0",
|
|
79
79
|
"react": "^18.2.0 || ^19.2.0",
|
|
80
80
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -101,9 +101,6 @@
|
|
|
101
101
|
},
|
|
102
102
|
"platform_lp_sllv_preserve_assets_columns": {
|
|
103
103
|
"type": "boolean"
|
|
104
|
-
},
|
|
105
|
-
"platform_lp_sllv_table_settings_menu": {
|
|
106
|
-
"type": "boolean"
|
|
107
104
|
}
|
|
108
105
|
},
|
|
109
106
|
"compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/e6f3220b-0ca2-445a-a4c5-78cff6ca2a34",
|