@ckeditor/ckeditor5-track-changes 40.2.0 → 41.1.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/CHANGELOG.md +5 -5
- package/LICENSE.md +1 -1
- package/README.md +1 -1
- package/build/track-changes.js +2 -2
- package/build/translations/es.js +1 -1
- package/build/translations/ro.js +1 -1
- package/lang/translations/ar.po +1 -1
- package/lang/translations/az.po +1 -1
- package/lang/translations/bg.po +1 -1
- package/lang/translations/bn.po +1 -1
- package/lang/translations/ca.po +1 -1
- package/lang/translations/cs.po +1 -1
- package/lang/translations/da.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +1 -1
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/en.po +1 -1
- package/lang/translations/es.po +2 -2
- package/lang/translations/et.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/he.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/id.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/ms.po +1 -1
- package/lang/translations/nl.po +1 -1
- package/lang/translations/no.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/pt.po +1 -1
- package/lang/translations/ro.po +2 -2
- package/lang/translations/ru.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sq.po +1 -1
- package/lang/translations/sr-latn.po +1 -1
- package/lang/translations/sr.po +1 -1
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/tt.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/ur.po +1 -1
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/lang/translations/zh.po +1 -1
- package/package.json +4 -3
- package/src/augmentation.d.ts +3 -3
- package/src/augmentation.js +1 -1
- package/src/commands/acceptsuggestioncommand.d.ts +3 -3
- package/src/commands/acceptsuggestioncommand.js +2 -2
- package/src/commands/discardsuggestioncommand.d.ts +3 -3
- package/src/commands/discardsuggestioncommand.js +2 -2
- package/src/commands/executeonallsuggestionscommand.d.ts +3 -3
- package/src/commands/executeonallsuggestionscommand.js +2 -2
- package/src/commands/executeonselectedsuggestionscommand.d.ts +3 -3
- package/src/commands/executeonselectedsuggestionscommand.js +2 -2
- package/src/commands/trackchangescommand.d.ts +2 -2
- package/src/commands/trackchangescommand.js +2 -2
- package/src/index.d.ts +13 -13
- package/src/index.js +2 -2
- package/src/integrations/aiassistant.d.ts +2 -2
- package/src/integrations/aiassistant.js +2 -2
- package/src/integrations/alignment.d.ts +2 -2
- package/src/integrations/alignment.js +2 -2
- package/src/integrations/basicstyles.d.ts +2 -2
- package/src/integrations/basicstyles.js +2 -2
- package/src/integrations/blockquote.d.ts +2 -2
- package/src/integrations/blockquote.js +2 -2
- package/src/integrations/casechange.d.ts +17 -0
- package/src/integrations/casechange.js +23 -0
- package/src/integrations/ckbox.d.ts +2 -2
- package/src/integrations/ckbox.js +2 -2
- package/src/integrations/codeblock.d.ts +2 -2
- package/src/integrations/codeblock.js +2 -2
- package/src/integrations/comments.d.ts +2 -2
- package/src/integrations/comments.js +2 -2
- package/src/integrations/deletecommand.d.ts +3 -3
- package/src/integrations/deletecommand.js +2 -2
- package/src/integrations/entercommand.d.ts +3 -3
- package/src/integrations/entercommand.js +2 -2
- package/src/integrations/findandreplace.d.ts +2 -2
- package/src/integrations/findandreplace.js +2 -2
- package/src/integrations/font.d.ts +2 -2
- package/src/integrations/font.js +2 -2
- package/src/integrations/formatpainter.d.ts +2 -2
- package/src/integrations/formatpainter.js +2 -2
- package/src/integrations/heading.d.ts +2 -2
- package/src/integrations/heading.js +2 -2
- package/src/integrations/highlight.d.ts +2 -2
- package/src/integrations/highlight.js +2 -2
- package/src/integrations/horizontalline.d.ts +2 -2
- package/src/integrations/horizontalline.js +2 -2
- package/src/integrations/htmlembed.d.ts +2 -2
- package/src/integrations/htmlembed.js +2 -2
- package/src/integrations/image.d.ts +2 -2
- package/src/integrations/image.js +2 -2
- package/src/integrations/imagereplace.d.ts +2 -2
- package/src/integrations/imagereplace.js +2 -2
- package/src/integrations/imagestyle.d.ts +2 -2
- package/src/integrations/imagestyle.js +2 -2
- package/src/integrations/importword.d.ts +2 -2
- package/src/integrations/importword.js +2 -2
- package/src/integrations/indent.d.ts +2 -2
- package/src/integrations/indent.js +2 -2
- package/src/integrations/inputcommand.d.ts +3 -3
- package/src/integrations/inputcommand.js +2 -2
- package/src/integrations/legacylist.d.ts +17 -0
- package/src/integrations/legacylist.js +23 -0
- package/src/integrations/{documentlistproperties.d.ts → legacylistproperties.d.ts} +7 -7
- package/src/integrations/legacylistproperties.js +23 -0
- package/src/integrations/link.d.ts +2 -2
- package/src/integrations/link.js +2 -2
- package/src/integrations/list.d.ts +6 -6
- package/src/integrations/list.js +2 -2
- package/src/integrations/listproperties.d.ts +6 -15
- package/src/integrations/listproperties.js +2 -2
- package/src/integrations/mediaembed.d.ts +2 -2
- package/src/integrations/mediaembed.js +2 -2
- package/src/integrations/mention.d.ts +2 -2
- package/src/integrations/mention.js +2 -2
- package/src/integrations/pagebreak.d.ts +2 -2
- package/src/integrations/pagebreak.js +2 -2
- package/src/integrations/paragraph.d.ts +2 -2
- package/src/integrations/paragraph.js +2 -2
- package/src/integrations/removeformat.d.ts +2 -2
- package/src/integrations/removeformat.js +2 -2
- package/src/integrations/restrictededitingmode.d.ts +2 -2
- package/src/integrations/restrictededitingmode.js +2 -2
- package/src/integrations/shiftentercommand.d.ts +3 -3
- package/src/integrations/shiftentercommand.js +2 -2
- package/src/integrations/standardeditingmode.d.ts +2 -2
- package/src/integrations/standardeditingmode.js +2 -2
- package/src/integrations/style.d.ts +2 -2
- package/src/integrations/style.js +2 -2
- package/src/integrations/table.d.ts +2 -2
- package/src/integrations/table.js +2 -2
- package/src/integrations/tablecaption.d.ts +3 -3
- package/src/integrations/tablecaption.js +2 -2
- package/src/integrations/tableclipboard.d.ts +3 -3
- package/src/integrations/tableclipboard.js +2 -2
- package/src/integrations/tablecolumnresize.d.ts +5 -5
- package/src/integrations/tablecolumnresize.js +2 -2
- package/src/integrations/tableheadings.d.ts +3 -3
- package/src/integrations/tableheadings.js +2 -2
- package/src/integrations/tablemergesplit.d.ts +3 -3
- package/src/integrations/tablemergesplit.js +2 -2
- package/src/integrations/tableofcontents.d.ts +2 -2
- package/src/integrations/tableofcontents.js +2 -2
- package/src/integrations/tableproperties.d.ts +5 -5
- package/src/integrations/tableproperties.js +2 -2
- package/src/integrations/template.d.ts +2 -2
- package/src/integrations/template.js +2 -2
- package/src/integrations/title.d.ts +2 -2
- package/src/integrations/title.js +2 -2
- package/src/integrations/undo.d.ts +2 -2
- package/src/integrations/undo.js +2 -2
- package/src/integrations/utils.d.ts +4 -4
- package/src/integrations/utils.js +2 -2
- package/src/suggestion.d.ts +6 -6
- package/src/suggestion.js +2 -2
- package/src/suggestiondescriptionfactory.d.ts +4 -4
- package/src/suggestiondescriptionfactory.js +2 -2
- package/src/trackchanges.d.ts +6 -6
- package/src/trackchanges.js +2 -2
- package/src/trackchangesconfig.d.ts +2 -2
- package/src/trackchangesconfig.js +1 -1
- package/src/trackchangesdata.d.ts +3 -3
- package/src/trackchangesdata.js +2 -2
- package/src/trackchangesediting.d.ts +56 -55
- package/src/trackchangesediting.js +2 -2
- package/src/trackchangesui.d.ts +4 -4
- package/src/trackchangesui.js +2 -2
- package/src/ui/suggestioncontroller.d.ts +6 -6
- package/src/ui/suggestioncontroller.js +2 -2
- package/src/ui/view/basesuggestionthreadview.d.ts +7 -7
- package/src/ui/view/basesuggestionthreadview.js +2 -2
- package/src/ui/view/suggestionthreadview.d.ts +6 -6
- package/src/ui/view/suggestionthreadview.js +2 -2
- package/src/utils/common-translations.d.ts +2 -2
- package/src/utils/common-translations.js +2 -2
- package/src/utils/utils.d.ts +5 -5
- package/src/utils/utils.js +2 -2
- package/theme/icons/track-changes-accept.svg +1 -1
- package/theme/icons/track-changes-discard.svg +1 -1
- package/theme/icons/track-changes.svg +1 -1
- package/src/integrations/documentlist.d.ts +0 -17
- package/src/integrations/documentlist.js +0 -23
- package/src/integrations/documentlistproperties.js +0 -23
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, 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 _0x1293=['_tableSuggestions','forceValue','map','length','type','add','ELEMENT_TABLE','has','document','accept','filter','getColumnIndexes','insertion','enableCommand','afterInit','removeTableColumn','writer','editor','minColumn','data','end','getChanges','toLowerCase','insertTable','rootName','showSuggestionHighlights','_splitMarkerName','every','root','change','getRanges','startsWith','discard','getSelectionAffectedTableCells','join','registerDescriptionCallback','refresh','isArray','substr','change:data','insertTableColumnLeft','getSuggestion','differ','position','getContainedElement','span','highest','_tablePostFixingSubtypes','first','addClass','selection','MIN_SAFE_INTEGER','commands','addRange','registerPostFixer','last','low','nodeAfter','fromRange','markMultiRangeInsertion','downcastDispatcher','colspan','MAX_SAFE_INTEGER','_suggestionFactory','markMultiRangeDeletion','from','*Remove:*\x20%0','TableEditing','deletion','registerElementLabel','_setupColumnsRowsFixing','$graveyard','plugins','getAttribute','detach','above','findAncestor','ELEMENT_TABLE_ROW_WITH_TEXT','insert','_getSuggestionCoords','ELEMENT_TABLE_ROW','_getCoordsForCells','removeTableRow','tableRow','getRowIndexes','ELEMENT_TABLE_WITH_TEXT','get','order','*Insert:*\x20%0','enqueueChange','createTableWalker','model','name','TableUtils','oldRange','rowspan','options','isInContent','addMarker:suggestion','cell','left','TrackChangesEditing','min','ELEMENT_TABLE_COLUMN','isIntersectingWithRange','createRangeOn','tableColumn','getFirstRange','_acceptFormatSuggestionCallbackFactory','table','some','registerCustomCallback','_descriptionFactory','$textProxy','tableCell','mapper','maxColumn','classes','element','execute','isEqual','hasAttribute','getItems','setSelection','ELEMENT_TABLE_COLUMN_WITH_TEXT','push','insertTableColumnRight','getCellLocation','selectTableColumn','subType','createPositionAt','max','includes','start'];(function(_0x15fdfb,_0x12934c){const _0x4d8911=function(_0x4b05c1){while(--_0x4b05c1){_0x15fdfb['push'](_0x15fdfb['shift']());}};_0x4d8911(++_0x12934c);}(_0x1293,0xc0));const _0x4d89=function(_0x15fdfb,_0x12934c){_0x15fdfb=_0x15fdfb-0x0;let _0x4d8911=_0x1293[_0x15fdfb];return _0x4d8911;};import{Plugin as _0x240bab}from'ckeditor5/src/core';import{LiveRange as _0x4b2a7a}from'ckeditor5/src/engine';import{setHighlightHandling as _0x3701f9}from'ckeditor5/src/widget';import{getTranslation as _0x40c305}from'../utils/common-translations';export default class wt extends _0x240bab{constructor(_0x2923b4){super(_0x2923b4),this[_0x4d89('0x7b')]=['tableRow',_0x4d89('0x30')],this['_tableSuggestions']=new Set();}[_0x4d89('0x5a')](){const _0x409da6=this[_0x4d89('0x5d')],_0x41dcfe=_0x409da6['model'][_0x4d89('0x54')]['selection'];if(!_0x409da6[_0x4d89('0xe')][_0x4d89('0x53')](_0x4d89('0x9')))return;const _0xf73bd9=_0x409da6['locale'],_0x12dbb1=_0x409da6[_0x4d89('0xe')][_0x4d89('0x1c')](_0x4d89('0x2b')),_0x32cd25=_0x409da6[_0x4d89('0xe')][_0x4d89('0x1c')](_0x4d89('0x23'));_0x12dbb1[_0x4d89('0x36')][_0x4d89('0xb')](_0x4d89('0x33'),_0x11da4f=>_0x40c305(_0xf73bd9,_0x4d89('0x52'),_0x11da4f)),this[_0x4d89('0xc')](),_0x12dbb1['enableCommand'](_0x4d89('0x63')),_0x12dbb1[_0x4d89('0x59')]('selectTableRow'),_0x12dbb1[_0x4d89('0x59')](_0x4d89('0x46'));for(const _0x2bd2ae of['insertTableRowAbove','insertTableRowBelow']){const _0x351f27=_0x409da6[_0x4d89('0x80')][_0x4d89('0x1c')](_0x2bd2ae);_0x12dbb1[_0x4d89('0x59')](_0x2bd2ae,_0x26813a=>{_0x409da6[_0x4d89('0x21')][_0x4d89('0x69')](_0x576d9f=>{_0x26813a();const _0x3bc6a4=_0x4d89('0x11')===_0x351f27[_0x4d89('0x1d')],_0x2008ac=_0x32cd25[_0x4d89('0x6d')](_0x41dcfe),_0xc253bd=_0x32cd25[_0x4d89('0x1a')](_0x2008ac),_0x4c1202=_0x3bc6a4?_0xc253bd[_0x4d89('0x7c')]-0x1:_0xc253bd[_0x4d89('0x83')]+0x1,_0x5b3ec1=_0x2008ac[0x0][_0x4d89('0x12')](_0x4d89('0x33')),_0x4ef273=_0x32cd25[_0x4d89('0x20')](_0x5b3ec1,{'startRow':_0x4c1202,'endRow':_0x4c1202}),_0x1d3a6f=Array[_0x4d89('0x7')](_0x4ef273)[_0x4d89('0x4e')](_0x1a8bad=>_0x576d9f[_0x4d89('0x2f')](_0x1a8bad[_0x4d89('0x29')]));_0x12dbb1[_0x4d89('0x1')](_0x1d3a6f,_0x4d89('0x19'));});});}for(const _0x3d9952 of[_0x4d89('0x74'),_0x4d89('0x44')]){const _0x146aa8=_0x409da6['commands'][_0x4d89('0x1c')](_0x3d9952);_0x12dbb1[_0x4d89('0x59')](_0x3d9952,_0x32b8aa=>{_0x409da6[_0x4d89('0x21')]['change'](_0x34a159=>{_0x32b8aa();const _0x5597e3=_0x4d89('0x2a')===_0x146aa8[_0x4d89('0x1d')],_0x209ace=_0x32cd25[_0x4d89('0x6d')](_0x41dcfe),_0x24c282=_0x32cd25['getColumnIndexes'](_0x209ace),_0x32f7c2=_0x5597e3?_0x24c282['first']-0x1:_0x24c282['last']+0x1,_0x12d892=_0x209ace[0x0][_0x4d89('0x12')](_0x4d89('0x33')),_0x12ce50=_0x32cd25[_0x4d89('0x20')](_0x12d892,{'startRow':0x0,'column':_0x32f7c2,'includeAllSlots':!0x1}),_0x2fc124=Array[_0x4d89('0x7')](_0x12ce50)[_0x4d89('0x4e')](_0x5a2da4=>_0x34a159[_0x4d89('0x2f')](_0x5a2da4['cell']));_0x12dbb1[_0x4d89('0x1')](_0x2fc124,_0x4d89('0x30'));});});}for(const _0x288885 of['removeTableRow',_0x4d89('0x5b')]){const _0x1617a5=_0x288885[_0x4d89('0x72')](0xb),_0x41b124=_0x1617a5[_0x4d89('0x62')](),_0x11382a=_0x41b124[_0x4d89('0x72')](0x0,0x3)+_0x4d89('0x79'),_0x4ddfcd=_0x4d89('0x33')+_0x1617a5,_0x3925e3=_0x4d89('0x2c')+_0x1617a5,_0x55c9d6=_0x4d89('0x49')+_0x1617a5;_0x12dbb1['enableCommand'](_0x288885,()=>{_0x409da6[_0x4d89('0x21')]['change'](_0x317dde=>{const _0x2d5dfa=_0x32cd25[_0x4d89('0x6d')](_0x41dcfe),_0x3fb775=_0x2d5dfa[0x0]['findAncestor'](_0x4d89('0x33'));let _0x2a1f41;if(_0x4d89('0x18')==_0x288885){const _0x41ae38=_0x32cd25[_0x4d89('0x1a')](_0x2d5dfa);_0x2a1f41={'startRow':_0x41ae38['first'],'endRow':_0x41ae38[_0x4d89('0x83')],'includeAllSlots':!0x0};}else{const _0x1e8569=_0x32cd25[_0x4d89('0x57')](_0x2d5dfa);_0x2a1f41={'startColumn':_0x1e8569[_0x4d89('0x7c')],'endColumn':_0x1e8569[_0x4d89('0x83')],'includeAllSlots':!0x0};}const _0x2d7f5f=_0x32cd25[_0x4d89('0x20')](_0x3fb775,_0x2a1f41),_0x3c1929=Array[_0x4d89('0x7')](_0x2d7f5f)[_0x4d89('0x4e')](({cell:_0xa6f5a6})=>_0xa6f5a6),_0x24e77b=se(_0x3c1929[_0x4d89('0x56')](_0x11f8d8=>_0x11f8d8[_0x4d89('0x3f')](_0x11382a))),_0x5b53b2=se(_0x3c1929[_0x4d89('0x56')](_0x69a2ad=>!_0x69a2ad[_0x4d89('0x3f')](_0x11382a)))[_0x4d89('0x4e')](_0x2f5792=>_0x317dde['createRangeOn'](_0x2f5792)),_0x1b1c72=_0x12dbb1[_0x4d89('0x6')](_0x5b53b2,_0x4ddfcd);if(_0x1b1c72&&('tableRow'==_0x1b1c72[_0x4d89('0x47')]||_0x4d89('0x30')==_0x1b1c72[_0x4d89('0x47')])){const _0x155456=this[_0x4d89('0x15')](_0x1b1c72);for(const _0x2885cc of _0x24e77b){const _0x2d2d25=_0x317dde[_0x4d89('0x2f')](_0x2885cc),_0x3cc299=_0x32cd25[_0x4d89('0x45')](_0x2885cc),_0x24e44c=_0x2885cc[_0x4d89('0xf')](_0x11382a)-0x1,_0x212354=_0x155456[_0x3925e3],_0x2c8ad8=_0x155456[_0x55c9d6];_0x212354<=_0x3cc299[_0x41b124]&&_0x3cc299[_0x41b124]+_0x24e44c<=_0x2c8ad8&&_0x1b1c72['addRange'](_0x2d2d25);}}});});}function _0x16ec23(_0x5937fb){const _0x7d0513=Array[_0x4d89('0x7')](_0x41dcfe['getRanges']())[_0x4d89('0x4e')](_0x1009bc=>_0x4b2a7a[_0x4d89('0x0')](_0x1009bc));_0x409da6[_0x4d89('0x21')][_0x4d89('0x69')](_0x524448=>{const _0x31facc=_0x524448['batch'];_0x5937fb=_0x5937fb[_0x4d89('0x56')](_0x5a52a8=>_0x4d89('0xd')!=_0x5a52a8['root']['rootName']),_0x524448['setSelection'](_0x5937fb),_0x409da6['commands'][_0x4d89('0x1c')](_0x4d89('0x18'))[_0x4d89('0x70')](),_0x409da6[_0x4d89('0x3d')](_0x4d89('0x18'),{'forceDefaultExecution':!0x0}),_0x409da6['model']['enqueueChange'](()=>{_0x409da6[_0x4d89('0x21')][_0x4d89('0x1f')](_0x31facc,_0x272f29=>{const _0x438d9c=_0x7d0513[_0x4d89('0x56')](_0x39e17a=>'$graveyard'!=_0x39e17a[_0x4d89('0x68')][_0x4d89('0x64')]);_0x438d9c['length']>0x0&&_0x272f29[_0x4d89('0x41')](_0x438d9c);for(const _0x31de77 of _0x7d0513)_0x31de77[_0x4d89('0x10')]();});});});}function _0xb2e97d(_0x2b6c0c){_0x409da6[_0x4d89('0x21')][_0x4d89('0x69')](_0x5d2cfc=>{const _0x2c34bd=Array[_0x4d89('0x7')](_0x41dcfe['getRanges']())[_0x4d89('0x4e')](_0x1a15eb=>_0x4b2a7a['fromRange'](_0x1a15eb)),_0x100168=[];for(const _0x43b8a2 of _0x2b6c0c)for(const _0x5e14d7 of _0x43b8a2[_0x4d89('0x40')]({'shallow':!0x0}))_0x100168[_0x4d89('0x43')](_0x5e14d7);for(const _0x37e2e3 of _0x100168)_0x4d89('0xd')!=_0x37e2e3[_0x4d89('0x68')][_0x4d89('0x64')]&&(_0x5d2cfc[_0x4d89('0x41')](_0x5d2cfc[_0x4d89('0x48')](_0x37e2e3,0x0)),_0x409da6[_0x4d89('0x80')][_0x4d89('0x1c')]('removeTableColumn')[_0x4d89('0x70')](),_0x409da6[_0x4d89('0x3d')](_0x4d89('0x5b'),{'forceDefaultExecution':!0x0}));const _0xfb7553=_0x2c34bd[_0x4d89('0x56')](_0x51dd7a=>_0x4d89('0xd')!=_0x51dd7a['root'][_0x4d89('0x64')]);_0xfb7553[_0x4d89('0x4f')]>0x0&&_0x5d2cfc['setSelection'](_0xfb7553);for(const _0x1a361d of _0x2c34bd)_0x1a361d[_0x4d89('0x10')]();});}function _0x3a8033(_0x573895,_0x40a5ac){return _0x40a5ac[_0x4d89('0x67')](_0x2e2c96=>_0x573895[_0x4d89('0x34')](_0x42add0=>_0x42add0[_0x4d89('0x60')][_0x4d89('0x3e')](_0x2e2c96[_0x4d89('0x4b')])||_0x2e2c96[_0x4d89('0x60')]['isEqual'](_0x42add0[_0x4d89('0x4b')])));}function _0x35126d(_0x80ee5b,_0x1b70eb){return _0x80ee5b[_0x4d89('0x34')](_0x541c6a=>_0x1b70eb[_0x4d89('0x34')](_0x19924c=>_0x541c6a['end']['isTouching'](_0x19924c['start'])));}_0x409da6['data'][_0x4d89('0x2')]['on'](_0x4d89('0x28'),(_0x43917d,_0x5430b9,_0x6539e9)=>{if(!_0x6539e9[_0x4d89('0x26')][_0x4d89('0x65')])return;const _0xa5de7f=_0x5430b9['item'];if(!_0xa5de7f)return;const _0x44a18d=_0x6539e9[_0x4d89('0x39')]['toViewElement'](_0xa5de7f);function _0x3f3045(_0x48b230){return Array[_0x4d89('0x71')](_0x48b230)?_0x48b230:[_0x48b230];}_0x44a18d&&_0x4d89('0x38')===_0xa5de7f['name']&&_0x3701f9(_0x44a18d,_0x6539e9[_0x4d89('0x5c')],(_0xc4f89a,_0x552f5e,_0xefc465)=>_0xefc465[_0x4d89('0x7d')](_0x3f3045(_0x552f5e[_0x4d89('0x3b')]),_0xc4f89a),(_0x9b7c88,_0xe63348,_0x28fa47)=>_0x28fa47['removeClass'](_0x3f3045(_0xe63348[_0x4d89('0x3b')]),_0x9b7c88));},{'priority':_0x4d89('0x7a')}),_0x12dbb1[_0x4d89('0x36')][_0x4d89('0x6f')](_0x1537ae=>{if(_0x4d89('0x58')!=_0x1537ae[_0x4d89('0x50')]&&_0x4d89('0xa')!=_0x1537ae['type'])return;const _0x224376=_0x1537ae[_0x4d89('0x78')]();if(null!=_0x224376&&_0x224376['is'](_0x4d89('0x3c'),'table')){if(_0x4d89('0x58')==_0x1537ae['type']){const _0x32f5ab=_0x1537ae[_0x4d89('0x40')]()[_0x4d89('0x56')](_0x50659c=>_0x50659c['is'](_0x4d89('0x37')))[_0x4d89('0x4e')](_0x4b5070=>_0x4b5070['data']);if(_0x32f5ab[_0x4d89('0x4f')])return{'type':_0x4d89('0x58'),'content':_0x40c305(_0xf73bd9,_0x4d89('0x1e'),_0x40c305(_0xf73bd9,_0x4d89('0x1b'),'\x22'+_0x32f5ab['join']('\x20')+'\x22'))};}if(_0x4d89('0xa')==_0x1537ae[_0x4d89('0x50')]){const _0x2abda9=_0x1537ae[_0x4d89('0x40')]()[_0x4d89('0x56')](_0x49044c=>_0x49044c['is']('$textProxy'))[_0x4d89('0x4e')](_0x141aa0=>_0x141aa0[_0x4d89('0x5f')]);if(_0x2abda9[_0x4d89('0x4f')])return{'type':'deletion','content':_0x40c305(_0xf73bd9,'*Remove:*\x20%0',_0x40c305(_0xf73bd9,_0x4d89('0x1b'),'\x22'+_0x2abda9[_0x4d89('0x6e')]('\x20')+'\x22'))};}}}),_0x12dbb1[_0x4d89('0x36')]['registerDescriptionCallback'](_0x39ed0c=>{if(_0x4d89('0x19')==_0x39ed0c['subType']){const _0x5ddbb3=_0x39ed0c[_0x4d89('0x40')]()[_0x4d89('0x56')](_0x437668=>_0x437668['is']('$textProxy'))[_0x4d89('0x4e')](_0x566fb6=>_0x566fb6['data']),_0x3f66ee=this[_0x4d89('0x15')](_0x39ed0c),_0x2eb588=_0x3f66ee['maxRow']-_0x3f66ee['minRow']+0x1;if(_0x4d89('0x58')==_0x39ed0c['type'])return _0x5ddbb3[_0x4d89('0x4f')]?{'type':_0x4d89('0x58'),'content':_0x40c305(_0xf73bd9,_0x4d89('0x1e'),_0x40c305(_0xf73bd9,'ELEMENT_TABLE_ROW_WITH_TEXT',[_0x2eb588,'\x22'+_0x5ddbb3[_0x4d89('0x6e')]('\x20')+'\x22']))}:{'type':'insertion','content':_0x40c305(_0xf73bd9,_0x4d89('0x1e'),_0x40c305(_0xf73bd9,_0x4d89('0x16'),_0x2eb588))};if('deletion'==_0x39ed0c['type'])return _0x5ddbb3[_0x4d89('0x4f')]?{'type':'deletion','content':_0x40c305(_0xf73bd9,_0x4d89('0x8'),_0x40c305(_0xf73bd9,_0x4d89('0x13'),[_0x2eb588,'\x22'+_0x5ddbb3[_0x4d89('0x6e')]('\x20')+'\x22']))}:{'type':_0x4d89('0xa'),'content':_0x40c305(_0xf73bd9,_0x4d89('0x8'),_0x40c305(_0xf73bd9,_0x4d89('0x16'),_0x2eb588))};}if('tableColumn'==_0x39ed0c[_0x4d89('0x47')]){const _0x463f79=_0x39ed0c[_0x4d89('0x40')]()[_0x4d89('0x56')](_0x19b51a=>_0x19b51a['is'](_0x4d89('0x37')))[_0x4d89('0x4e')](_0x58036c=>_0x58036c[_0x4d89('0x5f')]),_0x226cfa=this[_0x4d89('0x15')](_0x39ed0c),_0x5f3c34=_0x226cfa[_0x4d89('0x3a')]-_0x226cfa[_0x4d89('0x5e')]+0x1;if(_0x4d89('0x58')==_0x39ed0c[_0x4d89('0x50')])return _0x463f79[_0x4d89('0x4f')]?{'type':_0x4d89('0x58'),'content':_0x40c305(_0xf73bd9,_0x4d89('0x1e'),_0x40c305(_0xf73bd9,'ELEMENT_TABLE_COLUMN_WITH_TEXT',[_0x5f3c34,'\x22'+_0x463f79[_0x4d89('0x6e')]('\x20')+'\x22']))}:{'type':_0x4d89('0x58'),'content':_0x40c305(_0xf73bd9,_0x4d89('0x1e'),_0x40c305(_0xf73bd9,_0x4d89('0x2d'),_0x5f3c34))};if(_0x4d89('0xa')==_0x39ed0c['type'])return _0x463f79['length']?{'type':_0x4d89('0xa'),'content':_0x40c305(_0xf73bd9,'*Remove:*\x20%0',_0x40c305(_0xf73bd9,_0x4d89('0x42'),[_0x5f3c34,'\x22'+_0x463f79[_0x4d89('0x6e')]('\x20')+'\x22']))}:{'type':_0x4d89('0xa'),'content':_0x40c305(_0xf73bd9,'*Remove:*\x20%0',_0x40c305(_0xf73bd9,'ELEMENT_TABLE_COLUMN',_0x5f3c34))};}}),_0x12dbb1[_0x4d89('0x5')][_0x4d89('0x35')](_0x4d89('0x58'),_0x4d89('0x19'),_0x4d89('0x6c'),_0x16ec23),_0x12dbb1[_0x4d89('0x5')][_0x4d89('0x35')](_0x4d89('0xa'),_0x4d89('0x19'),'accept',_0x16ec23),_0x12dbb1['_suggestionFactory'][_0x4d89('0x35')](_0x4d89('0x58'),'tableColumn','discard',_0xb2e97d),_0x12dbb1[_0x4d89('0x5')][_0x4d89('0x35')](_0x4d89('0xa'),_0x4d89('0x30'),_0x4d89('0x55'),_0xb2e97d),_0x12dbb1['_suggestionFactory'][_0x4d89('0x35')](_0x4d89('0x58'),_0x4d89('0x30'),'join',_0x3a8033),_0x12dbb1[_0x4d89('0x5')][_0x4d89('0x35')]('deletion',_0x4d89('0x30'),'join',_0x3a8033),_0x12dbb1['_suggestionFactory'][_0x4d89('0x35')]('insertion',_0x4d89('0x19'),_0x4d89('0x6e'),_0x35126d),_0x12dbb1['_suggestionFactory']['registerCustomCallback'](_0x4d89('0xa'),'tableRow',_0x4d89('0x6e'),_0x35126d);}[_0x4d89('0x32')](){const _0x3b864d=this[_0x4d89('0x5d')],_0x6f4a05=_0x3b864d[_0x4d89('0x21')]['document'][_0x4d89('0x7e')];return(_0x5767e3,_0x39a248)=>{_0x3b864d['model'][_0x4d89('0x69')](_0x486fa7=>{const {commandName:_0x98c039,commandParams:_0x27e9a2}=_0x39a248;let _0x43e3e2=_0x5767e3[0x0][_0x4d89('0x60')]['nodeBefore'];_0x27e9a2&&_0x27e9a2[0x0]&&!0x1===_0x27e9a2[0x0][_0x4d89('0x4d')]&&(_0x43e3e2=_0x5767e3[0x0][_0x4d89('0x4b')][_0x4d89('0x85')]);const _0x402ea8=_0x486fa7['createRangeIn'](_0x43e3e2);if(_0x4d89('0xd')==_0x402ea8[_0x4d89('0x68')]['rootName'])return;const _0x4c6391=Array[_0x4d89('0x7')](_0x6f4a05['getRanges']())[_0x4d89('0x4e')](_0x5ecc5f=>_0x4b2a7a[_0x4d89('0x0')](_0x5ecc5f));_0x486fa7[_0x4d89('0x41')](_0x402ea8),_0x3b864d[_0x4d89('0x80')]['get'](_0x98c039)['refresh'](),_0x27e9a2[_0x4d89('0x43')]({'forceDefaultExecution':!0x0}),_0x3b864d['execute'](_0x98c039,..._0x27e9a2);const _0x460933=_0x4c6391[_0x4d89('0x56')](_0x75bdc5=>_0x4d89('0xd')!=_0x75bdc5[_0x4d89('0x68')][_0x4d89('0x64')]);_0x460933[_0x4d89('0x4f')]>0x0&&_0x486fa7['setSelection'](_0x460933);for(const _0x380fc7 of _0x4c6391)_0x380fc7['detach']();});};}[_0x4d89('0x17')](_0xccbb34){const _0x3b856a=this[_0x4d89('0x5d')][_0x4d89('0xe')]['get'](_0x4d89('0x23'));let _0x4bf7b9=Number[_0x4d89('0x4')],_0x5f432f=Number[_0x4d89('0x7f')],_0x25a89e=Number[_0x4d89('0x4')],_0x50f294=Number['MIN_SAFE_INTEGER'];for(const _0x511de9 of _0xccbb34){if('$graveyard'==_0x511de9[_0x4d89('0x68')]['rootName'])continue;const {row:_0x59e4bf,column:_0x207d79}=_0x3b856a[_0x4d89('0x45')](_0x511de9),_0x3ec24d=_0x511de9['hasAttribute'](_0x4d89('0x25'))?_0x511de9[_0x4d89('0xf')](_0x4d89('0x25'))-0x1:0x0,_0x3353fe=_0x511de9[_0x4d89('0x3f')](_0x4d89('0x3'))?_0x511de9[_0x4d89('0xf')](_0x4d89('0x3'))-0x1:0x0;_0x4bf7b9=_0x59e4bf<_0x4bf7b9?_0x59e4bf:_0x4bf7b9,_0x5f432f=_0x59e4bf+_0x3ec24d>_0x5f432f?_0x59e4bf+_0x3ec24d:_0x5f432f,_0x25a89e=_0x207d79<_0x25a89e?_0x207d79:_0x25a89e,_0x50f294=_0x207d79+_0x3353fe>_0x50f294?_0x207d79+_0x3353fe:_0x50f294;}return{'minRow':_0x4bf7b9,'maxRow':_0x5f432f,'minColumn':_0x25a89e,'maxColumn':_0x50f294};}[_0x4d89('0xc')](){const _0x39c9cc=this[_0x4d89('0x5d')],_0x162b46=_0x39c9cc['plugins']['get'](_0x4d89('0x2b')),_0x3a2a0b=_0x39c9cc[_0x4d89('0xe')][_0x4d89('0x1c')](_0x4d89('0x23'));_0x39c9cc[_0x4d89('0x21')]['document']['on'](_0x4d89('0x73'),()=>{const _0x300056=Array[_0x4d89('0x7')](_0x39c9cc[_0x4d89('0x21')][_0x4d89('0x54')][_0x4d89('0x76')]['getChangedMarkers']());for(const {name:_0x773da,data:_0x5a752f}of _0x300056){const {group:_0x461b9e,id:_0x51b0d5,subType:_0x4b6c87}=_0x162b46[_0x4d89('0x66')](_0x773da);if('suggestion'!=_0x461b9e)continue;if(null!=_0x5a752f[_0x4d89('0x24')])continue;const _0x176694=_0x162b46[_0x4d89('0x75')](_0x51b0d5);this[_0x4d89('0x7b')][_0x4d89('0x4a')](_0x4b6c87)&&this[_0x4d89('0x4c')][_0x4d89('0x51')](_0x176694);}},{'priority':_0x4d89('0x84')});const _0x23c2e6=(_0x3944fd,_0xf5d4a)=>{let _0x1ed122=!0x1;const _0x37fb10=_0xf5d4a[_0x4d89('0x2f')](_0x3944fd),_0x31e7a5=_0x3944fd[_0x4d89('0x12')]('table'),_0xc858dd=_0x3a2a0b[_0x4d89('0x45')](_0x3944fd);for(const _0x41222c of this['_tableSuggestions']){const _0x5ad283=_0x41222c[_0x4d89('0x47')],_0x4b0989=_0x5ad283[_0x4d89('0x6b')]('tablePaste'),_0xfff6d4=_0x5ad283[_0x4d89('0x72')](_0x4b0989?0xa:0x5),_0x38c578=_0xfff6d4[_0x4d89('0x62')](),_0x5a52d2=_0x38c578[_0x4d89('0x72')](0x0,0x3)+_0x4d89('0x79'),_0x44f4c4='min'+_0xfff6d4,_0x4fcef9='max'+_0xfff6d4;if(!_0x41222c[_0x4d89('0x27')])continue;if(_0x31e7a5!=_0x41222c[_0x4d89('0x31')]()[_0x4d89('0x4b')]['findAncestor'](_0x4d89('0x33')))continue;if(_0x41222c[_0x4d89('0x2e')](_0x37fb10))continue;const _0x169f20=_0x3944fd[_0x4d89('0x3f')](_0x5a52d2)?_0x3944fd[_0x4d89('0xf')](_0x5a52d2)-0x1:0x0,_0x2ffd14=this[_0x4d89('0x15')](_0x41222c),_0x22122a=_0x2ffd14[_0x44f4c4],_0x2184a3=_0x2ffd14[_0x4fcef9];_0x22122a<=_0xc858dd[_0x38c578]&&_0xc858dd[_0x38c578]+_0x169f20<=_0x2184a3&&(_0x41222c[_0x4d89('0x81')](_0x37fb10),_0x1ed122=!0x0);}return _0x1ed122;};_0x39c9cc[_0x4d89('0x21')][_0x4d89('0x54')][_0x4d89('0x82')](_0x2cb4f5=>{let _0x3af34b=!0x1;for(const _0x36997f of _0x39c9cc[_0x4d89('0x21')]['document'][_0x4d89('0x76')][_0x4d89('0x61')]())if(_0x4d89('0x14')==_0x36997f['type']){if(_0x4d89('0x19')==_0x36997f[_0x4d89('0x22')])for(const _0x385155 of _0x36997f[_0x4d89('0x77')][_0x4d89('0x85')]['getChildren']())_0x3af34b=_0x3af34b||_0x23c2e6(_0x385155,_0x2cb4f5);else'tableCell'==_0x36997f['name']&&(_0x3af34b=_0x3af34b||_0x23c2e6(_0x36997f[_0x4d89('0x77')][_0x4d89('0x85')],_0x2cb4f5));}return _0x3af34b;});}[_0x4d89('0x15')](_0x4fbc2f){return this['_getCoordsForCells'](_0x4fbc2f[_0x4d89('0x6a')]()[_0x4d89('0x4e')](_0x35e3ab=>_0x35e3ab[_0x4d89('0x4b')][_0x4d89('0x85')]));}}function se(_0x28b4e1){return Array[_0x4d89('0x7')](new Set(_0x28b4e1)['values']());}
|
|
23
|
+
const _0x3ab4=['insertTable','tablePaste','getColumnIndexes','ELEMENT_TABLE_ROW_WITH_TEXT','getCellLocation','getContainedElement','insertTableRowBelow','ELEMENT_TABLE_WITH_TEXT','first','detach','getRanges','createRangeOn','highest','registerPostFixer','getRowIndexes','start','getSelectionAffectedTableCells','getChangedMarkers','minColumn','insertion','commands','subType','end','substr','batch','from','isInContent','ELEMENT_TABLE_ROW','markMultiRangeDeletion','_getCoordsForCells','model','startsWith','differ','change','setSelection','document','nodeAfter','getChildren','change:data','isArray','min','has','MAX_SAFE_INTEGER','some','mapper','ELEMENT_TABLE_COLUMN_WITH_TEXT','execute','isTouching','maxColumn','getAttribute','_descriptionFactory','toViewElement','discard','length','root','max','plugins','isIntersectingWithRange','*Insert:*\x20%0','map','markMultiRangeInsertion','nodeBefore','downcastDispatcher','showSuggestionHighlights','registerElementLabel','$graveyard','registerDescriptionCallback','registerCustomCallback','tableColumn','position','toLowerCase','rootName','createRangeIn','data','afterInit','findAncestor','tableRow','removeClass','cell','last','TableUtils','push','type','removeTableColumn','fromRange','createTableWalker','tableCell','getFirstRange','*Remove:*\x20%0','every','hasAttribute','add','enqueueChange','TrackChangesEditing','MIN_SAFE_INTEGER','maxRow','_tablePostFixingSubtypes','TableEditing','insert','$textProxy','_getSuggestionCoords','selection','getItems','_tableSuggestions','ELEMENT_TABLE_COLUMN','order','get','values','_setupColumnsRowsFixing','editor','selectTableRow','_suggestionFactory','table','_acceptFormatSuggestionCallbackFactory','isEqual','filter','span','refresh','locale','colspan','deletion','getChanges','join','enableCommand','addRange','name','removeTableRow','item'];(function(_0x37a29d,_0x3ab4b4){const _0x25b32e=function(_0x5d08d1){while(--_0x5d08d1){_0x37a29d['push'](_0x37a29d['shift']());}};_0x25b32e(++_0x3ab4b4);}(_0x3ab4,0x14d));const _0x25b3=function(_0x37a29d,_0x3ab4b4){_0x37a29d=_0x37a29d-0x0;let _0x25b32e=_0x3ab4[_0x37a29d];return _0x25b32e;};import{Plugin as _0x335058}from'ckeditor5/src/core.js';import{LiveRange as _0x49881a}from'ckeditor5/src/engine.js';import{setHighlightHandling as _0x216adc}from'ckeditor5/src/widget.js';import{getTranslation as _0x5dbb23}from'../utils/common-translations.js';export default class yt extends _0x335058{constructor(_0x4a2f75){super(_0x4a2f75),this[_0x25b3('0x13')]=[_0x25b3('0x7f'),_0x25b3('0x77')],this[_0x25b3('0x1a')]=new Set();}[_0x25b3('0x7d')](){const _0xa02a8d=this['editor'],_0xbf0716=_0xa02a8d[_0x25b3('0x51')][_0x25b3('0x56')][_0x25b3('0x18')];if(!_0xa02a8d[_0x25b3('0x6b')][_0x25b3('0x5c')](_0x25b3('0x14')))return;const _0x4e9677=_0xa02a8d[_0x25b3('0x29')],_0x4b7ba6=_0xa02a8d['plugins'][_0x25b3('0x1d')](_0x25b3('0x10')),_0x5d3300=_0xa02a8d[_0x25b3('0x6b')][_0x25b3('0x1d')](_0x25b3('0x3'));_0x4b7ba6[_0x25b3('0x65')][_0x25b3('0x73')](_0x25b3('0x23'),_0x27bd32=>_0x5dbb23(_0x4e9677,'ELEMENT_TABLE',_0x27bd32)),this[_0x25b3('0x1f')](),_0x4b7ba6[_0x25b3('0x2e')](_0x25b3('0x33')),_0x4b7ba6[_0x25b3('0x2e')](_0x25b3('0x21')),_0x4b7ba6[_0x25b3('0x2e')]('selectTableColumn');for(const _0x373f0e of['insertTableRowAbove',_0x25b3('0x39')]){const _0x57e147=_0xa02a8d['commands'][_0x25b3('0x1d')](_0x373f0e);_0x4b7ba6['enableCommand'](_0x373f0e,_0x424e97=>{_0xa02a8d[_0x25b3('0x51')][_0x25b3('0x54')](_0x28b8e8=>{_0x424e97();const _0x5238c9='above'===_0x57e147['order'],_0x77c1b5=_0x5d3300['getSelectionAffectedTableCells'](_0xbf0716),_0xfc7334=_0x5d3300['getRowIndexes'](_0x77c1b5),_0x116c33=_0x5238c9?_0xfc7334['first']-0x1:_0xfc7334[_0x25b3('0x2')]+0x1,_0x1f3e6d=_0x77c1b5[0x0][_0x25b3('0x7e')](_0x25b3('0x23')),_0x5cb2cc=_0x5d3300[_0x25b3('0x8')](_0x1f3e6d,{'startRow':_0x116c33,'endRow':_0x116c33}),_0x3116f4=Array[_0x25b3('0x4c')](_0x5cb2cc)[_0x25b3('0x6e')](_0x9e419f=>_0x28b8e8['createRangeOn'](_0x9e419f[_0x25b3('0x1')]));_0x4b7ba6['markMultiRangeInsertion'](_0x3116f4,'tableRow');});});}for(const _0x44a0c4 of['insertTableColumnLeft','insertTableColumnRight']){const _0x47b57e=_0xa02a8d[_0x25b3('0x47')][_0x25b3('0x1d')](_0x44a0c4);_0x4b7ba6[_0x25b3('0x2e')](_0x44a0c4,_0x26eaef=>{_0xa02a8d['model'][_0x25b3('0x54')](_0x8e8d89=>{_0x26eaef();const _0x926e50='left'===_0x47b57e[_0x25b3('0x1c')],_0xc7cd66=_0x5d3300['getSelectionAffectedTableCells'](_0xbf0716),_0x32173e=_0x5d3300[_0x25b3('0x35')](_0xc7cd66),_0x47605f=_0x926e50?_0x32173e[_0x25b3('0x3b')]-0x1:_0x32173e[_0x25b3('0x2')]+0x1,_0x6fffe2=_0xc7cd66[0x0]['findAncestor'](_0x25b3('0x23')),_0x4f9df0=_0x5d3300[_0x25b3('0x8')](_0x6fffe2,{'startRow':0x0,'column':_0x47605f,'includeAllSlots':!0x1}),_0x40abd1=Array[_0x25b3('0x4c')](_0x4f9df0)['map'](_0x17ab4c=>_0x8e8d89[_0x25b3('0x3e')](_0x17ab4c[_0x25b3('0x1')]));_0x4b7ba6[_0x25b3('0x6f')](_0x40abd1,_0x25b3('0x77'));});});}for(const _0x52c6e4 of[_0x25b3('0x31'),_0x25b3('0x6')]){const _0x5b0288=_0x52c6e4[_0x25b3('0x4a')](0xb),_0x3bac38=_0x5b0288[_0x25b3('0x79')](),_0x53050f=_0x3bac38[_0x25b3('0x4a')](0x0,0x3)+_0x25b3('0x27'),_0x43bfdf=_0x25b3('0x23')+_0x5b0288,_0x220fd8=_0x25b3('0x5b')+_0x5b0288,_0x57771b=_0x25b3('0x6a')+_0x5b0288;_0x4b7ba6['enableCommand'](_0x52c6e4,()=>{_0xa02a8d['model'][_0x25b3('0x54')](_0x13619d=>{const _0xaae7bf=_0x5d3300[_0x25b3('0x43')](_0xbf0716),_0x2d0440=_0xaae7bf[0x0][_0x25b3('0x7e')](_0x25b3('0x23'));let _0x306404;if('removeTableRow'==_0x52c6e4){const _0x5c58c9=_0x5d3300[_0x25b3('0x41')](_0xaae7bf);_0x306404={'startRow':_0x5c58c9[_0x25b3('0x3b')],'endRow':_0x5c58c9[_0x25b3('0x2')],'includeAllSlots':!0x0};}else{const _0x5a9965=_0x5d3300[_0x25b3('0x35')](_0xaae7bf);_0x306404={'startColumn':_0x5a9965[_0x25b3('0x3b')],'endColumn':_0x5a9965[_0x25b3('0x2')],'includeAllSlots':!0x0};}const _0x3db5f2=_0x5d3300[_0x25b3('0x8')](_0x2d0440,_0x306404),_0x145c03=Array[_0x25b3('0x4c')](_0x3db5f2)['map'](({cell:_0x2cf4bb})=>_0x2cf4bb),_0x5e29cc=ue(_0x145c03[_0x25b3('0x26')](_0x55258d=>_0x55258d[_0x25b3('0xd')](_0x53050f))),_0xa2b1d4=ue(_0x145c03[_0x25b3('0x26')](_0x287f82=>!_0x287f82[_0x25b3('0xd')](_0x53050f)))[_0x25b3('0x6e')](_0x12d4f5=>_0x13619d[_0x25b3('0x3e')](_0x12d4f5)),_0x4cab01=_0x4b7ba6[_0x25b3('0x4f')](_0xa2b1d4,_0x43bfdf);if(_0x4cab01&&('tableRow'==_0x4cab01[_0x25b3('0x48')]||'tableColumn'==_0x4cab01[_0x25b3('0x48')])){const _0x48689d=this[_0x25b3('0x17')](_0x4cab01);for(const _0x5b63f1 of _0x5e29cc){const _0x1cd500=_0x13619d[_0x25b3('0x3e')](_0x5b63f1),_0x2bd11a=_0x5d3300[_0x25b3('0x37')](_0x5b63f1),_0x35f1a8=_0x5b63f1[_0x25b3('0x64')](_0x53050f)-0x1,_0x40a74b=_0x48689d[_0x220fd8],_0x5cc137=_0x48689d[_0x57771b];_0x40a74b<=_0x2bd11a[_0x3bac38]&&_0x2bd11a[_0x3bac38]+_0x35f1a8<=_0x5cc137&&_0x4cab01['addRange'](_0x1cd500);}}});});}function _0x393140(_0x19f673){const _0x6c9f72=Array[_0x25b3('0x4c')](_0xbf0716['getRanges']())['map'](_0xb91c54=>_0x49881a[_0x25b3('0x7')](_0xb91c54));_0xa02a8d['model']['change'](_0xfec373=>{const _0x30be37=_0xfec373[_0x25b3('0x4b')];_0x19f673=_0x19f673[_0x25b3('0x26')](_0x4d2f2b=>_0x25b3('0x74')!=_0x4d2f2b[_0x25b3('0x69')][_0x25b3('0x7a')]),_0xfec373['setSelection'](_0x19f673),_0xa02a8d[_0x25b3('0x47')][_0x25b3('0x1d')](_0x25b3('0x31'))[_0x25b3('0x28')](),_0xa02a8d[_0x25b3('0x61')](_0x25b3('0x31'),{'forceDefaultExecution':!0x0}),_0xa02a8d[_0x25b3('0x51')][_0x25b3('0xf')](()=>{_0xa02a8d['model']['enqueueChange'](_0x30be37,_0x216c7b=>{const _0xa5f5aa=_0x6c9f72[_0x25b3('0x26')](_0x4c370c=>_0x25b3('0x74')!=_0x4c370c[_0x25b3('0x69')][_0x25b3('0x7a')]);_0xa5f5aa['length']>0x0&&_0x216c7b[_0x25b3('0x55')](_0xa5f5aa);for(const _0xb79348 of _0x6c9f72)_0xb79348['detach']();});});});}function _0x41e3b9(_0x18fedb){_0xa02a8d[_0x25b3('0x51')][_0x25b3('0x54')](_0x5bf7b1=>{const _0x57c61d=Array[_0x25b3('0x4c')](_0xbf0716[_0x25b3('0x3d')]())[_0x25b3('0x6e')](_0x4743f9=>_0x49881a[_0x25b3('0x7')](_0x4743f9)),_0x4bc67d=[];for(const _0x2607a9 of _0x18fedb)for(const _0x2ceab2 of _0x2607a9[_0x25b3('0x19')]({'shallow':!0x0}))_0x4bc67d['push'](_0x2ceab2);for(const _0x4072ca of _0x4bc67d)_0x25b3('0x74')!=_0x4072ca[_0x25b3('0x69')][_0x25b3('0x7a')]&&(_0x5bf7b1['setSelection'](_0x5bf7b1['createPositionAt'](_0x4072ca,0x0)),_0xa02a8d[_0x25b3('0x47')][_0x25b3('0x1d')]('removeTableColumn')['refresh'](),_0xa02a8d[_0x25b3('0x61')](_0x25b3('0x6'),{'forceDefaultExecution':!0x0}));const _0x3a18f6=_0x57c61d['filter'](_0x490c7e=>_0x25b3('0x74')!=_0x490c7e[_0x25b3('0x69')]['rootName']);_0x3a18f6[_0x25b3('0x68')]>0x0&&_0x5bf7b1[_0x25b3('0x55')](_0x3a18f6);for(const _0x4082f5 of _0x57c61d)_0x4082f5[_0x25b3('0x3c')]();});}function _0x35269a(_0x3d3346,_0x245777){return _0x245777[_0x25b3('0xc')](_0x26b574=>_0x3d3346[_0x25b3('0x5e')](_0x5ed421=>_0x5ed421[_0x25b3('0x49')][_0x25b3('0x25')](_0x26b574[_0x25b3('0x42')])||_0x26b574[_0x25b3('0x49')]['isEqual'](_0x5ed421[_0x25b3('0x42')])));}function _0x4ba559(_0x8a76b0,_0x1cefc3){return _0x8a76b0[_0x25b3('0x5e')](_0x58dea4=>_0x1cefc3[_0x25b3('0x5e')](_0x5c11ae=>_0x58dea4[_0x25b3('0x49')][_0x25b3('0x62')](_0x5c11ae['start'])));}_0xa02a8d[_0x25b3('0x7c')][_0x25b3('0x71')]['on']('addMarker:suggestion',(_0x3e1de7,_0x308182,_0x253614)=>{if(!_0x253614['options'][_0x25b3('0x72')])return;const _0x4069eb=_0x308182[_0x25b3('0x32')];if(!_0x4069eb)return;const _0x459afc=_0x253614[_0x25b3('0x5f')][_0x25b3('0x66')](_0x4069eb);function _0x3d27dd(_0x51c73e){return Array[_0x25b3('0x5a')](_0x51c73e)?_0x51c73e:[_0x51c73e];}_0x459afc&&_0x25b3('0x9')===_0x4069eb[_0x25b3('0x30')]&&_0x216adc(_0x459afc,_0x253614['writer'],(_0x162351,_0x253ef0,_0x1bf4f5)=>_0x1bf4f5['addClass'](_0x3d27dd(_0x253ef0['classes']),_0x162351),(_0x20147f,_0x2bd2de,_0x87a14c)=>_0x87a14c[_0x25b3('0x0')](_0x3d27dd(_0x2bd2de['classes']),_0x20147f));},{'priority':_0x25b3('0x3f')}),_0x4b7ba6['_descriptionFactory'][_0x25b3('0x75')](_0x2883f7=>{if('insertion'!=_0x2883f7[_0x25b3('0x5')]&&_0x25b3('0x2b')!=_0x2883f7[_0x25b3('0x5')])return;const _0x2f12e5=_0x2883f7[_0x25b3('0x38')]();if(null!=_0x2f12e5&&_0x2f12e5['is']('element',_0x25b3('0x23'))){if(_0x25b3('0x46')==_0x2883f7[_0x25b3('0x5')]){const _0x405826=_0x2883f7[_0x25b3('0x19')]()[_0x25b3('0x26')](_0x108732=>_0x108732['is'](_0x25b3('0x16')))[_0x25b3('0x6e')](_0xd62d69=>_0xd62d69[_0x25b3('0x7c')]);if(_0x405826[_0x25b3('0x68')])return{'type':_0x25b3('0x46'),'content':_0x5dbb23(_0x4e9677,'*Insert:*\x20%0',_0x5dbb23(_0x4e9677,_0x25b3('0x3a'),'\x22'+_0x405826['join']('\x20')+'\x22'))};}if(_0x25b3('0x2b')==_0x2883f7[_0x25b3('0x5')]){const _0x59f923=_0x2883f7[_0x25b3('0x19')]()['filter'](_0x1dc71c=>_0x1dc71c['is'](_0x25b3('0x16')))['map'](_0x38f7ee=>_0x38f7ee['data']);if(_0x59f923[_0x25b3('0x68')])return{'type':_0x25b3('0x2b'),'content':_0x5dbb23(_0x4e9677,'*Remove:*\x20%0',_0x5dbb23(_0x4e9677,_0x25b3('0x3a'),'\x22'+_0x59f923[_0x25b3('0x2d')]('\x20')+'\x22'))};}}}),_0x4b7ba6[_0x25b3('0x65')][_0x25b3('0x75')](_0x91b46e=>{if(_0x25b3('0x7f')==_0x91b46e[_0x25b3('0x48')]){const _0x292021=_0x91b46e[_0x25b3('0x19')]()[_0x25b3('0x26')](_0x501822=>_0x501822['is'](_0x25b3('0x16')))['map'](_0x42083a=>_0x42083a[_0x25b3('0x7c')]),_0x1a7e97=this[_0x25b3('0x17')](_0x91b46e),_0xbea5c=_0x1a7e97[_0x25b3('0x12')]-_0x1a7e97['minRow']+0x1;if(_0x25b3('0x46')==_0x91b46e[_0x25b3('0x5')])return _0x292021[_0x25b3('0x68')]?{'type':_0x25b3('0x46'),'content':_0x5dbb23(_0x4e9677,_0x25b3('0x6d'),_0x5dbb23(_0x4e9677,_0x25b3('0x36'),[_0xbea5c,'\x22'+_0x292021['join']('\x20')+'\x22']))}:{'type':_0x25b3('0x46'),'content':_0x5dbb23(_0x4e9677,_0x25b3('0x6d'),_0x5dbb23(_0x4e9677,_0x25b3('0x4e'),_0xbea5c))};if(_0x25b3('0x2b')==_0x91b46e[_0x25b3('0x5')])return _0x292021[_0x25b3('0x68')]?{'type':'deletion','content':_0x5dbb23(_0x4e9677,_0x25b3('0xb'),_0x5dbb23(_0x4e9677,_0x25b3('0x36'),[_0xbea5c,'\x22'+_0x292021[_0x25b3('0x2d')]('\x20')+'\x22']))}:{'type':_0x25b3('0x2b'),'content':_0x5dbb23(_0x4e9677,_0x25b3('0xb'),_0x5dbb23(_0x4e9677,'ELEMENT_TABLE_ROW',_0xbea5c))};}if(_0x25b3('0x77')==_0x91b46e[_0x25b3('0x48')]){const _0x262df5=_0x91b46e[_0x25b3('0x19')]()[_0x25b3('0x26')](_0x45ddc0=>_0x45ddc0['is'](_0x25b3('0x16')))[_0x25b3('0x6e')](_0xc1ef59=>_0xc1ef59[_0x25b3('0x7c')]),_0x598d3c=this[_0x25b3('0x17')](_0x91b46e),_0x264c31=_0x598d3c[_0x25b3('0x63')]-_0x598d3c[_0x25b3('0x45')]+0x1;if(_0x25b3('0x46')==_0x91b46e[_0x25b3('0x5')])return _0x262df5['length']?{'type':_0x25b3('0x46'),'content':_0x5dbb23(_0x4e9677,_0x25b3('0x6d'),_0x5dbb23(_0x4e9677,_0x25b3('0x60'),[_0x264c31,'\x22'+_0x262df5[_0x25b3('0x2d')]('\x20')+'\x22']))}:{'type':_0x25b3('0x46'),'content':_0x5dbb23(_0x4e9677,'*Insert:*\x20%0',_0x5dbb23(_0x4e9677,'ELEMENT_TABLE_COLUMN',_0x264c31))};if('deletion'==_0x91b46e[_0x25b3('0x5')])return _0x262df5[_0x25b3('0x68')]?{'type':_0x25b3('0x2b'),'content':_0x5dbb23(_0x4e9677,_0x25b3('0xb'),_0x5dbb23(_0x4e9677,_0x25b3('0x60'),[_0x264c31,'\x22'+_0x262df5[_0x25b3('0x2d')]('\x20')+'\x22']))}:{'type':'deletion','content':_0x5dbb23(_0x4e9677,'*Remove:*\x20%0',_0x5dbb23(_0x4e9677,_0x25b3('0x1b'),_0x264c31))};}}),_0x4b7ba6['_suggestionFactory'][_0x25b3('0x76')](_0x25b3('0x46'),_0x25b3('0x7f'),_0x25b3('0x67'),_0x393140),_0x4b7ba6[_0x25b3('0x22')]['registerCustomCallback'](_0x25b3('0x2b'),_0x25b3('0x7f'),'accept',_0x393140),_0x4b7ba6[_0x25b3('0x22')][_0x25b3('0x76')](_0x25b3('0x46'),_0x25b3('0x77'),_0x25b3('0x67'),_0x41e3b9),_0x4b7ba6[_0x25b3('0x22')][_0x25b3('0x76')](_0x25b3('0x2b'),_0x25b3('0x77'),'accept',_0x41e3b9),_0x4b7ba6[_0x25b3('0x22')][_0x25b3('0x76')](_0x25b3('0x46'),_0x25b3('0x77'),_0x25b3('0x2d'),_0x35269a),_0x4b7ba6[_0x25b3('0x22')][_0x25b3('0x76')](_0x25b3('0x2b'),_0x25b3('0x77'),'join',_0x35269a),_0x4b7ba6['_suggestionFactory']['registerCustomCallback']('insertion',_0x25b3('0x7f'),_0x25b3('0x2d'),_0x4ba559),_0x4b7ba6[_0x25b3('0x22')][_0x25b3('0x76')](_0x25b3('0x2b'),'tableRow','join',_0x4ba559);}[_0x25b3('0x24')](){const _0x547b6a=this[_0x25b3('0x20')],_0x1f03c5=_0x547b6a[_0x25b3('0x51')]['document'][_0x25b3('0x18')];return(_0x1276ac,_0x3bcf7b)=>{_0x547b6a['model'][_0x25b3('0x54')](_0x48924b=>{const {commandName:_0x41dd95,commandParams:_0x47695b}=_0x3bcf7b;let _0x12c1bc=_0x1276ac[0x0][_0x25b3('0x49')][_0x25b3('0x70')];_0x47695b&&_0x47695b[0x0]&&!0x1===_0x47695b[0x0]['forceValue']&&(_0x12c1bc=_0x1276ac[0x0][_0x25b3('0x42')][_0x25b3('0x57')]);const _0x11cc18=_0x48924b[_0x25b3('0x7b')](_0x12c1bc);if(_0x25b3('0x74')==_0x11cc18['root'][_0x25b3('0x7a')])return;const _0x47e715=Array[_0x25b3('0x4c')](_0x1f03c5[_0x25b3('0x3d')]())[_0x25b3('0x6e')](_0x3d738e=>_0x49881a[_0x25b3('0x7')](_0x3d738e));_0x48924b[_0x25b3('0x55')](_0x11cc18),_0x547b6a['commands'][_0x25b3('0x1d')](_0x41dd95)['refresh'](),_0x47695b[_0x25b3('0x4')]({'forceDefaultExecution':!0x0}),_0x547b6a[_0x25b3('0x61')](_0x41dd95,..._0x47695b);const _0x3fea6b=_0x47e715[_0x25b3('0x26')](_0x29bce9=>_0x25b3('0x74')!=_0x29bce9['root']['rootName']);_0x3fea6b['length']>0x0&&_0x48924b[_0x25b3('0x55')](_0x3fea6b);for(const _0x226887 of _0x47e715)_0x226887[_0x25b3('0x3c')]();});};}[_0x25b3('0x50')](_0x42b79e){const _0x28582b=this[_0x25b3('0x20')][_0x25b3('0x6b')]['get']('TableUtils');let _0x5d8a85=Number[_0x25b3('0x5d')],_0x32aa5a=Number[_0x25b3('0x11')],_0x4a770e=Number[_0x25b3('0x5d')],_0x39c0f5=Number[_0x25b3('0x11')];for(const _0x433051 of _0x42b79e){if(_0x25b3('0x74')==_0x433051[_0x25b3('0x69')][_0x25b3('0x7a')])continue;const {row:_0xfbb80d,column:_0x50a581}=_0x28582b[_0x25b3('0x37')](_0x433051),_0x1a6e65=_0x433051[_0x25b3('0xd')]('rowspan')?_0x433051[_0x25b3('0x64')]('rowspan')-0x1:0x0,_0x5ab63b=_0x433051[_0x25b3('0xd')](_0x25b3('0x2a'))?_0x433051['getAttribute']('colspan')-0x1:0x0;_0x5d8a85=_0xfbb80d<_0x5d8a85?_0xfbb80d:_0x5d8a85,_0x32aa5a=_0xfbb80d+_0x1a6e65>_0x32aa5a?_0xfbb80d+_0x1a6e65:_0x32aa5a,_0x4a770e=_0x50a581<_0x4a770e?_0x50a581:_0x4a770e,_0x39c0f5=_0x50a581+_0x5ab63b>_0x39c0f5?_0x50a581+_0x5ab63b:_0x39c0f5;}return{'minRow':_0x5d8a85,'maxRow':_0x32aa5a,'minColumn':_0x4a770e,'maxColumn':_0x39c0f5};}['_setupColumnsRowsFixing'](){const _0x3e5af4=this[_0x25b3('0x20')],_0x26387f=_0x3e5af4['plugins'][_0x25b3('0x1d')](_0x25b3('0x10')),_0x43592f=_0x3e5af4[_0x25b3('0x6b')]['get']('TableUtils');_0x3e5af4[_0x25b3('0x51')][_0x25b3('0x56')]['on'](_0x25b3('0x59'),()=>{const _0x362d42=Array[_0x25b3('0x4c')](_0x3e5af4['model'][_0x25b3('0x56')][_0x25b3('0x53')][_0x25b3('0x44')]());for(const {name:_0x41999a,data:_0x1ca091}of _0x362d42){const {group:_0x3495bf,id:_0x14bdc1,subType:_0x2f2882}=_0x26387f['_splitMarkerName'](_0x41999a);if('suggestion'!=_0x3495bf)continue;if(null!=_0x1ca091['oldRange'])continue;const _0x37909e=_0x26387f['getSuggestion'](_0x14bdc1);this['_tablePostFixingSubtypes']['includes'](_0x2f2882)&&this['_tableSuggestions'][_0x25b3('0xe')](_0x37909e);}},{'priority':'low'});const _0x146449=(_0x1b69a6,_0x28f17f)=>{let _0x27cf3c=!0x1;const _0x50059f=_0x28f17f[_0x25b3('0x3e')](_0x1b69a6),_0x635dc1=_0x1b69a6['findAncestor']('table'),_0x18c3f1=_0x43592f[_0x25b3('0x37')](_0x1b69a6);for(const _0x44f098 of this[_0x25b3('0x1a')]){const _0x232636=_0x44f098[_0x25b3('0x48')],_0x2e0ef0=_0x232636[_0x25b3('0x52')](_0x25b3('0x34')),_0x1c1e13=_0x232636[_0x25b3('0x4a')](_0x2e0ef0?0xa:0x5),_0x10e6b3=_0x1c1e13[_0x25b3('0x79')](),_0x444bc0=_0x10e6b3[_0x25b3('0x4a')](0x0,0x3)+_0x25b3('0x27'),_0x2a323a=_0x25b3('0x5b')+_0x1c1e13,_0x77510c=_0x25b3('0x6a')+_0x1c1e13;if(!_0x44f098[_0x25b3('0x4d')])continue;if(_0x635dc1!=_0x44f098[_0x25b3('0xa')]()[_0x25b3('0x42')][_0x25b3('0x7e')](_0x25b3('0x23')))continue;if(_0x44f098[_0x25b3('0x6c')](_0x50059f))continue;const _0x2af51d=_0x1b69a6[_0x25b3('0xd')](_0x444bc0)?_0x1b69a6[_0x25b3('0x64')](_0x444bc0)-0x1:0x0,_0xcebb3d=this[_0x25b3('0x17')](_0x44f098),_0x4c22c0=_0xcebb3d[_0x2a323a],_0x19e17b=_0xcebb3d[_0x77510c];_0x4c22c0<=_0x18c3f1[_0x10e6b3]&&_0x18c3f1[_0x10e6b3]+_0x2af51d<=_0x19e17b&&(_0x44f098[_0x25b3('0x2f')](_0x50059f),_0x27cf3c=!0x0);}return _0x27cf3c;};_0x3e5af4[_0x25b3('0x51')][_0x25b3('0x56')][_0x25b3('0x40')](_0x17ecc2=>{let _0x1c1a9c=!0x1;for(const _0x592218 of _0x3e5af4[_0x25b3('0x51')][_0x25b3('0x56')][_0x25b3('0x53')][_0x25b3('0x2c')]())if(_0x25b3('0x15')==_0x592218[_0x25b3('0x5')]){if(_0x25b3('0x7f')==_0x592218[_0x25b3('0x30')])for(const _0x43be68 of _0x592218['position'][_0x25b3('0x57')][_0x25b3('0x58')]())_0x1c1a9c=_0x1c1a9c||_0x146449(_0x43be68,_0x17ecc2);else _0x25b3('0x9')==_0x592218[_0x25b3('0x30')]&&(_0x1c1a9c=_0x1c1a9c||_0x146449(_0x592218[_0x25b3('0x78')][_0x25b3('0x57')],_0x17ecc2));}return _0x1c1a9c;});}[_0x25b3('0x17')](_0x3e75f1){return this['_getCoordsForCells'](_0x3e75f1[_0x25b3('0x3d')]()[_0x25b3('0x6e')](_0x5bafe5=>_0x5bafe5['start'][_0x25b3('0x57')]));}}function ue(_0x5ae967){return Array[_0x25b3('0x4c')](new Set(_0x5ae967)[_0x25b3('0x1e')]());}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module track-changes/integrations/tablecaption
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import TrackChangesTable from './table';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import TrackChangesTable from './table.js';
|
|
10
10
|
/**
|
|
11
11
|
* Provides track changes plugin integration for {@link module:table/table~Table table feature} caption.
|
|
12
12
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, 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 _0x1630=['plugins','afterInit','TableCaptionEditing','editor','has','enableCommand','TrackChangesEditing','get'];(function(_0x210afb,_0x1630ff){const _0x1eefd4=function(_0x3b7cf0){while(--_0x3b7cf0){_0x210afb['push'](_0x210afb['shift']());}};_0x1eefd4(++_0x1630ff);}(_0x1630,0xee));const _0x1eef=function(_0x210afb,_0x1630ff){_0x210afb=_0x210afb-0x0;let _0x1eefd4=_0x1630[_0x210afb];return _0x1eefd4;};import{Plugin as _0x45c2e0}from'ckeditor5/src/core.js';import _0x22e593 from'./table.js';export default class Nt extends _0x45c2e0{static get['requires'](){return[_0x22e593];}[_0x1eef('0x3')](){const _0x4d7c7c=this[_0x1eef('0x5')];if(!_0x4d7c7c[_0x1eef('0x2')][_0x1eef('0x6')](_0x1eef('0x4')))return;_0x4d7c7c['plugins'][_0x1eef('0x1')](_0x1eef('0x0'))[_0x1eef('0x7')]('toggleTableCaption');}}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
6
|
-
import TrackChangesTable from './table';
|
|
5
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
6
|
+
import TrackChangesTable from './table.js';
|
|
7
7
|
/**
|
|
8
8
|
* Provides track changes plugin integration for {@link module:table/tableclipboard~TableClipboard table clipboard feature}.
|
|
9
9
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, 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 _0x18f9=['findAncestor','markMultiRangeBlockFormat','wrap','_splitMarkerName','element','attributes','containsRange','tableCell','first','removeRows','registerCustomCallback','documentSelection','isEqual','insertRows','selection','set','_descriptionFactory','setAttribute','schema','fromEntries','endRow','insertionRanges','getMarkers','startsWith','insertContent','from','getChanges','getItems','TableUtils','insert','endColumn','tableCellBorderColor','high','getRanges','getAllAdjacentSuggestions','previousSibling','newRange','getRange','row','locale','_replaceTableSlotCell','value','suggestion-td','isInContent','conversion','stop','deletionRanges','markerName','formatBlock','paragraph','createRangeIn','tablePaste','accept','get','createTableWalker','fill','Users','getChildren','getChangedMarkers','updateMarker','dataDowncast','hasSuggestion','remove','getSuggestion','view','change','ck-suggestion-marker-insertion','rootName','getContainedElement','createElement','nodeAfter','find','start','length','suggestion:formatBlock:tablePasteCell','getShiftedBy','document','author','afterInit','activeMarkers','_suggestionFactory','low','getSuggestionCallback','*Replace\x20table\x20cells*','editor','tableCellBackgroundColor','cells','join','tableCellBorderWidth','cell','markerToHighlight','oldRange','reduce','discard','filter','columns','commands','tableCellVerticalAlignment','isEmpty','markMultiRangeInsertion','model','showSuggestionHighlights','TableClipboard','end','map','has','suggestionUnloaded','add','getChild','ck-suggestion-marker--active','tablePasteCell','registerPostFixer','tablePasteRow','last','column','subType','differ','getSelectionAffectedTableCells','some','getAttributes','suggestionLoaded','getRows','columnInsertionIndexes','_tablePostFixingSubtypes','nextSibling','editingDowncast','insertion','removeColumns','deletion','includes','rowInsertionRanges','tableCellPadding','type','_createdBatches','next','options','getRowIndexes','name','batch','content','setAttributes','tablePasteChainId','_getCoordsForCells','markerAttributes','return','table','getColumns','tableCellSuggestion','clipboardOutput','rowInsertionIndexes','createRangeOn','suggestion','markMultiRangeDeletion','registerDescriptionCallback','tableCellHorizontalAlignment','position','plugins','tablePasteColumn','redo','elementToElement','columnInsertionRanges','unwrap','previous','editing','markers','getSuggestions','push','removeMarker','forceDefaultExecution','listenTo','insertColumns'];(function(_0x5766b5,_0x18f9ef){const _0x1f0fc0=function(_0x4da1bd){while(--_0x4da1bd){_0x5766b5['push'](_0x5766b5['shift']());}};_0x1f0fc0(++_0x18f9ef);}(_0x18f9,0x1d3));const _0x1f0f=function(_0x5766b5,_0x18f9ef){_0x5766b5=_0x5766b5-0x0;let _0x1f0fc0=_0x18f9[_0x5766b5];return _0x1f0fc0;};import{getTranslation as _0x281b03}from'../utils/common-translations';import{Plugin as _0x317f0a}from'ckeditor5/src/core';import{uid as _0x48d6e4,priorities as _0x239c35}from'ckeditor5/src/utils';import _0x21b405 from'./table';const le=[_0x1f0f('0x86'),_0x1f0f('0x4d'),'tableCellBorderStyle',_0x1f0f('0x1d'),_0x1f0f('0x8f'),_0x1f0f('0x83'),_0x1f0f('0x6')],ae=Object[_0x1f0f('0x41')](le[_0x1f0f('0x96')](_0x53a495=>[_0x53a495,null]));export default class At extends _0x317f0a{static get['requires'](){return[_0x21b405];}[_0x1f0f('0x7c')](){const _0x3b1a44=this[_0x1f0f('0x82')];if(!_0x3b1a44[_0x1f0f('0x1f')][_0x1f0f('0x97')]('TableClipboard'))return;const _0x571782=_0x3b1a44[_0x1f0f('0x1f')][_0x1f0f('0x63')]('TrackChangesEditing'),_0x9fb2f9=_0x3b1a44[_0x1f0f('0x1f')][_0x1f0f('0x63')](_0x1f0f('0x4a')),_0x339cfa=_0x3b1a44[_0x1f0f('0x1f')]['get'](_0x21b405),_0x3130e8=_0x3b1a44[_0x1f0f('0x1f')][_0x1f0f('0x63')](_0x1f0f('0x94'));_0x339cfa[_0x1f0f('0xa9')][_0x1f0f('0x29')](_0x1f0f('0x9e'),_0x1f0f('0x20')),_0x3b1a44[_0x1f0f('0x92')][_0x1f0f('0x40')]['register'](_0x1f0f('0x16'),{'allowIn':_0x1f0f('0x35'),'allowContentOf':_0x1f0f('0x35'),'isLimit':!0x0}),_0x3b1a44[_0x1f0f('0x5a')][_0x1f0f('0x22')]({'model':_0x1f0f('0x16'),'view':_0x1f0f('0x58')});let _0x174a51=null;_0x3b1a44[_0x1f0f('0x92')]['on'](_0x1f0f('0x46'),(_0x3e32cb,_0x41c154)=>{const [_0x15e61d,_0xaa62fa]=_0x41c154,_0x2f3588=_0x41c154[_0x41c154['length']-0x1];_0x2f3588&&_0x2f3588[_0x1f0f('0x2b')]||_0x571782['_isForcedDefaultExecutionBlock']||this[_0x1f0f('0x82')][_0x1f0f('0x8e')][_0x1f0f('0x63')]('trackChanges')[_0x1f0f('0x57')]&&function(_0x2e51af,_0x1ae64d,_0x44e678,_0x45edf0,_0x466d72){if(_0x1ae64d&&!_0x1ae64d['is'](_0x1f0f('0x39')))return!0x1;const _0x43c014=_0x466d72['getTableIfOnlyTableInContent'](_0x2e51af,_0x44e678);if(!_0x43c014||!fe(_0x43c014,void 0x0,_0x45edf0))return!0x1;const _0x5880bc=_0x45edf0[_0x1f0f('0xa3')](_0x44e678[_0x1f0f('0x7a')][_0x1f0f('0x3c')]);if(!_0x5880bc['length'])return!0x1;const _0x136395=_0x5880bc[0x0][_0x1f0f('0x2e')](_0x1f0f('0x14')),_0x1cf5fb=_0x45edf0[_0x1f0f('0xb')](_0x5880bc),_0x4e1e4d=_0x45edf0['getColumnIndexes'](_0x5880bc),_0x135bf8={'startRow':_0x1cf5fb[_0x1f0f('0x36')],'endRow':_0x1cf5fb[_0x1f0f('0x9f')],'startColumn':_0x4e1e4d['first'],'endColumn':_0x4e1e4d[_0x1f0f('0x9f')]};return 0x1==_0x5880bc['length']&&(_0x135bf8[_0x1f0f('0x42')]+=_0x45edf0[_0x1f0f('0xa7')](_0x43c014)-0x1,_0x135bf8[_0x1f0f('0x4c')]+=_0x45edf0[_0x1f0f('0x15')](_0x43c014)-0x1),fe(_0x136395,_0x135bf8,_0x45edf0);}(_0x15e61d,_0xaa62fa,_0x3b1a44[_0x1f0f('0x92')],_0x9fb2f9,_0x3130e8)&&(_0x3e32cb[_0x1f0f('0x5b')](),_0x174a51={'cells':[],'insertionRanges':[],'deletionRanges':[],'rowInsertionRanges':[],'rowInsertionIndexes':[],'columnInsertionRanges':[],'columnInsertionIndexes':[]},_0x3b1a44[_0x1f0f('0x92')][_0x1f0f('0x6f')](()=>{_0x3b1a44['model'][_0x1f0f('0x46')](_0x41c154[0x0],_0x41c154[0x1],_0x41c154[0x2],{'forceDefaultExecution':!0x0});const _0x35d194=_0x48d6e4(),{rowInsertionRanges:_0x1583d8,columnInsertionRanges:_0x521d34,insertionRanges:_0x1a1a85,deletionRanges:_0x38ffbc,cells:_0x32b3d6}=_0x174a51;_0x1583d8[_0x1f0f('0x77')]&&_0x571782[_0x1f0f('0x91')](_0x1583d8,_0x1f0f('0x9e'),{'tablePasteChainId':_0x35d194}),_0x521d34[_0x1f0f('0x77')]&&_0x571782[_0x1f0f('0x91')](_0x521d34,_0x1f0f('0x20'),{'tablePasteChainId':_0x35d194}),_0x1a1a85[_0x1f0f('0x77')]&&_0x571782['markMultiRangeInsertion'](_0x1a1a85,_0x1f0f('0x61'),{'tablePasteChainId':_0x35d194,'skipNestingCheck':!0x0}),_0x38ffbc[_0x1f0f('0x77')]&&_0x571782[_0x1f0f('0x1b')](_0x38ffbc,_0x1f0f('0x61'),{'tablePasteChainId':_0x35d194,'skipNestingCheck':!0x0});const _0xadc5ca=_0x571782[_0x1f0f('0x2f')](_0x32b3d6[_0x1f0f('0x96')](({element:_0x41f0d2})=>_0x41f0d2),{'formatGroupId':_0x48d6e4()},[],_0x1f0f('0x9c'),{'tablePasteChainId':_0x35d194});if(_0xadc5ca){const _0x476aa8=_0xadc5ca[_0x1f0f('0x44')](),_0x541309=[];for(const {element:_0x824eea,attributes:_0x5e00c5}of _0x32b3d6){if(!_0x5e00c5)continue;const _0x1aeb79=_0x3b1a44[_0x1f0f('0x92')][_0x1f0f('0x19')](_0x824eea),_0x2209ac=_0x476aa8[_0x1f0f('0x75')](_0x23d482=>_0x23d482[_0x1f0f('0x53')]()[_0x1f0f('0x3a')](_0x1aeb79));_0x2209ac&&_0x541309[_0x1f0f('0x29')]([_0x2209ac[_0x1f0f('0xc')],_0x5e00c5]);}_0x541309[_0x1f0f('0x77')]&&_0xadc5ca[_0x1f0f('0x3f')]('markerAttributes',Object['fromEntries'](_0x541309));}_0x174a51=null;}));},{'priority':_0x239c35['high']+0xa}),_0x3b1a44[_0x1f0f('0x1f')][_0x1f0f('0x63')](_0x1f0f('0x94'))['on'](_0x1f0f('0x56'),(_0x2ed957,_0x5688b2)=>{const [_0x10f8d9,_0x39694a,,_0x17d2e7]=_0x5688b2;if(!_0x174a51)return;_0x2ed957[_0x1f0f('0x5b')]();const _0x5d56b6=_0x10f8d9[_0x1f0f('0x87')],_0x1feb35=_0x39694a,_0x3e5384=ce(_0x5d56b6),_0x3ee9bf=ce(_0x1feb35);_0x2ed957[_0x1f0f('0x13')]=_0x5d56b6;let _0x5985a3=null,_0x1c9c52=null;if(_0x3ee9bf||_0x3e5384){if(_0x3e5384&&!_0x3ee9bf){_0x17d2e7[_0x1f0f('0x6c')](_0x5d56b6['getChild'](0x0));for(const _0x1cb8bf of Array[_0x1f0f('0x47')](_0x1feb35[_0x1f0f('0x67')]()))_0x17d2e7[_0x1f0f('0x4b')](_0x1cb8bf,_0x5d56b6,_0x1f0f('0x95'));const _0x1de91b=_0x174a51[_0x1f0f('0x18')][_0x1f0f('0x4')](_0x10f8d9[_0x1f0f('0x54')]),_0x45456c=_0x174a51[_0x1f0f('0xa8')][_0x1f0f('0x4')](_0x10f8d9[_0x1f0f('0xa0')]);_0x1de91b||_0x45456c||(_0x5985a3=_0x17d2e7[_0x1f0f('0x60')](_0x5d56b6));}else _0x3ee9bf&&!_0x3e5384&&(_0x1c9c52=_0x17d2e7[_0x1f0f('0x60')](_0x5d56b6));}else{const _0x180d47=_0x17d2e7[_0x1f0f('0x73')](_0x1f0f('0x16')),_0x263103=_0x17d2e7['createElement'](_0x1f0f('0x16'));_0x17d2e7[_0x1f0f('0x30')](_0x17d2e7['createRangeIn'](_0x5d56b6),_0x263103),_0x17d2e7[_0x1f0f('0x4b')](_0x180d47,_0x5d56b6,0x0);for(const _0x29e890 of Array['from'](_0x1feb35[_0x1f0f('0x67')]()))_0x17d2e7[_0x1f0f('0x4b')](_0x29e890,_0x180d47,_0x1f0f('0x95'));_0x5985a3=_0x17d2e7[_0x1f0f('0x19')](_0x180d47),_0x1c9c52=_0x17d2e7[_0x1f0f('0x19')](_0x263103);}const _0x190397=Array[_0x1f0f('0x47')](_0x1feb35[_0x1f0f('0xa5')]())['filter'](([_0x33a152])=>le[_0x1f0f('0x4')](_0x33a152));_0x174a51[_0x1f0f('0x84')]['push']({'element':_0x5d56b6,'attributes':_0x190397[_0x1f0f('0x77')]?Object['fromEntries'](_0x190397):null}),_0x5985a3&&_0x174a51[_0x1f0f('0x43')][_0x1f0f('0x29')](_0x5985a3),_0x1c9c52&&_0x174a51[_0x1f0f('0x5c')]['push'](_0x1c9c52);},{'priority':_0x1f0f('0x4e')}),_0x9fb2f9['on'](_0x1f0f('0x2d'),(_0x582513,_0x53de84)=>{const [_0x9cfcc5,_0x4abab7={}]=_0x53de84;if(!_0x174a51)return;const _0x1c3f8e=_0x4abab7['at']||0x0,_0x5aa5b6=_0x4abab7[_0x1f0f('0x8d')]||0x1;_0x174a51[_0x1f0f('0xa8')]=new Array(_0x5aa5b6)['fill'](_0x1c3f8e)[_0x1f0f('0x96')]((_0x44574b,_0x31d493)=>_0x44574b+_0x31d493);for(const {cell:_0x5b649c}of _0x9fb2f9['createTableWalker'](_0x9cfcc5,{'startColumn':_0x1c3f8e,'endColumn':_0x1c3f8e+_0x5aa5b6-0x1}))_0x174a51[_0x1f0f('0x23')][_0x1f0f('0x29')](_0x3b1a44[_0x1f0f('0x92')][_0x1f0f('0x19')](_0x5b649c));},{'priority':_0x1f0f('0x7f')}),_0x9fb2f9['on'](_0x1f0f('0x3b'),(_0x2265fa,_0x320b66)=>{const [_0x182757,_0x3d1af2={}]=_0x320b66;if(!_0x174a51)return;const _0x2f780b=_0x3d1af2['at']||0x0,_0x1dafd9=_0x3d1af2['rows']||0x1;_0x174a51[_0x1f0f('0x18')]=new Array(_0x1dafd9)[_0x1f0f('0x65')](_0x2f780b)[_0x1f0f('0x96')]((_0x8f8dd8,_0x5551db)=>_0x8f8dd8+_0x5551db);for(const {cell:_0x51d572}of _0x9fb2f9['createTableWalker'](_0x182757,{'startRow':_0x2f780b,'endRow':_0x2f780b+_0x1dafd9-0x1}))_0x174a51[_0x1f0f('0x5')][_0x1f0f('0x29')](_0x3b1a44[_0x1f0f('0x92')]['createRangeOn'](_0x51d572));},{'priority':_0x1f0f('0x7f')}),_0x571782[_0x1f0f('0x3e')][_0x1f0f('0x1c')](_0xca17c3=>{if(_0xca17c3[_0x1f0f('0xa1')]&&_0xca17c3['subType'][_0x1f0f('0x45')](_0x1f0f('0x61')))return _0xca17c3[_0x1f0f('0x25')]?{}:{'type':_0x1f0f('0x1'),'content':_0x281b03(_0x3b1a44[_0x1f0f('0x55')],_0x1f0f('0x81'))};});const _0x3b0900=()=>!0x1;for(const _0x226fb8 of[_0x1f0f('0x61'),_0x1f0f('0x20'),_0x1f0f('0x9e'),'tablePasteCell'])_0x571782[_0x1f0f('0x7e')][_0x1f0f('0x38')](_0x1f0f('0x1'),_0x226fb8,_0x1f0f('0x85'),_0x3b0900),_0x571782['_suggestionFactory'][_0x1f0f('0x38')](_0x1f0f('0x3'),_0x226fb8,_0x1f0f('0x85'),_0x3b0900),_0x571782[_0x1f0f('0x7e')]['registerCustomCallback'](_0x1f0f('0x5e'),_0x226fb8,_0x1f0f('0x85'),_0x3b0900);_0x571782[_0x1f0f('0x7e')][_0x1f0f('0x38')](_0x1f0f('0x5e'),_0x1f0f('0x9c'),_0x1f0f('0x8b'),_0x3b0900),_0x571782['_suggestionFactory'][_0x1f0f('0x38')](_0x1f0f('0x5e'),_0x1f0f('0x9c'),_0x1f0f('0x62'),(_0x2fb7bf,_0x34ef07,_0x5b94a5)=>{const _0x3fda81=_0x2fb7bf['map'](_0x5eded5=>_0x5eded5[_0x1f0f('0x72')]())[_0x1f0f('0x8c')](_0x13270c=>_0x13270c),_0x346f11=new Map(_0x3fda81[_0x1f0f('0x96')](_0x53afc1=>[_0x53afc1,null]));if(_0x174a51)for(const {element:_0x438190,attributes:_0xd6ef38}of _0x174a51[_0x1f0f('0x84')])_0xd6ef38&&_0x346f11[_0x1f0f('0x3d')](_0x438190,_0xd6ef38);else{if(_0x5b94a5&&_0x5b94a5[_0x1f0f('0x12')])for(const [_0x28154c,_0x25cada]of Object['entries'](_0x5b94a5[_0x1f0f('0x12')])){const _0x294a60=_0x3b1a44[_0x1f0f('0x92')][_0x1f0f('0x27')]['get'](_0x28154c),_0x11b581=_0x294a60?_0x294a60[_0x1f0f('0x53')]()[_0x1f0f('0x72')]():null;_0x11b581&&_0x346f11['set'](_0x11b581,_0x25cada);}}_0x3b1a44['model'][_0x1f0f('0x6f')](_0x4cb2cd=>{for(const [_0x345bd4,_0x415e25]of _0x346f11)_0x4cb2cd[_0x1f0f('0xf')]({...ae,..._0x415e25},_0x345bd4);});});const _0x1707a4=(_0x940cdf,_0x35a29a)=>{_0x571782[_0x1f0f('0x7e')][_0x1f0f('0x38')](_0x940cdf,_0x1f0f('0x61'),_0x35a29a,(_0x3a8acb,_0x6722ea,_0x276f81)=>{_0x3b1a44[_0x1f0f('0x92')][_0x1f0f('0x6f')](_0x379bc4=>{const _0x4ba7ae=[];for(const _0x1ead6b of _0x3a8acb){const _0x58e46f=_0x1ead6b[_0x1f0f('0x76')][_0x1f0f('0x74')];_0x58e46f['is']('element',_0x1f0f('0x16'))&&_0x4ba7ae[_0x1f0f('0x29')](_0x58e46f);}_0x571782[_0x1f0f('0x7e')][_0x1f0f('0x80')](_0x940cdf,null,_0x35a29a)(_0x3a8acb,_0x6722ea,_0x276f81);for(const _0x1fe7ae of _0x4ba7ae)'$graveyard'!=_0x1fe7ae['root'][_0x1f0f('0x71')]&&_0x379bc4['unwrap'](_0x1fe7ae);});});};_0x1707a4('insertion',_0x1f0f('0x62')),_0x1707a4(_0x1f0f('0x1'),_0x1f0f('0x8b')),_0x1707a4('deletion',_0x1f0f('0x62')),_0x1707a4(_0x1f0f('0x3'),_0x1f0f('0x8b')),_0x571782['_suggestionFactory'][_0x1f0f('0x38')](_0x1f0f('0x1'),_0x1f0f('0x9e'),_0x1f0f('0x8b'),_0x457190=>{const _0x4e9718=_0x457190[_0x1f0f('0x96')](_0x3d3e26=>_0x3d3e26[_0x1f0f('0x72')]()),_0x38e60c=_0x4e9718[0x0][_0x1f0f('0x2e')](_0x1f0f('0x14')),{minRow:_0x5534b7,maxRow:_0x402faa}=_0x339cfa[_0x1f0f('0x11')](_0x4e9718);_0x9fb2f9[_0x1f0f('0x37')](_0x38e60c,{'at':_0x5534b7,'rows':_0x402faa-_0x5534b7+0x1});}),_0x571782['_suggestionFactory']['registerCustomCallback']('insertion',_0x1f0f('0x20'),_0x1f0f('0x8b'),_0x3b7f5e=>{const _0x19e393=_0x3b7f5e[_0x1f0f('0x96')](_0x194c37=>_0x194c37[_0x1f0f('0x72')]()),_0x5850ce=_0x19e393[0x0][_0x1f0f('0x2e')](_0x1f0f('0x14')),{minColumn:_0x1efd92,maxColumn:_0x214f5a}=_0x339cfa['_getCoordsForCells'](_0x19e393);_0x9fb2f9[_0x1f0f('0x2')](_0x5850ce,{'at':_0x1efd92,'columns':_0x214f5a-_0x1efd92+0x1});});const _0x3467ef=(_0x453397,_0x97411c)=>{if(!_0x97411c[_0x1f0f('0xa1')]||!_0x97411c['subType']['startsWith'](_0x1f0f('0x61')))return;const _0x17d516=_0x97411c['attributes'][_0x1f0f('0x10')],_0x310202=_0x571782[_0x1f0f('0x28')]()[_0x1f0f('0x8c')](_0x61805f=>_0x61805f[_0x1f0f('0x59')]&&_0x61805f['attributes']&&_0x61805f[_0x1f0f('0x33')]['tablePasteChainId']==_0x17d516);_0x310202[_0x1f0f('0x77')]&&_0x97411c[_0x1f0f('0x50')]()[_0x1f0f('0x77')]!=_0x310202[_0x1f0f('0x77')]&&_0x310202[_0x1f0f('0x8a')]((_0x1502a8,_0x1401df)=>(_0x1502a8[_0x1f0f('0x9')]=_0x1401df,_0x1401df[_0x1f0f('0x25')]=_0x1502a8,_0x1401df));};function _0x345238(_0x1dd131,_0x2370bc=!0x0){const {id:_0x17b596}=_0x571782[_0x1f0f('0x31')](_0x1dd131[_0x1f0f('0x5d')]),_0xa0b805=['ck-suggestion-marker',_0x1f0f('0x70')],_0x365915=_0x571782[_0x1f0f('0x7d')][_0x1f0f('0x4')](_0x1dd131['markerName']);return _0x365915&&_0xa0b805[_0x1f0f('0x29')](_0x1f0f('0x9b')),{'classes':_0xa0b805,'attributes':{'data-suggestion':_0x17b596},'priority':_0x365915&&_0x2370bc?0xbc2:0xbb8};}_0x571782['on'](_0x1f0f('0xa6'),_0x3467ef,{'priority':_0x1f0f('0x4e')}),_0x571782['on'](_0x1f0f('0x98'),_0x3467ef,{'priority':'high'}),_0x3b1a44['model'][_0x1f0f('0x7a')][_0x1f0f('0x9d')](()=>{let _0x185646=!0x1;const _0x1bc8ac=Array['from'](_0x3b1a44[_0x1f0f('0x92')][_0x1f0f('0x7a')][_0x1f0f('0xa2')][_0x1f0f('0x68')]());for(const {name:_0x43d084,data:_0x1a4019}of _0x1bc8ac){const {group:_0x51f25e,type:_0x5d0965,id:_0x292ade}=_0x571782[_0x1f0f('0x31')](_0x43d084);if('suggestion'!=_0x51f25e||_0x1f0f('0x3')!=_0x5d0965||_0x1a4019['oldRange'])continue;if(!_0x571782[_0x1f0f('0x6b')](_0x292ade))continue;const _0x550c25=_0x571782[_0x1f0f('0x6d')](_0x292ade)[_0x1f0f('0x4f')](),_0x3176b7=_0x3b1a44[_0x1f0f('0x1f')][_0x1f0f('0x63')](_0x1f0f('0x66'))['me'];for(const _0x36c788 of _0x571782[_0x1f0f('0x28')]()){if(!_0x36c788[_0x1f0f('0x59')]||_0x36c788[_0x1f0f('0x7b')]!=_0x3176b7)continue;if('formatBlock'!=_0x36c788[_0x1f0f('0x7')]||_0x1f0f('0x9c')!=_0x36c788['subType'])continue;if(_0x36c788[_0x1f0f('0x4f')]()['every'](_0xe67984=>_0x550c25[_0x1f0f('0xa4')](_0x509bbf=>_0x509bbf[_0x1f0f('0x34')](_0xe67984,!0x0))))for(const _0x43eb98 of _0x36c788[_0x1f0f('0x50')]())_0x43eb98[_0x1f0f('0x59')]&&(_0x43eb98[_0x1f0f('0x8b')](),_0x185646=!0x0);}}return _0x185646;}),_0x3b1a44['model'][_0x1f0f('0x7a')]['registerPostFixer'](_0x3bbb1a=>{const _0x593206=_0x3b1a44['commands']['get'](_0x1f0f('0x21'));if(!_0x593206||!_0x593206[_0x1f0f('0x8')][_0x1f0f('0x97')](_0x3bbb1a[_0x1f0f('0xd')]))return!0x1;let _0x4355c0=!0x1;const _0x2b6815=_0x3b1a44['plugins'][_0x1f0f('0x63')](_0x1f0f('0x66'))['me'],_0x57c9ee=_0x3b1a44[_0x1f0f('0x92')]['document']['differ'][_0x1f0f('0x48')](),_0x48d10d=Array[_0x1f0f('0x47')](_0x3b1a44[_0x1f0f('0x92')][_0x1f0f('0x7a')][_0x1f0f('0xa2')][_0x1f0f('0x68')]())[_0x1f0f('0x8c')](({name:_0x20a0d0,data:_0x4f8e61})=>{const {group:_0x3b05eb,subType:_0x1e9d5f,authorId:_0x1e7fa8}=_0x571782[_0x1f0f('0x31')](_0x20a0d0);return _0x1f0f('0x1a')==_0x3b05eb&&'tablePaste'==_0x1e9d5f&&_0x1e7fa8==_0x2b6815['id']&&!_0x4f8e61[_0x1f0f('0x89')];});for(const _0xa96b37 of _0x57c9ee){if(_0x1f0f('0x4b')!=_0xa96b37[_0x1f0f('0x7')]||'tableCellSuggestion'!=_0xa96b37[_0x1f0f('0xc')]||0x1!=_0xa96b37[_0x1f0f('0x77')])continue;const _0x2782ca=_0x3bbb1a['createRange'](_0xa96b37[_0x1f0f('0x1e')],_0xa96b37['position'][_0x1f0f('0x79')](0x1));if(!_0x48d10d[_0x1f0f('0x75')](({data:_0x27cad9})=>_0x27cad9[_0x1f0f('0x52')][_0x1f0f('0x3a')](_0x2782ca)))for(const {name:_0x31515d,data:_0x15862f}of _0x48d10d)if(_0x2782ca['containsRange'](_0x15862f['newRange'])){_0x3bbb1a[_0x1f0f('0x69')](_0x31515d,{'range':_0x2782ca}),_0x4355c0=!0x0;break;}}return _0x4355c0;}),_0x3b1a44[_0x1f0f('0x92')][_0x1f0f('0x7a')][_0x1f0f('0x9d')](_0x1d7c7c=>{let _0x348cac=!0x1;const _0x393644=_0x3b1a44[_0x1f0f('0x1f')]['get'](_0x1f0f('0x66'))['me'],_0x2af37c=_0x571782['getSuggestions']()[_0x1f0f('0x8c')](_0xca667e=>_0xca667e[_0x1f0f('0x59')]&&_0xca667e[_0x1f0f('0x7b')]==_0x393644),_0x1e82bf=new Set(),_0x45ad18=new Set();for(const _0x38fe6e of _0x2af37c)if(_0x1f0f('0x61')==_0x38fe6e[_0x1f0f('0xa1')])for(const _0x16c1f7 of _0x38fe6e[_0x1f0f('0x44')]()){const _0x171f37=_0x16c1f7[_0x1f0f('0x53')]()['getContainedElement']();if(_0x171f37){if(_0x171f37['is'](_0x1f0f('0x32'),_0x1f0f('0x16'))&&ce(_0x171f37)){_0x38fe6e[_0x1f0f('0x2a')](_0x16c1f7[_0x1f0f('0xc')]),_0x1e82bf['add'](_0x171f37),_0x348cac=!0x0;const _0x317bdc=_0x171f37[_0x1f0f('0xaa')],_0x9afef5=_0x171f37[_0x1f0f('0x51')],_0x5b36bb=_0x317bdc&&_0x317bdc['is'](_0x1f0f('0x32'),_0x1f0f('0x16')),_0x391114=_0x9afef5&&_0x9afef5['is'](_0x1f0f('0x32'),_0x1f0f('0x16'));_0x5b36bb&&!_0x1e82bf[_0x1f0f('0x97')](_0x317bdc)&&_0x45ad18[_0x1f0f('0x99')](_0x317bdc),_0x391114&&!_0x1e82bf['has'](_0x9afef5)&&_0x45ad18['add'](_0x9afef5);}else _0x171f37['is'](_0x1f0f('0x32'),_0x1f0f('0x5f'))&&_0x171f37[_0x1f0f('0x90')]&&(_0x38fe6e['removeMarker'](_0x16c1f7[_0x1f0f('0xc')]),_0x348cac=!0x0);}}else{if('tablePasteCell'==_0x38fe6e[_0x1f0f('0xa1')]){if(!_0x38fe6e[_0x1f0f('0x33')]||!_0x38fe6e['attributes'][_0x1f0f('0x10')])continue;const _0x35a7b4=_0x38fe6e['attributes'][_0x1f0f('0x12')];if(_0x35a7b4&&Object['keys'](_0x35a7b4)[_0x1f0f('0x77')])continue;const _0x44297c=_0x38fe6e['attributes']['tablePasteChainId'];let _0x34be7d=!0x0,_0x45fdcf=!0x0;for(const _0x42f7c9 of _0x2af37c)if(_0x42f7c9[_0x1f0f('0xa1')]&&_0x42f7c9[_0x1f0f('0xa1')][_0x1f0f('0x45')](_0x1f0f('0x61'))){if(!_0x42f7c9[_0x1f0f('0x33')][_0x1f0f('0x10')]){_0x45fdcf=!0x1;break;}if(_0x42f7c9['id']!=_0x38fe6e['id']&&_0x42f7c9[_0x1f0f('0x33')][_0x1f0f('0x10')]==_0x44297c){_0x34be7d=!0x1;break;}}_0x45fdcf&&_0x34be7d&&(_0x38fe6e['removeMarkers'](),_0x348cac=!0x0);}}for(const _0x450dd4 of _0x1e82bf)_0x1d7c7c[_0x1f0f('0x6c')](_0x450dd4);for(const _0x108d0b of _0x45ad18)_0x1d7c7c[_0x1f0f('0x24')](_0x108d0b);return _0x348cac;}),_0x3b1a44[_0x1f0f('0x5a')]['for'](_0x1f0f('0x0'))[_0x1f0f('0x88')]({'model':_0x1f0f('0x78'),'view':(_0x2b35e7,_0xdbc885)=>_0x345238(_0x2b35e7),'converterPriority':_0x1f0f('0x4e')}),_0x3b1a44['conversion']['for'](_0x1f0f('0x6a'))['markerToHighlight']({'model':'suggestion:formatBlock:tablePasteCell','view':(_0x252ffb,_0x3cd4ae)=>_0x3cd4ae[_0x1f0f('0xa')][_0x1f0f('0x93')]?_0x345238(_0x252ffb,!0x1):null,'converterPriority':'high'});const _0x44f642=_0x3b1a44[_0x1f0f('0x26')][_0x1f0f('0x6e')];this[_0x1f0f('0x2c')](_0x44f642['document'],_0x1f0f('0x17'),(_0x34d12d,_0x5a7620)=>{const _0xc7ffe4=[];for(const _0x398e70 of _0x44f642[_0x1f0f('0x60')](_0x5a7620[_0x1f0f('0xe')])[_0x1f0f('0x49')]())_0x398e70['is']('element',_0x1f0f('0x58'))&&_0xc7ffe4[_0x1f0f('0x29')](_0x398e70);_0x44f642[_0x1f0f('0x6f')](_0x1a954e=>{for(const _0x330bd4 of _0xc7ffe4)_0x1a954e['move'](_0x1a954e[_0x1f0f('0x60')](_0x330bd4),_0x1a954e['createPositionBefore'](_0x330bd4)),_0x1a954e['remove'](_0x330bd4);});});}}function ce(_0x1aab5b){if(_0x1aab5b[_0x1f0f('0x90')])return!0x0;const _0x474cfa=_0x1aab5b[_0x1f0f('0x9a')](0x0);return _0x474cfa['is'](_0x1f0f('0x32'),_0x1f0f('0x5f'))&&_0x474cfa['isEmpty'];}function fe(_0x52eea8,_0x413d04={},_0x964a5){for(const {isAnchor:_0x1e1b75,cellHeight:_0x345b23,cellWidth:_0x1e6b1d}of _0x964a5[_0x1f0f('0x64')](_0x52eea8,{'includeAllSlots':!0x0,..._0x413d04}))if(!_0x1e1b75||0x1!=_0x345b23||0x1!=_0x1e6b1d)return!0x1;return!0x0;}
|
|
23
|
+
const _0x5d26=['trackChanges','unwrap','tableCellBorderStyle','markMultiRangeDeletion','getContainedElement','find','markerAttributes','editing','insertionRanges','some','tableCell','TrackChangesEditing','nextSibling','getRanges','suggestion-td','add','set','type','_suggestionFactory','options','removeMarkers','Users','reduce','getColumns','removeMarker','end','paragraph','endColumn','for','document','ck-suggestion-marker--active','_getCoordsForCells','filter','formatBlock','tablePaste','selection','getSuggestionCallback','createPositionBefore','includes','removeColumns','rowInsertionRanges','name','$graveyard','markers','columnInsertionIndexes','accept','showSuggestionHighlights','getChanges','discard','oldRange','change','registerCustomCallback','every','registerPostFixer','markerName','updateMarker','getRange','tableCellBackgroundColor','isEmpty','tablePasteColumn','stop','dataDowncast','push','subType','insertion','createRangeIn','move','table','createRange','get','getRows','getChangedMarkers','*Replace\x20table\x20cells*','hasSuggestion','requires','suggestion:formatBlock:tablePasteCell','tableCellHorizontalAlignment','fromEntries','tablePasteChainId','differ','getSelectionAffectedTableCells','isInContent','attributes','tableCellBorderColor','cells','join','remove','isEqual','getMarkers','getTableIfOnlyTableInContent','clipboardOutput','getAllAdjacentSuggestions','tableCellVerticalAlignment','deletion','_splitMarkerName','documentSelection','editor','TableUtils','suggestionUnloaded','findAncestor','rowInsertionIndexes','getItems','suggestion','createElement','cell','fill','wrap','getChildren','createTableWalker','elementToElement','tableCellSuggestion','root','previous','high','conversion','register','startsWith','start','endRow','insert','plugins','getChild','tableCellBorderWidth','setAttributes','tablePasteCell','low','author','getAttributes','map','element','rows','last','insertContent','deletionRanges','containsRange','rootName','markMultiRangeBlockFormat','position','insertRows','markMultiRangeInsertion','redo','locale','removeRows','has','TableClipboard','_descriptionFactory','markerToHighlight','getSuggestions','tableCellPadding','from','createRangeOn','previousSibling','length','model'];(function(_0x1020ff,_0x5d26de){const _0x60fb02=function(_0x326e8e){while(--_0x326e8e){_0x1020ff['push'](_0x1020ff['shift']());}};_0x60fb02(++_0x5d26de);}(_0x5d26,0xa7));const _0x60fb=function(_0x1020ff,_0x5d26de){_0x1020ff=_0x1020ff-0x0;let _0x60fb02=_0x5d26[_0x1020ff];return _0x60fb02;};import{getTranslation as _0x33f842}from'../utils/common-translations.js';import{Plugin as _0x355baa}from'ckeditor5/src/core.js';import{uid as _0xc97c03,priorities as _0x2c8dbe}from'ckeditor5/src/utils.js';import _0x26999e from'./table.js';const fe=[_0x60fb('0x6d'),_0x60fb('0x46'),_0x60fb('0x8f'),_0x60fb('0x3f'),_0x60fb('0x4f'),_0x60fb('0x2c'),_0x60fb('0x87')],be=Object[_0x60fb('0x40')](fe['map'](_0x238a92=>[_0x238a92,null]));export default class At extends _0x355baa{static get[_0x60fb('0x3d')](){return[_0x26999e];}['afterInit'](){const _0x49fc42=this['editor'];if(!_0x49fc42[_0x60fb('0x6b')][_0x60fb('0x82')](_0x60fb('0x83')))return;const _0x4224c5=_0x49fc42[_0x60fb('0x6b')][_0x60fb('0x38')](_0x60fb('0x98')),_0x3dca98=_0x49fc42[_0x60fb('0x6b')][_0x60fb('0x38')](_0x60fb('0x54')),_0x161f18=_0x49fc42[_0x60fb('0x6b')][_0x60fb('0x38')](_0x26999e),_0x56a690=_0x49fc42[_0x60fb('0x6b')][_0x60fb('0x38')]('TableClipboard');_0x161f18['_tablePostFixingSubtypes'][_0x60fb('0x31')]('tablePasteRow',_0x60fb('0x2e')),_0x49fc42['model']['schema'][_0x60fb('0x66')](_0x60fb('0x61'),{'allowIn':_0x60fb('0x97'),'allowContentOf':'tableCell','isLimit':!0x0}),_0x49fc42[_0x60fb('0x65')][_0x60fb('0x60')]({'model':_0x60fb('0x61'),'view':_0x60fb('0x1')});let _0x1e16b8=null;_0x49fc42[_0x60fb('0x8c')]['on']('insertContent',(_0x6825b7,_0x41593a)=>{const [_0x8121f3,_0x4fe1a6]=_0x41593a,_0x17e015=_0x41593a[_0x41593a[_0x60fb('0x8b')]-0x1];_0x17e015&&_0x17e015['forceDefaultExecution']||_0x4224c5['_isForcedDefaultExecutionBlock']||this[_0x60fb('0x53')]['commands']['get'](_0x60fb('0x8d'))['value']&&function(_0x28c16d,_0x4d1b0f,_0x3eb06b,_0x17b831,_0xe4d0e){if(_0x4d1b0f&&!_0x4d1b0f['is'](_0x60fb('0x52')))return!0x1;const _0x3a8612=_0xe4d0e[_0x60fb('0x4c')](_0x28c16d,_0x3eb06b);if(!_0x3a8612||!de(_0x3a8612,void 0x0,_0x17b831))return!0x1;const _0x4363e0=_0x17b831[_0x60fb('0x43')](_0x3eb06b[_0x60fb('0x10')][_0x60fb('0x16')]);if(!_0x4363e0[_0x60fb('0x8b')])return!0x1;const _0x5f4a81=_0x4363e0[0x0][_0x60fb('0x56')](_0x60fb('0x36')),_0x4b102e=_0x17b831['getRowIndexes'](_0x4363e0),_0x401df6=_0x17b831['getColumnIndexes'](_0x4363e0),_0x2e69fe={'startRow':_0x4b102e['first'],'endRow':_0x4b102e['last'],'startColumn':_0x401df6['first'],'endColumn':_0x401df6[_0x60fb('0x76')]};return 0x1==_0x4363e0['length']&&(_0x2e69fe[_0x60fb('0x69')]+=_0x17b831[_0x60fb('0x39')](_0x3a8612)-0x1,_0x2e69fe[_0x60fb('0xe')]+=_0x17b831[_0x60fb('0xa')](_0x3a8612)-0x1),de(_0x5f4a81,_0x2e69fe,_0x17b831);}(_0x8121f3,_0x4fe1a6,_0x49fc42['model'],_0x3dca98,_0x56a690)&&(_0x6825b7[_0x60fb('0x2f')](),_0x1e16b8={'cells':[],'insertionRanges':[],'deletionRanges':[],'rowInsertionRanges':[],'rowInsertionIndexes':[],'columnInsertionRanges':[],'columnInsertionIndexes':[]},_0x49fc42[_0x60fb('0x8c')][_0x60fb('0x25')](()=>{_0x49fc42[_0x60fb('0x8c')][_0x60fb('0x77')](_0x41593a[0x0],_0x41593a[0x1],_0x41593a[0x2],{'forceDefaultExecution':!0x0});const _0x18a0fe=_0xc97c03(),{rowInsertionRanges:_0x5a67f5,columnInsertionRanges:_0x4c0a30,insertionRanges:_0x25dcfe,deletionRanges:_0x3954ad,cells:_0x470fa0}=_0x1e16b8;_0x5a67f5[_0x60fb('0x8b')]&&_0x4224c5[_0x60fb('0x7e')](_0x5a67f5,'tablePasteRow',{'tablePasteChainId':_0x18a0fe}),_0x4c0a30[_0x60fb('0x8b')]&&_0x4224c5['markMultiRangeInsertion'](_0x4c0a30,_0x60fb('0x2e'),{'tablePasteChainId':_0x18a0fe}),_0x25dcfe[_0x60fb('0x8b')]&&_0x4224c5['markMultiRangeInsertion'](_0x25dcfe,'tablePaste',{'tablePasteChainId':_0x18a0fe,'skipNestingCheck':!0x0}),_0x3954ad[_0x60fb('0x8b')]&&_0x4224c5[_0x60fb('0x90')](_0x3954ad,'tablePaste',{'tablePasteChainId':_0x18a0fe,'skipNestingCheck':!0x0});const _0x56a918=_0x4224c5[_0x60fb('0x7b')](_0x470fa0[_0x60fb('0x73')](({element:_0x5d71c3})=>_0x5d71c3),{'formatGroupId':_0xc97c03()},[],_0x60fb('0x6f'),{'tablePasteChainId':_0x18a0fe});if(_0x56a918){const _0x31baea=_0x56a918[_0x60fb('0x4b')](),_0x25988d=[];for(const {element:_0x4294ad,attributes:_0x3f5a9e}of _0x470fa0){if(!_0x3f5a9e)continue;const _0x53a22a=_0x49fc42[_0x60fb('0x8c')][_0x60fb('0x89')](_0x4294ad),_0x3e3806=_0x31baea[_0x60fb('0x92')](_0x720f55=>_0x720f55[_0x60fb('0x2b')]()[_0x60fb('0x4a')](_0x53a22a));_0x3e3806&&_0x25988d[_0x60fb('0x31')]([_0x3e3806[_0x60fb('0x1c')],_0x3f5a9e]);}_0x25988d['length']&&_0x56a918['setAttribute'](_0x60fb('0x93'),Object[_0x60fb('0x40')](_0x25988d));}_0x1e16b8=null;}));},{'priority':_0x2c8dbe[_0x60fb('0x64')]+0xa}),_0x49fc42[_0x60fb('0x6b')][_0x60fb('0x38')](_0x60fb('0x83'))['on']('_replaceTableSlotCell',(_0x14e9a5,_0x256827)=>{const [_0x289804,_0x1e5fce,,_0x41f862]=_0x256827;if(!_0x1e16b8)return;_0x14e9a5[_0x60fb('0x2f')]();const _0x200e1c=_0x289804[_0x60fb('0x5b')],_0x1edf99=_0x1e5fce,_0x2ca720=ge(_0x200e1c),_0x363cee=ge(_0x1edf99);_0x14e9a5['return']=_0x200e1c;let _0x50e64f=null,_0x57658e=null;if(_0x363cee||_0x2ca720){if(_0x2ca720&&!_0x363cee){_0x41f862['remove'](_0x200e1c['getChild'](0x0));for(const _0x430ae5 of Array[_0x60fb('0x88')](_0x1edf99[_0x60fb('0x5e')]()))_0x41f862[_0x60fb('0x6a')](_0x430ae5,_0x200e1c,_0x60fb('0xc'));const _0x3595e2=_0x1e16b8[_0x60fb('0x57')][_0x60fb('0x19')](_0x289804['row']),_0x57ac46=_0x1e16b8[_0x60fb('0x1f')][_0x60fb('0x19')](_0x289804['column']);_0x3595e2||_0x57ac46||(_0x50e64f=_0x41f862[_0x60fb('0x34')](_0x200e1c));}else _0x363cee&&!_0x2ca720&&(_0x57658e=_0x41f862[_0x60fb('0x34')](_0x200e1c));}else{const _0x5d48f2=_0x41f862[_0x60fb('0x5a')]('tableCellSuggestion'),_0x1081cb=_0x41f862[_0x60fb('0x5a')](_0x60fb('0x61'));_0x41f862[_0x60fb('0x5d')](_0x41f862['createRangeIn'](_0x200e1c),_0x1081cb),_0x41f862['insert'](_0x5d48f2,_0x200e1c,0x0);for(const _0x500bcf of Array['from'](_0x1edf99['getChildren']()))_0x41f862[_0x60fb('0x6a')](_0x500bcf,_0x5d48f2,'end');_0x50e64f=_0x41f862[_0x60fb('0x89')](_0x5d48f2),_0x57658e=_0x41f862[_0x60fb('0x89')](_0x1081cb);}const _0x55f131=Array['from'](_0x1edf99[_0x60fb('0x72')]())['filter'](([_0x17e2cb])=>fe[_0x60fb('0x19')](_0x17e2cb));_0x1e16b8['cells'][_0x60fb('0x31')]({'element':_0x200e1c,'attributes':_0x55f131[_0x60fb('0x8b')]?Object[_0x60fb('0x40')](_0x55f131):null}),_0x50e64f&&_0x1e16b8[_0x60fb('0x95')][_0x60fb('0x31')](_0x50e64f),_0x57658e&&_0x1e16b8[_0x60fb('0x78')][_0x60fb('0x31')](_0x57658e);},{'priority':'high'}),_0x3dca98['on']('insertColumns',(_0x43f181,_0x2cdbd3)=>{const [_0x4aebc0,_0x3928e8={}]=_0x2cdbd3;if(!_0x1e16b8)return;const _0x21d39b=_0x3928e8['at']||0x0,_0x5d6492=_0x3928e8['columns']||0x1;_0x1e16b8['columnInsertionIndexes']=new Array(_0x5d6492)[_0x60fb('0x5c')](_0x21d39b)[_0x60fb('0x73')]((_0x566754,_0x33477a)=>_0x566754+_0x33477a);for(const {cell:_0x230d38}of _0x3dca98[_0x60fb('0x5f')](_0x4aebc0,{'startColumn':_0x21d39b,'endColumn':_0x21d39b+_0x5d6492-0x1}))_0x1e16b8['columnInsertionRanges'][_0x60fb('0x31')](_0x49fc42[_0x60fb('0x8c')]['createRangeOn'](_0x230d38));},{'priority':_0x60fb('0x70')}),_0x3dca98['on'](_0x60fb('0x7d'),(_0x12d304,_0x3980ac)=>{const [_0x2e3186,_0x1c9752={}]=_0x3980ac;if(!_0x1e16b8)return;const _0x5a7c7e=_0x1c9752['at']||0x0,_0x5ae613=_0x1c9752[_0x60fb('0x75')]||0x1;_0x1e16b8[_0x60fb('0x57')]=new Array(_0x5ae613)[_0x60fb('0x5c')](_0x5a7c7e)[_0x60fb('0x73')]((_0x49017a,_0x560894)=>_0x49017a+_0x560894);for(const {cell:_0x78d2be}of _0x3dca98['createTableWalker'](_0x2e3186,{'startRow':_0x5a7c7e,'endRow':_0x5a7c7e+_0x5ae613-0x1}))_0x1e16b8[_0x60fb('0x1b')][_0x60fb('0x31')](_0x49fc42[_0x60fb('0x8c')][_0x60fb('0x89')](_0x78d2be));},{'priority':_0x60fb('0x70')}),_0x4224c5[_0x60fb('0x84')]['registerDescriptionCallback'](_0x2f7c78=>{if(_0x2f7c78[_0x60fb('0x32')]&&_0x2f7c78[_0x60fb('0x32')][_0x60fb('0x67')]('tablePaste'))return _0x2f7c78['previous']?{}:{'type':_0x60fb('0x33'),'content':_0x33f842(_0x49fc42[_0x60fb('0x80')],_0x60fb('0x3b'))};});const _0x4b431c=()=>!0x1;for(const _0xeea776 of['tablePaste',_0x60fb('0x2e'),'tablePasteRow','tablePasteCell'])_0x4224c5['_suggestionFactory']['registerCustomCallback']('insertion',_0xeea776,_0x60fb('0x48'),_0x4b431c),_0x4224c5[_0x60fb('0x5')][_0x60fb('0x26')](_0x60fb('0x50'),_0xeea776,_0x60fb('0x48'),_0x4b431c),_0x4224c5[_0x60fb('0x5')][_0x60fb('0x26')](_0x60fb('0x14'),_0xeea776,_0x60fb('0x48'),_0x4b431c);_0x4224c5[_0x60fb('0x5')][_0x60fb('0x26')](_0x60fb('0x14'),_0x60fb('0x6f'),'discard',_0x4b431c),_0x4224c5[_0x60fb('0x5')][_0x60fb('0x26')](_0x60fb('0x14'),_0x60fb('0x6f'),_0x60fb('0x20'),(_0x5271e1,_0x4d60d7,_0xfcf208)=>{const _0x36264e=_0x5271e1[_0x60fb('0x73')](_0xf0617b=>_0xf0617b[_0x60fb('0x91')]())[_0x60fb('0x13')](_0x4c184e=>_0x4c184e),_0x1c91f8=new Map(_0x36264e[_0x60fb('0x73')](_0x62f8d4=>[_0x62f8d4,null]));if(_0x1e16b8)for(const {element:_0x29e92b,attributes:_0x58aa84}of _0x1e16b8[_0x60fb('0x47')])_0x58aa84&&_0x1c91f8[_0x60fb('0x3')](_0x29e92b,_0x58aa84);else{if(_0xfcf208&&_0xfcf208[_0x60fb('0x93')])for(const [_0xd3dcac,_0x1aef0e]of Object['entries'](_0xfcf208[_0x60fb('0x93')])){const _0x49f562=_0x49fc42['model'][_0x60fb('0x1e')]['get'](_0xd3dcac),_0x19035b=_0x49f562?_0x49f562['getRange']()[_0x60fb('0x91')]():null;_0x19035b&&_0x1c91f8[_0x60fb('0x3')](_0x19035b,_0x1aef0e);}}_0x49fc42['model']['change'](_0x124057=>{for(const [_0x129bed,_0x41493d]of _0x1c91f8)_0x124057[_0x60fb('0x6e')]({...be,..._0x41493d},_0x129bed);});});const _0x4936ab=(_0xfb0b39,_0x19f0f2)=>{_0x4224c5[_0x60fb('0x5')]['registerCustomCallback'](_0xfb0b39,_0x60fb('0x15'),_0x19f0f2,(_0x539d1c,_0x56b126,_0x17a322)=>{_0x49fc42[_0x60fb('0x8c')][_0x60fb('0x25')](_0x149854=>{const _0x180c63=[];for(const _0x46d0f5 of _0x539d1c){const _0x1cc030=_0x46d0f5[_0x60fb('0x68')]['nodeAfter'];_0x1cc030['is'](_0x60fb('0x74'),'tableCellSuggestion')&&_0x180c63[_0x60fb('0x31')](_0x1cc030);}_0x4224c5[_0x60fb('0x5')][_0x60fb('0x17')](_0xfb0b39,null,_0x19f0f2)(_0x539d1c,_0x56b126,_0x17a322);for(const _0x3aff12 of _0x180c63)_0x60fb('0x1d')!=_0x3aff12[_0x60fb('0x62')][_0x60fb('0x7a')]&&_0x149854['unwrap'](_0x3aff12);});});};_0x4936ab('insertion',_0x60fb('0x20')),_0x4936ab(_0x60fb('0x33'),'discard'),_0x4936ab('deletion',_0x60fb('0x20')),_0x4936ab(_0x60fb('0x50'),_0x60fb('0x23')),_0x4224c5[_0x60fb('0x5')][_0x60fb('0x26')](_0x60fb('0x33'),'tablePasteRow',_0x60fb('0x23'),_0x38aafa=>{const _0x519a26=_0x38aafa['map'](_0x545d30=>_0x545d30[_0x60fb('0x91')]()),_0x40c28f=_0x519a26[0x0][_0x60fb('0x56')](_0x60fb('0x36')),{minRow:_0xe2cc3d,maxRow:_0x36b19b}=_0x161f18[_0x60fb('0x12')](_0x519a26);_0x3dca98[_0x60fb('0x81')](_0x40c28f,{'at':_0xe2cc3d,'rows':_0x36b19b-_0xe2cc3d+0x1});}),_0x4224c5[_0x60fb('0x5')][_0x60fb('0x26')](_0x60fb('0x33'),_0x60fb('0x2e'),'discard',_0x2f779e=>{const _0x32dad4=_0x2f779e[_0x60fb('0x73')](_0x2017ea=>_0x2017ea[_0x60fb('0x91')]()),_0x1c798d=_0x32dad4[0x0][_0x60fb('0x56')](_0x60fb('0x36')),{minColumn:_0x3c6536,maxColumn:_0x550d46}=_0x161f18[_0x60fb('0x12')](_0x32dad4);_0x3dca98[_0x60fb('0x1a')](_0x1c798d,{'at':_0x3c6536,'columns':_0x550d46-_0x3c6536+0x1});});const _0x55f800=(_0x53eebf,_0x4f1adc)=>{if(!_0x4f1adc[_0x60fb('0x32')]||!_0x4f1adc['subType'][_0x60fb('0x67')](_0x60fb('0x15')))return;const _0x6cd791=_0x4f1adc[_0x60fb('0x45')][_0x60fb('0x41')],_0x1401a7=_0x4224c5[_0x60fb('0x86')]()['filter'](_0x206c3e=>_0x206c3e[_0x60fb('0x44')]&&_0x206c3e[_0x60fb('0x45')]&&_0x206c3e['attributes'][_0x60fb('0x41')]==_0x6cd791);_0x1401a7[_0x60fb('0x8b')]&&_0x4f1adc[_0x60fb('0x4e')]()[_0x60fb('0x8b')]!=_0x1401a7[_0x60fb('0x8b')]&&_0x1401a7[_0x60fb('0x9')]((_0x226ea4,_0x34d76a)=>(_0x226ea4['next']=_0x34d76a,_0x34d76a[_0x60fb('0x63')]=_0x226ea4,_0x34d76a));};function _0x464cf9(_0x31d985,_0x5df55a=!0x0){const {id:_0x358f17}=_0x4224c5['_splitMarkerName'](_0x31d985[_0x60fb('0x29')]),_0x48c1f0=['ck-suggestion-marker','ck-suggestion-marker-insertion'],_0x1a94db=_0x4224c5['activeMarkers'][_0x60fb('0x19')](_0x31d985[_0x60fb('0x29')]);return _0x1a94db&&_0x48c1f0['push'](_0x60fb('0x11')),{'classes':_0x48c1f0,'attributes':{'data-suggestion':_0x358f17},'priority':_0x1a94db&&_0x5df55a?0xbc2:0xbb8};}_0x4224c5['on']('suggestionLoaded',_0x55f800,{'priority':_0x60fb('0x64')}),_0x4224c5['on'](_0x60fb('0x55'),_0x55f800,{'priority':'high'}),_0x49fc42[_0x60fb('0x8c')][_0x60fb('0x10')][_0x60fb('0x28')](()=>{let _0x681256=!0x1;const _0x265a61=Array[_0x60fb('0x88')](_0x49fc42['model']['document'][_0x60fb('0x42')][_0x60fb('0x3a')]());for(const {name:_0x475d9c,data:_0x3a08ea}of _0x265a61){const {group:_0x304135,type:_0x38586b,id:_0x5a6bf6}=_0x4224c5[_0x60fb('0x51')](_0x475d9c);if(_0x60fb('0x59')!=_0x304135||_0x60fb('0x50')!=_0x38586b||_0x3a08ea[_0x60fb('0x24')])continue;if(!_0x4224c5[_0x60fb('0x3c')](_0x5a6bf6))continue;const _0x3052de=_0x4224c5['getSuggestion'](_0x5a6bf6)['getRanges'](),_0x158085=_0x49fc42[_0x60fb('0x6b')][_0x60fb('0x38')](_0x60fb('0x8'))['me'];for(const _0x518a42 of _0x4224c5[_0x60fb('0x86')]()){if(!_0x518a42[_0x60fb('0x44')]||_0x518a42[_0x60fb('0x71')]!=_0x158085)continue;if(_0x60fb('0x14')!=_0x518a42['type']||_0x60fb('0x6f')!=_0x518a42[_0x60fb('0x32')])continue;if(_0x518a42[_0x60fb('0x0')]()[_0x60fb('0x27')](_0x5b82b5=>_0x3052de[_0x60fb('0x96')](_0x1886a8=>_0x1886a8[_0x60fb('0x79')](_0x5b82b5,!0x0))))for(const _0x3e4979 of _0x518a42[_0x60fb('0x4e')]())_0x3e4979[_0x60fb('0x44')]&&(_0x3e4979[_0x60fb('0x23')](),_0x681256=!0x0);}}return _0x681256;}),_0x49fc42[_0x60fb('0x8c')]['document'][_0x60fb('0x28')](_0x1d213f=>{const _0x5dd844=_0x49fc42['commands'][_0x60fb('0x38')](_0x60fb('0x7f'));if(!_0x5dd844||!_0x5dd844['_createdBatches']['has'](_0x1d213f['batch']))return!0x1;let _0x543b27=!0x1;const _0x2ee8c5=_0x49fc42[_0x60fb('0x6b')][_0x60fb('0x38')](_0x60fb('0x8'))['me'],_0x11c28f=_0x49fc42[_0x60fb('0x8c')][_0x60fb('0x10')][_0x60fb('0x42')][_0x60fb('0x22')](),_0x7317ee=Array[_0x60fb('0x88')](_0x49fc42['model'][_0x60fb('0x10')][_0x60fb('0x42')]['getChangedMarkers']())['filter'](({name:_0x2e6de2,data:_0x19b04e})=>{const {group:_0x432fb1,subType:_0x26e75e,authorId:_0x5d7c5a}=_0x4224c5[_0x60fb('0x51')](_0x2e6de2);return _0x60fb('0x59')==_0x432fb1&&_0x60fb('0x15')==_0x26e75e&&_0x5d7c5a==_0x2ee8c5['id']&&!_0x19b04e[_0x60fb('0x24')];});for(const _0x4f66aa of _0x11c28f){if(_0x60fb('0x6a')!=_0x4f66aa[_0x60fb('0x4')]||_0x60fb('0x61')!=_0x4f66aa[_0x60fb('0x1c')]||0x1!=_0x4f66aa[_0x60fb('0x8b')])continue;const _0x24d918=_0x1d213f[_0x60fb('0x37')](_0x4f66aa[_0x60fb('0x7c')],_0x4f66aa['position']['getShiftedBy'](0x1));if(!_0x7317ee[_0x60fb('0x92')](({data:_0x131ac6})=>_0x131ac6['newRange']['isEqual'](_0x24d918)))for(const {name:_0x632d0d,data:_0x1537a6}of _0x7317ee)if(_0x24d918['containsRange'](_0x1537a6['newRange'])){_0x1d213f[_0x60fb('0x2a')](_0x632d0d,{'range':_0x24d918}),_0x543b27=!0x0;break;}}return _0x543b27;}),_0x49fc42['model'][_0x60fb('0x10')][_0x60fb('0x28')](_0x18859f=>{let _0x20d484=!0x1;const _0x24b846=_0x49fc42[_0x60fb('0x6b')][_0x60fb('0x38')](_0x60fb('0x8'))['me'],_0x44ecfe=_0x4224c5[_0x60fb('0x86')]()['filter'](_0x17db3a=>_0x17db3a[_0x60fb('0x44')]&&_0x17db3a[_0x60fb('0x71')]==_0x24b846),_0x457913=new Set(),_0x106da6=new Set();for(const _0xf5f9d6 of _0x44ecfe)if(_0x60fb('0x15')==_0xf5f9d6['subType'])for(const _0x5ac76e of _0xf5f9d6['getMarkers']()){const _0x58a51d=_0x5ac76e[_0x60fb('0x2b')]()['getContainedElement']();if(_0x58a51d){if(_0x58a51d['is'](_0x60fb('0x74'),_0x60fb('0x61'))&&ge(_0x58a51d)){_0xf5f9d6[_0x60fb('0xb')](_0x5ac76e[_0x60fb('0x1c')]),_0x457913['add'](_0x58a51d),_0x20d484=!0x0;const _0x371d0a=_0x58a51d[_0x60fb('0x99')],_0x37fb8b=_0x58a51d[_0x60fb('0x8a')],_0x54ebae=_0x371d0a&&_0x371d0a['is'](_0x60fb('0x74'),_0x60fb('0x61')),_0x5d35da=_0x37fb8b&&_0x37fb8b['is'](_0x60fb('0x74'),_0x60fb('0x61'));_0x54ebae&&!_0x457913[_0x60fb('0x82')](_0x371d0a)&&_0x106da6[_0x60fb('0x2')](_0x371d0a),_0x5d35da&&!_0x457913[_0x60fb('0x82')](_0x37fb8b)&&_0x106da6[_0x60fb('0x2')](_0x37fb8b);}else _0x58a51d['is'](_0x60fb('0x74'),_0x60fb('0xd'))&&_0x58a51d[_0x60fb('0x2d')]&&(_0xf5f9d6[_0x60fb('0xb')](_0x5ac76e['name']),_0x20d484=!0x0);}}else{if(_0x60fb('0x6f')==_0xf5f9d6[_0x60fb('0x32')]){if(!_0xf5f9d6[_0x60fb('0x45')]||!_0xf5f9d6[_0x60fb('0x45')][_0x60fb('0x41')])continue;const _0x1890c8=_0xf5f9d6[_0x60fb('0x45')]['markerAttributes'];if(_0x1890c8&&Object['keys'](_0x1890c8)['length'])continue;const _0x56439e=_0xf5f9d6[_0x60fb('0x45')][_0x60fb('0x41')];let _0x4b0bd1=!0x0,_0x452c48=!0x0;for(const _0x4f56b4 of _0x44ecfe)if(_0x4f56b4[_0x60fb('0x32')]&&_0x4f56b4[_0x60fb('0x32')][_0x60fb('0x67')](_0x60fb('0x15'))){if(!_0x4f56b4['attributes'][_0x60fb('0x41')]){_0x452c48=!0x1;break;}if(_0x4f56b4['id']!=_0xf5f9d6['id']&&_0x4f56b4['attributes'][_0x60fb('0x41')]==_0x56439e){_0x4b0bd1=!0x1;break;}}_0x452c48&&_0x4b0bd1&&(_0xf5f9d6[_0x60fb('0x7')](),_0x20d484=!0x0);}}for(const _0x29690b of _0x457913)_0x18859f[_0x60fb('0x49')](_0x29690b);for(const _0x5a1aef of _0x106da6)_0x18859f[_0x60fb('0x8e')](_0x5a1aef);return _0x20d484;}),_0x49fc42['conversion']['for']('editingDowncast')[_0x60fb('0x85')]({'model':'suggestion:formatBlock:tablePasteCell','view':(_0x4dd092,_0x148c12)=>_0x464cf9(_0x4dd092),'converterPriority':_0x60fb('0x64')}),_0x49fc42[_0x60fb('0x65')][_0x60fb('0xf')](_0x60fb('0x30'))[_0x60fb('0x85')]({'model':_0x60fb('0x3e'),'view':(_0x53f18a,_0x32db4d)=>_0x32db4d[_0x60fb('0x6')][_0x60fb('0x21')]?_0x464cf9(_0x53f18a,!0x1):null,'converterPriority':_0x60fb('0x64')});const _0x19be36=_0x49fc42[_0x60fb('0x94')]['view'];this['listenTo'](_0x19be36['document'],_0x60fb('0x4d'),(_0x51759f,_0x3906a6)=>{const _0x1bbf2e=[];for(const _0x5630e9 of _0x19be36[_0x60fb('0x34')](_0x3906a6['content'])[_0x60fb('0x58')]())_0x5630e9['is'](_0x60fb('0x74'),_0x60fb('0x1'))&&_0x1bbf2e[_0x60fb('0x31')](_0x5630e9);_0x19be36[_0x60fb('0x25')](_0x1256ca=>{for(const _0x9f20f2 of _0x1bbf2e)_0x1256ca[_0x60fb('0x35')](_0x1256ca[_0x60fb('0x34')](_0x9f20f2),_0x1256ca[_0x60fb('0x18')](_0x9f20f2)),_0x1256ca['remove'](_0x9f20f2);});});}}function ge(_0x1c0443){if(_0x1c0443[_0x60fb('0x2d')])return!0x0;const _0x52aebc=_0x1c0443[_0x60fb('0x6c')](0x0);return _0x52aebc['is'](_0x60fb('0x74'),_0x60fb('0xd'))&&_0x52aebc[_0x60fb('0x2d')];}function de(_0x40f6cb,_0x4ef5cc={},_0x21a534){for(const {isAnchor:_0x2bbc31,cellHeight:_0x53a932,cellWidth:_0x5dd3fb}of _0x21a534['createTableWalker'](_0x40f6cb,{'includeAllSlots':!0x0,..._0x4ef5cc}))if(!_0x2bbc31||0x1!=_0x53a932||0x1!=_0x5dd3fb)return!0x1;return!0x0;}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module track-changes/integrations/tablecolumnresize
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import type { Element } from 'ckeditor5/src/engine';
|
|
10
|
-
import type Suggestion from '../suggestion';
|
|
11
|
-
import type { Description } from '../suggestiondescriptionfactory';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import type { Element } from 'ckeditor5/src/engine.js';
|
|
10
|
+
import type Suggestion from '../suggestion.js';
|
|
11
|
+
import type { Description } from '../suggestiondescriptionfactory.js';
|
|
12
12
|
/**
|
|
13
13
|
* Provides track changes plugin integration for table column resize feature.
|
|
14
14
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, 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 _0xff3d=['resizeTableWidth','selection','TrackChangesEditing','discard','getAttribute','author','plugins','getTableColumnsWidths','format','accept','getSuggestionCallback','data','subType','getContainedElement','*Format:*\x20resize\x20table','registerCustomCallback','commandParams','getSelectedElement','columnWidths','get','formatGroupId','editor','handleSuggestionDescription','_descriptionFactory','bind','document','Users','change','tableWidth','has','getColumnGroupElement','afterInit','resizeTable','type','formatBlock','registerDescriptionCallback','_suggestionFactory'];(function(_0x1514a6,_0xff3d54){const _0x5b62e9=function(_0x2738bd){while(--_0x2738bd){_0x1514a6['push'](_0x1514a6['shift']());}};_0x5b62e9(++_0xff3d54);}(_0xff3d,0xbc));const _0x5b62=function(_0x1514a6,_0xff3d54){_0x1514a6=_0x1514a6-0x0;let _0x5b62e9=_0xff3d[_0x1514a6];return _0x5b62e9;};import{Plugin as _0x4bc5b1}from'ckeditor5/src/core.js';import{getTranslation as _0x5675fd}from'../utils/common-translations.js';export default class It extends _0x4bc5b1{[_0x5b62('0x1c')](){if(!this[_0x5b62('0x12')][_0x5b62('0x3')][_0x5b62('0x1a')]('TableColumnResizeEditing'))return;const _0x4366fd=this[_0x5b62('0x12')][_0x5b62('0x3')]['get']('TrackChangesEditing');_0x4366fd['enableCommand'](_0x5b62('0x22'),this['handleResizeTableWidthCommand'][_0x5b62('0x15')](this)),_0x4366fd[_0x5b62('0x21')][_0x5b62('0xc')](_0x5b62('0x1f'),_0x5b62('0x1d'),'accept',_0x4366fd[_0x5b62('0x21')][_0x5b62('0x7')](_0x5b62('0x1f'),null,'discard')),_0x4366fd[_0x5b62('0x21')][_0x5b62('0xc')]('formatBlock',_0x5b62('0x1d'),_0x5b62('0x0'),_0x4366fd[_0x5b62('0x21')][_0x5b62('0x7')](_0x5b62('0x1f'),null,_0x5b62('0x6'))),_0x4366fd[_0x5b62('0x14')][_0x5b62('0x20')](this[_0x5b62('0x13')]['bind'](this));}['handleResizeTableWidthCommand'](_0x2c196b,_0x397bed){const _0x5aa54d=this['editor'][_0x5b62('0x3')][_0x5b62('0x10')](_0x5b62('0x24')),_0x463568=this['editor']['plugins']['get']('TableColumnResizeEditing'),_0x3c71e1=_0x397bed['table']||this[_0x5b62('0x12')]['model'][_0x5b62('0x16')][_0x5b62('0x23')][_0x5b62('0xe')]();this[_0x5b62('0x12')]['model'][_0x5b62('0x18')](()=>{const _0x76d1ae=_0x463568[_0x5b62('0x1b')](_0x3c71e1);let _0x434d22=_0x76d1ae?_0x463568[_0x5b62('0x4')](_0x76d1ae):null,_0x4d16e2=_0x3c71e1[_0x5b62('0x1')](_0x5b62('0x19'))||null;const _0xa93c39=_0x397bed[_0x5b62('0x19')]||_0x4d16e2,_0x99a101=_0x397bed[_0x5b62('0xf')]||_0x434d22,_0x51cefa=this['editor']['plugins'][_0x5b62('0x10')](_0x5b62('0x17'))['me'];for(const _0x50ed0f of _0x5aa54d['getSuggestions']()){const _0x4ebb0b=_0x50ed0f[_0x5b62('0xa')]();if(_0x5b62('0x1d')===_0x50ed0f[_0x5b62('0x9')]&&_0x4ebb0b===_0x3c71e1){_0x50ed0f[_0x5b62('0x2')]!==_0x51cefa&&_0x50ed0f[_0x5b62('0x0')]();const _0x2aad1c=_0x50ed0f[_0x5b62('0x8')][_0x5b62('0xd')];_0x4d16e2=_0x2aad1c[0x0][_0x5b62('0x19')],_0x434d22=_0x2aad1c[0x0]['columnWidths'];break;}}_0x2c196b({'table':_0x3c71e1,'tableWidth':_0xa93c39,'columnWidths':_0x99a101}),_0x5aa54d['markBlockFormat'](_0x3c71e1,{'commandName':'resizeTableWidth','commandParams':[{'tableWidth':_0x4d16e2,'columnWidths':_0x434d22}],'formatGroupId':_0x5b62('0x1d')},[],_0x5b62('0x1d'));});}[_0x5b62('0x13')](_0x1b6063){if('formatBlock'!=_0x1b6063[_0x5b62('0x1e')]&&'formatInline'!=_0x1b6063[_0x5b62('0x1e')])return;const {data:_0x50e0ce}=_0x1b6063;if(_0x50e0ce&&_0x5b62('0x1d')===_0x50e0ce[_0x5b62('0x11')]){const _0x13e70e=_0x5b62('0xb');return{'type':_0x5b62('0x5'),'content':_0x5675fd(this['editor']['locale'],_0x13e70e)};}}}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module track-changes/integrations/tableheadings
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import TrackChangesTable from './table';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import TrackChangesTable from './table.js';
|
|
10
10
|
/**
|
|
11
11
|
* Provides track changes plugin integration for {@link module:table/table~Table table feature} heading rows/columns.
|
|
12
12
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2024, 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 _0x376a=['showSuggestionHighlights','editing','setTableRowHeader','highest','data','bindElementToMarker','activeMarkers','commandName','markerNameToElements','TableUtils','TrackChangesEditing','_suggestionFactory','nodeBefore','forceValue','headingRows','_splitMarkerName','formatBlock','markerRange','ck-suggestion-marker-','accept','_registerLegacyDescription','_acceptFormatSuggestionCallbackFactory','FORMAT_REGULAR_COLUMN','commandParams','data-suggestion','FORMAT_REGULAR_ROW','addMarker:suggestion','markerName','createTableWalker','setTableColumnHeader','consume','get','parent','_enableDefaultAttributesIntegration','removeMarker:suggestion','removeClass','has','addClass','FORMAT_HEADER_COLUMN','plugins','cell','*Format:*\x20%0','_handleLegacySuggestions','requires','getCellLocation','nodeAfter','registerDescriptionCallback','mapper','options','headingColumns','unbindElementFromMarkerName','includes','writer','registerAttributeLabel','consumable','toViewElement','FORMAT_HEADER_ROW','registerCustomCallback','locale','afterInit','editor','ck-suggestion-marker--active','_descriptionFactory','type','getSuggestion'];(function(_0x33392e,_0x376ac1){const _0x3106c1=function(_0x43475e){while(--_0x43475e){_0x33392e['push'](_0x33392e['shift']());}};_0x3106c1(++_0x376ac1);}(_0x376a,0x13b));const _0x3106=function(_0x33392e,_0x376ac1){_0x33392e=_0x33392e-0x0;let _0x3106c1=_0x376a[_0x33392e];return _0x3106c1;};import{Plugin as _0x36f143}from'ckeditor5/src/core.js';import _0x4e3ab6 from'./table.js';import{getTranslation as _0x26832f}from'../utils/common-translations.js';export default class St extends _0x36f143{static get[_0x3106('0x35')](){return[_0x4e3ab6];}[_0x3106('0x4')](){const _0x798f28=this['editor'];if(!_0x798f28['plugins'][_0x3106('0x2e')]('TableEditing'))return;const _0x125ebe=_0x798f28[_0x3106('0x3')],_0x361105=_0x798f28[_0x3106('0x31')][_0x3106('0x29')](_0x3106('0x14'));_0x361105['_enableDefaultAttributesIntegration']('setTableRowHeader',[],[_0x3106('0x18')]),_0x361105[_0x3106('0x2b')](_0x3106('0x27'),[],[_0x3106('0x3b')]),_0x361105[_0x3106('0x7')][_0x3106('0x3f')]('headingRows',_0x26832f(_0x125ebe,_0x3106('0x1'))),_0x361105['_descriptionFactory'][_0x3106('0x3f')](_0x3106('0x3b'),_0x26832f(_0x125ebe,_0x3106('0x30'))),this[_0x3106('0x34')]();}[_0x3106('0x34')](){const _0x105f4a=this[_0x3106('0x5')]['plugins']['get'](_0x3106('0x14')),_0x367cc4=this[_0x3106('0x5')]['plugins'][_0x3106('0x29')](_0x3106('0x13')),_0x240c45=this['editor'][_0x3106('0x31')][_0x3106('0x29')](_0x4e3ab6)[_0x3106('0x1f')]();function _0x1dc8aa({showActiveMarker:_0x4d0e7a=!0x0,setDataAttribute:_0x5c907d=!0x0}={}){return(_0x4cc1a3,_0x2b99f3,_0x9afbc3)=>{const {type:_0x44b640,id:_0x438b1b}=_0x105f4a[_0x3106('0x19')](_0x2b99f3[_0x3106('0x25')]),_0x32a2a0=_0x105f4a[_0x3106('0x9')](_0x438b1b),_0x546cdb=_0x32a2a0[_0x3106('0xe')];if('formatBlock'!=_0x32a2a0[_0x3106('0x8')]||!_0x546cdb||_0x3106('0x27')!=_0x546cdb[_0x3106('0x11')])return;if(_0x2b99f3['item'])return void _0x4cc1a3['stop']();if(!_0x9afbc3[_0x3106('0x40')][_0x3106('0x28')](_0x2b99f3[_0x3106('0x1b')],_0x4cc1a3['name']))return;const _0x387fd5=_0x2b99f3['markerRange']['start'][_0x3106('0x37')],_0x1504ae=_0x2b99f3[_0x3106('0x1b')]['end'][_0x3106('0x16')],_0x43894b=_0x387fd5[_0x3106('0x2a')][_0x3106('0x2a')],{column:_0x5374ac}=_0x367cc4[_0x3106('0x36')](_0x387fd5),{column:_0x47842f}=_0x367cc4[_0x3106('0x36')](_0x1504ae);for(let _0x551e58=_0x5374ac;_0x551e58<=_0x47842f;_0x551e58++){const _0x34913f=_0x367cc4[_0x3106('0x26')](_0x43894b,{'column':_0x551e58,'includeAllSlots':!0x1});for(const _0x4f9e94 of _0x34913f){const _0x588a83=_0x4f9e94[_0x3106('0x32')],_0x176b17=_0x9afbc3[_0x3106('0x39')][_0x3106('0x0')](_0x588a83);_0x9afbc3['writer']['addClass'](_0x3106('0x1c')+_0x44b640,_0x176b17),_0x5c907d&&_0x9afbc3['writer']['setAttribute'](_0x3106('0x22'),_0x438b1b,_0x176b17),_0x9afbc3[_0x3106('0x39')][_0x3106('0xf')](_0x176b17,_0x2b99f3[_0x3106('0x25')]),_0x4d0e7a&&(_0x105f4a[_0x3106('0x10')][_0x3106('0x3d')](_0x2b99f3[_0x3106('0x25')])?_0x9afbc3[_0x3106('0x3e')][_0x3106('0x2f')](_0x3106('0x6'),_0x176b17):_0x9afbc3[_0x3106('0x3e')][_0x3106('0x2d')](_0x3106('0x6'),_0x176b17));}}};}_0x105f4a[_0x3106('0x15')][_0x3106('0x2')](_0x3106('0x1a'),_0x3106('0xc'),_0x3106('0x1d'),_0x240c45),_0x105f4a[_0x3106('0x15')][_0x3106('0x2')](_0x3106('0x1a'),'setTableColumnHeader','accept',_0x240c45),this[_0x3106('0x5')][_0x3106('0xb')]['downcastDispatcher']['on']('addMarker:suggestion',_0x1dc8aa(),{'priority':_0x3106('0xd')}),this['editor'][_0x3106('0xe')]['downcastDispatcher']['on'](_0x3106('0x24'),(_0x596755,_0x1b5501,_0xbfcd36)=>{_0xbfcd36[_0x3106('0x3a')][_0x3106('0xa')]&&_0x1dc8aa({'showActiveMarker':!0x1,'setDataAttribute':!0x1})(_0x596755,_0x1b5501,_0xbfcd36);},{'priority':_0x3106('0xd')}),this[_0x3106('0x5')][_0x3106('0xb')]['downcastDispatcher']['on'](_0x3106('0x2c'),(_0x17adea,_0x33c12e,_0x4485ce)=>{const {type:_0x1fd5a3,id:_0x5542aa}=_0x105f4a[_0x3106('0x19')](_0x33c12e[_0x3106('0x25')]),_0x5d8689=_0x105f4a[_0x3106('0x9')](_0x5542aa),_0x414709=_0x5d8689[_0x3106('0xe')];if(_0x3106('0x1a')!=_0x5d8689[_0x3106('0x8')]||!_0x414709||_0x3106('0x27')!=_0x414709[_0x3106('0x11')])return;const _0x3c2a5f=_0x4485ce[_0x3106('0x39')][_0x3106('0x12')](_0x33c12e[_0x3106('0x25')]);if(_0x3c2a5f)for(const _0x350b04 of _0x3c2a5f)_0x4485ce[_0x3106('0x3e')][_0x3106('0x2d')](_0x3106('0x1c')+_0x1fd5a3,_0x350b04),_0x4485ce[_0x3106('0x3e')][_0x3106('0x2d')](_0x3106('0x6'),_0x350b04),_0x4485ce['writer']['removeAttribute'](_0x3106('0x22'),_0x350b04),_0x4485ce[_0x3106('0x39')][_0x3106('0x3c')](_0x350b04,_0x33c12e[_0x3106('0x25')]);},{'priority':_0x3106('0xd')}),this[_0x3106('0x1e')]();}[_0x3106('0x1e')](){const _0x2a55bb=this[_0x3106('0x5')],_0x3eac5d=_0x2a55bb[_0x3106('0x3')];function _0x5a6a6d(_0x377a1a){return{'type':'format','content':_0x26832f(_0x3eac5d,_0x3106('0x33'),_0x377a1a)};}_0x2a55bb[_0x3106('0x31')][_0x3106('0x29')](_0x3106('0x14'))[_0x3106('0x7')][_0x3106('0x38')](_0x19cb58=>{if('formatBlock'!=_0x19cb58[_0x3106('0x8')])return;const {data:_0x10e2b5}=_0x19cb58;if(_0x10e2b5){if('setTableRowHeader'==_0x10e2b5[_0x3106('0x11')]){const _0x400c7d=_0x10e2b5[_0x3106('0x21')][0x0][_0x3106('0x17')];return _0x5a6a6d(_0x26832f(_0x3eac5d,_0x400c7d?_0x3106('0x1'):_0x3106('0x23')));}if(_0x3106('0x27')==_0x10e2b5[_0x3106('0x11')]){const _0x2c859b=_0x10e2b5[_0x3106('0x21')][0x0][_0x3106('0x17')];return _0x5a6a6d(_0x26832f(_0x3eac5d,_0x2c859b?_0x3106('0x30'):_0x3106('0x20')));}}});}}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module track-changes/integrations/tablemergesplit
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import TrackChangesTable from './table';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import TrackChangesTable from './table.js';
|
|
10
10
|
/**
|
|
11
11
|
* Provides track changes plugin integration for {@link module:table/table~Table table feature} merging and splitting cells.
|
|
12
12
|
*/
|