@atlaskit/media-card 78.19.6 → 79.0.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,32 @@
1
1
  # @atlaskit/media-card
2
2
 
3
+ ## 79.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#117363](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117363)
8
+ [`10a0f7f6c2027`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10a0f7f6c2027) -
9
+ This package's `peerDependencies` have been adjusted for `react` and/or `react-dom` to reflect the
10
+ status of only supporting React 18 going forward. No explicit breaking change to React support has
11
+ been made in this release, but this is to signify going forward, breaking changes for React 16 or
12
+ React 17 may come via non-major semver releases.
13
+
14
+ Please refer this community post for more details:
15
+ https://community.developer.atlassian.com/t/rfc-78-dropping-support-for-react-16-and-rendering-in-a-react-18-concurrent-root-in-jira-and-confluence/87026
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
21
+ ## 78.19.7
22
+
23
+ ### Patch Changes
24
+
25
+ - [#113412](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113412)
26
+ [`bb782d3c9d9ee`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bb782d3c9d9ee) -
27
+ Removed unused code
28
+ - Updated dependencies
29
+
3
30
  ## 78.19.6
4
31
 
5
32
  ### Patch Changes
@@ -21,7 +21,7 @@ var _excluded = ["identifier"];
21
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
23
  var packageName = "@atlaskit/media-card";
24
- var packageVersion = "78.19.6";
24
+ var packageVersion = "79.0.0";
25
25
  var CardBase = exports.CardBase = function CardBase(_ref) {
26
26
  var identifier = _ref.identifier,
27
27
  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 = "78.19.6";
90
+ var packageVersion = "79.0.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)({
@@ -8,8 +8,6 @@ exports.getImageLoadPrimaryReason = exports.ensureMediaCardError = exports.SsrPr
8
8
  exports.isImageLoadError = isImageLoadError;
9
9
  exports.isLocalPreviewError = void 0;
10
10
  exports.isMediaCardError = isMediaCardError;
11
- exports.isPollingError = isPollingError;
12
- exports.isRateLimitedError = isRateLimitedError;
13
11
  exports.isUploadError = exports.isUnsupportedLocalPreviewError = exports.isRemotePreviewError = void 0;
14
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
13
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
@@ -17,35 +15,12 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
17
15
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
18
16
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
19
17
  var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
20
- var _mediaClient = require("@atlaskit/media-client");
21
- var _mediaClientReact = require("@atlaskit/media-client-react");
22
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)); }
23
19
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
20
  /**
25
21
  * Primary reason is logged through Data Portal.
26
22
  * Make sure all the values are whitelisted in Measure -> Event Regitry -> "mediaCardRender failed" event
27
23
  */
