@fluid-experimental/property-properties 2.81.1 → 2.82.0

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 (30) hide show
  1. package/dist/properties/indexedCollectionBaseProperty.js +1 -1
  2. package/dist/properties/indexedCollectionBaseProperty.js.map +1 -1
  3. package/dist/properties/mapProperty.d.ts +4 -2
  4. package/dist/properties/mapProperty.d.ts.map +1 -1
  5. package/dist/properties/mapProperty.js +4 -2
  6. package/dist/properties/mapProperty.js.map +1 -1
  7. package/dist/properties/referenceMapProperty.d.ts +4 -2
  8. package/dist/properties/referenceMapProperty.d.ts.map +1 -1
  9. package/dist/properties/referenceMapProperty.js +4 -2
  10. package/dist/properties/referenceMapProperty.js.map +1 -1
  11. package/dist/properties/setProperty.d.ts +4 -2
  12. package/dist/properties/setProperty.d.ts.map +1 -1
  13. package/dist/properties/setProperty.js +4 -2
  14. package/dist/properties/setProperty.js.map +1 -1
  15. package/dist/test/tsconfig.tsbuildinfo +1 -1
  16. package/lib/properties/indexedCollectionBaseProperty.js +1 -1
  17. package/lib/properties/indexedCollectionBaseProperty.js.map +1 -1
  18. package/lib/properties/mapProperty.d.ts +4 -2
  19. package/lib/properties/mapProperty.d.ts.map +1 -1
  20. package/lib/properties/mapProperty.js +4 -2
  21. package/lib/properties/mapProperty.js.map +1 -1
  22. package/lib/properties/referenceMapProperty.d.ts +4 -2
  23. package/lib/properties/referenceMapProperty.d.ts.map +1 -1
  24. package/lib/properties/referenceMapProperty.js +4 -2
  25. package/lib/properties/referenceMapProperty.js.map +1 -1
  26. package/lib/properties/setProperty.d.ts +4 -2
  27. package/lib/properties/setProperty.d.ts.map +1 -1
  28. package/lib/properties/setProperty.js +4 -2
  29. package/lib/properties/setProperty.js.map +1 -1
  30. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"indexedCollectionBaseProperty.js","sourceRoot":"","sources":["../../src/properties/indexedCollectionBaseProperty.js"],"names":[],"mappings":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,sBAAsB,CAAC,GAAG,CAAC,EAC3B,oBAAoB,CAAC,GAAG,CAAC,CACzB,CAAC;oBACH,CAAC;yBAAM,CAAC;wBACP,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,yBAAyB,GAAG,GAAG,CAAC,CAAC;oBACtD,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;IACF,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,eAAe,EAAE,eAAe;QACzC,6BAA6B;QAC7B,IAAI,eAAe,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC;YACtD,IAAI,GAAG,GAAG,eAAe,CAAC,KAAK,EAAE,CAAC;YAClC,IAAI,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;gBAChC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;oBACvC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;gBACzC,CAAC;gBACD,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;oBACrC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;gBACvC,CAAC;YACF,CAAC;QACF,CAAC;QAED,8CAA8C;QAC9C,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;IAC/E,CAAC;CACD;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 */\n\nconst { ChangeSet } = require(\"@fluid-experimental/property-changeset\");\nconst { ConsoleUtils } = require(\"@fluid-experimental/property-common\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst _ = require(\"lodash\");\n\nconst { deserialize } = require(\"../containerSerializer\");\nconst { validationsEnabled } = require(\"../enableValidations\");\n\nconst { AbstractStaticCollectionProperty } = require(\"./abstractStaticCollectionProperty\");\nconst { BaseProperty } = require(\"./baseProperty\");\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\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t\t/** Stores the pending changes in the property (those that are part of the current ChangeSet) */\n\t\tthis._pendingChanges = {\n\t\t\tinsert: {},\n\t\t\tremove: {},\n\t\t\tmodify: {},\n\t\t};\n\n\t\t/** Stores the dirty changes in the property (those that have not yet been reported to the application) */\n\t\tthis._dirtyChanges = {\n\t\t\tinsert: {},\n\t\t\tremove: {},\n\t\t\tmodify: {},\n\t\t};\n\t}\n\n\t/**\n\t * Removes the dirtiness flag from this property\n\t *\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean\n\t * If none are supplied, all will be removed.\n\t * @private\n\t */\n\t_cleanDirty(in_flags) {\n\t\t// Invoke parent\n\t\tBaseProperty.prototype._cleanDirty.call(this, in_flags);\n\n\t\tif (\n\t\t\tin_flags === undefined ||\n\t\t\t(in_flags & BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE) !== 0\n\t\t) {\n\t\t\t// We additionally have to remove the log on the changes to our entries\n\t\t\tthis._pendingChanges.insert = {};\n\t\t\tthis._pendingChanges.remove = {};\n\t\t\tthis._pendingChanges.modify = {};\n\t\t}\n\n\t\tif (in_flags === undefined || (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) !== 0) {\n\t\t\t// We additionally have to remove the log on the changes to our entries\n\t\t\tthis._dirtyChanges.insert = {};\n\t\t\tthis._dirtyChanges.remove = {};\n\t\t\tthis._dirtyChanges.modify = {};\n\t\t}\n\t}\n\n\t/**\n\t * Removes the dirtiness flag from this property and recursively from all of its children\n\t *\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean.\n\t * If none are supplied, all will be removed.\n\t */\n\tcleanDirty(in_flags) {\n\t\tin_flags =\n\t\t\tin_flags !== undefined\n\t\t\t\t? in_flags\n\t\t\t\t: BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |\n\t\t\t\t\tBaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE;\n\n\t\t// Clean all entries inside of the collection\n\t\tlet cleanDirtiness = (collection) => {\n\t\t\tvar entry;\n\n\t\t\t// eslint-disable-next-line no-restricted-syntax\n\t\t\tfor (let key in collection) {\n\t\t\t\tentry = this._dynamicChildren[key];\n\t\t\t\tif (entry._isDirty(in_flags)) {\n\t\t\t\t\tentry.cleanDirty(in_flags);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tif (!this._containsPrimitiveTypes) {\n\t\t\tif (in_flags === BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) {\n\t\t\t\t// Only use the dirty entries\n\t\t\t\tcleanDirtiness(this._dirtyChanges.insert);\n\t\t\t\tcleanDirtiness(this._dirtyChanges.modify);\n\t\t\t} else if (in_flags === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE) {\n\t\t\t\t// Only use the pending changes\n\t\t\t\tcleanDirtiness(this._pendingChanges.insert);\n\t\t\t\tcleanDirtiness(this._pendingChanges.modify);\n\t\t\t} else {\n\t\t\t\tcleanDirtiness(this._pendingChanges.insert);\n\t\t\t\tcleanDirtiness(this._pendingChanges.modify);\n\t\t\t\tcleanDirtiness(this._dirtyChanges.insert);\n\t\t\t\tcleanDirtiness(this._dirtyChanges.modify);\n\t\t\t}\n\t\t}\n\n\t\t// Invoke parent\n\t\tBaseProperty.prototype.cleanDirty.call(this, in_flags);\n\n\t\t// after all entries have been cleaned, we mark this property as clean\n\t\tthis._cleanDirty(in_flags);\n\t}\n\n\t/**\n\t * Inserts a property into the collection\n\t *\n\t * @param {string} in_key - Key of the entry in the collection\n\t * @param {property-properties.IndexedCollectionBaseProperty~ValueType} in_value - The value to insert\n\t * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n\t * trigger a modified event there.\n\t * When batching updates, this can be prevented via this flag.\n\t */\n\t_insert(in_key, in_value, in_reportToView) {\n\t\tif (validationsEnabled.enabled) {\n\t\t\tthis._checkIsNotReadOnly(false);\n\t\t}\n\n\t\tif (!this.has(in_key)) {\n\t\t\t// Make sure, the property we are inserting is not already part of some other collection\n\t\t\tif (validationsEnabled.enabled && !this._containsPrimitiveTypes) {\n\t\t\t\tin_value._validateInsertIn(this);\n\t\t\t}\n\n\t\t\tthis._dynamicChildren[in_key] = in_value;\n\n\t\t\t// We have to make sure, both this node itself and the whole tree of the inserted\n\t\t\t// entry are marked as dirty to make sure, they get serialized\n\t\t\t// We don't yet report the dirtying to the view. This happens below.\n\t\t\tthis._setDirty(false);\n\n\t\t\tif (!this._containsPrimitiveTypes) {\n\t\t\t\t// Dirty the tree (TODO: is this needed?)\n\t\t\t\tin_value._setDirtyTree(false);\n\n\t\t\t\tin_value._setParent(this);\n\n\t\t\t\t// In the case of a template property, we always mark it as inserted\n\t\t\t\tthis._pendingChanges.insert[in_key] = true;\n\t\t\t\tthis._dirtyChanges.insert[in_key] = true;\n\t\t\t} else {\n\t\t\t\t// For primitive types we squash remove/insert combinations to modifies\n\t\t\t\tif (this._pendingChanges.remove[in_key] && !this._pendingChanges.insert[in_key]) {\n\t\t\t\t\tthis._pendingChanges.modify[in_key] = true;\n\t\t\t\t\tdelete this._pendingChanges.remove[in_key];\n\t\t\t\t} else {\n\t\t\t\t\tthis._pendingChanges.insert[in_key] = true;\n\t\t\t\t}\n\n\t\t\t\tif (this._dirtyChanges.remove[in_key] && !this._dirtyChanges.insert[in_key]) {\n\t\t\t\t\tthis._dirtyChanges.modify[in_key] = true;\n\t\t\t\t\tdelete this._dirtyChanges.remove[in_key];\n\t\t\t\t} else {\n\t\t\t\t\tthis._dirtyChanges.insert[in_key] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Now make one report\n\t\t\tif (in_reportToView) {\n\t\t\t\tthis._reportDirtinessToView();\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Error(MSG.PROPERTY_ALREADY_EXISTS + in_key);\n\t\t}\n\t}\n\n\t/**\n\t * Removes an entry with the given key\n\t *\n\t * @param {string} in_key - key of the entry\n\t * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n\t * trigger a modified event there.\n\t * When batching updates, this can be prevented via this flag.\n\t */\n\t_removeByKey(in_key, in_reportToView) {\n\t\tthis._checkIsNotReadOnly(false);\n\n\t\tif (this._dynamicChildren[in_key] !== undefined) {\n\t\t\tif (this._dynamicChildren[in_key] instanceof BaseProperty) {\n\t\t\t\tthis._dynamicChildren[in_key]._setParent(undefined);\n\t\t\t}\n\n\t\t\tdelete this._dynamicChildren[in_key];\n\n\t\t\t// make sure this is not present in the insert list!\n\t\t\tif (this._pendingChanges.insert[in_key]) {\n\t\t\t\tdelete this._pendingChanges.insert[in_key];\n\t\t\t} else {\n\t\t\t\tthis._pendingChanges.remove[in_key] = true;\n\n\t\t\t\t// Also remove modifies, if any are present\n\t\t\t\tdelete this._pendingChanges.modify[in_key];\n\t\t\t}\n\n\t\t\t// also update the list of dirty changes\n\t\t\tif (this._dirtyChanges.insert[in_key]) {\n\t\t\t\tdelete this._dirtyChanges.insert[in_key];\n\t\t\t} else {\n\t\t\t\tthis._dirtyChanges.remove[in_key] = true;\n\n\t\t\t\t// Also remove modifies, if any are present\n\t\t\t\tdelete this._dirtyChanges.modify[in_key];\n\t\t\t}\n\n\t\t\tthis._setDirty(in_reportToView);\n\t\t} else {\n\t\t\tthrow new Error(MSG.REMOVED_NON_EXISTING_ENTRY + in_key);\n\t\t}\n\t}\n\n\t/**\n\t * Serialize the property\n\t *\n\t * @param {boolean} in_dirtyOnly - Only include dirty entries in the serialization\n\t * @param {boolean} in_includeRootTypeid - Include the typeid of the root of the hierarchy\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] - The type of dirtiness to use\n\t * when reporting dirty changes. By default this is `PENDING_CHANGE`.\n\t * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n\t * function will descend into referenced repositories.\n\t * WARNING: if there are loops in the references this can result in an infinite loop.\n\t *\n\t * @return {Object} The serialized representation of this property\n\t * @private\n\t */\n\t_serialize(\n\t\tin_dirtyOnly,\n\t\tin_includeRootTypeid,\n\t\tin_dirtinessType,\n\t\tin_includeReferencedRepositories,\n\t) {\n\t\tvar serialized = AbstractStaticCollectionProperty.prototype._serialize.call(\n\t\t\tthis,\n\t\t\tin_dirtyOnly,\n\t\t\tin_includeRootTypeid,\n\t\t\tin_dirtinessType,\n\t\t\tin_includeReferencedRepositories,\n\t\t);\n\n\t\tvar that = this;\n\n\t\t// Helper function to decide whether to include a typeid or not in the ChangeSet\n\t\tvar addEntryInChangeSet = function (in_changes, in_typeid, in_key, in_value) {\n\t\t\t// Determine where to insert the key. If necessary, an entry for the type is added.\n\t\t\tif (that._containsPrimitiveTypes) {\n\t\t\t\tin_changes[in_key] = that._serializeValue(in_value);\n\t\t\t} else {\n\t\t\t\tin_changes[in_typeid] = in_changes[in_typeid] || {};\n\t\t\t\tin_changes[in_typeid][in_key] = in_value;\n\t\t\t}\n\t\t};\n\n\t\tvar changes =\n\t\t\tin_dirtinessType === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE\n\t\t\t\t? this._pendingChanges\n\t\t\t\t: this._dirtyChanges;\n\t\tvar insert = {};\n\t\tvar modify = {};\n\t\t// we only remove entries when computing the delta\n\t\tvar remove = in_dirtyOnly ? _.keys(changes.remove) : [];\n\n\t\t// Iterate over all children (and not properties)\n\t\tvar typeid;\n\t\tvar entryKeys = in_dirtyOnly\n\t\t\t? _.keys(changes.modify).concat(_.keys(changes.insert)) // Only dirty keys\n\t\t\t: _.keys(this._dynamicChildren); // All keys\n\t\tfor (var i = 0; i < entryKeys.length; i++) {\n\t\t\tvar key = entryKeys[i];\n\t\t\tvar entry = this._dynamicChildren[key];\n\t\t\ttypeid = this._containsPrimitiveTypes\n\t\t\t\t? this.getFullTypeid(false)\n\t\t\t\t: entry.getFullTypeid(false);\n\t\t\tif (in_dirtyOnly) {\n\t\t\t\tif (changes.insert[key]) {\n\t\t\t\t\t// If the key was inserted in this ChangeSet include it into the inserted list\n\t\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\t\taddEntryInChangeSet(insert, typeid, key, entry);\n\t\t\t\t\t} else {\n\t\t\t\t\t\taddEntryInChangeSet(\n\t\t\t\t\t\t\tinsert,\n\t\t\t\t\t\t\ttypeid,\n\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\tentry._serialize(false, false, undefined, in_includeReferencedRepositories),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Check whether this is a modified entry and serialize changes when needed\n\t\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\t\tif (changes.modify[key]) {\n\t\t\t\t\t\t\taddEntryInChangeSet(modify, typeid, key, entry);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (entry._isDirty(in_dirtinessType)) {\n\t\t\t\t\t\t\tvar serializedChild = entry._serialize(\n\t\t\t\t\t\t\t\tin_dirtyOnly,\n\t\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\t\tin_dirtinessType,\n\t\t\t\t\t\t\t\tin_includeReferencedRepositories,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (!ChangeSet.isEmptyChangeSet(serializedChild)) {\n\t\t\t\t\t\t\t\taddEntryInChangeSet(modify, typeid, key, serializedChild);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If we serialize everything, all entries are inserted\n\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\tinsert[key] = this._serializeValue(entry);\n\t\t\t\t} else {\n\t\t\t\t\tinsert[typeid] = insert[typeid] || {};\n\t\t\t\t\tinsert[typeid][key] = entry._serialize(\n\t\t\t\t\t\tin_dirtyOnly,\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\tin_includeReferencedRepositories,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Serialize the changes\n\t\tif (!_.isEmpty(insert)) {\n\t\t\tserialized.insert = insert;\n\t\t}\n\n\t\tif (!_.isEmpty(remove)) {\n\t\t\tserialized.remove = remove;\n\t\t}\n\n\t\tif (!_.isEmpty(modify)) {\n\t\t\tserialized.modify = modify;\n\t\t}\n\n\t\treturn serialized;\n\t}\n\n\t/**\n\t * Function to deserialize special 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 {*} the deserialized value\n\t */\n\t_deserializeValue(in_serializedObj) {\n\t\treturn in_serializedObj;\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\tConsoleUtils.assert(\n\t\t\tthis._containsPrimitiveTypes,\n\t\t\tMSG.ASSERTION_FAILED +\n\t\t\t\t\"Function IndexedCollectionBaseProperty._serializeValue() called on non-primitive collection\",\n\t\t);\n\t\treturn in_obj;\n\t}\n\n\t/**\n\t * @inheritdoc\n\t *\n\t * @param {Object} [in_filteringOptions = {}] - The filtering options to consider while deserializing the property.\n\t * @param {boolean} [in_createChangeSet = true] - Should a changeset be created for this deserialization?\n\t */\n\t_deserialize(in_serializedObj, in_reportToView, in_filteringOptions, in_createChangeSet) {\n\t\tvar currentEntries = this._dynamicChildren;\n\t\tvar allInsertedKeys = {};\n\n\t\tvar appliedChangeset = AbstractStaticCollectionProperty.prototype._deserialize.call(\n\t\t\tthis,\n\t\t\tin_serializedObj,\n\t\t\tfalse,\n\t\t\tin_filteringOptions,\n\t\t\tin_createChangeSet,\n\t\t);\n\n\t\t// Perform updates to the children\n\n\t\t// We make copies on two levels, since those are modified by the calls below\n\t\tvar insertedEntries =\n\t\t\t_.mapValues(in_serializedObj.insert, function (x) {\n\t\t\t\treturn _.clone(x);\n\t\t\t}) || {};\n\t\tvar removedEntries = {};\n\t\tvar modifiedEntries = {};\n\n\t\t// Get a list of all keys that will be inserted\n\t\tif (this._containsPrimitiveTypes) {\n\t\t\tvar dataKeys = _.keys(insertedEntries);\n\t\t\tfor (var iData = 0; iData < dataKeys.length; iData++) {\n\t\t\t\tvar key = dataKeys[iData];\n\t\t\t\tallInsertedKeys[key] = true;\n\t\t\t}\n\t\t} else {\n\t\t\tvar classKeys = _.keys(insertedEntries);\n\t\t\tfor (var iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\t\tvar typeid = classKeys[iClass];\n\t\t\t\tvar dataKeys = _.keys(insertedEntries[typeid]);\n\t\t\t\tfor (var iData = 0; iData < dataKeys.length; iData++) {\n\t\t\t\t\tvar key = dataKeys[iData];\n\t\t\t\t\tallInsertedKeys[key] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Intersect the list of current keys, with the list of keys that will\n\t\t// NOT be inserted. Then insert the difference in the remove list so that\n\t\t// no objects are left dangling\n\t\tvar keys = _.keys(currentEntries);\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tif (!allInsertedKeys[keys[i]]) {\n\t\t\t\tremovedEntries[keys[i]] = true;\n\t\t\t}\n\t\t}\n\n\t\t// Remap adds to modify if the items are already in the document.\n\t\t// We want to make sure we reuse the current document state as much as possible\n\t\t// and simply change the bits that need to be changed. In many cases the\n\t\t// document will already contain the items but they need to be modified to\n\t\t// match the state described in_changeSet.\n\t\tif (this._containsPrimitiveTypes) {\n\t\t\tvar addedKeys = Object.keys(insertedEntries);\n\t\t\tfor (i = 0; i < addedKeys.length; i++) {\n\t\t\t\tif (currentEntries[addedKeys[i]] !== undefined) {\n\t\t\t\t\tmodifiedEntries[addedKeys[i]] = insertedEntries[addedKeys[i]];\n\t\t\t\t\tdelete insertedEntries[addedKeys[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tclassKeys = _.keys(insertedEntries);\n\t\t\tfor (iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\t\ttypeid = classKeys[iClass];\n\t\t\t\tvar addedKeys = Object.keys(insertedEntries[typeid]);\n\t\t\t\tfor (i = 0; i < addedKeys.length; i++) {\n\t\t\t\t\tif (currentEntries[addedKeys[i]] !== undefined) {\n\t\t\t\t\t\tmodifiedEntries[typeid] = modifiedEntries[typeid] || {};\n\t\t\t\t\t\tmodifiedEntries[typeid][addedKeys[i]] = insertedEntries[typeid][addedKeys[i]];\n\t\t\t\t\t\tdelete insertedEntries[typeid][addedKeys[i]];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Remove add entries, when they are empty\n\t\t\t\tif (_.isEmpty(insertedEntries[typeid])) {\n\t\t\t\t\tdelete insertedEntries[typeid];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Begin by removing what needs to be removed.\n\t\tkeys = Object.keys(removedEntries);\n\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\tthis._removeByKey(keys[i], false);\n\t\t}\n\n\t\t// Now get the portion of the children that must be added\n\t\t// this is a straightforward deserialize.\n\t\tif (this._containsPrimitiveTypes) {\n\t\t\tkeys = _.keys(insertedEntries);\n\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\tthis._insert(keys[i], this._deserializeValue(insertedEntries[keys[i]]), false);\n\t\t\t}\n\t\t} else {\n\t\t\tvar scope = this._getScope();\n\t\t\tvar newPsets = deserialize(insertedEntries, scope);\n\t\t\tkeys = _.keys(newPsets);\n\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\tthis._insert(keys[i], newPsets[keys[i]], false);\n\t\t\t}\n\t\t}\n\n\t\t// If no typeids are included, we just use a placeholder for the iteration below\n\t\tvar classKeys = this._containsPrimitiveTypes ? [undefined] : _.keys(modifiedEntries);\n\n\t\t// Finally modify the existing properties\n\t\tvar mapWasChangedByModify = false;\n\t\tfor (iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\ttypeid = classKeys[iClass];\n\t\t\tvar modifiedKeys = Object.keys(\n\t\t\t\tthis._containsPrimitiveTypes ? modifiedEntries : modifiedEntries[typeid],\n\t\t\t);\n\t\t\tfor (i = 0; i < modifiedKeys.length; i++) {\n\t\t\t\tvar changes;\n\t\t\t\tvar valueWasChanged = false;\n\t\t\t\tvar modifiedEntriesMap;\n\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\tchanges = modifiedEntries[modifiedKeys[i]];\n\t\t\t\t\t// Determine if value has changed\n\t\t\t\t\tvalueWasChanged =\n\t\t\t\t\t\tthis._typeid === \"Int64\" || this._typeid === \"Uint64\"\n\t\t\t\t\t\t\t? // For (u)int64, we will compare (Ui/I)nt64 objects with arrays [low, high]\n\t\t\t\t\t\t\t\tthis._dynamicChildren[modifiedKeys[i]].getValueLow() !== changes[0] ||\n\t\t\t\t\t\t\t\tthis._dynamicChildren[modifiedKeys[i]].getValueHigh() !== changes[1]\n\t\t\t\t\t\t\t: this._dynamicChildren[modifiedKeys[i]] !== changes;\n\t\t\t\t\tmodifiedEntriesMap = modifiedEntries;\n\t\t\t\t\tif (valueWasChanged) {\n\t\t\t\t\t\tthis._dynamicChildren[modifiedKeys[i]] = this._deserializeValue(changes);\n\t\t\t\t\t\t// After modifying an entry, we have to update the flags\n\t\t\t\t\t\t// If there is a pending insert, we don't need to mark this as\n\t\t\t\t\t\t// a modify, as it will just change the insert. Otherwise, this\n\t\t\t\t\t\t// has to be reported as modify\n\t\t\t\t\t\tif (!this._pendingChanges.insert[modifiedKeys[i]]) {\n\t\t\t\t\t\t\tthis._pendingChanges.modify[modifiedKeys[i]] = true;\n\t\t\t\t\t\t\tmapWasChangedByModify = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!this._dirtyChanges.insert[modifiedKeys[i]]) {\n\t\t\t\t\t\t\tthis._dirtyChanges.modify[modifiedKeys[i]] = true;\n\t\t\t\t\t\t\tmapWasChangedByModify = 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\tchanges = this._dynamicChildren[modifiedKeys[i]]._deserialize(\n\t\t\t\t\t\tmodifiedEntries[typeid][modifiedKeys[i]],\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tin_filteringOptions,\n\t\t\t\t\t\tin_createChangeSet,\n\t\t\t\t\t);\n\t\t\t\t\tvalueWasChanged = !ChangeSet.isEmptyChangeSet(changes);\n\n\t\t\t\t\tmodifiedEntries[typeid] = modifiedEntries[typeid] || {};\n\t\t\t\t\tmodifiedEntriesMap = modifiedEntries[typeid];\n\t\t\t\t}\n\n\t\t\t\tif (valueWasChanged) {\n\t\t\t\t\tmodifiedEntriesMap[modifiedKeys[i]] = changes;\n\t\t\t\t} else {\n\t\t\t\t\tdelete modifiedEntriesMap[modifiedKeys[i]];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!this._containsPrimitiveTypes && _.isEmpty(modifiedEntries[typeid])) {\n\t\t\t\tdelete modifiedEntries[typeid];\n\t\t\t}\n\t\t}\n\n\t\t// Create a ChangeSet with the actually applied changes\n\t\tif (!_.isEmpty(insertedEntries)) {\n\t\t\tappliedChangeset.insert = _.clone(insertedEntries);\n\t\t}\n\n\t\tif (!_.isEmpty(removedEntries)) {\n\t\t\tappliedChangeset.remove = _.keys(removedEntries);\n\t\t}\n\n\t\tif (!_.isEmpty(modifiedEntries)) {\n\t\t\tappliedChangeset.modify = modifiedEntries;\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\tif (mapWasChangedByModify) {\n\t\t\tthis._setDirty(false);\n\t\t}\n\n\t\t// Finally report the dirtiness to the view (we postponed this above)\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\n\t\treturn appliedChangeset;\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_applyChangeset(in_changeSet, in_reportToView) {\n\t\tBaseProperty.prototype._applyChangeset.call(this, in_changeSet, false);\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_changeSet.remove) {\n\t\t\tif (_.isArray(in_changeSet.remove)) {\n\t\t\t\tfor (var i = 0; i < in_changeSet.remove.length; i++) {\n\t\t\t\t\tvar key = in_changeSet.remove[i];\n\t\t\t\t\tthis._removeByKey(key, false);\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\tif (!this._containsPrimitiveTypes) {\n\t\t\t\t\tvar types = Object.keys(in_changeSet.remove);\n\t\t\t\t\tfor (var i = 0; i < types.length; i++) {\n\t\t\t\t\t\tvar keys = Object.keys(in_changeSet.remove[types[i]]);\n\t\t\t\t\t\tfor (var j = 0; j < keys.length; j++) {\n\t\t\t\t\t\t\tthis._removeByKey(keys[j], false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar keys = Object.keys(in_changeSet.remove);\n\t\t\t\t\tfor (var j = 0; j < keys.length; j++) {\n\t\t\t\t\t\tthis._removeByKey(keys[j], false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Insert entries (we just have to deserialize and insert them)\n\t\tif (in_changeSet.insert) {\n\t\t\tvar newPsets;\n\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\tnewPsets = in_changeSet.insert;\n\t\t\t} else {\n\t\t\t\tvar scope = this._getScope();\n\t\t\t\tnewPsets = deserialize(in_changeSet.insert, scope);\n\t\t\t}\n\t\t\tvar keys = Object.keys(newPsets);\n\t\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\t\tif (!this._dynamicChildren[keys[i]]) {\n\t\t\t\t\tthis._insert(keys[i], newPsets[keys[i]], false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(MSG.INSERTED_EXISTING_ENTRY + keys[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Modify entries\n\t\tvar mapWasChangedByModify = false;\n\t\tif (in_changeSet.modify) {\n\t\t\tvar classKeys = this._containsPrimitiveTypes ? [undefined] : _.keys(in_changeSet.modify);\n\t\t\tfor (var iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\t\tvar modifiedEntries = this._containsPrimitiveTypes\n\t\t\t\t\t? in_changeSet.modify\n\t\t\t\t\t: in_changeSet.modify[classKeys[iClass]];\n\t\t\t\tvar keys = Object.keys(modifiedEntries);\n\t\t\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\t\t\tvar key = keys[i];\n\t\t\t\t\tif (this._dynamicChildren[key] !== undefined) {\n\t\t\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\t\t\tvar modifiedEntry = modifiedEntries[key];\n\t\t\t\t\t\t\tif (typeof modifiedEntry === \"object\") {\n\t\t\t\t\t\t\t\tmodifiedEntry = modifiedEntry.value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._dynamicChildren[key] = modifiedEntry;\n\n\t\t\t\t\t\t\t// After modifying an entry, we have to update the flags\n\t\t\t\t\t\t\t// If there is a pending insert, we don't need to mark this as\n\t\t\t\t\t\t\t// a modify, as it will just change the insert. Otherwise, this\n\t\t\t\t\t\t\t// has to be reported as modify\n\t\t\t\t\t\t\tif (!this._pendingChanges.insert[key]) {\n\t\t\t\t\t\t\t\tthis._pendingChanges.modify[key] = true;\n\t\t\t\t\t\t\t\tmapWasChangedByModify = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!this._dirtyChanges.insert[key]) {\n\t\t\t\t\t\t\t\tthis._dirtyChanges.modify[key] = true;\n\t\t\t\t\t\t\t\tmapWasChangedByModify = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis._dynamicChildren[key]._applyChangeset(modifiedEntries[key], false);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n\t\t\t\t\t}\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\tif (mapWasChangedByModify) {\n\t\t\tthis._setDirty(false);\n\t\t}\n\n\t\t// Finally report the dirtiness to the view (we postponed this above)\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\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, types, 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\ttypes = Object.keys(in_pendingChangeSet.remove);\n\t\t\t\tfor (i = 0; i < types.length; i++) {\n\t\t\t\t\tkeys = Object.keys(in_pendingChangeSet.remove[types[i]]);\n\t\t\t\t\tfor (j = 0; j < keys.length; j++) {\n\t\t\t\t\t\tthis._pendingChanges.remove[keys[j]] = true;\n\t\t\t\t\t}\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\ttypes = Object.keys(in_pendingChangeSet.insert);\n\t\t\tfor (i = 0; i < types.length; i++) {\n\t\t\t\tkeys = Object.keys(in_pendingChangeSet.insert[types[i]]);\n\t\t\t\tfor (j = 0; j < keys.length; j++) {\n\t\t\t\t\tkey = keys[j];\n\t\t\t\t\tif (this._dynamicChildren[key] !== undefined) {\n\t\t\t\t\t\tthis._pendingChanges.insert[key] = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(`${MSG.CANT_DIRTY_MISSING_PROPERTY}${key}`);\n\t\t\t\t\t}\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 classKeys = _.keys(in_pendingChangeSet.modify);\n\t\t\tfor (var iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\t\tvar modifiedPendingEntries =\n\t\t\t\t\t(in_pendingChangeSet.modify && in_pendingChangeSet.modify[classKeys[iClass]]) || {};\n\t\t\t\tvar modifiedDirtyEntries =\n\t\t\t\t\t(in_dirtyChangeSet.modify && in_dirtyChangeSet.modify[classKeys[iClass]]) || {};\n\t\t\t\tkeys = Object.keys(modifiedPendingEntries).concat(Object.keys(modifiedDirtyEntries));\n\t\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\t\tkey = keys[i];\n\t\t\t\t\tif (this._dynamicChildren[key] !== undefined) {\n\t\t\t\t\t\tthis._dynamicChildren[key]._reapplyDirtyFlags(\n\t\t\t\t\t\t\tmodifiedPendingEntries[key],\n\t\t\t\t\t\t\tmodifiedDirtyEntries[key],\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_setDirty(in_reportToView, in_callingChild) {\n\t\t// Mark the child as modified\n\t\tif (in_callingChild && !this._containsPrimitiveTypes) {\n\t\t\tvar key = in_callingChild.getId();\n\t\t\tif (this._dynamicChildren[key]) {\n\t\t\t\tif (!this._pendingChanges.insert[key]) {\n\t\t\t\t\tthis._pendingChanges.modify[key] = true;\n\t\t\t\t}\n\t\t\t\tif (!this._dirtyChanges.insert[key]) {\n\t\t\t\t\tthis._dirtyChanges.modify[key] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Forward dirtiness propagation to base class\n\t\tBaseProperty.prototype._setDirty.call(this, in_reportToView, in_callingChild);\n\t}\n}\n/** Specifies, whether this is a collection of base types or of registered templates */\nIndexedCollectionBaseProperty.prototype._containsPrimitiveTypes = false;\n"]}
