@fluid-experimental/property-properties 0.59.1001-62246 → 0.59.2000

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 (86) hide show
  1. package/dist/properties/abstractStaticCollectionProperty.d.ts +5 -5
  2. package/dist/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
  3. package/dist/properties/abstractStaticCollectionProperty.js +3 -3
  4. package/dist/properties/abstractStaticCollectionProperty.js.map +1 -1
  5. package/dist/properties/intProperties.d.ts +4 -4
  6. package/dist/properties/intProperties.d.ts.map +1 -1
  7. package/dist/properties/intProperties.js +2 -2
  8. package/dist/properties/intProperties.js.map +1 -1
  9. package/dist/propertyUtils.d.ts +1 -1
  10. package/dist/propertyUtils.js +1 -1
  11. package/dist/propertyUtils.js.map +1 -1
  12. package/dist/test/tsconfig.tsbuildinfo +6 -6
  13. package/lib/containerSerializer.d.ts +27 -0
  14. package/lib/containerSerializer.d.ts.map +1 -0
  15. package/lib/enableValidations.d.ts +15 -0
  16. package/lib/enableValidations.d.ts.map +1 -0
  17. package/lib/index.d.ts +25 -0
  18. package/lib/index.d.ts.map +1 -0
  19. package/lib/properties/abstractStaticCollectionProperty.d.ts +153 -0
  20. package/lib/properties/abstractStaticCollectionProperty.d.ts.map +1 -0
  21. package/lib/properties/abstractStaticCollectionProperty.js +3 -3
  22. package/lib/properties/abstractStaticCollectionProperty.js.map +1 -1
  23. package/lib/properties/arrayProperty.d.ts +315 -0
  24. package/lib/properties/arrayProperty.d.ts.map +1 -0
  25. package/lib/properties/baseProperty.d.ts +594 -0
  26. package/lib/properties/baseProperty.d.ts.map +1 -0
  27. package/lib/properties/boolProperty.d.ts +12 -0
  28. package/lib/properties/boolProperty.d.ts.map +1 -0
  29. package/lib/properties/containerProperty.d.ts +102 -0
  30. package/lib/properties/containerProperty.d.ts.map +1 -0
  31. package/lib/properties/enumArrayProperty.d.ts +60 -0
  32. package/lib/properties/enumArrayProperty.d.ts.map +1 -0
  33. package/lib/properties/enumProperty.d.ts +36 -0
  34. package/lib/properties/enumProperty.d.ts.map +1 -0
  35. package/lib/properties/floatProperties.d.ts +32 -0
  36. package/lib/properties/floatProperties.d.ts.map +1 -0
  37. package/lib/properties/index.d.ts +29 -0
  38. package/lib/properties/index.d.ts.map +1 -0
  39. package/lib/properties/indexedCollectionBaseProperty.d.ts +74 -0
  40. package/lib/properties/indexedCollectionBaseProperty.d.ts.map +1 -0
  41. package/lib/properties/intProperties.d.ts +132 -0
  42. package/lib/properties/intProperties.d.ts.map +1 -0
  43. package/lib/properties/intProperties.js +2 -2
  44. package/lib/properties/intProperties.js.map +1 -1
  45. package/lib/properties/lazyLoadedProperties.d.ts +14 -0
  46. package/lib/properties/lazyLoadedProperties.d.ts.map +1 -0
  47. package/lib/properties/mapProperty.d.ts +84 -0
  48. package/lib/properties/mapProperty.d.ts.map +1 -0
  49. package/lib/properties/namedNodeProperty.d.ts +25 -0
  50. package/lib/properties/namedNodeProperty.d.ts.map +1 -0
  51. package/lib/properties/namedProperty.d.ts +20 -0
  52. package/lib/properties/namedProperty.d.ts.map +1 -0
  53. package/lib/properties/nodeProperty.d.ts +17 -0
  54. package/lib/properties/nodeProperty.d.ts.map +1 -0
  55. package/lib/properties/primitiveTypeCasts.d.ts +15 -0
  56. package/lib/properties/primitiveTypeCasts.d.ts.map +1 -0
  57. package/lib/properties/referenceArrayProperty.d.ts +47 -0
  58. package/lib/properties/referenceArrayProperty.d.ts.map +1 -0
  59. package/lib/properties/referenceMapProperty.d.ts +46 -0
  60. package/lib/properties/referenceMapProperty.d.ts.map +1 -0
  61. package/lib/properties/referenceProperty.d.ts +59 -0
  62. package/lib/properties/referenceProperty.d.ts.map +1 -0
  63. package/lib/properties/setProperty.d.ts +69 -0
  64. package/lib/properties/setProperty.d.ts.map +1 -0
  65. package/lib/properties/stringProperty.d.ts +39 -0
  66. package/lib/properties/stringProperty.d.ts.map +1 -0
  67. package/lib/properties/uintProperties.d.ts +47 -0
  68. package/lib/properties/uintProperties.d.ts.map +1 -0
  69. package/lib/properties/valueArrayProperty.d.ts +216 -0
  70. package/lib/properties/valueArrayProperty.d.ts.map +1 -0
  71. package/lib/properties/valueMapProperty.d.ts +224 -0
  72. package/lib/properties/valueMapProperty.d.ts.map +1 -0
  73. package/lib/properties/valueProperty.d.ts +50 -0
  74. package/lib/properties/valueProperty.d.ts.map +1 -0
  75. package/lib/propertyFactory.d.ts +3 -0
  76. package/lib/propertyFactory.d.ts.map +1 -0
  77. package/lib/propertyTemplate.d.ts +137 -0
  78. package/lib/propertyTemplate.d.ts.map +1 -0
  79. package/lib/propertyTemplateWrapper.d.ts +74 -0
  80. package/lib/propertyTemplateWrapper.d.ts.map +1 -0
  81. package/lib/propertyUtils.d.ts +15 -0
  82. package/lib/propertyUtils.d.ts.map +1 -0
  83. package/lib/propertyUtils.js +1 -1
  84. package/lib/propertyUtils.js.map +1 -1
  85. package/package.json +8 -5
  86. package/src/index.d.ts +3 -3
