@atlaskit/media-test-helpers 30.0.4 → 30.0.6

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.
Files changed (119) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/fakeI18n.js +7 -1
  3. package/dist/cjs/fakeMediaClient.js +6 -0
  4. package/dist/cjs/fileReader.js +3 -0
  5. package/dist/cjs/getJest.js +40 -0
  6. package/dist/cjs/index.js +0 -2
  7. package/dist/cjs/mockCanvas.js +6 -0
  8. package/dist/cjs/mockLoadImage.js +3 -0
  9. package/dist/cjs/story-list.js +6 -4
  10. package/dist/cjs/styled.js +3 -1
  11. package/dist/cjs/version.json +1 -1
  12. package/dist/es2019/fakeI18n.js +3 -1
  13. package/dist/es2019/fakeMediaClient.js +2 -0
  14. package/dist/es2019/fileReader.js +2 -0
  15. package/dist/es2019/getJest.js +26 -0
  16. package/dist/es2019/index.js +0 -1
  17. package/dist/es2019/mockCanvas.js +2 -0
  18. package/dist/es2019/mockLoadImage.js +2 -0
  19. package/dist/es2019/story-list.js +5 -4
  20. package/dist/es2019/styled.js +3 -2
  21. package/dist/es2019/version.json +1 -1
  22. package/dist/esm/fakeI18n.js +3 -1
  23. package/dist/esm/fakeMediaClient.js +2 -0
  24. package/dist/esm/fileReader.js +3 -0
  25. package/dist/esm/getJest.js +31 -0
  26. package/dist/esm/index.js +0 -1
  27. package/dist/esm/mockCanvas.js +2 -0
  28. package/dist/esm/mockLoadImage.js +2 -0
  29. package/dist/esm/story-list.js +5 -4
  30. package/dist/esm/styled.js +2 -1
  31. package/dist/esm/version.json +1 -1
  32. package/dist/types/fileReader.d.ts +4 -5
  33. package/dist/types/getJest.d.ts +16 -0
  34. package/dist/types/index.d.ts +0 -1
  35. package/dist/types/mockCanvas.d.ts +2 -2
  36. package/package.json +18 -19
  37. package/report.api.md +466 -244
  38. package/dist/cjs/jest_check.js +0 -23
  39. package/dist/es2019/jest_check.js +0 -20
  40. package/dist/esm/jest_check.js +0 -20
  41. package/dist/types/jest_check.d.ts +0 -1
  42. package/dist/types-ts4.0/I18nWrapper.d.ts +0 -9
  43. package/dist/types-ts4.0/MockGlobalImage.d.ts +0 -2
  44. package/dist/types-ts4.0/authProvider.d.ts +0 -6
  45. package/dist/types-ts4.0/await-error.d.ts +0 -1
  46. package/dist/types-ts4.0/clipboardEventMocks.d.ts +0 -119
  47. package/dist/types-ts4.0/collectionNames.d.ts +0 -5
  48. package/dist/types-ts4.0/createMouseEvent.d.ts +0 -8
  49. package/dist/types-ts4.0/createTouchEvent.d.ts +0 -4
  50. package/dist/types-ts4.0/dataURIs/smallImageURI.d.ts +0 -1
  51. package/dist/types-ts4.0/dataURIs/smallTransparentImageURI.d.ts +0 -1
  52. package/dist/types-ts4.0/dataURIs/tallImageURI.d.ts +0 -1
  53. package/dist/types-ts4.0/dataURIs/videoPreviewURI.d.ts +0 -1
  54. package/dist/types-ts4.0/dataURIs/videoURI.d.ts +0 -1
  55. package/dist/types-ts4.0/dataURIs/vr_test_small_image.d.ts +0 -1
  56. package/dist/types-ts4.0/dataURIs/wideImageURI.d.ts +0 -1
  57. package/dist/types-ts4.0/dataURIs/wideTransparentImageURI.d.ts +0 -1
  58. package/dist/types-ts4.0/example-mediaFeatureFlags.d.ts +0 -2
  59. package/dist/types-ts4.0/exampleMediaItems.d.ts +0 -53
  60. package/dist/types-ts4.0/fakeI18n.d.ts +0 -1
  61. package/dist/types-ts4.0/fakeMediaClient.d.ts +0 -4
  62. package/dist/types-ts4.0/featureFlagsWrapper/dropdown.d.ts +0 -8
  63. package/dist/types-ts4.0/featureFlagsWrapper/helpers.d.ts +0 -5
  64. package/dist/types-ts4.0/featureFlagsWrapper/index.d.ts +0 -7
  65. package/dist/types-ts4.0/fileReader.d.ts +0 -20
  66. package/dist/types-ts4.0/fileStateFactory/createFileState.d.ts +0 -10
  67. package/dist/types-ts4.0/fileStateFactory/factory.d.ts +0 -42
  68. package/dist/types-ts4.0/fileStateFactory/helpers.d.ts +0 -7
  69. package/dist/types-ts4.0/fileStateFactory/index.d.ts +0 -4
  70. package/dist/types-ts4.0/flushPromises.d.ts +0 -1
  71. package/dist/types-ts4.0/getAuthFromContextProvider.d.ts +0 -1
  72. package/dist/types-ts4.0/globalEventEmitterListeners.d.ts +0 -1
  73. package/dist/types-ts4.0/images.d.ts +0 -6
  74. package/dist/types-ts4.0/index.d.ts +0 -48
  75. package/dist/types-ts4.0/jestHelpers.d.ts +0 -13
  76. package/dist/types-ts4.0/jest_check.d.ts +0 -1
  77. package/dist/types-ts4.0/keyboardEventWithKeyCode.d.ts +0 -2
  78. package/dist/types-ts4.0/mediaClientErrors.d.ts +0 -4
  79. package/dist/types-ts4.0/mediaClientProvider.d.ts +0 -23
  80. package/dist/types-ts4.0/mediaPickerAuthProvider.d.ts +0 -4
  81. package/dist/types-ts4.0/mockCanvas.d.ts +0 -10
  82. package/dist/types-ts4.0/mockData/handlers/copyWithToken.d.ts +0 -3
  83. package/dist/types-ts4.0/mockData/handlers/getFile.d.ts +0 -3
  84. package/dist/types-ts4.0/mockData/handlers/getFileImage.d.ts +0 -3
  85. package/dist/types-ts4.0/mockData/handlers/index.d.ts +0 -5
  86. package/dist/types-ts4.0/mockData/handlers/tenantAuth.d.ts +0 -3
  87. package/dist/types-ts4.0/mockData/handlers/userCollectionFetch.d.ts +0 -3
  88. package/dist/types-ts4.0/mockData/index.d.ts +0 -50
  89. package/dist/types-ts4.0/mockData/matchers.d.ts +0 -7
  90. package/dist/types-ts4.0/mockData/staticCommon.d.ts +0 -4
  91. package/dist/types-ts4.0/mockData/utils.d.ts +0 -4
  92. package/dist/types-ts4.0/mockLoadImage.d.ts +0 -4
  93. package/dist/types-ts4.0/mocks/database/chunk.d.ts +0 -6
  94. package/dist/types-ts4.0/mocks/database/collection-item.d.ts +0 -17
  95. package/dist/types-ts4.0/mocks/database/collection.d.ts +0 -2
  96. package/dist/types-ts4.0/mocks/database/index.d.ts +0 -21
  97. package/dist/types-ts4.0/mocks/database/upload.d.ts +0 -6
  98. package/dist/types-ts4.0/mocks/fileAndDirectoriesUtils.d.ts +0 -23
  99. package/dist/types-ts4.0/mocks/media-mock.d.ts +0 -38
  100. package/dist/types-ts4.0/mocks/routers/api-router.d.ts +0 -3
  101. package/dist/types-ts4.0/mocks/routers/index.d.ts +0 -2
  102. package/dist/types-ts4.0/mocks/routers/media-playground-router.d.ts +0 -3
  103. package/dist/types-ts4.0/mocks/websockets/index.d.ts +0 -3
  104. package/dist/types-ts4.0/mocks/websockets/messages.d.ts +0 -34
  105. package/dist/types-ts4.0/mocks/websockets/remote-upload-server.d.ts +0 -14
  106. package/dist/types-ts4.0/mocks/websockets/types.d.ts +0 -4
  107. package/dist/types-ts4.0/mountWithIntlContext.d.ts +0 -12
  108. package/dist/types-ts4.0/nextTick.d.ts +0 -2
  109. package/dist/types-ts4.0/renderWithIntl.d.ts +0 -3
  110. package/dist/types-ts4.0/smart-card-state.d.ts +0 -2
  111. package/dist/types-ts4.0/story-list.d.ts +0 -12
  112. package/dist/types-ts4.0/story-styles.d.ts +0 -2
  113. package/dist/types-ts4.0/styled.d.ts +0 -2
  114. package/dist/types-ts4.0/timeoutPromise.d.ts +0 -1
  115. package/dist/types-ts4.0/ufoLogger.d.ts +0 -5
  116. package/dist/types-ts4.0/utils/index.d.ts +0 -2
  117. package/dist/types-ts4.0/utils/logging.d.ts +0 -23
  118. package/dist/types-ts4.0/utils/mockData.d.ts +0 -11
  119. package/dist/types-ts4.0/waitUntil.d.ts +0 -2
