@fluid-experimental/property-properties 2.0.0-internal.3.0.2 → 2.0.0-internal.3.2.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 (266) hide show
  1. package/README.md +1 -0
  2. package/dist/containerSerializer.d.ts.map +1 -1
  3. package/dist/containerSerializer.js +5 -5
  4. package/dist/containerSerializer.js.map +1 -1
  5. package/dist/enableValidations.js.map +1 -1
  6. package/dist/index.d.ts +19 -19
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/properties/abstractStaticCollectionProperty.d.ts +10 -10
  10. package/dist/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
  11. package/dist/properties/abstractStaticCollectionProperty.js +70 -53
  12. package/dist/properties/abstractStaticCollectionProperty.js.map +1 -1
  13. package/dist/properties/arrayProperty.d.ts.map +1 -1
  14. package/dist/properties/arrayProperty.js +152 -103
  15. package/dist/properties/arrayProperty.js.map +1 -1
  16. package/dist/properties/baseProperty.d.ts +4 -4
  17. package/dist/properties/baseProperty.d.ts.map +1 -1
  18. package/dist/properties/baseProperty.js +69 -47
  19. package/dist/properties/baseProperty.js.map +1 -1
  20. package/dist/properties/boolProperty.d.ts.map +1 -1
  21. package/dist/properties/boolProperty.js +3 -3
  22. package/dist/properties/boolProperty.js.map +1 -1
  23. package/dist/properties/containerProperty.d.ts +8 -8
  24. package/dist/properties/containerProperty.d.ts.map +1 -1
  25. package/dist/properties/containerProperty.js +33 -26
  26. package/dist/properties/containerProperty.js.map +1 -1
  27. package/dist/properties/enumArrayProperty.d.ts.map +1 -1
  28. package/dist/properties/enumArrayProperty.js +14 -14
  29. package/dist/properties/enumArrayProperty.js.map +1 -1
  30. package/dist/properties/enumProperty.d.ts.map +1 -1
  31. package/dist/properties/enumProperty.js +17 -17
  32. package/dist/properties/enumProperty.js.map +1 -1
  33. package/dist/properties/floatProperties.js +4 -4
  34. package/dist/properties/floatProperties.js.map +1 -1
  35. package/dist/properties/index.d.ts +23 -23
  36. package/dist/properties/index.d.ts.map +1 -1
  37. package/dist/properties/index.js.map +1 -1
  38. package/dist/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
  39. package/dist/properties/indexedCollectionBaseProperty.js +47 -37
  40. package/dist/properties/indexedCollectionBaseProperty.js.map +1 -1
  41. package/dist/properties/intProperties.d.ts.map +1 -1
  42. package/dist/properties/intProperties.js +10 -10
  43. package/dist/properties/intProperties.js.map +1 -1
  44. package/dist/properties/lazyLoadedProperties.js.map +1 -1
  45. package/dist/properties/mapProperty.d.ts.map +1 -1
  46. package/dist/properties/mapProperty.js +21 -17
  47. package/dist/properties/mapProperty.js.map +1 -1
  48. package/dist/properties/namedNodeProperty.d.ts.map +1 -1
  49. package/dist/properties/namedNodeProperty.js +3 -3
  50. package/dist/properties/namedNodeProperty.js.map +1 -1
  51. package/dist/properties/namedProperty.d.ts.map +1 -1
  52. package/dist/properties/namedProperty.js +7 -5
  53. package/dist/properties/namedProperty.js.map +1 -1
  54. package/dist/properties/nodeProperty.d.ts.map +1 -1
  55. package/dist/properties/nodeProperty.js +5 -3
  56. package/dist/properties/nodeProperty.js.map +1 -1
  57. package/dist/properties/primitiveTypeCasts.d.ts.map +1 -1
  58. package/dist/properties/primitiveTypeCasts.js +9 -9
  59. package/dist/properties/primitiveTypeCasts.js.map +1 -1
  60. package/dist/properties/referenceArrayProperty.d.ts.map +1 -1
  61. package/dist/properties/referenceArrayProperty.js +31 -25
  62. package/dist/properties/referenceArrayProperty.js.map +1 -1
  63. package/dist/properties/referenceMapProperty.d.ts.map +1 -1
  64. package/dist/properties/referenceMapProperty.js +18 -18
  65. package/dist/properties/referenceMapProperty.js.map +1 -1
  66. package/dist/properties/referenceProperty.d.ts.map +1 -1
  67. package/dist/properties/referenceProperty.js +33 -29
  68. package/dist/properties/referenceProperty.js.map +1 -1
  69. package/dist/properties/setProperty.d.ts.map +1 -1
  70. package/dist/properties/setProperty.js +31 -29
  71. package/dist/properties/setProperty.js.map +1 -1
  72. package/dist/properties/stringProperty.d.ts.map +1 -1
  73. package/dist/properties/stringProperty.js +56 -40
  74. package/dist/properties/stringProperty.js.map +1 -1
  75. package/dist/properties/uintProperties.js +5 -5
  76. package/dist/properties/uintProperties.js.map +1 -1
  77. package/dist/properties/valueArrayProperty.d.ts +1 -1
  78. package/dist/properties/valueArrayProperty.d.ts.map +1 -1
  79. package/dist/properties/valueArrayProperty.js +30 -29
  80. package/dist/properties/valueArrayProperty.js.map +1 -1
  81. package/dist/properties/valueMapProperty.d.ts.map +1 -1
  82. package/dist/properties/valueMapProperty.js +31 -29
  83. package/dist/properties/valueMapProperty.js.map +1 -1
  84. package/dist/properties/valueProperty.d.ts.map +1 -1
  85. package/dist/properties/valueProperty.js +11 -9
  86. package/dist/properties/valueProperty.js.map +1 -1
  87. package/dist/propertyFactory.d.ts.map +1 -1
  88. package/dist/propertyFactory.js +309 -252
  89. package/dist/propertyFactory.js.map +1 -1
  90. package/dist/propertyTemplate.d.ts +17 -17
  91. package/dist/propertyTemplate.d.ts.map +1 -1
  92. package/dist/propertyTemplate.js +64 -45
  93. package/dist/propertyTemplate.js.map +1 -1
  94. package/dist/propertyTemplateWrapper.d.ts.map +1 -1
  95. package/dist/propertyTemplateWrapper.js +40 -25
  96. package/dist/propertyTemplateWrapper.js.map +1 -1
  97. package/dist/propertyUtils.d.ts.map +1 -1
  98. package/dist/propertyUtils.js.map +1 -1
  99. package/dist/test/properties/arrayProperty.spec.js +566 -490
  100. package/dist/test/properties/arrayProperty.spec.js.map +1 -1
  101. package/dist/test/properties/baseProperty.spec.js +293 -280
  102. package/dist/test/properties/baseProperty.spec.js.map +1 -1
  103. package/dist/test/properties/containerProperty.spec.js +100 -94
  104. package/dist/test/properties/containerProperty.spec.js.map +1 -1
  105. package/dist/test/properties/customArrayProperty.spec.js +174 -147
  106. package/dist/test/properties/customArrayProperty.spec.js.map +1 -1
  107. package/dist/test/properties/enumArrayProperty.spec.js +67 -63
  108. package/dist/test/properties/enumArrayProperty.spec.js.map +1 -1
  109. package/dist/test/properties/enumProperty.spec.js +115 -97
  110. package/dist/test/properties/enumProperty.spec.js.map +1 -1
  111. package/dist/test/properties/float32.spec.js +5 -5
  112. package/dist/test/properties/float32.spec.js.map +1 -1
  113. package/dist/test/properties/int64ArrayProperty.spec.js +157 -93
  114. package/dist/test/properties/int64ArrayProperty.spec.js.map +1 -1
  115. package/dist/test/properties/int64MapProperty.spec.js +185 -166
  116. package/dist/test/properties/int64MapProperty.spec.js.map +1 -1
  117. package/dist/test/properties/int64Property.spec.js +109 -109
  118. package/dist/test/properties/int64Property.spec.js.map +1 -1
  119. package/dist/test/properties/isLeafNode.spec.js +75 -76
  120. package/dist/test/properties/isLeafNode.spec.js.map +1 -1
  121. package/dist/test/properties/mapProperty.spec.js +571 -531
  122. package/dist/test/properties/mapProperty.spec.js.map +1 -1
  123. package/dist/test/properties/namedNodeProperty.spec.js +31 -31
  124. package/dist/test/properties/namedNodeProperty.spec.js.map +1 -1
  125. package/dist/test/properties/nodeProperty.spec.js +805 -795
  126. package/dist/test/properties/nodeProperty.spec.js.map +1 -1
  127. package/dist/test/properties/referenceProperty.spec.js +729 -679
  128. package/dist/test/properties/referenceProperty.spec.js.map +1 -1
  129. package/dist/test/properties/relationshipProperty.spec.js +16 -16
  130. package/dist/test/properties/relationshipProperty.spec.js.map +1 -1
  131. package/dist/test/properties/setProperty.spec.js +288 -227
  132. package/dist/test/properties/setProperty.spec.js.map +1 -1
  133. package/dist/test/properties/stringProperty.spec.js +326 -318
  134. package/dist/test/properties/stringProperty.spec.js.map +1 -1
  135. package/dist/test/properties/uint64Property.spec.js +46 -36
  136. package/dist/test/properties/uint64Property.spec.js.map +1 -1
  137. package/dist/test/properties/valueMapProperty.spec.js +259 -246
  138. package/dist/test/properties/valueMapProperty.spec.js.map +1 -1
  139. package/dist/test/properties/valueProperty.spec.js +49 -43
  140. package/dist/test/properties/valueProperty.spec.js.map +1 -1
  141. package/dist/test/propertyFactory.spec.js +2038 -1631
  142. package/dist/test/propertyFactory.spec.js.map +1 -1
  143. package/dist/test/propertyTemplateWrapper.spec.js +72 -102
  144. package/dist/test/propertyTemplateWrapper.spec.js.map +1 -1
  145. package/dist/test/propertyUtils.spec.js +22 -21
  146. package/dist/test/propertyUtils.spec.js.map +1 -1
  147. package/dist/test/reversibleChangeset.spec.js +857 -703
  148. package/dist/test/reversibleChangeset.spec.js.map +1 -1
  149. package/dist/test/setup.js +5 -5
  150. package/dist/test/setup.js.map +1 -1
  151. package/dist/test/tsconfig.tsbuildinfo +1 -1
  152. package/dist/test/utils.spec.js +1334 -1144
  153. package/dist/test/utils.spec.js.map +1 -1
  154. package/dist/test/validation/badMissingSemverInTypeid.js +20 -20
  155. package/dist/test/validation/badMissingSemverInTypeid.js.map +1 -1
  156. package/dist/test/validation/badPrimitiveTypeid.js +12 -12
  157. package/dist/test/validation/badPrimitiveTypeid.js.map +1 -1
  158. package/dist/test/validation/goodColorId.js +91 -91
  159. package/dist/test/validation/goodColorId.js.map +1 -1
  160. package/dist/test/validation/goodColorPalette.js +4 -4
  161. package/dist/test/validation/goodColorPalette.js.map +1 -1
  162. package/dist/test/validation/goodPointId.js +20 -20
  163. package/dist/test/validation/goodPointId.js.map +1 -1
  164. package/dist/test/validation/reversibleChangeSetTestData.js +23841 -2
  165. package/dist/test/validation/reversibleChangeSetTestData.js.map +1 -1
  166. package/lib/containerSerializer.d.ts.map +1 -1
  167. package/lib/containerSerializer.js +5 -5
  168. package/lib/containerSerializer.js.map +1 -1
  169. package/lib/enableValidations.js.map +1 -1
  170. package/lib/index.d.ts +19 -19
  171. package/lib/index.d.ts.map +1 -1
  172. package/lib/index.js +19 -19
  173. package/lib/index.js.map +1 -1
  174. package/lib/properties/abstractStaticCollectionProperty.d.ts +10 -10
  175. package/lib/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
  176. package/lib/properties/abstractStaticCollectionProperty.js +70 -53
  177. package/lib/properties/abstractStaticCollectionProperty.js.map +1 -1
  178. package/lib/properties/arrayProperty.d.ts.map +1 -1
  179. package/lib/properties/arrayProperty.js +152 -103
  180. package/lib/properties/arrayProperty.js.map +1 -1
  181. package/lib/properties/baseProperty.d.ts +4 -4
  182. package/lib/properties/baseProperty.d.ts.map +1 -1
  183. package/lib/properties/baseProperty.js +73 -51
  184. package/lib/properties/baseProperty.js.map +1 -1
  185. package/lib/properties/boolProperty.d.ts.map +1 -1
  186. package/lib/properties/boolProperty.js +3 -3
  187. package/lib/properties/boolProperty.js.map +1 -1
  188. package/lib/properties/containerProperty.d.ts +8 -8
  189. package/lib/properties/containerProperty.d.ts.map +1 -1
  190. package/lib/properties/containerProperty.js +33 -26
  191. package/lib/properties/containerProperty.js.map +1 -1
  192. package/lib/properties/enumArrayProperty.d.ts.map +1 -1
  193. package/lib/properties/enumArrayProperty.js +14 -14
  194. package/lib/properties/enumArrayProperty.js.map +1 -1
  195. package/lib/properties/enumProperty.d.ts.map +1 -1
  196. package/lib/properties/enumProperty.js +17 -17
  197. package/lib/properties/enumProperty.js.map +1 -1
  198. package/lib/properties/floatProperties.js +4 -4
  199. package/lib/properties/floatProperties.js.map +1 -1
  200. package/lib/properties/index.d.ts +23 -23
  201. package/lib/properties/index.d.ts.map +1 -1
  202. package/lib/properties/index.js +23 -23
  203. package/lib/properties/index.js.map +1 -1
  204. package/lib/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
  205. package/lib/properties/indexedCollectionBaseProperty.js +47 -37
  206. package/lib/properties/indexedCollectionBaseProperty.js.map +1 -1
  207. package/lib/properties/intProperties.d.ts.map +1 -1
  208. package/lib/properties/intProperties.js +10 -10
  209. package/lib/properties/intProperties.js.map +1 -1
  210. package/lib/properties/lazyLoadedProperties.js.map +1 -1
  211. package/lib/properties/mapProperty.d.ts.map +1 -1
  212. package/lib/properties/mapProperty.js +21 -17
  213. package/lib/properties/mapProperty.js.map +1 -1
  214. package/lib/properties/namedNodeProperty.d.ts.map +1 -1
  215. package/lib/properties/namedNodeProperty.js +3 -3
  216. package/lib/properties/namedNodeProperty.js.map +1 -1
  217. package/lib/properties/namedProperty.d.ts.map +1 -1
  218. package/lib/properties/namedProperty.js +7 -5
  219. package/lib/properties/namedProperty.js.map +1 -1
  220. package/lib/properties/nodeProperty.d.ts.map +1 -1
  221. package/lib/properties/nodeProperty.js +5 -3
  222. package/lib/properties/nodeProperty.js.map +1 -1
  223. package/lib/properties/primitiveTypeCasts.d.ts.map +1 -1
  224. package/lib/properties/primitiveTypeCasts.js +9 -9
  225. package/lib/properties/primitiveTypeCasts.js.map +1 -1
  226. package/lib/properties/referenceArrayProperty.d.ts.map +1 -1
  227. package/lib/properties/referenceArrayProperty.js +31 -25
  228. package/lib/properties/referenceArrayProperty.js.map +1 -1
  229. package/lib/properties/referenceMapProperty.d.ts.map +1 -1
  230. package/lib/properties/referenceMapProperty.js +18 -18
  231. package/lib/properties/referenceMapProperty.js.map +1 -1
  232. package/lib/properties/referenceProperty.d.ts.map +1 -1
  233. package/lib/properties/referenceProperty.js +33 -29
  234. package/lib/properties/referenceProperty.js.map +1 -1
  235. package/lib/properties/setProperty.d.ts.map +1 -1
  236. package/lib/properties/setProperty.js +31 -29
  237. package/lib/properties/setProperty.js.map +1 -1
  238. package/lib/properties/stringProperty.d.ts.map +1 -1
  239. package/lib/properties/stringProperty.js +56 -40
  240. package/lib/properties/stringProperty.js.map +1 -1
  241. package/lib/properties/uintProperties.js +5 -5
  242. package/lib/properties/uintProperties.js.map +1 -1
  243. package/lib/properties/valueArrayProperty.d.ts +1 -1
  244. package/lib/properties/valueArrayProperty.d.ts.map +1 -1
  245. package/lib/properties/valueArrayProperty.js +30 -29
  246. package/lib/properties/valueArrayProperty.js.map +1 -1
  247. package/lib/properties/valueMapProperty.d.ts.map +1 -1
  248. package/lib/properties/valueMapProperty.js +31 -29
  249. package/lib/properties/valueMapProperty.js.map +1 -1
  250. package/lib/properties/valueProperty.d.ts.map +1 -1
  251. package/lib/properties/valueProperty.js +11 -9
  252. package/lib/properties/valueProperty.js.map +1 -1
  253. package/lib/propertyFactory.d.ts.map +1 -1
  254. package/lib/propertyFactory.js +309 -252
  255. package/lib/propertyFactory.js.map +1 -1
  256. package/lib/propertyTemplate.d.ts +17 -17
  257. package/lib/propertyTemplate.d.ts.map +1 -1
  258. package/lib/propertyTemplate.js +64 -45
  259. package/lib/propertyTemplate.js.map +1 -1
  260. package/lib/propertyTemplateWrapper.d.ts.map +1 -1
  261. package/lib/propertyTemplateWrapper.js +40 -25
  262. package/lib/propertyTemplateWrapper.js.map +1 -1
  263. package/lib/propertyUtils.d.ts.map +1 -1
  264. package/lib/propertyUtils.js.map +1 -1
  265. package/package.json +28 -28
  266. package/src/index.d.ts +2750 -2681
