@ckeditor/ckeditor5-revision-history 38.0.0 → 38.1.0

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 (39) hide show
  1. package/build/revision-history.js +1 -1
  2. package/package.json +13 -11
  3. package/src/changeitem.js +1 -1
  4. package/src/editor/revisionviewereditor.js +1 -1
  5. package/src/editor/revisionviewereditorui.js +1 -1
  6. package/src/editor/revisionviewereditoruiview.js +1 -1
  7. package/src/index.d.ts +1 -0
  8. package/src/revision.js +1 -1
  9. package/src/revisiondiff.js +1 -1
  10. package/src/revisionhistory.d.ts +5 -3
  11. package/src/revisionhistory.js +1 -1
  12. package/src/revisionsrepository.d.ts +8 -3
  13. package/src/revisionsrepository.js +1 -1
  14. package/src/revisiontracker.d.ts +8 -3
  15. package/src/revisiontracker.js +1 -1
  16. package/src/revisionviewer.js +1 -1
  17. package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
  18. package/src/ui/revision/revisionauthorview.js +1 -1
  19. package/src/ui/revision/revisionnameview.js +1 -1
  20. package/src/ui/revision/revisionview.js +1 -1
  21. package/src/ui/revision/subrevisioncollapserview.js +1 -1
  22. package/src/ui/revision/subrevisionview.js +1 -1
  23. package/src/ui/revision/utils.js +1 -1
  24. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
  25. package/src/ui/revisionhistory/revisionhistoryui.d.ts +4 -3
  26. package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
  27. package/src/ui/revisionssidebar/revisionssidebar.d.ts +4 -3
  28. package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
  29. package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
  30. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
  31. package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
  32. package/src/ui/revisionssidebar/utils.js +1 -1
  33. package/src/ui/revisionviewer/changedetailsview.js +1 -1
  34. package/src/ui/revisionviewer/changesnavigationview.js +1 -1
  35. package/src/ui/revisionviewer/revisionviewerloadingoverlay.d.ts +1 -1
  36. package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
  37. package/src/ui/revisionviewer/revisionviewerui.d.ts +5 -3
  38. package/src/ui/revisionviewer/revisionviewerui.js +1 -1
  39. package/src/utils/common-translations.js +1 -1
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-revision-history",
3
- "version": "38.0.0",
3
+ "version": "38.1.0",
4
4
  "description": "Document revision history feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
7
+ "bugs": {
8
+ "url": "https://support.ckeditor.com/hc/en-us/requests/new"
9
+ },
7
10
  "homepage": "https://ckeditor.com/collaboration/",
8
11
  "keywords": [
9
12
  "CKEditor",
@@ -24,11 +27,6 @@
24
27
  "versioning"
25
28
  ],
26
29
  "main": "src/index.js",
27
- "scripts": {
28
- "dll:build": "webpack",
29
- "build": "tsc -p ./tsconfig.json",
30
- "postversion": "npm run build"
31
- },
32
30
  "files": [
33
31
  "build",
34
32
  "lang",
@@ -39,14 +37,18 @@
39
37
  "CHANGELOG.md"
40
38
  ],
41
39
  "dependencies": {
42
- "@ckeditor/ckeditor5-editor-classic": "^38.0.0",
43
- "@ckeditor/ckeditor5-ui": "^38.0.0",
44
- "@ckeditor/ckeditor5-undo": "^38.0.0",
45
- "ckeditor5": "^38.0.0",
46
- "ckeditor5-collaboration": "^38.0.0",
40
+ "@ckeditor/ckeditor5-editor-classic": "38.1.0",
41
+ "@ckeditor/ckeditor5-ui": "38.1.0",
42
+ "@ckeditor/ckeditor5-undo": "38.1.0",
43
+ "ckeditor5": "38.1.0",
44
+ "ckeditor5-collaboration": "38.1.0",
47
45
  "lodash-es": "^4.17.15",
48
46
  "luxon": "^1.25.0"
49
47
  },
48
+ "engines": {
49
+ "node": ">=16.0.0",
50
+ "npm": ">=5.7.1"
51
+ },
50
52
  "types": "src/index.d.ts",
51
53
  "obfuscated": true
52
54
  }
