@ckeditor/ckeditor5-revision-history 36.0.1 → 37.0.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 _0x39b2=['createdAt','bind','ck-revision-history-sidebar__revision_selected','ck-revision-history-sidebar__subrevision','_createdAtFormatted','select','isSelected','set','ck-revision-history-sidebar__revision','setTemplate','deselect','ck-reset','creator','fire','div','uiLanguage','_parentRevisionId'];(function(_0x2ef30c,_0x39b25e){const _0x24a389=function(_0x1e2053){while(--_0x1e2053){_0x2ef30c['push'](_0x2ef30c['shift']());}};_0x24a389(++_0x39b25e);}(_0x39b2,0x129));const _0x24a3=function(_0x2ef30c,_0x39b25e){_0x2ef30c=_0x2ef30c-0x0;let _0x24a389=_0x39b2[_0x2ef30c];return _0x24a389;};import{View as _0x4c5fdd}from'ckeditor5/src/ui';import _0xea9589 from'./revisionauthorview';import{dateToPrettyFormat as _0x28f663}from'./utils';import'../../../theme/revision/subrevision.css';export default class ci extends _0x4c5fdd{constructor(_0x488051,_0x49408a,_0x43c08d){super(_0x488051);const _0x20f92a=this['bindTemplate'];this['id']=_0x49408a['id'],this['bind']('createdAt')['to'](_0x49408a),this[_0x24a3('0x10')](_0x24a3('0xf'),!0x1),this['bind'](_0x24a3('0xd'))['to'](this,_0x24a3('0x9'),_0x4a08d1=>_0x4a08d1?_0x28f663(_0x488051[_0x24a3('0x7')],_0x4a08d1):void 0x0),this[_0x24a3('0x8')]=_0x43c08d,this[_0x24a3('0x1')]({'tag':_0x24a3('0x6'),'attributes':{'class':['ck',_0x24a3('0x3'),_0x24a3('0x0'),_0x24a3('0xc'),_0x20f92a['if']('isSelected',_0x24a3('0xb'))]},'children':[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0x20f92a['to']('_createdAtFormatted')}]},{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors']},'children':[new _0xea9589(_0x488051,_0x49408a[_0x24a3('0x4')],!0x0)]}],'on':{'click':_0x20f92a['to'](this[_0x24a3('0xe')][_0x24a3('0xa')](this))}});}[_0x24a3('0xe')](){this['isSelected']=!0x0,this[_0x24a3('0x5')](_0x24a3('0xe'),{'parentId':this['_parentRevisionId']});}[_0x24a3('0x2')](){this[_0x24a3('0xf')]=!0x1;}}
|
package/src/ui/revision/utils.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x1ea7=['numeric','long'];(function(_0x595d26,_0x1ea739){var _0x563559=function(_0x133938){while(--_0x133938){_0x595d26['push'](_0x595d26['shift']());}};_0x563559(++_0x1ea739);}(_0x1ea7,0x1db));var _0x5635=function(_0x595d26,_0x1ea739){_0x595d26=_0x595d26-0x0;var _0x563559=_0x1ea7[_0x595d26];return _0x563559;};export function dateToPrettyFormat(_0x132819,_0x4ce21a){return _0x4ce21a['toLocaleDateString'](_0x132819,{'month':_0x5635('0x0'),'day':'numeric'})+',\x20'+_0x4ce21a['toLocaleTimeString'](_0x132819,{'hour':_0x5635('0x1'),'minute':_0x5635('0x1')});}
|
|
@@ -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 _0x20b1=['revisionNameInputView','type','_createButton','input','_focusCycler','reset','arrowdown','focusTracker','fieldView','saveButtonView','execute','focus','stopPropagation','keystrokes','revisionName','trim','ck-revision-history-save-revision-form','arrowleft','ck-button-cancel','value','focusFirst','listenTo','_createRevisionNameInput','extendTemplate','high','label','arrowright','Save','Name\x20of\x20the\x20revision\x20(optional)','locale','delegate','arrowup','shift\x20+\x20tab','_focusables','set','form','cancel','add','render','forEach','setTemplate','element','revisionNameInputValue','ck-responsive-form','Cancel','cancelButtonView'];(function(_0x12ff0b,_0x20b100){const _0x396d61=function(_0x211a1a){while(--_0x211a1a){_0x12ff0b['push'](_0x12ff0b['shift']());}};_0x396d61(++_0x20b100);}(_0x20b1,0xb3));const _0x396d=function(_0x12ff0b,_0x20b100){_0x12ff0b=_0x12ff0b-0x0;let _0x396d61=_0x20b1[_0x12ff0b];return _0x396d61;};import{icons as _0x532b7c}from'ckeditor5/src/core';import{ButtonView as _0x48d708,FocusCycler as _0x5deec3,LabeledFieldView as _0x5a275d,View as _0x16344,ViewCollection as _0x47134c,createLabeledInputText as _0x15d367,injectCssTransitionDisabler as _0x5690af,submitHandler as _0x204c00}from'ckeditor5/src/ui';import{FocusTracker as _0x155369,KeystrokeHandler as _0x1ff507}from'ckeditor5/src/utils';import{getTranslation as _0x14bf5e}from'../../utils/common-translations';import'../../../theme/revisionhistorysaverevisionform.css';import'@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';export default class vt extends _0x16344{constructor(_0x2e626d){super(_0x2e626d),this[_0x396d('0xc')]=new _0x155369(),this[_0x396d('0x12')]=new _0x1ff507(),this[_0x396d('0x27')](_0x396d('0x1'),''),this[_0x396d('0x5')]=this[_0x396d('0x1b')](),this[_0x396d('0xe')]=this[_0x396d('0x7')](_0x14bf5e(_0x2e626d,_0x396d('0x20')),_0x532b7c['check'],'ck-button-save'),this[_0x396d('0xe')][_0x396d('0x6')]='submit',this[_0x396d('0x4')]=this[_0x396d('0x7')](_0x14bf5e(_0x2e626d,_0x396d('0x3')),_0x532b7c[_0x396d('0x29')],_0x396d('0x17'),'cancel'),this[_0x396d('0x26')]=new _0x47134c(),this[_0x396d('0x9')]=new _0x5deec3({'focusables':this[_0x396d('0x26')],'focusTracker':this[_0x396d('0xc')],'keystrokeHandler':this[_0x396d('0x12')],'actions':{'focusPrevious':_0x396d('0x25'),'focusNext':'tab'}}),this[_0x396d('0x2d')]({'tag':_0x396d('0x28'),'attributes':{'class':['ck',_0x396d('0x15'),_0x396d('0x2')],'tabindex':'-1'},'children':[this[_0x396d('0x5')],this[_0x396d('0xe')],this[_0x396d('0x4')]]}),_0x5690af(this);}[_0x396d('0x2b')](){super['render'](),_0x204c00({'view':this}),([this[_0x396d('0x5')],this[_0x396d('0xe')],this['cancelButtonView']][_0x396d('0x2c')](_0x2666e8=>{this[_0x396d('0x26')]['add'](_0x2666e8),this[_0x396d('0xc')][_0x396d('0x2a')](_0x2666e8[_0x396d('0x0')]);}),this[_0x396d('0x12')][_0x396d('0x1a')](this['element']));const _0x35f08b=_0x4d2895=>_0x4d2895['stopPropagation']();this['keystrokes'][_0x396d('0x27')](_0x396d('0x1f'),_0x35f08b),this[_0x396d('0x12')][_0x396d('0x27')](_0x396d('0x16'),_0x35f08b),this[_0x396d('0x12')]['set'](_0x396d('0x24'),_0x35f08b),this[_0x396d('0x12')][_0x396d('0x27')](_0x396d('0xb'),_0x35f08b),this[_0x396d('0x1a')](this[_0x396d('0x5')][_0x396d('0x0')],'selectstart',(_0x358969,_0x4f567c)=>{_0x4f567c[_0x396d('0x11')]();},{'priority':_0x396d('0x1d')});}[_0x396d('0x10')](){this['_focusCycler'][_0x396d('0x19')]();}get[_0x396d('0x13')](){return this[_0x396d('0x5')]['fieldView']['element']['value']['trim']();}set[_0x396d('0x13')](_0x598795){this[_0x396d('0x5')]['fieldView'][_0x396d('0x0')][_0x396d('0x18')]=_0x598795[_0x396d('0x14')]();}[_0x396d('0xa')](){this[_0x396d('0x5')][_0x396d('0xd')][_0x396d('0x0')][_0x396d('0x18')]='';}['_createRevisionNameInput'](){const _0x22d27c=new _0x5a275d(this[_0x396d('0x22')],_0x15d367),_0x1d7b3f=_0x22d27c[_0x396d('0xd')];return _0x1d7b3f[_0x396d('0x1c')]({'attributes':{'maxlength':'220'}}),_0x22d27c[_0x396d('0x1e')]=_0x14bf5e(this[_0x396d('0x22')],_0x396d('0x21')),_0x1d7b3f['on'](_0x396d('0x8'),()=>{this[_0x396d('0x1')]=_0x1d7b3f[_0x396d('0x0')][_0x396d('0x18')]['trim']();}),_0x22d27c;}[_0x396d('0x7')](_0x1a9764,_0x2cf95e,_0x181a96,_0x22af24){const _0x477582=new _0x48d708(this['locale']);return _0x477582[_0x396d('0x27')]({'label':_0x1a9764,'icon':_0x2cf95e,'tooltip':!0x0}),_0x477582[_0x396d('0x1c')]({'attributes':{'class':_0x181a96}}),_0x22af24&&_0x477582[_0x396d('0x23')](_0x396d('0xf'))['to'](this,_0x22af24),_0x477582;}}
|
|
@@ -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 _0x5953=['bind','Open\x20revision\x20history','plugins','change:isOpen','add','isOpen','execute','revisionHistory','reset','saveButtonView','saveRevision','componentFactory','isEnabled','focus','set','editing','config','revisionName','editor','render','submit','pluginName','RevisionHistoryUI','remove','isReady','children','cancel','get','isReadOnly','panelView','RevisionTracker','requires','items','showRevisionViewerCallback'];(function(_0x3225ce,_0x595328){const _0x50dc93=function(_0x4e65e6){while(--_0x4e65e6){_0x3225ce['push'](_0x3225ce['shift']());}};_0x50dc93(++_0x595328);}(_0x5953,0x136));const _0x50dc=function(_0x3225ce,_0x595328){_0x3225ce=_0x3225ce-0x0;let _0x50dc93=_0x5953[_0x3225ce];return _0x50dc93;};import{Plugin as _0x3f3b18}from'ckeditor5/src/core';import{ListView as _0xf9a68d,ListItemView as _0x2445d6,ButtonView as _0x5a96e8,createDropdown as _0x5d13b2}from'ckeditor5/src/ui';import _0x31a0bd from'../../revisiontracker';import _0x12c83b from'./revisionhistorysaverevisionformview';import _0x345250 from'../../../theme/icons/revision-history.svg';import{getTranslation as _0x58e7e5}from'../../utils/common-translations';export default class u extends _0x3f3b18{static get[_0x50dc('0x11')](){return _0x50dc('0x12');}static get[_0x50dc('0x1b')](){return[_0x31a0bd];}['init'](){const _0x5aa359=this[_0x50dc('0xe')],_0x585b44=_0x5aa359['plugins'][_0x50dc('0x17')](_0x50dc('0x1a'));_0x5aa359['ui'][_0x50dc('0x7')][_0x50dc('0x0')](_0x50dc('0x3'),_0x55b1e7=>{const _0xd3f9e=_0x5d13b2(_0x55b1e7),_0x286697=_0xd3f9e[_0x50dc('0x19')][_0x50dc('0x15')],_0x359db8=new _0xf9a68d(_0x55b1e7),_0x54a8a2=new _0x2445d6(_0x55b1e7),_0x4db130=new _0x5a96e8(_0x55b1e7),_0xb24db0=new _0x2445d6(_0x55b1e7),_0x26a970=new _0x5a96e8(_0x55b1e7),_0x5c54f5=new _0x12c83b(_0x55b1e7);function _0x20d53f(){_0x286697['length']&&_0x286697[_0x50dc('0x13')](0x0),_0x286697[_0x50dc('0x0')](_0x359db8);}function _0x536966(){_0xd3f9e[_0x50dc('0x1')]=!0x1,_0x5aa359[_0x50dc('0xb')]['view'][_0x50dc('0x9')]();}return _0xd3f9e[_0x50dc('0x1e')]('isEnabled')['to'](_0x585b44,_0x50dc('0x14'),_0x585b44,'isEnabled',_0x5aa359,_0x50dc('0x18'),(_0x57f2e2,_0x4909c3,_0x15eec7)=>_0x57f2e2&&_0x4909c3&&!_0x15eec7),_0xd3f9e['buttonView']['set']({'icon':_0x345250,'label':_0x58e7e5(_0x55b1e7,'Revision\x20history'),'tooltip':!0x0}),_0x4db130[_0x50dc('0xa')]({'label':_0x58e7e5(_0x55b1e7,'Save\x20current\x20revision'),'withText':!0x0}),_0x4db130[_0x50dc('0x1e')]('isEnabled')['to'](_0x585b44,_0x50dc('0x14'),_0x585b44,_0x50dc('0x8'),_0x5aa359,_0x50dc('0x18'),(_0x1a1748,_0x2bf92e,_0x1fb703)=>_0x1a1748&&_0x2bf92e&&!_0x1fb703),_0x4db130['on'](_0x50dc('0x2'),()=>function(){_0x286697['length']&&_0x286697[_0x50dc('0x13')](0x0),(_0x5c54f5[_0x50dc('0x4')](),_0x286697[_0x50dc('0x0')](_0x5c54f5),_0x5c54f5['focus']());}()),_0x26a970[_0x50dc('0xa')]({'label':_0x58e7e5(_0x55b1e7,_0x50dc('0x1f')),'withText':!0x0}),_0x26a970[_0x50dc('0x1e')]('isEnabled')['to'](_0x585b44,_0x50dc('0x14'),_0x5aa359,_0x50dc('0x18'),(_0x44c288,_0x10e9af)=>_0x44c288&&!_0x10e9af),_0x26a970['on']('execute',()=>{_0x5aa359[_0x50dc('0xc')][_0x50dc('0x17')](_0x50dc('0x3'))[_0x50dc('0x1d')](),_0x536966();}),_0x54a8a2[_0x50dc('0x15')]['add'](_0x4db130),_0xb24db0[_0x50dc('0x15')]['add'](_0x26a970),_0x359db8[_0x50dc('0x1c')]['addMany']([_0x54a8a2,_0xb24db0]),_0xd3f9e['on'](_0x50dc('0x21'),()=>_0x20d53f()),_0x5c54f5[_0x50dc('0x5')][_0x50dc('0x1e')](_0x50dc('0x8'))['to'](_0x585b44,'isReady',_0x585b44,_0x50dc('0x8'),_0x5aa359,'isReadOnly',(_0x43809f,_0xd09671,_0x1a24e9)=>_0x43809f&&_0xd09671&&!_0x1a24e9),_0x5c54f5['on'](_0x50dc('0x10'),()=>(_0x5aa359[_0x50dc('0x20')][_0x50dc('0x17')](_0x31a0bd)[_0x50dc('0x6')]({'name':_0x5c54f5[_0x50dc('0xd')]}),void _0x536966())),_0x5c54f5['on'](_0x50dc('0x16'),()=>_0x20d53f()),_0x5c54f5[_0x50dc('0xf')](),_0x20d53f(),_0xd3f9e;});}}
|
|
@@ -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 _0x13f2=['_createRevisionActions','isReady','highlightRevisions','selectRevision','listenTo','diff','add','remove','getRevision','_sidebarView','Name\x20this\x20revision','action','_revisionsRepository','isVisible','bind','availableRevisionActions','isEnabled','revisionSelected','map','_revisions','length','editor','_handleEditorDataReady','string','getLaterVisibleRevision','revisionViews','revisionHistory.viewerSidebarContainer','getIndex','isSelected','getRevisionsInDiff','repository','defaultRevisionActions','getEarlierVisibleRevision','revisionSetName','assign','destroy','_revisionViewer','appendChild','Restore\x20this\x20revision','restoreRevision','render','compare','timePeriodViews','name','pluginName','config','get','ready','_handleDiffChange','_handleRevisionSetName','focus','plugins','select','setName','_handleRevisionSelected'];(function(_0x116d6d,_0x13f22f){const _0x211c72=function(_0x40b849){while(--_0x40b849){_0x116d6d['push'](_0x116d6d['shift']());}};_0x211c72(++_0x13f22f);}(_0x13f2,0xad));const _0x211c=function(_0x116d6d,_0x13f22f){_0x116d6d=_0x116d6d-0x0;let _0x211c72=_0x13f2[_0x116d6d];return _0x211c72;};import{Plugin as _0x167edb}from'ckeditor5/src/core';import _0x44bded from'./revisionssidebarview';import _0x18d6e7 from'../../revisionviewer';export default class R extends _0x167edb{static get[_0x211c('0x24')](){return'RevisionsSidebar';}static get['requires'](){return[_0x18d6e7];}constructor(_0x235725){super(_0x235725),this['_revisionViewer']=_0x235725[_0x211c('0x2b')][_0x211c('0x26')](_0x18d6e7),this['_revisionsRepository']=this[_0x211c('0x1c')][_0x211c('0x16')],this[_0x211c('0x1')]=null;}['init'](){const _0x233b96=this[_0x211c('0x4')][_0x211c('0xb')],_0x517ef1=this[_0x211c('0x2f')](),_0x48d490=this[_0x211c('0xd')][_0x211c('0x25')][_0x211c('0x26')](_0x211c('0x12'));this[_0x211c('0x1')]=new _0x44bded(this['editor']['locale'],_0x233b96,_0x517ef1),this[_0x211c('0x1')]['on'](_0x211c('0x9'),this[_0x211c('0x2e')][_0x211c('0x6')](this)),this[_0x211c('0x1')]['on'](_0x211c('0x19'),this[_0x211c('0x29')][_0x211c('0x6')](this)),this[_0x211c('0x1')][_0x211c('0x6')](_0x211c('0x8'))['to'](this[_0x211c('0x1c')]),this[_0x211c('0x1')][_0x211c('0x22')]['on']('add',(_0x5bd5c2,_0x580243)=>{_0x580243[_0x211c('0x11')]['on'](_0x211c('0x35'),(_0x40ab39,_0x31a6f3)=>{_0x31a6f3[_0x211c('0x6')]('isEnabled',_0x211c('0x30'))['to'](this[_0x211c('0x1c')]);});}),this[_0x211c('0x1')][_0x211c('0x20')](),this[_0x211c('0x33')](this[_0x211c('0xd')]['data'],_0x211c('0x27'),this['_handleEditorDataReady']['bind'](this)),this[_0x211c('0x33')](this[_0x211c('0x1c')],'change:diff',this['_handleDiffChange'][_0x211c('0x6')](this)),_0x48d490[_0x211c('0x1d')](this[_0x211c('0x1')]['element']);}[_0x211c('0x1b')](){this['_sidebarView']['element'][_0x211c('0x36')](),this[_0x211c('0x1')][_0x211c('0x1b')]();}[_0x211c('0xe')](){const _0x24daa8=this[_0x211c('0x4')]['getRevision'](0x0);if(_0x24daa8){const _0x3e1a7c=this[_0x211c('0x4')][_0x211c('0x18')](_0x24daa8['id']);this[_0x211c('0x1c')][_0x211c('0x21')](_0x24daa8,_0x3e1a7c);}}[_0x211c('0x2e')](_0x555fa3,_0xc09c1b){const _0xc7bc40=this[_0x211c('0x4')][_0x211c('0x0')](_0xc09c1b['id']),_0x228b96=this[_0x211c('0x4')][_0x211c('0x18')](_0xc7bc40['id']);this[_0x211c('0x1c')][_0x211c('0x21')](_0xc7bc40,_0x228b96);}['_handleRevisionSetName'](_0x533c6b,_0x2929ac){this['_revisionsRepository'][_0x211c('0x0')](_0x2929ac['id'])[_0x211c('0x2d')](_0x2929ac[_0x211c('0x23')]);}[_0x211c('0x28')](_0xf4ab89,_0x268202,_0x20ac6b){const _0x261dd5=this[_0x211c('0x4')][_0x211c('0x15')](_0x20ac6b);_0x261dd5[_0x211c('0xc')]>0x2?(this['_sidebarView'][_0x211c('0x31')](_0x261dd5),this[_0x211c('0x1')][_0x211c('0x32')](null)):(this[_0x211c('0x1')][_0x211c('0x31')]([]),this[_0x211c('0x1')][_0x211c('0x32')](_0x261dd5[0x0]));}[_0x211c('0x2f')](){const _0x46bfff=this[_0x211c('0xd')],_0x5ae4c9=R[_0x211c('0x7')],_0x14fa31=_0x46bfff['config'][_0x211c('0x26')]('revisionHistory.revisionActions')||R[_0x211c('0x17')];if(_0x14fa31[_0x211c('0xc')])return _0x14fa31[_0x211c('0xa')](_0x440675=>{const _0x16f48c=_0x211c('0xf')==typeof _0x440675?Object[_0x211c('0x1a')]({},_0x5ae4c9[_0x440675]):_0x440675;return _0x16f48c['action']=_0x16f48c[_0x211c('0x3')][_0x211c('0x6')](this,_0x46bfff),_0x16f48c[_0x211c('0x5')]&&(_0x16f48c[_0x211c('0x5')]=_0x16f48c[_0x211c('0x5')][_0x211c('0x6')](this,_0x46bfff)),_0x16f48c;});}}R[_0x211c('0x7')]={'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x5503dc},_0x3a3db1)=>{const _0x52c18d=_0x5503dc[_0x211c('0x26')](_0x18d6e7),_0xf3081c=_0x52c18d[_0x211c('0x16')];let _0x5c701a=_0x52c18d[_0x211c('0x34')]['newRevisionId'],_0x488f5a=_0x3a3db1['id'];_0xf3081c[_0x211c('0x13')](_0x5c701a)>_0xf3081c['getIndex'](_0x488f5a)&&([_0x5c701a,_0x488f5a]=[_0x488f5a,_0x5c701a]),_0x52c18d['compare'](_0x5c701a,_0x488f5a);},'isVisible':({plugins:_0x2953a8},_0x4adece)=>{const _0x5eeea6=_0x2953a8[_0x211c('0x26')](_0x18d6e7);return!(_0x5eeea6['repository'][_0x211c('0x15')](_0x5eeea6[_0x211c('0x34')])[_0x211c('0xc')]>0x2)&&!_0x4adece[_0x211c('0x14')];}},'restoreRevision':{'name':_0x211c('0x1e'),'action':(_0x5f0f79,{id:_0x44cf08})=>{_0x5f0f79[_0x211c('0x25')][_0x211c('0x26')]('revisionHistory')['restoreRevisionCallback'](_0x44cf08);},'isVisible':({plugins:_0x5d3604},_0xb78ec0)=>!!_0x5d3604[_0x211c('0x26')](_0x18d6e7)[_0x211c('0x16')][_0x211c('0x10')](_0xb78ec0['id'])},'nameRevision':{'name':_0x211c('0x2'),'action':({plugins:_0x25b66a},{id:_0x1b79b1,revisionNameView:_0x38d756})=>{const _0x31fe84=_0x25b66a['get'](_0x18d6e7),_0x570619=_0x31fe84['repository']['getEarlierVisibleRevision'](_0x1b79b1);_0x31fe84[_0x211c('0x21')](_0x1b79b1,_0x570619),_0x38d756[_0x211c('0x2a')](),_0x38d756['fieldView'][_0x211c('0x2c')]();}}},R[_0x211c('0x17')]=['compareAgainstSelected',_0x211c('0x1f'),'nameRevision'];
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x137a=['span','ck-reset_all','Revision\x20history','div','ck-revision-history-sidebar__header','setTemplate'];(function(_0x7fc206,_0x137ae0){const _0x1937f1=function(_0xc3c3f6){while(--_0xc3c3f6){_0x7fc206['push'](_0x7fc206['shift']());}};_0x1937f1(++_0x137ae0);}(_0x137a,0x85));const _0x1937=function(_0x7fc206,_0x137ae0){_0x7fc206=_0x7fc206-0x0;let _0x1937f1=_0x137a[_0x7fc206];return _0x1937f1;};import{View as _0x90e564,IconView as _0x3a1406}from'ckeditor5/src/ui';import{getTranslation as _0x24cb20}from'../../utils/common-translations';import _0xf08b1f from'../../../theme/icons/revision-history.svg';import'../../../theme/revisionssidebar/revisionssidebarheader.css';export default class ts extends _0x90e564{constructor(_0x1e6265){super(_0x1e6265);const _0x330fae=new _0x3a1406();_0x330fae['content']=_0xf08b1f,this[_0x1937('0x4')]({'tag':_0x1937('0x2'),'attributes':{'class':['ck',_0x1937('0x0'),_0x1937('0x3')]},'children':[_0x330fae,{'tag':_0x1937('0x5'),'attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[_0x24cb20(_0x1e6265,_0x1937('0x1'))]}]});}}
|
|
@@ -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 _0x4f2f=['add','remove','delegate','select','setTemplate','localizedPeriodName','setName','startDate','addRevision','revisionViews','uiLanguage','createCollection','_revisionActions','ck-revision-history-sidebar__time-period__label','ck-revision-history-sidebar__time-period','ck-revision-history-sidebar__time-period__revisions','locale','div'];(function(_0x19d0dd,_0x4f2f6e){const _0xbd01fc=function(_0xa7954a){while(--_0xa7954a){_0x19d0dd['push'](_0x19d0dd['shift']());}};_0xbd01fc(++_0x4f2f6e);}(_0x4f2f,0xd0));const _0xbd01=function(_0x19d0dd,_0x4f2f6e){_0x19d0dd=_0x19d0dd-0x0;let _0xbd01fc=_0x4f2f[_0x19d0dd];return _0xbd01fc;};import{View as _0x247924}from'ckeditor5/src/ui';import _0x1b3b40 from'../revision/revisionview';import{getDateTimePeriodInfo as _0x167278}from'./utils';import'../../../theme/revisionssidebar/revisionssidebartimeperiod.css';export default class ki extends _0x247924{constructor(_0x5ea9c2,_0x1820fa,_0xf1fea7){super(_0x5ea9c2);const _0x53aac1=_0x167278(_0x1820fa,this[_0xbd01('0x6')][_0xbd01('0x0')])[_0xbd01('0xd')];this[_0xbd01('0xf')]=_0x1820fa,this['revisionViews']=this[_0xbd01('0x1')](),this['_revisionActions']=_0xf1fea7,this[_0xbd01('0x11')][_0xbd01('0xa')](_0xbd01('0xb'))['to'](this),this[_0xbd01('0x11')][_0xbd01('0xa')](_0xbd01('0xe'))['to'](this),this[_0xbd01('0xc')]({'tag':_0xbd01('0x7'),'attributes':{'class':['ck',_0xbd01('0x4')]},'children':[{'tag':'span','attributes':{'class':['ck',_0xbd01('0x3')]},'children':[{'text':_0x53aac1}]},{'tag':'div','attributes':{'class':['ck',_0xbd01('0x5')]},'children':this[_0xbd01('0x11')]}]});}[_0xbd01('0x10')](_0x32a243){const _0x132dbd=new _0x1b3b40(this[_0xbd01('0x6')],_0x32a243,this[_0xbd01('0x2')]);this[_0xbd01('0x11')][_0xbd01('0x8')](_0x132dbd);}['removeRevision'](_0x442c77){const _0x5c8b1c=this['revisionViews']['find'](_0x397d47=>_0x397d47['id']===_0x442c77['id']);this['revisionViews'][_0xbd01('0x9')](_0x5c8b1c);}}
|
|
@@ -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 _0x1936=['map','createCollection','_getTimePeriodViewByStartDate','addRevision','div','ck-rounded-corners','uiLanguage','setTemplate','deselect','select','revisionViews','setName','unhighlight','fire','add','ck-disabled','find','delegate','startDate','getTime','_removeRevision','locale','get','isEnabled','removeRevision','ck-reset','ck-revision-history-sidebar__timeline','remove','timePeriodViews','revisionSetName','_addRevision','selectRevision','_revisionActions','highlightRevisions','render','createdAt','_revisions'];(function(_0x5a248a,_0x1936ef){const _0x3b7303=function(_0x32ff73){while(--_0x32ff73){_0x5a248a['push'](_0x5a248a['shift']());}};_0x3b7303(++_0x1936ef);}(_0x1936,0x1df));const _0x3b73=function(_0x5a248a,_0x1936ef){_0x5a248a=_0x5a248a-0x0;let _0x3b7303=_0x1936[_0x5a248a];return _0x3b7303;};import{View as _0x434d25}from'ckeditor5/src/ui';import _0x48a3c4 from'./revisionssidebartimeperiodview';import _0x481479 from'./revisionssidebarheaderview';import{getDateTimePeriodInfo as _0x322154}from'./utils';import'../../../theme/revisionssidebar/revisionssidebar.css';export default class vi extends _0x434d25{constructor(_0x57cba1,_0xa189e7,_0xd739c7){super(_0x57cba1);const _0x3bc606=this['bindTemplate'];this['timePeriodViews']=this[_0x3b73('0x3')](),this[_0x3b73('0x1e')]['delegate'](_0x3b73('0xb'))['to'](this),this[_0x3b73('0x1e')][_0x3b73('0x13')](_0x3b73('0xd'))['to'](this),this[_0x3b73('0x1')]=_0xa189e7,this[_0x3b73('0x22')]=_0xd739c7,this['on'](_0x3b73('0xb'),(_0xe655c2,_0x50c45e)=>{this[_0x3b73('0xf')]('revisionSelected',_0x50c45e);}),this['on']('setName',(_0x26bdfc,_0x3f549e)=>{this[_0x3b73('0xf')](_0x3b73('0x1f'),_0x3f549e);}),this['set'](_0x3b73('0x19'),!0x1),this[_0x3b73('0x9')]({'tag':_0x3b73('0x6'),'attributes':{'class':['ck',_0x3b73('0x1b'),_0x3b73('0x7'),'ck-revision-history-sidebar']},'children':[new _0x481479(_0x57cba1),{'tag':_0x3b73('0x6'),'attributes':{'class':['ck',_0x3b73('0x1c'),_0x3bc606['if'](_0x3b73('0x19'),_0x3b73('0x11'),_0x408fc0=>!_0x408fc0)]},'children':this[_0x3b73('0x1e')]}]});}[_0x3b73('0x24')](){super['render']();for(const _0x599718 of this['_revisions'])this[_0x3b73('0x20')](_0x599718);this[_0x3b73('0x1')]['on'](_0x3b73('0x10'),(_0x5c1ecd,_0x5f41d0)=>{this[_0x3b73('0x20')](_0x5f41d0);}),this[_0x3b73('0x1')]['on'](_0x3b73('0x1d'),(_0x405fc6,_0x3e1055)=>{this[_0x3b73('0x16')](_0x3e1055);});}get['revisionViews'](){return this[_0x3b73('0x1e')]['map'](_0x123ed0=>_0x123ed0['revisionViews'][_0x3b73('0x2')](_0x369ccc=>_0x369ccc))['flat']();}[_0x3b73('0x21')](_0xa6a69c){for(const _0x31dc99 of this[_0x3b73('0xc')])_0xa6a69c&&_0xa6a69c['id']===_0x31dc99['id']?_0x31dc99[_0x3b73('0xb')]():_0x31dc99[_0x3b73('0xa')]();}[_0x3b73('0x23')](_0x3e4aa2){for(const _0x2692e4 of this[_0x3b73('0xc')])_0x3e4aa2['some'](({id:_0x543e19})=>_0x543e19===_0x2692e4['id'])?_0x2692e4['highlight']():_0x2692e4[_0x3b73('0xe')]();}[_0x3b73('0x20')](_0x6f8f19){const _0x583dfd=_0x322154(_0x6f8f19[_0x3b73('0x0')],this['locale'][_0x3b73('0x8')])[_0x3b73('0x14')];let _0x11e0a0=this[_0x3b73('0x1e')][_0x3b73('0x18')](0x0);_0x11e0a0&&_0x11e0a0[_0x3b73('0x14')]['getTime']()===_0x583dfd['getTime']()||(_0x11e0a0=new _0x48a3c4(this[_0x3b73('0x17')],_0x583dfd,this[_0x3b73('0x22')]),this[_0x3b73('0x1e')][_0x3b73('0x10')](_0x11e0a0)),_0x11e0a0[_0x3b73('0x5')](_0x6f8f19);}['_removeRevision'](_0x460e15){const _0x2e6cb6=_0x322154(_0x460e15['createdAt'],this[_0x3b73('0x17')][_0x3b73('0x8')])[_0x3b73('0x14')];this[_0x3b73('0x4')](_0x2e6cb6)[_0x3b73('0x1a')](_0x460e15);}['_getTimePeriodViewByStartDate'](_0x13853){return this[_0x3b73('0x1e')][_0x3b73('0x12')](_0x5e8089=>_0x5e8089['startDate'][_0x3b73('0x15')]()===_0x13853['getTime']());}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x328e=['day','fromJSDate','setLocale','toRelativeCalendar','year','startOf','monthLong','week','hasSame','month','weekdayLong','toJSDate','local','minus'];(function(_0x51b9d7,_0x328e77){const _0xab8ec5=function(_0x4427b3){while(--_0x4427b3){_0x51b9d7['push'](_0x51b9d7['shift']());}};_0xab8ec5(++_0x328e77);}(_0x328e,0x1bb));const _0xab8e=function(_0x51b9d7,_0x328e77){_0x51b9d7=_0x51b9d7-0x0;let _0xab8ec5=_0x328e[_0x51b9d7];return _0xab8ec5;};import{DateTime as _0x20d4fe}from'luxon';export function getDateTimePeriodInfo(_0x19d9ef,_0x513645){const _0x110213=_0x20d4fe[_0xab8e('0x6')](_0x19d9ef)[_0xab8e('0x7')](_0x513645),_0x64c172=_0x20d4fe[_0xab8e('0x3')](),_0x325185=_0x64c172[_0xab8e('0x4')]({'days':0x1})[_0xab8e('0xa')](_0xab8e('0x5'));let _0xdcd184,_0x3cdb3b;return _0x110213[_0xab8e('0xd')](_0x64c172,_0xab8e('0x5'))?(_0xdcd184=_0x110213[_0xab8e('0xa')](_0xab8e('0x5'))[_0xab8e('0x2')](),_0x3cdb3b=_0x110213[_0xab8e('0x8')]()):_0x110213[_0xab8e('0xd')](_0x325185,_0xab8e('0x5'))?(_0xdcd184=_0x325185[_0xab8e('0x2')](),_0x3cdb3b=_0x110213[_0xab8e('0x8')]()):_0x110213[_0xab8e('0xd')](_0x64c172,_0xab8e('0xc'))?(_0xdcd184=_0x110213[_0xab8e('0xa')](_0xab8e('0xc'))[_0xab8e('0x2')](),_0x3cdb3b=_0x110213[_0xab8e('0x1')]||''):_0x110213[_0xab8e('0xd')](_0x64c172,_0xab8e('0x9'))?(_0xdcd184=_0x110213['startOf'](_0xab8e('0x0'))[_0xab8e('0x2')](),_0x3cdb3b=_0x110213[_0xab8e('0xb')]||''):(_0xdcd184=_0x110213[_0xab8e('0xa')](_0xab8e('0x9'))[_0xab8e('0x2')](),_0x3cdb3b=String(_0x110213['year'])),{'startDate':_0xdcd184,'localizedPeriodName':_0x3cdb3b};}
|
|
@@ -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 _0x5604=['add','setTemplate','Suggested\x20by','set','ck-revision-change__label','_model','changeId','isSuggestion','Added\x20by','span','Removed\x20by','type','ck-revision-change','focus'];(function(_0x99d189,_0x560444){const _0x1651dd=function(_0x27fe56){while(--_0x27fe56){_0x99d189['push'](_0x99d189['shift']());}};_0x1651dd(++_0x560444);}(_0x5604,0x8c));const _0x1651=function(_0x99d189,_0x560444){_0x99d189=_0x99d189-0x0;let _0x1651dd=_0x5604[_0x99d189];return _0x1651dd;};import{View as _0x1b457e}from'ckeditor5/src/ui';import{getTranslation as _0x326bb2}from'../../utils/common-translations';export default class G extends _0x1b457e{constructor(_0x5b9063,_0x5ace01){super(_0x5b9063),this[_0x1651('0x5')]=_0x5ace01,this[_0x1651('0x6')]=_0x5ace01['id'];const _0x5edb82=this['bindTemplate'],_0x3e758b=_0x326bb2(_0x5b9063,_0x5ace01['data'][_0x1651('0x7')]?_0x1651('0x2'):_0x1651('0x0')==_0x5ace01[_0x1651('0xb')]?_0x1651('0x8'):_0x1651('0xa'));this[_0x1651('0x3')](_0x1651('0xb'),_0x5ace01[_0x1651('0xb')]),this[_0x1651('0x1')]({'tag':'div','attributes':{'class':['ck-annotation',_0x1651('0xc'),_0x5edb82['to'](_0x1651('0xb'),_0x30ae4c=>'ck-revision-change__'+_0x30ae4c)],'tabindex':-0x1},'children':[{'tag':_0x1651('0x9'),'children':[{'tag':_0x1651('0x9'),'attributes':{'class':[_0x1651('0x4')]},'children':[{'text':_0x3e758b}]},{'text':'\x20'+_0x5ace01['author']['name']}]}]});}[_0x1651('0xd')](){this['element'][_0x1651('0xd')]();}}
|