@ckeditor/ckeditor5-revision-history 38.1.1 → 38.2.0-alpha.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 +7 -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/index.js +1 -1
- 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.js';
|
|
5
|
+
import { View, type DropdownView } from 'ckeditor5/src/ui.js';
|
|
6
|
+
import RevisionNameView from './revisionnameview.js';
|
|
7
|
+
import '../../../theme/revision/revision.css';
|
|
8
|
+
import type Revision from '../../revision.js';
|
|
9
|
+
import type { RevisionAction } from '../revisionssidebar/revisionssidebar.js';
|
|
10
|
+
declare const RevisionView_base: import("ckeditor5/src/utils.js").Mixed<typeof View, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin.js").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 _0x4bc5=['isReady','isEnabled','ck-revision-history-sidebar__revision_highlighted','ck-revision-history-sidebar__revision_selected','placeholder','ck-revision-history-sidebar__revision__date','srcElement','from','isConfirm','closest','change','_createdAtFormatted','element','ck-revision-history-sidebar__revision-authors','authors','ck-revision-history-sidebar__revision-wrapper','ck-revision-history-sidebar__revision-wrapper_confirmation_visible','set','select','value','render','ck-disabled','isHighlighted','uiLanguage','listenTo','highlight','filter','fire','unhighlight','setName','length','unshift','ck-reset','span','div','revisionNameView','createdAt','220','deselect','ck-revision-history-sidebar__revision__controls-wrapper','revisionActionsView','creator','fieldView','name','.ck-thread__remove-confirm','bind','setTemplate','bindTemplate','isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open','map','isSelected'];(function(_0x70b6c,_0x4bc5cc){const _0xbd4453=function(_0x1d20ce){while(--_0x1d20ce){_0x70b6c['push'](_0x70b6c['shift']());}};_0xbd4453(++_0x4bc5cc);}(_0x4bc5,0x65));const _0xbd44=function(_0x70b6c,_0x4bc5cc){_0x70b6c=_0x70b6c-0x0;let _0xbd4453=_0x4bc5[_0x70b6c];return _0xbd4453;};import{View as _0x42b853,createLabeledInputText as _0x1695ac}from'ckeditor5/src/ui.js';import{ConfirmMixin as _0x11e694}from'ckeditor5-collaboration';import _0x4bc380 from'./revisionnameview.js';import _0x3aaca5 from'./revisionauthorview.js';import{dateToPrettyFormat as _0x1cc527}from'./utils.js';import{createActionsDropdownView as _0x3d9159}from'./createrevisionactionsdropdown.js';import'../../../theme/revision/revision.css';export default class ai extends _0x11e694(_0x42b853){constructor(_0xa9aa0b,_0x4b045a,_0x5362fd){super(_0xa9aa0b);const _0x146859=this[_0xbd44('0x32')],_0x2b945a=function(_0x3658a1,_0x43e33c){const _0x104a76=Array[_0xbd44('0xa')](_0x43e33c[_0xbd44('0x11')])[_0xbd44('0x1d')](_0x2a4de8=>_0x2a4de8!=_0x43e33c[_0xbd44('0x2c')]);return _0x43e33c[_0xbd44('0x2c')]&&_0x104a76[_0xbd44('0x22')](_0x43e33c[_0xbd44('0x2c')]),_0x104a76[_0xbd44('0x1')](_0x40ebc8=>new _0x3aaca5(_0x3658a1,_0x40ebc8,_0x40ebc8==_0x43e33c['creator']));}(_0xa9aa0b,_0x4b045a);this['id']=_0x4b045a['id'],this['_revision']=_0x4b045a,this[_0xbd44('0x30')](_0xbd44('0x2e'),_0xbd44('0x27'))['to'](_0x4b045a),this[_0xbd44('0x30')](_0xbd44('0xe'))['to'](this,'createdAt',_0xad9b68=>_0xad9b68?_0x1cc527(_0xa9aa0b[_0xbd44('0x1a')],_0xad9b68):void 0x0),this[_0xbd44('0x14')](_0xbd44('0x2'),!0x1),this[_0xbd44('0x14')](_0xbd44('0x19'),!0x1),this[_0xbd44('0x14')](_0xbd44('0x33'),!0x1),this['set'](_0xbd44('0x3'),!0x1),this['set'](_0xbd44('0x4'),!0x1),this[_0xbd44('0x26')]=new _0x4bc380(_0xa9aa0b,_0x1695ac),this['revisionNameView'][_0xbd44('0x2d')]['extendTemplate']({'attributes':{'maxlength':_0xbd44('0x28')}}),this['revisionNameView'][_0xbd44('0x2d')][_0xbd44('0x30')](_0xbd44('0x16'),_0xbd44('0x7'))['to'](this,_0xbd44('0x2e'),_0xbd44('0xe')),this[_0xbd44('0x26')][_0xbd44('0x30')](_0xbd44('0x4'))['to'](this,_0xbd44('0x2'),this,_0xbd44('0x4'),(_0x8ff722,_0x1cf0cf)=>_0x8ff722&&_0x1cf0cf),this['revisionActionsView']=_0x5362fd&&_0x5362fd[_0xbd44('0x21')]?_0x3d9159(this,_0x5362fd):'',this[_0xbd44('0x2b')]&&this[_0xbd44('0x2b')][_0xbd44('0x30')](_0xbd44('0x4'))['to'](this),this[_0xbd44('0x31')]({'tag':_0xbd44('0x25'),'attributes':{'class':['ck',_0xbd44('0x23'),_0xbd44('0x12'),_0x146859['if'](_0xbd44('0xb'),_0xbd44('0x13'))]},'children':[{'tag':_0xbd44('0x25'),'attributes':{'class':['ck',_0xbd44('0x23'),'ck-revision-history-sidebar__revision',_0x146859['if']('isEnabled',_0xbd44('0x18'),_0x5aced0=>!_0x5aced0),_0x146859['if'](_0xbd44('0x2'),_0xbd44('0x6')),_0x146859['if']('isHighlighted',_0xbd44('0x5')),_0x146859['if'](_0xbd44('0x33'),_0xbd44('0x0'))]},'children':[this[_0xbd44('0x26')],{'tag':_0xbd44('0x24'),'attributes':{'class':['ck',_0xbd44('0x8')]},'children':[{'text':_0x146859['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck',_0xbd44('0x2a')]},'children':[{'tag':'ul','attributes':{'class':['ck',_0xbd44('0x10')]},'children':_0x2b945a}]},this[_0xbd44('0x2b')]],'on':{'click':_0x146859['to'](_0x3bf273=>{_0x3bf273[_0xbd44('0x9')][_0xbd44('0xc')](_0xbd44('0x2f'))||this['isReady']&&this[_0xbd44('0x4')]&&this[_0xbd44('0x1e')](_0xbd44('0x15'),{'id':this['id']});})}}]});}['render'](){super[_0xbd44('0x17')]();const _0x3b10b6=this[_0xbd44('0x26')][_0xbd44('0x2d')][_0xbd44('0xf')];this[_0xbd44('0x1b')](_0x3b10b6,_0xbd44('0xd'),()=>{this[_0xbd44('0x1e')](_0xbd44('0x20'),{'id':this['id'],'name':_0x3b10b6['value']});});}[_0xbd44('0x15')](){this[_0xbd44('0x2')]=!0x0;}[_0xbd44('0x29')](){this[_0xbd44('0x2')]=!0x1;}[_0xbd44('0x1c')](){this[_0xbd44('0x19')]=!0x0;}[_0xbd44('0x1f')](){this[_0xbd44('0x19')]=!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.js';
|
|
5
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
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 _0x7d0d=['_isCollapsed','bindTemplate','toggle','ck-revision-history-sidebar__subrevision-collapser','click','set','true','ck-revision-history-sidebar__subrevision-collapser_collapsed','false','isVisible'];(function(_0x536612,_0x7d0d5){const _0x8caa50=function(_0x293c26){while(--_0x293c26){_0x536612['push'](_0x536612['shift']());}};_0x8caa50(++_0x7d0d5);}(_0x7d0d,0x1c2));const _0x8caa=function(_0x536612,_0x7d0d5){_0x536612=_0x536612-0x0;let _0x8caa50=_0x7d0d[_0x536612];return _0x8caa50;};import{View as _0x544013}from'ckeditor5/src/ui.js';import'../../../theme/revision/subrevisioncollapser.css';export default class es extends _0x544013{constructor(_0x12649f){super(_0x12649f);const _0x5e645b=this[_0x8caa('0x1')];this[_0x8caa('0x5')]({'isVisible':!0x0,'_isCollapsed':!0x0}),this['setTemplate']({'tag':'span','attributes':{'class':['ck',_0x8caa('0x3'),_0x5e645b['if'](_0x8caa('0x9'),'ck-hidden',_0xfb0838=>!_0xfb0838),_0x5e645b['if'](_0x8caa('0x0'),_0x8caa('0x7'))],'role':'button','aria-pressed':_0x5e645b['to'](_0x8caa('0x0'),_0x301a30=>_0x301a30?_0x8caa('0x8'):_0x8caa('0x6'))},'children':[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__subrevision-collapser__inner']}}],'on':{'click':_0x5e645b['to'](_0x8caa('0x4'))}});}[_0x8caa('0x2')](){this[_0x8caa('0x0')]=!this[_0x8caa('0x0')];}}
|
|
@@ -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.js';
|
|
5
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
6
|
+
import '../../../theme/revision/subrevision.css';
|
|
7
|
+
import type Revision from '../../revision.js';
|
|
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 _0x3354=['fire','isSelected','bindTemplate','deselect','createdAt','ck-revision-history-sidebar__subrevision','div','_parentRevisionId','bind','_createdAtFormatted','creator','uiLanguage','span','ck-revision-history-sidebar__revision__date','select','ck-revision-history-sidebar__revision'];(function(_0xc09f91,_0x33542f){const _0x9423b1=function(_0x52d942){while(--_0x52d942){_0xc09f91['push'](_0xc09f91['shift']());}};_0x9423b1(++_0x33542f);}(_0x3354,0x96));const _0x9423=function(_0xc09f91,_0x33542f){_0xc09f91=_0xc09f91-0x0;let _0x9423b1=_0x3354[_0xc09f91];return _0x9423b1;};import{View as _0x29e9bc}from'ckeditor5/src/ui.js';import _0x430097 from'./revisionauthorview.js';import{dateToPrettyFormat as _0x15ae32}from'./utils.js';import'../../../theme/revision/subrevision.css';export default class ts extends _0x29e9bc{constructor(_0xb7e4e0,_0x120517,_0x517cff){super(_0xb7e4e0);const _0x118563=this[_0x9423('0xc')];this['id']=_0x120517['id'],this[_0x9423('0x2')](_0x9423('0xe'))['to'](_0x120517),this['set'](_0x9423('0xb'),!0x1),this[_0x9423('0x2')](_0x9423('0x3'))['to'](this,'createdAt',_0x5b9f8c=>_0x5b9f8c?_0x15ae32(_0xb7e4e0[_0x9423('0x5')],_0x5b9f8c):void 0x0),this[_0x9423('0x1')]=_0x517cff,this['setTemplate']({'tag':_0x9423('0x0'),'attributes':{'class':['ck','ck-reset',_0x9423('0x9'),_0x9423('0xf'),_0x118563['if']('isSelected','ck-revision-history-sidebar__revision_selected')]},'children':[{'tag':_0x9423('0x6'),'attributes':{'class':['ck',_0x9423('0x7')]},'children':[{'text':_0x118563['to'](_0x9423('0x3'))}]},{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors']},'children':[new _0x430097(_0xb7e4e0,_0x120517[_0x9423('0x4')],!0x0)]}],'on':{'click':_0x118563['to'](this[_0x9423('0x8')]['bind'](this))}});}['select'](){this['isSelected']=!0x0,this[_0x9423('0xa')](_0x9423('0x8'),{'parentId':this[_0x9423('0x1')]});}[_0x9423('0xd')](){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 _0x42ed=['toLocaleTimeString','toLocaleDateString','numeric'];(function(_0x4653c9,_0x42edf6){var _0x513753=function(_0x598b26){while(--_0x598b26){_0x4653c9['push'](_0x4653c9['shift']());}};_0x513753(++_0x42edf6);}(_0x42ed,0x18b));var _0x5137=function(_0x4653c9,_0x42edf6){_0x4653c9=_0x4653c9-0x0;var _0x513753=_0x42ed[_0x4653c9];return _0x513753;};export function dateToPrettyFormat(_0x14277f,_0x43de4c){return _0x43de4c[_0x5137('0x2')](_0x14277f,{'month':'long','day':_0x5137('0x0')})+',\x20'+_0x43de4c[_0x5137('0x1')](_0x14277f,{'hour':_0x5137('0x0'),'minute':_0x5137('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.js';
|
|
5
|
+
import { type BaseEvent, FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
|
|
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 _0x1ba2=['keystrokes','focusTracker','execute','ck-responsive-form','render','focus','_focusCycler','type','delegate','arrowup','arrowleft','label','fieldView','check','Save','reset','value','saveButtonView','arrowdown','_focusables','element','revisionNameInputValue','locale','ck-button-cancel','revisionNameInputView','input','cancel','extendTemplate','ck-revision-history-save-revision-form','arrowright','cancelButtonView','set','_createButton','add','setTemplate','trim','form','shift\x20+\x20tab','_createRevisionNameInput'];(function(_0x2109f6,_0x1ba2ef){const _0x2e3eeb=function(_0xa51680){while(--_0xa51680){_0x2109f6['push'](_0x2109f6['shift']());}};_0x2e3eeb(++_0x1ba2ef);}(_0x1ba2,0xee));const _0x2e3e=function(_0x2109f6,_0x1ba2ef){_0x2109f6=_0x2109f6-0x0;let _0x2e3eeb=_0x1ba2[_0x2109f6];return _0x2e3eeb;};import{icons as _0x5e8534}from'ckeditor5/src/core.js';import{ButtonView as _0x2b9792,FocusCycler as _0x47828b,LabeledFieldView as _0x4359a6,View as _0x1a7c5d,ViewCollection as _0x2e01ab,createLabeledInputText as _0x4ae309,injectCssTransitionDisabler as _0x53eb3d,submitHandler as _0x1700fa}from'ckeditor5/src/ui.js';import{FocusTracker as _0x222249,KeystrokeHandler as _0x132e13}from'ckeditor5/src/utils.js';import{getTranslation as _0x23d73a}from'../../utils/common-translations.js';import'../../../theme/revisionhistorysaverevisionform.css';import'@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';export default class Nt extends _0x1a7c5d{constructor(_0x573cd5){super(_0x573cd5),this[_0x2e3e('0x24')]=new _0x222249(),this[_0x2e3e('0x23')]=new _0x132e13(),this[_0x2e3e('0x1b')](_0x2e3e('0x11'),''),this[_0x2e3e('0x14')]=this[_0x2e3e('0x22')](),this[_0x2e3e('0xd')]=this[_0x2e3e('0x1c')](_0x23d73a(_0x573cd5,_0x2e3e('0xa')),_0x5e8534[_0x2e3e('0x9')],'ck-button-save'),this[_0x2e3e('0xd')][_0x2e3e('0x3')]='submit',this[_0x2e3e('0x1a')]=this[_0x2e3e('0x1c')](_0x23d73a(_0x573cd5,'Cancel'),_0x5e8534[_0x2e3e('0x16')],_0x2e3e('0x13'),_0x2e3e('0x16')),this[_0x2e3e('0xf')]=new _0x2e01ab(),this[_0x2e3e('0x2')]=new _0x47828b({'focusables':this[_0x2e3e('0xf')],'focusTracker':this[_0x2e3e('0x24')],'keystrokeHandler':this[_0x2e3e('0x23')],'actions':{'focusPrevious':_0x2e3e('0x21'),'focusNext':'tab'}}),this[_0x2e3e('0x1e')]({'tag':_0x2e3e('0x20'),'attributes':{'class':['ck',_0x2e3e('0x18'),_0x2e3e('0x26')],'tabindex':'-1'},'children':[this[_0x2e3e('0x14')],this[_0x2e3e('0xd')],this['cancelButtonView']]}),_0x53eb3d(this);}[_0x2e3e('0x0')](){super['render'](),_0x1700fa({'view':this}),([this['revisionNameInputView'],this[_0x2e3e('0xd')],this[_0x2e3e('0x1a')]]['forEach'](_0x2849f9=>{this['_focusables'][_0x2e3e('0x1d')](_0x2849f9),this[_0x2e3e('0x24')][_0x2e3e('0x1d')](_0x2849f9[_0x2e3e('0x10')]);}),this[_0x2e3e('0x23')]['listenTo'](this[_0x2e3e('0x10')]));const _0x52f907=_0x25e51b=>_0x25e51b['stopPropagation']();this[_0x2e3e('0x23')][_0x2e3e('0x1b')](_0x2e3e('0x19'),_0x52f907),this[_0x2e3e('0x23')]['set'](_0x2e3e('0x6'),_0x52f907),this['keystrokes'][_0x2e3e('0x1b')](_0x2e3e('0x5'),_0x52f907),this[_0x2e3e('0x23')][_0x2e3e('0x1b')](_0x2e3e('0xe'),_0x52f907);}[_0x2e3e('0x1')](){this['_focusCycler']['focusFirst']();}get['revisionName'](){return this[_0x2e3e('0x14')][_0x2e3e('0x8')][_0x2e3e('0x10')][_0x2e3e('0xc')]['trim']();}set['revisionName'](_0x42c506){this['revisionNameInputView'][_0x2e3e('0x8')]['element'][_0x2e3e('0xc')]=_0x42c506[_0x2e3e('0x1f')]();}[_0x2e3e('0xb')](){this[_0x2e3e('0x14')][_0x2e3e('0x8')][_0x2e3e('0x10')]['value']='';}[_0x2e3e('0x22')](){const _0x40a4c8=new _0x4359a6(this[_0x2e3e('0x12')],_0x4ae309),_0x1a68e8=_0x40a4c8[_0x2e3e('0x8')];return _0x1a68e8[_0x2e3e('0x17')]({'attributes':{'maxlength':'220'}}),_0x40a4c8[_0x2e3e('0x7')]=_0x23d73a(this[_0x2e3e('0x12')],'Name\x20of\x20the\x20revision\x20(optional)'),_0x1a68e8['on'](_0x2e3e('0x15'),()=>{this[_0x2e3e('0x11')]=_0x1a68e8['element']['value']['trim']();}),_0x40a4c8;}[_0x2e3e('0x1c')](_0x15d5a5,_0x6565b5,_0x2cebee,_0x3b62b9){const _0x3a58a5=new _0x2b9792(this[_0x2e3e('0x12')]);return _0x3a58a5[_0x2e3e('0x1b')]({'label':_0x15d5a5,'icon':_0x6565b5,'tooltip':!0x0}),_0x3a58a5[_0x2e3e('0x17')]({'attributes':{'class':_0x2cebee}}),_0x3b62b9&&_0x3a58a5[_0x2e3e('0x4')](_0x2e3e('0x25'))['to'](this,_0x3b62b9),_0x3a58a5;}}
|