@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 203.7.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 203.7.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#181108](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/181108)
|
|
14
|
+
[`53b2e808822aa`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/53b2e808822aa) -
|
|
15
|
+
ED-26039 Update status lozenge styles with white bortder and greater boxshadow
|
|
16
|
+
|
|
3
17
|
## 203.7.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -3,6 +3,8 @@ import { removeAllowMoreColorsProp } from '../migrates/next-remove-allow-more-te
|
|
|
3
3
|
import { createTransformer } from '../utils';
|
|
4
4
|
|
|
5
5
|
// This stays as require() since changing to import will trigger a linter error
|
|
6
|
+
// Ignored via go/ees005
|
|
7
|
+
// eslint-disable-next-line import/no-commonjs
|
|
6
8
|
const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
|
|
7
9
|
const transformer = createTransformer('@atlaskit/editor-core', [removeAllowMoreColorsProp]);
|
|
8
10
|
describe('remove `allowMoreTextColors` field from `allowTextColor` Editor prop.', () => {
|
|
@@ -4,6 +4,8 @@ import { removeConfigPanelWidthProp } from '../migrates/remove-config-panel-widt
|
|
|
4
4
|
import { createTransformer } from '../utils';
|
|
5
5
|
|
|
6
6
|
// This stays as require() since changing to import will trigger a linter error
|
|
7
|
+
// Ignored via go/ees005
|
|
8
|
+
// eslint-disable-next-line import/no-commonjs
|
|
7
9
|
const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
|
|
8
10
|
|
|
9
11
|
const transformer = createTransformer('@atlaskit/editor-core', [removeConfigPanelWidthProp]);
|
|
@@ -4,6 +4,8 @@ import { renameEditorToMigrationComponent } from '../migrates/rename-editor-to-e
|
|
|
4
4
|
import { createTransformer } from '../utils';
|
|
5
5
|
|
|
6
6
|
// This stays as require() since changing to import will trigger a linter error
|
|
7
|
+
// Ignored via go/ees005
|
|
8
|
+
// eslint-disable-next-line import/no-commonjs
|
|
7
9
|
const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
|
|
8
10
|
|
|
9
11
|
const transformer = createTransformer('@atlaskit/editor-core', [renameEditorToMigrationComponent]);
|
|
@@ -4,6 +4,8 @@ import { renameSmartLinksProp } from '../migrates/rename-smartlinks-prop';
|
|
|
4
4
|
import { createTransformer } from '../utils';
|
|
5
5
|
|
|
6
6
|
// This stays as require() since changing to import will trigger a linter error
|
|
7
|
+
// Ignored via go/ees005
|
|
8
|
+
// eslint-disable-next-line import/no-commonjs
|
|
7
9
|
const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
|
|
8
10
|
|
|
9
11
|
const transformer = createTransformer('@atlaskit/editor-core', [renameSmartLinksProp]);
|
|
@@ -4,6 +4,8 @@ import { renameUnsafeAllowUndoRedoButtonsProp } from '../migrates/rename-unsafe-
|
|
|
4
4
|
import { createTransformer } from '../utils';
|
|
5
5
|
|
|
6
6
|
// This stays as require() since changing to import will trigger a linter error
|
|
7
|
+
// Ignored via go/ees005
|
|
8
|
+
// eslint-disable-next-line import/no-commonjs
|
|
7
9
|
const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
|
|
8
10
|
|
|
9
11
|
const transformer = createTransformer('@atlaskit/editor-core', [
|
|
@@ -4,6 +4,8 @@ import { renameUnsafeCardProp } from '../migrates/rename-unsafe-cards-prop';
|
|
|
4
4
|
import { createTransformer } from '../utils';
|
|
5
5
|
|
|
6
6
|
// This stays as require() since changing to import will trigger a linter error
|
|
7
|
+
// Ignored via go/ees005
|
|
8
|
+
// eslint-disable-next-line import/no-commonjs
|
|
7
9
|
const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
|
|
8
10
|
|
|
9
11
|
const transformer = createTransformer('@atlaskit/editor-core', [renameUnsafeCardProp]);
|
package/codemods/utils.ts
CHANGED
|
@@ -52,6 +52,8 @@ export const findImportFromPackage = (
|
|
|
52
52
|
source: Collection<unknown>,
|
|
53
53
|
pkg: string,
|
|
54
54
|
importName: string,
|
|
55
|
+
// Ignored via go/ees005
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
55
57
|
): string[] => {
|
|
56
58
|
// Find regular or renamed imports
|
|
57
59
|
return (
|
|
@@ -19,8 +19,11 @@ var _excluded = ["Editor"];
|
|
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
21
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
22
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // Ignored via go/ees005
|
|
23
|
+
// eslint-disable-next-line import/no-namespace
|
|
23
24
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
|
+
// Ignored via go/ees005
|
|
26
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
24
27
|
var CollapsedEditor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
25
28
|
function CollapsedEditor() {
|
|
26
29
|
var _this;
|
|
@@ -121,6 +121,8 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
// This method needs to be public for EditorContext component.
|
|
124
|
+
// Ignored via go/ees005
|
|
125
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
124
126
|
}, {
|
|
125
127
|
key: "_privateRegisterEditor",
|
|
126
128
|
value: function _privateRegisterEditor(editorView, eventDispatcher, contentTransformer) {
|
|
@@ -189,6 +191,9 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
|
|
|
189
191
|
if (!this.editorView || !this.editorView.hasFocus()) {
|
|
190
192
|
return false;
|
|
191
193
|
}
|
|
194
|
+
|
|
195
|
+
// Ignored via go/ees005
|
|
196
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
192
197
|
this.editorView.dom.blur();
|
|
193
198
|
return true;
|
|
194
199
|
}
|
|
@@ -242,6 +247,8 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
|
|
|
242
247
|
}
|
|
243
248
|
return _context2.abrupt("return", json);
|
|
244
249
|
case 9:
|
|
250
|
+
// Ignored via go/ees005
|
|
251
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
245
252
|
nodeSanitized = _model.Node.fromJSON(this.editorView.state.schema, json);
|
|
246
253
|
_context2.prev = 10;
|
|
247
254
|
return _context2.abrupt("return", this.contentEncode(nodeSanitized));
|
|
@@ -13,9 +13,13 @@ var _coreEditor = require("./core-editor");
|
|
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
15
|
function ComposableEditor(props) {
|
|
16
|
+
// Ignored via go/ees005
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
16
18
|
var AppearanceComponent = (0, _react.useMemo)(function () {
|
|
17
19
|
return (0, _getUiComponent.default)(props.appearance);
|
|
18
20
|
}, [props.appearance]);
|
|
21
|
+
// Ignored via go/ees005
|
|
22
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
19
23
|
return /*#__PURE__*/_react.default.createElement(_coreEditor.CoreEditor, (0, _extends2.default)({}, props, {
|
|
20
24
|
AppearanceComponent: AppearanceComponent
|
|
21
25
|
}));
|
|
@@ -33,6 +33,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
33
33
|
* @jsxRuntime classic
|
|
34
34
|
* @jsx jsx
|
|
35
35
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
36
|
+
// Ignored via go/ees005
|
|
37
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
36
38
|
/**
|
|
37
39
|
* Editor wrapper that deals with the lifecycle logic of the editor
|
|
38
40
|
*/
|
|
@@ -125,7 +127,10 @@ function CoreEditor(props) {
|
|
|
125
127
|
// @ts-expect-error Type 'string' is not assignable to type '"editorCore" | "renderer"'.
|
|
126
128
|
, {
|
|
127
129
|
data: data
|
|
128
|
-
}, (0, _react2.jsx)(Editor
|
|
130
|
+
}, (0, _react2.jsx)(Editor
|
|
131
|
+
// Ignored via go/ees005
|
|
132
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
133
|
+
, (0, _extends2.default)({}, props, {
|
|
129
134
|
featureFlags: memodEditorFeatureFlags
|
|
130
135
|
})));
|
|
131
136
|
}
|
|
@@ -28,6 +28,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
28
28
|
* @jsxRuntime classic
|
|
29
29
|
* @jsx jsx
|
|
30
30
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
31
|
+
// Ignored via go/ees005
|
|
32
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
31
33
|
var editorContainerStyles = (0, _react2.css)({
|
|
32
34
|
position: 'relative',
|
|
33
35
|
width: '100%',
|
|
@@ -106,7 +108,10 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
|
|
|
106
108
|
baseFontSize: (0, _getBaseFontSize.getBaseFontSize)(props.appearance)
|
|
107
109
|
}, (0, _react2.jsx)(AppearanceComponent, {
|
|
108
110
|
innerRef: editorRef,
|
|
109
|
-
editorAPI: editorAPI
|
|
111
|
+
editorAPI: editorAPI
|
|
112
|
+
// Ignored via go/ees005
|
|
113
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
114
|
+
,
|
|
110
115
|
appearance: props.appearance,
|
|
111
116
|
disabled: props.disabled,
|
|
112
117
|
editorActions: editorActions,
|
|
@@ -161,7 +166,10 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
|
|
|
161
166
|
baseFontSize: (0, _getBaseFontSize.getBaseFontSize)(props.appearance)
|
|
162
167
|
}, (0, _react2.jsx)(AppearanceComponent, {
|
|
163
168
|
innerRef: editorRef,
|
|
164
|
-
editorAPI: editorAPI
|
|
169
|
+
editorAPI: editorAPI
|
|
170
|
+
// Ignored via go/ees005
|
|
171
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
172
|
+
,
|
|
165
173
|
appearance: props.appearance,
|
|
166
174
|
disabled: props.disabled,
|
|
167
175
|
editorActions: editorActions,
|
|
@@ -215,6 +223,9 @@ function ReactEditorViewContextWrapper(props) {
|
|
|
215
223
|
autoformattingProvider: props.editorProps.autoformattingProvider,
|
|
216
224
|
taskDecisionProvider: props.editorProps.taskDecisionProvider
|
|
217
225
|
});
|
|
226
|
+
|
|
227
|
+
// Ignored via go/ees005
|
|
228
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
218
229
|
return (0, _react2.jsx)(_ReactEditorView.default, (0, _extends2.default)({}, props, {
|
|
219
230
|
editorAPI: editorAPI,
|
|
220
231
|
setEditorAPI: setEditorAPI
|
|
@@ -11,7 +11,10 @@ var _prepareExtensionProvider = _interopRequireDefault(require("../../utils/prep
|
|
|
11
11
|
var _prepareQuickInsertProvider = _interopRequireDefault(require("../../utils/prepare-quick-insert-provider"));
|
|
12
12
|
var _getProvidersFromEditorProps = _interopRequireDefault(require("../utils/getProvidersFromEditorProps"));
|
|
13
13
|
var _handleProviders = _interopRequireDefault(require("../utils/handleProviders"));
|
|
14
|
-
function useEditorRef(
|
|
14
|
+
function useEditorRef(
|
|
15
|
+
// Ignored via go/ees005
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
+
preset) {
|
|
15
18
|
var apiRef = (0, _react.useRef)();
|
|
16
19
|
(0, _react.useEffect)(function () {
|
|
17
20
|
return preset === null || preset === void 0 ? void 0 : preset.apiResolver.on(function (api) {
|
|
@@ -20,6 +23,8 @@ function useEditorRef(preset) {
|
|
|
20
23
|
}, [preset === null || preset === void 0 ? void 0 : preset.apiResolver]);
|
|
21
24
|
return apiRef;
|
|
22
25
|
}
|
|
26
|
+
// Ignored via go/ees005
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
23
28
|
function prepareProviders(editorActions, apiRef, quickInsert, extensionProviders, createAnalyticsEvent) {
|
|
24
29
|
var extensionProvider = (0, _prepareExtensionProvider.default)(function () {
|
|
25
30
|
return editorActions;
|
|
@@ -13,6 +13,8 @@ exports.default = handleProviders;
|
|
|
13
13
|
* @param extensionProvider
|
|
14
14
|
* @param quickInsertProvider
|
|
15
15
|
*/
|
|
16
|
+
// Ignored via go/ees005
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
16
18
|
function handleProviders(providerFactory, _ref, extensionProvider, quickInsertProvider) {
|
|
17
19
|
var mentionProvider = _ref.mentionProvider,
|
|
18
20
|
contextIdentifierProvider = _ref.contextIdentifierProvider,
|
|
@@ -23,6 +23,8 @@ var _outdatedBrowsers = require("../utils/outdatedBrowsers");
|
|
|
23
23
|
var _WithEditorView = require("./WithEditorView");
|
|
24
24
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
25
25
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
26
|
+
// Ignored via go/ees005
|
|
27
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
26
28
|
var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
|
|
27
29
|
function ErrorBoundaryWithEditorView(props) {
|
|
28
30
|
var _this;
|
|
@@ -87,6 +87,8 @@ function handleEditorFocus(view) {
|
|
|
87
87
|
view.focus();
|
|
88
88
|
}, 0);
|
|
89
89
|
}
|
|
90
|
+
// Ignored via go/ees005
|
|
91
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
90
92
|
var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
91
93
|
function ReactEditorView(props) {
|
|
92
94
|
var _this$props$editorPro3, _props$setEditorAPI;
|
|
@@ -397,6 +399,8 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
|
|
|
397
399
|
(0, _defineProperty2.default)(_this, "handleEditorViewRef", function (node) {
|
|
398
400
|
if (!_this.view && node) {
|
|
399
401
|
_this.createEditorView(node);
|
|
402
|
+
// Ignored via go/ees005
|
|
403
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
400
404
|
var view = _this.view;
|
|
401
405
|
_this.props.onEditorCreated({
|
|
402
406
|
view: view,
|
|
@@ -530,7 +534,10 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
|
|
|
530
534
|
}
|
|
531
535
|
}, {
|
|
532
536
|
key: "UNSAFE_componentWillReceiveProps",
|
|
533
|
-
value:
|
|
537
|
+
value:
|
|
538
|
+
// Ignored via go/ees005
|
|
539
|
+
// eslint-disable-next-line react/no-unsafe
|
|
540
|
+
function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
534
541
|
var _nextProps$editorProp, _this$props$editorPro4;
|
|
535
542
|
if (this.view && this.props.editorProps.disabled !== nextProps.editorProps.disabled) {
|
|
536
543
|
// Disables the contentEditable attribute of the editor if the editor is disabled
|
|
@@ -12,9 +12,14 @@ var WithEditorView = exports.WithEditorView = function WithEditorView(WrappedCom
|
|
|
12
12
|
var _WithFeatureFlags = function _WithFeatureFlags(props) {
|
|
13
13
|
var _useEditorContext = (0, _EditorContext.useEditorContext)(),
|
|
14
14
|
editorActions = _useEditorContext.editorActions;
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
return (
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
19
|
+
_react.default.createElement(WrappedComponent, (0, _extends2.default)({}, props, {
|
|
20
|
+
editorView: editorActions === null || editorActions === void 0 ? void 0 : editorActions._privateGetEditorView()
|
|
21
|
+
}))
|
|
22
|
+
);
|
|
18
23
|
};
|
|
19
24
|
return _WithFeatureFlags;
|
|
20
25
|
};
|
|
@@ -41,6 +41,8 @@ function processPluginsList(plugins) {
|
|
|
41
41
|
if (!acc[pluginName]) {
|
|
42
42
|
acc[pluginName] = [];
|
|
43
43
|
}
|
|
44
|
+
// Ignored via go/ees005
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
44
46
|
acc[pluginName].push(plugin.pluginsOptions[pluginName]);
|
|
45
47
|
});
|
|
46
48
|
}
|
|
@@ -41,6 +41,8 @@ function createFeatureFlagsFromProps(featureFlags) {
|
|
|
41
41
|
enableViewUpdateSubscription: Boolean(typeof (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.enableViewUpdateSubscription) === 'boolean' ? !!(featureFlags !== null && featureFlags !== void 0 && featureFlags.enableViewUpdateSubscription) : false),
|
|
42
42
|
collabAvatarScroll: Boolean(typeof (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.collabAvatarScroll) === 'boolean' ? !!(featureFlags !== null && featureFlags !== void 0 && featureFlags.collabAvatarScroll) : false),
|
|
43
43
|
twoLineEditorToolbar: Boolean(typeof (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.twoLineEditorToolbar) === 'boolean' ? !!(featureFlags !== null && featureFlags !== void 0 && featureFlags.twoLineEditorToolbar) : false),
|
|
44
|
+
// Ignored via go/ees005
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
44
46
|
disableSpellcheckByBrowser: getSpellCheck(featureFlags)
|
|
45
47
|
});
|
|
46
48
|
}
|
|
@@ -20,6 +20,8 @@ var _Chromeless = _interopRequireDefault(require("../ui/Appearance/Chromeless"))
|
|
|
20
20
|
* @returns Editor component
|
|
21
21
|
*/
|
|
22
22
|
function ChromelessEditor(props) {
|
|
23
|
+
// Ignored via go/ees005
|
|
24
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
23
25
|
return /*#__PURE__*/_react.default.createElement(_coreEditor.CoreEditor, (0, _extends2.default)({}, props, {
|
|
24
26
|
appearance: "chromeless",
|
|
25
27
|
AppearanceComponent: _Chromeless.default
|
|
@@ -20,6 +20,8 @@ var _Comment = require("../ui/Appearance/Comment/Comment");
|
|
|
20
20
|
* @returns Editor component
|
|
21
21
|
*/
|
|
22
22
|
function CommentEditor(props) {
|
|
23
|
+
// Ignored via go/ees005
|
|
24
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
23
25
|
return /*#__PURE__*/_react.default.createElement(_coreEditor.CoreEditor, (0, _extends2.default)({}, props, {
|
|
24
26
|
appearance: "comment",
|
|
25
27
|
AppearanceComponent: _Comment.CommentEditorWithIntl
|
|
@@ -21,7 +21,10 @@ var _FullPage = require("../ui/Appearance/FullPage/FullPage");
|
|
|
21
21
|
*/
|
|
22
22
|
function FullPageEditor(props) {
|
|
23
23
|
var _props$appearance;
|
|
24
|
-
return /*#__PURE__*/_react.default.createElement(_coreEditor.CoreEditor
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_coreEditor.CoreEditor
|
|
25
|
+
// Ignored via go/ees005
|
|
26
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
27
|
+
, (0, _extends2.default)({}, props, {
|
|
25
28
|
appearance: (_props$appearance = props.appearance) !== null && _props$appearance !== void 0 ? _props$appearance : 'full-page',
|
|
26
29
|
AppearanceComponent: _FullPage.FullPageEditor
|
|
27
30
|
}));
|
|
@@ -22,6 +22,8 @@ var _FullPage = require("../ui/Appearance/FullPage/FullPage");
|
|
|
22
22
|
* @deprecated In favour of `FullPageEditor` with appearance "full-width"
|
|
23
23
|
*/
|
|
24
24
|
function FullWidthEditor(props) {
|
|
25
|
+
// Ignored via go/ees005
|
|
26
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
25
27
|
return /*#__PURE__*/_react.default.createElement(_coreEditor.CoreEditor, (0, _extends2.default)({}, props, {
|
|
26
28
|
appearance: "full-width",
|
|
27
29
|
AppearanceComponent: _FullPage.FullPageEditor
|
package/dist/cjs/editor.js
CHANGED
|
@@ -30,6 +30,8 @@ var ComposableEditorWrapper = function ComposableEditorWrapper(_ref) {
|
|
|
30
30
|
props: props,
|
|
31
31
|
initialPluginConfiguration: initialPluginConfiguration
|
|
32
32
|
});
|
|
33
|
+
// Ignored via go/ees005
|
|
34
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
33
35
|
return (0, _react2.jsx)(_composableEditor.ComposableEditor, (0, _extends2.default)({
|
|
34
36
|
preset: preset
|
|
35
37
|
}, props));
|
|
@@ -42,6 +44,8 @@ var ComposableEditorWrapper = function ComposableEditorWrapper(_ref) {
|
|
|
42
44
|
* It allows you to create an editor with a custom set of plugins and configurations.
|
|
43
45
|
* For more information, see the documentation for the `ComposableEditor` component here: https://atlaskit.atlassian.com/packages/editor/editor-core
|
|
44
46
|
*/
|
|
47
|
+
// Ignored via go/ees005
|
|
48
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
45
49
|
var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
46
50
|
function Editor(props) {
|
|
47
51
|
var _this;
|
package/dist/cjs/test-utils.js
CHANGED
|
@@ -26,6 +26,8 @@ function lightProcessPluginsList(editorPlugins) {
|
|
|
26
26
|
if (!acc[pluginName]) {
|
|
27
27
|
acc[pluginName] = [];
|
|
28
28
|
}
|
|
29
|
+
// Ignored via go/ees005
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
29
31
|
acc[pluginName].push(plugin.pluginsOptions[pluginName]);
|
|
30
32
|
});
|
|
31
33
|
}
|
|
@@ -47,6 +47,8 @@ var clickWrapper = function clickWrapper(_ref) {
|
|
|
47
47
|
* This relies on the Scroll Gutter plugin which inserts additional
|
|
48
48
|
* whitespace at the end of the document when it overflows the viewport.
|
|
49
49
|
*/
|
|
50
|
+
// Ignored via go/ees005
|
|
51
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
50
52
|
var ClickAreaMobile = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
51
53
|
function ClickAreaMobile() {
|
|
52
54
|
var _this;
|
|
@@ -19,6 +19,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
19
19
|
* @jsxRuntime classic
|
|
20
20
|
* @jsx jsx
|
|
21
21
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
|
+
// Ignored via go/ees005
|
|
23
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
22
24
|
var DropdownWrapper = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
23
25
|
function DropdownWrapper() {
|
|
24
26
|
var _this;
|
|
@@ -14,6 +14,8 @@ var insideContentArea = function insideContentArea(ref) {
|
|
|
14
14
|
if (ref.classList && ref.classList.contains('ak-editor-content-area')) {
|
|
15
15
|
return true;
|
|
16
16
|
}
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
17
19
|
ref = ref.parentNode;
|
|
18
20
|
}
|
|
19
21
|
return false;
|
|
@@ -47,6 +49,9 @@ var clickAreaClickHandler = exports.clickAreaClickHandler = function clickAreaCl
|
|
|
47
49
|
if (!(event.target instanceof HTMLElement)) {
|
|
48
50
|
return;
|
|
49
51
|
}
|
|
52
|
+
|
|
53
|
+
// Ignored via go/ees005
|
|
54
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
50
55
|
var target = event.target;
|
|
51
56
|
var isTargetContentArea = target === null || target === void 0 ? void 0 : target.classList.contains('ak-editor-content-area');
|
|
52
57
|
var isTargetChildOfContentArea = insideContentArea((target === null || target === void 0 ? void 0 : target.parentNode) instanceof HTMLElement ? target === null || target === void 0 ? void 0 : target.parentNode : null);
|
|
@@ -69,7 +74,10 @@ var clickAreaClickHandler = exports.clickAreaClickHandler = function clickAreaCl
|
|
|
69
74
|
var isTextAreaClicked = (target === null || target === void 0 ? void 0 : target.nodeName) === 'TEXTAREA';
|
|
70
75
|
var isBreadcrumbClicked = !!(0, _utils.closestElement)(target, 'nav[aria-label="Breadcrumbs"]');
|
|
71
76
|
var selection = window.getSelection();
|
|
72
|
-
var isEditorPopupTextSelected = (selection === null || selection === void 0 ? void 0 : selection.type) === 'Range' &&
|
|
77
|
+
var isEditorPopupTextSelected = (selection === null || selection === void 0 ? void 0 : selection.type) === 'Range' &&
|
|
78
|
+
// Ignored via go/ees005
|
|
79
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
80
|
+
(0, _utils.closestElement)(selection === null || selection === void 0 ? void 0 : selection.anchorNode, '[data-editor-popup]');
|
|
73
81
|
|
|
74
82
|
// This is a super workaround to find when events are coming from Confluence InlineComment modal
|
|
75
83
|
// We don't own those components, so we can't change them
|
|
@@ -104,7 +112,10 @@ var outsideProsemirrorEditorClickHandler = function outsideProsemirrorEditorClic
|
|
|
104
112
|
tr.setMeta('outsideProsemirrorEditorClicked', true);
|
|
105
113
|
(0, _commands.addParagraphAtEnd)(tr);
|
|
106
114
|
}
|
|
107
|
-
(0, _selection.setSelectionTopLevelBlocks)(tr, event,
|
|
115
|
+
(0, _selection.setSelectionTopLevelBlocks)(tr, event,
|
|
116
|
+
// Ignored via go/ees005
|
|
117
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
118
|
+
dom, view.posAtCoords.bind(view), isEditorFocused);
|
|
108
119
|
(0, _collab.tintDirtyTransaction)(tr);
|
|
109
120
|
if (!tr.docChanged && !tr.selectionSet) {
|
|
110
121
|
return;
|
|
@@ -51,6 +51,8 @@ _scrollbar.scrollbarStyles, {
|
|
|
51
51
|
});
|
|
52
52
|
var ContentArea = (0, _ContentStyles.createEditorContentStyle)();
|
|
53
53
|
ContentArea.displayName = 'ContentArea';
|
|
54
|
+
// Ignored via go/ees005
|
|
55
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
54
56
|
var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
55
57
|
function Editor() {
|
|
56
58
|
var _this;
|
|
@@ -35,6 +35,9 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
35
35
|
|
|
36
36
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
37
37
|
|
|
38
|
+
// Ignored via go/ees005
|
|
39
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
40
|
+
|
|
38
41
|
var CommentEditorMargin = 14;
|
|
39
42
|
var commentEditorStyles = (0, _react2.css)({
|
|
40
43
|
display: 'flex',
|
|
@@ -185,10 +188,19 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
185
188
|
editorAppearance: appearance,
|
|
186
189
|
useStickyToolbar: useStickyToolbar,
|
|
187
190
|
intl: intl
|
|
188
|
-
}, (0, _react2.jsx)(_ToolbarWithSizeDetector.ToolbarWithSizeDetector
|
|
191
|
+
}, (0, _react2.jsx)(_ToolbarWithSizeDetector.ToolbarWithSizeDetector
|
|
192
|
+
// Ignored via go/ees005
|
|
193
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
194
|
+
, {
|
|
189
195
|
editorView: editorView,
|
|
190
|
-
editorActions: editorActions
|
|
191
|
-
|
|
196
|
+
editorActions: editorActions
|
|
197
|
+
// Ignored via go/ees005
|
|
198
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
199
|
+
,
|
|
200
|
+
eventDispatcher: eventDispatcher
|
|
201
|
+
// Ignored via go/ees005
|
|
202
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
203
|
+
,
|
|
192
204
|
providerFactory: providerFactory,
|
|
193
205
|
appearance: appearance,
|
|
194
206
|
items: primaryToolbarComponents,
|
|
@@ -111,7 +111,10 @@ var MainToolbar = exports.MainToolbar = function MainToolbar(_ref) {
|
|
|
111
111
|
twoLineEditorToolbar = _ref.twoLineEditorToolbar,
|
|
112
112
|
children = _ref.children;
|
|
113
113
|
if (useStickyToolbar) {
|
|
114
|
-
return (0, _react2.jsx)(StickyToolbar
|
|
114
|
+
return (0, _react2.jsx)(StickyToolbar
|
|
115
|
+
// Ignored via go/ees005
|
|
116
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
117
|
+
, (0, _extends2.default)({}, getStickyParameters(useStickyToolbar), {
|
|
115
118
|
twoLineEditorToolbar: twoLineEditorToolbar
|
|
116
119
|
}), children);
|
|
117
120
|
}
|
|
@@ -87,8 +87,14 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
87
87
|
disabled: !!props.disabled,
|
|
88
88
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
89
89
|
editorActions: props.editorActions,
|
|
90
|
-
editorDOMElement: props.editorDOMElement
|
|
91
|
-
|
|
90
|
+
editorDOMElement: props.editorDOMElement
|
|
91
|
+
// Ignored via go/ees005
|
|
92
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
93
|
+
,
|
|
94
|
+
editorView: props.editorView
|
|
95
|
+
// Ignored via go/ees005
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
97
|
+
,
|
|
92
98
|
eventDispatcher: props.eventDispatcher,
|
|
93
99
|
hasMinWidth: props.enableToolbarMinWidth,
|
|
94
100
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
@@ -108,7 +114,10 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
108
114
|
disabled: props.disabled,
|
|
109
115
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
110
116
|
editorActions: props.editorActions,
|
|
111
|
-
editorDOMElement: props.editorDOMElement
|
|
117
|
+
editorDOMElement: props.editorDOMElement
|
|
118
|
+
// Ignored via go/ees005
|
|
119
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
120
|
+
,
|
|
112
121
|
editorView: props.editorView,
|
|
113
122
|
eventDispatcher: props.eventDispatcher,
|
|
114
123
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
@@ -24,6 +24,9 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
24
24
|
|
|
25
25
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
|
|
27
|
+
// Ignored via go/ees005
|
|
28
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
29
|
+
|
|
27
30
|
var CONTENT_AREA_TEST_ID = exports.CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
28
31
|
var EDITOR_CONTAINER = exports.EDITOR_CONTAINER = 'ak-editor-container';
|
|
29
32
|
var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
@@ -76,8 +76,12 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
76
76
|
var updateOnResize = function updateOnResize() {
|
|
77
77
|
setShouldSplitToolbar(window.innerWidth <= _MainToolbar.MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT);
|
|
78
78
|
};
|
|
79
|
+
// Ignored via go/ees005
|
|
80
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
79
81
|
window.addEventListener('resize', updateOnResize);
|
|
80
82
|
updateOnResize();
|
|
83
|
+
// Ignored via go/ees005
|
|
84
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
81
85
|
return function () {
|
|
82
86
|
return window.removeEventListener('resize', updateOnResize);
|
|
83
87
|
};
|
|
@@ -24,6 +24,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsxRuntime classic
|
|
25
25
|
* @jsx jsx
|
|
26
26
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
27
|
+
// Ignored via go/ees005
|
|
28
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
27
29
|
var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
28
30
|
function ChromeCollapsed() {
|
|
29
31
|
var _this;
|
|
@@ -16,6 +16,8 @@ var _ChromeCollapsed = _interopRequireDefault(require("../ChromeCollapsed"));
|
|
|
16
16
|
var _IntlProviderIfMissingWrapper = require("../IntlProviderIfMissingWrapper/IntlProviderIfMissingWrapper");
|
|
17
17
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
18
18
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
+
// Ignored via go/ees005
|
|
20
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
19
21
|
var CollapsedEditor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
20
22
|
function CollapsedEditor() {
|
|
21
23
|
var _this;
|
|
@@ -9,6 +9,17 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
|
-
var
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
+
var _templateObject, _templateObject2, _templateObject3; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
15
|
+
var getVisualRefreshStatusStyles = function getVisualRefreshStatusStyles() {
|
|
16
|
+
return (
|
|
17
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
18
|
+
(0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
19
|
+
(0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t&.", " .", " > span {\n\t\t\t\t\tbox-shadow: ", ";\n\t\t\t\t}\n\t\t\t"])), _editorSharedStyles.akEditorSelectedNodeClassName, _styles.StatusSharedCssClassName.STATUS_LOZENGE, _editorSharedStyles.akEditorSelectedBoldBoxShadow) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
20
|
+
(0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t&.", " .", " > span {\n\t\t\t\t\t", "\n\t\t\t\t}\n\t\t\t"])), _editorSharedStyles.akEditorSelectedNodeClassName, _styles.StatusSharedCssClassName.STATUS_LOZENGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]))
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
13
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
|
|
14
|
-
var statusStyles = exports.statusStyles = (0, _react.css)(
|
|
25
|
+
var statusStyles = exports.statusStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\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"])), _styles.TableSharedCssClassName.TABLE_CELL_WRAPPER, _styles.TableSharedCssClassName.TABLE_HEADER_CELL_WRAPPER, _styles.StatusSharedCssClassName.STATUS_CONTAINER, _styles.StatusSharedCssClassName.STATUS_CONTAINER, (0, _styles.getStatusSharedStyles)(), getVisualRefreshStatusStyles(), _styles.StatusSharedCssClassName.STATUS_LOZENGE, _editorSharedStyles.akEditorDeleteBackgroundWithOpacity, _styles.StatusSharedCssClassName.STATUS_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.StatusSharedCssClassName.STATUS_LOZENGE, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder);
|