@topconsultnpm/sdkui-react 6.20.0-dev1.13 → 6.20.0-dev1.14
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.
|
@@ -226,73 +226,6 @@ export const TMFileViewer = ({ fileBlob, isResizingActive }) => {
|
|
|
226
226
|
if (fileBlob.type.includes('image')) {
|
|
227
227
|
return (_jsx(ImageViewer, { fileBlob: fileBlob, alt: '' }));
|
|
228
228
|
}
|
|
229
|
-
// if (fileType === 'application/pdf' && isMobile) {
|
|
230
|
-
// return (
|
|
231
|
-
// <object
|
|
232
|
-
// key={blobUrl}
|
|
233
|
-
// data={blobUrl}
|
|
234
|
-
// type="application/pdf"
|
|
235
|
-
// width="100%"
|
|
236
|
-
// height="100%"
|
|
237
|
-
// style={{
|
|
238
|
-
// border: 'none',
|
|
239
|
-
// zIndex: 0,
|
|
240
|
-
// pointerEvents: isResizingActive === true ? "none" : "auto"
|
|
241
|
-
// }}
|
|
242
|
-
// >
|
|
243
|
-
// {/* Fallback UI if <object> tag fails to render PDF */}
|
|
244
|
-
// <div style={{
|
|
245
|
-
// padding: '40px',
|
|
246
|
-
// textAlign: 'center',
|
|
247
|
-
// display: 'flex',
|
|
248
|
-
// flexDirection: 'column',
|
|
249
|
-
// alignItems: 'center',
|
|
250
|
-
// justifyContent: 'center',
|
|
251
|
-
// height: '100%',
|
|
252
|
-
// gap: '20px'
|
|
253
|
-
// }}>
|
|
254
|
-
// <IconPreview fontSize={96} />
|
|
255
|
-
// <div>
|
|
256
|
-
// <h3>{SDKUI_Localizator.PDFDocument}</h3>
|
|
257
|
-
// <p>{SDKUI_Localizator.PreviewNotAvailableOnDevice}</p>
|
|
258
|
-
// </div>
|
|
259
|
-
// <div style={{ display: 'flex', gap: '10px', flexWrap: 'wrap', alignItems: 'center', justifyContent: 'center' }}>
|
|
260
|
-
// <a
|
|
261
|
-
// href={blobUrl}
|
|
262
|
-
// download="document.pdf"
|
|
263
|
-
// style={{
|
|
264
|
-
// minWidth: '180px',
|
|
265
|
-
// padding: '12px 24px',
|
|
266
|
-
// backgroundColor: TMColors.primaryColor,
|
|
267
|
-
// color: 'white',
|
|
268
|
-
// textDecoration: 'none',
|
|
269
|
-
// borderRadius: '4px',
|
|
270
|
-
// display: 'inline-block'
|
|
271
|
-
// }}
|
|
272
|
-
// >
|
|
273
|
-
// {SDKUI_Localizator.DownloadFile}
|
|
274
|
-
// </a>
|
|
275
|
-
// <a
|
|
276
|
-
// href={blobUrl}
|
|
277
|
-
// target="_blank"
|
|
278
|
-
// rel="noopener noreferrer"
|
|
279
|
-
// style={{
|
|
280
|
-
// minWidth: '180px',
|
|
281
|
-
// padding: '12px 24px',
|
|
282
|
-
// backgroundColor: TMColors.primaryColor,
|
|
283
|
-
// color: 'white',
|
|
284
|
-
// textDecoration: 'none',
|
|
285
|
-
// borderRadius: '4px',
|
|
286
|
-
// display: 'inline-block'
|
|
287
|
-
// }}
|
|
288
|
-
// >
|
|
289
|
-
// {SDKUI_Localizator.OpenInNewTab}
|
|
290
|
-
// </a>
|
|
291
|
-
// </div>
|
|
292
|
-
// </div>
|
|
293
|
-
// </object>
|
|
294
|
-
// );
|
|
295
|
-
// }
|
|
296
229
|
if (fileType === 'application/pdf' && isMobile) {
|
|
297
230
|
return (_jsx(PDFViewerContainer, { children: _jsx(Document, { file: blobUrl, onLoadSuccess: ({ numPages }) => setNumPages(numPages), loading: _jsxs("div", { style: {
|
|
298
231
|
display: 'flex',
|