@atlaskit/media-card 78.2.2 → 78.2.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/card/card.js +2 -2
  3. package/dist/cjs/card/cardLoader.js +1 -1
  4. package/dist/cjs/card/cardView.js +32 -11
  5. package/dist/cjs/card/externalImageCard.js +1 -1
  6. package/dist/cjs/card/fileCard.js +1 -1
  7. package/dist/cjs/card/inlinePlayer.js +1 -1
  8. package/dist/cjs/card/inlinePlayerLazy.js +1 -1
  9. package/dist/cjs/card/media-card-analytics-error-boundary.js +2 -2
  10. package/dist/cjs/card/svgView/svgView.js +1 -1
  11. package/dist/cjs/card/ui/actionsBar/actionsBar.js +1 -1
  12. package/dist/cjs/card/ui/actionsBar/cardActions/cardActionIconButton.js +44 -54
  13. package/dist/cjs/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.js +2 -2
  14. package/dist/cjs/card/ui/actionsBar/cardActions/cardActionsView.js +5 -20
  15. package/dist/cjs/card/ui/imageRenderer/imageRenderer.js +1 -1
  16. package/dist/cjs/card/ui/titleBox/styles.js +4 -1
  17. package/dist/cjs/card/ui/titleBox/titleBox.js +20 -22
  18. package/dist/cjs/card/ui/titleBox/titleBoxComponents.js +25 -23
  19. package/dist/cjs/card/ui/unhandledErrorCard/index.js +1 -1
  20. package/dist/cjs/errors.js +1 -1
  21. package/dist/cjs/inline/loader.js +3 -3
  22. package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
  23. package/dist/cjs/inline/mediaInlineCard.js +1 -1
  24. package/dist/cjs/utils/lightCards/cardError.js +2 -2
  25. package/dist/cjs/utils/lightCards/cardLoading.js +2 -2
  26. package/dist/cjs/utils/lightCards/errorIcon/index.js +1 -1
  27. package/dist/cjs/utils/mediaPerformanceObserver/mediaPerformanceObserver.js +4 -0
  28. package/dist/cjs/utils/objectURLCache.js +1 -1
  29. package/dist/cjs/utils/ufoExperiences.js +1 -1
  30. package/dist/cjs/utils/viewportDetector.js +4 -4
  31. package/dist/es2019/card/card.js +1 -1
  32. package/dist/es2019/card/cardView.js +31 -11
  33. package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
  34. package/dist/es2019/card/ui/actionsBar/cardActions/cardActionIconButton.js +45 -32
  35. package/dist/es2019/card/ui/actionsBar/cardActions/cardActionsView.js +4 -17
  36. package/dist/es2019/card/ui/titleBox/styles.js +3 -1
  37. package/dist/es2019/card/ui/titleBox/titleBox.js +25 -28
  38. package/dist/es2019/card/ui/titleBox/titleBoxComponents.js +25 -23
  39. package/dist/es2019/inline/loader.js +1 -1
  40. package/dist/es2019/utils/mediaPerformanceObserver/mediaPerformanceObserver.js +4 -0
  41. package/dist/es2019/utils/ufoExperiences.js +1 -1
  42. package/dist/esm/card/card.js +1 -1
  43. package/dist/esm/card/cardView.js +32 -11
  44. package/dist/esm/card/media-card-analytics-error-boundary.js +2 -2
  45. package/dist/esm/card/ui/actionsBar/actionsBar.js +1 -1
  46. package/dist/esm/card/ui/actionsBar/cardActions/cardActionIconButton.js +43 -51
  47. package/dist/esm/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.js +1 -1
  48. package/dist/esm/card/ui/actionsBar/cardActions/cardActionsView.js +5 -20
  49. package/dist/esm/card/ui/titleBox/styles.js +4 -1
  50. package/dist/esm/card/ui/titleBox/titleBox.js +19 -21
  51. package/dist/esm/card/ui/titleBox/titleBoxComponents.js +25 -23
  52. package/dist/esm/card/ui/unhandledErrorCard/index.js +1 -1
  53. package/dist/esm/errors.js +1 -1
  54. package/dist/esm/inline/loader.js +2 -2
  55. package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
  56. package/dist/esm/utils/lightCards/cardError.js +1 -1
  57. package/dist/esm/utils/lightCards/cardLoading.js +1 -1
  58. package/dist/esm/utils/lightCards/errorIcon/index.js +1 -1
  59. package/dist/esm/utils/mediaPerformanceObserver/mediaPerformanceObserver.js +4 -0
  60. package/dist/esm/utils/objectURLCache.js +1 -1
  61. package/dist/esm/utils/ufoExperiences.js +1 -1
  62. package/dist/esm/utils/viewportDetector.js +3 -3
  63. package/dist/types/card/ui/actionsBar/cardActions/cardActionIconButton.d.ts +4 -5
  64. package/dist/types/card/ui/titleBox/styles.d.ts +9 -2
  65. package/dist/types/card/ui/titleBox/titleBox.d.ts +5 -3
  66. package/dist/types/card/ui/titleBox/types.d.ts +4 -2
  67. package/dist/types-ts4.5/card/ui/actionsBar/cardActions/cardActionIconButton.d.ts +4 -5
  68. package/dist/types-ts4.5/card/ui/titleBox/styles.d.ts +9 -2
  69. package/dist/types-ts4.5/card/ui/titleBox/titleBox.d.ts +5 -3
  70. package/dist/types-ts4.5/card/ui/titleBox/types.d.ts +4 -2
  71. package/package.json +5 -1
