@atlaskit/media-viewer 47.1.2 → 47.2.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/CHANGELOG.md +13 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/components/media-viewer-loader.js +13 -6
- package/dist/cjs/header.js +6 -1
- package/dist/cjs/list.js +17 -5
- package/dist/cjs/navigation.js +16 -8
- package/dist/cjs/styleWrappers.js +11 -5
- package/dist/cjs/styles.js +33 -23
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/viewers/archiveSidebar/archive-sidebar-folder-entry.js +30 -16
- package/dist/cjs/viewers/archiveSidebar/archive.js +2 -1
- package/dist/cjs/viewers/archiveSidebar/archiveViewerLoader.js +4 -4
- package/dist/cjs/viewers/archiveSidebar/styles.js +15 -11
- package/dist/cjs/viewers/audio.js +3 -1
- package/dist/cjs/viewers/codeViewer/styles.js +8 -2
- package/dist/cjs/viewers/doc/pdfRenderer.js +4 -0
- package/dist/cjs/viewers/image/interactive-img.js +4 -2
- package/dist/cjs/viewers/useThemeObserverHoc.js +26 -0
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/components/media-viewer-loader.js +11 -5
- package/dist/es2019/header.js +6 -1
- package/dist/es2019/list.js +12 -5
- package/dist/es2019/navigation.js +16 -7
- package/dist/es2019/styleWrappers.js +17 -9
- package/dist/es2019/styles.js +48 -25
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/viewers/archiveSidebar/archive-sidebar-folder-entry.js +30 -7
- package/dist/es2019/viewers/archiveSidebar/archive.js +4 -1
- package/dist/es2019/viewers/archiveSidebar/archiveViewerLoader.js +3 -3
- package/dist/es2019/viewers/archiveSidebar/styles.js +21 -14
- package/dist/es2019/viewers/audio.js +3 -1
- package/dist/es2019/viewers/codeViewer/styles.js +7 -2
- package/dist/es2019/viewers/doc/pdfRenderer.js +4 -0
- package/dist/es2019/viewers/image/interactive-img.js +4 -2
- package/dist/es2019/viewers/useThemeObserverHoc.js +14 -0
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/components/media-viewer-loader.js +7 -6
- package/dist/esm/header.js +6 -1
- package/dist/esm/list.js +17 -5
- package/dist/esm/navigation.js +17 -7
- package/dist/esm/styleWrappers.js +12 -6
- package/dist/esm/styles.js +28 -21
- package/dist/esm/version.json +1 -1
- package/dist/esm/viewers/archiveSidebar/archive-sidebar-folder-entry.js +30 -14
- package/dist/esm/viewers/archiveSidebar/archive.js +4 -1
- package/dist/esm/viewers/archiveSidebar/archiveViewerLoader.js +3 -3
- package/dist/esm/viewers/archiveSidebar/styles.js +15 -12
- package/dist/esm/viewers/audio.js +3 -1
- package/dist/esm/viewers/codeViewer/styles.js +7 -2
- package/dist/esm/viewers/doc/pdfRenderer.js +4 -0
- package/dist/esm/viewers/image/interactive-img.js +4 -2
- package/dist/esm/viewers/useThemeObserverHoc.js +14 -0
- package/dist/types/components/media-viewer-loader.d.ts +5 -2
- package/dist/types/header.d.ts +1 -0
- package/dist/types/list.d.ts +1 -0
- package/dist/types/navigation.d.ts +1 -0
- package/dist/types/styleWrappers.d.ts +8 -2
- package/dist/types/styles.d.ts +10 -4
- package/dist/types/viewers/archiveSidebar/archive-sidebar-folder-entry.d.ts +6 -4
- package/dist/types/viewers/archiveSidebar/styles.d.ts +4 -1
- package/dist/types/viewers/useThemeObserverHoc.d.ts +3 -0
- package/example-helpers/styles.ts +2 -1
- package/package.json +16 -17
- package/report.api.md +46 -52
- package/dist/types-ts4.0/analytics/events/index.d.ts +0 -14
- package/dist/types-ts4.0/analytics/events/operational/_mediaFile.d.ts +0 -3
- package/dist/types-ts4.0/analytics/events/operational/commenced.d.ts +0 -5
- package/dist/types-ts4.0/analytics/events/operational/loadFailed.d.ts +0 -6
- package/dist/types-ts4.0/analytics/events/operational/loadSucceeded.d.ts +0 -5
- package/dist/types-ts4.0/analytics/events/operational/previewUnsupported.d.ts +0 -6
- package/dist/types-ts4.0/analytics/events/operational/zipEntryLoadFailed.d.ts +0 -13
- package/dist/types-ts4.0/analytics/events/operational/zipEntryLoadSucceeded.d.ts +0 -12
- package/dist/types-ts4.0/analytics/events/screen/modal.d.ts +0 -3
- package/dist/types-ts4.0/analytics/events/ui/_clickedButton.d.ts +0 -2
- package/dist/types-ts4.0/analytics/events/ui/closed.d.ts +0 -8
- package/dist/types-ts4.0/analytics/events/ui/downloadButtonClicked.d.ts +0 -8
- package/dist/types-ts4.0/analytics/events/ui/failedPreviewDownloadButtonClicked.d.ts +0 -10
- package/dist/types-ts4.0/analytics/events/ui/navigated.d.ts +0 -12
- package/dist/types-ts4.0/analytics/events/ui/zoomInButtonClicked.d.ts +0 -8
- package/dist/types-ts4.0/analytics/events/ui/zoomOutButtonClicked.d.ts +0 -6
- package/dist/types-ts4.0/analytics/index.d.ts +0 -28
- package/dist/types-ts4.0/analytics/ufoExperiences.d.ts +0 -19
- package/dist/types-ts4.0/classnames.d.ts +0 -5
- package/dist/types-ts4.0/collection.d.ts +0 -36
- package/dist/types-ts4.0/components/media-viewer-analytics-error-boundary.d.ts +0 -10
- package/dist/types-ts4.0/components/media-viewer-loader.d.ts +0 -20
- package/dist/types-ts4.0/components/media-viewer.d.ts +0 -7
- package/dist/types-ts4.0/components/types.d.ts +0 -31
- package/dist/types-ts4.0/content.d.ts +0 -10
- package/dist/types-ts4.0/domain/index.d.ts +0 -10
- package/dist/types-ts4.0/domain/outcome.d.ts +0 -32
- package/dist/types-ts4.0/domain/zoomLevel.d.ts +0 -15
- package/dist/types-ts4.0/download.d.ts +0 -24
- package/dist/types-ts4.0/error-images.d.ts +0 -2
- package/dist/types-ts4.0/errorMessage.d.ts +0 -29
- package/dist/types-ts4.0/errors.d.ts +0 -23
- package/dist/types-ts4.0/header.d.ts +0 -40
- package/dist/types-ts4.0/index.d.ts +0 -2
- package/dist/types-ts4.0/item-viewer.d.ts +0 -44
- package/dist/types-ts4.0/list.d.ts +0 -27
- package/dist/types-ts4.0/loading.d.ts +0 -2
- package/dist/types-ts4.0/media-viewer.d.ts +0 -33
- package/dist/types-ts4.0/navigation.d.ts +0 -19
- package/dist/types-ts4.0/styleWrappers.d.ts +0 -114
- package/dist/types-ts4.0/styles.d.ts +0 -57
- package/dist/types-ts4.0/utils/closeOnDirectClick.d.ts +0 -2
- package/dist/types-ts4.0/utils/getIdentifierCollection.d.ts +0 -2
- package/dist/types-ts4.0/utils/getObjectUrlFromFileState.d.ts +0 -2
- package/dist/types-ts4.0/utils/index.d.ts +0 -10
- package/dist/types-ts4.0/utils/isIE.d.ts +0 -1
- package/dist/types-ts4.0/viewers/archiveSidebar/archive-sidebar-folder-entry.d.ts +0 -25
- package/dist/types-ts4.0/viewers/archiveSidebar/archive-sidebar-header.d.ts +0 -9
- package/dist/types-ts4.0/viewers/archiveSidebar/archive-sidebar-renderer.d.ts +0 -26
- package/dist/types-ts4.0/viewers/archiveSidebar/archive-sidebar.d.ts +0 -26
- package/dist/types-ts4.0/viewers/archiveSidebar/archive.d.ts +0 -37
- package/dist/types-ts4.0/viewers/archiveSidebar/archiveViewerLoader.d.ts +0 -12
- package/dist/types-ts4.0/viewers/archiveSidebar/consts.d.ts +0 -2
- package/dist/types-ts4.0/viewers/archiveSidebar/styleWrappers.d.ts +0 -24
- package/dist/types-ts4.0/viewers/archiveSidebar/styles.d.ts +0 -23
- package/dist/types-ts4.0/viewers/archiveSidebar/types.d.ts +0 -9
- package/dist/types-ts4.0/viewers/audio.d.ts +0 -31
- package/dist/types-ts4.0/viewers/base-viewer.d.ts +0 -28
- package/dist/types-ts4.0/viewers/codeViewer/codeViewerRenderer.d.ts +0 -31
- package/dist/types-ts4.0/viewers/codeViewer/index.d.ts +0 -25
- package/dist/types-ts4.0/viewers/codeViewer/msg-parser.d.ts +0 -8
- package/dist/types-ts4.0/viewers/codeViewer/styles.d.ts +0 -3
- package/dist/types-ts4.0/viewers/codeViewer/util.d.ts +0 -4
- package/dist/types-ts4.0/viewers/doc/index.d.ts +0 -27
- package/dist/types-ts4.0/viewers/doc/pdfRenderer.d.ts +0 -30
- package/dist/types-ts4.0/viewers/image/index.d.ts +0 -32
- package/dist/types-ts4.0/viewers/image/interactive-img.d.ts +0 -41
- package/dist/types-ts4.0/viewers/video.d.ts +0 -30
- package/dist/types-ts4.0/zoomControls.d.ts +0 -15
|
@@ -6,6 +6,11 @@ import { css } from '@emotion/react'; // AFP-2532 TODO: Fix automatic suppressio
|
|
|
6
6
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
7
7
|
|
|
8
8
|
import { colors } from '@atlaskit/theme';
|
|
9
|
-
|
|
10
|
-
export var
|
|
9
|
+
import { token } from '@atlaskit/tokens';
|
|
10
|
+
export var codeViewWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: ", ";\n overflow: auto;\n"])), token('elevation.surface', colors.N20));
|
|
11
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
12
|
+
|
|
13
|
+
export var codeViewerHeaderBarStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 75px;\n background-color: #1d2125;\n"])));
|
|
14
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
15
|
+
|
|
11
16
|
export var codeViewerHTMLStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n line-height: 20px;\n overflow-x: auto;\n white-space: pre;\n font-size: 12px;\n padding: 8px;\n"])));
|
|
@@ -29,9 +29,13 @@ import ErrorMessage from '../../errorMessage';
|
|
|
29
29
|
import { MediaViewerError } from '../../errors';
|
|
30
30
|
import { ZoomLevel } from '../../domain/zoomLevel';
|
|
31
31
|
export var pdfViewerClassName = 'pdfViewer';
|
|
32
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
33
|
+
|
|
32
34
|
var globalStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n margin-top: 64px;\n margin-bottom: 64px;\n .page {\n margin: 1px auto -8px auto;\n border: 9px solid transparent;\n position: relative;\n\n .canvasWrapper {\n overflow: hidden;\n }\n\n .textLayer {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n line-height: 1;\n font-family: sans-serif;\n opacity: 0.8;\n\n ::selection {\n background: rgb(0, 0, 255);\n }\n }\n\n .annotationLayer {\n position: absolute;\n top: 0;\n bottom: 0;\n }\n\n .textLayer > div,\n .annotationLayer > section {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n }\n .linkAnnotation > a {\n position: absolute;\n font-size: 1em;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .linkAnnotation > a {\n background: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7')\n 0 0 repeat;\n }\n\n .linkAnnotation > a:hover {\n opacity: 0.2;\n background: #ff0;\n box-shadow: 0 2px 10px #ff0;\n }\n }\n }\n"])), pdfViewerClassName);
|
|
33
35
|
/* eslint-enable no-unused-expressions */
|
|
34
36
|
|
|
37
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
38
|
+
|
|
35
39
|
pdfjsLib.GlobalWorkerOptions.workerSrc = '/'; // TODO: use web workers instead of fake worker.
|
|
36
40
|
|
|
37
41
|
var fetchPdf = function fetchPdf(url) {
|
|
@@ -254,9 +254,11 @@ export var InteractiveImgComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
254
254
|
|
|
255
255
|
if (!isHDAvailable) {
|
|
256
256
|
return null;
|
|
257
|
-
}
|
|
257
|
+
} // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
var hdPrimaryColor = isHDActivating ? B75 : isHDActive ? B200 : DN400; // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
258
261
|
|
|
259
|
-
var hdPrimaryColor = isHDActivating ? B75 : isHDActive ? B200 : DN400;
|
|
260
262
|
var hdSecondaryColor = isHDActive && !isHDActivating ? N0 : DN60;
|
|
261
263
|
var testId = isHDActivating ? 'hd-activating' : isHDActive ? 'hd-active' : 'hd-inactive';
|
|
262
264
|
return /*#__PURE__*/React.createElement(HDIconGroupWrapper, {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useThemeObserver } from '@atlaskit/tokens';
|
|
4
|
+
|
|
5
|
+
var withThemeObserverHOC = function withThemeObserverHOC(Component) {
|
|
6
|
+
return function (props) {
|
|
7
|
+
var theme = useThemeObserver();
|
|
8
|
+
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
9
|
+
theme: theme
|
|
10
|
+
}, props));
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default withThemeObserverHOC;
|
|
@@ -9,7 +9,9 @@ export interface AsyncMediaViewerState {
|
|
|
9
9
|
MediaViewer?: MediaViewerWithMediaClientConfigComponent;
|
|
10
10
|
MediaViewerErrorBoundary?: MediaViewerErrorBoundaryComponent;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export declare class AsyncMediaViewer extends React.PureComponent<MediaViewerWithMediaClientConfigProps & AsyncMediaViewerState & {
|
|
13
|
+
theme: 'light' | 'dark' | 'none';
|
|
14
|
+
}, AsyncMediaViewerState> {
|
|
13
15
|
static displayName: string;
|
|
14
16
|
static MediaViewer?: MediaViewerWithMediaClientConfigComponent;
|
|
15
17
|
static MediaViewerErrorBoundary?: MediaViewerErrorBoundaryComponent;
|
|
@@ -17,4 +19,5 @@ export default class AsyncMediaViewer extends React.PureComponent<MediaViewerWit
|
|
|
17
19
|
UNSAFE_componentWillMount(): Promise<void>;
|
|
18
20
|
render(): JSX.Element;
|
|
19
21
|
}
|
|
20
|
-
|
|
22
|
+
declare const _default: (props: any) => JSX.Element;
|
|
23
|
+
export default _default;
|
package/dist/types/header.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare type Props = {
|
|
|
13
13
|
readonly onSidebarButtonClick?: () => void;
|
|
14
14
|
readonly isSidebarVisible?: boolean;
|
|
15
15
|
readonly featureFlags?: MediaFeatureFlags;
|
|
16
|
+
readonly onSetArchiveSideBarVisible?: (isVisible: boolean) => void;
|
|
16
17
|
};
|
|
17
18
|
export declare type State = {
|
|
18
19
|
item: Outcome<FileState, MediaViewerError>;
|
package/dist/types/list.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare type NavigationProps = Readonly<{
|
|
|
7
7
|
items: Identifier[];
|
|
8
8
|
selectedItem: Identifier;
|
|
9
9
|
onChange: (item: Identifier) => void;
|
|
10
|
+
isArchiveSideBarVisible?: boolean;
|
|
10
11
|
}> & WithAnalyticsEventsProps;
|
|
11
12
|
export declare const nextNavButtonId = "media-viewer-navigation-next";
|
|
12
13
|
export declare const prevNavButtonId = "media-viewer-navigation-prev";
|
|
@@ -13,8 +13,11 @@ declare type DataTestID = {
|
|
|
13
13
|
};
|
|
14
14
|
declare type BlanketProps = DataTestID & Children & ClassName;
|
|
15
15
|
export declare const Blanket: ({ "data-testid": datatestId, className, children, }: BlanketProps) => jsx.JSX.Element;
|
|
16
|
+
declare type HeaderWrapperProps = {
|
|
17
|
+
isArchiveSideBarVisible: boolean;
|
|
18
|
+
};
|
|
16
19
|
export declare const HeaderWrapper: {
|
|
17
|
-
({ className, children, }: ClassName & Children): jsx.JSX.Element;
|
|
20
|
+
({ className, children, isArchiveSideBarVisible, }: ClassName & Children & HeaderWrapperProps): jsx.JSX.Element;
|
|
18
21
|
displayName: string;
|
|
19
22
|
};
|
|
20
23
|
export declare const ListWrapper: {
|
|
@@ -47,7 +50,10 @@ declare type VideoProps = {
|
|
|
47
50
|
export declare const Video: ({ autoPlay, controls, src }: VideoProps) => jsx.JSX.Element;
|
|
48
51
|
export declare const PDFWrapper: import("react").ForwardRefExoticComponent<DataTestID & Children & import("react").RefAttributes<unknown>>;
|
|
49
52
|
export declare const Arrow: ({ className, children }: ClassName & Children) => jsx.JSX.Element;
|
|
50
|
-
export declare
|
|
53
|
+
export declare type LeftWrapperProps = {
|
|
54
|
+
isArchiveSideBarVisible: boolean;
|
|
55
|
+
};
|
|
56
|
+
export declare const LeftWrapper: ({ children, isArchiveSideBarVisible, }: Children & LeftWrapperProps) => jsx.JSX.Element;
|
|
51
57
|
export declare const RightWrapper: ({ children }: Children) => jsx.JSX.Element;
|
|
52
58
|
export declare type HeaderProps = {
|
|
53
59
|
isArchiveSideBarVisible: boolean;
|
package/dist/types/styles.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { MediaType } from '@atlaskit/media-client';
|
|
2
|
-
export declare const blanketColor = "#
|
|
2
|
+
export declare const blanketColor = "#22272B";
|
|
3
|
+
export declare const headerAndSidebarBackgroundColor = "#101214";
|
|
3
4
|
export declare const blanketStyles: import("@emotion/react").SerializedStyles;
|
|
4
|
-
export declare
|
|
5
|
+
export declare type HeaderWrapperProps = {
|
|
6
|
+
isArchiveSideBarVisible: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const headerWrapperStyles: ({ isArchiveSideBarVisible, }: HeaderWrapperProps) => import("@emotion/react").SerializedStyles;
|
|
5
9
|
export interface ContentWrapperProps {
|
|
6
10
|
showControls: boolean;
|
|
7
11
|
}
|
|
@@ -21,7 +25,10 @@ export declare const errorImageStyles: import("@emotion/react").SerializedStyles
|
|
|
21
25
|
export declare const videoStyles: import("@emotion/react").SerializedStyles;
|
|
22
26
|
export declare const pdfWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
23
27
|
export declare const arrowStyles: import("@emotion/react").SerializedStyles;
|
|
24
|
-
export declare
|
|
28
|
+
export declare type LeftWrapperProps = {
|
|
29
|
+
isArchiveSideBarVisible: boolean;
|
|
30
|
+
};
|
|
31
|
+
export declare const leftWrapperStyles: ({ isArchiveSideBarVisible, }: LeftWrapperProps) => import("@emotion/react").SerializedStyles;
|
|
25
32
|
export declare const rightWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
26
33
|
export declare type HeaderProps = {
|
|
27
34
|
isArchiveSideBarVisible: boolean;
|
|
@@ -53,5 +60,4 @@ export declare const downloadButtonWrapperStyles: import("@emotion/react").Seria
|
|
|
53
60
|
export declare const customVideoPlayerWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
54
61
|
export declare const sidebarWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
55
62
|
export declare const spinnerWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
56
|
-
export declare const errorReasonTipStyles: import("@emotion/react").SerializedStyles;
|
|
57
63
|
export declare const formattedMessageWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -2,11 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import { ZipEntry } from 'unzipit';
|
|
3
3
|
import { MediaClient } from '@atlaskit/media-client';
|
|
4
4
|
import { ArchiveViewerError } from '../../errors';
|
|
5
|
+
declare type Entries = {
|
|
6
|
+
[key: string]: ZipEntry;
|
|
7
|
+
};
|
|
5
8
|
export interface ArchiveSidebarFolderProps {
|
|
6
9
|
root: string;
|
|
7
|
-
entries:
|
|
8
|
-
[key: string]: ZipEntry;
|
|
9
|
-
};
|
|
10
|
+
entries: Entries;
|
|
10
11
|
onEntrySelected: (selectedEntry: ZipEntry) => void;
|
|
11
12
|
hideHeader?: boolean;
|
|
12
13
|
name?: string;
|
|
@@ -19,7 +20,8 @@ export declare class ArchiveSidebarFolderEntry extends React.Component<ArchiveSi
|
|
|
19
20
|
private renderEntryIcon;
|
|
20
21
|
private renderDownloadButton;
|
|
21
22
|
private downloadZipEntry;
|
|
22
|
-
private isDirectChild;
|
|
23
23
|
private formatName;
|
|
24
|
+
private renderSidebarContent;
|
|
24
25
|
render(): JSX.Element;
|
|
25
26
|
}
|
|
27
|
+
export {};
|
|
@@ -11,7 +11,6 @@ export declare const separatorStyles: import("@emotion/react").SerializedStyles;
|
|
|
11
11
|
export declare const sidebarHeaderWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
12
12
|
export declare const sidebarHeaderIconStyles: import("@emotion/react").SerializedStyles;
|
|
13
13
|
export declare const sidebarHeaderEntryStyles: import("@emotion/react").SerializedStyles;
|
|
14
|
-
/** TODO Replace background colors of item with theme from @atlaskit/tokens once ready*/
|
|
15
14
|
export declare const itemStyle: {
|
|
16
15
|
backgroundColor: string;
|
|
17
16
|
fill: string;
|
|
@@ -20,4 +19,8 @@ export declare const itemStyle: {
|
|
|
20
19
|
backgroundColor: string;
|
|
21
20
|
color: string;
|
|
22
21
|
};
|
|
22
|
+
':active': {
|
|
23
|
+
backgroundColor: string;
|
|
24
|
+
color: string;
|
|
25
|
+
};
|
|
23
26
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
import { token } from '@atlaskit/tokens';
|
|
2
3
|
|
|
3
4
|
export const containerStyles = css`
|
|
4
5
|
display: flex;
|
|
@@ -21,7 +22,7 @@ export const mVSidebarStyles = css`
|
|
|
21
22
|
overflow: auto;
|
|
22
23
|
|
|
23
24
|
h2 {
|
|
24
|
-
color:
|
|
25
|
+
color: ${token('color.text', '#c7d1db')};
|
|
25
26
|
margin-bottom: 16px;
|
|
26
27
|
}
|
|
27
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "47.
|
|
3
|
+
"version": "47.2.0",
|
|
4
4
|
"description": "MediaViewer is Atlassian's powerful solution for viewing files on the web. It's both powerful and extendable yet easy-to-integrate",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,13 +12,6 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
-
"typesVersions": {
|
|
16
|
-
">=4.0 <4.5": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.0/*"
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
15
|
"sideEffects": false,
|
|
23
16
|
"atlaskit:src": "src/index.ts",
|
|
24
17
|
"af:exports": {
|
|
@@ -35,16 +28,17 @@
|
|
|
35
28
|
},
|
|
36
29
|
"dependencies": {
|
|
37
30
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
38
|
-
"@atlaskit/button": "^16.
|
|
31
|
+
"@atlaskit/button": "^16.5.0",
|
|
39
32
|
"@atlaskit/code": "^14.4.0",
|
|
40
33
|
"@atlaskit/icon": "^21.11.0",
|
|
41
34
|
"@atlaskit/icon-file-type": "^6.3.0",
|
|
42
|
-
"@atlaskit/media-client": "^
|
|
43
|
-
"@atlaskit/media-common": "^2.
|
|
44
|
-
"@atlaskit/media-ui": "^22.
|
|
45
|
-
"@atlaskit/side-navigation": "^1.
|
|
46
|
-
"@atlaskit/spinner": "^15.
|
|
35
|
+
"@atlaskit/media-client": "^19.0.0",
|
|
36
|
+
"@atlaskit/media-common": "^2.17.0",
|
|
37
|
+
"@atlaskit/media-ui": "^22.2.0",
|
|
38
|
+
"@atlaskit/side-navigation": "^1.4.0",
|
|
39
|
+
"@atlaskit/spinner": "^15.3.0",
|
|
47
40
|
"@atlaskit/theme": "^12.2.0",
|
|
41
|
+
"@atlaskit/tokens": "^0.11.1",
|
|
48
42
|
"@atlaskit/ufo": "^0.1.0",
|
|
49
43
|
"@babel/runtime": "^7.0.0",
|
|
50
44
|
"@kenjiuno/msgreader": "^1.2.6",
|
|
@@ -61,9 +55,9 @@
|
|
|
61
55
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
62
56
|
},
|
|
63
57
|
"devDependencies": {
|
|
64
|
-
"@atlaskit/button": "^16.
|
|
58
|
+
"@atlaskit/button": "^16.5.0",
|
|
65
59
|
"@atlaskit/docs": "*",
|
|
66
|
-
"@atlaskit/media-card": "^74.
|
|
60
|
+
"@atlaskit/media-card": "^74.3.0",
|
|
67
61
|
"@atlaskit/media-core": "^34.0.0",
|
|
68
62
|
"@atlaskit/media-integration-test-helpers": "^2.6.0",
|
|
69
63
|
"@atlaskit/media-test-helpers": "^30.0.0",
|
|
@@ -86,5 +80,10 @@
|
|
|
86
80
|
"typescript": "4.5.5",
|
|
87
81
|
"wait-for-expect": "^1.2.0"
|
|
88
82
|
},
|
|
89
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
83
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
84
|
+
"techstack": {
|
|
85
|
+
"@repo/internal": {
|
|
86
|
+
"theming": "tokens"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
90
89
|
}
|
package/report.api.md
CHANGED
|
@@ -1,50 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- API Report Version: 2.2 -->
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## API Report File for "@atlaskit/media-viewer"
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
|
|
6
|
+
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
|
+
|
|
8
|
+
### Table of contents
|
|
9
|
+
|
|
10
|
+
- [Main Entry Types](#main-entry-types)
|
|
11
|
+
|
|
12
|
+
### Main Entry Types
|
|
13
|
+
|
|
14
|
+
<!--SECTION START: Main Entry Types-->
|
|
6
15
|
|
|
7
16
|
```ts
|
|
8
17
|
import { Identifier } from '@atlaskit/media-client';
|
|
9
18
|
import { MediaClient } from '@atlaskit/media-client';
|
|
10
19
|
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
11
|
-
import { default as React_2 } from 'react';
|
|
12
20
|
import { ReactNode } from 'react';
|
|
13
|
-
import { WithMediaClientConfigProps } from '@atlaskit/media-client';
|
|
14
21
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
MediaViewerErrorBoundary?: MediaViewerErrorBoundaryComponent;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export declare class MediaViewer extends React_2.PureComponent<
|
|
21
|
-
MediaViewerWithMediaClientConfigProps & AsyncMediaViewerState,
|
|
22
|
-
AsyncMediaViewerState
|
|
23
|
-
> {
|
|
24
|
-
static displayName: string;
|
|
25
|
-
static MediaViewer?: MediaViewerWithMediaClientConfigComponent;
|
|
26
|
-
static MediaViewerErrorBoundary?: MediaViewerErrorBoundaryComponent;
|
|
27
|
-
state: AsyncMediaViewerState;
|
|
28
|
-
UNSAFE_componentWillMount(): Promise<void>;
|
|
29
|
-
render(): JSX.Element;
|
|
30
|
-
}
|
|
22
|
+
// @public (undocumented)
|
|
23
|
+
export const MediaViewer: (props: any) => JSX.Element;
|
|
31
24
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export declare interface MediaViewerDataSource {
|
|
39
|
-
list?: Array<Identifier>;
|
|
25
|
+
// @public (undocumented)
|
|
26
|
+
export interface MediaViewerDataSource {
|
|
27
|
+
// (undocumented)
|
|
40
28
|
collectionName?: string;
|
|
29
|
+
// (undocumented)
|
|
30
|
+
list?: Array<Identifier>;
|
|
41
31
|
}
|
|
42
32
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
export declare interface MediaViewerExtensions {
|
|
33
|
+
// @public (undocumented)
|
|
34
|
+
export interface MediaViewerExtensions {
|
|
35
|
+
// (undocumented)
|
|
48
36
|
sidebar?: {
|
|
49
37
|
icon: ReactNode;
|
|
50
38
|
renderer: (
|
|
@@ -54,29 +42,35 @@ export declare interface MediaViewerExtensions {
|
|
|
54
42
|
};
|
|
55
43
|
}
|
|
56
44
|
|
|
57
|
-
|
|
45
|
+
// @public (undocumented)
|
|
46
|
+
export interface MediaViewerExtensionsActions {
|
|
47
|
+
// (undocumented)
|
|
58
48
|
close: () => void;
|
|
59
49
|
}
|
|
60
50
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
readonly dataSource: MediaViewerDataSource;
|
|
51
|
+
// @public (undocumented)
|
|
52
|
+
export interface MediaViewerProps {
|
|
53
|
+
// (undocumented)
|
|
65
54
|
readonly collectionName: string;
|
|
66
|
-
|
|
67
|
-
readonly onClose?: () => void;
|
|
68
|
-
readonly featureFlags?: MediaFeatureFlags;
|
|
69
|
-
readonly extensions?: MediaViewerExtensions;
|
|
55
|
+
// (undocumented)
|
|
70
56
|
readonly contextId?: string;
|
|
57
|
+
// (undocumented)
|
|
58
|
+
readonly dataSource: MediaViewerDataSource;
|
|
59
|
+
// (undocumented)
|
|
60
|
+
readonly extensions?: MediaViewerExtensions;
|
|
61
|
+
// (undocumented)
|
|
62
|
+
readonly featureFlags?: MediaFeatureFlags;
|
|
63
|
+
// (undocumented)
|
|
64
|
+
readonly mediaClient: MediaClient;
|
|
65
|
+
// (undocumented)
|
|
66
|
+
readonly onClose?: () => void;
|
|
67
|
+
// (undocumented)
|
|
68
|
+
readonly pageSize?: number;
|
|
69
|
+
// (undocumented)
|
|
70
|
+
readonly selectedItem: Identifier;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
MediaViewerWithMediaClientConfigProps
|
|
75
|
-
>;
|
|
76
|
-
|
|
77
|
-
declare type MediaViewerWithMediaClientConfigProps = WithMediaClientConfigProps<
|
|
78
|
-
MediaViewerProps
|
|
79
|
-
>;
|
|
80
|
-
|
|
81
|
-
export {};
|
|
73
|
+
// (No @packageDocumentation comment for this package)
|
|
82
74
|
```
|
|
75
|
+
|
|
76
|
+
<!--SECTION END: Main Entry Types-->
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CommencedEventPayload } from './operational/commenced';
|
|
2
|
-
import { LoadFailedEventPayload } from './operational/loadFailed';
|
|
3
|
-
import { LoadSucceededEventPayload } from './operational/loadSucceeded';
|
|
4
|
-
import { PreviewUnsupportedEventPayload } from './operational/previewUnsupported';
|
|
5
|
-
import { ZipEntryLoadFailedEventPayload } from './operational/zipEntryLoadFailed';
|
|
6
|
-
import { ZipEntryLoadSucceededEventPayload } from './operational/zipEntryLoadSucceeded';
|
|
7
|
-
import { ModalEventPayload } from './screen/modal';
|
|
8
|
-
import { ClosedEventPayload } from './ui/closed';
|
|
9
|
-
import { DownloadButtonClickedEventPayload } from './ui/downloadButtonClicked';
|
|
10
|
-
import { FailedPreviewDownloadButtonClickedEventPayload } from './ui/failedPreviewDownloadButtonClicked';
|
|
11
|
-
import { NavigatedEventPayload } from './ui/navigated';
|
|
12
|
-
import { ZoomInButtonClickEventPayload } from './ui/zoomInButtonClicked';
|
|
13
|
-
import { ZoomOutButtonClickEventPayload } from './ui/zoomOutButtonClicked';
|
|
14
|
-
export declare type MediaViewerEventPayload = CommencedEventPayload | LoadFailedEventPayload | LoadSucceededEventPayload | PreviewUnsupportedEventPayload | ZipEntryLoadFailedEventPayload | ZipEntryLoadSucceededEventPayload | ModalEventPayload | ClosedEventPayload | DownloadButtonClickedEventPayload | FailedPreviewDownloadButtonClickedEventPayload | NavigatedEventPayload | ZoomInButtonClickEventPayload | ZoomOutButtonClickEventPayload;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { OperationalEventPayload, OperationalAttributes } from '@atlaskit/media-common';
|
|
2
|
-
/** common definition used by other mediaFile events */
|
|
3
|
-
export declare type MediaFileEventPayload<Attributes extends OperationalAttributes, Action extends 'commenced' | 'loadSucceeded' | 'loadFailed' | 'previewUnsupported' | 'zipEntryLoadSucceeded' | 'zipEntryLoadFailed'> = OperationalEventPayload<Attributes, Action, 'mediaFile'>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { WithFileAttributes } from '@atlaskit/media-common';
|
|
2
|
-
import { MediaFileEventPayload } from './_mediaFile';
|
|
3
|
-
export declare type CommencedAttributes = WithFileAttributes;
|
|
4
|
-
export declare type CommencedEventPayload = MediaFileEventPayload<CommencedAttributes, 'commenced'>;
|
|
5
|
-
export declare const createCommencedEvent: (fileId: string) => CommencedEventPayload;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { FileState } from '@atlaskit/media-client';
|
|
2
|
-
import { MediaFileEventPayload } from './_mediaFile';
|
|
3
|
-
import { MediaViewerFailureAttributes } from '../..';
|
|
4
|
-
import { MediaViewerError } from '../../../errors';
|
|
5
|
-
export declare type LoadFailedEventPayload = MediaFileEventPayload<MediaViewerFailureAttributes, 'loadFailed'>;
|
|
6
|
-
export declare const createLoadFailedEvent: (fileId: string, error: MediaViewerError, fileState?: FileState | undefined) => LoadFailedEventPayload;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { SuccessAttributes, WithFileAttributes, FileAttributes } from '@atlaskit/media-common';
|
|
2
|
-
import { MediaFileEventPayload } from './_mediaFile';
|
|
3
|
-
export declare type LoadSucceededAttributes = SuccessAttributes & WithFileAttributes;
|
|
4
|
-
export declare type LoadSucceededEventPayload = MediaFileEventPayload<LoadSucceededAttributes, 'loadSucceeded'>;
|
|
5
|
-
export declare const createLoadSucceededEvent: ({ fileId, fileMediatype, fileMimetype, fileSize, }: FileAttributes) => LoadSucceededEventPayload;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { FileState } from '@atlaskit/media-client';
|
|
2
|
-
import { WithFileAttributes } from '@atlaskit/media-common';
|
|
3
|
-
import { MediaFileEventPayload } from './_mediaFile';
|
|
4
|
-
export declare type PreviewUnsupportedAttributes = WithFileAttributes;
|
|
5
|
-
export declare type PreviewUnsupportedEventPayload = MediaFileEventPayload<PreviewUnsupportedAttributes, 'previewUnsupported'>;
|
|
6
|
-
export declare const createPreviewUnsupportedEvent: (fileState: FileState) => PreviewUnsupportedEventPayload;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FileState } from '@atlaskit/media-client';
|
|
2
|
-
import { ZipEntry } from 'unzipit';
|
|
3
|
-
import { MediaFileEventPayload } from './_mediaFile';
|
|
4
|
-
import { MediaViewerFailureAttributes } from '../..';
|
|
5
|
-
import { MediaViewerError } from '../../../errors';
|
|
6
|
-
export declare type ZipEntryLoadFailedAttributes = MediaViewerFailureAttributes & {
|
|
7
|
-
size: number;
|
|
8
|
-
encrypted: boolean;
|
|
9
|
-
compressedSize: number;
|
|
10
|
-
mimeType: string;
|
|
11
|
-
};
|
|
12
|
-
export declare type ZipEntryLoadFailedEventPayload = MediaFileEventPayload<ZipEntryLoadFailedAttributes, 'zipEntryLoadFailed'>;
|
|
13
|
-
export declare const createZipEntryLoadFailedEvent: (fileState: FileState, error: MediaViewerError, zipEntry?: ZipEntry | undefined) => ZipEntryLoadFailedEventPayload;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FileState } from '@atlaskit/media-client';
|
|
2
|
-
import { SuccessAttributes, WithFileAttributes } from '@atlaskit/media-common/analytics';
|
|
3
|
-
import { ZipEntry } from 'unzipit';
|
|
4
|
-
import { MediaFileEventPayload } from './_mediaFile';
|
|
5
|
-
export declare type ZipEntryLoadSucceededAttributes = SuccessAttributes & WithFileAttributes & {
|
|
6
|
-
size: number;
|
|
7
|
-
encrypted: boolean;
|
|
8
|
-
compressedSize: number;
|
|
9
|
-
mimeType: string;
|
|
10
|
-
};
|
|
11
|
-
export declare type ZipEntryLoadSucceededEventPayload = MediaFileEventPayload<ZipEntryLoadSucceededAttributes, 'zipEntryLoadSucceeded'>;
|
|
12
|
-
export declare const createZipEntryLoadSucceededEvent: (fileState: FileState, zipEntry: ZipEntry) => ZipEntryLoadSucceededEventPayload;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { UIEventPayload } from '@atlaskit/media-common';
|
|
2
|
-
export declare type ClosedInputType = 'button' | 'blanket' | 'escKey';
|
|
3
|
-
export interface ClosedAttributes {
|
|
4
|
-
input: ClosedInputType;
|
|
5
|
-
sessionDurationMs: number;
|
|
6
|
-
}
|
|
7
|
-
export declare type ClosedEventPayload = UIEventPayload<ClosedAttributes, 'closed', 'mediaViewer'>;
|
|
8
|
-
export declare const createClosedEvent: (input: ClosedInputType) => ClosedEventPayload;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { WithFileAttributes } from '@atlaskit/media-common';
|
|
2
|
-
import { FileStatus, FileState } from '@atlaskit/media-client';
|
|
3
|
-
import { ButtonClickEventPayload } from './_clickedButton';
|
|
4
|
-
export declare type DownloadButtonClickedAttributes = WithFileAttributes & {
|
|
5
|
-
fileProcessingStatus: FileStatus;
|
|
6
|
-
};
|
|
7
|
-
export declare type DownloadButtonClickedEventPayload = ButtonClickEventPayload<DownloadButtonClickedAttributes>;
|
|
8
|
-
export declare const createDownloadButtonClickedEvent: (fileState: FileState) => DownloadButtonClickedEventPayload;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { WithFileAttributes } from '@atlaskit/media-common';
|
|
2
|
-
import { FileStatus, FileState } from '@atlaskit/media-client';
|
|
3
|
-
import { ButtonClickEventPayload } from './_clickedButton';
|
|
4
|
-
import { PrimaryErrorReason, MediaViewerError } from '../../../errors';
|
|
5
|
-
export declare type FailedPreviewDownloadButtonClickedAttributes = WithFileAttributes & {
|
|
6
|
-
fileProcessingStatus: FileStatus;
|
|
7
|
-
failReason: PrimaryErrorReason;
|
|
8
|
-
};
|
|
9
|
-
export declare type FailedPreviewDownloadButtonClickedEventPayload = ButtonClickEventPayload<FailedPreviewDownloadButtonClickedAttributes>;
|
|
10
|
-
export declare const createFailedPreviewDownloadButtonClickedEvent: (fileState: FileState, error: MediaViewerError) => FailedPreviewDownloadButtonClickedEventPayload;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { UIEventPayload, UIAttributes, WithFileAttributes } from '@atlaskit/media-common';
|
|
2
|
-
import { Identifier } from '@atlaskit/media-client';
|
|
3
|
-
import { NavigationDirection, NavigationSource } from '../../../navigation';
|
|
4
|
-
export declare type NavigatedAttributes = UIAttributes & WithFileAttributes & {
|
|
5
|
-
input: 'button' | 'keys';
|
|
6
|
-
};
|
|
7
|
-
export declare type NavigatedEventPayload = UIEventPayload<NavigatedAttributes, 'navigated', 'file'> & {
|
|
8
|
-
actionSubjectId: 'next' | 'previous';
|
|
9
|
-
};
|
|
10
|
-
export declare type NavigatedInput = 'button' | 'keys';
|
|
11
|
-
export declare const inputFromSource: (source: NavigationSource) => NavigatedInput;
|
|
12
|
-
export declare const createNavigatedEvent: (direction: NavigationDirection, source: NavigationSource, identifier: Identifier) => NavigatedEventPayload;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ButtonClickEventPayload } from './_clickedButton';
|
|
2
|
-
export declare type ZoomButtonClickAttributes = {
|
|
3
|
-
zoomScale: number;
|
|
4
|
-
};
|
|
5
|
-
export declare type ZoomInButtonClickEventPayload = ButtonClickEventPayload<ZoomButtonClickAttributes> & {
|
|
6
|
-
actionSubjectId: 'zoomIn';
|
|
7
|
-
};
|
|
8
|
-
export declare function createZoomInButtonClickEvent(zoomScale: number): ZoomInButtonClickEventPayload;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ButtonClickEventPayload } from './_clickedButton';
|
|
2
|
-
import { ZoomButtonClickAttributes } from './zoomInButtonClicked';
|
|
3
|
-
export declare type ZoomOutButtonClickEventPayload = ButtonClickEventPayload<ZoomButtonClickAttributes> & {
|
|
4
|
-
actionSubjectId: 'zoomOut';
|
|
5
|
-
};
|
|
6
|
-
export declare function createZoomOutButtonClickedEvent(zoomScale: number): ZoomOutButtonClickEventPayload;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { FileState, RequestMetadata } from '@atlaskit/media-client';
|
|
2
|
-
import { FileAttributes, WithFileAttributes, FailureAttributes } from '@atlaskit/media-common';
|
|
3
|
-
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
|
-
import { PrimaryErrorReason } from '../errors';
|
|
5
|
-
import { MediaViewerEventPayload } from './events';
|
|
6
|
-
declare const componentName = "mediaViewer";
|
|
7
|
-
declare const packageName: string;
|
|
8
|
-
declare const packageVersion: string;
|
|
9
|
-
export { packageName, packageVersion, componentName, componentName as component, };
|
|
10
|
-
export declare const relevantFlags: {
|
|
11
|
-
newCardExperience: boolean;
|
|
12
|
-
captions: boolean;
|
|
13
|
-
timestampOnVideo: boolean;
|
|
14
|
-
observedWidth: boolean;
|
|
15
|
-
mediaInline: boolean;
|
|
16
|
-
folderUploads: boolean;
|
|
17
|
-
mediaUploadApiV2: boolean;
|
|
18
|
-
memoryCacheLogging: boolean;
|
|
19
|
-
};
|
|
20
|
-
export declare const LOGGED_FEATURE_FLAGS: (keyof import("@atlaskit/media-common").MediaFeatureFlags)[];
|
|
21
|
-
export declare const LOGGED_FEATURE_FLAG_KEYS: string[];
|
|
22
|
-
export declare function getFileAttributes(fileState?: FileState): FileAttributes;
|
|
23
|
-
/** This type takes FailureAttributes and redefines `failReason` to be the strong media-viewer type */
|
|
24
|
-
export declare type MediaViewerFailureAttributes = Omit<FailureAttributes, 'failReason'> & {
|
|
25
|
-
failReason: PrimaryErrorReason;
|
|
26
|
-
request?: RequestMetadata;
|
|
27
|
-
} & WithFileAttributes;
|
|
28
|
-
export declare function fireAnalytics(payload: MediaViewerEventPayload, props: WithAnalyticsEventsProps): void;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { FileAttributes } from '@atlaskit/media-common';
|
|
2
|
-
import { RequestMetadata } from '@atlaskit/media-client';
|
|
3
|
-
import { PrimaryErrorReason } from '../errors';
|
|
4
|
-
import { FileStateFlags } from '../components/types';
|
|
5
|
-
export declare type UFOFailedEventPayload = {
|
|
6
|
-
failReason?: PrimaryErrorReason;
|
|
7
|
-
error?: string;
|
|
8
|
-
errorDetail?: string;
|
|
9
|
-
request?: RequestMetadata;
|
|
10
|
-
fileAttributes: FileAttributes;
|
|
11
|
-
fileStateFlags?: FileStateFlags;
|
|
12
|
-
};
|
|
13
|
-
export declare type UFOSucceedEventPayload = {
|
|
14
|
-
fileAttributes: FileAttributes;
|
|
15
|
-
fileStateFlags?: FileStateFlags;
|
|
16
|
-
};
|
|
17
|
-
export declare const startMediaFileUfoExperience: () => void;
|
|
18
|
-
export declare const succeedMediaFileUfoExperience: (properties?: UFOSucceedEventPayload | undefined) => void;
|
|
19
|
-
export declare const failMediaFileUfoExperience: (properties?: UFOFailedEventPayload | undefined) => void;
|