@fluid-experimental/property-changeset 1.2.7 → 2.0.0-dev.1.3.0.96595
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/dist/changeset.d.ts +39 -45
- package/dist/changeset.d.ts.map +1 -1
- package/dist/changeset.js +42 -51
- package/dist/changeset.js.map +1 -1
- package/dist/changeset_operations/array.d.ts +34 -3
- package/dist/changeset_operations/array.d.ts.map +1 -1
- package/dist/changeset_operations/array.js +97 -94
- package/dist/changeset_operations/array.js.map +1 -1
- package/dist/changeset_operations/indexedCollection.d.ts +13 -15
- package/dist/changeset_operations/indexedCollection.d.ts.map +1 -1
- package/dist/changeset_operations/indexedCollection.js +14 -15
- package/dist/changeset_operations/indexedCollection.js.map +1 -1
- package/dist/helpers/typeidHelper.d.ts +14 -14
- package/dist/helpers/typeidHelper.d.ts.map +1 -1
- package/dist/helpers/typeidHelper.js +24 -34
- package/dist/helpers/typeidHelper.js.map +1 -1
- package/dist/pathHelper.d.ts +5 -5
- package/dist/pathHelper.d.ts.map +1 -1
- package/dist/pathHelper.js +54 -56
- package/dist/pathHelper.js.map +1 -1
- package/dist/templateValidator.d.ts +62 -30
- package/dist/templateValidator.d.ts.map +1 -1
- package/dist/templateValidator.js +128 -94
- package/dist/templateValidator.js.map +1 -1
- package/dist/test/array.spec.js +3 -6
- package/dist/test/array.spec.js.map +1 -1
- package/dist/test/pathHelper.spec.js +2 -4
- package/dist/test/pathHelper.spec.js.map +1 -1
- package/dist/test/reversibleCs.spec.js +2 -4
- package/dist/test/reversibleCs.spec.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +1 -1
- package/dist/test/validator/templateValidator.spec.js +5 -10
- package/dist/test/validator/templateValidator.spec.js.map +1 -1
- package/dist/utils.d.ts +137 -109
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +167 -174
- package/dist/utils.js.map +1 -1
- package/dist/validationResultBuilder.d.ts +6 -8
- package/dist/validationResultBuilder.d.ts.map +1 -1
- package/dist/validationResultBuilder.js +5 -11
- package/dist/validationResultBuilder.js.map +1 -1
- package/lib/changeset.js +42 -51
- package/lib/changeset.js.map +1 -1
- package/lib/changeset_operations/array.js +97 -94
- package/lib/changeset_operations/array.js.map +1 -1
- package/lib/changeset_operations/indexedCollection.js +14 -15
- package/lib/changeset_operations/indexedCollection.js.map +1 -1
- package/lib/helpers/typeidHelper.js +24 -34
- package/lib/helpers/typeidHelper.js.map +1 -1
- package/lib/pathHelper.js +54 -56
- package/lib/pathHelper.js.map +1 -1
- package/lib/templateValidator.js +128 -94
- package/lib/templateValidator.js.map +1 -1
- package/lib/utils.js +167 -174
- package/lib/utils.js.map +1 -1
- package/lib/validationResultBuilder.js +5 -11
- package/lib/validationResultBuilder.js.map +1 -1
- package/package.json +5 -5
|
@@ -29,21 +29,44 @@ const { isPrimitiveType } = typeidHelper_1.TypeIdHelper;
|
|
|
29
29
|
*/
|
|
30
30
|
var ArrayChangeSetRangeType;
|
|
31
31
|
(function (ArrayChangeSetRangeType) {
|
|
32
|
+
/**
|
|
33
|
+
* A complete operation of change set A.
|
|
34
|
+
*/
|
|
32
35
|
ArrayChangeSetRangeType[ArrayChangeSetRangeType["completeA"] = 0] = "completeA";
|
|
36
|
+
/**
|
|
37
|
+
* A complete operation of change set B.
|
|
38
|
+
*/
|
|
33
39
|
ArrayChangeSetRangeType[ArrayChangeSetRangeType["completeB"] = 1] = "completeB";
|
|
40
|
+
/**
|
|
41
|
+
* A partial operation of change set A.
|
|
42
|
+
*/
|
|
34
43
|
ArrayChangeSetRangeType[ArrayChangeSetRangeType["partOfA"] = 2] = "partOfA";
|
|
44
|
+
/**
|
|
45
|
+
* A partial operation of change set B.
|
|
46
|
+
*/
|
|
35
47
|
ArrayChangeSetRangeType[ArrayChangeSetRangeType["partOfB"] = 3] = "partOfB";
|
|
48
|
+
/**
|
|
49
|
+
* A complete operation of change set A overlapping with a partial operation of change set B.
|
|
50
|
+
*/
|
|
36
51
|
ArrayChangeSetRangeType[ArrayChangeSetRangeType["completeApartOfB"] = 4] = "completeApartOfB";
|
|
52
|
+
/**
|
|
53
|
+
* A complete operation of change set B overlapping with a partial operation of change set A.
|
|
54
|
+
*/
|
|
37
55
|
ArrayChangeSetRangeType[ArrayChangeSetRangeType["completeBpartOfA"] = 5] = "completeBpartOfA";
|
|
56
|
+
/**
|
|
57
|
+
* A complete operation of change set A overlapping a complete operation of change set B.
|
|
58
|
+
*/
|
|
38
59
|
ArrayChangeSetRangeType[ArrayChangeSetRangeType["completeAcompleteB"] = 6] = "completeAcompleteB";
|
|
60
|
+
/**
|
|
61
|
+
* A partial operation of change set A, a partial operation of change set B.
|
|
62
|
+
*/
|
|
39
63
|
ArrayChangeSetRangeType[ArrayChangeSetRangeType["partOfApartOfB"] = 7] = "partOfApartOfB";
|
|
40
64
|
})(ArrayChangeSetRangeType || (ArrayChangeSetRangeType = {}));
|
|
41
65
|
/**
|
|
42
|
-
*
|
|
43
|
-
* @param io_operation
|
|
44
|
-
* @param in_aOffset
|
|
45
|
-
* @param io_resultingRange
|
|
46
|
-
* the computed range
|
|
66
|
+
* Computes a range for an operation of the current change set
|
|
67
|
+
* @param io_operation - Input
|
|
68
|
+
* @param in_aOffset - The offset that needs to be added to transform the operation
|
|
69
|
+
* @param io_resultingRange - The computed range
|
|
47
70
|
*/
|
|
48
71
|
const getRangeForCurrentStateOperation = function (io_operation, in_aOffset, io_resultingRange) {
|
|
49
72
|
if (!io_operation) {
|
|
@@ -87,10 +110,10 @@ const getRangeForCurrentStateOperation = function (io_operation, in_aOffset, io_
|
|
|
87
110
|
};
|
|
88
111
|
const getOpLength = (op) => (0, isNumber_1.default)(op[1]) ? op[1] : op[1].length;
|
|
89
112
|
/**
|
|
90
|
-
*
|
|
91
|
-
* @param in_operation
|
|
92
|
-
* @param io_resultingRange
|
|
93
|
-
* @param in_flag
|
|
113
|
+
* Computes the impact range for a given operation of the applied change set
|
|
114
|
+
* @param in_operation - The op
|
|
115
|
+
* @param io_resultingRange - The computed range
|
|
116
|
+
* @param in_flag - The flag for the resulting range, default is 'complete B'
|
|
94
117
|
* @param in_options - Optional additional parameters
|
|
95
118
|
*/
|
|
96
119
|
const getRangeForAppliedOperation = function (in_operation, io_resultingRange, in_flag, in_options) {
|
|
@@ -112,12 +135,7 @@ const getRangeForAppliedOperation = function (in_operation, io_resultingRange, i
|
|
|
112
135
|
io_resultingRange.op.operation[0] = in_operation.operation[0];
|
|
113
136
|
io_resultingRange.begin = in_operation.operation[0];
|
|
114
137
|
io_resultingRange.op._absoluteBegin = in_operation.operation[0];
|
|
115
|
-
|
|
116
|
-
io_resultingRange.flag = in_flag;
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
io_resultingRange.flag = ArrayChangeSetRangeType.completeB;
|
|
120
|
-
}
|
|
138
|
+
io_resultingRange.flag = in_flag !== undefined ? in_flag : ArrayChangeSetRangeType.completeB;
|
|
121
139
|
switch (in_operation.type) {
|
|
122
140
|
case arrayChangesetIterator_1.ArrayChangeSetIterator.types.INSERT:
|
|
123
141
|
io_resultingRange.end = in_operation.operation[0];
|
|
@@ -132,12 +150,9 @@ const getRangeForAppliedOperation = function (in_operation, io_resultingRange, i
|
|
|
132
150
|
case arrayChangesetIterator_1.ArrayChangeSetIterator.types.REMOVE:
|
|
133
151
|
let numberOfRemovedElements = getOpLength(in_operation.operation);
|
|
134
152
|
io_resultingRange.end = in_operation.operation[0] + numberOfRemovedElements;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
else {
|
|
139
|
-
io_resultingRange.op.operation[1] = in_operation.operation[1];
|
|
140
|
-
}
|
|
153
|
+
io_resultingRange.op.operation[1] = Array.isArray(in_operation.operation[1])
|
|
154
|
+
? in_operation.operation[1].slice()
|
|
155
|
+
: in_operation.operation[1];
|
|
141
156
|
io_resultingRange.removeInsertOperation = in_operation.removeInsertOperation;
|
|
142
157
|
return;
|
|
143
158
|
case arrayChangesetIterator_1.ArrayChangeSetIterator.types.MODIFY:
|
|
@@ -155,10 +170,10 @@ const getRangeForAppliedOperation = function (in_operation, io_resultingRange, i
|
|
|
155
170
|
* Splits the second and third parameter in an array remove or modify operation into two segments.
|
|
156
171
|
* This treats the three possible cases array, string and length that are allowed in a remove operation
|
|
157
172
|
*
|
|
158
|
-
* @param in_firstResult
|
|
173
|
+
* @param in_firstResult - Place where the first half is stored
|
|
159
174
|
* @param in_secondResult - Place where the second half is stored
|
|
160
|
-
* @param in_data
|
|
161
|
-
* @param in_start
|
|
175
|
+
* @param in_data - The original operation
|
|
176
|
+
* @param in_start - Index at which the operation is split
|
|
162
177
|
* @private
|
|
163
178
|
*/
|
|
164
179
|
const _splitArrayParameter = function (in_firstResult, in_secondResult, in_data, in_start) {
|
|
@@ -236,13 +251,13 @@ const _copyOperation = function (in_sourceOperation, in_targetOperation) {
|
|
|
236
251
|
/**
|
|
237
252
|
* cut overlapping ranges in non-overlapping and completely overlapping segments
|
|
238
253
|
* ranges of length 0 just cut lengthy ranges
|
|
239
|
-
* @param io_rangeA
|
|
240
|
-
* @param io_rangeB
|
|
241
|
-
* @param io_resultingSegment
|
|
242
|
-
* @param in_rebasing
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
254
|
+
* @param io_rangeA - Input A
|
|
255
|
+
* @param io_rangeB - Input B
|
|
256
|
+
* @param io_resultingSegment - The resulting overlapping segment
|
|
257
|
+
* @param in_rebasing - Is this function called for rebasing - we have to implement two different
|
|
258
|
+
* behaviors of this function: one for squashing and one for rebasing, because an insert-insert
|
|
259
|
+
* operation in squashing should be separte segments, while for rebasing, we need one segment
|
|
260
|
+
* for both inserts to be able to report a conflict.
|
|
246
261
|
* overlapping range or
|
|
247
262
|
* (partial) A or B
|
|
248
263
|
*/
|
|
@@ -400,22 +415,14 @@ const splitOverlapping = function (io_rangeA, io_rangeB, io_resultingSegment, in
|
|
|
400
415
|
io_resultingSegment.end = io_rangeA.end;
|
|
401
416
|
io_resultingSegment.op = undefined; // This is used to indicate that we don't need any operation
|
|
402
417
|
if (io_rangeB.op.operation[1].length === rangeLength) {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
}
|
|
407
|
-
else {
|
|
408
|
-
io_resultingSegment.flag = ArrayChangeSetRangeType.completeBpartOfA;
|
|
409
|
-
}
|
|
418
|
+
io_resultingSegment.flag = io_rangeA.op.operation[1].length === rangeLength
|
|
419
|
+
? ArrayChangeSetRangeType.completeAcompleteB
|
|
420
|
+
: ArrayChangeSetRangeType.completeBpartOfA;
|
|
410
421
|
}
|
|
411
422
|
else {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}
|
|
416
|
-
else {
|
|
417
|
-
io_resultingSegment.flag = ArrayChangeSetRangeType.partOfApartOfB;
|
|
418
|
-
}
|
|
423
|
+
io_resultingSegment.flag = io_rangeA.op.operation[1].length === rangeLength
|
|
424
|
+
? ArrayChangeSetRangeType.completeApartOfB
|
|
425
|
+
: ArrayChangeSetRangeType.partOfApartOfB;
|
|
419
426
|
}
|
|
420
427
|
// cut the remaining segment entry
|
|
421
428
|
if (io_resultingSegment.flag === ArrayChangeSetRangeType.partOfApartOfB ||
|
|
@@ -556,9 +563,9 @@ const splitOverlapping = function (io_rangeA, io_rangeB, io_resultingSegment, in
|
|
|
556
563
|
/**
|
|
557
564
|
* merge in_op with the last op of that category in io_changeset (if possible)
|
|
558
565
|
* e.g. merge an delete [1,3] with delete [3,2] to delete [1,5]
|
|
559
|
-
* @param in_op -
|
|
560
|
-
* @param io_changeset -
|
|
561
|
-
* @param in_targetIndex
|
|
566
|
+
* @param in_op - The op to merge
|
|
567
|
+
* @param io_changeset - The changeset to merge the op to
|
|
568
|
+
* @param in_targetIndex - The transformed target index offset
|
|
562
569
|
* @returns true if the merge was possible and executed
|
|
563
570
|
*/
|
|
564
571
|
const mergeWithLastIfPossible = function (in_op, io_changeset, in_targetIndex, in_options) {
|
|
@@ -646,12 +653,12 @@ const mergeWithLastIfPossible = function (in_op, io_changeset, in_targetIndex, i
|
|
|
646
653
|
};
|
|
647
654
|
/**
|
|
648
655
|
* push an operation to a changeset, will try to merge the op if possible
|
|
649
|
-
* @param in_op
|
|
650
|
-
* @param io_changeset target
|
|
651
|
-
* @param the current offset
|
|
656
|
+
* @param in_op - The operation we want to push
|
|
657
|
+
* @param io_changeset - The target
|
|
658
|
+
* @param the - The current offset
|
|
652
659
|
* @param in_options - Optional additional parameters
|
|
653
|
-
* @param in_lastIteratorARemove -
|
|
654
|
-
* @param in_segment -
|
|
660
|
+
* @param in_lastIteratorARemove - The information about the last remove operation in iterator A
|
|
661
|
+
* @param in_segment - The segment this operation is part of
|
|
655
662
|
*/
|
|
656
663
|
const pushOp = function (in_op, io_changeset, in_indexOffset, in_options, in_lastIteratorARemove, in_segment) {
|
|
657
664
|
let writeTargetIndex;
|
|
@@ -729,8 +736,8 @@ const pushOp = function (in_op, io_changeset, in_indexOffset, in_options, in_las
|
|
|
729
736
|
/**
|
|
730
737
|
* handle combinations of range operations
|
|
731
738
|
* e.g. an insert and delete at the same place and same length nullify each other
|
|
732
|
-
* @param in_segment
|
|
733
|
-
* @param in_isPrimitiveType
|
|
739
|
+
* @param in_segment - The two ops to be combined
|
|
740
|
+
* @param in_isPrimitiveType - Is it an array of primitive types
|
|
734
741
|
* ATTENTION: We overwrite opB to save garbage (instead of creating a result OP)
|
|
735
742
|
*/
|
|
736
743
|
const handleCombinations = function (in_segment, in_isPrimitiveType) {
|
|
@@ -746,13 +753,7 @@ const handleCombinations = function (in_segment, in_isPrimitiveType) {
|
|
|
746
753
|
}
|
|
747
754
|
case arrayChangesetIterator_1.ArrayChangeSetIterator.types.REMOVE: {
|
|
748
755
|
// Attention: B removes A completely, kill A to avoid zero inserts
|
|
749
|
-
|
|
750
|
-
if ((0, isNumber_1.default)(opB.operation[1])) {
|
|
751
|
-
opBLen = opB.operation[1];
|
|
752
|
-
}
|
|
753
|
-
else {
|
|
754
|
-
opBLen = opB.operation[1].length;
|
|
755
|
-
}
|
|
756
|
+
const opBLen = (0, isNumber_1.default)(opB.operation[1]) ? opB.operation[1] : opB.operation[1].length;
|
|
756
757
|
if (opBLen !== opA.operation[1].length) {
|
|
757
758
|
throw new Error("handleCombinations: insert-remove: unequal number of affected entries");
|
|
758
759
|
}
|
|
@@ -856,21 +857,27 @@ const arraysHaveSameValues = function (in_arr1, in_arr2) {
|
|
|
856
857
|
*
|
|
857
858
|
* We have to handle the conflicting rebase changes. The changes we do, are summarized in this table.
|
|
858
859
|
* Other is the modified, rebased (on own) changeset.
|
|
860
|
+
*
|
|
861
|
+
* ```
|
|
859
862
|
* BASE
|
|
860
863
|
* / \
|
|
861
864
|
* / \
|
|
862
865
|
* OWN OTHER
|
|
866
|
+
* ```
|
|
863
867
|
*
|
|
864
868
|
* gets rebased to:
|
|
865
869
|
*
|
|
870
|
+
* ```
|
|
866
871
|
* BASE
|
|
867
872
|
* /
|
|
868
873
|
* OWN
|
|
869
874
|
* \
|
|
870
875
|
* OTHER
|
|
876
|
+
* ```
|
|
871
877
|
*
|
|
872
878
|
* conflict default behavior in ()
|
|
873
879
|
*
|
|
880
|
+
* ```
|
|
874
881
|
* -------|-----------------+------------------+------------------|
|
|
875
882
|
* \Own| insert | modify | remove |
|
|
876
883
|
* \ | | | |
|
|
@@ -889,16 +896,16 @@ const arraysHaveSameValues = function (in_arr1, in_arr2) {
|
|
|
889
896
|
* remove | change | change | change |
|
|
890
897
|
* | [rem orig. data]| (note the user) | [rem dupl. rem] |
|
|
891
898
|
* -------|-----------------+------------------+------------------|
|
|
899
|
+
* ```
|
|
892
900
|
*
|
|
893
|
-
* @param {{opA:{}, opB:{}}} in_segment
|
|
894
|
-
* @param {Array.<property-changeset.ChangeSet.ConflictInfo>} out_conflicts -
|
|
895
|
-
*
|
|
896
|
-
* @param {string} in_basePath -
|
|
897
|
-
*
|
|
898
|
-
* @param {boolean} in_isPrimitiveType is it an array of primitive types
|
|
901
|
+
* @param {{opA:{}, opB:{}}} in_segment - The two ops to be combined
|
|
902
|
+
* @param {Array.<property-changeset.ChangeSet.ConflictInfo>} out_conflicts - A list of paths that resulted in
|
|
903
|
+
* conflicts together with the type of the conflict
|
|
904
|
+
* @param {string} in_basePath - Base path to get to the property processed by this function
|
|
905
|
+
* @param {boolean} in_isPrimitiveType - is it an array of primitive types
|
|
899
906
|
* @param {Object} [in_options] - Optional additional parameters
|
|
900
907
|
* @param {Map} [in_options.applyAfterMetaInformation] - Additional meta information which help later to obtain
|
|
901
|
-
*
|
|
908
|
+
* more compact changeset during the apply operation
|
|
902
909
|
*/
|
|
903
910
|
const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePath, in_isPrimitiveType, in_options) {
|
|
904
911
|
const opA = in_segment.opA;
|
|
@@ -974,20 +981,8 @@ const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePat
|
|
|
974
981
|
}
|
|
975
982
|
case arrayChangesetIterator_1.ArrayChangeSetIterator.types.REMOVE: {
|
|
976
983
|
// Remove already in A, no need to add the same again -> write nop
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
if ((0, isNumber_1.default)(opB.operation[1])) {
|
|
980
|
-
opBLen = opB.operation[1];
|
|
981
|
-
}
|
|
982
|
-
else {
|
|
983
|
-
opBLen = opB.operation[1].length;
|
|
984
|
-
}
|
|
985
|
-
if ((0, isNumber_1.default)(opA.operation[1])) {
|
|
986
|
-
opALen = opA.operation[1];
|
|
987
|
-
}
|
|
988
|
-
else {
|
|
989
|
-
opALen = opA.operation[1].length;
|
|
990
|
-
}
|
|
984
|
+
const opBLen = (0, isNumber_1.default)(opB.operation[1]) ? opB.operation[1] : opB.operation[1].length;
|
|
985
|
+
const opALen = (0, isNumber_1.default)(opA.operation[1]) ? opA.operation[1] : opA.operation[1].length;
|
|
991
986
|
if (opBLen !== opALen) {
|
|
992
987
|
throw new Error("handleRebaseCombinations: remove-remove: unequal number of affected entries, " +
|
|
993
988
|
"this should never happen! Probably a bug in splitRange.");
|
|
@@ -1074,10 +1069,10 @@ const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePat
|
|
|
1074
1069
|
};
|
|
1075
1070
|
/**
|
|
1076
1071
|
* apply a range's operation to the changeset
|
|
1077
|
-
* @param in_segment to be applied
|
|
1078
|
-
* @param io_changeset target
|
|
1079
|
-
* @param in_currentIndexOffset current offset
|
|
1080
|
-
* @param in_isPrimitiveType is it an array of primitive types
|
|
1072
|
+
* @param in_segment - to be applied
|
|
1073
|
+
* @param io_changeset - target
|
|
1074
|
+
* @param in_currentIndexOffset - current offset
|
|
1075
|
+
* @param in_isPrimitiveType - is it an array of primitive types
|
|
1081
1076
|
*/
|
|
1082
1077
|
const applySegment = function (in_segment, io_changeset, in_currentIndexOffset, lastIteratorARemove, in_isPrimitiveType, in_options) {
|
|
1083
1078
|
if (!in_segment) {
|
|
@@ -1103,12 +1098,12 @@ const applySegment = function (in_segment, io_changeset, in_currentIndexOffset,
|
|
|
1103
1098
|
};
|
|
1104
1099
|
/**
|
|
1105
1100
|
* apply a range's operation to the rebased changeset
|
|
1106
|
-
* @param in_segment to be applied
|
|
1107
|
-
* @param io_changeset target
|
|
1108
|
-
* @param in_currentIndexOffset current offset
|
|
1101
|
+
* @param in_segment - to be applied
|
|
1102
|
+
* @param io_changeset - target
|
|
1103
|
+
* @param in_currentIndexOffset - current offset
|
|
1109
1104
|
* @param out_conflicts - A list of paths that resulted in conflicts together with the type of the conflict
|
|
1110
1105
|
* @param in_basePath - Base path to get to the property processed by this function
|
|
1111
|
-
* @param in_isPrimitiveType is it an array of primitive types
|
|
1106
|
+
* @param in_isPrimitiveType - is it an array of primitive types
|
|
1112
1107
|
*/
|
|
1113
1108
|
const applyRebaseSegment = function (in_segment, io_changeset, in_currentIndexOffset, out_conflicts, in_basePath, in_isPrimitiveType, in_options) {
|
|
1114
1109
|
if (!in_segment) {
|
|
@@ -1129,6 +1124,7 @@ const applyRebaseSegment = function (in_segment, io_changeset, in_currentIndexOf
|
|
|
1129
1124
|
pushOp(in_segment.opB, io_changeset, in_currentIndexOffset, in_options);
|
|
1130
1125
|
}
|
|
1131
1126
|
};
|
|
1127
|
+
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
1132
1128
|
var ChangeSetArrayFunctions;
|
|
1133
1129
|
(function (ChangeSetArrayFunctions) {
|
|
1134
1130
|
/**
|
|
@@ -1136,9 +1132,9 @@ var ChangeSetArrayFunctions;
|
|
|
1136
1132
|
* property root and it will be applied behind the base ChangeSet (assuming that the changes are relative to the
|
|
1137
1133
|
* state after the base ChangeSet has been applied. It will change the base ChangeSet.)
|
|
1138
1134
|
*
|
|
1139
|
-
* @param io_basePropertyChanges
|
|
1135
|
+
* @param io_basePropertyChanges - The ChangeSet describing the initial state
|
|
1140
1136
|
* @param in_appliedPropertyChanges - The ChangeSet to apply to this state
|
|
1141
|
-
* @param in_typeid
|
|
1137
|
+
* @param in_typeid - The typeid of the contents of the collection (without the collection type)
|
|
1142
1138
|
*/
|
|
1143
1139
|
function _performApplyAfterOnPropertyArray(io_basePropertyChanges, in_appliedPropertyChanges, in_typeid, in_options) {
|
|
1144
1140
|
property_common_1.ConsoleUtils.assert(in_typeid, "_performApplyAfterOnPropertyArray: typeid missing");
|
|
@@ -1392,21 +1388,27 @@ var ChangeSetArrayFunctions;
|
|
|
1392
1388
|
*
|
|
1393
1389
|
* We have to handle the conflicting rebase changes. The changes we do, are summarized in this table.
|
|
1394
1390
|
* Other is the modified, rebased (on own) changeset.
|
|
1391
|
+
*
|
|
1392
|
+
* ```
|
|
1395
1393
|
* BASE
|
|
1396
1394
|
* / \
|
|
1397
1395
|
* / \
|
|
1398
1396
|
* OWN OTHER
|
|
1397
|
+
* ```
|
|
1399
1398
|
*
|
|
1400
1399
|
* gets rebased to:
|
|
1401
1400
|
*
|
|
1401
|
+
* ```
|
|
1402
1402
|
* BASE
|
|
1403
1403
|
* /
|
|
1404
1404
|
* OWN
|
|
1405
1405
|
* \
|
|
1406
1406
|
* OTHER
|
|
1407
|
+
* ```
|
|
1407
1408
|
*
|
|
1408
1409
|
* conflict default behavior in ()
|
|
1409
1410
|
*
|
|
1411
|
+
* ```
|
|
1410
1412
|
* -------|-----------------+------------------+------------------|----------------|
|
|
1411
1413
|
* \Own| insert | modify | remove | String set |
|
|
1412
1414
|
* \ | | | | |
|
|
@@ -1427,10 +1429,11 @@ var ChangeSetArrayFunctions;
|
|
|
1427
1429
|
* set | 'other's set overwrites whatever happend before |
|
|
1428
1430
|
* | | | | |
|
|
1429
1431
|
* --------------------------------------------------------------------------------|
|
|
1432
|
+
* ```
|
|
1430
1433
|
*
|
|
1431
1434
|
* @param in_ownPropertyChangeSet - The ChangeSet for the property stored in this object
|
|
1432
1435
|
* @param io_rebasePropertyChangeSetParent - The Array containing the ChangeSet for the property to be rebased
|
|
1433
|
-
* @param in_key
|
|
1436
|
+
* @param in_key - The key to the ChangeSet in io_rebasePropertyChangeSetParent we are rebasing on
|
|
1434
1437
|
* @param in_basePath - Base path to get to the property processed by this function
|
|
1435
1438
|
* @param out_conflicts - A list of paths that resulted in conflicts together with the type of the conflict
|
|
1436
1439
|
*/
|