@atlaskit/media-common 2.18.0 → 2.19.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,17 @@
1
1
  # @atlaskit/media-common
2
2
 
3
+ ## 2.19.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9a88e254997`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9a88e254997) - Recovered Media Feature Flag mediaUploadApiV2
8
+
9
+ ## 2.19.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`2b3859896cc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2b3859896cc) - Added new Feature Flag to control internal Media Client behaviour
14
+
3
15
  ## 2.18.0
4
16
 
5
17
  ### Minor Changes
@@ -35,7 +35,10 @@ var areEqualFeatureFlags = function areEqualFeatureFlags(ffA, ffB) {
35
35
  folderUploads: ffA.folderUploads === ffB.folderUploads,
36
36
  observedWidth: ffA.observedWidth === ffB.observedWidth,
37
37
  timestampOnVideo: ffA.timestampOnVideo === ffB.timestampOnVideo,
38
- memoryCacheLogging: ffA.memoryCacheLogging === ffB.memoryCacheLogging
38
+ // @ts-ignore
39
+ mediaUploadApiV2: ffA.mediaUploadApiV2 === ffB.mediaUploadApiV2,
40
+ memoryCacheLogging: ffA.memoryCacheLogging === ffB.memoryCacheLogging,
41
+ fetchFileStateAfterUpload: ffA.fetchFileStateAfterUpload === ffB.fetchFileStateAfterUpload
39
42
  };
