@fluid-experimental/property-properties 1.0.0 → 1.1.0-76254

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/properties/arrayProperty.d.ts.map +1 -1
  2. package/dist/properties/arrayProperty.js +6 -4
  3. package/dist/properties/arrayProperty.js.map +1 -1
  4. package/dist/properties/baseProperty.js +2 -2
  5. package/dist/properties/baseProperty.js.map +1 -1
  6. package/dist/properties/enumArrayProperty.js +8 -8
  7. package/dist/properties/enumArrayProperty.js.map +1 -1
  8. package/dist/properties/intProperties.d.ts +0 -1
  9. package/dist/properties/intProperties.d.ts.map +1 -1
  10. package/dist/properties/intProperties.js +0 -1
  11. package/dist/properties/intProperties.js.map +1 -1
  12. package/dist/properties/mapProperty.js +2 -2
  13. package/dist/properties/mapProperty.js.map +1 -1
  14. package/dist/properties/referenceArrayProperty.js +1 -1
  15. package/dist/properties/referenceArrayProperty.js.map +1 -1
  16. package/dist/properties/referenceMapProperty.js +1 -1
  17. package/dist/properties/referenceMapProperty.js.map +1 -1
  18. package/dist/properties/referenceProperty.js +1 -1
  19. package/dist/properties/referenceProperty.js.map +1 -1
  20. package/dist/properties/valueArrayProperty.js +2 -2
  21. package/dist/properties/valueArrayProperty.js.map +1 -1
  22. package/dist/test/tsconfig.tsbuildinfo +1 -1
  23. package/lib/properties/arrayProperty.d.ts.map +1 -1
  24. package/lib/properties/arrayProperty.js +6 -4
  25. package/lib/properties/arrayProperty.js.map +1 -1
  26. package/lib/properties/baseProperty.js +2 -2
  27. package/lib/properties/baseProperty.js.map +1 -1
  28. package/lib/properties/enumArrayProperty.js +8 -8
  29. package/lib/properties/enumArrayProperty.js.map +1 -1
  30. package/lib/properties/intProperties.d.ts +0 -1
  31. package/lib/properties/intProperties.d.ts.map +1 -1
  32. package/lib/properties/intProperties.js +0 -1
  33. package/lib/properties/intProperties.js.map +1 -1
  34. package/lib/properties/mapProperty.js +2 -2
  35. package/lib/properties/mapProperty.js.map +1 -1
  36. package/lib/properties/referenceArrayProperty.js +1 -1
  37. package/lib/properties/referenceArrayProperty.js.map +1 -1
  38. package/lib/properties/referenceMapProperty.js +1 -1
  39. package/lib/properties/referenceMapProperty.js.map +1 -1
  40. package/lib/properties/referenceProperty.js +1 -1
  41. package/lib/properties/referenceProperty.js.map +1 -1
  42. package/lib/properties/valueArrayProperty.js +2 -2
  43. package/lib/properties/valueArrayProperty.js.map +1 -1
  44. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"baseProperty.js","sourceRoot":"","sources":["../../src/properties/baseProperty.ts"],"names":[],"mappings":";;;;;;AAAA;;;GAGG;AACH,4DAA4D;AAC5D,oDAAuB;AACvB,+EAKgD;AAChD,yEAA8E;AAC9E,iEAA0E;AAE1E,MAAM,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,2BAAS,CAAC;AACnD,MAAM,eAAe,GAAG,OAAO,CAAC;AAEhC;;GAEG;AACH,IAAK,oBAOJ;AAPD,WAAK,oBAAoB;IACrB,iEAAiE;IACjE,mEAAM,CAAA;IACN,yGAAyG;IACzG,uEAAQ,CAAA;IACR,kDAAkD;IAClD,iEAAK,CAAA;AACT,CAAC,EAPI,oBAAoB,KAApB,oBAAoB,QAOxB;AAED;;IAEI;AACJ,IAAK,oBAOJ;AAPD,WAAK,oBAAoB;IACrB,gDAAgD;IAChD,iEAAK,CAAA;IACL,2EAA2E;IAC3E,mFAAc,CAAA;IACd,mHAAmH;IACnH,iEAAK,CAAA;AACT,CAAC,EAPI,oBAAoB,KAApB,oBAAoB,QAOxB;AAED;;;;GAIG;AACH,MAAM,WAAW,GAAG;IAChB,uCAAuC;IACvC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;IACzB,mDAAmD,CAAC,kBAAkB;IACtE,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;IACvB,2DAA2D;IAC3D,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;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AK,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/* eslint accessor-pairs: [2, { \"getWithoutSet\": false }] */\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 *\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 if (this._parent) {\n return this.getRoot()._getScope();\n } else {\n return undefined;\n }\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\n * since that is not 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\n * 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 // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\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]\n * The filtering options to 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\n * and trigger a modified event there. When batching updates, this\n * can be prevented via this flag.\n * @param {property-properties.BaseProperty.PathFilteringOptions} [in_filteringOptions]\n * The filtering options to consider while applying the ChangeSet. For now it is only used to\n * control property creation, to prevent properties from being created outside the checked out\n * paths. It does not validate that a value inside the 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, if none are supplied all\n * 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\n * 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 Error(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.\n * 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\n * 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\n * 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 if (foundPath === BREAK_TRAVERSAL) {\n return path.join('');\n } else {\n return undefined;\n }\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\n * 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\n * 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 if (directPath !== undefined) {\n return [directPath];\n } else {\n return [this._getIndirectPath(in_fromProperty)];\n }\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 * <code>prop1\n * --prop2\n * ----prop3</code>\n * and call: <code>prop1.getRelativePath(prop3);</code>\n * You will get the path from prop3 to prop1, which would be '../../'\n * @param in_fromProperty - The property from which the\n * 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\n * (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 if (result !== BREAK_TRAVERSAL) {\n return this._parent.traverseUp(in_callback);\n } else {\n return BREAK_TRAVERSAL;\n }\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?\n * If none is given, all types are regarded as\n * 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,\n * 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\n * current state of the property and the passed in normalized property\n *\n * @param in_serializedObj - The serialized changeset to apply to this node. This\n * has to be a normalized change-set (only containing insertions and property assignments. Deletes and Modify\n * must not appear)\n * @param in_filteringOptions\n * The filtering options to consider while deserializing the property.\n * @param in_createChangeSet\n * Should a changeset be created for this deserialization?\n * @param in_reportToView\n * Usually the dirtying should be reported to the view and trigger a modified\n * event there. 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\n * 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\n * The filtering options to consider while deserializing the property.\n * @param in_createChangeSet\n * Should a changeset be created for this deserialization?\n * @returns ChangeSet with the changes that actually were performed during the\n * 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 -\n * 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. WARNING: if there are loops in the references\n * 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 Error(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\n * 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;AACH,4DAA4D;AAC5D,oDAAuB;AACvB,+EAKgD;AAChD,yEAA8E;AAC9E,iEAA0E;AAE1E,MAAM,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,2BAAS,CAAC;AACnD,MAAM,eAAe,GAAG,OAAO,CAAC;AAEhC;;GAEG;AACH,IAAK,oBAOJ;AAPD,WAAK,oBAAoB;IACrB,iEAAiE;IACjE,mEAAM,CAAA;IACN,yGAAyG;IACzG,uEAAQ,CAAA;IACR,kDAAkD;IAClD,iEAAK,CAAA;AACT,CAAC,EAPI,oBAAoB,KAApB,oBAAoB,QAOxB;AAED;;IAEI;AACJ,IAAK,oBAOJ;AAPD,WAAK,oBAAoB;IACrB,gDAAgD;IAChD,iEAAK,CAAA;IACL,2EAA2E;IAC3E,mFAAc,CAAA;IACd,mHAAmH;IACnH,iEAAK,CAAA;AACT,CAAC,EAPI,oBAAoB,KAApB,oBAAoB,QAOxB;AAED;;;;GAIG;AACH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C;;AAzrCL,oCA0rCC;AAhpCU,iCAAoB,GAAG,oBAAoB,CAAC;AAC5C,iCAAoB,GAAG,oBAAoB,CAAC;AAC5C,wBAAW,GAAG,WAAW,CAAC;AA61BjC;;GAEG;AACI,4BAAe,GAAG,eAAe,CAAC;AAgT5C,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/* eslint accessor-pairs: [2, { \"getWithoutSet\": false }] */\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 *\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 if (this._parent) {\n return this.getRoot()._getScope();\n } else {\n return undefined;\n }\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\n * since that is not 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\n * 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 // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\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]\n * The filtering options to 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\n * and trigger a modified event there. When batching updates, this\n * can be prevented via this flag.\n * @param {property-properties.BaseProperty.PathFilteringOptions} [in_filteringOptions]\n * The filtering options to consider while applying the ChangeSet. For now it is only used to\n * control property creation, to prevent properties from being created outside the checked out\n * paths. It does not validate that a value inside the 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, if none are supplied all\n * 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\n * 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.\n * 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\n * 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\n * 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 if (foundPath === BREAK_TRAVERSAL) {\n return path.join('');\n } else {\n return undefined;\n }\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\n * 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\n * 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 if (directPath !== undefined) {\n return [directPath];\n } else {\n return [this._getIndirectPath(in_fromProperty)];\n }\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 * <code>prop1\n * --prop2\n * ----prop3</code>\n * and call: <code>prop1.getRelativePath(prop3);</code>\n * You will get the path from prop3 to prop1, which would be '../../'\n * @param in_fromProperty - The property from which the\n * 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\n * (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 if (result !== BREAK_TRAVERSAL) {\n return this._parent.traverseUp(in_callback);\n } else {\n return BREAK_TRAVERSAL;\n }\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?\n * If none is given, all types are regarded as\n * 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,\n * 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\n * current state of the property and the passed in normalized property\n *\n * @param in_serializedObj - The serialized changeset to apply to this node. This\n * has to be a normalized change-set (only containing insertions and property assignments. Deletes and Modify\n * must not appear)\n * @param in_filteringOptions\n * The filtering options to consider while deserializing the property.\n * @param in_createChangeSet\n * Should a changeset be created for this deserialization?\n * @param in_reportToView\n * Usually the dirtying should be reported to the view and trigger a modified\n * event there. 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\n * 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\n * The filtering options to consider while deserializing the property.\n * @param in_createChangeSet\n * Should a changeset be created for this deserialization?\n * @returns ChangeSet with the changes that actually were performed during the\n * 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 -\n * 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. WARNING: if there are loops in the references\n * 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\n * 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"]}
