@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20231215.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 _0x4cd4=['repository','then','revision-history-viewer-opened','enqueueChange','isEnabled','revisionHistory.closeRevisionViewerCallback','_closeRevisionViewer','RevisionTracker','has','get','PaginationLookup','revisionHistory.viewerEditorElement','indexOf','editor','getRevisions','revisionHistory','_getRevisionViewerEditorConfig','RevisionViewer','toLocaleDateString','revision-history-missing-configuration','enableReadOnlyMode','catch','_enhanceCloseRevisionViewerCallback','closeRevisionViewerCallback','config','RestrictedEditingMode','init','_enhanceShowRevisionViewerCallback','Restored','refreshPositioning','saveRevision','uiLanguage','addUser','_recalculatePageBreaks','pluginName','getUser','RevisionsRepository','removeAttribute','keys','Autosave','getMarkersGroup','toLocaleTimeString','Annotations','document','save','exitToEditing','getRevisionData','restoreRevision','locale','creator','refreshVisibility','getAttributeKeys','toVersion','model','none','adapter','toJSON','error','data','addRevisionData','lazyRoots','createdAt','isReadOnly','name','RevisionViewerIntegration','revisionHistory.restoreRevisionCallback','remove','selection','setAttribute','style','revisionHistory.showRevisionViewerCallback','bind','define','end','_viewerEditor','getRoot','includes','insert','_showRevisionViewer','isAttached','addRoot','destroy','users','restrictedEditingException','requires','_restoreRevision','isReady','revisionHistory.editorContainer','plugins','getRevision','$graveyard','_update','createRangeIn','showRevisionViewerCallback','disableReadOnlyMode','push','Users','revisionHistory.viewerContainer','getRevisionRootsAttributes','display','markers','numeric'];(function(_0x49e090,_0x4cd433){const _0x335801=function(_0x4ba437){while(--_0x4ba437){_0x49e090['push'](_0x49e090['shift']());}};_0x335801(++_0x4cd433);}(_0x4cd4,0x19a));const _0x3358=function(_0x49e090,_0x4cd433){_0x49e090=_0x49e090-0x0;let _0x335801=_0x4cd4[_0x49e090];return _0x335801;};import{Plugin as _0x86334}from'ckeditor5/src/core';import{CKEditorError as _0xc1b2df,uid as _0x2a2bb9}from'ckeditor5/src/utils';import _0x379a9b from'./revisiontracker';import _0x2ad715 from'./ui/revisionhistory/revisionhistoryui';import _0x5885c9 from'./revisionviewer';import _0x324f42 from'./ui/revisionviewer/revisionviewerui';import _0x238e98 from'./ui/revisionssidebar/revisionssidebar';import _0x4a0963 from'./editor/revisionviewereditor';import{getTranslation as _0x1604a3}from'./utils/common-translations';import{sanitizeEditorConfig as _0x532ec1}from'ckeditor5-collaboration/src/collaboration-core';const g=['RevisionHistoryUI',_0x3358('0x17')];class k extends _0x86334{static get[_0x3358('0x20')](){return _0x3358('0x3e');}constructor(_0x37973b){super(_0x37973b),this['result']=_0x3358('0x47');}}export default class b extends _0x86334{static get[_0x3358('0x20')](){return'RevisionHistory';}static get['requires'](){return[_0x379a9b,_0x2ad715];}constructor(_0x1a975e){if(super(_0x1a975e),!this[_0x3358('0xb')][_0x3358('0x16')][_0x3358('0x7')](_0x3358('0xd')))throw new _0xc1b2df(_0x3358('0x11'),this);this[_0x3358('0x48')]=null,this['editor'][_0x3358('0x16')]['define'](_0x3358('0x44'),_0x583338=>this[_0x3358('0x4c')](_0x583338)),this[_0x3358('0xb')]['config']['define'](_0x3358('0x3'),_0x2623b1=>this[_0x3358('0x4')](_0x2623b1)),this[_0x3358('0xb')][_0x3358('0x16')][_0x3358('0x46')](_0x3358('0x3f'),_0x3dd9e9=>this[_0x3358('0x53')](_0x3dd9e9)),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set[_0x3358('0x35')](_0x54522b){this[_0x3358('0xb')][_0x3358('0x56')]['get'](_0x3358('0x5'))[_0x3358('0x35')]=_0x54522b;}get[_0x3358('0x35')](){return this[_0x3358('0xb')][_0x3358('0x56')][_0x3358('0x7')](_0x3358('0x5'))[_0x3358('0x35')];}[_0x3358('0x39')](_0x2a163f){return this['editor'][_0x3358('0x56')][_0x3358('0x7')](_0x3358('0x5'))['addRevisionData'](_0x2a163f);}[_0x3358('0x57')](_0x406cb1){return this[_0x3358('0xb')][_0x3358('0x56')]['get']('RevisionsRepository')['getRevision'](_0x406cb1);}[_0x3358('0xc')](_0x46352e={'toJSON':!0x1}){return this[_0x3358('0xb')][_0x3358('0x56')][_0x3358('0x7')](_0x3358('0x22'))[_0x3358('0xc')](_0x46352e);}[_0x3358('0xe')](){const _0x4c3fa1=this[_0x3358('0xb')],_0x5f24b6=_0x532ec1(_0x4c3fa1,g),_0x4240aa=_0x4c3fa1[_0x3358('0x56')][_0x3358('0x7')]('RevisionTracker'),_0x380dd2=_0x4c3fa1[_0x3358('0x56')]['get'](_0x3358('0x5e'))[_0x3358('0x50')];return _0x5f24b6['toolbar']=[_0x3358('0x2b'),_0x3358('0x2d'),'changesNavigation'],delete _0x5f24b6[_0x3358('0x3a')],(_0x5f24b6[_0x3358('0x56')][_0x3358('0x5d')](k,_0x5885c9,_0x324f42,class extends _0x86334{static get[_0x3358('0x52')](){return[_0x5885c9,_0x3358('0x5e')];}[_0x3358('0x18')](){const _0x14fda1=this[_0x3358('0xb')][_0x3358('0x56')]['get']('Users');for(const _0x42aa03 of _0x380dd2)_0x42aa03['isAnonymous']||_0x14fda1[_0x3358('0x21')](_0x42aa03['id'])||_0x14fda1[_0x3358('0x1e')](_0x42aa03);const _0x35da40=_0x4240aa[_0x3358('0x64')][_0x3358('0xc')]();let _0x13f0c0=null;const _0x111ab3=this[_0x3358('0xb')][_0x3358('0x56')][_0x3358('0x7')](_0x3358('0xf'));_0x111ab3[_0x3358('0x35')]=_0x4240aa[_0x3358('0x35')],_0x111ab3[_0x3358('0x45')](_0x3358('0x2'))['to'](_0x4240aa),this[_0x3358('0xb')]['commands']['get'](_0x3358('0x2d'))[_0x3358('0x45')](_0x3358('0x2'))['to'](_0x4c3fa1,_0x3358('0x3c'),_0xaba2fe=>!_0xaba2fe);for(const _0x237634 of _0x35da40){const _0x23f3fc=null===_0x237634[_0x3358('0x2f')];if(_0x23f3fc&&_0x237634['toVersion']===_0x237634['fromVersion'])continue;const _0x38a279=_0x237634[_0x3358('0x36')]();_0x111ab3[_0x3358('0x39')](_0x38a279,(_0x2c217c,_0x718cfc,_0x502791)=>{if(_0x23f3fc){if(_0x13f0c0)_0x13f0c0[_0x3358('0x59')](_0x2c217c,_0x718cfc);else{if(!_0x718cfc){const _0x407ff3=_0x502791[_0x3358('0x36')]();_0x407ff3['id']=_0x2a2bb9(),_0x4240aa[_0x3358('0x1c')](_0x407ff3,_0x502791[_0x3358('0x32')])[_0x3358('0x65')](_0x392386=>{_0x13f0c0=_0x392386;});}}}else _0x237634[_0x3358('0x59')](_0x2c217c,_0x718cfc);});}}},_0x238e98),_0x5f24b6);}[_0x3358('0x19')](){const _0x477379=this[_0x3358('0xb')][_0x3358('0x16')][_0x3358('0x7')]('revisionHistory')[_0x3358('0x5b')];this[_0x3358('0xb')][_0x3358('0x16')]['set']('revisionHistory.showRevisionViewerCallback',async()=>{this[_0x3358('0xb')][_0x3358('0x12')](_0x3358('0x0'));const _0xa19c2e=this[_0x3358('0xb')][_0x3358('0x56')][_0x3358('0x7')](_0x3358('0x5'));if(this[_0x3358('0xb')][_0x3358('0x56')][_0x3358('0x6')](_0x3358('0x25'))){const _0x57b841=this[_0x3358('0xb')][_0x3358('0x56')][_0x3358('0x7')](_0x3358('0x25'));await _0x57b841[_0x3358('0x2a')]();}else await _0xa19c2e['update']();this['editor'][_0x3358('0x56')][_0x3358('0x6')](_0x3358('0x8'))&&this['editor'][_0x3358('0x56')][_0x3358('0x7')](_0x3358('0x8'))[_0x3358('0x1f')]();const _0x32875d=this[_0x3358('0xe')]();return _0x477379(_0x32875d)[_0x3358('0x65')](_0x1bec12=>{return(this['_viewerEditor']=_0x1bec12,this[_0x3358('0xb')][_0x3358('0x56')]['has'](_0x3358('0x28')))&&this[_0x3358('0xb')][_0x3358('0x56')][_0x3358('0x7')](_0x3358('0x28'))[_0x3358('0x30')](),_0x1bec12;})[_0x3358('0x13')](_0x7bb1b4=>(console[_0x3358('0x37')](_0x7bb1b4),this['editor'][_0x3358('0x5c')](_0x3358('0x0')),null));});}[_0x3358('0x14')](){const _0x1b152a=this[_0x3358('0xb')][_0x3358('0x16')]['get'](_0x3358('0xd'))[_0x3358('0x15')];this[_0x3358('0xb')]['config']['set'](_0x3358('0x3'),()=>(this[_0x3358('0xb')][_0x3358('0x56')][_0x3358('0x6')](_0x3358('0x8'))&&this[_0x3358('0xb')][_0x3358('0x56')][_0x3358('0x7')](_0x3358('0x8'))[_0x3358('0x1f')](),this[_0x3358('0x48')]['plugins'][_0x3358('0x7')](_0x3358('0xf'))['_cleanUp'](),_0x1b152a(this['_viewerEditor'])[_0x3358('0x65')](()=>{if(this[_0x3358('0xb')][_0x3358('0x5c')]('revision-history-viewer-opened'),this[_0x3358('0x48')]=null,this[_0x3358('0xb')][_0x3358('0x56')]['has'](_0x3358('0x28'))){const _0x24f2fa=this['editor']['plugins']['get'](_0x3358('0x28'));_0x24f2fa[_0x3358('0x30')](),_0x24f2fa[_0x3358('0x1b')]();}})));}[_0x3358('0x4c')](_0x105e40){const _0x4f041a=this[_0x3358('0xb')][_0x3358('0x16')]['get']('revisionHistory.editorContainer'),_0x35d73c=this[_0x3358('0xb')][_0x3358('0x16')][_0x3358('0x7')](_0x3358('0x5f')),_0x5ea2a3=this[_0x3358('0xb')][_0x3358('0x16')][_0x3358('0x7')](_0x3358('0x9'));return _0x4a0963['create'](_0x5ea2a3,_0x105e40)[_0x3358('0x65')](_0x3d8a75=>(_0x35d73c[_0x3358('0x43')][_0x3358('0x61')]='block',_0x4f041a['style'][_0x3358('0x61')]=_0x3358('0x34'),_0x3d8a75));}[_0x3358('0x4')](_0x3cfcc5){const _0x1ab5f5=this[_0x3358('0xb')]['config'][_0x3358('0x7')](_0x3358('0x55'));return this[_0x3358('0xb')][_0x3358('0x16')][_0x3358('0x7')]('revisionHistory.viewerContainer')[_0x3358('0x43')][_0x3358('0x61')]=_0x3358('0x34'),_0x1ab5f5[_0x3358('0x43')][_0x3358('0x61')]='',_0x3cfcc5[_0x3358('0x4f')]();}async[_0x3358('0x53')](_0x1d001a){const _0x3d7754=this[_0x3358('0xb')],_0x4525db=this[_0x3358('0x48')][_0x3358('0x56')][_0x3358('0x7')](_0x3358('0xf')),_0x3a1bba=_0x3d7754['plugins'][_0x3358('0x7')]('RevisionTracker'),_0x2ab350=_0x4525db[_0x3358('0x64')][_0x3358('0x57')](_0x1d001a);let _0x462d20,_0x5ab3d7,_0xfb8299;try{_0x462d20=await _0x4525db[_0x3358('0x2c')](_0x2ab350),_0x5ab3d7=await _0x4525db[_0x3358('0x60')](_0x2ab350);}catch(_0x4bfbae){return void console[_0x3358('0x37')](_0x4bfbae);}_0x3d7754[_0x3358('0x33')]['change'](_0x3a609c=>{for(const _0x56e514 of Array['from'](_0x3d7754[_0x3358('0x33')][_0x3358('0x62')][_0x3358('0x26')](_0x3358('0x51'))))_0x3a609c['removeMarker'](_0x56e514);}),_0x4525db['isReady']=!0x1,_0x3d7754['model'][_0x3358('0x1')](_0x1aa523=>{_0x1aa523['setSelection'](null),_0x1aa523['removeSelectionAttribute'](_0x3d7754[_0x3358('0x33')][_0x3358('0x29')][_0x3358('0x41')][_0x3358('0x31')]());const _0x3c1787=Object[_0x3358('0x24')](_0x462d20);for(const _0x2ade0a of _0x3d7754[_0x3358('0x33')][_0x3358('0x29')]['roots'])_0x3358('0x58')!=_0x2ade0a['rootName']&&_0x2ade0a['isAttached']()&&!_0x3c1787[_0x3358('0x4a')](_0x2ade0a['rootName'])&&_0x1aa523['detachRoot'](_0x2ade0a);for(const _0x17f896 of _0x3c1787){let _0x1c8548=_0x3d7754['model'][_0x3358('0x29')][_0x3358('0x49')](_0x17f896);_0x1c8548&&_0x1c8548[_0x3358('0x4d')]()||(_0x1c8548=_0x1aa523[_0x3358('0x4e')](_0x17f896));const _0x52644b=_0x5ab3d7[_0x17f896],_0x301b4c=Object[_0x3358('0x24')](_0x52644b),_0x37498c=_0x462d20[_0x17f896];for(const _0x4c49a6 of _0x1c8548[_0x3358('0x31')]())_0x301b4c[_0x3358('0x4a')](_0x4c49a6)||_0x1aa523[_0x3358('0x23')](_0x4c49a6,_0x1c8548);for(const _0x19c49b of _0x301b4c)_0x1aa523[_0x3358('0x42')](_0x19c49b,_0x5ab3d7[_0x17f896][_0x19c49b],_0x1c8548);_0x1aa523[_0x3358('0x40')](_0x1aa523[_0x3358('0x5a')](_0x1c8548)),_0x1aa523[_0x3358('0x4b')](_0x3d7754[_0x3358('0x38')]['parse'](_0x37498c,_0x1c8548),_0x1c8548,0x0);}});const _0xd4f863=_0x1604a3(_0x3d7754[_0x3358('0x2e')],_0x3358('0x1a'));if(_0x2ab350[_0x3358('0x3d')])_0xfb8299=-0x1==_0x2ab350[_0x3358('0x3d')][_0x3358('0xa')](_0xd4f863)?_0xd4f863+':\x20'+_0x2ab350[_0x3358('0x3d')]:_0x2ab350['name'];else _0xfb8299=_0xd4f863+':\x20'+(_0x2ab350[_0x3358('0x3b')][_0x3358('0x10')](_0x3d7754['locale'][_0x3358('0x1d')],{'month':'long','day':_0x3358('0x63')})+',\x20'+_0x2ab350[_0x3358('0x3b')][_0x3358('0x27')](_0x3d7754['locale'][_0x3358('0x1d')],{'hour':_0x3358('0x63'),'minute':'numeric'}));return await _0x3a1bba['saveRevision']({'name':_0xfb8299}),_0x4525db[_0x3358('0x54')]=!0x0,_0x3d7754['config'][_0x3358('0x7')]('revisionHistory')['closeRevisionViewerCallback']();}}
|
|
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
|
*/
|