@itwin/core-i18n 3.6.0-dev.3 → 3.6.0-dev.32

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/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  # Change Log - @itwin/core-i18n
2
2
 
3
- This log was last generated on Wed, 30 Nov 2022 14:28:19 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 15 Dec 2022 16:38:28 GMT and should not be manually modified.
4
+
5
+ ## 3.5.1
6
+ Thu, 15 Dec 2022 16:38:28 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 3.5.0
11
+ Wed, 07 Dec 2022 19:12:37 GMT
12
+
13
+ ### Updates
14
+
15
+ - add i18n tests
4
16
 
5
17
  ## 3.4.7
6
18
  Wed, 30 Nov 2022 14:28:19 GMT
@@ -12163,7 +12163,7 @@ exports.transferFlags = __webpack_require__(/*! ./transferFlags */ "../../common
12163
12163
  * Deep equal utility
12164
12164
  */
12165
12165
 
12166
- exports.eql = __webpack_require__(/*! deep-eql */ "../../common/temp/node_modules/.pnpm/deep-eql@4.1.2/node_modules/deep-eql/index.js");
12166
+ exports.eql = __webpack_require__(/*! deep-eql */ "../../common/temp/node_modules/.pnpm/deep-eql@4.1.3/node_modules/deep-eql/index.js");
12167
12167
 
12168
12168
  /*!
12169
12169
  * Deep path info
@@ -13728,9 +13728,9 @@ module.exports = exports
13728
13728
 
13729
13729
  /***/ }),
13730
13730
 
13731
- /***/ "../../common/temp/node_modules/.pnpm/deep-eql@4.1.2/node_modules/deep-eql/index.js":
13731
+ /***/ "../../common/temp/node_modules/.pnpm/deep-eql@4.1.3/node_modules/deep-eql/index.js":
13732
13732
  /*!******************************************************************************************!*\
13733
- !*** ../../common/temp/node_modules/.pnpm/deep-eql@4.1.2/node_modules/deep-eql/index.js ***!
13733
+ !*** ../../common/temp/node_modules/.pnpm/deep-eql@4.1.3/node_modules/deep-eql/index.js ***!
13734
13734
  \******************************************************************************************/
13735
13735
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
13736
13736
 
@@ -14129,8 +14129,15 @@ function getEnumerableKeys(target) {
14129
14129
  return keys;
14130
14130
  }
14131
14131
 
