@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.
- package/LICENSE.md +3 -3
- package/README.md +1 -1
- package/build/track-changes.js +2 -2
- package/build/translations/ar.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/contexts.json +20 -1
- package/lang/translations/ar.po +76 -0
- package/lang/translations/az.po +76 -0
- package/lang/translations/bg.po +76 -0
- package/lang/translations/bn.po +76 -0
- package/lang/translations/ca.po +76 -0
- package/lang/translations/cs.po +76 -0
- package/lang/translations/da.po +76 -0
- package/lang/translations/de.po +76 -0
- package/lang/translations/el.po +76 -0
- package/lang/translations/en-au.po +76 -0
- package/lang/translations/en.po +76 -0
- package/lang/translations/es.po +76 -0
- package/lang/translations/et.po +76 -0
- package/lang/translations/fi.po +76 -0
- package/lang/translations/fr.po +76 -0
- package/lang/translations/gl.po +76 -0
- package/lang/translations/he.po +76 -0
- package/lang/translations/hi.po +76 -0
- package/lang/translations/hr.po +76 -0
- package/lang/translations/hu.po +76 -0
- package/lang/translations/id.po +76 -0
- package/lang/translations/it.po +76 -0
- package/lang/translations/ja.po +76 -0
- package/lang/translations/ko.po +76 -0
- package/lang/translations/lt.po +76 -0
- package/lang/translations/lv.po +76 -0
- package/lang/translations/ms.po +76 -0
- package/lang/translations/nl.po +76 -0
- package/lang/translations/no.po +76 -0
- package/lang/translations/pl.po +76 -0
- package/lang/translations/pt-br.po +94 -18
- package/lang/translations/pt.po +76 -0
- package/lang/translations/ro.po +76 -0
- package/lang/translations/ru.po +76 -0
- package/lang/translations/sk.po +76 -0
- package/lang/translations/sq.po +76 -0
- package/lang/translations/sr-latn.po +76 -0
- package/lang/translations/sr.po +76 -0
- package/lang/translations/sv.po +76 -0
- package/lang/translations/th.po +76 -0
- package/lang/translations/tk.po +76 -0
- package/lang/translations/tr.po +76 -0
- package/lang/translations/tt.po +76 -0
- package/lang/translations/uk.po +76 -0
- package/lang/translations/ur.po +76 -0
- package/lang/translations/vi.po +76 -0
- package/lang/translations/zh-cn.po +76 -0
- package/lang/translations/zh.po +76 -0
- package/package.json +3 -3
- package/src/commands/acceptsuggestioncommand.js +1 -1
- package/src/commands/discardsuggestioncommand.js +1 -1
- package/src/commands/executeonallsuggestionscommand.js +1 -1
- package/src/commands/executeonselectedsuggestionscommand.js +1 -1
- package/src/commands/trackchangescommand.js +1 -1
- package/src/index.d.ts +1 -1
- package/src/integrations/aiassistant.d.ts +17 -0
- package/src/integrations/aiassistant.js +23 -0
- package/src/integrations/alignment.js +1 -1
- package/src/integrations/basicstyles.js +1 -1
- package/src/integrations/blockquote.js +1 -1
- package/src/integrations/ckbox.js +1 -1
- package/src/integrations/codeblock.js +1 -1
- package/src/integrations/comments.js +1 -1
- package/src/integrations/deletecommand.js +1 -1
- package/src/integrations/documentlist.js +1 -1
- package/src/integrations/documentlistproperties.js +1 -1
- package/src/integrations/entercommand.js +1 -1
- package/src/integrations/findandreplace.d.ts +1 -1
- package/src/integrations/findandreplace.js +1 -1
- package/src/integrations/font.js +1 -1
- package/src/integrations/formatpainter.js +1 -1
- package/src/integrations/heading.js +1 -1
- package/src/integrations/highlight.js +1 -1
- package/src/integrations/horizontalline.js +1 -1
- package/src/integrations/htmlembed.js +1 -1
- package/src/integrations/image.js +1 -1
- package/src/integrations/imagereplace.d.ts +0 -6
- package/src/integrations/imagereplace.js +1 -1
- package/src/integrations/imagestyle.d.ts +17 -0
- package/src/integrations/imagestyle.js +23 -0
- package/src/integrations/importword.js +1 -1
- package/src/integrations/indent.js +1 -1
- package/src/integrations/inputcommand.js +1 -1
- package/src/integrations/link.js +1 -1
- package/src/integrations/list.js +1 -1
- package/src/integrations/listproperties.js +1 -1
- package/src/integrations/mediaembed.js +1 -1
- package/src/integrations/mention.js +1 -1
- package/src/integrations/pagebreak.js +1 -1
- package/src/integrations/paragraph.js +1 -1
- package/src/integrations/removeformat.js +1 -1
- package/src/integrations/restrictededitingmode.js +1 -1
- package/src/integrations/shiftentercommand.js +1 -1
- package/src/integrations/standardeditingmode.js +1 -1
- package/src/integrations/style.d.ts +0 -1
- package/src/integrations/style.js +1 -1
- package/src/integrations/table.js +1 -1
- package/src/integrations/tablecaption.js +1 -1
- package/src/integrations/tableclipboard.js +1 -1
- package/src/integrations/tablecolumnresize.js +1 -1
- package/src/integrations/tableheadings.js +1 -1
- package/src/integrations/tablemergesplit.js +1 -1
- package/src/integrations/tableofcontents.js +1 -1
- package/src/integrations/tableproperties.js +1 -1
- package/src/integrations/template.js +1 -1
- package/src/integrations/title.js +1 -1
- package/src/integrations/undo.js +1 -1
- package/src/integrations/utils.js +1 -1
- package/src/suggestion.d.ts +26 -11
- package/src/suggestion.js +1 -1
- package/src/suggestiondescriptionfactory.d.ts +25 -5
- package/src/suggestiondescriptionfactory.js +1 -1
- package/src/trackchanges.d.ts +5 -69
- package/src/trackchanges.js +1 -1
- package/src/trackchangesconfig.d.ts +22 -19
- package/src/trackchangesdata.js +1 -1
- package/src/trackchangesediting.d.ts +59 -2
- package/src/trackchangesediting.js +1 -1
- package/src/trackchangesui.js +1 -1
- package/src/ui/suggestioncontroller.js +1 -1
- package/src/ui/view/basesuggestionthreadview.js +1 -1
- package/src/ui/view/suggestionthreadview.d.ts +1 -1
- package/src/ui/view/suggestionthreadview.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/utils.js +1 -1
- 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/trackchangesdata.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2a23=['editor','appendChild','execute','push','getUser','rootsAttributes','getSuggestions','get','editorCreator','name','result','createElement','trackChangesData.editorCreator','map','discardAllSuggestions','TrackChangesEditing','document','init','config','model','create','getFullData','trackChangesData','define','plugins','Users','getRootNames','acceptAllSuggestions','users','addUser','pluginName','track-changes-data-invalid-editor-creator','useAnonymousUser','getRootsAttributes','TrackChangesDataGetter','getDataWithAcceptedSuggestions','_adapter','data','function','CommentsRepository'];(function(_0x307034,_0x2a2369){const _0x13a6ba=function(_0xc3c981){while(--_0xc3c981){_0x307034['push'](_0x307034['shift']());}};_0x13a6ba(++_0x2a2369);}(_0x2a23,0x12f));const _0x13a6=function(_0x307034,_0x2a2369){_0x307034=_0x307034-0x0;let _0x13a6ba=_0x2a23[_0x307034];return _0x13a6ba;};import{Plugin as _0x5d991a}from'ckeditor5/src/core';import{CKEditorError as _0x5e4817}from'ckeditor5/src/utils';import _0x268e3e from'./trackchangesediting';import{sanitizeEditorConfig as _0x21f2df}from'ckeditor5-collaboration/src/collaboration-core';const T=['Pagination'];export default class P extends _0x5d991a{static get['requires'](){return[_0x268e3e];}static get['pluginName'](){return'TrackChangesData';}[_0x13a6('0x22')](){const _0x7f8a39=this[_0x13a6('0x11')];if(_0x7f8a39['config'][_0x13a6('0x0')](_0x13a6('0x1d'),_0x41c1a9=>{const _0x139251=_0x7f8a39['model'][_0x13a6('0x21')]['getRootNames']()['reduce']((_0x35303e,_0x38bab6)=>(_0x35303e[_0x38bab6]='',_0x35303e),{});return _0x7f8a39['constructor'][_0x13a6('0x25')](_0x139251,_0x41c1a9);}),_0x13a6('0xf')!=typeof _0x7f8a39[_0x13a6('0x23')][_0x13a6('0x18')](_0x13a6('0x27'))[_0x13a6('0x19')])throw new _0x5e4817(_0x13a6('0x8'));}[_0x13a6('0xc')](_0xaf0666){return N(this[_0x13a6('0x11')],!0x0,_0xaf0666);}['getDataWithDiscardedSuggestions'](_0x428a24){return N(this[_0x13a6('0x11')],!0x1,_0x428a24);}}class D extends _0x5d991a{static get[_0x13a6('0x7')](){return _0x13a6('0xb');}constructor(_0x3700da){super(_0x3700da),this[_0x13a6('0x1b')]='end';}[_0x13a6('0x22')](){this['editor'][_0x13a6('0x1')]['get'](_0x13a6('0x10'))[_0x13a6('0xd')]={'addCommentThread':()=>new Promise(()=>{}),'getCommentThread':()=>new Promise(()=>{}),'updateCommentThread':()=>new Promise(()=>{}),'resolveCommentThread':()=>new Promise(()=>{}),'reopenCommentThread':()=>new Promise(()=>{}),'removeCommentThread':()=>new Promise(()=>{}),'addComment':()=>new Promise(()=>{}),'updateComment':()=>new Promise(()=>{}),'removeComment':()=>new Promise(()=>{})},this[_0x13a6('0x11')][_0x13a6('0x1')][_0x13a6('0x18')](_0x13a6('0x20'))[_0x13a6('0xd')]=null;}}function v(_0x14271b){return void 0x0!==_0x14271b[_0x13a6('0xa')];}async function N(_0x566f3e,_0x3cf04d,_0x34ceeb){const _0x346094=_0x21f2df(_0x566f3e,T);_0x346094[_0x13a6('0x1')][_0x13a6('0x14')](_0x268e3e,D),_0x346094[_0x13a6('0x16')]=v(_0x566f3e)?_0x566f3e[_0x13a6('0xa')]():void 0x0;const _0x55d8b3=document['createDocumentFragment'](),_0x42a06f=_0x566f3e[_0x13a6('0x23')][_0x13a6('0x18')](_0x13a6('0x27'))[_0x13a6('0x19')],_0x2109eb=await _0x42a06f(_0x346094,()=>function(_0x7fbc3b){const _0x4ab0cb=document[_0x13a6('0x1c')]('div');return _0x7fbc3b[_0x13a6('0x12')](_0x4ab0cb),_0x4ab0cb;}(_0x55d8b3));!function(_0x4e06aa,_0x55585f){const _0x1ef9c5=_0x4e06aa[_0x13a6('0x24')][_0x13a6('0x21')][_0x13a6('0x3')]()['reduce']((_0x473b2f,_0x4c20e7)=>(_0x473b2f[_0x4c20e7]=_0x4e06aa[_0x13a6('0xe')][_0x13a6('0x18')]({'rootName':_0x4c20e7}),_0x473b2f),{}),_0x3a6228=_0x4e06aa['plugins']['get'](_0x13a6('0x2'))[_0x13a6('0x5')][_0x13a6('0x1e')](_0x12e9f2=>({'id':_0x12e9f2['id'],'name':_0x12e9f2[_0x13a6('0x1a')]})),_0x42a8cc=_0x4e06aa[_0x13a6('0x1')][_0x13a6('0x18')](_0x13a6('0x20'))[_0x13a6('0x17')]({'skipNotAttached':!0x0,'toJSON':!0x0}),_0x4c8108=_0x55585f['plugins'][_0x13a6('0x18')]('Users'),_0x5b5de9=_0x55585f[_0x13a6('0x1')][_0x13a6('0x18')](_0x13a6('0x20'));for(const _0x362d58 of _0x3a6228)_0x4c8108[_0x13a6('0x15')](_0x362d58['id'])||_0x4c8108[_0x13a6('0x6')](_0x362d58);_0x4c8108['me']||_0x4c8108[_0x13a6('0x9')]();for(const _0x460c89 of _0x42a8cc)_0x5b5de9['addSuggestionData'](_0x460c89);_0x55585f[_0x13a6('0xe')]['set'](_0x1ef9c5);}(_0x566f3e,_0x2109eb),_0x2109eb[_0x13a6('0x13')](_0x3cf04d?_0x13a6('0x4'):_0x13a6('0x1f'));const _0x12ba8=v(_0x2109eb)?_0x2109eb[_0x13a6('0x26')](_0x34ceeb):_0x2109eb['data'][_0x13a6('0x18')](_0x34ceeb);return await _0x2109eb['destroy'](),_0x12ba8;}
|
|
@@ -11,6 +11,7 @@ import { type Element, type Range } from 'ckeditor5/src/engine';
|
|
|
11
11
|
import { Users } from 'ckeditor5-collaboration/src/collaboration-core';
|
|
12
12
|
import TrackChangesCommand from './commands/trackchangescommand';
|
|
13
13
|
import Suggestion, { type SuggestionJSON } from './suggestion';
|
|
14
|
+
import TrackChangesAIAssistant from './integrations/aiassistant';
|
|
14
15
|
import TrackChangesAlignment from './integrations/alignment';
|
|
15
16
|
import TrackChangesBasicStyles from './integrations/basicstyles';
|
|
16
17
|
import TrackChangesBlockQuote from './integrations/blockquote';
|
|
@@ -19,6 +20,7 @@ import TrackChangesCodeBlock from './integrations/codeblock';
|
|
|
19
20
|
import TrackChangesComments from './integrations/comments';
|
|
20
21
|
import TrackChangesDeleteCommand from './integrations/deletecommand';
|
|
21
22
|
import TrackChangesDocumentList from './integrations/documentlist';
|
|
23
|
+
import TrackChangesDocumentListProperties from './integrations/documentlistproperties';
|
|
22
24
|
import TrackChangesEnterCommand from './integrations/entercommand';
|
|
23
25
|
import TrackChangesFindAndReplace from './integrations/findandreplace';
|
|
24
26
|
import TrackChangesFont from './integrations/font';
|
|
@@ -29,6 +31,7 @@ import TrackChangesHorizontalLine from './integrations/horizontalline';
|
|
|
29
31
|
import TrackChangesHtmlEmbed from './integrations/htmlembed';
|
|
30
32
|
import TrackChangesImage from './integrations/image';
|
|
31
33
|
import TrackChangesImageReplace from './integrations/imagereplace';
|
|
34
|
+
import TrackChangesImageStyle from './integrations/imagestyle';
|
|
32
35
|
import TrackChangesImportWord from './integrations/importword';
|
|
33
36
|
import TrackChangesIndent from './integrations/indent';
|
|
34
37
|
import TrackChangesInputCommand from './integrations/inputcommand';
|
|
@@ -54,9 +57,9 @@ import TrackChangesTableOfContents from './integrations/tableofcontents';
|
|
|
54
57
|
import TrackChangesTitle from './integrations/title';
|
|
55
58
|
import TrackChangesUndo from './integrations/undo';
|
|
56
59
|
import TrackChangesTableCaption from './integrations/tablecaption';
|
|
57
|
-
import TrackChangesDocumentListProperties from './integrations/documentlistproperties';
|
|
58
60
|
import TrackChangesTableProperties from './integrations/tableproperties';
|
|
59
61
|
import type { SuggestionData, TrackChangesAdapter } from './trackchanges';
|
|
62
|
+
export declare const renameAttributeKey = "$elementName";
|
|
60
63
|
/**
|
|
61
64
|
* Provides editing part of the {@link module:track-changes/trackchanges~TrackChanges track changes plugin}.
|
|
62
65
|
*/
|
|
@@ -71,7 +74,7 @@ export default class TrackChangesEditing extends Plugin {
|
|
|
71
74
|
* Reference to command that turns the track changes mode on and off.
|
|
72
75
|
*/
|
|
73
76
|
trackChangesCommand: TrackChangesCommand;
|
|
74
|
-
static get requires(): readonly ["CommentsRepository", typeof Users, typeof PendingActions, typeof TrackChangesAlignment, typeof TrackChangesBasicStyles, typeof TrackChangesBlockQuote, typeof TrackChangesCKBox, typeof TrackChangesCodeBlock, typeof TrackChangesComments, typeof TrackChangesDeleteCommand, typeof TrackChangesDocumentList, typeof TrackChangesDocumentListProperties, typeof TrackChangesEnterCommand, typeof TrackChangesFindAndReplace, typeof TrackChangesFont, typeof TrackChangesFormatPainter, typeof TrackChangesHeading, typeof TrackChangesHighlight, typeof TrackChangesHorizontalLine, typeof TrackChangesHtmlEmbed, typeof TrackChangesImage, typeof TrackChangesImageReplace, typeof TrackChangesImportWord, typeof TrackChangesIndent, typeof TrackChangesInputCommand, typeof TrackChangesLink, typeof TrackChangesList, typeof TrackChangesListProperties, typeof TrackChangesMediaEmbed, typeof TrackChangesMention, typeof TrackChangesPageBreak, typeof TrackChangesParagraph, typeof TrackChangesRemoveFormat, typeof TrackChangesRestrictedEditingMode, typeof TrackChangesShiftEnterCommand, typeof TrackChangesStandardEditingMode, typeof TrackChangesStylesDropdown, typeof TrackChangesTable, typeof TrackChangesTableMergeSplit, typeof TrackChangesTableHeadings, typeof TrackChangesTableCaption, typeof TrackChangesTableClipboard, typeof TrackChangesTableColumnResize, typeof TrackChangesTableOfContents, typeof TrackChangesTableProperties, typeof TrackChangesTemplate, typeof TrackChangesTitle, typeof TrackChangesUndo];
|
|
77
|
+
static get requires(): readonly ["CommentsRepository", typeof Users, typeof PendingActions, typeof TrackChangesAIAssistant, typeof TrackChangesAlignment, typeof TrackChangesBasicStyles, typeof TrackChangesBlockQuote, typeof TrackChangesCKBox, typeof TrackChangesCodeBlock, typeof TrackChangesComments, typeof TrackChangesDeleteCommand, typeof TrackChangesDocumentList, typeof TrackChangesDocumentListProperties, typeof TrackChangesEnterCommand, typeof TrackChangesFindAndReplace, typeof TrackChangesFont, typeof TrackChangesFormatPainter, typeof TrackChangesHeading, typeof TrackChangesHighlight, typeof TrackChangesHorizontalLine, typeof TrackChangesHtmlEmbed, typeof TrackChangesImage, typeof TrackChangesImageStyle, typeof TrackChangesImageReplace, typeof TrackChangesImportWord, typeof TrackChangesIndent, typeof TrackChangesInputCommand, typeof TrackChangesLink, typeof TrackChangesList, typeof TrackChangesListProperties, typeof TrackChangesMediaEmbed, typeof TrackChangesMention, typeof TrackChangesPageBreak, typeof TrackChangesParagraph, typeof TrackChangesRemoveFormat, typeof TrackChangesRestrictedEditingMode, typeof TrackChangesShiftEnterCommand, typeof TrackChangesStandardEditingMode, typeof TrackChangesStylesDropdown, typeof TrackChangesTable, typeof TrackChangesTableMergeSplit, typeof TrackChangesTableHeadings, typeof TrackChangesTableCaption, typeof TrackChangesTableClipboard, typeof TrackChangesTableColumnResize, typeof TrackChangesTableOfContents, typeof TrackChangesTableProperties, typeof TrackChangesTemplate, typeof TrackChangesTitle, typeof TrackChangesUndo];
|
|
75
78
|
static get pluginName(): "TrackChangesEditing";
|
|
76
79
|
/**
|
|
77
80
|
* @inheritDoc
|
|
@@ -438,6 +441,43 @@ export default class TrackChangesEditing extends Plugin {
|
|
|
438
441
|
* @returns Suggestion created or expanded as a result of execution of this method.
|
|
439
442
|
*/
|
|
440
443
|
markMultiRangeDeletion(ranges: Array<Range>, subType?: string, attributes?: Record<string, unknown>): Suggestion | null;
|
|
444
|
+
/**
|
|
445
|
+
* Marks a single-range attribute suggestion on the given `range`.
|
|
446
|
+
*
|
|
447
|
+
* Note: all nodes in the given `range` must have the same current value of `key` attribute.
|
|
448
|
+
*
|
|
449
|
+
* Note: if a block attribute is marked, `range` should include only a single model element.
|
|
450
|
+
*
|
|
451
|
+
* `attributes` is a required value and must include `groupId: string` property. The group id is used to group attribute suggestions
|
|
452
|
+
* together. All suggestions with the same `groupId` will be put into one suggestion chain. By default, all attribute suggestions
|
|
453
|
+
* created during the same batch have the same `groupId`.
|
|
454
|
+
*
|
|
455
|
+
* It's possible that more than one suggestion will be created by this method if there are already suggestions with the same
|
|
456
|
+
* `key` but a different `oldValue` intersecting with the given `range`.
|
|
457
|
+
*
|
|
458
|
+
* It is guaranteed that there will be no "conflicting" suggestions, that is, there will be no two intersecting suggestions for
|
|
459
|
+
* the same attribute `key`. If there is a conflicting suggestion, it will be partially or fully replaced by a new suggestion.
|
|
460
|
+
*
|
|
461
|
+
* This method should be used in `callback()` in
|
|
462
|
+
* {@link module:track-changes/trackchangesediting~TrackChangesEditing#enableCommand `TrackChangesEditing#enableCommand`}
|
|
463
|
+
* to inform the track changes plugin about a suggestion that happened.
|
|
464
|
+
*
|
|
465
|
+
* Always call this method inside `model.change()` or `model.enqueueChange()` block to ensure that all operations performed by
|
|
466
|
+
* this method are bound with one undo step.
|
|
467
|
+
*
|
|
468
|
+
* See {@glink features/collaboration/track-changes/track-changes-custom-features Integrating track changes with custom
|
|
469
|
+
* features guide} to learn more about enabling your feature in the suggestion mode.
|
|
470
|
+
*
|
|
471
|
+
* @param range Range for which the attribute has changed.
|
|
472
|
+
* @param key Key of the attribute that changed.
|
|
473
|
+
* @param oldValue Previous value of the attribute.
|
|
474
|
+
* @param newValue New value of the attribute.
|
|
475
|
+
* @param attributes Suggestion attributes. Must include `groupId`.
|
|
476
|
+
*/
|
|
477
|
+
markAttributeChange(range: Range, key: string, oldValue: unknown, newValue: unknown, attributes: {
|
|
478
|
+
groupId: string;
|
|
479
|
+
[key: string]: any;
|
|
480
|
+
}): Array<Suggestion>;
|
|
441
481
|
}
|
|
442
482
|
/**
|
|
443
483
|
* Command parameters and additional suggestion parameters. Passed value is also saved in
|
|
@@ -465,3 +505,20 @@ export type FormatData = {
|
|
|
465
505
|
multipleBlocks?: boolean;
|
|
466
506
|
[i: string]: unknown;
|
|
467
507
|
};
|
|
508
|
+
/**
|
|
509
|
+
* Attribute suggestion parameters.
|
|
510
|
+
*/
|
|
511
|
+
export type AttributeData = {
|
|
512
|
+
/**
|
|
513
|
+
* Attribute key.
|
|
514
|
+
*/
|
|
515
|
+
key: string;
|
|
516
|
+
/**
|
|
517
|
+
* Attribute's original value before the change happened.
|
|
518
|
+
*/
|
|
519
|
+
oldValue: unknown;
|
|
520
|
+
/**
|
|
521
|
+
* Attribute's value after the change happened.
|
|
522
|
+
*/
|
|
523
|
+
newValue: unknown;
|
|
524
|
+
};
|