@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.
|
@@ -16153,6 +16153,9 @@ var GeoServiceStatus;
|
|
|
16153
16153
|
GeoServiceStatus[GeoServiceStatus["NoDatumConverter"] = 147459] = "NoDatumConverter";
|
|
16154
16154
|
GeoServiceStatus[GeoServiceStatus["VerticalDatumConvertError"] = 147460] = "VerticalDatumConvertError";
|
|
16155
16155
|
GeoServiceStatus[GeoServiceStatus["CSMapError"] = 147461] = "CSMapError";
|
|
16156
|
+
/**
|
|
16157
|
+
* @deprecated in 5.0. This status is never returned.
|
|
16158
|
+
*/
|
|
16156
16159
|
GeoServiceStatus[GeoServiceStatus["Pending"] = 147462] = "Pending";
|
|
16157
16160
|
})(GeoServiceStatus || (GeoServiceStatus = {}));
|
|
16158
16161
|
/** Error status from various reality data operations
|
|
@@ -16464,7 +16467,7 @@ class BentleyError extends Error {
|
|
|
16464
16467
|
case GeoServiceStatus.NoDatumConverter: return "No datum converter";
|
|
16465
16468
|
case GeoServiceStatus.VerticalDatumConvertError: return "Vertical datum convert error";
|
|
16466
16469
|
case GeoServiceStatus.CSMapError: return "CSMap error";
|
|
16467
|
-
case GeoServiceStatus.Pending: return "Pending";
|
|
16470
|
+
case GeoServiceStatus.Pending: return "Pending"; // eslint-disable-line @typescript-eslint/no-deprecated
|
|
16468
16471
|
case RealityDataStatus.InvalidData: return "Invalid or unknown data";
|
|
16469
16472
|
case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_OK:
|
|
16470
16473
|
case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_ROW:
|
|
@@ -16786,6 +16789,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16786
16789
|
/* harmony export */ compareNumbers: () => (/* binding */ compareNumbers),
|
|
16787
16790
|
/* harmony export */ compareNumbersOrUndefined: () => (/* binding */ compareNumbersOrUndefined),
|
|
16788
16791
|
/* harmony export */ comparePossiblyUndefined: () => (/* binding */ comparePossiblyUndefined),
|
|
16792
|
+
/* harmony export */ compareSimpleArrays: () => (/* binding */ compareSimpleArrays),
|
|
16793
|
+
/* harmony export */ compareSimpleTypes: () => (/* binding */ compareSimpleTypes),
|
|
16789
16794
|
/* harmony export */ compareStrings: () => (/* binding */ compareStrings),
|
|
16790
16795
|
/* harmony export */ compareStringsOrUndefined: () => (/* binding */ compareStringsOrUndefined),
|
|
16791
16796
|
/* harmony export */ compareWithTolerance: () => (/* binding */ compareWithTolerance)
|
|
@@ -16853,6 +16858,52 @@ function areEqualPossiblyUndefined(t, u, areEqual) {
|
|
|
16853
16858
|
else
|
|
16854
16859
|
return areEqual(t, u);
|
|
16855
16860
|
}
|
|
16861
|
+
/**
|
|
16862
|
+
* Compare two simples types (number, string, boolean)
|
|
16863
|
+
* This essentially wraps the existing type-specific comparison functions
|
|
16864
|
+
* @beta */
|
|
16865
|
+
function compareSimpleTypes(lhs, rhs) {
|
|
16866
|
+
let cmp = 0;
|
|
16867
|
+
// Make sure the types are the same
|
|
16868
|
+
cmp = compareStrings(typeof lhs, typeof rhs);
|
|
16869
|
+
if (cmp !== 0) {
|
|
16870
|
+
return cmp;
|
|
16871
|
+
}
|
|
16872
|
+
// Compare actual values
|
|
16873
|
+
switch (typeof lhs) {
|
|
16874
|
+
case "number":
|
|
16875
|
+
return compareNumbers(lhs, rhs);
|
|
16876
|
+
case "string":
|
|
16877
|
+
return compareStrings(lhs, rhs);
|
|
16878
|
+
case "boolean":
|
|
16879
|
+
return compareBooleans(lhs, rhs);
|
|
16880
|
+
}
|
|
16881
|
+
return cmp;
|
|
16882
|
+
}
|
|
16883
|
+
/**
|
|
16884
|
+
* Compare two arrays of simple types (number, string, boolean)
|
|
16885
|
+
* @beta
|
|
16886
|
+
*/
|
|
16887
|
+
function compareSimpleArrays(lhs, rhs) {
|
|
16888
|
+
if (undefined === lhs)
|
|
16889
|
+
return undefined === rhs ? 0 : -1;
|
|
16890
|
+
else if (undefined === rhs)
|
|
16891
|
+
return 1;
|
|
16892
|
+
else if (lhs.length === 0 && rhs.length === 0) {
|
|
16893
|
+
return 0;
|
|
16894
|
+
}
|
|
16895
|
+
else if (lhs.length !== rhs.length) {
|
|
16896
|
+
return lhs.length - rhs.length;
|
|
16897
|
+
}
|
|
16898
|
+
let cmp = 0;
|
|
16899
|
+
for (let i = 0; i < lhs.length; i++) {
|
|
16900
|
+
cmp = compareSimpleTypes(lhs[i], rhs[i]);
|
|
16901
|
+
if (cmp !== 0) {
|
|
16902
|
+
break;
|
|
16903
|
+
}
|
|
16904
|
+
}
|
|
16905
|
+
return cmp;
|
|
16906
|
+
}
|
|
16856
16907
|
|
|
16857
16908
|
|
|
16858
16909
|
/***/ }),
|
|
@@ -20840,7 +20891,7 @@ function lookupHttpStatusCategory(statusCode) {
|
|
|
20840
20891
|
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.NoDatumConverter: return new OperationFailed();
|
|
20841
20892
|
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.VerticalDatumConvertError: return new OperationFailed();
|
|
20842
20893
|
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.CSMapError: return new InternalError();
|
|
20843
|
-
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.Pending: return new Pending();
|
|
20894
|
+
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.Pending: return new Pending(); // eslint-disable-line @typescript-eslint/no-deprecated
|
|
20844
20895
|
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RealityDataStatus.Success: return new Success();
|
|
20845
20896
|
case _BentleyError__WEBPACK_IMPORTED_MODULE_0__.RealityDataStatus.InvalidData: return new InvalidData();
|
|
20846
20897
|
default: return new UnknownError();
|
|
@@ -21849,6 +21900,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21849
21900
|
/* harmony export */ compareNumbers: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareNumbers),
|
|
21850
21901
|
/* harmony export */ compareNumbersOrUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareNumbersOrUndefined),
|
|
21851
21902
|
/* harmony export */ comparePossiblyUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.comparePossiblyUndefined),
|
|
21903
|
+
/* harmony export */ compareSimpleArrays: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareSimpleArrays),
|
|
21904
|
+
/* harmony export */ compareSimpleTypes: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareSimpleTypes),
|
|
21852
21905
|
/* harmony export */ compareStrings: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareStrings),
|
|
21853
21906
|
/* harmony export */ compareStringsOrUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareStringsOrUndefined),
|
|
21854
21907
|
/* harmony export */ compareWithTolerance: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareWithTolerance),
|