@ckeditor/ckeditor5-revision-history 39.0.2 → 40.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 (80) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/build/revision-history.js +1 -1
  4. package/ckeditor5-metadata.json +1 -1
  5. package/package.json +6 -6
  6. package/src/augmentation.d.ts +29 -29
  7. package/src/changeitem.d.ts +58 -58
  8. package/src/changeitem.js +1 -1
  9. package/src/editor/revisionviewereditor.d.ts +27 -27
  10. package/src/editor/revisionviewereditor.js +1 -1
  11. package/src/editor/revisionviewereditorui.d.ts +28 -28
  12. package/src/editor/revisionviewereditorui.js +1 -1
  13. package/src/editor/revisionviewereditoruiview.d.ts +43 -43
  14. package/src/editor/revisionviewereditoruiview.js +1 -1
  15. package/src/index.d.ts +15 -15
  16. package/src/revision.d.ts +153 -153
  17. package/src/revision.js +1 -1
  18. package/src/revisiondiff.d.ts +24 -24
  19. package/src/revisiondiff.js +1 -1
  20. package/src/revisionhistory.d.ts +99 -99
  21. package/src/revisionhistory.js +1 -1
  22. package/src/revisionhistoryadapter.d.ts +64 -64
  23. package/src/revisionhistoryconfig.d.ts +60 -60
  24. package/src/revisionsrepository.d.ts +52 -52
  25. package/src/revisionsrepository.js +1 -1
  26. package/src/revisiontracker.d.ts +81 -81
  27. package/src/revisiontracker.js +1 -1
  28. package/src/revisionviewer.d.ts +25 -25
  29. package/src/revisionviewer.js +1 -1
  30. package/src/ui/revision/createrevisionactionsdropdown.d.ts +10 -10
  31. package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
  32. package/src/ui/revision/revisionauthorview.d.ts +5 -5
  33. package/src/ui/revision/revisionauthorview.js +1 -1
  34. package/src/ui/revision/revisionnameview.d.ts +5 -5
  35. package/src/ui/revision/revisionnameview.js +1 -1
  36. package/src/ui/revision/revisionview.d.ts +95 -95
  37. package/src/ui/revision/revisionview.js +1 -1
  38. package/src/ui/revision/subrevisioncollapserview.d.ts +21 -21
  39. package/src/ui/revision/subrevisioncollapserview.js +1 -1
  40. package/src/ui/revision/subrevisionview.d.ts +34 -34
  41. package/src/ui/revision/subrevisionview.js +1 -1
  42. package/src/ui/revision/utils.d.ts +5 -5
  43. package/src/ui/revision/utils.js +1 -1
  44. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.d.ts +81 -81
  45. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
  46. package/src/ui/revisionhistory/revisionhistoryui.d.ts +26 -26
  47. package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
  48. package/src/ui/revisionssidebar/revisionssidebar.d.ts +44 -44
  49. package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
  50. package/src/ui/revisionssidebar/revisionssidebarheaderview.d.ts +5 -5
  51. package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
  52. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.d.ts +29 -29
  53. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
  54. package/src/ui/revisionssidebar/revisionssidebarview.d.ts +44 -44
  55. package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
  56. package/src/ui/revisionssidebar/utils.d.ts +9 -9
  57. package/src/ui/revisionssidebar/utils.js +1 -1
  58. package/src/ui/revisionviewer/changedetailsview.d.ts +22 -22
  59. package/src/ui/revisionviewer/changedetailsview.js +1 -1
  60. package/src/ui/revisionviewer/changesnavigationview.d.ts +40 -40
  61. package/src/ui/revisionviewer/changesnavigationview.js +1 -1
  62. package/src/ui/revisionviewer/revisionviewerloadingoverlay.d.ts +26 -26
  63. package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
  64. package/src/ui/revisionviewer/revisionviewerui.d.ts +28 -28
  65. package/src/ui/revisionviewer/revisionviewerui.js +1 -1
  66. package/src/utils/common-translations.d.ts +11 -11
  67. package/src/utils/common-translations.js +1 -1
  68. package/theme/changesnavigation.css +9 -0
  69. package/theme/revision/revision.css +9 -0
  70. package/theme/revision/revisionactions.css +9 -0
  71. package/theme/revision/revisionauthor.css +9 -0
  72. package/theme/revision/revisionname.css +9 -0
  73. package/theme/revision/subrevision.css +9 -0
  74. package/theme/revision/subrevisioncollapser.css +9 -0
  75. package/theme/revisionhistorysaverevisionform.css +5 -1
  76. package/theme/revisionssidebar/revisionssidebar.css +9 -0
  77. package/theme/revisionssidebar/revisionssidebarheader.css +9 -0
  78. package/theme/revisionssidebar/revisionssidebartimeperiod.css +9 -0
  79. package/theme/revisionviewer.css +9 -0
  80. package/theme/revisionviewerloadingoverlay.css +9 -0
