@atlaskit/editor-core 197.3.0 → 197.4.1
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 +31 -0
- package/afm-cc/tsconfig.json +0 -3
- package/afm-jira/tsconfig.json +0 -3
- package/dist/cjs/actions/index.js +13 -40
- package/dist/cjs/composable-editor/editor-internal.js +7 -6
- package/dist/cjs/create-editor/ReactEditorView.js +2 -1
- package/dist/cjs/presets/universal.js +7 -9
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -3
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +1 -9
- package/dist/cjs/ui/ToolbarFeedback/index.js +5 -210
- package/dist/cjs/utils/action.js +9 -38
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/actions/index.js +1 -12
- package/dist/es2019/composable-editor/editor-internal.js +7 -6
- package/dist/es2019/create-editor/ReactEditorView.js +2 -1
- package/dist/es2019/index.js +8 -1
- package/dist/es2019/presets/universal.js +7 -9
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +1 -9
- package/dist/es2019/ui/ToolbarFeedback/index.js +5 -188
- package/dist/es2019/utils/action.js +0 -10
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/actions/index.js +14 -41
- package/dist/esm/composable-editor/editor-internal.js +7 -6
- package/dist/esm/create-editor/ReactEditorView.js +2 -1
- package/dist/esm/index.js +8 -1
- package/dist/esm/presets/universal.js +7 -9
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +1 -9
- package/dist/esm/ui/ToolbarFeedback/index.js +5 -212
- package/dist/esm/utils/action.js +9 -37
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/actions/index.d.ts +0 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +3 -0
- package/dist/types/index.d.ts +8 -1
- package/dist/types/presets/default.d.ts +2 -0
- package/dist/types/presets/universal.d.ts +4 -0
- package/dist/types/presets/useUniversalPreset.d.ts +3 -0
- package/dist/types/types/editor-appearance-component.d.ts +0 -1
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +0 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/ToolbarFeedback/index.d.ts +1 -26
- package/dist/types/utils/action.d.ts +0 -4
- package/dist/types-ts4.5/actions/index.d.ts +0 -1
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +3 -0
- package/dist/types-ts4.5/index.d.ts +8 -1
- package/dist/types-ts4.5/presets/default.d.ts +2 -0
- package/dist/types-ts4.5/presets/universal.d.ts +4 -0
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +3 -0
- package/dist/types-ts4.5/types/editor-appearance-component.d.ts +0 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +0 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/ToolbarFeedback/index.d.ts +1 -26
- package/dist/types-ts4.5/utils/action.d.ts +0 -7
- package/package.json +11 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 197.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1269ffa635367`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1269ffa635367) -
|
|
8
|
+
Cleanup FF platform_editor_get_card_provider_from_config
|
|
9
|
+
|
|
10
|
+
## 197.4.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [#137822](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137822)
|
|
15
|
+
[`202cf9b609302`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/202cf9b609302) -
|
|
16
|
+
[ux] Deprecating toolbar component that is unused.
|
|
17
|
+
- [#138305](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/138305)
|
|
18
|
+
[`c79d9c18032b6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c79d9c18032b6) -
|
|
19
|
+
Passing task local ID from editor mentions plugin
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [#138245](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/138245)
|
|
24
|
+
[`e3913201044c6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e3913201044c6) -
|
|
25
|
+
Cleanup internal workaround with editor actions.
|
|
26
|
+
- [#138136](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/138136)
|
|
27
|
+
[`35938ecf46ba7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/35938ecf46ba7) -
|
|
28
|
+
[ED-24755] Implement insert functionality of element templates and fire document inserted event
|
|
29
|
+
with template IDs
|
|
30
|
+
- [`749c8b3e5bd5d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/749c8b3e5bd5d) -
|
|
31
|
+
Cleanup feature flag for removing the hide avatar group prop.
|
|
32
|
+
- Updated dependencies
|
|
33
|
+
|
|
3
34
|
## 197.3.0
|
|
4
35
|
|
|
5
36
|
### Minor Changes
|
package/afm-cc/tsconfig.json
CHANGED
package/afm-jira/tsconfig.json
CHANGED
|
@@ -202,34 +202,7 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
|
|
|
202
202
|
editorView.dispatch(tr);
|
|
203
203
|
return true;
|
|
204
204
|
}
|
|
205
|
-
|
|
206
|
-
key: "__temporaryFixForConfigPanel",
|
|
207
|
-
value: function () {
|
|
208
|
-
var _temporaryFixForConfigPanel2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
209
|
-
var editorView, __EDITOR_INTERNALS_DO_NOT_USE__API;
|
|
210
|
-
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
211
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
212
|
-
case 0:
|
|
213
|
-
// @ts-ignore Internal API not for use, just to unblock extracting extension plugin
|
|
214
|
-
editorView = this.editorView, __EDITOR_INTERNALS_DO_NOT_USE__API = this.__EDITOR_INTERNALS_DO_NOT_USE__API;
|
|
215
|
-
if (!(!editorView || !__EDITOR_INTERNALS_DO_NOT_USE__API)) {
|
|
216
|
-
_context2.next = 3;
|
|
217
|
-
break;
|
|
218
|
-
}
|
|
219
|
-
return _context2.abrupt("return");
|
|
220
|
-
case 3:
|
|
221
|
-
(0, _action.__temporaryFixForConfigPanel)(editorView, __EDITOR_INTERNALS_DO_NOT_USE__API);
|
|
222
|
-
case 4:
|
|
223
|
-
case "end":
|
|
224
|
-
return _context2.stop();
|
|
225
|
-
}
|
|
226
|
-
}, _callee2, this);
|
|
227
|
-
}));
|
|
228
|
-
function __temporaryFixForConfigPanel() {
|
|
229
|
-
return _temporaryFixForConfigPanel2.apply(this, arguments);
|
|
230
|
-
}
|
|
231
|
-
return __temporaryFixForConfigPanel;
|
|
232
|
-
}()
|
|
205
|
+
|
|
233
206
|
/**
|
|
234
207
|
* @deprecated This is deprecated and is no longer maintained.
|
|
235
208
|
*
|
|
@@ -243,36 +216,36 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
|
|
|
243
216
|
}, {
|
|
244
217
|
key: "getValue",
|
|
245
218
|
value: (function () {
|
|
246
|
-
var _getValue = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
219
|
+
var _getValue = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
247
220
|
var editorView, doc, json, nodeSanitized;
|
|
248
|
-
return _regenerator.default.wrap(function
|
|
249
|
-
while (1) switch (
|
|
221
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
222
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
250
223
|
case 0:
|
|
251
224
|
editorView = this.editorView;
|
|
252
225
|
if (editorView) {
|
|
253
|
-
|
|
226
|
+
_context2.next = 3;
|
|
254
227
|
break;
|
|
255
228
|
}
|
|
256
|
-
return
|
|
229
|
+
return _context2.abrupt("return");
|
|
257
230
|
case 3:
|
|
258
|
-
|
|
231
|
+
_context2.next = 5;
|
|
259
232
|
return (0, _action.getEditorValueWithMedia)(editorView);
|
|
260
233
|
case 5:
|
|
261
|
-
doc =
|
|
234
|
+
doc = _context2.sent;
|
|
262
235
|
json = (0, _utils.toJSON)(doc);
|
|
263
236
|
if (this.contentEncode) {
|
|
264
|
-
|
|
237
|
+
_context2.next = 9;
|
|
265
238
|
break;
|
|
266
239
|
}
|
|
267
|
-
return
|
|
240
|
+
return _context2.abrupt("return", json);
|
|
268
241
|
case 9:
|
|
269
242
|
nodeSanitized = _model.Node.fromJSON(this.editorView.state.schema, json);
|
|
270
|
-
return
|
|
243
|
+
return _context2.abrupt("return", this.contentEncode(nodeSanitized));
|
|
271
244
|
case 11:
|
|
272
245
|
case "end":
|
|
273
|
-
return
|
|
246
|
+
return _context2.stop();
|
|
274
247
|
}
|
|
275
|
-
},
|
|
248
|
+
}, _callee2, this);
|
|
276
249
|
}));
|
|
277
250
|
function getValue() {
|
|
278
251
|
return _getValue.apply(this, arguments);
|
|
@@ -54,10 +54,12 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
|
|
|
54
54
|
var setEditorApi = (0, _react.useCallback)(
|
|
55
55
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
56
56
|
function (api) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_remove_editor_actions_workaround')) {
|
|
58
|
+
// This is an workaround to unblock Editor Lego Decoupling project, if you have questions ping us #cc-editor-lego
|
|
59
|
+
// We may clean up this code when EditorActions deprecation process starts
|
|
60
|
+
// @ts-expect-error 2339: Property '__EDITOR_INTERNALS_DO_NOT_USE__API' does not exist on type 'EditorActions<any>'.
|
|
61
|
+
editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
|
|
62
|
+
}
|
|
61
63
|
}, [editorActions]);
|
|
62
64
|
var overriddenEditorProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
63
65
|
onSave: props.onSave ? handleSave : undefined,
|
|
@@ -145,8 +147,7 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
|
|
|
145
147
|
enableToolbarMinWidth: ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.toolbarMinWidthOverflow) != null ? !!((_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.toolbarMinWidthOverflow) : props.allowUndoRedoButtons,
|
|
146
148
|
useStickyToolbar: props.useStickyToolbar,
|
|
147
149
|
featureFlags: featureFlags,
|
|
148
|
-
pluginHooks: config.pluginHooks
|
|
149
|
-
hideAvatarGroup: (0, _platformFeatureFlags.fg)('platform_editor_remove_hide_avatar_group_prop') ? undefined : props.hideAvatarGroup
|
|
150
|
+
pluginHooks: config.pluginHooks
|
|
150
151
|
}));
|
|
151
152
|
}
|
|
152
153
|
}), (0, _react2.jsx)(PortalRenderer, null))))))));
|
|
@@ -30,6 +30,7 @@ var _ufo = require("@atlaskit/editor-common/ufo");
|
|
|
30
30
|
var _analytics2 = require("@atlaskit/editor-common/utils/analytics");
|
|
31
31
|
var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
32
32
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
33
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
33
34
|
var _eventDispatcher = require("../event-dispatcher");
|
|
34
35
|
var _context = require("../presets/context");
|
|
35
36
|
var _findChangedNodesFromTransaction = require("../utils/findChangedNodesFromTransaction");
|
|
@@ -557,7 +558,7 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
|
|
|
557
558
|
});
|
|
558
559
|
var _api = _this.pluginInjectionAPI.api();
|
|
559
560
|
(_props$setEditorApi = props.setEditorApi) === null || _props$setEditorApi === void 0 || _props$setEditorApi.call(props, _api);
|
|
560
|
-
if (props.editorProps.editorActions) {
|
|
561
|
+
if (props.editorProps.editorActions && !(0, _platformFeatureFlags.fg)('platform_editor_remove_editor_actions_workaround')) {
|
|
561
562
|
// @ts-expect-error
|
|
562
563
|
props.editorProps.editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = _api;
|
|
563
564
|
}
|
|
@@ -224,7 +224,11 @@ function createUniversalPresetInternal(_ref) {
|
|
|
224
224
|
tableSelectorSupported: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableSelector) && isFullPage,
|
|
225
225
|
nativeStatusSupported: !statusMenuDisabled,
|
|
226
226
|
showElementBrowserLink: props.elementBrowser && props.elementBrowser.showModal || false,
|
|
227
|
-
replacePlusMenuWithElementBrowser: props.elementBrowser && props.elementBrowser.replacePlusMenu || false
|
|
227
|
+
replacePlusMenuWithElementBrowser: props.elementBrowser && props.elementBrowser.replacePlusMenu || false,
|
|
228
|
+
// @ts-ignore
|
|
229
|
+
// For platform_editor_element_level_templates experiment only
|
|
230
|
+
// clean up ticket ED-24873
|
|
231
|
+
UNSAFE_editorAppearance: appearance
|
|
228
232
|
}]).maybeAdd([_beforePrimaryToolbar.beforePrimaryToolbarPlugin, {
|
|
229
233
|
beforePrimaryToolbarComponents: // @ts-expect-error 2339: Property 'before' does not exist on type 'PrimaryToolbarComponents'.
|
|
230
234
|
(_props$primaryToolbar = props.primaryToolbarComponents) === null || _props$primaryToolbar === void 0 ? void 0 : _props$primaryToolbar.before
|
|
@@ -235,15 +239,9 @@ function createUniversalPresetInternal(_ref) {
|
|
|
235
239
|
// https://hello.atlassian.net/wiki/spaces/PCG/pages/2851572180/Editor+toolbar+for+live+pages+and+edit+in+context+projects
|
|
236
240
|
collabEdit: props.collabEdit,
|
|
237
241
|
takeFullWidth: !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
|
|
238
|
-
showAvatarGroup:
|
|
239
|
-
// Cleanup: `platform_editor_remove_hide_avatar_group_prop`
|
|
240
|
-
// Remove `!props.hideAvatarGroup`
|
|
241
|
-
!props.hideAvatarGroup && featureFlags.showAvatarGroupAsPlugin === true && !featureFlags.twoLineEditorToolbar
|
|
242
|
+
showAvatarGroup: featureFlags.showAvatarGroupAsPlugin === true && !featureFlags.twoLineEditorToolbar
|
|
242
243
|
}]).maybeAdd([_findReplace.findReplacePlugin, {
|
|
243
|
-
takeFullWidth:
|
|
244
|
-
// Cleanup: `platform_editor_remove_hide_avatar_group_prop`
|
|
245
|
-
// Remove `!props.hideAvatarGroup`
|
|
246
|
-
!props.hideAvatarGroup && !!featureFlags.showAvatarGroupAsPlugin === false && !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
|
|
244
|
+
takeFullWidth: !!featureFlags.showAvatarGroupAsPlugin === false && !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
|
|
247
245
|
twoLineEditorToolbar: !!props.primaryToolbarComponents && !!featureFlags.twoLineEditorToolbar
|
|
248
246
|
}], Boolean(props.allowFindReplace)).maybeAdd(_border.borderPlugin, Boolean(props.allowBorderMark || props.UNSAFE_allowBorderMark)).maybeAdd(_fragment.fragmentPlugin, Boolean(props.allowFragmentMark)).add(_pasteOptionsToolbar.pasteOptionsToolbarPlugin).add([_codeBidiWarning.codeBidiWarningPlugin, {
|
|
249
247
|
appearance: appearance
|
|
@@ -12,7 +12,6 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
13
13
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
14
14
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _FullPageContentArea = require("./FullPageContentArea");
|
|
17
16
|
var _FullPageToolbar = require("./FullPageToolbar");
|
|
18
17
|
var _StyledComponents = require("./StyledComponents");
|
|
@@ -98,8 +97,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
98
97
|
primaryToolbarComponents: primaryToolbarComponents,
|
|
99
98
|
providerFactory: props.providerFactory,
|
|
100
99
|
showKeyline: showKeyline,
|
|
101
|
-
featureFlags: props.featureFlags
|
|
102
|
-
hideAvatarGroup: (0, _platformFeatureFlags.fg)('platform_editor_remove_hide_avatar_group_prop') ? undefined : props.hideAvatarGroup
|
|
100
|
+
featureFlags: props.featureFlags
|
|
103
101
|
}), (0, _react2.jsx)(_FullPageContentArea.FullPageContentArea, {
|
|
104
102
|
editorAPI: editorAPI,
|
|
105
103
|
ref: scrollContentContainerRef,
|
|
@@ -27,7 +27,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
27
27
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
28
28
|
|
|
29
29
|
var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
30
|
-
var _props$featureFlags, _props$customPrimaryT
|
|
30
|
+
var _props$featureFlags, _props$customPrimaryT;
|
|
31
31
|
var _useState = (0, _react.useState)(false),
|
|
32
32
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
33
33
|
shouldSplitToolbar = _useState2[0],
|
|
@@ -64,14 +64,6 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
64
64
|
css: _MainToolbar.customToolbarWrapperStyle
|
|
65
65
|
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? (0, _react2.jsx)(_BeforeWrapper.BeforePrimaryToolbarWrapper, {
|
|
66
66
|
beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
|
|
67
|
-
}) : null, !(0, _platformFeatureFlags.fg)('platform_editor_remove_hide_avatar_group_prop') ? props.hideAvatarGroup || (props === null || props === void 0 || (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.showAvatarGroupAsPlugin) === true && !((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.twoLineEditorToolbar) ? null : // Avatars are moved to Confluence codebase for Edit in Context
|
|
68
|
-
// When Edit in Context is enabled customPrimaryToolbarComponents is undefined
|
|
69
|
-
// For more details please check
|
|
70
|
-
// https://hello.atlassian.net/wiki/spaces/PCG/pages/2851572180/Editor+toolbar+for+live+pages+and+edit+in+context+projects
|
|
71
|
-
editorAPI === null || editorAPI === void 0 || (_editorAPI$avatarGrou = editorAPI.avatarGroup) === null || _editorAPI$avatarGrou === void 0 ? void 0 : _editorAPI$avatarGrou.actions.getToolbarItem({
|
|
72
|
-
inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
|
|
73
|
-
inviteToEditHandler: (_props$collabEdit2 = props.collabEdit) === null || _props$collabEdit2 === void 0 ? void 0 : _props$collabEdit2.inviteToEditHandler,
|
|
74
|
-
isInviteToEditButtonSelected: (_props$collabEdit3 = props.collabEdit) === null || _props$collabEdit3 === void 0 ? void 0 : _props$collabEdit3.isInviteToEditButtonSelected
|
|
75
67
|
}) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
|
|
76
68
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
77
69
|
popupsMountPoint: props.popupsMountPoint,
|
|
@@ -1,218 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = ToolbarFeedback;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
16
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
17
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
|
-
var _react = require("react");
|
|
19
|
-
var _react2 = require("@emotion/react");
|
|
20
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
-
var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group"));
|
|
22
|
-
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
23
|
-
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
24
|
-
var _ui = require("@atlaskit/editor-common/ui");
|
|
25
|
-
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
26
|
-
var _uiReact = require("@atlaskit/editor-common/ui-react");
|
|
27
|
-
var _analytics2 = require("@atlaskit/editor-common/utils/analytics");
|
|
28
|
-
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
29
|
-
var _eventDispatcher = require("../../event-dispatcher");
|
|
30
|
-
var _context2 = require("../../presets/context");
|
|
31
|
-
var _deprecationWarnings = _interopRequireDefault(require("../../utils/deprecation-warnings"));
|
|
32
|
-
var _styles = require("./styles");
|
|
33
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
36
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
37
|
-
* @jsxRuntime classic
|
|
38
|
-
* @jsx jsx
|
|
39
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
40
|
-
var PopupWithOutsideListeners = (0, _uiReact.withReactEditorViewOuterListeners)(_ui.Popup);
|
|
41
|
-
var POPUP_HEIGHT = 388;
|
|
42
|
-
var POPUP_WIDTH = 280;
|
|
43
|
-
var EDITOR_IMAGE_URL = 'https://confluence.atlassian.com/download/attachments/945114421/editorillustration@2x.png?api=v2';
|
|
44
|
-
var deprecations = [{
|
|
45
|
-
property: 'packageVersion',
|
|
46
|
-
description: 'To pass package version use feedbackInfo property – <Editor feedbackInfo={{ packageVersion }} />',
|
|
47
|
-
type: 'removed'
|
|
48
|
-
}, {
|
|
49
|
-
property: 'packageName',
|
|
50
|
-
description: 'To pass package name use feedbackInfo property – <Editor feedbackInfo={{ packageName }} />',
|
|
51
|
-
type: 'removed'
|
|
52
|
-
}, {
|
|
53
|
-
property: 'labels',
|
|
54
|
-
description: 'To pass feedback labels use feedbackInfo property – <Editor feedbackInfo={{ labels }} />',
|
|
55
|
-
type: 'removed'
|
|
56
|
-
}];
|
|
57
|
-
var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
|
|
58
|
-
(0, _inherits2.default)(ToolbarFeedbackInternal, _PureComponent);
|
|
59
|
-
var _super = _createSuper(ToolbarFeedbackInternal);
|
|
60
|
-
function ToolbarFeedbackInternal(props) {
|
|
61
|
-
var _this;
|
|
62
|
-
(0, _classCallCheck2.default)(this, ToolbarFeedbackInternal);
|
|
63
|
-
_this = _super.call(this, props);
|
|
64
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
65
|
-
jiraIssueCollectorScriptLoading: false,
|
|
66
|
-
showOptOutOption: false
|
|
67
|
-
});
|
|
68
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleRef", function (ref) {
|
|
69
|
-
if (ref) {
|
|
70
|
-
_this.setState({
|
|
71
|
-
target: ref
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
// Create a FeedbackInfo instance from props.
|
|
76
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getFeedbackInfo", function () {
|
|
77
|
-
var _this$props = _this.props,
|
|
78
|
-
product = _this$props.product,
|
|
79
|
-
packageVersion = _this$props.packageVersion,
|
|
80
|
-
packageName = _this$props.packageName,
|
|
81
|
-
labels = _this$props.labels;
|
|
82
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, product !== undefined && {
|
|
83
|
-
product: product
|
|
84
|
-
}), packageVersion !== undefined && {
|
|
85
|
-
packageVersion: packageVersion
|
|
86
|
-
}), packageName !== undefined && {
|
|
87
|
-
packageName: packageName
|
|
88
|
-
}), labels !== undefined && {
|
|
89
|
-
labels: labels
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "collectFeedback", function () {
|
|
93
|
-
if (_this.props.product === 'bitbucket') {
|
|
94
|
-
_this.setState({
|
|
95
|
-
showOptOutOption: true
|
|
96
|
-
});
|
|
97
|
-
} else {
|
|
98
|
-
_this.openFeedbackPopup();
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "toggleShowOptOutOption", function () {
|
|
102
|
-
_this.setState({
|
|
103
|
-
showOptOutOption: !_this.state.showOptOutOption
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "openJiraIssueCollector", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
107
|
-
var _this$props$api, _window$localStorage$, _this$props$api2;
|
|
108
|
-
var contentId, sessionId, tabId;
|
|
109
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
110
|
-
while (1) switch (_context.prev = _context.next) {
|
|
111
|
-
case 0:
|
|
112
|
-
_this.setState({
|
|
113
|
-
jiraIssueCollectorScriptLoading: true,
|
|
114
|
-
showOptOutOption: false
|
|
115
|
-
});
|
|
116
|
-
contentId = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 || (_this$props$api = _this$props$api.contextIdentifier) === null || _this$props$api === void 0 || (_this$props$api = _this$props$api.sharedState.currentState()) === null || _this$props$api === void 0 || (_this$props$api = _this$props$api.contextIdentifierProvider) === null || _this$props$api === void 0 ? void 0 : _this$props$api.objectId;
|
|
117
|
-
sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
|
|
118
|
-
tabId = window.sessionStorage['awc.tab.id'];
|
|
119
|
-
_context.next = 6;
|
|
120
|
-
return (_this$props$api2 = _this.props.api) === null || _this$props$api2 === void 0 || (_this$props$api2 = _this$props$api2.feedbackDialog) === null || _this$props$api2 === void 0 ? void 0 : _this$props$api2.actions.openFeedbackDialog(_objectSpread(_objectSpread({}, _this.getFeedbackInfo()), {}, {
|
|
121
|
-
sessionId: sessionId,
|
|
122
|
-
contentId: contentId,
|
|
123
|
-
tabId: tabId
|
|
124
|
-
}));
|
|
125
|
-
case 6:
|
|
126
|
-
_this.setState({
|
|
127
|
-
jiraIssueCollectorScriptLoading: false
|
|
128
|
-
});
|
|
129
|
-
case 7:
|
|
130
|
-
case "end":
|
|
131
|
-
return _context.stop();
|
|
132
|
-
}
|
|
133
|
-
}, _callee);
|
|
134
|
-
})));
|
|
135
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "openFeedbackPopup", function () {
|
|
136
|
-
var dispatch = (0, _eventDispatcher.createDispatch)(_this.context.editorActions.eventDispatcher);
|
|
137
|
-
dispatch(_analytics2.analyticsEventKey, {
|
|
138
|
-
payload: {
|
|
139
|
-
action: _analytics.ACTION.CLICKED,
|
|
140
|
-
actionSubject: _analytics.ACTION_SUBJECT.BUTTON,
|
|
141
|
-
actionSubjectId: _analytics.ACTION_SUBJECT_ID.BUTTON_FEEDBACK,
|
|
142
|
-
eventType: _analytics.EVENT_TYPE.UI
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
_this.openJiraIssueCollector();
|
|
146
|
-
return true;
|
|
147
|
-
});
|
|
148
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "openLearnMorePage", function () {
|
|
149
|
-
window.open('https://confluence.atlassian.com/x/NU1VO', '_blank');
|
|
150
|
-
_this.toggleShowOptOutOption();
|
|
151
|
-
});
|
|
152
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "hasJquery", function () {
|
|
153
|
-
return typeof window.jQuery !== 'undefined';
|
|
154
|
-
});
|
|
155
|
-
(0, _deprecationWarnings.default)(ToolbarFeedback.name, props, deprecations);
|
|
156
|
-
return _this;
|
|
7
|
+
function ToolbarFeedback() {
|
|
8
|
+
if (process.env.NODE_ENV === 'development') {
|
|
9
|
+
// eslint-disable-next-line no-console
|
|
10
|
+
console.warn('ToolbarFeedback component is no longer available. This will be deprecated soon.');
|
|
157
11
|
}
|
|
158
|
-
|
|
159
|
-
key: "render",
|
|
160
|
-
value: function render() {
|
|
161
|
-
var _this$props2 = this.props,
|
|
162
|
-
popupsMountPoint = _this$props2.popupsMountPoint,
|
|
163
|
-
popupsBoundariesElement = _this$props2.popupsBoundariesElement,
|
|
164
|
-
popupsScrollableElement = _this$props2.popupsScrollableElement;
|
|
165
|
-
var iconBefore = this.state.jiraIssueCollectorScriptLoading ? (0, _react2.jsx)(_spinner.default, null) : undefined;
|
|
166
|
-
|
|
167
|
-
// JIRA issue collector script is using jQuery internally
|
|
168
|
-
return this.hasJquery() ?
|
|
169
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
170
|
-
(0, _react2.jsx)("div", {
|
|
171
|
-
css: _styles.wrapper
|
|
172
|
-
}, (0, _react2.jsx)(_uiMenu.ToolbarButton, {
|
|
173
|
-
ref: this.handleRef,
|
|
174
|
-
iconBefore: iconBefore,
|
|
175
|
-
onClick: this.collectFeedback,
|
|
176
|
-
selected: false,
|
|
177
|
-
spacing: "compact"
|
|
178
|
-
}, (0, _react2.jsx)("span", {
|
|
179
|
-
css: _styles.buttonContent
|
|
180
|
-
}, "Feedback")), this.state.showOptOutOption && (0, _react2.jsx)(PopupWithOutsideListeners, {
|
|
181
|
-
target: this.state.target,
|
|
182
|
-
mountTo: popupsMountPoint,
|
|
183
|
-
boundariesElement: popupsBoundariesElement,
|
|
184
|
-
scrollableElement: popupsScrollableElement,
|
|
185
|
-
fitHeight: POPUP_HEIGHT,
|
|
186
|
-
fitWidth: POPUP_WIDTH,
|
|
187
|
-
handleClickOutside: this.toggleShowOptOutOption,
|
|
188
|
-
handleEscapeKeydown: this.toggleShowOptOutOption
|
|
189
|
-
}, (0, _react2.jsx)("div", {
|
|
190
|
-
css: _styles.confirmationPopup
|
|
191
|
-
}, (0, _react2.jsx)("div", {
|
|
192
|
-
css: _styles.confirmationHeader
|
|
193
|
-
}, (0, _react2.jsx)("img", {
|
|
194
|
-
css: _styles.confirmationImg,
|
|
195
|
-
src: EDITOR_IMAGE_URL
|
|
196
|
-
})), (0, _react2.jsx)("div", {
|
|
197
|
-
css: _styles.confirmationText
|
|
198
|
-
}, (0, _react2.jsx)("div", null, "We are rolling out a new editing experience across Atlassian products. Help us improve by providing feedback."), (0, _react2.jsx)("div", null, "You can opt-out for now by turning off the \"Atlassian Editor\" feature on the Labs page in Bitbucket settings."), (0, _react2.jsx)(_buttonGroup.default, null, (0, _react2.jsx)(_new.default, {
|
|
199
|
-
appearance: "primary",
|
|
200
|
-
onClick: this.openFeedbackPopup
|
|
201
|
-
}, "Give feedback"), (0, _react2.jsx)(_new.default, {
|
|
202
|
-
appearance: "default",
|
|
203
|
-
onClick: this.openLearnMorePage
|
|
204
|
-
}, "Learn more")))))) : null;
|
|
205
|
-
}
|
|
206
|
-
}]);
|
|
207
|
-
return ToolbarFeedbackInternal;
|
|
208
|
-
}(_react.PureComponent);
|
|
209
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
210
|
-
(0, _defineProperty2.default)(ToolbarFeedbackInternal, "contextTypes", {
|
|
211
|
-
editorActions: _propTypes.default.object.isRequired
|
|
212
|
-
});
|
|
213
|
-
function ToolbarFeedback(props) {
|
|
214
|
-
var api = (0, _context2.usePresetContext)();
|
|
215
|
-
return (0, _react2.jsx)(ToolbarFeedbackInternal, (0, _extends2.default)({
|
|
216
|
-
api: api
|
|
217
|
-
}, props));
|
|
12
|
+
return null;
|
|
218
13
|
}
|
package/dist/cjs/utils/action.js
CHANGED
|
@@ -4,7 +4,6 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.__temporaryFixForConfigPanel = __temporaryFixForConfigPanel;
|
|
8
7
|
exports.getEditorValueWithMedia = getEditorValueWithMedia;
|
|
9
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
@@ -18,57 +17,29 @@ var mediaPluginKey = {
|
|
|
18
17
|
return state['mediaPlugin$'];
|
|
19
18
|
}
|
|
20
19
|
};
|
|
21
|
-
function
|
|
22
|
-
return _temporaryFixForConfigPanel.apply(this, arguments);
|
|
23
|
-
}
|
|
24
|
-
function _temporaryFixForConfigPanel() {
|
|
25
|
-
_temporaryFixForConfigPanel = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(editorView, api) {
|
|
26
|
-
var _api$extension;
|
|
27
|
-
var extensionPluginState;
|
|
28
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
29
|
-
while (1) switch (_context.prev = _context.next) {
|
|
30
|
-
case 0:
|
|
31
|
-
extensionPluginState = api === null || api === void 0 || (_api$extension = api.extension) === null || _api$extension === void 0 ? void 0 : _api$extension.sharedState.currentState();
|
|
32
|
-
if (!(extensionPluginState && extensionPluginState.showContextPanel)) {
|
|
33
|
-
_context.next = 4;
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
_context.next = 4;
|
|
37
|
-
return new Promise(function (resolve) {
|
|
38
|
-
var _api$extension2, _api$contextPanel;
|
|
39
|
-
api === null || api === void 0 || (_api$extension2 = api.extension) === null || _api$extension2 === void 0 || _api$extension2.actions.forceAutoSave(api === null || api === void 0 || (_api$contextPanel = api.contextPanel) === null || _api$contextPanel === void 0 ? void 0 : _api$contextPanel.actions.applyChange)(resolve)(editorView.state, editorView.dispatch);
|
|
40
|
-
});
|
|
41
|
-
case 4:
|
|
42
|
-
case "end":
|
|
43
|
-
return _context.stop();
|
|
44
|
-
}
|
|
45
|
-
}, _callee);
|
|
46
|
-
}));
|
|
47
|
-
return _temporaryFixForConfigPanel.apply(this, arguments);
|
|
48
|
-
}
|
|
49
|
-
function getEditorValueWithMedia(_x3) {
|
|
20
|
+
function getEditorValueWithMedia(_x) {
|
|
50
21
|
return _getEditorValueWithMedia.apply(this, arguments);
|
|
51
22
|
}
|
|
52
23
|
function _getEditorValueWithMedia() {
|
|
53
|
-
_getEditorValueWithMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
24
|
+
_getEditorValueWithMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(editorView) {
|
|
54
25
|
var mediaPluginState;
|
|
55
|
-
return _regenerator.default.wrap(function
|
|
56
|
-
while (1) switch (
|
|
26
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
|
27
|
+
while (1) switch (_context.prev = _context.next) {
|
|
57
28
|
case 0:
|
|
58
29
|
mediaPluginState = editorView.state && mediaPluginKey.getState(editorView.state);
|
|
59
30
|
if (!(mediaPluginState && mediaPluginState.waitForMediaUpload)) {
|
|
60
|
-
|
|
31
|
+
_context.next = 4;
|
|
61
32
|
break;
|
|
62
33
|
}
|
|
63
|
-
|
|
34
|
+
_context.next = 4;
|
|
64
35
|
return mediaPluginState.waitForPendingTasks();
|
|
65
36
|
case 4:
|
|
66
|
-
return
|
|
37
|
+
return _context.abrupt("return", editorView.state.doc);
|
|
67
38
|
case 5:
|
|
68
39
|
case "end":
|
|
69
|
-
return
|
|
40
|
+
return _context.stop();
|
|
70
41
|
}
|
|
71
|
-
},
|
|
42
|
+
}, _callee);
|
|
72
43
|
}));
|
|
73
44
|
return _getEditorValueWithMedia.apply(this, arguments);
|
|
74
45
|
}
|
|
@@ -6,7 +6,7 @@ import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
|
6
6
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { findParentNode, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
8
8
|
import { createDispatch } from '../event-dispatcher';
|
|
9
|
-
import {
|
|
9
|
+
import { getEditorValueWithMedia } from '../utils/action';
|
|
10
10
|
import deprecationWarnings from '../utils/deprecation-warnings';
|
|
11
11
|
import { findNodePosByFragmentLocalIds } from '../utils/nodes-by-localIds';
|
|
12
12
|
import { processRawFragmentValue } from '../utils/processRawFragmentValue';
|
|
@@ -148,17 +148,6 @@ export default class EditorActions {
|
|
|
148
148
|
editorView.dispatch(tr);
|
|
149
149
|
return true;
|
|
150
150
|
}
|
|
151
|
-
async __temporaryFixForConfigPanel() {
|
|
152
|
-
// @ts-ignore Internal API not for use, just to unblock extracting extension plugin
|
|
153
|
-
const {
|
|
154
|
-
editorView,
|
|
155
|
-
__EDITOR_INTERNALS_DO_NOT_USE__API
|
|
156
|
-
} = this;
|
|
157
|
-
if (!editorView || !__EDITOR_INTERNALS_DO_NOT_USE__API) {
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
__temporaryFixForConfigPanel(editorView, __EDITOR_INTERNALS_DO_NOT_USE__API);
|
|
161
|
-
}
|
|
162
151
|
|
|
163
152
|
/**
|
|
164
153
|
* @deprecated This is deprecated and is no longer maintained.
|
|
@@ -47,10 +47,12 @@ export const EditorInternal = /*#__PURE__*/memo(({
|
|
|
47
47
|
const setEditorApi = useCallback(
|
|
48
48
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
49
|
api => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
if (!fg('platform_editor_remove_editor_actions_workaround')) {
|
|
51
|
+
// This is an workaround to unblock Editor Lego Decoupling project, if you have questions ping us #cc-editor-lego
|
|
52
|
+
// We may clean up this code when EditorActions deprecation process starts
|
|
53
|
+
// @ts-expect-error 2339: Property '__EDITOR_INTERNALS_DO_NOT_USE__API' does not exist on type 'EditorActions<any>'.
|
|
54
|
+
editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
|
|
55
|
+
}
|
|
54
56
|
}, [editorActions]);
|
|
55
57
|
const overriddenEditorProps = {
|
|
56
58
|
...props,
|
|
@@ -137,8 +139,7 @@ export const EditorInternal = /*#__PURE__*/memo(({
|
|
|
137
139
|
enableToolbarMinWidth: ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.toolbarMinWidthOverflow) != null ? !!((_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.toolbarMinWidthOverflow) : props.allowUndoRedoButtons,
|
|
138
140
|
useStickyToolbar: props.useStickyToolbar,
|
|
139
141
|
featureFlags: featureFlags,
|
|
140
|
-
pluginHooks: config.pluginHooks
|
|
141
|
-
hideAvatarGroup: fg('platform_editor_remove_hide_avatar_group_prop') ? undefined : props.hideAvatarGroup
|
|
142
|
+
pluginHooks: config.pluginHooks
|
|
142
143
|
}));
|
|
143
144
|
}
|
|
144
145
|
}), jsx(PortalRenderer, null))))))));
|