40
43
  return Object.values(results).every(function (result) {
41
44
  return result;
@@ -106,7 +109,10 @@ var defaultMediaFeatureFlags = {
106
109
  folderUploads: false,
107
110
  observedWidth: false,
108
111
  timestampOnVideo: false,
109
- memoryCacheLogging: false
112
+ // @ts-ignore
113
+ mediaUploadApiV2: true,
114
+ memoryCacheLogging: false,
115
+ fetchFileStateAfterUpload: false
110
116
  };
111
117
  /**
112
118
  * Public accessor from components to fallback to defaults if flags not passed,
@@ -12,9 +12,11 @@ var productKeys = {
12
12
  folderUploads: 'confluence.frontend.media.picker.folder.uploads',
13
13
  //TODO fill the value after https://product-fabric.atlassian.net/browse/MEX-1593
14
14
  observedWidth: '',
15
- // TODO https://product-fabric.atlassian.net/browse/MEX-1620
16
- timestampOnVideo: '',
17
- memoryCacheLogging: 'confluence-frontend-media-card-memory-cache-logging'
15
+ timestampOnVideo: 'confluence.frontend.media.timestamp.on.video',
16
+ // @ts-ignore
17
+ mediaUploadApiV2: 'confluence.enable.media.upload.api.v2',
18
+ memoryCacheLogging: 'confluence-frontend-media-card-memory-cache-logging',
19
+ fetchFileStateAfterUpload: 'confluence-frontend-media-client-fetch-file-state-after-upload'
18
20
  },
19
21
  jira: {
20
22
  newCardExperience: 'issue.details.media-cards-new-experience',
@@ -24,9 +26,11 @@ var productKeys = {
24
26
  folderUploads: 'issue.details.media-picker-folder-upload',
25
27
  //TODO fill the value after https://product-fabric.atlassian.net/browse/MEX-1593
26
28
  observedWidth: '',
27
- // TODO https://product-fabric.atlassian.net/browse/MEX-1620
28
- timestampOnVideo: '',
29
- memoryCacheLogging: 'jira-frontend-media-card-memory-cache-logging'
29
+ timestampOnVideo: 'issue.details.media-cards-timestamp-on-video',
30
+ // @ts-ignore
31
+ mediaUploadApiV2: 'issue.details.enable-media-upload-api-version-2',
32
+ memoryCacheLogging: 'jira-frontend-media-card-memory-cache-logging',
33
+ fetchFileStateAfterUpload: 'jira-frontend-media-client-fetch-file-state-after-upload'
30
34
  }
31
35
  };
32
36
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "2.18.0",
3
+ "version": "2.19.1",
4
4
  "sideEffects": false
5
5
  }
@@ -18,7 +18,10 @@ export const areEqualFeatureFlags = (ffA, ffB) => {
18
18
  folderUploads: ffA.folderUploads === ffB.folderUploads,
19
19
  observedWidth: ffA.observedWidth === ffB.observedWidth,
20
20
  timestampOnVideo: ffA.timestampOnVideo === ffB.timestampOnVideo,
21
- memoryCacheLogging: ffA.memoryCacheLogging === ffB.memoryCacheLogging
21
+ // @ts-ignore
22
+ mediaUploadApiV2: ffA.mediaUploadApiV2 === ffB.mediaUploadApiV2,
23
+ memoryCacheLogging: ffA.memoryCacheLogging === ffB.memoryCacheLogging,
24
+ fetchFileStateAfterUpload: ffA.fetchFileStateAfterUpload === ffB.fetchFileStateAfterUpload
22
25
  };
23
26
  return Object.values(results).every(result => result);
24
27
  };
@@ -57,7 +60,10 @@ export const defaultMediaFeatureFlags = {
57
60
  folderUploads: false,
58
61
  observedWidth: false,
59
62
  timestampOnVideo: false,
60
- memoryCacheLogging: false
63
+ // @ts-ignore
64
+ mediaUploadApiV2: true,
65
+ memoryCacheLogging: false,
66
+ fetchFileStateAfterUpload: false
61
67
  };
62
68
  /**
63
69
  * Public accessor from components to fallback to defaults if flags not passed,
@@ -6,9 +6,11 @@ const productKeys = {
6
6
  folderUploads: 'confluence.frontend.media.picker.folder.uploads',
7
7
  //TODO fill the value after https://product-fabric.atlassian.net/browse/MEX-1593
8
8
  observedWidth: '',
9
- // TODO https://product-fabric.atlassian.net/browse/MEX-1620
10
- timestampOnVideo: '',
11
- memoryCacheLogging: 'confluence-frontend-media-card-memory-cache-logging'
9
+ timestampOnVideo: 'confluence.frontend.media.timestamp.on.video',
10
+ // @ts-ignore
11
+ mediaUploadApiV2: 'confluence.enable.media.upload.api.v2',
12
+ memoryCacheLogging: 'confluence-frontend-media-card-memory-cache-logging',
13
+ fetchFileStateAfterUpload: 'confluence-frontend-media-client-fetch-file-state-after-upload'
12
14
  },
13
15
  jira: {
14
16
  newCardExperience: 'issue.details.media-cards-new-experience',
@@ -18,9 +20,11 @@ const productKeys = {
18
20
  folderUploads: 'issue.details.media-picker-folder-upload',
19
21
  //TODO fill the value after https://product-fabric.atlassian.net/browse/MEX-1593
20
22
  observedWidth: '',
21
- // TODO https://product-fabric.atlassian.net/browse/MEX-1620
22
- timestampOnVideo: '',
23
- memoryCacheLogging: 'jira-frontend-media-card-memory-cache-logging'
23
+ timestampOnVideo: 'issue.details.media-cards-timestamp-on-video',
24
+ // @ts-ignore
25
+ mediaUploadApiV2: 'issue.details.enable-media-upload-api-version-2',
26
+ memoryCacheLogging: 'jira-frontend-media-card-memory-cache-logging',
27
+ fetchFileStateAfterUpload: 'jira-frontend-media-client-fetch-file-state-after-upload'
24
28
  }
25
29
  };
26
30
  export const getProductKeys = () => productKeys;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "2.18.0",
3
+ "version": "2.19.1",
4
4
  "sideEffects": false
5
5
  }
@@ -19,7 +19,10 @@ export var areEqualFeatureFlags = function areEqualFeatureFlags(ffA, ffB) {
19
19
  folderUploads: ffA.folderUploads === ffB.folderUploads,
20
20
  observedWidth: ffA.observedWidth === ffB.observedWidth,
21
21
  timestampOnVideo: ffA.timestampOnVideo === ffB.timestampOnVideo,
22
- memoryCacheLogging: ffA.memoryCacheLogging === ffB.memoryCacheLogging
22
+ // @ts-ignore
23
+ mediaUploadApiV2: ffA.mediaUploadApiV2 === ffB.mediaUploadApiV2,
24
+ memoryCacheLogging: ffA.memoryCacheLogging === ffB.memoryCacheLogging,
25
+ fetchFileStateAfterUpload: ffA.fetchFileStateAfterUpload === ffB.fetchFileStateAfterUpload
23
26
  };
24
27
  return Object.values(results).every(function (result) {
25
28
  return result;
@@ -79,7 +82,10 @@ export var defaultMediaFeatureFlags = {
79
82
  folderUploads: false,
80
83
  observedWidth: false,
81
84
  timestampOnVideo: false,
82
- memoryCacheLogging: false
85
+ // @ts-ignore
86
+ mediaUploadApiV2: true,
87
+ memoryCacheLogging: false,
88
+ fetchFileStateAfterUpload: false
83
89
  };
84
90
  /**
85
91
  * Public accessor from components to fallback to defaults if flags not passed,
@@ -6,9 +6,11 @@ var productKeys = {
6
6
  folderUploads: 'confluence.frontend.media.picker.folder.uploads',
7
7
  //TODO fill the value after https://product-fabric.atlassian.net/browse/MEX-1593
8
8
  observedWidth: '',
9
- // TODO https://product-fabric.atlassian.net/browse/MEX-1620
10
- timestampOnVideo: '',
11
- memoryCacheLogging: 'confluence-frontend-media-card-memory-cache-logging'
9
+ timestampOnVideo: 'confluence.frontend.media.timestamp.on.video',
10
+ // @ts-ignore
11
+ mediaUploadApiV2: 'confluence.enable.media.upload.api.v2',
12
+ memoryCacheLogging: 'confluence-frontend-media-card-memory-cache-logging',
13
+ fetchFileStateAfterUpload: 'confluence-frontend-media-client-fetch-file-state-after-upload'
12
14
  },
13
15
  jira: {
14
16
  newCardExperience: 'issue.details.media-cards-new-experience',
@@ -18,9 +20,11 @@ var productKeys = {
18
20
  folderUploads: 'issue.details.media-picker-folder-upload',
19
21
  //TODO fill the value after https://product-fabric.atlassian.net/browse/MEX-1593
20
22
  observedWidth: '',
21
- // TODO https://product-fabric.atlassian.net/browse/MEX-1620
22
- timestampOnVideo: '',
23
- memoryCacheLogging: 'jira-frontend-media-card-memory-cache-logging'
23
+ timestampOnVideo: 'issue.details.media-cards-timestamp-on-video',
24
+ // @ts-ignore
25
+ mediaUploadApiV2: 'issue.details.enable-media-upload-api-version-2',
26
+ memoryCacheLogging: 'jira-frontend-media-card-memory-cache-logging',
27
+ fetchFileStateAfterUpload: 'jira-frontend-media-client-fetch-file-state-after-upload'
24
28
  }
25
29
  };
26
30
  export var getProductKeys = function getProductKeys() {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "2.18.0",
3
+ "version": "2.19.1",
4
4
  "sideEffects": false
5
5
  }
@@ -6,6 +6,7 @@ export interface MediaFeatureFlags {
6
6
  observedWidth?: boolean;
7
7
  timestampOnVideo?: boolean;
8
8
  memoryCacheLogging?: boolean;
9
+ fetchFileStateAfterUpload?: boolean;
9
10
  }
10
11
  export interface WithMediaFeatureFlags {
11
12
  featureFlags?: MediaFeatureFlags;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "2.18.0",
3
+ "version": "2.19.1",
4
4
  "description": "Includes common utilities used by other media packages",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,7 +33,7 @@
33
33
  "scripts": {},
34
34
  "dependencies": {
35
35
  "@atlaskit/analytics-gas-types": "^5.0.5",
36
- "@atlaskit/analytics-namespaced-context": "^6.5.0",
36
+ "@atlaskit/analytics-namespaced-context": "^6.6.0",
37
37
  "@atlaskit/analytics-next": "^8.1.1",
38
38
  "@atlaskit/section-message": "^6.3.0",
39
39
  "@babel/runtime": "^7.0.0"
package/report.api.md CHANGED
@@ -8,6 +8,7 @@
8
8
  ### Table of contents
9
9
 
10
10
  - [Main Entry Types](#main-entry-types)
11
+ - [Peer Dependencies](#peer-dependencies)
11
12
 
12
13
  ### Main Entry Types
13
14
 
@@ -152,6 +153,8 @@ export interface MediaFeatureFlags {
152
153
  // (undocumented)
153
154
  captions?: boolean;
154
155
  // (undocumented)
156
+ fetchFileStateAfterUpload?: boolean;
157
+ // (undocumented)
155
158
  folderUploads?: boolean;
156
159
  // (undocumented)
157
160
  mediaInline?: boolean;
@@ -359,3 +362,16 @@ export type WithTraceContext = {
359
362
  ```
360
363
 
361
364
  <!--SECTION END: Main Entry Types-->
365
+
366
+ ### Peer Dependencies
367
+
368
+ <!--SECTION START: Peer Dependencies-->
369
+
370
+ ```json
371
+ {
372
+ "react": "^16.8.0",
373
+ "react-dom": "^16.8.0"
374
+ }
375
+ ```
376
+
377
+ <!--SECTION END: Peer Dependencies-->