@ckeditor/ckeditor5-engine 44.1.0-alpha.5 → 44.2.0-alpha.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 +1 -1
- package/dist/index-content.css +2 -2
- package/dist/index-editor.css +2 -2
- package/dist/index.css +4 -4
- package/dist/index.css.map +1 -1
- package/dist/index.js +646 -77
- package/dist/index.js.map +1 -1
- package/package.json +23 -3
- package/src/controller/datacontroller.d.ts +1 -1
- package/src/controller/datacontroller.js +1 -1
- package/src/controller/editingcontroller.d.ts +1 -1
- package/src/controller/editingcontroller.js +1 -1
- package/src/conversion/conversion.d.ts +1 -1
- package/src/conversion/conversion.js +1 -1
- package/src/conversion/conversionhelpers.d.ts +1 -1
- package/src/conversion/conversionhelpers.js +1 -1
- package/src/conversion/downcastdispatcher.d.ts +1 -1
- package/src/conversion/downcastdispatcher.js +1 -1
- package/src/conversion/downcasthelpers.d.ts +1 -1
- package/src/conversion/downcasthelpers.js +1 -1
- package/src/conversion/mapper.d.ts +249 -20
- package/src/conversion/mapper.js +524 -38
- package/src/conversion/modelconsumable.d.ts +1 -1
- package/src/conversion/modelconsumable.js +1 -1
- package/src/conversion/upcastdispatcher.d.ts +1 -1
- package/src/conversion/upcastdispatcher.js +1 -1
- package/src/conversion/upcasthelpers.d.ts +1 -1
- package/src/conversion/upcasthelpers.js +1 -1
- package/src/conversion/viewconsumable.d.ts +1 -1
- package/src/conversion/viewconsumable.js +1 -1
- package/src/dataprocessor/basichtmlwriter.d.ts +1 -1
- package/src/dataprocessor/basichtmlwriter.js +1 -1
- package/src/dataprocessor/dataprocessor.d.ts +1 -1
- package/src/dataprocessor/dataprocessor.js +1 -1
- package/src/dataprocessor/htmldataprocessor.d.ts +1 -1
- package/src/dataprocessor/htmldataprocessor.js +1 -1
- package/src/dataprocessor/htmlwriter.d.ts +1 -1
- package/src/dataprocessor/htmlwriter.js +1 -1
- package/src/dataprocessor/xmldataprocessor.d.ts +1 -1
- package/src/dataprocessor/xmldataprocessor.js +1 -1
- package/src/dev-utils/model.d.ts +1 -1
- package/src/dev-utils/model.js +1 -1
- package/src/dev-utils/operationreplayer.d.ts +1 -1
- package/src/dev-utils/operationreplayer.js +1 -1
- package/src/dev-utils/utils.d.ts +1 -1
- package/src/dev-utils/utils.js +1 -1
- package/src/dev-utils/view.d.ts +1 -1
- package/src/dev-utils/view.js +1 -1
- package/src/index.d.ts +4 -2
- package/src/index.js +2 -1
- package/src/model/batch.d.ts +1 -1
- package/src/model/batch.js +7 -3
- package/src/model/differ.d.ts +1 -1
- package/src/model/differ.js +1 -1
- package/src/model/document.d.ts +1 -1
- package/src/model/document.js +1 -1
- package/src/model/documentfragment.d.ts +1 -1
- package/src/model/documentfragment.js +1 -1
- package/src/model/documentselection.d.ts +1 -1
- package/src/model/documentselection.js +1 -1
- package/src/model/element.d.ts +1 -1
- package/src/model/element.js +1 -1
- package/src/model/history.d.ts +1 -1
- package/src/model/history.js +1 -1
- package/src/model/item.d.ts +1 -1
- package/src/model/item.js +1 -1
- package/src/model/liveposition.d.ts +1 -1
- package/src/model/liveposition.js +1 -1
- package/src/model/liverange.d.ts +1 -1
- package/src/model/liverange.js +1 -1
- package/src/model/markercollection.d.ts +1 -1
- package/src/model/markercollection.js +1 -1
- package/src/model/model.d.ts +1 -1
- package/src/model/model.js +1 -1
- package/src/model/node.d.ts +1 -1
- package/src/model/node.js +1 -1
- package/src/model/nodelist.d.ts +1 -1
- package/src/model/nodelist.js +1 -1
- package/src/model/operation/attributeoperation.d.ts +1 -1
- package/src/model/operation/attributeoperation.js +1 -1
- package/src/model/operation/detachoperation.d.ts +1 -1
- package/src/model/operation/detachoperation.js +1 -1
- package/src/model/operation/insertoperation.d.ts +1 -1
- package/src/model/operation/insertoperation.js +1 -1
- package/src/model/operation/markeroperation.d.ts +1 -1
- package/src/model/operation/markeroperation.js +1 -1
- package/src/model/operation/mergeoperation.d.ts +1 -1
- package/src/model/operation/mergeoperation.js +1 -1
- package/src/model/operation/moveoperation.d.ts +1 -1
- package/src/model/operation/moveoperation.js +1 -1
- package/src/model/operation/nooperation.d.ts +1 -1
- package/src/model/operation/nooperation.js +1 -1
- package/src/model/operation/operation.d.ts +4 -1
- package/src/model/operation/operation.js +2 -2
- package/src/model/operation/operationfactory.d.ts +1 -1
- package/src/model/operation/operationfactory.js +1 -1
- package/src/model/operation/renameoperation.d.ts +1 -1
- package/src/model/operation/renameoperation.js +1 -1
- package/src/model/operation/rootattributeoperation.d.ts +1 -1
- package/src/model/operation/rootattributeoperation.js +1 -1
- package/src/model/operation/rootoperation.d.ts +1 -1
- package/src/model/operation/rootoperation.js +1 -1
- package/src/model/operation/splitoperation.d.ts +1 -1
- package/src/model/operation/splitoperation.js +1 -1
- package/src/model/operation/transform.d.ts +1 -1
- package/src/model/operation/transform.js +1 -1
- package/src/model/operation/utils.d.ts +1 -1
- package/src/model/operation/utils.js +1 -1
- package/src/model/position.d.ts +1 -1
- package/src/model/position.js +1 -1
- package/src/model/range.d.ts +1 -1
- package/src/model/range.js +1 -1
- package/src/model/rootelement.d.ts +1 -1
- package/src/model/rootelement.js +1 -1
- package/src/model/schema.d.ts +1 -1
- package/src/model/schema.js +1 -1
- package/src/model/selection.d.ts +1 -1
- package/src/model/selection.js +9 -2
- package/src/model/text.d.ts +1 -1
- package/src/model/text.js +1 -1
- package/src/model/textproxy.d.ts +1 -1
- package/src/model/textproxy.js +1 -1
- package/src/model/treewalker.d.ts +17 -1
- package/src/model/treewalker.js +26 -1
- package/src/model/typecheckable.d.ts +1 -1
- package/src/model/typecheckable.js +1 -1
- package/src/model/utils/autoparagraphing.d.ts +1 -1
- package/src/model/utils/autoparagraphing.js +1 -1
- package/src/model/utils/deletecontent.d.ts +1 -1
- package/src/model/utils/deletecontent.js +1 -1
- package/src/model/utils/getselectedcontent.d.ts +1 -1
- package/src/model/utils/getselectedcontent.js +1 -1
- package/src/model/utils/insertcontent.d.ts +1 -1
- package/src/model/utils/insertcontent.js +1 -1
- package/src/model/utils/insertobject.d.ts +1 -1
- package/src/model/utils/insertobject.js +1 -1
- package/src/model/utils/modifyselection.d.ts +1 -1
- package/src/model/utils/modifyselection.js +1 -1
- package/src/model/utils/selection-post-fixer.d.ts +1 -1
- package/src/model/utils/selection-post-fixer.js +1 -1
- package/src/model/writer.d.ts +1 -1
- package/src/model/writer.js +1 -1
- package/src/view/attributeelement.d.ts +1 -1
- package/src/view/attributeelement.js +1 -1
- package/src/view/containerelement.d.ts +1 -1
- package/src/view/containerelement.js +1 -1
- package/src/view/datatransfer.d.ts +1 -1
- package/src/view/datatransfer.js +1 -1
- package/src/view/document.d.ts +1 -1
- package/src/view/document.js +1 -1
- package/src/view/documentfragment.d.ts +6 -4
- package/src/view/documentfragment.js +7 -7
- package/src/view/documentselection.d.ts +1 -1
- package/src/view/documentselection.js +1 -1
- package/src/view/domconverter.d.ts +1 -1
- package/src/view/domconverter.js +1 -1
- package/src/view/downcastwriter.d.ts +1 -1
- package/src/view/downcastwriter.js +1 -1
- package/src/view/editableelement.d.ts +1 -1
- package/src/view/editableelement.js +1 -1
- package/src/view/element.d.ts +1 -1
- package/src/view/element.js +3 -3
- package/src/view/elementdefinition.d.ts +1 -1
- package/src/view/elementdefinition.js +1 -1
- package/src/view/emptyelement.d.ts +1 -1
- package/src/view/emptyelement.js +1 -1
- package/src/view/filler.d.ts +1 -1
- package/src/view/filler.js +1 -1
- package/src/view/item.d.ts +1 -1
- package/src/view/item.js +1 -1
- package/src/view/matcher.d.ts +1 -1
- package/src/view/matcher.js +1 -1
- package/src/view/node.d.ts +13 -4
- package/src/view/node.js +5 -4
- package/src/view/observer/arrowkeysobserver.d.ts +1 -1
- package/src/view/observer/arrowkeysobserver.js +1 -1
- package/src/view/observer/bubblingemittermixin.d.ts +1 -1
- package/src/view/observer/bubblingemittermixin.js +1 -1
- package/src/view/observer/bubblingeventinfo.d.ts +1 -1
- package/src/view/observer/bubblingeventinfo.js +1 -1
- package/src/view/observer/clickobserver.d.ts +1 -1
- package/src/view/observer/clickobserver.js +1 -1
- package/src/view/observer/compositionobserver.d.ts +1 -1
- package/src/view/observer/compositionobserver.js +1 -1
- package/src/view/observer/domeventdata.d.ts +1 -1
- package/src/view/observer/domeventdata.js +1 -1
- package/src/view/observer/domeventobserver.d.ts +1 -1
- package/src/view/observer/domeventobserver.js +1 -1
- package/src/view/observer/fakeselectionobserver.d.ts +1 -1
- package/src/view/observer/fakeselectionobserver.js +1 -1
- package/src/view/observer/focusobserver.d.ts +1 -1
- package/src/view/observer/focusobserver.js +1 -1
- package/src/view/observer/inputobserver.d.ts +1 -1
- package/src/view/observer/inputobserver.js +1 -1
- package/src/view/observer/keyobserver.d.ts +1 -1
- package/src/view/observer/keyobserver.js +1 -1
- package/src/view/observer/mouseobserver.d.ts +1 -1
- package/src/view/observer/mouseobserver.js +1 -1
- package/src/view/observer/mutationobserver.d.ts +1 -1
- package/src/view/observer/mutationobserver.js +1 -1
- package/src/view/observer/observer.d.ts +1 -1
- package/src/view/observer/observer.js +1 -1
- package/src/view/observer/selectionobserver.d.ts +1 -1
- package/src/view/observer/selectionobserver.js +1 -1
- package/src/view/observer/tabobserver.d.ts +1 -1
- package/src/view/observer/tabobserver.js +1 -1
- package/src/view/observer/touchobserver.d.ts +73 -0
- package/src/view/observer/touchobserver.js +29 -0
- package/src/view/placeholder.d.ts +1 -1
- package/src/view/placeholder.js +23 -17
- package/src/view/position.d.ts +1 -1
- package/src/view/position.js +1 -1
- package/src/view/range.d.ts +1 -1
- package/src/view/range.js +1 -1
- package/src/view/rawelement.d.ts +1 -1
- package/src/view/rawelement.js +1 -1
- package/src/view/renderer.d.ts +1 -1
- package/src/view/renderer.js +1 -1
- package/src/view/rooteditableelement.d.ts +1 -1
- package/src/view/rooteditableelement.js +1 -1
- package/src/view/selection.d.ts +1 -1
- package/src/view/selection.js +1 -1
- package/src/view/styles/background.d.ts +1 -1
- package/src/view/styles/background.js +1 -1
- package/src/view/styles/border.d.ts +1 -1
- package/src/view/styles/border.js +1 -1
- package/src/view/styles/margin.d.ts +1 -1
- package/src/view/styles/margin.js +1 -1
- package/src/view/styles/padding.d.ts +1 -1
- package/src/view/styles/padding.js +1 -1
- package/src/view/styles/utils.d.ts +1 -1
- package/src/view/styles/utils.js +1 -1
- package/src/view/stylesmap.d.ts +1 -1
- package/src/view/stylesmap.js +1 -1
- package/src/view/text.d.ts +1 -1
- package/src/view/text.js +1 -1
- package/src/view/textproxy.d.ts +1 -1
- package/src/view/textproxy.js +1 -1
- package/src/view/treewalker.d.ts +17 -1
- package/src/view/treewalker.js +25 -1
- package/src/view/typecheckable.d.ts +1 -1
- package/src/view/typecheckable.js +1 -1
- package/src/view/uielement.d.ts +1 -1
- package/src/view/uielement.js +1 -1
- package/src/view/upcastwriter.d.ts +1 -1
- package/src/view/upcastwriter.js +1 -1
- package/src/view/view.d.ts +1 -1
- package/src/view/view.js +1 -1
- package/theme/placeholder.css +1 -1
- package/theme/renderer.css +1 -1
- package/dist/controller/datacontroller.d.ts +0 -339
- package/dist/controller/editingcontroller.d.ts +0 -102
- package/dist/conversion/conversion.d.ts +0 -482
- package/dist/conversion/conversionhelpers.d.ts +0 -30
- package/dist/conversion/downcastdispatcher.d.ts +0 -566
- package/dist/conversion/downcasthelpers.d.ts +0 -1194
- package/dist/conversion/mapper.d.ts +0 -507
- package/dist/conversion/modelconsumable.d.ts +0 -205
- package/dist/conversion/upcastdispatcher.d.ts +0 -496
- package/dist/conversion/upcasthelpers.d.ts +0 -503
- package/dist/conversion/viewconsumable.d.ts +0 -373
- package/dist/dataprocessor/basichtmlwriter.d.ts +0 -22
- package/dist/dataprocessor/dataprocessor.d.ts +0 -65
- package/dist/dataprocessor/htmldataprocessor.d.ts +0 -80
- package/dist/dataprocessor/htmlwriter.d.ts +0 -20
- package/dist/dataprocessor/xmldataprocessor.d.ts +0 -94
- package/dist/dev-utils/model.d.ts +0 -130
- package/dist/dev-utils/operationreplayer.d.ts +0 -55
- package/dist/dev-utils/utils.d.ts +0 -41
- package/dist/dev-utils/view.d.ts +0 -324
- package/dist/index.d.ts +0 -122
- package/dist/model/batch.d.ts +0 -110
- package/dist/model/differ.d.ts +0 -511
- package/dist/model/document.d.ts +0 -278
- package/dist/model/documentfragment.d.ts +0 -223
- package/dist/model/documentselection.d.ts +0 -424
- package/dist/model/element.d.ts +0 -191
- package/dist/model/history.d.ts +0 -118
- package/dist/model/item.d.ts +0 -18
- package/dist/model/liveposition.d.ts +0 -81
- package/dist/model/liverange.d.ts +0 -106
- package/dist/model/markercollection.d.ts +0 -339
- package/dist/model/model.d.ts +0 -923
- package/dist/model/node.d.ts +0 -262
- package/dist/model/nodelist.d.ts +0 -119
- package/dist/model/operation/attributeoperation.d.ts +0 -107
- package/dist/model/operation/detachoperation.d.ts +0 -64
- package/dist/model/operation/insertoperation.d.ts +0 -94
- package/dist/model/operation/markeroperation.d.ts +0 -95
- package/dist/model/operation/mergeoperation.d.ts +0 -104
- package/dist/model/operation/moveoperation.d.ts +0 -100
- package/dist/model/operation/nooperation.d.ts +0 -42
- package/dist/model/operation/operation.d.ts +0 -100
- package/dist/model/operation/operationfactory.d.ts +0 -22
- package/dist/model/operation/renameoperation.d.ts +0 -87
- package/dist/model/operation/rootattributeoperation.d.ts +0 -102
- package/dist/model/operation/rootoperation.d.ts +0 -80
- package/dist/model/operation/splitoperation.d.ts +0 -113
- package/dist/model/operation/transform.d.ts +0 -104
- package/dist/model/operation/utils.d.ts +0 -75
- package/dist/model/position.d.ts +0 -549
- package/dist/model/range.d.ts +0 -462
- package/dist/model/rootelement.d.ts +0 -64
- package/dist/model/schema.d.ts +0 -1334
- package/dist/model/selection.d.ts +0 -486
- package/dist/model/text.d.ts +0 -70
- package/dist/model/textproxy.d.ts +0 -148
- package/dist/model/treewalker.d.ts +0 -190
- package/dist/model/typecheckable.d.ts +0 -289
- package/dist/model/utils/autoparagraphing.d.ts +0 -41
- package/dist/model/utils/deletecontent.d.ts +0 -62
- package/dist/model/utils/getselectedcontent.d.ts +0 -34
- package/dist/model/utils/insertcontent.d.ts +0 -50
- package/dist/model/utils/insertobject.d.ts +0 -51
- package/dist/model/utils/modifyselection.d.ts +0 -52
- package/dist/model/utils/selection-post-fixer.d.ts +0 -78
- package/dist/model/writer.d.ts +0 -855
- package/dist/view/attributeelement.d.ts +0 -112
- package/dist/view/containerelement.d.ts +0 -53
- package/dist/view/datatransfer.d.ts +0 -83
- package/dist/view/document.d.ts +0 -188
- package/dist/view/documentfragment.d.ts +0 -157
- package/dist/view/documentselection.d.ts +0 -310
- package/dist/view/domconverter.d.ts +0 -665
- package/dist/view/downcastwriter.d.ts +0 -1000
- package/dist/view/editableelement.d.ts +0 -66
- package/dist/view/element.d.ts +0 -472
- package/dist/view/elementdefinition.d.ts +0 -91
- package/dist/view/emptyelement.d.ts +0 -45
- package/dist/view/filler.d.ts +0 -115
- package/dist/view/item.d.ts +0 -18
- package/dist/view/matcher.d.ts +0 -490
- package/dist/view/node.d.ts +0 -166
- package/dist/view/observer/arrowkeysobserver.d.ts +0 -49
- package/dist/view/observer/bubblingemittermixin.d.ts +0 -170
- package/dist/view/observer/bubblingeventinfo.d.ts +0 -51
- package/dist/view/observer/clickobserver.d.ts +0 -47
- package/dist/view/observer/compositionobserver.d.ts +0 -86
- package/dist/view/observer/domeventdata.d.ts +0 -54
- package/dist/view/observer/domeventobserver.d.ts +0 -82
- package/dist/view/observer/fakeselectionobserver.d.ts +0 -51
- package/dist/view/observer/focusobserver.d.ts +0 -98
- package/dist/view/observer/inputobserver.d.ts +0 -90
- package/dist/view/observer/keyobserver.d.ts +0 -70
- package/dist/view/observer/mouseobserver.d.ts +0 -93
- package/dist/view/observer/mutationobserver.d.ts +0 -119
- package/dist/view/observer/observer.d.ts +0 -93
- package/dist/view/observer/selectionobserver.d.ts +0 -151
- package/dist/view/observer/tabobserver.d.ts +0 -50
- package/dist/view/placeholder.d.ts +0 -100
- package/dist/view/position.d.ts +0 -192
- package/dist/view/range.d.ts +0 -283
- package/dist/view/rawelement.d.ts +0 -77
- package/dist/view/renderer.d.ts +0 -281
- package/dist/view/rooteditableelement.d.ts +0 -45
- package/dist/view/selection.d.ts +0 -379
- package/dist/view/styles/background.d.ts +0 -37
- package/dist/view/styles/border.d.ts +0 -47
- package/dist/view/styles/margin.d.ts +0 -33
- package/dist/view/styles/padding.d.ts +0 -33
- package/dist/view/styles/utils.d.ts +0 -97
- package/dist/view/stylesmap.d.ts +0 -685
- package/dist/view/text.d.ts +0 -78
- package/dist/view/textproxy.d.ts +0 -101
- package/dist/view/treewalker.d.ts +0 -199
- package/dist/view/typecheckable.d.ts +0 -452
- package/dist/view/uielement.d.ts +0 -100
- package/dist/view/upcastwriter.d.ts +0 -421
- package/dist/view/view.d.ts +0 -488
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module engine/model/operation/markeroperation
|
|
11
|
-
*/
|
|
12
|
-
import Operation from './operation.js';
|
|
13
|
-
import Range from '../range.js';
|
|
14
|
-
import type Document from '../document.js';
|
|
15
|
-
import type MarkerCollection from '../markercollection.js';
|
|
16
|
-
import type { Selectable } from '../selection.js';
|
|
17
|
-
export default class MarkerOperation extends Operation {
|
|
18
|
-
/**
|
|
19
|
-
* Marker name.
|
|
20
|
-
*
|
|
21
|
-
* @readonly
|
|
22
|
-
*/
|
|
23
|
-
name: string;
|
|
24
|
-
/**
|
|
25
|
-
* Marker range before the change.
|
|
26
|
-
*
|
|
27
|
-
* @readonly
|
|
28
|
-
*/
|
|
29
|
-
oldRange: Range | null;
|
|
30
|
-
/**
|
|
31
|
-
* Marker range after the change.
|
|
32
|
-
*
|
|
33
|
-
* @readonly
|
|
34
|
-
*/
|
|
35
|
-
newRange: Range | null;
|
|
36
|
-
/**
|
|
37
|
-
* Specifies whether the marker operation affects the data produced by the data pipeline
|
|
38
|
-
* (is persisted in the editor's data).
|
|
39
|
-
*
|
|
40
|
-
* @readonly
|
|
41
|
-
*/
|
|
42
|
-
affectsData: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Marker collection on which change should be executed.
|
|
45
|
-
*/
|
|
46
|
-
private readonly _markers;
|
|
47
|
-
/**
|
|
48
|
-
* @param name Marker name.
|
|
49
|
-
* @param oldRange Marker range before the change.
|
|
50
|
-
* @param newRange Marker range after the change.
|
|
51
|
-
* @param markers Marker collection on which change should be executed.
|
|
52
|
-
* @param affectsData Specifies whether the marker operation affects the data produced by the data pipeline
|
|
53
|
-
* (is persisted in the editor's data).
|
|
54
|
-
* @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation
|
|
55
|
-
* can be applied or `null` if the operation operates on detached (non-document) tree.
|
|
56
|
-
*/
|
|
57
|
-
constructor(name: string, oldRange: Range | null, newRange: Range | null, markers: MarkerCollection, affectsData: boolean, baseVersion: number | null);
|
|
58
|
-
/**
|
|
59
|
-
* @inheritDoc
|
|
60
|
-
*/
|
|
61
|
-
get type(): 'marker';
|
|
62
|
-
/**
|
|
63
|
-
* @inheritDoc
|
|
64
|
-
*/
|
|
65
|
-
get affectedSelectable(): Selectable;
|
|
66
|
-
/**
|
|
67
|
-
* Creates and returns an operation that has the same parameters as this operation.
|
|
68
|
-
*/
|
|
69
|
-
clone(): MarkerOperation;
|
|
70
|
-
/**
|
|
71
|
-
* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
|
|
72
|
-
*/
|
|
73
|
-
getReversed(): Operation;
|
|
74
|
-
/**
|
|
75
|
-
* @inheritDoc
|
|
76
|
-
* @internal
|
|
77
|
-
*/
|
|
78
|
-
_execute(): void;
|
|
79
|
-
/**
|
|
80
|
-
* @inheritDoc
|
|
81
|
-
* @internal
|
|
82
|
-
*/
|
|
83
|
-
toJSON(): unknown;
|
|
84
|
-
/**
|
|
85
|
-
* @inheritDoc
|
|
86
|
-
*/
|
|
87
|
-
static get className(): string;
|
|
88
|
-
/**
|
|
89
|
-
* Creates `MarkerOperation` object from deserialized object, i.e. from parsed JSON string.
|
|
90
|
-
*
|
|
91
|
-
* @param json Deserialized JSON object.
|
|
92
|
-
* @param document Document on which this operation will be applied.
|
|
93
|
-
*/
|
|
94
|
-
static fromJSON(json: any, document: Document): MarkerOperation;
|
|
95
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module engine/model/operation/mergeoperation
|
|
11
|
-
*/
|
|
12
|
-
import Operation from './operation.js';
|
|
13
|
-
import Position from '../position.js';
|
|
14
|
-
import Range from '../range.js';
|
|
15
|
-
import type Document from '../document.js';
|
|
16
|
-
import type { Selectable } from '../selection.js';
|
|
17
|
-
/**
|
|
18
|
-
* Operation to merge two {@link module:engine/model/element~Element elements}.
|
|
19
|
-
*
|
|
20
|
-
* The merged element is the parent of {@link ~MergeOperation#sourcePosition} and it is merged into the parent of
|
|
21
|
-
* {@link ~MergeOperation#targetPosition}. All nodes from the merged element are moved to {@link ~MergeOperation#targetPosition}.
|
|
22
|
-
*
|
|
23
|
-
* The merged element is moved to the graveyard at {@link ~MergeOperation#graveyardPosition}.
|
|
24
|
-
*/
|
|
25
|
-
export default class MergeOperation extends Operation {
|
|
26
|
-
/**
|
|
27
|
-
* Position inside the merged element. All nodes from that element after that position will be moved to {@link #targetPosition}.
|
|
28
|
-
*/
|
|
29
|
-
sourcePosition: Position;
|
|
30
|
-
/**
|
|
31
|
-
* Summary offset size of nodes which will be moved from the merged element to the new parent.
|
|
32
|
-
*/
|
|
33
|
-
howMany: number;
|
|
34
|
-
/**
|
|
35
|
-
* Position which the nodes from the merged elements will be moved to.
|
|
36
|
-
*/
|
|
37
|
-
targetPosition: Position;
|
|
38
|
-
/**
|
|
39
|
-
* Position in graveyard to which the merged element will be moved.
|
|
40
|
-
*/
|
|
41
|
-
graveyardPosition: Position;
|
|
42
|
-
/**
|
|
43
|
-
* Creates a merge operation.
|
|
44
|
-
*
|
|
45
|
-
* @param sourcePosition Position inside the merged element. All nodes from that
|
|
46
|
-
* element after that position will be moved to {@link #targetPosition}.
|
|
47
|
-
* @param howMany Summary offset size of nodes which will be moved from the merged element to the new parent.
|
|
48
|
-
* @param targetPosition Position which the nodes from the merged elements will be moved to.
|
|
49
|
-
* @param graveyardPosition Position in graveyard to which the merged element will be moved.
|
|
50
|
-
* @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation
|
|
51
|
-
* can be applied or `null` if the operation operates on detached (non-document) tree.
|
|
52
|
-
*/
|
|
53
|
-
constructor(sourcePosition: Position, howMany: number, targetPosition: Position, graveyardPosition: Position, baseVersion: number | null);
|
|
54
|
-
/**
|
|
55
|
-
* @inheritDoc
|
|
56
|
-
*/
|
|
57
|
-
get type(): 'merge';
|
|
58
|
-
/**
|
|
59
|
-
* Position before the merged element (which will be deleted).
|
|
60
|
-
*/
|
|
61
|
-
get deletionPosition(): Position;
|
|
62
|
-
/**
|
|
63
|
-
* Artificial range that contains all the nodes from the merged element that will be moved to {@link ~MergeOperation#sourcePosition}.
|
|
64
|
-
* The range starts at {@link ~MergeOperation#sourcePosition} and ends in the same parent, at `POSITIVE_INFINITY` offset.
|
|
65
|
-
*/
|
|
66
|
-
get movedRange(): Range;
|
|
67
|
-
/**
|
|
68
|
-
* @inheritDoc
|
|
69
|
-
*/
|
|
70
|
-
get affectedSelectable(): Selectable;
|
|
71
|
-
/**
|
|
72
|
-
* Creates and returns an operation that has the same parameters as this operation.
|
|
73
|
-
*/
|
|
74
|
-
clone(): MergeOperation;
|
|
75
|
-
/**
|
|
76
|
-
* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
|
|
77
|
-
*/
|
|
78
|
-
getReversed(): Operation;
|
|
79
|
-
/**
|
|
80
|
-
* @inheritDoc
|
|
81
|
-
* @internal
|
|
82
|
-
*/
|
|
83
|
-
_validate(): void;
|
|
84
|
-
/**
|
|
85
|
-
* @inheritDoc
|
|
86
|
-
* @internal
|
|
87
|
-
*/
|
|
88
|
-
_execute(): void;
|
|
89
|
-
/**
|
|
90
|
-
* @inheritDoc
|
|
91
|
-
*/
|
|
92
|
-
toJSON(): unknown;
|
|
93
|
-
/**
|
|
94
|
-
* @inheritDoc
|
|
95
|
-
*/
|
|
96
|
-
static get className(): string;
|
|
97
|
-
/**
|
|
98
|
-
* Creates `MergeOperation` object from deserialized object, i.e. from parsed JSON string.
|
|
99
|
-
*
|
|
100
|
-
* @param json Deserialized JSON object.
|
|
101
|
-
* @param document Document on which this operation will be applied.
|
|
102
|
-
*/
|
|
103
|
-
static fromJSON(json: any, document: Document): MergeOperation;
|
|
104
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module engine/model/operation/moveoperation
|
|
11
|
-
*/
|
|
12
|
-
import Operation from './operation.js';
|
|
13
|
-
import Position from '../position.js';
|
|
14
|
-
import type { Selectable } from '../selection.js';
|
|
15
|
-
import type Document from '../document.js';
|
|
16
|
-
/**
|
|
17
|
-
* Operation to move a range of {@link module:engine/model/item~Item model items}
|
|
18
|
-
* to given {@link module:engine/model/position~Position target position}.
|
|
19
|
-
*/
|
|
20
|
-
export default class MoveOperation extends Operation {
|
|
21
|
-
/**
|
|
22
|
-
* Position before the first {@link module:engine/model/item~Item model item} to move.
|
|
23
|
-
*/
|
|
24
|
-
sourcePosition: Position;
|
|
25
|
-
/**
|
|
26
|
-
* Offset size of moved range.
|
|
27
|
-
*/
|
|
28
|
-
howMany: number;
|
|
29
|
-
/**
|
|
30
|
-
* Position at which moved nodes will be inserted.
|
|
31
|
-
*/
|
|
32
|
-
targetPosition: Position;
|
|
33
|
-
/**
|
|
34
|
-
* Creates a move operation.
|
|
35
|
-
*
|
|
36
|
-
* @param sourcePosition Position before the first {@link module:engine/model/item~Item model item} to move.
|
|
37
|
-
* @param howMany Offset size of moved range. Moved range will start from `sourcePosition` and end at
|
|
38
|
-
* `sourcePosition` with offset shifted by `howMany`.
|
|
39
|
-
* @param targetPosition Position at which moved nodes will be inserted.
|
|
40
|
-
* @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation
|
|
41
|
-
* can be applied or `null` if the operation operates on detached (non-document) tree.
|
|
42
|
-
*/
|
|
43
|
-
constructor(sourcePosition: Position, howMany: number, targetPosition: Position, baseVersion: number | null);
|
|
44
|
-
/**
|
|
45
|
-
* @inheritDoc
|
|
46
|
-
*/
|
|
47
|
-
get type(): 'move' | 'remove' | 'reinsert';
|
|
48
|
-
/**
|
|
49
|
-
* @inheritDoc
|
|
50
|
-
*/
|
|
51
|
-
get affectedSelectable(): Selectable;
|
|
52
|
-
/**
|
|
53
|
-
* Creates and returns an operation that has the same parameters as this operation.
|
|
54
|
-
*/
|
|
55
|
-
clone(): MoveOperation;
|
|
56
|
-
/**
|
|
57
|
-
* Returns the start position of the moved range after it got moved. This may be different than
|
|
58
|
-
* {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition} in some cases, i.e. when a range is moved
|
|
59
|
-
* inside the same parent but {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition targetPosition}
|
|
60
|
-
* is after {@link module:engine/model/operation/moveoperation~MoveOperation#sourcePosition sourcePosition}.
|
|
61
|
-
*
|
|
62
|
-
* ```
|
|
63
|
-
* vv vv
|
|
64
|
-
* abcdefg ===> adefbcg
|
|
65
|
-
* ^ ^
|
|
66
|
-
* targetPos movedRangeStart
|
|
67
|
-
* offset 6 offset 4
|
|
68
|
-
*```
|
|
69
|
-
*/
|
|
70
|
-
getMovedRangeStart(): Position;
|
|
71
|
-
/**
|
|
72
|
-
* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
|
|
73
|
-
*/
|
|
74
|
-
getReversed(): Operation;
|
|
75
|
-
/**
|
|
76
|
-
* @inheritDoc
|
|
77
|
-
* @internal
|
|
78
|
-
*/
|
|
79
|
-
_validate(): void;
|
|
80
|
-
/**
|
|
81
|
-
* @inheritDoc
|
|
82
|
-
* @internal
|
|
83
|
-
*/
|
|
84
|
-
_execute(): void;
|
|
85
|
-
/**
|
|
86
|
-
* @inheritDoc
|
|
87
|
-
*/
|
|
88
|
-
toJSON(): unknown;
|
|
89
|
-
/**
|
|
90
|
-
* @inheritDoc
|
|
91
|
-
*/
|
|
92
|
-
static get className(): string;
|
|
93
|
-
/**
|
|
94
|
-
* Creates `MoveOperation` object from deserialized object, i.e. from parsed JSON string.
|
|
95
|
-
*
|
|
96
|
-
* @param json Deserialized JSON object.
|
|
97
|
-
* @param document Document on which this operation will be applied.
|
|
98
|
-
*/
|
|
99
|
-
static fromJSON(json: any, document: Document): MoveOperation;
|
|
100
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module engine/model/operation/nooperation
|
|
11
|
-
*/
|
|
12
|
-
import Operation from './operation.js';
|
|
13
|
-
import type { Selectable } from '../selection.js';
|
|
14
|
-
/**
|
|
15
|
-
* Operation which is doing nothing ("empty operation", "do-nothing operation", "noop"). This is an operation,
|
|
16
|
-
* which when executed does not change the tree model. It still has some parameters defined for transformation purposes.
|
|
17
|
-
*
|
|
18
|
-
* In most cases this operation is a result of transforming operations. When transformation returns
|
|
19
|
-
* {@link module:engine/model/operation/nooperation~NoOperation} it means that changes done by the transformed operation
|
|
20
|
-
* have already been applied.
|
|
21
|
-
*/
|
|
22
|
-
export default class NoOperation extends Operation {
|
|
23
|
-
get type(): 'noop';
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
get affectedSelectable(): Selectable;
|
|
28
|
-
/**
|
|
29
|
-
* Creates and returns an operation that has the same parameters as this operation.
|
|
30
|
-
*/
|
|
31
|
-
clone(): NoOperation;
|
|
32
|
-
/**
|
|
33
|
-
* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
|
|
34
|
-
*/
|
|
35
|
-
getReversed(): Operation;
|
|
36
|
-
/** @internal */
|
|
37
|
-
_execute(): void;
|
|
38
|
-
/**
|
|
39
|
-
* @inheritDoc
|
|
40
|
-
*/
|
|
41
|
-
static get className(): string;
|
|
42
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module engine/model/operation/operation
|
|
11
|
-
*/
|
|
12
|
-
import type Batch from '../batch.js';
|
|
13
|
-
import type Document from '../document.js';
|
|
14
|
-
import type { Selectable } from '../selection.js';
|
|
15
|
-
/**
|
|
16
|
-
* Abstract base operation class.
|
|
17
|
-
*/
|
|
18
|
-
export default abstract class Operation {
|
|
19
|
-
/**
|
|
20
|
-
* {@link module:engine/model/document~Document#version} on which operation can be applied. If you try to
|
|
21
|
-
* {@link module:engine/model/model~Model#applyOperation apply} operation with different base version than the
|
|
22
|
-
* {@link module:engine/model/document~Document#version document version} the
|
|
23
|
-
* {@link module:utils/ckeditorerror~CKEditorError model-document-applyOperation-wrong-version} error is thrown.
|
|
24
|
-
*/
|
|
25
|
-
baseVersion: number | null;
|
|
26
|
-
/**
|
|
27
|
-
* Defines whether operation is executed on attached or detached {@link module:engine/model/item~Item items}.
|
|
28
|
-
*/
|
|
29
|
-
readonly isDocumentOperation: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* {@link module:engine/model/batch~Batch Batch} to which the operation is added or `null` if the operation is not
|
|
32
|
-
* added to any batch yet.
|
|
33
|
-
*/
|
|
34
|
-
batch: Batch | null;
|
|
35
|
-
/**
|
|
36
|
-
* Operation type.
|
|
37
|
-
*/
|
|
38
|
-
abstract readonly type: string;
|
|
39
|
-
/**
|
|
40
|
-
* Base operation constructor.
|
|
41
|
-
*
|
|
42
|
-
* @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation
|
|
43
|
-
* can be applied or `null` if the operation operates on detached (non-document) tree.
|
|
44
|
-
*/
|
|
45
|
-
constructor(baseVersion: number | null);
|
|
46
|
-
/**
|
|
47
|
-
* A selectable that will be affected by the operation after it is executed.
|
|
48
|
-
*
|
|
49
|
-
* The exact returned parameter differs between operation types.
|
|
50
|
-
*/
|
|
51
|
-
abstract get affectedSelectable(): Selectable;
|
|
52
|
-
/**
|
|
53
|
-
* Creates and returns an operation that has the same parameters as this operation.
|
|
54
|
-
*
|
|
55
|
-
* @returns Clone of this operation.
|
|
56
|
-
*/
|
|
57
|
-
abstract clone(): Operation;
|
|
58
|
-
/**
|
|
59
|
-
* Creates and returns a reverse operation. Reverse operation when executed right after
|
|
60
|
-
* the original operation will bring back tree model state to the point before the original
|
|
61
|
-
* operation execution. In other words, it reverses changes done by the original operation.
|
|
62
|
-
*
|
|
63
|
-
* Keep in mind that tree model state may change since executing the original operation,
|
|
64
|
-
* so reverse operation will be "outdated". In that case you will need to transform it by
|
|
65
|
-
* all operations that were executed after the original operation.
|
|
66
|
-
*
|
|
67
|
-
* @returns Reversed operation.
|
|
68
|
-
*/
|
|
69
|
-
abstract getReversed(): Operation;
|
|
70
|
-
/**
|
|
71
|
-
* Executes the operation - modifications described by the operation properties will be applied to the model tree.
|
|
72
|
-
*
|
|
73
|
-
* @internal
|
|
74
|
-
*/
|
|
75
|
-
abstract _execute(): void;
|
|
76
|
-
/**
|
|
77
|
-
* Checks whether the operation's parameters are correct and the operation can be correctly executed. Throws
|
|
78
|
-
* an error if operation is not valid.
|
|
79
|
-
*
|
|
80
|
-
* @internal
|
|
81
|
-
*/
|
|
82
|
-
_validate(): void;
|
|
83
|
-
/**
|
|
84
|
-
* Custom toJSON method to solve child-parent circular dependencies.
|
|
85
|
-
*
|
|
86
|
-
* @returns Clone of this object with the operation property replaced with string.
|
|
87
|
-
*/
|
|
88
|
-
toJSON(): unknown;
|
|
89
|
-
/**
|
|
90
|
-
* Name of the operation class used for serialization.
|
|
91
|
-
*/
|
|
92
|
-
static get className(): string;
|
|
93
|
-
/**
|
|
94
|
-
* Creates `Operation` object from deserialized object, i.e. from parsed JSON string.
|
|
95
|
-
*
|
|
96
|
-
* @param json Deserialized JSON object.
|
|
97
|
-
* @param doc Document on which this operation will be applied.
|
|
98
|
-
*/
|
|
99
|
-
static fromJSON(json: any, document: Document): Operation;
|
|
100
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
import Operation from './operation.js';
|
|
10
|
-
import type Document from '../document.js';
|
|
11
|
-
/**
|
|
12
|
-
* A factory class for creating operations.
|
|
13
|
-
*/
|
|
14
|
-
export default abstract class OperationFactory {
|
|
15
|
-
/**
|
|
16
|
-
* Creates an operation instance from a JSON object (parsed JSON string).
|
|
17
|
-
*
|
|
18
|
-
* @param json Deserialized JSON object.
|
|
19
|
-
* @param document Document on which this operation will be applied.
|
|
20
|
-
*/
|
|
21
|
-
static fromJSON(json: any, document: Document): Operation;
|
|
22
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module engine/model/operation/renameoperation
|
|
11
|
-
*/
|
|
12
|
-
import Operation from './operation.js';
|
|
13
|
-
import Position from '../position.js';
|
|
14
|
-
import type Document from '../document.js';
|
|
15
|
-
import type { Selectable } from '../selection.js';
|
|
16
|
-
/**
|
|
17
|
-
* Operation to change element's name.
|
|
18
|
-
*
|
|
19
|
-
* Using this class you can change element's name.
|
|
20
|
-
*/
|
|
21
|
-
export default class RenameOperation extends Operation {
|
|
22
|
-
/**
|
|
23
|
-
* Position before an element to change.
|
|
24
|
-
*/
|
|
25
|
-
position: Position;
|
|
26
|
-
/**
|
|
27
|
-
* Current name of the element.
|
|
28
|
-
*/
|
|
29
|
-
oldName: string;
|
|
30
|
-
/**
|
|
31
|
-
* New name for the element.
|
|
32
|
-
*/
|
|
33
|
-
newName: string;
|
|
34
|
-
/**
|
|
35
|
-
* Creates an operation that changes element's name.
|
|
36
|
-
*
|
|
37
|
-
* @param position Position before an element to change.
|
|
38
|
-
* @param oldName Current name of the element.
|
|
39
|
-
* @param newName New name for the element.
|
|
40
|
-
* @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation
|
|
41
|
-
* can be applied or `null` if the operation operates on detached (non-document) tree.
|
|
42
|
-
*/
|
|
43
|
-
constructor(position: Position, oldName: string, newName: string, baseVersion: number | null);
|
|
44
|
-
/**
|
|
45
|
-
* @inheritDoc
|
|
46
|
-
*/
|
|
47
|
-
get type(): 'rename';
|
|
48
|
-
/**
|
|
49
|
-
* @inheritDoc
|
|
50
|
-
*/
|
|
51
|
-
get affectedSelectable(): Selectable;
|
|
52
|
-
/**
|
|
53
|
-
* Creates and returns an operation that has the same parameters as this operation.
|
|
54
|
-
*
|
|
55
|
-
* @returns Clone of this operation.
|
|
56
|
-
*/
|
|
57
|
-
clone(): RenameOperation;
|
|
58
|
-
/**
|
|
59
|
-
* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
|
|
60
|
-
*/
|
|
61
|
-
getReversed(): Operation;
|
|
62
|
-
/**
|
|
63
|
-
* @inheritDoc
|
|
64
|
-
* @internal
|
|
65
|
-
*/
|
|
66
|
-
_validate(): void;
|
|
67
|
-
/**
|
|
68
|
-
* @inheritDoc
|
|
69
|
-
* @internal
|
|
70
|
-
*/
|
|
71
|
-
_execute(): void;
|
|
72
|
-
/**
|
|
73
|
-
* @inheritDoc
|
|
74
|
-
*/
|
|
75
|
-
toJSON(): unknown;
|
|
76
|
-
/**
|
|
77
|
-
* @inheritDoc
|
|
78
|
-
*/
|
|
79
|
-
static get className(): string;
|
|
80
|
-
/**
|
|
81
|
-
* Creates `RenameOperation` object from deserialized object, i.e. from parsed JSON string.
|
|
82
|
-
*
|
|
83
|
-
* @param json Deserialized JSON object.
|
|
84
|
-
* @param document Document on which this operation will be applied.
|
|
85
|
-
*/
|
|
86
|
-
static fromJSON(json: any, document: Document): RenameOperation;
|
|
87
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module engine/model/operation/rootattributeoperation
|
|
11
|
-
*/
|
|
12
|
-
import Operation from './operation.js';
|
|
13
|
-
import type Document from '../document.js';
|
|
14
|
-
import type RootElement from '../rootelement.js';
|
|
15
|
-
import type { Selectable } from '../selection.js';
|
|
16
|
-
/**
|
|
17
|
-
* Operation to change root element's attribute. Using this class you can add, remove or change value of the attribute.
|
|
18
|
-
*
|
|
19
|
-
* This operation is needed, because root elements can't be changed through
|
|
20
|
-
* {@link module:engine/model/operation/attributeoperation~AttributeOperation}.
|
|
21
|
-
* It is because {@link module:engine/model/operation/attributeoperation~AttributeOperation}
|
|
22
|
-
* requires a range to change and root element can't
|
|
23
|
-
* be a part of range because every {@link module:engine/model/position~Position} has to be inside a root.
|
|
24
|
-
* {@link module:engine/model/position~Position} can't be created before a root element.
|
|
25
|
-
*/
|
|
26
|
-
export default class RootAttributeOperation extends Operation {
|
|
27
|
-
/**
|
|
28
|
-
* Root element to change.
|
|
29
|
-
*/
|
|
30
|
-
readonly root: RootElement;
|
|
31
|
-
/**
|
|
32
|
-
* Key of an attribute to change or remove.
|
|
33
|
-
*/
|
|
34
|
-
readonly key: string;
|
|
35
|
-
/**
|
|
36
|
-
* Old value of the attribute with given key or `null`, if attribute was not set before.
|
|
37
|
-
*
|
|
38
|
-
* @readonly
|
|
39
|
-
*/
|
|
40
|
-
oldValue: unknown;
|
|
41
|
-
/**
|
|
42
|
-
* New value of the attribute with given key or `null`, if operation should remove attribute.
|
|
43
|
-
*
|
|
44
|
-
* @readonly
|
|
45
|
-
*/
|
|
46
|
-
newValue: unknown;
|
|
47
|
-
/**
|
|
48
|
-
* Creates an operation that changes, removes or adds attributes on root element.
|
|
49
|
-
*
|
|
50
|
-
* @see module:engine/model/operation/attributeoperation~AttributeOperation
|
|
51
|
-
* @param root Root element to change.
|
|
52
|
-
* @param key Key of an attribute to change or remove.
|
|
53
|
-
* @param oldValue Old value of the attribute with given key or `null`, if attribute was not set before.
|
|
54
|
-
* @param newValue New value of the attribute with given key or `null`, if operation should remove attribute.
|
|
55
|
-
* @param baseVersion Document {@link module:engine/model/document~Document#version} on which operation
|
|
56
|
-
* can be applied or `null` if the operation operates on detached (non-document) tree.
|
|
57
|
-
*/
|
|
58
|
-
constructor(root: RootElement, key: string, oldValue: unknown, newValue: unknown, baseVersion: number | null);
|
|
59
|
-
/**
|
|
60
|
-
* @inheritDoc
|
|
61
|
-
*/
|
|
62
|
-
get type(): 'addRootAttribute' | 'removeRootAttribute' | 'changeRootAttribute';
|
|
63
|
-
/**
|
|
64
|
-
* @inheritDoc
|
|
65
|
-
*/
|
|
66
|
-
get affectedSelectable(): Selectable;
|
|
67
|
-
/**
|
|
68
|
-
* Creates and returns an operation that has the same parameters as this operation.
|
|
69
|
-
*
|
|
70
|
-
* @returns Clone of this operation.
|
|
71
|
-
*/
|
|
72
|
-
clone(): RootAttributeOperation;
|
|
73
|
-
/**
|
|
74
|
-
* See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.
|
|
75
|
-
*/
|
|
76
|
-
getReversed(): Operation;
|
|
77
|
-
/**
|
|
78
|
-
* @inheritDoc
|
|
79
|
-
* @internal
|
|
80
|
-
*/
|
|
81
|
-
_validate(): void;
|
|
82
|
-
/**
|
|
83
|
-
* @inheritDoc
|
|
84
|
-
* @internal
|
|
85
|
-
*/
|
|
86
|
-
_execute(): void;
|
|
87
|
-
/**
|
|
88
|
-
* @inheritDoc
|
|
89
|
-
*/
|
|
90
|
-
toJSON(): unknown;
|
|
91
|
-
/**
|
|
92
|
-
* @inheritDoc
|
|
93
|
-
*/
|
|
94
|
-
static get className(): string;
|
|
95
|
-
/**
|
|
96
|
-
* Creates `RootAttributeOperation` object from deserialized object, i.e. from parsed JSON string.
|
|
97
|
-
*
|
|
98
|
-
* @param json Deserialized JSON object.
|
|
99
|
-
* @param document Document on which this operation will be applied.
|
|
100
|
-
*/
|
|
101
|
-
static fromJSON(json: any, document: Document): RootAttributeOperation;
|
|
102
|
-
}
|