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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/containerSerializer.d.ts.map +1 -1
  2. package/dist/containerSerializer.js +4 -10
  3. package/dist/containerSerializer.js.map +1 -1
  4. package/dist/enableValidations.d.ts.map +1 -1
  5. package/dist/enableValidations.js +1 -1
  6. package/dist/enableValidations.js.map +1 -1
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
  11. package/dist/properties/abstractStaticCollectionProperty.js +1 -28
  12. package/dist/properties/abstractStaticCollectionProperty.js.map +1 -1
  13. package/dist/properties/arrayProperty.d.ts.map +1 -1
  14. package/dist/properties/arrayProperty.js +26 -85
  15. package/dist/properties/arrayProperty.js.map +1 -1
  16. package/dist/properties/baseProperty.d.ts.map +1 -1
  17. package/dist/properties/baseProperty.js +9 -71
  18. package/dist/properties/baseProperty.js.map +1 -1
  19. package/dist/properties/boolProperty.d.ts.map +1 -1
  20. package/dist/properties/boolProperty.js +0 -1
  21. package/dist/properties/boolProperty.js.map +1 -1
  22. package/dist/properties/containerProperty.d.ts.map +1 -1
  23. package/dist/properties/containerProperty.js +4 -22
  24. package/dist/properties/containerProperty.js.map +1 -1
  25. package/dist/properties/enumArrayProperty.d.ts.map +1 -1
  26. package/dist/properties/enumArrayProperty.js +2 -14
  27. package/dist/properties/enumArrayProperty.js.map +1 -1
  28. package/dist/properties/enumProperty.d.ts.map +1 -1
  29. package/dist/properties/enumProperty.js +3 -10
  30. package/dist/properties/enumProperty.js.map +1 -1
  31. package/dist/properties/floatProperties.js +0 -2
  32. package/dist/properties/floatProperties.js.map +1 -1
  33. package/dist/properties/index.d.ts +7 -38
  34. package/dist/properties/index.d.ts.map +1 -1
  35. package/dist/properties/index.js +37 -68
  36. package/dist/properties/index.js.map +1 -1
  37. package/dist/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
  38. package/dist/properties/indexedCollectionBaseProperty.js +6 -18
  39. package/dist/properties/indexedCollectionBaseProperty.js.map +1 -1
  40. package/dist/properties/intProperties.d.ts.map +1 -1
  41. package/dist/properties/intProperties.js +3 -20
  42. package/dist/properties/intProperties.js.map +1 -1
  43. package/dist/properties/lazyLoadedProperties.js.map +1 -1
  44. package/dist/properties/mapProperty.d.ts.map +1 -1
  45. package/dist/properties/mapProperty.js +4 -23
  46. package/dist/properties/mapProperty.js.map +1 -1
  47. package/dist/properties/namedNodeProperty.d.ts.map +1 -1
  48. package/dist/properties/namedNodeProperty.js.map +1 -1
  49. package/dist/properties/namedProperty.d.ts.map +1 -1
  50. package/dist/properties/namedProperty.js +0 -3
  51. package/dist/properties/namedProperty.js.map +1 -1
  52. package/dist/properties/nodeProperty.d.ts.map +1 -1
  53. package/dist/properties/nodeProperty.js +0 -3
  54. package/dist/properties/nodeProperty.js.map +1 -1
  55. package/dist/properties/primitiveTypeCasts.d.ts.map +1 -1
  56. package/dist/properties/primitiveTypeCasts.js +2 -2
  57. package/dist/properties/primitiveTypeCasts.js.map +1 -1
  58. package/dist/properties/referenceArrayProperty.d.ts.map +1 -1
  59. package/dist/properties/referenceArrayProperty.js +3 -16
  60. package/dist/properties/referenceArrayProperty.js.map +1 -1
  61. package/dist/properties/referenceMapProperty.d.ts.map +1 -1
  62. package/dist/properties/referenceMapProperty.js +3 -13
  63. package/dist/properties/referenceMapProperty.js.map +1 -1
  64. package/dist/properties/referenceProperty.d.ts.map +1 -1
  65. package/dist/properties/referenceProperty.js +4 -12
  66. package/dist/properties/referenceProperty.js.map +1 -1
  67. package/dist/properties/setProperty.d.ts.map +1 -1
  68. package/dist/properties/setProperty.js +3 -22
  69. package/dist/properties/setProperty.js.map +1 -1
  70. package/dist/properties/stringProperty.d.ts.map +1 -1
  71. package/dist/properties/stringProperty.js +12 -48
  72. package/dist/properties/stringProperty.js.map +1 -1
  73. package/dist/properties/uintProperties.js +0 -3
  74. package/dist/properties/uintProperties.js.map +1 -1
  75. package/dist/properties/valueArrayProperty.d.ts.map +1 -1
  76. package/dist/properties/valueArrayProperty.js +3 -45
  77. package/dist/properties/valueArrayProperty.js.map +1 -1
  78. package/dist/properties/valueMapProperty.d.ts.map +1 -1
  79. package/dist/properties/valueMapProperty.js +4 -29
  80. package/dist/properties/valueMapProperty.js.map +1 -1
  81. package/dist/properties/valueProperty.d.ts.map +1 -1
  82. package/dist/properties/valueProperty.js +2 -14
  83. package/dist/properties/valueProperty.js.map +1 -1
  84. package/dist/propertyFactory.d.ts.map +1 -1
  85. package/dist/propertyFactory.js +35 -72
  86. package/dist/propertyFactory.js.map +1 -1
  87. package/dist/propertyTemplate.d.ts.map +1 -1
  88. package/dist/propertyTemplate.js +0 -14
  89. package/dist/propertyTemplate.js.map +1 -1
  90. package/dist/propertyTemplateWrapper.d.ts.map +1 -1
  91. package/dist/propertyTemplateWrapper.js +4 -12
  92. package/dist/propertyTemplateWrapper.js.map +1 -1
  93. package/dist/propertyUtils.d.ts.map +1 -1
  94. package/dist/propertyUtils.js.map +1 -1
  95. package/dist/test/properties/arrayProperty.spec.js +82 -82
  96. package/dist/test/properties/arrayProperty.spec.js.map +1 -1
  97. package/dist/test/properties/baseProperty.spec.js +53 -53
  98. package/dist/test/properties/baseProperty.spec.js.map +1 -1
  99. package/dist/test/properties/containerProperty.spec.js +25 -25
  100. package/dist/test/properties/containerProperty.spec.js.map +1 -1
  101. package/dist/test/properties/customArrayProperty.spec.js +35 -35
  102. package/dist/test/properties/customArrayProperty.spec.js.map +1 -1
  103. package/dist/test/properties/enumArrayProperty.spec.js +6 -6
  104. package/dist/test/properties/enumArrayProperty.spec.js.map +1 -1
  105. package/dist/test/properties/enumProperty.spec.js +26 -26
  106. package/dist/test/properties/enumProperty.spec.js.map +1 -1
  107. package/dist/test/properties/float32.spec.js.map +1 -1
  108. package/dist/test/properties/int64ArrayProperty.spec.js +22 -22
  109. package/dist/test/properties/int64ArrayProperty.spec.js.map +1 -1
  110. package/dist/test/properties/int64MapProperty.spec.js +28 -28
  111. package/dist/test/properties/int64MapProperty.spec.js.map +1 -1
  112. package/dist/test/properties/int64Property.spec.js +11 -11
  113. package/dist/test/properties/int64Property.spec.js.map +1 -1
  114. package/dist/test/properties/isLeafNode.spec.js +25 -25
  115. package/dist/test/properties/isLeafNode.spec.js.map +1 -1
  116. package/dist/test/properties/mapProperty.spec.js +110 -110
  117. package/dist/test/properties/mapProperty.spec.js.map +1 -1
  118. package/dist/test/properties/namedNodeProperty.spec.js +5 -5
  119. package/dist/test/properties/namedNodeProperty.spec.js.map +1 -1
  120. package/dist/test/properties/nodeProperty.spec.js +160 -160
  121. package/dist/test/properties/nodeProperty.spec.js.map +1 -1
  122. package/dist/test/properties/referenceProperty.spec.js +21 -21
  123. package/dist/test/properties/referenceProperty.spec.js.map +1 -1
  124. package/dist/test/properties/relationshipProperty.spec.js +4 -4
  125. package/dist/test/properties/relationshipProperty.spec.js.map +1 -1
  126. package/dist/test/properties/setProperty.spec.js +32 -32
  127. package/dist/test/properties/setProperty.spec.js.map +1 -1
  128. package/dist/test/properties/stringProperty.spec.js +38 -38
  129. package/dist/test/properties/stringProperty.spec.js.map +1 -1
  130. package/dist/test/properties/uint64Property.spec.js +3 -3
  131. package/dist/test/properties/uint64Property.spec.js.map +1 -1
  132. package/dist/test/properties/valueMapProperty.spec.js +28 -28
  133. package/dist/test/properties/valueMapProperty.spec.js.map +1 -1
  134. package/dist/test/properties/valueProperty.spec.js +7 -7
  135. package/dist/test/properties/valueProperty.spec.js.map +1 -1
  136. package/dist/test/propertyFactory.spec.js +559 -560
  137. package/dist/test/propertyFactory.spec.js.map +1 -1
  138. package/dist/test/propertyTemplateWrapper.spec.js +38 -38
  139. package/dist/test/propertyTemplateWrapper.spec.js.map +1 -1
  140. package/dist/test/propertyUtils.spec.js +5 -5
  141. package/dist/test/propertyUtils.spec.js.map +1 -1
  142. package/dist/test/reversibleChangeset.spec.js +266 -266
  143. package/dist/test/reversibleChangeset.spec.js.map +1 -1
  144. package/dist/test/setup.js.map +1 -1
  145. package/dist/test/tsconfig.tsbuildinfo +145 -145
  146. package/dist/test/utils.spec.js +508 -517
  147. package/dist/test/utils.spec.js.map +1 -1
  148. package/dist/test/validation/badMissingSemverInTypeid.js +9 -9
  149. package/dist/test/validation/badMissingSemverInTypeid.js.map +1 -1
  150. package/dist/test/validation/badPrimitiveTypeid.js +5 -5
  151. package/dist/test/validation/badPrimitiveTypeid.js.map +1 -1
  152. package/dist/test/validation/goodColorId.js +42 -42
  153. package/dist/test/validation/goodColorId.js.map +1 -1
  154. package/dist/test/validation/goodColorPalette.js +2 -2
  155. package/dist/test/validation/goodColorPalette.js.map +1 -1
  156. package/dist/test/validation/goodPointId.js +9 -9
  157. package/dist/test/validation/goodPointId.js.map +1 -1
  158. package/dist/test/validation/reversibleChangeSetTestData.js +1 -1
  159. package/dist/test/validation/reversibleChangeSetTestData.js.map +1 -1
  160. package/lib/containerSerializer.js +4 -10
  161. package/lib/containerSerializer.js.map +1 -1
  162. package/lib/enableValidations.js +1 -1
  163. package/lib/enableValidations.js.map +1 -1
  164. package/lib/index.js +1 -1
  165. package/lib/index.js.map +1 -1
  166. package/lib/properties/abstractStaticCollectionProperty.js +1 -28
  167. package/lib/properties/abstractStaticCollectionProperty.js.map +1 -1
  168. package/lib/properties/arrayProperty.js +26 -85
  169. package/lib/properties/arrayProperty.js.map +1 -1
  170. package/lib/properties/baseProperty.js +7 -69
  171. package/lib/properties/baseProperty.js.map +1 -1
  172. package/lib/properties/boolProperty.js +0 -1
  173. package/lib/properties/boolProperty.js.map +1 -1
  174. package/lib/properties/containerProperty.js +4 -22
  175. package/lib/properties/containerProperty.js.map +1 -1
  176. package/lib/properties/enumArrayProperty.js +2 -14
  177. package/lib/properties/enumArrayProperty.js.map +1 -1
  178. package/lib/properties/enumProperty.js +3 -10
  179. package/lib/properties/enumProperty.js.map +1 -1
  180. package/lib/properties/floatProperties.js +0 -2
  181. package/lib/properties/floatProperties.js.map +1 -1
  182. package/lib/properties/index.js +7 -38
  183. package/lib/properties/index.js.map +1 -1
  184. package/lib/properties/indexedCollectionBaseProperty.js +6 -18
  185. package/lib/properties/indexedCollectionBaseProperty.js.map +1 -1
  186. package/lib/properties/intProperties.js +3 -20
  187. package/lib/properties/intProperties.js.map +1 -1
  188. package/lib/properties/lazyLoadedProperties.js.map +1 -1
  189. package/lib/properties/mapProperty.js +4 -23
  190. package/lib/properties/mapProperty.js.map +1 -1
  191. package/lib/properties/namedNodeProperty.js.map +1 -1
  192. package/lib/properties/namedProperty.js +0 -3
  193. package/lib/properties/namedProperty.js.map +1 -1
  194. package/lib/properties/nodeProperty.js +0 -3
  195. package/lib/properties/nodeProperty.js.map +1 -1
  196. package/lib/properties/primitiveTypeCasts.js +2 -2
  197. package/lib/properties/primitiveTypeCasts.js.map +1 -1
  198. package/lib/properties/referenceArrayProperty.js +3 -16
  199. package/lib/properties/referenceArrayProperty.js.map +1 -1
  200. package/lib/properties/referenceMapProperty.js +3 -13
  201. package/lib/properties/referenceMapProperty.js.map +1 -1
  202. package/lib/properties/referenceProperty.js +4 -12
  203. package/lib/properties/referenceProperty.js.map +1 -1
  204. package/lib/properties/setProperty.js +3 -22
  205. package/lib/properties/setProperty.js.map +1 -1
  206. package/lib/properties/stringProperty.js +12 -48
  207. package/lib/properties/stringProperty.js.map +1 -1
  208. package/lib/properties/uintProperties.js +0 -3
  209. package/lib/properties/uintProperties.js.map +1 -1
  210. package/lib/properties/valueArrayProperty.js +3 -45
  211. package/lib/properties/valueArrayProperty.js.map +1 -1
  212. package/lib/properties/valueMapProperty.js +4 -29
  213. package/lib/properties/valueMapProperty.js.map +1 -1
  214. package/lib/properties/valueProperty.js +2 -14
  215. package/lib/properties/valueProperty.js.map +1 -1
  216. package/lib/propertyFactory.js +35 -72
  217. package/lib/propertyFactory.js.map +1 -1
  218. package/lib/propertyTemplate.js +0 -14
  219. package/lib/propertyTemplate.js.map +1 -1
  220. package/lib/propertyTemplateWrapper.js +4 -12
  221. package/lib/propertyTemplateWrapper.js.map +1 -1
  222. package/lib/propertyUtils.js.map +1 -1
  223. package/package.json +13 -6
