@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20231214.0 → 0.0.0-nightly-20231216.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 +7 -6
- package/src/augmentation.d.ts +1 -1
- package/src/changeitem.d.ts +3 -3
- package/src/changeitem.js +1 -1
- package/src/editor/revisionviewereditor.d.ts +3 -3
- package/src/editor/revisionviewereditor.js +1 -1
- package/src/editor/revisionviewereditorui.d.ts +3 -3
- package/src/editor/revisionviewereditorui.js +1 -1
- package/src/editor/revisionviewereditoruiview.d.ts +3 -3
- package/src/editor/revisionviewereditoruiview.js +1 -1
- package/src/index.d.ts +11 -11
- package/src/index.js +1 -1
- package/src/revision.d.ts +3 -3
- package/src/revision.js +1 -1
- package/src/revisiondiff.d.ts +3 -3
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.d.ts +6 -6
- package/src/revisionhistory.js +1 -1
- package/src/revisionhistoryadapter.d.ts +1 -1
- package/src/revisionsrepository.d.ts +3 -3
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.d.ts +5 -5
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.d.ts +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.d.ts +6 -6
- package/src/ui/revision/revisionview.js +1 -1
- package/src/ui/revision/subrevisioncollapserview.d.ts +2 -2
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.d.ts +3 -3
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.d.ts +2 -2
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.d.ts +2 -2
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.d.ts +3 -3
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.d.ts +5 -5
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.d.ts +6 -6
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.d.ts +3 -3
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.d.ts +2 -2
- 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 +3 -3
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- package/src/utils/common-translations.d.ts +1 -1
- package/src/utils/common-translations.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-revision-history",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20231216.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/)",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"version history",
|
|
27
27
|
"versioning"
|
|
28
28
|
],
|
|
29
|
+
"type": "module",
|
|
29
30
|
"main": "src/index.js",
|
|
30
31
|
"files": [
|
|
31
32
|
"build",
|
|
@@ -37,11 +38,11 @@
|
|
|
37
38
|
"CHANGELOG.md"
|
|
38
39
|
],
|
|
39
40
|
"dependencies": {
|
|
40
|
-
"@ckeditor/ckeditor5-editor-classic": "0.0.0-nightly-
|
|
41
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
42
|
-
"@ckeditor/ckeditor5-undo": "0.0.0-nightly-
|
|
43
|
-
"ckeditor5": "0.0.0-nightly-
|
|
44
|
-
"ckeditor5-collaboration": "0.0.0-nightly-
|
|
41
|
+
"@ckeditor/ckeditor5-editor-classic": "0.0.0-nightly-20231216.0",
|
|
42
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20231216.0",
|
|
43
|
+
"@ckeditor/ckeditor5-undo": "0.0.0-nightly-20231216.0",
|
|
44
|
+
"ckeditor5": "0.0.0-nightly-20231216.0",
|
|
45
|
+
"ckeditor5-collaboration": "0.0.0-nightly-20231216.0",
|
|
45
46
|
"lodash-es": "4.17.21",
|
|
46
47
|
"luxon": "1.28.1"
|
|
47
48
|
},
|
package/src/augmentation.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import type { RevisionHistoryConfig, RevisionsRepository, RevisionViewerLoadingOverlay, RevisionHistoryUI, RevisionTracker, RevisionViewer, RestoreRevisionCommand, ShowChangeCommand, RevisionsSidebar, RevisionViewerUI } from './index';
|
|
5
|
+
import type { RevisionHistoryConfig, RevisionsRepository, RevisionViewerLoadingOverlay, RevisionHistoryUI, RevisionTracker, RevisionViewer, RestoreRevisionCommand, ShowChangeCommand, RevisionsSidebar, RevisionViewerUI } from './index.js';
|
|
6
6
|
declare module '@ckeditor/ckeditor5-core' {
|
|
7
7
|
interface EditorConfig {
|
|
8
8
|
/**
|
package/src/changeitem.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import type { User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
5
|
+
import type { User } from 'ckeditor5-collaboration/src/collaboration-core.js';
|
|
6
6
|
declare const ChangeItem_base: {
|
|
7
|
-
new (): import("ckeditor5/src/utils").Observable;
|
|
8
|
-
prototype: import("ckeditor5/src/utils").Observable;
|
|
7
|
+
new (): import("ckeditor5/src/utils.js").Observable;
|
|
8
|
+
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* Represents a singular change entry in the revision or in the revisions comparison.
|
package/src/changeitem.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x9a2b=['rootName','set','createdAt','author','type'];(function(_0x2aed34,_0x9a2b3c){var _0x4f570c=function(_0x23cd8e){while(--_0x23cd8e){_0x2aed34['push'](_0x2aed34['shift']());}};_0x4f570c(++_0x9a2b3c);}(_0x9a2b,0x118));var _0x4f57=function(_0x2aed34,_0x9a2b3c){_0x2aed34=_0x2aed34-0x0;var _0x4f570c=_0x9a2b[_0x2aed34];return _0x4f570c;};import{ObservableMixin as _0x4e427e,uid as _0x4bc2f4}from'ckeditor5/src/utils.js';export default class r extends _0x4e427e(){constructor(_0x4fb480){super(),this['id']=_0x4fb480['id']||_0x4bc2f4(),this[_0x4f57('0x3')]=_0x4fb480[_0x4f57('0x3')],this['type']=_0x4fb480[_0x4f57('0x4')],this['data']=_0x4fb480['data']||{},this['rootName']=_0x4fb480[_0x4f57('0x0')],this[_0x4f57('0x1')]('createdAt',_0x4fb480['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this[_0x4f57('0x3')]['id'],'type':this[_0x4f57('0x4')],'data':this['data'],'createdAt':this[_0x4f57('0x2')]};}}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module revision-history/editor/revisionviewereditor
|
|
7
7
|
*/
|
|
8
|
-
import { Editor, type EditorConfig } from 'ckeditor5/src/core';
|
|
9
|
-
import RevisionViewerEditorUI from './revisionviewereditorui';
|
|
10
|
-
declare const RevisionViewerEditor_base: import("@ckeditor/ckeditor5-utils").Mixed<import("@ckeditor/ckeditor5-utils").Mixed<typeof Editor, import("ckeditor5/src/core").ElementApi>, import("ckeditor5/src/core").DataApi>;
|
|
8
|
+
import { Editor, type EditorConfig } from 'ckeditor5/src/core.js';
|
|
9
|
+
import RevisionViewerEditorUI from './revisionviewereditorui.js';
|
|
10
|
+
declare const RevisionViewerEditor_base: import("@ckeditor/ckeditor5-utils").Mixed<import("@ckeditor/ckeditor5-utils").Mixed<typeof Editor, import("ckeditor5/src/core.js").ElementApi>, import("ckeditor5/src/core.js").DataApi>;
|
|
11
11
|
/**
|
|
12
12
|
* Editor class used to show revision comparisons.
|
|
13
13
|
*/
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x436b=['get','locale','editing','data','ready','updateSourceElement','sourceElement','model','fire','destroy','initPlugins','view','create','createRoot','_ui','document'];(function(_0x368646,_0x436bac){const _0x270f3a=function(_0x1e8ee1){while(--_0x1e8ee1){_0x368646['push'](_0x368646['shift']());}};_0x270f3a(++_0x436bac);}(_0x436b,0x149));const _0x270f=function(_0x368646,_0x436bac){_0x368646=_0x368646-0x0;let _0x270f3a=_0x436b[_0x368646];return _0x270f3a;};import{Editor as _0x347223,DataApiMixin as _0x313476,ElementApiMixin as _0xaa90aa}from'ckeditor5/src/core.js';import _0x92cf0e from'./revisionviewereditorui.js';import _0x4f0a51 from'./revisionviewereditoruiview.js';export default class m extends _0x313476(_0xaa90aa(_0x347223)){get['ui'](){return this[_0x270f('0x5')];}constructor(_0x490c4e,_0x5ec1ac){super(_0x5ec1ac),this[_0x270f('0xd')]=_0x490c4e,this[_0x270f('0xe')][_0x270f('0x6')][_0x270f('0x4')]();const _0x520d4f=new _0x4f0a51(this[_0x270f('0x8')],this[_0x270f('0x9')][_0x270f('0x2')],{'shouldToolbarGroupWhenFull':!0x0});this[_0x270f('0x5')]=new _0x92cf0e(this,_0x520d4f);}[_0x270f('0x0')](){return this[_0x270f('0xc')](),this['ui'][_0x270f('0x0')](),super[_0x270f('0x0')]();}static async[_0x270f('0x3')](_0x33e83,_0x3267c7){const _0x3f081f=new this(_0x33e83,_0x3267c7);return await _0x3f081f[_0x270f('0x1')](),await _0x3f081f['ui']['init'](_0x33e83),await _0x3f081f[_0x270f('0xa')]['init'](_0x3f081f['config'][_0x270f('0x7')]('initialData')||''),_0x3f081f[_0x270f('0xf')](_0x270f('0xb')),_0x3f081f;}}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module revision-history/editor/revisionviewereditorui
|
|
7
7
|
*/
|
|
8
|
-
import type { Editor } from 'ckeditor5/src/core';
|
|
9
|
-
import { EditorUI } from 'ckeditor5/src/ui';
|
|
10
|
-
import type RevisionViewerEditorUIView from './revisionviewereditoruiview';
|
|
8
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { EditorUI } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import type RevisionViewerEditorUIView from './revisionviewereditoruiview.js';
|
|
11
11
|
export default class RevisionViewerEditorUI extends EditorUI {
|
|
12
12
|
get view(): RevisionViewerEditorUIView;
|
|
13
13
|
constructor(editor: Editor, view: RevisionViewerEditorUIView);
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x44e8=['bind','document','config','render','view','element','name','limiterElement','focusTracker','editable','addToolbar','destroy','restore','_elementReplacer','_view','setEditableElement','toolbar','editing','_initToolbar','isActive','componentFactory','get','detachDomRoot','stickyPanel','viewportOffset','attachDomRoot','_toolbarConfig','viewportTopOffset','isFocused'];(function(_0x4b7c6a,_0x44e828){const _0x13e469=function(_0x3a8a2b){while(--_0x3a8a2b){_0x4b7c6a['push'](_0x4b7c6a['shift']());}};_0x13e469(++_0x44e828);}(_0x44e8,0x1a1));const _0x13e4=function(_0x4b7c6a,_0x44e828){_0x4b7c6a=_0x4b7c6a-0x0;let _0x13e469=_0x44e8[_0x4b7c6a];return _0x13e469;};import{EditorUI as _0x292eb4,normalizeToolbarConfig as _0x5efa0e}from'ckeditor5/src/ui.js';import{ElementReplacer as _0x1e2430}from'ckeditor5/src/utils.js';export default class ot extends _0x292eb4{get[_0x13e4('0x16')](){return this['_view'];}constructor(_0x314956,_0x1c88ed){super(_0x314956),this[_0x13e4('0x3')]=_0x1c88ed,this[_0x13e4('0xf')]=_0x5efa0e(_0x314956[_0x13e4('0x14')][_0x13e4('0xa')](_0x13e4('0x5'))),this[_0x13e4('0x2')]=new _0x1e2430();}get[_0x13e4('0x17')](){return this[_0x13e4('0x16')][_0x13e4('0x17')];}['init'](_0x97b188){const _0x30d262=this['editor'],_0x3f2e48=this[_0x13e4('0x16')],_0x21576a=_0x30d262[_0x13e4('0x6')][_0x13e4('0x16')],_0x3566d9=_0x3f2e48[_0x13e4('0x1b')],_0x56b932=_0x21576a[_0x13e4('0x13')]['getRoot']();_0x3566d9[_0x13e4('0x18')]=_0x56b932['rootName'],_0x3f2e48[_0x13e4('0x15')]();const _0x55cc2a=_0x3566d9[_0x13e4('0x17')];this[_0x13e4('0x4')](_0x3566d9[_0x13e4('0x18')],_0x55cc2a),_0x3f2e48[_0x13e4('0x1b')][_0x13e4('0x12')](_0x13e4('0x11'))['to'](this['focusTracker']),_0x21576a[_0x13e4('0xe')](_0x55cc2a),this[_0x13e4('0x2')]['replace'](_0x97b188,this[_0x13e4('0x17')]),this[_0x13e4('0x7')](),this['fire']('ready');}['destroy'](){super[_0x13e4('0x0')]();const _0x55010d=this['view'],_0x1d4fb2=this['editor'][_0x13e4('0x6')]['view'];this[_0x13e4('0x2')][_0x13e4('0x1')](),_0x1d4fb2[_0x13e4('0xb')](_0x55010d[_0x13e4('0x1b')]['name']),_0x55010d[_0x13e4('0x0')]();}[_0x13e4('0x7')](){const _0x2b05bf=this[_0x13e4('0x16')];_0x2b05bf[_0x13e4('0xc')][_0x13e4('0x12')](_0x13e4('0x8'))['to'](this[_0x13e4('0x1a')],_0x13e4('0x11')),_0x2b05bf[_0x13e4('0xc')][_0x13e4('0x19')]=_0x2b05bf[_0x13e4('0x17')],_0x2b05bf[_0x13e4('0xc')][_0x13e4('0x12')](_0x13e4('0x10'))['to'](this,_0x13e4('0xd'),({top:_0x2884ab})=>_0x2884ab),_0x2b05bf[_0x13e4('0x5')]['fillFromConfig'](this[_0x13e4('0xf')],this[_0x13e4('0x9')]),this[_0x13e4('0x1c')](_0x2b05bf['toolbar']);}}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module revision-history/editor/revisionviewereditoruiview
|
|
7
7
|
*/
|
|
8
|
-
import { BoxedEditorUIView, InlineEditableUIView, StickyPanelView, ToolbarView } from 'ckeditor5/src/ui';
|
|
9
|
-
import type { View } from 'ckeditor5/src/engine';
|
|
10
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
8
|
+
import { BoxedEditorUIView, InlineEditableUIView, StickyPanelView, ToolbarView } from 'ckeditor5/src/ui.js';
|
|
9
|
+
import type { View } from 'ckeditor5/src/engine.js';
|
|
10
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
11
11
|
import '@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css';
|
|
12
12
|
export default class RevisionViewerEditorUIView extends BoxedEditorUIView {
|
|
13
13
|
/**
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x4e12=['render','shouldToolbarGroupWhenFull','_editable','stickyPanel','add','top','main','toolbar','editable'];(function(_0x4e906a,_0x4e1231){var _0xe7da6e=function(_0x4e9a41){while(--_0x4e9a41){_0x4e906a['push'](_0x4e906a['shift']());}};_0xe7da6e(++_0x4e1231);}(_0x4e12,0x1ae));var _0xe7da=function(_0x4e906a,_0x4e1231){_0x4e906a=_0x4e906a-0x0;var _0xe7da6e=_0x4e12[_0x4e906a];return _0xe7da6e;};import{BoxedEditorUIView as _0x357163,InlineEditableUIView as _0x3bb887,StickyPanelView as _0x5d118d,ToolbarView as _0x21fbe4}from'ckeditor5/src/ui.js';import'@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css';export default class at extends _0x357163{get[_0xe7da('0x1')](){return this['_editable'];}constructor(_0x1ba06d,_0x13a0d6,_0x70cc33={}){super(_0x1ba06d),this[_0xe7da('0x5')]=new _0x5d118d(_0x1ba06d),this[_0xe7da('0x0')]=new _0x21fbe4(_0x1ba06d,{'shouldGroupWhenFull':_0x70cc33[_0xe7da('0x3')]}),this[_0xe7da('0x4')]=new _0x3bb887(_0x1ba06d,_0x13a0d6);}[_0xe7da('0x2')](){super[_0xe7da('0x2')](),this['stickyPanel']['content'][_0xe7da('0x6')](this[_0xe7da('0x0')]),this[_0xe7da('0x7')][_0xe7da('0x6')](this[_0xe7da('0x5')]),this[_0xe7da('0x8')][_0xe7da('0x6')](this[_0xe7da('0x1')]);}}
|
package/src/index.d.ts
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
export { default as RevisionHistory } from './revisionhistory';
|
|
6
|
-
export { default as RevisionsRepository } from './revisionsrepository';
|
|
7
|
-
export { default as RevisionViewerLoadingOverlay } from './ui/revisionviewer/revisionviewerloadingoverlay';
|
|
8
|
-
export { default as RevisionHistoryUI } from './ui/revisionhistory/revisionhistoryui';
|
|
9
|
-
export { default as RevisionTracker } from './revisiontracker';
|
|
10
|
-
export { default as RevisionViewer, type RestoreRevisionCommand, type ShowChangeCommand } from './revisionviewer';
|
|
11
|
-
export { default as RevisionsSidebar } from './ui/revisionssidebar/revisionssidebar';
|
|
12
|
-
export { default as RevisionViewerUI } from './ui/revisionviewer/revisionviewerui';
|
|
13
|
-
export type { RevisionData } from './revision';
|
|
14
|
-
export type { RevisionHistoryConfig } from './revisionhistoryconfig';
|
|
15
|
-
import './augmentation';
|
|
5
|
+
export { default as RevisionHistory } from './revisionhistory.js';
|
|
6
|
+
export { default as RevisionsRepository } from './revisionsrepository.js';
|
|
7
|
+
export { default as RevisionViewerLoadingOverlay } from './ui/revisionviewer/revisionviewerloadingoverlay.js';
|
|
8
|
+
export { default as RevisionHistoryUI } from './ui/revisionhistory/revisionhistoryui.js';
|
|
9
|
+
export { default as RevisionTracker } from './revisiontracker.js';
|
|
10
|
+
export { default as RevisionViewer, type RestoreRevisionCommand, type ShowChangeCommand } from './revisionviewer.js';
|
|
11
|
+
export { default as RevisionsSidebar } from './ui/revisionssidebar/revisionssidebar.js';
|
|
12
|
+
export { default as RevisionViewerUI } from './ui/revisionviewer/revisionviewerui.js';
|
|
13
|
+
export type { RevisionData } from './revision.js';
|
|
14
|
+
export type { RevisionHistoryConfig } from './revisionhistoryconfig.js';
|
|
15
|
+
import './augmentation.js';
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export{default as RevisionHistory}from'./revisionhistory';export{default as RevisionsRepository}from'./revisionsrepository';export{default as RevisionViewerLoadingOverlay}from'./ui/revisionviewer/revisionviewerloadingoverlay';export{default as RevisionHistoryUI}from'./ui/revisionhistory/revisionhistoryui';export{default as RevisionTracker}from'./revisiontracker';export{default as RevisionViewer}from'./revisionviewer';export{default as RevisionsSidebar}from'./ui/revisionssidebar/revisionssidebar';export{default as RevisionViewerUI}from'./ui/revisionviewer/revisionviewerui';import'./augmentation';
|
|
23
|
+
export{default as RevisionHistory}from'./revisionhistory.js';export{default as RevisionsRepository}from'./revisionsrepository.js';export{default as RevisionViewerLoadingOverlay}from'./ui/revisionviewer/revisionviewerloadingoverlay.js';export{default as RevisionHistoryUI}from'./ui/revisionhistory/revisionhistoryui.js';export{default as RevisionTracker}from'./revisiontracker.js';export{default as RevisionViewer}from'./revisionviewer.js';export{default as RevisionsSidebar}from'./ui/revisionssidebar/revisionssidebar.js';export{default as RevisionViewerUI}from'./ui/revisionviewer/revisionviewerui.js';import'./augmentation.js';
|
package/src/revision.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import type { User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
5
|
+
import type { User } from 'ckeditor5-collaboration/src/collaboration-core.js';
|
|
6
6
|
declare const Revision_base: {
|
|
7
|
-
new (): import("ckeditor5/src/utils").Observable;
|
|
8
|
-
prototype: import("ckeditor5/src/utils").Observable;
|
|
7
|
+
new (): import("ckeditor5/src/utils.js").Observable;
|
|
8
|
+
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* Represents a revision.
|
package/src/revision.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x29f1=['diffData','map','createdAt','fire','removeAttribute','setAttribute','authorsIds','creatorId','set','creator','name','attributes','_update','setName','toVersion','fromVersion','authors'];(function(_0x14aa68,_0x29f181){const _0x1be921=function(_0x19997e){while(--_0x19997e){_0x14aa68['push'](_0x14aa68['shift']());}};_0x1be921(++_0x29f181);}(_0x29f1,0xba));const _0x1be9=function(_0x14aa68,_0x29f181){_0x14aa68=_0x14aa68-0x0;let _0x1be921=_0x29f1[_0x14aa68];return _0x1be921;};import{ObservableMixin as _0x307f75,uid as _0xe68427}from'ckeditor5/src/utils.js';import{cloneDeep as _0x634745,set as _0x2baea9,unset as _0x5c93bc}from'lodash-es';export default class a extends _0x307f75(){constructor(_0x3814b8){super(),this['id']=_0x3814b8['id']||_0xe68427(),this['creator']=_0x3814b8['creator']||null,this[_0x1be9('0x0')]=_0x3814b8[_0x1be9('0x0')]||[],this['diffData']=_0x3814b8[_0x1be9('0x1')]||null,this[_0x1be9('0xf')]=_0x3814b8['toVersion']||0x0,this[_0x1be9('0x10')]=_0x3814b8[_0x1be9('0x10')]||0x0,this[_0x1be9('0x9')](_0x1be9('0xb'),_0x3814b8[_0x1be9('0xb')]||''),this[_0x1be9('0x9')]('createdAt',_0x3814b8[_0x1be9('0x3')]||new Date()),this[_0x1be9('0x9')](_0x1be9('0xc'),_0x3814b8['attributes']||{});}[_0x1be9('0xe')](_0x35269c){this['_update']({'name':_0x35269c});}[_0x1be9('0x6')](_0x54e0e9,_0x1c588){const _0x905757=_0x634745(this[_0x1be9('0xc')]);_0x2baea9(_0x905757,_0x54e0e9,_0x1c588),this[_0x1be9('0xd')]({'attributes':_0x905757});}[_0x1be9('0x5')](_0x3e4e01){const _0x2b1c6e=_0x634745(this[_0x1be9('0xc')]);_0x5c93bc(_0x2b1c6e,_0x3e4e01),this[_0x1be9('0xd')]({'attributes':_0x2b1c6e});}[_0x1be9('0xd')](_0x16b401,_0x2079dd=!0x1){let _0xb7225a=!0x1;const _0x8ca7a0={'id':this['id']},_0x2efa90=[_0x1be9('0xb'),_0x1be9('0x3'),'diffData','authors',_0x1be9('0xc'),'toVersion',_0x1be9('0x10'),_0x1be9('0x8')];for(const _0x27ae32 of _0x2efa90){const _0x1bbd94=_0x16b401[_0x27ae32];void 0x0!==_0x1bbd94&&_0x1bbd94!==this[_0x27ae32]&&(this[_0x27ae32]=_0x1bbd94,_0x8ca7a0[_0x27ae32]=_0x1bbd94,_0xb7225a=!0x0);}_0xb7225a&&(_0x8ca7a0[_0x1be9('0x0')]&&(_0x8ca7a0[_0x1be9('0x7')]=_0x8ca7a0[_0x1be9('0x0')][_0x1be9('0x2')](_0x235e74=>_0x235e74['id']),delete _0x8ca7a0[_0x1be9('0x0')]),this[_0x1be9('0x4')](_0x1be9('0xd'),_0x8ca7a0,_0x2079dd));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this[_0x1be9('0xa')]['id']:null,'authorsIds':this['authors'][_0x1be9('0x2')](_0x4d0d4c=>_0x4d0d4c['id']),'diffData':this[_0x1be9('0x1')],'createdAt':this[_0x1be9('0x3')],'attributes':this[_0x1be9('0xc')],'fromVersion':this[_0x1be9('0x10')],'toVersion':this[_0x1be9('0xf')]};}}
|
package/src/revisiondiff.d.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module revision-history/revisiondiff
|
|
7
7
|
*/
|
|
8
|
-
import { Collection } from 'ckeditor5/src/utils';
|
|
9
|
-
import type { DocumentFragment } from 'ckeditor5/src/engine';
|
|
10
|
-
import type ChangeItem from './changeitem';
|
|
8
|
+
import { Collection } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import type { DocumentFragment } from 'ckeditor5/src/engine.js';
|
|
10
|
+
import type ChangeItem from './changeitem.js';
|
|
11
11
|
/**
|
|
12
12
|
* Represents a difference between two document revisions.
|
|
13
13
|
*/
|
package/src/revisiondiff.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x121e=['changes','oldRevisionId','add','_setChanges'];(function(_0x220a45,_0x121e66){const _0x58db0c=function(_0x3cf18f){while(--_0x3cf18f){_0x220a45['push'](_0x220a45['shift']());}};_0x58db0c(++_0x121e66);}(_0x121e,0xf3));const _0x58db=function(_0x220a45,_0x121e66){_0x220a45=_0x220a45-0x0;let _0x58db0c=_0x121e[_0x220a45];return _0x58db0c;};import{Collection as _0x1afdbb}from'ckeditor5/src/utils.js';export default class f{constructor(_0x1529a4,_0x5c2b75){this['newRevisionId']=_0x1529a4,this[_0x58db('0x2')]=_0x5c2b75,this[_0x58db('0x1')]=new _0x1afdbb();}[_0x58db('0x0')](_0x4239d0){for(const _0x22d9a7 of _0x4239d0)this['changes'][_0x58db('0x3')](_0x22d9a7);}}
|
package/src/revisionhistory.d.ts
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* @module revision-history/revisionhistory
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
10
|
-
import type { Item, Position } from 'ckeditor5/src/engine';
|
|
11
|
-
import RevisionTracker from './revisiontracker';
|
|
12
|
-
import RevisionHistoryUI from './ui/revisionhistory/revisionhistoryui';
|
|
13
|
-
import type { default as Revision, RevisionJSON } from './revision';
|
|
14
|
-
import type { RevisionHistoryAdapter } from './revisionhistoryadapter';
|
|
9
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import type { Item, Position } from 'ckeditor5/src/engine.js';
|
|
11
|
+
import RevisionTracker from './revisiontracker.js';
|
|
12
|
+
import RevisionHistoryUI from './ui/revisionhistory/revisionhistoryui.js';
|
|
13
|
+
import type { default as Revision, RevisionJSON } from './revision.js';
|
|
14
|
+
import type { RevisionHistoryAdapter } from './revisionhistoryadapter.js';
|
|
15
15
|
/**
|
|
16
16
|
* The revision history feature.
|
|
17
17
|
*
|
package/src/revisionhistory.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x44e6=['config','RestrictedEditingMode','has','keys','selection','_getRevisionViewerEditorConfig','rootName','Restored','none','isReady','catch','enableReadOnlyMode','error','change','_enhanceShowRevisionViewerCallback','revisionHistory.restoreRevisionCallback','saveRevision','requires','_closeRevisionViewer','bind','plugins','display','revisionHistory.editorContainer','addRoot','insert','style','isAnonymous','setAttribute','_cleanUp','get','adapter','_showRevisionViewer','pluginName','creator','editor','result','name','refreshVisibility','_viewerEditor','markers','getRevisionData','createRangeIn','from','then','removeSelectionAttribute','toLocaleDateString','Autosave','detachRoot','model','Annotations','closeRevisionViewerCallback','_enhanceCloseRevisionViewerCallback','isReadOnly','getRoot','isAttached','setSelection','block','disableReadOnlyMode','toVersion','fromVersion','removeMarker','toLocaleTimeString','numeric','_restoreRevision','revisionHistory','refreshPositioning','getRevisions','RevisionHistoryUI','lazyRoots','revisionHistory.viewerEditorElement','addUser','PaginationLookup','_recalculatePageBreaks','revision-history-viewer-opened','isEnabled','roots','indexOf','getRevisionRootsAttributes','revision-history-missing-configuration','addRevisionData','createdAt','RevisionHistory','save','$graveyard','RevisionsRepository','revisionHistory.showRevisionViewerCallback','revisionHistory.closeRevisionViewerCallback','includes','repository','getRevision','showRevisionViewerCallback','exitToEditing','removeAttribute','toJSON','document','create','long','define','getMarkersGroup','restrictedEditingException','Users','RevisionViewer','enqueueChange','RevisionTracker','locale','_update','restoreRevision','getAttributeKeys','users','set','remove'];(function(_0x32038c,_0x44e623){const _0x4e77ca=function(_0x2ece01){while(--_0x2ece01){_0x32038c['push'](_0x32038c['shift']());}};_0x4e77ca(++_0x44e623);}(_0x44e6,0x136));const _0x4e77=function(_0x32038c,_0x44e623){_0x32038c=_0x32038c-0x0;let _0x4e77ca=_0x44e6[_0x32038c];return _0x4e77ca;};import{Plugin as _0x44c0ad}from'ckeditor5/src/core';import{CKEditorError as _0x5aa405,uid as _0x2c87c5}from'ckeditor5/src/utils';import _0x4b5206 from'./revisiontracker';import _0x45e943 from'./ui/revisionhistory/revisionhistoryui';import _0x3858df from'./revisionviewer';import _0x59cb from'./ui/revisionviewer/revisionviewerui';import _0x4c9dfc from'./ui/revisionssidebar/revisionssidebar';import _0x392a54 from'./editor/revisionviewereditor';import{getTranslation as _0x3b36ec}from'./utils/common-translations';import{sanitizeEditorConfig as _0x1dd1b6}from'ckeditor5-collaboration/src/collaboration-core';const g=[_0x4e77('0x5a'),_0x4e77('0x18')];class k extends _0x44c0ad{static get[_0x4e77('0x37')](){return'RevisionViewerIntegration';}constructor(_0x576674){super(_0x576674),this[_0x4e77('0x3a')]='end';}}export default class b extends _0x44c0ad{static get['pluginName'](){return _0x4e77('0x68');}static get[_0x4e77('0x28')](){return[_0x4b5206,_0x45e943];}constructor(_0x5951af){if(super(_0x5951af),!this[_0x4e77('0x39')]['config'][_0x4e77('0x34')]('revisionHistory'))throw new _0x5aa405(_0x4e77('0x65'),this);this[_0x4e77('0x3d')]=null,this['editor']['config'][_0x4e77('0x9')](_0x4e77('0x6c'),_0x150171=>this[_0x4e77('0x36')](_0x150171)),this[_0x4e77('0x39')][_0x4e77('0x17')][_0x4e77('0x9')](_0x4e77('0x6d'),_0x4ec6b6=>this[_0x4e77('0x29')](_0x4ec6b6)),this[_0x4e77('0x39')][_0x4e77('0x17')][_0x4e77('0x9')](_0x4e77('0x26'),_0x596622=>this[_0x4e77('0x56')](_0x596622)),this[_0x4e77('0x25')](),this[_0x4e77('0x4a')]();}set[_0x4e77('0x35')](_0x21223e){this[_0x4e77('0x39')][_0x4e77('0x2b')]['get'](_0x4e77('0xf'))[_0x4e77('0x35')]=_0x21223e;}get['adapter'](){return this[_0x4e77('0x39')][_0x4e77('0x2b')]['get'](_0x4e77('0xf'))[_0x4e77('0x35')];}[_0x4e77('0x66')](_0x447ab9){return this['editor'][_0x4e77('0x2b')][_0x4e77('0x34')](_0x4e77('0xf'))[_0x4e77('0x66')](_0x447ab9);}[_0x4e77('0x1')](_0x66ffc){return this[_0x4e77('0x39')][_0x4e77('0x2b')]['get']('RevisionsRepository')['getRevision'](_0x66ffc);}[_0x4e77('0x59')](_0x3ab8a6={'toJSON':!0x1}){return this[_0x4e77('0x39')][_0x4e77('0x2b')]['get'](_0x4e77('0x6b'))[_0x4e77('0x59')](_0x3ab8a6);}[_0x4e77('0x1c')](){const _0x528ac5=this['editor'],_0x4a0f42=_0x1dd1b6(_0x528ac5,g),_0x579339=_0x528ac5[_0x4e77('0x2b')][_0x4e77('0x34')](_0x4e77('0xf')),_0x1cad64=_0x528ac5['plugins'][_0x4e77('0x34')](_0x4e77('0xc'))[_0x4e77('0x14')];return _0x4a0f42['toolbar']=[_0x4e77('0x3'),_0x4e77('0x12'),'changesNavigation'],delete _0x4a0f42[_0x4e77('0x5b')],(_0x4a0f42['plugins']['push'](k,_0x3858df,_0x59cb,class extends _0x44c0ad{static get[_0x4e77('0x28')](){return[_0x3858df,_0x4e77('0xc')];}['init'](){const _0xd766ee=this[_0x4e77('0x39')][_0x4e77('0x2b')][_0x4e77('0x34')](_0x4e77('0xc'));for(const _0x35b3b6 of _0x1cad64)_0x35b3b6[_0x4e77('0x31')]||_0xd766ee['getUser'](_0x35b3b6['id'])||_0xd766ee[_0x4e77('0x5d')](_0x35b3b6);const _0x159547=_0x579339[_0x4e77('0x0')][_0x4e77('0x59')]();let _0x344dbc=null;const _0xba047a=this[_0x4e77('0x39')][_0x4e77('0x2b')][_0x4e77('0x34')]('RevisionViewer');_0xba047a[_0x4e77('0x35')]=_0x579339['adapter'],_0xba047a['bind'](_0x4e77('0x61'))['to'](_0x579339),this[_0x4e77('0x39')]['commands']['get']('restoreRevision')[_0x4e77('0x2a')](_0x4e77('0x61'))['to'](_0x528ac5,_0x4e77('0x4b'),_0x3a37d9=>!_0x3a37d9);for(const _0xa6716c of _0x159547){const _0x3a2ff4=null===_0xa6716c[_0x4e77('0x38')];if(_0x3a2ff4&&_0xa6716c[_0x4e77('0x51')]===_0xa6716c[_0x4e77('0x52')])continue;const _0x55311a=_0xa6716c[_0x4e77('0x5')]();_0xba047a[_0x4e77('0x66')](_0x55311a,(_0x2ec96b,_0x4d9c51,_0x56834e)=>{if(_0x3a2ff4){if(_0x344dbc)_0x344dbc[_0x4e77('0x11')](_0x2ec96b,_0x4d9c51);else{if(!_0x4d9c51){const _0xaf557d=_0x56834e[_0x4e77('0x5')]();_0xaf557d['id']=_0x2c87c5(),_0x579339[_0x4e77('0x27')](_0xaf557d,_0x56834e[_0x4e77('0x51')])[_0x4e77('0x42')](_0x9ee056=>{_0x344dbc=_0x9ee056;});}}}else _0xa6716c['_update'](_0x2ec96b,_0x4d9c51);});}}},_0x4c9dfc),_0x4a0f42);}['_enhanceShowRevisionViewerCallback'](){const _0x95b715=this['editor'][_0x4e77('0x17')][_0x4e77('0x34')](_0x4e77('0x57'))[_0x4e77('0x2')];this[_0x4e77('0x39')][_0x4e77('0x17')][_0x4e77('0x15')](_0x4e77('0x6c'),async()=>{this[_0x4e77('0x39')][_0x4e77('0x22')](_0x4e77('0x60'));const _0x1f8ac7=this[_0x4e77('0x39')][_0x4e77('0x2b')]['get'](_0x4e77('0xf'));if(this[_0x4e77('0x39')][_0x4e77('0x2b')][_0x4e77('0x19')](_0x4e77('0x45'))){const _0x562d8d=this[_0x4e77('0x39')][_0x4e77('0x2b')][_0x4e77('0x34')]('Autosave');await _0x562d8d[_0x4e77('0x69')]();}else await _0x1f8ac7['update']();this['editor'][_0x4e77('0x2b')][_0x4e77('0x19')]('PaginationLookup')&&this[_0x4e77('0x39')][_0x4e77('0x2b')][_0x4e77('0x34')](_0x4e77('0x5e'))[_0x4e77('0x5f')]();const _0x48408b=this[_0x4e77('0x1c')]();return _0x95b715(_0x48408b)['then'](_0x30c5db=>{return(this['_viewerEditor']=_0x30c5db,this[_0x4e77('0x39')][_0x4e77('0x2b')][_0x4e77('0x19')](_0x4e77('0x48')))&&this[_0x4e77('0x39')][_0x4e77('0x2b')][_0x4e77('0x34')]('Annotations')['refreshVisibility'](),_0x30c5db;})[_0x4e77('0x21')](_0x2549c7=>(console[_0x4e77('0x23')](_0x2549c7),this[_0x4e77('0x39')][_0x4e77('0x50')](_0x4e77('0x60')),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4880d8=this['editor'][_0x4e77('0x17')][_0x4e77('0x34')](_0x4e77('0x57'))['closeRevisionViewerCallback'];this[_0x4e77('0x39')]['config']['set'](_0x4e77('0x6d'),()=>(this[_0x4e77('0x39')][_0x4e77('0x2b')][_0x4e77('0x19')](_0x4e77('0x5e'))&&this[_0x4e77('0x39')]['plugins'][_0x4e77('0x34')](_0x4e77('0x5e'))[_0x4e77('0x5f')](),this[_0x4e77('0x3d')]['plugins'][_0x4e77('0x34')](_0x4e77('0xd'))[_0x4e77('0x33')](),_0x4880d8(this['_viewerEditor'])[_0x4e77('0x42')](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this[_0x4e77('0x3d')]=null,this[_0x4e77('0x39')]['plugins'][_0x4e77('0x19')]('Annotations')){const _0x594269=this['editor']['plugins'][_0x4e77('0x34')](_0x4e77('0x48'));_0x594269[_0x4e77('0x3c')](),_0x594269[_0x4e77('0x58')]();}})));}[_0x4e77('0x36')](_0x1343fe){const _0x58c619=this[_0x4e77('0x39')]['config'][_0x4e77('0x34')](_0x4e77('0x2d')),_0x2f38ef=this[_0x4e77('0x39')]['config'][_0x4e77('0x34')]('revisionHistory.viewerContainer'),_0x1f3730=this[_0x4e77('0x39')][_0x4e77('0x17')][_0x4e77('0x34')](_0x4e77('0x5c'));return _0x392a54[_0x4e77('0x7')](_0x1f3730,_0x1343fe)[_0x4e77('0x42')](_0xb2a05d=>(_0x2f38ef[_0x4e77('0x30')][_0x4e77('0x2c')]=_0x4e77('0x4f'),_0x58c619[_0x4e77('0x30')][_0x4e77('0x2c')]='none',_0xb2a05d));}['_closeRevisionViewer'](_0x5e034f){const _0x5bdfb3=this[_0x4e77('0x39')][_0x4e77('0x17')][_0x4e77('0x34')]('revisionHistory.editorContainer');return this[_0x4e77('0x39')]['config'][_0x4e77('0x34')]('revisionHistory.viewerContainer')[_0x4e77('0x30')][_0x4e77('0x2c')]=_0x4e77('0x1f'),_0x5bdfb3[_0x4e77('0x30')]['display']='',_0x5e034f['destroy']();}async[_0x4e77('0x56')](_0x3c7dfb){const _0x3b9a7c=this[_0x4e77('0x39')],_0xe219ca=this['_viewerEditor'][_0x4e77('0x2b')][_0x4e77('0x34')]('RevisionViewer'),_0x1e589b=_0x3b9a7c[_0x4e77('0x2b')][_0x4e77('0x34')](_0x4e77('0xf')),_0x46687a=_0xe219ca[_0x4e77('0x0')][_0x4e77('0x1')](_0x3c7dfb);let _0x2dc68f,_0x5b217c,_0x2b25cb;try{_0x2dc68f=await _0xe219ca[_0x4e77('0x3f')](_0x46687a),_0x5b217c=await _0xe219ca[_0x4e77('0x64')](_0x46687a);}catch(_0x45fc89){return void console[_0x4e77('0x23')](_0x45fc89);}_0x3b9a7c[_0x4e77('0x47')][_0x4e77('0x24')](_0x4effeb=>{for(const _0x4acbce of Array[_0x4e77('0x41')](_0x3b9a7c[_0x4e77('0x47')][_0x4e77('0x3e')][_0x4e77('0xa')](_0x4e77('0xb'))))_0x4effeb[_0x4e77('0x53')](_0x4acbce);}),_0xe219ca[_0x4e77('0x20')]=!0x1,_0x3b9a7c[_0x4e77('0x47')][_0x4e77('0xe')](_0x27a869=>{_0x27a869[_0x4e77('0x4e')](null),_0x27a869[_0x4e77('0x43')](_0x3b9a7c[_0x4e77('0x47')][_0x4e77('0x6')][_0x4e77('0x1b')][_0x4e77('0x13')]());const _0x10bfed=Object[_0x4e77('0x1a')](_0x2dc68f);for(const _0x4cc62c of _0x3b9a7c[_0x4e77('0x47')][_0x4e77('0x6')][_0x4e77('0x62')])_0x4e77('0x6a')!=_0x4cc62c['rootName']&&_0x4cc62c[_0x4e77('0x4d')]()&&!_0x10bfed['includes'](_0x4cc62c[_0x4e77('0x1d')])&&_0x27a869[_0x4e77('0x46')](_0x4cc62c);for(const _0x815cdd of _0x10bfed){let _0x4ee885=_0x3b9a7c[_0x4e77('0x47')][_0x4e77('0x6')][_0x4e77('0x4c')](_0x815cdd);_0x4ee885&&_0x4ee885[_0x4e77('0x4d')]()||(_0x4ee885=_0x27a869[_0x4e77('0x2e')](_0x815cdd));const _0x6ce1d0=_0x5b217c[_0x815cdd],_0x15e184=Object[_0x4e77('0x1a')](_0x6ce1d0),_0x4236ca=_0x2dc68f[_0x815cdd];for(const _0x295319 of _0x4ee885[_0x4e77('0x13')]())_0x15e184[_0x4e77('0x6e')](_0x295319)||_0x27a869[_0x4e77('0x4')](_0x295319,_0x4ee885);for(const _0x34347e of _0x15e184)_0x27a869[_0x4e77('0x32')](_0x34347e,_0x5b217c[_0x815cdd][_0x34347e],_0x4ee885);_0x27a869[_0x4e77('0x16')](_0x27a869[_0x4e77('0x40')](_0x4ee885)),_0x27a869[_0x4e77('0x2f')](_0x3b9a7c['data']['parse'](_0x4236ca,_0x4ee885),_0x4ee885,0x0);}});const _0xd7c130=_0x3b36ec(_0x3b9a7c['locale'],_0x4e77('0x1e'));if(_0x46687a[_0x4e77('0x3b')])_0x2b25cb=-0x1==_0x46687a[_0x4e77('0x3b')][_0x4e77('0x63')](_0xd7c130)?_0xd7c130+':\x20'+_0x46687a[_0x4e77('0x3b')]:_0x46687a[_0x4e77('0x3b')];else _0x2b25cb=_0xd7c130+':\x20'+(_0x46687a['createdAt'][_0x4e77('0x44')](_0x3b9a7c['locale']['uiLanguage'],{'month':_0x4e77('0x8'),'day':_0x4e77('0x55')})+',\x20'+_0x46687a[_0x4e77('0x67')][_0x4e77('0x54')](_0x3b9a7c[_0x4e77('0x10')]['uiLanguage'],{'hour':_0x4e77('0x55'),'minute':_0x4e77('0x55')}));return await _0x1e589b[_0x4e77('0x27')]({'name':_0x2b25cb}),_0xe219ca[_0x4e77('0x20')]=!0x0,_0x3b9a7c[_0x4e77('0x17')][_0x4e77('0x34')]('revisionHistory')[_0x4e77('0x49')]();}}
|
|
23
|
+
const _0x2521=['result','adapter','rootName','getAttributeKeys','fromVersion','numeric','set','bind','markers','_viewerEditor','change','_cleanUp','RevisionsRepository','detachRoot','toolbar','isReadOnly','revision-history-viewer-opened','setAttribute','createRangeIn','toVersion','repository','indexOf','Users','config','remove','keys','init','revisionHistory.showRevisionViewerCallback','getRevisionData','changesNavigation','create','_showRevisionViewer','removeMarker','getRoot','revisionHistory','data','update','display','enableReadOnlyMode','Restored','addRoot','toJSON','none','saveRevision','enqueueChange','revisionHistory.closeRevisionViewerCallback','end','name','getMarkersGroup','lazyRoots','getRevisionRootsAttributes','RevisionViewer','isReady','push','revisionHistory.restoreRevisionCallback','showRevisionViewerCallback','insert','plugins','toLocaleDateString','removeSelectionAttribute','isAttached','long','document','_enhanceCloseRevisionViewerCallback','includes','then','has','RestrictedEditingMode','define','Annotations','locale','parse','isAnonymous','error','addRevisionData','refreshVisibility','getRevisions','model','requires','revisionHistory.viewerEditorElement','block','toLocaleTimeString','_recalculatePageBreaks','uiLanguage','removeAttribute','createdAt','_getRevisionViewerEditorConfig','RevisionTracker','revisionHistory.viewerContainer','editor','getRevision','PaginationLookup','$graveyard','commands','Autosave','RevisionHistoryUI','closeRevisionViewerCallback','restrictedEditingException','catch','disableReadOnlyMode','getUser','users','style','restoreRevision','revisionHistory.editorContainer','_enhanceShowRevisionViewerCallback','_restoreRevision','RevisionHistory','exitToEditing','_closeRevisionViewer','get','pluginName'];(function(_0x755732,_0x2521b7){const _0x18e85e=function(_0x464bc6){while(--_0x464bc6){_0x755732['push'](_0x755732['shift']());}};_0x18e85e(++_0x2521b7);}(_0x2521,0x82));const _0x18e8=function(_0x755732,_0x2521b7){_0x755732=_0x755732-0x0;let _0x18e85e=_0x2521[_0x755732];return _0x18e85e;};import{Plugin as _0x404544}from'ckeditor5/src/core.js';import{CKEditorError as _0x240b6f,uid as _0x5563fb}from'ckeditor5/src/utils.js';import _0x3f96d5 from'./revisiontracker.js';import _0x2d983f from'./ui/revisionhistory/revisionhistoryui.js';import _0x3c435d from'./revisionviewer.js';import _0x498490 from'./ui/revisionviewer/revisionviewerui.js';import _0x305d58 from'./ui/revisionssidebar/revisionssidebar.js';import _0xf058ef from'./editor/revisionviewereditor.js';import{getTranslation as _0x2a411a}from'./utils/common-translations.js';import{sanitizeEditorConfig as _0x4d7bb6}from'ckeditor5-collaboration/src/collaboration-core.js';const g=[_0x18e8('0x4d'),_0x18e8('0x31')];class k extends _0x404544{static get[_0x18e8('0x5d')](){return'RevisionViewerIntegration';}constructor(_0x23b295){super(_0x23b295),this[_0x18e8('0x5e')]=_0x18e8('0x1c');}}export default class b extends _0x404544{static get['pluginName'](){return _0x18e8('0x59');}static get[_0x18e8('0x3c')](){return[_0x3f96d5,_0x2d983f];}constructor(_0x2d2fe0){if(super(_0x2d2fe0),!this[_0x18e8('0x47')][_0x18e8('0x5')]['get'](_0x18e8('0x10')))throw new _0x240b6f('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor'][_0x18e8('0x5')][_0x18e8('0x32')](_0x18e8('0x9'),_0x421b7f=>this[_0x18e8('0xd')](_0x421b7f)),this[_0x18e8('0x47')][_0x18e8('0x5')][_0x18e8('0x32')](_0x18e8('0x1b'),_0x66eeb7=>this[_0x18e8('0x5b')](_0x66eeb7)),this['editor'][_0x18e8('0x5')][_0x18e8('0x32')](_0x18e8('0x24'),_0x2f86bc=>this[_0x18e8('0x58')](_0x2f86bc)),this['_enhanceShowRevisionViewerCallback'](),this[_0x18e8('0x2d')]();}set['adapter'](_0x32b54e){this[_0x18e8('0x47')][_0x18e8('0x27')][_0x18e8('0x5c')](_0x18e8('0x45'))[_0x18e8('0x5f')]=_0x32b54e;}get[_0x18e8('0x5f')](){return this[_0x18e8('0x47')][_0x18e8('0x27')][_0x18e8('0x5c')](_0x18e8('0x45'))[_0x18e8('0x5f')];}[_0x18e8('0x38')](_0x1f896f){return this[_0x18e8('0x47')][_0x18e8('0x27')]['get'](_0x18e8('0x45'))[_0x18e8('0x38')](_0x1f896f);}['getRevision'](_0x38d7ae){return this[_0x18e8('0x47')][_0x18e8('0x27')]['get'](_0x18e8('0x6a'))[_0x18e8('0x48')](_0x38d7ae);}[_0x18e8('0x3a')](_0x343097={'toJSON':!0x1}){return this['editor']['plugins'][_0x18e8('0x5c')]('RevisionsRepository')[_0x18e8('0x3a')](_0x343097);}[_0x18e8('0x44')](){const _0x220da2=this[_0x18e8('0x47')],_0x305876=_0x4d7bb6(_0x220da2,g),_0x4bc744=_0x220da2[_0x18e8('0x27')][_0x18e8('0x5c')]('RevisionTracker'),_0x450060=_0x220da2[_0x18e8('0x27')][_0x18e8('0x5c')](_0x18e8('0x4'))[_0x18e8('0x53')];return _0x305876[_0x18e8('0x6c')]=[_0x18e8('0x5a'),_0x18e8('0x55'),_0x18e8('0xb')],delete _0x305876[_0x18e8('0x1f')],(_0x305876[_0x18e8('0x27')][_0x18e8('0x23')](k,_0x3c435d,_0x498490,class extends _0x404544{static get[_0x18e8('0x3c')](){return[_0x3c435d,_0x18e8('0x4')];}[_0x18e8('0x8')](){const _0x15177b=this[_0x18e8('0x47')][_0x18e8('0x27')][_0x18e8('0x5c')](_0x18e8('0x4'));for(const _0x647b96 of _0x450060)_0x647b96[_0x18e8('0x36')]||_0x15177b[_0x18e8('0x52')](_0x647b96['id'])||_0x15177b['addUser'](_0x647b96);const _0x29b1b4=_0x4bc744[_0x18e8('0x2')][_0x18e8('0x3a')]();let _0x422115=null;const _0x471ad5=this[_0x18e8('0x47')][_0x18e8('0x27')][_0x18e8('0x5c')](_0x18e8('0x21'));_0x471ad5[_0x18e8('0x5f')]=_0x4bc744[_0x18e8('0x5f')],_0x471ad5[_0x18e8('0x65')]('isEnabled')['to'](_0x4bc744),this[_0x18e8('0x47')][_0x18e8('0x4b')]['get']('restoreRevision')[_0x18e8('0x65')]('isEnabled')['to'](_0x220da2,_0x18e8('0x6d'),_0x4c65ca=>!_0x4c65ca);for(const _0x5b95ba of _0x29b1b4){const _0x49cc98=null===_0x5b95ba['creator'];if(_0x49cc98&&_0x5b95ba[_0x18e8('0x1')]===_0x5b95ba[_0x18e8('0x62')])continue;const _0x4e807a=_0x5b95ba[_0x18e8('0x17')]();_0x471ad5[_0x18e8('0x38')](_0x4e807a,(_0x14bbef,_0x494c5f,_0x3c7151)=>{if(_0x49cc98){if(_0x422115)_0x422115['_update'](_0x14bbef,_0x494c5f);else{if(!_0x494c5f){const _0x42326e=_0x3c7151[_0x18e8('0x17')]();_0x42326e['id']=_0x5563fb(),_0x4bc744[_0x18e8('0x19')](_0x42326e,_0x3c7151['toVersion'])[_0x18e8('0x2f')](_0x26ce7b=>{_0x422115=_0x26ce7b;});}}}else _0x5b95ba['_update'](_0x14bbef,_0x494c5f);});}}},_0x305d58),_0x305876);}[_0x18e8('0x57')](){const _0x250c3d=this[_0x18e8('0x47')]['config'][_0x18e8('0x5c')](_0x18e8('0x10'))[_0x18e8('0x25')];this[_0x18e8('0x47')][_0x18e8('0x5')][_0x18e8('0x64')](_0x18e8('0x9'),async()=>{this['editor'][_0x18e8('0x14')](_0x18e8('0x6e'));const _0x16e719=this[_0x18e8('0x47')][_0x18e8('0x27')][_0x18e8('0x5c')](_0x18e8('0x45'));if(this['editor'][_0x18e8('0x27')][_0x18e8('0x30')]('Autosave')){const _0x2b0927=this[_0x18e8('0x47')]['plugins'][_0x18e8('0x5c')](_0x18e8('0x4c'));await _0x2b0927['save']();}else await _0x16e719[_0x18e8('0x12')]();this[_0x18e8('0x47')]['plugins'][_0x18e8('0x30')]('PaginationLookup')&&this[_0x18e8('0x47')]['plugins'][_0x18e8('0x5c')]('PaginationLookup')[_0x18e8('0x40')]();const _0x2aa22b=this[_0x18e8('0x44')]();return _0x250c3d(_0x2aa22b)[_0x18e8('0x2f')](_0xdddc4=>{return(this[_0x18e8('0x67')]=_0xdddc4,this[_0x18e8('0x47')][_0x18e8('0x27')][_0x18e8('0x30')](_0x18e8('0x33')))&&this['editor'][_0x18e8('0x27')][_0x18e8('0x5c')](_0x18e8('0x33'))[_0x18e8('0x39')](),_0xdddc4;})[_0x18e8('0x50')](_0x151b30=>(console[_0x18e8('0x37')](_0x151b30),this['editor'][_0x18e8('0x51')](_0x18e8('0x6e')),null));});}[_0x18e8('0x2d')](){const _0x190a91=this[_0x18e8('0x47')]['config'][_0x18e8('0x5c')](_0x18e8('0x10'))[_0x18e8('0x4e')];this['editor'][_0x18e8('0x5')]['set']('revisionHistory.closeRevisionViewerCallback',()=>(this[_0x18e8('0x47')][_0x18e8('0x27')]['has']('PaginationLookup')&&this[_0x18e8('0x47')][_0x18e8('0x27')][_0x18e8('0x5c')](_0x18e8('0x49'))['_recalculatePageBreaks'](),this[_0x18e8('0x67')][_0x18e8('0x27')][_0x18e8('0x5c')](_0x18e8('0x21'))[_0x18e8('0x69')](),_0x190a91(this[_0x18e8('0x67')])[_0x18e8('0x2f')](()=>{if(this['editor']['disableReadOnlyMode'](_0x18e8('0x6e')),this[_0x18e8('0x67')]=null,this['editor'][_0x18e8('0x27')]['has'](_0x18e8('0x33'))){const _0x56011b=this[_0x18e8('0x47')][_0x18e8('0x27')][_0x18e8('0x5c')](_0x18e8('0x33'));_0x56011b[_0x18e8('0x39')](),_0x56011b['refreshPositioning']();}})));}[_0x18e8('0xd')](_0x4ac414){const _0x551e21=this[_0x18e8('0x47')][_0x18e8('0x5')][_0x18e8('0x5c')]('revisionHistory.editorContainer'),_0x290ee1=this[_0x18e8('0x47')]['config'][_0x18e8('0x5c')](_0x18e8('0x46')),_0x246dab=this[_0x18e8('0x47')]['config'][_0x18e8('0x5c')](_0x18e8('0x3d'));return _0xf058ef[_0x18e8('0xc')](_0x246dab,_0x4ac414)[_0x18e8('0x2f')](_0x1e4fa0=>(_0x290ee1['style'][_0x18e8('0x13')]=_0x18e8('0x3e'),_0x551e21[_0x18e8('0x54')][_0x18e8('0x13')]=_0x18e8('0x18'),_0x1e4fa0));}[_0x18e8('0x5b')](_0x58aaee){const _0x37312c=this[_0x18e8('0x47')][_0x18e8('0x5')][_0x18e8('0x5c')](_0x18e8('0x56'));return this[_0x18e8('0x47')][_0x18e8('0x5')][_0x18e8('0x5c')](_0x18e8('0x46'))[_0x18e8('0x54')][_0x18e8('0x13')]='none',_0x37312c[_0x18e8('0x54')]['display']='',_0x58aaee['destroy']();}async[_0x18e8('0x58')](_0x47fda1){const _0x1ba149=this[_0x18e8('0x47')],_0x571a83=this[_0x18e8('0x67')][_0x18e8('0x27')][_0x18e8('0x5c')](_0x18e8('0x21')),_0x2ede6e=_0x1ba149[_0x18e8('0x27')]['get'](_0x18e8('0x45')),_0x546b50=_0x571a83[_0x18e8('0x2')]['getRevision'](_0x47fda1);let _0x181522,_0x4b6415,_0x7935de;try{_0x181522=await _0x571a83[_0x18e8('0xa')](_0x546b50),_0x4b6415=await _0x571a83[_0x18e8('0x20')](_0x546b50);}catch(_0x312a9c){return void console['error'](_0x312a9c);}_0x1ba149[_0x18e8('0x3b')][_0x18e8('0x68')](_0x2b48d9=>{for(const _0x499e01 of Array['from'](_0x1ba149['model'][_0x18e8('0x66')][_0x18e8('0x1e')](_0x18e8('0x4f'))))_0x2b48d9[_0x18e8('0xe')](_0x499e01);}),_0x571a83['isReady']=!0x1,_0x1ba149[_0x18e8('0x3b')][_0x18e8('0x1a')](_0x340e62=>{_0x340e62['setSelection'](null),_0x340e62[_0x18e8('0x29')](_0x1ba149[_0x18e8('0x3b')][_0x18e8('0x2c')]['selection'][_0x18e8('0x61')]());const _0x4e911c=Object[_0x18e8('0x7')](_0x181522);for(const _0x36078c of _0x1ba149['model'][_0x18e8('0x2c')]['roots'])_0x18e8('0x4a')!=_0x36078c[_0x18e8('0x60')]&&_0x36078c['isAttached']()&&!_0x4e911c[_0x18e8('0x2e')](_0x36078c[_0x18e8('0x60')])&&_0x340e62[_0x18e8('0x6b')](_0x36078c);for(const _0xf93b56 of _0x4e911c){let _0x5583ea=_0x1ba149['model'][_0x18e8('0x2c')][_0x18e8('0xf')](_0xf93b56);_0x5583ea&&_0x5583ea[_0x18e8('0x2a')]()||(_0x5583ea=_0x340e62[_0x18e8('0x16')](_0xf93b56));const _0x6d9108=_0x4b6415[_0xf93b56],_0x37308e=Object[_0x18e8('0x7')](_0x6d9108),_0x2e9a19=_0x181522[_0xf93b56];for(const _0x1c4b0b of _0x5583ea[_0x18e8('0x61')]())_0x37308e[_0x18e8('0x2e')](_0x1c4b0b)||_0x340e62[_0x18e8('0x42')](_0x1c4b0b,_0x5583ea);for(const _0x386049 of _0x37308e)_0x340e62[_0x18e8('0x6f')](_0x386049,_0x4b6415[_0xf93b56][_0x386049],_0x5583ea);_0x340e62[_0x18e8('0x6')](_0x340e62[_0x18e8('0x0')](_0x5583ea)),_0x340e62[_0x18e8('0x26')](_0x1ba149[_0x18e8('0x11')][_0x18e8('0x35')](_0x2e9a19,_0x5583ea),_0x5583ea,0x0);}});const _0x4b7315=_0x2a411a(_0x1ba149[_0x18e8('0x34')],_0x18e8('0x15'));if(_0x546b50[_0x18e8('0x1d')])_0x7935de=-0x1==_0x546b50['name'][_0x18e8('0x3')](_0x4b7315)?_0x4b7315+':\x20'+_0x546b50['name']:_0x546b50[_0x18e8('0x1d')];else _0x7935de=_0x4b7315+':\x20'+(_0x546b50[_0x18e8('0x43')][_0x18e8('0x28')](_0x1ba149['locale'][_0x18e8('0x41')],{'month':_0x18e8('0x2b'),'day':_0x18e8('0x63')})+',\x20'+_0x546b50[_0x18e8('0x43')][_0x18e8('0x3f')](_0x1ba149[_0x18e8('0x34')]['uiLanguage'],{'hour':_0x18e8('0x63'),'minute':_0x18e8('0x63')}));return await _0x2ede6e['saveRevision']({'name':_0x7935de}),_0x571a83[_0x18e8('0x22')]=!0x0,_0x1ba149[_0x18e8('0x5')][_0x18e8('0x5c')]('revisionHistory')[_0x18e8('0x4e')]();}}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* @module revision-history/revisionsrepository
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { Users } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
10
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
11
|
-
import { default as Revision, type RevisionData, type RevisionJSON } from './revision';
|
|
9
|
+
import { Users } from 'ckeditor5-collaboration/src/collaboration-core.js';
|
|
10
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
11
|
+
import { default as Revision, type RevisionData, type RevisionJSON } from './revision.js';
|
|
12
12
|
/**
|
|
13
13
|
* Manages revisions list.
|
|
14
14
|
*/
|