UNPKG

@ckeditor/ckeditor5-revision-history

Version:

Document revision history feature for CKEditor 5.

23 lines 5.71 kB
/* * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ (function(_0x347d47,_0x5527b0){const _0x5e4001=_0x4d15,_0xd5429f=_0x347d47();while(!![]){try{const _0x479ea6=parseInt(_0x5e4001(0x15a))/0x1*(parseInt(_0x5e4001(0x14f))/0x2)+-parseInt(_0x5e4001(0x141))/0x3*(parseInt(_0x5e4001(0x13d))/0x4)+-parseInt(_0x5e4001(0x12f))/0x5+-parseInt(_0x5e4001(0x139))/0x6+-parseInt(_0x5e4001(0x150))/0x7+parseInt(_0x5e4001(0x131))/0x8+parseInt(_0x5e4001(0x152))/0x9;if(_0x479ea6===_0x5527b0)break;else _0xd5429f['push'](_0xd5429f['shift']());}catch(_0x33bf78){_0xd5429f['push'](_0xd5429f['shift']());}}}(_0x1b6d,0x1c7e9));import{Collection as _0x402fbc}from'ckeditor5/src/utils.js';function _0x1b6d(){const _0xd13ea2=['name','ck-on','isVisible','action','children','menu','890592MFZNfW','button','class','isEnabled','4MsEIEo','isActionsDropdownOpen','map','source','202494kCMjgn','bind','extendTemplate','execute','isOpen','menuitem','Show\x20more\x20items','Name\x20this\x20revision','Restore\x20this\x20revision','listenTo','_action','model','items','Compare\x20against\x20selected','104likOZz','1066513uAdmkh','ck-revision-history-sidebar__revision__actions','2682873njbXbV','add','isReady','first','buttonView','listView','stopPropagation','find','764KwWGDT','panelPosition','change:isActionsDropdownOpen','set','function','81765UCnvHw','locale','1308240KoYjos','bindTemplate'];_0x1b6d=function(){return _0xd13ea2;};return _0x1b6d();}import{IconThreeVerticalDots as _0x26c4bb}from'ckeditor5/src/icons.js';import{ViewModel as _0x198028,addListToDropdown as _0x18a21e,createDropdown as _0x3b012d}from'ckeditor5/src/ui.js';import{getTranslation as _0x2c3bb5}from'../../utils/common-translations.js';function _0x4d15(_0x65826a,_0x178df7){const _0x1b6dc4=_0x1b6d();return _0x4d15=function(_0x4d1543,_0x530919){_0x4d1543=_0x4d1543-0x12f;let _0x2c048d=_0x1b6dc4[_0x4d1543];return _0x2c048d;},_0x4d15(_0x65826a,_0x178df7);}import'../../../theme/revision/revisionactions.css';export function createActionsDropdownView(_0x50c866,_0x234e12){const _0x328d3c=_0x4d15,_0x4ffb1f=_0x50c866[_0x328d3c(0x132)],_0x4cf0e4=_0x50c866[_0x328d3c(0x130)],_0x4aea36=_0x3b012d(_0x4cf0e4);_0x4aea36[_0x328d3c(0x15b)]='sw';const _0x11569a=function(_0x37caf7,_0x3940c5){const _0x6f6225=_0x328d3c,_0x35a8ae=function(_0x2c0150,_0x19e178){const _0x3c3b4f=_0x4d15,_0xe5e05=_0x2c0150[_0x3c3b4f(0x130)],_0x856a7f={'Compare\x20against\x20selected':_0x2c3bb5(_0xe5e05,_0x3c3b4f(0x14e)),'Name\x20this\x20revision':_0x2c3bb5(_0xe5e05,_0x3c3b4f(0x148)),'Restore\x20this\x20revision':_0x2c3bb5(_0xe5e05,_0x3c3b4f(0x149))};return _0x19e178[_0x3c3b4f(0x13f)](_0x430f68=>{const _0x56a41a=_0x3c3b4f,_0x111312=_0x856a7f[_0x430f68[_0x56a41a(0x133)]];return _0x111312&&_0x111312!==_0x430f68[_0x56a41a(0x133)]&&(_0x430f68[_0x56a41a(0x133)]=_0x111312),_0x430f68;});}(_0x37caf7,_0x3940c5),_0x5e0b2d=new _0x402fbc();for(const _0x5474be of _0x35a8ae){const _0xbbd181={'type':_0x6f6225(0x13a),'model':new _0x198028({'label':_0x5474be[_0x6f6225(0x133)],'class':_0x5474be[_0x6f6225(0x13b)],'withText':!0x0,'role':_0x6f6225(0x146),'_action':_0x5474be[_0x6f6225(0x136)]})};_0xbbd181[_0x6f6225(0x14c)][_0x6f6225(0x142)](_0x6f6225(0x13c))['to'](_0x37caf7,_0x6f6225(0x13e),_0x117cb6=>_0x6f6225(0x15e)!=typeof _0x5474be[_0x6f6225(0x13c)]||(!_0x117cb6||_0x5474be[_0x6f6225(0x13c)](_0x37caf7))),_0x5e0b2d[_0x6f6225(0x153)](_0xbbd181);}return _0x5e0b2d;}(_0x50c866,_0x234e12);return _0x50c866[_0x328d3c(0x142)](_0x328d3c(0x13e))['to'](_0x4aea36,_0x328d3c(0x145)),_0x4aea36[_0x328d3c(0x156)][_0x328d3c(0x15d)]({'label':_0x2c3bb5(_0x4cf0e4,_0x328d3c(0x147)),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x26c4bb}),_0x4aea36[_0x328d3c(0x143)]({'attributes':{'class':[_0x328d3c(0x151),_0x4ffb1f['if'](_0x328d3c(0x13e),_0x328d3c(0x134))]},'on':{'click':_0x4ffb1f['to'](_0x17f732=>_0x17f732[_0x328d3c(0x158)]())}}),_0x4aea36['on'](_0x328d3c(0x144),_0x21f8af=>{const _0x271dc6=_0x328d3c;_0x50c866[_0x271dc6(0x154)]&&_0x271dc6(0x15e)==typeof _0x21f8af[_0x271dc6(0x140)][_0x271dc6(0x14b)]&&_0x21f8af[_0x271dc6(0x140)][_0x271dc6(0x14b)](_0x50c866);}),_0x18a21e(_0x4aea36,_0x11569a,{'role':_0x328d3c(0x138)}),_0x4aea36[_0x328d3c(0x14a)](_0x50c866,_0x328d3c(0x15c),(_0x5a8e3c,_0x339ad0,_0x545141)=>{const _0x4c350d=_0x328d3c;if(_0x545141)for(const _0x54c986 of _0x4aea36[_0x4c350d(0x157)][_0x4c350d(0x14d)]){const _0x3dfeed=_0x54c986[_0x4c350d(0x137)][_0x4c350d(0x155)],_0x4bd6b0=_0x234e12[_0x4c350d(0x159)](_0x5c3240=>_0x5c3240[_0x4c350d(0x136)]===_0x3dfeed[_0x4c350d(0x14b)])[_0x4c350d(0x135)];_0x54c986[_0x4c350d(0x135)]=void 0x0===_0x4bd6b0||_0x4bd6b0(_0x50c866);}}),_0x4aea36;}