@atlaskit/media-card 78.6.0 → 78.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/cardLoader.js +6 -3
- package/dist/cjs/card/inlinePlayer.js +2 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/lightCards/cardLoading.js +3 -2
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/cardLoader.js +4 -1
- package/dist/es2019/card/inlinePlayer.js +2 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/lightCards/cardLoading.js +3 -2
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/cardLoader.js +4 -1
- package/dist/esm/card/inlinePlayer.js +2 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/lightCards/cardLoading.js +3 -2
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/utils/lightCards/types.d.ts +1 -0
- package/dist/types-ts4.5/utils/lightCards/types.d.ts +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 78.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#152851](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152851)
|
|
8
|
+
[`caba4b5434f99`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/caba4b5434f99) -
|
|
9
|
+
CardLoading component accepts interactionName for the underlying spinner. This is to idenfity the
|
|
10
|
+
experience in Performance Portal.
|
|
11
|
+
|
|
3
12
|
## 78.6.0
|
|
4
13
|
|
|
5
14
|
### Minor 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 = "78.
|
|
24
|
+
var packageVersion = "78.7.0";
|
|
25
25
|
var CardBase = exports.CardBase = function CardBase(_ref) {
|
|
26
26
|
var identifier = _ref.identifier,
|
|
27
27
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
8
|
-
var
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
11
12
|
var _cardLoading = require("../utils/lightCards/cardLoading");
|
|
12
13
|
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); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (
|
|
14
|
+
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; }
|
|
14
15
|
var MediaCardContext = /*#__PURE__*/_react.default.createContext({});
|
|
15
16
|
var CardLoadingWithContext = function CardLoadingWithContext() {
|
|
16
17
|
var props = (0, _react.useContext)(MediaCardContext);
|
|
17
|
-
return /*#__PURE__*/_react.default.createElement(_cardLoading.CardLoading, props
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement(_cardLoading.CardLoading, (0, _extends2.default)({}, props, {
|
|
19
|
+
interactionName: "media-card-async-loading"
|
|
20
|
+
}));
|
|
18
21
|
};
|
|
19
22
|
var MediaCardWithMediaClientProvider = (0, _reactLoadable.default)({
|
|
20
23
|
loader: function loader() {
|
|
@@ -213,7 +213,8 @@ var InlinePlayerBase = exports.InlinePlayerBase = function InlinePlayerBase(_ref
|
|
|
213
213
|
showOnTop: true
|
|
214
214
|
})) : /*#__PURE__*/_react.default.createElement(_cardLoading.CardLoading, {
|
|
215
215
|
testId: testId,
|
|
216
|
-
dimensions: dimensions
|
|
216
|
+
dimensions: dimensions,
|
|
217
|
+
interactionName: "inline-player-loading"
|
|
217
218
|
});
|
|
218
219
|
};
|
|
219
220
|
var InlinePlayerForwardRef = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
@@ -90,7 +90,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
90
90
|
}(_react.default.Component);
|
|
91
91
|
(0, _defineProperty2.default)(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
92
92
|
var packageName = "@atlaskit/media-card";
|
|
93
|
-
var packageVersion = "78.
|
|
93
|
+
var packageVersion = "78.7.0";
|
|
94
94
|
|
|
95
95
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
96
96
|
var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
|
|
@@ -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: "78.
|
|
122
|
+
packageName: "78.7.0",
|
|
123
123
|
componentName: 'mediaInlineCard',
|
|
124
124
|
component: 'mediaInlineCard'
|
|
125
125
|
};
|
|
@@ -31,14 +31,15 @@ var CardLoading = exports.CardLoading = /*#__PURE__*/function (_Component) {
|
|
|
31
31
|
value: function render() {
|
|
32
32
|
var _this$props = this.props,
|
|
33
33
|
dimensionsProp = _this$props.dimensions,
|
|
34
|
-
testId = _this$props.testId
|
|
34
|
+
testId = _this$props.testId,
|
|
35
|
+
interactionName = _this$props.interactionName;
|
|
35
36
|
var dimensions = (0, _getDimensionsWithDefault.getDimensionsWithDefault)(dimensionsProp);
|
|
36
37
|
return /*#__PURE__*/_react.default.createElement(_lightCardWrappers.Wrapper, {
|
|
37
38
|
"data-testid": testId || 'media-card-loading',
|
|
38
39
|
"data-test-loading": true,
|
|
39
40
|
dimensions: dimensions
|
|
40
41
|
}, /*#__PURE__*/_react.default.createElement(_spinner.default, {
|
|
41
|
-
interactionName:
|
|
42
|
+
interactionName: interactionName || 'media-card-loading'
|
|
42
43
|
}));
|
|
43
44
|
}
|
|
44
45
|
}]);
|
|
@@ -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 = "78.
|
|
18
|
+
var packageVersion = "78.7.0";
|
|
19
19
|
var concurrentExperience;
|
|
20
20
|
var getExperience = function getExperience(id) {
|
|
21
21
|
if (!concurrentExperience) {
|
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 { fg } from '@atlaskit/platform-feature-flags';
|
|
11
11
|
const packageName = "@atlaskit/media-card";
|
|
12
|
-
const packageVersion = "78.
|
|
12
|
+
const packageVersion = "78.7.0";
|
|
13
13
|
export const CardBase = ({
|
|
14
14
|
identifier,
|
|
15
15
|
...otherProps
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React, { useContext } from 'react';
|
|
2
3
|
import Loadable from 'react-loadable';
|
|
3
4
|
import { CardLoading } from '../utils/lightCards/cardLoading';
|
|
4
5
|
const MediaCardContext = /*#__PURE__*/React.createContext({});
|
|
5
6
|
const CardLoadingWithContext = () => {
|
|
6
7
|
const props = useContext(MediaCardContext);
|
|
7
|
-
return /*#__PURE__*/React.createElement(CardLoading, props
|
|
8
|
+
return /*#__PURE__*/React.createElement(CardLoading, _extends({}, props, {
|
|
9
|
+
interactionName: "media-card-async-loading"
|
|
10
|
+
}));
|
|
8
11
|
};
|
|
9
12
|
const MediaCardWithMediaClientProvider = Loadable({
|
|
10
13
|
loader: () => import( /* webpackChunkName: "@atlaskit-internal_media-card-with-media-client" */'./cardWithMediaClient').then(mod => mod.CardWithMediaClient),
|
|
@@ -155,7 +155,8 @@ export const InlinePlayerBase = ({
|
|
|
155
155
|
showOnTop: true
|
|
156
156
|
})) : /*#__PURE__*/React.createElement(CardLoading, {
|
|
157
157
|
testId: testId,
|
|
158
|
-
dimensions: dimensions
|
|
158
|
+
dimensions: dimensions,
|
|
159
|
+
interactionName: "inline-player-loading"
|
|
159
160
|
});
|
|
160
161
|
};
|
|
161
162
|
const InlinePlayerForwardRef = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
@@ -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 = "78.
|
|
69
|
+
const packageVersion = "78.7.0";
|
|
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({
|
|
@@ -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: "78.
|
|
40
|
+
packageName: "78.7.0",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -7,7 +7,8 @@ export class CardLoading extends Component {
|
|
|
7
7
|
render() {
|
|
8
8
|
const {
|
|
9
9
|
dimensions: dimensionsProp,
|
|
10
|
-
testId
|
|
10
|
+
testId,
|
|
11
|
+
interactionName
|
|
11
12
|
} = this.props;
|
|
12
13
|
const dimensions = getDimensionsWithDefault(dimensionsProp);
|
|
13
14
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
@@ -15,7 +16,7 @@ export class CardLoading extends Component {
|
|
|
15
16
|
"data-test-loading": true,
|
|
16
17
|
dimensions: dimensions
|
|
17
18
|
}, /*#__PURE__*/React.createElement(SpinnerIcon, {
|
|
18
|
-
interactionName:
|
|
19
|
+
interactionName: interactionName || 'media-card-loading'
|
|
19
20
|
}));
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -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 = "78.
|
|
8
|
+
const packageVersion = "78.7.0";
|
|
9
9
|
let concurrentExperience;
|
|
10
10
|
const getExperience = id => {
|
|
11
11
|
if (!concurrentExperience) {
|
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 { fg } from '@atlaskit/platform-feature-flags';
|
|
13
13
|
var packageName = "@atlaskit/media-card";
|
|
14
|
-
var packageVersion = "78.
|
|
14
|
+
var packageVersion = "78.7.0";
|
|
15
15
|
export var CardBase = function CardBase(_ref) {
|
|
16
16
|
var identifier = _ref.identifier,
|
|
17
17
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React, { useContext } from 'react';
|
|
2
3
|
import Loadable from 'react-loadable';
|
|
3
4
|
import { CardLoading } from '../utils/lightCards/cardLoading';
|
|
4
5
|
var MediaCardContext = /*#__PURE__*/React.createContext({});
|
|
5
6
|
var CardLoadingWithContext = function CardLoadingWithContext() {
|
|
6
7
|
var props = useContext(MediaCardContext);
|
|
7
|
-
return /*#__PURE__*/React.createElement(CardLoading, props
|
|
8
|
+
return /*#__PURE__*/React.createElement(CardLoading, _extends({}, props, {
|
|
9
|
+
interactionName: "media-card-async-loading"
|
|
10
|
+
}));
|
|
8
11
|
};
|
|
9
12
|
var MediaCardWithMediaClientProvider = Loadable({
|
|
10
13
|
loader: function loader() {
|
|
@@ -203,7 +203,8 @@ export var InlinePlayerBase = function InlinePlayerBase(_ref) {
|
|
|
203
203
|
showOnTop: true
|
|
204
204
|
})) : /*#__PURE__*/React.createElement(CardLoading, {
|
|
205
205
|
testId: testId,
|
|
206
|
-
dimensions: dimensions
|
|
206
|
+
dimensions: dimensions,
|
|
207
|
+
interactionName: "inline-player-loading"
|
|
207
208
|
});
|
|
208
209
|
};
|
|
209
210
|
var InlinePlayerForwardRef = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -83,7 +83,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
83
83
|
}(React.Component);
|
|
84
84
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
85
85
|
var packageName = "@atlaskit/media-card";
|
|
86
|
-
var packageVersion = "78.
|
|
86
|
+
var packageVersion = "78.7.0";
|
|
87
87
|
|
|
88
88
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
89
89
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -103,7 +103,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
103
103
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
104
104
|
var analyticsContext = {
|
|
105
105
|
packageVersion: "@atlaskit/media-card",
|
|
106
|
-
packageName: "78.
|
|
106
|
+
packageName: "78.7.0",
|
|
107
107
|
componentName: 'mediaInlineCard',
|
|
108
108
|
component: 'mediaInlineCard'
|
|
109
109
|
};
|
|
@@ -22,14 +22,15 @@ export var CardLoading = /*#__PURE__*/function (_Component) {
|
|
|
22
22
|
value: function render() {
|
|
23
23
|
var _this$props = this.props,
|
|
24
24
|
dimensionsProp = _this$props.dimensions,
|
|
25
|
-
testId = _this$props.testId
|
|
25
|
+
testId = _this$props.testId,
|
|
26
|
+
interactionName = _this$props.interactionName;
|
|
26
27
|
var dimensions = getDimensionsWithDefault(dimensionsProp);
|
|
27
28
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
28
29
|
"data-testid": testId || 'media-card-loading',
|
|
29
30
|
"data-test-loading": true,
|
|
30
31
|
dimensions: dimensions
|
|
31
32
|
}, /*#__PURE__*/React.createElement(SpinnerIcon, {
|
|
32
|
-
interactionName:
|
|
33
|
+
interactionName: interactionName || 'media-card-loading'
|
|
33
34
|
}));
|
|
34
35
|
}
|
|
35
36
|
}]);
|
|
@@ -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 = "78.
|
|
11
|
+
var packageVersion = "78.7.0";
|
|
12
12
|
var concurrentExperience;
|
|
13
13
|
var getExperience = function getExperience(id) {
|
|
14
14
|
if (!concurrentExperience) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "78.
|
|
3
|
+
"version": "78.7.0",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@atlaskit/media-common": "^11.6.0",
|
|
45
45
|
"@atlaskit/media-file-preview": "^0.9.0",
|
|
46
46
|
"@atlaskit/media-svg": "^0.2.0",
|
|
47
|
-
"@atlaskit/media-ui": "^25.
|
|
48
|
-
"@atlaskit/media-viewer": "^49.
|
|
47
|
+
"@atlaskit/media-ui": "^25.16.0",
|
|
48
|
+
"@atlaskit/media-viewer": "^49.2.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
50
50
|
"@atlaskit/primitives": "^12.2.0",
|
|
51
51
|
"@atlaskit/spinner": "^16.3.0",
|