@atlaskit/editor-core 204.4.7 → 204.4.8
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 +13 -0
- package/dist/cjs/actions/index.js +49 -44
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/actions/index.js +2 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/actions/index.js +49 -44
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/actions/index.d.ts +2 -2
- package/dist/types-ts4.5/actions/index.d.ts +2 -2
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 204.4.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#124114](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/124114)
|
|
8
|
+
[`a0b9383dc1bf3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a0b9383dc1bf3) -
|
|
9
|
+
CEPS-362: add reason to getResolvedEditorState call chain, to allow collab provider/NCS to
|
|
10
|
+
differentiate between draft sync and publish use cases
|
|
11
|
+
- [#125450](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/125450)
|
|
12
|
+
[`e3e99633b852e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e3e99633b852e) -
|
|
13
|
+
[ux] ED-26944 fix indentation in list for non macro bodied extension
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 204.4.7
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -55,50 +55,55 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
|
|
|
55
55
|
* refers to the latest state of editor with confirmed
|
|
56
56
|
* steps.
|
|
57
57
|
*/
|
|
58
|
-
(0, _defineProperty2.default)(this, "getResolvedEditorState", /*#__PURE__*/
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
58
|
+
(0, _defineProperty2.default)(this, "getResolvedEditorState", /*#__PURE__*/function () {
|
|
59
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(reason) {
|
|
60
|
+
var _this$getFeatureFlags, useNativeCollabPlugin, editorValue, editorView, collabEditState;
|
|
61
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
62
|
+
while (1) switch (_context.prev = _context.next) {
|
|
63
|
+
case 0:
|
|
64
|
+
_this$getFeatureFlags = _this.getFeatureFlags(), useNativeCollabPlugin = _this$getFeatureFlags.useNativeCollabPlugin;
|
|
65
|
+
if (_this.editorView) {
|
|
66
|
+
_context.next = 3;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
throw new Error('Called getResolvedEditorState before editorView is ready');
|
|
70
|
+
case 3:
|
|
71
|
+
if (useNativeCollabPlugin) {
|
|
72
|
+
_context.next = 10;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
_context.next = 6;
|
|
76
|
+
return _this.getValue();
|
|
77
|
+
case 6:
|
|
78
|
+
editorValue = _context.sent;
|
|
79
|
+
if (editorValue) {
|
|
80
|
+
_context.next = 9;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
throw new Error('editorValue is undefined');
|
|
84
|
+
case 9:
|
|
85
|
+
return _context.abrupt("return", {
|
|
86
|
+
content: editorValue,
|
|
87
|
+
title: null,
|
|
88
|
+
stepVersion: -1
|
|
89
|
+
});
|
|
90
|
+
case 10:
|
|
91
|
+
editorView = _this.editorView;
|
|
92
|
+
_context.next = 13;
|
|
93
|
+
return (0, _action.getEditorValueWithMedia)(editorView);
|
|
94
|
+
case 13:
|
|
95
|
+
collabEditState = fakePluginKey.getState(editorView.state);
|
|
96
|
+
return _context.abrupt("return", collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.getFinalAcknowledgedState(reason));
|
|
97
|
+
case 15:
|
|
98
|
+
case "end":
|
|
99
|
+
return _context.stop();
|
|
100
|
+
}
|
|
101
|
+
}, _callee);
|
|
102
|
+
}));
|
|
103
|
+
return function (_x) {
|
|
104
|
+
return _ref.apply(this, arguments);
|
|
105
|
+
};
|
|
106
|
+
}());
|
|
102
107
|
}
|
|
103
108
|
return (0, _createClass2.default)(EditorActions, [{
|
|
104
109
|
key: "_privateGetEditorView",
|
|
@@ -43,7 +43,7 @@ export default class EditorActions {
|
|
|
43
43
|
* refers to the latest state of editor with confirmed
|
|
44
44
|
* steps.
|
|
45
45
|
*/
|
|
46
|
-
_defineProperty(this, "getResolvedEditorState", async
|
|
46
|
+
_defineProperty(this, "getResolvedEditorState", async reason => {
|
|
47
47
|
const {
|
|
48
48
|
useNativeCollabPlugin
|
|
49
49
|
} = this.getFeatureFlags();
|
|
@@ -64,7 +64,7 @@ export default class EditorActions {
|
|
|
64
64
|
const editorView = this.editorView;
|
|
65
65
|
await getEditorValueWithMedia(editorView);
|
|
66
66
|
const collabEditState = fakePluginKey.getState(editorView.state);
|
|
67
|
-
return collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.getFinalAcknowledgedState();
|
|
67
|
+
return collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.getFinalAcknowledgedState(reason);
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
static from(view, eventDispatcher, transformer) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "204.4.
|
|
2
|
+
export const version = "204.4.8";
|
|
@@ -49,50 +49,55 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
49
49
|
* refers to the latest state of editor with confirmed
|
|
50
50
|
* steps.
|
|
51
51
|
*/
|
|
52
|
-
_defineProperty(this, "getResolvedEditorState", /*#__PURE__*/
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
52
|
+
_defineProperty(this, "getResolvedEditorState", /*#__PURE__*/function () {
|
|
53
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(reason) {
|
|
54
|
+
var _this$getFeatureFlags, useNativeCollabPlugin, editorValue, editorView, collabEditState;
|
|
55
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
56
|
+
while (1) switch (_context.prev = _context.next) {
|
|
57
|
+
case 0:
|
|
58
|
+
_this$getFeatureFlags = _this.getFeatureFlags(), useNativeCollabPlugin = _this$getFeatureFlags.useNativeCollabPlugin;
|
|
59
|
+
if (_this.editorView) {
|
|
60
|
+
_context.next = 3;
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
throw new Error('Called getResolvedEditorState before editorView is ready');
|
|
64
|
+
case 3:
|
|
65
|
+
if (useNativeCollabPlugin) {
|
|
66
|
+
_context.next = 10;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
_context.next = 6;
|
|
70
|
+
return _this.getValue();
|
|
71
|
+
case 6:
|
|
72
|
+
editorValue = _context.sent;
|
|
73
|
+
if (editorValue) {
|
|
74
|
+
_context.next = 9;
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
throw new Error('editorValue is undefined');
|
|
78
|
+
case 9:
|
|
79
|
+
return _context.abrupt("return", {
|
|
80
|
+
content: editorValue,
|
|
81
|
+
title: null,
|
|
82
|
+
stepVersion: -1
|
|
83
|
+
});
|
|
84
|
+
case 10:
|
|
85
|
+
editorView = _this.editorView;
|
|
86
|
+
_context.next = 13;
|
|
87
|
+
return getEditorValueWithMedia(editorView);
|
|
88
|
+
case 13:
|
|
89
|
+
collabEditState = fakePluginKey.getState(editorView.state);
|
|
90
|
+
return _context.abrupt("return", collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.getFinalAcknowledgedState(reason));
|
|
91
|
+
case 15:
|
|
92
|
+
case "end":
|
|
93
|
+
return _context.stop();
|
|
94
|
+
}
|
|
95
|
+
}, _callee);
|
|
96
|
+
}));
|
|
97
|
+
return function (_x) {
|
|
98
|
+
return _ref.apply(this, arguments);
|
|
99
|
+
};
|
|
100
|
+
}());
|
|
96
101
|
}
|
|
97
102
|
return _createClass(EditorActions, [{
|
|
98
103
|
key: "_privateGetEditorView",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "204.4.
|
|
2
|
+
export var version = "204.4.8";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AnalyticsEventPayload } from '@atlaskit/analytics-next/AnalyticsEvent';
|
|
2
2
|
import type { ResolvedEditorState } from '@atlaskit/editor-common/collab';
|
|
3
3
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
|
-
import type { ContextUpdateHandler, EditorActionsOptions, FeatureFlags, ReplaceRawValue, Transformer } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { ContextUpdateHandler, EditorActionsOptions, FeatureFlags, ReplaceRawValue, GetResolvedEditorStateReason, Transformer } from '@atlaskit/editor-common/types';
|
|
5
5
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
export default class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
@@ -64,5 +64,5 @@ export default class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
|
64
64
|
* refers to the latest state of editor with confirmed
|
|
65
65
|
* steps.
|
|
66
66
|
*/
|
|
67
|
-
getResolvedEditorState: () => Promise<ResolvedEditorState | undefined>;
|
|
67
|
+
getResolvedEditorState: (reason: GetResolvedEditorStateReason) => Promise<ResolvedEditorState | undefined>;
|
|
68
68
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AnalyticsEventPayload } from '@atlaskit/analytics-next/AnalyticsEvent';
|
|
2
2
|
import type { ResolvedEditorState } from '@atlaskit/editor-common/collab';
|
|
3
3
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
|
-
import type { ContextUpdateHandler, EditorActionsOptions, FeatureFlags, ReplaceRawValue, Transformer } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { ContextUpdateHandler, EditorActionsOptions, FeatureFlags, ReplaceRawValue, GetResolvedEditorStateReason, Transformer } from '@atlaskit/editor-common/types';
|
|
5
5
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
export default class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
@@ -64,5 +64,5 @@ export default class EditorActions<T = any> implements EditorActionsOptions<T> {
|
|
|
64
64
|
* refers to the latest state of editor with confirmed
|
|
65
65
|
* steps.
|
|
66
66
|
*/
|
|
67
|
-
getResolvedEditorState: () => Promise<ResolvedEditorState | undefined>;
|
|
67
|
+
getResolvedEditorState: (reason: GetResolvedEditorStateReason) => Promise<ResolvedEditorState | undefined>;
|
|
68
68
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "204.4.
|
|
3
|
+
"version": "204.4.8",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/mention": "^24.1.0",
|
|
60
60
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
61
61
|
"@atlaskit/react-ufo": "^3.4.0",
|
|
62
|
-
"@atlaskit/task-decision": "^19.
|
|
62
|
+
"@atlaskit/task-decision": "^19.1.0",
|
|
63
63
|
"@atlaskit/tmp-editor-statsig": "^3.6.0",
|
|
64
64
|
"@atlaskit/tokens": "^4.4.0",
|
|
65
65
|
"@atlaskit/tooltip": "^20.0.0",
|
|
@@ -539,6 +539,10 @@
|
|
|
539
539
|
"type": "boolean",
|
|
540
540
|
"referenceOnly": true
|
|
541
541
|
},
|
|
542
|
+
"platform_editor_non_macros_list_indent_fix": {
|
|
543
|
+
"type": "boolean",
|
|
544
|
+
"referenceOnly": true
|
|
545
|
+
},
|
|
542
546
|
"platform_editor_remove_drag_handle_fix": {
|
|
543
547
|
"type": "boolean",
|
|
544
548
|
"referenceOnly": true
|