@fluid-experimental/property-properties 0.58.1001 → 0.58.2000-58133

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 (223) hide show
  1. package/dist/containerSerializer.d.ts.map +1 -1
  2. package/dist/containerSerializer.js +4 -10
  3. package/dist/containerSerializer.js.map +1 -1
  4. package/dist/enableValidations.d.ts.map +1 -1
  5. package/dist/enableValidations.js +1 -1
  6. package/dist/enableValidations.js.map +1 -1
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
  11. package/dist/properties/abstractStaticCollectionProperty.js +1 -28
  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 +26 -85
  15. package/dist/properties/arrayProperty.js.map +1 -1
  16. package/dist/properties/baseProperty.d.ts.map +1 -1
  17. package/dist/properties/baseProperty.js +9 -71
  18. package/dist/properties/baseProperty.js.map +1 -1
  19. package/dist/properties/boolProperty.d.ts.map +1 -1
  20. package/dist/properties/boolProperty.js +0 -1
  21. package/dist/properties/boolProperty.js.map +1 -1
  22. package/dist/properties/containerProperty.d.ts.map +1 -1
  23. package/dist/properties/containerProperty.js +4 -22
  24. package/dist/properties/containerProperty.js.map +1 -1
  25. package/dist/properties/enumArrayProperty.d.ts.map +1 -1
  26. package/dist/properties/enumArrayProperty.js +2 -14
  27. package/dist/properties/enumArrayProperty.js.map +1 -1
  28. package/dist/properties/enumProperty.d.ts.map +1 -1
  29. package/dist/properties/enumProperty.js +3 -10
  30. package/dist/properties/enumProperty.js.map +1 -1
  31. package/dist/properties/floatProperties.js +0 -2
  32. package/dist/properties/floatProperties.js.map +1 -1
  33. package/dist/properties/index.d.ts +7 -38
  34. package/dist/properties/index.d.ts.map +1 -1
  35. package/dist/properties/index.js +37 -68
  36. package/dist/properties/index.js.map +1 -1
  37. package/dist/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
  38. package/dist/properties/indexedCollectionBaseProperty.js +6 -18
  39. package/dist/properties/indexedCollectionBaseProperty.js.map +1 -1
  40. package/dist/properties/intProperties.d.ts.map +1 -1
  41. package/dist/properties/intProperties.js +3 -20
  42. package/dist/properties/intProperties.js.map +1 -1
  43. package/dist/properties/lazyLoadedProperties.js.map +1 -1
  44. package/dist/properties/mapProperty.d.ts.map +1 -1
  45. package/dist/properties/mapProperty.js +4 -23
  46. package/dist/properties/mapProperty.js.map +1 -1
  47. package/dist/properties/namedNodeProperty.d.ts.map +1 -1
  48. package/dist/properties/namedNodeProperty.js.map +1 -1
  49. package/dist/properties/namedProperty.d.ts.map +1 -1
  50. package/dist/properties/namedProperty.js +0 -3
  51. package/dist/properties/namedProperty.js.map +1 -1
  52. package/dist/properties/nodeProperty.d.ts.map +1 -1
  53. package/dist/properties/nodeProperty.js +0 -3
  54. package/dist/properties/nodeProperty.js.map +1 -1
  55. package/dist/properties/primitiveTypeCasts.d.ts.map +1 -1
  56. package/dist/properties/primitiveTypeCasts.js +2 -2
  57. package/dist/properties/primitiveTypeCasts.js.map +1 -1
  58. package/dist/properties/referenceArrayProperty.d.ts.map +1 -1
  59. package/dist/properties/referenceArrayProperty.js +3 -16
  60. package/dist/properties/referenceArrayProperty.js.map +1 -1
  61. package/dist/properties/referenceMapProperty.d.ts.map +1 -1
  62. package/dist/properties/referenceMapProperty.js +3 -13
  63. package/dist/properties/referenceMapProperty.js.map +1 -1
  64. package/dist/properties/referenceProperty.d.ts.map +1 -1
  65. package/dist/properties/referenceProperty.js +4 -12
  66. package/dist/properties/referenceProperty.js.map +1 -1
  67. package/dist/properties/setProperty.d.ts.map +1 -1
  68. package/dist/properties/setProperty.js +3 -22
  69. package/dist/properties/setProperty.js.map +1 -1
  70. package/dist/properties/stringProperty.d.ts.map +1 -1
  71. package/dist/properties/stringProperty.js +12 -48
  72. package/dist/properties/stringProperty.js.map +1 -1
  73. package/dist/properties/uintProperties.js +0 -3
  74. package/dist/properties/uintProperties.js.map +1 -1
  75. package/dist/properties/valueArrayProperty.d.ts.map +1 -1
  76. package/dist/properties/valueArrayProperty.js +3 -45
  77. package/dist/properties/valueArrayProperty.js.map +1 -1
  78. package/dist/properties/valueMapProperty.d.ts.map +1 -1
  79. package/dist/properties/valueMapProperty.js +4 -29
  80. package/dist/properties/valueMapProperty.js.map +1 -1
  81. package/dist/properties/valueProperty.d.ts.map +1 -1
  82. package/dist/properties/valueProperty.js +2 -14
  83. package/dist/properties/valueProperty.js.map +1 -1
  84. package/dist/propertyFactory.d.ts.map +1 -1
  85. package/dist/propertyFactory.js +35 -72
  86. package/dist/propertyFactory.js.map +1 -1
  87. package/dist/propertyTemplate.d.ts.map +1 -1
  88. package/dist/propertyTemplate.js +0 -14
  89. package/dist/propertyTemplate.js.map +1 -1
  90. package/dist/propertyTemplateWrapper.d.ts.map +1 -1
  91. package/dist/propertyTemplateWrapper.js +4 -12
  92. package/dist/propertyTemplateWrapper.js.map +1 -1
  93. package/dist/propertyUtils.d.ts.map +1 -1
  94. package/dist/propertyUtils.js.map +1 -1
  95. package/dist/test/properties/arrayProperty.spec.js +82 -82
  96. package/dist/test/properties/arrayProperty.spec.js.map +1 -1
  97. package/dist/test/properties/baseProperty.spec.js +53 -53
  98. package/dist/test/properties/baseProperty.spec.js.map +1 -1
  99. package/dist/test/properties/containerProperty.spec.js +25 -25
  100. package/dist/test/properties/containerProperty.spec.js.map +1 -1
  101. package/dist/test/properties/customArrayProperty.spec.js +35 -35
  102. package/dist/test/properties/customArrayProperty.spec.js.map +1 -1
  103. package/dist/test/properties/enumArrayProperty.spec.js +6 -6
  104. package/dist/test/properties/enumArrayProperty.spec.js.map +1 -1
  105. package/dist/test/properties/enumProperty.spec.js +26 -26
  106. package/dist/test/properties/enumProperty.spec.js.map +1 -1
  107. package/dist/test/properties/float32.spec.js.map +1 -1
  108. package/dist/test/properties/int64ArrayProperty.spec.js +22 -22
  109. package/dist/test/properties/int64ArrayProperty.spec.js.map +1 -1
  110. package/dist/test/properties/int64MapProperty.spec.js +28 -28
  111. package/dist/test/properties/int64MapProperty.spec.js.map +1 -1
  112. package/dist/test/properties/int64Property.spec.js +11 -11
  113. package/dist/test/properties/int64Property.spec.js.map +1 -1
  114. package/dist/test/properties/isLeafNode.spec.js +25 -25
  115. package/dist/test/properties/isLeafNode.spec.js.map +1 -1
  116. package/dist/test/properties/mapProperty.spec.js +110 -110
  117. package/dist/test/properties/mapProperty.spec.js.map +1 -1
  118. package/dist/test/properties/namedNodeProperty.spec.js +5 -5
  119. package/dist/test/properties/namedNodeProperty.spec.js.map +1 -1
  120. package/dist/test/properties/nodeProperty.spec.js +160 -160
  121. package/dist/test/properties/nodeProperty.spec.js.map +1 -1
  122. package/dist/test/properties/referenceProperty.spec.js +21 -21
  123. package/dist/test/properties/referenceProperty.spec.js.map +1 -1
  124. package/dist/test/properties/relationshipProperty.spec.js +4 -4
  125. package/dist/test/properties/relationshipProperty.spec.js.map +1 -1
  126. package/dist/test/properties/setProperty.spec.js +32 -32
  127. package/dist/test/properties/setProperty.spec.js.map +1 -1
  128. package/dist/test/properties/stringProperty.spec.js +38 -38
  129. package/dist/test/properties/stringProperty.spec.js.map +1 -1
  130. package/dist/test/properties/uint64Property.spec.js +3 -3
  131. package/dist/test/properties/uint64Property.spec.js.map +1 -1
  132. package/dist/test/properties/valueMapProperty.spec.js +28 -28
  133. package/dist/test/properties/valueMapProperty.spec.js.map +1 -1
  134. package/dist/test/properties/valueProperty.spec.js +7 -7
  135. package/dist/test/properties/valueProperty.spec.js.map +1 -1
  136. package/dist/test/propertyFactory.spec.js +559 -560
  137. package/dist/test/propertyFactory.spec.js.map +1 -1
  138. package/dist/test/propertyTemplateWrapper.spec.js +38 -38
  139. package/dist/test/propertyTemplateWrapper.spec.js.map +1 -1
  140. package/dist/test/propertyUtils.spec.js +5 -5
  141. package/dist/test/propertyUtils.spec.js.map +1 -1
  142. package/dist/test/reversibleChangeset.spec.js +266 -266
  143. package/dist/test/reversibleChangeset.spec.js.map +1 -1
  144. package/dist/test/setup.js.map +1 -1
  145. package/dist/test/tsconfig.tsbuildinfo +145 -145
  146. package/dist/test/utils.spec.js +508 -517
  147. package/dist/test/utils.spec.js.map +1 -1
  148. package/dist/test/validation/badMissingSemverInTypeid.js +9 -9
  149. package/dist/test/validation/badMissingSemverInTypeid.js.map +1 -1
  150. package/dist/test/validation/badPrimitiveTypeid.js +5 -5
  151. package/dist/test/validation/badPrimitiveTypeid.js.map +1 -1
  152. package/dist/test/validation/goodColorId.js +42 -42
  153. package/dist/test/validation/goodColorId.js.map +1 -1
  154. package/dist/test/validation/goodColorPalette.js +2 -2
  155. package/dist/test/validation/goodColorPalette.js.map +1 -1
  156. package/dist/test/validation/goodPointId.js +9 -9
  157. package/dist/test/validation/goodPointId.js.map +1 -1
  158. package/dist/test/validation/reversibleChangeSetTestData.js +1 -1
  159. package/dist/test/validation/reversibleChangeSetTestData.js.map +1 -1
  160. package/lib/containerSerializer.js +4 -10
  161. package/lib/containerSerializer.js.map +1 -1
  162. package/lib/enableValidations.js +1 -1
  163. package/lib/enableValidations.js.map +1 -1
  164. package/lib/index.js +1 -1
  165. package/lib/index.js.map +1 -1
  166. package/lib/properties/abstractStaticCollectionProperty.js +1 -28
  167. package/lib/properties/abstractStaticCollectionProperty.js.map +1 -1
  168. package/lib/properties/arrayProperty.js +26 -85
  169. package/lib/properties/arrayProperty.js.map +1 -1
  170. package/lib/properties/baseProperty.js +7 -69
  171. package/lib/properties/baseProperty.js.map +1 -1
  172. package/lib/properties/boolProperty.js +0 -1
  173. package/lib/properties/boolProperty.js.map +1 -1
  174. package/lib/properties/containerProperty.js +4 -22
  175. package/lib/properties/containerProperty.js.map +1 -1
  176. package/lib/properties/enumArrayProperty.js +2 -14
  177. package/lib/properties/enumArrayProperty.js.map +1 -1
  178. package/lib/properties/enumProperty.js +3 -10
  179. package/lib/properties/enumProperty.js.map +1 -1
  180. package/lib/properties/floatProperties.js +0 -2
  181. package/lib/properties/floatProperties.js.map +1 -1
  182. package/lib/properties/index.js +7 -38
  183. package/lib/properties/index.js.map +1 -1
  184. package/lib/properties/indexedCollectionBaseProperty.js +6 -18
  185. package/lib/properties/indexedCollectionBaseProperty.js.map +1 -1
  186. package/lib/properties/intProperties.js +3 -20
  187. package/lib/properties/intProperties.js.map +1 -1
  188. package/lib/properties/lazyLoadedProperties.js.map +1 -1
  189. package/lib/properties/mapProperty.js +4 -23
  190. package/lib/properties/mapProperty.js.map +1 -1
  191. package/lib/properties/namedNodeProperty.js.map +1 -1
  192. package/lib/properties/namedProperty.js +0 -3
  193. package/lib/properties/namedProperty.js.map +1 -1
  194. package/lib/properties/nodeProperty.js +0 -3
  195. package/lib/properties/nodeProperty.js.map +1 -1
  196. package/lib/properties/primitiveTypeCasts.js +2 -2
  197. package/lib/properties/primitiveTypeCasts.js.map +1 -1
  198. package/lib/properties/referenceArrayProperty.js +3 -16
  199. package/lib/properties/referenceArrayProperty.js.map +1 -1
  200. package/lib/properties/referenceMapProperty.js +3 -13
  201. package/lib/properties/referenceMapProperty.js.map +1 -1
  202. package/lib/properties/referenceProperty.js +4 -12
  203. package/lib/properties/referenceProperty.js.map +1 -1
  204. package/lib/properties/setProperty.js +3 -22
  205. package/lib/properties/setProperty.js.map +1 -1
  206. package/lib/properties/stringProperty.js +12 -48
  207. package/lib/properties/stringProperty.js.map +1 -1
  208. package/lib/properties/uintProperties.js +0 -3
  209. package/lib/properties/uintProperties.js.map +1 -1
  210. package/lib/properties/valueArrayProperty.js +3 -45
  211. package/lib/properties/valueArrayProperty.js.map +1 -1
  212. package/lib/properties/valueMapProperty.js +4 -29
  213. package/lib/properties/valueMapProperty.js.map +1 -1
  214. package/lib/properties/valueProperty.js +2 -14
  215. package/lib/properties/valueProperty.js.map +1 -1
  216. package/lib/propertyFactory.js +35 -72
  217. package/lib/propertyFactory.js.map +1 -1
  218. package/lib/propertyTemplate.js +0 -14
  219. package/lib/propertyTemplate.js.map +1 -1
  220. package/lib/propertyTemplateWrapper.js +4 -12
  221. package/lib/propertyTemplateWrapper.js.map +1 -1
  222. package/lib/propertyUtils.js.map +1 -1
  223. package/package.json +13 -6
