@itwin/rpcinterface-full-stack-tests 4.10.0-dev.37 → 4.10.0-dev.38

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.
@@ -67696,11 +67696,12 @@ __webpack_require__.r(__webpack_exports__);
67696
67696
  /* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Context */ "../../core/ecschema-metadata/lib/esm/Context.js");
67697
67697
  /* harmony import */ var _ECObjects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ECObjects */ "../../core/ecschema-metadata/lib/esm/ECObjects.js");
67698
67698
  /* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Exception */ "../../core/ecschema-metadata/lib/esm/Exception.js");
67699
- /* harmony import */ var _Metadata_SchemaItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Metadata/SchemaItem */ "../../core/ecschema-metadata/lib/esm/Metadata/SchemaItem.js");
67700
- /* harmony import */ var _SchemaKey__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../SchemaKey */ "../../core/ecschema-metadata/lib/esm/SchemaKey.js");
67701
- /* harmony import */ var _SchemaPartVisitorDelegate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../SchemaPartVisitorDelegate */ "../../core/ecschema-metadata/lib/esm/SchemaPartVisitorDelegate.js");
67702
- /* harmony import */ var _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @itwin/core-quantity */ "../../core/quantity/lib/esm/core-quantity.js");
67703
- /* harmony import */ var _utils_SchemaGraph__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/SchemaGraph */ "../../core/ecschema-metadata/lib/esm/utils/SchemaGraph.js");
67699
+ /* harmony import */ var _Metadata_Schema__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Metadata/Schema */ "../../core/ecschema-metadata/lib/esm/Metadata/Schema.js");
67700
+ /* harmony import */ var _Metadata_SchemaItem__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Metadata/SchemaItem */ "../../core/ecschema-metadata/lib/esm/Metadata/SchemaItem.js");
67701
+ /* harmony import */ var _SchemaKey__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../SchemaKey */ "../../core/ecschema-metadata/lib/esm/SchemaKey.js");
67702
+ /* harmony import */ var _SchemaPartVisitorDelegate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../SchemaPartVisitorDelegate */ "../../core/ecschema-metadata/lib/esm/SchemaPartVisitorDelegate.js");
67703
+ /* harmony import */ var _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @itwin/core-quantity */ "../../core/quantity/lib/esm/core-quantity.js");
67704
+ /* harmony import */ var _utils_SchemaGraph__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/SchemaGraph */ "../../core/ecschema-metadata/lib/esm/utils/SchemaGraph.js");
67704
67705
  /*---------------------------------------------------------------------------------------------
67705
67706
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
67706
67707
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -67713,6 +67714,7 @@ __webpack_require__.r(__webpack_exports__);
67713
67714
 
67714
67715
 
67715
67716
 
67717
+
67716
67718
  /**
67717
67719
  * This class properly handles the order the deserialization of ECSchemas and SchemaItems from serialized formats.
67718
67720
  * For example, when deserializing an ECClass most times all base class should be de-serialized before the given class.
@@ -67721,7 +67723,7 @@ __webpack_require__.r(__webpack_exports__);
67721
67723
  class SchemaReadHelper {
67722
67724
  constructor(parserType, context, visitor) {
67723
67725
  this._context = (undefined !== context) ? context : new _Context__WEBPACK_IMPORTED_MODULE_0__.SchemaContext();
67724
- this._visitorHelper = visitor ? new _SchemaPartVisitorDelegate__WEBPACK_IMPORTED_MODULE_5__.SchemaPartVisitorDelegate(visitor) : undefined;
67726
+ this._visitorHelper = visitor ? new _SchemaPartVisitorDelegate__WEBPACK_IMPORTED_MODULE_6__.SchemaPartVisitorDelegate(visitor) : undefined;
67725
67727
  this._parserType = parserType;
67726
67728
  }
67727
67729
  /**
@@ -67746,7 +67748,7 @@ class SchemaReadHelper {
67746
67748
  this._schema = schema;
67747
67749
  const schemaInfo = { schemaKey: schema.schemaKey, references: [] };
67748
67750
  for (const reference of this._parser.getReferences()) {
67749
- const refKey = new _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.SchemaKey(reference.name, _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.ECVersion.fromString(reference.version));
67751
+ const refKey = new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaKey(reference.name, _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.ECVersion.fromString(reference.version));
67750
67752
  schemaInfo.references.push({ schemaKey: refKey });
67751
67753
  }
67752
67754
  this._schemaInfo = schemaInfo;
@@ -67773,7 +67775,7 @@ class SchemaReadHelper {
67773
67775
  /* Finish loading the rest of the schema */
67774
67776
  async loadSchema(schemaInfo, schema) {
67775
67777
  // Verify that there are no schema reference cycles, this will start schema loading by loading their headers
67776
- (await _utils_SchemaGraph__WEBPACK_IMPORTED_MODULE_7__.SchemaGraph.generateGraph(schemaInfo, this._context)).throwIfCycles();
67778
+ (await _utils_SchemaGraph__WEBPACK_IMPORTED_MODULE_8__.SchemaGraph.generateGraph(schemaInfo, this._context)).throwIfCycles();
67777
67779
  for (const reference of schemaInfo.references) {
67778
67780
  await this.loadSchemaReference(schemaInfo, reference.schemaKey);
67779
67781
  }
@@ -67854,12 +67856,12 @@ class SchemaReadHelper {
67854
67856
  * @param ref The object to read the SchemaReference's props from.
67855
67857
  */
67856
67858
  loadSchemaReferenceSync(ref) {
67857
- const schemaKey = new _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.SchemaKey(ref.name, _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.ECVersion.fromString(ref.version));
67859
+ const schemaKey = new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaKey(ref.name, _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.ECVersion.fromString(ref.version));
67858
67860
  const refSchema = this._context.getSchemaSync(schemaKey, _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.LatestWriteCompatible);
67859
67861
  if (!refSchema)
67860
67862
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.UnableToLocateSchema, `Could not locate the referenced schema, ${ref.name}.${ref.version}, of ${this._schema.schemaKey.name}`);
67861
67863
  this._schema.addReferenceSync(refSchema);
67862
- _utils_SchemaGraph__WEBPACK_IMPORTED_MODULE_7__.SchemaGraph.generateGraphSync(this._schema).throwIfCycles();
67864
+ _utils_SchemaGraph__WEBPACK_IMPORTED_MODULE_8__.SchemaGraph.generateGraphSync(this._schema).throwIfCycles();
67863
67865
  const results = this.validateSchemaReferences(this._schema);
67864
67866
  let errorMessage = "";
67865
67867
  for (const result of results) {
@@ -68047,7 +68049,7 @@ class SchemaReadHelper {
68047
68049
  * @param schema The schema that will be used to lookup the schema name by alias, if necessary.
68048
68050
  */
68049
68051
  static resolveSchemaAndItemName(fullOrQualifiedName, schema) {
68050
- const [schemaName, itemName] = _Metadata_SchemaItem__WEBPACK_IMPORTED_MODULE_3__.SchemaItem.parseFullName(fullOrQualifiedName);
68052
+ const [schemaName, itemName] = _Metadata_SchemaItem__WEBPACK_IMPORTED_MODULE_4__.SchemaItem.parseFullName(fullOrQualifiedName);
68051
68053
  // If a schema is provided we attempt to resolve the alias by looking at the reference schemas.
68052
68054
  if (undefined !== schema && -1 !== fullOrQualifiedName.indexOf(":")) {
68053
68055
  const refName = schema.getReferenceNameByAlias(schemaName);
@@ -68088,7 +68090,7 @@ class SchemaReadHelper {
68088
68090
  }
68089
68091
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECJson, `Unable to locate SchemaItem ${name}.`);
68090
68092
  }
68091
- schemaItem = await this._context.getSchemaItem(new _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.SchemaItemKey(itemName, new _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.SchemaKey(schemaName)));
68093
+ schemaItem = await this._context.getSchemaItem(new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaItemKey(itemName, new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaKey(schemaName)));
68092
68094
  if (undefined === schemaItem)
68093
68095
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECJson, `Unable to locate SchemaItem ${name}.`);
68094
68096
  return schemaItem;
@@ -68121,7 +68123,7 @@ class SchemaReadHelper {
68121
68123
  }
68122
68124
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECJson, `Unable to locate SchemaItem ${name}.`);
68123
68125
  }
68124
- schemaItem = this._context.getSchemaItemSync(new _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.SchemaItemKey(itemName, new _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.SchemaKey(schemaName)));
68126
+ schemaItem = this._context.getSchemaItemSync(new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaItemKey(itemName, new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaKey(schemaName)));
68125
68127
  if (undefined === schemaItem)
68126
68128
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECJson, `Unable to locate SchemaItem ${name}.`);
68127
68129
  return schemaItem;
