@atlaskit/media-card 77.6.1 → 77.6.2

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.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#60690](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/60690) [`4a6ece928910`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4a6ece928910) - [ux] Media Inline Card displays the file name when failed to process and enables Media Viewer to download it
8
+
3
9
  ## 77.6.1
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.1";
52
+ var packageVersion = "77.6.2";
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.1";
93
+ var packageVersion = "77.6.2";
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.1";
19
+ var packageVersion = "77.6.2";
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.1",
122
+ packageName: "77.6.2",
123
123
  componentName: 'mediaInlineCard',
124
124
  component: 'mediaInlineCard'
125
125
  };
@@ -134,13 +134,6 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
134
134
  isSelected: isSelected
135
135
  });
136
136
  }
137
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
138
- !isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
139
- return /*#__PURE__*/_react.default.createElement(_mediaUi.MediaInlineCardErroredView, {
140
- message: (intl || defaultIntl).formatMessage(_mediaUi.messages.couldnt_load_file),
141
- isSelected: isSelected
142
- });
143
- }
144
137
 
145
138
  // Empty file handling
146
139
  if (fileState && !fileState.name) {
@@ -163,6 +156,11 @@ var MediaInlineCardInternal = exports.MediaInlineCardInternal = function MediaIn
163
156
  isSelected: isSelected
164
157
  });
165
158
  }
159
+
160
+ // Failed to process should still display the loaded view and enable Media Client to download
161
+ if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
162
+ !isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
163
+ }
166
164
  var mediaType = fileState.mediaType,
167
165
  name = fileState.name,
168
166
  mimeType = fileState.mimeType;
@@ -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.1";
17
+ var packageVersion = "77.6.2";
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.1";
30
+ const packageVersion = "77.6.2";
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.1";
69
+ const packageVersion = "77.6.2";
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.1";
10
+ const packageVersion = "77.6.2";
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.1",
40
+ packageName: "77.6.2",
41
41
  componentName: 'mediaInlineCard',
42
42
  component: 'mediaInlineCard'
43
43
  };
@@ -106,13 +106,6 @@ export const MediaInlineCardInternal = ({
106
106
  isSelected: isSelected
107
107
  });
108
108
  }
109
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
110
- !isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
111
- return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
112
- message: (intl || defaultIntl).formatMessage(messages.couldnt_load_file),
113
- isSelected: isSelected
114
- });
115
- }
116
109
 
117
110
  // Empty file handling
118
111
  if (fileState && !fileState.name) {
@@ -135,6 +128,11 @@ export const MediaInlineCardInternal = ({
135
128
  isSelected: isSelected
136
129
  });
137
130
  }
131
+
132
+ // Failed to process should still display the loaded view and enable Media Client to download
133
+ if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
134
+ !isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
135
+ }
138
136
  const {
139
137
  mediaType,
140
138
  name,
@@ -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.1";
7
+ const packageVersion = "77.6.2";
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.1";
43
+ var packageVersion = "77.6.2";
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.1";
86
+ var packageVersion = "77.6.2";
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.1";
12
+ var packageVersion = "77.6.2";
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.1",
106
+ packageName: "77.6.2",
107
107
  componentName: 'mediaInlineCard',
108
108
  component: 'mediaInlineCard'
109
109
  };
@@ -124,13 +124,6 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
124
124
  isSelected: isSelected
125
125
  });
126
126
  }
127
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
128
- !isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
129
- return /*#__PURE__*/React.createElement(MediaInlineCardErroredView, {
130
- message: (intl || defaultIntl).formatMessage(messages.couldnt_load_file),
131
- isSelected: isSelected
132
- });
133
- }
134
127
 
135
128
  // Empty file handling
136
129
  if (fileState && !fileState.name) {
@@ -153,6 +146,11 @@ export var MediaInlineCardInternal = function MediaInlineCardInternal(_ref) {
153
146
  isSelected: isSelected
154
147
  });
155
148
  }
149
+
150
+ // Failed to process should still display the loaded view and enable Media Client to download
151
+ if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
152
+ !isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
153
+ }
156
154
  var mediaType = fileState.mediaType,
157
155
  name = fileState.name,
158
156
  mimeType = fileState.mimeType;
@@ -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.1";
10
+ var packageVersion = "77.6.2";
11
11
  var concurrentExperience;
12
12
  var getExperience = function getExperience(id) {
13
13
  if (!concurrentExperience) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "77.6.1",
3
+ "version": "77.6.2",
4
4
  "description": "Includes all media card related components, CardView, CardViewSmall, Card...",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"