@@ -5,17 +5,17 @@
5
5
  /**
6
6
  * @fileoverview Definition of the array property class
7
7
  */
8
- const _ = require('lodash');
9
- const { BaseProperty } = require('./baseProperty');
10
- const { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');
11
- const { deserializeNonPrimitiveArrayElements } = require('../containerSerializer');
12
- const { ArrayChangeSetIterator, ChangeSet, PathHelper, TypeIdHelper } = require('@fluid-experimental/property-changeset');
8
+ const { ArrayChangeSetIterator, ChangeSet, PathHelper, TypeIdHelper, } = require('@fluid-experimental/property-changeset');
13
9
  const { MSG } = require('@fluid-experimental/property-common').constants;
14
- const { LazyLoadedProperties: Property } = require('./lazyLoadedProperties');
15
10
  const { UniversalDataArray, ConsoleUtils } = require('@fluid-experimental/property-common');
16
11
  const fastestJSONCopy = require('fastest-json-copy');
17
- const deepCopy = fastestJSONCopy.copy;
12
+ const _ = require('lodash');
13
+ const { deserializeNonPrimitiveArrayElements } = require('../containerSerializer');
18
14
  const { validationsEnabled } = require('../enableValidations');
15
+ const { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');
16
+ const { BaseProperty } = require('./baseProperty');
17
+ const { LazyLoadedProperties: Property } = require('./lazyLoadedProperties');
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
21
21
  // cases for the dirty object. If there are no entries in the pending and
@@ -27,23 +27,23 @@ var MODIFIED_STATE_FLAGS = BaseProperty.MODIFIED_STATE_FLAGS;
27
27
  var DIRTY_AND_PENDING_CHILD_CHANGES = {
28
28
  pending: undefined,
29
29
  dirty: undefined,
30
- flags: MODIFIED_STATE_FLAGS.PENDING_CHANGE | MODIFIED_STATE_FLAGS.DIRTY
30
+ flags: MODIFIED_STATE_FLAGS.PENDING_CHANGE | MODIFIED_STATE_FLAGS.DIRTY,
31
31
  };
32
32
  var PENDING_CHILD_CHANGES = {
33
33
  pending: undefined,
34
34
  dirty: undefined,
35
- flags: MODIFIED_STATE_FLAGS.PENDING_CHANGE
35
+ flags: MODIFIED_STATE_FLAGS.PENDING_CHANGE,
36
36
  };
37
37
  var DIRTY_CHILD_CHANGES = {
38
38
  pending: undefined,
39
39
  dirty: undefined,
40
- flags: MODIFIED_STATE_FLAGS.DIRTY
40
+ flags: MODIFIED_STATE_FLAGS.DIRTY,
41
41
  };
42
42
  var DIRTY_STATE_FLAGS_ARRAY = [
43
43
  undefined,
44
44
  PENDING_CHILD_CHANGES,
45
45
  DIRTY_CHILD_CHANGES,
46
- DIRTY_AND_PENDING_CHILD_CHANGES
46
+ DIRTY_AND_PENDING_CHILD_CHANGES,
47
47
  ];
48
48
  var PATH_TOKENS = BaseProperty.PATH_TOKENS;
49
49
  /**
@@ -82,7 +82,7 @@ var _getLongestIncreasingSubsequenceSegments = function (in_segmentStarts, in_se
82
82
  sequenceLength: in_segmentLengths[i] + (lastEntry ? lastEntry.sequenceLength : 0),
83
83
  segmentIndex: i,
84
84
  sequenceLastEntry: currentSegmentStart + in_segmentLengths[i] - 1,
85
- previousEntry: lastEntry
85
+ previousEntry: lastEntry,
86
86
  };
87
87
  // Search for the insertion position for this entry
88
88
  var insertionPoint = _.sortedIndexBy(foundSubSequences, newEntry, 'sequenceLength');
@@ -136,7 +136,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
136
136
  }
137
137
  this._dataArrayCreate(length);
138
138
  }
139
- ;
140
139
  /**
141
140
  * Returns the path segment for a child
142
141
  *
@@ -152,7 +151,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
152
151
  }
153
152
  return '[' + index + ']';
154
153
  }
155
- ;
156
154
  /**
157
155
  * Resolves a direct child node based on the given path segment
158
156
  *
@@ -181,7 +179,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
181
179
  return AbstractStaticCollectionProperty.prototype._resolvePathSegment.call(this, in_segment, in_segmentType);
182
180
  }
183
181
  }
184
- ;
185
182
  /**
186
183
  * Insert into the array at a given position.
187
184
  * It will not overwrite the existing values, it will push them to the right.
@@ -195,7 +192,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
195
192
  insert(in_position, in_value) {
196
193
  this.insertRange(in_position, [in_value]);
197
194
  }
198
- ;
199
195
  /**
200
196
  * Is this property a leaf node with regard to flattening?
201
197
  *
@@ -206,7 +202,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
206
202
  _isFlattenLeaf() {
207
203
  return true;
208
204
  }
209
- ;
210
205
  /**
211
206
  * Add one or more values at the end of the array
212
207
  * @param {Array<property-properties.BaseProperty>|property-properties.BaseProperty|*|Array<*>} in_values
@@ -224,7 +219,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
224
219
  }
225
220
  return this._dataArrayGetLength();
226
221
  }
227
- ;
228
222
  /**
229
223
  * Add elements to the end of the queue (array)
230
224
  */
@@ -250,7 +244,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
250
244
  }
251
245
  return this._dataArrayGetLength();
252
246
  }
