@atlaskit/smart-card 34.10.3 → 34.10.4
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 +8 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.compiled.css +50 -0
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +70 -7
- package/dist/cjs/view/EmbedCard/components/styled.js +22 -15
- package/dist/cjs/view/InlineCard/common/action-button/index.js +4 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/UnauthorisedViewContent.js +8 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.compiled.css +50 -0
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +71 -8
- package/dist/es2019/view/EmbedCard/components/styled.js +21 -14
- package/dist/es2019/view/InlineCard/common/action-button/index.js +6 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +8 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.compiled.css +50 -0
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +71 -8
- package/dist/esm/view/EmbedCard/components/styled.js +21 -14
- package/dist/esm/view/InlineCard/common/action-button/index.js +4 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/UnauthorisedViewContent.js +8 -1
- package/dist/types/view/EmbedCard/components/styled.d.ts +7 -7
- package/dist/types/view/InlineCard/common/action-button/index.d.ts +1 -0
- package/dist/types-ts4.5/view/EmbedCard/components/styled.d.ts +7 -7
- package/dist/types-ts4.5/view/InlineCard/common/action-button/index.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 34.10.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#110251](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110251)
|
|
8
|
+
[`b6adb9244b072`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b6adb9244b072) -
|
|
9
|
+
[ux] Visual refresh of the EmbedCard component
|
|
10
|
+
|
|
3
11
|
## 34.10.3
|
|
4
12
|
|
|
5
13
|
### 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: "34.10.
|
|
14
|
+
packageVersion: "34.10.4"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
._11c81il0{font:var(--ds-font-heading-xsmall,normal 600 14px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._14mj1crf:after{border-radius:9pt}
|
|
3
|
+
._19it1pvm{border:solid 1px var(--ds-border,#091e4224)}
|
|
4
|
+
._1tqzzgxb:after{outline:1px solid var(--ds-border,#091e4224)}
|
|
5
|
+
._2rko1y44{border-radius:4px}
|
|
6
|
+
._hcgvzgxb:hover:after{outline:1px solid var(--ds-border,#091e4224)}
|
|
7
|
+
._qc5o94zs:after{transition:background .3s,box-shadow .3s}
|
|
8
|
+
._v56414au{transition:outline .3s}
|
|
9
|
+
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
10
|
+
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
11
|
+
._15l2idpf:after{top:0}
|
|
12
|
+
._16jlkb7n{flex-grow:1}
|
|
13
|
+
._18m915vq{overflow-y:hidden}
|
|
14
|
+
._18m91wug{overflow-y:auto}
|
|
15
|
+
._18postnw:after{position:absolute}
|
|
16
|
+
._19bvu2gc{padding-left:var(--ds-space-100,8px)}
|
|
17
|
+
._19doidpf:after{left:0}
|
|
18
|
+
._1bqqidpf:after{z-index:0}
|
|
19
|
+
._1bsb7vkz{width:1pc}
|
|
20
|
+
._1e0c1txw{display:flex}
|
|
21
|
+
._1hfk18uv:after{background-color:initial}
|
|
22
|
+
._1hfkhp5a:after{background-color:var(--ds-surface-raised,#fff)}
|
|
23
|
+
._1ifiidpf .embed-header{opacity:0}
|
|
24
|
+
._1ifikb7n .embed-header{opacity:1}
|
|
25
|
+
._1pbykb7n{z-index:1}
|
|
26
|
+
._1reo15vq{overflow-x:hidden}
|
|
27
|
+
._1reo1wug{overflow-x:auto}
|
|
28
|
+
._1x88idpf:after{bottom:0}
|
|
29
|
+
._2lx21bp4{flex-direction:column}
|
|
30
|
+
._32rxidpf:after{right:0}
|
|
31
|
+
._4cvr1h6o{align-items:center}
|
|
32
|
+
._4t3i1osq{height:100%}
|
|
33
|
+
._4t3i7vkz{height:1pc}
|
|
34
|
+
._4t3igktf{height:20px}
|
|
35
|
+
._4t3ik5xz{height:27pc}
|
|
36
|
+
._4tpuhp5a:hover:after{background-color:var(--ds-surface-raised,#fff)}
|
|
37
|
+
._8x3u92p9:after{box-shadow:0 0 0 3px var(--ds-border-selected,#0c66e4)}
|
|
38
|
+
._aetrb3bt:after{content:""}
|
|
39
|
+
._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
|
|
40
|
+
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
41
|
+
._kqswh2mm{position:relative}
|
|
42
|
+
._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
|
|
43
|
+
._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
|
|
44
|
+
._u94kidpf:after{flex-grow:0}
|
|
45
|
+
._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
|
|
46
|
+
._x148kb7n:hover .embed-header{opacity:1}
|
|
47
|
+
._1bnxglyw:hover{text-decoration-line:none}
|
|
48
|
+
._9oik18uv:hover{text-decoration-color:initial}
|
|
49
|
+
._jf4cnqa1:hover{text-decoration-style:solid}
|
|
50
|
+
._1jhm1ips:active{outline:8px solid var(--ds-background-selected,#e9f2ff)}
|
|
@@ -7,8 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
9
|
exports.ExpandedFrame = void 0;
|
|
10
|
+
require("./ExpandedFrame.compiled.css");
|
|
10
11
|
var React = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
15
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
14
16
|
var _useLinkClicked = require("../../../state/analytics/useLinkClicked");
|
|
@@ -45,18 +47,35 @@ var ExpandedFrameNew = function ExpandedFrameNew(_ref) {
|
|
|
45
47
|
};
|
|
46
48
|
var handleMouseDown = (0, _useLinkClicked.useMouseDownEvent)();
|
|
47
49
|
var renderHeader = function renderHeader() {
|
|
50
|
+
if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
|
|
51
|
+
return frameStyle !== 'hide' && /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: (0, _runtime.ax)([styles.header, "embed-header"])
|
|
53
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: (0, _runtime.ax)([styles.headerIcon])
|
|
55
|
+
}, icon), /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
className: (0, _runtime.ax)([styles.tooltipWrapper])
|
|
57
|
+
}, !isPlaceholder && /*#__PURE__*/React.createElement(_tooltip.default, {
|
|
58
|
+
content: text,
|
|
59
|
+
hideTooltipOnMouseDown: true
|
|
60
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
61
|
+
href: href,
|
|
62
|
+
onClick: handleClick,
|
|
63
|
+
onMouseDown: handleMouseDown,
|
|
64
|
+
className: (0, _runtime.ax)([styles.headerAnchor])
|
|
65
|
+
}, text))));
|
|
66
|
+
}
|
|
48
67
|
return (
|
|
49
68
|
/*#__PURE__*/
|
|
50
69
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
51
|
-
React.createElement(_styled.
|
|
70
|
+
React.createElement(_styled.HeaderOldVisualRefresh, {
|
|
52
71
|
className: "embed-header",
|
|
53
72
|
frameStyle: frameStyle
|
|
54
|
-
}, /*#__PURE__*/React.createElement(_styled.
|
|
73
|
+
}, /*#__PURE__*/React.createElement(_styled.IconWrapperOldVisualRefresh, {
|
|
55
74
|
isPlaceholder: isPlaceholder
|
|
56
|
-
}, !isPlaceholder && icon), /*#__PURE__*/React.createElement(_styled.
|
|
75
|
+
}, !isPlaceholder && icon), /*#__PURE__*/React.createElement(_styled.TooltipWrapperOldVisualRefresh, null, /*#__PURE__*/React.createElement(_tooltip.default, {
|
|
57
76
|
content: text,
|
|
58
77
|
hideTooltipOnMouseDown: true
|
|
59
|
-
}, /*#__PURE__*/React.createElement(_styled.
|
|
78
|
+
}, /*#__PURE__*/React.createElement(_styled.TextWrapperOldVisualRefresh, {
|
|
60
79
|
isPlaceholder: isPlaceholder
|
|
61
80
|
}, !isPlaceholder && /*#__PURE__*/React.createElement("a", {
|
|
62
81
|
href: href,
|
|
@@ -65,8 +84,20 @@ var ExpandedFrameNew = function ExpandedFrameNew(_ref) {
|
|
|
65
84
|
}, text)))))
|
|
66
85
|
);
|
|
67
86
|
};
|
|
87
|
+
var interactive = isInteractive();
|
|
88
|
+
var showBackgroundAlways = frameStyle === 'show' || isSelected && frameStyle !== 'hide';
|
|
89
|
+
var showBackgroundOnHover = interactive && frameStyle !== 'hide';
|
|
68
90
|
var renderContent = function renderContent() {
|
|
69
|
-
|
|
91
|
+
if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
|
|
92
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
"data-testid": "embed-content-wrapper",
|
|
94
|
+
// This fixes an issue with input fields in cross domain iframes (ie. databases and jira fields from different domains)
|
|
95
|
+
// See: HOT-107830
|
|
96
|
+
contentEditable: false,
|
|
97
|
+
className: (0, _runtime.ax)([styles.contentStyle, setOverflow && allowScrollBar && styles.contentOverflowAuto, interactive && !showBackgroundAlways && !showBackgroundOnHover && styles.contentInteractiveActiveBorder])
|
|
98
|
+
}, children);
|
|
99
|
+
}
|
|
100
|
+
return /*#__PURE__*/React.createElement(_styled.ContentOldVisualRefresh, {
|
|
70
101
|
"data-testid": "embed-content-wrapper",
|
|
71
102
|
allowScrollBar: allowScrollBar,
|
|
72
103
|
removeOverflow: !setOverflow,
|
|
@@ -79,8 +110,26 @@ var ExpandedFrameNew = function ExpandedFrameNew(_ref) {
|
|
|
79
110
|
suppressContentEditableWarning: true
|
|
80
111
|
}, children);
|
|
81
112
|
};
|
|
113
|
+
if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
|
|
114
|
+
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
115
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
116
|
+
className: (0, _runtime.ax)([styles.linkWrapper, inheritDimensions && styles.linkWrapperInheritDimensions, isSelected && frameStyle !== 'hide' && styles.linkWrapperSelected, showBackgroundAlways && styles.linkWrapperBorderAndBackground, showBackgroundOnHover && !showBackgroundAlways && styles.linkWrapperInteractiveNotHidden, _styled.className]),
|
|
117
|
+
style: {
|
|
118
|
+
minWidth: minWidth ? "".concat(minWidth, "px") : '',
|
|
119
|
+
maxWidth: maxWidth ? "".concat(maxWidth, "px") : ''
|
|
120
|
+
},
|
|
121
|
+
"data-testid": testId,
|
|
122
|
+
"data-trello-do-not-use-override": testId
|
|
123
|
+
// Due to limitations of testing library, we can't assert ::after
|
|
124
|
+
,
|
|
125
|
+
"data-is-selected": isSelected
|
|
126
|
+
}, (isPlaceholder || !href) && {
|
|
127
|
+
'data-wrapper-type': 'default',
|
|
128
|
+
'data-is-interactive': isInteractive()
|
|
129
|
+
}), renderHeader(), renderContent());
|
|
130
|
+
}
|
|
82
131
|
if (!isPlaceholder && href) {
|
|
83
|
-
return /*#__PURE__*/React.createElement(_styled.
|
|
132
|
+
return /*#__PURE__*/React.createElement(_styled.LinkWrapperOldVisualRefresh
|
|
84
133
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
85
134
|
, {
|
|
86
135
|
className: _styled.className,
|
|
@@ -97,7 +146,7 @@ var ExpandedFrameNew = function ExpandedFrameNew(_ref) {
|
|
|
97
146
|
inheritDimensions: inheritDimensions
|
|
98
147
|
}, renderHeader(), renderContent());
|
|
99
148
|
} else {
|
|
100
|
-
return /*#__PURE__*/React.createElement(_styled.
|
|
149
|
+
return /*#__PURE__*/React.createElement(_styled.WrapperOldVisualRefresh
|
|
101
150
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
102
151
|
, {
|
|
103
152
|
className: _styled.className,
|
|
@@ -120,4 +169,18 @@ var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(props) {
|
|
|
120
169
|
} else {
|
|
121
170
|
return /*#__PURE__*/React.createElement(_ExpandedFrameOld.ExpandedFrameOld, props);
|
|
122
171
|
}
|
|
172
|
+
};
|
|
173
|
+
var styles = {
|
|
174
|
+
linkWrapper: "_zulpu2gc _kqswh2mm _1e0c1txw _2lx21bp4 _4t3ik5xz _ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvu2gc _uiztglyw _qc5o94zs _14mj1crf _aetrb3bt _18postnw _15l2idpf _32rxidpf _1x88idpf _19doidpf _1hfk18uv _1bqqidpf _u94kidpf _1ifiidpf",
|
|
175
|
+
linkWrapperInheritDimensions: "_4t3i1osq",
|
|
176
|
+
linkWrapperSelected: "_8x3u92p9",
|
|
177
|
+
linkWrapperBorderAndBackground: "_1tqzzgxb _1hfkhp5a _1ifikb7n",
|
|
178
|
+
linkWrapperInteractiveNotHidden: "_hcgvzgxb _4tpuhp5a _x148kb7n",
|
|
179
|
+
header: "_zulp1b66 _1e0c1txw _4cvr1h6o _4t3igktf _1pbykb7n",
|
|
180
|
+
tooltipWrapper: "_1reo15vq _18m915vq",
|
|
181
|
+
headerAnchor: "_11c81il0 _9oik18uv _1bnxglyw _jf4cnqa1",
|
|
182
|
+
headerIcon: "_1bsb7vkz _4t3i7vkz",
|
|
183
|
+
contentStyle: "_19it1pvm _2rko1y44 _1reo15vq _18m915vq _v56414au _bfhkhp5a _16jlkb7n _4t3i1osq _1pbykb7n",
|
|
184
|
+
contentInteractiveActiveBorder: "_1jhm1ips",
|
|
185
|
+
contentOverflowAuto: "_1reo1wug _18m91wug"
|
|
123
186
|
};
|
|
@@ -6,7 +6,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.embedHeaderHeight = exports.className = exports.
|
|
9
|
+
exports.embedHeaderHeight = exports.className = exports.WrapperOldVisualRefresh = exports.TooltipWrapperOldVisualRefresh = exports.Thumbnail = exports.TextWrapperOldVisualRefresh = exports.LinkWrapperOldVisualRefresh = exports.Image = exports.IconWrapperOldVisualRefresh = exports.HeaderOldVisualRefresh = exports.ContentOldVisualRefresh = void 0;
|
|
10
10
|
require("./styled.compiled.css");
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var React = _react;
|
|
@@ -37,8 +37,9 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
37
37
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
38
38
|
var className = exports.className = 'media-card-frame';
|
|
39
39
|
var embedHeaderHeight = exports.embedHeaderHeight = 32;
|
|
40
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
40
41
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
41
|
-
var
|
|
42
|
+
var LinkWrapperOldVisualRefresh = exports.LinkWrapperOldVisualRefresh = (0, _react.forwardRef)(function (_ref, __cmplr) {
|
|
42
43
|
var _ref$as = _ref.as,
|
|
43
44
|
C = _ref$as === void 0 ? "div" : _ref$as,
|
|
44
45
|
__cmpls = _ref.style,
|
|
@@ -60,11 +61,12 @@ var LinkWrapper = exports.LinkWrapper = (0, _react.forwardRef)(function (_ref, _
|
|
|
60
61
|
}));
|
|
61
62
|
});
|
|
62
63
|
|
|
64
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
63
65
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
64
66
|
if (process.env.NODE_ENV !== 'production') {
|
|
65
|
-
|
|
67
|
+
LinkWrapperOldVisualRefresh.displayName = 'LinkWrapperOldVisualRefresh';
|
|
66
68
|
}
|
|
67
|
-
var
|
|
69
|
+
var WrapperOldVisualRefresh = exports.WrapperOldVisualRefresh = (0, _react.forwardRef)(function (_ref2, __cmplr) {
|
|
68
70
|
var _ref2$as = _ref2.as,
|
|
69
71
|
C = _ref2$as === void 0 ? "div" : _ref2$as,
|
|
70
72
|
__cmpls = _ref2.style,
|
|
@@ -86,11 +88,12 @@ var Wrapper = exports.Wrapper = (0, _react.forwardRef)(function (_ref2, __cmplr)
|
|
|
86
88
|
}));
|
|
87
89
|
});
|
|
88
90
|
|
|
91
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
89
92
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
90
93
|
if (process.env.NODE_ENV !== 'production') {
|
|
91
|
-
|
|
94
|
+
WrapperOldVisualRefresh.displayName = 'WrapperOldVisualRefresh';
|
|
92
95
|
}
|
|
93
|
-
var
|
|
96
|
+
var HeaderOldVisualRefresh = exports.HeaderOldVisualRefresh = (0, _react.forwardRef)(function (_ref3, __cmplr) {
|
|
94
97
|
var _ref3$as = _ref3.as,
|
|
95
98
|
C = _ref3$as === void 0 ? "div" : _ref3$as,
|
|
96
99
|
__cmpls = _ref3.style,
|
|
@@ -104,11 +107,12 @@ var Header = exports.Header = (0, _react.forwardRef)(function (_ref3, __cmplr) {
|
|
|
104
107
|
}));
|
|
105
108
|
});
|
|
106
109
|
|
|
110
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
107
111
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
108
112
|
if (process.env.NODE_ENV !== 'production') {
|
|
109
|
-
|
|
113
|
+
HeaderOldVisualRefresh.displayName = 'HeaderOldVisualRefresh';
|
|
110
114
|
}
|
|
111
|
-
var
|
|
115
|
+
var IconWrapperOldVisualRefresh = exports.IconWrapperOldVisualRefresh = (0, _react.forwardRef)(function (_ref4, __cmplr) {
|
|
112
116
|
var _ref4$as = _ref4.as,
|
|
113
117
|
C = _ref4$as === void 0 ? "div" : _ref4$as,
|
|
114
118
|
__cmpls = _ref4.style,
|
|
@@ -122,11 +126,12 @@ var IconWrapper = exports.IconWrapper = (0, _react.forwardRef)(function (_ref4,
|
|
|
122
126
|
}));
|
|
123
127
|
});
|
|
124
128
|
|
|
129
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
125
130
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
126
131
|
if (process.env.NODE_ENV !== 'production') {
|
|
127
|
-
|
|
132
|
+
IconWrapperOldVisualRefresh.displayName = 'IconWrapperOldVisualRefresh';
|
|
128
133
|
}
|
|
129
|
-
var
|
|
134
|
+
var TextWrapperOldVisualRefresh = exports.TextWrapperOldVisualRefresh = (0, _react.forwardRef)(function (_ref5, __cmplr) {
|
|
130
135
|
var _ref5$as = _ref5.as,
|
|
131
136
|
C = _ref5$as === void 0 ? "div" : _ref5$as,
|
|
132
137
|
__cmpls = _ref5.style,
|
|
@@ -140,11 +145,12 @@ var TextWrapper = exports.TextWrapper = (0, _react.forwardRef)(function (_ref5,
|
|
|
140
145
|
}));
|
|
141
146
|
});
|
|
142
147
|
|
|
148
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
143
149
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
144
150
|
if (process.env.NODE_ENV !== 'production') {
|
|
145
|
-
|
|
151
|
+
TextWrapperOldVisualRefresh.displayName = 'TextWrapperOldVisualRefresh';
|
|
146
152
|
}
|
|
147
|
-
var
|
|
153
|
+
var TooltipWrapperOldVisualRefresh = exports.TooltipWrapperOldVisualRefresh = (0, _react.forwardRef)(function (_ref6, __cmplr) {
|
|
148
154
|
var _ref6$as = _ref6.as,
|
|
149
155
|
C = _ref6$as === void 0 ? "div" : _ref6$as,
|
|
150
156
|
__cmpls = _ref6.style,
|
|
@@ -156,14 +162,15 @@ var TooltipWrapper = exports.TooltipWrapper = (0, _react.forwardRef)(function (_
|
|
|
156
162
|
}));
|
|
157
163
|
});
|
|
158
164
|
|
|
165
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
159
166
|
// NB: `overflow` is kept as `hidden` since
|
|
160
167
|
// the internal contents of the `iframe` should
|
|
161
168
|
// manage scrolling behaviour.
|
|
162
169
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
163
170
|
if (process.env.NODE_ENV !== 'production') {
|
|
164
|
-
|
|
171
|
+
TooltipWrapperOldVisualRefresh.displayName = 'TooltipWrapperOldVisualRefresh';
|
|
165
172
|
}
|
|
166
|
-
var
|
|
173
|
+
var ContentOldVisualRefresh = exports.ContentOldVisualRefresh = (0, _react.forwardRef)(function (_ref7, __cmplr) {
|
|
167
174
|
var _ref7$as = _ref7.as,
|
|
168
175
|
C = _ref7$as === void 0 ? "div" : _ref7$as,
|
|
169
176
|
__cmpls = _ref7.style,
|
|
@@ -179,7 +186,7 @@ var Content = exports.Content = (0, _react.forwardRef)(function (_ref7, __cmplr)
|
|
|
179
186
|
}));
|
|
180
187
|
});
|
|
181
188
|
if (process.env.NODE_ENV !== 'production') {
|
|
182
|
-
|
|
189
|
+
ContentOldVisualRefresh.displayName = 'ContentOldVisualRefresh';
|
|
183
190
|
}
|
|
184
191
|
var getSizeWithUnit = function getSizeWithUnit() {
|
|
185
192
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
|
|
@@ -19,13 +19,16 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
19
19
|
var ActionButton = exports.ActionButton = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
20
20
|
var children = _ref.children,
|
|
21
21
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
22
|
+
// `Button transforms `testId` into `data-testid`. We need to transform it back to `testId`
|
|
23
|
+
var testId = props["data-testid"];
|
|
22
24
|
return /*#__PURE__*/_react.default.createElement(_primitives.Box, (0, _extends2.default)({
|
|
23
25
|
as: "span",
|
|
24
26
|
ref: ref,
|
|
25
27
|
xcss: [actionButtonStyle, !props.disabled && actionButtonNotDisabledStyle]
|
|
26
28
|
}, props, {
|
|
27
29
|
"aria-disabled": props.disabled,
|
|
28
|
-
role: "button"
|
|
30
|
+
role: "button",
|
|
31
|
+
testId: testId
|
|
29
32
|
}), /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
30
33
|
as: "span",
|
|
31
34
|
xcss: internalButtonStyle
|
|
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
20
20
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
21
21
|
var PACKAGE_DATA = {
|
|
22
22
|
packageName: "@atlaskit/smart-card",
|
|
23
|
-
packageVersion: "34.10.
|
|
23
|
+
packageVersion: "34.10.4",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -9,6 +9,8 @@ exports.default = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
+
var _primitives = require("@atlaskit/primitives");
|
|
12
14
|
var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
|
|
13
15
|
var _constants = require("../../constants");
|
|
14
16
|
var _messages = require("../../messages");
|
|
@@ -33,7 +35,12 @@ var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
|
|
|
33
35
|
values: {
|
|
34
36
|
context: providerName
|
|
35
37
|
}
|
|
36
|
-
})) : /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.connect_unauthorised_account_description_no_provider), ' ', /*#__PURE__*/_react.default.createElement(
|
|
38
|
+
})) : /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.connect_unauthorised_account_description_no_provider), ' ', (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? /*#__PURE__*/_react.default.createElement(_primitives.Anchor, {
|
|
39
|
+
href: isProductIntegrationSupported ? _constants.CONTENT_URL_3P_ACCOUNT_AUTH : _constants.CONTENT_URL_SECURITY_AND_PERMISSIONS,
|
|
40
|
+
target: "_blank",
|
|
41
|
+
testId: "".concat(testId, "-learn-more"),
|
|
42
|
+
onClick: handleLearnMoreClick
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, learnMoreMessage)) : /*#__PURE__*/_react.default.createElement("a", {
|
|
37
44
|
href: isProductIntegrationSupported ? _constants.CONTENT_URL_3P_ACCOUNT_AUTH : _constants.CONTENT_URL_SECURITY_AND_PERMISSIONS,
|
|
38
45
|
target: "_blank",
|
|
39
46
|
"data-testid": "".concat(testId, "-learn-more"),
|
|
@@ -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: "34.10.
|
|
5
|
+
packageVersion: "34.10.4"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
._11c81il0{font:var(--ds-font-heading-xsmall,normal 600 14px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._14mj1crf:after{border-radius:9pt}
|
|
3
|
+
._19it1pvm{border:solid 1px var(--ds-border,#091e4224)}
|
|
4
|
+
._1tqzzgxb:after{outline:1px solid var(--ds-border,#091e4224)}
|
|
5
|
+
._2rko1y44{border-radius:4px}
|
|
6
|
+
._hcgvzgxb:hover:after{outline:1px solid var(--ds-border,#091e4224)}
|
|
7
|
+
._qc5o94zs:after{transition:background .3s,box-shadow .3s}
|
|
8
|
+
._v56414au{transition:outline .3s}
|
|
9
|
+
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
10
|
+
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
11
|
+
._15l2idpf:after{top:0}
|
|
12
|
+
._16jlkb7n{flex-grow:1}
|
|
13
|
+
._18m915vq{overflow-y:hidden}
|
|
14
|
+
._18m91wug{overflow-y:auto}
|
|
15
|
+
._18postnw:after{position:absolute}
|
|
16
|
+
._19bvu2gc{padding-left:var(--ds-space-100,8px)}
|
|
17
|
+
._19doidpf:after{left:0}
|
|
18
|
+
._1bqqidpf:after{z-index:0}
|
|
19
|
+
._1bsb7vkz{width:1pc}
|
|
20
|
+
._1e0c1txw{display:flex}
|
|
21
|
+
._1hfk18uv:after{background-color:initial}
|
|
22
|
+
._1hfkhp5a:after{background-color:var(--ds-surface-raised,#fff)}
|
|
23
|
+
._1ifiidpf .embed-header{opacity:0}
|
|
24
|
+
._1ifikb7n .embed-header{opacity:1}
|
|
25
|
+
._1pbykb7n{z-index:1}
|
|
26
|
+
._1reo15vq{overflow-x:hidden}
|
|
27
|
+
._1reo1wug{overflow-x:auto}
|
|
28
|
+
._1x88idpf:after{bottom:0}
|
|
29
|
+
._2lx21bp4{flex-direction:column}
|
|
30
|
+
._32rxidpf:after{right:0}
|
|
31
|
+
._4cvr1h6o{align-items:center}
|
|
32
|
+
._4t3i1osq{height:100%}
|
|
33
|
+
._4t3i7vkz{height:1pc}
|
|
34
|
+
._4t3igktf{height:20px}
|
|
35
|
+
._4t3ik5xz{height:27pc}
|
|
36
|
+
._4tpuhp5a:hover:after{background-color:var(--ds-surface-raised,#fff)}
|
|
37
|
+
._8x3u92p9:after{box-shadow:0 0 0 3px var(--ds-border-selected,#0c66e4)}
|
|
38
|
+
._aetrb3bt:after{content:""}
|
|
39
|
+
._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
|
|
40
|
+
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
41
|
+
._kqswh2mm{position:relative}
|
|
42
|
+
._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
|
|
43
|
+
._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
|
|
44
|
+
._u94kidpf:after{flex-grow:0}
|
|
45
|
+
._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
|
|
46
|
+
._x148kb7n:hover .embed-header{opacity:1}
|
|
47
|
+
._1bnxglyw:hover{text-decoration-line:none}
|
|
48
|
+
._9oik18uv:hover{text-decoration-color:initial}
|
|
49
|
+
._jf4cnqa1:hover{text-decoration-style:solid}
|
|
50
|
+
._1jhm1ips:active{outline:8px solid var(--ds-background-selected,#e9f2ff)}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/* ExpandedFrame.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./ExpandedFrame.compiled.css";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -6,7 +8,7 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
6
8
|
import { useMouseDownEvent } from '../../../state/analytics/useLinkClicked';
|
|
7
9
|
import { handleClickCommon } from '../../common/utils';
|
|
8
10
|
import { ExpandedFrameOld } from './ExpandedFrameOld';
|
|
9
|
-
import { className,
|
|
11
|
+
import { className, ContentOldVisualRefresh, HeaderOldVisualRefresh, IconWrapperOldVisualRefresh, LinkWrapperOldVisualRefresh, TextWrapperOldVisualRefresh, TooltipWrapperOldVisualRefresh, WrapperOldVisualRefresh } from './styled';
|
|
10
12
|
const ExpandedFrameNew = ({
|
|
11
13
|
isPlaceholder = false,
|
|
12
14
|
children,
|
|
@@ -27,18 +29,35 @@ const ExpandedFrameNew = ({
|
|
|
27
29
|
const handleClick = event => handleClickCommon(event, onClick);
|
|
28
30
|
const handleMouseDown = useMouseDownEvent();
|
|
29
31
|
const renderHeader = () => {
|
|
32
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
33
|
+
return frameStyle !== 'hide' && /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: ax([styles.header, "embed-header"])
|
|
35
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: ax([styles.headerIcon])
|
|
37
|
+
}, icon), /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: ax([styles.tooltipWrapper])
|
|
39
|
+
}, !isPlaceholder && /*#__PURE__*/React.createElement(Tooltip, {
|
|
40
|
+
content: text,
|
|
41
|
+
hideTooltipOnMouseDown: true
|
|
42
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
43
|
+
href: href,
|
|
44
|
+
onClick: handleClick,
|
|
45
|
+
onMouseDown: handleMouseDown,
|
|
46
|
+
className: ax([styles.headerAnchor])
|
|
47
|
+
}, text))));
|
|
48
|
+
}
|
|
30
49
|
return (
|
|
31
50
|
/*#__PURE__*/
|
|
32
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
33
|
-
React.createElement(
|
|
52
|
+
React.createElement(HeaderOldVisualRefresh, {
|
|
34
53
|
className: "embed-header",
|
|
35
54
|
frameStyle: frameStyle
|
|
36
|
-
}, /*#__PURE__*/React.createElement(
|
|
55
|
+
}, /*#__PURE__*/React.createElement(IconWrapperOldVisualRefresh, {
|
|
37
56
|
isPlaceholder: isPlaceholder
|
|
38
|
-
}, !isPlaceholder && icon), /*#__PURE__*/React.createElement(
|
|
57
|
+
}, !isPlaceholder && icon), /*#__PURE__*/React.createElement(TooltipWrapperOldVisualRefresh, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
39
58
|
content: text,
|
|
40
59
|
hideTooltipOnMouseDown: true
|
|
41
|
-
}, /*#__PURE__*/React.createElement(
|
|
60
|
+
}, /*#__PURE__*/React.createElement(TextWrapperOldVisualRefresh, {
|
|
42
61
|
isPlaceholder: isPlaceholder
|
|
43
62
|
}, !isPlaceholder && /*#__PURE__*/React.createElement("a", {
|
|
44
63
|
href: href,
|
|
@@ -47,8 +66,20 @@ const ExpandedFrameNew = ({
|
|
|
47
66
|
}, text)))))
|
|
48
67
|
);
|
|
49
68
|
};
|
|
69
|
+
const interactive = isInteractive();
|
|
70
|
+
const showBackgroundAlways = frameStyle === 'show' || isSelected && frameStyle !== 'hide';
|
|
71
|
+
const showBackgroundOnHover = interactive && frameStyle !== 'hide';
|
|
50
72
|
const renderContent = () => {
|
|
51
|
-
|
|
73
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
74
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
75
|
+
"data-testid": "embed-content-wrapper",
|
|
76
|
+
// This fixes an issue with input fields in cross domain iframes (ie. databases and jira fields from different domains)
|
|
77
|
+
// See: HOT-107830
|
|
78
|
+
contentEditable: false,
|
|
79
|
+
className: ax([styles.contentStyle, setOverflow && allowScrollBar && styles.contentOverflowAuto, interactive && !showBackgroundAlways && !showBackgroundOnHover && styles.contentInteractiveActiveBorder])
|
|
80
|
+
}, children);
|
|
81
|
+
}
|
|
82
|
+
return /*#__PURE__*/React.createElement(ContentOldVisualRefresh, {
|
|
52
83
|
"data-testid": "embed-content-wrapper",
|
|
53
84
|
allowScrollBar: allowScrollBar,
|
|
54
85
|
removeOverflow: !setOverflow,
|
|
@@ -61,8 +92,26 @@ const ExpandedFrameNew = ({
|
|
|
61
92
|
suppressContentEditableWarning: true
|
|
62
93
|
}, children);
|
|
63
94
|
};
|
|
95
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
96
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
97
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
98
|
+
className: ax([styles.linkWrapper, inheritDimensions && styles.linkWrapperInheritDimensions, isSelected && frameStyle !== 'hide' && styles.linkWrapperSelected, showBackgroundAlways && styles.linkWrapperBorderAndBackground, showBackgroundOnHover && !showBackgroundAlways && styles.linkWrapperInteractiveNotHidden, className]),
|
|
99
|
+
style: {
|
|
100
|
+
minWidth: minWidth ? `${minWidth}px` : '',
|
|
101
|
+
maxWidth: maxWidth ? `${maxWidth}px` : ''
|
|
102
|
+
},
|
|
103
|
+
"data-testid": testId,
|
|
104
|
+
"data-trello-do-not-use-override": testId
|
|
105
|
+
// Due to limitations of testing library, we can't assert ::after
|
|
106
|
+
,
|
|
107
|
+
"data-is-selected": isSelected
|
|
108
|
+
}, (isPlaceholder || !href) && {
|
|
109
|
+
'data-wrapper-type': 'default',
|
|
110
|
+
'data-is-interactive': isInteractive()
|
|
111
|
+
}), renderHeader(), renderContent());
|
|
112
|
+
}
|
|
64
113
|
if (!isPlaceholder && href) {
|
|
65
|
-
return /*#__PURE__*/React.createElement(
|
|
114
|
+
return /*#__PURE__*/React.createElement(LinkWrapperOldVisualRefresh
|
|
66
115
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
67
116
|
, {
|
|
68
117
|
className: className,
|
|
@@ -79,7 +128,7 @@ const ExpandedFrameNew = ({
|
|
|
79
128
|
inheritDimensions: inheritDimensions
|
|
80
129
|
}, renderHeader(), renderContent());
|
|
81
130
|
} else {
|
|
82
|
-
return /*#__PURE__*/React.createElement(
|
|
131
|
+
return /*#__PURE__*/React.createElement(WrapperOldVisualRefresh
|
|
83
132
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
84
133
|
, {
|
|
85
134
|
className: className,
|
|
@@ -102,4 +151,18 @@ export const ExpandedFrame = props => {
|
|
|
102
151
|
} else {
|
|
103
152
|
return /*#__PURE__*/React.createElement(ExpandedFrameOld, props);
|
|
104
153
|
}
|
|
154
|
+
};
|
|
155
|
+
const styles = {
|
|
156
|
+
linkWrapper: "_zulpu2gc _kqswh2mm _1e0c1txw _2lx21bp4 _4t3ik5xz _ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvu2gc _uiztglyw _qc5o94zs _14mj1crf _aetrb3bt _18postnw _15l2idpf _32rxidpf _1x88idpf _19doidpf _1hfk18uv _1bqqidpf _u94kidpf _1ifiidpf",
|
|
157
|
+
linkWrapperInheritDimensions: "_4t3i1osq",
|
|
158
|
+
linkWrapperSelected: "_8x3u92p9",
|
|
159
|
+
linkWrapperBorderAndBackground: "_1tqzzgxb _1hfkhp5a _1ifikb7n",
|
|
160
|
+
linkWrapperInteractiveNotHidden: "_hcgvzgxb _4tpuhp5a _x148kb7n",
|
|
161
|
+
header: "_zulp1b66 _1e0c1txw _4cvr1h6o _4t3igktf _1pbykb7n",
|
|
162
|
+
tooltipWrapper: "_1reo15vq _18m915vq",
|
|
163
|
+
headerAnchor: "_11c81il0 _9oik18uv _1bnxglyw _jf4cnqa1",
|
|
164
|
+
headerIcon: "_1bsb7vkz _4t3i7vkz",
|
|
165
|
+
contentStyle: "_19it1pvm _2rko1y44 _1reo15vq _18m915vq _v56414au _bfhkhp5a _16jlkb7n _4t3i1osq _1pbykb7n",
|
|
166
|
+
contentInteractiveActiveBorder: "_1jhm1ips",
|
|
167
|
+
contentOverflowAuto: "_1reo1wug _18m91wug"
|
|
105
168
|
};
|
|
@@ -9,8 +9,9 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
9
9
|
import { B100, B50, N30, N300, N40 } from '@atlaskit/theme/colors';
|
|
10
10
|
export const className = 'media-card-frame';
|
|
11
11
|
export const embedHeaderHeight = 32;
|
|
12
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
12
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
13
|
-
export const
|
|
14
|
+
export const LinkWrapperOldVisualRefresh = forwardRef(({
|
|
14
15
|
as: C = "div",
|
|
15
16
|
style: __cmpls,
|
|
16
17
|
...__cmplp
|
|
@@ -35,11 +36,12 @@ export const LinkWrapper = forwardRef(({
|
|
|
35
36
|
}));
|
|
36
37
|
});
|
|
37
38
|
|
|
39
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
38
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
39
41
|
if (process.env.NODE_ENV !== 'production') {
|
|
40
|
-
|
|
42
|
+
LinkWrapperOldVisualRefresh.displayName = 'LinkWrapperOldVisualRefresh';
|
|
41
43
|
}
|
|
42
|
-
export const
|
|
44
|
+
export const WrapperOldVisualRefresh = forwardRef(({
|
|
43
45
|
as: C = "div",
|
|
44
46
|
style: __cmpls,
|
|
45
47
|
...__cmplp
|
|
@@ -64,11 +66,12 @@ export const Wrapper = forwardRef(({
|
|
|
64
66
|
}));
|
|
65
67
|
});
|
|
66
68
|
|
|
69
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
67
70
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
68
71
|
if (process.env.NODE_ENV !== 'production') {
|
|
69
|
-
|
|
72
|
+
WrapperOldVisualRefresh.displayName = 'WrapperOldVisualRefresh';
|
|
70
73
|
}
|
|
71
|
-
export const
|
|
74
|
+
export const HeaderOldVisualRefresh = forwardRef(({
|
|
72
75
|
as: C = "div",
|
|
73
76
|
style: __cmpls,
|
|
74
77
|
...__cmplp
|
|
@@ -84,11 +87,12 @@ export const Header = forwardRef(({
|
|
|
84
87
|
}));
|
|
85
88
|
});
|
|
86
89
|
|
|
90
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
87
91
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
88
92
|
if (process.env.NODE_ENV !== 'production') {
|
|
89
|
-
|
|
93
|
+
HeaderOldVisualRefresh.displayName = 'HeaderOldVisualRefresh';
|
|
90
94
|
}
|
|
91
|
-
export const
|
|
95
|
+
export const IconWrapperOldVisualRefresh = forwardRef(({
|
|
92
96
|
as: C = "div",
|
|
93
97
|
style: __cmpls,
|
|
94
98
|
...__cmplp
|
|
@@ -104,11 +108,12 @@ export const IconWrapper = forwardRef(({
|
|
|
104
108
|
}));
|
|
105
109
|
});
|
|
106
110
|
|
|
111
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
107
112
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
108
113
|
if (process.env.NODE_ENV !== 'production') {
|
|
109
|
-
|
|
114
|
+
IconWrapperOldVisualRefresh.displayName = 'IconWrapperOldVisualRefresh';
|
|
110
115
|
}
|
|
111
|
-
export const
|
|
116
|
+
export const TextWrapperOldVisualRefresh = forwardRef(({
|
|
112
117
|
as: C = "div",
|
|
113
118
|
style: __cmpls,
|
|
114
119
|
...__cmplp
|
|
@@ -124,11 +129,12 @@ export const TextWrapper = forwardRef(({
|
|
|
124
129
|
}));
|
|
125
130
|
});
|
|
126
131
|
|
|
132
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
127
133
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
128
134
|
if (process.env.NODE_ENV !== 'production') {
|
|
129
|
-
|
|
135
|
+
TextWrapperOldVisualRefresh.displayName = 'TextWrapperOldVisualRefresh';
|
|
130
136
|
}
|
|
131
|
-
export const
|
|
137
|
+
export const TooltipWrapperOldVisualRefresh = forwardRef(({
|
|
132
138
|
as: C = "div",
|
|
133
139
|
style: __cmpls,
|
|
134
140
|
...__cmplp
|
|
@@ -140,14 +146,15 @@ export const TooltipWrapper = forwardRef(({
|
|
|
140
146
|
}));
|
|
141
147
|
});
|
|
142
148
|
|
|
149
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
143
150
|
// NB: `overflow` is kept as `hidden` since
|
|
144
151
|
// the internal contents of the `iframe` should
|
|
145
152
|
// manage scrolling behaviour.
|
|
146
153
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
147
154
|
if (process.env.NODE_ENV !== 'production') {
|
|
148
|
-
|
|
155
|
+
TooltipWrapperOldVisualRefresh.displayName = 'TooltipWrapperOldVisualRefresh';
|
|
149
156
|
}
|
|
150
|
-
export const
|
|
157
|
+
export const ContentOldVisualRefresh = forwardRef(({
|
|
151
158
|
as: C = "div",
|
|
152
159
|
style: __cmpls,
|
|
153
160
|
...__cmplp
|
|
@@ -165,7 +172,7 @@ export const Content = forwardRef(({
|
|
|
165
172
|
}));
|
|
166
173
|
});
|
|
167
174
|
if (process.env.NODE_ENV !== 'production') {
|
|
168
|
-
|
|
175
|
+
ContentOldVisualRefresh.displayName = 'ContentOldVisualRefresh';
|
|
169
176
|
}
|
|
170
177
|
const getSizeWithUnit = (value = '100%') => {
|
|
171
178
|
const unit = typeof value === 'number' ? 'px' : '';
|
|
@@ -8,13 +8,18 @@ export const ActionButton = /*#__PURE__*/forwardRef(({
|
|
|
8
8
|
children,
|
|
9
9
|
...props
|
|
10
10
|
}, ref) => {
|
|
11
|
+
// `Button transforms `testId` into `data-testid`. We need to transform it back to `testId`
|
|
12
|
+
const {
|
|
13
|
+
[`data-testid`]: testId
|
|
14
|
+
} = props;
|
|
11
15
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
12
16
|
as: "span",
|
|
13
17
|
ref: ref,
|
|
14
18
|
xcss: [actionButtonStyle, !props.disabled && actionButtonNotDisabledStyle]
|
|
15
19
|
}, props, {
|
|
16
20
|
"aria-disabled": props.disabled,
|
|
17
|
-
role: "button"
|
|
21
|
+
role: "button",
|
|
22
|
+
testId: testId
|
|
18
23
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
19
24
|
as: "span",
|
|
20
25
|
xcss: internalButtonStyle
|
|
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
10
10
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
11
11
|
const PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "34.10.
|
|
13
|
+
packageVersion: "34.10.4",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
import { Anchor } from '@atlaskit/primitives';
|
|
4
6
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
5
7
|
import { CONTENT_URL_3P_ACCOUNT_AUTH, CONTENT_URL_SECURITY_AND_PERMISSIONS } from '../../constants';
|
|
6
8
|
import { messages } from '../../messages';
|
|
@@ -24,7 +26,12 @@ const UnauthorisedViewContent = ({
|
|
|
24
26
|
values: {
|
|
25
27
|
context: providerName
|
|
26
28
|
}
|
|
27
|
-
})) : /*#__PURE__*/React.createElement(FormattedMessage, messages.connect_unauthorised_account_description_no_provider), ' ', /*#__PURE__*/React.createElement(
|
|
29
|
+
})) : /*#__PURE__*/React.createElement(FormattedMessage, messages.connect_unauthorised_account_description_no_provider), ' ', fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(Anchor, {
|
|
30
|
+
href: isProductIntegrationSupported ? CONTENT_URL_3P_ACCOUNT_AUTH : CONTENT_URL_SECURITY_AND_PERMISSIONS,
|
|
31
|
+
target: "_blank",
|
|
32
|
+
testId: `${testId}-learn-more`,
|
|
33
|
+
onClick: handleLearnMoreClick
|
|
34
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, learnMoreMessage)) : /*#__PURE__*/React.createElement("a", {
|
|
28
35
|
href: isProductIntegrationSupported ? CONTENT_URL_3P_ACCOUNT_AUTH : CONTENT_URL_SECURITY_AND_PERMISSIONS,
|
|
29
36
|
target: "_blank",
|
|
30
37
|
"data-testid": `${testId}-learn-more`,
|
|
@@ -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: "34.10.
|
|
7
|
+
packageVersion: "34.10.4"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
._11c81il0{font:var(--ds-font-heading-xsmall,normal 600 14px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._14mj1crf:after{border-radius:9pt}
|
|
3
|
+
._19it1pvm{border:solid 1px var(--ds-border,#091e4224)}
|
|
4
|
+
._1tqzzgxb:after{outline:1px solid var(--ds-border,#091e4224)}
|
|
5
|
+
._2rko1y44{border-radius:4px}
|
|
6
|
+
._hcgvzgxb:hover:after{outline:1px solid var(--ds-border,#091e4224)}
|
|
7
|
+
._qc5o94zs:after{transition:background .3s,box-shadow .3s}
|
|
8
|
+
._v56414au{transition:outline .3s}
|
|
9
|
+
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
10
|
+
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
11
|
+
._15l2idpf:after{top:0}
|
|
12
|
+
._16jlkb7n{flex-grow:1}
|
|
13
|
+
._18m915vq{overflow-y:hidden}
|
|
14
|
+
._18m91wug{overflow-y:auto}
|
|
15
|
+
._18postnw:after{position:absolute}
|
|
16
|
+
._19bvu2gc{padding-left:var(--ds-space-100,8px)}
|
|
17
|
+
._19doidpf:after{left:0}
|
|
18
|
+
._1bqqidpf:after{z-index:0}
|
|
19
|
+
._1bsb7vkz{width:1pc}
|
|
20
|
+
._1e0c1txw{display:flex}
|
|
21
|
+
._1hfk18uv:after{background-color:initial}
|
|
22
|
+
._1hfkhp5a:after{background-color:var(--ds-surface-raised,#fff)}
|
|
23
|
+
._1ifiidpf .embed-header{opacity:0}
|
|
24
|
+
._1ifikb7n .embed-header{opacity:1}
|
|
25
|
+
._1pbykb7n{z-index:1}
|
|
26
|
+
._1reo15vq{overflow-x:hidden}
|
|
27
|
+
._1reo1wug{overflow-x:auto}
|
|
28
|
+
._1x88idpf:after{bottom:0}
|
|
29
|
+
._2lx21bp4{flex-direction:column}
|
|
30
|
+
._32rxidpf:after{right:0}
|
|
31
|
+
._4cvr1h6o{align-items:center}
|
|
32
|
+
._4t3i1osq{height:100%}
|
|
33
|
+
._4t3i7vkz{height:1pc}
|
|
34
|
+
._4t3igktf{height:20px}
|
|
35
|
+
._4t3ik5xz{height:27pc}
|
|
36
|
+
._4tpuhp5a:hover:after{background-color:var(--ds-surface-raised,#fff)}
|
|
37
|
+
._8x3u92p9:after{box-shadow:0 0 0 3px var(--ds-border-selected,#0c66e4)}
|
|
38
|
+
._aetrb3bt:after{content:""}
|
|
39
|
+
._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
|
|
40
|
+
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
41
|
+
._kqswh2mm{position:relative}
|
|
42
|
+
._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
|
|
43
|
+
._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
|
|
44
|
+
._u94kidpf:after{flex-grow:0}
|
|
45
|
+
._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
|
|
46
|
+
._x148kb7n:hover .embed-header{opacity:1}
|
|
47
|
+
._1bnxglyw:hover{text-decoration-line:none}
|
|
48
|
+
._9oik18uv:hover{text-decoration-color:initial}
|
|
49
|
+
._jf4cnqa1:hover{text-decoration-style:solid}
|
|
50
|
+
._1jhm1ips:active{outline:8px solid var(--ds-background-selected,#e9f2ff)}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/* ExpandedFrame.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./ExpandedFrame.compiled.css";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -6,7 +8,7 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
6
8
|
import { useMouseDownEvent } from '../../../state/analytics/useLinkClicked';
|
|
7
9
|
import { handleClickCommon } from '../../common/utils';
|
|
8
10
|
import { ExpandedFrameOld } from './ExpandedFrameOld';
|
|
9
|
-
import { className,
|
|
11
|
+
import { className, ContentOldVisualRefresh, HeaderOldVisualRefresh, IconWrapperOldVisualRefresh, LinkWrapperOldVisualRefresh, TextWrapperOldVisualRefresh, TooltipWrapperOldVisualRefresh, WrapperOldVisualRefresh } from './styled';
|
|
10
12
|
var ExpandedFrameNew = function ExpandedFrameNew(_ref) {
|
|
11
13
|
var _ref$isPlaceholder = _ref.isPlaceholder,
|
|
12
14
|
isPlaceholder = _ref$isPlaceholder === void 0 ? false : _ref$isPlaceholder,
|
|
@@ -35,18 +37,35 @@ var ExpandedFrameNew = function ExpandedFrameNew(_ref) {
|
|
|
35
37
|
};
|
|
36
38
|
var handleMouseDown = useMouseDownEvent();
|
|
37
39
|
var renderHeader = function renderHeader() {
|
|
40
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
41
|
+
return frameStyle !== 'hide' && /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: ax([styles.header, "embed-header"])
|
|
43
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: ax([styles.headerIcon])
|
|
45
|
+
}, icon), /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: ax([styles.tooltipWrapper])
|
|
47
|
+
}, !isPlaceholder && /*#__PURE__*/React.createElement(Tooltip, {
|
|
48
|
+
content: text,
|
|
49
|
+
hideTooltipOnMouseDown: true
|
|
50
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
51
|
+
href: href,
|
|
52
|
+
onClick: handleClick,
|
|
53
|
+
onMouseDown: handleMouseDown,
|
|
54
|
+
className: ax([styles.headerAnchor])
|
|
55
|
+
}, text))));
|
|
56
|
+
}
|
|
38
57
|
return (
|
|
39
58
|
/*#__PURE__*/
|
|
40
59
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
41
|
-
React.createElement(
|
|
60
|
+
React.createElement(HeaderOldVisualRefresh, {
|
|
42
61
|
className: "embed-header",
|
|
43
62
|
frameStyle: frameStyle
|
|
44
|
-
}, /*#__PURE__*/React.createElement(
|
|
63
|
+
}, /*#__PURE__*/React.createElement(IconWrapperOldVisualRefresh, {
|
|
45
64
|
isPlaceholder: isPlaceholder
|
|
46
|
-
}, !isPlaceholder && icon), /*#__PURE__*/React.createElement(
|
|
65
|
+
}, !isPlaceholder && icon), /*#__PURE__*/React.createElement(TooltipWrapperOldVisualRefresh, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
47
66
|
content: text,
|
|
48
67
|
hideTooltipOnMouseDown: true
|
|
49
|
-
}, /*#__PURE__*/React.createElement(
|
|
68
|
+
}, /*#__PURE__*/React.createElement(TextWrapperOldVisualRefresh, {
|
|
50
69
|
isPlaceholder: isPlaceholder
|
|
51
70
|
}, !isPlaceholder && /*#__PURE__*/React.createElement("a", {
|
|
52
71
|
href: href,
|
|
@@ -55,8 +74,20 @@ var ExpandedFrameNew = function ExpandedFrameNew(_ref) {
|
|
|
55
74
|
}, text)))))
|
|
56
75
|
);
|
|
57
76
|
};
|
|
77
|
+
var interactive = isInteractive();
|
|
78
|
+
var showBackgroundAlways = frameStyle === 'show' || isSelected && frameStyle !== 'hide';
|
|
79
|
+
var showBackgroundOnHover = interactive && frameStyle !== 'hide';
|
|
58
80
|
var renderContent = function renderContent() {
|
|
59
|
-
|
|
81
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
82
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
"data-testid": "embed-content-wrapper",
|
|
84
|
+
// This fixes an issue with input fields in cross domain iframes (ie. databases and jira fields from different domains)
|
|
85
|
+
// See: HOT-107830
|
|
86
|
+
contentEditable: false,
|
|
87
|
+
className: ax([styles.contentStyle, setOverflow && allowScrollBar && styles.contentOverflowAuto, interactive && !showBackgroundAlways && !showBackgroundOnHover && styles.contentInteractiveActiveBorder])
|
|
88
|
+
}, children);
|
|
89
|
+
}
|
|
90
|
+
return /*#__PURE__*/React.createElement(ContentOldVisualRefresh, {
|
|
60
91
|
"data-testid": "embed-content-wrapper",
|
|
61
92
|
allowScrollBar: allowScrollBar,
|
|
62
93
|
removeOverflow: !setOverflow,
|
|
@@ -69,8 +100,26 @@ var ExpandedFrameNew = function ExpandedFrameNew(_ref) {
|
|
|
69
100
|
suppressContentEditableWarning: true
|
|
70
101
|
}, children);
|
|
71
102
|
};
|
|
103
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
104
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
106
|
+
className: ax([styles.linkWrapper, inheritDimensions && styles.linkWrapperInheritDimensions, isSelected && frameStyle !== 'hide' && styles.linkWrapperSelected, showBackgroundAlways && styles.linkWrapperBorderAndBackground, showBackgroundOnHover && !showBackgroundAlways && styles.linkWrapperInteractiveNotHidden, className]),
|
|
107
|
+
style: {
|
|
108
|
+
minWidth: minWidth ? "".concat(minWidth, "px") : '',
|
|
109
|
+
maxWidth: maxWidth ? "".concat(maxWidth, "px") : ''
|
|
110
|
+
},
|
|
111
|
+
"data-testid": testId,
|
|
112
|
+
"data-trello-do-not-use-override": testId
|
|
113
|
+
// Due to limitations of testing library, we can't assert ::after
|
|
114
|
+
,
|
|
115
|
+
"data-is-selected": isSelected
|
|
116
|
+
}, (isPlaceholder || !href) && {
|
|
117
|
+
'data-wrapper-type': 'default',
|
|
118
|
+
'data-is-interactive': isInteractive()
|
|
119
|
+
}), renderHeader(), renderContent());
|
|
120
|
+
}
|
|
72
121
|
if (!isPlaceholder && href) {
|
|
73
|
-
return /*#__PURE__*/React.createElement(
|
|
122
|
+
return /*#__PURE__*/React.createElement(LinkWrapperOldVisualRefresh
|
|
74
123
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
75
124
|
, {
|
|
76
125
|
className: className,
|
|
@@ -87,7 +136,7 @@ var ExpandedFrameNew = function ExpandedFrameNew(_ref) {
|
|
|
87
136
|
inheritDimensions: inheritDimensions
|
|
88
137
|
}, renderHeader(), renderContent());
|
|
89
138
|
} else {
|
|
90
|
-
return /*#__PURE__*/React.createElement(
|
|
139
|
+
return /*#__PURE__*/React.createElement(WrapperOldVisualRefresh
|
|
91
140
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
92
141
|
, {
|
|
93
142
|
className: className,
|
|
@@ -110,4 +159,18 @@ export var ExpandedFrame = function ExpandedFrame(props) {
|
|
|
110
159
|
} else {
|
|
111
160
|
return /*#__PURE__*/React.createElement(ExpandedFrameOld, props);
|
|
112
161
|
}
|
|
162
|
+
};
|
|
163
|
+
var styles = {
|
|
164
|
+
linkWrapper: "_zulpu2gc _kqswh2mm _1e0c1txw _2lx21bp4 _4t3ik5xz _ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvu2gc _uiztglyw _qc5o94zs _14mj1crf _aetrb3bt _18postnw _15l2idpf _32rxidpf _1x88idpf _19doidpf _1hfk18uv _1bqqidpf _u94kidpf _1ifiidpf",
|
|
165
|
+
linkWrapperInheritDimensions: "_4t3i1osq",
|
|
166
|
+
linkWrapperSelected: "_8x3u92p9",
|
|
167
|
+
linkWrapperBorderAndBackground: "_1tqzzgxb _1hfkhp5a _1ifikb7n",
|
|
168
|
+
linkWrapperInteractiveNotHidden: "_hcgvzgxb _4tpuhp5a _x148kb7n",
|
|
169
|
+
header: "_zulp1b66 _1e0c1txw _4cvr1h6o _4t3igktf _1pbykb7n",
|
|
170
|
+
tooltipWrapper: "_1reo15vq _18m915vq",
|
|
171
|
+
headerAnchor: "_11c81il0 _9oik18uv _1bnxglyw _jf4cnqa1",
|
|
172
|
+
headerIcon: "_1bsb7vkz _4t3i7vkz",
|
|
173
|
+
contentStyle: "_19it1pvm _2rko1y44 _1reo15vq _18m915vq _v56414au _bfhkhp5a _16jlkb7n _4t3i1osq _1pbykb7n",
|
|
174
|
+
contentInteractiveActiveBorder: "_1jhm1ips",
|
|
175
|
+
contentOverflowAuto: "_1reo1wug _18m91wug"
|
|
113
176
|
};
|
|
@@ -28,8 +28,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
28
28
|
import { B100, B50, N30, N300, N40 } from '@atlaskit/theme/colors';
|
|
29
29
|
export var className = 'media-card-frame';
|
|
30
30
|
export var embedHeaderHeight = 32;
|
|
31
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
31
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
32
|
-
export var
|
|
33
|
+
export var LinkWrapperOldVisualRefresh = forwardRef(function (_ref, __cmplr) {
|
|
33
34
|
var _ref$as = _ref.as,
|
|
34
35
|
C = _ref$as === void 0 ? "div" : _ref$as,
|
|
35
36
|
__cmpls = _ref.style,
|
|
@@ -51,11 +52,12 @@ export var LinkWrapper = forwardRef(function (_ref, __cmplr) {
|
|
|
51
52
|
}));
|
|
52
53
|
});
|
|
53
54
|
|
|
55
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
54
56
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
55
57
|
if (process.env.NODE_ENV !== 'production') {
|
|
56
|
-
|
|
58
|
+
LinkWrapperOldVisualRefresh.displayName = 'LinkWrapperOldVisualRefresh';
|
|
57
59
|
}
|
|
58
|
-
export var
|
|
60
|
+
export var WrapperOldVisualRefresh = forwardRef(function (_ref2, __cmplr) {
|
|
59
61
|
var _ref2$as = _ref2.as,
|
|
60
62
|
C = _ref2$as === void 0 ? "div" : _ref2$as,
|
|
61
63
|
__cmpls = _ref2.style,
|
|
@@ -77,11 +79,12 @@ export var Wrapper = forwardRef(function (_ref2, __cmplr) {
|
|
|
77
79
|
}));
|
|
78
80
|
});
|
|
79
81
|
|
|
82
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
80
83
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
81
84
|
if (process.env.NODE_ENV !== 'production') {
|
|
82
|
-
|
|
85
|
+
WrapperOldVisualRefresh.displayName = 'WrapperOldVisualRefresh';
|
|
83
86
|
}
|
|
84
|
-
export var
|
|
87
|
+
export var HeaderOldVisualRefresh = forwardRef(function (_ref3, __cmplr) {
|
|
85
88
|
var _ref3$as = _ref3.as,
|
|
86
89
|
C = _ref3$as === void 0 ? "div" : _ref3$as,
|
|
87
90
|
__cmpls = _ref3.style,
|
|
@@ -95,11 +98,12 @@ export var Header = forwardRef(function (_ref3, __cmplr) {
|
|
|
95
98
|
}));
|
|
96
99
|
});
|
|
97
100
|
|
|
101
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
98
102
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
99
103
|
if (process.env.NODE_ENV !== 'production') {
|
|
100
|
-
|
|
104
|
+
HeaderOldVisualRefresh.displayName = 'HeaderOldVisualRefresh';
|
|
101
105
|
}
|
|
102
|
-
export var
|
|
106
|
+
export var IconWrapperOldVisualRefresh = forwardRef(function (_ref4, __cmplr) {
|
|
103
107
|
var _ref4$as = _ref4.as,
|
|
104
108
|
C = _ref4$as === void 0 ? "div" : _ref4$as,
|
|
105
109
|
__cmpls = _ref4.style,
|
|
@@ -113,11 +117,12 @@ export var IconWrapper = forwardRef(function (_ref4, __cmplr) {
|
|
|
113
117
|
}));
|
|
114
118
|
});
|
|
115
119
|
|
|
120
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
116
121
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
117
122
|
if (process.env.NODE_ENV !== 'production') {
|
|
118
|
-
|
|
123
|
+
IconWrapperOldVisualRefresh.displayName = 'IconWrapperOldVisualRefresh';
|
|
119
124
|
}
|
|
120
|
-
export var
|
|
125
|
+
export var TextWrapperOldVisualRefresh = forwardRef(function (_ref5, __cmplr) {
|
|
121
126
|
var _ref5$as = _ref5.as,
|
|
122
127
|
C = _ref5$as === void 0 ? "div" : _ref5$as,
|
|
123
128
|
__cmpls = _ref5.style,
|
|
@@ -131,11 +136,12 @@ export var TextWrapper = forwardRef(function (_ref5, __cmplr) {
|
|
|
131
136
|
}));
|
|
132
137
|
});
|
|
133
138
|
|
|
139
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
134
140
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
135
141
|
if (process.env.NODE_ENV !== 'production') {
|
|
136
|
-
|
|
142
|
+
TextWrapperOldVisualRefresh.displayName = 'TextWrapperOldVisualRefresh';
|
|
137
143
|
}
|
|
138
|
-
export var
|
|
144
|
+
export var TooltipWrapperOldVisualRefresh = forwardRef(function (_ref6, __cmplr) {
|
|
139
145
|
var _ref6$as = _ref6.as,
|
|
140
146
|
C = _ref6$as === void 0 ? "div" : _ref6$as,
|
|
141
147
|
__cmpls = _ref6.style,
|
|
@@ -147,14 +153,15 @@ export var TooltipWrapper = forwardRef(function (_ref6, __cmplr) {
|
|
|
147
153
|
}));
|
|
148
154
|
});
|
|
149
155
|
|
|
156
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
150
157
|
// NB: `overflow` is kept as `hidden` since
|
|
151
158
|
// the internal contents of the `iframe` should
|
|
152
159
|
// manage scrolling behaviour.
|
|
153
160
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
154
161
|
if (process.env.NODE_ENV !== 'production') {
|
|
155
|
-
|
|
162
|
+
TooltipWrapperOldVisualRefresh.displayName = 'TooltipWrapperOldVisualRefresh';
|
|
156
163
|
}
|
|
157
|
-
export var
|
|
164
|
+
export var ContentOldVisualRefresh = forwardRef(function (_ref7, __cmplr) {
|
|
158
165
|
var _ref7$as = _ref7.as,
|
|
159
166
|
C = _ref7$as === void 0 ? "div" : _ref7$as,
|
|
160
167
|
__cmpls = _ref7.style,
|
|
@@ -170,7 +177,7 @@ export var Content = forwardRef(function (_ref7, __cmplr) {
|
|
|
170
177
|
}));
|
|
171
178
|
});
|
|
172
179
|
if (process.env.NODE_ENV !== 'production') {
|
|
173
|
-
|
|
180
|
+
ContentOldVisualRefresh.displayName = 'ContentOldVisualRefresh';
|
|
174
181
|
}
|
|
175
182
|
var getSizeWithUnit = function getSizeWithUnit() {
|
|
176
183
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
|
|
@@ -9,13 +9,16 @@ import { Box, xcss } from '@atlaskit/primitives';
|
|
|
9
9
|
export var ActionButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
10
10
|
var children = _ref.children,
|
|
11
11
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
// `Button transforms `testId` into `data-testid`. We need to transform it back to `testId`
|
|
13
|
+
var testId = props["data-testid"];
|
|
12
14
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
13
15
|
as: "span",
|
|
14
16
|
ref: ref,
|
|
15
17
|
xcss: [actionButtonStyle, !props.disabled && actionButtonNotDisabledStyle]
|
|
16
18
|
}, props, {
|
|
17
19
|
"aria-disabled": props.disabled,
|
|
18
|
-
role: "button"
|
|
20
|
+
role: "button",
|
|
21
|
+
testId: testId
|
|
19
22
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
20
23
|
as: "span",
|
|
21
24
|
xcss: internalButtonStyle
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
var PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "34.10.
|
|
16
|
+
packageVersion: "34.10.4",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
import { Anchor } from '@atlaskit/primitives';
|
|
4
6
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
5
7
|
import { CONTENT_URL_3P_ACCOUNT_AUTH, CONTENT_URL_SECURITY_AND_PERMISSIONS } from '../../constants';
|
|
6
8
|
import { messages } from '../../messages';
|
|
@@ -23,7 +25,12 @@ var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
|
|
|
23
25
|
values: {
|
|
24
26
|
context: providerName
|
|
25
27
|
}
|
|
26
|
-
})) : /*#__PURE__*/React.createElement(FormattedMessage, messages.connect_unauthorised_account_description_no_provider), ' ', /*#__PURE__*/React.createElement(
|
|
28
|
+
})) : /*#__PURE__*/React.createElement(FormattedMessage, messages.connect_unauthorised_account_description_no_provider), ' ', fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(Anchor, {
|
|
29
|
+
href: isProductIntegrationSupported ? CONTENT_URL_3P_ACCOUNT_AUTH : CONTENT_URL_SECURITY_AND_PERMISSIONS,
|
|
30
|
+
target: "_blank",
|
|
31
|
+
testId: "".concat(testId, "-learn-more"),
|
|
32
|
+
onClick: handleLearnMoreClick
|
|
33
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, learnMoreMessage)) : /*#__PURE__*/React.createElement("a", {
|
|
27
34
|
href: isProductIntegrationSupported ? CONTENT_URL_3P_ACCOUNT_AUTH : CONTENT_URL_SECURITY_AND_PERMISSIONS,
|
|
28
35
|
target: "_blank",
|
|
29
36
|
"data-testid": "".concat(testId, "-learn-more"),
|
|
@@ -36,12 +36,12 @@ export interface ThumbnailProps {
|
|
|
36
36
|
export interface PlaceholderProps {
|
|
37
37
|
isPlaceholder: boolean;
|
|
38
38
|
}
|
|
39
|
-
export declare const
|
|
40
|
-
export declare const
|
|
41
|
-
export declare const
|
|
42
|
-
export declare const
|
|
43
|
-
export declare const
|
|
44
|
-
export declare const
|
|
45
|
-
export declare const
|
|
39
|
+
export declare const LinkWrapperOldVisualRefresh: import("react").ComponentType<WrapperProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
40
|
+
export declare const WrapperOldVisualRefresh: import("react").ComponentType<WrapperProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
41
|
+
export declare const HeaderOldVisualRefresh: import("react").ComponentType<HeaderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
42
|
+
export declare const IconWrapperOldVisualRefresh: import("react").ComponentType<PlaceholderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
43
|
+
export declare const TextWrapperOldVisualRefresh: import("react").ComponentType<PlaceholderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
44
|
+
export declare const TooltipWrapperOldVisualRefresh: import("react").ComponentType<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
45
|
+
export declare const ContentOldVisualRefresh: import("react").ComponentType<ContentProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
46
46
|
export declare const Image: import("react").ComponentType<ImageProps & import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & import("@compiled/react").StyledProps>;
|
|
47
47
|
export declare const Thumbnail: import("react").ComponentType<ThumbnailProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
@@ -2,6 +2,7 @@ import React, { type ComponentPropsWithRef } from 'react';
|
|
|
2
2
|
import { Box } from '@atlaskit/primitives';
|
|
3
3
|
type ActionButtonProps = ComponentPropsWithRef<typeof Box> & {
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
[`data-testid`]?: string;
|
|
5
6
|
};
|
|
6
7
|
/**
|
|
7
8
|
* Action button has to be a span for the overflow to work correctly
|
|
@@ -36,12 +36,12 @@ export interface ThumbnailProps {
|
|
|
36
36
|
export interface PlaceholderProps {
|
|
37
37
|
isPlaceholder: boolean;
|
|
38
38
|
}
|
|
39
|
-
export declare const
|
|
40
|
-
export declare const
|
|
41
|
-
export declare const
|
|
42
|
-
export declare const
|
|
43
|
-
export declare const
|
|
44
|
-
export declare const
|
|
45
|
-
export declare const
|
|
39
|
+
export declare const LinkWrapperOldVisualRefresh: import("react").ComponentType<WrapperProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
40
|
+
export declare const WrapperOldVisualRefresh: import("react").ComponentType<WrapperProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
41
|
+
export declare const HeaderOldVisualRefresh: import("react").ComponentType<HeaderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
42
|
+
export declare const IconWrapperOldVisualRefresh: import("react").ComponentType<PlaceholderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
43
|
+
export declare const TextWrapperOldVisualRefresh: import("react").ComponentType<PlaceholderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
44
|
+
export declare const TooltipWrapperOldVisualRefresh: import("react").ComponentType<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
45
|
+
export declare const ContentOldVisualRefresh: import("react").ComponentType<ContentProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
46
46
|
export declare const Image: import("react").ComponentType<ImageProps & import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & import("@compiled/react").StyledProps>;
|
|
47
47
|
export declare const Thumbnail: import("react").ComponentType<ThumbnailProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
@@ -2,6 +2,7 @@ import React, { type ComponentPropsWithRef } from 'react';
|
|
|
2
2
|
import { Box } from '@atlaskit/primitives';
|
|
3
3
|
type ActionButtonProps = ComponentPropsWithRef<typeof Box> & {
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
[`data-testid`]?: string;
|
|
5
6
|
};
|
|
6
7
|
/**
|
|
7
8
|
* Action button has to be a span for the overflow to work correctly
|