@atlaskit/editor-plugin-analytics 3.0.3 → 3.0.5
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 +15 -0
- package/dist/cjs/analyticsPlugin.js +0 -1
- package/dist/cjs/pm-plugins/analytics-api/attach-payload-into-transaction.js +2 -2
- package/dist/cjs/pm-plugins/analytics-api/editor-state-context.js +0 -1
- package/dist/es2019/analyticsPlugin.js +1 -1
- package/dist/es2019/pm-plugins/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/es2019/pm-plugins/analytics-api/editor-state-context.js +1 -1
- package/dist/esm/analyticsPlugin.js +1 -1
- package/dist/esm/pm-plugins/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/esm/pm-plugins/analytics-api/editor-state-context.js +1 -1
- package/dist/types/analyticsPlugin.d.ts +0 -6
- package/dist/types/analyticsPluginType.d.ts +4 -4
- package/dist/types/pm-plugins/analytics-api/attach-payload-into-transaction.d.ts +1 -9
- package/dist/types/pm-plugins/analytics-api/editor-state-context.d.ts +1 -2
- package/dist/types-ts4.5/analyticsPlugin.d.ts +0 -6
- package/dist/types-ts4.5/analyticsPluginType.d.ts +6 -6
- package/dist/types-ts4.5/pm-plugins/analytics-api/attach-payload-into-transaction.d.ts +1 -9
- package/dist/types-ts4.5/pm-plugins/analytics-api/editor-state-context.d.ts +1 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-analytics
|
|
2
2
|
|
|
3
|
+
## 3.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
8
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
9
|
+
|
|
10
|
+
## 3.0.4
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`57b19274b9fdd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/57b19274b9fdd) -
|
|
15
|
+
EDITOR-1373 Bump adf-schema version
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 3.0.3
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.analyticsPlugin = void 0;
|
|
8
|
-
exports.extendPayload = extendPayload;
|
|
9
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
10
|
var _react = require("react");
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.createAttachPayloadIntoTransaction =
|
|
6
|
+
exports.createAttachPayloadIntoTransaction = void 0;
|
|
7
7
|
var _steps = require("@atlaskit/adf-schema/steps");
|
|
8
8
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
9
9
|
var _editorStateContext = require("./editor-state-context");
|
|
@@ -27,7 +27,7 @@ var createAttachPayloadIntoTransaction = exports.createAttachPayloadIntoTransact
|
|
|
27
27
|
// to create new util attachPayloadIntoTransaction in above file.
|
|
28
28
|
// If you make a change here, please review attachPayloadIntoTransaction in above
|
|
29
29
|
// file and update it as well if needed.
|
|
30
|
-
var attachPayloadIntoTransaction =
|
|
30
|
+
var attachPayloadIntoTransaction = function attachPayloadIntoTransaction(_ref2) {
|
|
31
31
|
var payload = _ref2.payload,
|
|
32
32
|
selection = _ref2.selection,
|
|
33
33
|
tr = _ref2.tr,
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.findInsertedLocation = findInsertedLocation;
|
|
7
6
|
exports.getSelectionType = getSelectionType;
|
|
8
7
|
exports.getStateContext = getStateContext;
|
|
9
8
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
@@ -18,7 +18,7 @@ export const createAttachPayloadIntoTransaction = selection => ({
|
|
|
18
18
|
// to create new util attachPayloadIntoTransaction in above file.
|
|
19
19
|
// If you make a change here, please review attachPayloadIntoTransaction in above
|
|
20
20
|
// file and update it as well if needed.
|
|
21
|
-
|
|
21
|
+
const attachPayloadIntoTransaction = ({
|
|
22
22
|
payload,
|
|
23
23
|
selection,
|
|
24
24
|
tr,
|
|
@@ -242,7 +242,7 @@ var analyticsPlugin = function analyticsPlugin(_ref3) {
|
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
244
|
};
|
|
245
|
-
|
|
245
|
+
function extendPayload(_ref1) {
|
|
246
246
|
var payload = _ref1.payload,
|
|
247
247
|
duration = _ref1.duration,
|
|
248
248
|
distortedDuration = _ref1.distortedDuration;
|
|
@@ -21,7 +21,7 @@ export var createAttachPayloadIntoTransaction = function createAttachPayloadInto
|
|
|
21
21
|
// to create new util attachPayloadIntoTransaction in above file.
|
|
22
22
|
// If you make a change here, please review attachPayloadIntoTransaction in above
|
|
23
23
|
// file and update it as well if needed.
|
|
24
|
-
|
|
24
|
+
var attachPayloadIntoTransaction = function attachPayloadIntoTransaction(_ref2) {
|
|
25
25
|
var payload = _ref2.payload,
|
|
26
26
|
selection = _ref2.selection,
|
|
27
27
|
tr = _ref2.tr,
|
|
@@ -35,7 +35,7 @@ export function getSelectionType(selection) {
|
|
|
35
35
|
position: position
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
function findInsertedLocation(oldSelection, newSelection) {
|
|
39
39
|
var schema = newSelection.$from.doc.type.schema;
|
|
40
40
|
var _schema$nodes = schema.nodes,
|
|
41
41
|
paragraph = _schema$nodes.paragraph,
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
1
|
import type { AnalyticsPlugin } from './analyticsPluginType';
|
|
3
2
|
/**
|
|
4
3
|
* Analytics plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
5
4
|
* from `@atlaskit/editor-core`.
|
|
6
5
|
*/
|
|
7
6
|
declare const analyticsPlugin: AnalyticsPlugin;
|
|
8
|
-
export declare function extendPayload({ payload, duration, distortedDuration, }: {
|
|
9
|
-
payload: AnalyticsEventPayload;
|
|
10
|
-
duration: number;
|
|
11
|
-
distortedDuration: boolean;
|
|
12
|
-
}): AnalyticsEventPayload;
|
|
13
7
|
export { analyticsPlugin };
|
|
@@ -8,20 +8,20 @@ export interface AnalyticsPluginOptions {
|
|
|
8
8
|
performanceTracking?: PerformanceTracking;
|
|
9
9
|
}
|
|
10
10
|
export type AnalyticsPlugin = NextEditorPlugin<'analytics', {
|
|
11
|
+
actions: EditorAnalyticsAPI;
|
|
12
|
+
dependencies: [OptionalPlugin<FeatureFlagsPlugin>];
|
|
11
13
|
pluginConfiguration: AnalyticsPluginOptions;
|
|
12
14
|
sharedState: {
|
|
13
15
|
/**
|
|
14
16
|
* **Warning:** Do not use this directly. Use the `analyticsPlugin.actions`
|
|
15
17
|
* instead, as it will properly queue all events.
|
|
16
18
|
*/
|
|
17
|
-
|
|
19
|
+
attachAnalyticsEvent: CreateAttachPayloadIntoTransaction | null;
|
|
18
20
|
/**
|
|
19
21
|
* **Warning:** Do not use this directly. Use the `analyticsPlugin.actions`
|
|
20
22
|
* instead, as it will properly queue all events.
|
|
21
23
|
*/
|
|
22
|
-
|
|
24
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
23
25
|
performanceTracking: PerformanceTracking | undefined;
|
|
24
26
|
};
|
|
25
|
-
dependencies: [OptionalPlugin<FeatureFlagsPlugin>];
|
|
26
|
-
actions: EditorAnalyticsAPI;
|
|
27
27
|
}>;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
type AttachPayloadIntoTransaction = (props: {
|
|
4
|
-
payload: AnalyticsEventPayload;
|
|
5
|
-
selection: Selection;
|
|
6
|
-
tr: Transaction;
|
|
7
|
-
channel: string;
|
|
8
|
-
}) => void;
|
|
9
3
|
export type CreateAttachPayloadIntoTransaction = (props: {
|
|
4
|
+
channel: string;
|
|
10
5
|
payload: AnalyticsEventPayload;
|
|
11
6
|
tr: Transaction;
|
|
12
|
-
channel: string;
|
|
13
7
|
}) => void;
|
|
14
8
|
export declare const createAttachPayloadIntoTransaction: (selection: Selection) => CreateAttachPayloadIntoTransaction;
|
|
15
|
-
export declare const attachPayloadIntoTransaction: AttachPayloadIntoTransaction;
|
|
16
|
-
export {};
|
|
@@ -2,8 +2,7 @@ import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
|
2
2
|
import { SELECTION_POSITION, SELECTION_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
export declare function getSelectionType(selection: Selection): {
|
|
5
|
-
type: SELECTION_TYPE;
|
|
6
5
|
position?: SELECTION_POSITION;
|
|
6
|
+
type: SELECTION_TYPE;
|
|
7
7
|
};
|
|
8
|
-
export declare function findInsertedLocation(oldSelection: Selection, newSelection: Selection): string;
|
|
9
8
|
export declare function getStateContext(selection: Selection, payload: AnalyticsEventPayload, tr?: Transaction): AnalyticsEventPayload;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
1
|
import type { AnalyticsPlugin } from './analyticsPluginType';
|
|
3
2
|
/**
|
|
4
3
|
* Analytics plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
|
|
5
4
|
* from `@atlaskit/editor-core`.
|
|
6
5
|
*/
|
|
7
6
|
declare const analyticsPlugin: AnalyticsPlugin;
|
|
8
|
-
export declare function extendPayload({ payload, duration, distortedDuration, }: {
|
|
9
|
-
payload: AnalyticsEventPayload;
|
|
10
|
-
duration: number;
|
|
11
|
-
distortedDuration: boolean;
|
|
12
|
-
}): AnalyticsEventPayload;
|
|
13
7
|
export { analyticsPlugin };
|
|
@@ -8,22 +8,22 @@ export interface AnalyticsPluginOptions {
|
|
|
8
8
|
performanceTracking?: PerformanceTracking;
|
|
9
9
|
}
|
|
10
10
|
export type AnalyticsPlugin = NextEditorPlugin<'analytics', {
|
|
11
|
+
actions: EditorAnalyticsAPI;
|
|
12
|
+
dependencies: [
|
|
13
|
+
OptionalPlugin<FeatureFlagsPlugin>
|
|
14
|
+
];
|
|
11
15
|
pluginConfiguration: AnalyticsPluginOptions;
|
|
12
16
|
sharedState: {
|
|
13
17
|
/**
|
|
14
18
|
* **Warning:** Do not use this directly. Use the `analyticsPlugin.actions`
|
|
15
19
|
* instead, as it will properly queue all events.
|
|
16
20
|
*/
|
|
17
|
-
|
|
21
|
+
attachAnalyticsEvent: CreateAttachPayloadIntoTransaction | null;
|
|
18
22
|
/**
|
|
19
23
|
* **Warning:** Do not use this directly. Use the `analyticsPlugin.actions`
|
|
20
24
|
* instead, as it will properly queue all events.
|
|
21
25
|
*/
|
|
22
|
-
|
|
26
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
23
27
|
performanceTracking: PerformanceTracking | undefined;
|
|
24
28
|
};
|
|
25
|
-
dependencies: [
|
|
26
|
-
OptionalPlugin<FeatureFlagsPlugin>
|
|
27
|
-
];
|
|
28
|
-
actions: EditorAnalyticsAPI;
|
|
29
29
|
}>;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
type AttachPayloadIntoTransaction = (props: {
|
|
4
|
-
payload: AnalyticsEventPayload;
|
|
5
|
-
selection: Selection;
|
|
6
|
-
tr: Transaction;
|
|
7
|
-
channel: string;
|
|
8
|
-
}) => void;
|
|
9
3
|
export type CreateAttachPayloadIntoTransaction = (props: {
|
|
4
|
+
channel: string;
|
|
10
5
|
payload: AnalyticsEventPayload;
|
|
11
6
|
tr: Transaction;
|
|
12
|
-
channel: string;
|
|
13
7
|
}) => void;
|
|
14
8
|
export declare const createAttachPayloadIntoTransaction: (selection: Selection) => CreateAttachPayloadIntoTransaction;
|
|
15
|
-
export declare const attachPayloadIntoTransaction: AttachPayloadIntoTransaction;
|
|
16
|
-
export {};
|
|
@@ -2,8 +2,7 @@ import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
|
2
2
|
import { SELECTION_POSITION, SELECTION_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
export declare function getSelectionType(selection: Selection): {
|
|
5
|
-
type: SELECTION_TYPE;
|
|
6
5
|
position?: SELECTION_POSITION;
|
|
6
|
+
type: SELECTION_TYPE;
|
|
7
7
|
};
|
|
8
|
-
export declare function findInsertedLocation(oldSelection: Selection, newSelection: Selection): string;
|
|
9
8
|
export declare function getStateContext(selection: Selection, payload: AnalyticsEventPayload, tr?: Transaction): AnalyticsEventPayload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-analytics",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "Analytics plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
".": "./src/index.ts"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@atlaskit/adf-schema": "^50.2.
|
|
33
|
+
"@atlaskit/adf-schema": "^50.2.1",
|
|
34
34
|
"@atlaskit/analytics-listeners": "^9.0.0",
|
|
35
35
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-feature-flags": "^2.0.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@babel/runtime": "^7.0.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@atlaskit/editor-common": "^107.
|
|
42
|
+
"@atlaskit/editor-common": "^107.28.0",
|
|
43
43
|
"react": "^18.2.0"
|
|
44
44
|
},
|
|
45
45
|
"techstack": {
|