@fluid-experimental/property-properties 2.0.0-dev.7.4.0.215930 → 2.0.0-dev.7.4.0.217212
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/enableValidations.d.ts +1 -0
- package/dist/enableValidations.d.ts.map +1 -1
- package/dist/enableValidations.js +1 -0
- package/dist/enableValidations.js.map +1 -1
- package/dist/properties/arrayProperty.d.ts +3 -0
- package/dist/properties/arrayProperty.d.ts.map +1 -1
- package/dist/properties/arrayProperty.js +3 -0
- package/dist/properties/arrayProperty.js.map +1 -1
- package/dist/properties/baseProperty.d.ts +1 -0
- package/dist/properties/baseProperty.d.ts.map +1 -1
- package/dist/properties/baseProperty.js +1 -0
- package/dist/properties/baseProperty.js.map +1 -1
- package/dist/properties/containerProperty.d.ts +1 -0
- package/dist/properties/containerProperty.d.ts.map +1 -1
- package/dist/properties/containerProperty.js +1 -0
- package/dist/properties/containerProperty.js.map +1 -1
- package/dist/properties/enumArrayProperty.d.ts +1 -0
- package/dist/properties/enumArrayProperty.d.ts.map +1 -1
- package/dist/properties/enumArrayProperty.js +1 -0
- package/dist/properties/enumArrayProperty.js.map +1 -1
- package/dist/properties/enumProperty.d.ts +1 -0
- package/dist/properties/enumProperty.d.ts.map +1 -1
- package/dist/properties/enumProperty.js +1 -0
- package/dist/properties/enumProperty.js.map +1 -1
- package/dist/properties/intProperties.d.ts +2 -0
- package/dist/properties/intProperties.d.ts.map +1 -1
- package/dist/properties/intProperties.js +2 -0
- package/dist/properties/intProperties.js.map +1 -1
- package/dist/properties/mapProperty.d.ts +1 -0
- package/dist/properties/mapProperty.d.ts.map +1 -1
- package/dist/properties/mapProperty.js +1 -0
- package/dist/properties/mapProperty.js.map +1 -1
- package/dist/properties/nodeProperty.d.ts +1 -0
- package/dist/properties/nodeProperty.d.ts.map +1 -1
- package/dist/properties/nodeProperty.js +1 -0
- package/dist/properties/nodeProperty.js.map +1 -1
- package/dist/properties/referenceArrayProperty.d.ts +1 -0
- package/dist/properties/referenceArrayProperty.d.ts.map +1 -1
- package/dist/properties/referenceArrayProperty.js +1 -0
- package/dist/properties/referenceArrayProperty.js.map +1 -1
- package/dist/properties/referenceMapProperty.d.ts +1 -0
- package/dist/properties/referenceMapProperty.d.ts.map +1 -1
- package/dist/properties/referenceMapProperty.js +1 -0
- package/dist/properties/referenceMapProperty.js.map +1 -1
- package/dist/properties/referenceProperty.d.ts +1 -0
- package/dist/properties/referenceProperty.d.ts.map +1 -1
- package/dist/properties/referenceProperty.js +1 -0
- package/dist/properties/referenceProperty.js.map +1 -1
- package/dist/properties/setProperty.d.ts +1 -0
- package/dist/properties/setProperty.d.ts.map +1 -1
- package/dist/properties/setProperty.js +1 -0
- package/dist/properties/setProperty.js.map +1 -1
- package/dist/properties/stringProperty.d.ts +1 -0
- package/dist/properties/stringProperty.d.ts.map +1 -1
- package/dist/properties/stringProperty.js +1 -0
- package/dist/properties/stringProperty.js.map +1 -1
- package/dist/properties/valueArrayProperty.d.ts +1 -0
- package/dist/properties/valueArrayProperty.d.ts.map +1 -1
- package/dist/properties/valueArrayProperty.js +1 -0
- package/dist/properties/valueArrayProperty.js.map +1 -1
- package/dist/properties/valueMapProperty.d.ts +1 -0
- package/dist/properties/valueMapProperty.d.ts.map +1 -1
- package/dist/properties/valueMapProperty.js +1 -0
- package/dist/properties/valueMapProperty.js.map +1 -1
- package/dist/properties/valueProperty.d.ts +1 -0
- package/dist/properties/valueProperty.d.ts.map +1 -1
- package/dist/properties/valueProperty.js +1 -0
- package/dist/properties/valueProperty.js.map +1 -1
- package/dist/propertyFactory.d.ts +3 -0
- package/dist/propertyFactory.d.ts.map +1 -1
- package/dist/propertyFactory.js +3 -0
- package/dist/propertyFactory.js.map +1 -1
- package/dist/propertyTemplate.d.ts +5 -6
- package/dist/propertyTemplate.d.ts.map +1 -1
- package/dist/propertyTemplate.js +3 -4
- package/dist/propertyTemplate.js.map +1 -1
- package/dist/propertyUtils.d.ts +3 -0
- package/dist/propertyUtils.d.ts.map +1 -1
- package/dist/propertyUtils.js +3 -0
- package/dist/propertyUtils.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +1 -1
- package/lib/enableValidations.d.ts +1 -0
- package/lib/enableValidations.d.ts.map +1 -1
- package/lib/enableValidations.js +1 -0
- package/lib/enableValidations.js.map +1 -1
- package/lib/properties/arrayProperty.d.ts +3 -0
- package/lib/properties/arrayProperty.d.ts.map +1 -1
- package/lib/properties/arrayProperty.js +3 -0
- package/lib/properties/arrayProperty.js.map +1 -1
- package/lib/properties/baseProperty.d.ts +1 -0
- package/lib/properties/baseProperty.d.ts.map +1 -1
- package/lib/properties/baseProperty.js +1 -0
- package/lib/properties/baseProperty.js.map +1 -1
- package/lib/properties/containerProperty.d.ts +1 -0
- package/lib/properties/containerProperty.d.ts.map +1 -1
- package/lib/properties/containerProperty.js +1 -0
- package/lib/properties/containerProperty.js.map +1 -1
- package/lib/properties/enumArrayProperty.d.ts +1 -0
- package/lib/properties/enumArrayProperty.d.ts.map +1 -1
- package/lib/properties/enumArrayProperty.js +1 -0
- package/lib/properties/enumArrayProperty.js.map +1 -1
- package/lib/properties/enumProperty.d.ts +1 -0
- package/lib/properties/enumProperty.d.ts.map +1 -1
- package/lib/properties/enumProperty.js +1 -0
- package/lib/properties/enumProperty.js.map +1 -1
- package/lib/properties/intProperties.d.ts +2 -0
- package/lib/properties/intProperties.d.ts.map +1 -1
- package/lib/properties/intProperties.js +2 -0
- package/lib/properties/intProperties.js.map +1 -1
- package/lib/properties/mapProperty.d.ts +1 -0
- package/lib/properties/mapProperty.d.ts.map +1 -1
- package/lib/properties/mapProperty.js +1 -0
- package/lib/properties/mapProperty.js.map +1 -1
- package/lib/properties/nodeProperty.d.ts +1 -0
- package/lib/properties/nodeProperty.d.ts.map +1 -1
- package/lib/properties/nodeProperty.js +1 -0
- package/lib/properties/nodeProperty.js.map +1 -1
- package/lib/properties/referenceArrayProperty.d.ts +1 -0
- package/lib/properties/referenceArrayProperty.d.ts.map +1 -1
- package/lib/properties/referenceArrayProperty.js +1 -0
- package/lib/properties/referenceArrayProperty.js.map +1 -1
- package/lib/properties/referenceMapProperty.d.ts +1 -0
- package/lib/properties/referenceMapProperty.d.ts.map +1 -1
- package/lib/properties/referenceMapProperty.js +1 -0
- package/lib/properties/referenceMapProperty.js.map +1 -1
- package/lib/properties/referenceProperty.d.ts +1 -0
- package/lib/properties/referenceProperty.d.ts.map +1 -1
- package/lib/properties/referenceProperty.js +1 -0
- package/lib/properties/referenceProperty.js.map +1 -1
- package/lib/properties/setProperty.d.ts +1 -0
- package/lib/properties/setProperty.d.ts.map +1 -1
- package/lib/properties/setProperty.js +1 -0
- package/lib/properties/setProperty.js.map +1 -1
- package/lib/properties/stringProperty.d.ts +1 -0
- package/lib/properties/stringProperty.d.ts.map +1 -1
- package/lib/properties/stringProperty.js +1 -0
- package/lib/properties/stringProperty.js.map +1 -1
- package/lib/properties/valueArrayProperty.d.ts +1 -0
- package/lib/properties/valueArrayProperty.d.ts.map +1 -1
- package/lib/properties/valueArrayProperty.js +1 -0
- package/lib/properties/valueArrayProperty.js.map +1 -1
- package/lib/properties/valueMapProperty.d.ts +1 -0
- package/lib/properties/valueMapProperty.d.ts.map +1 -1
- package/lib/properties/valueMapProperty.js +1 -0
- package/lib/properties/valueMapProperty.js.map +1 -1
- package/lib/properties/valueProperty.d.ts +1 -0
- package/lib/properties/valueProperty.d.ts.map +1 -1
- package/lib/properties/valueProperty.js +1 -0
- package/lib/properties/valueProperty.js.map +1 -1
- package/lib/propertyFactory.d.ts +3 -0
- package/lib/propertyFactory.d.ts.map +1 -1
- package/lib/propertyFactory.js +3 -0
- package/lib/propertyFactory.js.map +1 -1
- package/lib/propertyTemplate.d.ts +5 -6
- package/lib/propertyTemplate.d.ts.map +1 -1
- package/lib/propertyTemplate.js +3 -4
- package/lib/propertyTemplate.js.map +1 -1
- package/lib/propertyUtils.d.ts +3 -0
- package/lib/propertyUtils.d.ts.map +1 -1
- package/lib/propertyUtils.js +3 -0
- package/lib/propertyUtils.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setProperty.js","sourceRoot":"","sources":["../../src/properties/setProperty.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,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;AAC5B,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,IAAI,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC;AAE3C;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,6BAA6B;IAC7D;;;;;;;;;OASG;IACH,YAAY,SAAS,EAAE,QAAQ;QAC9B,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;QAEvB,oEAAoE;QACpE,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,mEAAmE;IAEnE;;;;;;OAMG;IACH,cAAc;QACb,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,SAAS;QACR,IAAI,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACxB,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CA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AAU,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SACzE;IACF,CAAC;IAED;;;;;;;OAOG;IACH,UAAU;QACT,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;OAMG;IACH,SAAS;QACR,IAAI,KAAK,GAAG,6BAA6B,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,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,eAAe,CAAC;AAChD,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 set property class\n */\n\nconst { PathHelper, TypeIdHelper } = require(\"@fluid-experimental/property-changeset\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst _ = require(\"lodash\");\nconst { AbstractStaticCollectionProperty } = require(\"./abstractStaticCollectionProperty\");\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { IndexedCollectionBaseProperty } = require(\"./indexedCollectionBaseProperty\");\nconst { LazyLoadedProperties: Property } = require(\"./lazyLoadedProperties\");\n\nvar PATH_TOKENS = BaseProperty.PATH_TOKENS;\n\n/**\n * A SetProperty is a collection class that can contain an unordered set of properties. These properties\n * must derive from NamedProperty and their URN is used to identify them within the set.\n */\nexport class SetProperty 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 *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.IndexedCollectionBaseProperty\n\t * @alias property-properties.SetProperty\n\t * @category Other Collections\n\t */\n\tconstructor(in_params, in_scope) {\n\t\tsuper(in_params);\n\n\t\tthis._scope = in_scope;\n\n\t\t/** Contains the actual entries of the set, indexed by their GUID */\n\t\tthis._dynamicChildren = {};\n\t}\n\n\t// A set property falls back to NamedProperty, if none is specified\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 * Returns an object with all the nested values contained in this property.\n\t * @return {object} An object representing the values of your property.\n\t * For example:\n\t *\n\t * ```json\n\t * {\n\t * position: {\n\t * x: 2,\n\t * y: 5\n\t * }\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]] =\n\t\t\t\tchild instanceof Property.ValueProperty || child instanceof Property.StringProperty\n\t\t\t\t\t? this.get(ids[i]).getValue()\n\t\t\t\t\t: child.getValues();\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns the full property type identifier for the ChangeSet including the enum type id\n\t * @param {boolean} [in_hideCollection=false] - If true the collection type (if applicable) will be omitted\n\t * @return {string} The typeid\n\t */\n\tgetFullTypeid(in_hideCollection = false) {\n\t\treturn in_hideCollection\n\t\t\t? this._typeid\n\t\t\t: TypeIdHelper.createSerializationTypeId(this._typeid, \"set\");\n\t}\n\n\t/**\n\t * Returns the path segment for a child\n\t *\n\t * @param {property-properties.NamedProperty} 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 \"[\" + in_childNode.getGuid() + \"]\";\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\t// Base Properties only support paths separated via dots\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 );\n\t}\n\n\t/**\n\t * Inserts a property into the set\n\t *\n\t * @param {property-properties.NamedProperty} in_property - The property to insert\n\t * @throws if trying to insert non-named properties\n\t * @throws if trying to insert a property that has a parent\n\t * @throws if a property already exists with the same guid as in_property\n\t */\n\tinsert(in_property) {\n\t\tif (in_property instanceof AbstractStaticCollectionProperty && in_property.has(\"guid\")) {\n\t\t\tvar guid = in_property.getGuid();\n\t\t\tthis._insert(guid, in_property, true);\n\t\t} else {\n\t\t\tthrow new Error(MSG.CANT_INSERT_NON_NAMED_PROPERTIES);\n\t\t}\n\t}\n\n\t/**\n\t * Adds a property to the set.\n\t *\n\t * - If the property's key exists, the entry is replaced with new one.\n\t *\n\t * - If the property's key does not exist, the property is appended.\n\t *\n\t * @param {NamedProperty|NamedNodeProperty|Object} in_property - The property to add to the list.\n\t * @return { BaseProperty }\n\t */\n\tset(in_property) {\n\t\tthis._checkIsNotReadOnly(true);\n\n\t\tif (in_property instanceof AbstractStaticCollectionProperty && in_property.has(\"guid\")) {\n\t\t\tvar guid = in_property.getGuid();\n\t\t\tif (this.has(guid)) {\n\t\t\t\tthis.remove(guid);\n\t\t\t}\n\n\t\t\tthis.insert(in_property);\n\t\t} else {\n\t\t\tthrow new Error(MSG.CANT_INSERT_NON_NAMED_PROPERTIES);\n\t\t}\n\t}\n\n\t/**\n\t * Removes the given property from the set\n\t *\n\t * @param {property-properties.NamedProperty|string} in_entry - The property or its URN to remove from the set\n\t * @return {property-properties.NamedProperty} the property that was removed.\n\t * @throws if trying to remove an entry that does not exist\n\t */\n\tremove(in_entry) {\n\t\tif (_.isString(in_entry)) {\n\t\t\tvar item = this.get(in_entry);\n\t\t\tthis._removeByKey(in_entry, true);\n\t\t\treturn item;\n\t\t} else {\n\t\t\tthis._removeByKey(in_entry.getGuid(), true);\n\t\t\treturn in_entry;\n\t\t}\n\t}\n\n\t/**\n\t * Returns an Object with all the entries of the set.\n\t *\n\t * WARNING: This is a direct access to the internal data-structure and the collection MUST NOT be modified.\n\t * It is read only for fast access and iteration. Insertion and deletion MUST be done via the insert and\n\t * remove functions of this class.\n\t *\n\t * @return {Object<String, property-properties.NamedProperty>} The map with all entries in the set.\n\t */\n\tgetEntriesReadOnly() {\n\t\treturn this._dynamicChildren;\n\t}\n\n\t/**\n\t * Returns the name of all the sub-properties of this property.\n\t *\n\t * @return {Array.<string>} An array of all the property ids\n\t */\n\tgetIds() {\n\t\treturn Object.keys(this._dynamicChildren);\n\t}\n\n\t/**\n\t * Returns the collection entry with the given ID\n\t *\n\t * @param {string | Array<string | number>} in_ids - key of the entry to return or an array of keys if an array is\n\t * passed, the .get function will be performed on each id in sequence for example .get(['position','x']) is\n\t * equivalent to .get('position').get('x'). If .get resolves to a ReferenceProperty, it will return the property\n\t * that the ReferenceProperty 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 if none could be\n\t * 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\tvar prop = this;\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\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\treturn prop;\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether a property 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 * Adds a list of properties to the set.\n\t * See {@link SetProperty.setValues}\n\t * @param {NamedProperty[]|NamedNodeProperty[]|Object[]} in_properties - The list of properties to add to the list\n\t * @param {Boolean} in_typed - If the set'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_properties, in_typed) {\n\t\tthis._checkIsNotReadOnly(true);\n\n\t\tvar that = this;\n\t\t_.each(in_properties, function (property) {\n\t\t\tif (property instanceof BaseProperty) {\n\t\t\t\tthat.set(property);\n\t\t\t} else {\n\t\t\t\t// If value is a JSON object (i.e: passed through a default value), create the property and add it to the set.\n\t\t\t\tif (in_typed) {\n\t\t\t\t\tthat.set(\n\t\t\t\t\t\tProperty.PropertyFactory._createProperty(\n\t\t\t\t\t\t\tproperty.typeid || that._typeid,\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\tproperty.value,\n\t\t\t\t\t\t\tthat._getScope(),\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthat.set(\n\t\t\t\t\t\tProperty.PropertyFactory._createProperty(\n\t\t\t\t\t\t\tthat._typeid,\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\tthat._getScope(),\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 * Adds a list of properties to the set. See {@link SetProperty.setValues}\n\t * @param {NamedProperty[]|NamedNodeProperty[]|Object[]} in_properties - The list of properties to add to the list\n\t * @param {boolean} in_typed - If the set's items have a typeid and a value then create the properties with that\n\t * typeid, else use the set's typeid (support polymorphic items).\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 * @override\n\t */\n\t_setValues(in_properties, in_typed, in_initial) {\n\t\tif (in_initial) {\n\t\t\tthis.clear();\n\t\t}\n\n\t\tthis._setValuesInternal(in_properties, in_typed);\n\t}\n\n\t/**\n\t * Adds a list of properties to the set.\n\t * - If the property's key exists, the entry is replaced with new one.\n\t * - If the property's key does not exist, the property is appended.\n\t * @param {NamedProperty[]|NamedNodeProperty[]|Object[]} in_properties - The list of properties to add to the list\n\t * @override\n\t */\n\tsetValues(in_properties) {\n\t\tvar checkoutView = this._getCheckoutView();\n\t\tif (checkoutView !== undefined) {\n\t\t\tcheckoutView.pushNotificationDelayScope();\n\t\t\tSetProperty.prototype._setValues.call(this, in_properties, false, false);\n\t\t\tcheckoutView.popNotificationDelayScope();\n\t\t} else {\n\t\t\tSetProperty.prototype._setValues.call(this, in_properties, false, false);\n\t\t}\n\t}\n\n\t/**\n\t * Returns all entries of the set 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.NamedProperty>} Array with all entries of the set. This array is a shallow copy\n\t * which can be modified by the caller without effects on the set.\n\t */\n\tgetAsArray() {\n\t\treturn _.values(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 * set belongs to. If there is a workspace scope return it, else return the scope of this set.\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 * Delete all values from Set\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\nSetProperty.prototype._typeid = \"NamedProperty\";\nSetProperty.prototype._context = \"set\";\n"]}
|
|
1
|
+
{"version":3,"file":"setProperty.js","sourceRoot":"","sources":["../../src/properties/setProperty.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,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;AAC5B,MAAM,EAAE,gCAAgC,EAAE,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAC3F,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,6BA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AC,MAAM,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AAED,WAAW,CAAC,SAAS,CAAC,OAAO,GAAG,eAAe,CAAC;AAChD,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 set property class\n */\n\nconst { PathHelper, TypeIdHelper } = require(\"@fluid-experimental/property-changeset\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst _ = require(\"lodash\");\nconst { AbstractStaticCollectionProperty } = require(\"./abstractStaticCollectionProperty\");\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { IndexedCollectionBaseProperty } = require(\"./indexedCollectionBaseProperty\");\nconst { LazyLoadedProperties: Property } = require(\"./lazyLoadedProperties\");\n\nvar PATH_TOKENS = BaseProperty.PATH_TOKENS;\n\n/**\n * A SetProperty is a collection class that can contain an unordered set of properties. These properties\n * must derive from NamedProperty and their URN is used to identify them within the set.\n * @internal\n */\nexport class SetProperty 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 *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.IndexedCollectionBaseProperty\n\t * @alias property-properties.SetProperty\n\t * @category Other Collections\n\t */\n\tconstructor(in_params, in_scope) {\n\t\tsuper(in_params);\n\n\t\tthis._scope = in_scope;\n\n\t\t/** Contains the actual entries of the set, indexed by their GUID */\n\t\tthis._dynamicChildren = {};\n\t}\n\n\t// A set property falls back to NamedProperty, if none is specified\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 * Returns an object with all the nested values contained in this property.\n\t * @return {object} An object representing the values of your property.\n\t * For example:\n\t *\n\t * ```json\n\t * {\n\t * position: {\n\t * x: 2,\n\t * y: 5\n\t * }\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]] =\n\t\t\t\tchild instanceof Property.ValueProperty || child instanceof Property.StringProperty\n\t\t\t\t\t? this.get(ids[i]).getValue()\n\t\t\t\t\t: child.getValues();\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns the full property type identifier for the ChangeSet including the enum type id\n\t * @param {boolean} [in_hideCollection=false] - If true the collection type (if applicable) will be omitted\n\t * @return {string} The typeid\n\t */\n\tgetFullTypeid(in_hideCollection = false) {\n\t\treturn in_hideCollection\n\t\t\t? this._typeid\n\t\t\t: TypeIdHelper.createSerializationTypeId(this._typeid, \"set\");\n\t}\n\n\t/**\n\t * Returns the path segment for a child\n\t *\n\t * @param {property-properties.NamedProperty} 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 \"[\" + in_childNode.getGuid() + \"]\";\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\t// Base Properties only support paths separated via dots\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 );\n\t}\n\n\t/**\n\t * Inserts a property into the set\n\t *\n\t * @param {property-properties.NamedProperty} in_property - The property to insert\n\t * @throws if trying to insert non-named properties\n\t * @throws if trying to insert a property that has a parent\n\t * @throws if a property already exists with the same guid as in_property\n\t */\n\tinsert(in_property) {\n\t\tif (in_property instanceof AbstractStaticCollectionProperty && in_property.has(\"guid\")) {\n\t\t\tvar guid = in_property.getGuid();\n\t\t\tthis._insert(guid, in_property, true);\n\t\t} else {\n\t\t\tthrow new Error(MSG.CANT_INSERT_NON_NAMED_PROPERTIES);\n\t\t}\n\t}\n\n\t/**\n\t * Adds a property to the set.\n\t *\n\t * - If the property's key exists, the entry is replaced with new one.\n\t *\n\t * - If the property's key does not exist, the property is appended.\n\t *\n\t * @param {NamedProperty|NamedNodeProperty|Object} in_property - The property to add to the list.\n\t * @return { BaseProperty }\n\t */\n\tset(in_property) {\n\t\tthis._checkIsNotReadOnly(true);\n\n\t\tif (in_property instanceof AbstractStaticCollectionProperty && in_property.has(\"guid\")) {\n\t\t\tvar guid = in_property.getGuid();\n\t\t\tif (this.has(guid)) {\n\t\t\t\tthis.remove(guid);\n\t\t\t}\n\n\t\t\tthis.insert(in_property);\n\t\t} else {\n\t\t\tthrow new Error(MSG.CANT_INSERT_NON_NAMED_PROPERTIES);\n\t\t}\n\t}\n\n\t/**\n\t * Removes the given property from the set\n\t *\n\t * @param {property-properties.NamedProperty|string} in_entry - The property or its URN to remove from the set\n\t * @return {property-properties.NamedProperty} the property that was removed.\n\t * @throws if trying to remove an entry that does not exist\n\t */\n\tremove(in_entry) {\n\t\tif (_.isString(in_entry)) {\n\t\t\tvar item = this.get(in_entry);\n\t\t\tthis._removeByKey(in_entry, true);\n\t\t\treturn item;\n\t\t} else {\n\t\t\tthis._removeByKey(in_entry.getGuid(), true);\n\t\t\treturn in_entry;\n\t\t}\n\t}\n\n\t/**\n\t * Returns an Object with all the entries of the set.\n\t *\n\t * WARNING: This is a direct access to the internal data-structure and the collection MUST NOT be modified.\n\t * It is read only for fast access and iteration. Insertion and deletion MUST be done via the insert and\n\t * remove functions of this class.\n\t *\n\t * @return {Object<String, property-properties.NamedProperty>} The map with all entries in the set.\n\t */\n\tgetEntriesReadOnly() {\n\t\treturn this._dynamicChildren;\n\t}\n\n\t/**\n\t * Returns the name of all the sub-properties of this property.\n\t *\n\t * @return {Array.<string>} An array of all the property ids\n\t */\n\tgetIds() {\n\t\treturn Object.keys(this._dynamicChildren);\n\t}\n\n\t/**\n\t * Returns the collection entry with the given ID\n\t *\n\t * @param {string | Array<string | number>} in_ids - key of the entry to return or an array of keys if an array is\n\t * passed, the .get function will be performed on each id in sequence for example .get(['position','x']) is\n\t * equivalent to .get('position').get('x'). If .get resolves to a ReferenceProperty, it will return the property\n\t * that the ReferenceProperty 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 if none could be\n\t * 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\tvar prop = this;\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\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\treturn prop;\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether a property 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 * Adds a list of properties to the set.\n\t * See {@link SetProperty.setValues}\n\t * @param {NamedProperty[]|NamedNodeProperty[]|Object[]} in_properties - The list of properties to add to the list\n\t * @param {Boolean} in_typed - If the set'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_properties, in_typed) {\n\t\tthis._checkIsNotReadOnly(true);\n\n\t\tvar that = this;\n\t\t_.each(in_properties, function (property) {\n\t\t\tif (property instanceof BaseProperty) {\n\t\t\t\tthat.set(property);\n\t\t\t} else {\n\t\t\t\t// If value is a JSON object (i.e: passed through a default value), create the property and add it to the set.\n\t\t\t\tif (in_typed) {\n\t\t\t\t\tthat.set(\n\t\t\t\t\t\tProperty.PropertyFactory._createProperty(\n\t\t\t\t\t\t\tproperty.typeid || that._typeid,\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\tproperty.value,\n\t\t\t\t\t\t\tthat._getScope(),\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthat.set(\n\t\t\t\t\t\tProperty.PropertyFactory._createProperty(\n\t\t\t\t\t\t\tthat._typeid,\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\tproperty,\n\t\t\t\t\t\t\tthat._getScope(),\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 * Adds a list of properties to the set. See {@link SetProperty.setValues}\n\t * @param {NamedProperty[]|NamedNodeProperty[]|Object[]} in_properties - The list of properties to add to the list\n\t * @param {boolean} in_typed - If the set's items have a typeid and a value then create the properties with that\n\t * typeid, else use the set's typeid (support polymorphic items).\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 * @override\n\t */\n\t_setValues(in_properties, in_typed, in_initial) {\n\t\tif (in_initial) {\n\t\t\tthis.clear();\n\t\t}\n\n\t\tthis._setValuesInternal(in_properties, in_typed);\n\t}\n\n\t/**\n\t * Adds a list of properties to the set.\n\t * - If the property's key exists, the entry is replaced with new one.\n\t * - If the property's key does not exist, the property is appended.\n\t * @param {NamedProperty[]|NamedNodeProperty[]|Object[]} in_properties - The list of properties to add to the list\n\t * @override\n\t */\n\tsetValues(in_properties) {\n\t\tvar checkoutView = this._getCheckoutView();\n\t\tif (checkoutView !== undefined) {\n\t\t\tcheckoutView.pushNotificationDelayScope();\n\t\t\tSetProperty.prototype._setValues.call(this, in_properties, false, false);\n\t\t\tcheckoutView.popNotificationDelayScope();\n\t\t} else {\n\t\t\tSetProperty.prototype._setValues.call(this, in_properties, false, false);\n\t\t}\n\t}\n\n\t/**\n\t * Returns all entries of the set 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.NamedProperty>} Array with all entries of the set. This array is a shallow copy\n\t * which can be modified by the caller without effects on the set.\n\t */\n\tgetAsArray() {\n\t\treturn _.values(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 * set belongs to. If there is a workspace scope return it, else return the scope of this set.\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 * Delete all values from Set\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\nSetProperty.prototype._typeid = \"NamedProperty\";\nSetProperty.prototype._context = \"set\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringProperty.d.ts","sourceRoot":"","sources":["../../src/properties/stringProperty.js"],"names":[],"mappings":"AAuDA
|
|
1
|
+
{"version":3,"file":"stringProperty.d.ts","sourceRoot":"","sources":["../../src/properties/stringProperty.js"],"names":[],"mappings":"AAuDA;;;GAGG;AACH;IACC;;;;;;;OAOG;IACH,wBAEC;IAED;;;OAGG;IACH,YAFa,MAAM,CAIlB;IAsED;;;;;;;OAOG;IACH,oBALW,MAAM,YACN,MAAM,QAOhB;IAED;;;;;OAKG;IACH,eAJW,MAAM,GAEJ,MAAM,CAMlB;IAED;;;;OAIG;IACH,0BAHW,MAAM,YACN,MAAM,QAMhB;IAmBD;;;;;;;;;;OAUG;IACH,uBARW,MAAM,kBACN,MAAM,UAgChB;IAED;;OAEG;IACH,kHAgEC;IAiCD;;;OAGG;IACH,mBAHW,MAAM,QAMhB;IAED;;;;;OAKG;IACH,sBAJW,MAAM,cACN,OAAO,QAKjB;IAED;;;OAGG;IACH,qBAHW,MAAM,QAKhB;IAED;;;OAGG;IACH,aAHa,KAAK,CAKjB;IAED;;;;;;;OAOG;IACH,oBALW,MAAM,oBACN,OAAO,GAEL,OAAO,CAyBnB;IAsHD;;;;;;OAMG;IACH,cAJW,MAAM,gBACN,MAAM,QAWhB;IAED;;;;;;;OAOG;IACH,mBAJW,MAAM,aACN,MAAM,QAKhB;IAED;;;;OAIG;IACH,cAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;;;;;;OAQG;IACH,yBAJW,MAAM,YACN,MAAM,GAAG,MAAM,MAAM,CAAC,QAQhC;IAyCD;;;OAGG;IACH,kDAEC;IAED;;;;OA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,SAAS;QAC3C,IAAI,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5D,IAAI,CAAC,aAAa;gBACjB,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC;oBACzC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;SACpD;aAAM;YACN,MAAM,KAAK,CAAC,oEAAoE,CAAC,CAAC;SAClF;IACF,CAAC;IAED;;;;OAIG;IACH,kBAAkB,CAAC,WAAW,EAAE,SAAS;QACxC,IAAI,CAAC,aAAa;YACjB,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC;gBACzC,SAAS;gBACT,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,KAAK;QACR,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IAED,IAAI,KAAK,CAAC,GAAG;QACZ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,kBAAkB;IAClB,SAAS,CAAC,WAAW,EAAE,yBAAyB;QAC/C,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,kBAAkB;IAClB,yBAAyB,CAAC,WAAW,EAAE,yBAAyB;QAC/D,OAAO,SAAS,CAAC;IAClB,CAAC;CACD;AAED,cAAc,CAAC,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;AAC5C,cAAc,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC7C,cAAc,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Definition of the StringProperty class\n */\n\nconst { ChangeSet } = require(\"@fluid-experimental/property-changeset\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst { ConsoleUtils } = require(\"@fluid-experimental/property-common\");\nconst _ = require(\"lodash\");\nconst { ArrayProperty } = require(\"./arrayProperty\");\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { ValueArrayProperty } = require(\"./valueArrayProperty\");\n\nvar MODIFIED_STATE_FLAGS = BaseProperty.MODIFIED_STATE_FLAGS;\n\n// Some global constant objects that are used to indicate a few special\n// cases for the dirty object. If the string was directly set to a literal,\n// we don't need to store any ChangeSet, we only need to store the information\n// that it was updated to a literal and the dirty flags.\n// By using these special objects we avoid the memory overhead of having a separate\n// object for each array in this state.\nvar PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE = {\n\tpending: \"setAsLiteral\",\n\tdirty: \"setAsLiteral\",\n\tflags: MODIFIED_STATE_FLAGS.PENDING_CHANGE | MODIFIED_STATE_FLAGS.DIRTY,\n};\nvar NO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE = {\n\tpending: \"setAsLiteral\",\n\tdirty: undefined,\n\tflags: MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n};\n\nvar DIRTY_AND_NO_PENDING_SET_TO_PROPERTY_VALUE = {\n\tpending: undefined,\n\tdirty: \"setAsLiteral\",\n\t_flags: MODIFIED_STATE_FLAGS.DIRTY,\n\tset flags(flags) {\n\t\tthis._flags = flags;\n\t\tconsole.log(\"flags was changed!\");\n\t},\n\tget flags() {\n\t\treturn this._flags;\n\t},\n};\n\nvar STRING_PROPERTY_SET_PROPERTY_VALUE_STATE_FLAGS = [\n\tundefined,\n\tNO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE,\n\tDIRTY_AND_NO_PENDING_SET_TO_PROPERTY_VALUE,\n\tPENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE,\n];\n\n/**\n * A primitive property for a string value.\n */\nexport class StringProperty extends ValueArrayProperty {\n\t/**\n\t * @param {Object=} in_params - The parameters\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueArrayProperty\n\t * @alias property-properties.StringProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Get the string value\n\t * @returns {string} the JavaScript string primitive value of this StringProperty\n\t */\n\tgetValue() {\n\t\treturn this._dataArrayRef;\n\t}\n\n\t/**\n\t * Private helper function to update the internal dirty and pending changes\n\t *\n\t * @param {property-properties.SerializedChangeSet} in_changeSet - The changeset to apply\n\t * @private\n\t */\n\t_updateChanges(in_changeSet) {\n\t\t// we need to convert the format to allow the application of the changes\n\t\t// since _performApplyAfterOnPropertyArray only understands insert/modify/remove commands\n\t\tvar pendingChangesWereSetBefore = false;\n\t\tvar pendingChanges = this._getPendingChanges();\n\n\t\tif (_.isString(pendingChanges)) {\n\t\t\tpendingChanges = { insert: [[0, pendingChanges]] };\n\t\t\tpendingChangesWereSetBefore = true;\n\t\t}\n\t\tChangeSet.prototype._performApplyAfterOnPropertyArray(\n\t\t\tpendingChanges,\n\t\t\tin_changeSet,\n\t\t\tthis.getFullTypeid(true),\n\t\t);\n\t\tif (pendingChangesWereSetBefore) {\n\t\t\tpendingChanges = pendingChanges.insert[0][1];\n\t\t}\n\n\t\tvar dirtyChangesWereSetBefore = false;\n\t\tvar dirtyChanges = this._getDirtyChanges();\n\n\t\tif (_.isString(dirtyChanges)) {\n\t\t\tdirtyChanges = { insert: [[0, dirtyChanges]] };\n\t\t\tdirtyChangesWereSetBefore = true;\n\t\t}\n\t\tChangeSet.prototype._performApplyAfterOnPropertyArray(\n\t\t\tdirtyChanges,\n\t\t\tin_changeSet,\n\t\t\tthis.getFullTypeid(true),\n\t\t);\n\t\tif (dirtyChangesWereSetBefore) {\n\t\t\tdirtyChanges = dirtyChanges.insert[0][1];\n\t\t}\n\n\t\tthis._setChanges(pendingChanges, dirtyChanges);\n\t}\n\n\t_getPendingChanges() {\n\t\tif (\n\t\t\tthis._dirty === PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === NO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE\n\t\t) {\n\t\t\treturn this.getValue();\n\t\t}\n\n\t\treturn (this._dirty && this._dirty.pending) || {};\n\t}\n\n\t_getDirtyChanges() {\n\t\tif (\n\t\t\tthis._dirty === PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === DIRTY_AND_NO_PENDING_SET_TO_PROPERTY_VALUE\n\t\t) {\n\t\t\treturn this.getValue();\n\t\t} else if (this._dirty === NO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE) {\n\t\t\treturn {};\n\t\t}\n\n\t\treturn (this._dirty && this._dirty.dirty) || {};\n\t}\n\n\t/**\n\t * inserts a string starting at a position and shifts the rest of\n\t * the String to the right. Will not overwrite existing values.\n\t * @param {number} in_position - Target index\n\t * @param {string} in_value - Value to be inserted\n\t * @throws If in_position is smaller than zero, larger than the length of the string or not a number\n\t * @throws If in_value is not a string\n\t */\n\tinsert(in_position, in_value) {\n\t\tConsoleUtils.assert(_.isString(in_value), MSG.IN_VALUE_MUST_BE_STRING + in_value);\n\t\tthis._insertRange(in_position, in_value);\n\t}\n\n\t/**\n\t * Adds letters to the end of the string\n\t * @param {string} in_value - The string to be pushed\n\t * @throws If in_value is not a string\n\t * @returns {number} The new length of the string.\n\t */\n\tpush(in_value) {\n\t\tConsoleUtils.assert(_.isString(in_value), MSG.IN_VALUE_MUST_BE_STRING + in_value);\n\t\tthis._insertRange(this._dataArrayRef.length, in_value);\n\t\treturn this.getLength();\n\t}\n\n\t/**\n\t * inserts values\n\t * @param {number} in_position - Target index\n\t * @param {string} in_value - The string to be inserted\n\t */\n\t_insertRange(in_position, in_value) {\n\t\tthis._checkIsNotReadOnly(true);\n\t\tthis._insertRangeWithoutDirtying(in_position, in_value);\n\t\tthis._setDirty();\n\t}\n\n\t/**\n\t * Returns the full property type identifier for the ChangeSet including the enum type id\n\t * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted\n\t * since that is not aplicable here, this param is ignored\n\t * @returns {string} The typeid\n\t */\n\tgetFullTypeid(in_hideCollection) {\n\t\treturn this._typeid;\n\t}\n\n\t/**\n\t * returns the String to an empty string.\n\t */\n\tclear() {\n\t\tthis.setValue(\"\");\n\t}\n\n\t/**\n\t * removes a given number of elements from the array property and shifts\n\t * remaining values to the left.\n\t * @param {number} in_offset - Target start index\n\t * @param {number} in_deleteCount - number of elements to be deleted\n\t * @throws If in_offset is not a number\n\t * @throws If in_deleteCount is not a number\n\t * @throws If trying to remove an item with a parent\n\t * @throws If in_offset is smaller than zero or if in_offset + in_delete count is larger than the length of the array\n\t * @returns {String} the part of the string that was removed.\n\t */\n\tremoveRange(in_offset, in_deleteCount) {\n\t\tConsoleUtils.assert(\n\t\t\t_.isNumber(in_offset),\n\t\t\tMSG.NOT_NUMBER + \"in_offset, method: StringProperty.remove or .removeRange\",\n\t\t);\n\t\tConsoleUtils.assert(\n\t\t\t_.isNumber(in_deleteCount),\n\t\t\tMSG.NOT_NUMBER + \"in_deleteCount, method: StringProperty.remove or .removeRange\",\n\t\t);\n\t\tConsoleUtils.assert(\n\t\t\tin_offset + in_deleteCount < this.length + 1 && in_offset >= 0 && in_deleteCount > 0,\n\t\t\tMSG.REMOVE_OUT_OF_BOUNDS +\n\t\t\t\t\"Cannot remove \" +\n\t\t\t\tin_deleteCount +\n\t\t\t\t\" items starting at index \" +\n\t\t\t\tin_offset,\n\t\t);\n\t\tvar result = \"\";\n\t\tfor (var i = in_offset; i < in_offset + in_deleteCount; i++) {\n\t\t\tresult += this.get(i);\n\t\t}\n\t\tthis._checkIsNotReadOnly(true);\n\t\tthis._removeRangeWithoutDirtying(in_offset, in_deleteCount);\n\t\tthis._setDirty();\n\t\treturn result;\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_deserialize(in_serializedObj, in_reportToView, in_filteringOptions, in_createChangeSet) {\n\t\tif (\n\t\t\t(in_serializedObj.remove && in_serializedObj.remove.length > 0) ||\n\t\t\t(in_serializedObj.modify && in_serializedObj.modify.length > 0) ||\n\t\t\t(in_serializedObj.insert &&\n\t\t\t\t(in_serializedObj.insert.length > 1 ||\n\t\t\t\t\t(in_serializedObj.insert.length === 1 &&\n\t\t\t\t\t\t(in_serializedObj.insert[0][0] !== 0 ||\n\t\t\t\t\t\t\t!_.isString(in_serializedObj.insert[0][1])))))\n\t\t) {\n\t\t\tthrow new Error(MSG.NO_NORMALIZED_CHANGESET);\n\t\t}\n\n\t\tvar oldStringLength = this._dataArrayRef.length;\n\t\tvar newStringData;\n\t\tif (_.isString(in_serializedObj)) {\n\t\t\treturn this._setValue(in_serializedObj, in_reportToView) ? in_serializedObj : {};\n\t\t} else {\n\t\t\tif (!in_serializedObj.insert || !in_serializedObj.insert[0]) {\n\t\t\t\t// we've got an empty object, so we have to wipe everything we've got\n\t\t\t\tif (oldStringLength > 0) {\n\t\t\t\t\tthis.removeRange(0, oldStringLength, in_reportToView);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tremove: [[0, oldStringLength]],\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\t// the string was already empty, nothing has changed\n\t\t\t\t\treturn {};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewStringData = in_serializedObj.insert[0][1];\n\t\t\t}\n\t\t}\n\n\t\tif (newStringData === this._dataArrayRef) {\n\t\t\t// nothing changed\n\t\t\treturn {};\n\t\t}\n\n\t\t// check if something was attached (very common case)\n\t\tif (newStringData.length > oldStringLength) {\n\t\t\tif (newStringData.substring(0, oldStringLength) === this._dataArrayRef) {\n\t\t\t\tvar appendChanges = {\n\t\t\t\t\tinsert: [[oldStringLength, newStringData.substring(oldStringLength)]],\n\t\t\t\t};\n\t\t\t\tthis.insertRange(\n\t\t\t\t\toldStringLength,\n\t\t\t\t\tnewStringData.substring(oldStringLength),\n\t\t\t\t\tin_reportToView,\n\t\t\t\t);\n\t\t\t\treturn appendChanges;\n\t\t\t}\n\t\t}\n\n\t\t// most simplistic diff method: Remove all existing data and insert the new data\n\t\tvar simpleChanges = {\n\t\t\tinsert: [[0, newStringData]],\n\t\t};\n\t\tif (oldStringLength > 0) {\n\t\t\tsimpleChanges.remove = [[0, oldStringLength]];\n\t\t\tthis._removeRangeWithoutDirtying(0, oldStringLength, in_reportToView);\n\t\t}\n\t\tthis.insertRange(0, newStringData, in_reportToView);\n\t\treturn simpleChanges;\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. Has no effect for\n\t * ArrayProperty.\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. WARNING: if there are loops in the references\n\t * this can result in an infinite loop\n\t *\n\t * @returns {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\treturn in_dirtyOnly\n\t\t\t? ArrayProperty.prototype._serialize.call(\n\t\t\t\t\tthis,\n\t\t\t\t\tin_dirtyOnly,\n\t\t\t\t\tin_includeRootTypeid,\n\t\t\t\t\tin_dirtinessType,\n\t\t\t )\n\t\t\t: this._dataArrayRef;\n\t}\n\n\t/**\n\t * @param {string} in_value - The new value\n\t * @throws If string property is read only\n\t */\n\tsetValue(in_value) {\n\t\tthis._checkIsNotReadOnly(true);\n\t\tthis._setValue(in_value, true);\n\t}\n\n\t/**\n\t * See {@link StringProperty.setValues}\n\t * @param {string} in_values - The new values\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_setValues(in_values, in_initial) {\n\t\tthrow new Error(MSG.NO_VALUE_PROPERTY_SETVALUES);\n\t}\n\n\t/**\n\t * @param {string} in_values - The new values\n\t * @throws always - Cannot use .setValues on a StringProperty. Use .setValue() instead.\n\t */\n\tsetValues(in_values) {\n\t\tStringProperty.prototype._setValues.call(this, in_values, false);\n\t}\n\n\t/**\n\t * @return { never }\n\t * @throws always - cannot call .getValues on a string. Use .getValue() instead\n\t */\n\tgetValues() {\n\t\tthrow new Error(MSG.NO_VALUE_PROPERTY_GETVALUES);\n\t}\n\n\t/**\n\t * Internal function to update the value of a property\n\t *\n\t * @param {string} in_value - The new value\n\t * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout view\n\t * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t * @returns {boolean} true if the value was actually changed\n\t */\n\t_setValue(in_value, in_reportToView) {\n\t\tvar oldValue = this._dataArrayRef;\n\t\tvar castedValue = String(in_value);\n\t\tvar changed = castedValue !== oldValue;\n\t\tif (changed) {\n\t\t\tvar stringLength = this._dataArrayRef.length;\n\t\t\tif (stringLength > 0) {\n\t\t\t\tthis._dataArrayRemoveRange(0, stringLength);\n\t\t\t}\n\t\t\tthis._dataArrayInsertRange(0, castedValue);\n\n\t\t\tthis._dirty = PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE;\n\n\t\t\t// The assignment in the line above already set this property to\n\t\t\t// dirty, so we only update the parent (instead of calling\n\t\t\t// setDirty on this property)\n\t\t\tif (this._parent) {\n\t\t\t\tthis._parent._setDirty(in_reportToView, this);\n\t\t\t} else if (in_reportToView === true || in_reportToView === undefined) {\n\t\t\t\tthis._reportDirtinessToView();\n\t\t\t}\n\t\t}\n\t\treturn changed;\n\t}\n\n\t/**\n\t * Sets the pending and dirty changesets\n\t *\n\t * @param {property-properties.SerializedChangeSet|undefined|null} in_pending - The pending changeset. If null is\n\t * passed, no change will be applied. undefined indicates that the changes should be reset\n\t * @param {property-properties.SerializedChangeSet|undefined|null} in_dirty - The dirty changeset. If null is\n\t * passed, no change will be applied. undefined indicates that the changes should be reset\n\t */\n\t_setChanges(in_pending, in_dirty) {\n\t\tif (\n\t\t\tthis._dirty === PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === NO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === DIRTY_AND_NO_PENDING_SET_TO_PROPERTY_VALUE\n\t\t) {\n\t\t\tlet newFlags = this._dirty.flags;\n\t\t\tif (in_pending === undefined) {\n\t\t\t\tnewFlags &= 0xffffffff ^ BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE;\n\t\t\t}\n\t\t\tif (in_dirty === undefined) {\n\t\t\t\tnewFlags &= 0xffffffff ^ BaseProperty.MODIFIED_STATE_FLAGS.DIRTY;\n\t\t\t}\n\t\t\tthis._dirty = STRING_PROPERTY_SET_PROPERTY_VALUE_STATE_FLAGS[newFlags];\n\t\t} else {\n\t\t\tArrayProperty.prototype._setChanges.call(this, in_pending, in_dirty);\n\t\t}\n\t}\n\n\t/**\n\t * Sets the dirty flags for this property\n\t * @param {Number} in_flags - The dirty flags\n\t */\n\t_setDirtyFlags(in_flags) {\n\t\tif (\n\t\t\tthis._dirty === PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === NO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === DIRTY_AND_NO_PENDING_SET_TO_PROPERTY_VALUE\n\t\t) {\n\t\t\tthis._dirty = STRING_PROPERTY_SET_PROPERTY_VALUE_STATE_FLAGS[in_flags];\n\t\t\treturn;\n\t\t}\n\n\t\tArrayProperty.prototype._setDirtyFlags.call(this, in_flags);\n\t}\n\n\t/**\n\t * Gets the dirty flags for this property\n\t * @returns {Number} The dirty flags\n\t */\n\t_getDirtyFlags() {\n\t\tif (\n\t\t\tthis._dirty === PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === NO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === DIRTY_AND_NO_PENDING_SET_TO_PROPERTY_VALUE\n\t\t) {\n\t\t\treturn this._dirty.flags;\n\t\t}\n\n\t\treturn ArrayProperty.prototype._getDirtyFlags.call(this);\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_applyChangeset(in_changeSet, in_reportToView) {\n\t\t// It is unfortunate, but because StringProperty derives from ArrayProperty, it can happen\n\t\t// that we receive here a ChangeSet that is formatted for an Array. We must be able to\n\t\t// distinguish it from a reversible changeset and from a simple changeset...\n\t\t// TODO: We need a formal way to know what kind of content we are to expect in a ChangeSet,\n\t\t// we should never have to guess that.\n\t\tif (typeof in_changeSet === \"string\") {\n\t\t\t// Let's consider it's a simple changeset.\n\t\t\tthis._setValue(in_changeSet, in_reportToView);\n\t\t} else if (in_changeSet.value !== undefined) {\n\t\t\t// Let's consider it's a reversible changeset.\n\t\t\tthis._setValue(in_changeSet.value, in_reportToView);\n\t\t} else {\n\t\t\t// Let's consider it's an ArrayProperty-like changeset\n\t\t\tArrayProperty.prototype._applyChangeset.call(this, in_changeSet, in_reportToView);\n\t\t}\n\t}\n\n\t/**\n\t * Calls back the given function with a human-readable string\n\t * representation of the property.\n\t * @param {string} indent - Leading spaces to create the tree representation\n\t * @param {string} externalId - Name of the current property at the upper level. Used for arrays.\n\t * @param {function} printFct - Function to call for printing each property\n\t */\n\t_prettyPrint(indent, externalId, printFct) {\n\t\tprintFct(\n\t\t\tindent +\n\t\t\t\texternalId +\n\t\t\t\tthis.getId() +\n\t\t\t\t\" (\" +\n\t\t\t\tthis.getTypeid() +\n\t\t\t\t'): \"' +\n\t\t\t\tthis.value +\n\t\t\t\t'\"',\n\t\t);\n\t}\n\n\t/**\n\t * Return a JSON representation of the property.\n\t * @returns {object} A JSON representation of the property.\n\t * @protected\n\t */\n\t_toJson() {\n\t\treturn {\n\t\t\tid: this.getId(),\n\t\t\tcontext: this._context,\n\t\t\ttypeid: this.getTypeid(),\n\t\t\tisConstant: this._isConstant,\n\t\t\tvalue: this.value,\n\t\t};\n\t}\n\n\t/**\n\t * Sets the value of a character at a single index.\n\t * For example, if you have a string of value 'AAAA' and do .set(1, 'a') => 'AaAA'\n\t * @param {number} in_index - The index you wish to set\n\t * @param {string} in_character - The character you wish to set\n\t * @throws If length of in_character is longer than one character\n\t */\n\tset(in_index, in_character) {\n\t\tConsoleUtils.assert(_.isNumber(in_index), MSG.STRING_SET_NEEDS_INDEX + in_index);\n\n\t\tif (in_character.length !== 1) {\n\t\t\tthrow new Error(MSG.STRING_SET_ONE_CHAR);\n\t\t}\n\n\t\tthis.setRange(in_index, in_character);\n\t}\n\n\t/**\n\t * sets values in a string starting at an index.\n\t * For example, if you have a string of Value 'AAAA' and do .setRange(1, 'aa') => AaaA\n\t * It will set as many letters as are in in_string.\n\t * @param {number} in_index - The index at which you wish to start setting\n\t * @param {string} in_string - The string you wish to set\n\t * @throws If in_index + length of in_string is longer than the original string\n\t */\n\tsetRange(in_index, in_string) {\n\t\tArrayProperty.prototype.setRange.call(this, in_index, in_string);\n\t}\n\n\t/**\n\t * get a letter at a given index\n\t * @param {number} in_index - The index\n\t * @returns {string} the single letter found at in_index\n\t */\n\tget(in_index) {\n\t\treturn ArrayProperty.prototype.get.call(this, in_index);\n\t}\n\n\t/**\n\t * inserts a string starting at a position and shifts the rest of the String to the right.\n\t * Will not overwrite existing values.\n\t * For StringProperty, insert and insertRange work the same, except that .insert\n\t * checks that in_value is a string and .insertRange will accept an array of strings.\n\t * @param {number} in_position - Target index\n\t * @param {string | Array<string>} in_value - value to be inserted\n\t * @throws If in_position is smaller than zero, larger than the length of the string or not a number\n\t */\n\tinsertRange(in_position, in_value) {\n\t\tif (_.isArray(in_value)) {\n\t\t\tin_value = in_value.join(\"\");\n\t\t}\n\t\tthis._insertRange(in_position, in_value);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = \"\";\n\t}\n\n\t/**\n\t * Returns the length of the data array\n\t * @returns {Number} The length\n\t */\n\t_dataArrayGetLength() {\n\t\treturn this._dataArrayRef.length;\n\t}\n\n\t/**\n\t * Returns the data array's internal buffer\n\t * @returns {Array} The buffer\n\t */\n\t_dataArrayGetBuffer() {\n\t\treturn this._dataArrayRef;\n\t}\n\n\t/**\n\t * Returns an entry from the data array\n\t * @param {Number} in_i - Position in the array\n\t *\n\t * @returns {*} The value at index in_i\n\t */\n\t_dataArrayGetValue(in_i) {\n\t\tin_i = in_i === undefined ? 0 : in_i;\n\t\tif (in_i >= this._size || in_i < 0) {\n\t\t\tthrow new Error(\"Trying to access out of bounds!\");\n\t\t}\n\n\t\treturn this._dataArrayRef[in_i];\n\t}\n\n\t/**\n\t * Set the array to the given new array\n\t * @param {String} in_newString - The new contents of the array\n\t */\n\t_dataArrayDeserialize(in_newString) {\n\t\tthis._dataArrayRef = in_newString;\n\t}\n\n\t/**\n\t * Inserts a range into the data array\n\t * @param {Number} in_position - Position at which the insert should be done\n\t * @param {String} in_range - The array to insert\n\t */\n\t_dataArrayInsertRange(in_position, in_range) {\n\t\tthis._dataArrayRef =\n\t\t\tthis._dataArrayRef.substr(0, in_position) +\n\t\t\tin_range +\n\t\t\tthis._dataArrayRef.substr(in_position);\n\t}\n\n\t/**\n\t * Removes a range from the data array\n\t * @param {Number} in_position - Position at which to start the removal\n\t * @param {Number} in_length - The number of entries to remove\n\t */\n\t_dataArrayRemoveRange(in_position, in_length) {\n\t\tif (in_position + in_length < this._dataArrayRef.length + 1) {\n\t\t\tthis._dataArrayRef =\n\t\t\t\tthis._dataArrayRef.substr(0, in_position) +\n\t\t\t\tthis._dataArrayRef.substr(in_position + in_length);\n\t\t} else {\n\t\t\tthrow Error(\"DataArray removeRange in_offset + in_deleteCount is out of bounds.\");\n\t\t}\n\t}\n\n\t/**\n\t * Overwrites a range in the data array\n\t * @param {Number} in_position - Position at which to start the removal\n\t * @param {String} in_values - The string with which the range is overwritten\n\t */\n\t_dataArraySetRange(in_position, in_values) {\n\t\tthis._dataArrayRef =\n\t\t\tthis._dataArrayRef.substr(0, in_position) +\n\t\t\tin_values +\n\t\t\tthis._dataArrayRef.substr(in_position + in_values.length);\n\t}\n\n\tget value() {\n\t\treturn this.getValue();\n\t}\n\n\tset value(val) {\n\t\tthis.setValue.call(this, val);\n\t}\n\n\t/** @inheritdoc */\n\t_traverse(in_callback, in_pathFromTraversalStart) {\n\t\treturn undefined;\n\t}\n\n\t/** @inheritdoc */\n\t_traverseStaticProperties(in_callback, in_pathFromTraversalStart) {\n\t\treturn undefined;\n\t}\n}\n\nStringProperty.prototype._typeid = \"String\";\nStringProperty.prototype._context = \"single\";\nStringProperty.prototype._noDirtyInBase = true;\n"]}
|
|
1
|
+
{"version":3,"file":"stringProperty.js","sourceRoot":"","sources":["../../src/properties/stringProperty.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;GAEG;AAEH,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACxE,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;AAC5B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE/D,IAAI,oBAAoB,GAAG,YAAY,CAAC,oBAAoB,CAAC;AAE7D,uEAAuE;AACvE,2EAA2E;AAC3E,8EAA8E;AAC9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IAClB,CAAC;IAED,kBAAkB;IAClB,yBAAyB,CAAC,WAAW,EAAE,yBAAyB;QAC/D,OAAO,SAAS,CAAC;IAClB,CAAC;CACD;AAED,cAAc,CAAC,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;AAC5C,cAAc,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC7C,cAAc,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Definition of the StringProperty class\n */\n\nconst { ChangeSet } = require(\"@fluid-experimental/property-changeset\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst { ConsoleUtils } = require(\"@fluid-experimental/property-common\");\nconst _ = require(\"lodash\");\nconst { ArrayProperty } = require(\"./arrayProperty\");\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { ValueArrayProperty } = require(\"./valueArrayProperty\");\n\nvar MODIFIED_STATE_FLAGS = BaseProperty.MODIFIED_STATE_FLAGS;\n\n// Some global constant objects that are used to indicate a few special\n// cases for the dirty object. If the string was directly set to a literal,\n// we don't need to store any ChangeSet, we only need to store the information\n// that it was updated to a literal and the dirty flags.\n// By using these special objects we avoid the memory overhead of having a separate\n// object for each array in this state.\nvar PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE = {\n\tpending: \"setAsLiteral\",\n\tdirty: \"setAsLiteral\",\n\tflags: MODIFIED_STATE_FLAGS.PENDING_CHANGE | MODIFIED_STATE_FLAGS.DIRTY,\n};\nvar NO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE = {\n\tpending: \"setAsLiteral\",\n\tdirty: undefined,\n\tflags: MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n};\n\nvar DIRTY_AND_NO_PENDING_SET_TO_PROPERTY_VALUE = {\n\tpending: undefined,\n\tdirty: \"setAsLiteral\",\n\t_flags: MODIFIED_STATE_FLAGS.DIRTY,\n\tset flags(flags) {\n\t\tthis._flags = flags;\n\t\tconsole.log(\"flags was changed!\");\n\t},\n\tget flags() {\n\t\treturn this._flags;\n\t},\n};\n\nvar STRING_PROPERTY_SET_PROPERTY_VALUE_STATE_FLAGS = [\n\tundefined,\n\tNO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE,\n\tDIRTY_AND_NO_PENDING_SET_TO_PROPERTY_VALUE,\n\tPENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE,\n];\n\n/**\n * A primitive property for a string value.\n * @internal\n */\nexport class StringProperty extends ValueArrayProperty {\n\t/**\n\t * @param {Object=} in_params - The parameters\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueArrayProperty\n\t * @alias property-properties.StringProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Get the string value\n\t * @returns {string} the JavaScript string primitive value of this StringProperty\n\t */\n\tgetValue() {\n\t\treturn this._dataArrayRef;\n\t}\n\n\t/**\n\t * Private helper function to update the internal dirty and pending changes\n\t *\n\t * @param {property-properties.SerializedChangeSet} in_changeSet - The changeset to apply\n\t * @private\n\t */\n\t_updateChanges(in_changeSet) {\n\t\t// we need to convert the format to allow the application of the changes\n\t\t// since _performApplyAfterOnPropertyArray only understands insert/modify/remove commands\n\t\tvar pendingChangesWereSetBefore = false;\n\t\tvar pendingChanges = this._getPendingChanges();\n\n\t\tif (_.isString(pendingChanges)) {\n\t\t\tpendingChanges = { insert: [[0, pendingChanges]] };\n\t\t\tpendingChangesWereSetBefore = true;\n\t\t}\n\t\tChangeSet.prototype._performApplyAfterOnPropertyArray(\n\t\t\tpendingChanges,\n\t\t\tin_changeSet,\n\t\t\tthis.getFullTypeid(true),\n\t\t);\n\t\tif (pendingChangesWereSetBefore) {\n\t\t\tpendingChanges = pendingChanges.insert[0][1];\n\t\t}\n\n\t\tvar dirtyChangesWereSetBefore = false;\n\t\tvar dirtyChanges = this._getDirtyChanges();\n\n\t\tif (_.isString(dirtyChanges)) {\n\t\t\tdirtyChanges = { insert: [[0, dirtyChanges]] };\n\t\t\tdirtyChangesWereSetBefore = true;\n\t\t}\n\t\tChangeSet.prototype._performApplyAfterOnPropertyArray(\n\t\t\tdirtyChanges,\n\t\t\tin_changeSet,\n\t\t\tthis.getFullTypeid(true),\n\t\t);\n\t\tif (dirtyChangesWereSetBefore) {\n\t\t\tdirtyChanges = dirtyChanges.insert[0][1];\n\t\t}\n\n\t\tthis._setChanges(pendingChanges, dirtyChanges);\n\t}\n\n\t_getPendingChanges() {\n\t\tif (\n\t\t\tthis._dirty === PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === NO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE\n\t\t) {\n\t\t\treturn this.getValue();\n\t\t}\n\n\t\treturn (this._dirty && this._dirty.pending) || {};\n\t}\n\n\t_getDirtyChanges() {\n\t\tif (\n\t\t\tthis._dirty === PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === DIRTY_AND_NO_PENDING_SET_TO_PROPERTY_VALUE\n\t\t) {\n\t\t\treturn this.getValue();\n\t\t} else if (this._dirty === NO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE) {\n\t\t\treturn {};\n\t\t}\n\n\t\treturn (this._dirty && this._dirty.dirty) || {};\n\t}\n\n\t/**\n\t * inserts a string starting at a position and shifts the rest of\n\t * the String to the right. Will not overwrite existing values.\n\t * @param {number} in_position - Target index\n\t * @param {string} in_value - Value to be inserted\n\t * @throws If in_position is smaller than zero, larger than the length of the string or not a number\n\t * @throws If in_value is not a string\n\t */\n\tinsert(in_position, in_value) {\n\t\tConsoleUtils.assert(_.isString(in_value), MSG.IN_VALUE_MUST_BE_STRING + in_value);\n\t\tthis._insertRange(in_position, in_value);\n\t}\n\n\t/**\n\t * Adds letters to the end of the string\n\t * @param {string} in_value - The string to be pushed\n\t * @throws If in_value is not a string\n\t * @returns {number} The new length of the string.\n\t */\n\tpush(in_value) {\n\t\tConsoleUtils.assert(_.isString(in_value), MSG.IN_VALUE_MUST_BE_STRING + in_value);\n\t\tthis._insertRange(this._dataArrayRef.length, in_value);\n\t\treturn this.getLength();\n\t}\n\n\t/**\n\t * inserts values\n\t * @param {number} in_position - Target index\n\t * @param {string} in_value - The string to be inserted\n\t */\n\t_insertRange(in_position, in_value) {\n\t\tthis._checkIsNotReadOnly(true);\n\t\tthis._insertRangeWithoutDirtying(in_position, in_value);\n\t\tthis._setDirty();\n\t}\n\n\t/**\n\t * Returns the full property type identifier for the ChangeSet including the enum type id\n\t * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted\n\t * since that is not aplicable here, this param is ignored\n\t * @returns {string} The typeid\n\t */\n\tgetFullTypeid(in_hideCollection) {\n\t\treturn this._typeid;\n\t}\n\n\t/**\n\t * returns the String to an empty string.\n\t */\n\tclear() {\n\t\tthis.setValue(\"\");\n\t}\n\n\t/**\n\t * removes a given number of elements from the array property and shifts\n\t * remaining values to the left.\n\t * @param {number} in_offset - Target start index\n\t * @param {number} in_deleteCount - number of elements to be deleted\n\t * @throws If in_offset is not a number\n\t * @throws If in_deleteCount is not a number\n\t * @throws If trying to remove an item with a parent\n\t * @throws If in_offset is smaller than zero or if in_offset + in_delete count is larger than the length of the array\n\t * @returns {String} the part of the string that was removed.\n\t */\n\tremoveRange(in_offset, in_deleteCount) {\n\t\tConsoleUtils.assert(\n\t\t\t_.isNumber(in_offset),\n\t\t\tMSG.NOT_NUMBER + \"in_offset, method: StringProperty.remove or .removeRange\",\n\t\t);\n\t\tConsoleUtils.assert(\n\t\t\t_.isNumber(in_deleteCount),\n\t\t\tMSG.NOT_NUMBER + \"in_deleteCount, method: StringProperty.remove or .removeRange\",\n\t\t);\n\t\tConsoleUtils.assert(\n\t\t\tin_offset + in_deleteCount < this.length + 1 && in_offset >= 0 && in_deleteCount > 0,\n\t\t\tMSG.REMOVE_OUT_OF_BOUNDS +\n\t\t\t\t\"Cannot remove \" +\n\t\t\t\tin_deleteCount +\n\t\t\t\t\" items starting at index \" +\n\t\t\t\tin_offset,\n\t\t);\n\t\tvar result = \"\";\n\t\tfor (var i = in_offset; i < in_offset + in_deleteCount; i++) {\n\t\t\tresult += this.get(i);\n\t\t}\n\t\tthis._checkIsNotReadOnly(true);\n\t\tthis._removeRangeWithoutDirtying(in_offset, in_deleteCount);\n\t\tthis._setDirty();\n\t\treturn result;\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_deserialize(in_serializedObj, in_reportToView, in_filteringOptions, in_createChangeSet) {\n\t\tif (\n\t\t\t(in_serializedObj.remove && in_serializedObj.remove.length > 0) ||\n\t\t\t(in_serializedObj.modify && in_serializedObj.modify.length > 0) ||\n\t\t\t(in_serializedObj.insert &&\n\t\t\t\t(in_serializedObj.insert.length > 1 ||\n\t\t\t\t\t(in_serializedObj.insert.length === 1 &&\n\t\t\t\t\t\t(in_serializedObj.insert[0][0] !== 0 ||\n\t\t\t\t\t\t\t!_.isString(in_serializedObj.insert[0][1])))))\n\t\t) {\n\t\t\tthrow new Error(MSG.NO_NORMALIZED_CHANGESET);\n\t\t}\n\n\t\tvar oldStringLength = this._dataArrayRef.length;\n\t\tvar newStringData;\n\t\tif (_.isString(in_serializedObj)) {\n\t\t\treturn this._setValue(in_serializedObj, in_reportToView) ? in_serializedObj : {};\n\t\t} else {\n\t\t\tif (!in_serializedObj.insert || !in_serializedObj.insert[0]) {\n\t\t\t\t// we've got an empty object, so we have to wipe everything we've got\n\t\t\t\tif (oldStringLength > 0) {\n\t\t\t\t\tthis.removeRange(0, oldStringLength, in_reportToView);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tremove: [[0, oldStringLength]],\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\t// the string was already empty, nothing has changed\n\t\t\t\t\treturn {};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewStringData = in_serializedObj.insert[0][1];\n\t\t\t}\n\t\t}\n\n\t\tif (newStringData === this._dataArrayRef) {\n\t\t\t// nothing changed\n\t\t\treturn {};\n\t\t}\n\n\t\t// check if something was attached (very common case)\n\t\tif (newStringData.length > oldStringLength) {\n\t\t\tif (newStringData.substring(0, oldStringLength) === this._dataArrayRef) {\n\t\t\t\tvar appendChanges = {\n\t\t\t\t\tinsert: [[oldStringLength, newStringData.substring(oldStringLength)]],\n\t\t\t\t};\n\t\t\t\tthis.insertRange(\n\t\t\t\t\toldStringLength,\n\t\t\t\t\tnewStringData.substring(oldStringLength),\n\t\t\t\t\tin_reportToView,\n\t\t\t\t);\n\t\t\t\treturn appendChanges;\n\t\t\t}\n\t\t}\n\n\t\t// most simplistic diff method: Remove all existing data and insert the new data\n\t\tvar simpleChanges = {\n\t\t\tinsert: [[0, newStringData]],\n\t\t};\n\t\tif (oldStringLength > 0) {\n\t\t\tsimpleChanges.remove = [[0, oldStringLength]];\n\t\t\tthis._removeRangeWithoutDirtying(0, oldStringLength, in_reportToView);\n\t\t}\n\t\tthis.insertRange(0, newStringData, in_reportToView);\n\t\treturn simpleChanges;\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. Has no effect for\n\t * ArrayProperty.\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. WARNING: if there are loops in the references\n\t * this can result in an infinite loop\n\t *\n\t * @returns {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\treturn in_dirtyOnly\n\t\t\t? ArrayProperty.prototype._serialize.call(\n\t\t\t\t\tthis,\n\t\t\t\t\tin_dirtyOnly,\n\t\t\t\t\tin_includeRootTypeid,\n\t\t\t\t\tin_dirtinessType,\n\t\t\t )\n\t\t\t: this._dataArrayRef;\n\t}\n\n\t/**\n\t * @param {string} in_value - The new value\n\t * @throws If string property is read only\n\t */\n\tsetValue(in_value) {\n\t\tthis._checkIsNotReadOnly(true);\n\t\tthis._setValue(in_value, true);\n\t}\n\n\t/**\n\t * See {@link StringProperty.setValues}\n\t * @param {string} in_values - The new values\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_setValues(in_values, in_initial) {\n\t\tthrow new Error(MSG.NO_VALUE_PROPERTY_SETVALUES);\n\t}\n\n\t/**\n\t * @param {string} in_values - The new values\n\t * @throws always - Cannot use .setValues on a StringProperty. Use .setValue() instead.\n\t */\n\tsetValues(in_values) {\n\t\tStringProperty.prototype._setValues.call(this, in_values, false);\n\t}\n\n\t/**\n\t * @return { never }\n\t * @throws always - cannot call .getValues on a string. Use .getValue() instead\n\t */\n\tgetValues() {\n\t\tthrow new Error(MSG.NO_VALUE_PROPERTY_GETVALUES);\n\t}\n\n\t/**\n\t * Internal function to update the value of a property\n\t *\n\t * @param {string} in_value - The new value\n\t * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout view\n\t * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t * @returns {boolean} true if the value was actually changed\n\t */\n\t_setValue(in_value, in_reportToView) {\n\t\tvar oldValue = this._dataArrayRef;\n\t\tvar castedValue = String(in_value);\n\t\tvar changed = castedValue !== oldValue;\n\t\tif (changed) {\n\t\t\tvar stringLength = this._dataArrayRef.length;\n\t\t\tif (stringLength > 0) {\n\t\t\t\tthis._dataArrayRemoveRange(0, stringLength);\n\t\t\t}\n\t\t\tthis._dataArrayInsertRange(0, castedValue);\n\n\t\t\tthis._dirty = PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE;\n\n\t\t\t// The assignment in the line above already set this property to\n\t\t\t// dirty, so we only update the parent (instead of calling\n\t\t\t// setDirty on this property)\n\t\t\tif (this._parent) {\n\t\t\t\tthis._parent._setDirty(in_reportToView, this);\n\t\t\t} else if (in_reportToView === true || in_reportToView === undefined) {\n\t\t\t\tthis._reportDirtinessToView();\n\t\t\t}\n\t\t}\n\t\treturn changed;\n\t}\n\n\t/**\n\t * Sets the pending and dirty changesets\n\t *\n\t * @param {property-properties.SerializedChangeSet|undefined|null} in_pending - The pending changeset. If null is\n\t * passed, no change will be applied. undefined indicates that the changes should be reset\n\t * @param {property-properties.SerializedChangeSet|undefined|null} in_dirty - The dirty changeset. If null is\n\t * passed, no change will be applied. undefined indicates that the changes should be reset\n\t */\n\t_setChanges(in_pending, in_dirty) {\n\t\tif (\n\t\t\tthis._dirty === PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === NO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === DIRTY_AND_NO_PENDING_SET_TO_PROPERTY_VALUE\n\t\t) {\n\t\t\tlet newFlags = this._dirty.flags;\n\t\t\tif (in_pending === undefined) {\n\t\t\t\tnewFlags &= 0xffffffff ^ BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE;\n\t\t\t}\n\t\t\tif (in_dirty === undefined) {\n\t\t\t\tnewFlags &= 0xffffffff ^ BaseProperty.MODIFIED_STATE_FLAGS.DIRTY;\n\t\t\t}\n\t\t\tthis._dirty = STRING_PROPERTY_SET_PROPERTY_VALUE_STATE_FLAGS[newFlags];\n\t\t} else {\n\t\t\tArrayProperty.prototype._setChanges.call(this, in_pending, in_dirty);\n\t\t}\n\t}\n\n\t/**\n\t * Sets the dirty flags for this property\n\t * @param {Number} in_flags - The dirty flags\n\t */\n\t_setDirtyFlags(in_flags) {\n\t\tif (\n\t\t\tthis._dirty === PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === NO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === DIRTY_AND_NO_PENDING_SET_TO_PROPERTY_VALUE\n\t\t) {\n\t\t\tthis._dirty = STRING_PROPERTY_SET_PROPERTY_VALUE_STATE_FLAGS[in_flags];\n\t\t\treturn;\n\t\t}\n\n\t\tArrayProperty.prototype._setDirtyFlags.call(this, in_flags);\n\t}\n\n\t/**\n\t * Gets the dirty flags for this property\n\t * @returns {Number} The dirty flags\n\t */\n\t_getDirtyFlags() {\n\t\tif (\n\t\t\tthis._dirty === PENDING_AND_DIRTY_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === NO_DIRTY_AND_PENDING_SET_TO_PROPERTY_VALUE ||\n\t\t\tthis._dirty === DIRTY_AND_NO_PENDING_SET_TO_PROPERTY_VALUE\n\t\t) {\n\t\t\treturn this._dirty.flags;\n\t\t}\n\n\t\treturn ArrayProperty.prototype._getDirtyFlags.call(this);\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_applyChangeset(in_changeSet, in_reportToView) {\n\t\t// It is unfortunate, but because StringProperty derives from ArrayProperty, it can happen\n\t\t// that we receive here a ChangeSet that is formatted for an Array. We must be able to\n\t\t// distinguish it from a reversible changeset and from a simple changeset...\n\t\t// TODO: We need a formal way to know what kind of content we are to expect in a ChangeSet,\n\t\t// we should never have to guess that.\n\t\tif (typeof in_changeSet === \"string\") {\n\t\t\t// Let's consider it's a simple changeset.\n\t\t\tthis._setValue(in_changeSet, in_reportToView);\n\t\t} else if (in_changeSet.value !== undefined) {\n\t\t\t// Let's consider it's a reversible changeset.\n\t\t\tthis._setValue(in_changeSet.value, in_reportToView);\n\t\t} else {\n\t\t\t// Let's consider it's an ArrayProperty-like changeset\n\t\t\tArrayProperty.prototype._applyChangeset.call(this, in_changeSet, in_reportToView);\n\t\t}\n\t}\n\n\t/**\n\t * Calls back the given function with a human-readable string\n\t * representation of the property.\n\t * @param {string} indent - Leading spaces to create the tree representation\n\t * @param {string} externalId - Name of the current property at the upper level. Used for arrays.\n\t * @param {function} printFct - Function to call for printing each property\n\t */\n\t_prettyPrint(indent, externalId, printFct) {\n\t\tprintFct(\n\t\t\tindent +\n\t\t\t\texternalId +\n\t\t\t\tthis.getId() +\n\t\t\t\t\" (\" +\n\t\t\t\tthis.getTypeid() +\n\t\t\t\t'): \"' +\n\t\t\t\tthis.value +\n\t\t\t\t'\"',\n\t\t);\n\t}\n\n\t/**\n\t * Return a JSON representation of the property.\n\t * @returns {object} A JSON representation of the property.\n\t * @protected\n\t */\n\t_toJson() {\n\t\treturn {\n\t\t\tid: this.getId(),\n\t\t\tcontext: this._context,\n\t\t\ttypeid: this.getTypeid(),\n\t\t\tisConstant: this._isConstant,\n\t\t\tvalue: this.value,\n\t\t};\n\t}\n\n\t/**\n\t * Sets the value of a character at a single index.\n\t * For example, if you have a string of value 'AAAA' and do .set(1, 'a') => 'AaAA'\n\t * @param {number} in_index - The index you wish to set\n\t * @param {string} in_character - The character you wish to set\n\t * @throws If length of in_character is longer than one character\n\t */\n\tset(in_index, in_character) {\n\t\tConsoleUtils.assert(_.isNumber(in_index), MSG.STRING_SET_NEEDS_INDEX + in_index);\n\n\t\tif (in_character.length !== 1) {\n\t\t\tthrow new Error(MSG.STRING_SET_ONE_CHAR);\n\t\t}\n\n\t\tthis.setRange(in_index, in_character);\n\t}\n\n\t/**\n\t * sets values in a string starting at an index.\n\t * For example, if you have a string of Value 'AAAA' and do .setRange(1, 'aa') => AaaA\n\t * It will set as many letters as are in in_string.\n\t * @param {number} in_index - The index at which you wish to start setting\n\t * @param {string} in_string - The string you wish to set\n\t * @throws If in_index + length of in_string is longer than the original string\n\t */\n\tsetRange(in_index, in_string) {\n\t\tArrayProperty.prototype.setRange.call(this, in_index, in_string);\n\t}\n\n\t/**\n\t * get a letter at a given index\n\t * @param {number} in_index - The index\n\t * @returns {string} the single letter found at in_index\n\t */\n\tget(in_index) {\n\t\treturn ArrayProperty.prototype.get.call(this, in_index);\n\t}\n\n\t/**\n\t * inserts a string starting at a position and shifts the rest of the String to the right.\n\t * Will not overwrite existing values.\n\t * For StringProperty, insert and insertRange work the same, except that .insert\n\t * checks that in_value is a string and .insertRange will accept an array of strings.\n\t * @param {number} in_position - Target index\n\t * @param {string | Array<string>} in_value - value to be inserted\n\t * @throws If in_position is smaller than zero, larger than the length of the string or not a number\n\t */\n\tinsertRange(in_position, in_value) {\n\t\tif (_.isArray(in_value)) {\n\t\t\tin_value = in_value.join(\"\");\n\t\t}\n\t\tthis._insertRange(in_position, in_value);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = \"\";\n\t}\n\n\t/**\n\t * Returns the length of the data array\n\t * @returns {Number} The length\n\t */\n\t_dataArrayGetLength() {\n\t\treturn this._dataArrayRef.length;\n\t}\n\n\t/**\n\t * Returns the data array's internal buffer\n\t * @returns {Array} The buffer\n\t */\n\t_dataArrayGetBuffer() {\n\t\treturn this._dataArrayRef;\n\t}\n\n\t/**\n\t * Returns an entry from the data array\n\t * @param {Number} in_i - Position in the array\n\t *\n\t * @returns {*} The value at index in_i\n\t */\n\t_dataArrayGetValue(in_i) {\n\t\tin_i = in_i === undefined ? 0 : in_i;\n\t\tif (in_i >= this._size || in_i < 0) {\n\t\t\tthrow new Error(\"Trying to access out of bounds!\");\n\t\t}\n\n\t\treturn this._dataArrayRef[in_i];\n\t}\n\n\t/**\n\t * Set the array to the given new array\n\t * @param {String} in_newString - The new contents of the array\n\t */\n\t_dataArrayDeserialize(in_newString) {\n\t\tthis._dataArrayRef = in_newString;\n\t}\n\n\t/**\n\t * Inserts a range into the data array\n\t * @param {Number} in_position - Position at which the insert should be done\n\t * @param {String} in_range - The array to insert\n\t */\n\t_dataArrayInsertRange(in_position, in_range) {\n\t\tthis._dataArrayRef =\n\t\t\tthis._dataArrayRef.substr(0, in_position) +\n\t\t\tin_range +\n\t\t\tthis._dataArrayRef.substr(in_position);\n\t}\n\n\t/**\n\t * Removes a range from the data array\n\t * @param {Number} in_position - Position at which to start the removal\n\t * @param {Number} in_length - The number of entries to remove\n\t */\n\t_dataArrayRemoveRange(in_position, in_length) {\n\t\tif (in_position + in_length < this._dataArrayRef.length + 1) {\n\t\t\tthis._dataArrayRef =\n\t\t\t\tthis._dataArrayRef.substr(0, in_position) +\n\t\t\t\tthis._dataArrayRef.substr(in_position + in_length);\n\t\t} else {\n\t\t\tthrow Error(\"DataArray removeRange in_offset + in_deleteCount is out of bounds.\");\n\t\t}\n\t}\n\n\t/**\n\t * Overwrites a range in the data array\n\t * @param {Number} in_position - Position at which to start the removal\n\t * @param {String} in_values - The string with which the range is overwritten\n\t */\n\t_dataArraySetRange(in_position, in_values) {\n\t\tthis._dataArrayRef =\n\t\t\tthis._dataArrayRef.substr(0, in_position) +\n\t\t\tin_values +\n\t\t\tthis._dataArrayRef.substr(in_position + in_values.length);\n\t}\n\n\tget value() {\n\t\treturn this.getValue();\n\t}\n\n\tset value(val) {\n\t\tthis.setValue.call(this, val);\n\t}\n\n\t/** @inheritdoc */\n\t_traverse(in_callback, in_pathFromTraversalStart) {\n\t\treturn undefined;\n\t}\n\n\t/** @inheritdoc */\n\t_traverseStaticProperties(in_callback, in_pathFromTraversalStart) {\n\t\treturn undefined;\n\t}\n}\n\nStringProperty.prototype._typeid = \"String\";\nStringProperty.prototype._context = \"single\";\nStringProperty.prototype._noDirtyInBase = true;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueArrayProperty.d.ts","sourceRoot":"","sources":["../../src/properties/valueArrayProperty.js"],"names":[],"mappings":"AAuBA
|
|
1
|
+
{"version":3,"file":"valueArrayProperty.d.ts","sourceRoot":"","sources":["../../src/properties/valueArrayProperty.js"],"names":[],"mappings":"AAuBA;;;GAGG;AACH;IACC;;;;;;OAMG;IACH,wBAEC;IAED;;;;OAIG;IACH,uBAHW,MAAM,OAKhB;IAiEF,sBAAyC;CADxC;AAGD;;GAEG;AACH;CAqBC;AAGD;;GAEG;AACH;CAqBC;AAGD;;GAEG;AACH;CAqBC;AAGD;;;GAGG;AACH;CAqBC;AAGD;;GAEG;AACH;CAqBC;AAGD;;GAEG;AACH;CAqBC;AAGD;;GAEG;AACH;CAoBC;AAGD;;GAEG;AACH;CAqBC;AAGD;;GAEG;AACH;IA4DC;;OAEG;IACH,gEAgBC;CACD;AACD;;GAEG;AACH;IAiDC;;;;;;;OAOG;IACH,0CAFY,KAAK,CAIhB;CAYD;AAGD;;GAEG;AACH;IAcC;;;;;;;OAOG;IACH,0CAFY,MAAM,CAIjB;CA+CD;AAGD;;GAEG;AACH;CAwBC;AAGD;;GAEG;AACH;CAwBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueArrayProperty.js","sourceRoot":"","sources":["../../src/properties/valueArrayProperty.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EACL,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,MAAM,EACN,KAAK,GACL,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnD,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AACjF,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC1D,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAEnD;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,aAAa;IACpD;;;;;;OAMG;IACH,YAAY,SAAS;Q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AAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE;YACnC,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;SAC/B;IACF,CAAC;CACD;AACD,mBAAmB,CAAC,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;AAEjD;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,kBAAkB;IACxD;;;;;;;;OAQG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACH,gBAAgB,CAAC,SAAS;QACzB,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,SAAS,CAAC,CAAC;QAClD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE;YACnC,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;SAClC;IACF,CAAC;CACD;AACD,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview Definition of the valuearray property class\n */\n\nconst _ = require(\"lodash\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst {\n\tBaseDataArray,\n\tUniversalDataArray,\n\tBoolDataArray,\n\tUint64,\n\tInt64,\n} = require(\"@fluid-experimental/property-common\");\nconst { Int64Property, Uint64Property } = require(\"../properties/intProperties\");\nconst { _castFunctors } = require(\"./primitiveTypeCasts\");\nconst { ArrayProperty } = require(\"./arrayProperty\");\nconst { BaseProperty } = require(\"./baseProperty\");\n\n/**\n * An array property which stores primitive values\n */\nexport class ValueArrayProperty extends ArrayProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ArrayProperty\n\t * @alias property-properties.ValueArrayProperty\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params, true);\n\t}\n\n\t/**\n\t * Returns the value at in_position for a primitive array\n\t * @param {number} in_position - The array index\n\t * @return {*} the value\n\t */\n\t_getValue(in_position) {\n\t\treturn this._dataArrayRef.getValue(in_position);\n\t}\n\n\t/**\n\t * returns the array of primitive values.\n\t * @return {Array<*>} the array of values.\n\t * For example: ['string1', 'string2']\n\t */\n\tgetValues() {\n\t\tvar result = [];\n\t\tvar ids = this.getIds();\n\t\tfor (var i = 0; i < ids.length; i++) {\n\t\t\tresult.push(this.get(ids[i]));\n\t\t}\n\t\treturn result;\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 this.get(in_segment);\n\t}\n\n\t/**\n\t * Function to serialize special primitive types.\n\t * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n\t * special treatment on serialization. For supported types, we can just return the input here.\n\t *\n\t * @param {*} in_obj - The object to be serialized\n\t * @return {property-properties.SerializedChangeSet} the serialized object\n\t */\n\t_serializeValue(in_obj) {\n\t\treturn in_obj;\n\t}\n\n\t/**\n\t * Function to serialize arrays of 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 {Array} in_array - The array of special objects to be serialized\n\t * @return {Array<property-properties.SerializedChangeSet>} the serialized object\n\t */\n\t_serializeArray(in_array) {\n\t\treturn in_array;\n\t}\n\n\t/**\n\t * Function to deserialize arrays of 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 {Array<property-properties.SerializedChangeSet>} in_serializedObj - The serialized object\n\t * @return {Array} in_array - The array of special objects that were deserialized\n\t */\n\t_deserializeArray(in_serializedObj) {\n\t\treturn in_serializedObj;\n\t}\n}\nValueArrayProperty.prototype._isPrimitive = true;\n\n/**\n * An ArrayProperty which stores Float32 values\n */\nexport class Float32ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Float32ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Float32Array, in_length);\n\t}\n}\nFloat32ArrayProperty.prototype._typeid = \"Float32\";\n\n/**\n * An ArrayProperty which stores Float64 values\n */\nexport class Float64ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Float64ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Float64Array, in_length);\n\t}\n}\nFloat64ArrayProperty.prototype._typeid = \"Float64\";\n\n/**\n * An ArrayProperty which stores Uint8 values\n */\nexport class Uint8ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Uint8ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Uint8Array, in_length);\n\t}\n}\nUint8ArrayProperty.prototype._typeid = \"Uint8\";\n\n/**\n * An ArrayProperty which stores Int8 values\n *\n */\nexport class Int8ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Int8ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Int8Array, in_length);\n\t}\n}\nInt8ArrayProperty.prototype._typeid = \"Int8\";\n\n/**\n * An ArrayProperty which stores Uint16 values\n */\nexport class Uint16ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Uint16ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Uint16Array, in_length);\n\t}\n}\nUint16ArrayProperty.prototype._typeid = \"Uint16\";\n\n/**\n * An ArrayProperty which stores Int16 values\n */\nexport class Int16ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Int16ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Int16Array, in_length);\n\t}\n}\nInt16ArrayProperty.prototype._typeid = \"Int16\";\n\n/**\n * An ArrayProperty which stores Uint32 values\n */\nexport class Uint32ArrayProperty extends ValueArrayProperty {\n\t/** @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueArrayProperty\n\t * @alias property-properties.Uint32ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Uint32Array, in_length);\n\t}\n}\nUint32ArrayProperty.prototype._typeid = \"Uint32\";\n\n/**\n * An ArrayProperty which stores Int32 values\n */\nexport class Int32ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Int32ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Int32Array, in_length);\n\t}\n}\nInt32ArrayProperty.prototype._typeid = \"Int32\";\n\n/**\n * An ArrayProperty which stores Int64 values\n */\nexport class Integer64ArrayProperty extends ValueArrayProperty {\n\t/** @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueArrayProperty\n\t * @alias property-properties.Integer64ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\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\tif (in_obj instanceof Int64 || in_obj instanceof Uint64) {\n\t\t\treturn [in_obj.getValueLow(), in_obj.getValueHigh()];\n\t\t}\n\t\treturn in_obj;\n\t}\n\n\t/**\n\t * Function to serialize arrays of 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 {Array} in_array - The array of special objects to be serialized\n\t * @return {Array<property-properties.SerializedChangeSet>} the serialized object\n\t */\n\t_serializeArray(in_array) {\n\t\tvar result = [];\n\t\tfor (var i = 0; i < in_array.length; i++) {\n\t\t\tresult.push(this._serializeValue(in_array[i]));\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Function to deserialize arrays of 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 {Array<property-properties.SerializedChangeSet>} in_serializedObj - The serialized object\n\t * @return {Array} in_array - The array of special objects that were deserialized\n\t */\n\t_deserializeArray(in_serializedObj) {\n\t\tvar result = [];\n\t\tfor (var i = 0; i < in_serializedObj.length; i++) {\n\t\t\tresult.push(this._deserializeValue(in_serializedObj[i]));\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_prettyPrint(indent, externalId, printFct) {\n\t\tprintFct(indent + externalId + this.getId() + \" (Array of \" + this.getTypeid() + \"): [\");\n\t\tvar childIndent = indent + \" \";\n\t\tvar int64Prop;\n\t\tfor (var i = 0; i < this._dataArrayGetLength(); i++) {\n\t\t\t// TODO: The 'toString()' function is defined on Integer64Property, so we need to create\n\t\t\t// such object to use it. It would be better to have it in Integer64.prototype.toString\n\t\t\tint64Prop =\n\t\t\t\tthis._dataArrayGetValue(i) instanceof Int64\n\t\t\t\t\t? new Int64Property({})\n\t\t\t\t\t: new Uint64Property({});\n\t\t\tint64Prop.setValueLow(this._dataArrayGetValue(i).getValueLow());\n\t\t\tint64Prop.setValueHigh(this._dataArrayGetValue(i).getValueHigh());\n\t\t\tprintFct(childIndent + i + \": \" + int64Prop);\n\t\t}\n\t\tprintFct(indent + \"]\");\n\t}\n}\n/**\n * An ArrayProperty which stores Int64 values\n */\nexport class Int64ArrayProperty extends Integer64ArrayProperty {\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.Integer64ArrayProperty\n\t * @alias property-properties.Int64ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Sets the array properties elements to the content of the given array\n\t * All changed elements must already exist. This will overwrite existing elements.\n\t * @param {number} in_offset - Target start index\n\t * @param {Array<*>|Array<property-properties.BaseProperty>} in_array - contains the elements to be set\n\t * @throws if in_offset is not a number\n\t * @throws if in_offset is smaller than zero or higher than the length of the array\n\t */\n\tsetRange(in_offset, in_array) {\n\t\tif (!_.isArray(in_array)) {\n\t\t\tthrow new TypeError(MSG.IN_ARRAY_NOT_ARRAY + \"Int64ArrayProperty.setRange\");\n\t\t}\n\t\tvar out_array = in_array.map((element) => {\n\t\t\treturn _castFunctors.Int64(element);\n\t\t});\n\t\tArrayProperty.prototype.setRange.call(this, in_offset, out_array);\n\t}\n\n\t/**\n\t * Inserts the content of a given array into the array property\n\t * It will not overwrite the existing values but push them to the right instead.\n\t * E.g. [1, 2, 3] .insertRange(1, [9, 8]) => [1, 9, 8, 2, 3]\n\t * @param {number} in_offset - Target index\n\t * @param {Array<*>} in_array - The array to be inserted\n\t * @throws if in_offset is smaller than zero, larger than the length of the array or not a number.\n\t * @throws if trying to insert a property that already has a parent.\n\t * @throws if tyring to modify a referenced property.\n\t */\n\tinsertRange(in_offset, in_array) {\n\t\tvar out_array = in_array.map((element) => {\n\t\t\treturn _castFunctors.Int64(element);\n\t\t});\n\t\tArrayProperty.prototype.insertRange.call(this, in_offset, out_array);\n\t}\n\n\t/**\n\t * Specialized function to deserialize Int64 primitive types.\n\t * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n\t * special treatment on deserialization. For supported types, we can just return the input here.\n\t *\n\t * @param {property-properties.SerializedChangeSet} in_serializedObj - The object to be deserialized\n\t * @return {Int64} the deserialized value\n\t */\n\t_deserializeValue(in_serializedObj) {\n\t\treturn new Int64(in_serializedObj[0], in_serializedObj[1]);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new UniversalDataArray(in_length);\n\t\tfor (var i = 0; i < in_length; i++) {\n\t\t\tthis._dataArraySetValue(i, new Int64());\n\t\t}\n\t}\n}\nInt64ArrayProperty.prototype._typeid = \"Int64\";\n\n/**\n * An ArrayProperty which stores Uint64 values\n */\nexport class Uint64ArrayProperty extends Integer64ArrayProperty {\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.Integer64ArrayProperty\n\t * @alias property-properties.Uint64ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Specialized function to deserialize Uint64 primitive types.\n\t * Some primitive types (e.g. Uint64, which is not natively supported by javascript) require\n\t * special treatment on deserialization. For supported types, we can just return the input here.\n\t *\n\t * @param {property-properties.SerializedChangeSet} in_serializedObj - The object to be deserialized\n\t * @return {Uint64} the deserialized value\n\t */\n\t_deserializeValue(in_serializedObj) {\n\t\treturn new Uint64(in_serializedObj[0], in_serializedObj[1]);\n\t}\n\n\t/**\n\t * Sets the array properties elements to the content of the given array\n\t * All changed elements must already exist. This will overwrite existing elements.\n\t * @param {number} in_offset - Target start index\n\t * @param {Array<*>|Array<property-properties.BaseProperty>} in_array - contains the elements to be set\n\t * @throws if in_offset is not a number\n\t * @throws if in_offset is smaller than zero or higher than the length of the array\n\t */\n\tsetRange(in_offset, in_array) {\n\t\tif (!_.isArray(in_array)) {\n\t\t\tthrow new TypeError(MSG.IN_ARRAY_NOT_ARRAY + \"Uint64ArrayProperty.setRange\");\n\t\t}\n\t\tvar out_array = in_array.map((element) => {\n\t\t\treturn _castFunctors.Uint64(element);\n\t\t});\n\t\tArrayProperty.prototype.setRange.call(this, in_offset, out_array);\n\t}\n\n\t/**\n\t * Inserts the content of a given array into the array property\n\t * It will not overwrite the existing values but push them to the right instead.\n\t * E.g. [1, 2, 3] .insertRange(1, [9, 8]) => [1, 9, 8, 2, 3]\n\t * @param {number} in_offset - Target index\n\t * @param {Array<*>} in_array - The array to be inserted\n\t * @throws if in_offset is smaller than zero, larger than the length of the array or not a number.\n\t * @throws if trying to insert a property that already has a parent.\n\t * @throws if tyring to modify a referenced property.\n\t */\n\tinsertRange(in_offset, in_array) {\n\t\tvar out_array = in_array.map((element) => {\n\t\t\treturn _castFunctors.Uint64(element);\n\t\t});\n\t\tArrayProperty.prototype.insertRange.call(this, in_offset, out_array);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new UniversalDataArray(in_length);\n\t\tfor (var i = 0; i < in_length; i++) {\n\t\t\tthis._dataArraySetValue(i, new Uint64());\n\t\t}\n\t}\n}\nUint64ArrayProperty.prototype._typeid = \"Uint64\";\n\n/**\n * An ArrayProperty which stores String values\n */\nexport class StringArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.StringArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new UniversalDataArray(in_length);\n\t\tfor (var i = 0; i < in_length; i++) {\n\t\t\tthis._dataArraySetValue(i, \"\");\n\t\t}\n\t}\n}\nStringArrayProperty.prototype._typeid = \"String\";\n\n/**\n * An ArrayProperty which stores Boolean values\n */\nexport class BoolArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.BoolArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params, Array, true);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BoolDataArray(in_length);\n\t\tfor (var i = 0; i < in_length; i++) {\n\t\t\tthis._dataArraySetValue(i, false);\n\t\t}\n\t}\n}\nBoolArrayProperty.prototype._typeid = \"Bool\";\n"]}
|
|
1
|
+
{"version":3,"file":"valueArrayProperty.js","sourceRoot":"","sources":["../../src/properties/valueArrayProperty.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EACL,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,MAAM,EACN,KAAK,GACL,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnD,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AACjF,MAAM,EAAE,aAAa,EA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C;AAEjD;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,kBAAkB;IAC1D;;;;;;;;OAQG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,CAAC,CAAC;IAClB,CAAC;IAED;;;OAGG;IACH,gBAAgB,CAAC,SAAS;QACzB,IAAI,CAAC,aAAa,GAAG,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC;QACvD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE;YACnC,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;SAC/B;IACF,CAAC;CACD;AACD,mBAAmB,CAAC,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;AAEjD;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,kBAAkB;IACxD;;;;;;;;OAQG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACH,gBAAgB,CAAC,SAAS;QACzB,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,SAAS,CAAC,CAAC;QAClD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE;YACnC,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;SAClC;IACF,CAAC;CACD;AACD,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview Definition of the valuearray property class\n */\n\nconst _ = require(\"lodash\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst {\n\tBaseDataArray,\n\tUniversalDataArray,\n\tBoolDataArray,\n\tUint64,\n\tInt64,\n} = require(\"@fluid-experimental/property-common\");\nconst { Int64Property, Uint64Property } = require(\"../properties/intProperties\");\nconst { _castFunctors } = require(\"./primitiveTypeCasts\");\nconst { ArrayProperty } = require(\"./arrayProperty\");\nconst { BaseProperty } = require(\"./baseProperty\");\n\n/**\n * An array property which stores primitive values\n * @internal\n */\nexport class ValueArrayProperty extends ArrayProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ArrayProperty\n\t * @alias property-properties.ValueArrayProperty\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params, true);\n\t}\n\n\t/**\n\t * Returns the value at in_position for a primitive array\n\t * @param {number} in_position - The array index\n\t * @return {*} the value\n\t */\n\t_getValue(in_position) {\n\t\treturn this._dataArrayRef.getValue(in_position);\n\t}\n\n\t/**\n\t * returns the array of primitive values.\n\t * @return {Array<*>} the array of values.\n\t * For example: ['string1', 'string2']\n\t */\n\tgetValues() {\n\t\tvar result = [];\n\t\tvar ids = this.getIds();\n\t\tfor (var i = 0; i < ids.length; i++) {\n\t\t\tresult.push(this.get(ids[i]));\n\t\t}\n\t\treturn result;\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 this.get(in_segment);\n\t}\n\n\t/**\n\t * Function to serialize special primitive types.\n\t * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n\t * special treatment on serialization. For supported types, we can just return the input here.\n\t *\n\t * @param {*} in_obj - The object to be serialized\n\t * @return {property-properties.SerializedChangeSet} the serialized object\n\t */\n\t_serializeValue(in_obj) {\n\t\treturn in_obj;\n\t}\n\n\t/**\n\t * Function to serialize arrays of 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 {Array} in_array - The array of special objects to be serialized\n\t * @return {Array<property-properties.SerializedChangeSet>} the serialized object\n\t */\n\t_serializeArray(in_array) {\n\t\treturn in_array;\n\t}\n\n\t/**\n\t * Function to deserialize arrays of 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 {Array<property-properties.SerializedChangeSet>} in_serializedObj - The serialized object\n\t * @return {Array} in_array - The array of special objects that were deserialized\n\t */\n\t_deserializeArray(in_serializedObj) {\n\t\treturn in_serializedObj;\n\t}\n}\nValueArrayProperty.prototype._isPrimitive = true;\n\n/**\n * An ArrayProperty which stores Float32 values\n */\nexport class Float32ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Float32ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Float32Array, in_length);\n\t}\n}\nFloat32ArrayProperty.prototype._typeid = \"Float32\";\n\n/**\n * An ArrayProperty which stores Float64 values\n */\nexport class Float64ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Float64ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Float64Array, in_length);\n\t}\n}\nFloat64ArrayProperty.prototype._typeid = \"Float64\";\n\n/**\n * An ArrayProperty which stores Uint8 values\n */\nexport class Uint8ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Uint8ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Uint8Array, in_length);\n\t}\n}\nUint8ArrayProperty.prototype._typeid = \"Uint8\";\n\n/**\n * An ArrayProperty which stores Int8 values\n *\n */\nexport class Int8ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Int8ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Int8Array, in_length);\n\t}\n}\nInt8ArrayProperty.prototype._typeid = \"Int8\";\n\n/**\n * An ArrayProperty which stores Uint16 values\n */\nexport class Uint16ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Uint16ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Uint16Array, in_length);\n\t}\n}\nUint16ArrayProperty.prototype._typeid = \"Uint16\";\n\n/**\n * An ArrayProperty which stores Int16 values\n */\nexport class Int16ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Int16ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Int16Array, in_length);\n\t}\n}\nInt16ArrayProperty.prototype._typeid = \"Int16\";\n\n/**\n * An ArrayProperty which stores Uint32 values\n */\nexport class Uint32ArrayProperty extends ValueArrayProperty {\n\t/** @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueArrayProperty\n\t * @alias property-properties.Uint32ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Uint32Array, in_length);\n\t}\n}\nUint32ArrayProperty.prototype._typeid = \"Uint32\";\n\n/**\n * An ArrayProperty which stores Int32 values\n */\nexport class Int32ArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.Int32ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BaseDataArray(Int32Array, in_length);\n\t}\n}\nInt32ArrayProperty.prototype._typeid = \"Int32\";\n\n/**\n * An ArrayProperty which stores Int64 values\n */\nexport class Integer64ArrayProperty extends ValueArrayProperty {\n\t/** @param {Object} in_params - Input parameters for property creation\n\t *\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueArrayProperty\n\t * @alias property-properties.Integer64ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\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\tif (in_obj instanceof Int64 || in_obj instanceof Uint64) {\n\t\t\treturn [in_obj.getValueLow(), in_obj.getValueHigh()];\n\t\t}\n\t\treturn in_obj;\n\t}\n\n\t/**\n\t * Function to serialize arrays of 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 {Array} in_array - The array of special objects to be serialized\n\t * @return {Array<property-properties.SerializedChangeSet>} the serialized object\n\t */\n\t_serializeArray(in_array) {\n\t\tvar result = [];\n\t\tfor (var i = 0; i < in_array.length; i++) {\n\t\t\tresult.push(this._serializeValue(in_array[i]));\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Function to deserialize arrays of 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 {Array<property-properties.SerializedChangeSet>} in_serializedObj - The serialized object\n\t * @return {Array} in_array - The array of special objects that were deserialized\n\t */\n\t_deserializeArray(in_serializedObj) {\n\t\tvar result = [];\n\t\tfor (var i = 0; i < in_serializedObj.length; i++) {\n\t\t\tresult.push(this._deserializeValue(in_serializedObj[i]));\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_prettyPrint(indent, externalId, printFct) {\n\t\tprintFct(indent + externalId + this.getId() + \" (Array of \" + this.getTypeid() + \"): [\");\n\t\tvar childIndent = indent + \" \";\n\t\tvar int64Prop;\n\t\tfor (var i = 0; i < this._dataArrayGetLength(); i++) {\n\t\t\t// TODO: The 'toString()' function is defined on Integer64Property, so we need to create\n\t\t\t// such object to use it. It would be better to have it in Integer64.prototype.toString\n\t\t\tint64Prop =\n\t\t\t\tthis._dataArrayGetValue(i) instanceof Int64\n\t\t\t\t\t? new Int64Property({})\n\t\t\t\t\t: new Uint64Property({});\n\t\t\tint64Prop.setValueLow(this._dataArrayGetValue(i).getValueLow());\n\t\t\tint64Prop.setValueHigh(this._dataArrayGetValue(i).getValueHigh());\n\t\t\tprintFct(childIndent + i + \": \" + int64Prop);\n\t\t}\n\t\tprintFct(indent + \"]\");\n\t}\n}\n/**\n * An ArrayProperty which stores Int64 values\n */\nexport class Int64ArrayProperty extends Integer64ArrayProperty {\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.Integer64ArrayProperty\n\t * @alias property-properties.Int64ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Sets the array properties elements to the content of the given array\n\t * All changed elements must already exist. This will overwrite existing elements.\n\t * @param {number} in_offset - Target start index\n\t * @param {Array<*>|Array<property-properties.BaseProperty>} in_array - contains the elements to be set\n\t * @throws if in_offset is not a number\n\t * @throws if in_offset is smaller than zero or higher than the length of the array\n\t */\n\tsetRange(in_offset, in_array) {\n\t\tif (!_.isArray(in_array)) {\n\t\t\tthrow new TypeError(MSG.IN_ARRAY_NOT_ARRAY + \"Int64ArrayProperty.setRange\");\n\t\t}\n\t\tvar out_array = in_array.map((element) => {\n\t\t\treturn _castFunctors.Int64(element);\n\t\t});\n\t\tArrayProperty.prototype.setRange.call(this, in_offset, out_array);\n\t}\n\n\t/**\n\t * Inserts the content of a given array into the array property\n\t * It will not overwrite the existing values but push them to the right instead.\n\t * E.g. [1, 2, 3] .insertRange(1, [9, 8]) => [1, 9, 8, 2, 3]\n\t * @param {number} in_offset - Target index\n\t * @param {Array<*>} in_array - The array to be inserted\n\t * @throws if in_offset is smaller than zero, larger than the length of the array or not a number.\n\t * @throws if trying to insert a property that already has a parent.\n\t * @throws if tyring to modify a referenced property.\n\t */\n\tinsertRange(in_offset, in_array) {\n\t\tvar out_array = in_array.map((element) => {\n\t\t\treturn _castFunctors.Int64(element);\n\t\t});\n\t\tArrayProperty.prototype.insertRange.call(this, in_offset, out_array);\n\t}\n\n\t/**\n\t * Specialized function to deserialize Int64 primitive types.\n\t * Some primitive types (e.g. Int64, which is not natively supported by javascript) require\n\t * special treatment on deserialization. For supported types, we can just return the input here.\n\t *\n\t * @param {property-properties.SerializedChangeSet} in_serializedObj - The object to be deserialized\n\t * @return {Int64} the deserialized value\n\t */\n\t_deserializeValue(in_serializedObj) {\n\t\treturn new Int64(in_serializedObj[0], in_serializedObj[1]);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new UniversalDataArray(in_length);\n\t\tfor (var i = 0; i < in_length; i++) {\n\t\t\tthis._dataArraySetValue(i, new Int64());\n\t\t}\n\t}\n}\nInt64ArrayProperty.prototype._typeid = \"Int64\";\n\n/**\n * An ArrayProperty which stores Uint64 values\n */\nexport class Uint64ArrayProperty extends Integer64ArrayProperty {\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.Integer64ArrayProperty\n\t * @alias property-properties.Uint64ArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Specialized function to deserialize Uint64 primitive types.\n\t * Some primitive types (e.g. Uint64, which is not natively supported by javascript) require\n\t * special treatment on deserialization. For supported types, we can just return the input here.\n\t *\n\t * @param {property-properties.SerializedChangeSet} in_serializedObj - The object to be deserialized\n\t * @return {Uint64} the deserialized value\n\t */\n\t_deserializeValue(in_serializedObj) {\n\t\treturn new Uint64(in_serializedObj[0], in_serializedObj[1]);\n\t}\n\n\t/**\n\t * Sets the array properties elements to the content of the given array\n\t * All changed elements must already exist. This will overwrite existing elements.\n\t * @param {number} in_offset - Target start index\n\t * @param {Array<*>|Array<property-properties.BaseProperty>} in_array - contains the elements to be set\n\t * @throws if in_offset is not a number\n\t * @throws if in_offset is smaller than zero or higher than the length of the array\n\t */\n\tsetRange(in_offset, in_array) {\n\t\tif (!_.isArray(in_array)) {\n\t\t\tthrow new TypeError(MSG.IN_ARRAY_NOT_ARRAY + \"Uint64ArrayProperty.setRange\");\n\t\t}\n\t\tvar out_array = in_array.map((element) => {\n\t\t\treturn _castFunctors.Uint64(element);\n\t\t});\n\t\tArrayProperty.prototype.setRange.call(this, in_offset, out_array);\n\t}\n\n\t/**\n\t * Inserts the content of a given array into the array property\n\t * It will not overwrite the existing values but push them to the right instead.\n\t * E.g. [1, 2, 3] .insertRange(1, [9, 8]) => [1, 9, 8, 2, 3]\n\t * @param {number} in_offset - Target index\n\t * @param {Array<*>} in_array - The array to be inserted\n\t * @throws if in_offset is smaller than zero, larger than the length of the array or not a number.\n\t * @throws if trying to insert a property that already has a parent.\n\t * @throws if tyring to modify a referenced property.\n\t */\n\tinsertRange(in_offset, in_array) {\n\t\tvar out_array = in_array.map((element) => {\n\t\t\treturn _castFunctors.Uint64(element);\n\t\t});\n\t\tArrayProperty.prototype.insertRange.call(this, in_offset, out_array);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new UniversalDataArray(in_length);\n\t\tfor (var i = 0; i < in_length; i++) {\n\t\t\tthis._dataArraySetValue(i, new Uint64());\n\t\t}\n\t}\n}\nUint64ArrayProperty.prototype._typeid = \"Uint64\";\n\n/**\n * An ArrayProperty which stores String values\n */\nexport class StringArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.StringArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new UniversalDataArray(in_length);\n\t\tfor (var i = 0; i < in_length; i++) {\n\t\t\tthis._dataArraySetValue(i, \"\");\n\t\t}\n\t}\n}\nStringArrayProperty.prototype._typeid = \"String\";\n\n/**\n * An ArrayProperty which stores Boolean values\n */\nexport class BoolArrayProperty extends ValueArrayProperty {\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.ValueArrayProperty\n\t * @alias property-properties.BoolArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params, Array, true);\n\t}\n\n\t/**\n\t * Creates and initializes the data array\n\t * @param {Number} in_length - The initial length of the array\n\t */\n\t_dataArrayCreate(in_length) {\n\t\tthis._dataArrayRef = new BoolDataArray(in_length);\n\t\tfor (var i = 0; i < in_length; i++) {\n\t\t\tthis._dataArraySetValue(i, false);\n\t\t}\n\t}\n}\nBoolArrayProperty.prototype._typeid = \"Bool\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueMapProperty.d.ts","sourceRoot":"","sources":["../../src/properties/valueMapProperty.js"],"names":[],"mappings":"AAiBA
|
|
1
|
+
{"version":3,"file":"valueMapProperty.d.ts","sourceRoot":"","sources":["../../src/properties/valueMapProperty.js"],"names":[],"mappings":"AAiBA;;;GAGG;AACH;IACC;;;;;;;;OAQG;IACH,wBAEC;IAmCD;;;;OAIG;IACH,qBAHY,MAAM,CAWjB;IAED;;;;;OAKG;IACH,6BAHW,MAAM,4BAchB;IA0BD,4BAEC;CAyED;AAID;;GAEG;AACH;IAeA,kBAAyC;CAFxC;AAID;;GAEG;AACH;IAeA,kBAAyC;CAFxC;AAID;;GAEG;AACH;IAeA,kBAAwC;CAFvC;AAID;;GAEG;AACH;IAeA,kBAAwC;CAFvC;AAID;;GAEG;AACH;IAeA,kBAAuC;CAFtC;AAID;;GAEG;AACH;IAeA,kBAAuC;CAFtC;AAID;;GAEG;AACH;IAcC;;;;;;;OAOG;IACH,YAHW,MAAM,YACN,KAAK,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,QAgBpC;IAcD;;OAEG;IACH,uDAWC;CACD;AAED;;GAEG;AACH;IAcC;;;;;;;OAOG;IACH,0CAFY,KAAK,CAIhB;IAGF,8DAAuC;CAFtC;AAID;;GAEG;AACH;IAcC;;;;;;;OAOG;IACH,0CAFY,MAAM,CAIjB;IAGF,8DAAwC;CAFvC;AAID;;GAEG;AACH;IAcA,kBAAuC;CAFtC;AAID;;GAEG;AACH;IAeA,kBAAsC;CAFrC;AAID;;GAEG;AACH;IAeA,2CAAwC;CAFvC;AAID;;GAEG;AACH;IAeA,6CAAsC;CAFrC"}
|
|
@@ -15,6 +15,7 @@ const { BaseProperty } = require("./baseProperty");
|
|
|
15
15
|
const { MapProperty } = require("./mapProperty");
|
|
16
16
|
/**
|
|
17
17
|
* A ValueMapProperty is a collection class that can contain an dictionary that maps from strings to primitive types.
|
|
18
|
+
* @internal
|
|
18
19
|
*/
|
|
19
20
|
export class ValueMapProperty extends MapProperty {
|
|
20
21
|
/**
|