@atlaskit/editor-plugin-collab-edit 8.0.22 → 9.0.0
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 +14 -0
- package/dist/cjs/collabEditPlugin.js +17 -15
- package/dist/cjs/pm-plugins/track-step-metrics.js +1 -0
- package/dist/cjs/pm-plugins/track-steps.js +1 -1
- package/dist/es2019/collabEditPlugin.js +17 -15
- package/dist/es2019/pm-plugins/track-step-metrics.js +1 -0
- package/dist/es2019/pm-plugins/track-steps.js +1 -0
- package/dist/esm/collabEditPlugin.js +17 -15
- package/dist/esm/pm-plugins/track-step-metrics.js +1 -0
- package/dist/esm/pm-plugins/track-steps.js +1 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-collab-edit
|
|
2
2
|
|
|
3
|
+
## 9.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`71de71e52182e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/71de71e52182e) -
|
|
8
|
+
Remove @atlaskit/editor-plugin-ncs-metrics
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- [`71de71e52182e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/71de71e52182e) -
|
|
13
|
+
Add experiment platform_editor_remove_collab_step_metrics which removes step metrics writes to
|
|
14
|
+
local storage from collab edit plugin
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 8.0.22
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -288,21 +288,23 @@ var collabEditPlugin = exports.collabEditPlugin = function collabEditPlugin(_ref
|
|
|
288
288
|
hideTelecursorOnLoad: !isEmptyDoc && ((_options$hideTelecurs = options.hideTelecursorOnLoad) !== null && _options$hideTelecurs !== void 0 ? _options$hideTelecurs : false),
|
|
289
289
|
viewMode: viewMode
|
|
290
290
|
}), addErrorAnalytics);
|
|
291
|
-
(0,
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
291
|
+
if (!(0, _expValEquals.expValEquals)('platform_editor_remove_collab_step_metrics', 'isEnabled', true)) {
|
|
292
|
+
(0, _trackSteps.track)(_objectSpread(_objectSpread({
|
|
293
|
+
api: api
|
|
294
|
+
}, props), {}, {
|
|
295
|
+
onTrackDataProcessed: function onTrackDataProcessed(steps) {
|
|
296
|
+
var _api$analytics3;
|
|
297
|
+
api === null || api === void 0 || (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 || (_api$analytics3 = _api$analytics3.actions) === null || _api$analytics3 === void 0 || _api$analytics3.fireAnalyticsEvent({
|
|
298
|
+
action: _analytics.ACTION.STEPS_TRACKED,
|
|
299
|
+
actionSubject: _analytics.ACTION_SUBJECT.COLLAB,
|
|
300
|
+
attributes: {
|
|
301
|
+
steps: steps
|
|
302
|
+
},
|
|
303
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
}));
|
|
307
|
+
}
|
|
306
308
|
if ((0, _platformFeatureFlags.fg)('platform_editor_collab_organic_change_reporting')) {
|
|
307
309
|
(0, _monitorOrganicChanges.monitorOrganic)(_objectSpread(_objectSpread({
|
|
308
310
|
api: api
|
|
@@ -58,6 +58,7 @@ var updateNcsActiveSessions = exports.updateNcsActiveSessions = function updateN
|
|
|
58
58
|
storageClient.setItemWithExpiry(_ncsStepMetrics.NCS_STORAGE.NCS_ACTIVE_SESSIONS, JSON.stringify(_objectSpread(_objectSpread({}, currentActiveSessions), {}, (0, _defineProperty2.default)({}, sessionId, true))));
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
+
// delete this function when cleaning up platform_editor_remove_collab_step_metrics
|
|
61
62
|
/**
|
|
62
63
|
* Updates the step session metrics in local storage for a given session ID.
|
|
63
64
|
* It calculates the metrics based on the provided steps and updates the storage.
|
|
@@ -13,7 +13,7 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
|
13
13
|
var _trackStepMetrics = require("./track-step-metrics");
|
|
14
14
|
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; } } }; }
|
|
15
15
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
16
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
16
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } // delete this file when cleaning up platform_editor_remove_collab_step_metrics
|
|
17
17
|
function groupBy(array, keyGetter) {
|
|
18
18
|
// Check group by exists, and that it's a function. If so, use the native browser code
|
|
19
19
|
if ('groupBy' in Object && typeof Object.groupBy === 'function') {
|
|
@@ -236,21 +236,23 @@ export const collabEditPlugin = ({
|
|
|
236
236
|
hideTelecursorOnLoad: !isEmptyDoc && ((_options$hideTelecurs = options.hideTelecursorOnLoad) !== null && _options$hideTelecurs !== void 0 ? _options$hideTelecurs : false),
|
|
237
237
|
viewMode
|
|
238
238
|
}), addErrorAnalytics);
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
239
|
+
if (!expValEquals('platform_editor_remove_collab_step_metrics', 'isEnabled', true)) {
|
|
240
|
+
track({
|
|
241
|
+
api,
|
|
242
|
+
...props,
|
|
243
|
+
onTrackDataProcessed: steps => {
|
|
244
|
+
var _api$analytics3, _api$analytics3$actio;
|
|
245
|
+
api === null || api === void 0 ? void 0 : (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : (_api$analytics3$actio = _api$analytics3.actions) === null || _api$analytics3$actio === void 0 ? void 0 : _api$analytics3$actio.fireAnalyticsEvent({
|
|
246
|
+
action: ACTION.STEPS_TRACKED,
|
|
247
|
+
actionSubject: ACTION_SUBJECT.COLLAB,
|
|
248
|
+
attributes: {
|
|
249
|
+
steps
|
|
250
|
+
},
|
|
251
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
}
|
|
254
256
|
if (fg('platform_editor_collab_organic_change_reporting')) {
|
|
255
257
|
monitorOrganic({
|
|
256
258
|
api,
|
|
@@ -51,6 +51,7 @@ export const updateNcsActiveSessions = sessionId => {
|
|
|
51
51
|
}));
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
+
// delete this function when cleaning up platform_editor_remove_collab_step_metrics
|
|
54
55
|
/**
|
|
55
56
|
* Updates the step session metrics in local storage for a given session ID.
|
|
56
57
|
* It calculates the metrics based on the provided steps and updates the storage.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// delete this file when cleaning up platform_editor_remove_collab_step_metrics
|
|
1
2
|
import { AnalyticsStep, SetAttrsStep, BatchAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
2
3
|
import { AddMarkStep, AddNodeMarkStep, AttrStep, DocAttrStep, RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
3
4
|
import { sendableSteps } from '@atlaskit/prosemirror-collab';
|
|
@@ -281,21 +281,23 @@ export var collabEditPlugin = function collabEditPlugin(_ref4) {
|
|
|
281
281
|
hideTelecursorOnLoad: !isEmptyDoc && ((_options$hideTelecurs = options.hideTelecursorOnLoad) !== null && _options$hideTelecurs !== void 0 ? _options$hideTelecurs : false),
|
|
282
282
|
viewMode: viewMode
|
|
283
283
|
}), addErrorAnalytics);
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
284
|
+
if (!expValEquals('platform_editor_remove_collab_step_metrics', 'isEnabled', true)) {
|
|
285
|
+
track(_objectSpread(_objectSpread({
|
|
286
|
+
api: api
|
|
287
|
+
}, props), {}, {
|
|
288
|
+
onTrackDataProcessed: function onTrackDataProcessed(steps) {
|
|
289
|
+
var _api$analytics3;
|
|
290
|
+
api === null || api === void 0 || (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 || (_api$analytics3 = _api$analytics3.actions) === null || _api$analytics3 === void 0 || _api$analytics3.fireAnalyticsEvent({
|
|
291
|
+
action: ACTION.STEPS_TRACKED,
|
|
292
|
+
actionSubject: ACTION_SUBJECT.COLLAB,
|
|
293
|
+
attributes: {
|
|
294
|
+
steps: steps
|
|
295
|
+
},
|
|
296
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
}));
|
|
300
|
+
}
|
|
299
301
|
if (fg('platform_editor_collab_organic_change_reporting')) {
|
|
300
302
|
monitorOrganic(_objectSpread(_objectSpread({
|
|
301
303
|
api: api
|
|
@@ -51,6 +51,7 @@ export var updateNcsActiveSessions = function updateNcsActiveSessions(sessionId)
|
|
|
51
51
|
storageClient.setItemWithExpiry(NCS_STORAGE.NCS_ACTIVE_SESSIONS, JSON.stringify(_objectSpread(_objectSpread({}, currentActiveSessions), {}, _defineProperty({}, sessionId, true))));
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
+
// delete this function when cleaning up platform_editor_remove_collab_step_metrics
|
|
54
55
|
/**
|
|
55
56
|
* Updates the step session metrics in local storage for a given session ID.
|
|
56
57
|
* It calculates the metrics based on the provided steps and updates the storage.
|
|
@@ -2,6 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
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; } } }; }
|
|
3
3
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
4
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
// delete this file when cleaning up platform_editor_remove_collab_step_metrics
|
|
5
6
|
import { AnalyticsStep, SetAttrsStep, BatchAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
6
7
|
import { AddMarkStep, AddNodeMarkStep, AttrStep, DocAttrStep, RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
7
8
|
import { sendableSteps } from '@atlaskit/prosemirror-collab';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-collab-edit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Collab Edit plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,22 +30,22 @@
|
|
|
30
30
|
"@atlaskit/adf-schema": "^52.2.0",
|
|
31
31
|
"@atlaskit/custom-steps": "^0.16.0",
|
|
32
32
|
"@atlaskit/editor-json-transformer": "^8.31.0",
|
|
33
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
34
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
35
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
36
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
33
|
+
"@atlaskit/editor-plugin-analytics": "^8.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-connectivity": "^8.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^10.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-feature-flags": "^7.0.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
39
39
|
"@atlaskit/frontend-utilities": "^3.2.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
41
41
|
"@atlaskit/prosemirror-collab": "^0.22.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^35.
|
|
43
|
-
"@atlaskit/tokens": "^11.
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^35.10.0",
|
|
43
|
+
"@atlaskit/tokens": "^11.1.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"memoize-one": "^6.0.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@atlaskit/editor-common": "^
|
|
48
|
+
"@atlaskit/editor-common": "^112.0.0",
|
|
49
49
|
"react": "^18.2.0",
|
|
50
50
|
"react-dom": "^18.2.0"
|
|
51
51
|
},
|