@fluid-experimental/property-changeset 1.2.3-83900 → 2.0.0-internal.1.0.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 (45) hide show
  1. package/dist/changeset.d.ts +39 -45
  2. package/dist/changeset.d.ts.map +1 -1
  3. package/dist/changeset.js +39 -45
  4. package/dist/changeset.js.map +1 -1
  5. package/dist/changeset_operations/array.d.ts +3 -3
  6. package/dist/changeset_operations/array.d.ts.map +1 -1
  7. package/dist/changeset_operations/array.js +45 -47
  8. package/dist/changeset_operations/array.js.map +1 -1
  9. package/dist/changeset_operations/indexedCollection.d.ts +2 -2
  10. package/dist/changeset_operations/indexedCollection.js +2 -2
  11. package/dist/changeset_operations/indexedCollection.js.map +1 -1
  12. package/dist/helpers/typeidHelper.d.ts +9 -9
  13. package/dist/helpers/typeidHelper.js +9 -9
  14. package/dist/helpers/typeidHelper.js.map +1 -1
  15. package/dist/pathHelper.d.ts +4 -4
  16. package/dist/pathHelper.js +4 -4
  17. package/dist/pathHelper.js.map +1 -1
  18. package/dist/templateValidator.d.ts +6 -6
  19. package/dist/templateValidator.d.ts.map +1 -1
  20. package/dist/templateValidator.js +66 -58
  21. package/dist/templateValidator.js.map +1 -1
  22. package/dist/test/tsconfig.tsbuildinfo +1 -1
  23. package/dist/utils.d.ts +7 -7
  24. package/dist/utils.js +9 -9
  25. package/dist/utils.js.map +1 -1
  26. package/dist/validationResultBuilder.d.ts +4 -4
  27. package/dist/validationResultBuilder.js +4 -4
  28. package/dist/validationResultBuilder.js.map +1 -1
  29. package/lib/changeset.js +39 -45
  30. package/lib/changeset.js.map +1 -1
  31. package/lib/changeset_operations/array.js +45 -47
  32. package/lib/changeset_operations/array.js.map +1 -1
  33. package/lib/changeset_operations/indexedCollection.js +2 -2
  34. package/lib/changeset_operations/indexedCollection.js.map +1 -1
  35. package/lib/helpers/typeidHelper.js +9 -9
  36. package/lib/helpers/typeidHelper.js.map +1 -1
  37. package/lib/pathHelper.js +4 -4
  38. package/lib/pathHelper.js.map +1 -1
  39. package/lib/templateValidator.js +66 -58
  40. package/lib/templateValidator.js.map +1 -1
  41. package/lib/utils.js +9 -9
  42. package/lib/utils.js.map +1 -1
  43. package/lib/validationResultBuilder.js +4 -4
  44. package/lib/validationResultBuilder.js.map +1 -1
  45. package/package.json +3 -3
@@ -39,11 +39,10 @@ var ArrayChangeSetRangeType;
39
39
  ArrayChangeSetRangeType[ArrayChangeSetRangeType["partOfApartOfB"] = 7] = "partOfApartOfB";
40
40
  })(ArrayChangeSetRangeType || (ArrayChangeSetRangeType = {}));
41
41
  /**
42
- * compute a range for an operation of the current change set
43
- * @param io_operation input
44
- * @param in_aOffset the offset that needs to be added to transform the operation
45
- * @param io_resultingRange
46
- * the computed range
42
+ * Computes a range for an operation of the current change set
43
+ * @param io_operation - Input
44
+ * @param in_aOffset - The offset that needs to be added to transform the operation
45
+ * @param io_resultingRange - The computed range
47
46
  */
