UNPKG

@ckeditor/ckeditor5-revision-history

Version:

Document revision history feature for CKEditor 5.

23 lines 6.52 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 _0x1a67ad=_0x2eea;function _0x27dd(){const _0x4d6b4e=['isEnabled','ck-reset','deselect','select','unhighlight','highlightRevisions','ck-revision-history-sidebar','render','add','some','div','_removeRevision','setName','82648GjjdMo','startDate','delegate','143170meuCwQ','uiLanguage','remove','revisionViews','addRevision','flat','find','_revisionActions','176172Dneukj','map','4rLdgpG','_getTimePeriodViewByStartDate','revisionSelected','399097vfAjgV','set','63BMLCKU','ck-revision-history-sidebar__timeline','createCollection','fire','_revisions','14HrtNbz','selectRevision','createdAt','timePeriodViews','removeRevision','8862612dVbzcv','getTime','451IMzIUD','392780GxOylm','bindTemplate','_addRevision','highlight','11893OQyZIx','setTemplate','get','_requireRevisionName','ck-disabled','locale','1266kafGoy','ck-rounded-corners','revisionSetName'];_0x27dd=function(){return _0x4d6b4e;};return _0x27dd();}(function(_0x1ac394,_0x10e74c){const _0x15faed=_0x2eea,_0x2f0041=_0x1ac394();while(!![]){try{const _0x56d60a=parseInt(_0x15faed(0x12d))/0x1+parseInt(_0x15faed(0x134))/0x2*(parseInt(_0x15faed(0x128))/0x3)+-parseInt(_0x15faed(0x12a))/0x4*(parseInt(_0x15faed(0x13c))/0x5)+parseInt(_0x15faed(0x146))/0x6*(-parseInt(_0x15faed(0x140))/0x7)+parseInt(_0x15faed(0x11d))/0x8*(parseInt(_0x15faed(0x12f))/0x9)+-parseInt(_0x15faed(0x120))/0xa*(-parseInt(_0x15faed(0x13b))/0xb)+-parseInt(_0x15faed(0x139))/0xc;if(_0x56d60a===_0x10e74c)break;else _0x2f0041['push'](_0x2f0041['shift']());}catch(_0x539a0d){_0x2f0041['push'](_0x2f0041['shift']());}}}(_0x27dd,0x47bfb));import{View as _0x9e3ab4}from'ckeditor5/src/ui.js';import{RevisionsSidebarTimePeriodView as _0x5b5935}from'./revisionssidebartimeperiodview.js';import{RevisionsSidebarHeaderView as _0x15dcf7}from'./revisionssidebarheaderview.js';import{getDateTimePeriodInfo as _0x53d908}from'./utils.js';import'../../../theme/revisionssidebar/revisionssidebar.css';function _0x2eea(_0x3d27e1,_0x2fa106){const _0x27ddad=_0x27dd();return _0x2eea=function(_0x2eeaa0,_0x5d5c1b){_0x2eeaa0=_0x2eeaa0-0x11c;let _0x5f387d=_0x27ddad[_0x2eeaa0];return _0x5f387d;},_0x2eea(_0x3d27e1,_0x2fa106);}export class RevisionsSidebarView extends _0x9e3ab4{[_0x1a67ad(0x137)];[_0x1a67ad(0x133)];[_0x1a67ad(0x127)];[_0x1a67ad(0x143)];constructor(_0x43028b,_0x31d85a,_0x34c2af,_0x3ecea5){const _0x550a5a=_0x1a67ad;super(_0x43028b);const _0x1ce897=this[_0x550a5a(0x13d)];this[_0x550a5a(0x137)]=this[_0x550a5a(0x131)](),this[_0x550a5a(0x137)][_0x550a5a(0x11f)](_0x550a5a(0x14c))['to'](this),this[_0x550a5a(0x137)][_0x550a5a(0x11f)](_0x550a5a(0x11c))['to'](this),this[_0x550a5a(0x133)]=_0x31d85a,this[_0x550a5a(0x127)]=_0x34c2af,this[_0x550a5a(0x143)]=_0x3ecea5,this['on'](_0x550a5a(0x14c),(_0x348998,_0x5988ac)=>{const _0x73468=_0x550a5a;this[_0x73468(0x132)](_0x73468(0x12c),_0x5988ac);}),this['on'](_0x550a5a(0x11c),(_0x47d750,_0x21612b)=>{const _0x5035a0=_0x550a5a;this[_0x5035a0(0x132)](_0x5035a0(0x148),_0x21612b);}),this[_0x550a5a(0x12e)](_0x550a5a(0x149),!0x1),this[_0x550a5a(0x141)]({'tag':_0x550a5a(0x153),'attributes':{'class':['ck',_0x550a5a(0x14a),_0x550a5a(0x147),_0x550a5a(0x14f)]},'children':[new _0x15dcf7(_0x43028b),{'tag':_0x550a5a(0x153),'attributes':{'class':['ck',_0x550a5a(0x130),_0x1ce897['if'](_0x550a5a(0x149),_0x550a5a(0x144),_0x166d9e=>!_0x166d9e)]},'children':this[_0x550a5a(0x137)]}]});}[_0x1a67ad(0x150)](){const _0x1d480b=_0x1a67ad;super[_0x1d480b(0x150)]();for(const _0x4f483a of this[_0x1d480b(0x133)])this[_0x1d480b(0x13e)](_0x4f483a);this[_0x1d480b(0x133)]['on'](_0x1d480b(0x151),(_0x283474,_0x1efa40)=>{const _0x16c91a=_0x1d480b;this[_0x16c91a(0x13e)](_0x1efa40);}),this[_0x1d480b(0x133)]['on'](_0x1d480b(0x122),(_0xc62012,_0x2b7075)=>{const _0x171512=_0x1d480b;this[_0x171512(0x154)](_0x2b7075);});}get[_0x1a67ad(0x123)](){const _0x1db33a=_0x1a67ad;return this[_0x1db33a(0x137)][_0x1db33a(0x129)](_0x3fa0a0=>_0x3fa0a0[_0x1db33a(0x123)][_0x1db33a(0x129)](_0x33ffc1=>_0x33ffc1))[_0x1db33a(0x125)]();}[_0x1a67ad(0x135)](_0xc7ca2a){const _0x34797e=_0x1a67ad;for(const _0x42154a of this[_0x34797e(0x123)])_0xc7ca2a&&_0xc7ca2a['id']===_0x42154a['id']?_0x42154a[_0x34797e(0x14c)]():_0x42154a[_0x34797e(0x14b)]();}[_0x1a67ad(0x14e)](_0x4da8c9){const _0x3cd21c=_0x1a67ad;for(const _0x585cad of this[_0x3cd21c(0x123)])_0x4da8c9[_0x3cd21c(0x152)](({id:_0x3ee6f4})=>_0x3ee6f4===_0x585cad['id'])?_0x585cad[_0x3cd21c(0x13f)]():_0x585cad[_0x3cd21c(0x14d)]();}[_0x1a67ad(0x13e)](_0x385848){const _0x50bdd4=_0x1a67ad,_0x4f1f22=_0x53d908(_0x385848[_0x50bdd4(0x136)],this[_0x50bdd4(0x145)][_0x50bdd4(0x121)])[_0x50bdd4(0x11e)];let _0x2ce266=this[_0x50bdd4(0x137)][_0x50bdd4(0x142)](0x0);_0x2ce266&&_0x2ce266[_0x50bdd4(0x11e)][_0x50bdd4(0x13a)]()===_0x4f1f22[_0x50bdd4(0x13a)]()||(_0x2ce266=new _0x5b5935(this[_0x50bdd4(0x145)],_0x4f1f22,this[_0x50bdd4(0x127)],this[_0x50bdd4(0x143)]),this[_0x50bdd4(0x137)][_0x50bdd4(0x151)](_0x2ce266)),_0x2ce266[_0x50bdd4(0x124)](_0x385848);}[_0x1a67ad(0x154)](_0x10f5c0){const _0x331714=_0x1a67ad,_0x29f1af=_0x53d908(_0x10f5c0[_0x331714(0x136)],this[_0x331714(0x145)][_0x331714(0x121)])[_0x331714(0x11e)];this[_0x331714(0x12b)](_0x29f1af)[_0x331714(0x138)](_0x10f5c0);}[_0x1a67ad(0x12b)](_0x1fda39){const _0x34bb3d=_0x1a67ad;return this[_0x34bb3d(0x137)][_0x34bb3d(0x126)](_0x1ac013=>_0x1ac013[_0x34bb3d(0x11e)][_0x34bb3d(0x13a)]()===_0x1fda39[_0x34bb3d(0x13a)]());}}