@atlaskit/media-card 77.2.0 → 77.2.2
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 +14 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/cardLoader.js +1 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/v2/cardV2.js +1 -1
- package/dist/cjs/card/v2/cardV2Loader.js +9 -16
- package/dist/cjs/inline/loader.js +2 -2
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/cardLoader.js +1 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/v2/cardV2.js +1 -1
- package/dist/es2019/card/v2/cardV2Loader.js +10 -17
- package/dist/es2019/inline/loader.js +2 -2
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/cardLoader.js +1 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/v2/cardV2.js +1 -1
- package/dist/esm/card/v2/cardV2Loader.js +9 -16
- package/dist/esm/inline/loader.js +2 -2
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/cardLoader.d.ts +1 -1
- package/dist/types/inline/loader.d.ts +1 -1
- package/dist/types-ts4.5/card/cardLoader.d.ts +1 -1
- package/dist/types-ts4.5/inline/loader.d.ts +1 -1
- package/package.json +3 -3
- package/report.api.md +1 -1
- package/tmp/api-report-tmp.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 77.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#41659](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41659) [`a0c97a19dba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a0c97a19dba) - Remove unused utils and depreciated exports in mediaClient.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 77.2.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#41932](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41932) [`756dd90f1a3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/756dd90f1a3) - 1. Deprecate withMediaClient HOC in media-client and migrated it to media-client-react 2. clean up deprecated imports from media-client
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 77.2.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/cjs/card/card.js
CHANGED
|
@@ -49,7 +49,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
49
49
|
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); }; }
|
|
50
50
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
51
51
|
var packageName = "@atlaskit/media-card";
|
|
52
|
-
var packageVersion = "77.2.
|
|
52
|
+
var packageVersion = "77.2.2";
|
|
53
53
|
var CardBase = exports.CardBase = /*#__PURE__*/function (_Component) {
|
|
54
54
|
(0, _inherits2.default)(CardBase, _Component);
|
|
55
55
|
var _super = _createSuper(CardBase);
|
|
@@ -44,7 +44,7 @@ var MediaCardErrorBoundary = (0, _reactLoadable.default)({
|
|
|
44
44
|
var MediaCardWithMediaClient = (0, _reactLoadable.default)({
|
|
45
45
|
loader: function loader() {
|
|
46
46
|
return Promise.resolve().then(function () {
|
|
47
|
-
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_media-client" */'@atlaskit/media-client'));
|
|
47
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_media-client-react" */'@atlaskit/media-client-react'));
|
|
48
48
|
});
|
|
49
49
|
},
|
|
50
50
|
loading: function loading() {
|
|
@@ -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 = "77.2.
|
|
93
|
+
var packageVersion = "77.2.2";
|
|
94
94
|
var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
|
|
95
95
|
packageVersion: packageVersion,
|
|
96
96
|
packageName: packageName,
|
|
@@ -50,7 +50,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
50
50
|
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); }; }
|
|
51
51
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
52
52
|
var packageName = "@atlaskit/media-card";
|
|
53
|
-
var packageVersion = "77.2.
|
|
53
|
+
var packageVersion = "77.2.2";
|
|
54
54
|
var CardV2Base = exports.CardV2Base = /*#__PURE__*/function (_Component) {
|
|
55
55
|
(0, _inherits2.default)(CardV2Base, _Component);
|
|
56
56
|
var _super = _createSuper(CardV2Base);
|
|
@@ -44,12 +44,14 @@ var MediaCardErrorBoundary = (0, _reactLoadable.default)({
|
|
|
44
44
|
return /*#__PURE__*/_react.default.createElement(CardLoadingWithContext, null);
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
var
|
|
47
|
+
var CardWithMediaClient = function CardWithMediaClient(props) {
|
|
48
48
|
var dimensions = props.dimensions,
|
|
49
49
|
onClick = props.onClick,
|
|
50
|
-
|
|
50
|
+
withMediaClient = props.withMediaClient,
|
|
51
51
|
featureFlags = props.featureFlags;
|
|
52
|
-
var
|
|
52
|
+
var Card = _react.default.useMemo(function () {
|
|
53
|
+
return withMediaClient(MediaV2Card);
|
|
54
|
+
}, [withMediaClient]);
|
|
53
55
|
var featureFlagsWithMediaCardV2 = _react.default.useMemo(function () {
|
|
54
56
|
return _objectSpread(_objectSpread({}, featureFlags), {}, {
|
|
55
57
|
mediaCardV2: true //used for analytics - internal use only
|
|
@@ -58,9 +60,8 @@ var MediaCardWithMediaClient = function MediaCardWithMediaClient(props) {
|
|
|
58
60
|
return /*#__PURE__*/_react.default.createElement(MediaCardErrorBoundary, {
|
|
59
61
|
dimensions: dimensions,
|
|
60
62
|
onClick: onClick
|
|
61
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
62
|
-
featureFlags: featureFlagsWithMediaCardV2
|
|
63
|
-
mediaClient: mediaClient
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement(Card, (0, _extends2.default)({}, props, {
|
|
64
|
+
featureFlags: featureFlagsWithMediaCardV2
|
|
64
65
|
})));
|
|
65
66
|
};
|
|
66
67
|
var MediaCardWithMediaClientProvider = (0, _reactLoadable.default)({
|
|
@@ -73,17 +74,9 @@ var MediaCardWithMediaClientProvider = (0, _reactLoadable.default)({
|
|
|
73
74
|
return /*#__PURE__*/_react.default.createElement(CardLoadingWithContext, null);
|
|
74
75
|
},
|
|
75
76
|
render: function render(loaded, props) {
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(CardWithMediaClient, (0, _extends2.default)({}, props, {
|
|
78
|
+
withMediaClient: loaded.withMediaClient
|
|
78
79
|
}));
|
|
79
|
-
return /*#__PURE__*/_react.default.createElement(loaded.MediaClientContext.Consumer, null, function (value) {
|
|
80
|
-
return value ? mediaCard :
|
|
81
|
-
/*#__PURE__*/
|
|
82
|
-
// TODO - make clientConfig optional
|
|
83
|
-
_react.default.createElement(loaded.MediaClientProvider, {
|
|
84
|
-
clientConfig: props.mediaClientConfig
|
|
85
|
-
}, mediaCard);
|
|
86
|
-
});
|
|
87
80
|
}
|
|
88
81
|
});
|
|
89
82
|
var CardLoader = function CardLoader(props) {
|
|
@@ -56,7 +56,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
|
|
|
56
56
|
_context.prev = 2;
|
|
57
57
|
_context.next = 5;
|
|
58
58
|
return Promise.all([Promise.resolve().then(function () {
|
|
59
|
-
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_media-client" */'@atlaskit/media-client'));
|
|
59
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_media-client-react" */'@atlaskit/media-client-react'));
|
|
60
60
|
}), Promise.resolve().then(function () {
|
|
61
61
|
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_inline-media-card" */'./mediaInlineCard'));
|
|
62
62
|
}), Promise.resolve().then(function () {
|
|
@@ -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.2.
|
|
122
|
+
packageName: "77.2.2",
|
|
123
123
|
componentName: 'mediaInlineCard',
|
|
124
124
|
component: 'mediaInlineCard'
|
|
125
125
|
};
|
|
@@ -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.2.
|
|
17
|
+
var packageVersion = "77.2.2";
|
|
18
18
|
var concurrentExperience;
|
|
19
19
|
var getExperience = function getExperience(id) {
|
|
20
20
|
if (!concurrentExperience) {
|
package/dist/es2019/card/card.js
CHANGED
|
@@ -27,7 +27,7 @@ import { getMediaCardCursor } from '../utils/getMediaCardCursor';
|
|
|
27
27
|
import { completeUfoExperience, startUfoExperience, abortUfoExperience } from '../utils/ufoExperiences';
|
|
28
28
|
import { generateUniqueId } from '../utils/generateUniqueId';
|
|
29
29
|
const packageName = "@atlaskit/media-card";
|
|
30
|
-
const packageVersion = "77.2.
|
|
30
|
+
const packageVersion = "77.2.2";
|
|
31
31
|
export class CardBase extends Component {
|
|
32
32
|
constructor(props) {
|
|
33
33
|
super(props);
|
|
@@ -16,7 +16,7 @@ const MediaCardErrorBoundary = Loadable({
|
|
|
16
16
|
loading: () => /*#__PURE__*/React.createElement(CardLoadingWithContext, null)
|
|
17
17
|
});
|
|
18
18
|
const MediaCardWithMediaClient = Loadable({
|
|
19
|
-
loader: () => import( /* webpackChunkName: "@atlaskit-internal_media-client" */'@atlaskit/media-client'),
|
|
19
|
+
loader: () => import( /* webpackChunkName: "@atlaskit-internal_media-client-react" */'@atlaskit/media-client-react'),
|
|
20
20
|
loading: () => /*#__PURE__*/React.createElement(CardLoadingWithContext, null),
|
|
21
21
|
render: (loaded, props) => /*#__PURE__*/React.createElement(CardWithMediaClient, _extends({}, props, {
|
|
22
22
|
withMediaClient: loaded.withMediaClient
|
|
@@ -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.2.
|
|
69
|
+
const packageVersion = "77.2.2";
|
|
70
70
|
const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
71
71
|
packageVersion,
|
|
72
72
|
packageName,
|
|
@@ -28,7 +28,7 @@ import { completeUfoExperience, startUfoExperience, abortUfoExperience } from '.
|
|
|
28
28
|
import { generateUniqueId } from '../../utils/generateUniqueId';
|
|
29
29
|
import { useFileState } from '@atlaskit/media-client-react';
|
|
30
30
|
const packageName = "@atlaskit/media-card";
|
|
31
|
-
const packageVersion = "77.2.
|
|
31
|
+
const packageVersion = "77.2.2";
|
|
32
32
|
export class CardV2Base extends Component {
|
|
33
33
|
constructor(props) {
|
|
34
34
|
super(props);
|
|
@@ -15,14 +15,16 @@ const MediaCardErrorBoundary = Loadable({
|
|
|
15
15
|
loader: () => import( /* webpackChunkName: "@atlaskit-internal_media-card-error-boundary" */'../media-card-analytics-error-boundary').then(mod => mod.default),
|
|
16
16
|
loading: () => /*#__PURE__*/React.createElement(CardLoadingWithContext, null)
|
|
17
17
|
});
|
|
18
|
-
const
|
|
18
|
+
const CardWithMediaClient = props => {
|
|
19
19
|
const {
|
|
20
20
|
dimensions,
|
|
21
21
|
onClick,
|
|
22
|
-
|
|
22
|
+
withMediaClient,
|
|
23
23
|
featureFlags
|
|
24
24
|
} = props;
|
|
25
|
-
const
|
|
25
|
+
const Card = React.useMemo(() => {
|
|
26
|
+
return withMediaClient(MediaV2Card);
|
|
27
|
+
}, [withMediaClient]);
|
|
26
28
|
const featureFlagsWithMediaCardV2 = React.useMemo(() => ({
|
|
27
29
|
...featureFlags,
|
|
28
30
|
mediaCardV2: true //used for analytics - internal use only
|
|
@@ -30,25 +32,16 @@ const MediaCardWithMediaClient = props => {
|
|
|
30
32
|
return /*#__PURE__*/React.createElement(MediaCardErrorBoundary, {
|
|
31
33
|
dimensions: dimensions,
|
|
32
34
|
onClick: onClick
|
|
33
|
-
}, /*#__PURE__*/React.createElement(
|
|
34
|
-
featureFlags: featureFlagsWithMediaCardV2
|
|
35
|
-
mediaClient: mediaClient
|
|
35
|
+
}, /*#__PURE__*/React.createElement(Card, _extends({}, props, {
|
|
36
|
+
featureFlags: featureFlagsWithMediaCardV2
|
|
36
37
|
})));
|
|
37
38
|
};
|
|
38
39
|
const MediaCardWithMediaClientProvider = Loadable({
|
|
39
40
|
loader: () => import( /* webpackChunkName: "@atlaskit-internal_media-client-react" */'@atlaskit/media-client-react'),
|
|
40
41
|
loading: () => /*#__PURE__*/React.createElement(CardLoadingWithContext, null),
|
|
41
|
-
render: (loaded, props) => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}));
|
|
45
|
-
return /*#__PURE__*/React.createElement(loaded.MediaClientContext.Consumer, null, value => value ? mediaCard :
|
|
46
|
-
/*#__PURE__*/
|
|
47
|
-
// TODO - make clientConfig optional
|
|
48
|
-
React.createElement(loaded.MediaClientProvider, {
|
|
49
|
-
clientConfig: props.mediaClientConfig
|
|
50
|
-
}, mediaCard));
|
|
51
|
-
}
|
|
42
|
+
render: (loaded, props) => /*#__PURE__*/React.createElement(CardWithMediaClient, _extends({}, props, {
|
|
43
|
+
withMediaClient: loaded.withMediaClient
|
|
44
|
+
}))
|
|
52
45
|
});
|
|
53
46
|
const CardLoader = props => {
|
|
54
47
|
return /*#__PURE__*/React.createElement(MediaCardContext.Provider, {
|
|
@@ -15,7 +15,7 @@ export default class MediaInlineCardLoader extends React.PureComponent {
|
|
|
15
15
|
this.mounted = true;
|
|
16
16
|
if (!this.state.MediaInlineCard) {
|
|
17
17
|
try {
|
|
18
|
-
const [mediaClient, cardModule, mediaInlineErrorBoundaryModule] = await Promise.all([import( /* webpackChunkName: "@atlaskit-internal_media-client" */'@atlaskit/media-client'), import( /* webpackChunkName: "@atlaskit-internal_inline-media-card" */'./mediaInlineCard'), import( /* webpackChunkName: "@atlaskit-internal_media-inline-error-boundary" */'./mediaInlineAnalyticsErrorBoundary')]);
|
|
18
|
+
const [mediaClient, cardModule, mediaInlineErrorBoundaryModule] = await Promise.all([import( /* webpackChunkName: "@atlaskit-internal_media-client-react" */'@atlaskit/media-client-react'), import( /* webpackChunkName: "@atlaskit-internal_inline-media-card" */'./mediaInlineCard'), import( /* webpackChunkName: "@atlaskit-internal_media-inline-error-boundary" */'./mediaInlineAnalyticsErrorBoundary')]);
|
|
19
19
|
MediaInlineCardLoader.MediaInlineCard = mediaClient.withMediaClient(cardModule.MediaInlineCard);
|
|
20
20
|
MediaInlineCardLoader.ErrorBoundary = mediaInlineErrorBoundaryModule.default;
|
|
21
21
|
if (this.mounted) {
|
|
@@ -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: "77.2.
|
|
40
|
+
packageName: "77.2.2",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -4,7 +4,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
4
4
|
import { MediaCardError } from '../errors';
|
|
5
5
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
6
6
|
const packageName = "@atlaskit/media-card";
|
|
7
|
-
const packageVersion = "77.2.
|
|
7
|
+
const packageVersion = "77.2.2";
|
|
8
8
|
let concurrentExperience;
|
|
9
9
|
const getExperience = id => {
|
|
10
10
|
if (!concurrentExperience) {
|
package/dist/esm/card/card.js
CHANGED
|
@@ -40,7 +40,7 @@ import { getMediaCardCursor } from '../utils/getMediaCardCursor';
|
|
|
40
40
|
import { completeUfoExperience, startUfoExperience, abortUfoExperience } from '../utils/ufoExperiences';
|
|
41
41
|
import { generateUniqueId } from '../utils/generateUniqueId';
|
|
42
42
|
var packageName = "@atlaskit/media-card";
|
|
43
|
-
var packageVersion = "77.2.
|
|
43
|
+
var packageVersion = "77.2.2";
|
|
44
44
|
export var CardBase = /*#__PURE__*/function (_Component) {
|
|
45
45
|
_inherits(CardBase, _Component);
|
|
46
46
|
var _super = _createSuper(CardBase);
|
|
@@ -29,7 +29,7 @@ var MediaCardErrorBoundary = Loadable({
|
|
|
29
29
|
});
|
|
30
30
|
var MediaCardWithMediaClient = Loadable({
|
|
31
31
|
loader: function loader() {
|
|
32
|
-
return import( /* webpackChunkName: "@atlaskit-internal_media-client" */'@atlaskit/media-client');
|
|
32
|
+
return import( /* webpackChunkName: "@atlaskit-internal_media-client-react" */'@atlaskit/media-client-react');
|
|
33
33
|
},
|
|
34
34
|
loading: function loading() {
|
|
35
35
|
return /*#__PURE__*/React.createElement(CardLoadingWithContext, null);
|
|
@@ -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 = "77.2.
|
|
86
|
+
var packageVersion = "77.2.2";
|
|
87
87
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
88
88
|
packageVersion: packageVersion,
|
|
89
89
|
packageName: packageName,
|
|
@@ -41,7 +41,7 @@ import { completeUfoExperience, startUfoExperience, abortUfoExperience } from '.
|
|
|
41
41
|
import { generateUniqueId } from '../../utils/generateUniqueId';
|
|
42
42
|
import { useFileState } from '@atlaskit/media-client-react';
|
|
43
43
|
var packageName = "@atlaskit/media-card";
|
|
44
|
-
var packageVersion = "77.2.
|
|
44
|
+
var packageVersion = "77.2.2";
|
|
45
45
|
export var CardV2Base = /*#__PURE__*/function (_Component) {
|
|
46
46
|
_inherits(CardV2Base, _Component);
|
|
47
47
|
var _super = _createSuper(CardV2Base);
|
|
@@ -30,12 +30,14 @@ var MediaCardErrorBoundary = Loadable({
|
|
|
30
30
|
return /*#__PURE__*/React.createElement(CardLoadingWithContext, null);
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
var
|
|
33
|
+
var CardWithMediaClient = function CardWithMediaClient(props) {
|
|
34
34
|
var dimensions = props.dimensions,
|
|
35
35
|
onClick = props.onClick,
|
|
36
|
-
|
|
36
|
+
withMediaClient = props.withMediaClient,
|
|
37
37
|
featureFlags = props.featureFlags;
|
|
38
|
-
var
|
|
38
|
+
var Card = React.useMemo(function () {
|
|
39
|
+
return withMediaClient(MediaV2Card);
|
|
40
|
+
}, [withMediaClient]);
|
|
39
41
|
var featureFlagsWithMediaCardV2 = React.useMemo(function () {
|
|
40
42
|
return _objectSpread(_objectSpread({}, featureFlags), {}, {
|
|
41
43
|
mediaCardV2: true //used for analytics - internal use only
|
|
@@ -44,9 +46,8 @@ var MediaCardWithMediaClient = function MediaCardWithMediaClient(props) {
|
|
|
44
46
|
return /*#__PURE__*/React.createElement(MediaCardErrorBoundary, {
|
|
45
47
|
dimensions: dimensions,
|
|
46
48
|
onClick: onClick
|
|
47
|
-
}, /*#__PURE__*/React.createElement(
|
|
48
|
-
featureFlags: featureFlagsWithMediaCardV2
|
|
49
|
-
mediaClient: mediaClient
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Card, _extends({}, props, {
|
|
50
|
+
featureFlags: featureFlagsWithMediaCardV2
|
|
50
51
|
})));
|
|
51
52
|
};
|
|
52
53
|
var MediaCardWithMediaClientProvider = Loadable({
|
|
@@ -57,17 +58,9 @@ var MediaCardWithMediaClientProvider = Loadable({
|
|
|
57
58
|
return /*#__PURE__*/React.createElement(CardLoadingWithContext, null);
|
|
58
59
|
},
|
|
59
60
|
render: function render(loaded, props) {
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
return /*#__PURE__*/React.createElement(CardWithMediaClient, _extends({}, props, {
|
|
62
|
+
withMediaClient: loaded.withMediaClient
|
|
62
63
|
}));
|
|
63
|
-
return /*#__PURE__*/React.createElement(loaded.MediaClientContext.Consumer, null, function (value) {
|
|
64
|
-
return value ? mediaCard :
|
|
65
|
-
/*#__PURE__*/
|
|
66
|
-
// TODO - make clientConfig optional
|
|
67
|
-
React.createElement(loaded.MediaClientProvider, {
|
|
68
|
-
clientConfig: props.mediaClientConfig
|
|
69
|
-
}, mediaCard);
|
|
70
|
-
});
|
|
71
64
|
}
|
|
72
65
|
});
|
|
73
66
|
var CardLoader = function CardLoader(props) {
|
|
@@ -45,7 +45,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
45
45
|
}
|
|
46
46
|
_context.prev = 2;
|
|
47
47
|
_context.next = 5;
|
|
48
|
-
return Promise.all([import( /* webpackChunkName: "@atlaskit-internal_media-client" */'@atlaskit/media-client'), import( /* webpackChunkName: "@atlaskit-internal_inline-media-card" */'./mediaInlineCard'), import( /* webpackChunkName: "@atlaskit-internal_media-inline-error-boundary" */'./mediaInlineAnalyticsErrorBoundary')]);
|
|
48
|
+
return Promise.all([import( /* webpackChunkName: "@atlaskit-internal_media-client-react" */'@atlaskit/media-client-react'), import( /* webpackChunkName: "@atlaskit-internal_inline-media-card" */'./mediaInlineCard'), import( /* webpackChunkName: "@atlaskit-internal_media-inline-error-boundary" */'./mediaInlineAnalyticsErrorBoundary')]);
|
|
49
49
|
case 5:
|
|
50
50
|
_yield$Promise$all = _context.sent;
|
|
51
51
|
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
|
|
@@ -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: "77.2.
|
|
106
|
+
packageName: "77.2.2",
|
|
107
107
|
componentName: 'mediaInlineCard',
|
|
108
108
|
component: 'mediaInlineCard'
|
|
109
109
|
};
|
|
@@ -7,7 +7,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
7
7
|
import { MediaCardError } from '../errors';
|
|
8
8
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
9
9
|
var packageName = "@atlaskit/media-card";
|
|
10
|
-
var packageVersion = "77.2.
|
|
10
|
+
var packageVersion = "77.2.2";
|
|
11
11
|
var concurrentExperience;
|
|
12
12
|
var getExperience = function getExperience(id) {
|
|
13
13
|
if (!concurrentExperience) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WithMediaClientConfigProps } from '@atlaskit/media-client';
|
|
2
|
+
import type { WithMediaClientConfigProps } from '@atlaskit/media-client-react';
|
|
3
3
|
import type { CardBaseProps } from './card';
|
|
4
4
|
export type CardWithMediaClientConfigProps = WithMediaClientConfigProps<CardBaseProps>;
|
|
5
5
|
declare const CardLoader: React.FC<CardWithMediaClientConfigProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WithMediaClientConfigProps } from '@atlaskit/media-client';
|
|
2
|
+
import { WithMediaClientConfigProps } from '@atlaskit/media-client-react';
|
|
3
3
|
import { MediaInlineCardProps } from './mediaInlineCard';
|
|
4
4
|
export type MediaInlineCardWithMediaClientConfigProps = WithMediaClientConfigProps<MediaInlineCardProps>;
|
|
5
5
|
type MediaInlineCardWithMediaClientConfigComponent = React.ComponentType<MediaInlineCardWithMediaClientConfigProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WithMediaClientConfigProps } from '@atlaskit/media-client';
|
|
2
|
+
import type { WithMediaClientConfigProps } from '@atlaskit/media-client-react';
|
|
3
3
|
import type { CardBaseProps } from './card';
|
|
4
4
|
export type CardWithMediaClientConfigProps = WithMediaClientConfigProps<CardBaseProps>;
|
|
5
5
|
declare const CardLoader: React.FC<CardWithMediaClientConfigProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WithMediaClientConfigProps } from '@atlaskit/media-client';
|
|
2
|
+
import { WithMediaClientConfigProps } from '@atlaskit/media-client-react';
|
|
3
3
|
import { MediaInlineCardProps } from './mediaInlineCard';
|
|
4
4
|
export type MediaInlineCardWithMediaClientConfigProps = WithMediaClientConfigProps<MediaInlineCardProps>;
|
|
5
5
|
type MediaInlineCardWithMediaClientConfigComponent = React.ComponentType<MediaInlineCardWithMediaClientConfigProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "77.2.
|
|
3
|
+
"version": "77.2.2",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"@atlaskit/dropdown-menu": "^12.1.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^2.8.0",
|
|
42
42
|
"@atlaskit/icon": "^21.12.0",
|
|
43
|
-
"@atlaskit/media-client": "^
|
|
44
|
-
"@atlaskit/media-client-react": "^1.
|
|
43
|
+
"@atlaskit/media-client": "^25.0.0",
|
|
44
|
+
"@atlaskit/media-client-react": "^1.3.0",
|
|
45
45
|
"@atlaskit/media-common": "^9.0.0",
|
|
46
46
|
"@atlaskit/media-ui": "^25.0.0",
|
|
47
47
|
"@atlaskit/media-viewer": "^48.1.0",
|
package/report.api.md
CHANGED
|
@@ -33,7 +33,7 @@ import { ReactNode } from 'react';
|
|
|
33
33
|
import { SSR } from '@atlaskit/media-common';
|
|
34
34
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
35
35
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
36
|
-
import { WithMediaClientConfigProps } from '@atlaskit/media-client';
|
|
36
|
+
import { WithMediaClientConfigProps } from '@atlaskit/media-client-react';
|
|
37
37
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
38
38
|
|
|
39
39
|
// @public (undocumented)
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import { ReactNode } from 'react';
|
|
|
22
22
|
import { SSR } from '@atlaskit/media-common';
|
|
23
23
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
24
24
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
25
|
-
import { WithMediaClientConfigProps } from '@atlaskit/media-client';
|
|
25
|
+
import { WithMediaClientConfigProps } from '@atlaskit/media-client-react';
|
|
26
26
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
27
27
|
|
|
28
28
|
// @public (undocumented)
|