@ckeditor/ckeditor5-revision-history 38.0.1 → 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.
- package/build/revision-history.js +1 -1
- package/package.json +13 -11
- package/src/changeitem.js +1 -1
- package/src/editor/revisionviewereditor.js +1 -1
- package/src/editor/revisionviewereditorui.js +1 -1
- package/src/editor/revisionviewereditoruiview.js +1 -1
- package/src/index.d.ts +1 -0
- package/src/revision.js +1 -1
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.d.ts +5 -3
- package/src/revisionhistory.js +1 -1
- package/src/revisionsrepository.d.ts +8 -3
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.d.ts +8 -3
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.js +1 -1
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.d.ts +4 -3
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.d.ts +4 -3
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.d.ts +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.d.ts +5 -3
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- 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
|
|
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": "
|
|
43
|
-
"@ckeditor/ckeditor5-ui": "
|
|
44
|
-
"@ckeditor/ckeditor5-undo": "
|
|
45
|
-
"ckeditor5": "
|
|
46
|
-
"ckeditor5-collaboration": "
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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')]};}}
|
package/src/revisiondiff.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
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);}}
|
package/src/revisionhistory.d.ts
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
* @module revision-history/revisionhistory
|
|
3
3
|
* @publicApi
|
|
4
4
|
*/
|
|
5
|
-
import { Plugin, type
|
|
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():
|
|
19
|
-
static get requires():
|
|
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.
|
package/src/revisionhistory.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x43db=['Autosave','_update','toolbar','changesNavigation','enqueueChange','revisionHistory','RevisionViewer','RestrictedEditingMode','addUser','repository','get','concat','users','keys','isEnabled','addRoot','showRevisionViewerCallback','getMarkersGroup','numeric','detachRoot','data','none','has','setAttribute','revisionHistory.showRevisionViewerCallback','Users','update','filter','getAttributeKeys','getRootNames','_closeRevisionViewer','revision-history-missing-configuration','model','every','pluginName','_enhanceCloseRevisionViewerCallback','creator','getRevisionRootsAttributes','restrictedEditingException','block','getRevisions','extraPlugins','builtinPlugins','init','_getRevisionViewerEditorConfig','revision-history-viewer-opened','error','RevisionsRepository','find','set','selection','display','insert','catch','_recalculatePageBreaks','fromVersion','push','createdAt','name','_showRevisionViewer','parse','plugins','long','RevisionHistoryUI','saveRevision','exitToEditing','revisionHistory.viewerContainer','enableReadOnlyMode','function','string','define','config','toLocaleDateString','_viewerEditor','_restoreRevision','style','rootsAttributes','addRevisionData','RevisionHistory','_enhanceShowRevisionViewerCallback','save','toVersion','getRevision','bind','Restored','PaginationLookup','revisionHistory.closeRevisionViewerCallback','restoreRevision','disableReadOnlyMode','RevisionTracker','adapter','editor','refreshVisibility','includes','context','then','revisionHistory.editorContainer','revisionHistory.restoreRevisionCallback','document','WebSocketGateway','constructor','getRevisionData','locale','DocumentOutline','uiLanguage','isReady','toJSON','requires','setSelection','Annotations','toLocaleTimeString'];(function(_0x389243,_0x43dbec){const _0x8a230b=function(_0x57b39e){while(--_0x57b39e){_0x389243['push'](_0x389243['shift']());}};_0x8a230b(++_0x43dbec);}(_0x43db,0x151));const _0x8a23=function(_0x389243,_0x43dbec){_0x389243=_0x389243-0x0;let _0x8a230b=_0x43db[_0x389243];return _0x8a230b;};import{Plugin as _0x483c37}from'ckeditor5/src/core';import{CKEditorError as _0x53fd35,uid as _0x1b0b6d}from'ckeditor5/src/utils';import _0x3b97aa from'./revisiontracker';import _0x54e44f from'./ui/revisionhistory/revisionhistoryui';import _0x138425 from'./revisionviewer';import _0x508132 from'./ui/revisionviewer/revisionviewerui';import _0x51b4f9 from'./ui/revisionssidebar/revisionssidebar';import _0x53ec0b from'./editor/revisionviewereditor';import{getTranslation as _0x1367f7}from'./utils/common-translations';export default class p extends _0x483c37{static get[_0x8a23('0x1e')](){return _0x8a23('0x4a');}static get[_0x8a23('0x67')](){return[_0x3b97aa,_0x54e44f];}constructor(_0x5b8dcb){if(super(_0x5b8dcb),!this[_0x8a23('0x57')][_0x8a23('0x43')][_0x8a23('0x6')]('revisionHistory'))throw new _0x53fd35(_0x8a23('0x1b'),this);this[_0x8a23('0x45')]=null,this[_0x8a23('0x57')][_0x8a23('0x43')][_0x8a23('0x42')](_0x8a23('0x14'),_0x4b47aa=>this[_0x8a23('0x37')](_0x4b47aa)),this[_0x8a23('0x57')][_0x8a23('0x43')][_0x8a23('0x42')](_0x8a23('0x52'),_0x3e2ffd=>this[_0x8a23('0x1a')](_0x3e2ffd)),this['editor'][_0x8a23('0x43')][_0x8a23('0x42')](_0x8a23('0x5d'),_0x35c956=>this[_0x8a23('0x46')](_0x35c956)),this[_0x8a23('0x4b')](),this['_enhanceCloseRevisionViewerCallback']();}set[_0x8a23('0x56')](_0x3fcc6c){this[_0x8a23('0x57')]['plugins']['get'](_0x8a23('0x55'))['adapter']=_0x3fcc6c;}get[_0x8a23('0x56')](){return this['editor']['plugins'][_0x8a23('0x6')](_0x8a23('0x55'))[_0x8a23('0x56')];}[_0x8a23('0x49')](_0x12a382){return this[_0x8a23('0x57')][_0x8a23('0x39')][_0x8a23('0x6')](_0x8a23('0x55'))[_0x8a23('0x49')](_0x12a382);}[_0x8a23('0x4e')](_0x343cc8){return this[_0x8a23('0x57')][_0x8a23('0x39')][_0x8a23('0x6')](_0x8a23('0x2b'))[_0x8a23('0x4e')](_0x343cc8);}[_0x8a23('0x24')](_0x1528eb={'toJSON':!0x1}){return this[_0x8a23('0x57')]['plugins'][_0x8a23('0x6')](_0x8a23('0x2b'))['getRevisions'](_0x1528eb);}[_0x8a23('0x28')](){const _0x240497=[_0x8a23('0x5a')],_0xc0d0fd=[_0x8a23('0x55'),_0x8a23('0x3b'),_0x8a23('0x5f'),_0x8a23('0x3'),'Autosave',_0x8a23('0x63')],_0x1f7f44={},_0x21f580=this['editor'],_0x4b25a1=_0x21f580[_0x8a23('0x39')]['get'](_0x8a23('0x55')),_0x93007c=_0x21f580[_0x8a23('0x39')][_0x8a23('0x6')](_0x8a23('0x15'))[_0x8a23('0x8')];for(const _0x14eb7d of _0x21f580[_0x8a23('0x43')]['names']())_0x240497[_0x8a23('0x59')](_0x14eb7d)||(_0x1f7f44[_0x14eb7d]=_0x21f580[_0x8a23('0x43')][_0x8a23('0x6')](_0x14eb7d));delete _0x1f7f44['initialData'],delete _0x1f7f44[_0x8a23('0x48')],_0x1f7f44[_0x8a23('0x6d')]=[_0x8a23('0x3d'),'restoreRevision',_0x8a23('0x6e')];const _0x17f643=this[_0x8a23('0x57')][_0x8a23('0x60')][_0x8a23('0x26')]||[],_0x32de73=_0x1f7f44[_0x8a23('0x25')]||[];delete _0x1f7f44[_0x8a23('0x25')];const _0x2273f3=_0x17f643[_0x8a23('0x7')](_0x1f7f44[_0x8a23('0x39')])[_0x8a23('0x7')](_0x32de73)['map'](_0x469cf9=>_0x8a23('0x41')==typeof _0x469cf9?_0x17f643[_0x8a23('0x2c')](_0x221169=>_0x221169['pluginName']==_0x469cf9):_0x469cf9);let _0x40925a=!0x1;_0x1f7f44[_0x8a23('0x39')]=Array['from'](new Set(_0x2273f3))[_0x8a23('0x17')](_0xde14e7=>_0x5d2a3a(_0xde14e7,_0x21f580[_0x8a23('0x39')],[])),_0x40925a&&_0x1f7f44['plugins']['push'](_0x21f580['plugins'][_0x8a23('0x6')](_0x8a23('0x5f'))[_0x8a23('0x60')]);function _0x5d2a3a(_0x212bac,_0x3c38e2,_0x447eeb){const _0x24611e=_0x8a23('0x40')==typeof _0x212bac?_0x212bac[_0x8a23('0x1e')]||_0x212bac[_0x8a23('0x36')]:_0x212bac;if(_0x8a23('0x5f')===_0x24611e&&(_0x40925a=!0x0),_0x447eeb[_0x8a23('0x59')](_0x24611e))return!0x0;if(_0x447eeb['push'](_0x24611e),_0xc0d0fd[_0x8a23('0x59')](_0x24611e))return!0x1;const _0x564c6f=(('function'==typeof _0x212bac?_0x212bac:_0x3c38e2['has'](_0x24611e)?_0x3c38e2[_0x8a23('0x6')](_0x24611e):{})[_0x8a23('0x67')]||[])[_0x8a23('0x1d')](_0x1dd1d1=>_0x5d2a3a(_0x1dd1d1,_0x3c38e2,_0x447eeb));return _0x564c6f||_0xc0d0fd['push'](_0x24611e),_0x564c6f;}return _0x1f7f44[_0x8a23('0x39')][_0x8a23('0x34')](_0x138425,_0x508132,class extends _0x483c37{static get[_0x8a23('0x67')](){return[_0x138425,_0x8a23('0x15')];}[_0x8a23('0x27')](){const _0x110064=this[_0x8a23('0x57')][_0x8a23('0x39')][_0x8a23('0x6')](_0x8a23('0x15'));for(const _0x5d24eb of _0x93007c)_0x5d24eb['isAnonymous']||_0x110064['getUser'](_0x5d24eb['id'])||_0x110064[_0x8a23('0x4')](_0x5d24eb);const _0x1a69ad=_0x4b25a1['repository'][_0x8a23('0x24')]();let _0x11b39d=null;const _0x1c40f5=this['editor'][_0x8a23('0x39')][_0x8a23('0x6')]('RevisionViewer');_0x1c40f5['adapter']=_0x4b25a1[_0x8a23('0x56')],_0x1c40f5[_0x8a23('0x4f')]('isEnabled')['to'](_0x4b25a1),this[_0x8a23('0x57')]['commands'][_0x8a23('0x6')](_0x8a23('0x53'))[_0x8a23('0x4f')](_0x8a23('0xa'))['to'](_0x21f580,'isReadOnly',_0x2c973c=>!_0x2c973c);for(const _0x37dcd4 of _0x1a69ad){const _0x1b8765=null===_0x37dcd4[_0x8a23('0x20')];if(_0x1b8765&&_0x37dcd4[_0x8a23('0x4d')]===_0x37dcd4[_0x8a23('0x33')])continue;const _0x39ceaa=_0x37dcd4[_0x8a23('0x66')]();_0x1c40f5[_0x8a23('0x49')](_0x39ceaa,(_0x2b7c1b,_0x24297d,_0x3bf3df)=>{if(_0x1b8765){if(_0x11b39d)_0x11b39d[_0x8a23('0x6c')](_0x2b7c1b,_0x24297d);else{if(!_0x24297d){const _0x330bff=_0x3bf3df[_0x8a23('0x66')]();_0x330bff['id']=_0x1b0b6d(),_0x4b25a1[_0x8a23('0x3c')](_0x330bff,_0x3bf3df[_0x8a23('0x4d')])['then'](_0x4f7e6f=>{_0x11b39d=_0x4f7e6f;});}}}else _0x37dcd4[_0x8a23('0x6c')](_0x2b7c1b,_0x24297d);});}}},_0x51b4f9),_0x1f7f44;}[_0x8a23('0x4b')](){const _0x91d2c3=this[_0x8a23('0x57')][_0x8a23('0x43')][_0x8a23('0x6')](_0x8a23('0x1'))[_0x8a23('0xc')];this[_0x8a23('0x57')][_0x8a23('0x43')][_0x8a23('0x2d')]('revisionHistory.showRevisionViewerCallback',async()=>{this[_0x8a23('0x57')][_0x8a23('0x3f')](_0x8a23('0x29'));const _0x320160=this[_0x8a23('0x57')][_0x8a23('0x39')][_0x8a23('0x6')]('RevisionTracker');if(this[_0x8a23('0x57')]['plugins']['has']('Autosave')){const _0x2dec8d=this[_0x8a23('0x57')][_0x8a23('0x39')][_0x8a23('0x6')](_0x8a23('0x6b'));await _0x2dec8d[_0x8a23('0x4c')]();}else await _0x320160[_0x8a23('0x16')]();this[_0x8a23('0x57')]['plugins'][_0x8a23('0x12')](_0x8a23('0x51'))&&this['editor'][_0x8a23('0x39')]['get']('PaginationLookup')['_recalculatePageBreaks']();const _0x3369e5=this[_0x8a23('0x28')]();return _0x91d2c3(_0x3369e5)[_0x8a23('0x5b')](_0x2fd0eb=>{return(this[_0x8a23('0x45')]=_0x2fd0eb,this[_0x8a23('0x57')][_0x8a23('0x39')][_0x8a23('0x12')](_0x8a23('0x69')))&&this[_0x8a23('0x57')]['plugins'][_0x8a23('0x6')]('Annotations')[_0x8a23('0x58')](),_0x2fd0eb;})[_0x8a23('0x31')](_0x224159=>(console[_0x8a23('0x2a')](_0x224159),this['editor'][_0x8a23('0x54')](_0x8a23('0x29')),null));});}[_0x8a23('0x1f')](){const _0x5a254=this[_0x8a23('0x57')][_0x8a23('0x43')]['get'](_0x8a23('0x1'))['closeRevisionViewerCallback'];this['editor'][_0x8a23('0x43')][_0x8a23('0x2d')]('revisionHistory.closeRevisionViewerCallback',()=>(this['editor'][_0x8a23('0x39')][_0x8a23('0x12')](_0x8a23('0x51'))&&this[_0x8a23('0x57')][_0x8a23('0x39')]['get'](_0x8a23('0x51'))[_0x8a23('0x32')](),this[_0x8a23('0x45')][_0x8a23('0x39')]['get'](_0x8a23('0x2'))['_cleanUp'](),_0x5a254(this[_0x8a23('0x45')])[_0x8a23('0x5b')](()=>{if(this[_0x8a23('0x57')][_0x8a23('0x54')](_0x8a23('0x29')),this[_0x8a23('0x45')]=null,this['editor'][_0x8a23('0x39')][_0x8a23('0x12')](_0x8a23('0x69'))){const _0x353916=this['editor'][_0x8a23('0x39')][_0x8a23('0x6')](_0x8a23('0x69'));_0x353916['refreshVisibility'](),_0x353916['refreshPositioning']();}})));}['_showRevisionViewer'](_0x3970d2){const _0x1e3dbb=this[_0x8a23('0x57')]['config'][_0x8a23('0x6')]('revisionHistory.editorContainer'),_0x313cb8=this[_0x8a23('0x57')]['config'][_0x8a23('0x6')](_0x8a23('0x3e')),_0x4e5e5e=this[_0x8a23('0x57')][_0x8a23('0x43')]['get']('revisionHistory.viewerEditorElement');return _0x53ec0b['create'](_0x4e5e5e,_0x3970d2)['then'](_0x3113e5=>(_0x313cb8[_0x8a23('0x47')][_0x8a23('0x2f')]=_0x8a23('0x23'),_0x1e3dbb['style'][_0x8a23('0x2f')]=_0x8a23('0x11'),_0x3113e5));}[_0x8a23('0x1a')](_0x270759){const _0x192105=this[_0x8a23('0x57')]['config'][_0x8a23('0x6')](_0x8a23('0x5c'));return this[_0x8a23('0x57')][_0x8a23('0x43')][_0x8a23('0x6')](_0x8a23('0x3e'))[_0x8a23('0x47')]['display']=_0x8a23('0x11'),_0x192105[_0x8a23('0x47')][_0x8a23('0x2f')]='',_0x270759['destroy']();}async[_0x8a23('0x46')](_0x3a2a57){const _0x51feda=this[_0x8a23('0x57')],_0x131cb4=this[_0x8a23('0x45')][_0x8a23('0x39')][_0x8a23('0x6')]('RevisionViewer'),_0x3bfcfb=_0x51feda[_0x8a23('0x39')]['get']('RevisionTracker'),_0x6f225e=_0x131cb4[_0x8a23('0x5')][_0x8a23('0x4e')](_0x3a2a57);let _0x1a89c1,_0x29567c,_0x37413a;try{_0x1a89c1=await _0x131cb4[_0x8a23('0x61')](_0x6f225e),_0x29567c=await _0x131cb4[_0x8a23('0x21')](_0x6f225e);}catch(_0x2638bf){return void console['error'](_0x2638bf);}_0x51feda[_0x8a23('0x1c')]['change'](_0xa8585f=>{for(const _0x5bd588 of Array['from'](_0x51feda[_0x8a23('0x1c')]['markers'][_0x8a23('0xd')](_0x8a23('0x22'))))_0xa8585f['removeMarker'](_0x5bd588);}),_0x131cb4[_0x8a23('0x65')]=!0x1,_0x51feda[_0x8a23('0x1c')][_0x8a23('0x0')](_0x3238bf=>{_0x3238bf[_0x8a23('0x68')](null),_0x3238bf['removeSelectionAttribute'](_0x51feda[_0x8a23('0x1c')]['document'][_0x8a23('0x2e')][_0x8a23('0x18')]());for(const _0x458db5 of _0x51feda[_0x8a23('0x1c')][_0x8a23('0x5e')][_0x8a23('0x19')]())_0x3238bf[_0x8a23('0xf')](_0x458db5);for(const _0x33ae8e of Object[_0x8a23('0x9')](_0x1a89c1)){const _0xc35b70=_0x3238bf[_0x8a23('0xb')](_0x33ae8e);for(const _0x30c594 of Object[_0x8a23('0x9')](_0x29567c[_0x33ae8e]))_0x3238bf[_0x8a23('0x13')](_0x30c594,_0x29567c[_0x33ae8e][_0x30c594],_0xc35b70);_0x3238bf[_0x8a23('0x30')](_0x51feda[_0x8a23('0x10')][_0x8a23('0x38')](_0x1a89c1[_0x33ae8e],_0xc35b70),_0xc35b70,0x0);}});const _0x4cc6e7=_0x1367f7(_0x51feda[_0x8a23('0x62')],_0x8a23('0x50'));if(_0x6f225e[_0x8a23('0x36')])_0x37413a=-0x1==_0x6f225e[_0x8a23('0x36')]['indexOf'](_0x4cc6e7)?_0x4cc6e7+':\x20'+_0x6f225e[_0x8a23('0x36')]:_0x6f225e[_0x8a23('0x36')];else _0x37413a=_0x4cc6e7+':\x20'+(_0x6f225e[_0x8a23('0x35')][_0x8a23('0x44')](_0x51feda[_0x8a23('0x62')][_0x8a23('0x64')],{'month':_0x8a23('0x3a'),'day':'numeric'})+',\x20'+_0x6f225e[_0x8a23('0x35')][_0x8a23('0x6a')](_0x51feda[_0x8a23('0x62')][_0x8a23('0x64')],{'hour':_0x8a23('0xe'),'minute':'numeric'}));return await _0x3bfcfb[_0x8a23('0x3c')]({'name':_0x37413a}),_0x131cb4[_0x8a23('0x65')]=!0x0,_0x51feda['config']['get'](_0x8a23('0x1'))['closeRevisionViewerCallback']();}}
|
|
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
|
-
|
|
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():
|
|
8
|
-
static get pluginName():
|
|
12
|
+
static get requires(): readonly [typeof Users];
|
|
13
|
+
static get pluginName(): "RevisionsRepository";
|
|
9
14
|
get length(): number;
|
|
10
15
|
constructor(editor: Editor);
|
|
11
16
|
/**
|