@atlaskit/media-card 77.12.4 → 78.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/cjs/card/card.js +20 -1039
- package/dist/cjs/card/cardLoader.js +2 -2
- package/dist/cjs/card/cardView.js +255 -417
- package/dist/cjs/card/cardWithMediaClient.js +5 -9
- package/dist/cjs/card/{v2/cardviews → cardviews}/cardViewWrapper.js +8 -8
- package/dist/cjs/card/{v2/cardviews → cardviews}/errorCardView.js +6 -6
- package/dist/cjs/card/{v2/cardviews → cardviews}/iconCardView.js +5 -5
- package/dist/cjs/card/{v2/cardviews → cardviews}/imageCardView.js +5 -5
- package/dist/cjs/card/{v2/cardviews → cardviews}/index.js +2 -2
- package/dist/cjs/card/{v2/cardviews → cardviews}/loadingCardView.js +3 -3
- package/dist/cjs/card/{v2/cardviews → cardviews}/processingCardView.js +4 -4
- package/dist/cjs/card/{v2/cardviews → cardviews}/videoCardView.js +7 -7
- package/dist/cjs/card/{v2/externalImageCard.js → externalImageCard.js} +11 -11
- package/dist/cjs/card/{v2/fileCard.js → fileCard.js} +18 -18
- package/dist/cjs/card/index.js +2 -2
- package/dist/cjs/card/inlinePlayer.js +184 -267
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/{v2/svgView → svgView}/svgView.js +9 -9
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +20 -1023
- package/dist/es2019/card/cardLoader.js +2 -2
- package/dist/es2019/card/cardView.js +252 -403
- package/dist/es2019/card/cardWithMediaClient.js +6 -10
- package/dist/es2019/card/{v2/cardviews → cardviews}/cardViewWrapper.js +8 -8
- package/dist/es2019/card/{v2/cardviews → cardviews}/errorCardView.js +6 -6
- package/dist/es2019/card/{v2/cardviews → cardviews}/iconCardView.js +5 -5
- package/dist/es2019/card/{v2/cardviews → cardviews}/imageCardView.js +5 -5
- package/dist/es2019/card/{v2/cardviews → cardviews}/index.js +2 -2
- package/dist/es2019/card/{v2/cardviews → cardviews}/loadingCardView.js +3 -3
- package/dist/es2019/card/{v2/cardviews → cardviews}/processingCardView.js +4 -4
- package/dist/es2019/card/{v2/cardviews → cardviews}/videoCardView.js +7 -7
- package/dist/es2019/card/{v2/externalImageCard.js → externalImageCard.js} +11 -11
- package/dist/es2019/card/{v2/fileCard.js → fileCard.js} +18 -18
- package/dist/es2019/card/index.js +1 -1
- package/dist/es2019/card/inlinePlayer.js +127 -208
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/{v2/svgView → svgView}/svgView.js +9 -9
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +21 -1040
- package/dist/esm/card/cardLoader.js +2 -2
- package/dist/esm/card/cardView.js +251 -416
- package/dist/esm/card/cardWithMediaClient.js +6 -10
- package/dist/esm/card/{v2/cardviews → cardviews}/cardViewWrapper.js +8 -8
- package/dist/esm/card/{v2/cardviews → cardviews}/errorCardView.js +6 -6
- package/dist/esm/card/{v2/cardviews → cardviews}/iconCardView.js +5 -5
- package/dist/esm/card/{v2/cardviews → cardviews}/imageCardView.js +5 -5
- package/dist/esm/card/{v2/cardviews → cardviews}/index.js +2 -2
- package/dist/esm/card/{v2/cardviews → cardviews}/loadingCardView.js +3 -3
- package/dist/esm/card/{v2/cardviews → cardviews}/processingCardView.js +4 -4
- package/dist/esm/card/{v2/cardviews → cardviews}/videoCardView.js +7 -7
- package/dist/esm/card/{v2/externalImageCard.js → externalImageCard.js} +11 -11
- package/dist/esm/card/{v2/fileCard.js → fileCard.js} +18 -18
- package/dist/esm/card/index.js +1 -1
- package/dist/esm/card/inlinePlayer.js +185 -269
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/{v2/svgView → svgView}/svgView.js +9 -9
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/card.d.ts +5 -66
- package/dist/types/card/cardLoader.d.ts +1 -1
- package/dist/types/card/cardView.d.ts +23 -45
- package/dist/types/card/cardWithMediaClient.d.ts +1 -1
- package/dist/types/card/{v2/cardviews → cardviews}/cardViewWrapper.d.ts +3 -3
- package/dist/types/card/{v2/cardviews → cardviews}/errorCardView.d.ts +1 -1
- package/dist/{types-ts4.5/card/v2 → types/card}/cardviews/iconCardView.d.ts +1 -1
- package/dist/{types-ts4.5/card/v2 → types/card}/cardviews/imageCardView.d.ts +1 -1
- package/dist/{types-ts4.5/card/v2 → types/card}/cardviews/index.d.ts +5 -5
- package/dist/types/card/{v2/cardviews → cardviews}/videoCardView.d.ts +1 -1
- package/dist/types/card/{v2/externalImageCard.d.ts → externalImageCard.d.ts} +1 -1
- package/dist/types/card/{v2/fileCard.d.ts → fileCard.d.ts} +2 -2
- package/dist/types/card/index.d.ts +1 -1
- package/dist/types/card/inlinePlayer.d.ts +2 -31
- package/dist/types/card/{v2/svgView → svgView}/errors.d.ts +1 -1
- package/dist/{types-ts4.5/card/v2 → types/card}/svgView/svgView.d.ts +2 -2
- package/dist/types-ts4.5/card/card.d.ts +5 -66
- package/dist/types-ts4.5/card/cardLoader.d.ts +1 -1
- package/dist/types-ts4.5/card/cardView.d.ts +23 -45
- package/dist/types-ts4.5/card/cardWithMediaClient.d.ts +1 -1
- package/dist/types-ts4.5/card/{v2/cardviews → cardviews}/cardViewWrapper.d.ts +3 -3
- package/dist/types-ts4.5/card/{v2/cardviews → cardviews}/errorCardView.d.ts +1 -1
- package/dist/{types/card/v2 → types-ts4.5/card}/cardviews/iconCardView.d.ts +1 -1
- package/dist/{types/card/v2 → types-ts4.5/card}/cardviews/imageCardView.d.ts +1 -1
- package/dist/{types/card/v2 → types-ts4.5/card}/cardviews/index.d.ts +5 -5
- package/dist/types-ts4.5/card/{v2/cardviews → cardviews}/videoCardView.d.ts +1 -1
- package/dist/types-ts4.5/card/{v2/externalImageCard.d.ts → externalImageCard.d.ts} +1 -1
- package/dist/types-ts4.5/card/{v2/fileCard.d.ts → fileCard.d.ts} +2 -2
- package/dist/types-ts4.5/card/index.d.ts +1 -1
- package/dist/types-ts4.5/card/inlinePlayer.d.ts +2 -31
- package/dist/types-ts4.5/card/{v2/svgView → svgView}/errors.d.ts +1 -1
- package/dist/{types/card/v2 → types-ts4.5/card}/svgView/svgView.d.ts +2 -2
- package/package.json +1 -4
- package/dist/cjs/card/cardSwitcher.js +0 -15
- package/dist/cjs/card/v2/cardV2.js +0 -41
- package/dist/cjs/card/v2/cardV2Loader.js +0 -36
- package/dist/cjs/card/v2/cardViewV2.js +0 -298
- package/dist/cjs/card/v2/cardWithMediaClientV2.js +0 -34
- package/dist/cjs/card/v2/inlinePlayerLazyV2.js +0 -35
- package/dist/cjs/card/v2/inlinePlayerV2.js +0 -224
- package/dist/es2019/card/cardSwitcher.js +0 -8
- package/dist/es2019/card/v2/cardV2.js +0 -33
- package/dist/es2019/card/v2/cardV2Loader.js +0 -18
- package/dist/es2019/card/v2/cardViewV2.js +0 -294
- package/dist/es2019/card/v2/cardWithMediaClientV2.js +0 -25
- package/dist/es2019/card/v2/inlinePlayerLazyV2.js +0 -10
- package/dist/es2019/card/v2/inlinePlayerV2.js +0 -166
- package/dist/esm/card/cardSwitcher.js +0 -8
- package/dist/esm/card/v2/cardV2.js +0 -34
- package/dist/esm/card/v2/cardV2Loader.js +0 -24
- package/dist/esm/card/v2/cardViewV2.js +0 -290
- package/dist/esm/card/v2/cardWithMediaClientV2.js +0 -27
- package/dist/esm/card/v2/inlinePlayerLazyV2.js +0 -23
- package/dist/esm/card/v2/inlinePlayerV2.js +0 -214
- package/dist/types/card/cardSwitcher.d.ts +0 -4
- package/dist/types/card/v2/cardV2.d.ts +0 -7
- package/dist/types/card/v2/cardV2Loader.d.ts +0 -4
- package/dist/types/card/v2/cardViewV2.d.ts +0 -59
- package/dist/types/card/v2/cardWithMediaClientV2.d.ts +0 -3
- package/dist/types/card/v2/inlinePlayerLazyV2.d.ts +0 -2
- package/dist/types/card/v2/inlinePlayerV2.d.ts +0 -24
- package/dist/types-ts4.5/card/cardSwitcher.d.ts +0 -4
- package/dist/types-ts4.5/card/v2/cardV2.d.ts +0 -7
- package/dist/types-ts4.5/card/v2/cardV2Loader.d.ts +0 -4
- package/dist/types-ts4.5/card/v2/cardViewV2.d.ts +0 -59
- package/dist/types-ts4.5/card/v2/cardWithMediaClientV2.d.ts +0 -3
- package/dist/types-ts4.5/card/v2/inlinePlayerLazyV2.d.ts +0 -2
- package/dist/types-ts4.5/card/v2/inlinePlayerV2.d.ts +0 -24
- /package/dist/cjs/card/{v2/performance.js → performance.js} +0 -0
- /package/dist/cjs/card/{v2/svgView → svgView}/errors.js +0 -0
- /package/dist/cjs/card/{v2/svgView → svgView}/helpers.js +0 -0
- /package/dist/cjs/card/{v2/svgView → svgView}/index.js +0 -0
- /package/dist/es2019/card/{v2/performance.js → performance.js} +0 -0
- /package/dist/es2019/card/{v2/svgView → svgView}/errors.js +0 -0
- /package/dist/es2019/card/{v2/svgView → svgView}/helpers.js +0 -0
- /package/dist/es2019/card/{v2/svgView → svgView}/index.js +0 -0
- /package/dist/esm/card/{v2/performance.js → performance.js} +0 -0
- /package/dist/esm/card/{v2/svgView → svgView}/errors.js +0 -0
- /package/dist/esm/card/{v2/svgView → svgView}/helpers.js +0 -0
- /package/dist/esm/card/{v2/svgView → svgView}/index.js +0 -0
- /package/dist/types/card/{v2/cardviews → cardviews}/loadingCardView.d.ts +0 -0
- /package/dist/types/card/{v2/cardviews → cardviews}/processingCardView.d.ts +0 -0
- /package/dist/types/card/{v2/performance.d.ts → performance.d.ts} +0 -0
- /package/dist/types/card/{v2/svgView → svgView}/helpers.d.ts +0 -0
- /package/dist/types/card/{v2/svgView → svgView}/index.d.ts +0 -0
- /package/dist/types-ts4.5/card/{v2/cardviews → cardviews}/loadingCardView.d.ts +0 -0
- /package/dist/types-ts4.5/card/{v2/cardviews → cardviews}/processingCardView.d.ts +0 -0
- /package/dist/types-ts4.5/card/{v2/performance.d.ts → performance.d.ts} +0 -0
- /package/dist/types-ts4.5/card/{v2/svgView → svgView}/helpers.d.ts +0 -0
- /package/dist/types-ts4.5/card/{v2/svgView → svgView}/index.d.ts +0 -0
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
-
import React, { useRef, useState, useEffect } from 'react';
|
|
6
|
-
import { globalMediaEventEmitter } from '@atlaskit/media-client';
|
|
7
|
-
import { CustomMediaPlayer, InactivityDetector } from '@atlaskit/media-ui';
|
|
8
|
-
import { defaultImageCardDimensions } from '../../utils';
|
|
9
|
-
import { CardLoading } from '../../utils/lightCards/cardLoading';
|
|
10
|
-
import { ProgressBar } from '../ui/progressBar/progressBar';
|
|
11
|
-
import { InlinePlayerWrapper } from '../inlinePlayerWrapper';
|
|
12
|
-
import { useBreakpoint } from '../useBreakpoint';
|
|
13
|
-
import { useFileState, useMediaClient } from '@atlaskit/media-client-react';
|
|
14
|
-
export var getPreferredVideoArtifact = function getPreferredVideoArtifact(fileState) {
|
|
15
|
-
if (fileState.status === 'processed' || fileState.status === 'processing') {
|
|
16
|
-
var artifacts = fileState.artifacts;
|
|
17
|
-
if (!artifacts) {
|
|
18
|
-
return undefined;
|
|
19
|
-
}
|
|
20
|
-
return artifacts['video_1280.mp4'] ? 'video_1280.mp4' : artifacts['video_640.mp4'] ? 'video_640.mp4' : undefined;
|
|
21
|
-
}
|
|
22
|
-
return undefined;
|
|
23
|
-
};
|
|
24
|
-
export var InlinePlayerBaseV2 = function InlinePlayerBaseV2(_ref) {
|
|
25
|
-
var identifier = _ref.identifier,
|
|
26
|
-
onError = _ref.onError,
|
|
27
|
-
onClick = _ref.onClick,
|
|
28
|
-
_ref$dimensions = _ref.dimensions,
|
|
29
|
-
dimensions = _ref$dimensions === void 0 ? defaultImageCardDimensions : _ref$dimensions,
|
|
30
|
-
originalDimensions = _ref.originalDimensions,
|
|
31
|
-
selected = _ref.selected,
|
|
32
|
-
testId = _ref.testId,
|
|
33
|
-
forwardRef = _ref.forwardRef,
|
|
34
|
-
autoplay = _ref.autoplay,
|
|
35
|
-
cardPreview = _ref.cardPreview,
|
|
36
|
-
onFullscreenChange = _ref.onFullscreenChange,
|
|
37
|
-
videoControlsWrapperRef = _ref.videoControlsWrapperRef;
|
|
38
|
-
// === States ===
|
|
39
|
-
var _useState = useState(),
|
|
40
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
41
|
-
fileSrc = _useState2[0],
|
|
42
|
-
setFileSrc = _useState2[1];
|
|
43
|
-
var _useState3 = useState(),
|
|
44
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
45
|
-
isUploading = _useState4[0],
|
|
46
|
-
setIsUploading = _useState4[1];
|
|
47
|
-
var _useState5 = useState(),
|
|
48
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
49
|
-
progress = _useState6[0],
|
|
50
|
-
setProgress = _useState6[1];
|
|
51
|
-
|
|
52
|
-
// === Refs and Local Variables ===
|
|
53
|
-
var divRef = useRef(null);
|
|
54
|
-
var onErrorRef = useRef(onError);
|
|
55
|
-
onErrorRef.current = onError;
|
|
56
|
-
var id = identifier.id,
|
|
57
|
-
collectionName = identifier.collectionName,
|
|
58
|
-
occurrenceKey = identifier.occurrenceKey;
|
|
59
|
-
var breakpoint = useBreakpoint(dimensions === null || dimensions === void 0 ? void 0 : dimensions.width, divRef);
|
|
60
|
-
var mediaClient = useMediaClient();
|
|
61
|
-
var _useFileState = useFileState(id, {
|
|
62
|
-
collectionName: collectionName,
|
|
63
|
-
occurrenceKey: occurrenceKey
|
|
64
|
-
}),
|
|
65
|
-
fileState = _useFileState.fileState;
|
|
66
|
-
useEffect(function () {
|
|
67
|
-
var subscribeFileState = /*#__PURE__*/function () {
|
|
68
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(fileState) {
|
|
69
|
-
var _yield$fileState$prev, value, newFileSrc, artifactName, artifacts, _newFileSrc, _newFileSrc2;
|
|
70
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
71
|
-
while (1) switch (_context.prev = _context.next) {
|
|
72
|
-
case 0:
|
|
73
|
-
if (fileState.status === 'uploading') {
|
|
74
|
-
setIsUploading(true);
|
|
75
|
-
setProgress(fileState.progress);
|
|
76
|
-
} else {
|
|
77
|
-
setIsUploading(false);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// We reuse the existing fileSrc to prevent re renders, therefore we only perform fileSrc updates when there isn't any
|
|
81
|
-
if (!fileSrc) {
|
|
82
|
-
_context.next = 3;
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
return _context.abrupt("return");
|
|
86
|
-
case 3:
|
|
87
|
-
if (!(fileState.status !== 'error' && fileState.preview)) {
|
|
88
|
-
_context.next = 12;
|
|
89
|
-
break;
|
|
90
|
-
}
|
|
91
|
-
_context.next = 6;
|
|
92
|
-
return fileState.preview;
|
|
93
|
-
case 6:
|
|
94
|
-
_yield$fileState$prev = _context.sent;
|
|
95
|
-
value = _yield$fileState$prev.value;
|
|
96
|
-
if (!(value instanceof Blob && value.type.indexOf('video/') === 0)) {
|
|
97
|
-
_context.next = 12;
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
newFileSrc = URL.createObjectURL(value);
|
|
101
|
-
setFileSrc(newFileSrc);
|
|
102
|
-
return _context.abrupt("return");
|
|
103
|
-
case 12:
|
|
104
|
-
if (!(fileState.status === 'processed' || fileState.status === 'processing')) {
|
|
105
|
-
_context.next = 37;
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
artifactName = getPreferredVideoArtifact(fileState);
|
|
109
|
-
artifacts = fileState.artifacts;
|
|
110
|
-
if (!(!artifactName || !artifacts)) {
|
|
111
|
-
_context.next = 27;
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
114
|
-
_context.prev = 16;
|
|
115
|
-
_context.next = 19;
|
|
116
|
-
return mediaClient.file.getFileBinaryURL(id, collectionName);
|
|
117
|
-
case 19:
|
|
118
|
-
_newFileSrc = _context.sent;
|
|
119
|
-
setFileSrc(_newFileSrc);
|
|
120
|
-
_context.next = 26;
|
|
121
|
-
break;
|
|
122
|
-
case 23:
|
|
123
|
-
_context.prev = 23;
|
|
124
|
-
_context.t0 = _context["catch"](16);
|
|
125
|
-
if (onErrorRef.current && _context.t0 instanceof Error) {
|
|
126
|
-
onErrorRef.current(_context.t0);
|
|
127
|
-
}
|
|
128
|
-
case 26:
|
|
129
|
-
return _context.abrupt("return");
|
|
130
|
-
case 27:
|
|
131
|
-
_context.prev = 27;
|
|
132
|
-
_context.next = 30;
|
|
133
|
-
return mediaClient.file.getArtifactURL(artifacts, artifactName, collectionName);
|
|
134
|
-
case 30:
|
|
135
|
-
_newFileSrc2 = _context.sent;
|
|
136
|
-
setFileSrc(_newFileSrc2);
|
|
137
|
-
_context.next = 37;
|
|
138
|
-
break;
|
|
139
|
-
case 34:
|
|
140
|
-
_context.prev = 34;
|
|
141
|
-
_context.t1 = _context["catch"](27);
|
|
142
|
-
if (onErrorRef.current && _context.t1 instanceof Error) {
|
|
143
|
-
onErrorRef.current(_context.t1);
|
|
144
|
-
}
|
|
145
|
-
case 37:
|
|
146
|
-
case "end":
|
|
147
|
-
return _context.stop();
|
|
148
|
-
}
|
|
149
|
-
}, _callee, null, [[16, 23], [27, 34]]);
|
|
150
|
-
}));
|
|
151
|
-
return function subscribeFileState(_x) {
|
|
152
|
-
return _ref2.apply(this, arguments);
|
|
153
|
-
};
|
|
154
|
-
}();
|
|
155
|
-
if (fileState) {
|
|
156
|
-
subscribeFileState(fileState);
|
|
157
|
-
}
|
|
158
|
-
}, [fileState, collectionName, fileSrc, id, mediaClient]);
|
|
159
|
-
useEffect(function () {
|
|
160
|
-
return function () {
|
|
161
|
-
fileSrc && URL.revokeObjectURL(fileSrc);
|
|
162
|
-
};
|
|
163
|
-
}, [fileSrc]);
|
|
164
|
-
|
|
165
|
-
// === Render ===
|
|
166
|
-
return fileSrc ? /*#__PURE__*/React.createElement(InlinePlayerWrapper, {
|
|
167
|
-
testId: testId || 'media-card-inline-player',
|
|
168
|
-
selected: {
|
|
169
|
-
selected: selected
|
|
170
|
-
},
|
|
171
|
-
onClick: onClick,
|
|
172
|
-
innerRef: forwardRef || undefined,
|
|
173
|
-
dimensions: dimensions
|
|
174
|
-
}, /*#__PURE__*/React.createElement(InactivityDetector, null, function (checkMouseMovement) {
|
|
175
|
-
return /*#__PURE__*/React.createElement(CustomMediaPlayer, {
|
|
176
|
-
type: "video",
|
|
177
|
-
src: fileSrc,
|
|
178
|
-
onFullscreenChange: onFullscreenChange,
|
|
179
|
-
fileId: id,
|
|
180
|
-
isAutoPlay: autoplay,
|
|
181
|
-
isHDAvailable: false,
|
|
182
|
-
onDownloadClick: function onDownloadClick() {
|
|
183
|
-
mediaClient.file.downloadBinary(id, undefined, collectionName);
|
|
184
|
-
},
|
|
185
|
-
onFirstPlay: function onFirstPlay() {
|
|
186
|
-
globalMediaEventEmitter.emit('media-viewed', {
|
|
187
|
-
fileId: id,
|
|
188
|
-
viewingLevel: 'full'
|
|
189
|
-
});
|
|
190
|
-
},
|
|
191
|
-
lastWatchTimeConfig: {
|
|
192
|
-
contentId: id
|
|
193
|
-
},
|
|
194
|
-
originalDimensions: originalDimensions,
|
|
195
|
-
showControls: checkMouseMovement,
|
|
196
|
-
poster: cardPreview === null || cardPreview === void 0 ? void 0 : cardPreview.dataURI,
|
|
197
|
-
videoControlsWrapperRef: videoControlsWrapperRef
|
|
198
|
-
});
|
|
199
|
-
}), isUploading && /*#__PURE__*/React.createElement(ProgressBar, {
|
|
200
|
-
progress: progress,
|
|
201
|
-
breakpoint: breakpoint,
|
|
202
|
-
positionBottom: true,
|
|
203
|
-
showOnTop: true
|
|
204
|
-
})) : /*#__PURE__*/React.createElement(CardLoading, {
|
|
205
|
-
testId: testId,
|
|
206
|
-
dimensions: dimensions
|
|
207
|
-
});
|
|
208
|
-
};
|
|
209
|
-
var InlinePlayerForwardRef = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
210
|
-
return /*#__PURE__*/React.createElement(InlinePlayerBaseV2, _extends({}, props, {
|
|
211
|
-
forwardRef: ref
|
|
212
|
-
}));
|
|
213
|
-
});
|
|
214
|
-
export var InlinePlayerV2 = InlinePlayerForwardRef;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { type WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
import { type CardProps } from '../../types';
|
|
5
|
-
export type CardV2BaseProps = CardProps & WithAnalyticsEventsProps & Partial<WrappedComponentProps>;
|
|
6
|
-
export declare const CardV2Base: ({ identifier, ...otherProps }: CardV2BaseProps & WrappedComponentProps) => JSX.Element;
|
|
7
|
-
export declare const CardV2: React.ComponentType<CardV2BaseProps>;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
|
-
import React, { type MouseEvent } from 'react';
|
|
4
|
-
import { type MessageDescriptor } from 'react-intl-next';
|
|
5
|
-
import { type MediaItemType, type FileDetails, type ImageResizeMode } from '@atlaskit/media-client';
|
|
6
|
-
import { type WithAnalyticsEventsProps, type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
7
|
-
import { type CardStatus, type MediaCardCursor, type CardDimensions, type TitleBoxIcon } from '../../types';
|
|
8
|
-
import { type MediaFilePreview } from '@atlaskit/media-file-preview';
|
|
9
|
-
import { type CardAction } from '../actions';
|
|
10
|
-
import { type MediaCardError } from '../../errors';
|
|
11
|
-
export interface CardViewV2Props {
|
|
12
|
-
readonly disableOverlay?: boolean;
|
|
13
|
-
readonly resizeMode?: ImageResizeMode;
|
|
14
|
-
readonly dimensions: CardDimensions;
|
|
15
|
-
readonly actions?: Array<CardAction>;
|
|
16
|
-
readonly selectable?: boolean;
|
|
17
|
-
readonly selected?: boolean;
|
|
18
|
-
readonly alt?: string;
|
|
19
|
-
readonly testId?: string;
|
|
20
|
-
readonly titleBoxBgColor?: string;
|
|
21
|
-
readonly titleBoxIcon?: TitleBoxIcon;
|
|
22
|
-
readonly status: CardStatus;
|
|
23
|
-
readonly mediaItemType: MediaItemType;
|
|
24
|
-
readonly mediaCardCursor?: MediaCardCursor;
|
|
25
|
-
readonly metadata?: FileDetails;
|
|
26
|
-
readonly error?: MediaCardError;
|
|
27
|
-
readonly onClick?: (event: React.MouseEvent<HTMLDivElement | HTMLButtonElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
28
|
-
readonly openMediaViewerButtonRef?: React.Ref<HTMLButtonElement>;
|
|
29
|
-
readonly shouldOpenMediaViewer?: boolean;
|
|
30
|
-
readonly onMouseEnter?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
31
|
-
readonly onDisplayImage?: () => void;
|
|
32
|
-
readonly cardPreview?: MediaFilePreview;
|
|
33
|
-
readonly progress?: number;
|
|
34
|
-
readonly innerRef?: (instance: HTMLDivElement | null) => void;
|
|
35
|
-
readonly onImageLoad?: (cardPreview: MediaFilePreview) => void;
|
|
36
|
-
readonly onImageError?: (cardPreview: MediaFilePreview) => void;
|
|
37
|
-
readonly nativeLazyLoad?: boolean;
|
|
38
|
-
readonly forceSyncDisplay?: boolean;
|
|
39
|
-
disableAnimation?: boolean;
|
|
40
|
-
shouldHideTooltip?: boolean;
|
|
41
|
-
overriddenCreationDate?: number;
|
|
42
|
-
}
|
|
43
|
-
export type CardViewV2BaseProps = CardViewV2Props & WithAnalyticsEventsProps;
|
|
44
|
-
export interface RenderConfigByStatusV2 {
|
|
45
|
-
renderTypeIcon?: boolean;
|
|
46
|
-
iconMessage?: JSX.Element;
|
|
47
|
-
renderImageRenderer?: boolean;
|
|
48
|
-
renderPlayButton?: boolean;
|
|
49
|
-
renderTitleBox?: boolean;
|
|
50
|
-
renderBlanket?: boolean;
|
|
51
|
-
isFixedBlanket?: boolean;
|
|
52
|
-
renderProgressBar?: boolean;
|
|
53
|
-
renderSpinner?: boolean;
|
|
54
|
-
renderFailedTitleBox?: boolean;
|
|
55
|
-
renderTickBox?: boolean;
|
|
56
|
-
customTitleMessage?: MessageDescriptor;
|
|
57
|
-
}
|
|
58
|
-
export declare const CardViewV2Base: ({ innerRef, onImageLoad, onImageError, dimensions, onClick, onMouseEnter, testId, metadata, status, selected, selectable, cardPreview, mediaCardCursor, shouldHideTooltip, progress, alt, resizeMode, onDisplayImage, nativeLazyLoad, forceSyncDisplay, actions, disableOverlay, titleBoxBgColor, titleBoxIcon, error, disableAnimation, openMediaViewerButtonRef, shouldOpenMediaViewer, overriddenCreationDate, }: CardViewV2BaseProps) => jsx.JSX.Element;
|
|
59
|
-
export declare const CardViewV2: React.ForwardRefExoticComponent<Omit<CardViewV2Props & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const InlinePlayerLazyV2: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Pick<import("./inlinePlayerV2").InlinePlayerProps, "createAnalyticsEvent" | keyof import("./inlinePlayerV2").InlinePlayerOwnProps> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type FileIdentifier, type FileState, type MediaFileArtifacts } from '@atlaskit/media-client';
|
|
3
|
-
import { type NumericalCardDimensions } from '@atlaskit/media-common';
|
|
4
|
-
import { type CardDimensions } from '../../types';
|
|
5
|
-
import { type WithAnalyticsEventsProps, type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
|
-
import type { CardPreview } from '../../types';
|
|
7
|
-
export interface InlinePlayerOwnProps {
|
|
8
|
-
identifier: FileIdentifier;
|
|
9
|
-
dimensions?: CardDimensions;
|
|
10
|
-
originalDimensions?: NumericalCardDimensions;
|
|
11
|
-
autoplay: boolean;
|
|
12
|
-
selected?: boolean;
|
|
13
|
-
onFullscreenChange?: (fullscreen: boolean) => void;
|
|
14
|
-
onError?: (error: Error) => void;
|
|
15
|
-
readonly onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
16
|
-
testId?: string;
|
|
17
|
-
readonly cardPreview?: CardPreview;
|
|
18
|
-
readonly forwardRef?: React.Ref<HTMLDivElement>;
|
|
19
|
-
readonly videoControlsWrapperRef?: React.Ref<HTMLDivElement>;
|
|
20
|
-
}
|
|
21
|
-
export type InlinePlayerProps = InlinePlayerOwnProps & WithAnalyticsEventsProps;
|
|
22
|
-
export declare const getPreferredVideoArtifact: (fileState: FileState) => keyof MediaFileArtifacts | undefined;
|
|
23
|
-
export declare const InlinePlayerBaseV2: ({ identifier, onError, onClick, dimensions, originalDimensions, selected, testId, forwardRef, autoplay, cardPreview, onFullscreenChange, videoControlsWrapperRef, }: InlinePlayerProps) => JSX.Element;
|
|
24
|
-
export declare const InlinePlayerV2: React.ForwardRefExoticComponent<Pick<InlinePlayerProps, "createAnalyticsEvent" | keyof InlinePlayerOwnProps> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { type WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
import { type CardProps } from '../../types';
|
|
5
|
-
export type CardV2BaseProps = CardProps & WithAnalyticsEventsProps & Partial<WrappedComponentProps>;
|
|
6
|
-
export declare const CardV2Base: ({ identifier, ...otherProps }: CardV2BaseProps & WrappedComponentProps) => JSX.Element;
|
|
7
|
-
export declare const CardV2: React.ComponentType<CardV2BaseProps>;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
|
-
import React, { type MouseEvent } from 'react';
|
|
4
|
-
import { type MessageDescriptor } from 'react-intl-next';
|
|
5
|
-
import { type MediaItemType, type FileDetails, type ImageResizeMode } from '@atlaskit/media-client';
|
|
6
|
-
import { type WithAnalyticsEventsProps, type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
7
|
-
import { type CardStatus, type MediaCardCursor, type CardDimensions, type TitleBoxIcon } from '../../types';
|
|
8
|
-
import { type MediaFilePreview } from '@atlaskit/media-file-preview';
|
|
9
|
-
import { type CardAction } from '../actions';
|
|
10
|
-
import { type MediaCardError } from '../../errors';
|
|
11
|
-
export interface CardViewV2Props {
|
|
12
|
-
readonly disableOverlay?: boolean;
|
|
13
|
-
readonly resizeMode?: ImageResizeMode;
|
|
14
|
-
readonly dimensions: CardDimensions;
|
|
15
|
-
readonly actions?: Array<CardAction>;
|
|
16
|
-
readonly selectable?: boolean;
|
|
17
|
-
readonly selected?: boolean;
|
|
18
|
-
readonly alt?: string;
|
|
19
|
-
readonly testId?: string;
|
|
20
|
-
readonly titleBoxBgColor?: string;
|
|
21
|
-
readonly titleBoxIcon?: TitleBoxIcon;
|
|
22
|
-
readonly status: CardStatus;
|
|
23
|
-
readonly mediaItemType: MediaItemType;
|
|
24
|
-
readonly mediaCardCursor?: MediaCardCursor;
|
|
25
|
-
readonly metadata?: FileDetails;
|
|
26
|
-
readonly error?: MediaCardError;
|
|
27
|
-
readonly onClick?: (event: React.MouseEvent<HTMLDivElement | HTMLButtonElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
28
|
-
readonly openMediaViewerButtonRef?: React.Ref<HTMLButtonElement>;
|
|
29
|
-
readonly shouldOpenMediaViewer?: boolean;
|
|
30
|
-
readonly onMouseEnter?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
31
|
-
readonly onDisplayImage?: () => void;
|
|
32
|
-
readonly cardPreview?: MediaFilePreview;
|
|
33
|
-
readonly progress?: number;
|
|
34
|
-
readonly innerRef?: (instance: HTMLDivElement | null) => void;
|
|
35
|
-
readonly onImageLoad?: (cardPreview: MediaFilePreview) => void;
|
|
36
|
-
readonly onImageError?: (cardPreview: MediaFilePreview) => void;
|
|
37
|
-
readonly nativeLazyLoad?: boolean;
|
|
38
|
-
readonly forceSyncDisplay?: boolean;
|
|
39
|
-
disableAnimation?: boolean;
|
|
40
|
-
shouldHideTooltip?: boolean;
|
|
41
|
-
overriddenCreationDate?: number;
|
|
42
|
-
}
|
|
43
|
-
export type CardViewV2BaseProps = CardViewV2Props & WithAnalyticsEventsProps;
|
|
44
|
-
export interface RenderConfigByStatusV2 {
|
|
45
|
-
renderTypeIcon?: boolean;
|
|
46
|
-
iconMessage?: JSX.Element;
|
|
47
|
-
renderImageRenderer?: boolean;
|
|
48
|
-
renderPlayButton?: boolean;
|
|
49
|
-
renderTitleBox?: boolean;
|
|
50
|
-
renderBlanket?: boolean;
|
|
51
|
-
isFixedBlanket?: boolean;
|
|
52
|
-
renderProgressBar?: boolean;
|
|
53
|
-
renderSpinner?: boolean;
|
|
54
|
-
renderFailedTitleBox?: boolean;
|
|
55
|
-
renderTickBox?: boolean;
|
|
56
|
-
customTitleMessage?: MessageDescriptor;
|
|
57
|
-
}
|
|
58
|
-
export declare const CardViewV2Base: ({ innerRef, onImageLoad, onImageError, dimensions, onClick, onMouseEnter, testId, metadata, status, selected, selectable, cardPreview, mediaCardCursor, shouldHideTooltip, progress, alt, resizeMode, onDisplayImage, nativeLazyLoad, forceSyncDisplay, actions, disableOverlay, titleBoxBgColor, titleBoxIcon, error, disableAnimation, openMediaViewerButtonRef, shouldOpenMediaViewer, overriddenCreationDate, }: CardViewV2BaseProps) => jsx.JSX.Element;
|
|
59
|
-
export declare const CardViewV2: React.ForwardRefExoticComponent<Omit<CardViewV2Props & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const InlinePlayerLazyV2: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Pick<import("./inlinePlayerV2").InlinePlayerProps, "createAnalyticsEvent" | keyof import("./inlinePlayerV2").InlinePlayerOwnProps> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type FileIdentifier, type FileState, type MediaFileArtifacts } from '@atlaskit/media-client';
|
|
3
|
-
import { type NumericalCardDimensions } from '@atlaskit/media-common';
|
|
4
|
-
import { type CardDimensions } from '../../types';
|
|
5
|
-
import { type WithAnalyticsEventsProps, type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
|
-
import type { CardPreview } from '../../types';
|
|
7
|
-
export interface InlinePlayerOwnProps {
|
|
8
|
-
identifier: FileIdentifier;
|
|
9
|
-
dimensions?: CardDimensions;
|
|
10
|
-
originalDimensions?: NumericalCardDimensions;
|
|
11
|
-
autoplay: boolean;
|
|
12
|
-
selected?: boolean;
|
|
13
|
-
onFullscreenChange?: (fullscreen: boolean) => void;
|
|
14
|
-
onError?: (error: Error) => void;
|
|
15
|
-
readonly onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
16
|
-
testId?: string;
|
|
17
|
-
readonly cardPreview?: CardPreview;
|
|
18
|
-
readonly forwardRef?: React.Ref<HTMLDivElement>;
|
|
19
|
-
readonly videoControlsWrapperRef?: React.Ref<HTMLDivElement>;
|
|
20
|
-
}
|
|
21
|
-
export type InlinePlayerProps = InlinePlayerOwnProps & WithAnalyticsEventsProps;
|
|
22
|
-
export declare const getPreferredVideoArtifact: (fileState: FileState) => keyof MediaFileArtifacts | undefined;
|
|
23
|
-
export declare const InlinePlayerBaseV2: ({ identifier, onError, onClick, dimensions, originalDimensions, selected, testId, forwardRef, autoplay, cardPreview, onFullscreenChange, videoControlsWrapperRef, }: InlinePlayerProps) => JSX.Element;
|
|
24
|
-
export declare const InlinePlayerV2: React.ForwardRefExoticComponent<Pick<InlinePlayerProps, "createAnalyticsEvent" | keyof InlinePlayerOwnProps> & React.RefAttributes<HTMLDivElement>>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|