@atlaskit/media-client 22.0.3 → 22.0.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-client
2
2
 
3
+ ## 22.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4d139e63f12`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4d139e63f12) - [ux] As part of migrating from the classic card experience to the new card experience, media of type 'doc' displays a preview by default
8
+
3
9
  ## 22.0.3
4
10
 
5
11
  ### Patch Changes
@@ -4,18 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isPreviewableType = exports.DATA_UNIT = void 0;
7
- var _mediaCommon = require("@atlaskit/media-common");
8
7
  // Warning! You can't add new media file processing status!
9
8
  // See packages/media/media-core/src/__tests__/cache-backward-compatibility.spec.ts
10
9
 
11
10
  var isPreviewableType = function isPreviewableType(type, featureFlags) {
12
- // in classic experience, only audio/video/image are previewable
13
- var defaultPreviewableTypes = ['audio', 'video', 'image'];
14
-
15
- // in the new experience, docs are previewable too
16
- if ((0, _mediaCommon.getMediaFeatureFlag)('newCardExperience', featureFlags)) {
17
- return [].concat(defaultPreviewableTypes, ['doc']).indexOf(type) > -1;
18
- }
11
+ var defaultPreviewableTypes = ['audio', 'video', 'image', 'doc'];
19
12
  return defaultPreviewableTypes.indexOf(type) > -1;
20
13
  };
21
14
  exports.isPreviewableType = isPreviewableType;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-client",
3
- "version": "22.0.3",
3
+ "version": "22.0.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,15 +1,7 @@
1
- import { getMediaFeatureFlag } from '@atlaskit/media-common';
2
-
3
1
  // Warning! You can't add new media file processing status!
4
2
  // See packages/media/media-core/src/__tests__/cache-backward-compatibility.spec.ts
5
3
  export const isPreviewableType = (type, featureFlags) => {
6
- // in classic experience, only audio/video/image are previewable
7
- const defaultPreviewableTypes = ['audio', 'video', 'image'];
8
-
9
- // in the new experience, docs are previewable too
10
- if (getMediaFeatureFlag('newCardExperience', featureFlags)) {
11
- return [...defaultPreviewableTypes, 'doc'].indexOf(type) > -1;
12
- }
4
+ const defaultPreviewableTypes = ['audio', 'video', 'image', 'doc'];
13
5
  return defaultPreviewableTypes.indexOf(type) > -1;
14
6
  };
15
7
  export let DATA_UNIT = /*#__PURE__*/function (DATA_UNIT) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-client",
3
- "version": "22.0.3",
3
+ "version": "22.0.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,15 +1,7 @@
1
- import { getMediaFeatureFlag } from '@atlaskit/media-common';
2
-
3
1
  // Warning! You can't add new media file processing status!
4
2
  // See packages/media/media-core/src/__tests__/cache-backward-compatibility.spec.ts
5
3
  export var isPreviewableType = function isPreviewableType(type, featureFlags) {
6
- // in classic experience, only audio/video/image are previewable
7
- var defaultPreviewableTypes = ['audio', 'video', 'image'];
8
-
9
- // in the new experience, docs are previewable too
10
- if (getMediaFeatureFlag('newCardExperience', featureFlags)) {
11
- return [].concat(defaultPreviewableTypes, ['doc']).indexOf(type) > -1;
12
- }
4
+ var defaultPreviewableTypes = ['audio', 'video', 'image', 'doc'];
13
5
  return defaultPreviewableTypes.indexOf(type) > -1;
14
6
  };
15
7
  export var DATA_UNIT = /*#__PURE__*/function (DATA_UNIT) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-client",
3
- "version": "22.0.3",
3
+ "version": "22.0.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,4 @@
1
- import { MediaFeatureFlags, MediaTraceContext, MediaType } from '@atlaskit/media-common';
1
+ import { MediaTraceContext, MediaFeatureFlags, MediaType } from '@atlaskit/media-common';
2
2
  import type { MediaFileArtifacts } from './artifacts';
3
3
  export type MediaFileProcessingStatus = 'pending' | 'succeeded' | 'failed';
4
4
  export type { MediaType } from '@atlaskit/media-common';
@@ -1,4 +1,4 @@
1
- import { MediaFeatureFlags, MediaTraceContext, MediaType } from '@atlaskit/media-common';
1
+ import { MediaTraceContext, MediaFeatureFlags, MediaType } from '@atlaskit/media-common';
2
2
  import type { MediaFileArtifacts } from './artifacts';
3
3
  export type MediaFileProcessingStatus = 'pending' | 'succeeded' | 'failed';
4
4
  export type { MediaType } from '@atlaskit/media-common';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-client",
3
- "version": "22.0.3",
3
+ "version": "22.0.4",
4
4
  "description": "Media API Web Client Library",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/media-core": "^34.1.0",
62
62
  "@atlaskit/media-test-helpers": "^33.0.0",
63
63
  "@atlaskit/ssr": "*",
64
- "@atlaskit/tokens": "^1.4.0",
64
+ "@atlaskit/tokens": "^1.5.0",
65
65
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
66
66
  "@emotion/react": "^11.7.1",
67
67
  "@types/deep-equal": "^1.0.1",