@fluid-experimental/property-properties 0.59.1001-62246 → 0.59.2000

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 (86) hide show
  1. package/dist/properties/abstractStaticCollectionProperty.d.ts +5 -5
  2. package/dist/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
  3. package/dist/properties/abstractStaticCollectionProperty.js +3 -3
  4. package/dist/properties/abstractStaticCollectionProperty.js.map +1 -1
  5. package/dist/properties/intProperties.d.ts +4 -4
  6. package/dist/properties/intProperties.d.ts.map +1 -1
  7. package/dist/properties/intProperties.js +2 -2
  8. package/dist/properties/intProperties.js.map +1 -1
  9. package/dist/propertyUtils.d.ts +1 -1
  10. package/dist/propertyUtils.js +1 -1
  11. package/dist/propertyUtils.js.map +1 -1
  12. package/dist/test/tsconfig.tsbuildinfo +6 -6
  13. package/lib/containerSerializer.d.ts +27 -0
  14. package/lib/containerSerializer.d.ts.map +1 -0
  15. package/lib/enableValidations.d.ts +15 -0
  16. package/lib/enableValidations.d.ts.map +1 -0
  17. package/lib/index.d.ts +25 -0
  18. package/lib/index.d.ts.map +1 -0
  19. package/lib/properties/abstractStaticCollectionProperty.d.ts +153 -0
  20. package/lib/properties/abstractStaticCollectionProperty.d.ts.map +1 -0
  21. package/lib/properties/abstractStaticCollectionProperty.js +3 -3
  22. package/lib/properties/abstractStaticCollectionProperty.js.map +1 -1
  23. package/lib/properties/arrayProperty.d.ts +315 -0
  24. package/lib/properties/arrayProperty.d.ts.map +1 -0
  25. package/lib/properties/baseProperty.d.ts +594 -0
  26. package/lib/properties/baseProperty.d.ts.map +1 -0
  27. package/lib/properties/boolProperty.d.ts +12 -0
  28. package/lib/properties/boolProperty.d.ts.map +1 -0
  29. package/lib/properties/containerProperty.d.ts +102 -0
  30. package/lib/properties/containerProperty.d.ts.map +1 -0
  31. package/lib/properties/enumArrayProperty.d.ts +60 -0
  32. package/lib/properties/enumArrayProperty.d.ts.map +1 -0
  33. package/lib/properties/enumProperty.d.ts +36 -0
  34. package/lib/properties/enumProperty.d.ts.map +1 -0
  35. package/lib/properties/floatProperties.d.ts +32 -0
  36. package/lib/properties/floatProperties.d.ts.map +1 -0
  37. package/lib/properties/index.d.ts +29 -0
  38. package/lib/properties/index.d.ts.map +1 -0
  39. package/lib/properties/indexedCollectionBaseProperty.d.ts +74 -0
  40. package/lib/properties/indexedCollectionBaseProperty.d.ts.map +1 -0
  41. package/lib/properties/intProperties.d.ts +132 -0
  42. package/lib/properties/intProperties.d.ts.map +1 -0
  43. package/lib/properties/intProperties.js +2 -2
  44. package/lib/properties/intProperties.js.map +1 -1
  45. package/lib/properties/lazyLoadedProperties.d.ts +14 -0
  46. package/lib/properties/lazyLoadedProperties.d.ts.map +1 -0
  47. package/lib/properties/mapProperty.d.ts +84 -0
  48. package/lib/properties/mapProperty.d.ts.map +1 -0
  49. package/lib/properties/namedNodeProperty.d.ts +25 -0
  50. package/lib/properties/namedNodeProperty.d.ts.map +1 -0
  51. package/lib/properties/namedProperty.d.ts +20 -0
  52. package/lib/properties/namedProperty.d.ts.map +1 -0
  53. package/lib/properties/nodeProperty.d.ts +17 -0
  54. package/lib/properties/nodeProperty.d.ts.map +1 -0
  55. package/lib/properties/primitiveTypeCasts.d.ts +15 -0
  56. package/lib/properties/primitiveTypeCasts.d.ts.map +1 -0
  57. package/lib/properties/referenceArrayProperty.d.ts +47 -0
  58. package/lib/properties/referenceArrayProperty.d.ts.map +1 -0
  59. package/lib/properties/referenceMapProperty.d.ts +46 -0
  60. package/lib/properties/referenceMapProperty.d.ts.map +1 -0
  61. package/lib/properties/referenceProperty.d.ts +59 -0
  62. package/lib/properties/referenceProperty.d.ts.map +1 -0
  63. package/lib/properties/setProperty.d.ts +69 -0
  64. package/lib/properties/setProperty.d.ts.map +1 -0
  65. package/lib/properties/stringProperty.d.ts +39 -0
  66. package/lib/properties/stringProperty.d.ts.map +1 -0
  67. package/lib/properties/uintProperties.d.ts +47 -0
  68. package/lib/properties/uintProperties.d.ts.map +1 -0
  69. package/lib/properties/valueArrayProperty.d.ts +216 -0
  70. package/lib/properties/valueArrayProperty.d.ts.map +1 -0
  71. package/lib/properties/valueMapProperty.d.ts +224 -0
  72. package/lib/properties/valueMapProperty.d.ts.map +1 -0
  73. package/lib/properties/valueProperty.d.ts +50 -0
  74. package/lib/properties/valueProperty.d.ts.map +1 -0
  75. package/lib/propertyFactory.d.ts +3 -0
  76. package/lib/propertyFactory.d.ts.map +1 -0
  77. package/lib/propertyTemplate.d.ts +137 -0
  78. package/lib/propertyTemplate.d.ts.map +1 -0
  79. package/lib/propertyTemplateWrapper.d.ts +74 -0
  80. package/lib/propertyTemplateWrapper.d.ts.map +1 -0
  81. package/lib/propertyUtils.d.ts +15 -0
  82. package/lib/propertyUtils.d.ts.map +1 -0
  83. package/lib/propertyUtils.js +1 -1
  84. package/lib/propertyUtils.js.map +1 -1
  85. package/package.json +8 -5
  86. package/src/index.d.ts +3 -3
