@atlaskit/editor-plugin-card 6.5.4 → 6.6.1

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.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#165113](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/165113)
8
+ [`867bcb05452bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/867bcb05452bf) -
9
+ Cleaned up platform_editor_controls_patch_analytics and platform_editor_controls_patch_analytics_2
10
+ - Updated dependencies
11
+
12
+ ## 6.6.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#166813](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/166813)
17
+ [`31f2603b81531`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/31f2603b81531) -
18
+ [ux] Adjust optional CompetitorPrompt component type
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 6.5.4
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;
@@ -167,9 +167,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
167
167
  }
168
168
  };
169
169
  var handleDoubleClick = function handleDoubleClick() {
170
- if ((0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics')) {
171
- sendVisitLinkAnalytics(_analytics.INPUT_METHOD.DOUBLE_CLICK);
172
- }
170
+ sendVisitLinkAnalytics(_analytics.INPUT_METHOD.DOUBLE_CLICK);
173
171
 
174
172
  // Double click opens the link in a new tab
175
173
  window.open(url, '_blank');
@@ -204,7 +202,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
204
202
  style: {
205
203
  paddingBlock: editorAppearance === 'comment' && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6') || editorAppearance === 'chromeless' && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_8') ? '1px' : "var(--ds-space-025, 2px)"
206
204
  },
207
- onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics') ? handleClick : undefined
205
+ onClick: handleClick
208
206
  }, (0, _react2.jsx)(_primitives.Box, {
209
207
  xcss: iconWrapperStyles,
210
208
  "data-inlinecard-button-overlay": "icon-wrapper-line-height"
@@ -58,7 +58,7 @@ var removeCard = exports.removeCard = function removeCard(editorAnalyticsApi) {
58
58
  actionSubject: _analytics.ACTION_SUBJECT.SMART_LINK,
59
59
  actionSubjectId: type,
60
60
  attributes: {
61
- inputMethod: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_2') ? _analytics.INPUT_METHOD.FLOATING_TB : _analytics.INPUT_METHOD.TOOLBAR,
61
+ inputMethod: _analytics.INPUT_METHOD.FLOATING_TB,
62
62
  displayMode: type
63
63
  },
64
64
  eventType: _analytics.EVENT_TYPE.TRACK
@@ -323,7 +323,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
323
323
  }, {
324
324
  type: 'separator'
325
325
  }] : [];
326
- var openLinkInputMethod = (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics') ? _analytics.INPUT_METHOD.FLOATING_TB : _analytics.INPUT_METHOD.TOOLBAR;
326
+ var openLinkInputMethod = _analytics.INPUT_METHOD.FLOATING_TB;
327
327
  var editButtonItems = cardOptions.allowDatasource && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_9') ? [{
328
328
  type: 'custom',
329
329
  fallback: [],
@@ -605,7 +605,7 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
605
605
  });
606
606
  }
607
607
  }
608
- var openLinkInputMethod = (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics') ? _analytics.INPUT_METHOD.FLOATING_TB : _analytics.INPUT_METHOD.TOOLBAR;
608
+ var openLinkInputMethod = _analytics.INPUT_METHOD.FLOATING_TB;
609
609
  toolbarItems.push({
610
610
  type: 'custom',
611
611
  fallback: [],
@@ -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;
@@ -148,9 +148,7 @@ const OpenButtonOverlay = ({
148
148
  }
149
149
  };
150
150
  const handleDoubleClick = () => {
151
- if (fg('platform_editor_controls_patch_analytics')) {
152
- sendVisitLinkAnalytics(INPUT_METHOD.DOUBLE_CLICK);
153
- }
151
+ sendVisitLinkAnalytics(INPUT_METHOD.DOUBLE_CLICK);
154
152
 
155
153
  // Double click opens the link in a new tab
156
154
  window.open(url, '_blank');
@@ -181,7 +179,7 @@ const OpenButtonOverlay = ({
181
179
  style: {
182
180
  paddingBlock: editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') || editorAppearance === 'chromeless' && fg('platform_editor_controls_patch_8') ? '1px' : "var(--ds-space-025, 2px)"
183
181
  },
184
- onClick: fg('platform_editor_controls_patch_analytics') ? handleClick : undefined
182
+ onClick: handleClick
185
183
  }, jsx(Box, {
186
184
  xcss: iconWrapperStyles,
187
185
  "data-inlinecard-button-overlay": "icon-wrapper-line-height"
@@ -44,7 +44,7 @@ export const removeCard = editorAnalyticsApi => commandWithMetadata((state, disp
44
44
  actionSubject: ACTION_SUBJECT.SMART_LINK,
45
45
  actionSubjectId: type,
46
46
  attributes: {
47
- inputMethod: fg('platform_editor_controls_patch_analytics_2') ? INPUT_METHOD.FLOATING_TB : INPUT_METHOD.TOOLBAR,
47
+ inputMethod: INPUT_METHOD.FLOATING_TB,
48
48
  displayMode: type
49
49
  },
50
50
  eventType: EVENT_TYPE.TRACK
@@ -318,7 +318,7 @@ const generateToolbarItems = (state, intl, providerFactory, cardOptions, lpLinkP
318
318
  }, {
319
319
  type: 'separator'
320
320
  }] : [];
321
- const openLinkInputMethod = fg('platform_editor_controls_patch_analytics') ? INPUT_METHOD.FLOATING_TB : INPUT_METHOD.TOOLBAR;
321
+ const openLinkInputMethod = INPUT_METHOD.FLOATING_TB;
322
322
  const editButtonItems = cardOptions.allowDatasource && fg('platform_editor_controls_patch_9') ? [{
323
323
  type: 'custom',
324
324
  fallback: [],
@@ -599,7 +599,7 @@ const getDatasourceButtonGroup = (metadata, intl, editorAnalyticsApi, node, hove
599
599
  });
600
600
  }
601
601
  }
602
- const openLinkInputMethod = fg('platform_editor_controls_patch_analytics') ? INPUT_METHOD.FLOATING_TB : INPUT_METHOD.TOOLBAR;
602
+ const openLinkInputMethod = INPUT_METHOD.FLOATING_TB;
603
603
  toolbarItems.push({
604
604
  type: 'custom',
605
605
  fallback: [],
@@ -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;
@@ -154,9 +154,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
154
154
  }
155
155
  };
156
156
  var handleDoubleClick = function handleDoubleClick() {
157
- if (fg('platform_editor_controls_patch_analytics')) {
158
- sendVisitLinkAnalytics(INPUT_METHOD.DOUBLE_CLICK);
159
- }
157
+ sendVisitLinkAnalytics(INPUT_METHOD.DOUBLE_CLICK);
160
158
 
161
159
  // Double click opens the link in a new tab
162
160
  window.open(url, '_blank');
@@ -191,7 +189,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
191
189
  style: {
192
190
  paddingBlock: editorAppearance === 'comment' && fg('platform_editor_controls_patch_6') || editorAppearance === 'chromeless' && fg('platform_editor_controls_patch_8') ? '1px' : "var(--ds-space-025, 2px)"
193
191
  },
194
- onClick: fg('platform_editor_controls_patch_analytics') ? handleClick : undefined
192
+ onClick: handleClick
195
193
  }, jsx(Box, {
196
194
  xcss: iconWrapperStyles,
197
195
  "data-inlinecard-button-overlay": "icon-wrapper-line-height"
@@ -49,7 +49,7 @@ export var removeCard = function removeCard(editorAnalyticsApi) {
49
49
  actionSubject: ACTION_SUBJECT.SMART_LINK,
50
50
  actionSubjectId: type,
51
51
  attributes: {
52
- inputMethod: fg('platform_editor_controls_patch_analytics_2') ? INPUT_METHOD.FLOATING_TB : INPUT_METHOD.TOOLBAR,
52
+ inputMethod: INPUT_METHOD.FLOATING_TB,
53
53
  displayMode: type
54
54
  },
55
55
  eventType: EVENT_TYPE.TRACK
@@ -314,7 +314,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
314
314
  }, {
315
315
  type: 'separator'
316
316
  }] : [];
317
- var openLinkInputMethod = fg('platform_editor_controls_patch_analytics') ? INPUT_METHOD.FLOATING_TB : INPUT_METHOD.TOOLBAR;
317
+ var openLinkInputMethod = INPUT_METHOD.FLOATING_TB;
318
318
  var editButtonItems = cardOptions.allowDatasource && fg('platform_editor_controls_patch_9') ? [{
319
319
  type: 'custom',
320
320
  fallback: [],
@@ -596,7 +596,7 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
596
596
  });
597
597
  }
598
598
  }
599
- var openLinkInputMethod = fg('platform_editor_controls_patch_analytics') ? INPUT_METHOD.FLOATING_TB : INPUT_METHOD.TOOLBAR;
599
+ var openLinkInputMethod = INPUT_METHOD.FLOATING_TB;
600
600
  toolbarItems.push({
601
601
  type: 'custom',
602
602
  fallback: [],
@@ -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.4",
3
+ "version": "6.6.1",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -63,8 +63,8 @@
63
63
  "@atlaskit/primitives": "^14.8.0",
64
64
  "@atlaskit/smart-card": "^38.8.0",
65
65
  "@atlaskit/theme": "^18.0.0",
66
- "@atlaskit/tmp-editor-statsig": "^5.13.0",
67
- "@atlaskit/tokens": "^5.0.0",
66
+ "@atlaskit/tmp-editor-statsig": "^5.14.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",
@@ -141,12 +141,6 @@
141
141
  "platform_editor_controls_patch_9": {
142
142
  "type": "boolean"
143
143
  },
144
- "platform_editor_controls_patch_analytics": {
145
- "type": "boolean"
146
- },
147
- "platform_editor_controls_patch_analytics_2": {
148
- "type": "boolean"
149
- },
150
144
  "smart_link_editor_update_toolbar_open_link": {
151
145
  "type": "boolean"
152
146
  },