@@ -3,17 +3,17 @@
3
3
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
4
  * Licensed under the MIT License.
5
5
  */
6
- /* eslint-disable new-cap*/
6
+ /* eslint-disable new-cap */
7
7
  /**
8
8
  * @fileoverview Definition of the Int*Property classes
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.Uint64Property = exports.Int64Property = exports.Integer64Property = exports.Int32Property = exports.Int16Property = exports.Int8Property = void 0;
12
12
  const _ = require('lodash');
13
+ const { ChangeSet } = require('@fluid-experimental/property-changeset');
14
+ const { ConsoleUtils, constants: { MSG }, Uint64, Int64, } = require('@fluid-experimental/property-common');
13
15
  const { ValueProperty } = require('./valueProperty');
14
16
  const { _castFunctors } = require('./primitiveTypeCasts');
15
- const { ChangeSet } = require('@fluid-experimental/property-changeset');
16
- const { ConsoleUtils, constants: { MSG }, Uint64, Int64 } = require('@fluid-experimental/property-common');
17
17
  const BIT32 = 4294967296;
18
18
  class Int8Property extends ValueProperty {
19
19
  /**
@@ -30,7 +30,6 @@ class Int8Property extends ValueProperty {
30
30
  // default for this property type is '0'
31
31
  this._data = 0;
32
32
  }
33
- ;
34
33
  }
35
34
  exports.Int8Property = Int8Property;
36
35
  Int8Property.prototype._typeid = 'Int8';
@@ -52,7 +51,6 @@ class Int16Property extends ValueProperty {
52
51
  // default for this property type is '0'
53
52
  this._data = 0;
54
53
  }
55
- ;
56
54
  }
57
55
  exports.Int16Property = Int16Property;
58
56
  Int16Property.prototype._typeid = 'Int16';
@@ -74,7 +72,6 @@ class Int32Property extends ValueProperty {
74
72
  // default for this property type is '0'
75
73
  this._data = 0;
76
74
  }
77
- ;
78
75
  }
79
76
  exports.Int32Property = Int32Property;
80
77
  Int32Property.prototype._typeid = 'Int32';
@@ -99,7 +96,6 @@ class Integer64Property extends ValueProperty {
99
96
  // default for this property type is '0, 0'
100
97
  this._data = new this.DataConstructor();
101
98
  }
102
- ;
103
99
  /**
104
100
  * Internal function to update the value of the Integer64Property
105
101
  *
@@ -123,21 +119,18 @@ class Integer64Property extends ValueProperty {
123
119
  }
124
120
  return changed;
125
121
  }
126
- ;
127
122
  /**
128
123
  * @return {number} the higher 32 bit integer part
129
124
  */
130
125
  getValueHigh() {
131
126
  return this._data.getValueHigh();
132
127
  }
133
- ;
134
128
  /**
135
129
  * @return {number} the lower 32 bit integer part
136
130
  */
137
131
  getValueLow() {
138
132
  return this._data.getValueLow();
139
133
  }
140
- ;
141
134
  /**
142
135
  * @param {number} in_high set the higher 32 bit integer part
143
136
  * @throws if in_high is not a number
@@ -153,7 +146,6 @@ class Integer64Property extends ValueProperty {
153
146
  }
154
147
  return changed;
155
148
  }
156
- ;
157
149
  /**
158
150
  * @param {number} in_low set the lower 32 bit integer part
159
151
  * @throws if in_low is not a number
@@ -169,7 +161,6 @@ class Integer64Property extends ValueProperty {
169
161
  }
170
162
  return changed;
171
163
  }
172
- ;
173
164
  /**
174
165
  * @inheritdoc
175
166
  */
@@ -184,7 +175,6 @@ class Integer64Property extends ValueProperty {
184
175
  return changed ? this.serialize() : undefined;
185
176
  }
186
177
  }
187
- ;
188
178
  /**
189
179
  * @inheritdoc
190
180
  */
