@atlaskit/editor-plugin-analytics 0.0.1
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 +1 -0
- package/LICENSE.md +13 -0
- package/README.md +7 -0
- package/dist/cjs/analytics-api/attach-payload-into-transaction.js +51 -0
- package/dist/cjs/analytics-api/editor-state-context.js +78 -0
- package/dist/cjs/analytics-api/map-attributes.js +23 -0
- package/dist/cjs/consts.js +12 -0
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/plugin-key.js +9 -0
- package/dist/cjs/plugin.js +187 -0
- package/dist/cjs/undo-redo-input-source.js +27 -0
- package/dist/cjs/version.json +5 -0
- package/dist/es2019/analytics-api/attach-payload-into-transaction.js +43 -0
- package/dist/es2019/analytics-api/editor-state-context.js +72 -0
- package/dist/es2019/analytics-api/map-attributes.js +14 -0
- package/dist/es2019/consts.js +4 -0
- package/dist/es2019/index.js +1 -0
- package/dist/es2019/plugin-key.js +2 -0
- package/dist/es2019/plugin.js +162 -0
- package/dist/es2019/undo-redo-input-source.js +18 -0
- package/dist/es2019/version.json +5 -0
- package/dist/esm/analytics-api/attach-payload-into-transaction.js +43 -0
- package/dist/esm/analytics-api/editor-state-context.js +70 -0
- package/dist/esm/analytics-api/map-attributes.js +16 -0
- package/dist/esm/consts.js +4 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/plugin-key.js +2 -0
- package/dist/esm/plugin.js +179 -0
- package/dist/esm/undo-redo-input-source.js +19 -0
- package/dist/esm/version.json +5 -0
- package/dist/types/analytics-api/attach-payload-into-transaction.d.ts +16 -0
- package/dist/types/analytics-api/editor-state-context.d.ts +8 -0
- package/dist/types/analytics-api/map-attributes.d.ts +2 -0
- package/dist/types/consts.d.ts +3 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/plugin-key.d.ts +2 -0
- package/dist/types/plugin.d.ts +24 -0
- package/dist/types/undo-redo-input-source.d.ts +3 -0
- package/dist/types-ts4.5/analytics-api/attach-payload-into-transaction.d.ts +16 -0
- package/dist/types-ts4.5/analytics-api/editor-state-context.d.ts +8 -0
- package/dist/types-ts4.5/analytics-api/map-attributes.d.ts +2 -0
- package/dist/types-ts4.5/consts.d.ts +3 -0
- package/dist/types-ts4.5/index.d.ts +3 -0
- package/dist/types-ts4.5/plugin-key.d.ts +2 -0
- package/dist/types-ts4.5/plugin.d.ts +26 -0
- package/dist/types-ts4.5/undo-redo-input-source.d.ts +3 -0
- package/package.json +92 -0
- package/report.api.md +70 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
+
import { AnalyticsEventPayload, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { NextEditorPlugin, PerformanceTracking } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
5
|
+
import { CreateAttachPayloadIntoTransaction } from './analytics-api/attach-payload-into-transaction';
|
|
6
|
+
export interface AnalyticsPluginOptions {
|
|
7
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
8
|
+
performanceTracking?: PerformanceTracking;
|
|
9
|
+
}
|
|
10
|
+
declare const analyticsPlugin: NextEditorPlugin<'analytics', {
|
|
11
|
+
pluginConfiguration: AnalyticsPluginOptions;
|
|
12
|
+
sharedState: {
|
|
13
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
14
|
+
attachAnalyticsEvent: CreateAttachPayloadIntoTransaction | null;
|
|
15
|
+
};
|
|
16
|
+
dependencies: [
|
|
17
|
+
typeof featureFlagsPlugin
|
|
18
|
+
];
|
|
19
|
+
actions: EditorAnalyticsAPI;
|
|
20
|
+
}>;
|
|
21
|
+
export declare function extendPayload({ payload, duration, distortedDuration, }: {
|
|
22
|
+
payload: AnalyticsEventPayload;
|
|
23
|
+
duration: number;
|
|
24
|
+
distortedDuration: boolean;
|
|
25
|
+
}): AnalyticsEventPayload<void>;
|
|
26
|
+
export { analyticsPlugin };
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-plugin-analytics",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Analytics plugin for @atlaskit/editor-core",
|
|
5
|
+
"author": "Atlassian Pty Ltd",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"atlassian": {
|
|
11
|
+
"team": "Editor",
|
|
12
|
+
"releaseModel": "scheduled"
|
|
13
|
+
},
|
|
14
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
15
|
+
"main": "dist/cjs/index.js",
|
|
16
|
+
"module": "dist/esm/index.js",
|
|
17
|
+
"module:es2019": "dist/es2019/index.js",
|
|
18
|
+
"types": "dist/types/index.d.ts",
|
|
19
|
+
"typesVersions": {
|
|
20
|
+
">=4.5 <4.9": {
|
|
21
|
+
"*": [
|
|
22
|
+
"dist/types-ts4.5/*",
|
|
23
|
+
"dist/types-ts4.5/index.d.ts"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"atlaskit:src": "src/index.ts",
|
|
29
|
+
"af:exports": {
|
|
30
|
+
".": "./src/index.ts"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@atlaskit/adf-schema": "^25.5.0",
|
|
34
|
+
"@atlaskit/analytics-listeners": "^8.6.0",
|
|
35
|
+
"@atlaskit/analytics-next": "^9.0.0",
|
|
36
|
+
"@atlaskit/editor-common": "^74.1.0",
|
|
37
|
+
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|
|
38
|
+
"@atlaskit/editor-tables": "^2.2.0",
|
|
39
|
+
"@babel/runtime": "^7.0.0",
|
|
40
|
+
"prosemirror-state": "1.3.4",
|
|
41
|
+
"prosemirror-utils": "^1.0.0-0"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"react": "^16.8.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@atlaskit/docs": "*",
|
|
48
|
+
"@atlaskit/editor-core": "^183.1.0",
|
|
49
|
+
"@atlaskit/editor-test-helpers": "^18.2.0",
|
|
50
|
+
"@atlaskit/ssr": "*",
|
|
51
|
+
"@atlaskit/visual-regression": "*",
|
|
52
|
+
"@atlaskit/webdriver-runner": "*",
|
|
53
|
+
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
54
|
+
"@testing-library/react": "^12.1.5",
|
|
55
|
+
"react-dom": "^16.8.0",
|
|
56
|
+
"typescript": "~4.9.5",
|
|
57
|
+
"wait-for-expect": "^1.2.0"
|
|
58
|
+
},
|
|
59
|
+
"techstack": {
|
|
60
|
+
"@atlassian/frontend": {
|
|
61
|
+
"import-structure": [
|
|
62
|
+
"atlassian-conventions"
|
|
63
|
+
],
|
|
64
|
+
"circular-dependencies": [
|
|
65
|
+
"file-and-folder-level"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"@repo/internal": {
|
|
69
|
+
"dom-events": "use-bind-event-listener",
|
|
70
|
+
"analytics": [
|
|
71
|
+
"analytics-next"
|
|
72
|
+
],
|
|
73
|
+
"design-tokens": [
|
|
74
|
+
"color"
|
|
75
|
+
],
|
|
76
|
+
"theming": [
|
|
77
|
+
"react-context"
|
|
78
|
+
],
|
|
79
|
+
"ui-components": [
|
|
80
|
+
"lite-mode"
|
|
81
|
+
],
|
|
82
|
+
"deprecation": [
|
|
83
|
+
"no-deprecated-imports"
|
|
84
|
+
],
|
|
85
|
+
"styling": [
|
|
86
|
+
"static",
|
|
87
|
+
"emotion"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
|
|
92
|
+
}
|
package/report.api.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<!-- API Report Version: 2.3 -->
|
|
2
|
+
|
|
3
|
+
## API Report File for "@atlaskit/editor-plugin-analytics"
|
|
4
|
+
|
|
5
|
+
> Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
|
|
6
|
+
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
|
+
|
|
8
|
+
### Table of contents
|
|
9
|
+
|
|
10
|
+
- [Main Entry Types](#main-entry-types)
|
|
11
|
+
- [Peer Dependencies](#peer-dependencies)
|
|
12
|
+
|
|
13
|
+
### Main Entry Types
|
|
14
|
+
|
|
15
|
+
<!--SECTION START: Main Entry Types-->
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
19
|
+
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
20
|
+
import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
21
|
+
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
22
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
23
|
+
import type { PerformanceTracking } from '@atlaskit/editor-common/types';
|
|
24
|
+
import type { Transaction } from 'prosemirror-state';
|
|
25
|
+
|
|
26
|
+
// @public (undocumented)
|
|
27
|
+
export const analyticsPlugin: NextEditorPlugin<
|
|
28
|
+
'analytics',
|
|
29
|
+
{
|
|
30
|
+
pluginConfiguration: AnalyticsPluginOptions;
|
|
31
|
+
sharedState: {
|
|
32
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
33
|
+
attachAnalyticsEvent: CreateAttachPayloadIntoTransaction | null;
|
|
34
|
+
};
|
|
35
|
+
dependencies: [typeof featureFlagsPlugin];
|
|
36
|
+
actions: EditorAnalyticsAPI;
|
|
37
|
+
}
|
|
38
|
+
>;
|
|
39
|
+
|
|
40
|
+
// @public (undocumented)
|
|
41
|
+
export interface AnalyticsPluginOptions {
|
|
42
|
+
// (undocumented)
|
|
43
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
44
|
+
// (undocumented)
|
|
45
|
+
performanceTracking?: PerformanceTracking;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// @public (undocumented)
|
|
49
|
+
export type CreateAttachPayloadIntoTransaction = (props: {
|
|
50
|
+
payload: AnalyticsEventPayload;
|
|
51
|
+
tr: Transaction;
|
|
52
|
+
channel: string;
|
|
53
|
+
}) => void;
|
|
54
|
+
|
|
55
|
+
// (No @packageDocumentation comment for this package)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
<!--SECTION END: Main Entry Types-->
|
|
59
|
+
|
|
60
|
+
### Peer Dependencies
|
|
61
|
+
|
|
62
|
+
<!--SECTION START: Peer Dependencies-->
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"react": "^16.8.0"
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
<!--SECTION END: Peer Dependencies-->
|