@itwin/core-i18n 5.0.0-dev.67 → 5.0.0-dev.69
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.
|
@@ -18631,6 +18631,9 @@ var GeoServiceStatus;
|
|
|
18631
18631
|
GeoServiceStatus[GeoServiceStatus["NoDatumConverter"] = 147459] = "NoDatumConverter";
|
|
18632
18632
|
GeoServiceStatus[GeoServiceStatus["VerticalDatumConvertError"] = 147460] = "VerticalDatumConvertError";
|
|
18633
18633
|
GeoServiceStatus[GeoServiceStatus["CSMapError"] = 147461] = "CSMapError";
|
|
18634
|
+
/**
|
|
18635
|
+
* @deprecated in 5.0. This status is never returned.
|
|
18636
|
+
*/
|
|
18634
18637
|
GeoServiceStatus[GeoServiceStatus["Pending"] = 147462] = "Pending";
|
|
18635
18638
|
})(GeoServiceStatus || (GeoServiceStatus = {}));
|
|
18636
18639
|
/** Error status from various reality data operations
|
|
@@ -18942,7 +18945,7 @@ class BentleyError extends Error {
|
|
|
18942
18945
|
case GeoServiceStatus.NoDatumConverter: return "No datum converter";
|
|
18943
18946
|
case GeoServiceStatus.VerticalDatumConvertError: return "Vertical datum convert error";
|
|
18944
18947
|
case GeoServiceStatus.CSMapError: return "CSMap error";
|
|
18945
|
-
case GeoServiceStatus.Pending: return "Pending";
|
|
18948
|
+
case GeoServiceStatus.Pending: return "Pending"; // eslint-disable-line @typescript-eslint/no-deprecated
|
|
18946
18949
|
case RealityDataStatus.InvalidData: return "Invalid or unknown data";
|
|
18947
18950
|
case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_OK:
|
|
18948
18951
|
case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_ROW:
|
|
@@ -19264,6 +19267,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19264
19267
|
/* harmony export */ compareNumbers: () => (/* binding */ compareNumbers),
|
|
19265
19268
|
/* harmony export */ compareNumbersOrUndefined: () => (/* binding */ compareNumbersOrUndefined),
|
|
19266
19269
|
/* harmony export */ comparePossiblyUndefined: () => (/* binding */ comparePossiblyUndefined),
|
|
19270
|
+
/* harmony export */ compareSimpleArrays: () => (/* binding */ compareSimpleArrays),
|
|
19271
|
+
/* harmony export */ compareSimpleTypes: () => (/* binding */ compareSimpleTypes),
|
|
19267
19272
|
/* harmony export */ compareStrings: () => (/* binding */ compareStrings),
|
|
19268
19273
|
/* harmony export */ compareStringsOrUndefined: () => (/* binding */ compareStringsOrUndefined),
|
|
19269
19274
|
/* harmony export */ compareWithTolerance: () => (/* binding */ compareWithTolerance)
|
|
@@ -19331,6 +19336,52 @@ function areEqualPossiblyUndefined(t, u, areEqual) {
|
|
|
19331
19336
|
else
|
|
19332
19337
|
return areEqual(t, u);
|
|
19333
19338
|
}
|
|
19339
|
+
/**
|
|
19340
|
+
* Compare two simples types (number, string, boolean)
|
|
19341
|
+
* This essentially wraps the existing type-specific comparison functions
|
|
19342
|
+
* @beta */
|
|
19343
|
+
function compareSimpleTypes(lhs, rhs) {
|
|
19344
|
+
let cmp = 0;
|
|
19345
|
+
// Make sure the types are the same
|
|
19346
|
+
cmp = compareStrings(typeof lhs, typeof rhs);
|
|
19347
|
+
if (cmp !== 0) {
|
|
19348
|
+
return cmp;
|
|
19349
|
+
}
|
|
19350
|
+
// Compare actual values
|
|
19351
|
+
switch (typeof lhs) {
|
|
19352
|
+
case "number":
|
|
19353
|
+
return compareNumbers(lhs, rhs);
|
|
19354
|
+
case "string":
|
|
19355
|
+
return compareStrings(lhs, rhs);
|
|
19356
|
+
case "boolean":
|
|
19357
|
+
return compareBooleans(lhs, rhs);
|
|
19358
|
+
}
|
|
19359
|
+
return cmp;
|
|
19360
|
+
}
|
|
19361
|
+
/**
|
|
19362
|
+
* Compare two arrays of simple types (number, string, boolean)
|
|
19363
|
+
* @beta
|
|
19364
|
+
*/
|
|
19365
|
+
function compareSimpleArrays(lhs, rhs) {
|
|
19366
|
+
if (undefined === lhs)
|
|
19367
|
+
return undefined === rhs ? 0 : -1;
|
|
19368
|
+
else if (undefined === rhs)
|
|
19369
|
+
return 1;
|
|
19370
|
+
else if (lhs.length === 0 && rhs.length === 0) {
|
|
19371
|
+
return 0;
|
|
19372
|
+
}
|
|
19373
|
+
else if (lhs.length !== rhs.length) {
|
|
19374
|
+
return lhs.length - rhs.length;
|
|
19375
|
+
}
|
|
19376
|
+
let cmp = 0;
|
|
19377
|
+
for (let i = 0; i < lhs.length; i++) {
|
|
19378
|
+
cmp = compareSimpleTypes(lhs[i], rhs[i]);
|
|
19379
|
+
if (cmp !== 0) {
|
|
19380
|
+
break;
|
|
19381
|
+
}
|
|
19382
|
+
}
|
|
19383
|
+
return cmp;
|
|
19384
|
+
}
|
|
19334
19385
|
|
|
19335
19386
|
|
|
19336
19387
|
/***/ }),
|
|
@@ -23318,7 +23369,7 @@ function lookupHttpStatusCategory(statusCode) {
|
|
|
23318
23369
|
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.NoDatumConverter: return new OperationFailed();
|
|
23319
23370
|
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.VerticalDatumConvertError: return new OperationFailed();
|
|
23320
23371
|
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.CSMapError: return new InternalError();
|
|
23321
|
-
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.Pending: return new Pending();
|
|
23372
|
+
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.Pending: return new Pending(); // eslint-disable-line @typescript-eslint/no-deprecated
|
|
23322
23373
|
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RealityDataStatus.Success: return new Success();
|
|
23323
23374
|
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RealityDataStatus.InvalidData: return new InvalidData();
|
|
23324
23375
|
default: return new UnknownError();
|
|
@@ -24327,6 +24378,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24327
24378
|
/* harmony export */ compareNumbers: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareNumbers),
|
|
24328
24379
|
/* harmony export */ compareNumbersOrUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareNumbersOrUndefined),
|
|
24329
24380
|
/* harmony export */ comparePossiblyUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.comparePossiblyUndefined),
|
|
24381
|
+
/* harmony export */ compareSimpleArrays: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareSimpleArrays),
|
|
24382
|
+
/* harmony export */ compareSimpleTypes: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareSimpleTypes),
|
|
24330
24383
|
/* harmony export */ compareStrings: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareStrings),
|
|
24331
24384
|
/* harmony export */ compareStringsOrUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareStringsOrUndefined),
|
|
24332
24385
|
/* harmony export */ compareWithTolerance: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareWithTolerance),
|