@atlaskit/smart-card 46.11.2 → 46.12.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,32 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 46.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`c25a07d9c8207`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c25a07d9c8207) -
8
+ Update i18n NPM package versions for linking-platform,smart-experiences (Group 15)
9
+
10
+ ## 46.11.4
11
+
12
+ ### Patch Changes
13
+
14
+ - [`4fd933d5f3eec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4fd933d5f3eec) -
15
+ Enable Cmd/Ctrl-click, middle-click, and double-click on embed frame chrome and headers behind
16
+ platform_editor_embed_open_in_new_tab. Extend the title link to the frame edges for native context
17
+ menus and show a pointer cursor, while preserving embedded content and header controls.
18
+
19
+ Preserve the embed header pointer cursor when editor Live Pages styles reset nested link cursors.
20
+ Apply the legacy embed cursor reset only when the navigation experiment is disabled.
21
+
22
+ - Updated dependencies
23
+
24
+ ## 46.11.3
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies
29
+
3
30
  ## 46.11.2
4
31
 
5
32
  ### Patch Changes
@@ -25,7 +25,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
25
25
  var context = exports.context = {
26
26
  componentName: 'smart-cards',
27
27
  packageName: "@atlaskit/smart-card" || '',
28
- packageVersion: "46.11.1" || ''
28
+ packageVersion: "46.11.4" || ''
29
29
  };
30
30
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
31
31
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -11,6 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
11
11
  var _useAnalyticsEvents2 = require("@atlaskit/analytics-next/useAnalyticsEvents");
12
12
  var _extractSmartLinkEmbed = require("@atlaskit/link-extractors/extract-smart-link-embed");
13
13
  var _useSmartLinkContext2 = require("@atlaskit/link-provider/use-smart-link-context");
14
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
14
15
  var _fg = require("@atlaskit/platform-feature-flags/fg");
15
16
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
17
  var _useAnalyticsEvents3 = require("../../common/analytics/generated/use-analytics-events");
@@ -90,6 +91,7 @@ function Component(_ref) {
90
91
  var isFlexibleUi = (0, _react.useMemo)(function () {
91
92
  return (0, _isFlexibleUiCard.isFlexibleUiCard)(children, ui);
92
93
  }, [children, ui]);
94
+ var isEmbedOpenInNewTabEnabled = appearance === _constants.CardDisplay.Embed && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_embed_open_in_new_tab');
93
95
 
94
96
  // Get state, actions for this card.
95
97
  // appearance is pre-resolved by the caller (loader.tsx for Card, ssr.tsx for CardSSR):
@@ -141,6 +143,15 @@ function Component(_ref) {
141
143
  // Setup UI handlers.
142
144
  var handleClickWrapper = (0, _react.useCallback)(function (event) {
143
145
  var _resolveNavigation$ur;
146
+ var isEmbedDoubleClick = isEmbedOpenInNewTabEnabled && event.type === 'dblclick' && event.button === 0 && event.detail === 2 && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey;
147
+
148
+ // The title link's preceding clicks already navigate without a consumer callback.
149
+ if (isEmbedDoubleClick && !onClick) {
150
+ var clickedAnchor = event.target instanceof Element ? event.target.closest('a') : null;
151
+ if (clickedAnchor && event.currentTarget.contains(clickedAnchor)) {
152
+ return;
153
+ }
154
+ }
144
155
  var isModifierKeyPressed = (0, _isSpecialKey.isSpecialKey)(event) || (0, _isSpecialClick.isSpecialClick)(event);
145
156
  fireEvent('ui.smartLink.clicked', {
146
157
  id: id,
@@ -192,7 +203,17 @@ function Component(_ref) {
192
203
  // rendered with explicit target). For classic cards, default to _self
193
204
  var _getAnchorAttributesF = (0, _getAnchorAttributesFromEvent.getAnchorAttributesFromEvent)(event),
194
205
  anchorTarget = _getAnchorAttributesF.target;
195
- var openInNewTab = resolveNavigation ? event.metaKey || event.ctrlKey || event.shiftKey || event.button === 1 : (0, _isSpecialEvent.isSpecialEvent)(event);
206
+ var openInNewTab;
207
+ var shouldOpenLink;
208
+ if (isEmbedOpenInNewTabEnabled) {
209
+ var isNewTabGesture = isEmbedDoubleClick || event.button === 0 && (event.metaKey || event.ctrlKey) || event.button === 1;
210
+ openInNewTab = isNewTabGesture || (resolveNavigation ? event.metaKey || event.ctrlKey || event.shiftKey || event.button === 1 : (0, _isSpecialEvent.isSpecialEvent)(event));
211
+ // Embed gestures navigate here even when the consumer handles ordinary clicks.
212
+ shouldOpenLink = isFlexibleUi || !onClick || isNewTabGesture;
213
+ } else {
214
+ openInNewTab = resolveNavigation ? event.metaKey || event.ctrlKey || event.shiftKey || event.button === 1 : (0, _isSpecialEvent.isSpecialEvent)(event);
215
+ shouldOpenLink = isFlexibleUi || !onClick;
216
+ }
196
217
  var isInIframe = (0, _fg.fg)('platform_sl_click_inside_iframe') && window.top !== window;
197
218
  var target = openInNewTab || isInIframe ? '_blank' : isFlexibleUi ? anchorTarget : '_self';
198
219
  onClick === null || onClick === void 0 || onClick(event, {
@@ -203,11 +224,8 @@ function Component(_ref) {
203
224
  // Check if the event is prevented via onClick callback
204
225
  var consumerPreventedNavigation = event.defaultPrevented && !isEventDefaultPrevented;
205
226
 
206
- // Classic cards (InlineCard, BlockCard, EmbedCard) rely on their own anchor navigation
207
- // when onClick is provided, so this handler should not open the link for them.
208
227
  // FlexibleCard's anchor is prevented from native navigation, so this handler always
209
228
  // opens the link for FlexibleCard unless the consumer's onClick called preventDefault.
210
- var shouldOpenLink = isFlexibleUi || !onClick;
211
229
  var doOpenLink = shouldOpenLink && !consumerPreventedNavigation;
212
230
  if (doOpenLink) {
213
231
  event.preventDefault();
@@ -221,7 +239,7 @@ function Component(_ref) {
221
239
  clickOutcome: target === '_blank' ? 'clickThroughNewTabOrWindow' : 'clickThrough'
222
240
  }
223
241
  } : undefined);
224
- }, [fireEvent, id, isFlexibleUi, appearance, definitionId, getDestinationUrl, resolveNavigation, onClick, url, state.details, ari, name, fire3PClickEvent, shouldFire3PClickEvent, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent, disablePreviewPanel]);
242
+ }, [fireEvent, id, isFlexibleUi, isEmbedOpenInNewTabEnabled, appearance, definitionId, getDestinationUrl, resolveNavigation, onClick, url, state.details, ari, name, fire3PClickEvent, shouldFire3PClickEvent, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent, disablePreviewPanel]);
225
243
 
226
244
  // Middle-click handler to trigger fire3PClickEvent on middle-clicks.
227
245
  // Scope is limited to 3P click analytics.
@@ -16,6 +16,7 @@
16
16
  ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
17
17
  ._19doidpf:after{left:0}
18
18
  ._1bah1yb4{justify-content:space-between}
19
+ ._1bqq1mrw:after{z-index:-1}
19
20
  ._1bqqidpf:after{z-index:0}
20
21
  ._1bsb7vkz{width:1pc}
21
22
  ._1bto1l2s{text-overflow:ellipsis}
@@ -38,6 +39,7 @@
38
39
  ._4t3igktf{height:20px}
39
40
  ._4t3ik5xz{height:27pc}
40
41
  ._4tpuhp5a:hover:after{background-color:var(--ds-surface-raised,#fff)}
42
+ ._80omtlke{cursor:pointer}
41
43
  ._8x3u1yw3:after{box-shadow:0 0 0 3px var(--ds-border-selected,#1868db)}
42
44
  ._aetrb3bt:after{content:""}
43
45
  ._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
@@ -8,9 +8,11 @@ Object.defineProperty(exports, "__esModule", {
8
8
  });
9
9
  exports.ExpandedFrame = void 0;
10
10
  require("./ExpandedFrame.compiled.css");
11
- var React = _interopRequireWildcard(require("react"));
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var React = _react;
12
13
  var _runtime = require("@compiled/react/runtime");
13
14
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
15
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
14
16
  var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
15
17
  var _useMouseDownEvent = require("../../../state/analytics/useMouseDownEvent");
16
18
  var _utils = require("../../common/utils");
@@ -32,6 +34,9 @@ var styles = {
32
34
  contentInteractiveActiveBorder: "_1jhm1tt7",
33
35
  contentOverflowAuto: "_1reo1wug _18m91wug"
34
36
  };
37
+ var navigationStyles = {
38
+ headerAnchor: "_80omtlke _aetrb3bt _18postnw _15l2idpf _32rxidpf _1x88idpf _19doidpf _1bqq1mrw"
39
+ };
35
40
  var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(_ref) {
36
41
  var _ref$isPlaceholder = _ref.isPlaceholder,
37
42
  isPlaceholder = _ref$isPlaceholder === void 0 ? false : _ref$isPlaceholder,
@@ -57,11 +62,65 @@ var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(_ref) {
57
62
  CompetitorPrompt = _ref.CompetitorPrompt,
58
63
  onContentMouseEnter = _ref.onContentMouseEnter,
59
64
  onContentMouseLeave = _ref.onContentMouseLeave;
65
+ var headerRef = (0, _react.useRef)(null);
66
+ var headerAnchorRef = (0, _react.useRef)(null);
60
67
  var isInteractive = function isInteractive() {
61
68
  return !isPlaceholder && (Boolean(href) || Boolean(onClick));
62
69
  };
70
+ var isEmbedOpenInNewTabEnabled = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_embed_open_in_new_tab');
71
+ var isModifierNavigationClick = function isModifierNavigationClick(event) {
72
+ return isEmbedOpenInNewTabEnabled && frameStyle !== 'hide' && !isPlaceholder && Boolean(href) && (event.button === 0 && (event.metaKey || event.ctrlKey) || event.button === 1);
73
+ };
74
+ var isUnmodifiedPrimaryDoubleClick = function isUnmodifiedPrimaryDoubleClick(event) {
75
+ return isEmbedOpenInNewTabEnabled && frameStyle !== 'hide' && !isPlaceholder && Boolean(href) && event.type === 'dblclick' && event.button === 0 && event.detail === 2 && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey;
76
+ };
63
77
  var handleClick = function handleClick(event) {
64
- return (0, _utils.handleClickCommon)(event, onClick);
78
+ if (isModifierNavigationClick(event)) {
79
+ // CardWithUrl must see the uncancelled event so it can respect consumer preventDefault.
80
+ event.stopPropagation();
81
+ onClick === null || onClick === void 0 || onClick(event);
82
+ return;
83
+ }
84
+ (0, _utils.handleClickCommon)(event, onClick);
85
+ };
86
+ var isHeaderAnchorTarget = function isHeaderAnchorTarget(target) {
87
+ var _headerAnchorRef$curr;
88
+ return target instanceof Node && Boolean((_headerAnchorRef$curr = headerAnchorRef.current) === null || _headerAnchorRef$curr === void 0 ? void 0 : _headerAnchorRef$curr.contains(target));
89
+ };
90
+ var isChromeTarget = function isChromeTarget(event) {
91
+ var _headerRef$current$co, _headerRef$current, _headerRef$current2;
92
+ var target = event.target;
93
+ if (!(target instanceof Element)) {
94
+ return false;
95
+ }
96
+ var isInHeader = (_headerRef$current$co = (_headerRef$current = headerRef.current) === null || _headerRef$current === void 0 ? void 0 : _headerRef$current.contains(target)) !== null && _headerRef$current$co !== void 0 ? _headerRef$current$co : false;
97
+ var isFrameChrome = target === event.currentTarget;
98
+ if (!isInHeader && !isFrameChrome) {
99
+ return false;
100
+ }
101
+ var interactiveAncestor = target.closest('a, button, input, select, textarea, [role="button"], [role="link"], [contenteditable="true"], [tabindex]');
102
+ var isHeaderControl = interactiveAncestor && ((_headerRef$current2 = headerRef.current) === null || _headerRef$current2 === void 0 ? void 0 : _headerRef$current2.contains(interactiveAncestor));
103
+ return !isHeaderControl || interactiveAncestor === headerAnchorRef.current;
104
+ };
105
+ var handleChromeMouseDownCapture = function handleChromeMouseDownCapture(event) {
106
+ if (isModifierNavigationClick(event) && isChromeTarget(event)) {
107
+ if (event.button === 1 && !isHeaderAnchorTarget(event.target)) {
108
+ // Non-link middle presses otherwise trigger autoscroll or clipboard paste.
109
+ event.preventDefault();
110
+ }
111
+ event.stopPropagation();
112
+ }
113
+ };
114
+ var handleChromeNavigationEvent = function handleChromeNavigationEvent(event) {
115
+ if (isModifierNavigationClick(event) && !isHeaderAnchorTarget(event.target) && isChromeTarget(event)) {
116
+ handleClick(event);
117
+ }
118
+ };
119
+ var handleChromeDoubleClick = function handleChromeDoubleClick(event) {
120
+ if (isUnmodifiedPrimaryDoubleClick(event) && isChromeTarget(event)) {
121
+ event.stopPropagation();
122
+ onClick === null || onClick === void 0 || onClick(event);
123
+ }
65
124
  };
66
125
  var handleMouseDown = (0, _useMouseDownEvent.useMouseDownEvent)();
67
126
  var CompetitorPromptComponent = CompetitorPrompt && href ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
@@ -70,6 +129,7 @@ var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(_ref) {
70
129
  }) : null;
71
130
  var renderHeader = function renderHeader() {
72
131
  return frameStyle !== 'hide' && /*#__PURE__*/React.createElement("div", {
132
+ ref: headerRef,
73
133
  className: (0, _runtime.ax)([styles.header, "embed-header"])
74
134
  }, /*#__PURE__*/React.createElement("div", {
75
135
  className: (0, _runtime.ax)([styles.leftSection])
@@ -81,12 +141,13 @@ var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(_ref) {
81
141
  content: text,
82
142
  hideTooltipOnMouseDown: true
83
143
  }, /*#__PURE__*/React.createElement("a", {
144
+ ref: headerAnchorRef,
84
145
  href: href,
85
146
  onClick: handleClick,
86
147
  onAuxClick: onAuxClick,
87
148
  onContextMenu: onContextMenu,
88
149
  onMouseDown: handleMouseDown,
89
- className: (0, _runtime.ax)([styles.headerAnchor])
150
+ className: (0, _runtime.ax)([styles.headerAnchor, isEmbedOpenInNewTabEnabled && Boolean(href) && navigationStyles.headerAnchor])
90
151
  }, text)))), CompetitorPromptComponent);
91
152
  };
92
153
  var interactive = isInteractive();
@@ -106,14 +167,20 @@ var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(_ref) {
106
167
  }, children);
107
168
  };
108
169
  return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
170
+ role: "none"
109
171
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
172
+ ,
110
173
  className: (0, _runtime.ax)([styles.linkWrapper, inheritDimensions && styles.linkWrapperInheritDimensions, isSelected && frameStyle !== 'hide' && styles.linkWrapperSelected, showBackgroundAlways && styles.linkWrapperBorderAndBackground, showBackgroundOnHover && !showBackgroundAlways && styles.linkWrapperInteractiveNotHidden, _styled.className]),
111
174
  style: {
112
175
  minWidth: minWidth ? "".concat(minWidth, "px") : '',
113
176
  maxWidth: maxWidth ? "".concat(maxWidth, "px") : ''
114
177
  },
115
178
  "data-testid": testId,
116
- "data-trello-do-not-use-override": testId
179
+ "data-trello-do-not-use-override": testId,
180
+ onMouseDownCapture: handleChromeMouseDownCapture,
181
+ onClick: handleChromeNavigationEvent,
182
+ onAuxClick: handleChromeNavigationEvent,
183
+ onDoubleClick: handleChromeDoubleClick
117
184
  // Due to limitations of testing library, we can't assert ::after
118
185
  ,
119
186
  "data-is-selected": isSelected
@@ -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: "46.11.1",
22
+ packageVersion: "46.11.4",
23
23
  componentName: 'linkUrl'
24
24
  };
25
25
  var LinkUrl = function LinkUrl(_ref) {
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card" || '',
7
- packageVersion: "46.11.1" || ''
7
+ packageVersion: "46.11.4" || ''
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useMemo, useRef } from 'react';
2
2
  import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/analytics-next/useAnalyticsEvents';
3
3
  import { extractSmartLinkEmbed } from '@atlaskit/link-extractors/extract-smart-link-embed';
4
4
  import { useSmartLinkContext } from '@atlaskit/link-provider/use-smart-link-context';
5
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
5
6
  import { fg } from '@atlaskit/platform-feature-flags/fg';
6
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
8
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
@@ -79,6 +80,7 @@ function Component({
79
80
  fireEvent
80
81
  } = useAnalyticsEvents();
81
82
  let isFlexibleUi = useMemo(() => isFlexibleUiCard(children, ui), [children, ui]);
83
+ const isEmbedOpenInNewTabEnabled = appearance === CardDisplay.Embed && isExperimentEnabled('platform_editor_embed_open_in_new_tab');
82
84
 
83
85
  // Get state, actions for this card.
84
86
  // appearance is pre-resolved by the caller (loader.tsx for Card, ssr.tsx for CardSSR):
@@ -130,6 +132,15 @@ function Component({
130
132
  // Setup UI handlers.
131
133
  const handleClickWrapper = useCallback(event => {
132
134
  var _resolveNavigation$ur;
135
+ const isEmbedDoubleClick = isEmbedOpenInNewTabEnabled && event.type === 'dblclick' && event.button === 0 && event.detail === 2 && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey;
136
+
137
+ // The title link's preceding clicks already navigate without a consumer callback.
138
+ if (isEmbedDoubleClick && !onClick) {
139
+ const clickedAnchor = event.target instanceof Element ? event.target.closest('a') : null;
140
+ if (clickedAnchor && event.currentTarget.contains(clickedAnchor)) {
141
+ return;
142
+ }
143
+ }
133
144
  const isModifierKeyPressed = isSpecialKey(event) || isSpecialClick(event);
134
145
  fireEvent('ui.smartLink.clicked', {
135
146
  id,
@@ -182,7 +193,17 @@ function Component({
182
193
  const {
183
194
  target: anchorTarget
184
195
  } = getAnchorAttributesFromEvent(event);
185
- const openInNewTab = resolveNavigation ? event.metaKey || event.ctrlKey || event.shiftKey || event.button === 1 : isSpecialEvent(event);
196
+ let openInNewTab;
197
+ let shouldOpenLink;
198
+ if (isEmbedOpenInNewTabEnabled) {
199
+ const isNewTabGesture = isEmbedDoubleClick || event.button === 0 && (event.metaKey || event.ctrlKey) || event.button === 1;
200
+ openInNewTab = isNewTabGesture || (resolveNavigation ? event.metaKey || event.ctrlKey || event.shiftKey || event.button === 1 : isSpecialEvent(event));
201
+ // Embed gestures navigate here even when the consumer handles ordinary clicks.
202
+ shouldOpenLink = isFlexibleUi || !onClick || isNewTabGesture;
203
+ } else {
204
+ openInNewTab = resolveNavigation ? event.metaKey || event.ctrlKey || event.shiftKey || event.button === 1 : isSpecialEvent(event);
205
+ shouldOpenLink = isFlexibleUi || !onClick;
206
+ }
186
207
  const isInIframe = fg('platform_sl_click_inside_iframe') && window.top !== window;
187
208
  const target = openInNewTab || isInIframe ? '_blank' : isFlexibleUi ? anchorTarget : '_self';
188
209
  onClick === null || onClick === void 0 ? void 0 : onClick(event, {
@@ -193,11 +214,8 @@ function Component({
193
214
  // Check if the event is prevented via onClick callback
194
215
  const consumerPreventedNavigation = event.defaultPrevented && !isEventDefaultPrevented;
195
216
 
196
- // Classic cards (InlineCard, BlockCard, EmbedCard) rely on their own anchor navigation
197
- // when onClick is provided, so this handler should not open the link for them.
198
217
  // FlexibleCard's anchor is prevented from native navigation, so this handler always
199
218
  // opens the link for FlexibleCard unless the consumer's onClick called preventDefault.
200
- const shouldOpenLink = isFlexibleUi || !onClick;
201
219
  const doOpenLink = shouldOpenLink && !consumerPreventedNavigation;
202
220
  if (doOpenLink) {
203
221
  event.preventDefault();
@@ -211,7 +229,7 @@ function Component({
211
229
  clickOutcome: target === '_blank' ? 'clickThroughNewTabOrWindow' : 'clickThrough'
212
230
  }
213
231
  } : undefined);
214
- }, [fireEvent, id, isFlexibleUi, appearance, definitionId, getDestinationUrl, resolveNavigation, onClick, url, state.details, ari, name, fire3PClickEvent, shouldFire3PClickEvent, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent, disablePreviewPanel]);
232
+ }, [fireEvent, id, isFlexibleUi, isEmbedOpenInNewTabEnabled, appearance, definitionId, getDestinationUrl, resolveNavigation, onClick, url, state.details, ari, name, fire3PClickEvent, shouldFire3PClickEvent, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent, disablePreviewPanel]);
215
233
 
216
234
  // Middle-click handler to trigger fire3PClickEvent on middle-clicks.
217
235
  // Scope is limited to 3P click analytics.
@@ -16,6 +16,7 @@
16
16
  ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
17
17
  ._19doidpf:after{left:0}
18
18
  ._1bah1yb4{justify-content:space-between}
19
+ ._1bqq1mrw:after{z-index:-1}
19
20
  ._1bqqidpf:after{z-index:0}
20
21
  ._1bsb7vkz{width:1pc}
21
22
  ._1bto1l2s{text-overflow:ellipsis}
@@ -38,6 +39,7 @@
38
39
  ._4t3igktf{height:20px}
39
40
  ._4t3ik5xz{height:27pc}
40
41
  ._4tpuhp5a:hover:after{background-color:var(--ds-surface-raised,#fff)}
42
+ ._80omtlke{cursor:pointer}
41
43
  ._8x3u1yw3:after{box-shadow:0 0 0 3px var(--ds-border-selected,#1868db)}
42
44
  ._aetrb3bt:after{content:""}
43
45
  ._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
@@ -3,8 +3,11 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./ExpandedFrame.compiled.css";
4
4
  import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
+ import { useRef } from 'react';
7
+
6
8
  // eslint-disable-next-line no-unused-vars
7
9
 
10
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
8
11
  import Tooltip from '@atlaskit/tooltip/Tooltip';
9
12
  import { useMouseDownEvent } from '../../../state/analytics/useMouseDownEvent';
10
13
  import { handleClickCommon } from '../../common/utils';
@@ -24,6 +27,9 @@ const styles = {
24
27
  contentInteractiveActiveBorder: "_1jhm1tt7",
25
28
  contentOverflowAuto: "_1reo1wug _18m91wug"
26
29
  };
30
+ const navigationStyles = {
31
+ headerAnchor: "_80omtlke _aetrb3bt _18postnw _15l2idpf _32rxidpf _1x88idpf _19doidpf _1bqq1mrw"
32
+ };
27
33
  export const ExpandedFrame = ({
28
34
  isPlaceholder = false,
29
35
  children,
@@ -45,8 +51,62 @@ export const ExpandedFrame = ({
45
51
  onContentMouseEnter,
46
52
  onContentMouseLeave
47
53
  }) => {
54
+ const headerRef = useRef(null);
55
+ const headerAnchorRef = useRef(null);
48
56
  const isInteractive = () => !isPlaceholder && (Boolean(href) || Boolean(onClick));
49
- const handleClick = event => handleClickCommon(event, onClick);
57
+ const isEmbedOpenInNewTabEnabled = isExperimentEnabled('platform_editor_embed_open_in_new_tab');
58
+ const isModifierNavigationClick = event => isEmbedOpenInNewTabEnabled && frameStyle !== 'hide' && !isPlaceholder && Boolean(href) && (event.button === 0 && (event.metaKey || event.ctrlKey) || event.button === 1);
59
+ const isUnmodifiedPrimaryDoubleClick = event => isEmbedOpenInNewTabEnabled && frameStyle !== 'hide' && !isPlaceholder && Boolean(href) && event.type === 'dblclick' && event.button === 0 && event.detail === 2 && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey;
60
+ const handleClick = event => {
61
+ if (isModifierNavigationClick(event)) {
62
+ // CardWithUrl must see the uncancelled event so it can respect consumer preventDefault.
63
+ event.stopPropagation();
64
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
65
+ return;
66
+ }
67
+ handleClickCommon(event, onClick);
68
+ };
69
+ const isHeaderAnchorTarget = target => {
70
+ var _headerAnchorRef$curr;
71
+ return target instanceof Node && Boolean((_headerAnchorRef$curr = headerAnchorRef.current) === null || _headerAnchorRef$curr === void 0 ? void 0 : _headerAnchorRef$curr.contains(target));
72
+ };
73
+ const isChromeTarget = event => {
74
+ var _headerRef$current$co, _headerRef$current, _headerRef$current2;
75
+ const {
76
+ target
77
+ } = event;
78
+ if (!(target instanceof Element)) {
79
+ return false;
80
+ }
81
+ const isInHeader = (_headerRef$current$co = (_headerRef$current = headerRef.current) === null || _headerRef$current === void 0 ? void 0 : _headerRef$current.contains(target)) !== null && _headerRef$current$co !== void 0 ? _headerRef$current$co : false;
82
+ const isFrameChrome = target === event.currentTarget;
83
+ if (!isInHeader && !isFrameChrome) {
84
+ return false;
85
+ }
86
+ const interactiveAncestor = target.closest('a, button, input, select, textarea, [role="button"], [role="link"], [contenteditable="true"], [tabindex]');
87
+ const isHeaderControl = interactiveAncestor && ((_headerRef$current2 = headerRef.current) === null || _headerRef$current2 === void 0 ? void 0 : _headerRef$current2.contains(interactiveAncestor));
88
+ return !isHeaderControl || interactiveAncestor === headerAnchorRef.current;
89
+ };
90
+ const handleChromeMouseDownCapture = event => {
91
+ if (isModifierNavigationClick(event) && isChromeTarget(event)) {
92
+ if (event.button === 1 && !isHeaderAnchorTarget(event.target)) {
93
+ // Non-link middle presses otherwise trigger autoscroll or clipboard paste.
94
+ event.preventDefault();
95
+ }
96
+ event.stopPropagation();
97
+ }
98
+ };
99
+ const handleChromeNavigationEvent = event => {
100
+ if (isModifierNavigationClick(event) && !isHeaderAnchorTarget(event.target) && isChromeTarget(event)) {
101
+ handleClick(event);
102
+ }
103
+ };
104
+ const handleChromeDoubleClick = event => {
105
+ if (isUnmodifiedPrimaryDoubleClick(event) && isChromeTarget(event)) {
106
+ event.stopPropagation();
107
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
108
+ }
109
+ };
50
110
  const handleMouseDown = useMouseDownEvent();
51
111
  const CompetitorPromptComponent = CompetitorPrompt && href ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
52
112
  sourceUrl: href,
@@ -54,6 +114,7 @@ export const ExpandedFrame = ({
54
114
  }) : null;
55
115
  const renderHeader = () => {
56
116
  return frameStyle !== 'hide' && /*#__PURE__*/React.createElement("div", {
117
+ ref: headerRef,
57
118
  className: ax([styles.header, "embed-header"])
58
119
  }, /*#__PURE__*/React.createElement("div", {
59
120
  className: ax([styles.leftSection])
@@ -65,12 +126,13 @@ export const ExpandedFrame = ({
65
126
  content: text,
66
127
  hideTooltipOnMouseDown: true
67
128
  }, /*#__PURE__*/React.createElement("a", {
129
+ ref: headerAnchorRef,
68
130
  href: href,
69
131
  onClick: handleClick,
70
132
  onAuxClick: onAuxClick,
71
133
  onContextMenu: onContextMenu,
72
134
  onMouseDown: handleMouseDown,
73
- className: ax([styles.headerAnchor])
135
+ className: ax([styles.headerAnchor, isEmbedOpenInNewTabEnabled && Boolean(href) && navigationStyles.headerAnchor])
74
136
  }, text)))), CompetitorPromptComponent);
75
137
  };
76
138
  const interactive = isInteractive();
@@ -90,14 +152,20 @@ export const ExpandedFrame = ({
90
152
  }, children);
91
153
  };
92
154
  return /*#__PURE__*/React.createElement("div", _extends({
155
+ role: "none"
93
156
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
157
+ ,
94
158
  className: ax([styles.linkWrapper, inheritDimensions && styles.linkWrapperInheritDimensions, isSelected && frameStyle !== 'hide' && styles.linkWrapperSelected, showBackgroundAlways && styles.linkWrapperBorderAndBackground, showBackgroundOnHover && !showBackgroundAlways && styles.linkWrapperInteractiveNotHidden, className]),
95
159
  style: {
96
160
  minWidth: minWidth ? `${minWidth}px` : '',
97
161
  maxWidth: maxWidth ? `${maxWidth}px` : ''
98
162
  },
99
163
  "data-testid": testId,
100
- "data-trello-do-not-use-override": testId
164
+ "data-trello-do-not-use-override": testId,
165
+ onMouseDownCapture: handleChromeMouseDownCapture,
166
+ onClick: handleChromeNavigationEvent,
167
+ onAuxClick: handleChromeNavigationEvent,
168
+ onDoubleClick: handleChromeDoubleClick
101
169
  // Due to limitations of testing library, we can't assert ::after
102
170
  ,
103
171
  "data-is-selected": isSelected
@@ -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: "46.11.1",
12
+ packageVersion: "46.11.4",
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: "46.11.1" || ''
7
+ packageVersion: "46.11.4" || ''
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -5,6 +5,7 @@ import React, { useCallback, useEffect, useMemo, useRef } from 'react';
5
5
  import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/analytics-next/useAnalyticsEvents';
6
6
  import { extractSmartLinkEmbed } from '@atlaskit/link-extractors/extract-smart-link-embed';
7
7
  import { useSmartLinkContext } from '@atlaskit/link-provider/use-smart-link-context';
8
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
8
9
  import { fg } from '@atlaskit/platform-feature-flags/fg';
9
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
11
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
@@ -81,6 +82,7 @@ function Component(_ref) {
81
82
  var isFlexibleUi = useMemo(function () {
82
83
  return isFlexibleUiCard(children, ui);
83
84
  }, [children, ui]);
85
+ var isEmbedOpenInNewTabEnabled = appearance === CardDisplay.Embed && isExperimentEnabled('platform_editor_embed_open_in_new_tab');
84
86
 
85
87
  // Get state, actions for this card.
86
88
  // appearance is pre-resolved by the caller (loader.tsx for Card, ssr.tsx for CardSSR):
@@ -132,6 +134,15 @@ function Component(_ref) {
132
134
  // Setup UI handlers.
133
135
  var handleClickWrapper = useCallback(function (event) {
134
136
  var _resolveNavigation$ur;
137
+ var isEmbedDoubleClick = isEmbedOpenInNewTabEnabled && event.type === 'dblclick' && event.button === 0 && event.detail === 2 && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey;
138
+
139
+ // The title link's preceding clicks already navigate without a consumer callback.
140
+ if (isEmbedDoubleClick && !onClick) {
141
+ var clickedAnchor = event.target instanceof Element ? event.target.closest('a') : null;
142
+ if (clickedAnchor && event.currentTarget.contains(clickedAnchor)) {
143
+ return;
144
+ }
145
+ }
135
146
  var isModifierKeyPressed = isSpecialKey(event) || isSpecialClick(event);
136
147
  fireEvent('ui.smartLink.clicked', {
137
148
  id: id,
@@ -183,7 +194,17 @@ function Component(_ref) {
183
194
  // rendered with explicit target). For classic cards, default to _self
184
195
  var _getAnchorAttributesF = getAnchorAttributesFromEvent(event),
185
196
  anchorTarget = _getAnchorAttributesF.target;
186
- var openInNewTab = resolveNavigation ? event.metaKey || event.ctrlKey || event.shiftKey || event.button === 1 : isSpecialEvent(event);
197
+ var openInNewTab;
198
+ var shouldOpenLink;
199
+ if (isEmbedOpenInNewTabEnabled) {
200
+ var isNewTabGesture = isEmbedDoubleClick || event.button === 0 && (event.metaKey || event.ctrlKey) || event.button === 1;
201
+ openInNewTab = isNewTabGesture || (resolveNavigation ? event.metaKey || event.ctrlKey || event.shiftKey || event.button === 1 : isSpecialEvent(event));
202
+ // Embed gestures navigate here even when the consumer handles ordinary clicks.
203
+ shouldOpenLink = isFlexibleUi || !onClick || isNewTabGesture;
204
+ } else {
205
+ openInNewTab = resolveNavigation ? event.metaKey || event.ctrlKey || event.shiftKey || event.button === 1 : isSpecialEvent(event);
206
+ shouldOpenLink = isFlexibleUi || !onClick;
207
+ }
187
208
  var isInIframe = fg('platform_sl_click_inside_iframe') && window.top !== window;
188
209
  var target = openInNewTab || isInIframe ? '_blank' : isFlexibleUi ? anchorTarget : '_self';
189
210
  onClick === null || onClick === void 0 || onClick(event, {
@@ -194,11 +215,8 @@ function Component(_ref) {
194
215
  // Check if the event is prevented via onClick callback
195
216
  var consumerPreventedNavigation = event.defaultPrevented && !isEventDefaultPrevented;
196
217
 
197
- // Classic cards (InlineCard, BlockCard, EmbedCard) rely on their own anchor navigation
198
- // when onClick is provided, so this handler should not open the link for them.
199
218
  // FlexibleCard's anchor is prevented from native navigation, so this handler always
200
219
  // opens the link for FlexibleCard unless the consumer's onClick called preventDefault.
201
- var shouldOpenLink = isFlexibleUi || !onClick;
202
220
  var doOpenLink = shouldOpenLink && !consumerPreventedNavigation;
203
221
  if (doOpenLink) {
204
222
  event.preventDefault();
@@ -212,7 +230,7 @@ function Component(_ref) {
212
230
  clickOutcome: target === '_blank' ? 'clickThroughNewTabOrWindow' : 'clickThrough'
213
231
  }
214
232
  } : undefined);
215
- }, [fireEvent, id, isFlexibleUi, appearance, definitionId, getDestinationUrl, resolveNavigation, onClick, url, state.details, ari, name, fire3PClickEvent, shouldFire3PClickEvent, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent, disablePreviewPanel]);
233
+ }, [fireEvent, id, isFlexibleUi, isEmbedOpenInNewTabEnabled, appearance, definitionId, getDestinationUrl, resolveNavigation, onClick, url, state.details, ari, name, fire3PClickEvent, shouldFire3PClickEvent, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent, disablePreviewPanel]);
216
234
 
217
235
  // Middle-click handler to trigger fire3PClickEvent on middle-clicks.
218
236
  // Scope is limited to 3P click analytics.
@@ -16,6 +16,7 @@
16
16
  ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
17
17
  ._19doidpf:after{left:0}
18
18
  ._1bah1yb4{justify-content:space-between}
19
+ ._1bqq1mrw:after{z-index:-1}
19
20
  ._1bqqidpf:after{z-index:0}
20
21
  ._1bsb7vkz{width:1pc}
21
22
  ._1bto1l2s{text-overflow:ellipsis}
@@ -38,6 +39,7 @@
38
39
  ._4t3igktf{height:20px}
39
40
  ._4t3ik5xz{height:27pc}
40
41
  ._4tpuhp5a:hover:after{background-color:var(--ds-surface-raised,#fff)}
42
+ ._80omtlke{cursor:pointer}
41
43
  ._8x3u1yw3:after{box-shadow:0 0 0 3px var(--ds-border-selected,#1868db)}
42
44
  ._aetrb3bt:after{content:""}
43
45
  ._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
@@ -3,8 +3,11 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./ExpandedFrame.compiled.css";
4
4
  import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
+ import { useRef } from 'react';
7
+
6
8
  // eslint-disable-next-line no-unused-vars
7
9
 
10
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
8
11
  import Tooltip from '@atlaskit/tooltip/Tooltip';
9
12
  import { useMouseDownEvent } from '../../../state/analytics/useMouseDownEvent';
10
13
  import { handleClickCommon } from '../../common/utils';
@@ -24,6 +27,9 @@ var styles = {
24
27
  contentInteractiveActiveBorder: "_1jhm1tt7",
25
28
  contentOverflowAuto: "_1reo1wug _18m91wug"
26
29
  };
30
+ var navigationStyles = {
31
+ headerAnchor: "_80omtlke _aetrb3bt _18postnw _15l2idpf _32rxidpf _1x88idpf _19doidpf _1bqq1mrw"
32
+ };
27
33
  export var ExpandedFrame = function ExpandedFrame(_ref) {
28
34
  var _ref$isPlaceholder = _ref.isPlaceholder,
29
35
  isPlaceholder = _ref$isPlaceholder === void 0 ? false : _ref$isPlaceholder,
@@ -49,11 +55,65 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
49
55
  CompetitorPrompt = _ref.CompetitorPrompt,
50
56
  onContentMouseEnter = _ref.onContentMouseEnter,
51
57
  onContentMouseLeave = _ref.onContentMouseLeave;
58
+ var headerRef = useRef(null);
59
+ var headerAnchorRef = useRef(null);
52
60
  var isInteractive = function isInteractive() {
53
61
  return !isPlaceholder && (Boolean(href) || Boolean(onClick));
54
62
  };
63
+ var isEmbedOpenInNewTabEnabled = isExperimentEnabled('platform_editor_embed_open_in_new_tab');
64
+ var isModifierNavigationClick = function isModifierNavigationClick(event) {
65
+ return isEmbedOpenInNewTabEnabled && frameStyle !== 'hide' && !isPlaceholder && Boolean(href) && (event.button === 0 && (event.metaKey || event.ctrlKey) || event.button === 1);
66
+ };
67
+ var isUnmodifiedPrimaryDoubleClick = function isUnmodifiedPrimaryDoubleClick(event) {
68
+ return isEmbedOpenInNewTabEnabled && frameStyle !== 'hide' && !isPlaceholder && Boolean(href) && event.type === 'dblclick' && event.button === 0 && event.detail === 2 && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey;
69
+ };
55
70
  var handleClick = function handleClick(event) {
56
- return handleClickCommon(event, onClick);
71
+ if (isModifierNavigationClick(event)) {
72
+ // CardWithUrl must see the uncancelled event so it can respect consumer preventDefault.
73
+ event.stopPropagation();
74
+ onClick === null || onClick === void 0 || onClick(event);
75
+ return;
76
+ }
77
+ handleClickCommon(event, onClick);
78
+ };
79
+ var isHeaderAnchorTarget = function isHeaderAnchorTarget(target) {
80
+ var _headerAnchorRef$curr;
81
+ return target instanceof Node && Boolean((_headerAnchorRef$curr = headerAnchorRef.current) === null || _headerAnchorRef$curr === void 0 ? void 0 : _headerAnchorRef$curr.contains(target));
82
+ };
83
+ var isChromeTarget = function isChromeTarget(event) {
84
+ var _headerRef$current$co, _headerRef$current, _headerRef$current2;
85
+ var target = event.target;
86
+ if (!(target instanceof Element)) {
87
+ return false;
88
+ }
89
+ var isInHeader = (_headerRef$current$co = (_headerRef$current = headerRef.current) === null || _headerRef$current === void 0 ? void 0 : _headerRef$current.contains(target)) !== null && _headerRef$current$co !== void 0 ? _headerRef$current$co : false;
90
+ var isFrameChrome = target === event.currentTarget;
91
+ if (!isInHeader && !isFrameChrome) {
92
+ return false;
93
+ }
94
+ var interactiveAncestor = target.closest('a, button, input, select, textarea, [role="button"], [role="link"], [contenteditable="true"], [tabindex]');
95
+ var isHeaderControl = interactiveAncestor && ((_headerRef$current2 = headerRef.current) === null || _headerRef$current2 === void 0 ? void 0 : _headerRef$current2.contains(interactiveAncestor));
96
+ return !isHeaderControl || interactiveAncestor === headerAnchorRef.current;
97
+ };
98
+ var handleChromeMouseDownCapture = function handleChromeMouseDownCapture(event) {
99
+ if (isModifierNavigationClick(event) && isChromeTarget(event)) {
100
+ if (event.button === 1 && !isHeaderAnchorTarget(event.target)) {
101
+ // Non-link middle presses otherwise trigger autoscroll or clipboard paste.
102
+ event.preventDefault();
103
+ }
104
+ event.stopPropagation();
105
+ }
106
+ };
107
+ var handleChromeNavigationEvent = function handleChromeNavigationEvent(event) {
108
+ if (isModifierNavigationClick(event) && !isHeaderAnchorTarget(event.target) && isChromeTarget(event)) {
109
+ handleClick(event);
110
+ }
111
+ };
112
+ var handleChromeDoubleClick = function handleChromeDoubleClick(event) {
113
+ if (isUnmodifiedPrimaryDoubleClick(event) && isChromeTarget(event)) {
114
+ event.stopPropagation();
115
+ onClick === null || onClick === void 0 || onClick(event);
116
+ }
57
117
  };
58
118
  var handleMouseDown = useMouseDownEvent();
59
119
  var CompetitorPromptComponent = CompetitorPrompt && href ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
@@ -62,6 +122,7 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
62
122
  }) : null;
63
123
  var renderHeader = function renderHeader() {
64
124
  return frameStyle !== 'hide' && /*#__PURE__*/React.createElement("div", {
125
+ ref: headerRef,
65
126
  className: ax([styles.header, "embed-header"])
66
127
  }, /*#__PURE__*/React.createElement("div", {
67
128
  className: ax([styles.leftSection])
@@ -73,12 +134,13 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
73
134
  content: text,
74
135
  hideTooltipOnMouseDown: true
75
136
  }, /*#__PURE__*/React.createElement("a", {
137
+ ref: headerAnchorRef,
76
138
  href: href,
77
139
  onClick: handleClick,
78
140
  onAuxClick: onAuxClick,
79
141
  onContextMenu: onContextMenu,
80
142
  onMouseDown: handleMouseDown,
81
- className: ax([styles.headerAnchor])
143
+ className: ax([styles.headerAnchor, isEmbedOpenInNewTabEnabled && Boolean(href) && navigationStyles.headerAnchor])
82
144
  }, text)))), CompetitorPromptComponent);
83
145
  };
84
146
  var interactive = isInteractive();
@@ -98,14 +160,20 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
98
160
  }, children);
99
161
  };
100
162
  return /*#__PURE__*/React.createElement("div", _extends({
163
+ role: "none"
101
164
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
165
+ ,
102
166
  className: ax([styles.linkWrapper, inheritDimensions && styles.linkWrapperInheritDimensions, isSelected && frameStyle !== 'hide' && styles.linkWrapperSelected, showBackgroundAlways && styles.linkWrapperBorderAndBackground, showBackgroundOnHover && !showBackgroundAlways && styles.linkWrapperInteractiveNotHidden, className]),
103
167
  style: {
104
168
  minWidth: minWidth ? "".concat(minWidth, "px") : '',
105
169
  maxWidth: maxWidth ? "".concat(maxWidth, "px") : ''
106
170
  },
107
171
  "data-testid": testId,
108
- "data-trello-do-not-use-override": testId
172
+ "data-trello-do-not-use-override": testId,
173
+ onMouseDownCapture: handleChromeMouseDownCapture,
174
+ onClick: handleChromeNavigationEvent,
175
+ onAuxClick: handleChromeNavigationEvent,
176
+ onDoubleClick: handleChromeDoubleClick
109
177
  // Due to limitations of testing library, we can't assert ::after
110
178
  ,
111
179
  "data-is-selected": isSelected
@@ -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: "46.11.1",
15
+ packageVersion: "46.11.4",
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": "46.11.2",
3
+ "version": "46.12.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@atlaskit/adf-utils": "^20.9.0",
42
- "@atlaskit/afm-i18n-platform-linking-platform-smart-card": "2.295.0",
42
+ "@atlaskit/afm-i18n-platform-linking-platform-smart-card": "2.298.0",
43
43
  "@atlaskit/analytics-cross-product": "^2.3.0",
44
44
  "@atlaskit/analytics-gas-types": "^6.2.0",
45
45
  "@atlaskit/analytics-next": "^12.6.0",
@@ -47,13 +47,13 @@
47
47
  "@atlaskit/avatar-group": "^14.4.0",
48
48
  "@atlaskit/badge": "^22.0.0",
49
49
  "@atlaskit/browser-apis": "^1.2.0",
50
- "@atlaskit/button": "^25.6.0",
50
+ "@atlaskit/button": "^25.7.0",
51
51
  "@atlaskit/checkbox": "^19.3.0",
52
52
  "@atlaskit/css": "^1.1.0",
53
53
  "@atlaskit/docs": "^12.3.0",
54
54
  "@atlaskit/dropdown-menu": "^21.0.0",
55
55
  "@atlaskit/embedded-confluence": "^6.4.0",
56
- "@atlaskit/feature-gate-js-client": "^7.1.0",
56
+ "@atlaskit/feature-gate-js-client": "^8.0.0",
57
57
  "@atlaskit/flag": "^19.0.0",
58
58
  "@atlaskit/form": "^18.3.0",
59
59
  "@atlaskit/frontend-utilities": "^5.1.0",
@@ -74,7 +74,7 @@
74
74
  "@atlaskit/lozenge": "^17.0.0",
75
75
  "@atlaskit/menu": "^11.0.0",
76
76
  "@atlaskit/modal-dialog": "^17.2.0",
77
- "@atlaskit/motion": "^9.5.0",
77
+ "@atlaskit/motion": "^9.6.0",
78
78
  "@atlaskit/object": "^2.3.0",
79
79
  "@atlaskit/outbound-auth-flow-client": "^4.2.0",
80
80
  "@atlaskit/platform-feature-experiments": "^0.3.0",
@@ -94,8 +94,8 @@
94
94
  "@atlaskit/textfield": "^10.3.0",
95
95
  "@atlaskit/theme": "^28.2.0",
96
96
  "@atlaskit/tile": "^5.0.0",
97
- "@atlaskit/tmp-editor-statsig": "^249.0.0",
98
- "@atlaskit/tokens": "^20.8.0",
97
+ "@atlaskit/tmp-editor-statsig": "^250.0.0",
98
+ "@atlaskit/tokens": "^20.9.0",
99
99
  "@atlaskit/tooltip": "^24.4.0",
100
100
  "@atlaskit/top-layer": "^7.1.0",
101
101
  "@atlaskit/ufo": "^2.0.0",