1
+ {"version":3,"file":"indexedCollectionBaseProperty.js","sourceRoot":"","sources":["../../src/properties/indexedCollectionBaseProperty.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,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,CAAC,GAAG,OAAO,C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ACzC,6BAA6B;QAC7B,IAAI,eAAe,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC;YACtD,IAAI,GAAG,GAAG,eAAe,CAAC,KAAK,EAAE,CAAC;YAClC,IAAI,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;gBAChC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;oBACvC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;gBACzC,CAAC;gBACD,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;oBACrC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;gBACvC,CAAC;YACF,CAAC;QACF,CAAC;QAED,8CAA8C;QAC9C,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;IAC/E,CAAC;CACD;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 */\n\nconst { ChangeSet } = require(\"@fluid-experimental/property-changeset\");\nconst { ConsoleUtils } = require(\"@fluid-experimental/property-common\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst _ = require(\"lodash\");\n\nconst { deserialize } = require(\"../containerSerializer\");\nconst { validationsEnabled } = require(\"../enableValidations\");\n\nconst { AbstractStaticCollectionProperty } = require(\"./abstractStaticCollectionProperty\");\nconst { BaseProperty } = require(\"./baseProperty\");\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\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t\t/** Stores the pending changes in the property (those that are part of the current ChangeSet) */\n\t\tthis._pendingChanges = {\n\t\t\tinsert: {},\n\t\t\tremove: {},\n\t\t\tmodify: {},\n\t\t};\n\n\t\t/** Stores the dirty changes in the property (those that have not yet been reported to the application) */\n\t\tthis._dirtyChanges = {\n\t\t\tinsert: {},\n\t\t\tremove: {},\n\t\t\tmodify: {},\n\t\t};\n\t}\n\n\t/**\n\t * Removes the dirtiness flag from this property\n\t *\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean\n\t * If none are supplied, all will be removed.\n\t * @private\n\t */\n\t_cleanDirty(in_flags) {\n\t\t// Invoke parent\n\t\tBaseProperty.prototype._cleanDirty.call(this, in_flags);\n\n\t\tif (\n\t\t\tin_flags === undefined ||\n\t\t\t(in_flags & BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE) !== 0\n\t\t) {\n\t\t\t// We additionally have to remove the log on the changes to our entries\n\t\t\tthis._pendingChanges.insert = {};\n\t\t\tthis._pendingChanges.remove = {};\n\t\t\tthis._pendingChanges.modify = {};\n\t\t}\n\n\t\tif (in_flags === undefined || (in_flags & BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) !== 0) {\n\t\t\t// We additionally have to remove the log on the changes to our entries\n\t\t\tthis._dirtyChanges.insert = {};\n\t\t\tthis._dirtyChanges.remove = {};\n\t\t\tthis._dirtyChanges.modify = {};\n\t\t}\n\t}\n\n\t/**\n\t * Removes the dirtiness flag from this property and recursively from all of its children\n\t *\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean.\n\t * If none are supplied, all will be removed.\n\t */\n\tcleanDirty(in_flags) {\n\t\tin_flags =\n\t\t\tin_flags !== undefined\n\t\t\t\t? in_flags\n\t\t\t\t: BaseProperty.MODIFIED_STATE_FLAGS.DIRTY |\n\t\t\t\t\tBaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE;\n\n\t\t// Clean all entries inside of the collection\n\t\tlet cleanDirtiness = (collection) => {\n\t\t\tvar entry;\n\n\t\t\t// eslint-disable-next-line no-restricted-syntax\n\t\t\tfor (let key in collection) {\n\t\t\t\tentry = this._dynamicChildren[key];\n\t\t\t\tif (entry._isDirty(in_flags)) {\n\t\t\t\t\tentry.cleanDirty(in_flags);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tif (!this._containsPrimitiveTypes) {\n\t\t\tif (in_flags === BaseProperty.MODIFIED_STATE_FLAGS.DIRTY) {\n\t\t\t\t// Only use the dirty entries\n\t\t\t\tcleanDirtiness(this._dirtyChanges.insert);\n\t\t\t\tcleanDirtiness(this._dirtyChanges.modify);\n\t\t\t} else if (in_flags === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE) {\n\t\t\t\t// Only use the pending changes\n\t\t\t\tcleanDirtiness(this._pendingChanges.insert);\n\t\t\t\tcleanDirtiness(this._pendingChanges.modify);\n\t\t\t} else {\n\t\t\t\tcleanDirtiness(this._pendingChanges.insert);\n\t\t\t\tcleanDirtiness(this._pendingChanges.modify);\n\t\t\t\tcleanDirtiness(this._dirtyChanges.insert);\n\t\t\t\tcleanDirtiness(this._dirtyChanges.modify);\n\t\t\t}\n\t\t}\n\n\t\t// Invoke parent\n\t\tBaseProperty.prototype.cleanDirty.call(this, in_flags);\n\n\t\t// after all entries have been cleaned, we mark this property as clean\n\t\tthis._cleanDirty(in_flags);\n\t}\n\n\t/**\n\t * Inserts a property into the collection\n\t *\n\t * @param {string} in_key - Key of the entry in the collection\n\t * @param {property-properties.IndexedCollectionBaseProperty~ValueType} in_value - The value to insert\n\t * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n\t * trigger a modified event there.\n\t * When batching updates, this can be prevented via this flag.\n\t */\n\t_insert(in_key, in_value, in_reportToView) {\n\t\tif (validationsEnabled.enabled) {\n\t\t\tthis._checkIsNotReadOnly(false);\n\t\t}\n\n\t\tif (!this.has(in_key)) {\n\t\t\t// Make sure, the property we are inserting is not already part of some other collection\n\t\t\tif (validationsEnabled.enabled && !this._containsPrimitiveTypes) {\n\t\t\t\tin_value._validateInsertIn(this);\n\t\t\t}\n\n\t\t\tthis._dynamicChildren[in_key] = in_value;\n\n\t\t\t// We have to make sure, both this node itself and the whole tree of the inserted\n\t\t\t// entry are marked as dirty to make sure, they get serialized\n\t\t\t// We don't yet report the dirtying to the view. This happens below.\n\t\t\tthis._setDirty(false);\n\n\t\t\tif (!this._containsPrimitiveTypes) {\n\t\t\t\t// Dirty the tree (TODO: is this needed?)\n\t\t\t\tin_value._setDirtyTree(false);\n\n\t\t\t\tin_value._setParent(this);\n\n\t\t\t\t// In the case of a template property, we always mark it as inserted\n\t\t\t\tthis._pendingChanges.insert[in_key] = true;\n\t\t\t\tthis._dirtyChanges.insert[in_key] = true;\n\t\t\t} else {\n\t\t\t\t// For primitive types we squash remove/insert combinations to modifies\n\t\t\t\tif (this._pendingChanges.remove[in_key] && !this._pendingChanges.insert[in_key]) {\n\t\t\t\t\tthis._pendingChanges.modify[in_key] = true;\n\t\t\t\t\tdelete this._pendingChanges.remove[in_key];\n\t\t\t\t} else {\n\t\t\t\t\tthis._pendingChanges.insert[in_key] = true;\n\t\t\t\t}\n\n\t\t\t\tif (this._dirtyChanges.remove[in_key] && !this._dirtyChanges.insert[in_key]) {\n\t\t\t\t\tthis._dirtyChanges.modify[in_key] = true;\n\t\t\t\t\tdelete this._dirtyChanges.remove[in_key];\n\t\t\t\t} else {\n\t\t\t\t\tthis._dirtyChanges.insert[in_key] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Now make one report\n\t\t\tif (in_reportToView) {\n\t\t\t\tthis._reportDirtinessToView();\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Error(MSG.PROPERTY_ALREADY_EXISTS + in_key);\n\t\t}\n\t}\n\n\t/**\n\t * Removes an entry with the given key\n\t *\n\t * @param {string} in_key - key of the entry\n\t * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n\t * trigger a modified event there.\n\t * When batching updates, this can be prevented via this flag.\n\t */\n\t_removeByKey(in_key, in_reportToView) {\n\t\tthis._checkIsNotReadOnly(false);\n\n\t\tif (this._dynamicChildren[in_key] !== undefined) {\n\t\t\tif (this._dynamicChildren[in_key] instanceof BaseProperty) {\n\t\t\t\tthis._dynamicChildren[in_key]._setParent(undefined);\n\t\t\t}\n\n\t\t\tdelete this._dynamicChildren[in_key];\n\n\t\t\t// make sure this is not present in the insert list!\n\t\t\tif (this._pendingChanges.insert[in_key]) {\n\t\t\t\tdelete this._pendingChanges.insert[in_key];\n\t\t\t} else {\n\t\t\t\tthis._pendingChanges.remove[in_key] = true;\n\n\t\t\t\t// Also remove modifies, if any are present\n\t\t\t\tdelete this._pendingChanges.modify[in_key];\n\t\t\t}\n\n\t\t\t// also update the list of dirty changes\n\t\t\tif (this._dirtyChanges.insert[in_key]) {\n\t\t\t\tdelete this._dirtyChanges.insert[in_key];\n\t\t\t} else {\n\t\t\t\tthis._dirtyChanges.remove[in_key] = true;\n\n\t\t\t\t// Also remove modifies, if any are present\n\t\t\t\tdelete this._dirtyChanges.modify[in_key];\n\t\t\t}\n\n\t\t\tthis._setDirty(in_reportToView);\n\t\t} else {\n\t\t\tconsole.warn(MSG.REMOVED_NON_EXISTING_ENTRY + in_key);\n\t\t}\n\t}\n\n\t/**\n\t * Serialize the property\n\t *\n\t * @param {boolean} in_dirtyOnly - Only include dirty entries in the serialization\n\t * @param {boolean} in_includeRootTypeid - Include the typeid of the root of the hierarchy\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] - The type of dirtiness to use\n\t * when reporting dirty changes. By default this is `PENDING_CHANGE`.\n\t * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n\t * function will descend into referenced repositories.\n\t * WARNING: if there are loops in the references this can result in an infinite loop.\n\t *\n\t * @return {Object} The serialized representation of this property\n\t * @private\n\t */\n\t_serialize(\n\t\tin_dirtyOnly,\n\t\tin_includeRootTypeid,\n\t\tin_dirtinessType,\n\t\tin_includeReferencedRepositories,\n\t) {\n\t\tvar serialized = AbstractStaticCollectionProperty.prototype._serialize.call(\n\t\t\tthis,\n\t\t\tin_dirtyOnly,\n\t\t\tin_includeRootTypeid,\n\t\t\tin_dirtinessType,\n\t\t\tin_includeReferencedRepositories,\n\t\t);\n\n\t\tvar that = this;\n\n\t\t// Helper function to decide whether to include a typeid or not in the ChangeSet\n\t\tvar addEntryInChangeSet = function (in_changes, in_typeid, in_key, in_value) {\n\t\t\t// Determine where to insert the key. If necessary, an entry for the type is added.\n\t\t\tif (that._containsPrimitiveTypes) {\n\t\t\t\tin_changes[in_key] = that._serializeValue(in_value);\n\t\t\t} else {\n\t\t\t\tin_changes[in_typeid] = in_changes[in_typeid] || {};\n\t\t\t\tin_changes[in_typeid][in_key] = in_value;\n\t\t\t}\n\t\t};\n\n\t\tvar changes =\n\t\t\tin_dirtinessType === BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE\n\t\t\t\t? this._pendingChanges\n\t\t\t\t: this._dirtyChanges;\n\t\tvar insert = {};\n\t\tvar modify = {};\n\t\t// we only remove entries when computing the delta\n\t\tvar remove = in_dirtyOnly ? _.keys(changes.remove) : [];\n\n\t\t// Iterate over all children (and not properties)\n\t\tvar typeid;\n\t\tvar entryKeys = in_dirtyOnly\n\t\t\t? _.keys(changes.modify).concat(_.keys(changes.insert)) // Only dirty keys\n\t\t\t: _.keys(this._dynamicChildren); // All keys\n\t\tfor (var i = 0; i < entryKeys.length; i++) {\n\t\t\tvar key = entryKeys[i];\n\t\t\tvar entry = this._dynamicChildren[key];\n\t\t\ttypeid = this._containsPrimitiveTypes\n\t\t\t\t? this.getFullTypeid(false)\n\t\t\t\t: entry.getFullTypeid(false);\n\t\t\tif (in_dirtyOnly) {\n\t\t\t\tif (changes.insert[key]) {\n\t\t\t\t\t// If the key was inserted in this ChangeSet include it into the inserted list\n\t\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\t\taddEntryInChangeSet(insert, typeid, key, entry);\n\t\t\t\t\t} else {\n\t\t\t\t\t\taddEntryInChangeSet(\n\t\t\t\t\t\t\tinsert,\n\t\t\t\t\t\t\ttypeid,\n\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\tentry._serialize(false, false, undefined, in_includeReferencedRepositories),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Check whether this is a modified entry and serialize changes when needed\n\t\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\t\tif (changes.modify[key]) {\n\t\t\t\t\t\t\taddEntryInChangeSet(modify, typeid, key, entry);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (entry._isDirty(in_dirtinessType)) {\n\t\t\t\t\t\t\tvar serializedChild = entry._serialize(\n\t\t\t\t\t\t\t\tin_dirtyOnly,\n\t\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\t\tin_dirtinessType,\n\t\t\t\t\t\t\t\tin_includeReferencedRepositories,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (!ChangeSet.isEmptyChangeSet(serializedChild)) {\n\t\t\t\t\t\t\t\taddEntryInChangeSet(modify, typeid, key, serializedChild);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If we serialize everything, all entries are inserted\n\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\tinsert[key] = this._serializeValue(entry);\n\t\t\t\t} else {\n\t\t\t\t\tinsert[typeid] = insert[typeid] || {};\n\t\t\t\t\tinsert[typeid][key] = entry._serialize(\n\t\t\t\t\t\tin_dirtyOnly,\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\tin_includeReferencedRepositories,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Serialize the changes\n\t\tif (!_.isEmpty(insert)) {\n\t\t\tserialized.insert = insert;\n\t\t}\n\n\t\tif (!_.isEmpty(remove)) {\n\t\t\tserialized.remove = remove;\n\t\t}\n\n\t\tif (!_.isEmpty(modify)) {\n\t\t\tserialized.modify = modify;\n\t\t}\n\n\t\treturn serialized;\n\t}\n\n\t/**\n\t * Function to deserialize special 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 {*} the deserialized value\n\t */\n\t_deserializeValue(in_serializedObj) {\n\t\treturn in_serializedObj;\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\tConsoleUtils.assert(\n\t\t\tthis._containsPrimitiveTypes,\n\t\t\tMSG.ASSERTION_FAILED +\n\t\t\t\t\"Function IndexedCollectionBaseProperty._serializeValue() called on non-primitive collection\",\n\t\t);\n\t\treturn in_obj;\n\t}\n\n\t/**\n\t * @inheritdoc\n\t *\n\t * @param {Object} [in_filteringOptions = {}] - The filtering options to consider while deserializing the property.\n\t * @param {boolean} [in_createChangeSet = true] - Should a changeset be created for this deserialization?\n\t */\n\t_deserialize(in_serializedObj, in_reportToView, in_filteringOptions, in_createChangeSet) {\n\t\tvar currentEntries = this._dynamicChildren;\n\t\tvar allInsertedKeys = {};\n\n\t\tvar appliedChangeset = AbstractStaticCollectionProperty.prototype._deserialize.call(\n\t\t\tthis,\n\t\t\tin_serializedObj,\n\t\t\tfalse,\n\t\t\tin_filteringOptions,\n\t\t\tin_createChangeSet,\n\t\t);\n\n\t\t// Perform updates to the children\n\n\t\t// We make copies on two levels, since those are modified by the calls below\n\t\tvar insertedEntries =\n\t\t\t_.mapValues(in_serializedObj.insert, function (x) {\n\t\t\t\treturn _.clone(x);\n\t\t\t}) || {};\n\t\tvar removedEntries = {};\n\t\tvar modifiedEntries = {};\n\n\t\t// Get a list of all keys that will be inserted\n\t\tif (this._containsPrimitiveTypes) {\n\t\t\tvar dataKeys = _.keys(insertedEntries);\n\t\t\tfor (var iData = 0; iData < dataKeys.length; iData++) {\n\t\t\t\tvar key = dataKeys[iData];\n\t\t\t\tallInsertedKeys[key] = true;\n\t\t\t}\n\t\t} else {\n\t\t\tvar classKeys = _.keys(insertedEntries);\n\t\t\tfor (var iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\t\tvar typeid = classKeys[iClass];\n\t\t\t\tvar dataKeys = _.keys(insertedEntries[typeid]);\n\t\t\t\tfor (var iData = 0; iData < dataKeys.length; iData++) {\n\t\t\t\t\tvar key = dataKeys[iData];\n\t\t\t\t\tallInsertedKeys[key] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Intersect the list of current keys, with the list of keys that will\n\t\t// NOT be inserted. Then insert the difference in the remove list so that\n\t\t// no objects are left dangling\n\t\tvar keys = _.keys(currentEntries);\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tif (!allInsertedKeys[keys[i]]) {\n\t\t\t\tremovedEntries[keys[i]] = true;\n\t\t\t}\n\t\t}\n\n\t\t// Remap adds to modify if the items are already in the document.\n\t\t// We want to make sure we reuse the current document state as much as possible\n\t\t// and simply change the bits that need to be changed. In many cases the\n\t\t// document will already contain the items but they need to be modified to\n\t\t// match the state described in_changeSet.\n\t\tif (this._containsPrimitiveTypes) {\n\t\t\tvar addedKeys = Object.keys(insertedEntries);\n\t\t\tfor (i = 0; i < addedKeys.length; i++) {\n\t\t\t\tif (currentEntries[addedKeys[i]] !== undefined) {\n\t\t\t\t\tmodifiedEntries[addedKeys[i]] = insertedEntries[addedKeys[i]];\n\t\t\t\t\tdelete insertedEntries[addedKeys[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tclassKeys = _.keys(insertedEntries);\n\t\t\tfor (iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\t\ttypeid = classKeys[iClass];\n\t\t\t\tvar addedKeys = Object.keys(insertedEntries[typeid]);\n\t\t\t\tfor (i = 0; i < addedKeys.length; i++) {\n\t\t\t\t\tif (currentEntries[addedKeys[i]] !== undefined) {\n\t\t\t\t\t\tmodifiedEntries[typeid] = modifiedEntries[typeid] || {};\n\t\t\t\t\t\tmodifiedEntries[typeid][addedKeys[i]] = insertedEntries[typeid][addedKeys[i]];\n\t\t\t\t\t\tdelete insertedEntries[typeid][addedKeys[i]];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Remove add entries, when they are empty\n\t\t\t\tif (_.isEmpty(insertedEntries[typeid])) {\n\t\t\t\t\tdelete insertedEntries[typeid];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Begin by removing what needs to be removed.\n\t\tkeys = Object.keys(removedEntries);\n\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\tthis._removeByKey(keys[i], false);\n\t\t}\n\n\t\t// Now get the portion of the children that must be added\n\t\t// this is a straightforward deserialize.\n\t\tif (this._containsPrimitiveTypes) {\n\t\t\tkeys = _.keys(insertedEntries);\n\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\tthis._insert(keys[i], this._deserializeValue(insertedEntries[keys[i]]), false);\n\t\t\t}\n\t\t} else {\n\t\t\tvar scope = this._getScope();\n\t\t\tvar newPsets = deserialize(insertedEntries, scope);\n\t\t\tkeys = _.keys(newPsets);\n\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\tthis._insert(keys[i], newPsets[keys[i]], false);\n\t\t\t}\n\t\t}\n\n\t\t// If no typeids are included, we just use a placeholder for the iteration below\n\t\tvar classKeys = this._containsPrimitiveTypes ? [undefined] : _.keys(modifiedEntries);\n\n\t\t// Finally modify the existing properties\n\t\tvar mapWasChangedByModify = false;\n\t\tfor (iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\ttypeid = classKeys[iClass];\n\t\t\tvar modifiedKeys = Object.keys(\n\t\t\t\tthis._containsPrimitiveTypes ? modifiedEntries : modifiedEntries[typeid],\n\t\t\t);\n\t\t\tfor (i = 0; i < modifiedKeys.length; i++) {\n\t\t\t\tvar changes;\n\t\t\t\tvar valueWasChanged = false;\n\t\t\t\tvar modifiedEntriesMap;\n\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\tchanges = modifiedEntries[modifiedKeys[i]];\n\t\t\t\t\t// Determine if value has changed\n\t\t\t\t\tvalueWasChanged =\n\t\t\t\t\t\tthis._typeid === \"Int64\" || this._typeid === \"Uint64\"\n\t\t\t\t\t\t\t? // For (u)int64, we will compare (Ui/I)nt64 objects with arrays [low, high]\n\t\t\t\t\t\t\t\tthis._dynamicChildren[modifiedKeys[i]].getValueLow() !== changes[0] ||\n\t\t\t\t\t\t\t\tthis._dynamicChildren[modifiedKeys[i]].getValueHigh() !== changes[1]\n\t\t\t\t\t\t\t: this._dynamicChildren[modifiedKeys[i]] !== changes;\n\t\t\t\t\tmodifiedEntriesMap = modifiedEntries;\n\t\t\t\t\tif (valueWasChanged) {\n\t\t\t\t\t\tthis._dynamicChildren[modifiedKeys[i]] = this._deserializeValue(changes);\n\t\t\t\t\t\t// After modifying an entry, we have to update the flags\n\t\t\t\t\t\t// If there is a pending insert, we don't need to mark this as\n\t\t\t\t\t\t// a modify, as it will just change the insert. Otherwise, this\n\t\t\t\t\t\t// has to be reported as modify\n\t\t\t\t\t\tif (!this._pendingChanges.insert[modifiedKeys[i]]) {\n\t\t\t\t\t\t\tthis._pendingChanges.modify[modifiedKeys[i]] = true;\n\t\t\t\t\t\t\tmapWasChangedByModify = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!this._dirtyChanges.insert[modifiedKeys[i]]) {\n\t\t\t\t\t\t\tthis._dirtyChanges.modify[modifiedKeys[i]] = true;\n\t\t\t\t\t\t\tmapWasChangedByModify = 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\tchanges = this._dynamicChildren[modifiedKeys[i]]._deserialize(\n\t\t\t\t\t\tmodifiedEntries[typeid][modifiedKeys[i]],\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tin_filteringOptions,\n\t\t\t\t\t\tin_createChangeSet,\n\t\t\t\t\t);\n\t\t\t\t\tvalueWasChanged = !ChangeSet.isEmptyChangeSet(changes);\n\n\t\t\t\t\tmodifiedEntries[typeid] = modifiedEntries[typeid] || {};\n\t\t\t\t\tmodifiedEntriesMap = modifiedEntries[typeid];\n\t\t\t\t}\n\n\t\t\t\tif (valueWasChanged) {\n\t\t\t\t\tmodifiedEntriesMap[modifiedKeys[i]] = changes;\n\t\t\t\t} else {\n\t\t\t\t\tdelete modifiedEntriesMap[modifiedKeys[i]];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!this._containsPrimitiveTypes && _.isEmpty(modifiedEntries[typeid])) {\n\t\t\t\tdelete modifiedEntries[typeid];\n\t\t\t}\n\t\t}\n\n\t\t// Create a ChangeSet with the actually applied changes\n\t\tif (!_.isEmpty(insertedEntries)) {\n\t\t\tappliedChangeset.insert = _.clone(insertedEntries);\n\t\t}\n\n\t\tif (!_.isEmpty(removedEntries)) {\n\t\t\tappliedChangeset.remove = _.keys(removedEntries);\n\t\t}\n\n\t\tif (!_.isEmpty(modifiedEntries)) {\n\t\t\tappliedChangeset.modify = modifiedEntries;\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\tif (mapWasChangedByModify) {\n\t\t\tthis._setDirty(false);\n\t\t}\n\n\t\t// Finally report the dirtiness to the view (we postponed this above)\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\n\t\treturn appliedChangeset;\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_applyChangeset(in_changeSet, in_reportToView) {\n\t\tBaseProperty.prototype._applyChangeset.call(this, in_changeSet, false);\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_changeSet.remove) {\n\t\t\tif (_.isArray(in_changeSet.remove)) {\n\t\t\t\tfor (var i = 0; i < in_changeSet.remove.length; i++) {\n\t\t\t\t\tvar key = in_changeSet.remove[i];\n\t\t\t\t\tthis._removeByKey(key, false);\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\tif (!this._containsPrimitiveTypes) {\n\t\t\t\t\tvar types = Object.keys(in_changeSet.remove);\n\t\t\t\t\tfor (var i = 0; i < types.length; i++) {\n\t\t\t\t\t\tvar keys = Object.keys(in_changeSet.remove[types[i]]);\n\t\t\t\t\t\tfor (var j = 0; j < keys.length; j++) {\n\t\t\t\t\t\t\tthis._removeByKey(keys[j], false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar keys = Object.keys(in_changeSet.remove);\n\t\t\t\t\tfor (var j = 0; j < keys.length; j++) {\n\t\t\t\t\t\tthis._removeByKey(keys[j], false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Insert entries (we just have to deserialize and insert them)\n\t\tif (in_changeSet.insert) {\n\t\t\tvar newPsets;\n\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\tnewPsets = in_changeSet.insert;\n\t\t\t} else {\n\t\t\t\tvar scope = this._getScope();\n\t\t\t\tnewPsets = deserialize(in_changeSet.insert, scope);\n\t\t\t}\n\t\t\tvar keys = Object.keys(newPsets);\n\t\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\t\tif (!this._dynamicChildren[keys[i]]) {\n\t\t\t\t\tthis._insert(keys[i], newPsets[keys[i]], false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(MSG.INSERTED_EXISTING_ENTRY + keys[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Modify entries\n\t\tvar mapWasChangedByModify = false;\n\t\tif (in_changeSet.modify) {\n\t\t\tvar classKeys = this._containsPrimitiveTypes ? [undefined] : _.keys(in_changeSet.modify);\n\t\t\tfor (var iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\t\tvar modifiedEntries = this._containsPrimitiveTypes\n\t\t\t\t\t? in_changeSet.modify\n\t\t\t\t\t: in_changeSet.modify[classKeys[iClass]];\n\t\t\t\tvar keys = Object.keys(modifiedEntries);\n\t\t\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\t\t\tvar key = keys[i];\n\t\t\t\t\tif (this._dynamicChildren[key] !== undefined) {\n\t\t\t\t\t\tif (this._containsPrimitiveTypes) {\n\t\t\t\t\t\t\tvar modifiedEntry = modifiedEntries[key];\n\t\t\t\t\t\t\tif (typeof modifiedEntry === \"object\") {\n\t\t\t\t\t\t\t\tmodifiedEntry = modifiedEntry.value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._dynamicChildren[key] = modifiedEntry;\n\n\t\t\t\t\t\t\t// After modifying an entry, we have to update the flags\n\t\t\t\t\t\t\t// If there is a pending insert, we don't need to mark this as\n\t\t\t\t\t\t\t// a modify, as it will just change the insert. Otherwise, this\n\t\t\t\t\t\t\t// has to be reported as modify\n\t\t\t\t\t\t\tif (!this._pendingChanges.insert[key]) {\n\t\t\t\t\t\t\t\tthis._pendingChanges.modify[key] = true;\n\t\t\t\t\t\t\t\tmapWasChangedByModify = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!this._dirtyChanges.insert[key]) {\n\t\t\t\t\t\t\t\tthis._dirtyChanges.modify[key] = true;\n\t\t\t\t\t\t\t\tmapWasChangedByModify = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis._dynamicChildren[key]._applyChangeset(modifiedEntries[key], false);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n\t\t\t\t\t}\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\tif (mapWasChangedByModify) {\n\t\t\tthis._setDirty(false);\n\t\t}\n\n\t\t// Finally report the dirtiness to the view (we postponed this above)\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\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, types, 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\ttypes = Object.keys(in_pendingChangeSet.remove);\n\t\t\t\tfor (i = 0; i < types.length; i++) {\n\t\t\t\t\tkeys = Object.keys(in_pendingChangeSet.remove[types[i]]);\n\t\t\t\t\tfor (j = 0; j < keys.length; j++) {\n\t\t\t\t\t\tthis._pendingChanges.remove[keys[j]] = true;\n\t\t\t\t\t}\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\ttypes = Object.keys(in_pendingChangeSet.insert);\n\t\t\tfor (i = 0; i < types.length; i++) {\n\t\t\t\tkeys = Object.keys(in_pendingChangeSet.insert[types[i]]);\n\t\t\t\tfor (j = 0; j < keys.length; j++) {\n\t\t\t\t\tkey = keys[j];\n\t\t\t\t\tif (this._dynamicChildren[key] !== undefined) {\n\t\t\t\t\t\tthis._pendingChanges.insert[key] = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(`${MSG.CANT_DIRTY_MISSING_PROPERTY}${key}`);\n\t\t\t\t\t}\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 classKeys = _.keys(in_pendingChangeSet.modify);\n\t\t\tfor (var iClass = 0; iClass < classKeys.length; iClass++) {\n\t\t\t\tvar modifiedPendingEntries =\n\t\t\t\t\t(in_pendingChangeSet.modify && in_pendingChangeSet.modify[classKeys[iClass]]) || {};\n\t\t\t\tvar modifiedDirtyEntries =\n\t\t\t\t\t(in_dirtyChangeSet.modify && in_dirtyChangeSet.modify[classKeys[iClass]]) || {};\n\t\t\t\tkeys = Object.keys(modifiedPendingEntries).concat(Object.keys(modifiedDirtyEntries));\n\t\t\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\t\t\tkey = keys[i];\n\t\t\t\t\tif (this._dynamicChildren[key] !== undefined) {\n\t\t\t\t\t\tthis._dynamicChildren[key]._reapplyDirtyFlags(\n\t\t\t\t\t\t\tmodifiedPendingEntries[key],\n\t\t\t\t\t\t\tmodifiedDirtyEntries[key],\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(MSG.MODIFY_NON_EXISTING_ENTRY + key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_setDirty(in_reportToView, in_callingChild) {\n\t\t// Mark the child as modified\n\t\tif (in_callingChild && !this._containsPrimitiveTypes) {\n\t\t\tvar key = in_callingChild.getId();\n\t\t\tif (this._dynamicChildren[key]) {\n\t\t\t\tif (!this._pendingChanges.insert[key]) {\n\t\t\t\t\tthis._pendingChanges.modify[key] = true;\n\t\t\t\t}\n\t\t\t\tif (!this._dirtyChanges.insert[key]) {\n\t\t\t\t\tthis._dirtyChanges.modify[key] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Forward dirtiness propagation to base class\n\t\tBaseProperty.prototype._setDirty.call(this, in_reportToView, in_callingChild);\n\t}\n}\n/** Specifies, whether this is a collection of base types or of registered templates */\nIndexedCollectionBaseProperty.prototype._containsPrimitiveTypes = false;\n"]}
@@ -51,9 +51,11 @@ export class MapProperty extends IndexedCollectionBaseProperty {
51
51
  /**
52
52
  * Removes the entry with the given key from the map
53
53
  *
54
+ * Note: If the key does not exist, a warning is logged and no error is thrown.
55
+ * This is intentional to support idempotent operations in collaborative editing scenarios.
56
+ *
54
57
  * @param {string} in_key - The key of the entry to remove from the map
55
- * @throws If trying to remove an entry that does not exist
56
- * @return {*} the item removed
58
+ * @return {*} the item removed, or undefined if the key does not exist
57
59
  */
58
60
  remove(in_key: string): any;
59
61
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"mapProperty.d.ts","sourceRoot":"","sources":["../../src/properties/mapProperty.js"],"names":[],"mappings":"AAoBA;;;;;GAKG;AAEH;;;GAGG;AACH;IACC;;;;;;;;OAQG;IACH,wBAQC;IALA,eAAsB;IACtB,qBAA2D;IAE3D,6CAA6C;IAC7C,qBAA0B;IAyB3B;;;;;;;;;OASG;IACH,2BAyDC;IAoGD;;;;;;;;;;;;OAYG;IACH,eAPW,MAAM,0BAsBhB;IAED;;;;;;OAMG;IACH,eAJW,MAAM,OAQhB;IAED;;;;;;;;;;OAUG;IACH,YANW,MAAM,0BAwBhB;IAeD;;;;;;;;;;;;;;OAcG;IACH,YAZW,MAAM,GAAG,MAAM,MAAM,CAAC,oBASrB,YAAY,GAAG,SAAS,CA0CnC;IAYD;;;;;;;OAOG;IACH,cAHY,eAAe,CAK1B;IA0BD;;OAEG;IACH,cAKC;CACD"}
1
+ {"version":3,"file":"mapProperty.d.ts","sourceRoot":"","sources":["../../src/properties/mapProperty.js"],"names":[],"mappings":"AAoBA;;;;;GAKG;AAEH;;;GAGG;AACH;IACC;;;;;;;;OAQG;IACH,wBAQC;IALA,eAAsB;IACtB,qBAA2D;IAE3D,6CAA6C;IAC7C,qBAA0B;IAyB3B;;;;;;;;;OASG;IACH,2BAyDC;IAoGD;;;;;;;;;;;;OAYG;IACH,eAPW,MAAM,0BAsBhB;IAED;;;;;;;;OAQG;IACH,eAHW,MAAM,OAOhB;IAED;;;;;;;;;;OAUG;IACH,YANW,MAAM,0BAwBhB;IAeD;;;;;;;;;;;;;;OAcG;IACH,YAZW,MAAM,GAAG,MAAM,MAAM,CAAC,oBASrB,YAAY,GAAG,SAAS,CA0CnC;IAYD;;;;;;;OAOG;IACH,cAHY,eAAe,CAK1B;IA0BD;;OAEG;IACH,cAKC;CACD"}
@@ -237,9 +237,11 @@ export class MapProperty extends IndexedCollectionBaseProperty {
237
237
  /**
238
238
  * Removes the entry with the given key from the map
239
239
  *
240
+ * Note: If the key does not exist, a warning is logged and no error is thrown.
241
+ * This is intentional to support idempotent operations in collaborative editing scenarios.
242
+ *
240
243
  * @param {string} in_key - The key of the entry to remove from the map
241
- * @throws If trying to remove an entry that does not exist
242
- * @return {*} the item removed
244
+ * @return {*} the item removed, or undefined if the key does not exist
243
245
  */
244
246
  remove(in_key) {
245
247
  var item = this.get(in_key);
@@ -1 +1 @@
1
- {"version":3,"file":"mapProperty.js","sourceRoot":"","sources":["../../src/properties/mapProperty.js"],"names":[],"mappings":"AAAA;;;G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CAAC,OAAO,GAAG,cAAc,CAAC;AAC/C,WAAW,CAAC,SAAS,CAAC,QAAQ,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 Definition of the map property class\n */\nconst { PathHelper, TypeIdHelper } = require(\"@fluid-experimental/property-changeset\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst { ConsoleUtils } = require(\"@fluid-experimental/property-common\");\nconst _ = require(\"lodash\");\n\nconst { AbstractStaticCollectionProperty } = require(\"./abstractStaticCollectionProperty\");\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { IndexedCollectionBaseProperty } = require(\"./indexedCollectionBaseProperty\");\nconst { LazyLoadedProperties: Property } = require(\"./lazyLoadedProperties\");\n\nconst PATH_TOKENS = BaseProperty.PATH_TOKENS;\n\n/**\n * typedef {property-properties.BaseProperty|string|number|boolean} property-properties.MapProperty~MapValueType\n *\n * The type of the values that are set/inserted into the map. Depending on the type of the map, these can either\n * be property objects or primitive values\n */\n\n/**\n * A MapProperty is a collection class that can contain an dictionary that maps from strings to properties.\n * @internal\n */\nexport class MapProperty extends IndexedCollectionBaseProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t * @param {string|undefined} in_scope - The scope in which the map typeid is defined\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.IndexedCollectionBaseProperty\n\t * @alias property-properties.MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params, in_scope) {\n\t\tsuper(in_params);\n\n\t\tthis._scope = in_scope;\n\t\tthis._contextKeyType = in_params.contextKeyType || \"string\";\n\n\t\t/** Contains the actual entries of the map */\n\t\tthis._dynamicChildren = {};\n\t}\n\n\t/**\n\t * Returns the full property type identifier for the ChangeSet including the enum type id\n\t * @param {boolean} [in_hideCollection=false] - If true the collection type (if applicable) will be omitted\n\t * @return {string} The typeid\n\t */\n\tgetFullTypeid(in_hideCollection = false) {\n\t\treturn in_hideCollection\n\t\t\t? this._typeid\n\t\t\t: TypeIdHelper.createSerializationTypeId(this._typeid, \"map\");\n\t}\n\n\t/**\n\t * Is this property a leaf node with regard to flattening?\n\t *\n\t * TODO: Which semantics should flattening have? It stops at primitive types and collections?\n\t *\n\t * @return {boolean} Is it a leaf with regard to flattening?\n\t */\n\t_isFlattenLeaf() {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Sets multiple values in a map.\n\t *\n\t * See {@link MapProperty.setValues}\n\t *\n\t * @param {object} in_values - to assign to the collection\n\t * @param {Boolean} in_typed - If the map's items have a typeid and a value then create the\n\t * properties with that typeid, else use the set's typeid (support polymorphic items).\n\t * @private\n\t */\n\t_setValuesInternal(in_values, in_typed) {\n\t\tif (this._containsPrimitiveTypes) {\n\t\t\tvar that = this;\n\t\t\t_.each(in_values, function (value, key) {\n\t\t\t\tif (that.has(key)) {\n\t\t\t\t\tthat.remove(key);\n\t\t\t\t}\n\n\t\t\t\tthat.insert(key, value);\n\t\t\t});\n\t\t} else {\n\t\t\tvar that = this;\n\t\t\t_.each(in_values, function (value, key) {\n\t\t\t\tvar property = that.get(String(key), {\n\t\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t\t});\n\t\t\t\t// if key exists in set replace its value else insert a new key/value\n\t\t\t\tif (property) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tproperty instanceof Property.ValueProperty ||\n\t\t\t\t\t\tproperty instanceof Property.StringProperty\n\t\t\t\t\t) {\n\t\t\t\t\t\tproperty.setValue(value);\n\t\t\t\t\t} else if (property instanceof BaseProperty && _.isObject(value)) {\n\t\t\t\t\t\tproperty._setValues(value, false, false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new TypeError(MSG.SET_VALUES_PATH_INVALID + key);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (value instanceof BaseProperty) {\n\t\t\t\t\t\tthat.insert(key, value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (in_typed) {\n\t\t\t\t\t\t\tthat.insert(\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tProperty.PropertyFactory._createProperty(\n\t\t\t\t\t\t\t\t\tvalue.typeid || that._typeid,\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\tvalue.value,\n\t\t\t\t\t\t\t\t\tthat._getScope(),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.insert(\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tProperty.PropertyFactory._createProperty(\n\t\t\t\t\t\t\t\t\tthat._typeid,\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t\tthat._getScope(),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Sets multiple values in a map.\n\t *\n\t * See {@link MapProperty.setValues}\n\t *\n\t * @param {object} in_values - to assign to the collection\n\t * @param {boolean} in_typed - Whether the values are typed/polymorphic.\n\t * @param {boolean} in_initial - Whether we are setting default/initial values or if the function is called directly\n\t * with the values to set.\n\t *\n\t * @override\n\t */\n\t_setValues(in_values, in_typed, in_initial) {\n\t\tif (in_initial) {\n\t\t\tthis.clear();\n\t\t}\n\n\t\tthis._setValuesInternal(in_values, in_typed);\n\t}\n\n\t/**\n\t * Sets multiple values in a map.\n\t *\n\t * @param {object} in_values - to assign to the collection\n\t * @throws If one of the path in in_values does not exist in this property\n\t * @throws If trying to set a value to a path that leads to a Property other than ValueProperty or StringProperty\n\t *\n\t * @override\n\t */\n\tsetValues(in_values) {\n\t\tvar checkoutView = this._getCheckoutView();\n\t\tif (checkoutView !== undefined) {\n\t\t\tcheckoutView.pushNotificationDelayScope();\n\t\t\tthis._setValues(in_values, false, false);\n\t\t\tcheckoutView.popNotificationDelayScope();\n\t\t} else {\n\t\t\tthis._setValues(in_values, false, false);\n\t\t}\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': {\n\t * 'stringValue': 'test1'\n\t * },\n\t * 'secondString': {\n\t * 'stringValue': '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\tvar child = this.get(ids[i]);\n\t\t\tresult[ids[i]] = child.isPrimitiveType()\n\t\t\t\t? this.get(ids[i]).getValue()\n\t\t\t\t: child.getValues();\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns the path segment for a child\n\t *\n\t * @param {property-properties.BaseProperty} in_childNode - The child for which the path is returned\n\t *\n\t * @return {string} The path segment to resolve the child property under this property\n\t * @protected\n\t */\n\t_getPathSegmentForChildNode(in_childNode) {\n\t\treturn \"[\" + PathHelper.quotePathSegmentIfNeeded(in_childNode._id) + \"]\";\n\t}\n\n\t/**\n\t * Resolves a direct child node based on the given path segment\n\t *\n\t * @param {String} in_segment - The path segment to resolve\n\t * @param {property-properties.PathHelper.TOKEN_TYPES} in_segmentType - The type of segment in the tokenized path\n\t *\n\t * @return {BaseProperty | undefined} The child property that has been resolved\n\t * @protected\n\t */\n\t_resolvePathSegment(in_segment, in_segmentType) {\n\t\treturn in_segmentType === PathHelper.TOKEN_TYPES.ARRAY_TOKEN\n\t\t\t? this._dynamicChildren[in_segment]\n\t\t\t: AbstractStaticCollectionProperty.prototype._resolvePathSegment.call(\n\t\t\t\t\tthis,\n\t\t\t\t\tin_segment,\n\t\t\t\t\tin_segmentType,\n\t\t\t\t);\n\t}\n\n\t/**\n\t * Inserts a property or value into the map\n\t *\n\t * Note: This will trigger an exception when this key already exists in the map. If you want to overwrite\n\t * existing entries you can use the set function.\n\t *\n\t * @param {string} in_key - The key under which the entry is added\n\t * @param {property-properties.Property} in_property - The property to insert\n\t * @throws If the property already exists\n\t * @throws If the property already has a parent\n\t * @throws If in_key is not a string\n\t * @throws If the property is a root property\n\t */\n\tinsert(in_key, in_property) {\n\t\tConsoleUtils.assert(_.isString(in_key), MSG.KEY_NOT_STRING + in_key);\n\t\tif (this._dynamicChildren[in_key] !== undefined) {\n\t\t\tthrow new Error(MSG.PROPERTY_ALREADY_EXISTS + in_key);\n\t\t}\n\t\tif (in_property instanceof BaseProperty) {\n\t\t\tin_property._validateInsertIn(this);\n\t\t\t// Set the ID of the entry, to make sure it corresponds to the used key\n\t\t\tin_property._setId(in_key);\n\n\t\t\t// Insert the entry into the collection\n\t\t\tthis._insert(in_key, in_property, true);\n\t\t} else {\n\t\t\tthrow new TypeError(MSG.NONVALUE_MAP_INSERT_PROP);\n\t\t}\n\t}\n\n\t/**\n\t * Removes the entry with the given key from the map\n\t *\n\t * @param {string} in_key - The key of the entry to remove from the map\n\t * @throws If trying to remove an entry that does not exist\n\t * @return {*} the item removed\n\t */\n\tremove(in_key) {\n\t\tvar item = this.get(in_key);\n\t\tthis._removeByKey(in_key, true);\n\t\treturn item;\n\t}\n\n\t/**\n\t * Sets the entry with the given key to the property 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 {property-properties.MapProperty~MapValueType} in_property - The property to store in the map\n\t * @throws If in_property is not a property\n\t * @throws If trying to insert a property that has a parent\n\t * @throws If in_key is not a string or a number\n\t */\n\tset(in_key, in_property) {\n\t\tthis._checkIsNotReadOnly(true);\n\t\tif (this._dynamicChildren[in_key] !== in_property) {\n\t\t\tif (this._containsPrimitiveTypes === false && in_property.getParent() !== undefined) {\n\t\t\t\tthrow new Error(MSG.INSERTED_ENTRY_WITH_PARENT);\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\t// Set the ID of the entry, to make sure it corresponds to the used key\n\t\t\tif (this._containsPrimitiveTypes === false) {\n\t\t\t\tin_property._setId(in_key);\n\t\t\t}\n\t\t\tthis._insert(in_key, in_property, false);\n\n\t\t\t// Make one final report\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Returns an Object with all the entries of the map.\n\t * Contrary ot .getValues, for Property Maps, this will return the Property, not an object with their nested values.\n\t * WARNING: This is a direct access to the internal data-structure and the collection MUST NOT be modified. It is\n\t * read only for fast access and iteration. Insertion and deletion MUST be done via the insert and remove functions\n\t * of this class.\n\t *\n\t * @return {Object} The map with all entries in the map.\n\t */\n\tgetEntriesReadOnly() {\n\t\treturn this._dynamicChildren;\n\t}\n\n\t/**\n\t * Returns the collection entry with the given key\n\t *\n\t * @param {string | Array<string>} in_ids - key of the entry to return or an array of keys\n\t * if an array is passed, the .get function will be performed on each id in sequence\n\t * for example .get(['position','x']) is equivalent to .get('position').get('x').\n\t * If .get resolves to a ReferenceProperty, it will return the property that the ReferenceProperty\n\t * refers to.\n\t * @param {Object} in_options - parameter object\n\t * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS] - How\n\t * should this function behave during reference resolution?\n\t *\n\t * @return {BaseProperty | undefined} The entry in the collection or undefined\n\t * if none could be found\n\t */\n\tget(in_ids, in_options) {\n\t\tif (_.isArray(in_ids)) {\n\t\t\t// Forward handling of arrays to the BaseProperty function\n\t\t\treturn AbstractStaticCollectionProperty.prototype.get.call(this, in_ids, in_options);\n\t\t} else {\n\t\t\tin_options = in_options || {};\n\t\t\tin_options.referenceResolutionMode =\n\t\t\t\tin_options.referenceResolutionMode === undefined\n\t\t\t\t\t? BaseProperty.REFERENCE_RESOLUTION.ALWAYS\n\t\t\t\t\t: in_options.referenceResolutionMode;\n\n\t\t\tvar prop = this;\n\t\t\tswitch (in_ids) {\n\t\t\t\tcase PATH_TOKENS.ROOT: {\n\t\t\t\t\tprop = prop.getRoot();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase PATH_TOKENS.UP: {\n\t\t\t\t\tprop = prop.getParent();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase PATH_TOKENS.REF: {\n\t\t\t\t\tthrow new Error(MSG.NO_GET_DEREFERENCE_ONLY);\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tprop = prop._dynamicChildren[in_ids];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle automatic reference resolution\n\t\t\tif (in_options.referenceResolutionMode === BaseProperty.REFERENCE_RESOLUTION.ALWAYS) {\n\t\t\t\tif (prop instanceof Property.ReferenceProperty) {\n\t\t\t\t\tprop = prop.ref;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn prop;\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether an entry with the given name exists\n\t *\n\t * @param {string} in_id - Name of the property\n\t * @return {boolean} True if the property exists, otherwise false.\n\t */\n\thas(in_id) {\n\t\treturn this._dynamicChildren[in_id] !== undefined;\n\t}\n\n\t/**\n\t * Returns all entries of the map as an array.\n\t *\n\t * NOTE: This function creates a copy and thus is less efficient as getEntriesReadOnly.\n\t *\n\t * @return {Array.<property-properties.BaseProperty | *>} Array with all entries of the map. This array\n\t * is a shallow copy which can be modified by the caller without effects on the map.\n\t */\n\tgetAsArray() {\n\t\treturn _.values(this._dynamicChildren);\n\t}\n\n\t/**\n\t * Returns all keys found in the map\n\t *\n\t * NOTE: This function creates a copy and thus is less efficient as getEntriesReadOnly.\n\t *\n\t * @return {Array.<string>} The keys\n\t */\n\tgetIds() {\n\t\treturn Object.keys(this._dynamicChildren);\n\t}\n\n\t/**\n\t * Get the scope to which this property belongs to.\n\t * @return {string|undefined} The guid representing the scope in which the\n\t * map belongs to. If there is a workspace scope return it, else return the scope of this map.\n\t * @override\n\t * @private\n\t */\n\t_getScope() {\n\t\tvar scope = IndexedCollectionBaseProperty.prototype._getScope.call(this);\n\n\t\treturn scope !== undefined ? scope : this._scope;\n\t}\n\n\t/**\n\t * Deletes all values from the Map\n\t */\n\tclear() {\n\t\tvar that = this;\n\t\tthis.getIds().forEach(function (id) {\n\t\t\tthat.remove(id);\n\t\t});\n\t}\n}\n\nMapProperty.prototype._typeid = \"BaseProperty\";\nMapProperty.prototype._context = \"map\";\n"]}
1
+ {"version":3,"file":"mapProperty.js","sourceRoot":"","sources":["../../src/properties/mapProperty.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACvF,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACxE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE5B,MAAM,EAAE,gCAAgC,EAAE,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAC3F,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,6BAA6B,EAAE,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAAC;AACrF,MAAM,EAAE,oBAAoB,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAE7E,MAAM,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC;AAE7C;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,6BAA6B;IAC7D;;;;;;;;OAQG;IACH,YAAY,SAAS,EAAE,QAAQ;QAC9B,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,SAAS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CAAC;QAEzE,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,KAAK;QACJ,IAAI,IAAI,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE;YACjC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AAED,WAAW,CAAC,SAAS,CAAC,OAAO,GAAG,cAAc,CAAC;AAC/C,WAAW,CAAC,SAAS,CAAC,QAAQ,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 Definition of the map property class\n */\nconst { PathHelper, TypeIdHelper } = require(\"@fluid-experimental/property-changeset\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst { ConsoleUtils } = require(\"@fluid-experimental/property-common\");\nconst _ = require(\"lodash\");\n\nconst { AbstractStaticCollectionProperty } = require(\"./abstractStaticCollectionProperty\");\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { IndexedCollectionBaseProperty } = require(\"./indexedCollectionBaseProperty\");\nconst { LazyLoadedProperties: Property } = require(\"./lazyLoadedProperties\");\n\nconst PATH_TOKENS = BaseProperty.PATH_TOKENS;\n\n/**\n * typedef {property-properties.BaseProperty|string|number|boolean} property-properties.MapProperty~MapValueType\n *\n * The type of the values that are set/inserted into the map. Depending on the type of the map, these can either\n * be property objects or primitive values\n */\n\n/**\n * A MapProperty is a collection class that can contain an dictionary that maps from strings to properties.\n * @internal\n */\nexport class MapProperty extends IndexedCollectionBaseProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t * @param {string|undefined} in_scope - The scope in which the map typeid is defined\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.IndexedCollectionBaseProperty\n\t * @alias property-properties.MapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params, in_scope) {\n\t\tsuper(in_params);\n\n\t\tthis._scope = in_scope;\n\t\tthis._contextKeyType = in_params.contextKeyType || \"string\";\n\n\t\t/** Contains the actual entries of the map */\n\t\tthis._dynamicChildren = {};\n\t}\n\n\t/**\n\t * Returns the full property type identifier for the ChangeSet including the enum type id\n\t * @param {boolean} [in_hideCollection=false] - If true the collection type (if applicable) will be omitted\n\t * @return {string} The typeid\n\t */\n\tgetFullTypeid(in_hideCollection = false) {\n\t\treturn in_hideCollection\n\t\t\t? this._typeid\n\t\t\t: TypeIdHelper.createSerializationTypeId(this._typeid, \"map\");\n\t}\n\n\t/**\n\t * Is this property a leaf node with regard to flattening?\n\t *\n\t * TODO: Which semantics should flattening have? It stops at primitive types and collections?\n\t *\n\t * @return {boolean} Is it a leaf with regard to flattening?\n\t */\n\t_isFlattenLeaf() {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Sets multiple values in a map.\n\t *\n\t * See {@link MapProperty.setValues}\n\t *\n\t * @param {object} in_values - to assign to the collection\n\t * @param {Boolean} in_typed - If the map's items have a typeid and a value then create the\n\t * properties with that typeid, else use the set's typeid (support polymorphic items).\n\t * @private\n\t */\n\t_setValuesInternal(in_values, in_typed) {\n\t\tif (this._containsPrimitiveTypes) {\n\t\t\tvar that = this;\n\t\t\t_.each(in_values, function (value, key) {\n\t\t\t\tif (that.has(key)) {\n\t\t\t\t\tthat.remove(key);\n\t\t\t\t}\n\n\t\t\t\tthat.insert(key, value);\n\t\t\t});\n\t\t} else {\n\t\t\tvar that = this;\n\t\t\t_.each(in_values, function (value, key) {\n\t\t\t\tvar property = that.get(String(key), {\n\t\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t\t});\n\t\t\t\t// if key exists in set replace its value else insert a new key/value\n\t\t\t\tif (property) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tproperty instanceof Property.ValueProperty ||\n\t\t\t\t\t\tproperty instanceof Property.StringProperty\n\t\t\t\t\t) {\n\t\t\t\t\t\tproperty.setValue(value);\n\t\t\t\t\t} else if (property instanceof BaseProperty && _.isObject(value)) {\n\t\t\t\t\t\tproperty._setValues(value, false, false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new TypeError(MSG.SET_VALUES_PATH_INVALID + key);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (value instanceof BaseProperty) {\n\t\t\t\t\t\tthat.insert(key, value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (in_typed) {\n\t\t\t\t\t\t\tthat.insert(\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tProperty.PropertyFactory._createProperty(\n\t\t\t\t\t\t\t\t\tvalue.typeid || that._typeid,\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\tvalue.value,\n\t\t\t\t\t\t\t\t\tthat._getScope(),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.insert(\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tProperty.PropertyFactory._createProperty(\n\t\t\t\t\t\t\t\t\tthat._typeid,\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t\tthat._getScope(),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Sets multiple values in a map.\n\t *\n\t * See {@link MapProperty.setValues}\n\t *\n\t * @param {object} in_values - to assign to the collection\n\t * @param {boolean} in_typed - Whether the values are typed/polymorphic.\n\t * @param {boolean} in_initial - Whether we are setting default/initial values or if the function is called directly\n\t * with the values to set.\n\t *\n\t * @override\n\t */\n\t_setValues(in_values, in_typed, in_initial) {\n\t\tif (in_initial) {\n\t\t\tthis.clear();\n\t\t}\n\n\t\tthis._setValuesInternal(in_values, in_typed);\n\t}\n\n\t/**\n\t * Sets multiple values in a map.\n\t *\n\t * @param {object} in_values - to assign to the collection\n\t * @throws If one of the path in in_values does not exist in this property\n\t * @throws If trying to set a value to a path that leads to a Property other than ValueProperty or StringProperty\n\t *\n\t * @override\n\t */\n\tsetValues(in_values) {\n\t\tvar checkoutView = this._getCheckoutView();\n\t\tif (checkoutView !== undefined) {\n\t\t\tcheckoutView.pushNotificationDelayScope();\n\t\t\tthis._setValues(in_values, false, false);\n\t\t\tcheckoutView.popNotificationDelayScope();\n\t\t} else {\n\t\t\tthis._setValues(in_values, false, false);\n\t\t}\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': {\n\t * 'stringValue': 'test1'\n\t * },\n\t * 'secondString': {\n\t * 'stringValue': '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\tvar child = this.get(ids[i]);\n\t\t\tresult[ids[i]] = child.isPrimitiveType()\n\t\t\t\t? this.get(ids[i]).getValue()\n\t\t\t\t: child.getValues();\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns the path segment for a child\n\t *\n\t * @param {property-properties.BaseProperty} in_childNode - The child for which the path is returned\n\t *\n\t * @return {string} The path segment to resolve the child property under this property\n\t * @protected\n\t */\n\t_getPathSegmentForChildNode(in_childNode) {\n\t\treturn \"[\" + PathHelper.quotePathSegmentIfNeeded(in_childNode._id) + \"]\";\n\t}\n\n\t/**\n\t * Resolves a direct child node based on the given path segment\n\t *\n\t * @param {String} in_segment - The path segment to resolve\n\t * @param {property-properties.PathHelper.TOKEN_TYPES} in_segmentType - The type of segment in the tokenized path\n\t *\n\t * @return {BaseProperty | undefined} The child property that has been resolved\n\t * @protected\n\t */\n\t_resolvePathSegment(in_segment, in_segmentType) {\n\t\treturn in_segmentType === PathHelper.TOKEN_TYPES.ARRAY_TOKEN\n\t\t\t? this._dynamicChildren[in_segment]\n\t\t\t: AbstractStaticCollectionProperty.prototype._resolvePathSegment.call(\n\t\t\t\t\tthis,\n\t\t\t\t\tin_segment,\n\t\t\t\t\tin_segmentType,\n\t\t\t\t);\n\t}\n\n\t/**\n\t * Inserts a property or value into the map\n\t *\n\t * Note: This will trigger an exception when this key already exists in the map. If you want to overwrite\n\t * existing entries you can use the set function.\n\t *\n\t * @param {string} in_key - The key under which the entry is added\n\t * @param {property-properties.Property} in_property - The property to insert\n\t * @throws If the property already exists\n\t * @throws If the property already has a parent\n\t * @throws If in_key is not a string\n\t * @throws If the property is a root property\n\t */\n\tinsert(in_key, in_property) {\n\t\tConsoleUtils.assert(_.isString(in_key), MSG.KEY_NOT_STRING + in_key);\n\t\tif (this._dynamicChildren[in_key] !== undefined) {\n\t\t\tthrow new Error(MSG.PROPERTY_ALREADY_EXISTS + in_key);\n\t\t}\n\t\tif (in_property instanceof BaseProperty) {\n\t\t\tin_property._validateInsertIn(this);\n\t\t\t// Set the ID of the entry, to make sure it corresponds to the used key\n\t\t\tin_property._setId(in_key);\n\n\t\t\t// Insert the entry into the collection\n\t\t\tthis._insert(in_key, in_property, true);\n\t\t} else {\n\t\t\tthrow new TypeError(MSG.NONVALUE_MAP_INSERT_PROP);\n\t\t}\n\t}\n\n\t/**\n\t * Removes the entry with the given key from the map\n\t *\n\t * Note: If the key does not exist, a warning is logged and no error is thrown.\n\t * This is intentional to support idempotent operations in collaborative editing scenarios.\n\t *\n\t * @param {string} in_key - The key of the entry to remove from the map\n\t * @return {*} the item removed, or undefined if the key does not exist\n\t */\n\tremove(in_key) {\n\t\tvar item = this.get(in_key);\n\t\tthis._removeByKey(in_key, true);\n\t\treturn item;\n\t}\n\n\t/**\n\t * Sets the entry with the given key to the property 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 {property-properties.MapProperty~MapValueType} in_property - The property to store in the map\n\t * @throws If in_property is not a property\n\t * @throws If trying to insert a property that has a parent\n\t * @throws If in_key is not a string or a number\n\t */\n\tset(in_key, in_property) {\n\t\tthis._checkIsNotReadOnly(true);\n\t\tif (this._dynamicChildren[in_key] !== in_property) {\n\t\t\tif (this._containsPrimitiveTypes === false && in_property.getParent() !== undefined) {\n\t\t\t\tthrow new Error(MSG.INSERTED_ENTRY_WITH_PARENT);\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\t// Set the ID of the entry, to make sure it corresponds to the used key\n\t\t\tif (this._containsPrimitiveTypes === false) {\n\t\t\t\tin_property._setId(in_key);\n\t\t\t}\n\t\t\tthis._insert(in_key, in_property, false);\n\n\t\t\t// Make one final report\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Returns an Object with all the entries of the map.\n\t * Contrary ot .getValues, for Property Maps, this will return the Property, not an object with their nested values.\n\t * WARNING: This is a direct access to the internal data-structure and the collection MUST NOT be modified. It is\n\t * read only for fast access and iteration. Insertion and deletion MUST be done via the insert and remove functions\n\t * of this class.\n\t *\n\t * @return {Object} The map with all entries in the map.\n\t */\n\tgetEntriesReadOnly() {\n\t\treturn this._dynamicChildren;\n\t}\n\n\t/**\n\t * Returns the collection entry with the given key\n\t *\n\t * @param {string | Array<string>} in_ids - key of the entry to return or an array of keys\n\t * if an array is passed, the .get function will be performed on each id in sequence\n\t * for example .get(['position','x']) is equivalent to .get('position').get('x').\n\t * If .get resolves to a ReferenceProperty, it will return the property that the ReferenceProperty\n\t * refers to.\n\t * @param {Object} in_options - parameter object\n\t * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS] - How\n\t * should this function behave during reference resolution?\n\t *\n\t * @return {BaseProperty | undefined} The entry in the collection or undefined\n\t * if none could be found\n\t */\n\tget(in_ids, in_options) {\n\t\tif (_.isArray(in_ids)) {\n\t\t\t// Forward handling of arrays to the BaseProperty function\n\t\t\treturn AbstractStaticCollectionProperty.prototype.get.call(this, in_ids, in_options);\n\t\t} else {\n\t\t\tin_options = in_options || {};\n\t\t\tin_options.referenceResolutionMode =\n\t\t\t\tin_options.referenceResolutionMode === undefined\n\t\t\t\t\t? BaseProperty.REFERENCE_RESOLUTION.ALWAYS\n\t\t\t\t\t: in_options.referenceResolutionMode;\n\n\t\t\tvar prop = this;\n\t\t\tswitch (in_ids) {\n\t\t\t\tcase PATH_TOKENS.ROOT: {\n\t\t\t\t\tprop = prop.getRoot();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase PATH_TOKENS.UP: {\n\t\t\t\t\tprop = prop.getParent();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase PATH_TOKENS.REF: {\n\t\t\t\t\tthrow new Error(MSG.NO_GET_DEREFERENCE_ONLY);\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tprop = prop._dynamicChildren[in_ids];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle automatic reference resolution\n\t\t\tif (in_options.referenceResolutionMode === BaseProperty.REFERENCE_RESOLUTION.ALWAYS) {\n\t\t\t\tif (prop instanceof Property.ReferenceProperty) {\n\t\t\t\t\tprop = prop.ref;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn prop;\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether an entry with the given name exists\n\t *\n\t * @param {string} in_id - Name of the property\n\t * @return {boolean} True if the property exists, otherwise false.\n\t */\n\thas(in_id) {\n\t\treturn this._dynamicChildren[in_id] !== undefined;\n\t}\n\n\t/**\n\t * Returns all entries of the map as an array.\n\t *\n\t * NOTE: This function creates a copy and thus is less efficient as getEntriesReadOnly.\n\t *\n\t * @return {Array.<property-properties.BaseProperty | *>} Array with all entries of the map. This array\n\t * is a shallow copy which can be modified by the caller without effects on the map.\n\t */\n\tgetAsArray() {\n\t\treturn _.values(this._dynamicChildren);\n\t}\n\n\t/**\n\t * Returns all keys found in the map\n\t *\n\t * NOTE: This function creates a copy and thus is less efficient as getEntriesReadOnly.\n\t *\n\t * @return {Array.<string>} The keys\n\t */\n\tgetIds() {\n\t\treturn Object.keys(this._dynamicChildren);\n\t}\n\n\t/**\n\t * Get the scope to which this property belongs to.\n\t * @return {string|undefined} The guid representing the scope in which the\n\t * map belongs to. If there is a workspace scope return it, else return the scope of this map.\n\t * @override\n\t * @private\n\t */\n\t_getScope() {\n\t\tvar scope = IndexedCollectionBaseProperty.prototype._getScope.call(this);\n\n\t\treturn scope !== undefined ? scope : this._scope;\n\t}\n\n\t/**\n\t * Deletes all values from the Map\n\t */\n\tclear() {\n\t\tvar that = this;\n\t\tthis.getIds().forEach(function (id) {\n\t\t\tthat.remove(id);\n\t\t});\n\t}\n}\n\nMapProperty.prototype._typeid = \"BaseProperty\";\nMapProperty.prototype._context = \"map\";\n"]}
@@ -31,9 +31,11 @@ export class ReferenceMapProperty extends StringMapProperty {
31
31
  /**
32
32
  * Removes the entry with the given key from the map
33
33
  *
34
+ * Note: If the key does not exist, a warning is logged and no error is thrown.
35
+ * This is intentional to support idempotent operations in collaborative editing scenarios.
36
+ *
34
37
  * @param {string} in_key - The key of the entry to remove from the map
35
- * @throws If trying to remove an entry that does not exist
36
- * @returns {String} the item removed (a string pathT
38
+ * @returns {String} the item removed (a string path), or undefined if the key does not exist
37
39
  */
38
40
  remove(in_key: string): string;
39
41
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"referenceMapProperty.d.ts","sourceRoot":"","sources":["../../src/properties/referenceMapProperty.js"],"names":[],"mappings":"AAiBA;;;GAGG;AACH;IAcC;;;;;;;OAOG;IACH,4BAFa,MAAM,CAIlB;IAED;;;;;;;;;;;;;;OAcG;IACH,YAZW,MAAM,GAAG,MAAM,MAAM,GAAG,MAAM,CAAC,oBAS7B,YAAY,GAAG,SAAS,CAoBpC;IAED;;;;;;OAMG;IACH,eAJW,MAAM,UAQhB;IA0CD;;;;;;;;;;OAUG;IACH,+BAEC;IAiBD;;;;;;OAMG;IACH,yBAHW,MAAM,GACJ,OAAO,CAMnB;IAED;;;;OAIG;IACH,iBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;OAEG;IACH,+DAYC;CACD"}
1
+ {"version":3,"file":"referenceMapProperty.d.ts","sourceRoot":"","sources":["../../src/properties/referenceMapProperty.js"],"names":[],"mappings":"AAiBA;;;GAGG;AACH;IAcC;;;;;;;OAOG;IACH,4BAFa,MAAM,CAIlB;IAED;;;;;;;;;;;;;;OAcG;IACH,YAZW,MAAM,GAAG,MAAM,MAAM,GAAG,MAAM,CAAC,oBAS7B,YAAY,GAAG,SAAS,CAoBpC;IAED;;;;;;;;OAQG;IACH,eAHW,MAAM,UAOhB;IA0CD;;;;;;;;;;OAUG;IACH,+BAEC;IAiBD;;;;;;OAMG;IACH,yBAHW,MAAM,GACJ,OAAO,CAMnB;IAED;;;;OAIG;IACH,iBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;OAEG;IACH,+DAYC;CACD"}
@@ -76,9 +76,11 @@ export class ReferenceMapProperty extends StringMapProperty {
76
76
  /**
77
77
  * Removes the entry with the given key from the map
78
78
  *
79
+ * Note: If the key does not exist, a warning is logged and no error is thrown.
80
+ * This is intentional to support idempotent operations in collaborative editing scenarios.
81
+ *
79
82
  * @param {string} in_key - The key of the entry to remove from the map
80
- * @throws If trying to remove an entry that does not exist
81
- * @returns {String} the item removed (a string pathT
83
+ * @returns {String} the item removed (a string path), or undefined if the key does not exist
82
84
  */
83
85
  remove(in_key) {
84
86
  var item = this.getValue(in_key);
@@ -1 +1 @@
1
- {"version":3,"file":"referenceMapProperty.js","sourceRoot":"","sources":["../../src/properties/referenceMapProperty.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,EAA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AAC;IAC3D,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,GAAG,IAAI;QACf,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,QAAQ;QACtB,IAAI,KAAK,GAAG,iBAAiB,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QAC5D,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;;;;;OAMG;IACH,gBAAgB,CAAC,MAAM;QACtB,OAAO,CACN,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC,CACpF,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,MAAM;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,mBAAmB,CAAC,UAAU,EAAE,cAAc;QAC7C,0CAA0C;QAC1C,OAAO,cAAc,KAAK,UAAU,CAAC,WAAW,CAAC,WAAW;YAC3D,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE;gBACrB,uBAAuB,EAAE,YAAY,CAAC,oBAAoB,CAAC,KAAK;aAChE,CAAC;YACH,CAAC,CAAC,wEAAwE;gBACzE,gCAAgC,CAAC,SAAS,CAAC,mBAAmB,CAAC,IAAI,CAClE,IAAI,EACJ,UAAU,EACV,cAAc,CACd,CAAC;IACL,CAAC;CACD;AAED,oBAAoB,CAAC,SAAS,CAAC,OAAO,GAAG,WAAW,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 reference map property class\n */\nconst { PathHelper, TypeIdHelper } = require(\"@fluid-experimental/property-changeset\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst _ = require(\"lodash\");\n\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { ContainerProperty } = require(\"./containerProperty\");\nconst { ReferenceProperty } = require(\"./referenceProperty\");\nconst { StringMapProperty } = require(\"./valueMapProperty\");\n\n/**\n * A StringMapProperty which stores reference values\n * @internal\n */\nexport class ReferenceMapProperty extends StringMapProperty {\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.StringMapProperty\n\t * @alias property-properties.ReferenceMapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Returns the typeid for the target of this reference\n\t *\n\t * Note: This is the type that is specified in the typeid of this reference and not the actual type\n\t * of the referenced object, which might inherit from that typeid.\n\t *\n\t * @returns {string} The typeid of the nodes this reference may point to\n\t */\n\tgetReferenceTargetTypeId() {\n\t\treturn TypeIdHelper.extractReferenceTargetTypeIdFromReference(this.getTypeid());\n\t}\n\n\t/**\n\t * Resolves the referenced property for the given key\n\t *\n\t * @param {string | Array<string | number>} in_ids - The ID of the property or an array of IDs\n\t * if an array is passed, the .get function will be performed on each id in sequence\n\t * for example .get(['position','x']) is equivalent to .get('position').get('x').\n\t * If .get resolves to a ReferenceProperty, it will return the property that the ReferenceProperty\n\t * refers to.\n\t * @param {Object} in_options - parameter object\n\t * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS] - How\n\t * should this function behave during reference resolution?\n\t *\n\t * @returns {BaseProperty | undefined} The property object the reference points to or undefined\n\t * if it could not be resolved\n\t */\n\tget(in_ids, in_options) {\n\t\tin_options = in_options || {};\n\t\tin_options.referenceResolutionMode =\n\t\t\tin_options.referenceResolutionMode === undefined\n\t\t\t\t? BaseProperty.REFERENCE_RESOLUTION.ALWAYS\n\t\t\t\t: in_options.referenceResolutionMode;\n\n\t\tif (_.isArray(in_ids)) {\n\t\t\t// Forward handling of arrays to the BaseProperty function\n\t\t\treturn AbstractStaticCollectionProperty.prototype.get.call(this, in_ids, in_options);\n\t\t} else {\n\t\t\tvar value = this._dynamicChildren[in_ids];\n\t\t\tif (value === undefined || value === \"\") {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\treturn this.getParent().resolvePath(value, in_options);\n\t\t}\n\t}\n\n\t/**\n\t * Removes the entry with the given key from the map\n\t *\n\t * @param {string} in_key - The key of the entry to remove from the map\n\t * @throws If trying to remove an entry that does not exist\n\t * @returns {String} the item removed (a string pathT\n\t */\n\tremove(in_key) {\n\t\tvar item = this.getValue(in_key);\n\t\tthis._removeByKey(in_key, true);\n\t\treturn item;\n\t}\n\n\t/**\n\t * Returns an object with all the nested path values.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * 'firstPath': '/path',\n\t * 'secondPath': '/path2'\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.getValue(ids[i]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Sets or inserts the reference to point to the given property object or to be equal to the given path string.\n\t *\n\t * @param {string} in_key - The key under which the entry is stored\n\t * @param {property-properties.BaseProperty|undefined|String} in_value - The property to assign to the reference or\n\t * the path to this property. If undefined is passed, the reference will be set to an empty string to\n\t * indicate an empty reference.\n\t * @throws If in_key is not a string\n\t * @throws If in_value is defined, but is not a property or a string.\n\t * @throws If map is read only\n\t */\n\tset(in_key, in_value) {\n\t\tif (!_.isString(in_key)) {\n\t\t\tthrow new TypeError(MSG.KEY_NOT_STRING + in_key);\n\t\t}\n\t\tvar value = ReferenceProperty._convertInputToPath(in_value);\n\t\tStringMapProperty.prototype.set.call(this, in_key, value);\n\t}\n\n\t/**\n\t * Sets or inserts the reference to point to the given property object or to be equal to the given path string.\n\t *\n\t * @param {string} in_key - The key under which the entry is stored\n\t * @param {property-properties.BaseProperty|undefined|String} in_value - The property to assign to the reference or\n\t * the path to this property. If undefined is passed, the reference will be set to an empty string to\n\t * indicate an empty reference.\n\t * @throws If in_key is not a string\n\t * @throws If in_value is defined, but is not a property or a string.\n\t * @deprecated\n\t */\n\tsetValue(...args) {\n\t\treturn this.set(...args);\n\t}\n\n\t/**\n\t * Inserts the reference to point to the given property object or to be equal to the given path string.\n\t *\n\t * @param {string} in_key - The key under which the entry is stored\n\t * @param {property-properties.BaseProperty|undefined|String} in_value - The property to assign to the reference or\n\t * the path to this property. If undefined is passed, the reference will be set to an empty string to\n\t * indicate an empty reference.\n\t * @throws If there is already an entry under in_key\n\t * @throws If in_value is defined, but is not a property or a string.\n\t */\n\tinsert(in_key, in_value) {\n\t\tvar value = ReferenceProperty._convertInputToPath(in_value);\n\t\tthis._insert(in_key, value, true);\n\t}\n\n\t/**\n\t * Checks whether the reference is valid. This is either the case when it is empty or when the referenced\n\t * property exists.\n\t *\n\t * @param {string} in_key - Key of the entry to check\n\t * @returns {boolean} True if the reference is valid, otherwise false.\n\t */\n\tisReferenceValid(in_key) {\n\t\treturn (\n\t\t\tthis.has(in_key) && (this.getValue(in_key) === \"\" || this.get(in_key) !== undefined)\n\t\t);\n\t}\n\n\t/**\n\t * Returns the string value stored in the map\n\t * @param {string} in_key - The key of the reference\n\t * @returns {string} The path string\n\t */\n\tgetValue(in_key) {\n\t\treturn this._getValue(in_key);\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_resolvePathSegment(in_segment, in_segmentType) {\n\t\t// Array tokens are automatically resolved\n\t\treturn in_segmentType === PathHelper.TOKEN_TYPES.ARRAY_TOKEN\n\t\t\t? this.get(in_segment, {\n\t\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t\t})\n\t\t\t: // Everything else is handled by the implementation in the base property\n\t\t\t\tAbstractStaticCollectionProperty.prototype._resolvePathSegment.call(\n\t\t\t\t\tthis,\n\t\t\t\t\tin_segment,\n\t\t\t\t\tin_segmentType,\n\t\t\t\t);\n\t}\n}\n\nReferenceMapProperty.prototype._typeid = \"Reference\";\n"]}
1
+ {"version":3,"file":"referenceMapProperty.js","sourceRoot":"","sources":["../../src/properties/referenceMapProperty.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACvF,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE5B,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAC7D,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAC7D,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,OAAO,oBAAqB,SAAQ,iBAAiB;IAC1D;;;;;;;;OAQG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,CAAC,CAAC;IAClB,CAAC;IAED;;;;;;;OAOG;IACH,wBAAwB;QACvB,OAAO,YAAY,CAAC,yCAAyC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAAC,MAAM,EAAE,UAAU;QACrB,UAAU,GAAG,UAAU,IAAI,EAAE,CAAC;QAC9B,UAAU,CAAC,uBAAuB;YACjC,UAAU,CAAC,uBAAuB,KAAK,SAAS;gBAC/C,CAAC,CAAC,Y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AAC;YACH,CAAC,CAAC,wEAAwE;gBACzE,gCAAgC,CAAC,SAAS,CAAC,mBAAmB,CAAC,IAAI,CAClE,IAAI,EACJ,UAAU,EACV,cAAc,CACd,CAAC;IACL,CAAC;CACD;AAED,oBAAoB,CAAC,SAAS,CAAC,OAAO,GAAG,WAAW,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 reference map property class\n */\nconst { PathHelper, TypeIdHelper } = require(\"@fluid-experimental/property-changeset\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst _ = require(\"lodash\");\n\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { ContainerProperty } = require(\"./containerProperty\");\nconst { ReferenceProperty } = require(\"./referenceProperty\");\nconst { StringMapProperty } = require(\"./valueMapProperty\");\n\n/**\n * A StringMapProperty which stores reference values\n * @internal\n */\nexport class ReferenceMapProperty extends StringMapProperty {\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.StringMapProperty\n\t * @alias property-properties.ReferenceMapProperty\n\t * @category Maps\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Returns the typeid for the target of this reference\n\t *\n\t * Note: This is the type that is specified in the typeid of this reference and not the actual type\n\t * of the referenced object, which might inherit from that typeid.\n\t *\n\t * @returns {string} The typeid of the nodes this reference may point to\n\t */\n\tgetReferenceTargetTypeId() {\n\t\treturn TypeIdHelper.extractReferenceTargetTypeIdFromReference(this.getTypeid());\n\t}\n\n\t/**\n\t * Resolves the referenced property for the given key\n\t *\n\t * @param {string | Array<string | number>} in_ids - The ID of the property or an array of IDs\n\t * if an array is passed, the .get function will be performed on each id in sequence\n\t * for example .get(['position','x']) is equivalent to .get('position').get('x').\n\t * If .get resolves to a ReferenceProperty, it will return the property that the ReferenceProperty\n\t * refers to.\n\t * @param {Object} in_options - parameter object\n\t * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS] - How\n\t * should this function behave during reference resolution?\n\t *\n\t * @returns {BaseProperty | undefined} The property object the reference points to or undefined\n\t * if it could not be resolved\n\t */\n\tget(in_ids, in_options) {\n\t\tin_options = in_options || {};\n\t\tin_options.referenceResolutionMode =\n\t\t\tin_options.referenceResolutionMode === undefined\n\t\t\t\t? BaseProperty.REFERENCE_RESOLUTION.ALWAYS\n\t\t\t\t: in_options.referenceResolutionMode;\n\n\t\tif (_.isArray(in_ids)) {\n\t\t\t// Forward handling of arrays to the BaseProperty function\n\t\t\treturn AbstractStaticCollectionProperty.prototype.get.call(this, in_ids, in_options);\n\t\t} else {\n\t\t\tvar value = this._dynamicChildren[in_ids];\n\t\t\tif (value === undefined || value === \"\") {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\treturn this.getParent().resolvePath(value, in_options);\n\t\t}\n\t}\n\n\t/**\n\t * Removes the entry with the given key from the map\n\t *\n\t * Note: If the key does not exist, a warning is logged and no error is thrown.\n\t * This is intentional to support idempotent operations in collaborative editing scenarios.\n\t *\n\t * @param {string} in_key - The key of the entry to remove from the map\n\t * @returns {String} the item removed (a string path), or undefined if the key does not exist\n\t */\n\tremove(in_key) {\n\t\tvar item = this.getValue(in_key);\n\t\tthis._removeByKey(in_key, true);\n\t\treturn item;\n\t}\n\n\t/**\n\t * Returns an object with all the nested path values.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * 'firstPath': '/path',\n\t * 'secondPath': '/path2'\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.getValue(ids[i]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Sets or inserts the reference to point to the given property object or to be equal to the given path string.\n\t *\n\t * @param {string} in_key - The key under which the entry is stored\n\t * @param {property-properties.BaseProperty|undefined|String} in_value - The property to assign to the reference or\n\t * the path to this property. If undefined is passed, the reference will be set to an empty string to\n\t * indicate an empty reference.\n\t * @throws If in_key is not a string\n\t * @throws If in_value is defined, but is not a property or a string.\n\t * @throws If map is read only\n\t */\n\tset(in_key, in_value) {\n\t\tif (!_.isString(in_key)) {\n\t\t\tthrow new TypeError(MSG.KEY_NOT_STRING + in_key);\n\t\t}\n\t\tvar value = ReferenceProperty._convertInputToPath(in_value);\n\t\tStringMapProperty.prototype.set.call(this, in_key, value);\n\t}\n\n\t/**\n\t * Sets or inserts the reference to point to the given property object or to be equal to the given path string.\n\t *\n\t * @param {string} in_key - The key under which the entry is stored\n\t * @param {property-properties.BaseProperty|undefined|String} in_value - The property to assign to the reference or\n\t * the path to this property. If undefined is passed, the reference will be set to an empty string to\n\t * indicate an empty reference.\n\t * @throws If in_key is not a string\n\t * @throws If in_value is defined, but is not a property or a string.\n\t * @deprecated\n\t */\n\tsetValue(...args) {\n\t\treturn this.set(...args);\n\t}\n\n\t/**\n\t * Inserts the reference to point to the given property object or to be equal to the given path string.\n\t *\n\t * @param {string} in_key - The key under which the entry is stored\n\t * @param {property-properties.BaseProperty|undefined|String} in_value - The property to assign to the reference or\n\t * the path to this property. If undefined is passed, the reference will be set to an empty string to\n\t * indicate an empty reference.\n\t * @throws If there is already an entry under in_key\n\t * @throws If in_value is defined, but is not a property or a string.\n\t */\n\tinsert(in_key, in_value) {\n\t\tvar value = ReferenceProperty._convertInputToPath(in_value);\n\t\tthis._insert(in_key, value, true);\n\t}\n\n\t/**\n\t * Checks whether the reference is valid. This is either the case when it is empty or when the referenced\n\t * property exists.\n\t *\n\t * @param {string} in_key - Key of the entry to check\n\t * @returns {boolean} True if the reference is valid, otherwise false.\n\t */\n\tisReferenceValid(in_key) {\n\t\treturn (\n\t\t\tthis.has(in_key) && (this.getValue(in_key) === \"\" || this.get(in_key) !== undefined)\n\t\t);\n\t}\n\n\t/**\n\t * Returns the string value stored in the map\n\t * @param {string} in_key - The key of the reference\n\t * @returns {string} The path string\n\t */\n\tgetValue(in_key) {\n\t\treturn this._getValue(in_key);\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_resolvePathSegment(in_segment, in_segmentType) {\n\t\t// Array tokens are automatically resolved\n\t\treturn in_segmentType === PathHelper.TOKEN_TYPES.ARRAY_TOKEN\n\t\t\t? this.get(in_segment, {\n\t\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t\t})\n\t\t\t: // Everything else is handled by the implementation in the base property\n\t\t\t\tAbstractStaticCollectionProperty.prototype._resolvePathSegment.call(\n\t\t\t\t\tthis,\n\t\t\t\t\tin_segment,\n\t\t\t\t\tin_segmentType,\n\t\t\t\t);\n\t}\n}\n\nReferenceMapProperty.prototype._typeid = \"Reference\";\n"]}
@@ -56,9 +56,11 @@ export class SetProperty extends IndexedCollectionBaseProperty {
56
56
  /**
57
57
  * Removes the given property from the set
58
58
  *
59
+ * Note: If the entry does not exist, a warning is logged and no error is thrown.
60
+ * This is intentional to support idempotent operations in collaborative editing scenarios.
61
+ *
59
62
  * @param {property-properties.NamedProperty|string} in_entry - The property or its URN to remove from the set
60
- * @return {property-properties.NamedProperty} the property that was removed.
61
- * @throws if trying to remove an entry that does not exist
63
+ * @return {property-properties.NamedProperty} the property that was removed, or undefined if not found
62
64
  */
63
65
  remove(in_entry: any): property;
64
66
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"setProperty.d.ts","sourceRoot":"","sources":["../../src/properties/setProperty.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH;IACC;;;;;;;;;OASG;IACH,wBAOC;IAJA,eAAsB;IAEtB,oEAAoE;IACpE,qBAA0B;IAgB3B;;;;;;;;;;;;;OAaG;IACH,aAZY,MAAM,CAuBjB;IA6CD;;;;;;;OAOG;IACH,+BAOC;IAED;;;;;;;;;OASG;IACH,iBAHW,uCAAsC,GACpC,YAAY,CAexB;IAED;;;;;;OAMG;IACH,gCASC;IAwBD;;;;;;;;;;;;;OAaG;IACH,YAXW,MAAM,GAAG,MAAM,MAAM,GAAG,MAAM,CAAC,oBAQ9B,YAAY,GAAG,SAAS,CAkCnC;IAYD;;;;;;;OAOG;IACH,2BA8BC;IAED;;;;;;;;OAQG;IACH,mCAPW,eAAe,GAAC,mBAAmB,GAAC,KAAQ,YAC5C,OAAO,cAEP,OAAO,QAUjB;IAED;;;;;;OAMG;IACH,kCAHW,eAAe,GAAC,mBAAmB,GAAC,KAAQ,QAYtD;IAED;;;;;;;OAOG;IACH,cAHY,eAAe,CAK1B;IAeD;;OAEG;IACH,cAKC;CACD"}
1
+ {"version":3,"file":"setProperty.d.ts","sourceRoot":"","sources":["../../src/properties/setProperty.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH;IACC;;;;;;;;;OASG;IACH,wBAOC;IAJA,eAAsB;IAEtB,oEAAoE;IACpE,qBAA0B;IAgB3B;;;;;;;;;;;;;OAaG;IACH,aAZY,MAAM,CAuBjB;IA6CD;;;;;;;OAOG;IACH,+BAOC;IAED;;;;;;;;;OASG;IACH,iBAHW,uCAAsC,GACpC,YAAY,CAexB;IAED;;;;;;;;OAQG;IACH,gCASC;IAwBD;;;;;;;;;;;;;OAaG;IACH,YAXW,MAAM,GAAG,MAAM,MAAM,GAAG,MAAM,CAAC,oBAQ9B,YAAY,GAAG,SAAS,CAkCnC;IAYD;;;;;;;OAOG;IACH,2BA8BC;IAED;;;;;;;;OAQG;IACH,mCAPW,eAAe,GAAC,mBAAmB,GAAC,KAAQ,YAC5C,OAAO,cAEP,OAAO,QAUjB;IAED;;;;;;OAMG;IACH,kCAHW,eAAe,GAAC,mBAAmB,GAAC,KAAQ,QAYtD;IAED;;;;;;;OAOG;IACH,cAHY,eAAe,CAK1B;IAeD;;OAEG;IACH,cAKC;CACD"}
@@ -151,9 +151,11 @@ export class SetProperty extends IndexedCollectionBaseProperty {
151
151
  /**
152
152
  * Removes the given property from the set
153
153
  *
154
+ * Note: If the entry does not exist, a warning is logged and no error is thrown.
155
+ * This is intentional to support idempotent operations in collaborative editing scenarios.
156
+ *
154
157
  * @param {property-properties.NamedProperty|string} in_entry - The property or its URN to remove from the set
155
- * @return {property-properties.NamedProperty} the property that was removed.
156
- * @throws if trying to remove an entry that does not exist
158
+ * @return {property-properties.NamedProperty} the property that was removed, or undefined if not found
157
159
  */
158
160
  remove(in_entry) {
159
161
  if (_.isString(in_entry)) {