@atlaskit/media-card 79.4.4 → 79.4.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 +15 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/fileCard.js +1 -3
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/ui/progressBar/progressBar.js +5 -2
- package/dist/cjs/card/ui/progressBar/styledBar-compiled.js +3 -1
- package/dist/cjs/card/ui/progressBar/styledBar-emotion.js +4 -2
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/inline/mediaInlineCard.js +22 -20
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/fileCard.js +1 -3
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/ui/progressBar/progressBar.js +4 -2
- package/dist/es2019/card/ui/progressBar/styledBar-compiled.js +3 -1
- package/dist/es2019/card/ui/progressBar/styledBar-emotion.js +4 -2
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/inline/mediaInlineCard.js +22 -20
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/fileCard.js +1 -3
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/ui/progressBar/progressBar.js +5 -2
- package/dist/esm/card/ui/progressBar/styledBar-compiled.js +3 -1
- package/dist/esm/card/ui/progressBar/styledBar-emotion.js +4 -2
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/inline/mediaInlineCard.js +22 -20
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/ui/progressBar/progressBar.d.ts +2 -1
- package/dist/types/card/ui/progressBar/types.d.ts +1 -0
- package/dist/types-ts4.5/card/ui/progressBar/progressBar.d.ts +2 -1
- package/dist/types-ts4.5/card/ui/progressBar/types.d.ts +1 -0
- package/package.json +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 79.4.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#192828](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/192828)
|
|
8
|
+
[`a798dd56b4aba`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a798dd56b4aba) -
|
|
9
|
+
Fixes A11Y issues
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 79.4.5
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 79.4.4
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/cjs/card/card.js
CHANGED
|
@@ -20,7 +20,7 @@ var _label = _interopRequireDefault(require("@atlaskit/react-ufo/label"));
|
|
|
20
20
|
var _excluded = ["identifier"];
|
|
21
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
22
|
var packageName = "@atlaskit/media-card";
|
|
23
|
-
var packageVersion = "79.4.
|
|
23
|
+
var packageVersion = "79.4.5";
|
|
24
24
|
var CardBase = exports.CardBase = function CardBase(_ref) {
|
|
25
25
|
var identifier = _ref.identifier,
|
|
26
26
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -433,9 +433,7 @@ var FileCard = exports.FileCard = function FileCard(_ref) {
|
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
// Abort VC when click file card
|
|
436
|
-
|
|
437
|
-
pressTracing();
|
|
438
|
-
}
|
|
436
|
+
pressTracing();
|
|
439
437
|
};
|
|
440
438
|
|
|
441
439
|
//----------------------------------------------------------------//
|
|
@@ -87,7 +87,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
87
87
|
}(_react.default.Component);
|
|
88
88
|
(0, _defineProperty2.default)(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
89
89
|
var packageName = "@atlaskit/media-card";
|
|
90
|
-
var packageVersion = "79.4.
|
|
90
|
+
var packageVersion = "79.4.5";
|
|
91
91
|
|
|
92
92
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
93
93
|
var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
|
|
@@ -18,11 +18,14 @@ var ProgressBar = exports.ProgressBar = function ProgressBar(_ref) {
|
|
|
18
18
|
_ref$positionBottom = _ref.positionBottom,
|
|
19
19
|
positionBottom = _ref$positionBottom === void 0 ? false : _ref$positionBottom,
|
|
20
20
|
_ref$showOnTop = _ref.showOnTop,
|
|
21
|
-
showOnTop = _ref$showOnTop === void 0 ? false : _ref$showOnTop
|
|
21
|
+
showOnTop = _ref$showOnTop === void 0 ? false : _ref$showOnTop,
|
|
22
|
+
_ref$ariaLabel = _ref.ariaLabel,
|
|
23
|
+
ariaLabel = _ref$ariaLabel === void 0 ? 'Loading progress' : _ref$ariaLabel;
|
|
22
24
|
return /*#__PURE__*/_react.default.createElement(_styledBar.StyledBar, {
|
|
23
25
|
progress: getNormalizedProgress(progress),
|
|
24
26
|
breakpoint: breakpoint,
|
|
25
27
|
positionBottom: positionBottom,
|
|
26
|
-
showOnTop: showOnTop
|
|
28
|
+
showOnTop: showOnTop,
|
|
29
|
+
ariaLabel: ariaLabel
|
|
27
30
|
});
|
|
28
31
|
};
|
|
@@ -44,11 +44,13 @@ var StyledBar = exports.StyledBar = function StyledBar(props) {
|
|
|
44
44
|
var progress = props.progress,
|
|
45
45
|
breakpoint = props.breakpoint,
|
|
46
46
|
positionBottom = props.positionBottom,
|
|
47
|
-
showOnTop = props.showOnTop
|
|
47
|
+
showOnTop = props.showOnTop,
|
|
48
|
+
ariaLabel = props.ariaLabel;
|
|
48
49
|
return /*#__PURE__*/React.createElement("div", {
|
|
49
50
|
id: "styledBar",
|
|
50
51
|
role: "progressbar",
|
|
51
52
|
"aria-valuenow": progress,
|
|
53
|
+
"aria-label": ariaLabel,
|
|
52
54
|
className: (0, _runtime.ax)(["_1reo15vq _18m915vq _1yt4xh0m _2rko1l7b _kqswstnw _1bsb1b7y _1ltv1ghs _bfhkrcrw _4t3i12iw _vchhusvi"]),
|
|
53
55
|
style: _objectSpread(_objectSpread({}, generateResponsiveStyles(breakpoint, positionBottom, showOnTop)), {}, {
|
|
54
56
|
"--_1xe2l1p": (0, _runtime.ix)("".concat(width, "%")),
|
|
@@ -16,11 +16,13 @@ var StyledBar = exports.StyledBar = function StyledBar(props) {
|
|
|
16
16
|
var progress = props.progress,
|
|
17
17
|
breakpoint = props.breakpoint,
|
|
18
18
|
positionBottom = props.positionBottom,
|
|
19
|
-
showOnTop = props.showOnTop
|
|
19
|
+
showOnTop = props.showOnTop,
|
|
20
|
+
ariaLabel = props.ariaLabel;
|
|
20
21
|
return (0, _react.jsx)("div", {
|
|
21
22
|
id: "styledBar",
|
|
22
23
|
role: "progressbar",
|
|
23
|
-
"aria-valuenow": progress
|
|
24
|
+
"aria-valuenow": progress,
|
|
25
|
+
"aria-label": ariaLabel
|
|
24
26
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
25
27
|
,
|
|
26
28
|
css: (0, _styles.styledBarStyles)({
|
|
@@ -116,7 +116,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
|
|
|
116
116
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
117
117
|
var analyticsContext = {
|
|
118
118
|
packageVersion: "@atlaskit/media-card",
|
|
119
|
-
packageName: "79.4.
|
|
119
|
+
packageName: "79.4.5",
|
|
120
120
|
componentName: 'mediaInlineCard',
|
|
121
121
|
component: 'mediaInlineCard'
|
|
122
122
|
};
|
|
@@ -21,7 +21,6 @@ var _errors = require("../errors");
|
|
|
21
21
|
var _analytics = require("../utils/analytics");
|
|
22
22
|
var _mediaInlineCardAnalytics = require("./mediaInlineCardAnalytics");
|
|
23
23
|
var _mediaClientReact = require("@atlaskit/media-client-react");
|
|
24
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
25
24
|
var _usePressTracing = _interopRequireDefault(require("@atlaskit/react-ufo/use-press-tracing"));
|
|
26
25
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
27
26
|
// UI component which renders an inline link in the appropiate state based on a media file
|
|
@@ -61,6 +60,9 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
61
60
|
var fireFailedOperationalEvent = function fireFailedOperationalEvent() {
|
|
62
61
|
var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new _errors.MediaCardError('missing-error-data');
|
|
63
62
|
var failReason = arguments.length > 1 ? arguments[1] : undefined;
|
|
63
|
+
if (isFailedEventSent) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
64
66
|
var payload = failReason ? (0, _mediaInlineCardAnalytics.getFailedProcessingStatusPayload)(identifier.id, fileState) : (0, _mediaInlineCardAnalytics.getErrorStatusPayload)(identifier.id, error, fileState);
|
|
65
67
|
setIsFailedEventSent(true);
|
|
66
68
|
(0, _analytics.fireMediaCardEvent)(payload, createAnalyticsEvent);
|
|
@@ -87,9 +89,7 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
// Abort VC when click media inline card
|
|
90
|
-
|
|
91
|
-
pressTracing();
|
|
92
|
-
}
|
|
92
|
+
pressTracing();
|
|
93
93
|
};
|
|
94
94
|
var onMediaViewerClose = function onMediaViewerClose() {
|
|
95
95
|
return setMediaViewerVisible(false);
|
|
@@ -134,21 +134,23 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
134
134
|
if (subscribeError) {
|
|
135
135
|
var errorMessage = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? _mediaUi.messages.failed_to_upload : _mediaUi.messages.couldnt_load_file;
|
|
136
136
|
var errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
|
|
137
|
-
|
|
138
|
-
return /*#__PURE__*/_react.default.createElement(_mediaUi.MediaInlineCardErroredView, {
|
|
137
|
+
fireFailedOperationalEvent(new _errors.MediaCardError(errorReason, subscribeError));
|
|
138
|
+
return renderContent( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_mediaUi.MediaInlineCardErroredView, {
|
|
139
139
|
innerRef: copyNodeRef,
|
|
140
140
|
message: (intl || defaultIntl).formatMessage(errorMessage),
|
|
141
|
-
isSelected: isSelected
|
|
142
|
-
|
|
141
|
+
isSelected: isSelected,
|
|
142
|
+
onClick: onMediaInlineCardClick
|
|
143
|
+
}), renderMediaViewer()));
|
|
143
144
|
}
|
|
144
145
|
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
|
|
145
146
|
var error = new _errors.MediaCardError('error-file-state', (0, _mediaClient.toCommonMediaClientError)(fileState));
|
|
146
|
-
|
|
147
|
-
return /*#__PURE__*/_react.default.createElement(_mediaUi.MediaInlineCardErroredView, {
|
|
147
|
+
fireFailedOperationalEvent(error);
|
|
148
|
+
return renderContent( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_mediaUi.MediaInlineCardErroredView, {
|
|
148
149
|
innerRef: copyNodeRef,
|
|
149
150
|
message: (intl || defaultIntl).formatMessage(_mediaUi.messages.couldnt_load_file),
|
|
150
|
-
isSelected: isSelected
|
|
151
|
-
|
|
151
|
+
isSelected: isSelected,
|
|
152
|
+
onClick: onMediaInlineCardClick
|
|
153
|
+
}), renderMediaViewer()));
|
|
152
154
|
}
|
|
153
155
|
|
|
154
156
|
// Empty file handling
|
|
@@ -156,12 +158,13 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
156
158
|
var _error = new _errors.MediaCardError('metadata-fetch', new _mediaClient.FileFetcherError('emptyFileName', {
|
|
157
159
|
id: fileState.id
|
|
158
160
|
}));
|
|
159
|
-
|
|
160
|
-
return /*#__PURE__*/_react.default.createElement(_mediaUi.MediaInlineCardErroredView, {
|
|
161
|
+
fireFailedOperationalEvent(_error);
|
|
162
|
+
return renderContent( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_mediaUi.MediaInlineCardErroredView, {
|
|
161
163
|
innerRef: copyNodeRef,
|
|
162
164
|
message: (intl || defaultIntl).formatMessage(_mediaUi.messages.couldnt_load_file),
|
|
163
|
-
isSelected: isSelected
|
|
164
|
-
|
|
165
|
+
isSelected: isSelected,
|
|
166
|
+
onClick: onMediaInlineCardClick
|
|
167
|
+
}), renderMediaViewer()));
|
|
165
168
|
}
|
|
166
169
|
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
|
|
167
170
|
return /*#__PURE__*/_react.default.createElement(_mediaUi.MediaInlineCardLoadingView, {
|
|
@@ -180,7 +183,7 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
180
183
|
|
|
181
184
|
// Failed to process should still display the loaded view and enable Media Client to download
|
|
182
185
|
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
|
|
183
|
-
|
|
186
|
+
fireFailedOperationalEvent(undefined, 'failed-processing');
|
|
184
187
|
}
|
|
185
188
|
var mediaType = fileState.mediaType,
|
|
186
189
|
name = fileState.name,
|
|
@@ -192,7 +195,6 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
192
195
|
mimeType: mimeType,
|
|
193
196
|
name: name
|
|
194
197
|
});
|
|
195
|
-
var mediaViewer = renderMediaViewer();
|
|
196
198
|
var formattedDate;
|
|
197
199
|
if (fileState.createdAt) {
|
|
198
200
|
var _ref2 = intl || {
|
|
@@ -216,7 +218,7 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
216
218
|
title: name,
|
|
217
219
|
onClick: onMediaInlineCardClick,
|
|
218
220
|
isSelected: isSelected
|
|
219
|
-
})),
|
|
221
|
+
})), renderMediaViewer()));
|
|
220
222
|
} else {
|
|
221
223
|
return renderContent( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_mediaUi.MediaInlineCardLoadedView, {
|
|
222
224
|
innerRef: copyNodeRef,
|
|
@@ -224,7 +226,7 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
|
|
|
224
226
|
title: name,
|
|
225
227
|
onClick: onMediaInlineCardClick,
|
|
226
228
|
isSelected: isSelected
|
|
227
|
-
}),
|
|
229
|
+
}), renderMediaViewer()));
|
|
228
230
|
}
|
|
229
231
|
};
|
|
230
232
|
var MediaInlineCard = exports.MediaInlineCard = (0, _reactIntlNext.injectIntl)(MediaInlineCardInternal, {
|
|
@@ -15,7 +15,7 @@ var _mediaClient = require("@atlaskit/media-client");
|
|
|
15
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
17
|
var packageName = "@atlaskit/media-card";
|
|
18
|
-
var packageVersion = "79.4.
|
|
18
|
+
var packageVersion = "79.4.5";
|
|
19
19
|
var SAMPLE_RATE = 0.05;
|
|
20
20
|
var concurrentExperience;
|
|
21
21
|
var getExperience = function getExperience(id) {
|
package/dist/es2019/card/card.js
CHANGED
|
@@ -9,7 +9,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
9
9
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
10
10
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
11
11
|
const packageName = "@atlaskit/media-card";
|
|
12
|
-
const packageVersion = "79.4.
|
|
12
|
+
const packageVersion = "79.4.5";
|
|
13
13
|
export const CardBase = ({
|
|
14
14
|
identifier,
|
|
15
15
|
...otherProps
|
|
@@ -356,9 +356,7 @@ export const FileCard = ({
|
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
// Abort VC when click file card
|
|
359
|
-
|
|
360
|
-
pressTracing();
|
|
361
|
-
}
|
|
359
|
+
pressTracing();
|
|
362
360
|
};
|
|
363
361
|
|
|
364
362
|
//----------------------------------------------------------------//
|
|
@@ -66,7 +66,7 @@ class WrappedMediaCardAnalyticsErrorBoundary extends React.Component {
|
|
|
66
66
|
}
|
|
67
67
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
68
68
|
const packageName = "@atlaskit/media-card";
|
|
69
|
-
const packageVersion = "79.4.
|
|
69
|
+
const packageVersion = "79.4.5";
|
|
70
70
|
|
|
71
71
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
72
72
|
const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -8,12 +8,14 @@ export const ProgressBar = ({
|
|
|
8
8
|
progress,
|
|
9
9
|
breakpoint = Breakpoint.SMALL,
|
|
10
10
|
positionBottom = false,
|
|
11
|
-
showOnTop = false
|
|
11
|
+
showOnTop = false,
|
|
12
|
+
ariaLabel = 'Loading progress'
|
|
12
13
|
}) => {
|
|
13
14
|
return /*#__PURE__*/React.createElement(StyledBar, {
|
|
14
15
|
progress: getNormalizedProgress(progress),
|
|
15
16
|
breakpoint: breakpoint,
|
|
16
17
|
positionBottom: positionBottom,
|
|
17
|
-
showOnTop: showOnTop
|
|
18
|
+
showOnTop: showOnTop,
|
|
19
|
+
ariaLabel: ariaLabel
|
|
18
20
|
});
|
|
19
21
|
};
|
|
@@ -31,12 +31,14 @@ export const StyledBar = props => {
|
|
|
31
31
|
progress,
|
|
32
32
|
breakpoint,
|
|
33
33
|
positionBottom,
|
|
34
|
-
showOnTop
|
|
34
|
+
showOnTop,
|
|
35
|
+
ariaLabel
|
|
35
36
|
} = props;
|
|
36
37
|
return /*#__PURE__*/React.createElement("div", {
|
|
37
38
|
id: "styledBar",
|
|
38
39
|
role: "progressbar",
|
|
39
40
|
"aria-valuenow": progress,
|
|
41
|
+
"aria-label": ariaLabel,
|
|
40
42
|
style: {
|
|
41
43
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
42
44
|
...generateResponsiveStyles(breakpoint, positionBottom, showOnTop)
|
|
@@ -10,12 +10,14 @@ export const StyledBar = props => {
|
|
|
10
10
|
progress,
|
|
11
11
|
breakpoint,
|
|
12
12
|
positionBottom,
|
|
13
|
-
showOnTop
|
|
13
|
+
showOnTop,
|
|
14
|
+
ariaLabel
|
|
14
15
|
} = props;
|
|
15
16
|
return jsx("div", {
|
|
16
17
|
id: "styledBar",
|
|
17
18
|
role: "progressbar",
|
|
18
|
-
"aria-valuenow": progress
|
|
19
|
+
"aria-valuenow": progress,
|
|
20
|
+
"aria-label": ariaLabel
|
|
19
21
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
20
22
|
,
|
|
21
23
|
css: styledBarStyles({
|
|
@@ -37,7 +37,7 @@ export default class MediaInlineCardLoader extends React.PureComponent {
|
|
|
37
37
|
} = this.state;
|
|
38
38
|
const analyticsContext = {
|
|
39
39
|
packageVersion: "@atlaskit/media-card",
|
|
40
|
-
packageName: "79.4.
|
|
40
|
+
packageName: "79.4.5",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -12,7 +12,6 @@ import { MediaCardError } from '../errors';
|
|
|
12
12
|
import { fireMediaCardEvent } from '../utils/analytics';
|
|
13
13
|
import { getErrorStatusPayload, getFailedProcessingStatusPayload, getSucceededStatusPayload } from './mediaInlineCardAnalytics';
|
|
14
14
|
import { useCopyIntent } from '@atlaskit/media-client-react';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
|
|
17
16
|
// UI component which renders an inline link in the appropiate state based on a media file
|
|
18
17
|
export const MediaInlineCardInternal = ({
|
|
@@ -36,6 +35,9 @@ export const MediaInlineCardInternal = ({
|
|
|
36
35
|
} = useAnalyticsEvents();
|
|
37
36
|
const pressTracing = usePressTracing('click-media-inline-card');
|
|
38
37
|
const fireFailedOperationalEvent = (error = new MediaCardError('missing-error-data'), failReason) => {
|
|
38
|
+
if (isFailedEventSent) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
39
41
|
const payload = failReason ? getFailedProcessingStatusPayload(identifier.id, fileState) : getErrorStatusPayload(identifier.id, error, fileState);
|
|
40
42
|
setIsFailedEventSent(true);
|
|
41
43
|
fireMediaCardEvent(payload, createAnalyticsEvent);
|
|
@@ -63,9 +65,7 @@ export const MediaInlineCardInternal = ({
|
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
// Abort VC when click media inline card
|
|
66
|
-
|
|
67
|
-
pressTracing();
|
|
68
|
-
}
|
|
68
|
+
pressTracing();
|
|
69
69
|
};
|
|
70
70
|
const onMediaViewerClose = () => setMediaViewerVisible(false);
|
|
71
71
|
const renderMediaViewer = () => {
|
|
@@ -108,21 +108,23 @@ export const MediaInlineCardInternal = ({
|
|
|
108
108
|
if (subscribeError) {
|
|
109
109
|
const errorMessage = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? messages.failed_to_upload : messages.couldnt_load_file;
|
|
110
110
|
const errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
|
|
111
|
-
|
|
112
|
-
return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
111
|
+
fireFailedOperationalEvent(new MediaCardError(errorReason, subscribeError));
|
|
112
|
+
return renderContent( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
113
113
|
innerRef: copyNodeRef,
|
|
114
114
|
message: (intl || defaultIntl).formatMessage(errorMessage),
|
|
115
|
-
isSelected: isSelected
|
|
116
|
-
|
|
115
|
+
isSelected: isSelected,
|
|
116
|
+
onClick: onMediaInlineCardClick
|
|
117
|
+
}), renderMediaViewer()));
|
|
117
118
|
}
|
|
118
119
|
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
|
|
119
120
|
const error = new MediaCardError('error-file-state', toCommonMediaClientError(fileState));
|
|
120
|
-
|
|
121
|
-
return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
121
|
+
fireFailedOperationalEvent(error);
|
|
122
|
+
return renderContent( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
122
123
|
innerRef: copyNodeRef,
|
|
123
124
|
message: (intl || defaultIntl).formatMessage(messages.couldnt_load_file),
|
|
124
|
-
isSelected: isSelected
|
|
125
|
-
|
|
125
|
+
isSelected: isSelected,
|
|
126
|
+
onClick: onMediaInlineCardClick
|
|
127
|
+
}), renderMediaViewer()));
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
// Empty file handling
|
|
@@ -130,12 +132,13 @@ export const MediaInlineCardInternal = ({
|
|
|
130
132
|
const error = new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName', {
|
|
131
133
|
id: fileState.id
|
|
132
134
|
}));
|
|
133
|
-
|
|
134
|
-
return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
135
|
+
fireFailedOperationalEvent(error);
|
|
136
|
+
return renderContent( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
135
137
|
innerRef: copyNodeRef,
|
|
136
138
|
message: (intl || defaultIntl).formatMessage(messages.couldnt_load_file),
|
|
137
|
-
isSelected: isSelected
|
|
138
|
-
|
|
139
|
+
isSelected: isSelected,
|
|
140
|
+
onClick: onMediaInlineCardClick
|
|
141
|
+
}), renderMediaViewer()));
|
|
139
142
|
}
|
|
140
143
|
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
|
|
141
144
|
return /*#__PURE__*/React.createElement(MediaInlineCardLoadingView, {
|
|
@@ -154,7 +157,7 @@ export const MediaInlineCardInternal = ({
|
|
|
154
157
|
|
|
155
158
|
// Failed to process should still display the loaded view and enable Media Client to download
|
|
156
159
|
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
|
|
157
|
-
|
|
160
|
+
fireFailedOperationalEvent(undefined, 'failed-processing');
|
|
158
161
|
}
|
|
159
162
|
const {
|
|
160
163
|
mediaType,
|
|
@@ -168,7 +171,6 @@ export const MediaInlineCardInternal = ({
|
|
|
168
171
|
mimeType: mimeType,
|
|
169
172
|
name: name
|
|
170
173
|
});
|
|
171
|
-
const mediaViewer = renderMediaViewer();
|
|
172
174
|
let formattedDate;
|
|
173
175
|
if (fileState.createdAt) {
|
|
174
176
|
const {
|
|
@@ -192,7 +194,7 @@ export const MediaInlineCardInternal = ({
|
|
|
192
194
|
title: name,
|
|
193
195
|
onClick: onMediaInlineCardClick,
|
|
194
196
|
isSelected: isSelected
|
|
195
|
-
})),
|
|
197
|
+
})), renderMediaViewer()));
|
|
196
198
|
} else {
|
|
197
199
|
return renderContent( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MediaInlineCardLoadedView, {
|
|
198
200
|
innerRef: copyNodeRef,
|
|
@@ -200,7 +202,7 @@ export const MediaInlineCardInternal = ({
|
|
|
200
202
|
title: name,
|
|
201
203
|
onClick: onMediaInlineCardClick,
|
|
202
204
|
isSelected: isSelected
|
|
203
|
-
}),
|
|
205
|
+
}), renderMediaViewer()));
|
|
204
206
|
}
|
|
205
207
|
};
|
|
206
208
|
export const MediaInlineCard = injectIntl(MediaInlineCardInternal, {
|
|
@@ -5,7 +5,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
5
5
|
import { MediaCardError } from '../errors';
|
|
6
6
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
7
7
|
const packageName = "@atlaskit/media-card";
|
|
8
|
-
const packageVersion = "79.4.
|
|
8
|
+
const packageVersion = "79.4.5";
|
|
9
9
|
const SAMPLE_RATE = 0.05;
|
|
10
10
|
let concurrentExperience;
|
|
11
11
|
const getExperience = id => {
|
package/dist/esm/card/card.js
CHANGED
|
@@ -11,7 +11,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
11
11
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
12
12
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
13
13
|
var packageName = "@atlaskit/media-card";
|
|
14
|
-
var packageVersion = "79.4.
|
|
14
|
+
var packageVersion = "79.4.5";
|
|
15
15
|
export var CardBase = function CardBase(_ref) {
|
|
16
16
|
var identifier = _ref.identifier,
|
|
17
17
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -425,9 +425,7 @@ export var FileCard = function FileCard(_ref) {
|
|
|
425
425
|
}
|
|
426
426
|
|
|
427
427
|
// Abort VC when click file card
|
|
428
|
-
|
|
429
|
-
pressTracing();
|
|
430
|
-
}
|
|
428
|
+
pressTracing();
|
|
431
429
|
};
|
|
432
430
|
|
|
433
431
|
//----------------------------------------------------------------//
|
|
@@ -80,7 +80,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
80
80
|
}(React.Component);
|
|
81
81
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
82
82
|
var packageName = "@atlaskit/media-card";
|
|
83
|
-
var packageVersion = "79.4.
|
|
83
|
+
var packageVersion = "79.4.5";
|
|
84
84
|
|
|
85
85
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
86
86
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -11,11 +11,14 @@ export var ProgressBar = function ProgressBar(_ref) {
|
|
|
11
11
|
_ref$positionBottom = _ref.positionBottom,
|
|
12
12
|
positionBottom = _ref$positionBottom === void 0 ? false : _ref$positionBottom,
|
|
13
13
|
_ref$showOnTop = _ref.showOnTop,
|
|
14
|
-
showOnTop = _ref$showOnTop === void 0 ? false : _ref$showOnTop
|
|
14
|
+
showOnTop = _ref$showOnTop === void 0 ? false : _ref$showOnTop,
|
|
15
|
+
_ref$ariaLabel = _ref.ariaLabel,
|
|
16
|
+
ariaLabel = _ref$ariaLabel === void 0 ? 'Loading progress' : _ref$ariaLabel;
|
|
15
17
|
return /*#__PURE__*/React.createElement(StyledBar, {
|
|
16
18
|
progress: getNormalizedProgress(progress),
|
|
17
19
|
breakpoint: breakpoint,
|
|
18
20
|
positionBottom: positionBottom,
|
|
19
|
-
showOnTop: showOnTop
|
|
21
|
+
showOnTop: showOnTop,
|
|
22
|
+
ariaLabel: ariaLabel
|
|
20
23
|
});
|
|
21
24
|
};
|
|
@@ -34,11 +34,13 @@ export var StyledBar = function StyledBar(props) {
|
|
|
34
34
|
var progress = props.progress,
|
|
35
35
|
breakpoint = props.breakpoint,
|
|
36
36
|
positionBottom = props.positionBottom,
|
|
37
|
-
showOnTop = props.showOnTop
|
|
37
|
+
showOnTop = props.showOnTop,
|
|
38
|
+
ariaLabel = props.ariaLabel;
|
|
38
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
40
|
id: "styledBar",
|
|
40
41
|
role: "progressbar",
|
|
41
42
|
"aria-valuenow": progress,
|
|
43
|
+
"aria-label": ariaLabel,
|
|
42
44
|
className: ax(["_1reo15vq _18m915vq _1yt4xh0m _2rko1l7b _kqswstnw _1bsb1b7y _1ltv1ghs _bfhkrcrw _4t3i12iw _vchhusvi"]),
|
|
43
45
|
style: _objectSpread(_objectSpread({}, generateResponsiveStyles(breakpoint, positionBottom, showOnTop)), {}, {
|
|
44
46
|
"--_1xe2l1p": ix("".concat(width, "%")),
|
|
@@ -9,11 +9,13 @@ export var StyledBar = function StyledBar(props) {
|
|
|
9
9
|
var progress = props.progress,
|
|
10
10
|
breakpoint = props.breakpoint,
|
|
11
11
|
positionBottom = props.positionBottom,
|
|
12
|
-
showOnTop = props.showOnTop
|
|
12
|
+
showOnTop = props.showOnTop,
|
|
13
|
+
ariaLabel = props.ariaLabel;
|
|
13
14
|
return jsx("div", {
|
|
14
15
|
id: "styledBar",
|
|
15
16
|
role: "progressbar",
|
|
16
|
-
"aria-valuenow": progress
|
|
17
|
+
"aria-valuenow": progress,
|
|
18
|
+
"aria-label": ariaLabel
|
|
17
19
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
18
20
|
,
|
|
19
21
|
css: styledBarStyles({
|
|
@@ -101,7 +101,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
101
101
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
102
102
|
var analyticsContext = {
|
|
103
103
|
packageVersion: "@atlaskit/media-card",
|
|
104
|
-
packageName: "79.4.
|
|
104
|
+
packageName: "79.4.5",
|
|
105
105
|
componentName: 'mediaInlineCard',
|
|
106
106
|
component: 'mediaInlineCard'
|
|
107
107
|
};
|
|
@@ -13,7 +13,6 @@ import { MediaCardError } from '../errors';
|
|
|
13
13
|
import { fireMediaCardEvent } from '../utils/analytics';
|
|
14
14
|
import { getErrorStatusPayload, getFailedProcessingStatusPayload, getSucceededStatusPayload } from './mediaInlineCardAnalytics';
|
|
15
15
|
import { useCopyIntent } from '@atlaskit/media-client-react';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
|
|
18
17
|
// UI component which renders an inline link in the appropiate state based on a media file
|
|
19
18
|
export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
@@ -52,6 +51,9 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
|
52
51
|
var fireFailedOperationalEvent = function fireFailedOperationalEvent() {
|
|
53
52
|
var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new MediaCardError('missing-error-data');
|
|
54
53
|
var failReason = arguments.length > 1 ? arguments[1] : undefined;
|
|
54
|
+
if (isFailedEventSent) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
55
57
|
var payload = failReason ? getFailedProcessingStatusPayload(identifier.id, fileState) : getErrorStatusPayload(identifier.id, error, fileState);
|
|
56
58
|
setIsFailedEventSent(true);
|
|
57
59
|
fireMediaCardEvent(payload, createAnalyticsEvent);
|
|
@@ -78,9 +80,7 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
// Abort VC when click media inline card
|
|
81
|
-
|
|
82
|
-
pressTracing();
|
|
83
|
-
}
|
|
83
|
+
pressTracing();
|
|
84
84
|
};
|
|
85
85
|
var onMediaViewerClose = function onMediaViewerClose() {
|
|
86
86
|
return setMediaViewerVisible(false);
|
|
@@ -125,21 +125,23 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
|
125
125
|
if (subscribeError) {
|
|
126
126
|
var errorMessage = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? messages.failed_to_upload : messages.couldnt_load_file;
|
|
127
127
|
var errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
|
|
128
|
-
|
|
129
|
-
return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
128
|
+
fireFailedOperationalEvent(new MediaCardError(errorReason, subscribeError));
|
|
129
|
+
return renderContent( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
130
130
|
innerRef: copyNodeRef,
|
|
131
131
|
message: (intl || defaultIntl).formatMessage(errorMessage),
|
|
132
|
-
isSelected: isSelected
|
|
133
|
-
|
|
132
|
+
isSelected: isSelected,
|
|
133
|
+
onClick: onMediaInlineCardClick
|
|
134
|
+
}), renderMediaViewer()));
|
|
134
135
|
}
|
|
135
136
|
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
|
|
136
137
|
var error = new MediaCardError('error-file-state', toCommonMediaClientError(fileState));
|
|
137
|
-
|
|
138
|
-
return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
138
|
+
fireFailedOperationalEvent(error);
|
|
139
|
+
return renderContent( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
139
140
|
innerRef: copyNodeRef,
|
|
140
141
|
message: (intl || defaultIntl).formatMessage(messages.couldnt_load_file),
|
|
141
|
-
isSelected: isSelected
|
|
142
|
-
|
|
142
|
+
isSelected: isSelected,
|
|
143
|
+
onClick: onMediaInlineCardClick
|
|
144
|
+
}), renderMediaViewer()));
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
// Empty file handling
|
|
@@ -147,12 +149,13 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
|
147
149
|
var _error = new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName', {
|
|
148
150
|
id: fileState.id
|
|
149
151
|
}));
|
|
150
|
-
|
|
151
|
-
return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
152
|
+
fireFailedOperationalEvent(_error);
|
|
153
|
+
return renderContent( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
|
|
152
154
|
innerRef: copyNodeRef,
|
|
153
155
|
message: (intl || defaultIntl).formatMessage(messages.couldnt_load_file),
|
|
154
|
-
isSelected: isSelected
|
|
155
|
-
|
|
156
|
+
isSelected: isSelected,
|
|
157
|
+
onClick: onMediaInlineCardClick
|
|
158
|
+
}), renderMediaViewer()));
|
|
156
159
|
}
|
|
157
160
|
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
|
|
158
161
|
return /*#__PURE__*/React.createElement(MediaInlineCardLoadingView, {
|
|
@@ -171,7 +174,7 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
|
171
174
|
|
|
172
175
|
// Failed to process should still display the loaded view and enable Media Client to download
|
|
173
176
|
if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
|
|
174
|
-
|
|
177
|
+
fireFailedOperationalEvent(undefined, 'failed-processing');
|
|
175
178
|
}
|
|
176
179
|
var mediaType = fileState.mediaType,
|
|
177
180
|
name = fileState.name,
|
|
@@ -183,7 +186,6 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
|
183
186
|
mimeType: mimeType,
|
|
184
187
|
name: name
|
|
185
188
|
});
|
|
186
|
-
var mediaViewer = renderMediaViewer();
|
|
187
189
|
var formattedDate;
|
|
188
190
|
if (fileState.createdAt) {
|
|
189
191
|
var _ref2 = intl || {
|
|
@@ -207,7 +209,7 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
|
207
209
|
title: name,
|
|
208
210
|
onClick: onMediaInlineCardClick,
|
|
209
211
|
isSelected: isSelected
|
|
210
|
-
})),
|
|
212
|
+
})), renderMediaViewer()));
|
|
211
213
|
} else {
|
|
212
214
|
return renderContent( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MediaInlineCardLoadedView, {
|
|
213
215
|
innerRef: copyNodeRef,
|
|
@@ -215,7 +217,7 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
|
|
|
215
217
|
title: name,
|
|
216
218
|
onClick: onMediaInlineCardClick,
|
|
217
219
|
isSelected: isSelected
|
|
218
|
-
}),
|
|
220
|
+
}), renderMediaViewer()));
|
|
219
221
|
}
|
|
220
222
|
};
|
|
221
223
|
export var MediaInlineCard = injectIntl(MediaInlineCardInternal, {
|
|
@@ -8,7 +8,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
8
8
|
import { MediaCardError } from '../errors';
|
|
9
9
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
10
10
|
var packageName = "@atlaskit/media-card";
|
|
11
|
-
var packageVersion = "79.4.
|
|
11
|
+
var packageVersion = "79.4.5";
|
|
12
12
|
var SAMPLE_RATE = 0.05;
|
|
13
13
|
var concurrentExperience;
|
|
14
14
|
var getExperience = function getExperience(id) {
|
|
@@ -5,6 +5,7 @@ export type ProgressBarProps = {
|
|
|
5
5
|
breakpoint?: Breakpoint;
|
|
6
6
|
positionBottom?: boolean;
|
|
7
7
|
showOnTop?: boolean;
|
|
8
|
+
ariaLabel?: string;
|
|
8
9
|
};
|
|
9
10
|
export declare const getNormalizedProgress: (progress?: number) => number;
|
|
10
|
-
export declare const ProgressBar: ({ progress, breakpoint, positionBottom, showOnTop, }: ProgressBarProps) => React.JSX.Element;
|
|
11
|
+
export declare const ProgressBar: ({ progress, breakpoint, positionBottom, showOnTop, ariaLabel, }: ProgressBarProps) => React.JSX.Element;
|
|
@@ -5,6 +5,7 @@ export type ProgressBarProps = {
|
|
|
5
5
|
breakpoint?: Breakpoint;
|
|
6
6
|
positionBottom?: boolean;
|
|
7
7
|
showOnTop?: boolean;
|
|
8
|
+
ariaLabel?: string;
|
|
8
9
|
};
|
|
9
10
|
export declare const getNormalizedProgress: (progress?: number) => number;
|
|
10
|
-
export declare const ProgressBar: ({ progress, breakpoint, positionBottom, showOnTop, }: ProgressBarProps) => React.JSX.Element;
|
|
11
|
+
export declare const ProgressBar: ({ progress, breakpoint, positionBottom, showOnTop, ariaLabel, }: ProgressBarProps) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "79.4.
|
|
3
|
+
"version": "79.4.6",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
40
|
-
"@atlaskit/dropdown-menu": "^16.
|
|
40
|
+
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^3.5.0",
|
|
42
|
-
"@atlaskit/icon": "^27.
|
|
42
|
+
"@atlaskit/icon": "^27.7.0",
|
|
43
43
|
"@atlaskit/link": "^3.2.0",
|
|
44
|
-
"@atlaskit/media-client": "^35.
|
|
44
|
+
"@atlaskit/media-client": "^35.2.0",
|
|
45
45
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
46
46
|
"@atlaskit/media-common": "^12.3.0",
|
|
47
47
|
"@atlaskit/media-file-preview": "^0.11.0",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
52
52
|
"@atlaskit/primitives": "^14.10.0",
|
|
53
53
|
"@atlaskit/react-ufo": "^4.1.0",
|
|
54
|
-
"@atlaskit/spinner": "^
|
|
54
|
+
"@atlaskit/spinner": "^19.0.0",
|
|
55
55
|
"@atlaskit/theme": "^19.0.0",
|
|
56
56
|
"@atlaskit/tokens": "^5.6.0",
|
|
57
|
-
"@atlaskit/tooltip": "^20.
|
|
57
|
+
"@atlaskit/tooltip": "^20.4.0",
|
|
58
58
|
"@atlaskit/ufo": "^0.4.0",
|
|
59
59
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
60
60
|
"@babel/runtime": "^7.0.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@atlaskit/radio": "^8.1.0",
|
|
87
87
|
"@atlaskit/range": "^9.1.0",
|
|
88
88
|
"@atlaskit/ssr": "workspace:^",
|
|
89
|
-
"@atlaskit/toggle": "^15.
|
|
89
|
+
"@atlaskit/toggle": "^15.1.0",
|
|
90
90
|
"@atlaskit/visual-regression": "workspace:^",
|
|
91
91
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
92
92
|
"@atlassian/ufo": "^0.7.0",
|
|
@@ -142,9 +142,6 @@
|
|
|
142
142
|
"platform_media_resume_video_on_token_expiry": {
|
|
143
143
|
"type": "boolean"
|
|
144
144
|
},
|
|
145
|
-
"platform_abort_vc_click_file_card": {
|
|
146
|
-
"type": "boolean"
|
|
147
|
-
},
|
|
148
145
|
"platfrom_close_blindspot_for_img": {
|
|
149
146
|
"type": "boolean"
|
|
150
147
|
}
|