@ckeditor/ckeditor5-track-changes 0.0.0-nightly-20231115.0 → 0.0.0-nightly-20231117.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/track-changes.js +2 -2
- package/build/translations/ar.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/contexts.json +3 -3
- package/lang/translations/ar.po +19 -19
- package/lang/translations/bg.po +19 -19
- package/lang/translations/bn.po +19 -19
- package/lang/translations/ca.po +19 -19
- package/lang/translations/cs.po +19 -19
- package/lang/translations/da.po +19 -19
- package/lang/translations/de.po +19 -19
- package/lang/translations/el.po +19 -19
- package/lang/translations/es.po +19 -19
- package/lang/translations/et.po +19 -19
- package/lang/translations/fi.po +19 -19
- package/lang/translations/fr.po +19 -19
- package/lang/translations/he.po +19 -19
- package/lang/translations/hi.po +19 -19
- package/lang/translations/hu.po +19 -19
- package/lang/translations/id.po +19 -19
- package/lang/translations/it.po +19 -19
- package/lang/translations/ja.po +19 -19
- package/lang/translations/ko.po +19 -19
- package/lang/translations/lt.po +19 -19
- package/lang/translations/lv.po +19 -19
- package/lang/translations/ms.po +19 -19
- package/lang/translations/nl.po +19 -19
- package/lang/translations/no.po +19 -19
- package/lang/translations/pl.po +19 -19
- package/lang/translations/pt-br.po +19 -19
- package/lang/translations/pt.po +19 -19
- package/lang/translations/ro.po +19 -19
- package/lang/translations/ru.po +19 -19
- package/lang/translations/sk.po +19 -19
- package/lang/translations/sr.po +19 -19
- package/lang/translations/sv.po +19 -19
- package/lang/translations/th.po +19 -19
- package/lang/translations/tr.po +19 -19
- package/lang/translations/uk.po +19 -19
- package/lang/translations/vi.po +19 -19
- package/lang/translations/zh-cn.po +19 -19
- package/lang/translations/zh.po +19 -19
- package/package.json +3 -3
- package/src/commands/acceptsuggestioncommand.js +1 -1
- package/src/commands/discardsuggestioncommand.js +1 -1
- package/src/commands/executeonallsuggestionscommand.js +1 -1
- package/src/commands/executeonselectedsuggestionscommand.js +1 -1
- package/src/commands/trackchangescommand.js +1 -1
- package/src/index.d.ts +1 -1
- package/src/integrations/aiassistant.js +1 -1
- package/src/integrations/alignment.js +1 -1
- package/src/integrations/basicstyles.js +1 -1
- package/src/integrations/blockquote.js +1 -1
- package/src/integrations/ckbox.js +1 -1
- package/src/integrations/codeblock.js +1 -1
- package/src/integrations/comments.js +1 -1
- package/src/integrations/deletecommand.js +1 -1
- package/src/integrations/documentlist.js +1 -1
- package/src/integrations/documentlistproperties.js +1 -1
- package/src/integrations/entercommand.js +1 -1
- package/src/integrations/findandreplace.js +1 -1
- package/src/integrations/font.js +1 -1
- package/src/integrations/formatpainter.js +1 -1
- package/src/integrations/heading.js +1 -1
- package/src/integrations/highlight.js +1 -1
- package/src/integrations/horizontalline.js +1 -1
- package/src/integrations/htmlembed.js +1 -1
- package/src/integrations/image.js +1 -1
- package/src/integrations/imagereplace.js +1 -1
- package/src/integrations/imagestyle.js +1 -1
- package/src/integrations/importword.js +1 -1
- package/src/integrations/indent.js +1 -1
- package/src/integrations/inputcommand.js +1 -1
- package/src/integrations/link.js +1 -1
- package/src/integrations/list.js +1 -1
- package/src/integrations/listproperties.js +1 -1
- package/src/integrations/mediaembed.js +1 -1
- package/src/integrations/mention.js +1 -1
- package/src/integrations/pagebreak.js +1 -1
- package/src/integrations/paragraph.js +1 -1
- package/src/integrations/removeformat.js +1 -1
- package/src/integrations/restrictededitingmode.js +1 -1
- package/src/integrations/shiftentercommand.js +1 -1
- package/src/integrations/standardeditingmode.js +1 -1
- package/src/integrations/style.d.ts +0 -1
- package/src/integrations/style.js +1 -1
- package/src/integrations/table.js +1 -1
- package/src/integrations/tablecaption.js +1 -1
- package/src/integrations/tableclipboard.js +1 -1
- package/src/integrations/tablecolumnresize.js +1 -1
- package/src/integrations/tableheadings.js +1 -1
- package/src/integrations/tablemergesplit.js +1 -1
- package/src/integrations/tableofcontents.js +1 -1
- package/src/integrations/tableproperties.js +1 -1
- package/src/integrations/template.js +1 -1
- package/src/integrations/title.js +1 -1
- package/src/integrations/undo.js +1 -1
- package/src/integrations/utils.js +1 -1
- package/src/suggestion.js +1 -1
- package/src/suggestiondescriptionfactory.d.ts +7 -4
- package/src/suggestiondescriptionfactory.js +1 -1
- package/src/trackchanges.d.ts +0 -67
- package/src/trackchanges.js +1 -1
- package/src/trackchangesconfig.d.ts +22 -19
- package/src/trackchangesdata.js +1 -1
- package/src/trackchangesediting.d.ts +14 -23
- package/src/trackchangesediting.js +1 -1
- package/src/trackchangesui.js +1 -1
- package/src/ui/suggestioncontroller.js +1 -1
- package/src/ui/view/basesuggestionthreadview.js +1 -1
- package/src/ui/view/suggestionthreadview.d.ts +1 -1
- package/src/ui/view/suggestionthreadview.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/utils.js +1 -1
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x16d0=['enableCommand','editor','plugins','get','afterInit','insertTemplate','TrackChangesEditing'];(function(_0x39fcdf,_0x16d0cd){const _0x697e41=function(_0x452d12){while(--_0x452d12){_0x39fcdf['push'](_0x39fcdf['shift']());}};_0x697e41(++_0x16d0cd);}(_0x16d0,0x157));const _0x697e=function(_0x39fcdf,_0x16d0cd){_0x39fcdf=_0x39fcdf-0x0;let _0x697e41=_0x16d0[_0x39fcdf];return _0x697e41;};import{Plugin as _0x565224}from'ckeditor5/src/core';export default class vt extends _0x565224{[_0x697e('0x4')](){const _0x1d1f4d=this[_0x697e('0x1')];_0x1d1f4d[_0x697e('0x2')]['has']('Template')&&_0x1d1f4d['plugins'][_0x697e('0x3')](_0x697e('0x6'))[_0x697e('0x0')](_0x697e('0x5'));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x123d=['from','document','getNearestSelectionRange','plugins','updateMarker','TrackChangesEditing','removeMarker','isEqual','registerPostFixer','_splitMarkerName','isCollapsed','newRange','has','nodeBefore','registerElementLabel','forward','isTouching','end','getChangedMarkers','schema','model','element','afterInit','title-content','start'];(function(_0x312544,_0x123dd4){const _0x5715c2=function(_0x1afa75){while(--_0x1afa75){_0x312544['push'](_0x312544['shift']());}};_0x5715c2(++_0x123dd4);}(_0x123d,0x132));const _0x5715=function(_0x312544,_0x123dd4){_0x312544=_0x312544-0x0;let _0x5715c2=_0x123d[_0x312544];return _0x5715c2;};import{Plugin as _0x14ea1c}from'ckeditor5/src/core';import{getTranslation as _0x4440e8}from'../utils/common-translations';export default class Ct extends _0x14ea1c{[_0x5715('0x10')](){const _0x430b09=this['editor'];if(!_0x430b09[_0x5715('0x16')][_0x5715('0x6')]('Title'))return;const _0x1711b0=_0x430b09['plugins']['get'](_0x5715('0x18'));_0x1711b0['_descriptionFactory'][_0x5715('0x8')](_0x5715('0x11'),()=>_0x4440e8(_0x430b09['locale'],'ELEMENT_TITLE')),_0x430b09['model'][_0x5715('0x14')][_0x5715('0x2')](_0x217b79=>{let _0x48f065=!0x1;const _0x29e249=Array[_0x5715('0x13')](_0x430b09[_0x5715('0xe')][_0x5715('0x14')]['differ'][_0x5715('0xc')]());for(const {name:_0x38c036,data:_0x58a481}of _0x29e249){const {group:_0x16ab95}=_0x1711b0[_0x5715('0x3')](_0x38c036);if('suggestion'!==_0x16ab95||!_0x58a481[_0x5715('0x5')])continue;const _0xa14c53=_0x58a481[_0x5715('0x5')],_0x108cf6=_0xa14c53[_0x5715('0xb')][_0x5715('0x7')];if(!_0x108cf6||!_0x108cf6['is'](_0x5715('0xf'),'title-content'))continue;if(!_0xa14c53['start'][_0x5715('0xa')](_0xa14c53[_0x5715('0xb')]))continue;const _0x51b02d=_0x430b09['model'][_0x5715('0xd')][_0x5715('0x15')](_0xa14c53['end'],_0x5715('0x9'));if(_0x51b02d&&_0x51b02d[_0x5715('0x4')]){const _0x426e6f=_0x217b79['createRange'](_0xa14c53['start'],_0x51b02d[_0x5715('0x12')]);_0x426e6f[_0x5715('0x1')](_0xa14c53)||(_0x217b79[_0x5715('0x17')](_0x38c036,{'range':_0x426e6f}),_0x48f065=!0x0);}_0x48f065||(_0x217b79[_0x5715('0x0')](_0x38c036),_0x48f065=!0x0);}return _0x48f065;});}}
|
package/src/integrations/undo.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x67bb=['has','get','redo','TrackChangesEditing','plugins','afterInit','undo','enableCommand','editor'];(function(_0x3acfca,_0x67bbd0){const _0x4020ad=function(_0x545aff){while(--_0x545aff){_0x3acfca['push'](_0x3acfca['shift']());}};_0x4020ad(++_0x67bbd0);}(_0x67bb,0x15b));const _0x4020=function(_0x3acfca,_0x67bbd0){_0x3acfca=_0x3acfca-0x0;let _0x4020ad=_0x67bb[_0x3acfca];return _0x4020ad;};import{Plugin as _0x59e426}from'ckeditor5/src/core';export default class Dt extends _0x59e426{[_0x4020('0x0')](){const _0xe13249=this[_0x4020('0x3')],_0xb576a3=_0xe13249[_0x4020('0x8')][_0x4020('0x5')](_0x4020('0x7'));_0xe13249[_0x4020('0x8')][_0x4020('0x4')]('UndoEditing')&&(_0xb576a3[_0x4020('0x2')](_0x4020('0x1')),_0xb576a3['enableCommand'](_0x4020('0x6')));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4c28=['isContent','activeMarkers','isLimit','writer','isAtEnd','includes','bindElementToMarker','consumable','TrackChangesEditing','plugins','ck-suggestion-marker--active','element','markerRange','toViewPosition','nextSibling','markerName','listItem','span','item','addHighlight','test','start','mapper','previousPosition','getCustomProperty','getItems','name','push','parent','createUIElement','listIndent','schema','getWalker','model','hasAttribute'];(function(_0x535ef5,_0x4c282a){const _0x4ba9ce=function(_0x3ad753){while(--_0x3ad753){_0x535ef5['push'](_0x535ef5['shift']());}};_0x4ba9ce(++_0x4c282a);}(_0x4c28,0x1c2));const _0x4ba9=function(_0x535ef5,_0x4c282a){_0x535ef5=_0x535ef5-0x0;let _0x4ba9ce=_0x4c28[_0x535ef5];return _0x4ba9ce;};export function getRangesWithAttribute(_0x597a2c,_0x30aee7,_0x3a0768){const _0xb2493=[];for(const _0x548b03 of _0x30aee7[_0x4ba9('0x1e')]())_0x548b03[_0x4ba9('0x4')](_0x597a2c)&&_0xb2493[_0x4ba9('0x20')](_0x3a0768['createRangeOn'](_0x548b03));return _0xb2493;}export function getElementsAffectedByListItemRename(_0x1d72cd){const _0x5f1b98=[];if(_0x1d72cd['is'](_0x4ba9('0x10'),_0x4ba9('0x15'))){let _0x36c548=_0x1d72cd[_0x4ba9('0x13')];for(;_0x36c548&&_0x36c548['is']('element',_0x4ba9('0x15'))&&_0x36c548['getAttribute'](_0x4ba9('0x0'))>0x0;)_0x5f1b98[_0x4ba9('0x20')](_0x36c548),_0x36c548=_0x36c548['nextSibling'];}return _0x5f1b98;}export function downcastSplitMergeMarker(_0x2c2774,_0x21e718,{showActiveMarker:_0x247a7b=!0x0}={}){const _0x4ac3f2=_0x2c2774[_0x4ba9('0xe')]['get'](_0x4ba9('0xd'));return(_0x5a7248,_0x1da9ee,_0x3c25c9)=>{if(!_0x3c25c9[_0x4ba9('0xc')][_0x4ba9('0x19')](_0x1da9ee[_0x4ba9('0x11')],_0x5a7248[_0x4ba9('0x1f')]))return;const _0x7c3d3a=_0x1da9ee[_0x4ba9('0x11')][_0x4ba9('0x2')](),_0x9d2e8b=_0x1da9ee[_0x4ba9('0x11')][_0x4ba9('0x1a')],_0x55b47a=_0x2c2774[_0x4ba9('0x3')][_0x4ba9('0x1')];let _0x5b4ccc=null,_0x1bf94b=null,_0x29e1ab=!0x1,_0x4b723a=!0x1;for(const _0x2b8527 of _0x7c3d3a){const _0x47a0ce=_0x2b8527[_0x4ba9('0x17')];_0x29e1ab=_0x29e1ab||_0x55b47a[_0x4ba9('0x5')](_0x47a0ce);const _0x39d9d6=_0x3c25c9['mapper']['toViewElement'](_0x47a0ce);if(_0x39d9d6&&_0x39d9d6[_0x4ba9('0x1d')](_0x4ba9('0x18')))return;'elementEnd'==_0x2b8527['type']&&(_0x55b47a['isBlock'](_0x47a0ce)&&!_0x55b47a[_0x4ba9('0x7')](_0x47a0ce)&&(_0x47a0ce[_0x4ba9('0x13')]||_0x9d2e8b[_0x4ba9('0x9')]?_0x5b4ccc&&_0x5b4ccc[_0x4ba9('0x21')]==_0x47a0ce||(_0x5b4ccc=_0x47a0ce,_0x39f89d(_0x2b8527['previousPosition']),_0x4b723a=!0x0):_0x1bf94b=_0x1bf94b||_0x2b8527[_0x4ba9('0x1c')]));}function _0x39f89d(_0x12a38f){const _0x174836=_0x3c25c9[_0x4ba9('0x8')][_0x4ba9('0x22')](_0x4ba9('0x16'),{'class':'ck-suggestion-marker-'+_0x21e718}),_0x5a3e1d=_0x3c25c9['mapper'][_0x4ba9('0x12')](_0x12a38f);_0x247a7b&&_0x4ac3f2[_0x4ba9('0x6')][_0x4ba9('0xa')](_0x1da9ee[_0x4ba9('0x14')])&&_0x3c25c9['writer']['addClass'](_0x4ba9('0xf'),_0x174836),_0x3c25c9[_0x4ba9('0x8')]['insert'](_0x5a3e1d,_0x174836),_0x3c25c9[_0x4ba9('0x1b')][_0x4ba9('0xb')](_0x174836,_0x1da9ee[_0x4ba9('0x14')]);}_0x29e1ab||_0x4b723a||!_0x1bf94b||_0x39f89d(_0x1bf94b);};}
|
package/src/suggestion.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x433c=['change','onAccept','subType','end','next','addMarkerName','authoredAt','toJSON','getFirstMarker','setAttribute','decorate','onAttributesChange','isExternal','_markerNames','isInContent','previous','accept','_onDiscard','getAllAdjacentSuggestions','onDiscard','isMultiRange','getMultiRangeId','type','nodeAfter','size','push','getFirstRange','filter','removeAttribute','_onAttributesChange','commentThread','_onAccept','getMarkers','getContainedElement','clear','getMarkerNames','set','_model','hasComments','from','@external','map','creator','length','addRange','split','data','reduce','add','getRange','removeMarker','discard','addMarker','author','markers','attributes','getRanges','isIntersecting','suggestion:','removeMarkers'];(function(_0x52a39e,_0x433c59){const _0x2682bd=function(_0x41322c){while(--_0x41322c){_0x52a39e['push'](_0x52a39e['shift']());}};_0x2682bd(++_0x433c59);}(_0x433c,0x1bf));const _0x2682=function(_0x52a39e,_0x433c59){_0x52a39e=_0x52a39e-0x0;let _0x2682bd=_0x433c[_0x52a39e];return _0x2682bd;};import{Element as _0xf352c5}from'ckeditor5/src/engine';import{ObservableMixin as _0x2b7d0a,uid as _0x21bfc9}from'ckeditor5/src/utils';import{cloneDeep as _0xfb5e1b,isEqual as _0x54d5b7,set as _0x597f84,unset as _0x538ee9}from'lodash-es';export default class u extends _0x2b7d0a(){constructor(_0x10e50b,_0x5ce41e){super(),this['_isDataLoaded']=!0x1,this['id']=_0x5ce41e['id'],this[_0x2682('0x37')]=_0x5ce41e[_0x2682('0x37')],this[_0x2682('0x23')]=_0x5ce41e[_0x2682('0x23')]||null,this[_0x2682('0x1a')]=_0x5ce41e[_0x2682('0x1a')],this[_0x2682('0xf')]=_0x5ce41e[_0x2682('0xf')]||_0x5ce41e[_0x2682('0x1a')],this[_0x2682('0x2d')]=Boolean(_0x5ce41e['attributes']&&_0x5ce41e[_0x2682('0x1c')][_0x2682('0xd')]),this[_0x2682('0x13')]=null,this[_0x2682('0xa')]=_0x10e50b,this[_0x2682('0x4')]=_0x5ce41e[_0x2682('0x22')],this[_0x2682('0x32')]=_0x5ce41e[_0x2682('0x34')],this[_0x2682('0x2')]=_0x5ce41e[_0x2682('0x2c')],this[_0x2682('0x2e')]=new Set(),this['createdAt']=null,this[_0x2682('0x9')](_0x2682('0x27'),null),this[_0x2682('0x9')](_0x2682('0x1c'),_0x5ce41e['attributes']||{}),this['set']('previous',null),this['set'](_0x2682('0x25'),null),this[_0x2682('0x9')](_0x2682('0x3'),null),this[_0x2682('0x9')]('_saved',!0x1),this[_0x2682('0x2b')](_0x2682('0x31')),this[_0x2682('0x2b')](_0x2682('0x18'));}get['head'](){let _0x5a7b4d=this;for(;_0x5a7b4d[_0x2682('0x30')];)_0x5a7b4d=_0x5a7b4d[_0x2682('0x30')];return _0x5a7b4d;}get[_0x2682('0xb')](){return!!this['commentThread']&&this['commentThread'][_0x2682('0x10')]>0x0;}get[_0x2682('0x35')](){if(0x0==this[_0x2682('0x2e')][_0x2682('0x39')])return!0x1;return 0x6==Array[_0x2682('0xc')](this[_0x2682('0x2e')])[0x0][_0x2682('0x12')](':')[_0x2682('0x10')];}get[_0x2682('0x2f')](){return null!==this[_0x2682('0x29')]();}['addMarkerName'](_0x246569){this[_0x2682('0x2e')][_0x2682('0x15')](_0x246569);}[_0x2682('0x8')](){return Array[_0x2682('0xc')](this[_0x2682('0x2e')]);}[_0x2682('0x5')](){return this[_0x2682('0x8')]()[_0x2682('0xe')](_0x54bb24=>this['_model'][_0x2682('0x1b')]['get'](_0x54bb24))[_0x2682('0x0')](_0x3ae22b=>_0x3ae22b);}['getFirstMarker'](){return this[_0x2682('0x5')]()[0x0]||null;}[_0x2682('0x20')](){this[_0x2682('0xa')]['change'](_0x412001=>{for(const _0x203e24 of this[_0x2682('0x5')]())_0x412001['removeMarker'](_0x203e24);}),this[_0x2682('0x2e')][_0x2682('0x7')]();}[_0x2682('0x17')](_0x4cfd0c){this['_model'][_0x2682('0x21')](_0x295157=>{_0x295157[_0x2682('0x17')](_0x4cfd0c);}),this['_markerNames']['delete'](_0x4cfd0c);}[_0x2682('0x11')](_0x53eb48){const _0x131472=_0x2682('0x1f')+this[_0x2682('0x37')]+':'+this[_0x2682('0x23')]+':'+this['id']+':'+this[_0x2682('0xf')]['id']+':'+u[_0x2682('0x36')]();this[_0x2682('0x26')](_0x131472),this[_0x2682('0xa')][_0x2682('0x21')](_0x233069=>{_0x233069[_0x2682('0x19')](_0x131472,{'range':_0x53eb48,'usingOperation':!0x0,'affectsData':!0x0});});}['isIntersectingWithRange'](_0xb35626){for(const _0x1efbda of this['getRanges']())if(_0x1efbda[_0x2682('0x1e')](_0xb35626))return!0x0;return!0x1;}[_0x2682('0x1d')](){return this[_0x2682('0x5')]()[_0x2682('0xe')](_0x2ec9fb=>_0x2ec9fb['getRange']());}['getItems'](){return this[_0x2682('0x1d')]()[_0x2682('0x14')]((_0x321a56,_0x564343)=>[..._0x321a56,..._0x564343['getItems']()],[]);}[_0x2682('0x3b')](){var _0x35ff1d;return(null===(_0x35ff1d=this[_0x2682('0x29')]())||void 0x0===_0x35ff1d?void 0x0:_0x35ff1d[_0x2682('0x16')]())||null;}[_0x2682('0x6')](){const _0x2effed=this[_0x2682('0x1d')]();if(0x1!=_0x2effed[_0x2682('0x10')])return null;const _0x140a3e=_0x2effed[0x0],_0x422c63=_0x140a3e['start'][_0x2682('0x38')],_0x2dc9af=_0x140a3e[_0x2682('0x24')]['nodeBefore'];return _0x422c63 instanceof _0xf352c5?_0x422c63!=_0x2dc9af?null:_0x422c63:null;}[_0x2682('0x31')](){this[_0x2682('0x4')](this[_0x2682('0x1d')](),this[_0x2682('0x13')],this[_0x2682('0x1c')]),this['removeMarkers']();}['discard'](){this[_0x2682('0x32')](this[_0x2682('0x1d')](),this[_0x2682('0x13')],this['attributes']),this[_0x2682('0x20')]();}[_0x2682('0x33')](){const _0x3a22ad=[];let _0x4bd2b6=this['head'];for(;_0x4bd2b6;)_0x3a22ad[_0x2682('0x3a')](_0x4bd2b6),_0x4bd2b6=_0x4bd2b6[_0x2682('0x25')];return _0x3a22ad;}[_0x2682('0x2a')](_0x14c6af,_0x1712ba){const _0x192709=_0xfb5e1b(this[_0x2682('0x1c')]);_0x597f84(_0x192709,_0x14c6af,_0x1712ba),_0x54d5b7(_0x192709,this[_0x2682('0x1c')])||(this[_0x2682('0x1c')]=_0x192709,this[_0x2682('0x2')](_0x192709));}[_0x2682('0x1')](_0x3f2232){const _0x11d827=_0xfb5e1b(this[_0x2682('0x1c')]);_0x538ee9(_0x11d827,_0x3f2232),_0x54d5b7(_0x11d827,this[_0x2682('0x1c')])||(this[_0x2682('0x1c')]=_0x11d827,this[_0x2682('0x2')](this[_0x2682('0x1c')]));}[_0x2682('0x28')](){return{'id':this['id'],'type':this['subType']?this[_0x2682('0x37')]+':'+this[_0x2682('0x23')]:this[_0x2682('0x37')],'authorId':this[_0x2682('0xf')]['id'],'createdAt':this['createdAt'],'hasComments':this[_0x2682('0xb')],'data':this['data'],'attributes':this[_0x2682('0x1c')]};}static[_0x2682('0x36')](){return _0x21bfc9()['substr'](0x1,0x5);}}
|
|
@@ -6,11 +6,14 @@ import { type Locale, type PriorityString } from 'ckeditor5/src/utils';
|
|
|
6
6
|
import type { Schema, Element } from 'ckeditor5/src/engine';
|
|
7
7
|
import type Suggestion from './suggestion';
|
|
8
8
|
/**
|
|
9
|
-
* Creates descriptions for
|
|
9
|
+
* Creates descriptions for suggestions and suggestions chains.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* The class manages everything related to generating descriptions for suggestions. Here, you register labels for elements,
|
|
12
|
+
* attributes, or custom callback for non-regular cases.
|
|
13
|
+
*
|
|
14
|
+
* One or more suggestions that are grouped together (based ond various conditions) create "suggestion chain".
|
|
15
|
+
* In such chain one suggestion may impact other suggestion when it comes to the description of the whole chain.
|
|
16
|
+
* For example, insertion next to deletion results in "Replaced" description.
|
|
14
17
|
*/
|
|
15
18
|
export default class SuggestionDescriptionFactory {
|
|
16
19
|
constructor(schema: Schema, locale: Locale);
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x4b63=['matchingCallback','indexOf','Container','deletion','element','*Split:*\x20%0','removeFormat','insertion','normal','_handleCustomCallbackDescription','replace','get','_itemLabelsCallbacks','getWalker','_handleInsertRemoveSuggestionDescription','nextSibling','function','remove','isObject','newValue','*Insert:*\x20%0','checkChild','_resolveDescriptionItems','text','*Set\x20format:*\x20%0','data','format','attribute','Object','ELEMENT_SPACE','has','addFormat','_customCallbacks','key','subType','EmptyContainer','addObject','addContainer','length','_locale','registerAttributeLabel','match','_attributeLabels','nodeAfter','getItemLabel','REPLACE_TEXT','*Remove:*\x20%0','join','_schema','$1\x20$2','type','isEqual','set','elementEnd','name','$text','quantity','getDescriptions','registerElementLabel','_addDescriptionItems','registerDescriptionCallback','pop','label','*Merge:*\x20%0','isEmpty','_handleAttributeSuggestionDescription','$textProxy','getFirstRange','isInContent','item','push','add','previousSibling','_itemLabels'];(function(_0x45014a,_0x4b637c){const _0x4c886d=function(_0x1ac91e){while(--_0x1ac91e){_0x45014a['push'](_0x45014a['shift']());}};_0x4c886d(++_0x4b637c);}(_0x4b63,0x186));const _0x4c88=function(_0x45014a,_0x4b637c){_0x45014a=_0x45014a-0x0;let _0x4c886d=_0x4b63[_0x45014a];return _0x4c886d;};import{getTranslation as _0x5f0847}from'./utils/common-translations';import{priorities as _0x58aa02,insertToPriorityArray as _0x1c85e3}from'ckeditor5/src/utils';import{renameAttributeKey as _0x1a5e8e}from'./trackchangesediting';export default class f{constructor(_0x296e45,_0x2c7a87){this[_0x4c88('0xc')]=[],this['_itemLabels']=new Map(),this[_0x4c88('0x42')]=[],this['_attributeLabels']=new Map(),this[_0x4c88('0x1c')]=_0x296e45,this['_locale']=_0x2c7a87;}[_0x4c88('0x25')](_0x542364){const _0x5a042e=this[_0x4c88('0x13')],_0x271a92=[],_0x4a5375=new Set(),_0xed1af7=new Set();for(let _0x511b1b=0x0;_0x511b1b<_0x542364[_0x4c88('0x12')];_0x511b1b++){const _0x52ea9b=_0x542364[_0x511b1b];if(!_0x52ea9b[_0x4c88('0x30')])continue;const _0x4155ee=this[_0x4c88('0x3f')](_0x52ea9b);if(_0x4155ee){if(null!=_0x52ea9b[_0x4c88('0xe')]){if(_0x4a5375[_0x4c88('0xa')](_0x52ea9b[_0x4c88('0xe')]))continue;_0x4a5375['add'](_0x52ea9b[_0x4c88('0xe')]);}_0x271a92['push'](_0x4155ee);}else{if(_0x4c88('0x7')!=_0x52ea9b[_0x4c88('0x1e')])_0x4c88('0x3d')!=_0x52ea9b[_0x4c88('0x1e')]&&'deletion'!=_0x52ea9b['type']||this[_0x4c88('0x44')](_0x271a92,_0x52ea9b,_0x542364[_0x511b1b+0x1]);else{if(_0xed1af7[_0x4c88('0xa')](_0x52ea9b[_0x4c88('0x5')][_0x4c88('0xd')]))continue;if(_0xed1af7[_0x4c88('0x33')](_0x52ea9b['data'][_0x4c88('0xd')]),_0x52ea9b['data'][_0x4c88('0xd')]==_0x1a5e8e){_0x271a92[_0x4c88('0x32')]({'type':_0x4c88('0x6'),'content':_0x5f0847(_0x5a042e,'*Change\x20to:*\x20%0',this['getItemLabel'](_0x52ea9b[_0x4c88('0x2f')]()['start'][_0x4c88('0x17')],0x1))});continue;}this['_handleAttributeSuggestionDescription'](_0x271a92,_0x52ea9b);}}}return this[_0x4c88('0x2')](_0x271a92);}[_0x4c88('0x28')](_0xfcbad3){this[_0x4c88('0xc')][_0x4c88('0x32')](_0xfcbad3);}[_0x4c88('0x26')](_0x47c97d,_0x499e4e,_0x17cf59=_0x58aa02[_0x4c88('0x3e')]){_0x4c88('0x46')==typeof _0x47c97d?_0x1c85e3(this[_0x4c88('0x42')],{'matchingCallback':_0x47c97d,'label':_0x499e4e,'priority':_0x17cf59}):this[_0x4c88('0x35')][_0x4c88('0x20')](_0x47c97d,_0x499e4e);}[_0x4c88('0x14')](_0x3038b0,_0x1d50e8){this[_0x4c88('0x16')][_0x4c88('0x20')](_0x3038b0,_0x1d50e8);}['getItemLabel'](_0x4d0424,_0x55a521=0x1){let _0x48a86a;for(const _0xd80676 of this[_0x4c88('0x42')])if(_0xd80676[_0x4c88('0x36')](_0x4d0424)){_0x48a86a=_0xd80676[_0x4c88('0x2a')];break;}return _0x48a86a||(_0x48a86a=this[_0x4c88('0x35')]['get'](_0x4d0424[_0x4c88('0x22')])),_0x48a86a?_0x48a86a(_0x55a521):0x1!==_0x55a521?_0x55a521+'\x20'+_0x4d0424['name']+'s':''+_0x4d0424[_0x4c88('0x22')];}[_0x4c88('0x27')](_0x4da8fa,_0x5cc6ad){const _0x52126a=_0x5cc6ad['getFirstRange']()[_0x4c88('0x43')](),_0x3fca46=_0x4c88('0x3d')==_0x5cc6ad[_0x4c88('0x1e')]?'add':_0x4c88('0x47');for(const _0x803d71 of _0x52126a){const _0x57ee30=_0x803d71[_0x4c88('0x31')],_0x46a814=_0x4da8fa[_0x4da8fa['length']-0x1];if(_0x57ee30['is'](_0x4c88('0x2e')))_0x46a814&&_0x46a814[_0x4c88('0x1e')][_0x4c88('0x37')]('Container')>-0x1&&_0x4da8fa[_0x4c88('0x29')](),_0x46a814&&_0x4c88('0x3')==_0x46a814['type']?_0x46a814[_0x3fca46]+=_0x57ee30[_0x4c88('0x5')]:_0x4da8fa['push']({'type':_0x4c88('0x3'),'add':'add'==_0x3fca46?_0x57ee30[_0x4c88('0x5')]:'','remove':_0x4c88('0x47')==_0x3fca46?_0x57ee30[_0x4c88('0x5')]:''});else{if(this[_0x4c88('0x1c')]['isObject'](_0x57ee30)){const _0x3ae6d1=_0x57ee30;if(_0x46a814&&_0x46a814[_0x4c88('0x1e')][_0x4c88('0x37')](_0x4c88('0x38'))>-0x1&&_0x4da8fa['pop'](),_0x4c88('0x21')==_0x803d71['type'])continue;_0x46a814&&_0x46a814['type']==_0x3fca46+_0x4c88('0x8')&&_0x46a814[_0x4c88('0x3a')][_0x4c88('0x22')]==_0x3ae6d1['name']?_0x46a814[_0x4c88('0x24')]++:_0x4da8fa['push']({'type':_0x3fca46+_0x4c88('0x8'),'element':_0x3ae6d1,'quantity':0x1}),_0x52126a['skip'](_0x1c836e=>!(_0x4c88('0x21')==_0x1c836e[_0x4c88('0x1e')]&&_0x1c836e[_0x4c88('0x31')]==_0x57ee30));}else{if(this[_0x4c88('0x1c')][_0x4c88('0x1')](_0x57ee30,_0x4c88('0x23'))||_0x57ee30['is']('element','softBreak')){const _0x4d24e2=_0x57ee30;if(_0x4c88('0x33')==_0x3fca46&&'elementStart'==_0x803d71['type']||_0x4c88('0x47')==_0x3fca46&&'elementEnd'==_0x803d71[_0x4c88('0x1e')])continue;if(_0x46a814&&-0x1==_0x46a814[_0x4c88('0x1e')][_0x4c88('0x37')](_0x4c88('0x38'))){_0x4c88('0x3')==_0x46a814[_0x4c88('0x1e')]&&(_0x46a814[_0x3fca46]+='\x0a');continue;}let _0xabf330;if(_0xabf330=_0x4c88('0x33')==_0x3fca46?_0x4d24e2['nextSibling']&&!this[_0x4c88('0x1c')][_0x4c88('0x48')](_0x4d24e2[_0x4c88('0x45')])?_0x4d24e2['nextSibling']:null:_0x4d24e2[_0x4c88('0x34')]&&!this[_0x4c88('0x1c')][_0x4c88('0x48')](_0x4d24e2[_0x4c88('0x34')])?_0x4d24e2['previousSibling']:null,_0x4d24e2['isEmpty']||_0xabf330&&_0xabf330[_0x4c88('0x2c')]){const _0x288112=_0xabf330&&_0xabf330[_0x4c88('0x2c')]?_0xabf330:_0x4d24e2;_0x46a814&&_0x46a814['type']==_0x3fca46+_0x4c88('0xf')&&_0x46a814[_0x4c88('0x3a')]['name']==_0x288112[_0x4c88('0x22')]?_0x46a814[_0x4c88('0x24')]++:_0x4da8fa[_0x4c88('0x32')]({'type':_0x3fca46+'EmptyContainer','element':_0x288112,'quantity':0x1});}else _0x4da8fa[_0x4c88('0x32')]({'type':_0x3fca46+_0x4c88('0x38'),'element':_0x4d24e2});}}}}}['_resolveDescriptionItems'](_0x1ae507){const _0x3144c9=this[_0x4c88('0x13')],_0x22091d=[],_0x18da43=[],_0x504e32=[];for(const _0x401922 of _0x1ae507)switch(_0x401922['type']){case _0x4c88('0x3'):if(_0x401922[_0x4c88('0x33')]=_0x401922['add']['replace'](/(\S)\u000A+(\S)/g,_0x4c88('0x1d'))[_0x4c88('0x40')](/\u000A/g,''),_0x401922[_0x4c88('0x47')]=_0x401922['remove'][_0x4c88('0x40')](/(\S)\u000A+(\S)/g,_0x4c88('0x1d'))[_0x4c88('0x40')](/\u000A/g,''),''!=_0x401922[_0x4c88('0x33')]&&''!=_0x401922[_0x4c88('0x47')]){_0x22091d[_0x4c88('0x32')]({'type':_0x4c88('0x40'),'content':_0x5f0847(_0x3144c9,_0x4c88('0x19'),['\x22'+_0x401922[_0x4c88('0x47')]+'\x22','\x22'+_0x401922['add']+'\x22'])});continue;}if(null!=_0x401922[_0x4c88('0x33')][_0x4c88('0x15')](/^ +$/)){_0x22091d[_0x4c88('0x32')]({'type':_0x4c88('0x3d'),'content':_0x5f0847(_0x3144c9,_0x4c88('0x0'),_0x5f0847(_0x3144c9,_0x4c88('0x9'),_0x401922[_0x4c88('0x33')]['length']))});continue;}if(null!=_0x401922[_0x4c88('0x47')][_0x4c88('0x15')](/^ +$/)){_0x22091d[_0x4c88('0x32')]({'type':_0x4c88('0x39'),'content':_0x5f0847(_0x3144c9,_0x4c88('0x1a'),_0x5f0847(_0x3144c9,_0x4c88('0x9'),_0x401922[_0x4c88('0x47')][_0x4c88('0x12')]))});continue;}if(''!=_0x401922[_0x4c88('0x33')]){_0x22091d[_0x4c88('0x32')]({'type':_0x4c88('0x3d'),'content':_0x5f0847(_0x3144c9,_0x4c88('0x0'),'\x22'+_0x401922[_0x4c88('0x33')]+'\x22')});continue;}_0x22091d[_0x4c88('0x32')]({'type':'deletion','content':_0x5f0847(_0x3144c9,_0x4c88('0x1a'),'\x22'+_0x401922[_0x4c88('0x47')]+'\x22')});continue;case'addEmptyContainer':case _0x4c88('0x10'):_0x22091d[_0x4c88('0x32')]({'type':_0x4c88('0x3d'),'content':_0x5f0847(_0x3144c9,_0x4c88('0x0'),this[_0x4c88('0x18')](_0x401922[_0x4c88('0x3a')],_0x401922[_0x4c88('0x24')]))});continue;case'removeEmptyContainer':case'removeObject':_0x22091d['push']({'type':'deletion','content':_0x5f0847(_0x3144c9,'*Remove:*\x20%0',this['getItemLabel'](_0x401922[_0x4c88('0x3a')],_0x401922[_0x4c88('0x24')]))});continue;case _0x4c88('0x11'):_0x22091d[_0x4c88('0x32')]({'type':_0x4c88('0x3d'),'content':_0x5f0847(_0x3144c9,_0x4c88('0x3b'),this['getItemLabel'](_0x401922[_0x4c88('0x3a')],_0x401922[_0x4c88('0x24')]))});continue;case'removeContainer':_0x22091d[_0x4c88('0x32')]({'type':_0x4c88('0x39'),'content':_0x5f0847(_0x3144c9,_0x4c88('0x2b'),this['getItemLabel'](_0x401922[_0x4c88('0x3a')],_0x401922[_0x4c88('0x24')]))});continue;case _0x4c88('0xb'):_0x18da43[_0x4c88('0x32')](_0x401922[_0x4c88('0xd')]);continue;case'removeFormat':_0x504e32[_0x4c88('0x32')](_0x401922[_0x4c88('0xd')]);continue;default:_0x22091d[_0x4c88('0x32')](_0x401922);}if(_0x18da43[_0x4c88('0x12')]){const _0x396d52=_0x18da43['map'](_0x3e8708=>this[_0x4c88('0x16')][_0x4c88('0xa')](_0x3e8708)?this[_0x4c88('0x16')][_0x4c88('0x41')](_0x3e8708):_0x3e8708)['join'](',\x20');_0x22091d[_0x4c88('0x32')]({'type':_0x4c88('0x6'),'content':_0x5f0847(this['_locale'],_0x4c88('0x4'),_0x396d52)});}if(_0x504e32[_0x4c88('0x12')]){const _0x4d2d69=_0x504e32['map'](_0x2cbbdd=>this['_attributeLabels']['has'](_0x2cbbdd)?this['_attributeLabels'][_0x4c88('0x41')](_0x2cbbdd):_0x2cbbdd)[_0x4c88('0x1b')](',\x20');_0x22091d[_0x4c88('0x32')]({'type':_0x4c88('0x6'),'content':_0x5f0847(this['_locale'],'*Remove\x20format:*\x20%0',_0x4d2d69)});}return _0x22091d;}[_0x4c88('0x3f')](_0x78fcbd){for(const _0x386597 of this[_0x4c88('0xc')]){const _0x4d1464=_0x386597(_0x78fcbd);if(_0x4d1464&&_0x4c88('0x1e')in _0x4d1464)return _0x4d1464;}}[_0x4c88('0x2d')](_0x2017ab,_0x18e539){const _0xd3f171=_0x18e539['data'],_0x44b462=void 0x0===_0xd3f171[_0x4c88('0x49')]?_0x4c88('0x3c'):_0x4c88('0xb');_0x2017ab['push']({'type':_0x44b462,'key':_0xd3f171['key']});}[_0x4c88('0x44')](_0x12fac6,_0x5b4739,_0x1bf345){if(this['_addDescriptionItems'](_0x12fac6,_0x5b4739),_0x1bf345&&_0x1bf345[_0x4c88('0x2f')]()&&!_0x5b4739[_0x4c88('0x2f')]()['end'][_0x4c88('0x1f')](_0x1bf345[_0x4c88('0x2f')]()['start'])){const _0x81c165=_0x12fac6[_0x12fac6[_0x4c88('0x12')]-0x1],_0x1e2de3=_0x4c88('0x3d')==_0x5b4739['type']?_0x4c88('0x33'):_0x4c88('0x47');_0x81c165&&_0x4c88('0x3')==_0x81c165['type']&&(_0x81c165[_0x1e2de3]+='\x0a');}}}
|
|
23
|
+
const _0x1f32=['_itemLabels','name','item','has','getWalker','_handleCustomCallbackDescription','newValue','elementEnd','attribute','getFirstRange','EmptyContainer','indexOf','registerElementLabel','addEmptyContainer','removeContainer','_customCallbacks','_locale','Container','_schema','deletion','_attributeLabels','quantity','type','*Split:*\x20%0','remove','add','get','nodeAfter','length','removeEmptyContainer','_addDescriptionItems','skip','set','_handleInsertRemoveSuggestionDescription','end','normal','insertion','previousSibling','start','*Insert:*\x20%0','softBreak','label','data','isEmpty','removeObject','element','replace','$text','ELEMENT_SPACE','nextSibling','match','_handleRenameSuggestionDescription','_handleAttributeSuggestionDescription','checkChild','key','text','registerDescriptionCallback','removeFormat','join','pop','format','map','function','subType','getItemLabel','addFormat','isObject','push','*Remove\x20format:*\x20%0','Object','*Remove:*\x20%0','_itemLabelsCallbacks','addObject'];(function(_0x572c71,_0x1f322a){const _0x5578e6=function(_0x246b57){while(--_0x246b57){_0x572c71['push'](_0x572c71['shift']());}};_0x5578e6(++_0x1f322a);}(_0x1f32,0x1d2));const _0x5578=function(_0x572c71,_0x1f322a){_0x572c71=_0x572c71-0x0;let _0x5578e6=_0x1f32[_0x572c71];return _0x5578e6;};import{getTranslation as _0x2ec26a}from'./utils/common-translations';import{priorities as _0x342bbd,insertToPriorityArray as _0x2eec1b}from'ckeditor5/src/utils';import{renameAttributeKey as _0x3b4326}from'./trackchangesediting';export default class f{constructor(_0x390be5,_0x402aa6){this['_customCallbacks']=[],this[_0x5578('0x2d')]=new Map(),this[_0x5578('0x2b')]=[],this[_0x5578('0x41')]=new Map(),this[_0x5578('0x3f')]=_0x390be5,this[_0x5578('0x3d')]=_0x402aa6;}['getDescriptions'](_0x138dff){const _0x21521f=[],_0x4541c8=new Set(),_0x2454a4=new Set();for(let _0xca99eb=0x0;_0xca99eb<_0x138dff['length'];_0xca99eb++){const _0x4a739a=_0x138dff[_0xca99eb];if(!_0x4a739a['isInContent'])continue;const _0x4453f4=this[_0x5578('0x32')](_0x4a739a);if(_0x4453f4){if(null!=_0x4a739a[_0x5578('0x23')]){if(_0x4541c8['has'](_0x4a739a[_0x5578('0x23')]))continue;_0x4541c8[_0x5578('0x46')](_0x4a739a[_0x5578('0x23')]);}_0x21521f['push'](_0x4453f4);}else{if(_0x5578('0x35')!=_0x4a739a[_0x5578('0x43')])_0x5578('0x8')!=_0x4a739a[_0x5578('0x43')]&&'deletion'!=_0x4a739a[_0x5578('0x43')]||this[_0x5578('0x5')](_0x21521f,_0x4a739a,_0x138dff[_0xca99eb+0x1]);else{const _0x809b98=_0x4a739a[_0x5578('0xe')][_0x5578('0x1a')];if(_0x2454a4[_0x5578('0x30')](_0x809b98))continue;_0x2454a4[_0x5578('0x46')](_0x4a739a[_0x5578('0xe')][_0x5578('0x1a')]),_0x809b98==_0x3b4326?this[_0x5578('0x17')](_0x21521f,_0x4a739a):this['_handleAttributeSuggestionDescription'](_0x21521f,_0x4a739a);}}}return this['_resolveDescriptionItems'](_0x21521f);}[_0x5578('0x1c')](_0x5118d6){this['_customCallbacks']['push'](_0x5118d6);}[_0x5578('0x39')](_0x3152b5,_0x4b6542,_0x2c9b59=_0x342bbd[_0x5578('0x7')]){_0x5578('0x22')==typeof _0x3152b5?_0x2eec1b(this[_0x5578('0x2b')],{'matchingCallback':_0x3152b5,'label':_0x4b6542,'priority':_0x2c9b59}):this[_0x5578('0x2d')][_0x5578('0x4')](_0x3152b5,_0x4b6542);}['registerAttributeLabel'](_0x38698c,_0x411c03){this['_attributeLabels'][_0x5578('0x4')](_0x38698c,_0x411c03);}[_0x5578('0x24')](_0x49ca15,_0x4aaaf6=0x1){let _0xafedfe;for(const _0x50ab99 of this['_itemLabelsCallbacks'])if(_0x50ab99['matchingCallback'](_0x49ca15)){_0xafedfe=_0x50ab99[_0x5578('0xd')];break;}return _0xafedfe||(_0xafedfe=this[_0x5578('0x2d')][_0x5578('0x47')](_0x49ca15[_0x5578('0x2e')])),_0xafedfe?_0xafedfe(_0x4aaaf6):0x1!==_0x4aaaf6?_0x4aaaf6+'\x20'+_0x49ca15[_0x5578('0x2e')]+'s':''+_0x49ca15[_0x5578('0x2e')];}['_addDescriptionItems'](_0xba55d3,_0x2eae72){const _0x7f20b2=_0x2eae72['getFirstRange']()[_0x5578('0x31')](),_0x1afa8d='insertion'==_0x2eae72['type']?_0x5578('0x46'):_0x5578('0x45');for(const _0xcc11b8 of _0x7f20b2){const _0x5bcde5=_0xcc11b8[_0x5578('0x2f')],_0x415bc9=_0xba55d3[_0xba55d3[_0x5578('0x0')]-0x1];if(_0x5bcde5['is']('$textProxy'))_0x415bc9&&_0x415bc9[_0x5578('0x43')][_0x5578('0x38')](_0x5578('0x3e'))>-0x1&&_0xba55d3[_0x5578('0x1f')](),_0x415bc9&&'text'==_0x415bc9[_0x5578('0x43')]?_0x415bc9[_0x1afa8d]+=_0x5bcde5[_0x5578('0xe')]:_0xba55d3[_0x5578('0x27')]({'type':'text','add':_0x5578('0x46')==_0x1afa8d?_0x5bcde5[_0x5578('0xe')]:'','remove':'remove'==_0x1afa8d?_0x5bcde5['data']:''});else{if(this[_0x5578('0x3f')][_0x5578('0x26')](_0x5bcde5)){const _0xd7a87f=_0x5bcde5;if(_0x415bc9&&_0x415bc9[_0x5578('0x43')][_0x5578('0x38')](_0x5578('0x3e'))>-0x1&&_0xba55d3[_0x5578('0x1f')](),'elementEnd'==_0xcc11b8[_0x5578('0x43')])continue;_0x415bc9&&_0x415bc9[_0x5578('0x43')]==_0x1afa8d+_0x5578('0x29')&&_0x415bc9[_0x5578('0x11')]['name']==_0xd7a87f[_0x5578('0x2e')]?_0x415bc9[_0x5578('0x42')]++:_0xba55d3[_0x5578('0x27')]({'type':_0x1afa8d+_0x5578('0x29'),'element':_0xd7a87f,'quantity':0x1}),_0x7f20b2[_0x5578('0x3')](_0x104521=>!('elementEnd'==_0x104521[_0x5578('0x43')]&&_0x104521['item']==_0x5bcde5));}else{if(this[_0x5578('0x3f')][_0x5578('0x19')](_0x5bcde5,_0x5578('0x13'))||_0x5bcde5['is'](_0x5578('0x11'),_0x5578('0xc'))){const _0x5f2be7=_0x5bcde5;if(_0x5578('0x46')==_0x1afa8d&&'elementStart'==_0xcc11b8[_0x5578('0x43')]||_0x5578('0x45')==_0x1afa8d&&_0x5578('0x34')==_0xcc11b8[_0x5578('0x43')])continue;if(_0x415bc9&&-0x1==_0x415bc9[_0x5578('0x43')][_0x5578('0x38')]('Container')){'text'==_0x415bc9[_0x5578('0x43')]&&(_0x415bc9[_0x1afa8d]+='\x0a');continue;}let _0x24714b;if(_0x24714b=_0x5578('0x46')==_0x1afa8d?_0x5f2be7['nextSibling']&&!this[_0x5578('0x3f')][_0x5578('0x26')](_0x5f2be7[_0x5578('0x15')])?_0x5f2be7[_0x5578('0x15')]:null:_0x5f2be7[_0x5578('0x9')]&&!this[_0x5578('0x3f')]['isObject'](_0x5f2be7[_0x5578('0x9')])?_0x5f2be7['previousSibling']:null,_0x5f2be7['isEmpty']||_0x24714b&&_0x24714b[_0x5578('0xf')]){const _0x4e3c51=_0x24714b&&_0x24714b[_0x5578('0xf')]?_0x24714b:_0x5f2be7;_0x415bc9&&_0x415bc9[_0x5578('0x43')]==_0x1afa8d+_0x5578('0x37')&&_0x415bc9[_0x5578('0x11')][_0x5578('0x2e')]==_0x4e3c51[_0x5578('0x2e')]?_0x415bc9[_0x5578('0x42')]++:_0xba55d3[_0x5578('0x27')]({'type':_0x1afa8d+_0x5578('0x37'),'element':_0x4e3c51,'quantity':0x1});}else _0xba55d3[_0x5578('0x27')]({'type':_0x1afa8d+_0x5578('0x3e'),'element':_0x5f2be7});}}}}}['_resolveDescriptionItems'](_0x4d2187){const _0x5974ce=this['_locale'],_0x144f18=[],_0x34495d=[],_0x101f73=[];for(const _0x4fac44 of _0x4d2187)switch(_0x4fac44[_0x5578('0x43')]){case'text':if(_0x4fac44[_0x5578('0x46')]=_0x4fac44[_0x5578('0x46')][_0x5578('0x12')](/(\S)\u000A+(\S)/g,'$1\x20$2')[_0x5578('0x12')](/\u000A/g,''),_0x4fac44[_0x5578('0x45')]=_0x4fac44[_0x5578('0x45')][_0x5578('0x12')](/(\S)\u000A+(\S)/g,'$1\x20$2')[_0x5578('0x12')](/\u000A/g,''),''!=_0x4fac44['add']&&''!=_0x4fac44[_0x5578('0x45')]){_0x144f18['push']({'type':_0x5578('0x12'),'content':_0x2ec26a(_0x5974ce,'REPLACE_TEXT',['\x22'+_0x4fac44[_0x5578('0x45')]+'\x22','\x22'+_0x4fac44[_0x5578('0x46')]+'\x22'])});continue;}if(null!=_0x4fac44[_0x5578('0x46')][_0x5578('0x16')](/^ +$/)){_0x144f18['push']({'type':_0x5578('0x8'),'content':_0x2ec26a(_0x5974ce,_0x5578('0xb'),_0x2ec26a(_0x5974ce,_0x5578('0x14'),_0x4fac44[_0x5578('0x46')]['length']))});continue;}if(null!=_0x4fac44[_0x5578('0x45')][_0x5578('0x16')](/^ +$/)){_0x144f18[_0x5578('0x27')]({'type':_0x5578('0x40'),'content':_0x2ec26a(_0x5974ce,_0x5578('0x2a'),_0x2ec26a(_0x5974ce,'ELEMENT_SPACE',_0x4fac44[_0x5578('0x45')]['length']))});continue;}if(''!=_0x4fac44[_0x5578('0x46')]){_0x144f18[_0x5578('0x27')]({'type':_0x5578('0x8'),'content':_0x2ec26a(_0x5974ce,_0x5578('0xb'),'\x22'+_0x4fac44[_0x5578('0x46')]+'\x22')});continue;}_0x144f18[_0x5578('0x27')]({'type':_0x5578('0x40'),'content':_0x2ec26a(_0x5974ce,_0x5578('0x2a'),'\x22'+_0x4fac44[_0x5578('0x45')]+'\x22')});continue;case _0x5578('0x3a'):case _0x5578('0x2c'):_0x144f18[_0x5578('0x27')]({'type':'insertion','content':_0x2ec26a(_0x5974ce,'*Insert:*\x20%0',this[_0x5578('0x24')](_0x4fac44[_0x5578('0x11')],_0x4fac44[_0x5578('0x42')]))});continue;case _0x5578('0x1'):case _0x5578('0x10'):_0x144f18[_0x5578('0x27')]({'type':_0x5578('0x40'),'content':_0x2ec26a(_0x5974ce,_0x5578('0x2a'),this[_0x5578('0x24')](_0x4fac44['element'],_0x4fac44['quantity']))});continue;case'addContainer':_0x144f18[_0x5578('0x27')]({'type':_0x5578('0x8'),'content':_0x2ec26a(_0x5974ce,_0x5578('0x44'),this[_0x5578('0x24')](_0x4fac44[_0x5578('0x11')],_0x4fac44['quantity']))});continue;case _0x5578('0x3b'):_0x144f18[_0x5578('0x27')]({'type':_0x5578('0x40'),'content':_0x2ec26a(_0x5974ce,'*Merge:*\x20%0',this[_0x5578('0x24')](_0x4fac44['element'],_0x4fac44[_0x5578('0x42')]))});continue;case _0x5578('0x25'):_0x34495d[_0x5578('0x27')](_0x4fac44[_0x5578('0x1a')]);continue;case _0x5578('0x1d'):_0x101f73[_0x5578('0x27')](_0x4fac44['key']);continue;default:_0x144f18[_0x5578('0x27')](_0x4fac44);}if(_0x34495d[_0x5578('0x0')]){const _0x1819d6=_0x34495d[_0x5578('0x21')](_0x447693=>this[_0x5578('0x41')]['has'](_0x447693)?this[_0x5578('0x41')][_0x5578('0x47')](_0x447693):_0x447693)[_0x5578('0x1e')](',\x20');_0x144f18[_0x5578('0x27')]({'type':_0x5578('0x20'),'content':_0x2ec26a(this[_0x5578('0x3d')],'*Set\x20format:*\x20%0',_0x1819d6)});}if(_0x101f73[_0x5578('0x0')]){const _0x1c0b49=_0x101f73['map'](_0x3b08eb=>this[_0x5578('0x41')][_0x5578('0x30')](_0x3b08eb)?this[_0x5578('0x41')][_0x5578('0x47')](_0x3b08eb):_0x3b08eb)[_0x5578('0x1e')](',\x20');_0x144f18[_0x5578('0x27')]({'type':'format','content':_0x2ec26a(this[_0x5578('0x3d')],_0x5578('0x28'),_0x1c0b49)});}return _0x144f18;}[_0x5578('0x32')](_0x24df82){for(const _0x283be5 of this[_0x5578('0x3c')]){const _0x252a6a=_0x283be5(_0x24df82);if(_0x252a6a&&_0x5578('0x43')in _0x252a6a)return _0x252a6a;}}[_0x5578('0x18')](_0x3a0252,_0x4c961f){const _0x2e9293=_0x4c961f[_0x5578('0xe')],_0x14d9ee=void 0x0===_0x2e9293[_0x5578('0x33')]?_0x5578('0x1d'):_0x5578('0x25');_0x3a0252[_0x5578('0x27')]({'type':_0x14d9ee,'key':_0x2e9293[_0x5578('0x1a')]});}[_0x5578('0x17')](_0x53f4d2,_0x3c6749){_0x53f4d2[_0x5578('0x27')]({'type':'format','content':_0x2ec26a(this[_0x5578('0x3d')],'*Change\x20to:*\x20%0',this['getItemLabel'](_0x3c6749[_0x5578('0x36')]()[_0x5578('0xa')][_0x5578('0x48')],0x1))});}['_handleInsertRemoveSuggestionDescription'](_0x2ed41b,_0xe10fd8,_0x46ea69){if(this[_0x5578('0x2')](_0x2ed41b,_0xe10fd8),_0x46ea69&&_0x46ea69[_0x5578('0x36')]()&&!_0xe10fd8[_0x5578('0x36')]()[_0x5578('0x6')]['isEqual'](_0x46ea69[_0x5578('0x36')]()[_0x5578('0xa')])){const _0x133e51=_0x2ed41b[_0x2ed41b['length']-0x1],_0x490a6a=_0x5578('0x8')==_0xe10fd8[_0x5578('0x43')]?_0x5578('0x46'):_0x5578('0x45');_0x133e51&&_0x5578('0x1b')==_0x133e51[_0x5578('0x43')]&&(_0x133e51[_0x490a6a]+='\x0a');}}}
|
package/src/trackchanges.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ import TrackChangesUI from './trackchangesui';
|
|
|
11
11
|
import TrackChangesEditing from './trackchangesediting';
|
|
12
12
|
import 'ckeditor5-collaboration/src/collaboration-core';
|
|
13
13
|
import type { default as Suggestion, SuggestionJSON } from './suggestion';
|
|
14
|
-
import type SuggestionThreadView from './ui/view/suggestionthreadview';
|
|
15
14
|
/**
|
|
16
15
|
* A plugin that provides track changes mode for the editor. In track changes mode, all insertions are visually marked and all deletions
|
|
17
16
|
* are not deleted but also visually marked. Unsupported commands are disabled when the editor is in the track changes mode.
|
|
@@ -104,72 +103,6 @@ export default class TrackChanges extends Plugin {
|
|
|
104
103
|
*/
|
|
105
104
|
getSuggestion(id: string): Suggestion;
|
|
106
105
|
}
|
|
107
|
-
/**
|
|
108
|
-
* The configuration of the track changes feature.
|
|
109
|
-
*
|
|
110
|
-
* Example:
|
|
111
|
-
*
|
|
112
|
-
* ```ts
|
|
113
|
-
* ClassicEditor
|
|
114
|
-
* .create( {
|
|
115
|
-
* // Track changes feature configuration.
|
|
116
|
-
* trackChanges: {
|
|
117
|
-
* // Do not allow users to comment suggestions (default is `false`).
|
|
118
|
-
* disableComments: true,
|
|
119
|
-
* // Do not track styling and formatting changes (default is `default`).
|
|
120
|
-
* trackFormatChanges: 'never',
|
|
121
|
-
* // Merges suggestion changes inside a block. (default is `true`).
|
|
122
|
-
* mergeNestedSuggestions: true
|
|
123
|
-
* }
|
|
124
|
-
* } )
|
|
125
|
-
* .then( ... )
|
|
126
|
-
* .catch( ... );
|
|
127
|
-
* ```
|
|
128
|
-
*
|
|
129
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
130
|
-
*/
|
|
131
|
-
export interface TrackChangesConfig {
|
|
132
|
-
/**
|
|
133
|
-
* A property that specifies if the comments for suggestions are enabled or disabled.
|
|
134
|
-
* When the option is set to `true`, the comment thread UI for suggestions will be hidden
|
|
135
|
-
* and commenting suggestions will be disabled.
|
|
136
|
-
*
|
|
137
|
-
* Suggestion thread views will be marked with the additional `ck-suggestion--disabled-comments` class when the suggestion comments
|
|
138
|
-
* are disabled.
|
|
139
|
-
*/
|
|
140
|
-
disableComments: boolean;
|
|
141
|
-
/**
|
|
142
|
-
* A property that specifies whether format changes should be tracked.
|
|
143
|
-
*
|
|
144
|
-
* Format changes are all changes other than insertions and deletions, including: styling, structure, widgets properties, etc.
|
|
145
|
-
*
|
|
146
|
-
* Possible values are:
|
|
147
|
-
*
|
|
148
|
-
* * `'always'` - all changes are going to be tracked independently (without merging).
|
|
149
|
-
* * `'default'` - format changes made inside your own insertion suggestion will be merged with it.
|
|
150
|
-
* * `'never'` - format changes will not be tracked.
|
|
151
|
-
*
|
|
152
|
-
* Defaults to `'default'`.
|
|
153
|
-
*/
|
|
154
|
-
trackFormatChanges: 'never' | 'default' | 'always';
|
|
155
|
-
/**
|
|
156
|
-
* Specifies whether suggestions on an object (e.g. image, table) should be automatically merged
|
|
157
|
-
* with suggestions inside the object (e.g. image caption, table cell).
|
|
158
|
-
*
|
|
159
|
-
* For example, when set to `true`, creating a table and writing some text inside the table will result in one suggestion.
|
|
160
|
-
* When set to `false`, it will be two separate suggestions, one for the inserted table and one for the inserted text.
|
|
161
|
-
*
|
|
162
|
-
* Keep in mind that only suggestions from the same author and of the same type are merged this way.
|
|
163
|
-
*/
|
|
164
|
-
mergeNestedSuggestions: boolean;
|
|
165
|
-
/**
|
|
166
|
-
* A view class to be used to create suggestion thread views.
|
|
167
|
-
*
|
|
168
|
-
* {@link module:track-changes/ui/view/suggestionthreadview~SuggestionThreadView} is used by default
|
|
169
|
-
* when this property is not set.
|
|
170
|
-
*/
|
|
171
|
-
SuggestionThreadView?: typeof SuggestionThreadView;
|
|
172
|
-
}
|
|
173
106
|
/**
|
|
174
107
|
* Track changes adapter.
|
|
175
108
|
*
|
package/src/trackchanges.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x1edf=['addSuggestionData','requires','getSuggestion','get','getSuggestions','editor','Comments','addSuggestion','plugins','adapter'];(function(_0x387ca9,_0x1edf0b){var _0x13e900=function(_0x45e691){while(--_0x45e691){_0x387ca9['push'](_0x387ca9['shift']());}};_0x13e900(++_0x1edf0b);}(_0x1edf,0x151));var _0x13e9=function(_0x387ca9,_0x1edf0b){_0x387ca9=_0x387ca9-0x0;var _0x13e900=_0x1edf[_0x387ca9];return _0x13e900;};import{Plugin as _0x34a0e0}from'ckeditor5/src/core';import _0x4b107e from'./trackchangesui';import _0x571f1d from'./trackchangesediting';import'ckeditor5-collaboration/src/collaboration-core';export default class k extends _0x34a0e0{static get[_0x13e9('0x4')](){return[_0x571f1d,_0x4b107e,_0x13e9('0x9')];}static get['pluginName'](){return'TrackChanges';}set[_0x13e9('0x2')](_0xca6520){this['editor'][_0x13e9('0x1')][_0x13e9('0x6')](_0x571f1d)[_0x13e9('0x2')]=_0xca6520;}get[_0x13e9('0x2')](){return this[_0x13e9('0x8')][_0x13e9('0x1')][_0x13e9('0x6')](_0x571f1d)[_0x13e9('0x2')];}[_0x13e9('0x0')](_0x3e5ff5){return this['editor'][_0x13e9('0x1')]['get'](_0x571f1d)[_0x13e9('0x3')](_0x3e5ff5);}[_0x13e9('0x7')]({skipNotAttached:_0x3eb956=!0x1,toJSON:_0x211e57=!0x1}={}){return this[_0x13e9('0x8')][_0x13e9('0x1')][_0x13e9('0x6')](_0x571f1d)[_0x13e9('0x7')]({'skipNotAttached':_0x3eb956,'toJSON':_0x211e57});}[_0x13e9('0x5')](_0x43161e){return this[_0x13e9('0x8')][_0x13e9('0x1')][_0x13e9('0x6')](_0x571f1d)[_0x13e9('0x5')](_0x43161e);}}
|
|
@@ -13,20 +13,20 @@ import type SuggestionThreadView from './ui/view/suggestionthreadview';
|
|
|
13
13
|
* Example:
|
|
14
14
|
*
|
|
15
15
|
* ```ts
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
16
|
+
* ClassicEditor
|
|
17
|
+
* .create( {
|
|
18
|
+
* // Track changes feature configuration.
|
|
19
|
+
* trackChanges: {
|
|
20
|
+
* // Do not allow users to comment suggestions (default is `false`).
|
|
21
|
+
* disableComments: true,
|
|
22
|
+
* // Do not track styling and formatting changes (default is `default`).
|
|
23
|
+
* trackFormatChanges: 'never',
|
|
24
|
+
* // Merges suggestion changes inside a block. (default is `true`).
|
|
25
|
+
* mergeNestedSuggestions: true
|
|
26
|
+
* }
|
|
27
|
+
* } )
|
|
28
|
+
* .then( ... )
|
|
29
|
+
* .catch( ... );
|
|
30
30
|
* ```
|
|
31
31
|
*
|
|
32
32
|
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
@@ -42,15 +42,18 @@ export interface TrackChangesConfig {
|
|
|
42
42
|
*/
|
|
43
43
|
disableComments: boolean;
|
|
44
44
|
/**
|
|
45
|
-
* A property that specifies whether
|
|
45
|
+
* A property that specifies whether formatting changes should be tracked.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
47
|
+
* Formatting changes are all changes other than insertions and deletions, including: styling, structure, widgets properties, etc.
|
|
48
|
+
*
|
|
49
|
+
* By default, formatting changes are tracked. However, if you make a formatting change inside your own insertion suggestion, it
|
|
50
|
+
* is immediately applied, without creating a suggestion.
|
|
48
51
|
*
|
|
49
52
|
* Possible values are:
|
|
50
53
|
*
|
|
51
|
-
* * `'
|
|
52
|
-
* * `'
|
|
53
|
-
* * `'never'` - format changes will not be
|
|
54
|
+
* * `'default'` - format changes are tracked, but when made inside your own insertion suggestion, they will be immediately applied.
|
|
55
|
+
* * `'always'` - format changes will always be tracked, even inside your own insertion suggestion.
|
|
56
|
+
* * `'never'` - format changes will never be tracked (suggestions for such changes will not be created).
|
|
54
57
|
*
|
|
55
58
|
* Defaults to `'default'`.
|
|
56
59
|
*/
|
package/src/trackchangesdata.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x13b8=['init','appendChild','define','discardAllSuggestions','create','constructor','editorCreator','data','getDataWithAcceptedSuggestions','trackChangesData.editorCreator','TrackChangesEditing','createDocumentFragment','div','requires','addUser','_adapter','getFullData','getUser','getRootNames','trackChangesData','model','useAnonymousUser','name','track-changes-data-invalid-editor-creator','acceptAllSuggestions','document','editor','createElement','users','end','push','plugins','config','function','TrackChangesDataGetter','addSuggestionData','get','getRootsAttributes','reduce','Users','rootsAttributes','execute'];(function(_0x3bf0e2,_0x13b87c){const _0x320e4a=function(_0x4e2667){while(--_0x4e2667){_0x3bf0e2['push'](_0x3bf0e2['shift']());}};_0x320e4a(++_0x13b87c);}(_0x13b8,0x160));const _0x320e=function(_0x3bf0e2,_0x13b87c){_0x3bf0e2=_0x3bf0e2-0x0;let _0x320e4a=_0x13b8[_0x3bf0e2];return _0x320e4a;};import{Plugin as _0xe97ed4}from'ckeditor5/src/core';import{CKEditorError as _0x3983e4}from'ckeditor5/src/utils';import _0x2929c7 from'./trackchangesediting';import{sanitizeEditorConfig as _0x4527f5}from'ckeditor5-collaboration/src/collaboration-core';const T=['Pagination'];export default class P extends _0xe97ed4{static get[_0x320e('0x27')](){return[_0x2929c7];}static get['pluginName'](){return'TrackChangesData';}['init'](){const _0x50d828=this[_0x320e('0xa')];if(_0x50d828[_0x320e('0x10')][_0x320e('0x1c')](_0x320e('0x23'),_0x46deea=>{const _0x3aef21=_0x50d828[_0x320e('0x4')][_0x320e('0x9')][_0x320e('0x2')]()[_0x320e('0x16')]((_0x140549,_0x3d39d4)=>(_0x140549[_0x3d39d4]='',_0x140549),{});return _0x50d828[_0x320e('0x1f')][_0x320e('0x1e')](_0x3aef21,_0x46deea);}),_0x320e('0x11')!=typeof _0x50d828[_0x320e('0x10')][_0x320e('0x14')](_0x320e('0x3'))[_0x320e('0x20')])throw new _0x3983e4(_0x320e('0x7'));}[_0x320e('0x22')](_0x273016){return N(this[_0x320e('0xa')],!0x0,_0x273016);}['getDataWithDiscardedSuggestions'](_0x2185b4){return N(this[_0x320e('0xa')],!0x1,_0x2185b4);}}class D extends _0xe97ed4{static get['pluginName'](){return _0x320e('0x12');}constructor(_0x2e0100){super(_0x2e0100),this['result']=_0x320e('0xd');}[_0x320e('0x1a')](){this[_0x320e('0xa')][_0x320e('0xf')]['get']('CommentsRepository')[_0x320e('0x29')]={'addCommentThread':()=>new Promise(()=>{}),'getCommentThread':()=>new Promise(()=>{}),'updateCommentThread':()=>new Promise(()=>{}),'resolveCommentThread':()=>new Promise(()=>{}),'reopenCommentThread':()=>new Promise(()=>{}),'removeCommentThread':()=>new Promise(()=>{}),'addComment':()=>new Promise(()=>{}),'updateComment':()=>new Promise(()=>{}),'removeComment':()=>new Promise(()=>{})},this[_0x320e('0xa')][_0x320e('0xf')][_0x320e('0x14')](_0x320e('0x24'))[_0x320e('0x29')]=null;}}function v(_0x211f4f){return void 0x0!==_0x211f4f[_0x320e('0x15')];}async function N(_0x471e62,_0x59bebb,_0x934f10){const _0x3e8301=_0x4527f5(_0x471e62,T);_0x3e8301[_0x320e('0xf')][_0x320e('0xe')](_0x2929c7,D),_0x3e8301[_0x320e('0x18')]=v(_0x471e62)?_0x471e62[_0x320e('0x15')]():void 0x0;const _0x306772=document[_0x320e('0x25')](),_0x4a03bb=_0x471e62['config'][_0x320e('0x14')](_0x320e('0x3'))[_0x320e('0x20')],_0x205a6d=await _0x4a03bb(_0x3e8301,()=>function(_0x2c395c){const _0x2eb733=document[_0x320e('0xb')](_0x320e('0x26'));return _0x2c395c[_0x320e('0x1b')](_0x2eb733),_0x2eb733;}(_0x306772));!function(_0x5cf033,_0x3d7c53){const _0x3db1cb=_0x5cf033[_0x320e('0x4')][_0x320e('0x9')][_0x320e('0x2')]()[_0x320e('0x16')]((_0x28cf54,_0x9639a5)=>(_0x28cf54[_0x9639a5]=_0x5cf033[_0x320e('0x21')][_0x320e('0x14')]({'rootName':_0x9639a5}),_0x28cf54),{}),_0x4092b5=_0x5cf033['plugins']['get'](_0x320e('0x17'))[_0x320e('0xc')]['map'](_0x9f2b8d=>({'id':_0x9f2b8d['id'],'name':_0x9f2b8d[_0x320e('0x6')]})),_0x2314c4=_0x5cf033[_0x320e('0xf')][_0x320e('0x14')](_0x320e('0x24'))['getSuggestions']({'skipNotAttached':!0x0,'toJSON':!0x0}),_0x53c87c=_0x3d7c53[_0x320e('0xf')][_0x320e('0x14')]('Users'),_0x1bba9a=_0x3d7c53[_0x320e('0xf')][_0x320e('0x14')](_0x320e('0x24'));for(const _0x533932 of _0x4092b5)_0x53c87c[_0x320e('0x1')](_0x533932['id'])||_0x53c87c[_0x320e('0x28')](_0x533932);_0x53c87c['me']||_0x53c87c[_0x320e('0x5')]();for(const _0x14ab39 of _0x2314c4)_0x1bba9a[_0x320e('0x13')](_0x14ab39);_0x3d7c53[_0x320e('0x21')]['set'](_0x3db1cb);}(_0x471e62,_0x205a6d),_0x205a6d[_0x320e('0x19')](_0x59bebb?_0x320e('0x8'):_0x320e('0x1d'));const _0x24b4fd=v(_0x205a6d)?_0x205a6d[_0x320e('0x0')](_0x934f10):_0x205a6d[_0x320e('0x21')][_0x320e('0x14')](_0x934f10);return await _0x205a6d['destroy'](),_0x24b4fd;}
|
|
@@ -444,7 +444,13 @@ export default class TrackChangesEditing extends Plugin {
|
|
|
444
444
|
/**
|
|
445
445
|
* Marks a single-range attribute suggestion on the given `range`.
|
|
446
446
|
*
|
|
447
|
-
* Note
|
|
447
|
+
* Note: all nodes in the given `range` must have the same current value of `key` attribute.
|
|
448
|
+
*
|
|
449
|
+
* Note: if a block attribute is marked, `range` should include only a single model element.
|
|
450
|
+
*
|
|
451
|
+
* `attributes` is a required value and must include `groupId: string` property. The group id is used to group attribute suggestions
|
|
452
|
+
* together. All suggestions with the same `groupId` will be put into one suggestion chain. By default, all attribute suggestions
|
|
453
|
+
* created during the same batch have the same `groupId`.
|
|
448
454
|
*
|
|
449
455
|
* It's possible that more than one suggestion will be created by this method if there are already suggestions with the same
|
|
450
456
|
* `key` but a different `oldValue` intersecting with the given `range`.
|
|
@@ -466,23 +472,12 @@ export default class TrackChangesEditing extends Plugin {
|
|
|
466
472
|
* @param key Key of the attribute that changed.
|
|
467
473
|
* @param oldValue Previous value of the attribute.
|
|
468
474
|
* @param newValue New value of the attribute.
|
|
469
|
-
* @param attributes
|
|
470
|
-
*/
|
|
471
|
-
markAttributeChange(range: Range, key: string, oldValue: unknown, newValue: unknown, batchId: string, attributes?: Record<string, unknown>): Array<Suggestion>;
|
|
472
|
-
/**
|
|
473
|
-
* TODO
|
|
474
|
-
*/
|
|
475
|
-
registerBlockAttribute(attributeKey: string): void;
|
|
476
|
-
/**
|
|
477
|
-
* TODO
|
|
475
|
+
* @param attributes Suggestion attributes. Must include `groupId`.
|
|
478
476
|
*/
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
* @param commandName Name of the command to integrate.
|
|
484
|
-
*/
|
|
485
|
-
enableDefaultIntegration(commandName: string, inlineAttributes?: Array<string>, blockAttributes?: Array<string>): void;
|
|
477
|
+
markAttributeChange(range: Range, key: string, oldValue: unknown, newValue: unknown, attributes: {
|
|
478
|
+
groupId: string;
|
|
479
|
+
[key: string]: any;
|
|
480
|
+
}): Array<Suggestion>;
|
|
486
481
|
}
|
|
487
482
|
/**
|
|
488
483
|
* Command parameters and additional suggestion parameters. Passed value is also saved in
|
|
@@ -519,15 +514,11 @@ export type AttributeData = {
|
|
|
519
514
|
*/
|
|
520
515
|
key: string;
|
|
521
516
|
/**
|
|
522
|
-
* Attribute's original value.
|
|
517
|
+
* Attribute's original value before the change happened.
|
|
523
518
|
*/
|
|
524
519
|
oldValue: unknown;
|
|
525
520
|
/**
|
|
526
|
-
* Attribute's value
|
|
521
|
+
* Attribute's value after the change happened.
|
|
527
522
|
*/
|
|
528
523
|
newValue: unknown;
|
|
529
|
-
/**
|
|
530
|
-
* Id generated on command execution representing batch of changes.
|
|
531
|
-
*/
|
|
532
|
-
batchId?: string;
|
|
533
524
|
};
|