@atlaskit/editor-core 217.2.0 → 217.4.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 +22 -0
- package/dist/cjs/create-editor/ReactEditorView.js +7 -15
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +2 -7
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +7 -15
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +4 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 217.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`abc8407f36ad1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/abc8407f36ad1) -
|
|
8
|
+
cleanup platform_editor_no_state_plugin_injection_api
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 217.3.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [`71fb8b5aa2558`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/71fb8b5aa2558) -
|
|
19
|
+
[FFCLEANUP-79003] clean up feature flag platform_editor_blocktaskitem_patch_2
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 217.2.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
@@ -8,8 +8,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.ReactEditorView = ReactEditorView;
|
|
9
9
|
exports.default = void 0;
|
|
10
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _reactIntlNext = require("react-intl-next");
|
|
15
15
|
var _v = _interopRequireDefault(require("uuid/v4"));
|
|
@@ -35,7 +35,6 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
35
35
|
var _interactionIdContext = require("@atlaskit/react-ufo/interaction-id-context");
|
|
36
36
|
var _interactionMetrics = require("@atlaskit/react-ufo/interaction-metrics");
|
|
37
37
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
38
|
-
var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
|
|
39
38
|
var _useProviders = require("../composable-editor/hooks/useProviders");
|
|
40
39
|
var _featureFlagsFromProps = require("../utils/feature-flags-from-props");
|
|
41
40
|
var _getNodesCount = require("../utils/getNodesCount");
|
|
@@ -80,10 +79,6 @@ function ReactEditorView(props) {
|
|
|
80
79
|
__livePage = _props$editorProps.__livePage,
|
|
81
80
|
onEditorCreated = props.onEditorCreated,
|
|
82
81
|
onEditorDestroyed = props.onEditorDestroyed;
|
|
83
|
-
var _useState = (0, _react.useState)(undefined),
|
|
84
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
85
|
-
editorAPI = _useState2[0],
|
|
86
|
-
setEditorAPI = _useState2[1];
|
|
87
82
|
var ssrEditorStateRef = (0, _react.useRef)(undefined);
|
|
88
83
|
var editorRef = (0, _react.useRef)(null);
|
|
89
84
|
var viewRef = (0, _react.useRef)();
|
|
@@ -177,9 +172,6 @@ function ReactEditorView(props) {
|
|
|
177
172
|
} else {
|
|
178
173
|
config.current = (0, _createEditor.processPluginsList)((0, _createPluginsList.default)(options.props.preset, 'allowBlockType' in props.editorProps ? props.editorProps : {}, pluginInjectionAPI.current));
|
|
179
174
|
schema = (0, _createSchema.createSchema)(config.current);
|
|
180
|
-
if (!(0, _expVal.expVal)('platform_editor_no_state_plugin_injection_api', 'isEnabled', false)) {
|
|
181
|
-
setEditorAPI(pluginInjectionAPI.current.api());
|
|
182
|
-
}
|
|
183
175
|
}
|
|
184
176
|
var contentTransformerProvider = options.props.editorProps.contentTransformerProvider;
|
|
185
177
|
var plugins = (0, _createEditor.createPMPlugins)({
|
|
@@ -426,7 +418,7 @@ function ReactEditorView(props) {
|
|
|
426
418
|
|
|
427
419
|
// Temporary to replace provider factory while migration to `ComposableEditor` occurs
|
|
428
420
|
(0, _useProviders.useProviders)({
|
|
429
|
-
editorApi:
|
|
421
|
+
editorApi: pluginInjectionAPI.current.api(),
|
|
430
422
|
contextIdentifierProvider: props.editorProps.contextIdentifierProvider,
|
|
431
423
|
mediaProvider: (_media = props.editorProps.media) === null || _media === void 0 ? void 0 : _media.provider,
|
|
432
424
|
mentionProvider: props.editorProps.mentionProvider,
|
|
@@ -580,10 +572,10 @@ function ReactEditorView(props) {
|
|
|
580
572
|
});
|
|
581
573
|
return view;
|
|
582
574
|
}, [getDirectEditorProps, dispatchAnalyticsEvent]);
|
|
583
|
-
var
|
|
584
|
-
|
|
585
|
-
editorView =
|
|
586
|
-
setEditorView =
|
|
575
|
+
var _useState = (0, _react.useState)(undefined),
|
|
576
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
577
|
+
editorView = _useState2[0],
|
|
578
|
+
setEditorView = _useState2[1];
|
|
587
579
|
|
|
588
580
|
// Detects if the editor is nested inside an extension - ie. it is a Legacy Content Extension (LCE)
|
|
589
581
|
var isNestedEditor = (0, _react.useRef)(null);
|
|
@@ -931,7 +923,7 @@ function ReactEditorView(props) {
|
|
|
931
923
|
transformer: contentTransformer.current,
|
|
932
924
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
933
925
|
editorRef: editorRef,
|
|
934
|
-
editorAPI:
|
|
926
|
+
editorAPI: pluginInjectionAPI.current.api()
|
|
935
927
|
})) !== null && _props$render !== void 0 ? _props$render : editor : editor));
|
|
936
928
|
}
|
|
937
929
|
|
|
@@ -24,7 +24,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
24
24
|
import { getInteractionId } from '@atlaskit/react-ufo/interaction-id-context';
|
|
25
25
|
import { abortAll, getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
|
|
26
26
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
27
|
-
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
28
27
|
import { useProviders } from '../composable-editor/hooks/useProviders';
|
|
29
28
|
import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
|
|
30
29
|
import { getNodesCount } from '../utils/getNodesCount';
|
|
@@ -66,7 +65,6 @@ export function ReactEditorView(props) {
|
|
|
66
65
|
onEditorCreated,
|
|
67
66
|
onEditorDestroyed
|
|
68
67
|
} = props;
|
|
69
|
-
const [editorAPI, setEditorAPI] = useState(undefined);
|
|
70
68
|
const ssrEditorStateRef = useRef(undefined);
|
|
71
69
|
const editorRef = useRef(null);
|
|
72
70
|
const viewRef = useRef();
|
|
@@ -150,9 +148,6 @@ export function ReactEditorView(props) {
|
|
|
150
148
|
} else {
|
|
151
149
|
config.current = processPluginsList(createPluginsList(options.props.preset, 'allowBlockType' in props.editorProps ? props.editorProps : {}, pluginInjectionAPI.current));
|
|
152
150
|
schema = createSchema(config.current);
|
|
153
|
-
if (!expVal('platform_editor_no_state_plugin_injection_api', 'isEnabled', false)) {
|
|
154
|
-
setEditorAPI(pluginInjectionAPI.current.api());
|
|
155
|
-
}
|
|
156
151
|
}
|
|
157
152
|
const {
|
|
158
153
|
contentTransformerProvider
|
|
@@ -400,7 +395,7 @@ export function ReactEditorView(props) {
|
|
|
400
395
|
|
|
401
396
|
// Temporary to replace provider factory while migration to `ComposableEditor` occurs
|
|
402
397
|
useProviders({
|
|
403
|
-
editorApi:
|
|
398
|
+
editorApi: pluginInjectionAPI.current.api(),
|
|
404
399
|
contextIdentifierProvider: props.editorProps.contextIdentifierProvider,
|
|
405
400
|
mediaProvider: (_media = props.editorProps.media) === null || _media === void 0 ? void 0 : _media.provider,
|
|
406
401
|
mentionProvider: props.editorProps.mentionProvider,
|
|
@@ -876,7 +871,7 @@ export function ReactEditorView(props) {
|
|
|
876
871
|
transformer: contentTransformer.current,
|
|
877
872
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
878
873
|
editorRef: editorRef,
|
|
879
|
-
editorAPI:
|
|
874
|
+
editorAPI: pluginInjectionAPI.current.api()
|
|
880
875
|
})) !== null && _props$render !== void 0 ? _props$render : editor : editor));
|
|
881
876
|
}
|
|
882
877
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "
|
|
2
|
+
export const version = "217.3.0";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
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; } } }; }
|
|
5
5
|
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; } }
|
|
6
6
|
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; }
|
|
@@ -32,7 +32,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
32
32
|
import { getInteractionId } from '@atlaskit/react-ufo/interaction-id-context';
|
|
33
33
|
import { abortAll, getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
|
|
34
34
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
35
|
-
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
36
35
|
import { useProviders } from '../composable-editor/hooks/useProviders';
|
|
37
36
|
import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
|
|
38
37
|
import { getNodesCount } from '../utils/getNodesCount';
|
|
@@ -71,10 +70,6 @@ export function ReactEditorView(props) {
|
|
|
71
70
|
__livePage = _props$editorProps.__livePage,
|
|
72
71
|
onEditorCreated = props.onEditorCreated,
|
|
73
72
|
onEditorDestroyed = props.onEditorDestroyed;
|
|
74
|
-
var _useState = useState(undefined),
|
|
75
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
76
|
-
editorAPI = _useState2[0],
|
|
77
|
-
setEditorAPI = _useState2[1];
|
|
78
73
|
var ssrEditorStateRef = useRef(undefined);
|
|
79
74
|
var editorRef = useRef(null);
|
|
80
75
|
var viewRef = useRef();
|
|
@@ -168,9 +163,6 @@ export function ReactEditorView(props) {
|
|
|
168
163
|
} else {
|
|
169
164
|
config.current = processPluginsList(createPluginsList(options.props.preset, 'allowBlockType' in props.editorProps ? props.editorProps : {}, pluginInjectionAPI.current));
|
|
170
165
|
schema = createSchema(config.current);
|
|
171
|
-
if (!expVal('platform_editor_no_state_plugin_injection_api', 'isEnabled', false)) {
|
|
172
|
-
setEditorAPI(pluginInjectionAPI.current.api());
|
|
173
|
-
}
|
|
174
166
|
}
|
|
175
167
|
var contentTransformerProvider = options.props.editorProps.contentTransformerProvider;
|
|
176
168
|
var plugins = createPMPlugins({
|
|
@@ -417,7 +409,7 @@ export function ReactEditorView(props) {
|
|
|
417
409
|
|
|
418
410
|
// Temporary to replace provider factory while migration to `ComposableEditor` occurs
|
|
419
411
|
useProviders({
|
|
420
|
-
editorApi:
|
|
412
|
+
editorApi: pluginInjectionAPI.current.api(),
|
|
421
413
|
contextIdentifierProvider: props.editorProps.contextIdentifierProvider,
|
|
422
414
|
mediaProvider: (_media = props.editorProps.media) === null || _media === void 0 ? void 0 : _media.provider,
|
|
423
415
|
mentionProvider: props.editorProps.mentionProvider,
|
|
@@ -571,10 +563,10 @@ export function ReactEditorView(props) {
|
|
|
571
563
|
});
|
|
572
564
|
return view;
|
|
573
565
|
}, [getDirectEditorProps, dispatchAnalyticsEvent]);
|
|
574
|
-
var
|
|
575
|
-
|
|
576
|
-
editorView =
|
|
577
|
-
setEditorView =
|
|
566
|
+
var _useState = useState(undefined),
|
|
567
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
568
|
+
editorView = _useState2[0],
|
|
569
|
+
setEditorView = _useState2[1];
|
|
578
570
|
|
|
579
571
|
// Detects if the editor is nested inside an extension - ie. it is a Legacy Content Extension (LCE)
|
|
580
572
|
var isNestedEditor = useRef(null);
|
|
@@ -922,7 +914,7 @@ export function ReactEditorView(props) {
|
|
|
922
914
|
transformer: contentTransformer.current,
|
|
923
915
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
924
916
|
editorRef: editorRef,
|
|
925
|
-
editorAPI:
|
|
917
|
+
editorAPI: pluginInjectionAPI.current.api()
|
|
926
918
|
})) !== null && _props$render !== void 0 ? _props$render : editor : editor));
|
|
927
919
|
}
|
|
928
920
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "
|
|
2
|
+
export var version = "217.3.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "217.
|
|
3
|
+
"version": "217.4.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@atlaskit/activity-provider": "^2.5.0",
|
|
42
|
-
"@atlaskit/adf-schema": "^52.
|
|
42
|
+
"@atlaskit/adf-schema": "^52.3.0",
|
|
43
43
|
"@atlaskit/afm-i18n-platform-editor-editor-core": "2.10.0",
|
|
44
44
|
"@atlaskit/analytics-namespaced-context": "^7.2.0",
|
|
45
45
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
67
67
|
"@atlaskit/react-ufo": "^5.4.0",
|
|
68
68
|
"@atlaskit/task-decision": "^19.3.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^39.0.0",
|
|
70
70
|
"@atlaskit/tokens": "^11.1.0",
|
|
71
71
|
"@atlaskit/tooltip": "^20.14.0",
|
|
72
72
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"uuid": "^3.1.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@atlaskit/editor-common": "^112.
|
|
86
|
+
"@atlaskit/editor-common": "^112.3.0",
|
|
87
87
|
"@atlaskit/link-provider": "^4.2.0",
|
|
88
88
|
"@atlaskit/media-core": "^37.0.0",
|
|
89
89
|
"react": "^18.2.0",
|
|
@@ -283,10 +283,6 @@
|
|
|
283
283
|
"platform_editor_sentry_breadcrumbs": {
|
|
284
284
|
"type": "boolean"
|
|
285
285
|
},
|
|
286
|
-
"platform_editor_blocktaskitem_patch_2": {
|
|
287
|
-
"type": "boolean",
|
|
288
|
-
"referenceOnly": true
|
|
289
|
-
},
|
|
290
286
|
"platform_editor_find_codeblock_color_contrast_fix": {
|
|
291
287
|
"type": "boolean"
|
|
292
288
|
},
|