@atlaskit/editor-core 187.39.0 → 187.39.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 187.39.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`dca155209d9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dca155209d9) - ED-15094 Feature flag clean up for copy button
8
+
3
9
  ## 187.39.0
4
10
 
5
11
  ### Minor Changes
@@ -32,7 +32,7 @@ function getSpellCheck(featureFlags) {
32
32
  * which is used by both current and archv3 editors.
33
33
  */
34
34
  function createFeatureFlagsFromProps(props) {
35
- var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31;
35
+ var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29;
36
36
  var normalizedFeatureFlags = (0, _normalizeFeatureFlags.normalizeFeatureFlags)(props.featureFlags);
37
37
  return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
38
38
  newInsertionBehaviour: props.allowNewInsertionBehaviour,
@@ -58,14 +58,13 @@ function createFeatureFlagsFromProps(props) {
58
58
  chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
59
59
  showHoverPreview: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.showHoverPreview) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.showHoverPreview) : false),
60
60
  indentationButtonsInTheToolbar: typeof props.showIndentationButtons === 'boolean' ? props.showIndentationButtons : Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.indentationButtonsInTheToolbar) : false)),
61
- floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags25 = props.featureFlags) !== null && _props$featureFlags25 !== void 0 && _props$featureFlags25.floatingToolbarCopyButton) : false)),
62
- floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
61
+ floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
63
62
  disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
64
63
  // Including fallback to props.featureFlags so that mobile feature flags
65
64
  // are included (they are not kebab cased)
66
- restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags27 = props.featureFlags) === null || _props$featureFlags27 === void 0 ? void 0 : _props$featureFlags27.restartNumberedLists) === true,
67
- useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29.useSomewhatSemanticTextColorNames) : false)),
65
+ restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.restartNumberedLists) === true,
66
+ useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.useSomewhatSemanticTextColorNames) : false)),
68
67
  lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
69
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags31 = props.featureFlags) !== null && _props$featureFlags31 !== void 0 && _props$featureFlags31['prevent-popup-overflow']) : false)
68
+ preventPopupOverflow: Boolean(typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29['prevent-popup-overflow']) : false)
70
69
  });
71
70
  }
@@ -395,11 +395,6 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
395
395
  return builder;
396
396
  }).add([_plugins.codeBidiWarningPlugin, {
397
397
  appearance: appearance
398
- }]).maybeAdd(_plugins.copyButtonPlugin, function (plugin, builder) {
399
- if (featureFlags.floatingToolbarCopyButton) {
400
- return builder.add(plugin);
401
- }
402
- return builder;
403
- });
398
+ }]).add(_plugins.copyButtonPlugin);
404
399
  return finalPreset;
405
400
  }
@@ -244,7 +244,7 @@ function ContentComponent(_ref5) {
244
244
  var _ref7 = floatingToolbarData || {},
245
245
  confirmDialogForItem = _ref7.confirmDialogForItem;
246
246
  var confirmButtonItem = confirmDialogForItem ? toolbarItems[confirmDialogForItem] : undefined;
247
- var scrollable = featureFlags.floatingToolbarCopyButton && config.scrollable;
247
+ var scrollable = config.scrollable;
248
248
  var confirmDialogOptions = typeof (confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog) === 'function' ? confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog() : confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog;
249
249
  return /*#__PURE__*/_react.default.createElement(_ErrorBoundary.ErrorBoundary, {
250
250
  component: _analytics.ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN,
@@ -120,8 +120,10 @@ var ScrollButtons = function ScrollButtons(_ref) {
120
120
  (0, _react.useEffect)(function () {
121
121
  var scrollContainerRefCurrent = scrollContainerRef.current;
122
122
  if (scrollContainerRefCurrent) {
123
+ var _scrollContainerRefCu;
123
124
  // reset scroll position when switching from one node with toolbar to another
124
- scrollContainerRefCurrent.scrollTo({
125
+ // scroll to made optional as it may not be rendered in testing env
126
+ (_scrollContainerRefCu = scrollContainerRefCurrent.scrollTo) === null || _scrollContainerRefCu === void 0 ? void 0 : _scrollContainerRefCu.call(scrollContainerRefCurrent, {
125
127
  left: 0
126
128
  });
127
129
  }
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "187.39.0";
9
+ var version = "187.39.4";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -21,7 +21,7 @@ function getSpellCheck(featureFlags) {
21
21
  * which is used by both current and archv3 editors.
22
22
  */
23
23
  export function createFeatureFlagsFromProps(props) {
24
- var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31;
24
+ var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29;
25
25
  const normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
26
26
  return {
27
27
  ...normalizedFeatureFlags,
@@ -48,14 +48,13 @@ export function createFeatureFlagsFromProps(props) {
48
48
  chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
49
49
  showHoverPreview: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.showHoverPreview) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.showHoverPreview) : false),
50
50
  indentationButtonsInTheToolbar: typeof props.showIndentationButtons === 'boolean' ? props.showIndentationButtons : Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.indentationButtonsInTheToolbar) : false)),
51
- floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags25 = props.featureFlags) !== null && _props$featureFlags25 !== void 0 && _props$featureFlags25.floatingToolbarCopyButton) : false)),
52
- floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
51
+ floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
53
52
  disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
54
53
  // Including fallback to props.featureFlags so that mobile feature flags
55
54
  // are included (they are not kebab cased)
56
- restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags27 = props.featureFlags) === null || _props$featureFlags27 === void 0 ? void 0 : _props$featureFlags27.restartNumberedLists) === true,
57
- useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29.useSomewhatSemanticTextColorNames) : false)),
55
+ restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.restartNumberedLists) === true,
56
+ useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.useSomewhatSemanticTextColorNames) : false)),
58
57
  lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
59
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags31 = props.featureFlags) !== null && _props$featureFlags31 !== void 0 && _props$featureFlags31['prevent-popup-overflow']) : false)
58
+ preventPopupOverflow: Boolean(typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29['prevent-popup-overflow']) : false)
60
59
  };
61
60
  }
@@ -392,11 +392,6 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
392
392
  return builder;
393
393
  }).add([codeBidiWarningPlugin, {
394
394
  appearance
395
- }]).maybeAdd(copyButtonPlugin, (plugin, builder) => {
396
- if (featureFlags.floatingToolbarCopyButton) {
397
- return builder.add(plugin);
398
- }
399
- return builder;
400
- });
395
+ }]).add(copyButtonPlugin);
401
396
  return finalPreset;
402
397
  }
@@ -232,7 +232,7 @@ function ContentComponent({
232
232
  confirmDialogForItem
233
233
  } = floatingToolbarData || {};
234
234
  const confirmButtonItem = confirmDialogForItem ? toolbarItems[confirmDialogForItem] : undefined;
235
- const scrollable = featureFlags.floatingToolbarCopyButton && config.scrollable;
235
+ const scrollable = config.scrollable;
236
236
  const confirmDialogOptions = typeof (confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog) === 'function' ? confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog() : confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog;
237
237
  return /*#__PURE__*/React.createElement(ErrorBoundary, {
238
238
  component: ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN,
@@ -106,8 +106,10 @@ export const ScrollButtons = ({
106
106
  useEffect(() => {
107
107
  const scrollContainerRefCurrent = scrollContainerRef.current;
108
108
  if (scrollContainerRefCurrent) {
109
+ var _scrollContainerRefCu;
109
110
  // reset scroll position when switching from one node with toolbar to another
110
- scrollContainerRefCurrent.scrollTo({
111
+ // scroll to made optional as it may not be rendered in testing env
112
+ (_scrollContainerRefCu = scrollContainerRefCurrent.scrollTo) === null || _scrollContainerRefCu === void 0 ? void 0 : _scrollContainerRefCu.call(scrollContainerRefCurrent, {
111
113
  left: 0
112
114
  });
113
115
  }
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "187.39.0";
2
+ export const version = "187.39.4";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -25,7 +25,7 @@ function getSpellCheck(featureFlags) {
25
25
  * which is used by both current and archv3 editors.
26
26
  */
27
27
  export function createFeatureFlagsFromProps(props) {
28
- var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31;
28
+ var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29;
29
29
  var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
30
30
  return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
31
31
  newInsertionBehaviour: props.allowNewInsertionBehaviour,
@@ -51,14 +51,13 @@ export function createFeatureFlagsFromProps(props) {
51
51
  chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
52
52
  showHoverPreview: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.showHoverPreview) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.showHoverPreview) : false),
53
53
  indentationButtonsInTheToolbar: typeof props.showIndentationButtons === 'boolean' ? props.showIndentationButtons : Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.indentationButtonsInTheToolbar) : false)),
54
- floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags25 = props.featureFlags) !== null && _props$featureFlags25 !== void 0 && _props$featureFlags25.floatingToolbarCopyButton) : false)),
55
- floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
54
+ floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
56
55
  disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
57
56
  // Including fallback to props.featureFlags so that mobile feature flags
58
57
  // are included (they are not kebab cased)
59
- restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags27 = props.featureFlags) === null || _props$featureFlags27 === void 0 ? void 0 : _props$featureFlags27.restartNumberedLists) === true,
60
- useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29.useSomewhatSemanticTextColorNames) : false)),
58
+ restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.restartNumberedLists) === true,
59
+ useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.useSomewhatSemanticTextColorNames) : false)),
61
60
  lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
62
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags31 = props.featureFlags) !== null && _props$featureFlags31 !== void 0 && _props$featureFlags31['prevent-popup-overflow']) : false)
61
+ preventPopupOverflow: Boolean(typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29['prevent-popup-overflow']) : false)
63
62
  });
64
63
  }
@@ -388,11 +388,6 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
388
388
  return builder;
389
389
  }).add([codeBidiWarningPlugin, {
390
390
  appearance: appearance
391
- }]).maybeAdd(copyButtonPlugin, function (plugin, builder) {
392
- if (featureFlags.floatingToolbarCopyButton) {
393
- return builder.add(plugin);
394
- }
395
- return builder;
396
- });
391
+ }]).add(copyButtonPlugin);
397
392
  return finalPreset;
398
393
  }
@@ -234,7 +234,7 @@ function ContentComponent(_ref5) {
234
234
  var _ref7 = floatingToolbarData || {},
235
235
  confirmDialogForItem = _ref7.confirmDialogForItem;
236
236
  var confirmButtonItem = confirmDialogForItem ? toolbarItems[confirmDialogForItem] : undefined;
237
- var scrollable = featureFlags.floatingToolbarCopyButton && config.scrollable;
237
+ var scrollable = config.scrollable;
238
238
  var confirmDialogOptions = typeof (confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog) === 'function' ? confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog() : confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog;
239
239
  return /*#__PURE__*/React.createElement(ErrorBoundary, {
240
240
  component: ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN,
@@ -110,8 +110,10 @@ export var ScrollButtons = function ScrollButtons(_ref) {
110
110
  useEffect(function () {
111
111
  var scrollContainerRefCurrent = scrollContainerRef.current;
112
112
  if (scrollContainerRefCurrent) {
113
+ var _scrollContainerRefCu;
113
114
  // reset scroll position when switching from one node with toolbar to another
114
- scrollContainerRefCurrent.scrollTo({
115
+ // scroll to made optional as it may not be rendered in testing env
116
+ (_scrollContainerRefCu = scrollContainerRefCurrent.scrollTo) === null || _scrollContainerRefCu === void 0 ? void 0 : _scrollContainerRefCu.call(scrollContainerRefCurrent, {
115
117
  left: 0
116
118
  });
117
119
  }
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.39.0";
2
+ export var version = "187.39.4";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.39.0",
3
+ "version": "187.39.4",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -108,7 +108,7 @@
108
108
  "@atlaskit/radio": "^5.6.0",
109
109
  "@atlaskit/section-message": "^6.4.0",
110
110
  "@atlaskit/select": "^16.5.0",
111
- "@atlaskit/smart-card": "^26.21.0",
111
+ "@atlaskit/smart-card": "^26.22.0",
112
112
  "@atlaskit/smart-user-picker": "^6.3.0",
113
113
  "@atlaskit/spinner": "^15.5.0",
114
114
  "@atlaskit/status": "^1.3.0",