253
- ;
254
247
  /**
255
248
  * Removes an element of the array (or a letter in a StringProperty) and shifts remaining elements to the left
256
249
  * E.g. [1, 2, 3] .remove(1) => [1, 3]
@@ -266,7 +259,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
266
259
  this.removeRange(in_position, 1);
267
260
  return value;
268
261
  }
269
- ;
270
262
  /**
271
263
  * Removes the last element of the array or the last letter of a string (for StringProperty)
272
264
  * @throws if trying to modify a referenced property
@@ -282,7 +274,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
282
274
  return undefined;
283
275
  }
284
276
  }
285
- ;
286
277
  /**
287
278
  * Removes an element from the front of the array or a letter from the beginning of a string (for StringProperty)
288
279
  * @return {*|property-properties.BaseProperty} the element removed.
@@ -297,7 +288,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
297
288
  return undefined;
298
289
  }
299
290
  }
300
- ;
301
291
  /**
302
292
  * Removes elements from the front of the queue (array)
303
293
  */
@@ -318,7 +308,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
318
308
  }
319
309
  this.setRange(in_position, [in_value]);
320
310
  }
321
- ;
322
311
  /**
323
312
  * Sets the values of items in the array.
324
313
  * If values are typed, iterates through the values and creates a property with the defined type and value.
@@ -355,7 +344,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
355
344
  this._setValuesInternal(in_values);
356
345
  }
357
346
  }
358
- ;
359
347
  /**
360
348
  * @param {Array<*>|Object} in_values an array or object containing the values to be set.
361
349
  * @see {setValues}
@@ -367,8 +355,9 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
367
355
  this.clear();
368
356
  this.insertRange(0, in_values);
369
357
  }
370
- else
358
+ else {
371
359
  AbstractStaticCollectionProperty.prototype.setValues.call(this, in_values);
360
+ }
372
361
  }
373
362
  else {
374
363
  if (_.isArray(in_values) && in_values.length < this._dataArrayGetLength()) {
@@ -388,7 +377,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
388
377
  });
389
378
  }
390
379
  }
391
- ;
392
380
  /**
393
381
  * Sets the values of items in the array.
394
382
  * If called using an array (e.g. setValues([prop1, prop2])), it will overwrite the whole array.
@@ -410,7 +398,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
410
398
  ArrayProperty.prototype._setValues.call(this, in_values, false, false);
411
399
  }
412
400
  }
413
- ;
414
401
  /**
415
402
  * Deletes all values from an array
416
403
  */