@@ -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.2.2";
8
+ const packageVersion = "78.2.4";
9
9
  let concurrentExperience;
10
10
  const getExperience = id => {
11
11
  if (!concurrentExperience) {
@@ -11,7 +11,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
11
11
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
12
12
  import { fg } from '@atlaskit/platform-feature-flags';
13
13
  var packageName = "@atlaskit/media-card";
14
- var packageVersion = "78.2.2";
14
+ var packageVersion = "78.2.4";
15
15
  export var CardBase = function CardBase(_ref) {
16
16
  var identifier = _ref.identifier,
17
17
  otherProps = _objectWithoutProperties(_ref, _excluded);
@@ -8,14 +8,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
8
8
  */
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import { jsx } from '@emotion/react';
11
- import React, { useEffect, useState, useRef } from 'react';
11
+ import React, { useEffect, useState, useRef, useMemo } from 'react';
12
12
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
13
13
  import { MimeTypeIcon } from '@atlaskit/media-ui/mime-type-icon';
14
14
  import SpinnerIcon from '@atlaskit/spinner';
15
15
  import Tooltip from '@atlaskit/tooltip';
16
16
  import { messages } from '@atlaskit/media-ui';
17
17
  import { createAndFireMediaCardEvent } from '../utils/analytics';
18
- import { attachDetailsToActions } from './actions';
19
18
  import { ImageRenderer } from './ui/imageRenderer/imageRenderer';
20
19
  import { TitleBox } from './ui/titleBox/titleBox';
21
20
  import { FailedTitleBox } from './ui/titleBox/failedTitleBox';
@@ -31,6 +30,7 @@ import { Wrapper, ImageContainer } from './ui/wrapper';
31
30
  import { fileCardImageViewSelector } from './classnames';
32
31
  import { useBreakpoint } from './useBreakpoint';
33
32
  import OpenMediaViewerButton from './ui/openMediaViewerButton/openMediaViewerButton';
33
+ import { useCurrentValueRef } from '../utils/useCurrentValueRef';
34
34
  export var CardViewBase = function CardViewBase(_ref) {
35
35
  var innerRef = _ref.innerRef,
36
36
  onImageLoad = _ref.onImageLoad,
@@ -117,7 +117,7 @@ export var CardViewBase = function CardViewBase(_ref) {
117
117
  renderImageRenderer: !!cardPreview,
118
118
  renderPlayButton: !!cardPreview && mediaType === 'video',
119
119
  renderBlanket: !disableOverlay,
120
- renderTitleBox: !disableOverlay && !!name,
120
+ renderTitleBox: !disableOverlay,
121
121
  renderTickBox: !disableOverlay && !!selectable
122
122
  };
123
123
  switch (status) {
@@ -197,13 +197,33 @@ export var CardViewBase = function CardViewBase(_ref) {
197
197
  var isTickBoxSelectable = !disableOverlay && !!selectable && !selected;
198
198
  // Disable tooltip for Media Single
199
199
  var shouldDisplayTooltip = !disableOverlay && !shouldHideTooltip;
200
- var hasTitleBox = !!(renderTitleBox || renderFailedTitleBox);
201
200
  var _ref5 = metadata || {},
202
201
  mediaType = _ref5.mediaType,
203
202
  mimeType = _ref5.mimeType,
204
203
  name = _ref5.name,
205
204
  createdAt = _ref5.createdAt;
206
- var actionsWithDetails = metadata && actions ? attachDetailsToActions(actions, metadata) : [];
205
+ var isTitleBoxVisible = renderTitleBox && name;
206
+ var hasVisibleTitleBox = !!(isTitleBoxVisible || renderFailedTitleBox);
207
+ var metadataRef = useCurrentValueRef(metadata);
208
+ var actionsWithDetails = useMemo(function () {
209
+ if (!actions) {
210
+ return [];
211
+ }
212
+ return actions.map(function (action) {
213
+ return _objectSpread(_objectSpread({}, action), {}, {
214
+ handler: function handler() {
215
+ if (!metadataRef.current) {
216
+ action.handler();
217
+ } else {
218
+ action.handler({
219
+ type: 'file',
220
+ details: metadataRef.current
221
+ });
222
+ }
223
+ }
224
+ });
225
+ });
226
+ }, [actions, metadataRef]);
207
227
  var contents = jsx(React.Fragment, null, jsx(ImageContainer, {
208
228
  testId: fileCardImageViewSelector,
209
229
  mediaName: name,
@@ -213,7 +233,7 @@ export var CardViewBase = function CardViewBase(_ref) {
213
233
  source: cardPreview === null || cardPreview === void 0 ? void 0 : cardPreview.source
214
234
  }, renderTypeIcon && jsx(IconWrapper, {
215
235
  breakpoint: breakpoint,
216
- hasTitleBox: hasTitleBox
236
+ hasTitleBox: hasVisibleTitleBox
217
237
  }, jsx(MimeTypeIcon, {
218
238
  testId: "media-card-file-type-icon",
219
239
  mediaType: mediaType,
@@ -221,7 +241,7 @@ export var CardViewBase = function CardViewBase(_ref) {
221
241
  name: name
222
242
  }), iconMessage), renderSpinner && jsx(IconWrapper, {
223
243
  breakpoint: breakpoint,
224
- hasTitleBox: hasTitleBox
244
+ hasTitleBox: hasVisibleTitleBox
225
245
  }, jsx(SpinnerIcon, {
226
246
  testId: "media-card-loading",
227
247
  interactionName: "media-card-loading"
@@ -237,22 +257,23 @@ export var CardViewBase = function CardViewBase(_ref) {
237
257
  forceSyncDisplay: forceSyncDisplay
238
258
  }), renderPlayButton && jsx(IconWrapper, {
239
259
  breakpoint: breakpoint,
240
- hasTitleBox: hasTitleBox
260
+ hasTitleBox: hasVisibleTitleBox
241
261
  }, jsx(PlayButton, null)), renderBlanket && jsx(Blanket, {
242
262
  isFixed: isFixedBlanket
243
- }), renderTitleBox && name && jsx(TitleBox, {
263
+ }), renderTitleBox && jsx(TitleBox, {
244
264
  name: name,
245
265
  createdAt: overriddenCreationDate !== null && overriddenCreationDate !== void 0 ? overriddenCreationDate : createdAt,
246
266
  breakpoint: breakpoint,
247
267
  titleBoxIcon: titleBoxIcon,
248
- titleBoxBgColor: titleBoxBgColor
268
+ titleBoxBgColor: titleBoxBgColor,
269
+ hidden: !isTitleBoxVisible
249
270
  }), renderFailedTitleBox && jsx(FailedTitleBox, {
250
271
  breakpoint: breakpoint,
251
272
  customMessage: customTitleMessage
252
273
  }), renderProgressBar && jsx(ProgressBar, {
253
274
  progress: progress,
254
275
  breakpoint: breakpoint,
255
- positionBottom: !hasTitleBox
276
+ positionBottom: !hasVisibleTitleBox
256
277
  }), renderTickBox && jsx(TickBox, {
257
278
  selected: selected
258
279
  })), disableOverlay || !actions || actions.length === 0 ? null : jsx(ActionsBar, {
@@ -7,7 +7,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
8
  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; }
9
9
  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; }
10
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
11
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
12
  import React from 'react';
13
13
  import { withMediaAnalyticsContext } from '@atlaskit/media-common';
@@ -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 = "78.2.2";
86
+ var packageVersion = "78.2.4";
87
87
 
88
88
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
89
89
  var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/inherits";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import React from 'react';
9
9
  import { CardActionIconButtonVariant, CardActionsView } from './cardActions';
@@ -1,53 +1,45 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
1
  import React from 'react';
11
- import { Component } from 'react';
2
+ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
12
3
  import { CardActionButton } from './cardActionButton';
13
- export var CardActionIconButton = /*#__PURE__*/function (_Component) {
14
- _inherits(CardActionIconButton, _Component);
15
- var _super = _createSuper(CardActionIconButton);
16
- function CardActionIconButton() {
17
- var _this;
18
- _classCallCheck(this, CardActionIconButton);
19
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
20
- args[_key] = arguments[_key];
21
- }
22
- _this = _super.call.apply(_super, [this].concat(args));
23
- // this is to prevent currently focused text to loose cursor on clicking card action
24
- // this does not prevent onclick behavior
25
- _defineProperty(_assertThisInitialized(_this), "onMouseDown", function (event) {
26
- event.preventDefault();
27
- });
28
- return _this;
29
- }
30
- _createClass(CardActionIconButton, [{
31
- key: "render",
32
- value: function render() {
33
- var _this$props = this.props,
34
- icon = _this$props.icon,
35
- label = _this$props.label,
36
- triggerColor = _this$props.triggerColor,
37
- onClick = _this$props.onClick,
38
- variant = _this$props.variant;
39
- return /*#__PURE__*/React.createElement(CardActionButton, {
40
- onClick: onClick,
41
- onMouseDown: this.onMouseDown
42
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
43
- ,
44
- style: {
45
- color: triggerColor
46
- },
47
- label: label,
48
- variant: variant
49
- }, icon);
50
- }
51
- }]);
52
- return CardActionIconButton;
53
- }(Component);
4
+ import { fireMediaCardEvent } from '../../../../utils/analytics';
5
+ export var CardActionIconButton = function CardActionIconButton(_ref) {
6
+ var icon = _ref.icon,
7
+ label = _ref.label,
8
+ filename = _ref.filename,
9
+ triggerColor = _ref.triggerColor,
10
+ onClick = _ref.onClick,
11
+ isPrimary = _ref.isPrimary,
12
+ variant = _ref.variant;
13
+ var _useAnalyticsEvents = useAnalyticsEvents(),
14
+ createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
15
+
16
+ // this is to prevent currently focused text to loose cursor on clicking card action
17
+ // this does not prevent onclick behavior
18
+ var onMouseDown = function onMouseDown(event) {
19
+ event.preventDefault();
20
+ };
21
+ var handleClick = function handleClick(e) {
22
+ var actionSubjectId = isPrimary ? 'mediaCardPrimaryActionButton' : 'mediaCardSecondaryActionButton';
23
+ fireMediaCardEvent({
24
+ eventType: 'ui',
25
+ action: 'clicked',
26
+ actionSubject: 'button',
27
+ actionSubjectId: actionSubjectId,
28
+ attributes: {
29
+ label: label
30
+ }
31
+ }, createAnalyticsEvent);
32
+ onClick === null || onClick === void 0 || onClick(e);
33
+ };
34
+ return /*#__PURE__*/React.createElement(CardActionButton, {
35
+ onClick: handleClick,
36
+ onMouseDown: onMouseDown
37
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
38
+ ,
39
+ style: {
40
+ color: triggerColor
41
+ },
42
+ label: filename ? "".concat(filename, " \u2014 ").concat(label) : label,
43
+ variant: variant
44
+ }, icon);
45
+ };
@@ -6,7 +6,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _extends from "@babel/runtime/helpers/extends";
8
8
  var _excluded = ["triggerRef"];
9
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
11
  import React from 'react';
12
12
  import { Component } from 'react';
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/inherits";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  /**
9
9
  * @jsxRuntime classic
@@ -16,11 +16,6 @@ import { CardActionIconButton } from './cardActionIconButton';
16
16
  import { wrapperStyles } from './styles';
17
17
  import { CardActionsDropdownMenu } from './cardActionsDropdownMenu';
18
18
  import { PreventClickThrough } from '../../../../utils/preventClickThrough';
19
- import { createAndFireMediaCardEvent } from '../../../../utils/analytics';
20
- import { withAnalyticsEvents } from '@atlaskit/analytics-next';
21
- var CardActionIconButtonWithProps = function CardActionIconButtonWithProps(props) {
22
- return jsx(CardActionIconButton, props);
23
- };
24
19
  export var CardActionsView = /*#__PURE__*/function (_Component) {
25
20
  _inherits(CardActionsView, _Component);
26
21
  var _super = _createSuper(CardActionsView);
@@ -51,21 +46,11 @@ export var CardActionsView = /*#__PURE__*/function (_Component) {
51
46
  var icon = action.icon,
52
47
  handler = action.handler,
53
48
  label = action.label;
54
- var actionSubjectId = isPrimary ? 'mediaCardPrimaryActionButton' : 'mediaCardSecondaryActionButton';
55
- var CardActionIconButtonWithAnalytics = withAnalyticsEvents({
56
- onClick: createAndFireMediaCardEvent({
57
- eventType: 'ui',
58
- action: 'clicked',
59
- actionSubject: 'button',
60
- actionSubjectId: actionSubjectId,
61
- attributes: {
62
- label: label
63
- }
64
- })
65
- })(CardActionIconButtonWithProps);
66
- return jsx(CardActionIconButtonWithAnalytics, {
49
+ return jsx(CardActionIconButton, {
67
50
  icon: icon,
68
- label: filename ? "".concat(filename, " \u2014 ").concat(label) : label,
51
+ label: label,
52
+ filename: filename,
53
+ isPrimary: isPrimary,
69
54
  triggerColor: triggerColor,
70
55
  onClick: function onClick() {
71
56
  return handler();
@@ -14,6 +14,8 @@ var generateResponsiveStyles = function generateResponsiveStyles() {
14
14
  var HEX_REGEX = /^#[0-9A-F]{6}$/i;
15
15
  export var titleBoxWrapperStyles = function titleBoxWrapperStyles(_ref) {
16
16
  var breakpoint = _ref.breakpoint,
17
+ _ref$display = _ref.display,
18
+ display = _ref$display === void 0 ? 'flex' : _ref$display,
17
19
  titleBoxBgColor = _ref.titleBoxBgColor;
18
20
  return css({
19
21
  position: 'absolute',
@@ -25,7 +27,8 @@ export var titleBoxWrapperStyles = function titleBoxWrapperStyles(_ref) {
25
27
  color: "var(--ds-text, ".concat(N800, ")"),
26
28
  cursor: 'inherit',
27
29
  pointerEvents: 'none',
28
- display: 'flex',
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
31
+ display: display,
29
32
  flexDirection: 'column',
30
33
  justifyContent: 'center'
31
34
  },
@@ -4,35 +4,33 @@ import LockFilledIcon from '@atlaskit/icon/glyph/lock-filled';
4
4
  import { Truncate } from '@atlaskit/media-ui/truncateText';
5
5
  import { formatDate } from '@atlaskit/media-ui/formatDate';
6
6
  import { TitleBoxWrapper, TitleBoxFooter, TitleBoxHeader, TitleBoxIcon } from './titleBoxComponents';
7
- export var FormattedDate = injectIntl(function (_ref) {
8
- var timestamp = _ref.timestamp,
7
+ var placeholderText = ' ';
8
+ var isValidTimestamp = function isValidTimestamp(timeStamp) {
9
+ return new Date(timeStamp).getTime() > 0;
10
+ };
11
+ export var TitleBox = injectIntl(function (_ref) {
12
+ var _intl$locale;
13
+ var name = _ref.name,
14
+ createdAt = _ref.createdAt,
15
+ breakpoint = _ref.breakpoint,
16
+ titleBoxBgColor = _ref.titleBoxBgColor,
17
+ titleBoxIcon = _ref.titleBoxIcon,
18
+ hidden = _ref.hidden,
9
19
  intl = _ref.intl;
10
- var _ref2 = intl || {
11
- locale: 'en'
12
- },
13
- _ref2$locale = _ref2.locale,
14
- locale = _ref2$locale === void 0 ? 'en' : _ref2$locale;
15
- return /*#__PURE__*/React.createElement(React.Fragment, null, formatDate(timestamp, locale));
16
- });
17
- export var TitleBox = function TitleBox(_ref3) {
18
- var name = _ref3.name,
19
- createdAt = _ref3.createdAt,
20
- breakpoint = _ref3.breakpoint,
21
- titleBoxBgColor = _ref3.titleBoxBgColor,
22
- titleBoxIcon = _ref3.titleBoxIcon;
23
20
  return /*#__PURE__*/React.createElement(TitleBoxWrapper, {
21
+ hidden: hidden,
24
22
  breakpoint: breakpoint,
25
23
  titleBoxBgColor: titleBoxBgColor
26
24
  }, /*#__PURE__*/React.createElement(TitleBoxHeader, {
27
25
  hasIconOverlap: !!titleBoxIcon && !createdAt
28
26
  }, /*#__PURE__*/React.createElement(Truncate, {
29
- text: name
30
- })), createdAt ? /*#__PURE__*/React.createElement(TitleBoxFooter, {
27
+ text: name !== null && name !== void 0 ? name : placeholderText
28
+ })), /*#__PURE__*/React.createElement(TitleBoxFooter, {
31
29
  hasIconOverlap: !!titleBoxIcon
32
- }, /*#__PURE__*/React.createElement(FormattedDate, {
33
- timestamp: createdAt
34
- })) : null, titleBoxIcon === 'LockFilledIcon' && /*#__PURE__*/React.createElement(TitleBoxIcon, null, /*#__PURE__*/React.createElement(LockFilledIcon, {
30
+ }, createdAt !== undefined && isValidTimestamp(createdAt) ? formatDate(createdAt, (_intl$locale = intl === null || intl === void 0 ? void 0 : intl.locale) !== null && _intl$locale !== void 0 ? _intl$locale : 'en') : placeholderText), titleBoxIcon === 'LockFilledIcon' && /*#__PURE__*/React.createElement(TitleBoxIcon, null, /*#__PURE__*/React.createElement(LockFilledIcon, {
35
31
  label: "",
36
32
  size: "small"
37
33
  })));
38
- };
34
+ }, {
35
+ enforceContext: false
36
+ });
@@ -7,7 +7,8 @@ import { jsx } from '@emotion/react';
7
7
  import { errorMessageWrapperStyles, titleBoxFooterStyles, titleBoxHeaderStyles, titleBoxIconStyles, titleBoxWrapperStyles } from './styles';
8
8
  export var TitleBoxWrapper = function TitleBoxWrapper(props) {
9
9
  var breakpoint = props.breakpoint,
10
- titleBoxBgColor = props.titleBoxBgColor;
10
+ titleBoxBgColor = props.titleBoxBgColor,
11
+ hidden = props.hidden;
11
12
  return jsx("div", {
12
13
  id: "titleBoxWrapper",
13
14
  "data-testid": "media-title-box"
@@ -15,42 +16,43 @@ export var TitleBoxWrapper = function TitleBoxWrapper(props) {
15
16
  ,
16
17
  css: titleBoxWrapperStyles({
17
18
  breakpoint: breakpoint,
19
+ display: hidden ? 'none' : 'flex',
18
20
  titleBoxBgColor: titleBoxBgColor
19
21
  })
20
22
  }, props.children);
21
23
  };
22
24
  export var TitleBoxHeader = function TitleBoxHeader(props) {
23
25
  var hasIconOverlap = props.hasIconOverlap;
24
- return (
26
+ return jsx("div", {
27
+ id: "titleBoxHeader",
28
+ "data-testid": "title-box-header"
25
29
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
26
- jsx("div", {
27
- id: "titleBoxHeader",
28
- css: titleBoxHeaderStyles({
29
- hasIconOverlap: hasIconOverlap
30
- })
31
- }, props.children)
32
- );
30
+ ,
31
+ css: titleBoxHeaderStyles({
32
+ hasIconOverlap: hasIconOverlap
33
+ })
34
+ }, props.children);
33
35
  };
34
36
  export var TitleBoxFooter = function TitleBoxFooter(props) {
35
37
  var hasIconOverlap = props.hasIconOverlap;
36
- return (
38
+ return jsx("div", {
39
+ id: "titleBoxFooter",
40
+ "data-testid": "title-box-footer"
37
41
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
38
- jsx("div", {
39
- id: "titleBoxFooter",
40
- css: titleBoxFooterStyles({
41
- hasIconOverlap: hasIconOverlap
42
- })
43
- }, props.children)
44
- );
42
+ ,
43
+ css: titleBoxFooterStyles({
44
+ hasIconOverlap: hasIconOverlap
45
+ })
46
+ }, props.children);
45
47
  };
46
48
  export var TitleBoxIcon = function TitleBoxIcon(props) {
47
- return (
49
+ return jsx("div", {
50
+ id: "titleBoxIcon",
51
+ "data-testid": "title-box-icon"
48
52
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
49
- jsx("div", {
50
- id: "titleBoxIcon",
51
- css: titleBoxIconStyles
52
- }, props.children)
53
- );
53
+ ,
54
+ css: titleBoxIconStyles
55
+ }, props.children);
54
56
  };
55
57
  export var ErrorMessageWrapper = function ErrorMessageWrapper(props) {
56
58
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/inherits";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  /**
9
9
  * @jsxRuntime classic
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
8
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
8
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  import { isPollingError as isMediaClientPollingError, isRateLimitedError as isMediaClientRateLimitedError } from '@atlaskit/media-client';
11
11
  import { MediaFileStateError } from '@atlaskit/media-client-react';
@@ -8,7 +8,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
10
  import _regeneratorRuntime from "@babel/runtime/regenerator";
11
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
12
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
13
  import React from 'react';
14
14
  import { MediaInlineCardLoadingView } from '@atlaskit/media-ui';
@@ -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: "78.2.2",
106
+ packageName: "78.2.4",
107
107
  componentName: 'mediaInlineCard',
108
108
  component: 'mediaInlineCard'
109
109
  };
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
8
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  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; }
11
11
  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; }
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
7
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, 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
9
  import React from 'react';
10
10
  import { Component } from 'react';
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/inherits";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import React from 'react';
9
9
  import { Component } from 'react';
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
7
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, 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
9
  /**
10
10
  * @jsxRuntime classic
@@ -1,4 +1,5 @@
1
1
  import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common/analytics';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
2
3
  var MEDIA_CARD_PERF_STATE_KEY = '__mediaCardPerfState_asflkajsdflja';
3
4
  var urlRegex = /https:\/\/(?:media\.(?:dev|staging|prod)\.atl-paas\.net|api\.media\.atlassian\.com|media-cdn(?:\.stg\.|\.)atlassian\.com)\/file\/([^/]+)\/image.*[?&]source=mediaCard/;
4
5
  var clientIdParamRegex = /[?&]clientId=([^&]+)/;
@@ -33,6 +34,9 @@ var createAndGetResourceObserver = function createAndGetResourceObserver() {
33
34
  fileId: fileId,
34
35
  mediaClientId: clientId,
35
36
  startedAt: entry.startTime - ((navigationTime === null || navigationTime === void 0 ? void 0 : navigationTime.domContentLoadedEventEnd) || 0),
37
+ featureFlags: {
38
+ "media-cdn-single-host": fg('platform.media-cdn-single-host')
39
+ },
36
40
  /**
37
41
  * Performance resource timing data regarding the loading of an
38
42
  * application's resources as described in
@@ -4,7 +4,7 @@ import _get from "@babel/runtime/helpers/get";
4
4
  import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
7
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, 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
9
  import { LRUMap } from 'lru_map';
10
10
  import { EventEmitter2 } from 'eventemitter2';
@@ -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.2.2";
11
+ var packageVersion = "78.2.4";
12
12
  var concurrentExperience;
13
13
  var getExperience = function getExperience(id) {
14
14
  if (!concurrentExperience) {