@atlaskit/media-viewer 53.2.5 → 54.1.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/AGENTS.md +62 -0
- package/CHANGELOG.md +38 -0
- package/classnames/package.json +1 -8
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/components/media-viewer.js +4 -2
- package/dist/cjs/download.js +2 -2
- package/dist/cjs/header.js +27 -2
- package/dist/cjs/list.js +4 -2
- package/dist/cjs/media-viewer.js +4 -2
- package/dist/cjs/utils/getObjectUrlFromFileState.js +15 -16
- package/dist/cjs/utils/index.js +16 -17
- package/dist/cjs/viewers/archiveSidebar/archive-sidebar-folder-entry.js +11 -11
- package/dist/cjs/viewers/archiveSidebar/archive-sidebar-renderer.js +12 -12
- package/dist/cjs/viewers/archiveSidebar/archive-sidebar.js +28 -28
- package/dist/cjs/viewers/archiveSidebar/archive.js +29 -29
- package/dist/cjs/viewers/archiveSidebar/archiveViewerLoader.js +12 -12
- package/dist/cjs/viewers/audio.js +37 -37
- package/dist/cjs/viewers/codeViewer/codeViewerRenderer-compiled.js +2 -2
- package/dist/cjs/viewers/codeViewer/index.js +35 -35
- package/dist/cjs/viewers/doc/doc-viewer.js +29 -27
- package/dist/cjs/viewers/doc/index.js +2 -2
- package/dist/cjs/viewers/image/index.js +43 -44
- package/dist/cjs/viewers/video.js +20 -20
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/components/media-viewer.js +4 -2
- package/dist/es2019/header.js +24 -2
- package/dist/es2019/list.js +4 -2
- package/dist/es2019/media-viewer.js +4 -2
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/components/media-viewer.js +4 -2
- package/dist/esm/download.js +2 -2
- package/dist/esm/header.js +27 -2
- package/dist/esm/list.js +4 -2
- package/dist/esm/media-viewer.js +4 -2
- package/dist/esm/utils/getObjectUrlFromFileState.js +15 -16
- package/dist/esm/utils/index.js +16 -17
- package/dist/esm/viewers/archiveSidebar/archive-sidebar-folder-entry.js +11 -11
- package/dist/esm/viewers/archiveSidebar/archive-sidebar-renderer.js +11 -11
- package/dist/esm/viewers/archiveSidebar/archive-sidebar.js +28 -28
- package/dist/esm/viewers/archiveSidebar/archive.js +29 -29
- package/dist/esm/viewers/archiveSidebar/archiveViewerLoader.js +11 -11
- package/dist/esm/viewers/audio.js +37 -37
- package/dist/esm/viewers/codeViewer/codeViewerRenderer-compiled.js +2 -2
- package/dist/esm/viewers/codeViewer/index.js +34 -34
- package/dist/esm/viewers/doc/doc-viewer.js +28 -26
- package/dist/esm/viewers/doc/index.js +2 -2
- package/dist/esm/viewers/image/index.js +43 -44
- package/dist/esm/viewers/video.js +20 -20
- package/dist/types/components/media-viewer.d.ts +1 -1
- package/dist/types/components/types.d.ts +1 -0
- package/dist/types/header.d.ts +2 -1
- package/dist/types/list.d.ts +2 -1
- package/dist/types/media-viewer.d.ts +1 -0
- package/media-viewer-loader/package.json +1 -8
- package/package.json +34 -42
- package/types/package.json +1 -8
- package/viewer-options/package.json +1 -8
- package/dist/types-ts4.5/analytics/events/index.d.ts +0 -17
- package/dist/types-ts4.5/analytics/events/operational/_mediaFile.d.ts +0 -3
- package/dist/types-ts4.5/analytics/events/operational/commenced.d.ts +0 -5
- package/dist/types-ts4.5/analytics/events/operational/download.d.ts +0 -9
- package/dist/types-ts4.5/analytics/events/operational/loadFailed.d.ts +0 -7
- package/dist/types-ts4.5/analytics/events/operational/loadSucceeded.d.ts +0 -11
- package/dist/types-ts4.5/analytics/events/operational/previewUnsupported.d.ts +0 -6
- package/dist/types-ts4.5/analytics/events/operational/zipEntryLoadFailed.d.ts +0 -13
- package/dist/types-ts4.5/analytics/events/operational/zipEntryLoadSucceeded.d.ts +0 -12
- package/dist/types-ts4.5/analytics/events/screen/modal.d.ts +0 -3
- package/dist/types-ts4.5/analytics/events/screen/passwordPdf.d.ts +0 -3
- package/dist/types-ts4.5/analytics/events/screen/pdfPasswordInput.d.ts +0 -3
- package/dist/types-ts4.5/analytics/events/ui/_clickedButton.d.ts +0 -2
- package/dist/types-ts4.5/analytics/events/ui/closed.d.ts +0 -8
- package/dist/types-ts4.5/analytics/events/ui/downloadButtonClicked.d.ts +0 -8
- package/dist/types-ts4.5/analytics/events/ui/failedPreviewDownloadButtonClicked.d.ts +0 -10
- package/dist/types-ts4.5/analytics/events/ui/navigated.d.ts +0 -12
- package/dist/types-ts4.5/analytics/events/ui/zoomInButtonClicked.d.ts +0 -8
- package/dist/types-ts4.5/analytics/events/ui/zoomOutButtonClicked.d.ts +0 -6
- package/dist/types-ts4.5/analytics/index.d.ts +0 -17
- package/dist/types-ts4.5/analytics/ufoExperiences.d.ts +0 -19
- package/dist/types-ts4.5/classnames.d.ts +0 -5
- package/dist/types-ts4.5/components/media-viewer-error-boundary.d.ts +0 -3
- package/dist/types-ts4.5/components/media-viewer-loader.d.ts +0 -3
- package/dist/types-ts4.5/components/media-viewer.d.ts +0 -5
- package/dist/types-ts4.5/components/portal.d.ts +0 -4
- package/dist/types-ts4.5/components/types.d.ts +0 -45
- package/dist/types-ts4.5/content.d.ts +0 -11
- package/dist/types-ts4.5/domain/index.d.ts +0 -1
- package/dist/types-ts4.5/domain/outcome.d.ts +0 -31
- package/dist/types-ts4.5/domain/zoomLevel.d.ts +0 -15
- package/dist/types-ts4.5/download.d.ts +0 -20
- package/dist/types-ts4.5/error-images.d.ts +0 -2
- package/dist/types-ts4.5/errorMessage.d.ts +0 -33
- package/dist/types-ts4.5/errors.d.ts +0 -23
- package/dist/types-ts4.5/header.d.ts +0 -19
- package/dist/types-ts4.5/index.d.ts +0 -3
- package/dist/types-ts4.5/item-viewer.d.ts +0 -32
- package/dist/types-ts4.5/list.d.ts +0 -24
- package/dist/types-ts4.5/loading.d.ts +0 -2
- package/dist/types-ts4.5/media-viewer.d.ts +0 -16
- package/dist/types-ts4.5/navigation.d.ts +0 -25
- package/dist/types-ts4.5/styleWrappers.d.ts +0 -122
- package/dist/types-ts4.5/styles.d.ts +0 -2
- package/dist/types-ts4.5/utils/closeOnDirectClick.d.ts +0 -2
- package/dist/types-ts4.5/utils/getIdentifierCollection.d.ts +0 -2
- package/dist/types-ts4.5/utils/getObjectUrlFromFileState.d.ts +0 -2
- package/dist/types-ts4.5/utils/index.d.ts +0 -10
- package/dist/types-ts4.5/utils/isIE.d.ts +0 -1
- package/dist/types-ts4.5/viewerOptions.d.ts +0 -20
- package/dist/types-ts4.5/viewers/archiveSidebar/archive-download-button.d.ts +0 -8
- package/dist/types-ts4.5/viewers/archiveSidebar/archive-sidebar-folder-entry.d.ts +0 -24
- package/dist/types-ts4.5/viewers/archiveSidebar/archive-sidebar-header.d.ts +0 -9
- package/dist/types-ts4.5/viewers/archiveSidebar/archive-sidebar-renderer.d.ts +0 -26
- package/dist/types-ts4.5/viewers/archiveSidebar/archive-sidebar.d.ts +0 -28
- package/dist/types-ts4.5/viewers/archiveSidebar/archive.d.ts +0 -37
- package/dist/types-ts4.5/viewers/archiveSidebar/archiveViewerLoader.d.ts +0 -12
- package/dist/types-ts4.5/viewers/archiveSidebar/consts.d.ts +0 -2
- package/dist/types-ts4.5/viewers/archiveSidebar/custom-button-item.d.ts +0 -2
- package/dist/types-ts4.5/viewers/archiveSidebar/nativePdfViewer.d.ts +0 -9
- package/dist/types-ts4.5/viewers/archiveSidebar/styleWrappers.d.ts +0 -30
- package/dist/types-ts4.5/viewers/archiveSidebar/styles.d.ts +0 -1
- package/dist/types-ts4.5/viewers/archiveSidebar/types.d.ts +0 -13
- package/dist/types-ts4.5/viewers/audio.d.ts +0 -33
- package/dist/types-ts4.5/viewers/base-viewer.d.ts +0 -32
- package/dist/types-ts4.5/viewers/codeViewer/CodeRendererAdvanced/CodeRendererAdvanced.d.ts +0 -11
- package/dist/types-ts4.5/viewers/codeViewer/CodeRendererAdvanced/theme.d.ts +0 -4
- package/dist/types-ts4.5/viewers/codeViewer/codeViewerRenderer-compiled.d.ts +0 -29
- package/dist/types-ts4.5/viewers/codeViewer/codeViewerRenderer.d.ts +0 -23
- package/dist/types-ts4.5/viewers/codeViewer/index.d.ts +0 -27
- package/dist/types-ts4.5/viewers/codeViewer/msg-parser.d.ts +0 -8
- package/dist/types-ts4.5/viewers/codeViewer/styles.d.ts +0 -4
- package/dist/types-ts4.5/viewers/codeViewer/util.d.ts +0 -4
- package/dist/types-ts4.5/viewers/customViewer/customViewer.d.ts +0 -13
- package/dist/types-ts4.5/viewers/doc/doc-viewer.d.ts +0 -13
- package/dist/types-ts4.5/viewers/doc/index.d.ts +0 -36
- package/dist/types-ts4.5/viewers/doc/passwordInput.d.ts +0 -10
- package/dist/types-ts4.5/viewers/image/index.d.ts +0 -35
- package/dist/types-ts4.5/viewers/image/interactive-img.d.ts +0 -42
- package/dist/types-ts4.5/viewers/modalSpinner.d.ts +0 -8
- package/dist/types-ts4.5/viewers/svg/ImageWrapper-compiled.d.ts +0 -7
- package/dist/types-ts4.5/viewers/svg/ImageWrapper.d.ts +0 -7
- package/dist/types-ts4.5/viewers/svg/errors.d.ts +0 -3
- package/dist/types-ts4.5/viewers/svg/index.d.ts +0 -14
- package/dist/types-ts4.5/viewers/svg/utils.d.ts +0 -5
- package/dist/types-ts4.5/viewers/video.d.ts +0 -32
- package/dist/types-ts4.5/zoomControls.d.ts +0 -15
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type MediaClientErrorReason, type RequestErrorMetadata } from '@atlaskit/media-client';
|
|
2
|
-
import { type ZipEntry } from 'unzipit';
|
|
3
|
-
export declare class MediaViewerError extends Error {
|
|
4
|
-
readonly primaryReason: MediaViewerErrorReason | ArchiveViewerErrorReason;
|
|
5
|
-
readonly secondaryError?: Error | undefined;
|
|
6
|
-
constructor(primaryReason: MediaViewerErrorReason | ArchiveViewerErrorReason, secondaryError?: Error | undefined);
|
|
7
|
-
}
|
|
8
|
-
export declare function isMediaViewerError(err: Error): err is MediaViewerError;
|
|
9
|
-
export declare class ArchiveViewerError extends MediaViewerError {
|
|
10
|
-
readonly primaryReason: ArchiveViewerErrorReason;
|
|
11
|
-
readonly secondaryError?: Error | undefined;
|
|
12
|
-
readonly zipEntry?: ZipEntry | undefined;
|
|
13
|
-
constructor(primaryReason: ArchiveViewerErrorReason, secondaryError?: Error | undefined, zipEntry?: ZipEntry | undefined);
|
|
14
|
-
}
|
|
15
|
-
export declare function isArchiveViewerError(err: Error): err is ArchiveViewerError;
|
|
16
|
-
export type MediaViewerErrorReason = 'collection-fetch-metadata' | 'header-fetch-metadata' | 'itemviewer-onerror' | 'itemviewer-fetch-metadata' | 'itemviewer-file-error-status' | 'itemviewer-file-failed-processing-status' | 'imageviewer-external-onerror' | 'imageviewer-fetch-url' | 'imageviewer-src-onerror' | 'audioviewer-fetch-url' | 'audioviewer-missing-artefact' | 'audioviewer-playback' | 'videoviewer-fetch-url' | 'videoviewer-missing-artefact' | 'videoviewer-playback' | 'docviewer-fetch-url' | 'docviewer-content-fetch-failed' | 'docviewer-fetch-pdf' | 'codeviewer-fetch-src' | 'codeviewer-load-src' | 'codeviewer-file-size-exceeds' | 'codeviewer-parse-email' | 'svg-img-error' | 'svg-binary-fetch' | 'svg-unknown-error' | 'svg-blob-to-datauri' | 'unsupported' | 'custom-viewer-error' | 'download';
|
|
17
|
-
export type ArchiveViewerErrorReason = 'archiveviewer-bundle-loader' | 'archiveviewer-read-binary' | 'archiveviewer-create-url' | 'archiveviewer-imageviewer-onerror' | 'archiveviewer-videoviewer-onerror' | 'archiveviewer-audioviewer-onerror' | 'archiveviewer-docviewer-onerror' | 'archiveviewer-codeviewer-onerror' | 'archiveviewer-codeviewer-file-size-exceeds' | 'archiveviewer-missing-name-src' | 'archiveviewer-unsupported' | 'archiveviewer-encrypted-entry' | 'archiveviewer-customrenderer-onerror';
|
|
18
|
-
export type PrimaryErrorReason = MediaViewerErrorReason | ArchiveViewerErrorReason;
|
|
19
|
-
export type SecondaryErrorReason = MediaClientErrorReason | 'unknown' | 'nativeError' | undefined;
|
|
20
|
-
export declare function getPrimaryErrorReason(error: MediaViewerError): PrimaryErrorReason;
|
|
21
|
-
export declare function getSecondaryErrorReason(error: MediaViewerError): SecondaryErrorReason;
|
|
22
|
-
export declare function getErrorDetail(error?: MediaViewerError): string;
|
|
23
|
-
export declare function getRequestMetadata(error?: MediaViewerError): RequestErrorMetadata | undefined;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Identifier } from '@atlaskit/media-client';
|
|
3
|
-
import { type WrappedComponentProps } from 'react-intl';
|
|
4
|
-
import { type MediaViewerExtensions } from './components/types';
|
|
5
|
-
import { type MediaFeatureFlags, type MediaTraceContext } from '@atlaskit/media-common';
|
|
6
|
-
export type Props = {
|
|
7
|
-
readonly identifier: Identifier;
|
|
8
|
-
readonly onClose?: () => void;
|
|
9
|
-
readonly extensions?: MediaViewerExtensions;
|
|
10
|
-
readonly onSidebarButtonClick?: () => void;
|
|
11
|
-
readonly isSidebarVisible?: boolean;
|
|
12
|
-
readonly featureFlags?: MediaFeatureFlags;
|
|
13
|
-
readonly onSetArchiveSideBarVisible?: (isVisible: boolean) => void;
|
|
14
|
-
readonly isArchiveSideBarVisible?: boolean;
|
|
15
|
-
traceContext: MediaTraceContext;
|
|
16
|
-
};
|
|
17
|
-
export declare const Header: ({ isArchiveSideBarVisible, extensions, isSidebarVisible, onSidebarButtonClick, identifier, onClose, onSetArchiveSideBarVisible, traceContext, }: Props & WrappedComponentProps) => React.JSX.Element;
|
|
18
|
-
declare const _default: React.FC<Props>;
|
|
19
|
-
export default _default;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { default as MediaViewer } from './components/media-viewer-loader';
|
|
2
|
-
export type { MediaViewerExtensions, MediaViewerExtensionsActions, MediaViewerProps, MediaMessage, } from './components/types';
|
|
3
|
-
export type { ViewerOptionsProps, CustomRendererConfig, CustomRendererStateProps, CustomRendererProps, ArchiveFileItem, } from './viewerOptions';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type FileState, type Identifier } from '@atlaskit/media-client';
|
|
3
|
-
import { type WithShowControlMethodProp } from '@atlaskit/media-ui';
|
|
4
|
-
import { Outcome } from './domain';
|
|
5
|
-
import { MediaViewerError } from './errors';
|
|
6
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
7
|
-
import { type MediaFeatureFlags, type MediaTraceContext } from '@atlaskit/media-common';
|
|
8
|
-
import { type ViewerOptionsProps } from './viewerOptions';
|
|
9
|
-
export type Props = Readonly<{
|
|
10
|
-
identifier: Identifier;
|
|
11
|
-
onClose?: () => void;
|
|
12
|
-
previewCount: number;
|
|
13
|
-
contextId?: string;
|
|
14
|
-
featureFlags?: MediaFeatureFlags;
|
|
15
|
-
viewerOptions?: ViewerOptionsProps;
|
|
16
|
-
traceContext: MediaTraceContext;
|
|
17
|
-
}> & WithAnalyticsEventsProps & WithShowControlMethodProp;
|
|
18
|
-
export type FileItem = FileState | 'external-image';
|
|
19
|
-
export type State = Outcome<FileItem, MediaViewerError>;
|
|
20
|
-
export declare const isExternalImageItem: (fileItem: FileItem) => fileItem is "external-image";
|
|
21
|
-
export declare const isFileStateItem: (fileItem: FileItem) => fileItem is FileState;
|
|
22
|
-
export declare const MAX_FILE_SIZE_SUPPORTED_BY_CODEVIEWER: number;
|
|
23
|
-
export declare const ItemViewerBase: ({ identifier, showControls, onClose, previewCount, contextId, createAnalyticsEvent, viewerOptions, traceContext, }: Props) => React.ReactElement | null;
|
|
24
|
-
export declare const ItemViewer: React.ForwardRefExoticComponent<Omit<Readonly<{
|
|
25
|
-
identifier: Identifier;
|
|
26
|
-
onClose?: () => void;
|
|
27
|
-
previewCount: number;
|
|
28
|
-
contextId?: string;
|
|
29
|
-
featureFlags?: MediaFeatureFlags;
|
|
30
|
-
viewerOptions?: ViewerOptionsProps;
|
|
31
|
-
traceContext: MediaTraceContext;
|
|
32
|
-
}> & WithShowControlMethodProp, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Identifier } from '@atlaskit/media-client';
|
|
3
|
-
import { type WithShowControlMethodProp } from '@atlaskit/media-ui';
|
|
4
|
-
import { type MediaViewerExtensions } from './components/types';
|
|
5
|
-
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
6
|
-
import { type ViewerOptionsProps } from './viewerOptions';
|
|
7
|
-
export type Props = Readonly<{
|
|
8
|
-
onClose?: () => void;
|
|
9
|
-
onNavigationChange?: (selectedItem: Identifier) => void;
|
|
10
|
-
defaultSelectedItem: Identifier;
|
|
11
|
-
items: Identifier[];
|
|
12
|
-
extensions?: MediaViewerExtensions;
|
|
13
|
-
onSidebarButtonClick?: () => void;
|
|
14
|
-
isSidebarVisible?: boolean;
|
|
15
|
-
contextId?: string;
|
|
16
|
-
featureFlags?: MediaFeatureFlags;
|
|
17
|
-
viewerOptions?: ViewerOptionsProps;
|
|
18
|
-
} & WithShowControlMethodProp>;
|
|
19
|
-
export type State = {
|
|
20
|
-
selectedItem: Identifier;
|
|
21
|
-
previewCount: number;
|
|
22
|
-
isArchiveSideBarVisible: boolean;
|
|
23
|
-
};
|
|
24
|
-
export declare const List: ({ defaultSelectedItem, onClose, showControls, extensions, onSidebarButtonClick, contextId, featureFlags, isSidebarVisible, onNavigationChange, items, viewerOptions, }: Props) => React.JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Identifier } from '@atlaskit/media-client';
|
|
3
|
-
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
4
|
-
import { type MediaViewerExtensions } from './components/types';
|
|
5
|
-
import { type ViewerOptionsProps } from './viewerOptions';
|
|
6
|
-
export type Props = {
|
|
7
|
-
onClose?: () => void;
|
|
8
|
-
selectedItem?: Identifier;
|
|
9
|
-
featureFlags?: MediaFeatureFlags;
|
|
10
|
-
items: Identifier[];
|
|
11
|
-
extensions?: MediaViewerExtensions;
|
|
12
|
-
contextId?: string;
|
|
13
|
-
innerRef?: React.Ref<HTMLDivElement>;
|
|
14
|
-
viewerOptions?: ViewerOptionsProps;
|
|
15
|
-
};
|
|
16
|
-
export declare const MediaViewer: React.ComponentType<Props>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Component } from 'react';
|
|
3
|
-
import { type Identifier } from '@atlaskit/media-client';
|
|
4
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
5
|
-
export type NavigationDirection = 'prev' | 'next';
|
|
6
|
-
export type NavigationProps = Readonly<{
|
|
7
|
-
items: Identifier[];
|
|
8
|
-
selectedItem: Identifier;
|
|
9
|
-
onChange: (item: Identifier) => void;
|
|
10
|
-
isArchiveSideBarVisible?: boolean;
|
|
11
|
-
}> & WithAnalyticsEventsProps;
|
|
12
|
-
export declare const nextNavButtonId = "media-viewer-navigation-next";
|
|
13
|
-
export declare const prevNavButtonId = "media-viewer-navigation-prev";
|
|
14
|
-
export type NavigationSource = 'keyboard' | 'mouse';
|
|
15
|
-
export declare class NavigationBase extends Component<NavigationProps, {}> {
|
|
16
|
-
private navigate;
|
|
17
|
-
get selectedIndex(): number;
|
|
18
|
-
render(): React.JSX.Element | null;
|
|
19
|
-
}
|
|
20
|
-
export declare const Navigation: React.ForwardRefExoticComponent<Omit<Readonly<{
|
|
21
|
-
items: Identifier[];
|
|
22
|
-
selectedItem: Identifier;
|
|
23
|
-
onChange: (item: Identifier) => void;
|
|
24
|
-
isArchiveSideBarVisible?: boolean;
|
|
25
|
-
}>, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { type CSSProperties, type ForwardRefExoticComponent, type MouseEvent, type ReactNode, type RefAttributes } from 'react';
|
|
2
|
-
import { type MediaType } from '@atlaskit/media-client';
|
|
3
|
-
export interface IconWrapperProps {
|
|
4
|
-
type: MediaType;
|
|
5
|
-
}
|
|
6
|
-
type Children = {
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
};
|
|
9
|
-
type ClassName = {
|
|
10
|
-
className: string;
|
|
11
|
-
};
|
|
12
|
-
type DataTestID = {
|
|
13
|
-
'data-testid'?: string | undefined;
|
|
14
|
-
};
|
|
15
|
-
type BlanketProps = DataTestID & Children & ClassName;
|
|
16
|
-
export declare const Blanket: ({ "data-testid": datatestId, className, children, }: BlanketProps) => JSX.Element;
|
|
17
|
-
type HeaderWrapperProps = {
|
|
18
|
-
isArchiveSideBarVisible: boolean;
|
|
19
|
-
};
|
|
20
|
-
export declare const HeaderWrapper: {
|
|
21
|
-
({ className, children, isArchiveSideBarVisible, }: ClassName & Children & HeaderWrapperProps): JSX.Element;
|
|
22
|
-
displayName: string;
|
|
23
|
-
};
|
|
24
|
-
export declare const ListWrapper: {
|
|
25
|
-
({ children }: Children): JSX.Element;
|
|
26
|
-
displayName: string;
|
|
27
|
-
};
|
|
28
|
-
export declare const ArrowsWrapper: ({ children }: Children) => JSX.Element;
|
|
29
|
-
export declare const CloseButtonWrapper: ({ className, children }: ClassName & Children) => JSX.Element;
|
|
30
|
-
type ContentWrapperProps = {
|
|
31
|
-
isSidebarVisible: boolean | undefined;
|
|
32
|
-
} & Children;
|
|
33
|
-
export declare const ContentWrapper: ({ isSidebarVisible, children, }: ContentWrapperProps) => JSX.Element;
|
|
34
|
-
export declare const ZoomWrapper: ({ className, children }: ClassName & Children) => JSX.Element;
|
|
35
|
-
export declare const ZoomCenterControls: ({ children }: Children) => JSX.Element;
|
|
36
|
-
export declare const ZoomRightControls: ({ children }: Children) => JSX.Element;
|
|
37
|
-
export declare const ZoomLevelIndicator: ({ children }: Children) => JSX.Element;
|
|
38
|
-
export declare const HDIconGroupWrapper: ({ className, children }: ClassName & Children) => JSX.Element;
|
|
39
|
-
type ErrorMessageWrapperProps = DataTestID & Children;
|
|
40
|
-
export declare const ErrorMessageWrapper: ({ "data-testid": datatestId, children, }: ErrorMessageWrapperProps) => JSX.Element;
|
|
41
|
-
type ErrorImageProps = {
|
|
42
|
-
alt: string | undefined;
|
|
43
|
-
src: string;
|
|
44
|
-
};
|
|
45
|
-
export declare const ErrorImage: ({ src, alt }: ErrorImageProps) => JSX.Element;
|
|
46
|
-
type VideoProps = {
|
|
47
|
-
controls: boolean;
|
|
48
|
-
src: string;
|
|
49
|
-
autoPlay: boolean;
|
|
50
|
-
};
|
|
51
|
-
export declare const Video: ({ autoPlay, controls, src }: VideoProps) => JSX.Element;
|
|
52
|
-
export declare const PDFWrapper: ForwardRefExoticComponent<DataTestID & Children & RefAttributes<HTMLDivElement>>;
|
|
53
|
-
export declare const Arrow: ({ className, children }: ClassName & Children) => JSX.Element;
|
|
54
|
-
export type LeftWrapperProps = {
|
|
55
|
-
isArchiveSideBarVisible: boolean;
|
|
56
|
-
};
|
|
57
|
-
export declare const LeftWrapper: ({ children, isArchiveSideBarVisible, }: Children & LeftWrapperProps) => JSX.Element;
|
|
58
|
-
export declare const RightWrapper: ({ children }: Children) => JSX.Element;
|
|
59
|
-
export type HeaderProps = {
|
|
60
|
-
isArchiveSideBarVisible: boolean;
|
|
61
|
-
};
|
|
62
|
-
export declare const Header: ({ children, isArchiveSideBarVisible, className, }: Children & HeaderProps & ClassName) => JSX.Element;
|
|
63
|
-
export declare const LeftHeader: ({ children }: Children) => JSX.Element;
|
|
64
|
-
export type ImageWrapperProps = {
|
|
65
|
-
onClick: (event: MouseEvent<HTMLDivElement>) => void;
|
|
66
|
-
style: CSSProperties;
|
|
67
|
-
} & Children & DataTestID;
|
|
68
|
-
export declare const ImageWrapper: ForwardRefExoticComponent<{
|
|
69
|
-
onClick: (event: MouseEvent<HTMLDivElement>) => void;
|
|
70
|
-
style: CSSProperties;
|
|
71
|
-
} & Children & DataTestID & ClassName & RefAttributes<unknown>>;
|
|
72
|
-
export declare const BaselineExtend: () => JSX.Element;
|
|
73
|
-
export type ImgProps = {
|
|
74
|
-
canDrag: boolean;
|
|
75
|
-
isDragging: boolean;
|
|
76
|
-
shouldPixelate: boolean;
|
|
77
|
-
src: string;
|
|
78
|
-
style: CSSProperties;
|
|
79
|
-
onLoad: (ev: React.SyntheticEvent<HTMLImageElement>) => void;
|
|
80
|
-
onMouseDown: (ev: MouseEvent<{}>) => void;
|
|
81
|
-
onError: (() => void) | undefined;
|
|
82
|
-
alt?: string;
|
|
83
|
-
} & DataTestID & ClassName;
|
|
84
|
-
export declare const Img: ({ canDrag, isDragging, shouldPixelate, "data-testid": datatestId, src, style, onLoad, onError, alt, className, ...rest }: ImgProps) => JSX.Element;
|
|
85
|
-
export declare const MedatadataTextWrapper: ({ children }: Children) => JSX.Element;
|
|
86
|
-
export declare const MetadataWrapper: ({ children }: Children) => JSX.Element;
|
|
87
|
-
type MetadataFileNameProps = DataTestID & Children;
|
|
88
|
-
export declare const MetadataFileName: ({ "data-testid": datatestId, children, }: MetadataFileNameProps) => JSX.Element;
|
|
89
|
-
type MetadataSubTextProps = DataTestID & Children;
|
|
90
|
-
export declare const MetadataSubText: ({ "data-testid": datatestId, children, }: MetadataSubTextProps) => JSX.Element;
|
|
91
|
-
export declare const MetadataIconWrapper: ({ children }: Children) => JSX.Element;
|
|
92
|
-
export interface IconWrapperProps {
|
|
93
|
-
type: MediaType;
|
|
94
|
-
}
|
|
95
|
-
export declare const RightHeader: ({ children }: Children) => JSX.Element;
|
|
96
|
-
export declare const CustomAudioPlayerWrapper: ({ children }: Children) => JSX.Element;
|
|
97
|
-
type AudioPlayerProps = DataTestID & Children;
|
|
98
|
-
export declare const AudioPlayer: {
|
|
99
|
-
(props: AudioPlayerProps): JSX.Element;
|
|
100
|
-
displayName: string;
|
|
101
|
-
};
|
|
102
|
-
type AudioProps = {
|
|
103
|
-
autoPlay: boolean;
|
|
104
|
-
controls: boolean;
|
|
105
|
-
src: string | undefined;
|
|
106
|
-
preload: string;
|
|
107
|
-
};
|
|
108
|
-
export declare const Audio: ForwardRefExoticComponent<AudioProps & RefAttributes<HTMLAudioElement>>;
|
|
109
|
-
type AudioCoverProps = {
|
|
110
|
-
alt: string | undefined;
|
|
111
|
-
src: string;
|
|
112
|
-
};
|
|
113
|
-
export declare const AudioCover: ({ src, alt }: AudioCoverProps) => JSX.Element;
|
|
114
|
-
export declare const DefaultCoverWrapper: ({ children }: Children) => JSX.Element;
|
|
115
|
-
export declare const DownloadButtonWrapper: ({ children }: Children) => JSX.Element;
|
|
116
|
-
type CustomVideoPlayerWrapperProps = DataTestID & Children;
|
|
117
|
-
export declare const CustomVideoPlayerWrapper: ({ "data-testid": datatestId, children, }: CustomVideoPlayerWrapperProps) => JSX.Element;
|
|
118
|
-
type SidebarWrapperProps = DataTestID & Children;
|
|
119
|
-
export declare const SidebarWrapper: ({ "data-testid": datatestId, children, }: SidebarWrapperProps) => JSX.Element;
|
|
120
|
-
export declare const SpinnerWrapper: ({ children }: Children) => JSX.Element;
|
|
121
|
-
export declare const FormattedMessageWrapper: ({ children }: Children) => JSX.Element;
|
|
122
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Identifier, type MediaType } from '@atlaskit/media-client';
|
|
2
|
-
export declare const isSameIdentifier: (id1: Identifier, id2: Identifier) => boolean;
|
|
3
|
-
export declare const getSelectedIndex: (items: Identifier[], selectedItem: Identifier) => number;
|
|
4
|
-
export declare const getMediaTypeFromFilename: (filename: string) => MediaType;
|
|
5
|
-
export declare const getMimeTypeFromFilename: (filename: string) => string;
|
|
6
|
-
export declare const getFolderParent: (path: string) => string;
|
|
7
|
-
export declare const extractArchiveFolderName: (folderName: string) => string;
|
|
8
|
-
export declare const getFormattedFolderName: (folderName: string) => string;
|
|
9
|
-
export declare const isMacPrivateFile: (fileName: string) => boolean;
|
|
10
|
-
export declare const rejectAfter: <T>(fn: () => Promise<T>, delay?: number) => Promise<T>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isIE: (navigator?: Navigator) => boolean;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type NonErrorFileState } from '@atlaskit/media-client';
|
|
2
|
-
export interface ViewerOptionsProps {
|
|
3
|
-
customRenderers?: CustomRendererConfig[];
|
|
4
|
-
}
|
|
5
|
-
export interface CustomRendererConfig {
|
|
6
|
-
shouldUseCustomRenderer: (props: CustomRendererStateProps) => boolean;
|
|
7
|
-
renderContent: (props: CustomRendererProps) => React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
export interface CustomRendererStateProps {
|
|
10
|
-
fileItem: NonErrorFileState;
|
|
11
|
-
archiveFileItem?: ArchiveFileItem;
|
|
12
|
-
}
|
|
13
|
-
export interface CustomRendererProps extends CustomRendererStateProps {
|
|
14
|
-
getBinaryContent: () => Promise<Blob>;
|
|
15
|
-
onLoad: () => void;
|
|
16
|
-
onError: (error: Error) => void;
|
|
17
|
-
}
|
|
18
|
-
export interface ArchiveFileItem {
|
|
19
|
-
name: string;
|
|
20
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type ArchiveDownloadButtonProps = {
|
|
3
|
-
downloadFn: () => void;
|
|
4
|
-
shouldRenderAbuseModal: boolean;
|
|
5
|
-
isDisabled?: boolean;
|
|
6
|
-
tooltip?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const ArchiveDownloadButton: ({ downloadFn, shouldRenderAbuseModal, isDisabled, tooltip, }: ArchiveDownloadButtonProps) => React.JSX.Element;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type ZipEntry } from 'unzipit';
|
|
3
|
-
import { type MediaClient } from '@atlaskit/media-client';
|
|
4
|
-
import { type ArchiveViewerError } from '../../errors';
|
|
5
|
-
import { type WithIntlProps, type WrappedComponentProps } from 'react-intl';
|
|
6
|
-
type Entries = {
|
|
7
|
-
[key: string]: ZipEntry;
|
|
8
|
-
};
|
|
9
|
-
export interface ArchiveSidebarFolderProps {
|
|
10
|
-
root: string;
|
|
11
|
-
entries: Entries;
|
|
12
|
-
onEntrySelected: (selectedEntry: ZipEntry) => void;
|
|
13
|
-
hideHeader?: boolean;
|
|
14
|
-
name?: string;
|
|
15
|
-
mediaClient: MediaClient;
|
|
16
|
-
isArchiveEntryLoading: boolean;
|
|
17
|
-
onError: (error: ArchiveViewerError, entry?: ZipEntry) => void;
|
|
18
|
-
shouldRenderAbuseModal: boolean;
|
|
19
|
-
fileId?: string;
|
|
20
|
-
}
|
|
21
|
-
export declare const ArchiveSidebarFolderEntry: React.FC<WithIntlProps<ArchiveSidebarFolderProps & WrappedComponentProps>> & {
|
|
22
|
-
WrappedComponent: React.ComponentType<ArchiveSidebarFolderProps & WrappedComponentProps>;
|
|
23
|
-
};
|
|
24
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react';
|
|
2
|
-
import { type MediaClient, type FileState } from '@atlaskit/media-client';
|
|
3
|
-
import { ArchiveViewerError } from '../../errors';
|
|
4
|
-
import { type ZipEntry } from 'unzipit';
|
|
5
|
-
export interface ArchiveSidebarRendererProps {
|
|
6
|
-
selectedFileState: FileState;
|
|
7
|
-
mediaClient: MediaClient;
|
|
8
|
-
onSelectedArchiveEntryChange: (archiveEntry: ZipEntry) => void;
|
|
9
|
-
onHeaderClicked: () => void;
|
|
10
|
-
isArchiveEntryLoading: boolean;
|
|
11
|
-
collectionName?: string;
|
|
12
|
-
onError: (error: ArchiveViewerError, entry?: ZipEntry) => void;
|
|
13
|
-
onSuccess: () => void;
|
|
14
|
-
}
|
|
15
|
-
interface ArchiveSidebarRendererState {
|
|
16
|
-
entries: {
|
|
17
|
-
[key: string]: ZipEntry;
|
|
18
|
-
};
|
|
19
|
-
status: 'loading' | 'loaded';
|
|
20
|
-
}
|
|
21
|
-
export default class ArchiveSidebarRenderer extends Component<ArchiveSidebarRendererProps, ArchiveSidebarRendererState> {
|
|
22
|
-
state: ArchiveSidebarRendererState;
|
|
23
|
-
componentDidMount(): Promise<void>;
|
|
24
|
-
render(): React.JSX.Element;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type ZipEntry } from 'unzipit';
|
|
3
|
-
import { type MediaClient } from '@atlaskit/media-client';
|
|
4
|
-
import { type ArchiveSidebarFolderProps } from './archive-sidebar-folder-entry';
|
|
5
|
-
import { type ArchiveViewerError } from '../../errors';
|
|
6
|
-
export interface ArchiveSidebarProps {
|
|
7
|
-
entries: {
|
|
8
|
-
[key: string]: ZipEntry;
|
|
9
|
-
};
|
|
10
|
-
onEntrySelected: (selectedEntry: ZipEntry) => void;
|
|
11
|
-
mediaClient: MediaClient;
|
|
12
|
-
onHeaderClicked: () => void;
|
|
13
|
-
isArchiveEntryLoading: boolean;
|
|
14
|
-
onError: (error: ArchiveViewerError, entry?: ZipEntry) => void;
|
|
15
|
-
shouldRenderAbuseModal: boolean;
|
|
16
|
-
fileId?: string;
|
|
17
|
-
}
|
|
18
|
-
export type ArchiveSidebarState = {
|
|
19
|
-
currentArchiveSidebarFolder: ArchiveSidebarFolderProps;
|
|
20
|
-
};
|
|
21
|
-
export declare class ArchiveSidebar extends React.Component<ArchiveSidebarProps, ArchiveSidebarState> {
|
|
22
|
-
constructor(props: ArchiveSidebarProps);
|
|
23
|
-
private getArchiveFromEntry;
|
|
24
|
-
private onEntrySelected;
|
|
25
|
-
private onFolderEntrySelected;
|
|
26
|
-
private onHeaderClicked;
|
|
27
|
-
render(): React.JSX.Element;
|
|
28
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type ZipInfo, type ZipEntry } from 'unzipit';
|
|
3
|
-
import { type MediaClient, type FileState } from '@atlaskit/media-client';
|
|
4
|
-
import { Outcome } from '../../domain';
|
|
5
|
-
import { BaseViewer } from '../base-viewer';
|
|
6
|
-
import { type ArchiveViewerProps } from './types';
|
|
7
|
-
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
8
|
-
import { ArchiveViewerError } from '../../errors';
|
|
9
|
-
export type Props = ArchiveViewerProps & WithAnalyticsEventsProps;
|
|
10
|
-
export type Content = {
|
|
11
|
-
src?: string;
|
|
12
|
-
name?: string;
|
|
13
|
-
isDirectory?: boolean;
|
|
14
|
-
selectedArchiveEntry?: ZipEntry;
|
|
15
|
-
hasLoadedEntries?: boolean;
|
|
16
|
-
error?: ArchiveViewerError;
|
|
17
|
-
codeViewerSrc?: string;
|
|
18
|
-
isCodeMimeType?: boolean;
|
|
19
|
-
};
|
|
20
|
-
export declare const getArchiveEntriesFromFileState: (fileState: FileState, mediaClient: MediaClient, collectionName?: string) => Promise<ZipInfo>;
|
|
21
|
-
export declare class ArchiveViewerBase extends BaseViewer<Content, Props> {
|
|
22
|
-
protected init(): Promise<void>;
|
|
23
|
-
protected get initialState(): {
|
|
24
|
-
content: Outcome<Content, ArchiveViewerError>;
|
|
25
|
-
};
|
|
26
|
-
protected release(): void;
|
|
27
|
-
private onError;
|
|
28
|
-
private onSelectedArchiveEntryChange;
|
|
29
|
-
private onHeaderClicked;
|
|
30
|
-
private onViewerLoad;
|
|
31
|
-
private onViewerError;
|
|
32
|
-
private onSidebarLoaded;
|
|
33
|
-
protected renderSuccessful(content: Content): React.JSX.Element;
|
|
34
|
-
private renderArchiveItemViewer;
|
|
35
|
-
private renderPreviewError;
|
|
36
|
-
}
|
|
37
|
-
export declare const ArchiveViewer: React.ForwardRefExoticComponent<Omit<ArchiveViewerProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type ArchiveViewerProps } from './types';
|
|
3
|
-
export type archiveViewerState = {
|
|
4
|
-
ArchiveViewer?: React.ComponentType<ArchiveViewerProps>;
|
|
5
|
-
isErrored: boolean;
|
|
6
|
-
};
|
|
7
|
-
export default class ArchiveViewerLoader extends React.PureComponent<ArchiveViewerProps> {
|
|
8
|
-
static ArchiveViewer?: React.ComponentType<ArchiveViewerProps>;
|
|
9
|
-
state: archiveViewerState;
|
|
10
|
-
componentDidMount(): Promise<void>;
|
|
11
|
-
render(): React.JSX.Element;
|
|
12
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ReactNode, type MouseEvent, type Key, type ForwardRefExoticComponent, type RefAttributes } from 'react';
|
|
6
|
-
export declare const ARCHIVE_SIDE_BAR_WIDTH = 300;
|
|
7
|
-
type Children = {
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
};
|
|
10
|
-
type OnClick = {
|
|
11
|
-
onClick: (event: MouseEvent<HTMLDivElement>) => void;
|
|
12
|
-
};
|
|
13
|
-
export declare const ArchiveItemViewerWrapper: ({ children, fullHeight, }: Children & {
|
|
14
|
-
fullHeight?: boolean;
|
|
15
|
-
}) => JSX.Element;
|
|
16
|
-
export declare const ArchiveSideBar: ForwardRefExoticComponent<Children & RefAttributes<HTMLDivElement>>;
|
|
17
|
-
export declare const ArchiveSidebarFolderWrapper: ({ children }: Children) => JSX.Element;
|
|
18
|
-
export declare const ArchiveDownloadButtonWrapper: ({ children, onClick, }: Children & OnClick) => JSX.Element;
|
|
19
|
-
export declare const DisabledArchiveDownloadButtonWrapper: ({ children }: Children) => JSX.Element;
|
|
20
|
-
export declare const SidebarItemWrapper: ({ children }: Children) => JSX.Element;
|
|
21
|
-
export declare const ArchiveSidebarFileEntryWrapper: ({ children, index, }: {
|
|
22
|
-
index: Key;
|
|
23
|
-
} & Children) => JSX.Element;
|
|
24
|
-
export declare const ArchiveLayout: ({ children }: Children) => JSX.Element;
|
|
25
|
-
export declare const ArchiveViewerWrapper: ({ children }: Children) => JSX.Element;
|
|
26
|
-
export declare const Separator: () => JSX.Element;
|
|
27
|
-
export declare const SidebarHeaderWrapper: ({ children }: Children) => JSX.Element;
|
|
28
|
-
export declare const SidebarHeaderIcon: ({ children }: Children) => JSX.Element;
|
|
29
|
-
export declare const SidebarHeaderEntry: ({ children }: Children) => JSX.Element;
|
|
30
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ArchiveSideBarWidth = 300;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type MediaClient, type FileState, type ErrorFileState } from '@atlaskit/media-client';
|
|
2
|
-
import { type ArchiveViewerError } from '../../errors';
|
|
3
|
-
import { type ViewerOptionsProps } from '../../viewerOptions';
|
|
4
|
-
import { type MediaTraceContext } from '@atlaskit/media-common';
|
|
5
|
-
export type ArchiveViewerProps = {
|
|
6
|
-
item: Exclude<FileState, ErrorFileState>;
|
|
7
|
-
mediaClient: MediaClient;
|
|
8
|
-
collectionName?: string;
|
|
9
|
-
onError: (error: ArchiveViewerError) => void;
|
|
10
|
-
onSuccess: () => void;
|
|
11
|
-
viewerOptions?: ViewerOptionsProps;
|
|
12
|
-
traceContext: MediaTraceContext;
|
|
13
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type MediaClient, type FileState } from '@atlaskit/media-client';
|
|
3
|
-
import { Outcome } from '../domain';
|
|
4
|
-
import { MediaViewerError } from '../errors';
|
|
5
|
-
import { type BaseState, BaseViewer } from './base-viewer';
|
|
6
|
-
import { type WithShowControlMethodProp } from '@atlaskit/media-ui';
|
|
7
|
-
import { type MediaTraceContext } from '@atlaskit/media-common';
|
|
8
|
-
export type Props = Readonly<{
|
|
9
|
-
item: FileState;
|
|
10
|
-
mediaClient: MediaClient;
|
|
11
|
-
collectionName?: string;
|
|
12
|
-
previewCount: number;
|
|
13
|
-
onCanPlay: () => void;
|
|
14
|
-
onError: (error: MediaViewerError) => void;
|
|
15
|
-
traceContext: MediaTraceContext;
|
|
16
|
-
} & WithShowControlMethodProp>;
|
|
17
|
-
export type State = BaseState<string> & {
|
|
18
|
-
coverUrl?: string;
|
|
19
|
-
};
|
|
20
|
-
export declare class AudioViewer extends BaseViewer<string, Props, State> {
|
|
21
|
-
protected get initialState(): {
|
|
22
|
-
content: Outcome<string, MediaViewerError>;
|
|
23
|
-
};
|
|
24
|
-
private renderCover;
|
|
25
|
-
private saveAudioElement;
|
|
26
|
-
private onFirstPlay;
|
|
27
|
-
private onError;
|
|
28
|
-
protected renderSuccessful(src: string): React.JSX.Element;
|
|
29
|
-
private loadCover;
|
|
30
|
-
private setCoverUrl;
|
|
31
|
-
protected init(): Promise<void>;
|
|
32
|
-
protected release(): void;
|
|
33
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type MediaClient, type FileState } from '@atlaskit/media-client';
|
|
3
|
-
import { type Outcome } from '../domain';
|
|
4
|
-
import { type MediaViewerError } from '../errors';
|
|
5
|
-
import { type MediaTraceContext } from '@atlaskit/media-common';
|
|
6
|
-
export type BaseProps = {
|
|
7
|
-
mediaClient: MediaClient;
|
|
8
|
-
item: FileState;
|
|
9
|
-
collectionName?: string;
|
|
10
|
-
traceContext: MediaTraceContext;
|
|
11
|
-
};
|
|
12
|
-
export type BaseState<Content> = {
|
|
13
|
-
content: Outcome<Content, MediaViewerError>;
|
|
14
|
-
};
|
|
15
|
-
export declare abstract class BaseViewer<Content, Props extends BaseProps, State extends BaseState<Content> = BaseState<Content>> extends React.Component<Props, State> {
|
|
16
|
-
state: State;
|
|
17
|
-
protected mounted: boolean;
|
|
18
|
-
componentDidMount(): void;
|
|
19
|
-
componentWillUnmount(): void;
|
|
20
|
-
protected safeSetState(newState: Partial<State>): void;
|
|
21
|
-
UNSAFE_componentWillReceiveProps(nextProps: Readonly<Props>): void;
|
|
22
|
-
componentDidUpdate(prevProps: Props): void;
|
|
23
|
-
render(): React.JSX.Element;
|
|
24
|
-
private getInitialState;
|
|
25
|
-
private renderDownloadButton;
|
|
26
|
-
protected onMediaDisplayed: () => void;
|
|
27
|
-
protected needsReset(propsA: Props, propsB: Props): boolean;
|
|
28
|
-
protected abstract init(): void;
|
|
29
|
-
protected abstract release(): void;
|
|
30
|
-
protected abstract get initialState(): State;
|
|
31
|
-
protected abstract renderSuccessful(content: Content): React.ReactNode;
|
|
32
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type ErrorFileState, type FileState } from '@atlaskit/media-client';
|
|
2
|
-
import { type MediaViewerError } from '../../../errors';
|
|
3
|
-
export type Props = {
|
|
4
|
-
item: Exclude<FileState, ErrorFileState>;
|
|
5
|
-
src: string;
|
|
6
|
-
testId?: string;
|
|
7
|
-
onClose?: () => void;
|
|
8
|
-
onSuccess?: () => void;
|
|
9
|
-
onError?: (error: MediaViewerError) => void;
|
|
10
|
-
};
|
|
11
|
-
export declare const CodeRendererAdvanced: (props: Props) => JSX.Element;
|