@atlaskit/editor-core 188.11.3 → 188.11.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
+ ## 188.11.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#41366](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41366) [`b0fae9ec9d9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b0fae9ec9d9) - [ux] Avatar group removed from confluence full page toolbar if launch darkly feature flag set (platform.confluence.frontend.editor.no.platform.avatar.group)
8
+
3
9
  ## 188.11.3
4
10
 
5
11
  ### Patch Changes
@@ -361,14 +361,14 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
361
361
  showElementBrowserLink: props.elementBrowser && props.elementBrowser.showModal || false,
362
362
  replacePlusMenuWithElementBrowser: props.elementBrowser && props.elementBrowser.replacePlusMenu || false
363
363
  }]).maybeAdd(_plugins.beforePrimaryToolbarPlugin, function (plugin, builder) {
364
- if (hasBeforePrimaryToolbar(props.primaryToolbarComponents) && !featureFlags.twoLineEditorToolbar) {
364
+ if (!(0, _platformFeatureFlags.getBooleanFF)('platform.confluence.frontend.editor.no.platform.avatar.group') && hasBeforePrimaryToolbar(props.primaryToolbarComponents) && !featureFlags.twoLineEditorToolbar) {
365
365
  return builder.add([plugin, {
366
366
  beforePrimaryToolbarComponents: props.primaryToolbarComponents.before
367
367
  }]);
368
368
  }
369
369
  return builder;
370
370
  }).maybeAdd(_plugins.avatarGroupPlugin, function (plugin, builder) {
371
- if (featureFlags.showAvatarGroupAsPlugin === true && !featureFlags.twoLineEditorToolbar) {
371
+ if (!(0, _platformFeatureFlags.getBooleanFF)('platform.confluence.frontend.editor.no.platform.avatar.group') && featureFlags.showAvatarGroupAsPlugin === true && !featureFlags.twoLineEditorToolbar) {
372
372
  return builder.add([plugin, {
373
373
  collabEdit: props.collabEdit,
374
374
  takeFullWidth: !hasBeforePrimaryToolbar(props.primaryToolbarComponents)
@@ -378,7 +378,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
378
378
  }).maybeAdd(_plugins.findReplacePlugin, function (plugin, builder) {
379
379
  if (props.allowFindReplace) {
380
380
  return builder.add([plugin, {
381
- takeFullWidth: !!featureFlags.showAvatarGroupAsPlugin === false && !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
381
+ takeFullWidth: !(0, _platformFeatureFlags.getBooleanFF)('platform.confluence.frontend.editor.no.platform.avatar.group') && !!featureFlags.showAvatarGroupAsPlugin === false && !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
382
382
  twoLineEditorToolbar: !!featureFlags.twoLineEditorToolbar
383
383
  }]);
384
384
  }
@@ -18,6 +18,7 @@ var _MainToolbar = require("./MainToolbar");
18
18
  var _ui2 = require("@atlaskit/editor-common/ui");
19
19
  var _messages = require("@atlaskit/editor-common/messages");
20
20
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
21
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
23
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
24
  /** @jsx jsx */
@@ -52,7 +53,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
52
53
  css: _MainToolbar.customToolbarWrapperStyle
53
54
  }, (_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? (0, _react2.jsx)(_BeforePrimaryToolbarWrapper.BeforePrimaryToolbarWrapper, {
54
55
  beforePrimaryToolbarComponents: props.customPrimaryToolbarComponents.before
55
- }) : null, (props === null || props === void 0 || (_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.showAvatarGroupAsPlugin) === true && !((_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.twoLineEditorToolbar) ? null : (0, _react2.jsx)(_ui.default, {
56
+ }) : null, (0, _platformFeatureFlags.getBooleanFF)('platform.confluence.frontend.editor.no.platform.avatar.group') || (props === null || props === void 0 || (_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.showAvatarGroupAsPlugin) === true && !((_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.twoLineEditorToolbar) ? null : (0, _react2.jsx)(_ui.default, {
56
57
  editorView: props.editorView,
57
58
  eventDispatcher: props.eventDispatcher,
58
59
  inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "188.11.3";
8
+ var version = exports.version = "188.11.4";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -358,14 +358,14 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
358
358
  showElementBrowserLink: props.elementBrowser && props.elementBrowser.showModal || false,
359
359
  replacePlusMenuWithElementBrowser: props.elementBrowser && props.elementBrowser.replacePlusMenu || false
360
360
  }]).maybeAdd(beforePrimaryToolbarPlugin, (plugin, builder) => {
361
- if (hasBeforePrimaryToolbar(props.primaryToolbarComponents) && !featureFlags.twoLineEditorToolbar) {
361
+ if (!getBooleanFF('platform.confluence.frontend.editor.no.platform.avatar.group') && hasBeforePrimaryToolbar(props.primaryToolbarComponents) && !featureFlags.twoLineEditorToolbar) {
362
362
  return builder.add([plugin, {
363
363
  beforePrimaryToolbarComponents: props.primaryToolbarComponents.before
364
364
  }]);
365
365
  }
366
366
  return builder;
367
367
  }).maybeAdd(avatarGroupPlugin, (plugin, builder) => {
368
- if (featureFlags.showAvatarGroupAsPlugin === true && !featureFlags.twoLineEditorToolbar) {
368
+ if (!getBooleanFF('platform.confluence.frontend.editor.no.platform.avatar.group') && featureFlags.showAvatarGroupAsPlugin === true && !featureFlags.twoLineEditorToolbar) {
369
369
  return builder.add([plugin, {
370
370
  collabEdit: props.collabEdit,
371
371
  takeFullWidth: !hasBeforePrimaryToolbar(props.primaryToolbarComponents)
@@ -375,7 +375,7 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
375
375
  }).maybeAdd(findReplacePlugin, (plugin, builder) => {
376
376
  if (props.allowFindReplace) {
377
377
  return builder.add([plugin, {
378
- takeFullWidth: !!featureFlags.showAvatarGroupAsPlugin === false && !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
378
+ takeFullWidth: !getBooleanFF('platform.confluence.frontend.editor.no.platform.avatar.group') && !!featureFlags.showAvatarGroupAsPlugin === false && !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
379
379
  twoLineEditorToolbar: !!featureFlags.twoLineEditorToolbar
380
380
  }]);
381
381
  }
@@ -11,6 +11,7 @@ import { mainToolbarStyle, mainToolbarIconBeforeStyle, mainToolbarFirstChildStyl
11
11
  import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
12
12
  import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
13
13
  import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
14
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
14
15
  export const EditorToolbar = /*#__PURE__*/React.memo(props => {
15
16
  var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _props$featureFlags5, _props$featureFlags6;
16
17
  const [shouldSplitToolbar, setShouldSplitToolbar] = useState(false);
@@ -38,7 +39,7 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
38
39
  css: customToolbarWrapperStyle
39
40
  }, (_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? jsx(BeforePrimaryToolbarWrapper, {
40
41
  beforePrimaryToolbarComponents: props.customPrimaryToolbarComponents.before
41
- }) : null, (props === null || props === void 0 ? void 0 : (_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.showAvatarGroupAsPlugin) === true && !((_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.twoLineEditorToolbar) ? null : jsx(AvatarsWithPluginState, {
42
+ }) : null, getBooleanFF('platform.confluence.frontend.editor.no.platform.avatar.group') || (props === null || props === void 0 ? void 0 : (_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.showAvatarGroupAsPlugin) === true && !((_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.twoLineEditorToolbar) ? null : jsx(AvatarsWithPluginState, {
42
43
  editorView: props.editorView,
43
44
  eventDispatcher: props.eventDispatcher,
44
45
  inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "188.11.3";
2
+ export const version = "188.11.4";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -354,14 +354,14 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
354
354
  showElementBrowserLink: props.elementBrowser && props.elementBrowser.showModal || false,
355
355
  replacePlusMenuWithElementBrowser: props.elementBrowser && props.elementBrowser.replacePlusMenu || false
356
356
  }]).maybeAdd(beforePrimaryToolbarPlugin, function (plugin, builder) {
357
- if (hasBeforePrimaryToolbar(props.primaryToolbarComponents) && !featureFlags.twoLineEditorToolbar) {
357
+ if (!getBooleanFF('platform.confluence.frontend.editor.no.platform.avatar.group') && hasBeforePrimaryToolbar(props.primaryToolbarComponents) && !featureFlags.twoLineEditorToolbar) {
358
358
  return builder.add([plugin, {
359
359
  beforePrimaryToolbarComponents: props.primaryToolbarComponents.before
360
360
  }]);
361
361
  }
362
362
  return builder;
363
363
  }).maybeAdd(avatarGroupPlugin, function (plugin, builder) {
364
- if (featureFlags.showAvatarGroupAsPlugin === true && !featureFlags.twoLineEditorToolbar) {
364
+ if (!getBooleanFF('platform.confluence.frontend.editor.no.platform.avatar.group') && featureFlags.showAvatarGroupAsPlugin === true && !featureFlags.twoLineEditorToolbar) {
365
365
  return builder.add([plugin, {
366
366
  collabEdit: props.collabEdit,
367
367
  takeFullWidth: !hasBeforePrimaryToolbar(props.primaryToolbarComponents)
@@ -371,7 +371,7 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
371
371
  }).maybeAdd(findReplacePlugin, function (plugin, builder) {
372
372
  if (props.allowFindReplace) {
373
373
  return builder.add([plugin, {
374
- takeFullWidth: !!featureFlags.showAvatarGroupAsPlugin === false && !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
374
+ takeFullWidth: !getBooleanFF('platform.confluence.frontend.editor.no.platform.avatar.group') && !!featureFlags.showAvatarGroupAsPlugin === false && !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
375
375
  twoLineEditorToolbar: !!featureFlags.twoLineEditorToolbar
376
376
  }]);
377
377
  }
@@ -12,6 +12,7 @@ import { mainToolbarStyle, mainToolbarIconBeforeStyle, mainToolbarFirstChildStyl
12
12
  import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
13
13
  import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
14
14
  import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
15
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
15
16
  export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
16
17
  var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _props$featureFlags5, _props$featureFlags6;
17
18
  var _useState = useState(false),
@@ -42,7 +43,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
42
43
  css: customToolbarWrapperStyle
43
44
  }, (_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? jsx(BeforePrimaryToolbarWrapper, {
44
45
  beforePrimaryToolbarComponents: props.customPrimaryToolbarComponents.before
45
- }) : null, (props === null || props === void 0 || (_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.showAvatarGroupAsPlugin) === true && !((_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.twoLineEditorToolbar) ? null : jsx(AvatarsWithPluginState, {
46
+ }) : null, getBooleanFF('platform.confluence.frontend.editor.no.platform.avatar.group') || (props === null || props === void 0 || (_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.showAvatarGroupAsPlugin) === true && !((_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.twoLineEditorToolbar) ? null : jsx(AvatarsWithPluginState, {
46
47
  editorView: props.editorView,
47
48
  eventDispatcher: props.eventDispatcher,
48
49
  inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "188.11.3";
2
+ export var version = "188.11.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": "188.11.3",
3
+ "version": "188.11.4",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -187,11 +187,13 @@
187
187
  "@testing-library/react-hooks": "^8.0.1",
188
188
  "@testing-library/user-event": "^14.4.3",
189
189
  "@types/diff": "^5.0.2",
190
+ "@types/is-number": "^7.0.0",
190
191
  "@types/jscodeshift": "^0.11.0",
191
192
  "@types/lodash": "^4.14.157",
192
193
  "@types/lz-string": "^1.3.34",
193
194
  "@types/prettier": "^2.7.2",
194
195
  "@types/raf-schd": "^4.0.1",
196
+ "@types/react-transition-group": "^2.0.6",
195
197
  "@types/rison": "^0.0.6",
196
198
  "async-retry": "^1.2.3",
197
199
  "clipboard-polyfill": "2.4.3",
@@ -237,6 +239,9 @@
237
239
  "platform.editor.custom-table-width": {
238
240
  "type": "boolean"
239
241
  },
242
+ "platform.confluence.frontend.editor.no.platform.avatar.group": {
243
+ "type": "boolean"
244
+ },
240
245
  "platform.linking-platform.editor.fix-link-insert-analytics": {
241
246
  "type": "boolean"
242
247
  },