@atlaskit/media-card 79.3.8 → 79.3.10

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/media-card
2
2
 
3
+ ## 79.3.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [#178862](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/178862)
8
+ [`c85957c962811`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c85957c962811) -
9
+ clean up fg
10
+ - Updated dependencies
11
+
12
+ ## 79.3.9
13
+
14
+ ### Patch Changes
15
+
16
+ - [#179867](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/179867)
17
+ [`23b6e96c8982d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/23b6e96c8982d) -
18
+ Add new card placeholder without spinner icon
19
+ - Updated dependencies
20
+
3
21
  ## 79.3.8
4
22
 
5
23
  ### Patch Changes
@@ -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.3.7";
23
+ var packageVersion = "79.3.9";
24
24
  var CardBase = exports.CardBase = function CardBase(_ref) {
25
25
  var identifier = _ref.identifier,
26
26
  otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
@@ -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.3.7";
90
+ var packageVersion = "79.3.9";
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)({
@@ -8,7 +8,6 @@ exports.transition = exports.rgba = exports.getWrapperShadow = exports.getWrappe
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _colors = require("@atlaskit/theme/colors");
10
10
  var _consts = require("@atlaskit/editor-shared-styles/consts");
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
11
  var _getCSSUnitValue = require("../../utils/getCSSUnitValue");
13
12
  var _cardDimensions = require("../../utils/cardDimensions");
14
13
  var _styles = require("./tickBox/styles");
@@ -39,7 +38,7 @@ var getWrapperDimensions = exports.getWrapperDimensions = function getWrapperDim
39
38
  var _getDefaultCardDimens = (0, _cardDimensions.getDefaultCardDimensions)(appearance),
40
39
  defaultWidth = _getDefaultCardDimens.width,
41
40
  defaultHeight = _getDefaultCardDimens.height;
42
- return "\n ".concat((0, _platformFeatureFlags.fg)('platform_fix_media_image_resizing') ? "@container view-page-content (min-width: 1px) { width: 100cqw; }" : '', "\n\t/* If container doesn't exists, it will fallback to this */\n\twidth: ").concat((0, _getCSSUnitValue.getCSSUnitValue)(width || defaultWidth), ";\n\n max-width: 100%;\n height: ").concat((0, _getCSSUnitValue.getCSSUnitValue)(height || defaultHeight), ";\n max-height: 100%;\n ");
41
+ return "\n\t/* If container doesn't exists, it will fallback to this */\n\twidth: ".concat((0, _getCSSUnitValue.getCSSUnitValue)(width || defaultWidth), ";\n\n max-width: 100%;\n height: ").concat((0, _getCSSUnitValue.getCSSUnitValue)(height || defaultHeight), ";\n max-height: 100%;\n ");
43
42
  };
44
43
 
45
44
  // This is a trick to simulate the blue border without affecting the dimensions.
package/dist/cjs/index.js CHANGED
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "CardLoading", {
21
21
  return _cardLoading.CardLoading;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "CardPlaceholder", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _cardPlaceholder.CardPlaceholder;
28
+ }
29
+ });
24
30
  Object.defineProperty(exports, "DateOverrideContext", {
25
31
  enumerable: true,
26
32
  get: function get() {
@@ -78,6 +84,7 @@ Object.defineProperty(exports, "newFileExperienceClassName", {
78
84
  var _card = require("./card");
79
85
  var _inline = require("./inline");
80
86
  var _errors = require("./errors");
87
+ var _cardPlaceholder = require("./utils/lightCards/cardPlaceholder");
81
88
  var _cardLoading = require("./utils/lightCards/cardLoading");
82
89
  var _cardError = require("./utils/lightCards/cardError");
83
90
  var _cardDimensions = require("./utils/cardDimensions");
@@ -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.3.7",
119
+ packageName: "79.3.9",
120
120
  componentName: 'mediaInlineCard',
121
121
  component: 'mediaInlineCard'
122
122
  };
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.CardPlaceholder = void 0;
9
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
12
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
13
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
+ var _react = _interopRequireWildcard(require("react"));
15
+ var _getDimensionsWithDefault = require("./getDimensionsWithDefault");
16
+ var _lightCardWrappers = require("./lightCardWrappers");
17
+ 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); }
18
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
19
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
20
+ var CardPlaceholder = exports.CardPlaceholder = /*#__PURE__*/function (_Component) {
21
+ function CardPlaceholder() {
22
+ (0, _classCallCheck2.default)(this, CardPlaceholder);
23
+ return _callSuper(this, CardPlaceholder, arguments);
24
+ }
25
+ (0, _inherits2.default)(CardPlaceholder, _Component);
26
+ return (0, _createClass2.default)(CardPlaceholder, [{
27
+ key: "render",
28
+ value: function render() {
29
+ var _this$props = this.props,
30
+ dimensionsProp = _this$props.dimensions,
31
+ testId = _this$props.testId;
32
+ var dimensions = (0, _getDimensionsWithDefault.getDimensionsWithDefault)(dimensionsProp);
33
+ return /*#__PURE__*/_react.default.createElement(_lightCardWrappers.Wrapper, {
34
+ "data-testid": testId || 'media-card-loading',
35
+ "data-test-loading": true,
36
+ dimensions: dimensions,
37
+ "data-vc": "media-card-loading"
38
+ });
39
+ }
40
+ }]);
41
+ }(_react.Component);
@@ -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.3.7";
18
+ var packageVersion = "79.3.9";
19
19
  var SAMPLE_RATE = 0.05;
20
20
  var concurrentExperience;
21
21
  var getExperience = function getExperience(id) {
@@ -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.3.7";
12
+ const packageVersion = "79.3.9";
13
13
  export const CardBase = ({
14
14
  identifier,
15
15
  ...otherProps
@@ -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.3.7";
69
+ const packageVersion = "79.3.9";
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({
@@ -1,6 +1,5 @@
1
1
  import { N60A } from '@atlaskit/theme/colors';
2
2
  import { akEditorSelectedBoxShadow } from '@atlaskit/editor-shared-styles/consts';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { getCSSUnitValue } from '../../utils/getCSSUnitValue';
5
4
  import { getDefaultCardDimensions } from '../../utils/cardDimensions';
6
5
  import { tickBoxClassName, tickboxFixedStyles } from './tickBox/styles';
@@ -28,7 +27,6 @@ export const getWrapperDimensions = (dimensions, appearance) => {
28
27
  height: defaultHeight
29
28
  } = getDefaultCardDimensions(appearance);
30
29
  return `
31
- ${fg('platform_fix_media_image_resizing') ? `@container view-page-content (min-width: 1px) { width: 100cqw; }` : ''}
32
30
  /* If container doesn't exists, it will fallback to this */
33
31
  width: ${getCSSUnitValue(width || defaultWidth)};
34
32
 
@@ -6,6 +6,7 @@
6
6
  export { Card } from './card';
7
7
  export { MediaInlineCard, fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent } from './inline';
8
8
  export { MediaCardError } from './errors';
9
+ export { CardPlaceholder } from './utils/lightCards/cardPlaceholder';
9
10
  export { CardLoading } from './utils/lightCards/cardLoading';
10
11
  export { CardError } from './utils/lightCards/cardError';
11
12
  export { defaultImageCardDimensions } from './utils/cardDimensions';
@@ -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.3.7",
40
+ packageName: "79.3.9",
41
41
  componentName: 'mediaInlineCard',
42
42
  component: 'mediaInlineCard'
43
43
  };
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { Component } from 'react';
3
+ import { getDimensionsWithDefault } from './getDimensionsWithDefault';
4
+ import { Wrapper } from './lightCardWrappers';
5
+ export class CardPlaceholder extends Component {
6
+ render() {
7
+ const {
8
+ dimensions: dimensionsProp,
9
+ testId
10
+ } = this.props;
11
+ const dimensions = getDimensionsWithDefault(dimensionsProp);
12
+ return /*#__PURE__*/React.createElement(Wrapper, {
13
+ "data-testid": testId || 'media-card-loading',
14
+ "data-test-loading": true,
15
+ dimensions: dimensions,
16
+ "data-vc": "media-card-loading"
17
+ });
18
+ }
19
+ }
@@ -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.3.7";
8
+ const packageVersion = "79.3.9";
9
9
  const SAMPLE_RATE = 0.05;
10
10
  let concurrentExperience;
11
11
  const getExperience = id => {
@@ -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.3.7";
14
+ var packageVersion = "79.3.9";
15
15
  export var CardBase = function CardBase(_ref) {
16
16
  var identifier = _ref.identifier,
17
17
  otherProps = _objectWithoutProperties(_ref, _excluded);
@@ -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.3.7";
83
+ var packageVersion = "79.3.9";
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({
@@ -1,7 +1,6 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { N60A } from '@atlaskit/theme/colors';
3
3
  import { akEditorSelectedBoxShadow } from '@atlaskit/editor-shared-styles/consts';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import { getCSSUnitValue } from '../../utils/getCSSUnitValue';
6
5
  import { getDefaultCardDimensions } from '../../utils/cardDimensions';
7
6
  import { tickBoxClassName, tickboxFixedStyles } from './tickBox/styles';
@@ -32,7 +31,7 @@ export var getWrapperDimensions = function getWrapperDimensions(dimensions, appe
32
31
  var _getDefaultCardDimens = getDefaultCardDimensions(appearance),
33
32
  defaultWidth = _getDefaultCardDimens.width,
34
33
  defaultHeight = _getDefaultCardDimens.height;
35
- return "\n ".concat(fg('platform_fix_media_image_resizing') ? "@container view-page-content (min-width: 1px) { width: 100cqw; }" : '', "\n\t/* If container doesn't exists, it will fallback to this */\n\twidth: ").concat(getCSSUnitValue(width || defaultWidth), ";\n\n max-width: 100%;\n height: ").concat(getCSSUnitValue(height || defaultHeight), ";\n max-height: 100%;\n ");
34
+ return "\n\t/* If container doesn't exists, it will fallback to this */\n\twidth: ".concat(getCSSUnitValue(width || defaultWidth), ";\n\n max-width: 100%;\n height: ").concat(getCSSUnitValue(height || defaultHeight), ";\n max-height: 100%;\n ");
36
35
  };
37
36
 
38
37
  // This is a trick to simulate the blue border without affecting the dimensions.
package/dist/esm/index.js CHANGED
@@ -6,6 +6,7 @@
6
6
  export { Card } from './card';
7
7
  export { MediaInlineCard, fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent } from './inline';
8
8
  export { MediaCardError } from './errors';
9
+ export { CardPlaceholder } from './utils/lightCards/cardPlaceholder';
9
10
  export { CardLoading } from './utils/lightCards/cardLoading';
10
11
  export { CardError } from './utils/lightCards/cardError';
11
12
  export { defaultImageCardDimensions } from './utils/cardDimensions';
@@ -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.3.7",
104
+ packageName: "79.3.9",
105
105
  componentName: 'mediaInlineCard',
106
106
  component: 'mediaInlineCard'
107
107
  };
@@ -0,0 +1,33 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
4
+ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
+ import React from 'react';
9
+ import { Component } from 'react';
10
+ import { getDimensionsWithDefault } from './getDimensionsWithDefault';
11
+ import { Wrapper } from './lightCardWrappers';
12
+ export var CardPlaceholder = /*#__PURE__*/function (_Component) {
13
+ function CardPlaceholder() {
14
+ _classCallCheck(this, CardPlaceholder);
15
+ return _callSuper(this, CardPlaceholder, arguments);
16
+ }
17
+ _inherits(CardPlaceholder, _Component);
18
+ return _createClass(CardPlaceholder, [{
19
+ key: "render",
20
+ value: function render() {
21
+ var _this$props = this.props,
22
+ dimensionsProp = _this$props.dimensions,
23
+ testId = _this$props.testId;
24
+ var dimensions = getDimensionsWithDefault(dimensionsProp);
25
+ return /*#__PURE__*/React.createElement(Wrapper, {
26
+ "data-testid": testId || 'media-card-loading',
27
+ "data-test-loading": true,
28
+ dimensions: dimensions,
29
+ "data-vc": "media-card-loading"
30
+ });
31
+ }
32
+ }]);
33
+ }(Component);
@@ -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.3.7";
11
+ var packageVersion = "79.3.9";
12
12
  var SAMPLE_RATE = 0.05;
13
13
  var concurrentExperience;
14
14
  var getExperience = function getExperience(id) {
@@ -8,6 +8,7 @@ export type { CardStatus, CardAppearance, CardDimensionValue, CardPreview, Title
8
8
  export { Card } from './card';
9
9
  export { MediaInlineCard, fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent, } from './inline';
10
10
  export { MediaCardError } from './errors';
11
+ export { CardPlaceholder } from './utils/lightCards/cardPlaceholder';
11
12
  export { CardLoading } from './utils/lightCards/cardLoading';
12
13
  export { CardError } from './utils/lightCards/cardError';
13
14
  export { defaultImageCardDimensions } from './utils/cardDimensions';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { Component } from 'react';
3
+ import { type StaticCardProps } from './types';
4
+ export declare class CardPlaceholder extends Component<StaticCardProps, {}> {
5
+ render(): React.JSX.Element;
6
+ }
@@ -8,6 +8,7 @@ export type { CardStatus, CardAppearance, CardDimensionValue, CardPreview, Title
8
8
  export { Card } from './card';
9
9
  export { MediaInlineCard, fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent, } from './inline';
10
10
  export { MediaCardError } from './errors';
11
+ export { CardPlaceholder } from './utils/lightCards/cardPlaceholder';
11
12
  export { CardLoading } from './utils/lightCards/cardLoading';
12
13
  export { CardError } from './utils/lightCards/cardError';
13
14
  export { defaultImageCardDimensions } from './utils/cardDimensions';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { Component } from 'react';
3
+ import { type StaticCardProps } from './types';
4
+ export declare class CardPlaceholder extends Component<StaticCardProps, {}> {
5
+ render(): React.JSX.Element;
6
+ }
@@ -1,4 +1,5 @@
1
- import { type MediaApi, RequestError } from '@atlaskit/media-client';
1
+ import { type MediaApi } from '@atlaskit/media-client';
2
+ import { createServerUnauthorizedError } from '@atlaskit/media-client/test-helpers';
2
3
  import { sleep } from '@atlaskit/media-test-helpers';
3
4
 
4
5
  type Endpoints = Partial<Record<keyof MediaApi, number>>;
@@ -31,15 +32,9 @@ export const errorApiResponses = {
31
32
  mediaApi.getFileBinary = async () => {
32
33
  throw (
33
34
  error ||
34
- new RequestError('serverForbidden', {
35
+ createServerUnauthorizedError({
36
+ endpoint: '/file/:id/binary',
35
37
  method: 'GET',
36
- endpoint: '/file/:id/inary',
37
- mediaRegion: 'adev',
38
- mediaEnv: 'adev',
39
- traceContext: { traceId: 'some-traceId', spanId: 'some-spanId' },
40
- attempts: 10,
41
- clientExhaustedRetries: true,
42
- statusCode: 430,
43
38
  })
44
39
  );
45
40
  };
@@ -48,15 +43,42 @@ export const errorApiResponses = {
48
43
  mediaApi.getImage = async () => {
49
44
  throw (
50
45
  error ||
51
- new RequestError('serverForbidden', {
52
- method: 'GET',
46
+ createServerUnauthorizedError({
53
47
  endpoint: '/file/:id/image',
54
- mediaRegion: 'adev',
55
- mediaEnv: 'adev',
56
- traceContext: { traceId: 'some-traceId', spanId: 'some-spanId' },
57
- attempts: 10,
58
- clientExhaustedRetries: true,
59
- statusCode: 430,
48
+ method: 'GET',
49
+ })
50
+ );
51
+ };
52
+ },
53
+ getArtifactBinary: (mediaApi: MediaApi, error?: Error) => {
54
+ mediaApi.getArtifactBinary = async (...params) => {
55
+ throw (
56
+ error ||
57
+ createServerUnauthorizedError({
58
+ endpoint: '/file/:id/binary/:artifactName',
59
+ method: 'GET',
60
+ })
61
+ );
62
+ };
63
+ },
64
+ uploadArtifact: (mediaApi: MediaApi, error?: Error) => {
65
+ mediaApi.uploadArtifact = async (...params) => {
66
+ throw (
67
+ error ||
68
+ createServerUnauthorizedError({
69
+ endpoint: '/file/:id/artifact/:artifactName',
70
+ method: 'POST',
71
+ })
72
+ );
73
+ };
74
+ },
75
+ deleteArtifact: (mediaApi: MediaApi, error?: Error) => {
76
+ mediaApi.deleteArtifact = async (...params) => {
77
+ throw (
78
+ error ||
79
+ createServerUnauthorizedError({
80
+ endpoint: '/file/:id/artifact/:artifactName',
81
+ method: 'DELETE',
60
82
  })
61
83
  );
62
84
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "79.3.8",
3
+ "version": "79.3.10",
4
4
  "description": "Includes all media card related components, CardView, CardViewSmall, Card...",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,28 +33,27 @@
33
33
  "team": "Media Exif",
34
34
  "website": {
35
35
  "name": "Media Card"
36
- },
37
- "runReact18": true
36
+ }
38
37
  },
39
38
  "dependencies": {
40
39
  "@atlaskit/analytics-next": "^11.1.0",
41
40
  "@atlaskit/dropdown-menu": "^16.1.0",
42
41
  "@atlaskit/editor-shared-styles": "^3.4.0",
43
- "@atlaskit/icon": "^27.0.0",
42
+ "@atlaskit/icon": "^27.2.0",
44
43
  "@atlaskit/link": "^3.2.0",
45
- "@atlaskit/media-client": "^34.0.0",
44
+ "@atlaskit/media-client": "^35.0.0",
46
45
  "@atlaskit/media-client-react": "^4.1.0",
47
- "@atlaskit/media-common": "^12.2.0",
46
+ "@atlaskit/media-common": "^12.3.0",
48
47
  "@atlaskit/media-file-preview": "^0.11.0",
49
48
  "@atlaskit/media-svg": "^2.1.0",
50
- "@atlaskit/media-ui": "^28.3.0",
51
- "@atlaskit/media-viewer": "^52.3.0",
49
+ "@atlaskit/media-ui": "^28.6.0",
50
+ "@atlaskit/media-viewer": "^52.4.0",
52
51
  "@atlaskit/platform-feature-flags": "^1.1.0",
53
- "@atlaskit/primitives": "^14.8.0",
54
- "@atlaskit/react-ufo": "^3.13.0",
52
+ "@atlaskit/primitives": "^14.10.0",
53
+ "@atlaskit/react-ufo": "^3.14.0",
55
54
  "@atlaskit/spinner": "^18.0.0",
56
55
  "@atlaskit/theme": "^18.0.0",
57
- "@atlaskit/tokens": "^5.2.0",
56
+ "@atlaskit/tokens": "^5.4.0",
58
57
  "@atlaskit/tooltip": "^20.3.0",
59
58
  "@atlaskit/ufo": "^0.4.0",
60
59
  "@atlaskit/visually-hidden": "^3.0.0",
@@ -81,8 +80,8 @@
81
80
  "@atlaskit/inline-message": "^15.3.0",
82
81
  "@atlaskit/media-core": "^37.0.0",
83
82
  "@atlaskit/media-picker": "^70.0.0",
84
- "@atlaskit/media-state": "^1.6.0",
85
- "@atlaskit/media-test-data": "^3.1.0",
83
+ "@atlaskit/media-state": "^1.7.0",
84
+ "@atlaskit/media-test-data": "^3.2.0",
86
85
  "@atlaskit/media-test-helpers": "^37.0.0",
87
86
  "@atlaskit/radio": "^8.1.0",
88
87
  "@atlaskit/range": "^9.1.0",
@@ -128,9 +127,6 @@
128
127
  "platform_media_compiled": {
129
128
  "type": "boolean"
130
129
  },
131
- "platform_fix_media_image_resizing": {
132
- "type": "boolean"
133
- },
134
130
  "platform_editor_ssr_media": {
135
131
  "type": "boolean"
136
132
  },