@fluid-experimental/property-properties 2.0.0-dev.7.4.0.215930 → 2.0.0-dev.7.4.0.217212

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 (162) hide show
  1. package/dist/enableValidations.d.ts +1 -0
  2. package/dist/enableValidations.d.ts.map +1 -1
  3. package/dist/enableValidations.js +1 -0
  4. package/dist/enableValidations.js.map +1 -1
  5. package/dist/properties/arrayProperty.d.ts +3 -0
  6. package/dist/properties/arrayProperty.d.ts.map +1 -1
  7. package/dist/properties/arrayProperty.js +3 -0
  8. package/dist/properties/arrayProperty.js.map +1 -1
  9. package/dist/properties/baseProperty.d.ts +1 -0
  10. package/dist/properties/baseProperty.d.ts.map +1 -1
  11. package/dist/properties/baseProperty.js +1 -0
  12. package/dist/properties/baseProperty.js.map +1 -1
  13. package/dist/properties/containerProperty.d.ts +1 -0
  14. package/dist/properties/containerProperty.d.ts.map +1 -1
  15. package/dist/properties/containerProperty.js +1 -0
  16. package/dist/properties/containerProperty.js.map +1 -1
  17. package/dist/properties/enumArrayProperty.d.ts +1 -0
  18. package/dist/properties/enumArrayProperty.d.ts.map +1 -1
  19. package/dist/properties/enumArrayProperty.js +1 -0
  20. package/dist/properties/enumArrayProperty.js.map +1 -1
  21. package/dist/properties/enumProperty.d.ts +1 -0
  22. package/dist/properties/enumProperty.d.ts.map +1 -1
  23. package/dist/properties/enumProperty.js +1 -0
  24. package/dist/properties/enumProperty.js.map +1 -1
  25. package/dist/properties/intProperties.d.ts +2 -0
  26. package/dist/properties/intProperties.d.ts.map +1 -1
  27. package/dist/properties/intProperties.js +2 -0
  28. package/dist/properties/intProperties.js.map +1 -1
  29. package/dist/properties/mapProperty.d.ts +1 -0
  30. package/dist/properties/mapProperty.d.ts.map +1 -1
  31. package/dist/properties/mapProperty.js +1 -0
  32. package/dist/properties/mapProperty.js.map +1 -1
  33. package/dist/properties/nodeProperty.d.ts +1 -0
  34. package/dist/properties/nodeProperty.d.ts.map +1 -1
  35. package/dist/properties/nodeProperty.js +1 -0
  36. package/dist/properties/nodeProperty.js.map +1 -1
  37. package/dist/properties/referenceArrayProperty.d.ts +1 -0
  38. package/dist/properties/referenceArrayProperty.d.ts.map +1 -1
  39. package/dist/properties/referenceArrayProperty.js +1 -0
  40. package/dist/properties/referenceArrayProperty.js.map +1 -1
  41. package/dist/properties/referenceMapProperty.d.ts +1 -0
  42. package/dist/properties/referenceMapProperty.d.ts.map +1 -1
  43. package/dist/properties/referenceMapProperty.js +1 -0
  44. package/dist/properties/referenceMapProperty.js.map +1 -1
  45. package/dist/properties/referenceProperty.d.ts +1 -0
  46. package/dist/properties/referenceProperty.d.ts.map +1 -1
  47. package/dist/properties/referenceProperty.js +1 -0
  48. package/dist/properties/referenceProperty.js.map +1 -1
  49. package/dist/properties/setProperty.d.ts +1 -0
  50. package/dist/properties/setProperty.d.ts.map +1 -1
  51. package/dist/properties/setProperty.js +1 -0
  52. package/dist/properties/setProperty.js.map +1 -1
  53. package/dist/properties/stringProperty.d.ts +1 -0
  54. package/dist/properties/stringProperty.d.ts.map +1 -1
  55. package/dist/properties/stringProperty.js +1 -0
  56. package/dist/properties/stringProperty.js.map +1 -1
  57. package/dist/properties/valueArrayProperty.d.ts +1 -0
  58. package/dist/properties/valueArrayProperty.d.ts.map +1 -1
  59. package/dist/properties/valueArrayProperty.js +1 -0
  60. package/dist/properties/valueArrayProperty.js.map +1 -1
  61. package/dist/properties/valueMapProperty.d.ts +1 -0
  62. package/dist/properties/valueMapProperty.d.ts.map +1 -1
  63. package/dist/properties/valueMapProperty.js +1 -0
  64. package/dist/properties/valueMapProperty.js.map +1 -1
  65. package/dist/properties/valueProperty.d.ts +1 -0
  66. package/dist/properties/valueProperty.d.ts.map +1 -1
  67. package/dist/properties/valueProperty.js +1 -0
  68. package/dist/properties/valueProperty.js.map +1 -1
  69. package/dist/propertyFactory.d.ts +3 -0
  70. package/dist/propertyFactory.d.ts.map +1 -1
  71. package/dist/propertyFactory.js +3 -0
  72. package/dist/propertyFactory.js.map +1 -1
  73. package/dist/propertyTemplate.d.ts +5 -6
  74. package/dist/propertyTemplate.d.ts.map +1 -1
  75. package/dist/propertyTemplate.js +3 -4
  76. package/dist/propertyTemplate.js.map +1 -1
  77. package/dist/propertyUtils.d.ts +3 -0
  78. package/dist/propertyUtils.d.ts.map +1 -1
  79. package/dist/propertyUtils.js +3 -0
  80. package/dist/propertyUtils.js.map +1 -1
  81. package/dist/test/tsconfig.tsbuildinfo +1 -1
  82. package/lib/enableValidations.d.ts +1 -0
  83. package/lib/enableValidations.d.ts.map +1 -1
  84. package/lib/enableValidations.js +1 -0
  85. package/lib/enableValidations.js.map +1 -1
  86. package/lib/properties/arrayProperty.d.ts +3 -0
  87. package/lib/properties/arrayProperty.d.ts.map +1 -1
  88. package/lib/properties/arrayProperty.js +3 -0
  89. package/lib/properties/arrayProperty.js.map +1 -1
  90. package/lib/properties/baseProperty.d.ts +1 -0
  91. package/lib/properties/baseProperty.d.ts.map +1 -1
  92. package/lib/properties/baseProperty.js +1 -0
  93. package/lib/properties/baseProperty.js.map +1 -1
  94. package/lib/properties/containerProperty.d.ts +1 -0
  95. package/lib/properties/containerProperty.d.ts.map +1 -1
  96. package/lib/properties/containerProperty.js +1 -0
  97. package/lib/properties/containerProperty.js.map +1 -1
  98. package/lib/properties/enumArrayProperty.d.ts +1 -0
  99. package/lib/properties/enumArrayProperty.d.ts.map +1 -1
  100. package/lib/properties/enumArrayProperty.js +1 -0
  101. package/lib/properties/enumArrayProperty.js.map +1 -1
  102. package/lib/properties/enumProperty.d.ts +1 -0
  103. package/lib/properties/enumProperty.d.ts.map +1 -1
  104. package/lib/properties/enumProperty.js +1 -0
  105. package/lib/properties/enumProperty.js.map +1 -1
  106. package/lib/properties/intProperties.d.ts +2 -0
  107. package/lib/properties/intProperties.d.ts.map +1 -1
  108. package/lib/properties/intProperties.js +2 -0
  109. package/lib/properties/intProperties.js.map +1 -1
  110. package/lib/properties/mapProperty.d.ts +1 -0
  111. package/lib/properties/mapProperty.d.ts.map +1 -1
  112. package/lib/properties/mapProperty.js +1 -0
  113. package/lib/properties/mapProperty.js.map +1 -1
  114. package/lib/properties/nodeProperty.d.ts +1 -0
  115. package/lib/properties/nodeProperty.d.ts.map +1 -1
  116. package/lib/properties/nodeProperty.js +1 -0
  117. package/lib/properties/nodeProperty.js.map +1 -1
  118. package/lib/properties/referenceArrayProperty.d.ts +1 -0
  119. package/lib/properties/referenceArrayProperty.d.ts.map +1 -1
  120. package/lib/properties/referenceArrayProperty.js +1 -0
  121. package/lib/properties/referenceArrayProperty.js.map +1 -1
  122. package/lib/properties/referenceMapProperty.d.ts +1 -0
  123. package/lib/properties/referenceMapProperty.d.ts.map +1 -1
  124. package/lib/properties/referenceMapProperty.js +1 -0
  125. package/lib/properties/referenceMapProperty.js.map +1 -1
  126. package/lib/properties/referenceProperty.d.ts +1 -0
  127. package/lib/properties/referenceProperty.d.ts.map +1 -1
  128. package/lib/properties/referenceProperty.js +1 -0
  129. package/lib/properties/referenceProperty.js.map +1 -1
  130. package/lib/properties/setProperty.d.ts +1 -0
  131. package/lib/properties/setProperty.d.ts.map +1 -1
  132. package/lib/properties/setProperty.js +1 -0
  133. package/lib/properties/setProperty.js.map +1 -1
  134. package/lib/properties/stringProperty.d.ts +1 -0
  135. package/lib/properties/stringProperty.d.ts.map +1 -1
  136. package/lib/properties/stringProperty.js +1 -0
  137. package/lib/properties/stringProperty.js.map +1 -1
  138. package/lib/properties/valueArrayProperty.d.ts +1 -0
  139. package/lib/properties/valueArrayProperty.d.ts.map +1 -1
  140. package/lib/properties/valueArrayProperty.js +1 -0
  141. package/lib/properties/valueArrayProperty.js.map +1 -1
  142. package/lib/properties/valueMapProperty.d.ts +1 -0
  143. package/lib/properties/valueMapProperty.d.ts.map +1 -1
  144. package/lib/properties/valueMapProperty.js +1 -0
  145. package/lib/properties/valueMapProperty.js.map +1 -1
  146. package/lib/properties/valueProperty.d.ts +1 -0
  147. package/lib/properties/valueProperty.d.ts.map +1 -1
  148. package/lib/properties/valueProperty.js +1 -0
  149. package/lib/properties/valueProperty.js.map +1 -1
  150. package/lib/propertyFactory.d.ts +3 -0
  151. package/lib/propertyFactory.d.ts.map +1 -1
  152. package/lib/propertyFactory.js +3 -0
  153. package/lib/propertyFactory.js.map +1 -1
  154. package/lib/propertyTemplate.d.ts +5 -6
  155. package/lib/propertyTemplate.d.ts.map +1 -1
  156. package/lib/propertyTemplate.js +3 -4
  157. package/lib/propertyTemplate.js.map +1 -1
  158. package/lib/propertyUtils.d.ts +3 -0
  159. package/lib/propertyUtils.d.ts.map +1 -1
  160. package/lib/propertyUtils.js +3 -0
  161. package/lib/propertyUtils.js.map +1 -1
  162. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"baseProperty.js","sourceRoot":"","sources":["../../src/properties/baseProperty.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4DAA4D;AAE5D,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EACN,SAAS,EACT,UAAU,EAEV,YAAY,GACZ,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,IAAI,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAE1E,MAAM,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,SAAS,CAAC;AACnD,MAAM,eAAe,GAAG,OAAO,CAAC;AAEhC;;GAEG;AACH,IAAK,oBAOJ;AAPD,WAAK,oBAAoB;IACxB,iEAAiE;IACjE,mEAAM,CAAA;IACN,yGAAyG;IACzG,uEAAQ,CAAA;IACR,kDAAkD;IAClD,iEAAK,CAAA;AACN,CAAC,EAPI,oBAAoB,KAApB,oBAAoB,QAOxB;AAED;;GAEG;AACH,IAAK,oBAOJ;AAPD,WAAK,oBAAoB;IACxB,gDAAgD;IAChD,iEAAK,CAAA;IACL,2EAA2E;IAC3E,mFAA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;AAiTzC,YAAoB,CAAC,SAAS,CAAC,WAAW,GAAG,KAAK,CAAC;AACnD,YAAoB,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACnD,YAAoB,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/* eslint accessor-pairs: [2, { \"getWithoutSet\": false }] */\n\nimport _ from \"lodash\";\nimport {\n\tChangeSet,\n\tPathHelper,\n\tSerializedChangeSet,\n\tTypeIdHelper,\n} from \"@fluid-experimental/property-changeset\";\nimport { ConsoleUtils, constants } from \"@fluid-experimental/property-common\";\nimport { LazyLoadedProperties as Property } from \"./lazyLoadedProperties\";\n\nconst { MSG, PROPERTY_PATH_DELIMITER } = constants;\nconst BREAK_TRAVERSAL = \"BREAK\";\n\n/**\n * Determines in which cases a reference will automatically be resolved\n */\nenum REFERENCE_RESOLUTION {\n\t/** The resolution will always automatically follow references */\n\tALWAYS,\n\t/** If a reference is the last entry during the path resolution, it will not automatically be resolved */\n\tNO_LEAFS,\n\t/** References are never automatically resolved */\n\tNEVER,\n}\n\n/**\n * Used to indicate the state of a property. These flags can be connected via OR.\n */\nenum MODIFIED_STATE_FLAGS {\n\t/** No changes to this property at the moment */\n\tCLEAN,\n\t/** The property is marked as changed in the currently pending ChangeSet */\n\tPENDING_CHANGE,\n\t/** The property has been modified and the result has not yet been reported to the application for scene updates */\n\tDIRTY,\n}\n\n/**\n * Token Types\n * @enum Object\n * Type of the token in the path string\n */\nconst PATH_TOKENS = {\n\t/** A / at the beginning of the path */\n\tROOT: { token: \"ROOT\" },\n\t/** A * that indicates a dereferencing operation */ // note: reversed!\n\tREF: { token: \"REF\" },\n\t/** A ../ that indicates one step above the current path */\n\tUP: { token: \"UP\" },\n};\n\ninterface IBasePropertyParams {\n\t/** id of the property */\n\tid?: string;\n\t/** The type unique identifier */\n\ttypeid?: string;\n\t/** The length of the property. Only valid if the property is an array, otherwise the length defaults to 1 */\n\tlength: number;\n\t/** The type of property this template represents i.e. single, array, map, set. */\n\tcontext: string;\n\n\t// TODO: UNUSED PARAMETER ??\n\t/** List of property templates that are used to define children properties */\n\tproperties: BaseProperty[];\n\n\t// TODO: UNUSED PARAMETER ??\n\t/** List of property template typeids that this PropertyTemplate inherits from */\n\tinherits: string[];\n}\n\ninterface ISerializeOptions {\n\t/** Only include dirty entries in the serialization */\n\tdirtyOnly?: boolean;\n\t/** Include the typeid of the root of the hierarchy */\n\tincludeRootTypeid?: boolean;\n\t/** The type of dirtiness to use when reporting dirty changes. */\n\tdirtinessType?: MODIFIED_STATE_FLAGS;\n\t/**\n\t * If this is set to true, the serialize\n\t * function will descend into referenced repositories. WARNING: if there are loops in the references\n\t * this can result in an infinite loop\n\t */\n\tincludeReferencedRepositories?: boolean;\n}\n\n/**\n * The options to selectively create only a subset of a property.\n *\n * For now the filtering options are propagated by many functions, but are actually used only by\n * functions that create properties from schemas. It is then possible to create only a subset of\n * the properties of a schema by providing a restricted list of paths.\n *\n * Thus, with the filtering options, it is NOT possible to prevent a part of a ChangeSet from being\n * processed (in `applyChangeSet()` for example), it is NOT possible to prevent a property from being\n * created by a direct call to a function like `deserialize()` or `createProperty()`.\n */\nexport abstract class BaseProperty {\n\tprotected _id: string | undefined;\n\tprotected _isConstant: boolean;\n\tprotected _dirty: MODIFIED_STATE_FLAGS;\n\tprotected _typeid: string;\n\tprotected _context: string;\n\tprotected _parent: BaseProperty | undefined;\n\tprotected _noDirtyInBase: boolean;\n\n\t_tree: any;\n\t_checkoutView: any;\n\t_checkedOutRepositoryInfo: any;\n\n\tconstructor(in_params: IBasePropertyParams) {\n\t\t// Pre-conditions\n\t\t// This test has been disabled for performance reasons, if it would be incorrect,\n\t\t// the next line will throw anyways\n\t\t// ConsoleUtils.assert(in_params, MSG.PROP_CONSTRUCTOR_EXPECTS_OBJECTS);\n\n\t\tif (this._id !== in_params.id) {\n\t\t\tthis._id = in_params.id;\n\t\t}\n\n\t\t// Makes sure context value is fine\n\t\t// This assertion has been disabled for performance reasons. This is not a user facing\n\t\t// constructor function and therefore we rely on PropertyFactory to correctly provide the context.\n\t\t/* ConsoleUtils.assert(!in_params.context || in_params.context === this._context,\n MSG.CONTEXT_NOT_AS_EXPECTED + this._context + ' != ' + in_params.context); */\n\n\t\t// Sets typeid if default value is not fine\n\t\tlet typeId = in_params.typeid || \"BaseProperty\";\n\t\tif (typeId !== this._typeid) {\n\t\t\tthis._typeid = typeId;\n\t\t}\n\n\t\tthis._parent = undefined;\n\t\t// internal management\n\t\tif (!this._noDirtyInBase) {\n\t\t\tthis._dirty = MODIFIED_STATE_FLAGS.CLEAN;\n\t\t}\n\t}\n\n\tstatic MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS;\n\tstatic REFERENCE_RESOLUTION = REFERENCE_RESOLUTION;\n\tstatic PATH_TOKENS = PATH_TOKENS;\n\n\t/**\n\t * @returns The typeid of this property\n\t */\n\tgetTypeid(): string {\n\t\treturn this._typeid;\n\t}\n\n\t/**\n\t * @returns The context of this property\n\t */\n\tgetContext(): string {\n\t\treturn this._context;\n\t}\n\n\t/**\n\t * Get the scope to which this property belongs to.\n\t * @returns The guid representing the scope in which the\n\t * property belongs to\n\t */\n\tprotected _getScope(): string | undefined {\n\t\treturn this._parent ? this.getRoot()._getScope() : undefined;\n\t}\n\n\t/**\n\t * Returns the full property type identifier for the ChangeSet including the enum type id\n\t * @param in_hideCollection - if true the collection type (if applicable) will be omitted since that is not\n\t * applicable here, this param is ignored.\n\t * @returns The typeid\n\t */\n\tgetFullTypeid(in_hideCollection = false): string {\n\t\treturn this._typeid;\n\t}\n\n\t/**\n\t * Updates the parent for the property\n\t *\n\t * @param in_property - The parent property\n\t */\n\tprotected _setParent(in_property: BaseProperty) {\n\t\tthis._parent = in_property;\n\n\t\t// If the property is dirty but not its parent, dirty the parent. In cases like named properties\n\t\t// and default values, a parent is set after a value is set; we get a case where the\n\t\t// property is dirty but not its parent and the change is not included in a changeSet.\n\t\tif (this._parent && this._isDirty() && !this._parent._isDirty()) {\n\t\t\tthis._parent._setDirty(false, this);\n\t\t}\n\t}\n\n\t/**\n\t * Is this property the root of the property set tree?\n\t *\n\t * @returns True if it is a root, otherwise false.\n\t */\n\tisRoot(): boolean {\n\t\t// This checks, whether this is the root of a CheckOutView\n\t\t// (all other properties should have a parent property)\n\t\treturn this._parent === undefined;\n\t}\n\n\t/**\n\t * Is this property the ancestor of in_otherProperty?\n\t * Note: A property is not considered an ancestor of itself\n\t * @param in_otherProperty - possible descendant\n\t * @throws if in_otherProperty is not defined.\n\t * @returns True if it is a ancestor, otherwise false.\n\t */\n\tisAncestorOf(in_otherProperty: BaseProperty): boolean {\n\t\tConsoleUtils.assert(in_otherProperty, MSG.MISSING_IN_OTHERPROP);\n\t\tvar parent = in_otherProperty.getParent();\n\t\twhile (parent) {\n\t\t\tif (parent === this) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tparent = parent.getParent();\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Is this property the descendant of in_otherProperty?\n\t * Note: A property is not considered a descendant of itself\n\t * @param in_otherProperty - possible ancestor\n\t * @throws if in_otherProperty is not defined.\n\t * @returns True if it is a descendant, otherwise false.\n\t */\n\tisDescendantOf(in_otherProperty: BaseProperty): boolean {\n\t\tConsoleUtils.assert(in_otherProperty, MSG.MISSING_IN_OTHERPROP);\n\t\treturn in_otherProperty.isAncestorOf(this);\n\t}\n\n\t/**\n\t * Is this property a leaf node with regard to flattening?\n\t *\n\t * TODO: Which semantics should flattening have? It stops at primitive types and collections?\n\t *\n\t * @returns True if it is a leaf with regard to flattening\n\t */\n\t_isFlattenLeaf(): boolean {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Get the parent of this property\n\t *\n\t * @returns The parent of this property (or undefined if none exist)\n\t */\n\tgetParent(): BaseProperty | undefined {\n\t\treturn this._parent;\n\t}\n\n\t/**\n\t * checks whether the property is dynamic (only properties inherting from NodeProperty are)\n\t * @returns True if it is a dynamic property.\n\t */\n\tisDynamic() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Sets the property as dirty and/or pending. This will add one or both flags if not already set and will\n\t * do the same for its parent. This does not clear any flag, it only sets.\n\t *\n\t * @param in_reportToView - By default, the dirtying will always be reported to the checkout view\n\t * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t * @param in_callingChild - The child which is dirtying its parent\n\t * @param in_flags - The flags to set.\n\t * @private\n\t */\n\t_setDirty(\n\t\tin_reportToView = true,\n\t\tin_callingChild: BaseProperty = undefined,\n\t\tin_flags: MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS.DIRTY |\n\t\t\tMODIFIED_STATE_FLAGS.PENDING_CHANGE,\n\t) {\n\t\tif (in_flags === undefined) {\n\t\t\tin_flags = MODIFIED_STATE_FLAGS.DIRTY | MODIFIED_STATE_FLAGS.PENDING_CHANGE;\n\t\t}\n\t\tvar reportToView = in_reportToView;\n\t\tif (reportToView === undefined) {\n\t\t\treportToView = true;\n\t\t}\n\t\t// We only update the flags upwards in the tree, when the corresponding nodes are not already flagged\n\t\tvar oldFlags = this._getDirtyFlags();\n\t\tif ((oldFlags & in_flags) !== in_flags) {\n\t\t\t// only dirty once until clean.\n\t\t\tthis._setDirtyFlags(oldFlags | in_flags);\n\n\t\t\t// Report dirtiness upwards in the hierarchy\n\t\t\tif (this._parent) {\n\t\t\t\tthis._parent._setDirty(reportToView, this, in_flags);\n\t\t\t\treportToView = false;\n\t\t\t}\n\t\t}\n\t\tif (reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Sets the dirty flags for this property\n\t * @param in_flags - The dirty flags\n\t */\n\t_setDirtyFlags(in_flags: MODIFIED_STATE_FLAGS) {\n\t\tthis._dirty = in_flags;\n\t}\n\n\t/**\n\t * Gets the dirty flags for this property\n\t * @returns The dirty flags\n\t */\n\t_getDirtyFlags(): MODIFIED_STATE_FLAGS {\n\t\treturn this._dirty;\n\t}\n\n\t/**\n\t * Helper function, which reports the fact that a property has been dirtied to the checkout view\n\t * @private\n\t */\n\t// TODO: Cleaner way to make the property tree aware of the DDS hosting it.\n\t// Currently, this._tree is set in SharedPropertyTree constructor.\n\t_reportDirtinessToView() {\n\t\tlet currentNode: BaseProperty = this;\n\n\t\twhile (currentNode._parent) {\n\t\t\tcurrentNode = currentNode._parent;\n\t\t}\n\n\t\tif (\n\t\t\tcurrentNode._tree &&\n\t\t\tcurrentNode._tree.notificationDelayScope === 0 &&\n\t\t\tcurrentNode._isDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY)\n\t\t) {\n\t\t\tcurrentNode._tree._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Modifies the property according to the given changeset\n\t *\n\t * @param in_changeSet - The changeset to apply\n\t * @param {property-properties.BaseProperty.PathFilteringOptions} [in_filteringOptions] - The filtering options to\n\t * consider while applying the ChangeSet.\n\t * @throws if in_changeSet is invalid.\n\t */\n\tapplyChangeSet(in_changeSet: SerializedChangeSet) {\n\t\tthis._checkIsNotReadOnly(false);\n\n\t\t// We just forward the call to the internal function\n\t\tthis._applyChangeset(in_changeSet, true);\n\t}\n\n\t/**\n\t * Modifies the property according to the given changeset\n\t *\n\t * Internal function.\n\t *\n\t * @param in_changeSet - The changeset to apply\n\t * @param in_reportToView - By default, the dirtying will always be reported to the checkout view and trigger a\n\t * modified event there. When batching updates, this can be prevented via this flag.\n\t * @param {property-properties.BaseProperty.PathFilteringOptions} [in_filteringOptions] - The filtering options to\n\t * consider while applying the ChangeSet. For now it is only used to control property creation, to prevent\n\t * properties from being created outside the checked out paths. It does not validate that a value inside the\n\t * ChangeSet is outside those paths.\n\t */\n\t_applyChangeset(\n\t\tin_changeSet: SerializedChangeSet,\n\t\tin_reportToView = true,\n\t\tin_filteringOptions = undefined,\n\t) {\n\t\tvar typeids = _.keys(in_changeSet);\n\t\tfor (const typeid of typeids) {\n\t\t\tif (ChangeSet.isReservedKeyword(typeid)) {\n\t\t\t\tcontinue; // Ignore the special keys\n\t\t\t}\n\n\t\t\tvar paths = _.keys(in_changeSet[typeid]);\n\t\t\tfor (const path of paths) {\n\t\t\t\tvar property = this.resolvePath(path, {\n\t\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t\t});\n\t\t\t\tif (property) {\n\t\t\t\t\tproperty._applyChangeset(in_changeSet[typeid][path], false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(MSG.INVALID_PATH + path);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Re-apply dirty flags from changesets\n\t *\n\t * Internal function.\n\t *\n\t * @param in_pendingChangeSet - The pending changeset to apply\n\t * @param in_dirtyChangeSet - The dirty changeset to apply\n\t * @throws if changeset arguments are invalid.\n\t */\n\t_reapplyDirtyFlags(\n\t\tin_pendingChangeSet: SerializedChangeSet,\n\t\tin_dirtyChangeSet: SerializedChangeSet,\n\t) {\n\t\tthis._checkIsNotReadOnly(false);\n\t\t// Here we must walk both changesets in parallel. Sometimes there will be only an entry in one\n\t\t// changeset, sometimes only one in the other changeset, sometimes one in both.\n\t\tconst typeids = _.keys(in_pendingChangeSet).concat(_.keys(in_dirtyChangeSet));\n\t\tfor (const typeid of typeids) {\n\t\t\tif (ChangeSet.isReservedKeyword(typeid)) {\n\t\t\t\tcontinue; // Ignore the special keys\n\t\t\t}\n\t\t\tconst pendingChangeSet = in_pendingChangeSet && in_pendingChangeSet[typeid];\n\t\t\tconst dirtyChangeSet = in_dirtyChangeSet && in_dirtyChangeSet[typeid];\n\n\t\t\tconst paths = _.keys(pendingChangeSet).concat(_.keys(dirtyChangeSet));\n\t\t\tfor (const path of paths) {\n\t\t\t\tlet property = this.resolvePath(path);\n\t\t\t\tif (property) {\n\t\t\t\t\tproperty._reapplyDirtyFlags(\n\t\t\t\t\t\tpendingChangeSet && pendingChangeSet[path],\n\t\t\t\t\t\tdirtyChangeSet && dirtyChangeSet[path],\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(MSG.INVALID_PATH + path);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected resolvePath(path: string, params?: any): BaseProperty {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\t/**\n\t * Removes the dirtiness flag from this property\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean.\n\t * If none are supplied all will be removed.\n\t * @private\n\t */\n\t_cleanDirty(in_flags) {\n\t\tthis._setDirtyFlags(\n\t\t\tin_flags === undefined ? MODIFIED_STATE_FLAGS.CLEAN : this._getDirtyFlags() & ~in_flags,\n\t\t);\n\t}\n\n\t/**\n\t * Removes the dirtiness flag from this property and recursively from all of its children\n\t *\n\t * @param in_flags - The flags to clean. If none are supplied all will be removed.\n\t */\n\tcleanDirty(in_flags: MODIFIED_STATE_FLAGS) {\n\t\tvar dirtyChildren = this._getDirtyChildren(in_flags);\n\t\tfor (const dirtyChild of dirtyChildren) {\n\t\t\tconst child = this.get(dirtyChild, {\n\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t});\n\t\t\tchild.cleanDirty(in_flags);\n\t\t\tchild._cleanDirty(in_flags);\n\t\t}\n\n\t\t// after all paths are clean, we are also clean!\n\t\tthis._cleanDirty(in_flags);\n\t}\n\n\t/**\n\t * Indicates that the property has been modified and a corresponding modified call has not yet been sent to the\n\t * application for runtime scene updates.\n\t *\n\t * @param in_dirtinessType - The type of dirtiness to check for. By default this is DIRTY\n\t * @returns Is the property dirty?\n\t */\n\t_isDirty(in_dirtinessType: MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS.DIRTY): boolean {\n\t\treturn !!(this._getDirtyFlags() & in_dirtinessType);\n\t}\n\n\t/**\n\t * Indicates that the property has been modified and a corresponding modified call has not yet been sent to the\n\t * application for runtime scene updates.\n\t *\n\t * @returns True if the property is dirty. False otherwise.\n\t */\n\tisDirty(): boolean {\n\t\treturn this._isDirty();\n\t}\n\n\t/**\n\t * The property has pending changes in the current ChangeSet.\n\t * @returns True if the property has pending changes. False otherwise.\n\t */\n\thasPendingChanges(): boolean {\n\t\treturn this._isDirty(MODIFIED_STATE_FLAGS.PENDING_CHANGE);\n\t}\n\n\t/**\n\t * Returns the ChangeSet of all sub-properties\n\t *\n\t * @returns The serialized changes\n\t */\n\tgetPendingChanges(): ChangeSet {\n\t\tvar serialized = this._serialize(\n\t\t\ttrue,\n\t\t\tfalse,\n\t\t\tBaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n\t\t);\n\t\treturn new ChangeSet(serialized);\n\t}\n\n\t/**\n\t * Get the id of this property\n\t *\n\t * @returns The id of the property\n\t */\n\tgetId(): string | undefined {\n\t\treturn this._id;\n\t}\n\n\t/**\n\t * Sets the checkedOutRepositoryInfo.\n\t * @param {property-properties.CheckoutView~CheckedOutRepositoryInfo} value - The checkedOut repository info.\n\t * @protected\n\t */\n\t_setCheckoutView(value) {\n\t\tthis._checkoutView = value;\n\t}\n\n\t/**\n\t * Returns the checkoutView\n\t * @return {property-properties.CheckoutView} - the checkout view\n\t */\n\t_getCheckoutView() {\n\t\tlet checkedOutRepositoryInfo = this._getCheckedOutRepositoryInfo();\n\t\treturn checkedOutRepositoryInfo ? checkedOutRepositoryInfo.getCheckoutView() : undefined;\n\t}\n\n\t/**\n\t * Returns the checkedOutRepositoryInfo.\n\t * @return {property-properties.CheckoutView~CheckedOutRepositoryInfo} The checkedOut repository info.\n\t * @protected\n\t */\n\t_getCheckedOutRepositoryInfo() {\n\t\tif (!this._parent) {\n\t\t\treturn this._checkedOutRepositoryInfo;\n\t\t} else {\n\t\t\treturn this.getRoot() ? this.getRoot()._getCheckedOutRepositoryInfo() : undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the Workspace\n\t * @returns The workspace containing the property.\n\t */\n\tgetWorkspace() {\n\t\tconst root = this.getRoot();\n\t\treturn root ? root._tree : undefined;\n\t}\n\n\t/**\n\t * Returns the path segment for a child\n\t *\n\t * @param in_childNode - The child for which the path is returned\n\t *\n\t * @returns The path segment to resolve the child property under this property\n\t */\n\tprotected _getPathSegmentForChildNode(in_childNode: BaseProperty): string {\n\t\treturn PROPERTY_PATH_DELIMITER + PathHelper.quotePathSegmentIfNeeded(in_childNode.getId());\n\t}\n\n\t/**\n\t * Resolves a direct child node based on the given path segment\n\t *\n\t * @param {String} in_segment - The path segment to resolve\n\t * @param {property-properties.PathHelper.TOKEN_TYPES} in_segmentType - The type of segment in the tokenized path\n\t *\n\t * @return {property-properties.BaseProperty|undefined} The child property that has been resolved\n\t */\n\tprotected _resolvePathSegment(in_segment: string, in_segmentType: PathHelper.TOKEN_TYPES) {\n\t\t// Base Properties only support paths separated via dots\n\t\tif (in_segmentType !== PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN) {\n\t\t\tthrow new Error(MSG.INVALID_PATH_TOKEN + in_segment);\n\t\t}\n\n\t\treturn this.get(in_segment, {\n\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t});\n\t}\n\n\t/**\n\t * Set the id of this property\n\t *\n\t * @param {string} in_id - The id for this property\n\t *\n\t * @return {string} the new id\n\t * @private\n\t */\n\t_setId(in_id) {\n\t\tif (!_.isString(in_id) && !_.isNumber(in_id)) {\n\t\t\tthrow new TypeError(MSG.ID_STRING_OR_NUMBER + in_id);\n\t\t}\n\n\t\tif (this._parent !== undefined) {\n\t\t\tthrow new Error(MSG.ID_CHANGE_FOR_PROPERTY_WITH_PARENT + this._id + \" to id: \" + in_id);\n\t\t}\n\n\t\tthis._id = String(in_id);\n\n\t\t// flush caches\n\t\tthis._setDirty();\n\n\t\treturn in_id;\n\t}\n\n\t/**\n\t * Return a clone of this property\n\t * @returns The cloned property\n\t */\n\tclone(): BaseProperty {\n\t\tconst PropertyFactory = Property.PropertyFactory;\n\t\tvar clone = PropertyFactory._createProperty(\n\t\t\tthis.getFullTypeid(),\n\t\t\tnull,\n\t\t\tundefined,\n\t\t\tthis._getScope(),\n\t\t\ttrue,\n\t\t);\n\n\t\t// TODO: this is not very efficient. Clone should be overriden\n\t\t// by the child classes\n\t\tclone.deserialize(this._serialize());\n\t\tclone.cleanDirty(\n\t\t\tBaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE |\n\t\t\t\tBaseProperty.MODIFIED_STATE_FLAGS.DIRTY,\n\t\t);\n\t\treturn clone;\n\t}\n\n\t/**\n\t * Returns true if the property is a primitive type\n\t * @return {boolean} true if the property is a primitive type\n\t */\n\tisPrimitiveType() {\n\t\treturn TypeIdHelper.isPrimitiveType(this._typeid);\n\t}\n\n\t/**\n\t * Get a flattened, tree like representation of this object and all of it's\n\t * descendants. The flattening will stop at primitive properties and collections.\n\t *\n\t * For non-leaf nodes, it is possible to access the corresponding node object itself via the\n\t * propertyNode member of the flattened representation (warning, this will overwrite a\n\t * property of this name).\n\t * TODO: Do we want to have this feature or is it to dangerous?\n\t *\n\t * @returns the flat representation\n\t */\n\tprotected _flatten(): object {\n\t\treturn { propertyNode: this };\n\t}\n\n\t/**\n\t * Repeatedly calls back the given function with human-readable string representations\n\t * of the property and of its sub-properties. By default it logs to the console.\n\t * If printFct is not a function, it will default to console.log\n\t * @param {function} [printFct=console.log] - Function to call for printing each property\n\t */\n\tprettyPrint(printFct) {\n\t\tif (typeof printFct !== \"function\") {\n\t\t\tprintFct = console.log;\n\t\t}\n\t\tthis._prettyPrint(\"\", \"\", printFct);\n\t}\n\n\t/**\n\t * Return a JSON representation of the properties and its children.\n\t */\n\tprotected _toJson(): Object {\n\t\tvar json = {\n\t\t\tid: this.getId(),\n\t\t\tcontext: this._context,\n\t\t\ttypeid: this.getTypeid(),\n\t\t\tisConstant: this._isConstant,\n\t\t\tvalue: [],\n\t\t};\n\n\t\tvar ids = this.getIds();\n\t\tfor (const id of ids) {\n\t\t\tjson.value.push(\n\t\t\t\tthis.get(id, {\n\t\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t\t})._toJson(),\n\t\t\t);\n\t\t}\n\n\t\treturn json;\n\t}\n\n\tgetIds(): string[] {\n\t\treturn [];\n\t}\n\n\tget(\n\t\tid: string,\n\t\tparams?: { referenceResolutionMode: REFERENCE_RESOLUTION },\n\t): BaseProperty | undefined {\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Repeatedly calls back the given function with human-readable string\n\t * representations of the property and of its sub-properties.\n\t * @param {string} indent - Leading spaces to create the tree representation\n\t * @param {string} externalId - Name of the current property at the upper level. Used for arrays.\n\t * @param {function} printFct - Function to call for printing each property\n\t */\n\t_prettyPrint(indent, externalId, printFct) {\n\t\tvar context = \"\";\n\t\tswitch (this._context) {\n\t\t\tcase \"map\":\n\t\t\t\tcontext = \"Map of \";\n\t\t\t\tbreak;\n\t\t\tcase \"set\":\n\t\t\t\tcontext = \"Set of \";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\tprintFct(indent + externalId + this.getId() + \" (\" + context + this.getTypeid() + \"):\");\n\t\tthis._prettyPrintChildren(indent, printFct);\n\t}\n\n\t/**\n\t * Repeatedly calls back the given function with human-readable string\n\t * representations of the property's sub-properties.\n\t * @param {string} indent - Leading spaces to create the tree representation\n\t * @param {function} printFct - Function to call for printing each property\n\t */\n\t_prettyPrintChildren(indent, printFct) {\n\t\tindent += \" \";\n\t\tvar ids = this.getIds();\n\t\tfor (var i = 0; i < ids.length; i++) {\n\t\t\tthis.get(ids[i], {\n\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t})._prettyPrint(indent, \"\", printFct);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the possible paths from the given from_property to this property. If multiple paths\n\t * through multiple repository references are possible, returns more than one path.\n\t *\n\t * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed\n\t * @return {Array<string | undefined>} The paths between from_property and this property\n\t * will return an empty array if trying to get the path from a child repo to a parent repo.\n\t * @private\n\t */\n\t_getPathsThroughRepoRef(in_fromProperty) {\n\t\tvar paths = [];\n\t\tvar that = this;\n\t\tvar referenceProps = [];\n\t\t// get all reference properties in the referenceProps array\n\t\tthis._getCheckoutView()._forEachCheckedOutRepository(function (repoInfo) {\n\t\t\tvar keys = _.keys(repoInfo._referencedByPropertyInstanceGUIDs);\n\t\t\tfor (const key of keys) {\n\t\t\t\tif (key) {\n\t\t\t\t\tvar repoRef =\n\t\t\t\t\t\trepoInfo._referencedByPropertyInstanceGUIDs[key]\n\t\t\t\t\t\t\t._repositoryReferenceProperties[key].property;\n\t\t\t\t\tif (that.getRoot() === repoRef.getReferencedRepositoryRoot()) {\n\t\t\t\t\t\treferenceProps.push(repoRef);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// if no repo references point to the root of 'this', we can assume that 'this' is in the\n\t\t// parent repo, which cannot return a useful path.\n\t\tif (referenceProps.length === 0) {\n\t\t\tconsole.warn(MSG.NO_PATH_FROM_CHILD_REPO);\n\t\t\treturn [];\n\t\t}\n\n\t\t// path from root of the child repo to 'this'\n\t\tvar pathInChildRepo = this._getDirectPath(this.getRoot());\n\n\t\t// find possible paths from in_fromProperty to the referenceProps\n\t\t// concatenate each with pathInChildRepo\n\t\tfor (const referenceProp of referenceProps) {\n\t\t\tvar pathInParentRepo = referenceProp.getRelativePath(in_fromProperty);\n\t\t\tif (pathInParentRepo) {\n\t\t\t\tif (pathInChildRepo.length > 0) {\n\t\t\t\t\tpaths.push(pathInParentRepo + \".\" + pathInChildRepo);\n\t\t\t\t} else {\n\t\t\t\t\tpaths.push(pathInParentRepo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (paths.length > 0) {\n\t\t\treturn paths;\n\t\t}\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns the possible paths from the given in_fromProperty to this property. If no direct paths\n\t * exist, it returns an indirect path between the two properties.\n\t *\n\t * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed.\n\t * @return {string} The path between the given in_fromProperty and this property.\n\t * @private\n\t */\n\t_getIndirectPath(in_fromProperty) {\n\t\tvar path = [];\n\t\tvar that = this;\n\t\tvar foundPath = undefined;\n\n\t\tfoundPath = in_fromProperty.traverseUp(function (in_node) {\n\t\t\tpath.push(\"../\");\n\t\t\tif (in_node === that) {\n\t\t\t\treturn BREAK_TRAVERSAL;\n\t\t\t}\n\t\t\tvar directPath = that._getDirectPath(in_node);\n\t\t\tif (directPath) {\n\t\t\t\tpath.push(directPath);\n\t\t\t\treturn BREAK_TRAVERSAL;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t});\n\t\treturn foundPath === BREAK_TRAVERSAL ? path.join(\"\") : undefined;\n\t}\n\n\t/**\n\t * Returns the path from the given in_fromProperty to this property if a direct path\n\t * exists between the two properties. Otherwise returns undefined.\n\t *\n\t * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed.\n\t * @return {string} The path between the given in_fromProperty and this property.\n\t * @private\n\t */\n\t_getDirectPath(in_fromProperty) {\n\t\tvar path = [];\n\t\tvar foundAncestor = undefined;\n\t\tif (in_fromProperty === this) {\n\t\t\tfoundAncestor = BREAK_TRAVERSAL;\n\t\t} else if (this.getParent()) {\n\t\t\tpath.push(this.getParent()._getPathSegmentForChildNode(this));\n\n\t\t\tfoundAncestor = this.traverseUp(function (in_node) {\n\t\t\t\t// break where we meet the relative reference\n\t\t\t\tif (in_node === in_fromProperty) {\n\t\t\t\t\treturn BREAK_TRAVERSAL;\n\t\t\t\t}\n\n\t\t\t\tif (in_node.getParent()) {\n\t\t\t\t\tpath.push(in_node.getParent()._getPathSegmentForChildNode(in_node));\n\t\t\t\t}\n\n\t\t\t\treturn undefined;\n\t\t\t});\n\t\t}\n\n\t\tif (foundAncestor === BREAK_TRAVERSAL) {\n\t\t\tvar result = path.reverse().join(\"\");\n\n\t\t\t// We don't use a PROPERTY_PATH_DELIMITER at the start of the path\n\t\t\tif (result.startsWith(PROPERTY_PATH_DELIMITER)) {\n\t\t\t\tresult = result.substr(1);\n\t\t\t}\n\t\t\treturn result;\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the possible paths from the given in_fromProperty to this property.\n\t *\n\t * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed.\n\t * @return {Array<string>} The paths between the given in_fromProperty and this property.\n\t * @private\n\t */\n\t_getAllRelativePaths(in_fromProperty) {\n\t\tif (this.getRoot() !== in_fromProperty.getRoot()) {\n\t\t\t// if this and in_fromProperty have different roots, go through a repo ref\n\t\t\t// this is the case where we might have more than one path\n\t\t\treturn this._getPathsThroughRepoRef(in_fromProperty);\n\t\t} else {\n\t\t\tvar directPath = this._getDirectPath(in_fromProperty);\n\t\t\treturn directPath !== undefined\n\t\t\t\t? [directPath]\n\t\t\t\t: [this._getIndirectPath(in_fromProperty)];\n\t\t}\n\t}\n\n\t/**\n\t * Returns the path from the given fron_property to this node if such a path exists.\n\t * If more than one paths exist (as might be the case with multiple repository references\n\t * pointing to the same repository), it will return the first valid path found.\n\t * For example, if you have this structure:\n\t *\n\t * ```\n\t * <code>prop1\n\t * --prop2\n\t * ----prop3</code>\n\t * ```\n\t *\n\t * and call: `<code>prop1.getRelativePath(prop3);</code>`\n\t *\n\t * You will get the path from prop3 to prop1, which would be '../../'\n\t *\n\t * @param in_fromProperty - The property from which the path is computed.\n\t * @returns The path between the given in_fromProperty and this property.\n\t * @throws If in_fromProperty is not a property.\n\t */\n\tgetRelativePath(in_fromProperty: BaseProperty): string {\n\t\tConsoleUtils.assert(\n\t\t\tin_fromProperty instanceof BaseProperty,\n\t\t\tMSG.IN_FROMPROPERTY_MUST_BE_PROPERTY,\n\t\t);\n\t\tvar paths = this._getAllRelativePaths(in_fromProperty) || [];\n\t\tif (paths.length === 0) {\n\t\t\tconsole.warn(\n\t\t\t\tMSG.NO_PATH_BETWEEN +\n\t\t\t\t\tin_fromProperty.getAbsolutePath() +\n\t\t\t\t\t\" and \" +\n\t\t\t\t\tthis.getAbsolutePath(),\n\t\t\t);\n\t\t} else if (paths.length > 1) {\n\t\t\tconsole.warn(\n\t\t\t\tMSG.MORE_THAN_ONE_PATH +\n\t\t\t\t\tin_fromProperty.getAbsolutePath() +\n\t\t\t\t\t\" and \" +\n\t\t\t\t\tthis.getAbsolutePath(),\n\t\t\t);\n\t\t}\n\t\treturn paths[0];\n\t}\n\n\t/**\n\t * Returns the path from the root of the workspace to this node (including a slash at the beginning).\n\t *\n\t * @return {string} The path from the root\n\t */\n\tgetAbsolutePath() {\n\t\tvar that = this;\n\t\tvar referenceProps = [];\n\t\t// get all reference properties pointing to the root the repository containing 'this'\n\t\tif (this._getCheckoutView()) {\n\t\t\tthis._getCheckoutView()._forEachCheckedOutRepository(function (repoInfo) {\n\t\t\t\tvar keys = _.keys(repoInfo._referencedByPropertyInstanceGUIDs);\n\t\t\t\tfor (const key of keys) {\n\t\t\t\t\tif (key) {\n\t\t\t\t\t\tlet repoRef = repoInfo._referencedByPropertyInstanceGUIDs[key];\n\t\t\t\t\t\tlet refProperty = undefined;\n\n\t\t\t\t\t\tif (repoRef) {\n\t\t\t\t\t\t\trefProperty = repoRef._repositoryReferenceProperties[key]\n\t\t\t\t\t\t\t\t? repoRef._repositoryReferenceProperties[key].property\n\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet refRoot;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trefRoot = refProperty\n\t\t\t\t\t\t\t\t? refProperty.getReferencedRepositoryRoot()\n\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tconsole.warn(e.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (that.getRoot() === refRoot) {\n\t\t\t\t\t\t\treferenceProps.push(refProperty);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tvar path = this.isRoot() ? [] : [this.getParent()._getPathSegmentForChildNode(this)];\n\t\tthis.traverseUp(function (in_node) {\n\t\t\tif (in_node.getParent()) {\n\t\t\t\tpath.push(in_node.getParent()._getPathSegmentForChildNode(in_node));\n\t\t\t} else if (referenceProps.length > 0) {\n\t\t\t\t// recursively call getAbsolutePath, removing the '/' at the beginning of the path\n\t\t\t\tpath.push(referenceProps[0].getAbsolutePath(referenceProps[0].getRoot()).slice(1));\n\t\t\t}\n\t\t});\n\t\tvar absolutePath = path.reverse().join(\"\");\n\n\t\t// We don't use the property path separator at the start of the path\n\t\tif (absolutePath.startsWith(PROPERTY_PATH_DELIMITER)) {\n\t\t\tabsolutePath = absolutePath.substr(1);\n\t\t}\n\t\tabsolutePath = \"/\" + absolutePath;\n\n\t\treturn absolutePath;\n\t}\n\n\t/**\n\t * Traverses the property hierarchy upwards until the a node without parent is reached\n\t *\n\t * @param {Function} in_callback - Callback to invoke for each of the parents. The traversal can be stopped\n\t * by returning BaseProperty.BREAK_TRAVERSAL\n\t * @throws if in_callback is not a function.\n\t * @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL, if the traversal didn't reach the root,\n\t * otherwise `undefined`.\n\t */\n\ttraverseUp(in_callback) {\n\t\tConsoleUtils.assert(_.isFunction(in_callback), MSG.CALLBACK_NOT_FCT);\n\t\tif (this._parent) {\n\t\t\tvar result = in_callback(this._parent);\n\t\t\treturn result !== BREAK_TRAVERSAL\n\t\t\t\t? this._parent.traverseUp(in_callback)\n\t\t\t\t: BREAK_TRAVERSAL;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * @type {string} Constant to stop the traversal in traverseUp and traverseDown functions\n\t */\n\tstatic BREAK_TRAVERSAL = BREAK_TRAVERSAL;\n\n\t/**\n\t * Returns all children which are dirty (this only returns direct children, it does not travers recursively)\n\t *\n\t * @param in_flags - Which types of dirtiness are we looking for? If none is given, all types are regarded as dirty.\n\t * @returns The list of keys identifying the dirty children.\n\t */\n\tprotected _getDirtyChildren(in_flags: MODIFIED_STATE_FLAGS): string[] {\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns the root of the property hierarchy\n\t * @returns The root property\n\t */\n\tgetRoot(): BaseProperty {\n\t\treturn this._parent ? this._parent.getRoot() : this;\n\t}\n\n\t/**\n\t * Traverses all children in the child hierarchy\n\t * TODO: How should this behave for collections?\n\t *\n\t * @param in_callback - Callback to invoke for every child\n\t * @param in_pathFromTraversalStart - Path from the root of the traversal to this node\n\t * @returns Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted, otherwise `undefined`.\n\t * @private\n\t */\n\t_traverse(in_callback: Function, in_pathFromTraversalStart: string): string | undefined {\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Deserialize takes a currently existing property and sets it to the hierarchy described in the normalized\n\t * ChangeSet passed as parameter. It will return a ChangeSet that describes the difference between the current state\n\t * of the property and the passed in normalized property\n\t *\n\t * @param in_serializedObj - The serialized changeset to apply to this node. This has to be a normalized change-set\n\t * (only containing insertions and property assignments. Deletes and Modify must not appear)\n\t * @param in_filteringOptions - The filtering options to consider while deserializing the property.\n\t * @param in_createChangeSet - Should a changeset be created for this deserialization?\n\t * @param in_reportToView - Usually the dirtying should be reported to the view and trigger a modified event there.\n\t * This can be prevented via this flag.\n\t * @throws if called on a read-only property.\n\t * @returns ChangeSet with the changes that actually were performed during the deserialization\n\t */\n\tdeserialize(\n\t\tin_serializedObj: SerializedChangeSet,\n\t\tin_filteringOptions = {},\n\t\tin_createChangeSet = true,\n\t\tin_reportToView = false,\n\t): SerializedChangeSet {\n\t\tthis._checkIsNotReadOnly(false);\n\t\treturn this._deserialize(\n\t\t\tin_serializedObj,\n\t\t\tin_reportToView,\n\t\t\tin_filteringOptions,\n\t\t\tin_createChangeSet,\n\t\t);\n\t}\n\n\t/**\n\t * Sets the property to the state in the given normalized changeset\n\t *\n\t * @param in_serializedObj - The serialized changeset to apply. This\n\t * has to be a normalized change-set (only containing inserts. Removes and Modifies are forbidden).\n\t * @param in_reportToView - Usually the dirtying should be reported to the view\n\t * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t * @param in_filteringOptions - The filtering options to consider while deserializing the property.\n\t * @param in_createChangeSet - Should a changeset be created for this deserialization?\n\t * @returns ChangeSet with the changes that actually were performed during the deserialization.\n\t */\n\t_deserialize(\n\t\tin_serializedObj: SerializedChangeSet,\n\t\tin_reportToView: boolean,\n\t\tin_filteringOptions = {},\n\t\tin_createChangeSet = true,\n\t): SerializedChangeSet {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Serialize the property into a changeSet\n\t *\n\t * @param in_dirtyOnly - Only include dirty entries in the serialization\n\t * @param in_includeRootTypeid - Include the typeid of the root of the hierarchy\n\t * @param in_dirtinessType - The type of dirtiness to use when reporting dirty changes. By default this is\n\t * `PENDING_CHANGE`.\n\t * @param in_includeReferencedRepositories - If this is set to true, the serialize\n\t * function will descend into referenced repositories.\n\t * WARNING: if there are loops in the references this can result in an infinite loop.\n\t *\n\t * @returns The serialized representation of this property\n\t */\n\tprotected _serialize(\n\t\tin_dirtyOnly: boolean = false,\n\t\tin_includeRootTypeid: boolean = false,\n\t\tin_dirtinessType: MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n\t\tin_includeReferencedRepositories: boolean = false,\n\t): object {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Serialize the property\n\t *\n\t * @param in_options - Options for the serialization\n\t * @throws if in_options is defined but is not an object.\n\t * @returns The serialized representation of this property\n\t */\n\tserialize(in_options: ISerializeOptions) {\n\t\tvar opts = {\n\t\t\tdirtyOnly: false,\n\t\t\tincludeRootTypeid: false,\n\t\t\tdirtinessType: MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n\t\t\tincludeReferencedRepositories: false,\n\t\t};\n\t\tif (in_options !== undefined) {\n\t\t\tif (typeof in_options !== \"object\") {\n\t\t\t\tthrow new TypeError(MSG.SERIALIZE_TAKES_OBJECT);\n\t\t\t}\n\t\t\tObject.assign(opts, in_options);\n\t\t}\n\n\t\treturn this._serialize(\n\t\t\topts.dirtyOnly,\n\t\t\topts.includeRootTypeid,\n\t\t\topts.dirtinessType,\n\t\t\topts.includeReferencedRepositories,\n\t\t);\n\t}\n\n\t/**\n\t * Indicate that all static members have been added to the property\n\t *\n\t * This function is invoked by the PropertyFactory once all static members have been added to the template\n\t * @protected\n\t */\n\t_signalAllStaticMembersHaveBeenAdded() {}\n\n\t/**\n\t * Tests whether this property may be modified\n\t * @param {checkConstant} in_checkConstant - Check if is readonly constant property\n\t */\n\t_checkIsNotReadOnly(in_checkConstant) {\n\t\tif (this._isConstant && in_checkConstant) {\n\t\t\tthrow new Error(MSG.MODIFICATION_OF_CONSTANT_PROPERTY);\n\t\t}\n\n\t\tvar root = this.getRoot();\n\t\tif (root && root._getCheckedOutRepositoryInfo) {\n\t\t\tvar repositoryInfo = root._getCheckedOutRepositoryInfo();\n\n\t\t\tif (repositoryInfo && repositoryInfo._isReadOnly()) {\n\t\t\t\tthrow new Error(MSG.MODIFICATION_OF_REFERENCED_PROPERTY);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Set a property and its children as constants (readonly properties)\n\t */\n\t_setAsConstant() {\n\t\tthis._isConstant = true;\n\n\t\tif (this instanceof Property.AbstractStaticCollectionProperty) {\n\t\t\t// Set all children properties as constants\n\t\t\tthis.traverseDown(function (prop) {\n\t\t\t\tprop._isConstant = true;\n\t\t\t});\n\t\t}\n\t}\n\n\ttraverseDown(arg0: (prop: any) => void) {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\t/**\n\t * Unsets a property and its children as constants\n\t */\n\t_unsetAsConstant() {\n\t\t// Deleting this property will make the object\n\t\t// fall back to the entry in the prototype (false)\n\t\tdelete this._isConstant;\n\n\t\tif (this instanceof Property.AbstractStaticCollectionProperty) {\n\t\t\t// Unset all children properties as constants\n\t\t\tthis.traverseDown(function (prop) {\n\t\t\t\t// Deleting this property will make the object\n\t\t\t\t// fall back to the entry in the prototype (false)\n\t\t\t\tdelete prop._isConstant;\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Dirties this node and all of its children\n\t *\n\t * @param in_reportToView - By default, the dirtying will always be reported to the checkout view\n\t * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t * @private\n\t */\n\t_setDirtyTree(in_reportToView = true) {\n\t\tthis._traverse(function (node) {\n\t\t\t// Set all nodes to dirty, but prevent recursive updates up to the repository for the individual changes\n\t\t\tnode._setDirty(false);\n\t\t}, \"\");\n\t\t// Now make one report\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Determines whether a property can be inserted as a child of another property\n\t * This does NOT validate if the parent can accept the child property, it only validates if\n\t * the child property can be inserted in the parent.\n\t * @param in_targetParent - The parent property\n\t * @throws if the property can not be inserted\n\t */\n\t_validateInsertIn(in_targetParent: BaseProperty) {\n\t\t// A root?\n\t\tif (this._getCheckedOutRepositoryInfo() !== undefined) {\n\t\t\tthrow new Error(MSG.INSERTED_ROOT_ENTRY);\n\t\t}\n\n\t\t// Would create a cycle?\n\t\tlet parent = in_targetParent;\n\t\twhile (parent !== undefined) {\n\t\t\tif (parent === this) {\n\t\t\t\tthrow new Error(MSG.INSERTED_IN_OWN_CHILDREN);\n\t\t\t}\n\t\t\tparent = parent._parent;\n\t\t}\n\n\t\t// Already a child?\n\t\tif (this._parent !== undefined || this._getCheckoutView() !== undefined) {\n\t\t\tthrow new Error(MSG.INSERTED_ENTRY_WITH_PARENT);\n\t\t}\n\t}\n\n\t/**\n\t * TODO: Remove it later. Kept not to modify tests\n\t *\n\t * Validates if the property and all its children are covered by the given list of paths.\n\t *\n\t * This function is expected to be used before inserting the property into its parent. That is the\n\t * reason for asking for the base path. This is the full path expected for this property.\n\t *\n\t * This function uses the canonical representation of the property paths.\n\t *\n\t * @param in_basePath - The property's absolute path in canonical form\n\t * @param in_paths - The array of paths that we wonder if it covers the property and its children\n\t * @returns If the property and all its children are included in the paths\n\t * @private\n\t */\n\t_coveredByPaths(in_basePath: string, in_paths: string[]): boolean {\n\t\t// First, get the coverage of the base property\n\t\tconst coverage = PathHelper.getPathCoverage(in_basePath, in_paths);\n\n\t\tif (coverage.coverageExtent === PathHelper.CoverageExtent.FULLY_COVERED) {\n\t\t\treturn true;\n\t\t} else if (coverage.coverageExtent === PathHelper.CoverageExtent.PARTLY_COVERED) {\n\t\t\t// We know that part of the property is covered, if we don't find any actual children not covered\n\t\t\t// by the paths it's because we're fully covered.\n\t\t\tif (this.isPrimitiveType()) {\n\t\t\t\tconst childrenIds = this.getContext() === \"single\" ? [] : this.getIds();\n\t\t\t\tfor (const childId of childrenIds) {\n\t\t\t\t\tconst childPath = PathHelper.getChildAbsolutePathCanonical(\n\t\t\t\t\t\tin_basePath,\n\t\t\t\t\t\tchildId,\n\t\t\t\t\t);\n\t\t\t\t\tif (\n\t\t\t\t\t\tPathHelper.getPathCoverage(childPath, coverage.pathList).coverageExtent ===\n\t\t\t\t\t\tPathHelper.CoverageExtent.UNCOVERED\n\t\t\t\t\t) {\n\t\t\t\t\t\t// this children is outside the list of paths\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst childrenIds = this.getIds();\n\t\t\t\tfor (const childId of childrenIds) {\n\t\t\t\t\tconst child = this.get(childId);\n\t\t\t\t\tconst childPath = PathHelper.getChildAbsolutePathCanonical(\n\t\t\t\t\t\tin_basePath,\n\t\t\t\t\t\tchildId,\n\t\t\t\t\t);\n\t\t\t\t\tif (!child._coveredByPaths(childPath, coverage.pathList)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tget _properties() {\n\t\treturn this._flatten();\n\t}\n}\n\n(BaseProperty as any).prototype._isConstant = false;\n(BaseProperty as any).prototype._context = \"single\";\n(BaseProperty as any).prototype._typeid = \"BaseProperty\";\n"]}
