@ckeditor/ckeditor5-revision-history 40.1.0 → 41.0.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/LICENSE.md +1 -1
- package/README.md +11 -11
- package/build/revision-history.js +2 -2
- package/lang/translations/af.po +1 -1
- package/lang/translations/ar.po +1 -1
- package/lang/translations/az.po +1 -1
- package/lang/translations/bg.po +1 -1
- package/lang/translations/bn.po +1 -1
- package/lang/translations/bs.po +1 -1
- package/lang/translations/ca.po +1 -1
- package/lang/translations/cs.po +1 -1
- package/lang/translations/da.po +1 -1
- package/lang/translations/de-ch.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +1 -1
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/en-gb.po +1 -1
- package/lang/translations/en.po +1 -1
- package/lang/translations/es-co.po +1 -1
- package/lang/translations/es.po +1 -1
- package/lang/translations/et.po +1 -1
- package/lang/translations/fa.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/he.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/id.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/jv.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/ku.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/ms.po +1 -1
- package/lang/translations/ne.po +1 -1
- package/lang/translations/nl.po +1 -1
- package/lang/translations/no.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/pt.po +1 -1
- package/lang/translations/ro.po +1 -1
- package/lang/translations/ru.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sr-latn.po +1 -1
- package/lang/translations/sr.po +1 -1
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/tt.po +1 -1
- package/lang/translations/ug.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/ur.po +1 -1
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/lang/translations/zh.po +1 -1
- package/package.json +6 -6
- package/src/augmentation.d.ts +2 -2
- package/src/augmentation.js +1 -1
- package/src/changeitem.d.ts +4 -4
- package/src/changeitem.js +2 -2
- package/src/editor/revisionviewereditor.d.ts +4 -4
- package/src/editor/revisionviewereditor.js +2 -2
- package/src/editor/revisionviewereditorui.d.ts +4 -4
- package/src/editor/revisionviewereditorui.js +2 -2
- package/src/editor/revisionviewereditoruiview.d.ts +5 -5
- package/src/editor/revisionviewereditoruiview.js +2 -2
- package/src/index.d.ts +12 -12
- package/src/index.js +2 -2
- package/src/revision.d.ts +4 -4
- package/src/revision.js +2 -2
- package/src/revisiondiff.d.ts +4 -4
- package/src/revisiondiff.js +2 -2
- package/src/revisionhistory.d.ts +7 -7
- package/src/revisionhistory.js +2 -2
- package/src/revisionhistoryadapter.d.ts +2 -2
- package/src/revisionhistoryadapter.js +1 -1
- package/src/revisionhistoryconfig.d.ts +1 -1
- package/src/revisionhistoryconfig.js +1 -1
- package/src/revisionsrepository.d.ts +4 -4
- package/src/revisionsrepository.js +2 -2
- package/src/revisiontracker.d.ts +6 -6
- package/src/revisiontracker.js +2 -2
- package/src/revisionviewer.d.ts +1 -1
- package/src/revisionviewer.js +2 -2
- package/src/ui/revision/createrevisionactionsdropdown.d.ts +3 -3
- package/src/ui/revision/createrevisionactionsdropdown.js +2 -2
- package/src/ui/revision/revisionauthorview.d.ts +1 -1
- package/src/ui/revision/revisionauthorview.js +2 -2
- package/src/ui/revision/revisionnameview.d.ts +1 -1
- package/src/ui/revision/revisionnameview.js +2 -2
- package/src/ui/revision/revisionview.d.ts +7 -7
- package/src/ui/revision/revisionview.js +2 -2
- package/src/ui/revision/subrevisioncollapserview.d.ts +3 -3
- package/src/ui/revision/subrevisioncollapserview.js +2 -2
- package/src/ui/revision/subrevisionview.d.ts +4 -4
- package/src/ui/revision/subrevisionview.js +2 -2
- package/src/ui/revision/utils.d.ts +1 -1
- package/src/ui/revision/utils.js +2 -2
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.d.ts +3 -3
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +2 -2
- package/src/ui/revisionhistory/revisionhistoryui.d.ts +3 -3
- package/src/ui/revisionhistory/revisionhistoryui.js +2 -2
- package/src/ui/revisionssidebar/revisionssidebar.d.ts +4 -4
- package/src/ui/revisionssidebar/revisionssidebar.js +2 -2
- package/src/ui/revisionssidebar/revisionssidebarheaderview.d.ts +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +2 -2
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.d.ts +6 -6
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +2 -2
- package/src/ui/revisionssidebar/revisionssidebarview.d.ts +7 -7
- package/src/ui/revisionssidebar/revisionssidebarview.js +2 -2
- package/src/ui/revisionssidebar/utils.d.ts +1 -1
- package/src/ui/revisionssidebar/utils.js +2 -2
- package/src/ui/revisionviewer/changedetailsview.d.ts +4 -4
- package/src/ui/revisionviewer/changedetailsview.js +2 -2
- package/src/ui/revisionviewer/changesnavigationview.d.ts +3 -3
- package/src/ui/revisionviewer/changesnavigationview.js +2 -2
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.d.ts +2 -2
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +2 -2
- package/src/ui/revisionviewer/revisionviewerui.d.ts +4 -4
- package/src/ui/revisionviewer/revisionviewerui.js +2 -2
- package/src/utils/common-translations.d.ts +2 -2
- package/src/utils/common-translations.js +2 -2
- package/theme/changesnavigation.css +1 -1
- package/theme/revision/revision.css +1 -1
- package/theme/revision/revisionactions.css +1 -1
- package/theme/revision/revisionauthor.css +1 -1
- package/theme/revision/revisionname.css +1 -1
- package/theme/revision/subrevision.css +1 -1
- package/theme/revision/subrevisioncollapser.css +1 -1
- package/theme/revisionhistorysaverevisionform.css +1 -1
- package/theme/revisionssidebar/revisionssidebar.css +1 -1
- package/theme/revisionssidebar/revisionssidebarheader.css +1 -1
- package/theme/revisionssidebar/revisionssidebartimeperiod.css +1 -1
- package/theme/revisionviewer.css +1 -1
- package/theme/revisionviewerloadingoverlay.css +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
5
|
/**
|
|
6
6
|
* @module revision-history/editor/revisionviewereditoruiview
|
|
7
7
|
*/
|
|
8
|
-
import { BoxedEditorUIView, InlineEditableUIView, StickyPanelView, ToolbarView } from 'ckeditor5/src/ui';
|
|
9
|
-
import type {
|
|
10
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
8
|
+
import { BoxedEditorUIView, InlineEditableUIView, StickyPanelView, ToolbarView } from 'ckeditor5/src/ui.js';
|
|
9
|
+
import type { EditingView } 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
|
/**
|
|
@@ -27,7 +27,7 @@ export default class RevisionViewerEditorUIView extends BoxedEditorUIView {
|
|
|
27
27
|
* @param editingView The editing view instance this view is related to.
|
|
28
28
|
* @param options Configuration options for the view instance.
|
|
29
29
|
*/
|
|
30
|
-
constructor(locale: Locale, editingView:
|
|
30
|
+
constructor(locale: Locale, editingView: EditingView, options?: RevisionViewerEditorUIViewOptions);
|
|
31
31
|
/**
|
|
32
32
|
* @inheritDoc
|
|
33
33
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x2127=['toolbar','render','stickyPanel','editable','content','add','main','_editable','shouldToolbarGroupWhenFull'];(function(_0x5ce6bf,_0x212702){var _0x337ee7=function(_0x39c37d){while(--_0x39c37d){_0x5ce6bf['push'](_0x5ce6bf['shift']());}};_0x337ee7(++_0x212702);}(_0x2127,0x1ea));var _0x337e=function(_0x5ce6bf,_0x212702){_0x5ce6bf=_0x5ce6bf-0x0;var _0x337ee7=_0x2127[_0x5ce6bf];return _0x337ee7;};import{BoxedEditorUIView as _0x265d5e,InlineEditableUIView as _0x5bf5a6,StickyPanelView as _0x49d528,ToolbarView as _0x503878}from'ckeditor5/src/ui.js';import'@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css';export default class at extends _0x265d5e{get[_0x337e('0x8')](){return this[_0x337e('0x3')];}constructor(_0x3a47e1,_0x18e8f4,_0x1d2159={}){super(_0x3a47e1),this[_0x337e('0x7')]=new _0x49d528(_0x3a47e1),this[_0x337e('0x5')]=new _0x503878(_0x3a47e1,{'shouldGroupWhenFull':_0x1d2159[_0x337e('0x4')]}),this[_0x337e('0x3')]=new _0x5bf5a6(_0x3a47e1,_0x18e8f4);}[_0x337e('0x6')](){super[_0x337e('0x6')](),this[_0x337e('0x7')][_0x337e('0x0')][_0x337e('0x1')](this[_0x337e('0x5')]),this['top'][_0x337e('0x1')](this[_0x337e('0x7')]),this[_0x337e('0x2')][_0x337e('0x1')](this['editable']);}}
|
package/src/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x42fb=['_update','toJSON','fromVersion','toVersion','set','name','removeAttribute','map','attributes','createdAt','diffData','creator','authors'];(function(_0x2db5d5,_0x42fb3c){const _0x1685e2=function(_0x1e0c03){while(--_0x1e0c03){_0x2db5d5['push'](_0x2db5d5['shift']());}};_0x1685e2(++_0x42fb3c);}(_0x42fb,0x124));const _0x1685=function(_0x2db5d5,_0x42fb3c){_0x2db5d5=_0x2db5d5-0x0;let _0x1685e2=_0x42fb[_0x2db5d5];return _0x1685e2;};import{ObservableMixin as _0x273771,uid as _0x3331a4}from'ckeditor5/src/utils.js';import{cloneDeep as _0xc8dfdb,set as _0x58d3eb,unset as _0x34a349}from'lodash-es';export default class a extends _0x273771(){constructor(_0x4d14dd){super(),this['id']=_0x4d14dd['id']||_0x3331a4(),this[_0x1685('0x5')]=_0x4d14dd[_0x1685('0x5')]||null,this[_0x1685('0x6')]=_0x4d14dd[_0x1685('0x6')]||[],this[_0x1685('0x4')]=_0x4d14dd[_0x1685('0x4')]||null,this['toVersion']=_0x4d14dd[_0x1685('0xa')]||0x0,this[_0x1685('0x9')]=_0x4d14dd[_0x1685('0x9')]||0x0,this[_0x1685('0xb')](_0x1685('0xc'),_0x4d14dd[_0x1685('0xc')]||''),this[_0x1685('0xb')](_0x1685('0x3'),_0x4d14dd[_0x1685('0x3')]||new Date()),this[_0x1685('0xb')](_0x1685('0x2'),_0x4d14dd[_0x1685('0x2')]||{});}['setName'](_0x247197){this['_update']({'name':_0x247197});}['setAttribute'](_0x118f1a,_0x5aea29){const _0x3e47a9=_0xc8dfdb(this[_0x1685('0x2')]);_0x58d3eb(_0x3e47a9,_0x118f1a,_0x5aea29),this['_update']({'attributes':_0x3e47a9});}[_0x1685('0x0')](_0x5845bc){const _0x3244ae=_0xc8dfdb(this[_0x1685('0x2')]);_0x34a349(_0x3244ae,_0x5845bc),this[_0x1685('0x7')]({'attributes':_0x3244ae});}[_0x1685('0x7')](_0x2db02a,_0x1659e0=!0x1){let _0x1d4e62=!0x1;const _0x1f6317={'id':this['id']},_0x233469=[_0x1685('0xc'),_0x1685('0x3'),_0x1685('0x4'),_0x1685('0x6'),'attributes',_0x1685('0xa'),_0x1685('0x9'),'creatorId'];for(const _0x1e6acb of _0x233469){const _0x4f65a9=_0x2db02a[_0x1e6acb];void 0x0!==_0x4f65a9&&_0x4f65a9!==this[_0x1e6acb]&&(this[_0x1e6acb]=_0x4f65a9,_0x1f6317[_0x1e6acb]=_0x4f65a9,_0x1d4e62=!0x0);}_0x1d4e62&&(_0x1f6317[_0x1685('0x6')]&&(_0x1f6317['authorsIds']=_0x1f6317[_0x1685('0x6')][_0x1685('0x1')](_0x15b2a8=>_0x15b2a8['id']),delete _0x1f6317['authors']),this['fire'](_0x1685('0x7'),_0x1f6317,_0x1659e0));}[_0x1685('0x8')](){return{'id':this['id'],'name':this[_0x1685('0xc')],'creatorId':this[_0x1685('0x5')]?this[_0x1685('0x5')]['id']:null,'authorsIds':this['authors'][_0x1685('0x1')](_0x1f0e35=>_0x1f0e35['id']),'diffData':this['diffData'],'createdAt':this[_0x1685('0x3')],'attributes':this[_0x1685('0x2')],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}
|
package/src/revisiondiff.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1601=['_setChanges','changes','add','oldRevisionId'];(function(_0x58c6e6,_0x1601bf){const _0x3fb24a=function(_0x25eefd){while(--_0x25eefd){_0x58c6e6['push'](_0x58c6e6['shift']());}};_0x3fb24a(++_0x1601bf);}(_0x1601,0x1d9));const _0x3fb2=function(_0x58c6e6,_0x1601bf){_0x58c6e6=_0x58c6e6-0x0;let _0x3fb24a=_0x1601[_0x58c6e6];return _0x3fb24a;};import{Collection as _0x46d281}from'ckeditor5/src/utils.js';export default class f{constructor(_0xdc6ae2,_0x1d7193){this['newRevisionId']=_0xdc6ae2,this[_0x3fb2('0x2')]=_0x1d7193,this[_0x3fb2('0x0')]=new _0x46d281();}[_0x3fb2('0x3')](_0x3d337a){for(const _0x20566a of _0x3d337a)this[_0x3fb2('0x0')][_0x3fb2('0x1')](_0x20566a);}}
|
package/src/revisionhistory.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
5
|
/**
|
|
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x4b4e=['enqueueChange','Restored','refreshPositioning','numeric','removeSelectionAttribute','isReadOnly','revisionHistory.closeRevisionViewerCallback','editor','$graveyard','Annotations','_enhanceShowRevisionViewerCallback','then','isEnabled','revisionHistory.viewerEditorElement','removeMarker','_recalculatePageBreaks','_showRevisionViewer','save','revisionHistory.editorContainer','create','commands','Users','getAttributeKeys','rootName','destroy','lazyRoots','Autosave','document','refreshVisibility','indexOf','plugins','setSelection','requires','getRoot','keys','has','toVersion','revision-history-viewer-opened','getRevisions','isAttached','revisionHistory.showRevisionViewerCallback','PaginationLookup','exitToEditing','getRevisionRootsAttributes','toLocaleTimeString','revisionHistory','toJSON','restoreRevision','_update','data','RevisionsRepository','saveRevision','change','createRangeIn','locale','getRevision','isReady','from','fromVersion','RevisionHistoryUI','_getRevisionViewerEditorConfig','setAttribute','addUser','end','_closeRevisionViewer','disableReadOnlyMode','showRevisionViewerCallback','revisionHistory.restoreRevisionCallback','enableReadOnlyMode','update','RevisionViewer','get','RevisionViewerIntegration','name','long','creator','RevisionTracker','block','changesNavigation','getMarkersGroup','closeRevisionViewerCallback','push','selection','addRoot','_cleanUp','pluginName','uiLanguage','result','addRevisionData','adapter','style','RevisionHistory','model','_viewerEditor','error','none','set','detachRoot','removeAttribute','remove','getRevisionData','display','includes','define','createdAt','_enhanceCloseRevisionViewerCallback','insert','bind','RestrictedEditingMode','config'];(function(_0x5e33c3,_0x4b4ea6){const _0x1cebbc=function(_0x3fa25e){while(--_0x3fa25e){_0x5e33c3['push'](_0x5e33c3['shift']());}};_0x1cebbc(++_0x4b4ea6);}(_0x4b4e,0x1f0));const _0x1ceb=function(_0x5e33c3,_0x4b4ea6){_0x5e33c3=_0x5e33c3-0x0;let _0x1cebbc=_0x4b4e[_0x5e33c3];return _0x1cebbc;};import{Plugin as _0x27073e}from'ckeditor5/src/core';import{CKEditorError as _0x344fa8,uid as _0x474813}from'ckeditor5/src/utils';import _0x1867f2 from'./revisiontracker';import _0x4bfb52 from'./ui/revisionhistory/revisionhistoryui';import _0x5f2602 from'./revisionviewer';import _0x45982e from'./ui/revisionviewer/revisionviewerui';import _0x3f5c71 from'./ui/revisionssidebar/revisionssidebar';import _0x209a4a from'./editor/revisionviewereditor';import{getTranslation as _0x4010e2}from'./utils/common-translations';import{sanitizeEditorConfig as _0x2f0231}from'ckeditor5-collaboration/src/collaboration-core';const g=[_0x1ceb('0x3'),_0x1ceb('0x34')];class k extends _0x27073e{static get[_0x1ceb('0x1d')](){return _0x1ceb('0x10');}constructor(_0x11a10c){super(_0x11a10c),this[_0x1ceb('0x1f')]=_0x1ceb('0x7');}}export default class b extends _0x27073e{static get[_0x1ceb('0x1d')](){return _0x1ceb('0x23');}static get[_0x1ceb('0x56')](){return[_0x1867f2,_0x4bfb52];}constructor(_0x510863){if(super(_0x510863),!this[_0x1ceb('0x3d')]['config'][_0x1ceb('0xf')](_0x1ceb('0x63')))throw new _0x344fa8('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor'][_0x1ceb('0x35')][_0x1ceb('0x2f')](_0x1ceb('0x5e'),_0x210e99=>this[_0x1ceb('0x46')](_0x210e99)),this[_0x1ceb('0x3d')][_0x1ceb('0x35')][_0x1ceb('0x2f')](_0x1ceb('0x3c'),_0x74db51=>this[_0x1ceb('0x8')](_0x74db51)),this[_0x1ceb('0x3d')][_0x1ceb('0x35')]['define'](_0x1ceb('0xb'),_0x12664d=>this['_restoreRevision'](_0x12664d)),this[_0x1ceb('0x40')](),this[_0x1ceb('0x31')]();}set['adapter'](_0x4e8e9d){this['editor']['plugins'][_0x1ceb('0xf')]('RevisionTracker')[_0x1ceb('0x21')]=_0x4e8e9d;}get['adapter'](){return this[_0x1ceb('0x3d')][_0x1ceb('0x54')][_0x1ceb('0xf')]('RevisionTracker')[_0x1ceb('0x21')];}[_0x1ceb('0x20')](_0x51d4c0){return this[_0x1ceb('0x3d')][_0x1ceb('0x54')][_0x1ceb('0xf')]('RevisionTracker')['addRevisionData'](_0x51d4c0);}[_0x1ceb('0x6d')](_0x458886){return this[_0x1ceb('0x3d')]['plugins']['get']('RevisionsRepository')[_0x1ceb('0x6d')](_0x458886);}[_0x1ceb('0x5c')](_0x3a1dea={'toJSON':!0x1}){return this['editor'][_0x1ceb('0x54')][_0x1ceb('0xf')](_0x1ceb('0x68'))[_0x1ceb('0x5c')](_0x3a1dea);}[_0x1ceb('0x4')](){const _0x54eb77=this[_0x1ceb('0x3d')],_0x57988c=_0x2f0231(_0x54eb77,g),_0x410896=_0x54eb77[_0x1ceb('0x54')][_0x1ceb('0xf')](_0x1ceb('0x14')),_0x4cb1f4=_0x54eb77[_0x1ceb('0x54')][_0x1ceb('0xf')](_0x1ceb('0x4b'))['users'];return _0x57988c['toolbar']=[_0x1ceb('0x60'),'restoreRevision',_0x1ceb('0x16')],delete _0x57988c[_0x1ceb('0x4f')],(_0x57988c['plugins'][_0x1ceb('0x19')](k,_0x5f2602,_0x45982e,class extends _0x27073e{static get[_0x1ceb('0x56')](){return[_0x5f2602,_0x1ceb('0x4b')];}['init'](){const _0x5c1dda=this[_0x1ceb('0x3d')]['plugins'][_0x1ceb('0xf')]('Users');for(const _0x422c10 of _0x4cb1f4)_0x422c10['isAnonymous']||_0x5c1dda['getUser'](_0x422c10['id'])||_0x5c1dda[_0x1ceb('0x6')](_0x422c10);const _0x3d9967=_0x410896['repository'][_0x1ceb('0x5c')]();let _0x454b26=null;const _0x47b2a5=this['editor'][_0x1ceb('0x54')][_0x1ceb('0xf')](_0x1ceb('0xe'));_0x47b2a5[_0x1ceb('0x21')]=_0x410896[_0x1ceb('0x21')],_0x47b2a5[_0x1ceb('0x33')](_0x1ceb('0x42'))['to'](_0x410896),this['editor'][_0x1ceb('0x4a')]['get'](_0x1ceb('0x65'))[_0x1ceb('0x33')](_0x1ceb('0x42'))['to'](_0x54eb77,_0x1ceb('0x3b'),_0x59f880=>!_0x59f880);for(const _0x1cab2e of _0x3d9967){const _0x281618=null===_0x1cab2e[_0x1ceb('0x13')];if(_0x281618&&_0x1cab2e[_0x1ceb('0x5a')]===_0x1cab2e[_0x1ceb('0x2')])continue;const _0x11ec05=_0x1cab2e[_0x1ceb('0x64')]();_0x47b2a5[_0x1ceb('0x20')](_0x11ec05,(_0x11ac96,_0x3f6307,_0xda3599)=>{if(_0x281618){if(_0x454b26)_0x454b26['_update'](_0x11ac96,_0x3f6307);else{if(!_0x3f6307){const _0x1b9bb8=_0xda3599[_0x1ceb('0x64')]();_0x1b9bb8['id']=_0x474813(),_0x410896[_0x1ceb('0x69')](_0x1b9bb8,_0xda3599[_0x1ceb('0x5a')])[_0x1ceb('0x41')](_0x4e32d5=>{_0x454b26=_0x4e32d5;});}}}else _0x1cab2e[_0x1ceb('0x66')](_0x11ac96,_0x3f6307);});}}},_0x3f5c71),_0x57988c);}[_0x1ceb('0x40')](){const _0x3b84d8=this[_0x1ceb('0x3d')]['config'][_0x1ceb('0xf')]('revisionHistory')[_0x1ceb('0xa')];this['editor'][_0x1ceb('0x35')][_0x1ceb('0x28')]('revisionHistory.showRevisionViewerCallback',async()=>{this[_0x1ceb('0x3d')][_0x1ceb('0xc')](_0x1ceb('0x5b'));const _0x1c4b64=this['editor'][_0x1ceb('0x54')][_0x1ceb('0xf')](_0x1ceb('0x14'));if(this[_0x1ceb('0x3d')]['plugins'][_0x1ceb('0x59')](_0x1ceb('0x50'))){const _0x289f77=this[_0x1ceb('0x3d')][_0x1ceb('0x54')]['get'](_0x1ceb('0x50'));await _0x289f77[_0x1ceb('0x47')]();}else await _0x1c4b64[_0x1ceb('0xd')]();this[_0x1ceb('0x3d')][_0x1ceb('0x54')][_0x1ceb('0x59')]('PaginationLookup')&&this[_0x1ceb('0x3d')][_0x1ceb('0x54')][_0x1ceb('0xf')](_0x1ceb('0x5f'))[_0x1ceb('0x45')]();const _0xfcaf00=this[_0x1ceb('0x4')]();return _0x3b84d8(_0xfcaf00)['then'](_0x25efab=>{return(this[_0x1ceb('0x25')]=_0x25efab,this[_0x1ceb('0x3d')][_0x1ceb('0x54')]['has'](_0x1ceb('0x3f')))&&this[_0x1ceb('0x3d')][_0x1ceb('0x54')]['get']('Annotations')[_0x1ceb('0x52')](),_0x25efab;})['catch'](_0x25c8dc=>(console[_0x1ceb('0x26')](_0x25c8dc),this[_0x1ceb('0x3d')][_0x1ceb('0x9')]('revision-history-viewer-opened'),null));});}[_0x1ceb('0x31')](){const _0x12b0ff=this[_0x1ceb('0x3d')][_0x1ceb('0x35')][_0x1ceb('0xf')](_0x1ceb('0x63'))[_0x1ceb('0x18')];this[_0x1ceb('0x3d')]['config'][_0x1ceb('0x28')](_0x1ceb('0x3c'),()=>(this[_0x1ceb('0x3d')]['plugins']['has']('PaginationLookup')&&this['editor'][_0x1ceb('0x54')][_0x1ceb('0xf')](_0x1ceb('0x5f'))[_0x1ceb('0x45')](),this[_0x1ceb('0x25')][_0x1ceb('0x54')][_0x1ceb('0xf')](_0x1ceb('0xe'))[_0x1ceb('0x1c')](),_0x12b0ff(this['_viewerEditor'])[_0x1ceb('0x41')](()=>{if(this[_0x1ceb('0x3d')][_0x1ceb('0x9')](_0x1ceb('0x5b')),this['_viewerEditor']=null,this['editor'][_0x1ceb('0x54')]['has']('Annotations')){const _0x3edf40=this[_0x1ceb('0x3d')][_0x1ceb('0x54')]['get'](_0x1ceb('0x3f'));_0x3edf40[_0x1ceb('0x52')](),_0x3edf40[_0x1ceb('0x38')]();}})));}['_showRevisionViewer'](_0x34d753){const _0x7b6ba1=this[_0x1ceb('0x3d')]['config'][_0x1ceb('0xf')](_0x1ceb('0x48')),_0x43d2d9=this[_0x1ceb('0x3d')]['config']['get']('revisionHistory.viewerContainer'),_0x2d4078=this['editor']['config'][_0x1ceb('0xf')](_0x1ceb('0x43'));return _0x209a4a[_0x1ceb('0x49')](_0x2d4078,_0x34d753)[_0x1ceb('0x41')](_0x2ea087=>(_0x43d2d9['style'][_0x1ceb('0x2d')]=_0x1ceb('0x15'),_0x7b6ba1[_0x1ceb('0x22')][_0x1ceb('0x2d')]=_0x1ceb('0x27'),_0x2ea087));}[_0x1ceb('0x8')](_0x516b2e){const _0x4e8343=this[_0x1ceb('0x3d')][_0x1ceb('0x35')][_0x1ceb('0xf')](_0x1ceb('0x48'));return this[_0x1ceb('0x3d')]['config'][_0x1ceb('0xf')]('revisionHistory.viewerContainer')[_0x1ceb('0x22')]['display']='none',_0x4e8343[_0x1ceb('0x22')][_0x1ceb('0x2d')]='',_0x516b2e[_0x1ceb('0x4e')]();}async['_restoreRevision'](_0x1a9a43){const _0x58a25f=this[_0x1ceb('0x3d')],_0x50024b=this['_viewerEditor'][_0x1ceb('0x54')][_0x1ceb('0xf')]('RevisionViewer'),_0x41ec33=_0x58a25f[_0x1ceb('0x54')]['get'](_0x1ceb('0x14')),_0x3d583a=_0x50024b['repository'][_0x1ceb('0x6d')](_0x1a9a43);let _0x176d61,_0x481df7,_0x491e55;try{_0x176d61=await _0x50024b[_0x1ceb('0x2c')](_0x3d583a),_0x481df7=await _0x50024b[_0x1ceb('0x61')](_0x3d583a);}catch(_0x5fd677){return void console['error'](_0x5fd677);}_0x58a25f[_0x1ceb('0x24')][_0x1ceb('0x6a')](_0x1886ad=>{for(const _0x5830cd of Array[_0x1ceb('0x1')](_0x58a25f['model']['markers'][_0x1ceb('0x17')]('restrictedEditingException')))_0x1886ad[_0x1ceb('0x44')](_0x5830cd);}),_0x50024b[_0x1ceb('0x0')]=!0x1,_0x58a25f[_0x1ceb('0x24')][_0x1ceb('0x36')](_0x3b6edc=>{_0x3b6edc[_0x1ceb('0x55')](null),_0x3b6edc[_0x1ceb('0x3a')](_0x58a25f['model']['document'][_0x1ceb('0x1a')]['getAttributeKeys']());const _0x32874b=Object[_0x1ceb('0x58')](_0x176d61);for(const _0x1fbcde of _0x58a25f[_0x1ceb('0x24')]['document']['roots'])_0x1ceb('0x3e')!=_0x1fbcde['rootName']&&_0x1fbcde['isAttached']()&&!_0x32874b[_0x1ceb('0x2e')](_0x1fbcde[_0x1ceb('0x4d')])&&_0x3b6edc[_0x1ceb('0x29')](_0x1fbcde);for(const _0x34c4db of _0x32874b){let _0x3b57ac=_0x58a25f[_0x1ceb('0x24')][_0x1ceb('0x51')][_0x1ceb('0x57')](_0x34c4db);_0x3b57ac&&_0x3b57ac[_0x1ceb('0x5d')]()||(_0x3b57ac=_0x3b6edc[_0x1ceb('0x1b')](_0x34c4db));const _0x3ac7f9=_0x481df7[_0x34c4db],_0x2f0448=Object['keys'](_0x3ac7f9),_0x42378f=_0x176d61[_0x34c4db];for(const _0x4f62fc of _0x3b57ac[_0x1ceb('0x4c')]())_0x2f0448[_0x1ceb('0x2e')](_0x4f62fc)||_0x3b6edc[_0x1ceb('0x2a')](_0x4f62fc,_0x3b57ac);for(const _0x2ad47d of _0x2f0448)_0x3b6edc[_0x1ceb('0x5')](_0x2ad47d,_0x481df7[_0x34c4db][_0x2ad47d],_0x3b57ac);_0x3b6edc[_0x1ceb('0x2b')](_0x3b6edc[_0x1ceb('0x6b')](_0x3b57ac)),_0x3b6edc[_0x1ceb('0x32')](_0x58a25f[_0x1ceb('0x67')]['parse'](_0x42378f,_0x3b57ac),_0x3b57ac,0x0);}});const _0x3eff12=_0x4010e2(_0x58a25f[_0x1ceb('0x6c')],_0x1ceb('0x37'));if(_0x3d583a['name'])_0x491e55=-0x1==_0x3d583a[_0x1ceb('0x11')][_0x1ceb('0x53')](_0x3eff12)?_0x3eff12+':\x20'+_0x3d583a[_0x1ceb('0x11')]:_0x3d583a[_0x1ceb('0x11')];else _0x491e55=_0x3eff12+':\x20'+(_0x3d583a['createdAt']['toLocaleDateString'](_0x58a25f[_0x1ceb('0x6c')][_0x1ceb('0x1e')],{'month':_0x1ceb('0x12'),'day':'numeric'})+',\x20'+_0x3d583a[_0x1ceb('0x30')][_0x1ceb('0x62')](_0x58a25f[_0x1ceb('0x6c')][_0x1ceb('0x1e')],{'hour':_0x1ceb('0x39'),'minute':_0x1ceb('0x39')}));return await _0x41ec33[_0x1ceb('0x69')]({'name':_0x491e55}),_0x50024b[_0x1ceb('0x0')]=!0x0,_0x58a25f['config']['get'](_0x1ceb('0x63'))[_0x1ceb('0x18')]();}}
|
|
23
|
+
const _0x2990=['isAttached','getRevision','_restoreRevision','has','addRevisionData','roots','isAnonymous','getRevisionData','RevisionViewerIntegration','none','revisionHistory','config','restrictedEditingException','plugins','exitToEditing','changesNavigation','createdAt','_enhanceCloseRevisionViewerCallback','update','_cleanUp','users','get','error','end','RevisionsRepository','result','revision-history-viewer-opened','repository','getUser','_closeRevisionViewer','then','_enhanceShowRevisionViewerCallback','removeSelectionAttribute','setSelection','revision-history-missing-configuration','toolbar','insert','set','Restored','pluginName','Autosave','define','editor','bind','refreshVisibility','RevisionTracker','rootName','RevisionHistory','block','isReadOnly','_getRevisionViewerEditorConfig','detachRoot','revisionHistory.showRevisionViewerCallback','long','_update','showRevisionViewerCallback','Annotations','disableReadOnlyMode','setAttribute','remove','style','toJSON','RevisionViewer','name','uiLanguage','parse','revisionHistory.viewerEditorElement','getAttributeKeys','model','_recalculatePageBreaks','push','numeric','toLocaleDateString','removeAttribute','keys','PaginationLookup','toVersion','revisionHistory.closeRevisionViewerCallback','requires','save','getRevisions','document','display','restoreRevision','closeRevisionViewerCallback','includes','addUser','_viewerEditor','selection','saveRevision','revisionHistory.viewerContainer','RestrictedEditingMode','locale','toLocaleTimeString','Users','adapter','destroy','_showRevisionViewer','enqueueChange','creator','catch','refreshPositioning','isEnabled','from','indexOf'];(function(_0x9164f8,_0x29905d){const _0x37b9d4=function(_0x184f14){while(--_0x184f14){_0x9164f8['push'](_0x9164f8['shift']());}};_0x37b9d4(++_0x29905d);}(_0x2990,0x8a));const _0x37b9=function(_0x9164f8,_0x29905d){_0x9164f8=_0x9164f8-0x0;let _0x37b9d4=_0x2990[_0x9164f8];return _0x37b9d4;};import{Plugin as _0x704bb1}from'ckeditor5/src/core.js';import{CKEditorError as _0x450689,uid as _0x3c363f}from'ckeditor5/src/utils.js';import _0x3be661 from'./revisiontracker.js';import _0x355f52 from'./ui/revisionhistory/revisionhistoryui.js';import _0x464672 from'./revisionviewer.js';import _0x4e8bd7 from'./ui/revisionviewer/revisionviewerui.js';import _0x59885b from'./ui/revisionssidebar/revisionssidebar.js';import _0x5907e7 from'./editor/revisionviewereditor.js';import{getTranslation as _0x9f4f5b}from'./utils/common-translations.js';import{sanitizeEditorConfig as _0x35eb3b}from'ckeditor5-collaboration/src/collaboration-core.js';const g=['RevisionHistoryUI',_0x37b9('0x3a')];class k extends _0x704bb1{static get[_0x37b9('0x6')](){return _0x37b9('0x50');}constructor(_0x2f6db8){super(_0x2f6db8),this[_0x37b9('0x61')]=_0x37b9('0x5f');}}export default class b extends _0x704bb1{static get[_0x37b9('0x6')](){return _0x37b9('0xe');}static get[_0x37b9('0x2d')](){return[_0x3be661,_0x355f52];}constructor(_0x455330){if(super(_0x455330),!this[_0x37b9('0x9')][_0x37b9('0x53')][_0x37b9('0x5d')](_0x37b9('0x52')))throw new _0x450689(_0x37b9('0x1'),this);this['_viewerEditor']=null,this['editor'][_0x37b9('0x53')][_0x37b9('0x8')](_0x37b9('0x13'),_0x28d4=>this[_0x37b9('0x40')](_0x28d4)),this['editor'][_0x37b9('0x53')]['define'](_0x37b9('0x2c'),_0x4eef34=>this[_0x37b9('0x65')](_0x4eef34)),this['editor'][_0x37b9('0x53')][_0x37b9('0x8')]('revisionHistory.restoreRevisionCallback',_0x1d3041=>this[_0x37b9('0x4a')](_0x1d3041)),this[_0x37b9('0x67')](),this[_0x37b9('0x59')]();}set[_0x37b9('0x3e')](_0x496465){this[_0x37b9('0x9')]['plugins']['get'](_0x37b9('0xc'))[_0x37b9('0x3e')]=_0x496465;}get[_0x37b9('0x3e')](){return this[_0x37b9('0x9')][_0x37b9('0x55')][_0x37b9('0x5d')](_0x37b9('0xc'))['adapter'];}[_0x37b9('0x4c')](_0x2c653f){return this['editor']['plugins'][_0x37b9('0x5d')](_0x37b9('0xc'))[_0x37b9('0x4c')](_0x2c653f);}[_0x37b9('0x49')](_0x3ff593){return this[_0x37b9('0x9')][_0x37b9('0x55')][_0x37b9('0x5d')](_0x37b9('0x60'))['getRevision'](_0x3ff593);}['getRevisions'](_0x388ae6={'toJSON':!0x1}){return this[_0x37b9('0x9')][_0x37b9('0x55')]['get'](_0x37b9('0x60'))[_0x37b9('0x2f')](_0x388ae6);}[_0x37b9('0x11')](){const _0x527d5e=this['editor'],_0x76e118=_0x35eb3b(_0x527d5e,g),_0x25813d=_0x527d5e[_0x37b9('0x55')][_0x37b9('0x5d')](_0x37b9('0xc')),_0x4808fc=_0x527d5e['plugins'][_0x37b9('0x5d')](_0x37b9('0x3d'))[_0x37b9('0x5c')];return _0x76e118[_0x37b9('0x2')]=[_0x37b9('0x56'),_0x37b9('0x32'),_0x37b9('0x57')],delete _0x76e118['lazyRoots'],(_0x76e118['plugins'][_0x37b9('0x25')](k,_0x464672,_0x4e8bd7,class extends _0x704bb1{static get[_0x37b9('0x2d')](){return[_0x464672,_0x37b9('0x3d')];}['init'](){const _0xb546c9=this[_0x37b9('0x9')][_0x37b9('0x55')][_0x37b9('0x5d')](_0x37b9('0x3d'));for(const _0x3a46e0 of _0x4808fc)_0x3a46e0[_0x37b9('0x4e')]||_0xb546c9[_0x37b9('0x64')](_0x3a46e0['id'])||_0xb546c9[_0x37b9('0x35')](_0x3a46e0);const _0x1a179a=_0x25813d[_0x37b9('0x63')]['getRevisions']();let _0x24c5c8=null;const _0x968d0a=this[_0x37b9('0x9')]['plugins'][_0x37b9('0x5d')](_0x37b9('0x1d'));_0x968d0a[_0x37b9('0x3e')]=_0x25813d['adapter'],_0x968d0a[_0x37b9('0xa')](_0x37b9('0x45'))['to'](_0x25813d),this[_0x37b9('0x9')]['commands'][_0x37b9('0x5d')]('restoreRevision')[_0x37b9('0xa')](_0x37b9('0x45'))['to'](_0x527d5e,_0x37b9('0x10'),_0x1716ee=>!_0x1716ee);for(const _0x2e840c of _0x1a179a){const _0x42fc30=null===_0x2e840c[_0x37b9('0x42')];if(_0x42fc30&&_0x2e840c[_0x37b9('0x2b')]===_0x2e840c['fromVersion'])continue;const _0x31df21=_0x2e840c[_0x37b9('0x1c')]();_0x968d0a[_0x37b9('0x4c')](_0x31df21,(_0xbffdcf,_0xae1b77,_0x50ca0c)=>{if(_0x42fc30){if(_0x24c5c8)_0x24c5c8[_0x37b9('0x15')](_0xbffdcf,_0xae1b77);else{if(!_0xae1b77){const _0x534c0f=_0x50ca0c[_0x37b9('0x1c')]();_0x534c0f['id']=_0x3c363f(),_0x25813d[_0x37b9('0x38')](_0x534c0f,_0x50ca0c[_0x37b9('0x2b')])['then'](_0x538f40=>{_0x24c5c8=_0x538f40;});}}}else _0x2e840c[_0x37b9('0x15')](_0xbffdcf,_0xae1b77);});}}},_0x59885b),_0x76e118);}[_0x37b9('0x67')](){const _0x445a00=this[_0x37b9('0x9')]['config'][_0x37b9('0x5d')](_0x37b9('0x52'))[_0x37b9('0x16')];this[_0x37b9('0x9')][_0x37b9('0x53')][_0x37b9('0x4')](_0x37b9('0x13'),async()=>{this[_0x37b9('0x9')]['enableReadOnlyMode'](_0x37b9('0x62'));const _0x2d1913=this[_0x37b9('0x9')][_0x37b9('0x55')][_0x37b9('0x5d')](_0x37b9('0xc'));if(this[_0x37b9('0x9')][_0x37b9('0x55')][_0x37b9('0x4b')](_0x37b9('0x7'))){const _0xb18600=this['editor']['plugins'][_0x37b9('0x5d')](_0x37b9('0x7'));await _0xb18600[_0x37b9('0x2e')]();}else await _0x2d1913[_0x37b9('0x5a')]();this[_0x37b9('0x9')][_0x37b9('0x55')][_0x37b9('0x4b')](_0x37b9('0x2a'))&&this[_0x37b9('0x9')][_0x37b9('0x55')][_0x37b9('0x5d')](_0x37b9('0x2a'))[_0x37b9('0x24')]();const _0x29e750=this['_getRevisionViewerEditorConfig']();return _0x445a00(_0x29e750)[_0x37b9('0x66')](_0x39f956=>{return(this[_0x37b9('0x36')]=_0x39f956,this[_0x37b9('0x9')]['plugins'][_0x37b9('0x4b')](_0x37b9('0x17')))&&this[_0x37b9('0x9')][_0x37b9('0x55')][_0x37b9('0x5d')](_0x37b9('0x17'))['refreshVisibility'](),_0x39f956;})[_0x37b9('0x43')](_0x559889=>(console[_0x37b9('0x5e')](_0x559889),this[_0x37b9('0x9')][_0x37b9('0x18')](_0x37b9('0x62')),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x1170d4=this['editor']['config']['get'](_0x37b9('0x52'))[_0x37b9('0x33')];this['editor'][_0x37b9('0x53')][_0x37b9('0x4')](_0x37b9('0x2c'),()=>(this[_0x37b9('0x9')][_0x37b9('0x55')]['has']('PaginationLookup')&&this[_0x37b9('0x9')][_0x37b9('0x55')][_0x37b9('0x5d')](_0x37b9('0x2a'))[_0x37b9('0x24')](),this[_0x37b9('0x36')][_0x37b9('0x55')]['get'](_0x37b9('0x1d'))[_0x37b9('0x5b')](),_0x1170d4(this[_0x37b9('0x36')])[_0x37b9('0x66')](()=>{if(this[_0x37b9('0x9')][_0x37b9('0x18')](_0x37b9('0x62')),this[_0x37b9('0x36')]=null,this[_0x37b9('0x9')][_0x37b9('0x55')][_0x37b9('0x4b')](_0x37b9('0x17'))){const _0x1abb69=this[_0x37b9('0x9')][_0x37b9('0x55')][_0x37b9('0x5d')](_0x37b9('0x17'));_0x1abb69[_0x37b9('0xb')](),_0x1abb69[_0x37b9('0x44')]();}})));}[_0x37b9('0x40')](_0x431ab6){const _0x2bb820=this['editor'][_0x37b9('0x53')][_0x37b9('0x5d')]('revisionHistory.editorContainer'),_0x542e0d=this['editor']['config'][_0x37b9('0x5d')](_0x37b9('0x39')),_0x59ce29=this['editor'][_0x37b9('0x53')][_0x37b9('0x5d')](_0x37b9('0x21'));return _0x5907e7['create'](_0x59ce29,_0x431ab6)[_0x37b9('0x66')](_0x3ed294=>(_0x542e0d[_0x37b9('0x1b')][_0x37b9('0x31')]=_0x37b9('0xf'),_0x2bb820[_0x37b9('0x1b')][_0x37b9('0x31')]=_0x37b9('0x51'),_0x3ed294));}[_0x37b9('0x65')](_0x53ae02){const _0x5c2a3a=this[_0x37b9('0x9')][_0x37b9('0x53')]['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']=_0x37b9('0x51'),_0x5c2a3a[_0x37b9('0x1b')]['display']='',_0x53ae02[_0x37b9('0x3f')]();}async[_0x37b9('0x4a')](_0x203c50){const _0x46f236=this[_0x37b9('0x9')],_0x58a854=this['_viewerEditor'][_0x37b9('0x55')]['get'](_0x37b9('0x1d')),_0x17a267=_0x46f236[_0x37b9('0x55')][_0x37b9('0x5d')](_0x37b9('0xc')),_0x4886d5=_0x58a854[_0x37b9('0x63')][_0x37b9('0x49')](_0x203c50);let _0x4d5a96,_0x21c71b,_0x20dcd1;try{_0x4d5a96=await _0x58a854[_0x37b9('0x4f')](_0x4886d5),_0x21c71b=await _0x58a854['getRevisionRootsAttributes'](_0x4886d5);}catch(_0x570c1c){return void console[_0x37b9('0x5e')](_0x570c1c);}_0x46f236[_0x37b9('0x23')]['change'](_0x514775=>{for(const _0xf94df2 of Array[_0x37b9('0x46')](_0x46f236[_0x37b9('0x23')]['markers']['getMarkersGroup'](_0x37b9('0x54'))))_0x514775['removeMarker'](_0xf94df2);}),_0x58a854['isReady']=!0x1,_0x46f236[_0x37b9('0x23')][_0x37b9('0x41')](_0x9cbcb=>{_0x9cbcb[_0x37b9('0x0')](null),_0x9cbcb[_0x37b9('0x68')](_0x46f236[_0x37b9('0x23')][_0x37b9('0x30')][_0x37b9('0x37')][_0x37b9('0x22')]());const _0x520f8c=Object[_0x37b9('0x29')](_0x4d5a96);for(const _0x21bd13 of _0x46f236[_0x37b9('0x23')][_0x37b9('0x30')][_0x37b9('0x4d')])'$graveyard'!=_0x21bd13[_0x37b9('0xd')]&&_0x21bd13[_0x37b9('0x48')]()&&!_0x520f8c['includes'](_0x21bd13['rootName'])&&_0x9cbcb[_0x37b9('0x12')](_0x21bd13);for(const _0x50ac45 of _0x520f8c){let _0x58420f=_0x46f236[_0x37b9('0x23')][_0x37b9('0x30')]['getRoot'](_0x50ac45);_0x58420f&&_0x58420f[_0x37b9('0x48')]()||(_0x58420f=_0x9cbcb['addRoot'](_0x50ac45));const _0x23b88d=_0x21c71b[_0x50ac45],_0x15163b=Object[_0x37b9('0x29')](_0x23b88d),_0x1227c6=_0x4d5a96[_0x50ac45];for(const _0xfab9aa of _0x58420f[_0x37b9('0x22')]())_0x15163b[_0x37b9('0x34')](_0xfab9aa)||_0x9cbcb[_0x37b9('0x28')](_0xfab9aa,_0x58420f);for(const _0x52dab of _0x15163b)_0x9cbcb[_0x37b9('0x19')](_0x52dab,_0x21c71b[_0x50ac45][_0x52dab],_0x58420f);_0x9cbcb[_0x37b9('0x1a')](_0x9cbcb['createRangeIn'](_0x58420f)),_0x9cbcb[_0x37b9('0x3')](_0x46f236['data'][_0x37b9('0x20')](_0x1227c6,_0x58420f),_0x58420f,0x0);}});const _0x210957=_0x9f4f5b(_0x46f236[_0x37b9('0x3b')],_0x37b9('0x5'));if(_0x4886d5[_0x37b9('0x1e')])_0x20dcd1=-0x1==_0x4886d5['name'][_0x37b9('0x47')](_0x210957)?_0x210957+':\x20'+_0x4886d5[_0x37b9('0x1e')]:_0x4886d5[_0x37b9('0x1e')];else _0x20dcd1=_0x210957+':\x20'+(_0x4886d5[_0x37b9('0x58')][_0x37b9('0x27')](_0x46f236[_0x37b9('0x3b')][_0x37b9('0x1f')],{'month':_0x37b9('0x14'),'day':_0x37b9('0x26')})+',\x20'+_0x4886d5['createdAt'][_0x37b9('0x3c')](_0x46f236[_0x37b9('0x3b')][_0x37b9('0x1f')],{'hour':'numeric','minute':_0x37b9('0x26')}));return await _0x17a267['saveRevision']({'name':_0x20dcd1}),_0x58a854['isReady']=!0x0,_0x46f236[_0x37b9('0x53')]['get'](_0x37b9('0x52'))[_0x37b9('0x33')]();}}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
5
|
/**
|
|
6
6
|
* @module revision-history/revisionhistoryadapter
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import type { RevisionData } from './revision';
|
|
9
|
+
import type { RevisionData } from './revision.js';
|
|
10
10
|
/**
|
|
11
11
|
* The revision history adapter.
|
|
12
12
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
5
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
5
|
/**
|
|
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
|
*/
|