@atlaskit/media-card 74.1.4 → 74.1.5
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 +6 -0
- package/classnames/package.json +1 -1
- package/dist/cjs/root/card/getCardPreview/helpers.js +4 -4
- package/dist/cjs/root/card/getCardPreview/index.js +1 -1
- package/dist/cjs/root/card/index.js +1 -1
- package/dist/cjs/root/inlinePlayer.js +2 -2
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/root/card/getCardPreview/helpers.js +4 -4
- package/dist/es2019/root/card/getCardPreview/index.js +1 -1
- package/dist/es2019/root/card/index.js +1 -1
- package/dist/es2019/root/inlinePlayer.js +2 -2
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/root/card/getCardPreview/helpers.js +4 -4
- package/dist/esm/root/card/getCardPreview/index.js +1 -1
- package/dist/esm/root/card/index.js +1 -1
- package/dist/esm/root/inlinePlayer.js +2 -2
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types-ts4.0/__tests_external__/index.d.ts +1 -0
- package/dist/types-ts4.0/__tests_external__/page-objects/MediaCard.d.ts +8 -0
- package/dist/types-ts4.0/actions.d.ts +9 -0
- package/dist/types-ts4.0/classnames.d.ts +1 -0
- package/dist/types-ts4.0/errors.d.ts +41 -0
- package/dist/types-ts4.0/files/cardImageView/cardImageViewWrapper.d.ts +6 -0
- package/dist/types-ts4.0/files/cardImageView/cardOverlay/cardOverlayComponents.d.ts +8 -0
- package/dist/types-ts4.0/files/cardImageView/cardOverlay/index.d.ts +39 -0
- package/dist/types-ts4.0/files/cardImageView/cardOverlay/styles.d.ts +26 -0
- package/dist/types-ts4.0/files/cardImageView/classnames.d.ts +2 -0
- package/dist/types-ts4.0/files/cardImageView/index.d.ts +50 -0
- package/dist/types-ts4.0/files/cardImageView/styles.d.ts +24 -0
- package/dist/types-ts4.0/files/index.d.ts +2 -0
- package/dist/types-ts4.0/in-product.d.ts +1 -0
- package/dist/types-ts4.0/index.d.ts +77 -0
- package/dist/types-ts4.0/root/card/cardAnalytics.d.ts +9 -0
- package/dist/types-ts4.0/root/card/cardConstants.d.ts +1 -0
- package/dist/types-ts4.0/root/card/cardLoader.d.ts +6 -0
- package/dist/types-ts4.0/root/card/cardState.d.ts +5 -0
- package/dist/types-ts4.0/root/card/getCardPreview/cache.d.ts +19 -0
- package/dist/types-ts4.0/root/card/getCardPreview/filePreviewStatus.d.ts +5 -0
- package/dist/types-ts4.0/root/card/getCardPreview/helpers.d.ts +9 -0
- package/dist/types-ts4.0/root/card/getCardPreview/index.d.ts +56 -0
- package/dist/types-ts4.0/root/card/getCardStatus.d.ts +4 -0
- package/dist/types-ts4.0/root/card/imageRefetchingAnalytics.d.ts +10 -0
- package/dist/types-ts4.0/root/card/index.d.ts +58 -0
- package/dist/types-ts4.0/root/cardView.d.ts +80 -0
- package/dist/types-ts4.0/root/cardViewWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/index.d.ts +2 -0
- package/dist/types-ts4.0/root/inline/loader.d.ts +25 -0
- package/dist/types-ts4.0/root/inline/mediaInlineCard.d.ts +14 -0
- package/dist/types-ts4.0/root/inlinePlayer.d.ts +51 -0
- package/dist/types-ts4.0/root/inlinePlayerLazy.d.ts +2 -0
- package/dist/types-ts4.0/root/inlinePlayerWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/media-card-analytics-error-boundary.d.ts +10 -0
- package/dist/types-ts4.0/root/styles.d.ts +10 -0
- package/dist/types-ts4.0/root/types.d.ts +24 -0
- package/dist/types-ts4.0/root/ui/actionsBar/actionsBar.d.ts +5 -0
- package/dist/types-ts4.0/root/ui/actionsBar/actionsBarWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/actionsBar/styles.d.ts +6 -0
- package/dist/types-ts4.0/root/ui/actionsBar/types.d.ts +10 -0
- package/dist/types-ts4.0/root/ui/blanket/blanket.d.ts +6 -0
- package/dist/types-ts4.0/root/ui/blanket/styles.d.ts +6 -0
- package/dist/types-ts4.0/root/ui/common.d.ts +23 -0
- package/dist/types-ts4.0/root/ui/iconMessage/iconMessageWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/iconMessage/index.d.ts +8 -0
- package/dist/types-ts4.0/root/ui/iconMessage/styles.d.ts +5 -0
- package/dist/types-ts4.0/root/ui/iconMessage/types.d.ts +19 -0
- package/dist/types-ts4.0/root/ui/iconWrapper/iconWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/iconWrapper/styles.d.ts +7 -0
- package/dist/types-ts4.0/root/ui/iconWrapper/types.d.ts +6 -0
- package/dist/types-ts4.0/root/ui/imageRenderer/imageRenderer.d.ts +15 -0
- package/dist/types-ts4.0/root/ui/loadingRateLimited/styles.d.ts +13 -0
- package/dist/types-ts4.0/root/ui/newFileExperience/newFileExperienceWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/newFileExperience/styles.d.ts +5 -0
- package/dist/types-ts4.0/root/ui/newFileExperience/types.d.ts +23 -0
- package/dist/types-ts4.0/root/ui/playButton/playButton.d.ts +2 -0
- package/dist/types-ts4.0/root/ui/playButton/playButtonBackground.d.ts +3 -0
- package/dist/types-ts4.0/root/ui/playButton/playButtonWrapper.d.ts +3 -0
- package/dist/types-ts4.0/root/ui/playButton/styles.d.ts +5 -0
- package/dist/types-ts4.0/root/ui/progressBar/progressBar.d.ts +10 -0
- package/dist/types-ts4.0/root/ui/progressBar/styledBar.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/progressBar/styles.d.ts +7 -0
- package/dist/types-ts4.0/root/ui/progressBar/types.d.ts +7 -0
- package/dist/types-ts4.0/root/ui/styles.d.ts +11 -0
- package/dist/types-ts4.0/root/ui/tickBox/styles.d.ts +7 -0
- package/dist/types-ts4.0/root/ui/tickBox/tickBox.d.ts +3 -0
- package/dist/types-ts4.0/root/ui/tickBox/tickBoxWrapper.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/tickBox/types.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/titleBox/failedTitleBox.d.ts +3 -0
- package/dist/types-ts4.0/root/ui/titleBox/styles.d.ts +15 -0
- package/dist/types-ts4.0/root/ui/titleBox/titleBox.d.ts +4 -0
- package/dist/types-ts4.0/root/ui/titleBox/titleBoxComponents.d.ts +8 -0
- package/dist/types-ts4.0/root/ui/titleBox/types.d.ts +32 -0
- package/dist/types-ts4.0/styles/animations.d.ts +1 -0
- package/dist/types-ts4.0/styles/config.d.ts +1 -0
- package/dist/types-ts4.0/styles/easing.d.ts +2 -0
- package/dist/types-ts4.0/styles/getSelectedBorderStyle.d.ts +3 -0
- package/dist/types-ts4.0/styles/index.d.ts +9 -0
- package/dist/types-ts4.0/styles/mixins.d.ts +21 -0
- package/dist/types-ts4.0/types.d.ts +25 -0
- package/dist/types-ts4.0/utils/analytics.d.ts +78 -0
- package/dist/types-ts4.0/utils/breakpoint.d.ts +11 -0
- package/dist/types-ts4.0/utils/cardActions/cardActionButton.d.ts +4 -0
- package/dist/types-ts4.0/utils/cardActions/cardActionIconButton.d.ts +12 -0
- package/dist/types-ts4.0/utils/cardActions/cardActionsDropdownMenu.d.ts +14 -0
- package/dist/types-ts4.0/utils/cardActions/cardActionsView.d.ts +16 -0
- package/dist/types-ts4.0/utils/cardActions/index.d.ts +7 -0
- package/dist/types-ts4.0/utils/cardActions/styles.d.ts +18 -0
- package/dist/types-ts4.0/utils/cardDimensions.d.ts +53 -0
- package/dist/types-ts4.0/utils/containsPixelUnit.d.ts +1 -0
- package/dist/types-ts4.0/utils/dimensionComparer.d.ts +3 -0
- package/dist/types-ts4.0/utils/document.d.ts +2 -0
- package/dist/types-ts4.0/utils/errorIcon/index.d.ts +12 -0
- package/dist/types-ts4.0/utils/errorIcon/styles.d.ts +1 -0
- package/dist/types-ts4.0/utils/fileIcon/index.d.ts +12 -0
- package/dist/types-ts4.0/utils/fileIcon/styles.d.ts +1 -0
- package/dist/types-ts4.0/utils/generateUniqueId.d.ts +1 -0
- package/dist/types-ts4.0/utils/getCSSUnitValue.d.ts +1 -0
- package/dist/types-ts4.0/utils/getDataURIDimension.d.ts +9 -0
- package/dist/types-ts4.0/utils/getElementDimension.d.ts +2 -0
- package/dist/types-ts4.0/utils/getErrorMessage.d.ts +2 -0
- package/dist/types-ts4.0/utils/getMediaCardCursor.d.ts +6 -0
- package/dist/types-ts4.0/utils/globalScope/getSSRData.d.ts +3 -0
- package/dist/types-ts4.0/utils/globalScope/globalScope.d.ts +21 -0
- package/dist/types-ts4.0/utils/globalScope/index.d.ts +4 -0
- package/dist/types-ts4.0/utils/globalScope/types.d.ts +8 -0
- package/dist/types-ts4.0/utils/index.d.ts +15 -0
- package/dist/types-ts4.0/utils/isRetina.d.ts +1 -0
- package/dist/types-ts4.0/utils/isValidPercentageUnit.d.ts +1 -0
- package/dist/types-ts4.0/utils/lightCards/cardError.d.ts +12 -0
- package/dist/types-ts4.0/utils/lightCards/cardLoading.d.ts +5 -0
- package/dist/types-ts4.0/utils/lightCards/getDimensionsWithDefault.d.ts +2 -0
- package/dist/types-ts4.0/utils/lightCards/lightCardWrappers.d.ts +5 -0
- package/dist/types-ts4.0/utils/lightCards/styles.d.ts +4 -0
- package/dist/types-ts4.0/utils/lightCards/types.d.ts +15 -0
- package/dist/types-ts4.0/utils/mediaTypeIcon/iconWrapper.d.ts +4 -0
- package/dist/types-ts4.0/utils/mediaTypeIcon/index.d.ts +10 -0
- package/dist/types-ts4.0/utils/mediaTypeIcon/styles.d.ts +2 -0
- package/dist/types-ts4.0/utils/mediaTypeIcon/types.d.ts +6 -0
- package/dist/types-ts4.0/utils/metadata.d.ts +2 -0
- package/dist/types-ts4.0/utils/objectURLCache.d.ts +11 -0
- package/dist/types-ts4.0/utils/preventClickThrough.d.ts +8 -0
- package/dist/types-ts4.0/utils/printScript.d.ts +2 -0
- package/dist/types-ts4.0/utils/progressBar/index.d.ts +9 -0
- package/dist/types-ts4.0/utils/progressBar/styles.d.ts +1 -0
- package/dist/types-ts4.0/utils/resizeModeToMediaImageProps.d.ts +5 -0
- package/dist/types-ts4.0/utils/shouldDisplayImageThumbnail.d.ts +3 -0
- package/dist/types-ts4.0/utils/ufoExperiences.d.ts +7 -0
- package/dist/types-ts4.0/utils/videoSnapshot.d.ts +1 -0
- package/dist/types-ts4.0/utils/viewportDetector.d.ts +6 -0
- package/in-product/package.json +1 -1
- package/package.json +9 -2
- package/types/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WithMediaClientConfigProps } from '@atlaskit/media-client';
|
|
3
|
+
import type { CardBaseProps } from '.';
|
|
4
|
+
export declare type CardWithMediaClientConfigProps = WithMediaClientConfigProps<CardBaseProps>;
|
|
5
|
+
declare const CardLoader: React.FC<CardWithMediaClientConfigProps>;
|
|
6
|
+
export default CardLoader;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FileState } from '@atlaskit/media-client';
|
|
2
|
+
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
3
|
+
import { CardState } from '../..';
|
|
4
|
+
export declare const createStateUpdater: (newState: Partial<CardState>) => (prevState: CardState) => Pick<CardState, keyof CardState>;
|
|
5
|
+
export declare const getCardStateFromFileState: (fileState: FileState, isBannedLocalPreview: boolean, featureFlags?: MediaFeatureFlags | undefined) => Partial<CardState>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ImageResizeMode } from '@atlaskit/media-client';
|
|
2
|
+
import { ObjectURLCache } from '../../../utils/objectURLCache';
|
|
3
|
+
import { CardPreview } from '../../../types';
|
|
4
|
+
declare type Mode = ImageResizeMode | undefined;
|
|
5
|
+
export declare const getCacheKey: (id: string, mode: Mode) => string;
|
|
6
|
+
export interface CardPreviewCache {
|
|
7
|
+
get(id: string, mode: Mode): CardPreview | undefined;
|
|
8
|
+
set(id: string, mode: Mode, cardPreview: CardPreview): void;
|
|
9
|
+
remove(id: string, mode: Mode): void;
|
|
10
|
+
}
|
|
11
|
+
export declare class CardPreviewCacheImpl implements CardPreviewCache {
|
|
12
|
+
private previewCache;
|
|
13
|
+
constructor(previewCache: ObjectURLCache);
|
|
14
|
+
get: (id: string, mode: Mode) => CardPreview | undefined;
|
|
15
|
+
set: (id: string, mode: Mode, cardPreview: CardPreview) => void;
|
|
16
|
+
remove: (id: string, mode: Mode) => void;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: CardPreviewCacheImpl;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
2
|
+
import { CardStatus, FilePreviewStatus } from '../../../types';
|
|
3
|
+
import { FileState } from '@atlaskit/media-client';
|
|
4
|
+
export declare const extractFilePreviewStatus: (fileState: FileState, isBannedLocalPreview: boolean, featureFlags?: MediaFeatureFlags | undefined) => FilePreviewStatus;
|
|
5
|
+
export declare const isPreviewableStatus: (cardStatus: CardStatus, { isPreviewable, hasPreview, isSupportedByBrowser }: FilePreviewStatus) => boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MediaClient, FilePreview, MediaStoreGetFileImageParams, MediaType } from '@atlaskit/media-client';
|
|
2
|
+
import { CardPreview } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* This method tells the support for the media
|
|
5
|
+
* types covered in getCardPreviewFromFilePreview
|
|
6
|
+
*/
|
|
7
|
+
export declare const isSupportedLocalPreview: (mediaType?: MediaType | undefined) => boolean;
|
|
8
|
+
export declare const getCardPreviewFromFilePreview: (filePreview: FilePreview | Promise<FilePreview>) => Promise<CardPreview>;
|
|
9
|
+
export declare const getCardPreviewFromBackend: (mediaClient: MediaClient, id: string, params: MediaStoreGetFileImageParams) => Promise<CardPreview>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { MediaClient, FilePreview, FileState, MediaStoreGetFileImageParams, MediaBlobUrlAttrs, FileIdentifier } from '@atlaskit/media-client';
|
|
2
|
+
import { MediaFeatureFlags, SSR } from '@atlaskit/media-common';
|
|
3
|
+
import { ImageResizeMode } from '@atlaskit/media-client';
|
|
4
|
+
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
|
+
import { CardDimensions } from '../../../utils/cardDimensions';
|
|
6
|
+
import { MediaCardError } from '../../../errors';
|
|
7
|
+
import { CardStatus, CardPreview } from '../../../types';
|
|
8
|
+
export { getCardPreviewFromFilePreview, getCardPreviewFromBackend, isSupportedLocalPreview, } from './helpers';
|
|
9
|
+
export { extractFilePreviewStatus } from './filePreviewStatus';
|
|
10
|
+
export declare const getCardPreviewFromCache: (id: string, mode: ImageResizeMode | undefined) => CardPreview | undefined;
|
|
11
|
+
export declare const removeCardPreviewFromCache: (id: string, mode: ImageResizeMode | undefined) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Will return the preview if available and supported by the browser
|
|
14
|
+
* See extractFilePreviewStatus "hasLocalPreview" logic
|
|
15
|
+
*/
|
|
16
|
+
export declare const getFilePreviewFromFileState: (fileState: FileState) => FilePreview | Promise<FilePreview> | undefined;
|
|
17
|
+
export declare type CardPreviewParams = {
|
|
18
|
+
mediaClient: MediaClient;
|
|
19
|
+
id: string;
|
|
20
|
+
dimensions?: CardDimensions;
|
|
21
|
+
filePreview?: FilePreview | Promise<FilePreview>;
|
|
22
|
+
onLocalPreviewError?: (error: MediaCardError) => void;
|
|
23
|
+
isRemotePreviewReady: boolean;
|
|
24
|
+
imageUrlParams: MediaStoreGetFileImageParams;
|
|
25
|
+
mediaBlobUrlAttrs?: MediaBlobUrlAttrs;
|
|
26
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
27
|
+
featureFlags?: MediaFeatureFlags;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* This function will try to return a Card preview, either from cache, local preview or remote preview.
|
|
31
|
+
* It should only be called if there is a chance to get either a remote or a local preview, or both.
|
|
32
|
+
* This, in order to ensure there is always going to be a valid return value OR throw an error if the process fails.
|
|
33
|
+
* It is worth noting that local preview failures break the process if there is no remote preview available.
|
|
34
|
+
* In that case we throw an error immediately.
|
|
35
|
+
* Otherwise, if the local preview fails but there is a remote preview available, the failure does not break the process.
|
|
36
|
+
* In that case, we still want to report the local preview error to the caller, for feature realiability track.
|
|
37
|
+
* hence the use of the optional callback onLocalPreviewError
|
|
38
|
+
*/
|
|
39
|
+
export declare const getCardPreview: ({ mediaClient, id, dimensions, filePreview, onLocalPreviewError, isRemotePreviewReady, imageUrlParams, mediaBlobUrlAttrs, createAnalyticsEvent, featureFlags, }: CardPreviewParams) => Promise<CardPreview>;
|
|
40
|
+
export declare const shouldResolvePreview: ({ status, fileState, dimensions, identifier, fileImageMode, hasCardPreview, isBannedLocalPreview, featureFlags, }: {
|
|
41
|
+
status: CardStatus;
|
|
42
|
+
fileState: FileState;
|
|
43
|
+
dimensions?: CardDimensions | undefined;
|
|
44
|
+
identifier: FileIdentifier;
|
|
45
|
+
fileImageMode?: ImageResizeMode | undefined;
|
|
46
|
+
hasCardPreview: boolean;
|
|
47
|
+
isBannedLocalPreview: boolean;
|
|
48
|
+
featureFlags?: MediaFeatureFlags | undefined;
|
|
49
|
+
}) => boolean;
|
|
50
|
+
export declare const getSSRCardPreview: (ssr: SSR, mediaClient: MediaClient, id: string, params: MediaStoreGetFileImageParams, mediaBlobUrlAttrs?: MediaBlobUrlAttrs | undefined) => CardPreview;
|
|
51
|
+
export declare const isLocalPreview: (preview: CardPreview) => boolean;
|
|
52
|
+
export declare const isSSRPreview: (preview: CardPreview) => boolean;
|
|
53
|
+
export declare const isSSRServerPreview: (preview: CardPreview) => boolean;
|
|
54
|
+
export declare const isSSRClientPreview: (preview: CardPreview) => boolean;
|
|
55
|
+
export declare const isSSRDataPreview: (preview: CardPreview) => boolean;
|
|
56
|
+
export declare const fetchAndCacheRemotePreview: (mediaClient: MediaClient, id: string, dimensions: CardDimensions, params: MediaStoreGetFileImageParams, mediaBlobUrlAttrs?: MediaBlobUrlAttrs | undefined) => Promise<CardPreview>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FileStatus } from '@atlaskit/media-client';
|
|
2
|
+
import { CardStatus, FilePreviewStatus } from '../../types';
|
|
3
|
+
export declare const isFinalCardStatus: (status: CardStatus) => boolean;
|
|
4
|
+
export declare const getCardStatus: (fileStatus: FileStatus, { hasFilesize, isPreviewable, hasPreview }: FilePreviewStatus) => CardStatus;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
+
import { CardDimensions } from '../../utils';
|
|
3
|
+
import { CardPreviewAttributes } from '../../utils/analytics';
|
|
4
|
+
declare type cardAction = 'cache-hit' | 'remote-success';
|
|
5
|
+
export declare const fireImageFetchingOperationalEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, action: cardAction, cardPreviewAttributes: CardPreviewAttributes) => void;
|
|
6
|
+
export declare const calculatePercentageDifference: (prevDimensions: CardDimensions | undefined, currentDimensions: CardDimensions | undefined) => {
|
|
7
|
+
width: string;
|
|
8
|
+
height: string;
|
|
9
|
+
} | undefined;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { UIAnalyticsEvent, WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
+
import { FileIdentifier, FileState, MediaSubscription } from '@atlaskit/media-client';
|
|
4
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
5
|
+
import { CardAction, CardProps, CardState, CardStatus } from '../..';
|
|
6
|
+
export declare type CardBaseProps = CardProps & WithAnalyticsEventsProps & Partial<WrappedComponentProps>;
|
|
7
|
+
export declare class CardBase extends Component<CardBaseProps, CardState> {
|
|
8
|
+
private internalOccurrenceKey;
|
|
9
|
+
private hasBeenMounted;
|
|
10
|
+
private fileStateFlags;
|
|
11
|
+
private ssrReliability;
|
|
12
|
+
private timeElapsedTillCommenced;
|
|
13
|
+
subscription?: MediaSubscription;
|
|
14
|
+
private ssrData?;
|
|
15
|
+
static defaultProps: Partial<CardProps>;
|
|
16
|
+
constructor(props: CardBaseProps);
|
|
17
|
+
componentDidMount(): void;
|
|
18
|
+
componentDidUpdate(prevProps: CardProps, prevState: CardState): void;
|
|
19
|
+
componentWillUnmount(): void;
|
|
20
|
+
updateStateForIdentifier(identifier: FileIdentifier): void;
|
|
21
|
+
private getImageURLParams;
|
|
22
|
+
private getMediaBlobUrlAttrs;
|
|
23
|
+
private getCardPreviewParams;
|
|
24
|
+
private setCacheSSRPreview;
|
|
25
|
+
private refetchSSRPreview;
|
|
26
|
+
private resolvePreview;
|
|
27
|
+
updateFileStateFlag(fileState?: FileState): void;
|
|
28
|
+
subscribeInternalFile(identifier: FileIdentifier): void;
|
|
29
|
+
private get requestedDimensions();
|
|
30
|
+
private get metadata();
|
|
31
|
+
private get fileAttributes();
|
|
32
|
+
private getPerformanceAttributes;
|
|
33
|
+
private logSSRImageError;
|
|
34
|
+
private onImageError;
|
|
35
|
+
private onImageLoad;
|
|
36
|
+
private fireOperationalEvent;
|
|
37
|
+
private fireCommencedEvent;
|
|
38
|
+
private fireCopiedEvent;
|
|
39
|
+
private fireScreenEvent;
|
|
40
|
+
private fireLocalPreviewErrorEvent;
|
|
41
|
+
private safeSetState;
|
|
42
|
+
unsubscribe: () => void;
|
|
43
|
+
get actions(): CardAction[];
|
|
44
|
+
onCardViewClick: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent | undefined) => void;
|
|
45
|
+
onInlinePlayerError: () => void;
|
|
46
|
+
setRef: (cardRef: HTMLDivElement | null) => void;
|
|
47
|
+
renderInlinePlayer: () => JSX.Element;
|
|
48
|
+
onMediaViewerClose: () => void;
|
|
49
|
+
private onDisplayImage;
|
|
50
|
+
renderMediaViewer: () => React.ReactPortal | undefined;
|
|
51
|
+
renderCard: (withCallbacks?: boolean, cardStatusOverride?: CardStatus | undefined, izLazyOverride?: boolean | undefined) => JSX.Element;
|
|
52
|
+
private storeSSRData;
|
|
53
|
+
render(): JSX.Element;
|
|
54
|
+
private onCardInViewport;
|
|
55
|
+
onClick: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent | undefined) => void;
|
|
56
|
+
onMouseEnter: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
57
|
+
}
|
|
58
|
+
export declare const Card: React.ComponentType<CardBaseProps>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import React, { MouseEvent } from 'react';
|
|
4
|
+
import { MessageDescriptor } from 'react-intl-next';
|
|
5
|
+
import { MediaItemType, FileDetails } from '@atlaskit/media-client';
|
|
6
|
+
import { WithAnalyticsEventsProps, UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
7
|
+
import { SharedCardProps, CardStatus } from '../index';
|
|
8
|
+
import { MediaCardError } from '../errors';
|
|
9
|
+
import { CardPreview } from '..';
|
|
10
|
+
import { MediaCardCursor } from '../types';
|
|
11
|
+
export interface CardViewOwnProps extends SharedCardProps {
|
|
12
|
+
readonly status: CardStatus;
|
|
13
|
+
readonly mediaItemType: MediaItemType;
|
|
14
|
+
readonly mediaCardCursor?: MediaCardCursor;
|
|
15
|
+
readonly metadata?: FileDetails;
|
|
16
|
+
readonly error?: MediaCardError;
|
|
17
|
+
readonly onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
18
|
+
readonly onMouseEnter?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
19
|
+
readonly onDisplayImage?: () => void;
|
|
20
|
+
readonly cardPreview?: CardPreview;
|
|
21
|
+
readonly progress?: number;
|
|
22
|
+
readonly innerRef?: (instance: HTMLDivElement | null) => void;
|
|
23
|
+
readonly onImageLoad: (cardPreview: CardPreview) => void;
|
|
24
|
+
readonly onImageError: (cardPreview: CardPreview) => void;
|
|
25
|
+
readonly nativeLazyLoad?: boolean;
|
|
26
|
+
readonly forceSyncDisplay?: boolean;
|
|
27
|
+
disableAnimation?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface CardViewState {
|
|
30
|
+
elementWidth?: number;
|
|
31
|
+
didImageRender: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare type CardViewProps = CardViewOwnProps & WithAnalyticsEventsProps;
|
|
34
|
+
export interface RenderConfigByStatus {
|
|
35
|
+
renderTypeIcon?: boolean;
|
|
36
|
+
iconMessage?: JSX.Element;
|
|
37
|
+
renderImageRenderer?: boolean;
|
|
38
|
+
renderPlayButton?: boolean;
|
|
39
|
+
renderTitleBox?: boolean;
|
|
40
|
+
renderBlanket?: boolean;
|
|
41
|
+
isFixedBlanket?: boolean;
|
|
42
|
+
renderProgressBar?: boolean;
|
|
43
|
+
renderSpinner?: boolean;
|
|
44
|
+
renderFailedTitleBox?: boolean;
|
|
45
|
+
renderTickBox?: boolean;
|
|
46
|
+
customTitleMessage?: MessageDescriptor;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* This is classic vanilla CardView class. To create an instance of class one would need to supply
|
|
50
|
+
* `createAnalyticsEvent` prop to satisfy it's Analytics Events needs.
|
|
51
|
+
*/
|
|
52
|
+
export declare class CardViewBase extends React.Component<CardViewProps, CardViewState> {
|
|
53
|
+
state: CardViewState;
|
|
54
|
+
divRef: React.RefObject<HTMLDivElement>;
|
|
55
|
+
static defaultProps: Partial<CardViewOwnProps>;
|
|
56
|
+
componentDidMount(): void;
|
|
57
|
+
componentDidUpdate({ cardPreview: prevCardPreview }: CardViewProps): void;
|
|
58
|
+
private onImageLoad;
|
|
59
|
+
private onImageError;
|
|
60
|
+
private get width();
|
|
61
|
+
private get breakpoint();
|
|
62
|
+
saveElementWidth: () => void;
|
|
63
|
+
render(): jsx.JSX.Element;
|
|
64
|
+
private renderSpinner;
|
|
65
|
+
private shouldRenderPlayButton;
|
|
66
|
+
private renderPlayButton;
|
|
67
|
+
private renderBlanket;
|
|
68
|
+
private renderTitleBox;
|
|
69
|
+
private renderFailedTitleBox;
|
|
70
|
+
private renderProgressBar;
|
|
71
|
+
private renderImageRenderer;
|
|
72
|
+
private renderTickBox;
|
|
73
|
+
private renderMediaTypeIcon;
|
|
74
|
+
private renderActionsBar;
|
|
75
|
+
private renderFileNewExperience;
|
|
76
|
+
private renderFile;
|
|
77
|
+
private getRenderConfigByStatus;
|
|
78
|
+
private renderNewExperienceCard;
|
|
79
|
+
}
|
|
80
|
+
export declare const CardView: React.ForwardRefExoticComponent<Pick<Omit<CardViewProps, keyof WithAnalyticsEventsProps>, never> & Partial<Pick<Omit<CardViewProps, keyof WithAnalyticsEventsProps>, keyof CardViewOwnProps>> & Partial<Pick<Partial<CardViewOwnProps>, never>> & React.RefAttributes<any>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WithMediaClientConfigProps } from '@atlaskit/media-client';
|
|
3
|
+
import { MediaInlineCardProps } from './mediaInlineCard';
|
|
4
|
+
export declare type MediaInlineCardWithMediaClientConfigProps = WithMediaClientConfigProps<MediaInlineCardProps>;
|
|
5
|
+
declare type MediaInlineCardWithMediaClientConfigComponent = React.ComponentType<MediaInlineCardWithMediaClientConfigProps>;
|
|
6
|
+
declare type ErrorBoundaryComponent = React.ComponentType<{
|
|
7
|
+
data?: {
|
|
8
|
+
[k: string]: any;
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export interface MediaInlineCardLoaderState {
|
|
12
|
+
MediaInlineCard?: MediaInlineCardWithMediaClientConfigComponent;
|
|
13
|
+
ErrorBoundary?: ErrorBoundaryComponent;
|
|
14
|
+
}
|
|
15
|
+
export default class MediaInlineCardLoader extends React.PureComponent<MediaInlineCardWithMediaClientConfigProps & MediaInlineCardLoaderState, MediaInlineCardLoaderState> {
|
|
16
|
+
static displayName: string;
|
|
17
|
+
static MediaInlineCard?: MediaInlineCardWithMediaClientConfigComponent;
|
|
18
|
+
static ErrorBoundary?: ErrorBoundaryComponent;
|
|
19
|
+
isMounted: boolean;
|
|
20
|
+
state: MediaInlineCardLoaderState;
|
|
21
|
+
componentDidMount(): Promise<void>;
|
|
22
|
+
componentWillUnmount(): Promise<void>;
|
|
23
|
+
render(): JSX.Element;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { FileIdentifier, MediaClient } from '@atlaskit/media-client';
|
|
3
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import { MediaViewerDataSource } from '@atlaskit/media-viewer';
|
|
5
|
+
export interface MediaInlineCardProps {
|
|
6
|
+
identifier: FileIdentifier;
|
|
7
|
+
mediaClient: MediaClient;
|
|
8
|
+
shouldOpenMediaViewer?: boolean;
|
|
9
|
+
isSelected?: boolean;
|
|
10
|
+
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
11
|
+
mediaViewerDataSource?: MediaViewerDataSource;
|
|
12
|
+
}
|
|
13
|
+
export declare const MediaInlineCardInternal: FC<MediaInlineCardProps & WrappedComponentProps>;
|
|
14
|
+
export declare const MediaInlineCard: React.FC<MediaInlineCardProps>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
import { MediaClient, FileIdentifier, FileState, MediaFileArtifacts, MediaSubscription } from '@atlaskit/media-client';
|
|
4
|
+
import { CardDimensions, NumericalCardDimensions } from '..';
|
|
5
|
+
import { WithAnalyticsEventsProps, UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
|
+
import type { CardPreview } from '..';
|
|
7
|
+
export interface InlinePlayerOwnProps {
|
|
8
|
+
identifier: FileIdentifier;
|
|
9
|
+
mediaClient: MediaClient;
|
|
10
|
+
dimensions?: CardDimensions;
|
|
11
|
+
originalDimensions?: NumericalCardDimensions;
|
|
12
|
+
autoplay: boolean;
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
onFullscreenChange?: (fullscreen: boolean) => void;
|
|
15
|
+
onError?: (error: Error) => void;
|
|
16
|
+
readonly onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
17
|
+
testId?: string;
|
|
18
|
+
readonly cardPreview?: CardPreview;
|
|
19
|
+
readonly forwardRef?: React.Ref<HTMLDivElement>;
|
|
20
|
+
}
|
|
21
|
+
export declare type InlinePlayerProps = InlinePlayerOwnProps & WithAnalyticsEventsProps;
|
|
22
|
+
export interface InlinePlayerState {
|
|
23
|
+
fileSrc?: string;
|
|
24
|
+
isUploading?: boolean;
|
|
25
|
+
progress?: number;
|
|
26
|
+
elementWidth?: number;
|
|
27
|
+
}
|
|
28
|
+
export declare const getPreferredVideoArtifact: (fileState: FileState) => keyof MediaFileArtifacts | undefined;
|
|
29
|
+
export declare class InlinePlayerBase extends Component<InlinePlayerProps, InlinePlayerState> {
|
|
30
|
+
subscription?: MediaSubscription;
|
|
31
|
+
state: InlinePlayerState;
|
|
32
|
+
divRef: React.RefObject<HTMLDivElement>;
|
|
33
|
+
static defaultProps: {
|
|
34
|
+
dimensions: {
|
|
35
|
+
width: number;
|
|
36
|
+
height: number;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
componentDidMount(): void;
|
|
40
|
+
setFileSrc: (fileSrc: string) => void;
|
|
41
|
+
setBinaryURL: () => Promise<void>;
|
|
42
|
+
unsubscribe: () => void;
|
|
43
|
+
revoke: () => void;
|
|
44
|
+
componentWillUnmount(): void;
|
|
45
|
+
onDownloadClick: () => void;
|
|
46
|
+
onFirstPlay: () => void;
|
|
47
|
+
private get breakpoint();
|
|
48
|
+
saveElementWidth: () => void;
|
|
49
|
+
render(): JSX.Element;
|
|
50
|
+
}
|
|
51
|
+
export declare const InlinePlayer: React.ForwardRefExoticComponent<Pick<InlinePlayerProps, "createAnalyticsEvent" | keyof InlinePlayerOwnProps> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const InlinePlayerLazy: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Pick<import("./inlinePlayer").InlinePlayerProps, "createAnalyticsEvent" | keyof import("./inlinePlayer").InlinePlayerOwnProps> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type MediaCardAnalyticsErrorBoundaryProps = {
|
|
3
|
+
data?: {
|
|
4
|
+
[k: string]: any;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export default class MediaCardAnalyticsErrorBoundary extends React.Component<MediaCardAnalyticsErrorBoundaryProps> {
|
|
8
|
+
static displayName: string;
|
|
9
|
+
render(): JSX.Element;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InlinePlayerWrapperProps, WrapperProps } from './types';
|
|
2
|
+
export declare const inlinePlayerClassName = "media-card-inline-player";
|
|
3
|
+
export declare const wrapperStyles: {
|
|
4
|
+
({ dimensions, breakpointSize, shouldUsePointerCursor, }: WrapperProps): import("@emotion/react").SerializedStyles;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const inlinePlayerWrapperStyles: {
|
|
8
|
+
({ dimensions, selected, }: InlinePlayerWrapperProps): import("@emotion/react").SerializedStyles;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { MouseEvent, ReactElement, RefObject } from 'react';
|
|
2
|
+
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
+
import { CardDimensions } from '../';
|
|
4
|
+
import { BreakpointSizeValue } from '../utils/breakpoint';
|
|
5
|
+
export interface WrapperProps {
|
|
6
|
+
testId?: string;
|
|
7
|
+
shouldUsePointerCursor?: boolean;
|
|
8
|
+
dimensions?: CardDimensions;
|
|
9
|
+
breakpointSize?: BreakpointSizeValue;
|
|
10
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
11
|
+
onMouseEnter?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
12
|
+
innerRef?: RefObject<HTMLDivElement>;
|
|
13
|
+
children?: JSX.Element;
|
|
14
|
+
}
|
|
15
|
+
export declare type InlinePlayerWrapperProps = {
|
|
16
|
+
testId?: string;
|
|
17
|
+
dimensions?: CardDimensions;
|
|
18
|
+
selected: {
|
|
19
|
+
selected?: boolean | undefined;
|
|
20
|
+
};
|
|
21
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
22
|
+
innerRef?: RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | undefined;
|
|
23
|
+
children?: JSX.Element[] | ReactElement<any, any> | null | any;
|
|
24
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const actionsBarClassName = "media-card-actions-bar";
|
|
2
|
+
export declare const fixedActionBarStyles = "opacity: 1;";
|
|
3
|
+
export declare const wrapperStyles: {
|
|
4
|
+
(isFixed?: boolean | undefined): import("@emotion/react").SerializedStyles;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CardAction } from '../../../actions';
|
|
3
|
+
export interface ActionsBarProps {
|
|
4
|
+
actions: Array<CardAction>;
|
|
5
|
+
isFixed?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare type ActionBarWrapperProps = {
|
|
8
|
+
isFixed?: boolean;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum Breakpoint {
|
|
2
|
+
SMALL = "small",
|
|
3
|
+
LARGE = "large"
|
|
4
|
+
}
|
|
5
|
+
export declare const responsiveSettings: {
|
|
6
|
+
small: {
|
|
7
|
+
fontSize: number;
|
|
8
|
+
lineHeight: number;
|
|
9
|
+
titleBox: {
|
|
10
|
+
verticalPadding: number;
|
|
11
|
+
horizontalPadding: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
large: {
|
|
15
|
+
fontSize: number;
|
|
16
|
+
lineHeight: number;
|
|
17
|
+
titleBox: {
|
|
18
|
+
verticalPadding: number;
|
|
19
|
+
horizontalPadding: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare const getTitleBoxHeight: (breakpoint: Breakpoint) => number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InternalIconMessageProps, CreatingPreviewProps } from './types';
|
|
3
|
+
export declare const IconMessage: React.FC<InternalIconMessageProps>;
|
|
4
|
+
export declare const CreatingPreview: React.FC<CreatingPreviewProps>;
|
|
5
|
+
export declare const PreviewUnavailable: React.FC;
|
|
6
|
+
export declare const FailedToLoad: React.FC;
|
|
7
|
+
export declare const FailedToUpload: React.FC;
|
|
8
|
+
export declare const PreviewCurrentlyUnavailable: React.FC;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MessageDescriptor } from 'react-intl-next';
|
|
3
|
+
export declare type InternalIconMessageProps = {
|
|
4
|
+
messageDescriptor: MessageDescriptor;
|
|
5
|
+
animated?: boolean;
|
|
6
|
+
reducedFont?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare type CreatingPreviewProps = {
|
|
9
|
+
disableAnimation?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare type StyledTextProps = {
|
|
12
|
+
animated?: boolean;
|
|
13
|
+
reducedFont?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare type IconMessageWrapperProps = {
|
|
16
|
+
animated?: boolean;
|
|
17
|
+
reducedFont?: boolean;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Breakpoint } from '../common';
|
|
2
|
+
import { IconWrapperProps } from './types';
|
|
3
|
+
export declare function titleBoxHeight(hasTitleBox: boolean, breakpoint: Breakpoint): string;
|
|
4
|
+
export declare const iconWrapperStyles: {
|
|
5
|
+
({ hasTitleBox, breakpoint, }: IconWrapperProps): import("@emotion/react").SerializedStyles;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MediaType, ImageResizeMode } from '@atlaskit/media-client';
|
|
3
|
+
import { CardPreview } from '../../..';
|
|
4
|
+
export declare type ImageRendererProps = {
|
|
5
|
+
readonly cardPreview: CardPreview;
|
|
6
|
+
readonly mediaType: MediaType;
|
|
7
|
+
readonly alt?: string;
|
|
8
|
+
readonly resizeMode?: ImageResizeMode;
|
|
9
|
+
readonly onDisplayImage?: () => void;
|
|
10
|
+
readonly onImageError?: (cardPreview: CardPreview) => void;
|
|
11
|
+
readonly onImageLoad?: (cardPreview: CardPreview) => void;
|
|
12
|
+
readonly nativeLazyLoad?: boolean;
|
|
13
|
+
readonly forceSyncDisplay?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare const ImageRenderer: React.FC<ImageRendererProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Breakpoint } from '../common';
|
|
2
|
+
export declare const loadingRateLimitedContainerStyles: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const warningIconWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare type StyledTextProps = {
|
|
5
|
+
breakpoint: Breakpoint;
|
|
6
|
+
positionBottom: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const loadingRateLimitedTextWrapperStyles: {
|
|
9
|
+
({ breakpoint, positionBottom, }: StyledTextProps): import("@emotion/react").SerializedStyles;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const couldntLoadWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
13
|
+
export declare const errorWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NewFileExperienceWrapperProps } from './types';
|
|
2
|
+
export declare const newFileExperienceWrapperStyles: {
|
|
3
|
+
({ breakpoint, dimensions, appearance, disableOverlay, displayBackground, selected, isPlayButtonClickable, isTickBoxSelectable, shouldDisplayTooltip, mediaCardCursor, }: NewFileExperienceWrapperProps): import("@emotion/react").SerializedStyles;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { MouseEvent, RefObject } from 'react';
|
|
2
|
+
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
+
import { CardDimensions, CardAppearance } from '../../..';
|
|
4
|
+
import { Breakpoint } from '.././common';
|
|
5
|
+
import { MediaCardCursor } from '../../../types';
|
|
6
|
+
export interface NewFileExperienceWrapperProps {
|
|
7
|
+
testId?: string;
|
|
8
|
+
breakpoint: Breakpoint;
|
|
9
|
+
mediaCardCursor?: MediaCardCursor;
|
|
10
|
+
dimensions?: CardDimensions;
|
|
11
|
+
appearance?: CardAppearance;
|
|
12
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
13
|
+
onMouseEnter?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
14
|
+
mediaType?: string;
|
|
15
|
+
disableOverlay: boolean;
|
|
16
|
+
displayBackground: boolean;
|
|
17
|
+
selected: boolean;
|
|
18
|
+
isPlayButtonClickable: boolean;
|
|
19
|
+
isTickBoxSelectable: boolean;
|
|
20
|
+
shouldDisplayTooltip: boolean;
|
|
21
|
+
innerRef?: RefObject<HTMLDivElement>;
|
|
22
|
+
children?: JSX.Element;
|
|
23
|
+
}
|