@atlaskit/media-card 79.4.7 → 79.5.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 +12 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/cardSync.js +20 -0
- package/dist/cjs/card/index.js +8 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/cardSync.js +13 -0
- package/dist/es2019/card/index.js +2 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/cardSync.js +13 -0
- package/dist/esm/card/index.js +2 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/cardSync.d.ts +5 -0
- package/dist/types/card/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types-ts4.5/card/cardSync.d.ts +5 -0
- package/dist/types-ts4.5/card/index.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 79.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#195899](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/195899)
|
|
8
|
+
[`393adf36ed2bc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/393adf36ed2bc) -
|
|
9
|
+
Expose CardSync to allow for synchronous loading of the MediaCard
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 79.4.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/card/card.js
CHANGED
|
@@ -20,7 +20,7 @@ var _label = _interopRequireDefault(require("@atlaskit/react-ufo/label"));
|
|
|
20
20
|
var _excluded = ["identifier"];
|
|
21
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
22
|
var packageName = "@atlaskit/media-card";
|
|
23
|
-
var packageVersion = "79.4.
|
|
23
|
+
var packageVersion = "79.4.7";
|
|
24
24
|
var CardBase = exports.CardBase = function CardBase(_ref) {
|
|
25
25
|
var identifier = _ref.identifier,
|
|
26
26
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _segment = _interopRequireDefault(require("@atlaskit/react-ufo/segment"));
|
|
10
|
+
var _cardWithMediaClient = require("./cardWithMediaClient");
|
|
11
|
+
var MediaCardContext = /*#__PURE__*/_react.default.createContext({});
|
|
12
|
+
var CardSync = function CardSync(props) {
|
|
13
|
+
return /*#__PURE__*/_react.default.createElement(_segment.default, {
|
|
14
|
+
name: "media-card-sync",
|
|
15
|
+
mode: "list"
|
|
16
|
+
}, /*#__PURE__*/_react.default.createElement(MediaCardContext.Provider, {
|
|
17
|
+
value: props
|
|
18
|
+
}, /*#__PURE__*/_react.default.createElement(_cardWithMediaClient.CardWithMediaClient, props)));
|
|
19
|
+
};
|
|
20
|
+
var _default = exports.default = CardSync;
|
package/dist/cjs/card/index.js
CHANGED
|
@@ -10,4 +10,11 @@ Object.defineProperty(exports, "Card", {
|
|
|
10
10
|
return _cardLoader.default;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
-
|
|
13
|
+
Object.defineProperty(exports, "CardSync", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _cardSync.default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
var _cardLoader = _interopRequireDefault(require("./cardLoader"));
|
|
20
|
+
var _cardSync = _interopRequireDefault(require("./cardSync"));
|
|
@@ -87,7 +87,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
87
87
|
}(_react.default.Component);
|
|
88
88
|
(0, _defineProperty2.default)(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
89
89
|
var packageName = "@atlaskit/media-card";
|
|
90
|
-
var packageVersion = "79.4.
|
|
90
|
+
var packageVersion = "79.4.7";
|
|
91
91
|
|
|
92
92
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
93
93
|
var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
|
package/dist/cjs/index.js
CHANGED
|
@@ -27,6 +27,12 @@ Object.defineProperty(exports, "CardPlaceholder", {
|
|
|
27
27
|
return _cardPlaceholder.CardPlaceholder;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
Object.defineProperty(exports, "CardSync", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _card.CardSync;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
30
36
|
Object.defineProperty(exports, "DateOverrideContext", {
|
|
31
37
|
enumerable: true,
|
|
32
38
|
get: function get() {
|
|
@@ -116,7 +116,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
|
|
|
116
116
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
117
117
|
var analyticsContext = {
|
|
118
118
|
packageVersion: "@atlaskit/media-card",
|
|
119
|
-
packageName: "79.4.
|
|
119
|
+
packageName: "79.4.7",
|
|
120
120
|
componentName: 'mediaInlineCard',
|
|
121
121
|
component: 'mediaInlineCard'
|
|
122
122
|
};
|
|
@@ -15,7 +15,7 @@ var _mediaClient = require("@atlaskit/media-client");
|
|
|
15
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
17
|
var packageName = "@atlaskit/media-card";
|
|
18
|
-
var packageVersion = "79.4.
|
|
18
|
+
var packageVersion = "79.4.7";
|
|
19
19
|
var SAMPLE_RATE = 0.05;
|
|
20
20
|
var concurrentExperience;
|
|
21
21
|
var getExperience = function getExperience(id) {
|
package/dist/es2019/card/card.js
CHANGED
|
@@ -9,7 +9,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
9
9
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
10
10
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
11
11
|
const packageName = "@atlaskit/media-card";
|
|
12
|
-
const packageVersion = "79.4.
|
|
12
|
+
const packageVersion = "79.4.7";
|
|
13
13
|
export const CardBase = ({
|
|
14
14
|
identifier,
|
|
15
15
|
...otherProps
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import UFOSegment from '@atlaskit/react-ufo/segment';
|
|
3
|
+
import { CardWithMediaClient } from './cardWithMediaClient';
|
|
4
|
+
const MediaCardContext = /*#__PURE__*/React.createContext({});
|
|
5
|
+
const CardSync = props => {
|
|
6
|
+
return /*#__PURE__*/React.createElement(UFOSegment, {
|
|
7
|
+
name: "media-card-sync",
|
|
8
|
+
mode: "list"
|
|
9
|
+
}, /*#__PURE__*/React.createElement(MediaCardContext.Provider, {
|
|
10
|
+
value: props
|
|
11
|
+
}, /*#__PURE__*/React.createElement(CardWithMediaClient, props)));
|
|
12
|
+
};
|
|
13
|
+
export default CardSync;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default as Card } from './cardLoader';
|
|
1
|
+
export { default as Card } from './cardLoader';
|
|
2
|
+
export { default as CardSync } from './cardSync';
|
|
@@ -66,7 +66,7 @@ class WrappedMediaCardAnalyticsErrorBoundary extends React.Component {
|
|
|
66
66
|
}
|
|
67
67
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
68
68
|
const packageName = "@atlaskit/media-card";
|
|
69
|
-
const packageVersion = "79.4.
|
|
69
|
+
const packageVersion = "79.4.7";
|
|
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({
|
package/dist/es2019/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* tsconfig.entry-points.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export { Card } from './card';
|
|
6
|
+
export { Card, CardSync } from './card';
|
|
7
7
|
export { MediaInlineCard, fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent } from './inline';
|
|
8
8
|
export { MediaCardError } from './errors';
|
|
9
9
|
export { CardPlaceholder } from './utils/lightCards/cardPlaceholder';
|
|
@@ -37,7 +37,7 @@ export default class MediaInlineCardLoader extends React.PureComponent {
|
|
|
37
37
|
} = this.state;
|
|
38
38
|
const analyticsContext = {
|
|
39
39
|
packageVersion: "@atlaskit/media-card",
|
|
40
|
-
packageName: "79.4.
|
|
40
|
+
packageName: "79.4.7",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -5,7 +5,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
5
5
|
import { MediaCardError } from '../errors';
|
|
6
6
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
7
7
|
const packageName = "@atlaskit/media-card";
|
|
8
|
-
const packageVersion = "79.4.
|
|
8
|
+
const packageVersion = "79.4.7";
|
|
9
9
|
const SAMPLE_RATE = 0.05;
|
|
10
10
|
let concurrentExperience;
|
|
11
11
|
const getExperience = id => {
|
package/dist/esm/card/card.js
CHANGED
|
@@ -11,7 +11,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
11
11
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
12
12
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
13
13
|
var packageName = "@atlaskit/media-card";
|
|
14
|
-
var packageVersion = "79.4.
|
|
14
|
+
var packageVersion = "79.4.7";
|
|
15
15
|
export var CardBase = function CardBase(_ref) {
|
|
16
16
|
var identifier = _ref.identifier,
|
|
17
17
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import UFOSegment from '@atlaskit/react-ufo/segment';
|
|
3
|
+
import { CardWithMediaClient } from './cardWithMediaClient';
|
|
4
|
+
var MediaCardContext = /*#__PURE__*/React.createContext({});
|
|
5
|
+
var CardSync = function CardSync(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement(UFOSegment, {
|
|
7
|
+
name: "media-card-sync",
|
|
8
|
+
mode: "list"
|
|
9
|
+
}, /*#__PURE__*/React.createElement(MediaCardContext.Provider, {
|
|
10
|
+
value: props
|
|
11
|
+
}, /*#__PURE__*/React.createElement(CardWithMediaClient, props)));
|
|
12
|
+
};
|
|
13
|
+
export default CardSync;
|
package/dist/esm/card/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default as Card } from './cardLoader';
|
|
1
|
+
export { default as Card } from './cardLoader';
|
|
2
|
+
export { default as CardSync } from './cardSync';
|
|
@@ -80,7 +80,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
80
80
|
}(React.Component);
|
|
81
81
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
82
82
|
var packageName = "@atlaskit/media-card";
|
|
83
|
-
var packageVersion = "79.4.
|
|
83
|
+
var packageVersion = "79.4.7";
|
|
84
84
|
|
|
85
85
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
86
86
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* tsconfig.entry-points.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export { Card } from './card';
|
|
6
|
+
export { Card, CardSync } from './card';
|
|
7
7
|
export { MediaInlineCard, fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent } from './inline';
|
|
8
8
|
export { MediaCardError } from './errors';
|
|
9
9
|
export { CardPlaceholder } from './utils/lightCards/cardPlaceholder';
|
|
@@ -101,7 +101,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
101
101
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
102
102
|
var analyticsContext = {
|
|
103
103
|
packageVersion: "@atlaskit/media-card",
|
|
104
|
-
packageName: "79.4.
|
|
104
|
+
packageName: "79.4.7",
|
|
105
105
|
componentName: 'mediaInlineCard',
|
|
106
106
|
component: 'mediaInlineCard'
|
|
107
107
|
};
|
|
@@ -8,7 +8,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
8
8
|
import { MediaCardError } from '../errors';
|
|
9
9
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
10
10
|
var packageName = "@atlaskit/media-card";
|
|
11
|
-
var packageVersion = "79.4.
|
|
11
|
+
var packageVersion = "79.4.7";
|
|
12
12
|
var SAMPLE_RATE = 0.05;
|
|
13
13
|
var concurrentExperience;
|
|
14
14
|
var getExperience = function getExperience(id) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export type { NumericalCardDimensions } from '@atlaskit/media-common';
|
|
6
6
|
export type { CardAction, CardEventHandler } from './card/actions';
|
|
7
7
|
export type { CardStatus, CardAppearance, CardDimensionValue, CardPreview, TitleBoxIcon, CardEvent, InlineCardEvent, SharedCardProps, CardOnClickCallback, InlineCardOnClickCallback, CardProps, CardState, CardDimensions, } from './types';
|
|
8
|
-
export { Card } from './card';
|
|
8
|
+
export { Card, CardSync } from './card';
|
|
9
9
|
export { MediaInlineCard, fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent, } from './inline';
|
|
10
10
|
export { MediaCardError } from './errors';
|
|
11
11
|
export { CardPlaceholder } from './utils/lightCards/cardPlaceholder';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export type { NumericalCardDimensions } from '@atlaskit/media-common';
|
|
6
6
|
export type { CardAction, CardEventHandler } from './card/actions';
|
|
7
7
|
export type { CardStatus, CardAppearance, CardDimensionValue, CardPreview, TitleBoxIcon, CardEvent, InlineCardEvent, SharedCardProps, CardOnClickCallback, InlineCardOnClickCallback, CardProps, CardState, CardDimensions, } from './types';
|
|
8
|
-
export { Card } from './card';
|
|
8
|
+
export { Card, CardSync } from './card';
|
|
9
9
|
export { MediaInlineCard, fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent, } from './inline';
|
|
10
10
|
export { MediaCardError } from './errors';
|
|
11
11
|
export { CardPlaceholder } from './utils/lightCards/cardPlaceholder';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "79.
|
|
3
|
+
"version": "79.5.0",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@atlaskit/media-viewer": "^52.4.0",
|
|
51
51
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
52
52
|
"@atlaskit/primitives": "^14.11.0",
|
|
53
|
-
"@atlaskit/react-ufo": "^4.
|
|
53
|
+
"@atlaskit/react-ufo": "^4.2.0",
|
|
54
54
|
"@atlaskit/spinner": "^19.0.0",
|
|
55
55
|
"@atlaskit/theme": "^19.0.0",
|
|
56
56
|
"@atlaskit/tokens": "^6.0.0",
|
|
@@ -101,7 +101,6 @@
|
|
|
101
101
|
"react": "^18.2.0",
|
|
102
102
|
"react-dom": "^18.2.0",
|
|
103
103
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
104
|
-
"typescript": "~5.4.2",
|
|
105
104
|
"uuid": "^3.1.0",
|
|
106
105
|
"wait-for-expect": "^1.2.0"
|
|
107
106
|
},
|