@ckeditor/ckeditor5-revision-history
Version:
Document revision history feature for CKEditor 5.
24 lines • 7.49 kB
JavaScript
/*
* 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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x9b0370=_0x3f6b;(function(_0x43fdbb,_0x28a933){const _0x5c1391=_0x3f6b,_0x2b9681=_0x43fdbb();while(!![]){try{const _0x15d9de=-parseInt(_0x5c1391(0x103))/0x1*(-parseInt(_0x5c1391(0x108))/0x2)+-parseInt(_0x5c1391(0xd3))/0x3*(-parseInt(_0x5c1391(0xeb))/0x4)+-parseInt(_0x5c1391(0x10a))/0x5+-parseInt(_0x5c1391(0xf4))/0x6+parseInt(_0x5c1391(0xf7))/0x7*(-parseInt(_0x5c1391(0x10c))/0x8)+parseInt(_0x5c1391(0xf3))/0x9+parseInt(_0x5c1391(0x10f))/0xa;if(_0x15d9de===_0x28a933)break;else _0x2b9681['push'](_0x2b9681['shift']());}catch(_0x483a06){_0x2b9681['push'](_0x2b9681['shift']());}}}(_0x5b3c,0xec0c9));import{View as _0x4164ef,createLabeledInputText as _0x402548}from'ckeditor5/src/ui.js';import{ConfirmMixin as _0x1db1b4}from'ckeditor5-collaboration/src/collaboration-core.js';import{RevisionNameView as _0x42b751}from'./revisionnameview.js';import{RevisionAuthorView as _0x204145}from'./revisionauthorview.js';import{dateToPrettyFormat as _0x3134df}from'./utils.js';function _0x5b3c(){const _0x2f603f=['8079vgSzIE','span','srcElement','bindTemplate','extendTemplate','ck-revision-history-sidebar__revision__controls-wrapper','setTemplate','_requireRevisionName','createdAt','from','value','ck-revision-history-sidebar__revision_highlighted','closest','220','_createdAtFormatted','isConfirm','fire','isEnabled','deselect','revisionNameView','ck-revision-history-sidebar__revision-wrapper_confirmation_visible','bind','ck-revision-history-sidebar__revision_selected','authors','1444GyiaNi','.ck-thread__remove-confirm','set','_revision','element','render','creator','ck-revision-history-sidebar__revision','10232757sphvhX','1260942jOOUBo','isReady','length','7lWDsKI','isSelected','setName','div','unhighlight','ck-revision-history-sidebar__actions_dropdown_open','fieldView','highlight','map','uiLanguage','ck-revision-history-sidebar__revision-wrapper','ck-disabled','1480237ULuuxp','select','name','ck-revision-history-sidebar__revision__date','revisionActionsView','2fXNmGK','listenTo','5667250MLbmlz','isActionsDropdownOpen','13861896HIwusD','unshift','change','4538180MHmKrE','ck-revision-history-sidebar__revision-authors','filter','ck-reset','isHighlighted'];_0x5b3c=function(){return _0x2f603f;};return _0x5b3c();}function _0x3f6b(_0xeae539,_0x3f01c9){const _0x5b3c56=_0x5b3c();return _0x3f6b=function(_0x3f6b9e,_0x4edcf8){_0x3f6b9e=_0x3f6b9e-0xd3;let _0x5aeeba=_0x5b3c56[_0x3f6b9e];return _0x5aeeba;},_0x3f6b(_0xeae539,_0x3f01c9);}import{createActionsDropdownView as _0x38cc1d}from'./createrevisionactionsdropdown.js';import'../../../theme/revision/revision.css';export class RevisionView extends/* #__PURE__ -- */
_0x1db1b4(_0x4164ef){['id'];[_0x9b0370(0xe6)];[_0x9b0370(0x107)];[_0x9b0370(0xee)];[_0x9b0370(0xda)];constructor(_0x1f2d3e,_0x4f9849,_0x3a4774,_0x2a4862){const _0x48714e=_0x9b0370;super(_0x1f2d3e);const _0x5d5d8f=this[_0x48714e(0xd6)],_0x160d34=function(_0x5cf992,_0x3ebe34){const _0x307915=_0x48714e,_0x5e4126=Array[_0x307915(0xdc)](_0x3ebe34[_0x307915(0xea)])[_0x307915(0x111)](_0x26f024=>_0x26f024!=_0x3ebe34[_0x307915(0xf1)]);return _0x3ebe34[_0x307915(0xf1)]&&_0x5e4126[_0x307915(0x10d)](_0x3ebe34[_0x307915(0xf1)]),_0x5e4126[_0x307915(0xff)](_0x4eda71=>new _0x204145(_0x5cf992,_0x4eda71,_0x4eda71==_0x3ebe34[_0x307915(0xf1)]));}(_0x1f2d3e,_0x4f9849);this['id']=_0x4f9849['id'],this[_0x48714e(0xee)]=_0x4f9849,this[_0x48714e(0xda)]=_0x2a4862,this[_0x48714e(0xe8)](_0x48714e(0x105),_0x48714e(0xdb))['to'](_0x4f9849),this[_0x48714e(0xe8)](_0x48714e(0xe1))['to'](this,_0x48714e(0xdb),_0x8bc4d6=>_0x3134df(_0x1f2d3e[_0x48714e(0x100)],_0x8bc4d6)),this[_0x48714e(0xed)](_0x48714e(0xf8),!0x1),this[_0x48714e(0xed)](_0x48714e(0x113),!0x1),this[_0x48714e(0xed)](_0x48714e(0x10b),!0x1),this[_0x48714e(0xed)](_0x48714e(0xf5),!0x1),this[_0x48714e(0xed)](_0x48714e(0xe4),!0x1),this[_0x48714e(0xe6)]=new _0x42b751(_0x1f2d3e,_0x402548),this[_0x48714e(0xe6)][_0x48714e(0xfd)][_0x48714e(0xd7)]({'attributes':{'maxlength':_0x48714e(0xe0)}}),this[_0x48714e(0xe6)][_0x48714e(0xfd)][_0x48714e(0xe8)](_0x48714e(0xdd))['to'](this,_0x48714e(0x105),_0x178597=>_0x178597||this[_0x48714e(0xe1)]),this[_0x48714e(0xe6)][_0x48714e(0xe8)](_0x48714e(0xe4))['to'](this,_0x48714e(0xf8),this,_0x48714e(0xe4),(_0x25a8d1,_0x1628e1)=>_0x25a8d1&&_0x1628e1),this[_0x48714e(0x107)]=_0x3a4774&&_0x3a4774[_0x48714e(0xf6)]?_0x38cc1d(this,_0x3a4774):'',this[_0x48714e(0x107)]&&this[_0x48714e(0x107)][_0x48714e(0xe8)](_0x48714e(0xe4))['to'](this),this[_0x48714e(0xd9)]({'tag':_0x48714e(0xfa),'attributes':{'class':['ck',_0x48714e(0x112),_0x48714e(0x101),_0x5d5d8f['if'](_0x48714e(0xe2),_0x48714e(0xe7))]},'children':[{'tag':_0x48714e(0xfa),'attributes':{'class':['ck',_0x48714e(0x112),_0x48714e(0xf2),_0x5d5d8f['if'](_0x48714e(0xe4),_0x48714e(0x102),_0xc3f47d=>!_0xc3f47d),_0x5d5d8f['if'](_0x48714e(0xf8),_0x48714e(0xe9)),_0x5d5d8f['if'](_0x48714e(0x113),_0x48714e(0xde)),_0x5d5d8f['if'](_0x48714e(0x10b),_0x48714e(0xfc))]},'children':[this[_0x48714e(0xe6)],{'tag':_0x48714e(0xd4),'attributes':{'class':['ck',_0x48714e(0x106)]},'children':[{'text':_0x5d5d8f['to'](_0x48714e(0xe1))}]},{'tag':_0x48714e(0xfa),'attributes':{'class':['ck',_0x48714e(0xd8)]},'children':[{'tag':'ul','attributes':{'class':['ck',_0x48714e(0x110)]},'children':_0x160d34}]},this[_0x48714e(0x107)]],'on':{'click':_0x5d5d8f['to'](_0x5ac3f4=>{const _0x412784=_0x48714e;_0x5ac3f4[_0x412784(0xd5)][_0x412784(0xdf)](_0x412784(0xec))||this[_0x412784(0xf5)]&&this[_0x412784(0xe4)]&&this[_0x412784(0xe3)](_0x412784(0x104),{'id':this['id']});})}}]});}[_0x9b0370(0xf0)](){const _0x320600=_0x9b0370;super[_0x320600(0xf0)]();const _0x2aa31e=this[_0x320600(0xe6)][_0x320600(0xfd)][_0x320600(0xef)];this[_0x320600(0x109)](_0x2aa31e,_0x320600(0x10e),()=>{const _0x5750ef=_0x320600;this[_0x5750ef(0xda)]&&!_0x2aa31e[_0x5750ef(0xdd)]||this[_0x5750ef(0xe3)](_0x5750ef(0xf9),{'id':this['id'],'name':_0x2aa31e[_0x5750ef(0xdd)]}),_0x2aa31e[_0x5750ef(0xdd)]||(_0x2aa31e[_0x5750ef(0xdd)]=this[_0x5750ef(0x105)]?this[_0x5750ef(0x105)]:this[_0x5750ef(0xe1)]);});}[_0x9b0370(0x104)](){const _0x321e5e=_0x9b0370;this[_0x321e5e(0xf8)]=!0x0;}[_0x9b0370(0xe5)](){const _0x5b7b12=_0x9b0370;this[_0x5b7b12(0xf8)]=!0x1;}[_0x9b0370(0xfe)](){const _0x5ac9e5=_0x9b0370;this[_0x5ac9e5(0x113)]=!0x0;}[_0x9b0370(0xfb)](){const _0x31459d=_0x9b0370;this[_0x31459d(0x113)]=!0x1;}}