@fluid-experimental/property-properties 2.74.0 → 2.81.0-374083

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.
@@ -1 +1 @@
1
- {"version":3,"file":"valueMapProperty.js","sourceRoot":"","sources":["../../src/properties/valueMapProperty.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACzE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE5B,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC/D,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAEjF,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AACjD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D;;;GAGG;AACH,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAChD;;;;;;;;OAQG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,CAAC,CAAC;IAClB,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,EAAE,QAAQ;QACtB,IAAI,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC7E,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IAED;;;;;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AAO,eAAgB,SAAQ,gBAAgB;IACpD;;;;;;;;OAQG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,CAAC,CAAC;IAClB,CAAC;CACD;AACD,eAAe,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC;AAC3C,eAAe,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview Definition of the valuemap property class\n */\n\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst { Int64, Uint64 } = require(\"@fluid-experimental/property-common\");\nconst _ = require(\"lodash\");\n\nconst { validationsEnabled } = require(\"../enableValidations\");\nconst { Int64Property, Uint64Property } = require(\"../properties/intProperties\");\n\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { MapProperty } = require(\"./mapProperty\");\nconst { _castFunctors } = require(\"./primitiveTypeCasts\");\n\n/**\n * A ValueMapProperty is a collection class that can contain an dictionary that maps from strings to primitive types.\n * @internal\n */\nexport class ValueMapProperty extends MapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.MapProperty\n\t * @alias property-properties.ValueMapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Inserts a value into the map. Using insert with a key that already exists will throw an error.\n\t *\n\t * @param {string} in_key - The key under which the entry is added\n\t * @param {*} in_value - The primitive type value to set\n\t * @throws if a value already exists for in_key\n\t */\n\tinsert(in_key, in_value) {\n\t\tvar castedValue = this._castFunctor ? this._castFunctor(in_value) : in_value;\n\t\tthis._insert(in_key, castedValue, true);\n\t}\n\n\t/**\n\t * Returns an object with all the nested values contained in this property.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * 'firstString': 'test1',\n\t * 'secondString': 'test2'\n\t * }\n\t * ```\n\t */\n\tgetValues() {\n\t\tvar ids = this.getIds();\n\t\tvar result = {};\n\t\tfor (var i = 0; i < ids.length; i++) {\n\t\t\tresult[ids[i]] = this.get(ids[i]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Return a JSON representation of the map and its items.\n\t * @return {object} A JSON representation of the map and its items.\n\t * @protected\n\t */\n\t_toJson() {\n\t\treturn {\n\t\t\tid: this.getId(),\n\t\t\tcontext: this._context,\n\t\t\ttypeid: this.getTypeid(),\n\t\t\tisConstant: this._isConstant,\n\t\t\tvalue: this.getValues(),\n\t\t};\n\t}\n\n\t/**\n\t * Repeatedly calls back the given function with human-readable string\n\t * representations of the property's sub-properties.\n\t * @param {string} indent - Leading spaces to create the tree representation\n\t * @param {function} printFct - Function to call for printing each property\n\t */\n\t_prettyPrintChildren(indent, printFct) {\n\t\tindent += \" \";\n\t\tvar prefix = \"\";\n\t\tvar suffix = \"\";\n\t\tif (this.getTypeid() === \"String\") {\n\t\t\tprefix = '\"';\n\t\t\tsuffix = '\"';\n\t\t}\n\t\t_.mapValues(this._dynamicChildren, function (val, key) {\n\t\t\tprintFct(indent + key + \": \" + prefix + val + suffix);\n\t\t});\n\t}\n\n\t/**\n\t * Sets the value of a property into the map.\n\t *\n\t * @param {string} in_key - The key under which the entry is set\n\t * @param {*} in_value - The value to be set\n\t */\n\tset(in_key, in_value) {\n\t\tif (validationsEnabled.enabled) {\n\t\t\tthis._checkIsNotReadOnly(true);\n\t\t}\n\t\tvar castedValue = this._castFunctor ? this._castFunctor(in_value) : in_value;\n\t\tif (this._dynamicChildren[in_key] !== castedValue) {\n\t\t\tif (validationsEnabled.enabled) {\n\t\t\t\tthis._checkIsNotReadOnly(true);\n\t\t\t}\n\t\t\tif (this._dynamicChildren[in_key] !== undefined) {\n\t\t\t\tthis._removeByKey(in_key, false);\n\t\t\t}\n\t\t\tthis._insert(in_key, castedValue, false);\n\t\t\t// Make one final report\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t_getValue(in_key) {\n\t\treturn this._dynamicChildren[in_key];\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_reapplyDirtyFlags(in_pendingChangeSet, in_dirtyChangeSet) {\n\t\tBaseProperty.prototype._reapplyDirtyFlags.call(\n\t\t\tthis,\n\t\t\tin_pendingChangeSet,\n\t\t\tin_dirtyChangeSet,\n\t\t);\n\n\t\tvar i, j, keys, key;\n\n\t\t// Remove existing entries\n\t\t// (we remove before we add, so that a remove+add operation in effect becomes a replace)\n\t\tif (in_pendingChangeSet.remove) {\n\t\t\tif (_.isArray(in_pendingChangeSet.remove)) {\n\t\t\t\tfor (i = 0; i < in_pendingChangeSet.remove.length; i++) {\n\t\t\t\t\tkey = in_pendingChangeSet.remove[i];\n\t\t\t\t\tthis._pendingChanges.remove[key] = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// handle remove is an object case:\n\t\t\t\tkeys = Object.keys(in_pendingChangeSet.remove);\n\t\t\t\tfor (j = 0; j < keys.length; j++) {\n\t\t\t\t\tthis._pendingChanges.remove[keys[j]] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Inserted entries\n\t\tif (in_pendingChangeSet.insert) {\n\t\t\tkeys = Object.keys(in_pendingChangeSet.insert);\n\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\tif (this._dynamicChildren[keys[i]] !== undefined) {\n\t\t\t\t\tthis._pendingChanges.insert[keys[i]] = true;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(`${MSG.CANT_DIRTY_MISSING_PROPERTY}${keys[i]}`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Modify entries\n\t\tif (in_pendingChangeSet.modify) {\n\t\t\tvar modifiedPendingEntries = in_pendingChangeSet ? in_pendingChangeSet.modify || {} : {};\n\t\t\tvar modifiedDirtyEntries = in_dirtyChangeSet ? in_dirtyChangeSet.modify || {} : {};\n\t\t\tkeys = Object.keys(modifiedPendingEntries).concat(Object.keys(modifiedDirtyEntries));\n\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\tkey = keys[i];\n\t\t\t\tif (this._dynamicChildren[key] !== undefined) {\n\t\t\t\t\tif (modifiedPendingEntries[key]) {\n\t\t\t\t\t\tif (!this._pendingChanges.insert[key]) {\n\t\t\t\t\t\t\tthis._pendingChanges.modify[key] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (modifiedDirtyEntries[key]) {\n\t\t\t\t\t\tif (!this._dirtyChanges.insert[key]) {\n\t\t\t\t\t\t\tthis._dirtyChanges.modify[key] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If working with primitive types, we have to update the dirty flag, when one of the entries\n\t\t// was changed\n\t\tthis._setDirty(false);\n\t}\n}\n// The value map contains primitive types\nValueMapProperty.prototype._containsPrimitiveTypes = true;\n\n/**\n * A ValueMapProperty which stores Float32 values\n */\nexport class Float32MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Float32MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nFloat32MapProperty.prototype._typeid = \"Float32\";\nFloat32MapProperty.prototype._castFunctor = _castFunctors.Float32;\n\n/**\n * A ValueMapProperty which stores Float64 values\n */\nexport class Float64MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Float64MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nFloat64MapProperty.prototype._typeid = \"Float64\";\nFloat64MapProperty.prototype._castFunctor = _castFunctors.Float64;\n\n/**\n * A ValueMapProperty which stores Uint32 values\n */\nexport class Uint32MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Uint32MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nUint32MapProperty.prototype._typeid = \"Uint32\";\nUint32MapProperty.prototype._castFunctor = _castFunctors.Uint32;\n\n/**\n * A ValueMapProperty which stores Uint16 values\n */\nexport class Uint16MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Uint16MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nUint16MapProperty.prototype._typeid = \"Uint16\";\nUint16MapProperty.prototype._castFunctor = _castFunctors.Uint16;\n\n/**\n * A ValueMapProperty which stores Uint8 values\n */\nexport class Uint8MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Uint8MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nUint8MapProperty.prototype._typeid = \"Uint8\";\nUint8MapProperty.prototype._castFunctor = _castFunctors.Uint8;\n\n/**\n * A ValueMapProperty which stores Int32 values\n */\nexport class Int32MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Int32MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nInt32MapProperty.prototype._typeid = \"Int32\";\nInt32MapProperty.prototype._castFunctor = _castFunctors.Int32;\n\n/**\n * An abstract base class for 64 bit integer map properties\n */\nexport class Integer64MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Integer64MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Sets the entry with the given key to the value passed in\n\t *\n\t * Note: this will overwrite an already existing value\n\t *\n\t * @param {string} in_key - The key under which the entry is stored\n\t * @param {Int64|Uint64|string|number} in_value - The value or property to store in the map\n\t */\n\tset(in_key, in_value) {\n\t\tvar castedValue = this._castFunctor ? this._castFunctor(in_value) : in_value;\n\t\tvar myValue = this._dynamicChildren[in_key];\n\t\tif (myValue === undefined) {\n\t\t\tthis._insert(in_key, castedValue, true);\n\t\t} else if (\n\t\t\tmyValue.getValueHigh() !== castedValue.getValueHigh() ||\n\t\t\tmyValue.getValueLow() !== castedValue.getValueLow()\n\t\t) {\n\t\t\tthis._removeByKey(in_key, false);\n\t\t\tthis._insert(in_key, castedValue, false);\n\t\t\t// Make one final report\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Function to serialize special primitive types.\n\t * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n\t * special treatment on serialization. For supported types, we can just return the input here.\n\t *\n\t * @param {*} in_obj - The object to be serialized\n\t * @return {property-properties.SerializedChangeSet} the serialized object\n\t */\n\t_serializeValue(in_obj) {\n\t\treturn [in_obj.getValueLow(), in_obj.getValueHigh()];\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_prettyPrintChildren(indent, printFct) {\n\t\tindent += \" \";\n\t\tvar int64Prop;\n\t\t_.mapValues(this._dynamicChildren, function (val, key) {\n\t\t\t// TODO: The 'toString()' function is defined on Integer64Property, so we need to create\n\t\t\t// such object to use it. It would be better to have it in Utils Integer64.prototype.toString\n\t\t\tint64Prop = val instanceof Int64 ? new Int64Property({}) : new Uint64Property({});\n\t\t\tint64Prop.setValueLow(val.getValueLow());\n\t\t\tint64Prop.setValueHigh(val.getValueHigh());\n\t\t\tprintFct(indent + key + \": \" + int64Prop);\n\t\t});\n\t}\n}\n\n/**\n * A ValueMapProperty which stores Int64 Properties\n */\nexport class Int64MapProperty extends Integer64MapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends Integer64MapProperty\n\t * @alias property-properties.Int64MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Specialized function to deserialize Int64 primitive types.\n\t * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n\t * special treatment on deserialization. For supported types, we can just return the input here.\n\t *\n\t * @param {property-properties.SerializedChangeSet} in_serializedObj - The object to be deserialized\n\t * @return {Int64} the deserialized value\n\t */\n\t_deserializeValue(in_serializedObj) {\n\t\treturn new Int64(in_serializedObj[0], in_serializedObj[1]);\n\t}\n}\nInt64MapProperty.prototype._typeid = \"Int64\";\nInt64MapProperty.prototype._castFunctor = _castFunctors.Int64;\n\n/**\n * A ValueMapProperty which stores Uint64 Properties\n */\nexport class Uint64MapProperty extends Integer64MapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends Integer64MapProperty\n\t * @alias property-properties.Uint64MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Specialized function to deserialize Uint64 primitive types.\n\t * Some primitive types (e.g. Uint64, which is not natively supported by javascript) require\n\t * special treatment on deserialization. For supported types, we can just return the input here.\n\t *\n\t * @param {property-properties.SerializedChangeSet} in_serializedObj - The object to be deserialized\n\t * @return {Uint64} the deserialized value\n\t */\n\t_deserializeValue(in_serializedObj) {\n\t\treturn new Uint64(in_serializedObj[0], in_serializedObj[1]);\n\t}\n}\nUint64MapProperty.prototype._typeid = \"Uint64\";\nUint64MapProperty.prototype._castFunctor = _castFunctors.Uint64;\n\n/**\n * A ValueMapProperty which stores Int16 values\n */\nexport class Int16MapProperty extends ValueMapProperty {\n\t/** @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Int16MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nInt16MapProperty.prototype._typeid = \"Int16\";\nInt16MapProperty.prototype._castFunctor = _castFunctors.Int16;\n\n/**\n * A ValueMapProperty which stores Int8 values\n */\nexport class Int8MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Int8MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nInt8MapProperty.prototype._typeid = \"Int8\";\nInt8MapProperty.prototype._castFunctor = _castFunctors.Int8;\n\n/**\n * A ValueMapProperty which stores string values\n */\nexport class StringMapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.StringMapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nStringMapProperty.prototype._typeid = \"String\";\nStringMapProperty.prototype._castFunctor = _castFunctors.String;\n\n/**\n * A ValueMapProperty which stores boolean values\n */\nexport class BoolMapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.BoolMapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nBoolMapProperty.prototype._typeid = \"Bool\";\nBoolMapProperty.prototype._castFunctor = _castFunctors.Boolean;\n"]}
1
+ {"version":3,"file":"valueMapProperty.js","sourceRoot":"","sources":["../../src/properties/valueMapProperty.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACzE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE5B,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC/D,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAEjF,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AACjD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D;;;GAGG;AACH,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAChD;;;;;;;;OAQG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,CAAC,CAAC;IAClB,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,EAAE,QAAQ;QACtB,IAAI,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC7E,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;;;;;OA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gB,SAAQ,gBAAgB;IACpD;;;;;;;;OAQG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,CAAC,CAAC;IAClB,CAAC;CACD;AACD,eAAe,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC;AAC3C,eAAe,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview Definition of the valuemap property class\n */\n\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst { Int64, Uint64 } = require(\"@fluid-experimental/property-common\");\nconst _ = require(\"lodash\");\n\nconst { validationsEnabled } = require(\"../enableValidations\");\nconst { Int64Property, Uint64Property } = require(\"../properties/intProperties\");\n\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { MapProperty } = require(\"./mapProperty\");\nconst { _castFunctors } = require(\"./primitiveTypeCasts\");\n\n/**\n * A ValueMapProperty is a collection class that can contain an dictionary that maps from strings to primitive types.\n * @internal\n */\nexport class ValueMapProperty extends MapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.MapProperty\n\t * @alias property-properties.ValueMapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Inserts a value into the map. Using insert with a key that already exists will throw an error.\n\t *\n\t * @param {string} in_key - The key under which the entry is added\n\t * @param {*} in_value - The primitive type value to set\n\t * @throws if a value already exists for in_key\n\t */\n\tinsert(in_key, in_value) {\n\t\tvar castedValue = this._castFunctor ? this._castFunctor(in_value) : in_value;\n\t\tthis._insert(in_key, castedValue, true);\n\t}\n\n\t/**\n\t * Returns an object with all the nested values contained in this property.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * 'firstString': 'test1',\n\t * 'secondString': 'test2'\n\t * }\n\t * ```\n\t */\n\tgetValues() {\n\t\tvar ids = this.getIds();\n\t\tvar result = {};\n\t\tfor (var i = 0; i < ids.length; i++) {\n\t\t\tresult[ids[i]] = this.get(ids[i]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Return a JSON representation of the map and its items.\n\t * @return {object} A JSON representation of the map and its items.\n\t * @protected\n\t */\n\t_toJson() {\n\t\treturn {\n\t\t\tid: this.getId(),\n\t\t\tcontext: this._context,\n\t\t\ttypeid: this.getTypeid(),\n\t\t\tisConstant: this._isConstant,\n\t\t\tvalue: this.getValues(),\n\t\t};\n\t}\n\n\t/**\n\t * Repeatedly calls back the given function with human-readable string\n\t * representations of the property's sub-properties.\n\t * @param {string} indent - Leading spaces to create the tree representation\n\t * @param {function} printFct - Function to call for printing each property\n\t */\n\t_prettyPrintChildren(indent, printFct) {\n\t\tindent += \" \";\n\t\tvar prefix = \"\";\n\t\tvar suffix = \"\";\n\t\tif (this.getTypeid() === \"String\") {\n\t\t\tprefix = '\"';\n\t\t\tsuffix = '\"';\n\t\t}\n\t\t_.mapValues(this._dynamicChildren, function (val, key) {\n\t\t\tprintFct(indent + key + \": \" + prefix + val + suffix);\n\t\t});\n\t}\n\n\t/**\n\t * Sets the value of a property into the map.\n\t *\n\t * @param {string} in_key - The key under which the entry is set\n\t * @param {*} in_value - The value to be set\n\t */\n\tset(in_key, in_value) {\n\t\tif (validationsEnabled.enabled) {\n\t\t\tthis._checkIsNotReadOnly(true);\n\t\t}\n\t\tvar castedValue = this._castFunctor ? this._castFunctor(in_value) : in_value;\n\t\tif (this._dynamicChildren[in_key] !== castedValue) {\n\t\t\tif (validationsEnabled.enabled) {\n\t\t\t\tthis._checkIsNotReadOnly(true);\n\t\t\t}\n\t\t\tif (this._dynamicChildren[in_key] !== undefined) {\n\t\t\t\tthis._removeByKey(in_key, false);\n\t\t\t}\n\t\t\tthis._insert(in_key, castedValue, false);\n\t\t\t// Make one final report\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t_getValue(in_key) {\n\t\treturn this._dynamicChildren[in_key];\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_reapplyDirtyFlags(in_pendingChangeSet, in_dirtyChangeSet) {\n\t\tBaseProperty.prototype._reapplyDirtyFlags.call(\n\t\t\tthis,\n\t\t\tin_pendingChangeSet,\n\t\t\tin_dirtyChangeSet,\n\t\t);\n\n\t\tvar i, j, keys, key;\n\n\t\t// Remove existing entries\n\t\t// (we remove before we add, so that a remove+add operation in effect becomes a replace)\n\t\tif (in_pendingChangeSet.remove) {\n\t\t\tif (_.isArray(in_pendingChangeSet.remove)) {\n\t\t\t\tfor (i = 0; i < in_pendingChangeSet.remove.length; i++) {\n\t\t\t\t\tkey = in_pendingChangeSet.remove[i];\n\t\t\t\t\tthis._pendingChanges.remove[key] = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// handle remove is an object case:\n\t\t\t\tkeys = Object.keys(in_pendingChangeSet.remove);\n\t\t\t\tfor (j = 0; j < keys.length; j++) {\n\t\t\t\t\tthis._pendingChanges.remove[keys[j]] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Inserted entries\n\t\tif (in_pendingChangeSet.insert) {\n\t\t\tkeys = Object.keys(in_pendingChangeSet.insert);\n\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\tif (this._dynamicChildren[keys[i]] !== undefined) {\n\t\t\t\t\tthis._pendingChanges.insert[keys[i]] = true;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(`${MSG.CANT_DIRTY_MISSING_PROPERTY}${keys[i]}`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Modify entries\n\t\tif (in_pendingChangeSet.modify) {\n\t\t\tvar modifiedPendingEntries = in_pendingChangeSet ? in_pendingChangeSet.modify || {} : {};\n\t\t\tvar modifiedDirtyEntries = in_dirtyChangeSet ? in_dirtyChangeSet.modify || {} : {};\n\t\t\tkeys = Object.keys(modifiedPendingEntries).concat(Object.keys(modifiedDirtyEntries));\n\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\tkey = keys[i];\n\t\t\t\tif (this._dynamicChildren[key] !== undefined) {\n\t\t\t\t\tif (modifiedPendingEntries[key]) {\n\t\t\t\t\t\tif (!this._pendingChanges.insert[key]) {\n\t\t\t\t\t\t\tthis._pendingChanges.modify[key] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (modifiedDirtyEntries[key]) {\n\t\t\t\t\t\tif (!this._dirtyChanges.insert[key]) {\n\t\t\t\t\t\t\tthis._dirtyChanges.modify[key] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If working with primitive types, we have to update the dirty flag, when one of the entries\n\t\t// was changed\n\t\tthis._setDirty(false);\n\t}\n}\n// The value map contains primitive types\nValueMapProperty.prototype._containsPrimitiveTypes = true;\n\n/**\n * A ValueMapProperty which stores Float32 values\n */\nexport class Float32MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Float32MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nFloat32MapProperty.prototype._typeid = \"Float32\";\nFloat32MapProperty.prototype._castFunctor = _castFunctors.Float32;\n\n/**\n * A ValueMapProperty which stores Float64 values\n */\nexport class Float64MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Float64MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nFloat64MapProperty.prototype._typeid = \"Float64\";\nFloat64MapProperty.prototype._castFunctor = _castFunctors.Float64;\n\n/**\n * A ValueMapProperty which stores Uint32 values\n */\nexport class Uint32MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Uint32MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nUint32MapProperty.prototype._typeid = \"Uint32\";\nUint32MapProperty.prototype._castFunctor = _castFunctors.Uint32;\n\n/**\n * A ValueMapProperty which stores Uint16 values\n */\nexport class Uint16MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Uint16MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nUint16MapProperty.prototype._typeid = \"Uint16\";\nUint16MapProperty.prototype._castFunctor = _castFunctors.Uint16;\n\n/**\n * A ValueMapProperty which stores Uint8 values\n */\nexport class Uint8MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Uint8MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nUint8MapProperty.prototype._typeid = \"Uint8\";\nUint8MapProperty.prototype._castFunctor = _castFunctors.Uint8;\n\n/**\n * A ValueMapProperty which stores Int32 values\n */\nexport class Int32MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Int32MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nInt32MapProperty.prototype._typeid = \"Int32\";\nInt32MapProperty.prototype._castFunctor = _castFunctors.Int32;\n\n/**\n * An abstract base class for 64 bit integer map properties\n */\nexport class Integer64MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Integer64MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Sets the entry with the given key to the value passed in\n\t *\n\t * Note: this will overwrite an already existing value\n\t *\n\t * @param {string} in_key - The key under which the entry is stored\n\t * @param {Int64|Uint64|string|number} in_value - The value or property to store in the map\n\t */\n\tset(in_key, in_value) {\n\t\tvar castedValue = this._castFunctor ? this._castFunctor(in_value) : in_value;\n\t\tvar myValue = this._dynamicChildren[in_key];\n\t\tif (myValue === undefined) {\n\t\t\tthis._insert(in_key, castedValue, true);\n\t\t} else if (\n\t\t\tmyValue.getValueHigh() !== castedValue.getValueHigh() ||\n\t\t\tmyValue.getValueLow() !== castedValue.getValueLow()\n\t\t) {\n\t\t\tthis._removeByKey(in_key, false);\n\t\t\tthis._insert(in_key, castedValue, false);\n\t\t\t// Make one final report\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Function to serialize special primitive types.\n\t * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n\t * special treatment on serialization. For supported types, we can just return the input here.\n\t *\n\t * @param {*} in_obj - The object to be serialized\n\t * @return {property-properties.SerializedChangeSet} the serialized object\n\t */\n\t_serializeValue(in_obj) {\n\t\treturn [in_obj.getValueLow(), in_obj.getValueHigh()];\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_prettyPrintChildren(indent, printFct) {\n\t\tindent += \" \";\n\t\tvar int64Prop;\n\t\t_.mapValues(this._dynamicChildren, function (val, key) {\n\t\t\t// TODO: The 'toString()' function is defined on Integer64Property, so we need to create\n\t\t\t// such object to use it. It would be better to have it in Utils Integer64.prototype.toString\n\t\t\tint64Prop = val instanceof Int64 ? new Int64Property({}) : new Uint64Property({});\n\t\t\tint64Prop.setValueLow(val.getValueLow());\n\t\t\tint64Prop.setValueHigh(val.getValueHigh());\n\t\t\tprintFct(indent + key + \": \" + int64Prop);\n\t\t});\n\t}\n}\n\n/**\n * A ValueMapProperty which stores Int64 Properties\n */\nexport class Int64MapProperty extends Integer64MapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends Integer64MapProperty\n\t * @alias property-properties.Int64MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Specialized function to deserialize Int64 primitive types.\n\t * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n\t * special treatment on deserialization. For supported types, we can just return the input here.\n\t *\n\t * @param {property-properties.SerializedChangeSet} in_serializedObj - The object to be deserialized\n\t * @return {Int64} the deserialized value\n\t */\n\t_deserializeValue(in_serializedObj) {\n\t\treturn new Int64(in_serializedObj[0], in_serializedObj[1]);\n\t}\n}\nInt64MapProperty.prototype._typeid = \"Int64\";\nInt64MapProperty.prototype._castFunctor = _castFunctors.Int64;\n\n/**\n * A ValueMapProperty which stores Uint64 Properties\n */\nexport class Uint64MapProperty extends Integer64MapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends Integer64MapProperty\n\t * @alias property-properties.Uint64MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Specialized function to deserialize Uint64 primitive types.\n\t * Some primitive types (e.g. Uint64, which is not natively supported by javascript) require\n\t * special treatment on deserialization. For supported types, we can just return the input here.\n\t *\n\t * @param {property-properties.SerializedChangeSet} in_serializedObj - The object to be deserialized\n\t * @return {Uint64} the deserialized value\n\t */\n\t_deserializeValue(in_serializedObj) {\n\t\treturn new Uint64(in_serializedObj[0], in_serializedObj[1]);\n\t}\n}\nUint64MapProperty.prototype._typeid = \"Uint64\";\nUint64MapProperty.prototype._castFunctor = _castFunctors.Uint64;\n\n/**\n * A ValueMapProperty which stores Int16 values\n */\nexport class Int16MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Int16MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nInt16MapProperty.prototype._typeid = \"Int16\";\nInt16MapProperty.prototype._castFunctor = _castFunctors.Int16;\n\n/**\n * A ValueMapProperty which stores Int8 values\n */\nexport class Int8MapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.Int8MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nInt8MapProperty.prototype._typeid = \"Int8\";\nInt8MapProperty.prototype._castFunctor = _castFunctors.Int8;\n\n/**\n * A ValueMapProperty which stores string values\n */\nexport class StringMapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.StringMapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nStringMapProperty.prototype._typeid = \"String\";\nStringMapProperty.prototype._castFunctor = _castFunctors.String;\n\n/**\n * A ValueMapProperty which stores boolean values\n */\nexport class BoolMapProperty extends ValueMapProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueMapProperty\n\t * @alias property-properties.BoolMapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n}\nBoolMapProperty.prototype._typeid = \"Bool\";\nBoolMapProperty.prototype._castFunctor = _castFunctors.Boolean;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-experimental/property-properties",
3
- "version": "2.74.0",
3
+ "version": "2.81.0-374083",
4
4
  "description": "definitions of properties",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -41,9 +41,9 @@
41
41
  "temp-directory": "nyc/.nyc_output"
42
42
  },
43
43
  "dependencies": {
44
- "@fluid-experimental/property-changeset": "~2.74.0",
45
- "@fluid-experimental/property-common": "~2.74.0",
46
- "ajv": "^8.12.0",
44
+ "@fluid-experimental/property-changeset": "2.81.0-374083",
45
+ "@fluid-experimental/property-common": "2.81.0-374083",
46
+ "ajv": "^8.17.1",
47
47
  "async": "^3.2.2",
48
48
  "lodash": "^4.17.21",
49
49
  "semver": "^7.7.1",
@@ -52,21 +52,21 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "@biomejs/biome": "~1.9.3",
55
- "@fluid-internal/mocha-test-setup": "~2.74.0",
55
+ "@fluid-internal/mocha-test-setup": "2.81.0-374083",
56
56
  "@fluidframework/build-common": "^2.0.3",
57
- "@fluidframework/build-tools": "^0.61.0",
57
+ "@fluidframework/build-tools": "^0.63.0",
58
58
  "@types/mocha": "^10.0.10",
59
59
  "@types/node": "^18.19.0",
60
60
  "@types/sinon": "^17.0.3",
61
61
  "c8": "^10.1.3",
62
62
  "chai": "^4.2.0",
63
- "cross-env": "^7.0.3",
64
- "eslint": "~8.57.1",
63
+ "cross-env": "^10.1.0",
64
+ "eslint": "~9.39.1",
65
65
  "jiti": "^2.6.1",
66
66
  "mocha": "^10.8.2",
67
67
  "mocha-multi-reporters": "^1.5.1",
68
68
  "nock": "^13.3.3",
69
- "rimraf": "^4.4.0",
69
+ "rimraf": "^6.1.2",
70
70
  "sinon": "^18.0.1",
71
71
  "typescript": "~5.4.5"
72
72
  },