@ckeditor/ckeditor5-revision-history 38.1.1 → 38.2.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/build/revision-history.js +1 -1
  2. package/package.json +7 -6
  3. package/src/augmentation.d.ts +25 -25
  4. package/src/changeitem.d.ts +57 -57
  5. package/src/changeitem.js +1 -1
  6. package/src/editor/revisionviewereditor.d.ts +27 -27
  7. package/src/editor/revisionviewereditor.js +1 -1
  8. package/src/editor/revisionviewereditorui.d.ts +28 -28
  9. package/src/editor/revisionviewereditorui.js +1 -1
  10. package/src/editor/revisionviewereditoruiview.d.ts +43 -43
  11. package/src/editor/revisionviewereditoruiview.js +1 -1
  12. package/src/index.d.ts +11 -11
  13. package/src/index.js +1 -1
  14. package/src/revision.d.ts +153 -153
  15. package/src/revision.js +1 -1
  16. package/src/revisiondiff.d.ts +20 -20
  17. package/src/revisiondiff.js +1 -1
  18. package/src/revisionhistory.d.ts +95 -95
  19. package/src/revisionhistory.js +1 -1
  20. package/src/revisionhistoryadapter.d.ts +60 -60
  21. package/src/revisionhistoryconfig.d.ts +60 -60
  22. package/src/revisionsrepository.d.ts +48 -48
  23. package/src/revisionsrepository.js +1 -1
  24. package/src/revisiontracker.d.ts +77 -77
  25. package/src/revisiontracker.js +1 -1
  26. package/src/revisionviewer.d.ts +21 -21
  27. package/src/revisionviewer.js +1 -1
  28. package/src/ui/revision/createrevisionactionsdropdown.d.ts +9 -9
  29. package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
  30. package/src/ui/revision/revisionauthorview.d.ts +4 -4
  31. package/src/ui/revision/revisionauthorview.js +1 -1
  32. package/src/ui/revision/revisionnameview.d.ts +4 -4
  33. package/src/ui/revision/revisionnameview.js +1 -1
  34. package/src/ui/revision/revisionview.d.ts +91 -91
  35. package/src/ui/revision/revisionview.js +1 -1
  36. package/src/ui/revision/subrevisioncollapserview.d.ts +17 -17
  37. package/src/ui/revision/subrevisioncollapserview.js +1 -1
  38. package/src/ui/revision/subrevisionview.d.ts +30 -30
  39. package/src/ui/revision/subrevisionview.js +1 -1
  40. package/src/ui/revision/utils.d.ts +4 -4
  41. package/src/ui/revision/utils.js +1 -1
  42. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.d.ts +80 -80
  43. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
  44. package/src/ui/revisionhistory/revisionhistoryui.d.ts +22 -22
  45. package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
  46. package/src/ui/revisionssidebar/revisionssidebar.d.ts +40 -40
  47. package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
  48. package/src/ui/revisionssidebar/revisionssidebarheaderview.d.ts +4 -4
  49. package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
  50. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.d.ts +25 -25
  51. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
  52. package/src/ui/revisionssidebar/revisionssidebarview.d.ts +40 -40
  53. package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
  54. package/src/ui/revisionssidebar/utils.d.ts +8 -8
  55. package/src/ui/revisionssidebar/utils.js +1 -1
  56. package/src/ui/revisionviewer/changedetailsview.d.ts +18 -18
  57. package/src/ui/revisionviewer/changedetailsview.js +1 -1
  58. package/src/ui/revisionviewer/changesnavigationview.d.ts +36 -36
  59. package/src/ui/revisionviewer/changesnavigationview.js +1 -1
  60. package/src/ui/revisionviewer/revisionviewerloadingoverlay.d.ts +22 -22
  61. package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
  62. package/src/ui/revisionviewer/revisionviewerui.d.ts +24 -24
  63. package/src/ui/revisionviewer/revisionviewerui.js +1 -1
  64. package/src/utils/common-translations.d.ts +7 -7
  65. package/src/utils/common-translations.js +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xe461=['DocumentOutline','destroy','Autosave','toLocaleTimeString','_showRevisionViewer','revisionHistory.restoreRevisionCallback','includes','Users','selection','style','has','closeRevisionViewerCallback','refreshVisibility','define','isEnabled','restoreRevision','getRevisions','getRevisionRootsAttributes','numeric','adapter','model','initialData','builtinPlugins','keys','addRoot','requires','Restored','find','then','catch','parse','document','PaginationLookup','revision-history-missing-configuration','editor','getAttributeKeys','bind','saveRevision','uiLanguage','getRevision','Annotations','detachRoot','_viewerEditor','string','setSelection','removeSelectionAttribute','getRevisionData','_cleanUp','revisionHistory.editorContainer','isReadOnly','changesNavigation','isReady','concat','from','restrictedEditingException','getUser','_update','revisionHistory.viewerContainer','name','push','removeMarker','display','map','_recalculatePageBreaks','function','_enhanceCloseRevisionViewerCallback','_restoreRevision','rootsAttributes','context','revisionHistory','refreshPositioning','set','end','update','addRevisionData','insert','_enhanceShowRevisionViewerCallback','RevisionViewerIntegration','disableReadOnlyMode','RevisionViewer','revisionHistory.viewerEditorElement','config','every','toVersion','constructor','createdAt','WebSocketGateway','RevisionsRepository','extraPlugins','RevisionTracker','init','RestrictedEditingMode','revisionHistory.closeRevisionViewerCallback','revision-history-viewer-opened','get','getMarkersGroup','pluginName','markers','error','toJSON','plugins','none','locale','result','enqueueChange','names','revisionHistory.showRevisionViewerCallback','_getRevisionViewerEditorConfig','RevisionHistory'];(function(_0x24430b,_0xe46103){const _0x1b6d99=function(_0x555c20){while(--_0x555c20){_0x24430b['push'](_0x24430b['shift']());}};_0x1b6d99(++_0xe46103);}(_0xe461,0xfc));const _0x1b6d=function(_0x24430b,_0xe46103){_0x24430b=_0x24430b-0x0;let _0x1b6d99=_0xe461[_0x24430b];return _0x1b6d99;};import{Plugin as _0x5c6ace}from'ckeditor5/src/core';import{CKEditorError as _0xa61ff1,uid as _0x1def92}from'ckeditor5/src/utils';import _0x1d999a from'./revisiontracker';import _0x5e8630 from'./ui/revisionhistory/revisionhistoryui';import _0x206912 from'./revisionviewer';import _0x54c77a from'./ui/revisionviewer/revisionviewerui';import _0x2c36a1 from'./ui/revisionssidebar/revisionssidebar';import _0x3f34d4 from'./editor/revisionviewereditor';import{getTranslation as _0x43aa2f}from'./utils/common-translations';class p extends _0x5c6ace{static get['pluginName'](){return _0x1b6d('0x2b');}constructor(_0x2fa76a){super(_0x2fa76a),this[_0x1b6d('0x45')]=_0x1b6d('0x26');}}export default class g extends _0x5c6ace{static get['pluginName'](){return _0x1b6d('0x4a');}static get[_0x1b6d('0x64')](){return[_0x1d999a,_0x5e8630];}constructor(_0x962b55){if(super(_0x962b55),!this['editor'][_0x1b6d('0x2f')][_0x1b6d('0x3c')](_0x1b6d('0x23')))throw new _0xa61ff1(_0x1b6d('0x6c'),this);this[_0x1b6d('0x8')]=null,this[_0x1b6d('0x0')][_0x1b6d('0x2f')][_0x1b6d('0x58')](_0x1b6d('0x48'),_0x156816=>this[_0x1b6d('0x4f')](_0x156816)),this[_0x1b6d('0x0')][_0x1b6d('0x2f')][_0x1b6d('0x58')](_0x1b6d('0x3a'),_0x4862ac=>this['_closeRevisionViewer'](_0x4862ac)),this[_0x1b6d('0x0')][_0x1b6d('0x2f')][_0x1b6d('0x58')](_0x1b6d('0x50'),_0xa2522e=>this[_0x1b6d('0x20')](_0xa2522e)),this[_0x1b6d('0x2a')](),this[_0x1b6d('0x1f')]();}set[_0x1b6d('0x5e')](_0x338278){this[_0x1b6d('0x0')][_0x1b6d('0x42')]['get']('RevisionTracker')[_0x1b6d('0x5e')]=_0x338278;}get['adapter'](){return this[_0x1b6d('0x0')][_0x1b6d('0x42')][_0x1b6d('0x3c')](_0x1b6d('0x37'))['adapter'];}[_0x1b6d('0x28')](_0x135200){return this[_0x1b6d('0x0')][_0x1b6d('0x42')]['get']('RevisionTracker')['addRevisionData'](_0x135200);}[_0x1b6d('0x5')](_0x1ab51c){return this['editor'][_0x1b6d('0x42')][_0x1b6d('0x3c')]('RevisionsRepository')['getRevision'](_0x1ab51c);}[_0x1b6d('0x5b')](_0x4ba3c9={'toJSON':!0x1}){return this['editor']['plugins'][_0x1b6d('0x3c')](_0x1b6d('0x35'))[_0x1b6d('0x5b')](_0x4ba3c9);}['_getRevisionViewerEditorConfig'](){const _0x2bcc8d=[_0x1b6d('0x22')],_0x9cb433=[_0x1b6d('0x37'),'RevisionHistoryUI',_0x1b6d('0x34'),_0x1b6d('0x39'),_0x1b6d('0x4d'),_0x1b6d('0x4b')],_0x1ee95d={},_0x4f590a=this[_0x1b6d('0x0')],_0xccb18e=_0x4f590a[_0x1b6d('0x42')]['get'](_0x1b6d('0x37')),_0x1f6b8d=_0x4f590a[_0x1b6d('0x42')]['get']('Users')['users'];for(const _0x13ef48 of _0x4f590a[_0x1b6d('0x2f')][_0x1b6d('0x47')]())_0x2bcc8d['includes'](_0x13ef48)||(_0x1ee95d[_0x13ef48]=_0x4f590a[_0x1b6d('0x2f')][_0x1b6d('0x3c')](_0x13ef48));delete _0x1ee95d[_0x1b6d('0x60')],delete _0x1ee95d[_0x1b6d('0x21')],_0x1ee95d['toolbar']=['exitToEditing','restoreRevision',_0x1b6d('0x10')];const _0x6cb823=this[_0x1b6d('0x0')][_0x1b6d('0x32')][_0x1b6d('0x61')]||[],_0xda1a44=_0x1ee95d[_0x1b6d('0x36')]||[];delete _0x1ee95d['extraPlugins'];const _0x572441=_0x4f590a['_context']['config'][_0x1b6d('0x3c')]('plugins')||[],_0x3d7011=_0x6cb823[_0x1b6d('0x12')](_0x1ee95d[_0x1b6d('0x42')])[_0x1b6d('0x12')](_0xda1a44)[_0x1b6d('0x12')](_0x572441)[_0x1b6d('0x1c')](_0x3696dd=>_0x1b6d('0x9')==typeof _0x3696dd?_0x6cb823[_0x1b6d('0x66')](_0x5d0226=>_0x5d0226[_0x1b6d('0x3e')]==_0x3696dd):_0x3696dd);_0x1ee95d[_0x1b6d('0x42')]=Array[_0x1b6d('0x13')](new Set(_0x3d7011))['filter'](_0x27b7fe=>_0x1f1a4c(_0x27b7fe,_0x4f590a[_0x1b6d('0x42')],[]));function _0x1f1a4c(_0x410927,_0x4b20bf,_0x239dc5){const _0x52863a=_0x1b6d('0x1e')==typeof _0x410927?_0x410927['pluginName']||_0x410927[_0x1b6d('0x18')]:_0x410927;if(_0x239dc5[_0x1b6d('0x51')](_0x52863a))return!0x0;if(_0x239dc5[_0x1b6d('0x19')](_0x52863a),_0x9cb433[_0x1b6d('0x51')](_0x52863a))return!0x1;const _0x7fa6dd=((_0x1b6d('0x1e')==typeof _0x410927?_0x410927:_0x4b20bf[_0x1b6d('0x55')](_0x52863a)?_0x4b20bf[_0x1b6d('0x3c')](_0x52863a):{})[_0x1b6d('0x64')]||[])[_0x1b6d('0x30')](_0x526025=>_0x1f1a4c(_0x526025,_0x4b20bf,_0x239dc5));return _0x7fa6dd||_0x9cb433[_0x1b6d('0x19')](_0x52863a),_0x7fa6dd;}return _0x1ee95d[_0x1b6d('0x42')][_0x1b6d('0x19')](p,_0x206912,_0x54c77a,class extends _0x5c6ace{static get[_0x1b6d('0x64')](){return[_0x206912,_0x1b6d('0x52')];}[_0x1b6d('0x38')](){const _0x159bb4=this['editor'][_0x1b6d('0x42')][_0x1b6d('0x3c')](_0x1b6d('0x52'));for(const _0x5e0104 of _0x1f6b8d)_0x5e0104['isAnonymous']||_0x159bb4[_0x1b6d('0x15')](_0x5e0104['id'])||_0x159bb4['addUser'](_0x5e0104);const _0x5a437d=_0xccb18e['repository']['getRevisions']();let _0x3500d5=null;const _0x1b33a9=this['editor'][_0x1b6d('0x42')][_0x1b6d('0x3c')](_0x1b6d('0x2d'));_0x1b33a9[_0x1b6d('0x5e')]=_0xccb18e[_0x1b6d('0x5e')],_0x1b33a9[_0x1b6d('0x2')](_0x1b6d('0x59'))['to'](_0xccb18e),this[_0x1b6d('0x0')]['commands'][_0x1b6d('0x3c')](_0x1b6d('0x5a'))[_0x1b6d('0x2')](_0x1b6d('0x59'))['to'](_0x4f590a,_0x1b6d('0xf'),_0x629eb5=>!_0x629eb5);for(const _0x4f6c8f of _0x5a437d){const _0x19af5a=null===_0x4f6c8f['creator'];if(_0x19af5a&&_0x4f6c8f[_0x1b6d('0x31')]===_0x4f6c8f['fromVersion'])continue;const _0x354bd3=_0x4f6c8f[_0x1b6d('0x41')]();_0x1b33a9['addRevisionData'](_0x354bd3,(_0x186c10,_0x4d6129,_0x3a7e0a)=>{if(_0x19af5a){if(_0x3500d5)_0x3500d5[_0x1b6d('0x16')](_0x186c10,_0x4d6129);else{if(!_0x4d6129){const _0x51dd9a=_0x3a7e0a[_0x1b6d('0x41')]();_0x51dd9a['id']=_0x1def92(),_0xccb18e[_0x1b6d('0x3')](_0x51dd9a,_0x3a7e0a[_0x1b6d('0x31')])[_0x1b6d('0x67')](_0x2726e6=>{_0x3500d5=_0x2726e6;});}}}else _0x4f6c8f[_0x1b6d('0x16')](_0x186c10,_0x4d6129);});}}},_0x2c36a1),_0x1ee95d;}[_0x1b6d('0x2a')](){const _0x507687=this[_0x1b6d('0x0')][_0x1b6d('0x2f')][_0x1b6d('0x3c')]('revisionHistory')['showRevisionViewerCallback'];this[_0x1b6d('0x0')][_0x1b6d('0x2f')][_0x1b6d('0x25')](_0x1b6d('0x48'),async()=>{this[_0x1b6d('0x0')]['enableReadOnlyMode']('revision-history-viewer-opened');const _0x57b704=this[_0x1b6d('0x0')][_0x1b6d('0x42')][_0x1b6d('0x3c')](_0x1b6d('0x37'));if(this[_0x1b6d('0x0')]['plugins'][_0x1b6d('0x55')](_0x1b6d('0x4d'))){const _0x1a3511=this[_0x1b6d('0x0')][_0x1b6d('0x42')][_0x1b6d('0x3c')]('Autosave');await _0x1a3511['save']();}else await _0x57b704[_0x1b6d('0x27')]();this[_0x1b6d('0x0')]['plugins'][_0x1b6d('0x55')](_0x1b6d('0x6b'))&&this[_0x1b6d('0x0')][_0x1b6d('0x42')]['get'](_0x1b6d('0x6b'))[_0x1b6d('0x1d')]();const _0x55f53c=this[_0x1b6d('0x49')]();return _0x507687(_0x55f53c)[_0x1b6d('0x67')](_0x5a3215=>{return(this[_0x1b6d('0x8')]=_0x5a3215,this['editor'][_0x1b6d('0x42')][_0x1b6d('0x55')](_0x1b6d('0x6')))&&this['editor'][_0x1b6d('0x42')][_0x1b6d('0x3c')](_0x1b6d('0x6'))[_0x1b6d('0x57')](),_0x5a3215;})[_0x1b6d('0x68')](_0xace921=>(console[_0x1b6d('0x40')](_0xace921),this[_0x1b6d('0x0')]['disableReadOnlyMode'](_0x1b6d('0x3b')),null));});}[_0x1b6d('0x1f')](){const _0x4ce369=this[_0x1b6d('0x0')][_0x1b6d('0x2f')]['get'](_0x1b6d('0x23'))[_0x1b6d('0x56')];this[_0x1b6d('0x0')][_0x1b6d('0x2f')][_0x1b6d('0x25')](_0x1b6d('0x3a'),()=>(this[_0x1b6d('0x0')]['plugins'][_0x1b6d('0x55')](_0x1b6d('0x6b'))&&this[_0x1b6d('0x0')][_0x1b6d('0x42')][_0x1b6d('0x3c')](_0x1b6d('0x6b'))[_0x1b6d('0x1d')](),this[_0x1b6d('0x8')][_0x1b6d('0x42')][_0x1b6d('0x3c')]('RevisionViewer')[_0x1b6d('0xd')](),_0x4ce369(this[_0x1b6d('0x8')])[_0x1b6d('0x67')](()=>{if(this[_0x1b6d('0x0')][_0x1b6d('0x2c')]('revision-history-viewer-opened'),this['_viewerEditor']=null,this[_0x1b6d('0x0')][_0x1b6d('0x42')][_0x1b6d('0x55')](_0x1b6d('0x6'))){const _0x478333=this['editor'][_0x1b6d('0x42')]['get'](_0x1b6d('0x6'));_0x478333['refreshVisibility'](),_0x478333[_0x1b6d('0x24')]();}})));}[_0x1b6d('0x4f')](_0x5c3d76){const _0x5b755e=this[_0x1b6d('0x0')][_0x1b6d('0x2f')]['get'](_0x1b6d('0xe')),_0x4cbb33=this[_0x1b6d('0x0')][_0x1b6d('0x2f')]['get']('revisionHistory.viewerContainer'),_0x24b322=this[_0x1b6d('0x0')]['config'][_0x1b6d('0x3c')](_0x1b6d('0x2e'));return _0x3f34d4['create'](_0x24b322,_0x5c3d76)[_0x1b6d('0x67')](_0x32c520=>(_0x4cbb33['style'][_0x1b6d('0x1b')]='block',_0x5b755e['style'][_0x1b6d('0x1b')]=_0x1b6d('0x43'),_0x32c520));}['_closeRevisionViewer'](_0x361c6b){const _0xc2061=this[_0x1b6d('0x0')]['config'][_0x1b6d('0x3c')]('revisionHistory.editorContainer');return this[_0x1b6d('0x0')]['config']['get'](_0x1b6d('0x17'))[_0x1b6d('0x54')][_0x1b6d('0x1b')]=_0x1b6d('0x43'),_0xc2061[_0x1b6d('0x54')][_0x1b6d('0x1b')]='',_0x361c6b[_0x1b6d('0x4c')]();}async['_restoreRevision'](_0x1c0d09){const _0x45103a=this['editor'],_0x472cd5=this[_0x1b6d('0x8')][_0x1b6d('0x42')][_0x1b6d('0x3c')]('RevisionViewer'),_0x28a42c=_0x45103a['plugins'][_0x1b6d('0x3c')](_0x1b6d('0x37')),_0x27f920=_0x472cd5['repository']['getRevision'](_0x1c0d09);let _0x260523,_0x26bed9,_0x189991;try{_0x260523=await _0x472cd5[_0x1b6d('0xc')](_0x27f920),_0x26bed9=await _0x472cd5[_0x1b6d('0x5c')](_0x27f920);}catch(_0x38a1f2){return void console[_0x1b6d('0x40')](_0x38a1f2);}_0x45103a['model']['change'](_0x356aa3=>{for(const _0x4c4da6 of Array[_0x1b6d('0x13')](_0x45103a[_0x1b6d('0x5f')][_0x1b6d('0x3f')][_0x1b6d('0x3d')](_0x1b6d('0x14'))))_0x356aa3[_0x1b6d('0x1a')](_0x4c4da6);}),_0x472cd5['isReady']=!0x1,_0x45103a[_0x1b6d('0x5f')][_0x1b6d('0x46')](_0x1c5202=>{_0x1c5202[_0x1b6d('0xa')](null),_0x1c5202[_0x1b6d('0xb')](_0x45103a[_0x1b6d('0x5f')][_0x1b6d('0x6a')][_0x1b6d('0x53')][_0x1b6d('0x1')]());for(const _0x364904 of _0x45103a['model']['document']['getRootNames']())_0x1c5202[_0x1b6d('0x7')](_0x364904);for(const _0x200754 of Object['keys'](_0x260523)){const _0x1f0aad=_0x1c5202[_0x1b6d('0x63')](_0x200754);for(const _0x126a7b of Object[_0x1b6d('0x62')](_0x26bed9[_0x200754]))_0x1c5202['setAttribute'](_0x126a7b,_0x26bed9[_0x200754][_0x126a7b],_0x1f0aad);_0x1c5202[_0x1b6d('0x29')](_0x45103a['data'][_0x1b6d('0x69')](_0x260523[_0x200754],_0x1f0aad),_0x1f0aad,0x0);}});const _0x1a4aaa=_0x43aa2f(_0x45103a[_0x1b6d('0x44')],_0x1b6d('0x65'));if(_0x27f920[_0x1b6d('0x18')])_0x189991=-0x1==_0x27f920[_0x1b6d('0x18')]['indexOf'](_0x1a4aaa)?_0x1a4aaa+':\x20'+_0x27f920[_0x1b6d('0x18')]:_0x27f920['name'];else _0x189991=_0x1a4aaa+':\x20'+(_0x27f920['createdAt']['toLocaleDateString'](_0x45103a[_0x1b6d('0x44')][_0x1b6d('0x4')],{'month':'long','day':_0x1b6d('0x5d')})+',\x20'+_0x27f920[_0x1b6d('0x33')][_0x1b6d('0x4e')](_0x45103a[_0x1b6d('0x44')][_0x1b6d('0x4')],{'hour':'numeric','minute':'numeric'}));return await _0x28a42c[_0x1b6d('0x3')]({'name':_0x189991}),_0x472cd5[_0x1b6d('0x11')]=!0x0,_0x45103a[_0x1b6d('0x2f')]['get'](_0x1b6d('0x23'))['closeRevisionViewerCallback']();}}
