@atlaskit/media-card 78.14.2 → 78.15.1

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,24 @@
1
1
  # @atlaskit/media-card
2
2
 
3
+ ## 78.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 78.15.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#170821](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/170821)
14
+ [`52532d238c0b6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/52532d238c0b6) -
15
+ Enabled the deduplication of files in media-filmstrip by passing includeHashForDuplicateFiles flag
16
+ to /items
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 78.14.2
4
23
 
5
24
  ### 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.14.2";
24
+ var packageVersion = "78.15.1";
25
25
  var CardBase = exports.CardBase = function CardBase(_ref) {
26
26
  var identifier = _ref.identifier,
27
27
  otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
@@ -73,7 +73,8 @@ var FileCard = exports.FileCard = function FileCard(_ref) {
73
73
  onClick = _ref.onClick,
74
74
  onMouseEnter = _ref.onMouseEnter,
75
75
  videoControlsWrapperRef = _ref.videoControlsWrapperRef,
76
- viewerOptions = _ref.viewerOptions;
76
+ viewerOptions = _ref.viewerOptions,
77
+ includeHashForDuplicateFiles = _ref.includeHashForDuplicateFiles;
77
78
  var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
78
79
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
79
80
  //----------------------------------------------------------------//
@@ -105,7 +106,8 @@ var FileCard = exports.FileCard = function FileCard(_ref) {
105
106
  var _useFileState = (0, _mediaClientReact.useFileState)(identifier.id, {
106
107
  skipRemote: !isCardVisible,
107
108
  collectionName: identifier.collectionName,
108
- occurrenceKey: identifier.occurrenceKey
109
+ occurrenceKey: identifier.occurrenceKey,
110
+ includeHashForDuplicateFiles: includeHashForDuplicateFiles
109
111
  }),
110
112
  fileState = _useFileState.fileState;
111
113
  var prevFileState = (0, _usePrevious.usePrevious)(fileState && (0, _mediaClient.isErrorFileState)(fileState) ? undefined : fileState);
@@ -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 = "78.14.2";
93
+ var packageVersion = "78.15.1";
94
94
 
95
95
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
96
96
  var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
@@ -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: "78.14.2",
122
+ packageName: "78.15.1",
123
123
  componentName: 'mediaInlineCard',
124
124
  component: 'mediaInlineCard'
125
125
  };
@@ -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.14.2";
18
+ var packageVersion = "78.15.1";
19
19
  var concurrentExperience;
20
20
  var getExperience = function getExperience(id) {
21
21
  if (!concurrentExperience) {
@@ -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.14.2";
12
+ const packageVersion = "78.15.1";
13
13
  export const CardBase = ({
14
14
  identifier,
15
15
  ...otherProps
@@ -53,7 +53,8 @@ export const FileCard = ({
53
53
  onClick,
54
54
  onMouseEnter,
55
55
  videoControlsWrapperRef,
56
- viewerOptions
56
+ viewerOptions,
57
+ includeHashForDuplicateFiles
57
58
  }) => {
58
59
  const {
59
60
  createAnalyticsEvent
@@ -80,7 +81,8 @@ export const FileCard = ({
80
81
  } = useFileState(identifier.id, {
81
82
  skipRemote: !isCardVisible,
82
83
  collectionName: identifier.collectionName,
83
- occurrenceKey: identifier.occurrenceKey
84
+ occurrenceKey: identifier.occurrenceKey,
85
+ includeHashForDuplicateFiles
84
86
  });
85
87
  const prevFileState = usePrevious(fileState && isErrorFileState(fileState) ? undefined : fileState);
86
88
  const fileStateValue = useMemo(() => {
@@ -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.14.2";
69
+ const packageVersion = "78.15.1";
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({
@@ -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.14.2",
40
+ packageName: "78.15.1",
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.14.2";
8
+ const packageVersion = "78.15.1";
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 UFOLabel from '@atlaskit/react-ufo/label';
13
13
  var packageName = "@atlaskit/media-card";
14
- var packageVersion = "78.14.2";
14
+ var packageVersion = "78.15.1";
15
15
  export var CardBase = function CardBase(_ref) {
16
16
  var identifier = _ref.identifier,
17
17
  otherProps = _objectWithoutProperties(_ref, _excluded);
@@ -64,7 +64,8 @@ export var FileCard = function FileCard(_ref) {
64
64
  onClick = _ref.onClick,
65
65
  onMouseEnter = _ref.onMouseEnter,
66
66
  videoControlsWrapperRef = _ref.videoControlsWrapperRef,
67
- viewerOptions = _ref.viewerOptions;
67
+ viewerOptions = _ref.viewerOptions,
68
+ includeHashForDuplicateFiles = _ref.includeHashForDuplicateFiles;
68
69
  var _useAnalyticsEvents = useAnalyticsEvents(),
69
70
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
70
71
  //----------------------------------------------------------------//
@@ -96,7 +97,8 @@ export var FileCard = function FileCard(_ref) {
96
97
  var _useFileState = useFileState(identifier.id, {
97
98
  skipRemote: !isCardVisible,
98
99
  collectionName: identifier.collectionName,
99
- occurrenceKey: identifier.occurrenceKey
100
+ occurrenceKey: identifier.occurrenceKey,
101
+ includeHashForDuplicateFiles: includeHashForDuplicateFiles
100
102
  }),
101
103
  fileState = _useFileState.fileState;
102
104
  var prevFileState = usePrevious(fileState && isErrorFileState(fileState) ? undefined : fileState);
@@ -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.14.2";
86
+ var packageVersion = "78.15.1";
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({
@@ -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.14.2",
106
+ packageName: "78.15.1",
107
107
  componentName: 'mediaInlineCard',
108
108
  component: 'mediaInlineCard'
109
109
  };
@@ -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.14.2";
11
+ var packageVersion = "78.15.1";
12
12
  var concurrentExperience;
13
13
  var getExperience = function getExperience(id) {
14
14
  if (!concurrentExperience) {
@@ -50,5 +50,7 @@ export interface FileCardProps extends CardEventProps {
50
50
  readonly shouldHideTooltip?: boolean;
51
51
  /** Sets options for viewer **/
52
52
  readonly viewerOptions?: ViewerOptionsProps;
53
+ /** Sets options for viewer **/
54
+ readonly includeHashForDuplicateFiles?: boolean;
53
55
  }
54
- export declare const FileCard: ({ appearance, resizeMode, isLazy, disableOverlay, featureFlags, identifier, ssr, dimensions, originalDimensions, contextId, alt, actions, shouldEnableDownloadButton, useInlinePlayer, shouldOpenMediaViewer, onFullscreenChange, selectable, selected, testId, titleBoxBgColor, titleBoxIcon, shouldHideTooltip, mediaViewerItems, onClick, onMouseEnter, videoControlsWrapperRef, viewerOptions, }: FileCardProps) => JSX.Element;
56
+ export declare const FileCard: ({ appearance, resizeMode, isLazy, disableOverlay, featureFlags, identifier, ssr, dimensions, originalDimensions, contextId, alt, actions, shouldEnableDownloadButton, useInlinePlayer, shouldOpenMediaViewer, onFullscreenChange, selectable, selected, testId, titleBoxBgColor, titleBoxIcon, shouldHideTooltip, mediaViewerItems, onClick, onMouseEnter, videoControlsWrapperRef, viewerOptions, includeHashForDuplicateFiles, }: FileCardProps) => JSX.Element;
@@ -65,6 +65,8 @@ export interface SharedCardProps {
65
65
  readonly titleBoxBgColor?: string;
66
66
  readonly titleBoxIcon?: TitleBoxIcon;
67
67
  readonly viewerOptions?: ViewerOptionsProps;
68
+ /** Sets options for viewer **/
69
+ readonly includeHashForDuplicateFiles?: boolean;
68
70
  }
69
71
  export interface CardOnClickCallback {
70
72
  (result: CardEvent, analyticsEvent?: UIAnalyticsEvent): void;
@@ -50,5 +50,7 @@ export interface FileCardProps extends CardEventProps {
50
50
  readonly shouldHideTooltip?: boolean;
51
51
  /** Sets options for viewer **/
52
52
  readonly viewerOptions?: ViewerOptionsProps;
53
+ /** Sets options for viewer **/
54
+ readonly includeHashForDuplicateFiles?: boolean;
53
55
  }
54
- export declare const FileCard: ({ appearance, resizeMode, isLazy, disableOverlay, featureFlags, identifier, ssr, dimensions, originalDimensions, contextId, alt, actions, shouldEnableDownloadButton, useInlinePlayer, shouldOpenMediaViewer, onFullscreenChange, selectable, selected, testId, titleBoxBgColor, titleBoxIcon, shouldHideTooltip, mediaViewerItems, onClick, onMouseEnter, videoControlsWrapperRef, viewerOptions, }: FileCardProps) => JSX.Element;
56
+ export declare const FileCard: ({ appearance, resizeMode, isLazy, disableOverlay, featureFlags, identifier, ssr, dimensions, originalDimensions, contextId, alt, actions, shouldEnableDownloadButton, useInlinePlayer, shouldOpenMediaViewer, onFullscreenChange, selectable, selected, testId, titleBoxBgColor, titleBoxIcon, shouldHideTooltip, mediaViewerItems, onClick, onMouseEnter, videoControlsWrapperRef, viewerOptions, includeHashForDuplicateFiles, }: FileCardProps) => JSX.Element;
@@ -65,6 +65,8 @@ export interface SharedCardProps {
65
65
  readonly titleBoxBgColor?: string;
66
66
  readonly titleBoxIcon?: TitleBoxIcon;
67
67
  readonly viewerOptions?: ViewerOptionsProps;
68
+ /** Sets options for viewer **/
69
+ readonly includeHashForDuplicateFiles?: boolean;
68
70
  }
69
71
  export interface CardOnClickCallback {
70
72
  (result: CardEvent, analyticsEvent?: UIAnalyticsEvent): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "78.14.2",
3
+ "version": "78.15.1",
4
4
  "description": "Includes all media card related components, CardView, CardViewSmall, Card...",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -38,9 +38,9 @@
38
38
  "@atlaskit/analytics-next": "^10.1.0",
39
39
  "@atlaskit/dropdown-menu": "^12.23.0",
40
40
  "@atlaskit/editor-shared-styles": "^3.2.0",
41
- "@atlaskit/icon": "^22.27.0",
42
- "@atlaskit/media-client": "^28.3.0",
43
- "@atlaskit/media-client-react": "^2.3.0",
41
+ "@atlaskit/icon": "^23.0.0",
42
+ "@atlaskit/media-client": "^28.5.0",
43
+ "@atlaskit/media-client-react": "^2.4.0",
44
44
  "@atlaskit/media-common": "^11.7.0",
45
45
  "@atlaskit/media-file-preview": "^0.9.0",
46
46
  "@atlaskit/media-ui": "^27.0.0",
@@ -75,7 +75,7 @@
75
75
  "@atlaskit/inline-message": "^12.4.0",
76
76
  "@atlaskit/media-core": "^34.3.0",
77
77
  "@atlaskit/media-picker": "^67.0.0",
78
- "@atlaskit/media-state": "^1.1.0",
78
+ "@atlaskit/media-state": "^1.2.0",
79
79
  "@atlaskit/media-test-data": "^2.7.0",
80
80
  "@atlaskit/media-test-helpers": "^34.6.0",
81
81
  "@atlaskit/radio": "^6.6.0",