1
+ {"version":3,"file":"baseProperty.js","sourceRoot":"","sources":["../../src/properties/baseProperty.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4DAA4D;AAE5D,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EACN,SAAS,EACT,UAAU,EAEV,YAAY,GACZ,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,IAAI,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAE1E,MAAM,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,SAAS,CAAC;AACnD,MAAM,eAAe,GAAG,OAAO,CAAC;AAEhC;;GAEG;AACH,IAAK,oBAOJ;AAPD,WAAK,oBAAoB;IACxB,iEAAiE;IACjE,mEAAM,CAAA;IACN,yGAAyG;IACzG,uEAAQ,CAAA;IACR,kDAAkD;IAClD,iEAAK,CAAA;AACN,CAAC,EAPI,oBAAoB,KAApB,oBAAoB,QAOxB;AAED;;GAEG;AACH,IAAK,oBAOJ;AAPD,WAAK,oBAAoB;IACxB,gDAAgD;IAChD,iEAAK,CAAA;IACL,2EAA2E;IAC3E,mFAAc,CAAA;IACd,mHAAmH;IACnH,iEAAK,CAAA;AACN,CAAC,EAPI,oBAAoB,KAApB,oBAAoB,QAOxB;AAED;;;;GAIG;AACH,MAAM,WAAW,GAAG;IACnB,uCAAuC;IACvC,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;IACvB,mDAAmD,CAAC,kBAAkB;IACtE,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;IACrB,2DAA2D;IAC3D,EAAE,EAAE,EAAE,K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C,MAAM,SAAS,GAAG,UAAU,CAAC,6BAA6B,CACzD,WAAW,EACX,OAAO,CACP,CAAC;oBACF,IACC,UAAU,CAAC,eAAe,CAAC,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,cAAc;wBACvE,UAAU,CAAC,cAAc,CAAC,SAAS,EAClC;wBACD,6CAA6C;wBAC7C,OAAO,KAAK,CAAC;qBACb;iBACD;aACD;iBAAM;gBACN,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;gBAClC,KAAK,MAAM,OAAO,IAAI,WAAW,EAAE;oBAClC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBAChC,MAAM,SAAS,GAAG,UAAU,CAAC,6BAA6B,CACzD,WAAW,EACX,OAAO,CACP,CAAC;oBACF,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE;wBACzD,OAAO,KAAK,CAAC;qBACb;iBACD;aACD;YACD,OAAO,IAAI,CAAC;SACZ;QAED,OAAO,KAAK,CAAC;IACd,CAAC;IAED,IAAI,WAAW;QACd,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;;AAxqCM,iCAAoB,GAAG,oBAAoB,CAAC;AAC5C,iCAAoB,GAAG,oBAAoB,CAAC;AAC5C,wBAAW,GAAG,WAAW,CAAC;AAq3BjC;;GAEG;AACI,4BAAe,GAAG,eAAe,CAAC;AAiTzC,YAAoB,CAAC,SAAS,CAAC,WAAW,GAAG,KAAK,CAAC;AACnD,YAAoB,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACnD,YAAoB,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/* eslint accessor-pairs: [2, { \"getWithoutSet\": false }] */\n\nimport _ from \"lodash\";\nimport {\n\tChangeSet,\n\tPathHelper,\n\tSerializedChangeSet,\n\tTypeIdHelper,\n} from \"@fluid-experimental/property-changeset\";\nimport { ConsoleUtils, constants } from \"@fluid-experimental/property-common\";\nimport { LazyLoadedProperties as Property } from \"./lazyLoadedProperties\";\n\nconst { MSG, PROPERTY_PATH_DELIMITER } = constants;\nconst BREAK_TRAVERSAL = \"BREAK\";\n\n/**\n * Determines in which cases a reference will automatically be resolved\n */\nenum REFERENCE_RESOLUTION {\n\t/** The resolution will always automatically follow references */\n\tALWAYS,\n\t/** If a reference is the last entry during the path resolution, it will not automatically be resolved */\n\tNO_LEAFS,\n\t/** References are never automatically resolved */\n\tNEVER,\n}\n\n/**\n * Used to indicate the state of a property. These flags can be connected via OR.\n */\nenum MODIFIED_STATE_FLAGS {\n\t/** No changes to this property at the moment */\n\tCLEAN,\n\t/** The property is marked as changed in the currently pending ChangeSet */\n\tPENDING_CHANGE,\n\t/** The property has been modified and the result has not yet been reported to the application for scene updates */\n\tDIRTY,\n}\n\n/**\n * Token Types\n * @enum Object\n * Type of the token in the path string\n */\nconst PATH_TOKENS = {\n\t/** A / at the beginning of the path */\n\tROOT: { token: \"ROOT\" },\n\t/** A * that indicates a dereferencing operation */ // note: reversed!\n\tREF: { token: \"REF\" },\n\t/** A ../ that indicates one step above the current path */\n\tUP: { token: \"UP\" },\n};\n\ninterface IBasePropertyParams {\n\t/** id of the property */\n\tid?: string;\n\t/** The type unique identifier */\n\ttypeid?: string;\n\t/** The length of the property. Only valid if the property is an array, otherwise the length defaults to 1 */\n\tlength: number;\n\t/** The type of property this template represents i.e. single, array, map, set. */\n\tcontext: string;\n\n\t// TODO: UNUSED PARAMETER ??\n\t/** List of property templates that are used to define children properties */\n\tproperties: BaseProperty[];\n\n\t// TODO: UNUSED PARAMETER ??\n\t/** List of property template typeids that this PropertyTemplate inherits from */\n\tinherits: string[];\n}\n\ninterface ISerializeOptions {\n\t/** Only include dirty entries in the serialization */\n\tdirtyOnly?: boolean;\n\t/** Include the typeid of the root of the hierarchy */\n\tincludeRootTypeid?: boolean;\n\t/** The type of dirtiness to use when reporting dirty changes. */\n\tdirtinessType?: MODIFIED_STATE_FLAGS;\n\t/**\n\t * If this is set to true, the serialize\n\t * function will descend into referenced repositories. WARNING: if there are loops in the references\n\t * this can result in an infinite loop\n\t */\n\tincludeReferencedRepositories?: boolean;\n}\n\n/**\n * The options to selectively create only a subset of a property.\n *\n * For now the filtering options are propagated by many functions, but are actually used only by\n * functions that create properties from schemas. It is then possible to create only a subset of\n * the properties of a schema by providing a restricted list of paths.\n *\n * Thus, with the filtering options, it is NOT possible to prevent a part of a ChangeSet from being\n * processed (in `applyChangeSet()` for example), it is NOT possible to prevent a property from being\n * created by a direct call to a function like `deserialize()` or `createProperty()`.\n * @internal\n */\nexport abstract class BaseProperty {\n\tprotected _id: string | undefined;\n\tprotected _isConstant: boolean;\n\tprotected _dirty: MODIFIED_STATE_FLAGS;\n\tprotected _typeid: string;\n\tprotected _context: string;\n\tprotected _parent: BaseProperty | undefined;\n\tprotected _noDirtyInBase: boolean;\n\n\t_tree: any;\n\t_checkoutView: any;\n\t_checkedOutRepositoryInfo: any;\n\n\tconstructor(in_params: IBasePropertyParams) {\n\t\t// Pre-conditions\n\t\t// This test has been disabled for performance reasons, if it would be incorrect,\n\t\t// the next line will throw anyways\n\t\t// ConsoleUtils.assert(in_params, MSG.PROP_CONSTRUCTOR_EXPECTS_OBJECTS);\n\n\t\tif (this._id !== in_params.id) {\n\t\t\tthis._id = in_params.id;\n\t\t}\n\n\t\t// Makes sure context value is fine\n\t\t// This assertion has been disabled for performance reasons. This is not a user facing\n\t\t// constructor function and therefore we rely on PropertyFactory to correctly provide the context.\n\t\t/* ConsoleUtils.assert(!in_params.context || in_params.context === this._context,\n MSG.CONTEXT_NOT_AS_EXPECTED + this._context + ' != ' + in_params.context); */\n\n\t\t// Sets typeid if default value is not fine\n\t\tlet typeId = in_params.typeid || \"BaseProperty\";\n\t\tif (typeId !== this._typeid) {\n\t\t\tthis._typeid = typeId;\n\t\t}\n\n\t\tthis._parent = undefined;\n\t\t// internal management\n\t\tif (!this._noDirtyInBase) {\n\t\t\tthis._dirty = MODIFIED_STATE_FLAGS.CLEAN;\n\t\t}\n\t}\n\n\tstatic MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS;\n\tstatic REFERENCE_RESOLUTION = REFERENCE_RESOLUTION;\n\tstatic PATH_TOKENS = PATH_TOKENS;\n\n\t/**\n\t * @returns The typeid of this property\n\t */\n\tgetTypeid(): string {\n\t\treturn this._typeid;\n\t}\n\n\t/**\n\t * @returns The context of this property\n\t */\n\tgetContext(): string {\n\t\treturn this._context;\n\t}\n\n\t/**\n\t * Get the scope to which this property belongs to.\n\t * @returns The guid representing the scope in which the\n\t * property belongs to\n\t */\n\tprotected _getScope(): string | undefined {\n\t\treturn this._parent ? this.getRoot()._getScope() : undefined;\n\t}\n\n\t/**\n\t * Returns the full property type identifier for the ChangeSet including the enum type id\n\t * @param in_hideCollection - if true the collection type (if applicable) will be omitted since that is not\n\t * applicable here, this param is ignored.\n\t * @returns The typeid\n\t */\n\tgetFullTypeid(in_hideCollection = false): string {\n\t\treturn this._typeid;\n\t}\n\n\t/**\n\t * Updates the parent for the property\n\t *\n\t * @param in_property - The parent property\n\t */\n\tprotected _setParent(in_property: BaseProperty) {\n\t\tthis._parent = in_property;\n\n\t\t// If the property is dirty but not its parent, dirty the parent. In cases like named properties\n\t\t// and default values, a parent is set after a value is set; we get a case where the\n\t\t// property is dirty but not its parent and the change is not included in a changeSet.\n\t\tif (this._parent && this._isDirty() && !this._parent._isDirty()) {\n\t\t\tthis._parent._setDirty(false, this);\n\t\t}\n\t}\n\n\t/**\n\t * Is this property the root of the property set tree?\n\t *\n\t * @returns True if it is a root, otherwise false.\n\t */\n\tisRoot(): boolean {\n\t\t// This checks, whether this is the root of a CheckOutView\n\t\t// (all other properties should have a parent property)\n\t\treturn this._parent === undefined;\n\t}\n\n\t/**\n\t * Is this property the ancestor of in_otherProperty?\n\t * Note: A property is not considered an ancestor of itself\n\t * @param in_otherProperty - possible descendant\n\t * @throws if in_otherProperty is not defined.\n\t * @returns True if it is a ancestor, otherwise false.\n\t */\n\tisAncestorOf(in_otherProperty: BaseProperty): boolean {\n\t\tConsoleUtils.assert(in_otherProperty, MSG.MISSING_IN_OTHERPROP);\n\t\tvar parent = in_otherProperty.getParent();\n\t\twhile (parent) {\n\t\t\tif (parent === this) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tparent = parent.getParent();\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Is this property the descendant of in_otherProperty?\n\t * Note: A property is not considered a descendant of itself\n\t * @param in_otherProperty - possible ancestor\n\t * @throws if in_otherProperty is not defined.\n\t * @returns True if it is a descendant, otherwise false.\n\t */\n\tisDescendantOf(in_otherProperty: BaseProperty): boolean {\n\t\tConsoleUtils.assert(in_otherProperty, MSG.MISSING_IN_OTHERPROP);\n\t\treturn in_otherProperty.isAncestorOf(this);\n\t}\n\n\t/**\n\t * Is this property a leaf node with regard to flattening?\n\t *\n\t * TODO: Which semantics should flattening have? It stops at primitive types and collections?\n\t *\n\t * @returns True if it is a leaf with regard to flattening\n\t */\n\t_isFlattenLeaf(): boolean {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Get the parent of this property\n\t *\n\t * @returns The parent of this property (or undefined if none exist)\n\t */\n\tgetParent(): BaseProperty | undefined {\n\t\treturn this._parent;\n\t}\n\n\t/**\n\t * checks whether the property is dynamic (only properties inherting from NodeProperty are)\n\t * @returns True if it is a dynamic property.\n\t */\n\tisDynamic() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Sets the property as dirty and/or pending. This will add one or both flags if not already set and will\n\t * do the same for its parent. This does not clear any flag, it only sets.\n\t *\n\t * @param in_reportToView - By default, the dirtying will always be reported to the checkout view\n\t * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t * @param in_callingChild - The child which is dirtying its parent\n\t * @param in_flags - The flags to set.\n\t * @private\n\t */\n\t_setDirty(\n\t\tin_reportToView = true,\n\t\tin_callingChild: BaseProperty = undefined,\n\t\tin_flags: MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS.DIRTY |\n\t\t\tMODIFIED_STATE_FLAGS.PENDING_CHANGE,\n\t) {\n\t\tif (in_flags === undefined) {\n\t\t\tin_flags = MODIFIED_STATE_FLAGS.DIRTY | MODIFIED_STATE_FLAGS.PENDING_CHANGE;\n\t\t}\n\t\tvar reportToView = in_reportToView;\n\t\tif (reportToView === undefined) {\n\t\t\treportToView = true;\n\t\t}\n\t\t// We only update the flags upwards in the tree, when the corresponding nodes are not already flagged\n\t\tvar oldFlags = this._getDirtyFlags();\n\t\tif ((oldFlags & in_flags) !== in_flags) {\n\t\t\t// only dirty once until clean.\n\t\t\tthis._setDirtyFlags(oldFlags | in_flags);\n\n\t\t\t// Report dirtiness upwards in the hierarchy\n\t\t\tif (this._parent) {\n\t\t\t\tthis._parent._setDirty(reportToView, this, in_flags);\n\t\t\t\treportToView = false;\n\t\t\t}\n\t\t}\n\t\tif (reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Sets the dirty flags for this property\n\t * @param in_flags - The dirty flags\n\t */\n\t_setDirtyFlags(in_flags: MODIFIED_STATE_FLAGS) {\n\t\tthis._dirty = in_flags;\n\t}\n\n\t/**\n\t * Gets the dirty flags for this property\n\t * @returns The dirty flags\n\t */\n\t_getDirtyFlags(): MODIFIED_STATE_FLAGS {\n\t\treturn this._dirty;\n\t}\n\n\t/**\n\t * Helper function, which reports the fact that a property has been dirtied to the checkout view\n\t * @private\n\t */\n\t// TODO: Cleaner way to make the property tree aware of the DDS hosting it.\n\t// Currently, this._tree is set in SharedPropertyTree constructor.\n\t_reportDirtinessToView() {\n\t\tlet currentNode: BaseProperty = this;\n\n\t\twhile (currentNode._parent) {\n\t\t\tcurrentNode = currentNode._parent;\n\t\t}\n\n\t\tif (\n\t\t\tcurrentNode._tree &&\n\t\t\tcurrentNode._tree.notificationDelayScope === 0 &&\n\t\t\tcurrentNode._isDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY)\n\t\t) {\n\t\t\tcurrentNode._tree._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Modifies the property according to the given changeset\n\t *\n\t * @param in_changeSet - The changeset to apply\n\t * @param {property-properties.BaseProperty.PathFilteringOptions} [in_filteringOptions] - The filtering options to\n\t * consider while applying the ChangeSet.\n\t * @throws if in_changeSet is invalid.\n\t */\n\tapplyChangeSet(in_changeSet: SerializedChangeSet) {\n\t\tthis._checkIsNotReadOnly(false);\n\n\t\t// We just forward the call to the internal function\n\t\tthis._applyChangeset(in_changeSet, true);\n\t}\n\n\t/**\n\t * Modifies the property according to the given changeset\n\t *\n\t * Internal function.\n\t *\n\t * @param in_changeSet - The changeset to apply\n\t * @param in_reportToView - By default, the dirtying will always be reported to the checkout view and trigger a\n\t * modified event there. When batching updates, this can be prevented via this flag.\n\t * @param {property-properties.BaseProperty.PathFilteringOptions} [in_filteringOptions] - The filtering options to\n\t * consider while applying the ChangeSet. For now it is only used to control property creation, to prevent\n\t * properties from being created outside the checked out paths. It does not validate that a value inside the\n\t * ChangeSet is outside those paths.\n\t */\n\t_applyChangeset(\n\t\tin_changeSet: SerializedChangeSet,\n\t\tin_reportToView = true,\n\t\tin_filteringOptions = undefined,\n\t) {\n\t\tvar typeids = _.keys(in_changeSet);\n\t\tfor (const typeid of typeids) {\n\t\t\tif (ChangeSet.isReservedKeyword(typeid)) {\n\t\t\t\tcontinue; // Ignore the special keys\n\t\t\t}\n\n\t\t\tvar paths = _.keys(in_changeSet[typeid]);\n\t\t\tfor (const path of paths) {\n\t\t\t\tvar property = this.resolvePath(path, {\n\t\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t\t});\n\t\t\t\tif (property) {\n\t\t\t\t\tproperty._applyChangeset(in_changeSet[typeid][path], false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(MSG.INVALID_PATH + path);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Re-apply dirty flags from changesets\n\t *\n\t * Internal function.\n\t *\n\t * @param in_pendingChangeSet - The pending changeset to apply\n\t * @param in_dirtyChangeSet - The dirty changeset to apply\n\t * @throws if changeset arguments are invalid.\n\t */\n\t_reapplyDirtyFlags(\n\t\tin_pendingChangeSet: SerializedChangeSet,\n\t\tin_dirtyChangeSet: SerializedChangeSet,\n\t) {\n\t\tthis._checkIsNotReadOnly(false);\n\t\t// Here we must walk both changesets in parallel. Sometimes there will be only an entry in one\n\t\t// changeset, sometimes only one in the other changeset, sometimes one in both.\n\t\tconst typeids = _.keys(in_pendingChangeSet).concat(_.keys(in_dirtyChangeSet));\n\t\tfor (const typeid of typeids) {\n\t\t\tif (ChangeSet.isReservedKeyword(typeid)) {\n\t\t\t\tcontinue; // Ignore the special keys\n\t\t\t}\n\t\t\tconst pendingChangeSet = in_pendingChangeSet && in_pendingChangeSet[typeid];\n\t\t\tconst dirtyChangeSet = in_dirtyChangeSet && in_dirtyChangeSet[typeid];\n\n\t\t\tconst paths = _.keys(pendingChangeSet).concat(_.keys(dirtyChangeSet));\n\t\t\tfor (const path of paths) {\n\t\t\t\tlet property = this.resolvePath(path);\n\t\t\t\tif (property) {\n\t\t\t\t\tproperty._reapplyDirtyFlags(\n\t\t\t\t\t\tpendingChangeSet && pendingChangeSet[path],\n\t\t\t\t\t\tdirtyChangeSet && dirtyChangeSet[path],\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(MSG.INVALID_PATH + path);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected resolvePath(path: string, params?: any): BaseProperty {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\t/**\n\t * Removes the dirtiness flag from this property\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean.\n\t * If none are supplied all will be removed.\n\t * @private\n\t */\n\t_cleanDirty(in_flags) {\n\t\tthis._setDirtyFlags(\n\t\t\tin_flags === undefined ? MODIFIED_STATE_FLAGS.CLEAN : this._getDirtyFlags() & ~in_flags,\n\t\t);\n\t}\n\n\t/**\n\t * Removes the dirtiness flag from this property and recursively from all of its children\n\t *\n\t * @param in_flags - The flags to clean. If none are supplied all will be removed.\n\t */\n\tcleanDirty(in_flags: MODIFIED_STATE_FLAGS) {\n\t\tvar dirtyChildren = this._getDirtyChildren(in_flags);\n\t\tfor (const dirtyChild of dirtyChildren) {\n\t\t\tconst child = this.get(dirtyChild, {\n\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t});\n\t\t\tchild.cleanDirty(in_flags);\n\t\t\tchild._cleanDirty(in_flags);\n\t\t}\n\n\t\t// after all paths are clean, we are also clean!\n\t\tthis._cleanDirty(in_flags);\n\t}\n\n\t/**\n\t * Indicates that the property has been modified and a corresponding modified call has not yet been sent to the\n\t * application for runtime scene updates.\n\t *\n\t * @param in_dirtinessType - The type of dirtiness to check for. By default this is DIRTY\n\t * @returns Is the property dirty?\n\t */\n\t_isDirty(in_dirtinessType: MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS.DIRTY): boolean {\n\t\treturn !!(this._getDirtyFlags() & in_dirtinessType);\n\t}\n\n\t/**\n\t * Indicates that the property has been modified and a corresponding modified call has not yet been sent to the\n\t * application for runtime scene updates.\n\t *\n\t * @returns True if the property is dirty. False otherwise.\n\t */\n\tisDirty(): boolean {\n\t\treturn this._isDirty();\n\t}\n\n\t/**\n\t * The property has pending changes in the current ChangeSet.\n\t * @returns True if the property has pending changes. False otherwise.\n\t */\n\thasPendingChanges(): boolean {\n\t\treturn this._isDirty(MODIFIED_STATE_FLAGS.PENDING_CHANGE);\n\t}\n\n\t/**\n\t * Returns the ChangeSet of all sub-properties\n\t *\n\t * @returns The serialized changes\n\t */\n\tgetPendingChanges(): ChangeSet {\n\t\tvar serialized = this._serialize(\n\t\t\ttrue,\n\t\t\tfalse,\n\t\t\tBaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n\t\t);\n\t\treturn new ChangeSet(serialized);\n\t}\n\n\t/**\n\t * Get the id of this property\n\t *\n\t * @returns The id of the property\n\t */\n\tgetId(): string | undefined {\n\t\treturn this._id;\n\t}\n\n\t/**\n\t * Sets the checkedOutRepositoryInfo.\n\t * @param {property-properties.CheckoutView~CheckedOutRepositoryInfo} value - The checkedOut repository info.\n\t * @protected\n\t */\n\t_setCheckoutView(value) {\n\t\tthis._checkoutView = value;\n\t}\n\n\t/**\n\t * Returns the checkoutView\n\t * @return {property-properties.CheckoutView} - the checkout view\n\t */\n\t_getCheckoutView() {\n\t\tlet checkedOutRepositoryInfo = this._getCheckedOutRepositoryInfo();\n\t\treturn checkedOutRepositoryInfo ? checkedOutRepositoryInfo.getCheckoutView() : undefined;\n\t}\n\n\t/**\n\t * Returns the checkedOutRepositoryInfo.\n\t * @return {property-properties.CheckoutView~CheckedOutRepositoryInfo} The checkedOut repository info.\n\t * @protected\n\t */\n\t_getCheckedOutRepositoryInfo() {\n\t\tif (!this._parent) {\n\t\t\treturn this._checkedOutRepositoryInfo;\n\t\t} else {\n\t\t\treturn this.getRoot() ? this.getRoot()._getCheckedOutRepositoryInfo() : undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the Workspace\n\t * @returns The workspace containing the property.\n\t */\n\tgetWorkspace() {\n\t\tconst root = this.getRoot();\n\t\treturn root ? root._tree : undefined;\n\t}\n\n\t/**\n\t * Returns the path segment for a child\n\t *\n\t * @param in_childNode - The child for which the path is returned\n\t *\n\t * @returns The path segment to resolve the child property under this property\n\t */\n\tprotected _getPathSegmentForChildNode(in_childNode: BaseProperty): string {\n\t\treturn PROPERTY_PATH_DELIMITER + PathHelper.quotePathSegmentIfNeeded(in_childNode.getId());\n\t}\n\n\t/**\n\t * Resolves a direct child node based on the given path segment\n\t *\n\t * @param {String} in_segment - The path segment to resolve\n\t * @param {property-properties.PathHelper.TOKEN_TYPES} in_segmentType - The type of segment in the tokenized path\n\t *\n\t * @return {property-properties.BaseProperty|undefined} The child property that has been resolved\n\t */\n\tprotected _resolvePathSegment(in_segment: string, in_segmentType: PathHelper.TOKEN_TYPES) {\n\t\t// Base Properties only support paths separated via dots\n\t\tif (in_segmentType !== PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN) {\n\t\t\tthrow new Error(MSG.INVALID_PATH_TOKEN + in_segment);\n\t\t}\n\n\t\treturn this.get(in_segment, {\n\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t});\n\t}\n\n\t/**\n\t * Set the id of this property\n\t *\n\t * @param {string} in_id - The id for this property\n\t *\n\t * @return {string} the new id\n\t * @private\n\t */\n\t_setId(in_id) {\n\t\tif (!_.isString(in_id) && !_.isNumber(in_id)) {\n\t\t\tthrow new TypeError(MSG.ID_STRING_OR_NUMBER + in_id);\n\t\t}\n\n\t\tif (this._parent !== undefined) {\n\t\t\tthrow new Error(MSG.ID_CHANGE_FOR_PROPERTY_WITH_PARENT + this._id + \" to id: \" + in_id);\n\t\t}\n\n\t\tthis._id = String(in_id);\n\n\t\t// flush caches\n\t\tthis._setDirty();\n\n\t\treturn in_id;\n\t}\n\n\t/**\n\t * Return a clone of this property\n\t * @returns The cloned property\n\t */\n\tclone(): BaseProperty {\n\t\tconst PropertyFactory = Property.PropertyFactory;\n\t\tvar clone = PropertyFactory._createProperty(\n\t\t\tthis.getFullTypeid(),\n\t\t\tnull,\n\t\t\tundefined,\n\t\t\tthis._getScope(),\n\t\t\ttrue,\n\t\t);\n\n\t\t// TODO: this is not very efficient. Clone should be overriden\n\t\t// by the child classes\n\t\tclone.deserialize(this._serialize());\n\t\tclone.cleanDirty(\n\t\t\tBaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE |\n\t\t\t\tBaseProperty.MODIFIED_STATE_FLAGS.DIRTY,\n\t\t);\n\t\treturn clone;\n\t}\n\n\t/**\n\t * Returns true if the property is a primitive type\n\t * @return {boolean} true if the property is a primitive type\n\t */\n\tisPrimitiveType() {\n\t\treturn TypeIdHelper.isPrimitiveType(this._typeid);\n\t}\n\n\t/**\n\t * Get a flattened, tree like representation of this object and all of it's\n\t * descendants. The flattening will stop at primitive properties and collections.\n\t *\n\t * For non-leaf nodes, it is possible to access the corresponding node object itself via the\n\t * propertyNode member of the flattened representation (warning, this will overwrite a\n\t * property of this name).\n\t * TODO: Do we want to have this feature or is it to dangerous?\n\t *\n\t * @returns the flat representation\n\t */\n\tprotected _flatten(): object {\n\t\treturn { propertyNode: this };\n\t}\n\n\t/**\n\t * Repeatedly calls back the given function with human-readable string representations\n\t * of the property and of its sub-properties. By default it logs to the console.\n\t * If printFct is not a function, it will default to console.log\n\t * @param {function} [printFct=console.log] - Function to call for printing each property\n\t */\n\tprettyPrint(printFct) {\n\t\tif (typeof printFct !== \"function\") {\n\t\t\tprintFct = console.log;\n\t\t}\n\t\tthis._prettyPrint(\"\", \"\", printFct);\n\t}\n\n\t/**\n\t * Return a JSON representation of the properties and its children.\n\t */\n\tprotected _toJson(): Object {\n\t\tvar json = {\n\t\t\tid: this.getId(),\n\t\t\tcontext: this._context,\n\t\t\ttypeid: this.getTypeid(),\n\t\t\tisConstant: this._isConstant,\n\t\t\tvalue: [],\n\t\t};\n\n\t\tvar ids = this.getIds();\n\t\tfor (const id of ids) {\n\t\t\tjson.value.push(\n\t\t\t\tthis.get(id, {\n\t\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t\t})._toJson(),\n\t\t\t);\n\t\t}\n\n\t\treturn json;\n\t}\n\n\tgetIds(): string[] {\n\t\treturn [];\n\t}\n\n\tget(\n\t\tid: string,\n\t\tparams?: { referenceResolutionMode: REFERENCE_RESOLUTION },\n\t): BaseProperty | undefined {\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Repeatedly calls back the given function with human-readable string\n\t * representations of the property and of its sub-properties.\n\t * @param {string} indent - Leading spaces to create the tree representation\n\t * @param {string} externalId - Name of the current property at the upper level. Used for arrays.\n\t * @param {function} printFct - Function to call for printing each property\n\t */\n\t_prettyPrint(indent, externalId, printFct) {\n\t\tvar context = \"\";\n\t\tswitch (this._context) {\n\t\t\tcase \"map\":\n\t\t\t\tcontext = \"Map of \";\n\t\t\t\tbreak;\n\t\t\tcase \"set\":\n\t\t\t\tcontext = \"Set of \";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\tprintFct(indent + externalId + this.getId() + \" (\" + context + this.getTypeid() + \"):\");\n\t\tthis._prettyPrintChildren(indent, printFct);\n\t}\n\n\t/**\n\t * Repeatedly calls back the given function with human-readable string\n\t * representations of the property's sub-properties.\n\t * @param {string} indent - Leading spaces to create the tree representation\n\t * @param {function} printFct - Function to call for printing each property\n\t */\n\t_prettyPrintChildren(indent, printFct) {\n\t\tindent += \" \";\n\t\tvar ids = this.getIds();\n\t\tfor (var i = 0; i < ids.length; i++) {\n\t\t\tthis.get(ids[i], {\n\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t})._prettyPrint(indent, \"\", printFct);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the possible paths from the given from_property to this property. If multiple paths\n\t * through multiple repository references are possible, returns more than one path.\n\t *\n\t * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed\n\t * @return {Array<string | undefined>} The paths between from_property and this property\n\t * will return an empty array if trying to get the path from a child repo to a parent repo.\n\t * @private\n\t */\n\t_getPathsThroughRepoRef(in_fromProperty) {\n\t\tvar paths = [];\n\t\tvar that = this;\n\t\tvar referenceProps = [];\n\t\t// get all reference properties in the referenceProps array\n\t\tthis._getCheckoutView()._forEachCheckedOutRepository(function (repoInfo) {\n\t\t\tvar keys = _.keys(repoInfo._referencedByPropertyInstanceGUIDs);\n\t\t\tfor (const key of keys) {\n\t\t\t\tif (key) {\n\t\t\t\t\tvar repoRef =\n\t\t\t\t\t\trepoInfo._referencedByPropertyInstanceGUIDs[key]\n\t\t\t\t\t\t\t._repositoryReferenceProperties[key].property;\n\t\t\t\t\tif (that.getRoot() === repoRef.getReferencedRepositoryRoot()) {\n\t\t\t\t\t\treferenceProps.push(repoRef);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// if no repo references point to the root of 'this', we can assume that 'this' is in the\n\t\t// parent repo, which cannot return a useful path.\n\t\tif (referenceProps.length === 0) {\n\t\t\tconsole.warn(MSG.NO_PATH_FROM_CHILD_REPO);\n\t\t\treturn [];\n\t\t}\n\n\t\t// path from root of the child repo to 'this'\n\t\tvar pathInChildRepo = this._getDirectPath(this.getRoot());\n\n\t\t// find possible paths from in_fromProperty to the referenceProps\n\t\t// concatenate each with pathInChildRepo\n\t\tfor (const referenceProp of referenceProps) {\n\t\t\tvar pathInParentRepo = referenceProp.getRelativePath(in_fromProperty);\n\t\t\tif (pathInParentRepo) {\n\t\t\t\tif (pathInChildRepo.length > 0) {\n\t\t\t\t\tpaths.push(pathInParentRepo + \".\" + pathInChildRepo);\n\t\t\t\t} else {\n\t\t\t\t\tpaths.push(pathInParentRepo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (paths.length > 0) {\n\t\t\treturn paths;\n\t\t}\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns the possible paths from the given in_fromProperty to this property. If no direct paths\n\t * exist, it returns an indirect path between the two properties.\n\t *\n\t * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed.\n\t * @return {string} The path between the given in_fromProperty and this property.\n\t * @private\n\t */\n\t_getIndirectPath(in_fromProperty) {\n\t\tvar path = [];\n\t\tvar that = this;\n\t\tvar foundPath = undefined;\n\n\t\tfoundPath = in_fromProperty.traverseUp(function (in_node) {\n\t\t\tpath.push(\"../\");\n\t\t\tif (in_node === that) {\n\t\t\t\treturn BREAK_TRAVERSAL;\n\t\t\t}\n\t\t\tvar directPath = that._getDirectPath(in_node);\n\t\t\tif (directPath) {\n\t\t\t\tpath.push(directPath);\n\t\t\t\treturn BREAK_TRAVERSAL;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t});\n\t\treturn foundPath === BREAK_TRAVERSAL ? path.join(\"\") : undefined;\n\t}\n\n\t/**\n\t * Returns the path from the given in_fromProperty to this property if a direct path\n\t * exists between the two properties. Otherwise returns undefined.\n\t *\n\t * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed.\n\t * @return {string} The path between the given in_fromProperty and this property.\n\t * @private\n\t */\n\t_getDirectPath(in_fromProperty) {\n\t\tvar path = [];\n\t\tvar foundAncestor = undefined;\n\t\tif (in_fromProperty === this) {\n\t\t\tfoundAncestor = BREAK_TRAVERSAL;\n\t\t} else if (this.getParent()) {\n\t\t\tpath.push(this.getParent()._getPathSegmentForChildNode(this));\n\n\t\t\tfoundAncestor = this.traverseUp(function (in_node) {\n\t\t\t\t// break where we meet the relative reference\n\t\t\t\tif (in_node === in_fromProperty) {\n\t\t\t\t\treturn BREAK_TRAVERSAL;\n\t\t\t\t}\n\n\t\t\t\tif (in_node.getParent()) {\n\t\t\t\t\tpath.push(in_node.getParent()._getPathSegmentForChildNode(in_node));\n\t\t\t\t}\n\n\t\t\t\treturn undefined;\n\t\t\t});\n\t\t}\n\n\t\tif (foundAncestor === BREAK_TRAVERSAL) {\n\t\t\tvar result = path.reverse().join(\"\");\n\n\t\t\t// We don't use a PROPERTY_PATH_DELIMITER at the start of the path\n\t\t\tif (result.startsWith(PROPERTY_PATH_DELIMITER)) {\n\t\t\t\tresult = result.substr(1);\n\t\t\t}\n\t\t\treturn result;\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the possible paths from the given in_fromProperty to this property.\n\t *\n\t * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed.\n\t * @return {Array<string>} The paths between the given in_fromProperty and this property.\n\t * @private\n\t */\n\t_getAllRelativePaths(in_fromProperty) {\n\t\tif (this.getRoot() !== in_fromProperty.getRoot()) {\n\t\t\t// if this and in_fromProperty have different roots, go through a repo ref\n\t\t\t// this is the case where we might have more than one path\n\t\t\treturn this._getPathsThroughRepoRef(in_fromProperty);\n\t\t} else {\n\t\t\tvar directPath = this._getDirectPath(in_fromProperty);\n\t\t\treturn directPath !== undefined\n\t\t\t\t? [directPath]\n\t\t\t\t: [this._getIndirectPath(in_fromProperty)];\n\t\t}\n\t}\n\n\t/**\n\t * Returns the path from the given fron_property to this node if such a path exists.\n\t * If more than one paths exist (as might be the case with multiple repository references\n\t * pointing to the same repository), it will return the first valid path found.\n\t * For example, if you have this structure:\n\t *\n\t * ```\n\t * <code>prop1\n\t * --prop2\n\t * ----prop3</code>\n\t * ```\n\t *\n\t * and call: `<code>prop1.getRelativePath(prop3);</code>`\n\t *\n\t * You will get the path from prop3 to prop1, which would be '../../'\n\t *\n\t * @param in_fromProperty - The property from which the path is computed.\n\t * @returns The path between the given in_fromProperty and this property.\n\t * @throws If in_fromProperty is not a property.\n\t */\n\tgetRelativePath(in_fromProperty: BaseProperty): string {\n\t\tConsoleUtils.assert(\n\t\t\tin_fromProperty instanceof BaseProperty,\n\t\t\tMSG.IN_FROMPROPERTY_MUST_BE_PROPERTY,\n\t\t);\n\t\tvar paths = this._getAllRelativePaths(in_fromProperty) || [];\n\t\tif (paths.length === 0) {\n\t\t\tconsole.warn(\n\t\t\t\tMSG.NO_PATH_BETWEEN +\n\t\t\t\t\tin_fromProperty.getAbsolutePath() +\n\t\t\t\t\t\" and \" +\n\t\t\t\t\tthis.getAbsolutePath(),\n\t\t\t);\n\t\t} else if (paths.length > 1) {\n\t\t\tconsole.warn(\n\t\t\t\tMSG.MORE_THAN_ONE_PATH +\n\t\t\t\t\tin_fromProperty.getAbsolutePath() +\n\t\t\t\t\t\" and \" +\n\t\t\t\t\tthis.getAbsolutePath(),\n\t\t\t);\n\t\t}\n\t\treturn paths[0];\n\t}\n\n\t/**\n\t * Returns the path from the root of the workspace to this node (including a slash at the beginning).\n\t *\n\t * @return {string} The path from the root\n\t */\n\tgetAbsolutePath() {\n\t\tvar that = this;\n\t\tvar referenceProps = [];\n\t\t// get all reference properties pointing to the root the repository containing 'this'\n\t\tif (this._getCheckoutView()) {\n\t\t\tthis._getCheckoutView()._forEachCheckedOutRepository(function (repoInfo) {\n\t\t\t\tvar keys = _.keys(repoInfo._referencedByPropertyInstanceGUIDs);\n\t\t\t\tfor (const key of keys) {\n\t\t\t\t\tif (key) {\n\t\t\t\t\t\tlet repoRef = repoInfo._referencedByPropertyInstanceGUIDs[key];\n\t\t\t\t\t\tlet refProperty = undefined;\n\n\t\t\t\t\t\tif (repoRef) {\n\t\t\t\t\t\t\trefProperty = repoRef._repositoryReferenceProperties[key]\n\t\t\t\t\t\t\t\t? repoRef._repositoryReferenceProperties[key].property\n\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet refRoot;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trefRoot = refProperty\n\t\t\t\t\t\t\t\t? refProperty.getReferencedRepositoryRoot()\n\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tconsole.warn(e.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (that.getRoot() === refRoot) {\n\t\t\t\t\t\t\treferenceProps.push(refProperty);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tvar path = this.isRoot() ? [] : [this.getParent()._getPathSegmentForChildNode(this)];\n\t\tthis.traverseUp(function (in_node) {\n\t\t\tif (in_node.getParent()) {\n\t\t\t\tpath.push(in_node.getParent()._getPathSegmentForChildNode(in_node));\n\t\t\t} else if (referenceProps.length > 0) {\n\t\t\t\t// recursively call getAbsolutePath, removing the '/' at the beginning of the path\n\t\t\t\tpath.push(referenceProps[0].getAbsolutePath(referenceProps[0].getRoot()).slice(1));\n\t\t\t}\n\t\t});\n\t\tvar absolutePath = path.reverse().join(\"\");\n\n\t\t// We don't use the property path separator at the start of the path\n\t\tif (absolutePath.startsWith(PROPERTY_PATH_DELIMITER)) {\n\t\t\tabsolutePath = absolutePath.substr(1);\n\t\t}\n\t\tabsolutePath = \"/\" + absolutePath;\n\n\t\treturn absolutePath;\n\t}\n\n\t/**\n\t * Traverses the property hierarchy upwards until the a node without parent is reached\n\t *\n\t * @param {Function} in_callback - Callback to invoke for each of the parents. The traversal can be stopped\n\t * by returning BaseProperty.BREAK_TRAVERSAL\n\t * @throws if in_callback is not a function.\n\t * @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL, if the traversal didn't reach the root,\n\t * otherwise `undefined`.\n\t */\n\ttraverseUp(in_callback) {\n\t\tConsoleUtils.assert(_.isFunction(in_callback), MSG.CALLBACK_NOT_FCT);\n\t\tif (this._parent) {\n\t\t\tvar result = in_callback(this._parent);\n\t\t\treturn result !== BREAK_TRAVERSAL\n\t\t\t\t? this._parent.traverseUp(in_callback)\n\t\t\t\t: BREAK_TRAVERSAL;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * @type {string} Constant to stop the traversal in traverseUp and traverseDown functions\n\t */\n\tstatic BREAK_TRAVERSAL = BREAK_TRAVERSAL;\n\n\t/**\n\t * Returns all children which are dirty (this only returns direct children, it does not travers recursively)\n\t *\n\t * @param in_flags - Which types of dirtiness are we looking for? If none is given, all types are regarded as dirty.\n\t * @returns The list of keys identifying the dirty children.\n\t */\n\tprotected _getDirtyChildren(in_flags: MODIFIED_STATE_FLAGS): string[] {\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns the root of the property hierarchy\n\t * @returns The root property\n\t */\n\tgetRoot(): BaseProperty {\n\t\treturn this._parent ? this._parent.getRoot() : this;\n\t}\n\n\t/**\n\t * Traverses all children in the child hierarchy\n\t * TODO: How should this behave for collections?\n\t *\n\t * @param in_callback - Callback to invoke for every child\n\t * @param in_pathFromTraversalStart - Path from the root of the traversal to this node\n\t * @returns Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted, otherwise `undefined`.\n\t * @private\n\t */\n\t_traverse(in_callback: Function, in_pathFromTraversalStart: string): string | undefined {\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Deserialize takes a currently existing property and sets it to the hierarchy described in the normalized\n\t * ChangeSet passed as parameter. It will return a ChangeSet that describes the difference between the current state\n\t * of the property and the passed in normalized property\n\t *\n\t * @param in_serializedObj - The serialized changeset to apply to this node. This has to be a normalized change-set\n\t * (only containing insertions and property assignments. Deletes and Modify must not appear)\n\t * @param in_filteringOptions - The filtering options to consider while deserializing the property.\n\t * @param in_createChangeSet - Should a changeset be created for this deserialization?\n\t * @param in_reportToView - Usually the dirtying should be reported to the view and trigger a modified event there.\n\t * This can be prevented via this flag.\n\t * @throws if called on a read-only property.\n\t * @returns ChangeSet with the changes that actually were performed during the deserialization\n\t */\n\tdeserialize(\n\t\tin_serializedObj: SerializedChangeSet,\n\t\tin_filteringOptions = {},\n\t\tin_createChangeSet = true,\n\t\tin_reportToView = false,\n\t): SerializedChangeSet {\n\t\tthis._checkIsNotReadOnly(false);\n\t\treturn this._deserialize(\n\t\t\tin_serializedObj,\n\t\t\tin_reportToView,\n\t\t\tin_filteringOptions,\n\t\t\tin_createChangeSet,\n\t\t);\n\t}\n\n\t/**\n\t * Sets the property to the state in the given normalized changeset\n\t *\n\t * @param in_serializedObj - The serialized changeset to apply. This\n\t * has to be a normalized change-set (only containing inserts. Removes and Modifies are forbidden).\n\t * @param in_reportToView - Usually the dirtying should be reported to the view\n\t * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t * @param in_filteringOptions - The filtering options to consider while deserializing the property.\n\t * @param in_createChangeSet - Should a changeset be created for this deserialization?\n\t * @returns ChangeSet with the changes that actually were performed during the deserialization.\n\t */\n\t_deserialize(\n\t\tin_serializedObj: SerializedChangeSet,\n\t\tin_reportToView: boolean,\n\t\tin_filteringOptions = {},\n\t\tin_createChangeSet = true,\n\t): SerializedChangeSet {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Serialize the property into a changeSet\n\t *\n\t * @param in_dirtyOnly - Only include dirty entries in the serialization\n\t * @param in_includeRootTypeid - Include the typeid of the root of the hierarchy\n\t * @param in_dirtinessType - The type of dirtiness to use when reporting dirty changes. By default this is\n\t * `PENDING_CHANGE`.\n\t * @param in_includeReferencedRepositories - If this is set to true, the serialize\n\t * function will descend into referenced repositories.\n\t * WARNING: if there are loops in the references this can result in an infinite loop.\n\t *\n\t * @returns The serialized representation of this property\n\t */\n\tprotected _serialize(\n\t\tin_dirtyOnly: boolean = false,\n\t\tin_includeRootTypeid: boolean = false,\n\t\tin_dirtinessType: MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n\t\tin_includeReferencedRepositories: boolean = false,\n\t): object {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Serialize the property\n\t *\n\t * @param in_options - Options for the serialization\n\t * @throws if in_options is defined but is not an object.\n\t * @returns The serialized representation of this property\n\t */\n\tserialize(in_options: ISerializeOptions) {\n\t\tvar opts = {\n\t\t\tdirtyOnly: false,\n\t\t\tincludeRootTypeid: false,\n\t\t\tdirtinessType: MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n\t\t\tincludeReferencedRepositories: false,\n\t\t};\n\t\tif (in_options !== undefined) {\n\t\t\tif (typeof in_options !== \"object\") {\n\t\t\t\tthrow new TypeError(MSG.SERIALIZE_TAKES_OBJECT);\n\t\t\t}\n\t\t\tObject.assign(opts, in_options);\n\t\t}\n\n\t\treturn this._serialize(\n\t\t\topts.dirtyOnly,\n\t\t\topts.includeRootTypeid,\n\t\t\topts.dirtinessType,\n\t\t\topts.includeReferencedRepositories,\n\t\t);\n\t}\n\n\t/**\n\t * Indicate that all static members have been added to the property\n\t *\n\t * This function is invoked by the PropertyFactory once all static members have been added to the template\n\t * @protected\n\t */\n\t_signalAllStaticMembersHaveBeenAdded() {}\n\n\t/**\n\t * Tests whether this property may be modified\n\t * @param {checkConstant} in_checkConstant - Check if is readonly constant property\n\t */\n\t_checkIsNotReadOnly(in_checkConstant) {\n\t\tif (this._isConstant && in_checkConstant) {\n\t\t\tthrow new Error(MSG.MODIFICATION_OF_CONSTANT_PROPERTY);\n\t\t}\n\n\t\tvar root = this.getRoot();\n\t\tif (root && root._getCheckedOutRepositoryInfo) {\n\t\t\tvar repositoryInfo = root._getCheckedOutRepositoryInfo();\n\n\t\t\tif (repositoryInfo && repositoryInfo._isReadOnly()) {\n\t\t\t\tthrow new Error(MSG.MODIFICATION_OF_REFERENCED_PROPERTY);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Set a property and its children as constants (readonly properties)\n\t */\n\t_setAsConstant() {\n\t\tthis._isConstant = true;\n\n\t\tif (this instanceof Property.AbstractStaticCollectionProperty) {\n\t\t\t// Set all children properties as constants\n\t\t\tthis.traverseDown(function (prop) {\n\t\t\t\tprop._isConstant = true;\n\t\t\t});\n\t\t}\n\t}\n\n\ttraverseDown(arg0: (prop: any) => void) {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\t/**\n\t * Unsets a property and its children as constants\n\t */\n\t_unsetAsConstant() {\n\t\t// Deleting this property will make the object\n\t\t// fall back to the entry in the prototype (false)\n\t\tdelete this._isConstant;\n\n\t\tif (this instanceof Property.AbstractStaticCollectionProperty) {\n\t\t\t// Unset all children properties as constants\n\t\t\tthis.traverseDown(function (prop) {\n\t\t\t\t// Deleting this property will make the object\n\t\t\t\t// fall back to the entry in the prototype (false)\n\t\t\t\tdelete prop._isConstant;\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Dirties this node and all of its children\n\t *\n\t * @param in_reportToView - By default, the dirtying will always be reported to the checkout view\n\t * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t * @private\n\t */\n\t_setDirtyTree(in_reportToView = true) {\n\t\tthis._traverse(function (node) {\n\t\t\t// Set all nodes to dirty, but prevent recursive updates up to the repository for the individual changes\n\t\t\tnode._setDirty(false);\n\t\t}, \"\");\n\t\t// Now make one report\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Determines whether a property can be inserted as a child of another property\n\t * This does NOT validate if the parent can accept the child property, it only validates if\n\t * the child property can be inserted in the parent.\n\t * @param in_targetParent - The parent property\n\t * @throws if the property can not be inserted\n\t */\n\t_validateInsertIn(in_targetParent: BaseProperty) {\n\t\t// A root?\n\t\tif (this._getCheckedOutRepositoryInfo() !== undefined) {\n\t\t\tthrow new Error(MSG.INSERTED_ROOT_ENTRY);\n\t\t}\n\n\t\t// Would create a cycle?\n\t\tlet parent = in_targetParent;\n\t\twhile (parent !== undefined) {\n\t\t\tif (parent === this) {\n\t\t\t\tthrow new Error(MSG.INSERTED_IN_OWN_CHILDREN);\n\t\t\t}\n\t\t\tparent = parent._parent;\n\t\t}\n\n\t\t// Already a child?\n\t\tif (this._parent !== undefined || this._getCheckoutView() !== undefined) {\n\t\t\tthrow new Error(MSG.INSERTED_ENTRY_WITH_PARENT);\n\t\t}\n\t}\n\n\t/**\n\t * TODO: Remove it later. Kept not to modify tests\n\t *\n\t * Validates if the property and all its children are covered by the given list of paths.\n\t *\n\t * This function is expected to be used before inserting the property into its parent. That is the\n\t * reason for asking for the base path. This is the full path expected for this property.\n\t *\n\t * This function uses the canonical representation of the property paths.\n\t *\n\t * @param in_basePath - The property's absolute path in canonical form\n\t * @param in_paths - The array of paths that we wonder if it covers the property and its children\n\t * @returns If the property and all its children are included in the paths\n\t * @private\n\t */\n\t_coveredByPaths(in_basePath: string, in_paths: string[]): boolean {\n\t\t// First, get the coverage of the base property\n\t\tconst coverage = PathHelper.getPathCoverage(in_basePath, in_paths);\n\n\t\tif (coverage.coverageExtent === PathHelper.CoverageExtent.FULLY_COVERED) {\n\t\t\treturn true;\n\t\t} else if (coverage.coverageExtent === PathHelper.CoverageExtent.PARTLY_COVERED) {\n\t\t\t// We know that part of the property is covered, if we don't find any actual children not covered\n\t\t\t// by the paths it's because we're fully covered.\n\t\t\tif (this.isPrimitiveType()) {\n\t\t\t\tconst childrenIds = this.getContext() === \"single\" ? [] : this.getIds();\n\t\t\t\tfor (const childId of childrenIds) {\n\t\t\t\t\tconst childPath = PathHelper.getChildAbsolutePathCanonical(\n\t\t\t\t\t\tin_basePath,\n\t\t\t\t\t\tchildId,\n\t\t\t\t\t);\n\t\t\t\t\tif (\n\t\t\t\t\t\tPathHelper.getPathCoverage(childPath, coverage.pathList).coverageExtent ===\n\t\t\t\t\t\tPathHelper.CoverageExtent.UNCOVERED\n\t\t\t\t\t) {\n\t\t\t\t\t\t// this children is outside the list of paths\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst childrenIds = this.getIds();\n\t\t\t\tfor (const childId of childrenIds) {\n\t\t\t\t\tconst child = this.get(childId);\n\t\t\t\t\tconst childPath = PathHelper.getChildAbsolutePathCanonical(\n\t\t\t\t\t\tin_basePath,\n\t\t\t\t\t\tchildId,\n\t\t\t\t\t);\n\t\t\t\t\tif (!child._coveredByPaths(childPath, coverage.pathList)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tget _properties() {\n\t\treturn this._flatten();\n\t}\n}\n\n(BaseProperty as any).prototype._isConstant = false;\n(BaseProperty as any).prototype._context = \"single\";\n(BaseProperty as any).prototype._typeid = \"BaseProperty\";\n"]}
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * A property object that allows to add child properties dynamically.
3
+ * @internal
3
4
  */
