@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
@@ -1 +1 @@
1
- {"version":3,"file":"containerProperty.js","sourceRoot":"","sources":["../../src/properties/containerProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;EAEE;AACF,MAAM,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAChC,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,gCAAgC,EAAE,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAC3F,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,EAAE,6BAA6B,EAAE,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAAC;AACrF,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAa,iBAAkB,SAAQ,6BAA6B;IAChE;;;OAGG;IACH,YAAY,SAAS;QACjB,KAAK,CAAE,SAAS,CAAE,CAAC;QAEnB,IAAI,SAAS,CAAC,gBAAgB,EAAE;YAC5B,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC;YAC5B,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;SAC9B;IAEL,CAAC;IAAA,CAAC;IAEF;;;OAGG;IACH,OAAO;QACH,OAAO,gCAAgC,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACpH,CAAC;IAAA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A2B;QACvB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAAA,CAAC;IAEF;;;;;;;;;;;;;;;;OAgBG;IACH,SAAS,CAAC,aAAa;QACnB,IAAI,YAAY,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC3C,IAAI,YAAY,KAAK,SAAS,EAAE;YAC5B,YAAY,CAAC,0BAA0B,EAAE,CAAC;YAC1C,iBAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/E,YAAY,CAAC,yBAAyB,EAAE,CAAC;SAC5C;aAAM;YACH,iBAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAClF;IACL,CAAC;IAAA,CAAC;CAEL;AAjTD,8CAiTC;AAED,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,mBAAmB,CAAC;AAC1D,iBAAiB,CAAC,SAAS,CAAC,gBAAgB,GAAG,EAAE,CAAC;AAClD,iBAAiB,CAAC,SAAS,CAAC,iBAAiB,GAAG,EAAE,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 ContainerProperty class\n*/\nconst _ = require('underscore');\nconst { BaseProperty } = require('./baseProperty');\nconst { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { ConsoleUtils } = require('@fluid-experimental/property-common');\nconst { IndexedCollectionBaseProperty } = require('./indexedCollectionBaseProperty');\nconst { validationsEnabled } = require('../enableValidations');\n\n/**\n * A property object that allows to add child properties dynamically.\n *\n */\nexport class ContainerProperty extends IndexedCollectionBaseProperty {\n /**\n * @param {Object} in_params - Input parameters for property creation\n * @protected\n */\n constructor(in_params) {\n super( in_params );\n\n if (in_params.optionalChildren) {\n this._optionalChildren = {};\n this._dynamicChildren = {};\n }\n\n };\n\n /**\n * Returns the name of all the sub-properties of this property.\n * @return {Array.<string>} An array of all the property ids\n */\n _getIds() {\n return AbstractStaticCollectionProperty.prototype._getIds.call(this).concat(Object.keys(this._dynamicChildren));\n };\n\n /**\n * Returns the sub-property having the given name in this property.\n *\n * @param {string|number} in_id the id of the prop you wish to retrieve.\n *\n * @return {property-properties.BaseProperty | undefined} The property you seek or undefined if none is found.\n */\n _get(in_id) {\n return AbstractStaticCollectionProperty.prototype._get.call(this, in_id) || this._dynamicChildren[in_id];\n };\n\n /**\n * Adds an optional child to list of possible optional children.\n * @param {string} in_id Id of the optional child\n * @param {string} in_typeid typeid which determines what type the child should be\n * @private\n */\n _addOptionalChild(in_id, in_typeid) {\n if (this._optionalChildren === ContainerProperty.prototype._optionalChildren) {\n this._optionalChildren = {};\n this._dynamicChildren = {};\n }\n this._optionalChildren[in_id] = in_typeid;\n };\n\n /**\n * Appends a property\n *\n * @param {String | property-properties.BaseProperty } in_id - The id under which the property is added. This parameter is\n * optional. For NamedProperties it can be omitted. In that case\n * the GUID of the named property will be used.\n *\n * @param {property-properties.BaseProperty} [in_property] - The property to add\n * @throws if in_id is not a string or a number\n * @throws if there is already an entry for in_id\n * @throws if in_property is not a property\n * @throws if in_property does not have an id\n * @throws if in_property has a parent\n * @throws if in_property is a root property\n */\n insert(in_id, in_property) {\n if (in_property === undefined) {\n // If no id is passed, the property is passed as first parameter\n in_property = in_id;\n ConsoleUtils.assert(in_property instanceof BaseProperty, 'insert error: ' + MSG.NOT_A_PROPERTY);\n } else {\n ConsoleUtils.assert(_.isString(in_id) || _.isNumber(in_id), MSG.ID_STRING_OR_NUMBER);\n ConsoleUtils.assert(!_.isString(in_id) || !_.isEmpty(in_id), MSG.ID_SHOULD_NOT_BE_EMPTY_STRING);\n ConsoleUtils.assert(in_property instanceof BaseProperty, 'insert error: ' + MSG.NOT_A_PROPERTY);\n if (this._dynamicChildren[in_id] !== undefined) {\n throw new Error(MSG.PROPERTY_ALREADY_EXISTS + in_id);\n }\n if (validationsEnabled.enabled) {\n in_property._validateInsertIn(this);\n }\n // If an id is passed, it is stored in the child property object\n in_property._setId(in_id);\n }\n\n if (validationsEnabled.enabled) {\n this._validateInsert(in_property.getId(), in_property);\n }\n\n // Add the child property to the dynamic properties\n this._insert(in_property.getId(), in_property, true);\n };\n\n /**\n * Validates if inserting the property is valid.\n *\n * @param {string} in_id - id to be validated.\n * @param {string} in_property - property to be validated.\n * @throws if id is not on optional list.\n * @throws if the typeid of the property doesn't match the schema.\n * @protected\n */\n _validateInsert(in_id, in_property) {\n if (!(this._optionalChildren && this._optionalChildren[in_id])) {\n throw new Error(MSG.CANNOT_INSERT_UNKNOWN_PROPERTY + in_id);\n }\n\n if (this._optionalChildren[in_id].toUpperCase() !== in_property.getTypeid().toUpperCase()) {\n throw new Error(MSG.MISMATCHING_PROPERTY_TYPEID + this._optionalChildren[in_id] +\n ' instead it\\'s: ' + in_property.getTypeid());\n }\n };\n\n /**\n * @override\n * @inheritdoc\n */\n _getScope() {\n if (this._parent) {\n return this.getRoot()._getScope();\n } else {\n if (this._checkedOutRepositoryInfo) {\n return this._checkedOutRepositoryInfo.getScope();\n } else {\n return undefined;\n }\n }\n };\n\n /**\n * Removes the given property\n *\n * @param {string|property-properties.BaseProperty} in_property - The property to remove\n * (either its id or the whole property).\n * @throws if trying to remove an entry that does not exist\n * @return {property-properties.BaseProperty} the property removed.\n */\n remove(in_property) {\n var id = in_property;\n var returnValue;\n if (id instanceof BaseProperty) {\n returnValue = id;\n id = id.getId();\n } else {\n returnValue = this.get(id);\n }\n\n this._validateRemove(id);\n\n this._removeByKey(id);\n return returnValue;\n };\n\n /**\n * Validates if removing a property with specified id is valid.\n *\n * @param {string} in_id - id to be validated.\n * @throws if the id doesn't exist.\n * @throws if the id is not marked as optional.\n * @protected\n */\n _validateRemove(in_id) {\n if (!this._dynamicChildren[in_id]) {\n if (this._staticChildren[in_id] !== undefined) {\n throw new Error(MSG.CANNOT_REMOVE_NON_OPTIONAL_PROP + in_id);\n } else {\n throw new Error((MSG.REMOVING_NON_EXISTING_KEY + in_id));\n }\n }\n };\n\n /**\n * Removes all dynamic children\n * @throws if node property is read-only\n */\n clear() {\n this._checkIsNotReadOnly(true);\n _.each(this._dynamicChildren, this.remove.bind(this));\n };\n\n /**\n * Inserts a property into the collection\n *\n * @param {string} in_key -\n * Key of the entry in the collection\n * @param {property-properties.NamedProperty} in_property -\n * The property to insert\n * @param {boolean} in_reportToView -\n * By default, the dirtying will always be reported to the checkout view and trigger a modified event there.\n * When batching updates, this can be prevented via this flag.\n */\n _insert(in_key, in_property, in_reportToView) {\n if (validationsEnabled.enabled) {\n this._checkIsNotReadOnly(true);\n }\n\n // Add the child property to the dynamic properties\n IndexedCollectionBaseProperty.prototype._insert.call(this, in_key, in_property, false);\n\n // We postponed the report above, to make sure the child property has actually been appended to this\n // node, before the report is forwarded to the view\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n };\n\n /**\n * Removes an entry with the given key\n *\n * @param {string} in_key - key of the entry\n * @param {boolean} in_reportToView -\n * By default, the dirtying will always be reported to the checkout view and trigger a modified event there.\n * When batching updates, this can be prevented via this flag.\n */\n _removeByKey(in_key, in_reportToView) {\n this._checkIsNotReadOnly(true);\n\n if (this._dynamicChildren[in_key]) {\n // Remove from the indexed collection\n IndexedCollectionBaseProperty.prototype._removeByKey.call(this, in_key, in_reportToView);\n } else {\n console.error(MSG.REMOVING_NON_EXISTING_KEY + in_key);\n }\n };\n\n /**\n * Stores the information to which CheckedOutRepositoryInfo object this root property belongs.\n * Note: these functions should only be used internally (within the PropertySets library)\n *\n * @param {property-properties.CheckoutView~CheckedOutRepositoryInfo} in_checkedOutRepositoryInfo -\n * The checked out repository info this root property belongs to.\n * @protected\n */\n _setCheckedOutRepositoryInfo(in_checkedOutRepositoryInfo) {\n this._checkedOutRepositoryInfo = in_checkedOutRepositoryInfo;\n };\n\n /**\n * Gets the information to which CheckedOutRepositoryInfo object this root property belongs.\n * Note: these functions should only be used internally (within the PropertySets library)\n *\n * @return {property-properties.CheckoutView~CheckedOutRepositoryInfo|undefined} If this is the root of the checked out\n * hierarchy, this will return the checkout\n * @protected\n */\n _getCheckedOutRepositoryInfo() {\n return this._checkedOutRepositoryInfo;\n };\n\n /**\n * Returns the name of all the static sub-properties of this property.\n *\n * @return {Array.<string>} An array of all the static property ids\n */\n getStaticIds() {\n return Object.keys(this._staticChildren);\n };\n\n /**\n * Returns the name of all the dynamic sub-properties of this property.\n *\n * @return {Array.<string>} An array of all the dynamic property ids\n */\n getDynamicIds() {\n return Object.keys(this._dynamicChildren);\n };\n\n /**\n * Returns an Object with all the dynamic children of this node property.\n *\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<String, property-properties.MapProperty~MapValueType>} The map with all entries in the map.\n */\n _getDynamicChildrenReadOnly() {\n return this._dynamicChildren;\n };\n\n /**\n * Given an object that mirrors a PSet Template, assign the properties\n * eg.\n * <pre>\n * Templates = {\n * properties: [\n * { id: 'foo', typeid: 'String' },\n * { id: 'bar', properties: [{id: 'baz', typeid: 'Uint32'}] }\n * ]\n * }\n * </pre>\n * You would update the values like\n * `baseProperty.setValues({foo: 'hello', bar: {baz: 1}});`\n * WARNING: not completely implemented for all types\n * @param {object} in_properties The properties you would like to assign\n * @private\n */\n setValues(in_properties) {\n var checkoutView = this._getCheckoutView();\n if (checkoutView !== undefined) {\n checkoutView.pushNotificationDelayScope();\n ContainerProperty.prototype._setValues.call(this, in_properties, false, false);\n checkoutView.popNotificationDelayScope();\n } else {\n ContainerProperty.prototype._setValues.call(this, in_properties, false, false);\n }\n };\n\n}\n\nContainerProperty.prototype._typeid = 'ContainerProperty';\nContainerProperty.prototype._dynamicChildren = {};\nContainerProperty.prototype._optionalChildren = {};\n"]}
1
+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AAE,CAAC;SAC5C;aAAM;YACH,iBAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAClF;IACL,CAAC;CACJ;AA/SD,8CA+SC;AAED,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,mBAAmB,CAAC;AAC1D,iBAAiB,CAAC,SAAS,CAAC,gBAAgB,GAAG,EAAE,CAAC;AAClD,iBAAiB,CAAC,SAAS,CAAC,iBAAiB,GAAG,EAAE,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 ContainerProperty class\n*/\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { ConsoleUtils } = require('@fluid-experimental/property-common');\nconst _ = require('underscore');\nconst { validationsEnabled } = require('../enableValidations');\nconst { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');\nconst { BaseProperty } = require('./baseProperty');\nconst { IndexedCollectionBaseProperty } = require('./indexedCollectionBaseProperty');\n\n/**\n * A property object that allows to add child properties dynamically.\n *\n */\nexport class ContainerProperty extends IndexedCollectionBaseProperty {\n /**\n * @param {Object} in_params - Input parameters for property creation\n * @protected\n */\n constructor(in_params) {\n super(in_params);\n\n if (in_params.optionalChildren) {\n this._optionalChildren = {};\n this._dynamicChildren = {};\n }\n }\n\n /**\n * Returns the name of all the sub-properties of this property.\n * @return {Array.<string>} An array of all the property ids\n */\n _getIds() {\n return AbstractStaticCollectionProperty.prototype._getIds.call(this).concat(Object.keys(this._dynamicChildren));\n }\n\n /**\n * Returns the sub-property having the given name in this property.\n *\n * @param {string|number} in_id the id of the prop you wish to retrieve.\n *\n * @return {property-properties.BaseProperty | undefined} The property you seek or undefined if none is found.\n */\n _get(in_id) {\n return AbstractStaticCollectionProperty.prototype._get.call(this, in_id) || this._dynamicChildren[in_id];\n }\n\n /**\n * Adds an optional child to list of possible optional children.\n * @param {string} in_id Id of the optional child\n * @param {string} in_typeid typeid which determines what type the child should be\n * @private\n */\n _addOptionalChild(in_id, in_typeid) {\n if (this._optionalChildren === ContainerProperty.prototype._optionalChildren) {\n this._optionalChildren = {};\n this._dynamicChildren = {};\n }\n this._optionalChildren[in_id] = in_typeid;\n }\n\n /**\n * Appends a property\n *\n * @param {String | property-properties.BaseProperty } in_id - The id under which the property is added. This parameter is\n * optional. For NamedProperties it can be omitted. In that case\n * the GUID of the named property will be used.\n *\n * @param {property-properties.BaseProperty} [in_property] - The property to add\n * @throws if in_id is not a string or a number\n * @throws if there is already an entry for in_id\n * @throws if in_property is not a property\n * @throws if in_property does not have an id\n * @throws if in_property has a parent\n * @throws if in_property is a root property\n */\n insert(in_id, in_property) {\n if (in_property === undefined) {\n // If no id is passed, the property is passed as first parameter\n in_property = in_id;\n ConsoleUtils.assert(in_property instanceof BaseProperty, 'insert error: ' + MSG.NOT_A_PROPERTY);\n } else {\n ConsoleUtils.assert(_.isString(in_id) || _.isNumber(in_id), MSG.ID_STRING_OR_NUMBER);\n ConsoleUtils.assert(!_.isString(in_id) || !_.isEmpty(in_id), MSG.ID_SHOULD_NOT_BE_EMPTY_STRING);\n ConsoleUtils.assert(in_property instanceof BaseProperty, 'insert error: ' + MSG.NOT_A_PROPERTY);\n if (this._dynamicChildren[in_id] !== undefined) {\n throw new Error(MSG.PROPERTY_ALREADY_EXISTS + in_id);\n }\n if (validationsEnabled.enabled) {\n in_property._validateInsertIn(this);\n }\n // If an id is passed, it is stored in the child property object\n in_property._setId(in_id);\n }\n\n if (validationsEnabled.enabled) {\n this._validateInsert(in_property.getId(), in_property);\n }\n\n // Add the child property to the dynamic properties\n this._insert(in_property.getId(), in_property, true);\n }\n\n /**\n * Validates if inserting the property is valid.\n *\n * @param {string} in_id - id to be validated.\n * @param {string} in_property - property to be validated.\n * @throws if id is not on optional list.\n * @throws if the typeid of the property doesn't match the schema.\n * @protected\n */\n _validateInsert(in_id, in_property) {\n if (!(this._optionalChildren && this._optionalChildren[in_id])) {\n throw new Error(MSG.CANNOT_INSERT_UNKNOWN_PROPERTY + in_id);\n }\n\n if (this._optionalChildren[in_id].toUpperCase() !== in_property.getTypeid().toUpperCase()) {\n throw new Error(MSG.MISMATCHING_PROPERTY_TYPEID + this._optionalChildren[in_id] +\n ' instead it\\'s: ' + in_property.getTypeid());\n }\n }\n\n /**\n * @override\n * @inheritdoc\n */\n _getScope() {\n if (this._parent) {\n return this.getRoot()._getScope();\n } else {\n if (this._checkedOutRepositoryInfo) {\n return this._checkedOutRepositoryInfo.getScope();\n } else {\n return undefined;\n }\n }\n }\n\n /**\n * Removes the given property\n *\n * @param {string|property-properties.BaseProperty} in_property - The property to remove\n * (either its id or the whole property).\n * @throws if trying to remove an entry that does not exist\n * @return {property-properties.BaseProperty} the property removed.\n */\n remove(in_property) {\n var id = in_property;\n var returnValue;\n if (id instanceof BaseProperty) {\n returnValue = id;\n id = id.getId();\n } else {\n returnValue = this.get(id);\n }\n\n this._validateRemove(id);\n\n this._removeByKey(id);\n return returnValue;\n }\n\n /**\n * Validates if removing a property with specified id is valid.\n *\n * @param {string} in_id - id to be validated.\n * @throws if the id doesn't exist.\n * @throws if the id is not marked as optional.\n * @protected\n */\n _validateRemove(in_id) {\n if (!this._dynamicChildren[in_id]) {\n if (this._staticChildren[in_id] !== undefined) {\n throw new Error(MSG.CANNOT_REMOVE_NON_OPTIONAL_PROP + in_id);\n } else {\n throw new Error((MSG.REMOVING_NON_EXISTING_KEY + in_id));\n }\n }\n }\n\n /**\n * Removes all dynamic children\n * @throws if node property is read-only\n */\n clear() {\n this._checkIsNotReadOnly(true);\n _.each(this._dynamicChildren, this.remove.bind(this));\n }\n\n /**\n * Inserts a property into the collection\n *\n * @param {string} in_key -\n * Key of the entry in the collection\n * @param {property-properties.NamedProperty} in_property -\n * The property to insert\n * @param {boolean} in_reportToView -\n * By default, the dirtying will always be reported to the checkout view and trigger a modified event there.\n * When batching updates, this can be prevented via this flag.\n */\n _insert(in_key, in_property, in_reportToView) {\n if (validationsEnabled.enabled) {\n this._checkIsNotReadOnly(true);\n }\n\n // Add the child property to the dynamic properties\n IndexedCollectionBaseProperty.prototype._insert.call(this, in_key, in_property, false);\n\n // We postponed the report above, to make sure the child property has actually been appended to this\n // node, before the report is forwarded to the view\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n }\n\n /**\n * Removes an entry with the given key\n *\n * @param {string} in_key - key of the entry\n * @param {boolean} in_reportToView -\n * By default, the dirtying will always be reported to the checkout view and trigger a modified event there.\n * When batching updates, this can be prevented via this flag.\n */\n _removeByKey(in_key, in_reportToView) {\n this._checkIsNotReadOnly(true);\n\n if (this._dynamicChildren[in_key]) {\n // Remove from the indexed collection\n IndexedCollectionBaseProperty.prototype._removeByKey.call(this, in_key, in_reportToView);\n } else {\n console.error(MSG.REMOVING_NON_EXISTING_KEY + in_key);\n }\n }\n\n /**\n * Stores the information to which CheckedOutRepositoryInfo object this root property belongs.\n * Note: these functions should only be used internally (within the PropertySets library)\n *\n * @param {property-properties.CheckoutView~CheckedOutRepositoryInfo} in_checkedOutRepositoryInfo -\n * The checked out repository info this root property belongs to.\n * @protected\n */\n _setCheckedOutRepositoryInfo(in_checkedOutRepositoryInfo) {\n this._checkedOutRepositoryInfo = in_checkedOutRepositoryInfo;\n }\n\n /**\n * Gets the information to which CheckedOutRepositoryInfo object this root property belongs.\n * Note: these functions should only be used internally (within the PropertySets library)\n *\n * @return {property-properties.CheckoutView~CheckedOutRepositoryInfo|undefined} If this is the root of the checked out\n * hierarchy, this will return the checkout\n * @protected\n */\n _getCheckedOutRepositoryInfo() {\n return this._checkedOutRepositoryInfo;\n }\n\n /**\n * Returns the name of all the static sub-properties of this property.\n *\n * @return {Array.<string>} An array of all the static property ids\n */\n getStaticIds() {\n return Object.keys(this._staticChildren);\n }\n\n /**\n * Returns the name of all the dynamic sub-properties of this property.\n *\n * @return {Array.<string>} An array of all the dynamic property ids\n */\n getDynamicIds() {\n return Object.keys(this._dynamicChildren);\n }\n\n /**\n * Returns an Object with all the dynamic children of this node property.\n *\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<String, property-properties.MapProperty~MapValueType>} The map with all entries in the map.\n */\n _getDynamicChildrenReadOnly() {\n return this._dynamicChildren;\n }\n\n /**\n * Given an object that mirrors a PSet Template, assign the properties\n * eg.\n * <pre>\n * Templates = {\n * properties: [\n * { id: 'foo', typeid: 'String' },\n * { id: 'bar', properties: [{id: 'baz', typeid: 'Uint32'}] }\n * ]\n * }\n * </pre>\n * You would update the values like\n * `baseProperty.setValues({foo: 'hello', bar: {baz: 1}});`\n * WARNING: not completely implemented for all types\n * @param {object} in_properties The properties you would like to assign\n * @private\n */\n setValues(in_properties) {\n var checkoutView = this._getCheckoutView();\n if (checkoutView !== undefined) {\n checkoutView.pushNotificationDelayScope();\n ContainerProperty.prototype._setValues.call(this, in_properties, false, false);\n checkoutView.popNotificationDelayScope();\n } else {\n ContainerProperty.prototype._setValues.call(this, in_properties, false, false);\n }\n }\n}\n\nContainerProperty.prototype._typeid = 'ContainerProperty';\nContainerProperty.prototype._dynamicChildren = {};\nContainerProperty.prototype._optionalChildren = {};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"enumArrayProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH;IACI;;;;;;;;;OASG;IACH,wBAMC;IADG,qBAAgD;IAGpD;;;;;;OAMG;IACH,sCAHW,MAAM,GAAC,MAAM,GACZ,MAAM,CAiBjB;IAyCD;;;;;;OAMG;IACH,0BALW,MAAM,uBAOhB;IA2BD;;;;;OAKG;IACH,2BAJW,MAAM,GAEL,MAAM,CAUjB;IAED;;;;;;;OAOG;IACH,0BANW,MAAM,aACN,MAAM,GAGL,MAAM,MAAM,CAAC,CAexB;IAmCD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CAEJ"}
1
+ {"version":3,"file":"enumArrayProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH;IACI;;;;;;;;;OASG;IACH,wBAMC;IADG,qBAAgD;IAGpD;;;;;;OAMG;IACH,sCAHW,MAAM,GAAC,MAAM,GACZ,MAAM,CAiBjB;IAyCD;;;;;;OAMG;IACH,0BALW,MAAM,uBAOhB;IA2BD;;;;;OAKG;IACH,2BAJW,MAAM,GAEL,MAAM,CAUjB;IAED;;;;;;;OAOG;IACH,0BANW,MAAM,aACN,MAAM,GAGL,MAAM,MAAM,CAAC,CAexB;IAmCD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CACJ"}
@@ -5,11 +5,11 @@ exports.EnumArrayProperty = void 0;
5
5
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
6
6
  * Licensed under the MIT License.
7
7
  */
8
- const _ = require('lodash');
9
- const { ValueArrayProperty } = require('./valueArrayProperty');
10
8
  const { MSG } = require('@fluid-experimental/property-common').constants;
11
9
  const { TypeIdHelper } = require('@fluid-experimental/property-changeset');
12
10
  const { BaseDataArray } = require('@fluid-experimental/property-common');
11
+ const _ = require('lodash');
12
+ const { ValueArrayProperty } = require('./valueArrayProperty');
13
13
  /**
14
14
  * This class is a specialized version of the ArrayProperty for enums.
15
15
  * Since we internally represent enums as Int32Array this is much more
@@ -35,7 +35,6 @@ class EnumArrayProperty extends ValueArrayProperty {
35
35
  // values/enums for the property.
36
36
  this._enumDictionary = in_params._enumDictionary;
37
37
  }
38
- ;
39
38
  /**
40
39
  * Since an enum can be identified by its value and its enum string,
41
40
  * we have to check/convert the type here. We also check if a value
@@ -61,7 +60,6 @@ class EnumArrayProperty extends ValueArrayProperty {
61
60
  }
62
61
  }
63
62
  }
64
- ;
65
63
  /**
66
64
  * inserts the content of a given array into the array property
67
65
  * @param {number} in_offset target index
@@ -85,7 +83,6 @@ class EnumArrayProperty extends ValueArrayProperty {
85
83
  });
86
84
  ValueArrayProperty.prototype.insertRange.call(this, in_offset, internalValueArray);
87
85
  }
88
- ;
89
86
  /**
90
87
  * Sets the content of an enum in an enum array
91
88
  * @param {number} in_index target index
@@ -99,7 +96,6 @@ class EnumArrayProperty extends ValueArrayProperty {
99
96
  }
100
97
  this.setRange(in_index, [in_value]);
101
98
  }
102
- ;
103
99
  /**
104
100
  * Sets the content of an enum in an enum array. Alternative syntax to .set()
105
101
  * @param {number} in_index target index
@@ -110,7 +106,6 @@ class EnumArrayProperty extends ValueArrayProperty {
110
106
  setEnumByString(in_index, in_value) {
111
107
  this.set(in_index, in_value);
112
108
  }
113
- ;
114
109
  /**
115
110
  * sets the array properties elements to the content of the given array
116
111
  * all changed elements must already exist
@@ -134,7 +129,6 @@ class EnumArrayProperty extends ValueArrayProperty {
134
129
  });
135
130
  ValueArrayProperty.prototype.setRange.call(this, in_offset, internalValueArray);
136
131
  }
137
- ;
138
132
  /**
139
133
  * get the array element at a given index
140
134
  * @param {number} in_position the target index
@@ -151,7 +145,6 @@ class EnumArrayProperty extends ValueArrayProperty {
151
145
  return resultEntry.id;
152
146
  }
153
147
  }
154
- ;
155
148
  /**
156
149
  * get an array of the enum strings starting at a given index
157
150
  * @param {number} in_offset the start index
@@ -173,7 +166,6 @@ class EnumArrayProperty extends ValueArrayProperty {
173
166
  }
174
167
  return result;
175
168
  }
176
- ;
177
169
  /**
178
170
  * Returns the full property type identifier for the ChangeSet including the enum type id
179
171
  * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted
@@ -187,7 +179,6 @@ class EnumArrayProperty extends ValueArrayProperty {
187
179
  return TypeIdHelper.createSerializationTypeId(this._typeid, 'array', true);
188
180
  }
189
181
  }
190
- ;
191
182
  /**
192
183
  * @inheritdoc
193
184
  */
@@ -199,7 +190,6 @@ class EnumArrayProperty extends ValueArrayProperty {
199
190
  }
200
191
  return result;
201
192
  }
202
- ;
203
193
  /**
204
194
  * Creates and initializes the data array
205
195
  * @param {Number} in_length the initial length of the array
@@ -207,7 +197,6 @@ class EnumArrayProperty extends ValueArrayProperty {
207
197
  _dataArrayCreate(in_length) {
208
198
  this._dataArrayRef = new BaseDataArray(Int32Array, in_length);
209
199
  }
210
- ;
211
200
  /**
212
201
  * let the user to query all valid entries of an enum array property
213
202
  * @return {{}} all valid (string) entries and their (int) values
@@ -215,7 +204,6 @@ class EnumArrayProperty extends ValueArrayProperty {
215
204
  getValidEnumList() {
216
205
  return this._enumDictionary.enumEntriesById;
217
206
  }
218
- ;
219
207
  }
220
208
  exports.EnumArrayProperty = EnumArrayProperty;
221
209
  EnumArrayProperty.prototype._typeid = 'Enum';
@@ -1 +1 @@
1
- {"version":3,"file":"enumArrayProperty.js","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC/D,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AAC3E,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AAEzE;;;;;;GAMG;AACH,MAAa,iBAAkB,SAAQ,kBAAkB;IACrD;;;;;;;;;OASG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,uEAAuE;QACvE,kEAAkE;QAClE,iCAAiC;QACjC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;IACrD,CAAC;IAAA,CAAC;IAEF;;;;;;OAMG;IACH,2BAA2B,CAAC,QAAQ;QAChC,8BAA8B;QAC9B,IAAI,CAAC,CAAC,Q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IACH,SAAS;QACL,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAChD,IAAI,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACtB;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAAA,CAAC;IAEF;;;OAGG;IACH,gBAAgB,CAAC,SAAS;QACtB,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAClE,CAAC;IAAA,CAAC;IAEF;;;OAGG;IACH,gBAAgB;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAChD,CAAC;IAAA,CAAC;CAEL;AAtMD,8CAsMC;AACD,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst _ = require('lodash');\nconst { ValueArrayProperty } = require('./valueArrayProperty');\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { TypeIdHelper } = require('@fluid-experimental/property-changeset');\nconst { BaseDataArray } = require('@fluid-experimental/property-common');\n\n/**\n * This class is a specialized version of the ArrayProperty for enums.\n * Since we internally represent enums as Int32Array this is much more\n * efficient and convenient. Additionally, we provide direct access\n * methods to the enums in the array, e.g. .getEnumString(3) directly\n * returns the enum string at position 3 of the array\n */\nexport class EnumArrayProperty extends ValueArrayProperty {\n /**\n * @param {Object} in_params - the parameters\n * @param {Number=} [in_params.length=0] the length of the array, if applicable\n * @param {Object} in_params._enumDictionary the value<->enum dictonary needed to convert the values\n * @constructor\n * @protected\n * @extends property-properties.ValueArrayProperty\n * @alias property-properties.EnumArrayProperty\n * @category Arrays\n */\n constructor(in_params) {\n super(in_params);\n // whenever an EnumProperty is created by the PropertyFactory, we get a\n // dictonary [value->enum] and [enum->value] to efficiently lookup\n // values/enums for the property.\n this._enumDictionary = in_params._enumDictionary;\n };\n\n /**\n * Since an enum can be identified by its value and its enum string,\n * we have to check/convert the type here. We also check if a value\n * is suitable for this enum type.\n * @param {number|string} in_value value to be checked/converted\n * @return {number} internal value for this enum type\n */\n _convertEnumToInternalValue(in_value) {\n // check if we've got a string\n if (_.isString(in_value)) {\n var internalEnum = this._enumDictionary.enumEntriesById[in_value];\n if (!internalEnum) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n }\n return internalEnum.value;\n } else {\n if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n } else {\n return in_value;\n }\n }\n };\n\n /**\n * inserts the content of a given array into the array property\n * @param {number} in_offset target index\n * @param {Array<*>} in_array the array to be inserted\n * @throws if in_array is not an array\n * @throws if in_position is not a number\n * @throws if a value to be inserted is an instance of BaseProperty\n * @throws if tyring to modify a referenced property.\n */\n insertRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.insertRange or .insert');\n }\n if (!_.isArray(in_array)) {\n throw new Error(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.insertRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function (element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.insertRange.call(this, in_offset, internalValueArray);\n };\n\n /**\n * Sets the content of an enum in an enum array\n * @param {number} in_index target index\n * @param {*} in_value the value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n set(in_index, in_value) {\n if (!_.isNumber(in_value) && !_.isString(in_value)) {\n throw new Error(MSG.VALUE_STRING_OR_NUMBER + in_value);\n }\n this.setRange(in_index, [in_value]);\n };\n\n /**\n * Sets the content of an enum in an enum array. Alternative syntax to .set()\n * @param {number} in_index target index\n * @param {*} in_value the value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n setEnumByString(in_index, in_value) {\n this.set(in_index, in_value);\n };\n\n /**\n * sets the array properties elements to the content of the given array\n * all changed elements must already exist\n * @param {number} in_offset target start index\n * @param {Array<*>} in_array contains the elements to be set\n * @throws if in_offset is not a number\n * @throws if in_array is not an array\n *\n */\n setRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.setRange or .set');\n }\n if (!_.isArray(in_array)) {\n throw new Error(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.setRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function (element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.setRange.call(this, in_offset, internalValueArray);\n };\n\n /**\n * get the array element at a given index\n * @param {number} in_position the target index\n * @throws if no entry exists at in_position\n * @return {string} the enum string at that index\n */\n getEnumString(in_position) {\n var internalValue = this._dataArrayRef.getValue(in_position);\n var resultEntry = this._enumDictionary.enumEntriesByValue[internalValue];\n if (!resultEntry) {\n throw new Error(MSG.UNKNOWN_ENUM + internalValue);\n } else {\n return resultEntry.id;\n }\n };\n\n /**\n * get an array of the enum strings starting at a given index\n * @param {number} in_offset the start index\n * @param {number} in_length how many should be read\n * @throws if in_offset or in_length are not numbers\n * @throws if no entry exists at one of the positions\n * @return {Array<string>} the enum strings we asked for\n */\n getEnumStrings(in_offset, in_length) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.getEnumStrings');\n }\n if (!_.isNumber(in_length)) {\n throw new Error(MSG.NOT_NUMBER + 'in_length, method: EnumArray.getEnumStrings');\n }\n\n var result = [];\n for (var i = 0; i < in_length; i++) {\n result.push(this.getEnumString(i + in_offset));\n }\n return result;\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 TypeIdHelper.createSerializationTypeId(this._typeid, '', true);\n } else {\n return TypeIdHelper.createSerializationTypeId(this._typeid, 'array', true);\n }\n };\n\n /**\n * @inheritdoc\n */\n getValues() {\n var result = [];\n for (var i = 0; i < this._dataArrayRef.length; i++) {\n var child = this._dataArrayRef.getValue(i);\n result.push(child);\n }\n return result;\n };\n\n /**\n * Creates and initializes the data array\n * @param {Number} in_length the initial length of the array\n */\n _dataArrayCreate(in_length) {\n this._dataArrayRef = new BaseDataArray(Int32Array, in_length);\n };\n\n /**\n * let the user to query all valid entries of an enum array property\n * @return {{}} all valid (string) entries and their (int) values\n */\n getValidEnumList() {\n return this._enumDictionary.enumEntriesById;\n };\n\n}\nEnumArrayProperty.prototype._typeid = 'Enum';\n"]}
1
+ {"version":3,"file":"enumArrayProperty.js","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AAC3E,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACzE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE/D;;;;;;GAMG;AACH,MAAa,iBAAkB,SAAQ,kBAAkB;IACrD;;;;;;;;;OASG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,uEAAuE;Q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OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;SAC9E;IACL,CAAC;IAED;;OAEG;IACH,SAAS;QACL,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAChD,IAAI,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACtB;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED;;;OAGG;IACH,gBAAgB,CAAC,SAAS;QACtB,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAClE,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAChD,CAAC;CACJ;AArMD,8CAqMC;AACD,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { TypeIdHelper } = require('@fluid-experimental/property-changeset');\nconst { BaseDataArray } = require('@fluid-experimental/property-common');\nconst _ = require('lodash');\nconst { ValueArrayProperty } = require('./valueArrayProperty');\n\n/**\n * This class is a specialized version of the ArrayProperty for enums.\n * Since we internally represent enums as Int32Array this is much more\n * efficient and convenient. Additionally, we provide direct access\n * methods to the enums in the array, e.g. .getEnumString(3) directly\n * returns the enum string at position 3 of the array\n */\nexport class EnumArrayProperty extends ValueArrayProperty {\n /**\n * @param {Object} in_params - the parameters\n * @param {Number=} [in_params.length=0] the length of the array, if applicable\n * @param {Object} in_params._enumDictionary the value<->enum dictonary needed to convert the values\n * @constructor\n * @protected\n * @extends property-properties.ValueArrayProperty\n * @alias property-properties.EnumArrayProperty\n * @category Arrays\n */\n constructor(in_params) {\n super(in_params);\n // whenever an EnumProperty is created by the PropertyFactory, we get a\n // dictonary [value->enum] and [enum->value] to efficiently lookup\n // values/enums for the property.\n this._enumDictionary = in_params._enumDictionary;\n }\n\n /**\n * Since an enum can be identified by its value and its enum string,\n * we have to check/convert the type here. We also check if a value\n * is suitable for this enum type.\n * @param {number|string} in_value value to be checked/converted\n * @return {number} internal value for this enum type\n */\n _convertEnumToInternalValue(in_value) {\n // check if we've got a string\n if (_.isString(in_value)) {\n var internalEnum = this._enumDictionary.enumEntriesById[in_value];\n if (!internalEnum) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n }\n return internalEnum.value;\n } else {\n if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n } else {\n return in_value;\n }\n }\n }\n\n /**\n * inserts the content of a given array into the array property\n * @param {number} in_offset target index\n * @param {Array<*>} in_array the array to be inserted\n * @throws if in_array is not an array\n * @throws if in_position is not a number\n * @throws if a value to be inserted is an instance of BaseProperty\n * @throws if tyring to modify a referenced property.\n */\n insertRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.insertRange or .insert');\n }\n if (!_.isArray(in_array)) {\n throw new Error(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.insertRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function(element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.insertRange.call(this, in_offset, internalValueArray);\n }\n\n /**\n * Sets the content of an enum in an enum array\n * @param {number} in_index target index\n * @param {*} in_value the value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n set(in_index, in_value) {\n if (!_.isNumber(in_value) && !_.isString(in_value)) {\n throw new Error(MSG.VALUE_STRING_OR_NUMBER + in_value);\n }\n this.setRange(in_index, [in_value]);\n }\n\n /**\n * Sets the content of an enum in an enum array. Alternative syntax to .set()\n * @param {number} in_index target index\n * @param {*} in_value the value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n setEnumByString(in_index, in_value) {\n this.set(in_index, in_value);\n }\n\n /**\n * sets the array properties elements to the content of the given array\n * all changed elements must already exist\n * @param {number} in_offset target start index\n * @param {Array<*>} in_array contains the elements to be set\n * @throws if in_offset is not a number\n * @throws if in_array is not an array\n *\n */\n setRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.setRange or .set');\n }\n if (!_.isArray(in_array)) {\n throw new Error(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.setRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function(element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.setRange.call(this, in_offset, internalValueArray);\n }\n\n /**\n * get the array element at a given index\n * @param {number} in_position the target index\n * @throws if no entry exists at in_position\n * @return {string} the enum string at that index\n */\n getEnumString(in_position) {\n var internalValue = this._dataArrayRef.getValue(in_position);\n var resultEntry = this._enumDictionary.enumEntriesByValue[internalValue];\n if (!resultEntry) {\n throw new Error(MSG.UNKNOWN_ENUM + internalValue);\n } else {\n return resultEntry.id;\n }\n }\n\n /**\n * get an array of the enum strings starting at a given index\n * @param {number} in_offset the start index\n * @param {number} in_length how many should be read\n * @throws if in_offset or in_length are not numbers\n * @throws if no entry exists at one of the positions\n * @return {Array<string>} the enum strings we asked for\n */\n getEnumStrings(in_offset, in_length) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.getEnumStrings');\n }\n if (!_.isNumber(in_length)) {\n throw new Error(MSG.NOT_NUMBER + 'in_length, method: EnumArray.getEnumStrings');\n }\n\n var result = [];\n for (var i = 0; i < in_length; i++) {\n result.push(this.getEnumString(i + in_offset));\n }\n return result;\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 TypeIdHelper.createSerializationTypeId(this._typeid, '', true);\n } else {\n return TypeIdHelper.createSerializationTypeId(this._typeid, 'array', true);\n }\n }\n\n /**\n * @inheritdoc\n */\n getValues() {\n var result = [];\n for (var i = 0; i < this._dataArrayRef.length; i++) {\n var child = this._dataArrayRef.getValue(i);\n result.push(child);\n }\n return result;\n }\n\n /**\n * Creates and initializes the data array\n * @param {Number} in_length the initial length of the array\n */\n _dataArrayCreate(in_length) {\n this._dataArrayRef = new BaseDataArray(Int32Array, in_length);\n }\n\n /**\n * let the user to query all valid entries of an enum array property\n * @return {{}} all valid (string) entries and their (int) values\n */\n getValidEnumList() {\n return this._enumDictionary.enumEntriesById;\n }\n}\nEnumArrayProperty.prototype._typeid = 'Enum';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"enumProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":"AAgBA;;GAEG;AACH;IAEI;;;;;;;MAOE;IACF,wBAQC;IAHG,qBAAgD;IAapD;;;;OAIG;IACH,iBAHY,MAAM,CAUjB;IAwBD;;;;;;OAMG;IACH,6BAJW,MAAM,QAahB;IAYD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CACJ"}
1
+ {"version":3,"file":"enumProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":"AAgBA;;GAEG;AACH;IACI;;;;;;;MAOE;IACF,wBAQC;IAHG,qBAAgD;IAapD;;;;OAIG;IACH,iBAHY,MAAM,CAUjB;IAwBD;;;;;;OAMG;IACH,6BAJW,MAAM,QAahB;IAYD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CACJ"}
@@ -8,13 +8,13 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.EnumProperty = void 0;
11
+ const { 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
15
  const { Int32Property } = require('./intProperties');
13
16
  const { _castFunctors } = require('./primitiveTypeCasts');
14
17
  const { ValueProperty } = require('./valueProperty');
15
- const { TypeIdHelper } = require('@fluid-experimental/property-changeset');
16
- const { MSG } = require('@fluid-experimental/property-common').constants;
17
- const { ConsoleUtils } = require('@fluid-experimental/property-common');
18
18
  /**
19
19
  * A primitive property for enums.
20
20
  */
@@ -36,7 +36,6 @@ class EnumProperty extends Int32Property {
36
36
  // default for this property type is '0' if it exists to keep backward compatibility
37
37
  this._data = this._enumDictionary ? this._enumDictionary.defaultValue : 0;
38
38
  }
39
- ;
40
39
  /**
41
40
  * Evaluates enum properties as primitives.
42
41
  * @return {boolean} true since Enum properties are primitives.
@@ -44,7 +43,6 @@ class EnumProperty extends Int32Property {
44
43
  isPrimitiveType() {
45
44
  return true;
46
45
  }
47
- ;
48
46
  /**
49
47
  * Returns the current enum string
50
48
  * @return {string} the string value of the property
@@ -59,7 +57,6 @@ class EnumProperty extends Int32Property {
59
57
  return resultEntry.id;
60
58
  }
61
59
  }
62
- ;
63
60
  /**
64
61
  * Sets the (internal, integer) value of the property
65
62
  *
@@ -82,7 +79,6 @@ class EnumProperty extends Int32Property {
82
79
  ValueProperty.prototype.setValue.call(this, in_value);
83
80
  }
84
81
  }
85
- ;
86
82
  /**
87
83
  * Sets the property by an enum string
88
84
  *
@@ -101,7 +97,6 @@ class EnumProperty extends Int32Property {
101
97
  this.setValue(internalValue);
102
98
  }
103
99
  }
104
- ;
105
100
  /**
106
101
  * Returns the full property type identifier for the ChangeSet including the enum type id
107
102
  * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted
@@ -111,7 +106,6 @@ class EnumProperty extends Int32Property {
111
106
  getFullTypeid(in_hideCollection = false) {
112
107
  return TypeIdHelper.createSerializationTypeId(this._typeid, 'single', true);
113
108
  }
114
- ;
115
109
  /**
116
110
  * let the user to query all valid entries of an enum
117
111
  * @return {{}} all valid (string) entries and their (int) values
@@ -119,7 +113,6 @@ class EnumProperty extends Int32Property {
119
113
  getValidEnumList() {
120
114
  return this._enumDictionary.enumEntriesById;
121
115
  }
122
- ;
123
116
  }
124
117
  exports.EnumProperty = EnumProperty;
125
118
  EnumProperty.prototype._typeid = 'Enum';
@@ -1 +1 @@
1
- {"version":3,"file":"enumProperty.js","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;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,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AAC3E,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AAExE;;GAEG;AACH,MAAa,YAAa,SAAQ,aAAa;IAE3C;;;;;;;MAOE;IACF,YAAY,SAAS;QACjB,KAAK,iBAAG,MAAM,EAAE,MAAM,IAAK,SAAS,EAAG,CAAC;QACxC,uEAAuE;QACvE,mEAAmE;QACnE,iCAAiC;QACjC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;QACjD,oFAAoF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,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QACrE,IAAI,CAAC,YAAY,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,YAAY,GAAG,WAAW,CAAC,CAAC;SACnD;aAAM;YACH,IAAI,aAAa,GAAG,YAAY,CAAC,KAAK,CAAC;YACvC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;SAChC;IACL,CAAC;IAAA,CAAC;IAEF;;;;;OAKG;IACH,aAAa,CAAC,iBAAiB,GAAG,KAAK;QACnC,OAAO,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IAChF,CAAC;IAAA,CAAC;IAEF;;;OAGG;IACH,gBAAgB;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAChD,CAAC;IAAA,CAAC;CACL;AAnGD,oCAmGC;AACD,YAAY,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC;AACxC,YAAY,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,KAAK,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 EnumProperty classes\n */\n\nconst _ = require('lodash');\nconst { Int32Property } = require('./intProperties');\nconst { _castFunctors } = require('./primitiveTypeCasts');\nconst { ValueProperty } = require('./valueProperty');\nconst { TypeIdHelper } = require('@fluid-experimental/property-changeset');\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { ConsoleUtils } = require('@fluid-experimental/property-common');\n\n/**\n * A primitive property for enums.\n */\nexport class EnumProperty extends Int32Property {\n\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Int32Property\n * @alias property-properties.EnumProperty\n * @category Value Properties\n */\n constructor(in_params) {\n super({ typeid: 'Enum', ...in_params });\n // whenever an EnumProperty is created by the PropertyFactory, we get a\n // dictionary [value->enum] and [enum->value] to efficiently lookup\n // values/enums for the property.\n this._enumDictionary = in_params._enumDictionary;\n // default for this property type is '0' if it exists to keep backward compatibility\n this._data = this._enumDictionary ? this._enumDictionary.defaultValue : 0;\n };\n\n /**\n * Evaluates enum properties as primitives.\n * @return {boolean} true since Enum properties are primitives.\n */\n isPrimitiveType() {\n return true;\n };\n\n /**\n * Returns the current enum string\n * @return {string} the string value of the property\n * @throws if no entry exists\n */\n getEnumString() {\n var resultEntry = this._enumDictionary.enumEntriesByValue[this._data];\n if (!resultEntry) {\n throw new Error(MSG.UNKNOWN_ENUM + this._data);\n } else {\n return resultEntry.id;\n }\n };\n\n /**\n * Sets the (internal, integer) value of the property\n *\n * @param {Number|string} in_value the new integer value - it must be a valid enum integer for this property\n * or\n * the new enum value in form of a valid enum string for this EnumProperty\n * @throws if no entry exists for in_value\n *\n */\n setValue(in_value) {\n this._checkIsNotReadOnly(true);\n\n // check if we've got a string\n if (_.isString(in_value)) {\n this.setEnumByString(in_value);\n } else if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n } else {\n ValueProperty.prototype.setValue.call(this, in_value);\n }\n };\n\n /**\n * Sets the property by an enum string\n *\n * @param {string} in_stringId the enum string we want to switch to\n * @throws if in_stringId is not a string\n * @throws if no entry is found for in_stringId\n */\n setEnumByString(in_stringId) {\n ConsoleUtils.assert(_.isString(in_stringId), MSG.STRING_ID_MUST_BE_STRING + in_stringId);\n var internalEnum = this._enumDictionary.enumEntriesById[in_stringId];\n if (!internalEnum) {\n throw new Error(MSG.UNKNOWN_ENUM + in_stringId);\n } else {\n var internalValue = internalEnum.value;\n this.setValue(internalValue);\n }\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 * since that is not aplicable here, this param is ignored\n * @return {string} The typeid\n */\n getFullTypeid(in_hideCollection = false) {\n return TypeIdHelper.createSerializationTypeId(this._typeid, 'single', true);\n };\n\n /**\n * let the user to query all valid entries of an enum\n * @return {{}} all valid (string) entries and their (int) values\n */\n getValidEnumList() {\n return this._enumDictionary.enumEntriesById;\n };\n}\nEnumProperty.prototype._typeid = 'Enum';\nEnumProperty.prototype._castFunctor = _castFunctors.Int32;\n"]}
1
+ {"version":3,"file":"enumProperty.js","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AAC3E,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,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC1D,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAErD;;GAEG;AACH,MAAa,YAAa,SAAQ,aAAa;IAC3C;;;;;;;MAOE;IACF,YAAY,SAAS;QACjB,KAAK,iBAAG,MAAM,EAAE,MAAM,IAAK,SAAS,EAAG,CAAC;QACxC,uEAAuE;QACvE,mEAAmE;QACnE,iCAAiC;QACjC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;QACjD,oFAAoF;QACpF,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED;;;OAGG;IACH,eAAe;QACX,OAAO,IAAI,CAAC;IAChB,CAA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C;IACL,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,iBAAiB,GAAG,KAAK;QACnC,OAAO,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IAChF,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAChD,CAAC;CACJ;AAlGD,oCAkGC;AACD,YAAY,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC;AACxC,YAAY,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,KAAK,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 EnumProperty classes\n */\n\nconst { 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 { Int32Property } = require('./intProperties');\nconst { _castFunctors } = require('./primitiveTypeCasts');\nconst { ValueProperty } = require('./valueProperty');\n\n/**\n * A primitive property for enums.\n */\nexport class EnumProperty extends Int32Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Int32Property\n * @alias property-properties.EnumProperty\n * @category Value Properties\n */\n constructor(in_params) {\n super({ typeid: 'Enum', ...in_params });\n // whenever an EnumProperty is created by the PropertyFactory, we get a\n // dictionary [value->enum] and [enum->value] to efficiently lookup\n // values/enums for the property.\n this._enumDictionary = in_params._enumDictionary;\n // default for this property type is '0' if it exists to keep backward compatibility\n this._data = this._enumDictionary ? this._enumDictionary.defaultValue : 0;\n }\n\n /**\n * Evaluates enum properties as primitives.\n * @return {boolean} true since Enum properties are primitives.\n */\n isPrimitiveType() {\n return true;\n }\n\n /**\n * Returns the current enum string\n * @return {string} the string value of the property\n * @throws if no entry exists\n */\n getEnumString() {\n var resultEntry = this._enumDictionary.enumEntriesByValue[this._data];\n if (!resultEntry) {\n throw new Error(MSG.UNKNOWN_ENUM + this._data);\n } else {\n return resultEntry.id;\n }\n }\n\n /**\n * Sets the (internal, integer) value of the property\n *\n * @param {Number|string} in_value the new integer value - it must be a valid enum integer for this property\n * or\n * the new enum value in form of a valid enum string for this EnumProperty\n * @throws if no entry exists for in_value\n *\n */\n setValue(in_value) {\n this._checkIsNotReadOnly(true);\n\n // check if we've got a string\n if (_.isString(in_value)) {\n this.setEnumByString(in_value);\n } else if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n } else {\n ValueProperty.prototype.setValue.call(this, in_value);\n }\n }\n\n /**\n * Sets the property by an enum string\n *\n * @param {string} in_stringId the enum string we want to switch to\n * @throws if in_stringId is not a string\n * @throws if no entry is found for in_stringId\n */\n setEnumByString(in_stringId) {\n ConsoleUtils.assert(_.isString(in_stringId), MSG.STRING_ID_MUST_BE_STRING + in_stringId);\n var internalEnum = this._enumDictionary.enumEntriesById[in_stringId];\n if (!internalEnum) {\n throw new Error(MSG.UNKNOWN_ENUM + in_stringId);\n } else {\n var internalValue = internalEnum.value;\n this.setValue(internalValue);\n }\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 * since that is not aplicable here, this param is ignored\n * @return {string} The typeid\n */\n getFullTypeid(in_hideCollection = false) {\n return TypeIdHelper.createSerializationTypeId(this._typeid, 'single', true);\n }\n\n /**\n * let the user to query all valid entries of an enum\n * @return {{}} all valid (string) entries and their (int) values\n */\n getValidEnumList() {\n return this._enumDictionary.enumEntriesById;\n }\n}\nEnumProperty.prototype._typeid = 'Enum';\nEnumProperty.prototype._castFunctor = _castFunctors.Int32;\n"]}
@@ -27,7 +27,6 @@ class Float32Property extends ValueProperty {
27
27
  // default for this property type is '0'
28
28
  this._data = 0;
29
29
  }
30
- ;
31
30
  }
32
31
  exports.Float32Property = Float32Property;
33
32
  Float32Property.prototype._castFunctor = _castFunctors.Float32;
@@ -49,7 +48,6 @@ class Float64Property extends ValueProperty {
49
48
  // default for this property type is '0'
50
49
  this._data = 0;
51
50
  }
52
- ;
53
51
  }
54
52
  exports.Float64Property = Float64Property;
55
53
  Float64Property.prototype._castFunctor = _castFunctors.Float64;
@@ -1 +1 @@
1
- {"version":3,"file":"floatProperties.js","sourceRoot":"","sources":["../../src/properties/floatProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAa,eAAgB,SAAQ,aAAa;IAC9C;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,wCAAwC;QACxC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACnB,CAAC;IAAA,CAAC;CACL;AAfD,0CAeC;AACD,eAAe,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC;AAC/D,eAAe,CAAC,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC;AAE9C;;GAEG;AAEH,MAAa,eAAgB,SAAQ,aAAa;IAC9C;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,wCAAwC;QACxC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACnB,CAAC;IAAA,CAAC;CACL;AAdD,0CAcC;AACD,eAAe,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC;AAC/D,eAAe,CAAC,SAAS,CAAC,OAAO,GAAG,SAAS,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 Float*Property classes\n */\n\nconst { ValueProperty } = require('./valueProperty');\nconst { _castFunctors } = require('./primitiveTypeCasts');\n\n/**\n * A primitive property for a 32 bit floating point value.\n */\nexport class Float32Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Float32Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n\n // default for this property type is '0'\n this._data = 0;\n };\n}\nFloat32Property.prototype._castFunctor = _castFunctors.Float32;\nFloat32Property.prototype._typeid = 'Float32';\n\n/**\n * A primitive property for a 64 bit floating point value.\n */\n\nexport class Float64Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Float64Property\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}\nFloat64Property.prototype._castFunctor = _castFunctors.Float64;\nFloat64Property.prototype._typeid = 'Float64';\n"]}
1
+ {"version":3,"file":"floatProperties.js","sourceRoot":"","sources":["../../src/properties/floatProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAa,eAAgB,SAAQ,aAAa;IAC9C;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,wCAAwC;QACxC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACnB,CAAC;CACJ;AAfD,0CAeC;AACD,eAAe,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC;AAC/D,eAAe,CAAC,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC;AAE9C;;GAEG;AAEH,MAAa,eAAgB,SAAQ,aAAa;IAC9C;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,wCAAwC;QACxC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACnB,CAAC;CACJ;AAdD,0CAcC;AACD,eAAe,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC;AAC/D,eAAe,CAAC,SAAS,CAAC,OAAO,GAAG,SAAS,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 Float*Property classes\n */\n\nconst { ValueProperty } = require('./valueProperty');\nconst { _castFunctors } = require('./primitiveTypeCasts');\n\n/**\n * A primitive property for a 32 bit floating point value.\n */\nexport class Float32Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Float32Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n\n // default for this property type is '0'\n this._data = 0;\n }\n}\nFloat32Property.prototype._castFunctor = _castFunctors.Float32;\nFloat32Property.prototype._typeid = 'Float32';\n\n/**\n * A primitive property for a 64 bit floating point value.\n */\n\nexport class Float64Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Float64Property\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}\nFloat64Property.prototype._castFunctor = _castFunctors.Float64;\nFloat64Property.prototype._typeid = 'Float64';\n"]}
@@ -4,57 +4,26 @@
4
4
  */
5
5
  import { ArrayProperty } from './arrayProperty';
6
6
  import { BaseProperty } from './baseProperty';
7
- import { BoolArrayProperty } from './valueArrayProperty';
8
- import { BoolMapProperty } from './valueMapProperty';
9
7
  import { BoolProperty } from './boolProperty';
10
8
  import { ContainerProperty } from './containerProperty';
11
9
  import { EnumArrayProperty } from './enumArrayProperty';
12
10
  import { EnumProperty } from './enumProperty';
13
- import { Float32ArrayProperty } from './valueArrayProperty';
14
- import { Float32MapProperty } from './valueMapProperty';
15
- import { Float32Property } from './floatProperties';
16
- import { Float64ArrayProperty } from './valueArrayProperty';
17
- import { Float64MapProperty } from './valueMapProperty';
18
- import { Float64Property } from './floatProperties';
11
+ import { Float32Property, Float64Property } from './floatProperties';
19
12
  import { IndexedCollectionBaseProperty } from './indexedCollectionBaseProperty';
20
- import { Int16ArrayProperty } from './valueArrayProperty';
21
- import { Int16MapProperty } from './valueMapProperty';
22
- import { Int16Property } from './intProperties';
23
- import { Int32ArrayProperty } from './valueArrayProperty';
24
- import { Int32MapProperty } from './valueMapProperty';
25
- import { Int32Property } from './intProperties';
26
- import { Int64ArrayProperty } from './valueArrayProperty';
27
- import { Int64MapProperty } from './valueMapProperty';
28
- import { Int64Property } from './intProperties';
29
- import { Int8ArrayProperty } from './valueArrayProperty';
30
- import { Int8MapProperty } from './valueMapProperty';
31
- import { Int8Property } from './intProperties';
13
+ import { Int16Property, Int32Property, Int64Property, Int8Property, Uint64Property } from './intProperties';
32
14
  import { MapProperty } from './mapProperty';
33
15
  import { NamedNodeProperty } from './namedNodeProperty';
34
16
  import { NamedProperty } from './namedProperty';
35
17
  import { NodeProperty } from './nodeProperty';
18
+ import { _castFunctors } from './primitiveTypeCasts';
36
19
  import { ReferenceArrayProperty } from './referenceArrayProperty';
37
20
  import { ReferenceMapProperty } from './referenceMapProperty';
38
21
  import { ReferenceProperty } from './referenceProperty';
39
22
  import { SetProperty } from './setProperty';
40
- import { StringArrayProperty } from './valueArrayProperty';
41
- import { StringMapProperty } from './valueMapProperty';
42
23
  import { StringProperty } from './stringProperty';
43
- import { Uint16ArrayProperty } from './valueArrayProperty';
44
- import { Uint16MapProperty } from './valueMapProperty';
45
- import { Uint16Property } from './uintProperties';
46
- import { Uint32ArrayProperty } from './valueArrayProperty';
47
- import { Uint32MapProperty } from './valueMapProperty';
48
- import { Uint32Property } from './uintProperties';
49
- import { Uint64ArrayProperty } from './valueArrayProperty';
50
- import { Uint64MapProperty } from './valueMapProperty';
51
- import { Uint64Property } from './intProperties';
52
- import { Uint8ArrayProperty } from './valueArrayProperty';
53
- import { Uint8MapProperty } from './valueMapProperty';
54
- import { Uint8Property } from './uintProperties';
55
- import { ValueArrayProperty } from './valueArrayProperty';
56
- import { ValueMapProperty } from './valueMapProperty';
24
+ import { Uint16Property, Uint32Property, Uint8Property } from './uintProperties';
25
+ import { BoolArrayProperty, Float32ArrayProperty, Float64ArrayProperty, Int16ArrayProperty, Int32ArrayProperty, Int64ArrayProperty, Int8ArrayProperty, StringArrayProperty, Uint16ArrayProperty, Uint32ArrayProperty, Uint64ArrayProperty, Uint8ArrayProperty, ValueArrayProperty } from './valueArrayProperty';
26
+ import { BoolMapProperty, Float32MapProperty, Float64MapProperty, Int16MapProperty, Int32MapProperty, Int64MapProperty, Int8MapProperty, StringMapProperty, Uint16MapProperty, Uint32MapProperty, Uint64MapProperty, Uint8MapProperty, ValueMapProperty } from './valueMapProperty';
57
27
  import { ValueProperty } from './valueProperty';
58
- import { _castFunctors } from './primitiveTypeCasts';
59
- export { ArrayProperty, BaseProperty, BoolArrayProperty, BoolMapProperty, BoolProperty, ContainerProperty, EnumArrayProperty, EnumProperty, Float32ArrayProperty, Float32MapProperty, Float32Property, Float64ArrayProperty, Float64MapProperty, Float64Property, IndexedCollectionBaseProperty, Int16ArrayProperty, Int16MapProperty, Int16Property, Int32ArrayProperty, Int32MapProperty, Int32Property, Int64ArrayProperty, Int64MapProperty, Int64Property, Int8ArrayProperty, Int8MapProperty, Int8Property, MapProperty, NamedNodeProperty, NamedProperty, NodeProperty, ReferenceArrayProperty, ReferenceMapProperty, ReferenceProperty, SetProperty, StringArrayProperty, StringMapProperty, StringProperty, Uint16ArrayProperty, Uint16MapProperty, Uint16Property, Uint32ArrayProperty, Uint32MapProperty, Uint32Property, Uint64ArrayProperty, Uint64MapProperty, Uint64Property, Uint8ArrayProperty, Uint8MapProperty, Uint8Property, ValueArrayProperty, ValueMapProperty, ValueProperty, _castFunctors };
28
+ export { ArrayProperty, BaseProperty, BoolArrayProperty, BoolMapProperty, BoolProperty, ContainerProperty, EnumArrayProperty, EnumProperty, Float32ArrayProperty, Float32MapProperty, Float32Property, Float64ArrayProperty, Float64MapProperty, Float64Property, IndexedCollectionBaseProperty, Int16ArrayProperty, Int16MapProperty, Int16Property, Int32ArrayProperty, Int32MapProperty, Int32Property, Int64ArrayProperty, Int64MapProperty, Int64Property, Int8ArrayProperty, Int8MapProperty, Int8Property, MapProperty, NamedNodeProperty, NamedProperty, NodeProperty, ReferenceArrayProperty, ReferenceMapProperty, ReferenceProperty, SetProperty, StringArrayProperty, StringMapProperty, StringProperty, Uint16ArrayProperty, Uint16MapProperty, Uint16Property, Uint32ArrayProperty, Uint32MapProperty, Uint32Property, Uint64ArrayProperty, Uint64MapProperty, Uint64Property, Uint8ArrayProperty, Uint8MapProperty, Uint8Property, ValueArrayProperty, ValueMapProperty, ValueProperty, _castFunctors, };
60
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/properties/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB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ACjB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,6BAA6B,EAC7B,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,aAAa,EAChB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/properties/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACH,eAAe,EACf,eAAe,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EACH,aAAa,EACb,aAAa,EACb,aA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