@@ -68158,7 +68160,7 @@ class SchemaReadHelper {
68158
68160
  await this.findSchemaItem(koqProps.persistenceUnit);
68159
68161
  if (undefined !== koqProps.presentationUnits) {
68160
68162
  for (const formatString of koqProps.presentationUnits) {
68161
- for (const name of (0,_itwin_core_quantity__WEBPACK_IMPORTED_MODULE_6__.getItemNamesFromFormatString)(formatString)) {
68163
+ for (const name of (0,_itwin_core_quantity__WEBPACK_IMPORTED_MODULE_7__.getItemNamesFromFormatString)(formatString)) {
68162
68164
  await this.findSchemaItem(name);
68163
68165
  }
68164
68166
  }
@@ -68175,7 +68177,7 @@ class SchemaReadHelper {
68175
68177
  this.findSchemaItemSync(koqProps.persistenceUnit);
68176
68178
  if (undefined !== koqProps.presentationUnits) {
68177
68179
  for (const formatString of koqProps.presentationUnits) {
68178
- for (const name of (0,_itwin_core_quantity__WEBPACK_IMPORTED_MODULE_6__.getItemNamesFromFormatString)(formatString)) {
68180
+ for (const name of (0,_itwin_core_quantity__WEBPACK_IMPORTED_MODULE_7__.getItemNamesFromFormatString)(formatString)) {
68179
68181
  this.findSchemaItemSync(name);
68180
68182
  }
68181
68183
  }
@@ -68425,14 +68427,19 @@ class SchemaReadHelper {
68425
68427
  */
68426
68428
  async loadPropertyTypes(classObj, propName, propType, rawProperty) {
68427
68429
  const loadTypeName = async (typeName) => {
68428
- if (undefined === (0,_ECObjects__WEBPACK_IMPORTED_MODULE_1__.parsePrimitiveType)(typeName))
68430
+ if (undefined === (0,_ECObjects__WEBPACK_IMPORTED_MODULE_1__.parsePrimitiveType)(typeName)) {
68431
+ if (SchemaReadHelper.isECSpecVersionNewer(this._parser.getECSpecVersion))
68432
+ return _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.NewerECSpecVersion;
68429
68433
  await this.findSchemaItem(typeName);
68434
+ }
68435
+ return _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.Success;
68430
68436
  };
68431
68437
  const lowerCasePropType = propType.toLowerCase();
68432
68438
  switch (lowerCasePropType) {
68433
68439
  case "primitiveproperty":
68434
68440
  const primPropertyProps = this._parser.parsePrimitiveProperty(rawProperty);
68435
- await loadTypeName(primPropertyProps.typeName);
68441
+ if (await loadTypeName(primPropertyProps.typeName) === _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.NewerECSpecVersion)
68442
+ primPropertyProps.typeName = "string";
68436
68443
  const primProp = await classObj.createPrimitiveProperty(propName, primPropertyProps.typeName);
68437
68444
  return this.loadProperty(primProp, primPropertyProps, rawProperty);
68438
68445
  case "structproperty":
@@ -68442,7 +68449,8 @@ class SchemaReadHelper {
68442
68449
  return this.loadProperty(structProp, structPropertyProps, rawProperty);
68443
68450
  case "primitivearrayproperty":
68444
68451
  const primArrPropertyProps = this._parser.parsePrimitiveArrayProperty(rawProperty);
68445
- await loadTypeName(primArrPropertyProps.typeName);
68452
+ if (await loadTypeName(primArrPropertyProps.typeName) === _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.NewerECSpecVersion)
68453
+ primArrPropertyProps.typeName = "string";
68446
68454
  const primArrProp = await classObj.createPrimitiveArrayProperty(propName, primArrPropertyProps.typeName);
68447
68455
  return this.loadProperty(primArrProp, primArrPropertyProps, rawProperty);
68448
68456
  case "structarrayproperty":
@@ -68468,14 +68476,19 @@ class SchemaReadHelper {
68468
68476
  */
68469
68477
  loadPropertyTypesSync(classObj, propName, propType, rawProperty) {
68470
68478
  const loadTypeName = (typeName) => {
68471
- if (undefined === (0,_ECObjects__WEBPACK_IMPORTED_MODULE_1__.parsePrimitiveType)(typeName))
68479
+ if (undefined === (0,_ECObjects__WEBPACK_IMPORTED_MODULE_1__.parsePrimitiveType)(typeName)) {
68480
+ if (SchemaReadHelper.isECSpecVersionNewer(this._parser.getECSpecVersion))
68481
+ return _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.NewerECSpecVersion;
68472
68482
  this.findSchemaItemSync(typeName);
68483
+ }
68484
+ return _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.Success;
68473
68485
  };
68474
68486
  const lowerCasePropType = propType.toLowerCase();
68475
68487
  switch (lowerCasePropType) {
68476
68488
  case "primitiveproperty":
68477
68489
  const primPropertyProps = this._parser.parsePrimitiveProperty(rawProperty);
68478
- loadTypeName(primPropertyProps.typeName);
68490
+ if (loadTypeName(primPropertyProps.typeName) === _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.NewerECSpecVersion)
68491
+ primPropertyProps.typeName = "string";
68479
68492
  const primProp = classObj.createPrimitivePropertySync(propName, primPropertyProps.typeName);
68480
68493
  return this.loadPropertySync(primProp, primPropertyProps, rawProperty);
68481
68494
  case "structproperty":
@@ -68485,7 +68498,8 @@ class SchemaReadHelper {
68485
68498
  return this.loadPropertySync(structProp, structPropertyProps, rawProperty);
68486
68499
  case "primitivearrayproperty":
68487
68500
  const primArrPropertyProps = this._parser.parsePrimitiveArrayProperty(rawProperty);
68488
- loadTypeName(primArrPropertyProps.typeName);
68501
+ if (loadTypeName(primArrPropertyProps.typeName) === _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.NewerECSpecVersion)
68502
+ primArrPropertyProps.typeName = "string";
68489
68503
  const primArrProp = classObj.createPrimitiveArrayPropertySync(propName, primArrPropertyProps.typeName);
68490
68504
  return this.loadPropertySync(primArrProp, primArrPropertyProps, rawProperty);
68491
68505
  case "structarrayproperty":
@@ -68570,6 +68584,11 @@ class SchemaReadHelper {
68570
68584
  container.addCustomAttribute(customAttribute);
68571
68585
  }
68572
68586
  }
68587
+ static isECSpecVersionNewer(ecSpecVersion) {
68588
+ if (ecSpecVersion === undefined || ecSpecVersion.readVersion === undefined || ecSpecVersion.writeVersion === undefined)
68589
+ return false;
68590
+ return ((ecSpecVersion.readVersion > _Metadata_Schema__WEBPACK_IMPORTED_MODULE_3__.Schema.currentECSpecMajorVersion) || (ecSpecVersion.readVersion === _Metadata_Schema__WEBPACK_IMPORTED_MODULE_3__.Schema.currentECSpecMajorVersion && ecSpecVersion.writeVersion > _Metadata_Schema__WEBPACK_IMPORTED_MODULE_3__.Schema.currentECSpecMinorVersion));
68591
+ }
68573
68592
  }
68574
68593
 
68575
68594
 
@@ -68589,6 +68608,7 @@ __webpack_require__.r(__webpack_exports__);
68589
68608
  /* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Exception */ "../../core/ecschema-metadata/lib/esm/Exception.js");
68590
68609
  /* harmony import */ var _ECName__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ECName */ "../../core/ecschema-metadata/lib/esm/ECName.js");
68591
68610
  /* harmony import */ var _AbstractParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractParser */ "../../core/ecschema-metadata/lib/esm/Deserialization/AbstractParser.js");
68611
+ /* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Helper */ "../../core/ecschema-metadata/lib/esm/Deserialization/Helper.js");
68592
68612
  /*---------------------------------------------------------------------------------------------
68593
68613
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
68594
68614
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -68596,9 +68616,11 @@ __webpack_require__.r(__webpack_exports__);
68596
68616
 
68597
68617
 
68598
68618
 
68619
+
68599
68620
  function isObject(x) {
68600
68621
  return typeof (x) === "object";
68601
68622
  }
68623
+ const SCHEMAURL_JSON = "https://dev\\.bentley\\.com/json_schemas/ec";
68602
68624
  /** @internal */
68603
68625
  class JsonParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_2__.AbstractParser {
68604
68626
  constructor(rawSchema) {
@@ -68607,6 +68629,18 @@ class JsonParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_2__.AbstractPa
68607
68629
  throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `Invalid JSON object.`);
68608
68630
  this._rawSchema = rawSchema;
68609
68631
  this._schemaName = rawSchema.name;
68632
+ this._ecSpecVersion = JsonParser.parseJSUri(rawSchema.$schema);
68633
+ }
68634
+ get getECSpecVersion() { return this._ecSpecVersion; }
68635
+ static parseJSUri(uri) {
68636
+ if (uri === undefined)
68637
+ return undefined;
68638
+ const match = uri.match(`^${SCHEMAURL_JSON}/([0-9]+)/ecschema$`);
68639
+ if (!match)
68640
+ return;
68641
+ const readVersion = parseInt(match[1][0], 10);
68642
+ const writeVersion = parseInt(match[1][1], 10);
68643
+ return { readVersion, writeVersion };
68610
68644
  }
68611
68645
  /**
68612
68646
  * Type checks Schema and returns SchemaProps interface
@@ -68638,7 +68672,12 @@ class JsonParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_2__.AbstractPa
68638
68672
  if (typeof (this._rawSchema.description) !== "string")
68639
68673
  throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `The ECSchema ${this._schemaName} has an invalid 'description' attribute. It should be of type 'string'.`);
68640
68674
  }
68641
- return this._rawSchema;
68675
+ const ecVersions = JsonParser.parseJSUri(this._rawSchema.$schema);
68676
+ return {
68677
+ ...this._rawSchema,
68678
+ ecSpecMajorVersion: ecVersions?.readVersion,
68679
+ ecSpecMinorVersion: ecVersions?.writeVersion,
68680
+ };
68642
68681
  }
68643
68682
  *getReferences() {
68644
68683
  if (undefined !== this._rawSchema.references) {
@@ -68734,8 +68773,11 @@ class JsonParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_2__.AbstractPa
68734
68773
  throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} does not have the required 'type' attribute.`);
68735
68774
  if (typeof (property.type) !== "string")
68736
68775
  throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. It should be of type 'string'.`);
68737
- if (!this.isValidPropertyType(property.type))
68776
+ if (!this.isValidPropertyType(property.type)) {
68777
+ if (_Helper__WEBPACK_IMPORTED_MODULE_3__.SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))
68778
+ return;
68738
68779
  throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `The ECProperty ${itemName}.${property.name} has an invalid 'type' attribute. '${property.type}' is not a valid type.`);
68780
+ }
68739
68781
  yield [property.name, property.type, property];
68740
68782
  }
68741
68783
  }
@@ -68775,7 +68817,11 @@ class JsonParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_2__.AbstractPa
68775
68817
  throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `The ECEntityClass ${this._currentItemFullName} has an invalid 'mixins' attribute. It should be of type 'string[]'.`);
68776
68818
  }
68777
68819
  }
68778
- return jsonObj;
68820
+ return {
68821
+ ...jsonObj,
68822
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
68823
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
68824
+ };
68779
68825
  }
68780
68826
  /**
68781
68827
  * Type checks mixin and returns MixinProps interface
@@ -68788,7 +68834,11 @@ class JsonParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_2__.AbstractPa
68788
68834
  throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);
68789
68835
  if (typeof (jsonObj.appliesTo) !== "string")
68790
68836
  throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `The Mixin ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);
68791
- return jsonObj;
68837
+ return {
68838
+ ...jsonObj,
68839
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
68840
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
68841
+ };
68792
68842
  }
68793
68843
  /**
68794
68844
  * Type checks custom attribute class and returns CustomAttributeClassProps interface
@@ -68801,11 +68851,19 @@ class JsonParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_2__.AbstractPa
68801
68851
  throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} is missing the required 'appliesTo' attribute.`);
68802
68852
  if (typeof (jsonObj.appliesTo) !== "string")
68803
68853
  throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `The CustomAttributeClass ${this._currentItemFullName} has an invalid 'appliesTo' attribute. It should be of type 'string'.`);
68804
- return jsonObj;
68854
+ return {
68855
+ ...jsonObj,
68856
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
68857
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
68858
+ };
68805
68859
  }
68806
68860
  parseStructClass(jsonObj) {
68807
68861
  this.checkClassProps(jsonObj);
68808
- return jsonObj;
68862
+ return {
68863
+ ...jsonObj,
68864
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
68865
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
68866
+ };
68809
68867
  }
68810
68868
  parseUnitSystem(jsonObj) {
68811
68869
  this.checkSchemaItemProps(jsonObj);
@@ -68836,7 +68894,11 @@ class JsonParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_2__.AbstractPa
68836
68894
  if (!isObject(jsonObj.target))
68837
68895
  throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `The RelationshipClass ${this._currentItemFullName} has an invalid target constraint. It should be of type 'object'.`);
68838
68896
  this.checkRelationshipConstraintProps(jsonObj.target, false);
68839
- return jsonObj;
68897
+ return {
68898
+ ...jsonObj,
68899
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
68900
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
68901
+ };
68840
68902
  }
68841
68903
  /**
68842
68904
  * Type checks Relationship Constraint and returns RelationshipConstraintProps interface.
@@ -68888,8 +68950,12 @@ class JsonParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_2__.AbstractPa
68888
68950
  (type === "integer") ||
68889
68951
  (type === "string");
68890
68952
  };
68891
- if (!isValidEnumerationType(jsonObj.type))
68892
- throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be either "int" or "string".`);
68953
+ if (!isValidEnumerationType(jsonObj.type)) {
68954
+ if (_Helper__WEBPACK_IMPORTED_MODULE_3__.SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))
68955
+ jsonObj.type = "string";
68956
+ else
68957
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'type' attribute. It should be either "int" or "string".`);
68958
+ }
68893
68959
  if (undefined !== jsonObj.isStrict) { // TODO: make required
68894
68960
  if (typeof (jsonObj.isStrict) !== "boolean")
68895
68961
  throw new _Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_0__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'isStrict' attribute. It should be of type 'boolean'.`);
@@ -69393,6 +69459,7 @@ __webpack_require__.r(__webpack_exports__);
69393
69459
  /* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Exception */ "../../core/ecschema-metadata/lib/esm/Exception.js");
69394
69460
  /* harmony import */ var _ECName__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ECName */ "../../core/ecschema-metadata/lib/esm/ECName.js");
69395
69461
  /* harmony import */ var _AbstractParser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AbstractParser */ "../../core/ecschema-metadata/lib/esm/Deserialization/AbstractParser.js");
69462
+ /* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Helper */ "../../core/ecschema-metadata/lib/esm/Deserialization/Helper.js");
69396
69463
  /*---------------------------------------------------------------------------------------------
69397
69464
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
69398
69465
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -69402,6 +69469,7 @@ __webpack_require__.r(__webpack_exports__);
69402
69469
 
69403
69470
 
69404
69471
 
69472
+
69405
69473
  const NON_ITEM_SCHEMA_ELEMENTS = ["ECSchemaReference", "ECCustomAttributes"];
69406
69474
  const ECXML_URI = "http://www\\.bentley\\.com/schemas/Bentley\\.ECXML";
69407
69475
  /** @internal */
@@ -69424,11 +69492,12 @@ class XmlParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_4__.AbstractPar
69424
69492
  const xmlNamespace = schemaInfo.getAttribute("xmlns");
69425
69493
  if (xmlNamespace) {
69426
69494
  this._xmlNamespace = xmlNamespace;
69427
- this._ecXmlVersion = this.parseXmlNamespace(this._xmlNamespace);
69495
+ this._ecSpecVersion = XmlParser.parseXmlNamespace(this._xmlNamespace);
69428
69496
  }
69429
69497
  this._schemaItems = new Map();
69430
69498
  this._mapIsPopulated = false;
69431
69499
  }
69500
+ get getECSpecVersion() { return this._ecSpecVersion; }
69432
69501
  parseSchema() {
69433
69502
  const schemaMetadata = this._rawSchema.documentElement;
69434
69503
  if ("ECSchema" !== schemaMetadata.nodeName)
@@ -69442,7 +69511,7 @@ class XmlParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_4__.AbstractPar
69442
69511
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidSchemaXML, `The ECSchema ${this._schemaName} is missing a required 'version' attribute`);
69443
69512
  if (this._xmlNamespace === undefined)
69444
69513
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidSchemaXML, `The ECSchema ${this._schemaName} is missing a required 'xmlns' attribute`);
69445
- if (this._ecXmlVersion === undefined)
69514
+ if (this._ecSpecVersion === undefined)
69446
69515
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidSchemaXML, `The ECSchema ${this._schemaName} has an invalid 'xmlns' attribute`);
69447
69516
  const alias = this.getRequiredAttribute(schemaMetadata, "alias", `The ECSchema ${this._schemaName} is missing a required 'alias' attribute`);
69448
69517
  const description = this.getOptionalAttribute(schemaMetadata, "description");
@@ -69454,6 +69523,8 @@ class XmlParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_4__.AbstractPar
69454
69523
  alias,
69455
69524
  label: displayLabel,
69456
69525
  description,
69526
+ ecSpecMajorVersion: this._ecSpecVersion.readVersion,
69527
+ ecSpecMinorVersion: this._ecSpecVersion.writeVersion,
69457
69528
  };
69458
69529
  return schemaProps;
69459
69530
  }
@@ -69479,8 +69550,11 @@ class XmlParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_4__.AbstractPar
69479
69550
  rawItemType = "Mixin";
69480
69551
  }
69481
69552
  const itemType = this.getSchemaItemType(rawItemType);
69482
- if (itemType === undefined)
69553
+ if (itemType === undefined) {
69554
+ if (_Helper__WEBPACK_IMPORTED_MODULE_5__.SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))
69555
+ continue;
69483
69556
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidSchemaXML, `A SchemaItem in ${this._schemaName} has an invalid type. '${rawItemType}' is not a valid SchemaItem type.`);
69557
+ }
69484
69558
  const itemName = this.getRequiredAttribute(item, "typeName", `A SchemaItem in ${this._schemaName} is missing the required 'typeName' attribute.`);
69485
69559
  if (!_ECName__WEBPACK_IMPORTED_MODULE_3__.ECName.validate(itemName))
69486
69560
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECName, `A SchemaItem in ${this._schemaName} has an invalid 'typeName' attribute. '${itemName}' is not a valid ECName.`);
@@ -69613,12 +69687,18 @@ class XmlParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_4__.AbstractPar
69613
69687
  // TODO: This shouldn't be verified here. It's for the deserialize method to handle. The only reason it's currently done here so that the xml
69614
69688
  // value can be put in the correct type, number or string.
69615
69689
  let tempBackingType;
69616
- if (/int/i.test(enumType))
69690
+ if (/int/i.test(enumType)) {
69617
69691
  tempBackingType = _ECObjects__WEBPACK_IMPORTED_MODULE_1__.PrimitiveType.Integer;
69618
- else if (/string/i.test(enumType))
69692
+ }
69693
+ else if (/string/i.test(enumType)) {
69619
69694
  tempBackingType = _ECObjects__WEBPACK_IMPORTED_MODULE_1__.PrimitiveType.String;
69620
- else
69621
- throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'backingTypeName' attribute. It should be either "int" or "string".`);
69695
+ }
69696
+ else {
69697
+ if (_Helper__WEBPACK_IMPORTED_MODULE_5__.SchemaReadHelper.isECSpecVersionNewer(this._ecSpecVersion))
69698
+ tempBackingType = _ECObjects__WEBPACK_IMPORTED_MODULE_1__.PrimitiveType.String;
69699
+ else
69700
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this._currentItemFullName} has an invalid 'backingTypeName' attribute. It should be either "int" or "string".`);
69701
+ }
69622
69702
  let isStrictString = this.getOptionalAttribute(xmlElement, "isStrict");
