@atlaskit/media-viewer 48.3.3 → 48.3.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 +13 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/navigation.js +4 -4
- package/dist/cjs/styleWrappers.js +473 -160
- package/dist/cjs/styles.js +3 -83
- package/dist/cjs/v2/item-viewer-v2.js +66 -58
- package/dist/cjs/viewers/archiveSidebar/archive.js +3 -1
- package/dist/cjs/viewers/archiveSidebar/styleWrappers.js +111 -12
- package/dist/cjs/viewers/archiveSidebar/styles.js +1 -24
- package/dist/cjs/viewers/doc/pdfPasswordInput.js +2 -2
- package/dist/cjs/viewers/image/interactive-img.js +3 -3
- package/dist/cjs/zoomControls.js +4 -3
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/navigation.js +4 -4
- package/dist/es2019/styleWrappers.js +327 -11
- package/dist/es2019/styles.js +3 -342
- package/dist/es2019/v2/item-viewer-v2.js +68 -60
- package/dist/es2019/viewers/archiveSidebar/archive.js +3 -1
- package/dist/es2019/viewers/archiveSidebar/styleWrappers.js +101 -2
- package/dist/es2019/viewers/archiveSidebar/styles.js +0 -108
- package/dist/es2019/viewers/doc/pdfPasswordInput.js +2 -2
- package/dist/es2019/viewers/image/interactive-img.js +4 -4
- package/dist/es2019/zoomControls.js +5 -4
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/navigation.js +4 -4
- package/dist/esm/styleWrappers.js +438 -125
- package/dist/esm/styles.js +3 -82
- package/dist/esm/v2/item-viewer-v2.js +66 -58
- package/dist/esm/viewers/archiveSidebar/archive.js +3 -1
- package/dist/esm/viewers/archiveSidebar/styleWrappers.js +101 -2
- package/dist/esm/viewers/archiveSidebar/styles.js +0 -22
- package/dist/esm/viewers/doc/pdfPasswordInput.js +2 -2
- package/dist/esm/viewers/image/interactive-img.js +4 -4
- package/dist/esm/zoomControls.js +5 -4
- package/dist/types/styleWrappers.d.ts +5 -2
- package/dist/types/styles.d.ts +1 -61
- package/dist/types/viewers/archiveSidebar/styles.d.ts +0 -12
- package/dist/types-ts4.5/styleWrappers.d.ts +5 -2
- package/dist/types-ts4.5/styles.d.ts +1 -61
- package/dist/types-ts4.5/viewers/archiveSidebar/styles.d.ts +0 -12
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ import { isExternalImageIdentifier, isFileIdentifier } from '@atlaskit/media-cli
|
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
6
|
import { messages } from '@atlaskit/media-ui';
|
|
7
7
|
import { isCodeViewerItem } from '@atlaskit/media-ui/codeViewer';
|
|
8
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { useFileState, useMediaClient, MediaFileStateError } from '@atlaskit/media-client-react';
|
|
9
10
|
import { Outcome } from '../domain';
|
|
10
11
|
import { Spinner } from '../loading';
|
|
@@ -127,9 +128,70 @@ export const ItemViewerV2Base = ({
|
|
|
127
128
|
}
|
|
128
129
|
});
|
|
129
130
|
}, [item]);
|
|
130
|
-
const onLoadFail = useCallback(mediaViewerError => {
|
|
131
|
-
setItem(Outcome.failed(mediaViewerError));
|
|
131
|
+
const onLoadFail = useCallback((mediaViewerError, data) => {
|
|
132
|
+
setItem(Outcome.failed(mediaViewerError, data));
|
|
132
133
|
}, []);
|
|
134
|
+
const renderItem = fileItem => {
|
|
135
|
+
const collectionName = isFileIdentifier(identifier) ? identifier.collectionName : undefined;
|
|
136
|
+
const viewerProps = {
|
|
137
|
+
mediaClient,
|
|
138
|
+
item: fileItem,
|
|
139
|
+
collectionName,
|
|
140
|
+
onClose,
|
|
141
|
+
previewCount
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
// TODO: fix all of the item errors
|
|
145
|
+
|
|
146
|
+
if (isCodeViewerItem(fileItem.name, fileItem.mimeType)) {
|
|
147
|
+
//Render error message if code file has size over 10MB.
|
|
148
|
+
//Required by https://product-fabric.atlassian.net/browse/MEX-1788
|
|
149
|
+
if (fileItem.size > MAX_FILE_SIZE_SUPPORTED_BY_CODEVIEWER) {
|
|
150
|
+
return renderError(new MediaViewerError('codeviewer-file-size-exceeds'), fileItem);
|
|
151
|
+
}
|
|
152
|
+
return /*#__PURE__*/React.createElement(CodeViewerV2, _extends({
|
|
153
|
+
onSuccess: onSuccess,
|
|
154
|
+
onError: onLoadFail
|
|
155
|
+
}, viewerProps));
|
|
156
|
+
}
|
|
157
|
+
const {
|
|
158
|
+
mediaType
|
|
159
|
+
} = fileItem;
|
|
160
|
+
switch (mediaType) {
|
|
161
|
+
case 'image':
|
|
162
|
+
return /*#__PURE__*/React.createElement(ImageViewerV2, _extends({
|
|
163
|
+
onLoad: onSuccess,
|
|
164
|
+
onError: onLoadFail,
|
|
165
|
+
contextId: contextId,
|
|
166
|
+
traceContext: traceContext.current
|
|
167
|
+
}, viewerProps));
|
|
168
|
+
case 'audio':
|
|
169
|
+
return /*#__PURE__*/React.createElement(AudioViewerV2, _extends({
|
|
170
|
+
showControls: showControls,
|
|
171
|
+
onCanPlay: onSuccess,
|
|
172
|
+
onError: onLoadFail
|
|
173
|
+
}, viewerProps));
|
|
174
|
+
case 'video':
|
|
175
|
+
return /*#__PURE__*/React.createElement(VideoViewerV2, _extends({
|
|
176
|
+
showControls: showControls,
|
|
177
|
+
onCanPlay: onSuccess,
|
|
178
|
+
onError: onLoadFail
|
|
179
|
+
}, viewerProps));
|
|
180
|
+
case 'doc':
|
|
181
|
+
return /*#__PURE__*/React.createElement(DocViewerV2, _extends({
|
|
182
|
+
onSuccess: onSuccess,
|
|
183
|
+
onError: err => {
|
|
184
|
+
onLoadFail(err, fileState);
|
|
185
|
+
}
|
|
186
|
+
}, viewerProps));
|
|
187
|
+
case 'archive':
|
|
188
|
+
return /*#__PURE__*/React.createElement(ArchiveViewerLoader, _extends({
|
|
189
|
+
onSuccess: onSuccess,
|
|
190
|
+
onError: onLoadFail
|
|
191
|
+
}, viewerProps));
|
|
192
|
+
}
|
|
193
|
+
return renderError(new MediaViewerError('unsupported'), fileItem);
|
|
194
|
+
};
|
|
133
195
|
const renderError = useCallback((error, fileItem) => {
|
|
134
196
|
if (fileItem) {
|
|
135
197
|
let fileState;
|
|
@@ -188,65 +250,11 @@ export const ItemViewerV2Base = ({
|
|
|
188
250
|
case 'processed':
|
|
189
251
|
case 'uploading':
|
|
190
252
|
case 'processing':
|
|
191
|
-
|
|
192
|
-
const collectionName = isFileIdentifier(identifier) ? identifier.collectionName : undefined;
|
|
193
|
-
const viewerProps = {
|
|
194
|
-
mediaClient,
|
|
195
|
-
item: fileItem,
|
|
196
|
-
collectionName,
|
|
197
|
-
onClose,
|
|
198
|
-
previewCount
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
// TODO: fix all of the item errors
|
|
202
|
-
|
|
203
|
-
if (isCodeViewerItem(fileItem.name, fileItem.mimeType)) {
|
|
204
|
-
//Render error message if code file has size over 10MB.
|
|
205
|
-
//Required by https://product-fabric.atlassian.net/browse/MEX-1788
|
|
206
|
-
if (fileItem.size > MAX_FILE_SIZE_SUPPORTED_BY_CODEVIEWER) {
|
|
207
|
-
return renderError(new MediaViewerError('codeviewer-file-size-exceeds'), fileItem);
|
|
208
|
-
}
|
|
209
|
-
return /*#__PURE__*/React.createElement(CodeViewerV2, _extends({
|
|
210
|
-
onSuccess: onSuccess,
|
|
211
|
-
onError: onLoadFail
|
|
212
|
-
}, viewerProps));
|
|
213
|
-
}
|
|
214
|
-
const {
|
|
215
|
-
mediaType
|
|
216
|
-
} = fileItem;
|
|
217
|
-
switch (mediaType) {
|
|
218
|
-
case 'image':
|
|
219
|
-
return /*#__PURE__*/React.createElement(ImageViewerV2, _extends({
|
|
220
|
-
onLoad: onSuccess,
|
|
221
|
-
onError: onLoadFail,
|
|
222
|
-
contextId: contextId,
|
|
223
|
-
traceContext: traceContext.current
|
|
224
|
-
}, viewerProps));
|
|
225
|
-
case 'audio':
|
|
226
|
-
return /*#__PURE__*/React.createElement(AudioViewerV2, _extends({
|
|
227
|
-
showControls: showControls,
|
|
228
|
-
onCanPlay: onSuccess,
|
|
229
|
-
onError: onLoadFail
|
|
230
|
-
}, viewerProps));
|
|
231
|
-
case 'video':
|
|
232
|
-
return /*#__PURE__*/React.createElement(VideoViewerV2, _extends({
|
|
233
|
-
showControls: showControls,
|
|
234
|
-
onCanPlay: onSuccess,
|
|
235
|
-
onError: onLoadFail
|
|
236
|
-
}, viewerProps));
|
|
237
|
-
case 'doc':
|
|
238
|
-
return /*#__PURE__*/React.createElement(DocViewerV2, _extends({
|
|
239
|
-
onSuccess: onSuccess,
|
|
240
|
-
onError: onLoadFail
|
|
241
|
-
}, viewerProps));
|
|
242
|
-
case 'archive':
|
|
243
|
-
return /*#__PURE__*/React.createElement(ArchiveViewerLoader, _extends({
|
|
244
|
-
onSuccess: onSuccess,
|
|
245
|
-
onError: onLoadFail
|
|
246
|
-
}, viewerProps));
|
|
247
|
-
}
|
|
248
|
-
return renderError(new MediaViewerError('unsupported'), fileItem);
|
|
253
|
+
return renderItem(fileItem);
|
|
249
254
|
case 'failed-processing':
|
|
255
|
+
if (getBooleanFF('platform.corex.password-protected-pdf_ht8re') && fileItem.mediaType === 'doc' && fileItem.mimeType === 'application/pdf') {
|
|
256
|
+
return renderItem(fileItem);
|
|
257
|
+
}
|
|
250
258
|
return renderError(new MediaViewerError('itemviewer-file-failed-processing-status'), fileItem);
|
|
251
259
|
case 'error':
|
|
252
260
|
return renderError(new MediaViewerError('itemviewer-file-error-status'), fileItem);
|
|
@@ -203,7 +203,9 @@ export class ArchiveViewerBase extends BaseViewer {
|
|
|
203
203
|
}, /*#__PURE__*/React.createElement(DefaultCoverWrapper, null, /*#__PURE__*/React.createElement(AudioIcon, {
|
|
204
204
|
label: "cover",
|
|
205
205
|
size: "xlarge",
|
|
206
|
-
primaryColor: blanketColor
|
|
206
|
+
primaryColor: blanketColor
|
|
207
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
208
|
+
,
|
|
207
209
|
secondaryColor: "#9FADBC"
|
|
208
210
|
})), /*#__PURE__*/React.createElement(CustomAudioPlayerWrapper, null, /*#__PURE__*/React.createElement(CustomMediaPlayer, {
|
|
209
211
|
type: "audio",
|
|
@@ -1,8 +1,107 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
|
-
import {
|
|
3
|
+
import { jsx, css, keyframes } from '@emotion/react';
|
|
4
|
+
import { ArchiveSideBarWidth } from './styles';
|
|
5
|
+
import { DN500 } from '@atlaskit/theme/colors';
|
|
5
6
|
import { TouchScrollable } from 'react-scrolllock';
|
|
7
|
+
const archiveItemViewerWrapperStyles = css({
|
|
8
|
+
width: '100%',
|
|
9
|
+
display: 'flex',
|
|
10
|
+
justifyContent: 'center'
|
|
11
|
+
});
|
|
12
|
+
const archiveSideBarStyles = css({
|
|
13
|
+
padding: `22px ${"var(--ds-space-250, 20px)"} ${"var(--ds-space-250, 20px)"} ${"var(--ds-space-250, 20px)"}`,
|
|
14
|
+
backgroundColor: "var(--ds-surface, #101214)",
|
|
15
|
+
position: 'absolute',
|
|
16
|
+
left: 0,
|
|
17
|
+
top: 0,
|
|
18
|
+
width: `${ArchiveSideBarWidth}px`,
|
|
19
|
+
bottom: 0,
|
|
20
|
+
boxSizing: 'border-box',
|
|
21
|
+
overflowY: 'scroll'
|
|
22
|
+
});
|
|
23
|
+
const slideDown = keyframes({
|
|
24
|
+
'0%': {
|
|
25
|
+
opacity: 0,
|
|
26
|
+
transform: 'translateY(-100%)'
|
|
27
|
+
},
|
|
28
|
+
'100%': {
|
|
29
|
+
transform: 'translateY(0)',
|
|
30
|
+
opacity: 1
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
const archiveDownloadButtonWrapperStyles = css({
|
|
34
|
+
padding: `${"var(--ds-space-100, 8px)"} 7px 5px ${"var(--ds-space-100, 8px)"}`,
|
|
35
|
+
border: 'none',
|
|
36
|
+
borderRadius: '3px',
|
|
37
|
+
backgroundColor: 'transparent',
|
|
38
|
+
color: "var(--ds-icon, #9FADBC)",
|
|
39
|
+
'&:hover': {
|
|
40
|
+
cursor: 'pointer',
|
|
41
|
+
backgroundColor: "var(--ds-background-neutral-subtle-hovered, #A1BDD914)"
|
|
42
|
+
},
|
|
43
|
+
'&:active': {
|
|
44
|
+
cursor: 'pointer',
|
|
45
|
+
backgroundColor: "var(--ds-background-neutral-subtle-pressed, #A6C5E229)"
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const archiveSidebarFolderWrapperStyles = css({
|
|
49
|
+
transform: 'translateY(-100%)',
|
|
50
|
+
transition: 'all 1s',
|
|
51
|
+
opacity: 0,
|
|
52
|
+
animation: `${slideDown} 0.3s forwards`
|
|
53
|
+
});
|
|
54
|
+
const sidebarItemWrapperStyles = css({
|
|
55
|
+
width: '85%'
|
|
56
|
+
});
|
|
57
|
+
const archiveSidebarFileEntryWrapperStyles = css({
|
|
58
|
+
paddingBottom: "var(--ds-space-075, 5px)",
|
|
59
|
+
display: 'flex',
|
|
60
|
+
alignItems: 'center',
|
|
61
|
+
cursor: 'pointer',
|
|
62
|
+
transition: 'background-color 0.3s'
|
|
63
|
+
});
|
|
64
|
+
const archiveLayoutStyles = css({
|
|
65
|
+
display: 'flex',
|
|
66
|
+
width: '100%',
|
|
67
|
+
height: '100%'
|
|
68
|
+
});
|
|
69
|
+
const archiveViewerWrapperStyles = css({
|
|
70
|
+
position: 'absolute',
|
|
71
|
+
top: 0,
|
|
72
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
73
|
+
left: `${ArchiveSideBarWidth}px`,
|
|
74
|
+
right: 0,
|
|
75
|
+
bottom: 0,
|
|
76
|
+
alignItems: 'center',
|
|
77
|
+
display: 'flex'
|
|
78
|
+
});
|
|
79
|
+
const separatorStyles = css({
|
|
80
|
+
borderRadius: '1px',
|
|
81
|
+
height: '2px',
|
|
82
|
+
margin: `${"var(--ds-space-200, 19px)"} 0`,
|
|
83
|
+
backgroundColor: "var(--ds-border, #A6C5E229)",
|
|
84
|
+
flexShrink: 0
|
|
85
|
+
});
|
|
86
|
+
const sidebarHeaderWrapperStyles = css({
|
|
87
|
+
display: 'flex',
|
|
88
|
+
alignItems: 'center',
|
|
89
|
+
flexShrink: 0
|
|
90
|
+
});
|
|
91
|
+
const sidebarHeaderIconStyles = css({
|
|
92
|
+
display: 'flex',
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
marginRight: "var(--ds-space-100, 10px)",
|
|
95
|
+
flexShrink: 0
|
|
96
|
+
});
|
|
97
|
+
const sidebarHeaderEntryStyles = css({
|
|
98
|
+
flex: '1 1 auto',
|
|
99
|
+
overflow: 'hidden',
|
|
100
|
+
textOverflow: 'ellipsis',
|
|
101
|
+
whiteSpace: 'nowrap',
|
|
102
|
+
lineHeight: 1.14286,
|
|
103
|
+
color: `var(--ds-text, ${DN500})`
|
|
104
|
+
});
|
|
6
105
|
export const ArchiveItemViewerWrapper = ({
|
|
7
106
|
children
|
|
8
107
|
}) => {
|
|
@@ -1,113 +1,5 @@
|
|
|
1
|
-
import { css, keyframes } from '@emotion/react';
|
|
2
1
|
import { DN500 } from '@atlaskit/theme/colors';
|
|
3
2
|
export const ArchiveSideBarWidth = 300;
|
|
4
|
-
export const archiveItemViewerWrapperStyles = css`
|
|
5
|
-
width: 100%;
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
`;
|
|
9
|
-
export const archiveSideBarStyles = css`
|
|
10
|
-
padding: 22px ${"var(--ds-space-250, 20px)"} ${"var(--ds-space-250, 20px)"}
|
|
11
|
-
${"var(--ds-space-250, 20px)"};
|
|
12
|
-
background-color: ${"var(--ds-surface, #101214)"};
|
|
13
|
-
position: absolute;
|
|
14
|
-
left: 0;
|
|
15
|
-
top: 0;
|
|
16
|
-
width: ${ArchiveSideBarWidth}px;
|
|
17
|
-
bottom: 0;
|
|
18
|
-
box-sizing: border-box;
|
|
19
|
-
overflow-y: scroll;
|
|
20
|
-
`;
|
|
21
|
-
const slideDown = keyframes`
|
|
22
|
-
0% {
|
|
23
|
-
opacity: 0;
|
|
24
|
-
transform: translateY(-100%);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
100% {
|
|
28
|
-
transform: translateY(0);
|
|
29
|
-
opacity: 1;
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
export const archiveSidebarFolderWrapperStyles = css`
|
|
33
|
-
transform: translateY(-100%);
|
|
34
|
-
transition: all 1s;
|
|
35
|
-
opacity: 0;
|
|
36
|
-
animation: ${slideDown} 0.3s forwards;
|
|
37
|
-
`;
|
|
38
|
-
export const archiveDownloadButtonWrapperStyles = css`
|
|
39
|
-
padding: ${"var(--ds-space-100, 8px)"} 7px 5px ${"var(--ds-space-100, 8px)"};
|
|
40
|
-
border: none;
|
|
41
|
-
border-radius: 3px;
|
|
42
|
-
background-color: transparent;
|
|
43
|
-
color: ${"var(--ds-icon, #9FADBC)"};
|
|
44
|
-
|
|
45
|
-
&:hover {
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
background-color: ${"var(--ds-background-neutral-subtle-hovered, #A1BDD914)"};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:active {
|
|
51
|
-
cursor: pointer;
|
|
52
|
-
background-color: ${"var(--ds-background-neutral-subtle-pressed, #A6C5E229)"};
|
|
53
|
-
}
|
|
54
|
-
`;
|
|
55
|
-
export const sidebarItemWrapperStyles = css`
|
|
56
|
-
width: 85%;
|
|
57
|
-
`;
|
|
58
|
-
|
|
59
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
60
|
-
export const archiveSidebarFileEntryWrapperStyles = css`
|
|
61
|
-
padding-bottom: 5px;
|
|
62
|
-
display: flex;
|
|
63
|
-
align-items: center;
|
|
64
|
-
cursor: pointer;
|
|
65
|
-
transition: background-color 0.3s;
|
|
66
|
-
`;
|
|
67
|
-
export const archiveLayoutStyles = css`
|
|
68
|
-
display: flex;
|
|
69
|
-
width: 100%;
|
|
70
|
-
height: 100%;
|
|
71
|
-
`;
|
|
72
|
-
|
|
73
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
74
|
-
export const archiveViewerWrapperStyles = css`
|
|
75
|
-
position: absolute;
|
|
76
|
-
top: 0;
|
|
77
|
-
left: ${ArchiveSideBarWidth}px;
|
|
78
|
-
right: 0;
|
|
79
|
-
bottom: 0;
|
|
80
|
-
align-items: center;
|
|
81
|
-
display: flex;
|
|
82
|
-
`;
|
|
83
|
-
export const separatorStyles = css`
|
|
84
|
-
border-radius: 1px;
|
|
85
|
-
height: 2px;
|
|
86
|
-
margin: ${(8 * 5 - 2) / 2}px 0;
|
|
87
|
-
background-color: ${"var(--ds-border, #A6C5E229)"};
|
|
88
|
-
flex-shrink: 0;
|
|
89
|
-
`;
|
|
90
|
-
export const sidebarHeaderWrapperStyles = css`
|
|
91
|
-
display: flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
flex-shrink: 0;
|
|
94
|
-
`;
|
|
95
|
-
|
|
96
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
97
|
-
export const sidebarHeaderIconStyles = css`
|
|
98
|
-
display: flex;
|
|
99
|
-
align-items: center;
|
|
100
|
-
margin-right: 10px;
|
|
101
|
-
flex-shrink: 0;
|
|
102
|
-
`;
|
|
103
|
-
export const sidebarHeaderEntryStyles = css`
|
|
104
|
-
flex: 1 1 auto;
|
|
105
|
-
overflow: hidden;
|
|
106
|
-
text-overflow: ellipsis;
|
|
107
|
-
white-space: nowrap;
|
|
108
|
-
line-height: 1.14286;
|
|
109
|
-
color: ${`var(--ds-text, ${DN500})`};
|
|
110
|
-
`;
|
|
111
3
|
export const itemStyle = {
|
|
112
4
|
backgroundColor: `${"var(--ds-background-neutral-subtle, #101214)"}`,
|
|
113
5
|
fill: `${"var(--ds-icon-success, #101214)"}`,
|
|
@@ -88,14 +88,14 @@ export const PDFPasswordInput = ({
|
|
|
88
88
|
"aria-label": intl.formatMessage(messages.password),
|
|
89
89
|
placeholder: intl.formatMessage(messages.enter_password),
|
|
90
90
|
ref: passwordInputRef,
|
|
91
|
+
"aria-describedby": formError ? `${fieldProps.id}-error` : undefined,
|
|
91
92
|
onChange: value => {
|
|
92
93
|
fieldProps.onChange(value);
|
|
93
94
|
setFormError(false);
|
|
94
95
|
}
|
|
95
96
|
})), formError && jsx("div", {
|
|
96
97
|
css: errorMessageWrapperStyle,
|
|
97
|
-
id: `${fieldProps.id}-error
|
|
98
|
-
"aria-live": "polite"
|
|
98
|
+
id: `${fieldProps.id}-error`
|
|
99
99
|
}, jsx(ErrorIcon, {
|
|
100
100
|
size: "small",
|
|
101
101
|
label: ""
|
|
@@ -7,7 +7,7 @@ import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
7
7
|
import HDIcon from '@atlaskit/icon/glyph/vid-hd-circle';
|
|
8
8
|
import Spinner from '@atlaskit/spinner';
|
|
9
9
|
import { B75, B200, DN400, DN60, N0 } from '@atlaskit/theme/colors';
|
|
10
|
-
import { BaselineExtend, HDIconGroupWrapper,
|
|
10
|
+
import { BaselineExtend, HDIconGroupWrapper, ImageWrapper, Img } from '../../styleWrappers';
|
|
11
11
|
import { ZoomLevel } from '../../domain/zoomLevel';
|
|
12
12
|
import { closeOnDirectClick } from '../../utils/closeOnDirectClick';
|
|
13
13
|
import { ZoomControls } from '../../zoomControls';
|
|
@@ -217,12 +217,12 @@ export class InteractiveImgComponent extends React.Component {
|
|
|
217
217
|
className: hideControlsClassName
|
|
218
218
|
}, isHDActivating ? /*#__PURE__*/React.createElement(Spinner, {
|
|
219
219
|
appearance: "invert"
|
|
220
|
-
}) : undefined, /*#__PURE__*/React.createElement(
|
|
220
|
+
}) : undefined, /*#__PURE__*/React.createElement(HDIcon, {
|
|
221
221
|
primaryColor: hdPrimaryColor,
|
|
222
222
|
secondaryColor: hdSecondaryColor,
|
|
223
223
|
label: "hd",
|
|
224
224
|
testId: testId
|
|
225
|
-
}))
|
|
225
|
+
}));
|
|
226
226
|
}
|
|
227
227
|
render() {
|
|
228
228
|
const {
|
|
@@ -276,7 +276,7 @@ export class InteractiveImgComponent extends React.Component {
|
|
|
276
276
|
}), /*#__PURE__*/React.createElement(BaselineExtend, null), /*#__PURE__*/React.createElement(ZoomControls, {
|
|
277
277
|
zoomLevel: zoomLevel,
|
|
278
278
|
onChange: this.onZoomChange
|
|
279
|
-
}
|
|
279
|
+
}, this.renderHDIndicator()));
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
export const InteractiveImg = withAnalyticsEvents({
|
|
@@ -4,7 +4,7 @@ import { Component } from 'react';
|
|
|
4
4
|
import { hideControlsClassName, MediaButton } from '@atlaskit/media-ui';
|
|
5
5
|
import ZoomOutIcon from '@atlaskit/icon/glyph/media-services/zoom-out';
|
|
6
6
|
import ZoomInIcon from '@atlaskit/icon/glyph/media-services/zoom-in';
|
|
7
|
-
import { ZoomWrapper,
|
|
7
|
+
import { ZoomWrapper, ZoomCenterControls, ZoomRightControls, ZoomLevelIndicator } from './styleWrappers';
|
|
8
8
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
9
9
|
import { fireAnalytics } from './analytics/';
|
|
10
10
|
import { createZoomInButtonClickEvent } from './analytics/events/ui/zoomInButtonClicked';
|
|
@@ -44,11 +44,12 @@ export class ZoomControlsBase extends Component {
|
|
|
44
44
|
zoomLevel,
|
|
45
45
|
intl: {
|
|
46
46
|
formatMessage
|
|
47
|
-
}
|
|
47
|
+
},
|
|
48
|
+
children
|
|
48
49
|
} = this.props;
|
|
49
50
|
return /*#__PURE__*/React.createElement(ZoomWrapper, {
|
|
50
51
|
className: hideControlsClassName
|
|
51
|
-
}, /*#__PURE__*/React.createElement(
|
|
52
|
+
}, /*#__PURE__*/React.createElement(ZoomCenterControls, null, /*#__PURE__*/React.createElement(MediaButton, {
|
|
52
53
|
isDisabled: !zoomLevel.canZoomOut,
|
|
53
54
|
onClick: this.zoomOut,
|
|
54
55
|
iconBefore: /*#__PURE__*/React.createElement(ZoomOutIcon, {
|
|
@@ -60,7 +61,7 @@ export class ZoomControlsBase extends Component {
|
|
|
60
61
|
iconBefore: /*#__PURE__*/React.createElement(ZoomInIcon, {
|
|
61
62
|
label: formatMessage(messages.zoom_in)
|
|
62
63
|
})
|
|
63
|
-
})), /*#__PURE__*/React.createElement(ZoomLevelIndicator, null, zoomLevel.asPercentage));
|
|
64
|
+
})), /*#__PURE__*/React.createElement(ZoomRightControls, null, children, /*#__PURE__*/React.createElement(ZoomLevelIndicator, null, zoomLevel.asPercentage)));
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
export const ZoomControls = withAnalyticsEvents({})(injectIntl(ZoomControlsBase));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
|
|
2
2
|
var componentName = 'mediaViewer';
|
|
3
3
|
var packageName = "@atlaskit/media-viewer";
|
|
4
|
-
var packageVersion = "48.3.
|
|
4
|
+
var packageVersion = "48.3.5";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export function getFileAttributes(fileState) {
|
|
7
7
|
if (!fileState) {
|
|
@@ -5,7 +5,7 @@ import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atl
|
|
|
5
5
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
6
6
|
import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
7
7
|
var packageName = "@atlaskit/media-viewer";
|
|
8
|
-
var packageVersion = "48.3.
|
|
8
|
+
var packageVersion = "48.3.5";
|
|
9
9
|
var ufoExperience;
|
|
10
10
|
var getExperience = function getExperience() {
|
|
11
11
|
if (!ufoExperience) {
|
package/dist/esm/navigation.js
CHANGED
|
@@ -83,10 +83,10 @@ export var NavigationBase = /*#__PURE__*/function (_Component) {
|
|
|
83
83
|
testId: prevNavButtonId,
|
|
84
84
|
onClick: prev('mouse'),
|
|
85
85
|
iconBefore: /*#__PURE__*/React.createElement(ArrowLeftCircleIcon
|
|
86
|
-
//
|
|
86
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
87
87
|
, {
|
|
88
88
|
primaryColor: "#9FADBC"
|
|
89
|
-
//
|
|
89
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
90
90
|
,
|
|
91
91
|
secondaryColor: "#161A1D",
|
|
92
92
|
size: "xlarge",
|
|
@@ -102,10 +102,10 @@ export var NavigationBase = /*#__PURE__*/function (_Component) {
|
|
|
102
102
|
testId: nextNavButtonId,
|
|
103
103
|
onClick: next('mouse'),
|
|
104
104
|
iconBefore: /*#__PURE__*/React.createElement(ArrowRightCircleIcon
|
|
105
|
-
//
|
|
105
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
106
106
|
, {
|
|
107
107
|
primaryColor: "#9FADBC"
|
|
108
|
-
//
|
|
108
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
109
109
|
,
|
|
110
110
|
secondaryColor: "#161A1D",
|
|
111
111
|
size: "xlarge",
|