@@ -198,7 +188,6 @@ class Integer64Property extends ValueProperty {
198
188
  this._setValue(newVal, in_reportToView);
199
189
  }
200
190
  }
201
- ;
202
191
  /**
203
192
  * Serialize the property
204
193
  *
@@ -228,7 +217,6 @@ class Integer64Property extends ValueProperty {
228
217
  return [this._data.getValueLow(), this._data.getValueHigh()];
229
218
  }
230
219
  }
231
- ;
232
220
  /**
233
221
  * The toString() method returns a string representing the specified Integer64 object.
234
222
  *
@@ -239,7 +227,6 @@ class Integer64Property extends ValueProperty {
239
227
  toString(in_radix) {
240
228
  return this._data.toString(in_radix);
241
229
  }
242
- ;
243
230
  /**
244
231
  * The Integer64.fromString() method parses a string argument updates object's lower and higher 32 bit integer parts.
245
232
  *
@@ -257,7 +244,6 @@ class Integer64Property extends ValueProperty {
257
244
  this.setValueHigh(int.getValueHigh());
258
245
  this.setValueLow(int.getValueLow());
259
246
  }
260
- ;
261
247
  }
262
248
  exports.Integer64Property = Integer64Property;
263
249
  /**
@@ -275,7 +261,6 @@ class Int64Property extends Integer64Property {
275
261
  constructor(in_params) {
276
262
  super(in_params, Int64);
277
263
  }
278
- ;
279
264
  }
280
265
  exports.Int64Property = Int64Property;
281
266
  Int64Property.prototype._typeid = 'Int64';
@@ -295,10 +280,8 @@ class Uint64Property extends Integer64Property {
295
280
  constructor(in_params) {
296
281
  super(in_params, Uint64);
297
282
  }
298
- ;
299
283
  }
300
284
  exports.Uint64Property = Uint64Property;
301
- ;
302
285
  Uint64Property.prototype._typeid = 'Uint64';
303
286
  Uint64Property.prototype._castFunctor = _castFunctors.Uint64;
304
287
  //# sourceMappingURL=intProperties.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"intProperties.js","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH,2BAA2B;AAC3B;;GAEG;;;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC1D,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACxE,MAAM,EACF,YAAY,EACZ,SAAS,EAAE,EAAE,GAAG,EAAE,EAClB,MAAM,EACN,KAAK,EACR,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AAEnD,MAAM,KAAK,GAAG,UAAU,CAAC;AAEzB,MAAa,YAAa,SAAQ,a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;OAUG;IACH,UAAU,CAAC,SAAS,EAAE,QAAQ;QAC1B,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,wBAAwB,GAAG,SAAS,CAAC,CAAC;QACrF,IAAI,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEjD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;QACtC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;IACxC,CAAC;IAAA,CAAC;CAEL;AAzLD,8CAyLC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,iBAAiB;IAChD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAAA,CAAC;CACL;AAZD,sCAYC;AACD,aAAa,CAAC,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1C,aAAa,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC;AAE3D;;GAEG;AACH,MAAa,cAAe,SAAQ,iBAAiB;IACjD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC7B,CAAC;IAAA,CAAC;CACL;AAZD,wCAYC;AAAA,CAAC;AACF,cAAc,CAAC,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;AAC5C,cAAc,CAAC,SAAS,CAAC,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/* eslint-disable new-cap*/\n/**\n * @fileoverview Definition of the Int*Property classes\n */\n\nconst _ = require('lodash');\nconst { ValueProperty } = require('./valueProperty');\nconst { _castFunctors } = require('./primitiveTypeCasts');\nconst { ChangeSet } = require('@fluid-experimental/property-changeset');\nconst {\n ConsoleUtils,\n constants: { MSG },\n Uint64,\n Int64\n} = require('@fluid-experimental/property-common');\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 };\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 };\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 * @protected\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 /**\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\n * 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 {boolen} 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 {boolen} 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\n * PENDING_CHANGE * @return {*} The serialized representation of this property\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 if (this._isDirty(in_dirtinessType)) {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n } else {\n return {};\n }\n } else {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n }\n };\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/**\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;AACH,4BAA4B;AAC5B;;GAEG;;;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACxE,MAAM,EACF,YAAY,EACZ,SAAS,EAAE,EAAE,GAAG,EAAE,EAClB,MAAM,EACN,KAAK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I,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;;;;OAUG;IACH,UAAU,CAAC,SAAS,EAAE,QAAQ;QAC1B,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,wBAAwB,GAAG,SAAS,CAAC,CAAC;QACrF,IAAI,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEjD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;QACtC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;IACxC,CAAC;CACJ;AArLD,8CAqLC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,iBAAiB;IAChD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACJ;AAZD,sCAYC;AACD,aAAa,CAAC,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1C,aAAa,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC;AAE3D;;GAEG;AACH,MAAa,cAAe,SAAQ,iBAAiB;IACjD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC7B,CAAC;CACJ;AAZD,wCAYC;AACD,cAAc,CAAC,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;AAC5C,cAAc,CAAC,SAAS,CAAC,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/* eslint-disable new-cap */\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 * @protected\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\n * 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 {boolen} 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 {boolen} 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\n * PENDING_CHANGE * @return {*} The serialized representation of this property\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 if (this._isDirty(in_dirtinessType)) {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n } else {\n return {};\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 +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\n * be initialized with the PropertyFactory and the property classes, so that the PropertyObjects\n * themselves can access the PropertyFactory at 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\n"]}
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\n * be initialized with the PropertyFactory and the property classes, so that the PropertyObjects\n * themselves can access the PropertyFactory at 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 +1 @@
1
- {"version":3,"file":"mapProperty.d.ts","sourceRoot":"","sources":["../../src/properties/mapProperty.js"],"names":[],"mappings":"AAmBA;;;;;GAKG;AAEH;;GAEG;AACH;IAEI;;;;;;;;OAQG;IACH,wBAQC;IALG,eAAsB;IACtB,qBAA2D;IAE3D,6CAA6C;IAC7C,qBAA0B;IA2B9B;;;;;;;;OAQG;IACH,2BAsCC;IA+FD;;;;;;;;;;;;OAYG;IACH,eAPW,MAAM,0BAuBhB;IAED;;;;;;OAMG;IACH,eAJW,MAAM,OAQhB;IAED;;;;;;;;;;OAUG;IACH,YANW,MAAM,0BAwBhB;IAwED;;;;;;;OAOG;IACH,cAHY,UAAe,CAK1B;IA8BD;;OAEG;IACH,cAKC;CAEJ"}
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;IA2B9B;;;;;;;;OAQG;IACH,2BAsCC;IA+FD;;;;;;;;;;;;OAYG;IACH,eAPW,MAAM,0BAsBhB;IAED;;;;;;OAMG;IACH,eAJW,MAAM,OAQhB;IAED;;;;;;;;;;OAUG;IACH,YANW,MAAM,0BAwBhB;IAwED;;;;;;;OAOG;IACH,cAHY,UAAe,CAK1B;IA8BD;;OAEG;IACH,cAKC;CACJ"}
@@ -8,13 +8,13 @@ exports.MapProperty = void 0;
8
8
  /**
9
9
  * @fileoverview Definition of the map property class
10
10
  */
11
+ const { PathHelper, TypeIdHelper } = require('@fluid-experimental/property-changeset');
12
+ const { MSG } = require('@fluid-experimental/property-common').constants;
13
+ const { ConsoleUtils } = require('@fluid-experimental/property-common');
11
14
  const _ = require('lodash');
12
- const { BaseProperty } = require('./baseProperty');
13
15
  const { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');
16
+ const { BaseProperty } = require('./baseProperty');
14
17
  const { IndexedCollectionBaseProperty } = require('./indexedCollectionBaseProperty');
15
- const { ConsoleUtils } = require('@fluid-experimental/property-common');
16
- const { PathHelper, TypeIdHelper } = require('@fluid-experimental/property-changeset');
17
- const { MSG } = require('@fluid-experimental/property-common').constants;
18
18
  const { LazyLoadedProperties: Property } = require('./lazyLoadedProperties');
19
19
  const PATH_TOKENS = BaseProperty.PATH_TOKENS;
20
20
  /**
@@ -43,7 +43,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
43
43
  /** Contains the actual entries of the map */
44
44
  this._dynamicChildren = {};
45
45
  }
46
- ;
47
46
  /**
48
47
  * Returns the full property type identifier for the ChangeSet including the enum type id
49
48
  * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted
@@ -57,7 +56,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
57
56
  return TypeIdHelper.createSerializationTypeId(this._typeid, 'map');
58
57
  }
59
58
  }
60
- ;
61
59
  /**
62
60
  * Is this property a leaf node with regard to flattening?
63
61
  *
@@ -68,7 +66,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
68
66
  _isFlattenLeaf() {
69
67
  return true;
70
68
  }
71
- ;
72
69
  /**
73
70
  * Sets multiple values in a map.
74
71
  *
@@ -120,7 +117,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
120
117
  });
121
118
  }
122
119
  }
123
- ;
124
120
  /**
125
121
  * Sets multiple values in a map.
126
122
  *
@@ -137,7 +133,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
137
133
  }
138
134
  this._setValuesInternal(in_values, in_typed);
139
135
  }
140
- ;
141
136
  /**
142
137
  * Sets multiple values in a map.
143
138
  *
@@ -157,7 +152,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
157
152
  this._setValues(in_values, false, false);
158
153
  }
159
154
  }
160
- ;
161
155
  /**
162
156
  * Returns an object with all the nested values contained in this property
163
157
  * @return {object} an object representing the values of your property
@@ -184,7 +178,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
184
178
  }
185
179
  return result;
186
180
  }
187
- ;
188
181
  /**
189
182
  * Returns the path segment for a child
190
183
  *
@@ -196,7 +189,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
196
189
  _getPathSegmentForChildNode(in_childNode) {
197
190
  return '[' + PathHelper.quotePathSegmentIfNeeded(in_childNode._id) + ']';
198
191
  }
199
- ;
200
192
  /**
201
193
  * Resolves a direct child node based on the given path segment
202
194
  *
@@ -215,7 +207,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
215
207
  return AbstractStaticCollectionProperty.prototype._resolvePathSegment.call(this, in_segment, in_segmentType);
216
208
  }
217
209
  }
218
- ;
219
210
  /**
220
211
  * Inserts a property or value into the map
221
212
  *
@@ -245,7 +236,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
245
236
  throw new Error(MSG.NONVALUE_MAP_INSERT_PROP);
246
237
  }
247
238
  }
248
- ;
249
239
  /**
250
240
  * Removes the entry with the given key from the map
251
241
  *
@@ -258,7 +248,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
258
248
  this._removeByKey(in_key, true);
259
249
  return item;
260
250
  }
261
- ;
262
251
  /**
263
252
  * Sets the entry with the given key to the property passed in
264
253
  *
@@ -288,7 +277,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
288
277
  this._reportDirtinessToView();
289
278
  }
290
279
  }
291
- ;
292
280
  /**
293
281
  * Returns an Object with all the entries of the map.
294
282
  * Contrary ot .getValues, for Property Maps, this will return the Property, not an object with their nested values.
@@ -301,7 +289,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
301
289
  getEntriesReadOnly() {
302
290
  return this._dynamicChildren;
303
291
  }
304
- ;
305
292
  /**
306
293
  * Returns the collection entry with the given key
307
294
  *
@@ -349,7 +336,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
349
336
  return prop;
350
337
  }
351
338
  }
352
- ;
353
339
  /**
354
340
  * Checks whether an entry with the given name exists
355
341
  *
@@ -359,7 +345,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
359
345
  has(in_id) {
360
346
  return this._dynamicChildren[in_id] !== undefined;
361
347
  }
362
- ;
363
348
  /**
364
349
  * Returns all entries of the map as an array.
365
350
  *
@@ -371,7 +356,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
371
356
  getAsArray() {
372
357
  return _.values(this._dynamicChildren);
373
358
  }
374
- ;
375
359
  /**
376
360
  * Returns all keys found in the map
377
361
  *
@@ -382,7 +366,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
382
366
  getIds() {
383
367
  return Object.keys(this._dynamicChildren);
384
368
  }
385
- ;
386
369
  /**
387
370
  * Get the scope to which this property belongs to.
388
371
  * @return {string|undefined} The guid representing the scope in which the
@@ -399,7 +382,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
399
382
  return this._scope;
400
383
  }
401
384
  }
402
- ;
403
385
  /**
404
386
  * Deletes all values from the Map
405
387
  */
@@ -409,7 +391,6 @@ class MapProperty extends IndexedCollectionBaseProperty {
409
391
  that.remove(id);
410
392
  });
