@fluid-experimental/property-properties 0.55.2 → 0.56.2

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 (120) hide show
  1. package/dist/properties/arrayProperty.d.ts.map +1 -1
  2. package/dist/properties/arrayProperty.js +4 -4
  3. package/dist/properties/arrayProperty.js.map +1 -1
  4. package/dist/properties/baseProperty.d.ts +1 -1
  5. package/dist/properties/baseProperty.d.ts.map +1 -1
  6. package/dist/properties/baseProperty.js +13 -12
  7. package/dist/properties/baseProperty.js.map +1 -1
  8. package/dist/properties/boolProperty.d.ts.map +1 -1
  9. package/dist/properties/boolProperty.js +3 -2
  10. package/dist/properties/boolProperty.js.map +1 -1
  11. package/dist/properties/containerProperty.d.ts +1 -1
  12. package/dist/properties/containerProperty.d.ts.map +1 -1
  13. package/dist/properties/containerProperty.js +12 -3
  14. package/dist/properties/containerProperty.js.map +1 -1
  15. package/dist/properties/enumArrayProperty.js +2 -1
  16. package/dist/properties/enumArrayProperty.js.map +1 -1
  17. package/dist/properties/enumProperty.d.ts.map +1 -1
  18. package/dist/properties/enumProperty.js +2 -1
  19. package/dist/properties/enumProperty.js.map +1 -1
  20. package/dist/properties/floatProperties.d.ts.map +1 -1
  21. package/dist/properties/floatProperties.js +6 -4
  22. package/dist/properties/floatProperties.js.map +1 -1
  23. package/dist/properties/indexedCollectionBaseProperty.d.ts +2 -2
  24. package/dist/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
  25. package/dist/properties/indexedCollectionBaseProperty.js +2 -2
  26. package/dist/properties/indexedCollectionBaseProperty.js.map +1 -1
  27. package/dist/properties/intProperties.d.ts.map +1 -1
  28. package/dist/properties/intProperties.js +15 -10
  29. package/dist/properties/intProperties.js.map +1 -1
  30. package/dist/properties/mapProperty.d.ts.map +1 -1
  31. package/dist/properties/mapProperty.js +2 -1
  32. package/dist/properties/mapProperty.js.map +1 -1
  33. package/dist/properties/namedNodeProperty.js +2 -1
  34. package/dist/properties/namedNodeProperty.js.map +1 -1
  35. package/dist/properties/namedProperty.js +2 -1
  36. package/dist/properties/namedProperty.js.map +1 -1
  37. package/dist/properties/nodeProperty.d.ts.map +1 -1
  38. package/dist/properties/nodeProperty.js +3 -1
  39. package/dist/properties/nodeProperty.js.map +1 -1
  40. package/dist/properties/referenceArrayProperty.js +2 -1
  41. package/dist/properties/referenceArrayProperty.js.map +1 -1
  42. package/dist/properties/referenceMapProperty.js +2 -1
  43. package/dist/properties/referenceMapProperty.js.map +1 -1
  44. package/dist/properties/referenceProperty.d.ts +1 -1
  45. package/dist/properties/referenceProperty.d.ts.map +1 -1
  46. package/dist/properties/referenceProperty.js +3 -2
  47. package/dist/properties/referenceProperty.js.map +1 -1
  48. package/dist/properties/setProperty.d.ts.map +1 -1
  49. package/dist/properties/setProperty.js +3 -2
  50. package/dist/properties/setProperty.js.map +1 -1
  51. package/dist/properties/stringProperty.d.ts.map +1 -1
  52. package/dist/properties/stringProperty.js +12 -3
  53. package/dist/properties/stringProperty.js.map +1 -1
  54. package/dist/properties/uintProperties.d.ts.map +1 -1
  55. package/dist/properties/uintProperties.js +9 -6
  56. package/dist/properties/uintProperties.js.map +1 -1
  57. package/dist/properties/valueArrayProperty.d.ts +1 -1
  58. package/dist/properties/valueArrayProperty.d.ts.map +1 -1
  59. package/dist/properties/valueArrayProperty.js +25 -13
  60. package/dist/properties/valueArrayProperty.js.map +1 -1
  61. package/dist/properties/valueMapProperty.d.ts.map +1 -1
  62. package/dist/properties/valueMapProperty.js +38 -26
  63. package/dist/properties/valueMapProperty.js.map +1 -1
  64. package/dist/propertyFactory.d.ts.map +1 -1
  65. package/dist/propertyFactory.js +442 -86
  66. package/dist/propertyFactory.js.map +1 -1
  67. package/dist/propertyTemplateWrapper.d.ts +0 -34
  68. package/dist/propertyTemplateWrapper.d.ts.map +1 -1
  69. package/dist/propertyTemplateWrapper.js +0 -108
  70. package/dist/propertyTemplateWrapper.js.map +1 -1
  71. package/dist/test/propertyFactory.spec.js +5 -2
  72. package/dist/test/propertyFactory.spec.js.map +1 -1
  73. package/dist/test/tsconfig.tsbuildinfo +11 -11
  74. package/lib/properties/arrayProperty.js +4 -4
  75. package/lib/properties/arrayProperty.js.map +1 -1
  76. package/lib/properties/baseProperty.js +13 -12
  77. package/lib/properties/baseProperty.js.map +1 -1
  78. package/lib/properties/boolProperty.js +3 -2
  79. package/lib/properties/boolProperty.js.map +1 -1
  80. package/lib/properties/containerProperty.js +12 -3
  81. package/lib/properties/containerProperty.js.map +1 -1
  82. package/lib/properties/enumArrayProperty.js +2 -1
  83. package/lib/properties/enumArrayProperty.js.map +1 -1
  84. package/lib/properties/enumProperty.js +2 -1
  85. package/lib/properties/enumProperty.js.map +1 -1
  86. package/lib/properties/floatProperties.js +6 -4
  87. package/lib/properties/floatProperties.js.map +1 -1
  88. package/lib/properties/indexedCollectionBaseProperty.js +2 -2
  89. package/lib/properties/indexedCollectionBaseProperty.js.map +1 -1
  90. package/lib/properties/intProperties.js +15 -10
  91. package/lib/properties/intProperties.js.map +1 -1
  92. package/lib/properties/mapProperty.js +2 -1
  93. package/lib/properties/mapProperty.js.map +1 -1
  94. package/lib/properties/namedNodeProperty.js +2 -1
  95. package/lib/properties/namedNodeProperty.js.map +1 -1
  96. package/lib/properties/namedProperty.js +2 -1
  97. package/lib/properties/namedProperty.js.map +1 -1
  98. package/lib/properties/nodeProperty.js +3 -1
  99. package/lib/properties/nodeProperty.js.map +1 -1
  100. package/lib/properties/referenceArrayProperty.js +2 -1
  101. package/lib/properties/referenceArrayProperty.js.map +1 -1
  102. package/lib/properties/referenceMapProperty.js +2 -1
  103. package/lib/properties/referenceMapProperty.js.map +1 -1
  104. package/lib/properties/referenceProperty.js +3 -2
  105. package/lib/properties/referenceProperty.js.map +1 -1
  106. package/lib/properties/setProperty.js +3 -2
  107. package/lib/properties/setProperty.js.map +1 -1
  108. package/lib/properties/stringProperty.js +12 -3
  109. package/lib/properties/stringProperty.js.map +1 -1
  110. package/lib/properties/uintProperties.js +9 -6
  111. package/lib/properties/uintProperties.js.map +1 -1
  112. package/lib/properties/valueArrayProperty.js +25 -13
  113. package/lib/properties/valueArrayProperty.js.map +1 -1
  114. package/lib/properties/valueMapProperty.js +38 -26
  115. package/lib/properties/valueMapProperty.js.map +1 -1
  116. package/lib/propertyFactory.js +442 -86
  117. package/lib/propertyFactory.js.map +1 -1
  118. package/lib/propertyTemplateWrapper.js +0 -108
  119. package/lib/propertyTemplateWrapper.js.map +1 -1
  120. package/package.json +4 -4
