@atlaskit/editor-plugin-card 17.3.2 → 17.4.0

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-card
2
2
 
3
+ ## 17.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`ebd3c5d7d340a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ebd3c5d7d340a) -
8
+ Gate single-link paste display menu behind confluence_editor_paste_3p_link_actions_menu feature
9
+ flag
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 17.3.3
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 17.3.2
4
22
 
5
23
  ### Patch Changes
@@ -26,6 +26,7 @@ var _smartLinkEmbed = _interopRequireDefault(require("@atlaskit/icon/core/smart-
26
26
  var _smartLinkInline = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-inline"));
27
27
  var _linkProvider = require("@atlaskit/link-provider");
28
28
  var _compiled = require("@atlaskit/primitives/compiled");
29
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
29
30
  var _doc = require("../pm-plugins/doc");
30
31
  var _currentPastedSmartLink = require("./currentPastedSmartLink");
31
32
  var _pasteDisplayAsUtils = require("./pasteDisplayAsUtils");
@@ -344,6 +345,9 @@ var getPasteDisplayAsMenuComponents = exports.getPasteDisplayAsMenuComponents =
344
345
  }],
345
346
  isHidden: function isHidden() {
346
347
  var _apiWithPasteOptionsT, _apiWithPasteOptionsT2;
348
+ if (!(0, _expValEquals.expValEquals)('confluence_editor_paste_3p_link_actions_menu', 'isEnabled', true)) {
349
+ return true;
350
+ }
347
351
  var apiWithPasteOptionsToolbar = api;
348
352
  var pasteRange = apiWithPasteOptionsToolbar === null || apiWithPasteOptionsToolbar === void 0 || (_apiWithPasteOptionsT = apiWithPasteOptionsToolbar.pasteOptionsToolbarPlugin) === null || _apiWithPasteOptionsT === void 0 ? void 0 : _apiWithPasteOptionsT.sharedState.currentState();
349
353
  var editorView = getEditorView();
@@ -18,6 +18,7 @@ import SmartLinkEmbedIcon from '@atlaskit/icon/core/smart-link-embed';
18
18
  import SmartLinkInlineIcon from '@atlaskit/icon/core/smart-link-inline';
19
19
  import { useSmartCardContext } from '@atlaskit/link-provider';
20
20
  import { Box, Flex, Pressable } from '@atlaskit/primitives/compiled';
21
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
21
22
  import { changeSelectedCardToLink, setSelectedCardAppearance } from '../pm-plugins/doc';
22
23
  import { getSingleSmartLinkUrlFromSlice } from './currentPastedSmartLink';
23
24
  import { getCardAtPasteRange } from './pasteDisplayAsUtils';
@@ -345,6 +346,9 @@ export const getPasteDisplayAsMenuComponents = ({
345
346
  }],
346
347
  isHidden: () => {
347
348
  var _apiWithPasteOptionsT, _apiWithPasteOptionsT2;
349
+ if (!expValEquals('confluence_editor_paste_3p_link_actions_menu', 'isEnabled', true)) {
350
+ return true;
351
+ }
348
352
  const apiWithPasteOptionsToolbar = api;
349
353
  const pasteRange = apiWithPasteOptionsToolbar === null || apiWithPasteOptionsToolbar === void 0 ? void 0 : (_apiWithPasteOptionsT = apiWithPasteOptionsToolbar.pasteOptionsToolbarPlugin) === null || _apiWithPasteOptionsT === void 0 ? void 0 : _apiWithPasteOptionsT.sharedState.currentState();
350
354
  const editorView = getEditorView();
@@ -18,6 +18,7 @@ import SmartLinkEmbedIcon from '@atlaskit/icon/core/smart-link-embed';
18
18
  import SmartLinkInlineIcon from '@atlaskit/icon/core/smart-link-inline';
19
19
  import { useSmartCardContext } from '@atlaskit/link-provider';
20
20
  import { Box, Flex, Pressable } from '@atlaskit/primitives/compiled';
21
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
21
22
  import { changeSelectedCardToLink, setSelectedCardAppearance } from '../pm-plugins/doc';
22
23
  import { getSingleSmartLinkUrlFromSlice } from './currentPastedSmartLink';
23
24
  import { getCardAtPasteRange } from './pasteDisplayAsUtils';
@@ -335,6 +336,9 @@ export var getPasteDisplayAsMenuComponents = function getPasteDisplayAsMenuCompo
335
336
  }],
336
337
  isHidden: function isHidden() {
337
338
  var _apiWithPasteOptionsT, _apiWithPasteOptionsT2;
339
+ if (!expValEquals('confluence_editor_paste_3p_link_actions_menu', 'isEnabled', true)) {
340
+ return true;
341
+ }
338
342
  var apiWithPasteOptionsToolbar = api;
339
343
  var pasteRange = apiWithPasteOptionsToolbar === null || apiWithPasteOptionsToolbar === void 0 || (_apiWithPasteOptionsT = apiWithPasteOptionsToolbar.pasteOptionsToolbarPlugin) === null || _apiWithPasteOptionsT === void 0 ? void 0 : _apiWithPasteOptionsT.sharedState.currentState();
340
344
  var editorView = getEditorView();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "17.3.2",
3
+ "version": "17.4.0",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -66,7 +66,7 @@
66
66
  "@atlaskit/primitives": "^19.0.0",
67
67
  "@atlaskit/prosemirror-history": "^0.2.0",
68
68
  "@atlaskit/smart-card": "^44.24.0",
69
- "@atlaskit/tmp-editor-statsig": "^91.0.0",
69
+ "@atlaskit/tmp-editor-statsig": "^93.0.0",
70
70
  "@atlaskit/tokens": "^13.3.0",
71
71
  "@babel/runtime": "^7.0.0",
72
72
  "@emotion/react": "^11.7.1",
@@ -115,6 +115,9 @@
115
115
  }
116
116
  },
117
117
  "platform-feature-flags": {
118
+ "confluence_editor_paste_3p_link_actions_menu": {
119
+ "type": "boolean"
120
+ },
118
121
  "platform_native_embeds_rollout_non_maui_experience": {
119
122
  "type": "boolean"
120
123
  },