UNPKG

@ckeditor/ckeditor5-revision-history

Version:

Document revision history feature for CKEditor 5.

24 lines 7.36 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0xa3c5fb=_0x1ac2;(function(_0x4696c3,_0x296b90){const _0x1df28d=_0x1ac2,_0x19f634=_0x4696c3();while(!![]){try{const _0x5e2d28=parseInt(_0x1df28d(0xf1))/0x1+parseInt(_0x1df28d(0xee))/0x2+-parseInt(_0x1df28d(0xea))/0x3+-parseInt(_0x1df28d(0xfc))/0x4+-parseInt(_0x1df28d(0x108))/0x5+parseInt(_0x1df28d(0xd9))/0x6+-parseInt(_0x1df28d(0x107))/0x7*(-parseInt(_0x1df28d(0xf2))/0x8);if(_0x5e2d28===_0x296b90)break;else _0x19f634['push'](_0x19f634['shift']());}catch(_0x426aa3){_0x19f634['push'](_0x19f634['shift']());}}}(_0x5b35,0x72948));import{View as _0x57ba7e,createLabeledInputText as _0x3a1962}from'ckeditor5/src/ui.js';import{ConfirmMixin as _0xdb22ea}from'ckeditor5-collaboration/src/collaboration-core.js';function _0x5b35(){const _0x2ccf0d=['creator','220','uiLanguage','isHighlighted','ck-revision-history-sidebar__actions_dropdown_open','setName','_createdAtFormatted','594924hHFekQ','map','span','unshift','ck-revision-history-sidebar__revision_selected','createdAt','isActionsDropdownOpen','value','name','ck-reset','authors','42oVVxMq','1539985XkGaWi','listenTo','ck-disabled','ck-revision-history-sidebar__revision_highlighted','select','_revision','ck-revision-history-sidebar__revision__date','deselect','fieldView','extendTemplate','ck-revision-history-sidebar__revision','isSelected','bind','change','setTemplate','isEnabled','622488zLnium','.ck-thread__remove-confirm','set','bindTemplate','ck-revision-history-sidebar__revision-wrapper','fire','srcElement','ck-revision-history-sidebar__revision__controls-wrapper','revisionNameView','revisionActionsView','highlight','isConfirm','filter','from','render','div','_requireRevisionName','1983723lkkuou','closest','isReady','ck-revision-history-sidebar__revision-wrapper_confirmation_visible','413804KRFoei','unhighlight','element','468847ZMcxRc','1077056XzfwCe','ck-revision-history-sidebar__revision-authors','length'];_0x5b35=function(){return _0x2ccf0d;};return _0x5b35();}import _0x456f9d from'./revisionnameview.js';import _0x10162e from'./revisionauthorview.js';function _0x1ac2(_0x3dcccd,_0x54c6ec){const _0x5b3507=_0x5b35();return _0x1ac2=function(_0x1ac276,_0x10bc91){_0x1ac276=_0x1ac276-0xd8;let _0x1c28da=_0x5b3507[_0x1ac276];return _0x1c28da;},_0x1ac2(_0x3dcccd,_0x54c6ec);}import{dateToPrettyFormat as _0x390051}from'./utils.js';import{createActionsDropdownView as _0xd8fc3f}from'./createrevisionactionsdropdown.js';import'../../../theme/revision/revision.css';export default class ai extends/* #__PURE__ -- @preserve */ _0xdb22ea(_0x57ba7e){['id'];[_0xa3c5fb(0xe1)];[_0xa3c5fb(0xe2)];[_0xa3c5fb(0x10d)];[_0xa3c5fb(0xe9)];constructor(_0x38103,_0x292376,_0x5f3ca9,_0x28113c){const _0x441e5d=_0xa3c5fb;super(_0x38103);const _0x1dadd7=this[_0x441e5d(0xdc)],_0x3c0f94=function(_0x29395a,_0x4f3b00){const _0x20034e=_0x441e5d,_0x256fe9=Array[_0x20034e(0xe6)](_0x4f3b00[_0x20034e(0x106)])[_0x20034e(0xe5)](_0x5ae6e4=>_0x5ae6e4!=_0x4f3b00[_0x20034e(0xf5)]);return _0x4f3b00[_0x20034e(0xf5)]&&_0x256fe9[_0x20034e(0xff)](_0x4f3b00[_0x20034e(0xf5)]),_0x256fe9[_0x20034e(0xfd)](_0x24492b=>new _0x10162e(_0x29395a,_0x24492b,_0x24492b==_0x4f3b00[_0x20034e(0xf5)]));}(_0x38103,_0x292376);this['id']=_0x292376['id'],this[_0x441e5d(0x10d)]=_0x292376,this[_0x441e5d(0xe9)]=_0x28113c,this[_0x441e5d(0x114)](_0x441e5d(0x104),_0x441e5d(0x101))['to'](_0x292376),this[_0x441e5d(0x114)](_0x441e5d(0xfb))['to'](this,_0x441e5d(0x101),_0x3db25d=>_0x390051(_0x38103[_0x441e5d(0xf7)],_0x3db25d)),this[_0x441e5d(0xdb)](_0x441e5d(0x113),!0x1),this[_0x441e5d(0xdb)](_0x441e5d(0xf8),!0x1),this[_0x441e5d(0xdb)](_0x441e5d(0x102),!0x1),this[_0x441e5d(0xdb)](_0x441e5d(0xec),!0x1),this[_0x441e5d(0xdb)](_0x441e5d(0xd8),!0x1),this[_0x441e5d(0xe1)]=new _0x456f9d(_0x38103,_0x3a1962),this[_0x441e5d(0xe1)][_0x441e5d(0x110)][_0x441e5d(0x111)]({'attributes':{'maxlength':_0x441e5d(0xf6)}}),this[_0x441e5d(0xe1)][_0x441e5d(0x110)][_0x441e5d(0x114)](_0x441e5d(0x103))['to'](this,_0x441e5d(0x104),_0x24adf7=>_0x24adf7||this[_0x441e5d(0xfb)]),this[_0x441e5d(0xe1)][_0x441e5d(0x114)](_0x441e5d(0xd8))['to'](this,_0x441e5d(0x113),this,_0x441e5d(0xd8),(_0x53cf7b,_0x310e26)=>_0x53cf7b&&_0x310e26),this[_0x441e5d(0xe2)]=_0x5f3ca9&&_0x5f3ca9[_0x441e5d(0xf4)]?_0xd8fc3f(this,_0x5f3ca9):'',this[_0x441e5d(0xe2)]&&this[_0x441e5d(0xe2)][_0x441e5d(0x114)](_0x441e5d(0xd8))['to'](this),this[_0x441e5d(0x116)]({'tag':_0x441e5d(0xe8),'attributes':{'class':['ck',_0x441e5d(0x105),_0x441e5d(0xdd),_0x1dadd7['if'](_0x441e5d(0xe4),_0x441e5d(0xed))]},'children':[{'tag':_0x441e5d(0xe8),'attributes':{'class':['ck',_0x441e5d(0x105),_0x441e5d(0x112),_0x1dadd7['if'](_0x441e5d(0xd8),_0x441e5d(0x10a),_0x13df19=>!_0x13df19),_0x1dadd7['if'](_0x441e5d(0x113),_0x441e5d(0x100)),_0x1dadd7['if'](_0x441e5d(0xf8),_0x441e5d(0x10b)),_0x1dadd7['if'](_0x441e5d(0x102),_0x441e5d(0xf9))]},'children':[this[_0x441e5d(0xe1)],{'tag':_0x441e5d(0xfe),'attributes':{'class':['ck',_0x441e5d(0x10e)]},'children':[{'text':_0x1dadd7['to'](_0x441e5d(0xfb))}]},{'tag':_0x441e5d(0xe8),'attributes':{'class':['ck',_0x441e5d(0xe0)]},'children':[{'tag':'ul','attributes':{'class':['ck',_0x441e5d(0xf3)]},'children':_0x3c0f94}]},this[_0x441e5d(0xe2)]],'on':{'click':_0x1dadd7['to'](_0xba06aa=>{const _0x3a8fd8=_0x441e5d;_0xba06aa[_0x3a8fd8(0xdf)][_0x3a8fd8(0xeb)](_0x3a8fd8(0xda))||this[_0x3a8fd8(0xec)]&&this[_0x3a8fd8(0xd8)]&&this[_0x3a8fd8(0xde)](_0x3a8fd8(0x10c),{'id':this['id']});})}}]});}[_0xa3c5fb(0xe7)](){const _0x1d8cc8=_0xa3c5fb;super[_0x1d8cc8(0xe7)]();const _0x3b80e6=this[_0x1d8cc8(0xe1)][_0x1d8cc8(0x110)][_0x1d8cc8(0xf0)];this[_0x1d8cc8(0x109)](_0x3b80e6,_0x1d8cc8(0x115),()=>{const _0x41f264=_0x1d8cc8;this[_0x41f264(0xe9)]&&!_0x3b80e6[_0x41f264(0x103)]||this[_0x41f264(0xde)](_0x41f264(0xfa),{'id':this['id'],'name':_0x3b80e6[_0x41f264(0x103)]}),_0x3b80e6[_0x41f264(0x103)]||(_0x3b80e6[_0x41f264(0x103)]=this[_0x41f264(0x104)]?this[_0x41f264(0x104)]:this[_0x41f264(0xfb)]);});}[_0xa3c5fb(0x10c)](){const _0x4edf1d=_0xa3c5fb;this[_0x4edf1d(0x113)]=!0x0;}[_0xa3c5fb(0x10f)](){const _0x371dbf=_0xa3c5fb;this[_0x371dbf(0x113)]=!0x1;}[_0xa3c5fb(0xe3)](){const _0xebc729=_0xa3c5fb;this[_0xebc729(0xf8)]=!0x0;}[_0xa3c5fb(0xef)](){const _0xd8366=_0xa3c5fb;this[_0xd8366(0xf8)]=!0x1;}}