@@ -419,7 +406,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
419
406
  this.removeRange(0, this.getLength());
420
407
  }
421
408
  }
422
- ;
423
409
  /**
424
410
  * @return {Array<*> | String} all values in the ArrayProperty
425
411
  * If called on StringProperty, it returns the whole string
@@ -429,7 +415,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
429
415
  getEntriesReadOnly() {
430
416
  return this._dataArrayGetBuffer();
431
417
  }
432
- ;
433
418
  /**
434
419
  * Private helper function to update the internal dirty and pending changes
435
420
  * is overwritten by StringProperty
@@ -444,7 +429,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
444
429
  ChangeSet.prototype._performApplyAfterOnPropertyArray(dirtyChanges, in_changeSet, this.getFullTypeid(true));
445
430
  this._setChanges(pendingChanges, dirtyChanges);
446
431
  }
447
- ;
448
432
  /**
449
433
  * Returns the pending changeset for this object
450
434
  * @return {property-properties.SerializedChangeSet} The pending changes
@@ -452,7 +436,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
452
436
  _getPendingChanges() {
453
437
  return (this._dirty && this._dirty.pending) || {};
454
438
  }
455
- ;
456
439
  /**
457
440
  * Returns the dirty changeset for this object
458
441
  * @return {property-properties.SerializedChangeSet} The dirty changes
@@ -460,7 +443,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
460
443
  _getDirtyChanges() {
461
444
  return (this._dirty && this._dirty.dirty) || {};
462
445
  }
463
- ;
464
446
  /**
465
447
  * Sets the pending and dirty changesets
466
448
  *
@@ -513,7 +495,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
513
495
  this._dirty = DIRTY_STATE_FLAGS_ARRAY[oldFlags];
514
496
  }
515
497
  }
516
- ;
517
498
  /**
518
499
  * Sets the dirty flags for this property
519
500
  * @param {Number} in_flags The dirty flags
@@ -536,7 +517,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
536
517
  this._dirty = DIRTY_STATE_FLAGS_ARRAY[in_flags];
537
518
  }
538
519
  }
539
- ;
540
520
  /**
541
521
  * Gets the dirty flags for this property
542
522
  * @return {Number} The dirty flags
@@ -547,7 +527,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
547
527
  }
548
528
  return this._dirty.flags;
549
529
  }
550
- ;
551
530
  /**
552
531
  * Inserts the content of a given array into the array property
553
532
  * It will not overwrite the existing values but push them to the right instead.
@@ -575,7 +554,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
575
554
  this._insertRangeWithoutDirtying(in_offset, in_array);
576
555
  this._setDirty();
577
556
  }
578
- ;
579
557
  /**
580
558
  * inserts the content of a given array, but doesn't dirty the property
581
559
  * this is useful for batch changes
@@ -586,8 +564,9 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
586
564
  * @private
587
565
  */
