@atlaskit/media-card 77.6.3 → 77.6.4

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,11 @@
1
1
  # @atlaskit/media-card
2
2
 
3
+ ## 77.6.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#61611](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61611) [`fd753abb6b83`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fd753abb6b83) - [ED-21557] Add optional chaining in the unsubscribe to avoid tests cases failing in React 18
8
+
3
9
  ## 77.6.3
4
10
 
5
11
  ### Patch Changes
@@ -49,7 +49,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
49
49
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
50
50
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
51
51
  var packageName = "@atlaskit/media-card";
52
- var packageVersion = "77.6.3";
52
+ var packageVersion = "77.6.4";
53
53
  var CardBase = exports.CardBase = /*#__PURE__*/function (_Component) {
54
54
  (0, _inherits2.default)(CardBase, _Component);
55
55
  var _super = _createSuper(CardBase);
@@ -90,7 +90,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
90
90
  }(_react.default.Component);
91
91
  (0, _defineProperty2.default)(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
92
92
  var packageName = "@atlaskit/media-card";
93
- var packageVersion = "77.6.3";
93
+ var packageVersion = "77.6.4";
94
94
  var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
95
95
  packageVersion: packageVersion,
96
96
  packageName: packageName,
@@ -16,7 +16,7 @@ var _externalImageCard = require("./externalImageCard");
16
16
  var _fileCard = require("./fileCard");
17
17
  var _excluded = ["identifier"];
18
18
  var packageName = "@atlaskit/media-card";
19
- var packageVersion = "77.6.3";
19
+ var packageVersion = "77.6.4";
20
20
  var CardV2Base = exports.CardV2Base = function CardV2Base(_ref) {
21
21
  var identifier = _ref.identifier,
22
22
  otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
@@ -119,7 +119,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
119
119
  ErrorBoundary = _this$state.ErrorBoundary;
120
120
  var analyticsContext = {
121
121
  packageVersion: "@atlaskit/media-card",
122
- packageName: "77.6.3",
122
+ packageName: "77.6.4",
123
123
  componentName: 'mediaInlineCard',
124
124
  component: 'mediaInlineCard'
125
125
  };
@@ -7,18 +7,18 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.MediaInlineCardInternal = exports.MediaInlineCard = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
- var _react = _interopRequireWildcard(require("react"));
11
- var _reactDom = _interopRequireDefault(require("react-dom"));
10
+ var _analyticsNext = require("@atlaskit/analytics-next");
12
11
  var _mediaClient = require("@atlaskit/media-client");
13
- var _reactIntlNext = require("react-intl-next");
14
12
  var _mediaUi = require("@atlaskit/media-ui");
13
+ var _formatDate = require("@atlaskit/media-ui/formatDate");
15
14
  var _mimeTypeIcon = require("@atlaskit/media-ui/mime-type-icon");
16
15
  var _mediaViewer = require("@atlaskit/media-viewer");
17
16
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
18
- var _formatDate = require("@atlaskit/media-ui/formatDate");
19
- var _analytics = require("../utils/analytics");
20
- var _analyticsNext = require("@atlaskit/analytics-next");
17
+ var _react = _interopRequireWildcard(require("react"));
18
+ var _reactDom = _interopRequireDefault(require("react-dom"));
19
+ var _reactIntlNext = require("react-intl-next");
21
20
  var _errors = require("../errors");
21
+ var _analytics = require("../utils/analytics");
22
22
  var _mediaInlineCardAnalytics = require("./mediaInlineCardAnalytics");
23
23
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
24
24
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -114,7 +114,7 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
114
114
  }
115
115
  });
116
116
  return function () {
117
- subscription.unsubscribe();
117
+ subscription === null || subscription === void 0 || subscription.unsubscribe();
118
118
  };
119
119
  }, [identifier.collectionName, identifier.id, mediaClient.file]);
120
120
  if (subscribeError) {
@@ -14,7 +14,7 @@ var _mediaClient = require("@atlaskit/media-client");
14
14
  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; }
15
15
  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; }
16
16
  var packageName = "@atlaskit/media-card";
17
- var packageVersion = "77.6.3";
17
+ var packageVersion = "77.6.4";
18
18
  var concurrentExperience;