@@ -1,4 +0,0 @@
1
- import { Auth, AuthContext } from '@atlaskit/media-core';
2
- export declare type MediaEnv = 'dev' | 'staging';
3
- export declare const mediaPickerAuthProvider: (authEnvironment?: string, env?: MediaEnv | undefined) => (context?: AuthContext | undefined) => Promise<Auth>;
4
- export declare const defaultMediaPickerAuthProvider: () => () => Promise<Auth>;
@@ -1,10 +0,0 @@
1
- /// <reference types="jest" />
2
- export declare function mockCanvas(width?: number, height?: number): {
3
- canvas: {
4
- width: number;
5
- height: number;
6
- toDataURL: jest.Mock<any, any>;
7
- getContext: jest.Mock<any, any>;
8
- };
9
- context: Partial<CanvasRenderingContext2D>;
10
- };
@@ -1,3 +0,0 @@
1
- import { MockContext } from '..';
2
- import { MockRequest, MockResponse } from 'xhr-mock';
3
- export declare const copyWithToken: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
@@ -1,3 +0,0 @@
1
- import { MockContext } from '..';
2
- import { MockRequest, MockResponse } from 'xhr-mock';
3
- export declare const getFile: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
@@ -1,3 +0,0 @@
1
- import { MockContext } from '..';
2
- import { MockRequest, MockResponse } from 'xhr-mock';
3
- export declare const getFileImage: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
@@ -1,5 +0,0 @@
1
- export { copyWithToken } from './copyWithToken';
2
- export { getFile } from './getFile';
3
- export { getFileImage } from './getFileImage';
4
- export {} from './tenantAuth';
5
- export { userCollectionFetch } from './userCollectionFetch';
@@ -1,3 +0,0 @@
1
- import { MockContext } from '..';
2
- import { MockRequest, MockResponse } from 'xhr-mock';
3
- export declare const tenantAuth: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
@@ -1,3 +0,0 @@
1
- import { MockContext } from '..';
2
- import { MockRequest, MockResponse } from 'xhr-mock';
3
- export declare const userCollectionFetch: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
@@ -1,50 +0,0 @@
1
- import { MockURL } from 'xhr-mock/lib/MockURL';
2
- import { MockHeaders } from 'xhr-mock/lib/types';
3
- import { ClientBasedAuth } from '@atlaskit/media-core';
4
- export { exactMatch, exactMatchBody, exactMatchHeaders, exactMatchUrl, matchMethod, } from './matchers';
5
- export { dataURItoBlob, fillInResponse } from './utils';
6
- export { copyWithToken, getFile, getFileImage, userCollectionFetch, } from './handlers';
7
- export interface RequestData {
8
- method?: string;
9
- url?: MockURL;
10
- headers?: MockHeaders;
11
- body?: any;
12
- }
13
- export interface ResponseData {
14
- status?: number;
15
- reason?: string;
16
- headers?: MockHeaders;
17
- body?: any;
18
- }
19
- export interface MockContextItem {
20
- auth: ClientBasedAuth;
21
- collection: Array<MediaCollectionFile>;
22
- collectionName: string;
23
- }
24
- export declare class MockContext {
25
- userContext: MockContextItem;
26
- tenantContext: MockContextItem;
27
- }
28
- export interface InternalFile {
29
- id: string;
30
- name: string;
31
- size: number;
32
- occurrenceKey: string;
33
- dataUri: string;
34
- }
35
- export interface MediaCollectionFile {
36
- id: string;
37
- occurrenceKey: string;
38
- type: string;
39
- details: {
40
- size: number;
41
- name: string;
42
- };
43
- author: {
44
- id: string;
45
- userName: string;
46
- displayName: string;
47
- active: boolean;
48
- };
49
- insertedAt: number;
50
- }
@@ -1,7 +0,0 @@
1
- import { MockRequest } from 'xhr-mock';
2
- import { RequestData } from '.';
3
- export declare const matchMethod: (req: MockRequest, data: RequestData) => boolean;
4
- export declare const exactMatchUrl: (req: MockRequest, data: RequestData) => boolean;
5
- export declare const exactMatchHeaders: (req: MockRequest, data: RequestData) => boolean;
6
- export declare const exactMatchBody: (req: MockRequest, data: RequestData) => boolean;
7
- export declare const exactMatch: (req: MockRequest, data: RequestData) => boolean;
@@ -1,4 +0,0 @@
1
- import { InternalFile, MediaCollectionFile } from '.';
2
- export declare const fileUri = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAsCAYAAAAXb/p7AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAB3RJTUUH4gMGFh4MMM+ZEwAABIJJREFUWMPN2FuM3VMUx/HPmU4702lnOtoStDFuVdek0UGnF0pvtCqMqrvwQL0oDxJJ40lISIoHIRJKNa5pDEEVkUi8IBpRCRppBKFBqduUVi/jYe3j/DsznTn//zkP3cnkzH9f1v7t776ttUvqlbo3wTQ8h/exUk/nnlrNNtRRXBPuwKlYhs6UfwgIjDQX3en/ibgFI2sVWS+BzUlQaybvEpxdq+HaBQahM3FBv5LxSfSoWijWg2AJl6J9kLKlOKcW4/UQOB7zDlJ2mBop1kPgKZgyRPnF6CpqvDaBlbNv7BC12gXFpiIUayVYwunpd6i0BDOLdFCrwFHoqKLeOAUp1iqwWRzK1aTFmJ23g3oQbKmybhtWoDkPxVoFNmBEjvqLMCdvB9Wn7k2Vv0j7kMdjKVMcXS3F6gVWDJYy37vRm2uQLMS51VbOO8Wz8JTKzbELP+W00SoHxeoEhqExWIUb8Tg6xfR+nVMgLBDuWZ0ERpqfMXoiHhD38GbszylwrKDYMhzF4QWGgbG41YFHytzUyafYkVNgecDn14vgQpw3SNsVwtXfXEDgmNR+zFAUhxYYDSuLemDqEJ7zRvQVEDnPQEc3N8FFhj4WLhMEvysgsMUwFA8uMBpUrqeDpyniPl5fQCCxDucfrHA4ghca/oIfKQivww8FBJYpjh2M4uACo+K4KuiV03QxxS8WEEicCAsGKxiK4EXi5qgmTRbTvAbfFxA4Whxjrf0pDhQYFdpVjpBqUhuOxBa8UEAgsUwWVktwsXyBTpNYEn1Yq9iObhYU27IUDxRYjB7h4YzU06lGirPFxhyS4FLMyGl4v3C9yv+vxbcFKa7AuDLFisDIqATa+dI/yvdxUPwKzyt2u8wSG3RQgkUffH7Btn5EnylIsSlLMStwQkF68Dl+/v+rQvHZghS7RCx9gMBFij309OFt/DtI/jp8U5DiTWhtzGT2iuOhJeeot+D1Abk9nXRv2opHxcvryCrtllK9bejLCtyAz8ROyiNwB7anaR2M7iN4NafA/SLW6c1GaIdkKiVxo4Rj+mdS367yILQ75ZX0dPZmBtQqgvY/MmQmJlu/iaOnEYen9r+m3zaxnPb263dP+m7DX6l8XHmTXIX3cKXwkp/Hu3gTK8W2vyszsDbhGKzHpJR3rZjKl3FvGuR96MEruCKJXYPTUpvrU7/L0/ec9H03TsL6BrEputPoluF33C920ga8hKNwTIbedJwhvJhyrLJcxMkP4i1xbC3HB1iNL5LNqanP5ky/l4s12o6jcbVwHk5uEA+QJ+Ax4R134KM0dV9iazKyL7NWl4ho7h1xNTbi6fR7pzjHtuNJ8S54O45PbcNWUOxI/U5NffeJ8OET3IzGBvEAPjlN0SRxHo5Ia7AhszuPEK/5x4pAZ1oaZVfqYC8exoe4IQ16q4if9+IalYemknAKJmX6Lbtau8TRNAkTGkVMsB5vJBpdicbOZBj+Fg7EQ3giTdXqtNhXiVeGs0QAVcJrqf1tOC7ZuSdthJ3CQZ0hPPCNCdJM/Cg25cdp3V73H5C3AqXr3FVlAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTAzLTA2VDIyOjMwOjEyLTA1OjAwkZ+D/QAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0wMy0wNlQyMjozMDoxMi0wNTowMODCO0EAAAAASUVORK5CYII=";
3
- export declare const files: Array<InternalFile>;
4
- export declare const userCollection: Array<MediaCollectionFile>;
@@ -1,4 +0,0 @@
1
- import { MockResponse } from 'xhr-mock';
2
- import { ResponseData } from '.';
3
- export declare const dataURItoBlob: (dataURI: string) => Blob;
4
- export declare const fillInResponse: (res: MockResponse, data: ResponseData) => void;
@@ -1,4 +0,0 @@
1
- export declare const loadImageMockSetup: () => void;
2
- export declare const mockLoadImage: (naturalWidth?: number, naturalHeight?: number, orientation?: number) => void;
3
- export declare const mockLoadImageError: (errorMessage?: string) => void;
4
- export declare const unMockLoadImage: () => void;
@@ -1,6 +0,0 @@
1
- export declare type ChunkId = string;
2
- export declare type Chunk = {
3
- readonly id: ChunkId;
4
- readonly blob: Blob;
5
- };
6
- export declare function createChunk(): Chunk;
@@ -1,17 +0,0 @@
1
- import { MediaType, MediaCollectionItem, MediaFileProcessingStatus } from '@atlaskit/media-client';
2
- export declare type CollectionItem = MediaCollectionItem & {
3
- readonly collectionName?: string;
4
- readonly blob?: Blob;
5
- };
6
- export declare type CreateCollectionItemOptions = {
7
- readonly name?: string;
8
- readonly mediaType?: MediaType;
9
- readonly mimeType?: string;
10
- readonly collectionName?: string;
11
- readonly occurrenceKey?: string;
12
- readonly blob?: Blob;
13
- readonly id?: string;
14
- readonly processingStatus?: MediaFileProcessingStatus;
15
- };
16
- export declare function createEmptyCollectionItem({ id, collectionName, occurrenceKey, }: CreateCollectionItemOptions): CollectionItem;
17
- export declare function createCollectionItem({ name, mediaType, mimeType, collectionName, occurrenceKey, blob, id, processingStatus, }?: CreateCollectionItemOptions): CollectionItem;
@@ -1,2 +0,0 @@
1
- import { MediaCollection } from '@atlaskit/media-client';
2
- export declare function createCollection(name?: string): MediaCollection;
@@ -1,21 +0,0 @@
1
- import { Database } from 'kakapo';
2
- import { ClientBasedAuth } from '@atlaskit/media-core';
3
- import { MediaCollection } from '@atlaskit/media-client';
4
- import { CollectionItem } from './collection-item';
5
- import { Upload } from './upload';
6
- import { Chunk } from './chunk';
7
- import { MockCollections } from '../media-mock';
8
- export { createCollection } from './collection';
9
- export { createCollectionItem, createEmptyCollectionItem, } from './collection-item';
10
- export type { CollectionItem, CreateCollectionItemOptions, } from './collection-item';
11
- export declare const tenantAuth: ClientBasedAuth;
12
- export declare const userAuth: ClientBasedAuth;
13
- export declare const userAuthProvider: () => Promise<ClientBasedAuth>;
14
- export declare const tenantAuthProvider: () => Promise<ClientBasedAuth>;
15
- export declare type MediaDatabaseSchema = {
16
- collection: MediaCollection;
17
- collectionItem: CollectionItem;
18
- upload: Upload;
19
- chunk: Chunk;
20
- };
21
- export declare function createDatabase(collections?: MockCollections): Database<MediaDatabaseSchema>;
@@ -1,6 +0,0 @@
1
- import { MediaUpload } from '@atlaskit/media-client';
2
- import { ChunkId } from './chunk';
3
- export declare type Upload = MediaUpload & {
4
- chunks: ChunkId[];
5
- };
6
- export declare function createUpload(): Upload;
@@ -1,23 +0,0 @@
1
- /**
2
- * Some utilities and types around this API -
3
- * https://developer.mozilla.org/en-US/docs/Web/API/File_and_Directory_Entries_API/Introduction
4
- */
5
- interface FileSystemEntry {
6
- isDirectory: boolean;
7
- isFile: boolean;
8
- name: string;
9
- fullPath: string;
10
- }
11
- interface FileSystemFileEntry extends FileSystemEntry {
12
- file: (resolve: (file: File) => void) => void;
13
- }
14
- interface FileSystemDirectoryEntry extends FileSystemEntry {
15
- createReader: () => FileSystemDirectoryReader;
16
- }
17
- interface FileSystemDirectoryReader {
18
- readEntries: (successCallback: (fileSystemEntries: FileSystemEntry[]) => void) => void;
19
- }
20
- export declare const createFileSystemFileEntry: (name: string, fullPath: string, imageFile: File) => FileSystemFileEntry;
21
- export declare const createFileSystemDirectoryEntry: (name: string, fullPath: string, fileEntries: FileSystemEntry[]) => FileSystemDirectoryEntry;
22
- export declare const createDropEventWithFiles: (fileSystemEntry: FileSystemEntry, files: File[]) => DragEvent;
23
- export {};
@@ -1,38 +0,0 @@
1
- import { MediaFile } from '@atlaskit/media-client';
2
- export declare type MockCollections = {
3
- [key: string]: Array<MediaFile & {
4
- blob?: Blob;
5
- }>;
6
- };
7
- export interface MediaMockConfig {
8
- isSlowServer?: boolean;
9
- urlsReturnErrorsTo?: string[];
10
- mockRemoteUploadActivity?: boolean;
11
- }
12
- export declare class MediaMock {
13
- readonly collections?: MockCollections | undefined;
14
- private server;
15
- private routers;
16
- private dbs;
17
- private websockets;
18
- constructor(collections?: MockCollections | undefined);
19
- enable(config?: MediaMockConfig): void;
20
- disable(): void;
21
- }
22
- export declare type MockFileInputParams = Partial<MediaFile> & {
23
- dataUri?: string;
24
- };
25
- export declare type MockFile = MediaFile & {
26
- blob?: Blob;
27
- };
28
- export declare function generateFilesFromTestData(files: MockFileInputParams[]): MockFile[];
29
- export declare const mediaMock: MediaMock;
30
- export interface MediaMockControlsBackdoor {
31
- resetMediaMock: (config?: MediaMockConfig) => void;
32
- shouldWaitUpload?: boolean;
33
- uploadImageFromDrag: () => void;
34
- uploadFolderFromDrag: () => void;
35
- uploadFolderContainingFolderFromDrag: () => void;
36
- }
37
- export declare const mediaMockQueryOptInFlag = "mediaMock=true";
38
- export declare const isMediaMockOptedIn: () => boolean;
@@ -1,3 +0,0 @@
1
- import { Router } from 'kakapo';
2
- import { MediaDatabaseSchema } from '../database';
3
- export declare function createApiRouter(isSlowServer?: boolean, urlsReturnErrorsTo?: string[]): Router<MediaDatabaseSchema>;
@@ -1,2 +0,0 @@
1
- export { createApiRouter } from './api-router';
2
- export { createMediaPlaygroundRouter } from './media-playground-router';
@@ -1,3 +0,0 @@
1
- import { Router } from 'kakapo';
2
- import { MediaDatabaseSchema } from '../database';
3
- export declare function createMediaPlaygroundRouter(): Router<MediaDatabaseSchema>;
@@ -1,3 +0,0 @@
1
- export type { WebSocketServer } from './types';
2
- export { RemoteUploadActivityServer } from './remote-upload-server';
3
- export type { RemoteUploadActivityServerParams } from './remote-upload-server';
@@ -1,34 +0,0 @@
1
- export declare const notifyMetadataPayload: (tenantFileId: string, fileSize: number) => {
2
- type: string;
3
- uploadId: string;
4
- metadata: {
5
- pending: boolean;
6
- preview: {
7
- url: string;
8
- width: number;
9
- height: number;
10
- size: number;
11
- };
12
- original: {
13
- url: string;
14
- width: number;
15
- height: number;
16
- size: number;
17
- };
18
- };
19
- };
20
- export declare const remoteUploadStartPayload: (tenantFileId: string) => {
21
- type: string;
22
- uploadId: string;
23
- };
24
- export declare const remoteUploadProgressPayload: (tenantFileId: string, fileSize: number) => {
25
- type: string;
26
- uploadId: string;
27
- currentAmount: number;
28
- totalAmount: number;
29
- };
30
- export declare const remoteUploadEndPayload: (tenantFileId: string, userFileId: string) => {
31
- type: string;
32
- uploadId: string;
33
- fileId: string;
34
- };
@@ -1,14 +0,0 @@
1
- import { Database } from 'kakapo';
2
- import { WebSocketServer } from './types';
3
- import { MediaDatabaseSchema } from '../database';
4
- export declare type RemoteUploadActivityServerParams = {
5
- database: Database<MediaDatabaseSchema>;
6
- isSlowServer?: boolean;
7
- };
8
- export declare class RemoteUploadActivityServer implements WebSocketServer {
9
- private wsServer;
10
- private msgSubscription;
11
- constructor(params: RemoteUploadActivityServerParams);
12
- start(): void;
13
- stop(): void;
14
- }
@@ -1,4 +0,0 @@
1
- export interface WebSocketServer {
2
- start: () => void;
3
- stop: () => void;
4
- }
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { WrappedComponentProps } from 'react-intl-next';
3
- import { ReactWrapper, ShallowWrapper } from 'enzyme';
4
- import { ReactElement } from 'react';
5
- export declare const mountWithIntlContext: <P, S, C extends React.Component<P, S, any> = React.Component<P, S, any>>(node: React.ReactElement<P & WrappedComponentProps<"intl">, string | React.JSXElementConstructor<any>>, { context, childContextTypes, ...additionalOptions }?: {
6
- context?: {} | undefined;
7
- childContextTypes?: {} | undefined;
8
- }) => ReactWrapper<P & WrappedComponentProps<"intl">, S, C>;
9
- export declare const shallowWithIntlContext: <P, S, C extends React.Component<P, S, any> = React.Component<P, S, any>>(node: React.ReactElement<P & WrappedComponentProps<"intl">, string | React.JSXElementConstructor<any>>, { context, ...additionalOptions }?: {
10
- context?: {} | undefined;
11
- }) => ShallowWrapper<P & WrappedComponentProps<"intl">, S, C>;
12
- export declare const mountWithIntlWrapper: (node: React.ReactElement) => ReactWrapper;
@@ -1,2 +0,0 @@
1
- export declare const nextTick: () => Promise<void>;
2
- export declare const sleep: (time?: number) => Promise<unknown>;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { RenderResult } from '@testing-library/react';
3
- export declare const renderWithIntl: (component: React.ReactNode) => RenderResult;
@@ -1,2 +0,0 @@
1
- export declare const url = "https://bitbucket.org/atlassian/incredible-monorepo/pull-requests/42";
2
- export declare const cardState: any;
@@ -1,12 +0,0 @@
1
- import { Component, ReactNode } from 'react';
2
- export declare type StoryListItem = {
3
- readonly title: string;
4
- readonly content: ReactNode;
5
- };
6
- export interface StoryListProps {
7
- readonly display?: 'row' | 'column';
8
- readonly children?: StoryListItem[];
9
- }
10
- export declare class StoryList extends Component<StoryListProps, {}> {
11
- render(): JSX.Element;
12
- }
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Matrix: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, Pick<import("react").ClassAttributes<HTMLTableElement> & import("react").TableHTMLAttributes<HTMLTableElement>, keyof import("react").TableHTMLAttributes<HTMLTableElement>>, object>;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const LocaleSelectorWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
@@ -1 +0,0 @@
1
- export declare function timeoutPromise(timeout: number, errorMessage: string): Promise<string>;
@@ -1,5 +0,0 @@
1
- import { CustomData } from '@atlaskit/ufo';
2
- export interface UfoPayloadPublisher {
3
- setup: (properties: any) => void;
4
- }
5
- export declare const enableMediaUfoLogger: (ufoPayloadPublisher: UfoPayloadPublisher, properties?: CustomData) => void;
@@ -1,2 +0,0 @@
1
- export declare function mapDataUriToBlob(dataUri: string): Blob;
2
- export declare function getWsUrl(baseUrl: string, path: string): string;
@@ -1,23 +0,0 @@
1
- import { Database, KakapoResponse } from 'kakapo';
2
- import { MediaDatabaseSchema } from '../mocks/database';
3
- export interface LogRequestParams {
4
- path: string;
5
- method: string;
6
- request: any;
7
- response: KakapoResponse;
8
- error?: any;
9
- database?: any;
10
- }
11
- export declare enum WsDirection {
12
- Upstream = "UP",
13
- Downstream = "DOWN"
14
- }
15
- export interface LogWsMessageParams {
16
- url: string;
17
- dir: WsDirection;
18
- type: string;
19
- payload?: any;
20
- database?: Database<MediaDatabaseSchema>;
21
- }
22
- export declare function logRequest(params: LogRequestParams): void;
23
- export declare function logWsMessage(params: LogWsMessageParams): void;
@@ -1,11 +0,0 @@
1
- export declare const getHackerNoun: () => string;
2
- export declare const imageFileTypes: string[];
3
- export declare const textFileTypes: string[];
4
- export declare const getTextFileType: () => string;
5
- export declare const getFakeFileName: (ext?: string) => string;
6
- export declare const getFakeFileSize: (maxSize?: number) => number;
7
- export declare const fakeImage = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIzMjAiIGhlaWdodD0iMjQwIj4gPHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0iZ3JleSIvPiAgPHRleHQgeD0iMCIgeT0iMjAiIGZvbnQtc2l6ZT0iMjAiIHRleHQtYW5jaG9yPSJzdGFydCIgZmlsbD0id2hpdGUiPjMyMHgyNDA8L3RleHQ+IDwvc3ZnPg==";
8
- export declare const getDateWithOffset: (offset: number) => Date;
9
- export declare const getPastDate: () => Date;
10
- export declare const getFutureDate: () => Date;
11
- export declare const mockDataUri: (width: string, height: string) => string;
@@ -1,2 +0,0 @@
1
- export declare function waitUntil(predicate: () => boolean, timeout?: number, maxRetries?: number): Promise<void>;
2
- export default waitUntil;