@atlaskit/media-card 79.0.8 → 79.0.10
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 +17 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/cardLoader.js +2 -1
- package/dist/cjs/card/inlinePlayer.js +1 -0
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/svgView/svgImage-compiled.js +2 -2
- package/dist/cjs/card/svgView/svgImage-emotion.js +2 -2
- package/dist/cjs/card/svgView/svgView.js +7 -95
- package/dist/cjs/card/svgView/types.js +5 -1
- package/dist/cjs/card/ui/wrapper/wrapper-compiled.compiled.css +1 -1
- package/dist/cjs/card/ui/wrapper/wrapper-compiled.js +2 -2
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/cardLoader.js +2 -1
- package/dist/es2019/card/inlinePlayer.js +1 -0
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/svgView/svgImage-compiled.js +1 -1
- package/dist/es2019/card/svgView/svgImage-emotion.js +1 -1
- package/dist/es2019/card/svgView/svgView.js +6 -89
- package/dist/es2019/card/svgView/types.js +1 -0
- package/dist/es2019/card/ui/wrapper/wrapper-compiled.compiled.css +1 -1
- package/dist/es2019/card/ui/wrapper/wrapper-compiled.js +1 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/cardLoader.js +2 -1
- package/dist/esm/card/inlinePlayer.js +1 -0
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/svgView/svgImage-compiled.js +1 -1
- package/dist/esm/card/svgView/svgImage-emotion.js +1 -1
- package/dist/esm/card/svgView/svgView.js +6 -93
- package/dist/esm/card/svgView/types.js +1 -0
- package/dist/esm/card/ui/wrapper/wrapper-compiled.compiled.css +1 -1
- package/dist/esm/card/ui/wrapper/wrapper-compiled.js +2 -2
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/svgView/svgImage-compiled.d.ts +2 -16
- package/dist/types/card/svgView/svgImage-emotion.d.ts +1 -16
- package/dist/types/card/svgView/svgView.d.ts +2 -21
- package/dist/types/card/svgView/types.d.ts +11 -0
- package/dist/types-ts4.5/card/svgView/svgImage-compiled.d.ts +2 -16
- package/dist/types-ts4.5/card/svgView/svgImage-emotion.d.ts +1 -16
- package/dist/types-ts4.5/card/svgView/svgView.d.ts +2 -21
- package/dist/types-ts4.5/card/svgView/types.d.ts +11 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 79.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#125907](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/125907)
|
|
8
|
+
[`b51d26098b1ba`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b51d26098b1ba) -
|
|
9
|
+
Fixed internal SVG component Compiled version
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 79.0.9
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#125393](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/125393)
|
|
17
|
+
[`1b580efc972ef`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1b580efc972ef) -
|
|
18
|
+
Fixed Card hovering issue
|
|
19
|
+
|
|
3
20
|
## 79.0.8
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/cjs/card/card.js
CHANGED
|
@@ -21,7 +21,7 @@ var _excluded = ["identifier"];
|
|
|
21
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
23
|
var packageName = "@atlaskit/media-card";
|
|
24
|
-
var packageVersion = "79.0.
|
|
24
|
+
var packageVersion = "79.0.10";
|
|
25
25
|
var CardBase = exports.CardBase = function CardBase(_ref) {
|
|
26
26
|
var identifier = _ref.identifier,
|
|
27
27
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -34,7 +34,8 @@ var MediaCardWithMediaClientProvider = (0, _reactLoadable.default)({
|
|
|
34
34
|
});
|
|
35
35
|
var CardLoader = function CardLoader(props) {
|
|
36
36
|
return /*#__PURE__*/_react.default.createElement(_segment.default, {
|
|
37
|
-
name: "media-card"
|
|
37
|
+
name: "media-card",
|
|
38
|
+
mode: "list"
|
|
38
39
|
}, /*#__PURE__*/_react.default.createElement(MediaCardContext.Provider, {
|
|
39
40
|
value: props
|
|
40
41
|
}, /*#__PURE__*/_react.default.createElement(MediaCardWithMediaClientProvider, props)));
|
|
@@ -175,6 +175,7 @@ var InlinePlayerBase = exports.InlinePlayerBase = function InlinePlayerBase(_ref
|
|
|
175
175
|
// === Render ===
|
|
176
176
|
return fileSrc ? /*#__PURE__*/_react.default.createElement(_inlinePlayerWrapper.InlinePlayerWrapper, {
|
|
177
177
|
testId: testId || 'media-card-inline-player',
|
|
178
|
+
"data-vc": "media-card-inline-player",
|
|
178
179
|
selected: {
|
|
179
180
|
selected: selected
|
|
180
181
|
},
|
|
@@ -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.0.
|
|
90
|
+
var packageVersion = "79.0.10";
|
|
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)({
|
|
@@ -6,7 +6,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.
|
|
9
|
+
exports.SvgView = void 0;
|
|
10
10
|
require("./svgImage-compiled.compiled.css");
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
@@ -19,7 +19,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
19
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
20
|
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; }
|
|
21
21
|
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; }
|
|
22
|
-
var getErrorReason =
|
|
22
|
+
var getErrorReason = function getErrorReason(svgReason) {
|
|
23
23
|
switch (svgReason) {
|
|
24
24
|
case 'img-error':
|
|
25
25
|
return 'svg-img-error';
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.SvgView = void 0;
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _react = require("@emotion/react");
|
|
@@ -20,7 +20,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
20
20
|
* @jsxRuntime classic
|
|
21
21
|
* @jsx jsx
|
|
22
22
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
23
|
-
var getErrorReason =
|
|
23
|
+
var getErrorReason = function getErrorReason(svgReason) {
|
|
24
24
|
switch (svgReason) {
|
|
25
25
|
case 'img-error':
|
|
26
26
|
return 'svg-img-error';
|
|
@@ -1,102 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports.
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var _mediaSvg = require("@atlaskit/media-svg");
|
|
16
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
-
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; }
|
|
19
|
-
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; } /**
|
|
20
|
-
* @jsxRuntime classic
|
|
21
|
-
* @jsx jsx
|
|
22
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
23
|
-
var getErrorReason = exports.getErrorReason = function getErrorReason(svgReason) {
|
|
24
|
-
switch (svgReason) {
|
|
25
|
-
case 'img-error':
|
|
26
|
-
return 'svg-img-error';
|
|
27
|
-
case 'binary-fetch':
|
|
28
|
-
return 'svg-binary-fetch';
|
|
29
|
-
case 'blob-to-datauri':
|
|
30
|
-
return 'svg-blob-to-datauri';
|
|
31
|
-
default:
|
|
32
|
-
return 'svg-unknown-error';
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
var svgRendererStyles = (0, _react.css)({
|
|
36
|
-
objectFit: 'contain',
|
|
37
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
38
|
-
backgroundColor: 'white' // This background color is for transparency
|
|
39
|
-
});
|
|
40
|
-
var svgRendererMaxDimensionStyles = (0, _react.css)({
|
|
41
|
-
maxWidth: '100%',
|
|
42
|
-
maxHeight: '100%'
|
|
43
|
-
});
|
|
44
|
-
var SvgView = exports.SvgView = function SvgView(_ref) {
|
|
45
|
-
var identifier = _ref.identifier,
|
|
46
|
-
resizeMode = _ref.resizeMode,
|
|
47
|
-
onLoad = _ref.onLoad,
|
|
48
|
-
onError = _ref.onError,
|
|
49
|
-
wrapperRef = _ref.wrapperRef,
|
|
50
|
-
alt = _ref.alt;
|
|
51
|
-
var _useState = (0, _react2.useState)(false),
|
|
52
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
53
|
-
didSvgRender = _useState2[0],
|
|
54
|
-
setDidSvgRender = _useState2[1];
|
|
55
|
-
var _useState3 = (0, _react2.useState)({}),
|
|
56
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
57
|
-
svgDimensions = _useState4[0],
|
|
58
|
-
setSvgDimensions = _useState4[1];
|
|
59
|
-
var imgRef = (0, _react2.useRef)(null);
|
|
60
|
-
var calculateDimensions = (0, _react2.useCallback)(function (targetImgElem) {
|
|
61
|
-
if (!wrapperRef.current || !targetImgElem) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
setSvgDimensions((0, _helpers.calculateSvgDimensions)(targetImgElem, wrapperRef.current, resizeMode));
|
|
65
|
-
}, [resizeMode, wrapperRef]);
|
|
66
|
-
var onSvgLoad = function onSvgLoad(evt) {
|
|
67
|
-
calculateDimensions(evt.currentTarget);
|
|
68
|
-
setDidSvgRender(true);
|
|
69
|
-
onLoad === null || onLoad === void 0 || onLoad();
|
|
70
|
-
};
|
|
71
|
-
var onSvgError = function onSvgError(err) {
|
|
72
|
-
var error = new _errors.MediaCardError(getErrorReason(err.primaryReason), err.secondaryError);
|
|
73
|
-
onError === null || onError === void 0 || onError(error);
|
|
74
|
-
};
|
|
75
|
-
(0, _react2.useEffect)(function () {
|
|
76
|
-
if (imgRef.current) {
|
|
77
|
-
calculateDimensions(imgRef.current);
|
|
78
|
-
}
|
|
79
|
-
}, [imgRef, calculateDimensions]);
|
|
80
|
-
var _useResolveSvg = (0, _mediaSvg.useResolveSvg)(identifier, onSvgError),
|
|
81
|
-
svgUrl = _useResolveSvg.svgUrl,
|
|
82
|
-
source = _useResolveSvg.source;
|
|
83
|
-
var width = svgDimensions.width,
|
|
84
|
-
height = svgDimensions.height;
|
|
85
|
-
return svgUrl && source ? (0, _react.jsx)("img", {
|
|
86
|
-
"data-testid": 'media-card-svg',
|
|
87
|
-
"data-fileid": identifier.id,
|
|
88
|
-
"data-filecollection": identifier.collectionName,
|
|
89
|
-
"data-source": source,
|
|
90
|
-
src: svgUrl,
|
|
91
|
-
alt: alt,
|
|
92
|
-
css: [svgRendererStyles, !width && !height && svgRendererMaxDimensionStyles],
|
|
93
|
-
style: _objectSpread({
|
|
94
|
-
visibility: didSvgRender ? 'visible' : 'hidden'
|
|
95
|
-
}, svgDimensions),
|
|
96
|
-
onLoad: onSvgLoad,
|
|
97
|
-
onError: function onError() {
|
|
98
|
-
onSvgError(new _mediaSvg.MediaSVGError('img-error'));
|
|
99
|
-
},
|
|
100
|
-
ref: imgRef
|
|
101
|
-
}) : null;
|
|
7
|
+
exports.SvgView = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
|
+
var _svgImageCompiled = require("./svgImage-compiled");
|
|
11
|
+
var _svgImageEmotion = require("./svgImage-emotion");
|
|
12
|
+
var SvgView = exports.SvgView = function SvgView(props) {
|
|
13
|
+
return (0, _platformFeatureFlags.fg)('platform_media_compiled') ? /*#__PURE__*/_react.default.createElement(_svgImageCompiled.SvgView, props) : /*#__PURE__*/_react.default.createElement(_svgImageEmotion.SvgView, props);
|
|
102
14
|
};
|
|
@@ -17,7 +17,7 @@ button:focus+._1hlmuwsq{outline:var(--_jz8ahf)}._10pb1osq>div{height:100%}
|
|
|
17
17
|
._bfhklslw{background-color:var(--_1jkcdu5)}
|
|
18
18
|
._c71l1osq{max-height:100%}
|
|
19
19
|
._ect41gqc{font-family:var(--ds-font-family-body,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
20
|
-
.
|
|
20
|
+
._eg54326j:hover .media-card-blanket{background-color:var(--_1ox8nit)}
|
|
21
21
|
._kqswh2mm{position:relative}
|
|
22
22
|
._mts3kb7n:focus-within .media-card-actions-bar, ._1ntskb7n:hover .media-card-actions-bar{opacity:1}
|
|
23
23
|
._p12f1osq{max-width:100%}
|
|
@@ -75,7 +75,7 @@ var Wrapper = exports.Wrapper = function Wrapper(props) {
|
|
|
75
75
|
id: "newFileExperienceWrapper"
|
|
76
76
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
77
77
|
,
|
|
78
|
-
className: (0, _runtime.ax)(["_2rko1l7b _vchhusvi _kqswh2mm _ect41gqc _p12f1osq _c71l1osq _1hlmuwsq _1rquusvi
|
|
78
|
+
className: (0, _runtime.ax)(["_2rko1l7b _vchhusvi _kqswh2mm _ect41gqc _p12f1osq _c71l1osq _1hlmuwsq _1rquusvi _eg54326j _mts3kb7n _1ntskb7n", displayBackground && "_bfhklslw", mediaCardCursor && cursorStyleMap[mediaCardCursor], wrapperShadowKey && shadowStyleMap[wrapperShadowKey], selected && "_1p1y1j28 _1rk81j28 _14r11j28 _1np21j28", isPlayButtonClickable && "_1y898vuz _19zy8vuz", isTickBoxSelectable && "_1yf91flm _1xp5rcbj", shouldDisplayTooltip && "_9m3z1osq _10pb1osq", _cardConstants.newFileExperienceClassName]),
|
|
79
79
|
"data-testid": testId,
|
|
80
80
|
ref: innerRef,
|
|
81
81
|
onClick: onClick,
|
|
@@ -85,7 +85,7 @@ var Wrapper = exports.Wrapper = function Wrapper(props) {
|
|
|
85
85
|
width: width,
|
|
86
86
|
height: height
|
|
87
87
|
}, getResponsiveStyles(breakpoint)), {}, {
|
|
88
|
-
"--
|
|
88
|
+
"--_1ox8nit": (0, _runtime.ix)("var(--ds-blanket, ".concat(_colors.N90A, ")")),
|
|
89
89
|
"--_jz8ahf": (0, _runtime.ix)("solid 2px ".concat("var(--ds-border-focused, ".concat(_colors.B100, ")"))),
|
|
90
90
|
"--_1jkcdu5": (0, _runtime.ix)("var(--ds-background-neutral, ".concat(_colors.N20, ")")),
|
|
91
91
|
"--_mt8cm6": (0, _runtime.ix)("var(--ds-background-input, ".concat(_colors.N0, ")")),
|
|
@@ -117,7 +117,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
|
|
|
117
117
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
118
118
|
var analyticsContext = {
|
|
119
119
|
packageVersion: "@atlaskit/media-card",
|
|
120
|
-
packageName: "79.0.
|
|
120
|
+
packageName: "79.0.10",
|
|
121
121
|
componentName: 'mediaInlineCard',
|
|
122
122
|
component: 'mediaInlineCard'
|
|
123
123
|
};
|
|
@@ -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.0.
|
|
18
|
+
var packageVersion = "79.0.10";
|
|
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.0.
|
|
12
|
+
const packageVersion = "79.0.10";
|
|
13
13
|
export const CardBase = ({
|
|
14
14
|
identifier,
|
|
15
15
|
...otherProps
|
|
@@ -16,7 +16,8 @@ const MediaCardWithMediaClientProvider = Loadable({
|
|
|
16
16
|
});
|
|
17
17
|
const CardLoader = props => {
|
|
18
18
|
return /*#__PURE__*/React.createElement(UFOSegment, {
|
|
19
|
-
name: "media-card"
|
|
19
|
+
name: "media-card",
|
|
20
|
+
mode: "list"
|
|
20
21
|
}, /*#__PURE__*/React.createElement(MediaCardContext.Provider, {
|
|
21
22
|
value: props
|
|
22
23
|
}, /*#__PURE__*/React.createElement(MediaCardWithMediaClientProvider, props)));
|
|
@@ -119,6 +119,7 @@ export const InlinePlayerBase = ({
|
|
|
119
119
|
// === Render ===
|
|
120
120
|
return fileSrc ? /*#__PURE__*/React.createElement(InlinePlayerWrapper, {
|
|
121
121
|
testId: testId || 'media-card-inline-player',
|
|
122
|
+
"data-vc": "media-card-inline-player",
|
|
122
123
|
selected: {
|
|
123
124
|
selected
|
|
124
125
|
},
|
|
@@ -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.0.
|
|
69
|
+
const packageVersion = "79.0.10";
|
|
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({
|
|
@@ -5,7 +5,7 @@ import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
|
5
5
|
import { MediaCardError } from '../../errors';
|
|
6
6
|
import { calculateSvgDimensions } from './helpers';
|
|
7
7
|
import { useResolveSvg, MediaSVGError } from '@atlaskit/media-svg';
|
|
8
|
-
|
|
8
|
+
const getErrorReason = svgReason => {
|
|
9
9
|
switch (svgReason) {
|
|
10
10
|
case 'img-error':
|
|
11
11
|
return 'svg-img-error';
|
|
@@ -8,7 +8,7 @@ import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
|
8
8
|
import { MediaCardError } from '../../errors';
|
|
9
9
|
import { calculateSvgDimensions } from './helpers';
|
|
10
10
|
import { useResolveSvg, MediaSVGError } from '@atlaskit/media-svg';
|
|
11
|
-
|
|
11
|
+
const getErrorReason = svgReason => {
|
|
12
12
|
switch (svgReason) {
|
|
13
13
|
case 'img-error':
|
|
14
14
|
return 'svg-img-error';
|
|
@@ -1,90 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
8
|
-
import { MediaCardError } from '../../errors';
|
|
9
|
-
import { calculateSvgDimensions } from './helpers';
|
|
10
|
-
import { useResolveSvg, MediaSVGError } from '@atlaskit/media-svg';
|
|
11
|
-
export const getErrorReason = svgReason => {
|
|
12
|
-
switch (svgReason) {
|
|
13
|
-
case 'img-error':
|
|
14
|
-
return 'svg-img-error';
|
|
15
|
-
case 'binary-fetch':
|
|
16
|
-
return 'svg-binary-fetch';
|
|
17
|
-
case 'blob-to-datauri':
|
|
18
|
-
return 'svg-blob-to-datauri';
|
|
19
|
-
default:
|
|
20
|
-
return 'svg-unknown-error';
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const svgRendererStyles = css({
|
|
24
|
-
objectFit: 'contain',
|
|
25
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
26
|
-
backgroundColor: 'white' // This background color is for transparency
|
|
27
|
-
});
|
|
28
|
-
const svgRendererMaxDimensionStyles = css({
|
|
29
|
-
maxWidth: '100%',
|
|
30
|
-
maxHeight: '100%'
|
|
31
|
-
});
|
|
32
|
-
export const SvgView = ({
|
|
33
|
-
identifier,
|
|
34
|
-
resizeMode,
|
|
35
|
-
onLoad,
|
|
36
|
-
onError,
|
|
37
|
-
wrapperRef,
|
|
38
|
-
alt
|
|
39
|
-
}) => {
|
|
40
|
-
const [didSvgRender, setDidSvgRender] = useState(false);
|
|
41
|
-
const [svgDimensions, setSvgDimensions] = useState({});
|
|
42
|
-
const imgRef = useRef(null);
|
|
43
|
-
const calculateDimensions = useCallback(targetImgElem => {
|
|
44
|
-
if (!wrapperRef.current || !targetImgElem) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
setSvgDimensions(calculateSvgDimensions(targetImgElem, wrapperRef.current, resizeMode));
|
|
48
|
-
}, [resizeMode, wrapperRef]);
|
|
49
|
-
const onSvgLoad = evt => {
|
|
50
|
-
calculateDimensions(evt.currentTarget);
|
|
51
|
-
setDidSvgRender(true);
|
|
52
|
-
onLoad === null || onLoad === void 0 ? void 0 : onLoad();
|
|
53
|
-
};
|
|
54
|
-
const onSvgError = err => {
|
|
55
|
-
const error = new MediaCardError(getErrorReason(err.primaryReason), err.secondaryError);
|
|
56
|
-
onError === null || onError === void 0 ? void 0 : onError(error);
|
|
57
|
-
};
|
|
58
|
-
useEffect(() => {
|
|
59
|
-
if (imgRef.current) {
|
|
60
|
-
calculateDimensions(imgRef.current);
|
|
61
|
-
}
|
|
62
|
-
}, [imgRef, calculateDimensions]);
|
|
63
|
-
const {
|
|
64
|
-
svgUrl,
|
|
65
|
-
source
|
|
66
|
-
} = useResolveSvg(identifier, onSvgError);
|
|
67
|
-
const {
|
|
68
|
-
width,
|
|
69
|
-
height
|
|
70
|
-
} = svgDimensions;
|
|
71
|
-
return svgUrl && source ? jsx("img", {
|
|
72
|
-
"data-testid": 'media-card-svg',
|
|
73
|
-
"data-fileid": identifier.id,
|
|
74
|
-
"data-filecollection": identifier.collectionName,
|
|
75
|
-
"data-source": source,
|
|
76
|
-
src: svgUrl,
|
|
77
|
-
alt: alt,
|
|
78
|
-
css: [svgRendererStyles, !width && !height && svgRendererMaxDimensionStyles],
|
|
79
|
-
style: {
|
|
80
|
-
visibility: didSvgRender ? 'visible' : 'hidden',
|
|
81
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
82
|
-
...svgDimensions
|
|
83
|
-
},
|
|
84
|
-
onLoad: onSvgLoad,
|
|
85
|
-
onError: () => {
|
|
86
|
-
onSvgError(new MediaSVGError('img-error'));
|
|
87
|
-
},
|
|
88
|
-
ref: imgRef
|
|
89
|
-
}) : null;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { SvgView as SvgViewCompiled } from './svgImage-compiled';
|
|
4
|
+
import { SvgView as SvgViewEmotion } from './svgImage-emotion';
|
|
5
|
+
export const SvgView = props => {
|
|
6
|
+
return fg('platform_media_compiled') ? /*#__PURE__*/React.createElement(SvgViewCompiled, props) : /*#__PURE__*/React.createElement(SvgViewEmotion, props);
|
|
90
7
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -17,7 +17,7 @@ button:focus+._1hlmvd8c{outline:solid 2px var(--ds-border-focused,#4c9aff)}._10p
|
|
|
17
17
|
._bfhk1s4m{background-color:var(--ds-background-neutral,#f4f5f7)}
|
|
18
18
|
._c71l1osq{max-height:100%}
|
|
19
19
|
._ect41gqc{font-family:var(--ds-font-family-body,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
20
|
-
.
|
|
20
|
+
._eg54rvv2:hover .media-card-blanket{background-color:var(--ds-blanket,rgba(9,30,66,.48))}
|
|
21
21
|
._kqswh2mm{position:relative}
|
|
22
22
|
._mts3kb7n:focus-within .media-card-actions-bar, ._1ntskb7n:hover .media-card-actions-bar{opacity:1}
|
|
23
23
|
._p12f1osq{max-width:100%}
|
|
@@ -70,7 +70,7 @@ export const Wrapper = props => {
|
|
|
70
70
|
id: "newFileExperienceWrapper"
|
|
71
71
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
72
72
|
,
|
|
73
|
-
className: ax(["_2rko1l7b _vchhusvi _kqswh2mm _ect41gqc _p12f1osq _c71l1osq _1hlmvd8c _1rquusvi
|
|
73
|
+
className: ax(["_2rko1l7b _vchhusvi _kqswh2mm _ect41gqc _p12f1osq _c71l1osq _1hlmvd8c _1rquusvi _eg54rvv2 _mts3kb7n _1ntskb7n", displayBackground && "_bfhk1s4m", mediaCardCursor && cursorStyleMap[mediaCardCursor], wrapperShadowKey && shadowStyleMap[wrapperShadowKey], selected && "_1p1y1j28 _1rk81j28 _14r11j28 _1np21j28", isPlayButtonClickable && "_1y898vuz _19zy8vuz", isTickBoxSelectable && "_1yf91j9a _1xp5kufk", shouldDisplayTooltip && "_9m3z1osq _10pb1osq", newFileExperienceClassName]),
|
|
74
74
|
"data-testid": testId,
|
|
75
75
|
style: {
|
|
76
76
|
width,
|
|
@@ -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.0.
|
|
40
|
+
packageName: "79.0.10",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -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.0.
|
|
8
|
+
const packageVersion = "79.0.10";
|
|
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.0.
|
|
14
|
+
var packageVersion = "79.0.10";
|
|
15
15
|
export var CardBase = function CardBase(_ref) {
|
|
16
16
|
var identifier = _ref.identifier,
|
|
17
17
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -22,7 +22,8 @@ var MediaCardWithMediaClientProvider = Loadable({
|
|
|
22
22
|
});
|
|
23
23
|
var CardLoader = function CardLoader(props) {
|
|
24
24
|
return /*#__PURE__*/React.createElement(UFOSegment, {
|
|
25
|
-
name: "media-card"
|
|
25
|
+
name: "media-card",
|
|
26
|
+
mode: "list"
|
|
26
27
|
}, /*#__PURE__*/React.createElement(MediaCardContext.Provider, {
|
|
27
28
|
value: props
|
|
28
29
|
}, /*#__PURE__*/React.createElement(MediaCardWithMediaClientProvider, props)));
|
|
@@ -165,6 +165,7 @@ export var InlinePlayerBase = function InlinePlayerBase(_ref) {
|
|
|
165
165
|
// === Render ===
|
|
166
166
|
return fileSrc ? /*#__PURE__*/React.createElement(InlinePlayerWrapper, {
|
|
167
167
|
testId: testId || 'media-card-inline-player',
|
|
168
|
+
"data-vc": "media-card-inline-player",
|
|
168
169
|
selected: {
|
|
169
170
|
selected: selected
|
|
170
171
|
},
|
|
@@ -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.0.
|
|
83
|
+
var packageVersion = "79.0.10";
|
|
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({
|
|
@@ -9,7 +9,7 @@ import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
|
9
9
|
import { MediaCardError } from '../../errors';
|
|
10
10
|
import { calculateSvgDimensions } from './helpers';
|
|
11
11
|
import { useResolveSvg, MediaSVGError } from '@atlaskit/media-svg';
|
|
12
|
-
|
|
12
|
+
var getErrorReason = function getErrorReason(svgReason) {
|
|
13
13
|
switch (svgReason) {
|
|
14
14
|
case 'img-error':
|
|
15
15
|
return 'svg-img-error';
|
|
@@ -12,7 +12,7 @@ import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
|
12
12
|
import { MediaCardError } from '../../errors';
|
|
13
13
|
import { calculateSvgDimensions } from './helpers';
|
|
14
14
|
import { useResolveSvg, MediaSVGError } from '@atlaskit/media-svg';
|
|
15
|
-
|
|
15
|
+
var getErrorReason = function getErrorReason(svgReason) {
|
|
16
16
|
switch (svgReason) {
|
|
17
17
|
case 'img-error':
|
|
18
18
|
return 'svg-img-error';
|
|
@@ -1,94 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* @jsx jsx
|
|
8
|
-
*/
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
import { jsx, css } from '@emotion/react';
|
|
11
|
-
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
12
|
-
import { MediaCardError } from '../../errors';
|
|
13
|
-
import { calculateSvgDimensions } from './helpers';
|
|
14
|
-
import { useResolveSvg, MediaSVGError } from '@atlaskit/media-svg';
|
|
15
|
-
export var getErrorReason = function getErrorReason(svgReason) {
|
|
16
|
-
switch (svgReason) {
|
|
17
|
-
case 'img-error':
|
|
18
|
-
return 'svg-img-error';
|
|
19
|
-
case 'binary-fetch':
|
|
20
|
-
return 'svg-binary-fetch';
|
|
21
|
-
case 'blob-to-datauri':
|
|
22
|
-
return 'svg-blob-to-datauri';
|
|
23
|
-
default:
|
|
24
|
-
return 'svg-unknown-error';
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
var svgRendererStyles = css({
|
|
28
|
-
objectFit: 'contain',
|
|
29
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
30
|
-
backgroundColor: 'white' // This background color is for transparency
|
|
31
|
-
});
|
|
32
|
-
var svgRendererMaxDimensionStyles = css({
|
|
33
|
-
maxWidth: '100%',
|
|
34
|
-
maxHeight: '100%'
|
|
35
|
-
});
|
|
36
|
-
export var SvgView = function SvgView(_ref) {
|
|
37
|
-
var identifier = _ref.identifier,
|
|
38
|
-
resizeMode = _ref.resizeMode,
|
|
39
|
-
onLoad = _ref.onLoad,
|
|
40
|
-
onError = _ref.onError,
|
|
41
|
-
wrapperRef = _ref.wrapperRef,
|
|
42
|
-
alt = _ref.alt;
|
|
43
|
-
var _useState = useState(false),
|
|
44
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
-
didSvgRender = _useState2[0],
|
|
46
|
-
setDidSvgRender = _useState2[1];
|
|
47
|
-
var _useState3 = useState({}),
|
|
48
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
49
|
-
svgDimensions = _useState4[0],
|
|
50
|
-
setSvgDimensions = _useState4[1];
|
|
51
|
-
var imgRef = useRef(null);
|
|
52
|
-
var calculateDimensions = useCallback(function (targetImgElem) {
|
|
53
|
-
if (!wrapperRef.current || !targetImgElem) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
setSvgDimensions(calculateSvgDimensions(targetImgElem, wrapperRef.current, resizeMode));
|
|
57
|
-
}, [resizeMode, wrapperRef]);
|
|
58
|
-
var onSvgLoad = function onSvgLoad(evt) {
|
|
59
|
-
calculateDimensions(evt.currentTarget);
|
|
60
|
-
setDidSvgRender(true);
|
|
61
|
-
onLoad === null || onLoad === void 0 || onLoad();
|
|
62
|
-
};
|
|
63
|
-
var onSvgError = function onSvgError(err) {
|
|
64
|
-
var error = new MediaCardError(getErrorReason(err.primaryReason), err.secondaryError);
|
|
65
|
-
onError === null || onError === void 0 || onError(error);
|
|
66
|
-
};
|
|
67
|
-
useEffect(function () {
|
|
68
|
-
if (imgRef.current) {
|
|
69
|
-
calculateDimensions(imgRef.current);
|
|
70
|
-
}
|
|
71
|
-
}, [imgRef, calculateDimensions]);
|
|
72
|
-
var _useResolveSvg = useResolveSvg(identifier, onSvgError),
|
|
73
|
-
svgUrl = _useResolveSvg.svgUrl,
|
|
74
|
-
source = _useResolveSvg.source;
|
|
75
|
-
var width = svgDimensions.width,
|
|
76
|
-
height = svgDimensions.height;
|
|
77
|
-
return svgUrl && source ? jsx("img", {
|
|
78
|
-
"data-testid": 'media-card-svg',
|
|
79
|
-
"data-fileid": identifier.id,
|
|
80
|
-
"data-filecollection": identifier.collectionName,
|
|
81
|
-
"data-source": source,
|
|
82
|
-
src: svgUrl,
|
|
83
|
-
alt: alt,
|
|
84
|
-
css: [svgRendererStyles, !width && !height && svgRendererMaxDimensionStyles],
|
|
85
|
-
style: _objectSpread({
|
|
86
|
-
visibility: didSvgRender ? 'visible' : 'hidden'
|
|
87
|
-
}, svgDimensions),
|
|
88
|
-
onLoad: onSvgLoad,
|
|
89
|
-
onError: function onError() {
|
|
90
|
-
onSvgError(new MediaSVGError('img-error'));
|
|
91
|
-
},
|
|
92
|
-
ref: imgRef
|
|
93
|
-
}) : null;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { SvgView as SvgViewCompiled } from './svgImage-compiled';
|
|
4
|
+
import { SvgView as SvgViewEmotion } from './svgImage-emotion';
|
|
5
|
+
export var SvgView = function SvgView(props) {
|
|
6
|
+
return fg('platform_media_compiled') ? /*#__PURE__*/React.createElement(SvgViewCompiled, props) : /*#__PURE__*/React.createElement(SvgViewEmotion, props);
|
|
94
7
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -17,7 +17,7 @@ button:focus+._1hlmuwsq{outline:var(--_jz8ahf)}._10pb1osq>div{height:100%}
|
|
|
17
17
|
._bfhklslw{background-color:var(--_1jkcdu5)}
|
|
18
18
|
._c71l1osq{max-height:100%}
|
|
19
19
|
._ect41gqc{font-family:var(--ds-font-family-body,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
20
|
-
.
|
|
20
|
+
._eg54326j:hover .media-card-blanket{background-color:var(--_1ox8nit)}
|
|
21
21
|
._kqswh2mm{position:relative}
|
|
22
22
|
._mts3kb7n:focus-within .media-card-actions-bar, ._1ntskb7n:hover .media-card-actions-bar{opacity:1}
|
|
23
23
|
._p12f1osq{max-width:100%}
|
|
@@ -65,7 +65,7 @@ export var Wrapper = function Wrapper(props) {
|
|
|
65
65
|
id: "newFileExperienceWrapper"
|
|
66
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
67
67
|
,
|
|
68
|
-
className: ax(["_2rko1l7b _vchhusvi _kqswh2mm _ect41gqc _p12f1osq _c71l1osq _1hlmuwsq _1rquusvi
|
|
68
|
+
className: ax(["_2rko1l7b _vchhusvi _kqswh2mm _ect41gqc _p12f1osq _c71l1osq _1hlmuwsq _1rquusvi _eg54326j _mts3kb7n _1ntskb7n", displayBackground && "_bfhklslw", mediaCardCursor && cursorStyleMap[mediaCardCursor], wrapperShadowKey && shadowStyleMap[wrapperShadowKey], selected && "_1p1y1j28 _1rk81j28 _14r11j28 _1np21j28", isPlayButtonClickable && "_1y898vuz _19zy8vuz", isTickBoxSelectable && "_1yf91flm _1xp5rcbj", shouldDisplayTooltip && "_9m3z1osq _10pb1osq", newFileExperienceClassName]),
|
|
69
69
|
"data-testid": testId,
|
|
70
70
|
ref: innerRef,
|
|
71
71
|
onClick: onClick,
|
|
@@ -75,7 +75,7 @@ export var Wrapper = function Wrapper(props) {
|
|
|
75
75
|
width: width,
|
|
76
76
|
height: height
|
|
77
77
|
}, getResponsiveStyles(breakpoint)), {}, {
|
|
78
|
-
"--
|
|
78
|
+
"--_1ox8nit": ix("var(--ds-blanket, ".concat(N90A, ")")),
|
|
79
79
|
"--_jz8ahf": ix("solid 2px ".concat("var(--ds-border-focused, ".concat(B100, ")"))),
|
|
80
80
|
"--_1jkcdu5": ix("var(--ds-background-neutral, ".concat(N20, ")")),
|
|
81
81
|
"--_mt8cm6": ix("var(--ds-background-input, ".concat(N0, ")")),
|
|
@@ -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.0.
|
|
104
|
+
packageName: "79.0.10",
|
|
105
105
|
componentName: 'mediaInlineCard',
|
|
106
106
|
component: 'mediaInlineCard'
|
|
107
107
|
};
|
|
@@ -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.0.
|
|
11
|
+
var packageVersion = "79.0.10";
|
|
12
12
|
var SAMPLE_RATE = 0.05;
|
|
13
13
|
var concurrentExperience;
|
|
14
14
|
var getExperience = function getExperience(id) {
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { type WithAnalyticsEventsProps, type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import { MediaCardError, type SvgPrimaryReason } from '../../errors';
|
|
5
|
-
import { type MediaSVGErrorReason } from '@atlaskit/media-svg';
|
|
6
|
-
export declare const getErrorReason: (svgReason: MediaSVGErrorReason) => SvgPrimaryReason;
|
|
7
|
-
export type OnClickFn = (event: React.MouseEvent<HTMLDivElement | HTMLButtonElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
8
|
-
export interface SvgViewBaseOwnProps {
|
|
9
|
-
readonly identifier: FileIdentifier;
|
|
10
|
-
readonly resizeMode: ImageResizeMode;
|
|
11
|
-
readonly onLoad?: () => void;
|
|
12
|
-
readonly onError?: (error: MediaCardError) => void;
|
|
13
|
-
readonly wrapperRef: React.RefObject<HTMLDivElement>;
|
|
14
|
-
readonly alt?: string;
|
|
15
|
-
}
|
|
16
|
-
export type SvgViewProps = SvgViewBaseOwnProps & WithAnalyticsEventsProps;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { SvgViewProps } from './types';
|
|
17
3
|
export declare const SvgView: ({ identifier, resizeMode, onLoad, onError, wrapperRef, alt, }: SvgViewProps) => JSX.Element | null;
|
|
@@ -3,20 +3,5 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
|
-
import
|
|
7
|
-
import { type FileIdentifier, type ImageResizeMode } from '@atlaskit/media-client';
|
|
8
|
-
import { type WithAnalyticsEventsProps, type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
9
|
-
import { MediaCardError, type SvgPrimaryReason } from '../../errors';
|
|
10
|
-
import { type MediaSVGErrorReason } from '@atlaskit/media-svg';
|
|
11
|
-
export declare const getErrorReason: (svgReason: MediaSVGErrorReason) => SvgPrimaryReason;
|
|
12
|
-
export type OnClickFn = (event: React.MouseEvent<HTMLDivElement | HTMLButtonElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
13
|
-
export interface SvgViewBaseOwnProps {
|
|
14
|
-
readonly identifier: FileIdentifier;
|
|
15
|
-
readonly resizeMode: ImageResizeMode;
|
|
16
|
-
readonly onLoad?: () => void;
|
|
17
|
-
readonly onError?: (error: MediaCardError) => void;
|
|
18
|
-
readonly wrapperRef: React.RefObject<HTMLDivElement>;
|
|
19
|
-
readonly alt?: string;
|
|
20
|
-
}
|
|
21
|
-
export type SvgViewProps = SvgViewBaseOwnProps & WithAnalyticsEventsProps;
|
|
6
|
+
import type { SvgViewProps } from './types';
|
|
22
7
|
export declare const SvgView: ({ identifier, resizeMode, onLoad, onError, wrapperRef, alt, }: SvgViewProps) => jsx.JSX.Element | null;
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
1
|
import React from 'react';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
import { MediaCardError, type SvgPrimaryReason } from '../../errors';
|
|
10
|
-
import { type MediaSVGErrorReason } from '@atlaskit/media-svg';
|
|
11
|
-
export declare const getErrorReason: (svgReason: MediaSVGErrorReason) => SvgPrimaryReason;
|
|
12
|
-
export type OnClickFn = (event: React.MouseEvent<HTMLDivElement | HTMLButtonElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
13
|
-
export interface SvgViewBaseOwnProps {
|
|
14
|
-
readonly identifier: FileIdentifier;
|
|
15
|
-
readonly resizeMode: ImageResizeMode;
|
|
16
|
-
readonly onLoad?: () => void;
|
|
17
|
-
readonly onError?: (error: MediaCardError) => void;
|
|
18
|
-
readonly wrapperRef: React.RefObject<HTMLDivElement>;
|
|
19
|
-
readonly alt?: string;
|
|
20
|
-
}
|
|
21
|
-
export type SvgViewProps = SvgViewBaseOwnProps & WithAnalyticsEventsProps;
|
|
22
|
-
export declare const SvgView: ({ identifier, resizeMode, onLoad, onError, wrapperRef, alt, }: SvgViewProps) => jsx.JSX.Element | null;
|
|
2
|
+
import type { SvgViewProps } from './types';
|
|
3
|
+
export declare const SvgView: (props: SvgViewProps) => React.JSX.Element;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type FileIdentifier, type ImageResizeMode } from '@atlaskit/media-client';
|
|
3
|
+
import { MediaCardError } from '../../errors';
|
|
1
4
|
export type ContentSource = 'remote' | 'local';
|
|
5
|
+
export type SvgViewProps = {
|
|
6
|
+
readonly identifier: FileIdentifier;
|
|
7
|
+
readonly resizeMode: ImageResizeMode;
|
|
8
|
+
readonly onLoad?: () => void;
|
|
9
|
+
readonly onError?: (error: MediaCardError) => void;
|
|
10
|
+
readonly wrapperRef: React.RefObject<HTMLDivElement>;
|
|
11
|
+
readonly alt?: string;
|
|
12
|
+
};
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { type WithAnalyticsEventsProps, type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
-
import { MediaCardError, type SvgPrimaryReason } from '../../errors';
|
|
5
|
-
import { type MediaSVGErrorReason } from '@atlaskit/media-svg';
|
|
6
|
-
export declare const getErrorReason: (svgReason: MediaSVGErrorReason) => SvgPrimaryReason;
|
|
7
|
-
export type OnClickFn = (event: React.MouseEvent<HTMLDivElement | HTMLButtonElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
8
|
-
export interface SvgViewBaseOwnProps {
|
|
9
|
-
readonly identifier: FileIdentifier;
|
|
10
|
-
readonly resizeMode: ImageResizeMode;
|
|
11
|
-
readonly onLoad?: () => void;
|
|
12
|
-
readonly onError?: (error: MediaCardError) => void;
|
|
13
|
-
readonly wrapperRef: React.RefObject<HTMLDivElement>;
|
|
14
|
-
readonly alt?: string;
|
|
15
|
-
}
|
|
16
|
-
export type SvgViewProps = SvgViewBaseOwnProps & WithAnalyticsEventsProps;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { SvgViewProps } from './types';
|
|
17
3
|
export declare const SvgView: ({ identifier, resizeMode, onLoad, onError, wrapperRef, alt, }: SvgViewProps) => JSX.Element | null;
|
|
@@ -3,20 +3,5 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
|
-
import
|
|
7
|
-
import { type FileIdentifier, type ImageResizeMode } from '@atlaskit/media-client';
|
|
8
|
-
import { type WithAnalyticsEventsProps, type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
9
|
-
import { MediaCardError, type SvgPrimaryReason } from '../../errors';
|
|
10
|
-
import { type MediaSVGErrorReason } from '@atlaskit/media-svg';
|
|
11
|
-
export declare const getErrorReason: (svgReason: MediaSVGErrorReason) => SvgPrimaryReason;
|
|
12
|
-
export type OnClickFn = (event: React.MouseEvent<HTMLDivElement | HTMLButtonElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
13
|
-
export interface SvgViewBaseOwnProps {
|
|
14
|
-
readonly identifier: FileIdentifier;
|
|
15
|
-
readonly resizeMode: ImageResizeMode;
|
|
16
|
-
readonly onLoad?: () => void;
|
|
17
|
-
readonly onError?: (error: MediaCardError) => void;
|
|
18
|
-
readonly wrapperRef: React.RefObject<HTMLDivElement>;
|
|
19
|
-
readonly alt?: string;
|
|
20
|
-
}
|
|
21
|
-
export type SvgViewProps = SvgViewBaseOwnProps & WithAnalyticsEventsProps;
|
|
6
|
+
import type { SvgViewProps } from './types';
|
|
22
7
|
export declare const SvgView: ({ identifier, resizeMode, onLoad, onError, wrapperRef, alt, }: SvgViewProps) => jsx.JSX.Element | null;
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
1
|
import React from 'react';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
import { MediaCardError, type SvgPrimaryReason } from '../../errors';
|
|
10
|
-
import { type MediaSVGErrorReason } from '@atlaskit/media-svg';
|
|
11
|
-
export declare const getErrorReason: (svgReason: MediaSVGErrorReason) => SvgPrimaryReason;
|
|
12
|
-
export type OnClickFn = (event: React.MouseEvent<HTMLDivElement | HTMLButtonElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
13
|
-
export interface SvgViewBaseOwnProps {
|
|
14
|
-
readonly identifier: FileIdentifier;
|
|
15
|
-
readonly resizeMode: ImageResizeMode;
|
|
16
|
-
readonly onLoad?: () => void;
|
|
17
|
-
readonly onError?: (error: MediaCardError) => void;
|
|
18
|
-
readonly wrapperRef: React.RefObject<HTMLDivElement>;
|
|
19
|
-
readonly alt?: string;
|
|
20
|
-
}
|
|
21
|
-
export type SvgViewProps = SvgViewBaseOwnProps & WithAnalyticsEventsProps;
|
|
22
|
-
export declare const SvgView: ({ identifier, resizeMode, onLoad, onError, wrapperRef, alt, }: SvgViewProps) => jsx.JSX.Element | null;
|
|
2
|
+
import type { SvgViewProps } from './types';
|
|
3
|
+
export declare const SvgView: (props: SvgViewProps) => React.JSX.Element;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type FileIdentifier, type ImageResizeMode } from '@atlaskit/media-client';
|
|
3
|
+
import { MediaCardError } from '../../errors';
|
|
1
4
|
export type ContentSource = 'remote' | 'local';
|
|
5
|
+
export type SvgViewProps = {
|
|
6
|
+
readonly identifier: FileIdentifier;
|
|
7
|
+
readonly resizeMode: ImageResizeMode;
|
|
8
|
+
readonly onLoad?: () => void;
|
|
9
|
+
readonly onError?: (error: MediaCardError) => void;
|
|
10
|
+
readonly wrapperRef: React.RefObject<HTMLDivElement>;
|
|
11
|
+
readonly alt?: string;
|
|
12
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "79.0.
|
|
3
|
+
"version": "79.0.10",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"@atlaskit/media-ui": "^28.0.0",
|
|
50
50
|
"@atlaskit/media-viewer": "^52.0.0",
|
|
51
51
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
52
|
-
"@atlaskit/primitives": "^14.
|
|
52
|
+
"@atlaskit/primitives": "^14.2.0",
|
|
53
53
|
"@atlaskit/react-ufo": "^3.4.0",
|
|
54
54
|
"@atlaskit/spinner": "^18.0.0",
|
|
55
55
|
"@atlaskit/theme": "^18.0.0",
|
|
56
|
-
"@atlaskit/tokens": "^4.
|
|
56
|
+
"@atlaskit/tokens": "^4.5.0",
|
|
57
57
|
"@atlaskit/tooltip": "^20.0.0",
|
|
58
58
|
"@atlaskit/ufo": "^0.4.0",
|
|
59
59
|
"@atlaskit/visually-hidden": "^3.0.0",
|