48
47
  const getRangeForCurrentStateOperation = function (io_operation, in_aOffset, io_resultingRange) {
49
48
  if (!io_operation) {
@@ -87,10 +86,10 @@ const getRangeForCurrentStateOperation = function (io_operation, in_aOffset, io_
87
86
  };
88
87
  const getOpLength = (op) => (0, isNumber_1.default)(op[1]) ? op[1] : op[1].length;
89
88
  /**
90
- * computes the impact range for a given operation of the applied change set
91
- * @param in_operation the op
92
- * @param io_resultingRange the computed range
93
- * @param in_flag the flag for the resulting range, default is 'complete B'
89
+ * Computes the impact range for a given operation of the applied change set
90
+ * @param in_operation - The op
91
+ * @param io_resultingRange - The computed range
92
+ * @param in_flag - The flag for the resulting range, default is 'complete B'
94
93
  * @param in_options - Optional additional parameters
95
94
  */
96
95
  const getRangeForAppliedOperation = function (in_operation, io_resultingRange, in_flag, in_options) {
@@ -155,10 +154,10 @@ const getRangeForAppliedOperation = function (in_operation, io_resultingRange, i
155
154
  * Splits the second and third parameter in an array remove or modify operation into two segments.
156
155
  * This treats the three possible cases array, string and length that are allowed in a remove operation
157
156
  *
158
- * @param in_firstResult - Place where the first half is stored
157
+ * @param in_firstResult - Place where the first half is stored
159
158
  * @param in_secondResult - Place where the second half is stored
160
- * @param in_data - The original operation
161
- * @param in_start - Index at which the operation is split
159
+ * @param in_data - The original operation
160
+ * @param in_start - Index at which the operation is split
162
161
  * @private
163
162
  */
164
163
  const _splitArrayParameter = function (in_firstResult, in_secondResult, in_data, in_start) {
@@ -236,13 +235,13 @@ const _copyOperation = function (in_sourceOperation, in_targetOperation) {
236
235
  /**
237
236
  * cut overlapping ranges in non-overlapping and completely overlapping segments
238
237
  * ranges of length 0 just cut lengthy ranges
239
- * @param io_rangeA input A
240
- * @param io_rangeB input B
241
- * @param io_resultingSegment the resulting overlapping segment
242
- * @param in_rebasing is this function called for rebasing - we have to implement two different
243
- * behaviors of this function: one for squashing and one for rebasing, because an insert-insert
244
- * operation in squashing should be separte segments, while for rebasing, we need one segment
245
- * for both inserts to be able to report a conflict.
238
+ * @param io_rangeA - Input A
239
+ * @param io_rangeB - Input B
240
+ * @param io_resultingSegment - The resulting overlapping segment
241
+ * @param in_rebasing - Is this function called for rebasing - we have to implement two different
242
+ * behaviors of this function: one for squashing and one for rebasing, because an insert-insert
243
+ * operation in squashing should be separte segments, while for rebasing, we need one segment
244
+ * for both inserts to be able to report a conflict.
246
245
  * overlapping range or
247
246
  * (partial) A or B
248
247
  */
@@ -556,9 +555,9 @@ const splitOverlapping = function (io_rangeA, io_rangeB, io_resultingSegment, in
556
555
  /**
557
556
  * merge in_op with the last op of that category in io_changeset (if possible)
558
557
  * e.g. merge an delete [1,3] with delete [3,2] to delete [1,5]
559
- * @param in_op - the op to merge
560
- * @param io_changeset - the changeset to merge the op to
561
- * @param in_targetIndex the transformed target index offset
558
+ * @param in_op - The op to merge
559
+ * @param io_changeset - The changeset to merge the op to
560
+ * @param in_targetIndex - The transformed target index offset
562
561
  * @returns true if the merge was possible and executed
563
562
  */
564
563
  const mergeWithLastIfPossible = function (in_op, io_changeset, in_targetIndex, in_options) {
@@ -646,12 +645,12 @@ const mergeWithLastIfPossible = function (in_op, io_changeset, in_targetIndex, i
646
645
  };
647
646
  /**
648
647
  * push an operation to a changeset, will try to merge the op if possible
649
- * @param in_op the operation we want to push
650
- * @param io_changeset target
651
- * @param the current offset
648
+ * @param in_op - The operation we want to push
649
+ * @param io_changeset - The target
650
+ * @param the - The current offset
652
651
  * @param in_options - Optional additional parameters
653
- * @param in_lastIteratorARemove - Information about the last remove operation in iterator A
654
- * @param in_segment - Segment this operation is part of
652
+ * @param in_lastIteratorARemove - The information about the last remove operation in iterator A
653
+ * @param in_segment - The segment this operation is part of
655
654
  */
656
655
  const pushOp = function (in_op, io_changeset, in_indexOffset, in_options, in_lastIteratorARemove, in_segment) {
657
656
  let writeTargetIndex;
@@ -729,8 +728,8 @@ const pushOp = function (in_op, io_changeset, in_indexOffset, in_options, in_las
729
728
  /**
730
729
  * handle combinations of range operations
731
730
  * e.g. an insert and delete at the same place and same length nullify each other
732
- * @param in_segment the two ops to be combined
733
- * @param in_isPrimitiveType is it an array of primitive types
731
+ * @param in_segment - The two ops to be combined
732
+ * @param in_isPrimitiveType - Is it an array of primitive types
734
733
  * ATTENTION: We overwrite opB to save garbage (instead of creating a result OP)
735
734
  */
736
735
  const handleCombinations = function (in_segment, in_isPrimitiveType) {
@@ -890,15 +889,14 @@ const arraysHaveSameValues = function (in_arr1, in_arr2) {
890
889
  * | [rem orig. data]| (note the user) | [rem dupl. rem] |
891
890
  * -------|-----------------+------------------+------------------|
892
891
  *
893
- * @param {{opA:{}, opB:{}}} in_segment the two ops to be combined
894
- * @param {Array.<property-changeset.ChangeSet.ConflictInfo>} out_conflicts -
895
- * A list of paths that resulted in conflicts together with the type of the conflict
896
- * @param {string} in_basePath -
897
- * Base path to get to the property processed by this function
898
- * @param {boolean} in_isPrimitiveType is it an array of primitive types
892
+ * @param {{opA:{}, opB:{}}} in_segment - The two ops to be combined
893
+ * @param {Array.<property-changeset.ChangeSet.ConflictInfo>} out_conflicts - A list of paths that resulted in
894
+ * conflicts together with the type of the conflict
895
+ * @param {string} in_basePath - Base path to get to the property processed by this function
896
+ * @param {boolean} in_isPrimitiveType - is it an array of primitive types
899
897
  * @param {Object} [in_options] - Optional additional parameters
900
898
  * @param {Map} [in_options.applyAfterMetaInformation] - Additional meta information which help later to obtain
901
- * more compact changeset during the apply operation
899
+ * more compact changeset during the apply operation
902
900
  */
903
901
  const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePath, in_isPrimitiveType, in_options) {
904
902
  const opA = in_segment.opA;
@@ -1074,10 +1072,10 @@ const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePat
1074
1072
  };
1075
1073
  /**
1076
1074
  * 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
1075
+ * @param in_segment - to be applied
1076
+ * @param io_changeset - target
1077
+ * @param in_currentIndexOffset - current offset
1078
+ * @param in_isPrimitiveType - is it an array of primitive types
1081
1079
  */
1082
1080
  const applySegment = function (in_segment, io_changeset, in_currentIndexOffset, lastIteratorARemove, in_isPrimitiveType, in_options) {
1083
1081
  if (!in_segment) {
@@ -1103,12 +1101,12 @@ const applySegment = function (in_segment, io_changeset, in_currentIndexOffset,
1103
1101
  };
1104
1102
  /**
1105
1103
  * 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
1104
+ * @param in_segment - to be applied
1105
+ * @param io_changeset - target
1106
+ * @param in_currentIndexOffset - current offset
1109
1107
  * @param out_conflicts - A list of paths that resulted in conflicts together with the type of the conflict
1110
1108
  * @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
1109
+ * @param in_isPrimitiveType - is it an array of primitive types
1112
1110
  */
1113
1111
  const applyRebaseSegment = function (in_segment, io_changeset, in_currentIndexOffset, out_conflicts, in_basePath, in_isPrimitiveType, in_options) {
1114
1112
  if (!in_segment) {
@@ -1136,9 +1134,9 @@ var ChangeSetArrayFunctions;
1136
1134
  * property root and it will be applied behind the base ChangeSet (assuming that the changes are relative to the
1137
1135
  * state after the base ChangeSet has been applied. It will change the base ChangeSet.)
1138
1136
  *
1139
- * @param io_basePropertyChanges - The ChangeSet describing the initial state
1137
+ * @param io_basePropertyChanges - The ChangeSet describing the initial state
1140
1138
  * @param in_appliedPropertyChanges - The ChangeSet to apply to this state
1141
- * @param in_typeid - The typeid of the contents of the collection (without the collection type)
1139
+ * @param in_typeid - The typeid of the contents of the collection (without the collection type)
1142
1140
  */
1143
1141
  function _performApplyAfterOnPropertyArray(io_basePropertyChanges, in_appliedPropertyChanges, in_typeid, in_options) {
1144
1142
  property_common_1.ConsoleUtils.assert(in_typeid, "_performApplyAfterOnPropertyArray: typeid missing");
@@ -1430,7 +1428,7 @@ var ChangeSetArrayFunctions;
1430
1428
  *
1431
1429
  * @param in_ownPropertyChangeSet - The ChangeSet for the property stored in this object
1432
1430
  * @param io_rebasePropertyChangeSetParent - The Array containing the ChangeSet for the property to be rebased
1433
- * @param in_key the key to the ChangeSet in io_rebasePropertyChangeSetParent we are rebasing on
1431
+ * @param in_key - The key to the ChangeSet in io_rebasePropertyChangeSetParent we are rebasing on
1434
1432
  * @param in_basePath - Base path to get to the property processed by this function
1435
1433
  * @param out_conflicts - A list of paths that resulted in conflicts together with the type of the conflict
1436
1434
  */