@atlaskit/media-card 79.8.1 → 79.8.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/card/card.js +1 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/analytics/analytics.js +9 -3
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +54 -42
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +9 -3
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/utils/analytics/analytics.d.ts +5 -2
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +5 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 79.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`dee27fdf979fb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dee27fdf979fb) -
|
|
8
|
+
Added statusCode at the top level of analytics failure events, for SignalFX compatibility.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 79.8.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/card/card.js
CHANGED
|
@@ -20,7 +20,7 @@ var _label = _interopRequireDefault(require("@atlaskit/react-ufo/label"));
|
|
|
20
20
|
var _excluded = ["identifier"];
|
|
21
21
|
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); }
|
|
22
22
|
var packageName = "@atlaskit/media-card";
|
|
23
|
-
var packageVersion = "
|
|
23
|
+
var packageVersion = "79.8.1";
|
|
24
24
|
var CardBase = exports.CardBase = function CardBase(_ref) {
|
|
25
25
|
var identifier = _ref.identifier,
|
|
26
26
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -87,7 +87,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
87
87
|
}(_react.default.Component);
|
|
88
88
|
(0, _defineProperty2.default)(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
89
89
|
var packageName = "@atlaskit/media-card";
|
|
90
|
-
var packageVersion = "
|
|
90
|
+
var packageVersion = "79.8.1";
|
|
91
91
|
|
|
92
92
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
93
93
|
var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
|
|
@@ -116,7 +116,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
|
|
|
116
116
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
117
117
|
var analyticsContext = {
|
|
118
118
|
packageVersion: "@atlaskit/media-card",
|
|
119
|
-
packageName: "
|
|
119
|
+
packageName: "79.8.1",
|
|
120
120
|
componentName: 'mediaInlineCard',
|
|
121
121
|
component: 'mediaInlineCard'
|
|
122
122
|
};
|
|
@@ -129,6 +129,7 @@ var extractErrorInfo = exports.extractErrorInfo = function extractErrorInfo(erro
|
|
|
129
129
|
};
|
|
130
130
|
};
|
|
131
131
|
var getRenderErrorEventPayload = exports.getRenderErrorEventPayload = function getRenderErrorEventPayload(fileAttributes, performanceAttributes, error, ssrReliability, traceContext, metadataTraceContext) {
|
|
132
|
+
var requestMetadata = getRenderErrorRequestMetadata(error);
|
|
132
133
|
return {
|
|
133
134
|
eventType: 'operational',
|
|
134
135
|
action: 'failed',
|
|
@@ -139,13 +140,15 @@ var getRenderErrorEventPayload = exports.getRenderErrorEventPayload = function g
|
|
|
139
140
|
performanceAttributes: performanceAttributes,
|
|
140
141
|
status: 'fail'
|
|
141
142
|
}, extractErrorInfo(error, metadataTraceContext)), {}, {
|
|
142
|
-
|
|
143
|
+
statusCode: requestMetadata === null || requestMetadata === void 0 ? void 0 : requestMetadata.statusCode,
|
|
144
|
+
request: requestMetadata,
|
|
143
145
|
ssrReliability: ssrReliability,
|
|
144
146
|
traceContext: traceContext
|
|
145
147
|
})
|
|
146
148
|
};
|
|
147
149
|
};
|
|
148
150
|
var getDownloadFailedEventPayload = exports.getDownloadFailedEventPayload = function getDownloadFailedEventPayload(fileAttributes, error, traceContext, metadataTraceContext) {
|
|
151
|
+
var requestMetadata = getRenderErrorRequestMetadata(error);
|
|
149
152
|
return {
|
|
150
153
|
eventType: 'operational',
|
|
151
154
|
action: 'failed',
|
|
@@ -155,12 +158,14 @@ var getDownloadFailedEventPayload = exports.getDownloadFailedEventPayload = func
|
|
|
155
158
|
fileAttributes: fileAttributes,
|
|
156
159
|
status: 'fail'
|
|
157
160
|
}, extractErrorInfo(error, metadataTraceContext)), {}, {
|
|
158
|
-
|
|
161
|
+
statusCode: requestMetadata === null || requestMetadata === void 0 ? void 0 : requestMetadata.statusCode,
|
|
162
|
+
request: requestMetadata,
|
|
159
163
|
traceContext: traceContext
|
|
160
164
|
})
|
|
161
165
|
};
|
|
162
166
|
};
|
|
163
167
|
var getErrorEventPayload = exports.getErrorEventPayload = function getErrorEventPayload(cardStatus, fileAttributes, error, ssrReliability, traceContext, metadataTraceContext) {
|
|
168
|
+
var requestMetadata = getRenderErrorRequestMetadata(error);
|
|
164
169
|
return {
|
|
165
170
|
eventType: 'operational',
|
|
166
171
|
action: 'nonCriticalFail',
|
|
@@ -169,7 +174,8 @@ var getErrorEventPayload = exports.getErrorEventPayload = function getErrorEvent
|
|
|
169
174
|
fileAttributes: fileAttributes,
|
|
170
175
|
status: 'fail'
|
|
171
176
|
}, extractErrorInfo(error, metadataTraceContext)), {}, {
|
|
172
|
-
|
|
177
|
+
statusCode: requestMetadata === null || requestMetadata === void 0 ? void 0 : requestMetadata.statusCode,
|
|
178
|
+
request: requestMetadata,
|
|
173
179
|
ssrReliability: ssrReliability,
|
|
174
180
|
traceContext: traceContext,
|
|
175
181
|
cardStatus: cardStatus
|
|
@@ -15,7 +15,7 @@ var _mediaClient = require("@atlaskit/media-client");
|
|
|
15
15
|
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; }
|
|
16
16
|
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; }
|
|
17
17
|
var packageName = "@atlaskit/media-card";
|
|
18
|
-
var packageVersion = "
|
|
18
|
+
var packageVersion = "79.8.1";
|
|
19
19
|
var SAMPLE_RATE = 0.05;
|
|
20
20
|
var concurrentExperience;
|
|
21
21
|
var getExperience = function getExperience(id) {
|
package/dist/es2019/card/card.js
CHANGED
|
@@ -9,7 +9,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
9
9
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
10
10
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
11
11
|
const packageName = "@atlaskit/media-card";
|
|
12
|
-
const packageVersion = "
|
|
12
|
+
const packageVersion = "79.8.1";
|
|
13
13
|
export const CardBase = ({
|
|
14
14
|
identifier,
|
|
15
15
|
...otherProps
|
|
@@ -66,7 +66,7 @@ class WrappedMediaCardAnalyticsErrorBoundary extends React.Component {
|
|
|
66
66
|
}
|
|
67
67
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
68
68
|
const packageName = "@atlaskit/media-card";
|
|
69
|
-
const packageVersion = "
|
|
69
|
+
const packageVersion = "79.8.1";
|
|
70
70
|
|
|
71
71
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
72
72
|
const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -37,7 +37,7 @@ export default class MediaInlineCardLoader extends React.PureComponent {
|
|
|
37
37
|
} = this.state;
|
|
38
38
|
const analyticsContext = {
|
|
39
39
|
packageVersion: "@atlaskit/media-card",
|
|
40
|
-
packageName: "
|
|
40
|
+
packageName: "79.8.1",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -112,48 +112,60 @@ export const extractErrorInfo = (error, metadataTraceContext) => {
|
|
|
112
112
|
metadataTraceContext: metadataTraceContext !== null && metadataTraceContext !== void 0 ? metadataTraceContext : getErrorTraceContext(error)
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
|
-
export const getRenderErrorEventPayload = (fileAttributes, performanceAttributes, error, ssrReliability, traceContext, metadataTraceContext) =>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
115
|
+
export const getRenderErrorEventPayload = (fileAttributes, performanceAttributes, error, ssrReliability, traceContext, metadataTraceContext) => {
|
|
116
|
+
const requestMetadata = getRenderErrorRequestMetadata(error);
|
|
117
|
+
return {
|
|
118
|
+
eventType: 'operational',
|
|
119
|
+
action: 'failed',
|
|
120
|
+
actionSubject: 'mediaCardRender',
|
|
121
|
+
attributes: {
|
|
122
|
+
fileMimetype: fileAttributes.fileMimetype,
|
|
123
|
+
fileAttributes,
|
|
124
|
+
performanceAttributes,
|
|
125
|
+
status: 'fail',
|
|
126
|
+
...extractErrorInfo(error, metadataTraceContext),
|
|
127
|
+
statusCode: requestMetadata === null || requestMetadata === void 0 ? void 0 : requestMetadata.statusCode,
|
|
128
|
+
request: requestMetadata,
|
|
129
|
+
ssrReliability,
|
|
130
|
+
traceContext
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export const getDownloadFailedEventPayload = (fileAttributes, error, traceContext, metadataTraceContext) => {
|
|
135
|
+
const requestMetadata = getRenderErrorRequestMetadata(error);
|
|
136
|
+
return {
|
|
137
|
+
eventType: 'operational',
|
|
138
|
+
action: 'failed',
|
|
139
|
+
actionSubject: 'mediaCardDownload',
|
|
140
|
+
attributes: {
|
|
141
|
+
fileMimetype: fileAttributes.fileMimetype,
|
|
142
|
+
fileAttributes,
|
|
143
|
+
status: 'fail',
|
|
144
|
+
...extractErrorInfo(error, metadataTraceContext),
|
|
145
|
+
statusCode: requestMetadata === null || requestMetadata === void 0 ? void 0 : requestMetadata.statusCode,
|
|
146
|
+
request: requestMetadata,
|
|
147
|
+
traceContext
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
export const getErrorEventPayload = (cardStatus, fileAttributes, error, ssrReliability, traceContext, metadataTraceContext) => {
|
|
152
|
+
const requestMetadata = getRenderErrorRequestMetadata(error);
|
|
153
|
+
return {
|
|
154
|
+
eventType: 'operational',
|
|
155
|
+
action: 'nonCriticalFail',
|
|
156
|
+
actionSubject: 'mediaCardRender',
|
|
157
|
+
attributes: {
|
|
158
|
+
fileAttributes,
|
|
159
|
+
status: 'fail',
|
|
160
|
+
...extractErrorInfo(error, metadataTraceContext),
|
|
161
|
+
statusCode: requestMetadata === null || requestMetadata === void 0 ? void 0 : requestMetadata.statusCode,
|
|
162
|
+
request: requestMetadata,
|
|
163
|
+
ssrReliability,
|
|
164
|
+
traceContext,
|
|
165
|
+
cardStatus
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
};
|
|
157
169
|
export const getRenderFailedFileStatusPayload = (fileAttributes, performanceAttributes, ssrReliability, traceContext, metadataTraceContext) => ({
|
|
158
170
|
eventType: 'operational',
|
|
159
171
|
action: 'failed',
|
|
@@ -5,7 +5,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
5
5
|
import { MediaCardError } from '../errors';
|
|
6
6
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
7
7
|
const packageName = "@atlaskit/media-card";
|
|
8
|
-
const packageVersion = "
|
|
8
|
+
const packageVersion = "79.8.1";
|
|
9
9
|
const SAMPLE_RATE = 0.05;
|
|
10
10
|
let concurrentExperience;
|
|
11
11
|
const getExperience = id => {
|
package/dist/esm/card/card.js
CHANGED
|
@@ -11,7 +11,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
11
11
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
12
12
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
13
13
|
var packageName = "@atlaskit/media-card";
|
|
14
|
-
var packageVersion = "
|
|
14
|
+
var packageVersion = "79.8.1";
|
|
15
15
|
export var CardBase = function CardBase(_ref) {
|
|
16
16
|
var identifier = _ref.identifier,
|
|
17
17
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -80,7 +80,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
80
80
|
}(React.Component);
|
|
81
81
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
82
82
|
var packageName = "@atlaskit/media-card";
|
|
83
|
-
var packageVersion = "
|
|
83
|
+
var packageVersion = "79.8.1";
|
|
84
84
|
|
|
85
85
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
86
86
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -101,7 +101,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
101
101
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
102
102
|
var analyticsContext = {
|
|
103
103
|
packageVersion: "@atlaskit/media-card",
|
|
104
|
-
packageName: "
|
|
104
|
+
packageName: "79.8.1",
|
|
105
105
|
componentName: 'mediaInlineCard',
|
|
106
106
|
component: 'mediaInlineCard'
|
|
107
107
|
};
|
|
@@ -120,6 +120,7 @@ export var extractErrorInfo = function extractErrorInfo(error, metadataTraceCont
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
export var getRenderErrorEventPayload = function getRenderErrorEventPayload(fileAttributes, performanceAttributes, error, ssrReliability, traceContext, metadataTraceContext) {
|
|
123
|
+
var requestMetadata = getRenderErrorRequestMetadata(error);
|
|
123
124
|
return {
|
|
124
125
|
eventType: 'operational',
|
|
125
126
|
action: 'failed',
|
|
@@ -130,13 +131,15 @@ export var getRenderErrorEventPayload = function getRenderErrorEventPayload(file
|
|
|
130
131
|
performanceAttributes: performanceAttributes,
|
|
131
132
|
status: 'fail'
|
|
132
133
|
}, extractErrorInfo(error, metadataTraceContext)), {}, {
|
|
133
|
-
|
|
134
|
+
statusCode: requestMetadata === null || requestMetadata === void 0 ? void 0 : requestMetadata.statusCode,
|
|
135
|
+
request: requestMetadata,
|
|
134
136
|
ssrReliability: ssrReliability,
|
|
135
137
|
traceContext: traceContext
|
|
136
138
|
})
|
|
137
139
|
};
|
|
138
140
|
};
|
|
139
141
|
export var getDownloadFailedEventPayload = function getDownloadFailedEventPayload(fileAttributes, error, traceContext, metadataTraceContext) {
|
|
142
|
+
var requestMetadata = getRenderErrorRequestMetadata(error);
|
|
140
143
|
return {
|
|
141
144
|
eventType: 'operational',
|
|
142
145
|
action: 'failed',
|
|
@@ -146,12 +149,14 @@ export var getDownloadFailedEventPayload = function getDownloadFailedEventPayloa
|
|
|
146
149
|
fileAttributes: fileAttributes,
|
|
147
150
|
status: 'fail'
|
|
148
151
|
}, extractErrorInfo(error, metadataTraceContext)), {}, {
|
|
149
|
-
|
|
152
|
+
statusCode: requestMetadata === null || requestMetadata === void 0 ? void 0 : requestMetadata.statusCode,
|
|
153
|
+
request: requestMetadata,
|
|
150
154
|
traceContext: traceContext
|
|
151
155
|
})
|
|
152
156
|
};
|
|
153
157
|
};
|
|
154
158
|
export var getErrorEventPayload = function getErrorEventPayload(cardStatus, fileAttributes, error, ssrReliability, traceContext, metadataTraceContext) {
|
|
159
|
+
var requestMetadata = getRenderErrorRequestMetadata(error);
|
|
155
160
|
return {
|
|
156
161
|
eventType: 'operational',
|
|
157
162
|
action: 'nonCriticalFail',
|
|
@@ -160,7 +165,8 @@ export var getErrorEventPayload = function getErrorEventPayload(cardStatus, file
|
|
|
160
165
|
fileAttributes: fileAttributes,
|
|
161
166
|
status: 'fail'
|
|
162
167
|
}, extractErrorInfo(error, metadataTraceContext)), {}, {
|
|
163
|
-
|
|
168
|
+
statusCode: requestMetadata === null || requestMetadata === void 0 ? void 0 : requestMetadata.statusCode,
|
|
169
|
+
request: requestMetadata,
|
|
164
170
|
ssrReliability: ssrReliability,
|
|
165
171
|
traceContext: traceContext,
|
|
166
172
|
cardStatus: cardStatus
|
|
@@ -8,7 +8,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
8
8
|
import { MediaCardError } from '../errors';
|
|
9
9
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
10
10
|
var packageName = "@atlaskit/media-card";
|
|
11
|
-
var packageVersion = "
|
|
11
|
+
var packageVersion = "79.8.1";
|
|
12
12
|
var SAMPLE_RATE = 0.05;
|
|
13
13
|
var concurrentExperience;
|
|
14
14
|
var getExperience = function getExperience(id) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ErrorInfo } from 'react';
|
|
2
|
-
import { type FileDetails, type FileStatus, type MediaClientErrorReason, type RequestMetadata } from '@atlaskit/media-client';
|
|
2
|
+
import { type FileDetails, type FileStatus, type MediaClientErrorReason, type RequestErrorMetadata, type RequestMetadata } from '@atlaskit/media-client';
|
|
3
3
|
import { type FileAttributes, type PerformanceAttributes, type OperationalEventPayload, type UIEventPayload, type WithFileAttributes, type WithPerformanceAttributes, type SuccessAttributes, type FailureAttributes, type MediaTraceContext, type WithTraceContext } from '@atlaskit/media-common/analytics';
|
|
4
4
|
import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
5
|
import { type MediaCardError, type MediaCardErrorPrimaryReason } from '../../errors';
|
|
@@ -63,17 +63,20 @@ export type WithSSRReliability = {
|
|
|
63
63
|
export type RenderFailedEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & WithTraceContext & FailureAttributes & {
|
|
64
64
|
failReason: FailedErrorFailReason | 'failed-processing';
|
|
65
65
|
error?: MediaClientErrorReason | 'nativeError';
|
|
66
|
+
statusCode?: number;
|
|
66
67
|
request?: RequestMetadata;
|
|
67
68
|
}, 'failed', 'mediaCardRender'>;
|
|
68
69
|
export type DownloadFailedEventPayload = OperationalEventPayload<WithFileAttributes & WithTraceContext & FailureAttributes & {
|
|
69
70
|
failReason: FailedErrorFailReason;
|
|
70
71
|
error?: MediaClientErrorReason | 'nativeError';
|
|
72
|
+
statusCode?: number;
|
|
71
73
|
request?: RequestMetadata;
|
|
72
74
|
}, 'failed', 'mediaCardDownload'>;
|
|
73
75
|
export type ErrorEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & WithTraceContext & FailureAttributes & {
|
|
74
76
|
cardStatus: CardStatus;
|
|
75
77
|
failReason: FailedErrorFailReason | 'failed-processing';
|
|
76
78
|
error?: MediaClientErrorReason | 'nativeError';
|
|
79
|
+
statusCode?: number;
|
|
77
80
|
request?: RequestMetadata;
|
|
78
81
|
}, 'nonCriticalFail', 'mediaCardRender'>;
|
|
79
82
|
export type ErrorBoundaryErrorInfo = {
|
|
@@ -113,7 +116,7 @@ export declare const getRenderErrorFailReason: (error: MediaCardError) => Failed
|
|
|
113
116
|
export declare const getRenderErrorErrorReason: (error: MediaCardError) => MediaClientErrorReason | "nativeError";
|
|
114
117
|
export declare const getRenderErrorErrorDetail: (error: MediaCardError) => string;
|
|
115
118
|
export declare const getErrorTraceContext: (error: MediaCardError) => MediaTraceContext | undefined;
|
|
116
|
-
export declare const getRenderErrorRequestMetadata: (error: MediaCardError) =>
|
|
119
|
+
export declare const getRenderErrorRequestMetadata: (error: MediaCardError) => RequestErrorMetadata | undefined;
|
|
117
120
|
export declare const extractErrorInfo: (error: MediaCardError, metadataTraceContext?: MediaTraceContext) => MediaCardErrorInfo;
|
|
118
121
|
export declare const getRenderErrorEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, error: MediaCardError, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext) => RenderFailedEventPayload;
|
|
119
122
|
export declare const getDownloadFailedEventPayload: (fileAttributes: FileAttributes, error: MediaCardError, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext) => DownloadFailedEventPayload;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ErrorInfo } from 'react';
|
|
2
|
-
import { type FileDetails, type FileStatus, type MediaClientErrorReason, type RequestMetadata } from '@atlaskit/media-client';
|
|
2
|
+
import { type FileDetails, type FileStatus, type MediaClientErrorReason, type RequestErrorMetadata, type RequestMetadata } from '@atlaskit/media-client';
|
|
3
3
|
import { type FileAttributes, type PerformanceAttributes, type OperationalEventPayload, type UIEventPayload, type WithFileAttributes, type WithPerformanceAttributes, type SuccessAttributes, type FailureAttributes, type MediaTraceContext, type WithTraceContext } from '@atlaskit/media-common/analytics';
|
|
4
4
|
import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
5
|
import { type MediaCardError, type MediaCardErrorPrimaryReason } from '../../errors';
|
|
@@ -63,17 +63,20 @@ export type WithSSRReliability = {
|
|
|
63
63
|
export type RenderFailedEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & WithTraceContext & FailureAttributes & {
|
|
64
64
|
failReason: FailedErrorFailReason | 'failed-processing';
|
|
65
65
|
error?: MediaClientErrorReason | 'nativeError';
|
|
66
|
+
statusCode?: number;
|
|
66
67
|
request?: RequestMetadata;
|
|
67
68
|
}, 'failed', 'mediaCardRender'>;
|
|
68
69
|
export type DownloadFailedEventPayload = OperationalEventPayload<WithFileAttributes & WithTraceContext & FailureAttributes & {
|
|
69
70
|
failReason: FailedErrorFailReason;
|
|
70
71
|
error?: MediaClientErrorReason | 'nativeError';
|
|
72
|
+
statusCode?: number;
|
|
71
73
|
request?: RequestMetadata;
|
|
72
74
|
}, 'failed', 'mediaCardDownload'>;
|
|
73
75
|
export type ErrorEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & WithTraceContext & FailureAttributes & {
|
|
74
76
|
cardStatus: CardStatus;
|
|
75
77
|
failReason: FailedErrorFailReason | 'failed-processing';
|
|
76
78
|
error?: MediaClientErrorReason | 'nativeError';
|
|
79
|
+
statusCode?: number;
|
|
77
80
|
request?: RequestMetadata;
|
|
78
81
|
}, 'nonCriticalFail', 'mediaCardRender'>;
|
|
79
82
|
export type ErrorBoundaryErrorInfo = {
|
|
@@ -113,7 +116,7 @@ export declare const getRenderErrorFailReason: (error: MediaCardError) => Failed
|
|
|
113
116
|
export declare const getRenderErrorErrorReason: (error: MediaCardError) => MediaClientErrorReason | "nativeError";
|
|
114
117
|
export declare const getRenderErrorErrorDetail: (error: MediaCardError) => string;
|
|
115
118
|
export declare const getErrorTraceContext: (error: MediaCardError) => MediaTraceContext | undefined;
|
|
116
|
-
export declare const getRenderErrorRequestMetadata: (error: MediaCardError) =>
|
|
119
|
+
export declare const getRenderErrorRequestMetadata: (error: MediaCardError) => RequestErrorMetadata | undefined;
|
|
117
120
|
export declare const extractErrorInfo: (error: MediaCardError, metadataTraceContext?: MediaTraceContext) => MediaCardErrorInfo;
|
|
118
121
|
export declare const getRenderErrorEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, error: MediaCardError, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext) => RenderFailedEventPayload;
|
|
119
122
|
export declare const getDownloadFailedEventPayload: (fileAttributes: FileAttributes, error: MediaCardError, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext) => DownloadFailedEventPayload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "79.8.
|
|
3
|
+
"version": "79.8.2",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"@atlaskit/media-ui": "^28.7.0",
|
|
45
45
|
"@atlaskit/media-viewer": "^52.4.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
|
-
"@atlaskit/primitives": "^16.
|
|
47
|
+
"@atlaskit/primitives": "^16.4.0",
|
|
48
48
|
"@atlaskit/react-ufo": "^4.15.0",
|
|
49
49
|
"@atlaskit/spinner": "^19.0.0",
|
|
50
50
|
"@atlaskit/theme": "^21.0.0",
|
|
51
|
-
"@atlaskit/tokens": "^8.
|
|
51
|
+
"@atlaskit/tokens": "^8.4.0",
|
|
52
52
|
"@atlaskit/tooltip": "^20.10.0",
|
|
53
53
|
"@atlaskit/ufo": "^0.4.0",
|
|
54
54
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
"@af/integration-testing": "workspace:^",
|
|
72
72
|
"@atlaskit/analytics-listeners": "^9.1.0",
|
|
73
73
|
"@atlaskit/analytics-namespaced-context": "^7.2.0",
|
|
74
|
-
"@atlaskit/form": "^14.
|
|
74
|
+
"@atlaskit/form": "^14.3.0",
|
|
75
75
|
"@atlaskit/inline-message": "^15.4.0",
|
|
76
76
|
"@atlaskit/media-core": "^37.0.0",
|
|
77
|
-
"@atlaskit/media-picker": "^70.
|
|
77
|
+
"@atlaskit/media-picker": "^70.1.0",
|
|
78
78
|
"@atlaskit/media-state": "^1.8.0",
|
|
79
79
|
"@atlaskit/media-test-data": "^3.2.0",
|
|
80
80
|
"@atlaskit/media-test-helpers": "^39.0.0",
|