@ckeditor/ckeditor5-track-changes 38.2.0-alpha.1 → 39.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/build/track-changes.js +2 -2
- package/build/translations/gl.js +1 -1
- package/build/translations/sq.js +1 -0
- package/lang/translations/gl.po +23 -23
- package/lang/translations/sq.po +487 -0
- package/package.json +4 -5
- package/src/augmentation.d.ts +6 -2
- package/src/augmentation.js +1 -1
- package/src/commands/acceptsuggestioncommand.d.ts +6 -2
- package/src/commands/acceptsuggestioncommand.js +2 -2
- package/src/commands/discardsuggestioncommand.d.ts +6 -2
- package/src/commands/discardsuggestioncommand.js +2 -2
- package/src/commands/executeonallsuggestionscommand.d.ts +6 -2
- package/src/commands/executeonallsuggestionscommand.js +2 -2
- package/src/commands/executeonselectedsuggestionscommand.d.ts +6 -2
- package/src/commands/executeonselectedsuggestionscommand.js +2 -2
- package/src/commands/trackchangescommand.d.ts +5 -1
- package/src/commands/trackchangescommand.js +2 -2
- package/src/index.d.ts +16 -12
- package/src/index.js +2 -2
- package/src/integrations/alignment.d.ts +5 -1
- package/src/integrations/alignment.js +2 -2
- package/src/integrations/basicstyles.d.ts +5 -1
- package/src/integrations/basicstyles.js +2 -2
- package/src/integrations/blockquote.d.ts +5 -1
- package/src/integrations/blockquote.js +2 -2
- package/src/integrations/ckbox.d.ts +5 -1
- package/src/integrations/ckbox.js +2 -2
- package/src/integrations/codeblock.d.ts +5 -1
- package/src/integrations/codeblock.js +2 -2
- package/src/integrations/comments.d.ts +5 -1
- package/src/integrations/comments.js +2 -2
- package/src/integrations/deletecommand.d.ts +6 -2
- package/src/integrations/deletecommand.js +2 -2
- package/src/integrations/documentlist.d.ts +5 -1
- package/src/integrations/documentlist.js +2 -2
- package/src/integrations/documentlistproperties.d.ts +7 -3
- package/src/integrations/documentlistproperties.js +2 -2
- package/src/integrations/entercommand.d.ts +6 -2
- package/src/integrations/entercommand.js +2 -2
- package/src/integrations/findandreplace.d.ts +5 -1
- package/src/integrations/findandreplace.js +2 -2
- package/src/integrations/font.d.ts +5 -1
- package/src/integrations/font.js +2 -2
- package/src/integrations/formatpainter.d.ts +5 -1
- package/src/integrations/formatpainter.js +2 -2
- package/src/integrations/heading.d.ts +5 -1
- package/src/integrations/heading.js +2 -2
- package/src/integrations/highlight.d.ts +5 -1
- package/src/integrations/highlight.js +2 -2
- package/src/integrations/horizontalline.d.ts +5 -1
- package/src/integrations/horizontalline.js +2 -2
- package/src/integrations/htmlembed.d.ts +5 -1
- package/src/integrations/htmlembed.js +2 -2
- package/src/integrations/image.d.ts +5 -1
- package/src/integrations/image.js +2 -2
- package/src/integrations/imagereplace.d.ts +7 -3
- package/src/integrations/imagereplace.js +2 -2
- package/src/integrations/importword.d.ts +5 -1
- package/src/integrations/importword.js +2 -2
- package/src/integrations/indent.d.ts +5 -1
- package/src/integrations/indent.js +2 -2
- package/src/integrations/inputcommand.d.ts +6 -2
- package/src/integrations/inputcommand.js +2 -2
- package/src/integrations/link.d.ts +5 -1
- package/src/integrations/link.js +2 -2
- package/src/integrations/list.d.ts +5 -1
- package/src/integrations/list.js +2 -2
- package/src/integrations/listproperties.d.ts +7 -3
- package/src/integrations/listproperties.js +2 -2
- package/src/integrations/mediaembed.d.ts +5 -1
- package/src/integrations/mediaembed.js +2 -2
- package/src/integrations/mention.d.ts +5 -1
- package/src/integrations/mention.js +2 -2
- package/src/integrations/pagebreak.d.ts +5 -1
- package/src/integrations/pagebreak.js +2 -2
- package/src/integrations/paragraph.d.ts +5 -1
- package/src/integrations/paragraph.js +2 -2
- package/src/integrations/removeformat.d.ts +5 -1
- package/src/integrations/removeformat.js +2 -2
- package/src/integrations/restrictededitingmode.d.ts +5 -1
- package/src/integrations/restrictededitingmode.js +2 -2
- package/src/integrations/shiftentercommand.d.ts +6 -2
- package/src/integrations/shiftentercommand.js +2 -2
- package/src/integrations/standardeditingmode.d.ts +5 -1
- package/src/integrations/standardeditingmode.js +2 -2
- package/src/integrations/style.d.ts +5 -1
- package/src/integrations/style.js +2 -2
- package/src/integrations/table.d.ts +5 -1
- package/src/integrations/table.js +2 -2
- package/src/integrations/tablecaption.d.ts +6 -2
- package/src/integrations/tablecaption.js +2 -2
- package/src/integrations/tableclipboard.d.ts +4 -3
- package/src/integrations/tableclipboard.js +2 -2
- package/src/integrations/tablecolumnresize.d.ts +8 -4
- package/src/integrations/tablecolumnresize.js +2 -2
- package/src/integrations/tableheadings.d.ts +6 -2
- package/src/integrations/tableheadings.js +2 -2
- package/src/integrations/tablemergesplit.d.ts +6 -2
- package/src/integrations/tablemergesplit.js +2 -2
- package/src/integrations/tableofcontents.d.ts +5 -1
- package/src/integrations/tableofcontents.js +2 -2
- package/src/integrations/tableproperties.d.ts +8 -4
- package/src/integrations/tableproperties.js +2 -2
- package/src/integrations/template.d.ts +5 -1
- package/src/integrations/template.js +2 -2
- package/src/integrations/title.d.ts +5 -1
- package/src/integrations/title.js +2 -2
- package/src/integrations/undo.d.ts +5 -1
- package/src/integrations/undo.js +2 -2
- package/src/integrations/utils.d.ts +7 -3
- package/src/integrations/utils.js +2 -2
- package/src/suggestion.d.ts +15 -5
- package/src/suggestion.js +2 -2
- package/src/suggestiondescriptionfactory.d.ts +5 -5
- package/src/suggestiondescriptionfactory.js +2 -2
- package/src/trackchanges.d.ts +10 -6
- package/src/trackchanges.js +2 -2
- package/src/trackchangesconfig.d.ts +5 -1
- package/src/trackchangesconfig.js +1 -1
- package/src/trackchangesdata.d.ts +6 -2
- package/src/trackchangesdata.js +2 -2
- package/src/trackchangesediting.d.ts +55 -51
- package/src/trackchangesediting.js +2 -2
- package/src/trackchangesui.d.ts +7 -3
- package/src/trackchangesui.js +2 -2
- package/src/ui/suggestioncontroller.d.ts +7 -6
- package/src/ui/suggestioncontroller.js +2 -2
- package/src/ui/view/basesuggestionthreadview.d.ts +10 -6
- package/src/ui/view/basesuggestionthreadview.js +2 -2
- package/src/ui/view/suggestionthreadview.d.ts +7 -7
- package/src/ui/view/suggestionthreadview.js +2 -2
- package/src/utils/common-translations.d.ts +5 -1
- package/src/utils/common-translations.js +2 -2
- package/src/utils/utils.d.ts +8 -4
- package/src/utils/utils.js +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2275=['change','mergeTableCells','push','accept','trackChanges','splitTableCellHorizontally','containsRange','enableCommand','registerDescriptionCallback','low','afterInit','mergeTableCellUp','getSuggestions','editor','author','isEnabled','setSelection','getFirstPosition','TableUtils','getSelectionAffectedTableCells','from','TableEditing','*Split\x20cell:*\x20horizontally','TrackChangesEditing','map','filter','table','splitTableCellVertically','set:isEnabled','document','mergeTableCellRight','type','add','plugins','refresh','stop','has','_acceptFormatSuggestionCallbackFactory','markMultiRangeBlockFormat','commands','insertion','size','createTableWalker','value','$graveyard','cell','length','fromRange','element','requires','mergeTableCellDown','model','format','detach','find','direction','forceDefaultExecution','isInContent','selection','mergeTableCellLeft','formatBlock','highest','root','_descriptionFactory','commandName','getAncestors','getRanges','locale','createRangeOn','getCellLocation','_areMergableCells','horizontally','_tablePostFixingSubtypes','_suggestionFactory','_areSelectedCellsMergable','execute','get'];(function(_0x146a77,_0x2275bb){const _0x2b9004=function(_0x2260ef){while(--_0x2260ef){_0x146a77['push'](_0x146a77['shift']());}};_0x2b9004(++_0x2275bb);}(_0x2275,0xb9));const _0x2b90=function(_0x146a77,_0x2275bb){_0x146a77=_0x146a77-0x0;let _0x2b9004=_0x2275[_0x146a77];return _0x2b9004;};import{Plugin as _0xa1ccec}from'ckeditor5/src/core';import _0x351fbc from'./table';import{LiveRange as _0x568f5d}from'ckeditor5/src/engine';import{getTranslation as _0x150c1b}from'../utils/common-translations';export default class dt extends _0xa1ccec{static get[_0x2b90('0x12')](){return[_0x351fbc];}[_0x2b90('0x38')](){const _0x4c0d73=this[_0x2b90('0x3b')],_0x291e3c=_0x4c0d73[_0x2b90('0x14')][_0x2b90('0x4b')][_0x2b90('0x1b')],_0x2326cd=_0x4c0d73[_0x2b90('0x24')];if(!_0x4c0d73[_0x2b90('0x2')][_0x2b90('0x5')](_0x2b90('0x43')))return;const _0x5cffa1=_0x4c0d73['plugins'][_0x2b90('0x2d')](_0x2b90('0x45')),_0x4d45c7=_0x4c0d73[_0x2b90('0x2')][_0x2b90('0x2d')]('TableUtils'),_0x245faf=_0x4c0d73[_0x2b90('0x2')][_0x2b90('0x2d')](_0x351fbc);_0x245faf[_0x2b90('0x29')][_0x2b90('0x30')]('mergeTableCells'),_0x5cffa1[_0x2b90('0x35')](_0x2b90('0x2f'),()=>{const _0x32331d=_0x4d45c7['getSelectionAffectedTableCells'](_0x4c0d73[_0x2b90('0x14')][_0x2b90('0x4b')][_0x2b90('0x1b')]);_0x4c0d73['model'][_0x2b90('0x2e')](()=>{_0x5cffa1[_0x2b90('0x7')](_0x32331d,{'commandName':_0x2b90('0x2f'),'commandParams':[]},[],_0x2b90('0x2f'));});}),_0x4c0d73[_0x2b90('0x8')][_0x2b90('0x2d')]('mergeTableCells')['on'](_0x2b90('0x2c'),(_0x58620f,_0x273665)=>{_0x4c0d73[_0x2b90('0x8')]['get'](_0x2b90('0x32'))[_0x2b90('0xc')]&&(_0x273665[_0x2b90('0xf')]>0x0&&_0x273665[_0x273665[_0x2b90('0xf')]-0x1]&&_0x273665[_0x273665[_0x2b90('0xf')]-0x1][_0x2b90('0x19')]||_0x5cffa1['_isForcedDefaultExecutionBlock']||this[_0x2b90('0x2b')]()||_0x58620f[_0x2b90('0x4')]());},{'priority':_0x2b90('0x1e')});for(const _0x2efea2 of[_0x2b90('0x39'),'mergeTableCellRight',_0x2b90('0x13'),_0x2b90('0x1c')]){const _0x53b15e=_0x4c0d73[_0x2b90('0x8')][_0x2b90('0x2d')](_0x2efea2);_0x5cffa1[_0x2b90('0x35')](_0x2efea2,()=>{const _0x39abf1=_0x4c0d73[_0x2b90('0x14')][_0x2b90('0x4b')][_0x2b90('0x1b')][_0x2b90('0x3f')]()[_0x2b90('0x22')]()[_0x2b90('0x17')](_0x59dd9e=>_0x59dd9e['is'](_0x2b90('0x11'),'tableCell')),_0x17c9db=_0x53b15e[_0x2b90('0xc')];_0x4c0d73[_0x2b90('0x14')][_0x2b90('0x2e')](()=>{_0x5cffa1[_0x2b90('0x7')]([_0x39abf1,_0x17c9db],{'commandName':'mergeTableCells','commandParams':[]},[],_0x2b90('0x2f'));});});}for(const _0x4294ae of[_0x2b90('0x49'),_0x2b90('0x33')]){const _0x560949=_0x4c0d73[_0x2b90('0x8')][_0x2b90('0x2d')](_0x4294ae);_0x5cffa1[_0x2b90('0x35')](_0x4294ae,()=>{const _0x24c75d=_0x4d45c7[_0x2b90('0x41')](_0x4c0d73[_0x2b90('0x14')][_0x2b90('0x4b')][_0x2b90('0x1b')])[0x0],_0x52cdce=_0x24c75d['findAncestor'](_0x2b90('0x48')),{column:_0x1686f9,row:_0xc87f22}=_0x4d45c7[_0x2b90('0x26')](_0x24c75d);let _0x48e3f8=[];if(_0x2b90('0x28')==_0x560949[_0x2b90('0x18')]){const _0x160e21=_0x4d45c7[_0x2b90('0xb')](_0x52cdce,{'startRow':_0xc87f22,'endRow':_0xc87f22,'includeAllSlots':!0x0});_0x48e3f8=Array['from'](_0x160e21)[_0x2b90('0x46')](_0x34c29c=>_0x34c29c[_0x2b90('0xe')]);}else{const _0x3558f8=_0x4d45c7[_0x2b90('0xb')](_0x52cdce,{'column':_0x1686f9,'includeAllSlots':!0x0});_0x48e3f8=Array['from'](_0x3558f8)[_0x2b90('0x46')](_0x2baab8=>_0x2baab8[_0x2b90('0xe')]);}_0x4c0d73['model'][_0x2b90('0x2e')](_0xad188=>{_0x5cffa1['markBlockFormat'](_0xad188[_0x2b90('0x25')](_0x24c75d),{'commandName':_0x4294ae,'commandParams':[]},_0x48e3f8,_0x4294ae);});});}_0x5cffa1[_0x2b90('0x20')][_0x2b90('0x36')](_0x19243f=>{const {data:_0x7bde98}=_0x19243f;if(_0x7bde98)return'mergeTableCells'==_0x7bde98[_0x2b90('0x21')]?{'type':'format','content':_0x150c1b(_0x2326cd,'*Merge\x20cells*')}:void 0x0;}),_0x5cffa1[_0x2b90('0x20')][_0x2b90('0x36')](_0x32b4b0=>{const {data:_0x3e604f}=_0x32b4b0;if(_0x3e604f)return'splitTableCellVertically'==_0x3e604f['commandName']?{'type':_0x2b90('0x15'),'content':_0x150c1b(_0x2326cd,'*Split\x20cell:*\x20vertically')}:'splitTableCellHorizontally'==_0x3e604f['commandName']?{'type':'format','content':_0x150c1b(_0x2326cd,_0x2b90('0x44'))}:void 0x0;});const _0x312499=_0x245faf[_0x2b90('0x6')]();for(const _0x45aea5 of[_0x2b90('0x39'),_0x2b90('0x4c'),_0x2b90('0x13'),_0x2b90('0x1c')])_0x5cffa1[_0x2b90('0x2a')]['registerCustomCallback'](_0x2b90('0x1d'),_0x45aea5,'accept',_0x312499);for(const _0x198d5e of['splitTableCellVertically','splitTableCellHorizontally'])_0x5cffa1[_0x2b90('0x2a')]['registerCustomCallback'](_0x2b90('0x1d'),_0x198d5e,'accept',_0x312499);_0x5cffa1[_0x2b90('0x2a')]['registerCustomCallback']('formatBlock',_0x2b90('0x2f'),_0x2b90('0x31'),_0x2f1713=>{_0x4c0d73[_0x2b90('0x14')][_0x2b90('0x2e')](_0x17b7f0=>{const _0x1ef690=Array[_0x2b90('0x42')](_0x291e3c['getRanges']())['map'](_0x45d101=>_0x568f5d[_0x2b90('0x10')](_0x45d101));_0x17b7f0[_0x2b90('0x3e')](_0x2f1713),_0x4c0d73[_0x2b90('0x8')][_0x2b90('0x2d')](_0x2b90('0x2f'))[_0x2b90('0x3')](),_0x4c0d73['execute']('mergeTableCells',{'forceDefaultExecution':!0x0});const _0x1c45bc=_0x1ef690[_0x2b90('0x47')](_0x21c769=>_0x2b90('0xd')!=_0x21c769[_0x2b90('0x1f')]['rootName']);_0x1c45bc[_0x2b90('0xf')]>0x0&&_0x17b7f0[_0x2b90('0x3e')](_0x1c45bc);for(const _0x7371a9 of _0x1ef690)_0x7371a9[_0x2b90('0x16')]();});});for(const _0x4622ea of[_0x2b90('0x39'),_0x2b90('0x13'),_0x2b90('0x1c'),_0x2b90('0x4c')]){const _0x5a2a63=_0x4c0d73[_0x2b90('0x8')][_0x2b90('0x2d')](_0x4622ea);_0x5a2a63['on'](_0x2b90('0x4a'),(_0x565a60,_0x433d41,_0x3f29a2)=>{if(_0x3f29a2){const _0x59ffea=_0x4c0d73[_0x2b90('0x14')]['document'][_0x2b90('0x1b')][_0x2b90('0x3f')]()[_0x2b90('0x22')]()[_0x2b90('0x17')](_0xcdf9cf=>_0xcdf9cf['is'](_0x2b90('0x11'),'tableCell'));this['_areMergableCells'](_0x5a2a63[_0x2b90('0xc')],_0x59ffea)||(_0x565a60['return']=!0x1,_0x565a60['stop']());}},{'priority':_0x2b90('0x37')});}}[_0x2b90('0x2b')](){const _0x1be891=this[_0x2b90('0x3b')]['commands'][_0x2b90('0x2d')]('mergeTableCells'),_0x3dee9e=this[_0x2b90('0x3b')][_0x2b90('0x2')][_0x2b90('0x2d')](_0x2b90('0x40'));if(!_0x1be891[_0x2b90('0x3d')])return!0x1;const _0x196422=_0x3dee9e[_0x2b90('0x41')](this[_0x2b90('0x3b')][_0x2b90('0x14')][_0x2b90('0x4b')][_0x2b90('0x1b')]);for(const _0x9438f5 of _0x196422)for(const _0x1922ed of _0x196422)if(_0x9438f5!=_0x1922ed&&!this[_0x2b90('0x27')](_0x9438f5,_0x1922ed))return!0x1;return!0x0;}[_0x2b90('0x27')](_0x4d67e0,_0x53bf30){const _0x1c650a=this['editor'][_0x2b90('0x2')]['get'](_0x2b90('0x45')),_0xdd6aaf=this['editor'][_0x2b90('0x14')][_0x2b90('0x25')](_0x4d67e0),_0x1b9653=this['editor'][_0x2b90('0x14')][_0x2b90('0x25')](_0x53bf30),_0xb69dec=new Set(),_0xc77dab=new Set();for(const _0x246c88 of _0x1c650a[_0x2b90('0x3a')]())if((_0x2b90('0x9')==_0x246c88[_0x2b90('0x0')]||'deletion'==_0x246c88['type']||_0x2b90('0x2f')==_0x246c88['subType'])&&_0x246c88[_0x2b90('0x1a')])for(const _0x20f56e of _0x246c88[_0x2b90('0x23')]())_0x20f56e[_0x2b90('0x34')](_0xdd6aaf,!0x0)&&_0xb69dec[_0x2b90('0x1')](_0x246c88[_0x2b90('0x0')]+':'+_0x246c88['author']['id']),_0x20f56e[_0x2b90('0x34')](_0x1b9653,!0x0)&&_0xc77dab[_0x2b90('0x1')](_0x246c88[_0x2b90('0x0')]+':'+_0x246c88[_0x2b90('0x3c')]['id']);if(_0xb69dec[_0x2b90('0xa')]!=_0xc77dab[_0x2b90('0xa')])return!0x1;for(const _0x46aec2 of _0xb69dec)if(!_0xc77dab['has'](_0x46aec2))return!0x1;return!0x0;}}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @module track-changes/integrations/tableofcontents
|
|
3
7
|
*/
|
|
4
|
-
import { Plugin } from 'ckeditor5/src/core
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
5
9
|
/**
|
|
6
10
|
* Provides track changes plugin integration for the Table of contents feature.
|
|
7
11
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x59f1=['TrackChangesEditing','locale','_descriptionFactory','plugins','get','ELEMENT_TABLE_OF_CONTENTS','enableCommand','afterInit','commands','editor','registerElementLabel','insertTableOfContents','tableOfContents'];(function(_0x26537a,_0x59f155){const _0x1d8c4b=function(_0x28a133){while(--_0x28a133){_0x26537a['push'](_0x26537a['shift']());}};_0x1d8c4b(++_0x59f155);}(_0x59f1,0x105));const _0x1d8c=function(_0x26537a,_0x59f155){_0x26537a=_0x26537a-0x0;let _0x1d8c4b=_0x59f1[_0x26537a];return _0x1d8c4b;};import{Plugin as _0x4526a7}from'ckeditor5/src/core';import{getTranslation as _0x1086b5}from'../utils/common-translations';export default class bt extends _0x4526a7{[_0x1d8c('0x6')](){const _0x24fbab=this[_0x1d8c('0x8')];if(!_0x24fbab[_0x1d8c('0x7')][_0x1d8c('0x3')]('insertTableOfContents'))return;_0x24fbab['plugins'][_0x1d8c('0x3')](_0x1d8c('0xc'))[_0x1d8c('0x5')](_0x1d8c('0xa'));const _0x479cf2=_0x24fbab[_0x1d8c('0x2')][_0x1d8c('0x3')](_0x1d8c('0xc')),_0x20a42f=_0x24fbab[_0x1d8c('0x0')];_0x479cf2[_0x1d8c('0x1')][_0x1d8c('0x9')](_0x1d8c('0xb'),_0x18b75e=>_0x1086b5(_0x20a42f,_0x1d8c('0x4'),_0x18b75e));}}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @module track-changes/integrations/tableproperties
|
|
3
7
|
*/
|
|
4
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core
|
|
5
|
-
import type { Range } from 'ckeditor5/src/engine
|
|
6
|
-
import type { default as Suggestion } from '../suggestion
|
|
7
|
-
import type { Description } from '../suggestiondescriptionfactory
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
9
|
+
import type { Range } from 'ckeditor5/src/engine';
|
|
10
|
+
import type { default as Suggestion } from '../suggestion';
|
|
11
|
+
import type { Description } from '../suggestiondescriptionfactory';
|
|
8
12
|
/**
|
|
9
13
|
* Provides track changes plugin integration for table properties feature.
|
|
10
14
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5ee1=['registerCustomCallback','commandParams','TrackChangesEditing','tableCellHeight','_descriptionFactory','nodeAfter','getSuggestions','selection','discard','change','_suggestionFactory','getContainedElement','tableWidth','tableCellBorderStyle','handleDiscardAction','_getSuggestion','locale','tableCellVerticalAlignment','format','handleSuggestionDescription','tableCellBackgroundColor','TablePropertiesEditing','join','TrackChangesTableProperties','enqueueChange','has','tableProperties','removeAttribute','document','tableCellProperties','model','table','tableBorderColor','get','tableCellBorderWidth','tableBackgroundColor','plugins','registerDescriptionCallback','setAttribute','TableUtils','getAttribute','_handlePropertyChange','formatBlock','markBlockFormat','enableCommand','pluginName','afterInit','*Format:*\x20change\x20table\x20properties','editor','tableCellWidth'];(function(_0x107f2c,_0x5ee136){const _0x4f29af=function(_0x2b1a44){while(--_0x2b1a44){_0x107f2c['push'](_0x107f2c['shift']());}};_0x4f29af(++_0x5ee136);}(_0x5ee1,0xa9));const _0x4f29=function(_0x107f2c,_0x5ee136){_0x107f2c=_0x107f2c-0x0;let _0x4f29af=_0x5ee1[_0x107f2c];return _0x4f29af;};import{Plugin as _0x48849a}from'ckeditor5/src/core';import{getTranslation as _0x453e3e}from'../utils/common-translations';export default class Ct extends _0x48849a{constructor(_0x351fd2){super(_0x351fd2),this[_0x4f29('0x7')]=[_0x4f29('0xd'),'tableBorderStyle','tableBorderWidth','tableAlignment',_0x4f29('0x2b'),'tableHeight',_0x4f29('0x10')],this[_0x4f29('0xa')]=['tableCellBorderColor',_0x4f29('0x2c'),_0x4f29('0xf'),'tableCellPadding',_0x4f29('0x1e'),_0x4f29('0x22'),_0x4f29('0x1'),'tableCellHorizontalAlignment',_0x4f29('0x30')];}static get[_0x4f29('0x1a')](){return _0x4f29('0x4');}[_0x4f29('0x1b')](){const _0x1851d5=this['editor']['plugins'][_0x4f29('0xe')](_0x4f29('0x21'));if(this[_0x4f29('0x1d')][_0x4f29('0x11')][_0x4f29('0x6')](_0x4f29('0x2'))){for(const _0x1e54a1 of this[_0x4f29('0x7')])_0x1851d5['enableCommand'](_0x1e54a1,(_0x43808f,_0x23d1b3)=>{const _0x5c4943=this[_0x4f29('0x1d')][_0x4f29('0xb')]['document'][_0x4f29('0x26')]['getFirstPosition']()['findAncestor'](_0x4f29('0xc'));this[_0x4f29('0x16')](_0x1e54a1,[_0x5c4943],this[_0x4f29('0x7')],_0x4f29('0x7'),_0x43808f,_0x23d1b3);});_0x1851d5[_0x4f29('0x29')]['registerCustomCallback']('formatBlock',_0x4f29('0x7'),'accept',_0x1851d5[_0x4f29('0x29')]['getSuggestionCallback'](_0x4f29('0x17'),null,_0x4f29('0x27'))),_0x1851d5['_suggestionFactory']['registerCustomCallback'](_0x4f29('0x17'),'tableProperties',_0x4f29('0x27'),(_0x4e329a,_0x5da964)=>this[_0x4f29('0x2d')](this[_0x4f29('0x7')],_0x4e329a,_0x5da964)),_0x1851d5[_0x4f29('0x29')][_0x4f29('0x1f')](_0x4f29('0x17'),_0x4f29('0x7'),_0x4f29('0x3'),()=>!0x1);}if(this[_0x4f29('0x1d')][_0x4f29('0x11')][_0x4f29('0x6')]('TableCellPropertiesEditing')){for(const _0x4b4f45 of this[_0x4f29('0xa')])_0x1851d5[_0x4f29('0x19')](_0x4b4f45,(_0x5abef9,_0xac08ce)=>{const _0x52a99c=this[_0x4f29('0x1d')][_0x4f29('0x11')][_0x4f29('0xe')](_0x4f29('0x14'))['getSelectionAffectedTableCells'](this[_0x4f29('0x1d')][_0x4f29('0xb')][_0x4f29('0x9')][_0x4f29('0x26')]);this[_0x4f29('0x16')](_0x4b4f45,_0x52a99c,this[_0x4f29('0xa')],'tableCellProperties',_0x5abef9,_0xac08ce);});_0x1851d5[_0x4f29('0x29')][_0x4f29('0x1f')](_0x4f29('0x17'),'tableCellProperties','accept',_0x1851d5[_0x4f29('0x29')]['getSuggestionCallback'](_0x4f29('0x17'),null,_0x4f29('0x27'))),_0x1851d5[_0x4f29('0x29')][_0x4f29('0x1f')](_0x4f29('0x17'),_0x4f29('0xa'),_0x4f29('0x27'),(_0x3535b4,_0x577011)=>this[_0x4f29('0x2d')](this['tableCellProperties'],_0x3535b4,_0x577011)),_0x1851d5[_0x4f29('0x29')][_0x4f29('0x1f')]('formatBlock',_0x4f29('0xa'),'join',()=>!0x1);}_0x1851d5[_0x4f29('0x23')][_0x4f29('0x12')](_0x4194d5=>this[_0x4f29('0x0')](_0x4194d5));}[_0x4f29('0x16')](_0x43bf57,_0x2ed874,_0x28a86e,_0x40540d,_0x501cc1,_0x5abe11){const _0x4f5227=this['editor']['plugins'][_0x4f29('0xe')]('TrackChangesEditing');this['editor'][_0x4f29('0xb')][_0x4f29('0x5')](_0x5abe11['batch'],()=>{for(const _0x2dee8a of _0x2ed874){if(this[_0x4f29('0x2e')](_0x2dee8a,_0x40540d))_0x501cc1(_0x5abe11);else{const _0x4dc06c={};for(const _0x510abb of _0x28a86e){const _0x41482b=_0x2dee8a[_0x4f29('0x15')](_0x510abb);void 0x0!==_0x41482b&&(_0x4dc06c[_0x510abb]=_0x41482b);}_0x501cc1(_0x5abe11),_0x4f5227[_0x4f29('0x18')](_0x2dee8a,{'commandParams':[_0x4dc06c]},[],_0x40540d);}}});}[_0x4f29('0x2d')](_0x55b533,_0xc7138e,_0x36453b){const _0x478551=_0xc7138e[0x0]['start'][_0x4f29('0x24')],_0x1c8153=_0x36453b[_0x4f29('0x20')][0x0];this[_0x4f29('0x1d')][_0x4f29('0xb')][_0x4f29('0x28')](_0x5d5706=>{for(const _0x2c9e97 of _0x55b533)void 0x0!==_0x1c8153[_0x2c9e97]?_0x5d5706[_0x4f29('0x13')](_0x2c9e97,_0x1c8153[_0x2c9e97],_0x478551):_0x5d5706[_0x4f29('0x8')](_0x2c9e97,_0x478551);});}['handleSuggestionDescription'](_0x54302a){if(_0x54302a['data'])switch(_0x54302a['subType']){case _0x4f29('0x7'):return{'type':_0x4f29('0x31'),'content':_0x453e3e(this[_0x4f29('0x1d')][_0x4f29('0x2f')],_0x4f29('0x1c'))};case _0x4f29('0xa'):return{'type':_0x4f29('0x31'),'content':_0x453e3e(this[_0x4f29('0x1d')][_0x4f29('0x2f')],'*Format:*\x20change\x20table\x20cell\x20properties')};}}[_0x4f29('0x2e')](_0x14e42c,_0x2506d4){const _0x396dd1=this[_0x4f29('0x1d')][_0x4f29('0x11')]['get'](_0x4f29('0x21'));for(const _0x5328c9 of _0x396dd1[_0x4f29('0x25')]({'skipNotAttached':!0x0})){const _0x46a3ec=_0x5328c9[_0x4f29('0x2a')]();if(_0x5328c9['subType']===_0x2506d4&&_0x46a3ec===_0x14e42c)return _0x5328c9;}return null;}}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @module track-changes/integrations/template
|
|
3
7
|
*/
|
|
4
|
-
import { Plugin } from 'ckeditor5/src/core
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
5
9
|
/**
|
|
6
10
|
* Provides track changes plugin integration for template feature.
|
|
7
11
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1adc=['afterInit','editor','TrackChangesEditing','plugins','get','Template'];(function(_0xc45a04,_0x1adc03){const _0x51f092=function(_0x41efd8){while(--_0x41efd8){_0xc45a04['push'](_0xc45a04['shift']());}};_0x51f092(++_0x1adc03);}(_0x1adc,0x97));const _0x51f0=function(_0xc45a04,_0x1adc03){_0xc45a04=_0xc45a04-0x0;let _0x51f092=_0x1adc[_0xc45a04];return _0x51f092;};import{Plugin as _0x45ebac}from'ckeditor5/src/core';export default class yt extends _0x45ebac{[_0x51f0('0x5')](){const _0x44c1e6=this[_0x51f0('0x0')];_0x44c1e6[_0x51f0('0x2')]['has'](_0x51f0('0x4'))&&_0x44c1e6['plugins'][_0x51f0('0x3')](_0x51f0('0x1'))['enableCommand']('insertTemplate');}}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @module track-changes/integrations/title
|
|
3
7
|
*/
|
|
4
|
-
import { Plugin } from 'ckeditor5/src/core
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
5
9
|
/**
|
|
6
10
|
* Provides track changes plugin integration for title feature.
|
|
7
11
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x375e=['title-content','isCollapsed','removeMarker','differ','isEqual','start','plugins','nodeBefore','from','locale','Title','getChangedMarkers','_descriptionFactory','TrackChangesEditing','has','getNearestSelectionRange','newRange','afterInit','model','document','end','ELEMENT_TITLE','updateMarker','element','get','editor','createRange','suggestion'];(function(_0x59f51a,_0x375e0b){const _0x1701b7=function(_0x26974d){while(--_0x26974d){_0x59f51a['push'](_0x59f51a['shift']());}};_0x1701b7(++_0x375e0b);}(_0x375e,0x1de));const _0x1701=function(_0x59f51a,_0x375e0b){_0x59f51a=_0x59f51a-0x0;let _0x1701b7=_0x375e[_0x59f51a];return _0x1701b7;};import{Plugin as _0x26b2e0}from'ckeditor5/src/core';import{getTranslation as _0x30334d}from'../utils/common-translations';export default class St extends _0x26b2e0{[_0x1701('0xf')](){const _0x4b9041=this[_0x1701('0x17')];if(!_0x4b9041['plugins'][_0x1701('0xc')](_0x1701('0x8')))return;const _0x1752e0=_0x4b9041[_0x1701('0x4')][_0x1701('0x16')](_0x1701('0xb'));_0x1752e0[_0x1701('0xa')]['registerElementLabel']('title-content',()=>_0x30334d(_0x4b9041[_0x1701('0x7')],_0x1701('0x13'))),_0x4b9041[_0x1701('0x10')][_0x1701('0x11')]['registerPostFixer'](_0x126219=>{let _0x4b1055=!0x1;const _0x2d8aba=Array[_0x1701('0x6')](_0x4b9041[_0x1701('0x10')][_0x1701('0x11')][_0x1701('0x1')][_0x1701('0x9')]());for(const {name:_0x16c1db,data:_0xeab9f2}of _0x2d8aba){const {group:_0x1517b0}=_0x1752e0['_splitMarkerName'](_0x16c1db);if(_0x1701('0x19')!==_0x1517b0||!_0xeab9f2['newRange'])continue;const _0x9b8314=_0xeab9f2[_0x1701('0xe')],_0x5c1537=_0x9b8314[_0x1701('0x12')][_0x1701('0x5')];if(!_0x5c1537||!_0x5c1537['is'](_0x1701('0x15'),_0x1701('0x1a')))continue;if(!_0x9b8314['start']['isTouching'](_0x9b8314[_0x1701('0x12')]))continue;const _0x17fe05=_0x4b9041[_0x1701('0x10')]['schema'][_0x1701('0xd')](_0x9b8314[_0x1701('0x12')],'forward');if(_0x17fe05&&_0x17fe05[_0x1701('0x1b')]){const _0x433320=_0x126219[_0x1701('0x18')](_0x9b8314[_0x1701('0x3')],_0x17fe05[_0x1701('0x3')]);_0x433320[_0x1701('0x2')](_0x9b8314)||(_0x126219[_0x1701('0x14')](_0x16c1db,{'range':_0x433320}),_0x4b1055=!0x0);}_0x4b1055||(_0x126219[_0x1701('0x0')](_0x16c1db),_0x4b1055=!0x0);}return _0x4b1055;});}}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @module track-changes/integrations/undo
|
|
3
7
|
*/
|
|
4
|
-
import { Plugin } from 'ckeditor5/src/core
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
5
9
|
/**
|
|
6
10
|
* Provides track changes plugin integration for {@link module:undo/undo~Undo undo feature}.
|
|
7
11
|
*/
|
package/src/integrations/undo.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x313f=['undo','redo','get','plugins','editor','enableCommand'];(function(_0x35e011,_0x313f21){const _0x47b6ea=function(_0x2ba9ff){while(--_0x2ba9ff){_0x35e011['push'](_0x35e011['shift']());}};_0x47b6ea(++_0x313f21);}(_0x313f,0x146));const _0x47b6=function(_0x35e011,_0x313f21){_0x35e011=_0x35e011-0x0;let _0x47b6ea=_0x313f[_0x35e011];return _0x47b6ea;};import{Plugin as _0x44babe}from'ckeditor5/src/core';export default class It extends _0x44babe{['afterInit'](){const _0x4521ea=this[_0x47b6('0x2')],_0x1bb8dc=_0x4521ea[_0x47b6('0x1')][_0x47b6('0x0')]('TrackChangesEditing');_0x4521ea[_0x47b6('0x1')]['has']('UndoEditing')&&(_0x1bb8dc[_0x47b6('0x3')](_0x47b6('0x4')),_0x1bb8dc['enableCommand'](_0x47b6('0x5')));}}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import type { Editor } from 'ckeditor5/src/core';
|
|
6
|
+
import type { Range, Model, Element, DowncastAddMarkerEvent } from 'ckeditor5/src/engine';
|
|
7
|
+
import type { GetCallback } from 'ckeditor5/src/utils';
|
|
4
8
|
/**
|
|
5
9
|
* Searches given `range` and returns all sub-ranges containing items with given `attributeKey`.
|
|
6
10
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4289=['isAtEnd','test','markerName','markerRange','mapper','hasAttribute','element','ck-suggestion-marker-','includes','listItem','model','push','item','toViewPosition','isBlock','activeMarkers','plugins','getWalker','getCustomProperty','getAttribute','parent','bindElementToMarker','start','listIndent','writer','nextSibling','schema','getItems','isLimit','name','consumable','ck-suggestion-marker--active','createRangeOn','previousPosition','isContent'];(function(_0x34e364,_0x4289a4){const _0x66c2b=function(_0x38da51){while(--_0x38da51){_0x34e364['push'](_0x34e364['shift']());}};_0x66c2b(++_0x4289a4);}(_0x4289,0x142));const _0x66c2=function(_0x34e364,_0x4289a4){_0x34e364=_0x34e364-0x0;let _0x66c2b=_0x4289[_0x34e364];return _0x66c2b;};export function getRangesWithAttribute(_0x35fae0,_0x1db88d,_0x570ce4){const _0x544429=[];for(const _0x72f457 of _0x1db88d[_0x66c2('0x14')]())_0x72f457[_0x66c2('0x21')](_0x35fae0)&&_0x544429[_0x66c2('0x4')](_0x570ce4[_0x66c2('0x19')](_0x72f457));return _0x544429;}export function getElementsAffectedByListItemRename(_0x22bb69){const _0x3cdc3d=[];if(_0x22bb69['is'](_0x66c2('0x22'),'listItem')){let _0x133b7e=_0x22bb69['nextSibling'];for(;_0x133b7e&&_0x133b7e['is'](_0x66c2('0x22'),_0x66c2('0x2'))&&_0x133b7e[_0x66c2('0xc')](_0x66c2('0x10'))>0x0;)_0x3cdc3d[_0x66c2('0x4')](_0x133b7e),_0x133b7e=_0x133b7e['nextSibling'];}return _0x3cdc3d;}export function downcastSplitMergeMarker(_0xde3d26,_0x6d7bb5,{showActiveMarker:_0x4f01f4=!0x0}={}){const _0x389e05=_0xde3d26[_0x66c2('0x9')]['get']('TrackChangesEditing');return(_0xc36558,_0xf073ad,_0x534d7f)=>{if(!_0x534d7f[_0x66c2('0x17')][_0x66c2('0x1d')](_0xf073ad[_0x66c2('0x1f')],_0xc36558[_0x66c2('0x16')]))return;const _0x3720e1=_0xf073ad[_0x66c2('0x1f')][_0x66c2('0xa')](),_0x53a043=_0xf073ad[_0x66c2('0x1f')][_0x66c2('0xf')],_0x1714c9=_0xde3d26[_0x66c2('0x3')][_0x66c2('0x13')];let _0x1022ea=null,_0x22ce3e=null,_0x1b928b=!0x1,_0x3727c7=!0x1;for(const _0x28db81 of _0x3720e1){const _0x5eb45f=_0x28db81[_0x66c2('0x5')];_0x1b928b=_0x1b928b||_0x1714c9[_0x66c2('0x1b')](_0x5eb45f);const _0x302f61=_0x534d7f[_0x66c2('0x20')]['toViewElement'](_0x5eb45f);if(_0x302f61&&_0x302f61[_0x66c2('0xb')]('addHighlight'))return;'elementEnd'==_0x28db81['type']&&(_0x1714c9[_0x66c2('0x7')](_0x5eb45f)&&!_0x1714c9[_0x66c2('0x15')](_0x5eb45f)&&(_0x5eb45f[_0x66c2('0x12')]||_0x53a043[_0x66c2('0x1c')]?_0x1022ea&&_0x1022ea[_0x66c2('0xd')]==_0x5eb45f||(_0x1022ea=_0x5eb45f,_0x1fcd49(_0x28db81['previousPosition']),_0x3727c7=!0x0):_0x22ce3e=_0x22ce3e||_0x28db81[_0x66c2('0x1a')]));}function _0x1fcd49(_0x12a0a0){const _0x1f8e81=_0x534d7f[_0x66c2('0x11')]['createUIElement']('span',{'class':_0x66c2('0x0')+_0x6d7bb5}),_0x275890=_0x534d7f['mapper'][_0x66c2('0x6')](_0x12a0a0);_0x4f01f4&&_0x389e05[_0x66c2('0x8')][_0x66c2('0x1')](_0xf073ad['markerName'])&&_0x534d7f[_0x66c2('0x11')]['addClass'](_0x66c2('0x18'),_0x1f8e81),_0x534d7f['writer']['insert'](_0x275890,_0x1f8e81),_0x534d7f[_0x66c2('0x20')][_0x66c2('0xe')](_0x1f8e81,_0xf073ad[_0x66c2('0x1e')]);}_0x1b928b||_0x3727c7||!_0x22ce3e||_0x1fcd49(_0x22ce3e);};}
|
package/src/suggestion.d.ts
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @module track-changes/suggestion
|
|
3
7
|
* @publicApi
|
|
4
8
|
*/
|
|
5
|
-
import { Element, type Marker, type Model, type Range, type Item } from 'ckeditor5/src/engine
|
|
6
|
-
import type { User } from 'ckeditor5-collaboration';
|
|
9
|
+
import { Element, type Marker, type Model, type Range, type Item } from 'ckeditor5/src/engine';
|
|
10
|
+
import type { User } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
7
11
|
import type { CommentThread } from '@ckeditor/ckeditor5-comments';
|
|
8
|
-
import type { FormatData } from './trackchangesediting
|
|
12
|
+
import type { FormatData } from './trackchangesediting';
|
|
9
13
|
declare const Suggestion_base: {
|
|
10
|
-
new (): import("ckeditor5/src/utils
|
|
11
|
-
prototype: import("ckeditor5/src/utils
|
|
14
|
+
new (): import("ckeditor5/src/utils").Observable;
|
|
15
|
+
prototype: import("ckeditor5/src/utils").Observable; /**
|
|
16
|
+
* Previous suggestion in suggestions chain.
|
|
17
|
+
*
|
|
18
|
+
* Chained suggestions should be handled as one entity.
|
|
19
|
+
*
|
|
20
|
+
* @observable
|
|
21
|
+
*/
|
|
12
22
|
};
|
|
13
23
|
/**
|
|
14
24
|
* Represents a singular suggestion that is tracked by track changes plugin.
|
package/src/suggestion.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1c06=['getRange','addMarker','subType','head','decorate','createdAt','setAttribute','_markerNames','removeAttribute','getItems','removeMarker','removeMarkers','markers','previous','clear','next','discard','length','getMarkers','substr','_onDiscard','getRanges','suggestion:','isMultiRange','accept','onDiscard','nodeBefore','isIntersecting','data','getMarkerNames','getFirstMarker','commentThread','start','set','creator','change','reduce','_onAccept','hasComments','get','authoredAt','filter','from','size','getAllAdjacentSuggestions','type','end','getMultiRangeId','onAttributesChange','addRange','_saved','push','add','isIntersectingWithRange','_onAttributesChange','author','delete','_model','addMarkerName','isInContent','isExternal','nodeAfter','@external','attributes'];(function(_0x2aca96,_0x1c063d){const _0x53ca83=function(_0x30951d){while(--_0x30951d){_0x2aca96['push'](_0x2aca96['shift']());}};_0x53ca83(++_0x1c063d);}(_0x1c06,0x117));const _0x53ca=function(_0x2aca96,_0x1c063d){_0x2aca96=_0x2aca96-0x0;let _0x53ca83=_0x1c06[_0x2aca96];return _0x53ca83;};import{Element as _0x47430e}from'ckeditor5/src/engine';import{ObservableMixin as _0x361ecc,uid as _0x38a428}from'ckeditor5/src/utils';import{cloneDeep as _0x4a2893,isEqual as _0x4c63b5,set as _0x2a11a3,unset as _0xaf0b80}from'lodash-es';export default class u extends _0x361ecc(){constructor(_0x59b1f0,_0x1883b6){super(),this['id']=_0x1883b6['id'],this[_0x53ca('0x16')]=_0x1883b6[_0x53ca('0x16')],this[_0x53ca('0x2b')]=_0x1883b6[_0x53ca('0x2b')]||null,this[_0x53ca('0x20')]=_0x1883b6[_0x53ca('0x20')],this['creator']=_0x1883b6[_0x53ca('0xb')]||_0x1883b6[_0x53ca('0x20')],this[_0x53ca('0x25')]=Boolean(_0x1883b6['attributes']&&_0x1883b6[_0x53ca('0x28')][_0x53ca('0x27')]),this[_0x53ca('0x5')]=null,this[_0x53ca('0x22')]=_0x59b1f0,this[_0x53ca('0xe')]=_0x1883b6['onAccept'],this[_0x53ca('0x3d')]=_0x1883b6[_0x53ca('0x2')],this[_0x53ca('0x1f')]=_0x1883b6[_0x53ca('0x19')],this[_0x53ca('0x30')]=new Set(),this[_0x53ca('0x2e')]=null,this['set'](_0x53ca('0x11'),null),this[_0x53ca('0xa')](_0x53ca('0x28'),_0x1883b6[_0x53ca('0x28')]||{}),this[_0x53ca('0xa')](_0x53ca('0x36'),null),this[_0x53ca('0xa')](_0x53ca('0x38'),null),this[_0x53ca('0xa')](_0x53ca('0x8'),null),this[_0x53ca('0xa')](_0x53ca('0x1b'),!0x1),this[_0x53ca('0x2d')](_0x53ca('0x1')),this[_0x53ca('0x2d')](_0x53ca('0x39'));}get[_0x53ca('0x2c')](){let _0x1c2396=this;for(;_0x1c2396[_0x53ca('0x36')];)_0x1c2396=_0x1c2396[_0x53ca('0x36')];return _0x1c2396;}get[_0x53ca('0xf')](){return!!this[_0x53ca('0x8')]&&this[_0x53ca('0x8')][_0x53ca('0x3a')]>0x0;}get[_0x53ca('0x0')](){if(0x0==this[_0x53ca('0x30')][_0x53ca('0x14')])return!0x1;return 0x6==Array['from'](this[_0x53ca('0x30')])[0x0]['split'](':')[_0x53ca('0x3a')];}get[_0x53ca('0x24')](){return null!==this[_0x53ca('0x7')]();}[_0x53ca('0x23')](_0x22ea62){this['_markerNames'][_0x53ca('0x1d')](_0x22ea62);}['getMarkerNames'](){return Array[_0x53ca('0x13')](this[_0x53ca('0x30')]);}['getMarkers'](){return this[_0x53ca('0x6')]()['map'](_0x42b9c8=>this[_0x53ca('0x22')][_0x53ca('0x35')][_0x53ca('0x10')](_0x42b9c8))[_0x53ca('0x12')](_0x283c33=>_0x283c33);}[_0x53ca('0x7')](){return this[_0x53ca('0x3b')]()[0x0]||null;}['removeMarkers'](){this[_0x53ca('0x22')][_0x53ca('0xc')](_0x3f7102=>{for(const _0x30e042 of this[_0x53ca('0x3b')]())_0x3f7102[_0x53ca('0x33')](_0x30e042);}),this[_0x53ca('0x30')][_0x53ca('0x37')]();}[_0x53ca('0x33')](_0x20c8b0){this[_0x53ca('0x22')][_0x53ca('0xc')](_0xf970a9=>{_0xf970a9[_0x53ca('0x33')](_0x20c8b0);}),this[_0x53ca('0x30')][_0x53ca('0x21')](_0x20c8b0);}[_0x53ca('0x1a')](_0x4d271d){const _0x356533=_0x53ca('0x3f')+this[_0x53ca('0x16')]+':'+this['subType']+':'+this['id']+':'+this[_0x53ca('0xb')]['id']+':'+u[_0x53ca('0x18')]();this[_0x53ca('0x23')](_0x356533),this[_0x53ca('0x22')][_0x53ca('0xc')](_0x31e20e=>{_0x31e20e[_0x53ca('0x2a')](_0x356533,{'range':_0x4d271d,'usingOperation':!0x0,'affectsData':!0x0});});}[_0x53ca('0x1e')](_0x29b616){for(const _0x5de822 of this[_0x53ca('0x3e')]())if(_0x5de822[_0x53ca('0x4')](_0x29b616))return!0x0;return!0x1;}[_0x53ca('0x3e')](){return this['getMarkers']()['map'](_0x54078a=>_0x54078a[_0x53ca('0x29')]());}[_0x53ca('0x32')](){return this[_0x53ca('0x3e')]()[_0x53ca('0xd')]((_0x42a4ab,_0x551c0d)=>[..._0x42a4ab,..._0x551c0d[_0x53ca('0x32')]()],[]);}['getFirstRange'](){var _0xaa54e2;return(null===(_0xaa54e2=this[_0x53ca('0x7')]())||void 0x0===_0xaa54e2?void 0x0:_0xaa54e2[_0x53ca('0x29')]())||null;}['getContainedElement'](){const _0x2420be=this[_0x53ca('0x3e')]();if(0x1!=_0x2420be[_0x53ca('0x3a')])return null;const _0x3af658=_0x2420be[0x0],_0x14cbf4=_0x3af658[_0x53ca('0x9')][_0x53ca('0x26')],_0x33e57f=_0x3af658[_0x53ca('0x17')][_0x53ca('0x3')];return _0x14cbf4 instanceof _0x47430e?_0x14cbf4!=_0x33e57f?null:_0x14cbf4:null;}[_0x53ca('0x1')](){this[_0x53ca('0xe')](this['getRanges'](),this[_0x53ca('0x5')],this[_0x53ca('0x28')]),this['removeMarkers']();}['discard'](){this[_0x53ca('0x3d')](this[_0x53ca('0x3e')](),this[_0x53ca('0x5')],this['attributes']),this[_0x53ca('0x34')]();}[_0x53ca('0x15')](){const _0x11688f=[];let _0x4974ec=this[_0x53ca('0x2c')];for(;_0x4974ec;)_0x11688f[_0x53ca('0x1c')](_0x4974ec),_0x4974ec=_0x4974ec[_0x53ca('0x38')];return _0x11688f;}[_0x53ca('0x2f')](_0xaf0ab1,_0x55da48){const _0x276e62=_0x4a2893(this['attributes']);_0x2a11a3(_0x276e62,_0xaf0ab1,_0x55da48),_0x4c63b5(_0x276e62,this['attributes'])||(this[_0x53ca('0x28')]=_0x276e62,this[_0x53ca('0x1f')](_0x276e62));}[_0x53ca('0x31')](_0x1b00a0){const _0x32e940=_0x4a2893(this[_0x53ca('0x28')]);_0xaf0b80(_0x32e940,_0x1b00a0),_0x4c63b5(_0x32e940,this[_0x53ca('0x28')])||(this[_0x53ca('0x28')]=_0x32e940,this[_0x53ca('0x1f')](this[_0x53ca('0x28')]));}['toJSON'](){return{'id':this['id'],'type':this[_0x53ca('0x2b')]?this['type']+':'+this[_0x53ca('0x2b')]:this[_0x53ca('0x16')],'authorId':this[_0x53ca('0xb')]['id'],'createdAt':this['createdAt'],'hasComments':this['hasComments'],'data':this['data'],'attributes':this[_0x53ca('0x28')]};}static[_0x53ca('0x18')](){return _0x38a428()[_0x53ca('0x3c')](0x1,0x5);}}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
3
|
-
*
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { type Locale, type PriorityString } from 'ckeditor5/src/utils
|
|
6
|
-
import type { Schema, Element } from 'ckeditor5/src/engine
|
|
7
|
-
import type Suggestion from './suggestion
|
|
5
|
+
import { type Locale, type PriorityString } from 'ckeditor5/src/utils';
|
|
6
|
+
import type { Schema, Element } from 'ckeditor5/src/engine';
|
|
7
|
+
import type Suggestion from './suggestion';
|
|
8
8
|
/**
|
|
9
9
|
* Creates descriptions for suggestion chains.
|
|
10
10
|
*
|