@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
@@ -8,14 +8,14 @@ exports.IndexedCollectionBaseProperty = void 0;
8
8
  /**
9
9
  * @fileoverview Abstract base class for indexed collections (sets and maps)
10
10
  */
11
- const { ChangeSet } = require('@fluid-experimental/property-changeset');
12
- const { ConsoleUtils } = require('@fluid-experimental/property-common');
13
- const { MSG } = require('@fluid-experimental/property-common').constants;
14
- const _ = require('lodash');
15
- const { deserialize } = require('../containerSerializer');
16
- const { validationsEnabled } = require('../enableValidations');
17
- const { BaseProperty } = require('./baseProperty');
18
- const { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');
11
+ const { ChangeSet } = require("@fluid-experimental/property-changeset");
12
+ const { ConsoleUtils } = require("@fluid-experimental/property-common");
13
+ const { MSG } = require("@fluid-experimental/property-common").constants;
14
+ const _ = require("lodash");
15
+ const { deserialize } = require("../containerSerializer");
16
+ const { validationsEnabled } = require("../enableValidations");
17
+ const { BaseProperty } = require("./baseProperty");
18
+ const { AbstractStaticCollectionProperty } = require("./abstractStaticCollectionProperty");
19
19
  /**
20
20
  * typedef {property-properties.BaseProperty|string|number|boolean} property-properties.IndexedCollectionBaseProperty~ValueType
21
21
  *
@@ -64,8 +64,7 @@ class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {
64
64
  this._pendingChanges.remove = {};
65
65
  this._pendingChanges.modify = {};
66
66
  }
67
- if (in_flags === undefined ||
68
- (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) !== 0) {
67
+ if (in_flags === undefined || (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) !== 0) {
69
68
  // We additionally have to remove the log on the changes to our entries
70
69
  this._dirtyChanges.insert = {};
71
70
  this._dirtyChanges.remove = {};
@@ -79,8 +78,11 @@ class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {
79
78
  * If none are supplied, all will be removed.
80
79
  */
81
80
  cleanDirty(in_flags) {
82
- in_flags = in_flags !== undefined ? in_flags : BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |
83
- BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE;
81
+ in_flags =
82
+ in_flags !== undefined
83
+ ? in_flags
84
+ : BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |
85
+ BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE;
84
86
  // Clean all entries inside of the collection
85
87
  let cleanDirtiness = (collection) => {
86
88
  var entry;
@@ -148,16 +150,14 @@ class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {
148
150
  }
149
151
  else {
150
152
  // For primitive types we squash remove/insert combinations to modifies
151
- if (this._pendingChanges.remove[in_key] &&
152
- !this._pendingChanges.insert[in_key]) {
153
+ if (this._pendingChanges.remove[in_key] && !this._pendingChanges.insert[in_key]) {
153
154
  this._pendingChanges.modify[in_key] = true;
154
155
  delete this._pendingChanges.remove[in_key];
155
156
  }
156
157
  else {
157
158
  this._pendingChanges.insert[in_key] = true;
158
159
  }
159
- if (this._dirtyChanges.remove[in_key] &&
160
- !this._dirtyChanges.insert[in_key]) {
160
+ if (this._dirtyChanges.remove[in_key] && !this._dirtyChanges.insert[in_key]) {
161
161
  this._dirtyChanges.modify[in_key] = true;
162
162
  delete this._dirtyChanges.remove[in_key];
163
163
  }
@@ -241,21 +241,24 @@ class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {
241
241
  in_changes[in_typeid][in_key] = in_value;
242
242
  }
243
243
  };
244
- var changes = in_dirtinessType === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE ?
245
- this._pendingChanges : this._dirtyChanges;
244
+ var changes = in_dirtinessType === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE
245
+ ? this._pendingChanges
246
+ : this._dirtyChanges;
246
247
  var insert = {};
247
248
  var modify = {};
248
249
  // we only remove entries when computing the delta
249
250
  var remove = in_dirtyOnly ? _.keys(changes.remove) : [];
250
251
  // Iterate over all children (and not properties)
251
252
  var typeid;
252
- var entryKeys = in_dirtyOnly ?
253
- _.keys(changes.modify).concat(_.keys(changes.insert)) : // Only dirty keys
254
- _.keys(this._dynamicChildren); // All keys
253
+ var entryKeys = in_dirtyOnly
254
+ ? _.keys(changes.modify).concat(_.keys(changes.insert)) // Only dirty keys
255
+ : _.keys(this._dynamicChildren); // All keys
255
256
  for (var i = 0; i < entryKeys.length; i++) {
256
257
  var key = entryKeys[i];
257
258
  var entry = this._dynamicChildren[key];
258
- typeid = this._containsPrimitiveTypes ? this.getFullTypeid(false) : entry.getFullTypeid(false);
259
+ typeid = this._containsPrimitiveTypes
260
+ ? this.getFullTypeid(false)
261
+ : entry.getFullTypeid(false);
259
262
  if (in_dirtyOnly) {
260
263
  if (changes.insert[key]) {
261
264
  // If the key was inserted in this ChangeSet include it into the inserted list
@@ -327,7 +330,7 @@ class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {
327
330
  */
328
331
  _serializeValue(in_obj) {
329
332
  ConsoleUtils.assert(this._containsPrimitiveTypes, MSG.ASSERTION_FAILED +
330
- 'Function IndexedCollectionBaseProperty._serializeValue() called on non-primitive collection');
333
+ "Function IndexedCollectionBaseProperty._serializeValue() called on non-primitive collection");
331
334
  return in_obj;
332
335
  }
333
336
  /**
@@ -339,7 +342,9 @@ class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {
339
342
  var appliedChangeset = AbstractStaticCollectionProperty.prototype._deserialize.call(this, in_serializedObj, false, in_filteringOptions, in_createChangeSet);
340
343
  // Perform updates to the children
341
344
  // We make copies on two levels, since those are modified by the calls below
342
- var insertedEntries = _.mapValues(in_serializedObj.insert, function (x) { return _.clone(x); }) || {};
345
+ var insertedEntries = _.mapValues(in_serializedObj.insert, function (x) {
346
+ return _.clone(x);
347
+ }) || {};
343
348
  var removedEntries = {};
344
349
  var modifiedEntries = {};
345
350
  // Get a list of all keys that will be inserted
@@ -392,7 +397,8 @@ class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {
392
397
  for (i = 0; i < addedKeys.length; i++) {
393
398
  if (currentEntries[addedKeys[i]] !== undefined) {
394
399
  modifiedEntries[typeid] = modifiedEntries[typeid] || {};
395
- modifiedEntries[typeid][addedKeys[i]] = insertedEntries[typeid][addedKeys[i]];
400
+ modifiedEntries[typeid][addedKeys[i]] =
401
+ insertedEntries[typeid][addedKeys[i]];
396
402
  delete insertedEntries[typeid][addedKeys[i]];
397
403
  }
398
404
  }
@@ -437,11 +443,12 @@ class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {
437
443
  if (this._containsPrimitiveTypes) {
438
444
  changes = modifiedEntries[modifiedKeys[i]];
439
445
  // Determine if value has changed
440
- valueWasChanged = this._typeid === 'Int64' || this._typeid === 'Uint64'
441
- // For (u)int64, we will compare (Ui/I)nt64 objects with arrays [low, high]
442
- ? this._dynamicChildren[modifiedKeys[i]].getValueLow() !== changes[0]
443
- || this._dynamicChildren[modifiedKeys[i]].getValueHigh() !== changes[1]
444
- : this._dynamicChildren[modifiedKeys[i]] !== changes;
446
+ valueWasChanged =
447
+ this._typeid === "Int64" || this._typeid === "Uint64"
448
+ ? // For (u)int64, we will compare (Ui/I)nt64 objects with arrays [low, high]
449
+ this._dynamicChildren[modifiedKeys[i]].getValueLow() !== changes[0] ||
450
+ this._dynamicChildren[modifiedKeys[i]].getValueHigh() !== changes[1]
451
+ : this._dynamicChildren[modifiedKeys[i]] !== changes;
445
452
  modifiedEntriesMap = modifiedEntries;
446
453
  if (valueWasChanged) {
447
454
  this._dynamicChildren[modifiedKeys[i]] = this._deserializeValue(changes);
@@ -553,18 +560,20 @@ class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {
553
560
  // Modify entries
554
561
  var mapWasChangedByModify = false;
555
562
  if (in_changeSet.modify) {
556
- var classKeys = this._containsPrimitiveTypes ? [undefined] : _.keys(in_changeSet.modify);
563
+ var classKeys = this._containsPrimitiveTypes
564
+ ? [undefined]
565
+ : _.keys(in_changeSet.modify);
557
566
  for (var iClass = 0; iClass < classKeys.length; iClass++) {
558
- var modifiedEntries = this._containsPrimitiveTypes ?
559
- in_changeSet.modify :
560
- in_changeSet.modify[classKeys[iClass]];
567
+ var modifiedEntries = this._containsPrimitiveTypes
568
+ ? in_changeSet.modify
569
+ : in_changeSet.modify[classKeys[iClass]];
561
570
  var keys = Object.keys(modifiedEntries);
562
571
  for (var i = 0; i < keys.length; i++) {
563
572
  var key = keys[i];
564
573
  if (this._dynamicChildren[key] !== undefined) {
565
574
  if (this._containsPrimitiveTypes) {
566
575
  var modifiedEntry = modifiedEntries[key];
567
- if (typeof modifiedEntry === 'object') {
576
+ if (typeof modifiedEntry === "object") {
568
577
  modifiedEntry = modifiedEntry.value;
569
578
  }
570
579
  this._dynamicChildren[key] = modifiedEntry;
@@ -647,8 +656,9 @@ class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {
647
656
  if (in_pendingChangeSet.modify) {
648
657
  var classKeys = _.keys(in_pendingChangeSet.modify);
649
658
  for (var iClass = 0; iClass < classKeys.length; iClass++) {
650
- var modifiedPendingEntries = in_pendingChangeSet.modify && in_pendingChangeSet.modify[classKeys[iClass]] || {};
651
- var modifiedDirtyEntries = in_dirtyChangeSet.modify && in_dirtyChangeSet.modify[classKeys[iClass]] || {};
659
+ var modifiedPendingEntries = (in_pendingChangeSet.modify && in_pendingChangeSet.modify[classKeys[iClass]]) ||
660
+ {};
661
+ var modifiedDirtyEntries = (in_dirtyChangeSet.modify && in_dirtyChangeSet.modify[classKeys[iClass]]) || {};
652
662
  keys = Object.keys(modifiedPendingEntries).concat(Object.keys(modifiedDirtyEntries));
653
663
  for (i = 0; i < keys.length; i++) {
654
664
  key = keys[i];
@@ -1 +1 @@
1
- {"version":3,"file":"indexedCollectionBaseProperty.js","sourceRoot":"","sources":["../../src/properties/indexedCollectionBaseProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AAEH,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACxE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACxE,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAC1D,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC/D,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,gCAAgC,EAAE,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAE3F;;;;;GAKG;AAEH;;;GAGG;AACH,MAAa,6BAA8B,SAAQ,gCAAgC;IAC/E;;;;OAIG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,gGAAgG;QAChG,IAAI,CAAC,eAAe,GAAG;YACnB,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,EAAE;SACb,CAAC;QAEF,0GAA0G;QAC1G,IAAI,CAAC,aAAa,GAAG;YACjB,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,E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C,CAAC;oBACd,IAAI,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;wBAC1C,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,GAAG,CAAC,EAAE,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC;qBACzG;yBAAM;wBACH,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,yBAAyB,GAAG,GAAG,CAAC,CAAC;qBACxD;iBACJ;aACJ;SACJ;IACL,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,eAAe,EAAE,eAAe;QACtC,6BAA6B;QAC7B,IAAI,eAAe,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE;YAClD,IAAI,GAAG,GAAG,eAAe,CAAC,KAAK,EAAE,CAAC;YAClC,IAAI,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE;gBAC5B,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;oBACnC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;iBAC3C;gBACD,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;oBACjC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;iBACzC;aACJ;SACJ;QAED,8CAA8C;QAC9C,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;IAClF,CAAC;CACJ;AApsBD,sEAosBC;AACD,uFAAuF;AACvF,6BAA6B,CAAC,SAAS,CAAC,uBAAuB,GAAG,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview Abstract base class for indexed collections (sets and maps)\n */\n\nconst { ChangeSet } = require('@fluid-experimental/property-changeset');\nconst { ConsoleUtils } = require('@fluid-experimental/property-common');\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst _ = require('lodash');\nconst { deserialize } = require('../containerSerializer');\nconst { validationsEnabled } = require('../enableValidations');\nconst { BaseProperty } = require('./baseProperty');\nconst { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');\n\n/**\n * typedef {property-properties.BaseProperty|string|number|boolean} property-properties.IndexedCollectionBaseProperty~ValueType\n *\n * The type of the values that are set/inserted into the collection. Depending on the type of the collection, these\n * can either be property objects or primitive values\n */\n\n/**\n * A IndexedCollectionBaseProperty is the base class for indexed collections (maps and sets). It should not be used\n * directly.\n */\nexport class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {\n /**\n * @param {Object} in_params - Input parameters for property creation\n *\n * @constructor\n */\n constructor(in_params) {\n super(in_params);\n /** Stores the pending changes in the property (those that are part of the current ChangeSet) */\n this._pendingChanges = {\n insert: {},\n remove: {},\n modify: {},\n };\n\n /** Stores the dirty changes in the property (those that have not yet been reported to the application) */\n this._dirtyChanges = {\n insert: {},\n remove: {},\n modify: {},\n };\n }\n\n /**\n * Removes the dirtiness flag from this property\n *\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean\n * If none are supplied, all will be removed.\n * @private\n */\n _cleanDirty(in_flags) {\n // Invoke parent\n BaseProperty.prototype._cleanDirty.call(this, in_flags);\n\n if (in_flags === undefined ||\n (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE) !== 0) {\n // We additionally have to remove the log on the changes to our entries\n this._pendingChanges.insert = {};\n this._pendingChanges.remove = {};\n this._pendingChanges.modify = {};\n }\n\n if (in_flags === undefined ||\n (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) !== 0) {\n // We additionally have to remove the log on the changes to our entries\n this._dirtyChanges.insert = {};\n this._dirtyChanges.remove = {};\n this._dirtyChanges.modify = {};\n }\n }\n\n /**\n * Removes the dirtiness flag from this property and recursively from all of its children\n *\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean.\n * If none are supplied, all will be removed.\n */\n cleanDirty(in_flags) {\n in_flags = in_flags !== undefined ? in_flags : BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |\n BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE;\n\n // Clean all entries inside of the collection\n let cleanDirtiness = (collection) => {\n var entry;\n\n // eslint-disable-next-line no-restricted-syntax\n for (let key in collection) {\n entry = this._dynamicChildren[key];\n if (entry._isDirty(in_flags)) {\n entry.cleanDirty(in_flags);\n }\n }\n };\n\n if (!this._containsPrimitiveTypes) {\n if (in_flags === BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) {\n // Only use the dirty entries\n cleanDirtiness(this._dirtyChanges.insert);\n cleanDirtiness(this._dirtyChanges.modify);\n } else if (in_flags === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE) {\n // Only use the pending changes\n cleanDirtiness(this._pendingChanges.insert);\n cleanDirtiness(this._pendingChanges.modify);\n } else {\n cleanDirtiness(this._pendingChanges.insert);\n cleanDirtiness(this._pendingChanges.modify);\n cleanDirtiness(this._dirtyChanges.insert);\n cleanDirtiness(this._dirtyChanges.modify);\n }\n }\n\n // Invoke parent\n BaseProperty.prototype.cleanDirty.call(this, in_flags);\n\n // after all entries have been cleaned, we mark this property as clean\n this._cleanDirty(in_flags);\n }\n\n /**\n * Inserts a property into the collection\n *\n * @param {string} in_key - Key of the entry in the collection\n * @param {property-properties.IndexedCollectionBaseProperty~ValueType} in_value - The value to insert\n * @param {boolean} in_reportToView -\n * By default, the dirtying will always be reported to the checkout view and trigger a modified event there.\n * When batching updates, this can be prevented via this flag.\n */\n _insert(in_key, in_value, in_reportToView) {\n if (validationsEnabled.enabled) {\n this._checkIsNotReadOnly(false);\n }\n\n if (!this.has(in_key)) {\n // Make sure, the property we are inserting is not already part of some other collection\n if (validationsEnabled.enabled && !this._containsPrimitiveTypes) {\n in_value._validateInsertIn(this);\n }\n\n this._dynamicChildren[in_key] = in_value;\n\n // We have to make sure, both this node itself and the whole tree of the inserted\n // entry are marked as dirty to make sure, they get serialized\n // We don't yet report the dirtying to the view. This happens below.\n this._setDirty(false);\n\n if (!this._containsPrimitiveTypes) {\n // Dirty the tree (TODO: is this needed?)\n in_value._setDirtyTree(false);\n\n in_value._setParent(this);\n\n // In the case of a template property, we always mark it as inserted\n this._pendingChanges.insert[in_key] = true;\n this._dirtyChanges.insert[in_key] = true;\n } else {\n // For primitive types we squash remove/insert combinations to modifies\n if (this._pendingChanges.remove[in_key] &&\n !this._pendingChanges.insert[in_key]) {\n this._pendingChanges.modify[in_key] = true;\n delete this._pendingChanges.remove[in_key];\n } else {\n this._pendingChanges.insert[in_key] = true;\n }\n\n if (this._dirtyChanges.remove[in_key] &&\n !this._dirtyChanges.insert[in_key]) {\n this._dirtyChanges.modify[in_key] = true;\n delete this._dirtyChanges.remove[in_key];\n } else {\n this._dirtyChanges.insert[in_key] = true;\n }\n }\n\n // Now make one report\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n } else {\n throw new Error(MSG.PROPERTY_ALREADY_EXISTS + in_key);\n }\n }\n\n /**\n * Removes an entry with the given key\n *\n * @param {string} in_key - key of the entry\n * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n * trigger a modified event there.\n * When batching updates, this can be prevented via this flag.\n */\n _removeByKey(in_key, in_reportToView) {\n this._checkIsNotReadOnly(false);\n\n if (this._dynamicChildren[in_key] !== undefined) {\n if (this._dynamicChildren[in_key] instanceof BaseProperty) {\n this._dynamicChildren[in_key]._setParent(undefined);\n }\n\n delete this._dynamicChildren[in_key];\n\n // make sure this is not present in the insert list!\n if (this._pendingChanges.insert[in_key]) {\n delete this._pendingChanges.insert[in_key];\n } else {\n this._pendingChanges.remove[in_key] = true;\n\n // Also remove modifies, if any are present\n delete this._pendingChanges.modify[in_key];\n }\n\n // also update the list of dirty changes\n if (this._dirtyChanges.insert[in_key]) {\n delete this._dirtyChanges.insert[in_key];\n } else {\n this._dirtyChanges.remove[in_key] = true;\n\n // Also remove modifies, if any are present\n delete this._dirtyChanges.modify[in_key];\n }\n\n this._setDirty(in_reportToView);\n } else {\n throw new Error(MSG.REMOVED_NON_EXISTING_ENTRY + in_key);\n }\n }\n\n /**\n * Serialize the property\n *\n * @param {boolean} in_dirtyOnly - Only include dirty entries in the serialization\n * @param {boolean} in_includeRootTypeid - Include the typeid of the root of the hierarchy\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] - The type of dirtiness to use\n * when reporting dirty changes. By default this is `PENDING_CHANGE`.\n * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n * function will descend into referenced repositories.\n * WARNING: if there are loops in the references this can result in an infinite loop.\n *\n * @return {Object} The serialized representation of this property\n * @private\n */\n _serialize(in_dirtyOnly,\n in_includeRootTypeid,\n in_dirtinessType,\n in_includeReferencedRepositories) {\n var serialized = AbstractStaticCollectionProperty.prototype._serialize.call(this, in_dirtyOnly, in_includeRootTypeid,\n in_dirtinessType, in_includeReferencedRepositories);\n\n var that = this;\n\n // Helper function to decide whether to include a typeid or not in the ChangeSet\n var addEntryInChangeSet = function(in_changes, in_typeid, in_key, in_value) {\n // Determine where to insert the key. If necessary, an entry for the type is added.\n if (that._containsPrimitiveTypes) {\n in_changes[in_key] = that._serializeValue(in_value);\n } else {\n in_changes[in_typeid] = in_changes[in_typeid] || {};\n in_changes[in_typeid][in_key] = in_value;\n }\n };\n\n var changes = in_dirtinessType === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE ?\n this._pendingChanges : this._dirtyChanges;\n var insert = {};\n var modify = {};\n // we only remove entries when computing the delta\n var remove = in_dirtyOnly ? _.keys(changes.remove) : [];\n\n // Iterate over all children (and not properties)\n var typeid;\n var entryKeys = in_dirtyOnly ?\n _.keys(changes.modify).concat(_.keys(changes.insert)) : // Only dirty keys\n _.keys(this._dynamicChildren); // All keys\n for (var i = 0; i < entryKeys.length; i++) {\n var key = entryKeys[i];\n var entry = this._dynamicChildren[key];\n typeid = this._containsPrimitiveTypes ? this.getFullTypeid(false) : entry.getFullTypeid(false);\n if (in_dirtyOnly) {\n if (changes.insert[key]) {\n // If the key was inserted in this ChangeSet include it into the inserted list\n if (this._containsPrimitiveTypes) {\n addEntryInChangeSet(insert, typeid, key, entry);\n } else {\n addEntryInChangeSet(insert, typeid, key, entry._serialize(false, false,\n undefined, in_includeReferencedRepositories));\n }\n } else {\n // Check whether this is a modified entry and serialize changes when needed\n if (this._containsPrimitiveTypes) {\n if (changes.modify[key]) {\n addEntryInChangeSet(modify, typeid, key, entry);\n }\n } else {\n if (entry._isDirty(in_dirtinessType)) {\n var serializedChild = entry._serialize(in_dirtyOnly, false,\n in_dirtinessType, in_includeReferencedRepositories);\n if (!ChangeSet.isEmptyChangeSet(serializedChild)) {\n addEntryInChangeSet(modify, typeid, key, serializedChild);\n }\n }\n }\n }\n } else {\n // If we serialize everything, all entries are inserted\n if (this._containsPrimitiveTypes) {\n insert[key] = this._serializeValue(entry);\n } else {\n insert[typeid] = insert[typeid] || {};\n insert[typeid][key] = entry._serialize(in_dirtyOnly, false, undefined, in_includeReferencedRepositories);\n }\n }\n }\n\n // Serialize the changes\n if (!_.isEmpty(insert)) {\n serialized.insert = insert;\n }\n\n if (!_.isEmpty(remove)) {\n serialized.remove = remove;\n }\n\n if (!_.isEmpty(modify)) {\n serialized.modify = modify;\n }\n\n return serialized;\n }\n\n /**\n * Function to deserialize special primitive types.\n * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n * special treatment on deserialization. For supported types, we can just return the input here.\n *\n * @param {property-properties.SerializedChangeSet} in_serializedObj - The object to be deserialized\n * @return {*} the deserialized value\n */\n _deserializeValue(in_serializedObj) {\n return in_serializedObj;\n }\n\n /**\n * Function to serialize special primitive types.\n * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n * special treatment on serialization. For supported types, we can just return the input here.\n *\n * @param {*} in_obj - The object to be serialized\n * @return {property-properties.SerializedChangeSet} the serialized object\n */\n _serializeValue(in_obj) {\n ConsoleUtils.assert(this._containsPrimitiveTypes, MSG.ASSERTION_FAILED +\n 'Function IndexedCollectionBaseProperty._serializeValue() called on non-primitive collection');\n return in_obj;\n }\n\n /**\n * @inheritdoc\n */\n _deserialize(in_serializedObj, in_reportToView, in_filteringOptions, in_createChangeSet) {\n var currentEntries = this._dynamicChildren;\n var allInsertedKeys = {};\n\n var appliedChangeset = AbstractStaticCollectionProperty.prototype._deserialize.call(\n this, in_serializedObj, false, in_filteringOptions, in_createChangeSet);\n\n // Perform updates to the children\n\n // We make copies on two levels, since those are modified by the calls below\n var insertedEntries = _.mapValues(in_serializedObj.insert, function(x) { return _.clone(x); }) || {};\n var removedEntries = {};\n var modifiedEntries = {};\n\n // Get a list of all keys that will be inserted\n if (this._containsPrimitiveTypes) {\n var dataKeys = _.keys(insertedEntries);\n for (var iData = 0; iData < dataKeys.length; iData++) {\n var key = dataKeys[iData];\n allInsertedKeys[key] = true;\n }\n } else {\n var classKeys = _.keys(insertedEntries);\n for (var iClass = 0; iClass < classKeys.length; iClass++) {\n var typeid = classKeys[iClass];\n var dataKeys = _.keys(insertedEntries[typeid]);\n for (var iData = 0; iData < dataKeys.length; iData++) {\n var key = dataKeys[iData];\n allInsertedKeys[key] = true;\n }\n }\n }\n\n // Intersect the list of current keys, with the list of keys that will\n // NOT be inserted. Then insert the difference in the remove list so that\n // no objects are left dangling\n var keys = _.keys(currentEntries);\n for (var i = 0; i < keys.length; i++) {\n if (!allInsertedKeys[keys[i]]) {\n removedEntries[keys[i]] = true;\n }\n }\n\n // Remap adds to modify if the items are already in the document.\n // We want to make sure we reuse the current document state as much as possible\n // and simply change the bits that need to be changed. In many cases the\n // document will already contain the items but they need to be modified to\n // match the state described in_changeSet.\n if (this._containsPrimitiveTypes) {\n var addedKeys = Object.keys(insertedEntries);\n for (i = 0; i < addedKeys.length; i++) {\n if (currentEntries[addedKeys[i]] !== undefined) {\n modifiedEntries[addedKeys[i]] = insertedEntries[addedKeys[i]];\n delete insertedEntries[addedKeys[i]];\n }\n }\n } else {\n classKeys = _.keys(insertedEntries);\n for (iClass = 0; iClass < classKeys.length; iClass++) {\n typeid = classKeys[iClass];\n var addedKeys = Object.keys(insertedEntries[typeid]);\n for (i = 0; i < addedKeys.length; i++) {\n if (currentEntries[addedKeys[i]] !== undefined) {\n modifiedEntries[typeid] = modifiedEntries[typeid] || {};\n modifiedEntries[typeid][addedKeys[i]] = insertedEntries[typeid][addedKeys[i]];\n delete insertedEntries[typeid][addedKeys[i]];\n }\n }\n\n // Remove add entries, when they are empty\n if (_.isEmpty(insertedEntries[typeid])) {\n delete insertedEntries[typeid];\n }\n }\n }\n\n // Begin by removing what needs to be removed.\n keys = Object.keys(removedEntries);\n for (i = 0; i < keys.length; i++) {\n this._removeByKey(keys[i], false);\n }\n\n // Now get the portion of the children that must be added\n // this is a straightforward deserialize.\n if (this._containsPrimitiveTypes) {\n keys = _.keys(insertedEntries);\n for (i = 0; i < keys.length; i++) {\n this._insert(keys[i], this._deserializeValue(insertedEntries[keys[i]]), false);\n }\n } else {\n var scope = this._getScope();\n var newPsets = deserialize(insertedEntries, scope);\n keys = _.keys(newPsets);\n for (i = 0; i < keys.length; i++) {\n this._insert(keys[i], newPsets[keys[i]], false);\n }\n }\n\n // If no typeids are included, we just use a placeholder for the iteration below\n var classKeys = this._containsPrimitiveTypes ? [undefined] : _.keys(modifiedEntries);\n\n // Finally modify the existing properties\n var mapWasChangedByModify = false;\n for (iClass = 0; iClass < classKeys.length; iClass++) {\n typeid = classKeys[iClass];\n var modifiedKeys = Object.keys(this._containsPrimitiveTypes ? modifiedEntries : modifiedEntries[typeid]);\n for (i = 0; i < modifiedKeys.length; i++) {\n var changes;\n var valueWasChanged = false;\n var modifiedEntriesMap;\n if (this._containsPrimitiveTypes) {\n changes = modifiedEntries[modifiedKeys[i]];\n // Determine if value has changed\n valueWasChanged = this._typeid === 'Int64' || this._typeid === 'Uint64'\n // For (u)int64, we will compare (Ui/I)nt64 objects with arrays [low, high]\n ? this._dynamicChildren[modifiedKeys[i]].getValueLow() !== changes[0]\n || this._dynamicChildren[modifiedKeys[i]].getValueHigh() !== changes[1]\n : this._dynamicChildren[modifiedKeys[i]] !== changes;\n modifiedEntriesMap = modifiedEntries;\n if (valueWasChanged) {\n this._dynamicChildren[modifiedKeys[i]] = this._deserializeValue(changes);\n // After modifying an entry, we have to update the flags\n // If there is a pending insert, we don't need to mark this as\n // a modify, as it will just change the insert. Otherwise, this\n // has to be reported as modify\n if (!this._pendingChanges.insert[modifiedKeys[i]]) {\n this._pendingChanges.modify[modifiedKeys[i]] = true;\n mapWasChangedByModify = true;\n }\n if (!this._dirtyChanges.insert[modifiedKeys[i]]) {\n this._dirtyChanges.modify[modifiedKeys[i]] = true;\n mapWasChangedByModify = true;\n }\n }\n } else {\n changes = this._dynamicChildren[modifiedKeys[i]]._deserialize(\n modifiedEntries[typeid][modifiedKeys[i]],\n false, in_filteringOptions, in_createChangeSet);\n valueWasChanged = !ChangeSet.isEmptyChangeSet(changes);\n\n modifiedEntries[typeid] = modifiedEntries[typeid] || {};\n modifiedEntriesMap = modifiedEntries[typeid];\n }\n\n if (valueWasChanged) {\n modifiedEntriesMap[modifiedKeys[i]] = changes;\n } else {\n delete modifiedEntriesMap[modifiedKeys[i]];\n }\n }\n\n if (!this._containsPrimitiveTypes && _.isEmpty(modifiedEntries[typeid])) {\n delete modifiedEntries[typeid];\n }\n }\n\n // Create a ChangeSet with the actually applied changes\n if (!_.isEmpty(insertedEntries)) {\n appliedChangeset.insert = _.clone(insertedEntries);\n }\n\n if (!_.isEmpty(removedEntries)) {\n appliedChangeset.remove = _.keys(removedEntries);\n }\n\n if (!_.isEmpty(modifiedEntries)) {\n appliedChangeset.modify = modifiedEntries;\n }\n\n // If working with primitive types, we have to update the dirty flag, when one of the entries\n // was changed\n if (mapWasChangedByModify) {\n this._setDirty(false);\n }\n\n // Finally report the dirtiness to the view (we postponed this above)\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n\n return appliedChangeset;\n }\n\n /**\n * @inheritdoc\n */\n _applyChangeset(in_changeSet, in_reportToView) {\n BaseProperty.prototype._applyChangeset.call(this, in_changeSet, false);\n\n // Remove existing entries\n // (we remove before we add, so that a remove+add operation in effect becomes a replace)\n if (in_changeSet.remove) {\n if (_.isArray(in_changeSet.remove)) {\n for (var i = 0; i < in_changeSet.remove.length; i++) {\n var key = in_changeSet.remove[i];\n this._removeByKey(key, false);\n }\n } else {\n // handle remove is an object case:\n if (!this._containsPrimitiveTypes) {\n var types = Object.keys(in_changeSet.remove);\n for (var i = 0; i < types.length; i++) {\n var keys = Object.keys(in_changeSet.remove[types[i]]);\n for (var j = 0; j < keys.length; j++) {\n this._removeByKey(keys[j], false);\n }\n }\n } else {\n var keys = Object.keys(in_changeSet.remove);\n for (var j = 0; j < keys.length; j++) {\n this._removeByKey(keys[j], false);\n }\n }\n }\n }\n\n // Insert entries (we just have to deserialize and insert them)\n if (in_changeSet.insert) {\n var newPsets;\n if (this._containsPrimitiveTypes) {\n newPsets = in_changeSet.insert;\n } else {\n var scope = this._getScope();\n newPsets = deserialize(in_changeSet.insert, scope);\n }\n var keys = Object.keys(newPsets);\n for (var i = 0; i < keys.length; i++) {\n if (!this._dynamicChildren[keys[i]]) {\n this._insert(keys[i], newPsets[keys[i]], false);\n } else {\n throw new Error(MSG.INSERTED_EXISTING_ENTRY + keys[i]);\n }\n }\n }\n\n // Modify entries\n var mapWasChangedByModify = false;\n if (in_changeSet.modify) {\n var classKeys = this._containsPrimitiveTypes ? [undefined] : _.keys(in_changeSet.modify);\n for (var iClass = 0; iClass < classKeys.length; iClass++) {\n var modifiedEntries = this._containsPrimitiveTypes ?\n in_changeSet.modify :\n in_changeSet.modify[classKeys[iClass]];\n var keys = Object.keys(modifiedEntries);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (this._dynamicChildren[key] !== undefined) {\n if (this._containsPrimitiveTypes) {\n var modifiedEntry = modifiedEntries[key];\n if (typeof modifiedEntry === 'object') {\n modifiedEntry = modifiedEntry.value;\n }\n this._dynamicChildren[key] = modifiedEntry;\n\n // After modifying an entry, we have to update the flags\n // If there is a pending insert, we don't need to mark this as\n // a modify, as it will just change the insert. Otherwise, this\n // has to be reported as modify\n if (!this._pendingChanges.insert[key]) {\n this._pendingChanges.modify[key] = true;\n mapWasChangedByModify = true;\n }\n if (!this._dirtyChanges.insert[key]) {\n this._dirtyChanges.modify[key] = true;\n mapWasChangedByModify = true;\n }\n } else {\n this._dynamicChildren[key]._applyChangeset(modifiedEntries[key], false);\n }\n } else {\n throw new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n }\n }\n }\n }\n\n // If working with primitive types, we have to update the dirty flag, when one of the entries\n // was changed\n if (mapWasChangedByModify) {\n this._setDirty(false);\n }\n\n // Finally report the dirtiness to the view (we postponed this above)\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n }\n\n /**\n * @inheritdoc\n */\n _reapplyDirtyFlags(in_pendingChangeSet, in_dirtyChangeSet) {\n BaseProperty.prototype._reapplyDirtyFlags.call(this, in_pendingChangeSet, in_dirtyChangeSet);\n\n var i, j, types, keys, key;\n\n // Remove existing entries\n // (we remove before we add, so that a remove+add operation in effect becomes a replace)\n if (in_pendingChangeSet.remove) {\n if (_.isArray(in_pendingChangeSet.remove)) {\n for (i = 0; i < in_pendingChangeSet.remove.length; i++) {\n key = in_pendingChangeSet.remove[i];\n this._pendingChanges.remove[key] = true;\n }\n } else {\n // handle remove is an object case:\n types = Object.keys(in_pendingChangeSet.remove);\n for (i = 0; i < types.length; i++) {\n keys = Object.keys(in_pendingChangeSet.remove[types[i]]);\n for (j = 0; j < keys.length; j++) {\n this._pendingChanges.remove[keys[j]] = true;\n }\n }\n }\n }\n\n // Inserted entries\n if (in_pendingChangeSet.insert) {\n types = Object.keys(in_pendingChangeSet.insert);\n for (i = 0; i < types.length; i++) {\n keys = Object.keys(in_pendingChangeSet.insert[types[i]]);\n for (j = 0; j < keys.length; j++) {\n key = keys[j];\n if (this._dynamicChildren[key] !== undefined) {\n this._pendingChanges.insert[key] = true;\n } else {\n throw new Error(`${MSG.CANT_DIRTY_MISSING_PROPERTY}${key}`);\n }\n }\n }\n }\n\n // Modify entries\n if (in_pendingChangeSet.modify) {\n var classKeys = _.keys(in_pendingChangeSet.modify);\n for (var iClass = 0; iClass < classKeys.length; iClass++) {\n var modifiedPendingEntries = in_pendingChangeSet.modify && in_pendingChangeSet.modify[classKeys[iClass]] || {};\n var modifiedDirtyEntries = in_dirtyChangeSet.modify && in_dirtyChangeSet.modify[classKeys[iClass]] || {};\n keys = Object.keys(modifiedPendingEntries).concat(Object.keys(modifiedDirtyEntries));\n for (i = 0; i < keys.length; i++) {\n key = keys[i];\n if (this._dynamicChildren[key] !== undefined) {\n this._dynamicChildren[key]._reapplyDirtyFlags(modifiedPendingEntries[key], modifiedDirtyEntries[key]);\n } else {\n throw new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n }\n }\n }\n }\n }\n\n /**\n * @inheritdoc\n */\n _setDirty(in_reportToView, in_callingChild) {\n // Mark the child as modified\n if (in_callingChild && !this._containsPrimitiveTypes) {\n var key = in_callingChild.getId();\n if (this._dynamicChildren[key]) {\n if (!this._pendingChanges.insert[key]) {\n this._pendingChanges.modify[key] = true;\n }\n if (!this._dirtyChanges.insert[key]) {\n this._dirtyChanges.modify[key] = true;\n }\n }\n }\n\n // Forward dirtiness propagation to base class\n BaseProperty.prototype._setDirty.call(this, in_reportToView, in_callingChild);\n }\n}\n/** Specifies, whether this is a collection of base types or of registered templates */\nIndexedCollectionBaseProperty.prototype._containsPrimitiveTypes = false;\n"]}
1
+ {"version":3,"file":"indexedCollectionBaseProperty.js","sourceRoot":"","sources":["../../src/properties/indexedCollectionBaseProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAE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B;QAC7B,IAAI,eAAe,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE;YACrD,IAAI,GAAG,GAAG,eAAe,CAAC,KAAK,EAAE,CAAC;YAClC,IAAI,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE;gBAC/B,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;oBACtC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;iBACxC;gBACD,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;oBACpC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;iBACtC;aACD;SACD;QAED,8CAA8C;QAC9C,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;IAC/E,CAAC;CACD;AAnwBD,sEAmwBC;AACD,uFAAuF;AACvF,6BAA6B,CAAC,SAAS,CAAC,uBAAuB,GAAG,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview Abstract base class for indexed collections (sets and maps)\n */\n\nconst { ChangeSet } = require(\"@fluid-experimental/property-changeset\");\nconst { ConsoleUtils } = require(\"@fluid-experimental/property-common\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst _ = require(\"lodash\");\nconst { deserialize } = require(\"../containerSerializer\");\nconst { validationsEnabled } = require(\"../enableValidations\");\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { AbstractStaticCollectionProperty } = require(\"./abstractStaticCollectionProperty\");\n\n/**\n * typedef {property-properties.BaseProperty|string|number|boolean} property-properties.IndexedCollectionBaseProperty~ValueType\n *\n * The type of the values that are set/inserted into the collection. Depending on the type of the collection, these\n * can either be property objects or primitive values\n */\n\n/**\n * A IndexedCollectionBaseProperty is the base class for indexed collections (maps and sets). It should not be used\n * directly.\n */\nexport class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t\t/** Stores the pending changes in the property (those that are part of the current ChangeSet) */\n\t\tthis._pendingChanges = {\n\t\t\tinsert: {},\n\t\t\tremove: {},\n\t\t\tmodify: {},\n\t\t};\n\n\t\t/** Stores the dirty changes in the property (those that have not yet been reported to the application) */\n\t\tthis._dirtyChanges = {\n\t\t\tinsert: {},\n\t\t\tremove: {},\n\t\t\tmodify: {},\n\t\t};\n\t}\n\n\t/**\n\t * Removes the dirtiness flag from this property\n\t *\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean\n\t * If none are supplied, all will be removed.\n\t * @private\n\t */\n\t_cleanDirty(in_flags) {\n\t\t// Invoke parent\n\t\tBaseProperty.prototype._cleanDirty.call(this, in_flags);\n\n\t\tif (\n\t\t\tin_flags === undefined ||\n\t\t\t(in_flags & BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE) !== 0\n\t\t) {\n\t\t\t// We additionally have to remove the log on the changes to our entries\n\t\t\tthis._pendingChanges.insert = {};\n\t\t\tthis._pendingChanges.remove = {};\n\t\t\tthis._pendingChanges.modify = {};\n\t\t}\n\n\t\tif (in_flags === undefined || (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) !== 0) {\n\t\t\t// We additionally have to remove the log on the changes to our entries\n\t\t\tthis._dirtyChanges.insert = {};\n\t\t\tthis._dirtyChanges.remove = {};\n\t\t\tthis._dirtyChanges.modify = {};\n\t\t}\n\t}\n\n\t/**\n\t * Removes the dirtiness flag from this property and recursively from all of its children\n\t *\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean.\n\t * If none are supplied, all will be removed.\n\t */\n\tcleanDirty(in_flags) {\n\t\tin_flags =\n\t\t\tin_flags !== undefined\n\t\t\t\t? in_flags\n\t\t\t\t: BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |\n\t\t\t\t BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE;\n\n\t\t// Clean all entries inside of the collection\n\t\tlet cleanDirtiness = (collection) => {\n\t\t\tvar entry;\n\n\t\t\t// eslint-disable-next-line no-restricted-syntax\n\t\t\tfor (let key in collection) {\n\t\t\t\tentry = this._dynamicChildren[key];\n\t\t\t\tif (entry._isDirty(in_flags)) {\n\t\t\t\t\tentry.cleanDirty(in_flags);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tif (!this._containsPrimitiveTypes) {\n\t\t\tif (in_flags === BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) {\n\t\t\t\t// Only use the dirty entries\n\t\t\t\tcleanDirtiness(this._dirtyChanges.insert);\n\t\t\t\tcleanDirtiness(this._dirtyChanges.modify);\n\t\t\t} else if (in_flags === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE) {\n\t\t\t\t// Only use the pending changes\n\t\t\t\tcleanDirtiness(this._pendingChanges.insert);\n\t\t\t\tcleanDirtiness(this._pendingChanges.modify);\n\t\t\t} else {\n\t\t\t\tcleanDirtiness(this._pendingChanges.insert);\n\t\t\t\tcleanDirtiness(this._pendingChanges.modify);\n\t\t\t\tcleanDirtiness(this._dirtyChanges.insert);\n\t\t\t\tcleanDirtiness(this._dirtyChanges.modify);\n\t\t\t}\n\t\t}\n\n\t\t// Invoke parent\n\t\tBaseProperty.prototype.cleanDirty.call(this, in_flags);\n\n\t\t// after all entries have been cleaned, we mark this property as clean\n\t\tthis._cleanDirty(in_flags);\n\t}\n\n\t/**\n\t * Inserts a property into the collection\n\t *\n\t * @param {string} in_key - Key of the entry in the collection\n\t * @param {property-properties.IndexedCollectionBaseProperty~ValueType} in_value - The value to insert\n\t * @param {boolean} in_reportToView -\n\t * By default, the dirtying will always be reported to the checkout view and trigger a modified event there.\n\t * When batching updates, this can be prevented via this flag.\n\t */\n\t_insert(in_key, in_value, in_reportToView) {\n\t\tif (validationsEnabled.enabled) {\n\t\t\tthis._checkIsNotReadOnly(false);\n\t\t}\n\n\t\tif (!this.has(in_key)) {\n\t\t\t// Make sure, the property we are inserting is not already part of some other collection\n\t\t\tif (validationsEnabled.enabled && !this._containsPrimitiveTypes) {\n\t\t\t\tin_value._validateInsertIn(this);\n\t\t\t}\n\n\t\t\tthis._dynamicChildren[in_key] = in_value;\n\n\t\t\t// We have to make sure, both this node itself and the whole tree of the inserted\n\t\t\t// entry are marked as dirty to make sure, they get serialized\n\t\t\t// We don't yet report the dirtying to the view. This happens below.\n\t\t\tthis._setDirty(false);\n\n\t\t\tif (!this._containsPrimitiveTypes) {\n\t\t\t\t// Dirty the tree (TODO: is this needed?)\n\t\t\t\tin_value._setDirtyTree(false);\n\n\t\t\t\tin_value._setParent(this);\n\n\t\t\t\t// In the case of a template property, we always mark it as inserted\n\t\t\t\tthis._pendingChanges.insert[in_key] = true;\n\t\t\t\tthis._dirtyChanges.insert[in_key] = true;\n\t\t\t} else {\n\t\t\t\t// For primitive types we squash remove/insert combinations to modifies\n\t\t\t\tif (this._pendingChanges.remove[in_key] && !this._pendingChanges.insert[in_key]) {\n\t\t\t\t\tthis._pendingChanges.modify[in_key] = true;\n\t\t\t\t\tdelete this._pendingChanges.remove[in_key];\n\t\t\t\t} else {\n\t\t\t\t\tthis._pendingChanges.insert[in_key] = true;\n\t\t\t\t}\n\n\t\t\t\tif (this._dirtyChanges.remove[in_key] && !this._dirtyChanges.insert[in_key]) {\n\t\t\t\t\tthis._dirtyChanges.modify[in_key] = true;\n\t\t\t\t\tdelete this._dirtyChanges.remove[in_key];\n\t\t\t\t} else {\n\t\t\t\t\tthis._dirtyChanges.insert[in_key] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Now make one report\n\t\t\tif (in_reportToView) {\n\t\t\t\tthis._reportDirtinessToView();\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Error(MSG.PROPERTY_ALREADY_EXISTS + in_key);\n\t\t}\n\t}\n\n\t/**\n\t * Removes an entry with the given key\n\t *\n\t * @param {string} in_key - key of the entry\n\t * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n\t * trigger a modified event there.\n\t * When batching updates, this can be prevented via this flag.\n\t */\n\t_removeByKey(in_key, in_reportToView) {\n\t\tthis._checkIsNotReadOnly(false);\n\n\t\tif (this._dynamicChildren[in_key] !== undefined) {\n\t\t\tif (this._dynamicChildren[in_key] instanceof BaseProperty) {\n\t\t\t\tthis._dynamicChildren[in_key]._setParent(undefined);\n\t\t\t}\n\n\t\t\tdelete this._dynamicChildren[in_key];\n\n\t\t\t// make sure this is not present in the insert list!\n\t\t\tif (this._pendingChanges.insert[in_key]) {\n\t\t\t\tdelete this._pendingChanges.insert[in_key];\n\t\t\t} else {\n\t\t\t\tthis._pendingChanges.remove[in_key] = true;\n\n\t\t\t\t// Also remove modifies, if any are present\n\t\t\t\tdelete this._pendingChanges.modify[in_key];\n\t\t\t}\n\n\t\t\t// also update the list of dirty changes\n\t\t\tif (this._dirtyChanges.insert[in_key]) {\n\t\t\t\tdelete this._dirtyChanges.insert[in_key];\n\t\t\t} else {\n\t\t\t\tthis._dirtyChanges.remove[in_key] = true;\n\n\t\t\t\t// Also remove modifies, if any are present\n\t\t\t\tdelete this._dirtyChanges.modify[in_key];\n\t\t\t}\n\n\t\t\tthis._setDirty(in_reportToView);\n\t\t} else {\n\t\t\tthrow new Error(MSG.REMOVED_NON_EXISTING_ENTRY + in_key);\n\t\t}\n\t}\n\n\t/**\n\t * Serialize the property\n\t *\n\t * @param {boolean} in_dirtyOnly - Only include dirty entries in the serialization\n\t * @param {boolean} in_includeRootTypeid - Include the typeid of the root of the hierarchy\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] - The type of dirtiness to use\n\t * when reporting dirty changes. By default this is `PENDING_CHANGE`.\n\t * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n\t * function will descend into referenced repositories.\n\t * WARNING: if there are loops in the references this can result in an infinite loop.\n\t *\n\t * @return {Object} The serialized representation of this property\n\t * @private\n\t */\n\t_serialize(\n\t\tin_dirtyOnly,\n\t\tin_includeRootTypeid,\n\t\tin_dirtinessType,\n\t\tin_includeReferencedRepositories,\n\t) {\n\t\tvar serialized = AbstractStaticCollectionProperty.prototype._serialize.call(\n\t\t\tthis,\n\t\t\tin_dirtyOnly,\n\t\t\tin_includeRootTypeid,\n\t\t\tin_dirtinessType,\n\t\t\tin_includeReferencedRepositories,\n\t\t);\n\n\t\tvar that = this;\n\n\t\t// Helper function to decide whether to include a typeid or not in the ChangeSet\n\t\tvar addEntryInChangeSet = function (in_changes, in_typeid, in_key, in_value) {\n\t\t\t// Determine where to insert the key. If necessary, an entry for the type is added.\n\t\t\tif (that._containsPrimitiveTypes) {\n\t\t\t\tin_changes[in_key] = that._serializeValue(in_value);\n\t\t\t} else {\n\t\t\t\tin_changes[in_typeid] = in_changes[in_typeid] || {};\n\t\t\t\tin_changes[in_typeid][in_key] = in_value;\n\t\t\t}\n\t\t};\n\n\t\tvar changes =\n\t\t\tin_dirtinessType === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE\n\t\t\t\t? this._pendingChanges\n\t\t\t\t: this._dirtyChanges;\n\t\tvar insert = {};\n\t\tvar modify = {};\n\t\t// we only remove entries when computing the delta\n\t\tvar remove = in_dirtyOnly ? _.keys(changes.remove) : [];\n\n\t\t// Iterate over all children (and not properties)\n\t\tvar typeid;\n\t\tvar entryKeys = in_dirtyOnly\n\t\t\t? _.keys(changes.modify).concat(_.keys(changes.insert)) // Only dirty keys\n\t\t\t: _.keys(this._dynamicChildren); // All keys\n\t\tfor (var i = 0; i < entryKeys.length; i++) {\n\t\t\tvar key = entryKeys[i];\n\t\t\tvar entry = this._dynamicChildren[key];\n\t\t\ttypeid = this._containsPrimitiveTypes\n\t\t\t\t? this.getFullTypeid(false)\n\t\t\t\t: entry.getFullTypeid(false);\n\t\t\tif (in_dirtyOnly) {\n\t\t\t\tif (changes.insert[key]) {\n\t\t\t\t\t// If the key was inserted in this ChangeSet include it into the inserted list\n\t\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\t\taddEntryInChangeSet(insert, typeid, key, entry);\n\t\t\t\t\t} else {\n\t\t\t\t\t\taddEntryInChangeSet(\n\t\t\t\t\t\t\tinsert,\n\t\t\t\t\t\t\ttypeid,\n\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\tentry._serialize(\n\t\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\t\tin_includeReferencedRepositories,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Check whether this is a modified entry and serialize changes when needed\n\t\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\t\tif (changes.modify[key]) {\n\t\t\t\t\t\t\taddEntryInChangeSet(modify, typeid, key, entry);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (entry._isDirty(in_dirtinessType)) {\n\t\t\t\t\t\t\tvar serializedChild = entry._serialize(\n\t\t\t\t\t\t\t\tin_dirtyOnly,\n\t\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\t\tin_dirtinessType,\n\t\t\t\t\t\t\t\tin_includeReferencedRepositories,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (!ChangeSet.isEmptyChangeSet(serializedChild)) {\n\t\t\t\t\t\t\t\taddEntryInChangeSet(modify, typeid, key, serializedChild);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If we serialize everything, all entries are inserted\n\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\tinsert[key] = this._serializeValue(entry);\n\t\t\t\t} else {\n\t\t\t\t\tinsert[typeid] = insert[typeid] || {};\n\t\t\t\t\tinsert[typeid][key] = entry._serialize(\n\t\t\t\t\t\tin_dirtyOnly,\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\tin_includeReferencedRepositories,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Serialize the changes\n\t\tif (!_.isEmpty(insert)) {\n\t\t\tserialized.insert = insert;\n\t\t}\n\n\t\tif (!_.isEmpty(remove)) {\n\t\t\tserialized.remove = remove;\n\t\t}\n\n\t\tif (!_.isEmpty(modify)) {\n\t\t\tserialized.modify = modify;\n\t\t}\n\n\t\treturn serialized;\n\t}\n\n\t/**\n\t * Function to deserialize special primitive types.\n\t * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n\t * special treatment on deserialization. For supported types, we can just return the input here.\n\t *\n\t * @param {property-properties.SerializedChangeSet} in_serializedObj - The object to be deserialized\n\t * @return {*} the deserialized value\n\t */\n\t_deserializeValue(in_serializedObj) {\n\t\treturn in_serializedObj;\n\t}\n\n\t/**\n\t * Function to serialize special primitive types.\n\t * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n\t * special treatment on serialization. For supported types, we can just return the input here.\n\t *\n\t * @param {*} in_obj - The object to be serialized\n\t * @return {property-properties.SerializedChangeSet} the serialized object\n\t */\n\t_serializeValue(in_obj) {\n\t\tConsoleUtils.assert(\n\t\t\tthis._containsPrimitiveTypes,\n\t\t\tMSG.ASSERTION_FAILED +\n\t\t\t\t\"Function IndexedCollectionBaseProperty._serializeValue() called on non-primitive collection\",\n\t\t);\n\t\treturn in_obj;\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_deserialize(in_serializedObj, in_reportToView, in_filteringOptions, in_createChangeSet) {\n\t\tvar currentEntries = this._dynamicChildren;\n\t\tvar allInsertedKeys = {};\n\n\t\tvar appliedChangeset = AbstractStaticCollectionProperty.prototype._deserialize.call(\n\t\t\tthis,\n\t\t\tin_serializedObj,\n\t\t\tfalse,\n\t\t\tin_filteringOptions,\n\t\t\tin_createChangeSet,\n\t\t);\n\n\t\t// Perform updates to the children\n\n\t\t// We make copies on two levels, since those are modified by the calls below\n\t\tvar insertedEntries =\n\t\t\t_.mapValues(in_serializedObj.insert, function (x) {\n\t\t\t\treturn _.clone(x);\n\t\t\t}) || {};\n\t\tvar removedEntries = {};\n\t\tvar modifiedEntries = {};\n\n\t\t// Get a list of all keys that will be inserted\n\t\tif (this._containsPrimitiveTypes) {\n\t\t\tvar dataKeys = _.keys(insertedEntries);\n\t\t\tfor (var iData = 0; iData < dataKeys.length; iData++) {\n\t\t\t\tvar key = dataKeys[iData];\n\t\t\t\tallInsertedKeys[key] = true;\n\t\t\t}\n\t\t} else {\n\t\t\tvar classKeys = _.keys(insertedEntries);\n\t\t\tfor (var iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\t\tvar typeid = classKeys[iClass];\n\t\t\t\tvar dataKeys = _.keys(insertedEntries[typeid]);\n\t\t\t\tfor (var iData = 0; iData < dataKeys.length; iData++) {\n\t\t\t\t\tvar key = dataKeys[iData];\n\t\t\t\t\tallInsertedKeys[key] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Intersect the list of current keys, with the list of keys that will\n\t\t// NOT be inserted. Then insert the difference in the remove list so that\n\t\t// no objects are left dangling\n\t\tvar keys = _.keys(currentEntries);\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tif (!allInsertedKeys[keys[i]]) {\n\t\t\t\tremovedEntries[keys[i]] = true;\n\t\t\t}\n\t\t}\n\n\t\t// Remap adds to modify if the items are already in the document.\n\t\t// We want to make sure we reuse the current document state as much as possible\n\t\t// and simply change the bits that need to be changed. In many cases the\n\t\t// document will already contain the items but they need to be modified to\n\t\t// match the state described in_changeSet.\n\t\tif (this._containsPrimitiveTypes) {\n\t\t\tvar addedKeys = Object.keys(insertedEntries);\n\t\t\tfor (i = 0; i < addedKeys.length; i++) {\n\t\t\t\tif (currentEntries[addedKeys[i]] !== undefined) {\n\t\t\t\t\tmodifiedEntries[addedKeys[i]] = insertedEntries[addedKeys[i]];\n\t\t\t\t\tdelete insertedEntries[addedKeys[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tclassKeys = _.keys(insertedEntries);\n\t\t\tfor (iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\t\ttypeid = classKeys[iClass];\n\t\t\t\tvar addedKeys = Object.keys(insertedEntries[typeid]);\n\t\t\t\tfor (i = 0; i < addedKeys.length; i++) {\n\t\t\t\t\tif (currentEntries[addedKeys[i]] !== undefined) {\n\t\t\t\t\t\tmodifiedEntries[typeid] = modifiedEntries[typeid] || {};\n\t\t\t\t\t\tmodifiedEntries[typeid][addedKeys[i]] =\n\t\t\t\t\t\t\tinsertedEntries[typeid][addedKeys[i]];\n\t\t\t\t\t\tdelete insertedEntries[typeid][addedKeys[i]];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Remove add entries, when they are empty\n\t\t\t\tif (_.isEmpty(insertedEntries[typeid])) {\n\t\t\t\t\tdelete insertedEntries[typeid];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Begin by removing what needs to be removed.\n\t\tkeys = Object.keys(removedEntries);\n\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\tthis._removeByKey(keys[i], false);\n\t\t}\n\n\t\t// Now get the portion of the children that must be added\n\t\t// this is a straightforward deserialize.\n\t\tif (this._containsPrimitiveTypes) {\n\t\t\tkeys = _.keys(insertedEntries);\n\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\tthis._insert(keys[i], this._deserializeValue(insertedEntries[keys[i]]), false);\n\t\t\t}\n\t\t} else {\n\t\t\tvar scope = this._getScope();\n\t\t\tvar newPsets = deserialize(insertedEntries, scope);\n\t\t\tkeys = _.keys(newPsets);\n\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\tthis._insert(keys[i], newPsets[keys[i]], false);\n\t\t\t}\n\t\t}\n\n\t\t// If no typeids are included, we just use a placeholder for the iteration below\n\t\tvar classKeys = this._containsPrimitiveTypes ? [undefined] : _.keys(modifiedEntries);\n\n\t\t// Finally modify the existing properties\n\t\tvar mapWasChangedByModify = false;\n\t\tfor (iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\ttypeid = classKeys[iClass];\n\t\t\tvar modifiedKeys = Object.keys(\n\t\t\t\tthis._containsPrimitiveTypes ? modifiedEntries : modifiedEntries[typeid],\n\t\t\t);\n\t\t\tfor (i = 0; i < modifiedKeys.length; i++) {\n\t\t\t\tvar changes;\n\t\t\t\tvar valueWasChanged = false;\n\t\t\t\tvar modifiedEntriesMap;\n\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\tchanges = modifiedEntries[modifiedKeys[i]];\n\t\t\t\t\t// Determine if value has changed\n\t\t\t\t\tvalueWasChanged =\n\t\t\t\t\t\tthis._typeid === \"Int64\" || this._typeid === \"Uint64\"\n\t\t\t\t\t\t\t? // For (u)int64, we will compare (Ui/I)nt64 objects with arrays [low, high]\n\t\t\t\t\t\t\t this._dynamicChildren[modifiedKeys[i]].getValueLow() !== changes[0] ||\n\t\t\t\t\t\t\t this._dynamicChildren[modifiedKeys[i]].getValueHigh() !== changes[1]\n\t\t\t\t\t\t\t: this._dynamicChildren[modifiedKeys[i]] !== changes;\n\t\t\t\t\tmodifiedEntriesMap = modifiedEntries;\n\t\t\t\t\tif (valueWasChanged) {\n\t\t\t\t\t\tthis._dynamicChildren[modifiedKeys[i]] = this._deserializeValue(changes);\n\t\t\t\t\t\t// After modifying an entry, we have to update the flags\n\t\t\t\t\t\t// If there is a pending insert, we don't need to mark this as\n\t\t\t\t\t\t// a modify, as it will just change the insert. Otherwise, this\n\t\t\t\t\t\t// has to be reported as modify\n\t\t\t\t\t\tif (!this._pendingChanges.insert[modifiedKeys[i]]) {\n\t\t\t\t\t\t\tthis._pendingChanges.modify[modifiedKeys[i]] = true;\n\t\t\t\t\t\t\tmapWasChangedByModify = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!this._dirtyChanges.insert[modifiedKeys[i]]) {\n\t\t\t\t\t\t\tthis._dirtyChanges.modify[modifiedKeys[i]] = true;\n\t\t\t\t\t\t\tmapWasChangedByModify = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tchanges = this._dynamicChildren[modifiedKeys[i]]._deserialize(\n\t\t\t\t\t\tmodifiedEntries[typeid][modifiedKeys[i]],\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tin_filteringOptions,\n\t\t\t\t\t\tin_createChangeSet,\n\t\t\t\t\t);\n\t\t\t\t\tvalueWasChanged = !ChangeSet.isEmptyChangeSet(changes);\n\n\t\t\t\t\tmodifiedEntries[typeid] = modifiedEntries[typeid] || {};\n\t\t\t\t\tmodifiedEntriesMap = modifiedEntries[typeid];\n\t\t\t\t}\n\n\t\t\t\tif (valueWasChanged) {\n\t\t\t\t\tmodifiedEntriesMap[modifiedKeys[i]] = changes;\n\t\t\t\t} else {\n\t\t\t\t\tdelete modifiedEntriesMap[modifiedKeys[i]];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!this._containsPrimitiveTypes && _.isEmpty(modifiedEntries[typeid])) {\n\t\t\t\tdelete modifiedEntries[typeid];\n\t\t\t}\n\t\t}\n\n\t\t// Create a ChangeSet with the actually applied changes\n\t\tif (!_.isEmpty(insertedEntries)) {\n\t\t\tappliedChangeset.insert = _.clone(insertedEntries);\n\t\t}\n\n\t\tif (!_.isEmpty(removedEntries)) {\n\t\t\tappliedChangeset.remove = _.keys(removedEntries);\n\t\t}\n\n\t\tif (!_.isEmpty(modifiedEntries)) {\n\t\t\tappliedChangeset.modify = modifiedEntries;\n\t\t}\n\n\t\t// If working with primitive types, we have to update the dirty flag, when one of the entries\n\t\t// was changed\n\t\tif (mapWasChangedByModify) {\n\t\t\tthis._setDirty(false);\n\t\t}\n\n\t\t// Finally report the dirtiness to the view (we postponed this above)\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\n\t\treturn appliedChangeset;\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_applyChangeset(in_changeSet, in_reportToView) {\n\t\tBaseProperty.prototype._applyChangeset.call(this, in_changeSet, false);\n\n\t\t// Remove existing entries\n\t\t// (we remove before we add, so that a remove+add operation in effect becomes a replace)\n\t\tif (in_changeSet.remove) {\n\t\t\tif (_.isArray(in_changeSet.remove)) {\n\t\t\t\tfor (var i = 0; i < in_changeSet.remove.length; i++) {\n\t\t\t\t\tvar key = in_changeSet.remove[i];\n\t\t\t\t\tthis._removeByKey(key, false);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// handle remove is an object case:\n\t\t\t\tif (!this._containsPrimitiveTypes) {\n\t\t\t\t\tvar types = Object.keys(in_changeSet.remove);\n\t\t\t\t\tfor (var i = 0; i < types.length; i++) {\n\t\t\t\t\t\tvar keys = Object.keys(in_changeSet.remove[types[i]]);\n\t\t\t\t\t\tfor (var j = 0; j < keys.length; j++) {\n\t\t\t\t\t\t\tthis._removeByKey(keys[j], false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar keys = Object.keys(in_changeSet.remove);\n\t\t\t\t\tfor (var j = 0; j < keys.length; j++) {\n\t\t\t\t\t\tthis._removeByKey(keys[j], false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Insert entries (we just have to deserialize and insert them)\n\t\tif (in_changeSet.insert) {\n\t\t\tvar newPsets;\n\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\tnewPsets = in_changeSet.insert;\n\t\t\t} else {\n\t\t\t\tvar scope = this._getScope();\n\t\t\t\tnewPsets = deserialize(in_changeSet.insert, scope);\n\t\t\t}\n\t\t\tvar keys = Object.keys(newPsets);\n\t\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\t\tif (!this._dynamicChildren[keys[i]]) {\n\t\t\t\t\tthis._insert(keys[i], newPsets[keys[i]], false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(MSG.INSERTED_EXISTING_ENTRY + keys[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Modify entries\n\t\tvar mapWasChangedByModify = false;\n\t\tif (in_changeSet.modify) {\n\t\t\tvar classKeys = this._containsPrimitiveTypes\n\t\t\t\t? [undefined]\n\t\t\t\t: _.keys(in_changeSet.modify);\n\t\t\tfor (var iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\t\tvar modifiedEntries = this._containsPrimitiveTypes\n\t\t\t\t\t? in_changeSet.modify\n\t\t\t\t\t: in_changeSet.modify[classKeys[iClass]];\n\t\t\t\tvar keys = Object.keys(modifiedEntries);\n\t\t\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\t\t\tvar key = keys[i];\n\t\t\t\t\tif (this._dynamicChildren[key] !== undefined) {\n\t\t\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\t\t\tvar modifiedEntry = modifiedEntries[key];\n\t\t\t\t\t\t\tif (typeof modifiedEntry === \"object\") {\n\t\t\t\t\t\t\t\tmodifiedEntry = modifiedEntry.value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._dynamicChildren[key] = modifiedEntry;\n\n\t\t\t\t\t\t\t// After modifying an entry, we have to update the flags\n\t\t\t\t\t\t\t// If there is a pending insert, we don't need to mark this as\n\t\t\t\t\t\t\t// a modify, as it will just change the insert. Otherwise, this\n\t\t\t\t\t\t\t// has to be reported as modify\n\t\t\t\t\t\t\tif (!this._pendingChanges.insert[key]) {\n\t\t\t\t\t\t\t\tthis._pendingChanges.modify[key] = true;\n\t\t\t\t\t\t\t\tmapWasChangedByModify = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!this._dirtyChanges.insert[key]) {\n\t\t\t\t\t\t\t\tthis._dirtyChanges.modify[key] = true;\n\t\t\t\t\t\t\t\tmapWasChangedByModify = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis._dynamicChildren[key]._applyChangeset(modifiedEntries[key], false);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If working with primitive types, we have to update the dirty flag, when one of the entries\n\t\t// was changed\n\t\tif (mapWasChangedByModify) {\n\t\t\tthis._setDirty(false);\n\t\t}\n\n\t\t// Finally report the dirtiness to the view (we postponed this above)\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_reapplyDirtyFlags(in_pendingChangeSet, in_dirtyChangeSet) {\n\t\tBaseProperty.prototype._reapplyDirtyFlags.call(\n\t\t\tthis,\n\t\t\tin_pendingChangeSet,\n\t\t\tin_dirtyChangeSet,\n\t\t);\n\n\t\tvar i, j, types, keys, key;\n\n\t\t// Remove existing entries\n\t\t// (we remove before we add, so that a remove+add operation in effect becomes a replace)\n\t\tif (in_pendingChangeSet.remove) {\n\t\t\tif (_.isArray(in_pendingChangeSet.remove)) {\n\t\t\t\tfor (i = 0; i < in_pendingChangeSet.remove.length; i++) {\n\t\t\t\t\tkey = in_pendingChangeSet.remove[i];\n\t\t\t\t\tthis._pendingChanges.remove[key] = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// handle remove is an object case:\n\t\t\t\ttypes = Object.keys(in_pendingChangeSet.remove);\n\t\t\t\tfor (i = 0; i < types.length; i++) {\n\t\t\t\t\tkeys = Object.keys(in_pendingChangeSet.remove[types[i]]);\n\t\t\t\t\tfor (j = 0; j < keys.length; j++) {\n\t\t\t\t\t\tthis._pendingChanges.remove[keys[j]] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Inserted entries\n\t\tif (in_pendingChangeSet.insert) {\n\t\t\ttypes = Object.keys(in_pendingChangeSet.insert);\n\t\t\tfor (i = 0; i < types.length; i++) {\n\t\t\t\tkeys = Object.keys(in_pendingChangeSet.insert[types[i]]);\n\t\t\t\tfor (j = 0; j < keys.length; j++) {\n\t\t\t\t\tkey = keys[j];\n\t\t\t\t\tif (this._dynamicChildren[key] !== undefined) {\n\t\t\t\t\t\tthis._pendingChanges.insert[key] = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(`${MSG.CANT_DIRTY_MISSING_PROPERTY}${key}`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Modify entries\n\t\tif (in_pendingChangeSet.modify) {\n\t\t\tvar classKeys = _.keys(in_pendingChangeSet.modify);\n\t\t\tfor (var iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\t\tvar modifiedPendingEntries =\n\t\t\t\t\t(in_pendingChangeSet.modify && in_pendingChangeSet.modify[classKeys[iClass]]) ||\n\t\t\t\t\t{};\n\t\t\t\tvar modifiedDirtyEntries =\n\t\t\t\t\t(in_dirtyChangeSet.modify && in_dirtyChangeSet.modify[classKeys[iClass]]) || {};\n\t\t\t\tkeys = Object.keys(modifiedPendingEntries).concat(\n\t\t\t\t\tObject.keys(modifiedDirtyEntries),\n\t\t\t\t);\n\t\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\t\tkey = keys[i];\n\t\t\t\t\tif (this._dynamicChildren[key] !== undefined) {\n\t\t\t\t\t\tthis._dynamicChildren[key]._reapplyDirtyFlags(\n\t\t\t\t\t\t\tmodifiedPendingEntries[key],\n\t\t\t\t\t\t\tmodifiedDirtyEntries[key],\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_setDirty(in_reportToView, in_callingChild) {\n\t\t// Mark the child as modified\n\t\tif (in_callingChild && !this._containsPrimitiveTypes) {\n\t\t\tvar key = in_callingChild.getId();\n\t\t\tif (this._dynamicChildren[key]) {\n\t\t\t\tif (!this._pendingChanges.insert[key]) {\n\t\t\t\t\tthis._pendingChanges.modify[key] = true;\n\t\t\t\t}\n\t\t\t\tif (!this._dirtyChanges.insert[key]) {\n\t\t\t\t\tthis._dirtyChanges.modify[key] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Forward dirtiness propagation to base class\n\t\tBaseProperty.prototype._setDirty.call(this, in_reportToView, in_callingChild);\n\t}\n}\n/** Specifies, whether this is a collection of base types or of registered templates */\nIndexedCollectionBaseProperty.prototype._containsPrimitiveTypes = false;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"intProperties.d.ts","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":"AAsBA;IAiBA,kBAAmC;CAFlC;AAID;;GAEG;AACH;IAgBA,kBAAoC;CAFnC;AAID;;GAEG;AACH;IAgBA,kBAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;;OAQG;IACH,wBAKC;IAHG,qBAAsC;IAgC1C;;OAEG;IACH,gBAFY,MAAM,CAIjB;IAED;;OAEG;IACH,eAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,sBAJW,MAAM,GAEL,OAAO,CAYlB;IAED;;;;OAIG;IACH,oBAJW,MAAM,GAEL,OAAO,CAYlB;IAyDD;;;;;;OAMG;IACH,oBAJW,MAAM,GAEL,MAAM,CAIjB;IAED;;;;;;;;;;OAUG;IACH,sBARW,MAAM,aACN,MAAM,QAahB;CACJ;AAED;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAqC;CAFpC"}
1
+ {"version":3,"file":"intProperties.d.ts","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":"AAsBA;IAiBA,kBAAmC;CAFlC;AAID;;GAEG;AACH;IAgBA,kBAAoC;CAFnC;AAID;;GAEG;AACH;IAgBA,kBAAoC;CAFnC;AAID;;GAEG;AACH;IACC;;;;;;;;OAQG;IACH,wBAKC;IAHA,qBAAsC;IAgCvC;;OAEG;IACH,gBAFY,MAAM,CAIjB;IAED;;OAEG;IACH,eAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,sBAJW,MAAM,GAEL,OAAO,CAYlB;IAED;;;;OAIG;IACH,oBAJW,MAAM,GAEL,OAAO,CAYlB;IAkED;;;;;;OAMG;IACH,oBAJW,MAAM,GAEL,MAAM,CAIjB;IAED;;;;;;;;;;OAUG;IACH,sBARW,MAAM,aACN,MAAM,QAahB;CACD;AAED;;GAEG;AACH;IACC;;;;;;;OAOG;IACH,wBAEC;IAGF,8DAAoC;CAFnC;AAID;;GAEG;AACH;IACC;;;;;;;OAOG;IACH,wBAEC;IAGF,8DAAqC;CAFpC"}
@@ -8,11 +8,11 @@ exports.Uint64Property = exports.Int64Property = exports.Integer64Property = exp
8
8
  /**
9
9
  * @fileoverview Definition of the Int*Property classes
10
10
  */
11
- const _ = require('lodash');
12
- const { ChangeSet } = require('@fluid-experimental/property-changeset');
13
- const { ConsoleUtils, constants: { MSG }, Uint64, Int64, } = require('@fluid-experimental/property-common');
14
- const { ValueProperty } = require('./valueProperty');
15
- const { _castFunctors } = require('./primitiveTypeCasts');
11
+ const _ = require("lodash");
12
+ const { ChangeSet } = require("@fluid-experimental/property-changeset");
13
+ const { ConsoleUtils, constants: { MSG }, Uint64, Int64, } = require("@fluid-experimental/property-common");
14
+ const { ValueProperty } = require("./valueProperty");
15
+ const { _castFunctors } = require("./primitiveTypeCasts");
16
16
  const BIT32 = 4294967296;
17
17
  class Int8Property extends ValueProperty {
18
18
  /**
@@ -31,7 +31,7 @@ class Int8Property extends ValueProperty {
31
31
  }
32
32
  }
33
33
  exports.Int8Property = Int8Property;
34
- Int8Property.prototype._typeid = 'Int8';
34
+ Int8Property.prototype._typeid = "Int8";
35
35
  Int8Property.prototype._castFunctor = _castFunctors.Int8;
36
36
  /**
37
37
  * A primitive property for an signed 16 bit integer value.
@@ -52,7 +52,7 @@ class Int16Property extends ValueProperty {
52
52
  }
53
53
  }
54
54
  exports.Int16Property = Int16Property;
55
- Int16Property.prototype._typeid = 'Int16';
55
+ Int16Property.prototype._typeid = "Int16";
56
56
  Int16Property.prototype._castFunctor = _castFunctors.Int16;
57
57
  /**
58
58
  * A primitive property for an signed 32 bit integer value.
@@ -73,7 +73,7 @@ class Int32Property extends ValueProperty {
73
73
  }
74
74
  }
75
75
  exports.Int32Property = Int32Property;
76
- Int32Property.prototype._typeid = 'Int32';
76
+ Int32Property.prototype._typeid = "Int32";
77
77
  Int32Property.prototype._castFunctor = _castFunctors.Int32;
78
78
  /**
79
79
  * A primitive property base class for big integer values.
@@ -256,7 +256,7 @@ class Int64Property extends Integer64Property {
256
256
  }
257
257
  }
258
258
  exports.Int64Property = Int64Property;
259
- Int64Property.prototype._typeid = 'Int64';
259
+ Int64Property.prototype._typeid = "Int64";
260
260
  Int64Property.prototype._castFunctor = _castFunctors.Int64;
261
261
  /**
262
262
  * A primitive property class for big unsingned integer values.
@@ -275,6 +275,6 @@ class Uint64Property extends Integer64Property {
275
275
  }
276
276
  }
277
277
  exports.Uint64Property = Uint64Property;
278
- Uint64Property.prototype._typeid = 'Uint64';
278
+ Uint64Property.prototype._typeid = "Uint64";
279
279
  Uint64Property.prototype._castFunctor = _castFunctors.Uint64;
280
280
  //# sourceMappingURL=intProperties.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"intProperties.js","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":";AA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C,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview Definition of the Int*Property classes\n */\n\nconst _ = require('lodash');\nconst { ChangeSet } = require('@fluid-experimental/property-changeset');\nconst {\n ConsoleUtils,\n constants: { MSG },\n Uint64,\n Int64,\n} = require('@fluid-experimental/property-common');\nconst { ValueProperty } = require('./valueProperty');\nconst { _castFunctors } = require('./primitiveTypeCasts');\n\nconst BIT32 = 4294967296;\n\nexport class Int8Property extends ValueProperty {\n /**\n * A primitive property for an signed 8 bit integer value.\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int8Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt8Property.prototype._typeid = 'Int8';\nInt8Property.prototype._castFunctor = _castFunctors.Int8;\n\n/**\n * A primitive property for an signed 16 bit integer value.\n */\nexport class Int16Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int16Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt16Property.prototype._typeid = 'Int16';\nInt16Property.prototype._castFunctor = _castFunctors.Int16;\n\n/**\n * A primitive property for an signed 32 bit integer value.\n */\nexport class Int32Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int32Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt32Property.prototype._typeid = 'Int32';\nInt32Property.prototype._castFunctor = _castFunctors.Int32;\n\n/**\n * A primitive property base class for big integer values.\n */\nexport class Integer64Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Integer64Property\n * @abstract\n * @category Value Properties\n */\n constructor(in_params, dataConstructor) {\n super(in_params);\n this.DataConstructor = dataConstructor;\n // default for this property type is '0, 0'\n this._data = new this.DataConstructor();\n }\n\n /**\n * Internal function to update the value of the Integer64Property\n *\n * @param {Int64|String|Number} in_value - The new value\n * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout view\n * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n * @return {boolean} true if the value was actually changed\n * @throws If in_value is a string that contains characters other than numbers\n */\n _setValue(in_value, in_reportToView) {\n var oldLowValue = this._data.getValueLow();\n var oldHighValue = this._data.getValueHigh();\n\n in_value = this._castFunctor(in_value);\n\n var newHighValue = in_value.getValueHigh();\n var newLowValue = in_value.getValueLow();\n\n var changed = oldHighValue !== newHighValue || oldLowValue !== newLowValue;\n\n if (changed) {\n this._data = in_value.clone();\n this._setDirty(in_reportToView);\n }\n return changed;\n }\n\n /**\n * @return {number} the higher 32 bit integer part\n */\n getValueHigh() {\n return this._data.getValueHigh();\n }\n\n /**\n * @return {number} the lower 32 bit integer part\n */\n getValueLow() {\n return this._data.getValueLow();\n }\n\n /**\n * @param {number} in_high - Set the higher 32 bit integer part\n * @throws If in_high is not a number\n * @return {boolean} true if the value was actually changed\n */\n setValueHigh(in_high) {\n ConsoleUtils.assert(_.isNumber(in_high), MSG.IN_HIGH_MUST_BE_NUMBER + in_high);\n var changed = this._data.getValueHigh() !== in_high;\n\n if (changed) {\n var newData = new this.DataConstructor(this.getValueLow(), in_high);\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @param {number} in_low - Set the lower 32 bit integer part\n * @throws If in_low is not a number\n * @return {boolean} true if the value was actually changed\n */\n setValueLow(in_low) {\n ConsoleUtils.assert(_.isNumber(in_low), MSG.IN_LOW_MUST_BE_NUMBER + in_low);\n var changed = this._data.getValueLow() !== in_low;\n\n if (changed) {\n var newData = new this.DataConstructor(in_low, this.getValueHigh());\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @inheritdoc\n */\n _deserialize(in_serializedObj, in_reportToView,\n in_filteringOptions, in_createChangeSet) {\n if (ChangeSet.isEmptyChangeSet(in_serializedObj)) {\n return undefined;\n } else {\n ConsoleUtils.assert(_.isArray(in_serializedObj) && in_serializedObj.length === 2, MSG.INVALID_INT64_CHANGESET);\n var readValue = new this.DataConstructor(in_serializedObj[0], in_serializedObj[1]);\n var changed = this._setValue(readValue, in_reportToView);\n return changed ? this.serialize() : undefined;\n }\n }\n\n /**\n * @inheritdoc\n */\n _applyChangeset(in_changeSet, in_reportToView, in_filteringOptions) {\n if (!ChangeSet.isEmptyChangeSet(in_changeSet)) {\n if (!_.isArray(in_changeSet)) {\n in_changeSet = in_changeSet.value;\n }\n ConsoleUtils.assert(_.isArray(in_changeSet) && in_changeSet.length === 2, MSG.INVALID_INT64_CHANGESET);\n var newVal = new this.DataConstructor(in_changeSet[0], in_changeSet[1]);\n this._setValue(newVal, in_reportToView);\n }\n }\n\n /**\n * Serialize the property\n *\n * @param {boolean} in_dirtyOnly -\n * Only include dirty entries in the serialization\n * @param {boolean} in_includeRootTypeid -\n * Include the typeid of the root of the hierarchy - has no effect for value properties\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] -\n * The type of dirtiness to use when reporting dirty changes. By default this is `PENDING_CHANGE`.\n * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n * function will descend into referenced repositories. WARNING: if there are loops in the references\n * this can result in an infinite loop\n * @return {*} The serialized representation of this property\n * @private\n */\n _serialize(in_dirtyOnly, in_includeRootTypeid,\n in_dirtinessType, in_includeReferencedRepositories) {\n if (in_dirtyOnly) {\n return this._isDirty(in_dirtinessType)\n ? [this._data.getValueLow(), this._data.getValueHigh()]\n : {};\n } else {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n }\n }\n\n /**\n * The toString() method returns a string representing the specified Integer64 object.\n *\n * @param {number} [in_radix = 10] - An integer between 2 and 36 specifying\n * the base to use for representing numeric values.\n * @return {string} A string representing the specified Integer64 object.\n */\n toString(in_radix) {\n return this._data.toString(in_radix);\n }\n\n /**\n * The Integer64.fromString() method parses a string argument updates object's lower and higher 32 bit integer parts.\n *\n * @param {string} in_string - The value to parse. Leading whitespace in the string argument is ignored.\n * @param {number} [in_radix = 10] - An integer between 2 and 36 that represents the\n * radix (the base in mathematical numeral systems) of the above mentioned string.\n * @throws if in_string is not a string\n * @throws if in_radix is entered but is not a number between 2 and 36\n * @throws if the property is a Uint64 property and in_string is a negative number\n * @throws if in_string contains characters other than numbers\n */\n fromString(in_string, in_radix) {\n ConsoleUtils.assert(_.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);\n var int = this._castFunctor(in_string, in_radix);\n\n this.setValueHigh(int.getValueHigh());\n this.setValueLow(int.getValueLow());\n }\n}\n\n/**\n * A primitive property class for big signed integer values.\n */\nexport class Int64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Int64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Int64);\n }\n}\nInt64Property.prototype._typeid = 'Int64';\nInt64Property.prototype._castFunctor = _castFunctors.Int64;\n\n/**\n * A primitive property class for big unsingned integer values.\n */\nexport class Uint64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Uint64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Uint64);\n }\n}\nUint64Property.prototype._typeid = 'Uint64';\nUint64Property.prototype._castFunctor = _castFunctors.Uint64;\n"]}
1
+ {"version":3,"file":"intProperties.js","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AAEH,MAAM,CAAC,GAAG,OAAO,C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microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview Definition of the Int*Property classes\n */\n\nconst _ = require(\"lodash\");\nconst { ChangeSet } = require(\"@fluid-experimental/property-changeset\");\nconst {\n\tConsoleUtils,\n\tconstants: { MSG },\n\tUint64,\n\tInt64,\n} = require(\"@fluid-experimental/property-common\");\nconst { ValueProperty } = require(\"./valueProperty\");\nconst { _castFunctors } = require(\"./primitiveTypeCasts\");\n\nconst BIT32 = 4294967296;\n\nexport class Int8Property extends ValueProperty {\n\t/**\n\t * A primitive property for an signed 8 bit integer value.\n\t * @param {Object=} in_params - the parameters\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueProperty\n\t * @alias property-properties.Int8Property\n\t * @category Value Properties\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t\t// default for this property type is '0'\n\t\tthis._data = 0;\n\t}\n}\nInt8Property.prototype._typeid = \"Int8\";\nInt8Property.prototype._castFunctor = _castFunctors.Int8;\n\n/**\n * A primitive property for an signed 16 bit integer value.\n */\nexport class Int16Property extends ValueProperty {\n\t/**\n\t * @param {Object=} in_params - the parameters\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueProperty\n\t * @alias property-properties.Int16Property\n\t * @category Value Properties\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t\t// default for this property type is '0'\n\t\tthis._data = 0;\n\t}\n}\nInt16Property.prototype._typeid = \"Int16\";\nInt16Property.prototype._castFunctor = _castFunctors.Int16;\n\n/**\n * A primitive property for an signed 32 bit integer value.\n */\nexport class Int32Property extends ValueProperty {\n\t/**\n\t * @param {Object=} in_params - the parameters\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueProperty\n\t * @alias property-properties.Int32Property\n\t * @category Value Properties\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t\t// default for this property type is '0'\n\t\tthis._data = 0;\n\t}\n}\nInt32Property.prototype._typeid = \"Int32\";\nInt32Property.prototype._castFunctor = _castFunctors.Int32;\n\n/**\n * A primitive property base class for big integer values.\n */\nexport class Integer64Property extends ValueProperty {\n\t/**\n\t * @param {Object=} in_params - the parameters\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueProperty\n\t * @alias property-properties.Integer64Property\n\t * @abstract\n\t * @category Value Properties\n\t */\n\tconstructor(in_params, dataConstructor) {\n\t\tsuper(in_params);\n\t\tthis.DataConstructor = dataConstructor;\n\t\t// default for this property type is '0, 0'\n\t\tthis._data = new this.DataConstructor();\n\t}\n\n\t/**\n\t * Internal function to update the value of the Integer64Property\n\t *\n\t * @param {Int64|String|Number} in_value - The new value\n\t * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout view\n\t * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t * @return {boolean} true if the value was actually changed\n\t * @throws If in_value is a string that contains characters other than numbers\n\t */\n\t_setValue(in_value, in_reportToView) {\n\t\tvar oldLowValue = this._data.getValueLow();\n\t\tvar oldHighValue = this._data.getValueHigh();\n\n\t\tin_value = this._castFunctor(in_value);\n\n\t\tvar newHighValue = in_value.getValueHigh();\n\t\tvar newLowValue = in_value.getValueLow();\n\n\t\tvar changed = oldHighValue !== newHighValue || oldLowValue !== newLowValue;\n\n\t\tif (changed) {\n\t\t\tthis._data = in_value.clone();\n\t\t\tthis._setDirty(in_reportToView);\n\t\t}\n\t\treturn changed;\n\t}\n\n\t/**\n\t * @return {number} the higher 32 bit integer part\n\t */\n\tgetValueHigh() {\n\t\treturn this._data.getValueHigh();\n\t}\n\n\t/**\n\t * @return {number} the lower 32 bit integer part\n\t */\n\tgetValueLow() {\n\t\treturn this._data.getValueLow();\n\t}\n\n\t/**\n\t * @param {number} in_high - Set the higher 32 bit integer part\n\t * @throws If in_high is not a number\n\t * @return {boolean} true if the value was actually changed\n\t */\n\tsetValueHigh(in_high) {\n\t\tConsoleUtils.assert(_.isNumber(in_high), MSG.IN_HIGH_MUST_BE_NUMBER + in_high);\n\t\tvar changed = this._data.getValueHigh() !== in_high;\n\n\t\tif (changed) {\n\t\t\tvar newData = new this.DataConstructor(this.getValueLow(), in_high);\n\t\t\tthis._data = newData;\n\t\t\tthis._setDirty();\n\t\t}\n\t\treturn changed;\n\t}\n\n\t/**\n\t * @param {number} in_low - Set the lower 32 bit integer part\n\t * @throws If in_low is not a number\n\t * @return {boolean} true if the value was actually changed\n\t */\n\tsetValueLow(in_low) {\n\t\tConsoleUtils.assert(_.isNumber(in_low), MSG.IN_LOW_MUST_BE_NUMBER + in_low);\n\t\tvar changed = this._data.getValueLow() !== in_low;\n\n\t\tif (changed) {\n\t\t\tvar newData = new this.DataConstructor(in_low, this.getValueHigh());\n\t\t\tthis._data = newData;\n\t\t\tthis._setDirty();\n\t\t}\n\t\treturn changed;\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_deserialize(in_serializedObj, in_reportToView, in_filteringOptions, in_createChangeSet) {\n\t\tif (ChangeSet.isEmptyChangeSet(in_serializedObj)) {\n\t\t\treturn undefined;\n\t\t} else {\n\t\t\tConsoleUtils.assert(\n\t\t\t\t_.isArray(in_serializedObj) && in_serializedObj.length === 2,\n\t\t\t\tMSG.INVALID_INT64_CHANGESET,\n\t\t\t);\n\t\t\tvar readValue = new this.DataConstructor(in_serializedObj[0], in_serializedObj[1]);\n\t\t\tvar changed = this._setValue(readValue, in_reportToView);\n\t\t\treturn changed ? this.serialize() : undefined;\n\t\t}\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_applyChangeset(in_changeSet, in_reportToView, in_filteringOptions) {\n\t\tif (!ChangeSet.isEmptyChangeSet(in_changeSet)) {\n\t\t\tif (!_.isArray(in_changeSet)) {\n\t\t\t\tin_changeSet = in_changeSet.value;\n\t\t\t}\n\t\t\tConsoleUtils.assert(\n\t\t\t\t_.isArray(in_changeSet) && in_changeSet.length === 2,\n\t\t\t\tMSG.INVALID_INT64_CHANGESET,\n\t\t\t);\n\t\t\tvar newVal = new this.DataConstructor(in_changeSet[0], in_changeSet[1]);\n\t\t\tthis._setValue(newVal, in_reportToView);\n\t\t}\n\t}\n\n\t/**\n\t * Serialize the property\n\t *\n\t * @param {boolean} in_dirtyOnly -\n\t * Only include dirty entries in the serialization\n\t * @param {boolean} in_includeRootTypeid -\n\t * Include the typeid of the root of the hierarchy - has no effect for value properties\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] -\n\t * The type of dirtiness to use when reporting dirty changes. By default this is `PENDING_CHANGE`.\n\t * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n\t * function will descend into referenced repositories. WARNING: if there are loops in the references\n\t * this can result in an infinite loop\n\t * @return {*} The serialized representation of this property\n\t * @private\n\t */\n\t_serialize(\n\t\tin_dirtyOnly,\n\t\tin_includeRootTypeid,\n\t\tin_dirtinessType,\n\t\tin_includeReferencedRepositories,\n\t) {\n\t\tif (in_dirtyOnly) {\n\t\t\treturn this._isDirty(in_dirtinessType)\n\t\t\t\t? [this._data.getValueLow(), this._data.getValueHigh()]\n\t\t\t\t: {};\n\t\t} else {\n\t\t\treturn [this._data.getValueLow(), this._data.getValueHigh()];\n\t\t}\n\t}\n\n\t/**\n\t * The toString() method returns a string representing the specified Integer64 object.\n\t *\n\t * @param {number} [in_radix = 10] - An integer between 2 and 36 specifying\n\t * the base to use for representing numeric values.\n\t * @return {string} A string representing the specified Integer64 object.\n\t */\n\ttoString(in_radix) {\n\t\treturn this._data.toString(in_radix);\n\t}\n\n\t/**\n\t * The Integer64.fromString() method parses a string argument updates object's lower and higher 32 bit integer parts.\n\t *\n\t * @param {string} in_string - The value to parse. Leading whitespace in the string argument is ignored.\n\t * @param {number} [in_radix = 10] - An integer between 2 and 36 that represents the\n\t * radix (the base in mathematical numeral systems) of the above mentioned string.\n\t * @throws if in_string is not a string\n\t * @throws if in_radix is entered but is not a number between 2 and 36\n\t * @throws if the property is a Uint64 property and in_string is a negative number\n\t * @throws if in_string contains characters other than numbers\n\t */\n\tfromString(in_string, in_radix) {\n\t\tConsoleUtils.assert(_.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);\n\t\tvar int = this._castFunctor(in_string, in_radix);\n\n\t\tthis.setValueHigh(int.getValueHigh());\n\t\tthis.setValueLow(int.getValueLow());\n\t}\n}\n\n/**\n * A primitive property class for big signed integer values.\n */\nexport class Int64Property extends Integer64Property {\n\t/**\n\t * @param {Object=} in_params - the parameters\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.Integer64Property\n\t * @alias property-properties.Int64Property\n\t * @category Value Properties\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params, Int64);\n\t}\n}\nInt64Property.prototype._typeid = \"Int64\";\nInt64Property.prototype._castFunctor = _castFunctors.Int64;\n\n/**\n * A primitive property class for big unsingned integer values.\n */\nexport class Uint64Property extends Integer64Property {\n\t/**\n\t * @param {Object=} in_params - the parameters\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.Integer64Property\n\t * @alias property-properties.Uint64Property\n\t * @category Value Properties\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params, Uint64);\n\t}\n}\nUint64Property.prototype._typeid = \"Uint64\";\nUint64Property.prototype._castFunctor = _castFunctors.Uint64;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"lazyLoadedProperties.js","sourceRoot":"","sources":["../../src/properties/lazyLoadedProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;;;;GAKG;;;AAEU,QAAA,oBAAoB,GAAG;IAChC,eAAe,EAAE,SAAS;IAC1B,gCAAgC,EAAE,SAAS;IAC3C,aAAa,EAAE,SAAS;IACxB,iBAAiB,EAAE,SAAS;IAC5B,iBAAiB,EAAE,SAAS;IAC5B,cAAc,EAAE,SAAS;IACzB,aAAa,EAAE,SAAS;IACxB,gBAAgB,EAAE,SAAS;IAC3B,oBAAoB,EAAE,SAAS;IAC/B,YAAY,EAAE,SAAS;IACvB,6BAA6B,EAAE,SAAS;CAC3C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview This namespace is used to resolve cycles between the PropertyFactory and the property objects.\n * It will return an empty namespace, which then once the PropertyFactory has been created will be initialized with the\n * PropertyFactory and the property classes, so that the PropertyObjects themselves can access the PropertyFactory at\n * runtime.\n */\n\nexport const LazyLoadedProperties = {\n PropertyFactory: undefined,\n AbstractStaticCollectionProperty: undefined,\n ArrayProperty: undefined,\n EnumArrayProperty: undefined,\n ReferenceProperty: undefined,\n StringProperty: undefined,\n ValueProperty: undefined,\n ValueMapProperty: undefined,\n ReferenceMapProperty: undefined,\n NodeProperty: undefined,\n IndexedCollectionBaseProperty: undefined,\n};\n"]}
1
+ {"version":3,"file":"lazyLoadedProperties.js","sourceRoot":"","sources":["../../src/properties/lazyLoadedProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;;;;GAKG;;;AAEU,QAAA,oBAAoB,GAAG;IACnC,eAAe,EAAE,SAAS;IAC1B,gCAAgC,EAAE,SAAS;IAC3C,aAAa,EAAE,SAAS;IACxB,iBAAiB,EAAE,SAAS;IAC5B,iBAAiB,EAAE,SAAS;IAC5B,cAAc,EAAE,SAAS;IACzB,aAAa,EAAE,SAAS;IACxB,gBAAgB,EAAE,SAAS;IAC3B,oBAAoB,EAAE,SAAS;IAC/B,YAAY,EAAE,SAAS;IACvB,6BAA6B,EAAE,SAAS;CACxC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview This namespace is used to resolve cycles between the PropertyFactory and the property objects.\n * It will return an empty namespace, which then once the PropertyFactory has been created will be initialized with the\n * PropertyFactory and the property classes, so that the PropertyObjects themselves can access the PropertyFactory at\n * runtime.\n */\n\nexport const LazyLoadedProperties = {\n\tPropertyFactory: undefined,\n\tAbstractStaticCollectionProperty: undefined,\n\tArrayProperty: undefined,\n\tEnumArrayProperty: undefined,\n\tReferenceProperty: undefined,\n\tStringProperty: undefined,\n\tValueProperty: undefined,\n\tValueMapProperty: undefined,\n\tReferenceMapProperty: undefined,\n\tNodeProperty: undefined,\n\tIndexedCollectionBaseProperty: undefined,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mapProperty.d.ts","sourceRoot":"","sources":["../../src/properties/mapProperty.js"],"names":[],"mappings":"AAmBA;;;;;GAKG;AAEH;;GAEG;AACH;IACI;;;;;;;;OAQG;IACH,wBAQC;IALG,eAAsB;IACtB,qBAA2D;IAE3D,6CAA6C;IAC7C,qBAA0B;IAyB9B;;;;;;;;;OASG;IACH,2BAsCC;IAoGD;;;;;;;;;;;;OAYG;IACH,eAPW,MAAM,0BAsBhB;IAED;;;;;;OAMG;IACH,eAJW,MAAM,OAQhB;IAED;;;;;;;;;;OAUG;IACH,YANW,MAAM,0BAwBhB;IAgFD;;;;;;;OAOG;IACH,cAHY,eAAe,CAK1B;IA0BD;;OAEG;IACH,cAKC;CACJ"}
1
+ {"version":3,"file":"mapProperty.d.ts","sourceRoot":"","sources":["../../src/properties/mapProperty.js"],"names":[],"mappings":"AAmBA;;;;;GAKG;AAEH;;GAEG;AACH;IACC;;;;;;;;OAQG;IACH,wBAQC;IALA,eAAsB;IACtB,qBAA2D;IAE3D,6CAA6C;IAC7C,qBAA0B;IAyB3B;;;;;;;;;OASG;IACH,2BAyDC;IAqGD;;;;;;;;;;;;OAYG;IACH,eAPW,MAAM,0BAsBhB;IAED;;;;;;OAMG;IACH,eAJW,MAAM,OAQhB;IAED;;;;;;;;;;OAUG;IACH,YANW,MAAM,0BAwBhB;IAiFD;;;;;;;OAOG;IACH,cAHY,eAAe,CAK1B;IA0BD;;OAEG;IACH,cAKC;CACD"}