23
+ const _0x4fb0=['RevisionHistory','define','from','result','toolbar','data','numeric','change','toJSON','get','adapter','insert','saveRevision','indexOf','editor','config','error','_getRevisionViewerEditorConfig','repository','isReadOnly','style','bind','setSelection','revisionHistory.restoreRevisionCallback','detachRoot','RevisionHistoryUI','_enhanceShowRevisionViewerCallback','markers','RevisionViewer','getRevision','_showRevisionViewer','RevisionViewerIntegration','createdAt','_enhanceCloseRevisionViewerCallback','_viewerEditor','save','has','_cleanUp','none','selection','revisionHistory.editorContainer','refreshPositioning','Users','isAnonymous','plugins','keys','revisionHistory.viewerEditorElement','requires','revision-history-missing-configuration','getRevisionData','_update','revisionHistory.showRevisionViewerCallback','_recalculatePageBreaks','RevisionsRepository','destroy','pluginName','set','enableReadOnlyMode','display','Autosave','isReady','parse','Annotations','toVersion','RevisionTracker','end','PaginationLookup','restoreRevision','model','revision-history-viewer-opened','_closeRevisionViewer','getRevisions','enqueueChange','refreshVisibility','getUser','creator','then','revisionHistory.viewerContainer','locale','restrictedEditingException','disableReadOnlyMode','uiLanguage','revisionHistory.closeRevisionViewerCallback','toLocaleDateString','addUser','name','removeSelectionAttribute','addRevisionData','isEnabled','revisionHistory','closeRevisionViewerCallback','long','push','users','block'];(function(_0x432e5b,_0x4fb08b){const _0x24034d=function(_0x248342){while(--_0x248342){_0x432e5b['push'](_0x432e5b['shift']());}};_0x24034d(++_0x4fb08b);}(_0x4fb0,0x17e));const _0x2403=function(_0x432e5b,_0x4fb08b){_0x432e5b=_0x432e5b-0x0;let _0x24034d=_0x4fb0[_0x432e5b];return _0x24034d;};import{Plugin as _0x5084fe}from'ckeditor5/src/core.js';import{CKEditorError as _0x3cd03f,uid as _0x12b2ab}from'ckeditor5/src/utils.js';import _0x396ee0 from'./revisiontracker.js';import _0x1d5b53 from'./ui/revisionhistory/revisionhistoryui.js';import _0x43c190 from'./revisionviewer.js';import _0x5015b9 from'./ui/revisionviewer/revisionviewerui.js';import _0x464292 from'./ui/revisionssidebar/revisionssidebar.js';import _0x49b937 from'./editor/revisionviewereditor.js';import{getTranslation as _0x2717fc}from'./utils/common-translations.js';import{sanitizeEditorConfig as _0x16a001}from'ckeditor5-collaboration/src/collaboration-core.js';const g=[_0x2403('0x17'),'RestrictedEditingMode'];class k extends _0x5084fe{static get[_0x2403('0x35')](){return _0x2403('0x1d');}constructor(_0xd2a27d){super(_0xd2a27d),this[_0x2403('0x1')]=_0x2403('0x3f');}}export default class b extends _0x5084fe{static get[_0x2403('0x35')](){return _0x2403('0x5d');}static get[_0x2403('0x2d')](){return[_0x396ee0,_0x1d5b53];}constructor(_0x10c3fe){if(super(_0x10c3fe),!this['editor'][_0x2403('0xd')][_0x2403('0x7')]('revisionHistory'))throw new _0x3cd03f(_0x2403('0x2e'),this);this[_0x2403('0x20')]=null,this[_0x2403('0xc')]['config'][_0x2403('0x5e')](_0x2403('0x31'),_0x27a519=>this[_0x2403('0x1c')](_0x27a519)),this[_0x2403('0xc')]['config'][_0x2403('0x5e')](_0x2403('0x50'),_0x527d2a=>this[_0x2403('0x44')](_0x527d2a)),this[_0x2403('0xc')]['config']['define'](_0x2403('0x15'),_0x198972=>this['_restoreRevision'](_0x198972)),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set[_0x2403('0x8')](_0x356da3){this[_0x2403('0xc')]['plugins']['get']('RevisionTracker')[_0x2403('0x8')]=_0x356da3;}get[_0x2403('0x8')](){return this[_0x2403('0xc')][_0x2403('0x2a')][_0x2403('0x7')](_0x2403('0x3e'))[_0x2403('0x8')];}[_0x2403('0x55')](_0x428718){return this[_0x2403('0xc')][_0x2403('0x2a')][_0x2403('0x7')](_0x2403('0x3e'))['addRevisionData'](_0x428718);}[_0x2403('0x1b')](_0x5f457c){return this[_0x2403('0xc')][_0x2403('0x2a')]['get'](_0x2403('0x33'))[_0x2403('0x1b')](_0x5f457c);}[_0x2403('0x45')](_0xb2d023={'toJSON':!0x1}){return this['editor'][_0x2403('0x2a')][_0x2403('0x7')](_0x2403('0x33'))[_0x2403('0x45')](_0xb2d023);}[_0x2403('0xf')](){const _0x116479=this[_0x2403('0xc')],_0x3dfb11=_0x16a001(_0x116479,g),_0x1ffa9c=_0x116479[_0x2403('0x2a')]['get']('RevisionTracker'),_0x35c8ec=_0x116479['plugins'][_0x2403('0x7')](_0x2403('0x28'))[_0x2403('0x5b')];return _0x3dfb11[_0x2403('0x2')]=['exitToEditing',_0x2403('0x41'),'changesNavigation'],(_0x3dfb11[_0x2403('0x2a')][_0x2403('0x5a')](k,_0x43c190,_0x5015b9,class extends _0x5084fe{static get[_0x2403('0x2d')](){return[_0x43c190,_0x2403('0x28')];}['init'](){const _0xbf15da=this[_0x2403('0xc')][_0x2403('0x2a')][_0x2403('0x7')](_0x2403('0x28'));for(const _0x11c771 of _0x35c8ec)_0x11c771[_0x2403('0x29')]||_0xbf15da[_0x2403('0x48')](_0x11c771['id'])||_0xbf15da[_0x2403('0x52')](_0x11c771);const _0x2d4958=_0x1ffa9c[_0x2403('0x10')][_0x2403('0x45')]();let _0x475074=null;const _0x4d30c8=this[_0x2403('0xc')][_0x2403('0x2a')]['get'](_0x2403('0x1a'));_0x4d30c8[_0x2403('0x8')]=_0x1ffa9c[_0x2403('0x8')],_0x4d30c8[_0x2403('0x13')](_0x2403('0x56'))['to'](_0x1ffa9c),this[_0x2403('0xc')]['commands'][_0x2403('0x7')](_0x2403('0x41'))[_0x2403('0x13')](_0x2403('0x56'))['to'](_0x116479,_0x2403('0x11'),_0x2a3eda=>!_0x2a3eda);for(const _0x24199f of _0x2d4958){const _0x18ab29=null===_0x24199f[_0x2403('0x49')];if(_0x18ab29&&_0x24199f[_0x2403('0x3d')]===_0x24199f['fromVersion'])continue;const _0x46dc98=_0x24199f[_0x2403('0x6')]();_0x4d30c8['addRevisionData'](_0x46dc98,(_0x1e566a,_0x2c8c92,_0x32855b)=>{if(_0x18ab29){if(_0x475074)_0x475074[_0x2403('0x30')](_0x1e566a,_0x2c8c92);else{if(!_0x2c8c92){const _0x318022=_0x32855b[_0x2403('0x6')]();_0x318022['id']=_0x12b2ab(),_0x1ffa9c[_0x2403('0xa')](_0x318022,_0x32855b[_0x2403('0x3d')])[_0x2403('0x4a')](_0x1a1bc9=>{_0x475074=_0x1a1bc9;});}}}else _0x24199f[_0x2403('0x30')](_0x1e566a,_0x2c8c92);});}}},_0x464292),_0x3dfb11);}[_0x2403('0x18')](){const _0x15adec=this[_0x2403('0xc')][_0x2403('0xd')]['get'](_0x2403('0x57'))['showRevisionViewerCallback'];this['editor'][_0x2403('0xd')][_0x2403('0x36')](_0x2403('0x31'),async()=>{this[_0x2403('0xc')][_0x2403('0x37')](_0x2403('0x43'));const _0x1c07aa=this[_0x2403('0xc')]['plugins'][_0x2403('0x7')](_0x2403('0x3e'));if(this[_0x2403('0xc')][_0x2403('0x2a')][_0x2403('0x22')](_0x2403('0x39'))){const _0x13d03f=this[_0x2403('0xc')]['plugins'][_0x2403('0x7')](_0x2403('0x39'));await _0x13d03f[_0x2403('0x21')]();}else await _0x1c07aa['update']();this[_0x2403('0xc')]['plugins'][_0x2403('0x22')]('PaginationLookup')&&this[_0x2403('0xc')][_0x2403('0x2a')]['get'](_0x2403('0x40'))['_recalculatePageBreaks']();const _0x591f81=this[_0x2403('0xf')]();return _0x15adec(_0x591f81)['then'](_0x2e78e7=>{return(this[_0x2403('0x20')]=_0x2e78e7,this[_0x2403('0xc')][_0x2403('0x2a')][_0x2403('0x22')](_0x2403('0x3c')))&&this[_0x2403('0xc')]['plugins'][_0x2403('0x7')]('Annotations')[_0x2403('0x47')](),_0x2e78e7;})['catch'](_0x4244dd=>(console[_0x2403('0xe')](_0x4244dd),this[_0x2403('0xc')]['disableReadOnlyMode'](_0x2403('0x43')),null));});}[_0x2403('0x1f')](){const _0x25538a=this['editor'][_0x2403('0xd')][_0x2403('0x7')](_0x2403('0x57'))['closeRevisionViewerCallback'];this[_0x2403('0xc')]['config'][_0x2403('0x36')]('revisionHistory.closeRevisionViewerCallback',()=>(this[_0x2403('0xc')][_0x2403('0x2a')][_0x2403('0x22')](_0x2403('0x40'))&&this[_0x2403('0xc')][_0x2403('0x2a')][_0x2403('0x7')](_0x2403('0x40'))[_0x2403('0x32')](),this[_0x2403('0x20')][_0x2403('0x2a')][_0x2403('0x7')](_0x2403('0x1a'))[_0x2403('0x23')](),_0x25538a(this[_0x2403('0x20')])[_0x2403('0x4a')](()=>{if(this[_0x2403('0xc')][_0x2403('0x4e')]('revision-history-viewer-opened'),this[_0x2403('0x20')]=null,this[_0x2403('0xc')][_0x2403('0x2a')][_0x2403('0x22')](_0x2403('0x3c'))){const _0x449bd1=this[_0x2403('0xc')][_0x2403('0x2a')][_0x2403('0x7')]('Annotations');_0x449bd1[_0x2403('0x47')](),_0x449bd1[_0x2403('0x27')]();}})));}[_0x2403('0x1c')](_0x416313){const _0x43386a=this['editor'][_0x2403('0xd')][_0x2403('0x7')](_0x2403('0x26')),_0x4c2e9c=this['editor'][_0x2403('0xd')][_0x2403('0x7')]('revisionHistory.viewerContainer'),_0x95aef8=this[_0x2403('0xc')][_0x2403('0xd')][_0x2403('0x7')](_0x2403('0x2c'));return _0x49b937['create'](_0x95aef8,_0x416313)[_0x2403('0x4a')](_0x328c7a=>(_0x4c2e9c['style'][_0x2403('0x38')]=_0x2403('0x5c'),_0x43386a[_0x2403('0x12')]['display']=_0x2403('0x24'),_0x328c7a));}[_0x2403('0x44')](_0x580e13){const _0x460c8f=this[_0x2403('0xc')]['config']['get']('revisionHistory.editorContainer');return this[_0x2403('0xc')][_0x2403('0xd')][_0x2403('0x7')](_0x2403('0x4b'))[_0x2403('0x12')][_0x2403('0x38')]='none',_0x460c8f[_0x2403('0x12')][_0x2403('0x38')]='',_0x580e13[_0x2403('0x34')]();}async['_restoreRevision'](_0x59fe13){const _0x395b7a=this[_0x2403('0xc')],_0x36c57a=this['_viewerEditor'][_0x2403('0x2a')][_0x2403('0x7')]('RevisionViewer'),_0xcc63b9=_0x395b7a[_0x2403('0x2a')][_0x2403('0x7')](_0x2403('0x3e')),_0x9be45a=_0x36c57a['repository'][_0x2403('0x1b')](_0x59fe13);let _0x3f04aa,_0x4b4a33,_0x224f43;try{_0x3f04aa=await _0x36c57a[_0x2403('0x2f')](_0x9be45a),_0x4b4a33=await _0x36c57a['getRevisionRootsAttributes'](_0x9be45a);}catch(_0x30f4ff){return void console['error'](_0x30f4ff);}_0x395b7a[_0x2403('0x42')][_0x2403('0x5')](_0x11f007=>{for(const _0x41931a of Array[_0x2403('0x0')](_0x395b7a[_0x2403('0x42')][_0x2403('0x19')]['getMarkersGroup'](_0x2403('0x4d'))))_0x11f007['removeMarker'](_0x41931a);}),_0x36c57a[_0x2403('0x3a')]=!0x1,_0x395b7a['model'][_0x2403('0x46')](_0x4e2592=>{_0x4e2592[_0x2403('0x14')](null),_0x4e2592[_0x2403('0x54')](_0x395b7a['model']['document'][_0x2403('0x25')]['getAttributeKeys']());for(const _0x177aa1 of _0x395b7a['model']['document']['getRootNames']())_0x4e2592[_0x2403('0x16')](_0x177aa1);for(const _0x4fb118 of Object[_0x2403('0x2b')](_0x3f04aa)){const _0x5237f3=_0x4e2592['addRoot'](_0x4fb118);for(const _0x35ccf0 of Object[_0x2403('0x2b')](_0x4b4a33[_0x4fb118]))_0x4e2592['setAttribute'](_0x35ccf0,_0x4b4a33[_0x4fb118][_0x35ccf0],_0x5237f3);_0x4e2592[_0x2403('0x9')](_0x395b7a[_0x2403('0x3')][_0x2403('0x3b')](_0x3f04aa[_0x4fb118],_0x5237f3),_0x5237f3,0x0);}});const _0x259631=_0x2717fc(_0x395b7a[_0x2403('0x4c')],'Restored');if(_0x9be45a[_0x2403('0x53')])_0x224f43=-0x1==_0x9be45a[_0x2403('0x53')][_0x2403('0xb')](_0x259631)?_0x259631+':\x20'+_0x9be45a[_0x2403('0x53')]:_0x9be45a[_0x2403('0x53')];else _0x224f43=_0x259631+':\x20'+(_0x9be45a[_0x2403('0x1e')][_0x2403('0x51')](_0x395b7a[_0x2403('0x4c')][_0x2403('0x4f')],{'month':_0x2403('0x59'),'day':_0x2403('0x4')})+',\x20'+_0x9be45a['createdAt']['toLocaleTimeString'](_0x395b7a['locale'][_0x2403('0x4f')],{'hour':_0x2403('0x4'),'minute':_0x2403('0x4')}));return await _0xcc63b9[_0x2403('0xa')]({'name':_0x224f43}),_0x36c57a['isReady']=!0x0,_0x395b7a[_0x2403('0xd')]['get'](_0x2403('0x57'))[_0x2403('0x58')]();}}
@@ -1,60 +1,60 @@
1
- /**
2
- * @module revision-history/revisionhistoryadapter
3
- * @publicApi
4
- */
5
- import type { RevisionData } from './revision';
6
- /**
7
- * The revision history adapter.
8
- *
9
- * The revision history adapter is an object that communicates asynchronously with the data source to fetch or save
10
- * the revisions data. It is used internally by the revision history feature whenever revision data is required, a revision is created,
11
- * or updated.
12
- *
13
- * The adapter is optional. See the {@glink features/collaboration/revision-history/revision-history-integration
14
- * Revision history feature integration} guide to learn more.
15
- *
16
- * To set the adapter, overwrite the {@link module:revision-history/revisionhistory~RevisionHistory#adapter `RevisionHistory#adapter`}
17
- * property.
18
- */
19
- export interface RevisionHistoryAdapter {
20
- /**
21
- * Called when the full revision data is required.
22
- *
23
- * It should return a promise that resolves with the whole revision data.
24
- */
25
- getRevision(data: {
26
- revisionId: string;
27
- channelId: string;
28
- }): Promise<RevisionData>;
29
- /**
30
- * Called when revision(s) data is added or updated.
31
- *
32
- * Multiple revisions can be added and updated at the same moment. The method is passed an array with the updated data.
33
- * Each item in the array is a data object that describes a single revision. Each data object contains revision id. If the revision
34
- * id does not exist in your data source (database), then a new revision should be created. Otherwise, the existing revision
35
- * should be updated with passed data.
36
- *
37
- * The method should return a promise that is resolved when the update is completed.
38
- *
39
- * The `data` parameter only contains those properties of a revision that have changed.
40
- *
41
- * Although the `data` parameter contains `createdAt` property,
42
- * the revision creation date should be set by the backend of your application
43
- * to ensure that all revisions will be saved with correct dates regardless of users' local system time.
44
- * It is recommended to overwrite `createdAt` value whenever it is passed in the `data` parameter.
45
- *
46
- * The promise may resolve with an array of objects. Each object represents an updated revision, for which `createdAt` property
47
- * was set (or changed) on the backend. Each object should have `id` (string) and `createdAt` (`Date` object) properties.
48
- * The returned data will be used to update revisions data in the editor with dates set on the backend.
49
- *
50
- * Although the `data` parameter contains `creatorId` property, you should verify the `creatorId` value when saving a revision
51
- * in the database. **However, do not overwrite the value if it was set to `null`!**
52
- *
53
- * It is recommended to stringify `data.diffData` and `data.attributes` values to JSON and save them as strings in your database,
54
- * and then to parse the strings when loading revisions.
55
- *
56
- * @param data Array with revisions data to add or update.
57
- * @param channelId The ID of the document for which the revisions were created.
58
- */
59
- updateRevisions(data: Array<RevisionData>, channelId: string): Promise<Array<RevisionData>>;
60
- }
1
+ /**
2
+ * @module revision-history/revisionhistoryadapter
3
+ * @publicApi
4
+ */
5
+ import type { RevisionData } from './revision.js';
6
+ /**
7
+ * The revision history adapter.
8
+ *
9
+ * The revision history adapter is an object that communicates asynchronously with the data source to fetch or save
10
+ * the revisions data. It is used internally by the revision history feature whenever revision data is required, a revision is created,
11
+ * or updated.
12
+ *
13
+ * The adapter is optional. See the {@glink features/collaboration/revision-history/revision-history-integration
14
+ * Revision history feature integration} guide to learn more.
15
+ *
16
+ * To set the adapter, overwrite the {@link module:revision-history/revisionhistory~RevisionHistory#adapter `RevisionHistory#adapter`}
17
+ * property.
18
+ */
19
+ export interface RevisionHistoryAdapter {
20
+ /**
21
+ * Called when the full revision data is required.
22
+ *
23
+ * It should return a promise that resolves with the whole revision data.
24
+ */
25
+ getRevision(data: {
26
+ revisionId: string;
27
+ channelId: string;
28
+ }): Promise<RevisionData>;
29
+ /**
30
+ * Called when revision(s) data is added or updated.
31
+ *
32
+ * Multiple revisions can be added and updated at the same moment. The method is passed an array with the updated data.
33
+ * Each item in the array is a data object that describes a single revision. Each data object contains revision id. If the revision
34
+ * id does not exist in your data source (database), then a new revision should be created. Otherwise, the existing revision
35
+ * should be updated with passed data.
36
+ *
37
+ * The method should return a promise that is resolved when the update is completed.
38
+ *
39
+ * The `data` parameter only contains those properties of a revision that have changed.
40
+ *
41
+ * Although the `data` parameter contains `createdAt` property,
42
+ * the revision creation date should be set by the backend of your application
43
+ * to ensure that all revisions will be saved with correct dates regardless of users' local system time.
44
+ * It is recommended to overwrite `createdAt` value whenever it is passed in the `data` parameter.
45
+ *
46
+ * The promise may resolve with an array of objects. Each object represents an updated revision, for which `createdAt` property
47
+ * was set (or changed) on the backend. Each object should have `id` (string) and `createdAt` (`Date` object) properties.
48
+ * The returned data will be used to update revisions data in the editor with dates set on the backend.
49
+ *
50
+ * Although the `data` parameter contains `creatorId` property, you should verify the `creatorId` value when saving a revision
51
+ * in the database. **However, do not overwrite the value if it was set to `null`!**
52
+ *
53
+ * It is recommended to stringify `data.diffData` and `data.attributes` values to JSON and save them as strings in your database,
54
+ * and then to parse the strings when loading revisions.
55
+ *
56
+ * @param data Array with revisions data to add or update.
57
+ * @param channelId The ID of the document for which the revisions were created.
58
+ */
59
+ updateRevisions(data: Array<RevisionData>, channelId: string): Promise<Array<RevisionData>>;
60
+ }
@@ -1,60 +1,60 @@
1
- /**
2
- * @module revision-history/revisionhistoryconfig
3
- * @publicApi
4
- */
5
- /**
6
- * The configuration of the revision history feature.
7
- *
8
- * ```ts
9
- * ClassicEditor
10
- * .create( {
11
- * revisionHistory: ... // Revision history feature configuration.
12
- * } )
13
- * .then( ... )
14
- * .catch( ... );
15
- * ```
16
- *
17
- * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
18
- */
19
- export interface RevisionHistoryConfig {
20
- /**
21
- * The DOM element that contains the DOM structure for the editor.
22
- *
23
- * This element will be hidden when the user opens the revision history.
24
- */
25
- editorContainer: HTMLElement;
26
- /**
27
- * DOM element which contains the DOM structure for revision history viewer.
28
- *
29
- * This element should be hidden (using CSS) when the editor is initialized.
30
- * This element will be shown when the user opens the revision history viewer.
31
- */
32
- viewerContainer: HTMLElement;
33
- /**
34
- * The DOM element for the revision history viewer editor instance.
35
- *
36
- * This element will be used to initialize the revision history viewer editor instance and will be replaced by it. It should be empty.
37
- */
38
- viewerEditorElement: HTMLElement;
39
- /**
40
- * The DOM element for the revision history viewer sidebar container.
41
- *
42
- * This element will be used as a container for the revision history viewer. The sidebar content will be inserted into it.
43
- */
44
- viewerSidebarContainer: HTMLElement;
45
- /**
46
- * Tells the feature whether it should resume updating previously unsaved revision or should save the previously unsaved revision
47
- * and create a new revision for the changes that will be introduced after the editor is initialized.
48
- *
49
- * By default, the previously unsaved revision is resumed after the editor is initialized.
50
- *
51
- * Note that only unsaved revision can be resumed.
52
- *
53
- * Note that for real-time collaboration, the unsaved revision will be always resumed if the real-time editing session is still active.
54
- * In other words, even if this is set to `false`, the unsaved revision will be resumed, if the editing session did not end since the
55
- * editor was re-initialized. Keep in mind that
56
- * {@glink @cs guides/collaboration/data#temporary-and-permanent-data the editing session is active a long time} after the last user
57
- * leaves the document.
58
- */
59
- resumeUnsavedRevision: boolean;
60
- }
1
+ /**
2
+ * @module revision-history/revisionhistoryconfig
3
+ * @publicApi
4
+ */
5
+ /**
6
+ * The configuration of the revision history feature.
7
+ *
8
+ * ```ts
9
+ * ClassicEditor
10
+ * .create( {
11
+ * revisionHistory: ... // Revision history feature configuration.
12
+ * } )
13
+ * .then( ... )
14
+ * .catch( ... );
15
+ * ```
16
+ *
17
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
18
+ */
19
+ export interface RevisionHistoryConfig {
20
+ /**
21
+ * The DOM element that contains the DOM structure for the editor.
22
+ *
23
+ * This element will be hidden when the user opens the revision history.
24
+ */
25
+ editorContainer: HTMLElement;
26
+ /**
27
+ * DOM element which contains the DOM structure for revision history viewer.
28
+ *
29
+ * This element should be hidden (using CSS) when the editor is initialized.
30
+ * This element will be shown when the user opens the revision history viewer.
31
+ */
32
+ viewerContainer: HTMLElement;
33
+ /**
34
+ * The DOM element for the revision history viewer editor instance.
35
+ *
36
+ * This element will be used to initialize the revision history viewer editor instance and will be replaced by it. It should be empty.
37
+ */
38
+ viewerEditorElement: HTMLElement;
39
+ /**
40
+ * The DOM element for the revision history viewer sidebar container.
41
+ *
42
+ * This element will be used as a container for the revision history viewer. The sidebar content will be inserted into it.
43
+ */
44
+ viewerSidebarContainer: HTMLElement;
45
+ /**
46
+ * Tells the feature whether it should resume updating previously unsaved revision or should save the previously unsaved revision
47
+ * and create a new revision for the changes that will be introduced after the editor is initialized.
48
+ *
49
+ * By default, the previously unsaved revision is resumed after the editor is initialized.
50
+ *
51
+ * Note that only unsaved revision can be resumed.
52
+ *
53
+ * Note that for real-time collaboration, the unsaved revision will be always resumed if the real-time editing session is still active.
54
+ * In other words, even if this is set to `false`, the unsaved revision will be resumed, if the editing session did not end since the
55
+ * editor was re-initialized. Keep in mind that
56
+ * {@glink @cs guides/collaboration/data#temporary-and-permanent-data the editing session is active a long time} after the last user
57
+ * leaves the document.
58
+ */
59
+ resumeUnsavedRevision: boolean;
60
+ }
@@ -1,48 +1,48 @@
1
- /**
2
- * @module revision-history/revisionsrepository
3
- * @publicApi
4
- */
5
- import { Users } from 'ckeditor5-collaboration/src/collaboration-core';
6
- import { Plugin, type Editor } from 'ckeditor5/src/core';
7
- import { default as Revision, type RevisionData, type RevisionJSON } from './revision';
8
- /**
9
- * Manages revisions list.
10
- */
11
- export default class RevisionsRepository extends Plugin {
12
- static get requires(): readonly [typeof Users];
13
- static get pluginName(): "RevisionsRepository";
14
- get length(): number;
15
- constructor(editor: Editor);
16
- /**
17
- * @inheritDoc
18
- */
19
- afterInit(): void;
20
- /**
21
- * Creates a revision instance from plain object with revision data.
22
- */
23
- createRevision(revisionData: RevisionData): Revision;
24
- /**
25
- * Adds revision to the repository on a given index.
26
- *
27
- * @param revision The revision instance to add.
28
- * @param index Index on which the revision should be added. If not set, the revision will be added as the first revision.
29
- */
30
- addRevision(revision: Revision, index?: number): void;
31
- /**
32
- * Returns the revision with a given revision id or at a given index.
33
- */
34
- getRevision(revisionIdOrIndex: string | number): Revision | null;
35
- getRevisions(options: {
36
- toJSON: true;
37
- }): Array<RevisionJSON>;
38
- getRevisions(options?: {
39
- toJSON: false;
40
- }): Array<Revision>;
41
- getRevisions(options: {
42
- toJSON: boolean;
43
- }): Array<Revision> | Array<RevisionJSON>;
44
- /**
45
- * Returns the index of the revision with a given revision id.
46
- */
47
- getIndex(revisionId: string | Revision): number;
48
- }
1
+ /**
2
+ * @module revision-history/revisionsrepository
3
+ * @publicApi
4
+ */
5
+ import { Users } from 'ckeditor5-collaboration';
6
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
7
+ import { default as Revision, type RevisionData, type RevisionJSON } from './revision.js';
8
+ /**
9
+ * Manages revisions list.
10
+ */
11
+ export default class RevisionsRepository extends Plugin {
12
+ static get requires(): readonly [typeof Users];
13
+ static get pluginName(): "RevisionsRepository";
14
+ get length(): number;
15
+ constructor(editor: Editor);
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ afterInit(): void;
20
+ /**
21
+ * Creates a revision instance from plain object with revision data.
22
+ */
23
+ createRevision(revisionData: RevisionData): Revision;
24
+ /**
25
+ * Adds revision to the repository on a given index.
26
+ *
27
+ * @param revision The revision instance to add.
28
+ * @param index Index on which the revision should be added. If not set, the revision will be added as the first revision.
29
+ */
30
+ addRevision(revision: Revision, index?: number): void;
31
+ /**
32
+ * Returns the revision with a given revision id or at a given index.
33
+ */
34
+ getRevision(revisionIdOrIndex: string | number): Revision | null;
35
+ getRevisions(options: {
36
+ toJSON: true;
37
+ }): Array<RevisionJSON>;
38
+ getRevisions(options?: {
39
+ toJSON: false;
40
+ }): Array<Revision>;
41
+ getRevisions(options: {
42
+ toJSON: boolean;
43
+ }): Array<Revision> | Array<RevisionJSON>;
44
+ /**
45
+ * Returns the index of the revision with a given revision id.
46
+ */
47
+ getIndex(revisionId: string | Revision): number;
48
+ }