@atlaskit/media-card 79.3.9 → 79.4.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/media-card
2
2
 
3
+ ## 79.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#182957](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/182957)
8
+ [`81c0f0c6cd62f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/81c0f0c6cd62f) -
9
+ close blindspot for media image
10
+
11
+ ## 79.3.10
12
+
13
+ ### Patch Changes
14
+
15
+ - [#178862](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/178862)
16
+ [`c85957c962811`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c85957c962811) -
17
+ clean up fg
18
+ - Updated dependencies
19
+
3
20
  ## 79.3.9
4
21
 
5
22
  ### 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.8";
23
+ var packageVersion = "79.3.10";
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.8";
90
+ var packageVersion = "79.3.10";
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)({
@@ -18,6 +18,7 @@ var _wrapper = require("./wrapper");
18
18
  var _mediaClient = require("@atlaskit/media-client");
19
19
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
20
  var _customData = _interopRequireDefault(require("@atlaskit/react-ufo/custom-data"));
21
+ var _interactionContext = require("@atlaskit/react-ufo/interaction-context");
21
22
  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
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; }
23
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; }
@@ -40,6 +41,7 @@ var ImageRenderer = exports.ImageRenderer = function ImageRenderer(_ref) {
40
41
  useWhiteBackground = _ref.useWhiteBackground,
41
42
  testId = _ref.testId;
42
43
  var onDisplayImageRef = (0, _useCurrentValueRef.useCurrentValueRef)(onDisplayImage);
44
+ var ufoContext = (0, _interactionContext.useInteractionContext)();
43
45
  (0, _react.useEffect)(function () {
44
46
  if (mediaType === 'image') {
45
47
  var _onDisplayImageRef$cu;
@@ -54,6 +56,11 @@ var ImageRenderer = exports.ImageRenderer = function ImageRenderer(_ref) {
54
56
  _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
55
57
  resolvedDimensions = _useState4[0],
56
58
  setResolvedDimensions = _useState4[1];
59
+ (0, _react.useLayoutEffect)(function () {
60
+ if (!didRender && (0, _platformFeatureFlags.fg)('platfrom_close_blindspot_for_img')) {
61
+ return ufoContext === null || ufoContext === void 0 ? void 0 : ufoContext.hold('img-loading');
62
+ }
63
+ }, [didRender, ufoContext]);
57
64
  var imgRef = (0, _react.useRef)(null);
58
65
  var onLoad = function onLoad(evt) {
59
66
  wrapperRef.current && setResolvedDimensions((0, _helpers.calculateDimensions)(evt.currentTarget, wrapperRef.current, resizeMode));
@@ -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.
@@ -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.8",
119
+ packageName: "79.3.10",
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.3.8";
18
+ var packageVersion = "79.3.10";
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.8";
12
+ const packageVersion = "79.3.10";
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.8";
69
+ const packageVersion = "79.3.10";
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,13 +1,14 @@
1
1
  /* imageRendererV2.tsx generated by @compiled/babel-plugin v0.36.1 */
2
2
  import "./imageRendererV2.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
- import React, { useState, useRef, useEffect } from 'react';
4
+ import React, { useState, useRef, useEffect, useLayoutEffect } from 'react';
5
5
  import { calculateDimensions, calculateInitialDimensions } from './helpers';
6
6
  import { useCurrentValueRef } from '../../../utils/useCurrentValueRef';
7
7
  import { ImageRendererWrapper } from './wrapper';
8
8
  import { isFileIdentifier } from '@atlaskit/media-client';
9
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
10
  import UFOCustomData from '@atlaskit/react-ufo/custom-data';
11
+ import { useInteractionContext } from '@atlaskit/react-ufo/interaction-context';
11
12
  const baseStyles = null;
12
13
  const backgroundStyles = null;
13
14
  export const ImageRenderer = ({
@@ -26,6 +27,7 @@ export const ImageRenderer = ({
26
27
  testId
27
28
  }) => {
28
29
  const onDisplayImageRef = useCurrentValueRef(onDisplayImage);
30
+ const ufoContext = useInteractionContext();
29
31
  useEffect(() => {
30
32
  if (mediaType === 'image') {
31
33
  var _onDisplayImageRef$cu;
@@ -34,6 +36,11 @@ export const ImageRenderer = ({
34
36
  }, [mediaType, onDisplayImageRef]);
35
37
  const [didRender, setDidRender] = useState(false);
36
38
  const [resolvedDimensions, setResolvedDimensions] = useState(calculateInitialDimensions(resizeMode));
39
+ useLayoutEffect(() => {
40
+ if (!didRender && fg('platfrom_close_blindspot_for_img')) {
41
+ return ufoContext === null || ufoContext === void 0 ? void 0 : ufoContext.hold('img-loading');
42
+ }
43
+ }, [didRender, ufoContext]);
37
44
  const imgRef = useRef(null);
38
45
  const onLoad = evt => {
39
46
  wrapperRef.current && setResolvedDimensions(calculateDimensions(evt.currentTarget, wrapperRef.current, resizeMode));
@@ -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
 
@@ -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.8",
40
+ packageName: "79.3.10",
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.3.8";
8
+ const packageVersion = "79.3.10";
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.8";
14
+ var packageVersion = "79.3.10";
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.8";
83
+ var packageVersion = "79.3.10";
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({
@@ -5,13 +5,14 @@ import "./imageRendererV2.compiled.css";
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
6
  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; }
7
7
  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) { _defineProperty(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; }
8
- import React, { useState, useRef, useEffect } from 'react';
8
+ import React, { useState, useRef, useEffect, useLayoutEffect } from 'react';
9
9
  import { calculateDimensions, calculateInitialDimensions } from './helpers';
10
10
  import { useCurrentValueRef } from '../../../utils/useCurrentValueRef';
11
11
  import { ImageRendererWrapper } from './wrapper';
12
12
  import { isFileIdentifier } from '@atlaskit/media-client';
13
13
  import { fg } from '@atlaskit/platform-feature-flags';
14
14
  import UFOCustomData from '@atlaskit/react-ufo/custom-data';
15
+ import { useInteractionContext } from '@atlaskit/react-ufo/interaction-context';
15
16
  var baseStyles = null;
16
17
  var backgroundStyles = null;
17
18
  export var ImageRenderer = function ImageRenderer(_ref) {
@@ -31,6 +32,7 @@ export var ImageRenderer = function ImageRenderer(_ref) {
31
32
  useWhiteBackground = _ref.useWhiteBackground,
32
33
  testId = _ref.testId;
33
34
  var onDisplayImageRef = useCurrentValueRef(onDisplayImage);
35
+ var ufoContext = useInteractionContext();
34
36
  useEffect(function () {
35
37
  if (mediaType === 'image') {
36
38
  var _onDisplayImageRef$cu;
@@ -45,6 +47,11 @@ export var ImageRenderer = function ImageRenderer(_ref) {
45
47
  _useState4 = _slicedToArray(_useState3, 2),
46
48
  resolvedDimensions = _useState4[0],
47
49
  setResolvedDimensions = _useState4[1];
50
+ useLayoutEffect(function () {
51
+ if (!didRender && fg('platfrom_close_blindspot_for_img')) {
52
+ return ufoContext === null || ufoContext === void 0 ? void 0 : ufoContext.hold('img-loading');
53
+ }
54
+ }, [didRender, ufoContext]);
48
55
  var imgRef = useRef(null);
49
56
  var onLoad = function onLoad(evt) {
50
57
  wrapperRef.current && setResolvedDimensions(calculateDimensions(evt.currentTarget, wrapperRef.current, resizeMode));
@@ -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.
@@ -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.8",
104
+ packageName: "79.3.10",
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.3.8";
11
+ var packageVersion = "79.3.10";
12
12
  var SAMPLE_RATE = 0.05;
13
13
  var concurrentExperience;
14
14
  var getExperience = function getExperience(id) {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type FileIdentifier, type ImageResizeMode } from '@atlaskit/media-client';
3
- import { MediaCardError } from '../../errors';
3
+ import { type MediaCardError } from '../../errors';
4
4
  export type ContentSource = 'remote' | 'local';
5
5
  export type SvgViewProps = {
6
6
  readonly identifier: FileIdentifier;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type FileIdentifier, type ImageResizeMode } from '@atlaskit/media-client';
3
- import { MediaCardError } from '../../errors';
3
+ import { type MediaCardError } from '../../errors';
4
4
  export type ContentSource = 'remote' | 'local';
5
5
  export type SvgViewProps = {
6
6
  readonly identifier: FileIdentifier;
@@ -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.9",
3
+ "version": "79.4.0",
4
4
  "description": "Includes all media card related components, CardView, CardViewSmall, Card...",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,14 +39,14 @@
39
39
  "@atlaskit/analytics-next": "^11.1.0",
40
40
  "@atlaskit/dropdown-menu": "^16.1.0",
41
41
  "@atlaskit/editor-shared-styles": "^3.4.0",
42
- "@atlaskit/icon": "^27.2.0",
42
+ "@atlaskit/icon": "^27.3.0",
43
43
  "@atlaskit/link": "^3.2.0",
44
44
  "@atlaskit/media-client": "^35.0.0",
45
45
  "@atlaskit/media-client-react": "^4.1.0",
46
46
  "@atlaskit/media-common": "^12.3.0",
47
47
  "@atlaskit/media-file-preview": "^0.11.0",
48
48
  "@atlaskit/media-svg": "^2.1.0",
49
- "@atlaskit/media-ui": "^28.5.0",
49
+ "@atlaskit/media-ui": "^28.6.0",
50
50
  "@atlaskit/media-viewer": "^52.4.0",
51
51
  "@atlaskit/platform-feature-flags": "^1.1.0",
52
52
  "@atlaskit/primitives": "^14.10.0",
@@ -81,7 +81,7 @@
81
81
  "@atlaskit/media-core": "^37.0.0",
82
82
  "@atlaskit/media-picker": "^70.0.0",
83
83
  "@atlaskit/media-state": "^1.7.0",
84
- "@atlaskit/media-test-data": "^3.1.0",
84
+ "@atlaskit/media-test-data": "^3.2.0",
85
85
  "@atlaskit/media-test-helpers": "^37.0.0",
86
86
  "@atlaskit/radio": "^8.1.0",
87
87
  "@atlaskit/range": "^9.1.0",
@@ -127,9 +127,6 @@
127
127
  "platform_media_compiled": {
128
128
  "type": "boolean"
129
129
  },
130
- "platform_fix_media_image_resizing": {
131
- "type": "boolean"
132
- },
133
130
  "platform_editor_ssr_media": {
134
131
  "type": "boolean"
135
132
  },
@@ -147,6 +144,9 @@
147
144
  },
148
145
  "platform_abort_vc_click_file_card": {
149
146
  "type": "boolean"
147
+ },
148
+ "platfrom_close_blindspot_for_img": {
149
+ "type": "boolean"
150
150
  }
151
151
  },
152
152
  "techstack": {