@atlaskit/media-card 81.11.0 → 81.12.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 +21 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/cardView.js +5 -14
- 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 +1 -5
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/cardView.js +5 -14
- 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 +1 -5
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/cardView.js +5 -14
- 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 +1 -5
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/cardView.d.ts +1 -1
- package/example-helpers/index.tsx +5 -2
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 81.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`2a1e8245a006e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2a1e8245a006e) -
|
|
8
|
+
Clean up experiment `cc-maui-ai-edit-loading-experiment`. The enabled behaviour is now permanent:
|
|
9
|
+
media cards and MAUI embeds always render the simple loading bar instead of the spinner/icon
|
|
10
|
+
carousel, and the AI-edit blanket overlay is always applied when a MAUI app is replaced from the
|
|
11
|
+
toolbar.
|
|
12
|
+
|
|
13
|
+
`@atlaskit/tmp-editor-statsig` removes the `cc-maui-ai-edit-loading-experiment` key from
|
|
14
|
+
`editorExperimentsConfig`, so reading it via `expValEquals`/`expValEqualsNoExposure` is now a type
|
|
15
|
+
error — remove those call sites.
|
|
16
|
+
|
|
17
|
+
`@atlaskit/media-card` drops its now-unused `@atlaskit/spinner` dependency, and
|
|
18
|
+
`@atlassian/native-embeds-maui-experience` drops its now-unused `@atlaskit/icon-lab` dependency.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 81.11.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/dist/cjs/card/card.js
CHANGED
|
@@ -8,7 +8,7 @@ var _reactIntl = require("react-intl");
|
|
|
8
8
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
9
9
|
var _CardWithPerformanceObserver = require("./CardWithPerformanceObserver");
|
|
10
10
|
var packageName = "@atlaskit/media-card";
|
|
11
|
-
var packageVersion = "81.
|
|
11
|
+
var packageVersion = "81.11.0";
|
|
12
12
|
var Card = exports.Card = (0, _mediaCommon.withMediaAnalyticsContext)({
|
|
13
13
|
packageVersion: packageVersion,
|
|
14
14
|
packageName: packageName,
|
|
@@ -16,7 +16,6 @@ var _mediaClient = require("@atlaskit/media-client");
|
|
|
16
16
|
var _messages = require("@atlaskit/media-ui/messages");
|
|
17
17
|
var _mimeTypeIcon = require("@atlaskit/media-ui/mime-type-icon");
|
|
18
18
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
19
|
-
var _spinner = _interopRequireDefault(require("@atlaskit/spinner/spinner"));
|
|
20
19
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
21
20
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
22
21
|
var _isUploadError = require("../isUploadError");
|
|
@@ -180,7 +179,7 @@ var CardViewBase = exports.CardViewBase = function CardViewBase(_ref) {
|
|
|
180
179
|
var loadingConfig = _objectSpread(_objectSpread({}, defaultConfig), {}, {
|
|
181
180
|
renderPlayButton: false,
|
|
182
181
|
renderTypeIcon: false,
|
|
183
|
-
|
|
182
|
+
renderLoading: !didImageRender && !didSvgRender
|
|
184
183
|
});
|
|
185
184
|
switch (status) {
|
|
186
185
|
case 'uploading':
|
|
@@ -252,7 +251,7 @@ var CardViewBase = exports.CardViewBase = function CardViewBase(_ref) {
|
|
|
252
251
|
iconMessage = _getRenderConfigBySta.iconMessage,
|
|
253
252
|
renderImageRenderer = _getRenderConfigBySta.renderImageRenderer,
|
|
254
253
|
renderSvgView = _getRenderConfigBySta.renderSvgView,
|
|
255
|
-
|
|
254
|
+
renderLoading = _getRenderConfigBySta.renderLoading,
|
|
256
255
|
renderPlayButton = _getRenderConfigBySta.renderPlayButton,
|
|
257
256
|
renderBlanket = _getRenderConfigBySta.renderBlanket,
|
|
258
257
|
renderProgressBar = _getRenderConfigBySta.renderProgressBar,
|
|
@@ -316,20 +315,12 @@ var CardViewBase = exports.CardViewBase = function CardViewBase(_ref) {
|
|
|
316
315
|
if (suppressLoadingUI) {
|
|
317
316
|
mediaMotion = didImageRender || didSvgRender ? 'entering' : 'hidden';
|
|
318
317
|
}
|
|
319
|
-
|
|
320
|
-
// Lazy so the experiment is only evaluated, and exposed, when this is actually rendered.
|
|
321
318
|
var renderLoadingPlaceholder = function renderLoadingPlaceholder() {
|
|
322
|
-
return
|
|
319
|
+
return /*#__PURE__*/_react.default.createElement(_loadingBar.LoadingBar, {
|
|
323
320
|
animationDisabled: disableAnimation,
|
|
324
321
|
testId: "media-card-loading",
|
|
325
322
|
interactionName: "media-card-loading"
|
|
326
|
-
})
|
|
327
|
-
breakpoint: breakpoint,
|
|
328
|
-
hasTitleBox: hasVisibleTitleBox
|
|
329
|
-
}, /*#__PURE__*/_react.default.createElement(_spinner.default, {
|
|
330
|
-
testId: "media-card-loading",
|
|
331
|
-
interactionName: "media-card-loading"
|
|
332
|
-
}));
|
|
323
|
+
});
|
|
333
324
|
};
|
|
334
325
|
var contents = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_imageContainer.ImageContainer, {
|
|
335
326
|
centerElements: didSvgRender && !(0, _fg.fg)('platform_media_card_image_render') // The whole centerElements styles can go after removing the flag
|
|
@@ -350,7 +341,7 @@ var CardViewBase = exports.CardViewBase = function CardViewBase(_ref) {
|
|
|
350
341
|
mediaType: mediaType,
|
|
351
342
|
mimeType: mimeType,
|
|
352
343
|
name: name
|
|
353
|
-
}), iconMessage),
|
|
344
|
+
}), iconMessage), renderLoading && (suppressLoadingUI ?
|
|
354
345
|
/*#__PURE__*/
|
|
355
346
|
// Nothing is drawn, but the interaction still has to be held for the
|
|
356
347
|
// same window as the indicator it replaces.
|
|
@@ -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 = "81.
|
|
90
|
+
var packageVersion = "81.11.0";
|
|
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)({
|
|
@@ -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: "81.
|
|
119
|
+
packageName: "81.11.0",
|
|
120
120
|
componentName: 'mediaInlineCard',
|
|
121
121
|
component: 'mediaInlineCard'
|
|
122
122
|
};
|
|
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.CardLoading = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _spinner = _interopRequireDefault(require("@atlaskit/spinner/spinner"));
|
|
10
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
11
9
|
var _loadingBar = require("../../card/ui/loadingBar/loadingBar");
|
|
12
10
|
var _getDimensionsWithDefault = require("./getDimensionsWithDefault");
|
|
13
11
|
var _lightCardWrappers = require("./lightCardWrappers");
|
|
@@ -21,9 +19,7 @@ var CardLoading = exports.CardLoading = function CardLoading(_ref) {
|
|
|
21
19
|
"data-test-loading": true,
|
|
22
20
|
dimensions: dimensions,
|
|
23
21
|
"data-vc": "media-card-loading"
|
|
24
|
-
},
|
|
25
|
-
interactionName: interactionName || 'media-card-loading'
|
|
26
|
-
}) : /*#__PURE__*/_react.default.createElement(_spinner.default, {
|
|
22
|
+
}, /*#__PURE__*/_react.default.createElement(_loadingBar.LoadingBar, {
|
|
27
23
|
interactionName: interactionName || 'media-card-loading'
|
|
28
24
|
}));
|
|
29
25
|
};
|
|
@@ -23,7 +23,7 @@ var _getMediaGlobalScope = require("./globalScope/getMediaGlobalScope");
|
|
|
23
23
|
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; }
|
|
24
24
|
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; }
|
|
25
25
|
var packageName = "@atlaskit/media-card";
|
|
26
|
-
var packageVersion = "81.
|
|
26
|
+
var packageVersion = "81.11.0";
|
|
27
27
|
var SAMPLE_RATE = 0.05;
|
|
28
28
|
|
|
29
29
|
/**
|
package/dist/es2019/card/card.js
CHANGED
|
@@ -2,7 +2,7 @@ import { injectIntl } from 'react-intl';
|
|
|
2
2
|
import { withMediaAnalyticsContext } from '@atlaskit/media-common';
|
|
3
3
|
import { CardWithPerformanceObserver } from './CardWithPerformanceObserver';
|
|
4
4
|
const packageName = "@atlaskit/media-card";
|
|
5
|
-
const packageVersion = "81.
|
|
5
|
+
const packageVersion = "81.11.0";
|
|
6
6
|
export const Card = withMediaAnalyticsContext({
|
|
7
7
|
packageVersion,
|
|
8
8
|
packageName,
|
|
@@ -6,7 +6,6 @@ import { isFileIdentifier } from '@atlaskit/media-client';
|
|
|
6
6
|
import { messages } from '@atlaskit/media-ui/messages';
|
|
7
7
|
import { MimeTypeIcon } from '@atlaskit/media-ui/mime-type-icon';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
|
-
import SpinnerIcon from '@atlaskit/spinner/spinner';
|
|
10
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
10
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
12
11
|
import { isUploadError } from '../isUploadError';
|
|
@@ -163,7 +162,7 @@ export const CardViewBase = ({
|
|
|
163
162
|
...defaultConfig,
|
|
164
163
|
renderPlayButton: false,
|
|
165
164
|
renderTypeIcon: false,
|
|
166
|
-
|
|
165
|
+
renderLoading: !didImageRender && !didSvgRender
|
|
167
166
|
};
|
|
168
167
|
switch (status) {
|
|
169
168
|
case 'uploading':
|
|
@@ -240,7 +239,7 @@ export const CardViewBase = ({
|
|
|
240
239
|
iconMessage,
|
|
241
240
|
renderImageRenderer,
|
|
242
241
|
renderSvgView,
|
|
243
|
-
|
|
242
|
+
renderLoading,
|
|
244
243
|
renderPlayButton,
|
|
245
244
|
renderBlanket,
|
|
246
245
|
renderProgressBar,
|
|
@@ -305,19 +304,11 @@ export const CardViewBase = ({
|
|
|
305
304
|
if (suppressLoadingUI) {
|
|
306
305
|
mediaMotion = didImageRender || didSvgRender ? 'entering' : 'hidden';
|
|
307
306
|
}
|
|
308
|
-
|
|
309
|
-
// Lazy so the experiment is only evaluated, and exposed, when this is actually rendered.
|
|
310
|
-
const renderLoadingPlaceholder = () => expValEquals('cc-maui-ai-edit-loading-experiment', 'isEnabled', true) ? /*#__PURE__*/React.createElement(LoadingBar, {
|
|
307
|
+
const renderLoadingPlaceholder = () => /*#__PURE__*/React.createElement(LoadingBar, {
|
|
311
308
|
animationDisabled: disableAnimation,
|
|
312
309
|
testId: "media-card-loading",
|
|
313
310
|
interactionName: "media-card-loading"
|
|
314
|
-
})
|
|
315
|
-
breakpoint: breakpoint,
|
|
316
|
-
hasTitleBox: hasVisibleTitleBox
|
|
317
|
-
}, /*#__PURE__*/React.createElement(SpinnerIcon, {
|
|
318
|
-
testId: "media-card-loading",
|
|
319
|
-
interactionName: "media-card-loading"
|
|
320
|
-
}));
|
|
311
|
+
});
|
|
321
312
|
const contents = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ImageContainer, {
|
|
322
313
|
centerElements: didSvgRender && !fg('platform_media_card_image_render') // The whole centerElements styles can go after removing the flag
|
|
323
314
|
,
|
|
@@ -337,7 +328,7 @@ export const CardViewBase = ({
|
|
|
337
328
|
mediaType: mediaType,
|
|
338
329
|
mimeType: mimeType,
|
|
339
330
|
name: name
|
|
340
|
-
}), iconMessage),
|
|
331
|
+
}), iconMessage), renderLoading && (suppressLoadingUI ?
|
|
341
332
|
/*#__PURE__*/
|
|
342
333
|
// Nothing is drawn, but the interaction still has to be held for the
|
|
343
334
|
// same window as the indicator it replaces.
|
|
@@ -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 = "81.
|
|
69
|
+
const packageVersion = "81.11.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: "81.
|
|
40
|
+
packageName: "81.11.0",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import SpinnerIcon from '@atlaskit/spinner/spinner';
|
|
3
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
2
|
import { LoadingBar } from '../../card/ui/loadingBar/loadingBar';
|
|
5
3
|
import { getDimensionsWithDefault } from './getDimensionsWithDefault';
|
|
6
4
|
import { Wrapper } from './lightCardWrappers';
|
|
@@ -15,9 +13,7 @@ export const CardLoading = ({
|
|
|
15
13
|
"data-test-loading": true,
|
|
16
14
|
dimensions: dimensions,
|
|
17
15
|
"data-vc": "media-card-loading"
|
|
18
|
-
},
|
|
19
|
-
interactionName: interactionName || 'media-card-loading'
|
|
20
|
-
}) : /*#__PURE__*/React.createElement(SpinnerIcon, {
|
|
16
|
+
}, /*#__PURE__*/React.createElement(LoadingBar, {
|
|
21
17
|
interactionName: interactionName || 'media-card-loading'
|
|
22
18
|
}));
|
|
23
19
|
};
|
|
@@ -12,7 +12,7 @@ import { extractErrorInfo } from './analytics/extractErrorInfo';
|
|
|
12
12
|
import { getRenderErrorRequestMetadata } from './analytics/getRenderErrorRequestMetadata';
|
|
13
13
|
import { getMediaGlobalScope } from './globalScope/getMediaGlobalScope';
|
|
14
14
|
const packageName = "@atlaskit/media-card";
|
|
15
|
-
const packageVersion = "81.
|
|
15
|
+
const packageVersion = "81.11.0";
|
|
16
16
|
const SAMPLE_RATE = 0.05;
|
|
17
17
|
|
|
18
18
|
/**
|
package/dist/esm/card/card.js
CHANGED
|
@@ -2,7 +2,7 @@ import { injectIntl } from 'react-intl';
|
|
|
2
2
|
import { withMediaAnalyticsContext } from '@atlaskit/media-common';
|
|
3
3
|
import { CardWithPerformanceObserver } from './CardWithPerformanceObserver';
|
|
4
4
|
var packageName = "@atlaskit/media-card";
|
|
5
|
-
var packageVersion = "81.
|
|
5
|
+
var packageVersion = "81.11.0";
|
|
6
6
|
export var Card = withMediaAnalyticsContext({
|
|
7
7
|
packageVersion: packageVersion,
|
|
8
8
|
packageName: packageName,
|
|
@@ -10,7 +10,6 @@ import { isFileIdentifier } from '@atlaskit/media-client';
|
|
|
10
10
|
import { messages } from '@atlaskit/media-ui/messages';
|
|
11
11
|
import { MimeTypeIcon } from '@atlaskit/media-ui/mime-type-icon';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
13
|
-
import SpinnerIcon from '@atlaskit/spinner/spinner';
|
|
14
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
14
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
16
15
|
import { isUploadError } from '../isUploadError';
|
|
@@ -171,7 +170,7 @@ export var CardViewBase = function CardViewBase(_ref) {
|
|
|
171
170
|
var loadingConfig = _objectSpread(_objectSpread({}, defaultConfig), {}, {
|
|
172
171
|
renderPlayButton: false,
|
|
173
172
|
renderTypeIcon: false,
|
|
174
|
-
|
|
173
|
+
renderLoading: !didImageRender && !didSvgRender
|
|
175
174
|
});
|
|
176
175
|
switch (status) {
|
|
177
176
|
case 'uploading':
|
|
@@ -243,7 +242,7 @@ export var CardViewBase = function CardViewBase(_ref) {
|
|
|
243
242
|
iconMessage = _getRenderConfigBySta.iconMessage,
|
|
244
243
|
renderImageRenderer = _getRenderConfigBySta.renderImageRenderer,
|
|
245
244
|
renderSvgView = _getRenderConfigBySta.renderSvgView,
|
|
246
|
-
|
|
245
|
+
renderLoading = _getRenderConfigBySta.renderLoading,
|
|
247
246
|
renderPlayButton = _getRenderConfigBySta.renderPlayButton,
|
|
248
247
|
renderBlanket = _getRenderConfigBySta.renderBlanket,
|
|
249
248
|
renderProgressBar = _getRenderConfigBySta.renderProgressBar,
|
|
@@ -307,20 +306,12 @@ export var CardViewBase = function CardViewBase(_ref) {
|
|
|
307
306
|
if (suppressLoadingUI) {
|
|
308
307
|
mediaMotion = didImageRender || didSvgRender ? 'entering' : 'hidden';
|
|
309
308
|
}
|
|
310
|
-
|
|
311
|
-
// Lazy so the experiment is only evaluated, and exposed, when this is actually rendered.
|
|
312
309
|
var renderLoadingPlaceholder = function renderLoadingPlaceholder() {
|
|
313
|
-
return
|
|
310
|
+
return /*#__PURE__*/React.createElement(LoadingBar, {
|
|
314
311
|
animationDisabled: disableAnimation,
|
|
315
312
|
testId: "media-card-loading",
|
|
316
313
|
interactionName: "media-card-loading"
|
|
317
|
-
})
|
|
318
|
-
breakpoint: breakpoint,
|
|
319
|
-
hasTitleBox: hasVisibleTitleBox
|
|
320
|
-
}, /*#__PURE__*/React.createElement(SpinnerIcon, {
|
|
321
|
-
testId: "media-card-loading",
|
|
322
|
-
interactionName: "media-card-loading"
|
|
323
|
-
}));
|
|
314
|
+
});
|
|
324
315
|
};
|
|
325
316
|
var contents = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ImageContainer, {
|
|
326
317
|
centerElements: didSvgRender && !fg('platform_media_card_image_render') // The whole centerElements styles can go after removing the flag
|
|
@@ -341,7 +332,7 @@ export var CardViewBase = function CardViewBase(_ref) {
|
|
|
341
332
|
mediaType: mediaType,
|
|
342
333
|
mimeType: mimeType,
|
|
343
334
|
name: name
|
|
344
|
-
}), iconMessage),
|
|
335
|
+
}), iconMessage), renderLoading && (suppressLoadingUI ?
|
|
345
336
|
/*#__PURE__*/
|
|
346
337
|
// Nothing is drawn, but the interaction still has to be held for the
|
|
347
338
|
// same window as the indicator it replaces.
|
|
@@ -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 = "81.
|
|
83
|
+
var packageVersion = "81.11.0";
|
|
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({
|
|
@@ -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: "81.
|
|
104
|
+
packageName: "81.11.0",
|
|
105
105
|
componentName: 'mediaInlineCard',
|
|
106
106
|
component: 'mediaInlineCard'
|
|
107
107
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import SpinnerIcon from '@atlaskit/spinner/spinner';
|
|
3
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
2
|
import { LoadingBar } from '../../card/ui/loadingBar/loadingBar';
|
|
5
3
|
import { getDimensionsWithDefault } from './getDimensionsWithDefault';
|
|
6
4
|
import { Wrapper } from './lightCardWrappers';
|
|
@@ -14,9 +12,7 @@ export var CardLoading = function CardLoading(_ref) {
|
|
|
14
12
|
"data-test-loading": true,
|
|
15
13
|
dimensions: dimensions,
|
|
16
14
|
"data-vc": "media-card-loading"
|
|
17
|
-
},
|
|
18
|
-
interactionName: interactionName || 'media-card-loading'
|
|
19
|
-
}) : /*#__PURE__*/React.createElement(SpinnerIcon, {
|
|
15
|
+
}, /*#__PURE__*/React.createElement(LoadingBar, {
|
|
20
16
|
interactionName: interactionName || 'media-card-loading'
|
|
21
17
|
}));
|
|
22
18
|
};
|
|
@@ -16,7 +16,7 @@ import { extractErrorInfo } from './analytics/extractErrorInfo';
|
|
|
16
16
|
import { getRenderErrorRequestMetadata } from './analytics/getRenderErrorRequestMetadata';
|
|
17
17
|
import { getMediaGlobalScope } from './globalScope/getMediaGlobalScope';
|
|
18
18
|
var packageName = "@atlaskit/media-card";
|
|
19
|
-
var packageVersion = "81.
|
|
19
|
+
var packageVersion = "81.11.0";
|
|
20
20
|
var SAMPLE_RATE = 0.05;
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -61,7 +61,7 @@ export interface RenderConfigByStatus {
|
|
|
61
61
|
isFixedBlanket?: boolean;
|
|
62
62
|
renderProgressBar?: boolean;
|
|
63
63
|
renderAIBorder?: boolean;
|
|
64
|
-
|
|
64
|
+
renderLoading?: boolean;
|
|
65
65
|
renderFailedTitleBox?: boolean;
|
|
66
66
|
renderTickBox?: boolean;
|
|
67
67
|
customTitleMessage?: MessageDescriptor;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// eslint-disable-line no-console
|
|
2
2
|
|
|
3
3
|
import React, { type PropsWithChildren } from 'react';
|
|
4
|
+
import { IntlProvider } from 'react-intl';
|
|
4
5
|
|
|
5
6
|
import { payloadPublisher } from '@atlassian/ufo/publisher';
|
|
6
7
|
|
|
@@ -149,14 +150,16 @@ export const MainWrapper = ({
|
|
|
149
150
|
}: MainWrapperProps): React.JSX.Element => {
|
|
150
151
|
enableMediaUfoLogger(payloadPublisher);
|
|
151
152
|
return (
|
|
152
|
-
|
|
153
|
+
// `react-intl` is a peer dependency of this package — the card's loading bar localises its
|
|
154
|
+
// aria-label via `useIntl`, so examples need a provider in the ancestry.
|
|
155
|
+
<IntlProvider locale="en">
|
|
153
156
|
{developmentOnly && <DevelopmentUseMessage />}
|
|
154
157
|
{!disableFeatureFlagWrapper ? (
|
|
155
158
|
<FeatureFlagsWrapper>{children}</FeatureFlagsWrapper>
|
|
156
159
|
) : (
|
|
157
160
|
<>{children}</>
|
|
158
161
|
)}
|
|
159
|
-
|
|
162
|
+
</IntlProvider>
|
|
160
163
|
);
|
|
161
164
|
};
|
|
162
165
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "81.
|
|
3
|
+
"version": "81.12.0",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -50,9 +50,8 @@
|
|
|
50
50
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
51
51
|
"@atlaskit/react-ufo": "^7.10.0",
|
|
52
52
|
"@atlaskit/section-message": "^10.2.0",
|
|
53
|
-
"@atlaskit/spinner": "^20.4.0",
|
|
54
53
|
"@atlaskit/theme": "^28.2.0",
|
|
55
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
54
|
+
"@atlaskit/tmp-editor-statsig": "^193.0.0",
|
|
56
55
|
"@atlaskit/tokens": "^16.12.0",
|
|
57
56
|
"@atlaskit/tooltip": "^24.3.0",
|
|
58
57
|
"@atlaskit/ufo": "^1.2.0",
|