@fluid-experimental/property-properties 0.58.1001 → 0.58.2000-58133
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/containerSerializer.d.ts.map +1 -1
- package/dist/containerSerializer.js +4 -10
- package/dist/containerSerializer.js.map +1 -1
- package/dist/enableValidations.d.ts.map +1 -1
- package/dist/enableValidations.js +1 -1
- package/dist/enableValidations.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
- package/dist/properties/abstractStaticCollectionProperty.js +1 -28
- package/dist/properties/abstractStaticCollectionProperty.js.map +1 -1
- package/dist/properties/arrayProperty.d.ts.map +1 -1
- package/dist/properties/arrayProperty.js +26 -85
- package/dist/properties/arrayProperty.js.map +1 -1
- package/dist/properties/baseProperty.d.ts.map +1 -1
- package/dist/properties/baseProperty.js +9 -71
- package/dist/properties/baseProperty.js.map +1 -1
- package/dist/properties/boolProperty.d.ts.map +1 -1
- package/dist/properties/boolProperty.js +0 -1
- package/dist/properties/boolProperty.js.map +1 -1
- package/dist/properties/containerProperty.d.ts.map +1 -1
- package/dist/properties/containerProperty.js +4 -22
- package/dist/properties/containerProperty.js.map +1 -1
- package/dist/properties/enumArrayProperty.d.ts.map +1 -1
- package/dist/properties/enumArrayProperty.js +2 -14
- package/dist/properties/enumArrayProperty.js.map +1 -1
- package/dist/properties/enumProperty.d.ts.map +1 -1
- package/dist/properties/enumProperty.js +3 -10
- package/dist/properties/enumProperty.js.map +1 -1
- package/dist/properties/floatProperties.js +0 -2
- package/dist/properties/floatProperties.js.map +1 -1
- package/dist/properties/index.d.ts +7 -38
- package/dist/properties/index.d.ts.map +1 -1
- package/dist/properties/index.js +37 -68
- package/dist/properties/index.js.map +1 -1
- package/dist/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
- package/dist/properties/indexedCollectionBaseProperty.js +6 -18
- package/dist/properties/indexedCollectionBaseProperty.js.map +1 -1
- package/dist/properties/intProperties.d.ts.map +1 -1
- package/dist/properties/intProperties.js +3 -20
- package/dist/properties/intProperties.js.map +1 -1
- package/dist/properties/lazyLoadedProperties.js.map +1 -1
- package/dist/properties/mapProperty.d.ts.map +1 -1
- package/dist/properties/mapProperty.js +4 -23
- package/dist/properties/mapProperty.js.map +1 -1
- package/dist/properties/namedNodeProperty.d.ts.map +1 -1
- package/dist/properties/namedNodeProperty.js.map +1 -1
- package/dist/properties/namedProperty.d.ts.map +1 -1
- package/dist/properties/namedProperty.js +0 -3
- package/dist/properties/namedProperty.js.map +1 -1
- package/dist/properties/nodeProperty.d.ts.map +1 -1
- package/dist/properties/nodeProperty.js +0 -3
- package/dist/properties/nodeProperty.js.map +1 -1
- package/dist/properties/primitiveTypeCasts.d.ts.map +1 -1
- package/dist/properties/primitiveTypeCasts.js +2 -2
- package/dist/properties/primitiveTypeCasts.js.map +1 -1
- package/dist/properties/referenceArrayProperty.d.ts.map +1 -1
- package/dist/properties/referenceArrayProperty.js +3 -16
- package/dist/properties/referenceArrayProperty.js.map +1 -1
- package/dist/properties/referenceMapProperty.d.ts.map +1 -1
- package/dist/properties/referenceMapProperty.js +3 -13
- package/dist/properties/referenceMapProperty.js.map +1 -1
- package/dist/properties/referenceProperty.d.ts.map +1 -1
- package/dist/properties/referenceProperty.js +4 -12
- package/dist/properties/referenceProperty.js.map +1 -1
- package/dist/properties/setProperty.d.ts.map +1 -1
- package/dist/properties/setProperty.js +3 -22
- package/dist/properties/setProperty.js.map +1 -1
- package/dist/properties/stringProperty.d.ts.map +1 -1
- package/dist/properties/stringProperty.js +12 -48
- package/dist/properties/stringProperty.js.map +1 -1
- package/dist/properties/uintProperties.js +0 -3
- package/dist/properties/uintProperties.js.map +1 -1
- package/dist/properties/valueArrayProperty.d.ts.map +1 -1
- package/dist/properties/valueArrayProperty.js +3 -45
- package/dist/properties/valueArrayProperty.js.map +1 -1
- package/dist/properties/valueMapProperty.d.ts.map +1 -1
- package/dist/properties/valueMapProperty.js +4 -29
- package/dist/properties/valueMapProperty.js.map +1 -1
- package/dist/properties/valueProperty.d.ts.map +1 -1
- package/dist/properties/valueProperty.js +2 -14
- package/dist/properties/valueProperty.js.map +1 -1
- package/dist/propertyFactory.d.ts.map +1 -1
- package/dist/propertyFactory.js +35 -72
- package/dist/propertyFactory.js.map +1 -1
- package/dist/propertyTemplate.d.ts.map +1 -1
- package/dist/propertyTemplate.js +0 -14
- package/dist/propertyTemplate.js.map +1 -1
- package/dist/propertyTemplateWrapper.d.ts.map +1 -1
- package/dist/propertyTemplateWrapper.js +4 -12
- package/dist/propertyTemplateWrapper.js.map +1 -1
- package/dist/propertyUtils.d.ts.map +1 -1
- package/dist/propertyUtils.js.map +1 -1
- package/dist/test/properties/arrayProperty.spec.js +82 -82
- package/dist/test/properties/arrayProperty.spec.js.map +1 -1
- package/dist/test/properties/baseProperty.spec.js +53 -53
- package/dist/test/properties/baseProperty.spec.js.map +1 -1
- package/dist/test/properties/containerProperty.spec.js +25 -25
- package/dist/test/properties/containerProperty.spec.js.map +1 -1
- package/dist/test/properties/customArrayProperty.spec.js +35 -35
- package/dist/test/properties/customArrayProperty.spec.js.map +1 -1
- package/dist/test/properties/enumArrayProperty.spec.js +6 -6
- package/dist/test/properties/enumArrayProperty.spec.js.map +1 -1
- package/dist/test/properties/enumProperty.spec.js +26 -26
- package/dist/test/properties/enumProperty.spec.js.map +1 -1
- package/dist/test/properties/float32.spec.js.map +1 -1
- package/dist/test/properties/int64ArrayProperty.spec.js +22 -22
- package/dist/test/properties/int64ArrayProperty.spec.js.map +1 -1
- package/dist/test/properties/int64MapProperty.spec.js +28 -28
- package/dist/test/properties/int64MapProperty.spec.js.map +1 -1
- package/dist/test/properties/int64Property.spec.js +11 -11
- package/dist/test/properties/int64Property.spec.js.map +1 -1
- package/dist/test/properties/isLeafNode.spec.js +25 -25
- package/dist/test/properties/isLeafNode.spec.js.map +1 -1
- package/dist/test/properties/mapProperty.spec.js +110 -110
- package/dist/test/properties/mapProperty.spec.js.map +1 -1
- package/dist/test/properties/namedNodeProperty.spec.js +5 -5
- package/dist/test/properties/namedNodeProperty.spec.js.map +1 -1
- package/dist/test/properties/nodeProperty.spec.js +160 -160
- package/dist/test/properties/nodeProperty.spec.js.map +1 -1
- package/dist/test/properties/referenceProperty.spec.js +21 -21
- package/dist/test/properties/referenceProperty.spec.js.map +1 -1
- package/dist/test/properties/relationshipProperty.spec.js +4 -4
- package/dist/test/properties/relationshipProperty.spec.js.map +1 -1
- package/dist/test/properties/setProperty.spec.js +32 -32
- package/dist/test/properties/setProperty.spec.js.map +1 -1
- package/dist/test/properties/stringProperty.spec.js +38 -38
- package/dist/test/properties/stringProperty.spec.js.map +1 -1
- package/dist/test/properties/uint64Property.spec.js +3 -3
- package/dist/test/properties/uint64Property.spec.js.map +1 -1
- package/dist/test/properties/valueMapProperty.spec.js +28 -28
- package/dist/test/properties/valueMapProperty.spec.js.map +1 -1
- package/dist/test/properties/valueProperty.spec.js +7 -7
- package/dist/test/properties/valueProperty.spec.js.map +1 -1
- package/dist/test/propertyFactory.spec.js +559 -560
- package/dist/test/propertyFactory.spec.js.map +1 -1
- package/dist/test/propertyTemplateWrapper.spec.js +38 -38
- package/dist/test/propertyTemplateWrapper.spec.js.map +1 -1
- package/dist/test/propertyUtils.spec.js +5 -5
- package/dist/test/propertyUtils.spec.js.map +1 -1
- package/dist/test/reversibleChangeset.spec.js +266 -266
- package/dist/test/reversibleChangeset.spec.js.map +1 -1
- package/dist/test/setup.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +145 -145
- package/dist/test/utils.spec.js +508 -517
- package/dist/test/utils.spec.js.map +1 -1
- package/dist/test/validation/badMissingSemverInTypeid.js +9 -9
- package/dist/test/validation/badMissingSemverInTypeid.js.map +1 -1
- package/dist/test/validation/badPrimitiveTypeid.js +5 -5
- package/dist/test/validation/badPrimitiveTypeid.js.map +1 -1
- package/dist/test/validation/goodColorId.js +42 -42
- package/dist/test/validation/goodColorId.js.map +1 -1
- package/dist/test/validation/goodColorPalette.js +2 -2
- package/dist/test/validation/goodColorPalette.js.map +1 -1
- package/dist/test/validation/goodPointId.js +9 -9
- package/dist/test/validation/goodPointId.js.map +1 -1
- package/dist/test/validation/reversibleChangeSetTestData.js +1 -1
- package/dist/test/validation/reversibleChangeSetTestData.js.map +1 -1
- package/lib/containerSerializer.js +4 -10
- package/lib/containerSerializer.js.map +1 -1
- package/lib/enableValidations.js +1 -1
- package/lib/enableValidations.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/properties/abstractStaticCollectionProperty.js +1 -28
- package/lib/properties/abstractStaticCollectionProperty.js.map +1 -1
- package/lib/properties/arrayProperty.js +26 -85
- package/lib/properties/arrayProperty.js.map +1 -1
- package/lib/properties/baseProperty.js +7 -69
- package/lib/properties/baseProperty.js.map +1 -1
- package/lib/properties/boolProperty.js +0 -1
- package/lib/properties/boolProperty.js.map +1 -1
- package/lib/properties/containerProperty.js +4 -22
- package/lib/properties/containerProperty.js.map +1 -1
- package/lib/properties/enumArrayProperty.js +2 -14
- package/lib/properties/enumArrayProperty.js.map +1 -1
- package/lib/properties/enumProperty.js +3 -10
- package/lib/properties/enumProperty.js.map +1 -1
- package/lib/properties/floatProperties.js +0 -2
- package/lib/properties/floatProperties.js.map +1 -1
- package/lib/properties/index.js +7 -38
- package/lib/properties/index.js.map +1 -1
- package/lib/properties/indexedCollectionBaseProperty.js +6 -18
- package/lib/properties/indexedCollectionBaseProperty.js.map +1 -1
- package/lib/properties/intProperties.js +3 -20
- package/lib/properties/intProperties.js.map +1 -1
- package/lib/properties/lazyLoadedProperties.js.map +1 -1
- package/lib/properties/mapProperty.js +4 -23
- package/lib/properties/mapProperty.js.map +1 -1
- package/lib/properties/namedNodeProperty.js.map +1 -1
- package/lib/properties/namedProperty.js +0 -3
- package/lib/properties/namedProperty.js.map +1 -1
- package/lib/properties/nodeProperty.js +0 -3
- package/lib/properties/nodeProperty.js.map +1 -1
- package/lib/properties/primitiveTypeCasts.js +2 -2
- package/lib/properties/primitiveTypeCasts.js.map +1 -1
- package/lib/properties/referenceArrayProperty.js +3 -16
- package/lib/properties/referenceArrayProperty.js.map +1 -1
- package/lib/properties/referenceMapProperty.js +3 -13
- package/lib/properties/referenceMapProperty.js.map +1 -1
- package/lib/properties/referenceProperty.js +4 -12
- package/lib/properties/referenceProperty.js.map +1 -1
- package/lib/properties/setProperty.js +3 -22
- package/lib/properties/setProperty.js.map +1 -1
- package/lib/properties/stringProperty.js +12 -48
- package/lib/properties/stringProperty.js.map +1 -1
- package/lib/properties/uintProperties.js +0 -3
- package/lib/properties/uintProperties.js.map +1 -1
- package/lib/properties/valueArrayProperty.js +3 -45
- package/lib/properties/valueArrayProperty.js.map +1 -1
- package/lib/properties/valueMapProperty.js +4 -29
- package/lib/properties/valueMapProperty.js.map +1 -1
- package/lib/properties/valueProperty.js +2 -14
- package/lib/properties/valueProperty.js.map +1 -1
- package/lib/propertyFactory.js +35 -72
- package/lib/propertyFactory.js.map +1 -1
- package/lib/propertyTemplate.js +0 -14
- package/lib/propertyTemplate.js.map +1 -1
- package/lib/propertyTemplateWrapper.js +4 -12
- package/lib/propertyTemplateWrapper.js.map +1 -1
- package/lib/propertyUtils.js.map +1 -1
- package/package.json +13 -6
|
@@ -8,17 +8,17 @@ exports.ArrayProperty = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* @fileoverview Definition of the array property class
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
12
|
-
const { BaseProperty } = require('./baseProperty');
|
|
13
|
-
const { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');
|
|
14
|
-
const { deserializeNonPrimitiveArrayElements } = require('../containerSerializer');
|
|
15
|
-
const { ArrayChangeSetIterator, ChangeSet, PathHelper, TypeIdHelper } = require('@fluid-experimental/property-changeset');
|
|
11
|
+
const { ArrayChangeSetIterator, ChangeSet, PathHelper, TypeIdHelper, } = require('@fluid-experimental/property-changeset');
|
|
16
12
|
const { MSG } = require('@fluid-experimental/property-common').constants;
|
|
17
|
-
const { LazyLoadedProperties: Property } = require('./lazyLoadedProperties');
|
|
18
13
|
const { UniversalDataArray, ConsoleUtils } = require('@fluid-experimental/property-common');
|
|
19
14
|
const fastestJSONCopy = require('fastest-json-copy');
|
|
20
|
-
const
|
|
15
|
+
const _ = require('lodash');
|
|
16
|
+
const { deserializeNonPrimitiveArrayElements } = require('../containerSerializer');
|
|
21
17
|
const { validationsEnabled } = require('../enableValidations');
|
|
18
|
+
const { AbstractStaticCollectionProperty } = require('./abstractStaticCollectionProperty');
|
|
19
|
+
const { BaseProperty } = require('./baseProperty');
|
|
20
|
+
const { LazyLoadedProperties: Property } = require('./lazyLoadedProperties');
|
|
21
|
+
const deepCopy = fastestJSONCopy.copy;
|
|
22
22
|
var MODIFIED_STATE_FLAGS = BaseProperty.MODIFIED_STATE_FLAGS;
|
|
23
23
|
// Some global constant objects that are used to indicate a few special
|
|
24
24
|
// cases for the dirty object. If there are no entries in the pending and
|
|
@@ -30,23 +30,23 @@ var MODIFIED_STATE_FLAGS = BaseProperty.MODIFIED_STATE_FLAGS;
|
|
|
30
30
|
var DIRTY_AND_PENDING_CHILD_CHANGES = {
|
|
31
31
|
pending: undefined,
|
|
32
32
|
dirty: undefined,
|
|
33
|
-
flags: MODIFIED_STATE_FLAGS.PENDING_CHANGE | MODIFIED_STATE_FLAGS.DIRTY
|
|
33
|
+
flags: MODIFIED_STATE_FLAGS.PENDING_CHANGE | MODIFIED_STATE_FLAGS.DIRTY,
|
|
34
34
|
};
|
|
35
35
|
var PENDING_CHILD_CHANGES = {
|
|
36
36
|
pending: undefined,
|
|
37
37
|
dirty: undefined,
|
|
38
|
-
flags: MODIFIED_STATE_FLAGS.PENDING_CHANGE
|
|
38
|
+
flags: MODIFIED_STATE_FLAGS.PENDING_CHANGE,
|
|
39
39
|
};
|
|
40
40
|
var DIRTY_CHILD_CHANGES = {
|
|
41
41
|
pending: undefined,
|
|
42
42
|
dirty: undefined,
|
|
43
|
-
flags: MODIFIED_STATE_FLAGS.DIRTY
|
|
43
|
+
flags: MODIFIED_STATE_FLAGS.DIRTY,
|
|
44
44
|
};
|
|
45
45
|
var DIRTY_STATE_FLAGS_ARRAY = [
|
|
46
46
|
undefined,
|
|
47
47
|
PENDING_CHILD_CHANGES,
|
|
48
48
|
DIRTY_CHILD_CHANGES,
|
|
49
|
-
DIRTY_AND_PENDING_CHILD_CHANGES
|
|
49
|
+
DIRTY_AND_PENDING_CHILD_CHANGES,
|
|
50
50
|
];
|
|
51
51
|
var PATH_TOKENS = BaseProperty.PATH_TOKENS;
|
|
52
52
|
/**
|
|
@@ -85,7 +85,7 @@ var _getLongestIncreasingSubsequenceSegments = function (in_segmentStarts, in_se
|
|
|
85
85
|
sequenceLength: in_segmentLengths[i] + (lastEntry ? lastEntry.sequenceLength : 0),
|
|
86
86
|
segmentIndex: i,
|
|
87
87
|
sequenceLastEntry: currentSegmentStart + in_segmentLengths[i] - 1,
|
|
88
|
-
previousEntry: lastEntry
|
|
88
|
+
previousEntry: lastEntry,
|
|
89
89
|
};
|
|
90
90
|
// Search for the insertion position for this entry
|
|
91
91
|
var insertionPoint = _.sortedIndexBy(foundSubSequences, newEntry, 'sequenceLength');
|
|
@@ -139,7 +139,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
139
139
|
}
|
|
140
140
|
this._dataArrayCreate(length);
|
|
141
141
|
}
|
|
142
|
-
;
|
|
143
142
|
/**
|
|
144
143
|
* Returns the path segment for a child
|
|
145
144
|
*
|
|
@@ -155,7 +154,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
155
154
|
}
|
|
156
155
|
return '[' + index + ']';
|
|
157
156
|
}
|
|
158
|
-
;
|
|
159
157
|
/**
|
|
160
158
|
* Resolves a direct child node based on the given path segment
|
|
161
159
|
*
|
|
@@ -184,7 +182,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
184
182
|
return AbstractStaticCollectionProperty.prototype._resolvePathSegment.call(this, in_segment, in_segmentType);
|
|
185
183
|
}
|
|
186
184
|
}
|
|
187
|
-
;
|
|
188
185
|
/**
|
|
189
186
|
* Insert into the array at a given position.
|
|
190
187
|
* It will not overwrite the existing values, it will push them to the right.
|
|
@@ -198,7 +195,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
198
195
|
insert(in_position, in_value) {
|
|
199
196
|
this.insertRange(in_position, [in_value]);
|
|
200
197
|
}
|
|
201
|
-
;
|
|
202
198
|
/**
|
|
203
199
|
* Is this property a leaf node with regard to flattening?
|
|
204
200
|
*
|
|
@@ -209,7 +205,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
209
205
|
_isFlattenLeaf() {
|
|
210
206
|
return true;
|
|
211
207
|
}
|
|
212
|
-
;
|
|
213
208
|
/**
|
|
214
209
|
* Add one or more values at the end of the array
|
|
215
210
|
* @param {Array<property-properties.BaseProperty>|property-properties.BaseProperty|*|Array<*>} in_values
|
|
@@ -227,7 +222,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
227
222
|
}
|
|
228
223
|
return this._dataArrayGetLength();
|
|
229
224
|
}
|
|
230
|
-
;
|
|
231
225
|
/**
|
|
232
226
|
* Add elements to the end of the queue (array)
|
|
233
227
|
*/
|
|
@@ -253,7 +247,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
253
247
|
}
|
|
254
248
|
return this._dataArrayGetLength();
|
|
255
249
|
}
|
|
256
|
-
;
|
|
257
250
|
/**
|
|
258
251
|
* Removes an element of the array (or a letter in a StringProperty) and shifts remaining elements to the left
|
|
259
252
|
* E.g. [1, 2, 3] .remove(1) => [1, 3]
|
|
@@ -269,7 +262,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
269
262
|
this.removeRange(in_position, 1);
|
|
270
263
|
return value;
|
|
271
264
|
}
|
|
272
|
-
;
|
|
273
265
|
/**
|
|
274
266
|
* Removes the last element of the array or the last letter of a string (for StringProperty)
|
|
275
267
|
* @throws if trying to modify a referenced property
|
|
@@ -285,7 +277,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
285
277
|
return undefined;
|
|
286
278
|
}
|
|
287
279
|
}
|
|
288
|
-
;
|
|
289
280
|
/**
|
|
290
281
|
* Removes an element from the front of the array or a letter from the beginning of a string (for StringProperty)
|
|
291
282
|
* @return {*|property-properties.BaseProperty} the element removed.
|
|
@@ -300,7 +291,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
300
291
|
return undefined;
|
|
301
292
|
}
|
|
302
293
|
}
|
|
303
|
-
;
|
|
304
294
|
/**
|
|
305
295
|
* Removes elements from the front of the queue (array)
|
|
306
296
|
*/
|
|
@@ -321,7 +311,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
321
311
|
}
|
|
322
312
|
this.setRange(in_position, [in_value]);
|
|
323
313
|
}
|
|
324
|
-
;
|
|
325
314
|
/**
|
|
326
315
|
* Sets the values of items in the array.
|
|
327
316
|
* If values are typed, iterates through the values and creates a property with the defined type and value.
|
|
@@ -358,7 +347,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
358
347
|
this._setValuesInternal(in_values);
|
|
359
348
|
}
|
|
360
349
|
}
|
|
361
|
-
;
|
|
362
350
|
/**
|
|
363
351
|
* @param {Array<*>|Object} in_values an array or object containing the values to be set.
|
|
364
352
|
* @see {setValues}
|
|
@@ -370,8 +358,9 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
370
358
|
this.clear();
|
|
371
359
|
this.insertRange(0, in_values);
|
|
372
360
|
}
|
|
373
|
-
else
|
|
361
|
+
else {
|
|
374
362
|
AbstractStaticCollectionProperty.prototype.setValues.call(this, in_values);
|
|
363
|
+
}
|
|
375
364
|
}
|
|
376
365
|
else {
|
|
377
366
|
if (_.isArray(in_values) && in_values.length < this._dataArrayGetLength()) {
|
|
@@ -391,7 +380,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
391
380
|
});
|
|
392
381
|
}
|
|
393
382
|
}
|
|
394
|
-
;
|
|
395
383
|
/**
|
|
396
384
|
* Sets the values of items in the array.
|
|
397
385
|
* If called using an array (e.g. setValues([prop1, prop2])), it will overwrite the whole array.
|
|
@@ -413,7 +401,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
413
401
|
ArrayProperty.prototype._setValues.call(this, in_values, false, false);
|
|
414
402
|
}
|
|
415
403
|
}
|
|
416
|
-
;
|
|
417
404
|
/**
|
|
418
405
|
* Deletes all values from an array
|
|
419
406
|
*/
|
|
@@ -422,7 +409,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
422
409
|
this.removeRange(0, this.getLength());
|
|
423
410
|
}
|
|
424
411
|
}
|
|
425
|
-
;
|
|
426
412
|
/**
|
|
427
413
|
* @return {Array<*> | String} all values in the ArrayProperty
|
|
428
414
|
* If called on StringProperty, it returns the whole string
|
|
@@ -432,7 +418,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
432
418
|
getEntriesReadOnly() {
|
|
433
419
|
return this._dataArrayGetBuffer();
|
|
434
420
|
}
|
|
435
|
-
;
|
|
436
421
|
/**
|
|
437
422
|
* Private helper function to update the internal dirty and pending changes
|
|
438
423
|
* is overwritten by StringProperty
|
|
@@ -447,7 +432,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
447
432
|
ChangeSet.prototype._performApplyAfterOnPropertyArray(dirtyChanges, in_changeSet, this.getFullTypeid(true));
|
|
448
433
|
this._setChanges(pendingChanges, dirtyChanges);
|
|
449
434
|
}
|
|
450
|
-
;
|
|
451
435
|
/**
|
|
452
436
|
* Returns the pending changeset for this object
|
|
453
437
|
* @return {property-properties.SerializedChangeSet} The pending changes
|
|
@@ -455,7 +439,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
455
439
|
_getPendingChanges() {
|
|
456
440
|
return (this._dirty && this._dirty.pending) || {};
|
|
457
441
|
}
|
|
458
|
-
;
|
|
459
442
|
/**
|
|
460
443
|
* Returns the dirty changeset for this object
|
|
461
444
|
* @return {property-properties.SerializedChangeSet} The dirty changes
|
|
@@ -463,7 +446,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
463
446
|
_getDirtyChanges() {
|
|
464
447
|
return (this._dirty && this._dirty.dirty) || {};
|
|
465
448
|
}
|
|
466
|
-
;
|
|
467
449
|
/**
|
|
468
450
|
* Sets the pending and dirty changesets
|
|
469
451
|
*
|
|
@@ -516,7 +498,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
516
498
|
this._dirty = DIRTY_STATE_FLAGS_ARRAY[oldFlags];
|
|
517
499
|
}
|
|
518
500
|
}
|
|
519
|
-
;
|
|
520
501
|
/**
|
|
521
502
|
* Sets the dirty flags for this property
|
|
522
503
|
* @param {Number} in_flags The dirty flags
|
|
@@ -539,7 +520,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
539
520
|
this._dirty = DIRTY_STATE_FLAGS_ARRAY[in_flags];
|
|
540
521
|
}
|
|
541
522
|
}
|
|
542
|
-
;
|
|
543
523
|
/**
|
|
544
524
|
* Gets the dirty flags for this property
|
|
545
525
|
* @return {Number} The dirty flags
|
|
@@ -550,7 +530,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
550
530
|
}
|
|
551
531
|
return this._dirty.flags;
|
|
552
532
|
}
|
|
553
|
-
;
|
|
554
533
|
/**
|
|
555
534
|
* Inserts the content of a given array into the array property
|
|
556
535
|
* It will not overwrite the existing values but push them to the right instead.
|
|
@@ -578,7 +557,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
578
557
|
this._insertRangeWithoutDirtying(in_offset, in_array);
|
|
579
558
|
this._setDirty();
|
|
580
559
|
}
|
|
581
|
-
;
|
|
582
560
|
/**
|
|
583
561
|
* inserts the content of a given array, but doesn't dirty the property
|
|
584
562
|
* this is useful for batch changes
|
|
@@ -589,8 +567,9 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
589
567
|
* @private
|
|
590
568
|
*/
|
|
591
569
|
_insertRangeWithoutDirtying(in_offset, in_array, in_setParents) {
|
|
592
|
-
if (in_setParents === undefined)
|
|
570
|
+
if (in_setParents === undefined) {
|
|
593
571
|
in_setParents = true;
|
|
572
|
+
}
|
|
594
573
|
if (in_offset < 0 || in_offset > this.length || !_.isNumber(in_offset)) {
|
|
595
574
|
throw Error(MSG.START_OFFSET_INVALID + in_offset);
|
|
596
575
|
}
|
|
@@ -614,11 +593,10 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
614
593
|
this._dataArrayInsertRange(in_offset, in_array);
|
|
615
594
|
// Insert entry into changesets
|
|
616
595
|
var changeSet = {
|
|
617
|
-
'insert': [[in_offset, this._serializeArray(in_array)]]
|
|
596
|
+
'insert': [[in_offset, this._serializeArray(in_array)]],
|
|
618
597
|
};
|
|
619
598
|
this._updateChanges(changeSet);
|
|
620
599
|
}
|
|
621
|
-
;
|
|
622
600
|
/**
|
|
623
601
|
* Removes a given number of elements from the array property (or given number of letters from a StringProperty)
|
|
624
602
|
* and shifts remaining values to the left.
|
|
@@ -646,7 +624,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
646
624
|
this._setDirty();
|
|
647
625
|
return result;
|
|
648
626
|
}
|
|
649
|
-
;
|
|
650
627
|
/**
|
|
651
628
|
* removes a given number of elements from the array property, and ensures, if this is not
|
|
652
629
|
* a primitive array, that any existing properties have their parent pointer cleared.
|
|
@@ -667,7 +644,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
667
644
|
}
|
|
668
645
|
this._dataArrayRemoveRange(in_offset, in_deleteCount);
|
|
669
646
|
}
|
|
670
|
-
;
|
|
671
647
|
/**
|
|
672
648
|
* removes a given number of elements from the array property, but doesn't dirty the property
|
|
673
649
|
* this is useful for batch changes
|
|
@@ -679,11 +655,10 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
679
655
|
this._clearRange(in_offset, in_deleteCount);
|
|
680
656
|
// Insert entry into changesets
|
|
681
657
|
var changeSet = {
|
|
682
|
-
'remove': [[in_offset, in_deleteCount]]
|
|
658
|
+
'remove': [[in_offset, in_deleteCount]],
|
|
683
659
|
};
|
|
684
660
|
this._updateChanges(changeSet);
|
|
685
661
|
}
|
|
686
|
-
;
|
|
687
662
|
/**
|
|
688
663
|
* Sets the array properties elements to the content of the given array
|
|
689
664
|
* All changed elements must already exist. This will overwrite existing elements.
|
|
@@ -707,7 +682,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
707
682
|
this._setRangeWithoutDirtying(in_offset, in_array);
|
|
708
683
|
this._setDirty();
|
|
709
684
|
}
|
|
710
|
-
;
|
|
711
685
|
/**
|
|
712
686
|
* sets the array properties elements to the content of the given array
|
|
713
687
|
* all changed elements must already exist. This version doesn't dirty the property,
|
|
@@ -718,7 +692,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
718
692
|
_setRangeWithoutDirtying(in_offset, in_array) {
|
|
719
693
|
this._modifyRangeWithoutDirtying(in_offset, in_array);
|
|
720
694
|
}
|
|
721
|
-
;
|
|
722
695
|
/**
|
|
723
696
|
* sets the array properties elements to the content of the given array
|
|
724
697
|
* all changed elements must already exist. This version doesn't dirty the property,
|
|
@@ -760,7 +733,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
760
733
|
this._updateChanges(changeSet);
|
|
761
734
|
}
|
|
762
735
|
}
|
|
763
|
-
;
|
|
764
736
|
/**
|
|
765
737
|
* Returns the name of all the sub-properties of this property.
|
|
766
738
|
* Numerical indexes from the array will be returned as strings.
|
|
@@ -771,7 +743,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
771
743
|
getIds() {
|
|
772
744
|
return Object.keys(this._dataArrayGetBuffer());
|
|
773
745
|
}
|
|
774
|
-
;
|
|
775
746
|
/**
|
|
776
747
|
* Checks whether a property or data exists at the given position.
|
|
777
748
|
*
|
|
@@ -781,7 +752,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
781
752
|
has(in_position) {
|
|
782
753
|
return this._dataArrayGetBuffer()[in_position] !== undefined;
|
|
783
754
|
}
|
|
784
|
-
;
|
|
785
755
|
/**
|
|
786
756
|
* Gets the array element at a given index
|
|
787
757
|
* @param {number | array<string|number>} in_position the target index
|
|
@@ -857,7 +827,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
857
827
|
return result;
|
|
858
828
|
}
|
|
859
829
|
}
|
|
860
|
-
;
|
|
861
830
|
/**
|
|
862
831
|
* Returns an object with all the nested values contained in this property
|
|
863
832
|
* @return {array<object> | array<*>} an array of objects or values representing the values of your property
|
|
@@ -885,14 +854,12 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
885
854
|
}
|
|
886
855
|
return result;
|
|
887
856
|
}
|
|
888
|
-
;
|
|
889
857
|
/**
|
|
890
858
|
* @return {Number} the current length of the array
|
|
891
859
|
*/
|
|
892
860
|
getLength() {
|
|
893
861
|
return this._dataArrayGetLength();
|
|
894
862
|
}
|
|
895
|
-
;
|
|
896
863
|
/**
|
|
897
864
|
* @inheritdoc
|
|
898
865
|
*/
|
|
@@ -974,7 +941,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
974
941
|
// of dirtying events)
|
|
975
942
|
this._setDirty(in_reportToView);
|
|
976
943
|
}
|
|
977
|
-
;
|
|
978
944
|
/**
|
|
979
945
|
* @inheritdoc
|
|
980
946
|
*/
|
|
@@ -985,7 +951,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
985
951
|
// of dirtying events)
|
|
986
952
|
this._setDirty(false);
|
|
987
953
|
}
|
|
988
|
-
;
|
|
989
954
|
/**
|
|
990
955
|
* Removes the dirtiness flag from this property
|
|
991
956
|
* @param {property-properties.BaseProperty.MODIFIED_STATE_FLAGS} [in_flags] - The flags to clean, if none are supplied all
|
|
@@ -1007,7 +972,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1007
972
|
}
|
|
1008
973
|
this._setChanges(pendingChanges, dirtyChanges);
|
|
1009
974
|
}
|
|
1010
|
-
;
|
|
1011
975
|
/**
|
|
1012
976
|
* Removes the dirtiness flag from this property and recursively from all of its children
|
|
1013
977
|
*
|
|
@@ -1023,7 +987,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1023
987
|
// after all paths are clean, we are also clean!
|
|
1024
988
|
this._cleanDirty(in_dirtinessType);
|
|
1025
989
|
}
|
|
1026
|
-
;
|
|
1027
990
|
/**
|
|
1028
991
|
* Internal helper function that implements the deserialize algorithm for an array of named properties.
|
|
1029
992
|
*
|
|
@@ -1135,7 +1098,7 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1135
1098
|
let elementsToInsert = targetArray.slice(lastPositionInTargetArray, startPointInTargetArray);
|
|
1136
1099
|
changes.insert.push([
|
|
1137
1100
|
lastPositionInInitialArray,
|
|
1138
|
-
deepCopy(elementsToInsert)
|
|
1101
|
+
deepCopy(elementsToInsert),
|
|
1139
1102
|
]);
|
|
1140
1103
|
var scope = this._getScope();
|
|
1141
1104
|
var insertedProperties = deserializeNonPrimitiveArrayElements(elementsToInsert, scope);
|
|
@@ -1175,7 +1138,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1175
1138
|
}
|
|
1176
1139
|
return changes;
|
|
1177
1140
|
}
|
|
1178
|
-
;
|
|
1179
1141
|
/**
|
|
1180
1142
|
* Function to deserialize special primitive types.
|
|
1181
1143
|
* Some primitive types (e.g. Int64, which is not natively supported by javascript) require
|
|
@@ -1187,7 +1149,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1187
1149
|
_deserializeValue(in_serializedObj) {
|
|
1188
1150
|
return in_serializedObj;
|
|
1189
1151
|
}
|
|
1190
|
-
;
|
|
1191
1152
|
/**
|
|
1192
1153
|
* Function to serialize special primitive types.
|
|
1193
1154
|
* Some primitive types (e.g. Int64, which is not natively supported by javascript) require
|
|
@@ -1200,7 +1161,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1200
1161
|
// we have to convert the propertySet objects to changesets
|
|
1201
1162
|
return in_obj._serialize(false, true);
|
|
1202
1163
|
}
|
|
1203
|
-
;
|
|
1204
1164
|
/**
|
|
1205
1165
|
* Function to serialize arrays of special primitive types.
|
|
1206
1166
|
* Some primitive types (e.g. Int64, which is not natively supported by javascript) require
|
|
@@ -1224,7 +1184,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1224
1184
|
}
|
|
1225
1185
|
return result;
|
|
1226
1186
|
}
|
|
1227
|
-
;
|
|
1228
1187
|
/**
|
|
1229
1188
|
* Function to deserialize arrays of special primitive types.
|
|
1230
1189
|
* Some primitive types (e.g. Int64, which is not natively supported by javascript) require
|
|
@@ -1236,7 +1195,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1236
1195
|
_deserializeArray(in_serializedObj) {
|
|
1237
1196
|
return in_serializedObj;
|
|
1238
1197
|
}
|
|
1239
|
-
;
|
|
1240
1198
|
/**
|
|
1241
1199
|
* @inheritdoc
|
|
1242
1200
|
*/
|
|
@@ -1259,7 +1217,7 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1259
1217
|
this._clearRange(0, arrayLength);
|
|
1260
1218
|
this._setDirty(in_reportToView);
|
|
1261
1219
|
var removeChangeSet = {
|
|
1262
|
-
remove: [[0, arrayLength]]
|
|
1220
|
+
remove: [[0, arrayLength]],
|
|
1263
1221
|
};
|
|
1264
1222
|
this._updateChanges(removeChangeSet);
|
|
1265
1223
|
return removeChangeSet;
|
|
@@ -1277,7 +1235,7 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1277
1235
|
// most simplistic diff method: Remove all existing data and insert the new data
|
|
1278
1236
|
// The changes we will report as result of this function
|
|
1279
1237
|
var simpleChanges = {
|
|
1280
|
-
insert: in_createChangeSet ? deepCopy(in_serializedObj.insert) : in_serializedObj.insert
|
|
1238
|
+
insert: in_createChangeSet ? deepCopy(in_serializedObj.insert) : in_serializedObj.insert,
|
|
1281
1239
|
};
|
|
1282
1240
|
if (arrayLength > 0) {
|
|
1283
1241
|
simpleChanges.remove = [[0, arrayLength]];
|
|
@@ -1331,7 +1289,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1331
1289
|
return simpleChanges;
|
|
1332
1290
|
}
|
|
1333
1291
|
}
|
|
1334
|
-
;
|
|
1335
1292
|
_getChangesetForCustomTypeArray(in_basePropertyChangeset, in_dirtinessType, in_includeReferencedRepositories) {
|
|
1336
1293
|
var result = {};
|
|
1337
1294
|
if (in_basePropertyChangeset.remove && in_basePropertyChangeset.remove.length > 0) {
|
|
@@ -1370,7 +1327,7 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1370
1327
|
if (lastModify) {
|
|
1371
1328
|
lastModify[1].push(this._dataArrayGetValue(currentArrayIndex).serialize({
|
|
1372
1329
|
'dirtyOnly': true, 'includeRootTypeid': true, 'dirtinessType': in_dirtinessType,
|
|
1373
|
-
'includeReferencedRepositories': in_includeReferencedRepositories
|
|
1330
|
+
'includeReferencedRepositories': in_includeReferencedRepositories,
|
|
1374
1331
|
}));
|
|
1375
1332
|
}
|
|
1376
1333
|
else {
|
|
@@ -1381,7 +1338,7 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1381
1338
|
result.modify.push([currentArrayIndex - op.offset,
|
|
1382
1339
|
[this._dataArrayGetValue(currentArrayIndex).serialize({
|
|
1383
1340
|
'dirtyOnly': true, 'includeRootTypeid': true, 'dirtinessType': in_dirtinessType,
|
|
1384
|
-
'includeReferencedRepositories': in_includeReferencedRepositories
|
|
1341
|
+
'includeReferencedRepositories': in_includeReferencedRepositories,
|
|
1385
1342
|
})]]);
|
|
1386
1343
|
}
|
|
1387
1344
|
currentArrayIndex++;
|
|
@@ -1390,7 +1347,7 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1390
1347
|
this._dataArrayGetValue(currentArrayIndex)._isDirty(in_dirtinessType)) {
|
|
1391
1348
|
result.modify[result.modify.length - 1][1].push(this._dataArrayGetValue(currentArrayIndex).serialize({
|
|
1392
1349
|
'dirtyOnly': true, 'includeRootTypeid': true, 'dirtinessType': in_dirtinessType,
|
|
1393
|
-
'includeReferencedRepositories': in_includeReferencedRepositories
|
|
1350
|
+
'includeReferencedRepositories': in_includeReferencedRepositories,
|
|
1394
1351
|
}));
|
|
1395
1352
|
currentArrayIndex++;
|
|
1396
1353
|
}
|
|
@@ -1418,7 +1375,7 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1418
1375
|
}
|
|
1419
1376
|
newInsert[1].push(this._dataArrayGetValue(opStartIndex + j).serialize({
|
|
1420
1377
|
'dirtyOnly': false, 'includeRootTypeid': true, 'dirtinessType': in_dirtinessType,
|
|
1421
|
-
'includeReferencedRepositories': in_includeReferencedRepositories
|
|
1378
|
+
'includeReferencedRepositories': in_includeReferencedRepositories,
|
|
1422
1379
|
}));
|
|
1423
1380
|
}
|
|
1424
1381
|
if (!result.insert) {
|
|
@@ -1437,7 +1394,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1437
1394
|
}
|
|
1438
1395
|
return result;
|
|
1439
1396
|
}
|
|
1440
|
-
;
|
|
1441
1397
|
/**
|
|
1442
1398
|
* Serialize the property
|
|
1443
1399
|
*
|
|
@@ -1494,7 +1450,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1494
1450
|
return result;
|
|
1495
1451
|
}
|
|
1496
1452
|
}
|
|
1497
|
-
;
|
|
1498
1453
|
/**
|
|
1499
1454
|
* Repeatedly calls back the given function with human-readable string
|
|
1500
1455
|
* representations of the property and of its sub-properties.
|
|
@@ -1522,7 +1477,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1522
1477
|
}
|
|
1523
1478
|
printFct(indent + ']');
|
|
1524
1479
|
}
|
|
1525
|
-
;
|
|
1526
1480
|
/**
|
|
1527
1481
|
* Repeatedly calls back the given function with human-readable string
|
|
1528
1482
|
* representations of the property's sub-properties.
|
|
@@ -1537,7 +1491,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1537
1491
|
._prettyPrint(indent, ids[i] + ': ', printFct);
|
|
1538
1492
|
}
|
|
1539
1493
|
}
|
|
1540
|
-
;
|
|
1541
1494
|
/**
|
|
1542
1495
|
* Return a JSON representation of the array and its items.
|
|
1543
1496
|
* @return {object} A JSON representation of the array and its items.
|
|
@@ -1549,7 +1502,7 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1549
1502
|
context: this._context,
|
|
1550
1503
|
typeid: this.getTypeid(),
|
|
1551
1504
|
isConstant: this._isConstant,
|
|
1552
|
-
value: []
|
|
1505
|
+
value: [],
|
|
1553
1506
|
};
|
|
1554
1507
|
if (!this._isPrimitive) {
|
|
1555
1508
|
var ids = this.getIds();
|
|
@@ -1562,7 +1515,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1562
1515
|
}
|
|
1563
1516
|
return json;
|
|
1564
1517
|
}
|
|
1565
|
-
;
|
|
1566
1518
|
/**
|
|
1567
1519
|
* Returns the full property type identifier for the ChangeSet including the array type id, if not
|
|
1568
1520
|
* omitted by parameters
|
|
@@ -1577,7 +1529,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1577
1529
|
return TypeIdHelper.createSerializationTypeId(this._typeid, 'array');
|
|
1578
1530
|
}
|
|
1579
1531
|
}
|
|
1580
|
-
;
|
|
1581
1532
|
/**
|
|
1582
1533
|
* Creates and initializes the data array
|
|
1583
1534
|
* @param {Number} in_length the initial length of the array
|
|
@@ -1592,7 +1543,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1592
1543
|
this._dataArraySetValue(i, element);
|
|
1593
1544
|
}
|
|
1594
1545
|
}
|
|
1595
|
-
;
|
|
1596
1546
|
/**
|
|
1597
1547
|
* Returns the length of the data array
|
|
1598
1548
|
* @return {Number} The length
|
|
@@ -1600,7 +1550,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1600
1550
|
_dataArrayGetLength() {
|
|
1601
1551
|
return this._dataArrayRef.length;
|
|
1602
1552
|
}
|
|
1603
|
-
;
|
|
1604
1553
|
/**
|
|
1605
1554
|
* Returns the data array's internal buffer
|
|
1606
1555
|
* @return {Array} The buffer
|
|
@@ -1608,7 +1557,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1608
1557
|
_dataArrayGetBuffer() {
|
|
1609
1558
|
return this._dataArrayRef.getBuffer();
|
|
1610
1559
|
}
|
|
1611
|
-
;
|
|
1612
1560
|
/**
|
|
1613
1561
|
* Returns an entry from the data array
|
|
1614
1562
|
* @param {Number} in_index - Position in the array
|
|
@@ -1618,7 +1566,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1618
1566
|
_dataArrayGetValue(in_index) {
|
|
1619
1567
|
return this._dataArrayRef.getValue(in_index);
|
|
1620
1568
|
}
|
|
1621
|
-
;
|
|
1622
1569
|
/**
|
|
1623
1570
|
* Sets an entry in the data array
|
|
1624
1571
|
* @param {Number} in_index - Position in the array
|
|
@@ -1627,7 +1574,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1627
1574
|
_dataArraySetValue(in_index, in_value) {
|
|
1628
1575
|
this._dataArrayRef.setValue(in_index, in_value);
|
|
1629
1576
|
}
|
|
1630
|
-
;
|
|
1631
1577
|
/**
|
|
1632
1578
|
* Set the array to the given new array
|
|
1633
1579
|
* @param {Array} in_newArray - The new contents of the array
|
|
@@ -1635,7 +1581,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1635
1581
|
_dataArrayDeserialize(in_newArray) {
|
|
1636
1582
|
this._dataArrayRef.deserialize(in_newArray);
|
|
1637
1583
|
}
|
|
1638
|
-
;
|
|
1639
1584
|
/**
|
|
1640
1585
|
* Inserts a range into the data array
|
|
1641
1586
|
* @param {Number} in_position - Position at which the insert should be done
|
|
@@ -1644,7 +1589,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1644
1589
|
_dataArrayInsertRange(in_position, in_range) {
|
|
1645
1590
|
this._dataArrayRef.insertRange(in_position, in_range);
|
|
1646
1591
|
}
|
|
1647
|
-
;
|
|
1648
1592
|
/**
|
|
1649
1593
|
* Removes a range from the data array
|
|
1650
1594
|
* @param {Number} in_position - Position at which to start the removal
|
|
@@ -1653,7 +1597,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1653
1597
|
_dataArrayRemoveRange(in_position, in_length) {
|
|
1654
1598
|
this._dataArrayRef.removeRange(in_position, in_length);
|
|
1655
1599
|
}
|
|
1656
|
-
;
|
|
1657
1600
|
/**
|
|
1658
1601
|
* Overwrites a range in the data array
|
|
1659
1602
|
* @param {Number} in_position - Position at which to start the removal
|
|
@@ -1662,7 +1605,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1662
1605
|
_dataArraySetRange(in_position, in_range) {
|
|
1663
1606
|
this._dataArrayRef.set(in_position, in_range);
|
|
1664
1607
|
}
|
|
1665
|
-
;
|
|
1666
1608
|
/**
|
|
1667
1609
|
* Get the scope to which this property belongs to.
|
|
1668
1610
|
* @return {string|undefined} The guid representing the scope in which the
|
|
@@ -1679,7 +1621,6 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1679
1621
|
return this._scope;
|
|
1680
1622
|
}
|
|
1681
1623
|
}
|
|
1682
|
-
;
|
|
1683
1624
|
/**
|
|
1684
1625
|
* returns the length of the current array property
|
|
1685
1626
|
*/
|