@atlaskit/media-card 74.1.4 → 74.1.5
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 +6 -0
- package/classnames/package.json +1 -1
- package/dist/cjs/root/card/getCardPreview/helpers.js +4 -4
- package/dist/cjs/root/card/getCardPreview/index.js +1 -1
- package/dist/cjs/root/card/index.js +1 -1
- package/dist/cjs/root/inlinePlayer.js +2 -2
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/root/card/getCardPreview/helpers.js +4 -4
- package/dist/es2019/root/card/getCardPreview/index.js +1 -1
- package/dist/es2019/root/card/index.js +1 -1
- package/dist/es2019/root/inlinePlayer.js +2 -2
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/root/card/getCardPreview/helpers.js +4 -4
- package/dist/esm/root/card/getCardPreview/index.js +1 -1
- package/dist/esm/root/card/index.js +1 -1
- package/dist/esm/root/inlinePlayer.js +2 -2
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types-ts4.0/__tests_external__/index.d.ts +1 -0
- package/dist/types-ts4.0/__tests_external__/page-objects/MediaCard.d.ts +8 -0
- package/dist/types-ts4.0/actions.d.ts +9 -0
- package/dist/types-ts4.0/classnames.d.ts +1 -0
- package/dist/types-ts4.0/errors.d.ts +41 -0
- package/dist/types-ts4.0/files/cardImageView/cardImageViewWrapper.d.ts +6 -0
- package/dist/types-ts4.0/files/cardImageView/cardOverlay/cardOverlayComponents.d.ts +8 -0
- package/dist/types-ts4.0/files/cardImageView/cardOverlay/index.d.ts +39 -0
- package/dist/types-ts4.0/files/cardImageView/cardOverlay/styles.d.ts +26 -0
- package/dist/types-ts4.0/files/cardImageView/classnames.d.ts +2 -0
- package/dist/types-ts4.0/files/cardImageView/index.d.ts +50 -0
- package/dist/types-ts4.0/files/cardImageView/styles.d.ts +24 -0
- package/dist/types-ts4.0/files/index.d.ts +2 -0
- package/dist/types-ts4.0/in-product.d.ts +1 -0
- package/dist/types-ts4.0/index.d.ts +77 -0
- package/dist/types-ts4.0/root/card/cardAnalytics.d.ts +9 -0
- package/dist/types-ts4.0/root/card/cardConstants.d.ts +1 -0
- package/dist/types-ts4.0/root/card/cardLoader.d.ts +6 -0
- package/dist/types-ts4.0/root/card/cardState.d.ts +5 -0
- package/dist/types-ts4.0/root/card/getCardPreview/cache.d.ts +19 -0
- package/dist/types-ts4.0/root/card/getCardPreview/filePreviewStatus.d.ts +5 -0
- package/dist/types-ts4.0/root/card/getCardPreview/helpers.d.ts +9 -0
- package/dist/types-ts4.0/root/card/getCardPreview/index.d.ts +56 -0
- package/dist/types-ts4.0/root/card/getCardStatus.d.ts +4 -0
- package/dist/types-ts4.0/root/card/imageRefetchingAnalytics.d.ts +10 -0
- package/dist/types-ts4.0/root/card/index.d.ts +58 -0
- package/dist/types-ts4.0/root/cardView.d.ts +80 -0
- package/dist/types-ts4.0/root/cardViewWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/index.d.ts +2 -0
- package/dist/types-ts4.0/root/inline/loader.d.ts +25 -0
- package/dist/types-ts4.0/root/inline/mediaInlineCard.d.ts +14 -0
- package/dist/types-ts4.0/root/inlinePlayer.d.ts +51 -0
- package/dist/types-ts4.0/root/inlinePlayerLazy.d.ts +2 -0
- package/dist/types-ts4.0/root/inlinePlayerWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/media-card-analytics-error-boundary.d.ts +10 -0
- package/dist/types-ts4.0/root/styles.d.ts +10 -0
- package/dist/types-ts4.0/root/types.d.ts +24 -0
- package/dist/types-ts4.0/root/ui/actionsBar/actionsBar.d.ts +5 -0
- package/dist/types-ts4.0/root/ui/actionsBar/actionsBarWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/actionsBar/styles.d.ts +6 -0
- package/dist/types-ts4.0/root/ui/actionsBar/types.d.ts +10 -0
- package/dist/types-ts4.0/root/ui/blanket/blanket.d.ts +6 -0
- package/dist/types-ts4.0/root/ui/blanket/styles.d.ts +6 -0
- package/dist/types-ts4.0/root/ui/common.d.ts +23 -0
- package/dist/types-ts4.0/root/ui/iconMessage/iconMessageWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/iconMessage/index.d.ts +8 -0
- package/dist/types-ts4.0/root/ui/iconMessage/styles.d.ts +5 -0
- package/dist/types-ts4.0/root/ui/iconMessage/types.d.ts +19 -0
- package/dist/types-ts4.0/root/ui/iconWrapper/iconWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/iconWrapper/styles.d.ts +7 -0
- package/dist/types-ts4.0/root/ui/iconWrapper/types.d.ts +6 -0
- package/dist/types-ts4.0/root/ui/imageRenderer/imageRenderer.d.ts +15 -0
- package/dist/types-ts4.0/root/ui/loadingRateLimited/styles.d.ts +13 -0
- package/dist/types-ts4.0/root/ui/newFileExperience/newFileExperienceWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/newFileExperience/styles.d.ts +5 -0
- package/dist/types-ts4.0/root/ui/newFileExperience/types.d.ts +23 -0
- package/dist/types-ts4.0/root/ui/playButton/playButton.d.ts +2 -0
- package/dist/types-ts4.0/root/ui/playButton/playButtonBackground.d.ts +3 -0
- package/dist/types-ts4.0/root/ui/playButton/playButtonWrapper.d.ts +3 -0
- package/dist/types-ts4.0/root/ui/playButton/styles.d.ts +5 -0
- package/dist/types-ts4.0/root/ui/progressBar/progressBar.d.ts +10 -0
- package/dist/types-ts4.0/root/ui/progressBar/styledBar.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/progressBar/styles.d.ts +7 -0
- package/dist/types-ts4.0/root/ui/progressBar/types.d.ts +7 -0
- package/dist/types-ts4.0/root/ui/styles.d.ts +11 -0
- package/dist/types-ts4.0/root/ui/tickBox/styles.d.ts +7 -0
- package/dist/types-ts4.0/root/ui/tickBox/tickBox.d.ts +3 -0
- package/dist/types-ts4.0/root/ui/tickBox/tickBoxWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/tickBox/types.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/titleBox/failedTitleBox.d.ts +3 -0
- package/dist/types-ts4.0/root/ui/titleBox/styles.d.ts +15 -0
- package/dist/types-ts4.0/root/ui/titleBox/titleBox.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/titleBox/titleBoxComponents.d.ts +8 -0
- package/dist/types-ts4.0/root/ui/titleBox/types.d.ts +32 -0
- package/dist/types-ts4.0/styles/animations.d.ts +1 -0
- package/dist/types-ts4.0/styles/config.d.ts +1 -0
- package/dist/types-ts4.0/styles/easing.d.ts +2 -0
- package/dist/types-ts4.0/styles/getSelectedBorderStyle.d.ts +3 -0
- package/dist/types-ts4.0/styles/index.d.ts +9 -0
- package/dist/types-ts4.0/styles/mixins.d.ts +21 -0
- package/dist/types-ts4.0/types.d.ts +25 -0
- package/dist/types-ts4.0/utils/analytics.d.ts +78 -0
- package/dist/types-ts4.0/utils/breakpoint.d.ts +11 -0
- package/dist/types-ts4.0/utils/cardActions/cardActionButton.d.ts +4 -0
- package/dist/types-ts4.0/utils/cardActions/cardActionIconButton.d.ts +12 -0
- package/dist/types-ts4.0/utils/cardActions/cardActionsDropdownMenu.d.ts +14 -0
- package/dist/types-ts4.0/utils/cardActions/cardActionsView.d.ts +16 -0
- package/dist/types-ts4.0/utils/cardActions/index.d.ts +7 -0
- package/dist/types-ts4.0/utils/cardActions/styles.d.ts +18 -0
- package/dist/types-ts4.0/utils/cardDimensions.d.ts +53 -0
- package/dist/types-ts4.0/utils/containsPixelUnit.d.ts +1 -0
- package/dist/types-ts4.0/utils/dimensionComparer.d.ts +3 -0
- package/dist/types-ts4.0/utils/document.d.ts +2 -0
- package/dist/types-ts4.0/utils/errorIcon/index.d.ts +12 -0
- package/dist/types-ts4.0/utils/errorIcon/styles.d.ts +1 -0
- package/dist/types-ts4.0/utils/fileIcon/index.d.ts +12 -0
- package/dist/types-ts4.0/utils/fileIcon/styles.d.ts +1 -0
- package/dist/types-ts4.0/utils/generateUniqueId.d.ts +1 -0
- package/dist/types-ts4.0/utils/getCSSUnitValue.d.ts +1 -0
- package/dist/types-ts4.0/utils/getDataURIDimension.d.ts +9 -0
- package/dist/types-ts4.0/utils/getElementDimension.d.ts +2 -0
- package/dist/types-ts4.0/utils/getErrorMessage.d.ts +2 -0
- package/dist/types-ts4.0/utils/getMediaCardCursor.d.ts +6 -0
- package/dist/types-ts4.0/utils/globalScope/getSSRData.d.ts +3 -0
- package/dist/types-ts4.0/utils/globalScope/globalScope.d.ts +21 -0
- package/dist/types-ts4.0/utils/globalScope/index.d.ts +4 -0
- package/dist/types-ts4.0/utils/globalScope/types.d.ts +8 -0
- package/dist/types-ts4.0/utils/index.d.ts +15 -0
- package/dist/types-ts4.0/utils/isRetina.d.ts +1 -0
- package/dist/types-ts4.0/utils/isValidPercentageUnit.d.ts +1 -0
- package/dist/types-ts4.0/utils/lightCards/cardError.d.ts +12 -0
- package/dist/types-ts4.0/utils/lightCards/cardLoading.d.ts +5 -0
- package/dist/types-ts4.0/utils/lightCards/getDimensionsWithDefault.d.ts +2 -0
- package/dist/types-ts4.0/utils/lightCards/lightCardWrappers.d.ts +5 -0
- package/dist/types-ts4.0/utils/lightCards/styles.d.ts +4 -0
- package/dist/types-ts4.0/utils/lightCards/types.d.ts +15 -0
- package/dist/types-ts4.0/utils/mediaTypeIcon/iconWrapper.d.ts +4 -0
- package/dist/types-ts4.0/utils/mediaTypeIcon/index.d.ts +10 -0
- package/dist/types-ts4.0/utils/mediaTypeIcon/styles.d.ts +2 -0
- package/dist/types-ts4.0/utils/mediaTypeIcon/types.d.ts +6 -0
- package/dist/types-ts4.0/utils/metadata.d.ts +2 -0
- package/dist/types-ts4.0/utils/objectURLCache.d.ts +11 -0
- package/dist/types-ts4.0/utils/preventClickThrough.d.ts +8 -0
- package/dist/types-ts4.0/utils/printScript.d.ts +2 -0
- package/dist/types-ts4.0/utils/progressBar/index.d.ts +9 -0
- package/dist/types-ts4.0/utils/progressBar/styles.d.ts +1 -0
- package/dist/types-ts4.0/utils/resizeModeToMediaImageProps.d.ts +5 -0
- package/dist/types-ts4.0/utils/shouldDisplayImageThumbnail.d.ts +3 -0
- package/dist/types-ts4.0/utils/ufoExperiences.d.ts +7 -0
- package/dist/types-ts4.0/utils/videoSnapshot.d.ts +1 -0
- package/dist/types-ts4.0/utils/viewportDetector.d.ts +6 -0
- package/in-product/package.json +1 -1
- package/package.json +9 -2
- package/types/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/classnames/package.json
CHANGED
|
@@ -52,7 +52,7 @@ var getImageLocalPreview = /*#__PURE__*/function () {
|
|
|
52
52
|
case 8:
|
|
53
53
|
_context.prev = 8;
|
|
54
54
|
_context.t0 = _context["catch"](0);
|
|
55
|
-
throw new _errors.LocalPreviewError('local-preview-image', _context.t0);
|
|
55
|
+
throw new _errors.LocalPreviewError('local-preview-image', _context.t0 instanceof Error ? _context.t0 : undefined);
|
|
56
56
|
|
|
57
57
|
case 11:
|
|
58
58
|
case "end":
|
|
@@ -89,7 +89,7 @@ var getVideoLocalPreview = /*#__PURE__*/function () {
|
|
|
89
89
|
case 7:
|
|
90
90
|
_context2.prev = 7;
|
|
91
91
|
_context2.t0 = _context2["catch"](0);
|
|
92
|
-
throw new _errors.LocalPreviewError('local-preview-video', _context2.t0);
|
|
92
|
+
throw new _errors.LocalPreviewError('local-preview-video', _context2.t0 instanceof Error ? _context2.t0 : undefined);
|
|
93
93
|
|
|
94
94
|
case 10:
|
|
95
95
|
case "end":
|
|
@@ -125,7 +125,7 @@ var getCardPreviewFromFilePreview = /*#__PURE__*/function () {
|
|
|
125
125
|
case 7:
|
|
126
126
|
_context3.prev = 7;
|
|
127
127
|
_context3.t0 = _context3["catch"](0);
|
|
128
|
-
throw new _errors.LocalPreviewError('local-preview-rejected', _context3.t0);
|
|
128
|
+
throw new _errors.LocalPreviewError('local-preview-rejected', _context3.t0 instanceof Error ? _context3.t0 : undefined);
|
|
129
129
|
|
|
130
130
|
case 10:
|
|
131
131
|
if (!(typeof value === 'string')) {
|
|
@@ -197,7 +197,7 @@ var getCardPreviewFromBackend = /*#__PURE__*/function () {
|
|
|
197
197
|
case 7:
|
|
198
198
|
_context4.prev = 7;
|
|
199
199
|
_context4.t0 = _context4["catch"](0);
|
|
200
|
-
throw new _errors.RemotePreviewError('remote-preview-fetch', _context4.t0);
|
|
200
|
+
throw new _errors.RemotePreviewError('remote-preview-fetch', _context4.t0 instanceof Error ? _context4.t0 : undefined);
|
|
201
201
|
|
|
202
202
|
case 10:
|
|
203
203
|
case "end":
|
|
@@ -280,7 +280,7 @@ var getSSRCardPreview = function getSSRCardPreview(ssr, mediaClient, id, params,
|
|
|
280
280
|
};
|
|
281
281
|
} catch (e) {
|
|
282
282
|
var reason = ssr === 'server' ? 'ssr-server-uri' : 'ssr-client-uri';
|
|
283
|
-
throw new _errors.SsrPreviewError(reason, e);
|
|
283
|
+
throw new _errors.SsrPreviewError(reason, e instanceof Error ? e : undefined);
|
|
284
284
|
}
|
|
285
285
|
};
|
|
286
286
|
|
|
@@ -90,7 +90,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
90
90
|
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; } }
|
|
91
91
|
|
|
92
92
|
var packageName = "@atlaskit/media-card";
|
|
93
|
-
var packageVersion = "74.1.
|
|
93
|
+
var packageVersion = "74.1.5";
|
|
94
94
|
|
|
95
95
|
var CardBase = /*#__PURE__*/function (_Component) {
|
|
96
96
|
(0, _inherits2.default)(CardBase, _Component);
|
|
@@ -120,7 +120,7 @@ var InlinePlayerBase = /*#__PURE__*/function (_Component) {
|
|
|
120
120
|
_context.prev = 9;
|
|
121
121
|
_context.t0 = _context["catch"](2);
|
|
122
122
|
|
|
123
|
-
if (onError) {
|
|
123
|
+
if (onError && _context.t0 instanceof Error) {
|
|
124
124
|
onError(_context.t0);
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -283,7 +283,7 @@ var InlinePlayerBase = /*#__PURE__*/function (_Component) {
|
|
|
283
283
|
_context2.t0 = _context2["catch"](19);
|
|
284
284
|
onError = _this2.props.onError;
|
|
285
285
|
|
|
286
|
-
if (onError) {
|
|
286
|
+
if (onError && _context2.t0 instanceof Error) {
|
|
287
287
|
onError(_context2.t0);
|
|
288
288
|
}
|
|
289
289
|
|
|
@@ -22,7 +22,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
22
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
23
|
|
|
24
24
|
var packageName = "@atlaskit/media-card";
|
|
25
|
-
var packageVersion = "74.1.
|
|
25
|
+
var packageVersion = "74.1.5";
|
|
26
26
|
var concurrentExperience;
|
|
27
27
|
|
|
28
28
|
var getExperience = function getExperience(id) {
|
package/dist/cjs/version.json
CHANGED
|
@@ -19,7 +19,7 @@ const getImageLocalPreview = async value => {
|
|
|
19
19
|
source: 'local'
|
|
20
20
|
};
|
|
21
21
|
} catch (e) {
|
|
22
|
-
throw new LocalPreviewError('local-preview-image', e);
|
|
22
|
+
throw new LocalPreviewError('local-preview-image', e instanceof Error ? e : undefined);
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -32,7 +32,7 @@ const getVideoLocalPreview = async value => {
|
|
|
32
32
|
source: 'local'
|
|
33
33
|
};
|
|
34
34
|
} catch (e) {
|
|
35
|
-
throw new LocalPreviewError('local-preview-video', e);
|
|
35
|
+
throw new LocalPreviewError('local-preview-video', e instanceof Error ? e : undefined);
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
|
|
@@ -43,7 +43,7 @@ export const getCardPreviewFromFilePreview = async filePreview => {
|
|
|
43
43
|
const resolvedFilePreview = await filePreview;
|
|
44
44
|
value = resolvedFilePreview.value;
|
|
45
45
|
} catch (e) {
|
|
46
|
-
throw new LocalPreviewError('local-preview-rejected', e);
|
|
46
|
+
throw new LocalPreviewError('local-preview-rejected', e instanceof Error ? e : undefined);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
if (typeof value === 'string') {
|
|
@@ -78,6 +78,6 @@ export const getCardPreviewFromBackend = async (mediaClient, id, params) => {
|
|
|
78
78
|
source: 'remote'
|
|
79
79
|
};
|
|
80
80
|
} catch (e) {
|
|
81
|
-
throw new RemotePreviewError('remote-preview-fetch', e);
|
|
81
|
+
throw new RemotePreviewError('remote-preview-fetch', e instanceof Error ? e : undefined);
|
|
82
82
|
}
|
|
83
83
|
};
|
|
@@ -180,7 +180,7 @@ export const getSSRCardPreview = (ssr, mediaClient, id, params, mediaBlobUrlAttr
|
|
|
180
180
|
};
|
|
181
181
|
} catch (e) {
|
|
182
182
|
const reason = ssr === 'server' ? 'ssr-server-uri' : 'ssr-client-uri';
|
|
183
|
-
throw new SsrPreviewError(reason, e);
|
|
183
|
+
throw new SsrPreviewError(reason, e instanceof Error ? e : undefined);
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
186
|
export const isLocalPreview = preview => {
|
|
@@ -25,7 +25,7 @@ import { getMediaCardCursor } from '../../utils/getMediaCardCursor';
|
|
|
25
25
|
import { completeUfoExperience, startUfoExperience } from '../../utils/ufoExperiences';
|
|
26
26
|
import { generateUniqueId } from '../../utils/generateUniqueId';
|
|
27
27
|
const packageName = "@atlaskit/media-card";
|
|
28
|
-
const packageVersion = "74.1.
|
|
28
|
+
const packageVersion = "74.1.5";
|
|
29
29
|
export class CardBase extends Component {
|
|
30
30
|
// An internalOccurrenceKey is a randomly generated value to differentiate various instances
|
|
31
31
|
// of Cards regardless of whether it shares the same file (either internal or external)
|
|
@@ -55,7 +55,7 @@ export class InlinePlayerBase extends Component {
|
|
|
55
55
|
const fileSrc = await mediaClient.file.getFileBinaryURL(id, collectionName);
|
|
56
56
|
this.setFileSrc(fileSrc);
|
|
57
57
|
} catch (error) {
|
|
58
|
-
if (onError) {
|
|
58
|
+
if (onError && error instanceof Error) {
|
|
59
59
|
onError(error);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -187,7 +187,7 @@ export class InlinePlayerBase extends Component {
|
|
|
187
187
|
onError
|
|
188
188
|
} = this.props;
|
|
189
189
|
|
|
190
|
-
if (onError) {
|
|
190
|
+
if (onError && error instanceof Error) {
|
|
191
191
|
onError(error);
|
|
192
192
|
}
|
|
193
193
|
}
|
|
@@ -3,7 +3,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata, LOGGED_FEATURE_FLAG_KE
|
|
|
3
3
|
import { MediaCardError } from '../errors';
|
|
4
4
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
5
5
|
const packageName = "@atlaskit/media-card";
|
|
6
|
-
const packageVersion = "74.1.
|
|
6
|
+
const packageVersion = "74.1.5";
|
|
7
7
|
let concurrentExperience;
|
|
8
8
|
|
|
9
9
|
const getExperience = id => {
|
package/dist/es2019/version.json
CHANGED
|
@@ -36,7 +36,7 @@ var getImageLocalPreview = /*#__PURE__*/function () {
|
|
|
36
36
|
case 8:
|
|
37
37
|
_context.prev = 8;
|
|
38
38
|
_context.t0 = _context["catch"](0);
|
|
39
|
-
throw new LocalPreviewError('local-preview-image', _context.t0);
|
|
39
|
+
throw new LocalPreviewError('local-preview-image', _context.t0 instanceof Error ? _context.t0 : undefined);
|
|
40
40
|
|
|
41
41
|
case 11:
|
|
42
42
|
case "end":
|
|
@@ -73,7 +73,7 @@ var getVideoLocalPreview = /*#__PURE__*/function () {
|
|
|
73
73
|
case 7:
|
|
74
74
|
_context2.prev = 7;
|
|
75
75
|
_context2.t0 = _context2["catch"](0);
|
|
76
|
-
throw new LocalPreviewError('local-preview-video', _context2.t0);
|
|
76
|
+
throw new LocalPreviewError('local-preview-video', _context2.t0 instanceof Error ? _context2.t0 : undefined);
|
|
77
77
|
|
|
78
78
|
case 10:
|
|
79
79
|
case "end":
|
|
@@ -109,7 +109,7 @@ export var getCardPreviewFromFilePreview = /*#__PURE__*/function () {
|
|
|
109
109
|
case 7:
|
|
110
110
|
_context3.prev = 7;
|
|
111
111
|
_context3.t0 = _context3["catch"](0);
|
|
112
|
-
throw new LocalPreviewError('local-preview-rejected', _context3.t0);
|
|
112
|
+
throw new LocalPreviewError('local-preview-rejected', _context3.t0 instanceof Error ? _context3.t0 : undefined);
|
|
113
113
|
|
|
114
114
|
case 10:
|
|
115
115
|
if (!(typeof value === 'string')) {
|
|
@@ -178,7 +178,7 @@ export var getCardPreviewFromBackend = /*#__PURE__*/function () {
|
|
|
178
178
|
case 7:
|
|
179
179
|
_context4.prev = 7;
|
|
180
180
|
_context4.t0 = _context4["catch"](0);
|
|
181
|
-
throw new RemotePreviewError('remote-preview-fetch', _context4.t0);
|
|
181
|
+
throw new RemotePreviewError('remote-preview-fetch', _context4.t0 instanceof Error ? _context4.t0 : undefined);
|
|
182
182
|
|
|
183
183
|
case 10:
|
|
184
184
|
case "end":
|
|
@@ -223,7 +223,7 @@ export var getSSRCardPreview = function getSSRCardPreview(ssr, mediaClient, id,
|
|
|
223
223
|
};
|
|
224
224
|
} catch (e) {
|
|
225
225
|
var reason = ssr === 'server' ? 'ssr-server-uri' : 'ssr-client-uri';
|
|
226
|
-
throw new SsrPreviewError(reason, e);
|
|
226
|
+
throw new SsrPreviewError(reason, e instanceof Error ? e : undefined);
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
229
|
export var isLocalPreview = function isLocalPreview(preview) {
|
|
@@ -43,7 +43,7 @@ import { getMediaCardCursor } from '../../utils/getMediaCardCursor';
|
|
|
43
43
|
import { completeUfoExperience, startUfoExperience } from '../../utils/ufoExperiences';
|
|
44
44
|
import { generateUniqueId } from '../../utils/generateUniqueId';
|
|
45
45
|
var packageName = "@atlaskit/media-card";
|
|
46
|
-
var packageVersion = "74.1.
|
|
46
|
+
var packageVersion = "74.1.5";
|
|
47
47
|
export var CardBase = /*#__PURE__*/function (_Component) {
|
|
48
48
|
_inherits(CardBase, _Component);
|
|
49
49
|
|
|
@@ -88,7 +88,7 @@ export var InlinePlayerBase = /*#__PURE__*/function (_Component) {
|
|
|
88
88
|
_context.prev = 9;
|
|
89
89
|
_context.t0 = _context["catch"](2);
|
|
90
90
|
|
|
91
|
-
if (onError) {
|
|
91
|
+
if (onError && _context.t0 instanceof Error) {
|
|
92
92
|
onError(_context.t0);
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -256,7 +256,7 @@ export var InlinePlayerBase = /*#__PURE__*/function (_Component) {
|
|
|
256
256
|
_context2.t0 = _context2["catch"](19);
|
|
257
257
|
onError = _this2.props.onError;
|
|
258
258
|
|
|
259
|
-
if (onError) {
|
|
259
|
+
if (onError && _context2.t0 instanceof Error) {
|
|
260
260
|
onError(_context2.t0);
|
|
261
261
|
}
|
|
262
262
|
|
|
@@ -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.1.
|
|
12
|
+
var packageVersion = "74.1.5";
|
|
13
13
|
var concurrentExperience;
|
|
14
14
|
|
|
15
15
|
var getExperience = function getExperience(id) {
|
package/dist/esm/version.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MediaCardPageObject } from './page-objects/MediaCard';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
import { InProductTestPageObject } from '@atlaskit/in-product-testing';
|
|
3
|
+
export declare class MediaCardPageObject extends InProductTestPageObject {
|
|
4
|
+
expectCardReady(numOfCards: number): Cypress.Chainable<JQuery<HTMLElement>>;
|
|
5
|
+
findCardNth(nth: number): Cypress.Chainable<JQuery<HTMLElement>>;
|
|
6
|
+
findImage(nth: number): Cypress.Chainable<JQuery<HTMLElement>>;
|
|
7
|
+
assertAltText(altText: string, nth?: number): Cypress.Chainable<JQuery<HTMLElement>>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FileItem, FileDetails } from '@atlaskit/media-client';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface CardAction {
|
|
4
|
+
label?: string;
|
|
5
|
+
handler: CardEventHandler;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare type CardEventHandler = (item?: FileItem, event?: Event) => void;
|
|
9
|
+
export declare function attachDetailsToActions(actions: Array<CardAction>, details: FileDetails): Array<CardAction>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { fileCardImageViewSelector, fileCardImageViewSelectedSelector, } from './files/cardImageView/classnames';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { CardPreview } from '.';
|
|
2
|
+
/**
|
|
3
|
+
* Primary reason is logged through Data Portal.
|
|
4
|
+
* Make sure all the values are whitelisted in Measure -> Event Regitry -> "mediaCardRender failed" event
|
|
5
|
+
*/
|
|
6
|
+
export declare type MediaCardErrorPrimaryReason = 'upload' | 'metadata-fetch' | 'error-file-state' | RemotePreviewPrimaryReason | LocalPreviewPrimaryReason | ImageLoadPrimaryReason | SsrPreviewPrimaryReason | 'missing-error-data' | 'preview-fetch';
|
|
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';
|
|
9
|
+
export declare type LocalPreviewPrimaryReason = 'local-preview-get' | 'local-preview-unsupported' | 'local-preview-rejected' | 'local-preview-image' | 'local-preview-video';
|
|
10
|
+
export declare type SsrPreviewPrimaryReason = 'ssr-client-uri' | 'ssr-client-load' | 'ssr-server-uri' | 'ssr-server-load';
|
|
11
|
+
export declare class MediaCardError extends Error {
|
|
12
|
+
readonly primaryReason: MediaCardErrorPrimaryReason;
|
|
13
|
+
readonly secondaryError?: Error | undefined;
|
|
14
|
+
constructor(primaryReason: MediaCardErrorPrimaryReason, secondaryError?: Error | undefined);
|
|
15
|
+
}
|
|
16
|
+
export declare class LocalPreviewError extends MediaCardError {
|
|
17
|
+
readonly primaryReason: LocalPreviewPrimaryReason;
|
|
18
|
+
readonly secondaryError?: Error | undefined;
|
|
19
|
+
constructor(primaryReason: LocalPreviewPrimaryReason, secondaryError?: Error | undefined);
|
|
20
|
+
}
|
|
21
|
+
export declare class RemotePreviewError extends MediaCardError {
|
|
22
|
+
readonly primaryReason: RemotePreviewPrimaryReason;
|
|
23
|
+
readonly secondaryError?: Error | undefined;
|
|
24
|
+
constructor(primaryReason: RemotePreviewPrimaryReason, secondaryError?: Error | undefined);
|
|
25
|
+
}
|
|
26
|
+
export declare class SsrPreviewError extends MediaCardError {
|
|
27
|
+
readonly primaryReason: SsrPreviewPrimaryReason;
|
|
28
|
+
readonly secondaryError?: Error | undefined;
|
|
29
|
+
constructor(primaryReason: SsrPreviewPrimaryReason, secondaryError?: Error | undefined);
|
|
30
|
+
}
|
|
31
|
+
export declare const getImageLoadPrimaryReason: (source?: import("./types").CardPreviewSource | undefined) => ImageLoadPrimaryReason;
|
|
32
|
+
export declare class ImageLoadError extends MediaCardError {
|
|
33
|
+
constructor(source?: CardPreview['source']);
|
|
34
|
+
}
|
|
35
|
+
export declare function isMediaCardError(err: Error): err is MediaCardError;
|
|
36
|
+
export declare const isLocalPreviewError: (err: Error) => err is LocalPreviewError;
|
|
37
|
+
export declare const isRemotePreviewError: (err: Error) => err is LocalPreviewError;
|
|
38
|
+
export declare const isUnsupportedLocalPreviewError: (err: Error) => boolean;
|
|
39
|
+
export declare function isImageLoadError(err: Error): err is ImageLoadError;
|
|
40
|
+
export declare const ensureMediaCardError: (primaryReason: MediaCardErrorPrimaryReason, error: Error) => MediaCardError;
|
|
41
|
+
export declare const isUploadError: (error?: MediaCardError | undefined) => boolean | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { WrapperProps } from './styles';
|
|
4
|
+
export declare const CardImageViewWrapper: (props: WrapperProps) => jsx.JSX.Element;
|
|
5
|
+
export declare const PlayIconWrapper: (props: any) => jsx.JSX.Element;
|
|
6
|
+
export declare const ProgressBarWrapper: (props: any) => jsx.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { OverlayProps } from './styles';
|
|
4
|
+
export declare const Overlay: (props: OverlayProps) => jsx.JSX.Element;
|
|
5
|
+
export declare const ErrorMessage: (props: any) => jsx.JSX.Element;
|
|
6
|
+
export declare const AltWrapper: (props: any) => jsx.JSX.Element;
|
|
7
|
+
export declare const TitleWrapper: (props: any) => jsx.JSX.Element;
|
|
8
|
+
export declare const Metadata: (props: any) => jsx.JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { MouseEvent, Component, ReactNode } from 'react';
|
|
4
|
+
import { MediaType } from '@atlaskit/media-client';
|
|
5
|
+
import { CardAction, CardEventHandler } from '../../../actions';
|
|
6
|
+
import { CardStatus } from '../../../index';
|
|
7
|
+
export interface CardOverlayProps {
|
|
8
|
+
readonly cardStatus: CardStatus;
|
|
9
|
+
mediaType?: MediaType;
|
|
10
|
+
mediaName?: string;
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
selectable?: boolean;
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
persistent: boolean;
|
|
15
|
+
error?: ReactNode;
|
|
16
|
+
alt?: string;
|
|
17
|
+
noHover?: boolean;
|
|
18
|
+
actions?: Array<CardAction>;
|
|
19
|
+
icon?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface CardOverlayState {
|
|
22
|
+
isMenuExpanded: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare class CardOverlay extends Component<CardOverlayProps, CardOverlayState> {
|
|
25
|
+
static defaultProps: {
|
|
26
|
+
actions: never[];
|
|
27
|
+
mediaName: string;
|
|
28
|
+
};
|
|
29
|
+
constructor(props: CardOverlayProps);
|
|
30
|
+
private get wrapperClassNames();
|
|
31
|
+
render(): jsx.JSX.Element;
|
|
32
|
+
errorLine(): false | "" | 0 | jsx.JSX.Element | null | undefined;
|
|
33
|
+
tickBox(): false | jsx.JSX.Element | undefined;
|
|
34
|
+
bottomLeftColumn(): jsx.JSX.Element | undefined;
|
|
35
|
+
onMenuToggle: (attrs: {
|
|
36
|
+
isOpen: boolean;
|
|
37
|
+
}) => void;
|
|
38
|
+
removeBtnClick(handler: CardEventHandler): (e: MouseEvent<HTMLDivElement, any>) => void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Everything about this file change is just wrong.
|
|
4
|
+
* Mostly because we do bad things with classes.
|
|
5
|
+
* This is all wrong and hopefully will be removed from existence with card v3,
|
|
6
|
+
* so please don’t be too sad about all this!
|
|
7
|
+
*/
|
|
8
|
+
import { GlobalThemeTokens } from '@atlaskit/theme/components';
|
|
9
|
+
export interface OverlayProps {
|
|
10
|
+
hasError?: boolean;
|
|
11
|
+
noHover?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
children?: JSX.Element[];
|
|
14
|
+
}
|
|
15
|
+
export declare const tickBoxStyles: import("@emotion/react").SerializedStyles;
|
|
16
|
+
export declare const overlayStyles: (props: OverlayProps) => import("@emotion/react").SerializedStyles;
|
|
17
|
+
export declare const errorLineStyles: import("@emotion/react").SerializedStyles;
|
|
18
|
+
export declare const leftColumnStyles: import("@emotion/react").SerializedStyles;
|
|
19
|
+
export declare const topRowStyles: import("@emotion/react").SerializedStyles;
|
|
20
|
+
export declare const bottomRowStyles: import("@emotion/react").SerializedStyles;
|
|
21
|
+
export declare const rightColumnStyles: import("@emotion/react").SerializedStyles;
|
|
22
|
+
export declare const errorMessageStyles: import("@emotion/react").SerializedStyles;
|
|
23
|
+
export declare const altWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
24
|
+
export declare const titleWrapperStyles: (theme: GlobalThemeTokens) => import("@emotion/react").SerializedStyles;
|
|
25
|
+
export declare const subtitleStyles: import("@emotion/react").SerializedStyles;
|
|
26
|
+
export declare const metadataStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**@jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { Component, ReactNode } from 'react';
|
|
4
|
+
import { MediaItemType, MediaType, ImageResizeMode } from '@atlaskit/media-client';
|
|
5
|
+
import { CardDimensions, CardStatus } from '../../index';
|
|
6
|
+
import { CardAction } from '../../actions';
|
|
7
|
+
import { CardPreview } from '../..';
|
|
8
|
+
export interface FileCardImageViewProps {
|
|
9
|
+
readonly mediaName?: string;
|
|
10
|
+
readonly mediaType?: MediaType;
|
|
11
|
+
readonly mimeType?: string;
|
|
12
|
+
readonly fileSize?: string;
|
|
13
|
+
readonly dataURI?: string;
|
|
14
|
+
readonly alt?: string;
|
|
15
|
+
readonly progress?: number;
|
|
16
|
+
readonly status: CardStatus;
|
|
17
|
+
readonly mediaItemType: MediaItemType;
|
|
18
|
+
readonly dimensions?: CardDimensions;
|
|
19
|
+
readonly resizeMode?: ImageResizeMode;
|
|
20
|
+
readonly disableOverlay?: boolean;
|
|
21
|
+
readonly selectable?: boolean;
|
|
22
|
+
readonly selected?: boolean;
|
|
23
|
+
readonly error?: ReactNode;
|
|
24
|
+
readonly actions?: CardAction[];
|
|
25
|
+
readonly onDisplayImage?: () => void;
|
|
26
|
+
readonly previewOrientation?: number;
|
|
27
|
+
readonly onImageError?: (cardPreview: CardPreview) => void;
|
|
28
|
+
readonly onImageLoad?: (cardPreview: CardPreview) => void;
|
|
29
|
+
readonly cardPreview: CardPreview;
|
|
30
|
+
}
|
|
31
|
+
export declare class FileCardImageView extends Component<FileCardImageViewProps> {
|
|
32
|
+
private wasThumbnailDisplayed;
|
|
33
|
+
static defaultProps: Partial<FileCardImageViewProps>;
|
|
34
|
+
render(): jsx.JSX.Element;
|
|
35
|
+
private renderCardContents;
|
|
36
|
+
private renderLoadingContents;
|
|
37
|
+
private renderErrorContents;
|
|
38
|
+
private renderFailedContents;
|
|
39
|
+
private renderUploadingCardOverlay;
|
|
40
|
+
private renderPlayButton;
|
|
41
|
+
onImageLoad: () => void;
|
|
42
|
+
onImageError: () => void;
|
|
43
|
+
private renderMediaImage;
|
|
44
|
+
private renderProgressBar;
|
|
45
|
+
private renderSuccessCardContents;
|
|
46
|
+
private renderSuccessCardOverlay;
|
|
47
|
+
private get isFileCardImageReadyForDisplay();
|
|
48
|
+
private get isCropped();
|
|
49
|
+
private get isStretched();
|
|
50
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GlobalThemeTokens } from '@atlaskit/theme/components';
|
|
3
|
+
import { CardStatus } from '../../index';
|
|
4
|
+
export interface WrapperProps {
|
|
5
|
+
disableOverlay?: boolean;
|
|
6
|
+
selectable?: boolean;
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
hasOnClick?: boolean;
|
|
9
|
+
mediaType?: string;
|
|
10
|
+
mediaName?: string;
|
|
11
|
+
progress?: number;
|
|
12
|
+
status?: CardStatus;
|
|
13
|
+
theme?: GlobalThemeTokens;
|
|
14
|
+
children?: JSX.Element | JSX.Element[];
|
|
15
|
+
}
|
|
16
|
+
export declare const wrapperStyles: (props: WrapperProps) => import("@emotion/react").SerializedStyles;
|
|
17
|
+
export declare const playIconWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
18
|
+
export declare const playIconBackgroundStyles: import("@emotion/react").SerializedStyles;
|
|
19
|
+
export declare const progressBarWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
20
|
+
export declare const overlayStyles: import("@emotion/react").SerializedStyles;
|
|
21
|
+
export declare const titleStyles: import("@emotion/react").SerializedStyles;
|
|
22
|
+
export declare const bodyStyles: import("@emotion/react").SerializedStyles;
|
|
23
|
+
export declare const progressWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
24
|
+
export declare const cardActionsWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MediaCardPageObject } from './__tests_external__';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { FileDetails, MediaClient, Identifier, ImageResizeMode, FileState } from '@atlaskit/media-client';
|
|
3
|
+
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
import { MediaFeatureFlags, NumericalCardDimensions, SSR } from '@atlaskit/media-common';
|
|
5
|
+
import { CardAction } from './actions';
|
|
6
|
+
import { MediaViewerDataSource } from '@atlaskit/media-viewer';
|
|
7
|
+
import { CardPreview, CardStatus, CardAppearance } from './types';
|
|
8
|
+
import { MediaCardError } from './errors';
|
|
9
|
+
import { CardDimensions } from './utils';
|
|
10
|
+
export type { CardDimensions } from './utils';
|
|
11
|
+
export type { NumericalCardDimensions } from '@atlaskit/media-common';
|
|
12
|
+
export { Card, MediaInlineCard } from './root';
|
|
13
|
+
export type { CardAction, CardEventHandler } from './actions';
|
|
14
|
+
export type { CardStatus, CardAppearance, CardDimensionValue, CardPreview, } from './types';
|
|
15
|
+
export declare type TitleBoxIcon = 'LockFilledIcon';
|
|
16
|
+
export interface CardEvent {
|
|
17
|
+
event: MouseEvent<HTMLElement>;
|
|
18
|
+
mediaItemDetails?: FileDetails;
|
|
19
|
+
}
|
|
20
|
+
export interface SharedCardProps {
|
|
21
|
+
readonly disableOverlay?: boolean;
|
|
22
|
+
readonly resizeMode?: ImageResizeMode;
|
|
23
|
+
readonly featureFlags?: MediaFeatureFlags;
|
|
24
|
+
readonly appearance?: CardAppearance;
|
|
25
|
+
readonly dimensions?: CardDimensions;
|
|
26
|
+
readonly originalDimensions?: NumericalCardDimensions;
|
|
27
|
+
readonly actions?: Array<CardAction>;
|
|
28
|
+
readonly selectable?: boolean;
|
|
29
|
+
readonly selected?: boolean;
|
|
30
|
+
readonly alt?: string;
|
|
31
|
+
readonly testId?: string;
|
|
32
|
+
readonly titleBoxBgColor?: string;
|
|
33
|
+
readonly titleBoxIcon?: TitleBoxIcon;
|
|
34
|
+
}
|
|
35
|
+
export interface CardOnClickCallback {
|
|
36
|
+
(result: CardEvent, analyticsEvent?: UIAnalyticsEvent): void;
|
|
37
|
+
}
|
|
38
|
+
export interface CardEventProps {
|
|
39
|
+
readonly onClick?: CardOnClickCallback;
|
|
40
|
+
readonly onMouseEnter?: (result: CardEvent) => void;
|
|
41
|
+
/** Callback function to be called when video enters and exit fullscreen.
|
|
42
|
+
* `fullscreen = true` indicates video enters fullscreen
|
|
43
|
+
* `fullscreen = false` indicates video exits fullscreen
|
|
44
|
+
*/
|
|
45
|
+
readonly onFullscreenChange?: (fullscreen: boolean) => void;
|
|
46
|
+
}
|
|
47
|
+
export interface CardProps extends SharedCardProps, CardEventProps {
|
|
48
|
+
readonly mediaClient: MediaClient;
|
|
49
|
+
readonly identifier: Identifier;
|
|
50
|
+
readonly isLazy?: boolean;
|
|
51
|
+
readonly useInlinePlayer?: boolean;
|
|
52
|
+
readonly shouldOpenMediaViewer?: boolean;
|
|
53
|
+
readonly mediaViewerDataSource?: MediaViewerDataSource;
|
|
54
|
+
readonly contextId?: string;
|
|
55
|
+
readonly shouldEnableDownloadButton?: boolean;
|
|
56
|
+
readonly ssr?: SSR;
|
|
57
|
+
}
|
|
58
|
+
export interface CardState {
|
|
59
|
+
status: CardStatus;
|
|
60
|
+
isCardVisible: boolean;
|
|
61
|
+
shouldAutoplay?: boolean;
|
|
62
|
+
isPlayingFile: boolean;
|
|
63
|
+
mediaViewerSelectedItem?: Identifier;
|
|
64
|
+
fileState?: FileState;
|
|
65
|
+
progress?: number;
|
|
66
|
+
cardPreview?: CardPreview;
|
|
67
|
+
error?: MediaCardError;
|
|
68
|
+
cardRef: HTMLDivElement | null;
|
|
69
|
+
isBannedLocalPreview: boolean;
|
|
70
|
+
previewDidRender: boolean;
|
|
71
|
+
}
|
|
72
|
+
export { CardLoading } from './utils/lightCards/cardLoading';
|
|
73
|
+
export { CardError } from './utils/lightCards/cardError';
|
|
74
|
+
export { defaultImageCardDimensions } from './utils/cardDimensions';
|
|
75
|
+
export { fileCardImageViewSelector, fileCardImageViewSelectedSelector, } from './files/cardImageView/classnames';
|
|
76
|
+
export { inlinePlayerClassName } from './root/styles';
|
|
77
|
+
export { newFileExperienceClassName } from './root/card/cardConstants';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FileAttributes, PerformanceAttributes } from '@atlaskit/media-common';
|
|
2
|
+
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
+
import { SSRStatus } from '../../utils/analytics';
|
|
4
|
+
import { CardStatus } from '../..';
|
|
5
|
+
import { MediaCardError } from './../../errors';
|
|
6
|
+
export declare const fireOperationalEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, status: CardStatus, fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus, error?: MediaCardError) => void;
|
|
7
|
+
export declare const fireCommencedEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes) => void;
|
|
8
|
+
export declare const fireCopiedEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, fileId: string, cardRef: HTMLDivElement) => void;
|
|
9
|
+
export declare const fireScreenEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, fileAttributes: FileAttributes) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const newFileExperienceClassName = "new-file-experience-wrapper";
|