@atlaskit/editor-core 215.0.0 → 215.0.2
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 +17 -0
- package/dist/cjs/create-editor/ReactEditorView.js +53 -57
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +2 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +36 -40
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +3 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +53 -57
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +3 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +5 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 215.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f6863b5290fe8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f6863b5290fe8) -
|
|
8
|
+
[REMOVE FF] editor_a11y_aria_announcement_for_copied_status
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 215.0.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`8d49afb504f95`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8d49afb504f95) -
|
|
16
|
+
Cleanup cc_editor_abort_ufo_load_on_editor_scroll
|
|
17
|
+
- [`8cfc5fed7dc74`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8cfc5fed7dc74) -
|
|
18
|
+
Cleanup annotations_defensive_node_name_calculations
|
|
19
|
+
|
|
3
20
|
## 215.0.0
|
|
4
21
|
|
|
5
22
|
### Major Changes
|
|
@@ -503,71 +503,67 @@ function ReactEditorView(props) {
|
|
|
503
503
|
var possibleListeners = _react.default.useRef([]);
|
|
504
504
|
_react.default.useEffect(function () {
|
|
505
505
|
return function () {
|
|
506
|
-
if (
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
(_scrollElement$curren = scrollElement.current) === null || _scrollElement$curren === void 0 || _scrollElement$curren.removeEventListener.apply(_scrollElement$curren, (0, _toConsumableArray2.default)(possibleListener));
|
|
517
|
-
}
|
|
518
|
-
} catch (err) {
|
|
519
|
-
_iterator.e(err);
|
|
520
|
-
} finally {
|
|
521
|
-
_iterator.f();
|
|
506
|
+
if (scrollElement.current) {
|
|
507
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
508
|
+
var _iterator = _createForOfIteratorHelper(possibleListeners.current),
|
|
509
|
+
_step;
|
|
510
|
+
try {
|
|
511
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
512
|
+
var _scrollElement$curren;
|
|
513
|
+
var possibleListener = _step.value;
|
|
514
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
515
|
+
(_scrollElement$curren = scrollElement.current) === null || _scrollElement$curren === void 0 || _scrollElement$curren.removeEventListener.apply(_scrollElement$curren, (0, _toConsumableArray2.default)(possibleListener));
|
|
522
516
|
}
|
|
517
|
+
} catch (err) {
|
|
518
|
+
_iterator.e(err);
|
|
519
|
+
} finally {
|
|
520
|
+
_iterator.f();
|
|
523
521
|
}
|
|
524
|
-
scrollElement.current = null;
|
|
525
522
|
}
|
|
523
|
+
scrollElement.current = null;
|
|
526
524
|
};
|
|
527
525
|
}, []);
|
|
528
526
|
var handleEditorViewRef = (0, _react.useCallback)(function (node) {
|
|
529
|
-
if (
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
(_scrollElement$curren2 = scrollElement.current) === null || _scrollElement$curren2 === void 0 || _scrollElement$curren2.removeEventListener.apply(_scrollElement$curren2, (0, _toConsumableArray2.default)(possibleListener));
|
|
542
|
-
}
|
|
543
|
-
} catch (err) {
|
|
544
|
-
_iterator2.e(err);
|
|
545
|
-
} finally {
|
|
546
|
-
_iterator2.f();
|
|
527
|
+
if (node) {
|
|
528
|
+
scrollElement.current = document.querySelector('[data-editor-scroll-container]');
|
|
529
|
+
var cleanupListeners = function cleanupListeners() {
|
|
530
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
531
|
+
var _iterator2 = _createForOfIteratorHelper(possibleListeners.current),
|
|
532
|
+
_step2;
|
|
533
|
+
try {
|
|
534
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
535
|
+
var _scrollElement$curren2;
|
|
536
|
+
var possibleListener = _step2.value;
|
|
537
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
538
|
+
(_scrollElement$curren2 = scrollElement.current) === null || _scrollElement$curren2 === void 0 || _scrollElement$curren2.removeEventListener.apply(_scrollElement$curren2, (0, _toConsumableArray2.default)(possibleListener));
|
|
547
539
|
}
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
|
|
553
|
-
(0, _interactionMetrics.abortAll)('new_interaction', "wheel-on-editor-element");
|
|
554
|
-
}
|
|
555
|
-
cleanupListeners();
|
|
556
|
-
};
|
|
557
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
558
|
-
scrollElement.current.addEventListener('wheel', wheelAbortHandler);
|
|
559
|
-
possibleListeners.current.push(['wheel', wheelAbortHandler]);
|
|
560
|
-
var scrollAbortHandler = function scrollAbortHandler() {
|
|
561
|
-
var activeInteraction = (0, _interactionMetrics.getActiveInteraction)();
|
|
562
|
-
if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
|
|
563
|
-
(0, _interactionMetrics.abortAll)('new_interaction', "scroll-on-editor-element");
|
|
564
|
-
}
|
|
565
|
-
cleanupListeners();
|
|
566
|
-
};
|
|
567
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
568
|
-
scrollElement.current.addEventListener('scroll', scrollAbortHandler);
|
|
569
|
-
possibleListeners.current.push(['scroll', scrollAbortHandler]);
|
|
540
|
+
} catch (err) {
|
|
541
|
+
_iterator2.e(err);
|
|
542
|
+
} finally {
|
|
543
|
+
_iterator2.f();
|
|
570
544
|
}
|
|
545
|
+
};
|
|
546
|
+
if (scrollElement.current) {
|
|
547
|
+
var wheelAbortHandler = function wheelAbortHandler() {
|
|
548
|
+
var activeInteraction = (0, _interactionMetrics.getActiveInteraction)();
|
|
549
|
+
if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
|
|
550
|
+
(0, _interactionMetrics.abortAll)('new_interaction', "wheel-on-editor-element");
|
|
551
|
+
}
|
|
552
|
+
cleanupListeners();
|
|
553
|
+
};
|
|
554
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
555
|
+
scrollElement.current.addEventListener('wheel', wheelAbortHandler);
|
|
556
|
+
possibleListeners.current.push(['wheel', wheelAbortHandler]);
|
|
557
|
+
var scrollAbortHandler = function scrollAbortHandler() {
|
|
558
|
+
var activeInteraction = (0, _interactionMetrics.getActiveInteraction)();
|
|
559
|
+
if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
|
|
560
|
+
(0, _interactionMetrics.abortAll)('new_interaction', "scroll-on-editor-element");
|
|
561
|
+
}
|
|
562
|
+
cleanupListeners();
|
|
563
|
+
};
|
|
564
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
565
|
+
scrollElement.current.addEventListener('scroll', scrollAbortHandler);
|
|
566
|
+
possibleListeners.current.push(['scroll', scrollAbortHandler]);
|
|
571
567
|
}
|
|
572
568
|
}
|
|
573
569
|
if (!viewRef.current && node) {
|
|
@@ -13,6 +13,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
13
13
|
var _contextPanel = require("@atlaskit/editor-common/context-panel");
|
|
14
14
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
15
15
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
18
|
var _toolbar2 = require("../../../utils/toolbar");
|
|
18
19
|
var _Toolbar = require("../../Toolbar/Toolbar");
|
|
@@ -114,7 +115,7 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
|
|
|
114
115
|
}, !!customPrimaryToolbarComponents && 'before' in customPrimaryToolbarComponents && /*#__PURE__*/_react.default.createElement("div", {
|
|
115
116
|
"data-testid": 'before-primary-toolbar-components-plugin',
|
|
116
117
|
className: (0, _runtime.ax)([styles.beforePrimaryToolbarComponents])
|
|
117
|
-
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents))) : toolbarDockingPosition !== 'none' && components && (0, _toolbar2.isToolbar)(toolbar) && (!(0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
|
|
118
|
+
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents)), (0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_patch_7') && /*#__PURE__*/_react.default.createElement(_ToolbarPortal.ToolbarPortalMountPoint, null)) : toolbarDockingPosition !== 'none' && components && (0, _toolbar2.isToolbar)(toolbar) && (!(0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
|
|
118
119
|
toolbar: toolbar,
|
|
119
120
|
components: components,
|
|
120
121
|
editorView: editorView,
|
|
@@ -470,53 +470,49 @@ export function ReactEditorView(props) {
|
|
|
470
470
|
const possibleListeners = React.useRef([]);
|
|
471
471
|
React.useEffect(() => {
|
|
472
472
|
return () => {
|
|
473
|
-
if (
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
(_scrollElement$curren = scrollElement.current) === null || _scrollElement$curren === void 0 ? void 0 : _scrollElement$curren.removeEventListener(...possibleListener);
|
|
480
|
-
}
|
|
473
|
+
if (scrollElement.current) {
|
|
474
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
475
|
+
for (const possibleListener of possibleListeners.current) {
|
|
476
|
+
var _scrollElement$curren;
|
|
477
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
478
|
+
(_scrollElement$curren = scrollElement.current) === null || _scrollElement$curren === void 0 ? void 0 : _scrollElement$curren.removeEventListener(...possibleListener);
|
|
481
479
|
}
|
|
482
|
-
scrollElement.current = null;
|
|
483
480
|
}
|
|
481
|
+
scrollElement.current = null;
|
|
484
482
|
};
|
|
485
483
|
}, []);
|
|
486
484
|
const handleEditorViewRef = useCallback(node => {
|
|
487
|
-
if (
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
var _scrollElement$curren2;
|
|
494
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
495
|
-
(_scrollElement$curren2 = scrollElement.current) === null || _scrollElement$curren2 === void 0 ? void 0 : _scrollElement$curren2.removeEventListener(...possibleListener);
|
|
496
|
-
}
|
|
497
|
-
};
|
|
498
|
-
if (scrollElement.current) {
|
|
499
|
-
const wheelAbortHandler = () => {
|
|
500
|
-
const activeInteraction = getActiveInteraction();
|
|
501
|
-
if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
|
|
502
|
-
abortAll('new_interaction', `wheel-on-editor-element`);
|
|
503
|
-
}
|
|
504
|
-
cleanupListeners();
|
|
505
|
-
};
|
|
485
|
+
if (node) {
|
|
486
|
+
scrollElement.current = document.querySelector('[data-editor-scroll-container]');
|
|
487
|
+
const cleanupListeners = () => {
|
|
488
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
489
|
+
for (const possibleListener of possibleListeners.current) {
|
|
490
|
+
var _scrollElement$curren2;
|
|
506
491
|
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
507
|
-
scrollElement.current.
|
|
508
|
-
possibleListeners.current.push(['wheel', wheelAbortHandler]);
|
|
509
|
-
const scrollAbortHandler = () => {
|
|
510
|
-
const activeInteraction = getActiveInteraction();
|
|
511
|
-
if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
|
|
512
|
-
abortAll('new_interaction', `scroll-on-editor-element`);
|
|
513
|
-
}
|
|
514
|
-
cleanupListeners();
|
|
515
|
-
};
|
|
516
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
517
|
-
scrollElement.current.addEventListener('scroll', scrollAbortHandler);
|
|
518
|
-
possibleListeners.current.push(['scroll', scrollAbortHandler]);
|
|
492
|
+
(_scrollElement$curren2 = scrollElement.current) === null || _scrollElement$curren2 === void 0 ? void 0 : _scrollElement$curren2.removeEventListener(...possibleListener);
|
|
519
493
|
}
|
|
494
|
+
};
|
|
495
|
+
if (scrollElement.current) {
|
|
496
|
+
const wheelAbortHandler = () => {
|
|
497
|
+
const activeInteraction = getActiveInteraction();
|
|
498
|
+
if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
|
|
499
|
+
abortAll('new_interaction', `wheel-on-editor-element`);
|
|
500
|
+
}
|
|
501
|
+
cleanupListeners();
|
|
502
|
+
};
|
|
503
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
504
|
+
scrollElement.current.addEventListener('wheel', wheelAbortHandler);
|
|
505
|
+
possibleListeners.current.push(['wheel', wheelAbortHandler]);
|
|
506
|
+
const scrollAbortHandler = () => {
|
|
507
|
+
const activeInteraction = getActiveInteraction();
|
|
508
|
+
if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
|
|
509
|
+
abortAll('new_interaction', `scroll-on-editor-element`);
|
|
510
|
+
}
|
|
511
|
+
cleanupListeners();
|
|
512
|
+
};
|
|
513
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
514
|
+
scrollElement.current.addEventListener('scroll', scrollAbortHandler);
|
|
515
|
+
possibleListeners.current.push(['scroll', scrollAbortHandler]);
|
|
520
516
|
}
|
|
521
517
|
}
|
|
522
518
|
if (!viewRef.current && node) {
|
|
@@ -6,10 +6,11 @@ import { useIntl } from 'react-intl-next';
|
|
|
6
6
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/context-panel';
|
|
7
7
|
import { TOOLBARS } from '@atlaskit/editor-common/toolbar';
|
|
8
8
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
11
|
import { isToolbar } from '../../../utils/toolbar';
|
|
11
12
|
import { ToolbarNext } from '../../Toolbar/Toolbar';
|
|
12
|
-
import { useToolbarPortal } from '../../Toolbar/ToolbarPortal';
|
|
13
|
+
import { ToolbarPortalMountPoint, useToolbarPortal } from '../../Toolbar/ToolbarPortal';
|
|
13
14
|
const styles = {
|
|
14
15
|
mainToolbarIconBefore: "_19pkpxbi _2hwxpxbi _otyrpxbi",
|
|
15
16
|
mainToolbarIconBeforeNew: "_4cvr1h6o _1e0c1txw",
|
|
@@ -109,7 +110,7 @@ export const FullPageToolbarNext = ({
|
|
|
109
110
|
}, !!customPrimaryToolbarComponents && 'before' in customPrimaryToolbarComponents && /*#__PURE__*/React.createElement("div", {
|
|
110
111
|
"data-testid": 'before-primary-toolbar-components-plugin',
|
|
111
112
|
className: ax([styles.beforePrimaryToolbarComponents])
|
|
112
|
-
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents))) : toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && (!expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
113
|
+
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents)), fg('platform_editor_toolbar_aifc_patch_7') && /*#__PURE__*/React.createElement(ToolbarPortalMountPoint, null)) : toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && (!expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
113
114
|
toolbar: toolbar,
|
|
114
115
|
components: components,
|
|
115
116
|
editorView: editorView,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "
|
|
2
|
+
export const version = "215.0.1";
|
|
@@ -493,71 +493,67 @@ export function ReactEditorView(props) {
|
|
|
493
493
|
var possibleListeners = React.useRef([]);
|
|
494
494
|
React.useEffect(function () {
|
|
495
495
|
return function () {
|
|
496
|
-
if (
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
(_scrollElement$curren = scrollElement.current) === null || _scrollElement$curren === void 0 || _scrollElement$curren.removeEventListener.apply(_scrollElement$curren, _toConsumableArray(possibleListener));
|
|
507
|
-
}
|
|
508
|
-
} catch (err) {
|
|
509
|
-
_iterator.e(err);
|
|
510
|
-
} finally {
|
|
511
|
-
_iterator.f();
|
|
496
|
+
if (scrollElement.current) {
|
|
497
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
498
|
+
var _iterator = _createForOfIteratorHelper(possibleListeners.current),
|
|
499
|
+
_step;
|
|
500
|
+
try {
|
|
501
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
502
|
+
var _scrollElement$curren;
|
|
503
|
+
var possibleListener = _step.value;
|
|
504
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
505
|
+
(_scrollElement$curren = scrollElement.current) === null || _scrollElement$curren === void 0 || _scrollElement$curren.removeEventListener.apply(_scrollElement$curren, _toConsumableArray(possibleListener));
|
|
512
506
|
}
|
|
507
|
+
} catch (err) {
|
|
508
|
+
_iterator.e(err);
|
|
509
|
+
} finally {
|
|
510
|
+
_iterator.f();
|
|
513
511
|
}
|
|
514
|
-
scrollElement.current = null;
|
|
515
512
|
}
|
|
513
|
+
scrollElement.current = null;
|
|
516
514
|
};
|
|
517
515
|
}, []);
|
|
518
516
|
var handleEditorViewRef = useCallback(function (node) {
|
|
519
|
-
if (
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
(_scrollElement$curren2 = scrollElement.current) === null || _scrollElement$curren2 === void 0 || _scrollElement$curren2.removeEventListener.apply(_scrollElement$curren2, _toConsumableArray(possibleListener));
|
|
532
|
-
}
|
|
533
|
-
} catch (err) {
|
|
534
|
-
_iterator2.e(err);
|
|
535
|
-
} finally {
|
|
536
|
-
_iterator2.f();
|
|
517
|
+
if (node) {
|
|
518
|
+
scrollElement.current = document.querySelector('[data-editor-scroll-container]');
|
|
519
|
+
var cleanupListeners = function cleanupListeners() {
|
|
520
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
521
|
+
var _iterator2 = _createForOfIteratorHelper(possibleListeners.current),
|
|
522
|
+
_step2;
|
|
523
|
+
try {
|
|
524
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
525
|
+
var _scrollElement$curren2;
|
|
526
|
+
var possibleListener = _step2.value;
|
|
527
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
528
|
+
(_scrollElement$curren2 = scrollElement.current) === null || _scrollElement$curren2 === void 0 || _scrollElement$curren2.removeEventListener.apply(_scrollElement$curren2, _toConsumableArray(possibleListener));
|
|
537
529
|
}
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
|
|
543
|
-
abortAll('new_interaction', "wheel-on-editor-element");
|
|
544
|
-
}
|
|
545
|
-
cleanupListeners();
|
|
546
|
-
};
|
|
547
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
548
|
-
scrollElement.current.addEventListener('wheel', wheelAbortHandler);
|
|
549
|
-
possibleListeners.current.push(['wheel', wheelAbortHandler]);
|
|
550
|
-
var scrollAbortHandler = function scrollAbortHandler() {
|
|
551
|
-
var activeInteraction = getActiveInteraction();
|
|
552
|
-
if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
|
|
553
|
-
abortAll('new_interaction', "scroll-on-editor-element");
|
|
554
|
-
}
|
|
555
|
-
cleanupListeners();
|
|
556
|
-
};
|
|
557
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
558
|
-
scrollElement.current.addEventListener('scroll', scrollAbortHandler);
|
|
559
|
-
possibleListeners.current.push(['scroll', scrollAbortHandler]);
|
|
530
|
+
} catch (err) {
|
|
531
|
+
_iterator2.e(err);
|
|
532
|
+
} finally {
|
|
533
|
+
_iterator2.f();
|
|
560
534
|
}
|
|
535
|
+
};
|
|
536
|
+
if (scrollElement.current) {
|
|
537
|
+
var wheelAbortHandler = function wheelAbortHandler() {
|
|
538
|
+
var activeInteraction = getActiveInteraction();
|
|
539
|
+
if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
|
|
540
|
+
abortAll('new_interaction', "wheel-on-editor-element");
|
|
541
|
+
}
|
|
542
|
+
cleanupListeners();
|
|
543
|
+
};
|
|
544
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
545
|
+
scrollElement.current.addEventListener('wheel', wheelAbortHandler);
|
|
546
|
+
possibleListeners.current.push(['wheel', wheelAbortHandler]);
|
|
547
|
+
var scrollAbortHandler = function scrollAbortHandler() {
|
|
548
|
+
var activeInteraction = getActiveInteraction();
|
|
549
|
+
if (activeInteraction && ['edit-page', 'live-edit'].includes(activeInteraction.ufoName)) {
|
|
550
|
+
abortAll('new_interaction', "scroll-on-editor-element");
|
|
551
|
+
}
|
|
552
|
+
cleanupListeners();
|
|
553
|
+
};
|
|
554
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
555
|
+
scrollElement.current.addEventListener('scroll', scrollAbortHandler);
|
|
556
|
+
possibleListeners.current.push(['scroll', scrollAbortHandler]);
|
|
561
557
|
}
|
|
562
558
|
}
|
|
563
559
|
if (!viewRef.current && node) {
|
|
@@ -6,10 +6,11 @@ import { useIntl } from 'react-intl-next';
|
|
|
6
6
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/context-panel';
|
|
7
7
|
import { TOOLBARS } from '@atlaskit/editor-common/toolbar';
|
|
8
8
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
11
|
import { isToolbar } from '../../../utils/toolbar';
|
|
11
12
|
import { ToolbarNext } from '../../Toolbar/Toolbar';
|
|
12
|
-
import { useToolbarPortal } from '../../Toolbar/ToolbarPortal';
|
|
13
|
+
import { ToolbarPortalMountPoint, useToolbarPortal } from '../../Toolbar/ToolbarPortal';
|
|
13
14
|
var styles = {
|
|
14
15
|
mainToolbarIconBefore: "_19pkpxbi _2hwxpxbi _otyrpxbi",
|
|
15
16
|
mainToolbarIconBeforeNew: "_4cvr1h6o _1e0c1txw",
|
|
@@ -106,7 +107,7 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
|
106
107
|
}, !!customPrimaryToolbarComponents && 'before' in customPrimaryToolbarComponents && /*#__PURE__*/React.createElement("div", {
|
|
107
108
|
"data-testid": 'before-primary-toolbar-components-plugin',
|
|
108
109
|
className: ax([styles.beforePrimaryToolbarComponents])
|
|
109
|
-
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents))) : toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && (!expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
110
|
+
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents)), fg('platform_editor_toolbar_aifc_patch_7') && /*#__PURE__*/React.createElement(ToolbarPortalMountPoint, null)) : toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && (!expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
110
111
|
toolbar: toolbar,
|
|
111
112
|
components: components,
|
|
112
113
|
editorView: editorView,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "
|
|
2
|
+
export var version = "215.0.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "215.0.
|
|
3
|
+
"version": "215.0.2",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"@atlaskit/primitives": "^14.15.0",
|
|
108
108
|
"@atlaskit/renderer": "^124.1.0",
|
|
109
109
|
"@atlaskit/section-message": "^8.7.0",
|
|
110
|
-
"@atlaskit/smart-card": "^43.
|
|
110
|
+
"@atlaskit/smart-card": "^43.1.0",
|
|
111
111
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
112
112
|
"@atlaskit/toggle": "^15.1.0",
|
|
113
113
|
"@atlaskit/util-data-test": "^18.3.0",
|
|
@@ -150,16 +150,9 @@
|
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
152
|
"platform-feature-flags": {
|
|
153
|
-
"cc_editor_abort_ufo_load_on_editor_scroll": {
|
|
154
|
-
"type": "boolean"
|
|
155
|
-
},
|
|
156
153
|
"confluence_floating_toolbar_animation": {
|
|
157
154
|
"type": "boolean"
|
|
158
155
|
},
|
|
159
|
-
"annotations_defensive_node_name_calculations": {
|
|
160
|
-
"type": "boolean",
|
|
161
|
-
"referenceOnly": "true"
|
|
162
|
-
},
|
|
163
156
|
"linking_platform_datasource_assets_objects": {
|
|
164
157
|
"type": "boolean",
|
|
165
158
|
"referenceOnly": "true"
|
|
@@ -377,10 +370,6 @@
|
|
|
377
370
|
"type": "boolean",
|
|
378
371
|
"referenceOnly": true
|
|
379
372
|
},
|
|
380
|
-
"editor_a11y_aria_announcement_for_copied_status": {
|
|
381
|
-
"type": "boolean",
|
|
382
|
-
"referenceOnly": true
|
|
383
|
-
},
|
|
384
373
|
"platform_renderer_triple_click_selects_paragraph": {
|
|
385
374
|
"type": "boolean",
|
|
386
375
|
"referenceOnly": true
|
|
@@ -479,6 +468,9 @@
|
|
|
479
468
|
"platform_editor_text_highlight_padding": {
|
|
480
469
|
"type": "boolean"
|
|
481
470
|
},
|
|
471
|
+
"platform_editor_toolbar_aifc_patch_7": {
|
|
472
|
+
"type": "boolean"
|
|
473
|
+
},
|
|
482
474
|
"platform_editor_table_container_y_overflow_fix": {
|
|
483
475
|
"type": "boolean"
|
|
484
476
|
}
|