588
566
  _insertRangeWithoutDirtying(in_offset, in_array, in_setParents) {
589
- if (in_setParents === undefined)
567
+ if (in_setParents === undefined) {
590
568
  in_setParents = true;
569
+ }
591
570
  if (in_offset < 0 || in_offset > this.length || !_.isNumber(in_offset)) {
592
571
  throw Error(MSG.START_OFFSET_INVALID + in_offset);
593
572
  }
@@ -611,11 +590,10 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
611
590
  this._dataArrayInsertRange(in_offset, in_array);
612
591
  // Insert entry into changesets
613
592
  var changeSet = {
614
- 'insert': [[in_offset, this._serializeArray(in_array)]]
593
+ 'insert': [[in_offset, this._serializeArray(in_array)]],
615
594
  };
616
595
  this._updateChanges(changeSet);
617
596
  }
618
- ;
619
597
  /**
620
598
  * Removes a given number of elements from the array property (or given number of letters from a StringProperty)
621
599
  * and shifts remaining values to the left.
@@ -643,7 +621,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
643
621
  this._setDirty();
644
622
  return result;
645
623
  }
646
- ;
647
624
  /**
648
625
  * removes a given number of elements from the array property, and ensures, if this is not
649
626
  * a primitive array, that any existing properties have their parent pointer cleared.
@@ -664,7 +641,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
664
641
  }
665
642
  this._dataArrayRemoveRange(in_offset, in_deleteCount);
666
643
  }
667
- ;
668
644
  /**
669
645
  * removes a given number of elements from the array property, but doesn't dirty the property
670
646
  * this is useful for batch changes
@@ -676,11 +652,10 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
676
652
  this._clearRange(in_offset, in_deleteCount);
677
653
  // Insert entry into changesets
678
654
  var changeSet = {
679
- 'remove': [[in_offset, in_deleteCount]]
655
+ 'remove': [[in_offset, in_deleteCount]],
680
656
  };
681
657
  this._updateChanges(changeSet);
682
658
  }
683
- ;
684
659
  /**
685
660
  * Sets the array properties elements to the content of the given array
686
661
  * All changed elements must already exist. This will overwrite existing elements.
@@ -704,7 +679,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
704
679
  this._setRangeWithoutDirtying(in_offset, in_array);
705
680
  this._setDirty();
706
681
  }
707
- ;
708
682
  /**
709
683
  * sets the array properties elements to the content of the given array
710
684
  * all changed elements must already exist. This version doesn't dirty the property,
@@ -715,7 +689,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
715
689
  _setRangeWithoutDirtying(in_offset, in_array) {
716
690
  this._modifyRangeWithoutDirtying(in_offset, in_array);
717
691
  }
718
- ;
719
692
  /**
720
693
  * sets the array properties elements to the content of the given array
721
694
  * all changed elements must already exist. This version doesn't dirty the property,
@@ -757,7 +730,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
757
730
  this._updateChanges(changeSet);
758
731
  }
759
732
  }
760
- ;
761
733
  /**
762
734
  * Returns the name of all the sub-properties of this property.
763
735
  * Numerical indexes from the array will be returned as strings.
@@ -768,7 +740,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
768
740
  getIds() {
769
741
  return Object.keys(this._dataArrayGetBuffer());
770
742
  }
771
- ;
772
743
  /**
773
744
  * Checks whether a property or data exists at the given position.
774
745
  *
@@ -778,7 +749,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
778
749
  has(in_position) {
779
750
  return this._dataArrayGetBuffer()[in_position] !== undefined;
780
751
  }
781
- ;
782
752
  /**
783
753
  * Gets the array element at a given index
784
754
  * @param {number | array<string|number>} in_position the target index
@@ -854,7 +824,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
854
824
  return result;
855
825
  }
856
826
  }
857
- ;
858
827
  /**
859
828
  * Returns an object with all the nested values contained in this property
860
829
  * @return {array<object> | array<*>} an array of objects or values representing the values of your property
@@ -882,14 +851,12 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
882
851
  }
883
852
  return result;
884
853
  }
885
- ;
886
854
  /**
887
855
  * @return {Number} the current length of the array
888
856
  */
