@ckeditor/ckeditor5-track-changes 39.0.2 → 40.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.
Files changed (179) hide show
  1. package/LICENSE.md +3 -3
  2. package/README.md +1 -1
  3. package/build/track-changes.js +2 -2
  4. package/build/translations/ar.js +1 -1
  5. package/build/translations/az.js +1 -1
  6. package/build/translations/bg.js +1 -1
  7. package/build/translations/bn.js +1 -1
  8. package/build/translations/ca.js +1 -1
  9. package/build/translations/cs.js +1 -1
  10. package/build/translations/da.js +1 -1
  11. package/build/translations/de.js +1 -1
  12. package/build/translations/el.js +1 -1
  13. package/build/translations/en-au.js +1 -1
  14. package/build/translations/es.js +1 -1
  15. package/build/translations/et.js +1 -1
  16. package/build/translations/fi.js +1 -1
  17. package/build/translations/fr.js +1 -1
  18. package/build/translations/gl.js +1 -1
  19. package/build/translations/he.js +1 -1
  20. package/build/translations/hi.js +1 -1
  21. package/build/translations/hr.js +1 -1
  22. package/build/translations/hu.js +1 -1
  23. package/build/translations/id.js +1 -1
  24. package/build/translations/it.js +1 -1
  25. package/build/translations/ja.js +1 -1
  26. package/build/translations/ko.js +1 -1
  27. package/build/translations/lt.js +1 -1
  28. package/build/translations/lv.js +1 -1
  29. package/build/translations/ms.js +1 -1
  30. package/build/translations/nl.js +1 -1
  31. package/build/translations/no.js +1 -1
  32. package/build/translations/pl.js +1 -1
  33. package/build/translations/pt-br.js +1 -1
  34. package/build/translations/pt.js +1 -1
  35. package/build/translations/ro.js +1 -1
  36. package/build/translations/ru.js +1 -1
  37. package/build/translations/sk.js +1 -1
  38. package/build/translations/sq.js +1 -1
  39. package/build/translations/sr-latn.js +1 -1
  40. package/build/translations/sr.js +1 -1
  41. package/build/translations/sv.js +1 -1
  42. package/build/translations/th.js +1 -1
  43. package/build/translations/tk.js +1 -1
  44. package/build/translations/tr.js +1 -1
  45. package/build/translations/tt.js +1 -1
  46. package/build/translations/uk.js +1 -1
  47. package/build/translations/ur.js +1 -1
  48. package/build/translations/vi.js +1 -1
  49. package/build/translations/zh-cn.js +1 -1
  50. package/build/translations/zh.js +1 -1
  51. package/lang/contexts.json +20 -1
  52. package/lang/translations/ar.po +76 -0
  53. package/lang/translations/az.po +76 -0
  54. package/lang/translations/bg.po +76 -0
  55. package/lang/translations/bn.po +76 -0
  56. package/lang/translations/ca.po +76 -0
  57. package/lang/translations/cs.po +76 -0
  58. package/lang/translations/da.po +76 -0
  59. package/lang/translations/de.po +76 -0
  60. package/lang/translations/el.po +76 -0
  61. package/lang/translations/en-au.po +76 -0
  62. package/lang/translations/en.po +76 -0
  63. package/lang/translations/es.po +76 -0
  64. package/lang/translations/et.po +76 -0
  65. package/lang/translations/fi.po +76 -0
  66. package/lang/translations/fr.po +76 -0
  67. package/lang/translations/gl.po +76 -0
  68. package/lang/translations/he.po +76 -0
  69. package/lang/translations/hi.po +76 -0
  70. package/lang/translations/hr.po +76 -0
  71. package/lang/translations/hu.po +76 -0
  72. package/lang/translations/id.po +76 -0
  73. package/lang/translations/it.po +76 -0
  74. package/lang/translations/ja.po +76 -0
  75. package/lang/translations/ko.po +76 -0
  76. package/lang/translations/lt.po +76 -0
  77. package/lang/translations/lv.po +76 -0
  78. package/lang/translations/ms.po +76 -0
  79. package/lang/translations/nl.po +76 -0
  80. package/lang/translations/no.po +76 -0
  81. package/lang/translations/pl.po +76 -0
  82. package/lang/translations/pt-br.po +94 -18
  83. package/lang/translations/pt.po +76 -0
  84. package/lang/translations/ro.po +76 -0
  85. package/lang/translations/ru.po +76 -0
  86. package/lang/translations/sk.po +76 -0
  87. package/lang/translations/sq.po +76 -0
  88. package/lang/translations/sr-latn.po +76 -0
  89. package/lang/translations/sr.po +76 -0
  90. package/lang/translations/sv.po +76 -0
  91. package/lang/translations/th.po +76 -0
  92. package/lang/translations/tk.po +76 -0
  93. package/lang/translations/tr.po +76 -0
  94. package/lang/translations/tt.po +76 -0
  95. package/lang/translations/uk.po +76 -0
  96. package/lang/translations/ur.po +76 -0
  97. package/lang/translations/vi.po +76 -0
  98. package/lang/translations/zh-cn.po +76 -0
  99. package/lang/translations/zh.po +76 -0
  100. package/package.json +3 -3
  101. package/src/commands/acceptsuggestioncommand.js +1 -1
  102. package/src/commands/discardsuggestioncommand.js +1 -1
  103. package/src/commands/executeonallsuggestionscommand.js +1 -1
  104. package/src/commands/executeonselectedsuggestionscommand.js +1 -1
  105. package/src/commands/trackchangescommand.js +1 -1
  106. package/src/index.d.ts +1 -1
  107. package/src/integrations/aiassistant.d.ts +17 -0
  108. package/src/integrations/aiassistant.js +23 -0
  109. package/src/integrations/alignment.js +1 -1
  110. package/src/integrations/basicstyles.js +1 -1
  111. package/src/integrations/blockquote.js +1 -1
  112. package/src/integrations/ckbox.js +1 -1
  113. package/src/integrations/codeblock.js +1 -1
  114. package/src/integrations/comments.js +1 -1
  115. package/src/integrations/deletecommand.js +1 -1
  116. package/src/integrations/documentlist.js +1 -1
  117. package/src/integrations/documentlistproperties.js +1 -1
  118. package/src/integrations/entercommand.js +1 -1
  119. package/src/integrations/findandreplace.d.ts +1 -1
  120. package/src/integrations/findandreplace.js +1 -1
  121. package/src/integrations/font.js +1 -1
  122. package/src/integrations/formatpainter.js +1 -1
  123. package/src/integrations/heading.js +1 -1
  124. package/src/integrations/highlight.js +1 -1
  125. package/src/integrations/horizontalline.js +1 -1
  126. package/src/integrations/htmlembed.js +1 -1
  127. package/src/integrations/image.js +1 -1
  128. package/src/integrations/imagereplace.d.ts +0 -6
  129. package/src/integrations/imagereplace.js +1 -1
  130. package/src/integrations/imagestyle.d.ts +17 -0
  131. package/src/integrations/imagestyle.js +23 -0
  132. package/src/integrations/importword.js +1 -1
  133. package/src/integrations/indent.js +1 -1
  134. package/src/integrations/inputcommand.js +1 -1
  135. package/src/integrations/link.js +1 -1
  136. package/src/integrations/list.js +1 -1
  137. package/src/integrations/listproperties.js +1 -1
  138. package/src/integrations/mediaembed.js +1 -1
  139. package/src/integrations/mention.js +1 -1
  140. package/src/integrations/pagebreak.js +1 -1
  141. package/src/integrations/paragraph.js +1 -1
  142. package/src/integrations/removeformat.js +1 -1
  143. package/src/integrations/restrictededitingmode.js +1 -1
  144. package/src/integrations/shiftentercommand.js +1 -1
  145. package/src/integrations/standardeditingmode.js +1 -1
  146. package/src/integrations/style.d.ts +0 -1
  147. package/src/integrations/style.js +1 -1
  148. package/src/integrations/table.js +1 -1
  149. package/src/integrations/tablecaption.js +1 -1
  150. package/src/integrations/tableclipboard.js +1 -1
  151. package/src/integrations/tablecolumnresize.js +1 -1
  152. package/src/integrations/tableheadings.js +1 -1
  153. package/src/integrations/tablemergesplit.js +1 -1
  154. package/src/integrations/tableofcontents.js +1 -1
  155. package/src/integrations/tableproperties.js +1 -1
  156. package/src/integrations/template.js +1 -1
  157. package/src/integrations/title.js +1 -1
  158. package/src/integrations/undo.js +1 -1
  159. package/src/integrations/utils.js +1 -1
  160. package/src/suggestion.d.ts +26 -11
  161. package/src/suggestion.js +1 -1
  162. package/src/suggestiondescriptionfactory.d.ts +25 -5
  163. package/src/suggestiondescriptionfactory.js +1 -1
  164. package/src/trackchanges.d.ts +5 -69
  165. package/src/trackchanges.js +1 -1
  166. package/src/trackchangesconfig.d.ts +22 -19
  167. package/src/trackchangesdata.js +1 -1
  168. package/src/trackchangesediting.d.ts +59 -2
  169. package/src/trackchangesediting.js +1 -1
  170. package/src/trackchangesui.js +1 -1
  171. package/src/ui/suggestioncontroller.js +1 -1
  172. package/src/ui/view/basesuggestionthreadview.js +1 -1
  173. package/src/ui/view/suggestionthreadview.d.ts +1 -1
  174. package/src/ui/view/suggestionthreadview.js +1 -1
  175. package/src/utils/common-translations.js +1 -1
  176. package/src/utils/utils.js +1 -1
  177. package/theme/icons/track-changes-accept.svg +1 -1
  178. package/theme/icons/track-changes-discard.svg +1 -1
  179. package/theme/icons/track-changes.svg +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xf0b2=['_getSuggestion','tableCellProperties','commandParams','registerCustomCallback','document','*Format:*\x20change\x20table\x20cell\x20properties','afterInit','locale','handleDiscardAction','tableCellVerticalAlignment','setAttribute','tableCellPadding','enableCommand','data','nodeAfter','change','findAncestor','accept','tableWidth','subType','tableCellHeight','plugins','_descriptionFactory','tableBorderStyle','tableCellBorderWidth','*Format:*\x20change\x20table\x20properties','model','tableAlignment','has','tableCellBorderStyle','_handlePropertyChange','tableBackgroundColor','tableBorderWidth','getSuggestionCallback','tableProperties','discard','tableCellWidth','getContainedElement','TableUtils','TablePropertiesEditing','formatBlock','removeAttribute','editor','get','batch','pluginName','handleSuggestionDescription','_suggestionFactory','enqueueChange','selection','getFirstPosition','tableCellBackgroundColor','TrackChangesEditing','join','TrackChangesTableProperties','table'];(function(_0x32c8f7,_0xf0b233){const _0x4aadca=function(_0x546365){while(--_0x546365){_0x32c8f7['push'](_0x32c8f7['shift']());}};_0x4aadca(++_0xf0b233);}(_0xf0b2,0x139));const _0x4aad=function(_0x32c8f7,_0xf0b233){_0x32c8f7=_0x32c8f7-0x0;let _0x4aadca=_0xf0b2[_0x32c8f7];return _0x4aadca;};import{Plugin as _0x305669}from'ckeditor5/src/core';import{getTranslation as _0x678263}from'../utils/common-translations';export default class Ct extends _0x305669{constructor(_0x4f4fbd){super(_0x4f4fbd),this['tableProperties']=['tableBorderColor',_0x4aad('0x2e'),_0x4aad('0x37'),_0x4aad('0x32'),_0x4aad('0x29'),'tableHeight',_0x4aad('0x36')],this[_0x4aad('0x18')]=['tableCellBorderColor',_0x4aad('0x34'),_0x4aad('0x2f'),_0x4aad('0x22'),_0x4aad('0x3'),_0x4aad('0x2b'),_0x4aad('0x12'),'tableCellHorizontalAlignment',_0x4aad('0x20')];}static get[_0x4aad('0xc')](){return _0x4aad('0x15');}[_0x4aad('0x1d')](){const _0x430211=this[_0x4aad('0x9')][_0x4aad('0x2c')]['get'](_0x4aad('0x13'));if(this[_0x4aad('0x9')][_0x4aad('0x2c')][_0x4aad('0x33')](_0x4aad('0x6'))){for(const _0x59343a of this[_0x4aad('0x1')])_0x430211[_0x4aad('0x23')](_0x59343a,(_0x4d7d35,_0xfc0243)=>{const _0x5d0868=this[_0x4aad('0x9')][_0x4aad('0x31')][_0x4aad('0x1b')][_0x4aad('0x10')][_0x4aad('0x11')]()[_0x4aad('0x27')](_0x4aad('0x16'));this[_0x4aad('0x35')](_0x59343a,[_0x5d0868],this['tableProperties'],_0x4aad('0x1'),_0x4d7d35,_0xfc0243);});_0x430211['_suggestionFactory'][_0x4aad('0x1a')](_0x4aad('0x7'),_0x4aad('0x1'),_0x4aad('0x28'),_0x430211['_suggestionFactory'][_0x4aad('0x0')]('formatBlock',null,'discard')),_0x430211[_0x4aad('0xe')][_0x4aad('0x1a')](_0x4aad('0x7'),_0x4aad('0x1'),_0x4aad('0x2'),(_0x136f31,_0x34597b)=>this[_0x4aad('0x1f')](this[_0x4aad('0x1')],_0x136f31,_0x34597b)),_0x430211[_0x4aad('0xe')][_0x4aad('0x1a')]('formatBlock',_0x4aad('0x1'),_0x4aad('0x14'),()=>!0x1);}if(this[_0x4aad('0x9')][_0x4aad('0x2c')][_0x4aad('0x33')]('TableCellPropertiesEditing')){for(const _0x5f2646 of this['tableCellProperties'])_0x430211[_0x4aad('0x23')](_0x5f2646,(_0x10c7f7,_0xce761a)=>{const _0x55e792=this[_0x4aad('0x9')][_0x4aad('0x2c')][_0x4aad('0xa')](_0x4aad('0x5'))['getSelectionAffectedTableCells'](this['editor'][_0x4aad('0x31')][_0x4aad('0x1b')]['selection']);this[_0x4aad('0x35')](_0x5f2646,_0x55e792,this[_0x4aad('0x18')],_0x4aad('0x18'),_0x10c7f7,_0xce761a);});_0x430211['_suggestionFactory'][_0x4aad('0x1a')](_0x4aad('0x7'),_0x4aad('0x18'),'accept',_0x430211[_0x4aad('0xe')][_0x4aad('0x0')](_0x4aad('0x7'),null,_0x4aad('0x2'))),_0x430211[_0x4aad('0xe')][_0x4aad('0x1a')]('formatBlock',_0x4aad('0x18'),_0x4aad('0x2'),(_0x2df51f,_0x552f2b)=>this[_0x4aad('0x1f')](this[_0x4aad('0x18')],_0x2df51f,_0x552f2b)),_0x430211[_0x4aad('0xe')][_0x4aad('0x1a')](_0x4aad('0x7'),_0x4aad('0x18'),'join',()=>!0x1);}_0x430211[_0x4aad('0x2d')]['registerDescriptionCallback'](_0xa488a6=>this['handleSuggestionDescription'](_0xa488a6));}[_0x4aad('0x35')](_0x497d61,_0x3f06cd,_0x245f73,_0x4e474d,_0x189a76,_0x2e5d4f){const _0x29737f=this[_0x4aad('0x9')]['plugins'][_0x4aad('0xa')](_0x4aad('0x13'));this['editor'][_0x4aad('0x31')][_0x4aad('0xf')](_0x2e5d4f[_0x4aad('0xb')],()=>{for(const _0x5bebd2 of _0x3f06cd){if(this[_0x4aad('0x17')](_0x5bebd2,_0x4e474d))_0x189a76(_0x2e5d4f);else{const _0x355da2={};for(const _0x2344d9 of _0x245f73){const _0x29df9f=_0x5bebd2['getAttribute'](_0x2344d9);void 0x0!==_0x29df9f&&(_0x355da2[_0x2344d9]=_0x29df9f);}_0x189a76(_0x2e5d4f),_0x29737f['markBlockFormat'](_0x5bebd2,{'commandParams':[_0x355da2]},[],_0x4e474d);}}});}[_0x4aad('0x1f')](_0x169122,_0x555e8d,_0x38d78e){const _0x4911f3=_0x555e8d[0x0]['start'][_0x4aad('0x25')],_0x5dcf6d=_0x38d78e[_0x4aad('0x19')][0x0];this[_0x4aad('0x9')]['model'][_0x4aad('0x26')](_0x52fc80=>{for(const _0x99aac5 of _0x169122)void 0x0!==_0x5dcf6d[_0x99aac5]?_0x52fc80[_0x4aad('0x21')](_0x99aac5,_0x5dcf6d[_0x99aac5],_0x4911f3):_0x52fc80[_0x4aad('0x8')](_0x99aac5,_0x4911f3);});}[_0x4aad('0xd')](_0x1fe363){if(_0x1fe363[_0x4aad('0x24')])switch(_0x1fe363[_0x4aad('0x2a')]){case _0x4aad('0x1'):return{'type':'format','content':_0x678263(this[_0x4aad('0x9')][_0x4aad('0x1e')],_0x4aad('0x30'))};case _0x4aad('0x18'):return{'type':'format','content':_0x678263(this[_0x4aad('0x9')][_0x4aad('0x1e')],_0x4aad('0x1c'))};}}[_0x4aad('0x17')](_0x496426,_0x235484){const _0x28013d=this[_0x4aad('0x9')][_0x4aad('0x2c')][_0x4aad('0xa')](_0x4aad('0x13'));for(const _0x5242e8 of _0x28013d['getSuggestions']({'skipNotAttached':!0x0})){const _0xbeef78=_0x5242e8[_0x4aad('0x4')]();if(_0x5242e8[_0x4aad('0x2a')]===_0x235484&&_0xbeef78===_0x496426)return _0x5242e8;}return null;}}
