@atlaskit/editor-plugin-card 5.4.16 → 5.4.17

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,14 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 5.4.17
4
+
5
+ ### Patch Changes
6
+
7
+ - [#144829](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144829)
8
+ [`14b488c2295de`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/14b488c2295de) -
9
+ [ux] ED27537 Update alignment dropdown in media and embed card floating toolbar
10
+ - Updated dependencies
11
+
3
12
  ## 5.4.16
4
13
 
5
14
  ### Patch Changes
@@ -31,6 +31,7 @@ var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove
31
31
  var _settings2 = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/settings"));
32
32
  var _unlink = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/unlink"));
33
33
  var _shortcut = _interopRequireDefault(require("@atlaskit/icon/glyph/shortcut"));
34
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
34
35
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
35
36
  var _doc = require("../pm-plugins/doc");
36
37
  var _pluginKey = require("../pm-plugins/plugin-key");
@@ -174,6 +175,9 @@ var unlinkCard = function unlinkCard(node, state, editorAnalyticsApi) {
174
175
  };
175
176
  };
176
177
  var buildAlignmentOptions = function buildAlignmentOptions(state, intl, widthPluginDependencyApi, analyticsApi, cardOptions) {
178
+ if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6')) {
179
+ return (0, _card.buildLayoutDropdown)(state, intl, state.schema.nodes.embedCard, widthPluginDependencyApi, analyticsApi, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
180
+ }
177
181
  return (0, _card.buildLayoutButtons)(state, intl, state.schema.nodes.embedCard, widthPluginDependencyApi, analyticsApi, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
178
182
  };
179
183
  var withToolbarMetadata = function withToolbarMetadata(command) {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { isSafeUrl } from '@atlaskit/adf-schema';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID as ACTION_SUBJECTID, buildOpenedSettingsPayload, buildVisitedLinkPayload, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
- import { buildLayoutButtons, commandWithMetadata } from '@atlaskit/editor-common/card';
4
+ import { buildLayoutButtons, buildLayoutDropdown, commandWithMetadata } from '@atlaskit/editor-common/card';
5
5
  import { getLinkPreferencesURLFromENV } from '@atlaskit/editor-common/link';
6
6
  import commonMessages, { annotationMessages, linkMessages, linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-common/messages';
7
7
  import { FLOATING_TOOLBAR_LINKPICKER_CLASSNAME, richMediaClassName } from '@atlaskit/editor-common/styles';
@@ -21,6 +21,7 @@ import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
21
21
  import CogIcon from '@atlaskit/icon/glyph/editor/settings';
22
22
  import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
23
23
  import OpenIcon from '@atlaskit/icon/glyph/shortcut';
24
+ import { fg } from '@atlaskit/platform-feature-flags';
24
25
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
25
26
  import { changeSelectedCardToText } from '../pm-plugins/doc';
26
27
  import { pluginKey } from '../pm-plugins/plugin-key';
@@ -167,6 +168,9 @@ const unlinkCard = (node, state, editorAnalyticsApi) => {
167
168
  return () => false;
168
169
  };
169
170
  const buildAlignmentOptions = (state, intl, widthPluginDependencyApi, analyticsApi, cardOptions) => {
171
+ if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_6')) {
172
+ return buildLayoutDropdown(state, intl, state.schema.nodes.embedCard, widthPluginDependencyApi, analyticsApi, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
173
+ }
170
174
  return buildLayoutButtons(state, intl, state.schema.nodes.embedCard, widthPluginDependencyApi, analyticsApi, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
171
175
  };
172
176
  const withToolbarMetadata = command => commandWithMetadata(command, {
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import React from 'react';
6
6
  import { isSafeUrl } from '@atlaskit/adf-schema';
7
7
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID as ACTION_SUBJECTID, buildOpenedSettingsPayload, buildVisitedLinkPayload, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
8
- import { buildLayoutButtons, commandWithMetadata } from '@atlaskit/editor-common/card';
8
+ import { buildLayoutButtons, buildLayoutDropdown, commandWithMetadata } from '@atlaskit/editor-common/card';
9
9
  import { getLinkPreferencesURLFromENV } from '@atlaskit/editor-common/link';
10
10
  import commonMessages, { annotationMessages, linkMessages, linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-common/messages';
11
11
  import { FLOATING_TOOLBAR_LINKPICKER_CLASSNAME, richMediaClassName } from '@atlaskit/editor-common/styles';
@@ -25,6 +25,7 @@ import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
25
25
  import CogIcon from '@atlaskit/icon/glyph/editor/settings';
26
26
  import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
27
27
  import OpenIcon from '@atlaskit/icon/glyph/shortcut';
28
+ import { fg } from '@atlaskit/platform-feature-flags';
28
29
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
29
30
  import { changeSelectedCardToText } from '../pm-plugins/doc';
30
31
  import { pluginKey } from '../pm-plugins/plugin-key';
@@ -164,6 +165,9 @@ var unlinkCard = function unlinkCard(node, state, editorAnalyticsApi) {
164
165
  };
165
166
  };
166
167
  var buildAlignmentOptions = function buildAlignmentOptions(state, intl, widthPluginDependencyApi, analyticsApi, cardOptions) {
168
+ if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_6')) {
169
+ return buildLayoutDropdown(state, intl, state.schema.nodes.embedCard, widthPluginDependencyApi, analyticsApi, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
170
+ }
167
171
  return buildLayoutButtons(state, intl, state.schema.nodes.embedCard, widthPluginDependencyApi, analyticsApi, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
168
172
  };
169
173
  var withToolbarMetadata = function withToolbarMetadata(command) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "5.4.16",
3
+ "version": "5.4.17",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,7 +37,7 @@
37
37
  "@atlaskit/analytics-next": "^11.0.0",
38
38
  "@atlaskit/button": "^23.0.0",
39
39
  "@atlaskit/custom-steps": "^0.11.0",
40
- "@atlaskit/editor-common": "^103.12.0",
40
+ "@atlaskit/editor-common": "^103.13.0",
41
41
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
42
42
  "@atlaskit/editor-plugin-base": "^2.3.0",
43
43
  "@atlaskit/editor-plugin-connectivity": "^2.0.0",
@@ -62,7 +62,7 @@
62
62
  "@atlaskit/primitives": "^14.4.0",
63
63
  "@atlaskit/smart-card": "^36.8.0",
64
64
  "@atlaskit/theme": "^18.0.0",
65
- "@atlaskit/tmp-editor-statsig": "^4.12.0",
65
+ "@atlaskit/tmp-editor-statsig": "^4.13.0",
66
66
  "@atlaskit/tokens": "^4.8.0",
67
67
  "@babel/runtime": "^7.0.0",
68
68
  "@emotion/react": "^11.7.1",