69623
69703
  if (isStrictString === undefined)
69624
69704
  isStrictString = "true";
@@ -69649,6 +69729,8 @@ class XmlParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_4__.AbstractPar
69649
69729
  type: enumType,
69650
69730
  isStrict,
69651
69731
  enumerators,
69732
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
69733
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
69652
69734
  };
69653
69735
  }
69654
69736
  parseKindOfQuantity(xmlElement) {
@@ -70011,6 +70093,8 @@ class XmlParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_4__.AbstractPar
70011
70093
  ...itemProps,
70012
70094
  modifier,
70013
70095
  baseClass,
70096
+ originalECSpecMajorVersion: this._ecSpecVersion?.readVersion,
70097
+ originalECSpecMinorVersion: this._ecSpecVersion?.writeVersion,
70014
70098
  };
70015
70099
  }
70016
70100
  getRelationshipConstraintProps(xmlElement, isSource) {
@@ -70142,14 +70226,14 @@ class XmlParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_4__.AbstractPar
70142
70226
  }
70143
70227
  }
70144
70228
  getCustomAttributeProvider(xmlCustomAttribute) {
70145
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(this._ecXmlVersion !== undefined);
70229
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(this._ecSpecVersion !== undefined);
70146
70230
  let ns = xmlCustomAttribute.getAttribute("xmlns");
70147
70231
  if (!ns) {
70148
70232
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(this._schemaName !== undefined);
70149
70233
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(this._schemaVersion !== undefined);
70150
70234
  ns = `${this._schemaName}.${this._schemaVersion}`;
70151
70235
  }
70152
- if (null === ns || !this.isSchemaFullNameValidForVersion(ns, this._ecXmlVersion))
70236
+ if (null === ns || !this.isSchemaFullNameValidForVersion(ns, this._ecSpecVersion))
70153
70237
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidSchemaXML, `Custom attribute namespaces must contain a valid 3.2 full schema name in the form <schemaName>.RR.ww.mm.`);
70154
70238
  const schemaNameParts = ns.split(".");
70155
70239
  const className = `${schemaNameParts[0]}.${xmlCustomAttribute.tagName}`;
@@ -70307,9 +70391,9 @@ class XmlParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_4__.AbstractPar
70307
70391
  throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidSchemaXML, `Property '${propName}' has an invalid property value. A Point 3D value was expected.`);
70308
70392
  return { x, y, z };
70309
70393
  }
70310
- isSchemaFullNameValidForVersion(schemaFullName, ecXmlVersion) {
70394
+ isSchemaFullNameValidForVersion(schemaFullName, ecSpecVersion) {
70311
70395
  const schemaNameParts = schemaFullName.split(".");
70312
- if ((ecXmlVersion.readVersion >= 3 && ecXmlVersion.writeVersion >= 2) || ecXmlVersion.readVersion > 3) {
70396
+ if ((ecSpecVersion.readVersion >= 3 && ecSpecVersion.writeVersion >= 2) || ecSpecVersion.readVersion > 3) {
70313
70397
  if (schemaNameParts.length < 4)
70314
70398
  return false;
70315
70399
  }
@@ -70319,7 +70403,7 @@ class XmlParser extends _AbstractParser__WEBPACK_IMPORTED_MODULE_4__.AbstractPar
70319
70403
  }
70320
70404
  return true;
70321
70405
  }
70322
- parseXmlNamespace(xmlNamespace) {
70406
+ static parseXmlNamespace(xmlNamespace) {
70323
70407
  const regEx = new RegExp(`^${ECXML_URI}\\.([0-9]+)\\.([0-9]+)$`);
70324
70408
  const match = xmlNamespace.match(regEx);
70325
70409
  if (!match)
@@ -71173,6 +71257,7 @@ var ECObjectsStatus;
71173
71257
  ECObjectsStatus[ECObjectsStatus["InvalidSchemaAlias"] = 35078] = "InvalidSchemaAlias";
71174
71258
  ECObjectsStatus[ECObjectsStatus["InvalidSchemaKey"] = 35079] = "InvalidSchemaKey";
71175
71259
  ECObjectsStatus[ECObjectsStatus["UnableToLoadSchema"] = 35080] = "UnableToLoadSchema";
71260
+ ECObjectsStatus[ECObjectsStatus["NewerECSpecVersion"] = 35081] = "NewerECSpecVersion";
71176
71261
  })(ECObjectsStatus || (ECObjectsStatus = {}));
71177
71262
  /** @internal */
71178
71263
  class ECObjectsError extends _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyError {
@@ -71260,6 +71345,7 @@ __webpack_require__.r(__webpack_exports__);
71260
71345
  /* harmony import */ var _CustomAttribute__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CustomAttribute */ "../../core/ecschema-metadata/lib/esm/Metadata/CustomAttribute.js");
71261
71346
  /* harmony import */ var _Property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Property */ "../../core/ecschema-metadata/lib/esm/Metadata/Property.js");
71262
71347
  /* harmony import */ var _SchemaItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SchemaItem */ "../../core/ecschema-metadata/lib/esm/Metadata/SchemaItem.js");
71348
+ /* harmony import */ var _Deserialization_Helper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Deserialization/Helper */ "../../core/ecschema-metadata/lib/esm/Deserialization/Helper.js");
71263
71349
  /*---------------------------------------------------------------------------------------------
71264
71350
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
71265
71351
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -71276,6 +71362,7 @@ __webpack_require__.r(__webpack_exports__);
71276
71362
 
71277
71363
 
71278
71364
 
71365
+
71279
71366
  /**
71280
71367
  * A common abstract class for all of the ECClass types.
71281
71368
  * @beta
@@ -71564,9 +71651,15 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_8__.SchemaItem {
71564
71651
  super.fromJSONSync(classProps);
71565
71652
  if (undefined !== classProps.modifier) {
71566
71653
  const modifier = (0,_ECObjects__WEBPACK_IMPORTED_MODULE_3__.parseClassModifier)(classProps.modifier);
71567
- if (undefined === modifier)
71568
- throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidModifier, `The string '${classProps.modifier}' is not a valid ECClassModifier.`);
71569
- this._modifier = modifier;
71654
+ if (undefined === modifier) {
71655
+ if (_Deserialization_Helper__WEBPACK_IMPORTED_MODULE_9__.SchemaReadHelper.isECSpecVersionNewer({ readVersion: classProps.originalECSpecMajorVersion, writeVersion: classProps.originalECSpecMinorVersion }))
71656
+ this._modifier = _ECObjects__WEBPACK_IMPORTED_MODULE_3__.ECClassModifier.None;
71657
+ else
71658
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidModifier, `The string '${classProps.modifier}' is not a valid ECClassModifier.`);
71659
+ }
71660
+ else {
71661
+ this._modifier = modifier;
71662
+ }
71570
71663
  }
71571
71664
  if (undefined !== classProps.baseClass) {
71572
71665
  const ecClassSchemaItemKey = this.schema.getSchemaItemKey(classProps.baseClass);
@@ -72339,10 +72432,11 @@ __webpack_require__.r(__webpack_exports__);
72339
72432
  /* harmony export */ "Enumeration": () => (/* binding */ Enumeration),
72340
72433
  /* harmony export */ "MutableEnumeration": () => (/* binding */ MutableEnumeration)
72341
72434
  /* harmony export */ });
72342
- /* harmony import */ var _ECObjects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ECObjects */ "../../core/ecschema-metadata/lib/esm/ECObjects.js");
72343
- /* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Exception */ "../../core/ecschema-metadata/lib/esm/Exception.js");
72344
- /* harmony import */ var _ECName__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ECName */ "../../core/ecschema-metadata/lib/esm/ECName.js");
72345
- /* harmony import */ var _SchemaItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SchemaItem */ "../../core/ecschema-metadata/lib/esm/Metadata/SchemaItem.js");
72435
+ /* harmony import */ var _Deserialization_Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Deserialization/Helper */ "../../core/ecschema-metadata/lib/esm/Deserialization/Helper.js");
72436
+ /* harmony import */ var _ECObjects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ECObjects */ "../../core/ecschema-metadata/lib/esm/ECObjects.js");
72437
+ /* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Exception */ "../../core/ecschema-metadata/lib/esm/Exception.js");
72438
+ /* harmony import */ var _ECName__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ECName */ "../../core/ecschema-metadata/lib/esm/ECName.js");
72439
+ /* harmony import */ var _SchemaItem__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SchemaItem */ "../../core/ecschema-metadata/lib/esm/Metadata/SchemaItem.js");
72346
72440
  /*---------------------------------------------------------------------------------------------
72347
72441
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
72348
72442
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -72354,23 +72448,24 @@ __webpack_require__.r(__webpack_exports__);
72354
72448
 
72355
72449
 
72356
72450
 
72451
+
72357
72452
  /**
72358
72453
  * A Typescript class representation of an ECEnumeration.
72359
72454
  * @beta
72360
72455
  */
72361
- class Enumeration extends _SchemaItem__WEBPACK_IMPORTED_MODULE_3__.SchemaItem {
72456
+ class Enumeration extends _SchemaItem__WEBPACK_IMPORTED_MODULE_4__.SchemaItem {
72362
72457
  get enumerators() { return this._enumerators; }
72363
72458
  get type() { return this._type; }
72364
72459
  get isStrict() { return this._isStrict; }
72365
72460
  constructor(schema, name, primitiveType) {
72366
72461
  super(schema, name);
72367
- this.schemaItemType = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.SchemaItemType.Enumeration;
72462
+ this.schemaItemType = _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaItemType.Enumeration;
72368
72463
  this._type = primitiveType;
72369
72464
  this._isStrict = true;
72370
72465
  this._enumerators = [];
72371
72466
  }
72372
- get isInt() { return this._type === _ECObjects__WEBPACK_IMPORTED_MODULE_0__.PrimitiveType.Integer; }
72373
- get isString() { return this._type === _ECObjects__WEBPACK_IMPORTED_MODULE_0__.PrimitiveType.String; }
72467
+ get isInt() { return this._type === _ECObjects__WEBPACK_IMPORTED_MODULE_1__.PrimitiveType.Integer; }
72468
+ get isString() { return this._type === _ECObjects__WEBPACK_IMPORTED_MODULE_1__.PrimitiveType.String; }
72374
72469
  /**
72375
72470
  * Gets an enumerator that matches the name provided.
72376
72471
  * @param name The ECName of the Enumerator to find.
@@ -72390,9 +72485,9 @@ class Enumeration extends _SchemaItem__WEBPACK_IMPORTED_MODULE_3__.SchemaItem {
72390
72485
  findDuplicateEnumerators(name, value) {
72391
72486
  this._enumerators.forEach((element) => {
72392
72487
  if (element.name.toLowerCase() === name.toLowerCase())
72393
- throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this.name} has a duplicate Enumerator with name '${name}'.`);
72488
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this.name} has a duplicate Enumerator with name '${name}'.`);
72394
72489
  if (element.value === value)
72395
- throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this.name} has a duplicate Enumerator with value '${value}'.`);
72490
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this.name} has a duplicate Enumerator with value '${value}'.`);
72396
72491
  });
72397
72492
  }
72398
72493
  /**
@@ -72405,12 +72500,12 @@ class Enumeration extends _SchemaItem__WEBPACK_IMPORTED_MODULE_3__.SchemaItem {
72405
72500
  */
72406
72501
  createEnumerator(name, value, label, description) {
72407
72502
  if (this.isInt && typeof (value) === "string") // throws if backing type is int and value is string
72408
- throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this.name} has a backing type 'integer' and an enumerator with value of type 'string'.`);
72503
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this.name} has a backing type 'integer' and an enumerator with value of type 'string'.`);
72409
72504
  if (!this.isInt && typeof (value) === "number") // also throws if backing type is string and value is number
72410
- throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this.name} has a backing type 'string' and an enumerator with value of type 'integer'.`);
72505
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this.name} has a backing type 'string' and an enumerator with value of type 'integer'.`);
72411
72506
  this.findDuplicateEnumerators(name, value); // check for duplicates; throw if there are any
72412
- if (!_ECName__WEBPACK_IMPORTED_MODULE_2__.ECName.validate(name))
72413
- throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsStatus.InvalidECName, `The Enumeration ${this.name} has an enumerator with an invalid 'name' attribute. ${name} is not a valid ECName.`);
72507
+ if (!_ECName__WEBPACK_IMPORTED_MODULE_3__.ECName.validate(name))
72508
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECName, `The Enumeration ${this.name} has an enumerator with an invalid 'name' attribute. ${name} is not a valid ECName.`);
72414
72509
  return { name, value, label, description };
72415
72510
  }
