@atlaskit/link-create 0.5.2 → 0.5.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 +12 -0
- package/dist/cjs/common/utils/analytics/analytics.codegen.js +21 -6
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/common/utils/analytics/analytics.codegen.js +14 -6
- package/dist/es2019/version.json +1 -1
- package/dist/esm/common/utils/analytics/analytics.codegen.js +20 -6
- package/dist/esm/version.json +1 -1
- package/dist/types/common/utils/analytics/analytics.codegen.d.ts +10 -2
- package/dist/types-ts4.5/common/utils/analytics/analytics.codegen.d.ts +10 -2
- package/package.json +3 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/link-create
|
|
2
2
|
|
|
3
|
+
## 0.5.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies
|
|
8
|
+
|
|
9
|
+
## 0.5.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`ae5ac36af00`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ae5ac36af00) - Updates analytics codegen to support screen events.
|
|
14
|
+
|
|
3
15
|
## 0.5.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1,25 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.default = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
7
9
|
/**
|
|
8
10
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
9
11
|
*
|
|
10
12
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
11
13
|
*
|
|
12
|
-
* @codegen <<SignedSource::
|
|
14
|
+
* @codegen <<SignedSource::1c6720e63161d16bb99fc183b17d1944>>
|
|
13
15
|
* @codegenCommand yarn workspace @atlaskit/link-create run codegen-analytics
|
|
14
16
|
*/
|
|
15
17
|
|
|
16
18
|
function createEventPayload(eventKey, attributes) {
|
|
17
|
-
var
|
|
19
|
+
var _eventKey$split = eventKey.split('.'),
|
|
20
|
+
_eventKey$split2 = (0, _slicedToArray2.default)(_eventKey$split, 4),
|
|
21
|
+
eventType = _eventKey$split2[0],
|
|
22
|
+
actionSubject = _eventKey$split2[1],
|
|
23
|
+
action = _eventKey$split2[2],
|
|
24
|
+
actionSubjectId = _eventKey$split2[3];
|
|
25
|
+
if (eventType === 'screen') {
|
|
26
|
+
return {
|
|
27
|
+
eventType: eventType,
|
|
28
|
+
name: actionSubject,
|
|
29
|
+
action: 'viewed',
|
|
30
|
+
attributes: attributes
|
|
31
|
+
};
|
|
32
|
+
}
|
|
18
33
|
return {
|
|
19
|
-
eventType:
|
|
20
|
-
actionSubject:
|
|
21
|
-
|
|
22
|
-
|
|
34
|
+
eventType: eventType,
|
|
35
|
+
actionSubject: actionSubject,
|
|
36
|
+
actionSubjectId: actionSubjectId,
|
|
37
|
+
action: action,
|
|
23
38
|
attributes: attributes
|
|
24
39
|
};
|
|
25
40
|
}
|
package/dist/cjs/version.json
CHANGED
|
@@ -3,17 +3,25 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::1c6720e63161d16bb99fc183b17d1944>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/link-create run codegen-analytics
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
function createEventPayload(eventKey, attributes) {
|
|
11
|
-
const
|
|
11
|
+
const [eventType, actionSubject, action, actionSubjectId] = eventKey.split('.');
|
|
12
|
+
if (eventType === 'screen') {
|
|
13
|
+
return {
|
|
14
|
+
eventType,
|
|
15
|
+
name: actionSubject,
|
|
16
|
+
action: 'viewed',
|
|
17
|
+
attributes: attributes
|
|
18
|
+
};
|
|
19
|
+
}
|
|
12
20
|
return {
|
|
13
|
-
eventType
|
|
14
|
-
actionSubject
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
eventType,
|
|
22
|
+
actionSubject,
|
|
23
|
+
actionSubjectId,
|
|
24
|
+
action,
|
|
17
25
|
attributes: attributes
|
|
18
26
|
};
|
|
19
27
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,19 +1,33 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
1
2
|
/**
|
|
2
3
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
4
|
*
|
|
4
5
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
6
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
7
|
+
* @codegen <<SignedSource::1c6720e63161d16bb99fc183b17d1944>>
|
|
7
8
|
* @codegenCommand yarn workspace @atlaskit/link-create run codegen-analytics
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
function createEventPayload(eventKey, attributes) {
|
|
11
|
-
var
|
|
12
|
+
var _eventKey$split = eventKey.split('.'),
|
|
13
|
+
_eventKey$split2 = _slicedToArray(_eventKey$split, 4),
|
|
14
|
+
eventType = _eventKey$split2[0],
|
|
15
|
+
actionSubject = _eventKey$split2[1],
|
|
16
|
+
action = _eventKey$split2[2],
|
|
17
|
+
actionSubjectId = _eventKey$split2[3];
|
|
18
|
+
if (eventType === 'screen') {
|
|
19
|
+
return {
|
|
20
|
+
eventType: eventType,
|
|
21
|
+
name: actionSubject,
|
|
22
|
+
action: 'viewed',
|
|
23
|
+
attributes: attributes
|
|
24
|
+
};
|
|
25
|
+
}
|
|
12
26
|
return {
|
|
13
|
-
eventType:
|
|
14
|
-
actionSubject:
|
|
15
|
-
|
|
16
|
-
|
|
27
|
+
eventType: eventType,
|
|
28
|
+
actionSubject: actionSubject,
|
|
29
|
+
actionSubjectId: actionSubjectId,
|
|
30
|
+
action: action,
|
|
17
31
|
attributes: attributes
|
|
18
32
|
};
|
|
19
33
|
}
|
package/dist/esm/version.json
CHANGED
|
@@ -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::1c6720e63161d16bb99fc183b17d1944>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/link-create run codegen-analytics
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -40,9 +40,17 @@ type AnalyticsEventAttributes = {
|
|
|
40
40
|
};
|
|
41
41
|
declare function createEventPayload<K extends keyof AnalyticsEventAttributes>(eventKey: K, attributes: AnalyticsEventAttributes[K]): {
|
|
42
42
|
eventType: string;
|
|
43
|
-
|
|
43
|
+
name: string;
|
|
44
44
|
action: string;
|
|
45
|
+
attributes: AnalyticsEventAttributes[K];
|
|
46
|
+
actionSubject?: undefined;
|
|
47
|
+
actionSubjectId?: undefined;
|
|
48
|
+
} | {
|
|
49
|
+
eventType: string;
|
|
50
|
+
actionSubject: string;
|
|
45
51
|
actionSubjectId: string;
|
|
52
|
+
action: string;
|
|
46
53
|
attributes: AnalyticsEventAttributes[K];
|
|
54
|
+
name?: undefined;
|
|
47
55
|
};
|
|
48
56
|
export default createEventPayload;
|
|
@@ -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::1c6720e63161d16bb99fc183b17d1944>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/link-create run codegen-analytics
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -40,9 +40,17 @@ type AnalyticsEventAttributes = {
|
|
|
40
40
|
};
|
|
41
41
|
declare function createEventPayload<K extends keyof AnalyticsEventAttributes>(eventKey: K, attributes: AnalyticsEventAttributes[K]): {
|
|
42
42
|
eventType: string;
|
|
43
|
-
|
|
43
|
+
name: string;
|
|
44
44
|
action: string;
|
|
45
|
+
attributes: AnalyticsEventAttributes[K];
|
|
46
|
+
actionSubject?: undefined;
|
|
47
|
+
actionSubjectId?: undefined;
|
|
48
|
+
} | {
|
|
49
|
+
eventType: string;
|
|
50
|
+
actionSubject: string;
|
|
45
51
|
actionSubjectId: string;
|
|
52
|
+
action: string;
|
|
46
53
|
attributes: AnalyticsEventAttributes[K];
|
|
54
|
+
name?: undefined;
|
|
47
55
|
};
|
|
48
56
|
export default createEventPayload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-create",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "The driver component of meta creation flow",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"@atlaskit/form": "^8.11.0",
|
|
41
41
|
"@atlaskit/icon": "^21.12.0",
|
|
42
42
|
"@atlaskit/modal-dialog": "^12.5.0",
|
|
43
|
-
"@atlaskit/select": "^16.
|
|
43
|
+
"@atlaskit/select": "^16.5.0",
|
|
44
44
|
"@atlaskit/spinner": "^15.4.0",
|
|
45
45
|
"@atlaskit/textfield": "^5.5.0",
|
|
46
|
-
"@atlaskit/tokens": "^1.
|
|
46
|
+
"@atlaskit/tokens": "^1.5.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"@emotion/react": "^11.7.1"
|
|
49
49
|
},
|
|
@@ -54,19 +54,13 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@atlaskit/docs": "*",
|
|
56
56
|
"@atlaskit/link-picker": "^1.22.0",
|
|
57
|
-
"@atlaskit/link-provider": "^1.6.0",
|
|
58
57
|
"@atlaskit/link-test-helpers": "^4.0.0",
|
|
59
58
|
"@atlaskit/popup": "^1.6.0",
|
|
60
|
-
"@atlaskit/ssr": "*",
|
|
61
59
|
"@atlaskit/visual-regression": "*",
|
|
62
|
-
"@atlaskit/webdriver-runner": "*",
|
|
63
60
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
64
61
|
"@atlassian/link-create-confluence": "^6.1.0",
|
|
65
62
|
"@atlassian/link-create-presets": "^4.0.0",
|
|
66
63
|
"@atlassian/link-picker-atlassian-plugin": "^32.1.0",
|
|
67
|
-
"@atlassian/link-picker-plugins": "^22.1.0",
|
|
68
|
-
"@atlassian/recent-work-client": "^1.8.0",
|
|
69
|
-
"@atlassian/search-client": "^0.10.0",
|
|
70
64
|
"@testing-library/react": "^12.1.5",
|
|
71
65
|
"@testing-library/user-event": "^14.4.3",
|
|
72
66
|
"fetch-mock": "^8.0.0",
|