@@ -5,16 +5,16 @@
5
5
  /**
6
6
  * @fileoverview Definition of the array property class
7
7
  */
8
- const { ArrayChangeSetIterator, ChangeSet, PathHelper, TypeIdHelper, } = require('@fluid-experimental/property-changeset');
9
- const { MSG } = require('@fluid-experimental/property-common').constants;
10
- const { UniversalDataArray, ConsoleUtils } = require('@fluid-experimental/property-common');
11
- const fastestJSONCopy = require('fastest-json-copy');
12
- const _ = require('lodash');
13
- const { deserializeNonPrimitiveArrayElements } = require('../containerSerializer');
14
- const { validationsEnabled } = require('../enableValidations');
15
- const { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');
16
- const { BaseProperty } = require('./baseProperty');
17
- const { LazyLoadedProperties: Property } = require('./lazyLoadedProperties');
8
+ const { ArrayChangeSetIterator, ChangeSet, PathHelper, TypeIdHelper, } = require("@fluid-experimental/property-changeset");
9
+ const { MSG } = require("@fluid-experimental/property-common").constants;
10
+ const { UniversalDataArray, ConsoleUtils } = require("@fluid-experimental/property-common");
11
+ const fastestJSONCopy = require("fastest-json-copy");
12
+ const _ = require("lodash");
13
+ const { deserializeNonPrimitiveArrayElements } = require("../containerSerializer");
14
+ const { validationsEnabled } = require("../enableValidations");
15
+ const { AbstractStaticCollectionProperty } = require("./abstractStaticCollectionProperty");
16
+ const { BaseProperty } = require("./baseProperty");
17
+ const { LazyLoadedProperties: Property } = require("./lazyLoadedProperties");
18
18
  const deepCopy = fastestJSONCopy.copy;
19
19
  var MODIFIED_STATE_FLAGS = BaseProperty.MODIFIED_STATE_FLAGS;
20
20
  // Some global constant objects that are used to indicate a few special
@@ -74,7 +74,7 @@ var _getLongestIncreasingSubsequenceSegments = function (in_segmentStarts, in_se
74
74
  var currentSegmentStart = in_segmentStarts[i];
75
75
  // Perform a binary search to find the largest entry in the list of found sub
76
76
  // sequences that has a sequenceEnd that is smaller or equal than currentSegmentStart
77
- var index = _.sortedIndexBy(foundSubSequences, { sequenceLastEntry: currentSegmentStart }, 'sequenceLastEntry');
77
+ var index = _.sortedIndexBy(foundSubSequences, { sequenceLastEntry: currentSegmentStart }, "sequenceLastEntry");
78
78
  var lastEntry = index > 0 ? foundSubSequences[index - 1] : undefined;
79
79
  // Create a new entry that is obtained by concatenating the longest sequence found so far
80
80
  // with the new segment
@@ -85,7 +85,7 @@ var _getLongestIncreasingSubsequenceSegments = function (in_segmentStarts, in_se
85
85
  previousEntry: lastEntry,
86
86
  };
87
87
  // Search for the insertion position for this entry
88
- var insertionPoint = _.sortedIndexBy(foundSubSequences, newEntry, 'sequenceLength');
88
+ var insertionPoint = _.sortedIndexBy(foundSubSequences, newEntry, "sequenceLength");
89
89
  if (foundSubSequences[insertionPoint] !== undefined &&
90
90
  foundSubSequences[insertionPoint].sequenceLength === newEntry.sequenceLength) {
91
91
  insertionPoint++;
@@ -149,7 +149,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
149
149
  if (index === -1) {
150
150
  throw new Error(MSG.GET_PATH_SEGMENT_CALLED_FOR_NON_ENTRY);
151
151
  }
152
- return '[' + index + ']';
152
+ return "[" + index + "]";
153
153
  }
154
154
  /**
155
155
  * Resolves a direct child node based on the given path segment
@@ -267,7 +267,9 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
267
267
  */
268
268
  pop() {
269
269
  if (this._dataArrayGetLength() > 0) {
270
- var item = this.get(this._dataArrayGetLength() - 1, { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });
270
+ var item = this.get(this._dataArrayGetLength() - 1, {
271
+ referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,
272
+ });
271
273
  this.remove(this._dataArrayGetLength() - 1);
272
274
  return item;
273
275
  }
@@ -281,7 +283,9 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
281
283
  */
282
284
  shift() {
283
285
  if (this._dataArrayGetLength() > 0) {
284
- var item = this.get(0, { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });
286
+ var item = this.get(0, {
287
+ referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,
288
+ });
285
289
  this.remove(0);
286
290
  return item;
287
291
  }
@@ -325,13 +329,14 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
325
329
  _setValues(in_values, in_typed, in_initial) {
326
330
  if (in_typed) {
327
331
  if (!this._isPrimitive) {
328
- ConsoleUtils.assert(_.isArray(in_values), MSG.IN_ARRAY_NOT_ARRAY + 'ArrayProperty._setValues');
332
+ ConsoleUtils.assert(_.isArray(in_values), MSG.IN_ARRAY_NOT_ARRAY + "ArrayProperty._setValues");
329
333
  var arr = [];
330
334
  for (var i = 0; i < in_values.length; i++) {
331
335
  var prop = in_values[i];
332
- prop = in_values[i] instanceof BaseProperty
333
- ? in_values[i]
334
- : Property.PropertyFactory._createProperty(in_values[i].typeid || this._typeid, null, in_values[i].value, this._getScope());
336
+ prop =
337
+ in_values[i] instanceof BaseProperty
338
+ ? in_values[i]
339
+ : Property.PropertyFactory._createProperty(in_values[i].typeid || this._typeid, null, in_values[i].value, this._getScope());
335
340
  arr.push(prop);
336
341
  }
337
342
  this._setValuesInternal(arr);
@@ -462,8 +467,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
462
467
  */
463
468
  _setChanges(in_pending, in_dirty) {
464
469
  var oldFlags = this._dirty ? this._dirty.flags : 0;
465
- if (this._dirty &&
466
- this._dirty === DIRTY_STATE_FLAGS_ARRAY[this._dirty.flags]) {
470
+ if (this._dirty && this._dirty === DIRTY_STATE_FLAGS_ARRAY[this._dirty.flags]) {
467
471
  this._dirty = undefined;
468
472
  }
469
473
  if (in_pending !== null) {
@@ -485,8 +489,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
485
489
  }
486
490
  }
487
491
  if (this._dirty) {
488
- if (this._dirty.dirty === undefined &&
489
- this._dirty.pending === undefined) {
492
+ if (this._dirty.dirty === undefined && this._dirty.pending === undefined) {
490
493
  this._dirty = oldFlags === 0 ? undefined : DIRTY_STATE_FLAGS_ARRAY[oldFlags];
491
494
  }
492
495
  else {
@@ -543,7 +546,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
543
546
  */
544
547
  insertRange(in_offset, in_array) {
545
548
  if (!_.isArray(in_array)) {
546
- throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + 'ArrayProperty.insertRange');
549
+ throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + "ArrayProperty.insertRange");
547
550
  }
548
551
  if (validationsEnabled.enabled) {
549
552
  for (var i = 0; i < in_array.length; i++) {
@@ -592,7 +595,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
592
595
  this._dataArrayInsertRange(in_offset, in_array);
593
596
  // Insert entry into changesets
594
597
  var changeSet = {
595
- 'insert': [[in_offset, this._serializeArray(in_array)]],
598
+ insert: [[in_offset, this._serializeArray(in_array)]],
596
599
  };
597
600
  this._updateChanges(changeSet);
598
601
  }
@@ -610,10 +613,13 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
610
613
  * properties removed.
611
614
  */
612
615
  removeRange(in_offset, in_deleteCount) {
613
- ConsoleUtils.assert(_.isNumber(in_offset), MSG.NOT_NUMBER +
614
- 'in_offset, method: ArrayProperty.removeRange or .remove');
615
- ConsoleUtils.assert(_.isNumber(in_deleteCount), MSG.NOT_NUMBER + 'in_deleteCount, method: ArrayProperty.removeRange or .remove');
616
- ConsoleUtils.assert(in_offset + in_deleteCount < this.length + 1 && in_offset >= 0 && in_deleteCount > 0, MSG.REMOVE_OUT_OF_BOUNDS + 'Cannot remove ' + in_deleteCount + ' items starting at index ' + in_offset);
616
+ ConsoleUtils.assert(_.isNumber(in_offset), MSG.NOT_NUMBER + "in_offset, method: ArrayProperty.removeRange or .remove");
617
+ ConsoleUtils.assert(_.isNumber(in_deleteCount), MSG.NOT_NUMBER + "in_deleteCount, method: ArrayProperty.removeRange or .remove");
618
+ ConsoleUtils.assert(in_offset + in_deleteCount < this.length + 1 && in_offset >= 0 && in_deleteCount > 0, MSG.REMOVE_OUT_OF_BOUNDS +
619
+ "Cannot remove " +
620
+ in_deleteCount +
621
+ " items starting at index " +
622
+ in_offset);
617
623
  var result = [];
618
624
  for (var i = in_offset; i < in_offset + in_deleteCount; i++) {
619
625
  result.push(this.get(i));
@@ -654,7 +660,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
654
660
  this._clearRange(in_offset, in_deleteCount);
655
661
  // Insert entry into changesets
656
662
  var changeSet = {
657
- 'remove': [[in_offset, in_deleteCount]],
663
+ remove: [[in_offset, in_deleteCount]],
658
664
  };
659
665
  this._updateChanges(changeSet);
660
666
  }
@@ -669,15 +675,20 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
669
675
  */
670
676
  setRange(in_offset, in_array) {
671
677
  if (!_.isArray(in_array) && !_.isString(in_array)) {
672
- throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + 'ArrayProperty.setRange');
678
+ throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + "ArrayProperty.setRange");
673
679
  }
674
680
  in_offset = Math.floor(in_offset);
675
681
  if (!isFinite(in_offset)) {
676
682
  // eslint-disable-next-line unicorn/prefer-type-error
677
- throw new Error(MSG.NOT_NUMBER + 'in_offset, method: ArrayProperty.setRange or .set');
678
- }
679
- ConsoleUtils.assert(in_offset >= -1 && (in_offset + in_array.length) <= this.getLength(), MSG.SET_OUT_OF_BOUNDS + 'Cannot set ' + in_array.length + ' items starting at index ' + in_offset +
680
- '. Array length: ' + this.getLength());
683
+ throw new Error(MSG.NOT_NUMBER + "in_offset, method: ArrayProperty.setRange or .set");
684
+ }
685
+ ConsoleUtils.assert(in_offset >= -1 && in_offset + in_array.length <= this.getLength(), MSG.SET_OUT_OF_BOUNDS +
686
+ "Cannot set " +
687
+ in_array.length +
688
+ " items starting at index " +
689
+ in_offset +
690
+ ". Array length: " +
691
+ this.getLength());
681
692
  this._checkIsNotReadOnly(true);
682
693
  this._setRangeWithoutDirtying(in_offset, in_array);
683
694
  this._setDirty();
@@ -729,7 +740,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
729
740
  i = j;
730
741
  }
731
742
  }
732
- changeSet['modify'] = changeArray;
743
+ changeSet["modify"] = changeArray;
733
744
  this._updateChanges(changeSet);
734
745
  }
735
746
  }
@@ -770,8 +781,9 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
770
781
  get(in_position, in_options) {
771
782
  in_options = in_options || {};
772
783
  in_options.referenceResolutionMode =
773
- in_options.referenceResolutionMode === undefined ? BaseProperty.REFERENCE_RESOLUTION.ALWAYS :
774
- in_options.referenceResolutionMode;
784
+ in_options.referenceResolutionMode === undefined
785
+ ? BaseProperty.REFERENCE_RESOLUTION.ALWAYS
786
+ : in_options.referenceResolutionMode;
775
787
  var prop = this;
776
788
  if (_.isArray(in_position)) {
777
789
  var iterationStart = 0;
@@ -791,9 +803,12 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
791
803
  ConsoleUtils.assert(pos >= 0 && pos < this.getLength(), MSG.GET_OUT_OF_RANGE + in_position[0]);
792
804
  }
793
805
  for (var i = iterationStart; i < in_position.length && prop; i++) {
794
- if (in_options.referenceResolutionMode === BaseProperty.REFERENCE_RESOLUTION.NO_LEAFS) {
795
- mode = i !== in_position.length - 1 ? BaseProperty.REFERENCE_RESOLUTION.ALWAYS :
796
- BaseProperty.REFERENCE_RESOLUTION.NEVER;
806
+ if (in_options.referenceResolutionMode ===
807
+ BaseProperty.REFERENCE_RESOLUTION.NO_LEAFS) {
808
+ mode =
809
+ i !== in_position.length - 1
810
+ ? BaseProperty.REFERENCE_RESOLUTION.ALWAYS
811
+ : BaseProperty.REFERENCE_RESOLUTION.NEVER;
797
812
  }
798
813
  if (in_position[i + 1] === PATH_TOKENS.REF) {
799
814
  mode = BaseProperty.REFERENCE_RESOLUTION.NEVER;
@@ -884,13 +899,14 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
884
899
  var insertedPropertyInstances = [];
885
900
  var scope = this._getScope();
886
901
  for (var i = 0; i < propertyDescriptions.length; ++i) {
887
- var createdProperty = Property.PropertyFactory._createProperty(propertyDescriptions[i]['typeid'], null, undefined, scope);
902
+ var createdProperty = Property.PropertyFactory._createProperty(propertyDescriptions[i]["typeid"], null, undefined, scope);
888
903
  // Set parent so scope is defined for deserialization
889
904
  createdProperty._setParent(this);
890
905
  createdProperty._deserialize(propertyDescriptions[i], false);
891
906
  insertedPropertyInstances.push(createdProperty);
892
907
  }
893
- this._insertRangeWithoutDirtying(arrayIterator.opDescription.operation[0] + arrayIterator.opDescription.offset, this._deserializeArray(insertedPropertyInstances), false);
908
+ this._insertRangeWithoutDirtying(arrayIterator.opDescription.operation[0] +
909
+ arrayIterator.opDescription.offset, this._deserializeArray(insertedPropertyInstances), false);
894
910
  break;
895
911
  case ArrayChangeSetIterator.types.REMOVE:
896
912
  // Handle removes
@@ -898,14 +914,18 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
898
914
  if (!_.isNumber(numRemoved)) {
899
915
  numRemoved = numRemoved.length;
900
916
  }
901
- this._removeRangeWithoutDirtying(arrayIterator.opDescription.operation[0] + arrayIterator.opDescription.offset, numRemoved);
917
+ this._removeRangeWithoutDirtying(arrayIterator.opDescription.operation[0] +
918
+ arrayIterator.opDescription.offset, numRemoved);
902
919
  break;
903
920
  case ArrayChangeSetIterator.types.MODIFY:
904
921
  // Handle modifies
905
922
  var propertyDescriptions = arrayIterator.opDescription.operation[1];
906
- var startIndex = arrayIterator.opDescription.operation[0] + arrayIterator.opDescription.offset;
923
+ var startIndex = arrayIterator.opDescription.operation[0] +
924
+ arrayIterator.opDescription.offset;
907
925
  for (var i = 0; i < propertyDescriptions.length; ++i) {
908
- var modifiedProperty = this.get(startIndex + i, { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });
926
+ var modifiedProperty = this.get(startIndex + i, {
927
+ referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,
928
+ });
909
929
  if (!modifiedProperty) {
910
930
  throw new Error(MSG.INDEX_INVALID + (startIndex + i));
911
931
  }
@@ -913,7 +933,9 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
913
933
  }
914
934
  break;
915
935
  default:
916
- console.error('applyChangeset: ' + MSG.UNKNOWN_OPERATION + arrayIterator.opDescription.type);
936
+ console.error("applyChangeset: " +
937
+ MSG.UNKNOWN_OPERATION +
938
+ arrayIterator.opDescription.type);
917
939
  }
918
940
  arrayIterator.next();
919
941
  }
@@ -924,7 +946,8 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
924
946
  switch (arrayIterator.opDescription.type) {
925
947
  case ArrayChangeSetIterator.types.INSERT:
926
948
  // Handle inserts
927
- this._insertRangeWithoutDirtying(arrayIterator.opDescription.operation[0] + arrayIterator.opDescription.offset, this._deserializeArray(arrayIterator.opDescription.operation[1]));
949
+ this._insertRangeWithoutDirtying(arrayIterator.opDescription.operation[0] +
950
+ arrayIterator.opDescription.offset, this._deserializeArray(arrayIterator.opDescription.operation[1]));
928
951
  break;
929
952
  case ArrayChangeSetIterator.types.REMOVE:
930
953
  // Handle removes
@@ -932,14 +955,18 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
932
955
  if (_.isArray(removeLength) || _.isString(removeLength)) {
933
956
  removeLength = removeLength.length;
934
957
  }
935
- this._removeRangeWithoutDirtying(arrayIterator.opDescription.operation[0] + arrayIterator.opDescription.offset, removeLength);
958
+ this._removeRangeWithoutDirtying(arrayIterator.opDescription.operation[0] +
959
+ arrayIterator.opDescription.offset, removeLength);
936
960
  break;
937
961
  case ArrayChangeSetIterator.types.MODIFY:
938
962
  // Handle modifies
939
- this._modifyRangeWithoutDirtying(arrayIterator.opDescription.operation[0] + arrayIterator.opDescription.offset, this._deserializeArray(arrayIterator.opDescription.operation[1]));
963
+ this._modifyRangeWithoutDirtying(arrayIterator.opDescription.operation[0] +
964
+ arrayIterator.opDescription.offset, this._deserializeArray(arrayIterator.opDescription.operation[1]));
940
965
  break;
941
966
  default:
942
- console.error('applyChangeset: ' + MSG.UNKNOWN_OPERATION + arrayIterator.opDescription.type);
967
+ console.error("applyChangeset: " +
968
+ MSG.UNKNOWN_OPERATION +
969
+ arrayIterator.opDescription.type);
943
970
  }
944
971
  arrayIterator.next();
945
972
  }
@@ -973,8 +1000,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
973
1000
  (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE) !== 0) {
974
1001
  pendingChanges = undefined;
975
1002
  }
976
- if (in_flags === undefined ||
977
- (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) !== 0) {
1003
+ if (in_flags === undefined || (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) !== 0) {
978
1004
  dirtyChanges = undefined;
979
1005
  }
980
1006
  this._setChanges(pendingChanges, dirtyChanges);
@@ -1024,14 +1050,14 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1024
1050
  var resultGuidToIndexMap = {};
1025
1051
  for (var i = 0; i < targetArray.length; i++) {
1026
1052
  var insertedProperty = targetArray[i];
1027
- if (insertedProperty['String'] === undefined ||
1028
- insertedProperty['String']['guid'] === undefined) {
1053
+ if (insertedProperty["String"] === undefined ||
1054
+ insertedProperty["String"]["guid"] === undefined) {
1029
1055
  throw new Error(MSG.MISSING_GUID_IN_NORMALIZED_CHANGESET);
1030
1056
  }
1031
- var guid = insertedProperty['String']['guid'];
1057
+ var guid = insertedProperty["String"]["guid"];
1032
1058
  // since the spec allows alternatively other changeset formats for strings, we have to support them here:
1033
- if (!_.isString(guid) && insertedProperty['String']['guid'].insert) {
1034
- guid = insertedProperty['String']['guid'].insert[0][1];
1059
+ if (!_.isString(guid) && insertedProperty["String"]["guid"].insert) {
1060
+ guid = insertedProperty["String"]["guid"].insert[0][1];
1035
1061
  }
1036
1062
  resultGuidToIndexMap[guid] = i;
1037
1063
  }
@@ -1093,7 +1119,10 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1093
1119
  // to remove the elements between the two points
1094
1120
  if (startPointInInitialArray > lastPositionInInitialArray) {
1095
1121
  changes.remove = changes.remove || [];
1096
- changes.remove.push([lastPositionInInitialArray, startPointInInitialArray - lastPositionInInitialArray]);
1122
+ changes.remove.push([
1123
+ lastPositionInInitialArray,
1124
+ startPointInInitialArray - lastPositionInInitialArray,
1125
+ ]);
1097
1126
  this._removeRangeWithoutDirtying(lastPositionInInitialArray + offset, startPointInInitialArray - lastPositionInInitialArray);
1098
1127
  offsetChange -= startPointInInitialArray - lastPositionInInitialArray;
1099
1128
  }
@@ -1102,10 +1131,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1102
1131
  if (startPointInTargetArray > lastPositionInTargetArray) {
1103
1132
  changes.insert = changes.insert || [];
1104
1133
  let elementsToInsert = targetArray.slice(lastPositionInTargetArray, startPointInTargetArray);
1105
- changes.insert.push([
1106
- lastPositionInInitialArray,
1107
- deepCopy(elementsToInsert),
1108
- ]);
1134
+ changes.insert.push([lastPositionInInitialArray, deepCopy(elementsToInsert)]);
1109
1135
  var scope = this._getScope();
1110
1136
  var insertedProperties = deserializeNonPrimitiveArrayElements(elementsToInsert, scope);
1111
1137
  this._insertRangeWithoutDirtying(lastPositionInInitialArray + offset, insertedProperties);
@@ -1128,7 +1154,8 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1128
1154
  }
1129
1155
  else {
1130
1156
  var lastModifiedSequence = _.last(changes.modify);
1131
- if (lastModifiedSequence[0] + lastModifiedSequence[1].length === startPointInInitialArray + j) {
1157
+ if (lastModifiedSequence[0] + lastModifiedSequence[1].length ===
1158
+ startPointInInitialArray + j) {
1132
1159
  lastModifiedSequence[1].push(entryChanges);
1133
1160
  }
1134
1161
  else {
@@ -1216,8 +1243,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1216
1243
  throw new Error(MSG.NO_NORMALIZED_CHANGESET);
1217
1244
  }
1218
1245
  var arrayLength = this._dataArrayGetLength();
1219
- if (!in_serializedObj.insert ||
1220
- !in_serializedObj.insert[0]) {
1246
+ if (!in_serializedObj.insert || !in_serializedObj.insert[0]) {
1221
1247
  // we've got an empty object, so we have to wipe everything we've got
1222
1248
  if (arrayLength > 0) {
1223
1249
  this._clearRange(0, arrayLength);
@@ -1234,14 +1260,18 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1234
1260
  }
1235
1261
  }
1236
1262
  var scope = this._getScope();
1237
- if (Property.PropertyFactory.inheritsFrom(this.getTypeid(), 'NamedProperty', { scope: scope })) {
1263
+ if (Property.PropertyFactory.inheritsFrom(this.getTypeid(), "NamedProperty", {
1264
+ scope: scope,
1265
+ })) {
1238
1266
  return this._deserializeNamedPropertyArray(in_serializedObj, in_reportToView);
1239
1267
  }
1240
1268
  else {
1241
1269
  // most simplistic diff method: Remove all existing data and insert the new data
1242
1270
  // The changes we will report as result of this function
1243
1271
  var simpleChanges = {
1244
- insert: in_createChangeSet ? deepCopy(in_serializedObj.insert) : in_serializedObj.insert,
1272
+ insert: in_createChangeSet
1273
+ ? deepCopy(in_serializedObj.insert)
1274
+ : in_serializedObj.insert,
1245
1275
  };
1246
1276
  if (arrayLength > 0) {
1247
1277
  simpleChanges.remove = [[0, arrayLength]];
@@ -1250,7 +1280,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1250
1280
  var propertyDescriptions = in_serializedObj.insert[0][1];
1251
1281
  var result = [];
1252
1282
  for (var i = 0; i < propertyDescriptions.length; ++i) {
1253
- var createdProperty = Property.PropertyFactory._createProperty(propertyDescriptions[i]['typeid'], null, undefined, scope);
1283
+ var createdProperty = Property.PropertyFactory._createProperty(propertyDescriptions[i]["typeid"], null, undefined, scope);
1254
1284
  createdProperty._setParent(this);
1255
1285
  createdProperty._deserialize(propertyDescriptions[i], false, in_filteringOptions, false);
1256
1286
  result.push(createdProperty);
@@ -1266,10 +1296,11 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1266
1296
  var changeSetArray = in_serializedObj.insert[0][1];
1267
1297
  var len = buffer.length;
1268
1298
  var i = 0;
1269
- if (this._typeid === 'Int64' || this._typeid === 'Uint64') {
1299
+ if (this._typeid === "Int64" || this._typeid === "Uint64") {
1270
1300
  // For (u)int64, we will compare (Ui/I)nt64 objects with arrays [low, high]
1271
1301
  for (i = 0; i < len; i++) {
1272
- if (changeSetArray[i][0] !== buffer[i].getValueLow() || changeSetArray[i][1] !== buffer[i].getValueHigh()) {
1302
+ if (changeSetArray[i][0] !== buffer[i].getValueLow() ||
1303
+ changeSetArray[i][1] !== buffer[i].getValueHigh()) {
1273
1304
  break;
1274
1305
  }
1275
1306
  }
@@ -1323,7 +1354,8 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1323
1354
  var lastModify = undefined;
1324
1355
  if (result.modify && result.modify.length > 0) {
1325
1356
  lastModify = result.modify[result.modify.length - 1];
1326
- if (lastModify[0] + lastModify[1].length === currentArrayIndex - op.offset) {
1357
+ if (lastModify[0] + lastModify[1].length ===
1358
+ currentArrayIndex - op.offset) {
1327
1359
  // we need to combine, keep lastModify
1328
1360
  }
1329
1361
  else {
@@ -1332,8 +1364,10 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1332
1364
  }
1333
1365
  if (lastModify) {
1334
1366
  lastModify[1].push(this._dataArrayGetValue(currentArrayIndex).serialize({
1335
- 'dirtyOnly': true, 'includeRootTypeid': true, 'dirtinessType': in_dirtinessType,
1336
- 'includeReferencedRepositories': in_includeReferencedRepositories,
1367
+ dirtyOnly: true,
1368
+ includeRootTypeid: true,
1369
+ dirtinessType: in_dirtinessType,
1370
+ includeReferencedRepositories: in_includeReferencedRepositories,
1337
1371
  }));
1338
1372
  }
1339
1373
  else {
@@ -1341,19 +1375,28 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1341
1375
  if (!result.modify) {
1342
1376
  result.modify = [];
1343
1377
  }
1344
- result.modify.push([currentArrayIndex - op.offset,
1345
- [this._dataArrayGetValue(currentArrayIndex).serialize({
1346
- 'dirtyOnly': true, 'includeRootTypeid': true, 'dirtinessType': in_dirtinessType,
1347
- 'includeReferencedRepositories': in_includeReferencedRepositories,
1348
- })]]);
1378
+ result.modify.push([
1379
+ currentArrayIndex - op.offset,
1380
+ [
1381
+ this._dataArrayGetValue(currentArrayIndex).serialize({
1382
+ dirtyOnly: true,
1383
+ includeRootTypeid: true,
1384
+ dirtinessType: in_dirtinessType,
1385
+ includeReferencedRepositories: in_includeReferencedRepositories,
1386
+ }),
1387
+ ],
1388
+ ]);
1349
1389
  }
1350
1390
  currentArrayIndex++;
1351
1391
  // add more immediate modifies if possible
1352
- while (currentArrayIndex < currentArraySize && currentArrayIndex < opStartIndex &&
1392
+ while (currentArrayIndex < currentArraySize &&
1393
+ currentArrayIndex < opStartIndex &&
1353
1394
  this._dataArrayGetValue(currentArrayIndex)._isDirty(in_dirtinessType)) {
1354
1395
  result.modify[result.modify.length - 1][1].push(this._dataArrayGetValue(currentArrayIndex).serialize({
1355
- 'dirtyOnly': true, 'includeRootTypeid': true, 'dirtinessType': in_dirtinessType,
1356
- 'includeReferencedRepositories': in_includeReferencedRepositories,
1396
+ dirtyOnly: true,
1397
+ includeRootTypeid: true,
1398
+ dirtinessType: in_dirtinessType,
1399
+ includeReferencedRepositories: in_includeReferencedRepositories,
1357
1400
  }));
1358
1401
  currentArrayIndex++;
1359
1402
  }
@@ -1379,11 +1422,13 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1379
1422
  // TODO: read the data from the array now - remove the data from the op and
1380
1423
  // TODO: replace it with just the length instead
1381
1424
  if (!this._dataArrayGetValue(opStartIndex + j)) {
1382
- throw new Error('insert: invalid index');
1425
+ throw new Error("insert: invalid index");
1383
1426
  }
1384
1427
  newInsert[1].push(this._dataArrayGetValue(opStartIndex + j).serialize({
1385
- 'dirtyOnly': false, 'includeRootTypeid': true, 'dirtinessType': in_dirtinessType,
1386
- 'includeReferencedRepositories': in_includeReferencedRepositories,
1428
+ dirtyOnly: false,
1429
+ includeRootTypeid: true,
1430
+ dirtinessType: in_dirtinessType,
1431
+ includeReferencedRepositories: in_includeReferencedRepositories,
1387
1432
  }));
1388
1433
  }
1389
1434
  if (!result.insert) {
@@ -1426,9 +1471,9 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1426
1471
  var result = AbstractStaticCollectionProperty.prototype._serialize.call(this, in_dirtyOnly, in_includeRootTypeid, in_dirtinessType, in_includeReferencedRepositories);
1427
1472
  if (!this._isPrimitive) {
1428
1473
  if (in_dirtyOnly) {
1429
- _.extend(result, in_dirtinessType === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE ?
1430
- this._getChangesetForCustomTypeArray(this._getPendingChanges(), in_dirtinessType, in_includeReferencedRepositories) :
1431
- this._getChangesetForCustomTypeArray(this._getDirtyChanges(), in_dirtinessType, in_includeReferencedRepositories));
1474
+ _.extend(result, in_dirtinessType === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE
1475
+ ? this._getChangesetForCustomTypeArray(this._getPendingChanges(), in_dirtinessType, in_includeReferencedRepositories)
1476
+ : this._getChangesetForCustomTypeArray(this._getDirtyChanges(), in_dirtinessType, in_includeReferencedRepositories));
1432
1477
  return result;
1433
1478
  }
1434
1479
  else {
@@ -1445,8 +1490,9 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1445
1490
  }
1446
1491
  }
1447
1492
  else if (in_dirtyOnly) {
1448
- return in_dirtinessType === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE ?
1449
- deepCopy(this._getPendingChanges()) : deepCopy(this._getDirtyChanges());
1493
+ return in_dirtinessType === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE
1494
+ ? deepCopy(this._getPendingChanges())
1495
+ : deepCopy(this._getDirtyChanges());
1450
1496
  }
1451
1497
  else {
1452
1498
  // returns just an insert with the current data
@@ -1468,23 +1514,23 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1468
1514
  * @param {function} printFct - Function to call for printing each property
1469
1515
  */
1470
1516
  _prettyPrint(indent, externalId, printFct) {
1471
- printFct(indent + externalId + this.getId() + ' (Array of ' + this.getTypeid() + '): [');
1517
+ printFct(indent + externalId + this.getId() + " (Array of " + this.getTypeid() + "): [");
1472
1518
  if (!this._isPrimitive) {
1473
1519
  this._prettyPrintChildren(indent, printFct);
1474
1520
  }
1475
1521
  else {
1476
- var childIndent = indent + ' ';
1477
- var prefix = '';
1478
- var suffix = '';
1479
- if (this.getTypeid() === 'String') {
1522
+ var childIndent = indent + " ";
1523
+ var prefix = "";
1524
+ var suffix = "";
1525
+ if (this.getTypeid() === "String") {
1480
1526
  prefix = '"';
1481
1527
  suffix = '"';
1482
1528
  }
1483
1529
  for (var i = 0; i < this._dataArrayGetLength(); i++) {
1484
- printFct(childIndent + i + ': ' + prefix + this._dataArrayGetValue(i) + suffix);
1530
+ printFct(childIndent + i + ": " + prefix + this._dataArrayGetValue(i) + suffix);
1485
1531
  }
1486
1532
  }
1487
- printFct(indent + ']');
1533
+ printFct(indent + "]");
1488
1534
  }
1489
1535
  /**
1490
1536
  * Repeatedly calls back the given function with human-readable string
@@ -1493,11 +1539,12 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1493
1539
  * @param {function} printFct - Function to call for printing each property
1494
1540
  */
1495
1541
  _prettyPrintChildren(indent, printFct) {
1496
- indent += ' ';
1542
+ indent += " ";
1497
1543
  var ids = this.getIds();
1498
1544
  for (var i = 0; i < ids.length; i++) {
1499
- this.get(ids[i], { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER })
1500
- ._prettyPrint(indent, ids[i] + ': ', printFct);
1545
+ this.get(ids[i], {
1546
+ referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,
1547
+ })._prettyPrint(indent, ids[i] + ": ", printFct);
1501
1548
  }
1502
1549
  }
1503
1550
  /**
@@ -1516,7 +1563,9 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1516
1563
  if (!this._isPrimitive) {
1517
1564
  var ids = this.getIds();
1518
1565
  for (var i = 0; i < ids.length; i++) {
1519
- json.value.push(this.get(ids[i], { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER })._toJson());
1566
+ json.value.push(this.get(ids[i], {
1567
+ referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,
1568
+ })._toJson());
1520
1569
  }
1521
1570
  }
1522
1571
  else {
@@ -1533,7 +1582,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1533
1582
  getFullTypeid(in_hideCollection) {
1534
1583
  return in_hideCollection
1535
1584
  ? this._typeid
1536
- : TypeIdHelper.createSerializationTypeId(this._typeid, 'array');
1585
+ : TypeIdHelper.createSerializationTypeId(this._typeid, "array");
1537
1586
  }
1538
1587
  /**
1539
1588
  * Creates and initializes the data array
@@ -1633,5 +1682,5 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1633
1682
  }
1634
1683
  }
1635
1684
  ArrayProperty.prototype._staticChildren = {};
1636
- ArrayProperty.prototype._context = 'array';
1685
+ ArrayProperty.prototype._context = "array";
1637
1686
  //# sourceMappingURL=arrayProperty.js.map