@atlaskit/media-card 77.12.1 → 77.12.3
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 +18 -0
- package/compass.yml +6 -3
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/cardView.js +1 -1
- package/dist/cjs/card/inlinePlayerWrapper.js +4 -1
- package/dist/cjs/card/inlinePlayerWrapperStyles.js +1 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/ui/actionsBar/actionsBarWrapper.js +4 -1
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionButton.js +5 -1
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionsView.js +1 -1
- package/dist/cjs/card/ui/actionsBar/cardActions/styles.js +14 -2
- package/dist/cjs/card/ui/actionsBar/styles.js +13 -8
- package/dist/cjs/card/ui/blanket/blanket.js +2 -0
- package/dist/cjs/card/ui/blanket/styles.js +8 -2
- package/dist/cjs/card/ui/iconMessage/iconMessageWrapper.js +3 -0
- package/dist/cjs/card/ui/iconWrapper/iconWrapper.js +4 -1
- package/dist/cjs/card/ui/iconWrapper/styles.js +3 -0
- package/dist/cjs/card/ui/openMediaViewerButton/openMediaViewerButton.js +9 -20
- package/dist/cjs/card/ui/playButton/playButtonBackground.js +2 -1
- package/dist/cjs/card/ui/playButton/playButtonWrapper.js +2 -1
- package/dist/cjs/card/ui/playButton/styles.js +7 -0
- package/dist/cjs/card/ui/progressBar/styledBar.js +4 -1
- package/dist/cjs/card/ui/progressBar/styles.js +3 -0
- package/dist/cjs/card/ui/tickBox/tickBoxWrapper.js +14 -3
- package/dist/cjs/card/ui/titleBox/styles.js +24 -4
- package/dist/cjs/card/ui/titleBox/titleBoxComponents.js +30 -17
- package/dist/cjs/card/ui/unhandledErrorCard/index.js +22 -11
- package/dist/cjs/card/ui/wrapper/imageContainer.js +1 -0
- package/dist/cjs/card/ui/wrapper/styles.js +1 -1
- package/dist/cjs/card/ui/wrapper/wrapper.js +4 -1
- package/dist/cjs/card/v2/cardV2.js +1 -1
- package/dist/cjs/card/v2/cardViewV2.js +1 -1
- package/dist/cjs/card/v2/cardviews/cardViewWrapper.js +1 -0
- package/dist/cjs/card/v2/cardviews/errorCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/iconCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/imageCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/index.js +1 -0
- package/dist/cjs/card/v2/cardviews/loadingCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/processingCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/videoCardView.js +1 -0
- package/dist/cjs/card/v2/fileCard.js +18 -4
- package/dist/cjs/card/v2/svgView/errors.js +16 -0
- package/dist/cjs/card/v2/svgView/svgView.js +12 -1
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/analytics/analytics.js +3 -0
- package/dist/cjs/utils/lightCards/errorIcon/index.js +10 -7
- package/dist/cjs/utils/lightCards/errorIcon/styles.js +3 -0
- package/dist/cjs/utils/lightCards/lightCardWrappers.js +9 -5
- package/dist/cjs/utils/lightCards/styles.js +10 -2
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/cardView.js +1 -0
- package/dist/es2019/card/inlinePlayerWrapper.js +4 -1
- package/dist/es2019/card/inlinePlayerWrapperStyles.js +1 -0
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/ui/actionsBar/actionsBarWrapper.js +4 -1
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionButton.js +4 -1
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionsView.js +1 -0
- package/dist/es2019/card/ui/actionsBar/cardActions/styles.js +14 -2
- package/dist/es2019/card/ui/actionsBar/styles.js +4 -1
- package/dist/es2019/card/ui/blanket/blanket.js +2 -0
- package/dist/es2019/card/ui/blanket/styles.js +7 -2
- package/dist/es2019/card/ui/iconMessage/iconMessageWrapper.js +2 -0
- package/dist/es2019/card/ui/iconWrapper/iconWrapper.js +4 -1
- package/dist/es2019/card/ui/iconWrapper/styles.js +2 -0
- package/dist/es2019/card/ui/openMediaViewerButton/openMediaViewerButton.js +7 -18
- package/dist/es2019/card/ui/playButton/playButtonBackground.js +2 -1
- package/dist/es2019/card/ui/playButton/playButtonWrapper.js +2 -1
- package/dist/es2019/card/ui/playButton/styles.js +6 -0
- package/dist/es2019/card/ui/progressBar/styledBar.js +4 -1
- package/dist/es2019/card/ui/progressBar/styles.js +2 -0
- package/dist/es2019/card/ui/tickBox/tickBoxWrapper.js +13 -3
- package/dist/es2019/card/ui/titleBox/styles.js +23 -4
- package/dist/es2019/card/ui/titleBox/titleBoxComponents.js +30 -17
- package/dist/es2019/card/ui/unhandledErrorCard/index.js +22 -10
- package/dist/es2019/card/ui/wrapper/imageContainer.js +1 -0
- package/dist/es2019/card/ui/wrapper/styles.js +1 -0
- package/dist/es2019/card/ui/wrapper/wrapper.js +4 -1
- package/dist/es2019/card/v2/cardV2.js +1 -1
- package/dist/es2019/card/v2/cardViewV2.js +1 -0
- package/dist/es2019/card/v2/cardviews/cardViewWrapper.js +1 -0
- package/dist/es2019/card/v2/cardviews/errorCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/iconCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/imageCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/index.js +1 -0
- package/dist/es2019/card/v2/cardviews/loadingCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/processingCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/videoCardView.js +1 -0
- package/dist/es2019/card/v2/fileCard.js +18 -4
- package/dist/es2019/card/v2/svgView/errors.js +10 -0
- package/dist/es2019/card/v2/svgView/svgView.js +12 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +3 -0
- package/dist/es2019/utils/lightCards/errorIcon/index.js +10 -6
- package/dist/es2019/utils/lightCards/errorIcon/styles.js +3 -0
- package/dist/es2019/utils/lightCards/lightCardWrappers.js +9 -5
- package/dist/es2019/utils/lightCards/styles.js +9 -2
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/cardView.js +1 -0
- package/dist/esm/card/inlinePlayerWrapper.js +4 -1
- package/dist/esm/card/inlinePlayerWrapperStyles.js +1 -0
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/ui/actionsBar/actionsBarWrapper.js +4 -1
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionButton.js +4 -1
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionsView.js +1 -0
- package/dist/esm/card/ui/actionsBar/cardActions/styles.js +14 -2
- package/dist/esm/card/ui/actionsBar/styles.js +12 -8
- package/dist/esm/card/ui/blanket/blanket.js +2 -0
- package/dist/esm/card/ui/blanket/styles.js +7 -2
- package/dist/esm/card/ui/iconMessage/iconMessageWrapper.js +2 -0
- package/dist/esm/card/ui/iconWrapper/iconWrapper.js +4 -1
- package/dist/esm/card/ui/iconWrapper/styles.js +2 -0
- package/dist/esm/card/ui/openMediaViewerButton/openMediaViewerButton.js +7 -18
- package/dist/esm/card/ui/playButton/playButtonBackground.js +2 -1
- package/dist/esm/card/ui/playButton/playButtonWrapper.js +2 -1
- package/dist/esm/card/ui/playButton/styles.js +6 -0
- package/dist/esm/card/ui/progressBar/styledBar.js +4 -1
- package/dist/esm/card/ui/progressBar/styles.js +2 -0
- package/dist/esm/card/ui/tickBox/tickBoxWrapper.js +13 -3
- package/dist/esm/card/ui/titleBox/styles.js +23 -4
- package/dist/esm/card/ui/titleBox/titleBoxComponents.js +30 -17
- package/dist/esm/card/ui/unhandledErrorCard/index.js +22 -10
- package/dist/esm/card/ui/wrapper/imageContainer.js +1 -0
- package/dist/esm/card/ui/wrapper/styles.js +1 -0
- package/dist/esm/card/ui/wrapper/wrapper.js +4 -1
- package/dist/esm/card/v2/cardV2.js +1 -1
- package/dist/esm/card/v2/cardViewV2.js +1 -0
- package/dist/esm/card/v2/cardviews/cardViewWrapper.js +1 -0
- package/dist/esm/card/v2/cardviews/errorCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/iconCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/imageCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/index.js +1 -0
- package/dist/esm/card/v2/cardviews/loadingCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/processingCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/videoCardView.js +1 -0
- package/dist/esm/card/v2/fileCard.js +18 -4
- package/dist/esm/card/v2/svgView/errors.js +10 -0
- package/dist/esm/card/v2/svgView/svgView.js +12 -1
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +3 -0
- package/dist/esm/utils/lightCards/errorIcon/index.js +10 -6
- package/dist/esm/utils/lightCards/errorIcon/styles.js +3 -0
- package/dist/esm/utils/lightCards/lightCardWrappers.js +9 -5
- package/dist/esm/utils/lightCards/styles.js +9 -2
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/ui/openMediaViewerButton/openMediaViewerButton.d.ts +0 -1
- package/dist/types/card/v2/svgView/errors.d.ts +3 -0
- package/dist/types/card/v2/svgView/svgView.d.ts +4 -3
- package/dist/types/errors.d.ts +2 -1
- package/dist/types/utils/analytics/analytics.d.ts +2 -1
- package/dist/types-ts4.5/card/ui/openMediaViewerButton/openMediaViewerButton.d.ts +0 -1
- package/dist/types-ts4.5/card/v2/svgView/errors.d.ts +3 -0
- package/dist/types-ts4.5/card/v2/svgView/svgView.d.ts +4 -3
- package/dist/types-ts4.5/errors.d.ts +2 -1
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +2 -1
- package/example-helpers/cardViewWrapper.tsx +2 -0
- package/example-helpers/styles.ts +24 -0
- package/example-helpers/svg-helpers/cardContainer.tsx +7 -0
- package/example-helpers/svg-helpers/index.ts +1 -1
- package/example-helpers/svg-helpers/mediaApiTweaks.ts +64 -0
- package/example-helpers/svg-helpers/svgContainer.tsx +1 -0
- package/package.json +122 -120
- package/example-helpers/svg-helpers/delayApiResponses.ts +0 -31
|
@@ -7,13 +7,16 @@ exports.TitleBoxWrapper = exports.TitleBoxIcon = exports.TitleBoxHeader = export
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _styles = require("./styles");
|
|
9
9
|
/** @jsx jsx */
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
11
|
|
|
11
12
|
var TitleBoxWrapper = exports.TitleBoxWrapper = function TitleBoxWrapper(props) {
|
|
12
13
|
var breakpoint = props.breakpoint,
|
|
13
14
|
titleBoxBgColor = props.titleBoxBgColor;
|
|
14
15
|
return (0, _react.jsx)("div", {
|
|
15
16
|
id: "titleBoxWrapper",
|
|
16
|
-
"data-testid": "media-title-box"
|
|
17
|
+
"data-testid": "media-title-box"
|
|
18
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
19
|
+
,
|
|
17
20
|
css: (0, _styles.titleBoxWrapperStyles)({
|
|
18
21
|
breakpoint: breakpoint,
|
|
19
22
|
titleBoxBgColor: titleBoxBgColor
|
|
@@ -22,29 +25,39 @@ var TitleBoxWrapper = exports.TitleBoxWrapper = function TitleBoxWrapper(props)
|
|
|
22
25
|
};
|
|
23
26
|
var TitleBoxHeader = exports.TitleBoxHeader = function TitleBoxHeader(props) {
|
|
24
27
|
var hasIconOverlap = props.hasIconOverlap;
|
|
25
|
-
return (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
return (
|
|
29
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
30
|
+
(0, _react.jsx)("div", {
|
|
31
|
+
id: "titleBoxHeader",
|
|
32
|
+
css: (0, _styles.titleBoxHeaderStyles)({
|
|
33
|
+
hasIconOverlap: hasIconOverlap
|
|
34
|
+
})
|
|
35
|
+
}, props.children)
|
|
36
|
+
);
|
|
31
37
|
};
|
|
32
38
|
var TitleBoxFooter = exports.TitleBoxFooter = function TitleBoxFooter(props) {
|
|
33
39
|
var hasIconOverlap = props.hasIconOverlap;
|
|
34
|
-
return (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
return (
|
|
41
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
42
|
+
(0, _react.jsx)("div", {
|
|
43
|
+
id: "titleBoxFooter",
|
|
44
|
+
css: (0, _styles.titleBoxFooterStyles)({
|
|
45
|
+
hasIconOverlap: hasIconOverlap
|
|
46
|
+
})
|
|
47
|
+
}, props.children)
|
|
48
|
+
);
|
|
40
49
|
};
|
|
41
50
|
var TitleBoxIcon = exports.TitleBoxIcon = function TitleBoxIcon(props) {
|
|
42
|
-
return (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
51
|
+
return (
|
|
52
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
53
|
+
(0, _react.jsx)("div", {
|
|
54
|
+
id: "titleBoxIcon",
|
|
55
|
+
css: _styles.titleBoxIconStyles
|
|
56
|
+
}, props.children)
|
|
57
|
+
);
|
|
46
58
|
};
|
|
47
59
|
var ErrorMessageWrapper = exports.ErrorMessageWrapper = function ErrorMessageWrapper(props) {
|
|
60
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
48
61
|
return (0, _react.jsx)("div", {
|
|
49
62
|
css: _styles.errorMessageWrapperStyles
|
|
50
63
|
}, props.children);
|
|
@@ -18,7 +18,7 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
18
18
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
19
19
|
var _utils = require("../../../utils");
|
|
20
20
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
21
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
21
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
22
|
var isPercentage = function isPercentage(value) {
|
|
23
23
|
return /^\d+(\.\d+)?%$/.test(value);
|
|
24
24
|
};
|
|
@@ -47,17 +47,25 @@ var getConvertedDimension = function getConvertedDimension(dimensions) {
|
|
|
47
47
|
var wrapperStyles = function wrapperStyles() {
|
|
48
48
|
var dimensions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _utils.defaultImageCardDimensions;
|
|
49
49
|
try {
|
|
50
|
-
return (0, _react2.css)(
|
|
50
|
+
return (0, _react2.css)(
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
52
|
+
_mediaUi.center,
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
54
|
+
_mediaUi.borderRadius, {
|
|
51
55
|
background: "var(--ds-background-neutral, ".concat(_colors.N20, ")"),
|
|
52
56
|
color: "var(--ds-text-subtle, ".concat(_colors.N800, ")"),
|
|
53
57
|
maxHeight: '100%',
|
|
54
58
|
maxWidth: '100%'
|
|
55
|
-
},
|
|
59
|
+
},
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
61
|
+
getConvertedDimension(dimensions), {
|
|
56
62
|
display: 'flex',
|
|
57
63
|
flexDirection: 'column',
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
58
65
|
p: {
|
|
59
66
|
fontSize: "".concat((0, _constants.fontSize)(), "px"),
|
|
60
67
|
textAlign: 'center',
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
61
69
|
display: shouldShowText(getConvertedDimension(dimensions)) ? 'block' : 'none'
|
|
62
70
|
}
|
|
63
71
|
});
|
|
@@ -78,14 +86,17 @@ var UnhandledErrorCard = exports.UnhandledErrorCard = /*#__PURE__*/function (_Co
|
|
|
78
86
|
var _this$props = this.props,
|
|
79
87
|
dimensions = _this$props.dimensions,
|
|
80
88
|
onClick = _this$props.onClick;
|
|
81
|
-
return (
|
|
82
|
-
css
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
return (
|
|
90
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
91
|
+
(0, _react2.jsx)("div", {
|
|
92
|
+
css: wrapperStyles(dimensions),
|
|
93
|
+
onClick: onClick
|
|
94
|
+
}, (0, _react2.jsx)(_warning.default, {
|
|
95
|
+
label: "Error",
|
|
96
|
+
primaryColor: "var(--ds-icon-warning, ".concat(_colors.Y500, ")"),
|
|
97
|
+
size: "medium"
|
|
98
|
+
}), (0, _react2.jsx)("p", null, "We couldn't load this content"))
|
|
99
|
+
);
|
|
89
100
|
}
|
|
90
101
|
}]);
|
|
91
102
|
return UnhandledErrorCard;
|
|
@@ -7,6 +7,7 @@ exports.ImageContainer = void 0;
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _classnames = require("../../classnames");
|
|
9
9
|
/** @jsx jsx */
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
11
|
|
|
11
12
|
var imageContainerStyles = (0, _react.css)({
|
|
12
13
|
display: 'flex',
|
|
@@ -14,7 +14,7 @@ var _selection = require("@atlaskit/editor-shared-styles/selection");
|
|
|
14
14
|
var _styles = require("../styles");
|
|
15
15
|
var _styles2 = require("../blanket/styles");
|
|
16
16
|
var _styles3 = require("../actionsBar/styles");
|
|
17
|
-
var _templateObject;
|
|
17
|
+
var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
18
|
var wrapperStyles = exports.wrapperStyles = function wrapperStyles(_ref) {
|
|
19
19
|
var breakpoint = _ref.breakpoint,
|
|
20
20
|
dimensions = _ref.dimensions,
|
|
@@ -8,6 +8,7 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
var _cardConstants = require("../../cardConstants");
|
|
9
9
|
var _styles = require("./styles");
|
|
10
10
|
/**@jsx jsx */
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
12
|
|
|
12
13
|
var Wrapper = exports.Wrapper = function Wrapper(props) {
|
|
13
14
|
var testId = props.testId,
|
|
@@ -29,7 +30,9 @@ var Wrapper = exports.Wrapper = function Wrapper(props) {
|
|
|
29
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
30
31
|
,
|
|
31
32
|
className: _cardConstants.newFileExperienceClassName,
|
|
32
|
-
"data-testid": testId
|
|
33
|
+
"data-testid": testId
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
35
|
+
,
|
|
33
36
|
css: (0, _styles.wrapperStyles)({
|
|
34
37
|
breakpoint: breakpoint,
|
|
35
38
|
dimensions: dimensions,
|
|
@@ -16,7 +16,7 @@ var _externalImageCard = require("./externalImageCard");
|
|
|
16
16
|
var _fileCard = require("./fileCard");
|
|
17
17
|
var _excluded = ["identifier"];
|
|
18
18
|
var packageName = "@atlaskit/media-card";
|
|
19
|
-
var packageVersion = "77.12.
|
|
19
|
+
var packageVersion = "77.12.3";
|
|
20
20
|
var CardV2Base = exports.CardV2Base = function CardV2Base(_ref) {
|
|
21
21
|
var identifier = _ref.identifier,
|
|
22
22
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -35,7 +35,7 @@ var _openMediaViewerButton = _interopRequireDefault(require("../ui/openMediaView
|
|
|
35
35
|
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); }
|
|
36
36
|
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 && Object.prototype.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; }
|
|
37
37
|
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; }
|
|
38
|
-
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; } /** @jsx jsx */
|
|
38
|
+
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; } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
39
39
|
var CardViewV2Base = exports.CardViewV2Base = function CardViewV2Base(_ref) {
|
|
40
40
|
var innerRef = _ref.innerRef,
|
|
41
41
|
onImageLoad = _ref.onImageLoad,
|
|
@@ -20,6 +20,7 @@ var _classnames = require("../../classnames");
|
|
|
20
20
|
var _openMediaViewerButton = _interopRequireDefault(require("../../ui/openMediaViewerButton/openMediaViewerButton"));
|
|
21
21
|
var _excluded = ["cardPreview", "testId", "dimensions", "appearance", "metadata", "selected", "selectable", "actions", "breakpoint", "disableOverlay", "titleBoxBgColor", "titleBoxIcon", "shouldHideTooltip", "children", "onClick", "onMouseEnter", "mediaCardCursor", "customBlanket", "customTitleBox", "progressBar", "shouldOpenMediaViewer", "openMediaViewerButtonRef", "overriddenCreationDate"];
|
|
22
22
|
/** @jsx jsx */
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
23
24
|
var CardViewWrapper = exports.CardViewWrapper = /*#__PURE__*/_react2.default.forwardRef(function (_ref, ref) {
|
|
24
25
|
var cardPreview = _ref.cardPreview,
|
|
25
26
|
testId = _ref.testId,
|
|
@@ -19,6 +19,7 @@ var _iconMessage = require("../../ui/iconMessage");
|
|
|
19
19
|
var _errors = require("../../../errors");
|
|
20
20
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
21
21
|
/** @jsx jsx */
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
23
|
|
|
23
24
|
var IconMessage = function IconMessage(_ref) {
|
|
24
25
|
var error = _ref.error,
|
|
@@ -17,6 +17,7 @@ var _cardViewWrapper = require("./cardViewWrapper");
|
|
|
17
17
|
var _progressBar = require("../../ui/progressBar/progressBar");
|
|
18
18
|
var _blanket = require("../../ui/blanket/blanket");
|
|
19
19
|
/** @jsx jsx */
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
20
21
|
|
|
21
22
|
// NOTE: should we call this Icon or UploadingCardView since we now have ProgressBar?
|
|
22
23
|
|
|
@@ -16,6 +16,7 @@ var _cardViewWrapper = require("./cardViewWrapper");
|
|
|
16
16
|
var _progressBar = require("../../ui/progressBar/progressBar");
|
|
17
17
|
var _blanket = require("../../ui/blanket/blanket");
|
|
18
18
|
/** @jsx jsx */
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
20
|
|
|
20
21
|
var ImageCardViewBase = function ImageCardViewBase(props) {
|
|
21
22
|
var status = props.status,
|
|
@@ -22,6 +22,7 @@ var _loadingCardView = require("./loadingCardView");
|
|
|
22
22
|
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); }
|
|
23
23
|
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 && Object.prototype.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; }
|
|
24
24
|
/** @jsx jsx */
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
26
|
|
|
26
27
|
var CardViewsBase = exports.CardViewsBase = function CardViewsBase(_ref) {
|
|
27
28
|
var innerRef = _ref.innerRef,
|
|
@@ -15,6 +15,7 @@ var _iconWrapper = require("../../ui/iconWrapper/iconWrapper");
|
|
|
15
15
|
var _useBreakpoint = require("../../useBreakpoint");
|
|
16
16
|
var _cardViewWrapper = require("./cardViewWrapper");
|
|
17
17
|
/** @jsx jsx */
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
19
|
|
|
19
20
|
var LoadingCardViewBase = function LoadingCardViewBase(props) {
|
|
20
21
|
var dimensions = props.dimensions,
|
|
@@ -16,6 +16,7 @@ var _iconMessage = require("../../ui/iconMessage");
|
|
|
16
16
|
var _useBreakpoint = require("../../useBreakpoint");
|
|
17
17
|
var _cardViewWrapper = require("./cardViewWrapper");
|
|
18
18
|
/** @jsx jsx */
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
20
|
|
|
20
21
|
var ProcessingCardViewBase = function ProcessingCardViewBase(props) {
|
|
21
22
|
var disableAnimation = props.disableAnimation,
|
|
@@ -18,6 +18,7 @@ var _cardViewWrapper = require("./cardViewWrapper");
|
|
|
18
18
|
var _progressBar = require("../../ui/progressBar/progressBar");
|
|
19
19
|
var _blanket = require("../../ui/blanket/blanket");
|
|
20
20
|
/** @jsx jsx */
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
22
|
|
|
22
23
|
var VideoCardViewBase = function VideoCardViewBase(props) {
|
|
23
24
|
var status = props.status,
|
|
@@ -321,10 +321,24 @@ var FileCard = exports.FileCard = function FileCard(_ref) {
|
|
|
321
321
|
//---------------------- Callbacks & Handlers -------------------//
|
|
322
322
|
//----------------------------------------------------------------//
|
|
323
323
|
|
|
324
|
+
var onSvgError = function onSvgError(error) {
|
|
325
|
+
setError(error);
|
|
326
|
+
setStatus('error');
|
|
327
|
+
setShouldRenderSVG(false);
|
|
328
|
+
};
|
|
324
329
|
var onImageError = function onImageError(newCardPreview) {
|
|
330
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.media-card-svg-rendering_6tdbv') && metadata.mimeType === 'image/svg+xml') {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
325
333
|
onImageErrorBase(newCardPreview);
|
|
326
334
|
};
|
|
335
|
+
var onSvgLoad = function onSvgLoad() {
|
|
336
|
+
setPreviewDidRender(true);
|
|
337
|
+
};
|
|
327
338
|
var onImageLoad = function onImageLoad(newCardPreview) {
|
|
339
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.media-card-svg-rendering_6tdbv') && metadata.mimeType === 'image/svg+xml') {
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
328
342
|
onImageLoadBase(newCardPreview);
|
|
329
343
|
setPreviewDidRender(true);
|
|
330
344
|
};
|
|
@@ -449,7 +463,7 @@ var FileCard = exports.FileCard = function FileCard(_ref) {
|
|
|
449
463
|
//----------------------------------------------------------------//
|
|
450
464
|
|
|
451
465
|
(0, _react.useEffect)(function () {
|
|
452
|
-
if ((0, _platformFeatureFlags.getBooleanFF)('platform.media-card-svg-rendering_6tdbv') &&
|
|
466
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.media-card-svg-rendering_6tdbv') && finalStatus !== 'error' &&
|
|
453
467
|
/**
|
|
454
468
|
* We need to check that the card is visible before switching to SVG
|
|
455
469
|
* in order to avoid race conditions of the ViewportDector being unmounted before
|
|
@@ -459,7 +473,7 @@ var FileCard = exports.FileCard = function FileCard(_ref) {
|
|
|
459
473
|
) {
|
|
460
474
|
setShouldRenderSVG(true);
|
|
461
475
|
}
|
|
462
|
-
}, [isCardVisible, disableOverlay, metadata]);
|
|
476
|
+
}, [isCardVisible, disableOverlay, metadata.mimeType, finalStatus]);
|
|
463
477
|
|
|
464
478
|
//----------------------------------------------------------------//
|
|
465
479
|
//----------------- fireScreenEvent ------------------------------//
|
|
@@ -644,8 +658,8 @@ var FileCard = exports.FileCard = function FileCard(_ref) {
|
|
|
644
658
|
onClick: onCardViewClick,
|
|
645
659
|
onMouseEnter: onImageMouseEnter,
|
|
646
660
|
progress: uploadProgressRef.current,
|
|
647
|
-
|
|
648
|
-
|
|
661
|
+
onError: onSvgError,
|
|
662
|
+
onLoad: onSvgLoad,
|
|
649
663
|
mediaCardCursor: mediaCardCursor,
|
|
650
664
|
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
651
665
|
openMediaViewerButtonRef: mediaViewerButtonRef
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getErrorReason = void 0;
|
|
7
|
+
var getErrorReason = exports.getErrorReason = function getErrorReason(svgReason) {
|
|
8
|
+
switch (svgReason) {
|
|
9
|
+
case 'img-error':
|
|
10
|
+
return 'svg-img-error';
|
|
11
|
+
case 'binary-fetch':
|
|
12
|
+
return 'svg-binary-fetch';
|
|
13
|
+
default:
|
|
14
|
+
return 'svg-unknown-error';
|
|
15
|
+
}
|
|
16
|
+
};
|
|
@@ -20,9 +20,12 @@ var _useBreakpoint = require("../../useBreakpoint");
|
|
|
20
20
|
var _mediaSvg = _interopRequireDefault(require("@atlaskit/media-svg"));
|
|
21
21
|
var _helpers = require("./helpers");
|
|
22
22
|
var _openMediaViewerButton = _interopRequireDefault(require("../../ui/openMediaViewerButton/openMediaViewerButton"));
|
|
23
|
+
var _errors = require("../../../errors");
|
|
24
|
+
var _errors2 = require("./errors");
|
|
23
25
|
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); }
|
|
24
26
|
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 && Object.prototype.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; }
|
|
25
27
|
/** @jsx jsx */
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
29
|
|
|
27
30
|
var convertResizeMode = exports.convertResizeMode = function convertResizeMode(resizeMode) {
|
|
28
31
|
switch (resizeMode) {
|
|
@@ -53,7 +56,9 @@ var SvgViewBase = exports.SvgViewBase = function SvgViewBase(_ref) {
|
|
|
53
56
|
resizeMode = _ref.resizeMode,
|
|
54
57
|
shouldOpenMediaViewer = _ref.shouldOpenMediaViewer,
|
|
55
58
|
_ref$openMediaViewerB = _ref.openMediaViewerButtonRef,
|
|
56
|
-
openMediaViewerButtonRef = _ref$openMediaViewerB === void 0 ? null : _ref$openMediaViewerB
|
|
59
|
+
openMediaViewerButtonRef = _ref$openMediaViewerB === void 0 ? null : _ref$openMediaViewerB,
|
|
60
|
+
onLoad = _ref.onLoad,
|
|
61
|
+
onError = _ref.onError;
|
|
57
62
|
var _useState = (0, _react2.useState)(false),
|
|
58
63
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
59
64
|
didSvgRender = _useState2[0],
|
|
@@ -71,6 +76,11 @@ var SvgViewBase = exports.SvgViewBase = function SvgViewBase(_ref) {
|
|
|
71
76
|
var onSvgLoad = function onSvgLoad(evt) {
|
|
72
77
|
setSvgDimensions((0, _helpers.calculateSvgDimensions)(evt.currentTarget, resizeMode));
|
|
73
78
|
setDidSvgRender(true);
|
|
79
|
+
onLoad();
|
|
80
|
+
};
|
|
81
|
+
var onSvgError = function onSvgError(err) {
|
|
82
|
+
var error = new _errors.MediaCardError((0, _errors2.getErrorReason)(err.primaryReason), err.secondaryError);
|
|
83
|
+
onError(error);
|
|
74
84
|
};
|
|
75
85
|
var onPreviewLoad = function onPreviewLoad() {
|
|
76
86
|
setDidPreviewRender(true);
|
|
@@ -106,6 +116,7 @@ var SvgViewBase = exports.SvgViewBase = function SvgViewBase(_ref) {
|
|
|
106
116
|
identifier: identifier,
|
|
107
117
|
dimensions: svgDimensions,
|
|
108
118
|
onLoad: onSvgLoad,
|
|
119
|
+
onError: onSvgError,
|
|
109
120
|
style: {
|
|
110
121
|
visibility: didSvgRender ? 'visible' : 'hidden',
|
|
111
122
|
objectFit: convertResizeMode(resizeMode)
|
|
@@ -119,7 +119,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
|
|
|
119
119
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
120
120
|
var analyticsContext = {
|
|
121
121
|
packageVersion: "@atlaskit/media-card",
|
|
122
|
-
packageName: "77.12.
|
|
122
|
+
packageName: "77.12.3",
|
|
123
123
|
componentName: 'mediaInlineCard',
|
|
124
124
|
component: 'mediaInlineCard'
|
|
125
125
|
};
|
|
@@ -55,6 +55,7 @@ var getRenderSucceededEventPayload = exports.getRenderSucceededEventPayload = fu
|
|
|
55
55
|
action: 'succeeded',
|
|
56
56
|
actionSubject: 'mediaCardRender',
|
|
57
57
|
attributes: {
|
|
58
|
+
fileMimetype: fileAttributes.fileMimetype,
|
|
58
59
|
fileAttributes: fileAttributes,
|
|
59
60
|
performanceAttributes: performanceAttributes,
|
|
60
61
|
status: 'success',
|
|
@@ -155,6 +156,7 @@ var getRenderErrorEventPayload = exports.getRenderErrorEventPayload = function g
|
|
|
155
156
|
action: 'failed',
|
|
156
157
|
actionSubject: 'mediaCardRender',
|
|
157
158
|
attributes: _objectSpread(_objectSpread({
|
|
159
|
+
fileMimetype: fileAttributes.fileMimetype,
|
|
158
160
|
fileAttributes: fileAttributes,
|
|
159
161
|
performanceAttributes: performanceAttributes,
|
|
160
162
|
status: 'fail'
|
|
@@ -187,6 +189,7 @@ var getRenderFailedFileStatusPayload = exports.getRenderFailedFileStatusPayload
|
|
|
187
189
|
action: 'failed',
|
|
188
190
|
actionSubject: 'mediaCardRender',
|
|
189
191
|
attributes: {
|
|
192
|
+
fileMimetype: fileAttributes.fileMimetype,
|
|
190
193
|
fileAttributes: fileAttributes,
|
|
191
194
|
performanceAttributes: performanceAttributes,
|
|
192
195
|
status: 'fail',
|
|
@@ -16,7 +16,7 @@ var _react2 = require("react");
|
|
|
16
16
|
var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/warning"));
|
|
17
17
|
var _styles = require("./styles");
|
|
18
18
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
19
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**@jsx jsx */
|
|
19
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**@jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
20
20
|
var ErrorIcon = exports.ErrorIcon = /*#__PURE__*/function (_Component) {
|
|
21
21
|
(0, _inherits2.default)(ErrorIcon, _Component);
|
|
22
22
|
var _super = _createSuper(ErrorIcon);
|
|
@@ -28,12 +28,15 @@ var ErrorIcon = exports.ErrorIcon = /*#__PURE__*/function (_Component) {
|
|
|
28
28
|
key: "render",
|
|
29
29
|
value: function render() {
|
|
30
30
|
var size = this.props.size;
|
|
31
|
-
return (
|
|
32
|
-
css
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
return (
|
|
32
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
33
|
+
(0, _react.jsx)("div", {
|
|
34
|
+
css: _styles.errorIconWrapperStyles
|
|
35
|
+
}, (0, _react.jsx)(_warning.default, {
|
|
36
|
+
label: "Error",
|
|
37
|
+
size: size
|
|
38
|
+
}))
|
|
39
|
+
);
|
|
37
40
|
}
|
|
38
41
|
}]);
|
|
39
42
|
return ErrorIcon;
|
|
@@ -5,6 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.errorIconWrapperStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
8
11
|
var errorIconWrapperStyles = exports.errorIconWrapperStyles = (0, _react.css)({
|
|
9
12
|
display: 'flex',
|
|
10
13
|
color: "var(--ds-icon-warning, #ff991f)"
|
|
@@ -9,11 +9,15 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _styles = require("./styles");
|
|
11
11
|
/**@jsx jsx */
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
13
|
|
|
13
14
|
var Wrapper = exports.Wrapper = function Wrapper(props) {
|
|
14
|
-
return (
|
|
15
|
-
css
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
return (
|
|
16
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
17
|
+
(0, _react.jsx)("div", (0, _extends2.default)({
|
|
18
|
+
css: (0, _styles.wrapperStyles)({
|
|
19
|
+
dimensions: props.dimensions
|
|
20
|
+
})
|
|
21
|
+
}, props), props.children)
|
|
22
|
+
);
|
|
19
23
|
};
|
|
@@ -7,15 +7,23 @@ exports.wrapperStyles = void 0;
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
9
9
|
var _colors = require("@atlaskit/theme/colors");
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
|
+
|
|
10
12
|
var wrapperStyles = exports.wrapperStyles = function wrapperStyles(_ref) {
|
|
11
13
|
var dimensions = _ref.dimensions;
|
|
12
|
-
return (0, _react.css)(
|
|
14
|
+
return (0, _react.css)(
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
16
|
+
_mediaUi.center, {
|
|
13
17
|
background: "var(--ds-background-neutral, ".concat(_colors.N20, ")"),
|
|
14
18
|
color: "var(--ds-icon, ".concat(_colors.N50, ")")
|
|
15
|
-
},
|
|
19
|
+
},
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
21
|
+
_mediaUi.borderRadius, {
|
|
16
22
|
maxHeight: '100%',
|
|
17
23
|
maxWidth: '100%',
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
25
|
width: dimensions.width,
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
19
27
|
height: dimensions.height
|
|
20
28
|
});
|
|
21
29
|
};
|
|
@@ -14,7 +14,7 @@ var _mediaClient = require("@atlaskit/media-client");
|
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
16
|
var packageName = "@atlaskit/media-card";
|
|
17
|
-
var packageVersion = "77.12.
|
|
17
|
+
var packageVersion = "77.12.3";
|
|
18
18
|
var concurrentExperience;
|
|
19
19
|
var getExperience = function getExperience(id) {
|
|
20
20
|
if (!concurrentExperience) {
|
package/dist/es2019/card/card.js
CHANGED
|
@@ -28,7 +28,7 @@ import { completeUfoExperience, startUfoExperience, abortUfoExperience } from '.
|
|
|
28
28
|
import { generateUniqueId } from '../utils/generateUniqueId';
|
|
29
29
|
import { DateOverrideContext } from '../dateOverrideContext';
|
|
30
30
|
const packageName = "@atlaskit/media-card";
|
|
31
|
-
const packageVersion = "77.12.
|
|
31
|
+
const packageVersion = "77.12.3";
|
|
32
32
|
export class CardBase extends Component {
|
|
33
33
|
constructor(props) {
|
|
34
34
|
super(props);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
3
|
import { jsx } from '@emotion/react';
|
|
3
4
|
import { inlinePlayerWrapperStyles, inlinePlayerClassName } from './inlinePlayerWrapperStyles';
|
|
4
5
|
export const InlinePlayerWrapper = props => {
|
|
@@ -14,7 +15,9 @@ export const InlinePlayerWrapper = props => {
|
|
|
14
15
|
"data-testid": testId
|
|
15
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
16
17
|
,
|
|
17
|
-
className: inlinePlayerClassName
|
|
18
|
+
className: inlinePlayerClassName
|
|
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
|
|
20
|
+
,
|
|
18
21
|
css: inlinePlayerWrapperStyles({
|
|
19
22
|
selected,
|
|
20
23
|
dimensions
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
3
4
|
import { getDimensionsWithDefault } from '../utils/lightCards/getDimensionsWithDefault';
|
|
@@ -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 = "77.12.
|
|
69
|
+
const packageVersion = "77.12.3";
|
|
70
70
|
const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
71
71
|
packageVersion,
|
|
72
72
|
packageName,
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
3
|
import { jsx } from '@emotion/react';
|
|
3
4
|
import { wrapperStyles, actionsBarClassName } from './styles';
|
|
4
5
|
export const ActionsBarWrapper = props => {
|
|
5
6
|
return jsx("div", {
|
|
6
|
-
id: "actionsBarWrapper"
|
|
7
|
+
id: "actionsBarWrapper"
|
|
8
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
9
|
+
,
|
|
7
10
|
css: wrapperStyles(props.isFixed)
|
|
8
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
9
12
|
,
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/**@jsx jsx */
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { jsx } from '@emotion/react';
|
|
5
6
|
import { cardActionButtonStyles } from './styles';
|
|
6
7
|
export const CardActionButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
7
8
|
return jsx("button", _extends({}, props, {
|
|
8
9
|
id: "cardActionButton",
|
|
9
10
|
"data-testid": "media-card-primary-action",
|
|
10
|
-
"aria-label": props.label
|
|
11
|
+
"aria-label": props.label
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
13
|
+
,
|
|
11
14
|
css: cardActionButtonStyles(props)
|
|
12
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
13
16
|
,
|