@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
|
@@ -36,6 +36,8 @@ isExpanded && minHeight ? `min-height: ${minHeight}px` : '');
|
|
|
36
36
|
* This relies on the Scroll Gutter plugin which inserts additional
|
|
37
37
|
* whitespace at the end of the document when it overflows the viewport.
|
|
38
38
|
*/
|
|
39
|
+
// Ignored via go/ees005
|
|
40
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
39
41
|
export default class ClickAreaMobile extends React.Component {
|
|
40
42
|
constructor(...args) {
|
|
41
43
|
super(...args);
|
|
@@ -8,6 +8,8 @@ import React from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
10
|
import { dropdown } from './styles';
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
11
13
|
export default class DropdownWrapper extends React.Component {
|
|
12
14
|
constructor(...args) {
|
|
13
15
|
super(...args);
|
|
@@ -8,6 +8,8 @@ const 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 @@ const 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
|
const target = event.target;
|
|
45
50
|
const isTargetContentArea = target === null || target === void 0 ? void 0 : target.classList.contains('ak-editor-content-area');
|
|
46
51
|
const 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 @@ const clickAreaClickHandler = (view, event) => {
|
|
|
63
68
|
const isTextAreaClicked = (target === null || target === void 0 ? void 0 : target.nodeName) === 'TEXTAREA';
|
|
64
69
|
const isBreadcrumbClicked = !!closestElement(target, 'nav[aria-label="Breadcrumbs"]');
|
|
65
70
|
const selection = window.getSelection();
|
|
66
|
-
const isEditorPopupTextSelected = (selection === null || selection === void 0 ? void 0 : selection.type) === 'Range' &&
|
|
71
|
+
const 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
|
|
@@ -102,7 +110,10 @@ const outsideProsemirrorEditorClickHandler = (view, event) => {
|
|
|
102
110
|
tr.setMeta('outsideProsemirrorEditorClicked', true);
|
|
103
111
|
addParagraphAtEnd(tr);
|
|
104
112
|
}
|
|
105
|
-
setSelectionTopLevelBlocks(tr, event,
|
|
113
|
+
setSelectionTopLevelBlocks(tr, event,
|
|
114
|
+
// Ignored via go/ees005
|
|
115
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
116
|
+
dom, view.posAtCoords.bind(view), isEditorFocused);
|
|
106
117
|
tintDirtyTransaction(tr);
|
|
107
118
|
if (!tr.docChanged && !tr.selectionSet) {
|
|
108
119
|
return;
|
|
@@ -37,6 +37,8 @@ scrollbarStyles, {
|
|
|
37
37
|
});
|
|
38
38
|
const ContentArea = createEditorContentStyle();
|
|
39
39
|
ContentArea.displayName = 'ContentArea';
|
|
40
|
+
// Ignored via go/ees005
|
|
41
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
40
42
|
export default class Editor extends React.Component {
|
|
41
43
|
constructor(...args) {
|
|
42
44
|
super(...args);
|
|
@@ -17,6 +17,8 @@ import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
|
17
17
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
18
18
|
import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
19
19
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
20
|
+
// Ignored via go/ees005
|
|
21
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
20
22
|
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
21
23
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
22
24
|
import PluginSlot from '../../PluginSlot';
|
|
@@ -170,10 +172,19 @@ export const CommentEditorWithIntl = props => {
|
|
|
170
172
|
editorAppearance: appearance,
|
|
171
173
|
useStickyToolbar: useStickyToolbar,
|
|
172
174
|
intl: intl
|
|
173
|
-
}, jsx(Toolbar
|
|
175
|
+
}, jsx(Toolbar
|
|
176
|
+
// Ignored via go/ees005
|
|
177
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
178
|
+
, {
|
|
174
179
|
editorView: editorView,
|
|
175
|
-
editorActions: editorActions
|
|
176
|
-
|
|
180
|
+
editorActions: editorActions
|
|
181
|
+
// Ignored via go/ees005
|
|
182
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
183
|
+
,
|
|
184
|
+
eventDispatcher: eventDispatcher
|
|
185
|
+
// Ignored via go/ees005
|
|
186
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
187
|
+
,
|
|
177
188
|
providerFactory: providerFactory,
|
|
178
189
|
appearance: appearance,
|
|
179
190
|
items: primaryToolbarComponents,
|
|
@@ -143,7 +143,10 @@ export const MainToolbar = ({
|
|
|
143
143
|
children
|
|
144
144
|
}) => {
|
|
145
145
|
if (useStickyToolbar) {
|
|
146
|
-
return jsx(StickyToolbar
|
|
146
|
+
return jsx(StickyToolbar
|
|
147
|
+
// Ignored via go/ees005
|
|
148
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
149
|
+
, _extends({}, getStickyParameters(useStickyToolbar), {
|
|
147
150
|
twoLineEditorToolbar: twoLineEditorToolbar
|
|
148
151
|
}), children);
|
|
149
152
|
}
|
|
@@ -69,8 +69,14 @@ export const FullPageEditor = props => {
|
|
|
69
69
|
disabled: !!props.disabled,
|
|
70
70
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
71
71
|
editorActions: props.editorActions,
|
|
72
|
-
editorDOMElement: props.editorDOMElement
|
|
73
|
-
|
|
72
|
+
editorDOMElement: props.editorDOMElement
|
|
73
|
+
// Ignored via go/ees005
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
75
|
+
,
|
|
76
|
+
editorView: props.editorView
|
|
77
|
+
// Ignored via go/ees005
|
|
78
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
79
|
+
,
|
|
74
80
|
eventDispatcher: props.eventDispatcher,
|
|
75
81
|
hasMinWidth: props.enableToolbarMinWidth,
|
|
76
82
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
@@ -90,7 +96,10 @@ export const FullPageEditor = props => {
|
|
|
90
96
|
disabled: props.disabled,
|
|
91
97
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
92
98
|
editorActions: props.editorActions,
|
|
93
|
-
editorDOMElement: props.editorDOMElement
|
|
99
|
+
editorDOMElement: props.editorDOMElement
|
|
100
|
+
// Ignored via go/ees005
|
|
101
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
102
|
+
,
|
|
94
103
|
editorView: props.editorView,
|
|
95
104
|
eventDispatcher: props.eventDispatcher,
|
|
96
105
|
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';
|
|
@@ -64,8 +64,12 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
64
64
|
const updateOnResize = () => {
|
|
65
65
|
setShouldSplitToolbar(window.innerWidth <= MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT);
|
|
66
66
|
};
|
|
67
|
+
// Ignored via go/ees005
|
|
68
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
67
69
|
window.addEventListener('resize', updateOnResize);
|
|
68
70
|
updateOnResize();
|
|
71
|
+
// Ignored via go/ees005
|
|
72
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
69
73
|
return () => window.removeEventListener('resize', updateOnResize);
|
|
70
74
|
}
|
|
71
75
|
});
|
|
@@ -3,14 +3,15 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import { PureComponent } from 'react';
|
|
6
|
+
import React, { PureComponent } from 'react';
|
|
8
7
|
|
|
9
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
9
|
import { jsx } from '@emotion/react';
|
|
11
10
|
import { injectIntl } from 'react-intl-next';
|
|
12
11
|
import { messages } from './messages';
|
|
13
12
|
import { inputStyle } from './styles';
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
14
15
|
class ChromeCollapsed extends PureComponent {
|
|
15
16
|
constructor(...args) {
|
|
16
17
|
super(...args);
|
|
@@ -2,6 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import ChromeCollapsed from '../ChromeCollapsed';
|
|
4
4
|
import { IntlProviderIfMissingWrapper } from '../IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper';
|
|
5
|
+
// Ignored via go/ees005
|
|
6
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
5
7
|
export default class CollapsedEditor extends React.Component {
|
|
6
8
|
constructor(...args) {
|
|
7
9
|
super(...args);
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import { StatusSharedCssClassName, TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
4
|
-
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
3
|
+
import { StatusSharedCssClassName, TableSharedCssClassName, getStatusSharedStyles } from '@atlaskit/editor-common/styles';
|
|
4
|
+
import { akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSelectedBoldBoxShadow, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
8
|
+
const getVisualRefreshStatusStyles = () =>
|
|
9
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
10
|
+
fg('platform-component-visual-refresh') ?
|
|
11
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
12
|
+
css`
|
|
13
|
+
&.${akEditorSelectedNodeClassName} .${StatusSharedCssClassName.STATUS_LOZENGE} > span {
|
|
14
|
+
box-shadow: ${akEditorSelectedBoldBoxShadow};
|
|
15
|
+
}
|
|
16
|
+
` :
|
|
17
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
18
|
+
css`
|
|
19
|
+
&.${akEditorSelectedNodeClassName} .${StatusSharedCssClassName.STATUS_LOZENGE} > span {
|
|
20
|
+
${getSelectionStyles([SelectionStyle.BoxShadow])}
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
5
23
|
|
|
6
24
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
7
25
|
export const statusStyles = css`
|
|
@@ -23,9 +41,9 @@ export const statusStyles = css`
|
|
|
23
41
|
line-height: 0; /* Prevent responsive layouts increasing height of container. */
|
|
24
42
|
}
|
|
25
43
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
44
|
+
${getStatusSharedStyles()}
|
|
45
|
+
|
|
46
|
+
${getVisualRefreshStatusStyles()}
|
|
29
47
|
}
|
|
30
48
|
|
|
31
49
|
.danger {
|
|
@@ -41,6 +41,8 @@ export const content = css({
|
|
|
41
41
|
const paddingStyles = css({
|
|
42
42
|
padding: `${"var(--ds-space-200, 16px)"} ${"var(--ds-space-200, 16px)"} 0px`
|
|
43
43
|
});
|
|
44
|
+
// Ignored via go/ees005
|
|
45
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
44
46
|
export class SwappableContentArea extends React.PureComponent {
|
|
45
47
|
constructor(...args) {
|
|
46
48
|
super(...args);
|
|
@@ -149,8 +151,12 @@ export function ContextPanel(props) {
|
|
|
149
151
|
contextPanelState
|
|
150
152
|
} = useSharedPluginState(props.editorAPI, ['contextPanel']);
|
|
151
153
|
const firstContent = contextPanelState && (contextPanelState === null || contextPanelState === void 0 ? void 0 : (_contextPanelState$co = contextPanelState.contents) === null || _contextPanelState$co === void 0 ? void 0 : _contextPanelState$co.find(Boolean));
|
|
152
|
-
return
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
return (
|
|
155
|
+
// Ignored via go/ees005
|
|
156
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
157
|
+
jsx(SwappableContentArea, _extends({}, props, {
|
|
158
|
+
editorAPI: props.editorAPI,
|
|
159
|
+
pluginContent: firstContent
|
|
160
|
+
}))
|
|
161
|
+
);
|
|
156
162
|
}
|
|
@@ -5,14 +5,22 @@ import { EditorContext } from '@atlaskit/editor-common/UNSAFE_do_not_use_editor_
|
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import EditorActions from '../../actions';
|
|
7
7
|
export const useEditorContext = () => React.useContext(EditorContext);
|
|
8
|
+
|
|
9
|
+
// Ignored via go/ees005
|
|
10
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components, react/prefer-stateless-function
|
|
8
11
|
export class LegacyEditorContext extends React.Component {
|
|
9
12
|
constructor(props) {
|
|
10
13
|
super(props);
|
|
11
14
|
}
|
|
12
15
|
render() {
|
|
13
16
|
if (fg('platform_editor_react18_phase2_v2')) {
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
14
19
|
return /*#__PURE__*/React.createElement(LegacyEditorContextNew, this.props, this.props.children);
|
|
15
20
|
}
|
|
21
|
+
|
|
22
|
+
// Ignored via go/ees005
|
|
23
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
16
24
|
return /*#__PURE__*/React.createElement(LegacyEditorContextOld, this.props, this.props.children);
|
|
17
25
|
}
|
|
18
26
|
}
|
|
@@ -26,6 +34,9 @@ function LegacyEditorContextNew({
|
|
|
26
34
|
}
|
|
27
35
|
}, children);
|
|
28
36
|
}
|
|
37
|
+
|
|
38
|
+
// Ignored via go/ees005
|
|
39
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
29
40
|
export default class LegacyEditorContextOld extends React.Component {
|
|
30
41
|
constructor(props) {
|
|
31
42
|
super(props);
|
|
@@ -2,6 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
5
|
+
// Ignored via go/ees005
|
|
6
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
5
7
|
export class ErrorBoundary extends React.Component {
|
|
6
8
|
constructor(...args) {
|
|
7
9
|
super(...args);
|
|
@@ -16,6 +16,8 @@ import { MountPluginHooks } from './mount-plugin-hooks';
|
|
|
16
16
|
const pluginsComponentsWrapper = css({
|
|
17
17
|
display: 'flex'
|
|
18
18
|
});
|
|
19
|
+
// Ignored via go/ees005
|
|
20
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
19
21
|
class PluginSlotLegacy extends React.Component {
|
|
20
22
|
constructor(...args) {
|
|
21
23
|
super(...args);
|
|
@@ -29,6 +31,8 @@ class PluginSlotLegacy extends React.Component {
|
|
|
29
31
|
});
|
|
30
32
|
_defineProperty(this, "removeModeChangeListener", contentArea => {
|
|
31
33
|
if (contentArea && this.transitionEvent) {
|
|
34
|
+
// Ignored via go/ees005
|
|
35
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
32
36
|
contentArea.removeEventListener(this.transitionEvent, this.forceComponentUpdate);
|
|
33
37
|
}
|
|
34
38
|
});
|
|
@@ -38,6 +42,8 @@ class PluginSlotLegacy extends React.Component {
|
|
|
38
42
|
* Update the plugin components once the transition
|
|
39
43
|
* to full width / default mode completes
|
|
40
44
|
*/
|
|
45
|
+
// Ignored via go/ees005
|
|
46
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
41
47
|
contentArea.addEventListener(this.transitionEvent, this.forceComponentUpdate);
|
|
42
48
|
}
|
|
43
49
|
});
|
|
@@ -109,6 +115,8 @@ class PluginSlotLegacy extends React.Component {
|
|
|
109
115
|
eventDispatcher: eventDispatcher,
|
|
110
116
|
providerFactory,
|
|
111
117
|
dispatchAnalyticsEvent,
|
|
118
|
+
// Ignored via go/ees005
|
|
119
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
112
120
|
appearance: appearance,
|
|
113
121
|
popupsMountPoint,
|
|
114
122
|
popupsBoundariesElement,
|
|
@@ -160,6 +168,8 @@ const PluginSlot = ({
|
|
|
160
168
|
eventDispatcher: eventDispatcher,
|
|
161
169
|
providerFactory,
|
|
162
170
|
dispatchAnalyticsEvent,
|
|
171
|
+
// Ignored via go/ees005
|
|
172
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
163
173
|
appearance: appearance,
|
|
164
174
|
popupsMountPoint,
|
|
165
175
|
popupsBoundariesElement,
|
|
@@ -18,7 +18,10 @@ export function MountPluginHooks({
|
|
|
18
18
|
if (!editorView) {
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, pluginHooks === null || pluginHooks === void 0 ? void 0 : pluginHooks.map((usePluginHook, key) => /*#__PURE__*/React.createElement(MountPluginHook
|
|
21
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, pluginHooks === null || pluginHooks === void 0 ? void 0 : pluginHooks.map((usePluginHook, key) => /*#__PURE__*/React.createElement(MountPluginHook
|
|
22
|
+
// Ignored via go/ees005
|
|
23
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
24
|
+
, {
|
|
22
25
|
key: key,
|
|
23
26
|
usePluginHook: usePluginHook,
|
|
24
27
|
editorView: editorView,
|
|
@@ -16,6 +16,9 @@ const toolbarComponentsWrapper = css({
|
|
|
16
16
|
justifyContent: 'space-between'
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
+
|
|
20
|
+
// Ignored via go/ees005
|
|
21
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
19
22
|
export class ToolbarInner extends React.Component {
|
|
20
23
|
shouldComponentUpdate(nextProps) {
|
|
21
24
|
return !isEqual(nextProps, this.props);
|
|
@@ -54,6 +57,8 @@ export class ToolbarInner extends React.Component {
|
|
|
54
57
|
editorActions: editorActions,
|
|
55
58
|
eventDispatcher,
|
|
56
59
|
providerFactory,
|
|
60
|
+
// Ignored via go/ees005
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
57
62
|
appearance: appearance,
|
|
58
63
|
popupsMountPoint,
|
|
59
64
|
popupsBoundariesElement,
|
|
@@ -33,7 +33,10 @@ export const ToolbarWithSizeDetector = props => {
|
|
|
33
33
|
skip: typeof width !== 'undefined'
|
|
34
34
|
});
|
|
35
35
|
const defaultToolbarSize = isSSR() && isFullPage(props.appearance) ? ToolbarSize.XXL : undefined;
|
|
36
|
-
const toolbarSize = typeof width === 'undefined' && typeof elementWidth === 'undefined' ? defaultToolbarSize :
|
|
36
|
+
const toolbarSize = typeof width === 'undefined' && typeof elementWidth === 'undefined' ? defaultToolbarSize :
|
|
37
|
+
// Ignored via go/ees005
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
39
|
+
widthToToolbarSize(width || elementWidth, props.appearance);
|
|
37
40
|
const toolbarStyle = useMemo(() => {
|
|
38
41
|
const toolbarWidth = isFullPage(props.appearance) && props.twoLineEditorToolbar ? ToolbarSize.S : ToolbarSize.M;
|
|
39
42
|
const toolbarMinWidth = toolbarSizeToWidth(toolbarWidth, props.appearance);
|
|
@@ -46,7 +49,10 @@ export const ToolbarWithSizeDetector = props => {
|
|
|
46
49
|
css: toolbarStyle
|
|
47
50
|
}, jsx(WidthObserver, {
|
|
48
51
|
setWidth: setWidth
|
|
49
|
-
}), props.editorView && toolbarSize ?
|
|
52
|
+
}), props.editorView && toolbarSize ?
|
|
53
|
+
// Ignored via go/ees005
|
|
54
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
55
|
+
jsx(Toolbar, _extends({}, props, {
|
|
50
56
|
toolbarSize: toolbarSize
|
|
51
57
|
})) : jsx("div", {
|
|
52
58
|
ref: ref
|
|
@@ -3,14 +3,20 @@ import React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { EditorContext } from '@atlaskit/editor-common/UNSAFE_do_not_use_editor_context';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
+
// Ignored via go/ees005
|
|
7
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components, react/prefer-stateless-function
|
|
6
8
|
export default class WithEditorActions extends React.Component {
|
|
7
9
|
constructor(props) {
|
|
8
10
|
super(props);
|
|
9
11
|
}
|
|
10
12
|
render() {
|
|
11
13
|
if (fg('platform_editor_react18_phase2_v2')) {
|
|
14
|
+
// Ignored via go/ees005
|
|
15
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
12
16
|
return /*#__PURE__*/React.createElement(WithEditorActionsNew, this.props);
|
|
13
17
|
}
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
14
20
|
return /*#__PURE__*/React.createElement(WithEditorActionsOld, this.props);
|
|
15
21
|
}
|
|
16
22
|
}
|
|
@@ -24,6 +30,9 @@ function WithEditorActionsNew(props) {
|
|
|
24
30
|
editorActions: context === null || context === void 0 ? void 0 : context.editorActions
|
|
25
31
|
});
|
|
26
32
|
}
|
|
33
|
+
|
|
34
|
+
// Ignored via go/ees005
|
|
35
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
27
36
|
class WithEditorActionsInner extends React.Component {
|
|
28
37
|
componentDidMount() {
|
|
29
38
|
this.props.editorActions._privateSubscribe(() => this.forceUpdate());
|
|
@@ -35,6 +44,9 @@ class WithEditorActionsInner extends React.Component {
|
|
|
35
44
|
return this.props.render(this.props.editorActions);
|
|
36
45
|
}
|
|
37
46
|
}
|
|
47
|
+
|
|
48
|
+
// Ignored via go/ees005
|
|
49
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
38
50
|
class WithEditorActionsOld extends React.Component {
|
|
39
51
|
constructor(...args) {
|
|
40
52
|
super(...args);
|
|
@@ -39,6 +39,8 @@ const flashWrapperAnimated = css({
|
|
|
39
39
|
animation: `0.25s ease-in-out ${pulseBackground}`
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
+
// Ignored via go/ees005
|
|
43
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
42
44
|
export default class WithFlash extends React.Component {
|
|
43
45
|
constructor(...args) {
|
|
44
46
|
super(...args);
|
|
@@ -5,10 +5,14 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
5
5
|
import { createDispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
6
6
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils/analytics';
|
|
7
7
|
import { deprecatedOpenHelpCommand } from '@atlaskit/editor-plugins/help-dialog';
|
|
8
|
+
// Ignored via go/ees005
|
|
9
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
8
10
|
export default class WithHelpTrigger extends React.Component {
|
|
9
11
|
constructor(...args) {
|
|
10
12
|
super(...args);
|
|
11
13
|
_defineProperty(this, "openHelp", () => {
|
|
14
|
+
// Ignored via go/ees005
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
12
16
|
const {
|
|
13
17
|
editorActions
|
|
14
18
|
} = this.context;
|
|
@@ -25,6 +25,9 @@ function sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent, source) {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
// Ignored via go/ees005
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
28
31
|
export async function extensionProviderToQuickInsertProvider(extensionProvider, editorActions, apiRef, createAnalyticsEvent) {
|
|
29
32
|
const extensions = await extensionProvider.getExtensions();
|
|
30
33
|
return {
|
|
@@ -82,6 +85,9 @@ export async function extensionProviderToQuickInsertProvider(extensionProvider,
|
|
|
82
85
|
}
|
|
83
86
|
};
|
|
84
87
|
}
|
|
88
|
+
|
|
89
|
+
// Ignored via go/ees005
|
|
90
|
+
// eslint-disable-next-line require-await
|
|
85
91
|
export async function combineQuickInsertProviders(quickInsertProviders) {
|
|
86
92
|
const {
|
|
87
93
|
invokeList
|
|
@@ -7,6 +7,8 @@ export const findChangedNodesFromTransaction = tr => {
|
|
|
7
7
|
const nodes = [];
|
|
8
8
|
const steps = tr.steps || [];
|
|
9
9
|
steps.forEach(step => {
|
|
10
|
+
// Ignored via go/ees005
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
10
12
|
step.getMap().forEach((oldStart, oldEnd, newStart, newEnd) => {
|
|
11
13
|
tr.doc.nodesBetween(newStart, Math.min(newEnd, tr.doc.content.size), node => {
|
|
12
14
|
if (!nodes.find(n => n === node)) {
|
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
export const isOutdatedBrowser = userAgent => {
|
|
2
2
|
// Take browsers in both Desktop and Mobile (includes Chrome, Firefox, Edge and Safari) within last 2 years
|
|
3
|
+
// Ignored via go/ees005
|
|
4
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
5
|
+
// Ignored via go/ees005
|
|
6
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
3
7
|
const chrome = /Chrome\//.test(userAgent) && !/OPR\//.test(userAgent);
|
|
8
|
+
// Ignored via go/ees005
|
|
9
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
4
10
|
const chromeVersion = chrome ? parseInt((userAgent.match(/Chrome\/(\d+)/) || [])[1], 10) : 0;
|
|
5
11
|
if (chromeVersion >= 84) {
|
|
6
12
|
return false;
|
|
7
13
|
}
|
|
14
|
+
|
|
15
|
+
// Ignored via go/ees005
|
|
16
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
8
17
|
const gecko = /gecko\/\d/i.test(userAgent);
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
9
20
|
const geckoVersion = gecko ? parseInt((userAgent.match(/Firefox\/(\d+)/) || [])[1], 10) : 0;
|
|
10
21
|
if (geckoVersion >= 84) {
|
|
11
22
|
return false;
|
|
12
23
|
}
|
|
24
|
+
|
|
25
|
+
// Ignored via go/ees005
|
|
26
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
13
27
|
const edge = /Edge\/(\d+)/.exec(userAgent);
|
|
14
28
|
const edgeVersion = edge ? +edge[1] : 0;
|
|
15
29
|
if (edgeVersion >= 84) {
|
|
16
30
|
return false;
|
|
17
31
|
}
|
|
32
|
+
|
|
33
|
+
// Ignored via go/ees005
|
|
34
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
18
35
|
const safari = !chrome && !gecko && /Version\/([0-9\._]+).*Safari/.test(userAgent);
|
|
19
|
-
const safariVersion = safari ?
|
|
36
|
+
const safariVersion = safari ?
|
|
37
|
+
// Ignored via go/ees005
|
|
38
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
39
|
+
parseInt((userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10) : 0;
|
|
20
40
|
if (safariVersion >= 12) {
|
|
21
41
|
return false;
|
|
22
42
|
}
|
|
@@ -10,6 +10,8 @@ import { combineQuickInsertProviders, extensionProviderToQuickInsertProvider } f
|
|
|
10
10
|
* @param createAnalyticsEvent
|
|
11
11
|
* @returns Quick insert provider if available
|
|
12
12
|
*/
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
13
15
|
export default function prepareQuickInsertProvider(editorActions, apiRef, extensionProvider, quickInsert, createAnalyticsEvent) {
|
|
14
16
|
const quickInsertProvider = quickInsert && typeof quickInsert !== 'boolean' && quickInsert.provider;
|
|
15
17
|
const extensionQuickInsertProvider = extensionProvider && extensionProviderToQuickInsertProvider(extensionProvider, editorActions, apiRef, createAnalyticsEvent);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "203.7.
|
|
2
|
+
export const version = "203.7.4";
|
|
@@ -9,9 +9,15 @@ var _excluded = ["Editor"];
|
|
|
9
9
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
|
+
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line import/no-namespace
|
|
15
|
+
|
|
12
16
|
import ChromeCollapsed from '../ui/ChromeCollapsed';
|
|
13
17
|
|
|
14
18
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
|
+
// Ignored via go/ees005
|
|
20
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
15
21
|
var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
|
|
16
22
|
function CollapsedEditor() {
|
|
17
23
|
var _this;
|
|
@@ -115,6 +115,8 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
// This method needs to be public for EditorContext component.
|
|
118
|
+
// Ignored via go/ees005
|
|
119
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
118
120
|
}, {
|
|
119
121
|
key: "_privateRegisterEditor",
|
|
120
122
|
value: function _privateRegisterEditor(editorView, eventDispatcher, contentTransformer) {
|
|
@@ -183,6 +185,9 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
183
185
|
if (!this.editorView || !this.editorView.hasFocus()) {
|
|
184
186
|
return false;
|
|
185
187
|
}
|
|
188
|
+
|
|
189
|
+
// Ignored via go/ees005
|
|
190
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
186
191
|
this.editorView.dom.blur();
|
|
187
192
|
return true;
|
|
188
193
|
}
|
|
@@ -236,6 +241,8 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
236
241
|
}
|
|
237
242
|
return _context2.abrupt("return", json);
|
|
238
243
|
case 9:
|
|
244
|
+
// Ignored via go/ees005
|
|
245
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
239
246
|
nodeSanitized = Node.fromJSON(this.editorView.state.schema, json);
|
|
240
247
|
_context2.prev = 10;
|
|
241
248
|
return _context2.abrupt("return", this.contentEncode(nodeSanitized));
|
|
@@ -3,9 +3,13 @@ import React, { useMemo } from 'react';
|
|
|
3
3
|
import getUiComponent from '../create-editor/get-ui-component';
|
|
4
4
|
import { CoreEditor } from './core-editor';
|
|
5
5
|
export function ComposableEditor(props) {
|
|
6
|
+
// Ignored via go/ees005
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
6
8
|
var AppearanceComponent = useMemo(function () {
|
|
7
9
|
return getUiComponent(props.appearance);
|
|
8
10
|
}, [props.appearance]);
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
9
13
|
return /*#__PURE__*/React.createElement(CoreEditor, _extends({}, props, {
|
|
10
14
|
AppearanceComponent: AppearanceComponent
|
|
11
15
|
}));
|