@ckeditor/ckeditor5-revision-history 36.0.1 → 37.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.
Files changed (68) hide show
  1. package/build/revision-history.js +1 -1
  2. package/package.json +22 -7
  3. package/src/augmentation.d.ts +25 -0
  4. package/src/augmentation.js +23 -0
  5. package/src/changeitem.d.ts +52 -0
  6. package/src/changeitem.js +1 -1
  7. package/src/editor/revisionviewereditor.d.ts +27 -0
  8. package/src/editor/revisionviewereditor.js +1 -1
  9. package/src/editor/revisionviewereditorui.d.ts +28 -0
  10. package/src/editor/revisionviewereditorui.js +1 -1
  11. package/src/editor/revisionviewereditoruiview.d.ts +43 -0
  12. package/src/editor/revisionviewereditoruiview.js +1 -1
  13. package/src/index.d.ts +10 -0
  14. package/src/index.js +1 -1
  15. package/src/revision.d.ts +153 -0
  16. package/src/revision.js +1 -1
  17. package/src/revisiondiff.d.ts +19 -0
  18. package/src/revisiondiff.js +1 -1
  19. package/src/revisionhistory.d.ts +93 -0
  20. package/src/revisionhistory.js +1 -1
  21. package/src/revisionhistoryadapter.d.ts +60 -0
  22. package/src/revisionhistoryadapter.js +23 -0
  23. package/src/revisionhistoryconfig.d.ts +60 -0
  24. package/src/revisionhistoryconfig.js +23 -0
  25. package/src/revisionsrepository.d.ts +43 -0
  26. package/src/revisionsrepository.js +1 -1
  27. package/src/revisiontracker.d.ts +72 -0
  28. package/src/revisiontracker.js +1 -1
  29. package/src/revisionviewer.d.ts +21 -0
  30. package/src/revisionviewer.js +1 -1
  31. package/src/ui/revision/createrevisionactionsdropdown.d.ts +9 -0
  32. package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
  33. package/src/ui/revision/revisionauthorview.d.ts +4 -0
  34. package/src/ui/revision/revisionauthorview.js +1 -1
  35. package/src/ui/revision/revisionnameview.d.ts +4 -0
  36. package/src/ui/revision/revisionnameview.js +1 -1
  37. package/src/ui/revision/revisionview.d.ts +91 -0
  38. package/src/ui/revision/revisionview.js +1 -1
  39. package/src/ui/revision/subrevisioncollapserview.d.ts +17 -0
  40. package/src/ui/revision/subrevisioncollapserview.js +1 -1
  41. package/src/ui/revision/subrevisionview.d.ts +30 -0
  42. package/src/ui/revision/subrevisionview.js +1 -1
  43. package/src/ui/revision/utils.d.ts +4 -0
  44. package/src/ui/revision/utils.js +1 -1
  45. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.d.ts +80 -0
  46. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
  47. package/src/ui/revisionhistory/revisionhistoryui.d.ts +21 -0
  48. package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
  49. package/src/ui/revisionssidebar/revisionssidebar.d.ts +39 -0
  50. package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
  51. package/src/ui/revisionssidebar/revisionssidebarheaderview.d.ts +4 -0
  52. package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
  53. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.d.ts +25 -0
  54. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
  55. package/src/ui/revisionssidebar/revisionssidebarview.d.ts +40 -0
  56. package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
  57. package/src/ui/revisionssidebar/utils.d.ts +8 -0
  58. package/src/ui/revisionssidebar/utils.js +1 -1
  59. package/src/ui/revisionviewer/changedetailsview.d.ts +18 -0
  60. package/src/ui/revisionviewer/changedetailsview.js +1 -1
  61. package/src/ui/revisionviewer/changesnavigationview.d.ts +36 -0
  62. package/src/ui/revisionviewer/changesnavigationview.js +1 -1
  63. package/src/ui/revisionviewer/revisionviewerloadingoverlay.d.ts +22 -0
  64. package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
  65. package/src/ui/revisionviewer/revisionviewerui.d.ts +22 -0
  66. package/src/ui/revisionviewer/revisionviewerui.js +1 -1
  67. package/src/utils/common-translations.d.ts +7 -0
  68. 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": "36.0.1",
3
+ "version": "37.0.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/)",
@@ -24,14 +24,29 @@
24
24
  "versioning"
25
25
  ],
26
26
  "main": "src/index.js",
27
+ "scripts": {
28
+ "dll:build": "webpack",
29
+ "build": "tsc -p ./tsconfig.json",
30
+ "postversion": "npm run build"
31
+ },
32
+ "files": [
33
+ "build",
34
+ "lang",
35
+ "src/**/*.js",
36
+ "src/**/*.d.ts",
37
+ "theme",
38
+ "ckeditor5-metadata.json",
39
+ "CHANGELOG.md"
40
+ ],
27
41
  "dependencies": {
28
- "@ckeditor/ckeditor5-core": "^36.0.1",
29
- "@ckeditor/ckeditor5-ui": "^36.0.1",
30
- "@ckeditor/ckeditor5-undo": "^36.0.1",
31
- "@ckeditor/ckeditor5-editor-classic": "^36.0.1",
32
- "ckeditor5": "^36.0.1",
42
+ "@ckeditor/ckeditor5-editor-classic": "^37.0.0",
43
+ "@ckeditor/ckeditor5-ui": "^37.0.0",
44
+ "@ckeditor/ckeditor5-undo": "^37.0.0",
45
+ "ckeditor5": "^37.0.0",
33
46
  "ckeditor5-collaboration": "^36.0.1",
34
47
  "lodash-es": "^4.17.15",
35
48
  "luxon": "^1.25.0"
36
- }
49
+ },
50
+ "types": "src/index.d.ts",
51
+ "obfuscated": true
37
52
  }
