@ckeditor/ckeditor5-revision-history 40.0.0 → 40.1.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/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
|
@@ -1,95 +1,95 @@
|
|
|
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/ui/revision/revisionview
|
|
7
|
-
*/
|
|
8
|
-
import type { BaseEvent, Locale } from 'ckeditor5/src/utils';
|
|
9
|
-
import { View, type DropdownView } from 'ckeditor5/src/ui';
|
|
10
|
-
import RevisionNameView from './revisionnameview';
|
|
11
|
-
import '../../../theme/revision/revision.css';
|
|
12
|
-
import type Revision from '../../revision';
|
|
13
|
-
import type { RevisionAction } from '../revisionssidebar/revisionssidebar';
|
|
14
|
-
declare const RevisionView_base: import("ckeditor5/src/utils").Mixed<typeof View, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin").ConfirmApi>;
|
|
15
|
-
/**
|
|
16
|
-
* TODO
|
|
17
|
-
*/
|
|
18
|
-
export default class RevisionView extends RevisionView_base {
|
|
19
|
-
id: string;
|
|
20
|
-
revisionNameView: RevisionNameView;
|
|
21
|
-
/**
|
|
22
|
-
* It holds the revision actions drop-down view if actions are provided,
|
|
23
|
-
* or just empty text otherwise.
|
|
24
|
-
*/
|
|
25
|
-
revisionActionsView: DropdownView | '';
|
|
26
|
-
/**
|
|
27
|
-
* @observable
|
|
28
|
-
*/
|
|
29
|
-
name: string;
|
|
30
|
-
/**
|
|
31
|
-
* @observable
|
|
32
|
-
*/
|
|
33
|
-
createdAt: Date;
|
|
34
|
-
/**
|
|
35
|
-
* @observable
|
|
36
|
-
*/
|
|
37
|
-
isSelected: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* @observable
|
|
40
|
-
*/
|
|
41
|
-
isHighlighted: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* @observable
|
|
44
|
-
*/
|
|
45
|
-
isActionsDropdownOpen: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* @observable
|
|
48
|
-
*/
|
|
49
|
-
isReady: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* @observable
|
|
52
|
-
*/
|
|
53
|
-
isEnabled: boolean;
|
|
54
|
-
constructor(locale: Locale, revision: Revision, revisionActions: Array<RevisionAction>);
|
|
55
|
-
/**
|
|
56
|
-
* @inheritDoc
|
|
57
|
-
*/
|
|
58
|
-
render(): void;
|
|
59
|
-
/**
|
|
60
|
-
* TODO
|
|
61
|
-
*/
|
|
62
|
-
select(): void;
|
|
63
|
-
/**
|
|
64
|
-
* TODO
|
|
65
|
-
*/
|
|
66
|
-
deselect(): void;
|
|
67
|
-
/**
|
|
68
|
-
* TODO
|
|
69
|
-
*/
|
|
70
|
-
highlight(): void;
|
|
71
|
-
/**
|
|
72
|
-
* TODO
|
|
73
|
-
*/
|
|
74
|
-
unhighlight(): void;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* @eventName setName | revisionSetName
|
|
78
|
-
*/
|
|
79
|
-
export interface RevisionSetNameEvent extends BaseEvent {
|
|
80
|
-
name: 'setName' | 'revisionSetName';
|
|
81
|
-
args: [{
|
|
82
|
-
id: string;
|
|
83
|
-
name: string;
|
|
84
|
-
}];
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* @eventName select | revisionSelected
|
|
88
|
-
*/
|
|
89
|
-
export interface RevisionSelectedEvent extends BaseEvent {
|
|
90
|
-
name: 'select' | 'revisionSelected';
|
|
91
|
-
args: [{
|
|
92
|
-
id: string;
|
|
93
|
-
}];
|
|
94
|
-
}
|
|
95
|
-
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/ui/revision/revisionview
|
|
7
|
+
*/
|
|
8
|
+
import type { BaseEvent, Locale } from 'ckeditor5/src/utils';
|
|
9
|
+
import { View, type DropdownView } from 'ckeditor5/src/ui';
|
|
10
|
+
import RevisionNameView from './revisionnameview';
|
|
11
|
+
import '../../../theme/revision/revision.css';
|
|
12
|
+
import type Revision from '../../revision';
|
|
13
|
+
import type { RevisionAction } from '../revisionssidebar/revisionssidebar';
|
|
14
|
+
declare const RevisionView_base: import("ckeditor5/src/utils").Mixed<typeof View, import("@ckeditor/ckeditor5-collaboration-core/src/utils/confirmmixin").ConfirmApi>;
|
|
15
|
+
/**
|
|
16
|
+
* TODO
|
|
17
|
+
*/
|
|
18
|
+
export default class RevisionView extends RevisionView_base {
|
|
19
|
+
id: string;
|
|
20
|
+
revisionNameView: RevisionNameView;
|
|
21
|
+
/**
|
|
22
|
+
* It holds the revision actions drop-down view if actions are provided,
|
|
23
|
+
* or just empty text otherwise.
|
|
24
|
+
*/
|
|
25
|
+
revisionActionsView: DropdownView | '';
|
|
26
|
+
/**
|
|
27
|
+
* @observable
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* @observable
|
|
32
|
+
*/
|
|
33
|
+
createdAt: Date;
|
|
34
|
+
/**
|
|
35
|
+
* @observable
|
|
36
|
+
*/
|
|
37
|
+
isSelected: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @observable
|
|
40
|
+
*/
|
|
41
|
+
isHighlighted: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @observable
|
|
44
|
+
*/
|
|
45
|
+
isActionsDropdownOpen: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* @observable
|
|
48
|
+
*/
|
|
49
|
+
isReady: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* @observable
|
|
52
|
+
*/
|
|
53
|
+
isEnabled: boolean;
|
|
54
|
+
constructor(locale: Locale, revision: Revision, revisionActions: Array<RevisionAction>);
|
|
55
|
+
/**
|
|
56
|
+
* @inheritDoc
|
|
57
|
+
*/
|
|
58
|
+
render(): void;
|
|
59
|
+
/**
|
|
60
|
+
* TODO
|
|
61
|
+
*/
|
|
62
|
+
select(): void;
|
|
63
|
+
/**
|
|
64
|
+
* TODO
|
|
65
|
+
*/
|
|
66
|
+
deselect(): void;
|
|
67
|
+
/**
|
|
68
|
+
* TODO
|
|
69
|
+
*/
|
|
70
|
+
highlight(): void;
|
|
71
|
+
/**
|
|
72
|
+
* TODO
|
|
73
|
+
*/
|
|
74
|
+
unhighlight(): void;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* @eventName setName | revisionSetName
|
|
78
|
+
*/
|
|
79
|
+
export interface RevisionSetNameEvent extends BaseEvent {
|
|
80
|
+
name: 'setName' | 'revisionSetName';
|
|
81
|
+
args: [{
|
|
82
|
+
id: string;
|
|
83
|
+
name: string;
|
|
84
|
+
}];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @eventName select | revisionSelected
|
|
88
|
+
*/
|
|
89
|
+
export interface RevisionSelectedEvent extends BaseEvent {
|
|
90
|
+
name: 'select' | 'revisionSelected';
|
|
91
|
+
args: [{
|
|
92
|
+
id: string;
|
|
93
|
+
}];
|
|
94
|
+
}
|
|
95
|
+
export {};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1970=['length','render','ck-revision-history-sidebar__revision-authors','select','element','fieldView','unshift','value','220','isEnabled','.ck-thread__remove-confirm','ck-revision-history-sidebar__revision-wrapper','revisionActionsView','setTemplate','revisionNameView','ck-revision-history-sidebar__actions_dropdown_open','from','setName','span','deselect','isSelected','map','srcElement','name','div','closest','isConfirm','isReady','isActionsDropdownOpen','creator','ck-revision-history-sidebar__revision-wrapper_confirmation_visible','fire','createdAt','change','unhighlight','isHighlighted','uiLanguage','bind','ck-reset','_createdAtFormatted','set','ck-revision-history-sidebar__revision_highlighted','bindTemplate','extendTemplate','ck-revision-history-sidebar__revision_selected','authors'];(function(_0x3e3846,_0x1970d5){const _0x4b9d23=function(_0x162835){while(--_0x162835){_0x3e3846['push'](_0x3e3846['shift']());}};_0x4b9d23(++_0x1970d5);}(_0x1970,0x169));const _0x4b9d=function(_0x3e3846,_0x1970d5){_0x3e3846=_0x3e3846-0x0;let _0x4b9d23=_0x1970[_0x3e3846];return _0x4b9d23;};import{View as _0x53c2ad,createLabeledInputText as _0x4422e4}from'ckeditor5/src/ui';import{ConfirmMixin as _0x43824d}from'ckeditor5-collaboration/src/collaboration-core';import _0x3bd018 from'./revisionnameview';import _0x350f38 from'./revisionauthorview';import{dateToPrettyFormat as _0x3f4f79}from'./utils';import{createActionsDropdownView as _0x38274e}from'./createrevisionactionsdropdown';import'../../../theme/revision/revision.css';export default class ai extends _0x43824d(_0x53c2ad){constructor(_0x125f01,_0x375723,_0x3f3c6e){super(_0x125f01);const _0x2c1671=this[_0x4b9d('0x3')],_0x33bdbe=function(_0x205a89,_0x20d455){const _0x638c15=Array[_0x4b9d('0x17')](_0x20d455[_0x4b9d('0x6')])['filter'](_0x17f272=>_0x17f272!=_0x20d455[_0x4b9d('0x24')]);return _0x20d455[_0x4b9d('0x24')]&&_0x638c15[_0x4b9d('0xd')](_0x20d455[_0x4b9d('0x24')]),_0x638c15[_0x4b9d('0x1c')](_0x14e3c1=>new _0x350f38(_0x205a89,_0x14e3c1,_0x14e3c1==_0x20d455[_0x4b9d('0x24')]));}(_0x125f01,_0x375723);this['id']=_0x375723['id'],this['_revision']=_0x375723,this[_0x4b9d('0x2c')]('name',_0x4b9d('0x27'))['to'](_0x375723),this[_0x4b9d('0x2c')]('_createdAtFormatted')['to'](this,_0x4b9d('0x27'),_0x56a620=>_0x56a620?_0x3f4f79(_0x125f01[_0x4b9d('0x2b')],_0x56a620):void 0x0),this[_0x4b9d('0x1')](_0x4b9d('0x1b'),!0x1),this[_0x4b9d('0x1')](_0x4b9d('0x2a'),!0x1),this['set'](_0x4b9d('0x23'),!0x1),this[_0x4b9d('0x1')]('isReady',!0x1),this[_0x4b9d('0x1')]('isEnabled',!0x1),this[_0x4b9d('0x15')]=new _0x3bd018(_0x125f01,_0x4422e4),this['revisionNameView'][_0x4b9d('0xc')][_0x4b9d('0x4')]({'attributes':{'maxlength':_0x4b9d('0xf')}}),this[_0x4b9d('0x15')][_0x4b9d('0xc')][_0x4b9d('0x2c')]('value','placeholder')['to'](this,_0x4b9d('0x1e'),_0x4b9d('0x0')),this[_0x4b9d('0x15')][_0x4b9d('0x2c')](_0x4b9d('0x10'))['to'](this,'isSelected',this,'isEnabled',(_0x3a736d,_0x451a1b)=>_0x3a736d&&_0x451a1b),this['revisionActionsView']=_0x3f3c6e&&_0x3f3c6e[_0x4b9d('0x7')]?_0x38274e(this,_0x3f3c6e):'',this[_0x4b9d('0x13')]&&this['revisionActionsView'][_0x4b9d('0x2c')]('isEnabled')['to'](this),this[_0x4b9d('0x14')]({'tag':'div','attributes':{'class':['ck',_0x4b9d('0x2d'),_0x4b9d('0x12'),_0x2c1671['if'](_0x4b9d('0x21'),_0x4b9d('0x25'))]},'children':[{'tag':_0x4b9d('0x1f'),'attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x2c1671['if'](_0x4b9d('0x10'),'ck-disabled',_0x287c38=>!_0x287c38),_0x2c1671['if'](_0x4b9d('0x1b'),_0x4b9d('0x5')),_0x2c1671['if'](_0x4b9d('0x2a'),_0x4b9d('0x2')),_0x2c1671['if'](_0x4b9d('0x23'),_0x4b9d('0x16'))]},'children':[this[_0x4b9d('0x15')],{'tag':_0x4b9d('0x19'),'attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0x2c1671['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck',_0x4b9d('0x9')]},'children':_0x33bdbe}]},this[_0x4b9d('0x13')]],'on':{'click':_0x2c1671['to'](_0x5afba2=>{_0x5afba2[_0x4b9d('0x1d')][_0x4b9d('0x20')](_0x4b9d('0x11'))||this[_0x4b9d('0x22')]&&this[_0x4b9d('0x10')]&&this['fire'](_0x4b9d('0xa'),{'id':this['id']});})}}]});}[_0x4b9d('0x8')](){super[_0x4b9d('0x8')]();const _0x333a55=this['revisionNameView'][_0x4b9d('0xc')][_0x4b9d('0xb')];this['listenTo'](_0x333a55,_0x4b9d('0x28'),()=>{this[_0x4b9d('0x26')](_0x4b9d('0x18'),{'id':this['id'],'name':_0x333a55[_0x4b9d('0xe')]});});}[_0x4b9d('0xa')](){this[_0x4b9d('0x1b')]=!0x0;}[_0x4b9d('0x1a')](){this[_0x4b9d('0x1b')]=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}[_0x4b9d('0x29')](){this['isHighlighted']=!0x1;}}
|
|
@@ -1,21 +1,21 @@
|
|
|
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/ui/revision/subrevisioncollapserview
|
|
7
|
-
*/
|
|
8
|
-
import { View } from 'ckeditor5/src/ui';
|
|
9
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
10
|
-
import '../../../theme/revision/subrevisioncollapser.css';
|
|
11
|
-
export default class SubrevisionCollapserView extends View {
|
|
12
|
-
/**
|
|
13
|
-
* @observable
|
|
14
|
-
*/
|
|
15
|
-
isVisible: boolean;
|
|
16
|
-
constructor(locale: Locale);
|
|
17
|
-
/**
|
|
18
|
-
* TODO
|
|
19
|
-
*/
|
|
20
|
-
toggle(): void;
|
|
21
|
-
}
|
|
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/ui/revision/subrevisioncollapserview
|
|
7
|
+
*/
|
|
8
|
+
import { View } from 'ckeditor5/src/ui';
|
|
9
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
10
|
+
import '../../../theme/revision/subrevisioncollapser.css';
|
|
11
|
+
export default class SubrevisionCollapserView extends View {
|
|
12
|
+
/**
|
|
13
|
+
* @observable
|
|
14
|
+
*/
|
|
15
|
+
isVisible: boolean;
|
|
16
|
+
constructor(locale: Locale);
|
|
17
|
+
/**
|
|
18
|
+
* TODO
|
|
19
|
+
*/
|
|
20
|
+
toggle(): void;
|
|
21
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x19f5=['ck-hidden','button','true','isVisible','bindTemplate','ck-revision-history-sidebar__subrevision-collapser_collapsed','set','setTemplate','toggle','span','_isCollapsed','false'];(function(_0x5246c7,_0x19f56e){const _0x48827f=function(_0x24b3eb){while(--_0x24b3eb){_0x5246c7['push'](_0x5246c7['shift']());}};_0x48827f(++_0x19f56e);}(_0x19f5,0x1bd));const _0x4882=function(_0x5246c7,_0x19f56e){_0x5246c7=_0x5246c7-0x0;let _0x48827f=_0x19f5[_0x5246c7];return _0x48827f;};import{View as _0x489f07}from'ckeditor5/src/ui';import'../../../theme/revision/subrevisioncollapser.css';export default class es extends _0x489f07{constructor(_0x115f9c){super(_0x115f9c);const _0x50ed71=this[_0x4882('0x3')];this[_0x4882('0x5')]({'isVisible':!0x0,'_isCollapsed':!0x0}),this[_0x4882('0x6')]({'tag':_0x4882('0x8'),'attributes':{'class':['ck','ck-revision-history-sidebar__subrevision-collapser',_0x50ed71['if'](_0x4882('0x2'),_0x4882('0xb'),_0xcddcf6=>!_0xcddcf6),_0x50ed71['if'](_0x4882('0x9'),_0x4882('0x4'))],'role':_0x4882('0x0'),'aria-pressed':_0x50ed71['to'](_0x4882('0x9'),_0xf97da3=>_0xf97da3?_0x4882('0xa'):_0x4882('0x1'))},'children':[{'tag':_0x4882('0x8'),'attributes':{'class':['ck','ck-revision-history-sidebar__subrevision-collapser__inner']}}],'on':{'click':_0x50ed71['to']('click')}});}[_0x4882('0x7')](){this[_0x4882('0x9')]=!this[_0x4882('0x9')];}}
|
|
@@ -1,34 +1,34 @@
|
|
|
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/ui/revision/subrevisionview
|
|
7
|
-
*/
|
|
8
|
-
import { View } from 'ckeditor5/src/ui';
|
|
9
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
10
|
-
import '../../../theme/revision/subrevision.css';
|
|
11
|
-
import type Revision from '../../revision';
|
|
12
|
-
/**
|
|
13
|
-
* TODO
|
|
14
|
-
*/
|
|
15
|
-
export default class SubrevisionView extends View {
|
|
16
|
-
id: string;
|
|
17
|
-
/**
|
|
18
|
-
* @observable
|
|
19
|
-
*/
|
|
20
|
-
createdAt: Date;
|
|
21
|
-
/**
|
|
22
|
-
* @observable
|
|
23
|
-
*/
|
|
24
|
-
isSelected: boolean;
|
|
25
|
-
constructor(locale: Locale, subRevision: Revision, parentRevisionId: string);
|
|
26
|
-
/**
|
|
27
|
-
* TODO
|
|
28
|
-
*/
|
|
29
|
-
select(): void;
|
|
30
|
-
/**
|
|
31
|
-
* TODO
|
|
32
|
-
*/
|
|
33
|
-
deselect(): void;
|
|
34
|
-
}
|
|
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/ui/revision/subrevisionview
|
|
7
|
+
*/
|
|
8
|
+
import { View } from 'ckeditor5/src/ui';
|
|
9
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
10
|
+
import '../../../theme/revision/subrevision.css';
|
|
11
|
+
import type Revision from '../../revision';
|
|
12
|
+
/**
|
|
13
|
+
* TODO
|
|
14
|
+
*/
|
|
15
|
+
export default class SubrevisionView extends View {
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* @observable
|
|
19
|
+
*/
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
/**
|
|
22
|
+
* @observable
|
|
23
|
+
*/
|
|
24
|
+
isSelected: boolean;
|
|
25
|
+
constructor(locale: Locale, subRevision: Revision, parentRevisionId: string);
|
|
26
|
+
/**
|
|
27
|
+
* TODO
|
|
28
|
+
*/
|
|
29
|
+
select(): void;
|
|
30
|
+
/**
|
|
31
|
+
* TODO
|
|
32
|
+
*/
|
|
33
|
+
deselect(): void;
|
|
34
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5940=['_createdAtFormatted','bind','set','ck-revision-history-sidebar__revision__date','creator','setTemplate','div','ck-revision-history-sidebar__revision-authors','deselect','uiLanguage','createdAt','ck-reset','ck-revision-history-sidebar__revision','bindTemplate','fire','_parentRevisionId','select','isSelected'];(function(_0x3683c9,_0x5940c3){const _0x93a54a=function(_0x5eb15c){while(--_0x5eb15c){_0x3683c9['push'](_0x3683c9['shift']());}};_0x93a54a(++_0x5940c3);}(_0x5940,0x149));const _0x93a5=function(_0x3683c9,_0x5940c3){_0x3683c9=_0x3683c9-0x0;let _0x93a54a=_0x5940[_0x3683c9];return _0x93a54a;};import{View as _0x3cf0c1}from'ckeditor5/src/ui';import _0x2ab3b6 from'./revisionauthorview';import{dateToPrettyFormat as _0x2d1ef7}from'./utils';import'../../../theme/revision/subrevision.css';export default class ci extends _0x3cf0c1{constructor(_0x2cde81,_0x1c0df6,_0x360572){super(_0x2cde81);const _0x579158=this[_0x93a5('0x8')];this['id']=_0x1c0df6['id'],this[_0x93a5('0xe')](_0x93a5('0x5'))['to'](_0x1c0df6),this[_0x93a5('0xf')](_0x93a5('0xc'),!0x1),this[_0x93a5('0xe')]('_createdAtFormatted')['to'](this,_0x93a5('0x5'),_0x339f16=>_0x339f16?_0x2d1ef7(_0x2cde81[_0x93a5('0x4')],_0x339f16):void 0x0),this[_0x93a5('0xa')]=_0x360572,this[_0x93a5('0x0')]({'tag':_0x93a5('0x1'),'attributes':{'class':['ck',_0x93a5('0x6'),_0x93a5('0x7'),'ck-revision-history-sidebar__subrevision',_0x579158['if']('isSelected','ck-revision-history-sidebar__revision_selected')]},'children':[{'tag':'span','attributes':{'class':['ck',_0x93a5('0x10')]},'children':[{'text':_0x579158['to'](_0x93a5('0xd'))}]},{'tag':'ul','attributes':{'class':['ck',_0x93a5('0x2')]},'children':[new _0x2ab3b6(_0x2cde81,_0x1c0df6[_0x93a5('0x11')],!0x0)]}],'on':{'click':_0x579158['to'](this[_0x93a5('0xb')][_0x93a5('0xe')](this))}});}[_0x93a5('0xb')](){this[_0x93a5('0xc')]=!0x0,this[_0x93a5('0x9')](_0x93a5('0xb'),{'parentId':this[_0x93a5('0xa')]});}[_0x93a5('0x3')](){this['isSelected']=!0x1;}}
|
|
@@ -1,5 +1,5 @@
|
|
|
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 {};
|
|
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 {};
|
package/src/ui/revision/utils.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x3981=['numeric','toLocaleTimeString','long'];(function(_0x45a9b0,_0x398165){var _0xebbbaf=function(_0x15ae0c){while(--_0x15ae0c){_0x45a9b0['push'](_0x45a9b0['shift']());}};_0xebbbaf(++_0x398165);}(_0x3981,0x188));var _0xebbb=function(_0x45a9b0,_0x398165){_0x45a9b0=_0x45a9b0-0x0;var _0xebbbaf=_0x3981[_0x45a9b0];return _0xebbbaf;};export function dateToPrettyFormat(_0x4c78ad,_0x524225){return _0x524225['toLocaleDateString'](_0x4c78ad,{'month':_0xebbb('0x0'),'day':_0xebbb('0x1')})+',\x20'+_0x524225[_0xebbb('0x2')](_0x4c78ad,{'hour':_0xebbb('0x1'),'minute':'numeric'});}
|
|
@@ -1,81 +1,81 @@
|
|
|
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 { ButtonView, LabeledFieldView, View, type InputTextView } from 'ckeditor5/src/ui';
|
|
6
|
-
import { type BaseEvent, FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils';
|
|
7
|
-
import '../../../theme/revisionhistorysaverevisionform.css';
|
|
8
|
-
import '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';
|
|
9
|
-
/**
|
|
10
|
-
* The media form view controller class.
|
|
11
|
-
*
|
|
12
|
-
* See {@link module:media-embed/ui/mediaformview~MediaFormView}.
|
|
13
|
-
*/
|
|
14
|
-
export default class RevisionHistorySaveRevisionFormView extends View {
|
|
15
|
-
/**
|
|
16
|
-
* Tracks information about the DOM focus in the form.
|
|
17
|
-
*/
|
|
18
|
-
readonly focusTracker: FocusTracker;
|
|
19
|
-
/**
|
|
20
|
-
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
21
|
-
*/
|
|
22
|
-
readonly keystrokes: KeystrokeHandler;
|
|
23
|
-
/**
|
|
24
|
-
* The revision name input view.
|
|
25
|
-
*/
|
|
26
|
-
revisionNameInputView: LabeledFieldView<InputTextView>;
|
|
27
|
-
/**
|
|
28
|
-
* The Save button view.
|
|
29
|
-
*/
|
|
30
|
-
saveButtonView: ButtonView;
|
|
31
|
-
/**
|
|
32
|
-
* The Cancel button view.
|
|
33
|
-
*/
|
|
34
|
-
cancelButtonView: ButtonView;
|
|
35
|
-
/**
|
|
36
|
-
* The value of the revision name input.
|
|
37
|
-
*
|
|
38
|
-
* @observable
|
|
39
|
-
*/
|
|
40
|
-
revisionNameInputValue: string;
|
|
41
|
-
constructor(locale: Locale);
|
|
42
|
-
/**
|
|
43
|
-
* @inheritDoc
|
|
44
|
-
*/
|
|
45
|
-
render(): void;
|
|
46
|
-
/**
|
|
47
|
-
* Focuses the fist {@link #_focusables} in the form.
|
|
48
|
-
*/
|
|
49
|
-
focus(): void;
|
|
50
|
-
/**
|
|
51
|
-
* The native DOM `value` of the {@link #revisionNameInputView} element.
|
|
52
|
-
*
|
|
53
|
-
* **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}
|
|
54
|
-
* which works one way only and may not represent the actual state of the component in the DOM.
|
|
55
|
-
*/
|
|
56
|
-
get revisionName(): string;
|
|
57
|
-
set revisionName(name: string);
|
|
58
|
-
/**
|
|
59
|
-
* TODO
|
|
60
|
-
*/
|
|
61
|
-
reset(): void;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Fired when the form view is submitted (when one of the children triggered the submit event),
|
|
65
|
-
* e.g. click on {@link #saveButtonView}.
|
|
66
|
-
*
|
|
67
|
-
* @eventName submit
|
|
68
|
-
*/
|
|
69
|
-
export interface SaveRevisionFormSubmitEvent extends BaseEvent {
|
|
70
|
-
name: 'submit';
|
|
71
|
-
args: [];
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Fired when the form view is canceled, e.g. by a click on {@link #cancelButtonView}.
|
|
75
|
-
*
|
|
76
|
-
* @eventName cancel
|
|
77
|
-
*/
|
|
78
|
-
export interface SaveRevisionFormCancelEvent extends BaseEvent {
|
|
79
|
-
name: 'cancel';
|
|
80
|
-
args: [];
|
|
81
|
-
}
|
|
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 { ButtonView, LabeledFieldView, View, type InputTextView } from 'ckeditor5/src/ui';
|
|
6
|
+
import { type BaseEvent, FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils';
|
|
7
|
+
import '../../../theme/revisionhistorysaverevisionform.css';
|
|
8
|
+
import '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';
|
|
9
|
+
/**
|
|
10
|
+
* The media form view controller class.
|
|
11
|
+
*
|
|
12
|
+
* See {@link module:media-embed/ui/mediaformview~MediaFormView}.
|
|
13
|
+
*/
|
|
14
|
+
export default class RevisionHistorySaveRevisionFormView extends View {
|
|
15
|
+
/**
|
|
16
|
+
* Tracks information about the DOM focus in the form.
|
|
17
|
+
*/
|
|
18
|
+
readonly focusTracker: FocusTracker;
|
|
19
|
+
/**
|
|
20
|
+
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
21
|
+
*/
|
|
22
|
+
readonly keystrokes: KeystrokeHandler;
|
|
23
|
+
/**
|
|
24
|
+
* The revision name input view.
|
|
25
|
+
*/
|
|
26
|
+
revisionNameInputView: LabeledFieldView<InputTextView>;
|
|
27
|
+
/**
|
|
28
|
+
* The Save button view.
|
|
29
|
+
*/
|
|
30
|
+
saveButtonView: ButtonView;
|
|
31
|
+
/**
|
|
32
|
+
* The Cancel button view.
|
|
33
|
+
*/
|
|
34
|
+
cancelButtonView: ButtonView;
|
|
35
|
+
/**
|
|
36
|
+
* The value of the revision name input.
|
|
37
|
+
*
|
|
38
|
+
* @observable
|
|
39
|
+
*/
|
|
40
|
+
revisionNameInputValue: string;
|
|
41
|
+
constructor(locale: Locale);
|
|
42
|
+
/**
|
|
43
|
+
* @inheritDoc
|
|
44
|
+
*/
|
|
45
|
+
render(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Focuses the fist {@link #_focusables} in the form.
|
|
48
|
+
*/
|
|
49
|
+
focus(): void;
|
|
50
|
+
/**
|
|
51
|
+
* The native DOM `value` of the {@link #revisionNameInputView} element.
|
|
52
|
+
*
|
|
53
|
+
* **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}
|
|
54
|
+
* which works one way only and may not represent the actual state of the component in the DOM.
|
|
55
|
+
*/
|
|
56
|
+
get revisionName(): string;
|
|
57
|
+
set revisionName(name: string);
|
|
58
|
+
/**
|
|
59
|
+
* TODO
|
|
60
|
+
*/
|
|
61
|
+
reset(): void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Fired when the form view is submitted (when one of the children triggered the submit event),
|
|
65
|
+
* e.g. click on {@link #saveButtonView}.
|
|
66
|
+
*
|
|
67
|
+
* @eventName submit
|
|
68
|
+
*/
|
|
69
|
+
export interface SaveRevisionFormSubmitEvent extends BaseEvent {
|
|
70
|
+
name: 'submit';
|
|
71
|
+
args: [];
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Fired when the form view is canceled, e.g. by a click on {@link #cancelButtonView}.
|
|
75
|
+
*
|
|
76
|
+
* @eventName cancel
|
|
77
|
+
*/
|
|
78
|
+
export interface SaveRevisionFormCancelEvent extends BaseEvent {
|
|
79
|
+
name: 'cancel';
|
|
80
|
+
args: [];
|
|
81
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x42bd=['forEach','220','input','arrowleft','ck-button-cancel','tab','form','ck-responsive-form','_createRevisionNameInput','_focusCycler','reset','focusFirst','listenTo','revisionName','check','extendTemplate','arrowup','_focusables','keystrokes','fieldView','trim','element','locale','add','set','ck-revision-history-save-revision-form','_createButton','value','revisionNameInputView','render','focusTracker','delegate','submit','Cancel','cancelButtonView','Name\x20of\x20the\x20revision\x20(optional)','label','execute','stopPropagation','Save','arrowdown','revisionNameInputValue','saveButtonView','setTemplate'];(function(_0x1fc87c,_0x42bd21){const _0x3ce1f7=function(_0x30c20d){while(--_0x30c20d){_0x1fc87c['push'](_0x1fc87c['shift']());}};_0x3ce1f7(++_0x42bd21);}(_0x42bd,0xe9));const _0x3ce1=function(_0x1fc87c,_0x42bd21){_0x1fc87c=_0x1fc87c-0x0;let _0x3ce1f7=_0x42bd[_0x1fc87c];return _0x3ce1f7;};import{icons as _0x43f97f}from'ckeditor5/src/core';import{ButtonView as _0x39fe7e,FocusCycler as _0x2d987e,LabeledFieldView as _0x576b6d,View as _0xcac4b5,ViewCollection as _0x434963,createLabeledInputText as _0x23ab54,injectCssTransitionDisabler as _0x46fe8e,submitHandler as _0x2c504b}from'ckeditor5/src/ui';import{FocusTracker as _0x5552ed,KeystrokeHandler as _0x1b8562}from'ckeditor5/src/utils';import{getTranslation as _0x3d83fe}from'../../utils/common-translations';import'../../../theme/revisionhistorysaverevisionform.css';import'@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';export default class Nt extends _0xcac4b5{constructor(_0x36ff71){super(_0x36ff71),this[_0x3ce1('0x11')]=new _0x5552ed(),this[_0x3ce1('0x5')]=new _0x1b8562(),this[_0x3ce1('0xb')](_0x3ce1('0x1c'),''),this[_0x3ce1('0xf')]=this[_0x3ce1('0x27')](),this[_0x3ce1('0x1d')]=this[_0x3ce1('0xd')](_0x3d83fe(_0x36ff71,_0x3ce1('0x1a')),_0x43f97f[_0x3ce1('0x1')],'ck-button-save'),this[_0x3ce1('0x1d')]['type']=_0x3ce1('0x13'),this[_0x3ce1('0x15')]=this[_0x3ce1('0xd')](_0x3d83fe(_0x36ff71,_0x3ce1('0x14')),_0x43f97f['cancel'],_0x3ce1('0x23'),'cancel'),this[_0x3ce1('0x4')]=new _0x434963(),this['_focusCycler']=new _0x2d987e({'focusables':this[_0x3ce1('0x4')],'focusTracker':this['focusTracker'],'keystrokeHandler':this[_0x3ce1('0x5')],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':_0x3ce1('0x24')}}),this[_0x3ce1('0x1e')]({'tag':_0x3ce1('0x25'),'attributes':{'class':['ck',_0x3ce1('0xc'),_0x3ce1('0x26')],'tabindex':'-1'},'children':[this[_0x3ce1('0xf')],this[_0x3ce1('0x1d')],this[_0x3ce1('0x15')]]}),_0x46fe8e(this);}[_0x3ce1('0x10')](){super[_0x3ce1('0x10')](),_0x2c504b({'view':this}),([this['revisionNameInputView'],this[_0x3ce1('0x1d')],this[_0x3ce1('0x15')]][_0x3ce1('0x1f')](_0x4ae974=>{this[_0x3ce1('0x4')][_0x3ce1('0xa')](_0x4ae974),this[_0x3ce1('0x11')]['add'](_0x4ae974['element']);}),this[_0x3ce1('0x5')][_0x3ce1('0x2b')](this[_0x3ce1('0x8')]));const _0x222ec5=_0x20e934=>_0x20e934[_0x3ce1('0x19')]();this['keystrokes'][_0x3ce1('0xb')]('arrowright',_0x222ec5),this[_0x3ce1('0x5')][_0x3ce1('0xb')](_0x3ce1('0x22'),_0x222ec5),this[_0x3ce1('0x5')]['set'](_0x3ce1('0x3'),_0x222ec5),this[_0x3ce1('0x5')][_0x3ce1('0xb')](_0x3ce1('0x1b'),_0x222ec5);}['focus'](){this[_0x3ce1('0x28')][_0x3ce1('0x2a')]();}get[_0x3ce1('0x0')](){return this[_0x3ce1('0xf')][_0x3ce1('0x6')]['element'][_0x3ce1('0xe')]['trim']();}set[_0x3ce1('0x0')](_0x2b905b){this['revisionNameInputView'][_0x3ce1('0x6')][_0x3ce1('0x8')][_0x3ce1('0xe')]=_0x2b905b[_0x3ce1('0x7')]();}[_0x3ce1('0x29')](){this[_0x3ce1('0xf')][_0x3ce1('0x6')][_0x3ce1('0x8')]['value']='';}[_0x3ce1('0x27')](){const _0x1c51a6=new _0x576b6d(this[_0x3ce1('0x9')],_0x23ab54),_0x2bed70=_0x1c51a6[_0x3ce1('0x6')];return _0x2bed70['extendTemplate']({'attributes':{'maxlength':_0x3ce1('0x20')}}),_0x1c51a6[_0x3ce1('0x17')]=_0x3d83fe(this[_0x3ce1('0x9')],_0x3ce1('0x16')),_0x2bed70['on'](_0x3ce1('0x21'),()=>{this[_0x3ce1('0x1c')]=_0x2bed70['element']['value'][_0x3ce1('0x7')]();}),_0x1c51a6;}[_0x3ce1('0xd')](_0x1bacd0,_0x5e5f99,_0x20f609,_0x20ad1d){const _0x37bb16=new _0x39fe7e(this['locale']);return _0x37bb16['set']({'label':_0x1bacd0,'icon':_0x5e5f99,'tooltip':!0x0}),_0x37bb16[_0x3ce1('0x2')]({'attributes':{'class':_0x20f609}}),_0x20ad1d&&_0x37bb16[_0x3ce1('0x12')](_0x3ce1('0x18'))['to'](this,_0x20ad1d),_0x37bb16;}}
|