23
+ const _0x158f=['getFirstPosition','registerDescriptionCallback','change','get','tableBorderStyle','commandParams','getSuggestionCallback','tableBorderWidth','*Format:*\x20change\x20table\x20properties','_handlePropertyChange','findAncestor','handleSuggestionDescription','tableCellVerticalAlignment','_getSuggestion','getAttribute','start','tableCellBorderStyle','getSelectionAffectedTableCells','format','tableCellWidth','plugins','tableCellBorderColor','discard','nodeAfter','tableHeight','tableBorderColor','tableCellBorderWidth','setAttribute','markBlockFormat','subType','enqueueChange','TablePropertiesEditing','table','model','document','getSuggestions','data','editor','formatBlock','_suggestionFactory','tableBackgroundColor','getContainedElement','registerCustomCallback','accept','TrackChangesEditing','tableCellBackgroundColor','tableAlignment','selection','tableCellHeight','handleDiscardAction','tableCellProperties','TrackChangesTableProperties','*Format:*\x20change\x20table\x20cell\x20properties','tableWidth','tableProperties','pluginName','_descriptionFactory','tableCellPadding'];(function(_0x2a9d3d,_0x158f0a){const _0xf30c6b=function(_0xe87d90){while(--_0xe87d90){_0x2a9d3d['push'](_0x2a9d3d['shift']());}};_0xf30c6b(++_0x158f0a);}(_0x158f,0x117));const _0xf30c=function(_0x2a9d3d,_0x158f0a){_0x2a9d3d=_0x2a9d3d-0x0;let _0xf30c6b=_0x158f[_0x2a9d3d];return _0xf30c6b;};import{Plugin as _0x5ca2df}from'ckeditor5/src/core';import{getTranslation as _0x827c9}from'../utils/common-translations';export default class Mt extends _0x5ca2df{constructor(_0x3c0f0e){super(_0x3c0f0e),this[_0xf30c('0x7')]=[_0xf30c('0x24'),_0xf30c('0xf'),_0xf30c('0x12'),_0xf30c('0x39'),_0xf30c('0x6'),_0xf30c('0x23'),_0xf30c('0x33')],this[_0xf30c('0x3')]=[_0xf30c('0x20'),_0xf30c('0x1b'),_0xf30c('0x25'),_0xf30c('0xa'),_0xf30c('0x1e'),_0xf30c('0x1'),_0xf30c('0x38'),'tableCellHorizontalAlignment',_0xf30c('0x17')];}static get[_0xf30c('0x8')](){return _0xf30c('0x4');}['afterInit'](){const _0x3ee3e1=this[_0xf30c('0x30')]['plugins']['get'](_0xf30c('0x37'));if(this[_0xf30c('0x30')][_0xf30c('0x1f')]['has'](_0xf30c('0x2a'))){for(const _0x233517 of this[_0xf30c('0x7')])_0x3ee3e1['enableCommand'](_0x233517,(_0x7259e3,_0x340433)=>{const _0x45d055=this['editor'][_0xf30c('0x2c')][_0xf30c('0x2d')][_0xf30c('0x0')][_0xf30c('0xb')]()[_0xf30c('0x15')](_0xf30c('0x2b'));this[_0xf30c('0x14')](_0x233517,[_0x45d055],this['tableProperties'],_0xf30c('0x7'),_0x7259e3,_0x340433);});_0x3ee3e1[_0xf30c('0x32')][_0xf30c('0x35')](_0xf30c('0x31'),_0xf30c('0x7'),_0xf30c('0x36'),_0x3ee3e1[_0xf30c('0x32')][_0xf30c('0x11')]('formatBlock',null,_0xf30c('0x21'))),_0x3ee3e1[_0xf30c('0x32')][_0xf30c('0x35')](_0xf30c('0x31'),_0xf30c('0x7'),_0xf30c('0x21'),(_0x1d8bb2,_0x5c9f7e)=>this['handleDiscardAction'](this[_0xf30c('0x7')],_0x1d8bb2,_0x5c9f7e)),_0x3ee3e1[_0xf30c('0x32')][_0xf30c('0x35')](_0xf30c('0x31'),'tableProperties','join',()=>!0x1);}if(this[_0xf30c('0x30')]['plugins']['has']('TableCellPropertiesEditing')){for(const _0x48d5a8 of this[_0xf30c('0x3')])_0x3ee3e1['enableCommand'](_0x48d5a8,(_0x179feb,_0x935e0e)=>{const _0x3bfed0=this['editor'][_0xf30c('0x1f')][_0xf30c('0xe')]('TableUtils')[_0xf30c('0x1c')](this[_0xf30c('0x30')][_0xf30c('0x2c')]['document'][_0xf30c('0x0')]);this[_0xf30c('0x14')](_0x48d5a8,_0x3bfed0,this[_0xf30c('0x3')],'tableCellProperties',_0x179feb,_0x935e0e);});_0x3ee3e1['_suggestionFactory'][_0xf30c('0x35')](_0xf30c('0x31'),_0xf30c('0x3'),_0xf30c('0x36'),_0x3ee3e1[_0xf30c('0x32')]['getSuggestionCallback'](_0xf30c('0x31'),null,_0xf30c('0x21'))),_0x3ee3e1[_0xf30c('0x32')][_0xf30c('0x35')](_0xf30c('0x31'),_0xf30c('0x3'),_0xf30c('0x21'),(_0x41a8df,_0x4bc742)=>this['handleDiscardAction'](this['tableCellProperties'],_0x41a8df,_0x4bc742)),_0x3ee3e1[_0xf30c('0x32')][_0xf30c('0x35')]('formatBlock',_0xf30c('0x3'),'join',()=>!0x1);}_0x3ee3e1[_0xf30c('0x9')][_0xf30c('0xc')](_0x5320f3=>this[_0xf30c('0x16')](_0x5320f3));}[_0xf30c('0x14')](_0xf1448f,_0x2e5e95,_0x46286c,_0x1aa1ce,_0x370ca1,_0x44305c){const _0x4a20d8=this[_0xf30c('0x30')][_0xf30c('0x1f')][_0xf30c('0xe')](_0xf30c('0x37'));this[_0xf30c('0x30')][_0xf30c('0x2c')][_0xf30c('0x29')](_0x44305c['batch'],()=>{for(const _0xf9ed78 of _0x2e5e95){if(this[_0xf30c('0x18')](_0xf9ed78,_0x1aa1ce))_0x370ca1(_0x44305c);else{const _0x2b06a3={};for(const _0x2402b0 of _0x46286c){const _0xb7ecc2=_0xf9ed78[_0xf30c('0x19')](_0x2402b0);void 0x0!==_0xb7ecc2&&(_0x2b06a3[_0x2402b0]=_0xb7ecc2);}_0x370ca1(_0x44305c),_0x4a20d8[_0xf30c('0x27')](_0xf9ed78,{'commandParams':[_0x2b06a3]},[],_0x1aa1ce);}}});}[_0xf30c('0x2')](_0x2c8240,_0x4b51b6,_0x320ea9){const _0x1d1a16=_0x4b51b6[0x0][_0xf30c('0x1a')][_0xf30c('0x22')],_0xcc878=_0x320ea9[_0xf30c('0x10')][0x0];this['editor'][_0xf30c('0x2c')][_0xf30c('0xd')](_0x545ec6=>{for(const _0x4c8e56 of _0x2c8240)void 0x0!==_0xcc878[_0x4c8e56]?_0x545ec6[_0xf30c('0x26')](_0x4c8e56,_0xcc878[_0x4c8e56],_0x1d1a16):_0x545ec6['removeAttribute'](_0x4c8e56,_0x1d1a16);});}[_0xf30c('0x16')](_0x502b50){if(_0x502b50[_0xf30c('0x2f')])switch(_0x502b50[_0xf30c('0x28')]){case _0xf30c('0x7'):return{'type':_0xf30c('0x1d'),'content':_0x827c9(this['editor']['locale'],_0xf30c('0x13'))};case'tableCellProperties':return{'type':_0xf30c('0x1d'),'content':_0x827c9(this[_0xf30c('0x30')]['locale'],_0xf30c('0x5'))};}}[_0xf30c('0x18')](_0x415c82,_0x4ef727){const _0x3371c6=this[_0xf30c('0x30')][_0xf30c('0x1f')][_0xf30c('0xe')](_0xf30c('0x37'));for(const _0x57ffc7 of _0x3371c6[_0xf30c('0x2e')]({'skipNotAttached':!0x0})){const _0x27d790=_0x57ffc7[_0xf30c('0x34')]();if(_0x57ffc7[_0xf30c('0x28')]===_0x4ef727&&_0x27d790===_0x415c82)return _0x57ffc7;}return null;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4657=['TrackChangesEditing','has','editor','plugins','afterInit','Template','insertTemplate'];(function(_0x114d6a,_0x46573e){const _0x37d67b=function(_0x529d09){while(--_0x529d09){_0x114d6a['push'](_0x114d6a['shift']());}};_0x37d67b(++_0x46573e);}(_0x4657,0xac));const _0x37d6=function(_0x114d6a,_0x46573e){_0x114d6a=_0x114d6a-0x0;let _0x37d67b=_0x4657[_0x114d6a];return _0x37d67b;};import{Plugin as _0x26b39b}from'ckeditor5/src/core';export default class yt extends _0x26b39b{[_0x37d6('0x0')](){const _0x2f911f=this[_0x37d6('0x5')];_0x2f911f['plugins'][_0x37d6('0x4')](_0x37d6('0x1'))&&_0x2f911f[_0x37d6('0x6')]['get'](_0x37d6('0x3'))['enableCommand'](_0x37d6('0x2'));}}
23
+ const _0x533a=['editor','Template','plugins','TrackChangesEditing','afterInit','has','insertTemplate'];(function(_0x5cbdb0,_0x533a73){const _0x1c08e1=function(_0x4662fc){while(--_0x4662fc){_0x5cbdb0['push'](_0x5cbdb0['shift']());}};_0x1c08e1(++_0x533a73);}(_0x533a,0x1e9));const _0x1c08=function(_0x5cbdb0,_0x533a73){_0x5cbdb0=_0x5cbdb0-0x0;let _0x1c08e1=_0x533a[_0x5cbdb0];return _0x1c08e1;};import{Plugin as _0x42402b}from'ckeditor5/src/core';export default class vt extends _0x42402b{[_0x1c08('0x5')](){const _0x546c30=this[_0x1c08('0x1')];_0x546c30[_0x1c08('0x3')][_0x1c08('0x6')](_0x1c08('0x2'))&&_0x546c30[_0x1c08('0x3')]['get'](_0x1c08('0x4'))['enableCommand'](_0x1c08('0x0'));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3d87=['document','registerElementLabel','locale','forward','has','title-content','ELEMENT_TITLE','TrackChangesEditing','nodeBefore','removeMarker','isTouching','from','Title','registerPostFixer','_descriptionFactory','newRange','editor','isCollapsed','differ','end','isEqual','get','model','afterInit','element','suggestion','start','plugins'];(function(_0x3fcf64,_0x3d8708){const _0x56dcc=function(_0x4ebb49){while(--_0x4ebb49){_0x3fcf64['push'](_0x3fcf64['shift']());}};_0x56dcc(++_0x3d8708);}(_0x3d87,0x170));const _0x56dc=function(_0x3fcf64,_0x3d8708){_0x3fcf64=_0x3fcf64-0x0;let _0x56dcc=_0x3d87[_0x3fcf64];return _0x56dcc;};import{Plugin as _0x2fcf20}from'ckeditor5/src/core';import{getTranslation as _0x1d6015}from'../utils/common-translations';export default class St extends _0x2fcf20{[_0x56dc('0x13')](){const _0x2d262e=this[_0x56dc('0xc')];if(!_0x2d262e[_0x56dc('0x17')][_0x56dc('0x0')](_0x56dc('0x8')))return;const _0x4477fc=_0x2d262e[_0x56dc('0x17')][_0x56dc('0x11')](_0x56dc('0x3'));_0x4477fc[_0x56dc('0xa')][_0x56dc('0x19')](_0x56dc('0x1'),()=>_0x1d6015(_0x2d262e[_0x56dc('0x1a')],_0x56dc('0x2'))),_0x2d262e[_0x56dc('0x12')]['document'][_0x56dc('0x9')](_0x1504f8=>{let _0x2c8eb1=!0x1;const _0xaba6a0=Array[_0x56dc('0x7')](_0x2d262e[_0x56dc('0x12')][_0x56dc('0x18')][_0x56dc('0xe')]['getChangedMarkers']());for(const {name:_0x5a3525,data:_0x58f086}of _0xaba6a0){const {group:_0x591c84}=_0x4477fc['_splitMarkerName'](_0x5a3525);if(_0x56dc('0x15')!==_0x591c84||!_0x58f086['newRange'])continue;const _0x22e7cd=_0x58f086[_0x56dc('0xb')],_0x336648=_0x22e7cd[_0x56dc('0xf')][_0x56dc('0x4')];if(!_0x336648||!_0x336648['is'](_0x56dc('0x14'),_0x56dc('0x1')))continue;if(!_0x22e7cd[_0x56dc('0x16')][_0x56dc('0x6')](_0x22e7cd['end']))continue;const _0xdce3a8=_0x2d262e[_0x56dc('0x12')]['schema']['getNearestSelectionRange'](_0x22e7cd['end'],_0x56dc('0x1b'));if(_0xdce3a8&&_0xdce3a8[_0x56dc('0xd')]){const _0x37fba5=_0x1504f8['createRange'](_0x22e7cd['start'],_0xdce3a8['start']);_0x37fba5[_0x56dc('0x10')](_0x22e7cd)||(_0x1504f8['updateMarker'](_0x5a3525,{'range':_0x37fba5}),_0x2c8eb1=!0x0);}_0x2c8eb1||(_0x1504f8[_0x56dc('0x5')](_0x5a3525),_0x2c8eb1=!0x0);}return _0x2c8eb1;});}}
23
+ const _0x2f51=['locale','afterInit','plugins','editor','schema','get','isTouching','getChangedMarkers','document','element','title-content','end','from','updateMarker','getNearestSelectionRange','start','model','ELEMENT_TITLE','isCollapsed','removeMarker','nodeBefore'];(function(_0x3eb0e6,_0x2f5165){const _0x7ee46f=function(_0x5df858){while(--_0x5df858){_0x3eb0e6['push'](_0x3eb0e6['shift']());}};_0x7ee46f(++_0x2f5165);}(_0x2f51,0x16b));const _0x7ee4=function(_0x3eb0e6,_0x2f5165){_0x3eb0e6=_0x3eb0e6-0x0;let _0x7ee46f=_0x2f51[_0x3eb0e6];return _0x7ee46f;};import{Plugin as _0x4ea089}from'ckeditor5/src/core';import{getTranslation as _0x2d599b}from'../utils/common-translations';export default class Ct extends _0x4ea089{[_0x7ee4('0x10')](){const _0xab3a30=this[_0x7ee4('0x12')];if(!_0xab3a30[_0x7ee4('0x11')]['has']('Title'))return;const _0x50ec56=_0xab3a30[_0x7ee4('0x11')][_0x7ee4('0x14')]('TrackChangesEditing');_0x50ec56['_descriptionFactory']['registerElementLabel'](_0x7ee4('0x4'),()=>_0x2d599b(_0xab3a30[_0x7ee4('0xf')],_0x7ee4('0xb'))),_0xab3a30[_0x7ee4('0xa')]['document']['registerPostFixer'](_0x1dfabe=>{let _0x2c0c11=!0x1;const _0x2cae20=Array[_0x7ee4('0x6')](_0xab3a30[_0x7ee4('0xa')][_0x7ee4('0x2')]['differ'][_0x7ee4('0x1')]());for(const {name:_0x1142ae,data:_0x83abc8}of _0x2cae20){const {group:_0x39d16d}=_0x50ec56['_splitMarkerName'](_0x1142ae);if('suggestion'!==_0x39d16d||!_0x83abc8['newRange'])continue;const _0xa2b14e=_0x83abc8['newRange'],_0x4fe25f=_0xa2b14e[_0x7ee4('0x5')][_0x7ee4('0xe')];if(!_0x4fe25f||!_0x4fe25f['is'](_0x7ee4('0x3'),_0x7ee4('0x4')))continue;if(!_0xa2b14e[_0x7ee4('0x9')][_0x7ee4('0x0')](_0xa2b14e[_0x7ee4('0x5')]))continue;const _0x7d1f40=_0xab3a30[_0x7ee4('0xa')][_0x7ee4('0x13')][_0x7ee4('0x8')](_0xa2b14e[_0x7ee4('0x5')],'forward');if(_0x7d1f40&&_0x7d1f40[_0x7ee4('0xc')]){const _0x4cc846=_0x1dfabe['createRange'](_0xa2b14e['start'],_0x7d1f40[_0x7ee4('0x9')]);_0x4cc846['isEqual'](_0xa2b14e)||(_0x1dfabe[_0x7ee4('0x7')](_0x1142ae,{'range':_0x4cc846}),_0x2c0c11=!0x0);}_0x2c0c11||(_0x1dfabe[_0x7ee4('0xd')](_0x1142ae),_0x2c0c11=!0x0);}return _0x2c0c11;});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1ebd=['TrackChangesEditing','UndoEditing','editor','redo','plugins','afterInit','get','undo'];(function(_0x313d30,_0x1ebd47){const _0x24a89f=function(_0x2665d2){while(--_0x2665d2){_0x313d30['push'](_0x313d30['shift']());}};_0x24a89f(++_0x1ebd47);}(_0x1ebd,0x133));const _0x24a8=function(_0x313d30,_0x1ebd47){_0x313d30=_0x313d30-0x0;let _0x24a89f=_0x1ebd[_0x313d30];return _0x24a89f;};import{Plugin as _0x344ed2}from'ckeditor5/src/core';export default class It extends _0x344ed2{[_0x24a8('0x2')](){const _0x3000d5=this[_0x24a8('0x7')],_0x34e8b2=_0x3000d5['plugins'][_0x24a8('0x3')](_0x24a8('0x5'));_0x3000d5[_0x24a8('0x1')]['has'](_0x24a8('0x6'))&&(_0x34e8b2['enableCommand'](_0x24a8('0x4')),_0x34e8b2['enableCommand'](_0x24a8('0x0')));}}
23
+ const _0x19b9=['TrackChangesEditing','enableCommand','UndoEditing','plugins','afterInit','undo','editor'];(function(_0xbbc9e5,_0x19b9d8){const _0x2ad167=function(_0x1dd8b7){while(--_0x1dd8b7){_0xbbc9e5['push'](_0xbbc9e5['shift']());}};_0x2ad167(++_0x19b9d8);}(_0x19b9,0x95));const _0x2ad1=function(_0xbbc9e5,_0x19b9d8){_0xbbc9e5=_0xbbc9e5-0x0;let _0x2ad167=_0x19b9[_0xbbc9e5];return _0x2ad167;};import{Plugin as _0xdc75af}from'ckeditor5/src/core';export default class Dt extends _0xdc75af{[_0x2ad1('0x2')](){const _0xc66ae3=this[_0x2ad1('0x4')],_0x2291b8=_0xc66ae3[_0x2ad1('0x1')]['get'](_0x2ad1('0x5'));_0xc66ae3[_0x2ad1('0x1')]['has'](_0x2ad1('0x0'))&&(_0x2291b8[_0x2ad1('0x6')](_0x2ad1('0x3')),_0x2291b8[_0x2ad1('0x6')]('redo'));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x9f27=['listIndent','getItems','get','includes','isBlock','markerName','isAtEnd','start','ck-suggestion-marker--active','listItem','span','push','markerRange','nextSibling','item','getCustomProperty','parent','type','name','toViewElement','createUIElement','element','getAttribute','ck-suggestion-marker-','toViewPosition','model','consumable','getWalker','createRangeOn','elementEnd','test','mapper','TrackChangesEditing','isLimit','plugins','previousPosition','addHighlight','writer'];(function(_0x2d6408,_0x9f276d){const _0xcd7ee=function(_0x45c551){while(--_0x45c551){_0x2d6408['push'](_0x2d6408['shift']());}};_0xcd7ee(++_0x9f276d);}(_0x9f27,0x122));const _0xcd7e=function(_0x2d6408,_0x9f276d){_0x2d6408=_0x2d6408-0x0;let _0xcd7ee=_0x9f27[_0x2d6408];return _0xcd7ee;};export function getRangesWithAttribute(_0x528b30,_0xb1d76f,_0x3da9ac){const _0xa61494=[];for(const _0x5edac6 of _0xb1d76f[_0xcd7e('0xf')]())_0x5edac6['hasAttribute'](_0x528b30)&&_0xa61494['push'](_0x3da9ac[_0xcd7e('0x4')](_0x5edac6));return _0xa61494;}export function getElementsAffectedByListItemRename(_0x5c3d39){const _0x35a013=[];if(_0x5c3d39['is'](_0xcd7e('0x23'),_0xcd7e('0x17'))){let _0x2df31d=_0x5c3d39[_0xcd7e('0x1b')];for(;_0x2df31d&&_0x2df31d['is']('element',_0xcd7e('0x17'))&&_0x2df31d[_0xcd7e('0x24')](_0xcd7e('0xe'))>0x0;)_0x35a013[_0xcd7e('0x19')](_0x2df31d),_0x2df31d=_0x2df31d[_0xcd7e('0x1b')];}return _0x35a013;}export function downcastSplitMergeMarker(_0x360a8e,_0x5a4da7,{showActiveMarker:_0x17feea=!0x0}={}){const _0x2fcb06=_0x360a8e[_0xcd7e('0xa')][_0xcd7e('0x10')](_0xcd7e('0x8'));return(_0x1e24ff,_0x3d0d77,_0x58b914)=>{if(!_0x58b914[_0xcd7e('0x2')][_0xcd7e('0x6')](_0x3d0d77[_0xcd7e('0x1a')],_0x1e24ff[_0xcd7e('0x20')]))return;const _0x33e7a0=_0x3d0d77['markerRange'][_0xcd7e('0x3')](),_0x56a5ca=_0x3d0d77[_0xcd7e('0x1a')][_0xcd7e('0x15')],_0x387a13=_0x360a8e[_0xcd7e('0x1')]['schema'];let _0x4e443c=null,_0x472367=null,_0xb47ae9=!0x1,_0x43be66=!0x1;for(const _0x4d516e of _0x33e7a0){const _0x1c6712=_0x4d516e[_0xcd7e('0x1c')];_0xb47ae9=_0xb47ae9||_0x387a13['isContent'](_0x1c6712);const _0x111194=_0x58b914['mapper'][_0xcd7e('0x21')](_0x1c6712);if(_0x111194&&_0x111194[_0xcd7e('0x1d')](_0xcd7e('0xc')))return;_0xcd7e('0x5')==_0x4d516e[_0xcd7e('0x1f')]&&(_0x387a13[_0xcd7e('0x12')](_0x1c6712)&&!_0x387a13[_0xcd7e('0x9')](_0x1c6712)&&(_0x1c6712['nextSibling']||_0x56a5ca[_0xcd7e('0x14')]?_0x4e443c&&_0x4e443c[_0xcd7e('0x1e')]==_0x1c6712||(_0x4e443c=_0x1c6712,_0x1dc389(_0x4d516e[_0xcd7e('0xb')]),_0x43be66=!0x0):_0x472367=_0x472367||_0x4d516e[_0xcd7e('0xb')]));}function _0x1dc389(_0x2f894e){const _0x5defb3=_0x58b914[_0xcd7e('0xd')][_0xcd7e('0x22')](_0xcd7e('0x18'),{'class':_0xcd7e('0x25')+_0x5a4da7}),_0x4403f9=_0x58b914[_0xcd7e('0x7')][_0xcd7e('0x0')](_0x2f894e);_0x17feea&&_0x2fcb06['activeMarkers'][_0xcd7e('0x11')](_0x3d0d77[_0xcd7e('0x13')])&&_0x58b914[_0xcd7e('0xd')]['addClass'](_0xcd7e('0x16'),_0x5defb3),_0x58b914['writer']['insert'](_0x4403f9,_0x5defb3),_0x58b914[_0xcd7e('0x7')]['bindElementToMarker'](_0x5defb3,_0x3d0d77[_0xcd7e('0x13')]);}_0xb47ae9||_0x43be66||!_0x472367||_0x1dc389(_0x472367);};}
23
+ const _0x2b52=['getWalker','writer','item','isAtEnd','ck-suggestion-marker-','addClass','start','consumable','model','ck-suggestion-marker--active','hasAttribute','isBlock','addHighlight','mapper','name','plugins','getCustomProperty','getAttribute','elementEnd','nextSibling','listItem','element','createUIElement','type','span','toViewPosition','get','markerName','isLimit','bindElementToMarker','schema','previousPosition','markerRange','test','includes','push'];(function(_0x368c60,_0x2b5266){const _0x1924b6=function(_0x4c5491){while(--_0x4c5491){_0x368c60['push'](_0x368c60['shift']());}};_0x1924b6(++_0x2b5266);}(_0x2b52,0x149));const _0x1924=function(_0x368c60,_0x2b5266){_0x368c60=_0x368c60-0x0;let _0x1924b6=_0x2b52[_0x368c60];return _0x1924b6;};export function getRangesWithAttribute(_0x5286f4,_0x4d47a6,_0x597b45){const _0xaf8299=[];for(const _0x29901a of _0x4d47a6['getItems']())_0x29901a[_0x1924('0x5')](_0x5286f4)&&_0xaf8299[_0x1924('0x1e')](_0x597b45['createRangeOn'](_0x29901a));return _0xaf8299;}export function getElementsAffectedByListItemRename(_0x106c80){const _0x31e6f0=[];if(_0x106c80['is'](_0x1924('0x10'),_0x1924('0xf'))){let _0x1e3d5f=_0x106c80[_0x1924('0xe')];for(;_0x1e3d5f&&_0x1e3d5f['is'](_0x1924('0x10'),_0x1924('0xf'))&&_0x1e3d5f[_0x1924('0xc')]('listIndent')>0x0;)_0x31e6f0[_0x1924('0x1e')](_0x1e3d5f),_0x1e3d5f=_0x1e3d5f[_0x1924('0xe')];}return _0x31e6f0;}export function downcastSplitMergeMarker(_0xa34aa8,_0x1a85f8,{showActiveMarker:_0x41e117=!0x0}={}){const _0x141666=_0xa34aa8[_0x1924('0xa')][_0x1924('0x15')]('TrackChangesEditing');return(_0x20d7de,_0x243bf7,_0x205f25)=>{if(!_0x205f25[_0x1924('0x2')][_0x1924('0x1c')](_0x243bf7[_0x1924('0x1b')],_0x20d7de[_0x1924('0x9')]))return;const _0x12641a=_0x243bf7[_0x1924('0x1b')][_0x1924('0x1f')](),_0x202716=_0x243bf7['markerRange'][_0x1924('0x1')],_0x5e777a=_0xa34aa8[_0x1924('0x3')][_0x1924('0x19')];let _0x63b2f7=null,_0x32257f=null,_0x2eafc3=!0x1,_0x59f49a=!0x1;for(const _0x130365 of _0x12641a){const _0x1c8568=_0x130365[_0x1924('0x21')];_0x2eafc3=_0x2eafc3||_0x5e777a['isContent'](_0x1c8568);const _0x41b830=_0x205f25[_0x1924('0x8')]['toViewElement'](_0x1c8568);if(_0x41b830&&_0x41b830[_0x1924('0xb')](_0x1924('0x7')))return;_0x1924('0xd')==_0x130365[_0x1924('0x12')]&&(_0x5e777a[_0x1924('0x6')](_0x1c8568)&&!_0x5e777a[_0x1924('0x17')](_0x1c8568)&&(_0x1c8568[_0x1924('0xe')]||_0x202716[_0x1924('0x22')]?_0x63b2f7&&_0x63b2f7['parent']==_0x1c8568||(_0x63b2f7=_0x1c8568,_0x3ced0a(_0x130365[_0x1924('0x1a')]),_0x59f49a=!0x0):_0x32257f=_0x32257f||_0x130365[_0x1924('0x1a')]));}function _0x3ced0a(_0x308e50){const _0x4c143d=_0x205f25[_0x1924('0x20')][_0x1924('0x11')](_0x1924('0x13'),{'class':_0x1924('0x23')+_0x1a85f8}),_0x575364=_0x205f25[_0x1924('0x8')][_0x1924('0x14')](_0x308e50);_0x41e117&&_0x141666['activeMarkers'][_0x1924('0x1d')](_0x243bf7[_0x1924('0x16')])&&_0x205f25['writer'][_0x1924('0x0')](_0x1924('0x4'),_0x4c143d),_0x205f25[_0x1924('0x20')]['insert'](_0x575364,_0x4c143d),_0x205f25['mapper'][_0x1924('0x18')](_0x4c143d,_0x243bf7[_0x1924('0x16')]);}_0x2eafc3||_0x59f49a||!_0x32257f||_0x3ced0a(_0x32257f);};}
@@ -9,16 +9,10 @@
9
9
  import { Element, type Marker, type Model, type Range, type Item } from 'ckeditor5/src/engine';
10
10
  import type { User } from 'ckeditor5-collaboration/src/collaboration-core';
11
11
  import type { CommentThread } from '@ckeditor/ckeditor5-comments';
12
- import type { FormatData } from './trackchangesediting';
12
+ import type { FormatData, AttributeData } from './trackchangesediting';
13
13
  declare const Suggestion_base: {
14
14
  new (): import("ckeditor5/src/utils").Observable;
15
- prototype: import("ckeditor5/src/utils").Observable; /**
16
- * Previous suggestion in suggestions chain.
17
- *
18
- * Chained suggestions should be handled as one entity.
19
- *
20
- * @observable
21
- */
15
+ prototype: import("ckeditor5/src/utils").Observable;
22
16
  };
23
17
  /**
24
18
  * Represents a singular suggestion that is tracked by track changes plugin.
@@ -63,7 +57,7 @@ export default class Suggestion extends Suggestion_base {
63
57
  /**
64
58
  * Additional suggestion data.
65
59
  */
66
- data: FormatData | null;
60
+ data: FormatData | AttributeData | null;
67
61
  /**
68
62
  * Date when the suggestion was saved in the database.
69
63
  */
@@ -262,15 +256,36 @@ export interface SuggestionOptions {
262
256
  onAttributesChange: Function;
263
257
  }
264
258
  export interface SuggestionJSON {
259
+ /**
260
+ * Suggestion ID.
261
+ */
265
262
  id: string;
263
+ /**
264
+ * Contains the information about the type and subtype of the suggestion.
265
+ */
266
266
  type: string;
267
+ /**
268
+ * The ID of the author.
269
+ */
267
270
  authorId: string;
271
+ /**
272
+ * Date when the suggestion was saved in the database.
273
+ */
268
274
  createdAt: Date | null;
275
+ /**
276
+ * Informs whether suggestion has at least one comment.
277
+ */
269
278
  hasComments?: boolean;
270
- data?: FormatData | null;
279
+ /**
280
+ * Additional suggestion data.
281
+ */
282
+ data?: FormatData | AttributeData | null;
283
+ /**
284
+ * Custom suggestion attributes.
285
+ */
271
286
  attributes: {
272
287
  [k: string]: unknown;
273
288
  };
274
289
  }
275
- export type SuggestionType = 'insertion' | 'deletion' | 'formatInline' | 'formatBlock';
290
+ export type SuggestionType = 'insertion' | 'deletion' | 'formatInline' | 'formatBlock' | 'attribute';
276
291
  export {};
package/src/suggestion.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x25f9=['author','nodeAfter','get','_markerNames','createdAt','authoredAt','attributes','toJSON','hasComments','getMarkers','next','length','getRange','creator','commentThread','map','onAttributesChange','previous','discard','getContainedElement','end','set','_isDataLoaded','onDiscard','split','head','delete','getItems','addMarkerName','isIntersecting','_saved','reduce','addRange','getMultiRangeId','data','_model','setAttribute','add','isExternal','change','from','nodeBefore','removeAttribute','substr','decorate','getFirstMarker','type','accept','_onAccept','removeMarker','getMarkerNames','clear','subType','isIntersectingWithRange','size','getAllAdjacentSuggestions','markers','@external','removeMarkers','_onDiscard','filter','_onAttributesChange','getRanges'];(function(_0x3d4d1d,_0x25f9dd){const _0x2bafac=function(_0xbb8e1c){while(--_0xbb8e1c){_0x3d4d1d['push'](_0x3d4d1d['shift']());}};_0x2bafac(++_0x25f9dd);}(_0x25f9,0x165));const _0x2baf=function(_0x3d4d1d,_0x25f9dd){_0x3d4d1d=_0x3d4d1d-0x0;let _0x2bafac=_0x25f9[_0x3d4d1d];return _0x2bafac;};import{Element as _0x194ccb}from'ckeditor5/src/engine';import{ObservableMixin as _0x411fc0,uid as _0xd8f5c4}from'ckeditor5/src/utils';import{cloneDeep as _0x2c855c,isEqual as _0x59a9e2,set as _0x547294,unset as _0x3164c1}from'lodash-es';export default class u extends _0x411fc0(){constructor(_0x4a9210,_0x19e273){super(),this[_0x2baf('0x2b')]=!0x1,this['id']=_0x19e273['id'],this[_0x2baf('0x4')]=_0x19e273[_0x2baf('0x4')],this['subType']=_0x19e273[_0x2baf('0xa')]||null,this[_0x2baf('0x15')]=_0x19e273[_0x2baf('0x15')],this['creator']=_0x19e273[_0x2baf('0x22')]||_0x19e273['author'],this[_0x2baf('0x3b')]=Boolean(_0x19e273[_0x2baf('0x1b')]&&_0x19e273[_0x2baf('0x1b')][_0x2baf('0xf')]),this[_0x2baf('0x37')]=null,this[_0x2baf('0x38')]=_0x4a9210,this[_0x2baf('0x6')]=_0x19e273['onAccept'],this[_0x2baf('0x11')]=_0x19e273[_0x2baf('0x2c')],this[_0x2baf('0x13')]=_0x19e273[_0x2baf('0x25')],this[_0x2baf('0x18')]=new Set(),this[_0x2baf('0x19')]=null,this[_0x2baf('0x2a')](_0x2baf('0x1a'),null),this[_0x2baf('0x2a')]('attributes',_0x19e273[_0x2baf('0x1b')]||{}),this[_0x2baf('0x2a')]('previous',null),this[_0x2baf('0x2a')](_0x2baf('0x1f'),null),this[_0x2baf('0x2a')](_0x2baf('0x23'),null),this['set'](_0x2baf('0x33'),!0x1),this[_0x2baf('0x2')](_0x2baf('0x5')),this[_0x2baf('0x2')](_0x2baf('0x27'));}get[_0x2baf('0x2e')](){let _0x979603=this;for(;_0x979603[_0x2baf('0x26')];)_0x979603=_0x979603[_0x2baf('0x26')];return _0x979603;}get[_0x2baf('0x1d')](){return!!this[_0x2baf('0x23')]&&this[_0x2baf('0x23')][_0x2baf('0x20')]>0x0;}get['isMultiRange'](){if(0x0==this[_0x2baf('0x18')][_0x2baf('0xc')])return!0x1;return 0x6==Array['from'](this[_0x2baf('0x18')])[0x0][_0x2baf('0x2d')](':')[_0x2baf('0x20')];}get['isInContent'](){return null!==this['getFirstMarker']();}[_0x2baf('0x31')](_0x3b2c78){this[_0x2baf('0x18')][_0x2baf('0x3a')](_0x3b2c78);}[_0x2baf('0x8')](){return Array[_0x2baf('0x3d')](this[_0x2baf('0x18')]);}['getMarkers'](){return this[_0x2baf('0x8')]()[_0x2baf('0x24')](_0x5e4dda=>this[_0x2baf('0x38')][_0x2baf('0xe')][_0x2baf('0x17')](_0x5e4dda))[_0x2baf('0x12')](_0xe1c696=>_0xe1c696);}[_0x2baf('0x3')](){return this[_0x2baf('0x1e')]()[0x0]||null;}[_0x2baf('0x10')](){this[_0x2baf('0x38')][_0x2baf('0x3c')](_0x178c42=>{for(const _0x4716f4 of this['getMarkers']())_0x178c42[_0x2baf('0x7')](_0x4716f4);}),this[_0x2baf('0x18')][_0x2baf('0x9')]();}[_0x2baf('0x7')](_0x5437ea){this[_0x2baf('0x38')][_0x2baf('0x3c')](_0x10e6dd=>{_0x10e6dd[_0x2baf('0x7')](_0x5437ea);}),this[_0x2baf('0x18')][_0x2baf('0x2f')](_0x5437ea);}[_0x2baf('0x35')](_0xf401e7){const _0x39c097='suggestion:'+this[_0x2baf('0x4')]+':'+this['subType']+':'+this['id']+':'+this[_0x2baf('0x22')]['id']+':'+u[_0x2baf('0x36')]();this[_0x2baf('0x31')](_0x39c097),this['_model'][_0x2baf('0x3c')](_0x2aae07=>{_0x2aae07['addMarker'](_0x39c097,{'range':_0xf401e7,'usingOperation':!0x0,'affectsData':!0x0});});}[_0x2baf('0xb')](_0x29f23a){for(const _0x1bbbf2 of this[_0x2baf('0x14')]())if(_0x1bbbf2[_0x2baf('0x32')](_0x29f23a))return!0x0;return!0x1;}[_0x2baf('0x14')](){return this[_0x2baf('0x1e')]()[_0x2baf('0x24')](_0x47504d=>_0x47504d[_0x2baf('0x21')]());}[_0x2baf('0x30')](){return this[_0x2baf('0x14')]()[_0x2baf('0x34')]((_0x4f2ae9,_0xf4ba7f)=>[..._0x4f2ae9,..._0xf4ba7f[_0x2baf('0x30')]()],[]);}['getFirstRange'](){var _0x5ba773;return(null===(_0x5ba773=this['getFirstMarker']())||void 0x0===_0x5ba773?void 0x0:_0x5ba773[_0x2baf('0x21')]())||null;}[_0x2baf('0x28')](){const _0x3d5eee=this[_0x2baf('0x14')]();if(0x1!=_0x3d5eee[_0x2baf('0x20')])return null;const _0x1615e4=_0x3d5eee[0x0],_0x39c5d0=_0x1615e4['start'][_0x2baf('0x16')],_0x567d71=_0x1615e4[_0x2baf('0x29')][_0x2baf('0x3e')];return _0x39c5d0 instanceof _0x194ccb?_0x39c5d0!=_0x567d71?null:_0x39c5d0:null;}['accept'](){this[_0x2baf('0x6')](this['getRanges'](),this[_0x2baf('0x37')],this[_0x2baf('0x1b')]),this['removeMarkers']();}[_0x2baf('0x27')](){this['_onDiscard'](this[_0x2baf('0x14')](),this['data'],this[_0x2baf('0x1b')]),this['removeMarkers']();}[_0x2baf('0xd')](){const _0x13f31c=[];let _0x428e13=this[_0x2baf('0x2e')];for(;_0x428e13;)_0x13f31c['push'](_0x428e13),_0x428e13=_0x428e13[_0x2baf('0x1f')];return _0x13f31c;}[_0x2baf('0x39')](_0x5944aa,_0xcfdb20){const _0x3bbaf6=_0x2c855c(this['attributes']);_0x547294(_0x3bbaf6,_0x5944aa,_0xcfdb20),_0x59a9e2(_0x3bbaf6,this[_0x2baf('0x1b')])||(this[_0x2baf('0x1b')]=_0x3bbaf6,this['_onAttributesChange'](_0x3bbaf6));}[_0x2baf('0x0')](_0x33f811){const _0x309a9e=_0x2c855c(this['attributes']);_0x3164c1(_0x309a9e,_0x33f811),_0x59a9e2(_0x309a9e,this[_0x2baf('0x1b')])||(this[_0x2baf('0x1b')]=_0x309a9e,this[_0x2baf('0x13')](this['attributes']));}[_0x2baf('0x1c')](){return{'id':this['id'],'type':this[_0x2baf('0xa')]?this[_0x2baf('0x4')]+':'+this[_0x2baf('0xa')]:this[_0x2baf('0x4')],'authorId':this[_0x2baf('0x22')]['id'],'createdAt':this['createdAt'],'hasComments':this[_0x2baf('0x1d')],'data':this[_0x2baf('0x37')],'attributes':this['attributes']};}static[_0x2baf('0x36')](){return _0xd8f5c4()[_0x2baf('0x1')](0x1,0x5);}}
23
+ const _0x5e57=['_saved','onAttributesChange','markers','nodeBefore','reduce','addMarkerName','_onDiscard','author','nodeAfter','start','change','addRange','getRange','_model','add','get','isIntersecting','getFirstMarker','previous','substr','creator','commentThread','type','decorate','attributes','getRanges','hasComments','onDiscard','set','clear','_markerNames','data','_onAttributesChange','head','_onAccept','toJSON','push','getAllAdjacentSuggestions','end','getFirstRange','split','addMarker','next','_isDataLoaded','getMarkers','map','setAttribute','@external','delete','length','getItems','removeMarkers','removeAttribute','isIntersectingWithRange','getMarkerNames','subType','accept','createdAt','from','onAccept','getMultiRangeId','filter'];(function(_0x5f3d46,_0x5e57a8){const _0x462864=function(_0x547630){while(--_0x547630){_0x5f3d46['push'](_0x5f3d46['shift']());}};_0x462864(++_0x5e57a8);}(_0x5e57,0x1f4));const _0x4628=function(_0x5f3d46,_0x5e57a8){_0x5f3d46=_0x5f3d46-0x0;let _0x462864=_0x5e57[_0x5f3d46];return _0x462864;};import{Element as _0x537a7d}from'ckeditor5/src/engine';import{ObservableMixin as _0x274390,uid as _0x116f45}from'ckeditor5/src/utils';import{cloneDeep as _0x1bb168,isEqual as _0x26ed56,set as _0x53c8a7,unset as _0x27ae5f}from'lodash-es';export default class u extends _0x274390(){constructor(_0x5be231,_0x4b3103){super(),this[_0x4628('0x27')]=!0x1,this['id']=_0x4b3103['id'],this[_0x4628('0x12')]=_0x4b3103[_0x4628('0x12')],this[_0x4628('0x33')]=_0x4b3103[_0x4628('0x33')]||null,this[_0x4628('0x3')]=_0x4b3103[_0x4628('0x3')],this[_0x4628('0x10')]=_0x4b3103[_0x4628('0x10')]||_0x4b3103[_0x4628('0x3')],this['isExternal']=Boolean(_0x4b3103[_0x4628('0x14')]&&_0x4b3103[_0x4628('0x14')][_0x4628('0x2b')]),this[_0x4628('0x1b')]=null,this['_model']=_0x5be231,this[_0x4628('0x1e')]=_0x4b3103[_0x4628('0x37')],this[_0x4628('0x2')]=_0x4b3103[_0x4628('0x17')],this['_onAttributesChange']=_0x4b3103[_0x4628('0x3b')],this['_markerNames']=new Set(),this[_0x4628('0x35')]=null,this[_0x4628('0x18')]('authoredAt',null),this[_0x4628('0x18')](_0x4628('0x14'),_0x4b3103[_0x4628('0x14')]||{}),this[_0x4628('0x18')](_0x4628('0xe'),null),this[_0x4628('0x18')]('next',null),this[_0x4628('0x18')]('commentThread',null),this[_0x4628('0x18')](_0x4628('0x3a'),!0x1),this[_0x4628('0x13')](_0x4628('0x34')),this[_0x4628('0x13')]('discard');}get[_0x4628('0x1d')](){let _0x318faa=this;for(;_0x318faa['previous'];)_0x318faa=_0x318faa[_0x4628('0xe')];return _0x318faa;}get[_0x4628('0x16')](){return!!this[_0x4628('0x11')]&&this[_0x4628('0x11')][_0x4628('0x2d')]>0x0;}get['isMultiRange'](){if(0x0==this[_0x4628('0x1a')]['size'])return!0x1;return 0x6==Array['from'](this[_0x4628('0x1a')])[0x0][_0x4628('0x24')](':')[_0x4628('0x2d')];}get['isInContent'](){return null!==this[_0x4628('0xd')]();}[_0x4628('0x1')](_0x20d94a){this[_0x4628('0x1a')][_0x4628('0xa')](_0x20d94a);}[_0x4628('0x32')](){return Array[_0x4628('0x36')](this['_markerNames']);}['getMarkers'](){return this[_0x4628('0x32')]()[_0x4628('0x29')](_0x5ceda4=>this['_model'][_0x4628('0x3c')][_0x4628('0xb')](_0x5ceda4))[_0x4628('0x39')](_0x1d91e5=>_0x1d91e5);}[_0x4628('0xd')](){return this[_0x4628('0x28')]()[0x0]||null;}[_0x4628('0x2f')](){this[_0x4628('0x9')][_0x4628('0x6')](_0x471123=>{for(const _0x34e737 of this[_0x4628('0x28')]())_0x471123['removeMarker'](_0x34e737);}),this[_0x4628('0x1a')][_0x4628('0x19')]();}['removeMarker'](_0x24a82b){this[_0x4628('0x9')][_0x4628('0x6')](_0x40f9e0=>{_0x40f9e0['removeMarker'](_0x24a82b);}),this[_0x4628('0x1a')][_0x4628('0x2c')](_0x24a82b);}[_0x4628('0x7')](_0x1fd0a3){const _0x223dc1='suggestion:'+this[_0x4628('0x12')]+':'+this[_0x4628('0x33')]+':'+this['id']+':'+this[_0x4628('0x10')]['id']+':'+u[_0x4628('0x38')]();this[_0x4628('0x1')](_0x223dc1),this[_0x4628('0x9')][_0x4628('0x6')](_0x454f05=>{_0x454f05[_0x4628('0x25')](_0x223dc1,{'range':_0x1fd0a3,'usingOperation':!0x0,'affectsData':!0x0});});}[_0x4628('0x31')](_0x18db33){for(const _0x4241b6 of this[_0x4628('0x15')]())if(_0x4241b6[_0x4628('0xc')](_0x18db33))return!0x0;return!0x1;}[_0x4628('0x15')](){return this[_0x4628('0x28')]()[_0x4628('0x29')](_0x156f38=>_0x156f38[_0x4628('0x8')]());}[_0x4628('0x2e')](){return this[_0x4628('0x15')]()[_0x4628('0x0')]((_0x5e6d4b,_0x2cf422)=>[..._0x5e6d4b,..._0x2cf422[_0x4628('0x2e')]()],[]);}[_0x4628('0x23')](){var _0x27f450;return(null===(_0x27f450=this[_0x4628('0xd')]())||void 0x0===_0x27f450?void 0x0:_0x27f450['getRange']())||null;}['getContainedElement'](){const _0x162da7=this[_0x4628('0x15')]();if(0x1!=_0x162da7[_0x4628('0x2d')])return null;const _0x14ae7f=_0x162da7[0x0],_0x21d0a6=_0x14ae7f[_0x4628('0x5')][_0x4628('0x4')],_0x22231e=_0x14ae7f[_0x4628('0x22')][_0x4628('0x3d')];return _0x21d0a6 instanceof _0x537a7d?_0x21d0a6!=_0x22231e?null:_0x21d0a6:null;}[_0x4628('0x34')](){this['_onAccept'](this[_0x4628('0x15')](),this[_0x4628('0x1b')],this[_0x4628('0x14')]),this[_0x4628('0x2f')]();}['discard'](){this[_0x4628('0x2')](this[_0x4628('0x15')](),this[_0x4628('0x1b')],this[_0x4628('0x14')]),this[_0x4628('0x2f')]();}[_0x4628('0x21')](){const _0x138b77=[];let _0x53e888=this[_0x4628('0x1d')];for(;_0x53e888;)_0x138b77[_0x4628('0x20')](_0x53e888),_0x53e888=_0x53e888[_0x4628('0x26')];return _0x138b77;}[_0x4628('0x2a')](_0x8159c,_0x5c4e39){const _0xb27e3e=_0x1bb168(this[_0x4628('0x14')]);_0x53c8a7(_0xb27e3e,_0x8159c,_0x5c4e39),_0x26ed56(_0xb27e3e,this[_0x4628('0x14')])||(this[_0x4628('0x14')]=_0xb27e3e,this[_0x4628('0x1c')](_0xb27e3e));}[_0x4628('0x30')](_0x191d65){const _0x2a94f1=_0x1bb168(this[_0x4628('0x14')]);_0x27ae5f(_0x2a94f1,_0x191d65),_0x26ed56(_0x2a94f1,this[_0x4628('0x14')])||(this[_0x4628('0x14')]=_0x2a94f1,this[_0x4628('0x1c')](this[_0x4628('0x14')]));}[_0x4628('0x1f')](){return{'id':this['id'],'type':this[_0x4628('0x33')]?this[_0x4628('0x12')]+':'+this['subType']:this['type'],'authorId':this[_0x4628('0x10')]['id'],'createdAt':this['createdAt'],'hasComments':this[_0x4628('0x16')],'data':this['data'],'attributes':this['attributes']};}static[_0x4628('0x38')](){return _0x116f45()[_0x4628('0xf')](0x1,0x5);}}
@@ -6,11 +6,14 @@ import { type Locale, type PriorityString } from 'ckeditor5/src/utils';
6
6
  import type { Schema, Element } from 'ckeditor5/src/engine';
7
7
  import type Suggestion from './suggestion';
8
8
  /**
9
- * Creates descriptions for suggestion chains.
9
+ * Creates descriptions for suggestions and suggestions chains.
10
10
  *
11
- * One or more suggestions that are next to each other create "suggestion chain". In such chain one suggestion may
12
- * impact other suggestion when it comes to the description of the whole chain. For example, insertion next to deletion
13
- * results in "Replaced" description.
11
+ * The class manages everything related to generating descriptions for suggestions. Here, you register labels for elements,
12
+ * attributes, or custom callback for non-regular cases.
13
+ *
14
+ * One or more suggestions that are grouped together (based ond various conditions) create "suggestion chain".
15
+ * In such chain one suggestion may impact other suggestion when it comes to the description of the whole chain.
16
+ * For example, insertion next to deletion results in "Replaced" description.
14
17
  */
15
18
  export default class SuggestionDescriptionFactory {
16
19
  constructor(schema: Schema, locale: Locale);
@@ -98,6 +101,22 @@ export default class SuggestionDescriptionFactory {
98
101
  * ```
99
102
  */
100
103
  registerElementLabel(elementNameOrCallback: string | Function, labelCallback: LabelCallback, priority?: PriorityString): void;
104
+ /**
105
+ * For given `attributeName` registers how this attribute will be labeled in a description (for example when it is added
106
+ * or removed).
107
+ *
108
+ * Example usage with internationalization:
109
+ *
110
+ * ```ts
111
+ * const t = editor.locale.t; // Remember that you have to use function named `t`.
112
+ *
113
+ * suggestionDescriptionFactory.registerAttributeLabel(
114
+ * 'bold',
115
+ * t( 'bold' )
116
+ * );
117
+ * ```
118
+ */
119
+ registerAttributeLabel(attributeName: string, attributeLabel: string): void;
101
120
  /**
102
121
  * Returns label registered for given element or the element name if there is no label registered for it.
103
122
  */
@@ -154,10 +173,11 @@ export interface LabelCallbackObject {
154
173
  * ranges are traversed.
155
174
  */
156
175
  interface DescriptionItem {
157
- type: 'text' | 'addEmptyContainer' | 'addObject' | 'removeEmptyContainer' | 'removeObject' | 'addContainer' | 'removeContainer';
176
+ type: 'text' | 'addEmptyContainer' | 'addObject' | 'removeEmptyContainer' | 'removeObject' | 'addContainer' | 'removeContainer' | 'addFormat' | 'removeFormat';
158
177
  add?: string;
159
178
  remove?: string;
160
179
  element?: Element;
161
180
  quantity?: number;
181
+ key?: string;
162
182
  }
163
183
  export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3ba2=['previousSibling','registerDescriptionCallback','pop','quantity','Object','add','push','function','_resolveDescriptionItems','_itemLabelsCallbacks','$1\x20$2','text','getFirstRange','Container','*Merge:*\x20%0','replace','deletion','isEqual','addEmptyContainer','removeEmptyContainer','_schema','type','data','checkChild','name','remove','matchingCallback','_itemLabels','nextSibling','addContainer','isEmpty','elementEnd','_addDescriptionItems','insertion','isInContent','_customCallbacks','label','normal','getItemLabel','registerElementLabel','get','softBreak','isObject','elementStart','*Insert:*\x20%0','EmptyContainer','length','*Remove:*\x20%0','end','*Split:*\x20%0','start','ELEMENT_SPACE','match','indexOf','element','_locale'];(function(_0x3fcb39,_0x3ba227){const _0x322b00=function(_0x4a9913){while(--_0x4a9913){_0x3fcb39['push'](_0x3fcb39['shift']());}};_0x322b00(++_0x3ba227);}(_0x3ba2,0x170));const _0x322b=function(_0x3fcb39,_0x3ba227){_0x3fcb39=_0x3fcb39-0x0;let _0x322b00=_0x3ba2[_0x3fcb39];return _0x322b00;};import{getTranslation as _0x3b225d}from'./utils/common-translations';import{priorities as _0x51e3da,insertToPriorityArray as _0x50678a}from'ckeditor5/src/utils';export default class m{constructor(_0x4f182a,_0x47632d){this[_0x322b('0x3')]=[],this[_0x322b('0x33')]=new Map(),this['_itemLabelsCallbacks']=[],this[_0x322b('0x2c')]=_0x4f182a,this[_0x322b('0x17')]=_0x47632d;}['getDescriptions'](_0x36f7e1){const _0x4829e2=[];for(let _0x183e96=0x0;_0x183e96<_0x36f7e1[_0x322b('0xe')];_0x183e96++){const _0x31deb3=_0x36f7e1[_0x183e96];if(!_0x31deb3[_0x322b('0x2')])continue;let _0x1ded54=!0x1;for(const _0x83374a of this[_0x322b('0x3')]){const _0x57159c=_0x83374a(_0x31deb3);if(_0x57159c){_0x322b('0x2d')in _0x57159c&&_0x4829e2[_0x322b('0x1e')](_0x57159c),_0x1ded54=!0x0;break;}}if(!_0x1ded54){this[_0x322b('0x0')](_0x4829e2,_0x31deb3);const _0x5cdc17=_0x36f7e1[_0x183e96+0x1];if(_0x5cdc17&&!_0x31deb3[_0x322b('0x24')]()[_0x322b('0x10')][_0x322b('0x29')](_0x5cdc17[_0x322b('0x24')]()[_0x322b('0x12')])){const _0x465a8e=_0x4829e2[_0x4829e2['length']-0x1],_0x8d2766=_0x322b('0x1')==_0x31deb3['type']?_0x322b('0x1d'):'remove';_0x465a8e&&_0x322b('0x23')==_0x465a8e[_0x322b('0x2d')]&&(_0x465a8e[_0x8d2766]+='\x0a');}}}return this[_0x322b('0x20')](_0x4829e2);}[_0x322b('0x19')](_0x570019){this[_0x322b('0x3')][_0x322b('0x1e')](_0x570019);}[_0x322b('0x7')](_0x160fe,_0x51b9f5,_0x541b57=_0x51e3da[_0x322b('0x5')]){_0x322b('0x1f')==typeof _0x160fe?_0x50678a(this['_itemLabelsCallbacks'],{'matchingCallback':_0x160fe,'label':_0x51b9f5,'priority':_0x541b57}):this[_0x322b('0x33')]['set'](_0x160fe,_0x51b9f5);}[_0x322b('0x6')](_0x156505,_0x3ba74c=0x1){let _0x514952;for(const _0x792dc8 of this[_0x322b('0x21')])if(_0x792dc8[_0x322b('0x32')](_0x156505)){_0x514952=_0x792dc8[_0x322b('0x4')];break;}return _0x514952||(_0x514952=this[_0x322b('0x33')][_0x322b('0x8')](_0x156505['name'])),_0x514952?_0x514952(_0x3ba74c):0x1!==_0x3ba74c?_0x3ba74c+'\x20'+_0x156505['name']+'s':''+_0x156505[_0x322b('0x30')];}[_0x322b('0x0')](_0x56113c,_0x36b72a){const _0x3744f4=_0x36b72a['getFirstRange']()['getWalker'](),_0x59bc60=_0x322b('0x1')==_0x36b72a[_0x322b('0x2d')]?_0x322b('0x1d'):'remove';for(const _0x32362d of _0x3744f4){const _0x371263=_0x32362d['item'],_0x1233f5=_0x56113c[_0x56113c[_0x322b('0xe')]-0x1];if(_0x371263['is']('$textProxy'))_0x1233f5&&_0x1233f5[_0x322b('0x2d')][_0x322b('0x15')]('Container')>-0x1&&_0x56113c[_0x322b('0x1a')](),_0x1233f5&&_0x322b('0x23')==_0x1233f5[_0x322b('0x2d')]?_0x1233f5[_0x59bc60]+=_0x371263[_0x322b('0x2e')]:_0x56113c['push']({'type':_0x322b('0x23'),'add':_0x322b('0x1d')==_0x59bc60?_0x371263['data']:'','remove':_0x322b('0x31')==_0x59bc60?_0x371263['data']:''});else{if(this[_0x322b('0x2c')][_0x322b('0xa')](_0x371263)){const _0xb90fda=_0x371263;if(_0x1233f5&&_0x1233f5[_0x322b('0x2d')][_0x322b('0x15')](_0x322b('0x25'))>-0x1&&_0x56113c[_0x322b('0x1a')](),_0x322b('0x37')==_0x32362d[_0x322b('0x2d')])continue;_0x1233f5&&_0x1233f5[_0x322b('0x2d')]==_0x59bc60+'Object'&&_0x1233f5[_0x322b('0x16')]['name']==_0xb90fda[_0x322b('0x30')]?_0x1233f5[_0x322b('0x1b')]++:_0x56113c[_0x322b('0x1e')]({'type':_0x59bc60+_0x322b('0x1c'),'element':_0xb90fda,'quantity':0x1}),_0x3744f4['skip'](_0x2a6932=>!('elementEnd'==_0x2a6932['type']&&_0x2a6932['item']==_0x371263));}else{if(this['_schema'][_0x322b('0x2f')](_0x371263,'$text')||_0x371263['is'](_0x322b('0x16'),_0x322b('0x9'))){const _0xacd1f=_0x371263;if(_0x322b('0x1d')==_0x59bc60&&_0x322b('0xb')==_0x32362d[_0x322b('0x2d')]||_0x322b('0x31')==_0x59bc60&&_0x322b('0x37')==_0x32362d[_0x322b('0x2d')])continue;if(_0x1233f5&&-0x1==_0x1233f5[_0x322b('0x2d')][_0x322b('0x15')]('Container')){_0x322b('0x23')==_0x1233f5[_0x322b('0x2d')]&&(_0x1233f5[_0x59bc60]+='\x0a');continue;}let _0xadb7cc;if(_0xadb7cc=_0x322b('0x1d')==_0x59bc60?_0xacd1f['nextSibling']&&!this[_0x322b('0x2c')][_0x322b('0xa')](_0xacd1f[_0x322b('0x34')])?_0xacd1f['nextSibling']:null:_0xacd1f[_0x322b('0x18')]&&!this[_0x322b('0x2c')]['isObject'](_0xacd1f[_0x322b('0x18')])?_0xacd1f['previousSibling']:null,_0xacd1f[_0x322b('0x36')]||_0xadb7cc&&_0xadb7cc['isEmpty']){const _0x111759=_0xadb7cc&&_0xadb7cc[_0x322b('0x36')]?_0xadb7cc:_0xacd1f;_0x1233f5&&_0x1233f5[_0x322b('0x2d')]==_0x59bc60+_0x322b('0xd')&&_0x1233f5[_0x322b('0x16')][_0x322b('0x30')]==_0x111759[_0x322b('0x30')]?_0x1233f5[_0x322b('0x1b')]++:_0x56113c[_0x322b('0x1e')]({'type':_0x59bc60+_0x322b('0xd'),'element':_0x111759,'quantity':0x1});}else _0x56113c[_0x322b('0x1e')]({'type':_0x59bc60+'Container','element':_0xacd1f});}}}}}[_0x322b('0x20')](_0x4dea54){const _0x4e07e1=this[_0x322b('0x17')],_0x2d5b62=[];for(const _0x3bc475 of _0x4dea54){switch(_0x3bc475['type']){case _0x322b('0x23'):if(_0x3bc475[_0x322b('0x1d')]=_0x3bc475[_0x322b('0x1d')]['replace'](/(\S)\u000A+(\S)/g,_0x322b('0x22'))[_0x322b('0x27')](/\u000A/g,''),_0x3bc475[_0x322b('0x31')]=_0x3bc475[_0x322b('0x31')]['replace'](/(\S)\u000A+(\S)/g,_0x322b('0x22'))[_0x322b('0x27')](/\u000A/g,''),''!=_0x3bc475[_0x322b('0x1d')]&&''!=_0x3bc475[_0x322b('0x31')]){_0x2d5b62[_0x322b('0x1e')]({'type':_0x322b('0x27'),'content':_0x3b225d(_0x4e07e1,'REPLACE_TEXT',['\x22'+_0x3bc475[_0x322b('0x31')]+'\x22','\x22'+_0x3bc475[_0x322b('0x1d')]+'\x22'])});continue;}if(null!=_0x3bc475[_0x322b('0x1d')][_0x322b('0x14')](/^ +$/)){_0x2d5b62[_0x322b('0x1e')]({'type':_0x322b('0x1'),'content':_0x3b225d(_0x4e07e1,_0x322b('0xc'),_0x3b225d(_0x4e07e1,_0x322b('0x13'),_0x3bc475[_0x322b('0x1d')][_0x322b('0xe')]))});continue;}if(null!=_0x3bc475[_0x322b('0x31')][_0x322b('0x14')](/^ +$/)){_0x2d5b62[_0x322b('0x1e')]({'type':'deletion','content':_0x3b225d(_0x4e07e1,_0x322b('0xf'),_0x3b225d(_0x4e07e1,_0x322b('0x13'),_0x3bc475[_0x322b('0x31')]['length']))});continue;}if(''!=_0x3bc475[_0x322b('0x1d')]){_0x2d5b62[_0x322b('0x1e')]({'type':_0x322b('0x1'),'content':_0x3b225d(_0x4e07e1,_0x322b('0xc'),'\x22'+_0x3bc475['add']+'\x22')});continue;}_0x2d5b62[_0x322b('0x1e')]({'type':_0x322b('0x28'),'content':_0x3b225d(_0x4e07e1,_0x322b('0xf'),'\x22'+_0x3bc475[_0x322b('0x31')]+'\x22')});continue;case _0x322b('0x2a'):case'addObject':_0x2d5b62['push']({'type':_0x322b('0x1'),'content':_0x3b225d(_0x4e07e1,'*Insert:*\x20%0',this[_0x322b('0x6')](_0x3bc475[_0x322b('0x16')],_0x3bc475[_0x322b('0x1b')]))});continue;case _0x322b('0x2b'):case'removeObject':_0x2d5b62[_0x322b('0x1e')]({'type':_0x322b('0x28'),'content':_0x3b225d(_0x4e07e1,'*Remove:*\x20%0',this[_0x322b('0x6')](_0x3bc475['element'],_0x3bc475['quantity']))});continue;case _0x322b('0x35'):_0x2d5b62[_0x322b('0x1e')]({'type':_0x322b('0x1'),'content':_0x3b225d(_0x4e07e1,_0x322b('0x11'),this[_0x322b('0x6')](_0x3bc475[_0x322b('0x16')],_0x3bc475[_0x322b('0x1b')]))});continue;case'removeContainer':_0x2d5b62['push']({'type':'deletion','content':_0x3b225d(_0x4e07e1,_0x322b('0x26'),this[_0x322b('0x6')](_0x3bc475[_0x322b('0x16')],_0x3bc475[_0x322b('0x1b')]))});continue;}_0x2d5b62[_0x322b('0x1e')](_0x3bc475);}return _0x2d5b62;}}
23
+ const _0x2bad=['length','_customCallbacks','end','*Change\x20to:*\x20%0','skip','add','key','_itemLabels','data','start','_handleInsertRemoveSuggestionDescription','Object','addFormat','_itemLabelsCallbacks','format','function','quantity','elementEnd','Container','removeFormat','_handleCustomCallbackDescription','EmptyContainer','_handleAttributeSuggestionDescription','_locale','getDescriptions','*Merge:*\x20%0','push','*Split:*\x20%0','_attributeLabels','getWalker','text','name','removeObject','item','previousSibling','map','isEqual','insertion','normal','isEmpty','getItemLabel','element','*Insert:*\x20%0','pop','isInContent','set','replace','match','nodeAfter','attribute','subType','isObject','indexOf','registerDescriptionCallback','join','_handleRenameSuggestionDescription','get','remove','removeEmptyContainer','*Set\x20format:*\x20%0','_addDescriptionItems','_schema','has','$1\x20$2','deletion','$textProxy','*Remove:*\x20%0','type','$text','ELEMENT_SPACE','getFirstRange'];(function(_0x49d925,_0x2bad40){const _0x4e2a79=function(_0x1ac116){while(--_0x1ac116){_0x49d925['push'](_0x49d925['shift']());}};_0x4e2a79(++_0x2bad40);}(_0x2bad,0x19a));const _0x4e2a=function(_0x49d925,_0x2bad40){_0x49d925=_0x49d925-0x0;let _0x4e2a79=_0x2bad[_0x49d925];return _0x4e2a79;};import{getTranslation as _0x3f1024}from'./utils/common-translations';import{priorities as _0x474877,insertToPriorityArray as _0x449b84}from'ckeditor5/src/utils';import{renameAttributeKey as _0x4b3d76}from'./trackchangesediting';export default class f{constructor(_0x4243d0,_0x201635){this[_0x4e2a('0x11')]=[],this[_0x4e2a('0x17')]=new Map(),this[_0x4e2a('0x1d')]=[],this[_0x4e2a('0x2c')]=new Map(),this[_0x4e2a('0x6')]=_0x4243d0,this[_0x4e2a('0x27')]=_0x201635;}[_0x4e2a('0x28')](_0x1c392f){const _0x294b6b=[],_0x5e1c88=new Set(),_0x5d90cf=new Set();for(let _0x5a00bf=0x0;_0x5a00bf<_0x1c392f['length'];_0x5a00bf++){const _0x2c556c=_0x1c392f[_0x5a00bf];if(!_0x2c556c[_0x4e2a('0x3c')])continue;const _0x111d1f=this[_0x4e2a('0x24')](_0x2c556c);if(_0x111d1f){if(null!=_0x2c556c[_0x4e2a('0x42')]){if(_0x5e1c88['has'](_0x2c556c[_0x4e2a('0x42')]))continue;_0x5e1c88[_0x4e2a('0x15')](_0x2c556c[_0x4e2a('0x42')]);}_0x294b6b['push'](_0x111d1f);}else{if(_0x4e2a('0x41')!=_0x2c556c['type'])_0x4e2a('0x35')!=_0x2c556c[_0x4e2a('0xc')]&&'deletion'!=_0x2c556c[_0x4e2a('0xc')]||this[_0x4e2a('0x1a')](_0x294b6b,_0x2c556c,_0x1c392f[_0x5a00bf+0x1]);else{const _0x2e4211=_0x2c556c[_0x4e2a('0x18')][_0x4e2a('0x16')];if(_0x5d90cf[_0x4e2a('0x7')](_0x2e4211))continue;_0x5d90cf[_0x4e2a('0x15')](_0x2c556c[_0x4e2a('0x18')][_0x4e2a('0x16')]),_0x2e4211==_0x4b3d76?this['_handleRenameSuggestionDescription'](_0x294b6b,_0x2c556c):this[_0x4e2a('0x26')](_0x294b6b,_0x2c556c);}}}return this['_resolveDescriptionItems'](_0x294b6b);}[_0x4e2a('0x45')](_0x1db3a9){this['_customCallbacks']['push'](_0x1db3a9);}['registerElementLabel'](_0x1ef336,_0x4e920b,_0x5d5458=_0x474877[_0x4e2a('0x36')]){_0x4e2a('0x1f')==typeof _0x1ef336?_0x449b84(this['_itemLabelsCallbacks'],{'matchingCallback':_0x1ef336,'label':_0x4e920b,'priority':_0x5d5458}):this[_0x4e2a('0x17')][_0x4e2a('0x3d')](_0x1ef336,_0x4e920b);}['registerAttributeLabel'](_0x492255,_0x5ddaf1){this['_attributeLabels'][_0x4e2a('0x3d')](_0x492255,_0x5ddaf1);}[_0x4e2a('0x38')](_0x4a2b07,_0x46ce56=0x1){let _0x115204;for(const _0x4060db of this[_0x4e2a('0x1d')])if(_0x4060db['matchingCallback'](_0x4a2b07)){_0x115204=_0x4060db['label'];break;}return _0x115204||(_0x115204=this['_itemLabels'][_0x4e2a('0x1')](_0x4a2b07[_0x4e2a('0x2f')])),_0x115204?_0x115204(_0x46ce56):0x1!==_0x46ce56?_0x46ce56+'\x20'+_0x4a2b07[_0x4e2a('0x2f')]+'s':''+_0x4a2b07[_0x4e2a('0x2f')];}[_0x4e2a('0x5')](_0x1e88bb,_0x5b553a){const _0x4b13c0=_0x5b553a[_0x4e2a('0xf')]()[_0x4e2a('0x2d')](),_0x17733d=_0x4e2a('0x35')==_0x5b553a['type']?_0x4e2a('0x15'):_0x4e2a('0x2');for(const _0x772dc6 of _0x4b13c0){const _0x5f4b7f=_0x772dc6[_0x4e2a('0x31')],_0x29c19d=_0x1e88bb[_0x1e88bb[_0x4e2a('0x10')]-0x1];if(_0x5f4b7f['is'](_0x4e2a('0xa')))_0x29c19d&&_0x29c19d[_0x4e2a('0xc')][_0x4e2a('0x44')](_0x4e2a('0x22'))>-0x1&&_0x1e88bb['pop'](),_0x29c19d&&_0x4e2a('0x2e')==_0x29c19d[_0x4e2a('0xc')]?_0x29c19d[_0x17733d]+=_0x5f4b7f['data']:_0x1e88bb[_0x4e2a('0x2a')]({'type':'text','add':_0x4e2a('0x15')==_0x17733d?_0x5f4b7f[_0x4e2a('0x18')]:'','remove':_0x4e2a('0x2')==_0x17733d?_0x5f4b7f[_0x4e2a('0x18')]:''});else{if(this[_0x4e2a('0x6')][_0x4e2a('0x43')](_0x5f4b7f)){const _0x50ab65=_0x5f4b7f;if(_0x29c19d&&_0x29c19d[_0x4e2a('0xc')][_0x4e2a('0x44')](_0x4e2a('0x22'))>-0x1&&_0x1e88bb[_0x4e2a('0x3b')](),_0x4e2a('0x21')==_0x772dc6[_0x4e2a('0xc')])continue;_0x29c19d&&_0x29c19d[_0x4e2a('0xc')]==_0x17733d+_0x4e2a('0x1b')&&_0x29c19d[_0x4e2a('0x39')][_0x4e2a('0x2f')]==_0x50ab65['name']?_0x29c19d[_0x4e2a('0x20')]++:_0x1e88bb['push']({'type':_0x17733d+_0x4e2a('0x1b'),'element':_0x50ab65,'quantity':0x1}),_0x4b13c0[_0x4e2a('0x14')](_0x425582=>!(_0x4e2a('0x21')==_0x425582['type']&&_0x425582[_0x4e2a('0x31')]==_0x5f4b7f));}else{if(this[_0x4e2a('0x6')]['checkChild'](_0x5f4b7f,_0x4e2a('0xd'))||_0x5f4b7f['is'](_0x4e2a('0x39'),'softBreak')){const _0x137d11=_0x5f4b7f;if(_0x4e2a('0x15')==_0x17733d&&'elementStart'==_0x772dc6['type']||'remove'==_0x17733d&&'elementEnd'==_0x772dc6[_0x4e2a('0xc')])continue;if(_0x29c19d&&-0x1==_0x29c19d[_0x4e2a('0xc')][_0x4e2a('0x44')]('Container')){_0x4e2a('0x2e')==_0x29c19d[_0x4e2a('0xc')]&&(_0x29c19d[_0x17733d]+='\x0a');continue;}let _0x2ff14e;if(_0x2ff14e=_0x4e2a('0x15')==_0x17733d?_0x137d11['nextSibling']&&!this[_0x4e2a('0x6')][_0x4e2a('0x43')](_0x137d11['nextSibling'])?_0x137d11['nextSibling']:null:_0x137d11['previousSibling']&&!this[_0x4e2a('0x6')][_0x4e2a('0x43')](_0x137d11['previousSibling'])?_0x137d11[_0x4e2a('0x32')]:null,_0x137d11['isEmpty']||_0x2ff14e&&_0x2ff14e[_0x4e2a('0x37')]){const _0x10cb75=_0x2ff14e&&_0x2ff14e['isEmpty']?_0x2ff14e:_0x137d11;_0x29c19d&&_0x29c19d[_0x4e2a('0xc')]==_0x17733d+_0x4e2a('0x25')&&_0x29c19d['element']['name']==_0x10cb75[_0x4e2a('0x2f')]?_0x29c19d[_0x4e2a('0x20')]++:_0x1e88bb[_0x4e2a('0x2a')]({'type':_0x17733d+_0x4e2a('0x25'),'element':_0x10cb75,'quantity':0x1});}else _0x1e88bb[_0x4e2a('0x2a')]({'type':_0x17733d+_0x4e2a('0x22'),'element':_0x137d11});}}}}}['_resolveDescriptionItems'](_0xc5edde){const _0x3e4024=this[_0x4e2a('0x27')],_0x418d32=[],_0x3b5c37=[],_0x370f5b=[];for(const _0x26791a of _0xc5edde)switch(_0x26791a[_0x4e2a('0xc')]){case _0x4e2a('0x2e'):if(_0x26791a['add']=_0x26791a[_0x4e2a('0x15')][_0x4e2a('0x3e')](/(\S)\u000A+(\S)/g,_0x4e2a('0x8'))[_0x4e2a('0x3e')](/\u000A/g,''),_0x26791a[_0x4e2a('0x2')]=_0x26791a[_0x4e2a('0x2')][_0x4e2a('0x3e')](/(\S)\u000A+(\S)/g,_0x4e2a('0x8'))['replace'](/\u000A/g,''),''!=_0x26791a[_0x4e2a('0x15')]&&''!=_0x26791a[_0x4e2a('0x2')]){_0x418d32[_0x4e2a('0x2a')]({'type':_0x4e2a('0x3e'),'content':_0x3f1024(_0x3e4024,'REPLACE_TEXT',['\x22'+_0x26791a[_0x4e2a('0x2')]+'\x22','\x22'+_0x26791a['add']+'\x22'])});continue;}if(null!=_0x26791a[_0x4e2a('0x15')][_0x4e2a('0x3f')](/^ +$/)){_0x418d32[_0x4e2a('0x2a')]({'type':_0x4e2a('0x35'),'content':_0x3f1024(_0x3e4024,_0x4e2a('0x3a'),_0x3f1024(_0x3e4024,_0x4e2a('0xe'),_0x26791a['add'][_0x4e2a('0x10')]))});continue;}if(null!=_0x26791a[_0x4e2a('0x2')][_0x4e2a('0x3f')](/^ +$/)){_0x418d32[_0x4e2a('0x2a')]({'type':_0x4e2a('0x9'),'content':_0x3f1024(_0x3e4024,_0x4e2a('0xb'),_0x3f1024(_0x3e4024,_0x4e2a('0xe'),_0x26791a[_0x4e2a('0x2')][_0x4e2a('0x10')]))});continue;}if(''!=_0x26791a['add']){_0x418d32[_0x4e2a('0x2a')]({'type':'insertion','content':_0x3f1024(_0x3e4024,'*Insert:*\x20%0','\x22'+_0x26791a['add']+'\x22')});continue;}_0x418d32[_0x4e2a('0x2a')]({'type':'deletion','content':_0x3f1024(_0x3e4024,_0x4e2a('0xb'),'\x22'+_0x26791a[_0x4e2a('0x2')]+'\x22')});continue;case'addEmptyContainer':case'addObject':_0x418d32[_0x4e2a('0x2a')]({'type':'insertion','content':_0x3f1024(_0x3e4024,_0x4e2a('0x3a'),this[_0x4e2a('0x38')](_0x26791a[_0x4e2a('0x39')],_0x26791a[_0x4e2a('0x20')]))});continue;case _0x4e2a('0x3'):case _0x4e2a('0x30'):_0x418d32[_0x4e2a('0x2a')]({'type':_0x4e2a('0x9'),'content':_0x3f1024(_0x3e4024,_0x4e2a('0xb'),this[_0x4e2a('0x38')](_0x26791a['element'],_0x26791a[_0x4e2a('0x20')]))});continue;case'addContainer':_0x418d32[_0x4e2a('0x2a')]({'type':'insertion','content':_0x3f1024(_0x3e4024,_0x4e2a('0x2b'),this[_0x4e2a('0x38')](_0x26791a[_0x4e2a('0x39')],_0x26791a[_0x4e2a('0x20')]))});continue;case'removeContainer':_0x418d32[_0x4e2a('0x2a')]({'type':'deletion','content':_0x3f1024(_0x3e4024,_0x4e2a('0x29'),this[_0x4e2a('0x38')](_0x26791a['element'],_0x26791a[_0x4e2a('0x20')]))});continue;case'addFormat':_0x3b5c37['push'](_0x26791a[_0x4e2a('0x16')]);continue;case _0x4e2a('0x23'):_0x370f5b[_0x4e2a('0x2a')](_0x26791a['key']);continue;default:_0x418d32[_0x4e2a('0x2a')](_0x26791a);}if(_0x3b5c37[_0x4e2a('0x10')]){const _0x404951=_0x3b5c37[_0x4e2a('0x33')](_0x549952=>this[_0x4e2a('0x2c')][_0x4e2a('0x7')](_0x549952)?this[_0x4e2a('0x2c')][_0x4e2a('0x1')](_0x549952):_0x549952)[_0x4e2a('0x46')](',\x20');_0x418d32[_0x4e2a('0x2a')]({'type':_0x4e2a('0x1e'),'content':_0x3f1024(this[_0x4e2a('0x27')],_0x4e2a('0x4'),_0x404951)});}if(_0x370f5b[_0x4e2a('0x10')]){const _0x5494a0=_0x370f5b[_0x4e2a('0x33')](_0x4a57de=>this[_0x4e2a('0x2c')][_0x4e2a('0x7')](_0x4a57de)?this[_0x4e2a('0x2c')][_0x4e2a('0x1')](_0x4a57de):_0x4a57de)['join'](',\x20');_0x418d32[_0x4e2a('0x2a')]({'type':'format','content':_0x3f1024(this[_0x4e2a('0x27')],'*Remove\x20format:*\x20%0',_0x5494a0)});}return _0x418d32;}[_0x4e2a('0x24')](_0x258c4d){for(const _0x4265f8 of this[_0x4e2a('0x11')]){const _0x342d28=_0x4265f8(_0x258c4d);if(_0x342d28&&_0x4e2a('0xc')in _0x342d28)return _0x342d28;}}['_handleAttributeSuggestionDescription'](_0x20623e,_0x12af96){const _0x5b920f=_0x12af96[_0x4e2a('0x18')],_0xd435eb=void 0x0===_0x5b920f['newValue']?_0x4e2a('0x23'):_0x4e2a('0x1c');_0x20623e[_0x4e2a('0x2a')]({'type':_0xd435eb,'key':_0x5b920f[_0x4e2a('0x16')]});}[_0x4e2a('0x0')](_0x497cfc,_0x5a416b){_0x497cfc[_0x4e2a('0x2a')]({'type':_0x4e2a('0x1e'),'content':_0x3f1024(this[_0x4e2a('0x27')],_0x4e2a('0x13'),this[_0x4e2a('0x38')](_0x5a416b[_0x4e2a('0xf')]()[_0x4e2a('0x19')][_0x4e2a('0x40')],0x1))});}[_0x4e2a('0x1a')](_0x75c24f,_0x296d28,_0x300b6b){if(this['_addDescriptionItems'](_0x75c24f,_0x296d28),_0x300b6b&&_0x300b6b[_0x4e2a('0xf')]()&&!_0x296d28[_0x4e2a('0xf')]()[_0x4e2a('0x12')][_0x4e2a('0x34')](_0x300b6b[_0x4e2a('0xf')]()['start'])){const _0x1463ce=_0x75c24f[_0x75c24f[_0x4e2a('0x10')]-0x1],_0x53acc0=_0x4e2a('0x35')==_0x296d28[_0x4e2a('0xc')]?_0x4e2a('0x15'):'remove';_0x1463ce&&'text'==_0x1463ce[_0x4e2a('0xc')]&&(_0x1463ce[_0x53acc0]+='\x0a');}}}
@@ -11,7 +11,6 @@ import TrackChangesUI from './trackchangesui';
11
11
  import TrackChangesEditing from './trackchangesediting';
12
12
  import 'ckeditor5-collaboration/src/collaboration-core';
13
13
  import type { default as Suggestion, SuggestionJSON } from './suggestion';
14
- import type SuggestionThreadView from './ui/view/suggestionthreadview';
15
14
  /**
16
15
  * A plugin that provides track changes mode for the editor. In track changes mode, all insertions are visually marked and all deletions
17
16
  * are not deleted but also visually marked. Unsupported commands are disabled when the editor is in the track changes mode.
@@ -104,72 +103,6 @@ export default class TrackChanges extends Plugin {
104
103
  */
105
104
  getSuggestion(id: string): Suggestion;
106
105
  }
107
- /**
108
- * The configuration of the track changes feature.
109
- *
110
- * Example:
111
- *
112
- * ```ts
113
- * ClassicEditor
114
- * .create( {
115
- * // Track changes feature configuration.
116
- * trackChanges: {
117
- * // Do not allow users to comment suggestions (default is `false`).
118
- * disableComments: true,
119
- * // Do not track styling and formatting changes (default is `default`).
120
- * trackFormatChanges: 'never',
121
- * // Merges suggestion changes inside a block. (default is `true`).
122
- * mergeNestedSuggestions: true
123
- * }
124
- * } )
125
- * .then( ... )
126
- * .catch( ... );
127
- * ```
128
- *
129
- * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
130
- */
131
- export interface TrackChangesConfig {
132
- /**
133
- * A property that specifies if the comments for suggestions are enabled or disabled.
134
- * When the option is set to `true`, the comment thread UI for suggestions will be hidden
135
- * and commenting suggestions will be disabled.
136
- *
137
- * Suggestion thread views will be marked with the additional `ck-suggestion--disabled-comments` class when the suggestion comments
138
- * are disabled.
139
- */
140
- disableComments: boolean;
141
- /**
142
- * A property that specifies whether format changes should be tracked.
143
- *
144
- * Format changes are all changes other than insertions and deletions, including: styling, structure, widgets properties, etc.
145
- *
146
- * Possible values are:
147
- *
148
- * * `'always'` - all changes are going to be tracked independently (without merging).
149
- * * `'default'` - format changes made inside your own insertion suggestion will be merged with it.
150
- * * `'never'` - format changes will not be tracked.
151
- *
152
- * Defaults to `'default'`.
153
- */
154
- trackFormatChanges: 'never' | 'default' | 'always';
155
- /**
156
- * Specifies whether suggestions on an object (e.g. image, table) should be automatically merged
157
- * with suggestions inside the object (e.g. image caption, table cell).
158
- *
159
- * For example, when set to `true`, creating a table and writing some text inside the table will result in one suggestion.
160
- * When set to `false`, it will be two separate suggestions, one for the inserted table and one for the inserted text.
161
- *
162
- * Keep in mind that only suggestions from the same author and of the same type are merged this way.
163
- */
164
- mergeNestedSuggestions: boolean;
165
- /**
166
- * A view class to be used to create suggestion thread views.
167
- *
168
- * {@link module:track-changes/ui/view/suggestionthreadview~SuggestionThreadView} is used by default
169
- * when this property is not set.
170
- */
171
- SuggestionThreadView?: typeof SuggestionThreadView;
172
- }
173
106
  /**
174
107
  * Track changes adapter.
175
108
  *
@@ -235,9 +168,12 @@ export interface TrackChangesAdapter {
235
168
  */
236
169
  updateSuggestion(id: string, suggestionData: UpdateSuggestionInput): Promise<void>;
237
170
  }
238
- export type SuggestionData = SuggestionJSON & {
171
+ export interface SuggestionData extends SuggestionJSON {
172
+ /**
173
+ * Original suggestion ID from which the current one was split.
174
+ */
239
175
  originalSuggestionId?: string | null;
240
- };
176
+ }
241
177
  export type AddSuggestionInput = Omit<SuggestionData, 'authorId' | 'createdAt'>;
242
178
  export type UpdateSuggestionInput = Partial<Pick<SuggestionJSON, 'hasComments' | 'attributes'>> & {
243
179
  state?: 'open' | 'accepted' | 'rejected';
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x1848=['plugins','pluginName','getSuggestions','Comments','editor','adapter','addSuggestionData','get','addSuggestion'];(function(_0x298b0b,_0x184805){var _0x1f9fe9=function(_0x144e7e){while(--_0x144e7e){_0x298b0b['push'](_0x298b0b['shift']());}};_0x1f9fe9(++_0x184805);}(_0x1848,0x112));var _0x1f9f=function(_0x298b0b,_0x184805){_0x298b0b=_0x298b0b-0x0;var _0x1f9fe9=_0x1848[_0x298b0b];return _0x1f9fe9;};import{Plugin as _0x283f1a}from'ckeditor5/src/core';import _0x314c8c from'./trackchangesui';import _0x3dfd88 from'./trackchangesediting';import'ckeditor5-collaboration/src/collaboration-core';export default class k extends _0x283f1a{static get['requires'](){return[_0x3dfd88,_0x314c8c,_0x1f9f('0x8')];}static get[_0x1f9f('0x6')](){return'TrackChanges';}set[_0x1f9f('0x1')](_0x243281){this['editor'][_0x1f9f('0x5')][_0x1f9f('0x3')](_0x3dfd88)[_0x1f9f('0x1')]=_0x243281;}get[_0x1f9f('0x1')](){return this[_0x1f9f('0x0')][_0x1f9f('0x5')][_0x1f9f('0x3')](_0x3dfd88)[_0x1f9f('0x1')];}[_0x1f9f('0x4')](_0x2051e2){return this['editor'][_0x1f9f('0x5')][_0x1f9f('0x3')](_0x3dfd88)[_0x1f9f('0x2')](_0x2051e2);}[_0x1f9f('0x7')]({skipNotAttached:_0x3eaf36=!0x1,toJSON:_0x243c99=!0x1}={}){return this[_0x1f9f('0x0')][_0x1f9f('0x5')][_0x1f9f('0x3')](_0x3dfd88)[_0x1f9f('0x7')]({'skipNotAttached':_0x3eaf36,'toJSON':_0x243c99});}['getSuggestion'](_0x5ce496){return this[_0x1f9f('0x0')][_0x1f9f('0x5')][_0x1f9f('0x3')](_0x3dfd88)['getSuggestion'](_0x5ce496);}}
23
+ var _0x5cc4=['getSuggestion','addSuggestionData','getSuggestions','editor','Comments','addSuggestion','get','adapter','plugins','TrackChanges'];(function(_0x1c4016,_0x5cc4ab){var _0x52c1b4=function(_0x4da4d3){while(--_0x4da4d3){_0x1c4016['push'](_0x1c4016['shift']());}};_0x52c1b4(++_0x5cc4ab);}(_0x5cc4,0xda));var _0x52c1=function(_0x1c4016,_0x5cc4ab){_0x1c4016=_0x1c4016-0x0;var _0x52c1b4=_0x5cc4[_0x1c4016];return _0x52c1b4;};import{Plugin as _0x25f2e4}from'ckeditor5/src/core';import _0x3ac2f1 from'./trackchangesui';import _0x5eae06 from'./trackchangesediting';import'ckeditor5-collaboration/src/collaboration-core';export default class k extends _0x25f2e4{static get['requires'](){return[_0x5eae06,_0x3ac2f1,_0x52c1('0x6')];}static get['pluginName'](){return _0x52c1('0x1');}set[_0x52c1('0x9')](_0x40ab1a){this[_0x52c1('0x5')]['plugins'][_0x52c1('0x8')](_0x5eae06)['adapter']=_0x40ab1a;}get[_0x52c1('0x9')](){return this['editor'][_0x52c1('0x0')][_0x52c1('0x8')](_0x5eae06)['adapter'];}[_0x52c1('0x7')](_0x43fa56){return this[_0x52c1('0x5')][_0x52c1('0x0')][_0x52c1('0x8')](_0x5eae06)[_0x52c1('0x3')](_0x43fa56);}[_0x52c1('0x4')]({skipNotAttached:_0xb91128=!0x1,toJSON:_0x1f2c51=!0x1}={}){return this[_0x52c1('0x5')]['plugins'][_0x52c1('0x8')](_0x5eae06)[_0x52c1('0x4')]({'skipNotAttached':_0xb91128,'toJSON':_0x1f2c51});}['getSuggestion'](_0xd0ad59){return this[_0x52c1('0x5')][_0x52c1('0x0')][_0x52c1('0x8')](_0x5eae06)[_0x52c1('0x2')](_0xd0ad59);}}
@@ -13,20 +13,20 @@ import type SuggestionThreadView from './ui/view/suggestionthreadview';
13
13
  * Example:
14
14
  *
15
15
  * ```ts
16
- * ClassicEditor
17
- * .create( {
18
- * // Track changes feature configuration.
19
- * trackChanges: {
20
- * // Do not allow users to comment suggestions (default is `false`).
21
- * disableComments: true,
22
- * // Do not track styling and formatting changes (default is `default`).
23
- * trackFormatChanges: 'never',
24
- * // Merges suggestion changes inside a block. (default is `true`).
25
- * mergeNestedSuggestions: true
26
- * }
27
- * } )
28
- * .then( ... )
29
- * .catch( ... );
16
+ * ClassicEditor
17
+ * .create( {
18
+ * // Track changes feature configuration.
19
+ * trackChanges: {
20
+ * // Do not allow users to comment suggestions (default is `false`).
21
+ * disableComments: true,
22
+ * // Do not track styling and formatting changes (default is `default`).
23
+ * trackFormatChanges: 'never',
24
+ * // Merges suggestion changes inside a block. (default is `true`).
25
+ * mergeNestedSuggestions: true
26
+ * }
27
+ * } )
28
+ * .then( ... )
29
+ * .catch( ... );
30
30
  * ```
31
31
  *
32
32
  * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
@@ -42,15 +42,18 @@ export interface TrackChangesConfig {
42
42
  */
43
43
  disableComments: boolean;
44
44
  /**
45
- * A property that specifies whether format changes should be tracked.
45
+ * A property that specifies whether formatting changes should be tracked.
46
46
  *
47
- * Format changes are all changes other than insertions and deletions, including: styling, structure, widgets properties, etc.
47
+ * Formatting changes are all changes other than insertions and deletions, including: styling, structure, widgets properties, etc.
48
+ *
49
+ * By default, formatting changes are tracked. However, if you make a formatting change inside your own insertion suggestion, it
50
+ * is immediately applied, without creating a suggestion.
48
51
  *
49
52
  * Possible values are:
50
53
  *
51
- * * `'always'` - all changes are going to be tracked independently (without merging).
52
- * * `'default'` - format changes made inside your own insertion suggestion will be merged with it.
53
- * * `'never'` - format changes will not be tracked.
54
+ * * `'default'` - format changes are tracked, but when made inside your own insertion suggestion, they will be immediately applied.
55
+ * * `'always'` - format changes will always be tracked, even inside your own insertion suggestion.
56
+ * * `'never'` - format changes will never be tracked (suggestions for such changes will not be created).
54
57
  *
55
58
  * Defaults to `'default'`.
56
59
  */