72416
72511
  /**
@@ -72443,7 +72538,7 @@ class Enumeration extends _SchemaItem__WEBPACK_IMPORTED_MODULE_3__.SchemaItem {
72443
72538
  async toXml(schemaXml) {
72444
72539
  const itemElement = await super.toXml(schemaXml);
72445
72540
  if (undefined !== this.type)
72446
- itemElement.setAttribute("backingTypeName", (0,_ECObjects__WEBPACK_IMPORTED_MODULE_0__.primitiveTypeToString)(this.type));
72541
+ itemElement.setAttribute("backingTypeName", (0,_ECObjects__WEBPACK_IMPORTED_MODULE_1__.primitiveTypeToString)(this.type));
72447
72542
  itemElement.setAttribute("isStrict", String(this.isStrict));
72448
72543
  for (const enumerator of this.enumerators) {
72449
72544
  const enumElement = schemaXml.createElement("ECEnumerator");
@@ -72461,17 +72556,23 @@ class Enumeration extends _SchemaItem__WEBPACK_IMPORTED_MODULE_3__.SchemaItem {
72461
72556
  fromJSONSync(enumerationProps) {
72462
72557
  super.fromJSONSync(enumerationProps);
72463
72558
  if (undefined === this._type) {
72464
- if (/int/i.test(enumerationProps.type))
72465
- this._type = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.PrimitiveType.Integer;
72466
- else if (/string/i.test(enumerationProps.type))
72467
- this._type = _ECObjects__WEBPACK_IMPORTED_MODULE_0__.PrimitiveType.String;
72468
- else
72469
- throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this.name} has an invalid 'type' attribute. It should be either "int" or "string".`);
72559
+ if (/int/i.test(enumerationProps.type)) {
72560
+ this._type = _ECObjects__WEBPACK_IMPORTED_MODULE_1__.PrimitiveType.Integer;
72561
+ }
72562
+ else if (/string/i.test(enumerationProps.type)) {
72563
+ this._type = _ECObjects__WEBPACK_IMPORTED_MODULE_1__.PrimitiveType.String;
72564
+ }
72565
+ else {
72566
+ if (_Deserialization_Helper__WEBPACK_IMPORTED_MODULE_0__.SchemaReadHelper.isECSpecVersionNewer({ readVersion: enumerationProps.originalECSpecMajorVersion, writeVersion: enumerationProps.originalECSpecMinorVersion }))
72567
+ this._type = _ECObjects__WEBPACK_IMPORTED_MODULE_1__.PrimitiveType.String;
72568
+ else
72569
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this.name} has an invalid 'type' attribute. It should be either "int" or "string".`);
72570
+ }
72470
72571
  }
72471
72572
  else {
72472
72573
  const primitiveTypePattern = (this.isInt) ? /int/i : /string/i;
72473
72574
  if (!primitiveTypePattern.test(enumerationProps.type))
72474
- throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_1__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this.name} has an incompatible type. It must be "${(this.isInt) ? "int" : "string"}", not "${(this.isInt) ? "string" : "int"}".`);
72575
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_2__.ECObjectsStatus.InvalidECJson, `The Enumeration ${this.name} has an incompatible type. It must be "${(this.isInt) ? "int" : "string"}", not "${(this.isInt) ? "string" : "int"}".`);
72475
72576
  }
72476
72577
  this._isStrict = enumerationProps.isStrict;
72477
72578
  if (undefined !== enumerationProps.enumerators) {
@@ -74167,13 +74268,14 @@ __webpack_require__.r(__webpack_exports__);
74167
74268
  /* harmony export */ "RelationshipMultiplicity": () => (/* binding */ RelationshipMultiplicity)
74168
74269
  /* harmony export */ });
74169
74270
  /* harmony import */ var _DelayedPromise__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DelayedPromise */ "../../core/ecschema-metadata/lib/esm/DelayedPromise.js");
74170
- /* harmony import */ var _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Deserialization/XmlSerializationUtils */ "../../core/ecschema-metadata/lib/esm/Deserialization/XmlSerializationUtils.js");
74171
- /* harmony import */ var _ECObjects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ECObjects */ "../../core/ecschema-metadata/lib/esm/ECObjects.js");
74172
- /* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Exception */ "../../core/ecschema-metadata/lib/esm/Exception.js");
74173
- /* harmony import */ var _Class__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Class */ "../../core/ecschema-metadata/lib/esm/Metadata/Class.js");
74174
- /* harmony import */ var _CustomAttribute__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CustomAttribute */ "../../core/ecschema-metadata/lib/esm/Metadata/CustomAttribute.js");
74175
- /* harmony import */ var _EntityClass__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./EntityClass */ "../../core/ecschema-metadata/lib/esm/Metadata/EntityClass.js");
74176
- /* harmony import */ var _SchemaItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SchemaItem */ "../../core/ecschema-metadata/lib/esm/Metadata/SchemaItem.js");
74271
+ /* harmony import */ var _Deserialization_Helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Deserialization/Helper */ "../../core/ecschema-metadata/lib/esm/Deserialization/Helper.js");
74272
+ /* harmony import */ var _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Deserialization/XmlSerializationUtils */ "../../core/ecschema-metadata/lib/esm/Deserialization/XmlSerializationUtils.js");
74273
+ /* harmony import */ var _ECObjects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ECObjects */ "../../core/ecschema-metadata/lib/esm/ECObjects.js");
74274
+ /* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Exception */ "../../core/ecschema-metadata/lib/esm/Exception.js");
74275
+ /* harmony import */ var _Class__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Class */ "../../core/ecschema-metadata/lib/esm/Metadata/Class.js");
74276
+ /* harmony import */ var _CustomAttribute__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CustomAttribute */ "../../core/ecschema-metadata/lib/esm/Metadata/CustomAttribute.js");
74277
+ /* harmony import */ var _EntityClass__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./EntityClass */ "../../core/ecschema-metadata/lib/esm/Metadata/EntityClass.js");
74278
+ /* harmony import */ var _SchemaItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SchemaItem */ "../../core/ecschema-metadata/lib/esm/Metadata/SchemaItem.js");
74177
74279
  /*---------------------------------------------------------------------------------------------
74178
74280
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
74179
74281
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -74189,18 +74291,19 @@ __webpack_require__.r(__webpack_exports__);
74189
74291
 
74190
74292
 
74191
74293
 
74294
+
74192
74295
  /**
74193
74296
  * A Typescript class representation of a ECRelationshipClass.
74194
74297
  * @beta
74195
74298
  */
