@atlaskit/smart-card 43.18.0 → 43.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-modal/renders-embed-modal--default--navx-1895-new-logo-design-false.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-modal/renders-embed-modal--default--navx-1895-new-logo-design-true.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-elements/flex-ui-owned-by-element-view--default.png +2 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +1 -4
- package/dist/cjs/view/EmbedCard/components/ImageIcon.js +5 -10
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +1 -4
- package/dist/cjs/view/EmbedModal/index.js +4 -13
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-badge-element/index.js +2 -5
- package/dist/cjs/view/FlexibleCard/components/elements/media-element/index.js +1 -4
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +1 -2
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +1 -2
- package/dist/cjs/view/InlineCard/index.js +1 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-modal/renders-embed-modal--default--navx-1895-new-logo-design-false.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-modal/renders-embed-modal--default--navx-1895-new-logo-design-true.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-elements/flex-ui-owned-by-element-view--default.png +2 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +1 -4
- package/dist/es2019/view/EmbedCard/components/ImageIcon.js +5 -10
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +0 -3
- package/dist/es2019/view/EmbedModal/index.js +4 -13
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.js +2 -5
- package/dist/es2019/view/FlexibleCard/components/elements/media-element/index.js +1 -4
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +1 -2
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +1 -2
- package/dist/es2019/view/InlineCard/index.js +1 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-modal/renders-embed-modal--default--navx-1895-new-logo-design-false.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-modal/renders-embed-modal--default--navx-1895-new-logo-design-true.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-elements/flex-ui-owned-by-element-view--default.png +2 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +1 -4
- package/dist/esm/view/EmbedCard/components/ImageIcon.js +5 -10
- package/dist/esm/view/EmbedModal/components/link-info/index.js +1 -4
- package/dist/esm/view/EmbedModal/index.js +4 -13
- package/dist/esm/view/FlexibleCard/components/elements/common/base-badge-element/index.js +2 -5
- package/dist/esm/view/FlexibleCard/components/elements/media-element/index.js +1 -4
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +1 -2
- package/dist/esm/view/InlineCard/ResolvedView/index.js +1 -2
- package/dist/esm/view/InlineCard/index.js +1 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 43.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`77df724ec737e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/77df724ec737e) -
|
|
8
|
+
[https://product-fabric.atlassian.net/browse/ED-28631](ED-28631) - cleanup the
|
|
9
|
+
platform_editor_smart_card_otp Statsig experiment
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 43.18.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`127f20512b35e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/127f20512b35e) -
|
|
20
|
+
Set auto focus on embed modal on the first interaction element, behind fg
|
|
21
|
+
platform_navx_sl_a11y_embed_modal
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 43.18.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:9ec9a4ab029e913436f0cf9d5cc2f1b4f050fe2b6a76b8e0ce774d2a0a8f1f72
|
|
3
|
+
size 16459
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:b9d73aac699f778bef0873d3e1678057dcf3890dce4b9695ce85ff8eeed10855
|
|
3
|
+
size 16604
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:60ff11a014326317064fef6a7284c99c2262b0b5270f8fe44dbcd8dd33cac826
|
|
3
|
+
size 3656
|
|
@@ -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: "43.
|
|
14
|
+
packageVersion: "43.18.1"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -14,7 +14,6 @@ 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
16
|
var _userAgent = require("@atlaskit/linking-common/user-agent");
|
|
17
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
17
|
var _constants = require("../../../constants");
|
|
19
18
|
var _FlexibleCard = _interopRequireDefault(require("../../FlexibleCard"));
|
|
20
19
|
var _blocks = require("../../FlexibleCard/components/blocks");
|
|
@@ -73,9 +72,7 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
73
72
|
}, []);
|
|
74
73
|
var uiOptions = _utils.FlexibleCardUiOptions;
|
|
75
74
|
uiOptions.enableSnippetRenderer = true;
|
|
76
|
-
|
|
77
|
-
uiOptions.hideLoadingSkeleton = hideIconLoadingSkeleton;
|
|
78
|
-
}
|
|
75
|
+
uiOptions.hideLoadingSkeleton = hideIconLoadingSkeleton;
|
|
79
76
|
return /*#__PURE__*/React.createElement(_FlexibleCard.default, {
|
|
80
77
|
appearance: "block",
|
|
81
78
|
cardState: cardState,
|
|
@@ -13,7 +13,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
13
13
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
var _reactRenderImage = _interopRequireDefault(require("react-render-image"));
|
|
16
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
16
|
var _styled = require("./styled");
|
|
18
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
19
18
|
var styles = {
|
|
@@ -37,21 +36,17 @@ var ImageIcon = exports.ImageIcon = function ImageIcon(_ref) {
|
|
|
37
36
|
|
|
38
37
|
// If url changes, reset state
|
|
39
38
|
(0, _react.useEffect)(function () {
|
|
40
|
-
|
|
41
|
-
setHasImageErrored(false);
|
|
42
|
-
}
|
|
39
|
+
setHasImageErrored(false);
|
|
43
40
|
}, [src]);
|
|
44
41
|
var handleError = (0, _react.useCallback)(function () {
|
|
45
|
-
|
|
46
|
-
setHasImageErrored(true);
|
|
47
|
-
}
|
|
42
|
+
setHasImageErrored(true);
|
|
48
43
|
}, []);
|
|
49
44
|
|
|
50
45
|
// TODO: do we need this?
|
|
51
46
|
if (!src) {
|
|
52
47
|
return defaultIcon || null;
|
|
53
48
|
}
|
|
54
|
-
if (
|
|
49
|
+
if (hasImageErrored) {
|
|
55
50
|
return defaultIcon;
|
|
56
51
|
}
|
|
57
52
|
var LoadedImageComponent = /*#__PURE__*/_react.default.createElement(_styled.Image
|
|
@@ -62,10 +57,10 @@ var ImageIcon = exports.ImageIcon = function ImageIcon(_ref) {
|
|
|
62
57
|
alt: alt,
|
|
63
58
|
size: size,
|
|
64
59
|
title: title
|
|
65
|
-
}, hideLoadingSkeleton
|
|
60
|
+
}, hideLoadingSkeleton ? {
|
|
66
61
|
onError: handleError
|
|
67
62
|
} : undefined));
|
|
68
|
-
if (
|
|
63
|
+
if (hideLoadingSkeleton) {
|
|
69
64
|
return LoadedImageComponent;
|
|
70
65
|
} else {
|
|
71
66
|
return /*#__PURE__*/_react.default.createElement(_reactRenderImage.default, {
|
|
@@ -147,8 +147,7 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
147
147
|
}))));
|
|
148
148
|
};
|
|
149
149
|
var LinkInfoNew = function LinkInfoNew(_ref2) {
|
|
150
|
-
var
|
|
151
|
-
icon = _ref2.icon,
|
|
150
|
+
var icon = _ref2.icon,
|
|
152
151
|
providerName = _ref2.providerName,
|
|
153
152
|
onDownloadButtonClick = _ref2.onDownloadButtonClick,
|
|
154
153
|
onResizeButtonClick = _ref2.onResizeButtonClick,
|
|
@@ -226,12 +225,10 @@ var LinkInfoNew = function LinkInfoNew(_ref2) {
|
|
|
226
225
|
as: "h2",
|
|
227
226
|
size: "small",
|
|
228
227
|
color: "color.text",
|
|
229
|
-
ref: focusRef,
|
|
230
228
|
testId: "".concat(testId, "-title")
|
|
231
229
|
}, title) : /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
232
230
|
size: "small",
|
|
233
231
|
color: "color.text",
|
|
234
|
-
ref: focusRef,
|
|
235
232
|
testId: "".concat(testId, "-title")
|
|
236
233
|
}, title)), /*#__PURE__*/_react.default.createElement("ul", {
|
|
237
234
|
role: "list",
|
|
@@ -10,7 +10,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _tokens = require("@atlaskit/tokens");
|
|
15
14
|
var _constants = require("../../constants");
|
|
16
15
|
var _useInvokeClientAction = _interopRequireDefault(require("../../state/hooks/use-invoke-client-action"));
|
|
@@ -61,9 +60,6 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
61
60
|
width = _useState4[0],
|
|
62
61
|
setWidth = _useState4[1];
|
|
63
62
|
var openAt = (0, _react.useRef)();
|
|
64
|
-
var focusRef = (0, _platformFeatureFlags.fg)('platform_navx_sl_a11y_embed_modal') ?
|
|
65
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
66
|
-
(0, _react.useRef)(null) : undefined;
|
|
67
63
|
var invoke = (0, _useInvokeClientAction.default)({
|
|
68
64
|
fireEvent: fireEvent
|
|
69
65
|
});
|
|
@@ -107,9 +103,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
107
103
|
if (previewUrl && isSupportTheming) {
|
|
108
104
|
previewUrl = (0, _utils.getPreviewUrlWithTheme)(previewUrl, themeState);
|
|
109
105
|
}
|
|
110
|
-
return /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, isOpen && /*#__PURE__*/_react.default.createElement(_modalDialog.default,
|
|
111
|
-
autoFocus: focusRef
|
|
112
|
-
} : undefined, {
|
|
106
|
+
return /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, isOpen && /*#__PURE__*/_react.default.createElement(_modalDialog.default, {
|
|
113
107
|
height: "100%",
|
|
114
108
|
onClose: handleOnClose,
|
|
115
109
|
onCloseComplete: handleOnCloseComplete,
|
|
@@ -118,16 +112,13 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
118
112
|
width: width,
|
|
119
113
|
label: title,
|
|
120
114
|
isBlanketHidden: isBlanketHidden
|
|
121
|
-
}
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement(_linkInfo.default, {
|
|
122
116
|
icon: linkIcon && {
|
|
123
117
|
icon: /*#__PURE__*/_react.default.createElement(_common.BaseIconElement, (0, _extends2.default)({}, linkIcon, {
|
|
124
118
|
size: _constants.SmartLinkSize.Large
|
|
125
119
|
})),
|
|
126
120
|
isFlexibleUi: true
|
|
127
|
-
}
|
|
128
|
-
}, (0, _platformFeatureFlags.fg)('platform_navx_sl_a11y_embed_modal') ? {
|
|
129
|
-
focusRef: focusRef
|
|
130
|
-
} : undefined, {
|
|
121
|
+
},
|
|
131
122
|
providerName: providerName,
|
|
132
123
|
onViewButtonClick: invokeViewAction ? handleOnViewActionClick : undefined,
|
|
133
124
|
onDownloadButtonClick: invokeDownloadAction ? handleOnDownloadActionClick : undefined,
|
|
@@ -135,7 +126,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
135
126
|
size: width,
|
|
136
127
|
title: title,
|
|
137
128
|
testId: testId
|
|
138
|
-
})
|
|
129
|
+
}), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement(_embedContent.default, {
|
|
139
130
|
isTrusted: isTrusted,
|
|
140
131
|
name: iframeName,
|
|
141
132
|
src: previewUrl,
|
|
@@ -12,7 +12,6 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
15
|
var _constants = require("../../../../../../constants");
|
|
17
16
|
var _messages = require("../../../../../../messages");
|
|
18
17
|
var _flexibleUiContext = require("../../../../../../state/flexible-ui-context");
|
|
@@ -57,7 +56,7 @@ var renderImageIcon = function renderImageIcon(url, testId, hideLoadingSkeleton)
|
|
|
57
56
|
return /*#__PURE__*/_react.default.createElement(_imageIcon.default, {
|
|
58
57
|
testId: testId,
|
|
59
58
|
url: url,
|
|
60
|
-
hideLoadingSkeleton:
|
|
59
|
+
hideLoadingSkeleton: hideLoadingSkeleton
|
|
61
60
|
});
|
|
62
61
|
}
|
|
63
62
|
};
|
|
@@ -86,9 +85,7 @@ var BaseBadgeRefreshNew = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
|
86
85
|
testId = _ref$testId === void 0 ? 'smart-element-badge' : _ref$testId,
|
|
87
86
|
url = _ref.url,
|
|
88
87
|
color = _ref.color;
|
|
89
|
-
var ui = (0,
|
|
90
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
91
|
-
(0, _flexibleUiContext.useFlexibleUiOptionContext)() : undefined;
|
|
88
|
+
var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
|
|
92
89
|
var formattedMessageOrLabel = getFormattedMessageFromIcon(icon) || label;
|
|
93
90
|
var badgeIcon = renderAtlaskitIcon(icon, testId) || renderImageIcon(url, testId, ui === null || ui === void 0 ? void 0 : ui.hideLoadingSkeleton);
|
|
94
91
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
@@ -10,7 +10,6 @@ exports.default = void 0;
|
|
|
10
10
|
require("./index.compiled.css");
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
13
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
15
14
|
var _imageIcon = _interopRequireDefault(require("../../common/image-icon"));
|
|
16
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -39,9 +38,7 @@ var MediaElement = function MediaElement(_ref) {
|
|
|
39
38
|
url = _ref.url,
|
|
40
39
|
onLoad = _ref.onLoad,
|
|
41
40
|
onError = _ref.onError;
|
|
42
|
-
var ui = (0,
|
|
43
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
44
|
-
(0, _flexibleUiContext.useFlexibleUiOptionContext)() : undefined;
|
|
41
|
+
var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
|
|
45
42
|
if (!type || !url) {
|
|
46
43
|
return null;
|
|
47
44
|
}
|
|
@@ -18,7 +18,6 @@ var _reactRenderImage = _interopRequireDefault(require("react-render-image"));
|
|
|
18
18
|
var _link = _interopRequireDefault(require("@atlaskit/icon/core/link"));
|
|
19
19
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
20
20
|
var _colors = require("@atlaskit/theme/colors");
|
|
21
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
22
21
|
var _utils = require("../../../utils");
|
|
23
22
|
var _Icon = require("../Icon");
|
|
24
23
|
var _excluded = ["as", "style"];
|
|
@@ -81,7 +80,7 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = function IconAndTitleLayou
|
|
|
81
80
|
if (!icon || typeof icon !== 'string') {
|
|
82
81
|
return null;
|
|
83
82
|
}
|
|
84
|
-
if (
|
|
83
|
+
if (hideIconLoadingSkeleton) {
|
|
85
84
|
if (hasImageErrored) {
|
|
86
85
|
return errored;
|
|
87
86
|
}
|
|
@@ -12,7 +12,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
15
|
var _HoverCard = require("../../HoverCard");
|
|
17
16
|
var _inlineLozenge = _interopRequireDefault(require("../common/inline-lozenge"));
|
|
18
17
|
var _Frame = require("../Frame");
|
|
@@ -80,7 +79,7 @@ var InlineCardResolvedView = exports.InlineCardResolvedView = /*#__PURE__*/funct
|
|
|
80
79
|
title: title,
|
|
81
80
|
titleTextColor: titleTextColor,
|
|
82
81
|
type: type,
|
|
83
|
-
hideIconLoadingSkeleton:
|
|
82
|
+
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
84
83
|
}), this.renderLozenge());
|
|
85
84
|
if (showHoverPreview && link) {
|
|
86
85
|
return /*#__PURE__*/_react.default.createElement(_HoverCard.HoverCard, {
|
|
@@ -43,7 +43,6 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
43
43
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
44
44
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
45
45
|
var _loadHold = _interopRequireDefault(require("@atlaskit/react-ufo/load-hold"));
|
|
46
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
47
46
|
var _constants = require("../../constants");
|
|
48
47
|
var _extractAccessContext = require("../../extractors/common/context/extractAccessContext");
|
|
49
48
|
var _inline = require("../../extractors/inline");
|
|
@@ -142,7 +141,7 @@ var InlineCard = exports.InlineCard = function InlineCard(_ref2) {
|
|
|
142
141
|
onClick: handleFrameClick,
|
|
143
142
|
testId: testIdWithStatus,
|
|
144
143
|
truncateInline: truncateInline,
|
|
145
|
-
hideIconLoadingSkeleton:
|
|
144
|
+
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
146
145
|
}));
|
|
147
146
|
case 'unauthorized':
|
|
148
147
|
var provider = (0, _linkExtractors.extractSmartLinkProvider)(details);
|
|
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
22
22
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
23
23
|
var PACKAGE_DATA = {
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "43.
|
|
25
|
+
packageVersion: "43.18.1",
|
|
26
26
|
componentName: 'linkUrl'
|
|
27
27
|
};
|
|
28
28
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:9ec9a4ab029e913436f0cf9d5cc2f1b4f050fe2b6a76b8e0ce774d2a0a8f1f72
|
|
3
|
+
size 16459
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:b9d73aac699f778bef0873d3e1678057dcf3890dce4b9695ce85ff8eeed10855
|
|
3
|
+
size 16604
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:60ff11a014326317064fef6a7284c99c2262b0b5270f8fe44dbcd8dd33cac826
|
|
3
|
+
size 3656
|
|
@@ -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: "43.
|
|
5
|
+
packageVersion: "43.18.1"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -5,7 +5,6 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useEffect, useMemo, useState } from 'react';
|
|
7
7
|
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
8
|
import { ActionName, ElementName, SmartLinkPosition } from '../../../constants';
|
|
10
9
|
import FlexibleCard from '../../FlexibleCard';
|
|
11
10
|
import { FooterBlock, MetadataBlock, PreviewBlock, SnippetBlock, TitleBlock } from '../../FlexibleCard/components/blocks';
|
|
@@ -57,9 +56,7 @@ const ResolvedView = ({
|
|
|
57
56
|
}], []);
|
|
58
57
|
const uiOptions = FlexibleCardUiOptions;
|
|
59
58
|
uiOptions.enableSnippetRenderer = true;
|
|
60
|
-
|
|
61
|
-
uiOptions.hideLoadingSkeleton = hideIconLoadingSkeleton;
|
|
62
|
-
}
|
|
59
|
+
uiOptions.hideLoadingSkeleton = hideIconLoadingSkeleton;
|
|
63
60
|
return /*#__PURE__*/React.createElement(FlexibleCard, {
|
|
64
61
|
appearance: "block",
|
|
65
62
|
cardState: cardState,
|
|
@@ -4,7 +4,6 @@ import "./ImageIcon.compiled.css";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
6
6
|
import ImageLoader from 'react-render-image';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
7
|
import { Image } from './styled';
|
|
9
8
|
const styles = {
|
|
10
9
|
roundedImage: "_2rko1rr0"
|
|
@@ -22,21 +21,17 @@ export const ImageIcon = ({
|
|
|
22
21
|
|
|
23
22
|
// If url changes, reset state
|
|
24
23
|
useEffect(() => {
|
|
25
|
-
|
|
26
|
-
setHasImageErrored(false);
|
|
27
|
-
}
|
|
24
|
+
setHasImageErrored(false);
|
|
28
25
|
}, [src]);
|
|
29
26
|
const handleError = useCallback(() => {
|
|
30
|
-
|
|
31
|
-
setHasImageErrored(true);
|
|
32
|
-
}
|
|
27
|
+
setHasImageErrored(true);
|
|
33
28
|
}, []);
|
|
34
29
|
|
|
35
30
|
// TODO: do we need this?
|
|
36
31
|
if (!src) {
|
|
37
32
|
return defaultIcon || null;
|
|
38
33
|
}
|
|
39
|
-
if (
|
|
34
|
+
if (hasImageErrored) {
|
|
40
35
|
return defaultIcon;
|
|
41
36
|
}
|
|
42
37
|
const LoadedImageComponent = /*#__PURE__*/React.createElement(Image
|
|
@@ -47,10 +42,10 @@ export const ImageIcon = ({
|
|
|
47
42
|
alt: alt,
|
|
48
43
|
size: size,
|
|
49
44
|
title: title
|
|
50
|
-
}, hideLoadingSkeleton
|
|
45
|
+
}, hideLoadingSkeleton ? {
|
|
51
46
|
onError: handleError
|
|
52
47
|
} : undefined));
|
|
53
|
-
if (
|
|
48
|
+
if (hideLoadingSkeleton) {
|
|
54
49
|
return LoadedImageComponent;
|
|
55
50
|
} else {
|
|
56
51
|
return /*#__PURE__*/React.createElement(ImageLoader, {
|
|
@@ -135,7 +135,6 @@ const LinkInfo = ({
|
|
|
135
135
|
}))));
|
|
136
136
|
};
|
|
137
137
|
const LinkInfoNew = ({
|
|
138
|
-
focusRef,
|
|
139
138
|
icon,
|
|
140
139
|
providerName,
|
|
141
140
|
onDownloadButtonClick,
|
|
@@ -209,12 +208,10 @@ const LinkInfoNew = ({
|
|
|
209
208
|
as: "h2",
|
|
210
209
|
size: "small",
|
|
211
210
|
color: "color.text",
|
|
212
|
-
ref: focusRef,
|
|
213
211
|
testId: `${testId}-title`
|
|
214
212
|
}, title) : /*#__PURE__*/React.createElement(Heading, {
|
|
215
213
|
size: "small",
|
|
216
214
|
color: "color.text",
|
|
217
|
-
ref: focusRef,
|
|
218
215
|
testId: `${testId}-title`
|
|
219
216
|
}, title)), /*#__PURE__*/React.createElement("ul", {
|
|
220
217
|
role: "list",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useRef, useState } from 'react';
|
|
3
3
|
import ModalDialog, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
6
5
|
import { SmartLinkSize } from '../../constants';
|
|
7
6
|
import useInvokeClientAction from '../../state/hooks/use-invoke-client-action';
|
|
@@ -39,9 +38,6 @@ const EmbedModal = ({
|
|
|
39
38
|
const [isOpen, setIsOpen] = useState(showModal);
|
|
40
39
|
const [width, setWidth] = useState(defaultWidth);
|
|
41
40
|
const openAt = useRef();
|
|
42
|
-
const focusRef = fg('platform_navx_sl_a11y_embed_modal') ?
|
|
43
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
44
|
-
useRef(null) : undefined;
|
|
45
41
|
const invoke = useInvokeClientAction({
|
|
46
42
|
fireEvent
|
|
47
43
|
});
|
|
@@ -83,9 +79,7 @@ const EmbedModal = ({
|
|
|
83
79
|
if (previewUrl && isSupportTheming) {
|
|
84
80
|
previewUrl = getPreviewUrlWithTheme(previewUrl, themeState);
|
|
85
81
|
}
|
|
86
|
-
return /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(ModalDialog,
|
|
87
|
-
autoFocus: focusRef
|
|
88
|
-
} : undefined, {
|
|
82
|
+
return /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(ModalDialog, {
|
|
89
83
|
height: "100%",
|
|
90
84
|
onClose: handleOnClose,
|
|
91
85
|
onCloseComplete: handleOnCloseComplete,
|
|
@@ -94,16 +88,13 @@ const EmbedModal = ({
|
|
|
94
88
|
width: width,
|
|
95
89
|
label: title,
|
|
96
90
|
isBlanketHidden: isBlanketHidden
|
|
97
|
-
}
|
|
91
|
+
}, /*#__PURE__*/React.createElement(LinkInfo, {
|
|
98
92
|
icon: linkIcon && {
|
|
99
93
|
icon: /*#__PURE__*/React.createElement(BaseIconElement, _extends({}, linkIcon, {
|
|
100
94
|
size: SmartLinkSize.Large
|
|
101
95
|
})),
|
|
102
96
|
isFlexibleUi: true
|
|
103
|
-
}
|
|
104
|
-
}, fg('platform_navx_sl_a11y_embed_modal') ? {
|
|
105
|
-
focusRef
|
|
106
|
-
} : undefined, {
|
|
97
|
+
},
|
|
107
98
|
providerName: providerName,
|
|
108
99
|
onViewButtonClick: invokeViewAction ? handleOnViewActionClick : undefined,
|
|
109
100
|
onDownloadButtonClick: invokeDownloadAction ? handleOnDownloadActionClick : undefined,
|
|
@@ -111,7 +102,7 @@ const EmbedModal = ({
|
|
|
111
102
|
size: width,
|
|
112
103
|
title: title,
|
|
113
104
|
testId: testId
|
|
114
|
-
})
|
|
105
|
+
}), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(EmbedContent, {
|
|
115
106
|
isTrusted: isTrusted,
|
|
116
107
|
name: iframeName,
|
|
117
108
|
src: previewUrl,
|
package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import "./index.compiled.css";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { forwardRef } from 'react';
|
|
6
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
7
|
import { IconType } from '../../../../../../constants';
|
|
9
8
|
import { messages } from '../../../../../../messages';
|
|
10
9
|
import { useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
|
|
@@ -58,7 +57,7 @@ const renderImageIcon = (url, testId, hideLoadingSkeleton) => {
|
|
|
58
57
|
return /*#__PURE__*/React.createElement(ImageIcon, {
|
|
59
58
|
testId: testId,
|
|
60
59
|
url: url,
|
|
61
|
-
hideLoadingSkeleton:
|
|
60
|
+
hideLoadingSkeleton: hideLoadingSkeleton
|
|
62
61
|
});
|
|
63
62
|
}
|
|
64
63
|
};
|
|
@@ -85,9 +84,7 @@ const BaseBadgeRefreshNew = /*#__PURE__*/forwardRef(({
|
|
|
85
84
|
url,
|
|
86
85
|
color
|
|
87
86
|
}, ref) => {
|
|
88
|
-
const ui =
|
|
89
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
90
|
-
useFlexibleUiOptionContext() : undefined;
|
|
87
|
+
const ui = useFlexibleUiOptionContext();
|
|
91
88
|
const formattedMessageOrLabel = getFormattedMessageFromIcon(icon) || label;
|
|
92
89
|
const badgeIcon = renderAtlaskitIcon(icon, testId) || renderImageIcon(url, testId, ui === null || ui === void 0 ? void 0 : ui.hideLoadingSkeleton);
|
|
93
90
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
7
6
|
import ImageIcon from '../../common/image-icon';
|
|
8
7
|
/**
|
|
@@ -30,9 +29,7 @@ const MediaElement = ({
|
|
|
30
29
|
onLoad,
|
|
31
30
|
onError
|
|
32
31
|
}) => {
|
|
33
|
-
const ui =
|
|
34
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
35
|
-
useFlexibleUiOptionContext() : undefined;
|
|
32
|
+
const ui = useFlexibleUiOptionContext();
|
|
36
33
|
if (!type || !url) {
|
|
37
34
|
return null;
|
|
38
35
|
}
|
|
@@ -9,7 +9,6 @@ import ImageLoader from 'react-render-image';
|
|
|
9
9
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
10
10
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
11
11
|
import { B400 } from '@atlaskit/theme/colors';
|
|
12
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
12
|
import { isProfileType } from '../../../utils';
|
|
14
13
|
import { Shimmer } from '../Icon';
|
|
15
14
|
const iconWrapperStyle = null;
|
|
@@ -67,7 +66,7 @@ export const IconAndTitleLayout = ({
|
|
|
67
66
|
if (!icon || typeof icon !== 'string') {
|
|
68
67
|
return null;
|
|
69
68
|
}
|
|
70
|
-
if (
|
|
69
|
+
if (hideIconLoadingSkeleton) {
|
|
71
70
|
if (hasImageErrored) {
|
|
72
71
|
return errored;
|
|
73
72
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
3
|
import { HoverCard } from '../../HoverCard';
|
|
5
4
|
import InlineLozenge from '../common/inline-lozenge';
|
|
6
5
|
import { Frame } from '../Frame';
|
|
@@ -57,7 +56,7 @@ export class InlineCardResolvedView extends React.Component {
|
|
|
57
56
|
title: title,
|
|
58
57
|
titleTextColor: titleTextColor,
|
|
59
58
|
type: type,
|
|
60
|
-
hideIconLoadingSkeleton:
|
|
59
|
+
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
61
60
|
}), this.renderLozenge());
|
|
62
61
|
if (showHoverPreview && link) {
|
|
63
62
|
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
@@ -6,7 +6,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
6
6
|
// TODO: Package Owner - please fix:
|
|
7
7
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
8
8
|
import UFOHoldLoad from '@atlaskit/react-ufo/load-hold';
|
|
9
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
9
|
import { SmartLinkStatus } from '../../constants';
|
|
11
10
|
import { extractRequestAccessContextImproved } from '../../extractors/common/context/extractAccessContext';
|
|
12
11
|
import { extractInlineProps } from '../../extractors/inline';
|
|
@@ -106,7 +105,7 @@ export const InlineCard = ({
|
|
|
106
105
|
onClick: handleFrameClick,
|
|
107
106
|
testId: testIdWithStatus,
|
|
108
107
|
truncateInline: truncateInline,
|
|
109
|
-
hideIconLoadingSkeleton:
|
|
108
|
+
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
110
109
|
}));
|
|
111
110
|
case 'unauthorized':
|
|
112
111
|
const provider = extractSmartLinkProvider(details);
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
const PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "43.
|
|
15
|
+
packageVersion: "43.18.1",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:9ec9a4ab029e913436f0cf9d5cc2f1b4f050fe2b6a76b8e0ce774d2a0a8f1f72
|
|
3
|
+
size 16459
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:b9d73aac699f778bef0873d3e1678057dcf3890dce4b9695ce85ff8eeed10855
|
|
3
|
+
size 16604
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:60ff11a014326317064fef6a7284c99c2262b0b5270f8fe44dbcd8dd33cac826
|
|
3
|
+
size 3656
|
|
@@ -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: "43.
|
|
7
|
+
packageVersion: "43.18.1"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -6,7 +6,6 @@ import * as React from 'react';
|
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
import { useEffect, useMemo, useState } from 'react';
|
|
8
8
|
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
9
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
9
|
import { ActionName, ElementName, SmartLinkPosition } from '../../../constants';
|
|
11
10
|
import FlexibleCard from '../../FlexibleCard';
|
|
12
11
|
import { FooterBlock, MetadataBlock, PreviewBlock, SnippetBlock, TitleBlock } from '../../FlexibleCard/components/blocks';
|
|
@@ -64,9 +63,7 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
64
63
|
}, []);
|
|
65
64
|
var uiOptions = FlexibleCardUiOptions;
|
|
66
65
|
uiOptions.enableSnippetRenderer = true;
|
|
67
|
-
|
|
68
|
-
uiOptions.hideLoadingSkeleton = hideIconLoadingSkeleton;
|
|
69
|
-
}
|
|
66
|
+
uiOptions.hideLoadingSkeleton = hideIconLoadingSkeleton;
|
|
70
67
|
return /*#__PURE__*/React.createElement(FlexibleCard, {
|
|
71
68
|
appearance: "block",
|
|
72
69
|
cardState: cardState,
|
|
@@ -5,7 +5,6 @@ import "./ImageIcon.compiled.css";
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
7
7
|
import ImageLoader from 'react-render-image';
|
|
8
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
8
|
import { Image } from './styled';
|
|
10
9
|
var styles = {
|
|
11
10
|
roundedImage: "_2rko1rr0"
|
|
@@ -28,21 +27,17 @@ export var ImageIcon = function ImageIcon(_ref) {
|
|
|
28
27
|
|
|
29
28
|
// If url changes, reset state
|
|
30
29
|
useEffect(function () {
|
|
31
|
-
|
|
32
|
-
setHasImageErrored(false);
|
|
33
|
-
}
|
|
30
|
+
setHasImageErrored(false);
|
|
34
31
|
}, [src]);
|
|
35
32
|
var handleError = useCallback(function () {
|
|
36
|
-
|
|
37
|
-
setHasImageErrored(true);
|
|
38
|
-
}
|
|
33
|
+
setHasImageErrored(true);
|
|
39
34
|
}, []);
|
|
40
35
|
|
|
41
36
|
// TODO: do we need this?
|
|
42
37
|
if (!src) {
|
|
43
38
|
return defaultIcon || null;
|
|
44
39
|
}
|
|
45
|
-
if (
|
|
40
|
+
if (hasImageErrored) {
|
|
46
41
|
return defaultIcon;
|
|
47
42
|
}
|
|
48
43
|
var LoadedImageComponent = /*#__PURE__*/React.createElement(Image
|
|
@@ -53,10 +48,10 @@ export var ImageIcon = function ImageIcon(_ref) {
|
|
|
53
48
|
alt: alt,
|
|
54
49
|
size: size,
|
|
55
50
|
title: title
|
|
56
|
-
}, hideLoadingSkeleton
|
|
51
|
+
}, hideLoadingSkeleton ? {
|
|
57
52
|
onError: handleError
|
|
58
53
|
} : undefined));
|
|
59
|
-
if (
|
|
54
|
+
if (hideLoadingSkeleton) {
|
|
60
55
|
return LoadedImageComponent;
|
|
61
56
|
} else {
|
|
62
57
|
return /*#__PURE__*/React.createElement(ImageLoader, {
|
|
@@ -138,8 +138,7 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
138
138
|
}))));
|
|
139
139
|
};
|
|
140
140
|
var LinkInfoNew = function LinkInfoNew(_ref2) {
|
|
141
|
-
var
|
|
142
|
-
icon = _ref2.icon,
|
|
141
|
+
var icon = _ref2.icon,
|
|
143
142
|
providerName = _ref2.providerName,
|
|
144
143
|
onDownloadButtonClick = _ref2.onDownloadButtonClick,
|
|
145
144
|
onResizeButtonClick = _ref2.onResizeButtonClick,
|
|
@@ -217,12 +216,10 @@ var LinkInfoNew = function LinkInfoNew(_ref2) {
|
|
|
217
216
|
as: "h2",
|
|
218
217
|
size: "small",
|
|
219
218
|
color: "color.text",
|
|
220
|
-
ref: focusRef,
|
|
221
219
|
testId: "".concat(testId, "-title")
|
|
222
220
|
}, title) : /*#__PURE__*/React.createElement(Heading, {
|
|
223
221
|
size: "small",
|
|
224
222
|
color: "color.text",
|
|
225
|
-
ref: focusRef,
|
|
226
223
|
testId: "".concat(testId, "-title")
|
|
227
224
|
}, title)), /*#__PURE__*/React.createElement("ul", {
|
|
228
225
|
role: "list",
|
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import React, { useCallback, useRef, useState } from 'react';
|
|
4
4
|
import ModalDialog, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
7
6
|
import { SmartLinkSize } from '../../constants';
|
|
8
7
|
import useInvokeClientAction from '../../state/hooks/use-invoke-client-action';
|
|
@@ -52,9 +51,6 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
52
51
|
width = _useState4[0],
|
|
53
52
|
setWidth = _useState4[1];
|
|
54
53
|
var openAt = useRef();
|
|
55
|
-
var focusRef = fg('platform_navx_sl_a11y_embed_modal') ?
|
|
56
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
57
|
-
useRef(null) : undefined;
|
|
58
54
|
var invoke = useInvokeClientAction({
|
|
59
55
|
fireEvent: fireEvent
|
|
60
56
|
});
|
|
@@ -98,9 +94,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
98
94
|
if (previewUrl && isSupportTheming) {
|
|
99
95
|
previewUrl = getPreviewUrlWithTheme(previewUrl, themeState);
|
|
100
96
|
}
|
|
101
|
-
return /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(ModalDialog,
|
|
102
|
-
autoFocus: focusRef
|
|
103
|
-
} : undefined, {
|
|
97
|
+
return /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(ModalDialog, {
|
|
104
98
|
height: "100%",
|
|
105
99
|
onClose: handleOnClose,
|
|
106
100
|
onCloseComplete: handleOnCloseComplete,
|
|
@@ -109,16 +103,13 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
109
103
|
width: width,
|
|
110
104
|
label: title,
|
|
111
105
|
isBlanketHidden: isBlanketHidden
|
|
112
|
-
}
|
|
106
|
+
}, /*#__PURE__*/React.createElement(LinkInfo, {
|
|
113
107
|
icon: linkIcon && {
|
|
114
108
|
icon: /*#__PURE__*/React.createElement(BaseIconElement, _extends({}, linkIcon, {
|
|
115
109
|
size: SmartLinkSize.Large
|
|
116
110
|
})),
|
|
117
111
|
isFlexibleUi: true
|
|
118
|
-
}
|
|
119
|
-
}, fg('platform_navx_sl_a11y_embed_modal') ? {
|
|
120
|
-
focusRef: focusRef
|
|
121
|
-
} : undefined, {
|
|
112
|
+
},
|
|
122
113
|
providerName: providerName,
|
|
123
114
|
onViewButtonClick: invokeViewAction ? handleOnViewActionClick : undefined,
|
|
124
115
|
onDownloadButtonClick: invokeDownloadAction ? handleOnDownloadActionClick : undefined,
|
|
@@ -126,7 +117,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
126
117
|
size: width,
|
|
127
118
|
title: title,
|
|
128
119
|
testId: testId
|
|
129
|
-
})
|
|
120
|
+
}), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(EmbedContent, {
|
|
130
121
|
isTrusted: isTrusted,
|
|
131
122
|
name: iframeName,
|
|
132
123
|
src: previewUrl,
|
|
@@ -7,7 +7,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
7
7
|
|
|
8
8
|
import React, { forwardRef } from 'react';
|
|
9
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
10
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
10
|
import { IconType } from '../../../../../../constants';
|
|
12
11
|
import { messages } from '../../../../../../messages';
|
|
13
12
|
import { useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
|
|
@@ -49,7 +48,7 @@ var renderImageIcon = function renderImageIcon(url, testId, hideLoadingSkeleton)
|
|
|
49
48
|
return /*#__PURE__*/React.createElement(ImageIcon, {
|
|
50
49
|
testId: testId,
|
|
51
50
|
url: url,
|
|
52
|
-
hideLoadingSkeleton:
|
|
51
|
+
hideLoadingSkeleton: hideLoadingSkeleton
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
54
|
};
|
|
@@ -78,9 +77,7 @@ var BaseBadgeRefreshNew = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
78
77
|
testId = _ref$testId === void 0 ? 'smart-element-badge' : _ref$testId,
|
|
79
78
|
url = _ref.url,
|
|
80
79
|
color = _ref.color;
|
|
81
|
-
var ui =
|
|
82
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
83
|
-
useFlexibleUiOptionContext() : undefined;
|
|
80
|
+
var ui = useFlexibleUiOptionContext();
|
|
84
81
|
var formattedMessageOrLabel = getFormattedMessageFromIcon(icon) || label;
|
|
85
82
|
var badgeIcon = renderAtlaskitIcon(icon, testId) || renderImageIcon(url, testId, ui === null || ui === void 0 ? void 0 : ui.hideLoadingSkeleton);
|
|
86
83
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
7
6
|
import ImageIcon from '../../common/image-icon';
|
|
8
7
|
/**
|
|
@@ -30,9 +29,7 @@ var MediaElement = function MediaElement(_ref) {
|
|
|
30
29
|
url = _ref.url,
|
|
31
30
|
onLoad = _ref.onLoad,
|
|
32
31
|
onError = _ref.onError;
|
|
33
|
-
var ui =
|
|
34
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
35
|
-
useFlexibleUiOptionContext() : undefined;
|
|
32
|
+
var ui = useFlexibleUiOptionContext();
|
|
36
33
|
if (!type || !url) {
|
|
37
34
|
return null;
|
|
38
35
|
}
|
|
@@ -12,7 +12,6 @@ import ImageLoader from 'react-render-image';
|
|
|
12
12
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
13
13
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
14
14
|
import { B400 } from '@atlaskit/theme/colors';
|
|
15
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
15
|
import { isProfileType } from '../../../utils';
|
|
17
16
|
import { Shimmer } from '../Icon';
|
|
18
17
|
var iconWrapperStyle = null;
|
|
@@ -73,7 +72,7 @@ export var IconAndTitleLayout = function IconAndTitleLayout(_ref2) {
|
|
|
73
72
|
if (!icon || typeof icon !== 'string') {
|
|
74
73
|
return null;
|
|
75
74
|
}
|
|
76
|
-
if (
|
|
75
|
+
if (hideIconLoadingSkeleton) {
|
|
77
76
|
if (hasImageErrored) {
|
|
78
77
|
return errored;
|
|
79
78
|
}
|
|
@@ -7,7 +7,6 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
10
|
import { HoverCard } from '../../HoverCard';
|
|
12
11
|
import InlineLozenge from '../common/inline-lozenge';
|
|
13
12
|
import { Frame } from '../Frame';
|
|
@@ -73,7 +72,7 @@ export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
|
73
72
|
title: title,
|
|
74
73
|
titleTextColor: titleTextColor,
|
|
75
74
|
type: type,
|
|
76
|
-
hideIconLoadingSkeleton:
|
|
75
|
+
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
77
76
|
}), this.renderLozenge());
|
|
78
77
|
if (showHoverPreview && link) {
|
|
79
78
|
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
@@ -9,7 +9,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
9
9
|
// TODO: Package Owner - please fix:
|
|
10
10
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
11
11
|
import UFOHoldLoad from '@atlaskit/react-ufo/load-hold';
|
|
12
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
12
|
import { SmartLinkStatus } from '../../constants';
|
|
14
13
|
import { extractRequestAccessContextImproved } from '../../extractors/common/context/extractAccessContext';
|
|
15
14
|
import { extractInlineProps } from '../../extractors/inline';
|
|
@@ -105,7 +104,7 @@ export var InlineCard = function InlineCard(_ref2) {
|
|
|
105
104
|
onClick: handleFrameClick,
|
|
106
105
|
testId: testIdWithStatus,
|
|
107
106
|
truncateInline: truncateInline,
|
|
108
|
-
hideIconLoadingSkeleton:
|
|
107
|
+
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
109
108
|
}));
|
|
110
109
|
case 'unauthorized':
|
|
111
110
|
var provider = extractSmartLinkProvider(details);
|
|
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
15
15
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
16
16
|
var PACKAGE_DATA = {
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "43.
|
|
18
|
+
packageVersion: "43.18.1",
|
|
19
19
|
componentName: 'linkUrl'
|
|
20
20
|
};
|
|
21
21
|
var Anchor = withLinkClickedEvent('a');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "43.
|
|
3
|
+
"version": "43.19.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
63
63
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
64
64
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
65
|
-
"@atlaskit/popup": "^4.
|
|
65
|
+
"@atlaskit/popup": "^4.12.0",
|
|
66
66
|
"@atlaskit/primitives": "^17.0.0",
|
|
67
67
|
"@atlaskit/section-message": "^8.11.0",
|
|
68
68
|
"@atlaskit/select": "^21.6.0",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"@atlaskit/textfield": "^8.2.0",
|
|
72
72
|
"@atlaskit/theme": "^21.0.0",
|
|
73
73
|
"@atlaskit/tile": "^1.0.0",
|
|
74
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
75
|
-
"@atlaskit/tokens": "^9.
|
|
74
|
+
"@atlaskit/tmp-editor-statsig": "^16.6.0",
|
|
75
|
+
"@atlaskit/tokens": "^9.1.0",
|
|
76
76
|
"@atlaskit/tooltip": "^20.11.0",
|
|
77
77
|
"@atlaskit/ufo": "^0.4.0",
|
|
78
78
|
"@babel/runtime": "^7.0.0",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"uuid": "^3.1.0"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
|
-
"@atlaskit/link-provider": "^4.
|
|
93
|
+
"@atlaskit/link-provider": "^4.1.0",
|
|
94
94
|
"react": "^18.2.0",
|
|
95
95
|
"react-dom": "^18.2.0",
|
|
96
96
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -105,12 +105,11 @@
|
|
|
105
105
|
"@atlaskit/ssr": "workspace:^",
|
|
106
106
|
"@atlassian/analytics-tooling": "workspace:^",
|
|
107
107
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
108
|
-
"@atlassian/gemini": "^1.
|
|
108
|
+
"@atlassian/gemini": "^1.28.0",
|
|
109
109
|
"@atlassian/testing-library": "^0.4.0",
|
|
110
110
|
"@testing-library/dom": "^10.1.0",
|
|
111
111
|
"@testing-library/jest-dom": "^6.4.5",
|
|
112
|
-
"@testing-library/react": "^
|
|
113
|
-
"@testing-library/react-hooks": "^8.0.1",
|
|
112
|
+
"@testing-library/react": "^16.3.0",
|
|
114
113
|
"@testing-library/user-event": "^14.4.3",
|
|
115
114
|
"@types/facepaint": "^1.2.1",
|
|
116
115
|
"@types/lorem-ipsum": "^1.0.2",
|