19
19
  var getExperience = function getExperience(id) {
20
20
  if (!concurrentExperience) {
@@ -27,7 +27,7 @@ import { getMediaCardCursor } from '../utils/getMediaCardCursor';
27
27
  import { completeUfoExperience, startUfoExperience, abortUfoExperience } from '../utils/ufoExperiences';
28
28
  import { generateUniqueId } from '../utils/generateUniqueId';
29
29
  const packageName = "@atlaskit/media-card";
30
- const packageVersion = "77.6.3";
30
+ const packageVersion = "77.6.4";
31
31
  export class CardBase extends Component {
32
32
  constructor(props) {
33
33
  super(props);
@@ -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 = "77.6.3";
69
+ const packageVersion = "77.6.4";
70
70
  const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
71
71
  packageVersion,
72
72
  packageName,
@@ -7,7 +7,7 @@ import { IntlProvider, injectIntl } from 'react-intl-next';
7
7
  import { ExternalImageCard } from './externalImageCard';
8
8
  import { FileCard } from './fileCard';
9
9
  const packageName = "@atlaskit/media-card";
10
- const packageVersion = "77.6.3";
10
+ const packageVersion = "77.6.4";
11
11
  export const CardV2Base = ({
12
12
  identifier,
13
13
  ...otherProps
@@ -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: "77.6.3",
40
+ packageName: "77.6.4",
41
41
  componentName: 'mediaInlineCard',
42
42
  component: 'mediaInlineCard'
43
43
  };
@@ -1,15 +1,15 @@
1
- import React, { useState, useEffect } from 'react';
2
- import ReactDOM from 'react-dom';
1
+ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
3
2
  import { FileFetcherError } from '@atlaskit/media-client';
4
- import { injectIntl, IntlProvider, createIntl } from 'react-intl-next';
5
- import { MediaInlineCardLoadedView, MediaInlineCardLoadingView, MediaInlineCardErroredView, messages } from '@atlaskit/media-ui';
3
+ import { MediaInlineCardErroredView, MediaInlineCardLoadedView, MediaInlineCardLoadingView, messages } from '@atlaskit/media-ui';
4
+ import { formatDate } from '@atlaskit/media-ui/formatDate';
6
5
  import { MimeTypeIcon } from '@atlaskit/media-ui/mime-type-icon';
7
6
  import { MediaViewer } from '@atlaskit/media-viewer';
8
7
  import Tooltip from '@atlaskit/tooltip';
9
- import { formatDate } from '@atlaskit/media-ui/formatDate';
10
- import { fireMediaCardEvent } from '../utils/analytics';
11
- import { useAnalyticsEvents } from '@atlaskit/analytics-next';
8
+ import React, { useEffect, useState } from 'react';
9
+ import ReactDOM from 'react-dom';
10
+ import { createIntl, injectIntl, IntlProvider } from 'react-intl-next';
12
11
  import { MediaCardError } from '../errors';
12
+ import { fireMediaCardEvent } from '../utils/analytics';
13
13
  import { getErrorStatusPayload, getFailedProcessingStatusPayload, getSucceededStatusPayload } from './mediaInlineCardAnalytics';
14
14
  // UI component which renders an inline link in the appropiate state based on a media file
15
15
  export const MediaInlineCardInternal = ({
@@ -86,7 +86,7 @@ export const MediaInlineCardInternal = ({
86
86
  }
87
87
  });
88
88
  return () => {
89
- subscription.unsubscribe();
89
+ subscription === null || subscription === void 0 ? void 0 : subscription.unsubscribe();
90
90
  };
91
91
  }, [identifier.collectionName, identifier.id, mediaClient.file]);
92
92
  if (subscribeError) {
@@ -4,7 +4,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
4
4
  import { MediaCardError } from '../errors';
5
5
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
6
6
  const packageName = "@atlaskit/media-card";
7
- const packageVersion = "77.6.3";
7
+ const packageVersion = "77.6.4";
8
8
  let concurrentExperience;
9
9
  const getExperience = id => {
10
10
  if (!concurrentExperience) {
@@ -40,7 +40,7 @@ import { getMediaCardCursor } from '../utils/getMediaCardCursor';
40
40
  import { completeUfoExperience, startUfoExperience, abortUfoExperience } from '../utils/ufoExperiences';
41
41
  import { generateUniqueId } from '../utils/generateUniqueId';
42
42
  var packageName = "@atlaskit/media-card";
43
- var packageVersion = "77.6.3";
43
+ var packageVersion = "77.6.4";
44
44
  export var CardBase = /*#__PURE__*/function (_Component) {
45
45
  _inherits(CardBase, _Component);
46
46
  var _super = _createSuper(CardBase);
@@ -83,7 +83,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
83
83
  }(React.Component);
84
84
  _defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
85
85
  var packageName = "@atlaskit/media-card";
86
- var packageVersion = "77.6.3";
86
+ var packageVersion = "77.6.4";
87
87
  var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
88
88
  packageVersion: packageVersion,
89
89
  packageName: packageName,
@@ -9,7 +9,7 @@ import { IntlProvider, injectIntl } from 'react-intl-next';
9
9
  import { ExternalImageCard } from './externalImageCard';
10
10
  import { FileCard } from './fileCard';
11
11
  var packageName = "@atlaskit/media-card";
12
- var packageVersion = "77.6.3";
12
+ var packageVersion = "77.6.4";
13
13
  export var CardV2Base = function CardV2Base(_ref) {
14
14
  var identifier = _ref.identifier,
15
15
  otherProps = _objectWithoutProperties(_ref, _excluded);
@@ -103,7 +103,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
103
103
  ErrorBoundary = _this$state.ErrorBoundary;
104
104
  var analyticsContext = {
105
105
  packageVersion: "@atlaskit/media-card",
106
- packageName: "77.6.3",
106
+ packageName: "77.6.4",
107
107
  componentName: 'mediaInlineCard',
108
108
  component: 'mediaInlineCard'
109
109
  };
@@ -1,16 +1,16 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import React, { useState, useEffect } from 'react';
3
- import ReactDOM from 'react-dom';
2
+ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
4
3
  import { FileFetcherError } from '@atlaskit/media-client';
5
- import { injectIntl, IntlProvider, createIntl } from 'react-intl-next';
6
- import { MediaInlineCardLoadedView, MediaInlineCardLoadingView, MediaInlineCardErroredView, messages } from '@atlaskit/media-ui';
4
+ import { MediaInlineCardErroredView, MediaInlineCardLoadedView, MediaInlineCardLoadingView, messages } from '@atlaskit/media-ui';
5
+ import { formatDate } from '@atlaskit/media-ui/formatDate';
7
6
  import { MimeTypeIcon } from '@atlaskit/media-ui/mime-type-icon';
8
7
  import { MediaViewer } from '@atlaskit/media-viewer';
9
8
  import Tooltip from '@atlaskit/tooltip';
10
- import { formatDate } from '@atlaskit/media-ui/formatDate';
11
- import { fireMediaCardEvent } from '../utils/analytics';
12
- import { useAnalyticsEvents } from '@atlaskit/analytics-next';
9
+ import React, { useEffect, useState } from 'react';
10
+ import ReactDOM from 'react-dom';
11
+ import { createIntl, injectIntl, IntlProvider } from 'react-intl-next';
13
12
  import { MediaCardError } from '../errors';
13
+ import { fireMediaCardEvent } from '../utils/analytics';
14
14
  import { getErrorStatusPayload, getFailedProcessingStatusPayload, getSucceededStatusPayload } from './mediaInlineCardAnalytics';
15
15
  // UI component which renders an inline link in the appropiate state based on a media file
16
16
  export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
@@ -104,7 +104,7 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
104
104
  }
105
105
  });
106
106
  return function () {
107
- subscription.unsubscribe();
107
+ subscription === null || subscription === void 0 || subscription.unsubscribe();
108
108
  };
109
109
  }, [identifier.collectionName, identifier.id, mediaClient.file]);
110
110
  if (subscribeError) {
@@ -7,7 +7,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
7
7
  import { MediaCardError } from '../errors';
8
8
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
9
9
  var packageName = "@atlaskit/media-card";
10
- var packageVersion = "77.6.3";
10
+ var packageVersion = "77.6.4";
11
11
  var concurrentExperience;
12
12
  var getExperience = function getExperience(id) {
13
13
  if (!concurrentExperience) {
@@ -1,5 +1,5 @@
1
- import React, { FC } from 'react';
2
1
  import { FileIdentifier, Identifier, MediaClient } from '@atlaskit/media-client';
2
+ import React, { FC } from 'react';
3
3
  import { WrappedComponentProps } from 'react-intl-next';
4
4
  import { InlineCardOnClickCallback } from '../types';
5
5
  export interface MediaInlineCardProps {
@@ -1,5 +1,5 @@
1
- import React, { FC } from 'react';
2
1
  import { FileIdentifier, Identifier, MediaClient } from '@atlaskit/media-client';
2
+ import React, { FC } from 'react';
3
3
  import { WrappedComponentProps } from 'react-intl-next';
4
4
  import { InlineCardOnClickCallback } from '../types';
5
5
  export interface MediaInlineCardProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "77.6.3",
3
+ "version": "77.6.4",
4
4
  "description": "Includes all media card related components, CardView, CardViewSmall, Card...",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"