889
857
  getLength() {
890
858
  return this._dataArrayGetLength();
891
859
  }
892
- ;
893
860
  /**
894
861
  * @inheritdoc
895
862
  */
@@ -971,7 +938,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
971
938
  // of dirtying events)
972
939
  this._setDirty(in_reportToView);
973
940
  }
974
- ;
975
941
  /**
976
942
  * @inheritdoc
977
943
  */
@@ -982,7 +948,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
982
948
  // of dirtying events)
983
949
  this._setDirty(false);
984
950
  }
985
- ;
986
951
  /**
987
952
  * Removes the dirtiness flag from this property
988
953
  * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean, if none are supplied all
@@ -1004,7 +969,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1004
969
  }
1005
970
  this._setChanges(pendingChanges, dirtyChanges);
1006
971
  }
1007
- ;
1008
972
  /**
1009
973
  * Removes the dirtiness flag from this property and recursively from all of its children
1010
974
  *
@@ -1020,7 +984,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1020
984
  // after all paths are clean, we are also clean!
1021
985
  this._cleanDirty(in_dirtinessType);
1022
986
  }
1023
- ;
1024
987
  /**
1025
988
  * Internal helper function that implements the deserialize algorithm for an array of named properties.
1026
989
  *
@@ -1132,7 +1095,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1132
1095
  let elementsToInsert = targetArray.slice(lastPositionInTargetArray, startPointInTargetArray);
1133
1096
  changes.insert.push([
1134
1097
  lastPositionInInitialArray,
1135
- deepCopy(elementsToInsert)
1098
+ deepCopy(elementsToInsert),
1136
1099
  ]);
1137
1100
  var scope = this._getScope();
1138
1101
  var insertedProperties = deserializeNonPrimitiveArrayElements(elementsToInsert, scope);
@@ -1172,7 +1135,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1172
1135
  }
1173
1136
  return changes;
1174
1137
  }
1175
- ;
1176
1138
  /**
1177
1139
  * Function to deserialize special primitive types.
1178
1140
  * Some primitive types (e.g. Int64, which is not natively supported by javascript) require
@@ -1184,7 +1146,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1184
1146
  _deserializeValue(in_serializedObj) {
1185
1147
  return in_serializedObj;
1186
1148
  }
1187
- ;
1188
1149
  /**
1189
1150
  * Function to serialize special primitive types.
1190
1151
  * Some primitive types (e.g. Int64, which is not natively supported by javascript) require
@@ -1197,7 +1158,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1197
1158
  // we have to convert the propertySet objects to changesets
1198
1159
  return in_obj._serialize(false, true);
1199
1160
  }
1200
- ;
1201
1161
  /**
1202
1162
  * Function to serialize arrays of special primitive types.
1203
1163
  * Some primitive types (e.g. Int64, which is not natively supported by javascript) require
@@ -1221,7 +1181,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1221
1181
  }
1222
1182
  return result;
1223
1183
  }
1224
- ;
1225
1184
  /**
1226
1185
  * Function to deserialize arrays of special primitive types.
1227
1186
  * Some primitive types (e.g. Int64, which is not natively supported by javascript) require
@@ -1233,7 +1192,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1233
1192
  _deserializeArray(in_serializedObj) {
1234
1193
  return in_serializedObj;
1235
1194
  }
1236
- ;
1237
1195
  /**
1238
1196
  * @inheritdoc
1239
1197
  */