package/src/changeitem.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x3c6b=['data','rootName','author','createdAt','toJSON','type','set'];(function(_0x3f981d,_0x3c6ba1){var _0xee4c71=function(_0x39fb3b){while(--_0x39fb3b){_0x3f981d['push'](_0x3f981d['shift']());}};_0xee4c71(++_0x3c6ba1);}(_0x3c6b,0x16f));var _0xee4c=function(_0x3f981d,_0x3c6ba1){_0x3f981d=_0x3f981d-0x0;var _0xee4c71=_0x3c6b[_0x3f981d];return _0xee4c71;};import{ObservableMixin as _0xa9e1ee,uid as _0x2ba44c}from'ckeditor5/src/utils';export default class r extends _0xa9e1ee(){constructor(_0x419551){super(),this['id']=_0x419551['id']||_0x2ba44c(),this[_0xee4c('0x6')]=_0x419551[_0xee4c('0x6')],this[_0xee4c('0x2')]=_0x419551[_0xee4c('0x2')],this[_0xee4c('0x4')]=_0x419551['data']||{},this[_0xee4c('0x5')]=_0x419551['rootName'],this[_0xee4c('0x3')]('createdAt',_0x419551['createdAt']);}[_0xee4c('0x1')](){return{'id':this['id'],'authorId':this[_0xee4c('0x6')]['id'],'type':this[_0xee4c('0x2')],'data':this[_0xee4c('0x4')],'createdAt':this[_0xee4c('0x0')]};}}
23
+ var _0x12a8=['type','rootName','author','toJSON','data','createdAt'];(function(_0x189bdf,_0x12a87d){var _0x108a5e=function(_0x4f4467){while(--_0x4f4467){_0x189bdf['push'](_0x189bdf['shift']());}};_0x108a5e(++_0x12a87d);}(_0x12a8,0xcb));var _0x108a=function(_0x189bdf,_0x12a87d){_0x189bdf=_0x189bdf-0x0;var _0x108a5e=_0x12a8[_0x189bdf];return _0x108a5e;};import{ObservableMixin as _0x4049c3,uid as _0x5cfbc4}from'ckeditor5/src/utils';export default class r extends _0x4049c3(){constructor(_0x3c538d){super(),this['id']=_0x3c538d['id']||_0x5cfbc4(),this[_0x108a('0x3')]=_0x3c538d[_0x108a('0x3')],this[_0x108a('0x1')]=_0x3c538d[_0x108a('0x1')],this['data']=_0x3c538d['data']||{},this[_0x108a('0x2')]=_0x3c538d['rootName'],this['set']('createdAt',_0x3c538d[_0x108a('0x0')]);}[_0x108a('0x4')](){return{'id':this['id'],'authorId':this[_0x108a('0x3')]['id'],'type':this[_0x108a('0x1')],'data':this[_0x108a('0x5')],'createdAt':this['createdAt']};}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1218=['fire','init','get','initPlugins','_ui','createRoot','editing','sourceElement','ready','config','destroy','initialData','model'];(function(_0x1c1539,_0x121819){const _0xeb2499=function(_0x4045cb){while(--_0x4045cb){_0x1c1539['push'](_0x1c1539['shift']());}};_0xeb2499(++_0x121819);}(_0x1218,0xda));const _0xeb24=function(_0x1c1539,_0x121819){_0x1c1539=_0x1c1539-0x0;let _0xeb2499=_0x1218[_0x1c1539];return _0xeb2499;};import{Editor as _0x36885c,DataApiMixin as _0x1befe2,ElementApiMixin as _0x1db182}from'ckeditor5/src/core';import _0x1e700e from'./revisionviewereditorui';import _0x120093 from'./revisionviewereditoruiview';export default class R extends _0x1befe2(_0x1db182(_0x36885c)){get['ui'](){return this[_0xeb24('0x7')];}constructor(_0x90e5c5,_0x36a4a9){super(_0x36a4a9),this[_0xeb24('0xa')]=_0x90e5c5,this[_0xeb24('0x2')]['document'][_0xeb24('0x8')]();const _0x4e5360=new _0x120093(this['locale'],this[_0xeb24('0x9')]['view'],{'shouldToolbarGroupWhenFull':!0x0});this[_0xeb24('0x7')]=new _0x1e700e(this,_0x4e5360);}[_0xeb24('0x0')](){return this['updateSourceElement'](),this['ui'][_0xeb24('0x0')](),super[_0xeb24('0x0')]();}static async['create'](_0x716410,_0xe65b6f){const _0xf497ed=new this(_0x716410,_0xe65b6f);return await _0xf497ed[_0xeb24('0x6')](),await _0xf497ed['ui'][_0xeb24('0x4')](_0x716410),await _0xf497ed['data'][_0xeb24('0x4')](_0xf497ed[_0xeb24('0xc')][_0xeb24('0x5')](_0xeb24('0x1'))||''),_0xf497ed[_0xeb24('0x3')](_0xeb24('0xb')),_0xf497ed;}}
23
+ const _0x14a1=['init','create','document','get','data','_ui','createRoot','fire','model','sourceElement','editing','view','config','initPlugins','destroy','initialData','locale','updateSourceElement'];(function(_0x1d9c1c,_0x14a198){const _0x4aafdc=function(_0x526456){while(--_0x526456){_0x1d9c1c['push'](_0x1d9c1c['shift']());}};_0x4aafdc(++_0x14a198);}(_0x14a1,0xe0));const _0x4aaf=function(_0x1d9c1c,_0x14a198){_0x1d9c1c=_0x1d9c1c-0x0;let _0x4aafdc=_0x14a1[_0x1d9c1c];return _0x4aafdc;};import{Editor as _0xede6e5,DataApiMixin as _0x25d427,ElementApiMixin as _0x5bc850}from'ckeditor5/src/core';import _0x3a7264 from'./revisionviewereditorui';import _0x4d1e52 from'./revisionviewereditoruiview';export default class y extends _0x25d427(_0x5bc850(_0xede6e5)){get['ui'](){return this[_0x4aaf('0xf')];}constructor(_0x4bff68,_0x185523){super(_0x185523),this[_0x4aaf('0x1')]=_0x4bff68,this[_0x4aaf('0x0')][_0x4aaf('0xc')][_0x4aaf('0x10')]();const _0x460bc3=new _0x4d1e52(this[_0x4aaf('0x8')],this[_0x4aaf('0x2')][_0x4aaf('0x3')],{'shouldToolbarGroupWhenFull':!0x0});this[_0x4aaf('0xf')]=new _0x3a7264(this,_0x460bc3);}[_0x4aaf('0x6')](){return this[_0x4aaf('0x9')](),this['ui'][_0x4aaf('0x6')](),super['destroy']();}static async[_0x4aaf('0xb')](_0x34f407,_0x354b93){const _0x254f5d=new this(_0x34f407,_0x354b93);return await _0x254f5d[_0x4aaf('0x5')](),await _0x254f5d['ui']['init'](_0x34f407),await _0x254f5d[_0x4aaf('0xe')][_0x4aaf('0xa')](_0x254f5d[_0x4aaf('0x4')][_0x4aaf('0xd')](_0x4aaf('0x7'))||''),_0x254f5d[_0x4aaf('0x11')]('ready'),_0x254f5d;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x20f5=['isActive','_initToolbar','config','view','editable','viewportOffset','detachDomRoot','limiterElement','_view','setEditableElement','viewportTopOffset','componentFactory','rootName','_elementReplacer','stickyPanel','isFocused','editing','get','ready','focusTracker','replace','document','bind','fire','element','addToolbar','_toolbarConfig','toolbar','init','attachDomRoot','destroy','getRoot','render','editor','name'];(function(_0x3a5cef,_0x20f568){const _0x6da935=function(_0x77f2e9){while(--_0x77f2e9){_0x3a5cef['push'](_0x3a5cef['shift']());}};_0x6da935(++_0x20f568);}(_0x20f5,0x159));const _0x6da9=function(_0x3a5cef,_0x20f568){_0x3a5cef=_0x3a5cef-0x0;let _0x6da935=_0x20f5[_0x3a5cef];return _0x6da935;};import{EditorUI as _0x226a2d,normalizeToolbarConfig as _0xefad98}from'ckeditor5/src/ui';import{ElementReplacer as _0x2d9958}from'ckeditor5/src/utils';export default class rt extends _0x226a2d{get[_0x6da9('0x8')](){return this[_0x6da9('0xd')];}constructor(_0x15c363,_0x28df82){super(_0x15c363),this[_0x6da9('0xd')]=_0x28df82,this['_toolbarConfig']=_0xefad98(_0x15c363[_0x6da9('0x7')][_0x6da9('0x16')](_0x6da9('0x20'))),this[_0x6da9('0x12')]=new _0x2d9958();}get[_0x6da9('0x1d')](){return this[_0x6da9('0x8')][_0x6da9('0x1d')];}[_0x6da9('0x21')](_0x7a35db){const _0x342fd2=this[_0x6da9('0x3')],_0x559ed5=this[_0x6da9('0x8')],_0x44b86f=_0x342fd2['editing'][_0x6da9('0x8')],_0x4d16c4=_0x559ed5[_0x6da9('0x9')],_0x15106d=_0x44b86f[_0x6da9('0x1a')][_0x6da9('0x1')]();_0x4d16c4['name']=_0x15106d[_0x6da9('0x11')],_0x559ed5[_0x6da9('0x2')]();const _0x107139=_0x4d16c4[_0x6da9('0x1d')];this[_0x6da9('0xe')](_0x4d16c4[_0x6da9('0x4')],_0x107139),_0x559ed5['editable'][_0x6da9('0x1b')]('isFocused')['to'](this[_0x6da9('0x18')]),_0x44b86f[_0x6da9('0x22')](_0x107139),this[_0x6da9('0x12')][_0x6da9('0x19')](_0x7a35db,this[_0x6da9('0x1d')]),this[_0x6da9('0x6')](),this[_0x6da9('0x1c')](_0x6da9('0x17'));}[_0x6da9('0x0')](){super[_0x6da9('0x0')]();const _0x3bd9b4=this[_0x6da9('0x8')],_0x885a2d=this[_0x6da9('0x3')][_0x6da9('0x15')][_0x6da9('0x8')];this[_0x6da9('0x12')]['restore'](),_0x885a2d[_0x6da9('0xb')](_0x3bd9b4[_0x6da9('0x9')]['name']),_0x3bd9b4[_0x6da9('0x0')]();}[_0x6da9('0x6')](){const _0x1f1553=this[_0x6da9('0x8')];_0x1f1553[_0x6da9('0x13')][_0x6da9('0x1b')](_0x6da9('0x5'))['to'](this[_0x6da9('0x18')],_0x6da9('0x14')),_0x1f1553['stickyPanel'][_0x6da9('0xc')]=_0x1f1553[_0x6da9('0x1d')],_0x1f1553['stickyPanel'][_0x6da9('0x1b')](_0x6da9('0xf'))['to'](this,_0x6da9('0xa'),({top:_0x5c8eff})=>_0x5c8eff),_0x1f1553['toolbar']['fillFromConfig'](this[_0x6da9('0x1f')],this[_0x6da9('0x10')]),this[_0x6da9('0x1e')](_0x1f1553[_0x6da9('0x20')]);}}
23
+ const _0x1c1a=['toolbar','attachDomRoot','destroy','editable','componentFactory','rootName','config','_elementReplacer','bind','fillFromConfig','focusTracker','_initToolbar','element','name','viewportTopOffset','init','_view','render','setEditableElement','fire','isActive','editing','_toolbarConfig','detachDomRoot','limiterElement','stickyPanel','view','editor','isFocused','document','ready'];(function(_0x97222,_0x1c1a5e){const _0x2f9fbb=function(_0x484be9){while(--_0x484be9){_0x97222['push'](_0x97222['shift']());}};_0x2f9fbb(++_0x1c1a5e);}(_0x1c1a,0x66));const _0x2f9f=function(_0x97222,_0x1c1a5e){_0x97222=_0x97222-0x0;let _0x2f9fbb=_0x1c1a[_0x97222];return _0x2f9fbb;};import{EditorUI as _0x38fff8,normalizeToolbarConfig as _0x174f6c}from'ckeditor5/src/ui';import{ElementReplacer as _0x2631c0}from'ckeditor5/src/utils';export default class et extends _0x38fff8{get[_0x2f9f('0x11')](){return this[_0x2f9f('0x7')];}constructor(_0x33c19d,_0x122115){super(_0x33c19d),this[_0x2f9f('0x7')]=_0x122115,this['_toolbarConfig']=_0x174f6c(_0x33c19d[_0x2f9f('0x1c')]['get'](_0x2f9f('0x16'))),this[_0x2f9f('0x1d')]=new _0x2631c0();}get[_0x2f9f('0x3')](){return this['view'][_0x2f9f('0x3')];}[_0x2f9f('0x6')](_0x284092){const _0x527e48=this[_0x2f9f('0x12')],_0x1fe0af=this['view'],_0x165ff0=_0x527e48['editing'][_0x2f9f('0x11')],_0x6b61c4=_0x1fe0af[_0x2f9f('0x19')],_0x19d6e4=_0x165ff0[_0x2f9f('0x14')]['getRoot']();_0x6b61c4['name']=_0x19d6e4[_0x2f9f('0x1b')],_0x1fe0af[_0x2f9f('0x8')]();const _0x16e7b7=_0x6b61c4['element'];this[_0x2f9f('0x9')](_0x6b61c4[_0x2f9f('0x4')],_0x16e7b7),_0x1fe0af[_0x2f9f('0x19')]['bind'](_0x2f9f('0x13'))['to'](this[_0x2f9f('0x1')]),_0x165ff0[_0x2f9f('0x17')](_0x16e7b7),this[_0x2f9f('0x1d')]['replace'](_0x284092,this[_0x2f9f('0x3')]),this[_0x2f9f('0x2')](),this[_0x2f9f('0xa')](_0x2f9f('0x15'));}['destroy'](){super[_0x2f9f('0x18')]();const _0x339083=this[_0x2f9f('0x11')],_0x5093b0=this[_0x2f9f('0x12')][_0x2f9f('0xc')][_0x2f9f('0x11')];this['_elementReplacer']['restore'](),_0x5093b0[_0x2f9f('0xe')](_0x339083['editable'][_0x2f9f('0x4')]),_0x339083['destroy']();}[_0x2f9f('0x2')](){const _0x160475=this['view'];_0x160475['stickyPanel'][_0x2f9f('0x1e')](_0x2f9f('0xb'))['to'](this[_0x2f9f('0x1')],'isFocused'),_0x160475[_0x2f9f('0x10')][_0x2f9f('0xf')]=_0x160475[_0x2f9f('0x3')],_0x160475[_0x2f9f('0x10')]['bind'](_0x2f9f('0x5'))['to'](this,'viewportOffset',({top:_0x274d44})=>_0x274d44),_0x160475[_0x2f9f('0x16')][_0x2f9f('0x0')](this[_0x2f9f('0xd')],this[_0x2f9f('0x1a')]),this['addToolbar'](_0x160475['toolbar']);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x5d18=['top','main','_editable','toolbar','render','shouldToolbarGroupWhenFull','editable','add','content','stickyPanel'];(function(_0x1e9344,_0x5d18ea){var _0x30282e=function(_0xfd0efe){while(--_0xfd0efe){_0x1e9344['push'](_0x1e9344['shift']());}};_0x30282e(++_0x5d18ea);}(_0x5d18,0xe4));var _0x3028=function(_0x1e9344,_0x5d18ea){_0x1e9344=_0x1e9344-0x0;var _0x30282e=_0x5d18[_0x1e9344];return _0x30282e;};import{BoxedEditorUIView as _0x3fc122,InlineEditableUIView as _0x281943,StickyPanelView as _0xd24211,ToolbarView as _0x1ae1ca}from'ckeditor5/src/ui';import'@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css';export default class et extends _0x3fc122{get[_0x3028('0x8')](){return this['_editable'];}constructor(_0x40361c,_0x41cd7d,_0x5ee5af={}){super(_0x40361c),this['stickyPanel']=new _0xd24211(_0x40361c),this[_0x3028('0x5')]=new _0x1ae1ca(_0x40361c,{'shouldGroupWhenFull':_0x5ee5af[_0x3028('0x7')]}),this[_0x3028('0x4')]=new _0x281943(_0x40361c,_0x41cd7d);}[_0x3028('0x6')](){super[_0x3028('0x6')](),this[_0x3028('0x1')][_0x3028('0x0')][_0x3028('0x9')](this[_0x3028('0x5')]),this[_0x3028('0x2')]['add'](this[_0x3028('0x1')]),this[_0x3028('0x3')][_0x3028('0x9')](this[_0x3028('0x8')]);}}
23
+ var _0x3914=['editable','top','shouldToolbarGroupWhenFull','render','content','_editable','toolbar','main','stickyPanel','add'];(function(_0x34dfb0,_0x3914d3){var _0x470482=function(_0xe91fb3){while(--_0xe91fb3){_0x34dfb0['push'](_0x34dfb0['shift']());}};_0x470482(++_0x3914d3);}(_0x3914,0x142));var _0x4704=function(_0x34dfb0,_0x3914d3){_0x34dfb0=_0x34dfb0-0x0;var _0x470482=_0x3914[_0x34dfb0];return _0x470482;};import{BoxedEditorUIView as _0x351a60,InlineEditableUIView as _0x52b735,StickyPanelView as _0x5a25c7,ToolbarView as _0x436aa9}from'ckeditor5/src/ui';import'@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css';export default class st extends _0x351a60{get[_0x4704('0x8')](){return this[_0x4704('0x3')];}constructor(_0x3c3db2,_0xf0f24f,_0x57b30e={}){super(_0x3c3db2),this[_0x4704('0x6')]=new _0x5a25c7(_0x3c3db2),this['toolbar']=new _0x436aa9(_0x3c3db2,{'shouldGroupWhenFull':_0x57b30e[_0x4704('0x0')]}),this[_0x4704('0x3')]=new _0x52b735(_0x3c3db2,_0xf0f24f);}[_0x4704('0x1')](){super['render'](),this['stickyPanel'][_0x4704('0x2')][_0x4704('0x7')](this[_0x4704('0x4')]),this[_0x4704('0x9')]['add'](this['stickyPanel']),this[_0x4704('0x5')]['add'](this[_0x4704('0x8')]);}}
package/src/index.d.ts CHANGED
@@ -6,5 +6,6 @@ export { default as RevisionTracker } from './revisiontracker';
6
6
  export { default as RevisionViewer, type RestoreRevisionCommand, type ShowChangeCommand } from './revisionviewer';
7
7
  export { default as RevisionsSidebar } from './ui/revisionssidebar/revisionssidebar';
8
8
  export { default as RevisionViewerUI } from './ui/revisionviewer/revisionviewerui';
9
+ export type { RevisionData } from './revision';
9
10
  export type { RevisionHistoryConfig } from './revisionhistoryconfig';
10
11
  import './augmentation';
package/src/revision.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3600=['removeAttribute','attributes','authors','createdAt','setAttribute','name','_update','setName','creator','diffData','fire','set','fromVersion','map','toVersion'];(function(_0x313cf7,_0x36005b){const _0x9853f8=function(_0x5868f3){while(--_0x5868f3){_0x313cf7['push'](_0x313cf7['shift']());}};_0x9853f8(++_0x36005b);}(_0x3600,0x133));const _0x9853=function(_0x313cf7,_0x36005b){_0x313cf7=_0x313cf7-0x0;let _0x9853f8=_0x3600[_0x313cf7];return _0x9853f8;};import{ObservableMixin as _0x5b8579,uid as _0x534dd4}from'ckeditor5/src/utils';import{cloneDeep as _0x2af809,set as _0x5c7d04,unset as _0x109add}from'lodash-es';export default class a extends _0x5b8579(){constructor(_0x404171){super(),this['id']=_0x404171['id']||_0x534dd4(),this['creator']=_0x404171[_0x9853('0x1')]||null,this[_0x9853('0xa')]=_0x404171['authors']||[],this[_0x9853('0x2')]=_0x404171[_0x9853('0x2')]||null,this[_0x9853('0x7')]=_0x404171[_0x9853('0x7')]||0x0,this[_0x9853('0x5')]=_0x404171[_0x9853('0x5')]||0x0,this[_0x9853('0x4')]('name',_0x404171[_0x9853('0xd')]||''),this[_0x9853('0x4')](_0x9853('0xb'),_0x404171[_0x9853('0xb')]||new Date()),this[_0x9853('0x4')](_0x9853('0x9'),_0x404171['attributes']||{});}[_0x9853('0x0')](_0x50d320){this['_update']({'name':_0x50d320});}[_0x9853('0xc')](_0x4dd45a,_0x25dc74){const _0x3743ea=_0x2af809(this[_0x9853('0x9')]);_0x5c7d04(_0x3743ea,_0x4dd45a,_0x25dc74),this[_0x9853('0xe')]({'attributes':_0x3743ea});}[_0x9853('0x8')](_0x24f211){const _0x3b0a73=_0x2af809(this[_0x9853('0x9')]);_0x109add(_0x3b0a73,_0x24f211),this[_0x9853('0xe')]({'attributes':_0x3b0a73});}[_0x9853('0xe')](_0x507269,_0x2ae58d=!0x1){let _0x202680=!0x1;const _0x33dfe8={'id':this['id']},_0x5d14bc=[_0x9853('0xd'),_0x9853('0xb'),_0x9853('0x2'),_0x9853('0xa'),_0x9853('0x9'),_0x9853('0x7'),_0x9853('0x5'),'creatorId'];for(const _0x27213e of _0x5d14bc){const _0x3c088e=_0x507269[_0x27213e];void 0x0!==_0x3c088e&&_0x3c088e!==this[_0x27213e]&&(this[_0x27213e]=_0x3c088e,_0x33dfe8[_0x27213e]=_0x3c088e,_0x202680=!0x0);}_0x202680&&(_0x33dfe8['authors']&&(_0x33dfe8['authorsIds']=_0x33dfe8[_0x9853('0xa')][_0x9853('0x6')](_0x3f3917=>_0x3f3917['id']),delete _0x33dfe8[_0x9853('0xa')]),this[_0x9853('0x3')](_0x9853('0xe'),_0x33dfe8,_0x2ae58d));}['toJSON'](){return{'id':this['id'],'name':this[_0x9853('0xd')],'creatorId':this[_0x9853('0x1')]?this[_0x9853('0x1')]['id']:null,'authorsIds':this[_0x9853('0xa')]['map'](_0x335c94=>_0x335c94['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this[_0x9853('0x9')],'fromVersion':this[_0x9853('0x5')],'toVersion':this[_0x9853('0x7')]};}}
23
+ const _0x24e0=['toVersion','setName','createdAt','creatorId','fromVersion','map','setAttribute','_update','set','fire','attributes','removeAttribute','authors','authorsIds','diffData','name','creator'];(function(_0x227e42,_0x24e012){const _0x70a14d=function(_0x33a5d5){while(--_0x33a5d5){_0x227e42['push'](_0x227e42['shift']());}};_0x70a14d(++_0x24e012);}(_0x24e0,0xf5));const _0x70a1=function(_0x227e42,_0x24e012){_0x227e42=_0x227e42-0x0;let _0x70a14d=_0x24e0[_0x227e42];return _0x70a14d;};import{ObservableMixin as _0x25236b,uid as _0x10d858}from'ckeditor5/src/utils';import{cloneDeep as _0x3a9b53,set as _0xb36cda,unset as _0x51a257}from'lodash-es';export default class a extends _0x25236b(){constructor(_0x1eb581){super(),this['id']=_0x1eb581['id']||_0x10d858(),this[_0x70a1('0x9')]=_0x1eb581[_0x70a1('0x9')]||null,this[_0x70a1('0x5')]=_0x1eb581['authors']||[],this[_0x70a1('0x7')]=_0x1eb581[_0x70a1('0x7')]||null,this['toVersion']=_0x1eb581['toVersion']||0x0,this[_0x70a1('0xe')]=_0x1eb581[_0x70a1('0xe')]||0x0,this['set']('name',_0x1eb581[_0x70a1('0x8')]||''),this[_0x70a1('0x1')](_0x70a1('0xc'),_0x1eb581[_0x70a1('0xc')]||new Date()),this['set'](_0x70a1('0x3'),_0x1eb581[_0x70a1('0x3')]||{});}[_0x70a1('0xb')](_0x1755e5){this[_0x70a1('0x0')]({'name':_0x1755e5});}[_0x70a1('0x10')](_0x25805b,_0x2027b2){const _0x4fc11f=_0x3a9b53(this['attributes']);_0xb36cda(_0x4fc11f,_0x25805b,_0x2027b2),this['_update']({'attributes':_0x4fc11f});}[_0x70a1('0x4')](_0x11f3bb){const _0x27038e=_0x3a9b53(this['attributes']);_0x51a257(_0x27038e,_0x11f3bb),this[_0x70a1('0x0')]({'attributes':_0x27038e});}[_0x70a1('0x0')](_0x341630,_0x3cb6e7=!0x1){let _0x65bcc4=!0x1;const _0x15536a={'id':this['id']},_0x18b4e1=[_0x70a1('0x8'),_0x70a1('0xc'),_0x70a1('0x7'),'authors',_0x70a1('0x3'),_0x70a1('0xa'),_0x70a1('0xe'),_0x70a1('0xd')];for(const _0x11a9ec of _0x18b4e1){const _0x55ccae=_0x341630[_0x11a9ec];void 0x0!==_0x55ccae&&_0x55ccae!==this[_0x11a9ec]&&(this[_0x11a9ec]=_0x55ccae,_0x15536a[_0x11a9ec]=_0x55ccae,_0x65bcc4=!0x0);}_0x65bcc4&&(_0x15536a['authors']&&(_0x15536a[_0x70a1('0x6')]=_0x15536a[_0x70a1('0x5')]['map'](_0x46a620=>_0x46a620['id']),delete _0x15536a['authors']),this[_0x70a1('0x2')]('_update',_0x15536a,_0x3cb6e7));}['toJSON'](){return{'id':this['id'],'name':this[_0x70a1('0x8')],'creatorId':this['creator']?this[_0x70a1('0x9')]['id']:null,'authorsIds':this['authors'][_0x70a1('0xf')](_0x19e0c8=>_0x19e0c8['id']),'diffData':this[_0x70a1('0x7')],'createdAt':this[_0x70a1('0xc')],'attributes':this['attributes'],'fromVersion':this[_0x70a1('0xe')],'toVersion':this[_0x70a1('0xa')]};}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5679=['add','oldRevisionId','changes'];(function(_0x40a55c,_0x567992){const _0x543187=function(_0x19da55){while(--_0x19da55){_0x40a55c['push'](_0x40a55c['shift']());}};_0x543187(++_0x567992);}(_0x5679,0x173));const _0x5431=function(_0x40a55c,_0x567992){_0x40a55c=_0x40a55c-0x0;let _0x543187=_0x5679[_0x40a55c];return _0x543187;};import{Collection as _0x442e6e}from'ckeditor5/src/utils';export default class f{constructor(_0x13aaba,_0x4ef0fe){this['newRevisionId']=_0x13aaba,this[_0x5431('0x2')]=_0x4ef0fe,this['changes']=new _0x442e6e();}['_setChanges'](_0x115d76){for(const _0x5371dc of _0x115d76)this[_0x5431('0x0')][_0x5431('0x1')](_0x5371dc);}}
23
+ const _0x59dc=['changes','newRevisionId'];(function(_0x2b4cb2,_0x59dcbd){const _0x274659=function(_0x318430){while(--_0x318430){_0x2b4cb2['push'](_0x2b4cb2['shift']());}};_0x274659(++_0x59dcbd);}(_0x59dc,0x11a));const _0x2746=function(_0x2b4cb2,_0x59dcbd){_0x2b4cb2=_0x2b4cb2-0x0;let _0x274659=_0x59dc[_0x2b4cb2];return _0x274659;};import{Collection as _0x201f17}from'ckeditor5/src/utils';export default class f{constructor(_0x304454,_0x45408a){this[_0x2746('0x1')]=_0x304454,this['oldRevisionId']=_0x45408a,this['changes']=new _0x201f17();}['_setChanges'](_0x41f769){for(const _0xc47777 of _0x41f769)this[_0x2746('0x0')]['add'](_0xc47777);}}
@@ -2,8 +2,10 @@
2
2
  * @module revision-history/revisionhistory
3
3
  * @publicApi
4
4
  */
5
- import { Plugin, type PluginDependencies, type Editor } from 'ckeditor5/src/core';
5
+ import { Plugin, type Editor } from 'ckeditor5/src/core';
6
6
  import type { Item, Position } from 'ckeditor5/src/engine';
7
+ import RevisionTracker from './revisiontracker';
8
+ import RevisionHistoryUI from './ui/revisionhistory/revisionhistoryui';
7
9
  import type { default as Revision, RevisionJSON } from './revision';
8
10
  import type { RevisionHistoryAdapter } from './revisionhistoryadapter';
9
11
  /**
@@ -15,8 +17,8 @@ import type { RevisionHistoryAdapter } from './revisionhistoryadapter';
15
17
  * {@glink features/collaboration/revision-history/revision-history Revision history} guide.
16
18
  */
17
19
  export default class RevisionHistory extends Plugin {
18
- static get pluginName(): 'RevisionHistory';
19
- static get requires(): PluginDependencies;
20
+ static get pluginName(): "RevisionHistory";
21
+ static get requires(): readonly [typeof RevisionTracker, typeof RevisionHistoryUI];
20
22
  constructor(editor: Editor);
21
23
  /**
22
24
  * An adapter object that should communicate with the data source to fetch or save the revisions data.
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x26cd=['PaginationLookup','style','has','none','isAnonymous','save','RevisionHistory','revisionHistory','includes','RevisionTracker','locale','pluginName','commands','_getRevisionViewerEditorConfig','revisionHistory.closeRevisionViewerCallback','creator','long','Autosave','revisionHistory.viewerContainer','toLocaleTimeString','from','rootsAttributes','name','constructor','find','display','push','error','revisionHistory.viewerEditorElement','closeRevisionViewerCallback','concat','_recalculatePageBreaks','getUser','getRevisions','_update','RevisionsRepository','init','keys','restoreRevision','plugins','revisionHistory.showRevisionViewerCallback','numeric','RestrictedEditingMode','getRevisionRootsAttributes','create','refreshVisibility','model','isReadOnly','_restoreRevision','revision-history-viewer-opened','getRevision','change','RevisionHistoryUI','refreshPositioning','data','removeMarker','Users','config','toJSON','function','isReady','extraPlugins','get','_closeRevisionViewer','uiLanguage','initialData','setAttribute','document','markers','adapter','toVersion','RevisionViewer','set','define','insert','enqueueChange','createdAt','parse','WebSocketGateway','bind','indexOf','requires','editor','_viewerEditor','repository','_enhanceShowRevisionViewerCallback','saveRevision','addRevisionData','detachRoot','map','isEnabled','toLocaleDateString','revision-history-missing-configuration','fromVersion','toolbar','Annotations','removeSelectionAttribute','addRoot','users','_enhanceCloseRevisionViewerCallback','exitToEditing','getRevisionData','names','addUser','_showRevisionViewer','block','then','revisionHistory.editorContainer','disableReadOnlyMode','restrictedEditingException'];(function(_0x57434c,_0x26cdcc){const _0x464534=function(_0x3fd243){while(--_0x3fd243){_0x57434c['push'](_0x57434c['shift']());}};_0x464534(++_0x26cdcc);}(_0x26cd,0x1d2));const _0x4645=function(_0x57434c,_0x26cdcc){_0x57434c=_0x57434c-0x0;let _0x464534=_0x26cd[_0x57434c];return _0x464534;};import{Plugin as _0x41b8f6}from'ckeditor5/src/core';import{CKEditorError as _0x2db124,uid as _0x1bbc06}from'ckeditor5/src/utils';import _0x5258e9 from'./revisiontracker';import _0x4f0e41 from'./ui/revisionhistory/revisionhistoryui';import _0x141372 from'./revisionviewer';import _0x3d6931 from'./ui/revisionviewer/revisionviewerui';import _0x46cb32 from'./ui/revisionssidebar/revisionssidebar';import _0x3a223c from'./editor/revisionviewereditor';import{getTranslation as _0x49f1fc}from'./utils/common-translations';export default class p extends _0x41b8f6{static get[_0x4645('0x5f')](){return _0x4645('0x5a');}static get[_0x4645('0x37')](){return[_0x5258e9,_0x4f0e41];}constructor(_0x2082e2){if(super(_0x2082e2),!this[_0x4645('0x38')]['config'][_0x4645('0x24')](_0x4645('0x5b')))throw new _0x2db124(_0x4645('0x42'),this);this[_0x4645('0x39')]=null,this['editor'][_0x4645('0x1f')][_0x4645('0x2f')](_0x4645('0xe'),_0xf6f392=>this[_0x4645('0x4e')](_0xf6f392)),this[_0x4645('0x38')][_0x4645('0x1f')][_0x4645('0x2f')](_0x4645('0x62'),_0x54e137=>this[_0x4645('0x25')](_0x54e137)),this[_0x4645('0x38')][_0x4645('0x1f')][_0x4645('0x2f')]('revisionHistory.restoreRevisionCallback',_0x67ffa0=>this[_0x4645('0x16')](_0x67ffa0)),this[_0x4645('0x3b')](),this[_0x4645('0x49')]();}set[_0x4645('0x2b')](_0x34f4c4){this['editor'][_0x4645('0xd')][_0x4645('0x24')](_0x4645('0x5d'))[_0x4645('0x2b')]=_0x34f4c4;}get['adapter'](){return this[_0x4645('0x38')]['plugins']['get'](_0x4645('0x5d'))['adapter'];}[_0x4645('0x3d')](_0xf7ac9c){return this[_0x4645('0x38')][_0x4645('0xd')][_0x4645('0x24')]('RevisionTracker')[_0x4645('0x3d')](_0xf7ac9c);}[_0x4645('0x18')](_0x72d3a5){return this[_0x4645('0x38')][_0x4645('0xd')][_0x4645('0x24')](_0x4645('0x9'))[_0x4645('0x18')](_0x72d3a5);}[_0x4645('0x7')](_0x30ff0d={'toJSON':!0x1}){return this[_0x4645('0x38')][_0x4645('0xd')][_0x4645('0x24')]('RevisionsRepository')[_0x4645('0x7')](_0x30ff0d);}[_0x4645('0x61')](){const _0x389a8e=['context'],_0x3ae36b=[_0x4645('0x5d'),_0x4645('0x1a'),_0x4645('0x34'),_0x4645('0x10'),'Autosave','DocumentOutline'],_0xbf21dc={},_0x4a2d0a=this[_0x4645('0x38')],_0x19e73d=_0x4a2d0a[_0x4645('0xd')]['get'](_0x4645('0x5d')),_0x21b182=_0x4a2d0a[_0x4645('0xd')][_0x4645('0x24')](_0x4645('0x1e'))[_0x4645('0x48')];for(const _0x34e18e of _0x4a2d0a[_0x4645('0x1f')][_0x4645('0x4c')]())_0x389a8e[_0x4645('0x5c')](_0x34e18e)||(_0xbf21dc[_0x34e18e]=_0x4a2d0a[_0x4645('0x1f')][_0x4645('0x24')](_0x34e18e));delete _0xbf21dc[_0x4645('0x27')],delete _0xbf21dc[_0x4645('0x69')],_0xbf21dc[_0x4645('0x44')]=[_0x4645('0x4a'),_0x4645('0xc'),'changesNavigation'];const _0x16aaa9=this['editor'][_0x4645('0x6b')]['builtinPlugins']||[],_0x455887=_0xbf21dc[_0x4645('0x23')]||[];delete _0xbf21dc[_0x4645('0x23')];const _0x5b8544=_0x16aaa9[_0x4645('0x4')](_0xbf21dc[_0x4645('0xd')])['concat'](_0x455887)[_0x4645('0x3f')](_0x34ce93=>'string'==typeof _0x34ce93?_0x16aaa9[_0x4645('0x6c')](_0xfc900f=>_0xfc900f['pluginName']==_0x34ce93):_0x34ce93);let _0x1bcee0=!0x1;_0xbf21dc[_0x4645('0xd')]=Array[_0x4645('0x68')](new Set(_0x5b8544))['filter'](_0x8d706d=>_0x5e4917(_0x8d706d,_0x4a2d0a['plugins'],[])),_0x1bcee0&&_0xbf21dc[_0x4645('0xd')][_0x4645('0x0')](_0x4a2d0a[_0x4645('0xd')][_0x4645('0x24')](_0x4645('0x34'))[_0x4645('0x6b')]);function _0x5e4917(_0x59ec36,_0x4b5486,_0xc3b445){const _0x1d84c8=_0x4645('0x21')==typeof _0x59ec36?_0x59ec36[_0x4645('0x5f')]||_0x59ec36['name']:_0x59ec36;if(_0x4645('0x34')===_0x1d84c8&&(_0x1bcee0=!0x0),_0xc3b445[_0x4645('0x5c')](_0x1d84c8))return!0x0;if(_0xc3b445[_0x4645('0x0')](_0x1d84c8),_0x3ae36b[_0x4645('0x5c')](_0x1d84c8))return!0x1;const _0x45b7dc=((_0x4645('0x21')==typeof _0x59ec36?_0x59ec36:_0x4b5486[_0x4645('0x56')](_0x1d84c8)?_0x4b5486[_0x4645('0x24')](_0x1d84c8):{})[_0x4645('0x37')]||[])['every'](_0x13108f=>_0x5e4917(_0x13108f,_0x4b5486,_0xc3b445));return _0x45b7dc||_0x3ae36b[_0x4645('0x0')](_0x1d84c8),_0x45b7dc;}return _0xbf21dc[_0x4645('0xd')][_0x4645('0x0')](_0x141372,_0x3d6931,class extends _0x41b8f6{static get[_0x4645('0x37')](){return[_0x141372,_0x4645('0x1e')];}[_0x4645('0xa')](){const _0x501e25=this[_0x4645('0x38')][_0x4645('0xd')][_0x4645('0x24')]('Users');for(const _0xf462d8 of _0x21b182)_0xf462d8[_0x4645('0x58')]||_0x501e25[_0x4645('0x6')](_0xf462d8['id'])||_0x501e25[_0x4645('0x4d')](_0xf462d8);const _0x3eb60d=_0x19e73d[_0x4645('0x3a')][_0x4645('0x7')]();let _0x2ca5a5=null;const _0xfc7f5b=this[_0x4645('0x38')]['plugins'][_0x4645('0x24')](_0x4645('0x2d'));_0xfc7f5b['adapter']=_0x19e73d[_0x4645('0x2b')],_0xfc7f5b[_0x4645('0x35')](_0x4645('0x40'))['to'](_0x19e73d),this[_0x4645('0x38')][_0x4645('0x60')]['get'](_0x4645('0xc'))[_0x4645('0x35')]('isEnabled')['to'](_0x4a2d0a,_0x4645('0x15'),_0x49fdf8=>!_0x49fdf8);for(const _0x1dc7b6 of _0x3eb60d){const _0x4cf854=null===_0x1dc7b6[_0x4645('0x63')];if(_0x4cf854&&_0x1dc7b6[_0x4645('0x2c')]===_0x1dc7b6[_0x4645('0x43')])continue;const _0x5e7ddd=_0x1dc7b6[_0x4645('0x20')]();_0xfc7f5b[_0x4645('0x3d')](_0x5e7ddd,(_0x44fe03,_0x286bdc,_0x553bcf)=>{if(_0x4cf854){if(_0x2ca5a5)_0x2ca5a5[_0x4645('0x8')](_0x44fe03,_0x286bdc);else{if(!_0x286bdc){const _0x45e3bd=_0x553bcf[_0x4645('0x20')]();_0x45e3bd['id']=_0x1bbc06(),_0x19e73d[_0x4645('0x3c')](_0x45e3bd,_0x553bcf[_0x4645('0x2c')])['then'](_0x598885=>{_0x2ca5a5=_0x598885;});}}}else _0x1dc7b6[_0x4645('0x8')](_0x44fe03,_0x286bdc);});}}},_0x46cb32),_0xbf21dc;}[_0x4645('0x3b')](){const _0x5e5d8e=this['editor'][_0x4645('0x1f')][_0x4645('0x24')](_0x4645('0x5b'))['showRevisionViewerCallback'];this[_0x4645('0x38')][_0x4645('0x1f')][_0x4645('0x2e')](_0x4645('0xe'),async()=>{this[_0x4645('0x38')]['enableReadOnlyMode']('revision-history-viewer-opened');const _0x25b5e7=this[_0x4645('0x38')][_0x4645('0xd')][_0x4645('0x24')](_0x4645('0x5d'));if(this[_0x4645('0x38')][_0x4645('0xd')][_0x4645('0x56')]('Autosave')){const _0x5893f7=this[_0x4645('0x38')]['plugins'][_0x4645('0x24')](_0x4645('0x65'));await _0x5893f7[_0x4645('0x59')]();}else await _0x25b5e7['update']();this[_0x4645('0x38')][_0x4645('0xd')][_0x4645('0x56')]('PaginationLookup')&&this[_0x4645('0x38')][_0x4645('0xd')][_0x4645('0x24')](_0x4645('0x54'))[_0x4645('0x5')]();const _0x451a2c=this['_getRevisionViewerEditorConfig']();return _0x5e5d8e(_0x451a2c)[_0x4645('0x50')](_0x16aeac=>{return(this[_0x4645('0x39')]=_0x16aeac,this['editor']['plugins'][_0x4645('0x56')](_0x4645('0x45')))&&this[_0x4645('0x38')][_0x4645('0xd')][_0x4645('0x24')](_0x4645('0x45'))[_0x4645('0x13')](),_0x16aeac;})['catch'](_0x2679bc=>(console[_0x4645('0x1')](_0x2679bc),this['editor'][_0x4645('0x52')]('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4d8618=this[_0x4645('0x38')][_0x4645('0x1f')]['get'](_0x4645('0x5b'))['closeRevisionViewerCallback'];this[_0x4645('0x38')]['config']['set'](_0x4645('0x62'),()=>(this[_0x4645('0x38')][_0x4645('0xd')][_0x4645('0x56')](_0x4645('0x54'))&&this[_0x4645('0x38')]['plugins'][_0x4645('0x24')](_0x4645('0x54'))[_0x4645('0x5')](),this[_0x4645('0x39')][_0x4645('0xd')][_0x4645('0x24')](_0x4645('0x2d'))['_cleanUp'](),_0x4d8618(this[_0x4645('0x39')])[_0x4645('0x50')](()=>{if(this['editor'][_0x4645('0x52')](_0x4645('0x17')),this['_viewerEditor']=null,this['editor'][_0x4645('0xd')]['has'](_0x4645('0x45'))){const _0xc50b3b=this[_0x4645('0x38')][_0x4645('0xd')][_0x4645('0x24')](_0x4645('0x45'));_0xc50b3b[_0x4645('0x13')](),_0xc50b3b[_0x4645('0x1b')]();}})));}[_0x4645('0x4e')](_0xbff396){const _0x48ea87=this[_0x4645('0x38')][_0x4645('0x1f')]['get'](_0x4645('0x51')),_0xc78001=this['editor'][_0x4645('0x1f')][_0x4645('0x24')](_0x4645('0x66')),_0x42737d=this[_0x4645('0x38')][_0x4645('0x1f')][_0x4645('0x24')](_0x4645('0x2'));return _0x3a223c[_0x4645('0x12')](_0x42737d,_0xbff396)[_0x4645('0x50')](_0x2d7d34=>(_0xc78001['style'][_0x4645('0x6d')]=_0x4645('0x4f'),_0x48ea87[_0x4645('0x55')][_0x4645('0x6d')]=_0x4645('0x57'),_0x2d7d34));}[_0x4645('0x25')](_0x468238){const _0x5f5321=this[_0x4645('0x38')][_0x4645('0x1f')][_0x4645('0x24')]('revisionHistory.editorContainer');return this[_0x4645('0x38')][_0x4645('0x1f')][_0x4645('0x24')](_0x4645('0x66'))[_0x4645('0x55')][_0x4645('0x6d')]=_0x4645('0x57'),_0x5f5321['style'][_0x4645('0x6d')]='',_0x468238['destroy']();}async['_restoreRevision'](_0x323f9d){const _0x4e7982=this['editor'],_0x1c19bb=this[_0x4645('0x39')][_0x4645('0xd')]['get'](_0x4645('0x2d')),_0x3d2dea=_0x4e7982['plugins'][_0x4645('0x24')](_0x4645('0x5d')),_0x2892a1=_0x1c19bb[_0x4645('0x3a')]['getRevision'](_0x323f9d);let _0x204f50,_0x5a037b,_0x37ebec;try{_0x204f50=await _0x1c19bb[_0x4645('0x4b')](_0x2892a1),_0x5a037b=await _0x1c19bb[_0x4645('0x11')](_0x2892a1);}catch(_0x2ea312){return void console[_0x4645('0x1')](_0x2ea312);}_0x4e7982['model'][_0x4645('0x19')](_0x3a4c3d=>{for(const _0x225f88 of Array['from'](_0x4e7982[_0x4645('0x14')][_0x4645('0x2a')]['getMarkersGroup'](_0x4645('0x53'))))_0x3a4c3d[_0x4645('0x1d')](_0x225f88);}),_0x1c19bb[_0x4645('0x22')]=!0x1,_0x4e7982[_0x4645('0x14')][_0x4645('0x31')](_0x39ce1a=>{_0x39ce1a['setSelection'](null),_0x39ce1a[_0x4645('0x46')](_0x4e7982['model'][_0x4645('0x29')]['selection']['getAttributeKeys']());for(const _0x52b91d of _0x4e7982[_0x4645('0x14')][_0x4645('0x29')]['getRootNames']())_0x39ce1a[_0x4645('0x3e')](_0x52b91d);for(const _0x252f25 of Object[_0x4645('0xb')](_0x204f50)){const _0x35807b=_0x39ce1a[_0x4645('0x47')](_0x252f25);for(const _0x5f13e0 of Object['keys'](_0x5a037b[_0x252f25]))_0x39ce1a[_0x4645('0x28')](_0x5f13e0,_0x5a037b[_0x252f25][_0x5f13e0],_0x35807b);_0x39ce1a[_0x4645('0x30')](_0x4e7982[_0x4645('0x1c')][_0x4645('0x33')](_0x204f50[_0x252f25],_0x35807b),_0x35807b,0x0);}});const _0x5cb79a=_0x49f1fc(_0x4e7982[_0x4645('0x5e')],'Restored');if(_0x2892a1['name'])_0x37ebec=-0x1==_0x2892a1['name'][_0x4645('0x36')](_0x5cb79a)?_0x5cb79a+':\x20'+_0x2892a1[_0x4645('0x6a')]:_0x2892a1['name'];else _0x37ebec=_0x5cb79a+':\x20'+(_0x2892a1[_0x4645('0x32')][_0x4645('0x41')](_0x4e7982[_0x4645('0x5e')][_0x4645('0x26')],{'month':_0x4645('0x64'),'day':_0x4645('0xf')})+',\x20'+_0x2892a1['createdAt'][_0x4645('0x67')](_0x4e7982[_0x4645('0x5e')][_0x4645('0x26')],{'hour':_0x4645('0xf'),'minute':'numeric'}));return await _0x3d2dea['saveRevision']({'name':_0x37ebec}),_0x1c19bb[_0x4645('0x22')]=!0x0,_0x4e7982[_0x4645('0x1f')][_0x4645('0x24')](_0x4645('0x5b'))[_0x4645('0x3')]();}}
23
+ const _0x1e79=['_enhanceCloseRevisionViewerCallback','RevisionViewerIntegration','refreshVisibility','isReady','block','markers','revision-history-viewer-opened','from','Users','set','saveRevision','refreshPositioning','init','_getRevisionViewerEditorConfig','getAttributeKeys','context','initialData','filter','restoreRevision','exitToEditing','revisionHistory.viewerEditorElement','setSelection','users','string','get','enqueueChange','repository','_update','constructor','closeRevisionViewerCallback','locale','map','getRootNames','toLocaleDateString','getRevisions','document','showRevisionViewerCallback','toLocaleTimeString','catch','addRevisionData','restrictedEditingException','indexOf','setAttribute','pluginName','toJSON','error','data','isReadOnly','getRevisionData','keys','config','RestrictedEditingMode','find','removeSelectionAttribute','bind','_viewerEditor','model','createdAt','push','revisionHistory.showRevisionViewerCallback','_cleanUp','DocumentOutline','style','name','has','revisionHistory.restoreRevisionCallback','names','isAnonymous','destroy','_restoreRevision','define','uiLanguage','getMarkersGroup','plugins','selection','includes','disableReadOnlyMode','PaginationLookup','creator','every','revisionHistory.viewerContainer','revisionHistory.closeRevisionViewerCallback','RevisionsRepository','_recalculatePageBreaks','toolbar','commands','insert','addRoot','builtinPlugins','getRevision','addUser','_closeRevisionViewer','extraPlugins','_showRevisionViewer','Autosave','change','parse','RevisionViewer','detachRoot','Annotations','result','then','RevisionTracker','adapter','none','function','create','requires','concat','display','numeric','_enhanceShowRevisionViewerCallback','toVersion','isEnabled','fromVersion','rootsAttributes','editor','revision-history-missing-configuration','revisionHistory.editorContainer','revisionHistory'];(function(_0xbaafe5,_0x1e7986){const _0x12b85f=function(_0x3defc9){while(--_0x3defc9){_0xbaafe5['push'](_0xbaafe5['shift']());}};_0x12b85f(++_0x1e7986);}(_0x1e79,0x95));const _0x12b8=function(_0xbaafe5,_0x1e7986){_0xbaafe5=_0xbaafe5-0x0;let _0x12b85f=_0x1e79[_0xbaafe5];return _0x12b85f;};import{Plugin as _0x8a7cc5}from'ckeditor5/src/core';import{CKEditorError as _0x40cd33,uid as _0x568850}from'ckeditor5/src/utils';import _0x3f7e0e from'./revisiontracker';import _0xad4244 from'./ui/revisionhistory/revisionhistoryui';import _0x36d3ee from'./revisionviewer';import _0x5a2107 from'./ui/revisionviewer/revisionviewerui';import _0x224689 from'./ui/revisionssidebar/revisionssidebar';import _0x555499 from'./editor/revisionviewereditor';import{getTranslation as _0x4bb1b0}from'./utils/common-translations';class p extends _0x8a7cc5{static get[_0x12b8('0xe')](){return _0x12b8('0x5c');}constructor(_0x5eafb7){super(_0x5eafb7),this[_0x12b8('0x47')]='end';}}export default class g extends _0x8a7cc5{static get[_0x12b8('0xe')](){return'RevisionHistory';}static get[_0x12b8('0x4e')](){return[_0x3f7e0e,_0xad4244];}constructor(_0x43001a){if(super(_0x43001a),!this['editor'][_0x12b8('0x15')][_0x12b8('0x73')](_0x12b8('0x5a')))throw new _0x40cd33(_0x12b8('0x58'),this);this[_0x12b8('0x1a')]=null,this['editor'][_0x12b8('0x15')][_0x12b8('0x29')](_0x12b8('0x1e'),_0x98d1e6=>this[_0x12b8('0x40')](_0x98d1e6)),this['editor'][_0x12b8('0x15')][_0x12b8('0x29')]('revisionHistory.closeRevisionViewerCallback',_0x555865=>this[_0x12b8('0x3e')](_0x555865)),this[_0x12b8('0x57')][_0x12b8('0x15')]['define'](_0x12b8('0x24'),_0x4467b2=>this[_0x12b8('0x28')](_0x4467b2)),this[_0x12b8('0x52')](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x221a74){this[_0x12b8('0x57')][_0x12b8('0x2c')][_0x12b8('0x73')](_0x12b8('0x49'))[_0x12b8('0x4a')]=_0x221a74;}get['adapter'](){return this[_0x12b8('0x57')][_0x12b8('0x2c')][_0x12b8('0x73')](_0x12b8('0x49'))[_0x12b8('0x4a')];}[_0x12b8('0xa')](_0x2fd4ff){return this['editor'][_0x12b8('0x2c')][_0x12b8('0x73')]('RevisionTracker')['addRevisionData'](_0x2fd4ff);}['getRevision'](_0x43a120){return this['editor'][_0x12b8('0x2c')]['get'](_0x12b8('0x35'))[_0x12b8('0x3c')](_0x43a120);}['getRevisions'](_0xb0121b={'toJSON':!0x1}){return this[_0x12b8('0x57')][_0x12b8('0x2c')]['get'](_0x12b8('0x35'))[_0x12b8('0x5')](_0xb0121b);}['_getRevisionViewerEditorConfig'](){const _0x26ccdf=[_0x12b8('0x6a')],_0x52d9d4=['RevisionTracker','RevisionHistoryUI','WebSocketGateway',_0x12b8('0x16'),_0x12b8('0x41'),_0x12b8('0x20')],_0x3ba99c={},_0x58450c=this[_0x12b8('0x57')],_0x266ae2=_0x58450c[_0x12b8('0x2c')][_0x12b8('0x73')](_0x12b8('0x49')),_0xf0ea27=_0x58450c[_0x12b8('0x2c')][_0x12b8('0x73')](_0x12b8('0x63'))[_0x12b8('0x71')];for(const _0x3d946f of _0x58450c[_0x12b8('0x15')][_0x12b8('0x25')]())_0x26ccdf[_0x12b8('0x2e')](_0x3d946f)||(_0x3ba99c[_0x3d946f]=_0x58450c['config'][_0x12b8('0x73')](_0x3d946f));delete _0x3ba99c[_0x12b8('0x6b')],delete _0x3ba99c[_0x12b8('0x56')],_0x3ba99c[_0x12b8('0x37')]=[_0x12b8('0x6e'),'restoreRevision','changesNavigation'];const _0x52c82c=this['editor'][_0x12b8('0x77')][_0x12b8('0x3b')]||[],_0x1546bd=_0x3ba99c[_0x12b8('0x3f')]||[];delete _0x3ba99c[_0x12b8('0x3f')];const _0x3feca3=_0x58450c['_context'][_0x12b8('0x15')]['get']('plugins')||[],_0x26ecae=_0x52c82c[_0x12b8('0x4f')](_0x3ba99c[_0x12b8('0x2c')])[_0x12b8('0x4f')](_0x1546bd)[_0x12b8('0x4f')](_0x3feca3)[_0x12b8('0x2')](_0x4ea797=>_0x12b8('0x72')==typeof _0x4ea797?_0x52c82c[_0x12b8('0x17')](_0xb0f34d=>_0xb0f34d[_0x12b8('0xe')]==_0x4ea797):_0x4ea797);_0x3ba99c[_0x12b8('0x2c')]=Array[_0x12b8('0x62')](new Set(_0x26ecae))[_0x12b8('0x6c')](_0x3f5179=>_0x55a3f7(_0x3f5179,_0x58450c[_0x12b8('0x2c')],[]));function _0x55a3f7(_0x58d5f4,_0x21c764,_0x51c43b){const _0x3ca816='function'==typeof _0x58d5f4?_0x58d5f4['pluginName']||_0x58d5f4[_0x12b8('0x22')]:_0x58d5f4;if(_0x51c43b[_0x12b8('0x2e')](_0x3ca816))return!0x0;if(_0x51c43b[_0x12b8('0x1d')](_0x3ca816),_0x52d9d4[_0x12b8('0x2e')](_0x3ca816))return!0x1;const _0x1cc699=((_0x12b8('0x4c')==typeof _0x58d5f4?_0x58d5f4:_0x21c764[_0x12b8('0x23')](_0x3ca816)?_0x21c764[_0x12b8('0x73')](_0x3ca816):{})[_0x12b8('0x4e')]||[])[_0x12b8('0x32')](_0x489807=>_0x55a3f7(_0x489807,_0x21c764,_0x51c43b));return _0x1cc699||_0x52d9d4['push'](_0x3ca816),_0x1cc699;}return _0x3ba99c[_0x12b8('0x2c')][_0x12b8('0x1d')](p,_0x36d3ee,_0x5a2107,class extends _0x8a7cc5{static get[_0x12b8('0x4e')](){return[_0x36d3ee,_0x12b8('0x63')];}[_0x12b8('0x67')](){const _0x232204=this['editor'][_0x12b8('0x2c')][_0x12b8('0x73')](_0x12b8('0x63'));for(const _0x1fb9e7 of _0xf0ea27)_0x1fb9e7[_0x12b8('0x26')]||_0x232204['getUser'](_0x1fb9e7['id'])||_0x232204[_0x12b8('0x3d')](_0x1fb9e7);const _0x2c0a44=_0x266ae2[_0x12b8('0x75')][_0x12b8('0x5')]();let _0x1628ca=null;const _0x1c011c=this[_0x12b8('0x57')][_0x12b8('0x2c')][_0x12b8('0x73')](_0x12b8('0x44'));_0x1c011c['adapter']=_0x266ae2[_0x12b8('0x4a')],_0x1c011c['bind'](_0x12b8('0x54'))['to'](_0x266ae2),this[_0x12b8('0x57')][_0x12b8('0x38')][_0x12b8('0x73')](_0x12b8('0x6d'))[_0x12b8('0x19')](_0x12b8('0x54'))['to'](_0x58450c,_0x12b8('0x12'),_0x240321=>!_0x240321);for(const _0x46723f of _0x2c0a44){const _0x1074a6=null===_0x46723f[_0x12b8('0x31')];if(_0x1074a6&&_0x46723f[_0x12b8('0x53')]===_0x46723f[_0x12b8('0x55')])continue;const _0x25f368=_0x46723f[_0x12b8('0xf')]();_0x1c011c[_0x12b8('0xa')](_0x25f368,(_0x4da313,_0x24ecde,_0x516fc1)=>{if(_0x1074a6){if(_0x1628ca)_0x1628ca['_update'](_0x4da313,_0x24ecde);else{if(!_0x24ecde){const _0x39b999=_0x516fc1[_0x12b8('0xf')]();_0x39b999['id']=_0x568850(),_0x266ae2['saveRevision'](_0x39b999,_0x516fc1[_0x12b8('0x53')])[_0x12b8('0x48')](_0x3bad76=>{_0x1628ca=_0x3bad76;});}}}else _0x46723f[_0x12b8('0x76')](_0x4da313,_0x24ecde);});}}},_0x224689),_0x3ba99c;}[_0x12b8('0x52')](){const _0x4bc955=this['editor']['config'][_0x12b8('0x73')](_0x12b8('0x5a'))[_0x12b8('0x7')];this[_0x12b8('0x57')]['config'][_0x12b8('0x64')](_0x12b8('0x1e'),async()=>{this['editor']['enableReadOnlyMode'](_0x12b8('0x61'));const _0x555691=this[_0x12b8('0x57')][_0x12b8('0x2c')][_0x12b8('0x73')](_0x12b8('0x49'));if(this[_0x12b8('0x57')][_0x12b8('0x2c')][_0x12b8('0x23')]('Autosave')){const _0x8ee213=this[_0x12b8('0x57')][_0x12b8('0x2c')]['get'](_0x12b8('0x41'));await _0x8ee213['save']();}else await _0x555691['update']();this[_0x12b8('0x57')][_0x12b8('0x2c')]['has'](_0x12b8('0x30'))&&this[_0x12b8('0x57')][_0x12b8('0x2c')]['get'](_0x12b8('0x30'))[_0x12b8('0x36')]();const _0x1bdfe3=this[_0x12b8('0x68')]();return _0x4bc955(_0x1bdfe3)[_0x12b8('0x48')](_0x3067d1=>{return(this[_0x12b8('0x1a')]=_0x3067d1,this[_0x12b8('0x57')]['plugins'][_0x12b8('0x23')](_0x12b8('0x46')))&&this[_0x12b8('0x57')][_0x12b8('0x2c')][_0x12b8('0x73')]('Annotations')[_0x12b8('0x5d')](),_0x3067d1;})[_0x12b8('0x9')](_0x92fd27=>(console[_0x12b8('0x10')](_0x92fd27),this[_0x12b8('0x57')][_0x12b8('0x2f')](_0x12b8('0x61')),null));});}[_0x12b8('0x5b')](){const _0x91d48=this[_0x12b8('0x57')][_0x12b8('0x15')][_0x12b8('0x73')](_0x12b8('0x5a'))['closeRevisionViewerCallback'];this['editor'][_0x12b8('0x15')][_0x12b8('0x64')](_0x12b8('0x34'),()=>(this[_0x12b8('0x57')][_0x12b8('0x2c')]['has'](_0x12b8('0x30'))&&this[_0x12b8('0x57')][_0x12b8('0x2c')][_0x12b8('0x73')](_0x12b8('0x30'))[_0x12b8('0x36')](),this[_0x12b8('0x1a')][_0x12b8('0x2c')][_0x12b8('0x73')](_0x12b8('0x44'))[_0x12b8('0x1f')](),_0x91d48(this[_0x12b8('0x1a')])[_0x12b8('0x48')](()=>{if(this['editor']['disableReadOnlyMode'](_0x12b8('0x61')),this[_0x12b8('0x1a')]=null,this[_0x12b8('0x57')][_0x12b8('0x2c')][_0x12b8('0x23')]('Annotations')){const _0x170158=this[_0x12b8('0x57')][_0x12b8('0x2c')][_0x12b8('0x73')](_0x12b8('0x46'));_0x170158[_0x12b8('0x5d')](),_0x170158[_0x12b8('0x66')]();}})));}[_0x12b8('0x40')](_0x40c8f0){const _0x57719b=this[_0x12b8('0x57')][_0x12b8('0x15')][_0x12b8('0x73')](_0x12b8('0x59')),_0x536799=this[_0x12b8('0x57')]['config'][_0x12b8('0x73')](_0x12b8('0x33')),_0x5a2f3=this[_0x12b8('0x57')]['config'][_0x12b8('0x73')](_0x12b8('0x6f'));return _0x555499[_0x12b8('0x4d')](_0x5a2f3,_0x40c8f0)[_0x12b8('0x48')](_0x2bf5be=>(_0x536799[_0x12b8('0x21')][_0x12b8('0x50')]=_0x12b8('0x5f'),_0x57719b[_0x12b8('0x21')]['display']='none',_0x2bf5be));}[_0x12b8('0x3e')](_0x47f661){const _0xb05087=this[_0x12b8('0x57')][_0x12b8('0x15')][_0x12b8('0x73')]('revisionHistory.editorContainer');return this[_0x12b8('0x57')][_0x12b8('0x15')]['get'](_0x12b8('0x33'))[_0x12b8('0x21')]['display']=_0x12b8('0x4b'),_0xb05087[_0x12b8('0x21')][_0x12b8('0x50')]='',_0x47f661[_0x12b8('0x27')]();}async[_0x12b8('0x28')](_0x4ddeb3){const _0x414017=this[_0x12b8('0x57')],_0x45bf76=this['_viewerEditor'][_0x12b8('0x2c')][_0x12b8('0x73')](_0x12b8('0x44')),_0x438874=_0x414017[_0x12b8('0x2c')][_0x12b8('0x73')]('RevisionTracker'),_0x29a53c=_0x45bf76[_0x12b8('0x75')]['getRevision'](_0x4ddeb3);let _0xef75f7,_0x1a2346,_0xe8901a;try{_0xef75f7=await _0x45bf76[_0x12b8('0x13')](_0x29a53c),_0x1a2346=await _0x45bf76['getRevisionRootsAttributes'](_0x29a53c);}catch(_0xdd0027){return void console[_0x12b8('0x10')](_0xdd0027);}_0x414017[_0x12b8('0x1b')][_0x12b8('0x42')](_0x37265a=>{for(const _0x3ada06 of Array[_0x12b8('0x62')](_0x414017['model'][_0x12b8('0x60')][_0x12b8('0x2b')](_0x12b8('0xb'))))_0x37265a['removeMarker'](_0x3ada06);}),_0x45bf76['isReady']=!0x1,_0x414017[_0x12b8('0x1b')][_0x12b8('0x74')](_0x1171b8=>{_0x1171b8[_0x12b8('0x70')](null),_0x1171b8[_0x12b8('0x18')](_0x414017[_0x12b8('0x1b')][_0x12b8('0x6')][_0x12b8('0x2d')][_0x12b8('0x69')]());for(const _0x275c86 of _0x414017[_0x12b8('0x1b')]['document'][_0x12b8('0x3')]())_0x1171b8[_0x12b8('0x45')](_0x275c86);for(const _0x2d9197 of Object[_0x12b8('0x14')](_0xef75f7)){const _0x4a75a9=_0x1171b8[_0x12b8('0x3a')](_0x2d9197);for(const _0x597d55 of Object['keys'](_0x1a2346[_0x2d9197]))_0x1171b8[_0x12b8('0xd')](_0x597d55,_0x1a2346[_0x2d9197][_0x597d55],_0x4a75a9);_0x1171b8[_0x12b8('0x39')](_0x414017[_0x12b8('0x11')][_0x12b8('0x43')](_0xef75f7[_0x2d9197],_0x4a75a9),_0x4a75a9,0x0);}});const _0xd8e8cf=_0x4bb1b0(_0x414017[_0x12b8('0x1')],'Restored');if(_0x29a53c[_0x12b8('0x22')])_0xe8901a=-0x1==_0x29a53c['name'][_0x12b8('0xc')](_0xd8e8cf)?_0xd8e8cf+':\x20'+_0x29a53c[_0x12b8('0x22')]:_0x29a53c[_0x12b8('0x22')];else _0xe8901a=_0xd8e8cf+':\x20'+(_0x29a53c['createdAt'][_0x12b8('0x4')](_0x414017[_0x12b8('0x1')][_0x12b8('0x2a')],{'month':'long','day':'numeric'})+',\x20'+_0x29a53c[_0x12b8('0x1c')][_0x12b8('0x8')](_0x414017['locale'][_0x12b8('0x2a')],{'hour':_0x12b8('0x51'),'minute':_0x12b8('0x51')}));return await _0x438874[_0x12b8('0x65')]({'name':_0xe8901a}),_0x45bf76[_0x12b8('0x5e')]=!0x0,_0x414017[_0x12b8('0x15')][_0x12b8('0x73')](_0x12b8('0x5a'))[_0x12b8('0x0')]();}}
@@ -1,11 +1,16 @@
1
- import { Plugin, type PluginDependencies, type Editor } from 'ckeditor5/src/core';
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';
2
7
  import { default as Revision, type RevisionData, type RevisionJSON } from './revision';
3
8
  /**
4
9
  * Manages revisions list.
5
10
  */
6
11
  export default class RevisionsRepository extends Plugin {
7
- static get requires(): PluginDependencies;
8
- static get pluginName(): 'RevisionsRepository';
12
+ static get requires(): readonly [typeof Users];
13
+ static get pluginName(): "RevisionsRepository";
9
14
  get length(): number;
10
15
  constructor(editor: Editor);
11
16
  /**