All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.js.components.document-previewer.DocumentPreviewerWrapper.js Maven / Gradle / Ivy

The newest version!
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */

import {ClayPaginationWithBasicItems} from '@clayui/pagination';
import {sub} from 'frontend-js-web';
import React, {useState} from 'react';

import {OriginalDocumentTag} from '../original-document-tag/OriginalDocumentTag';
import EmptyState from '../table/EmptyState';
import DocumentPreviewer from './DocumentPreviewer';
import ImagePreviewer from './ImagePreviewer';

const UnavailablePreview = ({
	description = Liferay.Language.get(
		'the-envelope-does-not-have-a-document-to-preview'
	),
}) => (
	
); const DocumentPreview = ({fileEntry}) => { if (fileEntry.imageURL) { return ; } if (fileEntry.previewFileURL) { return ( ); } return ( ); }; const DocumentPreviewerWrapper = ({fileEntries = []}) => { const [documentPage, setDocumentPage] = useState(1); const fileEntry = fileEntries[documentPage - 1]; if (!fileEntries.length) { return ; } return ( <>
{sub( Liferay.Language.get('document-x-of-x'), documentPage, fileEntries.length )}
); }; export default DocumentPreviewerWrapper;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy