@ckeditor/ckeditor5-revision-history 40.0.0 → 40.2.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 +3 -3
- package/README.md +11 -11
- package/build/revision-history.js +1 -1
- package/package.json +6 -6
- package/src/augmentation.d.ts +29 -29
- package/src/changeitem.d.ts +58 -58
- package/src/changeitem.js +1 -1
- package/src/editor/revisionviewereditor.d.ts +27 -27
- package/src/editor/revisionviewereditor.js +1 -1
- package/src/editor/revisionviewereditorui.d.ts +28 -28
- package/src/editor/revisionviewereditorui.js +1 -1
- package/src/editor/revisionviewereditoruiview.d.ts +43 -43
- package/src/editor/revisionviewereditoruiview.js +1 -1
- package/src/index.d.ts +15 -15
- package/src/revision.d.ts +153 -153
- package/src/revision.js +1 -1
- package/src/revisiondiff.d.ts +24 -24
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.d.ts +99 -99
- package/src/revisionhistory.js +1 -1
- package/src/revisionhistoryadapter.d.ts +64 -64
- package/src/revisionhistoryconfig.d.ts +60 -60
- package/src/revisionsrepository.d.ts +52 -52
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.d.ts +81 -81
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.d.ts +25 -25
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.d.ts +10 -10
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.d.ts +5 -5
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.d.ts +5 -5
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.d.ts +95 -95
- package/src/ui/revision/revisionview.js +1 -1
- package/src/ui/revision/subrevisioncollapserview.d.ts +21 -21
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.d.ts +34 -34
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.d.ts +5 -5
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.d.ts +81 -81
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.d.ts +26 -26
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.d.ts +44 -44
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.d.ts +5 -5
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.d.ts +29 -29
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.d.ts +44 -44
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.d.ts +9 -9
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.d.ts +22 -22
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.d.ts +40 -40
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.d.ts +26 -26
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.d.ts +28 -28
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- package/src/utils/common-translations.d.ts +11 -11
- 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": "40.
|
|
3
|
+
"version": "40.2.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": "40.
|
|
41
|
-
"@ckeditor/ckeditor5-ui": "40.
|
|
42
|
-
"@ckeditor/ckeditor5-undo": "40.
|
|
43
|
-
"ckeditor5": "40.
|
|
44
|
-
"ckeditor5-collaboration": "40.
|
|
40
|
+
"@ckeditor/ckeditor5-editor-classic": "40.2.0",
|
|
41
|
+
"@ckeditor/ckeditor5-ui": "40.2.0",
|
|
42
|
+
"@ckeditor/ckeditor5-undo": "40.2.0",
|
|
43
|
+
"ckeditor5": "40.2.0",
|
|
44
|
+
"ckeditor5-collaboration": "40.2.0",
|
|
45
45
|
"lodash-es": "4.17.21",
|
|
46
46
|
"luxon": "1.28.1"
|
|
47
47
|
},
|
package/src/augmentation.d.ts
CHANGED
|
@@ -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
|
+
}
|
package/src/changeitem.d.ts
CHANGED
|
@@ -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
|
|
23
|
+
var _0x17b7=['author','data','type','set','createdAt','rootName'];(function(_0x5ac462,_0x17b7f7){var _0x1b17f5=function(_0x225319){while(--_0x225319){_0x5ac462['push'](_0x5ac462['shift']());}};_0x1b17f5(++_0x17b7f7);}(_0x17b7,0x1e1));var _0x1b17=function(_0x5ac462,_0x17b7f7){_0x5ac462=_0x5ac462-0x0;var _0x1b17f5=_0x17b7[_0x5ac462];return _0x1b17f5;};import{ObservableMixin as _0x521855,uid as _0x4026ad}from'ckeditor5/src/utils';export default class r extends _0x521855(){constructor(_0x3a2f2f){super(),this['id']=_0x3a2f2f['id']||_0x4026ad(),this[_0x1b17('0x5')]=_0x3a2f2f[_0x1b17('0x5')],this[_0x1b17('0x1')]=_0x3a2f2f[_0x1b17('0x1')],this[_0x1b17('0x0')]=_0x3a2f2f['data']||{},this[_0x1b17('0x4')]=_0x3a2f2f[_0x1b17('0x4')],this[_0x1b17('0x2')](_0x1b17('0x3'),_0x3a2f2f[_0x1b17('0x3')]);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this[_0x1b17('0x1')],'data':this['data'],'createdAt':this[_0x1b17('0x3')]};}}
|
|
@@ -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
|
|
23
|
+
const _0xfe78=['model','data','editing','locale','updateSourceElement','fire','_ui','create','config','get','document','destroy','initialData','ready','init','createRoot','sourceElement'];(function(_0x1dab35,_0xfe7878){const _0x193cc6=function(_0x52cd8a){while(--_0x52cd8a){_0x1dab35['push'](_0x1dab35['shift']());}};_0x193cc6(++_0xfe7878);}(_0xfe78,0xe0));const _0x193c=function(_0x1dab35,_0xfe7878){_0x1dab35=_0x1dab35-0x0;let _0x193cc6=_0xfe78[_0x1dab35];return _0x193cc6;};import{Editor as _0x305e63,DataApiMixin as _0x1aed78,ElementApiMixin as _0x39f0fd}from'ckeditor5/src/core';import _0x358087 from'./revisionviewereditorui';import _0x497fdf from'./revisionviewereditoruiview';export default class m extends _0x1aed78(_0x39f0fd(_0x305e63)){get['ui'](){return this[_0x193c('0x3')];}constructor(_0x5851aa,_0x3a63e9){super(_0x3a63e9),this[_0x193c('0xd')]=_0x5851aa,this[_0x193c('0xe')][_0x193c('0x7')][_0x193c('0xc')]();const _0xf18f30=new _0x497fdf(this[_0x193c('0x0')],this[_0x193c('0x10')]['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new _0x358087(this,_0xf18f30);}[_0x193c('0x8')](){return this[_0x193c('0x1')](),this['ui'][_0x193c('0x8')](),super[_0x193c('0x8')]();}static async[_0x193c('0x4')](_0x12294e,_0xc17d5e){const _0xec8589=new this(_0x12294e,_0xc17d5e);return await _0xec8589['initPlugins'](),await _0xec8589['ui'][_0x193c('0xb')](_0x12294e),await _0xec8589[_0x193c('0xf')][_0x193c('0xb')](_0xec8589[_0x193c('0x5')][_0x193c('0x6')](_0x193c('0x9'))||''),_0xec8589[_0x193c('0x2')](_0x193c('0xa')),_0xec8589;}}
|
|
@@ -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
|
|
23
|
+
const _0xb8d5=['stickyPanel','editor','detachDomRoot','attachDomRoot','config','componentFactory','viewportTopOffset','init','element','replace','bind','document','isActive','limiterElement','view','name','editable','_initToolbar','rootName','ready','focusTracker','editing','addToolbar','toolbar','render','_view','isFocused','destroy','_elementReplacer','fire'];(function(_0x1fccbc,_0xb8d525){const _0x42677f=function(_0x56f5f2){while(--_0x56f5f2){_0x1fccbc['push'](_0x1fccbc['shift']());}};_0x42677f(++_0xb8d525);}(_0xb8d5,0xe9));const _0x4267=function(_0x1fccbc,_0xb8d525){_0x1fccbc=_0x1fccbc-0x0;let _0x42677f=_0xb8d5[_0x1fccbc];return _0x42677f;};import{EditorUI as _0x47cd0a,normalizeToolbarConfig as _0x1df03e}from'ckeditor5/src/ui';import{ElementReplacer as _0x217e20}from'ckeditor5/src/utils';export default class ot extends _0x47cd0a{get[_0x4267('0x15')](){return this[_0x4267('0x2')];}constructor(_0x161d93,_0x56419d){super(_0x161d93),this['_view']=_0x56419d,this['_toolbarConfig']=_0x1df03e(_0x161d93[_0x4267('0xb')]['get'](_0x4267('0x0'))),this[_0x4267('0x5')]=new _0x217e20();}get[_0x4267('0xf')](){return this['view'][_0x4267('0xf')];}[_0x4267('0xe')](_0x360e3c){const _0x1f62e6=this[_0x4267('0x8')],_0x5bdef2=this[_0x4267('0x15')],_0x311cd9=_0x1f62e6[_0x4267('0x1c')]['view'],_0x54eef0=_0x5bdef2[_0x4267('0x17')],_0x24873e=_0x311cd9[_0x4267('0x12')]['getRoot']();_0x54eef0[_0x4267('0x16')]=_0x24873e[_0x4267('0x19')],_0x5bdef2[_0x4267('0x1')]();const _0x37e125=_0x54eef0[_0x4267('0xf')];this['setEditableElement'](_0x54eef0[_0x4267('0x16')],_0x37e125),_0x5bdef2[_0x4267('0x17')]['bind'](_0x4267('0x3'))['to'](this['focusTracker']),_0x311cd9[_0x4267('0xa')](_0x37e125),this['_elementReplacer'][_0x4267('0x10')](_0x360e3c,this[_0x4267('0xf')]),this[_0x4267('0x18')](),this[_0x4267('0x6')](_0x4267('0x1a'));}[_0x4267('0x4')](){super[_0x4267('0x4')]();const _0x56a4c8=this[_0x4267('0x15')],_0x1847c6=this[_0x4267('0x8')][_0x4267('0x1c')][_0x4267('0x15')];this[_0x4267('0x5')]['restore'](),_0x1847c6[_0x4267('0x9')](_0x56a4c8[_0x4267('0x17')][_0x4267('0x16')]),_0x56a4c8[_0x4267('0x4')]();}[_0x4267('0x18')](){const _0x3b9f4d=this['view'];_0x3b9f4d[_0x4267('0x7')][_0x4267('0x11')](_0x4267('0x13'))['to'](this[_0x4267('0x1b')],_0x4267('0x3')),_0x3b9f4d[_0x4267('0x7')][_0x4267('0x14')]=_0x3b9f4d[_0x4267('0xf')],_0x3b9f4d[_0x4267('0x7')]['bind'](_0x4267('0xd'))['to'](this,'viewportOffset',({top:_0x42d898})=>_0x42d898),_0x3b9f4d['toolbar']['fillFromConfig'](this['_toolbarConfig'],this[_0x4267('0xc')]),this[_0x4267('0x1d')](_0x3b9f4d['toolbar']);}}
|
|
@@ -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
|
|
23
|
+
var _0x26b7=['add','shouldToolbarGroupWhenFull','_editable','render','toolbar','editable','content','stickyPanel','top'];(function(_0x40bfaa,_0x26b7e4){var _0x5acc99=function(_0x2babcb){while(--_0x2babcb){_0x40bfaa['push'](_0x40bfaa['shift']());}};_0x5acc99(++_0x26b7e4);}(_0x26b7,0x174));var _0x5acc=function(_0x40bfaa,_0x26b7e4){_0x40bfaa=_0x40bfaa-0x0;var _0x5acc99=_0x26b7[_0x40bfaa];return _0x5acc99;};import{BoxedEditorUIView as _0x5033d4,InlineEditableUIView as _0x4cacc7,StickyPanelView as _0x18788e,ToolbarView as _0x484351}from'ckeditor5/src/ui';import'@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css';export default class at extends _0x5033d4{get[_0x5acc('0x2')](){return this[_0x5acc('0x8')];}constructor(_0x39ecc8,_0x545af9,_0x382f6c={}){super(_0x39ecc8),this[_0x5acc('0x4')]=new _0x18788e(_0x39ecc8),this['toolbar']=new _0x484351(_0x39ecc8,{'shouldGroupWhenFull':_0x382f6c[_0x5acc('0x7')]}),this[_0x5acc('0x8')]=new _0x4cacc7(_0x39ecc8,_0x545af9);}['render'](){super[_0x5acc('0x0')](),this[_0x5acc('0x4')][_0x5acc('0x3')][_0x5acc('0x6')](this[_0x5acc('0x1')]),this[_0x5acc('0x5')][_0x5acc('0x6')](this['stickyPanel']),this['main'][_0x5acc('0x6')](this[_0x5acc('0x2')]);}}
|
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';
|