@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.
Files changed (68) hide show
  1. package/build/revision-history.js +1 -1
  2. package/package.json +22 -7
  3. package/src/augmentation.d.ts +25 -0
  4. package/src/augmentation.js +23 -0
  5. package/src/changeitem.d.ts +52 -0
  6. package/src/changeitem.js +1 -1
  7. package/src/editor/revisionviewereditor.d.ts +27 -0
  8. package/src/editor/revisionviewereditor.js +1 -1
  9. package/src/editor/revisionviewereditorui.d.ts +28 -0
  10. package/src/editor/revisionviewereditorui.js +1 -1
  11. package/src/editor/revisionviewereditoruiview.d.ts +43 -0
  12. package/src/editor/revisionviewereditoruiview.js +1 -1
  13. package/src/index.d.ts +10 -0
  14. package/src/index.js +1 -1
  15. package/src/revision.d.ts +153 -0
  16. package/src/revision.js +1 -1
  17. package/src/revisiondiff.d.ts +19 -0
  18. package/src/revisiondiff.js +1 -1
  19. package/src/revisionhistory.d.ts +93 -0
  20. package/src/revisionhistory.js +1 -1
  21. package/src/revisionhistoryadapter.d.ts +60 -0
  22. package/src/revisionhistoryadapter.js +23 -0
  23. package/src/revisionhistoryconfig.d.ts +60 -0
  24. package/src/revisionhistoryconfig.js +23 -0
  25. package/src/revisionsrepository.d.ts +43 -0
  26. package/src/revisionsrepository.js +1 -1
  27. package/src/revisiontracker.d.ts +72 -0
  28. package/src/revisiontracker.js +1 -1
  29. package/src/revisionviewer.d.ts +21 -0
  30. package/src/revisionviewer.js +1 -1
  31. package/src/ui/revision/createrevisionactionsdropdown.d.ts +9 -0
  32. package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
  33. package/src/ui/revision/revisionauthorview.d.ts +4 -0
  34. package/src/ui/revision/revisionauthorview.js +1 -1
  35. package/src/ui/revision/revisionnameview.d.ts +4 -0
  36. package/src/ui/revision/revisionnameview.js +1 -1
  37. package/src/ui/revision/revisionview.d.ts +91 -0
  38. package/src/ui/revision/revisionview.js +1 -1
  39. package/src/ui/revision/subrevisioncollapserview.d.ts +17 -0
  40. package/src/ui/revision/subrevisioncollapserview.js +1 -1
  41. package/src/ui/revision/subrevisionview.d.ts +30 -0
  42. package/src/ui/revision/subrevisionview.js +1 -1
  43. package/src/ui/revision/utils.d.ts +4 -0
  44. package/src/ui/revision/utils.js +1 -1
  45. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.d.ts +80 -0
  46. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
  47. package/src/ui/revisionhistory/revisionhistoryui.d.ts +21 -0
  48. package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
  49. package/src/ui/revisionssidebar/revisionssidebar.d.ts +39 -0
  50. package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
  51. package/src/ui/revisionssidebar/revisionssidebarheaderview.d.ts +4 -0
  52. package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
  53. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.d.ts +25 -0
  54. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
  55. package/src/ui/revisionssidebar/revisionssidebarview.d.ts +40 -0
  56. package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
  57. package/src/ui/revisionssidebar/utils.d.ts +8 -0
  58. package/src/ui/revisionssidebar/utils.js +1 -1
  59. package/src/ui/revisionviewer/changedetailsview.d.ts +18 -0
  60. package/src/ui/revisionviewer/changedetailsview.js +1 -1
  61. package/src/ui/revisionviewer/changesnavigationview.d.ts +36 -0
  62. package/src/ui/revisionviewer/changesnavigationview.js +1 -1
  63. package/src/ui/revisionviewer/revisionviewerloadingoverlay.d.ts +22 -0
  64. package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
  65. package/src/ui/revisionviewer/revisionviewerui.d.ts +22 -0
  66. package/src/ui/revisionviewer/revisionviewerui.js +1 -1
  67. package/src/utils/common-translations.d.ts +7 -0
  68. 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 _0x2c85=['ck-revision-history-sidebar__revision__date','select','uiLanguage','set','bindTemplate','ck-revision-history-sidebar__subrevision','ck-revision-history-sidebar__revision_selected','bind','div','_createdAtFormatted','setTemplate','ck-reset','ck-revision-history-sidebar__revision','createdAt','ck-revision-history-sidebar__revision-authors','author','isSelected','_parentRevisionId'];(function(_0x2dba98,_0x2c852c){const _0xfaa5f1=function(_0x2ea551){while(--_0x2ea551){_0x2dba98['push'](_0x2dba98['shift']());}};_0xfaa5f1(++_0x2c852c);}(_0x2c85,0x124));const _0xfaa5=function(_0x2dba98,_0x2c852c){_0x2dba98=_0x2dba98-0x0;let _0xfaa5f1=_0x2c85[_0x2dba98];return _0xfaa5f1;};import{View as _0x43d0ba}from'ckeditor5/src/ui';import _0x5a2e41 from'./revisionauthorview';import{dateToPrettyFormat as _0xd7ad1f}from'./utils';import'../../../theme/revision/subrevision.css';export default class ct extends _0x43d0ba{constructor(_0x267a91,_0xf5f620,_0x27a3e8){super(_0x267a91);const _0x4c5a85=this[_0xfaa5('0x0')];this['id']=_0xf5f620['id'],this[_0xfaa5('0x3')](_0xfaa5('0x9'))['to'](_0xf5f620),this[_0xfaa5('0x11')](_0xfaa5('0xc'),!0x1),this[_0xfaa5('0x3')]('_createdAtFormatted')['to'](this,_0xfaa5('0x9'),_0x4a1ac7=>_0x4a1ac7?_0xd7ad1f(_0x267a91[_0xfaa5('0x10')],_0x4a1ac7):null),this['_parentRevisionId']=_0x27a3e8,this[_0xfaa5('0x6')]({'tag':_0xfaa5('0x4'),'attributes':{'class':['ck',_0xfaa5('0x7'),_0xfaa5('0x8'),_0xfaa5('0x1'),_0x4c5a85['if'](_0xfaa5('0xc'),_0xfaa5('0x2'))]},'children':[{'tag':'span','attributes':{'class':['ck',_0xfaa5('0xe')]},'children':[{'text':_0x4c5a85['to'](_0xfaa5('0x5'))}]},{'tag':'ul','attributes':{'class':['ck',_0xfaa5('0xa')]},'children':[new _0x5a2e41(_0x267a91,_0xf5f620[_0xfaa5('0xb')],!0x0)]}],'on':{'click':_0x4c5a85['to'](this['select'][_0xfaa5('0x3')](this))}});}[_0xfaa5('0xf')](){this[_0xfaa5('0xc')]=!0x0,this['fire']('select',{'parentId':this[_0xfaa5('0xd')]});}['deselect'](){this[_0xfaa5('0xc')]=!0x1;}}
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;}}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @module revision-history/ui/revision/utils
3
+ */
4
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x3c94=['toLocaleDateString','numeric'];(function(_0x37a138,_0x3c9436){var _0x182e7c=function(_0x4a7abb){while(--_0x4a7abb){_0x37a138['push'](_0x37a138['shift']());}};_0x182e7c(++_0x3c9436);}(_0x3c94,0x14d));var _0x182e=function(_0x37a138,_0x3c9436){_0x37a138=_0x37a138-0x0;var _0x182e7c=_0x3c94[_0x37a138];return _0x182e7c;};export function dateToPrettyFormat(_0x42df81,_0x404ef2){return _0x404ef2[_0x182e('0x1')](_0x42df81,{'month':'long','day':_0x182e('0x0')})+',\x20'+_0x404ef2['toLocaleTimeString'](_0x42df81,{'hour':_0x182e('0x0'),'minute':_0x182e('0x0')});}
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 _0x55df=['submit','arrowdown','cancel','revisionNameInputValue','selectstart','fieldView','arrowright','_createButton','ck-button-cancel','add','render','locale','Save','ck-responsive-form','type','shift\x20+\x20tab','listenTo','_createRevisionNameInput','stopPropagation','set','high','Cancel','revisionName','arrowleft','ck-button-save','extendTemplate','input','saveButtonView','delegate','element','_focusCycler','label','tab','form','trim','focusFirst','_focusables','Name\x20of\x20the\x20revision\x20(optional)','focusTracker','ck-revision-history-save-revision-form','execute','forEach','keystrokes','cancelButtonView','220','value','revisionNameInputView'];(function(_0x3b4616,_0x55df97){const _0x2cc5f5=function(_0x2680d6){while(--_0x2680d6){_0x3b4616['push'](_0x3b4616['shift']());}};_0x2cc5f5(++_0x55df97);}(_0x55df,0x15d));const _0x2cc5=function(_0x3b4616,_0x55df97){_0x3b4616=_0x3b4616-0x0;let _0x2cc5f5=_0x55df[_0x3b4616];return _0x2cc5f5;};import{ButtonView as _0x33d52d,FocusCycler as _0x129a5a,LabeledFieldView as _0x2fb456,View as _0x30ffdf,ViewCollection as _0xb69772,createLabeledInputText as _0x2b43ea,injectCssTransitionDisabler as _0x353a7c,submitHandler as _0x2750b1}from'ckeditor5/src/ui';import{FocusTracker as _0x44c242,KeystrokeHandler as _0x4140f4}from'ckeditor5/src/utils';import{getTranslation as _0x32ef61}from'../../utils/common-translations';import _0x56fe21 from'@ckeditor/ckeditor5-core/theme/icons/check.svg';import _0x590950 from'@ckeditor/ckeditor5-core/theme/icons/cancel.svg';import'../../../theme/revisionhistorysaverevisionform.css';import'@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';export default class dt extends _0x30ffdf{constructor(_0x3ac449){super(_0x3ac449),this[_0x2cc5('0x12')]=new _0x44c242(),this['keystrokes']=new _0x4140f4(),this[_0x2cc5('0x2e')]('revisionNameInputValue',''),this['revisionNameInputView']=this[_0x2cc5('0x2c')](),this[_0x2cc5('0x7')]=this['_createButton'](_0x32ef61(_0x3ac449,_0x2cc5('0x27')),_0x56fe21,_0x2cc5('0x4')),this[_0x2cc5('0x7')][_0x2cc5('0x29')]=_0x2cc5('0x1b'),this[_0x2cc5('0x17')]=this[_0x2cc5('0x22')](_0x32ef61(_0x3ac449,_0x2cc5('0x1')),_0x590950,_0x2cc5('0x23'),_0x2cc5('0x1d')),this[_0x2cc5('0x10')]=new _0xb69772(),this[_0x2cc5('0xa')]=new _0x129a5a({'focusables':this['_focusables'],'focusTracker':this[_0x2cc5('0x12')],'keystrokeHandler':this[_0x2cc5('0x16')],'actions':{'focusPrevious':_0x2cc5('0x2a'),'focusNext':_0x2cc5('0xc')}}),this['setTemplate']({'tag':_0x2cc5('0xd'),'attributes':{'class':['ck',_0x2cc5('0x13'),_0x2cc5('0x28')],'tabindex':'-1'},'children':[this[_0x2cc5('0x1a')],this[_0x2cc5('0x7')],this[_0x2cc5('0x17')]]}),_0x353a7c(this);}[_0x2cc5('0x25')](){super[_0x2cc5('0x25')](),_0x2750b1({'view':this}),([this[_0x2cc5('0x1a')],this[_0x2cc5('0x7')],this['cancelButtonView']][_0x2cc5('0x15')](_0x2278af=>{this[_0x2cc5('0x10')][_0x2cc5('0x24')](_0x2278af),this[_0x2cc5('0x12')]['add'](_0x2278af[_0x2cc5('0x9')]);}),this[_0x2cc5('0x16')][_0x2cc5('0x2b')](this[_0x2cc5('0x9')]));const _0x7cf628=_0x1f704c=>_0x1f704c[_0x2cc5('0x2d')]();this[_0x2cc5('0x16')][_0x2cc5('0x2e')](_0x2cc5('0x21'),_0x7cf628),this['keystrokes'][_0x2cc5('0x2e')](_0x2cc5('0x3'),_0x7cf628),this[_0x2cc5('0x16')]['set']('arrowup',_0x7cf628),this[_0x2cc5('0x16')][_0x2cc5('0x2e')](_0x2cc5('0x1c'),_0x7cf628),this[_0x2cc5('0x2b')](this[_0x2cc5('0x1a')]['element'],_0x2cc5('0x1f'),(_0x271e31,_0x565b6c)=>{_0x565b6c[_0x2cc5('0x2d')]();},{'priority':_0x2cc5('0x0')});}['focus'](){this[_0x2cc5('0xa')][_0x2cc5('0xf')]();}get[_0x2cc5('0x2')](){return this[_0x2cc5('0x1a')]['fieldView']['element'][_0x2cc5('0x19')][_0x2cc5('0xe')]();}set[_0x2cc5('0x2')](_0x57a816){this[_0x2cc5('0x1a')][_0x2cc5('0x20')][_0x2cc5('0x9')]['value']=_0x57a816[_0x2cc5('0xe')]();}['reset'](){this[_0x2cc5('0x1a')][_0x2cc5('0x20')][_0x2cc5('0x9')][_0x2cc5('0x19')]='';}[_0x2cc5('0x2c')](){const _0x3abd60=new _0x2fb456(this[_0x2cc5('0x26')],_0x2b43ea),_0x15f68d=_0x3abd60[_0x2cc5('0x20')];return _0x15f68d[_0x2cc5('0x5')]({'attributes':{'maxlength':_0x2cc5('0x18')}}),_0x3abd60[_0x2cc5('0xb')]=_0x32ef61(this[_0x2cc5('0x26')],_0x2cc5('0x11')),_0x15f68d['on'](_0x2cc5('0x6'),()=>{this[_0x2cc5('0x1e')]=_0x15f68d[_0x2cc5('0x9')][_0x2cc5('0x19')][_0x2cc5('0xe')]();}),_0x3abd60;}[_0x2cc5('0x22')](_0x10eaea,_0x26974c,_0x5ce8c1,_0x2af1c4){const _0x216383=new _0x33d52d(this[_0x2cc5('0x26')]);return _0x216383[_0x2cc5('0x2e')]({'label':_0x10eaea,'icon':_0x26974c,'tooltip':!0x0}),_0x216383[_0x2cc5('0x5')]({'attributes':{'class':_0x5ce8c1}}),_0x2af1c4&&_0x216383[_0x2cc5('0x8')](_0x2cc5('0x14'))['to'](this,_0x2af1c4),_0x216383;}}
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 _0x58e3=['isReadOnly','get','saveRevision','Open\x20revision\x20history','saveButtonView','remove','execute','render','editor','buttonView','addMany','isReady','set','revisionName','RevisionHistoryUI','RevisionTracker','pluginName','Revision\x20history','editing','isEnabled','bind','focus','length','add','showRevisionViewerCallback','Save\x20current\x20revision','revisionHistory','reset','config','children','change:isOpen','cancel','panelView','plugins','requires'];(function(_0x540f77,_0x58e339){const _0x26e883=function(_0x5a47e3){while(--_0x5a47e3){_0x540f77['push'](_0x540f77['shift']());}};_0x26e883(++_0x58e339);}(_0x58e3,0x1c5));const _0x26e8=function(_0x540f77,_0x58e339){_0x540f77=_0x540f77-0x0;let _0x26e883=_0x58e3[_0x540f77];return _0x26e883;};import{Plugin as _0x42cdf7}from'ckeditor5/src/core';import{ListView as _0x3cb7a4,ListItemView as _0x2f9164,ButtonView as _0x69f620,createDropdown as _0x17a338}from'ckeditor5/src/ui';import _0x39d076 from'../../revisiontracker';import _0x199ae9 from'./revisionhistorysaverevisionformview';import _0x187752 from'../../../theme/icons/revision-history.svg';import{getTranslation as _0x5a63c6}from'../../utils/common-translations';export default class y extends _0x42cdf7{static get[_0x26e8('0x12')](){return _0x26e8('0x10');}static get[_0x26e8('0x1')](){return[_0x39d076];}['init'](){const _0x5c2ef8=this[_0x26e8('0xa')],_0x131222=_0x5c2ef8['plugins'][_0x26e8('0x3')](_0x26e8('0x11'));_0x5c2ef8['ui']['componentFactory'][_0x26e8('0x19')]('revisionHistory',_0x461e59=>{const _0x4bf5bd=_0x17a338(_0x461e59),_0x5e0471=_0x4bf5bd[_0x26e8('0x22')][_0x26e8('0x1f')],_0x15f9cf=new _0x3cb7a4(_0x461e59),_0x384e87=new _0x2f9164(_0x461e59),_0x172dd3=new _0x69f620(_0x461e59),_0x28f315=new _0x2f9164(_0x461e59),_0x1af138=new _0x69f620(_0x461e59),_0x30e742=new _0x199ae9(_0x461e59);function _0x31d83e(){_0x5e0471['length']&&_0x5e0471[_0x26e8('0x7')](0x0),_0x5e0471[_0x26e8('0x19')](_0x15f9cf);}function _0x36dab1(){_0x4bf5bd['isOpen']=!0x1,_0x5c2ef8[_0x26e8('0x14')]['view'][_0x26e8('0x17')]();}return _0x4bf5bd[_0x26e8('0x16')](_0x26e8('0x15'))['to'](_0x131222,_0x26e8('0xd'),_0x131222,_0x26e8('0x15'),_0x5c2ef8,_0x26e8('0x2'),(_0xc9cfdf,_0x4e8aed,_0x2e3718)=>_0xc9cfdf&&_0x4e8aed&&!_0x2e3718),_0x4bf5bd[_0x26e8('0xb')][_0x26e8('0xe')]({'icon':_0x187752,'label':_0x5a63c6(_0x461e59,_0x26e8('0x13')),'tooltip':!0x0}),_0x172dd3[_0x26e8('0xe')]({'label':_0x5a63c6(_0x461e59,_0x26e8('0x1b')),'withText':!0x0}),_0x172dd3[_0x26e8('0x16')](_0x26e8('0x15'))['to'](_0x131222,_0x26e8('0xd'),_0x131222,_0x26e8('0x15'),_0x5c2ef8,_0x26e8('0x2'),(_0x2a8be0,_0x11169f,_0x594fa8)=>_0x2a8be0&&_0x11169f&&!_0x594fa8),_0x172dd3['on'](_0x26e8('0x8'),()=>function(){_0x5e0471[_0x26e8('0x18')]&&_0x5e0471[_0x26e8('0x7')](0x0),(_0x30e742[_0x26e8('0x1d')](),_0x5e0471['add'](_0x30e742),_0x30e742[_0x26e8('0x17')]());}()),_0x1af138[_0x26e8('0xe')]({'label':_0x5a63c6(_0x461e59,_0x26e8('0x5')),'withText':!0x0}),_0x1af138[_0x26e8('0x16')](_0x26e8('0x15'))['to'](_0x131222,_0x26e8('0xd'),_0x5c2ef8,_0x26e8('0x2'),(_0x26c16b,_0x1174bb)=>_0x26c16b&&!_0x1174bb),_0x1af138['on']('execute',()=>{_0x5c2ef8[_0x26e8('0x1e')]['get'](_0x26e8('0x1c'))[_0x26e8('0x1a')](),_0x36dab1();}),_0x384e87['children'][_0x26e8('0x19')](_0x172dd3),_0x28f315[_0x26e8('0x1f')]['add'](_0x1af138),_0x15f9cf['items'][_0x26e8('0xc')]([_0x384e87,_0x28f315]),_0x4bf5bd['on'](_0x26e8('0x20'),()=>_0x31d83e()),_0x30e742[_0x26e8('0x6')][_0x26e8('0x16')](_0x26e8('0x15'))['to'](_0x131222,_0x26e8('0xd'),_0x131222,'isEnabled',_0x5c2ef8,'isReadOnly',(_0x1bd80a,_0x394df6,_0xef6066)=>_0x1bd80a&&_0x394df6&&!_0xef6066),_0x30e742['on']('submit',()=>(_0x5c2ef8[_0x26e8('0x0')][_0x26e8('0x3')](_0x39d076)[_0x26e8('0x4')]({'name':_0x30e742[_0x26e8('0xf')]}),void _0x36dab1())),_0x30e742['on'](_0x26e8('0x21'),()=>_0x31d83e()),_0x30e742[_0x26e8('0x9')](),_0x31d83e(),_0x4bf5bd;});}}
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 _0x34ee=['revisionHistory','availableRevisionActions','newRevisionId','_revisionViewer','destroy','add','string','_handleRevisionSetName','change:diff','bind','_revisions','restoreRevision','Compare\x20against\x20selected','getRevisionsInDiff','name','listenTo','revisionSelected','_handleEditorDataReady','repository','getRevision','plugins','length','revisionHistory.viewerSidebarContainer','nameRevision','editor','restoreRevisionCallback','render','getEarlierVisibleRevision','config','diff','locale','timePeriodViews','compare','compareAgainstSelected','select','map','highlightRevisions','focus','remove','RevisionsSidebar','_handleRevisionSelected','getIndex','appendChild','ready','revisionViews','getLaterVisibleRevision','Name\x20this\x20revision','_revisionsRepository','_sidebarView','pluginName','element','requires','selectRevision','defaultRevisionActions','assign','action','get','isVisible','_handleDiffChange','revisionHistory.revisionActions','data'];(function(_0x4eb51c,_0x34eeef){const _0x4d8238=function(_0x26a4dc){while(--_0x26a4dc){_0x4eb51c['push'](_0x4eb51c['shift']());}};_0x4d8238(++_0x34eeef);}(_0x34ee,0x1ae));const _0x4d82=function(_0x4eb51c,_0x34eeef){_0x4eb51c=_0x4eb51c-0x0;let _0x4d8238=_0x34ee[_0x4eb51c];return _0x4d8238;};import{Plugin as _0x5d069d}from'ckeditor5/src/core';import _0x55a433 from'./revisionssidebarview';import _0x4eb6fd from'../../revisionviewer';export default class d extends _0x5d069d{static get[_0x4d82('0x2e')](){return _0x4d82('0x24');}static get[_0x4d82('0x30')](){return[_0x4eb6fd];}constructor(_0x15a5fc){super(_0x15a5fc),this[_0x4d82('0x0')]=_0x15a5fc[_0x4d82('0x11')][_0x4d82('0x35')](_0x4eb6fd),this['_revisionsRepository']=this[_0x4d82('0x0')][_0x4d82('0xf')],this[_0x4d82('0x2d')]=null;}['init'](){const _0x308dd1=this[_0x4d82('0x2c')][_0x4d82('0x7')],_0x459123=this['_createRevisionActions'](),_0x1d25e0=this[_0x4d82('0x15')][_0x4d82('0x19')]['get'](_0x4d82('0x13'));this[_0x4d82('0x2d')]=new _0x55a433(this['editor'][_0x4d82('0x1b')],_0x308dd1,_0x459123),this[_0x4d82('0x2d')]['on'](_0x4d82('0xd'),this[_0x4d82('0x25')][_0x4d82('0x6')](this)),this[_0x4d82('0x2d')]['on']('revisionSetName',this[_0x4d82('0x4')]['bind'](this)),this[_0x4d82('0x2d')][_0x4d82('0x6')]('isEnabled')['to'](this['_revisionViewer']),this[_0x4d82('0x2d')][_0x4d82('0x1c')]['on'](_0x4d82('0x2'),(_0x14d7f5,_0x112e0d)=>{_0x112e0d[_0x4d82('0x29')]['on'](_0x4d82('0x2'),(_0x2d3ae6,_0x2fb77e)=>{_0x2fb77e[_0x4d82('0x6')]('isEnabled','isReady')['to'](this[_0x4d82('0x0')]);});}),this[_0x4d82('0x2d')][_0x4d82('0x17')](),this[_0x4d82('0xc')](this['editor'][_0x4d82('0x39')],_0x4d82('0x28'),this[_0x4d82('0xe')]['bind'](this)),this[_0x4d82('0xc')](this[_0x4d82('0x0')],_0x4d82('0x5'),this[_0x4d82('0x37')][_0x4d82('0x6')](this)),_0x1d25e0[_0x4d82('0x27')](this['_sidebarView'][_0x4d82('0x2f')]);}[_0x4d82('0x1')](){this[_0x4d82('0x2d')][_0x4d82('0x2f')][_0x4d82('0x23')](),this['_sidebarView'][_0x4d82('0x1')]();}['_handleEditorDataReady'](){const _0x1e3ca1=this[_0x4d82('0x2c')][_0x4d82('0x10')](0x0);if(_0x1e3ca1){const _0x5653eb=this[_0x4d82('0x2c')]['getEarlierVisibleRevision'](_0x1e3ca1['id']);this[_0x4d82('0x0')]['compare'](_0x1e3ca1,_0x5653eb);}}[_0x4d82('0x25')](_0x58f9b7,_0x1c51ce){const _0x24e4be=this['_revisionsRepository']['getRevision'](_0x1c51ce['id']),_0x24f87c=this[_0x4d82('0x2c')][_0x4d82('0x18')](_0x24e4be['id']);this[_0x4d82('0x0')]['compare'](_0x24e4be,_0x24f87c);}[_0x4d82('0x4')](_0x45726b,_0x13d859){this['_revisionsRepository'][_0x4d82('0x10')](_0x13d859['id'])['setName'](_0x13d859[_0x4d82('0xb')]);}['_handleDiffChange'](_0x2482ae,_0x1bc312,_0x4cc72a){const _0x18c378=this['_revisionsRepository'][_0x4d82('0xa')](_0x4cc72a);_0x18c378[_0x4d82('0x12')]>0x2?(this['_sidebarView'][_0x4d82('0x21')](_0x18c378),this[_0x4d82('0x2d')][_0x4d82('0x31')](null)):(this[_0x4d82('0x2d')][_0x4d82('0x21')]([]),this[_0x4d82('0x2d')][_0x4d82('0x31')](_0x18c378[0x0]));}['_createRevisionActions'](){const _0xb9370d=this[_0x4d82('0x15')],_0x184f34=d['availableRevisionActions'],_0xaa6093=_0xb9370d[_0x4d82('0x19')]['get'](_0x4d82('0x38'))||d[_0x4d82('0x32')];if(_0xaa6093[_0x4d82('0x12')])return _0xaa6093[_0x4d82('0x20')](_0x3fe76a=>{const _0x57ff31=_0x4d82('0x3')==typeof _0x3fe76a?Object[_0x4d82('0x33')]({},_0x184f34[_0x3fe76a]):_0x3fe76a;return _0x57ff31['action']=_0x57ff31[_0x4d82('0x34')][_0x4d82('0x6')](this,_0xb9370d),_0x57ff31[_0x4d82('0x36')]&&(_0x57ff31[_0x4d82('0x36')]=_0x57ff31[_0x4d82('0x36')][_0x4d82('0x6')](this,_0xb9370d)),_0x57ff31;});}}d[_0x4d82('0x3b')]={'compareAgainstSelected':{'name':_0x4d82('0x9'),'action':({plugins:_0x5708f4},_0x315301)=>{const _0x3fed28=_0x5708f4[_0x4d82('0x35')](_0x4eb6fd),_0x5cc641=_0x3fed28[_0x4d82('0xf')];let _0x14df0d=_0x3fed28[_0x4d82('0x1a')][_0x4d82('0x3c')],_0x701d50=_0x315301['id'];_0x5cc641[_0x4d82('0x26')](_0x14df0d)>_0x5cc641[_0x4d82('0x26')](_0x701d50)&&([_0x14df0d,_0x701d50]=[_0x701d50,_0x14df0d]),_0x3fed28[_0x4d82('0x1d')](_0x14df0d,_0x701d50);},'isVisible':({plugins:_0x1143a7},_0x388513)=>{const _0x28bc14=_0x1143a7[_0x4d82('0x35')](_0x4eb6fd);return!(_0x28bc14['repository'][_0x4d82('0xa')](_0x28bc14[_0x4d82('0x1a')])['length']>0x2)&&!_0x388513['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x4fc4d3,{id:_0x194988})=>{_0x4fc4d3[_0x4d82('0x19')][_0x4d82('0x35')](_0x4d82('0x3a'))[_0x4d82('0x16')](_0x194988);},'isVisible':({plugins:_0x1205bf},_0x2270b8)=>!!_0x1205bf['get'](_0x4eb6fd)[_0x4d82('0xf')][_0x4d82('0x2a')](_0x2270b8['id'])},'nameRevision':{'name':_0x4d82('0x2b'),'action':({plugins:_0x177d69},{id:_0x5f1b76,revisionNameView:_0x3af150})=>{const _0xbce4de=_0x177d69['get'](_0x4eb6fd),_0x5d1750=_0xbce4de[_0x4d82('0xf')]['getEarlierVisibleRevision'](_0x5f1b76);_0xbce4de[_0x4d82('0x1d')](_0x5f1b76,_0x5d1750),_0x3af150[_0x4d82('0x22')](),_0x3af150['fieldView'][_0x4d82('0x1f')]();}}},d[_0x4d82('0x32')]=[_0x4d82('0x1e'),_0x4d82('0x8'),_0x4d82('0x14')];
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')];
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @module revision-history/ui/revisionsidebar/revisionsidebarheaderview
3
+ */
4
+ import '../../../theme/revisionssidebar/revisionssidebarheader.css';
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5216=['ck-revision-history-sidebar__header','span','Revision\x20history','div','setTemplate','content'];(function(_0x49e62a,_0x521642){const _0x547f61=function(_0x1eca82){while(--_0x1eca82){_0x49e62a['push'](_0x49e62a['shift']());}};_0x547f61(++_0x521642);}(_0x5216,0x19a));const _0x547f=function(_0x49e62a,_0x521642){_0x49e62a=_0x49e62a-0x0;let _0x547f61=_0x5216[_0x49e62a];return _0x547f61;};import{View as _0x3de0e7,IconView as _0x48e6ae}from'ckeditor5/src/ui';import{getTranslation as _0x1972b4}from'../../utils/common-translations';import _0x35a293 from'../../../theme/icons/revision-history.svg';import'../../../theme/revisionssidebar/revisionssidebarheader.css';export default class cs extends _0x3de0e7{constructor(_0x4d0df0){super(_0x4d0df0);const _0x23daaf=new _0x48e6ae(_0x4d0df0);_0x23daaf[_0x547f('0x3')]=_0x35a293,this[_0x547f('0x2')]({'tag':_0x547f('0x1'),'attributes':{'class':['ck','ck-reset_all',_0x547f('0x4')]},'children':[_0x23daaf,{'tag':_0x547f('0x5'),'attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[_0x1972b4(_0x4d0df0,_0x547f('0x0'))]}]});}}
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 _0xdd87=['localizedPeriodName','startDate','removeRevision','div','setName','createCollection','locale','select','ck-revision-history-sidebar__time-period','add','ck-revision-history-sidebar__time-period__label','_revisionActions','revisionViews','delegate','span','addRevision','setTemplate'];(function(_0x1953b3,_0xdd87a2){const _0x470c53=function(_0x36f2e6){while(--_0x36f2e6){_0x1953b3['push'](_0x1953b3['shift']());}};_0x470c53(++_0xdd87a2);}(_0xdd87,0xce));const _0x470c=function(_0x1953b3,_0xdd87a2){_0x1953b3=_0x1953b3-0x0;let _0x470c53=_0xdd87[_0x1953b3];return _0x470c53;};import{View as _0x471899}from'ckeditor5/src/ui';import _0x56387c from'../revision/revisionview';import{getDateTimePeriodInfo as _0x35f93d}from'./utils';import'../../../theme/revisionssidebar/revisionssidebartimeperiod.css';export default class pi extends _0x471899{constructor(_0x59ef97,_0x683934,_0x4d92ad){super(_0x59ef97);const _0x1faaff=_0x35f93d(_0x683934,this['locale']['uiLanguage'])[_0x470c('0xf')];this[_0x470c('0x10')]=_0x683934,this[_0x470c('0x9')]=_0x4d92ad,this[_0x470c('0xa')]=this[_0x470c('0x3')](),this[_0x470c('0xa')][_0x470c('0xb')](_0x470c('0x5'))['to'](this),this[_0x470c('0xa')][_0x470c('0xb')](_0x470c('0x2'))['to'](this),this[_0x470c('0xe')]({'tag':_0x470c('0x1'),'attributes':{'class':['ck',_0x470c('0x6')]},'children':[{'tag':_0x470c('0xc'),'attributes':{'class':['ck',_0x470c('0x8')]},'children':[{'text':_0x1faaff}]},{'tag':_0x470c('0x1'),'attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this[_0x470c('0xa')]}]});}[_0x470c('0xd')](_0x42aa5e){const _0x48efa8=new _0x56387c(this[_0x470c('0x4')],_0x42aa5e,this[_0x470c('0x9')]);this[_0x470c('0xa')][_0x470c('0x7')](_0x48efa8);}[_0x470c('0x0')](_0x48f7bc){const _0x3ebd65=this['revisionViews']['find'](_0x539570=>_0x539570['id']===_0x48f7bc['id']);this[_0x470c('0xa')]['remove'](_0x3ebd65);}}
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 _0x5f37=['createCollection','add','revisionSelected','unhighlight','some','revisionSetName','remove','delegate','_revisions','_revisionActions','deselect','select','set','fire','render','startDate','bindTemplate','isEnabled','get','setName','ck-revision-history-sidebar__timeline','setTemplate','_removeRevision','_getTimePeriodViewByStartDate','ck-revision-history-sidebar','timePeriodViews','removeRevision','createdAt','getTime','div','revisionViews','ck-disabled','_addRevision','map'];(function(_0x4b5acd,_0x5f37b4){const _0x2de4ea=function(_0xc1329a){while(--_0xc1329a){_0x4b5acd['push'](_0x4b5acd['shift']());}};_0x2de4ea(++_0x5f37b4);}(_0x5f37,0x1a0));const _0x2de4=function(_0x4b5acd,_0x5f37b4){_0x4b5acd=_0x4b5acd-0x0;let _0x2de4ea=_0x5f37[_0x4b5acd];return _0x2de4ea;};import{View as _0x432b3d}from'ckeditor5/src/ui';import _0x2957de from'./revisionssidebartimeperiodview';import _0x4de5bb from'./revisionssidebarheaderview';import{getDateTimePeriodInfo as _0x2ce42f}from'./utils';import'../../../theme/revisionssidebar/revisionssidebar.css';export default class vi extends _0x432b3d{constructor(_0x2b3dff,_0x16bc74,_0x8743d1){super(_0x2b3dff);const _0x390c68=this[_0x2de4('0x8')];this[_0x2de4('0x11')]=this[_0x2de4('0x1a')](),this[_0x2de4('0x11')][_0x2de4('0x21')](_0x2de4('0x3'))['to'](this),this[_0x2de4('0x11')]['delegate']('setName')['to'](this),this['_revisions']=_0x16bc74,this['_revisionActions']=_0x8743d1,this['on'](_0x2de4('0x3'),(_0x358784,_0x1773e2)=>{this[_0x2de4('0x5')](_0x2de4('0x1c'),_0x1773e2);}),this['on'](_0x2de4('0xb'),(_0x33d041,_0x1cd940)=>{this[_0x2de4('0x5')](_0x2de4('0x1f'),_0x1cd940);}),this[_0x2de4('0x4')](_0x2de4('0x9'),!0x1),this[_0x2de4('0xd')]({'tag':_0x2de4('0x15'),'attributes':{'class':['ck','ck-reset','ck-rounded-corners',_0x2de4('0x10')]},'children':[new _0x4de5bb(_0x2b3dff),{'tag':_0x2de4('0x15'),'attributes':{'class':['ck',_0x2de4('0xc'),_0x390c68['if'](_0x2de4('0x9'),_0x2de4('0x17'),_0x5acc9a=>!_0x5acc9a)]},'children':this['timePeriodViews']}]});}[_0x2de4('0x6')](){super[_0x2de4('0x6')]();for(const _0x28114d of this[_0x2de4('0x0')])this[_0x2de4('0x18')](_0x28114d);this[_0x2de4('0x0')]['on'](_0x2de4('0x1b'),(_0x10b486,_0x109b60)=>{this['_addRevision'](_0x109b60);}),this[_0x2de4('0x0')]['on'](_0x2de4('0x20'),(_0x403115,_0xcdec17)=>{this['_removeRevision'](_0xcdec17);});}get[_0x2de4('0x16')](){return this[_0x2de4('0x11')]['map'](_0x305f72=>_0x305f72[_0x2de4('0x16')][_0x2de4('0x19')](_0x36c109=>_0x36c109))['flat']();}['selectRevision'](_0x31bf4e){for(const _0x57de4d of this['revisionViews'])_0x31bf4e&&_0x31bf4e['id']===_0x57de4d['id']?_0x57de4d[_0x2de4('0x3')]():_0x57de4d[_0x2de4('0x2')]();}['highlightRevisions'](_0x374f41){for(const _0x2ac8d9 of this['revisionViews'])_0x374f41[_0x2de4('0x1e')](({id:_0x5771da})=>_0x5771da===_0x2ac8d9['id'])?_0x2ac8d9['highlight']():_0x2ac8d9[_0x2de4('0x1d')]();}[_0x2de4('0x18')](_0x21a521){const _0x5a8e52=_0x2ce42f(_0x21a521[_0x2de4('0x13')])[_0x2de4('0x7')];let _0x2a14fb=this[_0x2de4('0x11')][_0x2de4('0xa')](0x0);_0x2a14fb&&_0x2a14fb[_0x2de4('0x7')][_0x2de4('0x14')]()===_0x5a8e52[_0x2de4('0x14')]()||(_0x2a14fb=new _0x2957de(this['locale'],_0x5a8e52,this[_0x2de4('0x1')]),this['timePeriodViews'][_0x2de4('0x1b')](_0x2a14fb)),_0x2a14fb['addRevision'](_0x21a521);}[_0x2de4('0xe')](_0x5da8c8){const _0x377091=_0x2ce42f(_0x5da8c8[_0x2de4('0x13')])[_0x2de4('0x7')];this['_getTimePeriodViewByStartDate'](_0x377091)[_0x2de4('0x12')](_0x5da8c8);}[_0x2de4('0xf')](_0x5902e8){return this[_0x2de4('0x11')]['find'](_0x147aad=>_0x147aad[_0x2de4('0x7')][_0x2de4('0x14')]()===_0x5902e8[_0x2de4('0x14')]());}}
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']());}}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @module revision-history/ui/revisionsidebar/utils
3
+ */
4
+ export declare function getDateTimePeriodInfo(jsDate: Date, locale: string): DateTimePeriod;
5
+ export interface DateTimePeriod {
6
+ startDate: Date;
7
+ localizedPeriodName: string;
8
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x19da=['week','local','toJSDate','startOf','day','year','weekdayLong','toRelativeCalendar','monthLong','hasSame'];(function(_0x50487f,_0x19dad6){const _0x49c888=function(_0x33d965){while(--_0x33d965){_0x50487f['push'](_0x50487f['shift']());}};_0x49c888(++_0x19dad6);}(_0x19da,0x1b5));const _0x49c8=function(_0x50487f,_0x19dad6){_0x50487f=_0x50487f-0x0;let _0x49c888=_0x19da[_0x50487f];return _0x49c888;};import{DateTime as _0x599d4e}from'luxon';export function getDateTimePeriodInfo(_0x447eef,_0x19f3a0){_0x447eef=_0x599d4e['fromJSDate'](_0x447eef)['setLocale'](_0x19f3a0);const _0x558ed4=_0x599d4e[_0x49c8('0x4')](),_0x48837a=_0x558ed4['minus']({'days':0x1})[_0x49c8('0x6')](_0x49c8('0x7'));let _0x48ba51,_0x7e7a12;return _0x447eef[_0x49c8('0x2')](_0x558ed4,_0x49c8('0x7'))?(_0x48ba51=_0x447eef[_0x49c8('0x6')](_0x49c8('0x7'))[_0x49c8('0x5')](),_0x7e7a12=_0x447eef['toRelativeCalendar']()):_0x447eef[_0x49c8('0x2')](_0x48837a,_0x49c8('0x7'))?(_0x48ba51=_0x48837a[_0x49c8('0x5')](),_0x7e7a12=_0x447eef[_0x49c8('0x0')]()):_0x447eef[_0x49c8('0x2')](_0x558ed4,_0x49c8('0x3'))?(_0x48ba51=_0x447eef['startOf']('week')[_0x49c8('0x5')](),_0x7e7a12=_0x447eef[_0x49c8('0x9')]):_0x447eef[_0x49c8('0x2')](_0x558ed4,'year')?(_0x48ba51=_0x447eef['startOf']('month')[_0x49c8('0x5')](),_0x7e7a12=_0x447eef[_0x49c8('0x1')]):(_0x48ba51=_0x447eef[_0x49c8('0x6')](_0x49c8('0x8'))[_0x49c8('0x5')](),_0x7e7a12=_0x447eef[_0x49c8('0x8')]),{'startDate':_0x48ba51,'localizedPeriodName':_0x7e7a12};}
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 _0x1fc0=['name','author','add','isSuggestion','set','span','changeId','ck-annotation','type','focus','ck-revision-change','element','data','ck-revision-change__label','Added\x20by','setTemplate'];(function(_0x16df4a,_0x1fc077){const _0x37286c=function(_0x3af0a2){while(--_0x3af0a2){_0x16df4a['push'](_0x16df4a['shift']());}};_0x37286c(++_0x1fc077);}(_0x1fc0,0xc4));const _0x3728=function(_0x16df4a,_0x1fc077){_0x16df4a=_0x16df4a-0x0;let _0x37286c=_0x1fc0[_0x16df4a];return _0x37286c;};import{View as _0x3916fe}from'ckeditor5/src/ui';import{getTranslation as _0x1c4bec}from'../../utils/common-translations';export default class G extends _0x3916fe{constructor(_0xe549d6,_0x4109c0){super(_0xe549d6),this['_model']=_0x4109c0,this[_0x3728('0x2')]=_0x4109c0['id'];const _0x4b96fe=this['bindTemplate'],_0x1f94e8=_0x1c4bec(_0xe549d6,_0x4109c0[_0x3728('0x8')][_0x3728('0xf')]?'Suggested\x20by':_0x3728('0xe')==_0x4109c0[_0x3728('0x4')]?_0x3728('0xa'):'Removed\x20by');this[_0x3728('0x0')]('type',_0x4109c0['type']),this[_0x3728('0xb')]({'tag':'div','attributes':{'class':[_0x3728('0x3'),_0x3728('0x6'),_0x4b96fe['to'](_0x3728('0x4'),_0x321661=>'ck-revision-change__'+_0x321661)],'tabindex':-0x1},'children':[{'tag':_0x3728('0x1'),'children':[{'tag':_0x3728('0x1'),'attributes':{'class':[_0x3728('0x9')]},'children':[{'text':_0x1f94e8}]},{'text':'\x20'+_0x4109c0[_0x3728('0xd')][_0x3728('0xc')]}]}]});}[_0x3728('0x5')](){this[_0x3728('0x7')]['focus']();}}
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')]();}}