@atlaskit/editor-plugin-analytics 1.10.9 → 1.10.10
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 +6 -0
- package/dist/cjs/analyticsPlugin.js +11 -1
- package/dist/cjs/pm-plugins/analytics-api/editor-state-context.js +2 -0
- package/dist/es2019/analyticsPlugin.js +11 -1
- package/dist/es2019/pm-plugins/analytics-api/editor-state-context.js +2 -0
- package/dist/esm/analyticsPlugin.js +11 -1
- package/dist/esm/pm-plugins/analytics-api/editor-state-context.js +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -37,6 +37,8 @@ function createPlugin(options, featureFlags) {
|
|
|
37
37
|
fireAnalytics: (0, _analytics.fireAnalyticsEvent)(options.createAnalyticsEvent)
|
|
38
38
|
});
|
|
39
39
|
},
|
|
40
|
+
// Ignored via go/ees005
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
40
42
|
apply: function apply(tr, pluginState, _, state) {
|
|
41
43
|
var _tr$getMeta;
|
|
42
44
|
var _ref = (_tr$getMeta = tr.getMeta(_pluginKey.analyticsPluginKey)) !== null && _tr$getMeta !== void 0 ? _tr$getMeta : {},
|
|
@@ -208,8 +210,16 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
|
|
|
208
210
|
if (!pluginState || !pluginState.createAnalyticsEvent) {
|
|
209
211
|
return;
|
|
210
212
|
}
|
|
213
|
+
|
|
214
|
+
// Ignored via go/ees005
|
|
215
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
211
216
|
var steps = transactions.reduce(function (acc, tr) {
|
|
212
|
-
|
|
217
|
+
// Ignored via go/ees005
|
|
218
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
219
|
+
var payloads = tr.steps
|
|
220
|
+
// Ignored via go/ees005
|
|
221
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
222
|
+
.filter(function (step) {
|
|
213
223
|
return step instanceof _steps.AnalyticsStep;
|
|
214
224
|
}).map(function (x) {
|
|
215
225
|
return x.analyticsEvents;
|
|
@@ -17,6 +17,8 @@ function getSelectionType(selection) {
|
|
|
17
17
|
var position;
|
|
18
18
|
if ((selection === null || selection === void 0 || (_selection$constructo = selection.constructor) === null || _selection$constructo === void 0 ? void 0 : _selection$constructo.name) === 'GapCursorSelection') {
|
|
19
19
|
type = _analytics.SELECTION_TYPE.GAP_CURSOR;
|
|
20
|
+
// Ignored via go/ees005
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
22
|
position = selection.side;
|
|
21
23
|
} else if (selection instanceof _cellSelection.CellSelection) {
|
|
22
24
|
type = _analytics.SELECTION_TYPE.CELL;
|
|
@@ -23,6 +23,8 @@ function createPlugin(options, featureFlags) {
|
|
|
23
23
|
fireAnalytics: fireAnalyticsEvent(options.createAnalyticsEvent)
|
|
24
24
|
};
|
|
25
25
|
},
|
|
26
|
+
// Ignored via go/ees005
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
26
28
|
apply: (tr, pluginState, _, state) => {
|
|
27
29
|
var _tr$getMeta;
|
|
28
30
|
const {
|
|
@@ -191,8 +193,16 @@ const analyticsPlugin = ({
|
|
|
191
193
|
if (!pluginState || !pluginState.createAnalyticsEvent) {
|
|
192
194
|
return;
|
|
193
195
|
}
|
|
196
|
+
|
|
197
|
+
// Ignored via go/ees005
|
|
198
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
194
199
|
const steps = transactions.reduce((acc, tr) => {
|
|
195
|
-
|
|
200
|
+
// Ignored via go/ees005
|
|
201
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
202
|
+
const payloads = tr.steps
|
|
203
|
+
// Ignored via go/ees005
|
|
204
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
205
|
+
.filter(step => step instanceof AnalyticsStep).map(x => x.analyticsEvents).reduce((acc, val) => acc.concat(val), []);
|
|
196
206
|
acc.push(...payloads);
|
|
197
207
|
return acc;
|
|
198
208
|
}, []);
|
|
@@ -8,6 +8,8 @@ export function getSelectionType(selection) {
|
|
|
8
8
|
let position;
|
|
9
9
|
if ((selection === null || selection === void 0 ? void 0 : (_selection$constructo = selection.constructor) === null || _selection$constructo === void 0 ? void 0 : _selection$constructo.name) === 'GapCursorSelection') {
|
|
10
10
|
type = SELECTION_TYPE.GAP_CURSOR;
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
13
|
position = selection.side;
|
|
12
14
|
} else if (selection instanceof CellSelection) {
|
|
13
15
|
type = SELECTION_TYPE.CELL;
|
|
@@ -29,6 +29,8 @@ function createPlugin(options, featureFlags) {
|
|
|
29
29
|
fireAnalytics: _fireAnalyticsEvent(options.createAnalyticsEvent)
|
|
30
30
|
});
|
|
31
31
|
},
|
|
32
|
+
// Ignored via go/ees005
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
32
34
|
apply: function apply(tr, pluginState, _, state) {
|
|
33
35
|
var _tr$getMeta;
|
|
34
36
|
var _ref = (_tr$getMeta = tr.getMeta(analyticsPluginKey)) !== null && _tr$getMeta !== void 0 ? _tr$getMeta : {},
|
|
@@ -200,8 +202,16 @@ var analyticsPlugin = function analyticsPlugin(_ref3) {
|
|
|
200
202
|
if (!pluginState || !pluginState.createAnalyticsEvent) {
|
|
201
203
|
return;
|
|
202
204
|
}
|
|
205
|
+
|
|
206
|
+
// Ignored via go/ees005
|
|
207
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
203
208
|
var steps = transactions.reduce(function (acc, tr) {
|
|
204
|
-
|
|
209
|
+
// Ignored via go/ees005
|
|
210
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
211
|
+
var payloads = tr.steps
|
|
212
|
+
// Ignored via go/ees005
|
|
213
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
214
|
+
.filter(function (step) {
|
|
205
215
|
return step instanceof AnalyticsStep;
|
|
206
216
|
}).map(function (x) {
|
|
207
217
|
return x.analyticsEvents;
|
|
@@ -8,6 +8,8 @@ export function getSelectionType(selection) {
|
|
|
8
8
|
var position;
|
|
9
9
|
if ((selection === null || selection === void 0 || (_selection$constructo = selection.constructor) === null || _selection$constructo === void 0 ? void 0 : _selection$constructo.name) === 'GapCursorSelection') {
|
|
10
10
|
type = SELECTION_TYPE.GAP_CURSOR;
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
13
|
position = selection.side;
|
|
12
14
|
} else if (selection instanceof CellSelection) {
|
|
13
15
|
type = SELECTION_TYPE.CELL;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-analytics",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.10",
|
|
4
4
|
"description": "Analytics plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
35
35
|
"@atlaskit/analytics-listeners": "^8.13.0",
|
|
36
36
|
"@atlaskit/analytics-next": "^10.2.0",
|
|
37
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/editor-common": "^98.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
40
40
|
"@atlaskit/editor-tables": "^2.8.0",
|