74196
- class RelationshipClass extends _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass {
74299
+ class RelationshipClass extends _Class__WEBPACK_IMPORTED_MODULE_5__.ECClass {
74197
74300
  constructor(schema, name, modifier) {
74198
74301
  super(schema, name, modifier);
74199
- this.schemaItemType = _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaItemType.RelationshipClass;
74200
- this._strengthDirection = _ECObjects__WEBPACK_IMPORTED_MODULE_2__.StrengthDirection.Forward;
74201
- this._strength = _ECObjects__WEBPACK_IMPORTED_MODULE_2__.StrengthType.Referencing;
74202
- this._source = new RelationshipConstraint(this, _ECObjects__WEBPACK_IMPORTED_MODULE_2__.RelationshipEnd.Source);
74203
- this._target = new RelationshipConstraint(this, _ECObjects__WEBPACK_IMPORTED_MODULE_2__.RelationshipEnd.Target);
74302
+ this.schemaItemType = _ECObjects__WEBPACK_IMPORTED_MODULE_3__.SchemaItemType.RelationshipClass;
74303
+ this._strengthDirection = _ECObjects__WEBPACK_IMPORTED_MODULE_3__.StrengthDirection.Forward;
74304
+ this._strength = _ECObjects__WEBPACK_IMPORTED_MODULE_3__.StrengthType.Referencing;
74305
+ this._source = new RelationshipConstraint(this, _ECObjects__WEBPACK_IMPORTED_MODULE_3__.RelationshipEnd.Source);
74306
+ this._target = new RelationshipConstraint(this, _ECObjects__WEBPACK_IMPORTED_MODULE_3__.RelationshipEnd.Target);
74204
74307
  }
74205
74308
  get strength() { return this._strength; }
74206
74309
  get strengthDirection() { return this._strengthDirection; }
@@ -74213,10 +74316,10 @@ class RelationshipClass extends _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass {
74213
74316
  * @param direction
74214
74317
  */
74215
74318
  async createNavigationProperty(name, relationship, direction) {
74216
- return this.addProperty(await (0,_EntityClass__WEBPACK_IMPORTED_MODULE_6__.createNavigationProperty)(this, name, relationship, direction));
74319
+ return this.addProperty(await (0,_EntityClass__WEBPACK_IMPORTED_MODULE_7__.createNavigationProperty)(this, name, relationship, direction));
74217
74320
  }
74218
74321
  createNavigationPropertySync(name, relationship, direction) {
74219
- return this.addProperty((0,_EntityClass__WEBPACK_IMPORTED_MODULE_6__.createNavigationPropertySync)(this, name, relationship, direction));
74322
+ return this.addProperty((0,_EntityClass__WEBPACK_IMPORTED_MODULE_7__.createNavigationPropertySync)(this, name, relationship, direction));
74220
74323
  }
74221
74324
  /**
74222
74325
  * @alpha Used for schema editing.
@@ -74249,8 +74352,8 @@ class RelationshipClass extends _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass {
74249
74352
  */
74250
74353
  toJSON(standalone = false, includeSchemaVersion = false) {
74251
74354
  const schemaJson = super.toJSON(standalone, includeSchemaVersion);
74252
- schemaJson.strength = (0,_ECObjects__WEBPACK_IMPORTED_MODULE_2__.strengthToString)(this.strength);
74253
- schemaJson.strengthDirection = (0,_ECObjects__WEBPACK_IMPORTED_MODULE_2__.strengthDirectionToString)(this.strengthDirection);
74355
+ schemaJson.strength = (0,_ECObjects__WEBPACK_IMPORTED_MODULE_3__.strengthToString)(this.strength);
74356
+ schemaJson.strengthDirection = (0,_ECObjects__WEBPACK_IMPORTED_MODULE_3__.strengthDirectionToString)(this.strengthDirection);
74254
74357
  schemaJson.source = this.source.toJSON();
74255
74358
  schemaJson.target = this.target.toJSON();
74256
74359
  return schemaJson;
@@ -74258,20 +74361,24 @@ class RelationshipClass extends _Class__WEBPACK_IMPORTED_MODULE_4__.ECClass {
74258
74361
  /** @internal */
74259
74362
  async toXml(schemaXml) {
74260
74363
  const itemElement = await super.toXml(schemaXml);
74261
- itemElement.setAttribute("strength", (0,_ECObjects__WEBPACK_IMPORTED_MODULE_2__.strengthToString)(this.strength));
74262
- itemElement.setAttribute("strengthDirection", (0,_ECObjects__WEBPACK_IMPORTED_MODULE_2__.strengthDirectionToString)(this.strengthDirection));
74364
+ itemElement.setAttribute("strength", (0,_ECObjects__WEBPACK_IMPORTED_MODULE_3__.strengthToString)(this.strength));
74365
+ itemElement.setAttribute("strengthDirection", (0,_ECObjects__WEBPACK_IMPORTED_MODULE_3__.strengthDirectionToString)(this.strengthDirection));
74263
74366
  itemElement.appendChild(await this.source.toXml(schemaXml));
74264
74367
  itemElement.appendChild(await this.target.toXml(schemaXml));
74265
74368
  return itemElement;
74266
74369
  }
74267
74370
  fromJSONSync(relationshipClassProps) {
74268
74371
  super.fromJSONSync(relationshipClassProps);
74269
- const strength = (0,_ECObjects__WEBPACK_IMPORTED_MODULE_2__.parseStrength)(relationshipClassProps.strength);
74270
- if (undefined === strength)
74271
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidStrength, `The RelationshipClass ${this.fullName} has an invalid 'strength' attribute. '${relationshipClassProps.strength}' is not a valid StrengthType.`);
74272
- const strengthDirection = (0,_ECObjects__WEBPACK_IMPORTED_MODULE_2__.parseStrengthDirection)(relationshipClassProps.strengthDirection);
74372
+ let strength = (0,_ECObjects__WEBPACK_IMPORTED_MODULE_3__.parseStrength)(relationshipClassProps.strength);
74373
+ if (undefined === strength) {
74374
+ if (_Deserialization_Helper__WEBPACK_IMPORTED_MODULE_1__.SchemaReadHelper.isECSpecVersionNewer({ readVersion: relationshipClassProps.originalECSpecMajorVersion, writeVersion: relationshipClassProps.originalECSpecMinorVersion }))
74375
+ strength = _ECObjects__WEBPACK_IMPORTED_MODULE_3__.StrengthType.Referencing;
74376
+ else
74377
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidStrength, `The RelationshipClass ${this.fullName} has an invalid 'strength' attribute. '${relationshipClassProps.strength}' is not a valid StrengthType.`);
74378
+ }
74379
+ const strengthDirection = (0,_ECObjects__WEBPACK_IMPORTED_MODULE_3__.parseStrengthDirection)(relationshipClassProps.strengthDirection);
74273
74380
  if (undefined === strengthDirection)
74274
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidStrength, `The RelationshipClass ${this.fullName} has an invalid 'strengthDirection' attribute. '${relationshipClassProps.strengthDirection}' is not a valid StrengthDirection.`);
74381
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidStrength, `The RelationshipClass ${this.fullName} has an invalid 'strengthDirection' attribute. '${relationshipClassProps.strengthDirection}' is not a valid StrengthDirection.`);
74275
74382
  this._strength = strength;
74276
74383
  this._strengthDirection = strengthDirection;
74277
74384
  }
@@ -74330,7 +74437,7 @@ class RelationshipConstraint {
74330
74437
  /**
74331
74438
  * True if this RelationshipConstraint is the Source relationship end.
74332
74439
  */
74333
- get isSource() { return this.relationshipEnd === _ECObjects__WEBPACK_IMPORTED_MODULE_2__.RelationshipEnd.Source; }
74440
+ get isSource() { return this.relationshipEnd === _ECObjects__WEBPACK_IMPORTED_MODULE_3__.RelationshipEnd.Source; }
74334
74441
  /**
74335
74442
  * Adds the provided class as a constraint class to this constraint.
74336
74443
  * @param constraint The class to add as a constraint class.
@@ -74369,7 +74476,7 @@ class RelationshipConstraint {
74369
74476
  schemaJson.abstractConstraint = this._abstractConstraint.fullName;
74370
74477
  if (undefined !== this.constraintClasses && this.constraintClasses.length > 0)
74371
74478
  schemaJson.constraintClasses = this.constraintClasses.map((constraintClass) => constraintClass.fullName);
74372
- const customAttributes = (0,_CustomAttribute__WEBPACK_IMPORTED_MODULE_5__.serializeCustomAttributes)(this.customAttributes);
74479
+ const customAttributes = (0,_CustomAttribute__WEBPACK_IMPORTED_MODULE_6__.serializeCustomAttributes)(this.customAttributes);
74373
74480
  if (undefined !== customAttributes)
74374
74481
  schemaJson.customAttributes = customAttributes;
74375
74482
  return schemaJson;
@@ -74386,14 +74493,14 @@ class RelationshipConstraint {
74386
74493
  itemElement.setAttribute("multiplicity", this.multiplicity.toString());
74387
74494
  const abstractConstraint = await this.abstractConstraint;
74388
74495
  if (undefined !== abstractConstraint) {
74389
- const abstractConstraintName = _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_1__.XmlSerializationUtils.createXmlTypedName(this.schema, abstractConstraint.schema, abstractConstraint.name);
74496
+ const abstractConstraintName = _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_2__.XmlSerializationUtils.createXmlTypedName(this.schema, abstractConstraint.schema, abstractConstraint.name);
74390
74497
  itemElement.setAttribute("abstractConstraint", abstractConstraintName);
74391
74498
  }
74392
74499
  if (undefined !== this.constraintClasses) {
74393
74500
  for (const item of this.constraintClasses) {
74394
74501
  const constraintClass = await item;
74395
74502
  const classElement = schemaXml.createElement("Class");
74396
- const constraintClassName = _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_1__.XmlSerializationUtils.createXmlTypedName(this.schema, constraintClass.schema, constraintClass.name);
74503
+ const constraintClassName = _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_2__.XmlSerializationUtils.createXmlTypedName(this.schema, constraintClass.schema, constraintClass.name);
74397
74504
  classElement.setAttribute("class", constraintClassName);
74398
74505
  itemElement.appendChild(classElement);
74399
74506
  }
@@ -74401,7 +74508,7 @@ class RelationshipConstraint {
74401
74508
  if (this._customAttributes) {
74402
74509
  const caContainerElement = schemaXml.createElement("ECCustomAttributes");
74403
74510
  for (const [name, attribute] of this._customAttributes) {
74404
- const caElement = await _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_1__.XmlSerializationUtils.writeCustomAttribute(name, attribute, schemaXml, this.schema);
74511
+ const caElement = await _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_2__.XmlSerializationUtils.writeCustomAttribute(name, attribute, schemaXml, this.schema);
74405
74512
  caContainerElement.appendChild(caElement);
74406
74513
  }
74407
74514
  itemElement.appendChild(caContainerElement);
@@ -74413,24 +74520,24 @@ class RelationshipConstraint {
74413
74520
  this._polymorphic = relationshipConstraintProps.polymorphic;
74414
74521
  const parsedMultiplicity = RelationshipMultiplicity.fromString(relationshipConstraintProps.multiplicity);
74415
74522
  if (!parsedMultiplicity)
74416
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidMultiplicity, ``);
74523
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidMultiplicity, ``);
74417
74524
  this._multiplicity = parsedMultiplicity;
74418
74525
  const relClassSchema = this.relationshipClass.schema;
74419
74526
  if (undefined !== relationshipConstraintProps.abstractConstraint) {
74420
74527
  const abstractConstraintSchemaItemKey = relClassSchema.getSchemaItemKey(relationshipConstraintProps.abstractConstraint);
74421
74528
  if (!abstractConstraintSchemaItemKey)
74422
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `Unable to locate the abstractConstraint ${relationshipConstraintProps.abstractConstraint}.`);
74529
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, `Unable to locate the abstractConstraint ${relationshipConstraintProps.abstractConstraint}.`);
74423
74530
  this.abstractConstraint = new _DelayedPromise__WEBPACK_IMPORTED_MODULE_0__.DelayedPromiseWithProps(abstractConstraintSchemaItemKey, async () => {
74424
74531
  const tempAbstractConstraint = await relClassSchema.lookupItem(relationshipConstraintProps.abstractConstraint);
74425
74532
  if (undefined === tempAbstractConstraint)
74426
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `Unable to locate the abstractConstraint ${relationshipConstraintProps.abstractConstraint}.`);
74533
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, `Unable to locate the abstractConstraint ${relationshipConstraintProps.abstractConstraint}.`);
74427
74534
  return tempAbstractConstraint;
74428
74535
  });
74429
74536
  }
74430
74537
  const loadEachConstraint = (constraintClassName) => {
74431
74538
  const tempConstraintClass = relClassSchema.lookupItemSync(constraintClassName);
74432
74539
  if (!tempConstraintClass)
74433
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, ``);
74540
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, ``);
74434
74541
  return tempConstraintClass;
74435
74542
  };
74436
74543
  for (const constraintClassName of relationshipConstraintProps.constraintClasses) {
@@ -74454,8 +74561,8 @@ class RelationshipConstraint {
74454
74561
  }
74455
74562
  return false;
74456
74563
  }
74457
- if (ecClass.schemaItemType !== _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaItemType.EntityClass && ecClass.schemaItemType !== _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaItemType.RelationshipClass &&
74458
- ecClass.schemaItemType !== _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaItemType.Mixin) {
74564
+ if (ecClass.schemaItemType !== _ECObjects__WEBPACK_IMPORTED_MODULE_3__.SchemaItemType.EntityClass && ecClass.schemaItemType !== _ECObjects__WEBPACK_IMPORTED_MODULE_3__.SchemaItemType.RelationshipClass &&
74565
+ ecClass.schemaItemType !== _ECObjects__WEBPACK_IMPORTED_MODULE_3__.SchemaItemType.Mixin) {
74459
74566
  return false;
74460
74567
  }
74461
74568
  const abstractConstraint = await this.abstractConstraint;
@@ -74474,14 +74581,14 @@ class RelationshipConstraint {
74474
74581
  * @param isPolymorphic Indicates if the testClass should be checked polymorphically.
74475
74582
  */
74476
74583
  static async classCompatibleWithConstraint(constraintClass, testClass, isPolymorphic) {
74477
- if (_SchemaItem__WEBPACK_IMPORTED_MODULE_7__.SchemaItem.equalByKey(constraintClass, testClass))
74584
+ if (_SchemaItem__WEBPACK_IMPORTED_MODULE_8__.SchemaItem.equalByKey(constraintClass, testClass))
74478
74585
  return true;
74479
74586
  if (isPolymorphic) {
74480
- if (testClass.schemaItemType === _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaItemType.EntityClass || testClass.schemaItemType === _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaItemType.RelationshipClass) {
74587
+ if (testClass.schemaItemType === _ECObjects__WEBPACK_IMPORTED_MODULE_3__.SchemaItemType.EntityClass || testClass.schemaItemType === _ECObjects__WEBPACK_IMPORTED_MODULE_3__.SchemaItemType.RelationshipClass) {
74481
74588
  return testClass.is(constraintClass);
74482
74589
  }
74483
- if (testClass.schemaItemType === _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaItemType.Mixin) {
74484
- if (constraintClass.schemaItemType === _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaItemType.EntityClass)
74590
+ if (testClass.schemaItemType === _ECObjects__WEBPACK_IMPORTED_MODULE_3__.SchemaItemType.Mixin) {
74591
+ if (constraintClass.schemaItemType === _ECObjects__WEBPACK_IMPORTED_MODULE_3__.SchemaItemType.EntityClass)
74485
74592
  return testClass.applicableTo(constraintClass);
74486
74593
  else
74487
74594
  return testClass.is(constraintClass);
@@ -74571,26 +74678,27 @@ __webpack_require__.r(__webpack_exports__);
74571
74678
  /* harmony export */ });
74572
74679
  /* harmony import */ var _Deserialization_Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Deserialization/Helper */ "../../core/ecschema-metadata/lib/esm/Deserialization/Helper.js");
74573
74680
  /* harmony import */ var _Deserialization_JsonParser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Deserialization/JsonParser */ "../../core/ecschema-metadata/lib/esm/Deserialization/JsonParser.js");
74574
- /* harmony import */ var _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Deserialization/XmlSerializationUtils */ "../../core/ecschema-metadata/lib/esm/Deserialization/XmlSerializationUtils.js");
74575
- /* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Exception */ "../../core/ecschema-metadata/lib/esm/Exception.js");
74576
- /* harmony import */ var _SchemaKey__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../SchemaKey */ "../../core/ecschema-metadata/lib/esm/SchemaKey.js");
74577
- /* harmony import */ var _ECName__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ECName */ "../../core/ecschema-metadata/lib/esm/ECName.js");
74578
- /* harmony import */ var _Class__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Class */ "../../core/ecschema-metadata/lib/esm/Metadata/Class.js");
74579
- /* harmony import */ var _Constant__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Constant */ "../../core/ecschema-metadata/lib/esm/Metadata/Constant.js");
74580
- /* harmony import */ var _CustomAttribute__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CustomAttribute */ "../../core/ecschema-metadata/lib/esm/Metadata/CustomAttribute.js");
74581
- /* harmony import */ var _CustomAttributeClass__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CustomAttributeClass */ "../../core/ecschema-metadata/lib/esm/Metadata/CustomAttributeClass.js");
74582
- /* harmony import */ var _EntityClass__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./EntityClass */ "../../core/ecschema-metadata/lib/esm/Metadata/EntityClass.js");
74583
- /* harmony import */ var _Enumeration__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Enumeration */ "../../core/ecschema-metadata/lib/esm/Metadata/Enumeration.js");
74584
- /* harmony import */ var _Format__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Format */ "../../core/ecschema-metadata/lib/esm/Metadata/Format.js");
74585
- /* harmony import */ var _InvertedUnit__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./InvertedUnit */ "../../core/ecschema-metadata/lib/esm/Metadata/InvertedUnit.js");
74586
- /* harmony import */ var _KindOfQuantity__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./KindOfQuantity */ "../../core/ecschema-metadata/lib/esm/Metadata/KindOfQuantity.js");
74587
- /* harmony import */ var _Mixin__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Mixin */ "../../core/ecschema-metadata/lib/esm/Metadata/Mixin.js");
74588
- /* harmony import */ var _Phenomenon__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Phenomenon */ "../../core/ecschema-metadata/lib/esm/Metadata/Phenomenon.js");
74589
- /* harmony import */ var _PropertyCategory__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./PropertyCategory */ "../../core/ecschema-metadata/lib/esm/Metadata/PropertyCategory.js");
74590
- /* harmony import */ var _RelationshipClass__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./RelationshipClass */ "../../core/ecschema-metadata/lib/esm/Metadata/RelationshipClass.js");
74591
- /* harmony import */ var _SchemaItem__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./SchemaItem */ "../../core/ecschema-metadata/lib/esm/Metadata/SchemaItem.js");
74592
- /* harmony import */ var _Unit__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Unit */ "../../core/ecschema-metadata/lib/esm/Metadata/Unit.js");
74593
- /* harmony import */ var _UnitSystem__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./UnitSystem */ "../../core/ecschema-metadata/lib/esm/Metadata/UnitSystem.js");
74681
+ /* harmony import */ var _Deserialization_XmlParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Deserialization/XmlParser */ "../../core/ecschema-metadata/lib/esm/Deserialization/XmlParser.js");
74682
+ /* harmony import */ var _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Deserialization/XmlSerializationUtils */ "../../core/ecschema-metadata/lib/esm/Deserialization/XmlSerializationUtils.js");
74683
+ /* harmony import */ var _Exception__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Exception */ "../../core/ecschema-metadata/lib/esm/Exception.js");
74684
+ /* harmony import */ var _SchemaKey__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../SchemaKey */ "../../core/ecschema-metadata/lib/esm/SchemaKey.js");
74685
+ /* harmony import */ var _ECName__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ECName */ "../../core/ecschema-metadata/lib/esm/ECName.js");
74686
+ /* harmony import */ var _Class__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Class */ "../../core/ecschema-metadata/lib/esm/Metadata/Class.js");
74687
+ /* harmony import */ var _Constant__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Constant */ "../../core/ecschema-metadata/lib/esm/Metadata/Constant.js");
74688
+ /* harmony import */ var _CustomAttribute__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CustomAttribute */ "../../core/ecschema-metadata/lib/esm/Metadata/CustomAttribute.js");
74689
+ /* harmony import */ var _CustomAttributeClass__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./CustomAttributeClass */ "../../core/ecschema-metadata/lib/esm/Metadata/CustomAttributeClass.js");
74690
+ /* harmony import */ var _EntityClass__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./EntityClass */ "../../core/ecschema-metadata/lib/esm/Metadata/EntityClass.js");
74691
+ /* harmony import */ var _Enumeration__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Enumeration */ "../../core/ecschema-metadata/lib/esm/Metadata/Enumeration.js");
74692
+ /* harmony import */ var _Format__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Format */ "../../core/ecschema-metadata/lib/esm/Metadata/Format.js");
74693
+ /* harmony import */ var _InvertedUnit__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./InvertedUnit */ "../../core/ecschema-metadata/lib/esm/Metadata/InvertedUnit.js");
74694
+ /* harmony import */ var _KindOfQuantity__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./KindOfQuantity */ "../../core/ecschema-metadata/lib/esm/Metadata/KindOfQuantity.js");
74695
+ /* harmony import */ var _Mixin__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Mixin */ "../../core/ecschema-metadata/lib/esm/Metadata/Mixin.js");
74696
+ /* harmony import */ var _Phenomenon__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Phenomenon */ "../../core/ecschema-metadata/lib/esm/Metadata/Phenomenon.js");
74697
+ /* harmony import */ var _PropertyCategory__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./PropertyCategory */ "../../core/ecschema-metadata/lib/esm/Metadata/PropertyCategory.js");
74698
+ /* harmony import */ var _RelationshipClass__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./RelationshipClass */ "../../core/ecschema-metadata/lib/esm/Metadata/RelationshipClass.js");
74699
+ /* harmony import */ var _SchemaItem__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./SchemaItem */ "../../core/ecschema-metadata/lib/esm/Metadata/SchemaItem.js");
74700
+ /* harmony import */ var _Unit__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Unit */ "../../core/ecschema-metadata/lib/esm/Metadata/Unit.js");
74701
+ /* harmony import */ var _UnitSystem__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./UnitSystem */ "../../core/ecschema-metadata/lib/esm/Metadata/UnitSystem.js");
74594
74702
  /*---------------------------------------------------------------------------------------------
74595
74703
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
74596
74704
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -74618,6 +74726,7 @@ __webpack_require__.r(__webpack_exports__);
74618
74726
 
74619
74727
 
74620
74728
 
74729
+
74621
74730
 
74622
74731
 
74623
74732
  const SCHEMAURL3_2_JSON = "https://dev.bentley.com/json_schemas/ec/32/ecschema";
@@ -74628,29 +74737,51 @@ const SCHEMAURL3_2_XML = "http://www.bentley.com/schemas/Bentley.ECXML.3.2";
74628
74737
  class Schema {
74629
74738
  /** @internal */
74630
74739
  constructor(context, nameOrKey, alias, readVer, writeVer, minorVer) {
74631
- this._schemaKey = (typeof (nameOrKey) === "string") ? new _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.SchemaKey(nameOrKey, new _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.ECVersion(readVer, writeVer, minorVer)) : nameOrKey;
74740
+ this._schemaKey = (typeof (nameOrKey) === "string") ? new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaKey(nameOrKey, new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.ECVersion(readVer, writeVer, minorVer)) : nameOrKey;
74632
74741
  this._context = context;
74633
74742
  this.references = [];
74634
74743
  this._items = new Map();
74635
- if (alias !== undefined && _ECName__WEBPACK_IMPORTED_MODULE_5__.ECName.validate(alias)) {
74744
+ if (alias !== undefined && _ECName__WEBPACK_IMPORTED_MODULE_6__.ECName.validate(alias)) {
74636
74745
  this._alias = alias;
74637
74746
  }
74638
74747
  else if (nameOrKey !== undefined) {
74639
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `The Schema ${this.name} does not have the required 'alias' attribute.`);
74748
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, `The Schema ${this.name} does not have the required 'alias' attribute.`);
74640
74749
  }
