@atlaskit/editor-plugin-media 5.2.1 → 5.2.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,24 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 5.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#190588](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/190588)
8
+ [`b22e308cfd320`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b22e308cfd320) -
9
+ Replace experiment key platform_editor_useSharedPluginStateSelector with
10
+ platform_editor_useSharedPluginStateWithSelector
11
+ - Updated dependencies
12
+
13
+ ## 5.2.2
14
+
15
+ ### Patch Changes
16
+
17
+ - [#189903](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/189903)
18
+ [`f5ccd32e607db`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f5ccd32e607db) -
19
+ [ED-28567] Add/remove missing/extra separators in media, table and panel toolbars shown in Jira
20
+ - Updated dependencies
21
+
3
22
  ## 5.2.1
4
23
 
5
24
  ### Patch Changes
@@ -57,7 +57,7 @@ var MediaNodeWithProviders = function MediaNodeWithProviders(_ref) {
57
57
  var interactionState = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'interaction.interactionState');
58
58
  return innerComponent({
59
59
  width: widthState,
60
- // Remove when platform_editor_usesharedpluginstateselector is cleaned up
60
+ // Remove when platform_editor_usesharedpluginstatewithselector is cleaned up
61
61
  mediaProvider: mediaProvider ? Promise.resolve(mediaProvider) : undefined,
62
62
  interactionState: interactionState
63
63
  });
@@ -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);
@@ -41,7 +41,7 @@ const MediaNodeWithProviders = ({
41
41
  const interactionState = useSharedPluginStateSelector(pluginInjectionApi, 'interaction.interactionState');
42
42
  return innerComponent({
43
43
  width: widthState,
44
- // Remove when platform_editor_usesharedpluginstateselector is cleaned up
44
+ // Remove when platform_editor_usesharedpluginstatewithselector is cleaned up
45
45
  mediaProvider: mediaProvider ? Promise.resolve(mediaProvider) : undefined,
46
46
  interactionState
47
47
  });
@@ -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
@@ -51,7 +51,7 @@ var MediaNodeWithProviders = function MediaNodeWithProviders(_ref) {
51
51
  var interactionState = useSharedPluginStateSelector(pluginInjectionApi, 'interaction.interactionState');
52
52
  return innerComponent({
53
53
  width: widthState,
54
- // Remove when platform_editor_usesharedpluginstateselector is cleaned up
54
+ // Remove when platform_editor_usesharedpluginstatewithselector is cleaned up
55
55
  mediaProvider: mediaProvider ? Promise.resolve(mediaProvider) : undefined,
56
56
  interactionState: interactionState
57
57
  });
@@ -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.1",
3
+ "version": "5.2.3",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -55,10 +55,10 @@
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.7.0",
59
59
  "@atlaskit/icon-lab": "^5.2.0",
60
60
  "@atlaskit/media-card": "^79.4.0",
61
- "@atlaskit/media-client": "^35.1.0",
61
+ "@atlaskit/media-client": "^35.2.0",
62
62
  "@atlaskit/media-client-react": "^4.1.0",
63
63
  "@atlaskit/media-common": "^12.3.0",
64
64
  "@atlaskit/media-filmstrip": "^51.0.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.14.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",