@@ -71,10 +71,10 @@ class EnumArrayProperty extends ValueArrayProperty {
71
71
  */
72
72
  insertRange(in_offset, in_array) {
73
73
  if (!_.isNumber(in_offset)) {
74
- throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.insertRange or .insert');
74
+ throw new TypeError(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.insertRange or .insert');
75
75
  }
76
76
  if (!_.isArray(in_array)) {
77
- throw new Error(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.insertRange');
77
+ throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.insertRange');
78
78
  }
79
79
  var internalValueArray = [];
80
80
  var that = this;
@@ -92,7 +92,7 @@ class EnumArrayProperty extends ValueArrayProperty {
92
92
  */
93
93
  set(in_index, in_value) {
94
94
  if (!_.isNumber(in_value) && !_.isString(in_value)) {
95
- throw new Error(MSG.VALUE_STRING_OR_NUMBER + in_value);
95
+ throw new TypeError(MSG.VALUE_STRING_OR_NUMBER + in_value);
96
96
  }
97
97
  this.setRange(in_index, [in_value]);
98
98
  }
@@ -117,10 +117,10 @@ class EnumArrayProperty extends ValueArrayProperty {
117
117
  */
118
118
  setRange(in_offset, in_array) {
119
119
  if (!_.isNumber(in_offset)) {
120
- throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.setRange or .set');
120
+ throw new TypeError(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.setRange or .set');
121
121
  }
122
122
  if (!_.isArray(in_array)) {
123
- throw new Error(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.setRange');
123
+ throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.setRange');
124
124
  }
125
125
  var internalValueArray = [];
126
126
  var that = this;
@@ -139,7 +139,7 @@ class EnumArrayProperty extends ValueArrayProperty {
139
139
  var internalValue = this._dataArrayRef.getValue(in_position);
140
140
  var resultEntry = this._enumDictionary.enumEntriesByValue[internalValue];
141
141
  if (!resultEntry) {
142
- throw new Error(MSG.UNKNOWN_ENUM + internalValue);
142
+ throw new TypeError(MSG.UNKNOWN_ENUM + internalValue);
143
143
  }
144
144
  else {
145
145
  return resultEntry.id;
@@ -155,10 +155,10 @@ class EnumArrayProperty extends ValueArrayProperty {
155
155
  */
156
156
  getEnumStrings(in_offset, in_length) {
157
157
  if (!_.isNumber(in_offset)) {
158
- throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.getEnumStrings');
158
+ throw new TypeError(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.getEnumStrings');
159
159
  }
160
160
  if (!_.isNumber(in_length)) {
161
- throw new Error(MSG.NOT_NUMBER + 'in_length, method: EnumArray.getEnumStrings');
161
+ throw new TypeError(MSG.NOT_NUMBER + 'in_length, method: EnumArray.getEnumStrings');
162
162
  }
163
163
  var result = [];
164
164
  for (var i = 0; i < in_length; i++) {
@@ -1 +1 @@
1
- {"version":3,"file":"enumArrayProperty.js","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AAC3E,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACzE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE/D;;;;;;GAMG;AACH,MAAa,iBAAkB,SAAQ,kBAAkB;IACrD;;;;;;;;;OASG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,uEAAuE;QACvE,kEAAkE;QAClE,iCAAiC;QACjC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;IACrD,CAAC;IAED;;;;;;OAMG;IACH,2BAA2B,CAAC,QAAQ;QAChC,8BAA8B;QAC9B,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACtB,IAAI,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;YAClE,IAAI,CAAC,YAAY,EAAE;gBACf,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC,CAAC;aAChD;YACD,OAAO,YAAY,CAAC,KAAK,CAAC;SAC7B;aAAM;YACH,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE;gBACpD,MAAM,IAAI,KA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gBAAgB;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAChD,CAAC;CACJ;AArMD,8CAqMC;AACD,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { TypeIdHelper } = require('@fluid-experimental/property-changeset');\nconst { BaseDataArray } = require('@fluid-experimental/property-common');\nconst _ = require('lodash');\nconst { ValueArrayProperty } = require('./valueArrayProperty');\n\n/**\n * This class is a specialized version of the ArrayProperty for enums.\n * Since we internally represent enums as Int32Array this is much more\n * efficient and convenient. Additionally, we provide direct access\n * methods to the enums in the array, e.g. .getEnumString(3) directly\n * returns the enum string at position 3 of the array\n */\nexport class EnumArrayProperty extends ValueArrayProperty {\n /**\n * @param {Object} in_params - the parameters\n * @param {Number=} [in_params.length=0] the length of the array, if applicable\n * @param {Object} in_params._enumDictionary the value<->enum dictonary needed to convert the values\n * @constructor\n * @protected\n * @extends property-properties.ValueArrayProperty\n * @alias property-properties.EnumArrayProperty\n * @category Arrays\n */\n constructor(in_params) {\n super(in_params);\n // whenever an EnumProperty is created by the PropertyFactory, we get a\n // dictonary [value->enum] and [enum->value] to efficiently lookup\n // values/enums for the property.\n this._enumDictionary = in_params._enumDictionary;\n }\n\n /**\n * Since an enum can be identified by its value and its enum string,\n * we have to check/convert the type here. We also check if a value\n * is suitable for this enum type.\n * @param {number|string} in_value value to be checked/converted\n * @return {number} internal value for this enum type\n */\n _convertEnumToInternalValue(in_value) {\n // check if we've got a string\n if (_.isString(in_value)) {\n var internalEnum = this._enumDictionary.enumEntriesById[in_value];\n if (!internalEnum) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n }\n return internalEnum.value;\n } else {\n if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n } else {\n return in_value;\n }\n }\n }\n\n /**\n * inserts the content of a given array into the array property\n * @param {number} in_offset target index\n * @param {Array<*>} in_array the array to be inserted\n * @throws if in_array is not an array\n * @throws if in_position is not a number\n * @throws if a value to be inserted is an instance of BaseProperty\n * @throws if tyring to modify a referenced property.\n */\n insertRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.insertRange or .insert');\n }\n if (!_.isArray(in_array)) {\n throw new Error(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.insertRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function(element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.insertRange.call(this, in_offset, internalValueArray);\n }\n\n /**\n * Sets the content of an enum in an enum array\n * @param {number} in_index target index\n * @param {*} in_value the value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n set(in_index, in_value) {\n if (!_.isNumber(in_value) && !_.isString(in_value)) {\n throw new Error(MSG.VALUE_STRING_OR_NUMBER + in_value);\n }\n this.setRange(in_index, [in_value]);\n }\n\n /**\n * Sets the content of an enum in an enum array. Alternative syntax to .set()\n * @param {number} in_index target index\n * @param {*} in_value the value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n setEnumByString(in_index, in_value) {\n this.set(in_index, in_value);\n }\n\n /**\n * sets the array properties elements to the content of the given array\n * all changed elements must already exist\n * @param {number} in_offset target start index\n * @param {Array<*>} in_array contains the elements to be set\n * @throws if in_offset is not a number\n * @throws if in_array is not an array\n *\n */\n setRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.setRange or .set');\n }\n if (!_.isArray(in_array)) {\n throw new Error(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.setRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function(element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.setRange.call(this, in_offset, internalValueArray);\n }\n\n /**\n * get the array element at a given index\n * @param {number} in_position the target index\n * @throws if no entry exists at in_position\n * @return {string} the enum string at that index\n */\n getEnumString(in_position) {\n var internalValue = this._dataArrayRef.getValue(in_position);\n var resultEntry = this._enumDictionary.enumEntriesByValue[internalValue];\n if (!resultEntry) {\n throw new Error(MSG.UNKNOWN_ENUM + internalValue);\n } else {\n return resultEntry.id;\n }\n }\n\n /**\n * get an array of the enum strings starting at a given index\n * @param {number} in_offset the start index\n * @param {number} in_length how many should be read\n * @throws if in_offset or in_length are not numbers\n * @throws if no entry exists at one of the positions\n * @return {Array<string>} the enum strings we asked for\n */\n getEnumStrings(in_offset, in_length) {\n if (!_.isNumber(in_offset)) {\n throw new Error(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.getEnumStrings');\n }\n if (!_.isNumber(in_length)) {\n throw new Error(MSG.NOT_NUMBER + 'in_length, method: EnumArray.getEnumStrings');\n }\n\n var result = [];\n for (var i = 0; i < in_length; i++) {\n result.push(this.getEnumString(i + in_offset));\n }\n return result;\n }\n\n /**\n * Returns the full property type identifier for the ChangeSet including the enum type id\n * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted\n * @return {string} The typeid\n */\n getFullTypeid(in_hideCollection = false) {\n if (in_hideCollection) {\n return TypeIdHelper.createSerializationTypeId(this._typeid, '', true);\n } else {\n return TypeIdHelper.createSerializationTypeId(this._typeid, 'array', true);\n }\n }\n\n /**\n * @inheritdoc\n */\n getValues() {\n var result = [];\n for (var i = 0; i < this._dataArrayRef.length; i++) {\n var child = this._dataArrayRef.getValue(i);\n result.push(child);\n }\n return result;\n }\n\n /**\n * Creates and initializes the data array\n * @param {Number} in_length the initial length of the array\n */\n _dataArrayCreate(in_length) {\n this._dataArrayRef = new BaseDataArray(Int32Array, in_length);\n }\n\n /**\n * let the user to query all valid entries of an enum array property\n * @return {{}} all valid (string) entries and their (int) values\n */\n getValidEnumList() {\n return this._enumDictionary.enumEntriesById;\n }\n}\nEnumArrayProperty.prototype._typeid = 'Enum';\n"]}
1
+ {"version":3,"file":"enumArrayProperty.js","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC;AACzE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AAC3E,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACzE,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE/D;;;;;;GAMG;AACH,MAAa,iBAAkB,SAAQ,kBAAkB;IACrD;;;;;;;;;OASG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,uEAAuE;QACvE,kEAAkE;QAClE,iCAAiC;QACjC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;IACrD,CAAC;IAED;;;;;;OAMG;IACH,2BAA2B,CAAC,QAAQ;QAChC,8BAA8B;QAC9B,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACtB,IAAI,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;YAClE,IAAI,CAAC,YAAY,EAAE;gBACf,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC,CAAC;aAChD;YACD,OAAO,YAAY,CAAC,KAAK,CAAC;SAC7B;aAAM;YACH,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,QAAQ,CAA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AClE,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;IAChD,CAAC;CACJ;AArMD,8CAqMC;AACD,iBAAiB,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst { MSG } = require('@fluid-experimental/property-common').constants;\nconst { TypeIdHelper } = require('@fluid-experimental/property-changeset');\nconst { BaseDataArray } = require('@fluid-experimental/property-common');\nconst _ = require('lodash');\nconst { ValueArrayProperty } = require('./valueArrayProperty');\n\n/**\n * This class is a specialized version of the ArrayProperty for enums.\n * Since we internally represent enums as Int32Array this is much more\n * efficient and convenient. Additionally, we provide direct access\n * methods to the enums in the array, e.g. .getEnumString(3) directly\n * returns the enum string at position 3 of the array\n */\nexport class EnumArrayProperty extends ValueArrayProperty {\n /**\n * @param {Object} in_params - the parameters\n * @param {Number=} [in_params.length=0] the length of the array, if applicable\n * @param {Object} in_params._enumDictionary the value<->enum dictonary needed to convert the values\n * @constructor\n * @protected\n * @extends property-properties.ValueArrayProperty\n * @alias property-properties.EnumArrayProperty\n * @category Arrays\n */\n constructor(in_params) {\n super(in_params);\n // whenever an EnumProperty is created by the PropertyFactory, we get a\n // dictonary [value->enum] and [enum->value] to efficiently lookup\n // values/enums for the property.\n this._enumDictionary = in_params._enumDictionary;\n }\n\n /**\n * Since an enum can be identified by its value and its enum string,\n * we have to check/convert the type here. We also check if a value\n * is suitable for this enum type.\n * @param {number|string} in_value value to be checked/converted\n * @return {number} internal value for this enum type\n */\n _convertEnumToInternalValue(in_value) {\n // check if we've got a string\n if (_.isString(in_value)) {\n var internalEnum = this._enumDictionary.enumEntriesById[in_value];\n if (!internalEnum) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n }\n return internalEnum.value;\n } else {\n if (!this._enumDictionary.enumEntriesByValue[in_value]) {\n throw new Error(MSG.UNKNOWN_ENUM + in_value);\n } else {\n return in_value;\n }\n }\n }\n\n /**\n * inserts the content of a given array into the array property\n * @param {number} in_offset target index\n * @param {Array<*>} in_array the array to be inserted\n * @throws if in_array is not an array\n * @throws if in_position is not a number\n * @throws if a value to be inserted is an instance of BaseProperty\n * @throws if tyring to modify a referenced property.\n */\n insertRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new TypeError(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.insertRange or .insert');\n }\n if (!_.isArray(in_array)) {\n throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.insertRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function(element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.insertRange.call(this, in_offset, internalValueArray);\n }\n\n /**\n * Sets the content of an enum in an enum array\n * @param {number} in_index target index\n * @param {*} in_value the value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n set(in_index, in_value) {\n if (!_.isNumber(in_value) && !_.isString(in_value)) {\n throw new TypeError(MSG.VALUE_STRING_OR_NUMBER + in_value);\n }\n this.setRange(in_index, [in_value]);\n }\n\n /**\n * Sets the content of an enum in an enum array. Alternative syntax to .set()\n * @param {number} in_index target index\n * @param {*} in_value the value to set\n * @throws if in_value is not a string or number\n * @throws if in_index is either smaller than zero, larger than the length of the array or not a number.\n */\n setEnumByString(in_index, in_value) {\n this.set(in_index, in_value);\n }\n\n /**\n * sets the array properties elements to the content of the given array\n * all changed elements must already exist\n * @param {number} in_offset target start index\n * @param {Array<*>} in_array contains the elements to be set\n * @throws if in_offset is not a number\n * @throws if in_array is not an array\n *\n */\n setRange(in_offset, in_array) {\n if (!_.isNumber(in_offset)) {\n throw new TypeError(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.setRange or .set');\n }\n if (!_.isArray(in_array)) {\n throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + 'EnumArrayProperty.setRange');\n }\n\n var internalValueArray = [];\n var that = this;\n _.each(in_array, function(element) {\n internalValueArray.push(that._convertEnumToInternalValue(element));\n });\n ValueArrayProperty.prototype.setRange.call(this, in_offset, internalValueArray);\n }\n\n /**\n * get the array element at a given index\n * @param {number} in_position the target index\n * @throws if no entry exists at in_position\n * @return {string} the enum string at that index\n */\n getEnumString(in_position) {\n var internalValue = this._dataArrayRef.getValue(in_position);\n var resultEntry = this._enumDictionary.enumEntriesByValue[internalValue];\n if (!resultEntry) {\n throw new TypeError(MSG.UNKNOWN_ENUM + internalValue);\n } else {\n return resultEntry.id;\n }\n }\n\n /**\n * get an array of the enum strings starting at a given index\n * @param {number} in_offset the start index\n * @param {number} in_length how many should be read\n * @throws if in_offset or in_length are not numbers\n * @throws if no entry exists at one of the positions\n * @return {Array<string>} the enum strings we asked for\n */\n getEnumStrings(in_offset, in_length) {\n if (!_.isNumber(in_offset)) {\n throw new TypeError(MSG.NOT_NUMBER + 'in_offset, method: EnumArray.getEnumStrings');\n }\n if (!_.isNumber(in_length)) {\n throw new TypeError(MSG.NOT_NUMBER + 'in_length, method: EnumArray.getEnumStrings');\n }\n\n var result = [];\n for (var i = 0; i < in_length; i++) {\n result.push(this.getEnumString(i + in_offset));\n }\n return result;\n }\n\n /**\n * Returns the full property type identifier for the ChangeSet including the enum type id\n * @param {boolean} [in_hideCollection=false] - if true the collection type (if applicable) will be omitted\n * @return {string} The typeid\n */\n getFullTypeid(in_hideCollection = false) {\n if (in_hideCollection) {\n return TypeIdHelper.createSerializationTypeId(this._typeid, '', true);\n } else {\n return TypeIdHelper.createSerializationTypeId(this._typeid, 'array', true);\n }\n }\n\n /**\n * @inheritdoc\n */\n getValues() {\n var result = [];\n for (var i = 0; i < this._dataArrayRef.length; i++) {\n var child = this._dataArrayRef.getValue(i);\n result.push(child);\n }\n return result;\n }\n\n /**\n * Creates and initializes the data array\n * @param {Number} in_length the initial length of the array\n */\n _dataArrayCreate(in_length) {\n this._dataArrayRef = new BaseDataArray(Int32Array, in_length);\n }\n\n /**\n * let the user to query all valid entries of an enum array property\n * @return {{}} all valid (string) entries and their (int) values\n */\n getValidEnumList() {\n return this._enumDictionary.enumEntriesById;\n }\n}\nEnumArrayProperty.prototype._typeid = 'Enum';\n"]}
@@ -23,7 +23,6 @@ export class Integer64Property extends ValueProperty {
23
23
  * @protected
24
24
  * @extends property-properties.ValueProperty
25
25
  * @alias property-properties.Integer64Property
26
- * @protected
27
26
  * @abstract
28
27
  * @category Value Properties
29
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"intProperties.d.ts","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":"AAsBA;IAiBA,kBAAmC;CAFlC;AAID;;GAEG;AACH;IAgBA,kBAAoC;CAFnC;AAID;;GAEG;AACH;IAgBA,kBAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;;;OASG;IACH,wBAKC;IAHG,qBAAsC;IAiC1C;;OAEG;IACH,gBAFY,MAAM,CAIjB;IAED;;OAEG;IACH,eAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,sBAJW,MAAM,GAEL,OAAO,CAYlB;IAED;;;;OAIG;IACH,oBAJW,MAAM,GAEL,OAAO,CAYlB;IA4DD;;;;;;OAMG;IACH,oBAJW,MAAM,GAEL,MAAM,CAIjB;IAED;;;;;;;;;;OAUG;IACH,sBARW,MAAM,aACN,MAAM,QAahB;CACJ;AAED;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAqC;CAFpC"}
1
+ {"version":3,"file":"intProperties.d.ts","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":"AAsBA;IAiBA,kBAAmC;CAFlC;AAID;;GAEG;AACH;IAgBA,kBAAoC;CAFnC;AAID;;GAEG;AACH;IAgBA,kBAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;;OAQG;IACH,wBAKC;IAHG,qBAAsC;IAiC1C;;OAEG;IACH,gBAFY,MAAM,CAIjB;IAED;;OAEG;IACH,eAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,sBAJW,MAAM,GAEL,OAAO,CAYlB;IAED;;;;OAIG;IACH,oBAJW,MAAM,GAEL,OAAO,CAYlB;IA4DD;;;;;;OAMG;IACH,oBAJW,MAAM,GAEL,MAAM,CAIjB;IAED;;;;;;;;;;OAUG;IACH,sBARW,MAAM,aACN,MAAM,QAahB;CACJ;AAED;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAqC;CAFpC"}
@@ -86,7 +86,6 @@ class Integer64Property extends ValueProperty {
86
86
  * @protected
87
87
  * @extends property-properties.ValueProperty
88
88
  * @alias property-properties.Integer64Property
89
- * @protected
90
89
  * @abstract
91
90
  * @category Value Properties
92
91
  */
@@ -1 +1 @@
1
- {"version":3,"file":"intProperties.js","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH,4BAA4B;AAC5B;;GAEG;;;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACxE,MAAM,EACF,YAAY,EACZ,SAAS,EAAE,EAAE,GAAG,EAAE,EAClB,MAAM,EACN,KAAK,GACR,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D,MAAM,KAAK,GAAG,UAAU,CAAC;AAEzB,MAAa,YAAa,SAAQ,aAAa;IAC3C;;;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AAG,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEjD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;QACtC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;IACxC,CAAC;CACJ;AArLD,8CAqLC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,iBAAiB;IAChD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACJ;AAZD,sCAYC;AACD,aAAa,CAAC,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1C,aAAa,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC;AAE3D;;GAEG;AACH,MAAa,cAAe,SAAQ,iBAAiB;IACjD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC7B,CAAC;CACJ;AAZD,wCAYC;AACD,cAAc,CAAC,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;AAC5C,cAAc,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/* eslint-disable new-cap */\n/**\n * @fileoverview Definition of the Int*Property classes\n */\n\nconst _ = require('lodash');\nconst { ChangeSet } = require('@fluid-experimental/property-changeset');\nconst {\n ConsoleUtils,\n constants: { MSG },\n Uint64,\n Int64,\n} = require('@fluid-experimental/property-common');\nconst { ValueProperty } = require('./valueProperty');\nconst { _castFunctors } = require('./primitiveTypeCasts');\n\nconst BIT32 = 4294967296;\n\nexport class Int8Property extends ValueProperty {\n /**\n * A primitive property for an signed 8 bit integer value.\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int8Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt8Property.prototype._typeid = 'Int8';\nInt8Property.prototype._castFunctor = _castFunctors.Int8;\n\n/**\n * A primitive property for an signed 16 bit integer value.\n */\nexport class Int16Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int16Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt16Property.prototype._typeid = 'Int16';\nInt16Property.prototype._castFunctor = _castFunctors.Int16;\n\n/**\n * A primitive property for an signed 32 bit integer value.\n */\nexport class Int32Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int32Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt32Property.prototype._typeid = 'Int32';\nInt32Property.prototype._castFunctor = _castFunctors.Int32;\n\n/**\n * A primitive property base class for big integer values.\n */\nexport class Integer64Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Integer64Property\n * @protected\n * @abstract\n * @category Value Properties\n */\n constructor(in_params, dataConstructor) {\n super(in_params);\n this.DataConstructor = dataConstructor;\n // default for this property type is '0, 0'\n this._data = new this.DataConstructor();\n }\n\n /**\n * Internal function to update the value of the Integer64Property\n *\n * @param {Int64|String|Number} in_value the new value\n * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout view\n * and trigger a modified event there. When batching updates, this\n * can be prevented via this flag.\n * @return {boolean} true if the value was actually changed\n * @throws if in_value is a string that contains characters other than numbers\n */\n _setValue(in_value, in_reportToView) {\n var oldLowValue = this._data.getValueLow();\n var oldHighValue = this._data.getValueHigh();\n\n in_value = this._castFunctor(in_value);\n\n var newHighValue = in_value.getValueHigh();\n var newLowValue = in_value.getValueLow();\n\n var changed = oldHighValue !== newHighValue || oldLowValue !== newLowValue;\n\n if (changed) {\n this._data = in_value.clone();\n this._setDirty(in_reportToView);\n }\n return changed;\n }\n\n /**\n * @return {number} the higher 32 bit integer part\n */\n getValueHigh() {\n return this._data.getValueHigh();\n }\n\n /**\n * @return {number} the lower 32 bit integer part\n */\n getValueLow() {\n return this._data.getValueLow();\n }\n\n /**\n * @param {number} in_high set the higher 32 bit integer part\n * @throws if in_high is not a number\n * @return {boolean} true if the value was actually changed\n */\n setValueHigh(in_high) {\n ConsoleUtils.assert(_.isNumber(in_high), MSG.IN_HIGH_MUST_BE_NUMBER + in_high);\n var changed = this._data.getValueHigh() !== in_high;\n\n if (changed) {\n var newData = new this.DataConstructor(this.getValueLow(), in_high);\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @param {number} in_low set the lower 32 bit integer part\n * @throws if in_low is not a number\n * @return {boolean} true if the value was actually changed\n */\n setValueLow(in_low) {\n ConsoleUtils.assert(_.isNumber(in_low), MSG.IN_LOW_MUST_BE_NUMBER + in_low);\n var changed = this._data.getValueLow() !== in_low;\n\n if (changed) {\n var newData = new this.DataConstructor(in_low, this.getValueHigh());\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @inheritdoc\n */\n _deserialize(in_serializedObj, in_reportToView,\n in_filteringOptions, in_createChangeSet) {\n if (ChangeSet.isEmptyChangeSet(in_serializedObj)) {\n return undefined;\n } else {\n ConsoleUtils.assert(_.isArray(in_serializedObj) && in_serializedObj.length === 2, MSG.INVALID_INT64_CHANGESET);\n var readValue = new this.DataConstructor(in_serializedObj[0], in_serializedObj[1]);\n var changed = this._setValue(readValue, in_reportToView);\n return changed ? this.serialize() : undefined;\n }\n }\n\n /**\n * @inheritdoc\n */\n _applyChangeset(in_changeSet, in_reportToView, in_filteringOptions) {\n if (!ChangeSet.isEmptyChangeSet(in_changeSet)) {\n if (!_.isArray(in_changeSet)) {\n in_changeSet = in_changeSet.value;\n }\n ConsoleUtils.assert(_.isArray(in_changeSet) && in_changeSet.length === 2, MSG.INVALID_INT64_CHANGESET);\n var newVal = new this.DataConstructor(in_changeSet[0], in_changeSet[1]);\n this._setValue(newVal, in_reportToView);\n }\n }\n\n /**\n * Serialize the property\n *\n * @param {boolean} in_dirtyOnly -\n * Only include dirty entries in the serialization\n * @param {boolean} in_includeRootTypeid -\n * Include the typeid of the root of the hierarchy - has no effect for value properties\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] -\n * The type of dirtiness to use when reporting dirty changes. By default this is\n * PENDING_CHANGE * @return {*} The serialized representation of this property\n * @param {boolean} [in_includeReferencedRepositories=false] - 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 * @return {*} The serialized representation of this property\n * @private\n */\n _serialize(in_dirtyOnly, in_includeRootTypeid,\n in_dirtinessType, in_includeReferencedRepositories) {\n if (in_dirtyOnly) {\n if (this._isDirty(in_dirtinessType)) {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n } else {\n return {};\n }\n } else {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n }\n }\n\n /**\n * The toString() method returns a string representing the specified Integer64 object.\n *\n * @param {number} [in_radix = 10] An integer between 2 and 36 specifying\n * the base to use for representing numeric values.\n * @return {string} A string representing the specified Integer64 object.\n */\n toString(in_radix) {\n return this._data.toString(in_radix);\n }\n\n /**\n * The Integer64.fromString() method parses a string argument updates object's lower and higher 32 bit integer parts.\n *\n * @param {string} in_string The value to parse. Leading whitespace in the string argument is ignored.\n * @param {number} [in_radix = 10] An integer between 2 and 36 that represents the\n * radix (the base in mathematical numeral systems) of the above mentioned string.\n * @throws if in_string is not a string\n * @throws if in_radix is entered but is not a number between 2 and 36\n * @throws if the property is a Uint64 property and in_string is a negative number\n * @throws if in_string contains characters other than numbers\n */\n fromString(in_string, in_radix) {\n ConsoleUtils.assert(_.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);\n var int = this._castFunctor(in_string, in_radix);\n\n this.setValueHigh(int.getValueHigh());\n this.setValueLow(int.getValueLow());\n }\n}\n\n/**\n * A primitive property class for big signed integer values.\n */\nexport class Int64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Int64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Int64);\n }\n}\nInt64Property.prototype._typeid = 'Int64';\nInt64Property.prototype._castFunctor = _castFunctors.Int64;\n\n/**\n * A primitive property class for big unsingned integer values.\n */\nexport class Uint64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Uint64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Uint64);\n }\n}\nUint64Property.prototype._typeid = 'Uint64';\nUint64Property.prototype._castFunctor = _castFunctors.Uint64;\n"]}
1
+ {"version":3,"file":"intProperties.js","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH,4BAA4B;AAC5B;;GAEG;;;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACxE,MAAM,EACF,YAAY,EACZ,SAAS,EAAE,EAAE,GAAG,EAAE,EAClB,MAAM,EACN,KAAK,GACR,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D,MAAM,KAAK,GAAG,UAAU,CAAC;AAEzB,MAAa,YAAa,SAA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QACrF,IAAI,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEjD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;QACtC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;IACxC,CAAC;CACJ;AApLD,8CAoLC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,iBAAiB;IAChD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACJ;AAZD,sCAYC;AACD,aAAa,CAAC,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1C,aAAa,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC;AAE3D;;GAEG;AACH,MAAa,cAAe,SAAQ,iBAAiB;IACjD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC7B,CAAC;CACJ;AAZD,wCAYC;AACD,cAAc,CAAC,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;AAC5C,cAAc,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/* eslint-disable new-cap */\n/**\n * @fileoverview Definition of the Int*Property classes\n */\n\nconst _ = require('lodash');\nconst { ChangeSet } = require('@fluid-experimental/property-changeset');\nconst {\n ConsoleUtils,\n constants: { MSG },\n Uint64,\n Int64,\n} = require('@fluid-experimental/property-common');\nconst { ValueProperty } = require('./valueProperty');\nconst { _castFunctors } = require('./primitiveTypeCasts');\n\nconst BIT32 = 4294967296;\n\nexport class Int8Property extends ValueProperty {\n /**\n * A primitive property for an signed 8 bit integer value.\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int8Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt8Property.prototype._typeid = 'Int8';\nInt8Property.prototype._castFunctor = _castFunctors.Int8;\n\n/**\n * A primitive property for an signed 16 bit integer value.\n */\nexport class Int16Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int16Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt16Property.prototype._typeid = 'Int16';\nInt16Property.prototype._castFunctor = _castFunctors.Int16;\n\n/**\n * A primitive property for an signed 32 bit integer value.\n */\nexport class Int32Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int32Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt32Property.prototype._typeid = 'Int32';\nInt32Property.prototype._castFunctor = _castFunctors.Int32;\n\n/**\n * A primitive property base class for big integer values.\n */\nexport class Integer64Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Integer64Property\n * @abstract\n * @category Value Properties\n */\n constructor(in_params, dataConstructor) {\n super(in_params);\n this.DataConstructor = dataConstructor;\n // default for this property type is '0, 0'\n this._data = new this.DataConstructor();\n }\n\n /**\n * Internal function to update the value of the Integer64Property\n *\n * @param {Int64|String|Number} in_value the new value\n * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout view\n * and trigger a modified event there. When batching updates, this\n * can be prevented via this flag.\n * @return {boolean} true if the value was actually changed\n * @throws if in_value is a string that contains characters other than numbers\n */\n _setValue(in_value, in_reportToView) {\n var oldLowValue = this._data.getValueLow();\n var oldHighValue = this._data.getValueHigh();\n\n in_value = this._castFunctor(in_value);\n\n var newHighValue = in_value.getValueHigh();\n var newLowValue = in_value.getValueLow();\n\n var changed = oldHighValue !== newHighValue || oldLowValue !== newLowValue;\n\n if (changed) {\n this._data = in_value.clone();\n this._setDirty(in_reportToView);\n }\n return changed;\n }\n\n /**\n * @return {number} the higher 32 bit integer part\n */\n getValueHigh() {\n return this._data.getValueHigh();\n }\n\n /**\n * @return {number} the lower 32 bit integer part\n */\n getValueLow() {\n return this._data.getValueLow();\n }\n\n /**\n * @param {number} in_high set the higher 32 bit integer part\n * @throws if in_high is not a number\n * @return {boolean} true if the value was actually changed\n */\n setValueHigh(in_high) {\n ConsoleUtils.assert(_.isNumber(in_high), MSG.IN_HIGH_MUST_BE_NUMBER + in_high);\n var changed = this._data.getValueHigh() !== in_high;\n\n if (changed) {\n var newData = new this.DataConstructor(this.getValueLow(), in_high);\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @param {number} in_low set the lower 32 bit integer part\n * @throws if in_low is not a number\n * @return {boolean} true if the value was actually changed\n */\n setValueLow(in_low) {\n ConsoleUtils.assert(_.isNumber(in_low), MSG.IN_LOW_MUST_BE_NUMBER + in_low);\n var changed = this._data.getValueLow() !== in_low;\n\n if (changed) {\n var newData = new this.DataConstructor(in_low, this.getValueHigh());\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @inheritdoc\n */\n _deserialize(in_serializedObj, in_reportToView,\n in_filteringOptions, in_createChangeSet) {\n if (ChangeSet.isEmptyChangeSet(in_serializedObj)) {\n return undefined;\n } else {\n ConsoleUtils.assert(_.isArray(in_serializedObj) && in_serializedObj.length === 2, MSG.INVALID_INT64_CHANGESET);\n var readValue = new this.DataConstructor(in_serializedObj[0], in_serializedObj[1]);\n var changed = this._setValue(readValue, in_reportToView);\n return changed ? this.serialize() : undefined;\n }\n }\n\n /**\n * @inheritdoc\n */\n _applyChangeset(in_changeSet, in_reportToView, in_filteringOptions) {\n if (!ChangeSet.isEmptyChangeSet(in_changeSet)) {\n if (!_.isArray(in_changeSet)) {\n in_changeSet = in_changeSet.value;\n }\n ConsoleUtils.assert(_.isArray(in_changeSet) && in_changeSet.length === 2, MSG.INVALID_INT64_CHANGESET);\n var newVal = new this.DataConstructor(in_changeSet[0], in_changeSet[1]);\n this._setValue(newVal, in_reportToView);\n }\n }\n\n /**\n * Serialize the property\n *\n * @param {boolean} in_dirtyOnly -\n * Only include dirty entries in the serialization\n * @param {boolean} in_includeRootTypeid -\n * Include the typeid of the root of the hierarchy - has no effect for value properties\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] -\n * The type of dirtiness to use when reporting dirty changes. By default this is\n * PENDING_CHANGE * @return {*} The serialized representation of this property\n * @param {boolean} [in_includeReferencedRepositories=false] - 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 * @return {*} The serialized representation of this property\n * @private\n */\n _serialize(in_dirtyOnly, in_includeRootTypeid,\n in_dirtinessType, in_includeReferencedRepositories) {\n if (in_dirtyOnly) {\n if (this._isDirty(in_dirtinessType)) {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n } else {\n return {};\n }\n } else {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n }\n }\n\n /**\n * The toString() method returns a string representing the specified Integer64 object.\n *\n * @param {number} [in_radix = 10] An integer between 2 and 36 specifying\n * the base to use for representing numeric values.\n * @return {string} A string representing the specified Integer64 object.\n */\n toString(in_radix) {\n return this._data.toString(in_radix);\n }\n\n /**\n * The Integer64.fromString() method parses a string argument updates object's lower and higher 32 bit integer parts.\n *\n * @param {string} in_string The value to parse. Leading whitespace in the string argument is ignored.\n * @param {number} [in_radix = 10] An integer between 2 and 36 that represents the\n * radix (the base in mathematical numeral systems) of the above mentioned string.\n * @throws if in_string is not a string\n * @throws if in_radix is entered but is not a number between 2 and 36\n * @throws if the property is a Uint64 property and in_string is a negative number\n * @throws if in_string contains characters other than numbers\n */\n fromString(in_string, in_radix) {\n ConsoleUtils.assert(_.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);\n var int = this._castFunctor(in_string, in_radix);\n\n this.setValueHigh(int.getValueHigh());\n this.setValueLow(int.getValueLow());\n }\n}\n\n/**\n * A primitive property class for big signed integer values.\n */\nexport class Int64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Int64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Int64);\n }\n}\nInt64Property.prototype._typeid = 'Int64';\nInt64Property.prototype._castFunctor = _castFunctors.Int64;\n\n/**\n * A primitive property class for big unsingned integer values.\n */\nexport class Uint64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Uint64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Uint64);\n }\n}\nUint64Property.prototype._typeid = 'Uint64';\nUint64Property.prototype._castFunctor = _castFunctors.Uint64;\n"]}
@@ -98,7 +98,7 @@ class MapProperty extends IndexedCollectionBaseProperty {
98
98
  property._setValues(value, false, false);
99
99
  }
100
100
  else {
101
- throw new Error(MSG.SET_VALUES_PATH_INVALID + key);
101
+ throw new TypeError(MSG.SET_VALUES_PATH_INVALID + key);
102
102
  }
103
103
  }
104
104
  else {
@@ -233,7 +233,7 @@ class MapProperty extends IndexedCollectionBaseProperty {
233
233
  this._insert(in_key, in_property, true);
234
234
  }
235
235
  else {
236
- throw new Error(MSG.NONVALUE_MAP_INSERT_PROP);
236
+ throw new TypeError(MSG.NONVALUE_MAP_INSERT_PROP);
237
237
  }
238
238
  }
239
239
  /**