@atlaskit/editor-plugin-analytics 1.8.9 → 1.8.11
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/plugin.js +32 -13
- package/dist/es2019/plugin.js +22 -2
- package/dist/esm/plugin.js +32 -13
- package/dist/types/plugin.d.ts +8 -0
- package/dist/types-ts4.5/plugin.d.ts +8 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-analytics
|
|
2
2
|
|
|
3
|
+
## 1.8.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#149100](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/149100)
|
|
8
|
+
[`1ea6c6083e836`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1ea6c6083e836) -
|
|
9
|
+
[ED-23460] Queue events fired via `editor-plugin-analytics` actions, add warning to `sharedState`
|
|
10
|
+
functions to use `actions` instead.
|
|
11
|
+
|
|
12
|
+
## 1.8.10
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 1.8.9
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -10,13 +10,13 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _react = require("react");
|
|
12
12
|
var _steps = require("@atlaskit/adf-schema/steps");
|
|
13
|
-
var _types = require("@atlaskit/analytics-listeners/types");
|
|
14
13
|
var _useAnalyticsEvents2 = require("@atlaskit/analytics-next/useAnalyticsEvents");
|
|
15
14
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
16
15
|
var _isPerformanceApiAvailable = require("@atlaskit/editor-common/is-performance-api-available");
|
|
17
16
|
var _measureRender = require("@atlaskit/editor-common/performance/measure-render");
|
|
18
17
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
19
18
|
var _attachPayloadIntoTransaction = require("./analytics-api/attach-payload-into-transaction");
|
|
19
|
+
var _consts = require("./consts");
|
|
20
20
|
var _pluginKey = require("./plugin-key");
|
|
21
21
|
var _undoRedoInputSource = require("./undo-redo-input-source");
|
|
22
22
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
@@ -106,6 +106,7 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
|
|
|
106
106
|
options = _ref3$config === void 0 ? {} : _ref3$config,
|
|
107
107
|
api = _ref3.api;
|
|
108
108
|
var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
109
|
+
var analyticsEventPropQueue = new Set();
|
|
109
110
|
return {
|
|
110
111
|
name: 'analytics',
|
|
111
112
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -128,13 +129,17 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
|
|
|
128
129
|
},
|
|
129
130
|
actions: {
|
|
130
131
|
attachAnalyticsEvent: function attachAnalyticsEvent(payload) {
|
|
131
|
-
var channel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] :
|
|
132
|
+
var channel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _consts.editorAnalyticsChannel;
|
|
132
133
|
return function (tr) {
|
|
133
134
|
var _api$analytics$shared, _api$analytics;
|
|
134
135
|
var _ref5 = (_api$analytics$shared = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.sharedState.currentState()) !== null && _api$analytics$shared !== void 0 ? _api$analytics$shared : {},
|
|
135
136
|
createAnalyticsEvent = _ref5.createAnalyticsEvent,
|
|
136
137
|
attachAnalyticsEvent = _ref5.attachAnalyticsEvent;
|
|
137
138
|
if (!tr || !createAnalyticsEvent || !attachAnalyticsEvent) {
|
|
139
|
+
analyticsEventPropQueue.add({
|
|
140
|
+
payload: payload,
|
|
141
|
+
channel: channel
|
|
142
|
+
});
|
|
138
143
|
return false;
|
|
139
144
|
}
|
|
140
145
|
attachAnalyticsEvent({
|
|
@@ -150,6 +155,9 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
|
|
|
150
155
|
var _ref6 = (_api$analytics$shared2 = api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.sharedState.currentState()) !== null && _api$analytics$shared2 !== void 0 ? _api$analytics$shared2 : {},
|
|
151
156
|
createAnalyticsEvent = _ref6.createAnalyticsEvent;
|
|
152
157
|
if (!createAnalyticsEvent) {
|
|
158
|
+
analyticsEventPropQueue.add({
|
|
159
|
+
payload: payload
|
|
160
|
+
});
|
|
153
161
|
return;
|
|
154
162
|
}
|
|
155
163
|
(0, _analytics.fireAnalyticsEvent)(createAnalyticsEvent)({
|
|
@@ -168,6 +176,17 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
|
|
|
168
176
|
createAnalyticsEvent: createAnalyticsEvent
|
|
169
177
|
});
|
|
170
178
|
dispatch(tr);
|
|
179
|
+
|
|
180
|
+
// Attach all analytics events to the transaction
|
|
181
|
+
analyticsEventPropQueue.forEach(function (_ref8) {
|
|
182
|
+
var _createAnalyticsEvent;
|
|
183
|
+
var payload = _ref8.payload,
|
|
184
|
+
channel = _ref8.channel;
|
|
185
|
+
(_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 || _createAnalyticsEvent.fire(channel !== null && channel !== void 0 ? channel : _consts.editorAnalyticsChannel);
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// Clear the queue
|
|
189
|
+
analyticsEventPropQueue.clear();
|
|
171
190
|
}, [createAnalyticsEvent, editorView]);
|
|
172
191
|
},
|
|
173
192
|
pmPlugins: function pmPlugins() {
|
|
@@ -178,10 +197,10 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
|
|
|
178
197
|
}
|
|
179
198
|
}];
|
|
180
199
|
},
|
|
181
|
-
onEditorViewStateUpdated: function onEditorViewStateUpdated(
|
|
182
|
-
var originalTransaction =
|
|
183
|
-
transactions =
|
|
184
|
-
newEditorState =
|
|
200
|
+
onEditorViewStateUpdated: function onEditorViewStateUpdated(_ref9) {
|
|
201
|
+
var originalTransaction = _ref9.originalTransaction,
|
|
202
|
+
transactions = _ref9.transactions,
|
|
203
|
+
newEditorState = _ref9.newEditorState;
|
|
185
204
|
var pluginState = _pluginKey.analyticsPluginKey.getState(newEditorState);
|
|
186
205
|
if (!pluginState || !pluginState.createAnalyticsEvent) {
|
|
187
206
|
return;
|
|
@@ -202,9 +221,9 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
|
|
|
202
221
|
}
|
|
203
222
|
var createAnalyticsEvent = pluginState.createAnalyticsEvent;
|
|
204
223
|
var undoAnaltyicsEventTransformer = (0, _undoRedoInputSource.generateUndoRedoInputSoucePayload)(originalTransaction);
|
|
205
|
-
steps.forEach(function (
|
|
206
|
-
var payload =
|
|
207
|
-
channel =
|
|
224
|
+
steps.forEach(function (_ref10) {
|
|
225
|
+
var payload = _ref10.payload,
|
|
226
|
+
channel = _ref10.channel;
|
|
208
227
|
var nextPayload = undoAnaltyicsEventTransformer(payload);
|
|
209
228
|
(0, _analytics.fireAnalyticsEvent)(createAnalyticsEvent)({
|
|
210
229
|
payload: nextPayload,
|
|
@@ -214,10 +233,10 @@ var analyticsPlugin = exports.analyticsPlugin = function analyticsPlugin(_ref3)
|
|
|
214
233
|
}
|
|
215
234
|
};
|
|
216
235
|
};
|
|
217
|
-
function extendPayload(
|
|
218
|
-
var payload =
|
|
219
|
-
duration =
|
|
220
|
-
distortedDuration =
|
|
236
|
+
function extendPayload(_ref11) {
|
|
237
|
+
var payload = _ref11.payload,
|
|
238
|
+
duration = _ref11.duration,
|
|
239
|
+
distortedDuration = _ref11.distortedDuration;
|
|
221
240
|
return _objectSpread(_objectSpread({}, payload), {}, {
|
|
222
241
|
attributes: _objectSpread(_objectSpread({}, payload.attributes), {}, {
|
|
223
242
|
duration: duration,
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useLayoutEffect } from 'react';
|
|
2
2
|
import { AnalyticsStep } from '@atlaskit/adf-schema/steps';
|
|
3
|
-
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
4
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
5
4
|
import { ACTION, EVENT_TYPE, fireAnalyticsEvent, getAnalyticsEventsFromTransaction } from '@atlaskit/editor-common/analytics';
|
|
6
5
|
import { isPerformanceAPIAvailable } from '@atlaskit/editor-common/is-performance-api-available';
|
|
7
6
|
import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
|
|
8
7
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
9
8
|
import { createAttachPayloadIntoTransaction } from './analytics-api/attach-payload-into-transaction';
|
|
9
|
+
import { editorAnalyticsChannel } from './consts';
|
|
10
10
|
import { analyticsPluginKey } from './plugin-key';
|
|
11
11
|
import { generateUndoRedoInputSoucePayload } from './undo-redo-input-source';
|
|
12
12
|
function createPlugin(options, featureFlags) {
|
|
@@ -84,6 +84,7 @@ const analyticsPlugin = ({
|
|
|
84
84
|
}) => {
|
|
85
85
|
var _api$featureFlags;
|
|
86
86
|
const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
87
|
+
const analyticsEventPropQueue = new Set();
|
|
87
88
|
return {
|
|
88
89
|
name: 'analytics',
|
|
89
90
|
getSharedState: editorState => {
|
|
@@ -106,13 +107,17 @@ const analyticsPlugin = ({
|
|
|
106
107
|
};
|
|
107
108
|
},
|
|
108
109
|
actions: {
|
|
109
|
-
attachAnalyticsEvent: (payload, channel =
|
|
110
|
+
attachAnalyticsEvent: (payload, channel = editorAnalyticsChannel) => tr => {
|
|
110
111
|
var _api$analytics$shared, _api$analytics;
|
|
111
112
|
const {
|
|
112
113
|
createAnalyticsEvent,
|
|
113
114
|
attachAnalyticsEvent
|
|
114
115
|
} = (_api$analytics$shared = api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.sharedState.currentState()) !== null && _api$analytics$shared !== void 0 ? _api$analytics$shared : {};
|
|
115
116
|
if (!tr || !createAnalyticsEvent || !attachAnalyticsEvent) {
|
|
117
|
+
analyticsEventPropQueue.add({
|
|
118
|
+
payload,
|
|
119
|
+
channel: channel
|
|
120
|
+
});
|
|
116
121
|
return false;
|
|
117
122
|
}
|
|
118
123
|
attachAnalyticsEvent({
|
|
@@ -128,6 +133,9 @@ const analyticsPlugin = ({
|
|
|
128
133
|
createAnalyticsEvent
|
|
129
134
|
} = (_api$analytics$shared2 = api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.sharedState.currentState()) !== null && _api$analytics$shared2 !== void 0 ? _api$analytics$shared2 : {};
|
|
130
135
|
if (!createAnalyticsEvent) {
|
|
136
|
+
analyticsEventPropQueue.add({
|
|
137
|
+
payload
|
|
138
|
+
});
|
|
131
139
|
return;
|
|
132
140
|
}
|
|
133
141
|
fireAnalyticsEvent(createAnalyticsEvent)({
|
|
@@ -152,6 +160,18 @@ const analyticsPlugin = ({
|
|
|
152
160
|
createAnalyticsEvent
|
|
153
161
|
});
|
|
154
162
|
dispatch(tr);
|
|
163
|
+
|
|
164
|
+
// Attach all analytics events to the transaction
|
|
165
|
+
analyticsEventPropQueue.forEach(({
|
|
166
|
+
payload,
|
|
167
|
+
channel
|
|
168
|
+
}) => {
|
|
169
|
+
var _createAnalyticsEvent;
|
|
170
|
+
(_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 ? void 0 : _createAnalyticsEvent.fire(channel !== null && channel !== void 0 ? channel : editorAnalyticsChannel);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// Clear the queue
|
|
174
|
+
analyticsEventPropQueue.clear();
|
|
155
175
|
}, [createAnalyticsEvent, editorView]);
|
|
156
176
|
},
|
|
157
177
|
pmPlugins() {
|
package/dist/esm/plugin.js
CHANGED
|
@@ -7,13 +7,13 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { useLayoutEffect } from 'react';
|
|
9
9
|
import { AnalyticsStep } from '@atlaskit/adf-schema/steps';
|
|
10
|
-
import { FabricChannel } from '@atlaskit/analytics-listeners/types';
|
|
11
10
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
12
11
|
import { ACTION, EVENT_TYPE, fireAnalyticsEvent as _fireAnalyticsEvent, getAnalyticsEventsFromTransaction } from '@atlaskit/editor-common/analytics';
|
|
13
12
|
import { isPerformanceAPIAvailable } from '@atlaskit/editor-common/is-performance-api-available';
|
|
14
13
|
import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
|
|
15
14
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
16
15
|
import { createAttachPayloadIntoTransaction } from './analytics-api/attach-payload-into-transaction';
|
|
16
|
+
import { editorAnalyticsChannel } from './consts';
|
|
17
17
|
import { analyticsPluginKey } from './plugin-key';
|
|
18
18
|
import { generateUndoRedoInputSoucePayload } from './undo-redo-input-source';
|
|
19
19
|
function createPlugin(options, featureFlags) {
|
|
@@ -98,6 +98,7 @@ var analyticsPlugin = function analyticsPlugin(_ref3) {
|
|
|
98
98
|
options = _ref3$config === void 0 ? {} : _ref3$config,
|
|
99
99
|
api = _ref3.api;
|
|
100
100
|
var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
101
|
+
var analyticsEventPropQueue = new Set();
|
|
101
102
|
return {
|
|
102
103
|
name: 'analytics',
|
|
103
104
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -120,13 +121,17 @@ var analyticsPlugin = function analyticsPlugin(_ref3) {
|
|
|
120
121
|
},
|
|
121
122
|
actions: {
|
|
122
123
|
attachAnalyticsEvent: function attachAnalyticsEvent(payload) {
|
|
123
|
-
var channel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] :
|
|
124
|
+
var channel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : editorAnalyticsChannel;
|
|
124
125
|
return function (tr) {
|
|
125
126
|
var _api$analytics$shared, _api$analytics;
|
|
126
127
|
var _ref5 = (_api$analytics$shared = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.sharedState.currentState()) !== null && _api$analytics$shared !== void 0 ? _api$analytics$shared : {},
|
|
127
128
|
createAnalyticsEvent = _ref5.createAnalyticsEvent,
|
|
128
129
|
attachAnalyticsEvent = _ref5.attachAnalyticsEvent;
|
|
129
130
|
if (!tr || !createAnalyticsEvent || !attachAnalyticsEvent) {
|
|
131
|
+
analyticsEventPropQueue.add({
|
|
132
|
+
payload: payload,
|
|
133
|
+
channel: channel
|
|
134
|
+
});
|
|
130
135
|
return false;
|
|
131
136
|
}
|
|
132
137
|
attachAnalyticsEvent({
|
|
@@ -142,6 +147,9 @@ var analyticsPlugin = function analyticsPlugin(_ref3) {
|
|
|
142
147
|
var _ref6 = (_api$analytics$shared2 = api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.sharedState.currentState()) !== null && _api$analytics$shared2 !== void 0 ? _api$analytics$shared2 : {},
|
|
143
148
|
createAnalyticsEvent = _ref6.createAnalyticsEvent;
|
|
144
149
|
if (!createAnalyticsEvent) {
|
|
150
|
+
analyticsEventPropQueue.add({
|
|
151
|
+
payload: payload
|
|
152
|
+
});
|
|
145
153
|
return;
|
|
146
154
|
}
|
|
147
155
|
_fireAnalyticsEvent(createAnalyticsEvent)({
|
|
@@ -160,6 +168,17 @@ var analyticsPlugin = function analyticsPlugin(_ref3) {
|
|
|
160
168
|
createAnalyticsEvent: createAnalyticsEvent
|
|
161
169
|
});
|
|
162
170
|
dispatch(tr);
|
|
171
|
+
|
|
172
|
+
// Attach all analytics events to the transaction
|
|
173
|
+
analyticsEventPropQueue.forEach(function (_ref8) {
|
|
174
|
+
var _createAnalyticsEvent;
|
|
175
|
+
var payload = _ref8.payload,
|
|
176
|
+
channel = _ref8.channel;
|
|
177
|
+
(_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 || _createAnalyticsEvent.fire(channel !== null && channel !== void 0 ? channel : editorAnalyticsChannel);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// Clear the queue
|
|
181
|
+
analyticsEventPropQueue.clear();
|
|
163
182
|
}, [createAnalyticsEvent, editorView]);
|
|
164
183
|
},
|
|
165
184
|
pmPlugins: function pmPlugins() {
|
|
@@ -170,10 +189,10 @@ var analyticsPlugin = function analyticsPlugin(_ref3) {
|
|
|
170
189
|
}
|
|
171
190
|
}];
|
|
172
191
|
},
|
|
173
|
-
onEditorViewStateUpdated: function onEditorViewStateUpdated(
|
|
174
|
-
var originalTransaction =
|
|
175
|
-
transactions =
|
|
176
|
-
newEditorState =
|
|
192
|
+
onEditorViewStateUpdated: function onEditorViewStateUpdated(_ref9) {
|
|
193
|
+
var originalTransaction = _ref9.originalTransaction,
|
|
194
|
+
transactions = _ref9.transactions,
|
|
195
|
+
newEditorState = _ref9.newEditorState;
|
|
177
196
|
var pluginState = analyticsPluginKey.getState(newEditorState);
|
|
178
197
|
if (!pluginState || !pluginState.createAnalyticsEvent) {
|
|
179
198
|
return;
|
|
@@ -194,9 +213,9 @@ var analyticsPlugin = function analyticsPlugin(_ref3) {
|
|
|
194
213
|
}
|
|
195
214
|
var createAnalyticsEvent = pluginState.createAnalyticsEvent;
|
|
196
215
|
var undoAnaltyicsEventTransformer = generateUndoRedoInputSoucePayload(originalTransaction);
|
|
197
|
-
steps.forEach(function (
|
|
198
|
-
var payload =
|
|
199
|
-
channel =
|
|
216
|
+
steps.forEach(function (_ref10) {
|
|
217
|
+
var payload = _ref10.payload,
|
|
218
|
+
channel = _ref10.channel;
|
|
200
219
|
var nextPayload = undoAnaltyicsEventTransformer(payload);
|
|
201
220
|
_fireAnalyticsEvent(createAnalyticsEvent)({
|
|
202
221
|
payload: nextPayload,
|
|
@@ -206,10 +225,10 @@ var analyticsPlugin = function analyticsPlugin(_ref3) {
|
|
|
206
225
|
}
|
|
207
226
|
};
|
|
208
227
|
};
|
|
209
|
-
export function extendPayload(
|
|
210
|
-
var payload =
|
|
211
|
-
duration =
|
|
212
|
-
distortedDuration =
|
|
228
|
+
export function extendPayload(_ref11) {
|
|
229
|
+
var payload = _ref11.payload,
|
|
230
|
+
duration = _ref11.duration,
|
|
231
|
+
distortedDuration = _ref11.distortedDuration;
|
|
213
232
|
return _objectSpread(_objectSpread({}, payload), {}, {
|
|
214
233
|
attributes: _objectSpread(_objectSpread({}, payload.attributes), {}, {
|
|
215
234
|
duration: duration,
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -10,7 +10,15 @@ export interface AnalyticsPluginOptions {
|
|
|
10
10
|
export type AnalyticsPlugin = NextEditorPlugin<'analytics', {
|
|
11
11
|
pluginConfiguration: AnalyticsPluginOptions;
|
|
12
12
|
sharedState: {
|
|
13
|
+
/**
|
|
14
|
+
* **Warning:** Do not use this directly. Use the `analyticsPlugin.actions`
|
|
15
|
+
* instead, as it will properly queue all events.
|
|
16
|
+
*/
|
|
13
17
|
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
18
|
+
/**
|
|
19
|
+
* **Warning:** Do not use this directly. Use the `analyticsPlugin.actions`
|
|
20
|
+
* instead, as it will properly queue all events.
|
|
21
|
+
*/
|
|
14
22
|
attachAnalyticsEvent: CreateAttachPayloadIntoTransaction | null;
|
|
15
23
|
performanceTracking: PerformanceTracking | undefined;
|
|
16
24
|
};
|
|
@@ -10,7 +10,15 @@ export interface AnalyticsPluginOptions {
|
|
|
10
10
|
export type AnalyticsPlugin = NextEditorPlugin<'analytics', {
|
|
11
11
|
pluginConfiguration: AnalyticsPluginOptions;
|
|
12
12
|
sharedState: {
|
|
13
|
+
/**
|
|
14
|
+
* **Warning:** Do not use this directly. Use the `analyticsPlugin.actions`
|
|
15
|
+
* instead, as it will properly queue all events.
|
|
16
|
+
*/
|
|
13
17
|
createAnalyticsEvent: CreateUIAnalyticsEvent | null;
|
|
18
|
+
/**
|
|
19
|
+
* **Warning:** Do not use this directly. Use the `analyticsPlugin.actions`
|
|
20
|
+
* instead, as it will properly queue all events.
|
|
21
|
+
*/
|
|
14
22
|
attachAnalyticsEvent: CreateAttachPayloadIntoTransaction | null;
|
|
15
23
|
performanceTracking: PerformanceTracking | undefined;
|
|
16
24
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-analytics",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.11",
|
|
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": "^40.9.0",
|
|
35
35
|
"@atlaskit/analytics-listeners": "^8.11.0",
|
|
36
36
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
37
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/editor-common": "^93.2.0",
|
|
38
38
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
40
40
|
"@atlaskit/editor-tables": "^2.8.0",
|