@atlaskit/media-test-helpers 33.0.35 → 33.0.36
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 +1461 -1466
- package/dist/cjs/docs-content-tabs.js +3 -0
- package/dist/cjs/featureFlagsWrapper/dropdown.js +42 -32
- package/dist/cjs/story-list.js +12 -6
- package/dist/cjs/story-styles.js +10 -1
- package/dist/cjs/styled.js +4 -1
- package/dist/es2019/docs-content-tabs.js +2 -0
- package/dist/es2019/featureFlagsWrapper/dropdown.js +38 -29
- package/dist/es2019/story-list.js +12 -6
- package/dist/es2019/story-styles.js +9 -1
- package/dist/es2019/styled.js +3 -1
- package/dist/esm/docs-content-tabs.js +2 -0
- package/dist/esm/featureFlagsWrapper/dropdown.js +41 -32
- package/dist/esm/story-list.js +12 -6
- package/dist/esm/story-styles.js +9 -1
- package/dist/esm/styled.js +3 -1
- package/dist/types/I18nWrapper.d.ts +1 -1
- package/dist/types/authProvider.d.ts +1 -1
- package/dist/types/docs-content-tabs.d.ts +1 -1
- package/dist/types/example-mediaFeatureFlags.d.ts +1 -1
- package/dist/types/exampleMediaItems.d.ts +1 -1
- package/dist/types/fakeMediaClient.d.ts +1 -1
- package/dist/types/featureFlagsWrapper/dropdown.d.ts +1 -1
- package/dist/types/featureFlagsWrapper/helpers.d.ts +1 -1
- package/dist/types/fileReader.d.ts +1 -1
- package/dist/types/fileStateFactory/factory/createFileState.d.ts +1 -1
- package/dist/types/fileStateFactory/factory/factory.d.ts +5 -5
- package/dist/types/fileStateFactory/factory/helpers.d.ts +1 -1
- package/dist/types/fileStateFactory/factory/index.d.ts +1 -1
- package/dist/types/fileStateFactory/fileSimulation/fileSimulation.d.ts +2 -2
- package/dist/types/fileStateFactory/fileSimulation/index.d.ts +1 -1
- package/dist/types/fileStateFactory/fileSimulation/simulations.d.ts +4 -11
- package/dist/types/fileStateFactory/index.d.ts +2 -2
- package/dist/types/index.d.ts +3 -3
- package/dist/types/mediaClientErrors.d.ts +1 -1
- package/dist/types/mediaClientProvider.d.ts +2 -2
- package/dist/types/mediaPickerAuthProvider.d.ts +1 -1
- package/dist/types/mockData/handlers/copyWithToken.d.ts +2 -2
- package/dist/types/mockData/handlers/getFile.d.ts +2 -2
- package/dist/types/mockData/handlers/getFileImage.d.ts +2 -2
- package/dist/types/mockData/handlers/tenantAuth.d.ts +2 -2
- package/dist/types/mockData/handlers/userCollectionFetch.d.ts +2 -2
- package/dist/types/mockData/index.d.ts +4 -4
- package/dist/types/mockData/matchers.d.ts +2 -2
- package/dist/types/mockData/staticCommon.d.ts +1 -1
- package/dist/types/mockData/utils.d.ts +2 -2
- package/dist/types/mocks/database/collection-item.d.ts +1 -1
- package/dist/types/mocks/database/index.d.ts +7 -7
- package/dist/types/mocks/database/upload.d.ts +2 -2
- package/dist/types/mocks/media-mock.d.ts +1 -1
- package/dist/types/mocks/routers/api-router.d.ts +1 -1
- package/dist/types/mocks/routers/media-playground-router.d.ts +1 -1
- package/dist/types/mocks/websockets/remote-upload-server.d.ts +3 -3
- package/dist/types/mountWithIntlContext.d.ts +3 -3
- package/dist/types/renderWithIntl.d.ts +1 -1
- package/dist/types/story-list.d.ts +1 -1
- package/dist/types/ufoLogger.d.ts +1 -1
- package/dist/types/utils/logging.d.ts +2 -2
- package/dist/types-ts4.5/I18nWrapper.d.ts +1 -1
- package/dist/types-ts4.5/authProvider.d.ts +1 -1
- package/dist/types-ts4.5/docs-content-tabs.d.ts +1 -1
- package/dist/types-ts4.5/example-mediaFeatureFlags.d.ts +1 -1
- package/dist/types-ts4.5/exampleMediaItems.d.ts +1 -1
- package/dist/types-ts4.5/fakeMediaClient.d.ts +1 -1
- package/dist/types-ts4.5/featureFlagsWrapper/dropdown.d.ts +1 -1
- package/dist/types-ts4.5/featureFlagsWrapper/helpers.d.ts +1 -1
- package/dist/types-ts4.5/fileReader.d.ts +1 -1
- package/dist/types-ts4.5/fileStateFactory/factory/createFileState.d.ts +1 -1
- package/dist/types-ts4.5/fileStateFactory/factory/factory.d.ts +5 -5
- package/dist/types-ts4.5/fileStateFactory/factory/helpers.d.ts +1 -1
- package/dist/types-ts4.5/fileStateFactory/factory/index.d.ts +1 -1
- package/dist/types-ts4.5/fileStateFactory/fileSimulation/fileSimulation.d.ts +2 -2
- package/dist/types-ts4.5/fileStateFactory/fileSimulation/index.d.ts +1 -1
- package/dist/types-ts4.5/fileStateFactory/fileSimulation/simulations.d.ts +1 -1
- package/dist/types-ts4.5/fileStateFactory/index.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +3 -3
- package/dist/types-ts4.5/mediaClientErrors.d.ts +1 -1
- package/dist/types-ts4.5/mediaClientProvider.d.ts +2 -2
- package/dist/types-ts4.5/mediaPickerAuthProvider.d.ts +1 -1
- package/dist/types-ts4.5/mockData/handlers/copyWithToken.d.ts +2 -2
- package/dist/types-ts4.5/mockData/handlers/getFile.d.ts +2 -2
- package/dist/types-ts4.5/mockData/handlers/getFileImage.d.ts +2 -2
- package/dist/types-ts4.5/mockData/handlers/tenantAuth.d.ts +2 -2
- package/dist/types-ts4.5/mockData/handlers/userCollectionFetch.d.ts +2 -2
- package/dist/types-ts4.5/mockData/index.d.ts +4 -4
- package/dist/types-ts4.5/mockData/matchers.d.ts +2 -2
- package/dist/types-ts4.5/mockData/staticCommon.d.ts +1 -1
- package/dist/types-ts4.5/mockData/utils.d.ts +2 -2
- package/dist/types-ts4.5/mocks/database/collection-item.d.ts +1 -1
- package/dist/types-ts4.5/mocks/database/index.d.ts +7 -7
- package/dist/types-ts4.5/mocks/database/upload.d.ts +2 -2
- package/dist/types-ts4.5/mocks/media-mock.d.ts +1 -1
- package/dist/types-ts4.5/mocks/routers/api-router.d.ts +1 -1
- package/dist/types-ts4.5/mocks/routers/media-playground-router.d.ts +1 -1
- package/dist/types-ts4.5/mocks/websockets/remote-upload-server.d.ts +3 -3
- package/dist/types-ts4.5/mountWithIntlContext.d.ts +3 -3
- package/dist/types-ts4.5/renderWithIntl.d.ts +1 -1
- package/dist/types-ts4.5/story-list.d.ts +1 -1
- package/dist/types-ts4.5/ufoLogger.d.ts +1 -1
- package/dist/types-ts4.5/utils/logging.d.ts +2 -2
- package/package.json +89 -91
- package/report.api.md +445 -498
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
1
|
+
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
2
2
|
export declare const setLocalFeatureFlag: (key: keyof MediaFeatureFlags, value: number | boolean | string | Object) => void;
|
|
3
3
|
export declare const clearLocalFeatureFlag: (key: keyof MediaFeatureFlags) => void;
|
|
4
4
|
export declare const clearAllLocalFeatureFlags: () => void;
|
|
@@ -16,4 +16,4 @@ declare class MockFileReaderWithError extends MockFileReader {
|
|
|
16
16
|
declare const mockFileReader: (result: string | null | ArrayBuffer) => MockFileReader;
|
|
17
17
|
declare const mockFileReaderWithError: () => MockFileReaderWithError;
|
|
18
18
|
declare const unmockFileReader: () => any;
|
|
19
|
-
export { mockFileReader, mockFileReaderWithError, unmockFileReader, mockFileReaderError
|
|
19
|
+
export { mockFileReader, mockFileReaderWithError, unmockFileReader, mockFileReaderError };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FileIdentifier, FileState, MediaClient, FileDetails } from '@atlaskit/media-client';
|
|
2
|
-
import { ReplaySubject } from 'rxjs/ReplaySubject';
|
|
3
|
-
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
4
|
-
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
5
|
-
import { CreateFileStateOptions, FileStateStatus } from './createFileState';
|
|
1
|
+
import { type FileIdentifier, type FileState, MediaClient, type FileDetails } from '@atlaskit/media-client';
|
|
2
|
+
import { type ReplaySubject } from 'rxjs/ReplaySubject';
|
|
3
|
+
import { type MediaClientConfig } from '@atlaskit/media-core';
|
|
4
|
+
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
5
|
+
import { type CreateFileStateOptions, type FileStateStatus } from './createFileState';
|
|
6
6
|
export type MediaClientMockOptions = {
|
|
7
7
|
getImageDelay?: number;
|
|
8
8
|
hasPreview?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileIdentifier, FileDetails, MediaType } from '@atlaskit/media-client';
|
|
1
|
+
import { type FileIdentifier, type FileDetails, type MediaType } from '@atlaskit/media-client';
|
|
2
2
|
export declare const defaultFileDetails: Partial<FileDetails>;
|
|
3
3
|
export declare const createIdentifier: ({ collectionName, occurrenceKey, }?: {
|
|
4
4
|
occurrenceKey?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { FileStateFactory, MediaClientMock } from './factory';
|
|
2
2
|
export { createIdentifier, createFileDetails } from './helpers';
|
|
3
3
|
export { createFileState } from './createFileState';
|
|
4
|
-
export type { FileStateFactoryOptions, MediaClientMockOptions
|
|
4
|
+
export type { FileStateFactoryOptions, MediaClientMockOptions } from './factory';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MediaType, FileState, FileIdentifier } from '@atlaskit/media-client';
|
|
2
|
-
import { FileStateFactory, MediaClientMockOptions } from '../factory';
|
|
1
|
+
import { type MediaType, type FileState, type FileIdentifier } from '@atlaskit/media-client';
|
|
2
|
+
import { FileStateFactory, type MediaClientMockOptions } from '../factory';
|
|
3
3
|
export type SimulationSettings = {
|
|
4
4
|
mediaType?: MediaType;
|
|
5
5
|
mediaClientMockOptions?: MediaClientMockOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { Simulation, SimulationUtils, SimulationSettings
|
|
1
|
+
export type { Simulation, SimulationUtils, SimulationSettings } from './fileSimulation';
|
|
2
2
|
export { useRunSimulation } from './fileSimulation';
|
|
3
3
|
export { simulateProcessed, simulateProcessing, simulateImmediateFailProcessing, simulateUpload, simulateError, simulateErrorState, simulateManyProcessed, simulateEmptyDetails, simulateUpdateFileId, simulateAlwaysLoading, simulateAlwaysProcessing, } from './simulations';
|
|
4
4
|
export type { SimulationFactory, StandardSimulation } from './simulations';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Simulation } from './fileSimulation';
|
|
1
|
+
import { type Simulation } from './fileSimulation';
|
|
2
2
|
export type StandardSimulation = {
|
|
3
3
|
simulation: Simulation;
|
|
4
4
|
description: string;
|
|
@@ -9,26 +9,19 @@ export interface SimulationFactory<T extends any[] = []> {
|
|
|
9
9
|
/**
|
|
10
10
|
* Normal File Flow
|
|
11
11
|
*/
|
|
12
|
-
export declare const simulateProcessed: SimulationFactory<[
|
|
13
|
-
withRemotePreview?: boolean
|
|
14
|
-
]>;
|
|
12
|
+
export declare const simulateProcessed: SimulationFactory<[withRemotePreview?: boolean]>;
|
|
15
13
|
export declare const simulateProcessing: SimulationFactory<[
|
|
16
14
|
suceeded?: boolean,
|
|
17
15
|
withRemotePreview?: boolean
|
|
18
16
|
]>;
|
|
19
17
|
export declare const simulateImmediateFailProcessing: SimulationFactory;
|
|
20
|
-
export declare const simulateUpload: SimulationFactory<[
|
|
21
|
-
withLocalPreview?: boolean,
|
|
22
|
-
suceeded?: boolean
|
|
23
|
-
]>;
|
|
18
|
+
export declare const simulateUpload: SimulationFactory<[withLocalPreview?: boolean, suceeded?: boolean]>;
|
|
24
19
|
export declare const simulateErrorState: SimulationFactory;
|
|
25
20
|
export declare const simulateError: SimulationFactory;
|
|
26
21
|
/**
|
|
27
22
|
* Rare Cases
|
|
28
23
|
*/
|
|
29
|
-
export declare const simulateManyProcessed: SimulationFactory<[
|
|
30
|
-
withRemotePreview?: boolean
|
|
31
|
-
]>;
|
|
24
|
+
export declare const simulateManyProcessed: SimulationFactory<[withRemotePreview?: boolean]>;
|
|
32
25
|
export declare const simulateEmptyDetails: SimulationFactory;
|
|
33
26
|
export declare const simulateUpdateFileId: SimulationFactory;
|
|
34
27
|
export declare const simulateAlwaysLoading: SimulationFactory;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { FileStateFactory, MediaClientMock } from './factory';
|
|
2
2
|
export { createIdentifier, createFileDetails } from './factory';
|
|
3
3
|
export { createFileState } from './factory/createFileState';
|
|
4
|
-
export type { FileStateFactoryOptions, MediaClientMockOptions
|
|
5
|
-
export type { Simulation, SimulationUtils, SimulationSettings
|
|
4
|
+
export type { FileStateFactoryOptions, MediaClientMockOptions } from './factory/factory';
|
|
5
|
+
export type { Simulation, SimulationUtils, SimulationSettings } from './fileSimulation';
|
|
6
6
|
export { useRunSimulation } from './fileSimulation';
|
|
7
7
|
export { simulateProcessed, simulateProcessing, simulateImmediateFailProcessing, simulateUpload, simulateError, simulateErrorState, simulateManyProcessed, simulateEmptyDetails, simulateUpdateFileId, simulateAlwaysLoading, simulateAlwaysProcessing, } from './fileSimulation';
|
|
8
8
|
export type { SimulationFactory, StandardSimulation } from './fileSimulation';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { StoryBookAuthProvider } from './authProvider';
|
|
2
|
-
export { fakeMediaClient, getDefaultMediaClientConfig
|
|
2
|
+
export { fakeMediaClient, getDefaultMediaClientConfig } from './fakeMediaClient';
|
|
3
3
|
export { createStorybookMediaClient, createStorybookMediaClientConfig, createUploadMediaClient, createUploadMediaClientConfig, defaultBaseUrl, defaultParams, } from './mediaClientProvider';
|
|
4
4
|
export { StoryList } from './story-list';
|
|
5
5
|
export type { StoryListItem, StoryListProps } from './story-list';
|
|
@@ -16,7 +16,7 @@ export type { MouseEventProps } from './createMouseEvent';
|
|
|
16
16
|
export { createTouchEvent } from './createTouchEvent';
|
|
17
17
|
export type { TouchEventProps } from './createTouchEvent';
|
|
18
18
|
export declare const authProviderBaseURL = "https://media.dev.atl-paas.net";
|
|
19
|
-
export { mediaPickerAuthProvider, defaultMediaPickerAuthProvider
|
|
19
|
+
export { mediaPickerAuthProvider, defaultMediaPickerAuthProvider } from './mediaPickerAuthProvider';
|
|
20
20
|
export { generateFilesFromTestData, MediaMock, mediaMock, isMediaMockOptedIn, mediaMockQueryOptInFlag, } from './mocks/media-mock';
|
|
21
21
|
export type { MockCollections, MockFile, MockFileInputParams, MediaMockConfig, MediaMockControlsBackdoor, } from './mocks/media-mock';
|
|
22
22
|
export { awaitError } from './await-error';
|
|
@@ -37,7 +37,7 @@ export { getAuthFromContextProvider } from './getAuthFromContextProvider';
|
|
|
37
37
|
export { addGlobalEventEmitterListeners } from './globalEventEmitterListeners';
|
|
38
38
|
export { fakeImage } from './utils/mockData';
|
|
39
39
|
export { enableMediaUfoLogger } from './ufoLogger';
|
|
40
|
-
export { enableMockGlobalImage, disableMockGlobalImage
|
|
40
|
+
export { enableMockGlobalImage, disableMockGlobalImage } from './MockGlobalImage';
|
|
41
41
|
export { exampleMediaFeatureFlags } from './example-mediaFeatureFlags';
|
|
42
42
|
export { dataURItoBlob } from './mockData/utils';
|
|
43
43
|
export { mapDataUriToBlob } from './utils/index';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RequestError, RequestErrorMetadata, PollingError, MediaStoreError } from '@atlaskit/media-client';
|
|
1
|
+
import { RequestError, type RequestErrorMetadata, PollingError, MediaStoreError } from '@atlaskit/media-client';
|
|
2
2
|
export declare const createRateLimitedError: (metadata?: RequestErrorMetadata) => RequestError;
|
|
3
3
|
export declare const createPollingMaxAttemptsError: (attempts?: number) => PollingError;
|
|
4
4
|
export declare const createMediaStoreError: () => MediaStoreError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MediaClient } from '@atlaskit/media-client';
|
|
2
|
-
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
3
|
-
import { MediaEnv } from './mediaPickerAuthProvider';
|
|
2
|
+
import { type MediaClientConfig } from '@atlaskit/media-core';
|
|
3
|
+
import { type MediaEnv } from './mediaPickerAuthProvider';
|
|
4
4
|
export declare const defaultBaseUrl = "https://media.dev.atl-paas.net";
|
|
5
5
|
export declare const defaultParams: {
|
|
6
6
|
clientId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Auth, AuthContext } from '@atlaskit/media-core';
|
|
1
|
+
import { type Auth, type AuthContext } from '@atlaskit/media-core';
|
|
2
2
|
export type MediaEnv = 'dev' | 'staging';
|
|
3
3
|
export declare const mediaPickerAuthProvider: (authEnvironment?: string, env?: MediaEnv) => (context?: AuthContext) => Promise<Auth>;
|
|
4
4
|
export declare const defaultMediaPickerAuthProvider: () => () => Promise<Auth>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MockContext } from '..';
|
|
2
|
-
import { MockRequest, MockResponse } from 'xhr-mock';
|
|
1
|
+
import { type MockContext } from '..';
|
|
2
|
+
import { type MockRequest, type MockResponse } from 'xhr-mock';
|
|
3
3
|
export declare const copyWithToken: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MockContext } from '..';
|
|
2
|
-
import { MockRequest, MockResponse } from 'xhr-mock';
|
|
1
|
+
import { type MockContext } from '..';
|
|
2
|
+
import { type MockRequest, type MockResponse } from 'xhr-mock';
|
|
3
3
|
export declare const getFile: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MockContext } from '..';
|
|
2
|
-
import { MockRequest, MockResponse } from 'xhr-mock';
|
|
1
|
+
import { type MockContext } from '..';
|
|
2
|
+
import { type MockRequest, type MockResponse } from 'xhr-mock';
|
|
3
3
|
export declare const getFileImage: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MockContext } from '..';
|
|
2
|
-
import { MockRequest, MockResponse } from 'xhr-mock';
|
|
1
|
+
import { type MockContext } from '..';
|
|
2
|
+
import { type MockRequest, type MockResponse } from 'xhr-mock';
|
|
3
3
|
export declare const tenantAuth: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MockContext } from '..';
|
|
2
|
-
import { MockRequest, MockResponse } from 'xhr-mock';
|
|
1
|
+
import { type MockContext } from '..';
|
|
2
|
+
import { type MockRequest, type MockResponse } from 'xhr-mock';
|
|
3
3
|
export declare const userCollectionFetch: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { MockURL } from 'xhr-mock/lib/MockURL';
|
|
2
|
-
import { MockHeaders } from 'xhr-mock/lib/types';
|
|
3
|
-
import { ClientBasedAuth } from '@atlaskit/media-core';
|
|
1
|
+
import { type MockURL } from 'xhr-mock/lib/MockURL';
|
|
2
|
+
import { type MockHeaders } from 'xhr-mock/lib/types';
|
|
3
|
+
import { type ClientBasedAuth } from '@atlaskit/media-core';
|
|
4
4
|
export { exactMatch, exactMatchBody, exactMatchHeaders, exactMatchUrl, matchMethod, } from './matchers';
|
|
5
5
|
export { dataURItoBlob, fillInResponse } from './utils';
|
|
6
|
-
export { copyWithToken, getFile, getFileImage, userCollectionFetch
|
|
6
|
+
export { copyWithToken, getFile, getFileImage, userCollectionFetch } from './handlers';
|
|
7
7
|
export interface RequestData {
|
|
8
8
|
method?: string;
|
|
9
9
|
url?: MockURL;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MockRequest } from 'xhr-mock';
|
|
2
|
-
import { RequestData } from '.';
|
|
1
|
+
import { type MockRequest } from 'xhr-mock';
|
|
2
|
+
import { type RequestData } from '.';
|
|
3
3
|
export declare const matchMethod: (req: MockRequest, data: RequestData) => boolean;
|
|
4
4
|
export declare const exactMatchUrl: (req: MockRequest, data: RequestData) => boolean;
|
|
5
5
|
export declare const exactMatchHeaders: (req: MockRequest, data: RequestData) => boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InternalFile, MediaCollectionFile } from '.';
|
|
1
|
+
import { type InternalFile, type MediaCollectionFile } from '.';
|
|
2
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
3
|
export declare const files: Array<InternalFile>;
|
|
4
4
|
export declare const userCollection: Array<MediaCollectionFile>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MockResponse } from 'xhr-mock';
|
|
2
|
-
import { ResponseData } from '.';
|
|
1
|
+
import { type MockResponse } from 'xhr-mock';
|
|
2
|
+
import { type ResponseData } from '.';
|
|
3
3
|
export declare const dataURItoBlob: (dataURI: string) => Blob;
|
|
4
4
|
export declare const fillInResponse: (res: MockResponse, data: ResponseData) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MediaType, MediaItemDetails, MediaFileProcessingStatus } from '@atlaskit/media-client';
|
|
1
|
+
import { type MediaType, type MediaItemDetails, type MediaFileProcessingStatus } from '@atlaskit/media-client';
|
|
2
2
|
export type MediaItemMinimalDetails = {
|
|
3
3
|
readonly name: string;
|
|
4
4
|
readonly size: number;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Database } from 'kakapo';
|
|
2
|
-
import { ClientBasedAuth } from '@atlaskit/media-core';
|
|
3
|
-
import { MediaCollection } from './collection';
|
|
4
|
-
import { CollectionItem } from './collection-item';
|
|
5
|
-
import { Upload } from './upload';
|
|
6
|
-
import { Chunk } from './chunk';
|
|
7
|
-
import { MockCollections } from '../media-mock';
|
|
2
|
+
import { type ClientBasedAuth } from '@atlaskit/media-core';
|
|
3
|
+
import { type MediaCollection } from './collection';
|
|
4
|
+
import { type CollectionItem } from './collection-item';
|
|
5
|
+
import { type Upload } from './upload';
|
|
6
|
+
import { type Chunk } from './chunk';
|
|
7
|
+
import { type MockCollections } from '../media-mock';
|
|
8
8
|
export { createCollection } from './collection';
|
|
9
9
|
export { createCollectionItem, createEmptyCollectionItem, isMediaItemDetails, } from './collection-item';
|
|
10
|
-
export type { CollectionItem, CreateCollectionItemOptions
|
|
10
|
+
export type { CollectionItem, CreateCollectionItemOptions } from './collection-item';
|
|
11
11
|
export declare const tenantAuth: ClientBasedAuth;
|
|
12
12
|
export declare const userAuth: ClientBasedAuth;
|
|
13
13
|
export declare const userAuthProvider: () => Promise<ClientBasedAuth>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Database } from 'kakapo';
|
|
2
|
-
import { WebSocketServer } from './types';
|
|
3
|
-
import { MediaDatabaseSchema } from '../database';
|
|
1
|
+
import { type Database } from 'kakapo';
|
|
2
|
+
import { type WebSocketServer } from './types';
|
|
3
|
+
import { type MediaDatabaseSchema } from '../database';
|
|
4
4
|
export type RemoteUploadActivityServerParams = {
|
|
5
5
|
database: Database<MediaDatabaseSchema>;
|
|
6
6
|
isSlowServer?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
-
import { ReactWrapper, ShallowWrapper } from 'enzyme';
|
|
4
|
-
import { ReactElement } from 'react';
|
|
2
|
+
import { type WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import { type ReactWrapper, type ShallowWrapper } from 'enzyme';
|
|
4
|
+
import { type ReactElement } from 'react';
|
|
5
5
|
export declare const mountWithIntlContext: <P, S, C extends React.Component<P, S, any> = React.Component<P, S, any>>(node: ReactElement<P & WrappedComponentProps>, { context, childContextTypes, ...additionalOptions }?: {
|
|
6
6
|
context?: {} | undefined;
|
|
7
7
|
childContextTypes?: {} | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Database, KakapoResponse } from 'kakapo';
|
|
2
|
-
import { MediaDatabaseSchema } from '../mocks/database';
|
|
1
|
+
import { type Database, type KakapoResponse } from 'kakapo';
|
|
2
|
+
import { type MediaDatabaseSchema } from '../mocks/database';
|
|
3
3
|
export interface LogRequestParams {
|
|
4
4
|
path: string;
|
|
5
5
|
method: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
1
|
+
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
2
2
|
export declare const exampleMediaFeatureFlags: MediaFeatureFlags;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileIdentifier, FileDetails, ExternalImageIdentifier, MediaType } from '@atlaskit/media-client';
|
|
1
|
+
import { type FileIdentifier, type FileDetails, type ExternalImageIdentifier, type MediaType } from '@atlaskit/media-client';
|
|
2
2
|
export declare const genericFileId: FileIdentifier;
|
|
3
3
|
export declare const audioFileId: FileIdentifier;
|
|
4
4
|
export declare const audioNoCoverFileId: FileIdentifier;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
1
|
+
import { type MediaClientConfig } from '@atlaskit/media-core';
|
|
2
2
|
import { MediaClient } from '@atlaskit/media-client';
|
|
3
3
|
export declare const getDefaultMediaClientConfig: () => MediaClientConfig;
|
|
4
4
|
export declare const fakeMediaClient: (config?: MediaClientConfig) => MediaClient;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
export type MediaFeatureFlagsDropdownProps = {
|
|
3
3
|
onFlagChanged: () => void;
|
|
4
4
|
};
|
|
5
|
-
declare const MediaFeatureFlagsDropdown: ({ onFlagChanged
|
|
5
|
+
declare const MediaFeatureFlagsDropdown: ({ onFlagChanged }: MediaFeatureFlagsDropdownProps) => JSX.Element;
|
|
6
6
|
export default MediaFeatureFlagsDropdown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
1
|
+
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
2
2
|
export declare const setLocalFeatureFlag: (key: keyof MediaFeatureFlags, value: number | boolean | string | Object) => void;
|
|
3
3
|
export declare const clearLocalFeatureFlag: (key: keyof MediaFeatureFlags) => void;
|
|
4
4
|
export declare const clearAllLocalFeatureFlags: () => void;
|
|
@@ -16,4 +16,4 @@ declare class MockFileReaderWithError extends MockFileReader {
|
|
|
16
16
|
declare const mockFileReader: (result: string | null | ArrayBuffer) => MockFileReader;
|
|
17
17
|
declare const mockFileReaderWithError: () => MockFileReaderWithError;
|
|
18
18
|
declare const unmockFileReader: () => any;
|
|
19
|
-
export { mockFileReader, mockFileReaderWithError, unmockFileReader, mockFileReaderError
|
|
19
|
+
export { mockFileReader, mockFileReaderWithError, unmockFileReader, mockFileReaderError };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FileIdentifier, FileState, MediaClient, FileDetails } from '@atlaskit/media-client';
|
|
2
|
-
import { ReplaySubject } from 'rxjs/ReplaySubject';
|
|
3
|
-
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
4
|
-
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
5
|
-
import { CreateFileStateOptions, FileStateStatus } from './createFileState';
|
|
1
|
+
import { type FileIdentifier, type FileState, MediaClient, type FileDetails } from '@atlaskit/media-client';
|
|
2
|
+
import { type ReplaySubject } from 'rxjs/ReplaySubject';
|
|
3
|
+
import { type MediaClientConfig } from '@atlaskit/media-core';
|
|
4
|
+
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
5
|
+
import { type CreateFileStateOptions, type FileStateStatus } from './createFileState';
|
|
6
6
|
export type MediaClientMockOptions = {
|
|
7
7
|
getImageDelay?: number;
|
|
8
8
|
hasPreview?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileIdentifier, FileDetails, MediaType } from '@atlaskit/media-client';
|
|
1
|
+
import { type FileIdentifier, type FileDetails, type MediaType } from '@atlaskit/media-client';
|
|
2
2
|
export declare const defaultFileDetails: Partial<FileDetails>;
|
|
3
3
|
export declare const createIdentifier: ({ collectionName, occurrenceKey, }?: {
|
|
4
4
|
occurrenceKey?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { FileStateFactory, MediaClientMock } from './factory';
|
|
2
2
|
export { createIdentifier, createFileDetails } from './helpers';
|
|
3
3
|
export { createFileState } from './createFileState';
|
|
4
|
-
export type { FileStateFactoryOptions, MediaClientMockOptions
|
|
4
|
+
export type { FileStateFactoryOptions, MediaClientMockOptions } from './factory';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MediaType, FileState, FileIdentifier } from '@atlaskit/media-client';
|
|
2
|
-
import { FileStateFactory, MediaClientMockOptions } from '../factory';
|
|
1
|
+
import { type MediaType, type FileState, type FileIdentifier } from '@atlaskit/media-client';
|
|
2
|
+
import { FileStateFactory, type MediaClientMockOptions } from '../factory';
|
|
3
3
|
export type SimulationSettings = {
|
|
4
4
|
mediaType?: MediaType;
|
|
5
5
|
mediaClientMockOptions?: MediaClientMockOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { Simulation, SimulationUtils, SimulationSettings
|
|
1
|
+
export type { Simulation, SimulationUtils, SimulationSettings } from './fileSimulation';
|
|
2
2
|
export { useRunSimulation } from './fileSimulation';
|
|
3
3
|
export { simulateProcessed, simulateProcessing, simulateImmediateFailProcessing, simulateUpload, simulateError, simulateErrorState, simulateManyProcessed, simulateEmptyDetails, simulateUpdateFileId, simulateAlwaysLoading, simulateAlwaysProcessing, } from './simulations';
|
|
4
4
|
export type { SimulationFactory, StandardSimulation } from './simulations';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { FileStateFactory, MediaClientMock } from './factory';
|
|
2
2
|
export { createIdentifier, createFileDetails } from './factory';
|
|
3
3
|
export { createFileState } from './factory/createFileState';
|
|
4
|
-
export type { FileStateFactoryOptions, MediaClientMockOptions
|
|
5
|
-
export type { Simulation, SimulationUtils, SimulationSettings
|
|
4
|
+
export type { FileStateFactoryOptions, MediaClientMockOptions } from './factory/factory';
|
|
5
|
+
export type { Simulation, SimulationUtils, SimulationSettings } from './fileSimulation';
|
|
6
6
|
export { useRunSimulation } from './fileSimulation';
|
|
7
7
|
export { simulateProcessed, simulateProcessing, simulateImmediateFailProcessing, simulateUpload, simulateError, simulateErrorState, simulateManyProcessed, simulateEmptyDetails, simulateUpdateFileId, simulateAlwaysLoading, simulateAlwaysProcessing, } from './fileSimulation';
|
|
8
8
|
export type { SimulationFactory, StandardSimulation } from './fileSimulation';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { StoryBookAuthProvider } from './authProvider';
|
|
2
|
-
export { fakeMediaClient, getDefaultMediaClientConfig
|
|
2
|
+
export { fakeMediaClient, getDefaultMediaClientConfig } from './fakeMediaClient';
|
|
3
3
|
export { createStorybookMediaClient, createStorybookMediaClientConfig, createUploadMediaClient, createUploadMediaClientConfig, defaultBaseUrl, defaultParams, } from './mediaClientProvider';
|
|
4
4
|
export { StoryList } from './story-list';
|
|
5
5
|
export type { StoryListItem, StoryListProps } from './story-list';
|
|
@@ -16,7 +16,7 @@ export type { MouseEventProps } from './createMouseEvent';
|
|
|
16
16
|
export { createTouchEvent } from './createTouchEvent';
|
|
17
17
|
export type { TouchEventProps } from './createTouchEvent';
|
|
18
18
|
export declare const authProviderBaseURL = "https://media.dev.atl-paas.net";
|
|
19
|
-
export { mediaPickerAuthProvider, defaultMediaPickerAuthProvider
|
|
19
|
+
export { mediaPickerAuthProvider, defaultMediaPickerAuthProvider } from './mediaPickerAuthProvider';
|
|
20
20
|
export { generateFilesFromTestData, MediaMock, mediaMock, isMediaMockOptedIn, mediaMockQueryOptInFlag, } from './mocks/media-mock';
|
|
21
21
|
export type { MockCollections, MockFile, MockFileInputParams, MediaMockConfig, MediaMockControlsBackdoor, } from './mocks/media-mock';
|
|
22
22
|
export { awaitError } from './await-error';
|
|
@@ -37,7 +37,7 @@ export { getAuthFromContextProvider } from './getAuthFromContextProvider';
|
|
|
37
37
|
export { addGlobalEventEmitterListeners } from './globalEventEmitterListeners';
|
|
38
38
|
export { fakeImage } from './utils/mockData';
|
|
39
39
|
export { enableMediaUfoLogger } from './ufoLogger';
|
|
40
|
-
export { enableMockGlobalImage, disableMockGlobalImage
|
|
40
|
+
export { enableMockGlobalImage, disableMockGlobalImage } from './MockGlobalImage';
|
|
41
41
|
export { exampleMediaFeatureFlags } from './example-mediaFeatureFlags';
|
|
42
42
|
export { dataURItoBlob } from './mockData/utils';
|
|
43
43
|
export { mapDataUriToBlob } from './utils/index';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RequestError, RequestErrorMetadata, PollingError, MediaStoreError } from '@atlaskit/media-client';
|
|
1
|
+
import { RequestError, type RequestErrorMetadata, PollingError, MediaStoreError } from '@atlaskit/media-client';
|
|
2
2
|
export declare const createRateLimitedError: (metadata?: RequestErrorMetadata) => RequestError;
|
|
3
3
|
export declare const createPollingMaxAttemptsError: (attempts?: number) => PollingError;
|
|
4
4
|
export declare const createMediaStoreError: () => MediaStoreError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MediaClient } from '@atlaskit/media-client';
|
|
2
|
-
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
3
|
-
import { MediaEnv } from './mediaPickerAuthProvider';
|
|
2
|
+
import { type MediaClientConfig } from '@atlaskit/media-core';
|
|
3
|
+
import { type MediaEnv } from './mediaPickerAuthProvider';
|
|
4
4
|
export declare const defaultBaseUrl = "https://media.dev.atl-paas.net";
|
|
5
5
|
export declare const defaultParams: {
|
|
6
6
|
clientId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Auth, AuthContext } from '@atlaskit/media-core';
|
|
1
|
+
import { type Auth, type AuthContext } from '@atlaskit/media-core';
|
|
2
2
|
export type MediaEnv = 'dev' | 'staging';
|
|
3
3
|
export declare const mediaPickerAuthProvider: (authEnvironment?: string, env?: MediaEnv) => (context?: AuthContext) => Promise<Auth>;
|
|
4
4
|
export declare const defaultMediaPickerAuthProvider: () => () => Promise<Auth>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MockContext } from '..';
|
|
2
|
-
import { MockRequest, MockResponse } from 'xhr-mock';
|
|
1
|
+
import { type MockContext } from '..';
|
|
2
|
+
import { type MockRequest, type MockResponse } from 'xhr-mock';
|
|
3
3
|
export declare const copyWithToken: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MockContext } from '..';
|
|
2
|
-
import { MockRequest, MockResponse } from 'xhr-mock';
|
|
1
|
+
import { type MockContext } from '..';
|
|
2
|
+
import { type MockRequest, type MockResponse } from 'xhr-mock';
|
|
3
3
|
export declare const getFile: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MockContext } from '..';
|
|
2
|
-
import { MockRequest, MockResponse } from 'xhr-mock';
|
|
1
|
+
import { type MockContext } from '..';
|
|
2
|
+
import { type MockRequest, type MockResponse } from 'xhr-mock';
|
|
3
3
|
export declare const getFileImage: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MockContext } from '..';
|
|
2
|
-
import { MockRequest, MockResponse } from 'xhr-mock';
|
|
1
|
+
import { type MockContext } from '..';
|
|
2
|
+
import { type MockRequest, type MockResponse } from 'xhr-mock';
|
|
3
3
|
export declare const tenantAuth: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MockContext } from '..';
|
|
2
|
-
import { MockRequest, MockResponse } from 'xhr-mock';
|
|
1
|
+
import { type MockContext } from '..';
|
|
2
|
+
import { type MockRequest, type MockResponse } from 'xhr-mock';
|
|
3
3
|
export declare const userCollectionFetch: (context: () => MockContext) => (req: MockRequest, res: MockResponse) => MockResponse | undefined;
|