14132
- function getNonEnumerableSymbols(target) {
14133
- var keys = Object.getOwnPropertySymbols(target);
14132
+ function getEnumerableSymbols(target) {
14133
+ var keys = [];
14134
+ var allKeys = Object.getOwnPropertySymbols(target);
14135
+ for (var i = 0; i < allKeys.length; i += 1) {
14136
+ var key = allKeys[i];
14137
+ if (Object.getOwnPropertyDescriptor(target, key).enumerable) {
14138
+ keys.push(key);
14139
+ }
14140
+ }
14134
14141
  return keys;
14135
14142
  }
14136
14143
 
@@ -14169,8 +14176,8 @@ function keysEqual(leftHandOperand, rightHandOperand, keys, options) {
14169
14176
  function objectEqual(leftHandOperand, rightHandOperand, options) {
14170
14177
  var leftHandKeys = getEnumerableKeys(leftHandOperand);
14171
14178
  var rightHandKeys = getEnumerableKeys(rightHandOperand);
14172
- var leftHandSymbols = getNonEnumerableSymbols(leftHandOperand);
14173
- var rightHandSymbols = getNonEnumerableSymbols(rightHandOperand);
14179
+ var leftHandSymbols = getEnumerableSymbols(leftHandOperand);
14180
+ var rightHandSymbols = getEnumerableSymbols(rightHandOperand);
14174
14181
  leftHandKeys = leftHandKeys.concat(leftHandSymbols);
14175
14182
  rightHandKeys = rightHandKeys.concat(rightHandSymbols);
14176
14183
 
@@ -19796,8 +19803,8 @@ var IModelStatus;
19796
19803
  IModelStatus[IModelStatus["FunctionNotFound"] = 65606] = "FunctionNotFound";
19797
19804
  IModelStatus[IModelStatus["NoActiveCommand"] = 65607] = "NoActiveCommand";
19798
19805
  })(IModelStatus || (IModelStatus = {}));
19799
- /** Error status from various briefcase operations
19800
- * @beta Should these be internal?
19806
+ /** Error statuses produced by various briefcase operations, typically encountered as the `errorNumber` of an [IModelError]($common).
19807
+ * @public
19801
19808
  */
19802
19809
  var BriefcaseStatus;
19803
19810
  (function (BriefcaseStatus) {
@@ -19813,7 +19820,7 @@ var BriefcaseStatus;
19813
19820
  BriefcaseStatus[BriefcaseStatus["ContainsDeletedChangeSets"] = 131080] = "ContainsDeletedChangeSets";
19814
19821
  })(BriefcaseStatus || (BriefcaseStatus = {}));
19815
19822
  /** RpcInterface status codes
19816
- * @beta Should these be internal?
19823
+ * @beta
19817
19824
  */
19818
19825
  var RpcInterfaceStatus;
19819
19826
  (function (RpcInterfaceStatus) {
@@ -19822,8 +19829,8 @@ var RpcInterfaceStatus;
19822
19829
  /** The RpcInterface implemented by the server is incompatible with the interface requested by the client. */
19823
19830
  RpcInterfaceStatus[RpcInterfaceStatus["IncompatibleVersion"] = 135168] = "IncompatibleVersion";
19824
19831
  })(RpcInterfaceStatus || (RpcInterfaceStatus = {}));
19825
- /** Error status from various Changeset operations
19826
- * @beta Should these be internal?
19832
+ /** Error statuses produced by various Changeset operations, typically encountered as the `errorNumber` of an [IModelError]($common).
19833
+ * @public
19827
19834
  */
19828
19835
  var ChangeSetStatus;
19829
19836
  (function (ChangeSetStatus) {
@@ -19883,7 +19890,7 @@ var ChangeSetStatus;
19883
19890
  ChangeSetStatus[ChangeSetStatus["DownloadCancelled"] = 90138] = "DownloadCancelled";
19884
19891
  })(ChangeSetStatus || (ChangeSetStatus = {}));
19885
19892
  /** Return codes for methods which perform repository management operations
19886
- * @beta Should these be internal?
19893
+ * @internal
19887
19894
  */
19888
19895
  var RepositoryStatus;
19889
19896
  (function (RepositoryStatus) {
@@ -19920,7 +19927,7 @@ var RepositoryStatus;
19920
19927
  RepositoryStatus[RepositoryStatus["ChannelConstraintViolation"] = 86031] = "ChannelConstraintViolation";
19921
19928
  })(RepositoryStatus || (RepositoryStatus = {}));
19922
19929
  /** Status from returned HTTP status code
19923
- * @beta Should these be internal?
19930
+ * @beta
19924
19931
  */
19925
19932
  var HttpStatus;
19926
19933
  (function (HttpStatus) {
@@ -19935,8 +19942,8 @@ var HttpStatus;
19935
19942
  /** 5xx Server errors */
19936
19943
  HttpStatus[HttpStatus["ServerError"] = 94212] = "ServerError";
19937
19944
  })(HttpStatus || (HttpStatus = {}));
19938
- /** iModelHub Services Errors
19939
- * @beta Right package?
19945
+ /** Statuses produced by APIs that interact with iModelHub, typically encountered as the `errorNumber` of an [IModelError]($common).
19946
+ * @public
19940
19947
  */
19941
19948
  var IModelHubStatus;
19942
19949
  (function (IModelHubStatus) {
@@ -20456,7 +20463,7 @@ __webpack_require__.r(__webpack_exports__);
20456
20463
  /** Allows the contents of an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)
20457
20464
  * to be consumed sequentially using methods to extract
20458
20465
  * data of a particular type from the bytes beginning at the current read position.
20459
- * Methods and properties beginning with 'next' consume data at the current read position and advance it
20466
+ * Methods and properties beginning with 'read' and taking no arguments consume data at the current read position and advance it
20460
20467
  * by the size of the data read. The read position can also be directly adjusted by the caller.
20461
20468
  * @public
20462
20469
  */
@@ -20541,21 +20548,37 @@ class ByteStream {
20541
20548
  /** Resets the current read position to the beginning of the stream */
20542
20549
  reset() { this.curPos = 0; }
20543
20550
  /** Read a unsigned 8-bit integer from the current read position and advance by 1 byte. */
20544
- get nextUint8() { return this.read(1, (view) => view.getUint8(this.curPos)); }
20551
+ readUint8() { return this.read(1, (view) => view.getUint8(this.curPos)); }
20545
20552
  /** Read an unsigned 16-bit integer from the current read position and advance by 2 bytes. */
20546
- get nextUint16() { return this.read(2, (view) => view.getUint16(this.curPos, true)); }
20553
+ readUint16() { return this.read(2, (view) => view.getUint16(this.curPos, true)); }
20547
20554
  /** Read an unsigned 32-bit integer from the current read position and advance by 4 bytes. */
20548
- get nextUint32() { return this.read(4, (view) => view.getUint32(this.curPos, true)); }
20555
+ readUint32() { return this.read(4, (view) => view.getUint32(this.curPos, true)); }
20549
20556
  /** Read a signed 32-bit integer from the current read position and advance by 4 bytes. */
20550
- get nextInt32() { return this.read(4, (view) => view.getInt32(this.curPos, true)); }
20557
+ readInt32() { return this.read(4, (view) => view.getInt32(this.curPos, true)); }
20551
20558
  /** Read a 32-bit floating point number from the current read position and advance by 4 bytes. */
20552
- get nextFloat32() { return this.read(4, (view) => view.getFloat32(this.curPos, true)); }
20559
+ readFloat32() { return this.read(4, (view) => view.getFloat32(this.curPos, true)); }
20553
20560
  /** Read a 64-bit floating point number from the current read position and advance by 8 bytes. */
20554
- get nextFloat64() { return this.read(8, (view) => view.getFloat64(this.curPos, true)); }
20561
+ readFloat64() { return this.read(8, (view) => view.getFloat64(this.curPos, true)); }
20555
20562
  /** Read an unsigned 64-bit integer from the current read position, advance by 8 bytes, and return the 64-bit value as an Id64String. */
20556
- get nextId64() { return _Id__WEBPACK_IMPORTED_MODULE_1__.Id64.fromUint32Pair(this.nextUint32, this.nextUint32); }
20563
+ readId64() { return _Id__WEBPACK_IMPORTED_MODULE_1__.Id64.fromUint32Pair(this.readUint32(), this.readUint32()); }
20557
20564
  /** Read an unsigned 24-bit integer from the current read position and advance by 3 bytes. */
20558
- get nextUint24() { return this.nextUint8 | (this.nextUint8 << 8) | (this.nextUint8 << 16); }
20565
+ readUint24() { return this.readUint8() | (this.readUint8() << 8) | (this.readUint8() << 16); }
20566
+ /** @deprecated use [[readUint8]]. */
20567
+ get nextUint8() { return this.readUint8(); }
20568
+ /** @deprecated use [[readUint16]]. */
20569
+ get nextUint16() { return this.readUint16(); }
20570
+ /** @deprecated use [[readUint32]]. */
20571
+ get nextUint32() { return this.readUint32(); }
20572
+ /** @deprecated use [[readInt32]]. */
20573
+ get nextInt32() { return this.readInt32(); }
20574
+ /** @deprecated use [[readFloat32]]. */
20575
+ get nextFloat32() { return this.readFloat32(); }
20576
+ /** @deprecated use [[readFloat64]]. */
20577
+ get nextFloat64() { return this.readFloat64(); }
20578
+ /** @deprecated use [[readId64]]. */
20579
+ get nextId64() { return this.readId64(); }
20580
+ /** @deprecated use [[readUint32]]. */
20581
+ get nextUint24() { return this.readUint24(); }
20559
20582
  /** Read the specified number of bytes beginning at the current read position into a Uint8Array and advance by the specified number of byte.
20560
20583
  * @param numBytes The number of bytes to read.
20561
20584
  */
@@ -22078,8 +22101,16 @@ class TransientIdSequence {
22078
22101
  constructor() {
22079
22102
  this._localId = 0;
22080
22103
  }
22104
+ /** Generate and return the next transient Id64String in the sequence.
22105
+ * @deprecated Use [[getNext]].
22106
+ */
22107
+ get next() {
22108
+ return this.getNext();
22109
+ }
22081
22110
  /** Generate and return the next transient Id64String in the sequence. */
22082
- get next() { return Id64.fromLocalAndBriefcaseIds(++this._localId, 0xffffff); }
22111
+ getNext() {
22112
+ return Id64.fromLocalAndBriefcaseIds(++this._localId, 0xffffff);
22113
+ }
22083
22114
  }
22084
22115
  /**
22085
22116
  * The Guid namespace provides facilities for working with GUID strings using the "8-4-4-4-12" pattern.
@@ -25150,7 +25181,8 @@ __webpack_require__.r(__webpack_exports__);
25150
25181
  /* harmony export */ "TypedArrayBuilder": () => (/* binding */ TypedArrayBuilder),
25151
25182
  /* harmony export */ "Uint16ArrayBuilder": () => (/* binding */ Uint16ArrayBuilder),
25152
25183
  /* harmony export */ "Uint32ArrayBuilder": () => (/* binding */ Uint32ArrayBuilder),
25153
- /* harmony export */ "Uint8ArrayBuilder": () => (/* binding */ Uint8ArrayBuilder)
25184
+ /* harmony export */ "Uint8ArrayBuilder": () => (/* binding */ Uint8ArrayBuilder),
25185
+ /* harmony export */ "UintArrayBuilder": () => (/* binding */ UintArrayBuilder)
25154
25186
  /* harmony export */ });
25155
25187
  /* harmony import */ var _Assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Assert */ "../bentley/lib/esm/Assert.js");
25156
25188
  /*---------------------------------------------------------------------------------------------
@@ -25161,7 +25193,7 @@ __webpack_require__.r(__webpack_exports__);
25161
25193
  * @module Collections
25162
25194
  */
25163
25195
 
25164
- /** Incrementally builds a [TypedArray] of unsigned 8-, 16-, or 32-bit integers.
25196
+ /** Incrementally builds a [TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) of unsigned 8-, 16-, or 32-bit integers.
25165
25197
  * Sometimes you wish to populate a `TypedArray`, but you don't know how many elements you will need.
25166
25198
  * `TypedArray` requires you to specify the size upon construction, and does not permit you to change the size later.
25167
25199
  *
@@ -25172,6 +25204,7 @@ __webpack_require__.r(__webpack_exports__);
25172
25204
  *
25173
25205
  * Once you've finished adding elements, you can obtain the finished `TypedArray` via [[toTypedArray]].
25174
25206
  * @see [[Uint8ArrayBuilder]], [[Uint16ArrayBuilder]], and [[Uint32ArrayBuilder]] to build specific types of arrays.
25207
+ * @see [[UintArrayBuilder]] when you don't know the maximum number of bytes required for each element in the array.
25175
25208
  * @public
25176
25209
  */
25177
25210
  class TypedArrayBuilder {
@@ -25251,7 +25284,7 @@ class TypedArrayBuilder {
25251
25284
  * @public
25252
25285
  */
25253
25286
  class Uint8ArrayBuilder extends TypedArrayBuilder {
25254
- /** @see [[TypedArrayBuilder]] constructor. */
25287
+ /** See [[TypedArrayBuilder]] constructor. */
25255
25288
  constructor(options) {
25256
25289
  super(Uint8Array, options);
25257
25290
  }
@@ -25260,7 +25293,7 @@ class Uint8ArrayBuilder extends TypedArrayBuilder {
25260
25293
  * @public
25261
25294
  */
25262
25295
  class Uint16ArrayBuilder extends TypedArrayBuilder {
25263
- /** @see [[TypedArrayBuilder]] constructor. */
25296
+ /** See [[TypedArrayBuilder]] constructor. */
25264
25297
  constructor(options) {
25265
25298
  super(Uint16Array, options);
25266
25299
  }
@@ -25269,7 +25302,7 @@ class Uint16ArrayBuilder extends TypedArrayBuilder {
25269
25302
  * @public
25270
25303
  */
25271
25304
  class Uint32ArrayBuilder extends TypedArrayBuilder {
25272
- /** @see [[TypedArrayBuilder]] constructor. */
25305
+ /** See [[TypedArrayBuilder]] constructor. */
25273
25306
  constructor(options) {
25274
25307
  super(Uint32Array, options);
25275
25308
  }
@@ -25280,6 +25313,78 @@ class Uint32ArrayBuilder extends TypedArrayBuilder {
25280
25313
  return new Uint8Array(this._data.buffer, 0, this.length * 4);
25281
25314
  }
25282
25315
  }
25316
+ /** A [[TypedArrayBuilder]] that can populate a [[UintArray]] with the minimum
25317
+ * [bytes per element](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT) required.
25318
+ *
25319
+ * By default, the underlying array is a `Uint8Array`, though this can be configured via [[UintArrayBuilderOptions.initialType]].
25320
+ * As values are added to the array, if the bytes per element supported by the underlying array is too small to hold one of the new values, the array is
25321
+ * reallocated to a type large enough to hold all of the new values. For example, the following produces a `Uint8Array` because all values are less than 256:
25322
+ *
25323
+ * ```ts
25324
+ * const builder = new UintArrayBuilder();
25325
+ * builder.append([1, 2, 254, 255]);
25326
+ * const array = builder.toTypedArray();
25327
+ * assert(array instanceof Uint8Array);
25328
+ * ```
25329
+ *
25330
+ * However, the following produces a `Uint16Array` because one of the values is larger than 255 but none are larger than 65,535:
25331
+ *
25332
+ * ```ts
25333
+ * const builder = new UintArrayBuilder();
25334
+ * builder.append([1, 255, 257, 65535]);
25335
+ * const array = builder.toTypedArray();
25336
+ * assert(array instanceof Uint16Array);
25337
+ * ```
25338
+ *
25339
+ * @see [[Uint8ArrayBuilder]], [[Uint16ArrayBuilder]], or [[Uint32ArrayBuilder]] if you know the number of bytes you want to allocate for each element in the array.
25340
+ * @public
25341
+ */
25342
+ class UintArrayBuilder extends TypedArrayBuilder {
25343
+ constructor(options) {
25344
+ var _a;
25345
+ super((_a = options === null || options === void 0 ? void 0 : options.initialType) !== null && _a !== void 0 ? _a : Uint8Array, options);
25346
+ }
25347
+ /** The number of bytes (1, 2, or 4) currently allocated per element by the underlying array.
25348
+ * This may change as larger values are added to the array.
25349
+ */
25350
+ get bytesPerElement() {
25351
+ return this._data.BYTES_PER_ELEMENT;
25352
+ }
25353
+ /** Ensures that the underlying array is of a type that can contain the largest value in `newValues`.
25354
+ * For example, if `_data` is a `Uint16Array` and `newValues` contains any value(s) larger than 65,535, it will be replaced with a `Uint32Array`.
25355
+ * This method is invoked by [[push]] and [[append]].
25356
+ */
25357
+ ensureBytesPerElement(newValues) {
25358
+ const curBytesPerElem = this.bytesPerElement;
25359
+ (0,_Assert__WEBPACK_IMPORTED_MODULE_0__.assert)(curBytesPerElem === 1 || curBytesPerElem === 2 || curBytesPerElem === 4);
25360
+ if (curBytesPerElem >= 4)
25361
+ return;
25362
+ let neededBytesPerElem = curBytesPerElem;
25363
+ for (const value of newValues) {
25364
+ if (value > 0xffff) {
25365
+ neededBytesPerElem = 4;
25366
+ break;
25367
+ }
25368
+ else if (value > 0xff) {
25369
+ neededBytesPerElem = 2;
25370
+ }
25371
+ }
25372
+ if (neededBytesPerElem <= curBytesPerElem)
25373
+ return;
25374
+ this._constructor = neededBytesPerElem === 1 ? Uint8Array : (neededBytesPerElem === 2 ? Uint16Array : Uint32Array);
25375
+ this._data = new this._constructor(this._data);
25376
+ }
25377
+ /** See [[TypedArrayBuilder.push]]. */
25378
+ push(value) {
25379
+ this.ensureBytesPerElement([value]);
25380
+ super.push(value);
25381
+ }
25382
+ /** See [[TypedArrayBuilder.append]]. */
25383
+ append(values) {
25384
+ this.ensureBytesPerElement(values);
25385
+ super.append(values);
25386
+ }
25387
+ }
25283
25388
 
25284
25389
 
25285
25390
  /***/ }),
@@ -25531,6 +25636,7 @@ __webpack_require__.r(__webpack_exports__);
25531
25636
  /* harmony export */ "Uint16ArrayBuilder": () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint16ArrayBuilder),
25532
25637
  /* harmony export */ "Uint32ArrayBuilder": () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint32ArrayBuilder),
25533
25638
  /* harmony export */ "Uint8ArrayBuilder": () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint8ArrayBuilder),
25639
+ /* harmony export */ "UintArrayBuilder": () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.UintArrayBuilder),
25534
25640
  /* harmony export */ "UnexpectedErrors": () => (/* reexport safe */ _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_33__.UnexpectedErrors),
25535
25641
  /* harmony export */ "YieldManager": () => (/* reexport safe */ _YieldManager__WEBPACK_IMPORTED_MODULE_35__.YieldManager),
25536
25642
  /* harmony export */ "areEqualPossiblyUndefined": () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_10__.areEqualPossiblyUndefined),