@@ -1256,7 +1214,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1256
1214
  this._clearRange(0, arrayLength);
1257
1215
  this._setDirty(in_reportToView);
1258
1216
  var removeChangeSet = {
1259
- remove: [[0, arrayLength]]
1217
+ remove: [[0, arrayLength]],
1260
1218
  };
1261
1219
  this._updateChanges(removeChangeSet);
1262
1220
  return removeChangeSet;
@@ -1274,7 +1232,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1274
1232
  // most simplistic diff method: Remove all existing data and insert the new data
1275
1233
  // The changes we will report as result of this function
1276
1234
  var simpleChanges = {
1277
- insert: in_createChangeSet ? deepCopy(in_serializedObj.insert) : in_serializedObj.insert
1235
+ insert: in_createChangeSet ? deepCopy(in_serializedObj.insert) : in_serializedObj.insert,
1278
1236
  };
1279
1237
  if (arrayLength > 0) {
1280
1238
  simpleChanges.remove = [[0, arrayLength]];
@@ -1328,7 +1286,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1328
1286
  return simpleChanges;
1329
1287
  }
1330
1288
  }
1331
- ;
1332
1289
  _getChangesetForCustomTypeArray(in_basePropertyChangeset, in_dirtinessType, in_includeReferencedRepositories) {
1333
1290
  var result = {};
1334
1291
  if (in_basePropertyChangeset.remove && in_basePropertyChangeset.remove.length > 0) {
@@ -1367,7 +1324,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1367
1324
  if (lastModify) {
1368
1325
  lastModify[1].push(this._dataArrayGetValue(currentArrayIndex).serialize({
1369
1326
  'dirtyOnly': true, 'includeRootTypeid': true, 'dirtinessType': in_dirtinessType,
1370
- 'includeReferencedRepositories': in_includeReferencedRepositories
1327
+ 'includeReferencedRepositories': in_includeReferencedRepositories,
1371
1328
  }));
1372
1329
  }
1373
1330
  else {
@@ -1378,7 +1335,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1378
1335
  result.modify.push([currentArrayIndex - op.offset,
1379
1336
  [this._dataArrayGetValue(currentArrayIndex).serialize({
1380
1337
  'dirtyOnly': true, 'includeRootTypeid': true, 'dirtinessType': in_dirtinessType,
1381
- 'includeReferencedRepositories': in_includeReferencedRepositories
1338
+ 'includeReferencedRepositories': in_includeReferencedRepositories,
1382
1339
  })]]);
1383
1340
  }
1384
1341
  currentArrayIndex++;
@@ -1387,7 +1344,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1387
1344
  this._dataArrayGetValue(currentArrayIndex)._isDirty(in_dirtinessType)) {
1388
1345
  result.modify[result.modify.length - 1][1].push(this._dataArrayGetValue(currentArrayIndex).serialize({
1389
1346
  'dirtyOnly': true, 'includeRootTypeid': true, 'dirtinessType': in_dirtinessType,
1390
- 'includeReferencedRepositories': in_includeReferencedRepositories
1347
+ 'includeReferencedRepositories': in_includeReferencedRepositories,
1391
1348
  }));
1392
1349
  currentArrayIndex++;
1393
1350
  }
@@ -1415,7 +1372,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1415
1372
  }
1416
1373
  newInsert[1].push(this._dataArrayGetValue(opStartIndex + j).serialize({
1417
1374
  'dirtyOnly': false, 'includeRootTypeid': true, 'dirtinessType': in_dirtinessType,
1418
- 'includeReferencedRepositories': in_includeReferencedRepositories
1375
+ 'includeReferencedRepositories': in_includeReferencedRepositories,
1419
1376
  }));
1420
1377
  }
1421
1378
  if (!result.insert) {
@@ -1434,7 +1391,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1434
1391
  }
