@atlaskit/editor-plugin-collab-edit 1.8.6 → 1.9.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/track-steps.js +4 -0
- package/dist/es2019/track-steps.js +4 -0
- package/dist/esm/track-steps.js +4 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-collab-edit
|
|
2
2
|
|
|
3
|
+
## 1.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#121784](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/121784)
|
|
8
|
+
[`af7f2ef6f68ab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/af7f2ef6f68ab) -
|
|
9
|
+
Improved steps analytics
|
|
10
|
+
|
|
11
|
+
## 1.8.7
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 1.8.6
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/track-steps.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.track = exports.task = exports.sanitizeStep = exports.groupSteps = void 0;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _steps = require("@atlaskit/adf-schema/steps");
|
|
9
10
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
10
11
|
var _prosemirrorCollab = require("@atlaskit/prosemirror-collab");
|
|
11
12
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
@@ -50,6 +51,9 @@ var sanitizeStep = exports.sanitizeStep = function sanitizeStep(step) {
|
|
|
50
51
|
};
|
|
51
52
|
if (step instanceof _transform.AttrStep || step instanceof _transform.DocAttrStep) {
|
|
52
53
|
sanitizedStep.attr = step.attr;
|
|
54
|
+
} else if (step instanceof _steps.SetAttrsStep) {
|
|
55
|
+
// Combines all attrs keys separated by _ to one single string
|
|
56
|
+
sanitizedStep.attr = Object.keys(step.attrs).sort().join('_');
|
|
53
57
|
} else if (step instanceof _transform.AddMarkStep || step instanceof _transform.RemoveMarkStep || step instanceof _transform.RemoveNodeMarkStep || step instanceof _transform.AddNodeMarkStep) {
|
|
54
58
|
sanitizedStep.markType = step.mark.type.name;
|
|
55
59
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
1
2
|
import { AddMarkStep, AddNodeMarkStep, AttrStep, DocAttrStep, RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
2
3
|
import { sendableSteps } from '@atlaskit/prosemirror-collab';
|
|
3
4
|
function groupBy(array, keyGetter) {
|
|
@@ -39,6 +40,9 @@ export const sanitizeStep = step => {
|
|
|
39
40
|
};
|
|
40
41
|
if (step instanceof AttrStep || step instanceof DocAttrStep) {
|
|
41
42
|
sanitizedStep.attr = step.attr;
|
|
43
|
+
} else if (step instanceof SetAttrsStep) {
|
|
44
|
+
// Combines all attrs keys separated by _ to one single string
|
|
45
|
+
sanitizedStep.attr = Object.keys(step.attrs).sort().join('_');
|
|
42
46
|
} else if (step instanceof AddMarkStep || step instanceof RemoveMarkStep || step instanceof RemoveNodeMarkStep || step instanceof AddNodeMarkStep) {
|
|
43
47
|
sanitizedStep.markType = step.mark.type.name;
|
|
44
48
|
}
|
package/dist/esm/track-steps.js
CHANGED
|
@@ -2,6 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
3
3
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
5
6
|
import { AddMarkStep, AddNodeMarkStep, AttrStep, DocAttrStep, RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
6
7
|
import { sendableSteps } from '@atlaskit/prosemirror-collab';
|
|
7
8
|
function groupBy(array, keyGetter) {
|
|
@@ -43,6 +44,9 @@ export var sanitizeStep = function sanitizeStep(step) {
|
|
|
43
44
|
};
|
|
44
45
|
if (step instanceof AttrStep || step instanceof DocAttrStep) {
|
|
45
46
|
sanitizedStep.attr = step.attr;
|
|
47
|
+
} else if (step instanceof SetAttrsStep) {
|
|
48
|
+
// Combines all attrs keys separated by _ to one single string
|
|
49
|
+
sanitizedStep.attr = Object.keys(step.attrs).sort().join('_');
|
|
46
50
|
} else if (step instanceof AddMarkStep || step instanceof RemoveMarkStep || step instanceof RemoveNodeMarkStep || step instanceof AddNodeMarkStep) {
|
|
47
51
|
sanitizedStep.markType = step.mark.type.name;
|
|
48
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-collab-edit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "Collab Edit plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/adf-schema": "^39.0.3",
|
|
36
36
|
"@atlaskit/custom-steps": "^0.4.0",
|
|
37
|
-
"@atlaskit/editor-common": "^
|
|
38
|
-
"@atlaskit/editor-plugin-analytics": "1.4.
|
|
37
|
+
"@atlaskit/editor-common": "^86.2.0",
|
|
38
|
+
"@atlaskit/editor-plugin-analytics": "1.4.4",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^2.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-feature-flags": "^1.1.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "4.0.1",
|