@fluid-experimental/property-properties 2.0.0-dev.6.4.0.192049 → 2.0.0-dev.7.2.0.204906
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/properties/abstractStaticCollectionProperty.d.ts +102 -0
- package/dist/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
- package/dist/properties/abstractStaticCollectionProperty.js +1 -6
- package/dist/properties/abstractStaticCollectionProperty.js.map +1 -1
- package/dist/properties/arrayProperty.d.ts +127 -0
- package/dist/properties/arrayProperty.d.ts.map +1 -1
- package/dist/properties/baseProperty.js +2 -2
- package/dist/properties/baseProperty.js.map +1 -1
- package/dist/properties/boolProperty.d.ts +1 -0
- package/dist/properties/boolProperty.d.ts.map +1 -1
- package/dist/properties/containerProperty.d.ts +5 -0
- package/dist/properties/containerProperty.d.ts.map +1 -1
- package/dist/properties/enumArrayProperty.d.ts +9 -0
- package/dist/properties/enumArrayProperty.d.ts.map +1 -1
- package/dist/properties/enumProperty.d.ts +10 -0
- package/dist/properties/enumProperty.d.ts.map +1 -1
- package/dist/properties/floatProperties.d.ts +2 -0
- package/dist/properties/floatProperties.d.ts.map +1 -1
- package/dist/properties/indexedCollectionBaseProperty.d.ts +26 -0
- package/dist/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
- package/dist/properties/intProperties.d.ts +18 -0
- package/dist/properties/intProperties.d.ts.map +1 -1
- package/dist/properties/lazyLoadedProperties.d.ts +11 -11
- package/dist/properties/mapProperty.d.ts +17 -0
- package/dist/properties/mapProperty.d.ts.map +1 -1
- package/dist/properties/mapProperty.js +3 -6
- package/dist/properties/mapProperty.js.map +1 -1
- package/dist/properties/nodeProperty.d.ts +4 -0
- package/dist/properties/nodeProperty.d.ts.map +1 -1
- package/dist/properties/primitiveTypeCasts.d.ts +8 -8
- package/dist/properties/referenceArrayProperty.d.ts +54 -0
- package/dist/properties/referenceArrayProperty.d.ts.map +1 -1
- package/dist/properties/referenceMapProperty.d.ts +35 -0
- package/dist/properties/referenceMapProperty.d.ts.map +1 -1
- package/dist/properties/referenceProperty.d.ts +32 -0
- package/dist/properties/referenceProperty.d.ts.map +1 -1
- package/dist/properties/setProperty.d.ts +48 -0
- package/dist/properties/setProperty.d.ts.map +1 -1
- package/dist/properties/setProperty.js +6 -9
- package/dist/properties/setProperty.js.map +1 -1
- package/dist/properties/stringProperty.d.ts +108 -0
- package/dist/properties/stringProperty.d.ts.map +1 -1
- package/dist/properties/uintProperties.d.ts +3 -0
- package/dist/properties/uintProperties.d.ts.map +1 -1
- package/dist/properties/valueArrayProperty.d.ts +24 -0
- package/dist/properties/valueArrayProperty.d.ts.map +1 -1
- package/dist/properties/valueMapProperty.d.ts +46 -0
- package/dist/properties/valueMapProperty.d.ts.map +1 -1
- package/dist/properties/valueProperty.d.ts +49 -0
- package/dist/properties/valueProperty.d.ts.map +1 -1
- package/dist/propertyFactory.js +4 -2
- package/dist/propertyFactory.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +1 -1
- package/lib/properties/abstractStaticCollectionProperty.d.ts +102 -0
- package/lib/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
- package/lib/properties/abstractStaticCollectionProperty.js +1 -6
- package/lib/properties/abstractStaticCollectionProperty.js.map +1 -1
- package/lib/properties/arrayProperty.d.ts +127 -0
- package/lib/properties/arrayProperty.d.ts.map +1 -1
- package/lib/properties/baseProperty.js +2 -2
- package/lib/properties/baseProperty.js.map +1 -1
- package/lib/properties/boolProperty.d.ts +1 -0
- package/lib/properties/boolProperty.d.ts.map +1 -1
- package/lib/properties/containerProperty.d.ts +5 -0
- package/lib/properties/containerProperty.d.ts.map +1 -1
- package/lib/properties/enumArrayProperty.d.ts +9 -0
- package/lib/properties/enumArrayProperty.d.ts.map +1 -1
- package/lib/properties/enumProperty.d.ts +10 -0
- package/lib/properties/enumProperty.d.ts.map +1 -1
- package/lib/properties/floatProperties.d.ts +2 -0
- package/lib/properties/floatProperties.d.ts.map +1 -1
- package/lib/properties/indexedCollectionBaseProperty.d.ts +26 -0
- package/lib/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
- package/lib/properties/intProperties.d.ts +18 -0
- package/lib/properties/intProperties.d.ts.map +1 -1
- package/lib/properties/lazyLoadedProperties.d.ts +11 -11
- package/lib/properties/mapProperty.d.ts +17 -0
- package/lib/properties/mapProperty.d.ts.map +1 -1
- package/lib/properties/mapProperty.js +3 -6
- package/lib/properties/mapProperty.js.map +1 -1
- package/lib/properties/nodeProperty.d.ts +4 -0
- package/lib/properties/nodeProperty.d.ts.map +1 -1
- package/lib/properties/primitiveTypeCasts.d.ts +8 -8
- package/lib/properties/referenceArrayProperty.d.ts +54 -0
- package/lib/properties/referenceArrayProperty.d.ts.map +1 -1
- package/lib/properties/referenceMapProperty.d.ts +35 -0
- package/lib/properties/referenceMapProperty.d.ts.map +1 -1
- package/lib/properties/referenceProperty.d.ts +32 -0
- package/lib/properties/referenceProperty.d.ts.map +1 -1
- package/lib/properties/setProperty.d.ts +48 -0
- package/lib/properties/setProperty.d.ts.map +1 -1
- package/lib/properties/setProperty.js +6 -9
- package/lib/properties/setProperty.js.map +1 -1
- package/lib/properties/stringProperty.d.ts +108 -0
- package/lib/properties/stringProperty.d.ts.map +1 -1
- package/lib/properties/uintProperties.d.ts +3 -0
- package/lib/properties/uintProperties.d.ts.map +1 -1
- package/lib/properties/valueArrayProperty.d.ts +24 -0
- package/lib/properties/valueArrayProperty.d.ts.map +1 -1
- package/lib/properties/valueMapProperty.d.ts +46 -0
- package/lib/properties/valueMapProperty.d.ts.map +1 -1
- package/lib/properties/valueProperty.d.ts +49 -0
- package/lib/properties/valueProperty.d.ts.map +1 -1
- package/lib/propertyFactory.js +4 -2
- package/lib/propertyFactory.js.map +1 -1
- package/package.json +9 -9
|
@@ -12,6 +12,21 @@ export class AbstractStaticCollectionProperty extends BaseProperty {
|
|
|
12
12
|
protected constructor();
|
|
13
13
|
_staticChildren: {};
|
|
14
14
|
_constantChildren: {};
|
|
15
|
+
/**
|
|
16
|
+
* Returns the sub-property having the given name, or following the given paths, in this property.
|
|
17
|
+
*
|
|
18
|
+
* @param {string | number | Array<string | number>} in_ids - The ID or IDs of the property or an array of IDs if an array
|
|
19
|
+
* is passed, the .get function will be performed on each id in sequence for example .get(['position','x']) is
|
|
20
|
+
* equivalent to .get('position').get('x'). If `.get` resolves to a ReferenceProperty, it will, by default, return
|
|
21
|
+
* the property that the ReferenceProperty refers to.
|
|
22
|
+
* @param {Object} in_options - parameter object
|
|
23
|
+
* @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS] - How
|
|
24
|
+
* should this function behave during reference resolution?
|
|
25
|
+
*
|
|
26
|
+
* @throws If an in_id is neither a string or an array of strings and numbers.
|
|
27
|
+
* @return {BaseProperty | undefined} The property you seek or undefined if none is found.
|
|
28
|
+
*/
|
|
29
|
+
get(in_ids: string | number | Array<string | number>, in_options: any): BaseProperty | undefined;
|
|
15
30
|
/**
|
|
16
31
|
* Returns the sub-property having the given name in this property.
|
|
17
32
|
*
|
|
@@ -80,6 +95,37 @@ export class AbstractStaticCollectionProperty extends BaseProperty {
|
|
|
80
95
|
* @return {boolean} True if the property exists. Otherwise false.
|
|
81
96
|
*/
|
|
82
97
|
has(in_id: string): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Expand a path returning the property or value at the end.
|
|
100
|
+
*
|
|
101
|
+
* @param {string} in_path - The path
|
|
102
|
+
* @param {Object} in_options - Parameter object
|
|
103
|
+
* @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS] - How
|
|
104
|
+
* should this function behave during reference resolution?
|
|
105
|
+
* @throws If in_path is not a valid path
|
|
106
|
+
* @return {BaseProperty | undefined} Resolved path
|
|
107
|
+
*/
|
|
108
|
+
resolvePath(in_path: string, in_options: any): BaseProperty | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* Returns the path segment for a child
|
|
111
|
+
*
|
|
112
|
+
* @param {property-properties.BaseProperty} in_childNode - The child for which the path is returned
|
|
113
|
+
*
|
|
114
|
+
* @return {string} The path segment to resolve the child property under this property
|
|
115
|
+
* @protected
|
|
116
|
+
*/
|
|
117
|
+
protected _getPathSegmentForChildNode(in_childNode: any): string;
|
|
118
|
+
/**
|
|
119
|
+
* Resolves a direct child node based on the given path segment
|
|
120
|
+
*
|
|
121
|
+
* @param {String} in_segment - The path segment to resolve
|
|
122
|
+
* @param {property-properties.PathHelper.TOKEN_TYPES} in_segmentType - The type of segment in the tokenized path
|
|
123
|
+
*
|
|
124
|
+
* @return {BaseProperty | undefined} The child property that has been resolved
|
|
125
|
+
*
|
|
126
|
+
* @protected
|
|
127
|
+
*/
|
|
128
|
+
protected _resolvePathSegment(in_segment: string, in_segmentType: any): BaseProperty | undefined;
|
|
83
129
|
/**
|
|
84
130
|
* Given an object that mirrors a PSet Template, assigns the properties to the values
|
|
85
131
|
* found in that object.
|
|
@@ -141,6 +187,22 @@ export class AbstractStaticCollectionProperty extends BaseProperty {
|
|
|
141
187
|
* @protected
|
|
142
188
|
*/
|
|
143
189
|
protected _merge(in_property: any): void;
|
|
190
|
+
/**
|
|
191
|
+
* @inheritdoc
|
|
192
|
+
*/
|
|
193
|
+
_getDirtyChildren(in_flags: any): any[];
|
|
194
|
+
/**
|
|
195
|
+
* Traverses the property hierarchy downwards until all child properties are reached
|
|
196
|
+
*
|
|
197
|
+
* @param {Function} in_callback - Callback to invoke for each property. The traversal can be stopped by returning
|
|
198
|
+
* BaseProperty.BREAK_TRAVERSAL
|
|
199
|
+
*
|
|
200
|
+
* @throws If in_callback is not a function.
|
|
201
|
+
*
|
|
202
|
+
* @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted, otherwise
|
|
203
|
+
* undefined
|
|
204
|
+
*/
|
|
205
|
+
traverseDown(in_callback: Function): string | undefined;
|
|
144
206
|
/**
|
|
145
207
|
* Traverses all static properties (properties declared in the template and not added dynamically) in the
|
|
146
208
|
* hierarchy below this node
|
|
@@ -151,6 +213,46 @@ export class AbstractStaticCollectionProperty extends BaseProperty {
|
|
|
151
213
|
* @protected
|
|
152
214
|
*/
|
|
153
215
|
protected _traverseStaticProperties(in_callback: Function, in_pathFromTraversalStart: string | null): void;
|
|
216
|
+
/**
|
|
217
|
+
* Serialize the property into a changeSet
|
|
218
|
+
*
|
|
219
|
+
* @param {boolean} in_dirtyOnly - Only include dirty entries in the serialization
|
|
220
|
+
* @param {boolean} in_includeRootTypeid - Include the typeid of the root of the hierarchy
|
|
221
|
+
* @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] - The type of dirtiness to
|
|
222
|
+
* use when reporting dirty changes. By default this is `PENDING_CHANGE`.
|
|
223
|
+
* @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize
|
|
224
|
+
* function will descend into referenced repositories.
|
|
225
|
+
* WARNING: if there are loops in the references this can result in an infinite loop.
|
|
226
|
+
*
|
|
227
|
+
* @return {Object} The serialized representation of this property
|
|
228
|
+
* @protected
|
|
229
|
+
*/
|
|
230
|
+
protected _serialize(in_dirtyOnly: boolean, in_includeRootTypeid: boolean, in_dirtinessType: any, in_includeReferencedRepositories?: boolean): any;
|
|
231
|
+
/**
|
|
232
|
+
* Sets the property to the state in the given normalized changeset
|
|
233
|
+
*
|
|
234
|
+
* @param { property-changeset.SerializedChangeSet} in_serializedObj - The serialized changeset to apply to this
|
|
235
|
+
* node. This has to be an normalized change-set (only containing additions and property assignments.
|
|
236
|
+
* Deletes and Modify must not appear)
|
|
237
|
+
* @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout
|
|
238
|
+
* view and trigger a modified event there. When batching updates, this can be prevented via this flag.
|
|
239
|
+
* @return {property-changeset.SerializedChangeSet} ChangeSet with the changes that actually were performed during
|
|
240
|
+
* the deserialization.
|
|
241
|
+
*/
|
|
242
|
+
_deserialize(in_serializedObj: any, in_reportToView?: boolean): property;
|
|
243
|
+
/**
|
|
244
|
+
* Get a flattened, tree like representation of this object and all of it's
|
|
245
|
+
* descendants. The flattening will stop at primitive properties and collections.
|
|
246
|
+
*
|
|
247
|
+
* For non-leaf nodes, it is possible to access the corresponding node object itself via the
|
|
248
|
+
* propertyNode member of the flattened representation (warning, this will overwrite a
|
|
249
|
+
* property of this name).
|
|
250
|
+
* TODO: Do we want to have this feature or is it to dangerous?
|
|
251
|
+
*
|
|
252
|
+
* @return {Object} the flat representation
|
|
253
|
+
* @protected
|
|
254
|
+
*/
|
|
255
|
+
protected _flatten(): any;
|
|
154
256
|
/**
|
|
155
257
|
* Returns the number of children this node has
|
|
156
258
|
* @return {number} The number of children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstractStaticCollectionProperty.d.ts","sourceRoot":"","sources":["../../src/properties/abstractStaticCollectionProperty.js"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH;IACC;;;OAGG;IACH,wBAQC;IAHC,oBAAyB;IAE1B,sBAA2B;
|
|
1
|
+
{"version":3,"file":"abstractStaticCollectionProperty.d.ts","sourceRoot":"","sources":["../../src/properties/abstractStaticCollectionProperty.js"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH;IACC;;;OAGG;IACH,wBAQC;IAHC,oBAAyB;IAE1B,sBAA2B;IAG5B;;;;;;;;;;;;;OAaG;IACH,YAXW,MAAM,GAAG,MAAM,GAAG,MAAM,MAAM,GAAG,MAAM,CAAC,oBASvC,YAAY,GAAG,SAAS,CA0DnC;IAED;;;;;;OAMG;IACH,YAJW,MAAM,GAAC,MAAM,YAMvB;IAaD;;;;;;OAMG;IACH,WAFY,MAAM,CAOjB;IAED;;;;;;;;;;;;;;;OAeG;IACH,iBAbW,MAAM,GAAC,MAAM,GAAC,MAAM,MAAM,GAAC,MAAM,CAAC,wBAqB5C;IAED;;;;;OAKG;IACH,0BAWC;IAWD;;;;OAIG;IACH,WAFY,MAAO,MAAM,CAAC,CAIzB;IAED;;;;;;;;;;;;;OAaG;IACH,gBAcC;IAED;;;;;OAKG;IACH,WAHW,MAAM,GACL,OAAO,CAIlB;IAED;;;;;;;;;OASG;IACH,qBAPW,MAAM,oBAKL,YAAY,GAAG,SAAS,CAwDnC;IAED;;;;;;;OAOG;IACH,0DAHY,MAAM,CAKjB;IAED;;;;;;;;;OASG;IACH,wEAJY,YAAY,GAAG,SAAS,CAenC;IAED;;;;;;;;;OASG;IACH,gCANW,MAAM,WAAW,MAAM,YACvB,OAAO,cACP,OAAO,QAiCjB;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,qBALW,MAAM,WAAW,MAAM,QAwBjC;IAED;;;;;;;;;;;;;;OAcG;IACH,yDARW,OAAO,QAiCjB;IAED;;;;;;;;;;OAUG;IACH,yCAMC;IAED;;OAEG;IACH,wCAWC;IAED;;;;;;;;;;OAUG;IACH,qCAHY,MAAM,GAAC,SAAS,CAM3B;IAsCD;;;;;;;;OAQG;IACH,sFAJW,MAAM,eAyBhB;IAED;;;;;;;;;;;;;OAaG;IACH,mCAXW,OAAO,wBACP,OAAO,4DAGP,OAAO,OA0DjB;IAED;;;;;;;;;;OAUG;IACH,sDALW,OAAO,YA8CjB;IAED;;;;;;;;;;;OAWG;IACH,0BAYC;IAED;;;;OAIG;IACH,0BAEC;IAED;;;OAGG;IACH,uCAMC;CACD"}
|
|
@@ -645,12 +645,7 @@ class AbstractStaticCollectionProperty extends BaseProperty {
|
|
|
645
645
|
for (var i = 0; i < keys.length; i++) {
|
|
646
646
|
var key = keys[i];
|
|
647
647
|
var child = this._get(key);
|
|
648
|
-
|
|
649
|
-
flattenedRepresentation[key] = child._flatten();
|
|
650
|
-
}
|
|
651
|
-
else {
|
|
652
|
-
flattenedRepresentation[key] = child;
|
|
653
|
-
}
|
|
648
|
+
flattenedRepresentation[key] = child._isFlattenLeaf() ? child : child._flatten();
|
|
654
649
|
}
|
|
655
650
|
flattenedRepresentation.propertyNode = this;
|
|
656
651
|
return flattenedRepresentation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstractStaticCollectionProperty.js","sourceRoot":"","sources":["../../src/properties/abstractStaticCollectionProperty.js"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnF,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACpF,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,oBAAoB,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAE7E,MAAM,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,SAAS,CAAC;AACnD,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,YAAY,CAAC;AAEtD;;;;;GAKG;AACH,MAAa,gCAAiC,SAAQ,YAAY;IACjE;;;OAGG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,sBAAsB;QACtB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YAC1B,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;SAC1B;QACD,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC;IAC7B,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,GAAG,CAAC,MAAM,EAAE,UAAU;QACrB,UAAU,GAAG,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;QACtD,UAAU,CAAC,uBAAuB;YACjC,UAAU,CAAC,uBAAuB,KAAK,SAAS;gBAC/C,CAAC,CAAC,YAAY,CAAC,oBAAoB,CAAC,MAAM;gBAC1C,CAAC,CAAC,UAAU,CAAC,uBAAuB,CAAC;QAE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IAAI,eAAe,EAAE;YACpB,IAAI,CAAC,sBAAsB,EAAE,CAAC;SAC9B;QACD,OAAO,SAAS,CAAC;IAClB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ;QACP,IAAI,uBAAuB,GAAG,EAAE,CAAC;QACjC,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,IAAI,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE;gBAC5B,uBAAuB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;aAChD;iBAAM;gBACN,uBAAuB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;aACrC;SACD;QAED,uBAAuB,CAAC,YAAY,GAAG,IAAI,CAAC;QAE5C,OAAO,uBAAuB,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACH,iBAAiB;QAChB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACH,aAAa,CAAC,YAAY;QACzB,YAAY,CAAC,MAAM,CAClB,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,EACxB,GAAG,CAAC,gBAAgB,GAAG,0DAA0D,CACjF,CAAC;QACF,IAAI,CAAC,iBAAiB,GAAG,YAAY,CAAC;IACvC,CAAC;CACD;AAtuBD,4EAsuBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst _ = require(\"lodash\");\nconst { ConsoleUtils, constants } = require(\"@fluid-experimental/property-common\");\nconst { PathHelper, ChangeSet } = require(\"@fluid-experimental/property-changeset\");\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { LazyLoadedProperties: Property } = require(\"./lazyLoadedProperties\");\n\nconst { MSG, PROPERTY_PATH_DELIMITER } = constants;\nconst { BREAK_TRAVERSAL, PATH_TOKENS } = BaseProperty;\n\n/**\n * This class serves as a view to read, write and listen to changes in an\n * object's value field. To do this we simply keep a pointer to the object and\n * its associated data field that we are interested in. If no data field is\n * present this property will fail constructing.\n */\nexport class AbstractStaticCollectionProperty extends BaseProperty {\n\t/**\n\t * @param {Object=} in_params - The parameters\n\t * @protected\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\n\t\t// internal management\n\t\tif (!this._staticChildren) {\n\t\t\tthis._staticChildren = {};\n\t\t}\n\t\tthis._constantChildren = {};\n\t}\n\n\t/**\n\t * Returns the sub-property having the given name, or following the given paths, in this property.\n\t *\n\t * @param {string | number | Array<string | number>} in_ids - The ID or IDs of the property or an array of IDs if an array\n\t * is passed, the .get function will be performed on each id in sequence for example .get(['position','x']) is\n\t * equivalent to .get('position').get('x'). If `.get` resolves to a ReferenceProperty, it will, by default, return\n\t * the property that the ReferenceProperty refers to.\n\t * @param {Object} in_options - parameter object\n\t * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS] - How\n\t * should this function behave during reference resolution?\n\t *\n\t * @throws If an in_id is neither a string or an array of strings and numbers.\n\t * @return {BaseProperty | undefined} The property you seek or undefined if none is found.\n\t */\n\tget(in_ids, in_options) {\n\t\tin_options = _.isObject(in_options) ? in_options : {};\n\t\tin_options.referenceResolutionMode =\n\t\t\tin_options.referenceResolutionMode === undefined\n\t\t\t\t? BaseProperty.REFERENCE_RESOLUTION.ALWAYS\n\t\t\t\t: in_options.referenceResolutionMode;\n\n\t\tvar prop = this;\n\t\tif (typeof in_ids === \"string\" || typeof in_ids === \"number\") {\n\t\t\tprop = this._get(in_ids);\n\t\t\tif (in_options.referenceResolutionMode === BaseProperty.REFERENCE_RESOLUTION.ALWAYS) {\n\t\t\t\tif (prop instanceof Property.ReferenceProperty) {\n\t\t\t\t\tprop = prop.ref;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (_.isArray(in_ids)) {\n\t\t\tfor (var i = 0; i < in_ids.length && prop; i++) {\n\t\t\t\tvar mode = in_options.referenceResolutionMode;\n\t\t\t\t// do not do anything with token itself, only changes behavior of path preceding the token;\n\t\t\t\tif (in_ids[i] === PATH_TOKENS.REF) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (mode === BaseProperty.REFERENCE_RESOLUTION.NO_LEAFS) {\n\t\t\t\t\tmode =\n\t\t\t\t\t\ti !== in_ids.length - 1\n\t\t\t\t\t\t\t? BaseProperty.REFERENCE_RESOLUTION.ALWAYS\n\t\t\t\t\t\t\t: BaseProperty.REFERENCE_RESOLUTION.NEVER;\n\t\t\t\t}\n\t\t\t\tif (in_ids[i - 1] === PATH_TOKENS.REF || in_ids[i + 1] === PATH_TOKENS.REF) {\n\t\t\t\t\tmode = BaseProperty.REFERENCE_RESOLUTION.NEVER;\n\t\t\t\t}\n\t\t\t\tprop = prop.get(in_ids[i], { referenceResolutionMode: mode });\n\t\t\t\tif (prop === undefined && i < in_ids.length - 1) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tswitch (in_ids) {\n\t\t\t\tcase PATH_TOKENS.ROOT: {\n\t\t\t\t\tprop = prop.getRoot();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase PATH_TOKENS.UP: {\n\t\t\t\t\tprop = prop.getParent();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase PATH_TOKENS.REF: {\n\t\t\t\t\tthrow new Error(MSG.NO_GET_DEREFERENCE_ONLY);\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tthrow new Error(MSG.STRING_OR_ARRAY_STRINGS + in_ids);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn prop;\n\t}\n\n\t/**\n\t * Returns the sub-property having the given name in this property.\n\t *\n\t * @param {string|number} in_id - The id of the prop you wish to retrieve.\n\t *\n\t * @return {property-properties.BaseProperty | undefined} The property you seek or undefined if none is found.\n\t */\n\t_get(in_id) {\n\t\treturn this._staticChildren[in_id] || this._constantChildren[in_id];\n\t}\n\n\t/**\n\t * Returns a string identifying the property\n\t *\n\t * If an id has been explicitly set on this property we return that one, otherwise the GUID is used.\n\t *\n\t * @return {string} String identifying the property\n\t */\n\tgetId() {\n\t\treturn this._id !== null ? this._id : this.getGuid();\n\t}\n\n\t/**\n\t * Returns the GUID of this named property\n\t * A Guid is a unique identifier for a branch, commit or repository,\n\t * similar to a URN. Most functions in the API will us a URN but the\n\t * Guid is used to traverse the commit graph.\n\t * @return {string} The GUID\n\t */\n\tgetGuid() {\n\t\tvar guid = this.get(\"guid\", {\n\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t});\n\t\treturn guid ? guid.value : undefined;\n\t}\n\n\t/**\n\t * Returns the value of a sub-property This is a shortcut for .get(in_ids, in_options).getValue().\n\t *\n\t * @param {string|number|Array<string|number>} in_ids - The ID or IDs of the property or an array of IDs if an array\n\t * is passed, the .get function will be performed on each id in sequence for example .getValue(['position','x'])\n\t * is equivalent to .get('position').get('x').getValue(). If at any point .get resolves to a ReferenceProperty,\n\t * it will, by default, return the property that the ReferenceProperty refers to.\n\t * @param {Object} in_options - Parameter object\n\t * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS] - How\n\t * should this function behave during reference resolution?\n\t *\n\t * @throws If the in_ids does not resolve to a ValueProperty or StringProperty\n\t * @throws If in_ids is not a string or an array of strings or numbers.\n\t *\n\t * @return {*} The value of the given sub-property\n\t */\n\tgetValue(in_ids, in_options) {\n\t\tvar property = this.get(in_ids, in_options);\n\t\tConsoleUtils.assert(\n\t\t\tproperty instanceof Property.ValueProperty ||\n\t\t\t\tproperty instanceof Property.StringProperty,\n\t\t\tMSG.GET_VALUE_NOT_A_VALUE + in_ids,\n\t\t);\n\t\treturn property.getValue();\n\t}\n\n\t/**\n\t * Get all sub-properties of the current property.\n\t * Caller MUST NOT modify the properties.\n\t * If entries include References, it will return the reference (will not automatically resolve the reference)\n\t * @return {Object.<property-properties.BaseProperty>} An object containing all the properties\n\t */\n\tgetEntriesReadOnly() {\n\t\t/* Note that the implementation is voluntarily generic so that derived classes\n should not have to redefine this function. */\n\t\tvar res = {};\n\t\tvar ids = this.getIds();\n\t\tfor (var i = 0; i < ids.length; i++) {\n\t\t\tres[ids[i]] = this.get(ids[i], {\n\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t});\n\t\t}\n\t\treturn res;\n\t}\n\n\t/**\n\t * Returns the name of all the sub-properties of this property.\n\t *\n\t * @return {Array.<string>} An array of all the property ids\n\t */\n\tgetIds() {\n\t\treturn this._getIds();\n\t}\n\n\t/**\n\t * Returns the name of all the sub-properties of this property.\n\t *\n\t * @return {Array.<string>} An array of all the property ids\n\t */\n\t_getIds() {\n\t\treturn Object.keys(this._staticChildren).concat(Object.keys(this._constantChildren));\n\t}\n\n\t/**\n\t * Returns an object with all the nested values contained in this property.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * position: {\n\t * x: 2,\n\t * y: 5\n\t * }\n\t * }\n\t * ```\n\t */\n\tgetValues() {\n\t\tvar ids = this._getIds();\n\t\tvar result = {};\n\t\tfor (var i = 0; i < ids.length; i++) {\n\t\t\tvar child = this.get(ids[i]);\n\t\t\tif (_.isUndefined(child)) {\n\t\t\t\tresult[ids[i]] = undefined;\n\t\t\t} else if (child._context === \"single\" && child.isPrimitiveType()) {\n\t\t\t\tresult[ids[i]] = child.getValue();\n\t\t\t} else {\n\t\t\t\tresult[ids[i]] = child.getValues();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Checks whether a property with the given name exists\n\t *\n\t * @param {string} in_id - Name of the property\n\t * @return {boolean} True if the property exists. Otherwise false.\n\t */\n\thas(in_id) {\n\t\treturn this._get(in_id) !== undefined;\n\t}\n\n\t/**\n\t * Expand a path returning the property or value at the end.\n\t *\n\t * @param {string} in_path - The path\n\t * @param {Object} in_options - Parameter object\n\t * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS] - How\n\t * should this function behave during reference resolution?\n\t * @throws If in_path is not a valid path\n\t * @return {BaseProperty | undefined} Resolved path\n\t */\n\tresolvePath(in_path, in_options) {\n\t\tin_options = in_options || {};\n\t\tin_options.referenceResolutionMode =\n\t\t\tin_options.referenceResolutionMode === undefined\n\t\t\t\t? BaseProperty.REFERENCE_RESOLUTION.ALWAYS\n\t\t\t\t: in_options.referenceResolutionMode;\n\n\t\tvar node = this;\n\n\t\t// Tokenize the path string\n\t\tvar tokenTypes = [];\n\t\tvar pathArr = PathHelper.tokenizePathString(in_path, tokenTypes);\n\n\t\t// Return to the repository root, if the path starts with a root token (a / )\n\t\tvar iterationStart = 0;\n\t\tif (pathArr.length > 0) {\n\t\t\tif (tokenTypes[0] === PathHelper.TOKEN_TYPES.PATH_ROOT_TOKEN) {\n\t\t\t\tnode = this.getRoot();\n\t\t\t\titerationStart = 1;\n\t\t\t} else if (tokenTypes[0] === PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN) {\n\t\t\t\tfor (var j = 0; j < pathArr.length; j++) {\n\t\t\t\t\tif (tokenTypes[j] === PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN) {\n\t\t\t\t\t\tvar parent = node.getParent();\n\t\t\t\t\t\tif (parent) {\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t\titerationStart++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (var i = iterationStart; i < pathArr.length && node; i++) {\n\t\t\tif (tokenTypes[i] !== PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN) {\n\t\t\t\tnode = node._resolvePathSegment(pathArr[i], tokenTypes[i]);\n\t\t\t\tif (\n\t\t\t\t\tin_options.referenceResolutionMode ===\n\t\t\t\t\t\tBaseProperty.REFERENCE_RESOLUTION.ALWAYS ||\n\t\t\t\t\t(in_options.referenceResolutionMode ===\n\t\t\t\t\t\tBaseProperty.REFERENCE_RESOLUTION.NO_LEAFS &&\n\t\t\t\t\t\ti !== pathArr.length - 1)\n\t\t\t\t) {\n\t\t\t\t\tif (node instanceof Property.ReferenceProperty) {\n\t\t\t\t\t\tif (tokenTypes[i + 1] !== PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN) {\n\t\t\t\t\t\t\t// recursive function to resolve nested reference properties\n\t\t\t\t\t\t\tnode = node.ref;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn node;\n\t}\n\n\t/**\n\t * Returns the path segment for a child\n\t *\n\t * @param {property-properties.BaseProperty} in_childNode - The child for which the path is returned\n\t *\n\t * @return {string} The path segment to resolve the child property under this property\n\t * @protected\n\t */\n\t_getPathSegmentForChildNode(in_childNode) {\n\t\treturn PROPERTY_PATH_DELIMITER + PathHelper.quotePathSegmentIfNeeded(in_childNode.getId());\n\t}\n\n\t/**\n\t * Resolves a direct child node based on the given path segment\n\t *\n\t * @param {String} in_segment - The path segment to resolve\n\t * @param {property-properties.PathHelper.TOKEN_TYPES} in_segmentType - The type of segment in the tokenized path\n\t *\n\t * @return {BaseProperty | undefined} The child property that has been resolved\n\t *\n\t * @protected\n\t */\n\t_resolvePathSegment(in_segment, in_segmentType) {\n\t\t// Base Properties only support paths separated via dots\n\t\tif (in_segmentType !== PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN) {\n\t\t\tthrow new Error(MSG.INVALID_PATH_TOKEN + in_segment);\n\t\t}\n\n\t\treturn this.has(in_segment)\n\t\t\t? this.get(in_segment, {\n\t\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t })\n\t\t\t: undefined;\n\t}\n\n\t/**\n\t * Given an object that mirrors a PSet Template, assigns the properties to the values\n\t * found in that object.\n\t * See {@link setValues}\n\t * @param {object | Array | string} in_values - The object containing the nested values to assign\n\t * @param {boolean} in_typed - Whether the values are typed/polymorphic.\n\t * @param {boolean} in_initial - Whether we are setting default/initial values\n\t * or if the function is called directly with the values to set.\n\t * @protected\n\t */\n\t_setValues(in_values, in_typed, in_initial) {\n\t\tConsoleUtils.assert(_.isObject(in_values), MSG.SET_VALUES_PARAM_NOT_OBJECT);\n\n\t\tvar that = this;\n\t\tvar keys = Object.keys(in_values);\n\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tvar propertyKey = keys[i];\n\t\t\tvar propertyValue = in_values[propertyKey];\n\t\t\tvar property = that.get(propertyKey, {\n\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t});\n\n\t\t\tif (\n\t\t\t\tproperty instanceof Property.ValueProperty ||\n\t\t\t\tproperty instanceof Property.StringProperty\n\t\t\t) {\n\t\t\t\tproperty.setValue(propertyValue);\n\t\t\t} else if (property instanceof BaseProperty && _.isObject(propertyValue)) {\n\t\t\t\tproperty._setValues(propertyValue, in_typed, in_initial);\n\t\t\t} else if (property instanceof BaseProperty) {\n\t\t\t\tconst typeid = property.getTypeid();\n\t\t\t\tthrow new Error(\n\t\t\t\t\tMSG.SET_VALUES_PATH_PROPERTY + propertyKey + \", of type: \" + typeid,\n\t\t\t\t);\n\t\t\t} else if (property === undefined) {\n\t\t\t\tthrow new Error(MSG.SET_VALUES_PATH_INVALID + propertyKey);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Given an object that mirrors a PSet Template, assigns the properties to the values\n\t * found in that object.\n\t * E.g.\n\t *\n\t * ```\n\t * <pre>\n\t * Templates = {\n\t * properties: [\n\t * { id: 'foo', typeid: 'String' },\n\t * { id: 'bar', properties: [{id: 'baz', typeid: 'Uint32'}] }\n\t * ]\n\t * }\n\t * </pre>\n\t * ```\n\t *\n\t * @param {object | Array | string} in_values - The object containing the nested values to assign\n\t * @throws If in_values is not an object (or in the case of ArrayProperty, an array)\n\t * @throws If one of the path in in_values does not correspond to a path in that property\n\t * @throws If one of the path to a value in in_values leads to a property in this property.\n\t */\n\tsetValues(in_values) {\n\t\tvar checkoutView = this._getCheckoutView();\n\t\tif (checkoutView !== undefined) {\n\t\t\tcheckoutView.pushNotificationDelayScope();\n\t\t\tAbstractStaticCollectionProperty.prototype._setValues.call(\n\t\t\t\tthis,\n\t\t\t\tin_values,\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t);\n\t\t\tcheckoutView.popNotificationDelayScope();\n\t\t} else {\n\t\t\tAbstractStaticCollectionProperty.prototype._setValues.call(\n\t\t\t\tthis,\n\t\t\t\tin_values,\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Append a child property\n\t *\n\t * This is an internal function, called by the PropertyFactory when instantiating a template and internally by the\n\t * NodeProperty. Adding children dynamically by the user is only allowed in the NodeProperty.\n\t *\n\t * @param {property-properties.BaseProperty} in_property - The property to append\n\t * @param {boolean} in_allowChildMerges - Whether merging of children (nested properties) is allowed.\n\t * This is used for extending inherited properties.\n\t *\n\t * @throws {OVERWRITING_ID} - Thrown when adding a property with an existing id.\n\t * @throws {OVERRIDDING_INHERITED_TYPES} - Thrown when overriding inherited typed properties.\n\t *\n\t * @protected\n\t */\n\t_append(in_property, in_allowChildMerges) {\n\t\tvar id = in_property.getId();\n\t\tif (this._staticChildren[id] === undefined) {\n\t\t\tthis._staticChildren[id] = in_property;\n\t\t\tin_property._setParent(this);\n\t\t} else {\n\t\t\tif (!in_allowChildMerges) {\n\t\t\t\tthrow new Error(MSG.OVERWRITING_ID + id);\n\t\t\t}\n\n\t\t\t// if child is untyped then merge its properties\n\t\t\tif (\n\t\t\t\tthis._staticChildren[id].getTypeid() === \"AbstractStaticCollectionProperty\" &&\n\t\t\t\tthis._staticChildren[id].getContext() === \"single\"\n\t\t\t) {\n\t\t\t\t// if the property's type is different than the child type, throw error.\n\t\t\t\tif (this._staticChildren[id].getTypeid() !== in_property.getTypeid()) {\n\t\t\t\t\tthrow new Error(MSG.OVERRIDDING_INHERITED_TYPES + id);\n\t\t\t\t}\n\n\t\t\t\tthis._staticChildren[id]._merge(in_property);\n\t\t\t} else {\n\t\t\t\tthrow new Error(MSG.OVERRIDDING_INHERITED_TYPES + id);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Merge child properties\n\t *\n\t * This is an internal function that merges children of two properties. This is used for extending inherited\n\t * properties.\n\t *\n\t * @param {property-properties.BaseProperty} in_property - The property to merge its children (nested properties)\n\t * with.\n\t *\n\t * @protected\n\t */\n\t_merge(in_property) {\n\t\tvar keys = Object.keys(in_property._staticChildren);\n\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tthis._append(in_property._staticChildren[keys[i]], true);\n\t\t}\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_getDirtyChildren(in_flags) {\n\t\tvar flags = in_flags === undefined ? ~BaseProperty.MODIFIED_STATE_FLAGS.CLEAN : in_flags;\n\t\tvar rtn = [];\n\t\tvar childKeys = _.keys(this._staticChildren);\n\t\tfor (var i = 0; i < childKeys.length; i++) {\n\t\t\tif (this._get(childKeys[i])._isDirty(flags) !== 0) {\n\t\t\t\trtn.push(childKeys[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn rtn;\n\t}\n\n\t/**\n\t * Traverses the property hierarchy downwards until all child properties are reached\n\t *\n\t * @param {Function} in_callback - Callback to invoke for each property. The traversal can be stopped by returning\n\t * BaseProperty.BREAK_TRAVERSAL\n\t *\n\t * @throws If in_callback is not a function.\n\t *\n\t * @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted, otherwise\n\t * undefined\n\t */\n\ttraverseDown(in_callback) {\n\t\tConsoleUtils.assert(_.isFunction(in_callback), MSG.CALLBACK_NOT_FCT);\n\t\treturn this._traverse(in_callback, \"\");\n\t}\n\n\t/**\n\t * Traverses all children in the child hierarchy\n\t * TODO: How should this behave for collections?\n\t *\n\t * @param {function} in_callback - Callback to invoke for every child\n\t * @param {string} in_pathFromTraversalStart - Path from the root of the traversal to this node\n\t * @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted,\n\t * otherwise undefined\n\t * @private\n\t */\n\t_traverse(in_callback, in_pathFromTraversalStart) {\n\t\tif (in_pathFromTraversalStart) {\n\t\t\tin_pathFromTraversalStart += PROPERTY_PATH_DELIMITER;\n\t\t}\n\n\t\tvar childKeys, child, childPath, result, i;\n\n\t\tchildKeys = this._getIds();\n\t\tfor (i = 0; i < childKeys.length; i++) {\n\t\t\tchild = this._get(childKeys[i]);\n\t\t\tchildPath =\n\t\t\t\tin_pathFromTraversalStart + PathHelper.quotePathSegmentIfNeeded(child.getId());\n\n\t\t\tresult = in_callback(child, childPath);\n\t\t\tif (result !== BREAK_TRAVERSAL) {\n\t\t\t\tresult = child._traverse(in_callback, childPath);\n\t\t\t\tif (result !== BREAK_TRAVERSAL) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn BREAK_TRAVERSAL;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Traverses all static properties (properties declared in the template and not added dynamically) in the\n\t * hierarchy below this node\n\t *\n\t * @param {function} in_callback - Callback to invoke for every property\n\t * @param {string?} in_pathFromTraversalStart - Path from the root of the traversal to this node\n\t *\n\t * @protected\n\t */\n\t_traverseStaticProperties(in_callback, in_pathFromTraversalStart) {\n\t\tin_pathFromTraversalStart = in_pathFromTraversalStart || \"\";\n\t\tvar propertyKeys = _.keys(this._staticChildren);\n\t\tfor (var i = 0; i < propertyKeys.length; i++) {\n\t\t\tvar property = this._staticChildren[propertyKeys[i]];\n\t\t\tvar childPath =\n\t\t\t\tin_pathFromTraversalStart +\n\t\t\t\t(in_pathFromTraversalStart.length !== 0 ? PROPERTY_PATH_DELIMITER : \"\") +\n\t\t\t\tPathHelper.quotePathSegmentIfNeeded(property.getId());\n\n\t\t\t// We only recursively traverse ContainerProperties, since these are used to define the hierarchy within\n\t\t\t// one template\n\t\t\tif (\n\t\t\t\t(property.getTypeid() === \"AbstractStaticCollectionProperty\" ||\n\t\t\t\t\tproperty.getTypeid() === \"ContainerProperty\") &&\n\t\t\t\tproperty.getContext() === \"single\"\n\t\t\t) {\n\t\t\t\tproperty._traverseStaticProperties(in_callback, childPath);\n\t\t\t}\n\t\t\tin_callback(property, childPath);\n\t\t}\n\t}\n\n\t/**\n\t * Serialize the property into a changeSet\n\t *\n\t * @param {boolean} in_dirtyOnly - Only include dirty entries in the serialization\n\t * @param {boolean} in_includeRootTypeid - Include the typeid of the root of the hierarchy\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] - The type of dirtiness to\n\t * use when reporting dirty changes. By default this is `PENDING_CHANGE`.\n\t * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n\t * function will descend into referenced repositories.\n\t * WARNING: if there are loops in the references this can result in an infinite loop.\n\t *\n\t * @return {Object} The serialized representation of this property\n\t * @protected\n\t */\n\t_serialize(\n\t\tin_dirtyOnly,\n\t\tin_includeRootTypeid,\n\t\tin_dirtinessType,\n\t\tin_includeReferencedRepositories,\n\t) {\n\t\tvar serializedChildren = {};\n\t\tvar childrenType;\n\n\t\tin_dirtyOnly = in_dirtyOnly || false;\n\t\tin_dirtinessType =\n\t\t\tin_dirtinessType === undefined\n\t\t\t\t? BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE\n\t\t\t\t: in_dirtinessType;\n\n\t\tthis._traverseStaticProperties(function (in_node, in_pathFromTraversalStart) {\n\t\t\tif (in_dirtyOnly && !in_node._isDirty(in_dirtinessType)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tchildrenType = in_node.getFullTypeid();\n\n\t\t\tif (\n\t\t\t\tchildrenType !== \"AbstractStaticCollectionProperty\" &&\n\t\t\t\tchildrenType !== \"ContainerProperty\"\n\t\t\t) {\n\t\t\t\t// we don't want to keep BaseProperties\n\t\t\t\t// as they mostly behave as 'paths' to\n\t\t\t\t// a ValueProperty.\n\t\t\t\tvar serialized = in_node._serialize(\n\t\t\t\t\tin_dirtyOnly,\n\t\t\t\t\tfalse,\n\t\t\t\t\tin_dirtinessType,\n\t\t\t\t\tin_includeReferencedRepositories,\n\t\t\t\t);\n\n\t\t\t\t// Add the root typeid if requested\n\t\t\t\tif (!ChangeSet.isEmptyChangeSet(serialized) || !in_dirtyOnly) {\n\t\t\t\t\tif (!serializedChildren[childrenType]) {\n\t\t\t\t\t\tserializedChildren[childrenType] = {};\n\t\t\t\t\t}\n\t\t\t\t\tserializedChildren[childrenType][in_pathFromTraversalStart] = serialized;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (in_includeRootTypeid) {\n\t\t\tserializedChildren[\"typeid\"] = this.getFullTypeid();\n\t\t}\n\n\t\treturn serializedChildren;\n\t}\n\n\t/**\n\t * Sets the property to the state in the given normalized changeset\n\t *\n\t * @param { property-changeset.SerializedChangeSet} in_serializedObj - The serialized changeset to apply to this\n\t * node. This has to be an normalized change-set (only containing additions and property assignments.\n\t * Deletes and Modify must not appear)\n\t * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout\n\t * view and trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t * @return {property-changeset.SerializedChangeSet} ChangeSet with the changes that actually were performed during\n\t * the deserialization.\n\t */\n\t_deserialize(in_serializedObj, in_reportToView) {\n\t\tvar changeSet = {};\n\n\t\t// Traverse all properties of this template\n\t\tthis._traverseStaticProperties(function (in_node, in_pathFromTraversalStart) {\n\t\t\t// We do not deserialize base properties, since the traverseStatic function\n\t\t\t// already traverses recursively\n\t\t\tif (in_node.getTypeid() === \"ContainerProperty\" && in_node.getContext() === \"single\") {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar typeid = in_node.getFullTypeid();\n\n\t\t\t// Get the ChangeSet\n\t\t\t// If there is a ChangeSet in the serialized object, we use that as the\n\t\t\t// target ChangeSet, otherwise we use an empty ChangeSet (since properties with\n\t\t\t// empty Sub-ChangeSets are removed from the parent ChangeSet, we have to\n\t\t\t// explicitly use an empty ChangeSet for those)\n\t\t\tvar propertyChangeSet = {};\n\t\t\tif (\n\t\t\t\tin_serializedObj[typeid] !== undefined &&\n\t\t\t\tin_serializedObj[typeid][in_pathFromTraversalStart] !== undefined\n\t\t\t) {\n\t\t\t\tpropertyChangeSet = in_serializedObj[typeid][in_pathFromTraversalStart];\n\t\t\t}\n\n\t\t\t// Deserialize the ChangeSet into the property\n\t\t\tvar changes = in_node._deserialize(propertyChangeSet, false);\n\n\t\t\t// And track the performed modification in the result\n\t\t\tif (!ChangeSet.isEmptyChangeSet(changes)) {\n\t\t\t\tchangeSet[typeid] = changeSet[typeid] || {};\n\t\t\t\tchangeSet[typeid][in_pathFromTraversalStart] = changes;\n\t\t\t}\n\t\t});\n\n\t\t// Finally report the dirtiness to the view (we postponed this above)\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t\treturn changeSet;\n\t}\n\n\t/**\n\t * Get a flattened, tree like representation of this object and all of it's\n\t * descendants. The flattening will stop at primitive properties and collections.\n\t *\n\t * For non-leaf nodes, it is possible to access the corresponding node object itself via the\n\t * propertyNode member of the flattened representation (warning, this will overwrite a\n\t * property of this name).\n\t * TODO: Do we want to have this feature or is it to dangerous?\n\t *\n\t * @return {Object} the flat representation\n\t * @protected\n\t */\n\t_flatten() {\n\t\tvar flattenedRepresentation = {};\n\t\tvar keys = this._getIds();\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tvar key = keys[i];\n\t\t\tvar child = this._get(key);\n\t\t\tif (!child._isFlattenLeaf()) {\n\t\t\t\tflattenedRepresentation[key] = child._flatten();\n\t\t\t} else {\n\t\t\t\tflattenedRepresentation[key] = child;\n\t\t\t}\n\t\t}\n\n\t\tflattenedRepresentation.propertyNode = this;\n\n\t\treturn flattenedRepresentation;\n\t}\n\n\t/**\n\t * Returns the number of children this node has\n\t * @return {number} The number of children\n\t * @private\n\t */\n\t_getChildrenCount() {\n\t\treturn this._getIds().length;\n\t}\n\n\t/**\n\t * Sets constants\n\t * @param {Object} in_constants - The list of typed values.\n\t */\n\t_setConstants(in_constants) {\n\t\tConsoleUtils.assert(\n\t\t\t_.isObject(in_constants),\n\t\t\tMSG.ASSERTION_FAILED + \" setConstants parameter: in_constants must be an object.\",\n\t\t);\n\t\tthis._constantChildren = in_constants;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"abstractStaticCollectionProperty.js","sourceRoot":"","sources":["../../src/properties/abstractStaticCollectionProperty.js"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnF,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACpF,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACnD,MAAM,EAAE,oBAAoB,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAE7E,MAAM,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,SAAS,CAAC;AACnD,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,YAAY,CAAC;AAEtD;;;;;GAKG;AACH,MAAa,gCAAiC,SAAQ,YAAY;IACjE;;;OAGG;IACH,YAAY,SAAS;QACpB,KAAK,CAAC,S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I,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACH,aAAa,CAAC,YAAY;QACzB,YAAY,CAAC,MAAM,CAClB,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,EACxB,GAAG,CAAC,gBAAgB,GAAG,0DAA0D,CACjF,CAAC;QACF,IAAI,CAAC,iBAAiB,GAAG,YAAY,CAAC;IACvC,CAAC;CACD;AAluBD,4EAkuBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst _ = require(\"lodash\");\nconst { ConsoleUtils, constants } = require(\"@fluid-experimental/property-common\");\nconst { PathHelper, ChangeSet } = require(\"@fluid-experimental/property-changeset\");\nconst { BaseProperty } = require(\"./baseProperty\");\nconst { LazyLoadedProperties: Property } = require(\"./lazyLoadedProperties\");\n\nconst { MSG, PROPERTY_PATH_DELIMITER } = constants;\nconst { BREAK_TRAVERSAL, PATH_TOKENS } = BaseProperty;\n\n/**\n * This class serves as a view to read, write and listen to changes in an\n * object's value field. To do this we simply keep a pointer to the object and\n * its associated data field that we are interested in. If no data field is\n * present this property will fail constructing.\n */\nexport class AbstractStaticCollectionProperty extends BaseProperty {\n\t/**\n\t * @param {Object=} in_params - The parameters\n\t * @protected\n\t */\n\tconstructor(in_params) {\n\t\tsuper(in_params);\n\n\t\t// internal management\n\t\tif (!this._staticChildren) {\n\t\t\tthis._staticChildren = {};\n\t\t}\n\t\tthis._constantChildren = {};\n\t}\n\n\t/**\n\t * Returns the sub-property having the given name, or following the given paths, in this property.\n\t *\n\t * @param {string | number | Array<string | number>} in_ids - The ID or IDs of the property or an array of IDs if an array\n\t * is passed, the .get function will be performed on each id in sequence for example .get(['position','x']) is\n\t * equivalent to .get('position').get('x'). If `.get` resolves to a ReferenceProperty, it will, by default, return\n\t * the property that the ReferenceProperty refers to.\n\t * @param {Object} in_options - parameter object\n\t * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS] - How\n\t * should this function behave during reference resolution?\n\t *\n\t * @throws If an in_id is neither a string or an array of strings and numbers.\n\t * @return {BaseProperty | undefined} The property you seek or undefined if none is found.\n\t */\n\tget(in_ids, in_options) {\n\t\tin_options = _.isObject(in_options) ? in_options : {};\n\t\tin_options.referenceResolutionMode =\n\t\t\tin_options.referenceResolutionMode === undefined\n\t\t\t\t? BaseProperty.REFERENCE_RESOLUTION.ALWAYS\n\t\t\t\t: in_options.referenceResolutionMode;\n\n\t\tvar prop = this;\n\t\tif (typeof in_ids === \"string\" || typeof in_ids === \"number\") {\n\t\t\tprop = this._get(in_ids);\n\t\t\tif (in_options.referenceResolutionMode === BaseProperty.REFERENCE_RESOLUTION.ALWAYS) {\n\t\t\t\tif (prop instanceof Property.ReferenceProperty) {\n\t\t\t\t\tprop = prop.ref;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (_.isArray(in_ids)) {\n\t\t\tfor (var i = 0; i < in_ids.length && prop; i++) {\n\t\t\t\tvar mode = in_options.referenceResolutionMode;\n\t\t\t\t// do not do anything with token itself, only changes behavior of path preceding the token;\n\t\t\t\tif (in_ids[i] === PATH_TOKENS.REF) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (mode === BaseProperty.REFERENCE_RESOLUTION.NO_LEAFS) {\n\t\t\t\t\tmode =\n\t\t\t\t\t\ti !== in_ids.length - 1\n\t\t\t\t\t\t\t? BaseProperty.REFERENCE_RESOLUTION.ALWAYS\n\t\t\t\t\t\t\t: BaseProperty.REFERENCE_RESOLUTION.NEVER;\n\t\t\t\t}\n\t\t\t\tif (in_ids[i - 1] === PATH_TOKENS.REF || in_ids[i + 1] === PATH_TOKENS.REF) {\n\t\t\t\t\tmode = BaseProperty.REFERENCE_RESOLUTION.NEVER;\n\t\t\t\t}\n\t\t\t\tprop = prop.get(in_ids[i], { referenceResolutionMode: mode });\n\t\t\t\tif (prop === undefined && i < in_ids.length - 1) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tswitch (in_ids) {\n\t\t\t\tcase PATH_TOKENS.ROOT: {\n\t\t\t\t\tprop = prop.getRoot();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase PATH_TOKENS.UP: {\n\t\t\t\t\tprop = prop.getParent();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase PATH_TOKENS.REF: {\n\t\t\t\t\tthrow new Error(MSG.NO_GET_DEREFERENCE_ONLY);\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tthrow new Error(MSG.STRING_OR_ARRAY_STRINGS + in_ids);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn prop;\n\t}\n\n\t/**\n\t * Returns the sub-property having the given name in this property.\n\t *\n\t * @param {string|number} in_id - The id of the prop you wish to retrieve.\n\t *\n\t * @return {property-properties.BaseProperty | undefined} The property you seek or undefined if none is found.\n\t */\n\t_get(in_id) {\n\t\treturn this._staticChildren[in_id] || this._constantChildren[in_id];\n\t}\n\n\t/**\n\t * Returns a string identifying the property\n\t *\n\t * If an id has been explicitly set on this property we return that one, otherwise the GUID is used.\n\t *\n\t * @return {string} String identifying the property\n\t */\n\tgetId() {\n\t\treturn this._id !== null ? this._id : this.getGuid();\n\t}\n\n\t/**\n\t * Returns the GUID of this named property\n\t * A Guid is a unique identifier for a branch, commit or repository,\n\t * similar to a URN. Most functions in the API will us a URN but the\n\t * Guid is used to traverse the commit graph.\n\t * @return {string} The GUID\n\t */\n\tgetGuid() {\n\t\tvar guid = this.get(\"guid\", {\n\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t});\n\t\treturn guid ? guid.value : undefined;\n\t}\n\n\t/**\n\t * Returns the value of a sub-property This is a shortcut for .get(in_ids, in_options).getValue().\n\t *\n\t * @param {string|number|Array<string|number>} in_ids - The ID or IDs of the property or an array of IDs if an array\n\t * is passed, the .get function will be performed on each id in sequence for example .getValue(['position','x'])\n\t * is equivalent to .get('position').get('x').getValue(). If at any point .get resolves to a ReferenceProperty,\n\t * it will, by default, return the property that the ReferenceProperty refers to.\n\t * @param {Object} in_options - Parameter object\n\t * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS] - How\n\t * should this function behave during reference resolution?\n\t *\n\t * @throws If the in_ids does not resolve to a ValueProperty or StringProperty\n\t * @throws If in_ids is not a string or an array of strings or numbers.\n\t *\n\t * @return {*} The value of the given sub-property\n\t */\n\tgetValue(in_ids, in_options) {\n\t\tvar property = this.get(in_ids, in_options);\n\t\tConsoleUtils.assert(\n\t\t\tproperty instanceof Property.ValueProperty ||\n\t\t\t\tproperty instanceof Property.StringProperty,\n\t\t\tMSG.GET_VALUE_NOT_A_VALUE + in_ids,\n\t\t);\n\t\treturn property.getValue();\n\t}\n\n\t/**\n\t * Get all sub-properties of the current property.\n\t * Caller MUST NOT modify the properties.\n\t * If entries include References, it will return the reference (will not automatically resolve the reference)\n\t * @return {Object.<property-properties.BaseProperty>} An object containing all the properties\n\t */\n\tgetEntriesReadOnly() {\n\t\t/* Note that the implementation is voluntarily generic so that derived classes\n should not have to redefine this function. */\n\t\tvar res = {};\n\t\tvar ids = this.getIds();\n\t\tfor (var i = 0; i < ids.length; i++) {\n\t\t\tres[ids[i]] = this.get(ids[i], {\n\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t});\n\t\t}\n\t\treturn res;\n\t}\n\n\t/**\n\t * Returns the name of all the sub-properties of this property.\n\t *\n\t * @return {Array.<string>} An array of all the property ids\n\t */\n\tgetIds() {\n\t\treturn this._getIds();\n\t}\n\n\t/**\n\t * Returns the name of all the sub-properties of this property.\n\t *\n\t * @return {Array.<string>} An array of all the property ids\n\t */\n\t_getIds() {\n\t\treturn Object.keys(this._staticChildren).concat(Object.keys(this._constantChildren));\n\t}\n\n\t/**\n\t * Returns an object with all the nested values contained in this property.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * position: {\n\t * x: 2,\n\t * y: 5\n\t * }\n\t * }\n\t * ```\n\t */\n\tgetValues() {\n\t\tvar ids = this._getIds();\n\t\tvar result = {};\n\t\tfor (var i = 0; i < ids.length; i++) {\n\t\t\tvar child = this.get(ids[i]);\n\t\t\tif (_.isUndefined(child)) {\n\t\t\t\tresult[ids[i]] = undefined;\n\t\t\t} else if (child._context === \"single\" && child.isPrimitiveType()) {\n\t\t\t\tresult[ids[i]] = child.getValue();\n\t\t\t} else {\n\t\t\t\tresult[ids[i]] = child.getValues();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Checks whether a property with the given name exists\n\t *\n\t * @param {string} in_id - Name of the property\n\t * @return {boolean} True if the property exists. Otherwise false.\n\t */\n\thas(in_id) {\n\t\treturn this._get(in_id) !== undefined;\n\t}\n\n\t/**\n\t * Expand a path returning the property or value at the end.\n\t *\n\t * @param {string} in_path - The path\n\t * @param {Object} in_options - Parameter object\n\t * @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS] - How\n\t * should this function behave during reference resolution?\n\t * @throws If in_path is not a valid path\n\t * @return {BaseProperty | undefined} Resolved path\n\t */\n\tresolvePath(in_path, in_options) {\n\t\tin_options = in_options || {};\n\t\tin_options.referenceResolutionMode =\n\t\t\tin_options.referenceResolutionMode === undefined\n\t\t\t\t? BaseProperty.REFERENCE_RESOLUTION.ALWAYS\n\t\t\t\t: in_options.referenceResolutionMode;\n\n\t\tvar node = this;\n\n\t\t// Tokenize the path string\n\t\tvar tokenTypes = [];\n\t\tvar pathArr = PathHelper.tokenizePathString(in_path, tokenTypes);\n\n\t\t// Return to the repository root, if the path starts with a root token (a / )\n\t\tvar iterationStart = 0;\n\t\tif (pathArr.length > 0) {\n\t\t\tif (tokenTypes[0] === PathHelper.TOKEN_TYPES.PATH_ROOT_TOKEN) {\n\t\t\t\tnode = this.getRoot();\n\t\t\t\titerationStart = 1;\n\t\t\t} else if (tokenTypes[0] === PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN) {\n\t\t\t\tfor (var j = 0; j < pathArr.length; j++) {\n\t\t\t\t\tif (tokenTypes[j] === PathHelper.TOKEN_TYPES.RAISE_LEVEL_TOKEN) {\n\t\t\t\t\t\tvar parent = node.getParent();\n\t\t\t\t\t\tif (parent) {\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t\titerationStart++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (var i = iterationStart; i < pathArr.length && node; i++) {\n\t\t\tif (tokenTypes[i] !== PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN) {\n\t\t\t\tnode = node._resolvePathSegment(pathArr[i], tokenTypes[i]);\n\t\t\t\tif (\n\t\t\t\t\tin_options.referenceResolutionMode ===\n\t\t\t\t\t\tBaseProperty.REFERENCE_RESOLUTION.ALWAYS ||\n\t\t\t\t\t(in_options.referenceResolutionMode ===\n\t\t\t\t\t\tBaseProperty.REFERENCE_RESOLUTION.NO_LEAFS &&\n\t\t\t\t\t\ti !== pathArr.length - 1)\n\t\t\t\t) {\n\t\t\t\t\tif (node instanceof Property.ReferenceProperty) {\n\t\t\t\t\t\tif (tokenTypes[i + 1] !== PathHelper.TOKEN_TYPES.DEREFERENCE_TOKEN) {\n\t\t\t\t\t\t\t// recursive function to resolve nested reference properties\n\t\t\t\t\t\t\tnode = node.ref;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn node;\n\t}\n\n\t/**\n\t * Returns the path segment for a child\n\t *\n\t * @param {property-properties.BaseProperty} in_childNode - The child for which the path is returned\n\t *\n\t * @return {string} The path segment to resolve the child property under this property\n\t * @protected\n\t */\n\t_getPathSegmentForChildNode(in_childNode) {\n\t\treturn PROPERTY_PATH_DELIMITER + PathHelper.quotePathSegmentIfNeeded(in_childNode.getId());\n\t}\n\n\t/**\n\t * Resolves a direct child node based on the given path segment\n\t *\n\t * @param {String} in_segment - The path segment to resolve\n\t * @param {property-properties.PathHelper.TOKEN_TYPES} in_segmentType - The type of segment in the tokenized path\n\t *\n\t * @return {BaseProperty | undefined} The child property that has been resolved\n\t *\n\t * @protected\n\t */\n\t_resolvePathSegment(in_segment, in_segmentType) {\n\t\t// Base Properties only support paths separated via dots\n\t\tif (in_segmentType !== PathHelper.TOKEN_TYPES.PATH_SEGMENT_TOKEN) {\n\t\t\tthrow new Error(MSG.INVALID_PATH_TOKEN + in_segment);\n\t\t}\n\n\t\treturn this.has(in_segment)\n\t\t\t? this.get(in_segment, {\n\t\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t })\n\t\t\t: undefined;\n\t}\n\n\t/**\n\t * Given an object that mirrors a PSet Template, assigns the properties to the values\n\t * found in that object.\n\t * See {@link setValues}\n\t * @param {object | Array | string} in_values - The object containing the nested values to assign\n\t * @param {boolean} in_typed - Whether the values are typed/polymorphic.\n\t * @param {boolean} in_initial - Whether we are setting default/initial values\n\t * or if the function is called directly with the values to set.\n\t * @protected\n\t */\n\t_setValues(in_values, in_typed, in_initial) {\n\t\tConsoleUtils.assert(_.isObject(in_values), MSG.SET_VALUES_PARAM_NOT_OBJECT);\n\n\t\tvar that = this;\n\t\tvar keys = Object.keys(in_values);\n\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tvar propertyKey = keys[i];\n\t\t\tvar propertyValue = in_values[propertyKey];\n\t\t\tvar property = that.get(propertyKey, {\n\t\t\t\treferenceResolutionMode: BaseProperty.REFERENCE_RESOLUTION.NEVER,\n\t\t\t});\n\n\t\t\tif (\n\t\t\t\tproperty instanceof Property.ValueProperty ||\n\t\t\t\tproperty instanceof Property.StringProperty\n\t\t\t) {\n\t\t\t\tproperty.setValue(propertyValue);\n\t\t\t} else if (property instanceof BaseProperty && _.isObject(propertyValue)) {\n\t\t\t\tproperty._setValues(propertyValue, in_typed, in_initial);\n\t\t\t} else if (property instanceof BaseProperty) {\n\t\t\t\tconst typeid = property.getTypeid();\n\t\t\t\tthrow new Error(\n\t\t\t\t\tMSG.SET_VALUES_PATH_PROPERTY + propertyKey + \", of type: \" + typeid,\n\t\t\t\t);\n\t\t\t} else if (property === undefined) {\n\t\t\t\tthrow new Error(MSG.SET_VALUES_PATH_INVALID + propertyKey);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Given an object that mirrors a PSet Template, assigns the properties to the values\n\t * found in that object.\n\t * E.g.\n\t *\n\t * ```\n\t * <pre>\n\t * Templates = {\n\t * properties: [\n\t * { id: 'foo', typeid: 'String' },\n\t * { id: 'bar', properties: [{id: 'baz', typeid: 'Uint32'}] }\n\t * ]\n\t * }\n\t * </pre>\n\t * ```\n\t *\n\t * @param {object | Array | string} in_values - The object containing the nested values to assign\n\t * @throws If in_values is not an object (or in the case of ArrayProperty, an array)\n\t * @throws If one of the path in in_values does not correspond to a path in that property\n\t * @throws If one of the path to a value in in_values leads to a property in this property.\n\t */\n\tsetValues(in_values) {\n\t\tvar checkoutView = this._getCheckoutView();\n\t\tif (checkoutView !== undefined) {\n\t\t\tcheckoutView.pushNotificationDelayScope();\n\t\t\tAbstractStaticCollectionProperty.prototype._setValues.call(\n\t\t\t\tthis,\n\t\t\t\tin_values,\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t);\n\t\t\tcheckoutView.popNotificationDelayScope();\n\t\t} else {\n\t\t\tAbstractStaticCollectionProperty.prototype._setValues.call(\n\t\t\t\tthis,\n\t\t\t\tin_values,\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Append a child property\n\t *\n\t * This is an internal function, called by the PropertyFactory when instantiating a template and internally by the\n\t * NodeProperty. Adding children dynamically by the user is only allowed in the NodeProperty.\n\t *\n\t * @param {property-properties.BaseProperty} in_property - The property to append\n\t * @param {boolean} in_allowChildMerges - Whether merging of children (nested properties) is allowed.\n\t * This is used for extending inherited properties.\n\t *\n\t * @throws {OVERWRITING_ID} - Thrown when adding a property with an existing id.\n\t * @throws {OVERRIDDING_INHERITED_TYPES} - Thrown when overriding inherited typed properties.\n\t *\n\t * @protected\n\t */\n\t_append(in_property, in_allowChildMerges) {\n\t\tvar id = in_property.getId();\n\t\tif (this._staticChildren[id] === undefined) {\n\t\t\tthis._staticChildren[id] = in_property;\n\t\t\tin_property._setParent(this);\n\t\t} else {\n\t\t\tif (!in_allowChildMerges) {\n\t\t\t\tthrow new Error(MSG.OVERWRITING_ID + id);\n\t\t\t}\n\n\t\t\t// if child is untyped then merge its properties\n\t\t\tif (\n\t\t\t\tthis._staticChildren[id].getTypeid() === \"AbstractStaticCollectionProperty\" &&\n\t\t\t\tthis._staticChildren[id].getContext() === \"single\"\n\t\t\t) {\n\t\t\t\t// if the property's type is different than the child type, throw error.\n\t\t\t\tif (this._staticChildren[id].getTypeid() !== in_property.getTypeid()) {\n\t\t\t\t\tthrow new Error(MSG.OVERRIDDING_INHERITED_TYPES + id);\n\t\t\t\t}\n\n\t\t\t\tthis._staticChildren[id]._merge(in_property);\n\t\t\t} else {\n\t\t\t\tthrow new Error(MSG.OVERRIDDING_INHERITED_TYPES + id);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Merge child properties\n\t *\n\t * This is an internal function that merges children of two properties. This is used for extending inherited\n\t * properties.\n\t *\n\t * @param {property-properties.BaseProperty} in_property - The property to merge its children (nested properties)\n\t * with.\n\t *\n\t * @protected\n\t */\n\t_merge(in_property) {\n\t\tvar keys = Object.keys(in_property._staticChildren);\n\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tthis._append(in_property._staticChildren[keys[i]], true);\n\t\t}\n\t}\n\n\t/**\n\t * @inheritdoc\n\t */\n\t_getDirtyChildren(in_flags) {\n\t\tvar flags = in_flags === undefined ? ~BaseProperty.MODIFIED_STATE_FLAGS.CLEAN : in_flags;\n\t\tvar rtn = [];\n\t\tvar childKeys = _.keys(this._staticChildren);\n\t\tfor (var i = 0; i < childKeys.length; i++) {\n\t\t\tif (this._get(childKeys[i])._isDirty(flags) !== 0) {\n\t\t\t\trtn.push(childKeys[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn rtn;\n\t}\n\n\t/**\n\t * Traverses the property hierarchy downwards until all child properties are reached\n\t *\n\t * @param {Function} in_callback - Callback to invoke for each property. The traversal can be stopped by returning\n\t * BaseProperty.BREAK_TRAVERSAL\n\t *\n\t * @throws If in_callback is not a function.\n\t *\n\t * @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted, otherwise\n\t * undefined\n\t */\n\ttraverseDown(in_callback) {\n\t\tConsoleUtils.assert(_.isFunction(in_callback), MSG.CALLBACK_NOT_FCT);\n\t\treturn this._traverse(in_callback, \"\");\n\t}\n\n\t/**\n\t * Traverses all children in the child hierarchy\n\t * TODO: How should this behave for collections?\n\t *\n\t * @param {function} in_callback - Callback to invoke for every child\n\t * @param {string} in_pathFromTraversalStart - Path from the root of the traversal to this node\n\t * @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted,\n\t * otherwise undefined\n\t * @private\n\t */\n\t_traverse(in_callback, in_pathFromTraversalStart) {\n\t\tif (in_pathFromTraversalStart) {\n\t\t\tin_pathFromTraversalStart += PROPERTY_PATH_DELIMITER;\n\t\t}\n\n\t\tvar childKeys, child, childPath, result, i;\n\n\t\tchildKeys = this._getIds();\n\t\tfor (i = 0; i < childKeys.length; i++) {\n\t\t\tchild = this._get(childKeys[i]);\n\t\t\tchildPath =\n\t\t\t\tin_pathFromTraversalStart + PathHelper.quotePathSegmentIfNeeded(child.getId());\n\n\t\t\tresult = in_callback(child, childPath);\n\t\t\tif (result !== BREAK_TRAVERSAL) {\n\t\t\t\tresult = child._traverse(in_callback, childPath);\n\t\t\t\tif (result !== BREAK_TRAVERSAL) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn BREAK_TRAVERSAL;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Traverses all static properties (properties declared in the template and not added dynamically) in the\n\t * hierarchy below this node\n\t *\n\t * @param {function} in_callback - Callback to invoke for every property\n\t * @param {string?} in_pathFromTraversalStart - Path from the root of the traversal to this node\n\t *\n\t * @protected\n\t */\n\t_traverseStaticProperties(in_callback, in_pathFromTraversalStart) {\n\t\tin_pathFromTraversalStart = in_pathFromTraversalStart || \"\";\n\t\tvar propertyKeys = _.keys(this._staticChildren);\n\t\tfor (var i = 0; i < propertyKeys.length; i++) {\n\t\t\tvar property = this._staticChildren[propertyKeys[i]];\n\t\t\tvar childPath =\n\t\t\t\tin_pathFromTraversalStart +\n\t\t\t\t(in_pathFromTraversalStart.length !== 0 ? PROPERTY_PATH_DELIMITER : \"\") +\n\t\t\t\tPathHelper.quotePathSegmentIfNeeded(property.getId());\n\n\t\t\t// We only recursively traverse ContainerProperties, since these are used to define the hierarchy within\n\t\t\t// one template\n\t\t\tif (\n\t\t\t\t(property.getTypeid() === \"AbstractStaticCollectionProperty\" ||\n\t\t\t\t\tproperty.getTypeid() === \"ContainerProperty\") &&\n\t\t\t\tproperty.getContext() === \"single\"\n\t\t\t) {\n\t\t\t\tproperty._traverseStaticProperties(in_callback, childPath);\n\t\t\t}\n\t\t\tin_callback(property, childPath);\n\t\t}\n\t}\n\n\t/**\n\t * Serialize the property into a changeSet\n\t *\n\t * @param {boolean} in_dirtyOnly - Only include dirty entries in the serialization\n\t * @param {boolean} in_includeRootTypeid - Include the typeid of the root of the hierarchy\n\t * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] - The type of dirtiness to\n\t * use when reporting dirty changes. By default this is `PENDING_CHANGE`.\n\t * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n\t * function will descend into referenced repositories.\n\t * WARNING: if there are loops in the references this can result in an infinite loop.\n\t *\n\t * @return {Object} The serialized representation of this property\n\t * @protected\n\t */\n\t_serialize(\n\t\tin_dirtyOnly,\n\t\tin_includeRootTypeid,\n\t\tin_dirtinessType,\n\t\tin_includeReferencedRepositories,\n\t) {\n\t\tvar serializedChildren = {};\n\t\tvar childrenType;\n\n\t\tin_dirtyOnly = in_dirtyOnly || false;\n\t\tin_dirtinessType =\n\t\t\tin_dirtinessType === undefined\n\t\t\t\t? BaseProperty.MODIFIED_STATE_FLAGS.PENDING_CHANGE\n\t\t\t\t: in_dirtinessType;\n\n\t\tthis._traverseStaticProperties(function (in_node, in_pathFromTraversalStart) {\n\t\t\tif (in_dirtyOnly && !in_node._isDirty(in_dirtinessType)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tchildrenType = in_node.getFullTypeid();\n\n\t\t\tif (\n\t\t\t\tchildrenType !== \"AbstractStaticCollectionProperty\" &&\n\t\t\t\tchildrenType !== \"ContainerProperty\"\n\t\t\t) {\n\t\t\t\t// we don't want to keep BaseProperties\n\t\t\t\t// as they mostly behave as 'paths' to\n\t\t\t\t// a ValueProperty.\n\t\t\t\tvar serialized = in_node._serialize(\n\t\t\t\t\tin_dirtyOnly,\n\t\t\t\t\tfalse,\n\t\t\t\t\tin_dirtinessType,\n\t\t\t\t\tin_includeReferencedRepositories,\n\t\t\t\t);\n\n\t\t\t\t// Add the root typeid if requested\n\t\t\t\tif (!ChangeSet.isEmptyChangeSet(serialized) || !in_dirtyOnly) {\n\t\t\t\t\tif (!serializedChildren[childrenType]) {\n\t\t\t\t\t\tserializedChildren[childrenType] = {};\n\t\t\t\t\t}\n\t\t\t\t\tserializedChildren[childrenType][in_pathFromTraversalStart] = serialized;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (in_includeRootTypeid) {\n\t\t\tserializedChildren[\"typeid\"] = this.getFullTypeid();\n\t\t}\n\n\t\treturn serializedChildren;\n\t}\n\n\t/**\n\t * Sets the property to the state in the given normalized changeset\n\t *\n\t * @param { property-changeset.SerializedChangeSet} in_serializedObj - The serialized changeset to apply to this\n\t * node. This has to be an normalized change-set (only containing additions and property assignments.\n\t * Deletes and Modify must not appear)\n\t * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout\n\t * view and trigger a modified event there. When batching updates, this can be prevented via this flag.\n\t * @return {property-changeset.SerializedChangeSet} ChangeSet with the changes that actually were performed during\n\t * the deserialization.\n\t */\n\t_deserialize(in_serializedObj, in_reportToView) {\n\t\tvar changeSet = {};\n\n\t\t// Traverse all properties of this template\n\t\tthis._traverseStaticProperties(function (in_node, in_pathFromTraversalStart) {\n\t\t\t// We do not deserialize base properties, since the traverseStatic function\n\t\t\t// already traverses recursively\n\t\t\tif (in_node.getTypeid() === \"ContainerProperty\" && in_node.getContext() === \"single\") {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar typeid = in_node.getFullTypeid();\n\n\t\t\t// Get the ChangeSet\n\t\t\t// If there is a ChangeSet in the serialized object, we use that as the\n\t\t\t// target ChangeSet, otherwise we use an empty ChangeSet (since properties with\n\t\t\t// empty Sub-ChangeSets are removed from the parent ChangeSet, we have to\n\t\t\t// explicitly use an empty ChangeSet for those)\n\t\t\tvar propertyChangeSet = {};\n\t\t\tif (\n\t\t\t\tin_serializedObj[typeid] !== undefined &&\n\t\t\t\tin_serializedObj[typeid][in_pathFromTraversalStart] !== undefined\n\t\t\t) {\n\t\t\t\tpropertyChangeSet = in_serializedObj[typeid][in_pathFromTraversalStart];\n\t\t\t}\n\n\t\t\t// Deserialize the ChangeSet into the property\n\t\t\tvar changes = in_node._deserialize(propertyChangeSet, false);\n\n\t\t\t// And track the performed modification in the result\n\t\t\tif (!ChangeSet.isEmptyChangeSet(changes)) {\n\t\t\t\tchangeSet[typeid] = changeSet[typeid] || {};\n\t\t\t\tchangeSet[typeid][in_pathFromTraversalStart] = changes;\n\t\t\t}\n\t\t});\n\n\t\t// Finally report the dirtiness to the view (we postponed this above)\n\t\tif (in_reportToView) {\n\t\t\tthis._reportDirtinessToView();\n\t\t}\n\t\treturn changeSet;\n\t}\n\n\t/**\n\t * Get a flattened, tree like representation of this object and all of it's\n\t * descendants. The flattening will stop at primitive properties and collections.\n\t *\n\t * For non-leaf nodes, it is possible to access the corresponding node object itself via the\n\t * propertyNode member of the flattened representation (warning, this will overwrite a\n\t * property of this name).\n\t * TODO: Do we want to have this feature or is it to dangerous?\n\t *\n\t * @return {Object} the flat representation\n\t * @protected\n\t */\n\t_flatten() {\n\t\tvar flattenedRepresentation = {};\n\t\tvar keys = this._getIds();\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tvar key = keys[i];\n\t\t\tvar child = this._get(key);\n\t\t\tflattenedRepresentation[key] = child._isFlattenLeaf() ? child : child._flatten();\n\t\t}\n\n\t\tflattenedRepresentation.propertyNode = this;\n\n\t\treturn flattenedRepresentation;\n\t}\n\n\t/**\n\t * Returns the number of children this node has\n\t * @return {number} The number of children\n\t * @private\n\t */\n\t_getChildrenCount() {\n\t\treturn this._getIds().length;\n\t}\n\n\t/**\n\t * Sets constants\n\t * @param {Object} in_constants - The list of typed values.\n\t */\n\t_setConstants(in_constants) {\n\t\tConsoleUtils.assert(\n\t\t\t_.isObject(in_constants),\n\t\t\tMSG.ASSERTION_FAILED + \" setConstants parameter: in_constants must be an object.\",\n\t\t);\n\t\tthis._constantChildren = in_constants;\n\t}\n}\n"]}
|
|
@@ -7,6 +7,7 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
7
7
|
* @protected
|
|
8
8
|
*/
|
|
9
9
|
protected constructor();
|
|
10
|
+
_dirty: any;
|
|
10
11
|
_scope: string;
|
|
11
12
|
/**
|
|
12
13
|
* Insert into the array at a given position.
|
|
@@ -78,16 +79,48 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
78
79
|
* @throws if in_position is smaller than zero
|
|
79
80
|
*/
|
|
80
81
|
set(in_position: number, in_value: any): void;
|
|
82
|
+
/**
|
|
83
|
+
* Sets the values of items in the array.
|
|
84
|
+
* If values are typed, iterates through the values and creates a property with the defined type and value.
|
|
85
|
+
*
|
|
86
|
+
* See {@link ArrayProperty.setValues}
|
|
87
|
+
*
|
|
88
|
+
* @param {Array | string} in_values - The list of typed values.
|
|
89
|
+
* @param {boolean} in_typed - Whether the values are typed/polymorphic.
|
|
90
|
+
* @param {boolean} in_initial - Whether we are setting default/initial values
|
|
91
|
+
* or if the function is called directly with the values to set.
|
|
92
|
+
* @protected
|
|
93
|
+
* @override
|
|
94
|
+
*/
|
|
95
|
+
protected override _setValues(in_values: any[] | string, in_typed: boolean, in_initial: boolean): void;
|
|
81
96
|
/**
|
|
82
97
|
* See {@link ArrayProperty.setValues}
|
|
83
98
|
*
|
|
84
99
|
* @param {Array | string} in_values - an array or object containing the values to be set.
|
|
85
100
|
*/
|
|
86
101
|
_setValuesInternal(in_values: any[] | string): void;
|
|
102
|
+
/**
|
|
103
|
+
* Sets the values of items in the array.
|
|
104
|
+
* If called using an array (e.g. setValues([prop1, prop2])), it will overwrite the whole array.
|
|
105
|
+
* If called using an object with indexes (e.g. setValues{0: prop1}), it will only overwrite the
|
|
106
|
+
* items at those indexes.
|
|
107
|
+
* For arrays of Properties, this can be used to set nested values in properties found in the array.
|
|
108
|
+
* For example: setValues({0: {position: {x: 2, y:3}}});
|
|
109
|
+
* @param {Array | string} in_values - An array or object containing the values to be set.
|
|
110
|
+
* @throws if one of the path in in_values does not correspond to a path in the property
|
|
111
|
+
*/
|
|
112
|
+
setValues(in_values: any[] | string): void;
|
|
87
113
|
/**
|
|
88
114
|
* Deletes all values from an array
|
|
89
115
|
*/
|
|
90
116
|
clear(): void;
|
|
117
|
+
/**
|
|
118
|
+
* @return {Array<*> | String} all values in the ArrayProperty
|
|
119
|
+
* If called on StringProperty, it returns the whole string
|
|
120
|
+
* WARNING: the returned array must be read only, data written to it
|
|
121
|
+
* will get lost.
|
|
122
|
+
*/
|
|
123
|
+
getEntriesReadOnly(): Array<any> | string;
|
|
91
124
|
/**
|
|
92
125
|
* Private helper function to update the internal dirty and pending changes
|
|
93
126
|
* is overwritten by StringProperty
|
|
@@ -115,6 +148,16 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
115
148
|
* passed, no change will be applied. undefined indicates that the changes should be reset
|
|
116
149
|
*/
|
|
117
150
|
_setChanges(in_pending: any, in_dirty: any): void;
|
|
151
|
+
/**
|
|
152
|
+
* Sets the dirty flags for this property
|
|
153
|
+
* @param {Number} in_flags - The dirty flags
|
|
154
|
+
*/
|
|
155
|
+
_setDirtyFlags(in_flags: number): void;
|
|
156
|
+
/**
|
|
157
|
+
* Gets the dirty flags for this property
|
|
158
|
+
* @return {Number} The dirty flags
|
|
159
|
+
*/
|
|
160
|
+
_getDirtyFlags(): number;
|
|
118
161
|
/**
|
|
119
162
|
* Inserts the content of a given array into the array property
|
|
120
163
|
* It will not overwrite the existing values but push them to the right instead.
|
|
@@ -194,10 +237,66 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
194
237
|
* @param {Array<*>} in_array - contains the elements to be set
|
|
195
238
|
*/
|
|
196
239
|
_modifyRangeWithoutDirtying(in_offset: number, in_array: Array<any>): void;
|
|
240
|
+
/**
|
|
241
|
+
* Gets the array element at a given index
|
|
242
|
+
* @param {number | Array<string | number>} in_position - The target index if an array is passed, elements in the
|
|
243
|
+
* array will be treated as part of a path. The first item in an array should be a position in the array. For
|
|
244
|
+
* example, .get([0,'position','x']) is the equivalent of .get(0).get('position').get('x') If it encounters a
|
|
245
|
+
* ReferenceProperty, .get will, by default, resolve the property it refers to.
|
|
246
|
+
* @param {Object} in_options - Parameter object
|
|
247
|
+
* @param {property-properties.BaseProperty.REFERENCE_RESOLUTION} [in_options.referenceResolutionMode=ALWAYS] - How
|
|
248
|
+
* should this function behave during reference resolution?
|
|
249
|
+
* @throws if in_position is an array and the first item in the array is not a number
|
|
250
|
+
* @throws if in_position is neither an array nor a number.
|
|
251
|
+
* @throws if in_position is smaller than zero or larger than the length of the array.
|
|
252
|
+
* @return {* | property-properties.BaseProperty | undefined} The element at that index - either a property or a
|
|
253
|
+
* value. or undefined if nothing was found.
|
|
254
|
+
*/
|
|
255
|
+
get(in_position: number | Array<string | number>, in_options: any): any | property;
|
|
256
|
+
/**
|
|
257
|
+
* Returns an object with all the nested values contained in this property
|
|
258
|
+
* @return { Array } an array of objects or values representing the values of your property.
|
|
259
|
+
* For example:
|
|
260
|
+
*
|
|
261
|
+
* ```json
|
|
262
|
+
* [
|
|
263
|
+
* {
|
|
264
|
+
* position: {
|
|
265
|
+
* x: 2,
|
|
266
|
+
* y: 5
|
|
267
|
+
* }
|
|
268
|
+
* },
|
|
269
|
+
* {
|
|
270
|
+
* position: {
|
|
271
|
+
* x: 1,
|
|
272
|
+
* y: -8
|
|
273
|
+
* }
|
|
274
|
+
* }
|
|
275
|
+
* ]
|
|
276
|
+
* ```
|
|
277
|
+
*
|
|
278
|
+
* or for a Value Array: `[1, 3, 6]`
|
|
279
|
+
*/
|
|
280
|
+
getValues(): any[];
|
|
197
281
|
/**
|
|
198
282
|
* @return {Number} the current length of the array
|
|
199
283
|
*/
|
|
200
284
|
getLength(): number;
|
|
285
|
+
/**
|
|
286
|
+
* @inheritdoc
|
|
287
|
+
*/
|
|
288
|
+
_applyChangeset(in_changeSet: any, in_reportToView: any): void;
|
|
289
|
+
/**
|
|
290
|
+
* @inheritdoc
|
|
291
|
+
*/
|
|
292
|
+
_reapplyDirtyFlags(in_pendingChangeSet: any, in_dirtyChangeSet: any): void;
|
|
293
|
+
/**
|
|
294
|
+
* Removes the dirtiness flag from this property and recursively from all of its children.
|
|
295
|
+
*
|
|
296
|
+
* @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] - The flags to clean.
|
|
297
|
+
* If none are supplied, all will be removed.
|
|
298
|
+
*/
|
|
299
|
+
cleanDirty(in_dirtinessType: any): void;
|
|
201
300
|
/**
|
|
202
301
|
* Internal helper function that implements the deserialize algorithm for an array of named properties.
|
|
203
302
|
*
|
|
@@ -245,11 +344,39 @@ export class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
245
344
|
* @return {Array} in_array - The array of special objects that were deserialized
|
|
246
345
|
*/
|
|
247
346
|
_deserializeArray(in_serializedObj: any): any[];
|
|
347
|
+
/**
|
|
348
|
+
* @inheritdoc
|
|
349
|
+
*
|
|
350
|
+
* @param {object} [in_filteringOptions = {}] - The filtering options to consider while deserializing the property.
|
|
351
|
+
* @param {boolean} [in_createChangeSet = true] - Should a changeset be created for this deserialization?
|
|
352
|
+
*/
|
|
353
|
+
_deserialize(in_serializedObj: any, in_reportToView: any, in_filteringOptions?: object, in_createChangeSet?: boolean): any;
|
|
248
354
|
_getChangesetForCustomTypeArray(in_basePropertyChangeset: any, in_dirtinessType: any, in_includeReferencedRepositories: any): {
|
|
249
355
|
remove: any;
|
|
250
356
|
modify: any[];
|
|
251
357
|
insert: any[];
|
|
252
358
|
};
|
|
359
|
+
/**
|
|
360
|
+
* Repeatedly calls back the given function with human-readable string
|
|
361
|
+
* representations of the property and of its sub-properties.
|
|
362
|
+
* @param {string} indent - Leading spaces to create the tree representation
|
|
363
|
+
* @param {string} externalId - Name of the current property at the upper level. Used for arrays.
|
|
364
|
+
* @param {function} printFct - Function to call for printing each property
|
|
365
|
+
*/
|
|
366
|
+
_prettyPrint(indent: string, externalId: string, printFct: Function): void;
|
|
367
|
+
/**
|
|
368
|
+
* Repeatedly calls back the given function with human-readable string
|
|
369
|
+
* representations of the property's sub-properties.
|
|
370
|
+
* @param {string} indent - Leading spaces to create the tree representation
|
|
371
|
+
* @param {function} printFct - Function to call for printing each property
|
|
372
|
+
*/
|
|
373
|
+
_prettyPrintChildren(indent: string, printFct: Function): void;
|
|
374
|
+
/**
|
|
375
|
+
* Return a JSON representation of the array and its items.
|
|
376
|
+
* @return {object} A JSON representation of the array and its items.
|
|
377
|
+
* @protected
|
|
378
|
+
*/
|
|
379
|
+
protected _toJson(): object;
|
|
253
380
|
/**
|
|
254
381
|
* Creates and initializes the data array
|
|
255
382
|
* @param {Number} in_length - The initial length of the array
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrayProperty.d.ts","sourceRoot":"","sources":["../../src/properties/arrayProperty.js"],"names":[],"mappings":"AAqJA;IACC;;;;;;OAMG;IACH,wBAaC;
|
|
1
|
+
{"version":3,"file":"arrayProperty.d.ts","sourceRoot":"","sources":["../../src/properties/arrayProperty.js"],"names":[],"mappings":"AAqJA;IACC;;;;;;OAMG;IACH,wBAaC;IARA,YAAuB;IAItB,eAAsB;IA0DxB;;;;;;;;;OASG;IACH,oBAPW,MAAM,uBAShB;IAaD;;;;;;;OAOG;IACH,sBAFY,MAAM,CASjB;IAED;;OAEG;IACH,gCAEC;IAED;;;;;;;;;OASG;IACH,yBAFY,MAAM,CASjB;IAED;;;;;;;;;OASG;IACH,oBANW,MAAM,YAUhB;IAED;;;;OAIG;IACH,gBAUC;IAED;;;OAGG;IACH,SAFY,cAAU,CAYrB;IAED;;OAEG;IACH,eAEC;IAED;;;;;;;OAOG;IACH,iBALW,MAAM,uBAUhB;IAED;;;;;;;;;;;;OAYG;IACH,yCAPW,QAAQ,MAAM,YACd,OAAO,cACP,OAAO,QA0CjB;IAED;;;;OAIG;IACH,8BAFW,QAAQ,MAAM,QAyCxB;IAED;;;;;;;;;OASG;IACH,qBAHW,QAAQ,MAAM,QAYxB;IAED;;OAEG;IACH,cAIC;IAED;;;;;OAKG;IACH,sBALY,UAAQ,SAAS,CAO5B;IAED;;;;;;OAMG;IACH,uBAgBC;IAED;;;OAGG;IACH,+BAEC;IAED;;;OAGG;IACH,6BAEC;IAED;;;;;;;OAOG;IACH,kDAkCC;IAED;;;OAGG;IACH,uCAkBC;IAED;;;OAGG;IACH,yBAMC;IAED;;;;;;;;;;;OAWG;IACH,uBARW,MAAM,YACN,UAAQ,QAsBlB;IAED;;;;;;;;OAQG;I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IACH,kDAFW,QAAQ,MAAM,QAIxB;IAqBD,wBAEC;IARD;;OAEG;IACH,qBAEC;CAID"}
|
|
@@ -716,7 +716,7 @@ class BaseProperty {
|
|
|
716
716
|
if (foundAncestor === BREAK_TRAVERSAL) {
|
|
717
717
|
var result = path.reverse().join("");
|
|
718
718
|
// We don't use a PROPERTY_PATH_DELIMITER at the start of the path
|
|
719
|
-
if (result
|
|
719
|
+
if (result.startsWith(PROPERTY_PATH_DELIMITER)) {
|
|
720
720
|
result = result.substr(1);
|
|
721
721
|
}
|
|
722
722
|
return result;
|
|
@@ -832,7 +832,7 @@ class BaseProperty {
|
|
|
832
832
|
});
|
|
833
833
|
var absolutePath = path.reverse().join("");
|
|
834
834
|
// We don't use the property path separator at the start of the path
|
|
835
|
-
if (absolutePath
|
|
835
|
+
if (absolutePath.startsWith(PROPERTY_PATH_DELIMITER)) {
|
|
836
836
|
absolutePath = absolutePath.substr(1);
|
|
837
837
|
}
|
|
838
838
|
absolutePath = "/" + absolutePath;
|