@@ -31,7 +31,7 @@ export class AbstractStaticCollectionProperty extends BaseProperty {
31
31
  /**
32
32
  * returns the value of a sub-property
33
33
  * This is a shortcut for .get(in_ids, in_options).getValue()
34
- * @param {string|number|array<string|number>} in_ids the ID or IDs of the property or an array of IDs
34
+ * @param {string|number|Array<string|number>} in_ids the ID or IDs of the property or an array of IDs
35
35
  * if an array is passed, the .get function will be performed on each id in sequence
36
36
  * for example .getValue(['position','x']) is equivalent to .get('position').get('x').getValue().
37
37
  * If at any point .get resolves to a ReferenceProperty, it will, by default, return the property that the
@@ -43,7 +43,7 @@ export class AbstractStaticCollectionProperty extends BaseProperty {
43
43
  * @throws if in_ids is not a string or an array of strings or numbers.
44
44
  * @return {*} The value of the given sub-property
45
45
  */
46
- getValue(in_ids: string | number | any, in_options: any): any;
46
+ getValue(in_ids: string | number | Array<string | number>, in_options: any): any;
47
47
  /**
48
48
  * Get all sub-properties of the current property.
49
49
  * Caller MUST NOT modify the properties.
@@ -80,11 +80,11 @@ export class AbstractStaticCollectionProperty extends BaseProperty {
80
80
  * found in that object.
81
81
  * @see {setValues}
82
82
  * @param {object} in_values The object containing the nested values to assign
83
- * @param {Bool} in_typed Whether the values are typed/polymorphic.
84
- * @param {Bool} in_initial - Whether we are setting default/initial values
83
+ * @param {boolean} in_typed Whether the values are typed/polymorphic.
84
+ * @param {boolean} in_initial - Whether we are setting default/initial values
85
85
  or if the function is called directly with the values to set.
86
86
  */
87
- _setValues(in_values: object, in_typed: any, in_initial: any): void;
87
+ _setValues(in_values: object, in_typed: boolean, in_initial: boolean): void;
88
88
  /**
89
89
  * Given an object that mirrors a PSet Template, assigns the properties to the values
90
90
  * found in that object.
@@ -1 +1 @@
1
- {"version":3,"file":"abstractStaticCollectionProperty.d.ts","sourceRoot":"","sources":["../../src/properties/abstractStaticCollectionProperty.js"],"names":[],"mappings":"AAYA;;;;;GAKG;AAEH;IACI;;;OAGG;IACH,wBAQC;IAHO,oBAAyB;IAE7B,sBAA2B;IAkE/B;;;;;;OAMG;IACH,YAJY,MAAM,GAAC,MAAM,OAMxB;IAiBD;;;;;;OAMG;IACH,WAFY,MAAM,CAKjB;IAED;;;;;;;;;;;;;;OAcG;IACH,iBAZY,MAAM,GAAC,MAAM,MAAqB,wBAiB7C;IAED;;;;;OAKG;IACH,0BASC;IAWD;;;;OAIG;IACH,WAFY,MAAO,MAAM,CAAC,CAIzB;IAED;;;;;;;;;OASG;IACH,aARY,MAAM,CAsBjB;IAED;;;;;OAKG;IACH,WAHW,MAAM,GACL,OAAO,CAIlB;IAiGD;;;;;;;;OAQG;IACH,sBALW,MAAM,wCA2BhB;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,qBALW,MAAM,QAchB;IAED;;;;;;;;;;;;OAYG;IACH,yDANW,OAAO,QA6BjB;IAED;;;;;;;;MAQE;IACF,yCAMC;IAmED;;;;;;;OAOG;IACH,sFAHW,MAAM,eAsBhB;IAkJD;;;;OAIG;IACH,0BAEC;IAED;;;OAGG;IACH,uCAIC;CACJ"}
1
+ {"version":3,"file":"abstractStaticCollectionProperty.d.ts","sourceRoot":"","sources":["../../src/properties/abstractStaticCollectionProperty.js"],"names":[],"mappings":"AAYA;;;;;GAKG;AAEH;IACI;;;OAGG;IACH,wBAQC;IAHO,oBAAyB;IAE7B,sBAA2B;IAkE/B;;;;;;OAMG;IACH,YAJY,MAAM,GAAC,MAAM,OAMxB;IAiBD;;;;;;OAMG;IACH,WAFY,MAAM,CAKjB;IAED;;;;;;;;;;;;;;OAcG;IACH,iBAZY,MAAM,GAAC,MAAM,GAAC,MAAM,MAAM,GAAC,MAAM,CAAC,wBAiB7C;IAED;;;;;OAKG;IACH,0BASC;IAWD;;;;OAIG;IACH,WAFY,MAAO,MAAM,CAAC,CAIzB;IAED;;;;;;;;;OASG;IACH,aARY,MAAM,CAsBjB;IAED;;;;;OAKG;IACH,WAHW,MAAM,GACL,OAAO,CAIlB;IAiGD;;;;;;;;OAQG;IACH,sBALW,MAAM,YACN,OAAO,cACP,OAAO,QAyBjB;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,qBALW,MAAM,QAchB;IAED;;;;;;;;;;;;OAYG;IACH,yDANW,OAAO,QA6BjB;IAED;;;;;;;;MAQE;IACF,yCAMC;IAmED;;;;;;;OAOG;IACH,sFAHW,MAAM,eAsBhB;IAkJD;;;;OAIG;IACH,0BAEC;IAED;;;OAGG;IACH,uCAIC;CACJ"}
@@ -135,7 +135,7 @@ class AbstractStaticCollectionProperty extends BaseProperty {
135
135
  /**
136
136
  * returns the value of a sub-property
137
137
  * This is a shortcut for .get(in_ids, in_options).getValue()
138
- * @param {string|number|array<string|number>} in_ids the ID or IDs of the property or an array of IDs
138
+ * @param {string|number|Array<string|number>} in_ids the ID or IDs of the property or an array of IDs
139
139
  * if an array is passed, the .get function will be performed on each id in sequence
140
140
  * for example .getValue(['position','x']) is equivalent to .get('position').get('x').getValue().
141
141
  * If at any point .get resolves to a ReferenceProperty, it will, by default, return the property that the
@@ -315,8 +315,8 @@ class AbstractStaticCollectionProperty extends BaseProperty {
315
315
  * found in that object.
316
316
  * @see {setValues}
317
317
  * @param {object} in_values The object containing the nested values to assign
318
- * @param {Bool} in_typed Whether the values are typed/polymorphic.
319
- * @param {Bool} in_initial - Whether we are setting default/initial values
318
+ * @param {boolean} in_typed Whether the values are typed/polymorphic.
319
+ * @param {boolean} in_initial - Whether we are setting default/initial values
320
320
  or if the function is called directly with the values to set.
321
321
  */
322
322
  _setValues(in_values, in_typed, in_initial) {
@@ -1 +1 @@
1
- {"version":3,"file":"abstractStaticCollectionProperty.js","sourceRoot":"","sources":["../../src/properties/abstractStaticCollectionProperty.js"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnF,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACpF,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,oBAAoB,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAE7E,MAAM,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,SAAS,CAAC;AACnD,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,YAAY,CAAC;AACtD;;;;;GAKG;AAEH,MAAa,gCAAiC,SAAQ,YAAY;IAC9D;;;OAGG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,sBAAsB;QACtB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YACvB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;SAC7B;QACD,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC;IAChC,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAA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,EAAE,GAAG,CAAC,gBAAgB;YAC9D,0DAA0D,CAAC,CAAC;QAChE,IAAI,CAAC,iBAAiB,GAAG,YAAY,CAAC;IAC1C,CAAC;CACJ;AArqBD,4EAqqBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst _ = require('lodash');\nconst { ConsoleUtils, constants } = require('@fluid-experimental/property-common');\nconst { PathHelper, ChangeSet } = require('@fluid-experimental/property-changeset');\nconst { BaseProperty } = require('./baseProperty');\nconst { LazyLoadedProperties: Property } = require('./lazyLoadedProperties');\n\nconst { MSG, PROPERTY_PATH_DELIMITER } = constants;\nconst { BREAK_TRAVERSAL, PATH_TOKENS } = BaseProperty;\n/**\n * This class serves as a view to read, write and listen to changes in an\n * object's value field. To do this we simply keep a pointer to the object and\n * its associated data field that we are interested in. If no data field is\n * present this property will fail constructing.\n */\n\nexport class AbstractStaticCollectionProperty extends BaseProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @protected\n */\n constructor(in_params) {\n super(in_params);\n\n // internal management\n if (!this._staticChildren) {\n this._staticChildren = {};\n }\n this._constantChildren = {};\n }\n\n /**\n * Returns the sub-property having the given name, or following the given paths, in this property.\n *\n * @param {string|number|array<string|number>} in_ids the ID or IDs of the property or an array of IDs\n * if an array is passed, the .get function will be performed on each id in sequence\n * for example .get(['position','x']) is equivalent to .get('position').get('x').\n * If .get resolves to a ReferenceProperty, it will, by default, return the property that the\n * ReferenceProperty refers to.\n * @param {Object} in_options - parameter object\n * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS]\n * How should this function behave during reference resolution?\n *\n * @throws if an in_id is neither a string or an array of strings and numbers.\n * @return {property-properties.BaseProperty | undefined} The property you seek or undefined if none is found.\n */\n get(in_ids, in_options) {\n in_options = _.isObject(in_options) ? in_options : {};\n in_options.referenceResolutionMode =\n in_options.referenceResolutionMode === undefined ? BaseProperty.REFERENCE_RESOLUTION.ALWAYS :\n in_options.referenceResolutionMode;\n\n var prop = this;\n if (typeof in_ids === 'string' ||\n typeof in_ids === 'number') {\n prop = this._get(in_ids);\n if (in_options.referenceResolutionMode === BaseProperty.REFERENCE_RESOLUTION.ALWAYS) {\n if (prop instanceof Property.ReferenceProperty) {\n prop = prop.ref;\n }\n }\n } else if (_.isArray(in_ids)) {\n for (var i = 0; i < in_ids.length && prop; i++) {\n var mode = in_options.referenceResolutionMode;\n // do not do anything with token itself, only changes behavior of path preceding the token;\n if (in_ids[i] === PATH_TOKENS.REF) {\n continue;\n }\n if (mode === BaseProperty.REFERENCE_RESOLUTION.NO_LEAFS) {\n mode = i !== in_ids.length - 1 ? BaseProperty.REFERENCE_RESOLUTION.ALWAYS :\n BaseProperty.REFERENCE_RESOLUTION.NEVER;\n }\n if (in_ids[i - 1] === PATH_TOKENS.REF ||\n in_ids[i + 1] === PATH_TOKENS.REF) {\n mode = BaseProperty.REFERENCE_RESOLUTION.NEVER;\n }\n prop = prop.get(in_ids[i], { referenceResolutionMode: mode });\n if (prop === undefined && i < in_ids.length - 1) {\n return undefined;\n }\n }\n } else if (in_ids === PATH_TOKENS.ROOT) {\n prop = prop.getRoot();\n } else if (in_ids === PATH_TOKENS.UP) {\n prop = prop.getParent();\n } else if (in_ids === PATH_TOKENS.REF) {\n throw new Error(MSG.NO_GET_DEREFERENCE_ONLY);\n } else {\n throw new Error(MSG.STRING_OR_ARRAY_STRINGS + in_ids);\n }\n\n return prop;\n }\n\n /**\n * Returns the sub-property having the given name in this property.\n *\n * @param {string|number} in_id the id of the prop you wish to retrieve.\n *\n * @return {property-properties.BaseProperty | undefined} The property you seek or undefined if none is found.\n */\n _get(in_id) {\n return this._staticChildren[in_id] || this._constantChildren[in_id];\n }\n\n /**\n * Returns a string identifying the property\n *\n * If an id has been explicitly set on this property we return that one, otherwise the GUID is used.\n *\n * @return {string} String identifying the property\n */\n getId() {\n if (this._id !== null) {\n return this._id;\n } else {\n return this.getGuid();\n }\n }\n\n /**\n * Returns the GUID of this named property\n * A Guid is a unique identifier for a branch, commit or repository,\n * similar to a URN. Most functions in the API will us a URN but the\n * Guid is used to traverse the commit graph.\n * @return {string} The GUID\n */\n getGuid() {\n var guid = this.get('guid', { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n return guid ? guid.value : undefined;\n }\n\n /**\n * returns the value of a sub-property\n * This is a shortcut for .get(in_ids, in_options).getValue()\n * @param {string|number|array<string|number>} in_ids the ID or IDs of the property or an array of IDs\n * if an array is passed, the .get function will be performed on each id in sequence\n * for example .getValue(['position','x']) is equivalent to .get('position').get('x').getValue().\n * If at any point .get resolves to a ReferenceProperty, it will, by default, return the property that the\n * ReferenceProperty refers to.\n * @param {Object} in_options - parameter object\n * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS]\n * How should this function behave during reference resolution?\n * @throws if the in_ids does not resolve to a ValueProperty or StringProperty\n * @throws if in_ids is not a string or an array of strings or numbers.\n * @return {*} The value of the given sub-property\n */\n getValue(in_ids, in_options) {\n var property = this.get(in_ids, in_options);\n ConsoleUtils.assert((property instanceof Property.ValueProperty || property instanceof Property.StringProperty),\n MSG.GET_VALUE_NOT_A_VALUE + in_ids);\n return property.getValue();\n }\n\n /**\n * Get all sub-properties of the current property.\n * Caller MUST NOT modify the properties.\n * If entries include References, it will return the reference (will not automatically resolve the reference)\n * @return {Object.<property-properties.BaseProperty>} An object containing all the properties\n */\n getEntriesReadOnly() {\n /* Note that the implementation is voluntarily generic so that derived classes\n should not have to redefine this function. */\n var res = {};\n var ids = this.getIds();\n for (var i = 0; i < ids.length; i++) {\n res[ids[i]] = this.get(ids[i], { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n }\n return res;\n }\n\n /**\n * Returns the name of all the sub-properties of this property.\n *\n * @return {Array.<string>} An array of all the property ids\n */\n getIds() {\n return this._getIds();\n }\n\n /**\n * Returns the name of all the sub-properties of this property.\n *\n * @return {Array.<string>} An array of all the property ids\n */\n _getIds() {\n return Object.keys(this._staticChildren).concat(Object.keys(this._constantChildren));\n }\n\n /**\n * Returns an object with all the nested values contained in this property\n * @return {object} an object representing the values of your property\n * for example: {\n * position: {\n * x: 2,\n * y: 5\n * }\n * }\n */\n getValues() {\n var ids = this._getIds();\n var result = {};\n for (var i = 0; i < ids.length; i++) {\n var child = this.get(ids[i]);\n if (_.isUndefined(child)) {\n result[ids[i]] = undefined;\n } else if (child._context === 'single' && child.isPrimitiveType()) {\n result[ids[i]] = child.getValue();\n } else {\n result[ids[i]] = child.getValues();\n }\n }\n return result;\n }\n\n /**\n * Checks whether a property with the given name exists\n *\n * @param {string} in_id - Name of the property\n * @return {boolean} True if the property exists. Otherwise false.\n */\n has(in_id) {\n return this._get(in_id) !== undefined;\n }\n\n /**\n * Expand a path returning the property or value at the end.\n *\n * @param {string} in_path the path\n * @param {Object} in_options - parameter object\n * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS]\n * How should this function behave during reference resolution?\n * @throws if in_path is not a valid path\n * @return {property-properties.BaseProperty|undefined|*} resolved path\n */\n resolvePath(in_path, in_options) {\n in_options = in_options || {};\n in_options.referenceResolutionMode =\n in_options.referenceResolutionMode === undefined ? BaseProperty.REFERENCE_RESOLUTION.ALWAYS :\n in_options.referenceResolutionMode;\n\n var node = this;\n\n // Tokenize the path string\n var tokenTypes = [];\n var pathArr = PathHelper.tokenizePathString(in_path, tokenTypes);\n\n // Return to the repository root, if the path starts with a root token (a / )\n var iterationStart = 0;\n if (pathArr.length > 0) {\n if (tokenTypes[0] === PathHelper.TOKEN_TYPES.PATH_ROOT_TOKEN) {\n node = this.getRoot();\n iterationStart = 1;\n } else if (tokenTypes[0] === PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN) {\n for (var j = 0; j < pathArr.length; j++) {\n if (tokenTypes[j] === PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN) {\n var parent = node.getParent();\n if (parent) {\n node = parent;\n } else {\n return undefined;\n }\n iterationStart++;\n }\n }\n }\n }\n\n for (var i = iterationStart; i < pathArr.length && node; i++) {\n if (tokenTypes[i] !== PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN) {\n node = node._resolvePathSegment(pathArr[i], tokenTypes[i]);\n if (in_options.referenceResolutionMode === BaseProperty.REFERENCE_RESOLUTION.ALWAYS ||\n (in_options.referenceResolutionMode === BaseProperty.REFERENCE_RESOLUTION.NO_LEAFS &&\n i !== pathArr.length - 1)) {\n if (node instanceof Property.ReferenceProperty) {\n if (tokenTypes[i + 1] !== PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN) {\n // recursive function to resolve nested reference properties\n node = node.ref;\n }\n }\n }\n }\n }\n return node;\n }\n\n /**\n * Returns the path segment for a child\n *\n * @param {property-properties.BaseProperty} in_childNode - The child for which the path is returned\n *\n * @return {string} The path segment to resolve the child property under this property\n * @protected\n */\n _getPathSegmentForChildNode(in_childNode) {\n return PROPERTY_PATH_DELIMITER + PathHelper.quotePathSegmentIfNeeded(in_childNode.getId());\n }\n\n /**\n * Resolves a direct child node based on the given path segment\n *\n * @param {String} in_segment - The path segment to resolve\n * @param {property-properties.PathHelper.TOKEN_TYPES} in_segmentType - The type of segment in the tokenized path\n *\n * @return {property-properties.BaseProperty|undefined} The child property that has been resolved\n * @protected\n */\n _resolvePathSegment(in_segment, in_segmentType) {\n // Base Properties only support paths separated via dots\n if (in_segmentType !== PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN) {\n throw new Error(MSG.INVALID_PATH_TOKEN + in_segment);\n }\n\n if (this.has(in_segment)) {\n return this.get(in_segment, { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n } else {\n return undefined;\n }\n }\n\n /**\n * Given an object that mirrors a PSet Template, assigns the properties to the values\n * found in that object.\n * @see {setValues}\n * @param {object} in_values The object containing the nested values to assign\n * @param {Bool} in_typed Whether the values are typed/polymorphic.\n * @param {Bool} in_initial - Whether we are setting default/initial values\n or if the function is called directly with the values to set.\n */\n _setValues(in_values, in_typed, in_initial) {\n ConsoleUtils.assert(_.isObject(in_values), MSG.SET_VALUES_PARAM_NOT_OBJECT);\n\n var that = this;\n var keys = Object.keys(in_values);\n\n for (var i = 0; i < keys.length; i++) {\n var propertyKey = keys[i];\n var propertyValue = in_values[propertyKey];\n var property = that.get(propertyKey, { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n\n if (property instanceof Property.ValueProperty || property instanceof Property.StringProperty) {\n property.setValue(propertyValue);\n } else if (property instanceof BaseProperty && _.isObject(propertyValue)) {\n property._setValues(propertyValue, in_typed, in_initial);\n } else if (property instanceof BaseProperty) {\n const typeid = property.getTypeid();\n throw new Error(MSG.SET_VALUES_PATH_PROPERTY + propertyKey + ', of type: ' + typeid);\n } else if (property === undefined) {\n throw new Error(MSG.SET_VALUES_PATH_INVALID + propertyKey);\n }\n }\n }\n\n /**\n * Given an object that mirrors a PSet Template, assigns the properties to the values\n * found in that object.\n * eg.\n * <pre>\n * Templates = {\n * properties: [\n * { id: 'foo', typeid: 'String' },\n * { id: 'bar', properties: [{id: 'baz', typeid: 'Uint32'}] }\n * ]\n * }\n * </pre>\n *\n * @param {object} in_values The object containing the nested values to assign\n * @throws if in_values is not an object (or in the case of ArrayProperty, an array)\n * @throws if one of the path in in_values does not correspond to a path in that property\n * @throws if one of the path to a value in in_values leads to a property in this property.\n */\n setValues(in_values) {\n var checkoutView = this._getCheckoutView();\n if (checkoutView !== undefined) {\n checkoutView.pushNotificationDelayScope();\n AbstractStaticCollectionProperty.prototype._setValues.call(this, in_values, false, false);\n checkoutView.popNotificationDelayScope();\n } else {\n AbstractStaticCollectionProperty.prototype._setValues.call(this, in_values, false, false);\n }\n }\n\n /**\n * Append a child property\n *\n * This is an internal function, called by the PropertyFactory when instantiating a template and internally by the\n * NodeProperty. Adding children dynamically by the user is only allowed in the NodeProperty.\n *\n * @param {property-properties.BaseProperty} in_property the property to append\n * @param {boolean} in_allowChildMerges - Whether merging of children (nested properties) is allowed.\n * This is used for extending inherited properties.\n * @protected\n * @throws {OVERWRITING_ID} - Thrown when adding a property with an existing id.\n * @throws {OVERRIDDING_INHERITED_TYPES} - Thrown when overriding inherited typed properties.\n */\n _append(in_property, in_allowChildMerges) {\n var id = in_property.getId();\n if (this._staticChildren[id] === undefined) {\n this._staticChildren[id] = in_property;\n in_property._setParent(this);\n } else {\n if (!in_allowChildMerges) {\n throw new Error(MSG.OVERWRITING_ID + id);\n }\n\n // if child is untyped then merge its properties\n if (this._staticChildren[id].getTypeid() === 'AbstractStaticCollectionProperty' &&\n this._staticChildren[id].getContext() === 'single') {\n // if the property's type is different than the child type, throw error.\n if (this._staticChildren[id].getTypeid() !== in_property.getTypeid()) {\n throw new Error(MSG.OVERRIDDING_INHERITED_TYPES + id);\n }\n\n this._staticChildren[id]._merge(in_property);\n } else {\n throw new Error(MSG.OVERRIDDING_INHERITED_TYPES + id);\n }\n }\n }\n\n /**\n * Merge child properties\n *\n * This is an internal function that merges children of two properties.\n * This is used for extending inherited properties.\n *\n * @param {property-properties.BaseProperty} in_property the property to merge its children (nested properties) with.\n * @protected\n */\n _merge(in_property) {\n var keys = Object.keys(in_property._staticChildren);\n\n for (var i = 0; i < keys.length; i++) {\n this._append(in_property._staticChildren[keys[i]], true);\n }\n }\n\n /**\n * @inheritdoc\n */\n _getDirtyChildren(in_flags) {\n var flags = in_flags === undefined ? ~BaseProperty.MODIFIED_STATE_FLAGS.CLEAN : in_flags;\n var rtn = [];\n var childKeys = _.keys(this._staticChildren);\n for (var i = 0; i < childKeys.length; i++) {\n if ((this._get(childKeys[i])._isDirty(flags)) !== 0) {\n rtn.push(childKeys[i]);\n }\n }\n\n return rtn;\n }\n\n /**\n * Traverses the property hierarchy downwards until all child properties are reached\n *\n * @param {Function} in_callback - Callback to invoke for each property. The traversal can be stopped\n * by returning BaseProperty.BREAK_TRAVERSAL\n * @throws if in_callback is not a function.\n * @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted,\n * otherwise undefined\n */\n traverseDown(in_callback) {\n ConsoleUtils.assert(_.isFunction(in_callback), MSG.CALLBACK_NOT_FCT);\n return this._traverse(in_callback, '');\n }\n\n /**\n * Traverses all children in the child hierarchy\n * TODO: How should this behave for collections?\n *\n * @param {function} in_callback - Callback to invoke for every child\n * @param {string} in_pathFromTraversalStart - Path from the root of the traversal to this node\n * @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted,\n * otherwise undefined\n * @private\n */\n _traverse(in_callback, in_pathFromTraversalStart) {\n if (in_pathFromTraversalStart) {\n in_pathFromTraversalStart += PROPERTY_PATH_DELIMITER;\n }\n\n var childKeys, child, childPath, result, i;\n\n childKeys = this._getIds();\n for (i = 0; i < childKeys.length; i++) {\n child = this._get(childKeys[i]);\n childPath = in_pathFromTraversalStart + PathHelper.quotePathSegmentIfNeeded(child.getId());\n\n result = in_callback(child, childPath);\n if (result !== BREAK_TRAVERSAL) {\n result = child._traverse(in_callback, childPath);\n if (result !== BREAK_TRAVERSAL) {\n continue;\n }\n }\n return BREAK_TRAVERSAL;\n }\n\n return undefined;\n }\n\n /**\n * Traverses all static properties (properties declared in the template and not added dynamically) in the\n * hierarchy below this node\n *\n * @param {function} in_callback - Callback to invoke for every property\n * @param {string?} in_pathFromTraversalStart - Path from the root of the traversal to this node\n * @protected\n */\n _traverseStaticProperties(in_callback,\n in_pathFromTraversalStart) {\n in_pathFromTraversalStart = in_pathFromTraversalStart || '';\n var propertyKeys = _.keys(this._staticChildren);\n for (var i = 0; i < propertyKeys.length; i++) {\n var property = this._staticChildren[propertyKeys[i]];\n var childPath = in_pathFromTraversalStart +\n (in_pathFromTraversalStart.length !== 0 ? PROPERTY_PATH_DELIMITER : '') +\n PathHelper.quotePathSegmentIfNeeded(property.getId());\n\n // We only recursively traverse ContainerProperties, since these are used to define the hierarchy within\n // one template\n if ((property.getTypeid() === 'AbstractStaticCollectionProperty' ||\n property.getTypeid() === 'ContainerProperty') &&\n property.getContext() === 'single') {\n property._traverseStaticProperties(in_callback, childPath);\n }\n in_callback(property, childPath);\n }\n }\n\n /**\n * Serialize the property into a changeSet\n *\n * @param {boolean} in_dirtyOnly -\n * Only include dirty entries in the serialization\n * @param {boolean} in_includeRootTypeid -\n * Include the typeid of the root of the hierarchy\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] -\n * The type of dirtiness to use when reporting dirty changes. By default this is\n * PENDING_CHANGE\n * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n * function will descend into referenced repositories. WARNING: if there are loops in the references\n * this can result in an infinite loop\n *\n * @return {Object} The serialized representation of this property\n * @private\n */\n _serialize(in_dirtyOnly,\n in_includeRootTypeid,\n in_dirtinessType,\n in_includeReferencedRepositories) {\n var serializedChildren = {};\n var childrenType;\n\n in_dirtyOnly = in_dirtyOnly || false;\n in_dirtinessType = in_dirtinessType === undefined ?\n BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE : in_dirtinessType;\n\n this._traverseStaticProperties(function(in_node, in_pathFromTraversalStart) {\n if (in_dirtyOnly && !in_node._isDirty(in_dirtinessType)) {\n return;\n }\n\n childrenType = in_node.getFullTypeid();\n\n if (childrenType !== 'AbstractStaticCollectionProperty' &&\n childrenType !== 'ContainerProperty') { // we don't want to keep BaseProperties\n // as they mostly behave as 'paths' to\n // a ValueProperty.\n var serialized = in_node._serialize(in_dirtyOnly,\n false,\n in_dirtinessType,\n in_includeReferencedRepositories);\n\n // Add the root typeid if requested\n if (!ChangeSet.isEmptyChangeSet(serialized) || !in_dirtyOnly) {\n if (!serializedChildren[childrenType]) {\n serializedChildren[childrenType] = {};\n }\n serializedChildren[childrenType][in_pathFromTraversalStart] = serialized;\n }\n }\n });\n\n if (in_includeRootTypeid) {\n serializedChildren['typeid'] = this.getFullTypeid();\n }\n\n return serializedChildren;\n }\n\n /**\n * Sets the property to the state in the given normalized changeset\n *\n * @param { property-changeset.SerializedChangeSet} in_serializedObj - The serialized changeset to apply to this node. This\n * has to be an normalized change-set (only containing additions and property assignments. Deletes and Modify\n * must not appear)\n * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout view\n * and trigger a modified event there. When batching updates, this\n * can be prevented via this flag.\n * @return {property-changeset.SerializedChangeSet} ChangeSet with the changes that actually were performed during the\n * deserialization\n */\n _deserialize(in_serializedObj, in_reportToView) {\n var changeSet = {};\n\n // Traverse all properties of this template\n this._traverseStaticProperties(function(in_node, in_pathFromTraversalStart) {\n // We do not deserialize base properties, since the traverseStatic function\n // already traverses recursively\n if (in_node.getTypeid() === 'ContainerProperty' && in_node.getContext() === 'single') {\n return;\n }\n\n var typeid = in_node.getFullTypeid();\n\n // Get the ChangeSet\n // If there is a ChangeSet in the serialized object, we use that as the\n // target ChangeSet, otherwise we use an empty ChangeSet (since properties with\n // empty Sub-ChangeSets are removed from the parent ChangeSet, we have to\n // explicitly use an empty ChangeSet for those)\n var propertyChangeSet = {};\n if (in_serializedObj[typeid] !== undefined &&\n in_serializedObj[typeid][in_pathFromTraversalStart] !== undefined) {\n propertyChangeSet = in_serializedObj[typeid][in_pathFromTraversalStart];\n }\n\n // Deserialize the ChangeSet into the property\n var changes = in_node._deserialize(propertyChangeSet, false);\n\n // And track the performed modification in the result\n if (!ChangeSet.isEmptyChangeSet(changes)) {\n changeSet[typeid] = changeSet[typeid] || {};\n changeSet[typeid][in_pathFromTraversalStart] = changes;\n }\n });\n\n // Finally report the dirtiness to the view (we postponed this above)\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n return changeSet;\n }\n\n /**\n * Get a flattened, tree like representation of this object and all of it's\n * descendants. The flattening will stop at primitive properties and collections.\n *\n * For non-leaf nodes, it is possible to access the corresponding node object itself via the\n * propertyNode member of the flattened representation (warning, this will overwrite a\n * property of this name).\n * TODO: Do we want to have this feature or is it to dangerous?\n *\n * @return {Object} the flat representation\n * @private\n */\n _flatten() {\n var flattenedRepresentation = {};\n var keys = this._getIds();\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var child = this._get(key);\n if (!child._isFlattenLeaf()) {\n flattenedRepresentation[key] = child._flatten();\n } else {\n flattenedRepresentation[key] = child;\n }\n }\n\n flattenedRepresentation.propertyNode = this;\n\n return flattenedRepresentation;\n }\n\n /**\n * Returns the number of children this node has\n * @return {number} The number of children\n * @private\n */\n _getChildrenCount() {\n return this._getIds().length;\n }\n\n /**\n * Sets constants\n * @param {Object} in_constants - The list of typed values.\n */\n _setConstants(in_constants) {\n ConsoleUtils.assert(_.isObject(in_constants), MSG.ASSERTION_FAILED +\n ' setConstants parameter: in_constants must be an object.');\n this._constantChildren = in_constants;\n }\n}\n"]}
1
+ {"version":3,"file":"abstractStaticCollectionProperty.js","sourceRoot":"","sources":["../../src/properties/abstractStaticCollectionProperty.js"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnF,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACpF,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,oBAAoB,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAE7E,MAAM,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,SAAS,CAAC;AACnD,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,YAAY,CAAC;AACtD;;;;;GAKG;AAEH,MAAa,gCAAiC,SAAQ,YAAY;IAC9D;;;OAGG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,sBAAsB;QACtB,IAAI,CAAC,IAAI,CAAC,e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IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC;IACjC,CAAC;IAED;;;OAGG;IACH,aAAa,CAAC,YAAY;QACtB,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC,gBAAgB;YAC9D,0DAA0D,CAAC,CAAC;QAChE,IAAI,CAAC,iBAAiB,GAAG,YAAY,CAAC;IAC1C,CAAC;CACJ;AArqBD,4EAqqBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst _ = require('lodash');\nconst { ConsoleUtils, constants } = require('@fluid-experimental/property-common');\nconst { PathHelper, ChangeSet } = require('@fluid-experimental/property-changeset');\nconst { BaseProperty } = require('./baseProperty');\nconst { LazyLoadedProperties: Property } = require('./lazyLoadedProperties');\n\nconst { MSG, PROPERTY_PATH_DELIMITER } = constants;\nconst { BREAK_TRAVERSAL, PATH_TOKENS } = BaseProperty;\n/**\n * This class serves as a view to read, write and listen to changes in an\n * object's value field. To do this we simply keep a pointer to the object and\n * its associated data field that we are interested in. If no data field is\n * present this property will fail constructing.\n */\n\nexport class AbstractStaticCollectionProperty extends BaseProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @protected\n */\n constructor(in_params) {\n super(in_params);\n\n // internal management\n if (!this._staticChildren) {\n this._staticChildren = {};\n }\n this._constantChildren = {};\n }\n\n /**\n * Returns the sub-property having the given name, or following the given paths, in this property.\n *\n * @param {string|number|array<string|number>} in_ids the ID or IDs of the property or an array of IDs\n * if an array is passed, the .get function will be performed on each id in sequence\n * for example .get(['position','x']) is equivalent to .get('position').get('x').\n * If .get resolves to a ReferenceProperty, it will, by default, return the property that the\n * ReferenceProperty refers to.\n * @param {Object} in_options - parameter object\n * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS]\n * How should this function behave during reference resolution?\n *\n * @throws if an in_id is neither a string or an array of strings and numbers.\n * @return {property-properties.BaseProperty | undefined} The property you seek or undefined if none is found.\n */\n get(in_ids, in_options) {\n in_options = _.isObject(in_options) ? in_options : {};\n in_options.referenceResolutionMode =\n in_options.referenceResolutionMode === undefined ? BaseProperty.REFERENCE_RESOLUTION.ALWAYS :\n in_options.referenceResolutionMode;\n\n var prop = this;\n if (typeof in_ids === 'string' ||\n typeof in_ids === 'number') {\n prop = this._get(in_ids);\n if (in_options.referenceResolutionMode === BaseProperty.REFERENCE_RESOLUTION.ALWAYS) {\n if (prop instanceof Property.ReferenceProperty) {\n prop = prop.ref;\n }\n }\n } else if (_.isArray(in_ids)) {\n for (var i = 0; i < in_ids.length && prop; i++) {\n var mode = in_options.referenceResolutionMode;\n // do not do anything with token itself, only changes behavior of path preceding the token;\n if (in_ids[i] === PATH_TOKENS.REF) {\n continue;\n }\n if (mode === BaseProperty.REFERENCE_RESOLUTION.NO_LEAFS) {\n mode = i !== in_ids.length - 1 ? BaseProperty.REFERENCE_RESOLUTION.ALWAYS :\n BaseProperty.REFERENCE_RESOLUTION.NEVER;\n }\n if (in_ids[i - 1] === PATH_TOKENS.REF ||\n in_ids[i + 1] === PATH_TOKENS.REF) {\n mode = BaseProperty.REFERENCE_RESOLUTION.NEVER;\n }\n prop = prop.get(in_ids[i], { referenceResolutionMode: mode });\n if (prop === undefined && i < in_ids.length - 1) {\n return undefined;\n }\n }\n } else if (in_ids === PATH_TOKENS.ROOT) {\n prop = prop.getRoot();\n } else if (in_ids === PATH_TOKENS.UP) {\n prop = prop.getParent();\n } else if (in_ids === PATH_TOKENS.REF) {\n throw new Error(MSG.NO_GET_DEREFERENCE_ONLY);\n } else {\n throw new Error(MSG.STRING_OR_ARRAY_STRINGS + in_ids);\n }\n\n return prop;\n }\n\n /**\n * Returns the sub-property having the given name in this property.\n *\n * @param {string|number} in_id the id of the prop you wish to retrieve.\n *\n * @return {property-properties.BaseProperty | undefined} The property you seek or undefined if none is found.\n */\n _get(in_id) {\n return this._staticChildren[in_id] || this._constantChildren[in_id];\n }\n\n /**\n * Returns a string identifying the property\n *\n * If an id has been explicitly set on this property we return that one, otherwise the GUID is used.\n *\n * @return {string} String identifying the property\n */\n getId() {\n if (this._id !== null) {\n return this._id;\n } else {\n return this.getGuid();\n }\n }\n\n /**\n * Returns the GUID of this named property\n * A Guid is a unique identifier for a branch, commit or repository,\n * similar to a URN. Most functions in the API will us a URN but the\n * Guid is used to traverse the commit graph.\n * @return {string} The GUID\n */\n getGuid() {\n var guid = this.get('guid', { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n return guid ? guid.value : undefined;\n }\n\n /**\n * returns the value of a sub-property\n * This is a shortcut for .get(in_ids, in_options).getValue()\n * @param {string|number|Array<string|number>} in_ids the ID or IDs of the property or an array of IDs\n * if an array is passed, the .get function will be performed on each id in sequence\n * for example .getValue(['position','x']) is equivalent to .get('position').get('x').getValue().\n * If at any point .get resolves to a ReferenceProperty, it will, by default, return the property that the\n * ReferenceProperty refers to.\n * @param {Object} in_options - parameter object\n * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS]\n * How should this function behave during reference resolution?\n * @throws if the in_ids does not resolve to a ValueProperty or StringProperty\n * @throws if in_ids is not a string or an array of strings or numbers.\n * @return {*} The value of the given sub-property\n */\n getValue(in_ids, in_options) {\n var property = this.get(in_ids, in_options);\n ConsoleUtils.assert((property instanceof Property.ValueProperty || property instanceof Property.StringProperty),\n MSG.GET_VALUE_NOT_A_VALUE + in_ids);\n return property.getValue();\n }\n\n /**\n * Get all sub-properties of the current property.\n * Caller MUST NOT modify the properties.\n * If entries include References, it will return the reference (will not automatically resolve the reference)\n * @return {Object.<property-properties.BaseProperty>} An object containing all the properties\n */\n getEntriesReadOnly() {\n /* Note that the implementation is voluntarily generic so that derived classes\n should not have to redefine this function. */\n var res = {};\n var ids = this.getIds();\n for (var i = 0; i < ids.length; i++) {\n res[ids[i]] = this.get(ids[i], { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n }\n return res;\n }\n\n /**\n * Returns the name of all the sub-properties of this property.\n *\n * @return {Array.<string>} An array of all the property ids\n */\n getIds() {\n return this._getIds();\n }\n\n /**\n * Returns the name of all the sub-properties of this property.\n *\n * @return {Array.<string>} An array of all the property ids\n */\n _getIds() {\n return Object.keys(this._staticChildren).concat(Object.keys(this._constantChildren));\n }\n\n /**\n * Returns an object with all the nested values contained in this property\n * @return {object} an object representing the values of your property\n * for example: {\n * position: {\n * x: 2,\n * y: 5\n * }\n * }\n */\n getValues() {\n var ids = this._getIds();\n var result = {};\n for (var i = 0; i < ids.length; i++) {\n var child = this.get(ids[i]);\n if (_.isUndefined(child)) {\n result[ids[i]] = undefined;\n } else if (child._context === 'single' && child.isPrimitiveType()) {\n result[ids[i]] = child.getValue();\n } else {\n result[ids[i]] = child.getValues();\n }\n }\n return result;\n }\n\n /**\n * Checks whether a property with the given name exists\n *\n * @param {string} in_id - Name of the property\n * @return {boolean} True if the property exists. Otherwise false.\n */\n has(in_id) {\n return this._get(in_id) !== undefined;\n }\n\n /**\n * Expand a path returning the property or value at the end.\n *\n * @param {string} in_path the path\n * @param {Object} in_options - parameter object\n * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS]\n * How should this function behave during reference resolution?\n * @throws if in_path is not a valid path\n * @return {property-properties.BaseProperty|undefined|*} resolved path\n */\n resolvePath(in_path, in_options) {\n in_options = in_options || {};\n in_options.referenceResolutionMode =\n in_options.referenceResolutionMode === undefined ? BaseProperty.REFERENCE_RESOLUTION.ALWAYS :\n in_options.referenceResolutionMode;\n\n var node = this;\n\n // Tokenize the path string\n var tokenTypes = [];\n var pathArr = PathHelper.tokenizePathString(in_path, tokenTypes);\n\n // Return to the repository root, if the path starts with a root token (a / )\n var iterationStart = 0;\n if (pathArr.length > 0) {\n if (tokenTypes[0] === PathHelper.TOKEN_TYPES.PATH_ROOT_TOKEN) {\n node = this.getRoot();\n iterationStart = 1;\n } else if (tokenTypes[0] === PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN) {\n for (var j = 0; j < pathArr.length; j++) {\n if (tokenTypes[j] === PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN) {\n var parent = node.getParent();\n if (parent) {\n node = parent;\n } else {\n return undefined;\n }\n iterationStart++;\n }\n }\n }\n }\n\n for (var i = iterationStart; i < pathArr.length && node; i++) {\n if (tokenTypes[i] !== PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN) {\n node = node._resolvePathSegment(pathArr[i], tokenTypes[i]);\n if (in_options.referenceResolutionMode === BaseProperty.REFERENCE_RESOLUTION.ALWAYS ||\n (in_options.referenceResolutionMode === BaseProperty.REFERENCE_RESOLUTION.NO_LEAFS &&\n i !== pathArr.length - 1)) {\n if (node instanceof Property.ReferenceProperty) {\n if (tokenTypes[i + 1] !== PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN) {\n // recursive function to resolve nested reference properties\n node = node.ref;\n }\n }\n }\n }\n }\n return node;\n }\n\n /**\n * Returns the path segment for a child\n *\n * @param {property-properties.BaseProperty} in_childNode - The child for which the path is returned\n *\n * @return {string} The path segment to resolve the child property under this property\n * @protected\n */\n _getPathSegmentForChildNode(in_childNode) {\n return PROPERTY_PATH_DELIMITER + PathHelper.quotePathSegmentIfNeeded(in_childNode.getId());\n }\n\n /**\n * Resolves a direct child node based on the given path segment\n *\n * @param {String} in_segment - The path segment to resolve\n * @param {property-properties.PathHelper.TOKEN_TYPES} in_segmentType - The type of segment in the tokenized path\n *\n * @return {property-properties.BaseProperty|undefined} The child property that has been resolved\n * @protected\n */\n _resolvePathSegment(in_segment, in_segmentType) {\n // Base Properties only support paths separated via dots\n if (in_segmentType !== PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN) {\n throw new Error(MSG.INVALID_PATH_TOKEN + in_segment);\n }\n\n if (this.has(in_segment)) {\n return this.get(in_segment, { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n } else {\n return undefined;\n }\n }\n\n /**\n * Given an object that mirrors a PSet Template, assigns the properties to the values\n * found in that object.\n * @see {setValues}\n * @param {object} in_values The object containing the nested values to assign\n * @param {boolean} in_typed Whether the values are typed/polymorphic.\n * @param {boolean} in_initial - Whether we are setting default/initial values\n or if the function is called directly with the values to set.\n */\n _setValues(in_values, in_typed, in_initial) {\n ConsoleUtils.assert(_.isObject(in_values), MSG.SET_VALUES_PARAM_NOT_OBJECT);\n\n var that = this;\n var keys = Object.keys(in_values);\n\n for (var i = 0; i < keys.length; i++) {\n var propertyKey = keys[i];\n var propertyValue = in_values[propertyKey];\n var property = that.get(propertyKey, { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n\n if (property instanceof Property.ValueProperty || property instanceof Property.StringProperty) {\n property.setValue(propertyValue);\n } else if (property instanceof BaseProperty && _.isObject(propertyValue)) {\n property._setValues(propertyValue, in_typed, in_initial);\n } else if (property instanceof BaseProperty) {\n const typeid = property.getTypeid();\n throw new Error(MSG.SET_VALUES_PATH_PROPERTY + propertyKey + ', of type: ' + typeid);\n } else if (property === undefined) {\n throw new Error(MSG.SET_VALUES_PATH_INVALID + propertyKey);\n }\n }\n }\n\n /**\n * Given an object that mirrors a PSet Template, assigns the properties to the values\n * found in that object.\n * eg.\n * <pre>\n * Templates = {\n * properties: [\n * { id: 'foo', typeid: 'String' },\n * { id: 'bar', properties: [{id: 'baz', typeid: 'Uint32'}] }\n * ]\n * }\n * </pre>\n *\n * @param {object} in_values The object containing the nested values to assign\n * @throws if in_values is not an object (or in the case of ArrayProperty, an array)\n * @throws if one of the path in in_values does not correspond to a path in that property\n * @throws if one of the path to a value in in_values leads to a property in this property.\n */\n setValues(in_values) {\n var checkoutView = this._getCheckoutView();\n if (checkoutView !== undefined) {\n checkoutView.pushNotificationDelayScope();\n AbstractStaticCollectionProperty.prototype._setValues.call(this, in_values, false, false);\n checkoutView.popNotificationDelayScope();\n } else {\n AbstractStaticCollectionProperty.prototype._setValues.call(this, in_values, false, false);\n }\n }\n\n /**\n * Append a child property\n *\n * This is an internal function, called by the PropertyFactory when instantiating a template and internally by the\n * NodeProperty. Adding children dynamically by the user is only allowed in the NodeProperty.\n *\n * @param {property-properties.BaseProperty} in_property the property to append\n * @param {boolean} in_allowChildMerges - Whether merging of children (nested properties) is allowed.\n * This is used for extending inherited properties.\n * @protected\n * @throws {OVERWRITING_ID} - Thrown when adding a property with an existing id.\n * @throws {OVERRIDDING_INHERITED_TYPES} - Thrown when overriding inherited typed properties.\n */\n _append(in_property, in_allowChildMerges) {\n var id = in_property.getId();\n if (this._staticChildren[id] === undefined) {\n this._staticChildren[id] = in_property;\n in_property._setParent(this);\n } else {\n if (!in_allowChildMerges) {\n throw new Error(MSG.OVERWRITING_ID + id);\n }\n\n // if child is untyped then merge its properties\n if (this._staticChildren[id].getTypeid() === 'AbstractStaticCollectionProperty' &&\n this._staticChildren[id].getContext() === 'single') {\n // if the property's type is different than the child type, throw error.\n if (this._staticChildren[id].getTypeid() !== in_property.getTypeid()) {\n throw new Error(MSG.OVERRIDDING_INHERITED_TYPES + id);\n }\n\n this._staticChildren[id]._merge(in_property);\n } else {\n throw new Error(MSG.OVERRIDDING_INHERITED_TYPES + id);\n }\n }\n }\n\n /**\n * Merge child properties\n *\n * This is an internal function that merges children of two properties.\n * This is used for extending inherited properties.\n *\n * @param {property-properties.BaseProperty} in_property the property to merge its children (nested properties) with.\n * @protected\n */\n _merge(in_property) {\n var keys = Object.keys(in_property._staticChildren);\n\n for (var i = 0; i < keys.length; i++) {\n this._append(in_property._staticChildren[keys[i]], true);\n }\n }\n\n /**\n * @inheritdoc\n */\n _getDirtyChildren(in_flags) {\n var flags = in_flags === undefined ? ~BaseProperty.MODIFIED_STATE_FLAGS.CLEAN : in_flags;\n var rtn = [];\n var childKeys = _.keys(this._staticChildren);\n for (var i = 0; i < childKeys.length; i++) {\n if ((this._get(childKeys[i])._isDirty(flags)) !== 0) {\n rtn.push(childKeys[i]);\n }\n }\n\n return rtn;\n }\n\n /**\n * Traverses the property hierarchy downwards until all child properties are reached\n *\n * @param {Function} in_callback - Callback to invoke for each property. The traversal can be stopped\n * by returning BaseProperty.BREAK_TRAVERSAL\n * @throws if in_callback is not a function.\n * @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted,\n * otherwise undefined\n */\n traverseDown(in_callback) {\n ConsoleUtils.assert(_.isFunction(in_callback), MSG.CALLBACK_NOT_FCT);\n return this._traverse(in_callback, '');\n }\n\n /**\n * Traverses all children in the child hierarchy\n * TODO: How should this behave for collections?\n *\n * @param {function} in_callback - Callback to invoke for every child\n * @param {string} in_pathFromTraversalStart - Path from the root of the traversal to this node\n * @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted,\n * otherwise undefined\n * @private\n */\n _traverse(in_callback, in_pathFromTraversalStart) {\n if (in_pathFromTraversalStart) {\n in_pathFromTraversalStart += PROPERTY_PATH_DELIMITER;\n }\n\n var childKeys, child, childPath, result, i;\n\n childKeys = this._getIds();\n for (i = 0; i < childKeys.length; i++) {\n child = this._get(childKeys[i]);\n childPath = in_pathFromTraversalStart + PathHelper.quotePathSegmentIfNeeded(child.getId());\n\n result = in_callback(child, childPath);\n if (result !== BREAK_TRAVERSAL) {\n result = child._traverse(in_callback, childPath);\n if (result !== BREAK_TRAVERSAL) {\n continue;\n }\n }\n return BREAK_TRAVERSAL;\n }\n\n return undefined;\n }\n\n /**\n * Traverses all static properties (properties declared in the template and not added dynamically) in the\n * hierarchy below this node\n *\n * @param {function} in_callback - Callback to invoke for every property\n * @param {string?} in_pathFromTraversalStart - Path from the root of the traversal to this node\n * @protected\n */\n _traverseStaticProperties(in_callback,\n in_pathFromTraversalStart) {\n in_pathFromTraversalStart = in_pathFromTraversalStart || '';\n var propertyKeys = _.keys(this._staticChildren);\n for (var i = 0; i < propertyKeys.length; i++) {\n var property = this._staticChildren[propertyKeys[i]];\n var childPath = in_pathFromTraversalStart +\n (in_pathFromTraversalStart.length !== 0 ? PROPERTY_PATH_DELIMITER : '') +\n PathHelper.quotePathSegmentIfNeeded(property.getId());\n\n // We only recursively traverse ContainerProperties, since these are used to define the hierarchy within\n // one template\n if ((property.getTypeid() === 'AbstractStaticCollectionProperty' ||\n property.getTypeid() === 'ContainerProperty') &&\n property.getContext() === 'single') {\n property._traverseStaticProperties(in_callback, childPath);\n }\n in_callback(property, childPath);\n }\n }\n\n /**\n * Serialize the property into a changeSet\n *\n * @param {boolean} in_dirtyOnly -\n * Only include dirty entries in the serialization\n * @param {boolean} in_includeRootTypeid -\n * Include the typeid of the root of the hierarchy\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] -\n * The type of dirtiness to use when reporting dirty changes. By default this is\n * PENDING_CHANGE\n * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n * function will descend into referenced repositories. WARNING: if there are loops in the references\n * this can result in an infinite loop\n *\n * @return {Object} The serialized representation of this property\n * @private\n */\n _serialize(in_dirtyOnly,\n in_includeRootTypeid,\n in_dirtinessType,\n in_includeReferencedRepositories) {\n var serializedChildren = {};\n var childrenType;\n\n in_dirtyOnly = in_dirtyOnly || false;\n in_dirtinessType = in_dirtinessType === undefined ?\n BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE : in_dirtinessType;\n\n this._traverseStaticProperties(function(in_node, in_pathFromTraversalStart) {\n if (in_dirtyOnly && !in_node._isDirty(in_dirtinessType)) {\n return;\n }\n\n childrenType = in_node.getFullTypeid();\n\n if (childrenType !== 'AbstractStaticCollectionProperty' &&\n childrenType !== 'ContainerProperty') { // we don't want to keep BaseProperties\n // as they mostly behave as 'paths' to\n // a ValueProperty.\n var serialized = in_node._serialize(in_dirtyOnly,\n false,\n in_dirtinessType,\n in_includeReferencedRepositories);\n\n // Add the root typeid if requested\n if (!ChangeSet.isEmptyChangeSet(serialized) || !in_dirtyOnly) {\n if (!serializedChildren[childrenType]) {\n serializedChildren[childrenType] = {};\n }\n serializedChildren[childrenType][in_pathFromTraversalStart] = serialized;\n }\n }\n });\n\n if (in_includeRootTypeid) {\n serializedChildren['typeid'] = this.getFullTypeid();\n }\n\n return serializedChildren;\n }\n\n /**\n * Sets the property to the state in the given normalized changeset\n *\n * @param { property-changeset.SerializedChangeSet} in_serializedObj - The serialized changeset to apply to this node. This\n * has to be an normalized change-set (only containing additions and property assignments. Deletes and Modify\n * must not appear)\n * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout view\n * and trigger a modified event there. When batching updates, this\n * can be prevented via this flag.\n * @return {property-changeset.SerializedChangeSet} ChangeSet with the changes that actually were performed during the\n * deserialization\n */\n _deserialize(in_serializedObj, in_reportToView) {\n var changeSet = {};\n\n // Traverse all properties of this template\n this._traverseStaticProperties(function(in_node, in_pathFromTraversalStart) {\n // We do not deserialize base properties, since the traverseStatic function\n // already traverses recursively\n if (in_node.getTypeid() === 'ContainerProperty' && in_node.getContext() === 'single') {\n return;\n }\n\n var typeid = in_node.getFullTypeid();\n\n // Get the ChangeSet\n // If there is a ChangeSet in the serialized object, we use that as the\n // target ChangeSet, otherwise we use an empty ChangeSet (since properties with\n // empty Sub-ChangeSets are removed from the parent ChangeSet, we have to\n // explicitly use an empty ChangeSet for those)\n var propertyChangeSet = {};\n if (in_serializedObj[typeid] !== undefined &&\n in_serializedObj[typeid][in_pathFromTraversalStart] !== undefined) {\n propertyChangeSet = in_serializedObj[typeid][in_pathFromTraversalStart];\n }\n\n // Deserialize the ChangeSet into the property\n var changes = in_node._deserialize(propertyChangeSet, false);\n\n // And track the performed modification in the result\n if (!ChangeSet.isEmptyChangeSet(changes)) {\n changeSet[typeid] = changeSet[typeid] || {};\n changeSet[typeid][in_pathFromTraversalStart] = changes;\n }\n });\n\n // Finally report the dirtiness to the view (we postponed this above)\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n return changeSet;\n }\n\n /**\n * Get a flattened, tree like representation of this object and all of it's\n * descendants. The flattening will stop at primitive properties and collections.\n *\n * For non-leaf nodes, it is possible to access the corresponding node object itself via the\n * propertyNode member of the flattened representation (warning, this will overwrite a\n * property of this name).\n * TODO: Do we want to have this feature or is it to dangerous?\n *\n * @return {Object} the flat representation\n * @private\n */\n _flatten() {\n var flattenedRepresentation = {};\n var keys = this._getIds();\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var child = this._get(key);\n if (!child._isFlattenLeaf()) {\n flattenedRepresentation[key] = child._flatten();\n } else {\n flattenedRepresentation[key] = child;\n }\n }\n\n flattenedRepresentation.propertyNode = this;\n\n return flattenedRepresentation;\n }\n\n /**\n * Returns the number of children this node has\n * @return {number} The number of children\n * @private\n */\n _getChildrenCount() {\n return this._getIds().length;\n }\n\n /**\n * Sets constants\n * @param {Object} in_constants - The list of typed values.\n */\n _setConstants(in_constants) {\n ConsoleUtils.assert(_.isObject(in_constants), MSG.ASSERTION_FAILED +\n ' setConstants parameter: in_constants must be an object.');\n this._constantChildren = in_constants;\n }\n}\n"]}
@@ -68,15 +68,15 @@ export class Integer64Property extends ValueProperty {
68
68
  /**
69
69
  * @param {number} in_high set the higher 32 bit integer part
70
70
  * @throws if in_high is not a number
71
- * @return {boolen} true if the value was actually changed
71
+ * @return {boolean} true if the value was actually changed
72
72
  */
73
- setValueHigh(in_high: number): any;
73
+ setValueHigh(in_high: number): boolean;
74
74
  /**
75
75
  * @param {number} in_low set the lower 32 bit integer part
76
76
  * @throws if in_low is not a number
77
- * @return {boolen} true if the value was actually changed
77
+ * @return {boolean} true if the value was actually changed
78
78
  */
79
- setValueLow(in_low: number): any;
79
+ setValueLow(in_low: number): boolean;
80
80
  /**
81
81
  * The toString() method returns a string representing the specified Integer64 object.
82
82
  *
@@ -1 +1 @@
1
- {"version":3,"file":"intProperties.d.ts","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":"AAsBA;IACI;;;;;;;;OAQG;IACH,wBAIC;IAGL,kBAAmC;CAFlC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAIC;IAGL,kBAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAIC;IAGL,kBAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;;;OASG;IACH,wBAKC;IAHG,qBAAsC;IAiC1C;;OAEG;IACH,gBAFY,MAAM,CAIjB;IAED;;OAEG;IACH,eAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,sBAJW,MAAM,OAchB;IAED;;;;OAIG;IACH,oBAJW,MAAM,OAchB;IA4DD;;;;;;OAMG;IACH,oBAJW,MAAM,GAEL,MAAM,CAIjB;IAED;;;;;;;;;;OAUG;IACH,sBARW,MAAM,aACN,MAAM,QAahB;CACJ;AAED;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAqC;CAFpC"}
1
+ {"version":3,"file":"intProperties.d.ts","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":"AAsBA;IACI;;;;;;;;OAQG;IACH,wBAIC;IAGL,kBAAmC;CAFlC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAIC;IAGL,kBAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAIC;IAGL,kBAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;;;OASG;IACH,wBAKC;IAHG,qBAAsC;IAiC1C;;OAEG;IACH,gBAFY,MAAM,CAIjB;IAED;;OAEG;IACH,eAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,sBAJW,MAAM,GAEL,OAAO,CAYlB;IAED;;;;OAIG;IACH,oBAJW,MAAM,GAEL,OAAO,CAYlB;IA4DD;;;;;;OAMG;IACH,oBAJW,MAAM,GAEL,MAAM,CAIjB;IAED;;;;;;;;;;OAUG;IACH,sBARW,MAAM,aACN,MAAM,QAahB;CACJ;AAED;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAqC;CAFpC"}
@@ -134,7 +134,7 @@ class Integer64Property extends ValueProperty {
134
134
  /**
135
135
  * @param {number} in_high set the higher 32 bit integer part
136
136
  * @throws if in_high is not a number
137
- * @return {boolen} true if the value was actually changed
137
+ * @return {boolean} true if the value was actually changed
138
138
  */
139
139
  setValueHigh(in_high) {
140
140
  ConsoleUtils.assert(_.isNumber(in_high), MSG.IN_HIGH_MUST_BE_NUMBER + in_high);
@@ -149,7 +149,7 @@ class Integer64Property extends ValueProperty {
149
149
  /**
150
150
  * @param {number} in_low set the lower 32 bit integer part
151
151
  * @throws if in_low is not a number
152
- * @return {boolen} true if the value was actually changed
152
+ * @return {boolean} true if the value was actually changed
153
153
  */
154
154
  setValueLow(in_low) {
155
155
  ConsoleUtils.assert(_.isNumber(in_low), MSG.IN_LOW_MUST_BE_NUMBER + in_low);
@@ -1 +1 @@
1
- {"version":3,"file":"intProperties.js","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH,4BAA4B;AAC5B;;GAEG;;;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACxE,MAAM,EACF,YAAY,EACZ,SAAS,EAAE,EAAE,GAAG,EAAE,EAClB,MAAM,EACN,KAAK,GACR,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D,MAAM,KAAK,GAAG,UAAU,CAAC;AAEzB,MAAa,YAAa,SAAQ,aAAa;IAC3C;;;;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AG,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEjD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;QACtC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;IACxC,CAAC;CACJ;AArLD,8CAqLC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,iBAAiB;IAChD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACJ;AAZD,sCAYC;AACD,aAAa,CAAC,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1C,aAAa,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC;AAE3D;;GAEG;AACH,MAAa,cAAe,SAAQ,iBAAiB;IACjD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC7B,CAAC;CACJ;AAZD,wCAYC;AACD,cAAc,CAAC,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;AAC5C,cAAc,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/* eslint-disable new-cap */\n/**\n * @fileoverview Definition of the Int*Property classes\n */\n\nconst _ = require('lodash');\nconst { ChangeSet } = require('@fluid-experimental/property-changeset');\nconst {\n ConsoleUtils,\n constants: { MSG },\n Uint64,\n Int64,\n} = require('@fluid-experimental/property-common');\nconst { ValueProperty } = require('./valueProperty');\nconst { _castFunctors } = require('./primitiveTypeCasts');\n\nconst BIT32 = 4294967296;\n\nexport class Int8Property extends ValueProperty {\n /**\n * A primitive property for an signed 8 bit integer value.\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int8Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt8Property.prototype._typeid = 'Int8';\nInt8Property.prototype._castFunctor = _castFunctors.Int8;\n\n/**\n * A primitive property for an signed 16 bit integer value.\n */\nexport class Int16Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int16Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt16Property.prototype._typeid = 'Int16';\nInt16Property.prototype._castFunctor = _castFunctors.Int16;\n\n/**\n * A primitive property for an signed 32 bit integer value.\n */\nexport class Int32Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int32Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt32Property.prototype._typeid = 'Int32';\nInt32Property.prototype._castFunctor = _castFunctors.Int32;\n\n/**\n * A primitive property base class for big integer values.\n */\nexport class Integer64Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Integer64Property\n * @protected\n * @abstract\n * @category Value Properties\n */\n constructor(in_params, dataConstructor) {\n super(in_params);\n this.DataConstructor = dataConstructor;\n // default for this property type is '0, 0'\n this._data = new this.DataConstructor();\n }\n\n /**\n * Internal function to update the value of the Integer64Property\n *\n * @param {Int64|String|Number} in_value the new value\n * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout view\n * and trigger a modified event there. When batching updates, this\n * can be prevented via this flag.\n * @return {boolean} true if the value was actually changed\n * @throws if in_value is a string that contains characters other than numbers\n */\n _setValue(in_value, in_reportToView) {\n var oldLowValue = this._data.getValueLow();\n var oldHighValue = this._data.getValueHigh();\n\n in_value = this._castFunctor(in_value);\n\n var newHighValue = in_value.getValueHigh();\n var newLowValue = in_value.getValueLow();\n\n var changed = oldHighValue !== newHighValue || oldLowValue !== newLowValue;\n\n if (changed) {\n this._data = in_value.clone();\n this._setDirty(in_reportToView);\n }\n return changed;\n }\n\n /**\n * @return {number} the higher 32 bit integer part\n */\n getValueHigh() {\n return this._data.getValueHigh();\n }\n\n /**\n * @return {number} the lower 32 bit integer part\n */\n getValueLow() {\n return this._data.getValueLow();\n }\n\n /**\n * @param {number} in_high set the higher 32 bit integer part\n * @throws if in_high is not a number\n * @return {boolen} true if the value was actually changed\n */\n setValueHigh(in_high) {\n ConsoleUtils.assert(_.isNumber(in_high), MSG.IN_HIGH_MUST_BE_NUMBER + in_high);\n var changed = this._data.getValueHigh() !== in_high;\n\n if (changed) {\n var newData = new this.DataConstructor(this.getValueLow(), in_high);\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @param {number} in_low set the lower 32 bit integer part\n * @throws if in_low is not a number\n * @return {boolen} true if the value was actually changed\n */\n setValueLow(in_low) {\n ConsoleUtils.assert(_.isNumber(in_low), MSG.IN_LOW_MUST_BE_NUMBER + in_low);\n var changed = this._data.getValueLow() !== in_low;\n\n if (changed) {\n var newData = new this.DataConstructor(in_low, this.getValueHigh());\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @inheritdoc\n */\n _deserialize(in_serializedObj, in_reportToView,\n in_filteringOptions, in_createChangeSet) {\n if (ChangeSet.isEmptyChangeSet(in_serializedObj)) {\n return undefined;\n } else {\n ConsoleUtils.assert(_.isArray(in_serializedObj) && in_serializedObj.length === 2, MSG.INVALID_INT64_CHANGESET);\n var readValue = new this.DataConstructor(in_serializedObj[0], in_serializedObj[1]);\n var changed = this._setValue(readValue, in_reportToView);\n return changed ? this.serialize() : undefined;\n }\n }\n\n /**\n * @inheritdoc\n */\n _applyChangeset(in_changeSet, in_reportToView, in_filteringOptions) {\n if (!ChangeSet.isEmptyChangeSet(in_changeSet)) {\n if (!_.isArray(in_changeSet)) {\n in_changeSet = in_changeSet.value;\n }\n ConsoleUtils.assert(_.isArray(in_changeSet) && in_changeSet.length === 2, MSG.INVALID_INT64_CHANGESET);\n var newVal = new this.DataConstructor(in_changeSet[0], in_changeSet[1]);\n this._setValue(newVal, in_reportToView);\n }\n }\n\n /**\n * Serialize the property\n *\n * @param {boolean} in_dirtyOnly -\n * Only include dirty entries in the serialization\n * @param {boolean} in_includeRootTypeid -\n * Include the typeid of the root of the hierarchy - has no effect for value properties\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] -\n * The type of dirtiness to use when reporting dirty changes. By default this is\n * PENDING_CHANGE * @return {*} The serialized representation of this property\n * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n * function will descend into referenced repositories. WARNING: if there are loops in the references\n * this can result in an infinite loop\n * @return {*} The serialized representation of this property\n * @private\n */\n _serialize(in_dirtyOnly, in_includeRootTypeid,\n in_dirtinessType, in_includeReferencedRepositories) {\n if (in_dirtyOnly) {\n if (this._isDirty(in_dirtinessType)) {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n } else {\n return {};\n }\n } else {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n }\n }\n\n /**\n * The toString() method returns a string representing the specified Integer64 object.\n *\n * @param {number} [in_radix = 10] An integer between 2 and 36 specifying\n * the base to use for representing numeric values.\n * @return {string} A string representing the specified Integer64 object.\n */\n toString(in_radix) {\n return this._data.toString(in_radix);\n }\n\n /**\n * The Integer64.fromString() method parses a string argument updates object's lower and higher 32 bit integer parts.\n *\n * @param {string} in_string The value to parse. Leading whitespace in the string argument is ignored.\n * @param {number} [in_radix = 10] An integer between 2 and 36 that represents the\n * radix (the base in mathematical numeral systems) of the above mentioned string.\n * @throws if in_string is not a string\n * @throws if in_radix is entered but is not a number between 2 and 36\n * @throws if the property is a Uint64 property and in_string is a negative number\n * @throws if in_string contains characters other than numbers\n */\n fromString(in_string, in_radix) {\n ConsoleUtils.assert(_.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);\n var int = this._castFunctor(in_string, in_radix);\n\n this.setValueHigh(int.getValueHigh());\n this.setValueLow(int.getValueLow());\n }\n}\n\n/**\n * A primitive property class for big signed integer values.\n */\nexport class Int64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Int64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Int64);\n }\n}\nInt64Property.prototype._typeid = 'Int64';\nInt64Property.prototype._castFunctor = _castFunctors.Int64;\n\n/**\n * A primitive property class for big unsingned integer values.\n */\nexport class Uint64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Uint64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Uint64);\n }\n}\nUint64Property.prototype._typeid = 'Uint64';\nUint64Property.prototype._castFunctor = _castFunctors.Uint64;\n"]}
1
+ {"version":3,"file":"intProperties.js","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH,4BAA4B;AAC5B;;GAEG;;;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACxE,MAAM,EACF,YAAY,EACZ,SAAS,EAAE,EAAE,GAAG,EAAE,EAClB,MAAM,EACN,KAAK,GACR,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D,MAAM,KAAK,GAAG,UAAU,CAAC;AAEzB,MAAa,YAAa,SAAQ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ACrF,IAAI,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEjD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;QACtC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;IACxC,CAAC;CACJ;AArLD,8CAqLC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,iBAAiB;IAChD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACJ;AAZD,sCAYC;AACD,aAAa,CAAC,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1C,aAAa,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC;AAE3D;;GAEG;AACH,MAAa,cAAe,SAAQ,iBAAiB;IACjD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC7B,CAAC;CACJ;AAZD,wCAYC;AACD,cAAc,CAAC,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;AAC5C,cAAc,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/* eslint-disable new-cap */\n/**\n * @fileoverview Definition of the Int*Property classes\n */\n\nconst _ = require('lodash');\nconst { ChangeSet } = require('@fluid-experimental/property-changeset');\nconst {\n ConsoleUtils,\n constants: { MSG },\n Uint64,\n Int64,\n} = require('@fluid-experimental/property-common');\nconst { ValueProperty } = require('./valueProperty');\nconst { _castFunctors } = require('./primitiveTypeCasts');\n\nconst BIT32 = 4294967296;\n\nexport class Int8Property extends ValueProperty {\n /**\n * A primitive property for an signed 8 bit integer value.\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int8Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt8Property.prototype._typeid = 'Int8';\nInt8Property.prototype._castFunctor = _castFunctors.Int8;\n\n/**\n * A primitive property for an signed 16 bit integer value.\n */\nexport class Int16Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int16Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt16Property.prototype._typeid = 'Int16';\nInt16Property.prototype._castFunctor = _castFunctors.Int16;\n\n/**\n * A primitive property for an signed 32 bit integer value.\n */\nexport class Int32Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int32Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt32Property.prototype._typeid = 'Int32';\nInt32Property.prototype._castFunctor = _castFunctors.Int32;\n\n/**\n * A primitive property base class for big integer values.\n */\nexport class Integer64Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Integer64Property\n * @protected\n * @abstract\n * @category Value Properties\n */\n constructor(in_params, dataConstructor) {\n super(in_params);\n this.DataConstructor = dataConstructor;\n // default for this property type is '0, 0'\n this._data = new this.DataConstructor();\n }\n\n /**\n * Internal function to update the value of the Integer64Property\n *\n * @param {Int64|String|Number} in_value the new value\n * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout view\n * and trigger a modified event there. When batching updates, this\n * can be prevented via this flag.\n * @return {boolean} true if the value was actually changed\n * @throws if in_value is a string that contains characters other than numbers\n */\n _setValue(in_value, in_reportToView) {\n var oldLowValue = this._data.getValueLow();\n var oldHighValue = this._data.getValueHigh();\n\n in_value = this._castFunctor(in_value);\n\n var newHighValue = in_value.getValueHigh();\n var newLowValue = in_value.getValueLow();\n\n var changed = oldHighValue !== newHighValue || oldLowValue !== newLowValue;\n\n if (changed) {\n this._data = in_value.clone();\n this._setDirty(in_reportToView);\n }\n return changed;\n }\n\n /**\n * @return {number} the higher 32 bit integer part\n */\n getValueHigh() {\n return this._data.getValueHigh();\n }\n\n /**\n * @return {number} the lower 32 bit integer part\n */\n getValueLow() {\n return this._data.getValueLow();\n }\n\n /**\n * @param {number} in_high set the higher 32 bit integer part\n * @throws if in_high is not a number\n * @return {boolean} true if the value was actually changed\n */\n setValueHigh(in_high) {\n ConsoleUtils.assert(_.isNumber(in_high), MSG.IN_HIGH_MUST_BE_NUMBER + in_high);\n var changed = this._data.getValueHigh() !== in_high;\n\n if (changed) {\n var newData = new this.DataConstructor(this.getValueLow(), in_high);\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @param {number} in_low set the lower 32 bit integer part\n * @throws if in_low is not a number\n * @return {boolean} true if the value was actually changed\n */\n setValueLow(in_low) {\n ConsoleUtils.assert(_.isNumber(in_low), MSG.IN_LOW_MUST_BE_NUMBER + in_low);\n var changed = this._data.getValueLow() !== in_low;\n\n if (changed) {\n var newData = new this.DataConstructor(in_low, this.getValueHigh());\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @inheritdoc\n */\n _deserialize(in_serializedObj, in_reportToView,\n in_filteringOptions, in_createChangeSet) {\n if (ChangeSet.isEmptyChangeSet(in_serializedObj)) {\n return undefined;\n } else {\n ConsoleUtils.assert(_.isArray(in_serializedObj) && in_serializedObj.length === 2, MSG.INVALID_INT64_CHANGESET);\n var readValue = new this.DataConstructor(in_serializedObj[0], in_serializedObj[1]);\n var changed = this._setValue(readValue, in_reportToView);\n return changed ? this.serialize() : undefined;\n }\n }\n\n /**\n * @inheritdoc\n */\n _applyChangeset(in_changeSet, in_reportToView, in_filteringOptions) {\n if (!ChangeSet.isEmptyChangeSet(in_changeSet)) {\n if (!_.isArray(in_changeSet)) {\n in_changeSet = in_changeSet.value;\n }\n ConsoleUtils.assert(_.isArray(in_changeSet) && in_changeSet.length === 2, MSG.INVALID_INT64_CHANGESET);\n var newVal = new this.DataConstructor(in_changeSet[0], in_changeSet[1]);\n this._setValue(newVal, in_reportToView);\n }\n }\n\n /**\n * Serialize the property\n *\n * @param {boolean} in_dirtyOnly -\n * Only include dirty entries in the serialization\n * @param {boolean} in_includeRootTypeid -\n * Include the typeid of the root of the hierarchy - has no effect for value properties\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] -\n * The type of dirtiness to use when reporting dirty changes. By default this is\n * PENDING_CHANGE * @return {*} The serialized representation of this property\n * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n * function will descend into referenced repositories. WARNING: if there are loops in the references\n * this can result in an infinite loop\n * @return {*} The serialized representation of this property\n * @private\n */\n _serialize(in_dirtyOnly, in_includeRootTypeid,\n in_dirtinessType, in_includeReferencedRepositories) {\n if (in_dirtyOnly) {\n if (this._isDirty(in_dirtinessType)) {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n } else {\n return {};\n }\n } else {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n }\n }\n\n /**\n * The toString() method returns a string representing the specified Integer64 object.\n *\n * @param {number} [in_radix = 10] An integer between 2 and 36 specifying\n * the base to use for representing numeric values.\n * @return {string} A string representing the specified Integer64 object.\n */\n toString(in_radix) {\n return this._data.toString(in_radix);\n }\n\n /**\n * The Integer64.fromString() method parses a string argument updates object's lower and higher 32 bit integer parts.\n *\n * @param {string} in_string The value to parse. Leading whitespace in the string argument is ignored.\n * @param {number} [in_radix = 10] An integer between 2 and 36 that represents the\n * radix (the base in mathematical numeral systems) of the above mentioned string.\n * @throws if in_string is not a string\n * @throws if in_radix is entered but is not a number between 2 and 36\n * @throws if the property is a Uint64 property and in_string is a negative number\n * @throws if in_string contains characters other than numbers\n */\n fromString(in_string, in_radix) {\n ConsoleUtils.assert(_.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);\n var int = this._castFunctor(in_string, in_radix);\n\n this.setValueHigh(int.getValueHigh());\n this.setValueLow(int.getValueLow());\n }\n}\n\n/**\n * A primitive property class for big signed integer values.\n */\nexport class Int64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Int64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Int64);\n }\n}\nInt64Property.prototype._typeid = 'Int64';\nInt64Property.prototype._castFunctor = _castFunctors.Int64;\n\n/**\n * A primitive property class for big unsingned integer values.\n */\nexport class Uint64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Uint64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Uint64);\n }\n}\nUint64Property.prototype._typeid = 'Uint64';\nUint64Property.prototype._castFunctor = _castFunctors.Uint64;\n"]}
@@ -7,7 +7,7 @@ export class PropertyUtils {
7
7
  * Gather all properties that pass an arbitrary predicate function
8
8
  * @param {property-properties.NodeProperty} in_rootProperty The root property to traverse from
9
9
  * @param {function} in_predicate The predicate function
10
- * @return {Array.<property-properties.BasePropertyy>} The list of properties that passed the predicate
10
+ * @return {Array.<property-properties.BaseProperty>} The list of properties that passed the predicate
11
11
  * function
12
12
  */
13
13
  static gatherProperties: (in_rootProperty: any, in_predicate: Function) => Array<any>;
@@ -12,7 +12,7 @@ exports.PropertyUtils = PropertyUtils;
12
12
  * Gather all properties that pass an arbitrary predicate function
13
13
  * @param {property-properties.NodeProperty} in_rootProperty The root property to traverse from
14
14
  * @param {function} in_predicate The predicate function
15
- * @return {Array.<property-properties.BasePropertyy>} The list of properties that passed the predicate
15
+ * @return {Array.<property-properties.BaseProperty>} The list of properties that passed the predicate
16
16
  * function
17
17
  */
18
18
  PropertyUtils.gatherProperties = function (in_rootProperty, in_predicate) {
@@ -1 +1 @@
1
- {"version":3,"file":"propertyUtils.js","sourceRoot":"","sources":["../src/propertyUtils.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,MAAa,aAAa;;AAA1B,sCAkBC;AAjBG;;;;;;GAMG;AACI,8BAAgB,GAAG,UAAS,eAAe,EAAE,YAAY;IAC5D,IAAI,kBAAkB,GAAG,EAAE,CAAC;IAC5B,eAAe,CAAC,YAAY,CAAC,UAAS,QAAQ,EAAE,IAAI;QAChD,IAAI,YAAY,CAAC,QAAQ,CAAC,EAAE;YACxB,kBAAkB,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;SACvC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,kBAAkB,CAAC;AAC9B,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport class PropertyUtils {\n /**\n * Gather all properties that pass an arbitrary predicate function\n * @param {property-properties.NodeProperty} in_rootProperty The root property to traverse from\n * @param {function} in_predicate The predicate function\n * @return {Array.<property-properties.BasePropertyy>} The list of properties that passed the predicate\n * function\n */\n static gatherProperties = function(in_rootProperty, in_predicate) {\n var gatheredProperties = {};\n in_rootProperty.traverseDown(function(property, path) {\n if (in_predicate(property)) {\n gatheredProperties[path] = property;\n }\n });\n\n return gatheredProperties;\n };\n}\n"]}
1
+ {"version":3,"file":"propertyUtils.js","sourceRoot":"","sources":["../src/propertyUtils.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,MAAa,aAAa;;AAA1B,sCAkBC;AAjBG;;;;;;GAMG;AACI,8BAAgB,GAAG,UAAS,eAAe,EAAE,YAAY;IAC5D,IAAI,kBAAkB,GAAG,EAAE,CAAC;IAC5B,eAAe,CAAC,YAAY,CAAC,UAAS,QAAQ,EAAE,IAAI;QAChD,IAAI,YAAY,CAAC,QAAQ,CAAC,EAAE;YACxB,kBAAkB,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;SACvC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,kBAAkB,CAAC;AAC9B,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport class PropertyUtils {\n /**\n * Gather all properties that pass an arbitrary predicate function\n * @param {property-properties.NodeProperty} in_rootProperty The root property to traverse from\n * @param {function} in_predicate The predicate function\n * @return {Array.<property-properties.BaseProperty>} The list of properties that passed the predicate\n * function\n */\n static gatherProperties = function(in_rootProperty, in_predicate) {\n var gatheredProperties = {};\n in_rootProperty.traverseDown(function(property, path) {\n if (in_predicate(property)) {\n gatheredProperties[path] = property;\n }\n });\n\n return gatheredProperties;\n };\n}\n"]}
@@ -252,8 +252,8 @@
252
252
  "affectsGlobalScope": false
253
253
  },
254
254
  "../propertyUtils.d.ts": {
255
- "version": "afa658932375801ec8173774005468d6fe6c86868c71f1cd470069461e017df4",
256
- "signature": "afa658932375801ec8173774005468d6fe6c86868c71f1cd470069461e017df4",
255
+ "version": "ae7dfca81d6e1eb59c962095e394510c05c6a83197bc5b343a743b07bf906a73",
256
+ "signature": "ae7dfca81d6e1eb59c962095e394510c05c6a83197bc5b343a743b07bf906a73",
257
257
  "affectsGlobalScope": false
258
258
  },
259
259
  "../../../property-changeset/dist/changeset_operations/operationTypes.d.ts": {
@@ -332,8 +332,8 @@
332
332
  "affectsGlobalScope": false
333
333
  },
334
334
  "../properties/abstractStaticCollectionProperty.d.ts": {
335
- "version": "3ea6bc88fe7e50577a6c0b14ecbdcfb2ae62d3ca4b2d050f4368567e399ee5ba",
336
- "signature": "3ea6bc88fe7e50577a6c0b14ecbdcfb2ae62d3ca4b2d050f4368567e399ee5ba",
335
+ "version": "6197a814b92afa2d997aecece77d686289abaebe5c02a5832f302b1bcc50cf96",
336
+ "signature": "6197a814b92afa2d997aecece77d686289abaebe5c02a5832f302b1bcc50cf96",
337
337
  "affectsGlobalScope": false
338
338
  },
339
339
  "../properties/indexedCollectionBaseProperty.d.ts": {
@@ -407,8 +407,8 @@
407
407
  "affectsGlobalScope": false
408
408
  },
409
409
  "../properties/intProperties.d.ts": {
410
- "version": "6e2e852c61429d252677b22a9206b0fe5d0b3f046627c5ff5e54eada7f3e4d53",
411
- "signature": "6e2e852c61429d252677b22a9206b0fe5d0b3f046627c5ff5e54eada7f3e4d53",
410
+ "version": "dba2a232a4687c67a06515988d0a38b7d58ed03a33de858cef1c1d814864a444",
411
+ "signature": "dba2a232a4687c67a06515988d0a38b7d58ed03a33de858cef1c1d814864a444",
412
412
  "affectsGlobalScope": false
413
413
  },
414
414
  "../properties/enumProperty.d.ts": {
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Serialize the input document.
3
+ * @param {Array<BaseProperty>} in_psets property set
4
+ * @param {bool} in_dirtyOnly serialize dirty properties only
5
+ * @return {{}} JSON data of the document
6
+ * @alias property-properties.serialize
7
+ */
8
+ export function serialize(in_psets: Array<any>, in_dirtyOnly: any): {};
9
+ /**
10
+ * Deserialize the input document
11
+ * @param {{}} in_data the input JSON document data
12
+ * @param {string|undefined} in_scope The scope to construct the properties from
13
+ * @param {property-properties.BaseProperty.PathFilteringOptions} [in_filteringOptions]
14
+ * The options to selectively create only a subset of a property. Creates all properties if undefined.
15
+ * @return {{}} an object of guid : pset
16
+ * @alias property-properties.deserialize
17
+ */
18
+ export function deserialize(in_data: {}, in_scope: string | undefined, in_filteringOptions: any): {};
19
+ /**
20
+ * Deserialize the input document assuming it contains elements of a non-primitive array.
21
+ * @param {array<object>} in_data the input JSON document data
22
+ * @param {string|undefined} in_scope The scope to construct the properties from
23
+ * @return {array<BaseProperty>} an array of psets
24
+ * @alias property-properties.deserializeNonPrimitiveArrayElements
25
+ */
26
+ export function deserializeNonPrimitiveArrayElements(in_data: any, in_scope: string | undefined): any;
27
+ //# sourceMappingURL=containerSerializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"containerSerializer.d.ts","sourceRoot":"","sources":["../src/containerSerializer.js"],"names":[],"mappings":"AAwDA;;;;;;GAMG;AACH,oCALW,UAAmB,sBAElB,EAAE,CAmBb;AAED;;;;;;;;GAQG;AACH,qCAPW,EAAE,YACF,MAAM,GAAC,SAAS,6BAGf,EAAE,CAsEb;AACD;;;;;;GAMG;AACH,6EAJW,MAAM,GAAC,SAAS,OAiC1B"}
@@ -0,0 +1,15 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ export declare let validationsEnabled: {
6
+ enabled: boolean;
7
+ };
8
+ /**
9
+ * Switch off validation to increase performance (but you risk modifying read only properties, creating cycles in
10
+ * the tree, etc...)
11
+ *
12
+ * @param enabled - Are the validations enabled?
13
+ */
14
+ export declare function enableValidations(enabled: boolean): void;
15
+ //# sourceMappingURL=enableValidations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enableValidations.d.ts","sourceRoot":"","sources":["../src/enableValidations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,IAAI,kBAAkB;;CAE5B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,QAEjD"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,25 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { PropertyFactory } from './propertyFactory';
6
+ import { PropertyUtils } from './propertyUtils';
7
+ import { BaseProperty } from './properties/baseProperty';
8
+ import { ContainerProperty } from './properties/containerProperty';
9
+ import { MapProperty } from './properties/mapProperty';
10
+ import { NodeProperty } from './properties/nodeProperty';
11
+ import { ArrayProperty } from './properties/arrayProperty';
12
+ import { SetProperty } from './properties/setProperty';
13
+ import { StringProperty } from './properties/stringProperty';
14
+ import { ReferenceProperty } from './properties/referenceProperty';
15
+ import { ReferenceArrayProperty } from './properties/referenceArrayProperty';
16
+ import { ReferenceMapProperty } from './properties/referenceMapProperty';
17
+ import { EnumArrayProperty } from './properties/enumArrayProperty';
18
+ import { EnumProperty } from './properties/enumProperty';
19
+ import { Int64Property, Uint64Property } from './properties/intProperties';
20
+ import { ValueArrayProperty } from './properties/valueArrayProperty';
21
+ import { ValueMapProperty } from './properties/valueMapProperty';
22
+ import { ValueProperty } from './properties/valueProperty';
23
+ import { enableValidations } from './enableValidations';
24
+ export { PropertyFactory, PropertyUtils, BaseProperty, ContainerProperty, MapProperty, NodeProperty, ArrayProperty, SetProperty, StringProperty, ReferenceProperty, ReferenceMapProperty, ReferenceArrayProperty, Uint64Property, EnumArrayProperty, EnumProperty, Int64Property, ValueArrayProperty, ValueMapProperty, ValueProperty, enableValidations, };
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE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