@@ -10,7 +10,7 @@
10
10
  {
11
11
  "type": "SplitButton",
12
12
  "name": "revisionHistory",
13
- "iconPath": "theme/icons/revision-history.svg"
13
+ "iconPath": "@ckeditor/ckeditor5-core/theme/icons/history.svg"
14
14
  }
15
15
  ]
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-revision-history",
3
- "version": "39.0.2",
3
+ "version": "40.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/)",
@@ -37,11 +37,11 @@
37
37
  "CHANGELOG.md"
38
38
  ],
39
39
  "dependencies": {
40
- "@ckeditor/ckeditor5-editor-classic": "39.0.2",
41
- "@ckeditor/ckeditor5-ui": "39.0.2",
42
- "@ckeditor/ckeditor5-undo": "39.0.2",
43
- "ckeditor5": "39.0.2",
44
- "ckeditor5-collaboration": "39.0.2",
40
+ "@ckeditor/ckeditor5-editor-classic": "40.0.0",
41
+ "@ckeditor/ckeditor5-ui": "40.0.0",
42
+ "@ckeditor/ckeditor5-undo": "40.0.0",
43
+ "ckeditor5": "40.0.0",
44
+ "ckeditor5-collaboration": "40.0.0",
45
45
  "lodash-es": "4.17.21",
46
46
  "luxon": "1.28.1"
47
47
  },