74750
+ this._originalECSpecMajorVersion = Schema.currentECSpecMajorVersion;
74751
+ this._originalECSpecMinorVersion = Schema.currentECSpecMinorVersion;
74641
74752
  }
74642
74753
  get schemaKey() {
74643
74754
  if (undefined === this._schemaKey)
74644
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `The schema '${this.name}' has an invalid SchemaKey.`);
74755
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);
74645
74756
  return this._schemaKey;
74646
74757
  }
74647
- get name() { return this.schemaKey.name; }
74648
- get readVersion() { return this.schemaKey.readVersion; }
74649
- get writeVersion() { return this.schemaKey.writeVersion; }
74650
- get minorVersion() { return this.schemaKey.minorVersion; }
74758
+ get name() {
74759
+ if (this._schemaKey === undefined)
74760
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);
74761
+ return this.schemaKey.name;
74762
+ }
74763
+ get readVersion() {
74764
+ if (this._schemaKey === undefined)
74765
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);
74766
+ return this.schemaKey.readVersion;
74767
+ }
74768
+ get writeVersion() {
74769
+ if (this._schemaKey === undefined)
74770
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);
74771
+ return this.schemaKey.writeVersion;
74772
+ }
74773
+ get minorVersion() {
74774
+ if (this._schemaKey === undefined)
74775
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, `The schema has an invalid or missing SchemaKey.`);
74776
+ return this.schemaKey.minorVersion;
74777
+ }
74778
+ get originalECSpecMajorVersion() { return this._originalECSpecMajorVersion; }
74779
+ get originalECSpecMinorVersion() { return this._originalECSpecMinorVersion; }
74780
+ static get currentECSpecMajorVersion() { return parseInt(Schema._currentECSpecVersion.split(".")[0], 10); }
74781
+ static get currentECSpecMinorVersion() { return parseInt(Schema._currentECSpecVersion.split(".")[1], 10); }
74651
74782
  get alias() {
74652
74783
  if (this._alias === undefined || this._alias === null) {
74653
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `The Schema ${this.name} does not have the required 'alias' attribute.`);
74784
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, `The Schema ${this.name} does not have the required 'alias' attribute.`);
74654
74785
  }
74655
74786
  else {
74656
74787
  return this._alias;
@@ -74670,19 +74801,19 @@ class Schema {
74670
74801
  * @param fullName fully qualified name {Schema name}.{Item Name}
74671
74802
  */
74672
74803
  getSchemaItemKey(fullName) {
74673
- const [schemaName, itemName] = _SchemaItem__WEBPACK_IMPORTED_MODULE_19__.SchemaItem.parseFullName(fullName);
74804
+ const [schemaName, itemName] = _SchemaItem__WEBPACK_IMPORTED_MODULE_20__.SchemaItem.parseFullName(fullName);
74674
74805
  let schemaKey = this.schemaKey;
74675
74806
  if (this.name !== schemaName) {
74676
74807
  const newSchemaRef = this.getReferenceSync(schemaName);
74677
74808
  if (undefined === newSchemaRef)
74678
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `Unable to find the referenced SchemaItem ${itemName}.`);
74809
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, `Unable to find the referenced SchemaItem ${itemName}.`);
74679
74810
  schemaKey = newSchemaRef.schemaKey;
74680
74811
  }
74681
- return new _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.SchemaItemKey(itemName, schemaKey);
74812
+ return new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaItemKey(itemName, schemaKey);
74682
74813
  }
74683
74814
  addItem(item) {
74684
74815
  if (undefined !== this.getItemSync(item.name))
74685
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.DuplicateItem, `The SchemaItem ${item.name} cannot be added to the schema ${this.name} because it already exists`);
74816
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.DuplicateItem, `The SchemaItem ${item.name} cannot be added to the schema ${this.name} because it already exists`);
74686
74817
  this._items.set(item.name.toUpperCase(), item);
74687
74818
  }
74688
74819
  /**
@@ -74700,7 +74831,7 @@ class Schema {
74700
74831
  */
