@atlaskit/editor-plugin-media 5.2.0 → 5.2.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 5.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#189903](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/189903)
8
+ [`f5ccd32e607db`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f5ccd32e607db) -
9
+ [ED-28567] Add/remove missing/extra separators in media, table and panel toolbars shown in Jira
10
+ - Updated dependencies
11
+
12
+ ## 5.2.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [#188952](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/188952)
17
+ [`1a88e6e2601ae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1a88e6e2601ae) -
18
+ Migrated usage of renamed/deprecated icons
19
+ - Updated dependencies
20
+
3
21
  ## 5.2.0
4
22
 
5
23
  ### Minor Changes
@@ -15,7 +15,7 @@ var _reactIntlNext = require("react-intl-next");
15
15
  var _hooks = require("@atlaskit/editor-common/hooks");
16
16
  var _media = require("@atlaskit/editor-common/media");
17
17
  var _utils = require("@atlaskit/editor-common/utils");
18
- var _closeEditorClose = _interopRequireDefault(require("@atlaskit/icon/core/migration/close--editor-close"));
18
+ var _crossEditorClose = _interopRequireDefault(require("@atlaskit/icon/core/migration/cross--editor-close"));
19
19
  var _mediaCommon = require("@atlaskit/media-common");
20
20
  var _mediaFilmstrip = require("@atlaskit/media-filmstrip");
21
21
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
@@ -83,7 +83,7 @@ var prepareFilmstripItem = function prepareFilmstripItem(_ref) {
83
83
  shouldEnableDownloadButton: enableDownloadButton,
84
84
  actions: [{
85
85
  handler: handleMediaNodeRemoval.bind(null, undefined, getNodePos),
86
- icon: /*#__PURE__*/_react.default.createElement(_closeEditorClose.default, {
86
+ icon: /*#__PURE__*/_react.default.createElement(_crossEditorClose.default, {
87
87
  label: intl.formatMessage(_media.nodeViewsMessages.mediaGroupDeleteLabel)
88
88
  })
89
89
  }]
@@ -377,7 +377,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
377
377
  addLayoutDropdownToToolbar();
378
378
  } else {
379
379
  toolbarButtons = [].concat((0, _toConsumableArray2.default)(toolbarButtons), (0, _toConsumableArray2.default)(layoutButtons));
380
- if (layoutButtons.length) {
380
+ if (layoutButtons.length && !isNewEditorToolbarEnabled) {
381
381
  toolbarButtons.push({
382
382
  type: 'separator'
383
383
  });
@@ -437,6 +437,14 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
437
437
  }
438
438
  }
439
439
 
440
+ // A separator is needed regardless switcher is enabled or not
441
+ if ((0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true)) {
442
+ toolbarButtons.push({
443
+ type: 'separator',
444
+ fullHeight: true
445
+ });
446
+ }
447
+
440
448
  // Pixel Entry Toolbar Support
441
449
  var selection = state.selection;
442
450
  var isWithinTable = (0, _utils.hasParentNodeOfType)([state.schema.nodes.table])(selection);
@@ -3,7 +3,7 @@ import { injectIntl } from 'react-intl-next';
3
3
  import { usePreviousState } from '@atlaskit/editor-common/hooks';
4
4
  import { nodeViewsMessages as messages } from '@atlaskit/editor-common/media';
5
5
  import { isNodeSelectedOrInRange, SelectedState, setNodeSelection } from '@atlaskit/editor-common/utils';
6
- import EditorCloseIcon from '@atlaskit/icon/core/migration/close--editor-close';
6
+ import EditorCloseIcon from '@atlaskit/icon/core/migration/cross--editor-close';
7
7
  import { getMediaFeatureFlag } from '@atlaskit/media-common';
8
8
  import { Filmstrip } from '@atlaskit/media-filmstrip';
9
9
  import { fg } from '@atlaskit/platform-feature-flags';
@@ -369,7 +369,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
369
369
  addLayoutDropdownToToolbar();
370
370
  } else {
371
371
  toolbarButtons = [...toolbarButtons, ...layoutButtons];
372
- if (layoutButtons.length) {
372
+ if (layoutButtons.length && !isNewEditorToolbarEnabled) {
373
373
  toolbarButtons.push({
374
374
  type: 'separator'
375
375
  });
@@ -425,6 +425,14 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
425
425
  }
426
426
  }
427
427
 
428
+ // A separator is needed regardless switcher is enabled or not
429
+ if (expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)) {
430
+ toolbarButtons.push({
431
+ type: 'separator',
432
+ fullHeight: true
433
+ });
434
+ }
435
+
428
436
  // Pixel Entry Toolbar Support
429
437
  const {
430
438
  selection
@@ -9,7 +9,7 @@ import { injectIntl } from 'react-intl-next';
9
9
  import { usePreviousState } from '@atlaskit/editor-common/hooks';
10
10
  import { nodeViewsMessages as messages } from '@atlaskit/editor-common/media';
11
11
  import { isNodeSelectedOrInRange, SelectedState, setNodeSelection } from '@atlaskit/editor-common/utils';
12
- import EditorCloseIcon from '@atlaskit/icon/core/migration/close--editor-close';
12
+ import EditorCloseIcon from '@atlaskit/icon/core/migration/cross--editor-close';
13
13
  import { getMediaFeatureFlag } from '@atlaskit/media-common';
14
14
  import { Filmstrip } from '@atlaskit/media-filmstrip';
15
15
  import { fg } from '@atlaskit/platform-feature-flags';
@@ -368,7 +368,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
368
368
  addLayoutDropdownToToolbar();
369
369
  } else {
370
370
  toolbarButtons = [].concat(_toConsumableArray(toolbarButtons), _toConsumableArray(layoutButtons));
371
- if (layoutButtons.length) {
371
+ if (layoutButtons.length && !isNewEditorToolbarEnabled) {
372
372
  toolbarButtons.push({
373
373
  type: 'separator'
374
374
  });
@@ -428,6 +428,14 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
428
428
  }
429
429
  }
430
430
 
431
+ // A separator is needed regardless switcher is enabled or not
432
+ if (expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)) {
433
+ toolbarButtons.push({
434
+ type: 'separator',
435
+ fullHeight: true
436
+ });
437
+ }
438
+
431
439
  // Pixel Entry Toolbar Support
432
440
  var selection = state.selection;
433
441
  var isWithinTable = hasParentNodeOfType([state.schema.nodes.table])(selection);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "5.2.0",
3
+ "version": "5.2.2",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/editor-shared-styles": "^3.5.0",
56
56
  "@atlaskit/editor-tables": "^2.9.0",
57
57
  "@atlaskit/form": "^12.0.0",
58
- "@atlaskit/icon": "^27.5.0",
58
+ "@atlaskit/icon": "^27.6.0",
59
59
  "@atlaskit/icon-lab": "^5.2.0",
60
60
  "@atlaskit/media-card": "^79.4.0",
61
61
  "@atlaskit/media-client": "^35.1.0",
@@ -69,7 +69,7 @@
69
69
  "@atlaskit/primitives": "^14.10.0",
70
70
  "@atlaskit/textfield": "^8.0.0",
71
71
  "@atlaskit/theme": "^19.0.0",
72
- "@atlaskit/tmp-editor-statsig": "^9.9.0",
72
+ "@atlaskit/tmp-editor-statsig": "^9.10.0",
73
73
  "@atlaskit/tokens": "^5.6.0",
74
74
  "@atlaskit/tooltip": "^20.3.0",
75
75
  "@babel/runtime": "^7.0.0",
@@ -84,7 +84,7 @@
84
84
  "typescript": "~5.4.2"
85
85
  },
86
86
  "peerDependencies": {
87
- "@atlaskit/editor-common": "^107.9.0",
87
+ "@atlaskit/editor-common": "^107.12.0",
88
88
  "@atlaskit/media-core": "^37.0.0",
89
89
  "react": "^18.2.0",
90
90
  "react-dom": "^18.2.0",