28
-
29
- var POLLING_REASON = 'pollingMaxAttemptsExceeded';
30
- function isPollingError(err) {
31
- if (!err) {
32
- return false;
33
- }
34
- return (0, _mediaClient.isPollingError)(err) || (0, _mediaClientReact.isMediaFileStateError)(err) && err.reason === POLLING_REASON;
35
- }
36
- function isRateLimitedError(error) {
37
- if (!error) {
38
- return false;
39
- }
40
- if ((0, _mediaClient.isRateLimitedError)(error)) {
41
- return true;
42
- }
43
- if ((0, _mediaClientReact.isMediaFileStateError)(error)) {
44
- var _error$details, _error$message;
45
- return ((_error$details = error.details) === null || _error$details === void 0 ? void 0 : _error$details.statusCode) === 429 || ((_error$message = error.message) === null || _error$message === void 0 ? void 0 : _error$message.includes('429'));
46
- }
47
- return false;
48
- }
49
24
  var MediaCardError = exports.MediaCardError = /*#__PURE__*/function (_Error) {
50
25
  function MediaCardError(primaryReason, secondaryError) {
51
26
  var _this;
@@ -117,7 +117,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
117
117
  ErrorBoundary = _this$state.ErrorBoundary;
118
118
  var analyticsContext = {
119
119
  packageVersion: "@atlaskit/media-card",
120
- packageName: "78.19.6",
120
+ packageName: "79.0.0",
121
121
  componentName: 'mediaInlineCard',
122
122
  component: 'mediaInlineCard'
123
123
  };
@@ -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 = "78.19.6";
18
+ var packageVersion = "79.0.0";
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 = "78.19.6";
12
+ const packageVersion = "79.0.0";
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 = "78.19.6";
69
+ const packageVersion = "79.0.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({
@@ -1,30 +1,8 @@
1
- import { isPollingError as isMediaClientPollingError, isRateLimitedError as isMediaClientRateLimitedError } from '@atlaskit/media-client';
2
- import { isMediaFileStateError } from '@atlaskit/media-client-react';
3
1
  /**
4
2
  * Primary reason is logged through Data Portal.
5
3
  * Make sure all the values are whitelisted in Measure -> Event Regitry -> "mediaCardRender failed" event
6
4
  */
7
5
 
8
- const POLLING_REASON = 'pollingMaxAttemptsExceeded';
9
- export function isPollingError(err) {
10
- if (!err) {
11
- return false;
12
- }
13
- return isMediaClientPollingError(err) || isMediaFileStateError(err) && err.reason === POLLING_REASON;
14
- }
15
- export function isRateLimitedError(error) {
16
- if (!error) {
17
- return false;
18
- }
19
- if (isMediaClientRateLimitedError(error)) {
20
- return true;
21
- }
22
- if (isMediaFileStateError(error)) {
23
- var _error$details, _error$message;
24
- return ((_error$details = error.details) === null || _error$details === void 0 ? void 0 : _error$details.statusCode) === 429 || ((_error$message = error.message) === null || _error$message === void 0 ? void 0 : _error$message.includes('429'));
25
- }
26
- return false;
27
- }
28
6
  export class MediaCardError extends Error {
29
7
  constructor(primaryReason, secondaryError) {
30
8
  super(primaryReason);
@@ -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: "78.19.6",
40
+ packageName: "79.0.0",
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 = "78.19.6";
8
+ const packageVersion = "79.0.0";
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 = "78.19.6";
14
+ var packageVersion = "79.0.0";
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 = "78.19.6";
83
+ var packageVersion = "79.0.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({
@@ -6,33 +6,11 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
7
7
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
- import { isPollingError as isMediaClientPollingError, isRateLimitedError as isMediaClientRateLimitedError } from '@atlaskit/media-client';
10
- import { isMediaFileStateError } from '@atlaskit/media-client-react';
11
9
  /**
12
10
  * Primary reason is logged through Data Portal.
13
11
  * Make sure all the values are whitelisted in Measure -> Event Regitry -> "mediaCardRender failed" event
14
12
  */
15
13
 
16
- var POLLING_REASON = 'pollingMaxAttemptsExceeded';
17
- export function isPollingError(err) {
18
- if (!err) {
19
- return false;
20
- }
21
- return isMediaClientPollingError(err) || isMediaFileStateError(err) && err.reason === POLLING_REASON;
22
- }
23
- export function isRateLimitedError(error) {
24
- if (!error) {
25
- return false;
26
- }
27
- if (isMediaClientRateLimitedError(error)) {
28
- return true;
29
- }
30
- if (isMediaFileStateError(error)) {
31
- var _error$details, _error$message;
32
- return ((_error$details = error.details) === null || _error$details === void 0 ? void 0 : _error$details.statusCode) === 429 || ((_error$message = error.message) === null || _error$message === void 0 ? void 0 : _error$message.includes('429'));
33
- }
34
- return false;
35
- }
36
14
  export var MediaCardError = /*#__PURE__*/function (_Error) {
37
15
  function MediaCardError(primaryReason, secondaryError) {
38
16
  var _this;
@@ -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: "78.19.6",
104
+ packageName: "79.0.0",
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 = "78.19.6";
11
+ var packageVersion = "79.0.0";
12
12
  var SAMPLE_RATE = 0.05;
13
13
  var concurrentExperience;
14
14
  var getExperience = function getExperience(id) {
@@ -9,8 +9,6 @@ export type RemotePreviewPrimaryReason = 'remote-preview-fetch' | 'remote-previe
9
9
  export type LocalPreviewPrimaryReason = 'local-preview-get' | 'local-preview-unsupported' | 'local-preview-rejected' | 'local-preview-image' | 'local-preview-video';
10
10
  export type SsrPreviewPrimaryReason = 'ssr-client-uri' | 'ssr-client-load' | 'ssr-server-uri' | 'ssr-server-load';
11
11
  export type SvgPrimaryReason = 'svg-img-error' | 'svg-binary-fetch' | 'svg-blob-to-datauri' | 'svg-unknown-error';
12
- export declare function isPollingError(err?: Error): boolean;
13
- export declare function isRateLimitedError(error?: Error): boolean;
14
12
  export declare class MediaCardError extends Error {
15
13
  readonly primaryReason: MediaCardErrorPrimaryReason;
16
14
  readonly secondaryError?: Error | undefined;
@@ -9,8 +9,6 @@ export type RemotePreviewPrimaryReason = 'remote-preview-fetch' | 'remote-previe
9
9
  export type LocalPreviewPrimaryReason = 'local-preview-get' | 'local-preview-unsupported' | 'local-preview-rejected' | 'local-preview-image' | 'local-preview-video';
10
10
  export type SsrPreviewPrimaryReason = 'ssr-client-uri' | 'ssr-client-load' | 'ssr-server-uri' | 'ssr-server-load';
11
11
  export type SvgPrimaryReason = 'svg-img-error' | 'svg-binary-fetch' | 'svg-blob-to-datauri' | 'svg-unknown-error';
12
- export declare function isPollingError(err?: Error): boolean;
13
- export declare function isRateLimitedError(error?: Error): boolean;
14
12
  export declare class MediaCardError extends Error {
15
13
  readonly primaryReason: MediaCardErrorPrimaryReason;
16
14
  readonly secondaryError?: Error | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "78.19.6",
3
+ "version": "79.0.0",
4
4
  "description": "Includes all media card related components, CardView, CardViewSmall, Card...",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -35,26 +35,26 @@
35
35
  "runReact18": true
36
36
  },
37
37
  "dependencies": {
38
- "@atlaskit/analytics-next": "^10.3.0",
39
- "@atlaskit/dropdown-menu": "^12.26.0",
38
+ "@atlaskit/analytics-next": "^11.0.0",
39
+ "@atlaskit/dropdown-menu": "^13.0.0",
40
40
  "@atlaskit/editor-shared-styles": "^3.3.0",
41
- "@atlaskit/icon": "^23.9.0",
42
- "@atlaskit/media-client": "^31.1.0",
43
- "@atlaskit/media-client-react": "^3.0.0",
44
- "@atlaskit/media-common": "^11.8.0",
45
- "@atlaskit/media-file-preview": "^0.10.0",
46
- "@atlaskit/media-svg": "^1.2.0",
47
- "@atlaskit/media-ui": "^27.4.0",
48
- "@atlaskit/media-viewer": "^50.1.0",
41
+ "@atlaskit/icon": "^24.0.0",
42
+ "@atlaskit/media-client": "^32.0.0",
43
+ "@atlaskit/media-client-react": "^4.0.0",
44
+ "@atlaskit/media-common": "^12.0.0",
45
+ "@atlaskit/media-file-preview": "^0.11.0",
46
+ "@atlaskit/media-svg": "^2.0.0",
47
+ "@atlaskit/media-ui": "^28.0.0",
48
+ "@atlaskit/media-viewer": "^51.0.0",
49
49
  "@atlaskit/platform-feature-flags": "^1.1.0",
50
- "@atlaskit/primitives": "^13.5.0",
51
- "@atlaskit/react-ufo": "^2.15.0",
52
- "@atlaskit/spinner": "^17.1.0",
53
- "@atlaskit/theme": "^16.0.0",
54
- "@atlaskit/tokens": "^3.3.0",
55
- "@atlaskit/tooltip": "^19.1.0",
56
- "@atlaskit/ufo": "^0.3.0",
57
- "@atlaskit/visually-hidden": "^1.6.0",
50
+ "@atlaskit/primitives": "^14.0.0",
51
+ "@atlaskit/react-ufo": "^3.0.0",
52
+ "@atlaskit/spinner": "^18.0.0",
53
+ "@atlaskit/theme": "^17.0.0",
54
+ "@atlaskit/tokens": "^4.0.0",
55
+ "@atlaskit/tooltip": "^20.0.0",
56
+ "@atlaskit/ufo": "^0.4.0",
57
+ "@atlaskit/visually-hidden": "^2.0.0",
58
58
  "@babel/runtime": "^7.0.0",
59
59
  "classnames": "^2.2.5",
60
60
  "eventemitter2": "^4.1.0",
@@ -65,28 +65,28 @@
65
65
  },
66
66
  "peerDependencies": {
67
67
  "@emotion/react": "^11.7.1",
68
- "react": "^16.8.0 || ^17.0.0 || ~18.2.0",
69
- "react-dom": "^16.8.0 || ^17.0.0 || ~18.2.0",
68
+ "react": "^18.2.0",
69
+ "react-dom": "^18.2.0",
70
70
  "react-intl-next": "npm:react-intl@^5.18.1"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@af/integration-testing": "*",
74
- "@atlaskit/analytics-listeners": "^8.15.0",
75
- "@atlaskit/analytics-namespaced-context": "^6.14.0",
76
- "@atlaskit/form": "^11.1.0",
77
- "@atlaskit/inline-message": "^13.1.0",
78
- "@atlaskit/media-core": "^34.5.0",
79
- "@atlaskit/media-picker": "^67.1.0",
74
+ "@atlaskit/analytics-listeners": "^9.0.0",
75
+ "@atlaskit/analytics-namespaced-context": "^7.0.0",
76
+ "@atlaskit/form": "^12.0.0",
77
+ "@atlaskit/inline-message": "^14.0.0",
78
+ "@atlaskit/media-core": "^35.0.0",
79
+ "@atlaskit/media-picker": "^68.0.0",
80
80
  "@atlaskit/media-state": "^1.5.0",
81
- "@atlaskit/media-test-data": "^2.11.0",
82
- "@atlaskit/media-test-helpers": "^34.8.0",
83
- "@atlaskit/radio": "^7.2.0",
84
- "@atlaskit/range": "^8.1.0",
81
+ "@atlaskit/media-test-data": "^3.0.0",
82
+ "@atlaskit/media-test-helpers": "^35.0.0",
83
+ "@atlaskit/radio": "^8.0.0",
84
+ "@atlaskit/range": "^9.0.0",
85
85
  "@atlaskit/ssr": "*",
86
- "@atlaskit/toggle": "^14.1.0",
86
+ "@atlaskit/toggle": "^15.0.0",
87
87
  "@atlaskit/visual-regression": "*",
88
88
  "@atlassian/feature-flags-test-utils": "^0.3.0",
89
- "@atlassian/ufo": "^0.5.0",
89
+ "@atlassian/ufo": "^0.6.0",
90
90
  "@testing-library/dom": "^10.1.0",
91
91
  "@testing-library/react": "^13.4.0",
92
92
  "@testing-library/react-hooks": "^8.0.1",