74701
74832
  async deleteClass(name) {
74702
74833
  const schemaItem = await this.getItem(name);
74703
- if (_Class__WEBPACK_IMPORTED_MODULE_6__.ECClass.isECClass(schemaItem)) {
74834
+ if (_Class__WEBPACK_IMPORTED_MODULE_7__.ECClass.isECClass(schemaItem)) {
74704
74835
  this._items.delete(name.toUpperCase());
74705
74836
  }
74706
74837
  }
@@ -74711,7 +74842,7 @@ class Schema {
74711
74842
  */
74712
74843
  deleteClassSync(name) {
74713
74844
  const schemaItem = this.getItemSync(name);
74714
- if (_Class__WEBPACK_IMPORTED_MODULE_6__.ECClass.isECClass(schemaItem))
74845
+ if (_Class__WEBPACK_IMPORTED_MODULE_7__.ECClass.isECClass(schemaItem))
74715
74846
  this._items.delete(name.toUpperCase());
74716
74847
  }
74717
74848
  /**
@@ -74721,7 +74852,7 @@ class Schema {
74721
74852
  */
74722
74853
  async deleteSchemaItem(name) {
74723
74854
  const schemaItem = await this.getItem(name);
74724
- if (_SchemaItem__WEBPACK_IMPORTED_MODULE_19__.SchemaItem.isSchemaItem(schemaItem)) {
74855
+ if (_SchemaItem__WEBPACK_IMPORTED_MODULE_20__.SchemaItem.isSchemaItem(schemaItem)) {
74725
74856
  this._items.delete(name.toUpperCase());
74726
74857
  }
74727
74858
  }
@@ -74732,7 +74863,7 @@ class Schema {
74732
74863
  */
74733
74864
  deleteSchemaItemSync(name) {
74734
74865
  const schemaItem = this.getItemSync(name);
74735
- if (_SchemaItem__WEBPACK_IMPORTED_MODULE_19__.SchemaItem.isSchemaItem(schemaItem))
74866
+ if (_SchemaItem__WEBPACK_IMPORTED_MODULE_20__.SchemaItem.isSchemaItem(schemaItem))
74736
74867
  this._items.delete(name.toUpperCase());
74737
74868
  }
74738
74869
  /**
@@ -74754,27 +74885,27 @@ class Schema {
74754
74885
  * @param modifier
74755
74886
  */
74756
74887
  async createEntityClass(name, modifier) {
74757
- return this.createClass(_EntityClass__WEBPACK_IMPORTED_MODULE_10__.EntityClass, name, modifier);
74888
+ return this.createClass(_EntityClass__WEBPACK_IMPORTED_MODULE_11__.EntityClass, name, modifier);
74758
74889
  }
74759
74890
  createEntityClassSync(name, modifier) {
74760
- return this.createClass(_EntityClass__WEBPACK_IMPORTED_MODULE_10__.EntityClass, name, modifier);
74891
+ return this.createClass(_EntityClass__WEBPACK_IMPORTED_MODULE_11__.EntityClass, name, modifier);
74761
74892
  }
74762
74893
  /**
74763
74894
  * Creates a Mixin with the provided name in this schema.
74764
74895
  * @param name
74765
74896
  */
74766
- async createMixinClass(name) { return this.createClass(_Mixin__WEBPACK_IMPORTED_MODULE_15__.Mixin, name); }
74767
- createMixinClassSync(name) { return this.createClass(_Mixin__WEBPACK_IMPORTED_MODULE_15__.Mixin, name); }
74897
+ async createMixinClass(name) { return this.createClass(_Mixin__WEBPACK_IMPORTED_MODULE_16__.Mixin, name); }
74898
+ createMixinClassSync(name) { return this.createClass(_Mixin__WEBPACK_IMPORTED_MODULE_16__.Mixin, name); }
74768
74899
  /**
74769
74900
  * Creates a StructClass with the provided name in this schema.
74770
74901
  * @param name
74771
74902
  * @param modifier
74772
74903
  */
74773
74904
  async createStructClass(name, modifier) {
74774
- return this.createClass(_Class__WEBPACK_IMPORTED_MODULE_6__.StructClass, name, modifier);
74905
+ return this.createClass(_Class__WEBPACK_IMPORTED_MODULE_7__.StructClass, name, modifier);
74775
74906
  }
74776
74907
  createStructClassSync(name, modifier) {
74777
- return this.createClass(_Class__WEBPACK_IMPORTED_MODULE_6__.StructClass, name, modifier);
74908
+ return this.createClass(_Class__WEBPACK_IMPORTED_MODULE_7__.StructClass, name, modifier);
74778
74909
  }
74779
74910
  /**
74780
74911
  * Creates a CustomAttributeClass with the provided name in this schema.
@@ -74782,10 +74913,10 @@ class Schema {
74782
74913
  * @param modifier
74783
74914
  */
74784
74915
  async createCustomAttributeClass(name, modifier) {
74785
- return this.createClass(_CustomAttributeClass__WEBPACK_IMPORTED_MODULE_9__.CustomAttributeClass, name, modifier);
74916
+ return this.createClass(_CustomAttributeClass__WEBPACK_IMPORTED_MODULE_10__.CustomAttributeClass, name, modifier);
74786
74917
  }
74787
74918
  createCustomAttributeClassSync(name, modifier) {
74788
- return this.createClass(_CustomAttributeClass__WEBPACK_IMPORTED_MODULE_9__.CustomAttributeClass, name, modifier);
74919
+ return this.createClass(_CustomAttributeClass__WEBPACK_IMPORTED_MODULE_10__.CustomAttributeClass, name, modifier);
74789
74920
  }
74790
74921
  /**
74791
74922
  * Creates a RelationshipClass with the provided name in this schema.
@@ -74796,7 +74927,7 @@ class Schema {
74796
74927
  return this.createRelationshipClassSync(name, modifier);
74797
74928
  }
74798
74929
  createRelationshipClassSync(name, modifier) {
74799
- return this.createClass(_RelationshipClass__WEBPACK_IMPORTED_MODULE_18__.RelationshipClass, name, modifier);
74930
+ return this.createClass(_RelationshipClass__WEBPACK_IMPORTED_MODULE_19__.RelationshipClass, name, modifier);
74800
74931
  }
74801
74932
  /**
74802
74933
  * Creates an Enumeration with the provided name in this schema.
@@ -74806,7 +74937,7 @@ class Schema {
74806
74937
  return this.createEnumerationSync(name, primitiveType);
74807
74938
  }
74808
74939
  createEnumerationSync(name, primitiveType) {
74809
- const item = new _Enumeration__WEBPACK_IMPORTED_MODULE_11__.Enumeration(this, name, primitiveType);
74940
+ const item = new _Enumeration__WEBPACK_IMPORTED_MODULE_12__.Enumeration(this, name, primitiveType);
74810
74941
  this.addItem(item);
74811
74942
  return item;
74812
74943
  }
@@ -74818,77 +74949,77 @@ class Schema {
74818
74949
  return this.createKindOfQuantitySync(name);
74819
74950
  }
74820
74951
  createKindOfQuantitySync(name) {
74821
- return this.createItem(_KindOfQuantity__WEBPACK_IMPORTED_MODULE_14__.KindOfQuantity, name);
74952
+ return this.createItem(_KindOfQuantity__WEBPACK_IMPORTED_MODULE_15__.KindOfQuantity, name);
74822
74953
  }
74823
74954
  /**
74824
74955
  * Creates a Constant with the provided name in this schema.
74825
74956
  * @param name
74826
74957
  */
74827
74958
  async createConstant(name) {
74828
- return this.createItem(_Constant__WEBPACK_IMPORTED_MODULE_7__.Constant, name);
74959
+ return this.createItem(_Constant__WEBPACK_IMPORTED_MODULE_8__.Constant, name);
74829
74960
  }
74830
74961
  createConstantSync(name) {
74831
- return this.createItem(_Constant__WEBPACK_IMPORTED_MODULE_7__.Constant, name);
74962
+ return this.createItem(_Constant__WEBPACK_IMPORTED_MODULE_8__.Constant, name);
74832
74963
  }
74833
74964
  /**
74834
74965
  * Creates a Inverted Unit with the provided name in this schema.
74835
74966
  * @param name
74836
74967
  */
74837
74968
  async createInvertedUnit(name) {
74838
- return this.createItem(_InvertedUnit__WEBPACK_IMPORTED_MODULE_13__.InvertedUnit, name);
74969
+ return this.createItem(_InvertedUnit__WEBPACK_IMPORTED_MODULE_14__.InvertedUnit, name);
74839
74970
  }
74840
74971
  createInvertedUnitSync(name) {
74841
- return this.createItem(_InvertedUnit__WEBPACK_IMPORTED_MODULE_13__.InvertedUnit, name);
74972
+ return this.createItem(_InvertedUnit__WEBPACK_IMPORTED_MODULE_14__.InvertedUnit, name);
74842
74973
  }
74843
74974
  /**
74844
74975
  * Creates an Format with the provided name in this schema.
74845
74976
  * @param name
74846
74977
  */
74847
74978
  async createFormat(name) {
74848
- return this.createItem(_Format__WEBPACK_IMPORTED_MODULE_12__.Format, name);
74979
+ return this.createItem(_Format__WEBPACK_IMPORTED_MODULE_13__.Format, name);
74849
74980
  }
74850
74981
  createFormatSync(name) {
74851
- return this.createItem(_Format__WEBPACK_IMPORTED_MODULE_12__.Format, name);
74982
+ return this.createItem(_Format__WEBPACK_IMPORTED_MODULE_13__.Format, name);
74852
74983
  }
74853
74984
  /**
74854
74985
  * Creates a UnitSystem with the provided name in this schema.
74855
74986
  * @param name
74856
74987
  */
74857
74988
  async createUnitSystem(name) {
74858
- return this.createItem(_UnitSystem__WEBPACK_IMPORTED_MODULE_21__.UnitSystem, name);
74989
+ return this.createItem(_UnitSystem__WEBPACK_IMPORTED_MODULE_22__.UnitSystem, name);
74859
74990
  }
74860
74991
  createUnitSystemSync(name) {
74861
- return this.createItem(_UnitSystem__WEBPACK_IMPORTED_MODULE_21__.UnitSystem, name);
74992
+ return this.createItem(_UnitSystem__WEBPACK_IMPORTED_MODULE_22__.UnitSystem, name);
74862
74993
  }
74863
74994
  /**
74864
74995
  * Creates a Phenomenon with the provided name in this schema.
74865
74996
  * @param name
74866
74997
  */
74867
74998
  async createPhenomenon(name) {
74868
- return this.createItem(_Phenomenon__WEBPACK_IMPORTED_MODULE_16__.Phenomenon, name);
74999
+ return this.createItem(_Phenomenon__WEBPACK_IMPORTED_MODULE_17__.Phenomenon, name);
74869
75000
  }
74870
75001
  createPhenomenonSync(name) {
74871
- return this.createItem(_Phenomenon__WEBPACK_IMPORTED_MODULE_16__.Phenomenon, name);
75002
+ return this.createItem(_Phenomenon__WEBPACK_IMPORTED_MODULE_17__.Phenomenon, name);
74872
75003
  }
74873
75004
  /**
74874
75005
  * Creates a Unit with the provided name in this schema.
74875
75006
  * @param name
74876
75007
  */
74877
75008
  async createUnit(name) {
74878
- return this.createItem(_Unit__WEBPACK_IMPORTED_MODULE_20__.Unit, name);
75009
+ return this.createItem(_Unit__WEBPACK_IMPORTED_MODULE_21__.Unit, name);
74879
75010
  }
74880
75011
  createUnitSync(name) {
74881
- return this.createItem(_Unit__WEBPACK_IMPORTED_MODULE_20__.Unit, name);
75012
+ return this.createItem(_Unit__WEBPACK_IMPORTED_MODULE_21__.Unit, name);
74882
75013
  }
74883
75014
  /**
74884
75015
  * Creates an PropertyCategory with the provided name in this schema.
74885
75016
  * @param name
74886
75017
  */
74887
75018
  async createPropertyCategory(name) {
74888
- return this.createItem(_PropertyCategory__WEBPACK_IMPORTED_MODULE_17__.PropertyCategory, name);
75019
+ return this.createItem(_PropertyCategory__WEBPACK_IMPORTED_MODULE_18__.PropertyCategory, name);
74889
75020
  }
74890
75021
  createPropertyCategorySync(name) {
74891
- return this.createItem(_PropertyCategory__WEBPACK_IMPORTED_MODULE_17__.PropertyCategory, name);
75022
+ return this.createItem(_PropertyCategory__WEBPACK_IMPORTED_MODULE_18__.PropertyCategory, name);
74892
75023
  }
74893
75024
  /**
74894
75025
  *
@@ -74915,9 +75046,9 @@ class Schema {
74915
75046
  */
74916
75047
  setVersion(readVersion, writeVersion, minorVersion) {
74917
75048
  if (!this._schemaKey)
74918
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidSchemaKey, `The schema '${this.name}' has an invalid SchemaKey.`);
74919
- const newVersion = new _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.ECVersion(readVersion ?? this._schemaKey.readVersion, writeVersion ?? this._schemaKey.writeVersion, minorVersion ?? this._schemaKey.minorVersion);
74920
- this._schemaKey = new _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.SchemaKey(this._schemaKey.name, newVersion);
75049
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidSchemaKey, `The schema '${this.name}' has an invalid SchemaKey.`);
75050
+ const newVersion = new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.ECVersion(readVersion ?? this._schemaKey.readVersion, writeVersion ?? this._schemaKey.writeVersion, minorVersion ?? this._schemaKey.minorVersion);
75051
+ this._schemaKey = new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaKey(this._schemaKey.name, newVersion);
74921
75052
  }
74922
75053
  /**
74923
75054
  * Gets an item from within this schema. To get by full name use lookupItem instead.
@@ -74942,7 +75073,7 @@ class Schema {
74942
75073
  async lookupItem(key) {
74943
75074
  let schemaName, itemName;
74944
75075
  if (typeof (key) === "string") {
74945
- [schemaName, itemName] = _SchemaItem__WEBPACK_IMPORTED_MODULE_19__.SchemaItem.parseFullName(key);
75076
+ [schemaName, itemName] = _SchemaItem__WEBPACK_IMPORTED_MODULE_20__.SchemaItem.parseFullName(key);
74946
75077
  }
74947
75078
  else {
74948
75079
  itemName = key.name;
@@ -74963,7 +75094,7 @@ class Schema {
74963
75094
  lookupItemSync(key) {
74964
75095
  let schemaName, itemName;
74965
75096
  if (typeof (key) === "string") {
74966
- [schemaName, itemName] = _SchemaItem__WEBPACK_IMPORTED_MODULE_19__.SchemaItem.parseFullName(key);
75097
+ [schemaName, itemName] = _SchemaItem__WEBPACK_IMPORTED_MODULE_20__.SchemaItem.parseFullName(key);
74967
75098
  }
74968
75099
  else {
74969
75100
  itemName = key.name;
@@ -74984,7 +75115,7 @@ class Schema {
74984
75115
  }
74985
75116
  *getClasses() {
74986
75117
  for (const [, value] of this._items) {
74987
- if (_Class__WEBPACK_IMPORTED_MODULE_6__.ECClass.isECClass(value))
75118
+ if (_Class__WEBPACK_IMPORTED_MODULE_7__.ECClass.isECClass(value))
74988
75119
  yield value;
74989
75120
  }
74990
75121
  }
@@ -75008,6 +75139,8 @@ class Schema {
75008
75139
  * Save this Schema's properties to an object for serializing to JSON.
75009
75140
  */
75010
75141
  toJSON() {
75142
+ if (!this.isECSpecVersionSupported())
75143
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.NewerECSpecVersion, `The Schema '${this.name}' has an unsupported ECSpecVersion and cannot be serialized.`);
75011
75144
  const schemaJson = {};
75012
75145
  schemaJson.$schema = SCHEMAURL3_2_JSON; // $schema is required
75013
75146
  schemaJson.name = this.name; // name is required
@@ -75019,7 +75152,7 @@ class Schema {
75019
75152
  schemaJson.description = this.description;
75020
75153
  if (undefined !== this.references && this.references.length > 0) // references is optional
75021
75154
  schemaJson.references = this.references.map(({ name, schemaKey }) => ({ name, version: schemaKey.version.toString() }));
75022
- const customAttributes = (0,_CustomAttribute__WEBPACK_IMPORTED_MODULE_8__.serializeCustomAttributes)(this.customAttributes);
75155
+ const customAttributes = (0,_CustomAttribute__WEBPACK_IMPORTED_MODULE_9__.serializeCustomAttributes)(this.customAttributes);
75023
75156
  if (undefined !== customAttributes)
75024
75157
  schemaJson.customAttributes = customAttributes;
75025
75158
  if (this._items.size > 0) {
@@ -75035,6 +75168,8 @@ class Schema {
75035
75168
  * @param schemaXml An empty DOM document to which the schema will be written
75036
75169
  */
75037
75170
  async toXml(schemaXml) {
75171
+ if (!this.isECSpecVersionSupported())
75172
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.NewerECSpecVersion, `The Schema '${this.name}' has an unsupported ECSpecVersion and cannot be serialized.`);
75038
75173
  const schemaMetadata = schemaXml.createElement("ECSchema");
75039
75174
  schemaMetadata.setAttribute("xmlns", SCHEMAURL3_2_XML);
75040
75175
  schemaMetadata.setAttribute("version", this.schemaKey.version.toString());
@@ -75057,7 +75192,7 @@ class Schema {
75057
75192
  if (this._customAttributes) {
75058
75193
  const parentElem = schemaXml.createElement("ECCustomAttributes");
75059
75194
  for (const [name, attribute] of this._customAttributes) {
75060
- const caElem = await _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_2__.XmlSerializationUtils.writeCustomAttribute(name, attribute, schemaXml, this);
75195
+ const caElem = await _Deserialization_XmlSerializationUtils__WEBPACK_IMPORTED_MODULE_3__.XmlSerializationUtils.writeCustomAttribute(name, attribute, schemaXml, this);
75061
75196
  parentElem.appendChild(caElem);
75062
75197
  }
75063
75198
  schemaMetadata.appendChild(parentElem);
@@ -75069,28 +75204,67 @@ class Schema {
75069
75204
  schemaXml.appendChild(schemaMetadata);
75070
75205
  return schemaXml;
75071
75206
  }
75207
+ // Check if the ECSpecVersion read-version is greater than the current ECSpecVersion supported.
75208
+ // If a specific ECSpecVersion is given, check against that version.
75209
+ // If no argument is given, check against the original ECSpecVersion of the schema.
75210
+ isECSpecMajorVersionSupported(ecSpecMajorVersionToCheck) {
75211
+ // If argument is supplied, check the argument against the current ECSpecVersion supported
75212
+ if (ecSpecMajorVersionToCheck !== undefined)
75213
+ return (Schema.currentECSpecMajorVersion >= ecSpecMajorVersionToCheck);
75214
+ // If argument is not supplied, check against the original ECSpecVersion of the schema
75215
+ if (this.originalECSpecMajorVersion === undefined)
75216
+ return false;
75217
+ return (Schema.currentECSpecMajorVersion >= this.originalECSpecMajorVersion);
75218
+ }
75219
+ // Check if the full ECSpecVersion is greater than the current ECSpecVersion supported.
75220
+ // If a specific ECSpecVersion is given, check against that version.
75221
+ // If no argument is given, check against the original ECSpecVersion of the schema.
75222
+ isECSpecVersionSupported(ecSpecMajorVersionToCheck, ecSpecMinorVersionToCheck) {
75223
+ // If arguments are supplied, check the arguments against the current ECSpecVersion supported
75224
+ if (ecSpecMajorVersionToCheck !== undefined && ecSpecMinorVersionToCheck !== undefined) {
75225
+ if (!this.isECSpecMajorVersionSupported(ecSpecMajorVersionToCheck))
75226
+ return false;
75227
+ return (Schema.currentECSpecMinorVersion >= ecSpecMinorVersionToCheck);
75228
+ }
75229
+ // If arguments are not supplied, check against the original ECSpecVersion of the schema
75230
+ if (!this.isECSpecMajorVersionSupported() || this.originalECSpecMinorVersion === undefined)
75231
+ return false;
75232
+ return (Schema.currentECSpecMinorVersion >= this.originalECSpecMinorVersion);
75233
+ }
75072
75234
  /**
75073
75235
  * Loads the schema header (name, version alias, label and description) from the input SchemaProps
75074
75236
  */
75075
75237
  fromJSONSync(schemaProps) {
75076
75238
  if (undefined === this._schemaKey) {
75077
75239
  const schemaName = schemaProps.name;
75078
- const version = _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.ECVersion.fromString(schemaProps.version);
75079
- this._schemaKey = new _SchemaKey__WEBPACK_IMPORTED_MODULE_4__.SchemaKey(schemaName, version);
75240
+ const version = _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.ECVersion.fromString(schemaProps.version);
75241
+ this._schemaKey = new _SchemaKey__WEBPACK_IMPORTED_MODULE_5__.SchemaKey(schemaName, version);
75080
75242
  }
75081
75243
  else {
75082
75244
  if (schemaProps.name.toLowerCase() !== this.name.toLowerCase())
75083
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `The Schema ${this.name} does not match the provided name, '${schemaProps.name}'.`);
75084
- if (this.schemaKey.version.compare(_SchemaKey__WEBPACK_IMPORTED_MODULE_4__.ECVersion.fromString(schemaProps.version)))
75085
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `The Schema ${this.name} has the version '${this.schemaKey.version}' that does not match the provided version '${schemaProps.version}'.`);
75245
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, `The Schema ${this.name} does not match the provided name, '${schemaProps.name}'.`);
75246
+ if (this.schemaKey.version.compare(_SchemaKey__WEBPACK_IMPORTED_MODULE_5__.ECVersion.fromString(schemaProps.version)))
75247
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, `The Schema ${this.name} has the version '${this.schemaKey.version}' that does not match the provided version '${schemaProps.version}'.`);
75248
+ }
75249
+ if (schemaProps.$schema.match(`https://dev\\.bentley\\.com/json_schemas/ec/([0-9]+)/ecschema`) == null && schemaProps.$schema.match(`http://www\\.bentley\\.com/schemas/Bentley\\.ECXML\\.([0-9]+)`) == null)
75250
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.MissingSchemaUrl, `The Schema '${this.name}' has an unsupported namespace '${schemaProps.$schema}'.`);
75251
+ // The schema props have not been parsed. Parse the ECXml version from the $schema attribute
75252
+ let ecVersion;
75253
+ if (schemaProps.ecSpecMajorVersion === undefined || schemaProps.ecSpecMinorVersion === undefined) {
75254
+ ecVersion = ((schemaProps.$schema.search("ECXML") !== -1) ? _Deserialization_XmlParser__WEBPACK_IMPORTED_MODULE_2__.XmlParser.parseXmlNamespace(schemaProps.$schema) : _Deserialization_JsonParser__WEBPACK_IMPORTED_MODULE_1__.JsonParser.parseJSUri(schemaProps.$schema));
75086
75255
  }
75087
- if (SCHEMAURL3_2_JSON !== schemaProps.$schema && SCHEMAURL3_2_XML !== schemaProps.$schema) // TODO: Allow for 3.x URI versions to allow the API to read newer specs. (Start at 3.2 though)
75088
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.MissingSchemaUrl, `The Schema ${this.name} has an unsupported namespace '${schemaProps.$schema}'.`);
75089
- if (_ECName__WEBPACK_IMPORTED_MODULE_5__.ECName.validate(schemaProps.alias)) {
75256
+ else {
75257
+ ecVersion = { readVersion: schemaProps.ecSpecMajorVersion, writeVersion: schemaProps.ecSpecMinorVersion };
75258
+ }
75259
+ this._originalECSpecMajorVersion = ecVersion?.readVersion;
75260
+ this._originalECSpecMinorVersion = ecVersion?.writeVersion;
75261
+ if (!this.isECSpecMajorVersionSupported(ecVersion?.readVersion))
75262
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.NewerECSpecVersion, `The Schema '${this.name}' has an unsupported ECVersion and cannot be loaded.`);
75263
+ if (_ECName__WEBPACK_IMPORTED_MODULE_6__.ECName.validate(schemaProps.alias)) {
75090
75264
  this._alias = schemaProps.alias;
75091
75265
  }
75092
75266
  else {
75093
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECJson, `The Schema ${schemaProps.name} does not have the required 'alias' attribute.`);
75267
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECJson, `The Schema ${schemaProps.name} does not have the required 'alias' attribute.`);
75094
75268
  }
