@atlaskit/media-common 4.1.0 → 4.1.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,11 @@
1
1
  # @atlaskit/media-common
2
2
 
3
+ ## 4.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
8
+
3
9
  ## 4.1.0
4
10
 
5
11
  ### Minor Changes
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/analytics/index.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/analytics/index.d.ts"
11
+ "../dist/types-ts4.5/analytics/index.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,17 +1,17 @@
1
1
  import { GasCorePayload } from '@atlaskit/analytics-gas-types';
2
2
  import { MEDIA_CONTEXT } from '@atlaskit/analytics-namespaced-context/MediaAnalyticsContext';
3
3
  import { MediaType, FileStatus, WithMediaFeatureFlags, MediaTraceContext } from '..';
4
- export declare type BaseAttributes = {};
5
- export declare type PackageAttributes = {
4
+ export type BaseAttributes = {};
5
+ export type PackageAttributes = {
6
6
  packageName: string;
7
7
  packageVersion: string;
8
8
  componentName: string;
9
9
  component: string;
10
10
  };
11
- export declare type BaseEventPayload<Attributes extends BaseAttributes> = Omit<GasCorePayload, 'attributes'> & {
11
+ export type BaseEventPayload<Attributes extends BaseAttributes> = Omit<GasCorePayload, 'attributes'> & {
12
12
  attributes: Attributes;
13
13
  };
14
- export declare type FileAttributes = {
14
+ export type FileAttributes = {
15
15
  fileId: string;
16
16
  fileSize?: number;
17
17
  fileMediatype?: MediaType;
@@ -19,63 +19,63 @@ export declare type FileAttributes = {
19
19
  fileSource?: string;
20
20
  fileStatus?: FileStatus;
21
21
  };
22
- export declare type PerformanceAttributes = {
22
+ export type PerformanceAttributes = {
23
23
  overall: {
24
24
  durationSincePageStart: number;
25
25
  durationSinceCommenced?: number;
26
26
  };
27
27
  };
28
- export declare type WithFileAttributes = {
28
+ export type WithFileAttributes = {
29
29
  fileAttributes: FileAttributes;
30
30
  };
31
- export declare type WithPerformanceAttributes = {
31
+ export type WithPerformanceAttributes = {
32
32
  performanceAttributes?: PerformanceAttributes;
33
33
  };
34
- export declare type WithTraceContext = {
34
+ export type WithTraceContext = {
35
35
  traceContext?: MediaTraceContext;
36
36
  metadataTraceContext?: MediaTraceContext;
37
37
  };
38
- export declare type SuccessAttributes = {
38
+ export type SuccessAttributes = {
39
39
  status: 'success';
40
40
  fileMediatype?: MediaType;
41
41
  };
42
- export declare type FailureAttributes = {
42
+ export type FailureAttributes = {
43
43
  status: 'fail';
44
44
  failReason: string;
45
45
  error?: string;
46
46
  errorDetail?: string;
47
47
  };
48
- export declare type StatusAttributes = SuccessAttributes | FailureAttributes;
49
- export declare type OperationalAttributes = BaseAttributes | (BaseAttributes & WithFileAttributes) | (BaseAttributes & WithFileAttributes & StatusAttributes) | (BaseAttributes & WithFileAttributes & StatusAttributes & WithPerformanceAttributes & WithTraceContext);
50
- export declare type OperationalEventPayload<Attributes extends OperationalAttributes, Action extends string, ActionSubject extends string, ActionSubjectId extends string = string> = BaseEventPayload<Attributes> & {
48
+ export type StatusAttributes = SuccessAttributes | FailureAttributes;
49
+ export type OperationalAttributes = BaseAttributes | (BaseAttributes & WithFileAttributes) | (BaseAttributes & WithFileAttributes & StatusAttributes) | (BaseAttributes & WithFileAttributes & StatusAttributes & WithPerformanceAttributes & WithTraceContext);
50
+ export type OperationalEventPayload<Attributes extends OperationalAttributes, Action extends string, ActionSubject extends string, ActionSubjectId extends string = string> = BaseEventPayload<Attributes> & {
51
51
  eventType: 'operational';
52
52
  action: Action;
53
53
  actionSubject: ActionSubject;
54
54
  actionSubjectId?: ActionSubjectId;
55
55
  };
56
- export declare type UIAttributes = BaseAttributes | (BaseAttributes & WithFileAttributes);
57
- export declare type UIEventPayload<Attributes extends UIAttributes, Action extends string, ActionSubject extends string> = BaseEventPayload<Attributes> & {
56
+ export type UIAttributes = BaseAttributes | (BaseAttributes & WithFileAttributes);
57
+ export type UIEventPayload<Attributes extends UIAttributes, Action extends string, ActionSubject extends string> = BaseEventPayload<Attributes> & {
58
58
  eventType: 'ui';
59
59
  action: Action;
60
60
  actionSubject: ActionSubject;
61
61
  actionSubjectId?: string;
62
62
  };
63
- export declare type ScreenAttributes = BaseAttributes | (BaseAttributes & WithFileAttributes);
64
- export declare type ScreenEventPayload<Attributes extends ScreenAttributes, ActionSubject extends string> = BaseEventPayload<Attributes> & {
63
+ export type ScreenAttributes = BaseAttributes | (BaseAttributes & WithFileAttributes);
64
+ export type ScreenEventPayload<Attributes extends ScreenAttributes, ActionSubject extends string> = BaseEventPayload<Attributes> & {
65
65
  eventType: 'screen';
66
66
  actionSubject: ActionSubject;
67
67
  name: ActionSubject;
68
68
  };
69
- export declare type TrackAttributes = BaseAttributes | (BaseAttributes & WithFileAttributes);
70
- export declare type TrackEventPayload<Attributes extends TrackAttributes, Action extends string, ActionSubject extends string, ActionSubjectId extends string = string> = BaseEventPayload<Attributes> & {
69
+ export type TrackAttributes = BaseAttributes | (BaseAttributes & WithFileAttributes);
70
+ export type TrackEventPayload<Attributes extends TrackAttributes, Action extends string, ActionSubject extends string, ActionSubjectId extends string = string> = BaseEventPayload<Attributes> & {
71
71
  eventType: 'track';
72
72
  action: Action;
73
73
  actionSubject: ActionSubject;
74
74
  actionSubjectId?: ActionSubjectId;
75
75
  };
76
- export declare type ContextPublicAttributes = PackageAttributes;
77
- export declare type ContextPrivateAttributes = WithMediaFeatureFlags;
78
- export declare type ContextStaticProps = WithMediaFeatureFlags;
79
- export declare type ContextData = ContextPublicAttributes & {
76
+ export type ContextPublicAttributes = PackageAttributes;
77
+ export type ContextPrivateAttributes = WithMediaFeatureFlags;
78
+ export type ContextStaticProps = WithMediaFeatureFlags;
79
+ export type ContextData = ContextPublicAttributes & {
80
80
  [MEDIA_CONTEXT]: ContextPrivateAttributes;
81
81
  };
@@ -1,4 +1,4 @@
1
1
  export interface DownloadUrlOptions {
2
2
  name?: string;
3
3
  }
4
- export declare const downloadUrl: (url: string, options?: DownloadUrlOptions | undefined) => void;
4
+ export declare const downloadUrl: (url: string, options?: DownloadUrlOptions) => void;
@@ -1,6 +1,6 @@
1
1
  export { downloadUrl } from './downloadUrl';
2
- export declare type MediaType = 'doc' | 'audio' | 'video' | 'image' | 'archive' | 'unknown';
3
- export declare type FileStatus = 'uploading' | 'processing' | 'processed' | 'error' | 'failed-processing';
2
+ export type MediaType = 'doc' | 'audio' | 'video' | 'image' | 'archive' | 'unknown';
3
+ export type FileStatus = 'uploading' | 'processing' | 'processed' | 'error' | 'failed-processing';
4
4
  export { getMediaFeatureFlag, defaultMediaFeatureFlags, areEqualFeatureFlags, useMemoizeFeatureFlags, filterFeatureFlagNames, getFeatureFlagKeysAllProducts, } from './mediaFeatureFlags';
5
5
  export type { MediaFeatureFlags, WithMediaFeatureFlags, } from './mediaFeatureFlags';
6
6
  export interface NumericalCardDimensions {
@@ -11,9 +11,9 @@ export type { PackageAttributes, WithFileAttributes, WithPerformanceAttributes,
11
11
  export { withMediaAnalyticsContext } from './analytics/withMediaAnalyticsContext';
12
12
  export { ANALYTICS_MEDIA_CHANNEL } from './analytics/constants';
13
13
  export { getMediaTypeFromMimeType, isImageMimeTypeSupportedByBrowser, isDocumentMimeTypeSupportedByBrowser, isVideoMimeTypeSupportedByBrowser, isMimeTypeSupportedByBrowser, isImageMimeTypeSupportedByServer, isDocumentMimeTypeSupportedByServer, isAudioMimeTypeSupportedByServer, isVideoMimeTypeSupportedByServer, isUnknownMimeTypeSupportedByServer, isMimeTypeSupportedByServer, } from './mediaTypeUtils';
14
- export declare type SSR = 'client' | 'server';
14
+ export type SSR = 'client' | 'server';
15
15
  export { isUndefined, pick, omitBy, debounce, matches, getRandomHex, } from './utils/helpers';
16
- export declare type MediaTraceContext = {
16
+ export type MediaTraceContext = {
17
17
  traceId: string;
18
18
  spanId?: string;
19
19
  };
@@ -1,5 +1,5 @@
1
1
  import { RequiredMediaFeatureFlags, MediaFeatureFlags } from './types';
2
- export declare const areEqualFeatureFlags: (ffA?: MediaFeatureFlags | undefined, ffB?: MediaFeatureFlags | undefined) => boolean;
2
+ export declare const areEqualFeatureFlags: (ffA?: MediaFeatureFlags, ffB?: MediaFeatureFlags) => boolean;
3
3
  export declare const filterFeatureFlagNames: (flags: RequiredMediaFeatureFlags) => Array<keyof MediaFeatureFlags>;
4
4
  /**
5
5
  * Takes a record of {Media Feature Flag Names → boolean}.
@@ -29,4 +29,4 @@ export declare const defaultMediaFeatureFlags: Required<MediaFeatureFlags>;
29
29
  * (you will see a warning in console if override used)
30
30
  * */
31
31
  export declare function getMediaFeatureFlag<T = boolean>(flagName: keyof MediaFeatureFlags, featureFlags?: MediaFeatureFlags): T;
32
- export declare const useMemoizeFeatureFlags: (featureFlags?: MediaFeatureFlags | undefined) => MediaFeatureFlags | undefined;
32
+ export declare const useMemoizeFeatureFlags: (featureFlags?: MediaFeatureFlags) => MediaFeatureFlags | undefined;
@@ -11,8 +11,8 @@ export interface MediaFeatureFlags {
11
11
  export interface WithMediaFeatureFlags {
12
12
  featureFlags?: MediaFeatureFlags;
13
13
  }
14
- export declare type RequiredMediaFeatureFlags = Record<keyof Required<MediaFeatureFlags>, boolean>;
15
- export declare type MediaFeatureFlagsMap = Record<keyof Required<MediaFeatureFlags>, string>;
14
+ export type RequiredMediaFeatureFlags = Record<keyof Required<MediaFeatureFlags>, boolean>;
15
+ export type MediaFeatureFlagsMap = Record<keyof Required<MediaFeatureFlags>, string>;
16
16
  export declare const supportedProducts: readonly ["confluence", "jira"];
17
- export declare type SupportedProduct = (typeof supportedProducts)[number];
18
- export declare type ProductKeys = Record<SupportedProduct, MediaFeatureFlagsMap>;
17
+ export type SupportedProduct = (typeof supportedProducts)[number];
18
+ export type ProductKeys = Record<SupportedProduct, MediaFeatureFlagsMap>;
@@ -1,5 +1,5 @@
1
1
  export declare const isUndefined: (value: any) => boolean;
2
- export declare const pick: (obj?: Object | undefined, keys?: Array<String>) => {
2
+ export declare const pick: (obj?: Object, keys?: Array<String>) => {
3
3
  [k: string]: any;
4
4
  };
5
5
  export declare const omitBy: (obj: Object, predicate: Function) => {
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/downloadUrl.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/downloadUrl.d.ts"
11
+ "../dist/types-ts4.5/downloadUrl.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/mediaFeatureFlags/index.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/mediaFeatureFlags/index.d.ts"
11
+ "../dist/types-ts4.5/mediaFeatureFlags/index.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/mediaTypeUtils/index.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/mediaTypeUtils/index.d.ts"
11
+ "../dist/types-ts4.5/mediaTypeUtils/index.d.ts"
12
12
  ]
13
13
  }
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "Includes common utilities used by other media packages",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,6 +12,14 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
15
23
  "sideEffects": false,
16
24
  "atlaskit:src": "src/index.ts",
17
25
  "af:exports": {
@@ -49,7 +57,7 @@
49
57
  "enzyme": "^3.10.0",
50
58
  "react": "^16.8.0",
51
59
  "react-dom": "^16.8.0",
52
- "typescript": "4.5.5"
60
+ "typescript": "~4.9.5"
53
61
  },
54
62
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
55
63
  }
File without changes