@ckeditor/ckeditor5-track-changes 0.0.0-nightly-20231114.0 → 0.0.0-nightly-20231116.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 _0x21c1=['enableCommand','has','get','Template','TrackChangesEditing','afterInit','insertTemplate'];(function(_0x5ab268,_0x21c178){const _0x20c464=function(_0x7bc62f){while(--_0x7bc62f){_0x5ab268['push'](_0x5ab268['shift']());}};_0x20c464(++_0x21c178);}(_0x21c1,0x1e1));const _0x20c4=function(_0x5ab268,_0x21c178){_0x5ab268=_0x5ab268-0x0;let _0x20c464=_0x21c1[_0x5ab268];return _0x20c464;};import{Plugin as _0x558348}from'ckeditor5/src/core';export default class vt extends _0x558348{[_0x20c4('0x0')](){const _0x129bc6=this['editor'];_0x129bc6['plugins'][_0x20c4('0x3')](_0x20c4('0x5'))&&_0x129bc6['plugins'][_0x20c4('0x4')](_0x20c4('0x6'))[_0x20c4('0x2')](_0x20c4('0x1'));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x12be=['suggestion','start','isEqual','end','registerPostFixer','TrackChangesEditing','has','nodeBefore','_descriptionFactory','_splitMarkerName','document','differ','createRange','schema','plugins','model','getChangedMarkers','from','Title','registerElementLabel','title-content','editor','afterInit','newRange','isTouching','getNearestSelectionRange','updateMarker'];(function(_0x232ead,_0x12be0d){const _0x54c9b7=function(_0x48aa4a){while(--_0x48aa4a){_0x232ead['push'](_0x232ead['shift']());}};_0x54c9b7(++_0x12be0d);}(_0x12be,0xf7));const _0x54c9=function(_0x232ead,_0x12be0d){_0x232ead=_0x232ead-0x0;let _0x54c9b7=_0x12be[_0x232ead];return _0x54c9b7;};import{Plugin as _0x21c7f6}from'ckeditor5/src/core';import{getTranslation as _0x102b4b}from'../utils/common-translations';export default class Ct extends _0x21c7f6{[_0x54c9('0x12')](){const _0x1c8feb=this[_0x54c9('0x11')];if(!_0x1c8feb[_0x54c9('0xa')][_0x54c9('0x2')](_0x54c9('0xe')))return;const _0x1e7b9d=_0x1c8feb[_0x54c9('0xa')]['get'](_0x54c9('0x1'));_0x1e7b9d[_0x54c9('0x4')][_0x54c9('0xf')]('title-content',()=>_0x102b4b(_0x1c8feb['locale'],'ELEMENT_TITLE')),_0x1c8feb[_0x54c9('0xb')][_0x54c9('0x6')][_0x54c9('0x0')](_0x481a65=>{let _0x2302ac=!0x1;const _0x446f6f=Array[_0x54c9('0xd')](_0x1c8feb[_0x54c9('0xb')]['document'][_0x54c9('0x7')][_0x54c9('0xc')]());for(const {name:_0x3063b2,data:_0x360387}of _0x446f6f){const {group:_0x381ad3}=_0x1e7b9d[_0x54c9('0x5')](_0x3063b2);if(_0x54c9('0x17')!==_0x381ad3||!_0x360387[_0x54c9('0x13')])continue;const _0x50f685=_0x360387[_0x54c9('0x13')],_0xcb029f=_0x50f685['end'][_0x54c9('0x3')];if(!_0xcb029f||!_0xcb029f['is']('element',_0x54c9('0x10')))continue;if(!_0x50f685[_0x54c9('0x18')][_0x54c9('0x14')](_0x50f685[_0x54c9('0x1a')]))continue;const _0x4030f8=_0x1c8feb[_0x54c9('0xb')][_0x54c9('0x9')][_0x54c9('0x15')](_0x50f685['end'],'forward');if(_0x4030f8&&_0x4030f8['isCollapsed']){const _0x513ade=_0x481a65[_0x54c9('0x8')](_0x50f685[_0x54c9('0x18')],_0x4030f8[_0x54c9('0x18')]);_0x513ade[_0x54c9('0x19')](_0x50f685)||(_0x481a65[_0x54c9('0x16')](_0x3063b2,{'range':_0x513ade}),_0x2302ac=!0x0);}_0x2302ac||(_0x481a65['removeMarker'](_0x3063b2),_0x2302ac=!0x0);}return _0x2302ac;});}}
|
package/src/integrations/undo.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1125=['has','editor','TrackChangesEditing','enableCommand','plugins'];(function(_0x266662,_0x112538){const _0x4a06a5=function(_0x35186){while(--_0x35186){_0x266662['push'](_0x266662['shift']());}};_0x4a06a5(++_0x112538);}(_0x1125,0x105));const _0x4a06=function(_0x266662,_0x112538){_0x266662=_0x266662-0x0;let _0x4a06a5=_0x1125[_0x266662];return _0x4a06a5;};import{Plugin as _0x89436a}from'ckeditor5/src/core';export default class Dt extends _0x89436a{['afterInit'](){const _0x13ff57=this[_0x4a06('0x0')],_0x4b3c42=_0x13ff57[_0x4a06('0x3')]['get'](_0x4a06('0x1'));_0x13ff57[_0x4a06('0x3')][_0x4a06('0x4')]('UndoEditing')&&(_0x4b3c42[_0x4a06('0x2')]('undo'),_0x4b3c42[_0x4a06('0x2')]('redo'));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2c0e=['activeMarkers','mapper','test','plugins','TrackChangesEditing','previousPosition','insert','consumable','addClass','isAtEnd','item','nextSibling','listIndent','isLimit','isContent','toViewPosition','markerName','bindElementToMarker','getItems','isBlock','getCustomProperty','writer','hasAttribute','listItem','type','createRangeOn','includes','push','markerRange','start','ck-suggestion-marker--active','model','schema','get','createUIElement','element','getAttribute','elementEnd'];(function(_0x2c9bd4,_0x2c0e42){const _0x2d234c=function(_0x269b07){while(--_0x269b07){_0x2c9bd4['push'](_0x2c9bd4['shift']());}};_0x2d234c(++_0x2c0e42);}(_0x2c0e,0x6f));const _0x2d23=function(_0x2c9bd4,_0x2c0e42){_0x2c9bd4=_0x2c9bd4-0x0;let _0x2d234c=_0x2c0e[_0x2c9bd4];return _0x2d234c;};export function getRangesWithAttribute(_0x5ac057,_0x52816e,_0xd606e8){const _0x4e59d3=[];for(const _0x58d0f0 of _0x52816e[_0x2d23('0x15')]())_0x58d0f0[_0x2d23('0x19')](_0x5ac057)&&_0x4e59d3[_0x2d23('0x1e')](_0xd606e8[_0x2d23('0x1c')](_0x58d0f0));return _0x4e59d3;}export function getElementsAffectedByListItemRename(_0x3f549f){const _0x3aafe0=[];if(_0x3f549f['is'](_0x2d23('0x0'),'listItem')){let _0x301da4=_0x3f549f[_0x2d23('0xe')];for(;_0x301da4&&_0x301da4['is'](_0x2d23('0x0'),_0x2d23('0x1a'))&&_0x301da4[_0x2d23('0x1')](_0x2d23('0xf'))>0x0;)_0x3aafe0[_0x2d23('0x1e')](_0x301da4),_0x301da4=_0x301da4[_0x2d23('0xe')];}return _0x3aafe0;}export function downcastSplitMergeMarker(_0x490e8e,_0x3b2382,{showActiveMarker:_0x3148cf=!0x0}={}){const _0x309a69=_0x490e8e[_0x2d23('0x6')][_0x2d23('0x24')](_0x2d23('0x7'));return(_0x34ea30,_0x374cb2,_0x1921aa)=>{if(!_0x1921aa[_0x2d23('0xa')][_0x2d23('0x5')](_0x374cb2[_0x2d23('0x1f')],_0x34ea30['name']))return;const _0x4eba94=_0x374cb2[_0x2d23('0x1f')]['getWalker'](),_0x484729=_0x374cb2[_0x2d23('0x1f')][_0x2d23('0x20')],_0x2779be=_0x490e8e[_0x2d23('0x22')][_0x2d23('0x23')];let _0x268e47=null,_0x39a200=null,_0x562c3d=!0x1,_0x542d7e=!0x1;for(const _0x2ff6ba of _0x4eba94){const _0xaa93e7=_0x2ff6ba[_0x2d23('0xd')];_0x562c3d=_0x562c3d||_0x2779be[_0x2d23('0x11')](_0xaa93e7);const _0x431986=_0x1921aa[_0x2d23('0x4')]['toViewElement'](_0xaa93e7);if(_0x431986&&_0x431986[_0x2d23('0x17')]('addHighlight'))return;_0x2d23('0x2')==_0x2ff6ba[_0x2d23('0x1b')]&&(_0x2779be[_0x2d23('0x16')](_0xaa93e7)&&!_0x2779be[_0x2d23('0x10')](_0xaa93e7)&&(_0xaa93e7[_0x2d23('0xe')]||_0x484729[_0x2d23('0xc')]?_0x268e47&&_0x268e47['parent']==_0xaa93e7||(_0x268e47=_0xaa93e7,_0x587a66(_0x2ff6ba[_0x2d23('0x8')]),_0x542d7e=!0x0):_0x39a200=_0x39a200||_0x2ff6ba['previousPosition']));}function _0x587a66(_0x534098){const _0x2c12cc=_0x1921aa['writer'][_0x2d23('0x25')]('span',{'class':'ck-suggestion-marker-'+_0x3b2382}),_0x5476dd=_0x1921aa[_0x2d23('0x4')][_0x2d23('0x12')](_0x534098);_0x3148cf&&_0x309a69[_0x2d23('0x3')][_0x2d23('0x1d')](_0x374cb2[_0x2d23('0x13')])&&_0x1921aa[_0x2d23('0x18')][_0x2d23('0xb')](_0x2d23('0x21'),_0x2c12cc),_0x1921aa[_0x2d23('0x18')][_0x2d23('0x9')](_0x5476dd,_0x2c12cc),_0x1921aa['mapper'][_0x2d23('0x14')](_0x2c12cc,_0x374cb2[_0x2d23('0x13')]);}_0x562c3d||_0x542d7e||!_0x39a200||_0x587a66(_0x39a200);};}
|
package/src/suggestion.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x57ca=['getMarkers','removeMarkers','_saved','push','filter','setAttribute','isIntersecting','decorate','length','discard','subType','start','onAttributesChange','accept','nodeBefore','toJSON','onDiscard','suggestion:','substr','isExternal','type','set','_onDiscard','_model','map','delete','isIntersectingWithRange','addMarker','get','author','removeMarker','hasComments','getContainedElement','addMarkerName','next','_onAttributesChange','getItems','from','size','onAccept','authoredAt','removeAttribute','getRange','_onAccept','_isDataLoaded','getMultiRangeId','data','getMarkerNames','commentThread','_markerNames','change','add','head','clear','getFirstMarker','getAllAdjacentSuggestions','attributes','reduce','creator','getRanges','addRange','nodeAfter','previous','createdAt'];(function(_0x17f3e3,_0x57caeb){const _0xcc175d=function(_0x3b8ee6){while(--_0x3b8ee6){_0x17f3e3['push'](_0x17f3e3['shift']());}};_0xcc175d(++_0x57caeb);}(_0x57ca,0xc8));const _0xcc17=function(_0x17f3e3,_0x57caeb){_0x17f3e3=_0x17f3e3-0x0;let _0xcc175d=_0x57ca[_0x17f3e3];return _0xcc175d;};import{Element as _0x1f7b85}from'ckeditor5/src/engine';import{ObservableMixin as _0x5b808b,uid as _0x16a010}from'ckeditor5/src/utils';import{cloneDeep as _0x20b47e,isEqual as _0x4bed17,set as _0x592c4a,unset as _0x20fa0b}from'lodash-es';export default class u extends _0x5b808b(){constructor(_0x57ebff,_0xbac231){super(),this[_0xcc17('0x24')]=!0x1,this['id']=_0xbac231['id'],this[_0xcc17('0xc')]=_0xbac231[_0xcc17('0xc')],this[_0xcc17('0x2')]=_0xbac231[_0xcc17('0x2')]||null,this['author']=_0xbac231['author'],this['creator']=_0xbac231['creator']||_0xbac231[_0xcc17('0x15')],this[_0xcc17('0xb')]=Boolean(_0xbac231[_0xcc17('0x30')]&&_0xbac231[_0xcc17('0x30')]['@external']),this[_0xcc17('0x26')]=null,this['_model']=_0x57ebff,this[_0xcc17('0x23')]=_0xbac231[_0xcc17('0x1f')],this[_0xcc17('0xe')]=_0xbac231[_0xcc17('0x8')],this[_0xcc17('0x1b')]=_0xbac231[_0xcc17('0x4')],this[_0xcc17('0x29')]=new Set(),this[_0xcc17('0x37')]=null,this['set'](_0xcc17('0x20'),null),this['set'](_0xcc17('0x30'),_0xbac231[_0xcc17('0x30')]||{}),this[_0xcc17('0xd')](_0xcc17('0x36'),null),this[_0xcc17('0xd')](_0xcc17('0x1a'),null),this['set'](_0xcc17('0x28'),null),this['set'](_0xcc17('0x3a'),!0x1),this[_0xcc17('0x3f')]('accept'),this['decorate'](_0xcc17('0x1'));}get[_0xcc17('0x2c')](){let _0x47fa19=this;for(;_0x47fa19['previous'];)_0x47fa19=_0x47fa19[_0xcc17('0x36')];return _0x47fa19;}get[_0xcc17('0x17')](){return!!this[_0xcc17('0x28')]&&this[_0xcc17('0x28')]['length']>0x0;}get['isMultiRange'](){if(0x0==this[_0xcc17('0x29')][_0xcc17('0x1e')])return!0x1;return 0x6==Array[_0xcc17('0x1d')](this['_markerNames'])[0x0]['split'](':')[_0xcc17('0x0')];}get['isInContent'](){return null!==this[_0xcc17('0x2e')]();}[_0xcc17('0x19')](_0x14266d){this[_0xcc17('0x29')][_0xcc17('0x2b')](_0x14266d);}['getMarkerNames'](){return Array['from'](this[_0xcc17('0x29')]);}[_0xcc17('0x38')](){return this[_0xcc17('0x27')]()[_0xcc17('0x10')](_0x16e441=>this[_0xcc17('0xf')]['markers'][_0xcc17('0x14')](_0x16e441))[_0xcc17('0x3c')](_0x3289af=>_0x3289af);}[_0xcc17('0x2e')](){return this[_0xcc17('0x38')]()[0x0]||null;}[_0xcc17('0x39')](){this[_0xcc17('0xf')][_0xcc17('0x2a')](_0x27aae4=>{for(const _0x3676aa of this[_0xcc17('0x38')]())_0x27aae4[_0xcc17('0x16')](_0x3676aa);}),this[_0xcc17('0x29')][_0xcc17('0x2d')]();}[_0xcc17('0x16')](_0x307a4c){this[_0xcc17('0xf')][_0xcc17('0x2a')](_0x328efb=>{_0x328efb[_0xcc17('0x16')](_0x307a4c);}),this[_0xcc17('0x29')][_0xcc17('0x11')](_0x307a4c);}[_0xcc17('0x34')](_0x56fcb3){const _0x93022b=_0xcc17('0x9')+this['type']+':'+this[_0xcc17('0x2')]+':'+this['id']+':'+this[_0xcc17('0x32')]['id']+':'+u[_0xcc17('0x25')]();this[_0xcc17('0x19')](_0x93022b),this[_0xcc17('0xf')]['change'](_0x4145e6=>{_0x4145e6[_0xcc17('0x13')](_0x93022b,{'range':_0x56fcb3,'usingOperation':!0x0,'affectsData':!0x0});});}[_0xcc17('0x12')](_0x28b4a4){for(const _0x23bc3a of this['getRanges']())if(_0x23bc3a[_0xcc17('0x3e')](_0x28b4a4))return!0x0;return!0x1;}[_0xcc17('0x33')](){return this['getMarkers']()['map'](_0x3b075f=>_0x3b075f[_0xcc17('0x22')]());}[_0xcc17('0x1c')](){return this[_0xcc17('0x33')]()[_0xcc17('0x31')]((_0x4cf3fb,_0x25ac45)=>[..._0x4cf3fb,..._0x25ac45[_0xcc17('0x1c')]()],[]);}['getFirstRange'](){var _0xf86508;return(null===(_0xf86508=this[_0xcc17('0x2e')]())||void 0x0===_0xf86508?void 0x0:_0xf86508[_0xcc17('0x22')]())||null;}[_0xcc17('0x18')](){const _0x22daba=this[_0xcc17('0x33')]();if(0x1!=_0x22daba[_0xcc17('0x0')])return null;const _0x2cfa68=_0x22daba[0x0],_0x3befaa=_0x2cfa68[_0xcc17('0x3')][_0xcc17('0x35')],_0x42c43f=_0x2cfa68['end'][_0xcc17('0x6')];return _0x3befaa instanceof _0x1f7b85?_0x3befaa!=_0x42c43f?null:_0x3befaa:null;}[_0xcc17('0x5')](){this[_0xcc17('0x23')](this[_0xcc17('0x33')](),this[_0xcc17('0x26')],this[_0xcc17('0x30')]),this['removeMarkers']();}['discard'](){this['_onDiscard'](this[_0xcc17('0x33')](),this[_0xcc17('0x26')],this[_0xcc17('0x30')]),this[_0xcc17('0x39')]();}[_0xcc17('0x2f')](){const _0x2a4cac=[];let _0x2d97ea=this[_0xcc17('0x2c')];for(;_0x2d97ea;)_0x2a4cac[_0xcc17('0x3b')](_0x2d97ea),_0x2d97ea=_0x2d97ea[_0xcc17('0x1a')];return _0x2a4cac;}[_0xcc17('0x3d')](_0x152f69,_0xe43c13){const _0x3adc68=_0x20b47e(this[_0xcc17('0x30')]);_0x592c4a(_0x3adc68,_0x152f69,_0xe43c13),_0x4bed17(_0x3adc68,this[_0xcc17('0x30')])||(this['attributes']=_0x3adc68,this['_onAttributesChange'](_0x3adc68));}[_0xcc17('0x21')](_0x4a4e6c){const _0x4025eb=_0x20b47e(this[_0xcc17('0x30')]);_0x20fa0b(_0x4025eb,_0x4a4e6c),_0x4bed17(_0x4025eb,this[_0xcc17('0x30')])||(this[_0xcc17('0x30')]=_0x4025eb,this[_0xcc17('0x1b')](this[_0xcc17('0x30')]));}[_0xcc17('0x7')](){return{'id':this['id'],'type':this['subType']?this[_0xcc17('0xc')]+':'+this[_0xcc17('0x2')]:this['type'],'authorId':this[_0xcc17('0x32')]['id'],'createdAt':this[_0xcc17('0x37')],'hasComments':this[_0xcc17('0x17')],'data':this[_0xcc17('0x26')],'attributes':this['attributes']};}static[_0xcc17('0x25')](){return _0x16a010()[_0xcc17('0xa')](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 _0x4327=['_itemLabels','length','_customCallbacks','add','*Remove:*\x20%0','*Set\x20format:*\x20%0','remove','type','*Merge:*\x20%0','registerDescriptionCallback','*Remove\x20format:*\x20%0','format','Container','isObject','deletion','removeFormat','data','EmptyContainer','quantity','_addDescriptionItems','nextSibling','indexOf','addFormat','Object','_schema','removeContainer','REPLACE_TEXT','map','replace','name','pop','$text','registerAttributeLabel','elementStart','get','softBreak','_handleAttributeSuggestionDescription','getFirstRange','push','insertion','_itemLabelsCallbacks','start','matchingCallback','getDescriptions','nodeAfter','_attributeLabels','isEmpty','_locale','subType','checkChild','match','join','*Split:*\x20%0','isInContent','*Insert:*\x20%0','element','set','_handleCustomCallbackDescription','removeObject','skip','elementEnd','text','previousSibling','getItemLabel','removeEmptyContainer','isEqual','addContainer','has','label','_resolveDescriptionItems','$textProxy','addObject','newValue','end','_handleInsertRemoveSuggestionDescription','item','key','$1\x20$2'];(function(_0xa23308,_0x43274d){const _0x374c56=function(_0x180751){while(--_0x180751){_0xa23308['push'](_0xa23308['shift']());}};_0x374c56(++_0x43274d);}(_0x4327,0x8e));const _0x374c=function(_0xa23308,_0x43274d){_0xa23308=_0xa23308-0x0;let _0x374c56=_0x4327[_0xa23308];return _0x374c56;};import{getTranslation as _0x50ddf5}from'./utils/common-translations';import{priorities as _0x3ec220,insertToPriorityArray as _0x5def11}from'ckeditor5/src/utils';import{renameAttributeKey as _0x48f226}from'./trackchangesediting';export default class f{constructor(_0x13b239,_0x4d7f52){this['_customCallbacks']=[],this[_0x374c('0xe')]=new Map(),this[_0x374c('0x36')]=[],this['_attributeLabels']=new Map(),this[_0x374c('0x26')]=_0x13b239,this['_locale']=_0x4d7f52;}[_0x374c('0x39')](_0x41d46a){const _0x4d0217=[],_0x3858e3=new Set(),_0x594e7a=new Set();for(let _0x4867e4=0x0;_0x4867e4<_0x41d46a['length'];_0x4867e4++){const _0x6f1f60=_0x41d46a[_0x4867e4];if(!_0x6f1f60[_0x374c('0x43')])continue;const _0x54687f=this['_handleCustomCallbackDescription'](_0x6f1f60);if(_0x54687f){if(null!=_0x6f1f60[_0x374c('0x3e')]){if(_0x3858e3[_0x374c('0x3')](_0x6f1f60[_0x374c('0x3e')]))continue;_0x3858e3['add'](_0x6f1f60['subType']);}_0x4d0217[_0x374c('0x34')](_0x54687f);}else{if('attribute'!=_0x6f1f60['type'])_0x374c('0x35')!=_0x6f1f60[_0x374c('0x15')]&&_0x374c('0x1c')!=_0x6f1f60['type']||this[_0x374c('0xa')](_0x4d0217,_0x6f1f60,_0x41d46a[_0x4867e4+0x1]);else{const _0x4b9ce6=_0x6f1f60[_0x374c('0x1e')]['key'];if(_0x594e7a[_0x374c('0x3')](_0x4b9ce6))continue;_0x594e7a[_0x374c('0x11')](_0x6f1f60['data'][_0x374c('0xc')]),_0x4b9ce6==_0x48f226?this['_handleRenameSuggestionDescription'](_0x4d0217,_0x6f1f60):this[_0x374c('0x32')](_0x4d0217,_0x6f1f60);}}}return this[_0x374c('0x5')](_0x4d0217);}[_0x374c('0x17')](_0x4221fc){this[_0x374c('0x10')]['push'](_0x4221fc);}['registerElementLabel'](_0x482807,_0x2afba3,_0x13db67=_0x3ec220['normal']){'function'==typeof _0x482807?_0x5def11(this[_0x374c('0x36')],{'matchingCallback':_0x482807,'label':_0x2afba3,'priority':_0x13db67}):this['_itemLabels'][_0x374c('0x46')](_0x482807,_0x2afba3);}[_0x374c('0x2e')](_0x233a9b,_0x304286){this[_0x374c('0x3b')]['set'](_0x233a9b,_0x304286);}[_0x374c('0x4d')](_0x2a0244,_0x1389c8=0x1){let _0x38cb48;for(const _0xe7550 of this['_itemLabelsCallbacks'])if(_0xe7550[_0x374c('0x38')](_0x2a0244)){_0x38cb48=_0xe7550[_0x374c('0x4')];break;}return _0x38cb48||(_0x38cb48=this[_0x374c('0xe')][_0x374c('0x30')](_0x2a0244[_0x374c('0x2b')])),_0x38cb48?_0x38cb48(_0x1389c8):0x1!==_0x1389c8?_0x1389c8+'\x20'+_0x2a0244[_0x374c('0x2b')]+'s':''+_0x2a0244['name'];}[_0x374c('0x21')](_0x1fc265,_0x56ac71){const _0x19ff30=_0x56ac71['getFirstRange']()['getWalker'](),_0x5e83a4='insertion'==_0x56ac71[_0x374c('0x15')]?'add':_0x374c('0x14');for(const _0x3d1cbe of _0x19ff30){const _0x190da1=_0x3d1cbe['item'],_0x12387b=_0x1fc265[_0x1fc265[_0x374c('0xf')]-0x1];if(_0x190da1['is'](_0x374c('0x6')))_0x12387b&&_0x12387b[_0x374c('0x15')][_0x374c('0x23')](_0x374c('0x1a'))>-0x1&&_0x1fc265[_0x374c('0x2c')](),_0x12387b&&_0x374c('0x4b')==_0x12387b['type']?_0x12387b[_0x5e83a4]+=_0x190da1['data']:_0x1fc265['push']({'type':_0x374c('0x4b'),'add':_0x374c('0x11')==_0x5e83a4?_0x190da1['data']:'','remove':_0x374c('0x14')==_0x5e83a4?_0x190da1[_0x374c('0x1e')]:''});else{if(this[_0x374c('0x26')][_0x374c('0x1b')](_0x190da1)){const _0x5da781=_0x190da1;if(_0x12387b&&_0x12387b[_0x374c('0x15')][_0x374c('0x23')](_0x374c('0x1a'))>-0x1&&_0x1fc265[_0x374c('0x2c')](),'elementEnd'==_0x3d1cbe[_0x374c('0x15')])continue;_0x12387b&&_0x12387b['type']==_0x5e83a4+_0x374c('0x25')&&_0x12387b[_0x374c('0x45')]['name']==_0x5da781[_0x374c('0x2b')]?_0x12387b[_0x374c('0x20')]++:_0x1fc265[_0x374c('0x34')]({'type':_0x5e83a4+'Object','element':_0x5da781,'quantity':0x1}),_0x19ff30[_0x374c('0x49')](_0xfa42f1=>!(_0x374c('0x4a')==_0xfa42f1[_0x374c('0x15')]&&_0xfa42f1[_0x374c('0xb')]==_0x190da1));}else{if(this['_schema'][_0x374c('0x3f')](_0x190da1,_0x374c('0x2d'))||_0x190da1['is'](_0x374c('0x45'),_0x374c('0x31'))){const _0x282695=_0x190da1;if('add'==_0x5e83a4&&_0x374c('0x2f')==_0x3d1cbe['type']||_0x374c('0x14')==_0x5e83a4&&_0x374c('0x4a')==_0x3d1cbe[_0x374c('0x15')])continue;if(_0x12387b&&-0x1==_0x12387b[_0x374c('0x15')][_0x374c('0x23')](_0x374c('0x1a'))){_0x374c('0x4b')==_0x12387b[_0x374c('0x15')]&&(_0x12387b[_0x5e83a4]+='\x0a');continue;}let _0x4bb020;if(_0x4bb020=_0x374c('0x11')==_0x5e83a4?_0x282695['nextSibling']&&!this[_0x374c('0x26')]['isObject'](_0x282695[_0x374c('0x22')])?_0x282695[_0x374c('0x22')]:null:_0x282695['previousSibling']&&!this[_0x374c('0x26')][_0x374c('0x1b')](_0x282695['previousSibling'])?_0x282695[_0x374c('0x4c')]:null,_0x282695[_0x374c('0x3c')]||_0x4bb020&&_0x4bb020[_0x374c('0x3c')]){const _0x852b40=_0x4bb020&&_0x4bb020[_0x374c('0x3c')]?_0x4bb020:_0x282695;_0x12387b&&_0x12387b['type']==_0x5e83a4+_0x374c('0x1f')&&_0x12387b[_0x374c('0x45')]['name']==_0x852b40['name']?_0x12387b[_0x374c('0x20')]++:_0x1fc265[_0x374c('0x34')]({'type':_0x5e83a4+_0x374c('0x1f'),'element':_0x852b40,'quantity':0x1});}else _0x1fc265[_0x374c('0x34')]({'type':_0x5e83a4+_0x374c('0x1a'),'element':_0x282695});}}}}}['_resolveDescriptionItems'](_0x363dc4){const _0x48e43e=this[_0x374c('0x3d')],_0x469479=[],_0x460308=[],_0x15af40=[];for(const _0x30784e of _0x363dc4)switch(_0x30784e[_0x374c('0x15')]){case _0x374c('0x4b'):if(_0x30784e['add']=_0x30784e[_0x374c('0x11')][_0x374c('0x2a')](/(\S)\u000A+(\S)/g,_0x374c('0xd'))['replace'](/\u000A/g,''),_0x30784e[_0x374c('0x14')]=_0x30784e[_0x374c('0x14')]['replace'](/(\S)\u000A+(\S)/g,_0x374c('0xd'))['replace'](/\u000A/g,''),''!=_0x30784e[_0x374c('0x11')]&&''!=_0x30784e['remove']){_0x469479['push']({'type':_0x374c('0x2a'),'content':_0x50ddf5(_0x48e43e,_0x374c('0x28'),['\x22'+_0x30784e[_0x374c('0x14')]+'\x22','\x22'+_0x30784e[_0x374c('0x11')]+'\x22'])});continue;}if(null!=_0x30784e[_0x374c('0x11')]['match'](/^ +$/)){_0x469479[_0x374c('0x34')]({'type':_0x374c('0x35'),'content':_0x50ddf5(_0x48e43e,'*Insert:*\x20%0',_0x50ddf5(_0x48e43e,'ELEMENT_SPACE',_0x30784e[_0x374c('0x11')][_0x374c('0xf')]))});continue;}if(null!=_0x30784e[_0x374c('0x14')][_0x374c('0x40')](/^ +$/)){_0x469479['push']({'type':_0x374c('0x1c'),'content':_0x50ddf5(_0x48e43e,_0x374c('0x12'),_0x50ddf5(_0x48e43e,'ELEMENT_SPACE',_0x30784e[_0x374c('0x14')][_0x374c('0xf')]))});continue;}if(''!=_0x30784e[_0x374c('0x11')]){_0x469479['push']({'type':_0x374c('0x35'),'content':_0x50ddf5(_0x48e43e,_0x374c('0x44'),'\x22'+_0x30784e[_0x374c('0x11')]+'\x22')});continue;}_0x469479[_0x374c('0x34')]({'type':'deletion','content':_0x50ddf5(_0x48e43e,_0x374c('0x12'),'\x22'+_0x30784e[_0x374c('0x14')]+'\x22')});continue;case'addEmptyContainer':case _0x374c('0x7'):_0x469479[_0x374c('0x34')]({'type':_0x374c('0x35'),'content':_0x50ddf5(_0x48e43e,'*Insert:*\x20%0',this[_0x374c('0x4d')](_0x30784e[_0x374c('0x45')],_0x30784e['quantity']))});continue;case _0x374c('0x0'):case _0x374c('0x48'):_0x469479[_0x374c('0x34')]({'type':'deletion','content':_0x50ddf5(_0x48e43e,'*Remove:*\x20%0',this['getItemLabel'](_0x30784e[_0x374c('0x45')],_0x30784e[_0x374c('0x20')]))});continue;case _0x374c('0x2'):_0x469479[_0x374c('0x34')]({'type':_0x374c('0x35'),'content':_0x50ddf5(_0x48e43e,_0x374c('0x42'),this['getItemLabel'](_0x30784e['element'],_0x30784e[_0x374c('0x20')]))});continue;case _0x374c('0x27'):_0x469479[_0x374c('0x34')]({'type':'deletion','content':_0x50ddf5(_0x48e43e,_0x374c('0x16'),this[_0x374c('0x4d')](_0x30784e[_0x374c('0x45')],_0x30784e[_0x374c('0x20')]))});continue;case _0x374c('0x24'):_0x460308[_0x374c('0x34')](_0x30784e[_0x374c('0xc')]);continue;case _0x374c('0x1d'):_0x15af40[_0x374c('0x34')](_0x30784e[_0x374c('0xc')]);continue;default:_0x469479[_0x374c('0x34')](_0x30784e);}if(_0x460308['length']){const _0x4dcfa8=_0x460308['map'](_0x35b81a=>this['_attributeLabels'][_0x374c('0x3')](_0x35b81a)?this[_0x374c('0x3b')][_0x374c('0x30')](_0x35b81a):_0x35b81a)['join'](',\x20');_0x469479['push']({'type':_0x374c('0x19'),'content':_0x50ddf5(this['_locale'],_0x374c('0x13'),_0x4dcfa8)});}if(_0x15af40['length']){const _0x326b00=_0x15af40[_0x374c('0x29')](_0x5cdbdf=>this[_0x374c('0x3b')][_0x374c('0x3')](_0x5cdbdf)?this[_0x374c('0x3b')][_0x374c('0x30')](_0x5cdbdf):_0x5cdbdf)[_0x374c('0x41')](',\x20');_0x469479[_0x374c('0x34')]({'type':_0x374c('0x19'),'content':_0x50ddf5(this[_0x374c('0x3d')],_0x374c('0x18'),_0x326b00)});}return _0x469479;}[_0x374c('0x47')](_0x4472be){for(const _0x1b0d82 of this[_0x374c('0x10')]){const _0x1ed451=_0x1b0d82(_0x4472be);if(_0x1ed451&&_0x374c('0x15')in _0x1ed451)return _0x1ed451;}}['_handleAttributeSuggestionDescription'](_0x37b466,_0x9fa12e){const _0x37b42a=_0x9fa12e[_0x374c('0x1e')],_0x180f17=void 0x0===_0x37b42a[_0x374c('0x8')]?_0x374c('0x1d'):_0x374c('0x24');_0x37b466[_0x374c('0x34')]({'type':_0x180f17,'key':_0x37b42a[_0x374c('0xc')]});}['_handleRenameSuggestionDescription'](_0x20c5f0,_0x4433a8){_0x20c5f0[_0x374c('0x34')]({'type':_0x374c('0x19'),'content':_0x50ddf5(this[_0x374c('0x3d')],'*Change\x20to:*\x20%0',this[_0x374c('0x4d')](_0x4433a8['getFirstRange']()[_0x374c('0x37')][_0x374c('0x3a')],0x1))});}[_0x374c('0xa')](_0x5b1b26,_0x187941,_0x293bb9){if(this[_0x374c('0x21')](_0x5b1b26,_0x187941),_0x293bb9&&_0x293bb9[_0x374c('0x33')]()&&!_0x187941[_0x374c('0x33')]()[_0x374c('0x9')][_0x374c('0x1')](_0x293bb9[_0x374c('0x33')]()[_0x374c('0x37')])){const _0x3f0faa=_0x5b1b26[_0x5b1b26[_0x374c('0xf')]-0x1],_0x24dcf6=_0x374c('0x35')==_0x187941[_0x374c('0x15')]?_0x374c('0x11'):_0x374c('0x14');_0x3f0faa&&_0x374c('0x4b')==_0x3f0faa[_0x374c('0x15')]&&(_0x3f0faa[_0x24dcf6]+='\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 _0xe090=['getSuggestion','addSuggestionData','TrackChanges','plugins','addSuggestion','editor','get','pluginName','adapter','requires','Comments'];(function(_0x2a96a6,_0xe090da){var _0x1d475f=function(_0x49d81d){while(--_0x49d81d){_0x2a96a6['push'](_0x2a96a6['shift']());}};_0x1d475f(++_0xe090da);}(_0xe090,0x117));var _0x1d47=function(_0x2a96a6,_0xe090da){_0x2a96a6=_0x2a96a6-0x0;var _0x1d475f=_0xe090[_0x2a96a6];return _0x1d475f;};import{Plugin as _0x3e4131}from'ckeditor5/src/core';import _0x4d10ce from'./trackchangesui';import _0x286c6a from'./trackchangesediting';import'ckeditor5-collaboration/src/collaboration-core';export default class k extends _0x3e4131{static get[_0x1d47('0x5')](){return[_0x286c6a,_0x4d10ce,_0x1d47('0x6')];}static get[_0x1d47('0x3')](){return _0x1d47('0x9');}set[_0x1d47('0x4')](_0x50b1a8){this[_0x1d47('0x1')]['plugins']['get'](_0x286c6a)[_0x1d47('0x4')]=_0x50b1a8;}get[_0x1d47('0x4')](){return this[_0x1d47('0x1')][_0x1d47('0xa')][_0x1d47('0x2')](_0x286c6a)[_0x1d47('0x4')];}[_0x1d47('0x0')](_0x319c35){return this['editor'][_0x1d47('0xa')]['get'](_0x286c6a)[_0x1d47('0x8')](_0x319c35);}['getSuggestions']({skipNotAttached:_0x3cdfa6=!0x1,toJSON:_0xfd3fa9=!0x1}={}){return this['editor'][_0x1d47('0xa')][_0x1d47('0x2')](_0x286c6a)['getSuggestions']({'skipNotAttached':_0x3cdfa6,'toJSON':_0xfd3fa9});}[_0x1d47('0x7')](_0x177a6f){return this[_0x1d47('0x1')]['plugins'][_0x1d47('0x2')](_0x286c6a)[_0x1d47('0x7')](_0x177a6f);}}
|
|
@@ -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 _0x5730=['createDocumentFragment','getSuggestions','TrackChangesData','function','requires','rootsAttributes','destroy','acceptAllSuggestions','get','getRootNames','useAnonymousUser','editor','CommentsRepository','set','TrackChangesEditing','getDataWithAcceptedSuggestions','define','div','reduce','plugins','_adapter','editorCreator','create','model','execute','users','map','trackChangesData.editorCreator','document','config','data','createElement','getUser','Users','getRootsAttributes','end','getFullData','trackChangesData','addUser'];(function(_0x21b085,_0x573062){const _0x5ea1fc=function(_0x2a2d03){while(--_0x2a2d03){_0x21b085['push'](_0x21b085['shift']());}};_0x5ea1fc(++_0x573062);}(_0x5730,0xf1));const _0x5ea1=function(_0x21b085,_0x573062){_0x21b085=_0x21b085-0x0;let _0x5ea1fc=_0x5730[_0x21b085];return _0x5ea1fc;};import{Plugin as _0x57e92b}from'ckeditor5/src/core';import{CKEditorError as _0x26a2e3}from'ckeditor5/src/utils';import _0x33e899 from'./trackchangesediting';import{sanitizeEditorConfig as _0x4812e2}from'ckeditor5-collaboration/src/collaboration-core';const T=['Pagination'];export default class P extends _0x57e92b{static get[_0x5ea1('0x24')](){return[_0x33e899];}static get['pluginName'](){return _0x5ea1('0x22');}['init'](){const _0x59f840=this[_0x5ea1('0x4')];if(_0x59f840[_0x5ea1('0x16')][_0x5ea1('0x9')](_0x5ea1('0x14'),_0x383162=>{const _0x537e30=_0x59f840[_0x5ea1('0x10')][_0x5ea1('0x15')][_0x5ea1('0x2')]()['reduce']((_0x3fee95,_0x3811da)=>(_0x3fee95[_0x3811da]='',_0x3fee95),{});return _0x59f840['constructor'][_0x5ea1('0xf')](_0x537e30,_0x383162);}),_0x5ea1('0x23')!=typeof _0x59f840['config'][_0x5ea1('0x1')](_0x5ea1('0x1e'))[_0x5ea1('0xe')])throw new _0x26a2e3('track-changes-data-invalid-editor-creator');}[_0x5ea1('0x8')](_0x58f81a){return N(this[_0x5ea1('0x4')],!0x0,_0x58f81a);}['getDataWithDiscardedSuggestions'](_0x20eaf2){return N(this[_0x5ea1('0x4')],!0x1,_0x20eaf2);}}class D extends _0x57e92b{static get['pluginName'](){return'TrackChangesDataGetter';}constructor(_0x1f2944){super(_0x1f2944),this['result']=_0x5ea1('0x1c');}['init'](){this['editor'][_0x5ea1('0xc')][_0x5ea1('0x1')](_0x5ea1('0x5'))[_0x5ea1('0xd')]={'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['editor'][_0x5ea1('0xc')]['get'](_0x5ea1('0x7'))['_adapter']=null;}}function v(_0x1a36ee){return void 0x0!==_0x1a36ee[_0x5ea1('0x1b')];}async function N(_0x3e2820,_0x526a99,_0x44310c){const _0x4b652b=_0x4812e2(_0x3e2820,T);_0x4b652b[_0x5ea1('0xc')]['push'](_0x33e899,D),_0x4b652b[_0x5ea1('0x25')]=v(_0x3e2820)?_0x3e2820[_0x5ea1('0x1b')]():void 0x0;const _0x3ba626=document[_0x5ea1('0x20')](),_0x654202=_0x3e2820['config'][_0x5ea1('0x1')](_0x5ea1('0x1e'))[_0x5ea1('0xe')],_0x21c45a=await _0x654202(_0x4b652b,()=>function(_0x35d89e){const _0x377df2=document[_0x5ea1('0x18')](_0x5ea1('0xa'));return _0x35d89e['appendChild'](_0x377df2),_0x377df2;}(_0x3ba626));!function(_0x280198,_0x4696ac){const _0x14d8bf=_0x280198[_0x5ea1('0x10')]['document'][_0x5ea1('0x2')]()[_0x5ea1('0xb')]((_0x2944a9,_0x326fa7)=>(_0x2944a9[_0x326fa7]=_0x280198[_0x5ea1('0x17')][_0x5ea1('0x1')]({'rootName':_0x326fa7}),_0x2944a9),{}),_0x47e123=_0x280198[_0x5ea1('0xc')][_0x5ea1('0x1')](_0x5ea1('0x1a'))[_0x5ea1('0x12')][_0x5ea1('0x13')](_0x48ca08=>({'id':_0x48ca08['id'],'name':_0x48ca08['name']})),_0x2d2562=_0x280198['plugins'][_0x5ea1('0x1')](_0x5ea1('0x7'))[_0x5ea1('0x21')]({'skipNotAttached':!0x0,'toJSON':!0x0}),_0xa2d37=_0x4696ac[_0x5ea1('0xc')][_0x5ea1('0x1')]('Users'),_0x2a59ac=_0x4696ac[_0x5ea1('0xc')][_0x5ea1('0x1')](_0x5ea1('0x7'));for(const _0x3ce386 of _0x47e123)_0xa2d37[_0x5ea1('0x19')](_0x3ce386['id'])||_0xa2d37[_0x5ea1('0x1f')](_0x3ce386);_0xa2d37['me']||_0xa2d37[_0x5ea1('0x3')]();for(const _0xe85aee of _0x2d2562)_0x2a59ac['addSuggestionData'](_0xe85aee);_0x4696ac[_0x5ea1('0x17')][_0x5ea1('0x6')](_0x14d8bf);}(_0x3e2820,_0x21c45a),_0x21c45a[_0x5ea1('0x11')](_0x526a99?_0x5ea1('0x0'):'discardAllSuggestions');const _0x4d465a=v(_0x21c45a)?_0x21c45a[_0x5ea1('0x1d')](_0x44310c):_0x21c45a[_0x5ea1('0x17')][_0x5ea1('0x1')](_0x44310c);return await _0x21c45a[_0x5ea1('0x26')](),_0x4d465a;}
|
|
@@ -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
|
};
|