@@ -1,29 +1,29 @@
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
- import type { RevisionHistoryConfig, RevisionsRepository, RevisionViewerLoadingOverlay, RevisionHistoryUI, RevisionTracker, RevisionViewer, RestoreRevisionCommand, ShowChangeCommand, RevisionsSidebar, RevisionViewerUI } from './index';
6
- declare module '@ckeditor/ckeditor5-core' {
7
- interface EditorConfig {
8
- /**
9
- * The configuration of the revision history feature.
10
- * Introduced by the {@link module:revision-history/revisionhistory~RevisionHistory} feature.
11
- */
12
- revisionHistory?: RevisionHistoryConfig;
13
- }
14
- interface PluginsMap {
15
- [RevisionsRepository.pluginName]: RevisionsRepository;
16
- [RevisionViewerLoadingOverlay.pluginName]: RevisionViewerLoadingOverlay;
17
- [RevisionHistoryUI.pluginName]: RevisionHistoryUI;
18
- [RevisionTracker.pluginName]: RevisionTracker;
19
- [RevisionViewer.pluginName]: RevisionViewer;
20
- [RevisionViewer.pluginName]: RevisionViewer;
21
- [RevisionsSidebar.pluginName]: RevisionsSidebar;
22
- [RevisionViewerUI.pluginName]: RevisionViewerUI;
23
- }
24
- interface CommandsMap {
25
- restoreRevision: RestoreRevisionCommand;
26
- showPreviousChange: ShowChangeCommand<'backward'>;
27
- showNextChange: ShowChangeCommand<'forward'>;
28
- }
29
- }
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
+ import type { RevisionHistoryConfig, RevisionsRepository, RevisionViewerLoadingOverlay, RevisionHistoryUI, RevisionTracker, RevisionViewer, RestoreRevisionCommand, ShowChangeCommand, RevisionsSidebar, RevisionViewerUI } from './index';
6
+ declare module '@ckeditor/ckeditor5-core' {
7
+ interface EditorConfig {
8
+ /**
9
+ * The configuration of the revision history feature.
10
+ * Introduced by the {@link module:revision-history/revisionhistory~RevisionHistory} feature.
11
+ */
12
+ revisionHistory?: RevisionHistoryConfig;
13
+ }
14
+ interface PluginsMap {
15
+ [RevisionsRepository.pluginName]: RevisionsRepository;
16
+ [RevisionViewerLoadingOverlay.pluginName]: RevisionViewerLoadingOverlay;
17
+ [RevisionHistoryUI.pluginName]: RevisionHistoryUI;
18
+ [RevisionTracker.pluginName]: RevisionTracker;
19
+ [RevisionViewer.pluginName]: RevisionViewer;
20
+ [RevisionViewer.pluginName]: RevisionViewer;
21
+ [RevisionsSidebar.pluginName]: RevisionsSidebar;
22
+ [RevisionViewerUI.pluginName]: RevisionViewerUI;
23
+ }
24
+ interface CommandsMap {
25
+ restoreRevision: RestoreRevisionCommand;
26
+ showPreviousChange: ShowChangeCommand<'backward'>;
27
+ showNextChange: ShowChangeCommand<'forward'>;
28
+ }
29
+ }
@@ -1,58 +1,58 @@
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
- import type { User } from 'ckeditor5-collaboration/src/collaboration-core';
6
- declare const ChangeItem_base: {
7
- new (): import("ckeditor5/src/utils").Observable;
8
- prototype: import("ckeditor5/src/utils").Observable;
9
- };
10
- /**
11
- * Represents a singular change entry in the revision or in the revisions comparison.
12
- */
13
- export default class ChangeItem extends ChangeItem_base {
14
- /**
15
- * Unique change item id.
16
- */
17
- readonly id: string;
18
- /**
19
- * User who created the change.
20
- */
21
- readonly author: User;
22
- /**
23
- * Change type.
24
- */
25
- readonly type: string;
26
- /**
27
- * Additional details about the change.
28
- */
29
- readonly data: Record<string, unknown>;
30
- /**
31
- * Name of the root which contains the change.
32
- */
33
- readonly rootName: string;
34
- /**
35
- * The date when the change was created.
36
- *
37
- * @observable
38
- */
39
- readonly createdAt: Date;
40
- constructor(data: ChangeItemInput);
41
- toJSON(): ChangeItemJSON;
42
- }
43
- export interface ChangeItemInput {
44
- id?: string;
45
- author: User;
46
- type: string;
47
- data: Record<string, unknown>;
48
- createdAt: Date;
49
- rootName: string;
50
- }
51
- export interface ChangeItemJSON {
52
- id: string;
53
- authorId: string;
54
- type: string;
55
- data: Record<string, unknown>;
56
- createdAt: Date;
57
- }
58
- export {};
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
+ import type { User } from 'ckeditor5-collaboration/src/collaboration-core';
6
+ declare const ChangeItem_base: {
7
+ new (): import("ckeditor5/src/utils").Observable;
8
+ prototype: import("ckeditor5/src/utils").Observable;
9
+ };
10
+ /**
11
+ * Represents a singular change entry in the revision or in the revisions comparison.
12
+ */
13
+ export default class ChangeItem extends ChangeItem_base {
14
+ /**
15
+ * Unique change item id.
16
+ */
17
+ readonly id: string;
18
+ /**
19
+ * User who created the change.
20
+ */
21
+ readonly author: User;
22
+ /**
23
+ * Change type.
24
+ */
25
+ readonly type: string;
26
+ /**
27
+ * Additional details about the change.
28
+ */
29
+ readonly data: Record<string, unknown>;
30
+ /**
31
+ * Name of the root which contains the change.
32
+ */
33
+ readonly rootName: string;
34
+ /**
35
+ * The date when the change was created.
36
+ *
37
+ * @observable
38
+ */
39
+ readonly createdAt: Date;
40
+ constructor(data: ChangeItemInput);
41
+ toJSON(): ChangeItemJSON;
42
+ }
43
+ export interface ChangeItemInput {
44
+ id?: string;
45
+ author: User;
46
+ type: string;
47
+ data: Record<string, unknown>;
48
+ createdAt: Date;
49
+ rootName: string;
50
+ }
51
+ export interface ChangeItemJSON {
52
+ id: string;
53
+ authorId: string;
54
+ type: string;
55
+ data: Record<string, unknown>;
56
+ createdAt: Date;
57
+ }
58
+ export {};
package/src/changeitem.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x4089=['toJSON','author','rootName','set','createdAt','type','data'];(function(_0x58e25f,_0x408990){var _0x51e536=function(_0xbf65eb){while(--_0xbf65eb){_0x58e25f['push'](_0x58e25f['shift']());}};_0x51e536(++_0x408990);}(_0x4089,0x1d9));var _0x51e5=function(_0x58e25f,_0x408990){_0x58e25f=_0x58e25f-0x0;var _0x51e536=_0x4089[_0x58e25f];return _0x51e536;};import{ObservableMixin as _0x24017a,uid as _0x54c752}from'ckeditor5/src/utils';export default class r extends _0x24017a(){constructor(_0x39ec11){super(),this['id']=_0x39ec11['id']||_0x54c752(),this[_0x51e5('0x4')]=_0x39ec11[_0x51e5('0x4')],this[_0x51e5('0x1')]=_0x39ec11[_0x51e5('0x1')],this['data']=_0x39ec11[_0x51e5('0x2')]||{},this['rootName']=_0x39ec11[_0x51e5('0x5')],this[_0x51e5('0x6')](_0x51e5('0x0'),_0x39ec11[_0x51e5('0x0')]);}[_0x51e5('0x3')](){return{'id':this['id'],'authorId':this[_0x51e5('0x4')]['id'],'type':this[_0x51e5('0x1')],'data':this[_0x51e5('0x2')],'createdAt':this[_0x51e5('0x0')]};}}
23
+ var _0x2dad=['rootName','author','toJSON','set','createdAt','type','data'];(function(_0x197641,_0x2dad86){var _0x59fda9=function(_0x41d2a3){while(--_0x41d2a3){_0x197641['push'](_0x197641['shift']());}};_0x59fda9(++_0x2dad86);}(_0x2dad,0xcf));var _0x59fd=function(_0x197641,_0x2dad86){_0x197641=_0x197641-0x0;var _0x59fda9=_0x2dad[_0x197641];return _0x59fda9;};import{ObservableMixin as _0x381e6d,uid as _0xeb4444}from'ckeditor5/src/utils';export default class r extends _0x381e6d(){constructor(_0x36a2cf){super(),this['id']=_0x36a2cf['id']||_0xeb4444(),this[_0x59fd('0x4')]=_0x36a2cf[_0x59fd('0x4')],this[_0x59fd('0x1')]=_0x36a2cf['type'],this[_0x59fd('0x2')]=_0x36a2cf[_0x59fd('0x2')]||{},this[_0x59fd('0x3')]=_0x36a2cf[_0x59fd('0x3')],this[_0x59fd('0x6')](_0x59fd('0x0'),_0x36a2cf[_0x59fd('0x0')]);}[_0x59fd('0x5')](){return{'id':this['id'],'authorId':this['author']['id'],'type':this[_0x59fd('0x1')],'data':this[_0x59fd('0x2')],'createdAt':this['createdAt']};}}
@@ -1,27 +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 {};
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 _0x2d70=['locale','create','fire','destroy','_ui','editing','ready','createRoot','init','updateSourceElement','model','config'];(function(_0x546421,_0x2d7098){const _0x7ee507=function(_0x1ee66b){while(--_0x1ee66b){_0x546421['push'](_0x546421['shift']());}};_0x7ee507(++_0x2d7098);}(_0x2d70,0x1c6));const _0x7ee5=function(_0x546421,_0x2d7098){_0x546421=_0x546421-0x0;let _0x7ee507=_0x2d70[_0x546421];return _0x7ee507;};import{Editor as _0x3212c0,DataApiMixin as _0x134a95,ElementApiMixin as _0x3b86b7}from'ckeditor5/src/core';import _0xe3d4c2 from'./revisionviewereditorui';import _0x5b6039 from'./revisionviewereditoruiview';export default class m extends _0x134a95(_0x3b86b7(_0x3212c0)){get['ui'](){return this[_0x7ee5('0x6')];}constructor(_0x506f94,_0x2b7b72){super(_0x2b7b72),this['sourceElement']=_0x506f94,this[_0x7ee5('0x0')]['document'][_0x7ee5('0x9')]();const _0x142c1d=new _0x5b6039(this[_0x7ee5('0x2')],this[_0x7ee5('0x7')]['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new _0xe3d4c2(this,_0x142c1d);}[_0x7ee5('0x5')](){return this[_0x7ee5('0xb')](),this['ui'][_0x7ee5('0x5')](),super[_0x7ee5('0x5')]();}static async[_0x7ee5('0x3')](_0x12abc9,_0x436899){const _0x5a6e7d=new this(_0x12abc9,_0x436899);return await _0x5a6e7d['initPlugins'](),await _0x5a6e7d['ui'][_0x7ee5('0xa')](_0x12abc9),await _0x5a6e7d['data'][_0x7ee5('0xa')](_0x5a6e7d[_0x7ee5('0x1')]['get']('initialData')||''),_0x5a6e7d[_0x7ee5('0x4')](_0x7ee5('0x8')),_0x5a6e7d;}}
23
+ const _0x42a9=['data','initialData','initPlugins','_ui','destroy','createRoot','locale','create','sourceElement','view','document','updateSourceElement','init'];(function(_0x1b204d,_0x42a958){const _0x707e95=function(_0x441102){while(--_0x441102){_0x1b204d['push'](_0x1b204d['shift']());}};_0x707e95(++_0x42a958);}(_0x42a9,0xd6));const _0x707e=function(_0x1b204d,_0x42a958){_0x1b204d=_0x1b204d-0x0;let _0x707e95=_0x42a9[_0x1b204d];return _0x707e95;};import{Editor as _0x1e8e34,DataApiMixin as _0x47018e,ElementApiMixin as _0x395393}from'ckeditor5/src/core';import _0x1b0075 from'./revisionviewereditorui';import _0x267e8f from'./revisionviewereditoruiview';export default class m extends _0x47018e(_0x395393(_0x1e8e34)){get['ui'](){return this['_ui'];}constructor(_0x16629e,_0x5e5b47){super(_0x5e5b47),this[_0x707e('0x2')]=_0x16629e,this['model'][_0x707e('0x4')][_0x707e('0xc')]();const _0x47873d=new _0x267e8f(this[_0x707e('0x0')],this['editing'][_0x707e('0x3')],{'shouldToolbarGroupWhenFull':!0x0});this[_0x707e('0xa')]=new _0x1b0075(this,_0x47873d);}[_0x707e('0xb')](){return this[_0x707e('0x5')](),this['ui'][_0x707e('0xb')](),super[_0x707e('0xb')]();}static async[_0x707e('0x1')](_0x50dcd6,_0x140925){const _0x17f0f0=new this(_0x50dcd6,_0x140925);return await _0x17f0f0[_0x707e('0x9')](),await _0x17f0f0['ui'][_0x707e('0x6')](_0x50dcd6),await _0x17f0f0[_0x707e('0x7')][_0x707e('0x6')](_0x17f0f0['config']['get'](_0x707e('0x8'))||''),_0x17f0f0['fire']('ready'),_0x17f0f0;}}
@@ -1,28 +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
- }
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 _0x436e=['setEditableElement','ready','editing','editable','document','fire','addToolbar','limiterElement','isFocused','bind','fillFromConfig','editor','viewportTopOffset','view','render','restore','_elementReplacer','_view','viewportOffset','getRoot','name','stickyPanel','_toolbarConfig','init','get','element','replace','destroy','toolbar','config','_initToolbar'];(function(_0x2f1623,_0x436ef0){const _0xdf1264=function(_0x4d5232){while(--_0x4d5232){_0x2f1623['push'](_0x2f1623['shift']());}};_0xdf1264(++_0x436ef0);}(_0x436e,0x129));const _0xdf12=function(_0x2f1623,_0x436ef0){_0x2f1623=_0x2f1623-0x0;let _0xdf1264=_0x436e[_0x2f1623];return _0xdf1264;};import{EditorUI as _0x222afc,normalizeToolbarConfig as _0x1883d4}from'ckeditor5/src/ui';import{ElementReplacer as _0x1d91e4}from'ckeditor5/src/utils';export default class ot extends _0x222afc{get[_0xdf12('0x1a')](){return this[_0xdf12('0x1e')];}constructor(_0x170d7f,_0x36d27f){super(_0x170d7f),this['_view']=_0x36d27f,this[_0xdf12('0x4')]=_0x1883d4(_0x170d7f[_0xdf12('0xb')][_0xdf12('0x6')](_0xdf12('0xa'))),this['_elementReplacer']=new _0x1d91e4();}get[_0xdf12('0x7')](){return this['view']['element'];}[_0xdf12('0x5')](_0x4e5b41){const _0x45130e=this[_0xdf12('0x18')],_0x5b1e01=this[_0xdf12('0x1a')],_0x56d692=_0x45130e['editing'][_0xdf12('0x1a')],_0x182b0a=_0x5b1e01[_0xdf12('0x10')],_0x5a5f31=_0x56d692[_0xdf12('0x11')][_0xdf12('0x1')]();_0x182b0a['name']=_0x5a5f31['rootName'],_0x5b1e01[_0xdf12('0x1b')]();const _0x2f43f3=_0x182b0a['element'];this[_0xdf12('0xd')](_0x182b0a[_0xdf12('0x2')],_0x2f43f3),_0x5b1e01[_0xdf12('0x10')]['bind'](_0xdf12('0x15'))['to'](this['focusTracker']),_0x56d692['attachDomRoot'](_0x2f43f3),this[_0xdf12('0x1d')][_0xdf12('0x8')](_0x4e5b41,this['element']),this[_0xdf12('0xc')](),this[_0xdf12('0x12')](_0xdf12('0xe'));}[_0xdf12('0x9')](){super[_0xdf12('0x9')]();const _0x10c4f9=this[_0xdf12('0x1a')],_0x53d29a=this[_0xdf12('0x18')][_0xdf12('0xf')][_0xdf12('0x1a')];this['_elementReplacer'][_0xdf12('0x1c')](),_0x53d29a['detachDomRoot'](_0x10c4f9['editable'][_0xdf12('0x2')]),_0x10c4f9['destroy']();}[_0xdf12('0xc')](){const _0x2fd8f3=this[_0xdf12('0x1a')];_0x2fd8f3['stickyPanel'][_0xdf12('0x16')]('isActive')['to'](this['focusTracker'],_0xdf12('0x15')),_0x2fd8f3[_0xdf12('0x3')][_0xdf12('0x14')]=_0x2fd8f3['element'],_0x2fd8f3[_0xdf12('0x3')][_0xdf12('0x16')](_0xdf12('0x19'))['to'](this,_0xdf12('0x0'),({top:_0x285696})=>_0x285696),_0x2fd8f3[_0xdf12('0xa')][_0xdf12('0x17')](this[_0xdf12('0x4')],this['componentFactory']),this[_0xdf12('0x13')](_0x2fd8f3[_0xdf12('0xa')]);}}
23
+ const _0x424c=['setEditableElement','editable','replace','name','attachDomRoot','isActive','bind','_elementReplacer','get','_toolbarConfig','restore','document','viewportTopOffset','view','render','fillFromConfig','_view','editing','viewportOffset','addToolbar','isFocused','element','destroy','stickyPanel','getRoot','editor','config','_initToolbar','focusTracker','init','toolbar'];(function(_0x2011b5,_0x424c52){const _0x532f62=function(_0x1111a7){while(--_0x1111a7){_0x2011b5['push'](_0x2011b5['shift']());}};_0x532f62(++_0x424c52);}(_0x424c,0xea));const _0x532f=function(_0x2011b5,_0x424c52){_0x2011b5=_0x2011b5-0x0;let _0x532f62=_0x424c[_0x2011b5];return _0x532f62;};import{EditorUI as _0x210adf,normalizeToolbarConfig as _0xed37a4}from'ckeditor5/src/ui';import{ElementReplacer as _0x370248}from'ckeditor5/src/utils';export default class ot extends _0x210adf{get['view'](){return this[_0x532f('0x1e')];}constructor(_0x2d01a7,_0x56f24d){super(_0x2d01a7),this['_view']=_0x56f24d,this[_0x532f('0x17')]=_0xed37a4(_0x2d01a7[_0x532f('0x9')][_0x532f('0x16')](_0x532f('0xd'))),this['_elementReplacer']=new _0x370248();}get[_0x532f('0x4')](){return this[_0x532f('0x1b')][_0x532f('0x4')];}[_0x532f('0xc')](_0x2cd0a7){const _0x30a3c5=this[_0x532f('0x8')],_0x402a6a=this['view'],_0x5916e1=_0x30a3c5[_0x532f('0x0')]['view'],_0x38c78f=_0x402a6a['editable'],_0x57c838=_0x5916e1[_0x532f('0x19')][_0x532f('0x7')]();_0x38c78f[_0x532f('0x11')]=_0x57c838['rootName'],_0x402a6a[_0x532f('0x1c')]();const _0xd2670e=_0x38c78f[_0x532f('0x4')];this[_0x532f('0xe')](_0x38c78f[_0x532f('0x11')],_0xd2670e),_0x402a6a[_0x532f('0xf')]['bind']('isFocused')['to'](this[_0x532f('0xb')]),_0x5916e1[_0x532f('0x12')](_0xd2670e),this[_0x532f('0x15')][_0x532f('0x10')](_0x2cd0a7,this['element']),this[_0x532f('0xa')](),this['fire']('ready');}[_0x532f('0x5')](){super[_0x532f('0x5')]();const _0x1a5fde=this[_0x532f('0x1b')],_0x33a63c=this[_0x532f('0x8')][_0x532f('0x0')][_0x532f('0x1b')];this['_elementReplacer'][_0x532f('0x18')](),_0x33a63c['detachDomRoot'](_0x1a5fde['editable'][_0x532f('0x11')]),_0x1a5fde[_0x532f('0x5')]();}[_0x532f('0xa')](){const _0x2f19e0=this[_0x532f('0x1b')];_0x2f19e0[_0x532f('0x6')][_0x532f('0x14')](_0x532f('0x13'))['to'](this[_0x532f('0xb')],_0x532f('0x3')),_0x2f19e0[_0x532f('0x6')]['limiterElement']=_0x2f19e0[_0x532f('0x4')],_0x2f19e0['stickyPanel']['bind'](_0x532f('0x1a'))['to'](this,_0x532f('0x1'),({top:_0x4e4d36})=>_0x4e4d36),_0x2f19e0[_0x532f('0xd')][_0x532f('0x1d')](this[_0x532f('0x17')],this['componentFactory']),this[_0x532f('0x2')](_0x2f19e0[_0x532f('0xd')]);}}
@@ -1,43 +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
- }
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 _0x46cc=['render','toolbar','_editable','stickyPanel','add','main','shouldToolbarGroupWhenFull'];(function(_0x2eaedf,_0x46cc93){var _0x2e7e58=function(_0x274881){while(--_0x274881){_0x2eaedf['push'](_0x2eaedf['shift']());}};_0x2e7e58(++_0x46cc93);}(_0x46cc,0x128));var _0x2e7e=function(_0x2eaedf,_0x46cc93){_0x2eaedf=_0x2eaedf-0x0;var _0x2e7e58=_0x46cc[_0x2eaedf];return _0x2e7e58;};import{BoxedEditorUIView as _0x483b77,InlineEditableUIView as _0x5ebfd9,StickyPanelView as _0x38fa08,ToolbarView as _0x4904cc}from'ckeditor5/src/ui';import'@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css';export default class at extends _0x483b77{get['editable'](){return this['_editable'];}constructor(_0x2004ad,_0x1e219b,_0x527c8b={}){super(_0x2004ad),this[_0x2e7e('0x1')]=new _0x38fa08(_0x2004ad),this[_0x2e7e('0x6')]=new _0x4904cc(_0x2004ad,{'shouldGroupWhenFull':_0x527c8b[_0x2e7e('0x4')]}),this[_0x2e7e('0x0')]=new _0x5ebfd9(_0x2004ad,_0x1e219b);}['render'](){super[_0x2e7e('0x5')](),this[_0x2e7e('0x1')]['content'][_0x2e7e('0x2')](this[_0x2e7e('0x6')]),this['top'][_0x2e7e('0x2')](this[_0x2e7e('0x1')]),this[_0x2e7e('0x3')][_0x2e7e('0x2')](this['editable']);}}
23
+ var _0x5718=['render','toolbar','shouldToolbarGroupWhenFull','add','top','main','_editable','content','editable','stickyPanel'];(function(_0x19c150,_0x5718cf){var _0x20b0b1=function(_0x5d821e){while(--_0x5d821e){_0x19c150['push'](_0x19c150['shift']());}};_0x20b0b1(++_0x5718cf);}(_0x5718,0xd0));var _0x20b0=function(_0x19c150,_0x5718cf){_0x19c150=_0x19c150-0x0;var _0x20b0b1=_0x5718[_0x19c150];return _0x20b0b1;};import{BoxedEditorUIView as _0x2ee8b7,InlineEditableUIView as _0x21a133,StickyPanelView as _0x66d51c,ToolbarView as _0x3b14f6}from'ckeditor5/src/ui';import'@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css';export default class at extends _0x2ee8b7{get[_0x20b0('0x0')](){return this['_editable'];}constructor(_0x200934,_0x3d6d7e,_0x338da4={}){super(_0x200934),this['stickyPanel']=new _0x66d51c(_0x200934),this[_0x20b0('0x3')]=new _0x3b14f6(_0x200934,{'shouldGroupWhenFull':_0x338da4[_0x20b0('0x4')]}),this[_0x20b0('0x8')]=new _0x21a133(_0x200934,_0x3d6d7e);}[_0x20b0('0x2')](){super[_0x20b0('0x2')](),this[_0x20b0('0x1')][_0x20b0('0x9')][_0x20b0('0x5')](this[_0x20b0('0x3')]),this[_0x20b0('0x6')][_0x20b0('0x5')](this[_0x20b0('0x1')]),this[_0x20b0('0x7')][_0x20b0('0x5')](this[_0x20b0('0x0')]);}}
package/src/index.d.ts CHANGED
@@ -1,15 +1,15 @@
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
- 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';
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
+ 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';