@fluid-experimental/property-properties 2.0.0-internal.3.0.2 → 2.0.0-internal.3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/containerSerializer.d.ts.map +1 -1
- package/dist/containerSerializer.js +5 -5
- package/dist/containerSerializer.js.map +1 -1
- package/dist/enableValidations.js.map +1 -1
- package/dist/index.d.ts +19 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/properties/abstractStaticCollectionProperty.d.ts +10 -10
- package/dist/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
- package/dist/properties/abstractStaticCollectionProperty.js +70 -53
- package/dist/properties/abstractStaticCollectionProperty.js.map +1 -1
- package/dist/properties/arrayProperty.d.ts.map +1 -1
- package/dist/properties/arrayProperty.js +152 -103
- package/dist/properties/arrayProperty.js.map +1 -1
- package/dist/properties/baseProperty.d.ts +4 -4
- package/dist/properties/baseProperty.d.ts.map +1 -1
- package/dist/properties/baseProperty.js +69 -47
- package/dist/properties/baseProperty.js.map +1 -1
- package/dist/properties/boolProperty.d.ts.map +1 -1
- package/dist/properties/boolProperty.js +3 -3
- package/dist/properties/boolProperty.js.map +1 -1
- package/dist/properties/containerProperty.d.ts +8 -8
- package/dist/properties/containerProperty.d.ts.map +1 -1
- package/dist/properties/containerProperty.js +33 -26
- package/dist/properties/containerProperty.js.map +1 -1
- package/dist/properties/enumArrayProperty.d.ts.map +1 -1
- package/dist/properties/enumArrayProperty.js +14 -14
- package/dist/properties/enumArrayProperty.js.map +1 -1
- package/dist/properties/enumProperty.d.ts.map +1 -1
- package/dist/properties/enumProperty.js +17 -17
- package/dist/properties/enumProperty.js.map +1 -1
- package/dist/properties/floatProperties.js +4 -4
- package/dist/properties/floatProperties.js.map +1 -1
- package/dist/properties/index.d.ts +23 -23
- package/dist/properties/index.d.ts.map +1 -1
- package/dist/properties/index.js.map +1 -1
- package/dist/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
- package/dist/properties/indexedCollectionBaseProperty.js +47 -37
- package/dist/properties/indexedCollectionBaseProperty.js.map +1 -1
- package/dist/properties/intProperties.d.ts.map +1 -1
- package/dist/properties/intProperties.js +10 -10
- package/dist/properties/intProperties.js.map +1 -1
- package/dist/properties/lazyLoadedProperties.js.map +1 -1
- package/dist/properties/mapProperty.d.ts.map +1 -1
- package/dist/properties/mapProperty.js +21 -17
- package/dist/properties/mapProperty.js.map +1 -1
- package/dist/properties/namedNodeProperty.d.ts.map +1 -1
- package/dist/properties/namedNodeProperty.js +3 -3
- package/dist/properties/namedNodeProperty.js.map +1 -1
- package/dist/properties/namedProperty.d.ts.map +1 -1
- package/dist/properties/namedProperty.js +7 -5
- package/dist/properties/namedProperty.js.map +1 -1
- package/dist/properties/nodeProperty.d.ts.map +1 -1
- package/dist/properties/nodeProperty.js +5 -3
- package/dist/properties/nodeProperty.js.map +1 -1
- package/dist/properties/primitiveTypeCasts.d.ts.map +1 -1
- package/dist/properties/primitiveTypeCasts.js +9 -9
- package/dist/properties/primitiveTypeCasts.js.map +1 -1
- package/dist/properties/referenceArrayProperty.d.ts.map +1 -1
- package/dist/properties/referenceArrayProperty.js +31 -25
- package/dist/properties/referenceArrayProperty.js.map +1 -1
- package/dist/properties/referenceMapProperty.d.ts.map +1 -1
- package/dist/properties/referenceMapProperty.js +18 -18
- package/dist/properties/referenceMapProperty.js.map +1 -1
- package/dist/properties/referenceProperty.d.ts.map +1 -1
- package/dist/properties/referenceProperty.js +33 -29
- package/dist/properties/referenceProperty.js.map +1 -1
- package/dist/properties/setProperty.d.ts.map +1 -1
- package/dist/properties/setProperty.js +31 -29
- package/dist/properties/setProperty.js.map +1 -1
- package/dist/properties/stringProperty.d.ts.map +1 -1
- package/dist/properties/stringProperty.js +56 -40
- package/dist/properties/stringProperty.js.map +1 -1
- package/dist/properties/uintProperties.js +5 -5
- package/dist/properties/uintProperties.js.map +1 -1
- package/dist/properties/valueArrayProperty.d.ts +1 -1
- package/dist/properties/valueArrayProperty.d.ts.map +1 -1
- package/dist/properties/valueArrayProperty.js +30 -29
- package/dist/properties/valueArrayProperty.js.map +1 -1
- package/dist/properties/valueMapProperty.d.ts.map +1 -1
- package/dist/properties/valueMapProperty.js +31 -29
- package/dist/properties/valueMapProperty.js.map +1 -1
- package/dist/properties/valueProperty.d.ts.map +1 -1
- package/dist/properties/valueProperty.js +11 -9
- package/dist/properties/valueProperty.js.map +1 -1
- package/dist/propertyFactory.d.ts.map +1 -1
- package/dist/propertyFactory.js +309 -252
- package/dist/propertyFactory.js.map +1 -1
- package/dist/propertyTemplate.d.ts +17 -17
- package/dist/propertyTemplate.d.ts.map +1 -1
- package/dist/propertyTemplate.js +64 -45
- package/dist/propertyTemplate.js.map +1 -1
- package/dist/propertyTemplateWrapper.d.ts.map +1 -1
- package/dist/propertyTemplateWrapper.js +40 -25
- package/dist/propertyTemplateWrapper.js.map +1 -1
- package/dist/propertyUtils.d.ts.map +1 -1
- package/dist/propertyUtils.js.map +1 -1
- package/dist/test/properties/arrayProperty.spec.js +566 -490
- package/dist/test/properties/arrayProperty.spec.js.map +1 -1
- package/dist/test/properties/baseProperty.spec.js +293 -280
- package/dist/test/properties/baseProperty.spec.js.map +1 -1
- package/dist/test/properties/containerProperty.spec.js +100 -94
- package/dist/test/properties/containerProperty.spec.js.map +1 -1
- package/dist/test/properties/customArrayProperty.spec.js +174 -147
- package/dist/test/properties/customArrayProperty.spec.js.map +1 -1
- package/dist/test/properties/enumArrayProperty.spec.js +67 -63
- package/dist/test/properties/enumArrayProperty.spec.js.map +1 -1
- package/dist/test/properties/enumProperty.spec.js +115 -97
- package/dist/test/properties/enumProperty.spec.js.map +1 -1
- package/dist/test/properties/float32.spec.js +5 -5
- package/dist/test/properties/float32.spec.js.map +1 -1
- package/dist/test/properties/int64ArrayProperty.spec.js +157 -93
- package/dist/test/properties/int64ArrayProperty.spec.js.map +1 -1
- package/dist/test/properties/int64MapProperty.spec.js +185 -166
- package/dist/test/properties/int64MapProperty.spec.js.map +1 -1
- package/dist/test/properties/int64Property.spec.js +109 -109
- package/dist/test/properties/int64Property.spec.js.map +1 -1
- package/dist/test/properties/isLeafNode.spec.js +75 -76
- package/dist/test/properties/isLeafNode.spec.js.map +1 -1
- package/dist/test/properties/mapProperty.spec.js +571 -531
- package/dist/test/properties/mapProperty.spec.js.map +1 -1
- package/dist/test/properties/namedNodeProperty.spec.js +31 -31
- package/dist/test/properties/namedNodeProperty.spec.js.map +1 -1
- package/dist/test/properties/nodeProperty.spec.js +805 -795
- package/dist/test/properties/nodeProperty.spec.js.map +1 -1
- package/dist/test/properties/referenceProperty.spec.js +729 -679
- package/dist/test/properties/referenceProperty.spec.js.map +1 -1
- package/dist/test/properties/relationshipProperty.spec.js +16 -16
- package/dist/test/properties/relationshipProperty.spec.js.map +1 -1
- package/dist/test/properties/setProperty.spec.js +288 -227
- package/dist/test/properties/setProperty.spec.js.map +1 -1
- package/dist/test/properties/stringProperty.spec.js +326 -318
- package/dist/test/properties/stringProperty.spec.js.map +1 -1
- package/dist/test/properties/uint64Property.spec.js +46 -36
- package/dist/test/properties/uint64Property.spec.js.map +1 -1
- package/dist/test/properties/valueMapProperty.spec.js +259 -246
- package/dist/test/properties/valueMapProperty.spec.js.map +1 -1
- package/dist/test/properties/valueProperty.spec.js +49 -43
- package/dist/test/properties/valueProperty.spec.js.map +1 -1
- package/dist/test/propertyFactory.spec.js +2038 -1631
- package/dist/test/propertyFactory.spec.js.map +1 -1
- package/dist/test/propertyTemplateWrapper.spec.js +72 -102
- package/dist/test/propertyTemplateWrapper.spec.js.map +1 -1
- package/dist/test/propertyUtils.spec.js +22 -21
- package/dist/test/propertyUtils.spec.js.map +1 -1
- package/dist/test/reversibleChangeset.spec.js +857 -703
- package/dist/test/reversibleChangeset.spec.js.map +1 -1
- package/dist/test/setup.js +5 -5
- package/dist/test/setup.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +1 -1
- package/dist/test/utils.spec.js +1334 -1144
- package/dist/test/utils.spec.js.map +1 -1
- package/dist/test/validation/badMissingSemverInTypeid.js +20 -20
- package/dist/test/validation/badMissingSemverInTypeid.js.map +1 -1
- package/dist/test/validation/badPrimitiveTypeid.js +12 -12
- package/dist/test/validation/badPrimitiveTypeid.js.map +1 -1
- package/dist/test/validation/goodColorId.js +91 -91
- package/dist/test/validation/goodColorId.js.map +1 -1
- package/dist/test/validation/goodColorPalette.js +4 -4
- package/dist/test/validation/goodColorPalette.js.map +1 -1
- package/dist/test/validation/goodPointId.js +20 -20
- package/dist/test/validation/goodPointId.js.map +1 -1
- package/dist/test/validation/reversibleChangeSetTestData.js +23841 -2
- package/dist/test/validation/reversibleChangeSetTestData.js.map +1 -1
- package/lib/containerSerializer.d.ts.map +1 -1
- package/lib/containerSerializer.js +5 -5
- package/lib/containerSerializer.js.map +1 -1
- package/lib/enableValidations.js.map +1 -1
- package/lib/index.d.ts +19 -19
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +19 -19
- package/lib/index.js.map +1 -1
- package/lib/properties/abstractStaticCollectionProperty.d.ts +10 -10
- package/lib/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
- package/lib/properties/abstractStaticCollectionProperty.js +70 -53
- package/lib/properties/abstractStaticCollectionProperty.js.map +1 -1
- package/lib/properties/arrayProperty.d.ts.map +1 -1
- package/lib/properties/arrayProperty.js +152 -103
- package/lib/properties/arrayProperty.js.map +1 -1
- package/lib/properties/baseProperty.d.ts +4 -4
- package/lib/properties/baseProperty.d.ts.map +1 -1
- package/lib/properties/baseProperty.js +73 -51
- package/lib/properties/baseProperty.js.map +1 -1
- package/lib/properties/boolProperty.d.ts.map +1 -1
- package/lib/properties/boolProperty.js +3 -3
- package/lib/properties/boolProperty.js.map +1 -1
- package/lib/properties/containerProperty.d.ts +8 -8
- package/lib/properties/containerProperty.d.ts.map +1 -1
- package/lib/properties/containerProperty.js +33 -26
- package/lib/properties/containerProperty.js.map +1 -1
- package/lib/properties/enumArrayProperty.d.ts.map +1 -1
- package/lib/properties/enumArrayProperty.js +14 -14
- package/lib/properties/enumArrayProperty.js.map +1 -1
- package/lib/properties/enumProperty.d.ts.map +1 -1
- package/lib/properties/enumProperty.js +17 -17
- package/lib/properties/enumProperty.js.map +1 -1
- package/lib/properties/floatProperties.js +4 -4
- package/lib/properties/floatProperties.js.map +1 -1
- package/lib/properties/index.d.ts +23 -23
- package/lib/properties/index.d.ts.map +1 -1
- package/lib/properties/index.js +23 -23
- package/lib/properties/index.js.map +1 -1
- package/lib/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
- package/lib/properties/indexedCollectionBaseProperty.js +47 -37
- package/lib/properties/indexedCollectionBaseProperty.js.map +1 -1
- package/lib/properties/intProperties.d.ts.map +1 -1
- package/lib/properties/intProperties.js +10 -10
- package/lib/properties/intProperties.js.map +1 -1
- package/lib/properties/lazyLoadedProperties.js.map +1 -1
- package/lib/properties/mapProperty.d.ts.map +1 -1
- package/lib/properties/mapProperty.js +21 -17
- package/lib/properties/mapProperty.js.map +1 -1
- package/lib/properties/namedNodeProperty.d.ts.map +1 -1
- package/lib/properties/namedNodeProperty.js +3 -3
- package/lib/properties/namedNodeProperty.js.map +1 -1
- package/lib/properties/namedProperty.d.ts.map +1 -1
- package/lib/properties/namedProperty.js +7 -5
- package/lib/properties/namedProperty.js.map +1 -1
- package/lib/properties/nodeProperty.d.ts.map +1 -1
- package/lib/properties/nodeProperty.js +5 -3
- package/lib/properties/nodeProperty.js.map +1 -1
- package/lib/properties/primitiveTypeCasts.d.ts.map +1 -1
- package/lib/properties/primitiveTypeCasts.js +9 -9
- package/lib/properties/primitiveTypeCasts.js.map +1 -1
- package/lib/properties/referenceArrayProperty.d.ts.map +1 -1
- package/lib/properties/referenceArrayProperty.js +31 -25
- package/lib/properties/referenceArrayProperty.js.map +1 -1
- package/lib/properties/referenceMapProperty.d.ts.map +1 -1
- package/lib/properties/referenceMapProperty.js +18 -18
- package/lib/properties/referenceMapProperty.js.map +1 -1
- package/lib/properties/referenceProperty.d.ts.map +1 -1
- package/lib/properties/referenceProperty.js +33 -29
- package/lib/properties/referenceProperty.js.map +1 -1
- package/lib/properties/setProperty.d.ts.map +1 -1
- package/lib/properties/setProperty.js +31 -29
- package/lib/properties/setProperty.js.map +1 -1
- package/lib/properties/stringProperty.d.ts.map +1 -1
- package/lib/properties/stringProperty.js +56 -40
- package/lib/properties/stringProperty.js.map +1 -1
- package/lib/properties/uintProperties.js +5 -5
- package/lib/properties/uintProperties.js.map +1 -1
- package/lib/properties/valueArrayProperty.d.ts +1 -1
- package/lib/properties/valueArrayProperty.d.ts.map +1 -1
- package/lib/properties/valueArrayProperty.js +30 -29
- package/lib/properties/valueArrayProperty.js.map +1 -1
- package/lib/properties/valueMapProperty.d.ts.map +1 -1
- package/lib/properties/valueMapProperty.js +31 -29
- package/lib/properties/valueMapProperty.js.map +1 -1
- package/lib/properties/valueProperty.d.ts.map +1 -1
- package/lib/properties/valueProperty.js +11 -9
- package/lib/properties/valueProperty.js.map +1 -1
- package/lib/propertyFactory.d.ts.map +1 -1
- package/lib/propertyFactory.js +309 -252
- package/lib/propertyFactory.js.map +1 -1
- package/lib/propertyTemplate.d.ts +17 -17
- package/lib/propertyTemplate.d.ts.map +1 -1
- package/lib/propertyTemplate.js +64 -45
- package/lib/propertyTemplate.js.map +1 -1
- package/lib/propertyTemplateWrapper.d.ts.map +1 -1
- package/lib/propertyTemplateWrapper.js +40 -25
- package/lib/propertyTemplateWrapper.js.map +1 -1
- package/lib/propertyUtils.d.ts.map +1 -1
- package/lib/propertyUtils.js.map +1 -1
- package/package.json +28 -28
- package/src/index.d.ts +2750 -2681
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerProperty.js","sourceRoot":"","sources":["../../src/properties/containerProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;EAEE;AACF,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;A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CAAC,SAAS,CAAC,OAAO,GAAG,mBAAmB,CAAC;AAC1D,iBAAiB,CAAC,SAAS,CAAC,gBAAgB,GAAG,EAAE,CAAC;AAClD,iBAAiB,CAAC,SAAS,CAAC,iBAAiB,GAAG,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n* @fileoverview This file contains the implementation of the ContainerProperty class\n*/\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { ConsoleUtils } = require('@fluid-experimental/property-common');\nconst _ = require('underscore');\nconst { validationsEnabled } = require('../enableValidations');\nconst { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');\nconst { BaseProperty } = require('./baseProperty');\nconst { IndexedCollectionBaseProperty } = require('./indexedCollectionBaseProperty');\n\n/**\n * A property object that allows to add child properties dynamically.\n */\nexport class ContainerProperty extends IndexedCollectionBaseProperty {\n /**\n * @param {Object} in_params - Input parameters for property creation\n * @protected\n */\n constructor(in_params) {\n super(in_params);\n\n if (in_params.optionalChildren) {\n this._optionalChildren = {};\n this._dynamicChildren = {};\n }\n }\n\n /**\n * Returns the name of all the sub-properties of this property.\n * @return {Array.<string>} An array of all the property ids\n */\n _getIds() {\n return AbstractStaticCollectionProperty.prototype._getIds.call(this).concat(Object.keys(this._dynamicChildren));\n }\n\n /**\n * Returns the sub-property having the given name in this property.\n *\n * @param {string|number} in_id - The id of the prop you wish to retrieve.\n *\n * @return {property-properties.BaseProperty | undefined} The property you seek or undefined if none is found.\n */\n _get(in_id) {\n return AbstractStaticCollectionProperty.prototype._get.call(this, in_id) || this._dynamicChildren[in_id];\n }\n\n /**\n * Adds an optional child to list of possible optional children.\n * @param {string} in_id - Id of the optional child\n * @param {string} in_typeid - typeid which determines what type the child should be\n * @private\n */\n _addOptionalChild(in_id, in_typeid) {\n if (this._optionalChildren === ContainerProperty.prototype._optionalChildren) {\n this._optionalChildren = {};\n this._dynamicChildren = {};\n }\n this._optionalChildren[in_id] = in_typeid;\n }\n\n /**\n * Appends a property\n *\n * @param {String | property-properties.BaseProperty } in_id - The id under which the property is added.\n * This parameter is optional. For NamedProperties it can be omitted. In that case the GUID of the named\n * property will be used.\n *\n * @param {property-properties.BaseProperty} [in_property] - The property to add\n * @throws if in_id is not a string or a number\n * @throws if there is already an entry for in_id\n * @throws if in_property is not a property\n * @throws if in_property does not have an id\n * @throws if in_property has a parent\n * @throws if in_property is a root property\n */\n insert(in_id, in_property) {\n if (in_property === undefined) {\n // If no id is passed, the property is passed as first parameter\n in_property = in_id;\n ConsoleUtils.assert(in_property instanceof BaseProperty, 'insert error: ' + MSG.NOT_A_PROPERTY);\n } else {\n ConsoleUtils.assert(_.isString(in_id) || _.isNumber(in_id), MSG.ID_STRING_OR_NUMBER);\n ConsoleUtils.assert(!_.isString(in_id) || !_.isEmpty(in_id), MSG.ID_SHOULD_NOT_BE_EMPTY_STRING);\n ConsoleUtils.assert(in_property instanceof BaseProperty, 'insert error: ' + MSG.NOT_A_PROPERTY);\n if (this._dynamicChildren[in_id] !== undefined) {\n throw new Error(MSG.PROPERTY_ALREADY_EXISTS + in_id);\n }\n if (validationsEnabled.enabled) {\n in_property._validateInsertIn(this);\n }\n // If an id is passed, it is stored in the child property object\n in_property._setId(in_id);\n }\n\n if (validationsEnabled.enabled) {\n this._validateInsert(in_property.getId(), in_property);\n }\n\n // Add the child property to the dynamic properties\n this._insert(in_property.getId(), in_property, true);\n }\n\n /**\n * Validates if inserting the property is valid.\n *\n * @param {string} in_id - id to be validated.\n * @param {string} in_property - property to be validated.\n * @throws if id is not on optional list.\n * @throws if the typeid of the property doesn't match the schema.\n * @protected\n */\n _validateInsert(in_id, in_property) {\n if (!(this._optionalChildren && this._optionalChildren[in_id])) {\n throw new Error(MSG.CANNOT_INSERT_UNKNOWN_PROPERTY + in_id);\n }\n\n if (this._optionalChildren[in_id].toUpperCase() !== in_property.getTypeid().toUpperCase()) {\n throw new Error(MSG.MISMATCHING_PROPERTY_TYPEID + this._optionalChildren[in_id] +\n ' instead it\\'s: ' + in_property.getTypeid());\n }\n }\n\n /**\n * @override\n * @inheritdoc\n */\n _getScope() {\n if (this._parent) {\n return this.getRoot()._getScope();\n } else {\n return this._checkedOutRepositoryInfo ? this._checkedOutRepositoryInfo.getScope() : undefined;\n }\n }\n\n /**\n * Removes the given property\n *\n * @param {string|property-properties.BaseProperty} in_property - The property to remove (either its id or the\n * whole property).\n * @throws if trying to remove an entry that does not exist\n * @return {property-properties.BaseProperty} the property removed.\n */\n remove(in_property) {\n var id = in_property;\n var returnValue;\n if (id instanceof BaseProperty) {\n returnValue = id;\n id = id.getId();\n } else {\n returnValue = this.get(id);\n }\n\n this._validateRemove(id);\n\n this._removeByKey(id);\n return returnValue;\n }\n\n /**\n * Validates if removing a property with specified id is valid.\n *\n * @param {string} in_id - id to be validated.\n * @throws if the id doesn't exist.\n * @throws if the id is not marked as optional.\n * @protected\n */\n _validateRemove(in_id) {\n if (!this._dynamicChildren[in_id]) {\n const error = this._staticChildren[in_id] !== undefined\n ? new Error(MSG.CANNOT_REMOVE_NON_OPTIONAL_PROP + in_id)\n : new Error((MSG.REMOVING_NON_EXISTING_KEY + in_id));\n\n throw error;\n }\n }\n\n /**\n * Removes all dynamic children\n * @throws if node property is read-only\n */\n clear() {\n this._checkIsNotReadOnly(true);\n _.each(this._dynamicChildren, this.remove.bind(this));\n }\n\n /**\n * Inserts a property into the collection\n *\n * @param {string} in_key - Key of the entry in the collection\n * @param {property-properties.NamedProperty} in_property - The property to insert\n * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n * trigger a modified event there. When batching updates, this can be prevented via this flag.\n */\n _insert(in_key, in_property, in_reportToView) {\n if (validationsEnabled.enabled) {\n this._checkIsNotReadOnly(true);\n }\n\n // Add the child property to the dynamic properties\n IndexedCollectionBaseProperty.prototype._insert.call(this, in_key, in_property, false);\n\n // We postponed the report above, to make sure the child property has actually been appended to this\n // node, before the report is forwarded to the view\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n }\n\n /**\n * Removes an entry with the given key\n *\n * @param {string} in_key - key of the entry\n * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n * trigger a modified event there. When batching updates, this can be prevented via this flag.\n */\n _removeByKey(in_key, in_reportToView) {\n this._checkIsNotReadOnly(true);\n\n if (this._dynamicChildren[in_key]) {\n // Remove from the indexed collection\n IndexedCollectionBaseProperty.prototype._removeByKey.call(this, in_key, in_reportToView);\n } else {\n console.error(MSG.REMOVING_NON_EXISTING_KEY + in_key);\n }\n }\n\n /**\n * Stores the information to which CheckedOutRepositoryInfo object this root property belongs.\n * Note: these functions should only be used internally (within the PropertySets library)\n *\n * @param {property-properties.CheckoutView~CheckedOutRepositoryInfo} in_checkedOutRepositoryInfo -\n * The checked out repository info this root property belongs to.\n * @protected\n */\n _setCheckedOutRepositoryInfo(in_checkedOutRepositoryInfo) {\n this._checkedOutRepositoryInfo = in_checkedOutRepositoryInfo;\n }\n\n /**\n * Gets the information to which CheckedOutRepositoryInfo object this root property belongs.\n * Note: these functions should only be used internally (within the PropertySets library)\n *\n * @return {property-properties.CheckoutView~CheckedOutRepositoryInfo|undefined} If this is the root of the\n * checked out hierarchy, this will return the checkout.\n * @protected\n */\n _getCheckedOutRepositoryInfo() {\n return this._checkedOutRepositoryInfo;\n }\n\n /**\n * Returns the name of all the static sub-properties of this property.\n *\n * @return {Array.<string>} An array of all the static property ids\n */\n getStaticIds() {\n return Object.keys(this._staticChildren);\n }\n\n /**\n * Returns the name of all the dynamic sub-properties of this property.\n *\n * @return {Array.<string>} An array of all the dynamic property ids\n */\n getDynamicIds() {\n return Object.keys(this._dynamicChildren);\n }\n\n /**\n * Returns an Object with all the dynamic children of this node property.\n *\n * WARNING: This is a direct access to the internal data-structure and the collection MUST NOT be modified. It is\n * read only for fast access and iteration. Insertion and deletion MUST be done via the insert and remove functions\n * of this class.\n *\n * @return {Object<String, property-properties.MapProperty~MapValueType>} The map with all entries in the map.\n */\n _getDynamicChildrenReadOnly() {\n return this._dynamicChildren;\n }\n\n /**\n * Given an object that mirrors a PSet Template, assign the properties.\n *\n * E.g.\n *\n * ```\n * <pre>\n * Templates = {\n * properties: [\n * { id: 'foo', typeid: 'String' },\n * { id: 'bar', properties: [{id: 'baz', typeid: 'Uint32'}] }\n * ]\n * }\n * </pre>\n * ```\n *\n * You would update the values like: `baseProperty.setValues({foo: 'hello', bar: {baz: 1}});`\n *\n * WARNING: not completely implemented for all types.\n *\n * @param {object} in_properties - The properties you would like to assign\n * @private\n */\n setValues(in_properties) {\n var checkoutView = this._getCheckoutView();\n if (checkoutView !== undefined) {\n checkoutView.pushNotificationDelayScope();\n ContainerProperty.prototype._setValues.call(this, in_properties, false, false);\n checkoutView.popNotificationDelayScope();\n } else {\n ContainerProperty.prototype._setValues.call(this, in_properties, false, false);\n }\n }\n}\n\nContainerProperty.prototype._typeid = 'ContainerProperty';\nContainerProperty.prototype._dynamicChildren = {};\nContainerProperty.prototype._optionalChildren = {};\n"]}
|
|
1
|
+
{"version":3,"file":"containerProperty.js","sourceRoot":"","sources":["../../src/properties/containerProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACH,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,YAAY,CAAC,CAAC;AAChC,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC/D,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;AAEr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AAC;IAED;;;;OAIG;IACH,YAAY;QACX,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC1C,CAAC;IAED;;;;OAIG;IACH,aAAa;QACZ,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;;;;OAQG;IACH,2BAA2B;QAC1B,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC9B,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,aAAa;QACtB,IAAI,YAAY,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC3C,IAAI,YAAY,KAAK,SAAS,EAAE;YAC/B,YAAY,CAAC,0BAA0B,EAAE,CAAC;YAC1C,iBAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/E,YAAY,CAAC,yBAAyB,EAAE,CAAC;SACzC;aAAM;YACN,iBAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAC/E;IACF,CAAC;CACD;AAtUD,8CAsUC;AAED,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,mBAAmB,CAAC;AAC1D,iBAAiB,CAAC,SAAS,CAAC,gBAAgB,GAAG,EAAE,CAAC;AAClD,iBAAiB,CAAC,SAAS,CAAC,iBAAiB,GAAG,EAAE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview This file contains the implementation of the ContainerProperty class\n */\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst { ConsoleUtils } = require(\"@fluid-experimental/property-common\");\nconst _ = require(\"underscore\");\nconst { validationsEnabled } = require(\"../enableValidations\");\nconst { AbstractStaticCollectionProperty } = require(\"./abstractStaticCollectionProperty\");\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { IndexedCollectionBaseProperty } = require(\"./indexedCollectionBaseProperty\");\n\n/**\n * A property object that allows to add child properties dynamically.\n */\nexport class ContainerProperty extends IndexedCollectionBaseProperty {\n\t/**\n\t * @param {Object} in_params - Input parameters for property creation\n\t * @protected\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\n\t\tif (in_params.optionalChildren) {\n\t\t\tthis._optionalChildren = {};\n\t\t\tthis._dynamicChildren = {};\n\t\t}\n\t}\n\n\t/**\n\t * Returns the name of all the sub-properties of this property.\n\t * @return {Array.<string>} An array of all the property ids\n\t */\n\t_getIds() {\n\t\treturn AbstractStaticCollectionProperty.prototype._getIds\n\t\t\t.call(this)\n\t\t\t.concat(Object.keys(this._dynamicChildren));\n\t}\n\n\t/**\n\t * Returns the sub-property having the given name in this property.\n\t *\n\t * @param {string|number} in_id - The id of the prop you wish to retrieve.\n\t *\n\t * @return {property-properties.BaseProperty | undefined} The property you seek or undefined if none is found.\n\t */\n\t_get(in_id) {\n\t\treturn (\n\t\t\tAbstractStaticCollectionProperty.prototype._get.call(this, in_id) ||\n\t\t\tthis._dynamicChildren[in_id]\n\t\t);\n\t}\n\n\t/**\n\t * Adds an optional child to list of possible optional children.\n\t * @param {string} in_id - Id of the optional child\n\t * @param {string} in_typeid - typeid which determines what type the child should be\n\t * @private\n\t */\n\t_addOptionalChild(in_id, in_typeid) {\n\t\tif (this._optionalChildren === ContainerProperty.prototype._optionalChildren) {\n\t\t\tthis._optionalChildren = {};\n\t\t\tthis._dynamicChildren = {};\n\t\t}\n\t\tthis._optionalChildren[in_id] = in_typeid;\n\t}\n\n\t/**\n\t * Appends a property\n\t *\n\t * @param {String | property-properties.BaseProperty } in_id - The id under which the property is added.\n\t * This parameter is optional. For NamedProperties it can be omitted. In that case the GUID of the named\n\t * property will be used.\n\t *\n\t * @param {property-properties.BaseProperty} [in_property] - The property to add\n\t * @throws if in_id is not a string or a number\n\t * @throws if there is already an entry for in_id\n\t * @throws if in_property is not a property\n\t * @throws if in_property does not have an id\n\t * @throws if in_property has a parent\n\t * @throws if in_property is a root property\n\t */\n\tinsert(in_id, in_property) {\n\t\tif (in_property === undefined) {\n\t\t\t// If no id is passed, the property is passed as first parameter\n\t\t\tin_property = in_id;\n\t\t\tConsoleUtils.assert(\n\t\t\t\tin_property instanceof BaseProperty,\n\t\t\t\t\"insert error: \" + MSG.NOT_A_PROPERTY,\n\t\t\t);\n\t\t} else {\n\t\t\tConsoleUtils.assert(_.isString(in_id) || _.isNumber(in_id), MSG.ID_STRING_OR_NUMBER);\n\t\t\tConsoleUtils.assert(\n\t\t\t\t!_.isString(in_id) || !_.isEmpty(in_id),\n\t\t\t\tMSG.ID_SHOULD_NOT_BE_EMPTY_STRING,\n\t\t\t);\n\t\t\tConsoleUtils.assert(\n\t\t\t\tin_property instanceof BaseProperty,\n\t\t\t\t\"insert error: \" + MSG.NOT_A_PROPERTY,\n\t\t\t);\n\t\t\tif (this._dynamicChildren[in_id] !== undefined) {\n\t\t\t\tthrow new Error(MSG.PROPERTY_ALREADY_EXISTS + in_id);\n\t\t\t}\n\t\t\tif (validationsEnabled.enabled) {\n\t\t\t\tin_property._validateInsertIn(this);\n\t\t\t}\n\t\t\t// If an id is passed, it is stored in the child property object\n\t\t\tin_property._setId(in_id);\n\t\t}\n\n\t\tif (validationsEnabled.enabled) {\n\t\t\tthis._validateInsert(in_property.getId(), in_property);\n\t\t}\n\n\t\t// Add the child property to the dynamic properties\n\t\tthis._insert(in_property.getId(), in_property, true);\n\t}\n\n\t/**\n\t * Validates if inserting the property is valid.\n\t *\n\t * @param {string} in_id - id to be validated.\n\t * @param {string} in_property - property to be validated.\n\t * @throws if id is not on optional list.\n\t * @throws if the typeid of the property doesn't match the schema.\n\t * @protected\n\t */\n\t_validateInsert(in_id, in_property) {\n\t\tif (!(this._optionalChildren && this._optionalChildren[in_id])) {\n\t\t\tthrow new Error(MSG.CANNOT_INSERT_UNKNOWN_PROPERTY + in_id);\n\t\t}\n\n\t\tif (this._optionalChildren[in_id].toUpperCase() !== in_property.getTypeid().toUpperCase()) {\n\t\t\tthrow new Error(\n\t\t\t\tMSG.MISMATCHING_PROPERTY_TYPEID +\n\t\t\t\t\tthis._optionalChildren[in_id] +\n\t\t\t\t\t\" instead it's: \" +\n\t\t\t\t\tin_property.getTypeid(),\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * @override\n\t * @inheritdoc\n\t */\n\t_getScope() {\n\t\tif (this._parent) {\n\t\t\treturn this.getRoot()._getScope();\n\t\t} else {\n\t\t\treturn this._checkedOutRepositoryInfo\n\t\t\t\t? this._checkedOutRepositoryInfo.getScope()\n\t\t\t\t: undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Removes the given property\n\t *\n\t * @param {string|property-properties.BaseProperty} in_property - The property to remove (either its id or the\n\t * whole property).\n\t * @throws if trying to remove an entry that does not exist\n\t * @return {property-properties.BaseProperty} the property removed.\n\t */\n\tremove(in_property) {\n\t\tvar id = in_property;\n\t\tvar returnValue;\n\t\tif (id instanceof BaseProperty) {\n\t\t\treturnValue = id;\n\t\t\tid = id.getId();\n\t\t} else {\n\t\t\treturnValue = this.get(id);\n\t\t}\n\n\t\tthis._validateRemove(id);\n\n\t\tthis._removeByKey(id);\n\t\treturn returnValue;\n\t}\n\n\t/**\n\t * Validates if removing a property with specified id is valid.\n\t *\n\t * @param {string} in_id - id to be validated.\n\t * @throws if the id doesn't exist.\n\t * @throws if the id is not marked as optional.\n\t * @protected\n\t */\n\t_validateRemove(in_id) {\n\t\tif (!this._dynamicChildren[in_id]) {\n\t\t\tconst error =\n\t\t\t\tthis._staticChildren[in_id] !== undefined\n\t\t\t\t\t? new Error(MSG.CANNOT_REMOVE_NON_OPTIONAL_PROP + in_id)\n\t\t\t\t\t: new Error(MSG.REMOVING_NON_EXISTING_KEY + in_id);\n\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\t/**\n\t * Removes all dynamic children\n\t * @throws if node property is read-only\n\t */\n\tclear() {\n\t\tthis._checkIsNotReadOnly(true);\n\t\t_.each(this._dynamicChildren, this.remove.bind(this));\n\t}\n\n\t/**\n\t * Inserts a property into the collection\n\t *\n\t * @param {string} in_key - Key of the entry in the collection\n\t * @param {property-properties.NamedProperty} in_property - The property to insert\n\t * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n\t * trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t */\n\t_insert(in_key, in_property, in_reportToView) {\n\t\tif (validationsEnabled.enabled) {\n\t\t\tthis._checkIsNotReadOnly(true);\n\t\t}\n\n\t\t// Add the child property to the dynamic properties\n\t\tIndexedCollectionBaseProperty.prototype._insert.call(this, in_key, in_property, false);\n\n\t\t// We postponed the report above, to make sure the child property has actually been appended to this\n\t\t// node, before the report is forwarded to the view\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Removes an entry with the given key\n\t *\n\t * @param {string} in_key - key of the entry\n\t * @param {boolean} in_reportToView - By default, the dirtying will always be reported to the checkout view and\n\t * trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t */\n\t_removeByKey(in_key, in_reportToView) {\n\t\tthis._checkIsNotReadOnly(true);\n\n\t\tif (this._dynamicChildren[in_key]) {\n\t\t\t// Remove from the indexed collection\n\t\t\tIndexedCollectionBaseProperty.prototype._removeByKey.call(\n\t\t\t\tthis,\n\t\t\t\tin_key,\n\t\t\t\tin_reportToView,\n\t\t\t);\n\t\t} else {\n\t\t\tconsole.error(MSG.REMOVING_NON_EXISTING_KEY + in_key);\n\t\t}\n\t}\n\n\t/**\n\t * Stores the information to which CheckedOutRepositoryInfo object this root property belongs.\n\t * Note: these functions should only be used internally (within the PropertySets library)\n\t *\n\t * @param {property-properties.CheckoutView~CheckedOutRepositoryInfo} in_checkedOutRepositoryInfo -\n\t * The checked out repository info this root property belongs to.\n\t * @protected\n\t */\n\t_setCheckedOutRepositoryInfo(in_checkedOutRepositoryInfo) {\n\t\tthis._checkedOutRepositoryInfo = in_checkedOutRepositoryInfo;\n\t}\n\n\t/**\n\t * Gets the information to which CheckedOutRepositoryInfo object this root property belongs.\n\t * Note: these functions should only be used internally (within the PropertySets library)\n\t *\n\t * @return {property-properties.CheckoutView~CheckedOutRepositoryInfo|undefined} If this is the root of the\n\t * checked out hierarchy, this will return the checkout.\n\t * @protected\n\t */\n\t_getCheckedOutRepositoryInfo() {\n\t\treturn this._checkedOutRepositoryInfo;\n\t}\n\n\t/**\n\t * Returns the name of all the static sub-properties of this property.\n\t *\n\t * @return {Array.<string>} An array of all the static property ids\n\t */\n\tgetStaticIds() {\n\t\treturn Object.keys(this._staticChildren);\n\t}\n\n\t/**\n\t * Returns the name of all the dynamic sub-properties of this property.\n\t *\n\t * @return {Array.<string>} An array of all the dynamic property ids\n\t */\n\tgetDynamicIds() {\n\t\treturn Object.keys(this._dynamicChildren);\n\t}\n\n\t/**\n\t * Returns an Object with all the dynamic children of this node property.\n\t *\n\t * WARNING: This is a direct access to the internal data-structure and the collection MUST NOT be modified. It is\n\t * read only for fast access and iteration. Insertion and deletion MUST be done via the insert and remove functions\n\t * of this class.\n\t *\n\t * @return {Object<String, property-properties.MapProperty~MapValueType>} The map with all entries in the map.\n\t */\n\t_getDynamicChildrenReadOnly() {\n\t\treturn this._dynamicChildren;\n\t}\n\n\t/**\n\t * Given an object that mirrors a PSet Template, assign the properties.\n\t *\n\t * E.g.\n\t *\n\t * ```\n\t * <pre>\n\t * Templates = {\n\t * properties: [\n\t * { id: 'foo', typeid: 'String' },\n\t * { id: 'bar', properties: [{id: 'baz', typeid: 'Uint32'}] }\n\t * ]\n\t * }\n\t * </pre>\n\t * ```\n\t *\n\t * You would update the values like: `baseProperty.setValues({foo: 'hello', bar: {baz: 1}});`\n\t *\n\t * WARNING: not completely implemented for all types.\n\t *\n\t * @param {object} in_properties - The properties you would like to assign\n\t * @private\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\tContainerProperty.prototype._setValues.call(this, in_properties, false, false);\n\t\t\tcheckoutView.popNotificationDelayScope();\n\t\t} else {\n\t\t\tContainerProperty.prototype._setValues.call(this, in_properties, false, false);\n\t\t}\n\t}\n}\n\nContainerProperty.prototype._typeid = \"ContainerProperty\";\nContainerProperty.prototype._dynamicChildren = {};\nContainerProperty.prototype._optionalChildren = {};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enumArrayProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH;
|
|
1
|
+
{"version":3,"file":"enumArrayProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH;IACC;;;;;;;;;OASG;IACH,wBAMC;IADA,qBAAgD;IAGjD;;;;;;OAMG;IACH,sCAHW,MAAM,GAAC,MAAM,GACZ,MAAM,CAiBjB;IA2CD;;;;;;OAMG;IACH,0BALW,MAAM,uBAOhB;IA0BD;;;;;OAKG;IACH,2BAJW,MAAM,GAEL,MAAM,CAUjB;IAED;;;;;;;OAOG;IACH,0BANW,MAAM,aACN,MAAM,GAGL,MAAM,MAAM,CAAC,CAexB;IAiCD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CACD"}
|
|
@@ -5,11 +5,11 @@ exports.EnumArrayProperty = void 0;
|
|
|
5
5
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
6
6
|
* Licensed under the MIT License.
|
|
7
7
|
*/
|
|
8
|
-
const { MSG } = require(
|
|
9
|
-
const { TypeIdHelper } = require(
|
|
10
|
-
const { BaseDataArray } = require(
|
|
11
|
-
const _ = require(
|
|
12
|
-
const { ValueArrayProperty } = require(
|
|
8
|
+
const { MSG } = require("@fluid-experimental/property-common").constants;
|
|
9
|
+
const { TypeIdHelper } = require("@fluid-experimental/property-changeset");
|
|
10
|
+
const { BaseDataArray } = require("@fluid-experimental/property-common");
|
|
11
|
+
const _ = require("lodash");
|
|
12
|
+
const { ValueArrayProperty } = require("./valueArrayProperty");
|
|
13
13
|
/**
|
|
14
14
|
* This class is a specialized version of the ArrayProperty for enums.
|
|
15
15
|
* Since we internally represent enums as Int32Array this is much more
|
|
@@ -71,10 +71,10 @@ class EnumArrayProperty extends ValueArrayProperty {
|
|
|
71
71
|
*/
|
|
72
72
|
insertRange(in_offset, in_array) {
|
|
73
73
|
if (!_.isNumber(in_offset)) {
|
|
74
|
-
throw new TypeError(MSG.NOT_NUMBER +
|
|
74
|
+
throw new TypeError(MSG.NOT_NUMBER + "in_offset, method: EnumArray.insertRange or .insert");
|
|
75
75
|
}
|
|
76
76
|
if (!_.isArray(in_array)) {
|
|
77
|
-
throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY +
|
|
77
|
+
throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + "EnumArrayProperty.insertRange");
|
|
78
78
|
}
|
|
79
79
|
var internalValueArray = [];
|
|
80
80
|
var that = this;
|
|
@@ -116,10 +116,10 @@ class EnumArrayProperty extends ValueArrayProperty {
|
|
|
116
116
|
*/
|
|
117
117
|
setRange(in_offset, in_array) {
|
|
118
118
|
if (!_.isNumber(in_offset)) {
|
|
119
|
-
throw new TypeError(MSG.NOT_NUMBER +
|
|
119
|
+
throw new TypeError(MSG.NOT_NUMBER + "in_offset, method: EnumArray.setRange or .set");
|
|
120
120
|
}
|
|
121
121
|
if (!_.isArray(in_array)) {
|
|
122
|
-
throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY +
|
|
122
|
+
throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + "EnumArrayProperty.setRange");
|
|
123
123
|
}
|
|
124
124
|
var internalValueArray = [];
|
|
125
125
|
var that = this;
|
|
@@ -154,10 +154,10 @@ class EnumArrayProperty extends ValueArrayProperty {
|
|
|
154
154
|
*/
|
|
155
155
|
getEnumStrings(in_offset, in_length) {
|
|
156
156
|
if (!_.isNumber(in_offset)) {
|
|
157
|
-
throw new TypeError(MSG.NOT_NUMBER +
|
|
157
|
+
throw new TypeError(MSG.NOT_NUMBER + "in_offset, method: EnumArray.getEnumStrings");
|
|
158
158
|
}
|
|
159
159
|
if (!_.isNumber(in_length)) {
|
|
160
|
-
throw new TypeError(MSG.NOT_NUMBER +
|
|
160
|
+
throw new TypeError(MSG.NOT_NUMBER + "in_length, method: EnumArray.getEnumStrings");
|
|
161
161
|
}
|
|
162
162
|
var result = [];
|
|
163
163
|
for (var i = 0; i < in_length; i++) {
|
|
@@ -172,8 +172,8 @@ class EnumArrayProperty extends ValueArrayProperty {
|
|
|
172
172
|
*/
|
|
173
173
|
getFullTypeid(in_hideCollection = false) {
|
|
174
174
|
return in_hideCollection
|
|
175
|
-
? TypeIdHelper.createSerializationTypeId(this._typeid,
|
|
176
|
-
: TypeIdHelper.createSerializationTypeId(this._typeid,
|
|
175
|
+
? TypeIdHelper.createSerializationTypeId(this._typeid, "", true)
|
|
176
|
+
: TypeIdHelper.createSerializationTypeId(this._typeid, "array", true);
|
|
177
177
|
}
|
|
178
178
|
/**
|
|
179
179
|
* @inheritdoc
|
|
@@ -202,5 +202,5 @@ class EnumArrayProperty extends ValueArrayProperty {
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
exports.EnumArrayProperty = EnumArrayProperty;
|
|
205
|
-
EnumArrayProperty.prototype._typeid =
|
|
205
|
+
EnumArrayProperty.prototype._typeid = "Enum";
|
|
206
206
|
//# sourceMappingURL=enumArrayProperty.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enumArrayProperty.js","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,C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CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE;YAChC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;SAClD;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAC,iBAAiB,GAAG,KAAK;QACnC,OAAO,iBAAiB;YACpB,CAAC,CAAC,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC;YAChE,CAAC,CAAC,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAC9E,CAAC;IAED;;OAEG;IACH,SAAS;QACL,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAChD,IAAI,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACtB;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED;;;OAGG;IACH,gBAAgB,CAAC,SAAS;QACtB,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAClE,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAChD,CAAC;CACJ;AAlMD,8CAkMC;AACD,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { TypeIdHelper } = require('@fluid-experimental/property-changeset');\nconst { BaseDataArray } = require('@fluid-experimental/property-common');\nconst _ = require('lodash');\nconst { ValueArrayProperty } = require('./valueArrayProperty');\n\n/**\n * This class is a specialized version of the ArrayProperty for enums.\n * Since we internally represent enums as Int32Array this is much more\n * efficient and convenient. Additionally, we provide direct access\n * methods to the enums in the array, e.g. .getEnumString(3) directly\n * returns the enum string at position 3 of the array\n */\nexport class EnumArrayProperty extends ValueArrayProperty {\n /**\n * @param {Object} in_params - The parameters\n * @param {Number=} [in_params.length=0] - The length of the array, if applicable\n * @param {Object} in_params._enumDictionary - The value<->enum dictonary needed to convert the values\n * @constructor\n * @protected\n * @extends property-properties.ValueArrayProperty\n * @alias property-properties.EnumArrayProperty\n * @category Arrays\n */\n constructor(in_params) {\n super(in_params);\n // whenever an EnumProperty is created by the PropertyFactory, we get a\n // dictonary [value->enum] and [enum->value] to efficiently lookup\n // values/enums for the property.\n this._enumDictionary = in_params._enumDictionary;\n }\n\n /**\n * Since an enum can be identified by its value and its enum string,\n * we have to check/convert the type here. We also check if a value\n * is suitable for this enum type.\n * @param {number|string} in_value - Value to be checked/converted\n * @return {number} Internal value for this enum type\n */\n _convertEnumToInternalValue(in_value) {\n // check if we've got a string\n if (_.isString(in_value)) {\n var internalEnum = this._enumDictionary.enumEntriesById[in_value];\n if (!internalEnum) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n }\n return internalEnum.value;\n } else {\n if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n } else {\n return in_value;\n }\n }\n }\n\n /**\n * Inserts the content of a given array into the array property\n * @param {number} in_offset - Target index\n * @param {Array<*>} in_array - The array to be inserted\n * @throws if in_array is not an array\n * @throws if in_position is not a number\n * @throws if a value to be inserted is an instance of BaseProperty\n * @throws if tyring to modify a referenced property.\n */\n insertRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new TypeError(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.insertRange or .insert');\n }\n if (!_.isArray(in_array)) {\n throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.insertRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function(element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.insertRange.call(this, in_offset, internalValueArray);\n }\n\n /**\n * Sets the content of an enum in an enum array.\n * @param {number} in_index - Target index\n * @param {*} in_value - The value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n set(in_index, in_value) {\n if (!_.isNumber(in_value) && !_.isString(in_value)) {\n throw new TypeError(MSG.VALUE_STRING_OR_NUMBER + in_value);\n }\n this.setRange(in_index, [in_value]);\n }\n\n /**\n * Sets the content of an enum in an enum array. Alternative syntax to `.set()`.\n * @param {number} in_index - Target index\n * @param {*} in_value - The value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n setEnumByString(in_index, in_value) {\n this.set(in_index, in_value);\n }\n\n /**\n * Sets the array properties elements to the content of the given array all changed elements must already exist.\n * @param {number} in_offset - Target start index\n * @param {Array<*>} in_array - contains the elements to be set\n * @throws if in_offset is not a number\n * @throws if in_array is not an array\n *\n */\n setRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new TypeError(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.setRange or .set');\n }\n if (!_.isArray(in_array)) {\n throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.setRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function(element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.setRange.call(this, in_offset, internalValueArray);\n }\n\n /**\n * Gets the array element at a given index.\n * @param {number} in_position - The target index\n * @throws if no entry exists at in_position\n * @return {string} the enum string at that index\n */\n getEnumString(in_position) {\n var internalValue = this._dataArrayRef.getValue(in_position);\n var resultEntry = this._enumDictionary.enumEntriesByValue[internalValue];\n if (!resultEntry) {\n throw new TypeError(MSG.UNKNOWN_ENUM + internalValue);\n } else {\n return resultEntry.id;\n }\n }\n\n /**\n * Gets an array of the enum strings starting at a given index\n * @param {number} in_offset - The start index\n * @param {number} in_length - how many should be read\n * @throws if in_offset or in_length are not numbers\n * @throws if no entry exists at one of the positions\n * @return {Array<string>} the enum strings we asked for\n */\n getEnumStrings(in_offset, in_length) {\n if (!_.isNumber(in_offset)) {\n throw new TypeError(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.getEnumStrings');\n }\n if (!_.isNumber(in_length)) {\n throw new TypeError(MSG.NOT_NUMBER + 'in_length, method: EnumArray.getEnumStrings');\n }\n\n var result = [];\n for (var i = 0; i < in_length; i++) {\n result.push(this.getEnumString(i + in_offset));\n }\n return result;\n }\n\n /**\n * Returns the full property type identifier for the ChangeSet including the enum type id\n * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted\n * @return {string} The typeid\n */\n getFullTypeid(in_hideCollection = false) {\n return in_hideCollection\n ? TypeIdHelper.createSerializationTypeId(this._typeid, '', true)\n : TypeIdHelper.createSerializationTypeId(this._typeid, 'array', true);\n }\n\n /**\n * @inheritdoc\n */\n getValues() {\n var result = [];\n for (var i = 0; i < this._dataArrayRef.length; i++) {\n var child = this._dataArrayRef.getValue(i);\n result.push(child);\n }\n return result;\n }\n\n /**\n * Creates and initializes the data array\n * @param {Number} in_length - The initial length of the array\n */\n _dataArrayCreate(in_length) {\n this._dataArrayRef = new BaseDataArray(Int32Array, in_length);\n }\n\n /**\n * let the user to query all valid entries of an enum array property\n * @return {{}} all valid (string) entries and their (int) values\n */\n getValidEnumList() {\n return this._enumDictionary.enumEntriesById;\n }\n}\nEnumArrayProperty.prototype._typeid = 'Enum';\n"]}
|
|
1
|
+
{"version":3,"file":"enumArrayProperty.js","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":";;;AAAA;;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AC,CAAC;SACpF;QAED,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE;YACnC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;SAC/C;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAC,iBAAiB,GAAG,KAAK;QACtC,OAAO,iBAAiB;YACvB,CAAC,CAAC,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC;YAChE,CAAC,CAAC,YAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACH,SAAS;QACR,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACnD,IAAI,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACnB;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED;;;OAGG;IACH,gBAAgB,CAAC,SAAS;QACzB,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAC/D,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACf,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAC7C,CAAC;CACD;AApMD,8CAoMC;AACD,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst { TypeIdHelper } = require(\"@fluid-experimental/property-changeset\");\nconst { BaseDataArray } = require(\"@fluid-experimental/property-common\");\nconst _ = require(\"lodash\");\nconst { ValueArrayProperty } = require(\"./valueArrayProperty\");\n\n/**\n * This class is a specialized version of the ArrayProperty for enums.\n * Since we internally represent enums as Int32Array this is much more\n * efficient and convenient. Additionally, we provide direct access\n * methods to the enums in the array, e.g. .getEnumString(3) directly\n * returns the enum string at position 3 of the array\n */\nexport class EnumArrayProperty extends ValueArrayProperty {\n\t/**\n\t * @param {Object} in_params - The parameters\n\t * @param {Number=} [in_params.length=0] - The length of the array, if applicable\n\t * @param {Object} in_params._enumDictionary - The value<->enum dictonary needed to convert the values\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueArrayProperty\n\t * @alias property-properties.EnumArrayProperty\n\t * @category Arrays\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t\t// whenever an EnumProperty is created by the PropertyFactory, we get a\n\t\t// dictonary [value->enum] and [enum->value] to efficiently lookup\n\t\t// values/enums for the property.\n\t\tthis._enumDictionary = in_params._enumDictionary;\n\t}\n\n\t/**\n\t * Since an enum can be identified by its value and its enum string,\n\t * we have to check/convert the type here. We also check if a value\n\t * is suitable for this enum type.\n\t * @param {number|string} in_value - Value to be checked/converted\n\t * @return {number} Internal value for this enum type\n\t */\n\t_convertEnumToInternalValue(in_value) {\n\t\t// check if we've got a string\n\t\tif (_.isString(in_value)) {\n\t\t\tvar internalEnum = this._enumDictionary.enumEntriesById[in_value];\n\t\t\tif (!internalEnum) {\n\t\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + in_value);\n\t\t\t}\n\t\t\treturn internalEnum.value;\n\t\t} else {\n\t\t\tif (!this._enumDictionary.enumEntriesByValue[in_value]) {\n\t\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + in_value);\n\t\t\t} else {\n\t\t\t\treturn in_value;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Inserts the content of a given array into the array property\n\t * @param {number} in_offset - Target index\n\t * @param {Array<*>} in_array - The array to be inserted\n\t * @throws if in_array is not an array\n\t * @throws if in_position is not a number\n\t * @throws if a value to be inserted is an instance of BaseProperty\n\t * @throws if tyring to modify a referenced property.\n\t */\n\tinsertRange(in_offset, in_array) {\n\t\tif (!_.isNumber(in_offset)) {\n\t\t\tthrow new TypeError(\n\t\t\t\tMSG.NOT_NUMBER + \"in_offset, method: EnumArray.insertRange or .insert\",\n\t\t\t);\n\t\t}\n\t\tif (!_.isArray(in_array)) {\n\t\t\tthrow new TypeError(MSG.IN_ARRAY_NOT_ARRAY + \"EnumArrayProperty.insertRange\");\n\t\t}\n\n\t\tvar internalValueArray = [];\n\t\tvar that = this;\n\t\t_.each(in_array, function (element) {\n\t\t\tinternalValueArray.push(that._convertEnumToInternalValue(element));\n\t\t});\n\t\tValueArrayProperty.prototype.insertRange.call(this, in_offset, internalValueArray);\n\t}\n\n\t/**\n\t * Sets the content of an enum in an enum array.\n\t * @param {number} in_index - Target index\n\t * @param {*} in_value - The value to set\n\t * @throws if in_value is not a string or number\n\t * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n\t */\n\tset(in_index, in_value) {\n\t\tif (!_.isNumber(in_value) && !_.isString(in_value)) {\n\t\t\tthrow new TypeError(MSG.VALUE_STRING_OR_NUMBER + in_value);\n\t\t}\n\t\tthis.setRange(in_index, [in_value]);\n\t}\n\n\t/**\n\t * Sets the content of an enum in an enum array. Alternative syntax to `.set()`.\n\t * @param {number} in_index - Target index\n\t * @param {*} in_value - The value to set\n\t * @throws if in_value is not a string or number\n\t * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n\t */\n\tsetEnumByString(in_index, in_value) {\n\t\tthis.set(in_index, in_value);\n\t}\n\n\t/**\n\t * Sets the array properties elements to the content of the given array all changed elements must already exist.\n\t * @param {number} in_offset - Target start index\n\t * @param {Array<*>} in_array - contains the elements to be set\n\t * @throws if in_offset is not a number\n\t * @throws if in_array is not an array\n\t *\n\t */\n\tsetRange(in_offset, in_array) {\n\t\tif (!_.isNumber(in_offset)) {\n\t\t\tthrow new TypeError(MSG.NOT_NUMBER + \"in_offset, method: EnumArray.setRange or .set\");\n\t\t}\n\t\tif (!_.isArray(in_array)) {\n\t\t\tthrow new TypeError(MSG.IN_ARRAY_NOT_ARRAY + \"EnumArrayProperty.setRange\");\n\t\t}\n\n\t\tvar internalValueArray = [];\n\t\tvar that = this;\n\t\t_.each(in_array, function (element) {\n\t\t\tinternalValueArray.push(that._convertEnumToInternalValue(element));\n\t\t});\n\t\tValueArrayProperty.prototype.setRange.call(this, in_offset, internalValueArray);\n\t}\n\n\t/**\n\t * Gets the array element at a given index.\n\t * @param {number} in_position - The target index\n\t * @throws if no entry exists at in_position\n\t * @return {string} the enum string at that index\n\t */\n\tgetEnumString(in_position) {\n\t\tvar internalValue = this._dataArrayRef.getValue(in_position);\n\t\tvar resultEntry = this._enumDictionary.enumEntriesByValue[internalValue];\n\t\tif (!resultEntry) {\n\t\t\tthrow new TypeError(MSG.UNKNOWN_ENUM + internalValue);\n\t\t} else {\n\t\t\treturn resultEntry.id;\n\t\t}\n\t}\n\n\t/**\n\t * Gets an array of the enum strings starting at a given index\n\t * @param {number} in_offset - The start index\n\t * @param {number} in_length - how many should be read\n\t * @throws if in_offset or in_length are not numbers\n\t * @throws if no entry exists at one of the positions\n\t * @return {Array<string>} the enum strings we asked for\n\t */\n\tgetEnumStrings(in_offset, in_length) {\n\t\tif (!_.isNumber(in_offset)) {\n\t\t\tthrow new TypeError(MSG.NOT_NUMBER + \"in_offset, method: EnumArray.getEnumStrings\");\n\t\t}\n\t\tif (!_.isNumber(in_length)) {\n\t\t\tthrow new TypeError(MSG.NOT_NUMBER + \"in_length, method: EnumArray.getEnumStrings\");\n\t\t}\n\n\t\tvar result = [];\n\t\tfor (var i = 0; i < in_length; i++) {\n\t\t\tresult.push(this.getEnumString(i + in_offset));\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? TypeIdHelper.createSerializationTypeId(this._typeid, \"\", true)\n\t\t\t: TypeIdHelper.createSerializationTypeId(this._typeid, \"array\", true);\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\tgetValues() {\n\t\tvar result = [];\n\t\tfor (var i = 0; i < this._dataArrayRef.length; i++) {\n\t\t\tvar child = this._dataArrayRef.getValue(i);\n\t\t\tresult.push(child);\n\t\t}\n\t\treturn result;\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\n\t/**\n\t * let the user to query all valid entries of an enum array property\n\t * @return {{}} all valid (string) entries and their (int) values\n\t */\n\tgetValidEnumList() {\n\t\treturn this._enumDictionary.enumEntriesById;\n\t}\n}\nEnumArrayProperty.prototype._typeid = \"Enum\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enumProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":"AAgBA;;GAEG;AACH;
|
|
1
|
+
{"version":3,"file":"enumProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":"AAgBA;;GAEG;AACH;IAcE,qBAAgD;IAajD;;;;OAIG;IACH,iBAHY,MAAM,CAUjB;IAuBD;;;;;;OAMG;IACH,6BAJW,MAAM,QAahB;IAYD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CACD"}
|
|
@@ -8,27 +8,27 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.EnumProperty = void 0;
|
|
11
|
-
const { TypeIdHelper } = require(
|
|
12
|
-
const { MSG } = require(
|
|
13
|
-
const { ConsoleUtils } = require(
|
|
14
|
-
const _ = require(
|
|
15
|
-
const { Int32Property } = require(
|
|
16
|
-
const { _castFunctors } = require(
|
|
17
|
-
const { ValueProperty } = require(
|
|
11
|
+
const { TypeIdHelper } = require("@fluid-experimental/property-changeset");
|
|
12
|
+
const { MSG } = require("@fluid-experimental/property-common").constants;
|
|
13
|
+
const { ConsoleUtils } = require("@fluid-experimental/property-common");
|
|
14
|
+
const _ = require("lodash");
|
|
15
|
+
const { Int32Property } = require("./intProperties");
|
|
16
|
+
const { _castFunctors } = require("./primitiveTypeCasts");
|
|
17
|
+
const { ValueProperty } = require("./valueProperty");
|
|
18
18
|
/**
|
|
19
19
|
* A primitive property for enums.
|
|
20
20
|
*/
|
|
21
21
|
class EnumProperty extends Int32Property {
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
* @param {Object=} in_params - the parameters
|
|
24
|
+
* @constructor
|
|
25
|
+
* @protected
|
|
26
|
+
* @extends property-properties.Int32Property
|
|
27
|
+
* @alias property-properties.EnumProperty
|
|
28
|
+
* @category Value Properties
|
|
29
|
+
*/
|
|
30
30
|
constructor(in_params) {
|
|
31
|
-
super(Object.assign({ typeid:
|
|
31
|
+
super(Object.assign({ typeid: "Enum" }, in_params));
|
|
32
32
|
// whenever an EnumProperty is created by the PropertyFactory, we get a
|
|
33
33
|
// dictionary [value->enum] and [enum->value] to efficiently lookup
|
|
34
34
|
// values/enums for the property.
|
|
@@ -103,7 +103,7 @@ class EnumProperty extends Int32Property {
|
|
|
103
103
|
* @return {string} The typeid
|
|
104
104
|
*/
|
|
105
105
|
getFullTypeid(in_hideCollection = false) {
|
|
106
|
-
return TypeIdHelper.createSerializationTypeId(this._typeid,
|
|
106
|
+
return TypeIdHelper.createSerializationTypeId(this._typeid, "single", true);
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
109
|
* let the user to query all valid entries of an enum
|
|
@@ -114,6 +114,6 @@ class EnumProperty extends Int32Property {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
exports.EnumProperty = EnumProperty;
|
|
117
|
-
EnumProperty.prototype._typeid =
|
|
117
|
+
EnumProperty.prototype._typeid = "Enum";
|
|
118
118
|
EnumProperty.prototype._castFunctor = _castFunctors.Int32;
|
|
119
119
|
//# sourceMappingURL=enumProperty.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enumProperty.js","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AAC3E,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACxE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAC1D,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAErD;;GAEG;AACH,MAAa,YAAa,SAAQ,aAAa;
|
|
1
|
+
{"version":3,"file":"enumProperty.js","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AAC3E,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO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cesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Definition of the EnumProperty classes\n */\n\nconst { TypeIdHelper } = require(\"@fluid-experimental/property-changeset\");\nconst { MSG } = require(\"@fluid-experimental/property-common\").constants;\nconst { ConsoleUtils } = require(\"@fluid-experimental/property-common\");\nconst _ = require(\"lodash\");\nconst { Int32Property } = require(\"./intProperties\");\nconst { _castFunctors } = require(\"./primitiveTypeCasts\");\nconst { ValueProperty } = require(\"./valueProperty\");\n\n/**\n * A primitive property for enums.\n */\nexport class EnumProperty extends Int32Property {\n\t/**\n\t * @param {Object=} in_params - the parameters\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.Int32Property\n\t * @alias property-properties.EnumProperty\n\t * @category Value Properties\n\t */\n\tconstructor(in_params) {\n\t\tsuper({ typeid: \"Enum\", ...in_params });\n\t\t// whenever an EnumProperty is created by the PropertyFactory, we get a\n\t\t// dictionary [value->enum] and [enum->value] to efficiently lookup\n\t\t// values/enums for the property.\n\t\tthis._enumDictionary = in_params._enumDictionary;\n\t\t// default for this property type is '0' if it exists to keep backward compatibility\n\t\tthis._data = this._enumDictionary ? this._enumDictionary.defaultValue : 0;\n\t}\n\n\t/**\n\t * Evaluates enum properties as primitives.\n\t * @return {boolean} true since Enum properties are primitives.\n\t */\n\tisPrimitiveType() {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns the current enum string\n\t * @return {string} the string value of the property\n\t * @throws if no entry exists\n\t */\n\tgetEnumString() {\n\t\tvar resultEntry = this._enumDictionary.enumEntriesByValue[this._data];\n\t\tif (!resultEntry) {\n\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + this._data);\n\t\t} else {\n\t\t\treturn resultEntry.id;\n\t\t}\n\t}\n\n\t/**\n\t * Sets the (internal, integer) value of the property\n\t *\n\t * @param {Number|string} in_value - The new integer value - it must be a valid enum integer for this property or\n\t * the new enum value in form of a valid enum string for this EnumProperty.\n\t * @throws if no entry exists for in_value\n\t *\n\t */\n\tsetValue(in_value) {\n\t\tthis._checkIsNotReadOnly(true);\n\n\t\t// check if we've got a string\n\t\tif (_.isString(in_value)) {\n\t\t\tthis.setEnumByString(in_value);\n\t\t} else if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + in_value);\n\t\t} else {\n\t\t\tValueProperty.prototype.setValue.call(this, in_value);\n\t\t}\n\t}\n\n\t/**\n\t * Sets the property by an enum string\n\t *\n\t * @param {string} in_stringId - The enum string we want to switch to\n\t * @throws if in_stringId is not a string\n\t * @throws if no entry is found for in_stringId\n\t */\n\tsetEnumByString(in_stringId) {\n\t\tConsoleUtils.assert(_.isString(in_stringId), MSG.STRING_ID_MUST_BE_STRING + in_stringId);\n\t\tvar internalEnum = this._enumDictionary.enumEntriesById[in_stringId];\n\t\tif (!internalEnum) {\n\t\t\tthrow new Error(MSG.UNKNOWN_ENUM + in_stringId);\n\t\t} else {\n\t\t\tvar internalValue = internalEnum.value;\n\t\t\tthis.setValue(internalValue);\n\t\t}\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 * @return {string} The typeid\n\t */\n\tgetFullTypeid(in_hideCollection = false) {\n\t\treturn TypeIdHelper.createSerializationTypeId(this._typeid, \"single\", true);\n\t}\n\n\t/**\n\t * let the user to query all valid entries of an enum\n\t * @return {{}} all valid (string) entries and their (int) values\n\t */\n\tgetValidEnumList() {\n\t\treturn this._enumDictionary.enumEntriesById;\n\t}\n}\nEnumProperty.prototype._typeid = \"Enum\";\nEnumProperty.prototype._castFunctor = _castFunctors.Int32;\n"]}
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.Float64Property = exports.Float32Property = void 0;
|
|
11
|
-
const { ValueProperty } = require(
|
|
12
|
-
const { _castFunctors } = require(
|
|
11
|
+
const { ValueProperty } = require("./valueProperty");
|
|
12
|
+
const { _castFunctors } = require("./primitiveTypeCasts");
|
|
13
13
|
/**
|
|
14
14
|
* A primitive property for a 32 bit floating point value.
|
|
15
15
|
*/
|
|
@@ -30,7 +30,7 @@ class Float32Property extends ValueProperty {
|
|
|
30
30
|
}
|
|
31
31
|
exports.Float32Property = Float32Property;
|
|
32
32
|
Float32Property.prototype._castFunctor = _castFunctors.Float32;
|
|
33
|
-
Float32Property.prototype._typeid =
|
|
33
|
+
Float32Property.prototype._typeid = "Float32";
|
|
34
34
|
/**
|
|
35
35
|
* A primitive property for a 64 bit floating point value.
|
|
36
36
|
*/
|
|
@@ -51,5 +51,5 @@ class Float64Property extends ValueProperty {
|
|
|
51
51
|
}
|
|
52
52
|
exports.Float64Property = Float64Property;
|
|
53
53
|
Float64Property.prototype._castFunctor = _castFunctors.Float64;
|
|
54
|
-
Float64Property.prototype._typeid =
|
|
54
|
+
Float64Property.prototype._typeid = "Float64";
|
|
55
55
|
//# sourceMappingURL=floatProperties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floatProperties.js","sourceRoot":"","sources":["../../src/properties/floatProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAa,eAAgB,SAAQ,aAAa;
|
|
1
|
+
{"version":3,"file":"floatProperties.js","sourceRoot":"","sources":["../../src/properties/floatProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;GAEG;;;AAEH,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAa,eAAgB,SAAQ,aAAa;IACjD;;;;;;;OAOG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,wCAAwC;QACxC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IAChB,CAAC;CACD;AAfD,0CAeC;AACD,eAAe,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC;AAC/D,eAAe,CAAC,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC;AAE9C;;GAEG;AAEH,MAAa,eAAgB,SAAQ,aAAa;IACjD;;;;;;;OAOG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,wCAAwC;QACxC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IAChB,CAAC;CACD;AAdD,0CAcC;AACD,eAAe,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC;AAC/D,eAAe,CAAC,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @fileoverview Definition of the Float*Property classes\n */\n\nconst { ValueProperty } = require(\"./valueProperty\");\nconst { _castFunctors } = require(\"./primitiveTypeCasts\");\n\n/**\n * A primitive property for a 32 bit floating point value.\n */\nexport class Float32Property extends ValueProperty {\n\t/**\n\t * @param {Object=} in_params - the parameters\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueProperty\n\t * @alias property-properties.Float32Property\n\t * @category Value Properties\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\n\t\t// default for this property type is '0'\n\t\tthis._data = 0;\n\t}\n}\nFloat32Property.prototype._castFunctor = _castFunctors.Float32;\nFloat32Property.prototype._typeid = \"Float32\";\n\n/**\n * A primitive property for a 64 bit floating point value.\n */\n\nexport class Float64Property extends ValueProperty {\n\t/**\n\t * @param {Object=} in_params - the parameters\n\t * @constructor\n\t * @protected\n\t * @extends property-properties.ValueProperty\n\t * @alias property-properties.Float64Property\n\t * @category Value Properties\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t\t// default for this property type is '0'\n\t\tthis._data = 0;\n\t}\n}\nFloat64Property.prototype._castFunctor = _castFunctors.Float64;\nFloat64Property.prototype._typeid = \"Float64\";\n"]}
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { ArrayProperty } from
|
|
6
|
-
import { BaseProperty } from
|
|
7
|
-
import { BoolProperty } from
|
|
8
|
-
import { ContainerProperty } from
|
|
9
|
-
import { EnumArrayProperty } from
|
|
10
|
-
import { EnumProperty } from
|
|
11
|
-
import { Float32Property, Float64Property } from
|
|
12
|
-
import { IndexedCollectionBaseProperty } from
|
|
13
|
-
import { Int16Property, Int32Property, Int64Property, Int8Property, Uint64Property } from
|
|
14
|
-
import { MapProperty } from
|
|
15
|
-
import { NamedNodeProperty } from
|
|
16
|
-
import { NamedProperty } from
|
|
17
|
-
import { NodeProperty } from
|
|
18
|
-
import { _castFunctors } from
|
|
19
|
-
import { ReferenceArrayProperty } from
|
|
20
|
-
import { ReferenceMapProperty } from
|
|
21
|
-
import { ReferenceProperty } from
|
|
22
|
-
import { SetProperty } from
|
|
23
|
-
import { StringProperty } from
|
|
24
|
-
import { Uint16Property, Uint32Property, Uint8Property } from
|
|
25
|
-
import { BoolArrayProperty, Float32ArrayProperty, Float64ArrayProperty, Int16ArrayProperty, Int32ArrayProperty, Int64ArrayProperty, Int8ArrayProperty, StringArrayProperty, Uint16ArrayProperty, Uint32ArrayProperty, Uint64ArrayProperty, Uint8ArrayProperty, ValueArrayProperty } from
|
|
26
|
-
import { BoolMapProperty, Float32MapProperty, Float64MapProperty, Int16MapProperty, Int32MapProperty, Int64MapProperty, Int8MapProperty, StringMapProperty, Uint16MapProperty, Uint32MapProperty, Uint64MapProperty, Uint8MapProperty, ValueMapProperty } from
|
|
27
|
-
import { ValueProperty } from
|
|
5
|
+
import { ArrayProperty } from "./arrayProperty";
|
|
6
|
+
import { BaseProperty } from "./baseProperty";
|
|
7
|
+
import { BoolProperty } from "./boolProperty";
|
|
8
|
+
import { ContainerProperty } from "./containerProperty";
|
|
9
|
+
import { EnumArrayProperty } from "./enumArrayProperty";
|
|
10
|
+
import { EnumProperty } from "./enumProperty";
|
|
11
|
+
import { Float32Property, Float64Property } from "./floatProperties";
|
|
12
|
+
import { IndexedCollectionBaseProperty } from "./indexedCollectionBaseProperty";
|
|
13
|
+
import { Int16Property, Int32Property, Int64Property, Int8Property, Uint64Property } from "./intProperties";
|
|
14
|
+
import { MapProperty } from "./mapProperty";
|
|
15
|
+
import { NamedNodeProperty } from "./namedNodeProperty";
|
|
16
|
+
import { NamedProperty } from "./namedProperty";
|
|
17
|
+
import { NodeProperty } from "./nodeProperty";
|
|
18
|
+
import { _castFunctors } from "./primitiveTypeCasts";
|
|
19
|
+
import { ReferenceArrayProperty } from "./referenceArrayProperty";
|
|
20
|
+
import { ReferenceMapProperty } from "./referenceMapProperty";
|
|
21
|
+
import { ReferenceProperty } from "./referenceProperty";
|
|
22
|
+
import { SetProperty } from "./setProperty";
|
|
23
|
+
import { StringProperty } from "./stringProperty";
|
|
24
|
+
import { Uint16Property, Uint32Property, Uint8Property } from "./uintProperties";
|
|
25
|
+
import { BoolArrayProperty, Float32ArrayProperty, Float64ArrayProperty, Int16ArrayProperty, Int32ArrayProperty, Int64ArrayProperty, Int8ArrayProperty, StringArrayProperty, Uint16ArrayProperty, Uint32ArrayProperty, Uint64ArrayProperty, Uint8ArrayProperty, ValueArrayProperty } from "./valueArrayProperty";
|
|
26
|
+
import { BoolMapProperty, Float32MapProperty, Float64MapProperty, Int16MapProperty, Int32MapProperty, Int64MapProperty, Int8MapProperty, StringMapProperty, Uint16MapProperty, Uint32MapProperty, Uint64MapProperty, Uint8MapProperty, ValueMapProperty } from "./valueMapProperty";
|
|
27
|
+
import { ValueProperty } from "./valueProperty";
|
|
28
28
|
export { ArrayProperty, BaseProperty, BoolArrayProperty, BoolMapProperty, BoolProperty, ContainerProperty, EnumArrayProperty, EnumProperty, Float32ArrayProperty, Float32MapProperty, Float32Property, Float64ArrayProperty, Float64MapProperty, Float64Property, IndexedCollectionBaseProperty, Int16ArrayProperty, Int16MapProperty, Int16Property, Int32ArrayProperty, Int32MapProperty, Int32Property, Int64ArrayProperty, Int64MapProperty, Int64Property, Int8ArrayProperty, Int8MapProperty, Int8Property, MapProperty, NamedNodeProperty, NamedProperty, NodeProperty, ReferenceArrayProperty, ReferenceMapProperty, ReferenceProperty, SetProperty, StringArrayProperty, StringMapProperty, StringProperty, Uint16ArrayProperty, Uint16MapProperty, Uint16Property, Uint32ArrayProperty, Uint32MapProperty, Uint32Property, Uint64ArrayProperty, Uint64MapProperty, Uint64Property, Uint8ArrayProperty, Uint8MapProperty, Uint8Property, ValueArrayProperty, ValueMapProperty, ValueProperty, _castFunctors, };
|
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/properties/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../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,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EACN,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,6BAA6B,EAC7B,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,aAAa,GACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/properties/index.ts"],"names":[],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AAc,OA0ER;AAGd,+FA7EwB,+BAAc,OA6ExB;AAMd,8FAnFwC,8BAAa,OAmFxC;AAlFd,6DAc8B;AAqB7B,kGAlCA,sCAAiB,OAkCA;AAMjB,qGAvCA,yCAAoB,OAuCA;AAGpB,qGAzCA,yCAAoB,OAyCA;AAIpB,mGA5CA,uCAAkB,OA4CA;AAGlB,mGA9CA,uCAAkB,OA8CA;AAGlB,mGAhDA,uCAAkB,OAgDA;AAGlB,kGAlDA,sCAAiB,OAkDA;AAWjB,oGA5DA,wCAAmB,OA4DA;AAGnB,oGA9DA,wCAAmB,OA8DA;AAGnB,oGAhEA,wCAAmB,OAgEA;AAGnB,oGAlEA,wCAAmB,OAkEA;AAGnB,mGApEA,uCAAkB,OAoEA;AAGlB,mGAtEA,uCAAkB,OAsEA;AApEnB,yDAc4B;AAO3B,gGApBA,kCAAe,OAoBA;AAMf,mGAzBA,qCAAkB,OAyBA;AAGlB,mGA3BA,qCAAkB,OA2BA;AAIlB,iGA9BA,mCAAgB,OA8BA;AAGhB,iGAhCA,mCAAgB,OAgCA;AAGhB,iGAlCA,mCAAgB,OAkCA;AAGhB,gGApCA,kCAAe,OAoCA;AAWf,kGA9CA,oCAAiB,OA8CA;AAGjB,kGAhDA,oCAAiB,OAgDA;AAGjB,kGAlDA,oCAAiB,OAkDA;AAGjB,kGApDA,oCAAiB,OAoDA;AAGjB,iGAtDA,mCAAgB,OAsDA;AAGhB,iGAxDA,mCAAgB,OAwDA;AAtDjB,mDAAgD;AAuD/C,8FAvDQ,6BAAa,OAuDR","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ArrayProperty } from \"./arrayProperty\";\nimport { BaseProperty } from \"./baseProperty\";\nimport { BoolProperty } from \"./boolProperty\";\nimport { ContainerProperty } from \"./containerProperty\";\nimport { EnumArrayProperty } from \"./enumArrayProperty\";\nimport { EnumProperty } from \"./enumProperty\";\nimport { Float32Property, Float64Property } from \"./floatProperties\";\nimport { IndexedCollectionBaseProperty } from \"./indexedCollectionBaseProperty\";\nimport {\n\tInt16Property,\n\tInt32Property,\n\tInt64Property,\n\tInt8Property,\n\tUint64Property,\n} from \"./intProperties\";\nimport { MapProperty } from \"./mapProperty\";\nimport { NamedNodeProperty } from \"./namedNodeProperty\";\nimport { NamedProperty } from \"./namedProperty\";\nimport { NodeProperty } from \"./nodeProperty\";\nimport { _castFunctors } from \"./primitiveTypeCasts\";\nimport { ReferenceArrayProperty } from \"./referenceArrayProperty\";\nimport { ReferenceMapProperty } from \"./referenceMapProperty\";\nimport { ReferenceProperty } from \"./referenceProperty\";\nimport { SetProperty } from \"./setProperty\";\nimport { StringProperty } from \"./stringProperty\";\nimport { Uint16Property, Uint32Property, Uint8Property } from \"./uintProperties\";\nimport {\n\tBoolArrayProperty,\n\tFloat32ArrayProperty,\n\tFloat64ArrayProperty,\n\tInt16ArrayProperty,\n\tInt32ArrayProperty,\n\tInt64ArrayProperty,\n\tInt8ArrayProperty,\n\tStringArrayProperty,\n\tUint16ArrayProperty,\n\tUint32ArrayProperty,\n\tUint64ArrayProperty,\n\tUint8ArrayProperty,\n\tValueArrayProperty,\n} from \"./valueArrayProperty\";\nimport {\n\tBoolMapProperty,\n\tFloat32MapProperty,\n\tFloat64MapProperty,\n\tInt16MapProperty,\n\tInt32MapProperty,\n\tInt64MapProperty,\n\tInt8MapProperty,\n\tStringMapProperty,\n\tUint16MapProperty,\n\tUint32MapProperty,\n\tUint64MapProperty,\n\tUint8MapProperty,\n\tValueMapProperty,\n} from \"./valueMapProperty\";\nimport { ValueProperty } from \"./valueProperty\";\n\nexport {\n\tArrayProperty,\n\tBaseProperty,\n\tBoolArrayProperty,\n\tBoolMapProperty,\n\tBoolProperty,\n\tContainerProperty,\n\tEnumArrayProperty,\n\tEnumProperty,\n\tFloat32ArrayProperty,\n\tFloat32MapProperty,\n\tFloat32Property,\n\tFloat64ArrayProperty,\n\tFloat64MapProperty,\n\tFloat64Property,\n\tIndexedCollectionBaseProperty,\n\tInt16ArrayProperty,\n\tInt16MapProperty,\n\tInt16Property,\n\tInt32ArrayProperty,\n\tInt32MapProperty,\n\tInt32Property,\n\tInt64ArrayProperty,\n\tInt64MapProperty,\n\tInt64Property,\n\tInt8ArrayProperty,\n\tInt8MapProperty,\n\tInt8Property,\n\tMapProperty,\n\tNamedNodeProperty,\n\tNamedProperty,\n\tNodeProperty,\n\tReferenceArrayProperty,\n\tReferenceMapProperty,\n\tReferenceProperty,\n\tSetProperty,\n\tStringArrayProperty,\n\tStringMapProperty,\n\tStringProperty,\n\tUint16ArrayProperty,\n\tUint16MapProperty,\n\tUint16Property,\n\tUint32ArrayProperty,\n\tUint32MapProperty,\n\tUint32Property,\n\tUint64ArrayProperty,\n\tUint64MapProperty,\n\tUint64Property,\n\tUint8ArrayProperty,\n\tUint8MapProperty,\n\tUint8Property,\n\tValueArrayProperty,\n\tValueMapProperty,\n\tValueProperty,\n\t_castFunctors,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexedCollectionBaseProperty.d.ts","sourceRoot":"","sources":["../../src/properties/indexedCollectionBaseProperty.js"],"names":[],"mappings":"AAkBA;;;;;GAKG;AAEH;;;GAGG;AACH;
|
|
1
|
+
{"version":3,"file":"indexedCollectionBaseProperty.d.ts","sourceRoot":"","sources":["../../src/properties/indexedCollectionBaseProperty.js"],"names":[],"mappings":"AAkBA;;;;;GAKG;AAEH;;;GAGG;AACH;IACC;;;;OAIG;IACH,4BAeC;IAbA,gGAAgG;IAChG;;;;MAIC;IAED,0GAA0G;IAC1G;;;;MAIC;IAkFF;;;;;;;;OAQG;IACH,gBANW,MAAM,kCAEN,OAAO,QAuDjB;IAED;;;;;;;OAOG;IACH,qBALW,MAAM,mBACN,OAAO,QAsCjB;IAqID;;;;;;;OAOG;IACH,8CAEC;IAED;;;;;;;OAOG;IACH,uCAOC;IAsZF,uFAAuF;IACvF,iCAA+D;CAF9D"}
|