@ckeditor/ckeditor5-revision-history 38.1.0 → 38.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/revision-history.js +1 -1
- package/package.json +6 -6
- package/src/augmentation.d.ts +25 -25
- package/src/changeitem.d.ts +57 -57
- 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 +11 -11
- package/src/revision.d.ts +153 -153
- package/src/revision.js +1 -1
- package/src/revisiondiff.d.ts +20 -20
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.d.ts +95 -95
- package/src/revisionhistory.js +1 -1
- package/src/revisionhistoryadapter.d.ts +60 -60
- package/src/revisionhistoryconfig.d.ts +60 -60
- package/src/revisionsrepository.d.ts +48 -48
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.d.ts +77 -77
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.d.ts +21 -21
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.d.ts +9 -9
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.d.ts +4 -4
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.d.ts +4 -4
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.d.ts +91 -91
- package/src/ui/revision/revisionview.js +1 -1
- package/src/ui/revision/subrevisioncollapserview.d.ts +17 -17
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.d.ts +30 -30
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.d.ts +4 -4
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.d.ts +80 -80
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.d.ts +22 -22
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.d.ts +40 -40
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.d.ts +4 -4
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.d.ts +25 -25
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.d.ts +40 -40
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.d.ts +8 -8
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.d.ts +18 -18
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.d.ts +36 -36
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.d.ts +22 -22
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.d.ts +24 -24
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- package/src/utils/common-translations.d.ts +7 -7
- package/src/utils/common-translations.js +1 -1
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module revision-history/ui/revision/revisionview
|
|
3
|
-
*/
|
|
4
|
-
import type { BaseEvent, Locale } from 'ckeditor5/src/utils';
|
|
5
|
-
import { View, type DropdownView } from 'ckeditor5/src/ui';
|
|
6
|
-
import RevisionNameView from './revisionnameview';
|
|
7
|
-
import '../../../theme/revision/revision.css';
|
|
8
|
-
import type Revision from '../../revision';
|
|
9
|
-
import type { RevisionAction } from '../revisionssidebar/revisionssidebar';
|
|
10
|
-
declare const RevisionView_base: import("ckeditor5/src/utils").Mixed<typeof View, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin").ConfirmApi>;
|
|
11
|
-
/**
|
|
12
|
-
* TODO
|
|
13
|
-
*/
|
|
14
|
-
export default class RevisionView extends RevisionView_base {
|
|
15
|
-
id: string;
|
|
16
|
-
revisionNameView: RevisionNameView;
|
|
17
|
-
/**
|
|
18
|
-
* It holds the revision actions drop-down view if actions are provided,
|
|
19
|
-
* or just empty text otherwise.
|
|
20
|
-
*/
|
|
21
|
-
revisionActionsView: DropdownView | '';
|
|
22
|
-
/**
|
|
23
|
-
* @observable
|
|
24
|
-
*/
|
|
25
|
-
name: string;
|
|
26
|
-
/**
|
|
27
|
-
* @observable
|
|
28
|
-
*/
|
|
29
|
-
createdAt: Date;
|
|
30
|
-
/**
|
|
31
|
-
* @observable
|
|
32
|
-
*/
|
|
33
|
-
isSelected: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* @observable
|
|
36
|
-
*/
|
|
37
|
-
isHighlighted: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* @observable
|
|
40
|
-
*/
|
|
41
|
-
isActionsDropdownOpen: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* @observable
|
|
44
|
-
*/
|
|
45
|
-
isReady: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* @observable
|
|
48
|
-
*/
|
|
49
|
-
isEnabled: boolean;
|
|
50
|
-
constructor(locale: Locale, revision: Revision, revisionActions: Array<RevisionAction>);
|
|
51
|
-
/**
|
|
52
|
-
* @inheritDoc
|
|
53
|
-
*/
|
|
54
|
-
render(): void;
|
|
55
|
-
/**
|
|
56
|
-
* TODO
|
|
57
|
-
*/
|
|
58
|
-
select(): void;
|
|
59
|
-
/**
|
|
60
|
-
* TODO
|
|
61
|
-
*/
|
|
62
|
-
deselect(): void;
|
|
63
|
-
/**
|
|
64
|
-
* TODO
|
|
65
|
-
*/
|
|
66
|
-
highlight(): void;
|
|
67
|
-
/**
|
|
68
|
-
* TODO
|
|
69
|
-
*/
|
|
70
|
-
unhighlight(): void;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* @eventName setName | revisionSetName
|
|
74
|
-
*/
|
|
75
|
-
export interface RevisionSetNameEvent extends BaseEvent {
|
|
76
|
-
name: 'setName' | 'revisionSetName';
|
|
77
|
-
args: [{
|
|
78
|
-
id: string;
|
|
79
|
-
name: string;
|
|
80
|
-
}];
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* @eventName select | revisionSelected
|
|
84
|
-
*/
|
|
85
|
-
export interface RevisionSelectedEvent extends BaseEvent {
|
|
86
|
-
name: 'select' | 'revisionSelected';
|
|
87
|
-
args: [{
|
|
88
|
-
id: string;
|
|
89
|
-
}];
|
|
90
|
-
}
|
|
91
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @module revision-history/ui/revision/revisionview
|
|
3
|
+
*/
|
|
4
|
+
import type { BaseEvent, Locale } from 'ckeditor5/src/utils';
|
|
5
|
+
import { View, type DropdownView } from 'ckeditor5/src/ui';
|
|
6
|
+
import RevisionNameView from './revisionnameview';
|
|
7
|
+
import '../../../theme/revision/revision.css';
|
|
8
|
+
import type Revision from '../../revision';
|
|
9
|
+
import type { RevisionAction } from '../revisionssidebar/revisionssidebar';
|
|
10
|
+
declare const RevisionView_base: import("ckeditor5/src/utils").Mixed<typeof View, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin").ConfirmApi>;
|
|
11
|
+
/**
|
|
12
|
+
* TODO
|
|
13
|
+
*/
|
|
14
|
+
export default class RevisionView extends RevisionView_base {
|
|
15
|
+
id: string;
|
|
16
|
+
revisionNameView: RevisionNameView;
|
|
17
|
+
/**
|
|
18
|
+
* It holds the revision actions drop-down view if actions are provided,
|
|
19
|
+
* or just empty text otherwise.
|
|
20
|
+
*/
|
|
21
|
+
revisionActionsView: DropdownView | '';
|
|
22
|
+
/**
|
|
23
|
+
* @observable
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
/**
|
|
27
|
+
* @observable
|
|
28
|
+
*/
|
|
29
|
+
createdAt: Date;
|
|
30
|
+
/**
|
|
31
|
+
* @observable
|
|
32
|
+
*/
|
|
33
|
+
isSelected: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* @observable
|
|
36
|
+
*/
|
|
37
|
+
isHighlighted: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @observable
|
|
40
|
+
*/
|
|
41
|
+
isActionsDropdownOpen: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @observable
|
|
44
|
+
*/
|
|
45
|
+
isReady: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* @observable
|
|
48
|
+
*/
|
|
49
|
+
isEnabled: boolean;
|
|
50
|
+
constructor(locale: Locale, revision: Revision, revisionActions: Array<RevisionAction>);
|
|
51
|
+
/**
|
|
52
|
+
* @inheritDoc
|
|
53
|
+
*/
|
|
54
|
+
render(): void;
|
|
55
|
+
/**
|
|
56
|
+
* TODO
|
|
57
|
+
*/
|
|
58
|
+
select(): void;
|
|
59
|
+
/**
|
|
60
|
+
* TODO
|
|
61
|
+
*/
|
|
62
|
+
deselect(): void;
|
|
63
|
+
/**
|
|
64
|
+
* TODO
|
|
65
|
+
*/
|
|
66
|
+
highlight(): void;
|
|
67
|
+
/**
|
|
68
|
+
* TODO
|
|
69
|
+
*/
|
|
70
|
+
unhighlight(): void;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* @eventName setName | revisionSetName
|
|
74
|
+
*/
|
|
75
|
+
export interface RevisionSetNameEvent extends BaseEvent {
|
|
76
|
+
name: 'setName' | 'revisionSetName';
|
|
77
|
+
args: [{
|
|
78
|
+
id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
}];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @eventName select | revisionSelected
|
|
84
|
+
*/
|
|
85
|
+
export interface RevisionSelectedEvent extends BaseEvent {
|
|
86
|
+
name: 'select' | 'revisionSelected';
|
|
87
|
+
args: [{
|
|
88
|
+
id: string;
|
|
89
|
+
}];
|
|
90
|
+
}
|
|
91
|
+
export {};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x58da=['setName','fieldView','unshift','extendTemplate','unhighlight','bindTemplate','isHighlighted','creator','ck-revision-history-sidebar__revision-authors','change','value','length','220','name','isActionsDropdownOpen','ck-revision-history-sidebar__revision','div','_revision','placeholder','createdAt','select','uiLanguage','render','authors','from','ck-revision-history-sidebar__revision-wrapper','set','isEnabled','isReady','filter','_createdAtFormatted','map','ck-revision-history-sidebar__revision_highlighted','revisionActionsView','ck-reset','fire','bind','closest','revisionNameView','isSelected','span','.ck-thread__remove-confirm'];(function(_0x5b2db2,_0x58da9b){const _0x193b9e=function(_0x4a9d11){while(--_0x4a9d11){_0x5b2db2['push'](_0x5b2db2['shift']());}};_0x193b9e(++_0x58da9b);}(_0x58da,0x1e3));const _0x193b=function(_0x5b2db2,_0x58da9b){_0x5b2db2=_0x5b2db2-0x0;let _0x193b9e=_0x58da[_0x5b2db2];return _0x193b9e;};import{View as _0xc54da5,createLabeledInputText as _0x55d909}from'ckeditor5/src/ui';import{ConfirmMixin as _0x19afac}from'ckeditor5-collaboration/src/collaboration-core';import _0x42b816 from'./revisionnameview';import _0xe15af1 from'./revisionauthorview';import{dateToPrettyFormat as _0x3c2656}from'./utils';import{createActionsDropdownView as _0x52f6cf}from'./createrevisionactionsdropdown';import'../../../theme/revision/revision.css';export default class ai extends _0x19afac(_0xc54da5){constructor(_0x14beff,_0x3dbceb,_0x37f063){super(_0x14beff);const _0x38ec52=this[_0x193b('0x1a')],_0x43fc1e=function(_0x4234d2,_0x4fd340){const _0x19e0cd=Array[_0x193b('0x3')](_0x4fd340[_0x193b('0x2')])[_0x193b('0x8')](_0x1b501f=>_0x1b501f!=_0x4fd340[_0x193b('0x1c')]);return _0x4fd340[_0x193b('0x1c')]&&_0x19e0cd[_0x193b('0x17')](_0x4fd340[_0x193b('0x1c')]),_0x19e0cd[_0x193b('0xa')](_0x4c5929=>new _0xe15af1(_0x4234d2,_0x4c5929,_0x4c5929==_0x4fd340[_0x193b('0x1c')]));}(_0x14beff,_0x3dbceb);this['id']=_0x3dbceb['id'],this[_0x193b('0x26')]=_0x3dbceb,this[_0x193b('0xf')](_0x193b('0x22'),_0x193b('0x28'))['to'](_0x3dbceb),this['bind'](_0x193b('0x9'))['to'](this,_0x193b('0x28'),_0x203787=>_0x203787?_0x3c2656(_0x14beff[_0x193b('0x0')],_0x203787):void 0x0),this[_0x193b('0x5')](_0x193b('0x12'),!0x1),this[_0x193b('0x5')]('isHighlighted',!0x1),this['set'](_0x193b('0x23'),!0x1),this[_0x193b('0x5')](_0x193b('0x7'),!0x1),this[_0x193b('0x5')](_0x193b('0x6'),!0x1),this['revisionNameView']=new _0x42b816(_0x14beff,_0x55d909),this[_0x193b('0x11')][_0x193b('0x16')][_0x193b('0x18')]({'attributes':{'maxlength':_0x193b('0x21')}}),this[_0x193b('0x11')][_0x193b('0x16')][_0x193b('0xf')](_0x193b('0x1f'),_0x193b('0x27'))['to'](this,'name',_0x193b('0x9')),this[_0x193b('0x11')]['bind']('isEnabled')['to'](this,_0x193b('0x12'),this,_0x193b('0x6'),(_0x2407e0,_0x40a662)=>_0x2407e0&&_0x40a662),this[_0x193b('0xc')]=_0x37f063&&_0x37f063[_0x193b('0x20')]?_0x52f6cf(this,_0x37f063):'',this[_0x193b('0xc')]&&this[_0x193b('0xc')][_0x193b('0xf')](_0x193b('0x6'))['to'](this),this['setTemplate']({'tag':_0x193b('0x25'),'attributes':{'class':['ck','ck-reset',_0x193b('0x4'),_0x38ec52['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':_0x193b('0x25'),'attributes':{'class':['ck',_0x193b('0xd'),_0x193b('0x24'),_0x38ec52['if'](_0x193b('0x6'),'ck-disabled',_0x1eccef=>!_0x1eccef),_0x38ec52['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x38ec52['if'](_0x193b('0x1b'),_0x193b('0xb')),_0x38ec52['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open')]},'children':[this[_0x193b('0x11')],{'tag':_0x193b('0x13'),'attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0x38ec52['to'](_0x193b('0x9'))}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck',_0x193b('0x1d')]},'children':_0x43fc1e}]},this['revisionActionsView']],'on':{'click':_0x38ec52['to'](_0x50dc44=>{_0x50dc44['srcElement'][_0x193b('0x10')](_0x193b('0x14'))||this[_0x193b('0x7')]&&this['isEnabled']&&this['fire'](_0x193b('0x29'),{'id':this['id']});})}}]});}[_0x193b('0x1')](){super['render']();const _0x2e0803=this[_0x193b('0x11')]['fieldView']['element'];this['listenTo'](_0x2e0803,_0x193b('0x1e'),()=>{this[_0x193b('0xe')](_0x193b('0x15'),{'id':this['id'],'name':_0x2e0803['value']});});}[_0x193b('0x29')](){this[_0x193b('0x12')]=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this[_0x193b('0x1b')]=!0x0;}[_0x193b('0x19')](){this[_0x193b('0x1b')]=!0x1;}}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module revision-history/ui/revision/subrevisioncollapserview
|
|
3
|
-
*/
|
|
4
|
-
import { View } from 'ckeditor5/src/ui';
|
|
5
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
6
|
-
import '../../../theme/revision/subrevisioncollapser.css';
|
|
7
|
-
export default class SubrevisionCollapserView extends View {
|
|
8
|
-
/**
|
|
9
|
-
* @observable
|
|
10
|
-
*/
|
|
11
|
-
isVisible: boolean;
|
|
12
|
-
constructor(locale: Locale);
|
|
13
|
-
/**
|
|
14
|
-
* TODO
|
|
15
|
-
*/
|
|
16
|
-
toggle(): void;
|
|
17
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module revision-history/ui/revision/subrevisioncollapserview
|
|
3
|
+
*/
|
|
4
|
+
import { View } from 'ckeditor5/src/ui';
|
|
5
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
6
|
+
import '../../../theme/revision/subrevisioncollapser.css';
|
|
7
|
+
export default class SubrevisionCollapserView extends View {
|
|
8
|
+
/**
|
|
9
|
+
* @observable
|
|
10
|
+
*/
|
|
11
|
+
isVisible: boolean;
|
|
12
|
+
constructor(locale: Locale);
|
|
13
|
+
/**
|
|
14
|
+
* TODO
|
|
15
|
+
*/
|
|
16
|
+
toggle(): void;
|
|
17
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2eac=['_isCollapsed','setTemplate','span','click','set','toggle','ck-revision-history-sidebar__subrevision-collapser_collapsed','button','bindTemplate','ck-revision-history-sidebar__subrevision-collapser'];(function(_0x2cb7af,_0x2eac30){const _0x35cde1=function(_0x3e22a1){while(--_0x3e22a1){_0x2cb7af['push'](_0x2cb7af['shift']());}};_0x35cde1(++_0x2eac30);}(_0x2eac,0x120));const _0x35cd=function(_0x2cb7af,_0x2eac30){_0x2cb7af=_0x2cb7af-0x0;let _0x35cde1=_0x2eac[_0x2cb7af];return _0x35cde1;};import{View as _0x582494}from'ckeditor5/src/ui';import'../../../theme/revision/subrevisioncollapser.css';export default class es extends _0x582494{constructor(_0x3c1644){super(_0x3c1644);const _0x12acca=this[_0x35cd('0x0')];this[_0x35cd('0x6')]({'isVisible':!0x0,'_isCollapsed':!0x0}),this[_0x35cd('0x3')]({'tag':_0x35cd('0x4'),'attributes':{'class':['ck',_0x35cd('0x1'),_0x12acca['if']('isVisible','ck-hidden',_0x109273=>!_0x109273),_0x12acca['if'](_0x35cd('0x2'),_0x35cd('0x8'))],'role':_0x35cd('0x9'),'aria-pressed':_0x12acca['to'](_0x35cd('0x2'),_0x3865b6=>_0x3865b6?'false':'true')},'children':[{'tag':_0x35cd('0x4'),'attributes':{'class':['ck','ck-revision-history-sidebar__subrevision-collapser__inner']}}],'on':{'click':_0x12acca['to'](_0x35cd('0x5'))}});}[_0x35cd('0x7')](){this[_0x35cd('0x2')]=!this['_isCollapsed'];}}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module revision-history/ui/revision/subrevisionview
|
|
3
|
-
*/
|
|
4
|
-
import { View } from 'ckeditor5/src/ui';
|
|
5
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
6
|
-
import '../../../theme/revision/subrevision.css';
|
|
7
|
-
import type Revision from '../../revision';
|
|
8
|
-
/**
|
|
9
|
-
* TODO
|
|
10
|
-
*/
|
|
11
|
-
export default class SubrevisionView extends View {
|
|
12
|
-
id: string;
|
|
13
|
-
/**
|
|
14
|
-
* @observable
|
|
15
|
-
*/
|
|
16
|
-
createdAt: Date;
|
|
17
|
-
/**
|
|
18
|
-
* @observable
|
|
19
|
-
*/
|
|
20
|
-
isSelected: boolean;
|
|
21
|
-
constructor(locale: Locale, subRevision: Revision, parentRevisionId: string);
|
|
22
|
-
/**
|
|
23
|
-
* TODO
|
|
24
|
-
*/
|
|
25
|
-
select(): void;
|
|
26
|
-
/**
|
|
27
|
-
* TODO
|
|
28
|
-
*/
|
|
29
|
-
deselect(): void;
|
|
30
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module revision-history/ui/revision/subrevisionview
|
|
3
|
+
*/
|
|
4
|
+
import { View } from 'ckeditor5/src/ui';
|
|
5
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
6
|
+
import '../../../theme/revision/subrevision.css';
|
|
7
|
+
import type Revision from '../../revision';
|
|
8
|
+
/**
|
|
9
|
+
* TODO
|
|
10
|
+
*/
|
|
11
|
+
export default class SubrevisionView extends View {
|
|
12
|
+
id: string;
|
|
13
|
+
/**
|
|
14
|
+
* @observable
|
|
15
|
+
*/
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
/**
|
|
18
|
+
* @observable
|
|
19
|
+
*/
|
|
20
|
+
isSelected: boolean;
|
|
21
|
+
constructor(locale: Locale, subRevision: Revision, parentRevisionId: string);
|
|
22
|
+
/**
|
|
23
|
+
* TODO
|
|
24
|
+
*/
|
|
25
|
+
select(): void;
|
|
26
|
+
/**
|
|
27
|
+
* TODO
|
|
28
|
+
*/
|
|
29
|
+
deselect(): void;
|
|
30
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0xf6c8=['isSelected','ck-revision-history-sidebar__revision_selected','span','ck-revision-history-sidebar__revision-authors','_parentRevisionId','set','ck-revision-history-sidebar__revision__date','setTemplate','bindTemplate','fire','_createdAtFormatted','deselect','ck-revision-history-sidebar__revision','select','createdAt','bind'];(function(_0x1f2ce2,_0xf6c8b6){const _0x427406=function(_0x40da59){while(--_0x40da59){_0x1f2ce2['push'](_0x1f2ce2['shift']());}};_0x427406(++_0xf6c8b6);}(_0xf6c8,0xe7));const _0x4274=function(_0x1f2ce2,_0xf6c8b6){_0x1f2ce2=_0x1f2ce2-0x0;let _0x427406=_0xf6c8[_0x1f2ce2];return _0x427406;};import{View as _0x1caea0}from'ckeditor5/src/ui';import _0x35fe9a from'./revisionauthorview';import{dateToPrettyFormat as _0x39de71}from'./utils';import'../../../theme/revision/subrevision.css';export default class ci extends _0x1caea0{constructor(_0x59b084,_0x48f23d,_0x2b3017){super(_0x59b084);const _0x20e6fc=this[_0x4274('0x1')];this['id']=_0x48f23d['id'],this['bind']('createdAt')['to'](_0x48f23d),this[_0x4274('0xe')](_0x4274('0x9'),!0x1),this[_0x4274('0x8')](_0x4274('0x3'))['to'](this,_0x4274('0x7'),_0x365933=>_0x365933?_0x39de71(_0x59b084['uiLanguage'],_0x365933):void 0x0),this[_0x4274('0xd')]=_0x2b3017,this[_0x4274('0x0')]({'tag':'div','attributes':{'class':['ck','ck-reset',_0x4274('0x5'),'ck-revision-history-sidebar__subrevision',_0x20e6fc['if'](_0x4274('0x9'),_0x4274('0xa'))]},'children':[{'tag':_0x4274('0xb'),'attributes':{'class':['ck',_0x4274('0xf')]},'children':[{'text':_0x20e6fc['to'](_0x4274('0x3'))}]},{'tag':'ul','attributes':{'class':['ck',_0x4274('0xc')]},'children':[new _0x35fe9a(_0x59b084,_0x48f23d['creator'],!0x0)]}],'on':{'click':_0x20e6fc['to'](this['select'][_0x4274('0x8')](this))}});}[_0x4274('0x6')](){this[_0x4274('0x9')]=!0x0,this[_0x4274('0x2')](_0x4274('0x6'),{'parentId':this[_0x4274('0xd')]});}[_0x4274('0x4')](){this['isSelected']=!0x1;}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module revision-history/ui/revision/utils
|
|
3
|
-
*/
|
|
4
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @module revision-history/ui/revision/utils
|
|
3
|
+
*/
|
|
4
|
+
export {};
|
package/src/ui/revision/utils.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x9e16=['numeric','toLocaleTimeString','toLocaleDateString','long'];(function(_0x2bc73e,_0x9e1622){var _0x5e21fb=function(_0x24bc22){while(--_0x24bc22){_0x2bc73e['push'](_0x2bc73e['shift']());}};_0x5e21fb(++_0x9e1622);}(_0x9e16,0x11c));var _0x5e21=function(_0x2bc73e,_0x9e1622){_0x2bc73e=_0x2bc73e-0x0;var _0x5e21fb=_0x9e16[_0x2bc73e];return _0x5e21fb;};export function dateToPrettyFormat(_0x51bfcb,_0x2e7af0){return _0x2e7af0[_0x5e21('0x2')](_0x51bfcb,{'month':_0x5e21('0x3'),'day':'numeric'})+',\x20'+_0x2e7af0[_0x5e21('0x1')](_0x51bfcb,{'hour':_0x5e21('0x0'),'minute':_0x5e21('0x0')});}
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module revision-history/ui/revisionhistory/revisionhistorysaverevisionformview
|
|
3
|
-
*/
|
|
4
|
-
import { ButtonView, LabeledFieldView, View, type InputTextView } from 'ckeditor5/src/ui';
|
|
5
|
-
import { type BaseEvent, FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils';
|
|
6
|
-
import '../../../theme/revisionhistorysaverevisionform.css';
|
|
7
|
-
import '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';
|
|
8
|
-
/**
|
|
9
|
-
* The media form view controller class.
|
|
10
|
-
*
|
|
11
|
-
* See {@link module:media-embed/ui/mediaformview~MediaFormView}.
|
|
12
|
-
*/
|
|
13
|
-
export default class RevisionHistorySaveRevisionFormView extends View {
|
|
14
|
-
/**
|
|
15
|
-
* Tracks information about the DOM focus in the form.
|
|
16
|
-
*/
|
|
17
|
-
readonly focusTracker: FocusTracker;
|
|
18
|
-
/**
|
|
19
|
-
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
20
|
-
*/
|
|
21
|
-
readonly keystrokes: KeystrokeHandler;
|
|
22
|
-
/**
|
|
23
|
-
* The revision name input view.
|
|
24
|
-
*/
|
|
25
|
-
revisionNameInputView: LabeledFieldView<InputTextView>;
|
|
26
|
-
/**
|
|
27
|
-
* The Save button view.
|
|
28
|
-
*/
|
|
29
|
-
saveButtonView: ButtonView;
|
|
30
|
-
/**
|
|
31
|
-
* The Cancel button view.
|
|
32
|
-
*/
|
|
33
|
-
cancelButtonView: ButtonView;
|
|
34
|
-
/**
|
|
35
|
-
* The value of the revision name input.
|
|
36
|
-
*
|
|
37
|
-
* @observable
|
|
38
|
-
*/
|
|
39
|
-
revisionNameInputValue: string;
|
|
40
|
-
constructor(locale: Locale);
|
|
41
|
-
/**
|
|
42
|
-
* @inheritDoc
|
|
43
|
-
*/
|
|
44
|
-
render(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Focuses the fist {@link #_focusables} in the form.
|
|
47
|
-
*/
|
|
48
|
-
focus(): void;
|
|
49
|
-
/**
|
|
50
|
-
* The native DOM `value` of the {@link #revisionNameInputView} element.
|
|
51
|
-
*
|
|
52
|
-
* **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}
|
|
53
|
-
* which works one way only and may not represent the actual state of the component in the DOM.
|
|
54
|
-
*/
|
|
55
|
-
get revisionName(): string;
|
|
56
|
-
set revisionName(name: string);
|
|
57
|
-
/**
|
|
58
|
-
* TODO
|
|
59
|
-
*/
|
|
60
|
-
reset(): void;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Fired when the form view is submitted (when one of the children triggered the submit event),
|
|
64
|
-
* e.g. click on {@link #saveButtonView}.
|
|
65
|
-
*
|
|
66
|
-
* @eventName submit
|
|
67
|
-
*/
|
|
68
|
-
export interface SaveRevisionFormSubmitEvent extends BaseEvent {
|
|
69
|
-
name: 'submit';
|
|
70
|
-
args: [];
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Fired when the form view is canceled, e.g. by a click on {@link #cancelButtonView}.
|
|
74
|
-
*
|
|
75
|
-
* @eventName cancel
|
|
76
|
-
*/
|
|
77
|
-
export interface SaveRevisionFormCancelEvent extends BaseEvent {
|
|
78
|
-
name: 'cancel';
|
|
79
|
-
args: [];
|
|
80
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module revision-history/ui/revisionhistory/revisionhistorysaverevisionformview
|
|
3
|
+
*/
|
|
4
|
+
import { ButtonView, LabeledFieldView, View, type InputTextView } from 'ckeditor5/src/ui';
|
|
5
|
+
import { type BaseEvent, FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils';
|
|
6
|
+
import '../../../theme/revisionhistorysaverevisionform.css';
|
|
7
|
+
import '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';
|
|
8
|
+
/**
|
|
9
|
+
* The media form view controller class.
|
|
10
|
+
*
|
|
11
|
+
* See {@link module:media-embed/ui/mediaformview~MediaFormView}.
|
|
12
|
+
*/
|
|
13
|
+
export default class RevisionHistorySaveRevisionFormView extends View {
|
|
14
|
+
/**
|
|
15
|
+
* Tracks information about the DOM focus in the form.
|
|
16
|
+
*/
|
|
17
|
+
readonly focusTracker: FocusTracker;
|
|
18
|
+
/**
|
|
19
|
+
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
20
|
+
*/
|
|
21
|
+
readonly keystrokes: KeystrokeHandler;
|
|
22
|
+
/**
|
|
23
|
+
* The revision name input view.
|
|
24
|
+
*/
|
|
25
|
+
revisionNameInputView: LabeledFieldView<InputTextView>;
|
|
26
|
+
/**
|
|
27
|
+
* The Save button view.
|
|
28
|
+
*/
|
|
29
|
+
saveButtonView: ButtonView;
|
|
30
|
+
/**
|
|
31
|
+
* The Cancel button view.
|
|
32
|
+
*/
|
|
33
|
+
cancelButtonView: ButtonView;
|
|
34
|
+
/**
|
|
35
|
+
* The value of the revision name input.
|
|
36
|
+
*
|
|
37
|
+
* @observable
|
|
38
|
+
*/
|
|
39
|
+
revisionNameInputValue: string;
|
|
40
|
+
constructor(locale: Locale);
|
|
41
|
+
/**
|
|
42
|
+
* @inheritDoc
|
|
43
|
+
*/
|
|
44
|
+
render(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Focuses the fist {@link #_focusables} in the form.
|
|
47
|
+
*/
|
|
48
|
+
focus(): void;
|
|
49
|
+
/**
|
|
50
|
+
* The native DOM `value` of the {@link #revisionNameInputView} element.
|
|
51
|
+
*
|
|
52
|
+
* **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}
|
|
53
|
+
* which works one way only and may not represent the actual state of the component in the DOM.
|
|
54
|
+
*/
|
|
55
|
+
get revisionName(): string;
|
|
56
|
+
set revisionName(name: string);
|
|
57
|
+
/**
|
|
58
|
+
* TODO
|
|
59
|
+
*/
|
|
60
|
+
reset(): void;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Fired when the form view is submitted (when one of the children triggered the submit event),
|
|
64
|
+
* e.g. click on {@link #saveButtonView}.
|
|
65
|
+
*
|
|
66
|
+
* @eventName submit
|
|
67
|
+
*/
|
|
68
|
+
export interface SaveRevisionFormSubmitEvent extends BaseEvent {
|
|
69
|
+
name: 'submit';
|
|
70
|
+
args: [];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Fired when the form view is canceled, e.g. by a click on {@link #cancelButtonView}.
|
|
74
|
+
*
|
|
75
|
+
* @eventName cancel
|
|
76
|
+
*/
|
|
77
|
+
export interface SaveRevisionFormCancelEvent extends BaseEvent {
|
|
78
|
+
name: 'cancel';
|
|
79
|
+
args: [];
|
|
80
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2f9f=['arrowup','check','value','tab','reset','set','Cancel','submit','revisionNameInputValue','type','_focusCycler','arrowright','Name\x20of\x20the\x20revision\x20(optional)','input','form','saveButtonView','ck-revision-history-save-revision-form','Save','extendTemplate','_createButton','ck-responsive-form','ck-button-save','keystrokes','cancelButtonView','add','locale','forEach','_createRevisionNameInput','focusTracker','focus','revisionNameInputView','delegate','_focusables','focusFirst','stopPropagation','cancel','fieldView','arrowdown','listenTo','revisionName','ck-button-cancel','render','element','trim'];(function(_0x1d8c20,_0x2f9f91){const _0x10e352=function(_0x28fb39){while(--_0x28fb39){_0x1d8c20['push'](_0x1d8c20['shift']());}};_0x10e352(++_0x2f9f91);}(_0x2f9f,0xe0));const _0x10e3=function(_0x1d8c20,_0x2f9f91){_0x1d8c20=_0x1d8c20-0x0;let _0x10e352=_0x2f9f[_0x1d8c20];return _0x10e352;};import{icons as _0x561290}from'ckeditor5/src/core';import{ButtonView as _0x483d9b,FocusCycler as _0x3ee124,LabeledFieldView as _0x4945b9,View as _0x13a5b0,ViewCollection as _0x4d8bdb,createLabeledInputText as _0x5802ee,injectCssTransitionDisabler as _0x29e57b,submitHandler as _0x4b4cae}from'ckeditor5/src/ui';import{FocusTracker as _0xac858f,KeystrokeHandler as _0x5a1daf}from'ckeditor5/src/utils';import{getTranslation as _0x34ccf3}from'../../utils/common-translations';import'../../../theme/revisionhistorysaverevisionform.css';import'@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';export default class bt extends _0x13a5b0{constructor(_0x157776){super(_0x157776),this[_0x10e3('0x18')]=new _0xac858f(),this[_0x10e3('0x12')]=new _0x5a1daf(),this['set'](_0x10e3('0x4'),''),this['revisionNameInputView']=this[_0x10e3('0x17')](),this['saveButtonView']=this[_0x10e3('0xf')](_0x34ccf3(_0x157776,_0x10e3('0xd')),_0x561290[_0x10e3('0x29')],_0x10e3('0x11')),this[_0x10e3('0xb')][_0x10e3('0x5')]=_0x10e3('0x3'),this[_0x10e3('0x13')]=this[_0x10e3('0xf')](_0x34ccf3(_0x157776,_0x10e3('0x2')),_0x561290[_0x10e3('0x1f')],_0x10e3('0x24'),_0x10e3('0x1f')),this['_focusables']=new _0x4d8bdb(),this['_focusCycler']=new _0x3ee124({'focusables':this[_0x10e3('0x1c')],'focusTracker':this[_0x10e3('0x18')],'keystrokeHandler':this[_0x10e3('0x12')],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':_0x10e3('0x2b')}}),this['setTemplate']({'tag':_0x10e3('0xa'),'attributes':{'class':['ck',_0x10e3('0xc'),_0x10e3('0x10')],'tabindex':'-1'},'children':[this[_0x10e3('0x1a')],this[_0x10e3('0xb')],this['cancelButtonView']]}),_0x29e57b(this);}['render'](){super[_0x10e3('0x25')](),_0x4b4cae({'view':this}),([this[_0x10e3('0x1a')],this[_0x10e3('0xb')],this['cancelButtonView']][_0x10e3('0x16')](_0x2b1549=>{this[_0x10e3('0x1c')][_0x10e3('0x14')](_0x2b1549),this[_0x10e3('0x18')][_0x10e3('0x14')](_0x2b1549[_0x10e3('0x26')]);}),this['keystrokes'][_0x10e3('0x22')](this[_0x10e3('0x26')]));const _0x128f46=_0x2d3198=>_0x2d3198[_0x10e3('0x1e')]();this[_0x10e3('0x12')][_0x10e3('0x1')](_0x10e3('0x7'),_0x128f46),this[_0x10e3('0x12')][_0x10e3('0x1')]('arrowleft',_0x128f46),this['keystrokes'][_0x10e3('0x1')](_0x10e3('0x28'),_0x128f46),this[_0x10e3('0x12')][_0x10e3('0x1')](_0x10e3('0x21'),_0x128f46);}[_0x10e3('0x19')](){this[_0x10e3('0x6')][_0x10e3('0x1d')]();}get[_0x10e3('0x23')](){return this[_0x10e3('0x1a')][_0x10e3('0x20')][_0x10e3('0x26')][_0x10e3('0x2a')][_0x10e3('0x27')]();}set[_0x10e3('0x23')](_0x57d4f7){this[_0x10e3('0x1a')][_0x10e3('0x20')][_0x10e3('0x26')][_0x10e3('0x2a')]=_0x57d4f7[_0x10e3('0x27')]();}[_0x10e3('0x0')](){this[_0x10e3('0x1a')][_0x10e3('0x20')][_0x10e3('0x26')][_0x10e3('0x2a')]='';}[_0x10e3('0x17')](){const _0x25e73d=new _0x4945b9(this[_0x10e3('0x15')],_0x5802ee),_0x6390be=_0x25e73d[_0x10e3('0x20')];return _0x6390be['extendTemplate']({'attributes':{'maxlength':'220'}}),_0x25e73d['label']=_0x34ccf3(this[_0x10e3('0x15')],_0x10e3('0x8')),_0x6390be['on'](_0x10e3('0x9'),()=>{this['revisionNameInputValue']=_0x6390be[_0x10e3('0x26')][_0x10e3('0x2a')][_0x10e3('0x27')]();}),_0x25e73d;}[_0x10e3('0xf')](_0x2281e9,_0x352b04,_0x53b33d,_0x4ef655){const _0x283194=new _0x483d9b(this['locale']);return _0x283194[_0x10e3('0x1')]({'label':_0x2281e9,'icon':_0x352b04,'tooltip':!0x0}),_0x283194[_0x10e3('0xe')]({'attributes':{'class':_0x53b33d}}),_0x4ef655&&_0x283194[_0x10e3('0x1b')]('execute')['to'](this,_0x4ef655),_0x283194;}}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module revision-history/ui/revisionhistory/revisionhistoryui
|
|
3
|
-
*/
|
|
4
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
5
|
-
import RevisionTracker from '../../revisiontracker';
|
|
6
|
-
/**
|
|
7
|
-
* TODO
|
|
8
|
-
*/
|
|
9
|
-
export default class RevisionHistoryUI extends Plugin {
|
|
10
|
-
/**
|
|
11
|
-
* @inheritDoc
|
|
12
|
-
*/
|
|
13
|
-
static get pluginName(): "RevisionHistoryUI";
|
|
14
|
-
/**
|
|
15
|
-
* @inheritDoc
|
|
16
|
-
*/
|
|
17
|
-
static get requires(): readonly [typeof RevisionTracker];
|
|
18
|
-
/**
|
|
19
|
-
* @inheritDoc
|
|
20
|
-
*/
|
|
21
|
-
init(): void;
|
|
22
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module revision-history/ui/revisionhistory/revisionhistoryui
|
|
3
|
+
*/
|
|
4
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
5
|
+
import RevisionTracker from '../../revisiontracker';
|
|
6
|
+
/**
|
|
7
|
+
* TODO
|
|
8
|
+
*/
|
|
9
|
+
export default class RevisionHistoryUI extends Plugin {
|
|
10
|
+
/**
|
|
11
|
+
* @inheritDoc
|
|
12
|
+
*/
|
|
13
|
+
static get pluginName(): "RevisionHistoryUI";
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
static get requires(): readonly [typeof RevisionTracker];
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
init(): void;
|
|
22
|
+
}
|