@atlaskit/editor-core 203.7.2 → 203.7.4
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/codemods/__tests__/next-remove-allow-more-text-colors-prop.ts +2 -0
- package/codemods/__tests__/remove-config-panel-width-prop.ts +2 -0
- package/codemods/__tests__/rename-editor-to-editor-migration-component.ts +2 -0
- package/codemods/__tests__/rename-smartlinks-prop.ts +2 -0
- package/codemods/__tests__/rename-unsafe-allowUndoRedoButtons-prop.ts +2 -0
- package/codemods/__tests__/rename-unsafe-cards-prop.ts +2 -0
- package/codemods/utils.ts +2 -0
- package/dist/cjs/CollapsedEditor/index.js +4 -1
- package/dist/cjs/actions/index.js +7 -0
- package/dist/cjs/composable-editor/composable-editor.js +4 -0
- package/dist/cjs/composable-editor/core-editor.js +6 -1
- package/dist/cjs/composable-editor/editor-internal.js +13 -2
- package/dist/cjs/composable-editor/hooks/useProviderFactory.js +6 -1
- package/dist/cjs/composable-editor/utils/handleProviders.js +2 -0
- package/dist/cjs/create-editor/ErrorBoundary.js +2 -0
- package/dist/cjs/create-editor/ReactEditorView.js +8 -1
- package/dist/cjs/create-editor/WithEditorView.js +8 -3
- package/dist/cjs/create-editor/create-editor.js +2 -0
- package/dist/cjs/create-editor/feature-flags-from-props.js +2 -0
- package/dist/cjs/editor-appearances/ChromelessEditor.js +2 -0
- package/dist/cjs/editor-appearances/CommentEditor.js +2 -0
- package/dist/cjs/editor-appearances/FullPageEditor.js +4 -1
- package/dist/cjs/editor-appearances/FullWidthEditor.js +2 -0
- package/dist/cjs/editor.js +4 -0
- package/dist/cjs/test-utils.js +2 -0
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +2 -0
- package/dist/cjs/ui/Addon/Dropdown/index.js +2 -0
- package/dist/cjs/ui/Addon/click-area-helper.js +13 -2
- package/dist/cjs/ui/Appearance/Chromeless.js +2 -0
- package/dist/cjs/ui/Appearance/Comment/Comment.js +15 -3
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +4 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +12 -3
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +3 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +4 -0
- package/dist/cjs/ui/ChromeCollapsed/index.js +2 -0
- package/dist/cjs/ui/CollapsedEditor/index.js +2 -0
- package/dist/cjs/ui/ContentStyles/status.js +13 -2
- package/dist/cjs/ui/ContextPanel/index.js +10 -4
- package/dist/cjs/ui/EditorContext/index.js +11 -0
- package/dist/cjs/ui/ErrorBoundary/index.js +2 -0
- package/dist/cjs/ui/PluginSlot/index.js +10 -0
- package/dist/cjs/ui/PluginSlot/mount-plugin-hooks.js +4 -1
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +5 -0
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +8 -2
- package/dist/cjs/ui/WithEditorActions/index.js +11 -1
- package/dist/cjs/ui/WithFlash/index.js +2 -0
- package/dist/cjs/ui/WithHelpTrigger/index.js +4 -0
- package/dist/cjs/utils/extensions.js +5 -1
- package/dist/cjs/utils/findChangedNodesFromTransaction.js +2 -0
- package/dist/cjs/utils/outdatedBrowsers.js +21 -1
- package/dist/cjs/utils/prepare-quick-insert-provider.js +2 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/CollapsedEditor/index.js +6 -0
- package/dist/es2019/actions/index.js +8 -0
- package/dist/es2019/composable-editor/composable-editor.js +4 -0
- package/dist/es2019/composable-editor/core-editor.js +6 -1
- package/dist/es2019/composable-editor/editor-internal.js +13 -2
- package/dist/es2019/composable-editor/hooks/useProviderFactory.js +6 -1
- package/dist/es2019/composable-editor/utils/handleProviders.js +2 -0
- package/dist/es2019/create-editor/ErrorBoundary.js +2 -0
- package/dist/es2019/create-editor/ReactEditorView.js +6 -0
- package/dist/es2019/create-editor/WithEditorView.js +8 -3
- package/dist/es2019/create-editor/create-editor.js +2 -0
- package/dist/es2019/create-editor/feature-flags-from-props.js +2 -0
- package/dist/es2019/editor-appearances/ChromelessEditor.js +2 -0
- package/dist/es2019/editor-appearances/CommentEditor.js +2 -0
- package/dist/es2019/editor-appearances/FullPageEditor.js +4 -1
- package/dist/es2019/editor-appearances/FullWidthEditor.js +2 -0
- package/dist/es2019/editor.js +4 -0
- package/dist/es2019/test-utils.js +2 -0
- package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +2 -0
- package/dist/es2019/ui/Addon/Dropdown/index.js +2 -0
- package/dist/es2019/ui/Addon/click-area-helper.js +13 -2
- package/dist/es2019/ui/Appearance/Chromeless.js +2 -0
- package/dist/es2019/ui/Appearance/Comment/Comment.js +14 -3
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +4 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +12 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +4 -0
- package/dist/es2019/ui/ChromeCollapsed/index.js +3 -2
- package/dist/es2019/ui/CollapsedEditor/index.js +2 -0
- package/dist/es2019/ui/ContentStyles/status.js +23 -5
- package/dist/es2019/ui/ContextPanel/index.js +10 -4
- package/dist/es2019/ui/EditorContext/index.js +11 -0
- package/dist/es2019/ui/ErrorBoundary/index.js +2 -0
- package/dist/es2019/ui/PluginSlot/index.js +10 -0
- package/dist/es2019/ui/PluginSlot/mount-plugin-hooks.js +4 -1
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +5 -0
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +8 -2
- package/dist/es2019/ui/WithEditorActions/index.js +12 -0
- package/dist/es2019/ui/WithFlash/index.js +2 -0
- package/dist/es2019/ui/WithHelpTrigger/index.js +4 -0
- package/dist/es2019/utils/extensions.js +6 -0
- package/dist/es2019/utils/findChangedNodesFromTransaction.js +2 -0
- package/dist/es2019/utils/outdatedBrowsers.js +21 -1
- package/dist/es2019/utils/prepare-quick-insert-provider.js +2 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/CollapsedEditor/index.js +6 -0
- package/dist/esm/actions/index.js +7 -0
- package/dist/esm/composable-editor/composable-editor.js +4 -0
- package/dist/esm/composable-editor/core-editor.js +6 -1
- package/dist/esm/composable-editor/editor-internal.js +13 -2
- package/dist/esm/composable-editor/hooks/useProviderFactory.js +6 -1
- package/dist/esm/composable-editor/utils/handleProviders.js +2 -0
- package/dist/esm/create-editor/ErrorBoundary.js +2 -0
- package/dist/esm/create-editor/ReactEditorView.js +8 -1
- package/dist/esm/create-editor/WithEditorView.js +8 -3
- package/dist/esm/create-editor/create-editor.js +2 -0
- package/dist/esm/create-editor/feature-flags-from-props.js +2 -0
- package/dist/esm/editor-appearances/ChromelessEditor.js +2 -0
- package/dist/esm/editor-appearances/CommentEditor.js +2 -0
- package/dist/esm/editor-appearances/FullPageEditor.js +4 -1
- package/dist/esm/editor-appearances/FullWidthEditor.js +2 -0
- package/dist/esm/editor.js +4 -0
- package/dist/esm/test-utils.js +2 -0
- package/dist/esm/ui/Addon/ClickAreaMobile/index.js +2 -0
- package/dist/esm/ui/Addon/Dropdown/index.js +2 -0
- package/dist/esm/ui/Addon/click-area-helper.js +13 -2
- package/dist/esm/ui/Appearance/Chromeless.js +2 -0
- package/dist/esm/ui/Appearance/Comment/Comment.js +14 -3
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +4 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +12 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +4 -0
- package/dist/esm/ui/ChromeCollapsed/index.js +3 -2
- package/dist/esm/ui/CollapsedEditor/index.js +2 -0
- package/dist/esm/ui/ContentStyles/status.js +15 -4
- package/dist/esm/ui/ContextPanel/index.js +10 -4
- package/dist/esm/ui/EditorContext/index.js +11 -0
- package/dist/esm/ui/ErrorBoundary/index.js +2 -0
- package/dist/esm/ui/PluginSlot/index.js +10 -0
- package/dist/esm/ui/PluginSlot/mount-plugin-hooks.js +4 -1
- package/dist/esm/ui/Toolbar/ToolbarInner.js +5 -0
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +8 -2
- package/dist/esm/ui/WithEditorActions/index.js +11 -1
- package/dist/esm/ui/WithFlash/index.js +2 -0
- package/dist/esm/ui/WithHelpTrigger/index.js +4 -0
- package/dist/esm/utils/extensions.js +6 -0
- package/dist/esm/utils/findChangedNodesFromTransaction.js +2 -0
- package/dist/esm/utils/outdatedBrowsers.js +21 -1
- package/dist/esm/utils/prepare-quick-insert-provider.js +2 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +1825 -1825
- package/dist/types/create-editor/get-plugins.d.ts +2 -2
- package/dist/types/presets/default.d.ts +476 -476
- package/dist/types/presets/universal.d.ts +1394 -1394
- package/dist/types/presets/useUniversalPreset.d.ts +2032 -2032
- package/dist/types/ui/CollapsedEditor/index.d.ts +1 -2
- package/dist/types/ui/EditorContext/index.d.ts +2 -2
- package/dist/types/ui/WithEditorActions/index.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +1823 -1823
- package/dist/types-ts4.5/create-editor/get-plugins.d.ts +2 -2
- package/dist/types-ts4.5/presets/default.d.ts +476 -476
- package/dist/types-ts4.5/presets/universal.d.ts +1394 -1394
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +2030 -2030
- package/dist/types-ts4.5/ui/CollapsedEditor/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/EditorContext/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/WithEditorActions/index.d.ts +1 -1
- package/docs/0-intro.tsx +6 -0
- package/docs/1-legacy-editor.tsx +6 -0
- package/docs/4-annotations.tsx +2 -0
- package/package.json +12 -8
- package/tsconfig.json +0 -1
|
@@ -24,6 +24,8 @@ import measurements from '../utils/performance/measure-enum';
|
|
|
24
24
|
import { name, version } from '../version-wrapper';
|
|
25
25
|
import { EditorInternal } from './editor-internal';
|
|
26
26
|
import useMeasureEditorMountTime from './hooks/useMeasureEditorMountTime';
|
|
27
|
+
// Ignored via go/ees005
|
|
28
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
27
29
|
import useMemoEditorProps from './hooks/useMemoEditorProps';
|
|
28
30
|
import useProviderFactory from './hooks/useProviderFactory';
|
|
29
31
|
import { useTrackDangerouslyAppendPlugins } from './temp_useTrackDangerousPlugins';
|
|
@@ -121,7 +123,10 @@ export function CoreEditor(props) {
|
|
|
121
123
|
// @ts-expect-error Type 'string' is not assignable to type '"editorCore" | "renderer"'.
|
|
122
124
|
, {
|
|
123
125
|
data: data
|
|
124
|
-
}, jsx(Editor
|
|
126
|
+
}, jsx(Editor
|
|
127
|
+
// Ignored via go/ees005
|
|
128
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
129
|
+
, _extends({}, props, {
|
|
125
130
|
featureFlags: memodEditorFeatureFlags
|
|
126
131
|
})));
|
|
127
132
|
}
|
|
@@ -16,6 +16,8 @@ import { usePortalProvider } from '@atlaskit/editor-common/portal';
|
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
import ErrorBoundary from '../create-editor/ErrorBoundary';
|
|
18
18
|
import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
|
|
19
|
+
// Ignored via go/ees005
|
|
20
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
19
21
|
import ReactEditorView from '../create-editor/ReactEditorView';
|
|
20
22
|
import ReactEditorViewNext from '../create-editor/ReactEditorViewNext';
|
|
21
23
|
import EditorContext from '../ui/EditorContext';
|
|
@@ -102,7 +104,10 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
|
|
|
102
104
|
baseFontSize: getBaseFontSize(props.appearance)
|
|
103
105
|
}, jsx(AppearanceComponent, {
|
|
104
106
|
innerRef: editorRef,
|
|
105
|
-
editorAPI: editorAPI
|
|
107
|
+
editorAPI: editorAPI
|
|
108
|
+
// Ignored via go/ees005
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
110
|
+
,
|
|
106
111
|
appearance: props.appearance,
|
|
107
112
|
disabled: props.disabled,
|
|
108
113
|
editorActions: editorActions,
|
|
@@ -157,7 +162,10 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
|
|
|
157
162
|
baseFontSize: getBaseFontSize(props.appearance)
|
|
158
163
|
}, jsx(AppearanceComponent, {
|
|
159
164
|
innerRef: editorRef,
|
|
160
|
-
editorAPI: editorAPI
|
|
165
|
+
editorAPI: editorAPI
|
|
166
|
+
// Ignored via go/ees005
|
|
167
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
168
|
+
,
|
|
161
169
|
appearance: props.appearance,
|
|
162
170
|
disabled: props.disabled,
|
|
163
171
|
editorActions: editorActions,
|
|
@@ -211,6 +219,9 @@ function ReactEditorViewContextWrapper(props) {
|
|
|
211
219
|
autoformattingProvider: props.editorProps.autoformattingProvider,
|
|
212
220
|
taskDecisionProvider: props.editorProps.taskDecisionProvider
|
|
213
221
|
});
|
|
222
|
+
|
|
223
|
+
// Ignored via go/ees005
|
|
224
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
214
225
|
return jsx(ReactEditorView, _extends({}, props, {
|
|
215
226
|
editorAPI: editorAPI,
|
|
216
227
|
setEditorAPI: setEditorAPI
|
|
@@ -4,7 +4,10 @@ import prepareExtensionProvider from '../../utils/prepare-extension-provider';
|
|
|
4
4
|
import prepareQuickInsertProvider from '../../utils/prepare-quick-insert-provider';
|
|
5
5
|
import getProvidersFromEditorProps from '../utils/getProvidersFromEditorProps';
|
|
6
6
|
import handleProviders from '../utils/handleProviders';
|
|
7
|
-
function useEditorRef(
|
|
7
|
+
function useEditorRef(
|
|
8
|
+
// Ignored via go/ees005
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
+
preset) {
|
|
8
11
|
var apiRef = useRef();
|
|
9
12
|
useEffect(function () {
|
|
10
13
|
return preset === null || preset === void 0 ? void 0 : preset.apiResolver.on(function (api) {
|
|
@@ -13,6 +16,8 @@ function useEditorRef(preset) {
|
|
|
13
16
|
}, [preset === null || preset === void 0 ? void 0 : preset.apiResolver]);
|
|
14
17
|
return apiRef;
|
|
15
18
|
}
|
|
19
|
+
// Ignored via go/ees005
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
16
21
|
function prepareProviders(editorActions, apiRef, quickInsert, extensionProviders, createAnalyticsEvent) {
|
|
17
22
|
var extensionProvider = prepareExtensionProvider(function () {
|
|
18
23
|
return editorActions;
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* @param extensionProvider
|
|
8
8
|
* @param quickInsertProvider
|
|
9
9
|
*/
|
|
10
|
+
// Ignored via go/ees005
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
10
12
|
export default function handleProviders(providerFactory, _ref, extensionProvider, quickInsertProvider) {
|
|
11
13
|
var mentionProvider = _ref.mentionProvider,
|
|
12
14
|
contextIdentifierProvider = _ref.contextIdentifierProvider,
|
|
@@ -16,6 +16,8 @@ import { IntlErrorBoundary } from '@atlaskit/editor-common/intl-error-boundary';
|
|
|
16
16
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
17
17
|
import { isOutdatedBrowser } from '../utils/outdatedBrowsers';
|
|
18
18
|
import { WithEditorView } from './WithEditorView';
|
|
19
|
+
// Ignored via go/ees005
|
|
20
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
19
21
|
export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
|
|
20
22
|
function ErrorBoundaryWithEditorView(props) {
|
|
21
23
|
var _this;
|
|
@@ -80,6 +80,8 @@ function handleEditorFocus(view) {
|
|
|
80
80
|
view.focus();
|
|
81
81
|
}, 0);
|
|
82
82
|
}
|
|
83
|
+
// Ignored via go/ees005
|
|
84
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
83
85
|
export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
84
86
|
function ReactEditorView(props) {
|
|
85
87
|
var _this$props$editorPro3, _props$setEditorAPI;
|
|
@@ -390,6 +392,8 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
390
392
|
_defineProperty(_this, "handleEditorViewRef", function (node) {
|
|
391
393
|
if (!_this.view && node) {
|
|
392
394
|
_this.createEditorView(node);
|
|
395
|
+
// Ignored via go/ees005
|
|
396
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
393
397
|
var view = _this.view;
|
|
394
398
|
_this.props.onEditorCreated({
|
|
395
399
|
view: view,
|
|
@@ -523,7 +527,10 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
523
527
|
}
|
|
524
528
|
}, {
|
|
525
529
|
key: "UNSAFE_componentWillReceiveProps",
|
|
526
|
-
value:
|
|
530
|
+
value:
|
|
531
|
+
// Ignored via go/ees005
|
|
532
|
+
// eslint-disable-next-line react/no-unsafe
|
|
533
|
+
function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
527
534
|
var _nextProps$editorProp, _this$props$editorPro4;
|
|
528
535
|
if (this.view && this.props.editorProps.disabled !== nextProps.editorProps.disabled) {
|
|
529
536
|
// Disables the contentEditable attribute of the editor if the editor is disabled
|
|
@@ -5,9 +5,14 @@ export var WithEditorView = function WithEditorView(WrappedComponent) {
|
|
|
5
5
|
var _WithFeatureFlags = function _WithFeatureFlags(props) {
|
|
6
6
|
var _useEditorContext = useEditorContext(),
|
|
7
7
|
editorActions = _useEditorContext.editorActions;
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
return (
|
|
9
|
+
/*#__PURE__*/
|
|
10
|
+
// Ignored via go/ees005
|
|
11
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
12
|
+
React.createElement(WrappedComponent, _extends({}, props, {
|
|
13
|
+
editorView: editorActions === null || editorActions === void 0 ? void 0 : editorActions._privateGetEditorView()
|
|
14
|
+
}))
|
|
15
|
+
);
|
|
11
16
|
};
|
|
12
17
|
return _WithFeatureFlags;
|
|
13
18
|
};
|
|
@@ -30,6 +30,8 @@ export function processPluginsList(plugins) {
|
|
|
30
30
|
if (!acc[pluginName]) {
|
|
31
31
|
acc[pluginName] = [];
|
|
32
32
|
}
|
|
33
|
+
// Ignored via go/ees005
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
33
35
|
acc[pluginName].push(plugin.pluginsOptions[pluginName]);
|
|
34
36
|
});
|
|
35
37
|
}
|
|
@@ -34,6 +34,8 @@ export function createFeatureFlagsFromProps(featureFlags) {
|
|
|
34
34
|
enableViewUpdateSubscription: Boolean(typeof (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.enableViewUpdateSubscription) === 'boolean' ? !!(featureFlags !== null && featureFlags !== void 0 && featureFlags.enableViewUpdateSubscription) : false),
|
|
35
35
|
collabAvatarScroll: Boolean(typeof (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.collabAvatarScroll) === 'boolean' ? !!(featureFlags !== null && featureFlags !== void 0 && featureFlags.collabAvatarScroll) : false),
|
|
36
36
|
twoLineEditorToolbar: Boolean(typeof (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.twoLineEditorToolbar) === 'boolean' ? !!(featureFlags !== null && featureFlags !== void 0 && featureFlags.twoLineEditorToolbar) : false),
|
|
37
|
+
// Ignored via go/ees005
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
37
39
|
disableSpellcheckByBrowser: getSpellCheck(featureFlags)
|
|
38
40
|
});
|
|
39
41
|
}
|
|
@@ -13,6 +13,8 @@ import Chromeless from '../ui/Appearance/Chromeless';
|
|
|
13
13
|
* @returns Editor component
|
|
14
14
|
*/
|
|
15
15
|
export function ChromelessEditor(props) {
|
|
16
|
+
// Ignored via go/ees005
|
|
17
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
16
18
|
return /*#__PURE__*/React.createElement(CoreEditor, _extends({}, props, {
|
|
17
19
|
appearance: "chromeless",
|
|
18
20
|
AppearanceComponent: Chromeless
|
|
@@ -13,6 +13,8 @@ import { CommentEditorWithIntl as Comment } from '../ui/Appearance/Comment/Comme
|
|
|
13
13
|
* @returns Editor component
|
|
14
14
|
*/
|
|
15
15
|
export function CommentEditor(props) {
|
|
16
|
+
// Ignored via go/ees005
|
|
17
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
16
18
|
return /*#__PURE__*/React.createElement(CoreEditor, _extends({}, props, {
|
|
17
19
|
appearance: "comment",
|
|
18
20
|
AppearanceComponent: Comment
|
|
@@ -14,7 +14,10 @@ import { FullPageEditor as FullPage } from '../ui/Appearance/FullPage/FullPage';
|
|
|
14
14
|
*/
|
|
15
15
|
export function FullPageEditor(props) {
|
|
16
16
|
var _props$appearance;
|
|
17
|
-
return /*#__PURE__*/React.createElement(CoreEditor
|
|
17
|
+
return /*#__PURE__*/React.createElement(CoreEditor
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
20
|
+
, _extends({}, props, {
|
|
18
21
|
appearance: (_props$appearance = props.appearance) !== null && _props$appearance !== void 0 ? _props$appearance : 'full-page',
|
|
19
22
|
AppearanceComponent: FullPage
|
|
20
23
|
}));
|
|
@@ -15,6 +15,8 @@ import { FullPageEditor as FullPage } from '../ui/Appearance/FullPage/FullPage';
|
|
|
15
15
|
* @deprecated In favour of `FullPageEditor` with appearance "full-width"
|
|
16
16
|
*/
|
|
17
17
|
export function FullWidthEditor(props) {
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
18
20
|
return /*#__PURE__*/React.createElement(CoreEditor, _extends({}, props, {
|
|
19
21
|
appearance: "full-width",
|
|
20
22
|
AppearanceComponent: FullPage
|
package/dist/esm/editor.js
CHANGED
|
@@ -28,6 +28,8 @@ var ComposableEditorWrapper = function ComposableEditorWrapper(_ref) {
|
|
|
28
28
|
props: props,
|
|
29
29
|
initialPluginConfiguration: initialPluginConfiguration
|
|
30
30
|
});
|
|
31
|
+
// Ignored via go/ees005
|
|
32
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
31
33
|
return jsx(ComposableEditor, _extends({
|
|
32
34
|
preset: preset
|
|
33
35
|
}, props));
|
|
@@ -40,6 +42,8 @@ var ComposableEditorWrapper = function ComposableEditorWrapper(_ref) {
|
|
|
40
42
|
* It allows you to create an editor with a custom set of plugins and configurations.
|
|
41
43
|
* For more information, see the documentation for the `ComposableEditor` component here: https://atlaskit.atlassian.com/packages/editor/editor-core
|
|
42
44
|
*/
|
|
45
|
+
// Ignored via go/ees005
|
|
46
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
43
47
|
var Editor = /*#__PURE__*/function (_React$Component) {
|
|
44
48
|
function Editor(props) {
|
|
45
49
|
var _this;
|
package/dist/esm/test-utils.js
CHANGED
|
@@ -20,6 +20,8 @@ function lightProcessPluginsList(editorPlugins) {
|
|
|
20
20
|
if (!acc[pluginName]) {
|
|
21
21
|
acc[pluginName] = [];
|
|
22
22
|
}
|
|
23
|
+
// Ignored via go/ees005
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
23
25
|
acc[pluginName].push(plugin.pluginsOptions[pluginName]);
|
|
24
26
|
});
|
|
25
27
|
}
|
|
@@ -44,6 +44,8 @@ var clickWrapper = function clickWrapper(_ref) {
|
|
|
44
44
|
* This relies on the Scroll Gutter plugin which inserts additional
|
|
45
45
|
* whitespace at the end of the document when it overflows the viewport.
|
|
46
46
|
*/
|
|
47
|
+
// Ignored via go/ees005
|
|
48
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
47
49
|
var ClickAreaMobile = /*#__PURE__*/function (_React$Component) {
|
|
48
50
|
function ClickAreaMobile() {
|
|
49
51
|
var _this;
|
|
@@ -15,6 +15,8 @@ import React from 'react';
|
|
|
15
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
16
|
import { jsx } from '@emotion/react';
|
|
17
17
|
import { dropdown } from './styles';
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
18
20
|
var DropdownWrapper = /*#__PURE__*/function (_React$Component) {
|
|
19
21
|
function DropdownWrapper() {
|
|
20
22
|
var _this;
|
|
@@ -8,6 +8,8 @@ var insideContentArea = function insideContentArea(ref) {
|
|
|
8
8
|
if (ref.classList && ref.classList.contains('ak-editor-content-area')) {
|
|
9
9
|
return true;
|
|
10
10
|
}
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
11
13
|
ref = ref.parentNode;
|
|
12
14
|
}
|
|
13
15
|
return false;
|
|
@@ -41,6 +43,9 @@ var clickAreaClickHandler = function clickAreaClickHandler(view, event) {
|
|
|
41
43
|
if (!(event.target instanceof HTMLElement)) {
|
|
42
44
|
return;
|
|
43
45
|
}
|
|
46
|
+
|
|
47
|
+
// Ignored via go/ees005
|
|
48
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
44
49
|
var target = event.target;
|
|
45
50
|
var isTargetContentArea = target === null || target === void 0 ? void 0 : target.classList.contains('ak-editor-content-area');
|
|
46
51
|
var isTargetChildOfContentArea = insideContentArea((target === null || target === void 0 ? void 0 : target.parentNode) instanceof HTMLElement ? target === null || target === void 0 ? void 0 : target.parentNode : null);
|
|
@@ -63,7 +68,10 @@ var clickAreaClickHandler = function clickAreaClickHandler(view, event) {
|
|
|
63
68
|
var isTextAreaClicked = (target === null || target === void 0 ? void 0 : target.nodeName) === 'TEXTAREA';
|
|
64
69
|
var isBreadcrumbClicked = !!closestElement(target, 'nav[aria-label="Breadcrumbs"]');
|
|
65
70
|
var selection = window.getSelection();
|
|
66
|
-
var isEditorPopupTextSelected = (selection === null || selection === void 0 ? void 0 : selection.type) === 'Range' &&
|
|
71
|
+
var isEditorPopupTextSelected = (selection === null || selection === void 0 ? void 0 : selection.type) === 'Range' &&
|
|
72
|
+
// Ignored via go/ees005
|
|
73
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
74
|
+
closestElement(selection === null || selection === void 0 ? void 0 : selection.anchorNode, '[data-editor-popup]');
|
|
67
75
|
|
|
68
76
|
// This is a super workaround to find when events are coming from Confluence InlineComment modal
|
|
69
77
|
// We don't own those components, so we can't change them
|
|
@@ -98,7 +106,10 @@ var outsideProsemirrorEditorClickHandler = function outsideProsemirrorEditorClic
|
|
|
98
106
|
tr.setMeta('outsideProsemirrorEditorClicked', true);
|
|
99
107
|
addParagraphAtEnd(tr);
|
|
100
108
|
}
|
|
101
|
-
setSelectionTopLevelBlocks(tr, event,
|
|
109
|
+
setSelectionTopLevelBlocks(tr, event,
|
|
110
|
+
// Ignored via go/ees005
|
|
111
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
112
|
+
dom, view.posAtCoords.bind(view), isEditorFocused);
|
|
102
113
|
tintDirtyTransaction(tr);
|
|
103
114
|
if (!tr.docChanged && !tr.selectionSet) {
|
|
104
115
|
return;
|
|
@@ -44,6 +44,8 @@ scrollbarStyles, {
|
|
|
44
44
|
});
|
|
45
45
|
var ContentArea = createEditorContentStyle();
|
|
46
46
|
ContentArea.displayName = 'ContentArea';
|
|
47
|
+
// Ignored via go/ees005
|
|
48
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
47
49
|
var Editor = /*#__PURE__*/function (_React$Component) {
|
|
48
50
|
function Editor() {
|
|
49
51
|
var _this;
|
|
@@ -18,6 +18,8 @@ import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
|
18
18
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
19
19
|
import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
20
20
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
21
|
+
// Ignored via go/ees005
|
|
22
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
21
23
|
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
22
24
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
23
25
|
import PluginSlot from '../../PluginSlot';
|
|
@@ -174,10 +176,19 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
174
176
|
editorAppearance: appearance,
|
|
175
177
|
useStickyToolbar: useStickyToolbar,
|
|
176
178
|
intl: intl
|
|
177
|
-
}, jsx(Toolbar
|
|
179
|
+
}, jsx(Toolbar
|
|
180
|
+
// Ignored via go/ees005
|
|
181
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
182
|
+
, {
|
|
178
183
|
editorView: editorView,
|
|
179
|
-
editorActions: editorActions
|
|
180
|
-
|
|
184
|
+
editorActions: editorActions
|
|
185
|
+
// Ignored via go/ees005
|
|
186
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
187
|
+
,
|
|
188
|
+
eventDispatcher: eventDispatcher
|
|
189
|
+
// Ignored via go/ees005
|
|
190
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
191
|
+
,
|
|
181
192
|
providerFactory: providerFactory,
|
|
182
193
|
appearance: appearance,
|
|
183
194
|
items: primaryToolbarComponents,
|
|
@@ -103,7 +103,10 @@ export var MainToolbar = function MainToolbar(_ref) {
|
|
|
103
103
|
twoLineEditorToolbar = _ref.twoLineEditorToolbar,
|
|
104
104
|
children = _ref.children;
|
|
105
105
|
if (useStickyToolbar) {
|
|
106
|
-
return jsx(StickyToolbar
|
|
106
|
+
return jsx(StickyToolbar
|
|
107
|
+
// Ignored via go/ees005
|
|
108
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
109
|
+
, _extends({}, getStickyParameters(useStickyToolbar), {
|
|
107
110
|
twoLineEditorToolbar: twoLineEditorToolbar
|
|
108
111
|
}), children);
|
|
109
112
|
}
|
|
@@ -76,8 +76,14 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
76
76
|
disabled: !!props.disabled,
|
|
77
77
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
78
78
|
editorActions: props.editorActions,
|
|
79
|
-
editorDOMElement: props.editorDOMElement
|
|
80
|
-
|
|
79
|
+
editorDOMElement: props.editorDOMElement
|
|
80
|
+
// Ignored via go/ees005
|
|
81
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
82
|
+
,
|
|
83
|
+
editorView: props.editorView
|
|
84
|
+
// Ignored via go/ees005
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
86
|
+
,
|
|
81
87
|
eventDispatcher: props.eventDispatcher,
|
|
82
88
|
hasMinWidth: props.enableToolbarMinWidth,
|
|
83
89
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
@@ -97,7 +103,10 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
97
103
|
disabled: props.disabled,
|
|
98
104
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
99
105
|
editorActions: props.editorActions,
|
|
100
|
-
editorDOMElement: props.editorDOMElement
|
|
106
|
+
editorDOMElement: props.editorDOMElement
|
|
107
|
+
// Ignored via go/ees005
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
109
|
+
,
|
|
101
110
|
editorView: props.editorView,
|
|
102
111
|
eventDispatcher: props.eventDispatcher,
|
|
103
112
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
@@ -10,6 +10,8 @@ import { jsx, useTheme } from '@emotion/react';
|
|
|
10
10
|
import { injectIntl } from 'react-intl-next';
|
|
11
11
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
13
15
|
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
14
16
|
import { ContextPanel } from '../../ContextPanel';
|
|
15
17
|
import PluginSlot from '../../PluginSlot';
|
|
@@ -66,8 +66,12 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
66
66
|
var updateOnResize = function updateOnResize() {
|
|
67
67
|
setShouldSplitToolbar(window.innerWidth <= MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT);
|
|
68
68
|
};
|
|
69
|
+
// Ignored via go/ees005
|
|
70
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
69
71
|
window.addEventListener('resize', updateOnResize);
|
|
70
72
|
updateOnResize();
|
|
73
|
+
// Ignored via go/ees005
|
|
74
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
71
75
|
return function () {
|
|
72
76
|
return window.removeEventListener('resize', updateOnResize);
|
|
73
77
|
};
|
|
@@ -10,14 +10,15 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
10
10
|
* @jsxRuntime classic
|
|
11
11
|
* @jsx jsx
|
|
12
12
|
*/
|
|
13
|
-
import React from 'react';
|
|
14
|
-
import { PureComponent } from 'react';
|
|
13
|
+
import React, { PureComponent } from 'react';
|
|
15
14
|
|
|
16
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
16
|
import { jsx } from '@emotion/react';
|
|
18
17
|
import { injectIntl } from 'react-intl-next';
|
|
19
18
|
import { messages } from './messages';
|
|
20
19
|
import { inputStyle } from './styles';
|
|
20
|
+
// Ignored via go/ees005
|
|
21
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
21
22
|
var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
22
23
|
function ChromeCollapsed() {
|
|
23
24
|
var _this;
|
|
@@ -9,6 +9,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import ChromeCollapsed from '../ChromeCollapsed';
|
|
11
11
|
import { IntlProviderIfMissingWrapper } from '../IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper';
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
12
14
|
var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
|
|
13
15
|
function CollapsedEditor() {
|
|
14
16
|
var _this;
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
|
-
import { StatusSharedCssClassName, TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
6
|
-
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
5
|
+
import { StatusSharedCssClassName, TableSharedCssClassName, getStatusSharedStyles } from '@atlaskit/editor-common/styles';
|
|
6
|
+
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSelectedBoldBoxShadow, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
10
|
+
var getVisualRefreshStatusStyles = function getVisualRefreshStatusStyles() {
|
|
11
|
+
return (
|
|
12
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
13
|
+
fg('platform-component-visual-refresh') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
14
|
+
css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\t&.", " .", " > span {\n\t\t\t\t\tbox-shadow: ", ";\n\t\t\t\t}\n\t\t\t"])), akEditorSelectedNodeClassName, StatusSharedCssClassName.STATUS_LOZENGE, akEditorSelectedBoldBoxShadow) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
15
|
+
css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t\t&.", " .", " > span {\n\t\t\t\t\t", "\n\t\t\t\t}\n\t\t\t"])), akEditorSelectedNodeClassName, StatusSharedCssClassName.STATUS_LOZENGE, getSelectionStyles([SelectionStyle.BoxShadow]))
|
|
16
|
+
);
|
|
17
|
+
};
|
|
7
18
|
|
|
8
19
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
9
|
-
export var statusStyles = css(
|
|
20
|
+
export var statusStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t.", ",\n\t\t.", ",\n\t\t[data-layout-section] {\n\t\t.", " {\n\t\t\tmax-width: 100%;\n\t\t\tline-height: 0;\n\n\t\t\t> span {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n\t.", " {\n\t\t> span {\n\t\t\tcursor: pointer;\n\t\t\tline-height: 0; /* Prevent responsive layouts increasing height of container. */\n\t\t}\n\n\t\t", "\n\n\t\t", "\n\t}\n\n\t.danger {\n\t\t.", " > span {\n\t\t\tbackground-color: ", ";\n\t\t}\n\n\t\t.", ".", "\n\t\t\t.", "\n\t\t\t> span {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t}\n\t}\n"])), TableSharedCssClassName.TABLE_CELL_WRAPPER, TableSharedCssClassName.TABLE_HEADER_CELL_WRAPPER, StatusSharedCssClassName.STATUS_CONTAINER, StatusSharedCssClassName.STATUS_CONTAINER, getStatusSharedStyles(), getVisualRefreshStatusStyles(), StatusSharedCssClassName.STATUS_LOZENGE, akEditorDeleteBackgroundWithOpacity, StatusSharedCssClassName.STATUS_CONTAINER, akEditorSelectedNodeClassName, StatusSharedCssClassName.STATUS_LOZENGE, akEditorSelectedBorderSize, akEditorDeleteBorder);
|
|
@@ -50,6 +50,8 @@ export var content = css({
|
|
|
50
50
|
var paddingStyles = css({
|
|
51
51
|
padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-200, 16px)", " 0px")
|
|
52
52
|
});
|
|
53
|
+
// Ignored via go/ees005
|
|
54
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
53
55
|
export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
54
56
|
function SwappableContentArea() {
|
|
55
57
|
var _this;
|
|
@@ -166,8 +168,12 @@ export function ContextPanel(props) {
|
|
|
166
168
|
var _useSharedPluginState = useSharedPluginState(props.editorAPI, ['contextPanel']),
|
|
167
169
|
contextPanelState = _useSharedPluginState.contextPanelState;
|
|
168
170
|
var firstContent = contextPanelState && (contextPanelState === null || contextPanelState === void 0 || (_contextPanelState$co = contextPanelState.contents) === null || _contextPanelState$co === void 0 ? void 0 : _contextPanelState$co.find(Boolean));
|
|
169
|
-
return
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
return (
|
|
172
|
+
// Ignored via go/ees005
|
|
173
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
174
|
+
jsx(SwappableContentArea, _extends({}, props, {
|
|
175
|
+
editorAPI: props.editorAPI,
|
|
176
|
+
pluginContent: firstContent
|
|
177
|
+
}))
|
|
178
|
+
);
|
|
173
179
|
}
|
|
@@ -14,6 +14,9 @@ import EditorActions from '../../actions';
|
|
|
14
14
|
export var useEditorContext = function useEditorContext() {
|
|
15
15
|
return React.useContext(EditorContext);
|
|
16
16
|
};
|
|
17
|
+
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components, react/prefer-stateless-function
|
|
17
20
|
export var LegacyEditorContext = /*#__PURE__*/function (_React$Component) {
|
|
18
21
|
function LegacyEditorContext(props) {
|
|
19
22
|
_classCallCheck(this, LegacyEditorContext);
|
|
@@ -24,8 +27,13 @@ export var LegacyEditorContext = /*#__PURE__*/function (_React$Component) {
|
|
|
24
27
|
key: "render",
|
|
25
28
|
value: function render() {
|
|
26
29
|
if (fg('platform_editor_react18_phase2_v2')) {
|
|
30
|
+
// Ignored via go/ees005
|
|
31
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
27
32
|
return /*#__PURE__*/React.createElement(LegacyEditorContextNew, this.props, this.props.children);
|
|
28
33
|
}
|
|
34
|
+
|
|
35
|
+
// Ignored via go/ees005
|
|
36
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
29
37
|
return /*#__PURE__*/React.createElement(LegacyEditorContextOld, this.props, this.props.children);
|
|
30
38
|
}
|
|
31
39
|
}]);
|
|
@@ -39,6 +47,9 @@ function LegacyEditorContextNew(_ref) {
|
|
|
39
47
|
}
|
|
40
48
|
}, children);
|
|
41
49
|
}
|
|
50
|
+
|
|
51
|
+
// Ignored via go/ees005
|
|
52
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
42
53
|
var LegacyEditorContextOld = /*#__PURE__*/function (_React$Component2) {
|
|
43
54
|
function LegacyEditorContextOld(props) {
|
|
44
55
|
var _this;
|
|
@@ -9,6 +9,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
11
11
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
12
14
|
export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
13
15
|
function ErrorBoundary() {
|
|
14
16
|
var _this;
|
|
@@ -23,6 +23,8 @@ import { MountPluginHooks } from './mount-plugin-hooks';
|
|
|
23
23
|
var pluginsComponentsWrapper = css({
|
|
24
24
|
display: 'flex'
|
|
25
25
|
});
|
|
26
|
+
// Ignored via go/ees005
|
|
27
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
26
28
|
var PluginSlotLegacy = /*#__PURE__*/function (_React$Component) {
|
|
27
29
|
function PluginSlotLegacy() {
|
|
28
30
|
var _this;
|
|
@@ -41,6 +43,8 @@ var PluginSlotLegacy = /*#__PURE__*/function (_React$Component) {
|
|
|
41
43
|
});
|
|
42
44
|
_defineProperty(_this, "removeModeChangeListener", function (contentArea) {
|
|
43
45
|
if (contentArea && _this.transitionEvent) {
|
|
46
|
+
// Ignored via go/ees005
|
|
47
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
44
48
|
contentArea.removeEventListener(_this.transitionEvent, _this.forceComponentUpdate);
|
|
45
49
|
}
|
|
46
50
|
});
|
|
@@ -50,6 +54,8 @@ var PluginSlotLegacy = /*#__PURE__*/function (_React$Component) {
|
|
|
50
54
|
* Update the plugin components once the transition
|
|
51
55
|
* to full width / default mode completes
|
|
52
56
|
*/
|
|
57
|
+
// Ignored via go/ees005
|
|
58
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
53
59
|
contentArea.addEventListener(_this.transitionEvent, _this.forceComponentUpdate);
|
|
54
60
|
}
|
|
55
61
|
});
|
|
@@ -131,6 +137,8 @@ var PluginSlotLegacy = /*#__PURE__*/function (_React$Component) {
|
|
|
131
137
|
eventDispatcher: eventDispatcher,
|
|
132
138
|
providerFactory: providerFactory,
|
|
133
139
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
140
|
+
// Ignored via go/ees005
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
134
142
|
appearance: appearance,
|
|
135
143
|
popupsMountPoint: popupsMountPoint,
|
|
136
144
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
@@ -182,6 +190,8 @@ var PluginSlot = function PluginSlot(_ref) {
|
|
|
182
190
|
eventDispatcher: eventDispatcher,
|
|
183
191
|
providerFactory: providerFactory,
|
|
184
192
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
193
|
+
// Ignored via go/ees005
|
|
194
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
185
195
|
appearance: appearance,
|
|
186
196
|
popupsMountPoint: popupsMountPoint,
|
|
187
197
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
@@ -17,7 +17,10 @@ export function MountPluginHooks(_ref2) {
|
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
19
19
|
return /*#__PURE__*/React.createElement(React.Fragment, null, pluginHooks === null || pluginHooks === void 0 ? void 0 : pluginHooks.map(function (usePluginHook, key) {
|
|
20
|
-
return /*#__PURE__*/React.createElement(MountPluginHook
|
|
20
|
+
return /*#__PURE__*/React.createElement(MountPluginHook
|
|
21
|
+
// Ignored via go/ees005
|
|
22
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
23
|
+
, {
|
|
21
24
|
key: key,
|
|
22
25
|
usePluginHook: usePluginHook,
|
|
23
26
|
editorView: editorView,
|
|
@@ -22,6 +22,9 @@ var toolbarComponentsWrapper = css(_defineProperty({
|
|
|
22
22
|
}, "@media (max-width: ".concat(akEditorMobileMaxWidth, "px)"), {
|
|
23
23
|
justifyContent: 'space-between'
|
|
24
24
|
}));
|
|
25
|
+
|
|
26
|
+
// Ignored via go/ees005
|
|
27
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
25
28
|
export var ToolbarInner = /*#__PURE__*/function (_React$Component) {
|
|
26
29
|
function ToolbarInner() {
|
|
27
30
|
_classCallCheck(this, ToolbarInner);
|
|
@@ -68,6 +71,8 @@ export var ToolbarInner = /*#__PURE__*/function (_React$Component) {
|
|
|
68
71
|
editorActions: editorActions,
|
|
69
72
|
eventDispatcher: eventDispatcher,
|
|
70
73
|
providerFactory: providerFactory,
|
|
74
|
+
// Ignored via go/ees005
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
71
76
|
appearance: appearance,
|
|
72
77
|
popupsMountPoint: popupsMountPoint,
|
|
73
78
|
popupsBoundariesElement: popupsBoundariesElement,
|