@atlaskit/editor-common 110.18.1 → 110.18.3

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,21 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 110.18.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0adf16debc7be`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0adf16debc7be) -
8
+ EDITOR-2450 Sync Block Prototype clean up
9
+ - Updated dependencies
10
+
11
+ ## 110.18.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [`21fe79119fe74`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/21fe79119fe74) -
16
+ EDITOR-2447 Bump adf-schema to 51.3.2
17
+ - Updated dependencies
18
+
3
19
  ## 110.18.1
4
20
 
5
21
  ### Patch Changes
@@ -37,7 +37,7 @@ var hoverStyles = (0, _react2.css)({
37
37
  }
38
38
  });
39
39
  function ExtensionWithPluginState(props) {
40
- var _node$attrs, _node$attrs2;
40
+ var _node$attrs;
41
41
  var node = props.node,
42
42
  handleContentDOMRef = props.handleContentDOMRef,
43
43
  children = props.children,
@@ -64,14 +64,13 @@ function ExtensionWithPluginState(props) {
64
64
  return extensionNode.type.name === 'extension' && ((_extensionNode$attrs = extensionNode.attrs) === null || _extensionNode$attrs === void 0 ? void 0 : _extensionNode$attrs.extensionType) === 'com.atlassian.confluence.migration' && ((_extensionNode$attrs2 = extensionNode.attrs) === null || _extensionNode$attrs2 === void 0 ? void 0 : _extensionNode$attrs2.extensionKey) === 'legacy-content';
65
65
  };
66
66
  var showLegacyContentHeader = (0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro_visual_update') && isLegacyContentMacroExtension(node);
67
- var isSyncedBlockExtension = node.type.name === 'extension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 || (_node$attrs = _node$attrs.extensionKey) === null || _node$attrs === void 0 ? void 0 : _node$attrs.startsWith('synced-block'));
68
67
  var hasBody = ['bodiedExtension', 'multiBodiedExtension'].includes(node.type.name);
69
68
  var hasChildren = !!children;
70
- var removeBorder = (0, _platformFeatureFlags.fg)('platform_synced_block_demo') ? showMacroInteractionDesignUpdates || !!hideFrame || isSyncedBlockExtension : showMacroInteractionDesignUpdates || !!(hideFrame && !hasBody);
69
+ var removeBorder = showMacroInteractionDesignUpdates || !!(hideFrame && !hasBody);
71
70
 
72
71
  // Some native bodied macros (e.g Content properties) have this param to hide in view mode
73
72
  // which we want to also hide in live page view mode too
74
- var macroParamHiddenValue = node === null || node === void 0 || (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.parameters) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.macroParams) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.hidden) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.value;
73
+ var macroParamHiddenValue = node === null || node === void 0 || (_node$attrs = node.attrs) === null || _node$attrs === void 0 || (_node$attrs = _node$attrs.parameters) === null || _node$attrs === void 0 || (_node$attrs = _node$attrs.macroParams) === null || _node$attrs === void 0 || (_node$attrs = _node$attrs.hidden) === null || _node$attrs === void 0 ? void 0 : _node$attrs.value;
75
74
  var shouldHideInLivePageViewMode = isLivePageViewMode && macroParamHiddenValue === 'true'; // it is stored as a string
76
75
 
77
76
  var getPos = props.getPos,
@@ -139,7 +138,6 @@ function ExtensionWithPluginState(props) {
139
138
  }
140
139
  };
141
140
  var extensionContentStyles = (0, _expValEquals.expValEquals)('platform_editor_extension_styles', 'isEnabled', true) ? _styles2.extensionContent : _styles2.content;
142
- var shouldHideExtensionLozenge = (0, _platformFeatureFlags.fg)('platform_synced_block_demo') ? isSyncedBlockExtension : false;
143
141
  return (0, _react2.jsx)(_react.Fragment, null, showLegacyContentHeader && (0, _react2.jsx)(_LegacyContentHeader.LegacyContentHeader, {
144
142
  isNodeSelected: isNodeSelected,
145
143
  isNodeHovered: isNodeHovered,
@@ -149,7 +147,7 @@ function ExtensionWithPluginState(props) {
149
147
  onMouseLeave: function onMouseLeave() {
150
148
  return handleMouseEvent(false);
151
149
  }
152
- }), !showLegacyContentHeader && showMacroInteractionDesignUpdates && !isLivePageViewMode && !shouldHideExtensionLozenge && (0, _react2.jsx)(_Lozenge.default, {
150
+ }), !showLegacyContentHeader && showMacroInteractionDesignUpdates && !isLivePageViewMode && (0, _react2.jsx)(_Lozenge.default, {
153
151
  isNodeSelected: isNodeSelected,
154
152
  isNodeHovered: isNodeHovered,
155
153
  isNodeNested: isNodeNested,
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
11
  var _fileEditorFile = _interopRequireDefault(require("@atlaskit/icon/core/migration/file--editor-file"));
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _styles = require("../styles");
14
13
  var _EditToggle = require("./EditToggle");
15
14
  var _ExtensionLabel = require("./ExtensionLabel");
@@ -40,9 +39,6 @@ var LozengeComponent = exports.LozengeComponent = function LozengeComponent(_ref
40
39
  setShowBodiedExtensionRendererView = _ref.setShowBodiedExtensionRendererView,
41
40
  pluginInjectionApi = _ref.pluginInjectionApi;
42
41
  var capitalizedTitle = capitalizeFirstLetter(title);
43
- if (title.startsWith('synced-block:') && (0, _platformFeatureFlags.fg)('platform_synced_block_demo')) {
44
- return null; // Synced blocks do not use the lozenge component
45
- }
46
42
  if (showMacroInteractionDesignUpdates) {
47
43
  return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_ExtensionLabel.ExtensionLabel, {
48
44
  text: capitalizedTitle,
@@ -25,7 +25,7 @@ const hoverStyles = css({
25
25
  }
26
26
  });
27
27
  function ExtensionWithPluginState(props) {
28
- var _node$attrs, _node$attrs$extension, _node$attrs2, _node$attrs2$paramete, _node$attrs2$paramete2, _node$attrs2$paramete3;
28
+ var _node$attrs, _node$attrs$parameter, _node$attrs$parameter2, _node$attrs$parameter3;
29
29
  const {
30
30
  node,
31
31
  handleContentDOMRef,
@@ -55,14 +55,13 @@ function ExtensionWithPluginState(props) {
55
55
  return extensionNode.type.name === 'extension' && ((_extensionNode$attrs = extensionNode.attrs) === null || _extensionNode$attrs === void 0 ? void 0 : _extensionNode$attrs.extensionType) === 'com.atlassian.confluence.migration' && ((_extensionNode$attrs2 = extensionNode.attrs) === null || _extensionNode$attrs2 === void 0 ? void 0 : _extensionNode$attrs2.extensionKey) === 'legacy-content';
56
56
  };
57
57
  const showLegacyContentHeader = fg('platform_editor_legacy_content_macro_visual_update') && isLegacyContentMacroExtension(node);
58
- const isSyncedBlockExtension = node.type.name === 'extension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : (_node$attrs$extension = _node$attrs.extensionKey) === null || _node$attrs$extension === void 0 ? void 0 : _node$attrs$extension.startsWith('synced-block'));
59
58
  const hasBody = ['bodiedExtension', 'multiBodiedExtension'].includes(node.type.name);
60
59
  const hasChildren = !!children;
61
- const removeBorder = fg('platform_synced_block_demo') ? showMacroInteractionDesignUpdates || !!hideFrame || isSyncedBlockExtension : showMacroInteractionDesignUpdates || !!(hideFrame && !hasBody);
60
+ const removeBorder = showMacroInteractionDesignUpdates || !!(hideFrame && !hasBody);
62
61
 
63
62
  // Some native bodied macros (e.g Content properties) have this param to hide in view mode
64
63
  // which we want to also hide in live page view mode too
65
- const macroParamHiddenValue = node === null || node === void 0 ? void 0 : (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : (_node$attrs2$paramete = _node$attrs2.parameters) === null || _node$attrs2$paramete === void 0 ? void 0 : (_node$attrs2$paramete2 = _node$attrs2$paramete.macroParams) === null || _node$attrs2$paramete2 === void 0 ? void 0 : (_node$attrs2$paramete3 = _node$attrs2$paramete2.hidden) === null || _node$attrs2$paramete3 === void 0 ? void 0 : _node$attrs2$paramete3.value;
64
+ const macroParamHiddenValue = node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : (_node$attrs$parameter = _node$attrs.parameters) === null || _node$attrs$parameter === void 0 ? void 0 : (_node$attrs$parameter2 = _node$attrs$parameter.macroParams) === null || _node$attrs$parameter2 === void 0 ? void 0 : (_node$attrs$parameter3 = _node$attrs$parameter2.hidden) === null || _node$attrs$parameter3 === void 0 ? void 0 : _node$attrs$parameter3.value;
66
65
  const shouldHideInLivePageViewMode = isLivePageViewMode && macroParamHiddenValue === 'true'; // it is stored as a string
67
66
 
68
67
  const {
@@ -139,13 +138,12 @@ function ExtensionWithPluginState(props) {
139
138
  }
140
139
  };
141
140
  const extensionContentStyles = expValEquals('platform_editor_extension_styles', 'isEnabled', true) ? extensionContent : content;
142
- const shouldHideExtensionLozenge = fg('platform_synced_block_demo') ? isSyncedBlockExtension : false;
143
141
  return jsx(Fragment, null, showLegacyContentHeader && jsx(LegacyContentHeader, {
144
142
  isNodeSelected: isNodeSelected,
145
143
  isNodeHovered: isNodeHovered,
146
144
  onMouseEnter: () => handleMouseEvent(true),
147
145
  onMouseLeave: () => handleMouseEvent(false)
148
- }), !showLegacyContentHeader && showMacroInteractionDesignUpdates && !isLivePageViewMode && !shouldHideExtensionLozenge && jsx(ExtensionLozenge, {
146
+ }), !showLegacyContentHeader && showMacroInteractionDesignUpdates && !isLivePageViewMode && jsx(ExtensionLozenge, {
149
147
  isNodeSelected: isNodeSelected,
150
148
  isNodeHovered: isNodeHovered,
151
149
  isNodeNested: isNodeNested,
@@ -8,7 +8,6 @@ import { Fragment } from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
10
10
  import EditorFileIcon from '@atlaskit/icon/core/migration/file--editor-file';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { placeholderFallback, placeholderFallbackParams } from '../styles';
13
12
  import { EditToggle } from './EditToggle';
14
13
  import { ExtensionLabel } from './ExtensionLabel';
@@ -35,9 +34,6 @@ export const LozengeComponent = ({
35
34
  pluginInjectionApi
36
35
  }) => {
37
36
  const capitalizedTitle = capitalizeFirstLetter(title);
38
- if (title.startsWith('synced-block:') && fg('platform_synced_block_demo')) {
39
- return null; // Synced blocks do not use the lozenge component
40
- }
41
37
  if (showMacroInteractionDesignUpdates) {
42
38
  return jsx(Fragment, null, jsx(ExtensionLabel, {
43
39
  text: capitalizedTitle,
@@ -30,7 +30,7 @@ var hoverStyles = css({
30
30
  }
31
31
  });
32
32
  function ExtensionWithPluginState(props) {
33
- var _node$attrs, _node$attrs2;
33
+ var _node$attrs;
34
34
  var node = props.node,
35
35
  handleContentDOMRef = props.handleContentDOMRef,
36
36
  children = props.children,
@@ -57,14 +57,13 @@ function ExtensionWithPluginState(props) {
57
57
  return extensionNode.type.name === 'extension' && ((_extensionNode$attrs = extensionNode.attrs) === null || _extensionNode$attrs === void 0 ? void 0 : _extensionNode$attrs.extensionType) === 'com.atlassian.confluence.migration' && ((_extensionNode$attrs2 = extensionNode.attrs) === null || _extensionNode$attrs2 === void 0 ? void 0 : _extensionNode$attrs2.extensionKey) === 'legacy-content';
58
58
  };
59
59
  var showLegacyContentHeader = fg('platform_editor_legacy_content_macro_visual_update') && isLegacyContentMacroExtension(node);
60
- var isSyncedBlockExtension = node.type.name === 'extension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 || (_node$attrs = _node$attrs.extensionKey) === null || _node$attrs === void 0 ? void 0 : _node$attrs.startsWith('synced-block'));
61
60
  var hasBody = ['bodiedExtension', 'multiBodiedExtension'].includes(node.type.name);
62
61
  var hasChildren = !!children;
63
- var removeBorder = fg('platform_synced_block_demo') ? showMacroInteractionDesignUpdates || !!hideFrame || isSyncedBlockExtension : showMacroInteractionDesignUpdates || !!(hideFrame && !hasBody);
62
+ var removeBorder = showMacroInteractionDesignUpdates || !!(hideFrame && !hasBody);
64
63
 
65
64
  // Some native bodied macros (e.g Content properties) have this param to hide in view mode
66
65
  // which we want to also hide in live page view mode too
67
- var macroParamHiddenValue = node === null || node === void 0 || (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.parameters) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.macroParams) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.hidden) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.value;
66
+ var macroParamHiddenValue = node === null || node === void 0 || (_node$attrs = node.attrs) === null || _node$attrs === void 0 || (_node$attrs = _node$attrs.parameters) === null || _node$attrs === void 0 || (_node$attrs = _node$attrs.macroParams) === null || _node$attrs === void 0 || (_node$attrs = _node$attrs.hidden) === null || _node$attrs === void 0 ? void 0 : _node$attrs.value;
68
67
  var shouldHideInLivePageViewMode = isLivePageViewMode && macroParamHiddenValue === 'true'; // it is stored as a string
69
68
 
70
69
  var getPos = props.getPos,
@@ -132,7 +131,6 @@ function ExtensionWithPluginState(props) {
132
131
  }
133
132
  };
134
133
  var extensionContentStyles = expValEquals('platform_editor_extension_styles', 'isEnabled', true) ? extensionContent : content;
135
- var shouldHideExtensionLozenge = fg('platform_synced_block_demo') ? isSyncedBlockExtension : false;
136
134
  return jsx(Fragment, null, showLegacyContentHeader && jsx(LegacyContentHeader, {
137
135
  isNodeSelected: isNodeSelected,
138
136
  isNodeHovered: isNodeHovered,
@@ -142,7 +140,7 @@ function ExtensionWithPluginState(props) {
142
140
  onMouseLeave: function onMouseLeave() {
143
141
  return handleMouseEvent(false);
144
142
  }
145
- }), !showLegacyContentHeader && showMacroInteractionDesignUpdates && !isLivePageViewMode && !shouldHideExtensionLozenge && jsx(ExtensionLozenge, {
143
+ }), !showLegacyContentHeader && showMacroInteractionDesignUpdates && !isLivePageViewMode && jsx(ExtensionLozenge, {
146
144
  isNodeSelected: isNodeSelected,
147
145
  isNodeHovered: isNodeHovered,
148
146
  isNodeNested: isNodeNested,
@@ -11,7 +11,6 @@ import { Fragment } from 'react';
11
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
12
  import { jsx } from '@emotion/react';
13
13
  import EditorFileIcon from '@atlaskit/icon/core/migration/file--editor-file';
14
- import { fg } from '@atlaskit/platform-feature-flags';
15
14
  import { placeholderFallback, placeholderFallbackParams } from '../styles';
16
15
  import { EditToggle } from './EditToggle';
17
16
  import { ExtensionLabel } from './ExtensionLabel';
@@ -37,9 +36,6 @@ export var LozengeComponent = function LozengeComponent(_ref) {
37
36
  setShowBodiedExtensionRendererView = _ref.setShowBodiedExtensionRendererView,
38
37
  pluginInjectionApi = _ref.pluginInjectionApi;
39
38
  var capitalizedTitle = capitalizeFirstLetter(title);
40
- if (title.startsWith('synced-block:') && fg('platform_synced_block_demo')) {
41
- return null; // Synced blocks do not use the lozenge component
42
- }
43
39
  if (showMacroInteractionDesignUpdates) {
44
40
  return jsx(Fragment, null, jsx(ExtensionLabel, {
45
41
  text: capitalizedTitle,
@@ -26,5 +26,5 @@ type LozengeComponentProps = {
26
26
  showUpdatedLivePages1PBodiedExtensionUI?: boolean;
27
27
  title: string;
28
28
  };
29
- export declare const LozengeComponent: ({ lozengeData, extensionName, title, params, renderImage, showMacroInteractionDesignUpdates, customContainerStyles, isNodeHovered, isNodeNested, setIsNodeHovered, isBodiedMacro, showLivePagesBodiedMacrosRendererView, showUpdatedLivePages1PBodiedExtensionUI, showBodiedExtensionRendererView, setShowBodiedExtensionRendererView, pluginInjectionApi, }: LozengeComponentProps) => jsx.JSX.Element | null;
29
+ export declare const LozengeComponent: ({ lozengeData, extensionName, title, params, renderImage, showMacroInteractionDesignUpdates, customContainerStyles, isNodeHovered, isNodeNested, setIsNodeHovered, isBodiedMacro, showLivePagesBodiedMacrosRendererView, showUpdatedLivePages1PBodiedExtensionUI, showBodiedExtensionRendererView, setShowBodiedExtensionRendererView, pluginInjectionApi, }: LozengeComponentProps) => jsx.JSX.Element;
30
30
  export {};
@@ -26,5 +26,5 @@ type LozengeComponentProps = {
26
26
  showUpdatedLivePages1PBodiedExtensionUI?: boolean;
27
27
  title: string;
28
28
  };
29
- export declare const LozengeComponent: ({ lozengeData, extensionName, title, params, renderImage, showMacroInteractionDesignUpdates, customContainerStyles, isNodeHovered, isNodeNested, setIsNodeHovered, isBodiedMacro, showLivePagesBodiedMacrosRendererView, showUpdatedLivePages1PBodiedExtensionUI, showBodiedExtensionRendererView, setShowBodiedExtensionRendererView, pluginInjectionApi, }: LozengeComponentProps) => jsx.JSX.Element | null;
29
+ export declare const LozengeComponent: ({ lozengeData, extensionName, title, params, renderImage, showMacroInteractionDesignUpdates, customContainerStyles, isNodeHovered, isNodeNested, setIsNodeHovered, isBodiedMacro, showLivePagesBodiedMacrosRendererView, showUpdatedLivePages1PBodiedExtensionUI, showBodiedExtensionRendererView, setShowBodiedExtensionRendererView, pluginInjectionApi, }: LozengeComponentProps) => jsx.JSX.Element;
30
30
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "110.18.1",
3
+ "version": "110.18.3",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@atlaskit/activity-provider": "^2.5.0",
33
- "@atlaskit/adf-schema": "^51.3.1",
33
+ "@atlaskit/adf-schema": "^51.3.2",
34
34
  "@atlaskit/adf-utils": "^19.25.0",
35
35
  "@atlaskit/afm-i18n-platform-editor-editor-common": "2.7.0",
36
36
  "@atlaskit/analytics-listeners": "^9.1.0",
@@ -76,7 +76,7 @@
76
76
  "@atlaskit/react-ufo": "^4.12.0",
77
77
  "@atlaskit/section-message": "^8.7.0",
78
78
  "@atlaskit/smart-card": "^43.3.0",
79
- "@atlaskit/smart-user-picker": "^8.3.0",
79
+ "@atlaskit/smart-user-picker": "^8.4.0",
80
80
  "@atlaskit/spinner": "^19.0.0",
81
81
  "@atlaskit/status": "^3.0.0",
82
82
  "@atlaskit/task-decision": "^19.2.0",
@@ -228,9 +228,6 @@
228
228
  "platform_editor_legacy_content_macro_visual_update": {
229
229
  "type": "boolean"
230
230
  },
231
- "platform_synced_block_demo": {
232
- "type": "boolean"
233
- },
234
231
  "p2m-drop-down-motion": {
235
232
  "type": "boolean"
236
233
  },