4
5
  export class ContainerProperty extends IndexedCollectionBaseProperty {
5
6
  _optionalChildren: {};
@@ -1 +1 @@
1
- {"version":3,"file":"containerProperty.d.ts","sourceRoot":"","sources":["../../src/properties/containerProperty.js"],"names":[],"mappings":"AAgBA;;GAEG;AACH;IASG,sBAA2B;IAC3B,qBAA0B;IA4B5B;;;;;OAKG;IACH,0BAMC;IAED;;;;;;;;;;;;;;OAcG;IACH,2CAkCC;IAED;;;;;;;;OAQG;IACH,iCANW,MAAM,eACN,MAAM,QAkBhB;IAED;;;OAGG;IACH,0BAQC;IAED;;;;;;;OAOG;IACH,mCAcC;IAED;;;;;;;OAOG;IACH,iCALW,MAAM,QAchB;IAED;;;OAGG;IACH,cAGC;IA+CD;;;;;;;OAOG;IACH,+EAEC;IAcD;;;;OAIG;IACH,gBAFY,MAAO,MAAM,CAAC,CAIzB;IAED;;;;OAIG;IACH,iBAFY,MAAO,MAAM,CAAC,CAIzB;IAED;;;;;;;;OAQG;IACH,mCAEC;CAmCD"}
1
+ {"version":3,"file":"containerProperty.d.ts","sourceRoot":"","sources":["../../src/properties/containerProperty.js"],"names":[],"mappings":"AAgBA;;;GAGG;AACH;IASG,sBAA2B;IAC3B,qBAA0B;IA4B5B;;;;;OAKG;IACH,0BAMC;IAED;;;;;;;;;;;;;;OAcG;IACH,2CAkCC;IAED;;;;;;;;OAQG;IACH,iCANW,MAAM,eACN,MAAM,QAkBhB;IAED;;;OAGG;IACH,0BAQC;IAED;;;;;;;OAOG;IACH,mCAcC;IAED;;;;;;;OAOG;IACH,iCALW,MAAM,QAchB;IAED;;;OAGG;IACH,cAGC;IA+CD;;;;;;;OAOG;IACH,+EAEC;IAcD;;;;OAIG;IACH,gBAFY,MAAO,MAAM,CAAC,CAIzB;IAED;;;;OAIG;IACH,iBAFY,MAAO,MAAM,CAAC,CAIzB;IAED;;;;;;;;OAQG;IACH,mCAEC;CAmCD"}
@@ -14,6 +14,7 @@ const { BaseProperty } = require("./baseProperty");
14
14
  const { IndexedCollectionBaseProperty } = require("./indexedCollectionBaseProperty");
15
15
  /**
16
16
  * A property object that allows to add child properties dynamically.
17
+ * @internal
17
18
  */
18
19
  export class ContainerProperty extends IndexedCollectionBaseProperty {
19
20
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"containerProperty.js","sourceRoot":"","sources":["../../src/properties/containerProperty.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,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,YAAY,CAAC,CAAC;AAChC,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC/D,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;AAErF;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,6BAA6B;IACnE;;;OAGG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,SAAS,CAAC,gBAAgB,EAAE;YAC/B,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC;YAC5B,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;SAC3B;IACF,CAAC;IAED;;;OAGG;IACH,OAAO;QACN,OAAO,gCAAgC,CAAC,SAAS,CAAC,OAAO;aACvD,IAAI,CAAC,IAAI,CAAC;aACV,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CAAC,KAAK;QACT,OAAO,CACN,gCAAgC,CAAC,SAAS,CAAC,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,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/E,YAAY,CAAC,yBAAyB,EAAE,CAAC;SACzC;aAAM;YACN,iBAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAC/E;IACF,CAAC;CACD;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 */\nexport class ContainerProperty extends IndexedCollectionBaseProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t * @protected\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\n\t\tif (in_params.optionalChildren) {\n\t\t\tthis._optionalChildren = {};\n\t\t\tthis._dynamicChildren = {};\n\t\t}\n\t}\n\n\t/**\n\t * Returns the name of all the sub-properties of this property.\n\t * @return {Array.<string>} An array of all the property ids\n\t */\n\t_getIds() {\n\t\treturn AbstractStaticCollectionProperty.prototype._getIds\n\t\t\t.call(this)\n\t\t\t.concat(Object.keys(this._dynamicChildren));\n\t}\n\n\t/**\n\t * Returns the sub-property having the given name in this property.\n\t *\n\t * @param {string|number} in_id - The id of the prop you wish to retrieve.\n\t *\n\t * @return {property-properties.BaseProperty | undefined} The property you seek or undefined if none is found.\n\t */\n\t_get(in_id) {\n\t\treturn (\n\t\t\tAbstractStaticCollectionProperty.prototype._get.call(this, in_id) ||\n\t\t\tthis._dynamicChildren[in_id]\n\t\t);\n\t}\n\n\t/**\n\t * Adds an optional child to list of possible optional children.\n\t * @param {string} in_id - Id of the optional child\n\t * @param {string} in_typeid - typeid which determines what type the child should be\n\t * @private\n\t */\n\t_addOptionalChild(in_id, in_typeid) {\n\t\tif (this._optionalChildren === ContainerProperty.prototype._optionalChildren) {\n\t\t\tthis._optionalChildren = {};\n\t\t\tthis._dynamicChildren = {};\n\t\t}\n\t\tthis._optionalChildren[in_id] = in_typeid;\n\t}\n\n\t/**\n\t * Appends a property\n\t *\n\t * @param {String | property-properties.BaseProperty } in_id - The id under which the property is added.\n\t * This parameter is optional. For NamedProperties it can be omitted. In that case the GUID of the named\n\t * property will be used.\n\t *\n\t * @param {property-properties.BaseProperty} [in_property] - The property to add\n\t * @throws if in_id is not a string or a number\n\t * @throws if there is already an entry for in_id\n\t * @throws if in_property is not a property\n\t * @throws if in_property does not have an id\n\t * @throws if in_property has a parent\n\t * @throws if in_property is a root property\n\t */\n\tinsert(in_id, in_property) {\n\t\tif (in_property === undefined) {\n\t\t\t// If no id is passed, the property is passed as first parameter\n\t\t\tin_property = in_id;\n\t\t\tConsoleUtils.assert(\n\t\t\t\tin_property instanceof BaseProperty,\n\t\t\t\t\"insert error: \" + MSG.NOT_A_PROPERTY,\n\t\t\t);\n\t\t} else {\n\t\t\tConsoleUtils.assert(_.isString(in_id) || _.isNumber(in_id), MSG.ID_STRING_OR_NUMBER);\n\t\t\tConsoleUtils.assert(\n\t\t\t\t!_.isString(in_id) || !_.isEmpty(in_id),\n\t\t\t\tMSG.ID_SHOULD_NOT_BE_EMPTY_STRING,\n\t\t\t);\n\t\t\tConsoleUtils.assert(\n\t\t\t\tin_property instanceof BaseProperty,\n\t\t\t\t\"insert error: \" + MSG.NOT_A_PROPERTY,\n\t\t\t);\n\t\t\tif (this._dynamicChildren[in_id] !== undefined) {\n\t\t\t\tthrow new Error(MSG.PROPERTY_ALREADY_EXISTS + in_id);\n\t\t\t}\n\t\t\tif (validationsEnabled.enabled) {\n\t\t\t\tin_property._validateInsertIn(this);\n\t\t\t}\n\t\t\t// If an id is passed, it is stored in the child property object\n\t\t\tin_property._setId(in_id);\n\t\t}\n\n\t\tif (validationsEnabled.enabled) {\n\t\t\tthis._validateInsert(in_property.getId(), in_property);\n\t\t}\n\n\t\t// Add the child property to the dynamic properties\n\t\tthis._insert(in_property.getId(), in_property, true);\n\t}\n\n\t/**\n\t * Validates if inserting the property is valid.\n\t *\n\t * @param {string} in_id - id to be validated.\n\t * @param {string} in_property - property to be validated.\n\t * @throws if id is not on optional list.\n\t * @throws if the typeid of the property doesn't match the schema.\n\t * @protected\n\t */\n\t_validateInsert(in_id, in_property) {\n\t\tif (!(this._optionalChildren && this._optionalChildren[in_id])) {\n\t\t\tthrow new Error(MSG.CANNOT_INSERT_UNKNOWN_PROPERTY + in_id);\n\t\t}\n\n\t\tif (this._optionalChildren[in_id].toUpperCase() !== in_property.getTypeid().toUpperCase()) {\n\t\t\tthrow new Error(\n\t\t\t\tMSG.MISMATCHING_PROPERTY_TYPEID +\n\t\t\t\t\tthis._optionalChildren[in_id] +\n\t\t\t\t\t\" instead it's: \" +\n\t\t\t\t\tin_property.getTypeid(),\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * @override\n\t * @inheritdoc\n\t */\n\t_getScope() {\n\t\tif (this._parent) {\n\t\t\treturn this.getRoot()._getScope();\n\t\t} else {\n\t\t\treturn this._checkedOutRepositoryInfo\n\t\t\t\t? this._checkedOutRepositoryInfo.getScope()\n\t\t\t\t: undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Removes the given property\n\t *\n\t * @param {string|property-properties.BaseProperty} in_property - The property to remove (either its id or the\n\t * whole property).\n\t * @throws if trying to remove an entry that does not exist\n\t * @return {property-properties.BaseProperty} the property removed.\n\t */\n\tremove(in_property) {\n\t\tvar id = in_property;\n\t\tvar returnValue;\n\t\tif (id instanceof BaseProperty) {\n\t\t\treturnValue = id;\n\t\t\tid = id.getId();\n\t\t} else {\n\t\t\treturnValue = this.get(id);\n\t\t}\n\n\t\tthis._validateRemove(id);\n\n\t\tthis._removeByKey(id);\n\t\treturn returnValue;\n\t}\n\n\t/**\n\t * Validates if removing a property with specified id is valid.\n\t *\n\t * @param {string} in_id - id to be validated.\n\t * @throws if the id doesn't exist.\n\t * @throws if the id is not marked as optional.\n\t * @protected\n\t */\n\t_validateRemove(in_id) {\n\t\tif (!this._dynamicChildren[in_id]) {\n\t\t\tconst error =\n\t\t\t\tthis._staticChildren[in_id] !== undefined\n\t\t\t\t\t? new Error(MSG.CANNOT_REMOVE_NON_OPTIONAL_PROP + in_id)\n\t\t\t\t\t: new Error(MSG.REMOVING_NON_EXISTING_KEY + in_id);\n\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\t/**\n\t * Removes all dynamic children\n\t * @throws if node property is read-only\n\t */\n\tclear() {\n\t\tthis._checkIsNotReadOnly(true);\n\t\t_.each(this._dynamicChildren, this.remove.bind(this));\n\t}\n\n\t/**\n\t * Inserts a property into the collection\n\t *\n\t * @param {string} in_key - Key of the entry in the collection\n\t * @param {property-properties.NamedProperty} in_property - The property to insert\n\t * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n\t * trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t */\n\t_insert(in_key, in_property, in_reportToView) {\n\t\tif (validationsEnabled.enabled) {\n\t\t\tthis._checkIsNotReadOnly(true);\n\t\t}\n\n\t\t// Add the child property to the dynamic properties\n\t\tIndexedCollectionBaseProperty.prototype._insert.call(this, in_key, in_property, false);\n\n\t\t// We postponed the report above, to make sure the child property has actually been appended to this\n\t\t// node, before the report is forwarded to the view\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Removes an entry with the given key\n\t *\n\t * @param {string} in_key - key of the entry\n\t * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n\t * trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t */\n\t_removeByKey(in_key, in_reportToView) {\n\t\tthis._checkIsNotReadOnly(true);\n\n\t\tif (this._dynamicChildren[in_key]) {\n\t\t\t// Remove from the indexed collection\n\t\t\tIndexedCollectionBaseProperty.prototype._removeByKey.call(\n\t\t\t\tthis,\n\t\t\t\tin_key,\n\t\t\t\tin_reportToView,\n\t\t\t);\n\t\t} else {\n\t\t\tconsole.error(MSG.REMOVING_NON_EXISTING_KEY + in_key);\n\t\t}\n\t}\n\n\t/**\n\t * Stores the information to which CheckedOutRepositoryInfo object this root property belongs.\n\t * Note: these functions should only be used internally (within the PropertySets library)\n\t *\n\t * @param {property-properties.CheckoutView~CheckedOutRepositoryInfo} in_checkedOutRepositoryInfo -\n\t * The checked out repository info this root property belongs to.\n\t * @protected\n\t */\n\t_setCheckedOutRepositoryInfo(in_checkedOutRepositoryInfo) {\n\t\tthis._checkedOutRepositoryInfo = in_checkedOutRepositoryInfo;\n\t}\n\n\t/**\n\t * Gets the information to which CheckedOutRepositoryInfo object this root property belongs.\n\t * Note: these functions should only be used internally (within the PropertySets library)\n\t *\n\t * @return {property-properties.CheckoutView~CheckedOutRepositoryInfo|undefined} If this is the root of the\n\t * checked out hierarchy, this will return the checkout.\n\t * @protected\n\t */\n\t_getCheckedOutRepositoryInfo() {\n\t\treturn this._checkedOutRepositoryInfo;\n\t}\n\n\t/**\n\t * Returns the name of all the static sub-properties of this property.\n\t *\n\t * @return {Array.<string>} An array of all the static property ids\n\t */\n\tgetStaticIds() {\n\t\treturn Object.keys(this._staticChildren);\n\t}\n\n\t/**\n\t * Returns the name of all the dynamic sub-properties of this property.\n\t *\n\t * @return {Array.<string>} An array of all the dynamic property ids\n\t */\n\tgetDynamicIds() {\n\t\treturn Object.keys(this._dynamicChildren);\n\t}\n\n\t/**\n\t * Returns an Object with all the dynamic children of this node property.\n\t *\n\t * WARNING: This is a direct access to the internal data-structure and the collection MUST NOT be modified. It is\n\t * read only for fast access and iteration. Insertion and deletion MUST be done via the insert and remove functions\n\t * of this class.\n\t *\n\t * @return {Object<String, property-properties.MapProperty~MapValueType>} The map with all entries in the map.\n\t */\n\t_getDynamicChildrenReadOnly() {\n\t\treturn this._dynamicChildren;\n\t}\n\n\t/**\n\t * Given an object that mirrors a PSet Template, assign the properties.\n\t *\n\t * E.g.\n\t *\n\t * ```\n\t * <pre>\n\t * Templates = {\n\t * properties: [\n\t * { id: 'foo', typeid: 'String' },\n\t * { id: 'bar', properties: [{id: 'baz', typeid: 'Uint32'}] }\n\t * ]\n\t * }\n\t * </pre>\n\t * ```\n\t *\n\t * You would update the values like: `baseProperty.setValues({foo: 'hello', bar: {baz: 1}});`\n\t *\n\t * WARNING: not completely implemented for all types.\n\t *\n\t * @param {object} in_properties - The properties you would like to assign\n\t * @private\n\t */\n\tsetValues(in_properties) {\n\t\tvar checkoutView = this._getCheckoutView();\n\t\tif (checkoutView !== undefined) {\n\t\t\tcheckoutView.pushNotificationDelayScope();\n\t\t\tContainerProperty.prototype._setValues.call(this, in_properties, false, false);\n\t\t\tcheckoutView.popNotificationDelayScope();\n\t\t} else {\n\t\t\tContainerProperty.prototype._setValues.call(this, in_properties, false, false);\n\t\t}\n\t}\n}\n\nContainerProperty.prototype._typeid = \"ContainerProperty\";\nContainerProperty.prototype._dynamicChildren = {};\nContainerProperty.prototype._optionalChildren = {};\n"]}
1
+ {"version":3,"file":"containerProperty.js","sourceRoot":"","sources":["../../src/properties/containerProperty.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,YAA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AAmB,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 * @internal\n */\nexport class ContainerProperty extends IndexedCollectionBaseProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t * @protected\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\n\t\tif (in_params.optionalChildren) {\n\t\t\tthis._optionalChildren = {};\n\t\t\tthis._dynamicChildren = {};\n\t\t}\n\t}\n\n\t/**\n\t * Returns the name of all the sub-properties of this property.\n\t * @return {Array.<string>} An array of all the property ids\n\t */\n\t_getIds() {\n\t\treturn AbstractStaticCollectionProperty.prototype._getIds\n\t\t\t.call(this)\n\t\t\t.concat(Object.keys(this._dynamicChildren));\n\t}\n\n\t/**\n\t * Returns the sub-property having the given name in this property.\n\t *\n\t * @param {string|number} in_id - The id of the prop you wish to retrieve.\n\t *\n\t * @return {property-properties.BaseProperty | undefined} The property you seek or undefined if none is found.\n\t */\n\t_get(in_id) {\n\t\treturn (\n\t\t\tAbstractStaticCollectionProperty.prototype._get.call(this, in_id) ||\n\t\t\tthis._dynamicChildren[in_id]\n\t\t);\n\t}\n\n\t/**\n\t * Adds an optional child to list of possible optional children.\n\t * @param {string} in_id - Id of the optional child\n\t * @param {string} in_typeid - typeid which determines what type the child should be\n\t * @private\n\t */\n\t_addOptionalChild(in_id, in_typeid) {\n\t\tif (this._optionalChildren === ContainerProperty.prototype._optionalChildren) {\n\t\t\tthis._optionalChildren = {};\n\t\t\tthis._dynamicChildren = {};\n\t\t}\n\t\tthis._optionalChildren[in_id] = in_typeid;\n\t}\n\n\t/**\n\t * Appends a property\n\t *\n\t * @param {String | property-properties.BaseProperty } in_id - The id under which the property is added.\n\t * This parameter is optional. For NamedProperties it can be omitted. In that case the GUID of the named\n\t * property will be used.\n\t *\n\t * @param {property-properties.BaseProperty} [in_property] - The property to add\n\t * @throws if in_id is not a string or a number\n\t * @throws if there is already an entry for in_id\n\t * @throws if in_property is not a property\n\t * @throws if in_property does not have an id\n\t * @throws if in_property has a parent\n\t * @throws if in_property is a root property\n\t */\n\tinsert(in_id, in_property) {\n\t\tif (in_property === undefined) {\n\t\t\t// If no id is passed, the property is passed as first parameter\n\t\t\tin_property = in_id;\n\t\t\tConsoleUtils.assert(\n\t\t\t\tin_property instanceof BaseProperty,\n\t\t\t\t\"insert error: \" + MSG.NOT_A_PROPERTY,\n\t\t\t);\n\t\t} else {\n\t\t\tConsoleUtils.assert(_.isString(in_id) || _.isNumber(in_id), MSG.ID_STRING_OR_NUMBER);\n\t\t\tConsoleUtils.assert(\n\t\t\t\t!_.isString(in_id) || !_.isEmpty(in_id),\n\t\t\t\tMSG.ID_SHOULD_NOT_BE_EMPTY_STRING,\n\t\t\t);\n\t\t\tConsoleUtils.assert(\n\t\t\t\tin_property instanceof BaseProperty,\n\t\t\t\t\"insert error: \" + MSG.NOT_A_PROPERTY,\n\t\t\t);\n\t\t\tif (this._dynamicChildren[in_id] !== undefined) {\n\t\t\t\tthrow new Error(MSG.PROPERTY_ALREADY_EXISTS + in_id);\n\t\t\t}\n\t\t\tif (validationsEnabled.enabled) {\n\t\t\t\tin_property._validateInsertIn(this);\n\t\t\t}\n\t\t\t// If an id is passed, it is stored in the child property object\n\t\t\tin_property._setId(in_id);\n\t\t}\n\n\t\tif (validationsEnabled.enabled) {\n\t\t\tthis._validateInsert(in_property.getId(), in_property);\n\t\t}\n\n\t\t// Add the child property to the dynamic properties\n\t\tthis._insert(in_property.getId(), in_property, true);\n\t}\n\n\t/**\n\t * Validates if inserting the property is valid.\n\t *\n\t * @param {string} in_id - id to be validated.\n\t * @param {string} in_property - property to be validated.\n\t * @throws if id is not on optional list.\n\t * @throws if the typeid of the property doesn't match the schema.\n\t * @protected\n\t */\n\t_validateInsert(in_id, in_property) {\n\t\tif (!(this._optionalChildren && this._optionalChildren[in_id])) {\n\t\t\tthrow new Error(MSG.CANNOT_INSERT_UNKNOWN_PROPERTY + in_id);\n\t\t}\n\n\t\tif (this._optionalChildren[in_id].toUpperCase() !== in_property.getTypeid().toUpperCase()) {\n\t\t\tthrow new Error(\n\t\t\t\tMSG.MISMATCHING_PROPERTY_TYPEID +\n\t\t\t\t\tthis._optionalChildren[in_id] +\n\t\t\t\t\t\" instead it's: \" +\n\t\t\t\t\tin_property.getTypeid(),\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * @override\n\t * @inheritdoc\n\t */\n\t_getScope() {\n\t\tif (this._parent) {\n\t\t\treturn this.getRoot()._getScope();\n\t\t} else {\n\t\t\treturn this._checkedOutRepositoryInfo\n\t\t\t\t? this._checkedOutRepositoryInfo.getScope()\n\t\t\t\t: undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Removes the given property\n\t *\n\t * @param {string|property-properties.BaseProperty} in_property - The property to remove (either its id or the\n\t * whole property).\n\t * @throws if trying to remove an entry that does not exist\n\t * @return {property-properties.BaseProperty} the property removed.\n\t */\n\tremove(in_property) {\n\t\tvar id = in_property;\n\t\tvar returnValue;\n\t\tif (id instanceof BaseProperty) {\n\t\t\treturnValue = id;\n\t\t\tid = id.getId();\n\t\t} else {\n\t\t\treturnValue = this.get(id);\n\t\t}\n\n\t\tthis._validateRemove(id);\n\n\t\tthis._removeByKey(id);\n\t\treturn returnValue;\n\t}\n\n\t/**\n\t * Validates if removing a property with specified id is valid.\n\t *\n\t * @param {string} in_id - id to be validated.\n\t * @throws if the id doesn't exist.\n\t * @throws if the id is not marked as optional.\n\t * @protected\n\t */\n\t_validateRemove(in_id) {\n\t\tif (!this._dynamicChildren[in_id]) {\n\t\t\tconst error =\n\t\t\t\tthis._staticChildren[in_id] !== undefined\n\t\t\t\t\t? new Error(MSG.CANNOT_REMOVE_NON_OPTIONAL_PROP + in_id)\n\t\t\t\t\t: new Error(MSG.REMOVING_NON_EXISTING_KEY + in_id);\n\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\t/**\n\t * Removes all dynamic children\n\t * @throws if node property is read-only\n\t */\n\tclear() {\n\t\tthis._checkIsNotReadOnly(true);\n\t\t_.each(this._dynamicChildren, this.remove.bind(this));\n\t}\n\n\t/**\n\t * Inserts a property into the collection\n\t *\n\t * @param {string} in_key - Key of the entry in the collection\n\t * @param {property-properties.NamedProperty} in_property - The property to insert\n\t * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n\t * trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t */\n\t_insert(in_key, in_property, in_reportToView) {\n\t\tif (validationsEnabled.enabled) {\n\t\t\tthis._checkIsNotReadOnly(true);\n\t\t}\n\n\t\t// Add the child property to the dynamic properties\n\t\tIndexedCollectionBaseProperty.prototype._insert.call(this, in_key, in_property, false);\n\n\t\t// We postponed the report above, to make sure the child property has actually been appended to this\n\t\t// node, before the report is forwarded to the view\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Removes an entry with the given key\n\t *\n\t * @param {string} in_key - key of the entry\n\t * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n\t * trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t */\n\t_removeByKey(in_key, in_reportToView) {\n\t\tthis._checkIsNotReadOnly(true);\n\n\t\tif (this._dynamicChildren[in_key]) {\n\t\t\t// Remove from the indexed collection\n\t\t\tIndexedCollectionBaseProperty.prototype._removeByKey.call(\n\t\t\t\tthis,\n\t\t\t\tin_key,\n\t\t\t\tin_reportToView,\n\t\t\t);\n\t\t} else {\n\t\t\tconsole.error(MSG.REMOVING_NON_EXISTING_KEY + in_key);\n\t\t}\n\t}\n\n\t/**\n\t * Stores the information to which CheckedOutRepositoryInfo object this root property belongs.\n\t * Note: these functions should only be used internally (within the PropertySets library)\n\t *\n\t * @param {property-properties.CheckoutView~CheckedOutRepositoryInfo} in_checkedOutRepositoryInfo -\n\t * The checked out repository info this root property belongs to.\n\t * @protected\n\t */\n\t_setCheckedOutRepositoryInfo(in_checkedOutRepositoryInfo) {\n\t\tthis._checkedOutRepositoryInfo = in_checkedOutRepositoryInfo;\n\t}\n\n\t/**\n\t * Gets the information to which CheckedOutRepositoryInfo object this root property belongs.\n\t * Note: these functions should only be used internally (within the PropertySets library)\n\t *\n\t * @return {property-properties.CheckoutView~CheckedOutRepositoryInfo|undefined} If this is the root of the\n\t * checked out hierarchy, this will return the checkout.\n\t * @protected\n\t */\n\t_getCheckedOutRepositoryInfo() {\n\t\treturn this._checkedOutRepositoryInfo;\n\t}\n\n\t/**\n\t * Returns the name of all the static sub-properties of this property.\n\t *\n\t * @return {Array.<string>} An array of all the static property ids\n\t */\n\tgetStaticIds() {\n\t\treturn Object.keys(this._staticChildren);\n\t}\n\n\t/**\n\t * Returns the name of all the dynamic sub-properties of this property.\n\t *\n\t * @return {Array.<string>} An array of all the dynamic property ids\n\t */\n\tgetDynamicIds() {\n\t\treturn Object.keys(this._dynamicChildren);\n\t}\n\n\t/**\n\t * Returns an Object with all the dynamic children of this node property.\n\t *\n\t * WARNING: This is a direct access to the internal data-structure and the collection MUST NOT be modified. It is\n\t * read only for fast access and iteration. Insertion and deletion MUST be done via the insert and remove functions\n\t * of this class.\n\t *\n\t * @return {Object<String, property-properties.MapProperty~MapValueType>} The map with all entries in the map.\n\t */\n\t_getDynamicChildrenReadOnly() {\n\t\treturn this._dynamicChildren;\n\t}\n\n\t/**\n\t * Given an object that mirrors a PSet Template, assign the properties.\n\t *\n\t * E.g.\n\t *\n\t * ```\n\t * <pre>\n\t * Templates = {\n\t * properties: [\n\t * { id: 'foo', typeid: 'String' },\n\t * { id: 'bar', properties: [{id: 'baz', typeid: 'Uint32'}] }\n\t * ]\n\t * }\n\t * </pre>\n\t * ```\n\t *\n\t * You would update the values like: `baseProperty.setValues({foo: 'hello', bar: {baz: 1}});`\n\t *\n\t * WARNING: not completely implemented for all types.\n\t *\n\t * @param {object} in_properties - The properties you would like to assign\n\t * @private\n\t */\n\tsetValues(in_properties) {\n\t\tvar checkoutView = this._getCheckoutView();\n\t\tif (checkoutView !== undefined) {\n\t\t\tcheckoutView.pushNotificationDelayScope();\n\t\t\tContainerProperty.prototype._setValues.call(this, in_properties, false, false);\n\t\t\tcheckoutView.popNotificationDelayScope();\n\t\t} else {\n\t\t\tContainerProperty.prototype._setValues.call(this, in_properties, false, false);\n\t\t}\n\t}\n}\n\nContainerProperty.prototype._typeid = \"ContainerProperty\";\nContainerProperty.prototype._dynamicChildren = {};\nContainerProperty.prototype._optionalChildren = {};\n"]}
@@ -4,6 +4,7 @@
4
4
  * efficient and convenient. Additionally, we provide direct access
5
5
  * methods to the enums in the array, e.g. .getEnumString(3) directly
6
6
  * returns the enum string at position 3 of the array
7
+ * @internal
7
8
  */
8
9
  export class EnumArrayProperty extends ValueArrayProperty {
9
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"enumArrayProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH;IACC;;;;;;;;;OASG;IACH,wBAMC;IADA,qBAAgD;IAGjD;;;;;;OAMG;IACH,sCAHW,MAAM,GAAC,MAAM,GACZ,MAAM,CAiBjB;IA2CD;;;;;;OAMG;IACH,0BALW,MAAM,uBAOhB;IAED;;;;;;;OAOG;IACH,oBANW,MAAM,YACN,UAAQ,QAmBlB;IAED;;;;;OAKG;IACH,2BAJW,MAAM,GAEL,MAAM,CAUjB;IAED;;;;;;;OAOG;IACH,0BANW,MAAM,aACN,MAAM,GAGL,MAAM,MAAM,CAAC,CAexB;IAiCD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CACD"}
1
+ {"version":3,"file":"enumArrayProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH;IACC;;;;;;;;;OASG;IACH,wBAMC;IADA,qBAAgD;IAGjD;;;;;;OAMG;IACH,sCAHW,MAAM,GAAC,MAAM,GACZ,MAAM,CAiBjB;IA2CD;;;;;;OAMG;IACH,0BALW,MAAM,uBAOhB;IAED;;;;;;;OAOG;IACH,oBANW,MAAM,YACN,UAAQ,QAmBlB;IAED;;;;;OAKG;IACH,2BAJW,MAAM,GAEL,MAAM,CAUjB;IAED;;;;;;;OAOG;IACH,0BANW,MAAM,aACN,MAAM,GAGL,MAAM,MAAM,CAAC,CAexB;IAiCD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CACD"}
@@ -13,6 +13,7 @@ const { ValueArrayProperty } = require("./valueArrayProperty");
13
13
  * efficient and convenient. Additionally, we provide direct access
14
14
  * methods to the enums in the array, e.g. .getEnumString(3) directly
15
15
  * returns the enum string at position 3 of the array
16
+ * @internal
16
17
  */
17
18
  export class EnumArrayProperty extends ValueArrayProperty {
18
19
  /**
@@ -1 +1 @@
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,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SAC/C;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAC,iBAAiB,GAAG,KAAK;QACtC,OAAO,iBAAiB;YACvB,CAAC,CAAC,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC;YAChE,CAAC,CAAC,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,SAAS;QACR,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACnD,IAAI,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACnB;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED;;;OAGG;IACH,gBAAgB,CAAC,SAAS;QACzB,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAC/D,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACf,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAC7C,CAAC;CACD;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\t/**\n\t * @param {Object} in_params - The parameters\n\t * @param {Number=} [in_params.length=0] - The length of the array, if applicable\n\t * @param {Object} in_params._enumDictionary - The value<->enum dictonary needed to convert the values\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueArrayProperty\n\t * @alias property-properties.EnumArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t\t// whenever an EnumProperty is created by the PropertyFactory, we get a\n\t\t// dictonary [value->enum] and [enum->value] to efficiently lookup\n\t\t// values/enums for the property.\n\t\tthis._enumDictionary = in_params._enumDictionary;\n\t}\n\n\t/**\n\t * Since an enum can be identified by its value and its enum string,\n\t * we have to check/convert the type here. We also check if a value\n\t * is suitable for this enum type.\n\t * @param {number|string} in_value - Value to be checked/converted\n\t * @return {number} Internal value for this enum type\n\t */\n\t_convertEnumToInternalValue(in_value) {\n\t\t// check if we've got a string\n\t\tif (_.isString(in_value)) {\n\t\t\tvar internalEnum = this._enumDictionary.enumEntriesById[in_value];\n\t\t\tif (!internalEnum) {\n\t\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + in_value);\n\t\t\t}\n\t\t\treturn internalEnum.value;\n\t\t} else {\n\t\t\tif (!this._enumDictionary.enumEntriesByValue[in_value]) {\n\t\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + in_value);\n\t\t\t} else {\n\t\t\t\treturn in_value;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Inserts the content of a given array into the array property\n\t * @param {number} in_offset - Target index\n\t * @param {Array<*>} in_array - The array to be inserted\n\t * @throws if in_array is not an array\n\t * @throws if in_position is not a number\n\t * @throws if a value to be inserted is an instance of BaseProperty\n\t * @throws if tyring to modify a referenced property.\n\t */\n\tinsertRange(in_offset, in_array) {\n\t\tif (!_.isNumber(in_offset)) {\n\t\t\tthrow new TypeError(\n\t\t\t\tMSG.NOT_NUMBER + \"in_offset, method: EnumArray.insertRange or .insert\",\n\t\t\t);\n\t\t}\n\t\tif (!_.isArray(in_array)) {\n\t\t\tthrow new TypeError(MSG.IN_ARRAY_NOT_ARRAY + \"EnumArrayProperty.insertRange\");\n\t\t}\n\n\t\tvar internalValueArray = [];\n\t\tvar that = this;\n\t\t_.each(in_array, function (element) {\n\t\t\tinternalValueArray.push(that._convertEnumToInternalValue(element));\n\t\t});\n\t\tValueArrayProperty.prototype.insertRange.call(this, in_offset, internalValueArray);\n\t}\n\n\t/**\n\t * Sets the content of an enum in an enum array.\n\t * @param {number} in_index - Target index\n\t * @param {*} in_value - The value to set\n\t * @throws if in_value is not a string or number\n\t * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n\t */\n\tset(in_index, in_value) {\n\t\tif (!_.isNumber(in_value) && !_.isString(in_value)) {\n\t\t\tthrow new TypeError(MSG.VALUE_STRING_OR_NUMBER + in_value);\n\t\t}\n\t\tthis.setRange(in_index, [in_value]);\n\t}\n\n\t/**\n\t * Sets the content of an enum in an enum array. Alternative syntax to `.set()`.\n\t * @param {number} in_index - Target index\n\t * @param {*} in_value - The value to set\n\t * @throws if in_value is not a string or number\n\t * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n\t */\n\tsetEnumByString(in_index, in_value) {\n\t\tthis.set(in_index, in_value);\n\t}\n\n\t/**\n\t * Sets the array properties elements to the content of the given array all changed elements must already exist.\n\t * @param {number} in_offset - Target start index\n\t * @param {Array<*>} in_array - contains the elements to be set\n\t * @throws if in_offset is not a number\n\t * @throws if in_array is not an array\n\t *\n\t */\n\tsetRange(in_offset, in_array) {\n\t\tif (!_.isNumber(in_offset)) {\n\t\t\tthrow new TypeError(MSG.NOT_NUMBER + \"in_offset, method: EnumArray.setRange or .set\");\n\t\t}\n\t\tif (!_.isArray(in_array)) {\n\t\t\tthrow new TypeError(MSG.IN_ARRAY_NOT_ARRAY + \"EnumArrayProperty.setRange\");\n\t\t}\n\n\t\tvar internalValueArray = [];\n\t\tvar that = this;\n\t\t_.each(in_array, function (element) {\n\t\t\tinternalValueArray.push(that._convertEnumToInternalValue(element));\n\t\t});\n\t\tValueArrayProperty.prototype.setRange.call(this, in_offset, internalValueArray);\n\t}\n\n\t/**\n\t * Gets the array element at a given index.\n\t * @param {number} in_position - The target index\n\t * @throws if no entry exists at in_position\n\t * @return {string} the enum string at that index\n\t */\n\tgetEnumString(in_position) {\n\t\tvar internalValue = this._dataArrayRef.getValue(in_position);\n\t\tvar resultEntry = this._enumDictionary.enumEntriesByValue[internalValue];\n\t\tif (!resultEntry) {\n\t\t\tthrow new TypeError(MSG.UNKNOWN_ENUM + internalValue);\n\t\t} else {\n\t\t\treturn resultEntry.id;\n\t\t}\n\t}\n\n\t/**\n\t * Gets an array of the enum strings starting at a given index\n\t * @param {number} in_offset - The start index\n\t * @param {number} in_length - how many should be read\n\t * @throws if in_offset or in_length are not numbers\n\t * @throws if no entry exists at one of the positions\n\t * @return {Array<string>} the enum strings we asked for\n\t */\n\tgetEnumStrings(in_offset, in_length) {\n\t\tif (!_.isNumber(in_offset)) {\n\t\t\tthrow new TypeError(MSG.NOT_NUMBER + \"in_offset, method: EnumArray.getEnumStrings\");\n\t\t}\n\t\tif (!_.isNumber(in_length)) {\n\t\t\tthrow new TypeError(MSG.NOT_NUMBER + \"in_length, method: EnumArray.getEnumStrings\");\n\t\t}\n\n\t\tvar result = [];\n\t\tfor (var i = 0; i < in_length; i++) {\n\t\t\tresult.push(this.getEnumString(i + in_offset));\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns the full property type identifier for the ChangeSet including the enum type id\n\t * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted\n\t * @return {string} The typeid\n\t */\n\tgetFullTypeid(in_hideCollection = false) {\n\t\treturn in_hideCollection\n\t\t\t? TypeIdHelper.createSerializationTypeId(this._typeid, \"\", true)\n\t\t\t: TypeIdHelper.createSerializationTypeId(this._typeid, \"array\", true);\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\tgetValues() {\n\t\tvar result = [];\n\t\tfor (var i = 0; i < this._dataArrayRef.length; i++) {\n\t\t\tvar child = this._dataArrayRef.getValue(i);\n\t\t\tresult.push(child);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Int32Array, in_length);\n\t}\n\n\t/**\n\t * let the user to query all valid entries of an enum array property\n\t * @return {{}} all valid (string) entries and their (int) values\n\t */\n\tgetValidEnumList() {\n\t\treturn this._enumDictionary.enumEntriesById;\n\t}\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;;;;;;;GAOG;AACH,MAAM,OAAO,iBAAkB,SAAQ,kBAAkB;IACxD;;;;;;;;;OASG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,uEAAuE;QACvE,kEAAkE;QAClE,iCAAiC;QACjC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;IAClD,CAAC;IAED;;;;;;OAMG;IACH,2BAA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,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACnD,IAAI,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACnB;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED;;;OAGG;IACH,gBAAgB,CAAC,SAAS;QACzB,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAC/D,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACf,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAC7C,CAAC;CACD;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 * @internal\n */\nexport class EnumArrayProperty extends ValueArrayProperty {\n\t/**\n\t * @param {Object} in_params - The parameters\n\t * @param {Number=} [in_params.length=0] - The length of the array, if applicable\n\t * @param {Object} in_params._enumDictionary - The value<->enum dictonary needed to convert the values\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueArrayProperty\n\t * @alias property-properties.EnumArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t\t// whenever an EnumProperty is created by the PropertyFactory, we get a\n\t\t// dictonary [value->enum] and [enum->value] to efficiently lookup\n\t\t// values/enums for the property.\n\t\tthis._enumDictionary = in_params._enumDictionary;\n\t}\n\n\t/**\n\t * Since an enum can be identified by its value and its enum string,\n\t * we have to check/convert the type here. We also check if a value\n\t * is suitable for this enum type.\n\t * @param {number|string} in_value - Value to be checked/converted\n\t * @return {number} Internal value for this enum type\n\t */\n\t_convertEnumToInternalValue(in_value) {\n\t\t// check if we've got a string\n\t\tif (_.isString(in_value)) {\n\t\t\tvar internalEnum = this._enumDictionary.enumEntriesById[in_value];\n\t\t\tif (!internalEnum) {\n\t\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + in_value);\n\t\t\t}\n\t\t\treturn internalEnum.value;\n\t\t} else {\n\t\t\tif (!this._enumDictionary.enumEntriesByValue[in_value]) {\n\t\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + in_value);\n\t\t\t} else {\n\t\t\t\treturn in_value;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Inserts the content of a given array into the array property\n\t * @param {number} in_offset - Target index\n\t * @param {Array<*>} in_array - The array to be inserted\n\t * @throws if in_array is not an array\n\t * @throws if in_position is not a number\n\t * @throws if a value to be inserted is an instance of BaseProperty\n\t * @throws if tyring to modify a referenced property.\n\t */\n\tinsertRange(in_offset, in_array) {\n\t\tif (!_.isNumber(in_offset)) {\n\t\t\tthrow new TypeError(\n\t\t\t\tMSG.NOT_NUMBER + \"in_offset, method: EnumArray.insertRange or .insert\",\n\t\t\t);\n\t\t}\n\t\tif (!_.isArray(in_array)) {\n\t\t\tthrow new TypeError(MSG.IN_ARRAY_NOT_ARRAY + \"EnumArrayProperty.insertRange\");\n\t\t}\n\n\t\tvar internalValueArray = [];\n\t\tvar that = this;\n\t\t_.each(in_array, function (element) {\n\t\t\tinternalValueArray.push(that._convertEnumToInternalValue(element));\n\t\t});\n\t\tValueArrayProperty.prototype.insertRange.call(this, in_offset, internalValueArray);\n\t}\n\n\t/**\n\t * Sets the content of an enum in an enum array.\n\t * @param {number} in_index - Target index\n\t * @param {*} in_value - The value to set\n\t * @throws if in_value is not a string or number\n\t * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n\t */\n\tset(in_index, in_value) {\n\t\tif (!_.isNumber(in_value) && !_.isString(in_value)) {\n\t\t\tthrow new TypeError(MSG.VALUE_STRING_OR_NUMBER + in_value);\n\t\t}\n\t\tthis.setRange(in_index, [in_value]);\n\t}\n\n\t/**\n\t * Sets the content of an enum in an enum array. Alternative syntax to `.set()`.\n\t * @param {number} in_index - Target index\n\t * @param {*} in_value - The value to set\n\t * @throws if in_value is not a string or number\n\t * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n\t */\n\tsetEnumByString(in_index, in_value) {\n\t\tthis.set(in_index, in_value);\n\t}\n\n\t/**\n\t * Sets the array properties elements to the content of the given array all changed elements must already exist.\n\t * @param {number} in_offset - Target start index\n\t * @param {Array<*>} in_array - contains the elements to be set\n\t * @throws if in_offset is not a number\n\t * @throws if in_array is not an array\n\t *\n\t */\n\tsetRange(in_offset, in_array) {\n\t\tif (!_.isNumber(in_offset)) {\n\t\t\tthrow new TypeError(MSG.NOT_NUMBER + \"in_offset, method: EnumArray.setRange or .set\");\n\t\t}\n\t\tif (!_.isArray(in_array)) {\n\t\t\tthrow new TypeError(MSG.IN_ARRAY_NOT_ARRAY + \"EnumArrayProperty.setRange\");\n\t\t}\n\n\t\tvar internalValueArray = [];\n\t\tvar that = this;\n\t\t_.each(in_array, function (element) {\n\t\t\tinternalValueArray.push(that._convertEnumToInternalValue(element));\n\t\t});\n\t\tValueArrayProperty.prototype.setRange.call(this, in_offset, internalValueArray);\n\t}\n\n\t/**\n\t * Gets the array element at a given index.\n\t * @param {number} in_position - The target index\n\t * @throws if no entry exists at in_position\n\t * @return {string} the enum string at that index\n\t */\n\tgetEnumString(in_position) {\n\t\tvar internalValue = this._dataArrayRef.getValue(in_position);\n\t\tvar resultEntry = this._enumDictionary.enumEntriesByValue[internalValue];\n\t\tif (!resultEntry) {\n\t\t\tthrow new TypeError(MSG.UNKNOWN_ENUM + internalValue);\n\t\t} else {\n\t\t\treturn resultEntry.id;\n\t\t}\n\t}\n\n\t/**\n\t * Gets an array of the enum strings starting at a given index\n\t * @param {number} in_offset - The start index\n\t * @param {number} in_length - how many should be read\n\t * @throws if in_offset or in_length are not numbers\n\t * @throws if no entry exists at one of the positions\n\t * @return {Array<string>} the enum strings we asked for\n\t */\n\tgetEnumStrings(in_offset, in_length) {\n\t\tif (!_.isNumber(in_offset)) {\n\t\t\tthrow new TypeError(MSG.NOT_NUMBER + \"in_offset, method: EnumArray.getEnumStrings\");\n\t\t}\n\t\tif (!_.isNumber(in_length)) {\n\t\t\tthrow new TypeError(MSG.NOT_NUMBER + \"in_length, method: EnumArray.getEnumStrings\");\n\t\t}\n\n\t\tvar result = [];\n\t\tfor (var i = 0; i < in_length; i++) {\n\t\t\tresult.push(this.getEnumString(i + in_offset));\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns the full property type identifier for the ChangeSet including the enum type id\n\t * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted\n\t * @return {string} The typeid\n\t */\n\tgetFullTypeid(in_hideCollection = false) {\n\t\treturn in_hideCollection\n\t\t\t? TypeIdHelper.createSerializationTypeId(this._typeid, \"\", true)\n\t\t\t: TypeIdHelper.createSerializationTypeId(this._typeid, \"array\", true);\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\tgetValues() {\n\t\tvar result = [];\n\t\tfor (var i = 0; i < this._dataArrayRef.length; i++) {\n\t\t\tvar child = this._dataArrayRef.getValue(i);\n\t\t\tresult.push(child);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Int32Array, in_length);\n\t}\n\n\t/**\n\t * let the user to query all valid entries of an enum array property\n\t * @return {{}} all valid (string) entries and their (int) values\n\t */\n\tgetValidEnumList() {\n\t\treturn this._enumDictionary.enumEntriesById;\n\t}\n}\nEnumArrayProperty.prototype._typeid = \"Enum\";\n"]}
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * A primitive property for enums.
3
+ * @internal
3
4
  */
4
5
  export class EnumProperty extends Int32Property {
5
6
  _enumDictionary: any;
@@ -1 +1 @@
1
- {"version":3,"file":"enumProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":"AAgBA;;GAEG;AACH;IAcE,qBAAgD;IAEhD,WAAyE;IAW1E;;;;OAIG;IACH,iBAHY,MAAM,CAUjB;IAED;;;;;;;OAOG;IACH,mBALW,SAAO,MAAM,QAgBvB;IAED;;;;;;OAMG;IACH,6BAJW,MAAM,QAahB;IAYD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CACD"}
1
+ {"version":3,"file":"enumProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":"AAgBA;;;GAGG;AACH;IAcE,qBAAgD;IAEhD,WAAyE;IAW1E;;;;OAIG;IACH,iBAHY,MAAM,CAUjB;IAED;;;;;;;OAOG;IACH,mBALW,SAAO,MAAM,QAgBvB;IAED;;;;;;OAMG;IACH,6BAJW,MAAM,QAahB;IAYD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CACD"}
@@ -14,6 +14,7 @@ const { _castFunctors } = require("./primitiveTypeCasts");
14
14
  const { ValueProperty } = require("./valueProperty");
15
15
  /**
16
16
  * A primitive property for enums.
17
+ * @internal
17
18
  */
18
19
  export class EnumProperty extends Int32Property {
19
20
  /**
@@ -1 +1 @@
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,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AY,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\t/**\n\t * @param {Object=} in_params - the parameters\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.Int32Property\n\t * @alias property-properties.EnumProperty\n\t * @category Value Properties\n\t */\n\tconstructor(in_params) {\n\t\tsuper({ typeid: \"Enum\", ...in_params });\n\t\t// whenever an EnumProperty is created by the PropertyFactory, we get a\n\t\t// dictionary [value->enum] and [enum->value] to efficiently lookup\n\t\t// values/enums for the property.\n\t\tthis._enumDictionary = in_params._enumDictionary;\n\t\t// default for this property type is '0' if it exists to keep backward compatibility\n\t\tthis._data = this._enumDictionary ? this._enumDictionary.defaultValue : 0;\n\t}\n\n\t/**\n\t * Evaluates enum properties as primitives.\n\t * @return {boolean} true since Enum properties are primitives.\n\t */\n\tisPrimitiveType() {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns the current enum string\n\t * @return {string} the string value of the property\n\t * @throws if no entry exists\n\t */\n\tgetEnumString() {\n\t\tvar resultEntry = this._enumDictionary.enumEntriesByValue[this._data];\n\t\tif (!resultEntry) {\n\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + this._data);\n\t\t} else {\n\t\t\treturn resultEntry.id;\n\t\t}\n\t}\n\n\t/**\n\t * Sets the (internal, integer) value of the property\n\t *\n\t * @param {Number|string} in_value - The new integer value - it must be a valid enum integer for this property or\n\t * the new enum value in form of a valid enum string for this EnumProperty.\n\t * @throws if no entry exists for in_value\n\t *\n\t */\n\tsetValue(in_value) {\n\t\tthis._checkIsNotReadOnly(true);\n\n\t\t// check if we've got a string\n\t\tif (_.isString(in_value)) {\n\t\t\tthis.setEnumByString(in_value);\n\t\t} else if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + in_value);\n\t\t} else {\n\t\t\tValueProperty.prototype.setValue.call(this, in_value);\n\t\t}\n\t}\n\n\t/**\n\t * Sets the property by an enum string\n\t *\n\t * @param {string} in_stringId - The enum string we want to switch to\n\t * @throws if in_stringId is not a string\n\t * @throws if no entry is found for in_stringId\n\t */\n\tsetEnumByString(in_stringId) {\n\t\tConsoleUtils.assert(_.isString(in_stringId), MSG.STRING_ID_MUST_BE_STRING + in_stringId);\n\t\tvar internalEnum = this._enumDictionary.enumEntriesById[in_stringId];\n\t\tif (!internalEnum) {\n\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + in_stringId);\n\t\t} else {\n\t\t\tvar internalValue = internalEnum.value;\n\t\t\tthis.setValue(internalValue);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the full property type identifier for the ChangeSet including the enum type id\n\t * @param {boolean} [in_hideCollection=false] - If true the collection type (if applicable) will be omitted\n\t * since that is not aplicable here, this param is ignored.\n\t * @return {string} The typeid\n\t */\n\tgetFullTypeid(in_hideCollection = false) {\n\t\treturn TypeIdHelper.createSerializationTypeId(this._typeid, \"single\", true);\n\t}\n\n\t/**\n\t * let the user to query all valid entries of an enum\n\t * @return {{}} all valid (string) entries and their (int) values\n\t */\n\tgetValidEnumList() {\n\t\treturn this._enumDictionary.enumEntriesById;\n\t}\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;AAC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C;CACD;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 * @internal\n */\nexport class EnumProperty extends Int32Property {\n\t/**\n\t * @param {Object=} in_params - the parameters\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.Int32Property\n\t * @alias property-properties.EnumProperty\n\t * @category Value Properties\n\t */\n\tconstructor(in_params) {\n\t\tsuper({ typeid: \"Enum\", ...in_params });\n\t\t// whenever an EnumProperty is created by the PropertyFactory, we get a\n\t\t// dictionary [value->enum] and [enum->value] to efficiently lookup\n\t\t// values/enums for the property.\n\t\tthis._enumDictionary = in_params._enumDictionary;\n\t\t// default for this property type is '0' if it exists to keep backward compatibility\n\t\tthis._data = this._enumDictionary ? this._enumDictionary.defaultValue : 0;\n\t}\n\n\t/**\n\t * Evaluates enum properties as primitives.\n\t * @return {boolean} true since Enum properties are primitives.\n\t */\n\tisPrimitiveType() {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns the current enum string\n\t * @return {string} the string value of the property\n\t * @throws if no entry exists\n\t */\n\tgetEnumString() {\n\t\tvar resultEntry = this._enumDictionary.enumEntriesByValue[this._data];\n\t\tif (!resultEntry) {\n\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + this._data);\n\t\t} else {\n\t\t\treturn resultEntry.id;\n\t\t}\n\t}\n\n\t/**\n\t * Sets the (internal, integer) value of the property\n\t *\n\t * @param {Number|string} in_value - The new integer value - it must be a valid enum integer for this property or\n\t * the new enum value in form of a valid enum string for this EnumProperty.\n\t * @throws if no entry exists for in_value\n\t *\n\t */\n\tsetValue(in_value) {\n\t\tthis._checkIsNotReadOnly(true);\n\n\t\t// check if we've got a string\n\t\tif (_.isString(in_value)) {\n\t\t\tthis.setEnumByString(in_value);\n\t\t} else if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + in_value);\n\t\t} else {\n\t\t\tValueProperty.prototype.setValue.call(this, in_value);\n\t\t}\n\t}\n\n\t/**\n\t * Sets the property by an enum string\n\t *\n\t * @param {string} in_stringId - The enum string we want to switch to\n\t * @throws if in_stringId is not a string\n\t * @throws if no entry is found for in_stringId\n\t */\n\tsetEnumByString(in_stringId) {\n\t\tConsoleUtils.assert(_.isString(in_stringId), MSG.STRING_ID_MUST_BE_STRING + in_stringId);\n\t\tvar internalEnum = this._enumDictionary.enumEntriesById[in_stringId];\n\t\tif (!internalEnum) {\n\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + in_stringId);\n\t\t} else {\n\t\t\tvar internalValue = internalEnum.value;\n\t\t\tthis.setValue(internalValue);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the full property type identifier for the ChangeSet including the enum type id\n\t * @param {boolean} [in_hideCollection=false] - If true the collection type (if applicable) will be omitted\n\t * since that is not aplicable here, this param is ignored.\n\t * @return {string} The typeid\n\t */\n\tgetFullTypeid(in_hideCollection = false) {\n\t\treturn TypeIdHelper.createSerializationTypeId(this._typeid, \"single\", true);\n\t}\n\n\t/**\n\t * let the user to query all valid entries of an enum\n\t * @return {{}} all valid (string) entries and their (int) values\n\t */\n\tgetValidEnumList() {\n\t\treturn this._enumDictionary.enumEntriesById;\n\t}\n}\nEnumProperty.prototype._typeid = \"Enum\";\nEnumProperty.prototype._castFunctor = _castFunctors.Int32;\n"]}
@@ -88,6 +88,7 @@ export class Integer64Property extends ValueProperty {
88
88
  }
89
89
  /**
90
90
  * A primitive property class for big signed integer values.
91
+ * @internal
91
92
  */
92
93
  export class Int64Property extends Integer64Property {
93
94
  /**
@@ -103,6 +104,7 @@ export class Int64Property extends Integer64Property {
103
104
  }
104
105
  /**
105
106
  * A primitive property class for big unsingned integer values.
107
+ * @internal
106
108
  */
107
109
  export class Uint64Property extends Integer64Property {
108
110
  /**