| Server IP : 31.214.178.22 / Your IP : 216.73.216.223 Web Server : Apache System : Linux hostingsrv5.dondominio.com 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 User : ( 296031) PHP Version : 8.5.13 Disable Function : system,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,exec,ini_alter,show_source,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,mail,eval MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /hosting/www/tecobe.es/public/wp-content/themes/Divi/epanel/theme-options-library/app/ |
Upload File : |
// External Dependencies
import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import $ from 'jquery';
import App from 'cerebral';
// import Devtools from 'cerebral/devtools';
import { Container } from '@cerebral/react';
// Internal Dependencies
import store from './store/index';
import ThemeOptionsApp from './components/App';
const initialState = {
content: '',
context: 'theme-options',
items: [],
showLibrary: false,
showPortability: false,
showSave: false,
};
const unMountCommonLibraryApp = () => {
const container = document.getElementById('et-theme-options-container');
if (container) {
unmountComponentAtNode(container);
container.remove();
}
}
// Note: Hyphen is used to stay consistent w/ the Cloud context.
$(window).on(`et_theme-options_container_ready`, (event, preferences) => {
let devtools = null;
/*if (process.env.NODE_ENV === 'development') {
devtools = Devtools({
host: '127.0.0.1:22722',
reconnect: false,
bigComponentsWarning: 15,
});
}*/
const modalType = preferences?.modalType || '';
const state = {
...initialState,
modalType
};
state.sidebarLabel = preferences?.sidebarLabel || '';
state.builtFor = preferences?.builtFor ?? 'Divi';
const app = App(store(state), {
devtools,
returnSequencePromise: true,
});
const {
containerId = 'et-theme-options-container',
containerClass = 'et-theme-options-container'
} = preferences;
$(document.body).first().append(`<div id=${containerId} class=${containerClass}></div>`);
render(
<Container app={app}>
<ThemeOptionsApp />
</Container>,
document.getElementById(containerId)
);
});
$(window).on('et_theme-options_container_close', () => {
unMountCommonLibraryApp();
});