411
393
  }
412
- ;
413
394
  }
414
395
  exports.MapProperty = MapProperty;
415
396
  MapProperty.prototype._typeid = 'BaseProperty';
@@ -1 +1 @@
1
- {"version":3,"file":"mapProperty.js","sourceRoot":"","sources":["../../src/properties/mapProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,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under the MIT License.\n */\n\n/**\n * @fileoverview Definition of the map property class\n */\nconst _ = require('lodash');\nconst { BaseProperty } = require('./baseProperty');\nconst { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');\nconst { IndexedCollectionBaseProperty } = require('./indexedCollectionBaseProperty');\nconst { ConsoleUtils } = require('@fluid-experimental/property-common');\nconst { PathHelper, TypeIdHelper } = require('@fluid-experimental/property-changeset');\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { LazyLoadedProperties: Property } = require('./lazyLoadedProperties');\n\nconst PATH_TOKENS = BaseProperty.PATH_TOKENS;\n\n/**\n * typedef {property-properties.BaseProperty|string|number|boolean} property-properties.MapProperty~MapValueType\n *\n * The type of the values that are set/inserted into the map. Depending on the type of the map, these can either\n * be property objects or primitive values\n */\n\n/**\n * A MapProperty is a collection class that can contain an dictionary that maps from strings to properties.\n */\nexport class MapProperty extends IndexedCollectionBaseProperty {\n\n /**\n * @param {Object} in_params - Input parameters for property creation\n * @param {string|undefined} in_scope - The scope in which the map typeid is defined\n * @constructor\n * @protected\n * @extends property-properties.IndexedCollectionBaseProperty\n * @alias property-properties.MapProperty\n * @category Maps\n */\n constructor(in_params, in_scope) {\n super(in_params);\n\n this._scope = in_scope;\n this._contextKeyType = in_params.contextKeyType || 'string';\n\n /** Contains the actual entries of the map */\n this._dynamicChildren = {};\n };\n\n /**\n * Returns the full property type identifier for the ChangeSet including the enum type id\n * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted\n * @return {string} The typeid\n */\n getFullTypeid(in_hideCollection = false) {\n if (in_hideCollection) {\n return this._typeid;\n } else {\n return TypeIdHelper.createSerializationTypeId(this._typeid, 'map');\n }\n };\n\n /**\n * Is this property a leaf node with regard to flattening?\n *\n * TODO: Which semantics should flattening have? It stops at primitive types and collections?\n *\n * @return {boolean} Is it a leaf with regard to flattening?\n */\n _isFlattenLeaf() {\n return true;\n };\n\n /**\n * Sets multiple values in a map.\n *\n * @param {object} in_values to assign to the collection\n * @param {Boolean} in_typed - If the map's items have a typeid and a value then create the\n * properties with that typeid, else use the set's typeid (support polymorphic items).\n * @see {setValues}\n * @private\n */\n _setValuesInternal(in_values, in_typed) {\n if (this._containsPrimitiveTypes) {\n var that = this;\n _.each(in_values, function (value, key) {\n if (that.has(key)) {\n that.remove(key);\n }\n\n that.insert(key, value);\n });\n } else {\n var that = this;\n _.each(in_values, function (value, key) {\n var property = that.get(String(key), { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n // if key exists in set replace its value else insert a new key/value\n if (property) {\n if (property instanceof Property.ValueProperty || property instanceof Property.StringProperty) {\n property.setValue(value);\n } else if (property instanceof BaseProperty && _.isObject(value)) {\n property._setValues(value, false, false);\n } else {\n throw new Error(MSG.SET_VALUES_PATH_INVALID + key);\n }\n } else {\n if (value instanceof BaseProperty) {\n that.insert(key, value);\n } else {\n if (in_typed) {\n that.insert(key, Property.PropertyFactory._createProperty(\n value.typeid || that._typeid, null, value.value, that._getScope()));\n } else {\n that.insert(key, Property.PropertyFactory._createProperty(\n that._typeid, null, value, that._getScope()));\n }\n }\n }\n });\n }\n };\n\n /**\n * Sets multiple values in a map.\n *\n * @param {object} in_values to assign to the collection\n * @param {Bool} in_typed - Whether the values are typed/polymorphic.\n * @param {Bool} in_initial - Whether we are setting default/initial values\n * or if the function is called directly with the values to set.\n * @see {setValues}\n * @override\n */\n _setValues(in_values, in_typed, in_initial) {\n if (in_initial) {\n this.clear();\n }\n\n this._setValuesInternal(in_values, in_typed);\n };\n\n /**\n * Sets multiple values in a map.\n *\n * @param {object} in_values to assign to the collection\n * @throws if one of the path in in_values does not exist in this property\n * @throws if trying to set a value to a path that leads to a Property other than ValueProperty or StringProperty\n * @override\n */\n setValues(in_values) {\n var checkoutView = this._getCheckoutView();\n if (checkoutView !== undefined) {\n checkoutView.pushNotificationDelayScope();\n this._setValues(in_values, false, false);\n checkoutView.popNotificationDelayScope();\n } else {\n this._setValues(in_values, false, false);\n }\n };\n\n /**\n * Returns an object with all the nested values contained in this property\n * @return {object} an object representing the values of your property\n * for example: {\n 'firstString': {\n 'stringValue': 'test1'\n },\n 'secondString': {\n 'stringValue': 'test2'\n }\n }\n */\n getValues() {\n var ids = this.getIds();\n var result = {};\n for (var i = 0; i < ids.length; i++) {\n var child = this.get(ids[i]);\n if (child.isPrimitiveType()) {\n result[ids[i]] = this.get(ids[i]).getValue();\n } else {\n result[ids[i]] = child.getValues();\n }\n }\n return result;\n };\n\n /**\n * Returns the path segment for a child\n *\n * @param {property-properties.BaseProperty} in_childNode - The child for which the path is returned\n *\n * @return {string} The path segment to resolve the child property under this property\n * @protected\n */\n _getPathSegmentForChildNode(in_childNode) {\n return '[' + PathHelper.quotePathSegmentIfNeeded(in_childNode._id) + ']';\n };\n\n /**\n * Resolves a direct child node based on the given path segment\n *\n * @param {String} in_segment - The path segment to resolve\n * @param {property-properties.PathHelper.TOKEN_TYPES} in_segmentType - The type of segment in the tokenized path\n *\n * @return {property-properties.BaseProperty|undefined} The child property that has been resolved\n * @protected\n */\n _resolvePathSegment(in_segment, in_segmentType) {\n // Base Properties only support paths separated via dots\n if (in_segmentType === PathHelper.TOKEN_TYPES.ARRAY_TOKEN) {\n return this._dynamicChildren[in_segment];\n } else {\n return AbstractStaticCollectionProperty.prototype._resolvePathSegment.call(this, in_segment, in_segmentType);\n }\n };\n\n /**\n * Inserts a property or value into the map\n *\n * Note: This will trigger an exception when this key already exists in the map. If you want to overwrite\n * existing entries you can use the set function.\n *\n * @param {string} in_key - The key under which the entry is added\n * @param {property-properties.Property} in_property - The property to insert\n * @throws if the property already exists\n * @throws if the property already has a parent\n * @throws if in_key is not a string\n * @throws if the property is a root property\n */\n insert(in_key, in_property) {\n ConsoleUtils.assert(_.isString(in_key), MSG.KEY_NOT_STRING + in_key);\n if (this._dynamicChildren[in_key] !== undefined) {\n throw new Error(MSG.PROPERTY_ALREADY_EXISTS + in_key);\n }\n if (in_property instanceof BaseProperty) {\n in_property._validateInsertIn(this);\n // Set the ID of the entry, to make sure it corresponds to the used key\n in_property._setId(in_key);\n\n // Insert the entry into the collection\n this._insert(in_key, in_property, true);\n\n } else {\n throw new Error(MSG.NONVALUE_MAP_INSERT_PROP);\n }\n };\n\n /**\n * Removes the entry with the given key from the map\n *\n * @param {string} in_key - The key of the entry to remove from the map\n * @throws if trying to remove an entry that does not exist\n * @return {*} the item removed\n */\n remove(in_key) {\n var item = this.get(in_key);\n this._removeByKey(in_key, true);\n return item;\n };\n\n /**\n * Sets the entry with the given key to the property passed in\n *\n * Note: this will overwrite an already existing value\n *\n * @param {string} in_key - The key under which the entry is stored\n * @param {property-properties.MapProperty~MapValueType} in_property - The property to store in the map\n * @throws if in_property is not a property\n * @throws if trying to insert a property that has a parent\n * @throws if in_key is not a string or a number\n */\n set(in_key, in_property) {\n this._checkIsNotReadOnly(true);\n if (this._dynamicChildren[in_key] !== in_property) {\n if (this._containsPrimitiveTypes === false && in_property.getParent() !== undefined) {\n throw new Error(MSG.INSERTED_ENTRY_WITH_PARENT);\n }\n if (this._dynamicChildren[in_key] !== undefined) {\n this._removeByKey(in_key, false);\n }\n // Set the ID of the entry, to make sure it corresponds to the used key\n if (this._containsPrimitiveTypes === false) {\n in_property._setId(in_key);\n }\n this._insert(in_key, in_property, false);\n\n // Make one final report\n this._reportDirtinessToView();\n }\n };\n\n /**\n * Returns an Object with all the entries of the map.\n * Contrary ot .getValues, for Property Maps, this will return the Property, not an object with their nested values.\n * WARNING: This is a direct access to the internal data-structure and the collection MUST NOT be modified. It is\n * read only for fast access and iteration. Insertion and deletion MUST be done via the insert and remove functions\n * of this class.\n *\n * @return {Object} The map with all entries in the map.\n */\n getEntriesReadOnly() {\n return this._dynamicChildren;\n };\n\n /**\n * Returns the collection entry with the given key\n *\n * @param {string|array<string>} in_ids - key of the entry to return or an array of keys\n * if an array is passed, the .get function will be performed on each id in sequence\n * for example .get(['position','x']) is equivalent to .get('position').get('x').\n * If .get resolves to a ReferenceProperty, it will return the property that the ReferenceProperty\n * refers to.\n * @param {Object} in_options - parameter object\n * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS]\n * How should this function behave during reference resolution?\n *\n * @return {property-properties.Property|*|undefined} The entry in the collection or undefined\n * if none could be found\n */\n get(in_ids, in_options) {\n if (_.isArray(in_ids)) {\n // Forward handling of arrays to the BaseProperty function\n return AbstractStaticCollectionProperty.prototype.get.call(this, in_ids, in_options);\n } else {\n in_options = in_options || {};\n in_options.referenceResolutionMode =\n in_options.referenceResolutionMode === undefined ? BaseProperty.REFERENCE_RESOLUTION.ALWAYS :\n in_options.referenceResolutionMode;\n\n var prop = this;\n if (in_ids === PATH_TOKENS.ROOT) {\n prop = prop.getRoot();\n } else if (in_ids === PATH_TOKENS.UP) {\n prop = prop.getParent();\n } else if (in_ids === PATH_TOKENS.REF) {\n throw new Error(MSG.NO_GET_DEREFERENCE_ONLY);\n } else {\n prop = prop._dynamicChildren[in_ids];\n }\n\n // Handle automatic reference resolution\n if (in_options.referenceResolutionMode === BaseProperty.REFERENCE_RESOLUTION.ALWAYS) {\n if (prop instanceof Property.ReferenceProperty) {\n prop = prop.ref;\n }\n }\n\n return prop;\n }\n };\n\n /**\n * Checks whether an entry with the given name exists\n *\n * @param {string} in_id - Name of the property\n * @return {boolean} True if the property exists, otherwise false.\n */\n has(in_id) {\n return this._dynamicChildren[in_id] !== undefined;\n };\n\n /**\n * Returns all entries of the map as an array.\n *\n * NOTE: This function creates a copy and thus is less efficient as getEntriesReadOnly.\n *\n * @return {Array.<property-properties.BaseProperty | *>} Array with all entries of the map. This array\n * is a shallow copy which can be modified by the caller without effects on the map.\n */\n getAsArray() {\n return _.values(this._dynamicChildren);\n };\n\n /**\n * Returns all keys found in the map\n *\n * NOTE: This function creates a copy and thus is less efficient as getEntriesReadOnly.\n *\n * @return {Array.<string>} The keys\n */\n getIds() {\n return Object.keys(this._dynamicChildren);\n };\n\n /**\n * Get the scope to which this property belongs to.\n * @return {string|undefined} The guid representing the scope in which the\n * map belongs to. If there is a workspace scope return it, else return the scope of this map.\n * @override\n * @private\n */\n _getScope() {\n var scope = IndexedCollectionBaseProperty.prototype._getScope.call(this);\n\n if (scope !== undefined) {\n return scope;\n } else {\n return this._scope;\n }\n };\n\n /**\n * Deletes all values from the Map\n */\n clear() {\n var that = this;\n this.getIds().forEach(function (id) {\n that.remove(id);\n });\n };\n\n}\n\nMapProperty.prototype._typeid = 'BaseProperty';\nMapProperty.prototype._context = 'map';\n"]}
1
+ {"version":3,"file":"mapProperty.js","sourceRoot":"","sources":["../../src/properties/mapProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACH,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACvF,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACxE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,gCAAgC,EAAE,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAC3F,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,6BAA6B,EAAE,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAAC;AACrF,MAAM,EAAE,oBAAoB,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAE7E,MAAM,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC;AAE7C;;;;;GAKG;AAEH;;GAEG;AACH,MAAa,WAAY,SAAQ,6BAA6B;IAC1D;;;;;;;;OAQG;IACH,YAAY,SAAS,EAAE,QAAQ;QAC3B,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,MAAM,GAAG,QA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,CAAC,CAAC;QACpB,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AA3XD,kCA2XC;AAED,WAAW,CAAC,SAAS,CAAC,OAAO,GAAG,cAAc,CAAC;AAC/C,WAAW,CAAC,SAAS,CAAC,QAAQ,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 Definition of the map property class\n */\nconst { PathHelper, TypeIdHelper } = require('@fluid-experimental/property-changeset');\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { ConsoleUtils } = require('@fluid-experimental/property-common');\nconst _ = require('lodash');\nconst { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');\nconst { BaseProperty } = require('./baseProperty');\nconst { IndexedCollectionBaseProperty } = require('./indexedCollectionBaseProperty');\nconst { LazyLoadedProperties: Property } = require('./lazyLoadedProperties');\n\nconst PATH_TOKENS = BaseProperty.PATH_TOKENS;\n\n/**\n * typedef {property-properties.BaseProperty|string|number|boolean} property-properties.MapProperty~MapValueType\n *\n * The type of the values that are set/inserted into the map. Depending on the type of the map, these can either\n * be property objects or primitive values\n */\n\n/**\n * A MapProperty is a collection class that can contain an dictionary that maps from strings to properties.\n */\nexport class MapProperty extends IndexedCollectionBaseProperty {\n /**\n * @param {Object} in_params - Input parameters for property creation\n * @param {string|undefined} in_scope - The scope in which the map typeid is defined\n * @constructor\n * @protected\n * @extends property-properties.IndexedCollectionBaseProperty\n * @alias property-properties.MapProperty\n * @category Maps\n */\n constructor(in_params, in_scope) {\n super(in_params);\n\n this._scope = in_scope;\n this._contextKeyType = in_params.contextKeyType || 'string';\n\n /** Contains the actual entries of the map */\n this._dynamicChildren = {};\n }\n\n /**\n * Returns the full property type identifier for the ChangeSet including the enum type id\n * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted\n * @return {string} The typeid\n */\n getFullTypeid(in_hideCollection = false) {\n if (in_hideCollection) {\n return this._typeid;\n } else {\n return TypeIdHelper.createSerializationTypeId(this._typeid, 'map');\n }\n }\n\n /**\n * Is this property a leaf node with regard to flattening?\n *\n * TODO: Which semantics should flattening have? It stops at primitive types and collections?\n *\n * @return {boolean} Is it a leaf with regard to flattening?\n */\n _isFlattenLeaf() {\n return true;\n }\n\n /**\n * Sets multiple values in a map.\n *\n * @param {object} in_values to assign to the collection\n * @param {Boolean} in_typed - If the map's items have a typeid and a value then create the\n * properties with that typeid, else use the set's typeid (support polymorphic items).\n * @see {setValues}\n * @private\n */\n _setValuesInternal(in_values, in_typed) {\n if (this._containsPrimitiveTypes) {\n var that = this;\n _.each(in_values, function(value, key) {\n if (that.has(key)) {\n that.remove(key);\n }\n\n that.insert(key, value);\n });\n } else {\n var that = this;\n _.each(in_values, function(value, key) {\n var property = that.get(String(key), { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n // if key exists in set replace its value else insert a new key/value\n if (property) {\n if (property instanceof Property.ValueProperty || property instanceof Property.StringProperty) {\n property.setValue(value);\n } else if (property instanceof BaseProperty && _.isObject(value)) {\n property._setValues(value, false, false);\n } else {\n throw new Error(MSG.SET_VALUES_PATH_INVALID + key);\n }\n } else {\n if (value instanceof BaseProperty) {\n that.insert(key, value);\n } else {\n if (in_typed) {\n that.insert(key, Property.PropertyFactory._createProperty(\n value.typeid || that._typeid, null, value.value, that._getScope()));\n } else {\n that.insert(key, Property.PropertyFactory._createProperty(\n that._typeid, null, value, that._getScope()));\n }\n }\n }\n });\n }\n }\n\n /**\n * Sets multiple values in a map.\n *\n * @param {object} in_values to assign to the collection\n * @param {Bool} in_typed - Whether the values are typed/polymorphic.\n * @param {Bool} in_initial - Whether we are setting default/initial values\n * or if the function is called directly with the values to set.\n * @see {setValues}\n * @override\n */\n _setValues(in_values, in_typed, in_initial) {\n if (in_initial) {\n this.clear();\n }\n\n this._setValuesInternal(in_values, in_typed);\n }\n\n /**\n * Sets multiple values in a map.\n *\n * @param {object} in_values to assign to the collection\n * @throws if one of the path in in_values does not exist in this property\n * @throws if trying to set a value to a path that leads to a Property other than ValueProperty or StringProperty\n * @override\n */\n setValues(in_values) {\n var checkoutView = this._getCheckoutView();\n if (checkoutView !== undefined) {\n checkoutView.pushNotificationDelayScope();\n this._setValues(in_values, false, false);\n checkoutView.popNotificationDelayScope();\n } else {\n this._setValues(in_values, false, false);\n }\n }\n\n /**\n * Returns an object with all the nested values contained in this property\n * @return {object} an object representing the values of your property\n * for example: {\n 'firstString': {\n 'stringValue': 'test1'\n },\n 'secondString': {\n 'stringValue': 'test2'\n }\n }\n */\n getValues() {\n var ids = this.getIds();\n var result = {};\n for (var i = 0; i < ids.length; i++) {\n var child = this.get(ids[i]);\n if (child.isPrimitiveType()) {\n result[ids[i]] = this.get(ids[i]).getValue();\n } else {\n result[ids[i]] = child.getValues();\n }\n }\n return result;\n }\n\n /**\n * Returns the path segment for a child\n *\n * @param {property-properties.BaseProperty} in_childNode - The child for which the path is returned\n *\n * @return {string} The path segment to resolve the child property under this property\n * @protected\n */\n _getPathSegmentForChildNode(in_childNode) {\n return '[' + PathHelper.quotePathSegmentIfNeeded(in_childNode._id) + ']';\n }\n\n /**\n * Resolves a direct child node based on the given path segment\n *\n * @param {String} in_segment - The path segment to resolve\n * @param {property-properties.PathHelper.TOKEN_TYPES} in_segmentType - The type of segment in the tokenized path\n *\n * @return {property-properties.BaseProperty|undefined} The child property that has been resolved\n * @protected\n */\n _resolvePathSegment(in_segment, in_segmentType) {\n // Base Properties only support paths separated via dots\n if (in_segmentType === PathHelper.TOKEN_TYPES.ARRAY_TOKEN) {\n return this._dynamicChildren[in_segment];\n } else {\n return AbstractStaticCollectionProperty.prototype._resolvePathSegment.call(this, in_segment, in_segmentType);\n }\n }\n\n /**\n * Inserts a property or value into the map\n *\n * Note: This will trigger an exception when this key already exists in the map. If you want to overwrite\n * existing entries you can use the set function.\n *\n * @param {string} in_key - The key under which the entry is added\n * @param {property-properties.Property} in_property - The property to insert\n * @throws if the property already exists\n * @throws if the property already has a parent\n * @throws if in_key is not a string\n * @throws if the property is a root property\n */\n insert(in_key, in_property) {\n ConsoleUtils.assert(_.isString(in_key), MSG.KEY_NOT_STRING + in_key);\n if (this._dynamicChildren[in_key] !== undefined) {\n throw new Error(MSG.PROPERTY_ALREADY_EXISTS + in_key);\n }\n if (in_property instanceof BaseProperty) {\n in_property._validateInsertIn(this);\n // Set the ID of the entry, to make sure it corresponds to the used key\n in_property._setId(in_key);\n\n // Insert the entry into the collection\n this._insert(in_key, in_property, true);\n } else {\n throw new Error(MSG.NONVALUE_MAP_INSERT_PROP);\n }\n }\n\n /**\n * Removes the entry with the given key from the map\n *\n * @param {string} in_key - The key of the entry to remove from the map\n * @throws if trying to remove an entry that does not exist\n * @return {*} the item removed\n */\n remove(in_key) {\n var item = this.get(in_key);\n this._removeByKey(in_key, true);\n return item;\n }\n\n /**\n * Sets the entry with the given key to the property passed in\n *\n * Note: this will overwrite an already existing value\n *\n * @param {string} in_key - The key under which the entry is stored\n * @param {property-properties.MapProperty~MapValueType} in_property - The property to store in the map\n * @throws if in_property is not a property\n * @throws if trying to insert a property that has a parent\n * @throws if in_key is not a string or a number\n */\n set(in_key, in_property) {\n this._checkIsNotReadOnly(true);\n if (this._dynamicChildren[in_key] !== in_property) {\n if (this._containsPrimitiveTypes === false && in_property.getParent() !== undefined) {\n throw new Error(MSG.INSERTED_ENTRY_WITH_PARENT);\n }\n if (this._dynamicChildren[in_key] !== undefined) {\n this._removeByKey(in_key, false);\n }\n // Set the ID of the entry, to make sure it corresponds to the used key\n if (this._containsPrimitiveTypes === false) {\n in_property._setId(in_key);\n }\n this._insert(in_key, in_property, false);\n\n // Make one final report\n this._reportDirtinessToView();\n }\n }\n\n /**\n * Returns an Object with all the entries of the map.\n * Contrary ot .getValues, for Property Maps, this will return the Property, not an object with their nested values.\n * WARNING: This is a direct access to the internal data-structure and the collection MUST NOT be modified. It is\n * read only for fast access and iteration. Insertion and deletion MUST be done via the insert and remove functions\n * of this class.\n *\n * @return {Object} The map with all entries in the map.\n */\n getEntriesReadOnly() {\n return this._dynamicChildren;\n }\n\n /**\n * Returns the collection entry with the given key\n *\n * @param {string|array<string>} in_ids - key of the entry to return or an array of keys\n * if an array is passed, the .get function will be performed on each id in sequence\n * for example .get(['position','x']) is equivalent to .get('position').get('x').\n * If .get resolves to a ReferenceProperty, it will return the property that the ReferenceProperty\n * refers to.\n * @param {Object} in_options - parameter object\n * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS]\n * How should this function behave during reference resolution?\n *\n * @return {property-properties.Property|*|undefined} The entry in the collection or undefined\n * if none could be found\n */\n get(in_ids, in_options) {\n if (_.isArray(in_ids)) {\n // Forward handling of arrays to the BaseProperty function\n return AbstractStaticCollectionProperty.prototype.get.call(this, in_ids, in_options);\n } else {\n in_options = in_options || {};\n in_options.referenceResolutionMode =\n in_options.referenceResolutionMode === undefined ? BaseProperty.REFERENCE_RESOLUTION.ALWAYS :\n in_options.referenceResolutionMode;\n\n var prop = this;\n if (in_ids === PATH_TOKENS.ROOT) {\n prop = prop.getRoot();\n } else if (in_ids === PATH_TOKENS.UP) {\n prop = prop.getParent();\n } else if (in_ids === PATH_TOKENS.REF) {\n throw new Error(MSG.NO_GET_DEREFERENCE_ONLY);\n } else {\n prop = prop._dynamicChildren[in_ids];\n }\n\n // Handle automatic reference resolution\n if (in_options.referenceResolutionMode === BaseProperty.REFERENCE_RESOLUTION.ALWAYS) {\n if (prop instanceof Property.ReferenceProperty) {\n prop = prop.ref;\n }\n }\n\n return prop;\n }\n }\n\n /**\n * Checks whether an entry with the given name exists\n *\n * @param {string} in_id - Name of the property\n * @return {boolean} True if the property exists, otherwise false.\n */\n has(in_id) {\n return this._dynamicChildren[in_id] !== undefined;\n }\n\n /**\n * Returns all entries of the map as an array.\n *\n * NOTE: This function creates a copy and thus is less efficient as getEntriesReadOnly.\n *\n * @return {Array.<property-properties.BaseProperty | *>} Array with all entries of the map. This array\n * is a shallow copy which can be modified by the caller without effects on the map.\n */\n getAsArray() {\n return _.values(this._dynamicChildren);\n }\n\n /**\n * Returns all keys found in the map\n *\n * NOTE: This function creates a copy and thus is less efficient as getEntriesReadOnly.\n *\n * @return {Array.<string>} The keys\n */\n getIds() {\n return Object.keys(this._dynamicChildren);\n }\n\n /**\n * Get the scope to which this property belongs to.\n * @return {string|undefined} The guid representing the scope in which the\n * map belongs to. If there is a workspace scope return it, else return the scope of this map.\n * @override\n * @private\n */\n _getScope() {\n var scope = IndexedCollectionBaseProperty.prototype._getScope.call(this);\n\n if (scope !== undefined) {\n return scope;\n } else {\n return this._scope;\n }\n }\n\n /**\n * Deletes all values from the Map\n */\n clear() {\n var that = this;\n this.getIds().forEach(function(id) {\n that.remove(id);\n });\n }\n}\n\nMapProperty.prototype._typeid = 'BaseProperty';\nMapProperty.prototype._context = 'map';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"namedNodeProperty.d.ts","sourceRoot":"","sources":["../../src/properties/namedNodeProperty.js"],"names":[],"mappings":"AAYA;;;GAGG;AACH;IAEI;;;;;;;;;;OAUG;IACH,wBAEC;IAoBD;;;OAGG;IACH,YAAwC;CAE3C"}
1
+ {"version":3,"file":"namedNodeProperty.d.ts","sourceRoot":"","sources":["../../src/properties/namedNodeProperty.js"],"names":[],"mappings":"AAYA;;;GAGG;AACH;IACI;;;;;;;;;;OAUG;IACH,wBAEC;IAoBD;;;OAGG;IACH,YAAwC;CAC3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"namedNodeProperty.js","sourceRoot":"","sources":["../../src/properties/namedNodeProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AAEH,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAEnD;;;GAGG;AACH,MAAa,iBAAkB,SAAQ,YAAY;IAE/C;;;;;;;;;;OAUG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QAGrB;;;;;;WAMG;QACH,UAAK,GAAG,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC;QAEtC;;;;;;WAMG;QACH,YAAO,GAAG,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC;QAE1C;;;WAGG;QACH,WAAM,GAAG,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC;IAxBxC,CAAC;CA0BJ;AAzCD,8CAyCC;AAED,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,mBAAmB,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 named node property class\n */\n\nconst { NamedProperty } = require('./namedProperty');\nconst { NodeProperty } = require('./nodeProperty');\n\n/**\n * A NamedNodeProperty is a NodeProperty that has a GUID which unique identifies the property object.\n * This makes it possible to store it in a set collection.\n */\nexport class NamedNodeProperty extends NodeProperty {\n\n /**\n * @param {object} in_params - List of parameters\n * @param {string} in_params.id - id of the property (null, if the GUID should be used for the ID)\n * @param {string} in_params.typeid - The type identifier\n *\n * @constructor\n * @protected\n * @extends property-properties.NodeProperty\n * @alias property-properties.NamedNodeProperty\n * @category Other Collections\n */\n constructor(in_params) {\n super(in_params);\n }\n\n /**\n * Returns a string identifying the property\n *\n * If an id has been explicitly set on this property we return that one, otherwise the GUID is used.\n *\n * @return {string} String identifying the property\n */\n getId = NamedProperty.prototype.getId;\n\n /**\n * Returns the GUID of this named property\n * A Guid is a unique identifier for a branch, commit or repository,\n * similar to a URN. Most functions in the API will us a URN but the\n * Guid is used to traverse the commit graph.\n * @return {string} The GUID\n */\n getGuid = NamedProperty.prototype.getGuid;\n\n /**\n * Return the URN for this named property\n * @return {string} The URN\n */\n getUrn = NamedProperty.prototype.getUrn;\n\n}\n\nNamedNodeProperty.prototype._typeid = 'NamedNodeProperty';\n"]}
1
+ {"version":3,"file":"namedNodeProperty.js","sourceRoot":"","sources":["../../src/properties/namedNodeProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AAEH,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAEnD;;;GAGG;AACH,MAAa,iBAAkB,SAAQ,YAAY;IAC/C;;;;;;;;;;OAUG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QAGrB;;;;;;WAMG;QACH,UAAK,GAAG,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC;QAEtC;;;;;;WAMG;QACH,YAAO,GAAG,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC;QAE1C;;;WAGG;QACH,WAAM,GAAG,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC;IAxBxC,CAAC;CAyBJ;AAvCD,8CAuCC;AAED,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,mBAAmB,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 named node property class\n */\n\nconst { NamedProperty } = require('./namedProperty');\nconst { NodeProperty } = require('./nodeProperty');\n\n/**\n * A NamedNodeProperty is a NodeProperty that has a GUID which unique identifies the property object.\n * This makes it possible to store it in a set collection.\n */\nexport class NamedNodeProperty extends NodeProperty {\n /**\n * @param {object} in_params - List of parameters\n * @param {string} in_params.id - id of the property (null, if the GUID should be used for the ID)\n * @param {string} in_params.typeid - The type identifier\n *\n * @constructor\n * @protected\n * @extends property-properties.NodeProperty\n * @alias property-properties.NamedNodeProperty\n * @category Other Collections\n */\n constructor(in_params) {\n super(in_params);\n }\n\n /**\n * Returns a string identifying the property\n *\n * If an id has been explicitly set on this property we return that one, otherwise the GUID is used.\n *\n * @return {string} String identifying the property\n */\n getId = NamedProperty.prototype.getId;\n\n /**\n * Returns the GUID of this named property\n * A Guid is a unique identifier for a branch, commit or repository,\n * similar to a URN. Most functions in the API will us a URN but the\n * Guid is used to traverse the commit graph.\n * @return {string} The GUID\n */\n getGuid = NamedProperty.prototype.getGuid;\n\n /**\n * Return the URN for this named property\n * @return {string} The URN\n */\n getUrn = NamedProperty.prototype.getUrn;\n}\n\nNamedNodeProperty.prototype._typeid = 'NamedNodeProperty';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"namedProperty.d.ts","sourceRoot":"","sources":["../../src/properties/namedProperty.js"],"names":[],"mappings":"AAWA;;;GAGG;AACH;IAEI;;;;;;;;;;OAUG;IACH,wBAEC;CAuCJ"}
1
+ {"version":3,"file":"namedProperty.d.ts","sourceRoot":"","sources":["../../src/properties/namedProperty.js"],"names":[],"mappings":"AAWA;;;GAGG;AACH;IACI;;;;;;;;;;OAUG;IACH,wBAEC;CAqCJ"}
@@ -29,7 +29,6 @@ class NamedProperty extends ContainerProperty {
29
29
  constructor(in_params) {
30
30
  super(in_params);
31
31
  }
32
- ;
33
32
  /**
34
33
  * Returns a string identifying the property
35
34
  *
@@ -45,7 +44,6 @@ class NamedProperty extends ContainerProperty {
45
44
  return this.getGuid();
46
45
  }
47
46
  }
48
- ;
49
47
  /**
50
48
  * Returns the GUID of this named property
51
49
  * A Guid is a unique identifier for a branch, commit or repository,
@@ -57,7 +55,6 @@ class NamedProperty extends ContainerProperty {
57
55
  var guid = this.get('guid', { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });
58
56
  return guid ? guid.getValue() : '';
59
57
  }
60
- ;
61
58
  }
62
59
  exports.NamedProperty = NamedProperty;
63
60
  NamedProperty.prototype._typeid = 'NamedProperty';
@@ -1 +1 @@
1
- {"version":3,"file":"namedProperty.js","sourceRoot":"","sources":["../../src/properties/namedProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAC7D,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAEnD;;;GAGG;AACH,MAAa,aAAc,SAAQ,iBAAiB;IAEhD;;;;;;;;;;OAUG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;IACrB,CAAC;IAAA,CAAC;IAEF;;;;;;OAMG;IACH,KAAK;QACD,IAAI,IAAI,CAAC,GAAG,KAAK,IAAI,EAAE;YACnB,OAAO,IAAI,CAAC,GAAG,CAAC;SACnB;aAAM;YACH,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;SACzB;IACL,CAAC;IAAA,CAAC;IAEF;;;;;;OAMG;IACH,OAAO;QACH,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,uBAAuB,EAAE,YAAY,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC,CAAC;QAClG,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACvC,CAAC;IAAA,CAAC;CAYL;AAtDD,sCAsDC;AACD,aAAa,CAAC,SAAS,CAAC,OAAO,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Definition of the named property class\n */\n\nconst { ContainerProperty } = require('./containerProperty');\nconst { BaseProperty } = require('./baseProperty');\n\n/**\n * A NamedProperty has a URN which uniquely identifies the property object. This makes it possible to store it in a\n * set collection.\n */\nexport class NamedProperty extends ContainerProperty {\n\n /**\n * @param {object} in_params - List of parameters\n * @param {string} in_params.id - id of the property (null, if the GUID should be used for the ID)\n * @param {string} in_params.typeid - The type identifier\n *\n * @constructor\n * @protected\n * @extends property-properties.ContainerProperty\n * @alias property-properties.NamedProperty\n * @category Properties\n */\n constructor(in_params) {\n super(in_params);\n };\n\n /**\n * Returns a string identifying the property\n *\n * If an id has been explicitly set on this property we return that one, otherwise the GUID is used.\n *\n * @return {string} String identifying the property\n */\n getId() {\n if (this._id !== null) {\n return this._id;\n } else {\n return this.getGuid();\n }\n };\n\n /**\n * Returns the GUID of this named property\n * A Guid is a unique identifier for a branch, commit or repository,\n * similar to a URN. Most functions in the API will us a URN but the\n * Guid is used to traverse the commit graph.\n * @return {string} The GUID\n */\n getGuid() {\n var guid = this.get('guid', { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n return guid ? guid.getValue() : '';\n };\n\n\n // THIS IS DISABLED FOR THE MOMENT, UNTIL WE BETTER UNDERSTAND HOW REFERENCES WORK IN FLUID\n /**\n * Return the URN for this named property\n * @return {string} The URN\n */\n /*NamedProperty.prototype.getUrn = function() {\n\n };*/\n\n}\nNamedProperty.prototype._typeid = 'NamedProperty';\n"]}
1
+ {"version":3,"file":"namedProperty.js","sourceRoot":"","sources":["../../src/properties/namedProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAC7D,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAEnD;;;GAGG;AACH,MAAa,aAAc,SAAQ,iBAAiB;IAChD;;;;;;;;;;OAUG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;IACrB,CAAC;IAED;;;;;;OAMG;IACH,KAAK;QACD,IAAI,IAAI,CAAC,GAAG,KAAK,IAAI,EAAE;YACnB,OAAO,IAAI,CAAC,GAAG,CAAC;SACnB;aAAM;YACH,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;SACzB;IACL,CAAC;IAED;;;;;;OAMG;IACH,OAAO;QACH,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,uBAAuB,EAAE,YAAY,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC,CAAC;QAClG,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACvC,CAAC;CAUJ;AAnDD,sCAmDC;AACD,aAAa,CAAC,SAAS,CAAC,OAAO,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Definition of the named property class\n */\n\nconst { ContainerProperty } = require('./containerProperty');\nconst { BaseProperty } = require('./baseProperty');\n\n/**\n * A NamedProperty has a URN which uniquely identifies the property object. This makes it possible to store it in a\n * set collection.\n */\nexport class NamedProperty extends ContainerProperty {\n /**\n * @param {object} in_params - List of parameters\n * @param {string} in_params.id - id of the property (null, if the GUID should be used for the ID)\n * @param {string} in_params.typeid - The type identifier\n *\n * @constructor\n * @protected\n * @extends property-properties.ContainerProperty\n * @alias property-properties.NamedProperty\n * @category Properties\n */\n constructor(in_params) {\n super(in_params);\n }\n\n /**\n * Returns a string identifying the property\n *\n * If an id has been explicitly set on this property we return that one, otherwise the GUID is used.\n *\n * @return {string} String identifying the property\n */\n getId() {\n if (this._id !== null) {\n return this._id;\n } else {\n return this.getGuid();\n }\n }\n\n /**\n * Returns the GUID of this named property\n * A Guid is a unique identifier for a branch, commit or repository,\n * similar to a URN. Most functions in the API will us a URN but the\n * Guid is used to traverse the commit graph.\n * @return {string} The GUID\n */\n getGuid() {\n var guid = this.get('guid', { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n return guid ? guid.getValue() : '';\n }\n\n // THIS IS DISABLED FOR THE MOMENT, UNTIL WE BETTER UNDERSTAND HOW REFERENCES WORK IN FLUID\n /**\n * Return the URN for this named property\n * @return {string} The URN\n */\n /* NamedProperty.prototype.getUrn = function() {\n\n }; */\n}\nNamedProperty.prototype._typeid = 'NamedProperty';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"nodeProperty.d.ts","sourceRoot":"","sources":["../../src/properties/nodeProperty.js"],"names":[],"mappings":"AAUA;;GAEG;AACH;IAEI;;;;;;;;OAQG;IACH,wBAGC;CAYJ"}
1
+ {"version":3,"file":"nodeProperty.d.ts","sourceRoot":"","sources":["../../src/properties/nodeProperty.js"],"names":[],"mappings":"AAUA;;GAEG;AACH;IACI;;;;;;;;OAQG;IACH,wBAGC;CAWJ"}
@@ -26,17 +26,14 @@ class NodeProperty extends ContainerProperty {
26
26
  super(in_params);
27
27
  this._dynamicChildren = {};
28
28
  }
29
- ;
30
29
  /**
31
30
  * @inheritdoc
32
31
  */
33
32
  isDynamic() { return true; }
34
- ;
35
33
  /**
36
34
  * @inheritdoc
37
35
  */
38
36
  _validateInsert(in_id, in_property) { }
39
- ;
40
37
  }
41
38
  exports.NodeProperty = NodeProperty;
42
39
  NodeProperty.prototype._typeid = 'NodeProperty';
@@ -1 +1 @@
1
- {"version":3,"file":"nodeProperty.js","sourceRoot":"","sources":["../../src/properties/nodeProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACH,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAa,YAAa,SAAQ,iBAAiB;IAE/C;;;;;;;;OAQG;IACH,YAAY,SAAS;QACjB,KAAK,CAAE,SAAS,CAAE,CAAC;QACnB,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;IAC/B,CAAC;IAAA,CAAC;IAEF;;OAEG;IACH,SAAS,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC;IAAA,CAAC;IAE7B;;OAEG;IACH,eAAe,CAAC,KAAK,EAAE,WAAW,IAAI,CAAC;IAAA,CAAC;CAE3C;AA1BD,oCA0BC;AACD,YAAY,CAAC,SAAS,CAAC,OAAO,GAAG,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview This file contains the implementation of the NodeProperty class\n */\nconst { ContainerProperty } = require('./containerProperty');\n\n/**\n * A property object that allows to add child properties dynamically.\n */\nexport class NodeProperty extends ContainerProperty {\n\n /**\n * @param {Object} in_params - Input parameters for property creation\n *\n * @constructor\n * @protected\n * @extends property-properties.ContainerProperty\n * @alias property-properties.NodeProperty\n * @category Other Collections\n */\n constructor(in_params) {\n super( in_params );\n this._dynamicChildren = {};\n };\n\n /**\n * @inheritdoc\n */\n isDynamic() { return true; };\n\n /**\n * @inheritdoc\n */\n _validateInsert(in_id, in_property) { };\n\n}\nNodeProperty.prototype._typeid = 'NodeProperty';\n"]}
1
+ {"version":3,"file":"nodeProperty.js","sourceRoot":"","sources":["../../src/properties/nodeProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACH,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAa,YAAa,SAAQ,iBAAiB;IAC/C;;;;;;;;OAQG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,SAAS,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC;IAE5B;;OAEG;IACH,eAAe,CAAC,KAAK,EAAE,WAAW,IAAI,CAAC;CAC1C;AAxBD,oCAwBC;AACD,YAAY,CAAC,SAAS,CAAC,OAAO,GAAG,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview This file contains the implementation of the NodeProperty class\n */\nconst { ContainerProperty } = require('./containerProperty');\n\n/**\n * A property object that allows to add child properties dynamically.\n */\nexport class NodeProperty extends ContainerProperty {\n /**\n * @param {Object} in_params - Input parameters for property creation\n *\n * @constructor\n * @protected\n * @extends property-properties.ContainerProperty\n * @alias property-properties.NodeProperty\n * @category Other Collections\n */\n constructor(in_params) {\n super(in_params);\n this._dynamicChildren = {};\n }\n\n /**\n * @inheritdoc\n */\n isDynamic() { return true; }\n\n /**\n * @inheritdoc\n */\n _validateInsert(in_id, in_property) { }\n}\nNodeProperty.prototype._typeid = 'NodeProperty';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"primitiveTypeCasts.d.ts","sourceRoot":"","sources":["../../src/properties/primitiveTypeCasts.js"],"names":[],"mappings":";IAmDY,6DAWP;;;;IA8BM,4DAWN;;;;;;IA0CO,0CAEP;IAOQ,6CAER"}
1
+ {"version":3,"file":"primitiveTypeCasts.d.ts","sourceRoot":"","sources":["../../src/properties/primitiveTypeCasts.js"],"names":[],"mappings":";IAkDY,6DAWP;;;;IA8BM,4DAWN;;;;;;IA0CO,0CAEP;IAOQ,6CAER"}