@atlaskit/editor-core 204.5.4 → 204.5.5
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 +9 -0
- package/dist/cjs/utils/extensions.js +8 -18
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/utils/extensions.js +8 -18
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/utils/extensions.js +8 -18
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 204.5.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#129005](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/129005)
|
|
8
|
+
[`faf7b7b63e80f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/faf7b7b63e80f) -
|
|
9
|
+
Cleanup feature gate for exposing the extension api to the quick insert callback.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 204.5.4
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -89,24 +89,14 @@ function _extensionProviderToQuickInsertProvider() {
|
|
|
89
89
|
isDisabledOffline: true,
|
|
90
90
|
action: function action(insert, state, source) {
|
|
91
91
|
if (typeof item.node === 'function') {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
(0, _extensions.resolveImport)(item.node(extensionAPI)).then(function (node) {
|
|
101
|
-
sendExtensionQuickInsertAnalytics(item, state.selection, createAnalyticsEvent, source);
|
|
102
|
-
if (node) {
|
|
103
|
-
editorActions.replaceSelection(node);
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
} else {
|
|
108
|
-
// @ts-expect-error No longer supported without extension API - this will be removed once we cleanup the FG.
|
|
109
|
-
(0, _extensions.resolveImport)(item.node()).then(function (node) {
|
|
92
|
+
var _apiRef$current;
|
|
93
|
+
var extensionAPI = apiRef === null || apiRef === void 0 || (_apiRef$current = apiRef.current) === null || _apiRef$current === void 0 || (_apiRef$current = _apiRef$current.extension) === null || _apiRef$current === void 0 || (_apiRef$current = _apiRef$current.actions) === null || _apiRef$current === void 0 ? void 0 : _apiRef$current.api();
|
|
94
|
+
// While the api can be "undefined" there are no runtime scenarios where this is the case because:
|
|
95
|
+
// - The quick insert API can only be called from an active editor
|
|
96
|
+
// - The extension module handler can only be called from an active editor with the extension plugin
|
|
97
|
+
// Therefore this should always be run unless there is something very wrong.
|
|
98
|
+
if (extensionAPI) {
|
|
99
|
+
(0, _extensions.resolveImport)(item.node(extensionAPI)).then(function (node) {
|
|
110
100
|
sendExtensionQuickInsertAnalytics(item, state.selection, createAnalyticsEvent, source);
|
|
111
101
|
if (node) {
|
|
112
102
|
editorActions.replaceSelection(node);
|
|
@@ -61,24 +61,14 @@ export async function extensionProviderToQuickInsertProvider(extensionProvider,
|
|
|
61
61
|
isDisabledOffline: true,
|
|
62
62
|
action: (insert, state, source) => {
|
|
63
63
|
if (typeof item.node === 'function') {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
resolveImport(item.node(extensionAPI)).then(node => {
|
|
73
|
-
sendExtensionQuickInsertAnalytics(item, state.selection, createAnalyticsEvent, source);
|
|
74
|
-
if (node) {
|
|
75
|
-
editorActions.replaceSelection(node);
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
} else {
|
|
80
|
-
// @ts-expect-error No longer supported without extension API - this will be removed once we cleanup the FG.
|
|
81
|
-
resolveImport(item.node()).then(node => {
|
|
64
|
+
var _apiRef$current, _apiRef$current$exten, _apiRef$current$exten2;
|
|
65
|
+
const extensionAPI = apiRef === null || apiRef === void 0 ? void 0 : (_apiRef$current = apiRef.current) === null || _apiRef$current === void 0 ? void 0 : (_apiRef$current$exten = _apiRef$current.extension) === null || _apiRef$current$exten === void 0 ? void 0 : (_apiRef$current$exten2 = _apiRef$current$exten.actions) === null || _apiRef$current$exten2 === void 0 ? void 0 : _apiRef$current$exten2.api();
|
|
66
|
+
// While the api can be "undefined" there are no runtime scenarios where this is the case because:
|
|
67
|
+
// - The quick insert API can only be called from an active editor
|
|
68
|
+
// - The extension module handler can only be called from an active editor with the extension plugin
|
|
69
|
+
// Therefore this should always be run unless there is something very wrong.
|
|
70
|
+
if (extensionAPI) {
|
|
71
|
+
resolveImport(item.node(extensionAPI)).then(node => {
|
|
82
72
|
sendExtensionQuickInsertAnalytics(item, state.selection, createAnalyticsEvent, source);
|
|
83
73
|
if (node) {
|
|
84
74
|
editorActions.replaceSelection(node);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "204.5.
|
|
2
|
+
export const version = "204.5.5";
|
|
@@ -83,24 +83,14 @@ function _extensionProviderToQuickInsertProvider() {
|
|
|
83
83
|
isDisabledOffline: true,
|
|
84
84
|
action: function action(insert, state, source) {
|
|
85
85
|
if (typeof item.node === 'function') {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
resolveImport(item.node(extensionAPI)).then(function (node) {
|
|
95
|
-
sendExtensionQuickInsertAnalytics(item, state.selection, createAnalyticsEvent, source);
|
|
96
|
-
if (node) {
|
|
97
|
-
editorActions.replaceSelection(node);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
} else {
|
|
102
|
-
// @ts-expect-error No longer supported without extension API - this will be removed once we cleanup the FG.
|
|
103
|
-
resolveImport(item.node()).then(function (node) {
|
|
86
|
+
var _apiRef$current;
|
|
87
|
+
var extensionAPI = apiRef === null || apiRef === void 0 || (_apiRef$current = apiRef.current) === null || _apiRef$current === void 0 || (_apiRef$current = _apiRef$current.extension) === null || _apiRef$current === void 0 || (_apiRef$current = _apiRef$current.actions) === null || _apiRef$current === void 0 ? void 0 : _apiRef$current.api();
|
|
88
|
+
// While the api can be "undefined" there are no runtime scenarios where this is the case because:
|
|
89
|
+
// - The quick insert API can only be called from an active editor
|
|
90
|
+
// - The extension module handler can only be called from an active editor with the extension plugin
|
|
91
|
+
// Therefore this should always be run unless there is something very wrong.
|
|
92
|
+
if (extensionAPI) {
|
|
93
|
+
resolveImport(item.node(extensionAPI)).then(function (node) {
|
|
104
94
|
sendExtensionQuickInsertAnalytics(item, state.selection, createAnalyticsEvent, source);
|
|
105
95
|
if (node) {
|
|
106
96
|
editorActions.replaceSelection(node);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "204.5.
|
|
2
|
+
export var version = "204.5.5";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "204.5.
|
|
3
|
+
"version": "204.5.5",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@atlaskit/media-core": "^35.0.0",
|
|
99
99
|
"@atlaskit/media-integration-test-helpers": "^4.0.0",
|
|
100
100
|
"@atlaskit/media-test-helpers": "^35.0.0",
|
|
101
|
-
"@atlaskit/modal-dialog": "^13.
|
|
101
|
+
"@atlaskit/modal-dialog": "^13.4.0",
|
|
102
102
|
"@atlaskit/primitives": "^14.2.0",
|
|
103
103
|
"@atlaskit/renderer": "^114.4.0",
|
|
104
104
|
"@atlaskit/smart-card": "^36.0.0",
|
|
@@ -281,9 +281,6 @@
|
|
|
281
281
|
"platform_editor_disable_rerender_tracking_jira": {
|
|
282
282
|
"type": "boolean"
|
|
283
283
|
},
|
|
284
|
-
"platform_editor_add_extension_api_to_quick_insert": {
|
|
285
|
-
"type": "boolean"
|
|
286
|
-
},
|
|
287
284
|
"platform-component-visual-refresh": {
|
|
288
285
|
"type": "boolean",
|
|
289
286
|
"referenceOnly": true
|