@@ -0,0 +1,25 @@
1
+ import type { RevisionHistoryConfig, RevisionsRepository, RevisionViewerLoadingOverlay, RevisionHistoryUI, RevisionTracker, RevisionViewer, RestoreRevisionCommand, ShowChangeCommand, RevisionsSidebar, RevisionViewerUI } from './index';
2
+ declare module '@ckeditor/ckeditor5-core' {
3
+ interface EditorConfig {
4
+ /**
5
+ * The configuration of the revision history feature.
6
+ * Introduced by the {@link module:revision-history/revisionhistory~RevisionHistory} feature.
7
+ */
8
+ revisionHistory?: RevisionHistoryConfig;
9
+ }
10
+ interface PluginsMap {
11
+ [RevisionsRepository.pluginName]: RevisionsRepository;
12
+ [RevisionViewerLoadingOverlay.pluginName]: RevisionViewerLoadingOverlay;
13
+ [RevisionHistoryUI.pluginName]: RevisionHistoryUI;
14
+ [RevisionTracker.pluginName]: RevisionTracker;
15
+ [RevisionViewer.pluginName]: RevisionViewer;
16
+ [RevisionViewer.pluginName]: RevisionViewer;
17
+ [RevisionsSidebar.pluginName]: RevisionsSidebar;
18
+ [RevisionViewerUI.pluginName]: RevisionViewerUI;
19
+ }
20
+ interface CommandsMap {
21
+ restoreRevision: RestoreRevisionCommand;
22
+ showPreviousChange: ShowChangeCommand<'backward'>;
23
+ showNextChange: ShowChangeCommand<'forward'>;
24
+ }
25
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ export{};
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @module revision-history/changeitem
3
+ */
4
+ import type { User } from 'ckeditor5-collaboration/src/collaboration-core';
5
+ declare const ChangeItem_base: {
6
+ new (): import("ckeditor5/src/utils").Observable;
7
+ prototype: import("ckeditor5/src/utils").Observable;
8
+ };
9
+ /**
10
+ * Represents a singular change entry in the revision or in the revisions comparison.
11
+ */
12
+ export default class ChangeItem extends ChangeItem_base {
13
+ /**
14
+ * Unique change item id.
15
+ */
16
+ readonly id: string;
17
+ /**
18
+ * User who created the change.
19
+ */
20
+ readonly author: User;
21
+ /**
22
+ * Change type.
23
+ */
24
+ readonly type: string;
25
+ /**
26
+ * Additional details about the change.
27
+ */
28
+ readonly data: Record<string, unknown>;
29
+ /**
30
+ * The date when the change was created.
31
+ *
32
+ * @observable
33
+ */
34
+ readonly createdAt: Date;
35
+ constructor(data: ChangeItemInput);
36
+ toJSON(): ChangeItemJSON;
37
+ }
38
+ export interface ChangeItemInput {
39
+ id?: string;
40
+ author: User;
41
+ type: string;
42
+ data: Record<string, unknown>;
43
+ createdAt: Date;
44
+ }
45
+ export interface ChangeItemJSON {
46
+ id: string;
47
+ authorId: string;
48
+ type: string;
49
+ data: Record<string, unknown>;
50
+ createdAt: Date;
51
+ }
52
+ export {};
package/src/changeitem.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x4eec=['author','data','type','createdAt'];(function(_0x2c2ee1,_0x4eec99){var _0x5b6109=function(_0x686b58){while(--_0x686b58){_0x2c2ee1['push'](_0x2c2ee1['shift']());}};_0x5b6109(++_0x4eec99);}(_0x4eec,0x11d));var _0x5b61=function(_0x2c2ee1,_0x4eec99){_0x2c2ee1=_0x2c2ee1-0x0;var _0x5b6109=_0x4eec[_0x2c2ee1];return _0x5b6109;};import{ObservableMixin as _0x50d0ae,mix as _0x1c8f79,uid as _0x5dd982}from'ckeditor5/src/utils';export default class h{constructor(_0x21e280){this['id']=_0x21e280['id']||_0x5dd982(),this[_0x5b61('0x3')]=_0x21e280[_0x5b61('0x3')],this[_0x5b61('0x1')]=_0x21e280[_0x5b61('0x1')],this[_0x5b61('0x0')]=_0x21e280[_0x5b61('0x0')]||{},this['set'](_0x5b61('0x2'),_0x21e280[_0x5b61('0x2')]);}['toJSON'](){return{'id':this['id'],'authorId':this[_0x5b61('0x3')]['id'],'type':this[_0x5b61('0x1')],'data':this['data'],'createdAt':this[_0x5b61('0x2')]};}}_0x1c8f79(h,_0x50d0ae);
23
+ var _0x184d=['author','data','set','createdAt','type','toJSON'];(function(_0x3b86a1,_0x184dd0){var _0x47eaf5=function(_0x4474ca){while(--_0x4474ca){_0x3b86a1['push'](_0x3b86a1['shift']());}};_0x47eaf5(++_0x184dd0);}(_0x184d,0x15e));var _0x47ea=function(_0x3b86a1,_0x184dd0){_0x3b86a1=_0x3b86a1-0x0;var _0x47eaf5=_0x184d[_0x3b86a1];return _0x47eaf5;};import{ObservableMixin as _0x1667d2,uid as _0xde81ab}from'ckeditor5/src/utils';export default class r extends _0x1667d2(){constructor(_0x16f988){super(),this['id']=_0x16f988['id']||_0xde81ab(),this[_0x47ea('0x4')]=_0x16f988['author'],this[_0x47ea('0x2')]=_0x16f988[_0x47ea('0x2')],this[_0x47ea('0x5')]=_0x16f988[_0x47ea('0x5')]||{},this[_0x47ea('0x0')](_0x47ea('0x1'),_0x16f988[_0x47ea('0x1')]);}[_0x47ea('0x3')](){return{'id':this['id'],'authorId':this[_0x47ea('0x4')]['id'],'type':this[_0x47ea('0x2')],'data':this[_0x47ea('0x5')],'createdAt':this['createdAt']};}}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module revision-history/editor/revisionviewereditor
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>;
11
+ /**
12
+ * Editor class used to show revision comparisons.
13
+ */
14
+ export default class RevisionViewerEditor extends RevisionViewerEditor_base {
15
+ get ui(): RevisionViewerEditorUI;
16
+ /**
17
+ * @param sourceElement Editor source element.
18
+ * @param config Editor configuration.
19
+ */
20
+ constructor(sourceElement: HTMLElement, config?: EditorConfig);
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ destroy(): Promise<unknown>;
25
+ static create(sourceElement: HTMLElement, config?: EditorConfig): Promise<RevisionViewerEditor>;
26
+ }
27
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x150d=['create','ready','initPlugins','document','createRoot','locale','destroy','get','sourceElement','editing','view','init','initialData','fire'];(function(_0x32fa22,_0x150d41){const _0x2c899b=function(_0x2a1e03){while(--_0x2a1e03){_0x32fa22['push'](_0x32fa22['shift']());}};_0x2c899b(++_0x150d41);}(_0x150d,0x13a));const _0x2c89=function(_0x32fa22,_0x150d41){_0x32fa22=_0x32fa22-0x0;let _0x2c899b=_0x150d[_0x32fa22];return _0x2c899b;};import{Editor as _0x3118eb,DataApiMixin as _0x5aff72,ElementApiMixin as _0x256cb2}from'ckeditor5/src/core';import{mix as _0x3d884f}from'ckeditor5/src/utils';import _0xb111ce from'./revisionviewereditorui';import _0x5abf85 from'./revisionviewereditoruiview';export default class m extends _0x3118eb{constructor(_0x17c3a9,_0x230619){super(_0x230619),this[_0x2c89('0x2')]=_0x17c3a9,this['model'][_0x2c89('0xb')][_0x2c89('0xc')]();const _0x448b90=new _0x5abf85(this[_0x2c89('0xd')],this[_0x2c89('0x3')][_0x2c89('0x4')],{'shouldToolbarGroupWhenFull':!0x0});this['ui']=new _0xb111ce(this,_0x448b90);}[_0x2c89('0x0')](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async[_0x2c89('0x8')](_0x4c8346,_0x46d9e7){const _0xa494fe=new this(_0x4c8346,_0x46d9e7);return await _0xa494fe[_0x2c89('0xa')](),await _0xa494fe['ui']['init'](_0x4c8346),await _0xa494fe['data'][_0x2c89('0x5')](_0xa494fe['config'][_0x2c89('0x1')](_0x2c89('0x6'))),_0xa494fe[_0x2c89('0x7')](_0x2c89('0x9')),_0xa494fe;}}_0x3d884f(m,_0x5aff72),_0x3d884f(m,_0x256cb2);
23
+ const _0xd56b=['fire','initialData','document','ready','destroy','init','sourceElement','create','data','get','editing','updateSourceElement','model','_ui','initPlugins','config','createRoot'];(function(_0x39aef6,_0xd56b97){const _0x4c03e2=function(_0x3de571){while(--_0x3de571){_0x39aef6['push'](_0x39aef6['shift']());}};_0x4c03e2(++_0xd56b97);}(_0xd56b,0x73));const _0x4c03=function(_0x39aef6,_0xd56b97){_0x39aef6=_0x39aef6-0x0;let _0x4c03e2=_0xd56b[_0x39aef6];return _0x4c03e2;};import{Editor as _0x206657,DataApiMixin as _0x1bf3e8,ElementApiMixin as _0x693b41}from'ckeditor5/src/core';import _0x41618d from'./revisionviewereditorui';import _0x68f7db from'./revisionviewereditoruiview';export default class d extends _0x1bf3e8(_0x693b41(_0x206657)){get['ui'](){return this[_0x4c03('0x0')];}constructor(_0x1d85f8,_0x244bcb){super(_0x244bcb),this[_0x4c03('0xa')]=_0x1d85f8,this[_0x4c03('0x10')][_0x4c03('0x6')][_0x4c03('0x3')]();const _0x328d0a=new _0x68f7db(this['locale'],this[_0x4c03('0xe')]['view'],{'shouldToolbarGroupWhenFull':!0x0});this[_0x4c03('0x0')]=new _0x41618d(this,_0x328d0a);}[_0x4c03('0x8')](){return this[_0x4c03('0xf')](),this['ui'][_0x4c03('0x8')](),super['destroy']();}static async[_0x4c03('0xb')](_0xf910bd,_0x4acd27){const _0x31c24a=new this(_0xf910bd,_0x4acd27);return await _0x31c24a[_0x4c03('0x1')](),await _0x31c24a['ui'][_0x4c03('0x9')](_0xf910bd),await _0x31c24a[_0x4c03('0xc')][_0x4c03('0x9')](_0x31c24a[_0x4c03('0x2')][_0x4c03('0xd')](_0x4c03('0x5'))),_0x31c24a[_0x4c03('0x4')](_0x4c03('0x7')),_0x31c24a;}}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module revision-history/editor/revisionviewereditorui
7
+ */
8
+ import type { Editor } from 'ckeditor5/src/core';
9
+ import { EditorUI } from 'ckeditor5/src/ui';
10
+ import type RevisionViewerEditorUIView from './revisionviewereditoruiview';
11
+ export default class RevisionViewerEditorUI extends EditorUI {
12
+ get view(): RevisionViewerEditorUIView;
13
+ constructor(editor: Editor, view: RevisionViewerEditorUIView);
14
+ /**
15
+ * @inheritDoc
16
+ */
17
+ get element(): HTMLElement | null;
18
+ /**
19
+ * Initializes the UI.
20
+ *
21
+ * @param replacementElement The DOM element that will be the source for the created editor.
22
+ */
23
+ init(replacementElement: HTMLElement): void;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ destroy(): void;
28
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5b9b=['editable','attachDomRoot','editor','bind','_initToolbar','destroy','detachDomRoot','view','isActive','document','get','_toolbarConfig','_elementReplacer','isFocused','render','stickyPanel','setEditableElement','name','viewportTopOffset','element','config','restore','toolbar','viewportOffset','addToolbar','rootName','replace','init','fillFromConfig','limiterElement','editing','focusTracker'];(function(_0x3f456e,_0x5b9b08){const _0x2eb23b=function(_0x52a381){while(--_0x52a381){_0x3f456e['push'](_0x3f456e['shift']());}};_0x2eb23b(++_0x5b9b08);}(_0x5b9b,0x16e));const _0x2eb2=function(_0x3f456e,_0x5b9b08){_0x3f456e=_0x3f456e-0x0;let _0x2eb23b=_0x5b9b[_0x3f456e];return _0x2eb23b;};import{EditorUI as _0x5b2b1d,normalizeToolbarConfig as _0x4496b5}from'ckeditor5/src/ui';import{ElementReplacer as _0x46ad70}from'ckeditor5/src/utils';export default class rt extends _0x5b2b1d{constructor(_0x1e9865,_0x35df4f){super(_0x1e9865),this['view']=_0x35df4f,this[_0x2eb2('0x1d')]=_0x4496b5(_0x1e9865[_0x2eb2('0x6')][_0x2eb2('0x1c')]('toolbar')),this['_elementReplacer']=new _0x46ad70();}get[_0x2eb2('0x5')](){return this[_0x2eb2('0x19')][_0x2eb2('0x5')];}[_0x2eb2('0xd')](_0x13f168){const _0x13e233=this[_0x2eb2('0x14')],_0x9e242f=this[_0x2eb2('0x19')],_0x3b1659=_0x13e233['editing']['view'],_0x56cfa6=_0x9e242f[_0x2eb2('0x12')],_0xbdf84a=_0x3b1659[_0x2eb2('0x1b')]['getRoot']();_0x56cfa6[_0x2eb2('0x3')]=_0xbdf84a[_0x2eb2('0xb')],_0x9e242f[_0x2eb2('0x0')]();const _0x357e84=_0x56cfa6[_0x2eb2('0x5')];this[_0x2eb2('0x2')](_0x56cfa6['name'],_0x357e84),_0x9e242f[_0x2eb2('0x12')][_0x2eb2('0x15')]('isFocused')['to'](this[_0x2eb2('0x11')]),_0x3b1659[_0x2eb2('0x13')](_0x357e84),this[_0x2eb2('0x1e')][_0x2eb2('0xc')](_0x13f168,this[_0x2eb2('0x5')]),this['_initToolbar'](),this['fire']('ready');}[_0x2eb2('0x17')](){super[_0x2eb2('0x17')]();const _0x3547cc=this[_0x2eb2('0x19')],_0x2b4df7=this['editor'][_0x2eb2('0x10')][_0x2eb2('0x19')];this[_0x2eb2('0x1e')][_0x2eb2('0x7')](),_0x2b4df7[_0x2eb2('0x18')](_0x3547cc['editable'][_0x2eb2('0x3')]),_0x3547cc[_0x2eb2('0x17')]();}[_0x2eb2('0x16')](){const _0x3b4678=this['view'];_0x3b4678[_0x2eb2('0x1')]['bind'](_0x2eb2('0x1a'))['to'](this[_0x2eb2('0x11')],_0x2eb2('0x1f')),_0x3b4678['stickyPanel'][_0x2eb2('0xf')]=_0x3b4678[_0x2eb2('0x5')],_0x3b4678['stickyPanel'][_0x2eb2('0x15')](_0x2eb2('0x4'))['to'](this,_0x2eb2('0x9'),({top:_0x4f70c5})=>_0x4f70c5),_0x3b4678[_0x2eb2('0x8')][_0x2eb2('0xe')](this[_0x2eb2('0x1d')],this['componentFactory']),this[_0x2eb2('0xa')](_0x3b4678['toolbar']);}}
23
+ const _0x2734=['setEditableElement','element','_initToolbar','destroy','view','stickyPanel','editable','bind','fillFromConfig','restore','getRoot','_toolbarConfig','focusTracker','componentFactory','document','name','addToolbar','ready','toolbar','_elementReplacer','config','_view','isFocused','editor','get','replace','viewportTopOffset','init'];(function(_0x50373b,_0x273401){const _0x10b9d4=function(_0x2b4a53){while(--_0x2b4a53){_0x50373b['push'](_0x50373b['shift']());}};_0x10b9d4(++_0x273401);}(_0x2734,0x1b5));const _0x10b9=function(_0x50373b,_0x273401){_0x50373b=_0x50373b-0x0;let _0x10b9d4=_0x2734[_0x50373b];return _0x10b9d4;};import{EditorUI as _0x58f3b2,normalizeToolbarConfig as _0x16a6e8}from'ckeditor5/src/ui';import{ElementReplacer as _0x32c110}from'ckeditor5/src/utils';export default class tt extends _0x58f3b2{get[_0x10b9('0xf')](){return this[_0x10b9('0x4')];}constructor(_0x3e8784,_0xb8eae0){super(_0x3e8784),this[_0x10b9('0x4')]=_0xb8eae0,this[_0x10b9('0x16')]=_0x16a6e8(_0x3e8784[_0x10b9('0x3')][_0x10b9('0x7')](_0x10b9('0x1'))),this['_elementReplacer']=new _0x32c110();}get[_0x10b9('0xc')](){return this[_0x10b9('0xf')]['element'];}[_0x10b9('0xa')](_0x4af2bd){const _0x33ff33=this[_0x10b9('0x6')],_0x4f3a5c=this['view'],_0x1fe034=_0x33ff33['editing'][_0x10b9('0xf')],_0x1de5fe=_0x4f3a5c[_0x10b9('0x11')],_0x552e67=_0x1fe034[_0x10b9('0x19')][_0x10b9('0x15')]();_0x1de5fe[_0x10b9('0x1a')]=_0x552e67['rootName'],_0x4f3a5c['render']();const _0x467657=_0x1de5fe[_0x10b9('0xc')];this[_0x10b9('0xb')](_0x1de5fe[_0x10b9('0x1a')],_0x467657),_0x4f3a5c[_0x10b9('0x11')][_0x10b9('0x12')](_0x10b9('0x5'))['to'](this[_0x10b9('0x17')]),_0x1fe034['attachDomRoot'](_0x467657),this[_0x10b9('0x2')][_0x10b9('0x8')](_0x4af2bd,this[_0x10b9('0xc')]),this[_0x10b9('0xd')](),this['fire'](_0x10b9('0x0'));}['destroy'](){super[_0x10b9('0xe')]();const _0x23c929=this[_0x10b9('0xf')],_0x1aabe0=this[_0x10b9('0x6')]['editing']['view'];this['_elementReplacer'][_0x10b9('0x14')](),_0x1aabe0['detachDomRoot'](_0x23c929[_0x10b9('0x11')][_0x10b9('0x1a')]),_0x23c929['destroy']();}[_0x10b9('0xd')](){const _0x9680d7=this[_0x10b9('0xf')];_0x9680d7['stickyPanel'][_0x10b9('0x12')]('isActive')['to'](this[_0x10b9('0x17')],_0x10b9('0x5')),_0x9680d7[_0x10b9('0x10')]['limiterElement']=_0x9680d7[_0x10b9('0xc')],_0x9680d7[_0x10b9('0x10')][_0x10b9('0x12')](_0x10b9('0x9'))['to'](this,'viewportOffset',({top:_0x55c347})=>_0x55c347),_0x9680d7[_0x10b9('0x1')][_0x10b9('0x13')](this[_0x10b9('0x16')],this[_0x10b9('0x18')]),this[_0x10b9('0x1b')](_0x9680d7[_0x10b9('0x1')]);}}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module revision-history/editor/revisionviewereditoruiview
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';
11
+ import '@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css';
12
+ export default class RevisionViewerEditorUIView extends BoxedEditorUIView {
13
+ /**
14
+ * Sticky panel view instance. This is a parent view of a {@link #toolbar}
15
+ * that makes toolbar sticky.
16
+ */
17
+ readonly stickyPanel: StickyPanelView;
18
+ /**
19
+ * Toolbar view instance.
20
+ */
21
+ readonly toolbar: ToolbarView;
22
+ get editable(): InlineEditableUIView;
23
+ /**
24
+ * Creates an instance of the classic editor UI view.
25
+ *
26
+ * @param locale The {@link module:core/editor/editor~Editor#locale} instance.
27
+ * @param editingView The editing view instance this view is related to.
28
+ * @param options Configuration options for the view instance.
29
+ */
30
+ constructor(locale: Locale, editingView: View, options?: RevisionViewerEditorUIViewOptions);
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ render(): void;
35
+ }
36
+ export interface RevisionViewerEditorUIViewOptions {
37
+ /**
38
+ * When set `true` enables automatic items grouping
39
+ * in the main {@link module:editor-classic/classiceditoruiview~ClassicEditorUIView#toolbar toolbar}.
40
+ * See {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull} to learn more.
41
+ */
42
+ shouldToolbarGroupWhenFull?: boolean;
43
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x1b48=['toolbar','shouldToolbarGroupWhenFull','main','render','add','stickyPanel','editable'];(function(_0xef85f6,_0x1b480c){var _0x412c3c=function(_0x32b488){while(--_0x32b488){_0xef85f6['push'](_0xef85f6['shift']());}};_0x412c3c(++_0x1b480c);}(_0x1b48,0xa2));var _0x412c=function(_0xef85f6,_0x1b480c){_0xef85f6=_0xef85f6-0x0;var _0x412c3c=_0x1b48[_0xef85f6];return _0x412c3c;};import{BoxedEditorUIView as _0x412bfc,InlineEditableUIView as _0x49d4f9,StickyPanelView as _0x257554,ToolbarView as _0x11a506}from'ckeditor5/src/ui';import'@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css';export default class et extends _0x412bfc{constructor(_0x4c3737,_0x4bbc36,_0x2bd873={}){super(_0x4c3737),this[_0x412c('0x4')]=new _0x257554(_0x4c3737),this[_0x412c('0x6')]=new _0x11a506(_0x4c3737,{'shouldGroupWhenFull':_0x2bd873[_0x412c('0x0')]}),this[_0x412c('0x5')]=new _0x49d4f9(_0x4c3737,_0x4bbc36);}[_0x412c('0x2')](){super['render'](),this[_0x412c('0x4')]['content'][_0x412c('0x3')](this['toolbar']),this['top'][_0x412c('0x3')](this[_0x412c('0x4')]),this[_0x412c('0x1')]['add'](this[_0x412c('0x5')]);}}
23
+ var _0x2d9a=['add','main','render','stickyPanel','_editable','shouldToolbarGroupWhenFull','toolbar','editable'];(function(_0x7624fa,_0x2d9aac){var _0x2346f4=function(_0x5a7e5a){while(--_0x5a7e5a){_0x7624fa['push'](_0x7624fa['shift']());}};_0x2346f4(++_0x2d9aac);}(_0x2d9a,0x83));var _0x2346=function(_0x7624fa,_0x2d9aac){_0x7624fa=_0x7624fa-0x0;var _0x2346f4=_0x2d9a[_0x7624fa];return _0x2346f4;};import{BoxedEditorUIView as _0x14d33f,InlineEditableUIView as _0xf36fe6,StickyPanelView as _0x3adc22,ToolbarView as _0x3121ec}from'ckeditor5/src/ui';import'@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css';export default class it extends _0x14d33f{get[_0x2346('0x4')](){return this[_0x2346('0x1')];}constructor(_0x411273,_0x58faf3,_0x4a0619={}){super(_0x411273),this['stickyPanel']=new _0x3adc22(_0x411273),this[_0x2346('0x3')]=new _0x3121ec(_0x411273,{'shouldGroupWhenFull':_0x4a0619[_0x2346('0x2')]}),this['_editable']=new _0xf36fe6(_0x411273,_0x58faf3);}[_0x2346('0x7')](){super[_0x2346('0x7')](),this[_0x2346('0x0')]['content'][_0x2346('0x5')](this[_0x2346('0x3')]),this['top'][_0x2346('0x5')](this[_0x2346('0x0')]),this[_0x2346('0x6')][_0x2346('0x5')](this['editable']);}}
package/src/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ export { default as RevisionHistory } from './revisionhistory';
2
+ export { default as RevisionsRepository } from './revisionsrepository';
3
+ export { default as RevisionViewerLoadingOverlay } from './ui/revisionviewer/revisionviewerloadingoverlay';
4
+ export { default as RevisionHistoryUI } from './ui/revisionhistory/revisionhistoryui';
5
+ export { default as RevisionTracker } from './revisiontracker';
6
+ export { default as RevisionViewer, type RestoreRevisionCommand, type ShowChangeCommand } from './revisionviewer';
7
+ export { default as RevisionsSidebar } from './ui/revisionssidebar/revisionssidebar';
8
+ export { default as RevisionViewerUI } from './ui/revisionviewer/revisionviewerui';
9
+ export type { RevisionHistoryConfig } from './revisionhistoryconfig';
10
+ import './augmentation';
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 RevisionTracker}from'./revisiontracker';
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';
@@ -0,0 +1,153 @@
1
+ /**
2
+ * @module revision-history/revision
3
+ * @publicApi
4
+ */
5
+ import type { User } from 'ckeditor5-collaboration/src/collaboration-core';
6
+ declare const Revision_base: {
7
+ new (): import("ckeditor5/src/utils").Observable;
8
+ prototype: import("ckeditor5/src/utils").Observable;
9
+ };
10
+ /**
11
+ * Represents a revision.
12
+ */
13
+ export default class Revision extends Revision_base {
14
+ /**
15
+ * Unique revision id.
16
+ */
17
+ id: string;
18
+ /**
19
+ * The user who created the revision.
20
+ *
21
+ * The `null` value means the revision was created automatically.
22
+ */
23
+ creator: User | null;
24
+ /**
25
+ * All users who contributed to this revision.
26
+ *
27
+ * This value can be empty if there are no changes in the revision.
28
+ */
29
+ authors: Array<User>;
30
+ /**
31
+ * Contains data describing changes saved in this revision.
32
+ *
33
+ * An object, where the keys are the names of roots and the values are strings with the revision data for those roots.
34
+ */
35
+ diffData: any;
36
+ /**
37
+ * Document version at which the revision ends.
38
+ *
39
+ * The revision includes changes introduced by {@link module:engine/model/operation/operation~Operation operations}
40
+ * with base versions starting from {@link module:revision-history/revision~Revision#fromVersion `fromVersion`} (inclusive) up to
41
+ * {@link module:revision-history/revision~Revision#toVersion `toVersion`} (exclusive).
42
+ */
43
+ toVersion: number;
44
+ /**
45
+ * Document version from which the revision starts.
46
+ *
47
+ * The revision includes changes introduced by {@link module:engine/model/operation/operation~Operation operations}
48
+ * with base versions starting from {@link module:revision-history/revision~Revision#fromVersion `fromVersion`} (inclusive) up to
49
+ * {@link module:revision-history/revision~Revision#toVersion `toVersion`} (exclusive).
50
+ */
51
+ fromVersion: number;
52
+ /**
53
+ * The revision name.
54
+ *
55
+ * If revision has not been named yet, this is an empty string.
56
+ *
57
+ * @observable
58
+ */
59
+ name: string;
60
+ /**
61
+ * The date when the revision was created or most recently updated.
62
+ *
63
+ * @observable
64
+ */
65
+ createdAt: Date;
66
+ /**
67
+ * Revision custom attributes. See also {@link #setAttribute} and {@link #removeAttribute}.
68
+ *
69
+ * @observable
70
+ */
71
+ attributes: Record<string, unknown>;
72
+ constructor(data: RevisionData);
73
+ /**
74
+ * Sets the revision name.
75
+ */
76
+ setName(name: string): void;
77
+ /**
78
+ * Adds revision attribute.
79
+ *
80
+ * Revision attributes are custom data that can be set and used by features built around revisions.
81
+ * Use it to store your feature data together with other revision data.
82
+ *
83
+ * ```ts
84
+ * revision.setAttribute( 'isImportant', true );
85
+ * ```
86
+ *
87
+ * You can group multiple values in an object, using the dot notation:
88
+ *
89
+ * ```ts
90
+ * revision.setAttribute( 'customData.type', 'image' );
91
+ * revision.setAttribute( 'customData.src', 'foo.jpg' );
92
+ * ```
93
+ *
94
+ * The attributes set on the revision can be accessed through the `attribute` property:
95
+ *
96
+ * ```ts
97
+ * const isImportant = revision.attributes.isImportant;
98
+ * const type = revision.attributes.customData.type;
99
+ * ```
100
+ *
101
+ * You can also observe the `attributes` property or bind other properties to it:
102
+ *
103
+ * ```ts
104
+ * myObj.bind( 'customData' ).to( revision, 'attributes', attributes => attributes.customData );
105
+ * revision.on( 'change:attributes', ( evt, propName, newValue, oldValue ) => { ... } );
106
+ * ```
107
+ *
108
+ * Whenever `setAttribute()` or `removeAttribute()` is called, the `attributes` property
109
+ * is re-set and the observables are refreshed.
110
+ */
111
+ setAttribute(name: string, value: unknown): void;
112
+ /**
113
+ * Removes the revision attribute.
114
+ *
115
+ * See also {@link #setAttribute}
116
+ */
117
+ removeAttribute(name: string): void;
118
+ toJSON(): RevisionJSON;
119
+ }
120
+ /**
121
+ * @eventName _update
122
+ */
123
+ export interface RevisionUpdateEvent {
124
+ name: '_update';
125
+ args: [RevisionJSON, boolean];
126
+ }
127
+ export interface RevisionJSON {
128
+ id: string;
129
+ name: string;
130
+ creatorId: string | null;
131
+ authorsIds: Array<string>;
132
+ diffData: any;
133
+ createdAt: Date;
134
+ attributes: Record<string, unknown>;
135
+ fromVersion: number;
136
+ toVersion: number;
137
+ }
138
+ export interface RevisionData {
139
+ id?: string;
140
+ name?: string | null;
141
+ creator?: User | null;
142
+ creatorId?: string | null;
143
+ authors?: Array<User>;
144
+ authorsIds?: Array<string>;
145
+ diffData?: any;
146
+ data?: any;
147
+ createdAt?: Date;
148
+ attributes?: Record<string, unknown>;
149
+ fromVersion?: number;
150
+ toVersion?: number;
151
+ isEmptyCurrent?: boolean;
152
+ }
153
+ export {};
package/src/revision.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1743=['diffData','set','creatorId','authorsIds','fromVersion','toVersion','setName','authors','fire','_update','removeAttribute','createdAt','creator','attributes','name','setAttribute'];(function(_0x1f41a4,_0x174384){const _0x262ebb=function(_0x5d0a83){while(--_0x5d0a83){_0x1f41a4['push'](_0x1f41a4['shift']());}};_0x262ebb(++_0x174384);}(_0x1743,0xe7));const _0x262e=function(_0x1f41a4,_0x174384){_0x1f41a4=_0x1f41a4-0x0;let _0x262ebb=_0x1743[_0x1f41a4];return _0x262ebb;};import{ObservableMixin as _0x355425,mix as _0x314a1d,uid as _0x30bd04}from'ckeditor5/src/utils';import{cloneDeep as _0xac1d0d,set as _0x913648,unset as _0x428576}from'lodash-es';export default class n{constructor(_0x2847e6){this['id']=_0x2847e6['id']||_0x30bd04(),this[_0x262e('0xa')](_0x262e('0x7'),_0x2847e6[_0x262e('0x7')]||''),this[_0x262e('0x5')]=_0x2847e6['creator']||null,this[_0x262e('0x0')]=_0x2847e6['authors']||[],this['set'](_0x262e('0x4'),_0x2847e6[_0x262e('0x4')]||new Date()),this['diffData']=_0x2847e6[_0x262e('0x9')]||null,this[_0x262e('0xa')]('attributes',_0x2847e6[_0x262e('0x6')]||{}),this[_0x262e('0xe')]=_0x2847e6[_0x262e('0xe')]||0x0,this[_0x262e('0xd')]=_0x2847e6[_0x262e('0xd')]||0x0;}[_0x262e('0xf')](_0x294d35){this['_update']({'name':_0x294d35});}[_0x262e('0x8')](_0x45dbf9,_0x30c4a0){const _0x29c0a0=_0xac1d0d(this[_0x262e('0x6')]);_0x913648(_0x29c0a0,_0x45dbf9,_0x30c4a0),this[_0x262e('0x2')]({'attributes':_0x29c0a0});}[_0x262e('0x3')](_0x58442f){const _0x256b55=_0xac1d0d(this[_0x262e('0x6')]);_0x428576(_0x256b55,_0x58442f),this[_0x262e('0x2')]({'attributes':_0x256b55});}[_0x262e('0x2')](_0x475427,_0x2a0d75=!0x1){let _0x11f1b4=!0x1;const _0x1190b8={'id':this['id']};for(const _0xff2781 of[_0x262e('0x7'),_0x262e('0x4'),_0x262e('0x9'),_0x262e('0x0'),_0x262e('0x6'),_0x262e('0xe'),_0x262e('0xd'),_0x262e('0xb')]){const _0x537666=_0x475427[_0xff2781];void 0x0!==_0x537666&&_0x537666!==this[_0xff2781]&&(this[_0xff2781]=_0x537666,_0x1190b8[_0xff2781]=_0x537666,_0x11f1b4=!0x0);}_0x11f1b4&&(_0x1190b8[_0x262e('0x0')]&&(_0x1190b8[_0x262e('0xc')]=_0x1190b8['authors']['map'](_0x2b3f6e=>_0x2b3f6e['id']),delete _0x1190b8['authors']),this[_0x262e('0x1')](_0x262e('0x2'),_0x1190b8,_0x2a0d75));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this[_0x262e('0x5')]?this[_0x262e('0x5')]['id']:null,'authorsIds':this[_0x262e('0x0')]['map'](_0x5e2a21=>_0x5e2a21['id']),'diffData':this['diffData'],'createdAt':this[_0x262e('0x4')],'attributes':this[_0x262e('0x6')],'fromVersion':this[_0x262e('0xd')],'toVersion':this[_0x262e('0xe')]};}}_0x314a1d(n,_0x355425);
23
+ const _0x22fe=['creatorId','authors','_update','attributes','set','fromVersion','name','creator','map','authorsIds','createdAt','setAttribute','diffData','toJSON','toVersion','setName'];(function(_0x5a0cc3,_0x22fe40){const _0x1d2fcd=function(_0x3d6003){while(--_0x3d6003){_0x5a0cc3['push'](_0x5a0cc3['shift']());}};_0x1d2fcd(++_0x22fe40);}(_0x22fe,0x1de));const _0x1d2f=function(_0x5a0cc3,_0x22fe40){_0x5a0cc3=_0x5a0cc3-0x0;let _0x1d2fcd=_0x22fe[_0x5a0cc3];return _0x1d2fcd;};import{ObservableMixin as _0x3e5fa0,uid as _0x101efb}from'ckeditor5/src/utils';import{cloneDeep as _0x269b74,set as _0x9a7b0d,unset as _0x40e80b}from'lodash-es';export default class a extends _0x3e5fa0(){constructor(_0x840c73){super(),this['id']=_0x840c73['id']||_0x101efb(),this[_0x1d2f('0x9')]=_0x840c73[_0x1d2f('0x9')]||null,this[_0x1d2f('0x3')]=_0x840c73['authors']||[],this[_0x1d2f('0xe')]=_0x840c73[_0x1d2f('0xe')]||null,this['toVersion']=_0x840c73[_0x1d2f('0x0')]||0x0,this[_0x1d2f('0x7')]=_0x840c73[_0x1d2f('0x7')]||0x0,this['set']('name',_0x840c73[_0x1d2f('0x8')]||''),this[_0x1d2f('0x6')](_0x1d2f('0xc'),_0x840c73[_0x1d2f('0xc')]||new Date()),this[_0x1d2f('0x6')](_0x1d2f('0x5'),_0x840c73[_0x1d2f('0x5')]||{});}[_0x1d2f('0x1')](_0x2a05e5){this[_0x1d2f('0x4')]({'name':_0x2a05e5});}[_0x1d2f('0xd')](_0x48aa90,_0x44850d){const _0x45c686=_0x269b74(this['attributes']);_0x9a7b0d(_0x45c686,_0x48aa90,_0x44850d),this[_0x1d2f('0x4')]({'attributes':_0x45c686});}['removeAttribute'](_0x3e066a){const _0x8e0ea7=_0x269b74(this[_0x1d2f('0x5')]);_0x40e80b(_0x8e0ea7,_0x3e066a),this[_0x1d2f('0x4')]({'attributes':_0x8e0ea7});}[_0x1d2f('0x4')](_0x1526d8,_0x5a1168=!0x1){let _0x362424=!0x1;const _0x2c3994={'id':this['id']},_0x38ccad=[_0x1d2f('0x8'),_0x1d2f('0xc'),_0x1d2f('0xe'),'authors',_0x1d2f('0x5'),_0x1d2f('0x0'),_0x1d2f('0x7'),_0x1d2f('0x2')];for(const _0x4a22e4 of _0x38ccad){const _0x2e1dc0=_0x1526d8[_0x4a22e4];void 0x0!==_0x2e1dc0&&_0x2e1dc0!==this[_0x4a22e4]&&(this[_0x4a22e4]=_0x2e1dc0,_0x2c3994[_0x4a22e4]=_0x2e1dc0,_0x362424=!0x0);}_0x362424&&(_0x2c3994[_0x1d2f('0x3')]&&(_0x2c3994[_0x1d2f('0xb')]=_0x2c3994['authors']['map'](_0x1f9f31=>_0x1f9f31['id']),delete _0x2c3994[_0x1d2f('0x3')]),this['fire'](_0x1d2f('0x4'),_0x2c3994,_0x5a1168));}[_0x1d2f('0xf')](){return{'id':this['id'],'name':this[_0x1d2f('0x8')],'creatorId':this[_0x1d2f('0x9')]?this[_0x1d2f('0x9')]['id']:null,'authorsIds':this[_0x1d2f('0x3')][_0x1d2f('0xa')](_0x497680=>_0x497680['id']),'diffData':this[_0x1d2f('0xe')],'createdAt':this['createdAt'],'attributes':this[_0x1d2f('0x5')],'fromVersion':this[_0x1d2f('0x7')],'toVersion':this['toVersion']};}}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @module revision-history/revisiondiff
3
+ */
4
+ import { Collection } from 'ckeditor5/src/utils';
5
+ import type { DocumentFragment } from 'ckeditor5/src/engine';
6
+ import type ChangeItem from './changeitem';
7
+ /**
8
+ * Represents a difference between two document revisions.
9
+ */
10
+ export default class RevisionDiff {
11
+ readonly newRevisionId: string;
12
+ readonly oldRevisionId: string;
13
+ readonly changes: Collection<ChangeItem>;
14
+ constructor(newRevisionId: string, oldRevisionId: string);
15
+ }
16
+ export interface DiffData {
17
+ model: Record<string, DocumentFragment>;
18
+ changes: Array<ChangeItem>;
19
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xe7a9=['_setData','add','oldRevisionId','newRevisionId','changes'];(function(_0x3018ea,_0xe7a967){const _0x1fc448=function(_0x43d415){while(--_0x43d415){_0x3018ea['push'](_0x3018ea['shift']());}};_0x1fc448(++_0xe7a967);}(_0xe7a9,0x12e));const _0x1fc4=function(_0x3018ea,_0xe7a967){_0x3018ea=_0x3018ea-0x0;let _0x1fc448=_0xe7a9[_0x3018ea];return _0x1fc448;};import{Collection as _0x187a56}from'ckeditor5/src/utils';export default class f{constructor(_0x341ede,_0x4417ee){this[_0x1fc4('0x1')]=_0x341ede,this[_0x1fc4('0x0')]=_0x4417ee,this[_0x1fc4('0x2')]=new _0x187a56();}[_0x1fc4('0x3')](_0x5c4b20){for(const _0xfdcd5a of _0x5c4b20[_0x1fc4('0x2')])this[_0x1fc4('0x2')][_0x1fc4('0x4')](_0xfdcd5a);}}
23
+ const _0xd915=['add','changes','_setData','newRevisionId','oldRevisionId'];(function(_0x22d1e2,_0xd91595){const _0x1a31eb=function(_0x17f874){while(--_0x17f874){_0x22d1e2['push'](_0x22d1e2['shift']());}};_0x1a31eb(++_0xd91595);}(_0xd915,0xf6));const _0x1a31=function(_0x22d1e2,_0xd91595){_0x22d1e2=_0x22d1e2-0x0;let _0x1a31eb=_0xd915[_0x22d1e2];return _0x1a31eb;};import{Collection as _0x4b6e0a}from'ckeditor5/src/utils';export default class f{constructor(_0x3f8ace,_0x17fa8d){this[_0x1a31('0x2')]=_0x3f8ace,this[_0x1a31('0x3')]=_0x17fa8d,this['changes']=new _0x4b6e0a();}[_0x1a31('0x1')](_0x1c1336){for(const _0xa1326 of _0x1c1336[_0x1a31('0x0')])this[_0x1a31('0x0')][_0x1a31('0x4')](_0xa1326);}}