75095
75269
  if (undefined !== schemaProps.label)
75096
75270
  this._label = schemaProps.label;
@@ -75156,12 +75330,13 @@ class Schema {
75156
75330
  * Used for schema editing.
75157
75331
  */
75158
75332
  setAlias(alias) {
75159
- if (!_ECName__WEBPACK_IMPORTED_MODULE_5__.ECName.validate(alias)) {
75160
- throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECObjectsStatus.InvalidECName, "The specified schema alias is invalid.");
75333
+ if (!_ECName__WEBPACK_IMPORTED_MODULE_6__.ECName.validate(alias)) {
75334
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECObjectsStatus.InvalidECName, "The specified schema alias is invalid.");
75161
75335
  }
75162
75336
  this._alias = alias;
75163
75337
  }
75164
75338
  }
75339
+ Schema._currentECSpecVersion = "3.2";
75165
75340
  /**
75166
75341
  * Hackish approach that works like a "friend class" so we can access protected members without making them public.
75167
75342
  * We cannot put this into Helper.ts and make it non-export, because we are importing Helper.ts from this file, and the circular import
@@ -82788,7 +82963,6 @@ class BriefcaseEditorToolSettings {
82788
82963
  * @public
82789
82964
  */
82790
82965
  class BriefcaseConnection extends _IModelConnection__WEBPACK_IMPORTED_MODULE_5__.IModelConnection {
82791
- /** @internal */
82792
82966
  isBriefcaseConnection() { return true; }
82793
82967
  /** The Guid that identifies the iTwin that owns this iModel. */
82794
82968
  get iTwinId() { return super.iTwinId; } // GuidString | undefined for IModelConnection, but required for BriefcaseConnection
@@ -85000,7 +85174,6 @@ class DrawingViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_14__.ViewStat
85000
85174
  super.detachFromViewport();
85001
85175
  this._attachment = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.dispose)(this._attachment);
85002
85176
  }
85003
- /** @internal */
85004
85177
  async changeViewedModel(modelId) {
85005
85178
  await super.changeViewedModel(modelId);
85006
85179
  const props = await this.querySectionDrawingProps();
@@ -85075,7 +85248,6 @@ class DrawingViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_14__.ViewStat
85075
85248
  max: 3 * _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Constant.diameterOfEarth,
85076
85249
  };
85077
85250
  }
85078
- /** @internal */
85079
85251
  isDrawingView() { return true; }
85080
85252
  /** See [[ViewState.getOrigin]]. */
85081
85253
  getOrigin() {
@@ -85104,7 +85276,6 @@ class DrawingViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_14__.ViewStat
85104
85276
  if (this._attachment)
85105
85277
  this._attachment.addToScene(context);
85106
85278
  }
85107
- /** @internal */
85108
85279
  get areAllTileTreesLoaded() {
85109
85280
  return super.areAllTileTreesLoaded && (!this._attachment || this._attachment.view.areAllTileTreesLoaded);
85110
85281
  }
@@ -91106,11 +91277,9 @@ class GeometricModelState extends ModelState {
91106
91277
  super(props, iModel, state);
91107
91278
  this.geometryGuid = props.geometryGuid;
91108
91279
  }
91109
- /** @internal */
91110
91280
  get asGeometricModel() { return this; }
91111
91281
  /** Returns true if this is a 2d model (a [[GeometricModel2dState]]). */
91112
91282
  get is2d() { return !this.is3d; }
91113
- /** @internal */
91114
91283
  get isGeometricModel() { return true; }
91115
91284
  /** @internal */
91116
91285
  get treeModelId() { return this.id; }
@@ -91205,9 +91374,7 @@ class GeometricModel2dState extends GeometricModelState {
91205
91374
  super(props, iModel, state);
91206
91375
  this.globalOrigin = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point2d.fromJSON(props.globalOrigin);
91207
91376
  }
91208
- /** @internal */
91209
91377
  get is3d() { return false; }
91210
- /** @internal */
91211
91378
  get asGeometricModel2d() { return this; }
91212
91379
  toJSON() {
91213
91380
  const val = super.toJSON();
@@ -91226,7 +91393,6 @@ class GeometricModel3dState extends GeometricModelState {
91226
91393
  this.isNotSpatiallyLocated = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asBool(props.isNotSpatiallyLocated);
91227
91394
  this.isPlanProjection = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asBool(props.isPlanProjection);
91228
91395
  }
91229
- /** @internal */
91230
91396
  toJSON() {
91231
91397
  const val = super.toJSON();
91232
91398
  if (this.isNotSpatiallyLocated)
@@ -91235,9 +91401,7 @@ class GeometricModel3dState extends GeometricModelState {
91235
91401
  val.isPlanProjection = true;
91236
91402
  return val;
91237
91403
  }
91238
- /** @internal */
91239
91404
  get is3d() { return true; }
91240
- /** @internal */
91241
91405
  get asGeometricModel3d() { return this; }
91242
91406
  /** If true, then the elements in this GeometricModel3dState are in real-world coordinates and will be in the spatial index. */
91243
91407
  get isSpatiallyLocated() { return !this.isNotSpatiallyLocated; }
@@ -91255,7 +91419,6 @@ class SheetModelState extends GeometricModel2dState {
91255
91419
  */
91256
91420
  class SpatialModelState extends GeometricModel3dState {
91257
91421
  static get className() { return "SpatialModel"; }
91258
- /** @internal */
91259
91422
  get asSpatialModel() { return this; }
91260
91423
  constructor(props, iModel, state) {
91261
91424
  super(props, iModel, state);
@@ -93807,9 +93970,7 @@ class SheetViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_12__.ViewState2
93807
93970
  get attachments() {
93808
93971
  return this._attachments?.attachments;
93809
93972
  }
93810
- /** @internal */
93811
93973
  isDrawingView() { return false; }
93812
- /** @internal */
93813
93974
  isSheetView() { return true; }
93814
93975
  constructor(props, iModel, categories, displayStyle, sheetProps, attachments) {
93815
93976
  super(props, iModel, categories, displayStyle);
@@ -93852,11 +94013,9 @@ class SheetViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_12__.ViewState2
93852
94013
  if (this._attachments)
93853
94014
  this._attachments.collectStatistics(stats);
93854
94015
  }
93855
- /** @internal */
93856
94016
  get defaultExtentLimits() {
93857
94017
  return { min: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Constant.oneMillimeter, max: this.sheetSize.magnitude() * 10 };
93858
94018
  }
93859
- /** @internal */
93860
94019
  getViewedExtents() {
93861
94020
  return this._viewedExtents;
93862
94021
  }
@@ -93902,7 +94061,6 @@ class SheetViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_12__.ViewState2
93902
94061
  ids.push(row[0]);
93903
94062
  return ids;
93904
94063
  }
93905
- /** @internal */
93906
94064
  async changeViewedModel(modelId) {
93907
94065
  await super.changeViewedModel(modelId);
93908
94066
  const attachmentIds = await this.queryAttachmentIds();
@@ -93920,7 +94078,6 @@ class SheetViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_12__.ViewState2
93920
94078
  super.detachFromViewport();
93921
94079
  this._attachments = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.dispose)(this._attachments);
93922
94080
  }
93923
- /** @internal */
93924
94081
  get areAllTileTreesLoaded() {
93925
94082
  return super.areAllTileTreesLoaded && (!this._attachments || this._attachments.areAllTileTreesLoaded);
93926
94083
  }
@@ -94535,7 +94692,6 @@ class SpatialViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_6__.ViewState
94535
94692
  this._modelSelector = arg3.modelSelector.clone();
94536
94693
  this._treeRefs = _tile_internal__WEBPACK_IMPORTED_MODULE_7__.SpatialTileTreeReferences.create(this);
94537
94694
  }
94538
- /** @internal */
94539
94695
  isSpatialView() { return true; }
94540
94696
  equals(other) { return super.equals(other) && this.modelSelector.equals(other.modelSelector); }
94541
94697
  createAuxCoordSystem(acsName) { return _AuxCoordSys__WEBPACK_IMPORTED_MODULE_2__.AuxCoordSystemSpatialState.createNew(acsName, this.iModel); }
@@ -296443,18 +296599,18 @@ class Settings {
296443
296599
  }
296444
296600
  }
296445
296601
  toString() {
296446
- return `Configurations:
296447
- backend location: ${this.Backend.location},
296448
- backend name: ${this.Backend.name},
296449
- backend version: ${this.Backend.version},
296450
- oidc client id: ${this.oidcClientId},
296451
- oidc scopes: ${this.oidcScopes},
296452
- applicationId: ${this.gprid},
296453
- log level: ${this.logLevel},
296454
- testing iModelTileRpcTests: ${this.runiModelTileRpcTests},
296455
- testing PresentationRpcTest: ${this.runPresentationRpcTests},
296456
- testing iModelReadRpcTests: ${this.runiModelReadRpcTests},
296457
- testing DevToolsRpcTests: ${this.runDevToolsRpcTests},
296602
+ return `Configurations:
296603
+ backend location: ${this.Backend.location},
296604
+ backend name: ${this.Backend.name},
296605
+ backend version: ${this.Backend.version},
296606
+ oidc client id: ${this.oidcClientId},
296607
+ oidc scopes: ${this.oidcScopes},
296608
+ applicationId: ${this.gprid},
296609
+ log level: ${this.logLevel},
296610
+ testing iModelTileRpcTests: ${this.runiModelTileRpcTests},
296611
+ testing PresentationRpcTest: ${this.runPresentationRpcTests},
296612
+ testing iModelReadRpcTests: ${this.runiModelReadRpcTests},
296613
+ testing DevToolsRpcTests: ${this.runDevToolsRpcTests},
296458
296614
  testing iModelWriteRpcTests: ${this.runiModelWriteRpcTests}`;
296459
296615
  }
296460
296616
  }
@@ -296657,7 +296813,7 @@ class TestContext {
296657
296813
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
296658
296814
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
296659
296815
  await core_frontend_1.NoRenderApp.startup({
296660
- applicationVersion: "4.10.0-dev.37",
296816
+ applicationVersion: "4.10.0-dev.38",
296661
296817
  applicationId: this.settings.gprid,
296662
296818
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
296663
296819
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -305098,13 +305254,13 @@ class FavoritePropertiesManager {
305098
305254
  if (missingClasses.size === 0) {
305099
305255
  return baseClasses;
305100
305256
  }
305101
- const query = `
305102
- SELECT (derivedSchema.Name || ':' || derivedClass.Name) AS "ClassFullName", (baseSchema.Name || ':' || baseClass.Name) AS "BaseClassFullName"
305103
- FROM ECDbMeta.ClassHasAllBaseClasses baseClassRels
305104
- INNER JOIN ECDbMeta.ECClassDef derivedClass ON derivedClass.ECInstanceId = baseClassRels.SourceECInstanceId
305105
- INNER JOIN ECDbMeta.ECSchemaDef derivedSchema ON derivedSchema.ECInstanceId = derivedClass.Schema.Id
305106
- INNER JOIN ECDbMeta.ECClassDef baseClass ON baseClass.ECInstanceId = baseClassRels.TargetECInstanceId
305107
- INNER JOIN ECDbMeta.ECSchemaDef baseSchema ON baseSchema.ECInstanceId = baseClass.Schema.Id
305257
+ const query = `
305258
+ SELECT (derivedSchema.Name || ':' || derivedClass.Name) AS "ClassFullName", (baseSchema.Name || ':' || baseClass.Name) AS "BaseClassFullName"
305259
+ FROM ECDbMeta.ClassHasAllBaseClasses baseClassRels
305260
+ INNER JOIN ECDbMeta.ECClassDef derivedClass ON derivedClass.ECInstanceId = baseClassRels.SourceECInstanceId
305261
+ INNER JOIN ECDbMeta.ECSchemaDef derivedSchema ON derivedSchema.ECInstanceId = derivedClass.Schema.Id
305262
+ INNER JOIN ECDbMeta.ECClassDef baseClass ON baseClass.ECInstanceId = baseClassRels.TargetECInstanceId
305263
+ INNER JOIN ECDbMeta.ECSchemaDef baseSchema ON baseSchema.ECInstanceId = baseClass.Schema.Id
305108
305264
  WHERE (derivedSchema.Name || ':' || derivedClass.Name) IN (${[...missingClasses].map((className) => `'${className}'`).join(",")})`;
305109
305265
  const reader = imodel.createQueryReader(query, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames });
305110
305266
  while (await reader.step()) {
@@ -321520,7 +321676,7 @@ function __disposeResources(env) {
321520
321676
  /***/ ((module) => {
321521
321677
 
321522
321678
  "use strict";
321523
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.10.0-dev.37","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run --coverage","test:debug":"vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.10.0-dev.37","@itwin/core-bentley":"workspace:^4.10.0-dev.37","@itwin/core-common":"workspace:^4.10.0-dev.37","@itwin/core-geometry":"workspace:^4.10.0-dev.37","@itwin/core-orbitgt":"workspace:^4.10.0-dev.37","@itwin/core-quantity":"workspace:^4.10.0-dev.37"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^2.1.0","@vitest/coverage-v8":"^2.1.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","cpx2":"^3.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^3.0.2","source-map-loader":"^4.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^2.1.0","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"1.0.6","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.2.5","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"}}');
321679
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.10.0-dev.38","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run --coverage","test:debug":"vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.10.0-dev.38","@itwin/core-bentley":"workspace:^4.10.0-dev.38","@itwin/core-common":"workspace:^4.10.0-dev.38","@itwin/core-geometry":"workspace:^4.10.0-dev.38","@itwin/core-orbitgt":"workspace:^4.10.0-dev.38","@itwin/core-quantity":"workspace:^4.10.0-dev.38"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^2.1.0","@vitest/coverage-v8":"^2.1.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","cpx2":"^3.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^3.0.2","source-map-loader":"^4.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^2.1.0","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"1.0.6","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.2.5","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"}}');
321524
321680
 
321525
321681
  /***/ }),
321526
321682