@atlaskit/media-card 74.1.5 → 74.1.6
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 +0 -12
- package/classnames/package.json +1 -8
- package/dist/cjs/root/card/getCardPreview/helpers.js +4 -4
- package/dist/cjs/root/card/getCardPreview/index.js +3 -5
- package/dist/cjs/root/card/index.js +4 -2
- package/dist/cjs/root/inlinePlayer.js +2 -2
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/cjs/utils/viewportDetector.js +4 -22
- 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 +3 -3
- package/dist/es2019/root/card/index.js +4 -2
- package/dist/es2019/root/inlinePlayer.js +2 -2
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/es2019/utils/viewportDetector.js +4 -22
- 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 +3 -3
- package/dist/esm/root/card/index.js +4 -2
- package/dist/esm/root/inlinePlayer.js +2 -2
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/esm/utils/viewportDetector.js +4 -22
- package/dist/esm/version.json +1 -1
- package/dist/types/root/card/getCardPreview/index.d.ts +2 -1
- package/in-product/package.json +1 -8
- package/package.json +3 -10
- package/types/package.json +1 -8
- package/dist/types-ts4.0/__tests_external__/index.d.ts +0 -1
- package/dist/types-ts4.0/__tests_external__/page-objects/MediaCard.d.ts +0 -8
- package/dist/types-ts4.0/actions.d.ts +0 -9
- package/dist/types-ts4.0/classnames.d.ts +0 -1
- package/dist/types-ts4.0/errors.d.ts +0 -41
- package/dist/types-ts4.0/files/cardImageView/cardImageViewWrapper.d.ts +0 -6
- package/dist/types-ts4.0/files/cardImageView/cardOverlay/cardOverlayComponents.d.ts +0 -8
- package/dist/types-ts4.0/files/cardImageView/cardOverlay/index.d.ts +0 -39
- package/dist/types-ts4.0/files/cardImageView/cardOverlay/styles.d.ts +0 -26
- package/dist/types-ts4.0/files/cardImageView/classnames.d.ts +0 -2
- package/dist/types-ts4.0/files/cardImageView/index.d.ts +0 -50
- package/dist/types-ts4.0/files/cardImageView/styles.d.ts +0 -24
- package/dist/types-ts4.0/files/index.d.ts +0 -2
- package/dist/types-ts4.0/in-product.d.ts +0 -1
- package/dist/types-ts4.0/index.d.ts +0 -77
- package/dist/types-ts4.0/root/card/cardAnalytics.d.ts +0 -9
- package/dist/types-ts4.0/root/card/cardConstants.d.ts +0 -1
- package/dist/types-ts4.0/root/card/cardLoader.d.ts +0 -6
- package/dist/types-ts4.0/root/card/cardState.d.ts +0 -5
- package/dist/types-ts4.0/root/card/getCardPreview/cache.d.ts +0 -19
- package/dist/types-ts4.0/root/card/getCardPreview/filePreviewStatus.d.ts +0 -5
- package/dist/types-ts4.0/root/card/getCardPreview/helpers.d.ts +0 -9
- package/dist/types-ts4.0/root/card/getCardPreview/index.d.ts +0 -56
- package/dist/types-ts4.0/root/card/getCardStatus.d.ts +0 -4
- package/dist/types-ts4.0/root/card/imageRefetchingAnalytics.d.ts +0 -10
- package/dist/types-ts4.0/root/card/index.d.ts +0 -58
- package/dist/types-ts4.0/root/cardView.d.ts +0 -80
- package/dist/types-ts4.0/root/cardViewWrapper.d.ts +0 -4
- package/dist/types-ts4.0/root/index.d.ts +0 -2
- package/dist/types-ts4.0/root/inline/loader.d.ts +0 -25
- package/dist/types-ts4.0/root/inline/mediaInlineCard.d.ts +0 -14
- package/dist/types-ts4.0/root/inlinePlayer.d.ts +0 -51
- package/dist/types-ts4.0/root/inlinePlayerLazy.d.ts +0 -2
- package/dist/types-ts4.0/root/inlinePlayerWrapper.d.ts +0 -4
- package/dist/types-ts4.0/root/media-card-analytics-error-boundary.d.ts +0 -10
- package/dist/types-ts4.0/root/styles.d.ts +0 -10
- package/dist/types-ts4.0/root/types.d.ts +0 -24
- package/dist/types-ts4.0/root/ui/actionsBar/actionsBar.d.ts +0 -5
- package/dist/types-ts4.0/root/ui/actionsBar/actionsBarWrapper.d.ts +0 -4
- package/dist/types-ts4.0/root/ui/actionsBar/styles.d.ts +0 -6
- package/dist/types-ts4.0/root/ui/actionsBar/types.d.ts +0 -10
- package/dist/types-ts4.0/root/ui/blanket/blanket.d.ts +0 -6
- package/dist/types-ts4.0/root/ui/blanket/styles.d.ts +0 -6
- package/dist/types-ts4.0/root/ui/common.d.ts +0 -23
- package/dist/types-ts4.0/root/ui/iconMessage/iconMessageWrapper.d.ts +0 -4
- package/dist/types-ts4.0/root/ui/iconMessage/index.d.ts +0 -8
- package/dist/types-ts4.0/root/ui/iconMessage/styles.d.ts +0 -5
- package/dist/types-ts4.0/root/ui/iconMessage/types.d.ts +0 -19
- package/dist/types-ts4.0/root/ui/iconWrapper/iconWrapper.d.ts +0 -4
- package/dist/types-ts4.0/root/ui/iconWrapper/styles.d.ts +0 -7
- package/dist/types-ts4.0/root/ui/iconWrapper/types.d.ts +0 -6
- package/dist/types-ts4.0/root/ui/imageRenderer/imageRenderer.d.ts +0 -15
- package/dist/types-ts4.0/root/ui/loadingRateLimited/styles.d.ts +0 -13
- package/dist/types-ts4.0/root/ui/newFileExperience/newFileExperienceWrapper.d.ts +0 -4
- package/dist/types-ts4.0/root/ui/newFileExperience/styles.d.ts +0 -5
- package/dist/types-ts4.0/root/ui/newFileExperience/types.d.ts +0 -23
- package/dist/types-ts4.0/root/ui/playButton/playButton.d.ts +0 -2
- package/dist/types-ts4.0/root/ui/playButton/playButtonBackground.d.ts +0 -3
- package/dist/types-ts4.0/root/ui/playButton/playButtonWrapper.d.ts +0 -3
- package/dist/types-ts4.0/root/ui/playButton/styles.d.ts +0 -5
- package/dist/types-ts4.0/root/ui/progressBar/progressBar.d.ts +0 -10
- package/dist/types-ts4.0/root/ui/progressBar/styledBar.d.ts +0 -4
- package/dist/types-ts4.0/root/ui/progressBar/styles.d.ts +0 -7
- package/dist/types-ts4.0/root/ui/progressBar/types.d.ts +0 -7
- package/dist/types-ts4.0/root/ui/styles.d.ts +0 -11
- package/dist/types-ts4.0/root/ui/tickBox/styles.d.ts +0 -7
- package/dist/types-ts4.0/root/ui/tickBox/tickBox.d.ts +0 -3
- package/dist/types-ts4.0/root/ui/tickBox/tickBoxWrapper.d.ts +0 -4
- package/dist/types-ts4.0/root/ui/tickBox/types.d.ts +0 -4
- package/dist/types-ts4.0/root/ui/titleBox/failedTitleBox.d.ts +0 -3
- package/dist/types-ts4.0/root/ui/titleBox/styles.d.ts +0 -15
- package/dist/types-ts4.0/root/ui/titleBox/titleBox.d.ts +0 -4
- package/dist/types-ts4.0/root/ui/titleBox/titleBoxComponents.d.ts +0 -8
- package/dist/types-ts4.0/root/ui/titleBox/types.d.ts +0 -32
- package/dist/types-ts4.0/styles/animations.d.ts +0 -1
- package/dist/types-ts4.0/styles/config.d.ts +0 -1
- package/dist/types-ts4.0/styles/easing.d.ts +0 -2
- package/dist/types-ts4.0/styles/getSelectedBorderStyle.d.ts +0 -3
- package/dist/types-ts4.0/styles/index.d.ts +0 -9
- package/dist/types-ts4.0/styles/mixins.d.ts +0 -21
- package/dist/types-ts4.0/types.d.ts +0 -25
- package/dist/types-ts4.0/utils/analytics.d.ts +0 -78
- package/dist/types-ts4.0/utils/breakpoint.d.ts +0 -11
- package/dist/types-ts4.0/utils/cardActions/cardActionButton.d.ts +0 -4
- package/dist/types-ts4.0/utils/cardActions/cardActionIconButton.d.ts +0 -12
- package/dist/types-ts4.0/utils/cardActions/cardActionsDropdownMenu.d.ts +0 -14
- package/dist/types-ts4.0/utils/cardActions/cardActionsView.d.ts +0 -16
- package/dist/types-ts4.0/utils/cardActions/index.d.ts +0 -7
- package/dist/types-ts4.0/utils/cardActions/styles.d.ts +0 -18
- package/dist/types-ts4.0/utils/cardDimensions.d.ts +0 -53
- package/dist/types-ts4.0/utils/containsPixelUnit.d.ts +0 -1
- package/dist/types-ts4.0/utils/dimensionComparer.d.ts +0 -3
- package/dist/types-ts4.0/utils/document.d.ts +0 -2
- package/dist/types-ts4.0/utils/errorIcon/index.d.ts +0 -12
- package/dist/types-ts4.0/utils/errorIcon/styles.d.ts +0 -1
- package/dist/types-ts4.0/utils/fileIcon/index.d.ts +0 -12
- package/dist/types-ts4.0/utils/fileIcon/styles.d.ts +0 -1
- package/dist/types-ts4.0/utils/generateUniqueId.d.ts +0 -1
- package/dist/types-ts4.0/utils/getCSSUnitValue.d.ts +0 -1
- package/dist/types-ts4.0/utils/getDataURIDimension.d.ts +0 -9
- package/dist/types-ts4.0/utils/getElementDimension.d.ts +0 -2
- package/dist/types-ts4.0/utils/getErrorMessage.d.ts +0 -2
- package/dist/types-ts4.0/utils/getMediaCardCursor.d.ts +0 -6
- package/dist/types-ts4.0/utils/globalScope/getSSRData.d.ts +0 -3
- package/dist/types-ts4.0/utils/globalScope/globalScope.d.ts +0 -21
- package/dist/types-ts4.0/utils/globalScope/index.d.ts +0 -4
- package/dist/types-ts4.0/utils/globalScope/types.d.ts +0 -8
- package/dist/types-ts4.0/utils/index.d.ts +0 -15
- package/dist/types-ts4.0/utils/isRetina.d.ts +0 -1
- package/dist/types-ts4.0/utils/isValidPercentageUnit.d.ts +0 -1
- package/dist/types-ts4.0/utils/lightCards/cardError.d.ts +0 -12
- package/dist/types-ts4.0/utils/lightCards/cardLoading.d.ts +0 -5
- package/dist/types-ts4.0/utils/lightCards/getDimensionsWithDefault.d.ts +0 -2
- package/dist/types-ts4.0/utils/lightCards/lightCardWrappers.d.ts +0 -5
- package/dist/types-ts4.0/utils/lightCards/styles.d.ts +0 -4
- package/dist/types-ts4.0/utils/lightCards/types.d.ts +0 -15
- package/dist/types-ts4.0/utils/mediaTypeIcon/iconWrapper.d.ts +0 -4
- package/dist/types-ts4.0/utils/mediaTypeIcon/index.d.ts +0 -10
- package/dist/types-ts4.0/utils/mediaTypeIcon/styles.d.ts +0 -2
- package/dist/types-ts4.0/utils/mediaTypeIcon/types.d.ts +0 -6
- package/dist/types-ts4.0/utils/metadata.d.ts +0 -2
- package/dist/types-ts4.0/utils/objectURLCache.d.ts +0 -11
- package/dist/types-ts4.0/utils/preventClickThrough.d.ts +0 -8
- package/dist/types-ts4.0/utils/printScript.d.ts +0 -2
- package/dist/types-ts4.0/utils/progressBar/index.d.ts +0 -9
- package/dist/types-ts4.0/utils/progressBar/styles.d.ts +0 -1
- package/dist/types-ts4.0/utils/resizeModeToMediaImageProps.d.ts +0 -5
- package/dist/types-ts4.0/utils/shouldDisplayImageThumbnail.d.ts +0 -3
- package/dist/types-ts4.0/utils/ufoExperiences.d.ts +0 -7
- package/dist/types-ts4.0/utils/videoSnapshot.d.ts +0 -1
- package/dist/types-ts4.0/utils/viewportDetector.d.ts +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
-
## 74.1.5
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
8
|
-
|
|
9
|
-
## 74.1.4
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- [`80a1ca7b589`](https://bitbucket.org/atlassian/atlassian-frontend/commits/80a1ca7b589) - Fix compatility issue of Intersection Observer API in old browser versions
|
|
14
|
-
|
|
15
3
|
## 74.1.3
|
|
16
4
|
|
|
17
5
|
### Patch Changes
|
package/classnames/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/classnames.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/classnames.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/classnames.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.0 <4.5": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.0/classnames.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/classnames.d.ts"
|
|
15
8
|
}
|
|
@@ -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);
|
|
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);
|
|
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);
|
|
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);
|
|
201
201
|
|
|
202
202
|
case 10:
|
|
203
203
|
case "end":
|
|
@@ -249,6 +249,7 @@ exports.getCardPreview = getCardPreview;
|
|
|
249
249
|
var shouldResolvePreview = function shouldResolvePreview(_ref3) {
|
|
250
250
|
var status = _ref3.status,
|
|
251
251
|
fileState = _ref3.fileState,
|
|
252
|
+
prevDimensions = _ref3.prevDimensions,
|
|
252
253
|
dimensions = _ref3.dimensions,
|
|
253
254
|
identifier = _ref3.identifier,
|
|
254
255
|
fileImageMode = _ref3.fileImageMode,
|
|
@@ -256,10 +257,7 @@ var shouldResolvePreview = function shouldResolvePreview(_ref3) {
|
|
|
256
257
|
isBannedLocalPreview = _ref3.isBannedLocalPreview,
|
|
257
258
|
featureFlags = _ref3.featureFlags;
|
|
258
259
|
var statusIsPreviewable = (0, _filePreviewStatus.isPreviewableStatus)(status, (0, _filePreviewStatus.extractFilePreviewStatus)(fileState, isBannedLocalPreview, featureFlags));
|
|
259
|
-
|
|
260
|
-
var cardPreview = _cache.default.get(identifier.id, fileImageMode);
|
|
261
|
-
|
|
262
|
-
var dimensionsAreBigger = (0, _dimensionComparer.isBigger)(cardPreview === null || cardPreview === void 0 ? void 0 : cardPreview.dimensions, dimensions);
|
|
260
|
+
var dimensionsAreBigger = (0, _dimensionComparer.isBigger)(prevDimensions, dimensions);
|
|
263
261
|
return statusIsPreviewable && (!hasCardPreview || dimensionsAreBigger);
|
|
264
262
|
};
|
|
265
263
|
|
|
@@ -280,7 +278,7 @@ var getSSRCardPreview = function getSSRCardPreview(ssr, mediaClient, id, params,
|
|
|
280
278
|
};
|
|
281
279
|
} catch (e) {
|
|
282
280
|
var reason = ssr === 'server' ? 'ssr-server-uri' : 'ssr-client-uri';
|
|
283
|
-
throw new _errors.SsrPreviewError(reason, e
|
|
281
|
+
throw new _errors.SsrPreviewError(reason, e);
|
|
284
282
|
}
|
|
285
283
|
};
|
|
286
284
|
|
|
@@ -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.6";
|
|
94
94
|
|
|
95
95
|
var CardBase = /*#__PURE__*/function (_Component) {
|
|
96
96
|
(0, _inherits2.default)(CardBase, _Component);
|
|
@@ -805,7 +805,8 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
805
805
|
key: "componentDidUpdate",
|
|
806
806
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
807
807
|
var prevMediaClient = prevProps.mediaClient,
|
|
808
|
-
prevIdentifier = prevProps.identifier
|
|
808
|
+
prevIdentifier = prevProps.identifier,
|
|
809
|
+
prevDimensions = prevProps.dimensions;
|
|
809
810
|
var prevIsCardVisible = prevState.isCardVisible;
|
|
810
811
|
var _this$props13 = this.props,
|
|
811
812
|
mediaClient = _this$props13.mediaClient,
|
|
@@ -858,6 +859,7 @@ var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
858
859
|
if ((0, _mediaClient2.isFileIdentifier)(identifier) && fileState && (0, _getCardPreview.shouldResolvePreview)({
|
|
859
860
|
status: status,
|
|
860
861
|
fileState: fileState,
|
|
862
|
+
prevDimensions: prevDimensions,
|
|
861
863
|
dimensions: dimensions,
|
|
862
864
|
identifier: identifier,
|
|
863
865
|
fileImageMode: fileImageMode,
|
|
@@ -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) {
|
|
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) {
|
|
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.6";
|
|
26
26
|
var concurrentExperience;
|
|
27
27
|
|
|
28
28
|
var getExperience = function getExperience(id) {
|
|
@@ -53,28 +53,10 @@ var ViewportObserver = function ViewportObserver(_ref) {
|
|
|
53
53
|
cardEl = _ref.cardEl,
|
|
54
54
|
children = _ref.children;
|
|
55
55
|
(0, _react.useEffect)(function () {
|
|
56
|
-
var intersectionObserver
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
root: (0, _document.default)(),
|
|
61
|
-
rootMargin: "".concat(ABS_VIEWPORT_ANCHOR_OFFSET_TOP, "px")
|
|
62
|
-
});
|
|
63
|
-
} catch (error) {
|
|
64
|
-
var _error$message;
|
|
65
|
-
|
|
66
|
-
var errorMessage = "Failed to construct 'IntersectionObserver': member root is not of type Element";
|
|
67
|
-
|
|
68
|
-
if ((_error$message = error.message) !== null && _error$message !== void 0 && _error$message.includes(errorMessage)) {
|
|
69
|
-
intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
70
|
-
root: null,
|
|
71
|
-
rootMargin: "".concat(ABS_VIEWPORT_ANCHOR_OFFSET_TOP, "px")
|
|
72
|
-
});
|
|
73
|
-
} else {
|
|
74
|
-
throw error;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
56
|
+
var intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
57
|
+
root: (0, _document.default)(),
|
|
58
|
+
rootMargin: "".concat(ABS_VIEWPORT_ANCHOR_OFFSET_TOP, "px")
|
|
59
|
+
});
|
|
78
60
|
cardEl && intersectionObserver.observe(cardEl);
|
|
79
61
|
return function () {
|
|
80
62
|
intersectionObserver.disconnect();
|
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);
|
|
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);
|
|
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);
|
|
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);
|
|
82
82
|
}
|
|
83
83
|
};
|
|
@@ -153,6 +153,7 @@ export const getCardPreview = async ({
|
|
|
153
153
|
export const shouldResolvePreview = ({
|
|
154
154
|
status,
|
|
155
155
|
fileState,
|
|
156
|
+
prevDimensions,
|
|
156
157
|
dimensions,
|
|
157
158
|
identifier,
|
|
158
159
|
fileImageMode,
|
|
@@ -161,8 +162,7 @@ export const shouldResolvePreview = ({
|
|
|
161
162
|
featureFlags
|
|
162
163
|
}) => {
|
|
163
164
|
const statusIsPreviewable = isPreviewableStatus(status, extractFilePreviewStatus(fileState, isBannedLocalPreview, featureFlags));
|
|
164
|
-
const
|
|
165
|
-
const dimensionsAreBigger = isBigger(cardPreview === null || cardPreview === void 0 ? void 0 : cardPreview.dimensions, dimensions);
|
|
165
|
+
const dimensionsAreBigger = isBigger(prevDimensions, dimensions);
|
|
166
166
|
return statusIsPreviewable && (!hasCardPreview || dimensionsAreBigger);
|
|
167
167
|
};
|
|
168
168
|
export const getSSRCardPreview = (ssr, mediaClient, id, params, mediaBlobUrlAttrs) => {
|
|
@@ -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);
|
|
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.6";
|
|
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)
|
|
@@ -744,7 +744,8 @@ export class CardBase extends Component {
|
|
|
744
744
|
componentDidUpdate(prevProps, prevState) {
|
|
745
745
|
const {
|
|
746
746
|
mediaClient: prevMediaClient,
|
|
747
|
-
identifier: prevIdentifier
|
|
747
|
+
identifier: prevIdentifier,
|
|
748
|
+
dimensions: prevDimensions
|
|
748
749
|
} = prevProps;
|
|
749
750
|
const {
|
|
750
751
|
isCardVisible: prevIsCardVisible
|
|
@@ -804,6 +805,7 @@ export class CardBase extends Component {
|
|
|
804
805
|
if (isFileIdentifier(identifier) && fileState && shouldResolvePreview({
|
|
805
806
|
status,
|
|
806
807
|
fileState,
|
|
808
|
+
prevDimensions,
|
|
807
809
|
dimensions,
|
|
808
810
|
identifier,
|
|
809
811
|
fileImageMode,
|
|
@@ -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) {
|
|
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) {
|
|
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.6";
|
|
7
7
|
let concurrentExperience;
|
|
8
8
|
|
|
9
9
|
const getExperience = id => {
|
|
@@ -18,28 +18,10 @@ const ViewportObserver = ({
|
|
|
18
18
|
children
|
|
19
19
|
}) => {
|
|
20
20
|
useEffect(() => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
root: getDocument(),
|
|
26
|
-
rootMargin: `${ABS_VIEWPORT_ANCHOR_OFFSET_TOP}px`
|
|
27
|
-
});
|
|
28
|
-
} catch (error) {
|
|
29
|
-
var _error$message;
|
|
30
|
-
|
|
31
|
-
const errorMessage = "Failed to construct 'IntersectionObserver': member root is not of type Element";
|
|
32
|
-
|
|
33
|
-
if ((_error$message = error.message) !== null && _error$message !== void 0 && _error$message.includes(errorMessage)) {
|
|
34
|
-
intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
35
|
-
root: null,
|
|
36
|
-
rootMargin: `${ABS_VIEWPORT_ANCHOR_OFFSET_TOP}px`
|
|
37
|
-
});
|
|
38
|
-
} else {
|
|
39
|
-
throw error;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
21
|
+
const intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
22
|
+
root: getDocument(),
|
|
23
|
+
rootMargin: `${ABS_VIEWPORT_ANCHOR_OFFSET_TOP}px`
|
|
24
|
+
});
|
|
43
25
|
cardEl && intersectionObserver.observe(cardEl);
|
|
44
26
|
return () => {
|
|
45
27
|
intersectionObserver.disconnect();
|
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);
|
|
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);
|
|
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);
|
|
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);
|
|
182
182
|
|
|
183
183
|
case 10:
|
|
184
184
|
case "end":
|
|
@@ -197,6 +197,7 @@ export var getCardPreview = /*#__PURE__*/function () {
|
|
|
197
197
|
export var shouldResolvePreview = function shouldResolvePreview(_ref3) {
|
|
198
198
|
var status = _ref3.status,
|
|
199
199
|
fileState = _ref3.fileState,
|
|
200
|
+
prevDimensions = _ref3.prevDimensions,
|
|
200
201
|
dimensions = _ref3.dimensions,
|
|
201
202
|
identifier = _ref3.identifier,
|
|
202
203
|
fileImageMode = _ref3.fileImageMode,
|
|
@@ -204,8 +205,7 @@ export var shouldResolvePreview = function shouldResolvePreview(_ref3) {
|
|
|
204
205
|
isBannedLocalPreview = _ref3.isBannedLocalPreview,
|
|
205
206
|
featureFlags = _ref3.featureFlags;
|
|
206
207
|
var statusIsPreviewable = isPreviewableStatus(status, extractFilePreviewStatus(fileState, isBannedLocalPreview, featureFlags));
|
|
207
|
-
var
|
|
208
|
-
var dimensionsAreBigger = isBigger(cardPreview === null || cardPreview === void 0 ? void 0 : cardPreview.dimensions, dimensions);
|
|
208
|
+
var dimensionsAreBigger = isBigger(prevDimensions, dimensions);
|
|
209
209
|
return statusIsPreviewable && (!hasCardPreview || dimensionsAreBigger);
|
|
210
210
|
};
|
|
211
211
|
export var getSSRCardPreview = function getSSRCardPreview(ssr, mediaClient, id, params, mediaBlobUrlAttrs) {
|
|
@@ -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);
|
|
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.6";
|
|
47
47
|
export var CardBase = /*#__PURE__*/function (_Component) {
|
|
48
48
|
_inherits(CardBase, _Component);
|
|
49
49
|
|
|
@@ -789,7 +789,8 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
789
789
|
key: "componentDidUpdate",
|
|
790
790
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
791
791
|
var prevMediaClient = prevProps.mediaClient,
|
|
792
|
-
prevIdentifier = prevProps.identifier
|
|
792
|
+
prevIdentifier = prevProps.identifier,
|
|
793
|
+
prevDimensions = prevProps.dimensions;
|
|
793
794
|
var prevIsCardVisible = prevState.isCardVisible;
|
|
794
795
|
var _this$props13 = this.props,
|
|
795
796
|
mediaClient = _this$props13.mediaClient,
|
|
@@ -842,6 +843,7 @@ export var CardBase = /*#__PURE__*/function (_Component) {
|
|
|
842
843
|
if (isFileIdentifier(identifier) && fileState && shouldResolvePreview({
|
|
843
844
|
status: status,
|
|
844
845
|
fileState: fileState,
|
|
846
|
+
prevDimensions: prevDimensions,
|
|
845
847
|
dimensions: dimensions,
|
|
846
848
|
identifier: identifier,
|
|
847
849
|
fileImageMode: fileImageMode,
|
|
@@ -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) {
|
|
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) {
|
|
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.6";
|
|
13
13
|
var concurrentExperience;
|
|
14
14
|
|
|
15
15
|
var getExperience = function getExperience(id) {
|
|
@@ -36,28 +36,10 @@ var ViewportObserver = function ViewportObserver(_ref) {
|
|
|
36
36
|
cardEl = _ref.cardEl,
|
|
37
37
|
children = _ref.children;
|
|
38
38
|
useEffect(function () {
|
|
39
|
-
var intersectionObserver
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
root: getDocument(),
|
|
44
|
-
rootMargin: "".concat(ABS_VIEWPORT_ANCHOR_OFFSET_TOP, "px")
|
|
45
|
-
});
|
|
46
|
-
} catch (error) {
|
|
47
|
-
var _error$message;
|
|
48
|
-
|
|
49
|
-
var errorMessage = "Failed to construct 'IntersectionObserver': member root is not of type Element";
|
|
50
|
-
|
|
51
|
-
if ((_error$message = error.message) !== null && _error$message !== void 0 && _error$message.includes(errorMessage)) {
|
|
52
|
-
intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
53
|
-
root: null,
|
|
54
|
-
rootMargin: "".concat(ABS_VIEWPORT_ANCHOR_OFFSET_TOP, "px")
|
|
55
|
-
});
|
|
56
|
-
} else {
|
|
57
|
-
throw error;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
39
|
+
var intersectionObserver = new IntersectionObserver(createIntersectionObserverCallback(onVisible), {
|
|
40
|
+
root: getDocument(),
|
|
41
|
+
rootMargin: "".concat(ABS_VIEWPORT_ANCHOR_OFFSET_TOP, "px")
|
|
42
|
+
});
|
|
61
43
|
cardEl && intersectionObserver.observe(cardEl);
|
|
62
44
|
return function () {
|
|
63
45
|
intersectionObserver.disconnect();
|
package/dist/esm/version.json
CHANGED
|
@@ -37,9 +37,10 @@ export declare type CardPreviewParams = {
|
|
|
37
37
|
* hence the use of the optional callback onLocalPreviewError
|
|
38
38
|
*/
|
|
39
39
|
export declare const getCardPreview: ({ mediaClient, id, dimensions, filePreview, onLocalPreviewError, isRemotePreviewReady, imageUrlParams, mediaBlobUrlAttrs, createAnalyticsEvent, featureFlags, }: CardPreviewParams) => Promise<CardPreview>;
|
|
40
|
-
export declare const shouldResolvePreview: ({ status, fileState, dimensions, identifier, fileImageMode, hasCardPreview, isBannedLocalPreview, featureFlags, }: {
|
|
40
|
+
export declare const shouldResolvePreview: ({ status, fileState, prevDimensions, dimensions, identifier, fileImageMode, hasCardPreview, isBannedLocalPreview, featureFlags, }: {
|
|
41
41
|
status: CardStatus;
|
|
42
42
|
fileState: FileState;
|
|
43
|
+
prevDimensions?: CardDimensions | undefined;
|
|
43
44
|
dimensions?: CardDimensions | undefined;
|
|
44
45
|
identifier: FileIdentifier;
|
|
45
46
|
fileImageMode?: ImageResizeMode | undefined;
|
package/in-product/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/in-product.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/in-product.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/in-product.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.0 <4.5": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.0/in-product.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/in-product.d.ts"
|
|
15
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "74.1.
|
|
3
|
+
"version": "74.1.6",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,13 +12,6 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
-
"typesVersions": {
|
|
16
|
-
">=4.0 <4.5": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.0/*"
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
15
|
"sideEffects": false,
|
|
23
16
|
"atlaskit:src": "src/index.ts",
|
|
24
17
|
"af:exports": {
|
|
@@ -38,7 +31,7 @@
|
|
|
38
31
|
"dependencies": {
|
|
39
32
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
40
33
|
"@atlaskit/dropdown-menu": "^11.5.0",
|
|
41
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
34
|
+
"@atlaskit/editor-shared-styles": "^2.1.0",
|
|
42
35
|
"@atlaskit/icon": "^21.10.0",
|
|
43
36
|
"@atlaskit/in-product-testing": "^0.1.0",
|
|
44
37
|
"@atlaskit/media-client": "^17.1.0",
|
|
@@ -90,7 +83,7 @@
|
|
|
90
83
|
"react": "^16.8.0",
|
|
91
84
|
"react-dom": "^16.8.0",
|
|
92
85
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
93
|
-
"typescript": "4.
|
|
86
|
+
"typescript": "4.3.5",
|
|
94
87
|
"uuid": "^3.1.0",
|
|
95
88
|
"wait-for-expect": "^1.2.0"
|
|
96
89
|
},
|
package/types/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/types.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/types.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/types.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.0 <4.5": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.0/types.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/types.d.ts"
|
|
15
8
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { MediaCardPageObject } from './page-objects/MediaCard';
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
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>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { fileCardImageViewSelector, fileCardImageViewSelectedSelector, } from './files/cardImageView/classnames';
|