@ckeditor/ckeditor5-track-changes 38.2.0-alpha.1 → 39.0.1
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 _0x2e7a=['markMultiRangeBlockFormat','_tablePostFixingSubtypes','splitTableCellVertically','_isForcedDefaultExecutionBlock','isEnabled','afterInit','mergeTableCells','author','set:isEnabled','*Split\x20cell:*\x20vertically','has','add','size','formatBlock','mergeTableCellRight','tableCell','registerCustomCallback','document','format','table','type','commands','mergeTableCellLeft','selection','plugins','filter','direction','createRangeOn','element','cell','getRanges','rootName','TrackChangesEditing','enableCommand','_descriptionFactory','accept','from','createTableWalker','commandName','editor','requires','deletion','$graveyard','_areSelectedCellsMergable','setSelection','getAncestors','markBlockFormat','stop','execute','mergeTableCellUp','registerDescriptionCallback','findAncestor','value','_suggestionFactory','trackChanges','fromRange','*Merge\x20cells*','_areMergableCells','push','root','map','containsRange','getSelectionAffectedTableCells','TableUtils','change','refresh','TableEditing','find','return','mergeTableCellDown','splitTableCellHorizontally','insertion','length','get','highest','horizontally','getFirstPosition','model','subType','getCellLocation'];(function(_0xc33fe2,_0x2e7a25){const _0x5e350f=function(_0x436851){while(--_0x436851){_0xc33fe2['push'](_0xc33fe2['shift']());}};_0x5e350f(++_0x2e7a25);}(_0x2e7a,0x97));const _0x5e35=function(_0xc33fe2,_0x2e7a25){_0xc33fe2=_0xc33fe2-0x0;let _0x5e350f=_0x2e7a[_0xc33fe2];return _0x5e350f;};import{Plugin as _0x2a9382}from'ckeditor5/src/core';import _0x4b40a3 from'./table';import{LiveRange as _0x5d9d42}from'ckeditor5/src/engine';import{getTranslation as _0x4c45ff}from'../utils/common-translations';export default class dt extends _0x2a9382{static get[_0x5e35('0x31')](){return[_0x4b40a3];}[_0x5e35('0xe')](){const _0x585364=this[_0x5e35('0x30')],_0x43aedc=_0x585364[_0x5e35('0x6')]['document'][_0x5e35('0x20')],_0x16421f=_0x585364['locale'];if(!_0x585364['plugins'][_0x5e35('0x13')](_0x5e35('0x4b')))return;const _0x324880=_0x585364[_0x5e35('0x21')][_0x5e35('0x2')](_0x5e35('0x29')),_0x36786a=_0x585364[_0x5e35('0x21')]['get'](_0x5e35('0x48')),_0x3bdca2=_0x585364['plugins']['get'](_0x4b40a3);_0x3bdca2[_0x5e35('0xa')][_0x5e35('0x43')](_0x5e35('0xf')),_0x324880[_0x5e35('0x2a')]('mergeTableCells',()=>{const _0x2399cd=_0x36786a[_0x5e35('0x47')](_0x585364[_0x5e35('0x6')][_0x5e35('0x1a')]['selection']);_0x585364[_0x5e35('0x6')][_0x5e35('0x49')](()=>{_0x324880[_0x5e35('0x9')](_0x2399cd,{'commandName':_0x5e35('0xf'),'commandParams':[]},[],_0x5e35('0xf'));});}),_0x585364['commands'][_0x5e35('0x2')](_0x5e35('0xf'))['on']('execute',(_0x3f8a05,_0x4d69e3)=>{_0x585364[_0x5e35('0x1e')][_0x5e35('0x2')](_0x5e35('0x3f'))['value']&&(_0x4d69e3[_0x5e35('0x1')]>0x0&&_0x4d69e3[_0x4d69e3[_0x5e35('0x1')]-0x1]&&_0x4d69e3[_0x4d69e3[_0x5e35('0x1')]-0x1]['forceDefaultExecution']||_0x324880[_0x5e35('0xc')]||this[_0x5e35('0x34')]()||_0x3f8a05[_0x5e35('0x38')]());},{'priority':_0x5e35('0x3')});for(const _0x114372 of[_0x5e35('0x3a'),_0x5e35('0x17'),_0x5e35('0x4e'),_0x5e35('0x1f')]){const _0x397a89=_0x585364[_0x5e35('0x1e')][_0x5e35('0x2')](_0x114372);_0x324880[_0x5e35('0x2a')](_0x114372,()=>{const _0x5b6d42=_0x585364[_0x5e35('0x6')]['document'][_0x5e35('0x20')]['getFirstPosition']()[_0x5e35('0x36')]()[_0x5e35('0x4c')](_0xac2f65=>_0xac2f65['is'](_0x5e35('0x25'),_0x5e35('0x18'))),_0x1141aa=_0x397a89['value'];_0x585364[_0x5e35('0x6')][_0x5e35('0x49')](()=>{_0x324880[_0x5e35('0x9')]([_0x5b6d42,_0x1141aa],{'commandName':'mergeTableCells','commandParams':[]},[],'mergeTableCells');});});}for(const _0x58d334 of[_0x5e35('0xb'),_0x5e35('0x4f')]){const _0x2472cf=_0x585364[_0x5e35('0x1e')][_0x5e35('0x2')](_0x58d334);_0x324880['enableCommand'](_0x58d334,()=>{const _0x588411=_0x36786a[_0x5e35('0x47')](_0x585364[_0x5e35('0x6')][_0x5e35('0x1a')][_0x5e35('0x20')])[0x0],_0x57c10c=_0x588411[_0x5e35('0x3c')](_0x5e35('0x1c')),{column:_0x34ae32,row:_0x2d9533}=_0x36786a[_0x5e35('0x8')](_0x588411);let _0x6f43cb=[];if(_0x5e35('0x4')==_0x2472cf[_0x5e35('0x23')]){const _0x462241=_0x36786a[_0x5e35('0x2e')](_0x57c10c,{'startRow':_0x2d9533,'endRow':_0x2d9533,'includeAllSlots':!0x0});_0x6f43cb=Array[_0x5e35('0x2d')](_0x462241)[_0x5e35('0x45')](_0x4ffaa5=>_0x4ffaa5[_0x5e35('0x26')]);}else{const _0x3ce5c2=_0x36786a[_0x5e35('0x2e')](_0x57c10c,{'column':_0x34ae32,'includeAllSlots':!0x0});_0x6f43cb=Array['from'](_0x3ce5c2)[_0x5e35('0x45')](_0x5c8ac3=>_0x5c8ac3['cell']);}_0x585364['model']['change'](_0x277fe0=>{_0x324880[_0x5e35('0x37')](_0x277fe0[_0x5e35('0x24')](_0x588411),{'commandName':_0x58d334,'commandParams':[]},_0x6f43cb,_0x58d334);});});}_0x324880['_descriptionFactory'][_0x5e35('0x3b')](_0x59be23=>{const {data:_0x3d9dc8}=_0x59be23;if(_0x3d9dc8)return _0x5e35('0xf')==_0x3d9dc8[_0x5e35('0x2f')]?{'type':_0x5e35('0x1b'),'content':_0x4c45ff(_0x16421f,_0x5e35('0x41'))}:void 0x0;}),_0x324880[_0x5e35('0x2b')][_0x5e35('0x3b')](_0x1f8e8a=>{const {data:_0x253501}=_0x1f8e8a;if(_0x253501)return _0x5e35('0xb')==_0x253501[_0x5e35('0x2f')]?{'type':_0x5e35('0x1b'),'content':_0x4c45ff(_0x16421f,_0x5e35('0x12'))}:_0x5e35('0x4f')==_0x253501[_0x5e35('0x2f')]?{'type':_0x5e35('0x1b'),'content':_0x4c45ff(_0x16421f,'*Split\x20cell:*\x20horizontally')}:void 0x0;});const _0x322584=_0x3bdca2['_acceptFormatSuggestionCallbackFactory']();for(const _0x15855a of['mergeTableCellUp',_0x5e35('0x17'),_0x5e35('0x4e'),_0x5e35('0x1f')])_0x324880[_0x5e35('0x3e')][_0x5e35('0x19')](_0x5e35('0x16'),_0x15855a,_0x5e35('0x2c'),_0x322584);for(const _0xef8135 of[_0x5e35('0xb'),_0x5e35('0x4f')])_0x324880[_0x5e35('0x3e')][_0x5e35('0x19')](_0x5e35('0x16'),_0xef8135,_0x5e35('0x2c'),_0x322584);_0x324880[_0x5e35('0x3e')]['registerCustomCallback'](_0x5e35('0x16'),_0x5e35('0xf'),_0x5e35('0x2c'),_0x22b4fb=>{_0x585364['model'][_0x5e35('0x49')](_0x545ea7=>{const _0x2206d4=Array['from'](_0x43aedc[_0x5e35('0x27')]())[_0x5e35('0x45')](_0x383569=>_0x5d9d42[_0x5e35('0x40')](_0x383569));_0x545ea7[_0x5e35('0x35')](_0x22b4fb),_0x585364[_0x5e35('0x1e')][_0x5e35('0x2')](_0x5e35('0xf'))[_0x5e35('0x4a')](),_0x585364[_0x5e35('0x39')](_0x5e35('0xf'),{'forceDefaultExecution':!0x0});const _0x3ccd1f=_0x2206d4[_0x5e35('0x22')](_0x5917c1=>_0x5e35('0x33')!=_0x5917c1[_0x5e35('0x44')][_0x5e35('0x28')]);_0x3ccd1f[_0x5e35('0x1')]>0x0&&_0x545ea7[_0x5e35('0x35')](_0x3ccd1f);for(const _0x3ed67d of _0x2206d4)_0x3ed67d['detach']();});});for(const _0x2b79a0 of['mergeTableCellUp',_0x5e35('0x4e'),_0x5e35('0x1f'),_0x5e35('0x17')]){const _0x1a78c7=_0x585364[_0x5e35('0x1e')][_0x5e35('0x2')](_0x2b79a0);_0x1a78c7['on'](_0x5e35('0x11'),(_0x24638a,_0x5cf10d,_0x2e0b21)=>{if(_0x2e0b21){const _0x5a927e=_0x585364[_0x5e35('0x6')][_0x5e35('0x1a')][_0x5e35('0x20')][_0x5e35('0x5')]()[_0x5e35('0x36')]()[_0x5e35('0x4c')](_0x5cba8b=>_0x5cba8b['is'](_0x5e35('0x25'),'tableCell'));this[_0x5e35('0x42')](_0x1a78c7[_0x5e35('0x3d')],_0x5a927e)||(_0x24638a[_0x5e35('0x4d')]=!0x1,_0x24638a[_0x5e35('0x38')]());}},{'priority':'low'});}}[_0x5e35('0x34')](){const _0x588d9b=this[_0x5e35('0x30')]['commands'][_0x5e35('0x2')](_0x5e35('0xf')),_0x29f140=this[_0x5e35('0x30')][_0x5e35('0x21')][_0x5e35('0x2')]('TableUtils');if(!_0x588d9b[_0x5e35('0xd')])return!0x1;const _0x5627b7=_0x29f140[_0x5e35('0x47')](this[_0x5e35('0x30')][_0x5e35('0x6')][_0x5e35('0x1a')]['selection']);for(const _0x556aba of _0x5627b7)for(const _0x592662 of _0x5627b7)if(_0x556aba!=_0x592662&&!this[_0x5e35('0x42')](_0x556aba,_0x592662))return!0x1;return!0x0;}[_0x5e35('0x42')](_0x362a04,_0xc6f3bf){const _0x557543=this[_0x5e35('0x30')]['plugins'][_0x5e35('0x2')](_0x5e35('0x29')),_0x33504a=this[_0x5e35('0x30')]['model']['createRangeOn'](_0x362a04),_0x582605=this[_0x5e35('0x30')]['model'][_0x5e35('0x24')](_0xc6f3bf),_0x2b7868=new Set(),_0x4c8168=new Set();for(const _0x8bc6b5 of _0x557543['getSuggestions']())if((_0x5e35('0x0')==_0x8bc6b5['type']||_0x5e35('0x32')==_0x8bc6b5[_0x5e35('0x1d')]||'mergeTableCells'==_0x8bc6b5[_0x5e35('0x7')])&&_0x8bc6b5['isInContent'])for(const _0x49ee9c of _0x8bc6b5[_0x5e35('0x27')]())_0x49ee9c[_0x5e35('0x46')](_0x33504a,!0x0)&&_0x2b7868[_0x5e35('0x14')](_0x8bc6b5[_0x5e35('0x1d')]+':'+_0x8bc6b5[_0x5e35('0x10')]['id']),_0x49ee9c[_0x5e35('0x46')](_0x582605,!0x0)&&_0x4c8168[_0x5e35('0x14')](_0x8bc6b5['type']+':'+_0x8bc6b5['author']['id']);if(_0x2b7868[_0x5e35('0x15')]!=_0x4c8168['size'])return!0x1;for(const _0x1e5a2a of _0x2b7868)if(!_0x4c8168[_0x5e35('0x13')](_0x1e5a2a))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 _0xb426=['enableCommand','ELEMENT_TABLE_OF_CONTENTS','plugins','insertTableOfContents','get','editor','commands','locale','TrackChangesEditing','afterInit','tableOfContents'];(function(_0x133951,_0xb42619){const _0x53699f=function(_0x2350b5){while(--_0x2350b5){_0x133951['push'](_0x133951['shift']());}};_0x53699f(++_0xb42619);}(_0xb426,0xb4));const _0x5369=function(_0x133951,_0xb42619){_0x133951=_0x133951-0x0;let _0x53699f=_0xb426[_0x133951];return _0x53699f;};import{Plugin as _0x1f40a0}from'ckeditor5/src/core';import{getTranslation as _0x1669af}from'../utils/common-translations';export default class bt extends _0x1f40a0{[_0x5369('0x5')](){const _0x93c2d2=this[_0x5369('0x1')];if(!_0x93c2d2[_0x5369('0x2')][_0x5369('0x0')](_0x5369('0xa')))return;_0x93c2d2['plugins'][_0x5369('0x0')](_0x5369('0x4'))[_0x5369('0x7')](_0x5369('0xa'));const _0x219700=_0x93c2d2[_0x5369('0x9')][_0x5369('0x0')](_0x5369('0x4')),_0x1716b9=_0x93c2d2[_0x5369('0x3')];_0x219700['_descriptionFactory']['registerElementLabel'](_0x5369('0x6'),_0x4c1c9a=>_0x1669af(_0x1716b9,_0x5369('0x8'),_0x4c1c9a));}}
|
|
@@ -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 _0x5da5=['getSelectionAffectedTableCells','setAttribute','enqueueChange','discard','subType','*Format:*\x20change\x20table\x20properties','markBlockFormat','nodeAfter','format','table','tableBackgroundColor','handleDiscardAction','tableCellHorizontalAlignment','tableCellBorderColor','tableCellBackgroundColor','plugins','_handlePropertyChange','_getSuggestion','selection','TablePropertiesEditing','tableAlignment','findAncestor','enableCommand','document','tableCellProperties','getAttribute','model','formatBlock','getFirstPosition','tableCellPadding','tableCellHeight','has','data','registerDescriptionCallback','join','_suggestionFactory','start','tableCellWidth','tableWidth','editor','TrackChangesTableProperties','get','tableProperties','accept','afterInit','pluginName','registerCustomCallback','_descriptionFactory','commandParams','tableBorderColor','TableUtils','tableCellBorderStyle','TrackChangesEditing','tableCellBorderWidth','tableBorderStyle','getSuggestionCallback','change'];(function(_0x55c5bb,_0x5da532){const _0x59044c=function(_0x5a7437){while(--_0x5a7437){_0x55c5bb['push'](_0x55c5bb['shift']());}};_0x59044c(++_0x5da532);}(_0x5da5,0x1cc));const _0x5904=function(_0x55c5bb,_0x5da532){_0x55c5bb=_0x55c5bb-0x0;let _0x59044c=_0x5da5[_0x55c5bb];return _0x59044c;};import{Plugin as _0x285160}from'ckeditor5/src/core';import{getTranslation as _0xe4fcb1}from'../utils/common-translations';export default class Ct extends _0x285160{constructor(_0x185a73){super(_0x185a73),this[_0x5904('0x26')]=[_0x5904('0x2d'),_0x5904('0x32'),'tableBorderWidth',_0x5904('0x10'),_0x5904('0x22'),'tableHeight',_0x5904('0x6')],this[_0x5904('0x14')]=[_0x5904('0x9'),_0x5904('0x2f'),_0x5904('0x31'),_0x5904('0x19'),_0x5904('0x21'),_0x5904('0x1a'),_0x5904('0xa'),_0x5904('0x8'),'tableCellVerticalAlignment'];}static get[_0x5904('0x29')](){return _0x5904('0x24');}[_0x5904('0x28')](){const _0x4c1b20=this[_0x5904('0x23')][_0x5904('0xb')][_0x5904('0x25')](_0x5904('0x30'));if(this[_0x5904('0x23')][_0x5904('0xb')][_0x5904('0x1b')](_0x5904('0xf'))){for(const _0x5d98d2 of this[_0x5904('0x26')])_0x4c1b20[_0x5904('0x12')](_0x5d98d2,(_0x37dea4,_0x4d98f1)=>{const _0x5c807d=this[_0x5904('0x23')][_0x5904('0x16')][_0x5904('0x13')][_0x5904('0xe')][_0x5904('0x18')]()[_0x5904('0x11')](_0x5904('0x5'));this[_0x5904('0xc')](_0x5d98d2,[_0x5c807d],this['tableProperties'],_0x5904('0x26'),_0x37dea4,_0x4d98f1);});_0x4c1b20['_suggestionFactory'][_0x5904('0x2a')](_0x5904('0x17'),_0x5904('0x26'),_0x5904('0x27'),_0x4c1b20[_0x5904('0x1f')][_0x5904('0x33')](_0x5904('0x17'),null,_0x5904('0x38'))),_0x4c1b20[_0x5904('0x1f')][_0x5904('0x2a')](_0x5904('0x17'),_0x5904('0x26'),_0x5904('0x38'),(_0x1bea14,_0x5ecfc7)=>this[_0x5904('0x7')](this[_0x5904('0x26')],_0x1bea14,_0x5ecfc7)),_0x4c1b20[_0x5904('0x1f')][_0x5904('0x2a')](_0x5904('0x17'),'tableProperties',_0x5904('0x1e'),()=>!0x1);}if(this[_0x5904('0x23')][_0x5904('0xb')]['has']('TableCellPropertiesEditing')){for(const _0x4a8983 of this[_0x5904('0x14')])_0x4c1b20['enableCommand'](_0x4a8983,(_0x1f82b9,_0x8c69c2)=>{const _0x624b74=this[_0x5904('0x23')]['plugins'][_0x5904('0x25')](_0x5904('0x2e'))[_0x5904('0x35')](this[_0x5904('0x23')][_0x5904('0x16')][_0x5904('0x13')]['selection']);this[_0x5904('0xc')](_0x4a8983,_0x624b74,this[_0x5904('0x14')],_0x5904('0x14'),_0x1f82b9,_0x8c69c2);});_0x4c1b20[_0x5904('0x1f')][_0x5904('0x2a')](_0x5904('0x17'),_0x5904('0x14'),_0x5904('0x27'),_0x4c1b20[_0x5904('0x1f')][_0x5904('0x33')](_0x5904('0x17'),null,_0x5904('0x38'))),_0x4c1b20['_suggestionFactory'][_0x5904('0x2a')]('formatBlock',_0x5904('0x14'),'discard',(_0x491fe2,_0xe2b6f2)=>this[_0x5904('0x7')](this[_0x5904('0x14')],_0x491fe2,_0xe2b6f2)),_0x4c1b20[_0x5904('0x1f')][_0x5904('0x2a')](_0x5904('0x17'),'tableCellProperties','join',()=>!0x1);}_0x4c1b20[_0x5904('0x2b')][_0x5904('0x1d')](_0x4f422e=>this['handleSuggestionDescription'](_0x4f422e));}['_handlePropertyChange'](_0x4d94c5,_0xb7acae,_0x5cf4bd,_0x3fbb93,_0x179d4f,_0x4319db){const _0xce118a=this[_0x5904('0x23')]['plugins'][_0x5904('0x25')]('TrackChangesEditing');this[_0x5904('0x23')]['model'][_0x5904('0x37')](_0x4319db['batch'],()=>{for(const _0x2dddf4 of _0xb7acae){if(this['_getSuggestion'](_0x2dddf4,_0x3fbb93))_0x179d4f(_0x4319db);else{const _0x2d2bfd={};for(const _0xc403 of _0x5cf4bd){const _0x5ce5c8=_0x2dddf4[_0x5904('0x15')](_0xc403);void 0x0!==_0x5ce5c8&&(_0x2d2bfd[_0xc403]=_0x5ce5c8);}_0x179d4f(_0x4319db),_0xce118a[_0x5904('0x2')](_0x2dddf4,{'commandParams':[_0x2d2bfd]},[],_0x3fbb93);}}});}[_0x5904('0x7')](_0x15d4a9,_0x21e156,_0x2279f0){const _0x5c7b13=_0x21e156[0x0][_0x5904('0x20')][_0x5904('0x3')],_0x27b363=_0x2279f0[_0x5904('0x2c')][0x0];this[_0x5904('0x23')]['model'][_0x5904('0x34')](_0x2094c2=>{for(const _0x328009 of _0x15d4a9)void 0x0!==_0x27b363[_0x328009]?_0x2094c2[_0x5904('0x36')](_0x328009,_0x27b363[_0x328009],_0x5c7b13):_0x2094c2['removeAttribute'](_0x328009,_0x5c7b13);});}['handleSuggestionDescription'](_0x2326de){if(_0x2326de[_0x5904('0x1c')])switch(_0x2326de['subType']){case _0x5904('0x26'):return{'type':_0x5904('0x4'),'content':_0xe4fcb1(this[_0x5904('0x23')]['locale'],_0x5904('0x1'))};case _0x5904('0x14'):return{'type':_0x5904('0x4'),'content':_0xe4fcb1(this[_0x5904('0x23')]['locale'],'*Format:*\x20change\x20table\x20cell\x20properties')};}}[_0x5904('0xd')](_0x5aabd2,_0x1663cc){const _0x5256eb=this['editor']['plugins']['get'](_0x5904('0x30'));for(const _0x30e6e3 of _0x5256eb['getSuggestions']({'skipNotAttached':!0x0})){const _0x3fa8ce=_0x30e6e3['getContainedElement']();if(_0x30e6e3[_0x5904('0x0')]===_0x1663cc&&_0x3fa8ce===_0x5aabd2)return _0x30e6e3;}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 _0xaafc=['afterInit','insertTemplate','enableCommand','editor','Template','get','has','TrackChangesEditing','plugins'];(function(_0x48a26e,_0xaafcfa){const _0x33b165=function(_0x4d7edc){while(--_0x4d7edc){_0x48a26e['push'](_0x48a26e['shift']());}};_0x33b165(++_0xaafcfa);}(_0xaafc,0x195));const _0x33b1=function(_0x48a26e,_0xaafcfa){_0x48a26e=_0x48a26e-0x0;let _0x33b165=_0xaafc[_0x48a26e];return _0x33b165;};import{Plugin as _0x280fca}from'ckeditor5/src/core';export default class yt extends _0x280fca{[_0x33b1('0x0')](){const _0x529f9b=this[_0x33b1('0x3')];_0x529f9b['plugins'][_0x33b1('0x6')](_0x33b1('0x4'))&&_0x529f9b[_0x33b1('0x8')][_0x33b1('0x5')](_0x33b1('0x7'))[_0x33b1('0x2')](_0x33b1('0x1'));}}
|
|
@@ -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 _0x3c7a=['registerPostFixer','nodeBefore','isEqual','editor','getNearestSelectionRange','title-content','document','schema','_descriptionFactory','newRange','differ','createRange','_splitMarkerName','forward','end','ELEMENT_TITLE','start','isCollapsed','TrackChangesEditing','locale','element','get','afterInit','Title','plugins','model','isTouching','registerElementLabel'];(function(_0xc8a335,_0x3c7a45){const _0x23b8ff=function(_0x422025){while(--_0x422025){_0xc8a335['push'](_0xc8a335['shift']());}};_0x23b8ff(++_0x3c7a45);}(_0x3c7a,0x98));const _0x23b8=function(_0xc8a335,_0x3c7a45){_0xc8a335=_0xc8a335-0x0;let _0x23b8ff=_0x3c7a[_0xc8a335];return _0x23b8ff;};import{Plugin as _0x58b68b}from'ckeditor5/src/core';import{getTranslation as _0xf4f21d}from'../utils/common-translations';export default class St extends _0x58b68b{[_0x23b8('0xa')](){const _0x1bb2d9=this[_0x23b8('0x13')];if(!_0x1bb2d9['plugins']['has'](_0x23b8('0xb')))return;const _0x429179=_0x1bb2d9[_0x23b8('0xc')][_0x23b8('0x9')](_0x23b8('0x6'));_0x429179[_0x23b8('0x18')][_0x23b8('0xf')](_0x23b8('0x15'),()=>_0xf4f21d(_0x1bb2d9[_0x23b8('0x7')],_0x23b8('0x3'))),_0x1bb2d9[_0x23b8('0xd')][_0x23b8('0x16')][_0x23b8('0x10')](_0x5f22a9=>{let _0x559b81=!0x1;const _0x2e3905=Array['from'](_0x1bb2d9[_0x23b8('0xd')][_0x23b8('0x16')][_0x23b8('0x1a')]['getChangedMarkers']());for(const {name:_0xe530ac,data:_0x17cb79}of _0x2e3905){const {group:_0x68b709}=_0x429179[_0x23b8('0x0')](_0xe530ac);if('suggestion'!==_0x68b709||!_0x17cb79['newRange'])continue;const _0x8effc4=_0x17cb79[_0x23b8('0x19')],_0x324bd8=_0x8effc4[_0x23b8('0x2')][_0x23b8('0x11')];if(!_0x324bd8||!_0x324bd8['is'](_0x23b8('0x8'),'title-content'))continue;if(!_0x8effc4[_0x23b8('0x4')][_0x23b8('0xe')](_0x8effc4[_0x23b8('0x2')]))continue;const _0xe91583=_0x1bb2d9['model'][_0x23b8('0x17')][_0x23b8('0x14')](_0x8effc4['end'],_0x23b8('0x1'));if(_0xe91583&&_0xe91583[_0x23b8('0x5')]){const _0x125902=_0x5f22a9[_0x23b8('0x1b')](_0x8effc4[_0x23b8('0x4')],_0xe91583[_0x23b8('0x4')]);_0x125902[_0x23b8('0x12')](_0x8effc4)||(_0x5f22a9['updateMarker'](_0xe530ac,{'range':_0x125902}),_0x559b81=!0x0);}_0x559b81||(_0x5f22a9['removeMarker'](_0xe530ac),_0x559b81=!0x0);}return _0x559b81;});}}
|
|
@@ -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 _0x4860=['plugins','TrackChangesEditing','UndoEditing','enableCommand','undo','has'];(function(_0x35e95e,_0x486023){const _0x1e7e97=function(_0x8fee6e){while(--_0x8fee6e){_0x35e95e['push'](_0x35e95e['shift']());}};_0x1e7e97(++_0x486023);}(_0x4860,0x146));const _0x1e7e=function(_0x35e95e,_0x486023){_0x35e95e=_0x35e95e-0x0;let _0x1e7e97=_0x4860[_0x35e95e];return _0x1e7e97;};import{Plugin as _0x1d4f8f}from'ckeditor5/src/core';export default class It extends _0x1d4f8f{['afterInit'](){const _0x4b4940=this['editor'],_0x3a4b23=_0x4b4940[_0x1e7e('0x4')]['get'](_0x1e7e('0x5'));_0x4b4940[_0x1e7e('0x4')][_0x1e7e('0x3')](_0x1e7e('0x0'))&&(_0x3a4b23[_0x1e7e('0x1')](_0x1e7e('0x2')),_0x3a4b23[_0x1e7e('0x1')]('redo'));}}
|
|
@@ -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 _0x3923=['get','mapper','listItem','activeMarkers','test','push','ck-suggestion-marker-','isLimit','type','addClass','model','schema','addHighlight','getItems','includes','insert','bindElementToMarker','consumable','getWalker','TrackChangesEditing','parent','elementEnd','element','isContent','getAttribute','listIndent','nextSibling','markerRange','ck-suggestion-marker--active','name','toViewPosition','writer','markerName','plugins'];(function(_0x22e0b0,_0x3923c0){const _0x59e21c=function(_0x4a6d4e){while(--_0x4a6d4e){_0x22e0b0['push'](_0x22e0b0['shift']());}};_0x59e21c(++_0x3923c0);}(_0x3923,0xf6));const _0x59e2=function(_0x22e0b0,_0x3923c0){_0x22e0b0=_0x22e0b0-0x0;let _0x59e21c=_0x3923[_0x22e0b0];return _0x59e21c;};export function getRangesWithAttribute(_0x2233ef,_0x48af14,_0x2a9f09){const _0x228f9b=[];for(const _0x57ba2b of _0x48af14[_0x59e2('0x5')]())_0x57ba2b['hasAttribute'](_0x2233ef)&&_0x228f9b[_0x59e2('0x1f')](_0x2a9f09['createRangeOn'](_0x57ba2b));return _0x228f9b;}export function getElementsAffectedByListItemRename(_0x182ad8){const _0x378480=[];if(_0x182ad8['is']('element',_0x59e2('0x1c'))){let _0x13faa4=_0x182ad8[_0x59e2('0x12')];for(;_0x13faa4&&_0x13faa4['is'](_0x59e2('0xe'),_0x59e2('0x1c'))&&_0x13faa4[_0x59e2('0x10')](_0x59e2('0x11'))>0x0;)_0x378480[_0x59e2('0x1f')](_0x13faa4),_0x13faa4=_0x13faa4[_0x59e2('0x12')];}return _0x378480;}export function downcastSplitMergeMarker(_0x45694d,_0x303efc,{showActiveMarker:_0x309d23=!0x0}={}){const _0x40e22f=_0x45694d[_0x59e2('0x19')][_0x59e2('0x1a')](_0x59e2('0xb'));return(_0x415ce0,_0x18222b,_0x3a0748)=>{if(!_0x3a0748[_0x59e2('0x9')][_0x59e2('0x1e')](_0x18222b['markerRange'],_0x415ce0[_0x59e2('0x15')]))return;const _0x560c86=_0x18222b[_0x59e2('0x13')][_0x59e2('0xa')](),_0x5f40d5=_0x18222b['markerRange']['start'],_0x13fc0e=_0x45694d[_0x59e2('0x2')][_0x59e2('0x3')];let _0x2433f8=null,_0x5ad8c9=null,_0x1a3906=!0x1,_0xd8b67=!0x1;for(const _0x59fd47 of _0x560c86){const _0xc52a07=_0x59fd47['item'];_0x1a3906=_0x1a3906||_0x13fc0e[_0x59e2('0xf')](_0xc52a07);const _0xf05edd=_0x3a0748[_0x59e2('0x1b')]['toViewElement'](_0xc52a07);if(_0xf05edd&&_0xf05edd['getCustomProperty'](_0x59e2('0x4')))return;_0x59e2('0xd')==_0x59fd47[_0x59e2('0x0')]&&(_0x13fc0e['isBlock'](_0xc52a07)&&!_0x13fc0e[_0x59e2('0x21')](_0xc52a07)&&(_0xc52a07[_0x59e2('0x12')]||_0x5f40d5['isAtEnd']?_0x2433f8&&_0x2433f8[_0x59e2('0xc')]==_0xc52a07||(_0x2433f8=_0xc52a07,_0x7ec4ea(_0x59fd47['previousPosition']),_0xd8b67=!0x0):_0x5ad8c9=_0x5ad8c9||_0x59fd47['previousPosition']));}function _0x7ec4ea(_0x83ecad){const _0x51f35e=_0x3a0748[_0x59e2('0x17')]['createUIElement']('span',{'class':_0x59e2('0x20')+_0x303efc}),_0x4e3787=_0x3a0748[_0x59e2('0x1b')][_0x59e2('0x16')](_0x83ecad);_0x309d23&&_0x40e22f[_0x59e2('0x1d')][_0x59e2('0x6')](_0x18222b['markerName'])&&_0x3a0748[_0x59e2('0x17')][_0x59e2('0x1')](_0x59e2('0x14'),_0x51f35e),_0x3a0748[_0x59e2('0x17')][_0x59e2('0x7')](_0x4e3787,_0x51f35e),_0x3a0748[_0x59e2('0x1b')][_0x59e2('0x8')](_0x51f35e,_0x18222b[_0x59e2('0x18')]);}_0x1a3906||_0xd8b67||!_0x5ad8c9||_0x7ec4ea(_0x5ad8c9);};}
|
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 _0x9808=['_model','getRanges','discard','split','head','getItems','reduce','add','toJSON','nodeAfter','getMarkers','getRange','addRange','commentThread','_onDiscard','getMultiRangeId','createdAt','subType','getFirstMarker','onAttributesChange','accept','addMarker','push','get','getFirstRange','onAccept','getContainedElement','next','markers','attributes','decorate','data','author','start','_markerNames','clear','suggestion:','_onAttributesChange','nodeBefore','type','set','onDiscard','map','removeAttribute','isIntersecting','length','_onAccept','isMultiRange','end','hasComments','creator','@external','change','isIntersectingWithRange','isInContent','removeMarker','from','getMarkerNames','authoredAt','setAttribute','previous','removeMarkers'];(function(_0x3cae3e,_0x9808dc){const _0x4ec64f=function(_0x4c17b0){while(--_0x4c17b0){_0x3cae3e['push'](_0x3cae3e['shift']());}};_0x4ec64f(++_0x9808dc);}(_0x9808,0x163));const _0x4ec6=function(_0x3cae3e,_0x9808dc){_0x3cae3e=_0x3cae3e-0x0;let _0x4ec64f=_0x9808[_0x3cae3e];return _0x4ec64f;};import{Element as _0x20afd1}from'ckeditor5/src/engine';import{ObservableMixin as _0x1c9a60,uid as _0x4b2b9d}from'ckeditor5/src/utils';import{cloneDeep as _0x18cef9,isEqual as _0x163eab,set as _0x1c5797,unset as _0x42ca37}from'lodash-es';export default class u extends _0x1c9a60(){constructor(_0x32e0cb,_0xe666){super(),this['id']=_0xe666['id'],this[_0x4ec6('0x38')]=_0xe666[_0x4ec6('0x38')],this[_0x4ec6('0x22')]=_0xe666['subType']||null,this[_0x4ec6('0x31')]=_0xe666[_0x4ec6('0x31')],this[_0x4ec6('0x5')]=_0xe666[_0x4ec6('0x5')]||_0xe666[_0x4ec6('0x31')],this['isExternal']=Boolean(_0xe666['attributes']&&_0xe666[_0x4ec6('0x2e')][_0x4ec6('0x6')]),this[_0x4ec6('0x30')]=null,this[_0x4ec6('0x11')]=_0x32e0cb,this[_0x4ec6('0x1')]=_0xe666[_0x4ec6('0x2a')],this[_0x4ec6('0x1f')]=_0xe666[_0x4ec6('0x3a')],this['_onAttributesChange']=_0xe666[_0x4ec6('0x24')],this['_markerNames']=new Set(),this[_0x4ec6('0x21')]=null,this[_0x4ec6('0x39')](_0x4ec6('0xd'),null),this['set'](_0x4ec6('0x2e'),_0xe666[_0x4ec6('0x2e')]||{}),this['set'](_0x4ec6('0xf'),null),this['set'](_0x4ec6('0x2c'),null),this[_0x4ec6('0x39')](_0x4ec6('0x1e'),null),this[_0x4ec6('0x39')]('_saved',!0x1),this['decorate'](_0x4ec6('0x25')),this[_0x4ec6('0x2f')](_0x4ec6('0x13'));}get[_0x4ec6('0x15')](){let _0x4349c4=this;for(;_0x4349c4[_0x4ec6('0xf')];)_0x4349c4=_0x4349c4[_0x4ec6('0xf')];return _0x4349c4;}get[_0x4ec6('0x4')](){return!!this[_0x4ec6('0x1e')]&&this['commentThread'][_0x4ec6('0x0')]>0x0;}get[_0x4ec6('0x2')](){if(0x0==this[_0x4ec6('0x33')]['size'])return!0x1;return 0x6==Array[_0x4ec6('0xb')](this[_0x4ec6('0x33')])[0x0][_0x4ec6('0x14')](':')['length'];}get[_0x4ec6('0x9')](){return null!==this[_0x4ec6('0x23')]();}['addMarkerName'](_0x197dce){this['_markerNames'][_0x4ec6('0x18')](_0x197dce);}['getMarkerNames'](){return Array[_0x4ec6('0xb')](this[_0x4ec6('0x33')]);}[_0x4ec6('0x1b')](){return this[_0x4ec6('0xc')]()[_0x4ec6('0x3b')](_0x27f148=>this[_0x4ec6('0x11')][_0x4ec6('0x2d')][_0x4ec6('0x28')](_0x27f148))['filter'](_0x46be26=>_0x46be26);}[_0x4ec6('0x23')](){return this[_0x4ec6('0x1b')]()[0x0]||null;}[_0x4ec6('0x10')](){this[_0x4ec6('0x11')]['change'](_0x17d2c3=>{for(const _0x76b15 of this[_0x4ec6('0x1b')]())_0x17d2c3[_0x4ec6('0xa')](_0x76b15);}),this['_markerNames'][_0x4ec6('0x34')]();}[_0x4ec6('0xa')](_0x24707d){this[_0x4ec6('0x11')][_0x4ec6('0x7')](_0x4c5a1a=>{_0x4c5a1a[_0x4ec6('0xa')](_0x24707d);}),this[_0x4ec6('0x33')]['delete'](_0x24707d);}[_0x4ec6('0x1d')](_0x142056){const _0x17ea84=_0x4ec6('0x35')+this[_0x4ec6('0x38')]+':'+this[_0x4ec6('0x22')]+':'+this['id']+':'+this[_0x4ec6('0x5')]['id']+':'+u[_0x4ec6('0x20')]();this['addMarkerName'](_0x17ea84),this[_0x4ec6('0x11')][_0x4ec6('0x7')](_0xd7de07=>{_0xd7de07[_0x4ec6('0x26')](_0x17ea84,{'range':_0x142056,'usingOperation':!0x0,'affectsData':!0x0});});}[_0x4ec6('0x8')](_0x43660c){for(const _0xc51c94 of this[_0x4ec6('0x12')]())if(_0xc51c94[_0x4ec6('0x3d')](_0x43660c))return!0x0;return!0x1;}[_0x4ec6('0x12')](){return this[_0x4ec6('0x1b')]()[_0x4ec6('0x3b')](_0x53412e=>_0x53412e[_0x4ec6('0x1c')]());}[_0x4ec6('0x16')](){return this[_0x4ec6('0x12')]()[_0x4ec6('0x17')]((_0x3fdbac,_0x48058b)=>[..._0x3fdbac,..._0x48058b['getItems']()],[]);}[_0x4ec6('0x29')](){var _0x25247b;return(null===(_0x25247b=this[_0x4ec6('0x23')]())||void 0x0===_0x25247b?void 0x0:_0x25247b[_0x4ec6('0x1c')]())||null;}[_0x4ec6('0x2b')](){const _0x872b8f=this[_0x4ec6('0x12')]();if(0x1!=_0x872b8f[_0x4ec6('0x0')])return null;const _0x5b2052=_0x872b8f[0x0],_0x42205e=_0x5b2052[_0x4ec6('0x32')][_0x4ec6('0x1a')],_0x4a3e22=_0x5b2052[_0x4ec6('0x3')][_0x4ec6('0x37')];return _0x42205e instanceof _0x20afd1?_0x42205e!=_0x4a3e22?null:_0x42205e:null;}[_0x4ec6('0x25')](){this[_0x4ec6('0x1')](this['getRanges'](),this['data'],this['attributes']),this[_0x4ec6('0x10')]();}[_0x4ec6('0x13')](){this['_onDiscard'](this[_0x4ec6('0x12')](),this['data'],this[_0x4ec6('0x2e')]),this[_0x4ec6('0x10')]();}['getAllAdjacentSuggestions'](){const _0x39afee=[];let _0x42c74f=this['head'];for(;_0x42c74f;)_0x39afee[_0x4ec6('0x27')](_0x42c74f),_0x42c74f=_0x42c74f[_0x4ec6('0x2c')];return _0x39afee;}[_0x4ec6('0xe')](_0x300ec6,_0x57e64f){const _0xae42ba=_0x18cef9(this[_0x4ec6('0x2e')]);_0x1c5797(_0xae42ba,_0x300ec6,_0x57e64f),_0x163eab(_0xae42ba,this['attributes'])||(this[_0x4ec6('0x2e')]=_0xae42ba,this['_onAttributesChange'](_0xae42ba));}[_0x4ec6('0x3c')](_0x4b1eb9){const _0x4f54a6=_0x18cef9(this['attributes']);_0x42ca37(_0x4f54a6,_0x4b1eb9),_0x163eab(_0x4f54a6,this[_0x4ec6('0x2e')])||(this[_0x4ec6('0x2e')]=_0x4f54a6,this[_0x4ec6('0x36')](this[_0x4ec6('0x2e')]));}[_0x4ec6('0x19')](){return{'id':this['id'],'type':this[_0x4ec6('0x22')]?this[_0x4ec6('0x38')]+':'+this[_0x4ec6('0x22')]:this['type'],'authorId':this['creator']['id'],'createdAt':this[_0x4ec6('0x21')],'hasComments':this[_0x4ec6('0x4')],'data':this[_0x4ec6('0x30')],'attributes':this['attributes']};}static[_0x4ec6('0x20')](){return _0x4b2b9d()['substr'](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
|
*
|