@atlaskit/media-card 74.3.2 → 74.4.1
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 +23 -0
- package/dist/cjs/card/card.js +27 -18
- package/dist/cjs/card/cardAnalytics.js +16 -5
- package/dist/cjs/card/cardImageView/cardOverlay/index.js +1 -3
- package/dist/cjs/card/cardImageView/cardOverlay/styles.js +6 -8
- package/dist/cjs/card/cardImageView/fileCardImageView.js +1 -3
- package/dist/cjs/card/cardImageView/styles.js +7 -9
- package/dist/cjs/card/cardLoader.js +12 -3
- package/dist/cjs/card/cardState.js +11 -13
- package/dist/cjs/card/media-card-analytics-error-boundary.js +129 -0
- package/dist/cjs/card/styles/index.js +1 -3
- package/dist/cjs/card/ui/blanket/styles.js +1 -3
- package/dist/cjs/card/ui/iconMessage/styles.js +1 -3
- package/dist/cjs/card/ui/loadingRateLimited/styles.js +1 -3
- package/dist/cjs/card/ui/newFileExperience/newFileExperienceWrapper.js +5 -1
- package/dist/cjs/card/ui/newFileExperience/styles.js +12 -4
- package/dist/cjs/card/ui/playButton/styles.js +2 -4
- package/dist/cjs/card/ui/styles.js +1 -3
- package/dist/cjs/card/ui/tickBox/styles.js +2 -4
- package/dist/cjs/card/ui/titleBox/failedTitleBox.js +1 -3
- package/dist/cjs/card/ui/titleBox/styles.js +19 -5
- package/dist/cjs/card/ui/titleBox/titleBoxComponents.js +5 -1
- package/dist/cjs/card/ui/unhandledErrorCard/index.js +112 -0
- package/dist/cjs/card/ui/unhandledErrorCard/types.js +5 -0
- package/dist/cjs/errors.js +12 -3
- package/dist/cjs/inline/loader.js +4 -4
- package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +113 -0
- package/dist/cjs/utils/analytics.js +41 -10
- package/dist/cjs/utils/cardActions/styles.js +2 -4
- package/dist/cjs/utils/errorIcon/styles.js +1 -3
- package/dist/cjs/utils/lightCards/styles.js +4 -6
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/card/card.js +29 -17
- package/dist/es2019/card/cardAnalytics.js +9 -5
- package/dist/es2019/card/cardImageView/cardOverlay/index.js +1 -2
- package/dist/es2019/card/cardImageView/cardOverlay/styles.js +20 -21
- package/dist/es2019/card/cardImageView/fileCardImageView.js +1 -2
- package/dist/es2019/card/cardImageView/styles.js +7 -8
- package/dist/es2019/card/cardLoader.js +12 -3
- package/dist/es2019/card/cardState.js +12 -7
- package/dist/es2019/card/media-card-analytics-error-boundary.js +90 -0
- package/dist/es2019/card/styles/index.js +1 -2
- package/dist/es2019/card/ui/blanket/styles.js +1 -2
- package/dist/es2019/card/ui/iconMessage/styles.js +1 -2
- package/dist/es2019/card/ui/loadingRateLimited/styles.js +1 -2
- package/dist/es2019/card/ui/newFileExperience/newFileExperienceWrapper.js +4 -1
- package/dist/es2019/card/ui/newFileExperience/styles.js +10 -3
- package/dist/es2019/card/ui/playButton/styles.js +2 -3
- package/dist/es2019/card/ui/styles.js +1 -2
- package/dist/es2019/card/ui/tickBox/styles.js +4 -5
- package/dist/es2019/card/ui/titleBox/failedTitleBox.js +1 -2
- package/dist/es2019/card/ui/titleBox/styles.js +20 -7
- package/dist/es2019/card/ui/titleBox/titleBoxComponents.js +4 -1
- package/dist/es2019/card/ui/unhandledErrorCard/index.js +79 -0
- package/dist/es2019/card/ui/unhandledErrorCard/types.js +1 -0
- package/dist/es2019/errors.js +13 -2
- package/dist/es2019/inline/loader.js +4 -4
- package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +75 -0
- package/dist/es2019/utils/analytics.js +32 -9
- package/dist/es2019/utils/cardActions/styles.js +4 -5
- package/dist/es2019/utils/errorIcon/styles.js +1 -2
- package/dist/es2019/utils/lightCards/styles.js +4 -5
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/card/card.js +28 -19
- package/dist/esm/card/cardAnalytics.js +12 -4
- package/dist/esm/card/cardImageView/cardOverlay/index.js +1 -2
- package/dist/esm/card/cardImageView/cardOverlay/styles.js +6 -7
- package/dist/esm/card/cardImageView/fileCardImageView.js +1 -2
- package/dist/esm/card/cardImageView/styles.js +7 -8
- package/dist/esm/card/cardLoader.js +12 -3
- package/dist/esm/card/cardState.js +12 -11
- package/dist/esm/card/media-card-analytics-error-boundary.js +115 -0
- package/dist/esm/card/styles/index.js +1 -2
- package/dist/esm/card/ui/blanket/styles.js +1 -2
- package/dist/esm/card/ui/iconMessage/styles.js +1 -2
- package/dist/esm/card/ui/loadingRateLimited/styles.js +1 -2
- package/dist/esm/card/ui/newFileExperience/newFileExperienceWrapper.js +4 -1
- package/dist/esm/card/ui/newFileExperience/styles.js +10 -3
- package/dist/esm/card/ui/playButton/styles.js +2 -3
- package/dist/esm/card/ui/styles.js +1 -2
- package/dist/esm/card/ui/tickBox/styles.js +2 -3
- package/dist/esm/card/ui/titleBox/failedTitleBox.js +1 -2
- package/dist/esm/card/ui/titleBox/styles.js +19 -5
- package/dist/esm/card/ui/titleBox/titleBoxComponents.js +4 -1
- package/dist/esm/card/ui/unhandledErrorCard/index.js +93 -0
- package/dist/esm/card/ui/unhandledErrorCard/types.js +1 -0
- package/dist/esm/errors.js +12 -3
- package/dist/esm/inline/loader.js +5 -5
- package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +99 -0
- package/dist/esm/utils/analytics.js +34 -9
- package/dist/esm/utils/cardActions/styles.js +2 -3
- package/dist/esm/utils/errorIcon/styles.js +1 -2
- package/dist/esm/utils/lightCards/styles.js +4 -5
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/card/card.d.ts +1 -1
- package/dist/types/card/cardAnalytics.d.ts +2 -1
- package/dist/types/card/cardState.d.ts +6 -1
- package/dist/types/card/getCardPreview/index.d.ts +1 -1
- package/dist/types/card/media-card-analytics-error-boundary.d.ts +14 -0
- package/dist/types/card/ui/newFileExperience/styles.d.ts +1 -1
- package/dist/types/card/ui/newFileExperience/types.d.ts +2 -0
- package/dist/types/card/ui/titleBox/styles.d.ts +1 -1
- package/dist/types/card/ui/titleBox/types.d.ts +2 -0
- package/dist/types/card/ui/unhandledErrorCard/index.d.ts +7 -0
- package/dist/types/card/ui/unhandledErrorCard/types.d.ts +6 -0
- package/dist/types/errors.d.ts +2 -2
- package/dist/types/inline/mediaInlineAnalyticsErrorBoundary.d.ts +11 -0
- package/dist/types/types.d.ts +3 -0
- package/dist/types/utils/analytics.d.ts +26 -6
- package/example-helpers/styles.ts +13 -0
- package/package.json +9 -8
- package/report.api.md +18 -2
- package/dist/cjs/utils/media-card-analytics-error-boundary.js +0 -59
- package/dist/es2019/utils/media-card-analytics-error-boundary.js +0 -19
- package/dist/esm/utils/media-card-analytics-error-boundary.js +0 -46
- package/dist/types/utils/media-card-analytics-error-boundary.d.ts +0 -10
|
@@ -15,7 +15,6 @@ var relevantFlags = {
|
|
|
15
15
|
observedWidth: true,
|
|
16
16
|
mediaInline: false,
|
|
17
17
|
folderUploads: false,
|
|
18
|
-
mediaUploadApiV2: true,
|
|
19
18
|
memoryCacheLogging: true
|
|
20
19
|
};
|
|
21
20
|
export var LOGGED_FEATURE_FLAGS = filterFeatureFlagNames(relevantFlags);
|
|
@@ -55,7 +54,7 @@ export var getRenderCommencedEventPayload = function getRenderCommencedEventPayl
|
|
|
55
54
|
}
|
|
56
55
|
};
|
|
57
56
|
};
|
|
58
|
-
export var getRenderSucceededEventPayload = function getRenderSucceededEventPayload(fileAttributes, performanceAttributes, ssrReliability, traceContext) {
|
|
57
|
+
export var getRenderSucceededEventPayload = function getRenderSucceededEventPayload(fileAttributes, performanceAttributes, ssrReliability, traceContext, metadataTraceContext) {
|
|
59
58
|
return {
|
|
60
59
|
eventType: 'operational',
|
|
61
60
|
action: 'succeeded',
|
|
@@ -65,7 +64,8 @@ export var getRenderSucceededEventPayload = function getRenderSucceededEventPayl
|
|
|
65
64
|
performanceAttributes: performanceAttributes,
|
|
66
65
|
status: 'success',
|
|
67
66
|
ssrReliability: ssrReliability,
|
|
68
|
-
traceContext: traceContext
|
|
67
|
+
traceContext: traceContext,
|
|
68
|
+
metadataTraceContext: metadataTraceContext
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
};
|
|
@@ -127,19 +127,27 @@ export var getRenderErrorErrorDetail = function getRenderErrorErrorDetail(error)
|
|
|
127
127
|
return error.message;
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
|
+
export var getErrorTraceContext = function getErrorTraceContext(error) {
|
|
131
|
+
if (isMediaCardError(error) && !!error.secondaryError && isRequestError(error.secondaryError)) {
|
|
132
|
+
var _error$secondaryError;
|
|
133
|
+
|
|
134
|
+
return (_error$secondaryError = error.secondaryError.metadata) === null || _error$secondaryError === void 0 ? void 0 : _error$secondaryError.traceContext;
|
|
135
|
+
}
|
|
136
|
+
};
|
|
130
137
|
export var getRenderErrorRequestMetadata = function getRenderErrorRequestMetadata(error) {
|
|
131
138
|
if (isMediaCardError(error) && !!error.secondaryError && isRequestError(error.secondaryError)) {
|
|
132
139
|
return error.secondaryError.metadata;
|
|
133
140
|
}
|
|
134
141
|
};
|
|
135
|
-
export var extractErrorInfo = function extractErrorInfo(error) {
|
|
142
|
+
export var extractErrorInfo = function extractErrorInfo(error, metadataTraceContext) {
|
|
136
143
|
return {
|
|
137
144
|
failReason: getRenderErrorFailReason(error),
|
|
138
145
|
error: getRenderErrorErrorReason(error),
|
|
139
|
-
errorDetail: getRenderErrorErrorDetail(error)
|
|
146
|
+
errorDetail: getRenderErrorErrorDetail(error),
|
|
147
|
+
metadataTraceContext: metadataTraceContext !== null && metadataTraceContext !== void 0 ? metadataTraceContext : getErrorTraceContext(error)
|
|
140
148
|
};
|
|
141
149
|
};
|
|
142
|
-
export var getRenderErrorEventPayload = function getRenderErrorEventPayload(fileAttributes, performanceAttributes, error, ssrReliability, traceContext) {
|
|
150
|
+
export var getRenderErrorEventPayload = function getRenderErrorEventPayload(fileAttributes, performanceAttributes, error, ssrReliability, traceContext, metadataTraceContext) {
|
|
143
151
|
return {
|
|
144
152
|
eventType: 'operational',
|
|
145
153
|
action: 'failed',
|
|
@@ -148,14 +156,30 @@ export var getRenderErrorEventPayload = function getRenderErrorEventPayload(file
|
|
|
148
156
|
fileAttributes: fileAttributes,
|
|
149
157
|
performanceAttributes: performanceAttributes,
|
|
150
158
|
status: 'fail'
|
|
151
|
-
}, extractErrorInfo(error)), {}, {
|
|
159
|
+
}, extractErrorInfo(error, metadataTraceContext)), {}, {
|
|
152
160
|
request: getRenderErrorRequestMetadata(error),
|
|
153
161
|
ssrReliability: ssrReliability,
|
|
154
162
|
traceContext: traceContext
|
|
155
163
|
})
|
|
156
164
|
};
|
|
157
165
|
};
|
|
158
|
-
export var
|
|
166
|
+
export var getErrorEventPayload = function getErrorEventPayload(cardStatus, fileAttributes, error, ssrReliability, traceContext, metadataTraceContext) {
|
|
167
|
+
return {
|
|
168
|
+
eventType: 'operational',
|
|
169
|
+
action: 'nonCriticalFail',
|
|
170
|
+
actionSubject: 'mediaCardRender',
|
|
171
|
+
attributes: _objectSpread(_objectSpread({
|
|
172
|
+
fileAttributes: fileAttributes,
|
|
173
|
+
status: 'fail'
|
|
174
|
+
}, extractErrorInfo(error, metadataTraceContext)), {}, {
|
|
175
|
+
request: getRenderErrorRequestMetadata(error),
|
|
176
|
+
ssrReliability: ssrReliability,
|
|
177
|
+
traceContext: traceContext,
|
|
178
|
+
cardStatus: cardStatus
|
|
179
|
+
})
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
export var getRenderFailedFileStatusPayload = function getRenderFailedFileStatusPayload(fileAttributes, performanceAttributes, ssrReliability, traceContext, metadataTraceContext) {
|
|
159
183
|
return {
|
|
160
184
|
eventType: 'operational',
|
|
161
185
|
action: 'failed',
|
|
@@ -166,7 +190,8 @@ export var getRenderFailedFileStatusPayload = function getRenderFailedFileStatus
|
|
|
166
190
|
status: 'fail',
|
|
167
191
|
failReason: 'failed-processing',
|
|
168
192
|
ssrReliability: ssrReliability,
|
|
169
|
-
traceContext: traceContext
|
|
193
|
+
traceContext: traceContext,
|
|
194
|
+
metadataTraceContext: metadataTraceContext
|
|
170
195
|
}
|
|
171
196
|
};
|
|
172
197
|
};
|
|
@@ -4,7 +4,6 @@ var _templateObject, _templateObject2;
|
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { N500, N0 } from '@atlaskit/theme/colors';
|
|
7
|
-
import { token } from '@atlaskit/tokens';
|
|
8
7
|
import { borderRadius, size, center } from '@atlaskit/media-ui';
|
|
9
8
|
import { rootStyles } from '../../card/styles';
|
|
10
9
|
import { rgba } from '../../card/styles/mixins';
|
|
@@ -17,10 +16,10 @@ export var CardActionIconButtonVariant;
|
|
|
17
16
|
})(CardActionIconButtonVariant || (CardActionIconButtonVariant = {}));
|
|
18
17
|
|
|
19
18
|
var getVariantStyles = function getVariantStyles(variant) {
|
|
20
|
-
return variant === 'filled' ? "\n background-color: ".concat(
|
|
19
|
+
return variant === 'filled' ? "\n background-color: ".concat("var(--ds-surface-overlay, ".concat(rgba(N0, 0.8), ")"), ";\n margin-right: 8px;\n\n &:last-child {\n margin-right: 0;\n }\n\n &:hover {\n background-color: ", "var(--ds-surface-overlay-hovered, ".concat(rgba(N0, 0.6), ")"), "\n }\n ") : "\n &:hover {\n background-color: ".concat("var(--ds-background-neutral-subtle-hovered, rgba(9, 30, 66, 0.06))", ";\n }\n ");
|
|
21
20
|
};
|
|
22
21
|
|
|
23
22
|
export var cardActionButtonStyles = function cardActionButtonStyles(_ref) {
|
|
24
23
|
var variant = _ref.variant;
|
|
25
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n color: ", ";\n\n &:hover {\n cursor: pointer;\n }\n\n ", "\n"])), center, borderRadius, size(26),
|
|
24
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n color: ", ";\n\n &:hover {\n cursor: pointer;\n }\n\n ", "\n"])), center, borderRadius, size(26), "var(--ds-icon, ".concat(N500, ")"), getVariantStyles(variant));
|
|
26
25
|
};
|
|
@@ -2,6 +2,5 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
import { css } from '@emotion/react';
|
|
7
|
-
export var errorIconWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n color: ", ";\n"])),
|
|
6
|
+
export var errorIconWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n color: ", ";\n"])), "var(--ds-icon-warning, #ff991f)");
|
|
@@ -3,7 +3,6 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3;
|
|
4
4
|
|
|
5
5
|
import { css, keyframes } from '@emotion/react';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
import { center, borderRadius } from '@atlaskit/media-ui';
|
|
8
7
|
import { themed } from '@atlaskit/theme/components';
|
|
9
8
|
import { N20, DN50, N50, DN100 } from '@atlaskit/theme/colors';
|
|
@@ -12,13 +11,13 @@ export var wrapperStyles = function wrapperStyles(_ref) {
|
|
|
12
11
|
var dimensions = _ref.dimensions,
|
|
13
12
|
theme = _ref.theme;
|
|
14
13
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n background: ", ";\n color: ", ";\n ", "\n max-height: 100%;\n max-width: 100%;\n width: ", ";\n height: ", ";\n"])), center, themed({
|
|
15
|
-
light:
|
|
16
|
-
dark:
|
|
14
|
+
light: "var(--ds-background-neutral, ".concat(N20, ")"),
|
|
15
|
+
dark: "var(--ds-background-neutral, ".concat(DN50, ")")
|
|
17
16
|
})({
|
|
18
17
|
theme: theme
|
|
19
18
|
}), themed({
|
|
20
|
-
light:
|
|
21
|
-
dark:
|
|
19
|
+
light: "var(--ds-icon, ".concat(N50, ")"),
|
|
20
|
+
dark: "var(--ds-icon, ".concat(DN100, ")")
|
|
22
21
|
})({
|
|
23
22
|
theme: theme
|
|
24
23
|
}), borderRadius, dimensions.width, dimensions.height);
|
|
@@ -9,7 +9,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata, LOGGED_FEATURE_FLAG_KE
|
|
|
9
9
|
import { MediaCardError } from '../errors';
|
|
10
10
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
11
11
|
var packageName = "@atlaskit/media-card";
|
|
12
|
-
var packageVersion = "74.
|
|
12
|
+
var packageVersion = "74.4.1";
|
|
13
13
|
var concurrentExperience;
|
|
14
14
|
|
|
15
15
|
var getExperience = function getExperience(id) {
|
package/dist/esm/version.json
CHANGED
|
@@ -39,7 +39,7 @@ export declare class CardBase extends Component<CardBaseProps, CardState> {
|
|
|
39
39
|
private fireCommencedEvent;
|
|
40
40
|
private fireCopiedEvent;
|
|
41
41
|
private fireScreenEvent;
|
|
42
|
-
private
|
|
42
|
+
private fireNonCriticalErrorEvent;
|
|
43
43
|
private safeSetState;
|
|
44
44
|
unsubscribe: () => void;
|
|
45
45
|
get actions(): CardAction[];
|
|
@@ -3,7 +3,8 @@ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
3
3
|
import { SSRStatus } from '../utils/analytics';
|
|
4
4
|
import { CardStatus } from '../types';
|
|
5
5
|
import { MediaCardError } from '../errors';
|
|
6
|
-
export declare const fireOperationalEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, status: CardStatus, fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus, error: MediaCardError | undefined, traceContext: MediaTraceContext) => void;
|
|
6
|
+
export declare const fireOperationalEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, status: CardStatus, fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus, error: MediaCardError | undefined, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext | undefined) => void;
|
|
7
7
|
export declare const fireCommencedEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, traceContext: MediaTraceContext) => void;
|
|
8
8
|
export declare const fireCopiedEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, fileId: string, cardRef: HTMLDivElement) => void;
|
|
9
9
|
export declare const fireScreenEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, fileAttributes: FileAttributes) => void;
|
|
10
|
+
export declare const fireNonCriticalErrorEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, cardStatus: CardStatus, fileAttributes: FileAttributes, ssrReliability: SSRStatus, error: MediaCardError | undefined, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext | undefined) => void;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { FileState } from '@atlaskit/media-client';
|
|
2
2
|
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
3
3
|
import { CardState } from '../types';
|
|
4
|
-
|
|
4
|
+
import { MediaCardError } from '../errors';
|
|
5
|
+
/**
|
|
6
|
+
* From docs: "Both state and props received by the updater function are guaranteed to be up-to-date.
|
|
7
|
+
* The output of the updater is shallowly merged with state."
|
|
8
|
+
*/
|
|
9
|
+
export declare const createStateUpdater: (newState: Partial<CardState>, fireErrorEvent: (error: MediaCardError) => void) => (prevState: CardState) => Partial<CardState>;
|
|
5
10
|
export declare const getCardStateFromFileState: (fileState: FileState, isBannedLocalPreview: boolean, featureFlags?: MediaFeatureFlags | undefined) => Partial<CardState>;
|
|
@@ -19,7 +19,7 @@ export declare type CardPreviewParams = {
|
|
|
19
19
|
id: string;
|
|
20
20
|
dimensions?: CardDimensions;
|
|
21
21
|
filePreview?: FilePreview | Promise<FilePreview>;
|
|
22
|
-
onLocalPreviewError
|
|
22
|
+
onLocalPreviewError: (error: MediaCardError) => void;
|
|
23
23
|
isRemotePreviewReady: boolean;
|
|
24
24
|
imageUrlParams: MediaStoreGetFileImageParams;
|
|
25
25
|
mediaBlobUrlAttrs?: MediaBlobUrlAttrs;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
3
|
+
import { CardDimensions, CardOnClickCallback } from '../types';
|
|
4
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
5
|
+
export declare type MediaCardAnalyticsErrorBoundaryProps = {
|
|
6
|
+
dimensions?: CardDimensions;
|
|
7
|
+
data?: {
|
|
8
|
+
[k: string]: any;
|
|
9
|
+
};
|
|
10
|
+
onClick?: CardOnClickCallback;
|
|
11
|
+
featureFlags?: MediaFeatureFlags;
|
|
12
|
+
} & WithAnalyticsEventsProps;
|
|
13
|
+
declare const MediaCardAnalyticsErrorBoundary: React.ComponentType<MediaCardAnalyticsErrorBoundaryProps & WithAnalyticsEventsProps>;
|
|
14
|
+
export default MediaCardAnalyticsErrorBoundary;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NewFileExperienceWrapperProps } from './types';
|
|
2
2
|
export declare const newFileExperienceWrapperStyles: {
|
|
3
|
-
({ breakpoint, dimensions, appearance, disableOverlay, displayBackground, selected, isPlayButtonClickable, isTickBoxSelectable, shouldDisplayTooltip, mediaCardCursor, }: NewFileExperienceWrapperProps): import("@emotion/react").SerializedStyles;
|
|
3
|
+
({ breakpoint, dimensions, appearance, disableOverlay, displayBackground, selected, isPlayButtonClickable, isTickBoxSelectable, shouldDisplayTooltip, mediaCardCursor, theme, }: NewFileExperienceWrapperProps): import("@emotion/react").SerializedStyles;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -3,6 +3,7 @@ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
3
3
|
import { CardDimensions, CardAppearance } from '../../../types';
|
|
4
4
|
import { Breakpoint } from '../common';
|
|
5
5
|
import { MediaCardCursor } from '../../../types';
|
|
6
|
+
import { GlobalThemeTokens } from '@atlaskit/theme/components';
|
|
6
7
|
export interface NewFileExperienceWrapperProps {
|
|
7
8
|
testId?: string;
|
|
8
9
|
breakpoint: Breakpoint;
|
|
@@ -20,4 +21,5 @@ export interface NewFileExperienceWrapperProps {
|
|
|
20
21
|
shouldDisplayTooltip: boolean;
|
|
21
22
|
innerRef?: RefObject<HTMLDivElement>;
|
|
22
23
|
children?: JSX.Element;
|
|
24
|
+
theme?: GlobalThemeTokens;
|
|
23
25
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TitleBoxFooterProps, TitleBoxHeaderProps, TitleBoxWrapperProps } from './types';
|
|
2
2
|
export declare const titleBoxWrapperStyles: {
|
|
3
|
-
({ breakpoint, titleBoxBgColor, }: TitleBoxWrapperProps): import("@emotion/react").SerializedStyles;
|
|
3
|
+
({ breakpoint, titleBoxBgColor, theme, }: TitleBoxWrapperProps): import("@emotion/react").SerializedStyles;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
6
|
export declare const titleBoxHeaderStyles: {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { MessageDescriptor } from 'react-intl-next';
|
|
3
3
|
import { Breakpoint } from '../common';
|
|
4
4
|
import { TitleBoxIcon as TitleBoxIconType } from '../../../types';
|
|
5
|
+
import { GlobalThemeTokens } from '@atlaskit/theme/components';
|
|
5
6
|
export declare type TitleBoxProps = {
|
|
6
7
|
name: string;
|
|
7
8
|
breakpoint: Breakpoint;
|
|
@@ -16,6 +17,7 @@ export declare type TitleBoxWrapperProps = {
|
|
|
16
17
|
breakpoint: Breakpoint;
|
|
17
18
|
titleBoxBgColor?: string;
|
|
18
19
|
children?: JSX.Element | JSX.Element[] | any;
|
|
20
|
+
theme?: GlobalThemeTokens;
|
|
19
21
|
};
|
|
20
22
|
export declare type TitleBoxFooterProps = {
|
|
21
23
|
hasIconOverlap: boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { UnhandledErrorCardProps } from './types';
|
|
5
|
+
export declare class UnhandledErrorCard extends Component<UnhandledErrorCardProps, {}> {
|
|
6
|
+
render(): jsx.JSX.Element;
|
|
7
|
+
}
|
package/dist/types/errors.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { CardPreview } from './types';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare type MediaCardErrorPrimaryReason = 'upload' | 'metadata-fetch' | 'error-file-state' | RemotePreviewPrimaryReason | LocalPreviewPrimaryReason | ImageLoadPrimaryReason | SsrPreviewPrimaryReason | 'missing-error-data' | 'preview-fetch';
|
|
7
7
|
export declare type ImageLoadPrimaryReason = 'cache-remote-uri' | 'cache-local-uri' | 'local-uri' | 'remote-uri' | 'external-uri' | 'unknown-uri';
|
|
8
|
-
export declare type RemotePreviewPrimaryReason = 'remote-preview-fetch' | 'remote-preview-not-ready';
|
|
8
|
+
export declare type RemotePreviewPrimaryReason = 'remote-preview-fetch' | 'remote-preview-not-ready' | 'remote-preview-fetch-ssr';
|
|
9
9
|
export declare type LocalPreviewPrimaryReason = 'local-preview-get' | 'local-preview-unsupported' | 'local-preview-rejected' | 'local-preview-image' | 'local-preview-video';
|
|
10
10
|
export declare type SsrPreviewPrimaryReason = 'ssr-client-uri' | 'ssr-client-load' | 'ssr-server-uri' | 'ssr-server-load';
|
|
11
11
|
export declare class MediaCardError extends Error {
|
|
@@ -37,5 +37,5 @@ export declare const isLocalPreviewError: (err: Error) => err is LocalPreviewErr
|
|
|
37
37
|
export declare const isRemotePreviewError: (err: Error) => err is LocalPreviewError;
|
|
38
38
|
export declare const isUnsupportedLocalPreviewError: (err: Error) => boolean;
|
|
39
39
|
export declare function isImageLoadError(err: Error): err is ImageLoadError;
|
|
40
|
-
export declare const ensureMediaCardError: (primaryReason: MediaCardErrorPrimaryReason, error: Error) => MediaCardError;
|
|
40
|
+
export declare const ensureMediaCardError: (primaryReason: MediaCardErrorPrimaryReason, error: Error, updatePrimaryReason?: boolean | undefined) => MediaCardError;
|
|
41
41
|
export declare const isUploadError: (error?: MediaCardError | undefined) => boolean | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
3
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
|
+
export declare type MediaInlineAnalyticsErrorBoundaryProps = {
|
|
5
|
+
data?: {
|
|
6
|
+
[k: string]: any;
|
|
7
|
+
};
|
|
8
|
+
featureFlags?: MediaFeatureFlags;
|
|
9
|
+
} & WithAnalyticsEventsProps;
|
|
10
|
+
declare const MediaInlineAnalyticsErrorBoundary: React.ComponentType<MediaInlineAnalyticsErrorBoundaryProps & WithAnalyticsEventsProps>;
|
|
11
|
+
export default MediaInlineAnalyticsErrorBoundary;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -75,6 +75,9 @@ export interface CardProps extends SharedCardProps, CardEventProps {
|
|
|
75
75
|
readonly isLazy?: boolean;
|
|
76
76
|
readonly useInlinePlayer?: boolean;
|
|
77
77
|
readonly shouldOpenMediaViewer?: boolean;
|
|
78
|
+
/** Imported from MediaViewer. It includes data source like collection name,
|
|
79
|
+
* media file list.
|
|
80
|
+
*/
|
|
78
81
|
readonly mediaViewerDataSource?: MediaViewerDataSource;
|
|
79
82
|
readonly contextId?: string;
|
|
80
83
|
readonly shouldEnableDownloadButton?: boolean;
|
|
@@ -2,7 +2,7 @@ import { FileDetails, MediaClientErrorReason, RequestMetadata } from '@atlaskit/
|
|
|
2
2
|
import { FileAttributes, PerformanceAttributes, OperationalEventPayload, UIEventPayload, WithFileAttributes, WithPerformanceAttributes, SuccessAttributes, FailureAttributes, ScreenEventPayload, ScreenAttributes, MediaTraceContext, WithTraceContext } from '@atlaskit/media-common';
|
|
3
3
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
4
|
import { MediaCardError, MediaCardErrorPrimaryReason } from '../errors';
|
|
5
|
-
import { CardPreviewSource, CardDimensions } from '../types';
|
|
5
|
+
import { CardPreviewSource, CardDimensions, CardStatus } from '../types';
|
|
6
6
|
export declare type CardPreviewAttributes = {
|
|
7
7
|
fileId: string;
|
|
8
8
|
prevDimensions: CardDimensions | undefined;
|
|
@@ -21,6 +21,7 @@ export declare type MediaCardErrorInfo = {
|
|
|
21
21
|
failReason: FailedErrorFailReason;
|
|
22
22
|
error: MediaClientErrorReason | 'nativeError';
|
|
23
23
|
errorDetail: string;
|
|
24
|
+
metadataTraceContext?: MediaTraceContext;
|
|
24
25
|
};
|
|
25
26
|
export declare type SSRStatusFail = MediaCardErrorInfo & {
|
|
26
27
|
status: 'fail';
|
|
@@ -42,6 +43,23 @@ export declare type RenderFailedEventPayload = OperationalEventPayload<WithFileA
|
|
|
42
43
|
error?: MediaClientErrorReason | 'nativeError';
|
|
43
44
|
request?: RequestMetadata;
|
|
44
45
|
}, 'failed', 'mediaCardRender'>;
|
|
46
|
+
export declare type ErrorEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & WithTraceContext & FailureAttributes & {
|
|
47
|
+
cardStatus: CardStatus;
|
|
48
|
+
failReason: FailedErrorFailReason | 'failed-processing';
|
|
49
|
+
error?: MediaClientErrorReason | 'nativeError';
|
|
50
|
+
request?: RequestMetadata;
|
|
51
|
+
}, 'nonCriticalFail', 'mediaCardRender'>;
|
|
52
|
+
export declare type ErrorBoundaryErrorInfo = {
|
|
53
|
+
componentStack: string;
|
|
54
|
+
};
|
|
55
|
+
export declare type AnalyticsErrorBoundaryAttributes = {
|
|
56
|
+
error?: Error | string;
|
|
57
|
+
info?: ErrorBoundaryErrorInfo;
|
|
58
|
+
browserInfo: string;
|
|
59
|
+
failReason: string;
|
|
60
|
+
};
|
|
61
|
+
export declare type AnalyticsErrorBoundaryCardPayload = OperationalEventPayload<AnalyticsErrorBoundaryAttributes, 'failed', 'mediaCardRender'>;
|
|
62
|
+
export declare type AnalyticsErrorBoundaryInlinePayload = OperationalEventPayload<AnalyticsErrorBoundaryAttributes, 'failed', 'mediaInlineRender'>;
|
|
45
63
|
export declare type RenderSucceededEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & SuccessAttributes & WithTraceContext, 'succeeded', 'mediaCardRender'>;
|
|
46
64
|
export declare type RenderCommencedEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithTraceContext, 'commenced', 'mediaCardRender'>;
|
|
47
65
|
export declare type CacheHitEventPayload = OperationalEventPayload<WithCardPreviewCacheAttributes, 'cache-hit', 'mediaCardCache'>;
|
|
@@ -56,21 +74,23 @@ export declare type RenderScreenEventPayload = Omit<ScreenEventPayload<ScreenAtt
|
|
|
56
74
|
fileAttributes: FileAttributes;
|
|
57
75
|
};
|
|
58
76
|
};
|
|
59
|
-
export declare type MediaCardAnalyticsEventPayload = RenderCommencedEventPayload | RenderSucceededEventPayload | RenderFailedEventPayload | CopiedFileEventPayload | ClickedEventPayload | RenderScreenEventPayload | CacheHitEventPayload | RemoteSuccessEventPayload;
|
|
77
|
+
export declare type MediaCardAnalyticsEventPayload = RenderCommencedEventPayload | RenderSucceededEventPayload | RenderFailedEventPayload | CopiedFileEventPayload | ClickedEventPayload | RenderScreenEventPayload | CacheHitEventPayload | RemoteSuccessEventPayload | ErrorEventPayload | AnalyticsErrorBoundaryCardPayload | AnalyticsErrorBoundaryInlinePayload;
|
|
60
78
|
export declare const getFileAttributes: (metadata: FileDetails, fileStatus?: import("@atlaskit/media-common").FileStatus | undefined) => FileAttributes;
|
|
61
79
|
export declare const getRenderPreviewableCardPayload: (fileAttributes: FileAttributes) => RenderScreenEventPayload;
|
|
62
80
|
export declare const getRenderCommencedEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, traceContext: MediaTraceContext) => RenderCommencedEventPayload;
|
|
63
|
-
export declare const getRenderSucceededEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus, traceContext: MediaTraceContext) => RenderSucceededEventPayload;
|
|
81
|
+
export declare const getRenderSucceededEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext | undefined) => RenderSucceededEventPayload;
|
|
64
82
|
export declare const getCacheHitEventPayload: (cardPreviewAttributes: CardPreviewAttributes) => CacheHitEventPayload;
|
|
65
83
|
export declare const getRemoteSuccessEventPayload: (cardPreviewAttributes: CardPreviewAttributes) => RemoteSuccessEventPayload;
|
|
66
84
|
export declare const getRenderFailedExternalUriPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes) => RenderFailedEventPayload;
|
|
67
85
|
export declare const getRenderErrorFailReason: (error: MediaCardError) => FailedErrorFailReason;
|
|
68
86
|
export declare const getRenderErrorErrorReason: (error: MediaCardError) => MediaClientErrorReason | 'nativeError';
|
|
69
87
|
export declare const getRenderErrorErrorDetail: (error: MediaCardError) => string;
|
|
88
|
+
export declare const getErrorTraceContext: (error: MediaCardError) => MediaTraceContext | undefined;
|
|
70
89
|
export declare const getRenderErrorRequestMetadata: (error: MediaCardError) => RequestMetadata | undefined;
|
|
71
|
-
export declare const extractErrorInfo: (error: MediaCardError) => MediaCardErrorInfo;
|
|
72
|
-
export declare const getRenderErrorEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, error: MediaCardError, ssrReliability: SSRStatus, traceContext: MediaTraceContext) => RenderFailedEventPayload;
|
|
73
|
-
export declare const
|
|
90
|
+
export declare const extractErrorInfo: (error: MediaCardError, metadataTraceContext?: MediaTraceContext | undefined) => MediaCardErrorInfo;
|
|
91
|
+
export declare const getRenderErrorEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, error: MediaCardError, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext | undefined) => RenderFailedEventPayload;
|
|
92
|
+
export declare const getErrorEventPayload: (cardStatus: CardStatus, fileAttributes: FileAttributes, error: MediaCardError, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext | undefined) => ErrorEventPayload;
|
|
93
|
+
export declare const getRenderFailedFileStatusPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext | undefined) => RenderFailedEventPayload;
|
|
74
94
|
export declare const getCopiedFilePayload: (fileId: string) => CopiedFileEventPayload;
|
|
75
95
|
export declare function fireMediaCardEvent(payload: MediaCardAnalyticsEventPayload, createAnalyticsEvent?: CreateUIAnalyticsEvent): void;
|
|
76
96
|
export declare const createAndFireMediaCardEvent: (payload: MediaCardAnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
|
|
@@ -84,6 +84,19 @@ export const externalIdentifierWrapperStyles = css`
|
|
|
84
84
|
}
|
|
85
85
|
`;
|
|
86
86
|
|
|
87
|
+
export const unhandledErrorCardWrapperStyles = css`
|
|
88
|
+
padding: 20px;
|
|
89
|
+
|
|
90
|
+
> div:first-child {
|
|
91
|
+
display: flex;
|
|
92
|
+
margin-bottom: 20px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
label {
|
|
96
|
+
margin-right: 20px;
|
|
97
|
+
}
|
|
98
|
+
`;
|
|
99
|
+
|
|
87
100
|
export const inlineCardVideoWrapperItemStyles = css`
|
|
88
101
|
padding: 10px;
|
|
89
102
|
border: 1px solid ${token('color.border.bold', 'black')};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "74.
|
|
3
|
+
"version": "74.4.1",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
32
32
|
"@atlaskit/dropdown-menu": "^11.5.0",
|
|
33
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
33
|
+
"@atlaskit/editor-shared-styles": "^2.3.0",
|
|
34
34
|
"@atlaskit/icon": "^21.11.0",
|
|
35
|
-
"@atlaskit/media-client": "^
|
|
36
|
-
"@atlaskit/media-common": "^2.
|
|
35
|
+
"@atlaskit/media-client": "^20.0.0",
|
|
36
|
+
"@atlaskit/media-common": "^2.18.0",
|
|
37
37
|
"@atlaskit/media-ui": "^22.2.0",
|
|
38
|
-
"@atlaskit/media-viewer": "^47.
|
|
38
|
+
"@atlaskit/media-viewer": "^47.3.0",
|
|
39
39
|
"@atlaskit/spinner": "^15.3.0",
|
|
40
40
|
"@atlaskit/theme": "^12.2.0",
|
|
41
41
|
"@atlaskit/tokens": "^0.13.0",
|
|
@@ -61,11 +61,12 @@
|
|
|
61
61
|
"@atlaskit/docs": "*",
|
|
62
62
|
"@atlaskit/inline-message": "^11.4.0",
|
|
63
63
|
"@atlaskit/media-core": "^34.0.0",
|
|
64
|
-
"@atlaskit/media-picker": "^64.
|
|
65
|
-
"@atlaskit/media-test-helpers": "^30.
|
|
64
|
+
"@atlaskit/media-picker": "^64.1.0",
|
|
65
|
+
"@atlaskit/media-test-helpers": "^30.1.0",
|
|
66
66
|
"@atlaskit/radio": "^5.4.0",
|
|
67
67
|
"@atlaskit/range": "^7.0.0",
|
|
68
|
-
"@atlaskit/
|
|
68
|
+
"@atlaskit/section-message": "^6.3.0",
|
|
69
|
+
"@atlaskit/select": "^16.1.0",
|
|
69
70
|
"@atlaskit/ssr": "*",
|
|
70
71
|
"@atlaskit/toggle": "^12.5.0",
|
|
71
72
|
"@atlaskit/visual-regression": "*",
|
package/report.api.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- API Report Version: 2.
|
|
1
|
+
<!-- API Report Version: 2.3 -->
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/media-card"
|
|
4
4
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
### Table of contents
|
|
9
9
|
|
|
10
10
|
- [Main Entry Types](#main-entry-types)
|
|
11
|
+
- [Peer Dependencies](#peer-dependencies)
|
|
11
12
|
|
|
12
13
|
### Main Entry Types
|
|
13
14
|
|
|
@@ -147,7 +148,6 @@ export interface CardProps extends SharedCardProps, CardEventProps {
|
|
|
147
148
|
readonly isLazy?: boolean;
|
|
148
149
|
// (undocumented)
|
|
149
150
|
readonly mediaClient: MediaClient;
|
|
150
|
-
// (undocumented)
|
|
151
151
|
readonly mediaViewerDataSource?: MediaViewerDataSource;
|
|
152
152
|
// (undocumented)
|
|
153
153
|
readonly shouldEnableDownloadButton?: boolean;
|
|
@@ -333,6 +333,7 @@ export { NumericalCardDimensions };
|
|
|
333
333
|
// @public (undocumented)
|
|
334
334
|
type RemotePreviewPrimaryReason =
|
|
335
335
|
| 'remote-preview-fetch'
|
|
336
|
+
| 'remote-preview-fetch-ssr'
|
|
336
337
|
| 'remote-preview-not-ready';
|
|
337
338
|
|
|
338
339
|
// @public (undocumented)
|
|
@@ -389,3 +390,18 @@ export type TitleBoxIcon = 'LockFilledIcon';
|
|
|
389
390
|
```
|
|
390
391
|
|
|
391
392
|
<!--SECTION END: Main Entry Types-->
|
|
393
|
+
|
|
394
|
+
### Peer Dependencies
|
|
395
|
+
|
|
396
|
+
<!--SECTION START: Peer Dependencies-->
|
|
397
|
+
|
|
398
|
+
```json
|
|
399
|
+
{
|
|
400
|
+
"@emotion/react": "^11.7.1",
|
|
401
|
+
"react": "^16.8.0",
|
|
402
|
+
"react-dom": "^16.8.0",
|
|
403
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
404
|
+
}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
<!--SECTION END: Peer Dependencies-->
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
-
|
|
16
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
-
|
|
18
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
-
|
|
20
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
21
|
-
|
|
22
|
-
var _react = _interopRequireDefault(require("react"));
|
|
23
|
-
|
|
24
|
-
var _mediaCommon = require("@atlaskit/media-common");
|
|
25
|
-
|
|
26
|
-
var _AnalyticsErrorBoundary = _interopRequireDefault(require("@atlaskit/analytics-next/AnalyticsErrorBoundary"));
|
|
27
|
-
|
|
28
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
29
|
-
|
|
30
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
31
|
-
|
|
32
|
-
var MediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
33
|
-
(0, _inherits2.default)(MediaCardAnalyticsErrorBoundary, _React$Component);
|
|
34
|
-
|
|
35
|
-
var _super = _createSuper(MediaCardAnalyticsErrorBoundary);
|
|
36
|
-
|
|
37
|
-
function MediaCardAnalyticsErrorBoundary() {
|
|
38
|
-
(0, _classCallCheck2.default)(this, MediaCardAnalyticsErrorBoundary);
|
|
39
|
-
return _super.apply(this, arguments);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
(0, _createClass2.default)(MediaCardAnalyticsErrorBoundary, [{
|
|
43
|
-
key: "render",
|
|
44
|
-
value: function render() {
|
|
45
|
-
var _this$props = this.props,
|
|
46
|
-
_this$props$data = _this$props.data,
|
|
47
|
-
data = _this$props$data === void 0 ? {} : _this$props$data,
|
|
48
|
-
children = _this$props.children;
|
|
49
|
-
return /*#__PURE__*/_react.default.createElement(_AnalyticsErrorBoundary.default, {
|
|
50
|
-
channel: _mediaCommon.ANALYTICS_MEDIA_CHANNEL,
|
|
51
|
-
data: data
|
|
52
|
-
}, children);
|
|
53
|
-
}
|
|
54
|
-
}]);
|
|
55
|
-
return MediaCardAnalyticsErrorBoundary;
|
|
56
|
-
}(_react.default.Component);
|
|
57
|
-
|
|
58
|
-
exports.default = MediaCardAnalyticsErrorBoundary;
|
|
59
|
-
(0, _defineProperty2.default)(MediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
|
|
4
|
-
import AnalyticsErrorBoundary from '@atlaskit/analytics-next/AnalyticsErrorBoundary';
|
|
5
|
-
export default class MediaCardAnalyticsErrorBoundary extends React.Component {
|
|
6
|
-
render() {
|
|
7
|
-
const {
|
|
8
|
-
data = {},
|
|
9
|
-
children
|
|
10
|
-
} = this.props;
|
|
11
|
-
return /*#__PURE__*/React.createElement(AnalyticsErrorBoundary, {
|
|
12
|
-
channel: ANALYTICS_MEDIA_CHANNEL,
|
|
13
|
-
data: data
|
|
14
|
-
}, children);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
_defineProperty(MediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|