@atlaskit/media-card 77.1.2 → 77.2.1
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/card/card.js +1 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/useBreakpoint.js +29 -0
- package/dist/cjs/card/v2/cardV2.js +3 -5
- package/dist/cjs/card/v2/cardV2Loader.js +9 -16
- package/dist/cjs/card/v2/cardViewV2.js +5 -22
- package/dist/cjs/card/v2/inlinePlayerLazyV2.js +35 -0
- package/dist/cjs/card/v2/inlinePlayerV2.js +222 -0
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/useBreakpoint.js +22 -0
- package/dist/es2019/card/v2/cardV2.js +3 -5
- package/dist/es2019/card/v2/cardV2Loader.js +10 -17
- package/dist/es2019/card/v2/cardViewV2.js +4 -18
- package/dist/es2019/card/v2/inlinePlayerLazyV2.js +10 -0
- package/dist/es2019/card/v2/inlinePlayerV2.js +164 -0
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/useBreakpoint.js +24 -0
- package/dist/esm/card/v2/cardV2.js +3 -5
- package/dist/esm/card/v2/cardV2Loader.js +9 -16
- package/dist/esm/card/v2/cardViewV2.js +7 -24
- package/dist/esm/card/v2/inlinePlayerLazyV2.js +23 -0
- package/dist/esm/card/v2/inlinePlayerV2.js +212 -0
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/useBreakpoint.d.ts +3 -0
- package/dist/types/card/v2/inlinePlayerLazyV2.d.ts +2 -0
- package/dist/types/card/v2/inlinePlayerV2.d.ts +23 -0
- package/dist/types-ts4.5/card/actions.d.ts +9 -0
- package/dist/types-ts4.5/card/card.d.ts +64 -0
- package/dist/types-ts4.5/card/cardAnalytics.d.ts +10 -0
- package/dist/types-ts4.5/card/cardConstants.d.ts +1 -0
- package/dist/types-ts4.5/card/cardLoader.d.ts +6 -0
- package/dist/types-ts4.5/card/cardState.d.ts +9 -0
- package/dist/types-ts4.5/card/cardSwitcher.d.ts +4 -0
- package/dist/types-ts4.5/card/cardView.d.ts +78 -0
- package/dist/types-ts4.5/card/classnames.d.ts +2 -0
- package/dist/types-ts4.5/card/getCardPreview/cache.d.ts +21 -0
- package/dist/types-ts4.5/card/getCardPreview/filePreviewStatus.d.ts +4 -0
- package/dist/types-ts4.5/card/getCardPreview/helpers.d.ts +10 -0
- package/dist/types-ts4.5/card/getCardPreview/index.d.ts +53 -0
- package/dist/types-ts4.5/card/getCardStatus.d.ts +4 -0
- package/dist/types-ts4.5/card/index.d.ts +1 -0
- package/dist/types-ts4.5/card/inlinePlayer.d.ts +52 -0
- package/dist/types-ts4.5/card/inlinePlayerLazy.d.ts +2 -0
- package/dist/types-ts4.5/card/inlinePlayerWrapper.d.ts +4 -0
- package/dist/types-ts4.5/card/inlinePlayerWrapperStyles.d.ts +6 -0
- package/dist/types-ts4.5/card/media-card-analytics-error-boundary.d.ts +14 -0
- package/dist/types-ts4.5/card/types.d.ts +13 -0
- package/dist/types-ts4.5/card/ui/actionsBar/actionsBar.d.ts +5 -0
- package/dist/types-ts4.5/card/ui/actionsBar/actionsBarWrapper.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/cardActionButton.d.ts +3 -0
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/cardActionIconButton.d.ts +12 -0
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.d.ts +14 -0
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/cardActionsView.d.ts +16 -0
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/index.d.ts +7 -0
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/styles.d.ts +18 -0
- package/dist/types-ts4.5/card/ui/actionsBar/styles.d.ts +6 -0
- package/dist/types-ts4.5/card/ui/actionsBar/types.d.ts +10 -0
- package/dist/types-ts4.5/card/ui/blanket/blanket.d.ts +6 -0
- package/dist/types-ts4.5/card/ui/blanket/styles.d.ts +6 -0
- package/dist/types-ts4.5/card/ui/common.d.ts +23 -0
- package/dist/types-ts4.5/card/ui/iconMessage/iconMessageWrapper.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/iconMessage/index.d.ts +8 -0
- package/dist/types-ts4.5/card/ui/iconMessage/styles.d.ts +5 -0
- package/dist/types-ts4.5/card/ui/iconMessage/types.d.ts +19 -0
- package/dist/types-ts4.5/card/ui/iconWrapper/iconWrapper.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/iconWrapper/styles.d.ts +7 -0
- package/dist/types-ts4.5/card/ui/iconWrapper/types.d.ts +6 -0
- package/dist/types-ts4.5/card/ui/imageRenderer/imageRenderer.d.ts +15 -0
- package/dist/types-ts4.5/card/ui/imageRenderer/resizeModeToMediaImageProps.d.ts +5 -0
- package/dist/types-ts4.5/card/ui/playButton/playButton.d.ts +2 -0
- package/dist/types-ts4.5/card/ui/playButton/playButtonBackground.d.ts +3 -0
- package/dist/types-ts4.5/card/ui/playButton/playButtonWrapper.d.ts +3 -0
- package/dist/types-ts4.5/card/ui/playButton/styles.d.ts +5 -0
- package/dist/types-ts4.5/card/ui/progressBar/progressBar.d.ts +10 -0
- package/dist/types-ts4.5/card/ui/progressBar/styledBar.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/progressBar/styles.d.ts +7 -0
- package/dist/types-ts4.5/card/ui/progressBar/types.d.ts +7 -0
- package/dist/types-ts4.5/card/ui/styles.d.ts +13 -0
- package/dist/types-ts4.5/card/ui/tickBox/styles.d.ts +7 -0
- package/dist/types-ts4.5/card/ui/tickBox/tickBox.d.ts +3 -0
- package/dist/types-ts4.5/card/ui/tickBox/tickBoxWrapper.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/tickBox/types.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/titleBox/failedTitleBox.d.ts +3 -0
- package/dist/types-ts4.5/card/ui/titleBox/styles.d.ts +15 -0
- package/dist/types-ts4.5/card/ui/titleBox/titleBox.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/titleBox/titleBoxComponents.d.ts +8 -0
- package/dist/types-ts4.5/card/ui/titleBox/types.d.ts +34 -0
- package/dist/types-ts4.5/card/ui/unhandledErrorCard/index.d.ts +7 -0
- package/dist/types-ts4.5/card/ui/unhandledErrorCard/types.d.ts +6 -0
- package/dist/types-ts4.5/card/ui/wrapper/index.d.ts +1 -0
- package/dist/types-ts4.5/card/ui/wrapper/styles.d.ts +5 -0
- package/dist/types-ts4.5/card/ui/wrapper/types.d.ts +25 -0
- package/dist/types-ts4.5/card/ui/wrapper/wrapper.d.ts +4 -0
- package/dist/types-ts4.5/card/useBreakpoint.d.ts +3 -0
- package/dist/types-ts4.5/card/v2/cardV2.d.ts +63 -0
- package/dist/types-ts4.5/card/v2/cardV2Loader.d.ts +4 -0
- package/dist/types-ts4.5/card/v2/cardViewV2.d.ts +44 -0
- package/dist/types-ts4.5/card/v2/inlinePlayerLazyV2.d.ts +2 -0
- package/dist/types-ts4.5/card/v2/inlinePlayerV2.d.ts +23 -0
- package/dist/types-ts4.5/classnames.d.ts +5 -0
- package/dist/types-ts4.5/errors.d.ts +53 -0
- package/dist/types-ts4.5/index.d.ts +15 -0
- package/dist/types-ts4.5/inline/index.d.ts +1 -0
- package/dist/types-ts4.5/inline/loader.d.ts +26 -0
- package/dist/types-ts4.5/inline/mediaInlineAnalyticsErrorBoundary.d.ts +12 -0
- package/dist/types-ts4.5/inline/mediaInlineCard.d.ts +15 -0
- package/dist/types-ts4.5/inline/mediaInlineCardAnalytics.d.ts +6 -0
- package/dist/types-ts4.5/types.d.ts +105 -0
- package/dist/types-ts4.5/utils/analytics.d.ts +101 -0
- package/dist/types-ts4.5/utils/cardDimensions.d.ts +14 -0
- package/dist/types-ts4.5/utils/containsPixelUnit.d.ts +1 -0
- package/dist/types-ts4.5/utils/dimensionComparer.d.ts +3 -0
- package/dist/types-ts4.5/utils/document.d.ts +2 -0
- package/dist/types-ts4.5/utils/generateUniqueId.d.ts +1 -0
- package/dist/types-ts4.5/utils/getCSSUnitValue.d.ts +1 -0
- package/dist/types-ts4.5/utils/getDataURIDimension.d.ts +9 -0
- package/dist/types-ts4.5/utils/getElementDimension.d.ts +2 -0
- package/dist/types-ts4.5/utils/getMediaCardCursor.d.ts +6 -0
- package/dist/types-ts4.5/utils/globalScope/getSSRData.d.ts +3 -0
- package/dist/types-ts4.5/utils/globalScope/globalScope.d.ts +21 -0
- package/dist/types-ts4.5/utils/globalScope/index.d.ts +4 -0
- package/dist/types-ts4.5/utils/globalScope/types.d.ts +8 -0
- package/dist/types-ts4.5/utils/index.d.ts +6 -0
- package/dist/types-ts4.5/utils/isRetina.d.ts +1 -0
- package/dist/types-ts4.5/utils/isValidPercentageUnit.d.ts +1 -0
- package/dist/types-ts4.5/utils/lightCards/cardError.d.ts +12 -0
- package/dist/types-ts4.5/utils/lightCards/cardLoading.d.ts +5 -0
- package/dist/types-ts4.5/utils/lightCards/errorIcon/index.d.ts +12 -0
- package/dist/types-ts4.5/utils/lightCards/errorIcon/styles.d.ts +1 -0
- package/dist/types-ts4.5/utils/lightCards/getDimensionsWithDefault.d.ts +2 -0
- package/dist/types-ts4.5/utils/lightCards/lightCardWrappers.d.ts +4 -0
- package/dist/types-ts4.5/utils/lightCards/styles.d.ts +2 -0
- package/dist/types-ts4.5/utils/lightCards/types.d.ts +15 -0
- package/dist/types-ts4.5/utils/metadata.d.ts +2 -0
- package/dist/types-ts4.5/utils/mockIntersectionObserver.d.ts +20 -0
- package/dist/types-ts4.5/utils/objectURLCache.d.ts +12 -0
- package/dist/types-ts4.5/utils/preventClickThrough.d.ts +8 -0
- package/dist/types-ts4.5/utils/printScript.d.ts +2 -0
- package/dist/types-ts4.5/utils/ufoExperiences.d.ts +14 -0
- package/dist/types-ts4.5/utils/videoIsPlayable.d.ts +2 -0
- package/dist/types-ts4.5/utils/videoSnapshot.d.ts +1 -0
- package/dist/types-ts4.5/utils/viewportDetector.d.ts +6 -0
- package/package.json +5 -4
- package/tmp/api-report-tmp.d.ts +345 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
3
|
+
import { CardDimensions, CardOnClickCallback } from '../types';
|
|
4
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
5
|
+
export type MediaCardAnalyticsErrorBoundaryProps = {
|
|
6
|
+
dimensions?: CardDimensions;
|
|
7
|
+
data?: {
|
|
8
|
+
[k: string]: any;
|
|
9
|
+
};
|
|
10
|
+
onClick?: CardOnClickCallback;
|
|
11
|
+
featureFlags?: MediaFeatureFlags;
|
|
12
|
+
} & WithAnalyticsEventsProps;
|
|
13
|
+
declare const MediaCardAnalyticsErrorBoundary: React.ComponentType<MediaCardAnalyticsErrorBoundaryProps & WithAnalyticsEventsProps>;
|
|
14
|
+
export default MediaCardAnalyticsErrorBoundary;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactElement, RefObject } from 'react';
|
|
2
|
+
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
+
import { CardDimensions } from '../types';
|
|
4
|
+
export type InlinePlayerWrapperProps = {
|
|
5
|
+
testId?: string;
|
|
6
|
+
dimensions?: CardDimensions;
|
|
7
|
+
selected: {
|
|
8
|
+
selected?: boolean | undefined;
|
|
9
|
+
};
|
|
10
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
11
|
+
innerRef?: RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | undefined;
|
|
12
|
+
children?: JSX.Element[] | ReactElement<any, any> | null | any;
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component, ReactNode, MouseEvent } from 'react';
|
|
2
|
+
import { CardActionIconButtonVariant } from './styles';
|
|
3
|
+
export type CardActionIconButtonProps = {
|
|
4
|
+
readonly icon: ReactNode;
|
|
5
|
+
readonly variant?: CardActionIconButtonVariant;
|
|
6
|
+
readonly triggerColor?: string;
|
|
7
|
+
readonly onClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare class CardActionIconButton extends Component<CardActionIconButtonProps> {
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
private onMouseDown;
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import { CardAction } from '../../../actions';
|
|
3
|
+
import { CardActionIconButtonVariant } from './styles';
|
|
4
|
+
export type CardActionsDropdownMenuProps = {
|
|
5
|
+
readonly actions: CardAction[];
|
|
6
|
+
readonly triggerColor?: string;
|
|
7
|
+
readonly triggerVariant?: CardActionIconButtonVariant;
|
|
8
|
+
readonly onOpenChange?: (attrs: {
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
}) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare class CardActionsDropdownMenu extends Component<CardActionsDropdownMenuProps> {
|
|
13
|
+
render(): JSX.Element | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import { CardAction } from '../../../actions';
|
|
3
|
+
import { CardActionIconButtonVariant } from './styles';
|
|
4
|
+
export interface CardActionsViewProps {
|
|
5
|
+
readonly actions: CardAction[];
|
|
6
|
+
readonly onToggle?: (attrs: {
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
}) => void;
|
|
9
|
+
readonly triggerColor?: string;
|
|
10
|
+
readonly variant?: CardActionIconButtonVariant;
|
|
11
|
+
}
|
|
12
|
+
export declare class CardActionsView extends Component<CardActionsViewProps> {
|
|
13
|
+
render(): JSX.Element | null;
|
|
14
|
+
private renderActionIconButton;
|
|
15
|
+
private renderOtherActionButtons;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { CardActionsView as default, CardActionsView } from './cardActionsView';
|
|
2
|
+
export type { CardActionsViewProps } from './cardActionsView';
|
|
3
|
+
export { CardActionIconButton } from './cardActionIconButton';
|
|
4
|
+
export type { CardActionIconButtonProps } from './cardActionIconButton';
|
|
5
|
+
export { CardActionsDropdownMenu } from './cardActionsDropdownMenu';
|
|
6
|
+
export type { CardActionsDropdownMenuProps } from './cardActionsDropdownMenu';
|
|
7
|
+
export { CardActionIconButtonVariant } from './styles';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { MouseEvent, HTMLAttributes } from 'react';
|
|
2
|
+
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
+
export declare const wrapperStyles: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare enum CardActionIconButtonVariant {
|
|
5
|
+
default = "default",
|
|
6
|
+
filled = "filled"
|
|
7
|
+
}
|
|
8
|
+
export type CardActionButtonOwnProps = {
|
|
9
|
+
variant?: CardActionIconButtonVariant;
|
|
10
|
+
style?: {
|
|
11
|
+
color: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
14
|
+
onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
};
|
|
17
|
+
export type CardActionButtonProps = CardActionButtonOwnProps & HTMLAttributes<HTMLDivElement>;
|
|
18
|
+
export declare const cardActionButtonStyles: ({ variant, }: CardActionButtonProps) => import("@emotion/react").SerializedStyles;
|
|
@@ -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 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 type InternalIconMessageProps = {
|
|
4
|
+
messageDescriptor: MessageDescriptor;
|
|
5
|
+
animated?: boolean;
|
|
6
|
+
reducedFont?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type CreatingPreviewProps = {
|
|
9
|
+
disableAnimation?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type StyledTextProps = {
|
|
12
|
+
animated?: boolean;
|
|
13
|
+
reducedFont?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export 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 '../../../types';
|
|
4
|
+
export 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,5 @@
|
|
|
1
|
+
export declare const playButtonClassName = "media-card-play-button";
|
|
2
|
+
export declare const bkgClassName = "play-icon-background";
|
|
3
|
+
export declare const fixedPlayButtonStyles: string;
|
|
4
|
+
export declare const playButtonWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const backgroundStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Breakpoint } from '../common';
|
|
3
|
+
export type ProgressBarProps = {
|
|
4
|
+
progress?: number;
|
|
5
|
+
breakpoint?: Breakpoint;
|
|
6
|
+
positionBottom?: boolean;
|
|
7
|
+
showOnTop?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const getNormalizedProgress: (progress?: number) => number;
|
|
10
|
+
export declare const ProgressBar: ({ progress, breakpoint, positionBottom, showOnTop, }: ProgressBarProps) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Breakpoint } from '../common';
|
|
2
|
+
import { StyledBarProps } from './types';
|
|
3
|
+
export declare function generateResponsiveStyles(breakpoint: Breakpoint, positionBottom: boolean, showOnTop: boolean, multiplier?: number): string;
|
|
4
|
+
export declare const styledBarStyles: {
|
|
5
|
+
(props: StyledBarProps): import("@emotion/react").SerializedStyles;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CardDimensions, CardAppearance } from '../../types';
|
|
2
|
+
import { Breakpoint } from './common';
|
|
3
|
+
import { MediaCardCursor } from '../../types';
|
|
4
|
+
export declare const calcBreakpointSize: (wrapperWidth?: number) => Breakpoint;
|
|
5
|
+
export declare const generateResponsiveStyles: (breakpoint?: Breakpoint) => string;
|
|
6
|
+
export declare const getWrapperDimensions: (dimensions?: CardDimensions, appearance?: CardAppearance) => string;
|
|
7
|
+
export declare const getWrapperShadow: (disableOverlay: boolean, selected: boolean) => string;
|
|
8
|
+
export declare const getCursorStyle: (cursor: MediaCardCursor | undefined) => string;
|
|
9
|
+
export declare const getClickablePlayButtonStyles: (isPlayButtonClickable: boolean) => string;
|
|
10
|
+
export declare const getSelectableTickBoxStyles: (isTickBoxSelectable: boolean) => string;
|
|
11
|
+
export declare const cardImageContainerStyles: import("@emotion/react").SerializedStyles;
|
|
12
|
+
export declare const transition: (propertyName?: string) => string;
|
|
13
|
+
export declare const rgba: (hex: any, opacity: any) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const tickBoxClassName = "media-card-tickbox";
|
|
2
|
+
export declare const tickboxFixedStyles: string;
|
|
3
|
+
export declare const getSelectedStyles: (selected?: boolean) => string;
|
|
4
|
+
export declare const wrapperStyles: {
|
|
5
|
+
(selected?: boolean): import("@emotion/react").SerializedStyles;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TitleBoxFooterProps, TitleBoxHeaderProps, TitleBoxWrapperProps } from './types';
|
|
2
|
+
export declare const titleBoxWrapperStyles: {
|
|
3
|
+
({ breakpoint, titleBoxBgColor, theme, }: TitleBoxWrapperProps): import("@emotion/react").SerializedStyles;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const titleBoxHeaderStyles: {
|
|
7
|
+
({ hasIconOverlap, }: TitleBoxHeaderProps): import("@emotion/react").SerializedStyles;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const titleBoxFooterStyles: {
|
|
11
|
+
({ hasIconOverlap, }: TitleBoxFooterProps): import("@emotion/react").SerializedStyles;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const titleBoxIconStyles: import("@emotion/react").SerializedStyles;
|
|
15
|
+
export declare const errorMessageWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormattedDateProps, TitleBoxProps } from './types';
|
|
3
|
+
export declare const FormattedDate: React.ComponentType<FormattedDateProps>;
|
|
4
|
+
export declare const TitleBox: ({ name, createdAt, breakpoint, titleBoxBgColor, titleBoxIcon, }: TitleBoxProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { TitleBoxFooterProps, TitleBoxHeaderProps, TitleBoxWrapperProps } from './types';
|
|
4
|
+
export declare const TitleBoxWrapper: (props: TitleBoxWrapperProps) => jsx.JSX.Element;
|
|
5
|
+
export declare const TitleBoxHeader: (props: TitleBoxHeaderProps) => jsx.JSX.Element;
|
|
6
|
+
export declare const TitleBoxFooter: (props: TitleBoxFooterProps) => jsx.JSX.Element;
|
|
7
|
+
export declare const TitleBoxIcon: (props: any) => jsx.JSX.Element;
|
|
8
|
+
export declare const ErrorMessageWrapper: (props: any) => jsx.JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MessageDescriptor } from 'react-intl-next';
|
|
3
|
+
import { Breakpoint } from '../common';
|
|
4
|
+
import { TitleBoxIcon as TitleBoxIconType } from '../../../types';
|
|
5
|
+
import { GlobalThemeTokens } from '@atlaskit/theme/components';
|
|
6
|
+
export type TitleBoxProps = {
|
|
7
|
+
name: string;
|
|
8
|
+
breakpoint: Breakpoint;
|
|
9
|
+
createdAt?: number;
|
|
10
|
+
titleBoxBgColor?: string;
|
|
11
|
+
titleBoxIcon?: TitleBoxIconType;
|
|
12
|
+
};
|
|
13
|
+
export type FormattedDateProps = {
|
|
14
|
+
timestamp: number;
|
|
15
|
+
};
|
|
16
|
+
export type TitleBoxWrapperProps = {
|
|
17
|
+
breakpoint: Breakpoint;
|
|
18
|
+
titleBoxBgColor?: string;
|
|
19
|
+
children?: JSX.Element | JSX.Element[] | any;
|
|
20
|
+
theme?: GlobalThemeTokens;
|
|
21
|
+
};
|
|
22
|
+
export type TitleBoxFooterProps = {
|
|
23
|
+
hasIconOverlap: boolean;
|
|
24
|
+
children?: JSX.Element;
|
|
25
|
+
};
|
|
26
|
+
export type TitleBoxHeaderProps = {
|
|
27
|
+
hasIconOverlap: boolean;
|
|
28
|
+
children?: JSX.Element;
|
|
29
|
+
};
|
|
30
|
+
export type OnRetryFunction = () => void;
|
|
31
|
+
export type FailedTitleBoxProps = {
|
|
32
|
+
breakpoint: Breakpoint;
|
|
33
|
+
customMessage?: MessageDescriptor;
|
|
34
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { UnhandledErrorCardProps } from './types';
|
|
5
|
+
export declare class UnhandledErrorCard extends Component<UnhandledErrorCardProps, {}> {
|
|
6
|
+
render(): jsx.JSX.Element;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Wrapper } from './wrapper';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { WrapperProps } from './types';
|
|
2
|
+
export declare const wrapperStyles: {
|
|
3
|
+
({ breakpoint, dimensions, appearance, disableOverlay, displayBackground, selected, isPlayButtonClickable, isTickBoxSelectable, shouldDisplayTooltip, mediaCardCursor, theme, }: WrapperProps): import("@emotion/react").SerializedStyles;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { MouseEvent, RefObject } from 'react';
|
|
2
|
+
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
+
import { CardDimensions, CardAppearance } from '../../../types';
|
|
4
|
+
import { Breakpoint } from '../common';
|
|
5
|
+
import { MediaCardCursor } from '../../../types';
|
|
6
|
+
import { GlobalThemeTokens } from '@atlaskit/theme/components';
|
|
7
|
+
export interface WrapperProps {
|
|
8
|
+
testId?: string;
|
|
9
|
+
breakpoint: Breakpoint;
|
|
10
|
+
mediaCardCursor?: MediaCardCursor;
|
|
11
|
+
dimensions?: CardDimensions;
|
|
12
|
+
appearance?: CardAppearance;
|
|
13
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
14
|
+
onMouseEnter?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
15
|
+
mediaType?: string;
|
|
16
|
+
disableOverlay: boolean;
|
|
17
|
+
displayBackground: boolean;
|
|
18
|
+
selected: boolean;
|
|
19
|
+
isPlayButtonClickable: boolean;
|
|
20
|
+
isTickBoxSelectable: boolean;
|
|
21
|
+
shouldDisplayTooltip: boolean;
|
|
22
|
+
innerRef?: RefObject<HTMLDivElement>;
|
|
23
|
+
children?: JSX.Element;
|
|
24
|
+
theme?: GlobalThemeTokens;
|
|
25
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { UIAnalyticsEvent, WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
+
import { FileState, MediaSubscription } from '@atlaskit/media-client';
|
|
4
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
5
|
+
import { CardAction } from '../actions';
|
|
6
|
+
import { CardProps, CardState, CardStatus } from '../../types';
|
|
7
|
+
export type CardV2BaseProps = CardProps & WithAnalyticsEventsProps & Partial<WrappedComponentProps>;
|
|
8
|
+
export declare class CardV2Base extends Component<CardV2BaseProps, CardState> {
|
|
9
|
+
private internalOccurrenceKey;
|
|
10
|
+
private hasBeenMounted;
|
|
11
|
+
private fileStateFlags;
|
|
12
|
+
private ssrReliability;
|
|
13
|
+
private timeElapsedTillCommenced;
|
|
14
|
+
subscription?: MediaSubscription;
|
|
15
|
+
private ssrData?;
|
|
16
|
+
private traceContext;
|
|
17
|
+
static defaultProps: Partial<CardProps>;
|
|
18
|
+
constructor(props: CardV2BaseProps);
|
|
19
|
+
private getSSRPreview;
|
|
20
|
+
componentDidMount(): void;
|
|
21
|
+
componentDidUpdate(prevProps: CardProps, prevState: CardState): void;
|
|
22
|
+
componentWillUnmount(): void;
|
|
23
|
+
updateStateForIdentifier(): void;
|
|
24
|
+
private getImageURLParams;
|
|
25
|
+
private getMediaBlobUrlAttrs;
|
|
26
|
+
private getCardPreviewParams;
|
|
27
|
+
private setCacheSSRPreview;
|
|
28
|
+
private refetchSSRPreview;
|
|
29
|
+
private resolveUpfrontPreview;
|
|
30
|
+
private fetchAndCacheRemotePreview;
|
|
31
|
+
private resolvePreview;
|
|
32
|
+
updateFileStateFlag(fileState?: FileState): void;
|
|
33
|
+
private subscribeFileState;
|
|
34
|
+
private get requestedDimensions();
|
|
35
|
+
private get metadata();
|
|
36
|
+
private get fileAttributes();
|
|
37
|
+
private getPerformanceAttributes;
|
|
38
|
+
private logSSRImageError;
|
|
39
|
+
private onImageError;
|
|
40
|
+
private onImageLoad;
|
|
41
|
+
private fireOperationalEvent;
|
|
42
|
+
private fireCommencedEvent;
|
|
43
|
+
private fireAbortedEvent;
|
|
44
|
+
private fireCopiedEvent;
|
|
45
|
+
private fireScreenEvent;
|
|
46
|
+
private fireNonCriticalErrorEvent;
|
|
47
|
+
private safeSetState;
|
|
48
|
+
get actions(): CardAction[];
|
|
49
|
+
onCardViewClick: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
50
|
+
onInlinePlayerError: () => void;
|
|
51
|
+
setRef: (cardRef: HTMLDivElement | null) => void;
|
|
52
|
+
renderInlinePlayer: () => JSX.Element;
|
|
53
|
+
onMediaViewerClose: () => void;
|
|
54
|
+
private onDisplayImage;
|
|
55
|
+
renderMediaViewer: () => React.ReactPortal | undefined;
|
|
56
|
+
renderCard: (withCallbacks?: boolean, cardStatusOverride?: CardStatus, izLazyOverride?: boolean) => JSX.Element;
|
|
57
|
+
private storeSSRData;
|
|
58
|
+
render(): JSX.Element;
|
|
59
|
+
private onCardInViewport;
|
|
60
|
+
onClick: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
61
|
+
onMouseEnter: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
62
|
+
}
|
|
63
|
+
export declare const CardV2: React.ComponentType<CardV2BaseProps>;
|
|
@@ -0,0 +1,44 @@
|
|
|
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, CardPreview, MediaCardCursor } from '../../types';
|
|
8
|
+
import { MediaCardError } from '../../errors';
|
|
9
|
+
export interface CardViewV2OwnProps extends SharedCardProps {
|
|
10
|
+
readonly status: CardStatus;
|
|
11
|
+
readonly mediaItemType: MediaItemType;
|
|
12
|
+
readonly mediaCardCursor?: MediaCardCursor;
|
|
13
|
+
readonly metadata?: FileDetails;
|
|
14
|
+
readonly error?: MediaCardError;
|
|
15
|
+
readonly onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
16
|
+
readonly onMouseEnter?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
17
|
+
readonly onDisplayImage?: () => void;
|
|
18
|
+
readonly cardPreview?: CardPreview;
|
|
19
|
+
readonly progress?: number;
|
|
20
|
+
readonly innerRef?: (instance: HTMLDivElement | null) => void;
|
|
21
|
+
readonly onImageLoad?: (cardPreview: CardPreview) => void;
|
|
22
|
+
readonly onImageError?: (cardPreview: CardPreview) => void;
|
|
23
|
+
readonly nativeLazyLoad?: boolean;
|
|
24
|
+
readonly forceSyncDisplay?: boolean;
|
|
25
|
+
disableAnimation?: boolean;
|
|
26
|
+
shouldHideTooltip?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export type CardViewV2Props = CardViewV2OwnProps & WithAnalyticsEventsProps;
|
|
29
|
+
export interface RenderConfigByStatusV2 {
|
|
30
|
+
renderTypeIcon?: boolean;
|
|
31
|
+
iconMessage?: JSX.Element;
|
|
32
|
+
renderImageRenderer?: boolean;
|
|
33
|
+
renderPlayButton?: boolean;
|
|
34
|
+
renderTitleBox?: boolean;
|
|
35
|
+
renderBlanket?: boolean;
|
|
36
|
+
isFixedBlanket?: boolean;
|
|
37
|
+
renderProgressBar?: boolean;
|
|
38
|
+
renderSpinner?: boolean;
|
|
39
|
+
renderFailedTitleBox?: boolean;
|
|
40
|
+
renderTickBox?: boolean;
|
|
41
|
+
customTitleMessage?: MessageDescriptor;
|
|
42
|
+
}
|
|
43
|
+
export declare const CardViewV2Base: ({ innerRef, onImageLoad, onImageError, dimensions, appearance, onClick, onMouseEnter, testId, metadata, status, selected, selectable, cardPreview, mediaCardCursor, shouldHideTooltip, progress, alt, resizeMode, onDisplayImage, nativeLazyLoad, forceSyncDisplay, actions, disableOverlay, titleBoxBgColor, titleBoxIcon, error, disableAnimation, }: CardViewV2Props) => jsx.JSX.Element;
|
|
44
|
+
export declare const CardViewV2: React.ForwardRefExoticComponent<Omit<CardViewV2Props, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const InlinePlayerLazyV2: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Pick<import("./inlinePlayerV2").InlinePlayerProps, "createAnalyticsEvent" | keyof import("./inlinePlayerV2").InlinePlayerOwnProps> & import("react").RefAttributes<HTMLDivElement>>>;
|