@@ -0,0 +1,594 @@
1
+ import { ChangeSet, PathHelper, SerializedChangeSet } from '@fluid-experimental/property-changeset';
2
+ /**
3
+ * Determines in which cases a reference will automatically be resolved
4
+ */
5
+ declare enum REFERENCE_RESOLUTION {
6
+ /** The resolution will always automatically follow references */
7
+ ALWAYS = 0,
8
+ /** If a reference is the last entry during the path resolution, it will not automatically be resolved */
9
+ NO_LEAFS = 1,
10
+ /** References are never automatically resolved */
11
+ NEVER = 2
12
+ }
13
+ /**
14
+ * Used to indicate the state of a property. These flags can be connected via OR.
15
+ */
16
+ declare enum MODIFIED_STATE_FLAGS {
17
+ /** No changes to this property at the moment */
18
+ CLEAN = 0,
19
+ /** The property is marked as changed in the currently pending ChangeSet */
20
+ PENDING_CHANGE = 1,
21
+ /** The property has been modified and the result has not yet been reported to the application for scene updates */
22
+ DIRTY = 2
23
+ }
24
+ interface IBasePropertyParams {
25
+ /** id of the property */
26
+ id?: string;
27
+ /** The type unique identifier */
28
+ typeid?: string;
29
+ /** The length of the property. Only valid if the property is an array, otherwise the length defaults to 1 */
30
+ length: number;
31
+ /** The type of property this template represents i.e. single, array, map, set. */
32
+ context: string;
33
+ /** List of property templates that are used to define children properties */
34
+ properties: BaseProperty[];
35
+ /** List of property template typeids that this PropertyTemplate inherits from */
36
+ inherits: string[];
37
+ }
38
+ interface ISerializeOptions {
39
+ /** Only include dirty entries in the serialization */
40
+ dirtyOnly?: boolean;
41
+ /** Include the typeid of the root of the hierarchy */
42
+ includeRootTypeid?: boolean;
43
+ /** The type of dirtiness to use when reporting dirty changes. */
44
+ dirtinessType?: MODIFIED_STATE_FLAGS;
45
+ /**
46
+ * If this is set to true, the serialize
47
+ * function will descend into referenced repositories. WARNING: if there are loops in the references
48
+ * this can result in an infinite loop
49
+ */
50
+ includeReferencedRepositories?: boolean;
51
+ }
52
+ /**
53
+ * The options to selectively create only a subset of a property.
54
+ *
55
+ * For now the filtering options are propagated by many functions, but are actually used only by
56
+ * functions that create properties from schemas. It is then possible to create only a subset of
57
+ * the properties of a schema by providing a restricted list of paths.
58
+ *
59
+ * Thus, with the filtering options, it is NOT possible to prevent a part of a ChangeSet from being
60
+ * processed (in `applyChangeSet()` for example), it is NOT possible to prevent a property from being
61
+ * created by a direct call to a function like `deserialize()` or `createProperty()`.
62
+ *
63
+ */
64
+ export declare abstract class BaseProperty {
65
+ protected _id: string | undefined;
66
+ protected _isConstant: boolean;
67
+ protected _dirty: MODIFIED_STATE_FLAGS;
68
+ protected _typeid: string;
69
+ protected _context: string;
70
+ protected _parent: BaseProperty | undefined;
71
+ protected _noDirtyInBase: boolean;
72
+ _tree: any;
73
+ _checkoutView: any;
74
+ _checkedOutRepositoryInfo: any;
75
+ constructor(in_params: IBasePropertyParams);
76
+ static MODIFIED_STATE_FLAGS: typeof MODIFIED_STATE_FLAGS;
77
+ static REFERENCE_RESOLUTION: typeof REFERENCE_RESOLUTION;
78
+ static PATH_TOKENS: {
79
+ /** A / at the beginning of the path */
80
+ ROOT: {
81
+ token: string;
82
+ };
83
+ /** A * that indicates a dereferencing operation */ REF: {
84
+ token: string;
85
+ };
86
+ /** A ../ that indicates one step above the current path */
87
+ UP: {
88
+ token: string;
89
+ };
90
+ };
91
+ /**
92
+ * @returns The typeid of this property
93
+ */
94
+ getTypeid(): string;
95
+ /**
96
+ * @returns The context of this property
97
+ */
98
+ getContext(): string;
99
+ /**
100
+ * Get the scope to which this property belongs to.
101
+ * @returns The guid representing the scope in which the
102
+ * property belongs to
103
+ */
104
+ protected _getScope(): string | undefined;
105
+ /**
106
+ * Returns the full property type identifier for the ChangeSet including the enum type id
107
+ * @param in_hideCollection - if true the collection type (if applicable) will be omitted
108
+ * since that is not applicable here, this param is ignored
109
+ * @returns The typeid
110
+ */
111
+ getFullTypeid(in_hideCollection?: boolean): string;
112
+ /**
113
+ * Updates the parent for the property
114
+ *
115
+ * @param in_property - The parent property
116
+ */
117
+ protected _setParent(in_property: BaseProperty): void;
118
+ /**
119
+ * Is this property the root of the property set tree?
120
+ *
121
+ * @returns True if it is a root, otherwise false.
122
+ */
123
+ isRoot(): boolean;
124
+ /**
125
+ * Is this property the ancestor of in_otherProperty?
126
+ * Note: A property is not considered an ancestor of itself
127
+ * @param in_otherProperty - possible descendant
128
+ * @throws if in_otherProperty is not defined.
129
+ * @returns True if it is a ancestor, otherwise false.
130
+ */
131
+ isAncestorOf(in_otherProperty: BaseProperty): boolean;
132
+ /**
133
+ * Is this property the descendant of in_otherProperty?
134
+ * Note: A property is not considered a descendant of itself
135
+ * @param in_otherProperty - possible ancestor
136
+ * @throws if in_otherProperty is not defined.
137
+ * @returns True if it is a descendant, otherwise false.
138
+ */
139
+ isDescendantOf(in_otherProperty: BaseProperty): boolean;
140
+ /**
141
+ * Is this property a leaf node with regard to flattening?
142
+ *
143
+ * TODO: Which semantics should flattening have? It stops at primitive types and collections?
144
+ *
145
+ * @returns True if it is a leaf with regard to flattening
146
+ */
147
+ _isFlattenLeaf(): boolean;
148
+ /**
149
+ * Get the parent of this property
150
+ *
151
+ * @returns The parent of this property (or undefined if none exist)
152
+ */
153
+ getParent(): BaseProperty | undefined;
154
+ /**
155
+ * checks whether the property is dynamic (only properties inherting from NodeProperty are)
156
+ * @returns True if it is a dynamic property.
157
+ */
158
+ isDynamic(): boolean;
159
+ /**
160
+ * Sets the property as dirty and/or pending. This will add one or both flags if not already set and will
161
+ * do the same for its parent. This does not clear any flag, it only sets.
162
+ *
163
+ * @param in_reportToView - By default, the dirtying will always be reported to the checkout view
164
+ * and trigger a modified event there. When batching updates, this
165
+ * can be prevented via this flag.
166
+ * @param in_callingChild - The child which is dirtying its parent
167
+ * @param in_flags - The flags to set.
168
+ * @private
169
+ */
170
+ _setDirty(in_reportToView?: boolean, in_callingChild?: BaseProperty, in_flags?: MODIFIED_STATE_FLAGS): void;
171
+ /**
172
+ * Sets the dirty flags for this property
173
+ * @param in_flags - The dirty flags
174
+ */
175
+ _setDirtyFlags(in_flags: MODIFIED_STATE_FLAGS): void;
176
+ /**
177
+ * Gets the dirty flags for this property
178
+ * @returns The dirty flags
179
+ */
180
+ _getDirtyFlags(): MODIFIED_STATE_FLAGS;
181
+ /**
182
+ * Helper function, which reports the fact that a property has been dirtied to the checkout view
183
+ * @private
184
+ */
185
+ _reportDirtinessToView(): void;
186
+ /**
187
+ * Modifies the property according to the given changeset
188
+ *
189
+ * @param in_changeSet - The changeset to apply
190
+ * @param {property-properties.BaseProperty.PathFilteringOptions} [in_filteringOptions]
191
+ * The filtering options to consider while applying the ChangeSet.
192
+ * @throws if in_changeSet is invalid.
193
+ */
194
+ applyChangeSet(in_changeSet: SerializedChangeSet): void;
195
+ /**
196
+ * Modifies the property according to the given changeset
197
+ *
198
+ * Internal function.
199
+ *
200
+ * @param in_changeSet - The changeset to apply
201
+ * @param in_reportToView - By default, the dirtying will always be reported to the checkout view
202
+ * and trigger a modified event there. When batching updates, this
203
+ * can be prevented via this flag.
204
+ * @param {property-properties.BaseProperty.PathFilteringOptions} [in_filteringOptions]
205
+ * The filtering options to consider while applying the ChangeSet. For now it is only used to
206
+ * control property creation, to prevent properties from being created outside the checked out
207
+ * paths. It does not validate that a value inside the ChangeSet is outside those paths.
208
+ */
209
+ _applyChangeset(in_changeSet: SerializedChangeSet, in_reportToView?: boolean, in_filteringOptions?: any): void;
210
+ /**
211
+ * Re-apply dirty flags from changesets
212
+ *
213
+ * Internal function.
214
+ *
215
+ * @param in_pendingChangeSet - The pending changeset to apply
216
+ * @param in_dirtyChangeSet - The dirty changeset to apply
217
+ * @throws if changeset arguments are invalid.
218
+ */
219
+ _reapplyDirtyFlags(in_pendingChangeSet: SerializedChangeSet, in_dirtyChangeSet: SerializedChangeSet): void;
220
+ protected resolvePath(path: string, params?: any): BaseProperty;
221
+ /**
222
+ * Removes the dirtiness flag from this property
223
+ * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean, if none are supplied all
224
+ * will be removed
225
+ * @private
226
+ */
227
+ _cleanDirty(in_flags: any): void;
228
+ /**
229
+ * Removes the dirtiness flag from this property and recursively from all of its children
230
+ *
231
+ * @param in_flags - The flags to clean, if none are supplied all
232
+ * will be removed
233
+ */
234
+ cleanDirty(in_flags: MODIFIED_STATE_FLAGS): void;
235
+ /**
236
+ * Indicates that the property has been modified and a corresponding modified call has not yet been sent to the
237
+ * application for runtime scene updates.
238
+ *
239
+ * @param in_dirtinessType - The type of dirtiness to check for. By default this is DIRTY
240
+ * @returns Is the property dirty?
241
+ */
242
+ _isDirty(in_dirtinessType?: MODIFIED_STATE_FLAGS): boolean;
243
+ /**
244
+ * Indicates that the property has been modified and a corresponding modified call has not yet been sent to the
245
+ * application for runtime scene updates.
246
+ *
247
+ * @returns True if the property is dirty. False otherwise.
248
+ */
249
+ isDirty(): boolean;
250
+ /**
251
+ * The property has pending changes in the current ChangeSet.
252
+ * @returns True if the property has pending changes. False otherwise.
253
+ */
254
+ hasPendingChanges(): boolean;
255
+ /**
256
+ * Returns the ChangeSet of all sub-properties
257
+ *
258
+ * @returns The serialized changes
259
+ */
260
+ getPendingChanges(): ChangeSet;
261
+ /**
262
+ * Get the id of this property
263
+ *
264
+ * @returns The id of the property
265
+ */
266
+ getId(): string | undefined;
267
+ /**
268
+ * Sets the checkedOutRepositoryInfo.
269
+ * @param {property-properties.CheckoutView~CheckedOutRepositoryInfo} value - The checkedOut repository info.
270
+ * @protected
271
+ */
272
+ _setCheckoutView(value: any): void;
273
+ /**
274
+ * Returns the checkoutView
275
+ * @return {property-properties.CheckoutView} - the checkout view
276
+ */
277
+ _getCheckoutView(): any;
278
+ /**
279
+ * Returns the checkedOutRepositoryInfo.
280
+ * @return {property-properties.CheckoutView~CheckedOutRepositoryInfo} The checkedOut repository info.
281
+ * @protected
282
+ */
283
+ _getCheckedOutRepositoryInfo(): any;
284
+ /**
285
+ * Returns the Workspace
286
+ * @returns The workspace containing the property.
287
+ */
288
+ getWorkspace(): any;
289
+ /**
290
+ * Returns the path segment for a child
291
+ *
292
+ * @param in_childNode - The child for which the path is returned
293
+ *
294
+ * @returns The path segment to resolve the child property under this property
295
+ */
296
+ _getPathSegmentForChildNode(in_childNode: BaseProperty): string;
297
+ /**
298
+ * Resolves a direct child node based on the given path segment
299
+ *
300
+ * @param {String} in_segment - The path segment to resolve
301
+ * @param {property-properties.PathHelper.TOKEN_TYPES} in_segmentType - The type of segment in the tokenized path
302
+ *
303
+ * @return {property-properties.BaseProperty|undefined} The child property that has been resolved
304
+ * @protected
305
+ */
306
+ _resolvePathSegment(in_segment: string, in_segmentType: PathHelper.TOKEN_TYPES): BaseProperty;
307
+ /**
308
+ * Set the id of this property
309
+ *
310
+ * @param {string} in_id - The id for this property
311
+ *
312
+ * @return {string} the new id
313
+ * @private
314
+ */
315
+ _setId(in_id: any): string | number;
316
+ /**
317
+ * Return a clone of this property
318
+ * @returns The cloned property
319
+ */
320
+ clone(): BaseProperty;
321
+ /**
322
+ * Returns true if the property is a primitive type
323
+ * @return {boolean} true if the property is a primitive type
324
+ */
325
+ isPrimitiveType(): boolean;
326
+ /**
327
+ * Get a flattened, tree like representation of this object and all of it's
328
+ * descendants. The flattening will stop at primitive properties and collections.
329
+ *
330
+ * For non-leaf nodes, it is possible to access the corresponding node object itself via the
331
+ * propertyNode member of the flattened representation (warning, this will overwrite a
332
+ * property of this name).
333
+ * TODO: Do we want to have this feature or is it to dangerous?
334
+ *
335
+ * @returns the flat representation
336
+ */
337
+ private _flatten;
338
+ /**
339
+ * Repeatedly calls back the given function with human-readable string representations
340
+ * of the property and of its sub-properties. By default it logs to the console.
341
+ * If printFct is not a function, it will default to console.log
342
+ * @param {function} [printFct=console.log] - Function to call for printing each property
343
+ */
344
+ prettyPrint(printFct: any): void;
345
+ /**
346
+ * Return a JSON representation of the properties and its children.
347
+ * @return {object} A JSON representation of the properties and its children.
348
+ * @private
349
+ */
350
+ _toJson(): {
351
+ id: string;
352
+ context: string;
353
+ typeid: string;
354
+ isConstant: boolean;
355
+ value: any[];
356
+ };
357
+ getIds(): string[];
358
+ get(id: string, params?: {
359
+ referenceResolutionMode: REFERENCE_RESOLUTION;
360
+ }): BaseProperty | undefined;
361
+ /**
362
+ * Repeatedly calls back the given function with human-readable string
363
+ * representations of the property and of its sub-properties.
364
+ * @param {string} indent - Leading spaces to create the tree representation
365
+ * @param {string} externalId - Name of the current property at the upper level.
366
+ * Used for arrays.
367
+ * @param {function} printFct - Function to call for printing each property
368
+ */
369
+ _prettyPrint(indent: any, externalId: any, printFct: any): void;
370
+ /**
371
+ * Repeatedly calls back the given function with human-readable string
372
+ * representations of the property's sub-properties.
373
+ * @param {string} indent - Leading spaces to create the tree representation
374
+ * @param {function} printFct - Function to call for printing each property
375
+ */
376
+ _prettyPrintChildren(indent: any, printFct: any): void;
377
+ /**
378
+ * Returns the possible paths from the given from_property to this property. If multiple paths
379
+ * through multiple repository references are possible, returns more than one path.
380
+ *
381
+ * @param {property-properties.BaseProperty} in_fromProperty - The node from which the
382
+ * path is computed
383
+ * @return {Array<string | undefined>} The paths between from_property and this property
384
+ * will return an empty array if trying to get the path from a child repo to a parent repo.
385
+ * @private
386
+ */
387
+ _getPathsThroughRepoRef(in_fromProperty: any): any[];
388
+ /**
389
+ * Returns the possible paths from the given in_fromProperty to this property. If no direct paths
390
+ * exist, it returns an indirect path between the two properties.
391
+ *
392
+ * @param {property-properties.BaseProperty} in_fromProperty - The node from which the
393
+ * path is computed
394
+ * @return {string} The path between the given in_fromProperty and this property
395
+ * @private
396
+ */
397
+ _getIndirectPath(in_fromProperty: any): string;
398
+ /**
399
+ * Returns the path from the given in_fromProperty to this property if a direct path
400
+ * exists between the two properties. Otherwise returns undefined.
401
+ *
402
+ * @param {property-properties.BaseProperty} in_fromProperty - The node from which the
403
+ * path is computed
404
+ * @return {string} The path between the given in_fromProperty and this property
405
+ * @private
406
+ */
407
+ _getDirectPath(in_fromProperty: any): string;
408
+ /**
409
+ * Returns the possible paths from the given in_fromProperty to this property.
410
+ *
411
+ * @param {property-properties.BaseProperty} in_fromProperty - The node from which the
412
+ * path is computed
413
+ * @return {Array<string>} The paths between the given in_fromProperty and this property
414
+ * @private
415
+ */
416
+ _getAllRelativePaths(in_fromProperty: any): any[];
417
+ /**
418
+ * Returns the path from the given fron_property to this node if such a path exists.
419
+ * If more than one paths exist (as might be the case with multiple repository references
420
+ * pointing to the same repository), it will return the first valid path found.
421
+ * For example, if you have this structure:
422
+ * <code>prop1
423
+ * --prop2
424
+ * ----prop3</code>
425
+ * and call: <code>prop1.getRelativePath(prop3);</code>
426
+ * You will get the path from prop3 to prop1, which would be '../../'
427
+ * @param in_fromProperty - The property from which the
428
+ * path is computed
429
+ * @returns The path between the given in_fromProperty and this property
430
+ * @throws if in_fromProperty is not a property
431
+ */
432
+ getRelativePath(in_fromProperty: BaseProperty): string;
433
+ /**
434
+ * Returns the path from the root of the workspace to this node
435
+ * (including a slash at the beginning)
436
+ *
437
+ * @return {string} The path from the root
438
+ */
439
+ getAbsolutePath(): string;
440
+ /**
441
+ * Traverses the property hierarchy upwards until the a node without parent is reached
442
+ *
443
+ * @param {Function} in_callback - Callback to invoke for each of the parents. The traversal can be stopped
444
+ * by returning BaseProperty.BREAK_TRAVERSAL
445
+ * @throws if in_callback is not a function.
446
+ * @return {string|undefined} Returns BaseProperty.BREAK_TRAVERSAL, if the traversal didn't reach the root,
447
+ * otherwise undefined
448
+ */
449
+ traverseUp(in_callback: any): any;
450
+ /**
451
+ * @type {string} Constant to stop the traversal in traverseUp and traverseDown functions
452
+ */
453
+ static BREAK_TRAVERSAL: string;
454
+ /**
455
+ * Returns all children which are dirty (this only returns direct children, it does not travers recursively)
456
+ *
457
+ * @param in_flags - Which types of dirtiness are we looking for?
458
+ * If none is given, all types are regarded as
459
+ * dirty
460
+ * @returns The list of keys identifying the dirty children
461
+ */
462
+ private _getDirtyChildren;
463
+ /**
464
+ * Returns the root of the property hierarchy
465
+ * @returns The root property
466
+ */
467
+ getRoot(): BaseProperty;
468
+ /**
469
+ * Traverses all children in the child hierarchy
470
+ * TODO: How should this behave for collections?
471
+ *
472
+ * @param in_callback - Callback to invoke for every child
473
+ * @param in_pathFromTraversalStart - Path from the root of the traversal to this node
474
+ * @returns Returns BaseProperty.BREAK_TRAVERSAL if the traversal has been interrupted,
475
+ * otherwise undefined
476
+ * @private
477
+ */
478
+ _traverse(in_callback: Function, in_pathFromTraversalStart: string): string | undefined;
479
+ /**
480
+ * Deserialize takes a currently existing property and sets it to the hierarchy described in the normalized
481
+ * ChangeSet passed as parameter. It will return a ChangeSet that describes the difference between the
482
+ * current state of the property and the passed in normalized property
483
+ *
484
+ * @param in_serializedObj - The serialized changeset to apply to this node. This
485
+ * has to be a normalized change-set (only containing insertions and property assignments. Deletes and Modify
486
+ * must not appear)
487
+ * @param in_filteringOptions
488
+ * The filtering options to consider while deserializing the property.
489
+ * @param in_createChangeSet
490
+ * Should a changeset be created for this deserialization?
491
+ * @param in_reportToView
492
+ * Usually the dirtying should be reported to the view and trigger a modified
493
+ * event there. This can be prevented via this flag.
494
+ * @throws if called on a read-only property.
495
+ * @returns ChangeSet with the changes that actually were performed during the
496
+ * deserialization
497
+ */
498
+ deserialize(in_serializedObj: SerializedChangeSet, in_filteringOptions?: {}, in_createChangeSet?: boolean, in_reportToView?: boolean): SerializedChangeSet;
499
+ /**
500
+ * Sets the property to the state in the given normalized changeset
501
+ *
502
+ * @param in_serializedObj - The serialized changeset to apply. This
503
+ * has to be a normalized change-set (only containing inserts. Removes and Modifies are forbidden).
504
+ * @param in_reportToView - Usually the dirtying should be reported to the view
505
+ * and trigger a modified event there. When batching updates, this can be prevented via this flag.
506
+ * @param in_filteringOptions
507
+ * The filtering options to consider while deserializing the property.
508
+ * @param in_createChangeSet
509
+ * Should a changeset be created for this deserialization?
510
+ * @returns ChangeSet with the changes that actually were performed during the
511
+ * deserialization
512
+ */
513
+ _deserialize(in_serializedObj: SerializedChangeSet, in_reportToView: boolean, in_filteringOptions?: {}, in_createChangeSet?: boolean): SerializedChangeSet;
514
+ /**
515
+ * Serialize the property into a changeSet
516
+ *
517
+ * @param in_dirtyOnly - Only include dirty entries in the serialization
518
+ * @param in_includeRootTypeid - Include the typeid of the root of the hierarchy
519
+ * @param in_dirtinessType -
520
+ * The type of dirtiness to use when reporting dirty changes. By default this is
521
+ * PENDING_CHANGE
522
+ * @param in_includeReferencedRepositories - If this is set to true, the serialize
523
+ * function will descend into referenced repositories. WARNING: if there are loops in the references
524
+ * this can result in an infinite loop
525
+ *
526
+ * @returns The serialized representation of this property
527
+ */
528
+ _serialize(in_dirtyOnly?: boolean, in_includeRootTypeid?: boolean, in_dirtinessType?: MODIFIED_STATE_FLAGS, in_includeReferencedRepositories?: boolean): object;
529
+ /**
530
+ * Serialize the property
531
+ *
532
+ * @param in_options - Options for the serialization
533
+ * @throws if in_options is defined but is not an object.
534
+ * @returns The serialized representation of this property
535
+ */
536
+ serialize(in_options: ISerializeOptions): object;
537
+ /**
538
+ * Indicate that all static members have been added to the property
539
+ *
540
+ * This function is invoked by the PropertyFactory once all static members have been added to the template
541
+ * @protected
542
+ */
543
+ _signalAllStaticMembersHaveBeenAdded(): void;
544
+ /**
545
+ * Tests whether this property may be modified
546
+ * @param {checkConstant} in_checkConstant - Check if is readonly constant property
547
+ */
548
+ _checkIsNotReadOnly(in_checkConstant: any): void;
549
+ /**
550
+ * Set a property and its children as constants (readonly properties)
551
+ */
552
+ _setAsConstant(): void;
553
+ traverseDown(arg0: (prop: any) => void): void;
554
+ /**
555
+ * Unsets a property and its children as constants
556
+ */
557
+ _unsetAsConstant(): void;
558
+ /**
559
+ * Dirties this node and all of its children
560
+ *
561
+ * @param in_reportToView - By default, the dirtying will always be reported to the checkout view
562
+ * and trigger a modified event there. When batching updates, this
563
+ * can be prevented via this flag.
564
+ * @private
565
+ */
566
+ _setDirtyTree(in_reportToView?: boolean): void;
567
+ /**
568
+ * Determines whether a property can be inserted as a child of another property
569
+ * This does NOT validate if the parent can accept the child property, it only validates if
570
+ * the child property can be inserted in the parent.
571
+ * @param in_targetParent - The parent property
572
+ * @throws if the property can not be inserted
573
+ */
574
+ _validateInsertIn(in_targetParent: BaseProperty): void;
575
+ /**
576
+ * TODO: Remove it later. Kept not to modify tests
577
+ *
578
+ * Validates if the property and all its children are covered by the given list of paths.
579
+ *
580
+ * This function is expected to be used before inserting the property into its parent. That is the
581
+ * reason for asking for the base path. This is the full path expected for this property.
582
+ *
583
+ * This function uses the canonical representation of the property paths.
584
+ *
585
+ * @param in_basePath - The property's absolute path in canonical form
586
+ * @param in_paths - The array of paths that we wonder if it covers the property and its children
587
+ * @returns If the property and all its children are included in the paths
588
+ * @private
589
+ */
590
+ _coveredByPaths(in_basePath: string, in_paths: string[]): boolean;
591
+ get _properties(): object;
592
+ }
593
+ export {};
594
+ //# sourceMappingURL=baseProperty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseProperty.d.ts","sourceRoot":"","sources":["../../src/properties/baseProperty.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,SAAS,EACT,UAAU,EACV,mBAAmB,EAEtB,MAAM,wCAAwC,CAAC;AAOhD;;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vC;;;;;OAKG;IACH,oCAAoC;IAEpC;;;OAGG;IACH,mBAAmB,CAAC,gBAAgB,KAAA;IAepC;;OAEG;IACH,cAAc;IAWd,YAAY,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI;IAItC;;OAEG;IACH,gBAAgB;IAehB;;;;;;;OAOG;IACH,aAAa,CAAC,eAAe,UAAO;IAWpC;;;;;;OAMG;IACH,iBAAiB,CAAC,eAAe,EAAE,YAAY;IAqB/C;;;;;;;;;;;;;;OAcG;IACH,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO;IAkCjE,IAAI,WAAW,WAEd;CACJ"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * A primitive property for a boolean value
3
+ */
4
+ export class BoolProperty extends ValueProperty {
5
+ /**
6
+ * @param in_params - the parameters
7
+ */
8
+ constructor(in_params: any);
9
+ _castFunctor: (in_value: boolean) => boolean;
10
+ }
11
+ import { ValueProperty } from "./valueProperty";
12
+ //# sourceMappingURL=boolProperty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boolProperty.d.ts","sourceRoot":"","sources":["../../src/properties/boolProperty.js"],"names":[],"mappings":"AAYA;;GAEG;AACH;IACI;;OAEG;IACH,4BAIC;IAIL,6CAAmC;CAHlC"}