@fluid-experimental/property-properties 0.59.1000 → 0.59.2000-63294
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 +5 -5
- package/dist/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
- package/dist/properties/abstractStaticCollectionProperty.js +3 -3
- package/dist/properties/abstractStaticCollectionProperty.js.map +1 -1
- package/dist/properties/intProperties.d.ts +4 -4
- package/dist/properties/intProperties.d.ts.map +1 -1
- package/dist/properties/intProperties.js +2 -2
- package/dist/properties/intProperties.js.map +1 -1
- package/dist/propertyUtils.d.ts +1 -1
- package/dist/propertyUtils.js +1 -1
- package/dist/propertyUtils.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +6 -6
- package/lib/containerSerializer.d.ts +27 -0
- package/lib/containerSerializer.d.ts.map +1 -0
- package/lib/enableValidations.d.ts +15 -0
- package/lib/enableValidations.d.ts.map +1 -0
- package/lib/index.d.ts +25 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/properties/abstractStaticCollectionProperty.d.ts +153 -0
- package/lib/properties/abstractStaticCollectionProperty.d.ts.map +1 -0
- package/lib/properties/abstractStaticCollectionProperty.js +3 -3
- package/lib/properties/abstractStaticCollectionProperty.js.map +1 -1
- package/lib/properties/arrayProperty.d.ts +315 -0
- package/lib/properties/arrayProperty.d.ts.map +1 -0
- package/lib/properties/baseProperty.d.ts +594 -0
- package/lib/properties/baseProperty.d.ts.map +1 -0
- package/lib/properties/boolProperty.d.ts +12 -0
- package/lib/properties/boolProperty.d.ts.map +1 -0
- package/lib/properties/containerProperty.d.ts +102 -0
- package/lib/properties/containerProperty.d.ts.map +1 -0
- package/lib/properties/enumArrayProperty.d.ts +60 -0
- package/lib/properties/enumArrayProperty.d.ts.map +1 -0
- package/lib/properties/enumProperty.d.ts +36 -0
- package/lib/properties/enumProperty.d.ts.map +1 -0
- package/lib/properties/floatProperties.d.ts +32 -0
- package/lib/properties/floatProperties.d.ts.map +1 -0
- package/lib/properties/index.d.ts +29 -0
- package/lib/properties/index.d.ts.map +1 -0
- package/lib/properties/indexedCollectionBaseProperty.d.ts +74 -0
- package/lib/properties/indexedCollectionBaseProperty.d.ts.map +1 -0
- package/lib/properties/intProperties.d.ts +132 -0
- package/lib/properties/intProperties.d.ts.map +1 -0
- package/lib/properties/intProperties.js +2 -2
- package/lib/properties/intProperties.js.map +1 -1
- package/lib/properties/lazyLoadedProperties.d.ts +14 -0
- package/lib/properties/lazyLoadedProperties.d.ts.map +1 -0
- package/lib/properties/mapProperty.d.ts +84 -0
- package/lib/properties/mapProperty.d.ts.map +1 -0
- package/lib/properties/namedNodeProperty.d.ts +25 -0
- package/lib/properties/namedNodeProperty.d.ts.map +1 -0
- package/lib/properties/namedProperty.d.ts +20 -0
- package/lib/properties/namedProperty.d.ts.map +1 -0
- package/lib/properties/nodeProperty.d.ts +17 -0
- package/lib/properties/nodeProperty.d.ts.map +1 -0
- package/lib/properties/primitiveTypeCasts.d.ts +15 -0
- package/lib/properties/primitiveTypeCasts.d.ts.map +1 -0
- package/lib/properties/referenceArrayProperty.d.ts +47 -0
- package/lib/properties/referenceArrayProperty.d.ts.map +1 -0
- package/lib/properties/referenceMapProperty.d.ts +46 -0
- package/lib/properties/referenceMapProperty.d.ts.map +1 -0
- package/lib/properties/referenceProperty.d.ts +59 -0
- package/lib/properties/referenceProperty.d.ts.map +1 -0
- package/lib/properties/setProperty.d.ts +69 -0
- package/lib/properties/setProperty.d.ts.map +1 -0
- package/lib/properties/stringProperty.d.ts +39 -0
- package/lib/properties/stringProperty.d.ts.map +1 -0
- package/lib/properties/uintProperties.d.ts +47 -0
- package/lib/properties/uintProperties.d.ts.map +1 -0
- package/lib/properties/valueArrayProperty.d.ts +216 -0
- package/lib/properties/valueArrayProperty.d.ts.map +1 -0
- package/lib/properties/valueMapProperty.d.ts +224 -0
- package/lib/properties/valueMapProperty.d.ts.map +1 -0
- package/lib/properties/valueProperty.d.ts +50 -0
- package/lib/properties/valueProperty.d.ts.map +1 -0
- package/lib/propertyFactory.d.ts +3 -0
- package/lib/propertyFactory.d.ts.map +1 -0
- package/lib/propertyTemplate.d.ts +137 -0
- package/lib/propertyTemplate.d.ts.map +1 -0
- package/lib/propertyTemplateWrapper.d.ts +74 -0
- package/lib/propertyTemplateWrapper.d.ts.map +1 -0
- package/lib/propertyUtils.d.ts +15 -0
- package/lib/propertyUtils.d.ts.map +1 -0
- package/lib/propertyUtils.js +1 -1
- package/lib/propertyUtils.js.map +1 -1
- package/package.json +8 -5
- package/src/index.d.ts +3 -3
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A property object that allows to add child properties dynamically.
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export class ContainerProperty extends IndexedCollectionBaseProperty {
|
|
6
|
+
/**
|
|
7
|
+
* @param {Object} in_params - Input parameters for property creation
|
|
8
|
+
* @protected
|
|
9
|
+
*/
|
|
10
|
+
protected constructor();
|
|
11
|
+
_optionalChildren: {};
|
|
12
|
+
_dynamicChildren: {};
|
|
13
|
+
/**
|
|
14
|
+
* Adds an optional child to list of possible optional children.
|
|
15
|
+
* @param {string} in_id Id of the optional child
|
|
16
|
+
* @param {string} in_typeid typeid which determines what type the child should be
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
private _addOptionalChild;
|
|
20
|
+
/**
|
|
21
|
+
* Appends a property
|
|
22
|
+
*
|
|
23
|
+
* @param {String | property-properties.BaseProperty } in_id - The id under which the property is added. This parameter is
|
|
24
|
+
* optional. For NamedProperties it can be omitted. In that case
|
|
25
|
+
* the GUID of the named property will be used.
|
|
26
|
+
*
|
|
27
|
+
* @param {property-properties.BaseProperty} [in_property] - The property to add
|
|
28
|
+
* @throws if in_id is not a string or a number
|
|
29
|
+
* @throws if there is already an entry for in_id
|
|
30
|
+
* @throws if in_property is not a property
|
|
31
|
+
* @throws if in_property does not have an id
|
|
32
|
+
* @throws if in_property has a parent
|
|
33
|
+
* @throws if in_property is a root property
|
|
34
|
+
*/
|
|
35
|
+
insert(in_id: any, in_property: any): void;
|
|
36
|
+
/**
|
|
37
|
+
* Validates if inserting the property is valid.
|
|
38
|
+
*
|
|
39
|
+
* @param {string} in_id - id to be validated.
|
|
40
|
+
* @param {string} in_property - property to be validated.
|
|
41
|
+
* @throws if id is not on optional list.
|
|
42
|
+
* @throws if the typeid of the property doesn't match the schema.
|
|
43
|
+
* @protected
|
|
44
|
+
*/
|
|
45
|
+
protected _validateInsert(in_id: string, in_property: string): void;
|
|
46
|
+
/**
|
|
47
|
+
* Removes the given property
|
|
48
|
+
*
|
|
49
|
+
* @param {string|property-properties.BaseProperty} in_property - The property to remove
|
|
50
|
+
* (either its id or the whole property).
|
|
51
|
+
* @throws if trying to remove an entry that does not exist
|
|
52
|
+
* @return {property-properties.BaseProperty} the property removed.
|
|
53
|
+
*/
|
|
54
|
+
remove(in_property: any): any;
|
|
55
|
+
/**
|
|
56
|
+
* Validates if removing a property with specified id is valid.
|
|
57
|
+
*
|
|
58
|
+
* @param {string} in_id - id to be validated.
|
|
59
|
+
* @throws if the id doesn't exist.
|
|
60
|
+
* @throws if the id is not marked as optional.
|
|
61
|
+
* @protected
|
|
62
|
+
*/
|
|
63
|
+
protected _validateRemove(in_id: string): void;
|
|
64
|
+
/**
|
|
65
|
+
* Removes all dynamic children
|
|
66
|
+
* @throws if node property is read-only
|
|
67
|
+
*/
|
|
68
|
+
clear(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Stores the information to which CheckedOutRepositoryInfo object this root property belongs.
|
|
71
|
+
* Note: these functions should only be used internally (within the PropertySets library)
|
|
72
|
+
*
|
|
73
|
+
* @param {property-properties.CheckoutView~CheckedOutRepositoryInfo} in_checkedOutRepositoryInfo -
|
|
74
|
+
* The checked out repository info this root property belongs to.
|
|
75
|
+
* @protected
|
|
76
|
+
*/
|
|
77
|
+
protected _setCheckedOutRepositoryInfo(in_checkedOutRepositoryInfo: any): void;
|
|
78
|
+
/**
|
|
79
|
+
* Returns the name of all the static sub-properties of this property.
|
|
80
|
+
*
|
|
81
|
+
* @return {Array.<string>} An array of all the static property ids
|
|
82
|
+
*/
|
|
83
|
+
getStaticIds(): Array<string>;
|
|
84
|
+
/**
|
|
85
|
+
* Returns the name of all the dynamic sub-properties of this property.
|
|
86
|
+
*
|
|
87
|
+
* @return {Array.<string>} An array of all the dynamic property ids
|
|
88
|
+
*/
|
|
89
|
+
getDynamicIds(): Array<string>;
|
|
90
|
+
/**
|
|
91
|
+
* Returns an Object with all the dynamic children of this node property.
|
|
92
|
+
*
|
|
93
|
+
* WARNING: This is a direct access to the internal data-structure and the collection MUST NOT be modified. It is
|
|
94
|
+
* read only for fast access and iteration. Insertion and deletion MUST be done via the insert and remove functions
|
|
95
|
+
* of this class.
|
|
96
|
+
*
|
|
97
|
+
* @return {Object<String, property-properties.MapProperty~MapValueType>} The map with all entries in the map.
|
|
98
|
+
*/
|
|
99
|
+
_getDynamicChildrenReadOnly(): any;
|
|
100
|
+
}
|
|
101
|
+
import { IndexedCollectionBaseProperty } from "./indexedCollectionBaseProperty";
|
|
102
|
+
//# sourceMappingURL=containerProperty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containerProperty.d.ts","sourceRoot":"","sources":["../../src/properties/containerProperty.js"],"names":[],"mappings":"AAgBA;;;GAGG;AACH;IACI;;;OAGG;IACH,wBAOC;IAHO,sBAA2B;IAC3B,qBAA0B;IAuBlC;;;;;OAKG;IACH,0BAMC;IAED;;;;;;;;;;;;;;OAcG;IACH,2CAyBC;IAED;;;;;;;;OAQG;IACH,iCANW,MAAM,eACN,MAAM,QAchB;IAkBD;;;;;;;OAOG;IACH,8BAcC;IAED;;;;;;;OAOG;IACH,iCALW,MAAM,QAahB;IAED;;;OAGG;IACH,cAGC;IA+CD;;;;;;;OAOG;IACH,+EAEC;IAcD;;;;OAIG;IACH,gBAFY,MAAO,MAAM,CAAC,CAIzB;IAED;;;;OAIG;IACH,iBAFY,MAAO,MAAM,CAAC,CAIzB;IAED;;;;;;;;MAQE;IACF,mCAEC;CA6BJ"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This class is a specialized version of the ArrayProperty for enums.
|
|
3
|
+
* Since we internally represent enums as Int32Array this is much more
|
|
4
|
+
* efficient and convenient. Additionally, we provide direct access
|
|
5
|
+
* methods to the enums in the array, e.g. .getEnumString(3) directly
|
|
6
|
+
* returns the enum string at position 3 of the array
|
|
7
|
+
*/
|
|
8
|
+
export class EnumArrayProperty extends ValueArrayProperty {
|
|
9
|
+
/**
|
|
10
|
+
* @param {Object} in_params - the parameters
|
|
11
|
+
* @param {Number=} [in_params.length=0] the length of the array, if applicable
|
|
12
|
+
* @param {Object} in_params._enumDictionary the value<->enum dictonary needed to convert the values
|
|
13
|
+
* @constructor
|
|
14
|
+
* @protected
|
|
15
|
+
* @extends property-properties.ValueArrayProperty
|
|
16
|
+
* @alias property-properties.EnumArrayProperty
|
|
17
|
+
* @category Arrays
|
|
18
|
+
*/
|
|
19
|
+
protected constructor();
|
|
20
|
+
_enumDictionary: any;
|
|
21
|
+
/**
|
|
22
|
+
* Since an enum can be identified by its value and its enum string,
|
|
23
|
+
* we have to check/convert the type here. We also check if a value
|
|
24
|
+
* is suitable for this enum type.
|
|
25
|
+
* @param {number|string} in_value value to be checked/converted
|
|
26
|
+
* @return {number} internal value for this enum type
|
|
27
|
+
*/
|
|
28
|
+
_convertEnumToInternalValue(in_value: number | string): number;
|
|
29
|
+
/**
|
|
30
|
+
* Sets the content of an enum in an enum array. Alternative syntax to .set()
|
|
31
|
+
* @param {number} in_index target index
|
|
32
|
+
* @param {*} in_value the value to set
|
|
33
|
+
* @throws if in_value is not a string or number
|
|
34
|
+
* @throws if in_index is either smaller than zero, larger than the length of the array or not a number.
|
|
35
|
+
*/
|
|
36
|
+
setEnumByString(in_index: number, in_value: any): void;
|
|
37
|
+
/**
|
|
38
|
+
* get the array element at a given index
|
|
39
|
+
* @param {number} in_position the target index
|
|
40
|
+
* @throws if no entry exists at in_position
|
|
41
|
+
* @return {string} the enum string at that index
|
|
42
|
+
*/
|
|
43
|
+
getEnumString(in_position: number): string;
|
|
44
|
+
/**
|
|
45
|
+
* get an array of the enum strings starting at a given index
|
|
46
|
+
* @param {number} in_offset the start index
|
|
47
|
+
* @param {number} in_length how many should be read
|
|
48
|
+
* @throws if in_offset or in_length are not numbers
|
|
49
|
+
* @throws if no entry exists at one of the positions
|
|
50
|
+
* @return {Array<string>} the enum strings we asked for
|
|
51
|
+
*/
|
|
52
|
+
getEnumStrings(in_offset: number, in_length: number): Array<string>;
|
|
53
|
+
/**
|
|
54
|
+
* let the user to query all valid entries of an enum array property
|
|
55
|
+
* @return {{}} all valid (string) entries and their (int) values
|
|
56
|
+
*/
|
|
57
|
+
getValidEnumList(): {};
|
|
58
|
+
}
|
|
59
|
+
import { ValueArrayProperty } from "./valueArrayProperty";
|
|
60
|
+
//# sourceMappingURL=enumArrayProperty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enumArrayProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumArrayProperty.js"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH;IACI;;;;;;;;;OASG;IACH,wBAMC;IADG,qBAAgD;IAGpD;;;;;;OAMG;IACH,sCAHW,MAAM,GAAC,MAAM,GACZ,MAAM,CAiBjB;IAyCD;;;;;;OAMG;IACH,0BALW,MAAM,uBAOhB;IA2BD;;;;;OAKG;IACH,2BAJW,MAAM,GAEL,MAAM,CAUjB;IAED;;;;;;;OAOG;IACH,0BANW,MAAM,aACN,MAAM,GAGL,MAAM,MAAM,CAAC,CAexB;IAmCD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CACJ"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A primitive property for enums.
|
|
3
|
+
*/
|
|
4
|
+
export class EnumProperty extends Int32Property {
|
|
5
|
+
/**
|
|
6
|
+
* @param {Object=} in_params - the parameters
|
|
7
|
+
* @constructor
|
|
8
|
+
* @protected
|
|
9
|
+
* @extends property-properties.Int32Property
|
|
10
|
+
* @alias property-properties.EnumProperty
|
|
11
|
+
* @category Value Properties
|
|
12
|
+
*/
|
|
13
|
+
protected constructor();
|
|
14
|
+
_enumDictionary: any;
|
|
15
|
+
/**
|
|
16
|
+
* Returns the current enum string
|
|
17
|
+
* @return {string} the string value of the property
|
|
18
|
+
* @throws if no entry exists
|
|
19
|
+
*/
|
|
20
|
+
getEnumString(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Sets the property by an enum string
|
|
23
|
+
*
|
|
24
|
+
* @param {string} in_stringId the enum string we want to switch to
|
|
25
|
+
* @throws if in_stringId is not a string
|
|
26
|
+
* @throws if no entry is found for in_stringId
|
|
27
|
+
*/
|
|
28
|
+
setEnumByString(in_stringId: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* let the user to query all valid entries of an enum
|
|
31
|
+
* @return {{}} all valid (string) entries and their (int) values
|
|
32
|
+
*/
|
|
33
|
+
getValidEnumList(): {};
|
|
34
|
+
}
|
|
35
|
+
import { Int32Property } from "./intProperties";
|
|
36
|
+
//# sourceMappingURL=enumProperty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enumProperty.d.ts","sourceRoot":"","sources":["../../src/properties/enumProperty.js"],"names":[],"mappings":"AAgBA;;GAEG;AACH;IACI;;;;;;;MAOE;IACF,wBAQC;IAHG,qBAAgD;IAapD;;;;OAIG;IACH,iBAHY,MAAM,CAUjB;IAwBD;;;;;;OAMG;IACH,6BAJW,MAAM,QAahB;IAYD;;;OAGG;IACH,oBAFY,EAAE,CAIb;CACJ"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A primitive property for a 32 bit floating point value.
|
|
3
|
+
*/
|
|
4
|
+
export class Float32Property extends ValueProperty {
|
|
5
|
+
/**
|
|
6
|
+
* @param {Object=} in_params - the parameters
|
|
7
|
+
* @constructor
|
|
8
|
+
* @protected
|
|
9
|
+
* @extends property-properties.ValueProperty
|
|
10
|
+
* @alias property-properties.Float32Property
|
|
11
|
+
* @category Value Properties
|
|
12
|
+
*/
|
|
13
|
+
protected constructor();
|
|
14
|
+
_castFunctor: any;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A primitive property for a 64 bit floating point value.
|
|
18
|
+
*/
|
|
19
|
+
export class Float64Property extends ValueProperty {
|
|
20
|
+
/**
|
|
21
|
+
* @param {Object=} in_params - the parameters
|
|
22
|
+
* @constructor
|
|
23
|
+
* @protected
|
|
24
|
+
* @extends property-properties.ValueProperty
|
|
25
|
+
* @alias property-properties.Float64Property
|
|
26
|
+
* @category Value Properties
|
|
27
|
+
*/
|
|
28
|
+
protected constructor();
|
|
29
|
+
_castFunctor: any;
|
|
30
|
+
}
|
|
31
|
+
import { ValueProperty } from "./valueProperty";
|
|
32
|
+
//# sourceMappingURL=floatProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floatProperties.d.ts","sourceRoot":"","sources":["../../src/properties/floatProperties.js"],"names":[],"mappings":"AAWA;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAKC;IAEL,kBAAsC;CADrC;AAID;;GAEG;AAEH;IACI;;;;;;;OAOG;IACH,wBAIC;IAEL,kBAAsC;CADrC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { ArrayProperty } from './arrayProperty';
|
|
6
|
+
import { BaseProperty } from './baseProperty';
|
|
7
|
+
import { BoolProperty } from './boolProperty';
|
|
8
|
+
import { ContainerProperty } from './containerProperty';
|
|
9
|
+
import { EnumArrayProperty } from './enumArrayProperty';
|
|
10
|
+
import { EnumProperty } from './enumProperty';
|
|
11
|
+
import { Float32Property, Float64Property } from './floatProperties';
|
|
12
|
+
import { IndexedCollectionBaseProperty } from './indexedCollectionBaseProperty';
|
|
13
|
+
import { Int16Property, Int32Property, Int64Property, Int8Property, Uint64Property } from './intProperties';
|
|
14
|
+
import { MapProperty } from './mapProperty';
|
|
15
|
+
import { NamedNodeProperty } from './namedNodeProperty';
|
|
16
|
+
import { NamedProperty } from './namedProperty';
|
|
17
|
+
import { NodeProperty } from './nodeProperty';
|
|
18
|
+
import { _castFunctors } from './primitiveTypeCasts';
|
|
19
|
+
import { ReferenceArrayProperty } from './referenceArrayProperty';
|
|
20
|
+
import { ReferenceMapProperty } from './referenceMapProperty';
|
|
21
|
+
import { ReferenceProperty } from './referenceProperty';
|
|
22
|
+
import { SetProperty } from './setProperty';
|
|
23
|
+
import { StringProperty } from './stringProperty';
|
|
24
|
+
import { Uint16Property, Uint32Property, Uint8Property } from './uintProperties';
|
|
25
|
+
import { BoolArrayProperty, Float32ArrayProperty, Float64ArrayProperty, Int16ArrayProperty, Int32ArrayProperty, Int64ArrayProperty, Int8ArrayProperty, StringArrayProperty, Uint16ArrayProperty, Uint32ArrayProperty, Uint64ArrayProperty, Uint8ArrayProperty, ValueArrayProperty } from './valueArrayProperty';
|
|
26
|
+
import { BoolMapProperty, Float32MapProperty, Float64MapProperty, Int16MapProperty, Int32MapProperty, Int64MapProperty, Int8MapProperty, StringMapProperty, Uint16MapProperty, Uint32MapProperty, Uint64MapProperty, Uint8MapProperty, ValueMapProperty } from './valueMapProperty';
|
|
27
|
+
import { ValueProperty } from './valueProperty';
|
|
28
|
+
export { ArrayProperty, BaseProperty, BoolArrayProperty, BoolMapProperty, BoolProperty, ContainerProperty, EnumArrayProperty, EnumProperty, Float32ArrayProperty, Float32MapProperty, Float32Property, Float64ArrayProperty, Float64MapProperty, Float64Property, IndexedCollectionBaseProperty, Int16ArrayProperty, Int16MapProperty, Int16Property, Int32ArrayProperty, Int32MapProperty, Int32Property, Int64ArrayProperty, Int64MapProperty, Int64Property, Int8ArrayProperty, Int8MapProperty, Int8Property, MapProperty, NamedNodeProperty, NamedProperty, NodeProperty, ReferenceArrayProperty, ReferenceMapProperty, ReferenceProperty, SetProperty, StringArrayProperty, StringMapProperty, StringProperty, Uint16ArrayProperty, Uint16MapProperty, Uint16Property, Uint32ArrayProperty, Uint32MapProperty, Uint32Property, Uint64ArrayProperty, Uint64MapProperty, Uint64Property, Uint8ArrayProperty, Uint8MapProperty, Uint8Property, ValueArrayProperty, ValueMapProperty, ValueProperty, _castFunctors, };
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/properties/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACH,eAAe,EACf,eAAe,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EACH,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,cAAc,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,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iB,EACjB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,aAAa,GAChB,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* typedef {property-properties.BaseProperty|string|number|boolean} property-properties.IndexedCollectionBaseProperty~ValueType
|
|
3
|
+
*
|
|
4
|
+
* The type of the values that are set/inserted into the collection. Depending on the type of the collection, these
|
|
5
|
+
* can either be property objects or primitive values
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* A IndexedCollectionBaseProperty is the base class for indexed collections (maps and sets). It should not be used
|
|
9
|
+
* directly.
|
|
10
|
+
*/
|
|
11
|
+
export class IndexedCollectionBaseProperty extends AbstractStaticCollectionProperty {
|
|
12
|
+
/**
|
|
13
|
+
* @param {Object} in_params - Input parameters for property creation
|
|
14
|
+
*
|
|
15
|
+
* @constructor
|
|
16
|
+
*/
|
|
17
|
+
constructor(in_params: any);
|
|
18
|
+
/** Stores the pending changes in the property (those that are part of the current ChangeSet) */
|
|
19
|
+
_pendingChanges: {
|
|
20
|
+
insert: {};
|
|
21
|
+
remove: {};
|
|
22
|
+
modify: {};
|
|
23
|
+
};
|
|
24
|
+
/** Stores the dirty changes in the property (those that have not yet been reported to the application) */
|
|
25
|
+
_dirtyChanges: {
|
|
26
|
+
insert: {};
|
|
27
|
+
remove: {};
|
|
28
|
+
modify: {};
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Inserts a property into the collection
|
|
32
|
+
*
|
|
33
|
+
* @param {string} in_key -
|
|
34
|
+
* Key of the entry in the collection
|
|
35
|
+
* @param {property-properties.IndexedCollectionBaseProperty~ValueType} in_value -
|
|
36
|
+
* The value to insert
|
|
37
|
+
* @param {boolean} in_reportToView -
|
|
38
|
+
* By default, the dirtying will always be reported to the checkout view and trigger a modified event there.
|
|
39
|
+
* When batching updates, this can be prevented via this flag.
|
|
40
|
+
*/
|
|
41
|
+
_insert(in_key: string, in_value: any, in_reportToView: boolean): void;
|
|
42
|
+
/**
|
|
43
|
+
* Removes an entry with the given key
|
|
44
|
+
*
|
|
45
|
+
* @param {string} in_key -
|
|
46
|
+
* key of the entry
|
|
47
|
+
* @param {boolean} in_reportToView -
|
|
48
|
+
* By default, the dirtying will always be reported to the checkout view and trigger a modified event there.
|
|
49
|
+
* When batching updates, this can be prevented via this flag.
|
|
50
|
+
*/
|
|
51
|
+
_removeByKey(in_key: string, in_reportToView: boolean): void;
|
|
52
|
+
/**
|
|
53
|
+
* Function to deserialize special primitive types.
|
|
54
|
+
* Some primitive types (e.g. Int64, which is not natively supported by javascript) require
|
|
55
|
+
* special treatment on deserialization. For supported types, we can just return the input here.
|
|
56
|
+
*
|
|
57
|
+
* @param {property-properties.SerializedChangeSet} in_serializedObj - The object to be deserialized
|
|
58
|
+
* @return {*} the deserialized value
|
|
59
|
+
*/
|
|
60
|
+
_deserializeValue(in_serializedObj: any): any;
|
|
61
|
+
/**
|
|
62
|
+
* Function to serialize special primitive types.
|
|
63
|
+
* Some primitive types (e.g. Int64, which is not natively supported by javascript) require
|
|
64
|
+
* special treatment on serialization. For supported types, we can just return the input here.
|
|
65
|
+
*
|
|
66
|
+
* @param {*} in_obj - The object to be serialized
|
|
67
|
+
* @return {property-properties.SerializedChangeSet} the serialized object
|
|
68
|
+
*/
|
|
69
|
+
_serializeValue(in_obj: any): any;
|
|
70
|
+
/** Specifies, whether this is a collection of base types or of registered templates */
|
|
71
|
+
_containsPrimitiveTypes: boolean;
|
|
72
|
+
}
|
|
73
|
+
import { AbstractStaticCollectionProperty } from "./abstractStaticCollectionProperty";
|
|
74
|
+
//# sourceMappingURL=indexedCollectionBaseProperty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexedCollectionBaseProperty.d.ts","sourceRoot":"","sources":["../../src/properties/indexedCollectionBaseProperty.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AAEH;;;GAGG;AACH;IACI;;;;OAIG;IACH,4BAeC;IAbG,gGAAgG;IAChG;;;;MAIC;IAED,0GAA0G;IAC1G;;;;MAIC;IA6EL;;;;;;;;;;OAUG;IACH,gBARW,MAAM,kCAIN,OAAO,QAyDjB;IAED;;;;;;;;OAQG;IACH,qBANW,MAAM,mBAEN,OAAO,QAsCjB;IA2GD;;;;;;;OAOG;IACH,8CAEC;IAED;;;;;;;OAOG;IACH,kCAIC;IA6XL,uFAAuF;IACvF,iCAA+D;CAF9D"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
export class Int8Property extends ValueProperty {
|
|
2
|
+
/**
|
|
3
|
+
* A primitive property for an signed 8 bit integer value.
|
|
4
|
+
* @param {Object=} in_params - the parameters
|
|
5
|
+
* @constructor
|
|
6
|
+
* @protected
|
|
7
|
+
* @extends property-properties.ValueProperty
|
|
8
|
+
* @alias property-properties.Int8Property
|
|
9
|
+
* @category Value Properties
|
|
10
|
+
*/
|
|
11
|
+
protected constructor();
|
|
12
|
+
_castFunctor: any;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A primitive property for an signed 16 bit integer value.
|
|
16
|
+
*/
|
|
17
|
+
export class Int16Property extends ValueProperty {
|
|
18
|
+
/**
|
|
19
|
+
* @param {Object=} in_params - the parameters
|
|
20
|
+
* @constructor
|
|
21
|
+
* @protected
|
|
22
|
+
* @extends property-properties.ValueProperty
|
|
23
|
+
* @alias property-properties.Int16Property
|
|
24
|
+
* @category Value Properties
|
|
25
|
+
*/
|
|
26
|
+
protected constructor();
|
|
27
|
+
_castFunctor: any;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A primitive property for an signed 32 bit integer value.
|
|
31
|
+
*/
|
|
32
|
+
export class Int32Property extends ValueProperty {
|
|
33
|
+
/**
|
|
34
|
+
* @param {Object=} in_params - the parameters
|
|
35
|
+
* @constructor
|
|
36
|
+
* @protected
|
|
37
|
+
* @extends property-properties.ValueProperty
|
|
38
|
+
* @alias property-properties.Int32Property
|
|
39
|
+
* @category Value Properties
|
|
40
|
+
*/
|
|
41
|
+
protected constructor();
|
|
42
|
+
_castFunctor: any;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A primitive property base class for big integer values.
|
|
46
|
+
*/
|
|
47
|
+
export class Integer64Property extends ValueProperty {
|
|
48
|
+
/**
|
|
49
|
+
* @param {Object=} in_params - the parameters
|
|
50
|
+
* @constructor
|
|
51
|
+
* @protected
|
|
52
|
+
* @extends property-properties.ValueProperty
|
|
53
|
+
* @alias property-properties.Integer64Property
|
|
54
|
+
* @protected
|
|
55
|
+
* @abstract
|
|
56
|
+
* @category Value Properties
|
|
57
|
+
*/
|
|
58
|
+
protected constructor();
|
|
59
|
+
DataConstructor: any;
|
|
60
|
+
/**
|
|
61
|
+
* @return {number} the higher 32 bit integer part
|
|
62
|
+
*/
|
|
63
|
+
getValueHigh(): number;
|
|
64
|
+
/**
|
|
65
|
+
* @return {number} the lower 32 bit integer part
|
|
66
|
+
*/
|
|
67
|
+
getValueLow(): number;
|
|
68
|
+
/**
|
|
69
|
+
* @param {number} in_high set the higher 32 bit integer part
|
|
70
|
+
* @throws if in_high is not a number
|
|
71
|
+
* @return {boolean} true if the value was actually changed
|
|
72
|
+
*/
|
|
73
|
+
setValueHigh(in_high: number): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* @param {number} in_low set the lower 32 bit integer part
|
|
76
|
+
* @throws if in_low is not a number
|
|
77
|
+
* @return {boolean} true if the value was actually changed
|
|
78
|
+
*/
|
|
79
|
+
setValueLow(in_low: number): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* The toString() method returns a string representing the specified Integer64 object.
|
|
82
|
+
*
|
|
83
|
+
* @param {number} [in_radix = 10] An integer between 2 and 36 specifying
|
|
84
|
+
* the base to use for representing numeric values.
|
|
85
|
+
* @return {string} A string representing the specified Integer64 object.
|
|
86
|
+
*/
|
|
87
|
+
toString(in_radix?: number): string;
|
|
88
|
+
/**
|
|
89
|
+
* The Integer64.fromString() method parses a string argument updates object's lower and higher 32 bit integer parts.
|
|
90
|
+
*
|
|
91
|
+
* @param {string} in_string The value to parse. Leading whitespace in the string argument is ignored.
|
|
92
|
+
* @param {number} [in_radix = 10] An integer between 2 and 36 that represents the
|
|
93
|
+
* radix (the base in mathematical numeral systems) of the above mentioned string.
|
|
94
|
+
* @throws if in_string is not a string
|
|
95
|
+
* @throws if in_radix is entered but is not a number between 2 and 36
|
|
96
|
+
* @throws if the property is a Uint64 property and in_string is a negative number
|
|
97
|
+
* @throws if in_string contains characters other than numbers
|
|
98
|
+
*/
|
|
99
|
+
fromString(in_string: string, in_radix?: number): void;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* A primitive property class for big signed integer values.
|
|
103
|
+
*/
|
|
104
|
+
export class Int64Property extends Integer64Property {
|
|
105
|
+
/**
|
|
106
|
+
* @param {Object=} in_params - the parameters
|
|
107
|
+
* @constructor
|
|
108
|
+
* @protected
|
|
109
|
+
* @extends property-properties.Integer64Property
|
|
110
|
+
* @alias property-properties.Int64Property
|
|
111
|
+
* @category Value Properties
|
|
112
|
+
*/
|
|
113
|
+
protected constructor();
|
|
114
|
+
_castFunctor: (in_value: number, in_radix?: number) => number;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* A primitive property class for big unsingned integer values.
|
|
118
|
+
*/
|
|
119
|
+
export class Uint64Property extends Integer64Property {
|
|
120
|
+
/**
|
|
121
|
+
* @param {Object=} in_params - the parameters
|
|
122
|
+
* @constructor
|
|
123
|
+
* @protected
|
|
124
|
+
* @extends property-properties.Integer64Property
|
|
125
|
+
* @alias property-properties.Uint64Property
|
|
126
|
+
* @category Value Properties
|
|
127
|
+
*/
|
|
128
|
+
protected constructor();
|
|
129
|
+
_castFunctor: (in_value: number, in_radix?: number) => number;
|
|
130
|
+
}
|
|
131
|
+
import { ValueProperty } from "./valueProperty";
|
|
132
|
+
//# sourceMappingURL=intProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intProperties.d.ts","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":"AAsBA;IACI;;;;;;;;OAQG;IACH,wBAIC;IAGL,kBAAmC;CAFlC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAIC;IAGL,kBAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAIC;IAGL,kBAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;;;OASG;IACH,wBAKC;IAHG,qBAAsC;IAiC1C;;OAEG;IACH,gBAFY,MAAM,CAIjB;IAED;;OAEG;IACH,eAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,sBAJW,MAAM,GAEL,OAAO,CAYlB;IAED;;;;OAIG;IACH,oBAJW,MAAM,GAEL,OAAO,CAYlB;IA4DD;;;;;;OAMG;IACH,oBAJW,MAAM,GAEL,MAAM,CAIjB;IAED;;;;;;;;;;OAUG;IACH,sBARW,MAAM,aACN,MAAM,QAahB;CACJ;AAED;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAoC;CAFnC;AAID;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,wBAEC;IAGL,8DAAqC;CAFpC"}
|
|
@@ -128,7 +128,7 @@ export class Integer64Property extends ValueProperty {
|
|
|
128
128
|
/**
|
|
129
129
|
* @param {number} in_high set the higher 32 bit integer part
|
|
130
130
|
* @throws if in_high is not a number
|
|
131
|
-
* @return {
|
|
131
|
+
* @return {boolean} true if the value was actually changed
|
|
132
132
|
*/
|
|
133
133
|
setValueHigh(in_high) {
|
|
134
134
|
ConsoleUtils.assert(_.isNumber(in_high), MSG.IN_HIGH_MUST_BE_NUMBER + in_high);
|
|
@@ -143,7 +143,7 @@ export class Integer64Property extends ValueProperty {
|
|
|
143
143
|
/**
|
|
144
144
|
* @param {number} in_low set the lower 32 bit integer part
|
|
145
145
|
* @throws if in_low is not a number
|
|
146
|
-
* @return {
|
|
146
|
+
* @return {boolean} true if the value was actually changed
|
|
147
147
|
*/
|
|
148
148
|
setValueLow(in_low) {
|
|
149
149
|
ConsoleUtils.assert(_.isNumber(in_low), MSG.IN_LOW_MUST_BE_NUMBER + in_low);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intProperties.js","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,4BAA4B;AAC5B;;GAEG;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACxE,MAAM,EACF,YAAY,EACZ,SAAS,EAAE,EAAE,GAAG,EAAE,EAClB,MAAM,EACN,KAAK,GACR,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D,MAAM,KAAK,GAAG,UAAU,CAAC;AAEzB,MAAM,OAAO,YAAa,SAAQ,aAAa;IAC3C;;;;;;;;OAQG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,wCAAwC;QACxC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACnB,CAAC;CACJ;AACD,YAAY,CAAC,SAAS,CAAC,OAA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IACxC,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,iBAAiB;IAChD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACJ;AACD,aAAa,CAAC,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1C,aAAa,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC;AAE3D;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,iBAAiB;IACjD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC7B,CAAC;CACJ;AACD,cAAc,CAAC,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;AAC5C,cAAc,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/* eslint-disable new-cap */\n/**\n * @fileoverview Definition of the Int*Property classes\n */\n\nconst _ = require('lodash');\nconst { ChangeSet } = require('@fluid-experimental/property-changeset');\nconst {\n ConsoleUtils,\n constants: { MSG },\n Uint64,\n Int64,\n} = require('@fluid-experimental/property-common');\nconst { ValueProperty } = require('./valueProperty');\nconst { _castFunctors } = require('./primitiveTypeCasts');\n\nconst BIT32 = 4294967296;\n\nexport class Int8Property extends ValueProperty {\n /**\n * A primitive property for an signed 8 bit integer value.\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int8Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt8Property.prototype._typeid = 'Int8';\nInt8Property.prototype._castFunctor = _castFunctors.Int8;\n\n/**\n * A primitive property for an signed 16 bit integer value.\n */\nexport class Int16Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int16Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt16Property.prototype._typeid = 'Int16';\nInt16Property.prototype._castFunctor = _castFunctors.Int16;\n\n/**\n * A primitive property for an signed 32 bit integer value.\n */\nexport class Int32Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int32Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt32Property.prototype._typeid = 'Int32';\nInt32Property.prototype._castFunctor = _castFunctors.Int32;\n\n/**\n * A primitive property base class for big integer values.\n */\nexport class Integer64Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Integer64Property\n * @protected\n * @abstract\n * @category Value Properties\n */\n constructor(in_params, dataConstructor) {\n super(in_params);\n this.DataConstructor = dataConstructor;\n // default for this property type is '0, 0'\n this._data = new this.DataConstructor();\n }\n\n /**\n * Internal function to update the value of the Integer64Property\n *\n * @param {Int64|String|Number} in_value the new value\n * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout view\n * and trigger a modified event there. When batching updates, this\n * can be prevented via this flag.\n * @return {boolean} true if the value was actually changed\n * @throws if in_value is a string that contains characters other than numbers\n */\n _setValue(in_value, in_reportToView) {\n var oldLowValue = this._data.getValueLow();\n var oldHighValue = this._data.getValueHigh();\n\n in_value = this._castFunctor(in_value);\n\n var newHighValue = in_value.getValueHigh();\n var newLowValue = in_value.getValueLow();\n\n var changed = oldHighValue !== newHighValue || oldLowValue !== newLowValue;\n\n if (changed) {\n this._data = in_value.clone();\n this._setDirty(in_reportToView);\n }\n return changed;\n }\n\n /**\n * @return {number} the higher 32 bit integer part\n */\n getValueHigh() {\n return this._data.getValueHigh();\n }\n\n /**\n * @return {number} the lower 32 bit integer part\n */\n getValueLow() {\n return this._data.getValueLow();\n }\n\n /**\n * @param {number} in_high set the higher 32 bit integer part\n * @throws if in_high is not a number\n * @return {boolen} true if the value was actually changed\n */\n setValueHigh(in_high) {\n ConsoleUtils.assert(_.isNumber(in_high), MSG.IN_HIGH_MUST_BE_NUMBER + in_high);\n var changed = this._data.getValueHigh() !== in_high;\n\n if (changed) {\n var newData = new this.DataConstructor(this.getValueLow(), in_high);\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @param {number} in_low set the lower 32 bit integer part\n * @throws if in_low is not a number\n * @return {boolen} true if the value was actually changed\n */\n setValueLow(in_low) {\n ConsoleUtils.assert(_.isNumber(in_low), MSG.IN_LOW_MUST_BE_NUMBER + in_low);\n var changed = this._data.getValueLow() !== in_low;\n\n if (changed) {\n var newData = new this.DataConstructor(in_low, this.getValueHigh());\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @inheritdoc\n */\n _deserialize(in_serializedObj, in_reportToView,\n in_filteringOptions, in_createChangeSet) {\n if (ChangeSet.isEmptyChangeSet(in_serializedObj)) {\n return undefined;\n } else {\n ConsoleUtils.assert(_.isArray(in_serializedObj) && in_serializedObj.length === 2, MSG.INVALID_INT64_CHANGESET);\n var readValue = new this.DataConstructor(in_serializedObj[0], in_serializedObj[1]);\n var changed = this._setValue(readValue, in_reportToView);\n return changed ? this.serialize() : undefined;\n }\n }\n\n /**\n * @inheritdoc\n */\n _applyChangeset(in_changeSet, in_reportToView, in_filteringOptions) {\n if (!ChangeSet.isEmptyChangeSet(in_changeSet)) {\n if (!_.isArray(in_changeSet)) {\n in_changeSet = in_changeSet.value;\n }\n ConsoleUtils.assert(_.isArray(in_changeSet) && in_changeSet.length === 2, MSG.INVALID_INT64_CHANGESET);\n var newVal = new this.DataConstructor(in_changeSet[0], in_changeSet[1]);\n this._setValue(newVal, in_reportToView);\n }\n }\n\n /**\n * Serialize the property\n *\n * @param {boolean} in_dirtyOnly -\n * Only include dirty entries in the serialization\n * @param {boolean} in_includeRootTypeid -\n * Include the typeid of the root of the hierarchy - has no effect for value properties\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] -\n * The type of dirtiness to use when reporting dirty changes. By default this is\n * PENDING_CHANGE * @return {*} The serialized representation of this property\n * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n * function will descend into referenced repositories. WARNING: if there are loops in the references\n * this can result in an infinite loop\n * @return {*} The serialized representation of this property\n * @private\n */\n _serialize(in_dirtyOnly, in_includeRootTypeid,\n in_dirtinessType, in_includeReferencedRepositories) {\n if (in_dirtyOnly) {\n if (this._isDirty(in_dirtinessType)) {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n } else {\n return {};\n }\n } else {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n }\n }\n\n /**\n * The toString() method returns a string representing the specified Integer64 object.\n *\n * @param {number} [in_radix = 10] An integer between 2 and 36 specifying\n * the base to use for representing numeric values.\n * @return {string} A string representing the specified Integer64 object.\n */\n toString(in_radix) {\n return this._data.toString(in_radix);\n }\n\n /**\n * The Integer64.fromString() method parses a string argument updates object's lower and higher 32 bit integer parts.\n *\n * @param {string} in_string The value to parse. Leading whitespace in the string argument is ignored.\n * @param {number} [in_radix = 10] An integer between 2 and 36 that represents the\n * radix (the base in mathematical numeral systems) of the above mentioned string.\n * @throws if in_string is not a string\n * @throws if in_radix is entered but is not a number between 2 and 36\n * @throws if the property is a Uint64 property and in_string is a negative number\n * @throws if in_string contains characters other than numbers\n */\n fromString(in_string, in_radix) {\n ConsoleUtils.assert(_.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);\n var int = this._castFunctor(in_string, in_radix);\n\n this.setValueHigh(int.getValueHigh());\n this.setValueLow(int.getValueLow());\n }\n}\n\n/**\n * A primitive property class for big signed integer values.\n */\nexport class Int64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Int64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Int64);\n }\n}\nInt64Property.prototype._typeid = 'Int64';\nInt64Property.prototype._castFunctor = _castFunctors.Int64;\n\n/**\n * A primitive property class for big unsingned integer values.\n */\nexport class Uint64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Uint64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Uint64);\n }\n}\nUint64Property.prototype._typeid = 'Uint64';\nUint64Property.prototype._castFunctor = _castFunctors.Uint64;\n"]}
|
|
1
|
+
{"version":3,"file":"intProperties.js","sourceRoot":"","sources":["../../src/properties/intProperties.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,4BAA4B;AAC5B;;GAEG;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AACxE,MAAM,EACF,YAAY,EACZ,SAAS,EAAE,EAAE,GAAG,EAAE,EAClB,MAAM,EACN,KAAK,GACR,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACrD,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAE1D,MAAM,KAAK,GAAG,UAAU,CAAC;AAEzB,MAAM,OAAO,YAAa,SAAQ,aAAa;IAC3C;;;;;;;;OAQG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,wCAAwC;QACxC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACnB,CAAC;CACJ;AACD,YAAY,CAAC,SAAS,CAAC,OAAO,GAAG,MAAM,CAAC;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ED;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,iBAAiB;IAChD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACJ;AACD,aAAa,CAAC,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1C,aAAa,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC;AAE3D;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,iBAAiB;IACjD;;;;;;;OAOG;IACH,YAAY,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC7B,CAAC;CACJ;AACD,cAAc,CAAC,SAAS,CAAC,OAAO,GAAG,QAAQ,CAAC;AAC5C,cAAc,CAAC,SAAS,CAAC,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/* eslint-disable new-cap */\n/**\n * @fileoverview Definition of the Int*Property classes\n */\n\nconst _ = require('lodash');\nconst { ChangeSet } = require('@fluid-experimental/property-changeset');\nconst {\n ConsoleUtils,\n constants: { MSG },\n Uint64,\n Int64,\n} = require('@fluid-experimental/property-common');\nconst { ValueProperty } = require('./valueProperty');\nconst { _castFunctors } = require('./primitiveTypeCasts');\n\nconst BIT32 = 4294967296;\n\nexport class Int8Property extends ValueProperty {\n /**\n * A primitive property for an signed 8 bit integer value.\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int8Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt8Property.prototype._typeid = 'Int8';\nInt8Property.prototype._castFunctor = _castFunctors.Int8;\n\n/**\n * A primitive property for an signed 16 bit integer value.\n */\nexport class Int16Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int16Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt16Property.prototype._typeid = 'Int16';\nInt16Property.prototype._castFunctor = _castFunctors.Int16;\n\n/**\n * A primitive property for an signed 32 bit integer value.\n */\nexport class Int32Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Int32Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params);\n // default for this property type is '0'\n this._data = 0;\n }\n}\nInt32Property.prototype._typeid = 'Int32';\nInt32Property.prototype._castFunctor = _castFunctors.Int32;\n\n/**\n * A primitive property base class for big integer values.\n */\nexport class Integer64Property extends ValueProperty {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.ValueProperty\n * @alias property-properties.Integer64Property\n * @protected\n * @abstract\n * @category Value Properties\n */\n constructor(in_params, dataConstructor) {\n super(in_params);\n this.DataConstructor = dataConstructor;\n // default for this property type is '0, 0'\n this._data = new this.DataConstructor();\n }\n\n /**\n * Internal function to update the value of the Integer64Property\n *\n * @param {Int64|String|Number} in_value the new value\n * @param {boolean} [in_reportToView = true] - By default, the dirtying will always be reported to the checkout view\n * and trigger a modified event there. When batching updates, this\n * can be prevented via this flag.\n * @return {boolean} true if the value was actually changed\n * @throws if in_value is a string that contains characters other than numbers\n */\n _setValue(in_value, in_reportToView) {\n var oldLowValue = this._data.getValueLow();\n var oldHighValue = this._data.getValueHigh();\n\n in_value = this._castFunctor(in_value);\n\n var newHighValue = in_value.getValueHigh();\n var newLowValue = in_value.getValueLow();\n\n var changed = oldHighValue !== newHighValue || oldLowValue !== newLowValue;\n\n if (changed) {\n this._data = in_value.clone();\n this._setDirty(in_reportToView);\n }\n return changed;\n }\n\n /**\n * @return {number} the higher 32 bit integer part\n */\n getValueHigh() {\n return this._data.getValueHigh();\n }\n\n /**\n * @return {number} the lower 32 bit integer part\n */\n getValueLow() {\n return this._data.getValueLow();\n }\n\n /**\n * @param {number} in_high set the higher 32 bit integer part\n * @throws if in_high is not a number\n * @return {boolean} true if the value was actually changed\n */\n setValueHigh(in_high) {\n ConsoleUtils.assert(_.isNumber(in_high), MSG.IN_HIGH_MUST_BE_NUMBER + in_high);\n var changed = this._data.getValueHigh() !== in_high;\n\n if (changed) {\n var newData = new this.DataConstructor(this.getValueLow(), in_high);\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @param {number} in_low set the lower 32 bit integer part\n * @throws if in_low is not a number\n * @return {boolean} true if the value was actually changed\n */\n setValueLow(in_low) {\n ConsoleUtils.assert(_.isNumber(in_low), MSG.IN_LOW_MUST_BE_NUMBER + in_low);\n var changed = this._data.getValueLow() !== in_low;\n\n if (changed) {\n var newData = new this.DataConstructor(in_low, this.getValueHigh());\n this._data = newData;\n this._setDirty();\n }\n return changed;\n }\n\n /**\n * @inheritdoc\n */\n _deserialize(in_serializedObj, in_reportToView,\n in_filteringOptions, in_createChangeSet) {\n if (ChangeSet.isEmptyChangeSet(in_serializedObj)) {\n return undefined;\n } else {\n ConsoleUtils.assert(_.isArray(in_serializedObj) && in_serializedObj.length === 2, MSG.INVALID_INT64_CHANGESET);\n var readValue = new this.DataConstructor(in_serializedObj[0], in_serializedObj[1]);\n var changed = this._setValue(readValue, in_reportToView);\n return changed ? this.serialize() : undefined;\n }\n }\n\n /**\n * @inheritdoc\n */\n _applyChangeset(in_changeSet, in_reportToView, in_filteringOptions) {\n if (!ChangeSet.isEmptyChangeSet(in_changeSet)) {\n if (!_.isArray(in_changeSet)) {\n in_changeSet = in_changeSet.value;\n }\n ConsoleUtils.assert(_.isArray(in_changeSet) && in_changeSet.length === 2, MSG.INVALID_INT64_CHANGESET);\n var newVal = new this.DataConstructor(in_changeSet[0], in_changeSet[1]);\n this._setValue(newVal, in_reportToView);\n }\n }\n\n /**\n * Serialize the property\n *\n * @param {boolean} in_dirtyOnly -\n * Only include dirty entries in the serialization\n * @param {boolean} in_includeRootTypeid -\n * Include the typeid of the root of the hierarchy - has no effect for value properties\n * @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_dirtinessType] -\n * The type of dirtiness to use when reporting dirty changes. By default this is\n * PENDING_CHANGE * @return {*} The serialized representation of this property\n * @param {boolean} [in_includeReferencedRepositories=false] - If this is set to true, the serialize\n * function will descend into referenced repositories. WARNING: if there are loops in the references\n * this can result in an infinite loop\n * @return {*} The serialized representation of this property\n * @private\n */\n _serialize(in_dirtyOnly, in_includeRootTypeid,\n in_dirtinessType, in_includeReferencedRepositories) {\n if (in_dirtyOnly) {\n if (this._isDirty(in_dirtinessType)) {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n } else {\n return {};\n }\n } else {\n return [this._data.getValueLow(), this._data.getValueHigh()];\n }\n }\n\n /**\n * The toString() method returns a string representing the specified Integer64 object.\n *\n * @param {number} [in_radix = 10] An integer between 2 and 36 specifying\n * the base to use for representing numeric values.\n * @return {string} A string representing the specified Integer64 object.\n */\n toString(in_radix) {\n return this._data.toString(in_radix);\n }\n\n /**\n * The Integer64.fromString() method parses a string argument updates object's lower and higher 32 bit integer parts.\n *\n * @param {string} in_string The value to parse. Leading whitespace in the string argument is ignored.\n * @param {number} [in_radix = 10] An integer between 2 and 36 that represents the\n * radix (the base in mathematical numeral systems) of the above mentioned string.\n * @throws if in_string is not a string\n * @throws if in_radix is entered but is not a number between 2 and 36\n * @throws if the property is a Uint64 property and in_string is a negative number\n * @throws if in_string contains characters other than numbers\n */\n fromString(in_string, in_radix) {\n ConsoleUtils.assert(_.isString(in_string), MSG.IN_STRING_MUST_BE_STRING + in_string);\n var int = this._castFunctor(in_string, in_radix);\n\n this.setValueHigh(int.getValueHigh());\n this.setValueLow(int.getValueLow());\n }\n}\n\n/**\n * A primitive property class for big signed integer values.\n */\nexport class Int64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Int64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Int64);\n }\n}\nInt64Property.prototype._typeid = 'Int64';\nInt64Property.prototype._castFunctor = _castFunctors.Int64;\n\n/**\n * A primitive property class for big unsingned integer values.\n */\nexport class Uint64Property extends Integer64Property {\n /**\n * @param {Object=} in_params - the parameters\n * @constructor\n * @protected\n * @extends property-properties.Integer64Property\n * @alias property-properties.Uint64Property\n * @category Value Properties\n */\n constructor(in_params) {\n super(in_params, Uint64);\n }\n}\nUint64Property.prototype._typeid = 'Uint64';\nUint64Property.prototype._castFunctor = _castFunctors.Uint64;\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export namespace LazyLoadedProperties {
|
|
2
|
+
const PropertyFactory: any;
|
|
3
|
+
const AbstractStaticCollectionProperty: any;
|
|
4
|
+
const ArrayProperty: any;
|
|
5
|
+
const EnumArrayProperty: any;
|
|
6
|
+
const ReferenceProperty: any;
|
|
7
|
+
const StringProperty: any;
|
|
8
|
+
const ValueProperty: any;
|
|
9
|
+
const ValueMapProperty: any;
|
|
10
|
+
const ReferenceMapProperty: any;
|
|
11
|
+
const NodeProperty: any;
|
|
12
|
+
const IndexedCollectionBaseProperty: any;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=lazyLoadedProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazyLoadedProperties.d.ts","sourceRoot":"","sources":["../../src/properties/lazyLoadedProperties.js"],"names":[],"mappings":""}
|