@atlaskit/media-card 77.12.0 → 77.12.2
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 +19 -0
- package/compass.yml +6 -3
- package/dist/cjs/card/card.js +5 -5
- package/dist/cjs/card/cardView.js +1 -1
- package/dist/cjs/card/inlinePlayerWrapper.js +4 -1
- package/dist/cjs/card/inlinePlayerWrapperStyles.js +2 -2
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/ui/actionsBar/actionsBarWrapper.js +4 -1
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionButton.js +5 -1
- package/dist/cjs/card/ui/actionsBar/cardActions/cardActionsView.js +1 -1
- package/dist/cjs/card/ui/actionsBar/cardActions/styles.js +14 -2
- package/dist/cjs/card/ui/actionsBar/styles.js +13 -8
- package/dist/cjs/card/ui/blanket/blanket.js +2 -0
- package/dist/cjs/card/ui/blanket/styles.js +8 -2
- package/dist/cjs/card/ui/iconMessage/iconMessageWrapper.js +3 -0
- package/dist/cjs/card/ui/iconWrapper/iconWrapper.js +4 -1
- package/dist/cjs/card/ui/iconWrapper/styles.js +3 -0
- package/dist/cjs/card/ui/openMediaViewerButton/openMediaViewerButton.js +9 -20
- package/dist/cjs/card/ui/playButton/playButtonBackground.js +2 -1
- package/dist/cjs/card/ui/playButton/playButtonWrapper.js +2 -1
- package/dist/cjs/card/ui/playButton/styles.js +7 -0
- package/dist/cjs/card/ui/progressBar/styledBar.js +4 -1
- package/dist/cjs/card/ui/progressBar/styles.js +3 -0
- package/dist/cjs/card/ui/tickBox/tickBoxWrapper.js +14 -3
- package/dist/cjs/card/ui/titleBox/styles.js +24 -4
- package/dist/cjs/card/ui/titleBox/titleBoxComponents.js +30 -17
- package/dist/cjs/card/ui/unhandledErrorCard/index.js +22 -11
- package/dist/cjs/card/ui/wrapper/imageContainer.js +1 -0
- package/dist/cjs/card/ui/wrapper/styles.js +2 -2
- package/dist/cjs/card/ui/wrapper/wrapper.js +4 -1
- package/dist/cjs/card/v2/cardV2.js +1 -1
- package/dist/cjs/card/v2/cardViewV2.js +1 -1
- package/dist/cjs/card/v2/cardviews/cardViewWrapper.js +1 -0
- package/dist/cjs/card/v2/cardviews/errorCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/iconCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/imageCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/index.js +1 -0
- package/dist/cjs/card/v2/cardviews/loadingCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/processingCardView.js +1 -0
- package/dist/cjs/card/v2/cardviews/videoCardView.js +1 -0
- package/dist/cjs/card/v2/fileCard.js +1 -1
- package/dist/cjs/card/v2/svgView/svgView.js +1 -0
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +11 -11
- package/dist/cjs/utils/lightCards/errorIcon/index.js +10 -7
- package/dist/cjs/utils/lightCards/errorIcon/styles.js +3 -0
- package/dist/cjs/utils/lightCards/lightCardWrappers.js +9 -5
- package/dist/cjs/utils/lightCards/styles.js +10 -2
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +5 -5
- package/dist/es2019/card/cardView.js +1 -0
- package/dist/es2019/card/inlinePlayerWrapper.js +4 -1
- package/dist/es2019/card/inlinePlayerWrapperStyles.js +13 -12
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/ui/actionsBar/actionsBarWrapper.js +4 -1
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionButton.js +4 -1
- package/dist/es2019/card/ui/actionsBar/cardActions/cardActionsView.js +1 -0
- package/dist/es2019/card/ui/actionsBar/cardActions/styles.js +14 -2
- package/dist/es2019/card/ui/actionsBar/styles.js +4 -1
- package/dist/es2019/card/ui/blanket/blanket.js +2 -0
- package/dist/es2019/card/ui/blanket/styles.js +7 -2
- package/dist/es2019/card/ui/iconMessage/iconMessageWrapper.js +2 -0
- package/dist/es2019/card/ui/iconWrapper/iconWrapper.js +4 -1
- package/dist/es2019/card/ui/iconWrapper/styles.js +2 -0
- package/dist/es2019/card/ui/openMediaViewerButton/openMediaViewerButton.js +7 -18
- package/dist/es2019/card/ui/playButton/playButtonBackground.js +2 -1
- package/dist/es2019/card/ui/playButton/playButtonWrapper.js +2 -1
- package/dist/es2019/card/ui/playButton/styles.js +6 -0
- package/dist/es2019/card/ui/progressBar/styledBar.js +4 -1
- package/dist/es2019/card/ui/progressBar/styles.js +2 -0
- package/dist/es2019/card/ui/tickBox/tickBoxWrapper.js +13 -3
- package/dist/es2019/card/ui/titleBox/styles.js +23 -4
- package/dist/es2019/card/ui/titleBox/titleBoxComponents.js +30 -17
- package/dist/es2019/card/ui/unhandledErrorCard/index.js +22 -10
- package/dist/es2019/card/ui/wrapper/imageContainer.js +1 -0
- package/dist/es2019/card/ui/wrapper/styles.js +22 -21
- package/dist/es2019/card/ui/wrapper/wrapper.js +4 -1
- package/dist/es2019/card/v2/cardV2.js +1 -1
- package/dist/es2019/card/v2/cardViewV2.js +1 -0
- package/dist/es2019/card/v2/cardviews/cardViewWrapper.js +1 -0
- package/dist/es2019/card/v2/cardviews/errorCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/iconCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/imageCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/index.js +1 -0
- package/dist/es2019/card/v2/cardviews/loadingCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/processingCardView.js +1 -0
- package/dist/es2019/card/v2/cardviews/videoCardView.js +1 -0
- package/dist/es2019/card/v2/fileCard.js +1 -1
- package/dist/es2019/card/v2/svgView/svgView.js +1 -0
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +11 -11
- package/dist/es2019/utils/lightCards/errorIcon/index.js +10 -6
- package/dist/es2019/utils/lightCards/errorIcon/styles.js +3 -0
- package/dist/es2019/utils/lightCards/lightCardWrappers.js +9 -5
- package/dist/es2019/utils/lightCards/styles.js +9 -2
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +5 -5
- package/dist/esm/card/cardView.js +1 -0
- package/dist/esm/card/inlinePlayerWrapper.js +4 -1
- package/dist/esm/card/inlinePlayerWrapperStyles.js +2 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/ui/actionsBar/actionsBarWrapper.js +4 -1
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionButton.js +4 -1
- package/dist/esm/card/ui/actionsBar/cardActions/cardActionsView.js +1 -0
- package/dist/esm/card/ui/actionsBar/cardActions/styles.js +14 -2
- package/dist/esm/card/ui/actionsBar/styles.js +12 -8
- package/dist/esm/card/ui/blanket/blanket.js +2 -0
- package/dist/esm/card/ui/blanket/styles.js +7 -2
- package/dist/esm/card/ui/iconMessage/iconMessageWrapper.js +2 -0
- package/dist/esm/card/ui/iconWrapper/iconWrapper.js +4 -1
- package/dist/esm/card/ui/iconWrapper/styles.js +2 -0
- package/dist/esm/card/ui/openMediaViewerButton/openMediaViewerButton.js +7 -18
- package/dist/esm/card/ui/playButton/playButtonBackground.js +2 -1
- package/dist/esm/card/ui/playButton/playButtonWrapper.js +2 -1
- package/dist/esm/card/ui/playButton/styles.js +6 -0
- package/dist/esm/card/ui/progressBar/styledBar.js +4 -1
- package/dist/esm/card/ui/progressBar/styles.js +2 -0
- package/dist/esm/card/ui/tickBox/tickBoxWrapper.js +13 -3
- package/dist/esm/card/ui/titleBox/styles.js +23 -4
- package/dist/esm/card/ui/titleBox/titleBoxComponents.js +30 -17
- package/dist/esm/card/ui/unhandledErrorCard/index.js +22 -10
- package/dist/esm/card/ui/wrapper/imageContainer.js +1 -0
- package/dist/esm/card/ui/wrapper/styles.js +2 -1
- package/dist/esm/card/ui/wrapper/wrapper.js +4 -1
- package/dist/esm/card/v2/cardV2.js +1 -1
- package/dist/esm/card/v2/cardViewV2.js +1 -0
- package/dist/esm/card/v2/cardviews/cardViewWrapper.js +1 -0
- package/dist/esm/card/v2/cardviews/errorCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/iconCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/imageCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/index.js +1 -0
- package/dist/esm/card/v2/cardviews/loadingCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/processingCardView.js +1 -0
- package/dist/esm/card/v2/cardviews/videoCardView.js +1 -0
- package/dist/esm/card/v2/fileCard.js +1 -1
- package/dist/esm/card/v2/svgView/svgView.js +1 -0
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +11 -11
- package/dist/esm/utils/lightCards/errorIcon/index.js +10 -6
- package/dist/esm/utils/lightCards/errorIcon/styles.js +3 -0
- package/dist/esm/utils/lightCards/lightCardWrappers.js +9 -5
- package/dist/esm/utils/lightCards/styles.js +9 -2
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/ui/iconWrapper/styles.d.ts +1 -1
- package/dist/types/card/ui/openMediaViewerButton/openMediaViewerButton.d.ts +0 -1
- package/dist/types/card/ui/titleBox/styles.d.ts +1 -1
- package/dist/types/utils/preventClickThrough.d.ts +1 -1
- package/dist/types/utils/viewportDetector.d.ts +1 -1
- package/dist/types-ts4.5/card/ui/iconWrapper/styles.d.ts +1 -1
- package/dist/types-ts4.5/card/ui/openMediaViewerButton/openMediaViewerButton.d.ts +0 -1
- package/dist/types-ts4.5/card/ui/titleBox/styles.d.ts +1 -1
- package/dist/types-ts4.5/utils/preventClickThrough.d.ts +1 -1
- package/dist/types-ts4.5/utils/viewportDetector.d.ts +1 -1
- package/example-helpers/DelayedRender.tsx +19 -19
- package/example-helpers/cardViewWrapper.tsx +20 -22
- package/example-helpers/cards.tsx +268 -331
- package/example-helpers/developmentUseMessage.tsx +8 -9
- package/example-helpers/index.tsx +100 -124
- package/example-helpers/selectableCard.tsx +32 -35
- package/example-helpers/ssrHelpers.tsx +19 -29
- package/example-helpers/styles.ts +97 -73
- package/example-helpers/svg-helpers/cardContainer.tsx +22 -21
- package/example-helpers/svg-helpers/controls.tsx +11 -11
- package/example-helpers/svg-helpers/dimensionPicker.tsx +85 -93
- package/example-helpers/svg-helpers/svgContainer.tsx +19 -18
- package/example-helpers/svg-helpers/toggle.tsx +28 -29
- package/example-helpers/svg-helpers/uploader.ts +33 -33
- package/package.json +121 -120
- package/report.api.md +227 -232
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/media-card"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -41,28 +42,26 @@ export function Card(props: CardWithMediaClientConfigProps): JSX.Element;
|
|
|
41
42
|
|
|
42
43
|
// @public (undocumented)
|
|
43
44
|
export interface CardAction {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
// (undocumented)
|
|
46
|
+
handler: CardEventHandler;
|
|
47
|
+
// (undocumented)
|
|
48
|
+
icon?: ReactNode;
|
|
49
|
+
// (undocumented)
|
|
50
|
+
label?: string;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
// @public (undocumented)
|
|
53
54
|
export type CardAppearance = 'auto' | 'horizontal' | 'image' | 'square';
|
|
54
55
|
|
|
55
56
|
// @public (undocumented)
|
|
56
|
-
type CardBaseProps = CardProps &
|
|
57
|
-
WithAnalyticsEventsProps &
|
|
58
|
-
Partial<WrappedComponentProps>;
|
|
57
|
+
type CardBaseProps = CardProps & WithAnalyticsEventsProps & Partial<WrappedComponentProps>;
|
|
59
58
|
|
|
60
59
|
// @public (undocumented)
|
|
61
60
|
export interface CardDimensions {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
// (undocumented)
|
|
62
|
+
height?: CardDimensionValue;
|
|
63
|
+
// (undocumented)
|
|
64
|
+
width?: CardDimensionValue;
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
// @public (undocumented)
|
|
@@ -70,22 +69,22 @@ export type CardDimensionValue = number | string;
|
|
|
70
69
|
|
|
71
70
|
// @public (undocumented)
|
|
72
71
|
export class CardError extends Component<ErrorCardProps, {}> {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
// (undocumented)
|
|
73
|
+
static defaultProps: {
|
|
74
|
+
size: string;
|
|
75
|
+
};
|
|
76
|
+
// (undocumented)
|
|
77
|
+
get icon(): JSX.Element;
|
|
78
|
+
// (undocumented)
|
|
79
|
+
render(): JSX.Element;
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
// @public (undocumented)
|
|
84
83
|
export interface CardEvent {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
// (undocumented)
|
|
85
|
+
event: MouseEvent_2<HTMLElement>;
|
|
86
|
+
// (undocumented)
|
|
87
|
+
mediaItemDetails?: FileDetails;
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
// @public (undocumented)
|
|
@@ -93,137 +92,137 @@ export type CardEventHandler = (item?: FileItem, event?: Event) => void;
|
|
|
93
92
|
|
|
94
93
|
// @public (undocumented)
|
|
95
94
|
interface CardEventProps {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
// (undocumented)
|
|
96
|
+
readonly onClick?: CardOnClickCallback;
|
|
97
|
+
readonly onFullscreenChange?: (fullscreen: boolean) => void;
|
|
98
|
+
// (undocumented)
|
|
99
|
+
readonly onMouseEnter?: (result: CardEvent) => void;
|
|
101
100
|
}
|
|
102
101
|
|
|
103
102
|
// @public (undocumented)
|
|
104
103
|
export class CardLoading extends Component<StaticCardProps, {}> {
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
// (undocumented)
|
|
105
|
+
render(): JSX.Element;
|
|
107
106
|
}
|
|
108
107
|
|
|
109
108
|
// @public (undocumented)
|
|
110
109
|
export interface CardOnClickCallback {
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
// (undocumented)
|
|
111
|
+
(result: CardEvent, analyticsEvent?: UIAnalyticsEvent): void;
|
|
113
112
|
}
|
|
114
113
|
|
|
115
114
|
// @public (undocumented)
|
|
116
115
|
export interface CardPreview {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
116
|
+
// (undocumented)
|
|
117
|
+
dataURI: string;
|
|
118
|
+
// (undocumented)
|
|
119
|
+
dimensions?: CardDimensions;
|
|
120
|
+
// (undocumented)
|
|
121
|
+
orientation?: number;
|
|
122
|
+
// (undocumented)
|
|
123
|
+
source: CardPreviewSource;
|
|
125
124
|
}
|
|
126
125
|
|
|
127
126
|
// @public (undocumented)
|
|
128
127
|
type CardPreviewSource =
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
128
|
+
| 'cache-local'
|
|
129
|
+
| 'cache-remote'
|
|
130
|
+
| 'cache-ssr-client'
|
|
131
|
+
| 'cache-ssr-server'
|
|
132
|
+
| 'external'
|
|
133
|
+
| 'local'
|
|
134
|
+
| 'remote'
|
|
135
|
+
| 'ssr-client'
|
|
136
|
+
| 'ssr-data'
|
|
137
|
+
| 'ssr-server';
|
|
139
138
|
|
|
140
139
|
// @public (undocumented)
|
|
141
140
|
export interface CardProps extends SharedCardProps, CardEventProps {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
141
|
+
// (undocumented)
|
|
142
|
+
readonly contextId?: string;
|
|
143
|
+
// (undocumented)
|
|
144
|
+
readonly identifier: Identifier;
|
|
145
|
+
// (undocumented)
|
|
146
|
+
readonly isLazy?: boolean;
|
|
147
|
+
// (undocumented)
|
|
148
|
+
readonly mediaClient: MediaClient;
|
|
149
|
+
// (undocumented)
|
|
150
|
+
readonly mediaViewerItems?: Identifier[];
|
|
151
|
+
// (undocumented)
|
|
152
|
+
readonly shouldEnableDownloadButton?: boolean;
|
|
153
|
+
// (undocumented)
|
|
154
|
+
readonly shouldHideTooltip?: boolean;
|
|
155
|
+
// (undocumented)
|
|
156
|
+
readonly shouldOpenMediaViewer?: boolean;
|
|
157
|
+
// (undocumented)
|
|
158
|
+
readonly ssr?: SSR;
|
|
159
|
+
// (undocumented)
|
|
160
|
+
readonly useInlinePlayer?: boolean;
|
|
162
161
|
}
|
|
163
162
|
|
|
164
163
|
// @public (undocumented)
|
|
165
164
|
export interface CardState {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
165
|
+
// (undocumented)
|
|
166
|
+
cardPreview?: CardPreview;
|
|
167
|
+
// (undocumented)
|
|
168
|
+
cardRef: HTMLDivElement | null;
|
|
169
|
+
// (undocumented)
|
|
170
|
+
error?: MediaCardError;
|
|
171
|
+
// (undocumented)
|
|
172
|
+
fileState?: FileState;
|
|
173
|
+
// (undocumented)
|
|
174
|
+
isBannedLocalPreview: boolean;
|
|
175
|
+
// (undocumented)
|
|
176
|
+
isCardVisible: boolean;
|
|
177
|
+
// (undocumented)
|
|
178
|
+
isPlayingFile: boolean;
|
|
179
|
+
// (undocumented)
|
|
180
|
+
mediaViewerSelectedItem?: Identifier;
|
|
181
|
+
// (undocumented)
|
|
182
|
+
previewDidRender: boolean;
|
|
183
|
+
// (undocumented)
|
|
184
|
+
progress?: number;
|
|
185
|
+
// (undocumented)
|
|
186
|
+
shouldAutoplay?: boolean;
|
|
187
|
+
// (undocumented)
|
|
188
|
+
shouldUpdateStateForIdentifier?: boolean;
|
|
189
|
+
// (undocumented)
|
|
190
|
+
status: CardStatus;
|
|
191
|
+
// (undocumented)
|
|
192
|
+
wasResolvedUpfrontPreview: boolean;
|
|
194
193
|
}
|
|
195
194
|
|
|
196
195
|
// @public (undocumented)
|
|
197
196
|
export type CardStatus =
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
197
|
+
| 'complete'
|
|
198
|
+
| 'error'
|
|
199
|
+
| 'failed-processing'
|
|
200
|
+
| 'loading'
|
|
201
|
+
| 'loading-preview'
|
|
202
|
+
| 'processing'
|
|
203
|
+
| 'uploading';
|
|
205
204
|
|
|
206
205
|
// @public (undocumented)
|
|
207
206
|
type CardWithMediaClientConfigProps = WithMediaClientConfigProps<CardBaseProps>;
|
|
208
207
|
|
|
209
208
|
// @public (undocumented)
|
|
210
209
|
export const defaultImageCardDimensions: {
|
|
211
|
-
|
|
212
|
-
|
|
210
|
+
width: number;
|
|
211
|
+
height: number;
|
|
213
212
|
};
|
|
214
213
|
|
|
215
214
|
// @public (undocumented)
|
|
216
215
|
type ErrorBoundaryComponent = React_2.ComponentType<{
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
data?: {
|
|
217
|
+
[k: string]: any;
|
|
218
|
+
};
|
|
219
|
+
isSelected?: boolean;
|
|
221
220
|
}>;
|
|
222
221
|
|
|
223
222
|
// @public (undocumented)
|
|
224
223
|
interface ErrorCardProps extends StaticCardProps {
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
// (undocumented)
|
|
225
|
+
readonly size: 'large' | 'medium' | 'small' | 'xlarge';
|
|
227
226
|
}
|
|
228
227
|
|
|
229
228
|
// @public (undocumented)
|
|
@@ -231,25 +230,25 @@ export const fileCardImageViewSelector = 'media-file-card-view';
|
|
|
231
230
|
|
|
232
231
|
// @public (undocumented)
|
|
233
232
|
type ImageLoadPrimaryReason =
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
233
|
+
| 'cache-local-uri'
|
|
234
|
+
| 'cache-remote-uri'
|
|
235
|
+
| 'external-uri'
|
|
236
|
+
| 'local-uri'
|
|
237
|
+
| 'remote-uri'
|
|
238
|
+
| 'unknown-uri';
|
|
240
239
|
|
|
241
240
|
// @public (undocumented)
|
|
242
241
|
export interface InlineCardEvent {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
242
|
+
// (undocumented)
|
|
243
|
+
event: MouseEvent_2<HTMLElement> | React.KeyboardEvent;
|
|
244
|
+
// (undocumented)
|
|
245
|
+
mediaItemDetails?: FileDetails;
|
|
247
246
|
}
|
|
248
247
|
|
|
249
248
|
// @public (undocumented)
|
|
250
249
|
export interface InlineCardOnClickCallback {
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
// (undocumented)
|
|
251
|
+
(result: InlineCardEvent, analyticsEvent?: UIAnalyticsEvent): void;
|
|
253
252
|
}
|
|
254
253
|
|
|
255
254
|
// @public (undocumented)
|
|
@@ -257,92 +256,88 @@ export const inlinePlayerClassName = 'media-card-inline-player';
|
|
|
257
256
|
|
|
258
257
|
// @public (undocumented)
|
|
259
258
|
type LocalPreviewPrimaryReason =
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
259
|
+
| 'local-preview-get'
|
|
260
|
+
| 'local-preview-image'
|
|
261
|
+
| 'local-preview-rejected'
|
|
262
|
+
| 'local-preview-unsupported'
|
|
263
|
+
| 'local-preview-video';
|
|
265
264
|
|
|
266
265
|
// @public (undocumented)
|
|
267
266
|
class MediaCardError extends Error {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
readonly primaryReason: MediaCardErrorPrimaryReason;
|
|
274
|
-
// (undocumented)
|
|
275
|
-
readonly secondaryError?: Error | undefined;
|
|
267
|
+
constructor(primaryReason: MediaCardErrorPrimaryReason, secondaryError?: Error | undefined);
|
|
268
|
+
// (undocumented)
|
|
269
|
+
readonly primaryReason: MediaCardErrorPrimaryReason;
|
|
270
|
+
// (undocumented)
|
|
271
|
+
readonly secondaryError?: Error | undefined;
|
|
276
272
|
}
|
|
277
273
|
|
|
278
274
|
// @public
|
|
279
275
|
type MediaCardErrorPrimaryReason =
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
276
|
+
| 'error-file-state'
|
|
277
|
+
| 'metadata-fetch'
|
|
278
|
+
| 'missing-error-data'
|
|
279
|
+
| 'preview-fetch'
|
|
280
|
+
| 'upload'
|
|
281
|
+
| ImageLoadPrimaryReason
|
|
282
|
+
| LocalPreviewPrimaryReason
|
|
283
|
+
| RemotePreviewPrimaryReason
|
|
284
|
+
| SsrPreviewPrimaryReason;
|
|
289
285
|
|
|
290
286
|
// @public (undocumented)
|
|
291
287
|
export class MediaInlineCard extends React_2.PureComponent<
|
|
292
|
-
|
|
293
|
-
|
|
288
|
+
MediaInlineCardWithMediaClientConfigProps & MediaInlineCardLoaderState,
|
|
289
|
+
MediaInlineCardLoaderState
|
|
294
290
|
> {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
291
|
+
// (undocumented)
|
|
292
|
+
componentDidMount(): Promise<void>;
|
|
293
|
+
// (undocumented)
|
|
294
|
+
componentWillUnmount(): Promise<void>;
|
|
295
|
+
// (undocumented)
|
|
296
|
+
static displayName: string;
|
|
297
|
+
// (undocumented)
|
|
298
|
+
static ErrorBoundary?: ErrorBoundaryComponent;
|
|
299
|
+
// (undocumented)
|
|
300
|
+
static MediaInlineCard?: MediaInlineCardWithMediaClientConfigComponent;
|
|
301
|
+
// (undocumented)
|
|
302
|
+
mounted: boolean;
|
|
303
|
+
// (undocumented)
|
|
304
|
+
render(): JSX.Element;
|
|
305
|
+
// (undocumented)
|
|
306
|
+
state: MediaInlineCardLoaderState;
|
|
311
307
|
}
|
|
312
308
|
|
|
313
309
|
// @public (undocumented)
|
|
314
310
|
interface MediaInlineCardLoaderState {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
311
|
+
// (undocumented)
|
|
312
|
+
ErrorBoundary?: ErrorBoundaryComponent;
|
|
313
|
+
// (undocumented)
|
|
314
|
+
MediaInlineCard?: MediaInlineCardWithMediaClientConfigComponent;
|
|
319
315
|
}
|
|
320
316
|
|
|
321
317
|
// @public (undocumented)
|
|
322
318
|
interface MediaInlineCardProps {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
319
|
+
// (undocumented)
|
|
320
|
+
identifier: FileIdentifier;
|
|
321
|
+
// (undocumented)
|
|
322
|
+
isSelected?: boolean;
|
|
323
|
+
// (undocumented)
|
|
324
|
+
mediaClient: MediaClient;
|
|
325
|
+
// (undocumented)
|
|
326
|
+
mediaViewerItems?: Identifier[];
|
|
327
|
+
// (undocumented)
|
|
328
|
+
onClick?: InlineCardOnClickCallback;
|
|
329
|
+
// (undocumented)
|
|
330
|
+
shouldDisplayToolTip?: boolean;
|
|
331
|
+
// (undocumented)
|
|
332
|
+
shouldOpenMediaViewer?: boolean;
|
|
337
333
|
}
|
|
338
334
|
|
|
339
335
|
// @public (undocumented)
|
|
340
336
|
type MediaInlineCardWithMediaClientConfigComponent =
|
|
341
|
-
|
|
337
|
+
React_2.ComponentType<MediaInlineCardWithMediaClientConfigProps>;
|
|
342
338
|
|
|
343
339
|
// @public (undocumented)
|
|
344
|
-
type MediaInlineCardWithMediaClientConfigProps =
|
|
345
|
-
WithMediaClientConfigProps<MediaInlineCardProps>;
|
|
340
|
+
type MediaInlineCardWithMediaClientConfigProps = WithMediaClientConfigProps<MediaInlineCardProps>;
|
|
346
341
|
|
|
347
342
|
// @public (undocumented)
|
|
348
343
|
export const newFileExperienceClassName = 'new-file-experience-wrapper';
|
|
@@ -351,55 +346,55 @@ export { NumericalCardDimensions };
|
|
|
351
346
|
|
|
352
347
|
// @public (undocumented)
|
|
353
348
|
type RemotePreviewPrimaryReason =
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
349
|
+
| 'remote-preview-fetch'
|
|
350
|
+
| 'remote-preview-fetch-ssr'
|
|
351
|
+
| 'remote-preview-not-ready';
|
|
357
352
|
|
|
358
353
|
// @public (undocumented)
|
|
359
354
|
export interface SharedCardProps {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
355
|
+
// (undocumented)
|
|
356
|
+
readonly actions?: Array<CardAction>;
|
|
357
|
+
// (undocumented)
|
|
358
|
+
readonly alt?: string;
|
|
359
|
+
// (undocumented)
|
|
360
|
+
readonly appearance?: CardAppearance;
|
|
361
|
+
// (undocumented)
|
|
362
|
+
readonly dimensions?: CardDimensions;
|
|
363
|
+
// (undocumented)
|
|
364
|
+
readonly disableOverlay?: boolean;
|
|
365
|
+
// (undocumented)
|
|
366
|
+
readonly featureFlags?: MediaFeatureFlags;
|
|
367
|
+
// (undocumented)
|
|
368
|
+
readonly originalDimensions?: NumericalCardDimensions;
|
|
369
|
+
// (undocumented)
|
|
370
|
+
readonly resizeMode?: ImageResizeMode;
|
|
371
|
+
// (undocumented)
|
|
372
|
+
readonly selectable?: boolean;
|
|
373
|
+
// (undocumented)
|
|
374
|
+
readonly selected?: boolean;
|
|
375
|
+
// (undocumented)
|
|
376
|
+
readonly testId?: string;
|
|
377
|
+
// (undocumented)
|
|
378
|
+
readonly titleBoxBgColor?: string;
|
|
379
|
+
// (undocumented)
|
|
380
|
+
readonly titleBoxIcon?: TitleBoxIcon;
|
|
386
381
|
}
|
|
387
382
|
|
|
388
383
|
// @public (undocumented)
|
|
389
384
|
type SsrPreviewPrimaryReason =
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
385
|
+
| 'ssr-client-load'
|
|
386
|
+
| 'ssr-client-uri'
|
|
387
|
+
| 'ssr-server-load'
|
|
388
|
+
| 'ssr-server-uri';
|
|
394
389
|
|
|
395
390
|
// @public (undocumented)
|
|
396
391
|
interface StaticCardProps {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
392
|
+
// (undocumented)
|
|
393
|
+
dimensions?: CardDimensions;
|
|
394
|
+
// (undocumented)
|
|
395
|
+
featureFlags?: MediaFeatureFlags;
|
|
396
|
+
// (undocumented)
|
|
397
|
+
testId?: string;
|
|
403
398
|
}
|
|
404
399
|
|
|
405
400
|
// @public (undocumented)
|
|
@@ -416,10 +411,10 @@ export type TitleBoxIcon = 'LockFilledIcon';
|
|
|
416
411
|
|
|
417
412
|
```json
|
|
418
413
|
{
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
414
|
+
"@emotion/react": "^11.7.1",
|
|
415
|
+
"react": "^16.8.0",
|
|
416
|
+
"react-dom": "^16.8.0",
|
|
417
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
423
418
|
}
|
|
424
419
|
```
|
|
425
420
|
|