@atlaskit/editor-plugin-card 6.5.3 → 6.6.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,26 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 6.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#166813](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/166813)
8
+ [`31f2603b81531`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/31f2603b81531) -
9
+ [ux] Adjust optional CompetitorPrompt component type
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 6.5.4
16
+
17
+ ### Patch Changes
18
+
19
+ - [#166381](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/166381)
20
+ [`e7b0081a1b221`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e7b0081a1b221) -
21
+ EDM-12154 cleaning up hardcoded embed only on new line feature flag
22
+ - Updated dependencies
23
+
3
24
  ## 6.5.3
4
25
 
5
26
  ### Patch Changes
@@ -201,7 +201,8 @@ function InlineCardNodeView(props) {
201
201
  var floatingToolbarNode = selection instanceof _state.NodeSelection && selection.node;
202
202
  var url = node.attrs.url;
203
203
  var CompetitorPromptComponent = CompetitorPrompt && url ? /*#__PURE__*/_react.default.createElement(CompetitorPrompt, {
204
- sourceUrl: url
204
+ sourceUrl: url,
205
+ linkType: "inline"
205
206
  }) : null;
206
207
  if (__livePage && (0, _platformFeatureFlags.fg)('linking_platform_smart_links_in_live_pages')) {
207
208
  var showHoverPreview = floatingToolbarNode !== node;
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.resolveWithProvider = exports.handleProvider = void 0;
7
7
  var _utils = require("@atlaskit/editor-common/utils");
8
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
8
  var _actions = require("../actions");
10
9
  var _doc = require("../doc");
11
10
  var isFreshlyPastedOnNewLine = function isFreshlyPastedOnNewLine(view) {
@@ -35,7 +34,7 @@ var isFreshlyPastedOnNewLine = function isFreshlyPastedOnNewLine(view) {
35
34
  // Used for all interactions with the EditorCardProvider.
36
35
  // ============================================================================ //
37
36
  var resolveWithProvider = exports.resolveWithProvider = function resolveWithProvider(view, provider, request, options, editorAnalyticsApi, createAnalyticsEvent) {
38
- var isEmbedFriendlyLocation = (0, _platformFeatureFlags.fg)('hardcoded-embeds-only-on-new-line') ? isFreshlyPastedOnNewLine(view) : true;
37
+ var isEmbedFriendlyLocation = isFreshlyPastedOnNewLine(view);
39
38
 
40
39
  // When user manually changes appearance from blue link to smart link, we should respect that,
41
40
  var shouldForceAppearance =
@@ -197,7 +197,8 @@ export function InlineCardNodeView(props) {
197
197
  const floatingToolbarNode = selection instanceof NodeSelection && selection.node;
198
198
  const url = node.attrs.url;
199
199
  const CompetitorPromptComponent = CompetitorPrompt && url ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
200
- sourceUrl: url
200
+ sourceUrl: url,
201
+ linkType: "inline"
201
202
  }) : null;
202
203
  if (__livePage && fg('linking_platform_smart_links_in_live_pages')) {
203
204
  const showHoverPreview = floatingToolbarNode !== node;
@@ -1,5 +1,4 @@
1
1
  import { canRenderDatasource, hasDocAsParent } from '@atlaskit/editor-common/utils';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import { setProvider } from '../actions';
4
3
  import { handleFallbackWithAnalytics, replaceQueuedUrlWithCard } from '../doc';
5
4
  const isFreshlyPastedOnNewLine = view => {
@@ -32,7 +31,7 @@ const isFreshlyPastedOnNewLine = view => {
32
31
  // Used for all interactions with the EditorCardProvider.
33
32
  // ============================================================================ //
34
33
  export const resolveWithProvider = (view, provider, request, options, editorAnalyticsApi, createAnalyticsEvent) => {
35
- const isEmbedFriendlyLocation = fg('hardcoded-embeds-only-on-new-line') ? isFreshlyPastedOnNewLine(view) : true;
34
+ const isEmbedFriendlyLocation = isFreshlyPastedOnNewLine(view);
36
35
 
37
36
  // When user manually changes appearance from blue link to smart link, we should respect that,
38
37
  const shouldForceAppearance =
@@ -190,7 +190,8 @@ export function InlineCardNodeView(props) {
190
190
  var floatingToolbarNode = selection instanceof NodeSelection && selection.node;
191
191
  var url = node.attrs.url;
192
192
  var CompetitorPromptComponent = CompetitorPrompt && url ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
193
- sourceUrl: url
193
+ sourceUrl: url,
194
+ linkType: "inline"
194
195
  }) : null;
195
196
  if (__livePage && fg('linking_platform_smart_links_in_live_pages')) {
196
197
  var showHoverPreview = floatingToolbarNode !== node;
@@ -1,5 +1,4 @@
1
1
  import { canRenderDatasource, hasDocAsParent } from '@atlaskit/editor-common/utils';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import { setProvider } from '../actions';
4
3
  import { handleFallbackWithAnalytics, replaceQueuedUrlWithCard } from '../doc';
5
4
  var isFreshlyPastedOnNewLine = function isFreshlyPastedOnNewLine(view) {
@@ -29,7 +28,7 @@ var isFreshlyPastedOnNewLine = function isFreshlyPastedOnNewLine(view) {
29
28
  // Used for all interactions with the EditorCardProvider.
30
29
  // ============================================================================ //
31
30
  export var resolveWithProvider = function resolveWithProvider(view, provider, request, options, editorAnalyticsApi, createAnalyticsEvent) {
32
- var isEmbedFriendlyLocation = fg('hardcoded-embeds-only-on-new-line') ? isFreshlyPastedOnNewLine(view) : true;
31
+ var isEmbedFriendlyLocation = isFreshlyPastedOnNewLine(view);
33
32
 
34
33
  // When user manually changes appearance from blue link to smart link, we should respect that,
35
34
  var shouldForceAppearance =
@@ -48,6 +48,7 @@ export interface SmartCardProps extends CardProps {
48
48
  isPageSSRed?: boolean;
49
49
  CompetitorPrompt?: React.ComponentType<{
50
50
  sourceUrl: string;
51
+ linkType?: string;
51
52
  }>;
52
53
  }
53
54
  /**
@@ -111,6 +111,7 @@ export type CardPluginOptions = CardOptions & {
111
111
  isPageSSRed?: boolean;
112
112
  CompetitorPrompt?: React.ComponentType<{
113
113
  sourceUrl: string;
114
+ linkType?: string;
114
115
  }>;
115
116
  };
116
117
  export type SetProvider = {
@@ -48,6 +48,7 @@ export interface SmartCardProps extends CardProps {
48
48
  isPageSSRed?: boolean;
49
49
  CompetitorPrompt?: React.ComponentType<{
50
50
  sourceUrl: string;
51
+ linkType?: string;
51
52
  }>;
52
53
  }
53
54
  /**
@@ -111,6 +111,7 @@ export type CardPluginOptions = CardOptions & {
111
111
  isPageSSRed?: boolean;
112
112
  CompetitorPrompt?: React.ComponentType<{
113
113
  sourceUrl: string;
114
+ linkType?: string;
114
115
  }>;
115
116
  };
116
117
  export type SetProvider = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "6.5.3",
3
+ "version": "6.6.0",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -61,10 +61,10 @@
61
61
  "@atlaskit/menu": "^8.0.0",
62
62
  "@atlaskit/platform-feature-flags": "^1.1.0",
63
63
  "@atlaskit/primitives": "^14.8.0",
64
- "@atlaskit/smart-card": "^38.7.0",
64
+ "@atlaskit/smart-card": "^38.8.0",
65
65
  "@atlaskit/theme": "^18.0.0",
66
66
  "@atlaskit/tmp-editor-statsig": "^5.13.0",
67
- "@atlaskit/tokens": "^5.0.0",
67
+ "@atlaskit/tokens": "^5.1.0",
68
68
  "@babel/runtime": "^7.0.0",
69
69
  "@emotion/react": "^11.7.1",
70
70
  "lodash": "^4.17.21",
@@ -117,9 +117,6 @@
117
117
  "editor_inline_comments_paste_insert_nodes": {
118
118
  "type": "boolean"
119
119
  },
120
- "hardcoded-embeds-only-on-new-line": {
121
- "type": "boolean"
122
- },
123
120
  "linking_platform_smart_links_in_live_pages": {
124
121
  "type": "boolean"
125
122
  },