@fluid-experimental/property-properties 1.0.1 → 1.1.0
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/arrayProperty.d.ts.map +1 -1
- package/dist/properties/arrayProperty.js +6 -4
- package/dist/properties/arrayProperty.js.map +1 -1
- package/dist/properties/baseProperty.js +2 -2
- package/dist/properties/baseProperty.js.map +1 -1
- package/dist/properties/enumArrayProperty.js +8 -8
- package/dist/properties/enumArrayProperty.js.map +1 -1
- package/dist/properties/intProperties.d.ts +0 -1
- package/dist/properties/intProperties.d.ts.map +1 -1
- package/dist/properties/intProperties.js +0 -1
- package/dist/properties/intProperties.js.map +1 -1
- package/dist/properties/mapProperty.js +2 -2
- package/dist/properties/mapProperty.js.map +1 -1
- package/dist/properties/referenceArrayProperty.js +1 -1
- package/dist/properties/referenceArrayProperty.js.map +1 -1
- package/dist/properties/referenceMapProperty.js +1 -1
- package/dist/properties/referenceMapProperty.js.map +1 -1
- package/dist/properties/referenceProperty.js +1 -1
- package/dist/properties/referenceProperty.js.map +1 -1
- package/dist/properties/valueArrayProperty.js +2 -2
- package/dist/properties/valueArrayProperty.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +1 -1
- package/lib/properties/arrayProperty.d.ts.map +1 -1
- package/lib/properties/arrayProperty.js +6 -4
- package/lib/properties/arrayProperty.js.map +1 -1
- package/lib/properties/baseProperty.js +2 -2
- package/lib/properties/baseProperty.js.map +1 -1
- package/lib/properties/enumArrayProperty.js +8 -8
- package/lib/properties/enumArrayProperty.js.map +1 -1
- package/lib/properties/intProperties.d.ts +0 -1
- package/lib/properties/intProperties.d.ts.map +1 -1
- package/lib/properties/intProperties.js +0 -1
- package/lib/properties/intProperties.js.map +1 -1
- package/lib/properties/mapProperty.js +2 -2
- package/lib/properties/mapProperty.js.map +1 -1
- package/lib/properties/referenceArrayProperty.js +1 -1
- package/lib/properties/referenceArrayProperty.js.map +1 -1
- package/lib/properties/referenceMapProperty.js +1 -1
- package/lib/properties/referenceMapProperty.js.map +1 -1
- package/lib/properties/referenceProperty.js +1 -1
- package/lib/properties/referenceProperty.js.map +1 -1
- package/lib/properties/valueArrayProperty.js +2 -2
- package/lib/properties/valueArrayProperty.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrayProperty.d.ts","sourceRoot":"","sources":["../../src/properties/arrayProperty.js"],"names":[],"mappings":"AA6IA;IACI;;;;;;OAMG;IACH,wBAaC;IAJO,eAAsB;
|
|
1
|
+
{"version":3,"file":"arrayProperty.d.ts","sourceRoot":"","sources":["../../src/properties/arrayProperty.js"],"names":[],"mappings":"AA6IA;IACI;;;;;;OAMG;IACH,wBAaC;IAJO,eAAsB;IAsD9B;;;;;;;;;OASG;IACH,oBAPW,MAAM,uBAShB;IAaD;;;;;;;OAOG;IACH,sBAFY,MAAM,CASjB;IAED;;OAEG;IACH,gCAEC;IAED;;;;;;;;;OASG;IACH,yBAFY,MAAM,CASjB;IAED;;;;;;;;;OASG;IACH,oBANW,MAAM,YAUhB;IAED;;;;OAIG;IACH,gBASC;IAED;;;OAGG;IACH,SAFY,cAAU,CAUrB;IAED;;OAEG;IACH,eAEC;IAED;;;;;;;OAOG;IACH,iBALW,MAAM,uBAUhB;IAwCD;;;OAGG;IACH,8BAHW,UAAQ,MAAO,QA8BzB;IAuBD;;OAEG;IACH,cAIC;IAYD;;;;;;OAMG;IACH,uBAUC;IAED;;;OAGG;IACH,+BAEC;IAED;;;OAGG;IACH,6BAEC;IAED;;;;;;;;;OASG;IACH,kDAwCC;IAoCD;;;;;;;;;;;OAWG;IACH,uBARW,MAAM,YACN,UAAQ,QAsBlB;IAED;;;;;;;;OAQG;IACH,oCAgCC;IAED;;;;;;;;;;;;OAYG;IACH,uBATW,MAAM,kBACN,MAAM,GAKL,UAAQ,GAAE,eAAc,CAkBnC;IAED;;;;;;OAMG;IACH,oBAYC;IAED;;;;;;OAMG;IACH,oCAQC;IAED;;;;;;;;OAQG;IACH,oBALW,MAAM,uBAoBhB;IAED;;;;;;OAMG;IACH,oCAHW,MAAM,YACN,UAAQ,QAIlB;IAED;;;;;;OAMG;IACH,uCAHW,MAAM,YACN,UAAQ,QAmClB;IA4HD;;OAEG;IACH,oBAEC;IAkJD;;;;;;;;;;OAUG;IACH,wEANW,OAAO,YA+JjB;IAED;;;;;;;OAOG;IACH,8CAEC;IAED;;;;;;;OAOG;IACH,uCAGC;IAED;;;;;;;OAOG;IACH,kCAFY,eAAc,CAezB;IAED;;;;;;;OAOG;IACH,gDAEC;IAyGD;;;;MA4GC;IAmJD;;;OAGG;IACH,0CASC;IANG,kCAAsD;IAQ1D;;;OAGG;IACH,8BAEC;IAED;;;OAGG;IACH,6BAEC;IAED;;;;;OAKG;IACH,0CAEC;IAED;;;;OAIG;IACH,0DAEC;IAED;;;OAGG;IACH,gDAEC;IAED;;;;OAIG;IACH,kEAEC;IAED;;;;OAIG;IACH,oEAEC;IAED;;;;OAIG;IACH,+DAEC;IAyBD,wBAEC;IARD;;OAEG;IACH,qBAEC;CAIJ"}
|
|
@@ -169,6 +169,7 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
169
169
|
var index = Math.floor(in_segment);
|
|
170
170
|
// Specifying a non-integer index is regarded a mal-formed path and thus throws an exception
|
|
171
171
|
if (!isFinite(index)) {
|
|
172
|
+
// eslint-disable-next-line unicorn/prefer-type-error
|
|
172
173
|
throw new Error(MSG.INVALID_NON_NUMERIC_SEGMENT_IN_PATH + in_segment);
|
|
173
174
|
}
|
|
174
175
|
// Accessing an entry outside of the array is just a non existing property and thus
|
|
@@ -307,7 +308,7 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
307
308
|
*/
|
|
308
309
|
set(in_position, in_value) {
|
|
309
310
|
if (_.isArray(in_value)) {
|
|
310
|
-
throw new
|
|
311
|
+
throw new TypeError(MSG.ARRAY_SET_ONE_ELEMENT + in_value);
|
|
311
312
|
}
|
|
312
313
|
this.setRange(in_position, [in_value]);
|
|
313
314
|
}
|
|
@@ -544,7 +545,7 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
544
545
|
*/
|
|
545
546
|
insertRange(in_offset, in_array) {
|
|
546
547
|
if (!_.isArray(in_array)) {
|
|
547
|
-
throw new
|
|
548
|
+
throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + 'ArrayProperty.insertRange');
|
|
548
549
|
}
|
|
549
550
|
if (validationsEnabled.enabled) {
|
|
550
551
|
for (var i = 0; i < in_array.length; i++) {
|
|
@@ -670,10 +671,11 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
670
671
|
*/
|
|
671
672
|
setRange(in_offset, in_array) {
|
|
672
673
|
if (!_.isArray(in_array) && !_.isString(in_array)) {
|
|
673
|
-
throw new
|
|
674
|
+
throw new TypeError(MSG.IN_ARRAY_NOT_ARRAY + 'ArrayProperty.setRange');
|
|
674
675
|
}
|
|
675
676
|
in_offset = Math.floor(in_offset);
|
|
676
677
|
if (!isFinite(in_offset)) {
|
|
678
|
+
// eslint-disable-next-line unicorn/prefer-type-error
|
|
677
679
|
throw new Error(MSG.NOT_NUMBER + 'in_offset, method: ArrayProperty.setRange or .set');
|
|
678
680
|
}
|
|
679
681
|
ConsoleUtils.assert(in_offset >= -1 && (in_offset + in_array.length) <= this.getLength(), MSG.SET_OUT_OF_BOUNDS + 'Cannot set ' + in_array.length + ' items starting at index ' + in_offset +
|
|
@@ -1000,7 +1002,7 @@ class ArrayProperty extends AbstractStaticCollectionProperty {
|
|
|
1000
1002
|
*/
|
|
1001
1003
|
_deserializeNamedPropertyArray(in_serializedObj, in_reportToView) {
|
|
1002
1004
|
if (!_.isArray(in_serializedObj.insert[0][1])) {
|
|
1003
|
-
throw new
|
|
1005
|
+
throw new TypeError(MSG.INVALID_CHANGESET);
|
|
1004
1006
|
}
|
|
1005
1007
|
// When the array contains named properties, we can use an efficient diffing algorithm, which
|
|
1006
1008
|
// takes advantage of the ability to identify entries in an unique way
|