1435
1392
  return result;
1436
1393
  }
1437
- ;
1438
1394
  /**
1439
1395
  * Serialize the property
1440
1396
  *
@@ -1491,7 +1447,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1491
1447
  return result;
1492
1448
  }
1493
1449
  }
1494
- ;
1495
1450
  /**
1496
1451
  * Repeatedly calls back the given function with human-readable string
1497
1452
  * representations of the property and of its sub-properties.
@@ -1519,7 +1474,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1519
1474
  }
1520
1475
  printFct(indent + ']');
1521
1476
  }
1522
- ;
1523
1477
  /**
1524
1478
  * Repeatedly calls back the given function with human-readable string
1525
1479
  * representations of the property's sub-properties.
@@ -1534,7 +1488,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1534
1488
  ._prettyPrint(indent, ids[i] + ': ', printFct);
1535
1489
  }
1536
1490
  }
1537
- ;
1538
1491
  /**
1539
1492
  * Return a JSON representation of the array and its items.
1540
1493
  * @return {object} A JSON representation of the array and its items.
@@ -1546,7 +1499,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1546
1499
  context: this._context,
1547
1500
  typeid: this.getTypeid(),
1548
1501
  isConstant: this._isConstant,
1549
- value: []
1502
+ value: [],
1550
1503
  };
1551
1504
  if (!this._isPrimitive) {
1552
1505
  var ids = this.getIds();
@@ -1559,7 +1512,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1559
1512
  }
1560
1513
  return json;
1561
1514
  }
1562
- ;
1563
1515
  /**
1564
1516
  * Returns the full property type identifier for the ChangeSet including the array type id, if not
1565
1517
  * omitted by parameters
@@ -1574,7 +1526,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1574
1526
  return TypeIdHelper.createSerializationTypeId(this._typeid, 'array');
1575
1527
  }
1576
1528
  }
1577
- ;
1578
1529
  /**
1579
1530
  * Creates and initializes the data array
1580
1531
  * @param {Number} in_length the initial length of the array
@@ -1589,7 +1540,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1589
1540
  this._dataArraySetValue(i, element);
1590
1541
  }
1591
1542
  }
1592
- ;
1593
1543
  /**
1594
1544
  * Returns the length of the data array
1595
1545
  * @return {Number} The length
@@ -1597,7 +1547,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1597
1547
  _dataArrayGetLength() {
1598
1548
  return this._dataArrayRef.length;
1599
1549
  }
1600
- ;
1601
1550
  /**
1602
1551
  * Returns the data array's internal buffer
1603
1552
  * @return {Array} The buffer
@@ -1605,7 +1554,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1605
1554
  _dataArrayGetBuffer() {
1606
1555
  return this._dataArrayRef.getBuffer();
1607
1556
  }
1608
- ;
1609
1557
  /**
1610
1558
  * Returns an entry from the data array
1611
1559
  * @param {Number} in_index - Position in the array
@@ -1615,7 +1563,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1615
1563
  _dataArrayGetValue(in_index) {
1616
1564
  return this._dataArrayRef.getValue(in_index);
1617
1565
  }
1618
- ;
1619
1566
  /**
1620
1567
  * Sets an entry in the data array
1621
1568
  * @param {Number} in_index - Position in the array
@@ -1624,7 +1571,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1624
1571
  _dataArraySetValue(in_index, in_value) {
1625
1572
  this._dataArrayRef.setValue(in_index, in_value);
1626
1573
  }
1627
- ;
1628
1574
  /**
1629
1575
  * Set the array to the given new array
1630
1576
  * @param {Array} in_newArray - The new contents of the array
@@ -1632,7 +1578,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1632
1578
  _dataArrayDeserialize(in_newArray) {
1633
1579
  this._dataArrayRef.deserialize(in_newArray);
1634
1580
  }
1635
- ;
1636
1581
  /**
1637
1582
  * Inserts a range into the data array
1638
1583
  * @param {Number} in_position - Position at which the insert should be done
@@ -1641,7 +1586,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1641
1586
  _dataArrayInsertRange(in_position, in_range) {
1642
1587
  this._dataArrayRef.insertRange(in_position, in_range);
1643
1588
  }
1644
- ;
1645
1589
  /**
1646
1590
  * Removes a range from the data array
1647
1591
  * @param {Number} in_position - Position at which to start the removal
@@ -1650,7 +1594,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1650
1594
  _dataArrayRemoveRange(in_position, in_length) {
1651
1595
  this._dataArrayRef.removeRange(in_position, in_length);
1652
1596
  }
1653
- ;
1654
1597
  /**
1655
1598
  * Overwrites a range in the data array
1656
1599
  * @param {Number} in_position - Position at which to start the removal
@@ -1659,7 +1602,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1659
1602
  _dataArraySetRange(in_position, in_range) {
1660
1603
  this._dataArrayRef.set(in_position, in_range);
1661
1604
  }
1662
- ;
1663
1605
  /**
1664
1606
  * Get the scope to which this property belongs to.
1665
1607
  * @return {string|undefined} The guid representing the scope in which the
@@ -1676,7 +1618,6 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
1676
1618
  return this._scope;
1677
1619
  }
1678
1620
  }
1679
- ;
1680
1621
  /**
1681
1622
  * returns the length of the current array property
1682
1623
  */