@atlaskit/smart-card 36.15.1 → 36.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.compiled.css +1 -0
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +10 -1
- package/dist/cjs/view/BlockCard/views/unresolved-view/index.compiled.css +1 -0
- package/dist/cjs/view/BlockCard/views/unresolved-view/index.js +12 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.compiled.css +3 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +15 -9
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.compiled.css +1 -0
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +8 -1
- package/dist/es2019/view/BlockCard/views/unresolved-view/index.compiled.css +1 -0
- package/dist/es2019/view/BlockCard/views/unresolved-view/index.js +36 -26
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.compiled.css +3 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +13 -9
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.compiled.css +1 -0
- package/dist/esm/view/BlockCard/views/ResolvedView.js +10 -1
- package/dist/esm/view/BlockCard/views/unresolved-view/index.compiled.css +1 -0
- package/dist/esm/view/BlockCard/views/unresolved-view/index.js +11 -1
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.compiled.css +3 -0
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +15 -9
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 36.15.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#150610](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/150610)
|
|
8
|
+
[`b33efda8cfa3f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b33efda8cfa3f) -
|
|
9
|
+
[ux] Fix BlockCard button get cutoff in safari (behind fg platform-linking-visual-refresh-v2)
|
|
10
|
+
|
|
3
11
|
## 36.15.1
|
|
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: "36.15.
|
|
14
|
+
packageVersion: "36.15.2"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
._2yhz14q2 [data-smart-element=Title]{color:var(--ds-link,#0c66e4)}
|
|
9
9
|
._4cvresu3{align-items:flex-end}
|
|
10
10
|
._4t3i1k8s{height:1.5rem}
|
|
11
|
+
._4t3i1osq{height:100%}
|
|
11
12
|
._g0eioxwj .actions-button-group button, ._1qryoxwj .actions-button-group button:active, ._sxbroxwj .actions-button-group button:focus, ._1gyioxwj .actions-button-group button:hover{font-size:.875rem}
|
|
12
13
|
._i8d01j6v [data-smart-element-group]{line-height:1rem}
|
|
13
14
|
._wwyvidpf span[data-smart-element-avatar-group]>ul{padding-left:0}
|
|
@@ -13,6 +13,7 @@ var React = _react;
|
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
|
+
var _userAgent = require("@atlaskit/linking-common/user-agent");
|
|
16
17
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
18
|
var _constants = require("../../../constants");
|
|
18
19
|
var _FlexibleCard = _interopRequireDefault(require("../../FlexibleCard"));
|
|
@@ -25,6 +26,7 @@ var titleBlockCssOld = null;
|
|
|
25
26
|
var titleBlockCss = null;
|
|
26
27
|
var footerBlockCssOld = null;
|
|
27
28
|
var footerBlockCss = null;
|
|
29
|
+
var footerBlockSafariStyles = null;
|
|
28
30
|
var metadataBlockCssOld = null;
|
|
29
31
|
|
|
30
32
|
/**
|
|
@@ -45,6 +47,13 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
45
47
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
46
48
|
isPreviewBlockErrored = _useState2[0],
|
|
47
49
|
setIsPreviewBlockErrored = _useState2[1];
|
|
50
|
+
var _ref2 = (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v2') ?
|
|
51
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
52
|
+
(0, _react.useMemo)(function () {
|
|
53
|
+
return (0, _userAgent.browser)();
|
|
54
|
+
}, []) : {},
|
|
55
|
+
_ref2$safari = _ref2.safari,
|
|
56
|
+
safari = _ref2$safari === void 0 ? false : _ref2$safari;
|
|
48
57
|
(0, _react.useEffect)(function () {
|
|
49
58
|
setIsPreviewBlockErrored(false);
|
|
50
59
|
}, [url, cardState]);
|
|
@@ -102,7 +111,7 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
102
111
|
})) : null, /*#__PURE__*/React.createElement(_blocks.FooterBlock, {
|
|
103
112
|
actions: footerActions,
|
|
104
113
|
status: _constants.SmartLinkStatus.Resolved,
|
|
105
|
-
className: (0, _runtime.ax)([(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj"])
|
|
114
|
+
className: (0, _runtime.ax)([(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj", safari && (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v2') && "_4t3i1osq"])
|
|
106
115
|
}));
|
|
107
116
|
};
|
|
108
117
|
var _default = exports.default = (0, _withFlexibleUIBlockCardStyle.withFlexibleUIBlockCardStyle)(ResolvedView);
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
._4cvr1y6m{align-items:flex-start}
|
|
10
10
|
._4cvresu3{align-items:flex-end}
|
|
11
11
|
._4t3i1k8s{height:1.5rem}
|
|
12
|
+
._4t3i1osq{height:100%}
|
|
12
13
|
._7yjtidpf >div{margin-top:0}
|
|
13
14
|
._g0eioxwj .actions-button-group button, ._1qryoxwj .actions-button-group button:active, ._sxbroxwj .actions-button-group button:focus, ._1gyioxwj .actions-button-group button:hover{font-size:.875rem}
|
|
14
15
|
._ngc01fxt >div{color:var(--ds-text,#172b4d)}
|
|
@@ -8,9 +8,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
});
|
|
9
9
|
exports.default = void 0;
|
|
10
10
|
require("./index.compiled.css");
|
|
11
|
-
var
|
|
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 _userAgent = require("@atlaskit/linking-common/user-agent");
|
|
14
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
17
|
var _FlexibleCard = _interopRequireDefault(require("../../../FlexibleCard"));
|
|
16
18
|
var _blocks = require("../../../FlexibleCard/components/blocks");
|
|
@@ -23,6 +25,7 @@ var titleBlockCssOld = null;
|
|
|
23
25
|
var titleBlockCss = null;
|
|
24
26
|
var footerBlockCssOld = null;
|
|
25
27
|
var footerBlockCss = null;
|
|
28
|
+
var footerBlockSafariStyles = null;
|
|
26
29
|
var UnresolvedView = function UnresolvedView(_ref) {
|
|
27
30
|
var actions = _ref.actions,
|
|
28
31
|
cardState = _ref.cardState,
|
|
@@ -35,6 +38,13 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
35
38
|
testId = _ref.testId,
|
|
36
39
|
title = _ref.title,
|
|
37
40
|
url = _ref.url;
|
|
41
|
+
var _ref2 = (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v2') ?
|
|
42
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
43
|
+
(0, _react.useMemo)(function () {
|
|
44
|
+
return (0, _userAgent.browser)();
|
|
45
|
+
}, []) : {},
|
|
46
|
+
_ref2$safari = _ref2.safari,
|
|
47
|
+
safari = _ref2$safari === void 0 ? false : _ref2$safari;
|
|
38
48
|
return /*#__PURE__*/React.createElement(_FlexibleCard.default, {
|
|
39
49
|
appearance: "block",
|
|
40
50
|
cardState: cardState,
|
|
@@ -59,7 +69,7 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
59
69
|
actions: actions,
|
|
60
70
|
testId: "smart-block-card-footer",
|
|
61
71
|
status: cardState.status,
|
|
62
|
-
className: (0, _runtime.ax)([(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj"])
|
|
72
|
+
className: (0, _runtime.ax)([(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj", safari && (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v2') && "_4t3i1osq"])
|
|
63
73
|
}));
|
|
64
74
|
};
|
|
65
75
|
var _default = exports.default = UnresolvedView;
|
|
@@ -7,10 +7,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
9
|
exports.default = void 0;
|
|
10
|
+
require("./index.compiled.css");
|
|
10
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var React = _react;
|
|
12
13
|
var _runtime = require("@compiled/react/runtime");
|
|
13
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
|
+
var _userAgent = require("@atlaskit/linking-common/user-agent");
|
|
14
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
17
|
var _constants = require("../../../../../../constants");
|
|
16
18
|
var _flexibleUiContext = require("../../../../../../state/flexible-ui-context");
|
|
@@ -23,6 +25,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
23
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
26
|
var actionGroupStylesOld = null;
|
|
25
27
|
var actionGroupStyles = null;
|
|
28
|
+
var safariStyles = null;
|
|
26
29
|
var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
27
30
|
var actions = props.actions,
|
|
28
31
|
testId = props.testId,
|
|
@@ -35,6 +38,13 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
35
38
|
var _filterActionItems;
|
|
36
39
|
return ((_filterActionItems = (0, _utils.filterActionItems)(actions, context)) === null || _filterActionItems === void 0 ? void 0 : _filterActionItems.length) > 0;
|
|
37
40
|
}, [actions, context]);
|
|
41
|
+
var _ref = (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v2') ?
|
|
42
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
43
|
+
(0, _react.useMemo)(function () {
|
|
44
|
+
return (0, _userAgent.browser)();
|
|
45
|
+
}, []) : {},
|
|
46
|
+
_ref$safari = _ref.safari,
|
|
47
|
+
safari = _ref$safari === void 0 ? false : _ref$safari;
|
|
38
48
|
var onDropdownOpenChange = (0, _react.useCallback)(function (isOpen) {
|
|
39
49
|
if (onActionMenuOpenChange) {
|
|
40
50
|
onActionMenuOpenChange({
|
|
@@ -48,17 +58,13 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
48
58
|
appearance: 'subtle'
|
|
49
59
|
} : {}, {
|
|
50
60
|
testId: "".concat(testId, "-provider")
|
|
51
|
-
})), actions && hasActions ? /*#__PURE__*/React.createElement(_elementGroup.default,
|
|
61
|
+
})), actions && hasActions ? /*#__PURE__*/React.createElement(_elementGroup.default, {
|
|
52
62
|
testId: "smart-element-group-actions",
|
|
53
63
|
align: _constants.SmartLinkAlignment.Right,
|
|
54
|
-
direction: _constants.SmartLinkDirection.Horizontal
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
css: size === _constants.SmartLinkSize.XLarge && actionGroupStylesOld
|
|
59
|
-
}, {
|
|
60
|
-
width: _constants.SmartLinkWidth.Flexible
|
|
61
|
-
}), /*#__PURE__*/React.createElement(_actionGroup.default, {
|
|
64
|
+
direction: _constants.SmartLinkDirection.Horizontal,
|
|
65
|
+
width: _constants.SmartLinkWidth.Flexible,
|
|
66
|
+
className: (0, _runtime.ax)([size === _constants.SmartLinkSize.XLarge && (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') && "_c71lxy5q", size === _constants.SmartLinkSize.XLarge && !(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') && "_c71lviql", safari && "_4t3i1osq"])
|
|
67
|
+
}, /*#__PURE__*/React.createElement(_actionGroup.default, {
|
|
62
68
|
onDropdownOpenChange: onDropdownOpenChange,
|
|
63
69
|
items: actions,
|
|
64
70
|
appearance: "default",
|
|
@@ -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: "36.15.
|
|
23
|
+
packageVersion: "36.15.2",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -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: "36.15.
|
|
5
|
+
packageVersion: "36.15.2"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
._2yhz14q2 [data-smart-element=Title]{color:var(--ds-link,#0c66e4)}
|
|
9
9
|
._4cvresu3{align-items:flex-end}
|
|
10
10
|
._4t3i1k8s{height:1.5rem}
|
|
11
|
+
._4t3i1osq{height:100%}
|
|
11
12
|
._g0eioxwj .actions-button-group button, ._1qryoxwj .actions-button-group button:active, ._sxbroxwj .actions-button-group button:focus, ._1gyioxwj .actions-button-group button:hover{font-size:.875rem}
|
|
12
13
|
._i8d01j6v [data-smart-element-group]{line-height:1rem}
|
|
13
14
|
._wwyvidpf span[data-smart-element-avatar-group]>ul{padding-left:0}
|
|
@@ -4,6 +4,7 @@ import "./ResolvedView.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useEffect, useMemo, useState } from 'react';
|
|
7
|
+
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
7
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { ActionName, ElementName, SmartLinkPosition, SmartLinkStatus } from '../../../constants';
|
|
9
10
|
import FlexibleCard from '../../FlexibleCard';
|
|
@@ -14,6 +15,7 @@ const titleBlockCssOld = null;
|
|
|
14
15
|
const titleBlockCss = null;
|
|
15
16
|
const footerBlockCssOld = null;
|
|
16
17
|
const footerBlockCss = null;
|
|
18
|
+
const footerBlockSafariStyles = null;
|
|
17
19
|
const metadataBlockCssOld = null;
|
|
18
20
|
|
|
19
21
|
/**
|
|
@@ -31,6 +33,11 @@ const ResolvedView = ({
|
|
|
31
33
|
url
|
|
32
34
|
}) => {
|
|
33
35
|
const [isPreviewBlockErrored, setIsPreviewBlockErrored] = useState(false);
|
|
36
|
+
const {
|
|
37
|
+
safari = false
|
|
38
|
+
} = fg('platform-linking-visual-refresh-v2') ?
|
|
39
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
40
|
+
useMemo(() => browser(), []) : {};
|
|
34
41
|
useEffect(() => {
|
|
35
42
|
setIsPreviewBlockErrored(false);
|
|
36
43
|
}, [url, cardState]);
|
|
@@ -87,7 +94,7 @@ const ResolvedView = ({
|
|
|
87
94
|
})) : null, /*#__PURE__*/React.createElement(FooterBlock, {
|
|
88
95
|
actions: footerActions,
|
|
89
96
|
status: SmartLinkStatus.Resolved,
|
|
90
|
-
className: ax([fg('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj"])
|
|
97
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj", safari && fg('platform-linking-visual-refresh-v2') && "_4t3i1osq"])
|
|
91
98
|
}));
|
|
92
99
|
};
|
|
93
100
|
export default withFlexibleUIBlockCardStyle(ResolvedView);
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
._4cvr1y6m{align-items:flex-start}
|
|
10
10
|
._4cvresu3{align-items:flex-end}
|
|
11
11
|
._4t3i1k8s{height:1.5rem}
|
|
12
|
+
._4t3i1osq{height:100%}
|
|
12
13
|
._7yjtidpf >div{margin-top:0}
|
|
13
14
|
._g0eioxwj .actions-button-group button, ._1qryoxwj .actions-button-group button:active, ._sxbroxwj .actions-button-group button:focus, ._1gyioxwj .actions-button-group button:hover{font-size:.875rem}
|
|
14
15
|
._ngc01fxt >div{color:var(--ds-text,#172b4d)}
|
|
@@ -3,6 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { useMemo } from 'react';
|
|
7
|
+
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
6
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
9
|
import FlexibleCard from '../../../FlexibleCard';
|
|
8
10
|
import { CustomBlock, InternalFooterBlock, PreviewBlock, TitleBlock } from '../../../FlexibleCard/components/blocks';
|
|
@@ -13,6 +15,7 @@ const titleBlockCssOld = null;
|
|
|
13
15
|
const titleBlockCss = null;
|
|
14
16
|
const footerBlockCssOld = null;
|
|
15
17
|
const footerBlockCss = null;
|
|
18
|
+
const footerBlockSafariStyles = null;
|
|
16
19
|
const UnresolvedView = ({
|
|
17
20
|
actions,
|
|
18
21
|
cardState,
|
|
@@ -24,30 +27,37 @@ const UnresolvedView = ({
|
|
|
24
27
|
testId,
|
|
25
28
|
title,
|
|
26
29
|
url
|
|
27
|
-
}) =>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
30
|
+
}) => {
|
|
31
|
+
const {
|
|
32
|
+
safari = false
|
|
33
|
+
} = fg('platform-linking-visual-refresh-v2') ?
|
|
34
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
35
|
+
useMemo(() => browser(), []) : {};
|
|
36
|
+
return /*#__PURE__*/React.createElement(FlexibleCard, {
|
|
37
|
+
appearance: "block",
|
|
38
|
+
cardState: cardState,
|
|
39
|
+
onAuthorize: onAuthorize,
|
|
40
|
+
onClick: onClick,
|
|
41
|
+
onError: onError,
|
|
42
|
+
origin: "smartLinkCard",
|
|
43
|
+
testId: testId,
|
|
44
|
+
ui: FlexibleCardUiOptions,
|
|
45
|
+
url: url
|
|
46
|
+
}, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockOptions, {
|
|
47
|
+
hideIcon: !!title,
|
|
48
|
+
text: title,
|
|
49
|
+
status: cardState.status,
|
|
50
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_zulpu2gc _13mh1pd9 _2yhz14q2" : "_zulp1f3t _13mh1pd9"])
|
|
51
|
+
})), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
52
|
+
status: cardState.status,
|
|
53
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_zulp1b66 _1e0c1txw _4cvr1y6m _1wpz1fhb _7yjtidpf _ngc01fxt" : "_4cvr1y6m"])
|
|
54
|
+
}, children), showPreview && /*#__PURE__*/React.createElement(PreviewBlock, _extends({}, PreviewBlockOptions, {
|
|
55
|
+
status: cardState.status
|
|
56
|
+
})), /*#__PURE__*/React.createElement(InternalFooterBlock, {
|
|
57
|
+
actions: actions,
|
|
58
|
+
testId: "smart-block-card-footer",
|
|
59
|
+
status: cardState.status,
|
|
60
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj", safari && fg('platform-linking-visual-refresh-v2') && "_4t3i1osq"])
|
|
61
|
+
}));
|
|
62
|
+
};
|
|
53
63
|
export default UnresolvedView;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./index.compiled.css";
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
6
|
import { useCallback, useMemo } from 'react';
|
|
7
|
+
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
6
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
9
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../../../../constants';
|
|
8
10
|
import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
|
|
@@ -13,6 +15,7 @@ import ElementGroup from '../../element-group';
|
|
|
13
15
|
import { filterActionItems } from '../../utils';
|
|
14
16
|
const actionGroupStylesOld = null;
|
|
15
17
|
const actionGroupStyles = null;
|
|
18
|
+
const safariStyles = null;
|
|
16
19
|
const FooterBlockResolvedView = props => {
|
|
17
20
|
const {
|
|
18
21
|
actions,
|
|
@@ -26,6 +29,11 @@ const FooterBlockResolvedView = props => {
|
|
|
26
29
|
var _filterActionItems;
|
|
27
30
|
return ((_filterActionItems = filterActionItems(actions, context)) === null || _filterActionItems === void 0 ? void 0 : _filterActionItems.length) > 0;
|
|
28
31
|
}, [actions, context]);
|
|
32
|
+
const {
|
|
33
|
+
safari = false
|
|
34
|
+
} = fg('platform-linking-visual-refresh-v2') ?
|
|
35
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
36
|
+
useMemo(() => browser(), []) : {};
|
|
29
37
|
const onDropdownOpenChange = useCallback(isOpen => {
|
|
30
38
|
if (onActionMenuOpenChange) {
|
|
31
39
|
onActionMenuOpenChange({
|
|
@@ -39,17 +47,13 @@ const FooterBlockResolvedView = props => {
|
|
|
39
47
|
appearance: 'subtle'
|
|
40
48
|
} : {}, {
|
|
41
49
|
testId: `${testId}-provider`
|
|
42
|
-
})), actions && hasActions ? /*#__PURE__*/React.createElement(ElementGroup,
|
|
50
|
+
})), actions && hasActions ? /*#__PURE__*/React.createElement(ElementGroup, {
|
|
43
51
|
testId: "smart-element-group-actions",
|
|
44
52
|
align: SmartLinkAlignment.Right,
|
|
45
|
-
direction: SmartLinkDirection.Horizontal
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
css: size === SmartLinkSize.XLarge && actionGroupStylesOld
|
|
50
|
-
}, {
|
|
51
|
-
width: SmartLinkWidth.Flexible
|
|
52
|
-
}), /*#__PURE__*/React.createElement(ActionGroup, {
|
|
53
|
+
direction: SmartLinkDirection.Horizontal,
|
|
54
|
+
width: SmartLinkWidth.Flexible,
|
|
55
|
+
className: ax([size === SmartLinkSize.XLarge && fg('platform-linking-visual-refresh-v1') && "_c71lxy5q", size === SmartLinkSize.XLarge && !fg('platform-linking-visual-refresh-v1') && "_c71lviql", safari && "_4t3i1osq"])
|
|
56
|
+
}, /*#__PURE__*/React.createElement(ActionGroup, {
|
|
53
57
|
onDropdownOpenChange: onDropdownOpenChange,
|
|
54
58
|
items: actions,
|
|
55
59
|
appearance: "default",
|
|
@@ -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: "36.15.
|
|
13
|
+
packageVersion: "36.15.2",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -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: "36.15.
|
|
7
|
+
packageVersion: "36.15.2"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
._2yhz14q2 [data-smart-element=Title]{color:var(--ds-link,#0c66e4)}
|
|
9
9
|
._4cvresu3{align-items:flex-end}
|
|
10
10
|
._4t3i1k8s{height:1.5rem}
|
|
11
|
+
._4t3i1osq{height:100%}
|
|
11
12
|
._g0eioxwj .actions-button-group button, ._1qryoxwj .actions-button-group button:active, ._sxbroxwj .actions-button-group button:focus, ._1gyioxwj .actions-button-group button:hover{font-size:.875rem}
|
|
12
13
|
._i8d01j6v [data-smart-element-group]{line-height:1rem}
|
|
13
14
|
._wwyvidpf span[data-smart-element-avatar-group]>ul{padding-left:0}
|
|
@@ -5,6 +5,7 @@ import "./ResolvedView.compiled.css";
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
import { useEffect, useMemo, useState } from 'react';
|
|
8
|
+
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
8
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { ActionName, ElementName, SmartLinkPosition, SmartLinkStatus } from '../../../constants';
|
|
10
11
|
import FlexibleCard from '../../FlexibleCard';
|
|
@@ -15,6 +16,7 @@ var titleBlockCssOld = null;
|
|
|
15
16
|
var titleBlockCss = null;
|
|
16
17
|
var footerBlockCssOld = null;
|
|
17
18
|
var footerBlockCss = null;
|
|
19
|
+
var footerBlockSafariStyles = null;
|
|
18
20
|
var metadataBlockCssOld = null;
|
|
19
21
|
|
|
20
22
|
/**
|
|
@@ -35,6 +37,13 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
35
37
|
_useState2 = _slicedToArray(_useState, 2),
|
|
36
38
|
isPreviewBlockErrored = _useState2[0],
|
|
37
39
|
setIsPreviewBlockErrored = _useState2[1];
|
|
40
|
+
var _ref2 = fg('platform-linking-visual-refresh-v2') ?
|
|
41
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
42
|
+
useMemo(function () {
|
|
43
|
+
return browser();
|
|
44
|
+
}, []) : {},
|
|
45
|
+
_ref2$safari = _ref2.safari,
|
|
46
|
+
safari = _ref2$safari === void 0 ? false : _ref2$safari;
|
|
38
47
|
useEffect(function () {
|
|
39
48
|
setIsPreviewBlockErrored(false);
|
|
40
49
|
}, [url, cardState]);
|
|
@@ -92,7 +101,7 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
92
101
|
})) : null, /*#__PURE__*/React.createElement(FooterBlock, {
|
|
93
102
|
actions: footerActions,
|
|
94
103
|
status: SmartLinkStatus.Resolved,
|
|
95
|
-
className: ax([fg('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj"])
|
|
104
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj", safari && fg('platform-linking-visual-refresh-v2') && "_4t3i1osq"])
|
|
96
105
|
}));
|
|
97
106
|
};
|
|
98
107
|
export default withFlexibleUIBlockCardStyle(ResolvedView);
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
._4cvr1y6m{align-items:flex-start}
|
|
10
10
|
._4cvresu3{align-items:flex-end}
|
|
11
11
|
._4t3i1k8s{height:1.5rem}
|
|
12
|
+
._4t3i1osq{height:100%}
|
|
12
13
|
._7yjtidpf >div{margin-top:0}
|
|
13
14
|
._g0eioxwj .actions-button-group button, ._1qryoxwj .actions-button-group button:active, ._sxbroxwj .actions-button-group button:focus, ._1gyioxwj .actions-button-group button:hover{font-size:.875rem}
|
|
14
15
|
._ngc01fxt >div{color:var(--ds-text,#172b4d)}
|
|
@@ -3,6 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { useMemo } from 'react';
|
|
7
|
+
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
6
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
9
|
import FlexibleCard from '../../../FlexibleCard';
|
|
8
10
|
import { CustomBlock, InternalFooterBlock, PreviewBlock, TitleBlock } from '../../../FlexibleCard/components/blocks';
|
|
@@ -13,6 +15,7 @@ var titleBlockCssOld = null;
|
|
|
13
15
|
var titleBlockCss = null;
|
|
14
16
|
var footerBlockCssOld = null;
|
|
15
17
|
var footerBlockCss = null;
|
|
18
|
+
var footerBlockSafariStyles = null;
|
|
16
19
|
var UnresolvedView = function UnresolvedView(_ref) {
|
|
17
20
|
var actions = _ref.actions,
|
|
18
21
|
cardState = _ref.cardState,
|
|
@@ -25,6 +28,13 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
25
28
|
testId = _ref.testId,
|
|
26
29
|
title = _ref.title,
|
|
27
30
|
url = _ref.url;
|
|
31
|
+
var _ref2 = fg('platform-linking-visual-refresh-v2') ?
|
|
32
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
33
|
+
useMemo(function () {
|
|
34
|
+
return browser();
|
|
35
|
+
}, []) : {},
|
|
36
|
+
_ref2$safari = _ref2.safari,
|
|
37
|
+
safari = _ref2$safari === void 0 ? false : _ref2$safari;
|
|
28
38
|
return /*#__PURE__*/React.createElement(FlexibleCard, {
|
|
29
39
|
appearance: "block",
|
|
30
40
|
cardState: cardState,
|
|
@@ -49,7 +59,7 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
49
59
|
actions: actions,
|
|
50
60
|
testId: "smart-block-card-footer",
|
|
51
61
|
status: cardState.status,
|
|
52
|
-
className: ax([fg('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj"])
|
|
62
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj", safari && fg('platform-linking-visual-refresh-v2') && "_4t3i1osq"])
|
|
53
63
|
}));
|
|
54
64
|
};
|
|
55
65
|
export default UnresolvedView;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./index.compiled.css";
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
6
|
import { useCallback, useMemo } from 'react';
|
|
7
|
+
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
6
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
9
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../../../../constants';
|
|
8
10
|
import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
|
|
@@ -13,6 +15,7 @@ import ElementGroup from '../../element-group';
|
|
|
13
15
|
import { filterActionItems } from '../../utils';
|
|
14
16
|
var actionGroupStylesOld = null;
|
|
15
17
|
var actionGroupStyles = null;
|
|
18
|
+
var safariStyles = null;
|
|
16
19
|
var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
17
20
|
var actions = props.actions,
|
|
18
21
|
testId = props.testId,
|
|
@@ -25,6 +28,13 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
25
28
|
var _filterActionItems;
|
|
26
29
|
return ((_filterActionItems = filterActionItems(actions, context)) === null || _filterActionItems === void 0 ? void 0 : _filterActionItems.length) > 0;
|
|
27
30
|
}, [actions, context]);
|
|
31
|
+
var _ref = fg('platform-linking-visual-refresh-v2') ?
|
|
32
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
33
|
+
useMemo(function () {
|
|
34
|
+
return browser();
|
|
35
|
+
}, []) : {},
|
|
36
|
+
_ref$safari = _ref.safari,
|
|
37
|
+
safari = _ref$safari === void 0 ? false : _ref$safari;
|
|
28
38
|
var onDropdownOpenChange = useCallback(function (isOpen) {
|
|
29
39
|
if (onActionMenuOpenChange) {
|
|
30
40
|
onActionMenuOpenChange({
|
|
@@ -38,17 +48,13 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
38
48
|
appearance: 'subtle'
|
|
39
49
|
} : {}, {
|
|
40
50
|
testId: "".concat(testId, "-provider")
|
|
41
|
-
})), actions && hasActions ? /*#__PURE__*/React.createElement(ElementGroup,
|
|
51
|
+
})), actions && hasActions ? /*#__PURE__*/React.createElement(ElementGroup, {
|
|
42
52
|
testId: "smart-element-group-actions",
|
|
43
53
|
align: SmartLinkAlignment.Right,
|
|
44
|
-
direction: SmartLinkDirection.Horizontal
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
css: size === SmartLinkSize.XLarge && actionGroupStylesOld
|
|
49
|
-
}, {
|
|
50
|
-
width: SmartLinkWidth.Flexible
|
|
51
|
-
}), /*#__PURE__*/React.createElement(ActionGroup, {
|
|
54
|
+
direction: SmartLinkDirection.Horizontal,
|
|
55
|
+
width: SmartLinkWidth.Flexible,
|
|
56
|
+
className: ax([size === SmartLinkSize.XLarge && fg('platform-linking-visual-refresh-v1') && "_c71lxy5q", size === SmartLinkSize.XLarge && !fg('platform-linking-visual-refresh-v1') && "_c71lviql", safari && "_4t3i1osq"])
|
|
57
|
+
}, /*#__PURE__*/React.createElement(ActionGroup, {
|
|
52
58
|
onDropdownOpenChange: onDropdownOpenChange,
|
|
53
59
|
items: actions,
|
|
54
60
|
appearance: "default",
|
|
@@ -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: "36.15.
|
|
16
|
+
packageVersion: "36.15.2",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|