@atlaskit/media-common 6.0.0 → 7.0.0

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-common
2
2
 
3
+ ## 7.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`5dcaf51b269`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5dcaf51b269) - Removed memoryCacheLogging feature flag
8
+
3
9
  ## 6.0.0
4
10
 
5
11
  ### Major Changes
@@ -25,8 +25,7 @@ var areEqualFeatureFlags = function areEqualFeatureFlags(ffA, ffB) {
25
25
  mediaInline: ffA.mediaInline === ffB.mediaInline,
26
26
  folderUploads: ffA.folderUploads === ffB.folderUploads,
27
27
  observedWidth: ffA.observedWidth === ffB.observedWidth,
28
- timestampOnVideo: ffA.timestampOnVideo === ffB.timestampOnVideo,
29
- memoryCacheLogging: ffA.memoryCacheLogging === ffB.memoryCacheLogging
28
+ timestampOnVideo: ffA.timestampOnVideo === ffB.timestampOnVideo
30
29
  };
31
30
  return Object.values(results).every(function (result) {
32
31
  return result;
@@ -83,8 +82,7 @@ var defaultMediaFeatureFlags = {
83
82
  // TODO https://product-fabric.atlassian.net/browse/MEX-104
84
83
  folderUploads: false,
85
84
  observedWidth: false,
86
- timestampOnVideo: false,
87
- memoryCacheLogging: false
85
+ timestampOnVideo: false
88
86
  };
89
87
 
90
88
  /**
@@ -14,8 +14,7 @@ var productKeys = {
14
14
  folderUploads: 'confluence.frontend.media.picker.folder.uploads',
15
15
  //TODO fill the value after https://product-fabric.atlassian.net/browse/MEX-1593
16
16
  observedWidth: '',
17
- timestampOnVideo: 'confluence.frontend.media.timestamp.on.video',
18
- memoryCacheLogging: 'confluence-frontend-media-card-memory-cache-logging'
17
+ timestampOnVideo: 'confluence.frontend.media.timestamp.on.video'
19
18
  },
20
19
  jira: {
21
20
  captions: 'issue.details.editor.media.captions',
@@ -24,8 +23,7 @@ var productKeys = {
24
23
  folderUploads: 'issue.details.media-picker-folder-upload',
25
24
  //TODO fill the value after https://product-fabric.atlassian.net/browse/MEX-1593
26
25
  observedWidth: '',
27
- timestampOnVideo: 'issue.details.media-cards-timestamp-on-video',
28
- memoryCacheLogging: 'jira-frontend-media-card-memory-cache-logging'
26
+ timestampOnVideo: 'issue.details.media-cards-timestamp-on-video'
29
27
  }
30
28
  };
31
29
  var getProductKeys = function getProductKeys() {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "6.0.0",
3
+ "version": "7.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -14,8 +14,7 @@ export const areEqualFeatureFlags = (ffA, ffB) => {
14
14
  mediaInline: ffA.mediaInline === ffB.mediaInline,
15
15
  folderUploads: ffA.folderUploads === ffB.folderUploads,
16
16
  observedWidth: ffA.observedWidth === ffB.observedWidth,
17
- timestampOnVideo: ffA.timestampOnVideo === ffB.timestampOnVideo,
18
- memoryCacheLogging: ffA.memoryCacheLogging === ffB.memoryCacheLogging
17
+ timestampOnVideo: ffA.timestampOnVideo === ffB.timestampOnVideo
19
18
  };
20
19
  return Object.values(results).every(result => result);
21
20
  };
@@ -56,8 +55,7 @@ export const defaultMediaFeatureFlags = {
56
55
  // TODO https://product-fabric.atlassian.net/browse/MEX-104
57
56
  folderUploads: false,
58
57
  observedWidth: false,
59
- timestampOnVideo: false,
60
- memoryCacheLogging: false
58
+ timestampOnVideo: false
61
59
  };
62
60
 
63
61
  /**
@@ -8,8 +8,7 @@ const productKeys = {
8
8
  folderUploads: 'confluence.frontend.media.picker.folder.uploads',
9
9
  //TODO fill the value after https://product-fabric.atlassian.net/browse/MEX-1593
10
10
  observedWidth: '',
11
- timestampOnVideo: 'confluence.frontend.media.timestamp.on.video',
12
- memoryCacheLogging: 'confluence-frontend-media-card-memory-cache-logging'
11
+ timestampOnVideo: 'confluence.frontend.media.timestamp.on.video'
13
12
  },
14
13
  jira: {
15
14
  captions: 'issue.details.editor.media.captions',
@@ -18,8 +17,7 @@ const productKeys = {
18
17
  folderUploads: 'issue.details.media-picker-folder-upload',
19
18
  //TODO fill the value after https://product-fabric.atlassian.net/browse/MEX-1593
20
19
  observedWidth: '',
21
- timestampOnVideo: 'issue.details.media-cards-timestamp-on-video',
22
- memoryCacheLogging: 'jira-frontend-media-card-memory-cache-logging'
20
+ timestampOnVideo: 'issue.details.media-cards-timestamp-on-video'
23
21
  }
24
22
  };
25
23
  export const getProductKeys = () => productKeys;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "6.0.0",
3
+ "version": "7.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -16,8 +16,7 @@ export var areEqualFeatureFlags = function areEqualFeatureFlags(ffA, ffB) {
16
16
  mediaInline: ffA.mediaInline === ffB.mediaInline,
17
17
  folderUploads: ffA.folderUploads === ffB.folderUploads,
18
18
  observedWidth: ffA.observedWidth === ffB.observedWidth,
19
- timestampOnVideo: ffA.timestampOnVideo === ffB.timestampOnVideo,
20
- memoryCacheLogging: ffA.memoryCacheLogging === ffB.memoryCacheLogging
19
+ timestampOnVideo: ffA.timestampOnVideo === ffB.timestampOnVideo
21
20
  };
22
21
  return Object.values(results).every(function (result) {
23
22
  return result;
@@ -71,8 +70,7 @@ export var defaultMediaFeatureFlags = {
71
70
  // TODO https://product-fabric.atlassian.net/browse/MEX-104
72
71
  folderUploads: false,
73
72
  observedWidth: false,
74
- timestampOnVideo: false,
75
- memoryCacheLogging: false
73
+ timestampOnVideo: false
76
74
  };
77
75
 
78
76
  /**
@@ -8,8 +8,7 @@ var productKeys = {
8
8
  folderUploads: 'confluence.frontend.media.picker.folder.uploads',
9
9
  //TODO fill the value after https://product-fabric.atlassian.net/browse/MEX-1593
10
10
  observedWidth: '',
11
- timestampOnVideo: 'confluence.frontend.media.timestamp.on.video',
12
- memoryCacheLogging: 'confluence-frontend-media-card-memory-cache-logging'
11
+ timestampOnVideo: 'confluence.frontend.media.timestamp.on.video'
13
12
  },
14
13
  jira: {
15
14
  captions: 'issue.details.editor.media.captions',
@@ -18,8 +17,7 @@ var productKeys = {
18
17
  folderUploads: 'issue.details.media-picker-folder-upload',
19
18
  //TODO fill the value after https://product-fabric.atlassian.net/browse/MEX-1593
20
19
  observedWidth: '',
21
- timestampOnVideo: 'issue.details.media-cards-timestamp-on-video',
22
- memoryCacheLogging: 'jira-frontend-media-card-memory-cache-logging'
20
+ timestampOnVideo: 'issue.details.media-cards-timestamp-on-video'
23
21
  }
24
22
  };
25
23
  export var getProductKeys = function getProductKeys() {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "6.0.0",
3
+ "version": "7.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -4,7 +4,6 @@ export interface MediaFeatureFlags {
4
4
  folderUploads?: boolean;
5
5
  observedWidth?: boolean;
6
6
  timestampOnVideo?: boolean;
7
- memoryCacheLogging?: boolean;
8
7
  }
9
8
  export interface WithMediaFeatureFlags {
10
9
  featureFlags?: MediaFeatureFlags;
@@ -4,7 +4,6 @@ export interface MediaFeatureFlags {
4
4
  folderUploads?: boolean;
5
5
  observedWidth?: boolean;
6
6
  timestampOnVideo?: boolean;
7
- memoryCacheLogging?: boolean;
8
7
  }
9
8
  export interface WithMediaFeatureFlags {
10
9
  featureFlags?: MediaFeatureFlags;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "6.0.0",
3
+ "version": "7.0.0",
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
  "atlassian": {
34
34
  "team": "Media Experience",
35
35
  "inPublicMirror": true,
36
- "releaseModel": "scheduled",
36
+ "releaseModel": "continuous",
37
37
  "website": {
38
38
  "name": "Media Common"
39
39
  }
package/report.api.md CHANGED
@@ -155,8 +155,6 @@ export interface MediaFeatureFlags {
155
155
  // (undocumented)
156
156
  mediaInline?: boolean;
157
157
  // (undocumented)
158
- memoryCacheLogging?: boolean;
159
- // (undocumented)
160
158
  observedWidth?: boolean;
161
159
  // (undocumented)
162
160
  timestampOnVideo?: boolean;
@@ -0,0 +1,262 @@
1
+ ## API Report File for "@atlaskit/media-common"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { GasCorePayload } from '@atlaskit/analytics-gas-types';
8
+ import { default as React_2 } from 'react';
9
+
10
+ // @public (undocumented)
11
+ export const ANALYTICS_MEDIA_CHANNEL = "media";
12
+
13
+ // @public (undocumented)
14
+ export const areEqualFeatureFlags: (ffA?: MediaFeatureFlags, ffB?: MediaFeatureFlags) => boolean;
15
+
16
+ // @public (undocumented)
17
+ type BaseAttributes = {};
18
+
19
+ // @public (undocumented)
20
+ type BaseEventPayload<Attributes extends BaseAttributes> = Omit<GasCorePayload, 'attributes'> & {
21
+ attributes: Attributes;
22
+ };
23
+
24
+ // @public (undocumented)
25
+ export type ContextPublicAttributes = PackageAttributes;
26
+
27
+ // @public (undocumented)
28
+ export type ContextStaticProps = WithMediaFeatureFlags;
29
+
30
+ // @public (undocumented)
31
+ export const debounce: (func: Function, wait: number) => (...args: any[]) => void;
32
+
33
+ // @public
34
+ export const defaultMediaFeatureFlags: Required<MediaFeatureFlags>;
35
+
36
+ // @public (undocumented)
37
+ export const downloadUrl: (url: string, options?: DownloadUrlOptions) => void;
38
+
39
+ // @public (undocumented)
40
+ interface DownloadUrlOptions {
41
+ // (undocumented)
42
+ name?: string;
43
+ }
44
+
45
+ // @public (undocumented)
46
+ export type FailureAttributes = {
47
+ status: 'fail';
48
+ failReason: string;
49
+ error?: string;
50
+ errorDetail?: string;
51
+ };
52
+
53
+ // @public (undocumented)
54
+ export type FileAttributes = {
55
+ fileId: string;
56
+ fileSize?: number;
57
+ fileMediatype?: MediaType;
58
+ fileMimetype?: string;
59
+ fileSource?: string;
60
+ fileStatus?: FileStatus;
61
+ };
62
+
63
+ // @public (undocumented)
64
+ export type FileStatus = 'error' | 'failed-processing' | 'processed' | 'processing' | 'uploading';
65
+
66
+ // @public (undocumented)
67
+ export const filterFeatureFlagNames: (flags: RequiredMediaFeatureFlags) => Array<keyof MediaFeatureFlags>;
68
+
69
+ // @public
70
+ export const getFeatureFlagKeysAllProducts: () => Array<string>;
71
+
72
+ // @public
73
+ export function getMediaFeatureFlag<T = boolean>(flagName: keyof MediaFeatureFlags, featureFlags?: MediaFeatureFlags): T;
74
+
75
+ // @public (undocumented)
76
+ export const getMediaTypeFromMimeType: (mimeType: string) => MediaType;
77
+
78
+ // @public (undocumented)
79
+ export function getRandomHex(byte: number): string;
80
+
81
+ // @public (undocumented)
82
+ export const isAudioMimeTypeSupportedByServer: (mimeType: string) => boolean;
83
+
84
+ // @public (undocumented)
85
+ export const isDocumentMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
86
+
87
+ // @public (undocumented)
88
+ export const isDocumentMimeTypeSupportedByServer: (mimeType: string) => boolean;
89
+
90
+ // @public (undocumented)
91
+ export const isImageMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
92
+
93
+ // @public (undocumented)
94
+ export const isImageMimeTypeSupportedByServer: (mimeType: string) => boolean;
95
+
96
+ // @public (undocumented)
97
+ export const isMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
98
+
99
+ // @public (undocumented)
100
+ export const isMimeTypeSupportedByServer: (mimeType: string) => boolean;
101
+
102
+ // @public (undocumented)
103
+ export const isUndefined: (value: any) => boolean;
104
+
105
+ // @public (undocumented)
106
+ export const isUnknownMimeTypeSupportedByServer: (mimeType: string) => boolean;
107
+
108
+ // @public
109
+ export const isVideoMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
110
+
111
+ // @public (undocumented)
112
+ export const isVideoMimeTypeSupportedByServer: (mimeType: string) => boolean;
113
+
114
+ // @public (undocumented)
115
+ export const matches: (srcObj: Object) => (obj: Object) => boolean;
116
+
117
+ // @public (undocumented)
118
+ export interface MediaFeatureFlags {
119
+ // (undocumented)
120
+ captions?: boolean;
121
+ // (undocumented)
122
+ folderUploads?: boolean;
123
+ // (undocumented)
124
+ mediaInline?: boolean;
125
+ // (undocumented)
126
+ observedWidth?: boolean;
127
+ // (undocumented)
128
+ timestampOnVideo?: boolean;
129
+ }
130
+
131
+ // @public (undocumented)
132
+ export type MediaTraceContext = {
133
+ traceId: string;
134
+ spanId?: string;
135
+ };
136
+
137
+ // @public (undocumented)
138
+ export type MediaType = 'archive' | 'audio' | 'doc' | 'image' | 'unknown' | 'video';
139
+
140
+ // @public (undocumented)
141
+ export interface NumericalCardDimensions {
142
+ // (undocumented)
143
+ height: number;
144
+ // (undocumented)
145
+ width: number;
146
+ }
147
+
148
+ // @public (undocumented)
149
+ export const omitBy: (obj: Object, predicate: Function) => {
150
+ [k: string]: any;
151
+ };
152
+
153
+ // @public (undocumented)
154
+ export type OperationalAttributes = (BaseAttributes & WithFileAttributes & StatusAttributes & WithPerformanceAttributes & WithTraceContext) | (BaseAttributes & WithFileAttributes & StatusAttributes) | (BaseAttributes & WithFileAttributes) | BaseAttributes;
155
+
156
+ // @public (undocumented)
157
+ export type OperationalEventPayload<Attributes extends OperationalAttributes, Action extends string, ActionSubject extends string, ActionSubjectId extends string = string> = BaseEventPayload<Attributes> & {
158
+ eventType: 'operational';
159
+ action: Action;
160
+ actionSubject: ActionSubject;
161
+ actionSubjectId?: ActionSubjectId;
162
+ };
163
+
164
+ // @public (undocumented)
165
+ export type PackageAttributes = {
166
+ packageName: string;
167
+ packageVersion: string;
168
+ componentName: string;
169
+ component: string;
170
+ };
171
+
172
+ // @public (undocumented)
173
+ export type PerformanceAttributes = {
174
+ overall: {
175
+ durationSincePageStart: number;
176
+ durationSinceCommenced?: number;
177
+ };
178
+ };
179
+
180
+ // @public (undocumented)
181
+ export const pick: (obj?: Object, keys?: Array<String>) => {
182
+ [k: string]: any;
183
+ };
184
+
185
+ // @public (undocumented)
186
+ type RequiredMediaFeatureFlags = Record<keyof Required<MediaFeatureFlags>, boolean>;
187
+
188
+ // @public (undocumented)
189
+ export type ScreenAttributes = (BaseAttributes & WithFileAttributes) | BaseAttributes;
190
+
191
+ // @public (undocumented)
192
+ export type ScreenEventPayload<Attributes extends ScreenAttributes, ActionSubject extends string> = BaseEventPayload<Attributes> & {
193
+ eventType: 'screen';
194
+ actionSubject: ActionSubject;
195
+ name: ActionSubject;
196
+ };
197
+
198
+ // @public (undocumented)
199
+ export type SSR = 'client' | 'server';
200
+
201
+ // @public (undocumented)
202
+ type StatusAttributes = FailureAttributes | SuccessAttributes;
203
+
204
+ // @public (undocumented)
205
+ export type SuccessAttributes = {
206
+ status: 'success';
207
+ fileMediatype?: MediaType;
208
+ };
209
+
210
+ // @public (undocumented)
211
+ export type TrackAttributes = (BaseAttributes & WithFileAttributes) | BaseAttributes;
212
+
213
+ // @public (undocumented)
214
+ export type TrackEventPayload<Attributes extends TrackAttributes, Action extends string, ActionSubject extends string, ActionSubjectId extends string = string> = BaseEventPayload<Attributes> & {
215
+ eventType: 'track';
216
+ action: Action;
217
+ actionSubject: ActionSubject;
218
+ actionSubjectId?: ActionSubjectId;
219
+ };
220
+
221
+ // @public (undocumented)
222
+ export type UIAttributes = (BaseAttributes & WithFileAttributes) | BaseAttributes;
223
+
224
+ // @public (undocumented)
225
+ export type UIEventPayload<Attributes extends UIAttributes, Action extends string, ActionSubject extends string> = BaseEventPayload<Attributes> & {
226
+ eventType: 'ui';
227
+ action: Action;
228
+ actionSubject: ActionSubject;
229
+ actionSubjectId?: string;
230
+ };
231
+
232
+ // @public (undocumented)
233
+ export const useMemoizeFeatureFlags: (featureFlags?: MediaFeatureFlags) => MediaFeatureFlags | undefined;
234
+
235
+ // @public (undocumented)
236
+ export type WithFileAttributes = {
237
+ fileAttributes: FileAttributes;
238
+ };
239
+
240
+ // @public
241
+ export const withMediaAnalyticsContext: (contextPublicAttributes: ContextPublicAttributes) => <Props extends WithMediaFeatureFlags, Component extends React_2.ComponentType<Props>>(WrappedComponent: React_2.JSXElementConstructor<Props> & Component) => React_2.ForwardRefExoticComponent<React_2.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Props>> & React_2.RefAttributes<any>>;
242
+
243
+ // @public (undocumented)
244
+ export interface WithMediaFeatureFlags {
245
+ // (undocumented)
246
+ featureFlags?: MediaFeatureFlags;
247
+ }
248
+
249
+ // @public (undocumented)
250
+ export type WithPerformanceAttributes = {
251
+ performanceAttributes?: PerformanceAttributes;
252
+ };
253
+
254
+ // @public (undocumented)
255
+ export type WithTraceContext = {
256
+ traceContext?: MediaTraceContext;
257
+ metadataTraceContext?: MediaTraceContext;
258
+ };
259
+
260
+ // (No @packageDocumentation comment for this package)
261
+
262
+ ```