@atlaskit/smart-card 45.17.1 → 45.17.2

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/smart-card
2
2
 
3
+ ## 45.17.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0b157907f6684`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0b157907f6684) -
8
+ Remove xpc url wrapper from context menu click from platform_smartlink_xpc_url_wrapping and apply
9
+ new fg platform_smartlink_xpc_url_wrapping_context_menu
10
+ - Updated dependencies
11
+
3
12
  ## 45.17.1
4
13
 
5
14
  ### Patch Changes
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card" || '',
14
- packageVersion: "45.17.0" || ''
14
+ packageVersion: "45.17.1" || ''
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -268,8 +268,10 @@ function Component(_ref) {
268
268
  // Scope is limited to 3P click analytics.
269
269
  var handleFrameContextMenu = (0, _react.useCallback)(function (event) {
270
270
  if ((0, _platformFeatureFlags.fg)('platform_smartlink_xpc_url_wrapping')) {
271
- var destinationUrl = getDestinationUrl();
272
- (0, _clickHelpers.updateAnchorHref)(event, destinationUrl);
271
+ if ((0, _platformFeatureFlags.fg)('platform_smartlink_xpc_url_wrapping_context_menu')) {
272
+ var destinationUrl = getDestinationUrl();
273
+ (0, _clickHelpers.updateAnchorHref)(event, destinationUrl);
274
+ }
273
275
  }
274
276
  if (shouldFire3PClickEvent) {
275
277
  fire3PClickEvent === null || fire3PClickEvent === void 0 || fire3PClickEvent({
@@ -196,10 +196,11 @@ var HoverCardContent = function HoverCardContent(_ref4) {
196
196
  appearance: _constants.CardDisplay.HoverCardPreview,
197
197
  cardState: cardState,
198
198
  onClick: onClick
199
- }, (0, _platformFeatureFlags.fg)('platform_smartlink_xpc_url_wrapping') ? {
200
- onAuxClick: onAuxClick,
199
+ }, (0, _platformFeatureFlags.fg)('platform_smartlink_xpc_url_wrapping') ? _objectSpread({
200
+ onAuxClick: onAuxClick
201
+ }, (0, _platformFeatureFlags.fg)('platform_smartlink_xpc_url_wrapping_context_menu') ? {
201
202
  onContextMenu: onContextMenu
202
- } : undefined), {}, {
203
+ } : undefined) : undefined), {}, {
203
204
  onResolve: onResolve,
204
205
  origin: 'smartLinkPreviewHoverCard',
205
206
  renderers: renderers,
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
19
19
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
20
20
  var PACKAGE_DATA = {
21
21
  packageName: "@atlaskit/smart-card",
22
- packageVersion: "45.17.0",
22
+ packageVersion: "45.17.1",
23
23
  componentName: 'linkUrl'
24
24
  };
25
25
  var LinkUrl = function LinkUrl(_ref) {
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card" || '',
5
- packageVersion: "45.17.0" || ''
5
+ packageVersion: "45.17.1" || ''
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -259,8 +259,10 @@ function Component({
259
259
  // Scope is limited to 3P click analytics.
260
260
  const handleFrameContextMenu = useCallback(event => {
261
261
  if (fg('platform_smartlink_xpc_url_wrapping')) {
262
- const destinationUrl = getDestinationUrl();
263
- updateAnchorHref(event, destinationUrl);
262
+ if (fg('platform_smartlink_xpc_url_wrapping_context_menu')) {
263
+ const destinationUrl = getDestinationUrl();
264
+ updateAnchorHref(event, destinationUrl);
265
+ }
264
266
  }
265
267
  if (shouldFire3PClickEvent) {
266
268
  fire3PClickEvent === null || fire3PClickEvent === void 0 ? void 0 : fire3PClickEvent({
@@ -191,7 +191,9 @@ const HoverCardContent = ({
191
191
  onClick: onClick,
192
192
  ...(fg('platform_smartlink_xpc_url_wrapping') ? {
193
193
  onAuxClick,
194
- onContextMenu
194
+ ...(fg('platform_smartlink_xpc_url_wrapping_context_menu') ? {
195
+ onContextMenu
196
+ } : undefined)
195
197
  } : undefined),
196
198
  onResolve: onResolve,
197
199
  origin: 'smartLinkPreviewHoverCard',
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
9
9
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
10
10
  const PACKAGE_DATA = {
11
11
  packageName: "@atlaskit/smart-card",
12
- packageVersion: "45.17.0",
12
+ packageVersion: "45.17.1",
13
13
  componentName: 'linkUrl'
14
14
  };
15
15
  const LinkUrl = ({
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card" || '',
7
- packageVersion: "45.17.0" || ''
7
+ packageVersion: "45.17.1" || ''
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -259,8 +259,10 @@ function Component(_ref) {
259
259
  // Scope is limited to 3P click analytics.
260
260
  var handleFrameContextMenu = useCallback(function (event) {
261
261
  if (fg('platform_smartlink_xpc_url_wrapping')) {
262
- var destinationUrl = getDestinationUrl();
263
- updateAnchorHref(event, destinationUrl);
262
+ if (fg('platform_smartlink_xpc_url_wrapping_context_menu')) {
263
+ var destinationUrl = getDestinationUrl();
264
+ updateAnchorHref(event, destinationUrl);
265
+ }
264
266
  }
265
267
  if (shouldFire3PClickEvent) {
266
268
  fire3PClickEvent === null || fire3PClickEvent === void 0 || fire3PClickEvent({
@@ -187,10 +187,11 @@ var HoverCardContent = function HoverCardContent(_ref4) {
187
187
  appearance: CardDisplay.HoverCardPreview,
188
188
  cardState: cardState,
189
189
  onClick: onClick
190
- }, fg('platform_smartlink_xpc_url_wrapping') ? {
191
- onAuxClick: onAuxClick,
190
+ }, fg('platform_smartlink_xpc_url_wrapping') ? _objectSpread({
191
+ onAuxClick: onAuxClick
192
+ }, fg('platform_smartlink_xpc_url_wrapping_context_menu') ? {
192
193
  onContextMenu: onContextMenu
193
- } : undefined), {}, {
194
+ } : undefined) : undefined), {}, {
194
195
  onResolve: onResolve,
195
196
  origin: 'smartLinkPreviewHoverCard',
196
197
  renderers: renderers,
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  var PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "45.17.0",
15
+ packageVersion: "45.17.1",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var LinkUrl = function LinkUrl(_ref) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "45.17.1",
3
+ "version": "45.17.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -54,9 +54,9 @@
54
54
  "@atlaskit/form": "^16.1.0",
55
55
  "@atlaskit/frontend-utilities": "^4.1.0",
56
56
  "@atlaskit/heading": "^7.0.0",
57
- "@atlaskit/icon": "^37.2.0",
57
+ "@atlaskit/icon": "^37.3.0",
58
58
  "@atlaskit/icon-file-type": "^8.1.0",
59
- "@atlaskit/icon-lab": "^7.4.0",
59
+ "@atlaskit/icon-lab": "^7.5.0",
60
60
  "@atlaskit/image": "^5.0.0",
61
61
  "@atlaskit/json-ld-types": "^2.0.0",
62
62
  "@atlaskit/link": "^5.0.0",
@@ -201,6 +201,9 @@
201
201
  "platform_smartlink_xpc_url_wrapping": {
202
202
  "type": "boolean"
203
203
  },
204
+ "platform_smartlink_xpc_url_wrapping_context_menu": {
205
+ "type": "boolean"
206
+ },
204
207
  "rovogrowth-635-pre-auth-cta-preview-fg": {
205
208
  "type": "boolean"
206
209
  },