@ckeditor/ckeditor5-revision-history 36.0.1 → 37.0.0-rc.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/build/revision-history.js +1 -1
- package/package.json +22 -7
- package/src/augmentation.d.ts +25 -0
- package/src/augmentation.js +23 -0
- package/src/changeitem.d.ts +52 -0
- package/src/changeitem.js +1 -1
- package/src/editor/revisionviewereditor.d.ts +27 -0
- package/src/editor/revisionviewereditor.js +1 -1
- package/src/editor/revisionviewereditorui.d.ts +28 -0
- package/src/editor/revisionviewereditorui.js +1 -1
- package/src/editor/revisionviewereditoruiview.d.ts +43 -0
- package/src/editor/revisionviewereditoruiview.js +1 -1
- package/src/index.d.ts +10 -0
- package/src/index.js +1 -1
- package/src/revision.d.ts +153 -0
- package/src/revision.js +1 -1
- package/src/revisiondiff.d.ts +19 -0
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.d.ts +93 -0
- package/src/revisionhistory.js +1 -1
- package/src/revisionhistoryadapter.d.ts +60 -0
- package/src/revisionhistoryadapter.js +23 -0
- package/src/revisionhistoryconfig.d.ts +60 -0
- package/src/revisionhistoryconfig.js +23 -0
- package/src/revisionsrepository.d.ts +43 -0
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.d.ts +72 -0
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.d.ts +21 -0
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.d.ts +9 -0
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.d.ts +4 -0
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.d.ts +4 -0
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.d.ts +91 -0
- package/src/ui/revision/revisionview.js +1 -1
- package/src/ui/revision/subrevisioncollapserview.d.ts +17 -0
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.d.ts +30 -0
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.d.ts +4 -0
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.d.ts +80 -0
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.d.ts +21 -0
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.d.ts +39 -0
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.d.ts +4 -0
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.d.ts +25 -0
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.d.ts +40 -0
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.d.ts +8 -0
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.d.ts +18 -0
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.d.ts +36 -0
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.d.ts +22 -0
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.d.ts +22 -0
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- package/src/utils/common-translations.d.ts +7 -0
- package/src/utils/common-translations.js +1 -1
|
@@ -0,0 +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
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2a87=['createdAt','uiLanguage','bindTemplate','span','ck-revision-history-sidebar__subrevision','isSelected','_createdAtFormatted','creator','ck-revision-history-sidebar__revision_selected','ck-revision-history-sidebar__revision__date','select','ck-revision-history-sidebar__revision','bind','ck-revision-history-sidebar__revision-authors','deselect','div','_parentRevisionId'];(function(_0x2c7878,_0x2a87a0){const _0x22b458=function(_0xd6e265){while(--_0xd6e265){_0x2c7878['push'](_0x2c7878['shift']());}};_0x22b458(++_0x2a87a0);}(_0x2a87,0x11e));const _0x22b4=function(_0x2c7878,_0x2a87a0){_0x2c7878=_0x2c7878-0x0;let _0x22b458=_0x2a87[_0x2c7878];return _0x22b458;};import{View as _0x5279bb}from'ckeditor5/src/ui';import _0x4d8420 from'./revisionauthorview';import{dateToPrettyFormat as _0x31212c}from'./utils';import'../../../theme/revision/subrevision.css';export default class ci extends _0x5279bb{constructor(_0x220675,_0x6443dc,_0x5c8fda){super(_0x220675);const _0x234880=this[_0x22b4('0x5')];this['id']=_0x6443dc['id'],this['bind']('createdAt')['to'](_0x6443dc),this['set'](_0x22b4('0x8'),!0x1),this[_0x22b4('0xf')]('_createdAtFormatted')['to'](this,_0x22b4('0x3'),_0x56fcdc=>_0x56fcdc?_0x31212c(_0x220675[_0x22b4('0x4')],_0x56fcdc):void 0x0),this[_0x22b4('0x2')]=_0x5c8fda,this['setTemplate']({'tag':_0x22b4('0x1'),'attributes':{'class':['ck','ck-reset',_0x22b4('0xe'),_0x22b4('0x7'),_0x234880['if'](_0x22b4('0x8'),_0x22b4('0xb'))]},'children':[{'tag':_0x22b4('0x6'),'attributes':{'class':['ck',_0x22b4('0xc')]},'children':[{'text':_0x234880['to'](_0x22b4('0x9'))}]},{'tag':'ul','attributes':{'class':['ck',_0x22b4('0x10')]},'children':[new _0x4d8420(_0x220675,_0x6443dc[_0x22b4('0xa')],!0x0)]}],'on':{'click':_0x234880['to'](this[_0x22b4('0xd')][_0x22b4('0xf')](this))}});}[_0x22b4('0xd')](){this[_0x22b4('0x8')]=!0x0,this['fire'](_0x22b4('0xd'),{'parentId':this['_parentRevisionId']});}[_0x22b4('0x0')](){this[_0x22b4('0x8')]=!0x1;}}
|
package/src/ui/revision/utils.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x5ded=['long','numeric','toLocaleTimeString','toLocaleDateString'];(function(_0x80c528,_0x5ded69){var _0x5f566d=function(_0x2a21fa){while(--_0x2a21fa){_0x80c528['push'](_0x80c528['shift']());}};_0x5f566d(++_0x5ded69);}(_0x5ded,0x85));var _0x5f56=function(_0x80c528,_0x5ded69){_0x80c528=_0x80c528-0x0;var _0x5f566d=_0x5ded[_0x80c528];return _0x5f566d;};export function dateToPrettyFormat(_0x12423f,_0x4982e0){return _0x4982e0[_0x5f56('0x2')](_0x12423f,{'month':_0x5f56('0x3'),'day':_0x5f56('0x0')})+',\x20'+_0x4982e0[_0x5f56('0x1')](_0x12423f,{'hour':_0x5f56('0x0'),'minute':_0x5f56('0x0')});}
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x543d=['arrowright','render','focusTracker','_createButton','focusFirst','add','Save','type','saveButtonView','forEach','_focusables','Name\x20of\x20the\x20revision\x20(optional)','listenTo','keystrokes','value','ck-button-cancel','label','extendTemplate','revisionName','_createRevisionNameInput','ck-button-save','trim','set','delegate','cancel','revisionNameInputView','stopPropagation','ck-revision-history-save-revision-form','220','setTemplate','form','high','shift\x20+\x20tab','revisionNameInputValue','cancelButtonView','element','arrowdown','_focusCycler','arrowleft','fieldView','locale','Cancel'];(function(_0x37869a,_0x543d3e){const _0x589170=function(_0x572a03){while(--_0x572a03){_0x37869a['push'](_0x37869a['shift']());}};_0x589170(++_0x543d3e);}(_0x543d,0x14d));const _0x5891=function(_0x37869a,_0x543d3e){_0x37869a=_0x37869a-0x0;let _0x589170=_0x543d[_0x37869a];return _0x589170;};import{icons as _0x2d6c13}from'ckeditor5/src/core';import{ButtonView as _0x5d9ec2,FocusCycler as _0x4b368c,LabeledFieldView as _0x2df80a,View as _0x4bd8ef,ViewCollection as _0xf70b0e,createLabeledInputText as _0x420dba,injectCssTransitionDisabler as _0x508d83,submitHandler as _0xda4574}from'ckeditor5/src/ui';import{FocusTracker as _0x1257cf,KeystrokeHandler as _0x4832d9}from'ckeditor5/src/utils';import{getTranslation as _0x1d4521}from'../../utils/common-translations';import'../../../theme/revisionhistorysaverevisionform.css';import'@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';export default class vt extends _0x4bd8ef{constructor(_0x251a29){super(_0x251a29),this[_0x5891('0x5')]=new _0x1257cf(),this[_0x5891('0x10')]=new _0x4832d9(),this[_0x5891('0x19')](_0x5891('0x24'),''),this[_0x5891('0x1c')]=this['_createRevisionNameInput'](),this[_0x5891('0xb')]=this[_0x5891('0x6')](_0x1d4521(_0x251a29,_0x5891('0x9')),_0x2d6c13['check'],_0x5891('0x17')),this[_0x5891('0xb')][_0x5891('0xa')]='submit',this['cancelButtonView']=this[_0x5891('0x6')](_0x1d4521(_0x251a29,_0x5891('0x2')),_0x2d6c13[_0x5891('0x1b')],_0x5891('0x12'),_0x5891('0x1b')),this[_0x5891('0xd')]=new _0xf70b0e(),this[_0x5891('0x28')]=new _0x4b368c({'focusables':this[_0x5891('0xd')],'focusTracker':this[_0x5891('0x5')],'keystrokeHandler':this[_0x5891('0x10')],'actions':{'focusPrevious':_0x5891('0x23'),'focusNext':'tab'}}),this[_0x5891('0x20')]({'tag':_0x5891('0x21'),'attributes':{'class':['ck',_0x5891('0x1e'),'ck-responsive-form'],'tabindex':'-1'},'children':[this[_0x5891('0x1c')],this[_0x5891('0xb')],this[_0x5891('0x25')]]}),_0x508d83(this);}[_0x5891('0x4')](){super[_0x5891('0x4')](),_0xda4574({'view':this}),([this['revisionNameInputView'],this[_0x5891('0xb')],this['cancelButtonView']][_0x5891('0xc')](_0x37d1b6=>{this['_focusables'][_0x5891('0x8')](_0x37d1b6),this[_0x5891('0x5')][_0x5891('0x8')](_0x37d1b6[_0x5891('0x26')]);}),this[_0x5891('0x10')][_0x5891('0xf')](this['element']));const _0x43e47b=_0x1df91e=>_0x1df91e[_0x5891('0x1d')]();this[_0x5891('0x10')]['set'](_0x5891('0x3'),_0x43e47b),this[_0x5891('0x10')][_0x5891('0x19')](_0x5891('0x29'),_0x43e47b),this[_0x5891('0x10')][_0x5891('0x19')]('arrowup',_0x43e47b),this[_0x5891('0x10')][_0x5891('0x19')](_0x5891('0x27'),_0x43e47b),this[_0x5891('0xf')](this['revisionNameInputView'][_0x5891('0x26')],'selectstart',(_0x263c83,_0x5d83c9)=>{_0x5d83c9[_0x5891('0x1d')]();},{'priority':_0x5891('0x22')});}['focus'](){this[_0x5891('0x28')][_0x5891('0x7')]();}get[_0x5891('0x15')](){return this['revisionNameInputView'][_0x5891('0x0')]['element'][_0x5891('0x11')][_0x5891('0x18')]();}set[_0x5891('0x15')](_0x419dbf){this[_0x5891('0x1c')][_0x5891('0x0')][_0x5891('0x26')]['value']=_0x419dbf['trim']();}['reset'](){this[_0x5891('0x1c')][_0x5891('0x0')]['element'][_0x5891('0x11')]='';}[_0x5891('0x16')](){const _0x489791=new _0x2df80a(this[_0x5891('0x1')],_0x420dba),_0x1e08a8=_0x489791[_0x5891('0x0')];return _0x1e08a8[_0x5891('0x14')]({'attributes':{'maxlength':_0x5891('0x1f')}}),_0x489791[_0x5891('0x13')]=_0x1d4521(this[_0x5891('0x1')],_0x5891('0xe')),_0x1e08a8['on']('input',()=>{this[_0x5891('0x24')]=_0x1e08a8[_0x5891('0x26')]['value']['trim']();}),_0x489791;}['_createButton'](_0x1f1378,_0x4936d1,_0x1e7369,_0x392eed){const _0x3d20f0=new _0x5d9ec2(this['locale']);return _0x3d20f0[_0x5891('0x19')]({'label':_0x1f1378,'icon':_0x4936d1,'tooltip':!0x0}),_0x3d20f0[_0x5891('0x14')]({'attributes':{'class':_0x1e7369}}),_0x392eed&&_0x3d20f0[_0x5891('0x1a')]('execute')['to'](this,_0x392eed),_0x3d20f0;}}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module revision-history/ui/revisionhistory/revisionhistoryui
|
|
3
|
+
*/
|
|
4
|
+
import { Plugin, type PluginDependencies } from 'ckeditor5/src/core';
|
|
5
|
+
/**
|
|
6
|
+
* TODO
|
|
7
|
+
*/
|
|
8
|
+
export default class RevisionHistoryUI extends Plugin {
|
|
9
|
+
/**
|
|
10
|
+
* @inheritDoc
|
|
11
|
+
*/
|
|
12
|
+
static get pluginName(): 'RevisionHistoryUI';
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
static get requires(): PluginDependencies;
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
init(): void;
|
|
21
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2f95=['addMany','isOpen','bind','reset','plugins','Open\x20revision\x20history','cancel','Save\x20current\x20revision','revisionHistory','isReadOnly','execute','isEnabled','requires','focus','revisionName','RevisionTracker','config','children','add','isReady','change:isOpen','init','componentFactory','get','view','submit','items','set','pluginName','saveButtonView','RevisionHistoryUI','panelView','remove','buttonView'];(function(_0x6024e1,_0x2f9585){const _0x3484ae=function(_0x53424a){while(--_0x53424a){_0x6024e1['push'](_0x6024e1['shift']());}};_0x3484ae(++_0x2f9585);}(_0x2f95,0x7d));const _0x3484=function(_0x6024e1,_0x2f9585){_0x6024e1=_0x6024e1-0x0;let _0x3484ae=_0x2f95[_0x6024e1];return _0x3484ae;};import{Plugin as _0x4930ac}from'ckeditor5/src/core';import{ListView as _0x107b59,ListItemView as _0x1e01b7,ButtonView as _0x4665a4,createDropdown as _0x37d4cf}from'ckeditor5/src/ui';import _0x304ab8 from'../../revisiontracker';import _0x2baf66 from'./revisionhistorysaverevisionformview';import _0x420ef5 from'../../../theme/icons/revision-history.svg';import{getTranslation as _0x51d34c}from'../../utils/common-translations';export default class u extends _0x4930ac{static get[_0x3484('0x5')](){return _0x3484('0x7');}static get[_0x3484('0x17')](){return[_0x304ab8];}[_0x3484('0x20')](){const _0x111753=this['editor'],_0x1acf90=_0x111753[_0x3484('0xf')]['get'](_0x3484('0x1a'));_0x111753['ui'][_0x3484('0x21')]['add'](_0x3484('0x13'),_0x5dbcd1=>{const _0x53019d=_0x37d4cf(_0x5dbcd1),_0x56e9b9=_0x53019d[_0x3484('0x8')][_0x3484('0x1c')],_0x4c53ae=new _0x107b59(_0x5dbcd1),_0x5ed40b=new _0x1e01b7(_0x5dbcd1),_0x14d229=new _0x4665a4(_0x5dbcd1),_0x421c80=new _0x1e01b7(_0x5dbcd1),_0x27ccc8=new _0x4665a4(_0x5dbcd1),_0x1f5075=new _0x2baf66(_0x5dbcd1);function _0x5f4504(){_0x56e9b9['length']&&_0x56e9b9[_0x3484('0x9')](0x0),_0x56e9b9[_0x3484('0x1d')](_0x4c53ae);}function _0x282ed0(){_0x53019d[_0x3484('0xc')]=!0x1,_0x111753['editing'][_0x3484('0x1')][_0x3484('0x18')]();}return _0x53019d[_0x3484('0xd')](_0x3484('0x16'))['to'](_0x1acf90,_0x3484('0x1e'),_0x1acf90,'isEnabled',_0x111753,'isReadOnly',(_0x361b12,_0x231570,_0x5b991c)=>_0x361b12&&_0x231570&&!_0x5b991c),_0x53019d[_0x3484('0xa')][_0x3484('0x4')]({'icon':_0x420ef5,'label':_0x51d34c(_0x5dbcd1,'Revision\x20history'),'tooltip':!0x0}),_0x14d229[_0x3484('0x4')]({'label':_0x51d34c(_0x5dbcd1,_0x3484('0x12')),'withText':!0x0}),_0x14d229[_0x3484('0xd')](_0x3484('0x16'))['to'](_0x1acf90,_0x3484('0x1e'),_0x1acf90,_0x3484('0x16'),_0x111753,_0x3484('0x14'),(_0x34560f,_0x3e196f,_0x2151fd)=>_0x34560f&&_0x3e196f&&!_0x2151fd),_0x14d229['on']('execute',()=>function(){_0x56e9b9['length']&&_0x56e9b9['remove'](0x0),(_0x1f5075[_0x3484('0xe')](),_0x56e9b9[_0x3484('0x1d')](_0x1f5075),_0x1f5075[_0x3484('0x18')]());}()),_0x27ccc8[_0x3484('0x4')]({'label':_0x51d34c(_0x5dbcd1,_0x3484('0x10')),'withText':!0x0}),_0x27ccc8[_0x3484('0xd')]('isEnabled')['to'](_0x1acf90,_0x3484('0x1e'),_0x111753,_0x3484('0x14'),(_0x5507d8,_0x47cc47)=>_0x5507d8&&!_0x47cc47),_0x27ccc8['on'](_0x3484('0x15'),()=>{_0x111753[_0x3484('0x1b')][_0x3484('0x0')](_0x3484('0x13'))['showRevisionViewerCallback'](),_0x282ed0();}),_0x5ed40b[_0x3484('0x1c')][_0x3484('0x1d')](_0x14d229),_0x421c80[_0x3484('0x1c')][_0x3484('0x1d')](_0x27ccc8),_0x4c53ae[_0x3484('0x3')][_0x3484('0xb')]([_0x5ed40b,_0x421c80]),_0x53019d['on'](_0x3484('0x1f'),()=>_0x5f4504()),_0x1f5075[_0x3484('0x6')][_0x3484('0xd')](_0x3484('0x16'))['to'](_0x1acf90,_0x3484('0x1e'),_0x1acf90,'isEnabled',_0x111753,'isReadOnly',(_0x5e3bad,_0x5660bb,_0x3ea265)=>_0x5e3bad&&_0x5660bb&&!_0x3ea265),_0x1f5075['on'](_0x3484('0x2'),()=>(_0x111753[_0x3484('0xf')][_0x3484('0x0')](_0x304ab8)['saveRevision']({'name':_0x1f5075[_0x3484('0x19')]}),void _0x282ed0())),_0x1f5075['on'](_0x3484('0x11'),()=>_0x5f4504()),_0x1f5075['render'](),_0x5f4504(),_0x53019d;});}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module revision-history/ui/revisionsidebar/revisionsidebar
|
|
3
|
+
*/
|
|
4
|
+
import { Plugin, type PluginDependencies, type Editor } from 'ckeditor5/src/core';
|
|
5
|
+
import type { default as RevisionView } from '../revision/revisionview';
|
|
6
|
+
/**
|
|
7
|
+
* TODO
|
|
8
|
+
*/
|
|
9
|
+
export default class RevisionsSidebar extends Plugin {
|
|
10
|
+
static defaultRevisionActions: Array<string>;
|
|
11
|
+
static availableRevisionActions: Record<string, RevisionAction>;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
static get pluginName(): 'RevisionsSidebar';
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get requires(): PluginDependencies;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
constructor(editor: Editor);
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
init(): void;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
destroy(): void;
|
|
32
|
+
}
|
|
33
|
+
export interface RevisionAction {
|
|
34
|
+
name: string;
|
|
35
|
+
class?: string;
|
|
36
|
+
action: (editor: Editor, revisionView: RevisionView) => void;
|
|
37
|
+
isVisible?: (editor: Editor, revisionView: RevisionView) => boolean;
|
|
38
|
+
isEnabled?: (editor: Editor, revisionView: RevisionView) => boolean;
|
|
39
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x56a8=['revisionHistory.viewerSidebarContainer','defaultRevisionActions','repository','isReady','listenTo','revisionViews','ready','_createRevisionActions','_revisions','get','_handleRevisionSelected','Restore\x20this\x20revision','isVisible','editor','remove','timePeriodViews','diff','restoreRevisionCallback','revisionSetName','compareAgainstSelected','config','getLaterVisibleRevision','_revisionViewer','focus','add','appendChild','availableRevisionActions','destroy','getRevisionsInDiff','data','pluginName','setName','name','isEnabled','Name\x20this\x20revision','nameRevision','isSelected','_handleDiffChange','getRevision','map','string','_handleEditorDataReady','length','highlightRevisions','assign','action','locale','revisionSelected','selectRevision','requires','compare','revisionHistory','newRevisionId','_sidebarView','bind','change:diff','Compare\x20against\x20selected','revisionHistory.revisionActions','_revisionsRepository','getEarlierVisibleRevision','RevisionsSidebar','_handleRevisionSetName'];(function(_0xfc431b,_0x56a823){const _0x11e81e=function(_0x34dc09){while(--_0x34dc09){_0xfc431b['push'](_0xfc431b['shift']());}};_0x11e81e(++_0x56a823);}(_0x56a8,0xa6));const _0x11e8=function(_0xfc431b,_0x56a823){_0xfc431b=_0xfc431b-0x0;let _0x11e81e=_0x56a8[_0xfc431b];return _0x11e81e;};import{Plugin as _0x539c57}from'ckeditor5/src/core';import _0xb245e5 from'./revisionssidebarview';import _0x1ee067 from'../../revisionviewer';export default class R extends _0x539c57{static get[_0x11e8('0x32')](){return _0x11e8('0x12');}static get[_0x11e8('0x7')](){return[_0x1ee067];}constructor(_0x496291){super(_0x496291),this[_0x11e8('0x2a')]=_0x496291['plugins'][_0x11e8('0x1d')](_0x1ee067),this['_revisionsRepository']=this[_0x11e8('0x2a')][_0x11e8('0x16')],this[_0x11e8('0xb')]=null;}['init'](){const _0x4dc4b7=this[_0x11e8('0x10')][_0x11e8('0x1c')],_0x5f19a1=this[_0x11e8('0x1b')](),_0x5a3974=this[_0x11e8('0x21')]['config'][_0x11e8('0x1d')](_0x11e8('0x14'));this['_sidebarView']=new _0xb245e5(this[_0x11e8('0x21')][_0x11e8('0x4')],_0x4dc4b7,_0x5f19a1),this[_0x11e8('0xb')]['on'](_0x11e8('0x5'),this[_0x11e8('0x1e')][_0x11e8('0xc')](this)),this['_sidebarView']['on'](_0x11e8('0x26'),this[_0x11e8('0x13')][_0x11e8('0xc')](this)),this[_0x11e8('0xb')]['bind']('isEnabled')['to'](this[_0x11e8('0x2a')]),this['_sidebarView'][_0x11e8('0x23')]['on'](_0x11e8('0x2c'),(_0x47fab5,_0x40de91)=>{_0x40de91[_0x11e8('0x19')]['on'](_0x11e8('0x2c'),(_0x59883f,_0x2ae3f4)=>{_0x2ae3f4[_0x11e8('0xc')](_0x11e8('0x35'),_0x11e8('0x17'))['to'](this[_0x11e8('0x2a')]);});}),this['_sidebarView']['render'](),this['listenTo'](this['editor'][_0x11e8('0x31')],_0x11e8('0x1a'),this[_0x11e8('0x3d')][_0x11e8('0xc')](this)),this[_0x11e8('0x18')](this['_revisionViewer'],_0x11e8('0xd'),this[_0x11e8('0x39')][_0x11e8('0xc')](this)),_0x5a3974[_0x11e8('0x2d')](this['_sidebarView']['element']);}[_0x11e8('0x2f')](){this[_0x11e8('0xb')]['element'][_0x11e8('0x22')](),this[_0x11e8('0xb')]['destroy']();}[_0x11e8('0x3d')](){const _0x3809ef=this['_revisionsRepository']['getRevision'](0x0);if(_0x3809ef){const _0x241355=this[_0x11e8('0x10')][_0x11e8('0x11')](_0x3809ef['id']);this[_0x11e8('0x2a')][_0x11e8('0x8')](_0x3809ef,_0x241355);}}[_0x11e8('0x1e')](_0x4f173f,_0x30c7fe){const _0x93e0f8=this[_0x11e8('0x10')]['getRevision'](_0x30c7fe['id']),_0x49aba8=this[_0x11e8('0x10')][_0x11e8('0x11')](_0x93e0f8['id']);this[_0x11e8('0x2a')][_0x11e8('0x8')](_0x93e0f8,_0x49aba8);}[_0x11e8('0x13')](_0x465547,_0x3bf2d5){this[_0x11e8('0x10')][_0x11e8('0x3a')](_0x3bf2d5['id'])[_0x11e8('0x33')](_0x3bf2d5[_0x11e8('0x34')]);}[_0x11e8('0x39')](_0x3ba98f,_0x2917c8,_0x2fc43f){const _0x8bee03=this['_revisionsRepository'][_0x11e8('0x30')](_0x2fc43f);_0x8bee03[_0x11e8('0x0')]>0x2?(this['_sidebarView']['highlightRevisions'](_0x8bee03),this[_0x11e8('0xb')][_0x11e8('0x6')](null)):(this[_0x11e8('0xb')][_0x11e8('0x1')]([]),this['_sidebarView']['selectRevision'](_0x8bee03[0x0]));}[_0x11e8('0x1b')](){const _0x1510f0=this[_0x11e8('0x21')],_0x40fa97=R[_0x11e8('0x2e')],_0x1893e3=_0x1510f0[_0x11e8('0x28')]['get'](_0x11e8('0xf'))||R[_0x11e8('0x15')];if(_0x1893e3[_0x11e8('0x0')])return _0x1893e3[_0x11e8('0x3b')](_0xd61a63=>{const _0x50e6a4=_0x11e8('0x3c')==typeof _0xd61a63?Object[_0x11e8('0x2')]({},_0x40fa97[_0xd61a63]):_0xd61a63;return _0x50e6a4[_0x11e8('0x3')]=_0x50e6a4[_0x11e8('0x3')][_0x11e8('0xc')](this,_0x1510f0),_0x50e6a4['isVisible']&&(_0x50e6a4['isVisible']=_0x50e6a4[_0x11e8('0x20')][_0x11e8('0xc')](this,_0x1510f0)),_0x50e6a4;});}}R['availableRevisionActions']={'compareAgainstSelected':{'name':_0x11e8('0xe'),'action':({plugins:_0x7bcc48},_0x3430a6)=>{const _0x4a09af=_0x7bcc48['get'](_0x1ee067),_0x5c0be2=_0x4a09af[_0x11e8('0x16')];let _0x3e593b=_0x4a09af[_0x11e8('0x24')][_0x11e8('0xa')],_0x47d91f=_0x3430a6['id'];_0x5c0be2['getIndex'](_0x3e593b)>_0x5c0be2['getIndex'](_0x47d91f)&&([_0x3e593b,_0x47d91f]=[_0x47d91f,_0x3e593b]),_0x4a09af[_0x11e8('0x8')](_0x3e593b,_0x47d91f);},'isVisible':({plugins:_0x24eca5},_0x4e2554)=>{const _0x3916f7=_0x24eca5[_0x11e8('0x1d')](_0x1ee067);return!(_0x3916f7[_0x11e8('0x16')][_0x11e8('0x30')](_0x3916f7['diff'])[_0x11e8('0x0')]>0x2)&&!_0x4e2554[_0x11e8('0x38')];}},'restoreRevision':{'name':_0x11e8('0x1f'),'action':(_0x5799cb,{id:_0x171aaa})=>{_0x5799cb[_0x11e8('0x28')][_0x11e8('0x1d')](_0x11e8('0x9'))[_0x11e8('0x25')](_0x171aaa);},'isVisible':({plugins:_0xd4fd0},_0x3b71c3)=>!!_0xd4fd0[_0x11e8('0x1d')](_0x1ee067)[_0x11e8('0x16')][_0x11e8('0x29')](_0x3b71c3['id'])},'nameRevision':{'name':_0x11e8('0x36'),'action':({plugins:_0x1f3fb6},{id:_0x3e7f47,revisionNameView:_0x7a512f})=>{const _0x2464d7=_0x1f3fb6[_0x11e8('0x1d')](_0x1ee067),_0x4d02ff=_0x2464d7[_0x11e8('0x16')][_0x11e8('0x11')](_0x3e7f47);_0x2464d7[_0x11e8('0x8')](_0x3e7f47,_0x4d02ff),_0x7a512f[_0x11e8('0x2b')](),_0x7a512f['fieldView']['select']();}}},R[_0x11e8('0x15')]=[_0x11e8('0x27'),'restoreRevision',_0x11e8('0x37')];
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x485f=['span','ck-reset_all','div','setTemplate','content','Revision\x20history','ck-revision-history-sidebar__header__label'];(function(_0x54ccfc,_0x485f02){const _0x2d5a97=function(_0x4aa3cb){while(--_0x4aa3cb){_0x54ccfc['push'](_0x54ccfc['shift']());}};_0x2d5a97(++_0x485f02);}(_0x485f,0x1c8));const _0x2d5a=function(_0x54ccfc,_0x485f02){_0x54ccfc=_0x54ccfc-0x0;let _0x2d5a97=_0x485f[_0x54ccfc];return _0x2d5a97;};import{View as _0x2f6b60,IconView as _0xa2f8ff}from'ckeditor5/src/ui';import{getTranslation as _0x5bdbf8}from'../../utils/common-translations';import _0x59bec5 from'../../../theme/icons/revision-history.svg';import'../../../theme/revisionssidebar/revisionssidebarheader.css';export default class ts extends _0x2f6b60{constructor(_0x2ed6fb){super(_0x2ed6fb);const _0x1a8a52=new _0xa2f8ff();_0x1a8a52[_0x2d5a('0x3')]=_0x59bec5,this[_0x2d5a('0x2')]({'tag':_0x2d5a('0x1'),'attributes':{'class':['ck',_0x2d5a('0x0'),'ck-revision-history-sidebar__header']},'children':[_0x1a8a52,{'tag':_0x2d5a('0x6'),'attributes':{'class':['ck',_0x2d5a('0x5')]},'children':[_0x5bdbf8(_0x2ed6fb,_0x2d5a('0x4'))]}]});}}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module revision-history/ui/revisionsidebar/revisionsidebartimeperiodview
|
|
3
|
+
*/
|
|
4
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
5
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
6
|
+
import RevisionView from '../revision/revisionview';
|
|
7
|
+
import '../../../theme/revisionssidebar/revisionssidebartimeperiod.css';
|
|
8
|
+
import type { RevisionAction } from './revisionssidebar';
|
|
9
|
+
import type Revision from '../../revision';
|
|
10
|
+
/**
|
|
11
|
+
* TODO
|
|
12
|
+
*/
|
|
13
|
+
export default class RevisionsSidebarTimePeriodView extends View {
|
|
14
|
+
startDate: Date;
|
|
15
|
+
revisionViews: ViewCollection<RevisionView>;
|
|
16
|
+
constructor(locale: Locale, startDate: Date, revisionActions: Array<RevisionAction>);
|
|
17
|
+
/**
|
|
18
|
+
* TODO
|
|
19
|
+
*/
|
|
20
|
+
addRevision(newRevision: Revision): void;
|
|
21
|
+
/**
|
|
22
|
+
* TODO
|
|
23
|
+
*/
|
|
24
|
+
removeRevision(revision: Revision): void;
|
|
25
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1d66=['addRevision','add','locale','setName','div','delegate','span','revisionViews','ck-revision-history-sidebar__time-period__label','_revisionActions','uiLanguage','createCollection','localizedPeriodName','select','ck-revision-history-sidebar__time-period__revisions','removeRevision','setTemplate','ck-revision-history-sidebar__time-period'];(function(_0xb80e0d,_0x1d66b6){const _0x4e0d58=function(_0x51ef55){while(--_0x51ef55){_0xb80e0d['push'](_0xb80e0d['shift']());}};_0x4e0d58(++_0x1d66b6);}(_0x1d66,0x94));const _0x4e0d=function(_0xb80e0d,_0x1d66b6){_0xb80e0d=_0xb80e0d-0x0;let _0x4e0d58=_0x1d66[_0xb80e0d];return _0x4e0d58;};import{View as _0x5e05f9}from'ckeditor5/src/ui';import _0x45aaa6 from'../revision/revisionview';import{getDateTimePeriodInfo as _0x2cf245}from'./utils';import'../../../theme/revisionssidebar/revisionssidebartimeperiod.css';export default class ki extends _0x5e05f9{constructor(_0x166f64,_0x149104,_0x5b4627){super(_0x166f64);const _0x420e56=_0x2cf245(_0x149104,this[_0x4e0d('0x10')][_0x4e0d('0x6')])[_0x4e0d('0x8')];this['startDate']=_0x149104,this[_0x4e0d('0x3')]=this[_0x4e0d('0x7')](),this[_0x4e0d('0x5')]=_0x5b4627,this['revisionViews'][_0x4e0d('0x1')](_0x4e0d('0x9'))['to'](this),this[_0x4e0d('0x3')]['delegate'](_0x4e0d('0x11'))['to'](this),this[_0x4e0d('0xc')]({'tag':_0x4e0d('0x0'),'attributes':{'class':['ck',_0x4e0d('0xd')]},'children':[{'tag':_0x4e0d('0x2'),'attributes':{'class':['ck',_0x4e0d('0x4')]},'children':[{'text':_0x420e56}]},{'tag':_0x4e0d('0x0'),'attributes':{'class':['ck',_0x4e0d('0xa')]},'children':this[_0x4e0d('0x3')]}]});}[_0x4e0d('0xe')](_0x1d1c5c){const _0xabfb0d=new _0x45aaa6(this[_0x4e0d('0x10')],_0x1d1c5c,this[_0x4e0d('0x5')]);this['revisionViews'][_0x4e0d('0xf')](_0xabfb0d);}[_0x4e0d('0xb')](_0x4297e4){const _0x37d3e4=this['revisionViews']['find'](_0x323a93=>_0x323a93['id']===_0x4297e4['id']);this[_0x4e0d('0x3')]['remove'](_0x37d3e4);}}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module revision-history/ui/revisionsidebar/revisionsidebarview
|
|
3
|
+
*/
|
|
4
|
+
import { View, type ViewCollection } from 'ckeditor5/src/ui';
|
|
5
|
+
import type { Locale, Collection } from 'ckeditor5/src/utils';
|
|
6
|
+
import RevisionsSidebarTimePeriodView from './revisionssidebartimeperiodview';
|
|
7
|
+
import '../../../theme/revisionssidebar/revisionssidebar.css';
|
|
8
|
+
import type { default as RevisionView } from '../revision/revisionview';
|
|
9
|
+
import type { RevisionAction } from './revisionssidebar';
|
|
10
|
+
import type Revision from '../../revision';
|
|
11
|
+
/**
|
|
12
|
+
* TODO
|
|
13
|
+
*/
|
|
14
|
+
export default class RevisionsSidebarView extends View {
|
|
15
|
+
timePeriodViews: ViewCollection<RevisionsSidebarTimePeriodView>;
|
|
16
|
+
/**
|
|
17
|
+
* @observable
|
|
18
|
+
*/
|
|
19
|
+
isEnabled: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
constructor(locale: Locale, revisions: Collection<Revision>, revisionActions: Array<RevisionAction>);
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
render(): void;
|
|
28
|
+
/**
|
|
29
|
+
* TODO
|
|
30
|
+
*/
|
|
31
|
+
get revisionViews(): Array<RevisionView>;
|
|
32
|
+
/**
|
|
33
|
+
* TODO
|
|
34
|
+
*/
|
|
35
|
+
selectRevision(revisionToSelect: Revision | null): void;
|
|
36
|
+
/**
|
|
37
|
+
* TODO
|
|
38
|
+
*/
|
|
39
|
+
highlightRevisions(revisionsToHighlight: Array<Revision>): void;
|
|
40
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x39d1=['removeRevision','div','_getTimePeriodViewByStartDate','_revisionActions','addRevision','locale','render','deselect','uiLanguage','revisionSetName','isEnabled','ck-disabled','startDate','createdAt','select','delegate','flat','ck-rounded-corners','setTemplate','_addRevision','_revisions','getTime','setName','revisionViews','some','ck-reset','ck-revision-history-sidebar__timeline','createCollection','map','timePeriodViews','highlight','add','selectRevision','_removeRevision','find','set','revisionSelected'];(function(_0xc0f9ad,_0x39d181){const _0x192229=function(_0x37d294){while(--_0x37d294){_0xc0f9ad['push'](_0xc0f9ad['shift']());}};_0x192229(++_0x39d181);}(_0x39d1,0x96));const _0x1922=function(_0xc0f9ad,_0x39d181){_0xc0f9ad=_0xc0f9ad-0x0;let _0x192229=_0x39d1[_0xc0f9ad];return _0x192229;};import{View as _0x5ea8f5}from'ckeditor5/src/ui';import _0x32662e from'./revisionssidebartimeperiodview';import _0x2cd393 from'./revisionssidebarheaderview';import{getDateTimePeriodInfo as _0x2f6bd0}from'./utils';import'../../../theme/revisionssidebar/revisionssidebar.css';export default class vi extends _0x5ea8f5{constructor(_0x7e2de6,_0x275fcb,_0x458eb1){super(_0x7e2de6);const _0x437356=this['bindTemplate'];this[_0x1922('0x1b')]=this[_0x1922('0x19')](),this['timePeriodViews'][_0x1922('0xd')](_0x1922('0xc'))['to'](this),this[_0x1922('0x1b')]['delegate'](_0x1922('0x14'))['to'](this),this[_0x1922('0x12')]=_0x275fcb,this[_0x1922('0x1')]=_0x458eb1,this['on'](_0x1922('0xc'),(_0x33f562,_0x3a96ad)=>{this['fire'](_0x1922('0x22'),_0x3a96ad);}),this['on'](_0x1922('0x14'),(_0x5dffee,_0x68f272)=>{this['fire'](_0x1922('0x7'),_0x68f272);}),this[_0x1922('0x21')](_0x1922('0x8'),!0x1),this[_0x1922('0x10')]({'tag':_0x1922('0x24'),'attributes':{'class':['ck',_0x1922('0x17'),_0x1922('0xf'),'ck-revision-history-sidebar']},'children':[new _0x2cd393(_0x7e2de6),{'tag':_0x1922('0x24'),'attributes':{'class':['ck',_0x1922('0x18'),_0x437356['if']('isEnabled',_0x1922('0x9'),_0x386552=>!_0x386552)]},'children':this[_0x1922('0x1b')]}]});}[_0x1922('0x4')](){super[_0x1922('0x4')]();for(const _0x2b5f76 of this[_0x1922('0x12')])this[_0x1922('0x11')](_0x2b5f76);this[_0x1922('0x12')]['on']('add',(_0xbad44,_0x35b51f)=>{this[_0x1922('0x11')](_0x35b51f);}),this[_0x1922('0x12')]['on']('remove',(_0x33be49,_0x378871)=>{this[_0x1922('0x1f')](_0x378871);});}get[_0x1922('0x15')](){return this['timePeriodViews'][_0x1922('0x1a')](_0x2ff2d2=>_0x2ff2d2[_0x1922('0x15')][_0x1922('0x1a')](_0x4954e9=>_0x4954e9))[_0x1922('0xe')]();}[_0x1922('0x1e')](_0x4f9272){for(const _0x3f4c6e of this[_0x1922('0x15')])_0x4f9272&&_0x4f9272['id']===_0x3f4c6e['id']?_0x3f4c6e[_0x1922('0xc')]():_0x3f4c6e[_0x1922('0x5')]();}['highlightRevisions'](_0xee11d3){for(const _0x2f637e of this[_0x1922('0x15')])_0xee11d3[_0x1922('0x16')](({id:_0x55664b})=>_0x55664b===_0x2f637e['id'])?_0x2f637e[_0x1922('0x1c')]():_0x2f637e['unhighlight']();}[_0x1922('0x11')](_0x410ccd){const _0x1de7fc=_0x2f6bd0(_0x410ccd[_0x1922('0xb')],this[_0x1922('0x3')][_0x1922('0x6')])['startDate'];let _0x2fce60=this['timePeriodViews']['get'](0x0);_0x2fce60&&_0x2fce60[_0x1922('0xa')][_0x1922('0x13')]()===_0x1de7fc[_0x1922('0x13')]()||(_0x2fce60=new _0x32662e(this['locale'],_0x1de7fc,this[_0x1922('0x1')]),this[_0x1922('0x1b')][_0x1922('0x1d')](_0x2fce60)),_0x2fce60[_0x1922('0x2')](_0x410ccd);}[_0x1922('0x1f')](_0x95f0dd){const _0x31e24b=_0x2f6bd0(_0x95f0dd['createdAt'],this['locale'][_0x1922('0x6')])[_0x1922('0xa')];this[_0x1922('0x0')](_0x31e24b)[_0x1922('0x23')](_0x95f0dd);}[_0x1922('0x0')](_0x45d7ed){return this['timePeriodViews'][_0x1922('0x20')](_0x226bca=>_0x226bca[_0x1922('0xa')]['getTime']()===_0x45d7ed['getTime']());}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2861=['toJSDate','week','year','hasSame','setLocale','toRelativeCalendar','day','monthLong','local','weekdayLong','startOf','fromJSDate'];(function(_0x1eadb1,_0x286124){const _0x7d3297=function(_0x533243){while(--_0x533243){_0x1eadb1['push'](_0x1eadb1['shift']());}};_0x7d3297(++_0x286124);}(_0x2861,0xe4));const _0x7d32=function(_0x1eadb1,_0x286124){_0x1eadb1=_0x1eadb1-0x0;let _0x7d3297=_0x2861[_0x1eadb1];return _0x7d3297;};import{DateTime as _0x49909a}from'luxon';export function getDateTimePeriodInfo(_0x48b0a7,_0x32d94f){const _0x4ba4ad=_0x49909a[_0x7d32('0xb')](_0x48b0a7)[_0x7d32('0x4')](_0x32d94f),_0x33105c=_0x49909a[_0x7d32('0x8')](),_0x47fc7b=_0x33105c['minus']({'days':0x1})['startOf'](_0x7d32('0x6'));let _0x77bbd0,_0x419ce2;return _0x4ba4ad['hasSame'](_0x33105c,_0x7d32('0x6'))?(_0x77bbd0=_0x4ba4ad[_0x7d32('0xa')](_0x7d32('0x6'))['toJSDate'](),_0x419ce2=_0x4ba4ad[_0x7d32('0x5')]()):_0x4ba4ad[_0x7d32('0x3')](_0x47fc7b,_0x7d32('0x6'))?(_0x77bbd0=_0x47fc7b[_0x7d32('0x0')](),_0x419ce2=_0x4ba4ad[_0x7d32('0x5')]()):_0x4ba4ad[_0x7d32('0x3')](_0x33105c,_0x7d32('0x1'))?(_0x77bbd0=_0x4ba4ad[_0x7d32('0xa')](_0x7d32('0x1'))[_0x7d32('0x0')](),_0x419ce2=_0x4ba4ad[_0x7d32('0x9')]):_0x4ba4ad[_0x7d32('0x3')](_0x33105c,_0x7d32('0x2'))?(_0x77bbd0=_0x4ba4ad[_0x7d32('0xa')]('month')['toJSDate'](),_0x419ce2=_0x4ba4ad[_0x7d32('0x7')]):(_0x77bbd0=_0x4ba4ad[_0x7d32('0xa')](_0x7d32('0x2'))[_0x7d32('0x0')](),_0x419ce2=String(_0x4ba4ad[_0x7d32('0x2')])),{'startDate':_0x77bbd0,'localizedPeriodName':_0x419ce2};}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module revision-history/ui/revisionviewer/changedetailsview
|
|
3
|
+
*/
|
|
4
|
+
import { View } from 'ckeditor5/src/ui';
|
|
5
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
6
|
+
import type ChangeItem from '../../changeitem';
|
|
7
|
+
export default class ChangeDetailsView extends View {
|
|
8
|
+
changeId: string;
|
|
9
|
+
/**
|
|
10
|
+
* @observable
|
|
11
|
+
*/
|
|
12
|
+
type: string;
|
|
13
|
+
constructor(locale: Locale, model: ChangeItem);
|
|
14
|
+
/**
|
|
15
|
+
* Focuses the view.
|
|
16
|
+
*/
|
|
17
|
+
focus(): void;
|
|
18
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x8102=['add','_model','focus','name','type','set','Removed\x20by','element','ck-revision-change__label','setTemplate','bindTemplate','data','span','isSuggestion','Suggested\x20by','ck-annotation','changeId','ck-revision-change'];(function(_0x48c67e,_0x810226){const _0xb668ea=function(_0x12e3e2){while(--_0x12e3e2){_0x48c67e['push'](_0x48c67e['shift']());}};_0xb668ea(++_0x810226);}(_0x8102,0x195));const _0xb668=function(_0x48c67e,_0x810226){_0x48c67e=_0x48c67e-0x0;let _0xb668ea=_0x8102[_0x48c67e];return _0xb668ea;};import{View as _0x3fc0ba}from'ckeditor5/src/ui';import{getTranslation as _0xe3f141}from'../../utils/common-translations';export default class G extends _0x3fc0ba{constructor(_0x2725e0,_0x492065){super(_0x2725e0),this[_0xb668('0xa')]=_0x492065,this[_0xb668('0x7')]=_0x492065['id'];const _0x2a2144=this[_0xb668('0x1')],_0x21d892=_0xe3f141(_0x2725e0,_0x492065[_0xb668('0x2')][_0xb668('0x4')]?_0xb668('0x5'):_0xb668('0x9')==_0x492065['type']?'Added\x20by':_0xb668('0xf'));this[_0xb668('0xe')]('type',_0x492065[_0xb668('0xd')]),this[_0xb668('0x0')]({'tag':'div','attributes':{'class':[_0xb668('0x6'),_0xb668('0x8'),_0x2a2144['to']('type',_0x5ef2bf=>'ck-revision-change__'+_0x5ef2bf)],'tabindex':-0x1},'children':[{'tag':_0xb668('0x3'),'children':[{'tag':_0xb668('0x3'),'attributes':{'class':[_0xb668('0x11')]},'children':[{'text':_0x21d892}]},{'text':'\x20'+_0x492065['author'][_0xb668('0xc')]}]}]});}[_0xb668('0xb')](){this[_0xb668('0x10')][_0xb668('0xb')]();}}
|