@atlaskit/media-viewer 54.11.10 → 54.11.12
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 +12 -0
- package/dist/cjs/analytics/fireAnalytics.js +4 -3
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/list.js +2 -2
- package/dist/cjs/utils/getMediaTypeFromFilename.js +2 -2
- package/dist/cjs/viewers/archiveSidebar/archive-sidebar-folder-entry.js +4 -4
- package/dist/cjs/viewers/audio.js +2 -2
- package/dist/cjs/viewers/base-viewer.js +2 -2
- package/dist/cjs/viewers/codeViewer/index.js +2 -1
- package/dist/cjs/viewers/doc/DocViewer.js +8 -8
- package/dist/cjs/viewers/image/index.js +2 -2
- package/dist/cjs/viewers/image/interactive-img.js +2 -2
- package/dist/cjs/viewers/svg/index.js +2 -2
- package/dist/cjs/viewers/video.js +5 -3
- package/dist/es2019/analytics/fireAnalytics.js +2 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/buildVideoErrorDiagnostics.js +0 -1
- package/dist/es2019/list.js +1 -1
- package/dist/es2019/utils/getMediaTypeFromFilename.js +1 -1
- package/dist/es2019/viewers/archiveSidebar/archive-sidebar-folder-entry.js +2 -2
- package/dist/es2019/viewers/audio.js +1 -1
- package/dist/es2019/viewers/base-viewer.js +1 -1
- package/dist/es2019/viewers/codeViewer/index.js +2 -1
- package/dist/es2019/viewers/doc/DocViewer.js +2 -2
- package/dist/es2019/viewers/image/index.js +1 -1
- package/dist/es2019/viewers/image/interactive-img.js +1 -1
- package/dist/es2019/viewers/svg/index.js +1 -1
- package/dist/es2019/viewers/video.js +3 -1
- package/dist/esm/analytics/fireAnalytics.js +2 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/buildVideoErrorDiagnostics.js +0 -1
- package/dist/esm/list.js +1 -1
- package/dist/esm/utils/getMediaTypeFromFilename.js +1 -1
- package/dist/esm/viewers/archiveSidebar/archive-sidebar-folder-entry.js +2 -2
- package/dist/esm/viewers/audio.js +1 -1
- package/dist/esm/viewers/base-viewer.js +1 -1
- package/dist/esm/viewers/codeViewer/index.js +2 -1
- package/dist/esm/viewers/doc/DocViewer.js +2 -2
- package/dist/esm/viewers/image/index.js +1 -1
- package/dist/esm/viewers/image/interactive-img.js +1 -1
- package/dist/esm/viewers/svg/index.js +1 -1
- package/dist/esm/viewers/video.js +3 -1
- package/dist/types/DownloadItemProps.d.ts +3 -2
- package/dist/types/ErrorViewDownloadButton.d.ts +3 -2
- package/dist/types/ToolbarDownloadButton.d.ts +4 -2
- package/dist/types/analytics/events/operational/_mediaFile.d.ts +1 -1
- package/dist/types/analytics/events/operational/commenced.d.ts +1 -1
- package/dist/types/analytics/events/operational/createDownloadFailedEventPayload.d.ts +2 -2
- package/dist/types/analytics/events/operational/createDownloadSucceededEventPayload.d.ts +2 -2
- package/dist/types/analytics/events/operational/download.d.ts +1 -1
- package/dist/types/analytics/events/operational/loadFailed.d.ts +2 -2
- package/dist/types/analytics/events/operational/loadSucceeded.d.ts +1 -1
- package/dist/types/analytics/events/operational/previewTooLarge.d.ts +2 -2
- package/dist/types/analytics/events/operational/previewUnsupported.d.ts +2 -2
- package/dist/types/analytics/events/operational/zipEntryLoadFailed.d.ts +1 -1
- package/dist/types/analytics/events/operational/zipEntryLoadSucceeded.d.ts +2 -2
- package/dist/types/analytics/events/screen/modal.d.ts +1 -1
- package/dist/types/analytics/events/screen/passwordPdf.d.ts +1 -1
- package/dist/types/analytics/events/screen/pdfPasswordInput.d.ts +1 -1
- package/dist/types/analytics/events/ui/_clickedButton.d.ts +1 -1
- package/dist/types/analytics/events/ui/closed.d.ts +1 -1
- package/dist/types/analytics/events/ui/createNavigatedEvent.d.ts +1 -1
- package/dist/types/analytics/events/ui/downloadButtonClicked.d.ts +3 -2
- package/dist/types/analytics/events/ui/failedPreviewDownloadButtonClicked.d.ts +3 -2
- package/dist/types/analytics/events/ui/navigated.d.ts +1 -1
- package/dist/types/analytics/getFileAttributes.d.ts +2 -2
- package/dist/types/analytics/index.d.ts +2 -2
- package/dist/types/analytics/ufoExperiences.d.ts +2 -2
- package/dist/types/buildImgErrorDiagnostics.d.ts +1 -1
- package/dist/types/buildVideoErrorDiagnostics.d.ts +1 -1
- package/dist/types/components/types.d.ts +3 -2
- package/dist/types/errorMessage.d.ts +2 -2
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/getRequestMetadata.d.ts +1 -1
- package/dist/types/header.d.ts +3 -2
- package/dist/types/isFileStateItem.d.ts +1 -1
- package/dist/types/item-viewer.d.ts +4 -2
- package/dist/types/list.d.ts +2 -2
- package/dist/types/media-viewer.d.ts +2 -2
- package/dist/types/navigation.d.ts +1 -1
- package/dist/types/styleWrappers.d.ts +1 -1
- package/dist/types/utils/getIdentifierCollection.d.ts +1 -1
- package/dist/types/utils/getMediaTypeFromFilename.d.ts +1 -1
- package/dist/types/utils/getObjectUrlFromFileState.d.ts +1 -1
- package/dist/types/utils/getSelectedIndex.d.ts +1 -1
- package/dist/types/utils/isSameIdentifier.d.ts +1 -1
- package/dist/types/viewerOptions.d.ts +1 -1
- package/dist/types/viewers/archiveSidebar/archive-sidebar-folder-entry.d.ts +1 -1
- package/dist/types/viewers/archiveSidebar/archive-sidebar-renderer.d.ts +2 -1
- package/dist/types/viewers/archiveSidebar/archive-sidebar.d.ts +1 -1
- package/dist/types/viewers/archiveSidebar/get-archive-entries-from-file-state.d.ts +2 -1
- package/dist/types/viewers/archiveSidebar/types.d.ts +3 -2
- package/dist/types/viewers/audio.d.ts +3 -2
- package/dist/types/viewers/base-viewer.d.ts +3 -2
- package/dist/types/viewers/codeViewer/CodeRendererAdvanced/CodeRendererAdvanced.d.ts +1 -1
- package/dist/types/viewers/codeViewer/codeViewerRenderer-compiled.d.ts +1 -1
- package/dist/types/viewers/codeViewer/codeViewerRenderer.d.ts +1 -1
- package/dist/types/viewers/codeViewer/index.d.ts +3 -2
- package/dist/types/viewers/customViewer/customViewer.d.ts +3 -1
- package/dist/types/viewers/doc/DocViewer.d.ts +3 -2
- package/dist/types/viewers/doc/index.d.ts +3 -2
- package/dist/types/viewers/image/index.d.ts +3 -2
- package/dist/types/viewers/svg/index.d.ts +2 -2
- package/dist/types/viewers/video.d.ts +4 -2
- package/example-helpers/MainWrapper.tsx +1 -1
- package/example-helpers/NativeMediaPreview.tsx +3 -1
- package/example-helpers/index.ts +2 -2
- package/example-helpers/svg/delayApiResponses.ts +2 -2
- package/example-helpers/svg/uploader.ts +2 -2
- package/example-helpers/svg/useSelectOptions.ts +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
3
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
4
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
5
|
import type { MediaViewerError } from './MediaViewerError';
|
|
5
6
|
export declare const ErrorViewDownloadButton: ({ fileState, mediaClient, error, traceContext, collectionName, }: ErrorViewDownloadButtonProps) => React.JSX.Element;
|
|
6
7
|
export type ErrorViewDownloadButtonProps = {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
3
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
4
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
5
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
6
|
export declare const ToolbarDownloadButton: ({ state, mediaClient, identifier, traceContext, fallbackMediaName, }: ToolbarDownloadButtonProps) => React.JSX.Element | null;
|
|
5
7
|
export type ToolbarDownloadButtonProps = {
|
|
6
8
|
state: FileState;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { OperationalEventPayload, OperationalAttributes } from '@atlaskit/media-common/analytics/types';
|
|
2
2
|
/** common definition used by other mediaFile events */
|
|
3
3
|
export type MediaFileEventPayload<Attributes extends OperationalAttributes, Action extends 'commenced' | 'loadSucceeded' | 'loadFailed' | 'previewUnsupported' | 'previewTooLarge' | 'zipEntryLoadSucceeded' | 'zipEntryLoadFailed' | 'downloadSucceeded' | 'downloadFailed'> = OperationalEventPayload<Attributes, Action, 'mediaFile'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MediaTraceContext, WithFileAttributes, WithTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
2
2
|
import { type MediaFileEventPayload } from './_mediaFile';
|
|
3
3
|
export type CommencedAttributes = WithFileAttributes & WithTraceContext;
|
|
4
4
|
export type CommencedEventPayload = MediaFileEventPayload<CommencedAttributes, 'commenced'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
2
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
3
|
import type { MediaViewerError } from '../../../MediaViewerError';
|
|
4
4
|
import type { DownloadFailedEventPayload } from './download';
|
|
5
5
|
export declare const createDownloadFailedEventPayload: (fileId: string, error: MediaViewerError, fileState?: FileState, traceContext?: MediaTraceContext) => DownloadFailedEventPayload;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
2
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
3
|
import type { DownloadSucceededEventPayload } from './download';
|
|
4
4
|
export declare const createDownloadSucceededEventPayload: (fileState?: FileState, traceContext?: MediaTraceContext) => DownloadSucceededEventPayload;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SuccessAttributes, WithFileAttributes, WithTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
2
2
|
import { type MediaViewerFailureAttributes } from '../..';
|
|
3
3
|
import { type MediaFileEventPayload } from './_mediaFile';
|
|
4
4
|
export type DownloadFailedEventPayload = MediaFileEventPayload<MediaViewerFailureAttributes, 'downloadFailed'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
2
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
3
|
import type { MediaViewerFailureAttributes } from '../..';
|
|
4
4
|
import type { MediaViewerError } from '../../../MediaViewerError';
|
|
5
5
|
import { type MediaFileEventPayload } from './_mediaFile';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SuccessAttributes, WithFileAttributes, FileAttributes, MediaTraceContext, WithTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
2
2
|
import { type MediaFileEventPayload } from './_mediaFile';
|
|
3
3
|
type WithFeatureFlags = {
|
|
4
4
|
featureFlags: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { WithFileAttributes } from '@atlaskit/media-common/analytics/types';
|
|
2
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
3
|
import type { PrimaryErrorReason } from '../../../errors';
|
|
4
4
|
import type { MediaViewerError } from '../../../MediaViewerError';
|
|
5
5
|
import { type MediaFileEventPayload } from './_mediaFile';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { WithFileAttributes } from '@atlaskit/media-common/analytics/types';
|
|
2
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
3
|
import { type MediaFileEventPayload } from './_mediaFile';
|
|
4
4
|
export type PreviewUnsupportedAttributes = WithFileAttributes;
|
|
5
5
|
export type PreviewUnsupportedEventPayload = MediaFileEventPayload<PreviewUnsupportedAttributes, 'previewUnsupported'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ZipEntry } from 'unzipit';
|
|
2
|
-
import {
|
|
2
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
3
|
import type { MediaViewerFailureAttributes } from '../..';
|
|
4
4
|
import type { MediaViewerError } from '../../../MediaViewerError';
|
|
5
5
|
import { type MediaFileEventPayload } from './_mediaFile';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ZipEntry } from 'unzipit';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import type { SuccessAttributes, WithFileAttributes } from '@atlaskit/media-common/analytics/types';
|
|
3
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
4
|
import { type MediaFileEventPayload } from './_mediaFile';
|
|
5
5
|
export type ZipEntryLoadSucceededAttributes = SuccessAttributes & WithFileAttributes & {
|
|
6
6
|
size: number;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ScreenEventPayload, ScreenAttributes } from '@atlaskit/media-common/analytics/types';
|
|
2
2
|
export type ModalEventPayload = Omit<ScreenEventPayload<ScreenAttributes, 'mediaViewerModal'>, 'attributes'>;
|
|
3
3
|
export declare const createModalEvent: () => ModalEventPayload;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ScreenEventPayload, ScreenAttributes } from '@atlaskit/media-common/analytics/types';
|
|
2
2
|
export type PasswordPdfScreenEventPayload = Omit<ScreenEventPayload<ScreenAttributes, 'mediaViewerPasswordPdfScreen'>, 'attributes'>;
|
|
3
3
|
export declare const createPasswordPdfScreenEvent: () => PasswordPdfScreenEventPayload;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ScreenEventPayload, ScreenAttributes } from '@atlaskit/media-common/analytics/types';
|
|
2
2
|
export type PdfPasswordInputScreenEventPayload = Omit<ScreenEventPayload<ScreenAttributes, 'mediaViewerPdfPasswordInputScreen'>, 'attributes'>;
|
|
3
3
|
export declare const createPdfPasswordInputScreenEvent: () => PdfPasswordInputScreenEventPayload;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UIAttributes, UIEventPayload } from '@atlaskit/media-common/analytics/types';
|
|
2
2
|
export type ButtonClickEventPayload<Attributes extends UIAttributes> = UIEventPayload<Attributes, 'clicked', 'button'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
2
2
|
import { type NavigationDirection, type NavigationSource } from '../../../navigation';
|
|
3
3
|
import type { NavigatedEventPayload } from './navigated';
|
|
4
4
|
export declare const createNavigatedEvent: (direction: NavigationDirection, source: NavigationSource, identifier: Identifier) => NavigatedEventPayload;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { FileStatus } from '@atlaskit/media-client/file-state';
|
|
2
|
+
import type { WithFileAttributes } from '@atlaskit/media-common/analytics/types';
|
|
3
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
4
|
import { type ButtonClickEventPayload } from './_clickedButton';
|
|
4
5
|
export type DownloadButtonClickedAttributes = WithFileAttributes & {
|
|
5
6
|
fileProcessingStatus: FileStatus;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { FileStatus } from '@atlaskit/media-client/file-state';
|
|
2
|
+
import type { WithFileAttributes } from '@atlaskit/media-common/analytics/types';
|
|
3
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
4
|
import type { PrimaryErrorReason } from '../../../errors';
|
|
4
5
|
import type { MediaViewerError } from '../../../MediaViewerError';
|
|
5
6
|
import { type ButtonClickEventPayload } from './_clickedButton';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UIEventPayload, UIAttributes, WithFileAttributes } from '@atlaskit/media-common/analytics/types';
|
|
2
2
|
export type NavigatedAttributes = UIAttributes & WithFileAttributes & {
|
|
3
3
|
input: 'button' | 'keys';
|
|
4
4
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { FileAttributes } from '@atlaskit/media-common/analytics/types';
|
|
2
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
3
|
export declare function getFileAttributes(fileState?: FileState): FileAttributes;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { RequestMetadata } from '@atlaskit/media-client/request/types';
|
|
2
|
+
import type { WithFileAttributes, FailureAttributes, WithTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
3
3
|
import type { ProcessingFailReason } from '@atlaskit/media-state/file-state';
|
|
4
4
|
import { type PrimaryErrorReason } from '../errors';
|
|
5
5
|
/** This type takes FailureAttributes and redefines `failReason` to be the strong media-viewer type */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { RequestMetadata } from '@atlaskit/media-client/request/types';
|
|
2
|
+
import type { FileAttributes } from '@atlaskit/media-common/analytics/types';
|
|
3
3
|
import { type FileStateFlags } from '../components/types';
|
|
4
4
|
import { type PrimaryErrorReason } from '../errors';
|
|
5
5
|
export type UFOFailedEventPayload = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SyntheticEvent } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
3
|
/**
|
|
4
4
|
* Builds a descriptive `secondaryError` for an `<img>` onerror so the downstream
|
|
5
5
|
* `loadFailed` analytics event reports a meaningful `error`/`errorDetail` instead of
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
2
2
|
/**
|
|
3
3
|
* Builds a descriptive `secondaryError` for a `<video>` onerror so the downstream
|
|
4
4
|
* `loadFailed` analytics event reports a meaningful `error`/`errorDetail` instead of
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type Identifier, type MediaClient } from '@atlaskit/media-client';
|
|
3
2
|
import type { WithMediaClientConfigProps } from '@atlaskit/media-client-react/with-media-client';
|
|
4
|
-
import {
|
|
3
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
4
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
5
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common/types';
|
|
5
6
|
import { type ViewerOptionsProps } from '../viewerOptions';
|
|
6
7
|
export type FileStateFlags = {
|
|
7
8
|
wasStatusProcessing: boolean;
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import { type MessageDescriptor, type WrappedComponentProps } from 'react-intl';
|
|
4
4
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
6
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
7
7
|
import { type LoadFailedEventPayload } from './analytics/events/operational/loadFailed';
|
|
8
8
|
import { type PreviewTooLargeEventPayload } from './analytics/events/operational/previewTooLarge';
|
|
9
9
|
import { type PreviewUnsupportedEventPayload } from './analytics/events/operational/previewUnsupported';
|
package/dist/types/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MediaClientErrorReason } from '@atlaskit/media-client/errors/types';
|
|
2
2
|
import type { ArchiveViewerErrorReason } from './ArchiveViewerError';
|
|
3
3
|
import type { MediaViewerErrorReason } from './MediaViewerError';
|
|
4
4
|
export type PrimaryErrorReason = MediaViewerErrorReason | ArchiveViewerErrorReason;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RequestErrorMetadata } from '@atlaskit/media-client/request/types';
|
|
2
2
|
import type { MediaViewerError } from './MediaViewerError';
|
|
3
3
|
export declare function getRequestMetadata(error?: MediaViewerError): RequestErrorMetadata | undefined;
|
package/dist/types/header.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type Ref } from 'react';
|
|
3
3
|
import { type WrappedComponentProps } from 'react-intl';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
4
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
5
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
6
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common/types';
|
|
6
7
|
import { type MediaViewerExtensions } from './components/types';
|
|
7
8
|
export type Props = {
|
|
8
9
|
readonly identifier: Identifier;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
4
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
5
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common/types';
|
|
6
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
5
7
|
import type { WithShowControlMethodProp } from '@atlaskit/media-ui/types';
|
|
6
8
|
import type { Outcome } from './domain/outcome';
|
|
7
9
|
import type { MediaViewerError } from './MediaViewerError';
|
package/dist/types/list.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { type Ref } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
3
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common/types';
|
|
4
4
|
import type { WithShowControlMethodProp } from '@atlaskit/media-ui/types';
|
|
5
5
|
import { type MediaViewerExtensions } from './components/types';
|
|
6
6
|
import { type ViewerOptionsProps } from './viewerOptions';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
3
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common/types';
|
|
4
4
|
import { type MediaViewerExtensions } from './components/types';
|
|
5
5
|
import { type ViewerOptionsProps } from './viewerOptions';
|
|
6
6
|
export type Props = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
4
|
-
import {
|
|
4
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
5
5
|
import { type WithInsetViewerProps } from './insetViewerContext';
|
|
6
6
|
export type NavigationDirection = 'prev' | 'next';
|
|
7
7
|
export type NavigationProps = Readonly<{
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { type CSSProperties, type ForwardRefExoticComponent, type MouseEvent, type ReactNode, type RefAttributes } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import type { MediaType } from '@atlaskit/media-common/main-types';
|
|
7
7
|
export interface IconWrapperProps {
|
|
8
8
|
type: MediaType;
|
|
9
9
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
2
2
|
export declare const getIdentifierCollection: (identifier: Identifier, defaultCollectionName: string) => string | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MediaType } from '@atlaskit/media-common/main-types';
|
|
2
2
|
export declare const getMediaTypeFromFilename: (filename: string) => MediaType;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
2
2
|
export declare const getObjectUrlFromFileState: (state: FileState) => Promise<string | undefined>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
2
2
|
export declare const getSelectedIndex: (items: Identifier[], selectedItem: Identifier) => number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
2
2
|
export declare const isSameIdentifier: (id1: Identifier, id2: Identifier) => boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type WithIntlProps, type WrappedComponentProps } from 'react-intl';
|
|
3
3
|
import { type ZipEntry } from 'unzipit';
|
|
4
|
-
import {
|
|
4
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
5
5
|
import type { ArchiveViewerError } from '../../ArchiveViewerError';
|
|
6
6
|
type Entries = {
|
|
7
7
|
[key: string]: ZipEntry;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { type ZipEntry } from 'unzipit';
|
|
3
|
-
import {
|
|
3
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
4
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
5
|
import { ArchiveViewerError } from '../../ArchiveViewerError';
|
|
5
6
|
export interface ArchiveSidebarRendererProps {
|
|
6
7
|
selectedFileState: FileState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ZipEntry } from 'unzipit';
|
|
3
|
-
import {
|
|
3
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
4
4
|
import type { ArchiveViewerError } from '../../ArchiveViewerError';
|
|
5
5
|
import { type ArchiveSidebarFolderProps } from './archive-sidebar-folder-entry';
|
|
6
6
|
export interface ArchiveSidebarProps {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { type ZipInfo } from 'unzipit';
|
|
2
|
-
import {
|
|
2
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
3
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
4
|
export declare const getArchiveEntriesFromFileState: (fileState: FileState, mediaClient: MediaClient, collectionName?: string) => Promise<ZipInfo>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
2
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
3
|
+
import type { FileState, ErrorFileState } from '@atlaskit/media-state/file-state';
|
|
3
4
|
import type { ArchiveViewerError } from '../../ArchiveViewerError';
|
|
4
5
|
import { type ViewerOptionsProps } from '../../viewerOptions';
|
|
5
6
|
export type ArchiveViewerProps = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
3
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
4
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
5
|
import type { WithShowControlMethodProp } from '@atlaskit/media-ui/types';
|
|
5
6
|
import { Outcome } from '../domain/outcome';
|
|
6
7
|
import { MediaViewerError } from '../MediaViewerError';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
3
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
4
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
5
|
import type { Outcome } from '../domain/outcome';
|
|
5
6
|
import type { MediaViewerError } from '../MediaViewerError';
|
|
6
7
|
export type BaseProps = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import type { ErrorFileState, FileState } from '@atlaskit/media-state/file-state';
|
|
6
6
|
import type { MediaViewerError } from '../../../MediaViewerError';
|
|
7
7
|
export type Props = {
|
|
8
8
|
item: Exclude<FileState, ErrorFileState>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { type ForwardRefExoticComponent, type ReactNode, type RefAttributes } from 'react';
|
|
6
6
|
import type { SupportedLanguages } from '@atlaskit/code/constants';
|
|
7
|
-
import {
|
|
7
|
+
import type { ErrorFileState, FileState } from '@atlaskit/media-state/file-state';
|
|
8
8
|
import type { Outcome } from '../../domain/outcome';
|
|
9
9
|
import type { MediaViewerError } from '../../MediaViewerError';
|
|
10
10
|
export declare const MAX_FORMATTED_LINES: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SupportedLanguages } from '@atlaskit/code/constants';
|
|
2
|
-
import {
|
|
2
|
+
import type { ErrorFileState, FileState } from '@atlaskit/media-state/file-state';
|
|
3
3
|
import type { Outcome } from '../../domain/outcome';
|
|
4
4
|
import type { MediaViewerError } from '../../MediaViewerError';
|
|
5
5
|
export type Props = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { type ComponentType } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
3
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
4
|
+
import type { FileState, ErrorFileState } from '@atlaskit/media-state/file-state';
|
|
4
5
|
import { Outcome } from '../../domain/outcome';
|
|
5
6
|
import { MediaViewerError } from '../../MediaViewerError';
|
|
6
7
|
import { BaseViewer } from '../base-viewer';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NonErrorFileState } from '@atlaskit/media-client/file-state';
|
|
3
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
4
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
3
5
|
import { MediaViewerError } from '../../MediaViewerError';
|
|
4
6
|
import type { CustomRendererConfig } from '../../viewerOptions';
|
|
5
7
|
export type Props = {
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
6
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
7
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
7
8
|
import { MediaViewerError } from '../../MediaViewerError';
|
|
8
9
|
type Props = {
|
|
9
10
|
mediaClient: MediaClient;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
3
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
4
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
5
|
import { Outcome } from '../../domain/outcome';
|
|
5
6
|
import { ZoomLevel } from '../../domain/zoomLevel';
|
|
6
7
|
import type { MediaViewerError } from '../../MediaViewerError';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
3
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
4
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
5
|
import { Outcome } from '../../domain/outcome';
|
|
5
6
|
import { MediaViewerError } from '../../MediaViewerError';
|
|
6
7
|
import { BaseViewer } from '../base-viewer';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { FileIdentifier } from '@atlaskit/media-client/identifier';
|
|
4
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
5
5
|
import { MediaViewerError } from '../../MediaViewerError';
|
|
6
6
|
export interface SvgViewerProps extends WithAnalyticsEventsProps {
|
|
7
7
|
identifier: FileIdentifier;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
3
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
4
|
+
import type { MediaTraceContext } from '@atlaskit/media-common/analytics/types';
|
|
5
|
+
import type { FileState } from '@atlaskit/media-state/file-state';
|
|
4
6
|
import type { WithShowControlMethodProp } from '@atlaskit/media-ui/types';
|
|
5
7
|
import { MediaViewerError } from '../MediaViewerError';
|
|
6
8
|
import { type BaseState } from './base-viewer';
|
|
@@ -8,7 +8,7 @@ import { type ReactNode, type FC } from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
10
|
|
|
11
|
-
import { enableMediaUfoLogger } from '@atlaskit/media-test-helpers';
|
|
11
|
+
import { enableMediaUfoLogger } from '@atlaskit/media-test-helpers/ufoLogger';
|
|
12
12
|
import { payloadPublisher } from '@atlassian/ufo/publisher';
|
|
13
13
|
|
|
14
14
|
import {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import type { Identifier } from '@atlaskit/media-client/identifier';
|
|
4
|
+
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
5
|
+
import type { MediaFileArtifacts } from '@atlaskit/media-state/file-state';
|
|
4
6
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
5
7
|
import { Pressable, xcss } from '@atlaskit/primitives';
|
|
6
8
|
|