@atlaskit/smart-card 46.16.0 → 46.18.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 +32 -0
- package/dist/cjs/extractors/action/extract-invoke-preview-action.js +1 -2
- package/dist/cjs/extractors/embed/extract-smart-link-context.js +11 -15
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/card-error-boundary/index.js +53 -47
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +1 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/action/extract-invoke-preview-action.js +1 -2
- package/dist/es2019/extractors/embed/extract-smart-link-context.js +12 -16
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/card-error-boundary/index.js +53 -48
- package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +1 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/action/extract-invoke-preview-action.js +1 -2
- package/dist/esm/extractors/embed/extract-smart-link-context.js +11 -15
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/card-error-boundary/index.js +51 -45
- package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +1 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 46.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`01ffb8c2ec30f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/01ffb8c2ec30f) -
|
|
8
|
+
Update i18n NPM package versions for linking-platform,smart-experiences (Group 15)
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 46.17.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [`c13b574ab38d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c13b574ab38d2) -
|
|
19
|
+
Declare the workspace dependencies used by package source and emitted types so isolated
|
|
20
|
+
installations can resolve them.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [`930e07f6f6e2a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/930e07f6f6e2a) -
|
|
25
|
+
Preserve CardSSR error containment behind platform_smartlink_cardssr_missing_events while
|
|
26
|
+
retaining missing analytics and UFO events. Do not forward caught boundary errors to consumer
|
|
27
|
+
onError callbacks. Keep best-effort analytics and UFO diagnostics exception-safe so their own
|
|
28
|
+
failures cannot escape the card boundary, and skip diagnostic context extraction for resolver API
|
|
29
|
+
errors.
|
|
30
|
+
- [`b1dec19499f60`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b1dec19499f60) -
|
|
31
|
+
Cleanup feature gate platform_lp_use_generator_icon_for_provider, retaining generator provider
|
|
32
|
+
icons and separate entity icons.
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
|
|
3
35
|
## 46.16.0
|
|
4
36
|
|
|
5
37
|
### Minor Changes
|
|
@@ -23,7 +23,6 @@ var _canShowAction = require("../../utils/actions/can-show-action");
|
|
|
23
23
|
var _utils = require("../../view/EmbedModal/utils");
|
|
24
24
|
var _extractIsSupportTheming = require("../common/meta/extractIsSupportTheming");
|
|
25
25
|
var _extractIsTrusted = require("../common/meta/extractIsTrusted");
|
|
26
|
-
var _extractLinkIcon = require("../flexible/icon/extract-link-icon");
|
|
27
26
|
var _extractSmartLinkIcon = require("../flexible/icon/extract-smart-link-icon");
|
|
28
27
|
var _extractInvokeDownloadAction = require("./extract-invoke-download-action");
|
|
29
28
|
var _extractInvokeViewAction = require("./extract-invoke-view-action");
|
|
@@ -125,7 +124,7 @@ var extractInvokePreviewAction = exports.extractInvokePreviewAction = function e
|
|
|
125
124
|
invokeViewAction: (0, _extractInvokeViewAction.extractInvokeViewAction)(param, true),
|
|
126
125
|
isSupportTheming: (0, _extractIsSupportTheming.extractIsSupportTheming)(meta),
|
|
127
126
|
isTrusted: (0, _extractIsTrusted.extractIsTrusted)(meta),
|
|
128
|
-
linkIcon: (0,
|
|
127
|
+
linkIcon: (0, _extractSmartLinkIcon.extractSmartLinkIcon)(response),
|
|
129
128
|
providerName: (_extractSmartLinkProv = (0, _extractSmartLinkProvider.extractSmartLinkProvider)(response)) === null || _extractSmartLinkProv === void 0 ? void 0 : _extractSmartLinkProv.text,
|
|
130
129
|
onClose: onClose,
|
|
131
130
|
origin: origin,
|
|
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _extractEntityIcon = require("@atlaskit/link-extractors/extract-entity-icon");
|
|
10
10
|
var _extractEntityProvider = require("@atlaskit/link-extractors/extract-entity-provider");
|
|
11
11
|
var _isEntityPresent = require("@atlaskit/link-extractors/is-entity-present");
|
|
12
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
12
|
var _getEmptyJsonLd = require("../../utils/get-empty-json-ld");
|
|
14
13
|
var _generateContext = require("../common/context/generateContext");
|
|
15
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -19,21 +18,18 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
18
|
*/
|
|
20
19
|
function extractSmartLinkContext(response) {
|
|
21
20
|
if ((0, _isEntityPresent.isEntityPresent)(response)) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
var entityIcon = (0, _extractEntityIcon.extractEntityIcon)(response);
|
|
29
|
-
return _objectSpread(_objectSpread({}, entityProvider), {}, {
|
|
30
|
-
icon: (_entityIcon$url = entityIcon === null || entityIcon === void 0 ? void 0 : entityIcon.url) !== null && _entityIcon$url !== void 0 ? _entityIcon$url : entityProvider.icon,
|
|
31
|
-
iconLabel: (_entityIcon$label = entityIcon === null || entityIcon === void 0 ? void 0 : entityIcon.label) !== null && _entityIcon$label !== void 0 ? _entityIcon$label : entityProvider.iconLabel,
|
|
32
|
-
providerIcon: entityProvider.icon,
|
|
33
|
-
providerIconLabel: entityProvider.iconLabel
|
|
34
|
-
});
|
|
21
|
+
var _entityIcon$url, _entityIcon$label;
|
|
22
|
+
var entityProvider = (0, _extractEntityProvider.extractEntityProvider)(response);
|
|
23
|
+
if (!entityProvider) {
|
|
24
|
+
return undefined;
|
|
35
25
|
}
|
|
36
|
-
|
|
26
|
+
var entityIcon = (0, _extractEntityIcon.extractEntityIcon)(response);
|
|
27
|
+
return _objectSpread(_objectSpread({}, entityProvider), {}, {
|
|
28
|
+
icon: (_entityIcon$url = entityIcon === null || entityIcon === void 0 ? void 0 : entityIcon.url) !== null && _entityIcon$url !== void 0 ? _entityIcon$url : entityProvider.icon,
|
|
29
|
+
iconLabel: (_entityIcon$label = entityIcon === null || entityIcon === void 0 ? void 0 : entityIcon.label) !== null && _entityIcon$label !== void 0 ? _entityIcon$label : entityProvider.iconLabel,
|
|
30
|
+
providerIcon: entityProvider.icon,
|
|
31
|
+
providerIconLabel: entityProvider.iconLabel
|
|
32
|
+
});
|
|
37
33
|
}
|
|
38
34
|
return (0, _generateContext.generateContext)((response === null || response === void 0 ? void 0 : response.data) || (0, _getEmptyJsonLd.getEmptyJsonLd)());
|
|
39
35
|
}
|
|
@@ -25,7 +25,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
25
25
|
var context = exports.context = {
|
|
26
26
|
componentName: 'smart-cards',
|
|
27
27
|
packageName: "@atlaskit/smart-card" || '',
|
|
28
|
-
packageVersion: "46.
|
|
28
|
+
packageVersion: "46.17.0" || ''
|
|
29
29
|
};
|
|
30
30
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
31
31
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var
|
|
4
|
+
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
11
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
14
|
var _reactErrorBoundary = require("react-error-boundary");
|
|
@@ -22,7 +23,7 @@ var _LoadingCardLink = require("../component-lazy/LoadingCardLink");
|
|
|
22
23
|
var _excluded = ["children"],
|
|
23
24
|
_excluded2 = ["children", "isFlexibleCard"],
|
|
24
25
|
_excluded3 = ["isFlexibleCard"];
|
|
25
|
-
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" !=
|
|
26
|
+
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" != _typeof3(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); }
|
|
26
27
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27
28
|
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; }
|
|
28
29
|
var CardErrorBoundaryOld = function CardErrorBoundaryOld(_ref) {
|
|
@@ -47,7 +48,6 @@ var CardErrorBoundaryNew = function CardErrorBoundaryNew(_ref2) {
|
|
|
47
48
|
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
48
49
|
var appearance = props.appearance,
|
|
49
50
|
id = props.id,
|
|
50
|
-
onError = props.onError,
|
|
51
51
|
url = props.url;
|
|
52
52
|
var ErrorFallbackComponent = props.fallbackComponent;
|
|
53
53
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
@@ -57,54 +57,60 @@ var CardErrorBoundaryNew = function CardErrorBoundaryNew(_ref2) {
|
|
|
57
57
|
var store = smartCardContext === null || smartCardContext === void 0 ? void 0 : smartCardContext.store;
|
|
58
58
|
var display = isFlexibleCard ? 'flexible' : appearance;
|
|
59
59
|
|
|
60
|
-
//
|
|
60
|
+
// Analytics parity with CardWithURLRenderer only. Preserve CardSSR's local error
|
|
61
|
+
// containment: forwarding caught errors to the consumer can cause a rethrow.
|
|
61
62
|
var errorHandler = (0, _react.useCallback)(function (error, info) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
// NB: APIErrors are thrown in response to Object Resolver Service. We do not
|
|
78
|
-
// fire an event for these, as they do not cover failed UI render events.
|
|
79
|
-
// The rest of the errors caught here are unexpected, and correlate
|
|
80
|
-
// to the reliability of the smart-card front-end components.
|
|
81
|
-
// Likewise, chunk loading errors are not caused by a failure of smart-card rendering.
|
|
82
|
-
if (error.name === 'ChunkLoadError') {
|
|
83
|
-
fireEvent('operational.smartLink.chunkLoadFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
|
|
84
|
-
display: display,
|
|
85
|
-
error: error,
|
|
86
|
-
errorInfo: errorInfo,
|
|
87
|
-
definitionId: null
|
|
88
|
-
}));
|
|
89
|
-
} else if (error.name !== 'APIError') {
|
|
90
|
-
(0, _startUfoExperience.startUfoExperience)('smart-link-rendered', id, {
|
|
91
|
-
ssr: true
|
|
92
|
-
});
|
|
93
|
-
(0, _failUfoExperience.failUfoExperience)('smart-link-rendered', id);
|
|
94
|
-
(0, _failUfoExperience.failUfoExperience)('smart-link-authenticated', id);
|
|
95
|
-
fireEvent('ui.smartLink.renderFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
|
|
63
|
+
try {
|
|
64
|
+
// Error inspection and diagnostics must never break the local fallback.
|
|
65
|
+
var errorName = error !== null && (0, _typeof2.default)(error) === 'object' && 'name' in error ? error.name : undefined;
|
|
66
|
+
// Resolver API errors do not represent failed UI renders.
|
|
67
|
+
if (errorName === 'APIError') {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
var componentStack = info.componentStack;
|
|
71
|
+
var errorInfo = {
|
|
72
|
+
componentStack: componentStack
|
|
73
|
+
};
|
|
74
|
+
// Read the link state when the error happens: useSmartCardContext does not subscribe
|
|
75
|
+
// to store updates, so a value captured during render can be stale by now.
|
|
76
|
+
var state = store ? (0, _store.getUrl)(store, url) : undefined;
|
|
77
|
+
var analyticsContext = (0, _getSmartLinkAnalyticsContext.getSmartLinkAnalyticsContext)({
|
|
96
78
|
display: display,
|
|
97
79
|
id: id,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
80
|
+
response: state === null || state === void 0 ? void 0 : state.details,
|
|
81
|
+
status: state === null || state === void 0 ? void 0 : state.status,
|
|
82
|
+
url: url,
|
|
83
|
+
error: state === null || state === void 0 ? void 0 : state.error
|
|
84
|
+
});
|
|
85
|
+
// NB: APIErrors are thrown in response to Object Resolver Service. We do not
|
|
86
|
+
// fire an event for these, as they do not cover failed UI render events.
|
|
87
|
+
// The rest of the errors caught here are unexpected, and correlate
|
|
88
|
+
// to the reliability of the smart-card front-end components.
|
|
89
|
+
// Likewise, chunk loading errors are not caused by a failure of smart-card rendering.
|
|
90
|
+
if (errorName === 'ChunkLoadError') {
|
|
91
|
+
fireEvent('operational.smartLink.chunkLoadFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
|
|
92
|
+
display: display,
|
|
93
|
+
error: error,
|
|
94
|
+
errorInfo: errorInfo,
|
|
95
|
+
definitionId: null
|
|
96
|
+
}));
|
|
97
|
+
} else {
|
|
98
|
+
(0, _startUfoExperience.startUfoExperience)('smart-link-rendered', id, {
|
|
99
|
+
ssr: true
|
|
100
|
+
});
|
|
101
|
+
(0, _failUfoExperience.failUfoExperience)('smart-link-rendered', id);
|
|
102
|
+
(0, _failUfoExperience.failUfoExperience)('smart-link-authenticated', id);
|
|
103
|
+
fireEvent('ui.smartLink.renderFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
|
|
104
|
+
display: display,
|
|
105
|
+
id: id,
|
|
106
|
+
error: error,
|
|
107
|
+
errorInfo: errorInfo
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
} catch (_unused) {
|
|
111
|
+
// Best-effort diagnostics must not escape the card error boundary.
|
|
101
112
|
}
|
|
102
|
-
|
|
103
|
-
status: 'errored',
|
|
104
|
-
url: url,
|
|
105
|
-
err: error
|
|
106
|
-
});
|
|
107
|
-
}, [display, fireEvent, id, onError, store, url]);
|
|
113
|
+
}, [display, fireEvent, id, store, url]);
|
|
108
114
|
var errorBoundaryFallbackComponent = function errorBoundaryFallbackComponent() {
|
|
109
115
|
if (ErrorFallbackComponent) {
|
|
110
116
|
return /*#__PURE__*/_react.default.createElement(ErrorFallbackComponent, null);
|
|
@@ -12,7 +12,6 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _heading = _interopRequireDefault(require("@atlaskit/heading/heading"));
|
|
14
14
|
var _link = _interopRequireDefault(require("@atlaskit/icon/core/link"));
|
|
15
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
16
15
|
var _text = require("@atlaskit/primitives/compiled/text");
|
|
17
16
|
var _ExpandedFrame = require("../../components/ExpandedFrame");
|
|
18
17
|
var _ImageIcon = require("../../components/ImageIcon");
|
|
@@ -37,7 +36,7 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
37
36
|
url = _ref.url;
|
|
38
37
|
// Unresolved embeds have no entity title. The frame shows the provider name, so
|
|
39
38
|
// pair it with the provider/generator icon rather than the entity-type icon.
|
|
40
|
-
var shouldUseProviderIcon = providerIcon != null
|
|
39
|
+
var shouldUseProviderIcon = providerIcon != null;
|
|
41
40
|
var frameIconUrlOrElement = shouldUseProviderIcon ? providerIcon : iconUrlOrElement;
|
|
42
41
|
var frameIconLabel = shouldUseProviderIcon ? providerIconLabel : undefined;
|
|
43
42
|
var icon = (0, _react.useMemo)(function () {
|
|
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
19
19
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
20
20
|
var PACKAGE_DATA = {
|
|
21
21
|
packageName: "@atlaskit/smart-card",
|
|
22
|
-
packageVersion: "46.
|
|
22
|
+
packageVersion: "46.17.0",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -13,7 +13,6 @@ import { canShowAction } from '../../utils/actions/can-show-action';
|
|
|
13
13
|
import { openEmbedModal } from '../../view/EmbedModal/utils';
|
|
14
14
|
import { extractIsSupportTheming } from '../common/meta/extractIsSupportTheming';
|
|
15
15
|
import { extractIsTrusted } from '../common/meta/extractIsTrusted';
|
|
16
|
-
import { extractLinkIcon } from '../flexible/icon/extract-link-icon';
|
|
17
16
|
import { extractSmartLinkIcon } from '../flexible/icon/extract-smart-link-icon';
|
|
18
17
|
import { extractInvokeDownloadAction } from './extract-invoke-download-action';
|
|
19
18
|
import { extractInvokeViewAction } from './extract-invoke-view-action';
|
|
@@ -107,7 +106,7 @@ export const extractInvokePreviewAction = param => {
|
|
|
107
106
|
invokeViewAction: extractInvokeViewAction(param, true),
|
|
108
107
|
isSupportTheming: extractIsSupportTheming(meta),
|
|
109
108
|
isTrusted: extractIsTrusted(meta),
|
|
110
|
-
linkIcon:
|
|
109
|
+
linkIcon: extractSmartLinkIcon(response),
|
|
111
110
|
providerName: (_extractSmartLinkProv = extractSmartLinkProvider(response)) === null || _extractSmartLinkProv === void 0 ? void 0 : _extractSmartLinkProv.text,
|
|
112
111
|
onClose,
|
|
113
112
|
origin,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { extractEntityIcon } from '@atlaskit/link-extractors/extract-entity-icon';
|
|
2
2
|
import { extractEntityProvider } from '@atlaskit/link-extractors/extract-entity-provider';
|
|
3
3
|
import { isEntityPresent } from '@atlaskit/link-extractors/is-entity-present';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
4
|
import { getEmptyJsonLd } from '../../utils/get-empty-json-ld';
|
|
6
5
|
import { generateContext } from '../common/context/generateContext';
|
|
7
6
|
|
|
@@ -10,22 +9,19 @@ import { generateContext } from '../common/context/generateContext';
|
|
|
10
9
|
*/
|
|
11
10
|
export function extractSmartLinkContext(response) {
|
|
12
11
|
if (isEntityPresent(response)) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
const entityIcon = extractEntityIcon(response);
|
|
20
|
-
return {
|
|
21
|
-
...entityProvider,
|
|
22
|
-
icon: (_entityIcon$url = entityIcon === null || entityIcon === void 0 ? void 0 : entityIcon.url) !== null && _entityIcon$url !== void 0 ? _entityIcon$url : entityProvider.icon,
|
|
23
|
-
iconLabel: (_entityIcon$label = entityIcon === null || entityIcon === void 0 ? void 0 : entityIcon.label) !== null && _entityIcon$label !== void 0 ? _entityIcon$label : entityProvider.iconLabel,
|
|
24
|
-
providerIcon: entityProvider.icon,
|
|
25
|
-
providerIconLabel: entityProvider.iconLabel
|
|
26
|
-
};
|
|
12
|
+
var _entityIcon$url, _entityIcon$label;
|
|
13
|
+
const entityProvider = extractEntityProvider(response);
|
|
14
|
+
if (!entityProvider) {
|
|
15
|
+
return undefined;
|
|
27
16
|
}
|
|
28
|
-
|
|
17
|
+
const entityIcon = extractEntityIcon(response);
|
|
18
|
+
return {
|
|
19
|
+
...entityProvider,
|
|
20
|
+
icon: (_entityIcon$url = entityIcon === null || entityIcon === void 0 ? void 0 : entityIcon.url) !== null && _entityIcon$url !== void 0 ? _entityIcon$url : entityProvider.icon,
|
|
21
|
+
iconLabel: (_entityIcon$label = entityIcon === null || entityIcon === void 0 ? void 0 : entityIcon.label) !== null && _entityIcon$label !== void 0 ? _entityIcon$label : entityProvider.iconLabel,
|
|
22
|
+
providerIcon: entityProvider.icon,
|
|
23
|
+
providerIconLabel: entityProvider.iconLabel
|
|
24
|
+
};
|
|
29
25
|
}
|
|
30
26
|
return generateContext((response === null || response === void 0 ? void 0 : response.data) || getEmptyJsonLd());
|
|
31
27
|
}
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card" || '',
|
|
7
|
-
packageVersion: "46.
|
|
7
|
+
packageVersion: "46.17.0" || ''
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -33,7 +33,6 @@ const CardErrorBoundaryNew = ({
|
|
|
33
33
|
const {
|
|
34
34
|
appearance,
|
|
35
35
|
id,
|
|
36
|
-
onError,
|
|
37
36
|
url
|
|
38
37
|
} = props;
|
|
39
38
|
const ErrorFallbackComponent = props.fallbackComponent;
|
|
@@ -46,58 +45,64 @@ const CardErrorBoundaryNew = ({
|
|
|
46
45
|
const store = smartCardContext === null || smartCardContext === void 0 ? void 0 : smartCardContext.store;
|
|
47
46
|
const display = isFlexibleCard ? 'flexible' : appearance;
|
|
48
47
|
|
|
49
|
-
//
|
|
48
|
+
// Analytics parity with CardWithURLRenderer only. Preserve CardSSR's local error
|
|
49
|
+
// containment: forwarding caught errors to the consumer can cause a rethrow.
|
|
50
50
|
const errorHandler = useCallback((error, info) => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
// NB: APIErrors are thrown in response to Object Resolver Service. We do not
|
|
69
|
-
// fire an event for these, as they do not cover failed UI render events.
|
|
70
|
-
// The rest of the errors caught here are unexpected, and correlate
|
|
71
|
-
// to the reliability of the smart-card front-end components.
|
|
72
|
-
// Likewise, chunk loading errors are not caused by a failure of smart-card rendering.
|
|
73
|
-
if (error.name === 'ChunkLoadError') {
|
|
74
|
-
fireEvent('operational.smartLink.chunkLoadFailed', {
|
|
75
|
-
...(analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes),
|
|
76
|
-
display,
|
|
77
|
-
error: error,
|
|
78
|
-
errorInfo: errorInfo,
|
|
79
|
-
definitionId: null
|
|
80
|
-
});
|
|
81
|
-
} else if (error.name !== 'APIError') {
|
|
82
|
-
startUfoExperience('smart-link-rendered', id, {
|
|
83
|
-
ssr: true
|
|
84
|
-
});
|
|
85
|
-
failUfoExperience('smart-link-rendered', id);
|
|
86
|
-
failUfoExperience('smart-link-authenticated', id);
|
|
87
|
-
fireEvent('ui.smartLink.renderFailed', {
|
|
88
|
-
...(analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes),
|
|
51
|
+
try {
|
|
52
|
+
// Error inspection and diagnostics must never break the local fallback.
|
|
53
|
+
const errorName = error !== null && typeof error === 'object' && 'name' in error ? error.name : undefined;
|
|
54
|
+
// Resolver API errors do not represent failed UI renders.
|
|
55
|
+
if (errorName === 'APIError') {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const {
|
|
59
|
+
componentStack
|
|
60
|
+
} = info;
|
|
61
|
+
const errorInfo = {
|
|
62
|
+
componentStack
|
|
63
|
+
};
|
|
64
|
+
// Read the link state when the error happens: useSmartCardContext does not subscribe
|
|
65
|
+
// to store updates, so a value captured during render can be stale by now.
|
|
66
|
+
const state = store ? getUrl(store, url) : undefined;
|
|
67
|
+
const analyticsContext = getSmartLinkAnalyticsContext({
|
|
89
68
|
display,
|
|
90
69
|
id,
|
|
91
|
-
|
|
92
|
-
|
|
70
|
+
response: state === null || state === void 0 ? void 0 : state.details,
|
|
71
|
+
status: state === null || state === void 0 ? void 0 : state.status,
|
|
72
|
+
url,
|
|
73
|
+
error: state === null || state === void 0 ? void 0 : state.error
|
|
93
74
|
});
|
|
75
|
+
// NB: APIErrors are thrown in response to Object Resolver Service. We do not
|
|
76
|
+
// fire an event for these, as they do not cover failed UI render events.
|
|
77
|
+
// The rest of the errors caught here are unexpected, and correlate
|
|
78
|
+
// to the reliability of the smart-card front-end components.
|
|
79
|
+
// Likewise, chunk loading errors are not caused by a failure of smart-card rendering.
|
|
80
|
+
if (errorName === 'ChunkLoadError') {
|
|
81
|
+
fireEvent('operational.smartLink.chunkLoadFailed', {
|
|
82
|
+
...(analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes),
|
|
83
|
+
display,
|
|
84
|
+
error: error,
|
|
85
|
+
errorInfo: errorInfo,
|
|
86
|
+
definitionId: null
|
|
87
|
+
});
|
|
88
|
+
} else {
|
|
89
|
+
startUfoExperience('smart-link-rendered', id, {
|
|
90
|
+
ssr: true
|
|
91
|
+
});
|
|
92
|
+
failUfoExperience('smart-link-rendered', id);
|
|
93
|
+
failUfoExperience('smart-link-authenticated', id);
|
|
94
|
+
fireEvent('ui.smartLink.renderFailed', {
|
|
95
|
+
...(analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes),
|
|
96
|
+
display,
|
|
97
|
+
id,
|
|
98
|
+
error: error,
|
|
99
|
+
errorInfo: errorInfo
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
} catch {
|
|
103
|
+
// Best-effort diagnostics must not escape the card error boundary.
|
|
94
104
|
}
|
|
95
|
-
|
|
96
|
-
status: 'errored',
|
|
97
|
-
url,
|
|
98
|
-
err: error
|
|
99
|
-
});
|
|
100
|
-
}, [display, fireEvent, id, onError, store, url]);
|
|
105
|
+
}, [display, fireEvent, id, store, url]);
|
|
101
106
|
const errorBoundaryFallbackComponent = () => {
|
|
102
107
|
if (ErrorFallbackComponent) {
|
|
103
108
|
return /*#__PURE__*/React.createElement(ErrorFallbackComponent, null);
|
|
@@ -4,7 +4,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import Heading from '@atlaskit/heading/heading';
|
|
6
6
|
import LinkGlyph from '@atlaskit/icon/core/link';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
7
|
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
9
8
|
import { ExpandedFrame } from '../../components/ExpandedFrame';
|
|
10
9
|
import { ImageIcon } from '../../components/ImageIcon';
|
|
@@ -29,7 +28,7 @@ const UnresolvedView = ({
|
|
|
29
28
|
}) => {
|
|
30
29
|
// Unresolved embeds have no entity title. The frame shows the provider name, so
|
|
31
30
|
// pair it with the provider/generator icon rather than the entity-type icon.
|
|
32
|
-
const shouldUseProviderIcon = providerIcon != null
|
|
31
|
+
const shouldUseProviderIcon = providerIcon != null;
|
|
33
32
|
const frameIconUrlOrElement = shouldUseProviderIcon ? providerIcon : iconUrlOrElement;
|
|
34
33
|
const frameIconLabel = shouldUseProviderIcon ? providerIconLabel : undefined;
|
|
35
34
|
const icon = useMemo(() => {
|
|
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
9
9
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
10
10
|
const PACKAGE_DATA = {
|
|
11
11
|
packageName: "@atlaskit/smart-card",
|
|
12
|
-
packageVersion: "46.
|
|
12
|
+
packageVersion: "46.17.0",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const LinkUrl = ({
|
|
@@ -18,7 +18,6 @@ import { canShowAction } from '../../utils/actions/can-show-action';
|
|
|
18
18
|
import { openEmbedModal } from '../../view/EmbedModal/utils';
|
|
19
19
|
import { extractIsSupportTheming } from '../common/meta/extractIsSupportTheming';
|
|
20
20
|
import { extractIsTrusted } from '../common/meta/extractIsTrusted';
|
|
21
|
-
import { extractLinkIcon } from '../flexible/icon/extract-link-icon';
|
|
22
21
|
import { extractSmartLinkIcon } from '../flexible/icon/extract-smart-link-icon';
|
|
23
22
|
import { extractInvokeDownloadAction } from './extract-invoke-download-action';
|
|
24
23
|
import { extractInvokeViewAction } from './extract-invoke-view-action';
|
|
@@ -118,7 +117,7 @@ export var extractInvokePreviewAction = function extractInvokePreviewAction(para
|
|
|
118
117
|
invokeViewAction: extractInvokeViewAction(param, true),
|
|
119
118
|
isSupportTheming: extractIsSupportTheming(meta),
|
|
120
119
|
isTrusted: extractIsTrusted(meta),
|
|
121
|
-
linkIcon:
|
|
120
|
+
linkIcon: extractSmartLinkIcon(response),
|
|
122
121
|
providerName: (_extractSmartLinkProv = extractSmartLinkProvider(response)) === null || _extractSmartLinkProv === void 0 ? void 0 : _extractSmartLinkProv.text,
|
|
123
122
|
onClose: onClose,
|
|
124
123
|
origin: origin,
|
|
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { extractEntityIcon } from '@atlaskit/link-extractors/extract-entity-icon';
|
|
5
5
|
import { extractEntityProvider } from '@atlaskit/link-extractors/extract-entity-provider';
|
|
6
6
|
import { isEntityPresent } from '@atlaskit/link-extractors/is-entity-present';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
7
|
import { getEmptyJsonLd } from '../../utils/get-empty-json-ld';
|
|
9
8
|
import { generateContext } from '../common/context/generateContext';
|
|
10
9
|
|
|
@@ -13,21 +12,18 @@ import { generateContext } from '../common/context/generateContext';
|
|
|
13
12
|
*/
|
|
14
13
|
export function extractSmartLinkContext(response) {
|
|
15
14
|
if (isEntityPresent(response)) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return undefined;
|
|
21
|
-
}
|
|
22
|
-
var entityIcon = extractEntityIcon(response);
|
|
23
|
-
return _objectSpread(_objectSpread({}, entityProvider), {}, {
|
|
24
|
-
icon: (_entityIcon$url = entityIcon === null || entityIcon === void 0 ? void 0 : entityIcon.url) !== null && _entityIcon$url !== void 0 ? _entityIcon$url : entityProvider.icon,
|
|
25
|
-
iconLabel: (_entityIcon$label = entityIcon === null || entityIcon === void 0 ? void 0 : entityIcon.label) !== null && _entityIcon$label !== void 0 ? _entityIcon$label : entityProvider.iconLabel,
|
|
26
|
-
providerIcon: entityProvider.icon,
|
|
27
|
-
providerIconLabel: entityProvider.iconLabel
|
|
28
|
-
});
|
|
15
|
+
var _entityIcon$url, _entityIcon$label;
|
|
16
|
+
var entityProvider = extractEntityProvider(response);
|
|
17
|
+
if (!entityProvider) {
|
|
18
|
+
return undefined;
|
|
29
19
|
}
|
|
30
|
-
|
|
20
|
+
var entityIcon = extractEntityIcon(response);
|
|
21
|
+
return _objectSpread(_objectSpread({}, entityProvider), {}, {
|
|
22
|
+
icon: (_entityIcon$url = entityIcon === null || entityIcon === void 0 ? void 0 : entityIcon.url) !== null && _entityIcon$url !== void 0 ? _entityIcon$url : entityProvider.icon,
|
|
23
|
+
iconLabel: (_entityIcon$label = entityIcon === null || entityIcon === void 0 ? void 0 : entityIcon.label) !== null && _entityIcon$label !== void 0 ? _entityIcon$label : entityProvider.iconLabel,
|
|
24
|
+
providerIcon: entityProvider.icon,
|
|
25
|
+
providerIconLabel: entityProvider.iconLabel
|
|
26
|
+
});
|
|
31
27
|
}
|
|
32
28
|
return generateContext((response === null || response === void 0 ? void 0 : response.data) || getEmptyJsonLd());
|
|
33
29
|
}
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card" || '',
|
|
7
|
-
packageVersion: "46.
|
|
7
|
+
packageVersion: "46.17.0" || ''
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
5
|
var _excluded = ["children"],
|
|
5
6
|
_excluded2 = ["children", "isFlexibleCard"],
|
|
@@ -38,7 +39,6 @@ var CardErrorBoundaryNew = function CardErrorBoundaryNew(_ref2) {
|
|
|
38
39
|
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
39
40
|
var appearance = props.appearance,
|
|
40
41
|
id = props.id,
|
|
41
|
-
onError = props.onError,
|
|
42
42
|
url = props.url;
|
|
43
43
|
var ErrorFallbackComponent = props.fallbackComponent;
|
|
44
44
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
@@ -48,54 +48,60 @@ var CardErrorBoundaryNew = function CardErrorBoundaryNew(_ref2) {
|
|
|
48
48
|
var store = smartCardContext === null || smartCardContext === void 0 ? void 0 : smartCardContext.store;
|
|
49
49
|
var display = isFlexibleCard ? 'flexible' : appearance;
|
|
50
50
|
|
|
51
|
-
//
|
|
51
|
+
// Analytics parity with CardWithURLRenderer only. Preserve CardSSR's local error
|
|
52
|
+
// containment: forwarding caught errors to the consumer can cause a rethrow.
|
|
52
53
|
var errorHandler = useCallback(function (error, info) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
// NB: APIErrors are thrown in response to Object Resolver Service. We do not
|
|
69
|
-
// fire an event for these, as they do not cover failed UI render events.
|
|
70
|
-
// The rest of the errors caught here are unexpected, and correlate
|
|
71
|
-
// to the reliability of the smart-card front-end components.
|
|
72
|
-
// Likewise, chunk loading errors are not caused by a failure of smart-card rendering.
|
|
73
|
-
if (error.name === 'ChunkLoadError') {
|
|
74
|
-
fireEvent('operational.smartLink.chunkLoadFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
|
|
75
|
-
display: display,
|
|
76
|
-
error: error,
|
|
77
|
-
errorInfo: errorInfo,
|
|
78
|
-
definitionId: null
|
|
79
|
-
}));
|
|
80
|
-
} else if (error.name !== 'APIError') {
|
|
81
|
-
startUfoExperience('smart-link-rendered', id, {
|
|
82
|
-
ssr: true
|
|
83
|
-
});
|
|
84
|
-
failUfoExperience('smart-link-rendered', id);
|
|
85
|
-
failUfoExperience('smart-link-authenticated', id);
|
|
86
|
-
fireEvent('ui.smartLink.renderFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
|
|
54
|
+
try {
|
|
55
|
+
// Error inspection and diagnostics must never break the local fallback.
|
|
56
|
+
var errorName = error !== null && _typeof(error) === 'object' && 'name' in error ? error.name : undefined;
|
|
57
|
+
// Resolver API errors do not represent failed UI renders.
|
|
58
|
+
if (errorName === 'APIError') {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
var componentStack = info.componentStack;
|
|
62
|
+
var errorInfo = {
|
|
63
|
+
componentStack: componentStack
|
|
64
|
+
};
|
|
65
|
+
// Read the link state when the error happens: useSmartCardContext does not subscribe
|
|
66
|
+
// to store updates, so a value captured during render can be stale by now.
|
|
67
|
+
var state = store ? getUrl(store, url) : undefined;
|
|
68
|
+
var analyticsContext = getSmartLinkAnalyticsContext({
|
|
87
69
|
display: display,
|
|
88
70
|
id: id,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
71
|
+
response: state === null || state === void 0 ? void 0 : state.details,
|
|
72
|
+
status: state === null || state === void 0 ? void 0 : state.status,
|
|
73
|
+
url: url,
|
|
74
|
+
error: state === null || state === void 0 ? void 0 : state.error
|
|
75
|
+
});
|
|
76
|
+
// NB: APIErrors are thrown in response to Object Resolver Service. We do not
|
|
77
|
+
// fire an event for these, as they do not cover failed UI render events.
|
|
78
|
+
// The rest of the errors caught here are unexpected, and correlate
|
|
79
|
+
// to the reliability of the smart-card front-end components.
|
|
80
|
+
// Likewise, chunk loading errors are not caused by a failure of smart-card rendering.
|
|
81
|
+
if (errorName === 'ChunkLoadError') {
|
|
82
|
+
fireEvent('operational.smartLink.chunkLoadFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
|
|
83
|
+
display: display,
|
|
84
|
+
error: error,
|
|
85
|
+
errorInfo: errorInfo,
|
|
86
|
+
definitionId: null
|
|
87
|
+
}));
|
|
88
|
+
} else {
|
|
89
|
+
startUfoExperience('smart-link-rendered', id, {
|
|
90
|
+
ssr: true
|
|
91
|
+
});
|
|
92
|
+
failUfoExperience('smart-link-rendered', id);
|
|
93
|
+
failUfoExperience('smart-link-authenticated', id);
|
|
94
|
+
fireEvent('ui.smartLink.renderFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
|
|
95
|
+
display: display,
|
|
96
|
+
id: id,
|
|
97
|
+
error: error,
|
|
98
|
+
errorInfo: errorInfo
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
} catch (_unused) {
|
|
102
|
+
// Best-effort diagnostics must not escape the card error boundary.
|
|
92
103
|
}
|
|
93
|
-
|
|
94
|
-
status: 'errored',
|
|
95
|
-
url: url,
|
|
96
|
-
err: error
|
|
97
|
-
});
|
|
98
|
-
}, [display, fireEvent, id, onError, store, url]);
|
|
104
|
+
}, [display, fireEvent, id, store, url]);
|
|
99
105
|
var errorBoundaryFallbackComponent = function errorBoundaryFallbackComponent() {
|
|
100
106
|
if (ErrorFallbackComponent) {
|
|
101
107
|
return /*#__PURE__*/React.createElement(ErrorFallbackComponent, null);
|
|
@@ -4,7 +4,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import Heading from '@atlaskit/heading/heading';
|
|
6
6
|
import LinkGlyph from '@atlaskit/icon/core/link';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
7
|
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
9
8
|
import { ExpandedFrame } from '../../components/ExpandedFrame';
|
|
10
9
|
import { ImageIcon } from '../../components/ImageIcon';
|
|
@@ -28,7 +27,7 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
28
27
|
url = _ref.url;
|
|
29
28
|
// Unresolved embeds have no entity title. The frame shows the provider name, so
|
|
30
29
|
// pair it with the provider/generator icon rather than the entity-type icon.
|
|
31
|
-
var shouldUseProviderIcon = providerIcon != null
|
|
30
|
+
var shouldUseProviderIcon = providerIcon != null;
|
|
32
31
|
var frameIconUrlOrElement = shouldUseProviderIcon ? providerIcon : iconUrlOrElement;
|
|
33
32
|
var frameIconLabel = shouldUseProviderIcon ? providerIconLabel : undefined;
|
|
34
33
|
var icon = useMemo(function () {
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
var PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "46.
|
|
15
|
+
packageVersion: "46.17.0",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var LinkUrl = function LinkUrl(_ref) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.18.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,8 +38,9 @@
|
|
|
38
38
|
"ak-postbuild": "ls -d dist/* | xargs -n 1 copyfiles -u 1 -V 'src/**/*.{svg,png}'"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
+
"@atlaskit/adf-schema": "^57.7.0",
|
|
41
42
|
"@atlaskit/adf-utils": "^20.9.0",
|
|
42
|
-
"@atlaskit/afm-i18n-platform-linking-platform-smart-card": "2.
|
|
43
|
+
"@atlaskit/afm-i18n-platform-linking-platform-smart-card": "2.313.0",
|
|
43
44
|
"@atlaskit/analytics-cross-product": "^2.3.0",
|
|
44
45
|
"@atlaskit/analytics-gas-types": "^6.2.0",
|
|
45
46
|
"@atlaskit/analytics-next": "^12.6.0",
|
|
@@ -145,7 +146,7 @@
|
|
|
145
146
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
146
147
|
"@atlassian/testing-library": "^0.12.0",
|
|
147
148
|
"@atlassian/workbench": "workspace:*",
|
|
148
|
-
"@atlassiansox/analytics-web-client": "^5.
|
|
149
|
+
"@atlassiansox/analytics-web-client": "^5.33.0",
|
|
149
150
|
"@testing-library/dom": "^10.1.0",
|
|
150
151
|
"@testing-library/jest-dom": "^6.4.5",
|
|
151
152
|
"@testing-library/react": "^16.3.0",
|