@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":"baseProperty.js","sourceRoot":"","sources":["../../src/properties/baseProperty.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,4DAA4D;AAE5D,oDAAuB;AACvB,+EAKgD;AAChD,yEAA8E;AAC9E,iEAA0E;AAE1E,MAAM,E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AAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBAChC,MAAM,SAAS,GAAG,+BAAU,CAAC,6BAA6B,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;oBACjF,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE;wBACtD,OAAO,KAAK,CAAC;qBAChB;iBACJ;aACJ;YACD,OAAO,IAAI,CAAC;SACf;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;;AAvpCL,oCAwpCC;AA9mCU,iCAAoB,GAAG,oBAAoB,CAAC;AAC5C,iCAAoB,GAAG,oBAAoB,CAAC;AAC5C,wBAAW,GAAG,WAAW,CAAC;AAw0BjC;;GAEG;AACI,4BAAe,GAAG,eAAe,CAAC;AAmS5C,YAAoB,CAAC,SAAS,CAAC,WAAW,GAAG,KAAK,CAAC;AACnD,YAAoB,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACnD,YAAoB,CAAC,SAAS,CAAC,OAAO,GAAG,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint accessor-pairs: [2, { \"getWithoutSet\": false }] */\n\nimport _ from 'lodash';\nimport {\n ChangeSet,\n PathHelper,\n SerializedChangeSet,\n TypeIdHelper,\n} from '@fluid-experimental/property-changeset';\nimport { ConsoleUtils, constants } from '@fluid-experimental/property-common';\nimport { LazyLoadedProperties as Property } from './lazyLoadedProperties';\n\nconst { MSG, PROPERTY_PATH_DELIMITER } = constants;\nconst BREAK_TRAVERSAL = 'BREAK';\n\n/**\n * Determines in which cases a reference will automatically be resolved\n */\nenum REFERENCE_RESOLUTION {\n /** The resolution will always automatically follow references */\n ALWAYS,\n /** If a reference is the last entry during the path resolution, it will not automatically be resolved */\n NO_LEAFS,\n /** References are never automatically resolved */\n NEVER,\n}\n\n/**\n * Used to indicate the state of a property. These flags can be connected via OR.\n */\nenum MODIFIED_STATE_FLAGS {\n /** No changes to this property at the moment */\n CLEAN,\n /** The property is marked as changed in the currently pending ChangeSet */\n PENDING_CHANGE,\n /** The property has been modified and the result has not yet been reported to the application for scene updates */\n DIRTY,\n}\n\n/**\n * Token Types\n * @enum Object\n * Type of the token in the path string\n */\nconst PATH_TOKENS = {\n /** A / at the beginning of the path */\n ROOT: { 'token': 'ROOT' },\n /** A * that indicates a dereferencing operation */ // note: reversed!\n REF: { 'token': 'REF' },\n /** A ../ that indicates one step above the current path */\n UP: { 'token': 'UP' },\n};\n\ninterface IBasePropertyParams {\n /** id of the property */\n id?: string;\n /** The type unique identifier */\n typeid?: string;\n /** The length of the property. Only valid if the property is an array, otherwise the length defaults to 1 */\n length: number;\n /** The type of property this template represents i.e. single, array, map, set. */\n context: string;\n\n // TODO: UNUSED PARAMETER ??\n /** List of property templates that are used to define children properties */\n properties: BaseProperty[];\n\n // TODO: UNUSED PARAMETER ??\n /** List of property template typeids that this PropertyTemplate inherits from */\n inherits: string[];\n}\n\ninterface ISerializeOptions {\n /** Only include dirty entries in the serialization */\n dirtyOnly?: boolean;\n /** Include the typeid of the root of the hierarchy */\n includeRootTypeid?: boolean;\n /** The type of dirtiness to use when reporting dirty changes. */\n dirtinessType?: MODIFIED_STATE_FLAGS;\n /**\n * If this is set to true, the serialize\n * function will descend into referenced repositories. WARNING: if there are loops in the references\n * this can result in an infinite loop\n */\n includeReferencedRepositories?: boolean;\n}\n\n/**\n * The options to selectively create only a subset of a property.\n *\n * For now the filtering options are propagated by many functions, but are actually used only by\n * functions that create properties from schemas. It is then possible to create only a subset of\n * the properties of a schema by providing a restricted list of paths.\n *\n * Thus, with the filtering options, it is NOT possible to prevent a part of a ChangeSet from being\n * processed (in `applyChangeSet()` for example), it is NOT possible to prevent a property from being\n * created by a direct call to a function like `deserialize()` or `createProperty()`.\n */\nexport abstract class BaseProperty {\n protected _id: string | undefined;\n protected _isConstant: boolean;\n protected _dirty: MODIFIED_STATE_FLAGS;\n protected _typeid: string;\n protected _context: string;\n protected _parent: BaseProperty | undefined;\n protected _noDirtyInBase: boolean;\n\n _tree: any;\n _checkoutView: any;\n _checkedOutRepositoryInfo: any;\n\n constructor(in_params: IBasePropertyParams) {\n // Pre-conditions\n // This test has been disabled for performance reasons, if it would be incorrect,\n // the next line will throw anyways\n // ConsoleUtils.assert(in_params, MSG.PROP_CONSTRUCTOR_EXPECTS_OBJECTS);\n\n if (this._id !== in_params.id) {\n this._id = in_params.id;\n }\n\n // Makes sure context value is fine\n // This assertion has been disabled for performance reasons. This is not a user facing\n // constructor function and therefore we rely on PropertyFactory to correctly provide the context.\n /* ConsoleUtils.assert(!in_params.context || in_params.context === this._context,\n MSG.CONTEXT_NOT_AS_EXPECTED + this._context + ' != ' + in_params.context); */\n\n // Sets typeid if default value is not fine\n let typeId = in_params.typeid || 'BaseProperty';\n if (typeId !== this._typeid) {\n this._typeid = typeId;\n }\n\n this._parent = undefined;\n // internal management\n if (!this._noDirtyInBase) {\n this._dirty = MODIFIED_STATE_FLAGS.CLEAN;\n }\n }\n\n static MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS;\n static REFERENCE_RESOLUTION = REFERENCE_RESOLUTION;\n static PATH_TOKENS = PATH_TOKENS;\n\n /**\n * @returns The typeid of this property\n */\n getTypeid(): string {\n return this._typeid;\n }\n\n /**\n * @returns The context of this property\n */\n getContext(): string {\n return this._context;\n }\n\n /**\n * Get the scope to which this property belongs to.\n * @returns The guid representing the scope in which the\n * property belongs to\n */\n protected _getScope(): string | undefined {\n return this._parent ? this.getRoot()._getScope() : undefined;\n }\n\n /**\n * Returns the full property type identifier for the ChangeSet including the enum type id\n * @param in_hideCollection - if true the collection type (if applicable) will be omitted since that is not\n * applicable here, this param is ignored.\n * @returns The typeid\n */\n getFullTypeid(in_hideCollection = false): string {\n return this._typeid;\n }\n\n /**\n * Updates the parent for the property\n *\n * @param in_property - The parent property\n */\n protected _setParent(in_property: BaseProperty) {\n this._parent = in_property;\n\n // If the property is dirty but not its parent, dirty the parent. In cases like named properties\n // and default values, a parent is set after a value is set; we get a case where the\n // property is dirty but not its parent and the change is not included in a changeSet.\n if (this._parent && this._isDirty() && !this._parent._isDirty()) {\n this._parent._setDirty(false, this);\n }\n }\n\n /**\n * Is this property the root of the property set tree?\n *\n * @returns True if it is a root, otherwise false.\n */\n isRoot(): boolean {\n // This checks, whether this is the root of a CheckOutView\n // (all other properties should have a parent property)\n return this._parent === undefined;\n }\n\n /**\n * Is this property the ancestor of in_otherProperty?\n * Note: A property is not considered an ancestor of itself\n * @param in_otherProperty - possible descendant\n * @throws if in_otherProperty is not defined.\n * @returns True if it is a ancestor, otherwise false.\n */\n isAncestorOf(in_otherProperty: BaseProperty): boolean {\n ConsoleUtils.assert(in_otherProperty, MSG.MISSING_IN_OTHERPROP);\n var parent = in_otherProperty.getParent();\n while (parent) {\n if (parent === this) {\n return true;\n } else {\n parent = parent.getParent();\n }\n }\n return false;\n }\n\n /**\n * Is this property the descendant of in_otherProperty?\n * Note: A property is not considered a descendant of itself\n * @param in_otherProperty - possible ancestor\n * @throws if in_otherProperty is not defined.\n * @returns True if it is a descendant, otherwise false.\n */\n isDescendantOf(in_otherProperty: BaseProperty): boolean {\n ConsoleUtils.assert(in_otherProperty, MSG.MISSING_IN_OTHERPROP);\n return in_otherProperty.isAncestorOf(this);\n }\n\n /**\n * Is this property a leaf node with regard to flattening?\n *\n * TODO: Which semantics should flattening have? It stops at primitive types and collections?\n *\n * @returns True if it is a leaf with regard to flattening\n */\n _isFlattenLeaf(): boolean {\n return false;\n }\n\n /**\n * Get the parent of this property\n *\n * @returns The parent of this property (or undefined if none exist)\n */\n getParent(): BaseProperty | undefined {\n return this._parent;\n }\n\n /**\n * checks whether the property is dynamic (only properties inherting from NodeProperty are)\n * @returns True if it is a dynamic property.\n */\n isDynamic() {\n return false;\n }\n\n /**\n * Sets the property as dirty and/or pending. This will add one or both flags if not already set and will\n * do the same for its parent. This does not clear any flag, it only sets.\n *\n * @param in_reportToView - By default, the dirtying will always be reported to the checkout view\n * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n * @param in_callingChild - The child which is dirtying its parent\n * @param in_flags - The flags to set.\n * @private\n */\n _setDirty(\n in_reportToView = true,\n in_callingChild: BaseProperty = undefined,\n in_flags: MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS.DIRTY | MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n ) {\n if (in_flags === undefined) {\n in_flags = MODIFIED_STATE_FLAGS.DIRTY | MODIFIED_STATE_FLAGS.PENDING_CHANGE;\n }\n var reportToView = in_reportToView;\n if (reportToView === undefined) {\n reportToView = true;\n }\n // We only update the flags upwards in the tree, when the corresponding nodes are not already flagged\n var oldFlags = this._getDirtyFlags();\n if ((oldFlags & in_flags) !== in_flags) { // only dirty once until clean.\n this._setDirtyFlags(oldFlags | in_flags);\n\n // Report dirtiness upwards in the hierarchy\n if (this._parent) {\n this._parent._setDirty(reportToView, this, in_flags);\n reportToView = false;\n }\n }\n if (reportToView) {\n this._reportDirtinessToView();\n }\n }\n\n /**\n * Sets the dirty flags for this property\n * @param in_flags - The dirty flags\n */\n _setDirtyFlags(in_flags: MODIFIED_STATE_FLAGS) {\n this._dirty = in_flags;\n }\n\n /**\n * Gets the dirty flags for this property\n * @returns The dirty flags\n */\n _getDirtyFlags(): MODIFIED_STATE_FLAGS {\n return this._dirty;\n }\n\n /**\n * Helper function, which reports the fact that a property has been dirtied to the checkout view\n * @private\n */\n // TODO: Cleaner way to make the property tree aware of the DDS hosting it.\n // Currently, this._tree is set in SharedPropertyTree constructor.\n _reportDirtinessToView() {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let currentNode: BaseProperty = this;\n\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n while (currentNode._parent) {\n currentNode = currentNode._parent;\n }\n\n if (\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n currentNode._tree &&\n currentNode._tree.notificationDelayScope === 0 &&\n currentNode._isDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY)\n ) {\n currentNode._tree._reportDirtinessToView();\n }\n }\n\n /**\n * Modifies the property according to the given changeset\n *\n * @param in_changeSet - The changeset to apply\n * @param {property-properties.BaseProperty.PathFilteringOptions} [in_filteringOptions] - The filtering options to\n * consider while applying the ChangeSet.\n * @throws if in_changeSet is invalid.\n */\n applyChangeSet(in_changeSet: SerializedChangeSet) {\n this._checkIsNotReadOnly(false);\n\n // We just forward the call to the internal function\n this._applyChangeset(in_changeSet, true);\n }\n\n /**\n * Modifies the property according to the given changeset\n *\n * Internal function.\n *\n * @param in_changeSet - The changeset to apply\n * @param in_reportToView - By default, the dirtying will always be reported to the checkout view and trigger a\n * modified event there. When batching updates, this can be prevented via this flag.\n * @param {property-properties.BaseProperty.PathFilteringOptions} [in_filteringOptions] - The filtering options to\n * consider while applying the ChangeSet. For now it is only used to control property creation, to prevent\n * properties from being created outside the checked out paths. It does not validate that a value inside the\n * ChangeSet is outside those paths.\n */\n _applyChangeset(in_changeSet: SerializedChangeSet, in_reportToView = true, in_filteringOptions = undefined) {\n var typeids = _.keys(in_changeSet);\n for (const typeid of typeids) {\n if (ChangeSet.isReservedKeyword(typeid)) {\n continue; // Ignore the special keys\n }\n\n var paths = _.keys(in_changeSet[typeid]);\n for (const path of paths) {\n var property = this.resolvePath(path, { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n if (property) {\n property._applyChangeset(in_changeSet[typeid][path], false);\n } else {\n throw new Error(MSG.INVALID_PATH + path);\n }\n }\n }\n\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n }\n\n /**\n * Re-apply dirty flags from changesets\n *\n * Internal function.\n *\n * @param in_pendingChangeSet - The pending changeset to apply\n * @param in_dirtyChangeSet - The dirty changeset to apply\n * @throws if changeset arguments are invalid.\n */\n _reapplyDirtyFlags(in_pendingChangeSet: SerializedChangeSet, in_dirtyChangeSet: SerializedChangeSet) {\n this._checkIsNotReadOnly(false);\n // Here we must walk both changesets in parallel. Sometimes there will be only an entry in one\n // changeset, sometimes only one in the other changeset, sometimes one in both.\n const typeids = _.keys(in_pendingChangeSet).concat(_.keys(in_dirtyChangeSet));\n for (const typeid of typeids) {\n if (ChangeSet.isReservedKeyword(typeid)) {\n continue; // Ignore the special keys\n }\n const pendingChangeSet = in_pendingChangeSet && in_pendingChangeSet[typeid];\n const dirtyChangeSet = in_dirtyChangeSet && in_dirtyChangeSet[typeid];\n\n const paths = _.keys(pendingChangeSet).concat(_.keys(dirtyChangeSet));\n for (const path of paths) {\n let property = this.resolvePath(path);\n if (property) {\n property._reapplyDirtyFlags(\n pendingChangeSet && pendingChangeSet[path],\n dirtyChangeSet && dirtyChangeSet[path]);\n } else {\n throw new Error(MSG.INVALID_PATH + path);\n }\n }\n }\n }\n\n protected resolvePath(path: string, params?: any): BaseProperty {\n throw new Error(\"Method not implemented.\");\n }\n\n /**\n * Removes the dirtiness flag from this property\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean.\n * If none are supplied all will be removed.\n * @private\n */\n _cleanDirty(in_flags) {\n this._setDirtyFlags(in_flags === undefined ? MODIFIED_STATE_FLAGS.CLEAN :\n (this._getDirtyFlags() & ~in_flags));\n }\n\n /**\n * Removes the dirtiness flag from this property and recursively from all of its children\n *\n * @param in_flags - The flags to clean. If none are supplied all will be removed.\n */\n cleanDirty(in_flags: MODIFIED_STATE_FLAGS) {\n var dirtyChildren = this._getDirtyChildren(in_flags);\n for (const dirtyChild of dirtyChildren) {\n const child = this.get(\n dirtyChild,\n { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER },\n );\n child.cleanDirty(in_flags);\n child._cleanDirty(in_flags);\n }\n\n // after all paths are clean, we are also clean!\n this._cleanDirty(in_flags);\n }\n\n /**\n * Indicates that the property has been modified and a corresponding modified call has not yet been sent to the\n * application for runtime scene updates.\n *\n * @param in_dirtinessType - The type of dirtiness to check for. By default this is DIRTY\n * @returns Is the property dirty?\n */\n _isDirty(in_dirtinessType: MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS.DIRTY): boolean {\n return !!(this._getDirtyFlags() & in_dirtinessType);\n }\n\n /**\n * Indicates that the property has been modified and a corresponding modified call has not yet been sent to the\n * application for runtime scene updates.\n *\n * @returns True if the property is dirty. False otherwise.\n */\n isDirty(): boolean {\n return this._isDirty();\n }\n\n /**\n * The property has pending changes in the current ChangeSet.\n * @returns True if the property has pending changes. False otherwise.\n */\n hasPendingChanges(): boolean {\n return this._isDirty(MODIFIED_STATE_FLAGS.PENDING_CHANGE);\n }\n\n /**\n * Returns the ChangeSet of all sub-properties\n *\n * @returns The serialized changes\n */\n getPendingChanges(): ChangeSet {\n var serialized = this._serialize(true, false, BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE);\n return new ChangeSet(serialized);\n }\n\n /**\n * Get the id of this property\n *\n * @returns The id of the property\n */\n getId(): string | undefined {\n return this._id;\n }\n\n /**\n * Sets the checkedOutRepositoryInfo.\n * @param {property-properties.CheckoutView~CheckedOutRepositoryInfo} value - The checkedOut repository info.\n * @protected\n */\n _setCheckoutView(value) {\n this._checkoutView = value;\n }\n\n /**\n * Returns the checkoutView\n * @return {property-properties.CheckoutView} - the checkout view\n */\n _getCheckoutView() {\n let checkedOutRepositoryInfo = this._getCheckedOutRepositoryInfo();\n return checkedOutRepositoryInfo ? checkedOutRepositoryInfo.getCheckoutView() : undefined;\n }\n\n /**\n * Returns the checkedOutRepositoryInfo.\n * @return {property-properties.CheckoutView~CheckedOutRepositoryInfo} The checkedOut repository info.\n * @protected\n */\n _getCheckedOutRepositoryInfo() {\n if (!this._parent) {\n return this._checkedOutRepositoryInfo;\n } else {\n return this.getRoot() ? this.getRoot()._getCheckedOutRepositoryInfo() : undefined;\n }\n }\n\n /**\n * Returns the Workspace\n * @returns The workspace containing the property.\n */\n getWorkspace() {\n const root = this.getRoot();\n return root ? root._tree : undefined;\n }\n\n /**\n * Returns the path segment for a child\n *\n * @param in_childNode - The child for which the path is returned\n *\n * @returns The path segment to resolve the child property under this property\n */\n _getPathSegmentForChildNode(in_childNode: BaseProperty): string {\n return PROPERTY_PATH_DELIMITER + PathHelper.quotePathSegmentIfNeeded(in_childNode.getId());\n }\n\n /**\n * Resolves a direct child node based on the given path segment\n *\n * @param {String} in_segment - The path segment to resolve\n * @param {property-properties.PathHelper.TOKEN_TYPES} in_segmentType - The type of segment in the tokenized path\n *\n * @return {property-properties.BaseProperty|undefined} The child property that has been resolved\n * @protected\n */\n _resolvePathSegment(in_segment: string, in_segmentType: PathHelper.TOKEN_TYPES) {\n // Base Properties only support paths separated via dots\n if (in_segmentType !== PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN) {\n throw new Error(MSG.INVALID_PATH_TOKEN + in_segment);\n }\n\n return this.get(in_segment, { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER });\n }\n\n /**\n * Set the id of this property\n *\n * @param {string} in_id - The id for this property\n *\n * @return {string} the new id\n * @private\n */\n _setId(in_id) {\n if (!_.isString(in_id) && !_.isNumber(in_id)) {\n throw new TypeError(MSG.ID_STRING_OR_NUMBER + in_id);\n }\n\n if (this._parent !== undefined) {\n throw new Error(MSG.ID_CHANGE_FOR_PROPERTY_WITH_PARENT + this._id + ' to id: ' + in_id);\n }\n\n this._id = String(in_id);\n\n // flush caches\n this._setDirty();\n\n return in_id;\n }\n\n /**\n * Return a clone of this property\n * @returns The cloned property\n */\n clone(): BaseProperty {\n const PropertyFactory = Property.PropertyFactory;\n var clone = PropertyFactory._createProperty(\n this.getFullTypeid(), null, undefined, this._getScope(), true,\n );\n\n // TODO: this is not very efficient. Clone should be overriden\n // by the child classes\n clone.deserialize(this._serialize());\n clone.cleanDirty(\n BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE |\n BaseProperty.MODIFIED_STATE_FLAGS.DIRTY,\n );\n return clone;\n }\n\n /**\n * Returns true if the property is a primitive type\n * @return {boolean} true if the property is a primitive type\n */\n isPrimitiveType() {\n return TypeIdHelper.isPrimitiveType(this._typeid);\n }\n\n /**\n * Get a flattened, tree like representation of this object and all of it's\n * descendants. The flattening will stop at primitive properties and collections.\n *\n * For non-leaf nodes, it is possible to access the corresponding node object itself via the\n * propertyNode member of the flattened representation (warning, this will overwrite a\n * property of this name).\n * TODO: Do we want to have this feature or is it to dangerous?\n *\n * @returns the flat representation\n */\n private _flatten(): object {\n return { propertyNode: this };\n }\n\n /**\n * Repeatedly calls back the given function with human-readable string representations\n * of the property and of its sub-properties. By default it logs to the console.\n * If printFct is not a function, it will default to console.log\n * @param {function} [printFct=console.log] - Function to call for printing each property\n */\n prettyPrint(printFct) {\n if (typeof printFct !== 'function') {\n printFct = console.log;\n }\n this._prettyPrint('', '', printFct);\n }\n\n /**\n * Return a JSON representation of the properties and its children.\n * @return {object} A JSON representation of the properties and its children.\n * @private\n */\n _toJson() {\n var json = {\n id: this.getId(),\n context: this._context,\n typeid: this.getTypeid(),\n isConstant: this._isConstant,\n value: [],\n };\n\n var ids = this.getIds();\n for (const id of ids) {\n json.value.push(\n this.get(id, { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER })._toJson(),\n );\n }\n\n return json;\n }\n\n getIds(): string[] {\n return [];\n }\n\n get(id: string, params?: { referenceResolutionMode: REFERENCE_RESOLUTION; }): BaseProperty | undefined {\n return undefined;\n }\n\n /**\n * Repeatedly calls back the given function with human-readable string\n * representations of the property and of its sub-properties.\n * @param {string} indent - Leading spaces to create the tree representation\n * @param {string} externalId - Name of the current property at the upper level. Used for arrays.\n * @param {function} printFct - Function to call for printing each property\n */\n _prettyPrint(indent, externalId, printFct) {\n var context = '';\n switch (this._context) {\n case 'map': context = 'Map of '; break;\n case 'set': context = 'Set of '; break;\n default: break;\n }\n printFct(indent + externalId + this.getId() + ' (' + context + this.getTypeid() + '):');\n this._prettyPrintChildren(indent, printFct);\n }\n\n /**\n * Repeatedly calls back the given function with human-readable string\n * representations of the property's sub-properties.\n * @param {string} indent - Leading spaces to create the tree representation\n * @param {function} printFct - Function to call for printing each property\n */\n _prettyPrintChildren(indent, printFct) {\n indent += ' ';\n var ids = this.getIds();\n for (var i = 0; i < ids.length; i++) {\n this.get(ids[i], { referenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER })._prettyPrint(indent, '', printFct);\n }\n }\n\n /**\n * Returns the possible paths from the given from_property to this property. If multiple paths\n * through multiple repository references are possible, returns more than one path.\n *\n * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed\n * @return {Array<string | undefined>} The paths between from_property and this property\n * will return an empty array if trying to get the path from a child repo to a parent repo.\n * @private\n */\n _getPathsThroughRepoRef(in_fromProperty) {\n var paths = [];\n var that = this;\n var referenceProps = [];\n // get all reference properties in the referenceProps array\n this._getCheckoutView()._forEachCheckedOutRepository(function(repoInfo) {\n var keys = _.keys(repoInfo._referencedByPropertyInstanceGUIDs);\n for (const key of keys) {\n if (key) {\n var repoRef = repoInfo._referencedByPropertyInstanceGUIDs[key]\n ._repositoryReferenceProperties[key].property;\n if (that.getRoot() === repoRef.getReferencedRepositoryRoot()) {\n referenceProps.push(repoRef);\n }\n }\n }\n });\n\n // if no repo references point to the root of 'this', we can assume that 'this' is in the\n // parent repo, which cannot return a useful path.\n if (referenceProps.length === 0) {\n console.warn(MSG.NO_PATH_FROM_CHILD_REPO);\n return [];\n }\n\n // path from root of the child repo to 'this'\n var pathInChildRepo = this._getDirectPath(this.getRoot());\n\n // find possible paths from in_fromProperty to the referenceProps\n // concatenate each with pathInChildRepo\n for (const referenceProp of referenceProps) {\n var pathInParentRepo = referenceProp.getRelativePath(in_fromProperty);\n if (pathInParentRepo) {\n if (pathInChildRepo.length > 0) {\n paths.push(pathInParentRepo + '.' + pathInChildRepo);\n } else {\n paths.push(pathInParentRepo);\n }\n }\n }\n if (paths.length > 0) {\n return paths;\n }\n return [];\n }\n\n /**\n * Returns the possible paths from the given in_fromProperty to this property. If no direct paths\n * exist, it returns an indirect path between the two properties.\n *\n * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed.\n * @return {string} The path between the given in_fromProperty and this property.\n * @private\n */\n _getIndirectPath(in_fromProperty) {\n var path = [];\n var that = this;\n var foundPath = undefined;\n\n foundPath = in_fromProperty.traverseUp(function(in_node) {\n path.push('../');\n if (in_node === that) {\n return BREAK_TRAVERSAL;\n }\n var directPath = that._getDirectPath(in_node);\n if (directPath) {\n path.push(directPath);\n return BREAK_TRAVERSAL;\n }\n return undefined;\n });\n return foundPath === BREAK_TRAVERSAL ? path.join('') : undefined;\n }\n\n /**\n * Returns the path from the given in_fromProperty to this property if a direct path\n * exists between the two properties. Otherwise returns undefined.\n *\n * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed.\n * @return {string} The path between the given in_fromProperty and this property.\n * @private\n */\n _getDirectPath(in_fromProperty) {\n var path = [];\n var foundAncestor = undefined;\n if (in_fromProperty === this) {\n foundAncestor = BREAK_TRAVERSAL;\n } else if (this.getParent()) {\n path.push(this.getParent()._getPathSegmentForChildNode(this));\n\n foundAncestor = this.traverseUp(function(in_node) {\n // break where we meet the relative reference\n if (in_node === in_fromProperty) {\n return BREAK_TRAVERSAL;\n }\n\n if (in_node.getParent()) {\n path.push(in_node.getParent()._getPathSegmentForChildNode(in_node));\n }\n\n return undefined;\n });\n }\n\n if (foundAncestor === BREAK_TRAVERSAL) {\n var result = path.reverse().join('');\n\n // We don't use a PROPERTY_PATH_DELIMITER at the start of the path\n if (result[0] === PROPERTY_PATH_DELIMITER) {\n result = result.substr(1);\n }\n return result;\n } else {\n return undefined;\n }\n }\n\n /**\n * Returns the possible paths from the given in_fromProperty to this property.\n *\n * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed.\n * @return {Array<string>} The paths between the given in_fromProperty and this property.\n * @private\n */\n _getAllRelativePaths(in_fromProperty) {\n if (this.getRoot() !== in_fromProperty.getRoot()) {\n // if this and in_fromProperty have different roots, go through a repo ref\n // this is the case where we might have more than one path\n return this._getPathsThroughRepoRef(in_fromProperty);\n } else {\n var directPath = this._getDirectPath(in_fromProperty);\n return directPath !== undefined ? [directPath] : [this._getIndirectPath(in_fromProperty)];\n }\n }\n\n /**\n * Returns the path from the given fron_property to this node if such a path exists.\n * If more than one paths exist (as might be the case with multiple repository references\n * pointing to the same repository), it will return the first valid path found.\n * For example, if you have this structure:\n *\n * ```\n * <code>prop1\n * --prop2\n * ----prop3</code>\n * ```\n *\n * and call: `<code>prop1.getRelativePath(prop3);</code>`\n *\n * You will get the path from prop3 to prop1, which would be '../../'\n *\n * @param in_fromProperty - The property from which the path is computed.\n * @returns The path between the given in_fromProperty and this property.\n * @throws If in_fromProperty is not a property.\n */\n getRelativePath(in_fromProperty: BaseProperty): string {\n ConsoleUtils.assert(in_fromProperty instanceof BaseProperty, MSG.IN_FROMPROPERTY_MUST_BE_PROPERTY);\n var paths = this._getAllRelativePaths(in_fromProperty) || [];\n if (paths.length === 0) {\n console.warn(MSG.NO_PATH_BETWEEN +\n in_fromProperty.getAbsolutePath() +\n ' and ' +\n this.getAbsolutePath());\n } else if (paths.length > 1) {\n console.warn(MSG.MORE_THAN_ONE_PATH + in_fromProperty.getAbsolutePath() +\n ' and ' + this.getAbsolutePath());\n }\n return paths[0];\n }\n\n /**\n * Returns the path from the root of the workspace to this node (including a slash at the beginning).\n *\n * @return {string} The path from the root\n */\n getAbsolutePath() {\n var that = this;\n var referenceProps = [];\n // get all reference properties pointing to the root the repository containing 'this'\n if (this._getCheckoutView()) {\n this._getCheckoutView()._forEachCheckedOutRepository(function(repoInfo) {\n var keys = _.keys(repoInfo._referencedByPropertyInstanceGUIDs);\n for (const key of keys) {\n if (key) {\n let repoRef = repoInfo._referencedByPropertyInstanceGUIDs[key];\n let refProperty = undefined;\n\n if (repoRef) {\n refProperty = repoRef._repositoryReferenceProperties[key] ?\n repoRef._repositoryReferenceProperties[key].property : undefined;\n }\n\n let refRoot;\n try {\n refRoot = refProperty ? refProperty.getReferencedRepositoryRoot() : undefined;\n } catch (e) {\n console.warn(e.message);\n }\n\n if (that.getRoot() === refRoot) {\n referenceProps.push(refProperty);\n break;\n }\n }\n }\n });\n }\n\n var path = this.isRoot() ? [] : [this.getParent()._getPathSegmentForChildNode(this)];\n this.traverseUp(function(in_node) {\n if (in_node.getParent()) {\n path.push(in_node.getParent()._getPathSegmentForChildNode(in_node));\n } else if (referenceProps.length > 0) {\n // recursively call getAbsolutePath, removing the '/' at the beginning of the path\n path.push(referenceProps[0].getAbsolutePath(referenceProps[0].getRoot()).slice(1));\n }\n });\n var absolutePath = path.reverse().join('');\n\n // We don't use the property path separator at the start of the path\n if (absolutePath[0] === PROPERTY_PATH_DELIMITER) {\n absolutePath = absolutePath.substr(1);\n }\n absolutePath = '/' + absolutePath;\n\n return absolutePath;\n }\n\n /**\n * Traverses the property hierarchy upwards until the a node without parent is reached\n *\n * @param {Function} in_callback - Callback to invoke for each of the parents. The traversal can be stopped\n * by returning BaseProperty.BREAK_TRAVERSAL\n * @throws if in_callback is not a function.\n * @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL, if the traversal didn't reach the root,\n * otherwise `undefined`.\n */\n traverseUp(in_callback) {\n ConsoleUtils.assert(_.isFunction(in_callback), MSG.CALLBACK_NOT_FCT);\n if (this._parent) {\n var result = in_callback(this._parent);\n return result !== BREAK_TRAVERSAL ? this._parent.traverseUp(in_callback) : BREAK_TRAVERSAL;\n }\n\n return undefined;\n }\n\n /**\n * @type {string} Constant to stop the traversal in traverseUp and traverseDown functions\n */\n static BREAK_TRAVERSAL = BREAK_TRAVERSAL;\n\n /**\n * Returns all children which are dirty (this only returns direct children, it does not travers recursively)\n *\n * @param in_flags - Which types of dirtiness are we looking for? If none is given, all types are regarded as dirty.\n * @returns The list of keys identifying the dirty children.\n */\n private _getDirtyChildren(in_flags: MODIFIED_STATE_FLAGS): string[] {\n return [];\n }\n\n /**\n * Returns the root of the property hierarchy\n * @returns The root property\n */\n getRoot(): BaseProperty {\n return this._parent ? this._parent.getRoot() : this;\n }\n\n /**\n * Traverses all children in the child hierarchy\n * TODO: How should this behave for collections?\n *\n * @param in_callback - Callback to invoke for every child\n * @param in_pathFromTraversalStart - Path from the root of the traversal to this node\n * @returns Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted, otherwise `undefined`.\n * @private\n */\n _traverse(in_callback: Function, in_pathFromTraversalStart: string): string | undefined {\n return undefined;\n }\n\n /**\n * Deserialize takes a currently existing property and sets it to the hierarchy described in the normalized\n * ChangeSet passed as parameter. It will return a ChangeSet that describes the difference between the current state\n * of the property and the passed in normalized property\n *\n * @param in_serializedObj - The serialized changeset to apply to this node. This has to be a normalized change-set\n * (only containing insertions and property assignments. Deletes and Modify must not appear)\n * @param in_filteringOptions - The filtering options to consider while deserializing the property.\n * @param in_createChangeSet - Should a changeset be created for this deserialization?\n * @param in_reportToView - Usually the dirtying should be reported to the view and trigger a modified event there.\n * This can be prevented via this flag.\n * @throws if called on a read-only property.\n * @returns ChangeSet with the changes that actually were performed during the deserialization\n */\n deserialize(\n in_serializedObj: SerializedChangeSet,\n in_filteringOptions = {},\n in_createChangeSet = true,\n in_reportToView = false,\n ): SerializedChangeSet {\n this._checkIsNotReadOnly(false);\n return this._deserialize(in_serializedObj, in_reportToView, in_filteringOptions, in_createChangeSet);\n }\n\n /**\n * Sets the property to the state in the given normalized changeset\n *\n * @param in_serializedObj - The serialized changeset to apply. This\n * has to be a normalized change-set (only containing inserts. Removes and Modifies are forbidden).\n * @param in_reportToView - Usually the dirtying should be reported to the view\n * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n * @param in_filteringOptions - The filtering options to consider while deserializing the property.\n * @param in_createChangeSet - Should a changeset be created for this deserialization?\n * @returns ChangeSet with the changes that actually were performed during the deserialization.\n */\n _deserialize(\n in_serializedObj: SerializedChangeSet,\n in_reportToView: boolean,\n in_filteringOptions = {},\n in_createChangeSet = true,\n ): SerializedChangeSet {\n return {};\n }\n\n /**\n * Serialize the property into a changeSet\n *\n * @param in_dirtyOnly - Only include dirty entries in the serialization\n * @param in_includeRootTypeid - Include the typeid of the root of the hierarchy\n * @param in_dirtinessType - The type of dirtiness to use when reporting dirty changes. By default this is\n * `PENDING_CHANGE`.\n * @param in_includeReferencedRepositories - If this is set to true, the serialize\n * function will descend into referenced repositories.\n * WARNING: if there are loops in the references this can result in an infinite loop.\n *\n * @returns The serialized representation of this property\n */\n _serialize(\n in_dirtyOnly: boolean = false,\n in_includeRootTypeid: boolean = false,\n in_dirtinessType: MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n in_includeReferencedRepositories: boolean = false,\n ): object {\n return {};\n }\n\n /**\n * Serialize the property\n *\n * @param in_options - Options for the serialization\n * @throws if in_options is defined but is not an object.\n * @returns The serialized representation of this property\n */\n serialize(in_options: ISerializeOptions) {\n var opts = {\n dirtyOnly: false,\n includeRootTypeid: false,\n dirtinessType: MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n includeReferencedRepositories: false,\n };\n if (in_options !== undefined) {\n if (typeof in_options !== 'object') {\n throw new TypeError(MSG.SERIALIZE_TAKES_OBJECT);\n }\n Object.assign(opts, in_options);\n }\n\n return this._serialize(\n opts.dirtyOnly,\n opts.includeRootTypeid,\n opts.dirtinessType,\n opts.includeReferencedRepositories,\n );\n }\n\n /**\n * Indicate that all static members have been added to the property\n *\n * This function is invoked by the PropertyFactory once all static members have been added to the template\n * @protected\n */\n _signalAllStaticMembersHaveBeenAdded() { }\n\n /**\n * Tests whether this property may be modified\n * @param {checkConstant} in_checkConstant - Check if is readonly constant property\n */\n _checkIsNotReadOnly(in_checkConstant) {\n if (this._isConstant && in_checkConstant) {\n throw new Error(MSG.MODIFICATION_OF_CONSTANT_PROPERTY);\n }\n\n var root = this.getRoot();\n if (root && root._getCheckedOutRepositoryInfo) {\n var repositoryInfo = root._getCheckedOutRepositoryInfo();\n\n if (repositoryInfo && repositoryInfo._isReadOnly()) {\n throw new Error(MSG.MODIFICATION_OF_REFERENCED_PROPERTY);\n }\n }\n }\n\n /**\n * Set a property and its children as constants (readonly properties)\n */\n _setAsConstant() {\n this._isConstant = true;\n\n if (this instanceof Property.AbstractStaticCollectionProperty) {\n // Set all children properties as constants\n this.traverseDown(function(prop) {\n prop._isConstant = true;\n });\n }\n }\n\n traverseDown(arg0: (prop: any) => void) {\n throw new Error(\"Method not implemented.\");\n }\n\n /**\n * Unsets a property and its children as constants\n */\n _unsetAsConstant() {\n // Deleting this property will make the object\n // fall back to the entry in the prototype (false)\n delete this._isConstant;\n\n if (this instanceof Property.AbstractStaticCollectionProperty) {\n // Unset all children properties as constants\n this.traverseDown(function(prop) {\n // Deleting this property will make the object\n // fall back to the entry in the prototype (false)\n delete prop._isConstant;\n });\n }\n }\n\n /**\n * Dirties this node and all of its children\n *\n * @param in_reportToView - By default, the dirtying will always be reported to the checkout view\n * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n * @private\n */\n _setDirtyTree(in_reportToView = true) {\n this._traverse(function(node) {\n // Set all nodes to dirty, but prevent recursive updates up to the repository for the individual changes\n node._setDirty(false);\n }, '');\n // Now make one report\n if (in_reportToView) {\n this._reportDirtinessToView();\n }\n }\n\n /**\n * Determines whether a property can be inserted as a child of another property\n * This does NOT validate if the parent can accept the child property, it only validates if\n * the child property can be inserted in the parent.\n * @param in_targetParent - The parent property\n * @throws if the property can not be inserted\n */\n _validateInsertIn(in_targetParent: BaseProperty) {\n // A root?\n if (this._getCheckedOutRepositoryInfo() !== undefined) {\n throw new Error(MSG.INSERTED_ROOT_ENTRY);\n }\n\n // Would create a cycle?\n let parent = in_targetParent;\n while (parent !== undefined) {\n if (parent === this) {\n throw new Error(MSG.INSERTED_IN_OWN_CHILDREN);\n }\n parent = parent._parent;\n }\n\n // Already a child?\n if (this._parent !== undefined || this._getCheckoutView() !== undefined) {\n throw new Error(MSG.INSERTED_ENTRY_WITH_PARENT);\n }\n }\n\n /**\n * TODO: Remove it later. Kept not to modify tests\n *\n * Validates if the property and all its children are covered by the given list of paths.\n *\n * This function is expected to be used before inserting the property into its parent. That is the\n * reason for asking for the base path. This is the full path expected for this property.\n *\n * This function uses the canonical representation of the property paths.\n *\n * @param in_basePath - The property's absolute path in canonical form\n * @param in_paths - The array of paths that we wonder if it covers the property and its children\n * @returns If the property and all its children are included in the paths\n * @private\n */\n _coveredByPaths(in_basePath: string, in_paths: string[]): boolean {\n // First, get the coverage of the base property\n const coverage = PathHelper.getPathCoverage(in_basePath, in_paths);\n\n if (coverage.coverageExtent === PathHelper.CoverageExtent.FULLY_COVERED) {\n return true;\n } else if (coverage.coverageExtent === PathHelper.CoverageExtent.PARTLY_COVERED) {\n // We know that part of the property is covered, if we don't find any actual children not covered\n // by the paths it's because we're fully covered.\n if (this.isPrimitiveType()) {\n const childrenIds = this.getContext() === 'single' ? [] : this.getIds();\n for (const childId of childrenIds) {\n const childPath = PathHelper.getChildAbsolutePathCanonical(in_basePath, childId);\n if (PathHelper.getPathCoverage(childPath, coverage.pathList).coverageExtent === PathHelper.CoverageExtent.UNCOVERED) {\n // this children is outside the list of paths\n return false;\n }\n }\n } else {\n const childrenIds = this.getIds();\n for (const childId of childrenIds) {\n const child = this.get(childId);\n const childPath = PathHelper.getChildAbsolutePathCanonical(in_basePath, childId);\n if (!child._coveredByPaths(childPath, coverage.pathList)) {\n return false;\n }\n }\n }\n return true;\n }\n\n return false;\n }\n\n get _properties() {\n return this._flatten();\n }\n}\n\n(BaseProperty as any).prototype._isConstant = false;\n(BaseProperty as any).prototype._context = 'single';\n(BaseProperty as any).prototype._typeid = 'BaseProperty';\n"]}
|
|
1
|
+
{"version":3,"file":"baseProperty.js","sourceRoot":"","sources":["../../src/properties/baseProperty.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,4DAA4D;AAE5D,oDAAuB;AACvB,+EAKgD;AAChD,yEAA8E;AAC9E,iEAA0E;AAE1E,M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AS,GAAG,+BAAU,CAAC,6BAA6B,CACzD,WAAW,EACX,OAAO,CACP,CAAC;oBACF,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE;wBACzD,OAAO,KAAK,CAAC;qBACb;iBACD;aACD;YACD,OAAO,IAAI,CAAC;SACZ;QAED,OAAO,KAAK,CAAC;IACd,CAAC;IAED,IAAI,WAAW;QACd,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;;AAxtCF,oCAytCC;AA/qCO,iCAAoB,GAAG,oBAAoB,CAAC;AAC5C,iCAAoB,GAAG,oBAAoB,CAAC;AAC5C,wBAAW,GAAG,WAAW,CAAC;AA23BjC;;GAEG;AACI,4BAAe,GAAG,eAAe,CAAC;AAiTzC,YAAoB,CAAC,SAAS,CAAC,WAAW,GAAG,KAAK,CAAC;AACnD,YAAoB,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACnD,YAAoB,CAAC,SAAS,CAAC,OAAO,GAAG,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint accessor-pairs: [2, { \"getWithoutSet\": false }] */\n\nimport _ from \"lodash\";\nimport {\n\tChangeSet,\n\tPathHelper,\n\tSerializedChangeSet,\n\tTypeIdHelper,\n} from \"@fluid-experimental/property-changeset\";\nimport { ConsoleUtils, constants } from \"@fluid-experimental/property-common\";\nimport { LazyLoadedProperties as Property } from \"./lazyLoadedProperties\";\n\nconst { MSG, PROPERTY_PATH_DELIMITER } = constants;\nconst BREAK_TRAVERSAL = \"BREAK\";\n\n/**\n * Determines in which cases a reference will automatically be resolved\n */\nenum REFERENCE_RESOLUTION {\n\t/** The resolution will always automatically follow references */\n\tALWAYS,\n\t/** If a reference is the last entry during the path resolution, it will not automatically be resolved */\n\tNO_LEAFS,\n\t/** References are never automatically resolved */\n\tNEVER,\n}\n\n/**\n * Used to indicate the state of a property. These flags can be connected via OR.\n */\nenum MODIFIED_STATE_FLAGS {\n\t/** No changes to this property at the moment */\n\tCLEAN,\n\t/** The property is marked as changed in the currently pending ChangeSet */\n\tPENDING_CHANGE,\n\t/** The property has been modified and the result has not yet been reported to the application for scene updates */\n\tDIRTY,\n}\n\n/**\n * Token Types\n * @enum Object\n * Type of the token in the path string\n */\nconst PATH_TOKENS = {\n\t/** A / at the beginning of the path */\n\tROOT: { token: \"ROOT\" },\n\t/** A * that indicates a dereferencing operation */ // note: reversed!\n\tREF: { token: \"REF\" },\n\t/** A ../ that indicates one step above the current path */\n\tUP: { token: \"UP\" },\n};\n\ninterface IBasePropertyParams {\n\t/** id of the property */\n\tid?: string;\n\t/** The type unique identifier */\n\ttypeid?: string;\n\t/** The length of the property. Only valid if the property is an array, otherwise the length defaults to 1 */\n\tlength: number;\n\t/** The type of property this template represents i.e. single, array, map, set. */\n\tcontext: string;\n\n\t// TODO: UNUSED PARAMETER ??\n\t/** List of property templates that are used to define children properties */\n\tproperties: BaseProperty[];\n\n\t// TODO: UNUSED PARAMETER ??\n\t/** List of property template typeids that this PropertyTemplate inherits from */\n\tinherits: string[];\n}\n\ninterface ISerializeOptions {\n\t/** Only include dirty entries in the serialization */\n\tdirtyOnly?: boolean;\n\t/** Include the typeid of the root of the hierarchy */\n\tincludeRootTypeid?: boolean;\n\t/** The type of dirtiness to use when reporting dirty changes. */\n\tdirtinessType?: MODIFIED_STATE_FLAGS;\n\t/**\n\t * 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\tincludeReferencedRepositories?: boolean;\n}\n\n/**\n * The options to selectively create only a subset of a property.\n *\n * For now the filtering options are propagated by many functions, but are actually used only by\n * functions that create properties from schemas. It is then possible to create only a subset of\n * the properties of a schema by providing a restricted list of paths.\n *\n * Thus, with the filtering options, it is NOT possible to prevent a part of a ChangeSet from being\n * processed (in `applyChangeSet()` for example), it is NOT possible to prevent a property from being\n * created by a direct call to a function like `deserialize()` or `createProperty()`.\n */\nexport abstract class BaseProperty {\n\tprotected _id: string | undefined;\n\tprotected _isConstant: boolean;\n\tprotected _dirty: MODIFIED_STATE_FLAGS;\n\tprotected _typeid: string;\n\tprotected _context: string;\n\tprotected _parent: BaseProperty | undefined;\n\tprotected _noDirtyInBase: boolean;\n\n\t_tree: any;\n\t_checkoutView: any;\n\t_checkedOutRepositoryInfo: any;\n\n\tconstructor(in_params: IBasePropertyParams) {\n\t\t// Pre-conditions\n\t\t// This test has been disabled for performance reasons, if it would be incorrect,\n\t\t// the next line will throw anyways\n\t\t// ConsoleUtils.assert(in_params, MSG.PROP_CONSTRUCTOR_EXPECTS_OBJECTS);\n\n\t\tif (this._id !== in_params.id) {\n\t\t\tthis._id = in_params.id;\n\t\t}\n\n\t\t// Makes sure context value is fine\n\t\t// This assertion has been disabled for performance reasons. This is not a user facing\n\t\t// constructor function and therefore we rely on PropertyFactory to correctly provide the context.\n\t\t/* ConsoleUtils.assert(!in_params.context || in_params.context === this._context,\n MSG.CONTEXT_NOT_AS_EXPECTED + this._context + ' != ' + in_params.context); */\n\n\t\t// Sets typeid if default value is not fine\n\t\tlet typeId = in_params.typeid || \"BaseProperty\";\n\t\tif (typeId !== this._typeid) {\n\t\t\tthis._typeid = typeId;\n\t\t}\n\n\t\tthis._parent = undefined;\n\t\t// internal management\n\t\tif (!this._noDirtyInBase) {\n\t\t\tthis._dirty = MODIFIED_STATE_FLAGS.CLEAN;\n\t\t}\n\t}\n\n\tstatic MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS;\n\tstatic REFERENCE_RESOLUTION = REFERENCE_RESOLUTION;\n\tstatic PATH_TOKENS = PATH_TOKENS;\n\n\t/**\n\t * @returns The typeid of this property\n\t */\n\tgetTypeid(): string {\n\t\treturn this._typeid;\n\t}\n\n\t/**\n\t * @returns The context of this property\n\t */\n\tgetContext(): string {\n\t\treturn this._context;\n\t}\n\n\t/**\n\t * Get the scope to which this property belongs to.\n\t * @returns The guid representing the scope in which the\n\t * property belongs to\n\t */\n\tprotected _getScope(): string | undefined {\n\t\treturn this._parent ? this.getRoot()._getScope() : undefined;\n\t}\n\n\t/**\n\t * Returns the full property type identifier for the ChangeSet including the enum type id\n\t * @param in_hideCollection - if true the collection type (if applicable) will be omitted since that is not\n\t * applicable here, this param is ignored.\n\t * @returns The typeid\n\t */\n\tgetFullTypeid(in_hideCollection = false): string {\n\t\treturn this._typeid;\n\t}\n\n\t/**\n\t * Updates the parent for the property\n\t *\n\t * @param in_property - The parent property\n\t */\n\tprotected _setParent(in_property: BaseProperty) {\n\t\tthis._parent = in_property;\n\n\t\t// If the property is dirty but not its parent, dirty the parent. In cases like named properties\n\t\t// and default values, a parent is set after a value is set; we get a case where the\n\t\t// property is dirty but not its parent and the change is not included in a changeSet.\n\t\tif (this._parent && this._isDirty() && !this._parent._isDirty()) {\n\t\t\tthis._parent._setDirty(false, this);\n\t\t}\n\t}\n\n\t/**\n\t * Is this property the root of the property set tree?\n\t *\n\t * @returns True if it is a root, otherwise false.\n\t */\n\tisRoot(): boolean {\n\t\t// This checks, whether this is the root of a CheckOutView\n\t\t// (all other properties should have a parent property)\n\t\treturn this._parent === undefined;\n\t}\n\n\t/**\n\t * Is this property the ancestor of in_otherProperty?\n\t * Note: A property is not considered an ancestor of itself\n\t * @param in_otherProperty - possible descendant\n\t * @throws if in_otherProperty is not defined.\n\t * @returns True if it is a ancestor, otherwise false.\n\t */\n\tisAncestorOf(in_otherProperty: BaseProperty): boolean {\n\t\tConsoleUtils.assert(in_otherProperty, MSG.MISSING_IN_OTHERPROP);\n\t\tvar parent = in_otherProperty.getParent();\n\t\twhile (parent) {\n\t\t\tif (parent === this) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tparent = parent.getParent();\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Is this property the descendant of in_otherProperty?\n\t * Note: A property is not considered a descendant of itself\n\t * @param in_otherProperty - possible ancestor\n\t * @throws if in_otherProperty is not defined.\n\t * @returns True if it is a descendant, otherwise false.\n\t */\n\tisDescendantOf(in_otherProperty: BaseProperty): boolean {\n\t\tConsoleUtils.assert(in_otherProperty, MSG.MISSING_IN_OTHERPROP);\n\t\treturn in_otherProperty.isAncestorOf(this);\n\t}\n\n\t/**\n\t * Is this property a leaf node with regard to flattening?\n\t *\n\t * TODO: Which semantics should flattening have? It stops at primitive types and collections?\n\t *\n\t * @returns True if it is a leaf with regard to flattening\n\t */\n\t_isFlattenLeaf(): boolean {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Get the parent of this property\n\t *\n\t * @returns The parent of this property (or undefined if none exist)\n\t */\n\tgetParent(): BaseProperty | undefined {\n\t\treturn this._parent;\n\t}\n\n\t/**\n\t * checks whether the property is dynamic (only properties inherting from NodeProperty are)\n\t * @returns True if it is a dynamic property.\n\t */\n\tisDynamic() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Sets the property as dirty and/or pending. This will add one or both flags if not already set and will\n\t * do the same for its parent. This does not clear any flag, it only sets.\n\t *\n\t * @param in_reportToView - 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 * @param in_callingChild - The child which is dirtying its parent\n\t * @param in_flags - The flags to set.\n\t * @private\n\t */\n\t_setDirty(\n\t\tin_reportToView = true,\n\t\tin_callingChild: BaseProperty = undefined,\n\t\tin_flags: MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS.DIRTY |\n\t\t\tMODIFIED_STATE_FLAGS.PENDING_CHANGE,\n\t) {\n\t\tif (in_flags === undefined) {\n\t\t\tin_flags = MODIFIED_STATE_FLAGS.DIRTY | MODIFIED_STATE_FLAGS.PENDING_CHANGE;\n\t\t}\n\t\tvar reportToView = in_reportToView;\n\t\tif (reportToView === undefined) {\n\t\t\treportToView = true;\n\t\t}\n\t\t// We only update the flags upwards in the tree, when the corresponding nodes are not already flagged\n\t\tvar oldFlags = this._getDirtyFlags();\n\t\tif ((oldFlags & in_flags) !== in_flags) {\n\t\t\t// only dirty once until clean.\n\t\t\tthis._setDirtyFlags(oldFlags | in_flags);\n\n\t\t\t// Report dirtiness upwards in the hierarchy\n\t\t\tif (this._parent) {\n\t\t\t\tthis._parent._setDirty(reportToView, this, in_flags);\n\t\t\t\treportToView = false;\n\t\t\t}\n\t\t}\n\t\tif (reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Sets the dirty flags for this property\n\t * @param in_flags - The dirty flags\n\t */\n\t_setDirtyFlags(in_flags: MODIFIED_STATE_FLAGS) {\n\t\tthis._dirty = in_flags;\n\t}\n\n\t/**\n\t * Gets the dirty flags for this property\n\t * @returns The dirty flags\n\t */\n\t_getDirtyFlags(): MODIFIED_STATE_FLAGS {\n\t\treturn this._dirty;\n\t}\n\n\t/**\n\t * Helper function, which reports the fact that a property has been dirtied to the checkout view\n\t * @private\n\t */\n\t// TODO: Cleaner way to make the property tree aware of the DDS hosting it.\n\t// Currently, this._tree is set in SharedPropertyTree constructor.\n\t_reportDirtinessToView() {\n\t\t// eslint-disable-next-line @typescript-eslint/no-this-alias\n\t\tlet currentNode: BaseProperty = this;\n\n\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n\t\twhile (currentNode._parent) {\n\t\t\tcurrentNode = currentNode._parent;\n\t\t}\n\n\t\tif (\n\t\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n\t\t\tcurrentNode._tree &&\n\t\t\tcurrentNode._tree.notificationDelayScope === 0 &&\n\t\t\tcurrentNode._isDirty(BaseProperty.MODIFIED_STATE_FLAGS.DIRTY)\n\t\t) {\n\t\t\tcurrentNode._tree._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Modifies the property according to the given changeset\n\t *\n\t * @param in_changeSet - The changeset to apply\n\t * @param {property-properties.BaseProperty.PathFilteringOptions} [in_filteringOptions] - The filtering options to\n\t * consider while applying the ChangeSet.\n\t * @throws if in_changeSet is invalid.\n\t */\n\tapplyChangeSet(in_changeSet: SerializedChangeSet) {\n\t\tthis._checkIsNotReadOnly(false);\n\n\t\t// We just forward the call to the internal function\n\t\tthis._applyChangeset(in_changeSet, true);\n\t}\n\n\t/**\n\t * Modifies the property according to the given changeset\n\t *\n\t * Internal function.\n\t *\n\t * @param in_changeSet - The changeset to apply\n\t * @param in_reportToView - By default, the dirtying will always be reported to the checkout view and trigger a\n\t * modified event there. When batching updates, this can be prevented via this flag.\n\t * @param {property-properties.BaseProperty.PathFilteringOptions} [in_filteringOptions] - The filtering options to\n\t * consider while applying the ChangeSet. For now it is only used to control property creation, to prevent\n\t * properties from being created outside the checked out paths. It does not validate that a value inside the\n\t * ChangeSet is outside those paths.\n\t */\n\t_applyChangeset(\n\t\tin_changeSet: SerializedChangeSet,\n\t\tin_reportToView = true,\n\t\tin_filteringOptions = undefined,\n\t) {\n\t\tvar typeids = _.keys(in_changeSet);\n\t\tfor (const typeid of typeids) {\n\t\t\tif (ChangeSet.isReservedKeyword(typeid)) {\n\t\t\t\tcontinue; // Ignore the special keys\n\t\t\t}\n\n\t\t\tvar paths = _.keys(in_changeSet[typeid]);\n\t\t\tfor (const path of paths) {\n\t\t\t\tvar property = this.resolvePath(path, {\n\t\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t\t});\n\t\t\t\tif (property) {\n\t\t\t\t\tproperty._applyChangeset(in_changeSet[typeid][path], false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(MSG.INVALID_PATH + path);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Re-apply dirty flags from changesets\n\t *\n\t * Internal function.\n\t *\n\t * @param in_pendingChangeSet - The pending changeset to apply\n\t * @param in_dirtyChangeSet - The dirty changeset to apply\n\t * @throws if changeset arguments are invalid.\n\t */\n\t_reapplyDirtyFlags(\n\t\tin_pendingChangeSet: SerializedChangeSet,\n\t\tin_dirtyChangeSet: SerializedChangeSet,\n\t) {\n\t\tthis._checkIsNotReadOnly(false);\n\t\t// Here we must walk both changesets in parallel. Sometimes there will be only an entry in one\n\t\t// changeset, sometimes only one in the other changeset, sometimes one in both.\n\t\tconst typeids = _.keys(in_pendingChangeSet).concat(_.keys(in_dirtyChangeSet));\n\t\tfor (const typeid of typeids) {\n\t\t\tif (ChangeSet.isReservedKeyword(typeid)) {\n\t\t\t\tcontinue; // Ignore the special keys\n\t\t\t}\n\t\t\tconst pendingChangeSet = in_pendingChangeSet && in_pendingChangeSet[typeid];\n\t\t\tconst dirtyChangeSet = in_dirtyChangeSet && in_dirtyChangeSet[typeid];\n\n\t\t\tconst paths = _.keys(pendingChangeSet).concat(_.keys(dirtyChangeSet));\n\t\t\tfor (const path of paths) {\n\t\t\t\tlet property = this.resolvePath(path);\n\t\t\t\tif (property) {\n\t\t\t\t\tproperty._reapplyDirtyFlags(\n\t\t\t\t\t\tpendingChangeSet && pendingChangeSet[path],\n\t\t\t\t\t\tdirtyChangeSet && dirtyChangeSet[path],\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(MSG.INVALID_PATH + path);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected resolvePath(path: string, params?: any): BaseProperty {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\t/**\n\t * Removes the dirtiness flag from this property\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean.\n\t * If none are supplied all will be removed.\n\t * @private\n\t */\n\t_cleanDirty(in_flags) {\n\t\tthis._setDirtyFlags(\n\t\t\tin_flags === undefined ? MODIFIED_STATE_FLAGS.CLEAN : this._getDirtyFlags() & ~in_flags,\n\t\t);\n\t}\n\n\t/**\n\t * Removes the dirtiness flag from this property and recursively from all of its children\n\t *\n\t * @param in_flags - The flags to clean. If none are supplied all will be removed.\n\t */\n\tcleanDirty(in_flags: MODIFIED_STATE_FLAGS) {\n\t\tvar dirtyChildren = this._getDirtyChildren(in_flags);\n\t\tfor (const dirtyChild of dirtyChildren) {\n\t\t\tconst child = this.get(dirtyChild, {\n\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t});\n\t\t\tchild.cleanDirty(in_flags);\n\t\t\tchild._cleanDirty(in_flags);\n\t\t}\n\n\t\t// after all paths are clean, we are also clean!\n\t\tthis._cleanDirty(in_flags);\n\t}\n\n\t/**\n\t * Indicates that the property has been modified and a corresponding modified call has not yet been sent to the\n\t * application for runtime scene updates.\n\t *\n\t * @param in_dirtinessType - The type of dirtiness to check for. By default this is DIRTY\n\t * @returns Is the property dirty?\n\t */\n\t_isDirty(in_dirtinessType: MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS.DIRTY): boolean {\n\t\treturn !!(this._getDirtyFlags() & in_dirtinessType);\n\t}\n\n\t/**\n\t * Indicates that the property has been modified and a corresponding modified call has not yet been sent to the\n\t * application for runtime scene updates.\n\t *\n\t * @returns True if the property is dirty. False otherwise.\n\t */\n\tisDirty(): boolean {\n\t\treturn this._isDirty();\n\t}\n\n\t/**\n\t * The property has pending changes in the current ChangeSet.\n\t * @returns True if the property has pending changes. False otherwise.\n\t */\n\thasPendingChanges(): boolean {\n\t\treturn this._isDirty(MODIFIED_STATE_FLAGS.PENDING_CHANGE);\n\t}\n\n\t/**\n\t * Returns the ChangeSet of all sub-properties\n\t *\n\t * @returns The serialized changes\n\t */\n\tgetPendingChanges(): ChangeSet {\n\t\tvar serialized = this._serialize(\n\t\t\ttrue,\n\t\t\tfalse,\n\t\t\tBaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n\t\t);\n\t\treturn new ChangeSet(serialized);\n\t}\n\n\t/**\n\t * Get the id of this property\n\t *\n\t * @returns The id of the property\n\t */\n\tgetId(): string | undefined {\n\t\treturn this._id;\n\t}\n\n\t/**\n\t * Sets the checkedOutRepositoryInfo.\n\t * @param {property-properties.CheckoutView~CheckedOutRepositoryInfo} value - The checkedOut repository info.\n\t * @protected\n\t */\n\t_setCheckoutView(value) {\n\t\tthis._checkoutView = value;\n\t}\n\n\t/**\n\t * Returns the checkoutView\n\t * @return {property-properties.CheckoutView} - the checkout view\n\t */\n\t_getCheckoutView() {\n\t\tlet checkedOutRepositoryInfo = this._getCheckedOutRepositoryInfo();\n\t\treturn checkedOutRepositoryInfo ? checkedOutRepositoryInfo.getCheckoutView() : undefined;\n\t}\n\n\t/**\n\t * Returns the checkedOutRepositoryInfo.\n\t * @return {property-properties.CheckoutView~CheckedOutRepositoryInfo} The checkedOut repository info.\n\t * @protected\n\t */\n\t_getCheckedOutRepositoryInfo() {\n\t\tif (!this._parent) {\n\t\t\treturn this._checkedOutRepositoryInfo;\n\t\t} else {\n\t\t\treturn this.getRoot() ? this.getRoot()._getCheckedOutRepositoryInfo() : undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the Workspace\n\t * @returns The workspace containing the property.\n\t */\n\tgetWorkspace() {\n\t\tconst root = this.getRoot();\n\t\treturn root ? root._tree : undefined;\n\t}\n\n\t/**\n\t * Returns the path segment for a child\n\t *\n\t * @param in_childNode - The child for which the path is returned\n\t *\n\t * @returns The path segment to resolve the child property under this property\n\t */\n\t_getPathSegmentForChildNode(in_childNode: BaseProperty): string {\n\t\treturn PROPERTY_PATH_DELIMITER + PathHelper.quotePathSegmentIfNeeded(in_childNode.getId());\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 {property-properties.BaseProperty|undefined} The child property that has been resolved\n\t * @protected\n\t */\n\t_resolvePathSegment(in_segment: string, in_segmentType: PathHelper.TOKEN_TYPES) {\n\t\t// Base Properties only support paths separated via dots\n\t\tif (in_segmentType !== PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN) {\n\t\t\tthrow new Error(MSG.INVALID_PATH_TOKEN + in_segment);\n\t\t}\n\n\t\treturn this.get(in_segment, {\n\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t});\n\t}\n\n\t/**\n\t * Set the id of this property\n\t *\n\t * @param {string} in_id - The id for this property\n\t *\n\t * @return {string} the new id\n\t * @private\n\t */\n\t_setId(in_id) {\n\t\tif (!_.isString(in_id) && !_.isNumber(in_id)) {\n\t\t\tthrow new TypeError(MSG.ID_STRING_OR_NUMBER + in_id);\n\t\t}\n\n\t\tif (this._parent !== undefined) {\n\t\t\tthrow new Error(MSG.ID_CHANGE_FOR_PROPERTY_WITH_PARENT + this._id + \" to id: \" + in_id);\n\t\t}\n\n\t\tthis._id = String(in_id);\n\n\t\t// flush caches\n\t\tthis._setDirty();\n\n\t\treturn in_id;\n\t}\n\n\t/**\n\t * Return a clone of this property\n\t * @returns The cloned property\n\t */\n\tclone(): BaseProperty {\n\t\tconst PropertyFactory = Property.PropertyFactory;\n\t\tvar clone = PropertyFactory._createProperty(\n\t\t\tthis.getFullTypeid(),\n\t\t\tnull,\n\t\t\tundefined,\n\t\t\tthis._getScope(),\n\t\t\ttrue,\n\t\t);\n\n\t\t// TODO: this is not very efficient. Clone should be overriden\n\t\t// by the child classes\n\t\tclone.deserialize(this._serialize());\n\t\tclone.cleanDirty(\n\t\t\tBaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE |\n\t\t\t\tBaseProperty.MODIFIED_STATE_FLAGS.DIRTY,\n\t\t);\n\t\treturn clone;\n\t}\n\n\t/**\n\t * Returns true if the property is a primitive type\n\t * @return {boolean} true if the property is a primitive type\n\t */\n\tisPrimitiveType() {\n\t\treturn TypeIdHelper.isPrimitiveType(this._typeid);\n\t}\n\n\t/**\n\t * Get a flattened, tree like representation of this object and all of it's\n\t * descendants. The flattening will stop at primitive properties and collections.\n\t *\n\t * For non-leaf nodes, it is possible to access the corresponding node object itself via the\n\t * propertyNode member of the flattened representation (warning, this will overwrite a\n\t * property of this name).\n\t * TODO: Do we want to have this feature or is it to dangerous?\n\t *\n\t * @returns the flat representation\n\t */\n\tprivate _flatten(): object {\n\t\treturn { propertyNode: this };\n\t}\n\n\t/**\n\t * Repeatedly calls back the given function with human-readable string representations\n\t * of the property and of its sub-properties. By default it logs to the console.\n\t * If printFct is not a function, it will default to console.log\n\t * @param {function} [printFct=console.log] - Function to call for printing each property\n\t */\n\tprettyPrint(printFct) {\n\t\tif (typeof printFct !== \"function\") {\n\t\t\tprintFct = console.log;\n\t\t}\n\t\tthis._prettyPrint(\"\", \"\", printFct);\n\t}\n\n\t/**\n\t * Return a JSON representation of the properties and its children.\n\t * @return {object} A JSON representation of the properties and its children.\n\t * @private\n\t */\n\t_toJson() {\n\t\tvar json = {\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: [],\n\t\t};\n\n\t\tvar ids = this.getIds();\n\t\tfor (const id of ids) {\n\t\t\tjson.value.push(\n\t\t\t\tthis.get(id, {\n\t\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t\t})._toJson(),\n\t\t\t);\n\t\t}\n\n\t\treturn json;\n\t}\n\n\tgetIds(): string[] {\n\t\treturn [];\n\t}\n\n\tget(\n\t\tid: string,\n\t\tparams?: { referenceResolutionMode: REFERENCE_RESOLUTION },\n\t): BaseProperty | undefined {\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Repeatedly calls back the given function with human-readable string\n\t * representations of the property and of its sub-properties.\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\tvar context = \"\";\n\t\tswitch (this._context) {\n\t\t\tcase \"map\":\n\t\t\t\tcontext = \"Map of \";\n\t\t\t\tbreak;\n\t\t\tcase \"set\":\n\t\t\t\tcontext = \"Set of \";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\tprintFct(indent + externalId + this.getId() + \" (\" + context + this.getTypeid() + \"):\");\n\t\tthis._prettyPrintChildren(indent, printFct);\n\t}\n\n\t/**\n\t * Repeatedly calls back the given function with human-readable string\n\t * representations of the property's sub-properties.\n\t * @param {string} indent - Leading spaces to create the tree representation\n\t * @param {function} printFct - Function to call for printing each property\n\t */\n\t_prettyPrintChildren(indent, printFct) {\n\t\tindent += \" \";\n\t\tvar ids = this.getIds();\n\t\tfor (var i = 0; i < ids.length; i++) {\n\t\t\tthis.get(ids[i], {\n\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t})._prettyPrint(indent, \"\", printFct);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the possible paths from the given from_property to this property. If multiple paths\n\t * through multiple repository references are possible, returns more than one path.\n\t *\n\t * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed\n\t * @return {Array<string | undefined>} The paths between from_property and this property\n\t * will return an empty array if trying to get the path from a child repo to a parent repo.\n\t * @private\n\t */\n\t_getPathsThroughRepoRef(in_fromProperty) {\n\t\tvar paths = [];\n\t\tvar that = this;\n\t\tvar referenceProps = [];\n\t\t// get all reference properties in the referenceProps array\n\t\tthis._getCheckoutView()._forEachCheckedOutRepository(function (repoInfo) {\n\t\t\tvar keys = _.keys(repoInfo._referencedByPropertyInstanceGUIDs);\n\t\t\tfor (const key of keys) {\n\t\t\t\tif (key) {\n\t\t\t\t\tvar repoRef =\n\t\t\t\t\t\trepoInfo._referencedByPropertyInstanceGUIDs[key]\n\t\t\t\t\t\t\t._repositoryReferenceProperties[key].property;\n\t\t\t\t\tif (that.getRoot() === repoRef.getReferencedRepositoryRoot()) {\n\t\t\t\t\t\treferenceProps.push(repoRef);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// if no repo references point to the root of 'this', we can assume that 'this' is in the\n\t\t// parent repo, which cannot return a useful path.\n\t\tif (referenceProps.length === 0) {\n\t\t\tconsole.warn(MSG.NO_PATH_FROM_CHILD_REPO);\n\t\t\treturn [];\n\t\t}\n\n\t\t// path from root of the child repo to 'this'\n\t\tvar pathInChildRepo = this._getDirectPath(this.getRoot());\n\n\t\t// find possible paths from in_fromProperty to the referenceProps\n\t\t// concatenate each with pathInChildRepo\n\t\tfor (const referenceProp of referenceProps) {\n\t\t\tvar pathInParentRepo = referenceProp.getRelativePath(in_fromProperty);\n\t\t\tif (pathInParentRepo) {\n\t\t\t\tif (pathInChildRepo.length > 0) {\n\t\t\t\t\tpaths.push(pathInParentRepo + \".\" + pathInChildRepo);\n\t\t\t\t} else {\n\t\t\t\t\tpaths.push(pathInParentRepo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (paths.length > 0) {\n\t\t\treturn paths;\n\t\t}\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns the possible paths from the given in_fromProperty to this property. If no direct paths\n\t * exist, it returns an indirect path between the two properties.\n\t *\n\t * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed.\n\t * @return {string} The path between the given in_fromProperty and this property.\n\t * @private\n\t */\n\t_getIndirectPath(in_fromProperty) {\n\t\tvar path = [];\n\t\tvar that = this;\n\t\tvar foundPath = undefined;\n\n\t\tfoundPath = in_fromProperty.traverseUp(function (in_node) {\n\t\t\tpath.push(\"../\");\n\t\t\tif (in_node === that) {\n\t\t\t\treturn BREAK_TRAVERSAL;\n\t\t\t}\n\t\t\tvar directPath = that._getDirectPath(in_node);\n\t\t\tif (directPath) {\n\t\t\t\tpath.push(directPath);\n\t\t\t\treturn BREAK_TRAVERSAL;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t});\n\t\treturn foundPath === BREAK_TRAVERSAL ? path.join(\"\") : undefined;\n\t}\n\n\t/**\n\t * Returns the path from the given in_fromProperty to this property if a direct path\n\t * exists between the two properties. Otherwise returns undefined.\n\t *\n\t * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed.\n\t * @return {string} The path between the given in_fromProperty and this property.\n\t * @private\n\t */\n\t_getDirectPath(in_fromProperty) {\n\t\tvar path = [];\n\t\tvar foundAncestor = undefined;\n\t\tif (in_fromProperty === this) {\n\t\t\tfoundAncestor = BREAK_TRAVERSAL;\n\t\t} else if (this.getParent()) {\n\t\t\tpath.push(this.getParent()._getPathSegmentForChildNode(this));\n\n\t\t\tfoundAncestor = this.traverseUp(function (in_node) {\n\t\t\t\t// break where we meet the relative reference\n\t\t\t\tif (in_node === in_fromProperty) {\n\t\t\t\t\treturn BREAK_TRAVERSAL;\n\t\t\t\t}\n\n\t\t\t\tif (in_node.getParent()) {\n\t\t\t\t\tpath.push(in_node.getParent()._getPathSegmentForChildNode(in_node));\n\t\t\t\t}\n\n\t\t\t\treturn undefined;\n\t\t\t});\n\t\t}\n\n\t\tif (foundAncestor === BREAK_TRAVERSAL) {\n\t\t\tvar result = path.reverse().join(\"\");\n\n\t\t\t// We don't use a PROPERTY_PATH_DELIMITER at the start of the path\n\t\t\tif (result[0] === PROPERTY_PATH_DELIMITER) {\n\t\t\t\tresult = result.substr(1);\n\t\t\t}\n\t\t\treturn result;\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Returns the possible paths from the given in_fromProperty to this property.\n\t *\n\t * @param {property-properties.BaseProperty} in_fromProperty - The node from which the path is computed.\n\t * @return {Array<string>} The paths between the given in_fromProperty and this property.\n\t * @private\n\t */\n\t_getAllRelativePaths(in_fromProperty) {\n\t\tif (this.getRoot() !== in_fromProperty.getRoot()) {\n\t\t\t// if this and in_fromProperty have different roots, go through a repo ref\n\t\t\t// this is the case where we might have more than one path\n\t\t\treturn this._getPathsThroughRepoRef(in_fromProperty);\n\t\t} else {\n\t\t\tvar directPath = this._getDirectPath(in_fromProperty);\n\t\t\treturn directPath !== undefined\n\t\t\t\t? [directPath]\n\t\t\t\t: [this._getIndirectPath(in_fromProperty)];\n\t\t}\n\t}\n\n\t/**\n\t * Returns the path from the given fron_property to this node if such a path exists.\n\t * If more than one paths exist (as might be the case with multiple repository references\n\t * pointing to the same repository), it will return the first valid path found.\n\t * For example, if you have this structure:\n\t *\n\t * ```\n\t * <code>prop1\n\t * --prop2\n\t * ----prop3</code>\n\t * ```\n\t *\n\t * and call: `<code>prop1.getRelativePath(prop3);</code>`\n\t *\n\t * You will get the path from prop3 to prop1, which would be '../../'\n\t *\n\t * @param in_fromProperty - The property from which the path is computed.\n\t * @returns The path between the given in_fromProperty and this property.\n\t * @throws If in_fromProperty is not a property.\n\t */\n\tgetRelativePath(in_fromProperty: BaseProperty): string {\n\t\tConsoleUtils.assert(\n\t\t\tin_fromProperty instanceof BaseProperty,\n\t\t\tMSG.IN_FROMPROPERTY_MUST_BE_PROPERTY,\n\t\t);\n\t\tvar paths = this._getAllRelativePaths(in_fromProperty) || [];\n\t\tif (paths.length === 0) {\n\t\t\tconsole.warn(\n\t\t\t\tMSG.NO_PATH_BETWEEN +\n\t\t\t\t\tin_fromProperty.getAbsolutePath() +\n\t\t\t\t\t\" and \" +\n\t\t\t\t\tthis.getAbsolutePath(),\n\t\t\t);\n\t\t} else if (paths.length > 1) {\n\t\t\tconsole.warn(\n\t\t\t\tMSG.MORE_THAN_ONE_PATH +\n\t\t\t\t\tin_fromProperty.getAbsolutePath() +\n\t\t\t\t\t\" and \" +\n\t\t\t\t\tthis.getAbsolutePath(),\n\t\t\t);\n\t\t}\n\t\treturn paths[0];\n\t}\n\n\t/**\n\t * Returns the path from the root of the workspace to this node (including a slash at the beginning).\n\t *\n\t * @return {string} The path from the root\n\t */\n\tgetAbsolutePath() {\n\t\tvar that = this;\n\t\tvar referenceProps = [];\n\t\t// get all reference properties pointing to the root the repository containing 'this'\n\t\tif (this._getCheckoutView()) {\n\t\t\tthis._getCheckoutView()._forEachCheckedOutRepository(function (repoInfo) {\n\t\t\t\tvar keys = _.keys(repoInfo._referencedByPropertyInstanceGUIDs);\n\t\t\t\tfor (const key of keys) {\n\t\t\t\t\tif (key) {\n\t\t\t\t\t\tlet repoRef = repoInfo._referencedByPropertyInstanceGUIDs[key];\n\t\t\t\t\t\tlet refProperty = undefined;\n\n\t\t\t\t\t\tif (repoRef) {\n\t\t\t\t\t\t\trefProperty = repoRef._repositoryReferenceProperties[key]\n\t\t\t\t\t\t\t\t? repoRef._repositoryReferenceProperties[key].property\n\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet refRoot;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trefRoot = refProperty\n\t\t\t\t\t\t\t\t? refProperty.getReferencedRepositoryRoot()\n\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tconsole.warn(e.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (that.getRoot() === refRoot) {\n\t\t\t\t\t\t\treferenceProps.push(refProperty);\n\t\t\t\t\t\t\tbreak;\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\n\t\tvar path = this.isRoot() ? [] : [this.getParent()._getPathSegmentForChildNode(this)];\n\t\tthis.traverseUp(function (in_node) {\n\t\t\tif (in_node.getParent()) {\n\t\t\t\tpath.push(in_node.getParent()._getPathSegmentForChildNode(in_node));\n\t\t\t} else if (referenceProps.length > 0) {\n\t\t\t\t// recursively call getAbsolutePath, removing the '/' at the beginning of the path\n\t\t\t\tpath.push(referenceProps[0].getAbsolutePath(referenceProps[0].getRoot()).slice(1));\n\t\t\t}\n\t\t});\n\t\tvar absolutePath = path.reverse().join(\"\");\n\n\t\t// We don't use the property path separator at the start of the path\n\t\tif (absolutePath[0] === PROPERTY_PATH_DELIMITER) {\n\t\t\tabsolutePath = absolutePath.substr(1);\n\t\t}\n\t\tabsolutePath = \"/\" + absolutePath;\n\n\t\treturn absolutePath;\n\t}\n\n\t/**\n\t * Traverses the property hierarchy upwards until the a node without parent is reached\n\t *\n\t * @param {Function} in_callback - Callback to invoke for each of the parents. The traversal can be stopped\n\t * by returning BaseProperty.BREAK_TRAVERSAL\n\t * @throws if in_callback is not a function.\n\t * @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL, if the traversal didn't reach the root,\n\t * otherwise `undefined`.\n\t */\n\ttraverseUp(in_callback) {\n\t\tConsoleUtils.assert(_.isFunction(in_callback), MSG.CALLBACK_NOT_FCT);\n\t\tif (this._parent) {\n\t\t\tvar result = in_callback(this._parent);\n\t\t\treturn result !== BREAK_TRAVERSAL\n\t\t\t\t? this._parent.traverseUp(in_callback)\n\t\t\t\t: BREAK_TRAVERSAL;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * @type {string} Constant to stop the traversal in traverseUp and traverseDown functions\n\t */\n\tstatic BREAK_TRAVERSAL = BREAK_TRAVERSAL;\n\n\t/**\n\t * Returns all children which are dirty (this only returns direct children, it does not travers recursively)\n\t *\n\t * @param in_flags - Which types of dirtiness are we looking for? If none is given, all types are regarded as dirty.\n\t * @returns The list of keys identifying the dirty children.\n\t */\n\tprivate _getDirtyChildren(in_flags: MODIFIED_STATE_FLAGS): string[] {\n\t\treturn [];\n\t}\n\n\t/**\n\t * Returns the root of the property hierarchy\n\t * @returns The root property\n\t */\n\tgetRoot(): BaseProperty {\n\t\treturn this._parent ? this._parent.getRoot() : this;\n\t}\n\n\t/**\n\t * Traverses all children in the child hierarchy\n\t * TODO: How should this behave for collections?\n\t *\n\t * @param in_callback - Callback to invoke for every child\n\t * @param in_pathFromTraversalStart - Path from the root of the traversal to this node\n\t * @returns Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted, otherwise `undefined`.\n\t * @private\n\t */\n\t_traverse(in_callback: Function, in_pathFromTraversalStart: string): string | undefined {\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Deserialize takes a currently existing property and sets it to the hierarchy described in the normalized\n\t * ChangeSet passed as parameter. It will return a ChangeSet that describes the difference between the current state\n\t * of the property and the passed in normalized property\n\t *\n\t * @param in_serializedObj - The serialized changeset to apply to this node. This has to be a normalized change-set\n\t * (only containing insertions and property assignments. Deletes and Modify must not appear)\n\t * @param in_filteringOptions - The filtering options to consider while deserializing the property.\n\t * @param in_createChangeSet - Should a changeset be created for this deserialization?\n\t * @param in_reportToView - Usually the dirtying should be reported to the view and trigger a modified event there.\n\t * This can be prevented via this flag.\n\t * @throws if called on a read-only property.\n\t * @returns ChangeSet with the changes that actually were performed during the deserialization\n\t */\n\tdeserialize(\n\t\tin_serializedObj: SerializedChangeSet,\n\t\tin_filteringOptions = {},\n\t\tin_createChangeSet = true,\n\t\tin_reportToView = false,\n\t): SerializedChangeSet {\n\t\tthis._checkIsNotReadOnly(false);\n\t\treturn this._deserialize(\n\t\t\tin_serializedObj,\n\t\t\tin_reportToView,\n\t\t\tin_filteringOptions,\n\t\t\tin_createChangeSet,\n\t\t);\n\t}\n\n\t/**\n\t * Sets the property to the state in the given normalized changeset\n\t *\n\t * @param in_serializedObj - The serialized changeset to apply. This\n\t * has to be a normalized change-set (only containing inserts. Removes and Modifies are forbidden).\n\t * @param in_reportToView - Usually the dirtying should be reported to the view\n\t * and trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t * @param in_filteringOptions - The filtering options to consider while deserializing the property.\n\t * @param in_createChangeSet - Should a changeset be created for this deserialization?\n\t * @returns ChangeSet with the changes that actually were performed during the deserialization.\n\t */\n\t_deserialize(\n\t\tin_serializedObj: SerializedChangeSet,\n\t\tin_reportToView: boolean,\n\t\tin_filteringOptions = {},\n\t\tin_createChangeSet = true,\n\t): SerializedChangeSet {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Serialize the property into a changeSet\n\t *\n\t * @param in_dirtyOnly - Only include dirty entries in the serialization\n\t * @param in_includeRootTypeid - Include the typeid of the root of the hierarchy\n\t * @param in_dirtinessType - The type of dirtiness to use when reporting dirty changes. By default this is\n\t * `PENDING_CHANGE`.\n\t * @param in_includeReferencedRepositories - If this is set to true, the serialize\n\t * function will descend into referenced repositories.\n\t * WARNING: if there are loops in the references this can result in an infinite loop.\n\t *\n\t * @returns The serialized representation of this property\n\t */\n\t_serialize(\n\t\tin_dirtyOnly: boolean = false,\n\t\tin_includeRootTypeid: boolean = false,\n\t\tin_dirtinessType: MODIFIED_STATE_FLAGS = MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n\t\tin_includeReferencedRepositories: boolean = false,\n\t): object {\n\t\treturn {};\n\t}\n\n\t/**\n\t * Serialize the property\n\t *\n\t * @param in_options - Options for the serialization\n\t * @throws if in_options is defined but is not an object.\n\t * @returns The serialized representation of this property\n\t */\n\tserialize(in_options: ISerializeOptions) {\n\t\tvar opts = {\n\t\t\tdirtyOnly: false,\n\t\t\tincludeRootTypeid: false,\n\t\t\tdirtinessType: MODIFIED_STATE_FLAGS.PENDING_CHANGE,\n\t\t\tincludeReferencedRepositories: false,\n\t\t};\n\t\tif (in_options !== undefined) {\n\t\t\tif (typeof in_options !== \"object\") {\n\t\t\t\tthrow new TypeError(MSG.SERIALIZE_TAKES_OBJECT);\n\t\t\t}\n\t\t\tObject.assign(opts, in_options);\n\t\t}\n\n\t\treturn this._serialize(\n\t\t\topts.dirtyOnly,\n\t\t\topts.includeRootTypeid,\n\t\t\topts.dirtinessType,\n\t\t\topts.includeReferencedRepositories,\n\t\t);\n\t}\n\n\t/**\n\t * Indicate that all static members have been added to the property\n\t *\n\t * This function is invoked by the PropertyFactory once all static members have been added to the template\n\t * @protected\n\t */\n\t_signalAllStaticMembersHaveBeenAdded() {}\n\n\t/**\n\t * Tests whether this property may be modified\n\t * @param {checkConstant} in_checkConstant - Check if is readonly constant property\n\t */\n\t_checkIsNotReadOnly(in_checkConstant) {\n\t\tif (this._isConstant && in_checkConstant) {\n\t\t\tthrow new Error(MSG.MODIFICATION_OF_CONSTANT_PROPERTY);\n\t\t}\n\n\t\tvar root = this.getRoot();\n\t\tif (root && root._getCheckedOutRepositoryInfo) {\n\t\t\tvar repositoryInfo = root._getCheckedOutRepositoryInfo();\n\n\t\t\tif (repositoryInfo && repositoryInfo._isReadOnly()) {\n\t\t\t\tthrow new Error(MSG.MODIFICATION_OF_REFERENCED_PROPERTY);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Set a property and its children as constants (readonly properties)\n\t */\n\t_setAsConstant() {\n\t\tthis._isConstant = true;\n\n\t\tif (this instanceof Property.AbstractStaticCollectionProperty) {\n\t\t\t// Set all children properties as constants\n\t\t\tthis.traverseDown(function (prop) {\n\t\t\t\tprop._isConstant = true;\n\t\t\t});\n\t\t}\n\t}\n\n\ttraverseDown(arg0: (prop: any) => void) {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\t/**\n\t * Unsets a property and its children as constants\n\t */\n\t_unsetAsConstant() {\n\t\t// Deleting this property will make the object\n\t\t// fall back to the entry in the prototype (false)\n\t\tdelete this._isConstant;\n\n\t\tif (this instanceof Property.AbstractStaticCollectionProperty) {\n\t\t\t// Unset all children properties as constants\n\t\t\tthis.traverseDown(function (prop) {\n\t\t\t\t// Deleting this property will make the object\n\t\t\t\t// fall back to the entry in the prototype (false)\n\t\t\t\tdelete prop._isConstant;\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Dirties this node and all of its children\n\t *\n\t * @param in_reportToView - 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 * @private\n\t */\n\t_setDirtyTree(in_reportToView = true) {\n\t\tthis._traverse(function (node) {\n\t\t\t// Set all nodes to dirty, but prevent recursive updates up to the repository for the individual changes\n\t\t\tnode._setDirty(false);\n\t\t}, \"\");\n\t\t// Now make one report\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t}\n\n\t/**\n\t * Determines whether a property can be inserted as a child of another property\n\t * This does NOT validate if the parent can accept the child property, it only validates if\n\t * the child property can be inserted in the parent.\n\t * @param in_targetParent - The parent property\n\t * @throws if the property can not be inserted\n\t */\n\t_validateInsertIn(in_targetParent: BaseProperty) {\n\t\t// A root?\n\t\tif (this._getCheckedOutRepositoryInfo() !== undefined) {\n\t\t\tthrow new Error(MSG.INSERTED_ROOT_ENTRY);\n\t\t}\n\n\t\t// Would create a cycle?\n\t\tlet parent = in_targetParent;\n\t\twhile (parent !== undefined) {\n\t\t\tif (parent === this) {\n\t\t\t\tthrow new Error(MSG.INSERTED_IN_OWN_CHILDREN);\n\t\t\t}\n\t\t\tparent = parent._parent;\n\t\t}\n\n\t\t// Already a child?\n\t\tif (this._parent !== undefined || this._getCheckoutView() !== undefined) {\n\t\t\tthrow new Error(MSG.INSERTED_ENTRY_WITH_PARENT);\n\t\t}\n\t}\n\n\t/**\n\t * TODO: Remove it later. Kept not to modify tests\n\t *\n\t * Validates if the property and all its children are covered by the given list of paths.\n\t *\n\t * This function is expected to be used before inserting the property into its parent. That is the\n\t * reason for asking for the base path. This is the full path expected for this property.\n\t *\n\t * This function uses the canonical representation of the property paths.\n\t *\n\t * @param in_basePath - The property's absolute path in canonical form\n\t * @param in_paths - The array of paths that we wonder if it covers the property and its children\n\t * @returns If the property and all its children are included in the paths\n\t * @private\n\t */\n\t_coveredByPaths(in_basePath: string, in_paths: string[]): boolean {\n\t\t// First, get the coverage of the base property\n\t\tconst coverage = PathHelper.getPathCoverage(in_basePath, in_paths);\n\n\t\tif (coverage.coverageExtent === PathHelper.CoverageExtent.FULLY_COVERED) {\n\t\t\treturn true;\n\t\t} else if (coverage.coverageExtent === PathHelper.CoverageExtent.PARTLY_COVERED) {\n\t\t\t// We know that part of the property is covered, if we don't find any actual children not covered\n\t\t\t// by the paths it's because we're fully covered.\n\t\t\tif (this.isPrimitiveType()) {\n\t\t\t\tconst childrenIds = this.getContext() === \"single\" ? [] : this.getIds();\n\t\t\t\tfor (const childId of childrenIds) {\n\t\t\t\t\tconst childPath = PathHelper.getChildAbsolutePathCanonical(\n\t\t\t\t\t\tin_basePath,\n\t\t\t\t\t\tchildId,\n\t\t\t\t\t);\n\t\t\t\t\tif (\n\t\t\t\t\t\tPathHelper.getPathCoverage(childPath, coverage.pathList).coverageExtent ===\n\t\t\t\t\t\tPathHelper.CoverageExtent.UNCOVERED\n\t\t\t\t\t) {\n\t\t\t\t\t\t// this children is outside the list of paths\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst childrenIds = this.getIds();\n\t\t\t\tfor (const childId of childrenIds) {\n\t\t\t\t\tconst child = this.get(childId);\n\t\t\t\t\tconst childPath = PathHelper.getChildAbsolutePathCanonical(\n\t\t\t\t\t\tin_basePath,\n\t\t\t\t\t\tchildId,\n\t\t\t\t\t);\n\t\t\t\t\tif (!child._coveredByPaths(childPath, coverage.pathList)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tget _properties() {\n\t\treturn this._flatten();\n\t}\n}\n\n(BaseProperty as any).prototype._isConstant = false;\n(BaseProperty as any).prototype._context = \"single\";\n(BaseProperty as any).prototype._typeid = \"BaseProperty\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolProperty.d.ts","sourceRoot":"","sources":["../../src/properties/boolProperty.js"],"names":[],"mappings":"AAYA;;GAEG;AACH;
|
|
1
|
+
{"version":3,"file":"boolProperty.d.ts","sourceRoot":"","sources":["../../src/properties/boolProperty.js"],"names":[],"mappings":"AAYA;;GAEG;AACH;IACC;;OAEG;IACH,4BAIC;IAIF,6CAAmC;CAHlC"}
|
|
@@ -8,8 +8,8 @@ exports.BoolProperty = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* @fileoverview Definition of the BooleanProperty class
|
|
10
10
|
*/
|
|
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 boolean value
|
|
15
15
|
*/
|
|
@@ -24,6 +24,6 @@ class BoolProperty extends ValueProperty {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
exports.BoolProperty = BoolProperty;
|
|
27
|
-
BoolProperty.prototype._typeid =
|
|
27
|
+
BoolProperty.prototype._typeid = "Bool";
|
|
28
28
|
BoolProperty.prototype._castFunctor = _castFunctors.Boolean;
|
|
29
29
|
//# sourceMappingURL=boolProperty.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolProperty.js","sourceRoot":"","sources":["../../src/properties/boolProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;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,YAAa,SAAQ,aAAa;
|
|
1
|
+
{"version":3,"file":"boolProperty.js","sourceRoot":"","sources":["../../src/properties/boolProperty.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;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,YAAa,SAAQ,aAAa;IAC9C;;OAEG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,4CAA4C;QAC5C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACpB,CAAC;CACD;AATD,oCASC;AAED,YAAY,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC;AACxC,YAAY,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview Definition of the BooleanProperty class\n */\n\nconst { ValueProperty } = require(\"./valueProperty\");\nconst { _castFunctors } = require(\"./primitiveTypeCasts\");\n\n/**\n * A primitive property for a boolean value\n */\nexport class BoolProperty extends ValueProperty {\n\t/**\n\t * @param in_params - the parameters\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\t\t// default for this property type is 'false'\n\t\tthis._data = false;\n\t}\n}\n\nBoolProperty.prototype._typeid = \"Bool\";\nBoolProperty.prototype._castFunctor = _castFunctors.Boolean;\n"]}
|
|
@@ -82,14 +82,14 @@ export class ContainerProperty extends IndexedCollectionBaseProperty {
|
|
|
82
82
|
*/
|
|
83
83
|
getDynamicIds(): Array<string>;
|
|
84
84
|
/**
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
85
|
+
* Returns an Object with all the dynamic children of this node property.
|
|
86
|
+
*
|
|
87
|
+
* WARNING: This is a direct access to the internal data-structure and the collection MUST NOT be modified. It is
|
|
88
|
+
* read only for fast access and iteration. Insertion and deletion MUST be done via the insert and remove functions
|
|
89
|
+
* of this class.
|
|
90
|
+
*
|
|
91
|
+
* @return {Object<String, property-properties.MapProperty~MapValueType>} The map with all entries in the map.
|
|
92
|
+
*/
|
|
93
93
|
_getDynamicChildrenReadOnly(): any;
|
|
94
94
|
}
|
|
95
95
|
import { IndexedCollectionBaseProperty } from "./indexedCollectionBaseProperty";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerProperty.d.ts","sourceRoot":"","sources":["../../src/properties/containerProperty.js"],"names":[],"mappings":"AAgBA;;GAEG;AACH;
|
|
1
|
+
{"version":3,"file":"containerProperty.d.ts","sourceRoot":"","sources":["../../src/properties/containerProperty.js"],"names":[],"mappings":"AAgBA;;GAEG;AACH;IASG,sBAA2B;IAC3B,qBAA0B;IA4B5B;;;;;OAKG;IACH,0BAMC;IAED;;;;;;;;;;;;;;OAcG;IACH,2CAkCC;IAED;;;;;;;;OAQG;IACH,iCANW,MAAM,eACN,MAAM,QAkBhB;IAgBD;;;;;;;OAOG;IACH,mCAcC;IAED;;;;;;;OAOG;IACH,iCALW,MAAM,QAchB;IAED;;;OAGG;IACH,cAGC;IA+CD;;;;;;;OAOG;IACH,+EAEC;IAcD;;;;OAIG;IACH,gBAFY,MAAO,MAAM,CAAC,CAIzB;IAED;;;;OAIG;IACH,iBAFY,MAAO,MAAM,CAAC,CAIzB;IAED;;;;;;;;OAQG;IACH,mCAEC;CAmCD"}
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.ContainerProperty = void 0;
|
|
8
8
|
/**
|
|
9
|
-
* @fileoverview This file contains the implementation of the ContainerProperty class
|
|
10
|
-
*/
|
|
11
|
-
const { MSG } = require(
|
|
12
|
-
const { ConsoleUtils } = require(
|
|
13
|
-
const _ = require(
|
|
14
|
-
const { validationsEnabled } = require(
|
|
15
|
-
const { AbstractStaticCollectionProperty } = require(
|
|
16
|
-
const { BaseProperty } = require(
|
|
17
|
-
const { IndexedCollectionBaseProperty } = require(
|
|
9
|
+
* @fileoverview This file contains the implementation of the ContainerProperty class
|
|
10
|
+
*/
|
|
11
|
+
const { MSG } = require("@fluid-experimental/property-common").constants;
|
|
12
|
+
const { ConsoleUtils } = require("@fluid-experimental/property-common");
|
|
13
|
+
const _ = require("underscore");
|
|
14
|
+
const { validationsEnabled } = require("../enableValidations");
|
|
15
|
+
const { AbstractStaticCollectionProperty } = require("./abstractStaticCollectionProperty");
|
|
16
|
+
const { BaseProperty } = require("./baseProperty");
|
|
17
|
+
const { IndexedCollectionBaseProperty } = require("./indexedCollectionBaseProperty");
|
|
18
18
|
/**
|
|
19
19
|
* A property object that allows to add child properties dynamically.
|
|
20
20
|
*/
|
|
@@ -35,7 +35,9 @@ class ContainerProperty extends IndexedCollectionBaseProperty {
|
|
|
35
35
|
* @return {Array.<string>} An array of all the property ids
|
|
36
36
|
*/
|
|
37
37
|
_getIds() {
|
|
38
|
-
return AbstractStaticCollectionProperty.prototype._getIds
|
|
38
|
+
return AbstractStaticCollectionProperty.prototype._getIds
|
|
39
|
+
.call(this)
|
|
40
|
+
.concat(Object.keys(this._dynamicChildren));
|
|
39
41
|
}
|
|
40
42
|
/**
|
|
41
43
|
* Returns the sub-property having the given name in this property.
|
|
@@ -45,7 +47,8 @@ class ContainerProperty extends IndexedCollectionBaseProperty {
|
|
|
45
47
|
* @return {property-properties.BaseProperty | undefined} The property you seek or undefined if none is found.
|
|
46
48
|
*/
|
|
47
49
|
_get(in_id) {
|
|
48
|
-
return AbstractStaticCollectionProperty.prototype._get.call(this, in_id) ||
|
|
50
|
+
return (AbstractStaticCollectionProperty.prototype._get.call(this, in_id) ||
|
|
51
|
+
this._dynamicChildren[in_id]);
|
|
49
52
|
}
|
|
50
53
|
/**
|
|
51
54
|
* Adds an optional child to list of possible optional children.
|
|
@@ -79,12 +82,12 @@ class ContainerProperty extends IndexedCollectionBaseProperty {
|
|
|
79
82
|
if (in_property === undefined) {
|
|
80
83
|
// If no id is passed, the property is passed as first parameter
|
|
81
84
|
in_property = in_id;
|
|
82
|
-
ConsoleUtils.assert(in_property instanceof BaseProperty,
|
|
85
|
+
ConsoleUtils.assert(in_property instanceof BaseProperty, "insert error: " + MSG.NOT_A_PROPERTY);
|
|
83
86
|
}
|
|
84
87
|
else {
|
|
85
88
|
ConsoleUtils.assert(_.isString(in_id) || _.isNumber(in_id), MSG.ID_STRING_OR_NUMBER);
|
|
86
89
|
ConsoleUtils.assert(!_.isString(in_id) || !_.isEmpty(in_id), MSG.ID_SHOULD_NOT_BE_EMPTY_STRING);
|
|
87
|
-
ConsoleUtils.assert(in_property instanceof BaseProperty,
|
|
90
|
+
ConsoleUtils.assert(in_property instanceof BaseProperty, "insert error: " + MSG.NOT_A_PROPERTY);
|
|
88
91
|
if (this._dynamicChildren[in_id] !== undefined) {
|
|
89
92
|
throw new Error(MSG.PROPERTY_ALREADY_EXISTS + in_id);
|
|
90
93
|
}
|
|
@@ -114,8 +117,10 @@ class ContainerProperty extends IndexedCollectionBaseProperty {
|
|
|
114
117
|
throw new Error(MSG.CANNOT_INSERT_UNKNOWN_PROPERTY + in_id);
|
|
115
118
|
}
|
|
116
119
|
if (this._optionalChildren[in_id].toUpperCase() !== in_property.getTypeid().toUpperCase()) {
|
|
117
|
-
throw new Error(MSG.MISMATCHING_PROPERTY_TYPEID +
|
|
118
|
-
|
|
120
|
+
throw new Error(MSG.MISMATCHING_PROPERTY_TYPEID +
|
|
121
|
+
this._optionalChildren[in_id] +
|
|
122
|
+
" instead it's: " +
|
|
123
|
+
in_property.getTypeid());
|
|
119
124
|
}
|
|
120
125
|
}
|
|
121
126
|
/**
|
|
@@ -127,7 +132,9 @@ class ContainerProperty extends IndexedCollectionBaseProperty {
|
|
|
127
132
|
return this.getRoot()._getScope();
|
|
128
133
|
}
|
|
129
134
|
else {
|
|
130
|
-
return this._checkedOutRepositoryInfo
|
|
135
|
+
return this._checkedOutRepositoryInfo
|
|
136
|
+
? this._checkedOutRepositoryInfo.getScope()
|
|
137
|
+
: undefined;
|
|
131
138
|
}
|
|
132
139
|
}
|
|
133
140
|
/**
|
|
@@ -164,7 +171,7 @@ class ContainerProperty extends IndexedCollectionBaseProperty {
|
|
|
164
171
|
if (!this._dynamicChildren[in_id]) {
|
|
165
172
|
const error = this._staticChildren[in_id] !== undefined
|
|
166
173
|
? new Error(MSG.CANNOT_REMOVE_NON_OPTIONAL_PROP + in_id)
|
|
167
|
-
: new Error(
|
|
174
|
+
: new Error(MSG.REMOVING_NON_EXISTING_KEY + in_id);
|
|
168
175
|
throw error;
|
|
169
176
|
}
|
|
170
177
|
}
|
|
@@ -252,14 +259,14 @@ class ContainerProperty extends IndexedCollectionBaseProperty {
|
|
|
252
259
|
return Object.keys(this._dynamicChildren);
|
|
253
260
|
}
|
|
254
261
|
/**
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
262
|
+
* Returns an Object with all the dynamic children of this node property.
|
|
263
|
+
*
|
|
264
|
+
* WARNING: This is a direct access to the internal data-structure and the collection MUST NOT be modified. It is
|
|
265
|
+
* read only for fast access and iteration. Insertion and deletion MUST be done via the insert and remove functions
|
|
266
|
+
* of this class.
|
|
267
|
+
*
|
|
268
|
+
* @return {Object<String, property-properties.MapProperty~MapValueType>} The map with all entries in the map.
|
|
269
|
+
*/
|
|
263
270
|
_getDynamicChildrenReadOnly() {
|
|
264
271
|
return this._dynamicChildren;
|
|
265
272
|
}
|
|
@@ -299,7 +306,7 @@ class ContainerProperty extends IndexedCollectionBaseProperty {
|
|
|
299
306
|
}
|
|
300
307
|
}
|
|
301
308
|
exports.ContainerProperty = ContainerProperty;
|
|
302
|
-
ContainerProperty.prototype._typeid =
|
|
309
|
+
ContainerProperty.prototype._typeid = "ContainerProperty";
|
|
303
310
|
ContainerProperty.prototype._dynamicChildren = {};
|
|
304
311
|
ContainerProperty.prototype._optionalChildren = {};
|
|
305
312
|
//# sourceMappingURL=containerProperty.js.map
|