@@ -29,7 +29,7 @@ class EnumArrayProperty extends ValueArrayProperty {
29
29
  * @category Arrays
30
30
  */
31
31
  constructor(in_params) {
32
- super(Object.assign({ typeid: 'Enum' }, in_params));
32
+ super(in_params);
33
33
  // whenever an EnumProperty is created by the PropertyFactory, we get a
34
34
  // dictonary [value->enum] and [enum->value] to efficiently lookup
35
35
  // values/enums for the property.
@@ -218,4 +218,5 @@ class EnumArrayProperty extends ValueArrayProperty {
218
218
  ;
219
219
  }
220
220
  exports.EnumArrayProperty = EnumArrayProperty;
221
+ EnumArrayProperty.prototype._typeid = 'Enum';
221
222
  //# sourceMappingURL=enumArrayProperty.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"enumArrayProperty.js","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC/D,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AAC3E,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AAEzE;;;;;;GAMG;AACH,MAAa,iBAAkB,SAAQ,kBAAkB;IAC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IACH,aAAa,CAAC,iBAAiB,GAAG,KAAK;QACnC,IAAI,iBAAiB,EAAE;YACnB,OAAO,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;SACzE;aAAM;YACH,OAAO,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;SAC9E;IACL,CAAC;IAAA,CAAC;IAEF;;OAEG;IACH,SAAS;QACL,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAChD,IAAI,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACtB;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAAA,CAAC;IAEF;;;OAGG;IACH,gBAAgB,CAAC,SAAS;QACtB,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAClE,CAAC;IAAA,CAAC;IAEF;;;OAGG;IACH,gBAAgB;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAChD,CAAC;IAAA,CAAC;CAEL;AAtMD,8CAsMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst _ = require('lodash');\nconst { ValueArrayProperty } = require('./valueArrayProperty');\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { TypeIdHelper } = require('@fluid-experimental/property-changeset');\nconst { BaseDataArray } = require('@fluid-experimental/property-common');\n\n/**\n * This class is a specialized version of the ArrayProperty for enums.\n * Since we internally represent enums as Int32Array this is much more\n * efficient and convenient. Additionally, we provide direct access\n * methods to the enums in the array, e.g. .getEnumString(3) directly\n * returns the enum string at position 3 of the array\n */\nexport class EnumArrayProperty extends ValueArrayProperty {\n /**\n * @param {Object} in_params - the parameters\n * @param {Number=} [in_params.length=0] the length of the array, if applicable\n * @param {Object} in_params._enumDictionary the value<->enum dictonary needed to convert the values\n * @constructor\n * @protected\n * @extends property-properties.ValueArrayProperty\n * @alias property-properties.EnumArrayProperty\n * @category Arrays\n */\n constructor(in_params) {\n super({ typeid: 'Enum', ...in_params });\n // whenever an EnumProperty is created by the PropertyFactory, we get a\n // dictonary [value->enum] and [enum->value] to efficiently lookup\n // values/enums for the property.\n this._enumDictionary = in_params._enumDictionary;\n };\n\n /**\n * Since an enum can be identified by its value and its enum string,\n * we have to check/convert the type here. We also check if a value\n * is suitable for this enum type.\n * @param {number|string} in_value value to be checked/converted\n * @return {number} internal value for this enum type\n */\n _convertEnumToInternalValue(in_value) {\n // check if we've got a string\n if (_.isString(in_value)) {\n var internalEnum = this._enumDictionary.enumEntriesById[in_value];\n if (!internalEnum) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n }\n return internalEnum.value;\n } else {\n if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n } else {\n return in_value;\n }\n }\n };\n\n /**\n * inserts the content of a given array into the array property\n * @param {number} in_offset target index\n * @param {Array<*>} in_array the array to be inserted\n * @throws if in_array is not an array\n * @throws if in_position is not a number\n * @throws if a value to be inserted is an instance of BaseProperty\n * @throws if tyring to modify a referenced property.\n */\n insertRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.insertRange or .insert');\n }\n if (!_.isArray(in_array)) {\n throw new Error(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.insertRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function (element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.insertRange.call(this, in_offset, internalValueArray);\n };\n\n /**\n * Sets the content of an enum in an enum array\n * @param {number} in_index target index\n * @param {*} in_value the value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n set(in_index, in_value) {\n if (!_.isNumber(in_value) && !_.isString(in_value)) {\n throw new Error(MSG.VALUE_STRING_OR_NUMBER + in_value);\n }\n this.setRange(in_index, [in_value]);\n };\n\n /**\n * Sets the content of an enum in an enum array. Alternative syntax to .set()\n * @param {number} in_index target index\n * @param {*} in_value the value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n setEnumByString(in_index, in_value) {\n this.set(in_index, in_value);\n };\n\n /**\n * sets the array properties elements to the content of the given array\n * all changed elements must already exist\n * @param {number} in_offset target start index\n * @param {Array<*>} in_array contains the elements to be set\n * @throws if in_offset is not a number\n * @throws if in_array is not an array\n *\n */\n setRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.setRange or .set');\n }\n if (!_.isArray(in_array)) {\n throw new Error(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.setRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function (element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.setRange.call(this, in_offset, internalValueArray);\n };\n\n /**\n * get the array element at a given index\n * @param {number} in_position the target index\n * @throws if no entry exists at in_position\n * @return {string} the enum string at that index\n */\n getEnumString(in_position) {\n var internalValue = this._dataArrayRef.getValue(in_position);\n var resultEntry = this._enumDictionary.enumEntriesByValue[internalValue];\n if (!resultEntry) {\n throw new Error(MSG.UNKNOWN_ENUM + internalValue);\n } else {\n return resultEntry.id;\n }\n };\n\n /**\n * get an array of the enum strings starting at a given index\n * @param {number} in_offset the start index\n * @param {number} in_length how many should be read\n * @throws if in_offset or in_length are not numbers\n * @throws if no entry exists at one of the positions\n * @return {Array<string>} the enum strings we asked for\n */\n getEnumStrings(in_offset, in_length) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.getEnumStrings');\n }\n if (!_.isNumber(in_length)) {\n throw new Error(MSG.NOT_NUMBER + 'in_length, method: EnumArray.getEnumStrings');\n }\n\n var result = [];\n for (var i = 0; i < in_length; i++) {\n result.push(this.getEnumString(i + in_offset));\n }\n return result;\n };\n\n /**\n * Returns the full property type identifier for the ChangeSet including the enum type id\n * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted\n * @return {string} The typeid\n */\n getFullTypeid(in_hideCollection = false) {\n if (in_hideCollection) {\n return TypeIdHelper.createSerializationTypeId(this._typeid, '', true);\n } else {\n return TypeIdHelper.createSerializationTypeId(this._typeid, 'array', true);\n }\n };\n\n /**\n * @inheritdoc\n */\n getValues() {\n var result = [];\n for (var i = 0; i < this._dataArrayRef.length; i++) {\n var child = this._dataArrayRef.getValue(i);\n result.push(child);\n }\n return result;\n };\n\n /**\n * Creates and initializes the data array\n * @param {Number} in_length the initial length of the array\n */\n _dataArrayCreate(in_length) {\n this._dataArrayRef = new BaseDataArray(Int32Array, in_length);\n };\n\n /**\n * let the user to query all valid entries of an enum array property\n * @return {{}} all valid (string) entries and their (int) values\n */\n getValidEnumList() {\n return this._enumDictionary.enumEntriesById;\n };\n\n}\n"]}
1
+ {"version":3,"file":"enumArrayProperty.js","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC/D,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,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AAC,aAAa,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;SAClD;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAAA,CAAC;IAEF;;;;OAIG;IACH,aAAa,CAAC,iBAAiB,GAAG,KAAK;QACnC,IAAI,iBAAiB,EAAE;YACnB,OAAO,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;SACzE;aAAM;YACH,OAAO,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;SAC9E;IACL,CAAC;IAAA,CAAC;IAEF;;OAEG;IACH,SAAS;QACL,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAChD,IAAI,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACtB;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAAA,CAAC;IAEF;;;OAGG;IACH,gBAAgB,CAAC,SAAS;QACtB,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAClE,CAAC;IAAA,CAAC;IAEF;;;OAGG;IACH,gBAAgB;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAChD,CAAC;IAAA,CAAC;CAEL;AAtMD,8CAsMC;AACD,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst _ = require('lodash');\nconst { ValueArrayProperty } = require('./valueArrayProperty');\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { TypeIdHelper } = require('@fluid-experimental/property-changeset');\nconst { BaseDataArray } = require('@fluid-experimental/property-common');\n\n/**\n * This class is a specialized version of the ArrayProperty for enums.\n * Since we internally represent enums as Int32Array this is much more\n * efficient and convenient. Additionally, we provide direct access\n * methods to the enums in the array, e.g. .getEnumString(3) directly\n * returns the enum string at position 3 of the array\n */\nexport class EnumArrayProperty extends ValueArrayProperty {\n /**\n * @param {Object} in_params - the parameters\n * @param {Number=} [in_params.length=0] the length of the array, if applicable\n * @param {Object} in_params._enumDictionary the value<->enum dictonary needed to convert the values\n * @constructor\n * @protected\n * @extends property-properties.ValueArrayProperty\n * @alias property-properties.EnumArrayProperty\n * @category Arrays\n */\n constructor(in_params) {\n super(in_params);\n // whenever an EnumProperty is created by the PropertyFactory, we get a\n // dictonary [value->enum] and [enum->value] to efficiently lookup\n // values/enums for the property.\n this._enumDictionary = in_params._enumDictionary;\n };\n\n /**\n * Since an enum can be identified by its value and its enum string,\n * we have to check/convert the type here. We also check if a value\n * is suitable for this enum type.\n * @param {number|string} in_value value to be checked/converted\n * @return {number} internal value for this enum type\n */\n _convertEnumToInternalValue(in_value) {\n // check if we've got a string\n if (_.isString(in_value)) {\n var internalEnum = this._enumDictionary.enumEntriesById[in_value];\n if (!internalEnum) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n }\n return internalEnum.value;\n } else {\n if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n } else {\n return in_value;\n }\n }\n };\n\n /**\n * inserts the content of a given array into the array property\n * @param {number} in_offset target index\n * @param {Array<*>} in_array the array to be inserted\n * @throws if in_array is not an array\n * @throws if in_position is not a number\n * @throws if a value to be inserted is an instance of BaseProperty\n * @throws if tyring to modify a referenced property.\n */\n insertRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.insertRange or .insert');\n }\n if (!_.isArray(in_array)) {\n throw new Error(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.insertRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function (element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.insertRange.call(this, in_offset, internalValueArray);\n };\n\n /**\n * Sets the content of an enum in an enum array\n * @param {number} in_index target index\n * @param {*} in_value the value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n set(in_index, in_value) {\n if (!_.isNumber(in_value) && !_.isString(in_value)) {\n throw new Error(MSG.VALUE_STRING_OR_NUMBER + in_value);\n }\n this.setRange(in_index, [in_value]);\n };\n\n /**\n * Sets the content of an enum in an enum array. Alternative syntax to .set()\n * @param {number} in_index target index\n * @param {*} in_value the value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n setEnumByString(in_index, in_value) {\n this.set(in_index, in_value);\n };\n\n /**\n * sets the array properties elements to the content of the given array\n * all changed elements must already exist\n * @param {number} in_offset target start index\n * @param {Array<*>} in_array contains the elements to be set\n * @throws if in_offset is not a number\n * @throws if in_array is not an array\n *\n */\n setRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.setRange or .set');\n }\n if (!_.isArray(in_array)) {\n throw new Error(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.setRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function (element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.setRange.call(this, in_offset, internalValueArray);\n };\n\n /**\n * get the array element at a given index\n * @param {number} in_position the target index\n * @throws if no entry exists at in_position\n * @return {string} the enum string at that index\n */\n getEnumString(in_position) {\n var internalValue = this._dataArrayRef.getValue(in_position);\n var resultEntry = this._enumDictionary.enumEntriesByValue[internalValue];\n if (!resultEntry) {\n throw new Error(MSG.UNKNOWN_ENUM + internalValue);\n } else {\n return resultEntry.id;\n }\n };\n\n /**\n * get an array of the enum strings starting at a given index\n * @param {number} in_offset the start index\n * @param {number} in_length how many should be read\n * @throws if in_offset or in_length are not numbers\n * @throws if no entry exists at one of the positions\n * @return {Array<string>} the enum strings we asked for\n */\n getEnumStrings(in_offset, in_length) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.getEnumStrings');\n }\n if (!_.isNumber(in_length)) {\n throw new Error(MSG.NOT_NUMBER + 'in_length, method: EnumArray.getEnumStrings');\n }\n\n var result = [];\n for (var i = 0; i < in_length; i++) {\n result.push(this.getEnumString(i + in_offset));\n }\n return result;\n };\n\n /**\n * Returns the full property type identifier for the ChangeSet including the enum type id\n * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted\n * @return {string} The typeid\n */\n getFullTypeid(in_hideCollection = false) {\n if (in_hideCollection) {\n return TypeIdHelper.createSerializationTypeId(this._typeid, '', true);\n } else {\n return TypeIdHelper.createSerializationTypeId(this._typeid, 'array', true);\n }\n };\n\n /**\n * @inheritdoc\n */\n getValues() {\n var result = [];\n for (var i = 0; i < this._dataArrayRef.length; i++) {\n var child = this._dataArrayRef.getValue(i);\n result.push(child);\n }\n return result;\n };\n\n /**\n * Creates and initializes the data array\n * @param {Number} in_length the initial length of the array\n */\n _dataArrayCreate(in_length) {\n this._dataArrayRef = new BaseDataArray(Int32Array, in_length);\n };\n\n /**\n * let the user to query all valid entries of an enum array property\n * @return {{}} all valid (string) entries and their (int) values\n */\n getValidEnumList() {\n return this._enumDictionary.enumEntriesById;\n };\n\n}\nEnumArrayProperty.prototype._typeid = 'Enum';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"enumProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":"AAgBA;;GAEG;AACH;IAEI;;;;;;;MAOE;IACF,wBAQC;IAHG,qBAAgD;IAepD;;;;OAIG;IACH,iBAHY,MAAM,CAUjB;IAwBD;;;;;;OAMG;IACH,6BAJW,MAAM,QAahB;IAYD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CACJ"}
1
+ {"version":3,"file":"enumProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":"AAgBA;;GAEG;AACH;IAEI;;;;;;;MAOE;IACF,wBAQC;IAHG,qBAAgD;IAapD;;;;OAIG;IACH,iBAHY,MAAM,CAUjB;IAwBD;;;;;;OAMG;IACH,6BAJW,MAAM,QAahB;IAYD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CACJ"}
@@ -29,7 +29,6 @@ class EnumProperty extends Int32Property {
29
29
  */
30
30
  constructor(in_params) {
31
31
  super(Object.assign({ typeid: 'Enum' }, in_params));
32
- this._castFunctor = _castFunctors.Int32;
33
32
  // whenever an EnumProperty is created by the PropertyFactory, we get a
34
33
  // dictionary [value->enum] and [enum->value] to efficiently lookup
35
34
  // values/enums for the property.
@@ -123,4 +122,6 @@ class EnumProperty extends Int32Property {
123
122
  ;
124
123
  }
125
124
  exports.EnumProperty = EnumProperty;
125
+ EnumProperty.prototype._typeid = 'Enum';
126
+ EnumProperty.prototype._castFunctor = _castFunctors.Int32;
126
127
  //# sourceMappingURL=enumProperty.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"enumProperty.js","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC1D,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO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aAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE;YAC3D,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC,CAAC;SAChD;aAAM;YACH,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;SACzD;IACL,CAAC;IAAA,CAAC;IAEF;;;;;;OAMG;IACH,eAAe,CAAC,WAAW;QACvB,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,GAAG,CAAC,wBAAwB,GAAG,WAAW,CAAC,CAAC;QACzF,IAAI,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QACrE,IAAI,CAAC,YAAY,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,YAAY,GAAG,WAAW,CAAC,CAAC;SACnD;aAAM;YACH,IAAI,aAAa,GAAG,YAAY,CAAC,KAAK,CAAC;YACvC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;SAChC;IACL,CAAC;IAAA,CAAC;IAEF;;;;;OAKG;IACH,aAAa,CAAC,iBAAiB,GAAG,KAAK;QACnC,OAAO,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IAChF,CAAC;IAAA,CAAC;IAEF;;;OAGG;IACH,gBAAgB;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAChD,CAAC;IAAA,CAAC;CACL;AArGD,oCAqGC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Definition of the EnumProperty classes\n */\n\nconst _ = require('lodash');\nconst { Int32Property } = require('./intProperties');\nconst { _castFunctors } = require('./primitiveTypeCasts');\nconst { ValueProperty } = require('./valueProperty');\nconst { TypeIdHelper } = require('@fluid-experimental/property-changeset');\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { ConsoleUtils } = require('@fluid-experimental/property-common');\n\n/**\n * A primitive property for enums.\n */\nexport class EnumProperty extends Int32Property {\n\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Int32Property\n * @alias property-properties.EnumProperty\n * @category Value Properties\n */\n constructor(in_params) {\n super({ typeid: 'Enum', ...in_params });\n // whenever an EnumProperty is created by the PropertyFactory, we get a\n // dictionary [value->enum] and [enum->value] to efficiently lookup\n // values/enums for the property.\n this._enumDictionary = in_params._enumDictionary;\n // default for this property type is '0' if it exists to keep backward compatibility\n this._data = this._enumDictionary ? this._enumDictionary.defaultValue : 0;\n };\n\n _castFunctor = _castFunctors.Int32;\n\n /**\n * Evaluates enum properties as primitives.\n * @return {boolean} true since Enum properties are primitives.\n */\n isPrimitiveType() {\n return true;\n };\n\n /**\n * Returns the current enum string\n * @return {string} the string value of the property\n * @throws if no entry exists\n */\n getEnumString() {\n var resultEntry = this._enumDictionary.enumEntriesByValue[this._data];\n if (!resultEntry) {\n throw new Error(MSG.UNKNOWN_ENUM + this._data);\n } else {\n return resultEntry.id;\n }\n };\n\n /**\n * Sets the (internal, integer) value of the property\n *\n * @param {Number|string} in_value the new integer value - it must be a valid enum integer for this property\n * or\n * the new enum value in form of a valid enum string for this EnumProperty\n * @throws if no entry exists for in_value\n *\n */\n setValue(in_value) {\n this._checkIsNotReadOnly(true);\n\n // check if we've got a string\n if (_.isString(in_value)) {\n this.setEnumByString(in_value);\n } else if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n } else {\n ValueProperty.prototype.setValue.call(this, in_value);\n }\n };\n\n /**\n * Sets the property by an enum string\n *\n * @param {string} in_stringId the enum string we want to switch to\n * @throws if in_stringId is not a string\n * @throws if no entry is found for in_stringId\n */\n setEnumByString(in_stringId) {\n ConsoleUtils.assert(_.isString(in_stringId), MSG.STRING_ID_MUST_BE_STRING + in_stringId);\n var internalEnum = this._enumDictionary.enumEntriesById[in_stringId];\n if (!internalEnum) {\n throw new Error(MSG.UNKNOWN_ENUM + in_stringId);\n } else {\n var internalValue = internalEnum.value;\n this.setValue(internalValue);\n }\n };\n\n /**\n * Returns the full property type identifier for the ChangeSet including the enum type id\n * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted\n * since that is not aplicable here, this param is ignored\n * @return {string} The typeid\n */\n getFullTypeid(in_hideCollection = false) {\n return TypeIdHelper.createSerializationTypeId(this._typeid, 'single', true);\n };\n\n /**\n * let the user to query all valid entries of an enum\n * @return {{}} all valid (string) entries and their (int) values\n */\n getValidEnumList() {\n return this._enumDictionary.enumEntriesById;\n };\n}\n"]}
1
+ {"version":3,"file":"enumProperty.js","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC1D,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AAC3E,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AAExE;;GAEG;AACH,MAAa,YAAa,SAAQ,aAAa;IAE3C;;;;;;;MAOE;IACF,YAAY,SAAS;QACjB,KAAK,iBAAG,MAAM,EAAE,MAAM,IAAK,SAAS,E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AAC,QAAQ,CAAC,WAAW,CAAC,EAAE,GAAG,CAAC,wBAAwB,GAAG,WAAW,CAAC,CAAC;QACzF,IAAI,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QACrE,IAAI,CAAC,YAAY,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,YAAY,GAAG,WAAW,CAAC,CAAC;SACnD;aAAM;YACH,IAAI,aAAa,GAAG,YAAY,CAAC,KAAK,CAAC;YACvC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;SAChC;IACL,CAAC;IAAA,CAAC;IAEF;;;;;OAKG;IACH,aAAa,CAAC,iBAAiB,GAAG,KAAK;QACnC,OAAO,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IAChF,CAAC;IAAA,CAAC;IAEF;;;OAGG;IACH,gBAAgB;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAChD,CAAC;IAAA,CAAC;CACL;AAnGD,oCAmGC;AACD,YAAY,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC;AACxC,YAAY,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Definition of the EnumProperty classes\n */\n\nconst _ = require('lodash');\nconst { Int32Property } = require('./intProperties');\nconst { _castFunctors } = require('./primitiveTypeCasts');\nconst { ValueProperty } = require('./valueProperty');\nconst { TypeIdHelper } = require('@fluid-experimental/property-changeset');\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { ConsoleUtils } = require('@fluid-experimental/property-common');\n\n/**\n * A primitive property for enums.\n */\nexport class EnumProperty extends Int32Property {\n\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Int32Property\n * @alias property-properties.EnumProperty\n * @category Value Properties\n */\n constructor(in_params) {\n super({ typeid: 'Enum', ...in_params });\n // whenever an EnumProperty is created by the PropertyFactory, we get a\n // dictionary [value->enum] and [enum->value] to efficiently lookup\n // values/enums for the property.\n this._enumDictionary = in_params._enumDictionary;\n // default for this property type is '0' if it exists to keep backward compatibility\n this._data = this._enumDictionary ? this._enumDictionary.defaultValue : 0;\n };\n\n /**\n * Evaluates enum properties as primitives.\n * @return {boolean} true since Enum properties are primitives.\n */\n isPrimitiveType() {\n return true;\n };\n\n /**\n * Returns the current enum string\n * @return {string} the string value of the property\n * @throws if no entry exists\n */\n getEnumString() {\n var resultEntry = this._enumDictionary.enumEntriesByValue[this._data];\n if (!resultEntry) {\n throw new Error(MSG.UNKNOWN_ENUM + this._data);\n } else {\n return resultEntry.id;\n }\n };\n\n /**\n * Sets the (internal, integer) value of the property\n *\n * @param {Number|string} in_value the new integer value - it must be a valid enum integer for this property\n * or\n * the new enum value in form of a valid enum string for this EnumProperty\n * @throws if no entry exists for in_value\n *\n */\n setValue(in_value) {\n this._checkIsNotReadOnly(true);\n\n // check if we've got a string\n if (_.isString(in_value)) {\n this.setEnumByString(in_value);\n } else if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n } else {\n ValueProperty.prototype.setValue.call(this, in_value);\n }\n };\n\n /**\n * Sets the property by an enum string\n *\n * @param {string} in_stringId the enum string we want to switch to\n * @throws if in_stringId is not a string\n * @throws if no entry is found for in_stringId\n */\n setEnumByString(in_stringId) {\n ConsoleUtils.assert(_.isString(in_stringId), MSG.STRING_ID_MUST_BE_STRING + in_stringId);\n var internalEnum = this._enumDictionary.enumEntriesById[in_stringId];\n if (!internalEnum) {\n throw new Error(MSG.UNKNOWN_ENUM + in_stringId);\n } else {\n var internalValue = internalEnum.value;\n this.setValue(internalValue);\n }\n };\n\n /**\n * Returns the full property type identifier for the ChangeSet including the enum type id\n * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted\n * since that is not aplicable here, this param is ignored\n * @return {string} The typeid\n */\n getFullTypeid(in_hideCollection = false) {\n return TypeIdHelper.createSerializationTypeId(this._typeid, 'single', true);\n };\n\n /**\n * let the user to query all valid entries of an enum\n * @return {{}} all valid (string) entries and their (int) values\n */\n getValidEnumList() {\n return this._enumDictionary.enumEntriesById;\n };\n}\nEnumProperty.prototype._typeid = 'Enum';\nEnumProperty.prototype._castFunctor = _castFunctors.Int32;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"floatProperties.d.ts","sourceRoot":"","sources":["../../src/properties/floatProperties.js"],"names":[],"mappings":"AAWA;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAIC;IACD,kBAAqC;CACxC;AAED;;GAEG;AAEH;IACI;;;;;;;OAOG;IACH,wBAIC;IAED,kBAAqC;CACxC"}
1
+ {"version":3,"file":"floatProperties.d.ts","sourceRoot":"","sources":["../../src/properties/floatProperties.js"],"names":[],"mappings":"AAWA;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAKC;IAEL,kBAAsC;CADrC;AAID;;GAEG;AAEH;IACI;;;;;;;OAOG;IACH,wBAIC;IAEL,kBAAsC;CADrC"}
@@ -23,14 +23,15 @@ class Float32Property extends ValueProperty {
23
23
  * @category Value Properties
24
24
  */
25
25
  constructor(in_params) {
26
- super(Object.assign(Object.assign({}, in_params), { typeid: 'Float32' }));
27
- this._castFunctor = _castFunctors.Float32;
26
+ super(in_params);
28
27
  // default for this property type is '0'
29
28
  this._data = 0;
30
29
  }
31
30
  ;
32
31
  }
33
32
  exports.Float32Property = Float32Property;
33
+ Float32Property.prototype._castFunctor = _castFunctors.Float32;
34
+ Float32Property.prototype._typeid = 'Float32';
34
35
  /**
35
36
  * A primitive property for a 64 bit floating point value.
36
37
  */
@@ -44,12 +45,13 @@ class Float64Property extends ValueProperty {
44
45
  * @category Value Properties
45
46
  */
46
47
  constructor(in_params) {
47
- super(Object.assign(Object.assign({}, in_params), { typeid: 'Float64' }));
48
- this._castFunctor = _castFunctors.Float64;
48
+ super(in_params);
49
49
  // default for this property type is '0'
50
50
  this._data = 0;
51
51
  }
52
52
  ;
53
53
  }
54
54
  exports.Float64Property = Float64Property;
55
+ Float64Property.prototype._castFunctor = _castFunctors.Float64;
56
+ Float64Property.prototype._typeid = 'Float64';
55
57
  //# sourceMappingURL=floatProperties.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"floatProperties.js","sourceRoot":"","sources":["../../src/properties/floatProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAa,eAAgB,SAAQ,aAAa;IAC9C;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,iCAAM,SAAS,KAAE,MAAM,EAAE,SAAS,IAAG,CAAC;QAI/C,iBAAY,GAAG,aAAa,CAAC,OAAO,CAAC;QAHjC,wCAAwC;QACxC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACnB,CAAC;IAAA,CAAC;CAEL;AAfD,0CAeC;AAED;;GAEG;AAEH,MAAa,eAAgB,SAAQ,aAAa;IAC9C;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,iCAAM,SAAS,KAAE,MAAM,EAAE,SAAS,IAAG,CAAC;QAK/C,iBAAY,GAAG,aAAa,CAAC,OAAO,CAAC;QAJjC,wCAAwC;QACxC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACnB,CAAC;IAAA,CAAC;CAGL;AAhBD,0CAgBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Definition of the Float*Property classes\n */\n\nconst { ValueProperty } = require('./valueProperty');\nconst { _castFunctors } = require('./primitiveTypeCasts');\n\n/**\n * A primitive property for a 32 bit floating point value.\n */\nexport class Float32Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Float32Property\n * @category Value Properties\n */\n constructor(in_params) {\n super({ ...in_params, typeid: 'Float32' });\n // default for this property type is '0'\n this._data = 0;\n };\n _castFunctor = _castFunctors.Float32;\n}\n\n/**\n * A primitive property for a 64 bit floating point value.\n */\n\nexport class Float64Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Float64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super({ ...in_params, typeid: 'Float64' });\n // default for this property type is '0'\n this._data = 0;\n };\n\n _castFunctor = _castFunctors.Float64;\n}\n"]}
1
+ {"version":3,"file":"floatProperties.js","sourceRoot":"","sources":["../../src/properties/floatProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAa,eAAgB,SAAQ,aAAa;IAC9C;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,wCAAwC;QACxC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACnB,CAAC;IAAA,CAAC;CACL;AAfD,0CAeC;AACD,eAAe,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC;AAC/D,eAAe,CAAC,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC;AAE9C;;GAEG;AAEH,MAAa,eAAgB,SAAQ,aAAa;IAC9C;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,wCAAwC;QACxC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACnB,CAAC;IAAA,CAAC;CACL;AAdD,0CAcC;AACD,eAAe,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC;AAC/D,eAAe,CAAC,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Definition of the Float*Property classes\n */\n\nconst { ValueProperty } = require('./valueProperty');\nconst { _castFunctors } = require('./primitiveTypeCasts');\n\n/**\n * A primitive property for a 32 bit floating point value.\n */\nexport class Float32Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Float32Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n\n // default for this property type is '0'\n this._data = 0;\n };\n}\nFloat32Property.prototype._castFunctor = _castFunctors.Float32;\nFloat32Property.prototype._typeid = 'Float32';\n\n/**\n * A primitive property for a 64 bit floating point value.\n */\n\nexport class Float64Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Float64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n };\n}\nFloat64Property.prototype._castFunctor = _castFunctors.Float64;\nFloat64Property.prototype._typeid = 'Float64';\n"]}
@@ -27,8 +27,6 @@ export class IndexedCollectionBaseProperty extends AbstractStaticCollectionPrope
27
27
  remove: {};
28
28
  modify: {};
29
29
  };
30
- /** Specifies, whether this is a collection of base types or of registered templates */
31
- _containsPrimitiveTypes: boolean;
32
30
  /**
33
31
  * Inserts a property into the collection
34
32
  *
@@ -69,6 +67,8 @@ export class IndexedCollectionBaseProperty extends AbstractStaticCollectionPrope
69
67
  * @return {property-properties.SerializedChangeSet} the serialized object
70
68
  */
71
69
  _serializeValue(in_obj: any): any;
70
+ /** Specifies, whether this is a collection of base types or of registered templates */
71
+ _containsPrimitiveTypes: boolean;
72
72
  }
73
73
  import { AbstractStaticCollectionProperty } from "./abstractStaticCollectionProperty";
74
74
  //# sourceMappingURL=indexedCollectionBaseProperty.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"indexedCollectionBaseProperty.d.ts","sourceRoot":"","sources":["../../src/properties/indexedCollectionBaseProperty.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AAEH;;;GAGG;AACH;IAEI;;;;OAIG;IACH,4BAeC;IAbG,gGAAgG;IAChG;;;;MAIC;IAED,0GAA0G;IAC1G;;;;MAIC;IAIL,uFAAuF;IACvF,iCAAgC;IA4EhC;;;;;;;;;;OAUG;IACH,gBARW,MAAM,kCAIN,OAAO,QAyDjB;IAED;;;;;;;;OAQG;IACH,qBANW,MAAM,mBAEN,OAAO,QAsCjB;IA4GD;;;;;;;OAOG;IACH,8CAEC;IAED;;;;;;;OAOG;IACH,kCAIC;CAgYJ"}
1
+ {"version":3,"file":"indexedCollectionBaseProperty.d.ts","sourceRoot":"","sources":["../../src/properties/indexedCollectionBaseProperty.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AAEH;;;GAGG;AACH;IAEI;;;;OAIG;IACH,4BAeC;IAbG,gGAAgG;IAChG;;;;MAIC;IAED,0GAA0G;IAC1G;;;;MAIC;IA6EL;;;;;;;;;;OAUG;IACH,gBARW,MAAM,kCAIN,OAAO,QAyDjB;IAED;;;;;;;;OAQG;IACH,qBANW,MAAM,mBAEN,OAAO,QAsCjB;IA4GD;;;;;;;OAOG;IACH,8CAEC;IAED;;;;;;;OAOG;IACH,kCAIC;IAiYL,uFAAuF;IACvF,iCAA+D;CAF9D"}
@@ -34,8 +34,6 @@ class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {
34
34
  */
35
35
  constructor(in_params) {
36
36
  super(in_params);
37
- /** Specifies, whether this is a collection of base types or of registered templates */
38
- this._containsPrimitiveTypes = false;
39
37
  /** Stores the pending changes in the property (those that are part of the current ChangeSet) */
40
38
  this._pendingChanges = {
41
39
  insert: {},
@@ -706,4 +704,6 @@ class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {
706
704
  ;
707
705
  }
708
706
  exports.IndexedCollectionBaseProperty = IndexedCollectionBaseProperty;
707
+ /** Specifies, whether this is a collection of base types or of registered templates */
708
+ IndexedCollectionBaseProperty.prototype._containsPrimitiveTypes = false;
709
709
  //# sourceMappingURL=indexedCollectionBaseProperty.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"indexedCollectionBaseProperty.js","sourceRoot":"","sources":["../../src/properties/indexedCollectionBaseProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,gCAAgC,EAAE,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAC3F,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAC1D,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACxE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACxE,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE/D;;;;;GAKG;AAEH;;;GAGG;AACH,MAAa,6BAA8B,SAAQ,gCAAgC;IAE/E;;;;OAIG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QAiBrB,uFAAuF;QACvF,4BAAuB,GAAG,KAAK,CAAC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MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;iBACzC;aACJ;SACJ;QAED,8CAA8C;QAC9C,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;IAClF,CAAC;IAAA,CAAC;CACL;AAvtBD,sEAutBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview Abstract base class for indexed collections (sets and maps)\n */\nconst _ = require('lodash');\nconst { BaseProperty } = require('./baseProperty');\nconst { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');\nconst { deserialize } = require('../containerSerializer');\nconst { ChangeSet } = require('@fluid-experimental/property-changeset');\nconst { ConsoleUtils } = require('@fluid-experimental/property-common');\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { validationsEnabled } = require('../enableValidations');\n\n/**\n * typedef {property-properties.BaseProperty|string|number|boolean} property-properties.IndexedCollectionBaseProperty~ValueType\n *\n * The type of the values that are set/inserted into the collection. Depending on the type of the collection, these\n * can either be property objects or primitive values\n */\n\n/**\n * A IndexedCollectionBaseProperty is the base class for indexed collections (maps and sets). It should not be used\n * directly.\n */\nexport class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {\n\n /**\n * @param {Object} in_params - Input parameters for property creation\n *\n * @constructor\n */\n constructor(in_params) {\n super(in_params);\n /** Stores the pending changes in the property (those that are part of the current ChangeSet) */\n this._pendingChanges = {\n insert: {},\n remove: {},\n modify: {}\n };\n\n /** Stores the dirty changes in the property (those that have not yet been reported to the application) */\n this._dirtyChanges = {\n insert: {},\n remove: {},\n modify: {}\n };\n };\n\n\n /** Specifies, whether this is a collection of base types or of registered templates */\n _containsPrimitiveTypes = false;\n\n /**\n * Removes the dirtiness flag from this property\n *\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean, if none are supplied all\n * will be removed\n * @private\n */\n _cleanDirty(in_flags) {\n // Invoke parent\n BaseProperty.prototype._cleanDirty.call(this, in_flags);\n\n if (in_flags === undefined ||\n (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE) !== 0) {\n // We additionally have to remove the log on the changes to our entries\n this._pendingChanges.insert = {};\n this._pendingChanges.remove = {};\n this._pendingChanges.modify = {};\n }\n\n if (in_flags === undefined ||\n (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) !== 0) {\n // We additionally have to remove the log on the changes to our entries\n this._dirtyChanges.insert = {};\n this._dirtyChanges.remove = {};\n this._dirtyChanges.modify = {};\n }\n };\n\n /**\n * Removes the dirtiness flag from this property and recursively from all of its children\n *\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean, if none are supplied all\n * will be removed\n */\n cleanDirty(in_flags) {\n in_flags = in_flags !== undefined ? in_flags : BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |\n BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE;\n\n // Clean all entries inside of the collection\n let cleanDirtiness = (collection) => {\n var entry;\n\n for (let key in collection) {\n entry = this._dynamicChildren[key];\n if (entry._isDirty(in_flags)) {\n entry.cleanDirty(in_flags);\n }\n }\n };\n\n if (!this._containsPrimitiveTypes) {\n if (in_flags === BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) {\n // Only use the dirty entries\n cleanDirtiness(this._dirtyChanges.insert);\n cleanDirtiness(this._dirtyChanges.modify);\n } else if (in_flags === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE) {\n // Only use the pending changes\n cleanDirtiness(this._pendingChanges.insert);\n cleanDirtiness(this._pendingChanges.modify);\n } else {\n cleanDirtiness(this._pendingChanges.insert);\n cleanDirtiness(this._pendingChanges.modify);\n cleanDirtiness(this._dirtyChanges.insert);\n cleanDirtiness(this._dirtyChanges.modify);\n }\n }\n\n // Invoke parent\n BaseProperty.prototype.cleanDirty.call(this, in_flags);\n\n // after all entries have been cleaned, we mark this property as clean\n this._cleanDirty(in_flags);\n };\n\n /**\n * Inserts a property into the collection\n *\n * @param {string} in_key -\n * Key of the entry in the collection\n * @param {property-properties.IndexedCollectionBaseProperty~ValueType} in_value -\n * The value to insert\n * @param {boolean} in_reportToView -\n * By default, the dirtying will always be reported to the checkout view and trigger a modified event there.\n * When batching updates, this can be prevented via this flag.\n */\n _insert(in_key, in_value, in_reportToView) {\n\t if (validationsEnabled.enabled) {\n\t this._checkIsNotReadOnly(false);\n\t }\n\n if (!this.has(in_key)) {\n // Make sure, the property we are inserting is not already part of some other collection\n if (validationsEnabled.enabled && !this._containsPrimitiveTypes) {\n in_value._validateInsertIn(this)\n }\n\n this._dynamicChildren[in_key] = in_value;\n\n // We have to make sure, both this node itself and the whole tree of the inserted\n // entry are marked as dirty to make sure, they get serialized\n // We don't yet report the dirtying to the view. This happens below.\n this._setDirty(false);\n\n if (!this._containsPrimitiveTypes) {\n // Dirty the tree (TODO: is this needed?)\n in_value._setDirtyTree(false);\n\n in_value._setParent(this);\n\n // In the case of a template property, we always mark it as inserted\n this._pendingChanges.insert[in_key] = true;\n this._dirtyChanges.insert[in_key] = true;\n } else {\n // For primitive types we squash remove/insert combinations to modifies\n if (this._pendingChanges.remove[in_key] &&\n !this._pendingChanges.insert[in_key]) {\n this._pendingChanges.modify[in_key] = true;\n delete this._pendingChanges.remove[in_key];\n } else {\n this._pendingChanges.insert[in_key] = true;\n }\n\n if (this._dirtyChanges.remove[in_key] &&\n !this._dirtyChanges.insert[in_key]) {\n this._dirtyChanges.modify[in_key] = true;\n delete this._dirtyChanges.remove[in_key];\n } else {\n this._dirtyChanges.insert[in_key] = true;\n }\n }\n\n // Now make one report\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n } else {\n throw new Error(MSG.PROPERTY_ALREADY_EXISTS + in_key);\n }\n };\n\n /**\n * Removes an entry with the given key\n *\n * @param {string} in_key -\n * key of the entry\n * @param {boolean} in_reportToView -\n * By default, the dirtying will always be reported to the checkout view and trigger a modified event there.\n * When batching updates, this can be prevented via this flag.\n */\n _removeByKey(in_key, in_reportToView) {\n this._checkIsNotReadOnly(false);\n\n if (this._dynamicChildren[in_key] !== undefined) {\n if (this._dynamicChildren[in_key] instanceof BaseProperty) {\n this._dynamicChildren[in_key]._setParent(undefined);\n }\n\n delete this._dynamicChildren[in_key];\n\n // make sure this is not present in the insert list!\n if (this._pendingChanges.insert[in_key]) {\n delete this._pendingChanges.insert[in_key];\n } else {\n this._pendingChanges.remove[in_key] = true;\n\n // Also remove modifies, if any are present\n delete this._pendingChanges.modify[in_key];\n }\n\n // also update the list of dirty changes\n if (this._dirtyChanges.insert[in_key]) {\n delete this._dirtyChanges.insert[in_key];\n } else {\n this._dirtyChanges.remove[in_key] = true;\n\n // Also remove modifies, if any are present\n delete this._dirtyChanges.modify[in_key];\n }\n\n this._setDirty(in_reportToView);\n } else {\n throw new Error(MSG.REMOVED_NON_EXISTING_ENTRY + in_key);\n }\n };\n\n /**\n * Serialize the property\n *\n * @param {boolean} in_dirtyOnly -\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 serialized = AbstractStaticCollectionProperty.prototype._serialize.call(this, in_dirtyOnly, in_includeRootTypeid,\n in_dirtinessType, in_includeReferencedRepositories);\n\n var that = this;\n\n // Helper function to decide whether to include a typeid or not in the ChangeSet\n var addEntryInChangeSet = function (in_changes, in_typeid, in_key, in_value) {\n // Determine where to insert the key. If necessary, an entry for the type is added.\n if (that._containsPrimitiveTypes) {\n in_changes[in_key] = that._serializeValue(in_value);\n } else {\n in_changes[in_typeid] = in_changes[in_typeid] || {};\n in_changes[in_typeid][in_key] = in_value;\n }\n };\n\n var changes = in_dirtinessType === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE ?\n this._pendingChanges : this._dirtyChanges;\n var insert = {};\n var modify = {};\n // we only remove entries when computing the delta\n var remove = in_dirtyOnly ? _.keys(changes.remove) : [];\n\n // Iterate over all children (and not properties)\n var typeid;\n var entryKeys = in_dirtyOnly ?\n _.keys(changes.modify).concat(_.keys(changes.insert)) : // Only dirty keys\n _.keys(this._dynamicChildren); // All keys\n for (var i = 0; i < entryKeys.length; i++) {\n var key = entryKeys[i];\n var entry = this._dynamicChildren[key];\n typeid = this._containsPrimitiveTypes ? this.getFullTypeid(false) : entry.getFullTypeid(false);\n if (in_dirtyOnly) {\n\n if (changes.insert[key]) {\n // If the key was inserted in this ChangeSet include it into the inserted list\n if (this._containsPrimitiveTypes) {\n addEntryInChangeSet(insert, typeid, key, entry);\n } else {\n addEntryInChangeSet(insert, typeid, key, entry._serialize(false, false,\n undefined, in_includeReferencedRepositories));\n }\n } else {\n // Check whether this is a modified entry and serialize changes when needed\n if (this._containsPrimitiveTypes) {\n if (changes.modify[key]) {\n addEntryInChangeSet(modify, typeid, key, entry);\n }\n } else {\n if (entry._isDirty(in_dirtinessType)) {\n var serializedChild = entry._serialize(in_dirtyOnly, false,\n in_dirtinessType, in_includeReferencedRepositories);\n if (!ChangeSet.isEmptyChangeSet(serializedChild)) {\n addEntryInChangeSet(modify, typeid, key, serializedChild);\n }\n }\n }\n }\n } else {\n // If we serialize everything, all entries are inserted\n if (this._containsPrimitiveTypes) {\n insert[key] = this._serializeValue(entry);\n } else {\n insert[typeid] = insert[typeid] || {};\n insert[typeid][key] = entry._serialize(in_dirtyOnly, false, undefined, in_includeReferencedRepositories);\n }\n }\n }\n\n // Serialize the changes\n if (!_.isEmpty(insert)) {\n serialized.insert = insert;\n }\n\n if (!_.isEmpty(remove)) {\n serialized.remove = remove;\n }\n\n if (!_.isEmpty(modify)) {\n serialized.modify = modify;\n }\n\n return serialized;\n };\n\n /**\n * Function to deserialize special primitive types.\n * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n * special treatment on deserialization. For supported types, we can just return the input here.\n *\n * @param {property-properties.SerializedChangeSet} in_serializedObj - The object to be deserialized\n * @return {*} the deserialized value\n */\n _deserializeValue(in_serializedObj) {\n return in_serializedObj;\n };\n\n /**\n * Function to serialize special primitive types.\n * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n * special treatment on serialization. For supported types, we can just return the input here.\n *\n * @param {*} in_obj - The object to be serialized\n * @return {property-properties.SerializedChangeSet} the serialized object\n */\n _serializeValue(in_obj) {\n ConsoleUtils.assert(this._containsPrimitiveTypes, MSG.ASSERTION_FAILED +\n 'Function IndexedCollectionBaseProperty._serializeValue() called on non-primitive collection');\n return in_obj;\n };\n\n /**\n * @inheritdoc\n */\n // eslint-disable-next-line complexity\n _deserialize(in_serializedObj, in_reportToView,\n in_filteringOptions, in_createChangeSet) {\n\n var currentEntries = this._dynamicChildren;\n var allInsertedKeys = {};\n\n var appliedChangeset = AbstractStaticCollectionProperty.prototype._deserialize.call(\n this, in_serializedObj, false, in_filteringOptions, in_createChangeSet);\n\n // Perform updates to the children\n\n // We make copies on two levels, since those are modified by the calls below\n var insertedEntries = _.mapValues(in_serializedObj.insert, function (x) { return _.clone(x); }) || {};\n var removedEntries = {};\n var modifiedEntries = {};\n\n // Get a list of all keys that will be inserted\n if (this._containsPrimitiveTypes) {\n var dataKeys = _.keys(insertedEntries);\n for (var iData = 0; iData < dataKeys.length; iData++) {\n var key = dataKeys[iData];\n allInsertedKeys[key] = true;\n }\n } else {\n var classKeys = _.keys(insertedEntries);\n for (var iClass = 0; iClass < classKeys.length; iClass++) {\n var typeid = classKeys[iClass];\n var dataKeys = _.keys(insertedEntries[typeid]);\n for (var iData = 0; iData < dataKeys.length; iData++) {\n var key = dataKeys[iData];\n allInsertedKeys[key] = true;\n }\n }\n }\n\n // Intersect the list of current keys, with the list of keys that will\n // NOT be inserted. Then insert the difference in the remove list so that\n // no objects are left dangling\n var keys = _.keys(currentEntries);\n for (var i = 0; i < keys.length; i++) {\n if (!allInsertedKeys[keys[i]]) {\n removedEntries[keys[i]] = true;\n }\n }\n\n // Remap adds to modify if the items are already in the document.\n // We want to make sure we reuse the current document state as much as possible\n // and simply change the bits that need to be changed. In many cases the\n // document will already contain the items but they need to be modified to\n // match the state described in_changeSet.\n if (this._containsPrimitiveTypes) {\n var addedKeys = Object.keys(insertedEntries);\n for (i = 0; i < addedKeys.length; i++) {\n if (currentEntries[addedKeys[i]] !== undefined) {\n modifiedEntries[addedKeys[i]] = insertedEntries[addedKeys[i]];\n delete insertedEntries[addedKeys[i]];\n }\n }\n } else {\n classKeys = _.keys(insertedEntries);\n for (iClass = 0; iClass < classKeys.length; iClass++) {\n typeid = classKeys[iClass];\n var addedKeys = Object.keys(insertedEntries[typeid]);\n for (i = 0; i < addedKeys.length; i++) {\n if (currentEntries[addedKeys[i]] !== undefined) {\n modifiedEntries[typeid] = modifiedEntries[typeid] || {};\n modifiedEntries[typeid][addedKeys[i]] = insertedEntries[typeid][addedKeys[i]];\n delete insertedEntries[typeid][addedKeys[i]];\n }\n }\n\n // Remove add entries, when they are empty\n if (_.isEmpty(insertedEntries[typeid])) {\n delete insertedEntries[typeid];\n }\n }\n }\n\n // Begin by removing what needs to be removed.\n keys = Object.keys(removedEntries);\n for (i = 0; i < keys.length; i++) {\n this._removeByKey(keys[i], false);\n }\n\n // Now get the portion of the children that must be added\n // this is a straightforward deserialize.\n if (this._containsPrimitiveTypes) {\n keys = _.keys(insertedEntries);\n for (i = 0; i < keys.length; i++) {\n this._insert(keys[i], this._deserializeValue(insertedEntries[keys[i]]), false);\n }\n } else {\n var scope = this._getScope();\n var newPsets = deserialize(insertedEntries, scope);\n keys = _.keys(newPsets);\n for (i = 0; i < keys.length; i++) {\n this._insert(keys[i], newPsets[keys[i]], false);\n }\n }\n\n\n // If no typeids are included, we just use a placeholder for the iteration below\n var classKeys = this._containsPrimitiveTypes ? [undefined] : _.keys(modifiedEntries);\n\n // Finally modify the existing properties\n var mapWasChangedByModify = false;\n for (iClass = 0; iClass < classKeys.length; iClass++) {\n typeid = classKeys[iClass];\n var modifiedKeys = Object.keys(this._containsPrimitiveTypes ? modifiedEntries : modifiedEntries[typeid]);\n for (i = 0; i < modifiedKeys.length; i++) {\n var changes;\n var valueWasChanged = false;\n var modifiedEntriesMap;\n if (this._containsPrimitiveTypes) {\n changes = modifiedEntries[modifiedKeys[i]];\n // Determine if value has changed\n if (this._typeid === 'Int64' || this._typeid === 'Uint64') {\n // For (u)int64, we will compare (Ui/I)nt64 objects with arrays [low, high]\n valueWasChanged = this._dynamicChildren[modifiedKeys[i]].getValueLow() !== changes[0] ||\n this._dynamicChildren[modifiedKeys[i]].getValueHigh() !== changes[1];\n } else {\n valueWasChanged = this._dynamicChildren[modifiedKeys[i]] !== changes;\n }\n modifiedEntriesMap = modifiedEntries;\n if (valueWasChanged) {\n this._dynamicChildren[modifiedKeys[i]] = this._deserializeValue(changes);\n // After modifying an entry, we have to update the flags\n // If there is a pending insert, we don't need to mark this as\n // a modify, as it will just change the insert. Otherwise, this\n // has to be reported as modify\n if (!this._pendingChanges.insert[modifiedKeys[i]]) {\n this._pendingChanges.modify[modifiedKeys[i]] = true;\n mapWasChangedByModify = true;\n }\n if (!this._dirtyChanges.insert[modifiedKeys[i]]) {\n this._dirtyChanges.modify[modifiedKeys[i]] = true;\n mapWasChangedByModify = true;\n }\n }\n } else {\n changes = this._dynamicChildren[modifiedKeys[i]]._deserialize(\n modifiedEntries[typeid][modifiedKeys[i]],\n false, in_filteringOptions, in_createChangeSet);\n valueWasChanged = !ChangeSet.isEmptyChangeSet(changes);\n\n modifiedEntries[typeid] = modifiedEntries[typeid] || {};\n modifiedEntriesMap = modifiedEntries[typeid];\n }\n\n if (valueWasChanged) {\n modifiedEntriesMap[modifiedKeys[i]] = changes;\n } else {\n delete modifiedEntriesMap[modifiedKeys[i]];\n }\n }\n\n if (!this._containsPrimitiveTypes && _.isEmpty(modifiedEntries[typeid])) {\n delete modifiedEntries[typeid];\n }\n }\n\n // Create a ChangeSet with the actually applied changes\n if (!_.isEmpty(insertedEntries)) {\n appliedChangeset.insert = _.clone(insertedEntries);\n }\n\n if (!_.isEmpty(removedEntries)) {\n appliedChangeset.remove = _.keys(removedEntries);\n }\n\n if (!_.isEmpty(modifiedEntries)) {\n appliedChangeset.modify = modifiedEntries;\n }\n\n // If working with primitive types, we have to update the dirty flag, when one of the entries\n // was changed\n if (mapWasChangedByModify) {\n this._setDirty(false);\n }\n\n // Finally report the dirtiness to the view (we postponed this above)\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n\n return appliedChangeset;\n };\n\n /**\n * @inheritdoc\n */\n _applyChangeset(in_changeSet, in_reportToView) {\n BaseProperty.prototype._applyChangeset.call(this, in_changeSet, false);\n\n // Remove existing entries\n // (we remove before we add, so that a remove+add operation in effect becomes a replace)\n if (in_changeSet.remove) {\n if (_.isArray(in_changeSet.remove)) {\n for (var i = 0; i < in_changeSet.remove.length; i++) {\n var key = in_changeSet.remove[i];\n this._removeByKey(key, false);\n }\n } else {\n // handle remove is an object case:\n if (!this._containsPrimitiveTypes) {\n var types = Object.keys(in_changeSet.remove);\n for (var i = 0; i < types.length; i++) {\n var keys = Object.keys(in_changeSet.remove[types[i]]);\n for (var j = 0; j < keys.length; j++) {\n this._removeByKey(keys[j], false);\n }\n }\n } else {\n var keys = Object.keys(in_changeSet.remove);\n for (var j = 0; j < keys.length; j++) {\n this._removeByKey(keys[j], false);\n }\n }\n }\n }\n\n // Insert entries (we just have to deserialize and insert them)\n if (in_changeSet.insert) {\n var newPsets;\n if (this._containsPrimitiveTypes) {\n newPsets = in_changeSet.insert;\n } else {\n var scope = this._getScope();\n newPsets = deserialize(in_changeSet.insert, scope);\n }\n var keys = Object.keys(newPsets);\n for (var i = 0; i < keys.length; i++) {\n if (!this._dynamicChildren[keys[i]]) {\n this._insert(keys[i], newPsets[keys[i]], false);\n } else {\n throw new Error(MSG.INSERTED_EXISTING_ENTRY + keys[i]);\n }\n }\n }\n\n // Modify entries\n var mapWasChangedByModify = false;\n if (in_changeSet.modify) {\n var classKeys = this._containsPrimitiveTypes ? [undefined] : _.keys(in_changeSet.modify);\n for (var iClass = 0; iClass < classKeys.length; iClass++) {\n var modifiedEntries = this._containsPrimitiveTypes ?\n in_changeSet.modify :\n in_changeSet.modify[classKeys[iClass]];\n var keys = Object.keys(modifiedEntries);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (this._dynamicChildren[key] !== undefined) {\n if (this._containsPrimitiveTypes) {\n var modifiedEntry = modifiedEntries[key];\n if (typeof modifiedEntry === 'object') {\n modifiedEntry = modifiedEntry.value;\n }\n this._dynamicChildren[key] = modifiedEntry;\n\n // After modifying an entry, we have to update the flags\n // If there is a pending insert, we don't need to mark this as\n // a modify, as it will just change the insert. Otherwise, this\n // has to be reported as modify\n if (!this._pendingChanges.insert[key]) {\n this._pendingChanges.modify[key] = true;\n mapWasChangedByModify = true;\n }\n if (!this._dirtyChanges.insert[key]) {\n this._dirtyChanges.modify[key] = true;\n mapWasChangedByModify = true;\n }\n\n } else {\n this._dynamicChildren[key]._applyChangeset(modifiedEntries[key], false);\n }\n } else {\n throw new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n }\n }\n }\n }\n\n // If working with primitive types, we have to update the dirty flag, when one of the entries\n // was changed\n if (mapWasChangedByModify) {\n this._setDirty(false);\n }\n\n // Finally report the dirtiness to the view (we postponed this above)\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n };\n\n /**\n * @inheritdoc\n */\n _reapplyDirtyFlags(in_pendingChangeSet, in_dirtyChangeSet) {\n BaseProperty.prototype._reapplyDirtyFlags.call(this, in_pendingChangeSet, in_dirtyChangeSet);\n\n var i, j, types, keys, key;\n\n // Remove existing entries\n // (we remove before we add, so that a remove+add operation in effect becomes a replace)\n if (in_pendingChangeSet.remove) {\n if (_.isArray(in_pendingChangeSet.remove)) {\n for (i = 0; i < in_pendingChangeSet.remove.length; i++) {\n key = in_pendingChangeSet.remove[i];\n this._pendingChanges.remove[key] = true;\n }\n } else {\n // handle remove is an object case:\n types = Object.keys(in_pendingChangeSet.remove);\n for (i = 0; i < types.length; i++) {\n keys = Object.keys(in_pendingChangeSet.remove[types[i]]);\n for (j = 0; j < keys.length; j++) {\n this._pendingChanges.remove[keys[j]] = true;\n }\n }\n }\n }\n\n // Inserted entries\n if (in_pendingChangeSet.insert) {\n types = Object.keys(in_pendingChangeSet.insert);\n for (i = 0; i < types.length; i++) {\n keys = Object.keys(in_pendingChangeSet.insert[types[i]]);\n for (j = 0; j < keys.length; j++) {\n key = keys[j];\n if (this._dynamicChildren[key] !== undefined) {\n this._pendingChanges.insert[key] = true;\n } else {\n throw new Error(`${MSG.CANT_DIRTY_MISSING_PROPERTY}${key}`);\n }\n }\n }\n }\n\n // Modify entries\n if (in_pendingChangeSet.modify) {\n var classKeys = _.keys(in_pendingChangeSet.modify);\n for (var iClass = 0; iClass < classKeys.length; iClass++) {\n var modifiedPendingEntries = in_pendingChangeSet.modify && in_pendingChangeSet.modify[classKeys[iClass]] || {};\n var modifiedDirtyEntries = in_dirtyChangeSet.modify && in_dirtyChangeSet.modify[classKeys[iClass]] || {};\n keys = Object.keys(modifiedPendingEntries).concat(Object.keys(modifiedDirtyEntries));\n for (i = 0; i < keys.length; i++) {\n key = keys[i];\n if (this._dynamicChildren[key] !== undefined) {\n this._dynamicChildren[key]._reapplyDirtyFlags(modifiedPendingEntries[key], modifiedDirtyEntries[key]);\n } else {\n throw new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n }\n }\n }\n }\n };\n\n /**\n * @inheritdoc\n */\n _setDirty(in_reportToView, in_callingChild) {\n // Mark the child as modified\n if (in_callingChild && !this._containsPrimitiveTypes) {\n var key = in_callingChild.getId();\n if (this._dynamicChildren[key]) {\n\n if (!this._pendingChanges.insert[key]) {\n this._pendingChanges.modify[key] = true;\n }\n if (!this._dirtyChanges.insert[key]) {\n this._dirtyChanges.modify[key] = true;\n }\n }\n }\n\n // Forward dirtiness propagation to base class\n BaseProperty.prototype._setDirty.call(this, in_reportToView, in_callingChild);\n };\n}\n"]}
1
+ {"version":3,"file":"indexedCollectionBaseProperty.js","sourceRoot":"","sources":["../../src/properties/indexedCollectionBaseProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,gCAAgC,EAAE,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAC3F,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAC1D,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACxE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACxE,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE/D;;;;;GAKG;AAEH;;;GAGG;AACH,MAAa,6BAA8B,SAAQ,gCAAgC;IAE/E;;;;OAIG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,gGAAgG;QAChG,IAAI,CAAC,eAAe,GAAG;YACnB,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,EAAE;SACb,CAAC;QAEF,0GAA0G;QAC1G,IAAI,CAAC,aAAa,G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C;IAClF,CAAC;IAAA,CAAC;CACL;AAntBD,sEAmtBC;AACD,uFAAuF;AACvF,6BAA6B,CAAC,SAAS,CAAC,uBAAuB,GAAG,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview Abstract base class for indexed collections (sets and maps)\n */\nconst _ = require('lodash');\nconst { BaseProperty } = require('./baseProperty');\nconst { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');\nconst { deserialize } = require('../containerSerializer');\nconst { ChangeSet } = require('@fluid-experimental/property-changeset');\nconst { ConsoleUtils } = require('@fluid-experimental/property-common');\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { validationsEnabled } = require('../enableValidations');\n\n/**\n * typedef {property-properties.BaseProperty|string|number|boolean} property-properties.IndexedCollectionBaseProperty~ValueType\n *\n * The type of the values that are set/inserted into the collection. Depending on the type of the collection, these\n * can either be property objects or primitive values\n */\n\n/**\n * A IndexedCollectionBaseProperty is the base class for indexed collections (maps and sets). It should not be used\n * directly.\n */\nexport class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {\n\n /**\n * @param {Object} in_params - Input parameters for property creation\n *\n * @constructor\n */\n constructor(in_params) {\n super(in_params);\n /** Stores the pending changes in the property (those that are part of the current ChangeSet) */\n this._pendingChanges = {\n insert: {},\n remove: {},\n modify: {}\n };\n\n /** Stores the dirty changes in the property (those that have not yet been reported to the application) */\n this._dirtyChanges = {\n insert: {},\n remove: {},\n modify: {}\n };\n };\n\n /**\n * Removes the dirtiness flag from this property\n *\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean, if none are supplied all\n * will be removed\n * @private\n */\n _cleanDirty(in_flags) {\n // Invoke parent\n BaseProperty.prototype._cleanDirty.call(this, in_flags);\n\n if (in_flags === undefined ||\n (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE) !== 0) {\n // We additionally have to remove the log on the changes to our entries\n this._pendingChanges.insert = {};\n this._pendingChanges.remove = {};\n this._pendingChanges.modify = {};\n }\n\n if (in_flags === undefined ||\n (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) !== 0) {\n // We additionally have to remove the log on the changes to our entries\n this._dirtyChanges.insert = {};\n this._dirtyChanges.remove = {};\n this._dirtyChanges.modify = {};\n }\n };\n\n /**\n * Removes the dirtiness flag from this property and recursively from all of its children\n *\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean, if none are supplied all\n * will be removed\n */\n cleanDirty(in_flags) {\n in_flags = in_flags !== undefined ? in_flags : BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |\n BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE;\n\n // Clean all entries inside of the collection\n let cleanDirtiness = (collection) => {\n var entry;\n\n for (let key in collection) {\n entry = this._dynamicChildren[key];\n if (entry._isDirty(in_flags)) {\n entry.cleanDirty(in_flags);\n }\n }\n };\n\n if (!this._containsPrimitiveTypes) {\n if (in_flags === BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) {\n // Only use the dirty entries\n cleanDirtiness(this._dirtyChanges.insert);\n cleanDirtiness(this._dirtyChanges.modify);\n } else if (in_flags === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE) {\n // Only use the pending changes\n cleanDirtiness(this._pendingChanges.insert);\n cleanDirtiness(this._pendingChanges.modify);\n } else {\n cleanDirtiness(this._pendingChanges.insert);\n cleanDirtiness(this._pendingChanges.modify);\n cleanDirtiness(this._dirtyChanges.insert);\n cleanDirtiness(this._dirtyChanges.modify);\n }\n }\n\n // Invoke parent\n BaseProperty.prototype.cleanDirty.call(this, in_flags);\n\n // after all entries have been cleaned, we mark this property as clean\n this._cleanDirty(in_flags);\n };\n\n /**\n * Inserts a property into the collection\n *\n * @param {string} in_key -\n * Key of the entry in the collection\n * @param {property-properties.IndexedCollectionBaseProperty~ValueType} in_value -\n * The value to insert\n * @param {boolean} in_reportToView -\n * By default, the dirtying will always be reported to the checkout view and trigger a modified event there.\n * When batching updates, this can be prevented via this flag.\n */\n _insert(in_key, in_value, in_reportToView) {\n\t if (validationsEnabled.enabled) {\n\t this._checkIsNotReadOnly(false);\n\t }\n\n if (!this.has(in_key)) {\n // Make sure, the property we are inserting is not already part of some other collection\n if (validationsEnabled.enabled && !this._containsPrimitiveTypes) {\n in_value._validateInsertIn(this)\n }\n\n this._dynamicChildren[in_key] = in_value;\n\n // We have to make sure, both this node itself and the whole tree of the inserted\n // entry are marked as dirty to make sure, they get serialized\n // We don't yet report the dirtying to the view. This happens below.\n this._setDirty(false);\n\n if (!this._containsPrimitiveTypes) {\n // Dirty the tree (TODO: is this needed?)\n in_value._setDirtyTree(false);\n\n in_value._setParent(this);\n\n // In the case of a template property, we always mark it as inserted\n this._pendingChanges.insert[in_key] = true;\n this._dirtyChanges.insert[in_key] = true;\n } else {\n // For primitive types we squash remove/insert combinations to modifies\n if (this._pendingChanges.remove[in_key] &&\n !this._pendingChanges.insert[in_key]) {\n this._pendingChanges.modify[in_key] = true;\n delete this._pendingChanges.remove[in_key];\n } else {\n this._pendingChanges.insert[in_key] = true;\n }\n\n if (this._dirtyChanges.remove[in_key] &&\n !this._dirtyChanges.insert[in_key]) {\n this._dirtyChanges.modify[in_key] = true;\n delete this._dirtyChanges.remove[in_key];\n } else {\n this._dirtyChanges.insert[in_key] = true;\n }\n }\n\n // Now make one report\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n } else {\n throw new Error(MSG.PROPERTY_ALREADY_EXISTS + in_key);\n }\n };\n\n /**\n * Removes an entry with the given key\n *\n * @param {string} in_key -\n * key of the entry\n * @param {boolean} in_reportToView -\n * By default, the dirtying will always be reported to the checkout view and trigger a modified event there.\n * When batching updates, this can be prevented via this flag.\n */\n _removeByKey(in_key, in_reportToView) {\n this._checkIsNotReadOnly(false);\n\n if (this._dynamicChildren[in_key] !== undefined) {\n if (this._dynamicChildren[in_key] instanceof BaseProperty) {\n this._dynamicChildren[in_key]._setParent(undefined);\n }\n\n delete this._dynamicChildren[in_key];\n\n // make sure this is not present in the insert list!\n if (this._pendingChanges.insert[in_key]) {\n delete this._pendingChanges.insert[in_key];\n } else {\n this._pendingChanges.remove[in_key] = true;\n\n // Also remove modifies, if any are present\n delete this._pendingChanges.modify[in_key];\n }\n\n // also update the list of dirty changes\n if (this._dirtyChanges.insert[in_key]) {\n delete this._dirtyChanges.insert[in_key];\n } else {\n this._dirtyChanges.remove[in_key] = true;\n\n // Also remove modifies, if any are present\n delete this._dirtyChanges.modify[in_key];\n }\n\n this._setDirty(in_reportToView);\n } else {\n throw new Error(MSG.REMOVED_NON_EXISTING_ENTRY + in_key);\n }\n };\n\n /**\n * Serialize the property\n *\n * @param {boolean} in_dirtyOnly -\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 serialized = AbstractStaticCollectionProperty.prototype._serialize.call(this, in_dirtyOnly, in_includeRootTypeid,\n in_dirtinessType, in_includeReferencedRepositories);\n\n var that = this;\n\n // Helper function to decide whether to include a typeid or not in the ChangeSet\n var addEntryInChangeSet = function (in_changes, in_typeid, in_key, in_value) {\n // Determine where to insert the key. If necessary, an entry for the type is added.\n if (that._containsPrimitiveTypes) {\n in_changes[in_key] = that._serializeValue(in_value);\n } else {\n in_changes[in_typeid] = in_changes[in_typeid] || {};\n in_changes[in_typeid][in_key] = in_value;\n }\n };\n\n var changes = in_dirtinessType === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE ?\n this._pendingChanges : this._dirtyChanges;\n var insert = {};\n var modify = {};\n // we only remove entries when computing the delta\n var remove = in_dirtyOnly ? _.keys(changes.remove) : [];\n\n // Iterate over all children (and not properties)\n var typeid;\n var entryKeys = in_dirtyOnly ?\n _.keys(changes.modify).concat(_.keys(changes.insert)) : // Only dirty keys\n _.keys(this._dynamicChildren); // All keys\n for (var i = 0; i < entryKeys.length; i++) {\n var key = entryKeys[i];\n var entry = this._dynamicChildren[key];\n typeid = this._containsPrimitiveTypes ? this.getFullTypeid(false) : entry.getFullTypeid(false);\n if (in_dirtyOnly) {\n\n if (changes.insert[key]) {\n // If the key was inserted in this ChangeSet include it into the inserted list\n if (this._containsPrimitiveTypes) {\n addEntryInChangeSet(insert, typeid, key, entry);\n } else {\n addEntryInChangeSet(insert, typeid, key, entry._serialize(false, false,\n undefined, in_includeReferencedRepositories));\n }\n } else {\n // Check whether this is a modified entry and serialize changes when needed\n if (this._containsPrimitiveTypes) {\n if (changes.modify[key]) {\n addEntryInChangeSet(modify, typeid, key, entry);\n }\n } else {\n if (entry._isDirty(in_dirtinessType)) {\n var serializedChild = entry._serialize(in_dirtyOnly, false,\n in_dirtinessType, in_includeReferencedRepositories);\n if (!ChangeSet.isEmptyChangeSet(serializedChild)) {\n addEntryInChangeSet(modify, typeid, key, serializedChild);\n }\n }\n }\n }\n } else {\n // If we serialize everything, all entries are inserted\n if (this._containsPrimitiveTypes) {\n insert[key] = this._serializeValue(entry);\n } else {\n insert[typeid] = insert[typeid] || {};\n insert[typeid][key] = entry._serialize(in_dirtyOnly, false, undefined, in_includeReferencedRepositories);\n }\n }\n }\n\n // Serialize the changes\n if (!_.isEmpty(insert)) {\n serialized.insert = insert;\n }\n\n if (!_.isEmpty(remove)) {\n serialized.remove = remove;\n }\n\n if (!_.isEmpty(modify)) {\n serialized.modify = modify;\n }\n\n return serialized;\n };\n\n /**\n * Function to deserialize special primitive types.\n * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n * special treatment on deserialization. For supported types, we can just return the input here.\n *\n * @param {property-properties.SerializedChangeSet} in_serializedObj - The object to be deserialized\n * @return {*} the deserialized value\n */\n _deserializeValue(in_serializedObj) {\n return in_serializedObj;\n };\n\n /**\n * Function to serialize special primitive types.\n * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n * special treatment on serialization. For supported types, we can just return the input here.\n *\n * @param {*} in_obj - The object to be serialized\n * @return {property-properties.SerializedChangeSet} the serialized object\n */\n _serializeValue(in_obj) {\n ConsoleUtils.assert(this._containsPrimitiveTypes, MSG.ASSERTION_FAILED +\n 'Function IndexedCollectionBaseProperty._serializeValue() called on non-primitive collection');\n return in_obj;\n };\n\n /**\n * @inheritdoc\n */\n // eslint-disable-next-line complexity\n _deserialize(in_serializedObj, in_reportToView,\n in_filteringOptions, in_createChangeSet) {\n\n var currentEntries = this._dynamicChildren;\n var allInsertedKeys = {};\n\n var appliedChangeset = AbstractStaticCollectionProperty.prototype._deserialize.call(\n this, in_serializedObj, false, in_filteringOptions, in_createChangeSet);\n\n // Perform updates to the children\n\n // We make copies on two levels, since those are modified by the calls below\n var insertedEntries = _.mapValues(in_serializedObj.insert, function (x) { return _.clone(x); }) || {};\n var removedEntries = {};\n var modifiedEntries = {};\n\n // Get a list of all keys that will be inserted\n if (this._containsPrimitiveTypes) {\n var dataKeys = _.keys(insertedEntries);\n for (var iData = 0; iData < dataKeys.length; iData++) {\n var key = dataKeys[iData];\n allInsertedKeys[key] = true;\n }\n } else {\n var classKeys = _.keys(insertedEntries);\n for (var iClass = 0; iClass < classKeys.length; iClass++) {\n var typeid = classKeys[iClass];\n var dataKeys = _.keys(insertedEntries[typeid]);\n for (var iData = 0; iData < dataKeys.length; iData++) {\n var key = dataKeys[iData];\n allInsertedKeys[key] = true;\n }\n }\n }\n\n // Intersect the list of current keys, with the list of keys that will\n // NOT be inserted. Then insert the difference in the remove list so that\n // no objects are left dangling\n var keys = _.keys(currentEntries);\n for (var i = 0; i < keys.length; i++) {\n if (!allInsertedKeys[keys[i]]) {\n removedEntries[keys[i]] = true;\n }\n }\n\n // Remap adds to modify if the items are already in the document.\n // We want to make sure we reuse the current document state as much as possible\n // and simply change the bits that need to be changed. In many cases the\n // document will already contain the items but they need to be modified to\n // match the state described in_changeSet.\n if (this._containsPrimitiveTypes) {\n var addedKeys = Object.keys(insertedEntries);\n for (i = 0; i < addedKeys.length; i++) {\n if (currentEntries[addedKeys[i]] !== undefined) {\n modifiedEntries[addedKeys[i]] = insertedEntries[addedKeys[i]];\n delete insertedEntries[addedKeys[i]];\n }\n }\n } else {\n classKeys = _.keys(insertedEntries);\n for (iClass = 0; iClass < classKeys.length; iClass++) {\n typeid = classKeys[iClass];\n var addedKeys = Object.keys(insertedEntries[typeid]);\n for (i = 0; i < addedKeys.length; i++) {\n if (currentEntries[addedKeys[i]] !== undefined) {\n modifiedEntries[typeid] = modifiedEntries[typeid] || {};\n modifiedEntries[typeid][addedKeys[i]] = insertedEntries[typeid][addedKeys[i]];\n delete insertedEntries[typeid][addedKeys[i]];\n }\n }\n\n // Remove add entries, when they are empty\n if (_.isEmpty(insertedEntries[typeid])) {\n delete insertedEntries[typeid];\n }\n }\n }\n\n // Begin by removing what needs to be removed.\n keys = Object.keys(removedEntries);\n for (i = 0; i < keys.length; i++) {\n this._removeByKey(keys[i], false);\n }\n\n // Now get the portion of the children that must be added\n // this is a straightforward deserialize.\n if (this._containsPrimitiveTypes) {\n keys = _.keys(insertedEntries);\n for (i = 0; i < keys.length; i++) {\n this._insert(keys[i], this._deserializeValue(insertedEntries[keys[i]]), false);\n }\n } else {\n var scope = this._getScope();\n var newPsets = deserialize(insertedEntries, scope);\n keys = _.keys(newPsets);\n for (i = 0; i < keys.length; i++) {\n this._insert(keys[i], newPsets[keys[i]], false);\n }\n }\n\n\n // If no typeids are included, we just use a placeholder for the iteration below\n var classKeys = this._containsPrimitiveTypes ? [undefined] : _.keys(modifiedEntries);\n\n // Finally modify the existing properties\n var mapWasChangedByModify = false;\n for (iClass = 0; iClass < classKeys.length; iClass++) {\n typeid = classKeys[iClass];\n var modifiedKeys = Object.keys(this._containsPrimitiveTypes ? modifiedEntries : modifiedEntries[typeid]);\n for (i = 0; i < modifiedKeys.length; i++) {\n var changes;\n var valueWasChanged = false;\n var modifiedEntriesMap;\n if (this._containsPrimitiveTypes) {\n changes = modifiedEntries[modifiedKeys[i]];\n // Determine if value has changed\n if (this._typeid === 'Int64' || this._typeid === 'Uint64') {\n // For (u)int64, we will compare (Ui/I)nt64 objects with arrays [low, high]\n valueWasChanged = this._dynamicChildren[modifiedKeys[i]].getValueLow() !== changes[0] ||\n this._dynamicChildren[modifiedKeys[i]].getValueHigh() !== changes[1];\n } else {\n valueWasChanged = this._dynamicChildren[modifiedKeys[i]] !== changes;\n }\n modifiedEntriesMap = modifiedEntries;\n if (valueWasChanged) {\n this._dynamicChildren[modifiedKeys[i]] = this._deserializeValue(changes);\n // After modifying an entry, we have to update the flags\n // If there is a pending insert, we don't need to mark this as\n // a modify, as it will just change the insert. Otherwise, this\n // has to be reported as modify\n if (!this._pendingChanges.insert[modifiedKeys[i]]) {\n this._pendingChanges.modify[modifiedKeys[i]] = true;\n mapWasChangedByModify = true;\n }\n if (!this._dirtyChanges.insert[modifiedKeys[i]]) {\n this._dirtyChanges.modify[modifiedKeys[i]] = true;\n mapWasChangedByModify = true;\n }\n }\n } else {\n changes = this._dynamicChildren[modifiedKeys[i]]._deserialize(\n modifiedEntries[typeid][modifiedKeys[i]],\n false, in_filteringOptions, in_createChangeSet);\n valueWasChanged = !ChangeSet.isEmptyChangeSet(changes);\n\n modifiedEntries[typeid] = modifiedEntries[typeid] || {};\n modifiedEntriesMap = modifiedEntries[typeid];\n }\n\n if (valueWasChanged) {\n modifiedEntriesMap[modifiedKeys[i]] = changes;\n } else {\n delete modifiedEntriesMap[modifiedKeys[i]];\n }\n }\n\n if (!this._containsPrimitiveTypes && _.isEmpty(modifiedEntries[typeid])) {\n delete modifiedEntries[typeid];\n }\n }\n\n // Create a ChangeSet with the actually applied changes\n if (!_.isEmpty(insertedEntries)) {\n appliedChangeset.insert = _.clone(insertedEntries);\n }\n\n if (!_.isEmpty(removedEntries)) {\n appliedChangeset.remove = _.keys(removedEntries);\n }\n\n if (!_.isEmpty(modifiedEntries)) {\n appliedChangeset.modify = modifiedEntries;\n }\n\n // If working with primitive types, we have to update the dirty flag, when one of the entries\n // was changed\n if (mapWasChangedByModify) {\n this._setDirty(false);\n }\n\n // Finally report the dirtiness to the view (we postponed this above)\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n\n return appliedChangeset;\n };\n\n /**\n * @inheritdoc\n */\n _applyChangeset(in_changeSet, in_reportToView) {\n BaseProperty.prototype._applyChangeset.call(this, in_changeSet, false);\n\n // Remove existing entries\n // (we remove before we add, so that a remove+add operation in effect becomes a replace)\n if (in_changeSet.remove) {\n if (_.isArray(in_changeSet.remove)) {\n for (var i = 0; i < in_changeSet.remove.length; i++) {\n var key = in_changeSet.remove[i];\n this._removeByKey(key, false);\n }\n } else {\n // handle remove is an object case:\n if (!this._containsPrimitiveTypes) {\n var types = Object.keys(in_changeSet.remove);\n for (var i = 0; i < types.length; i++) {\n var keys = Object.keys(in_changeSet.remove[types[i]]);\n for (var j = 0; j < keys.length; j++) {\n this._removeByKey(keys[j], false);\n }\n }\n } else {\n var keys = Object.keys(in_changeSet.remove);\n for (var j = 0; j < keys.length; j++) {\n this._removeByKey(keys[j], false);\n }\n }\n }\n }\n\n // Insert entries (we just have to deserialize and insert them)\n if (in_changeSet.insert) {\n var newPsets;\n if (this._containsPrimitiveTypes) {\n newPsets = in_changeSet.insert;\n } else {\n var scope = this._getScope();\n newPsets = deserialize(in_changeSet.insert, scope);\n }\n var keys = Object.keys(newPsets);\n for (var i = 0; i < keys.length; i++) {\n if (!this._dynamicChildren[keys[i]]) {\n this._insert(keys[i], newPsets[keys[i]], false);\n } else {\n throw new Error(MSG.INSERTED_EXISTING_ENTRY + keys[i]);\n }\n }\n }\n\n // Modify entries\n var mapWasChangedByModify = false;\n if (in_changeSet.modify) {\n var classKeys = this._containsPrimitiveTypes ? [undefined] : _.keys(in_changeSet.modify);\n for (var iClass = 0; iClass < classKeys.length; iClass++) {\n var modifiedEntries = this._containsPrimitiveTypes ?\n in_changeSet.modify :\n in_changeSet.modify[classKeys[iClass]];\n var keys = Object.keys(modifiedEntries);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (this._dynamicChildren[key] !== undefined) {\n if (this._containsPrimitiveTypes) {\n var modifiedEntry = modifiedEntries[key];\n if (typeof modifiedEntry === 'object') {\n modifiedEntry = modifiedEntry.value;\n }\n this._dynamicChildren[key] = modifiedEntry;\n\n // After modifying an entry, we have to update the flags\n // If there is a pending insert, we don't need to mark this as\n // a modify, as it will just change the insert. Otherwise, this\n // has to be reported as modify\n if (!this._pendingChanges.insert[key]) {\n this._pendingChanges.modify[key] = true;\n mapWasChangedByModify = true;\n }\n if (!this._dirtyChanges.insert[key]) {\n this._dirtyChanges.modify[key] = true;\n mapWasChangedByModify = true;\n }\n\n } else {\n this._dynamicChildren[key]._applyChangeset(modifiedEntries[key], false);\n }\n } else {\n throw new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n }\n }\n }\n }\n\n // If working with primitive types, we have to update the dirty flag, when one of the entries\n // was changed\n if (mapWasChangedByModify) {\n this._setDirty(false);\n }\n\n // Finally report the dirtiness to the view (we postponed this above)\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n };\n\n /**\n * @inheritdoc\n */\n _reapplyDirtyFlags(in_pendingChangeSet, in_dirtyChangeSet) {\n BaseProperty.prototype._reapplyDirtyFlags.call(this, in_pendingChangeSet, in_dirtyChangeSet);\n\n var i, j, types, keys, key;\n\n // Remove existing entries\n // (we remove before we add, so that a remove+add operation in effect becomes a replace)\n if (in_pendingChangeSet.remove) {\n if (_.isArray(in_pendingChangeSet.remove)) {\n for (i = 0; i < in_pendingChangeSet.remove.length; i++) {\n key = in_pendingChangeSet.remove[i];\n this._pendingChanges.remove[key] = true;\n }\n } else {\n // handle remove is an object case:\n types = Object.keys(in_pendingChangeSet.remove);\n for (i = 0; i < types.length; i++) {\n keys = Object.keys(in_pendingChangeSet.remove[types[i]]);\n for (j = 0; j < keys.length; j++) {\n this._pendingChanges.remove[keys[j]] = true;\n }\n }\n }\n }\n\n // Inserted entries\n if (in_pendingChangeSet.insert) {\n types = Object.keys(in_pendingChangeSet.insert);\n for (i = 0; i < types.length; i++) {\n keys = Object.keys(in_pendingChangeSet.insert[types[i]]);\n for (j = 0; j < keys.length; j++) {\n key = keys[j];\n if (this._dynamicChildren[key] !== undefined) {\n this._pendingChanges.insert[key] = true;\n } else {\n throw new Error(`${MSG.CANT_DIRTY_MISSING_PROPERTY}${key}`);\n }\n }\n }\n }\n\n // Modify entries\n if (in_pendingChangeSet.modify) {\n var classKeys = _.keys(in_pendingChangeSet.modify);\n for (var iClass = 0; iClass < classKeys.length; iClass++) {\n var modifiedPendingEntries = in_pendingChangeSet.modify && in_pendingChangeSet.modify[classKeys[iClass]] || {};\n var modifiedDirtyEntries = in_dirtyChangeSet.modify && in_dirtyChangeSet.modify[classKeys[iClass]] || {};\n keys = Object.keys(modifiedPendingEntries).concat(Object.keys(modifiedDirtyEntries));\n for (i = 0; i < keys.length; i++) {\n key = keys[i];\n if (this._dynamicChildren[key] !== undefined) {\n this._dynamicChildren[key]._reapplyDirtyFlags(modifiedPendingEntries[key], modifiedDirtyEntries[key]);\n } else {\n throw new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n }\n }\n }\n }\n };\n\n /**\n * @inheritdoc\n */\n _setDirty(in_reportToView, in_callingChild) {\n // Mark the child as modified\n if (in_callingChild && !this._containsPrimitiveTypes) {\n var key = in_callingChild.getId();\n if (this._dynamicChildren[key]) {\n\n if (!this._pendingChanges.insert[key]) {\n this._pendingChanges.modify[key] = true;\n }\n if (!this._dirtyChanges.insert[key]) {\n this._dirtyChanges.modify[key] = true;\n }\n }\n }\n\n // Forward dirtiness propagation to base class\n BaseProperty.prototype._setDirty.call(this, in_reportToView, in_callingChild);\n };\n}\n/** Specifies, whether this is a collection of base types or of registered templates */\nIndexedCollectionBaseProperty.prototype._containsPrimitiveTypes = false;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"intProperties.d.ts","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":"AAsBA;IACI;;;;;;;;OAQG;IACH,wBAIC;IACD,kBAAkC;CACrC;AAGD;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAKC;IACD,kBAAmC;CAEtC;AAED;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAKC;IACD,kBAAmC;CACtC;AACD;;GAEG;AACH;IACI;;;;;;;;;OASG;IACH,wBAKC;IAHG,qBAAsC;IAkC1C;;OAEG;IACH,gBAFY,MAAM,CAIjB;IAED;;OAEG;IACH,eAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,sBAJW,MAAM,OAchB;IAED;;;;OAIG;IACH,oBAJW,MAAM,OAchB;IA8DD;;;;;;OAMG;IACH,oBAJW,MAAM,GAEL,MAAM,CAIjB;IAED;;;;;;;;;;OAUG;IACH,sBARW,MAAM,aACN,MAAM,QAahB;CAEJ;AAED;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAED,8DAAmC;CACtC;AAED;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAED,8DAAoC;CACvC"}
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,wBAKC;IAGL,kBAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAKC;IAGL,kBAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;;;OASG;IACH,wBAKC;IAHG,qBAAsC;IAkC1C;;OAEG;IACH,gBAFY,MAAM,CAIjB;IAED;;OAEG;IACH,eAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,sBAJW,MAAM,OAchB;IAED;;;;OAIG;IACH,oBAJW,MAAM,OAchB;IA8DD;;;;;;OAMG;IACH,oBAJW,MAAM,GAEL,MAAM,CAIjB;IAED;;;;;;;;;;OAUG;IACH,sBARW,MAAM,aACN,MAAM,QAahB;CAEJ;AAED;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAqC;CAFpC"}
@@ -26,14 +26,15 @@ class Int8Property extends ValueProperty {
26
26
  * @category Value Properties
27
27
  */
28
28
  constructor(in_params) {
29
- super(Object.assign(Object.assign({}, in_params), { typeid: 'Int8' }));
30
- this._castFunctor = _castFunctors.Int8;
29
+ super(in_params);
31
30
  // default for this property type is '0'
32
31
  this._data = 0;
33
32
  }
34
33
  ;
35
34
  }
36
35
  exports.Int8Property = Int8Property;
36
+ Int8Property.prototype._typeid = 'Int8';
37
+ Int8Property.prototype._castFunctor = _castFunctors.Int8;
37
38
  /**
38
39
  * A primitive property for an signed 16 bit integer value.
39
40
  */
@@ -47,14 +48,15 @@ class Int16Property extends ValueProperty {
47
48
  * @category Value Properties
48
49
  */
49
50
  constructor(in_params) {
50
- super(Object.assign(Object.assign({}, in_params), { typeid: 'Int16' }));
51
- this._castFunctor = _castFunctors.Int16;
51
+ super(in_params);
52
52
  // default for this property type is '0'
53
53
  this._data = 0;
54
54
  }
55
55
  ;
56
56
  }
57
57
  exports.Int16Property = Int16Property;
58
+ Int16Property.prototype._typeid = 'Int16';
59
+ Int16Property.prototype._castFunctor = _castFunctors.Int16;
58
60
  /**
59
61
  * A primitive property for an signed 32 bit integer value.
60
62
  */
@@ -68,14 +70,15 @@ class Int32Property extends ValueProperty {
68
70
  * @category Value Properties
69
71
  */
70
72
  constructor(in_params) {
71
- super(Object.assign({ typeid: 'Int32' }, in_params));
72
- this._castFunctor = _castFunctors.Int32;
73
+ super(in_params);
73
74
  // default for this property type is '0'
74
75
  this._data = 0;
75
76
  }
76
77
  ;
77
78
  }
78
79
  exports.Int32Property = Int32Property;
80
+ Int32Property.prototype._typeid = 'Int32';
81
+ Int32Property.prototype._castFunctor = _castFunctors.Int32;
79
82
  /**
80
83
  * A primitive property base class for big integer values.
81
84
  */
@@ -270,12 +273,13 @@ class Int64Property extends Integer64Property {
270
273
  * @category Value Properties
271
274
  */
272
275
  constructor(in_params) {
273
- super(Object.assign(Object.assign({}, in_params), { typeid: 'Int64' }), Int64);
274
- this._castFunctor = _castFunctors.Int64;
276
+ super(in_params, Int64);
275
277
  }
276
278
  ;
277
279
  }
278
280
  exports.Int64Property = Int64Property;
281
+ Int64Property.prototype._typeid = 'Int64';
282
+ Int64Property.prototype._castFunctor = _castFunctors.Int64;
279
283
  /**
280
284
  * A primitive property class for big unsingned integer values.
281
285
  */
@@ -289,11 +293,12 @@ class Uint64Property extends Integer64Property {
289
293
  * @category Value Properties
290
294
  */
291
295
  constructor(in_params) {
292
- super(Object.assign(Object.assign({}, in_params), { typeid: 'Uint64' }), Uint64);
293
- this._castFunctor = _castFunctors.Uint64;
296
+ super(in_params, Uint64);
294
297
  }
295
298
  ;
296
299
  }
297
300
  exports.Uint64Property = Uint64Property;
298
301
  ;
302
+ Uint64Property.prototype._typeid = 'Uint64';
303
+ Uint64Property.prototype._castFunctor = _castFunctors.Uint64;
299
304
  //# sourceMappingURL=intProperties.js.map