@ckeditor/ckeditor5-revision-history 40.0.0 → 40.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +3 -3
- package/README.md +11 -11
- package/build/revision-history.js +1 -1
- package/package.json +6 -6
- package/src/augmentation.d.ts +29 -29
- package/src/changeitem.d.ts +58 -58
- package/src/changeitem.js +1 -1
- package/src/editor/revisionviewereditor.d.ts +27 -27
- package/src/editor/revisionviewereditor.js +1 -1
- package/src/editor/revisionviewereditorui.d.ts +28 -28
- package/src/editor/revisionviewereditorui.js +1 -1
- package/src/editor/revisionviewereditoruiview.d.ts +43 -43
- package/src/editor/revisionviewereditoruiview.js +1 -1
- package/src/index.d.ts +15 -15
- package/src/revision.d.ts +153 -153
- package/src/revision.js +1 -1
- package/src/revisiondiff.d.ts +24 -24
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.d.ts +99 -99
- package/src/revisionhistory.js +1 -1
- package/src/revisionhistoryadapter.d.ts +64 -64
- package/src/revisionhistoryconfig.d.ts +60 -60
- package/src/revisionsrepository.d.ts +52 -52
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.d.ts +81 -81
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.d.ts +25 -25
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.d.ts +10 -10
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.d.ts +5 -5
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.d.ts +5 -5
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.d.ts +95 -95
- package/src/ui/revision/revisionview.js +1 -1
- package/src/ui/revision/subrevisioncollapserview.d.ts +21 -21
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.d.ts +34 -34
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.d.ts +5 -5
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.d.ts +81 -81
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.d.ts +26 -26
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.d.ts +44 -44
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.d.ts +5 -5
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.d.ts +29 -29
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.d.ts +44 -44
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.d.ts +9 -9
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.d.ts +22 -22
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.d.ts +40 -40
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.d.ts +26 -26
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.d.ts +28 -28
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- package/src/utils/common-translations.d.ts +11 -11
- package/src/utils/common-translations.js +1 -1
|
@@ -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 _0x596f=['ck-disabled','extendTemplate','.ck-thread__remove-confirm','value','isConfirm','div','isActionsDropdownOpen','render','authors','unhighlight','bind','_createdAtFormatted','ck-reset','closest','isHighlighted','unshift','bindTemplate','revisionActionsView','deselect','filter','isReady','ck-revision-history-sidebar__revision-wrapper_confirmation_visible','length','ck-revision-history-sidebar__actions_dropdown_open','name','creator','setName','revisionNameView','ck-revision-history-sidebar__revision__date','element','createdAt','span','change','isSelected','highlight','setTemplate','fire','isEnabled','ck-revision-history-sidebar__revision-wrapper','set','fieldView','srcElement','ck-revision-history-sidebar__revision_selected','ck-revision-history-sidebar__revision_highlighted','ck-revision-history-sidebar__revision__controls-wrapper','select','uiLanguage'];(function(_0x3c6d3c,_0x596f92){const _0x4a8545=function(_0x3431d2){while(--_0x3431d2){_0x3c6d3c['push'](_0x3c6d3c['shift']());}};_0x4a8545(++_0x596f92);}(_0x596f,0x162));const _0x4a85=function(_0x3c6d3c,_0x596f92){_0x3c6d3c=_0x3c6d3c-0x0;let _0x4a8545=_0x596f[_0x3c6d3c];return _0x4a8545;};import{View as _0x32565b,createLabeledInputText as _0x1206de}from'ckeditor5/src/ui';import{ConfirmMixin as _0x34c426}from'ckeditor5-collaboration/src/collaboration-core';import _0x2d92ba from'./revisionnameview';import _0x221edd from'./revisionauthorview';import{dateToPrettyFormat as _0x99d31e}from'./utils';import{createActionsDropdownView as _0x16c82c}from'./createrevisionactionsdropdown';import'../../../theme/revision/revision.css';export default class ai extends _0x34c426(_0x32565b){constructor(_0x41810f,_0x51fdf8,_0x13ce40){super(_0x41810f);const _0x339581=this[_0x4a85('0x26')],_0x374696=function(_0x14a7a3,_0x2bcd52){const _0xae2e56=Array['from'](_0x2bcd52[_0x4a85('0x1e')])[_0x4a85('0x29')](_0x4e5cef=>_0x4e5cef!=_0x2bcd52['creator']);return _0x2bcd52[_0x4a85('0x0')]&&_0xae2e56[_0x4a85('0x25')](_0x2bcd52[_0x4a85('0x0')]),_0xae2e56['map'](_0x211a6a=>new _0x221edd(_0x14a7a3,_0x211a6a,_0x211a6a==_0x2bcd52[_0x4a85('0x0')]));}(_0x41810f,_0x51fdf8);this['id']=_0x51fdf8['id'],this['_revision']=_0x51fdf8,this[_0x4a85('0x20')](_0x4a85('0x2e'),'createdAt')['to'](_0x51fdf8),this[_0x4a85('0x20')](_0x4a85('0x21'))['to'](this,_0x4a85('0x5'),_0x49bea3=>_0x49bea3?_0x99d31e(_0x41810f[_0x4a85('0x15')],_0x49bea3):void 0x0),this['set']('isSelected',!0x1),this[_0x4a85('0xe')](_0x4a85('0x24'),!0x1),this[_0x4a85('0xe')](_0x4a85('0x1c'),!0x1),this[_0x4a85('0xe')](_0x4a85('0x2a'),!0x1),this[_0x4a85('0xe')](_0x4a85('0xc'),!0x1),this[_0x4a85('0x2')]=new _0x2d92ba(_0x41810f,_0x1206de),this['revisionNameView'][_0x4a85('0xf')][_0x4a85('0x17')]({'attributes':{'maxlength':'220'}}),this[_0x4a85('0x2')][_0x4a85('0xf')][_0x4a85('0x20')](_0x4a85('0x19'),'placeholder')['to'](this,'name',_0x4a85('0x21')),this[_0x4a85('0x2')][_0x4a85('0x20')]('isEnabled')['to'](this,_0x4a85('0x8'),this,'isEnabled',(_0x4b4dd6,_0x124fac)=>_0x4b4dd6&&_0x124fac),this[_0x4a85('0x27')]=_0x13ce40&&_0x13ce40[_0x4a85('0x2c')]?_0x16c82c(this,_0x13ce40):'',this['revisionActionsView']&&this['revisionActionsView']['bind'](_0x4a85('0xc'))['to'](this),this[_0x4a85('0xa')]({'tag':'div','attributes':{'class':['ck',_0x4a85('0x22'),_0x4a85('0xd'),_0x339581['if'](_0x4a85('0x1a'),_0x4a85('0x2b'))]},'children':[{'tag':_0x4a85('0x1b'),'attributes':{'class':['ck',_0x4a85('0x22'),'ck-revision-history-sidebar__revision',_0x339581['if'](_0x4a85('0xc'),_0x4a85('0x16'),_0x53babd=>!_0x53babd),_0x339581['if'](_0x4a85('0x8'),_0x4a85('0x11')),_0x339581['if'](_0x4a85('0x24'),_0x4a85('0x12')),_0x339581['if'](_0x4a85('0x1c'),_0x4a85('0x2d'))]},'children':[this[_0x4a85('0x2')],{'tag':_0x4a85('0x6'),'attributes':{'class':['ck',_0x4a85('0x3')]},'children':[{'text':_0x339581['to'](_0x4a85('0x21'))}]},{'tag':_0x4a85('0x1b'),'attributes':{'class':['ck',_0x4a85('0x13')]},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors']},'children':_0x374696}]},this[_0x4a85('0x27')]],'on':{'click':_0x339581['to'](_0x42f79e=>{_0x42f79e[_0x4a85('0x10')][_0x4a85('0x23')](_0x4a85('0x18'))||this[_0x4a85('0x2a')]&&this[_0x4a85('0xc')]&&this[_0x4a85('0xb')](_0x4a85('0x14'),{'id':this['id']});})}}]});}['render'](){super[_0x4a85('0x1d')]();const _0x57d9ed=this[_0x4a85('0x2')]['fieldView'][_0x4a85('0x4')];this['listenTo'](_0x57d9ed,_0x4a85('0x7'),()=>{this[_0x4a85('0xb')](_0x4a85('0x1'),{'id':this['id'],'name':_0x57d9ed[_0x4a85('0x19')]});});}['select'](){this[_0x4a85('0x8')]=!0x0;}[_0x4a85('0x28')](){this[_0x4a85('0x8')]=!0x1;}[_0x4a85('0x9')](){this[_0x4a85('0x24')]=!0x0;}[_0x4a85('0x1f')](){this[_0x4a85('0x24')]=!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 _0x49de=['setTemplate','toggle','set','ck-revision-history-sidebar__subrevision-collapser_collapsed','ck-hidden','true','false','click','_isCollapsed','ck-revision-history-sidebar__subrevision-collapser__inner','ck-revision-history-sidebar__subrevision-collapser','span'];(function(_0x5a5b5b,_0x49dedf){const _0x4ea50c=function(_0x5b35eb){while(--_0x5b35eb){_0x5a5b5b['push'](_0x5a5b5b['shift']());}};_0x4ea50c(++_0x49dedf);}(_0x49de,0x1df));const _0x4ea5=function(_0x5a5b5b,_0x49dedf){_0x5a5b5b=_0x5a5b5b-0x0;let _0x4ea50c=_0x49de[_0x5a5b5b];return _0x4ea50c;};import{View as _0x4c0515}from'ckeditor5/src/ui';import'../../../theme/revision/subrevisioncollapser.css';export default class es extends _0x4c0515{constructor(_0x3e0555){super(_0x3e0555);const _0x52eb30=this['bindTemplate'];this[_0x4ea5('0x3')]({'isVisible':!0x0,'_isCollapsed':!0x0}),this[_0x4ea5('0x1')]({'tag':_0x4ea5('0x0'),'attributes':{'class':['ck',_0x4ea5('0xb'),_0x52eb30['if']('isVisible',_0x4ea5('0x5'),_0x4fb9c3=>!_0x4fb9c3),_0x52eb30['if'](_0x4ea5('0x9'),_0x4ea5('0x4'))],'role':'button','aria-pressed':_0x52eb30['to'](_0x4ea5('0x9'),_0x27fc15=>_0x27fc15?_0x4ea5('0x7'):_0x4ea5('0x6'))},'children':[{'tag':'span','attributes':{'class':['ck',_0x4ea5('0xa')]}}],'on':{'click':_0x52eb30['to'](_0x4ea5('0x8'))}});}[_0x4ea5('0x2')](){this[_0x4ea5('0x9')]=!this[_0x4ea5('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 _0xc23b=['fire','span','set','creator','_createdAtFormatted','isSelected','ck-revision-history-sidebar__subrevision','ck-revision-history-sidebar__revision-authors','ck-revision-history-sidebar__revision','uiLanguage','setTemplate','select','ck-revision-history-sidebar__revision_selected','createdAt','ck-reset','bind','_parentRevisionId'];(function(_0x32df2f,_0xc23bcd){const _0x2d303d=function(_0x574d59){while(--_0x574d59){_0x32df2f['push'](_0x32df2f['shift']());}};_0x2d303d(++_0xc23bcd);}(_0xc23b,0x139));const _0x2d30=function(_0x32df2f,_0xc23bcd){_0x32df2f=_0x32df2f-0x0;let _0x2d303d=_0xc23b[_0x32df2f];return _0x2d303d;};import{View as _0x34e273}from'ckeditor5/src/ui';import _0x44af6d from'./revisionauthorview';import{dateToPrettyFormat as _0x568adf}from'./utils';import'../../../theme/revision/subrevision.css';export default class ci extends _0x34e273{constructor(_0x5515f4,_0x49d1f4,_0x3959dd){super(_0x5515f4);const _0x21eb64=this['bindTemplate'];this['id']=_0x49d1f4['id'],this['bind'](_0x2d30('0x6'))['to'](_0x49d1f4),this[_0x2d30('0xc')](_0x2d30('0xf'),!0x1),this[_0x2d30('0x8')](_0x2d30('0xe'))['to'](this,_0x2d30('0x6'),_0x1ce1ae=>_0x1ce1ae?_0x568adf(_0x5515f4[_0x2d30('0x2')],_0x1ce1ae):void 0x0),this[_0x2d30('0x9')]=_0x3959dd,this[_0x2d30('0x3')]({'tag':'div','attributes':{'class':['ck',_0x2d30('0x7'),_0x2d30('0x1'),_0x2d30('0x10'),_0x21eb64['if'](_0x2d30('0xf'),_0x2d30('0x5'))]},'children':[{'tag':_0x2d30('0xb'),'attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0x21eb64['to'](_0x2d30('0xe'))}]},{'tag':'ul','attributes':{'class':['ck',_0x2d30('0x0')]},'children':[new _0x44af6d(_0x5515f4,_0x49d1f4[_0x2d30('0xd')],!0x0)]}],'on':{'click':_0x21eb64['to'](this[_0x2d30('0x4')]['bind'](this))}});}[_0x2d30('0x4')](){this[_0x2d30('0xf')]=!0x0,this[_0x2d30('0xa')](_0x2d30('0x4'),{'parentId':this[_0x2d30('0x9')]});}['deselect'](){this[_0x2d30('0xf')]=!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 _0x3e1a=['numeric','toLocaleDateString','long'];(function(_0x2c1ee4,_0x3e1a3f){var _0x2d7378=function(_0x383933){while(--_0x383933){_0x2c1ee4['push'](_0x2c1ee4['shift']());}};_0x2d7378(++_0x3e1a3f);}(_0x3e1a,0x11d));var _0x2d73=function(_0x2c1ee4,_0x3e1a3f){_0x2c1ee4=_0x2c1ee4-0x0;var _0x2d7378=_0x3e1a[_0x2c1ee4];return _0x2d7378;};export function dateToPrettyFormat(_0x180275,_0x95b08a){return _0x95b08a[_0x2d73('0x1')](_0x180275,{'month':_0x2d73('0x2'),'day':_0x2d73('0x0')})+',\x20'+_0x95b08a['toLocaleTimeString'](_0x180275,{'hour':_0x2d73('0x0'),'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 _0x4530=['cancel','keystrokes','add','submit','value','_createRevisionNameInput','_createButton','fieldView','ck-button-save','Name\x20of\x20the\x20revision\x20(optional)','revisionName','arrowdown','Cancel','render','arrowright','ck-responsive-form','_focusables','tab','delegate','input','set','stopPropagation','arrowleft','cancelButtonView','locale','Save','ck-button-cancel','_focusCycler','focusTracker','trim','saveButtonView','220','arrowup','element','revisionNameInputValue','revisionNameInputView','label','ck-revision-history-save-revision-form','shift\x20+\x20tab','extendTemplate'];(function(_0x7aec03,_0x45302c){const _0x452a16=function(_0x4ebdc3){while(--_0x4ebdc3){_0x7aec03['push'](_0x7aec03['shift']());}};_0x452a16(++_0x45302c);}(_0x4530,0x84));const _0x452a=function(_0x7aec03,_0x45302c){_0x7aec03=_0x7aec03-0x0;let _0x452a16=_0x4530[_0x7aec03];return _0x452a16;};import{icons as _0x4aa547}from'ckeditor5/src/core';import{ButtonView as _0x135933,FocusCycler as _0x2d0a96,LabeledFieldView as _0x312856,View as _0x1db0f6,ViewCollection as _0x3330a1,createLabeledInputText as _0x325d76,injectCssTransitionDisabler as _0x4c1a90,submitHandler as _0x3247f6}from'ckeditor5/src/ui';import{FocusTracker as _0x359349,KeystrokeHandler as _0x3674d7}from'ckeditor5/src/utils';import{getTranslation as _0x41851c}from'../../utils/common-translations';import'../../../theme/revisionhistorysaverevisionform.css';import'@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';export default class Nt extends _0x1db0f6{constructor(_0x244c90){super(_0x244c90),this['focusTracker']=new _0x359349(),this['keystrokes']=new _0x3674d7(),this[_0x452a('0x8')](_0x452a('0x16'),''),this[_0x452a('0x17')]=this['_createRevisionNameInput'](),this[_0x452a('0x12')]=this[_0x452a('0x22')](_0x41851c(_0x244c90,_0x452a('0xd')),_0x4aa547['check'],_0x452a('0x24')),this[_0x452a('0x12')]['type']=_0x452a('0x1f'),this[_0x452a('0xb')]=this[_0x452a('0x22')](_0x41851c(_0x244c90,_0x452a('0x0')),_0x4aa547['cancel'],_0x452a('0xe'),_0x452a('0x1c')),this[_0x452a('0x4')]=new _0x3330a1(),this[_0x452a('0xf')]=new _0x2d0a96({'focusables':this[_0x452a('0x4')],'focusTracker':this[_0x452a('0x10')],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':_0x452a('0x1a'),'focusNext':_0x452a('0x5')}}),this['setTemplate']({'tag':'form','attributes':{'class':['ck',_0x452a('0x19'),_0x452a('0x3')],'tabindex':'-1'},'children':[this['revisionNameInputView'],this[_0x452a('0x12')],this[_0x452a('0xb')]]}),_0x4c1a90(this);}[_0x452a('0x1')](){super['render'](),_0x3247f6({'view':this}),([this[_0x452a('0x17')],this[_0x452a('0x12')],this[_0x452a('0xb')]]['forEach'](_0x914f93=>{this[_0x452a('0x4')][_0x452a('0x1e')](_0x914f93),this[_0x452a('0x10')][_0x452a('0x1e')](_0x914f93[_0x452a('0x15')]);}),this[_0x452a('0x1d')]['listenTo'](this[_0x452a('0x15')]));const _0x5cc283=_0x5998cc=>_0x5998cc[_0x452a('0x9')]();this[_0x452a('0x1d')][_0x452a('0x8')](_0x452a('0x2'),_0x5cc283),this[_0x452a('0x1d')]['set'](_0x452a('0xa'),_0x5cc283),this[_0x452a('0x1d')][_0x452a('0x8')](_0x452a('0x14'),_0x5cc283),this[_0x452a('0x1d')][_0x452a('0x8')](_0x452a('0x27'),_0x5cc283);}['focus'](){this[_0x452a('0xf')]['focusFirst']();}get[_0x452a('0x26')](){return this[_0x452a('0x17')][_0x452a('0x23')][_0x452a('0x15')]['value'][_0x452a('0x11')]();}set[_0x452a('0x26')](_0x1317af){this[_0x452a('0x17')]['fieldView']['element']['value']=_0x1317af[_0x452a('0x11')]();}['reset'](){this[_0x452a('0x17')][_0x452a('0x23')][_0x452a('0x15')]['value']='';}[_0x452a('0x21')](){const _0x4e9f54=new _0x312856(this[_0x452a('0xc')],_0x325d76),_0x50f989=_0x4e9f54[_0x452a('0x23')];return _0x50f989[_0x452a('0x1b')]({'attributes':{'maxlength':_0x452a('0x13')}}),_0x4e9f54[_0x452a('0x18')]=_0x41851c(this[_0x452a('0xc')],_0x452a('0x25')),_0x50f989['on'](_0x452a('0x7'),()=>{this[_0x452a('0x16')]=_0x50f989[_0x452a('0x15')][_0x452a('0x20')][_0x452a('0x11')]();}),_0x4e9f54;}[_0x452a('0x22')](_0x3574f0,_0xeb549d,_0x25e978,_0x4975dd){const _0x10f6a0=new _0x135933(this[_0x452a('0xc')]);return _0x10f6a0['set']({'label':_0x3574f0,'icon':_0xeb549d,'tooltip':!0x0}),_0x10f6a0[_0x452a('0x1b')]({'attributes':{'class':_0x25e978}}),_0x4975dd&&_0x10f6a0[_0x452a('0x6')]('execute')['to'](this,_0x4975dd),_0x10f6a0;}}
|