@itwin/ecschema-metadata 5.1.2 → 5.1.3-experimental.1

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.
Files changed (126) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/lib/cjs/Constants.js.map +1 -1
  3. package/lib/cjs/Context.js.map +1 -1
  4. package/lib/cjs/DelayedPromise.js.map +1 -1
  5. package/lib/cjs/Deserialization/AbstractParser.js.map +1 -1
  6. package/lib/cjs/Deserialization/Helper.js.map +1 -1
  7. package/lib/cjs/Deserialization/JsonParser.js.map +1 -1
  8. package/lib/cjs/Deserialization/JsonProps.js.map +1 -1
  9. package/lib/cjs/Deserialization/SchemaGraphUtil.js.map +1 -1
  10. package/lib/cjs/Deserialization/XmlParser.js.map +1 -1
  11. package/lib/cjs/Deserialization/XmlSerializationUtils.js.map +1 -1
  12. package/lib/cjs/ECName.js.map +1 -1
  13. package/lib/cjs/ECObjects.js.map +1 -1
  14. package/lib/cjs/Exception.js.map +1 -1
  15. package/lib/cjs/IncrementalLoading/ClassParsers.js.map +1 -1
  16. package/lib/cjs/IncrementalLoading/ECSqlSchemaLocater.js.map +1 -1
  17. package/lib/cjs/IncrementalLoading/FullSchemaQueries.js +465 -465
  18. package/lib/cjs/IncrementalLoading/FullSchemaQueries.js.map +1 -1
  19. package/lib/cjs/IncrementalLoading/IncrementalSchemaLocater.js.map +1 -1
  20. package/lib/cjs/IncrementalLoading/IncrementalSchemaReader.js.map +1 -1
  21. package/lib/cjs/IncrementalLoading/PerformanceLogger.js.map +1 -1
  22. package/lib/cjs/IncrementalLoading/SchemaItemParsers.js.map +1 -1
  23. package/lib/cjs/IncrementalLoading/SchemaItemQueries.js +235 -235
  24. package/lib/cjs/IncrementalLoading/SchemaItemQueries.js.map +1 -1
  25. package/lib/cjs/IncrementalLoading/SchemaParser.js.map +1 -1
  26. package/lib/cjs/IncrementalLoading/SchemaStubQueries.js +326 -326
  27. package/lib/cjs/IncrementalLoading/SchemaStubQueries.js.map +1 -1
  28. package/lib/cjs/Interfaces.js.map +1 -1
  29. package/lib/cjs/Metadata/Class.js.map +1 -1
  30. package/lib/cjs/Metadata/Constant.js.map +1 -1
  31. package/lib/cjs/Metadata/CustomAttribute.js.map +1 -1
  32. package/lib/cjs/Metadata/CustomAttributeClass.js.map +1 -1
  33. package/lib/cjs/Metadata/EntityClass.js.map +1 -1
  34. package/lib/cjs/Metadata/Enumeration.js.map +1 -1
  35. package/lib/cjs/Metadata/Format.js.map +1 -1
  36. package/lib/cjs/Metadata/InvertedUnit.js.map +1 -1
  37. package/lib/cjs/Metadata/KindOfQuantity.js.map +1 -1
  38. package/lib/cjs/Metadata/Mixin.js.map +1 -1
  39. package/lib/cjs/Metadata/OverrideFormat.js.map +1 -1
  40. package/lib/cjs/Metadata/Phenomenon.js.map +1 -1
  41. package/lib/cjs/Metadata/Property.js.map +1 -1
  42. package/lib/cjs/Metadata/PropertyCategory.js.map +1 -1
  43. package/lib/cjs/Metadata/RelationshipClass.js.map +1 -1
  44. package/lib/cjs/Metadata/Schema.js.map +1 -1
  45. package/lib/cjs/Metadata/SchemaItem.js.map +1 -1
  46. package/lib/cjs/Metadata/Unit.js.map +1 -1
  47. package/lib/cjs/Metadata/UnitSystem.js.map +1 -1
  48. package/lib/cjs/PropertyTypes.js.map +1 -1
  49. package/lib/cjs/SchemaFormatsProvider.js.map +1 -1
  50. package/lib/cjs/SchemaJsonLocater.js.map +1 -1
  51. package/lib/cjs/SchemaKey.js.map +1 -1
  52. package/lib/cjs/SchemaLoader.js.map +1 -1
  53. package/lib/cjs/SchemaPartVisitorDelegate.js.map +1 -1
  54. package/lib/cjs/UnitConversion/Graph.js.map +1 -1
  55. package/lib/cjs/UnitConversion/Parser.js.map +1 -1
  56. package/lib/cjs/UnitConversion/UnitConversion.js.map +1 -1
  57. package/lib/cjs/UnitConversion/UnitConverter.js.map +1 -1
  58. package/lib/cjs/UnitConversion/UnitTree.js.map +1 -1
  59. package/lib/cjs/UnitProvider/SchemaUnitProvider.js.map +1 -1
  60. package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
  61. package/lib/cjs/ecschema-metadata.js.map +1 -1
  62. package/lib/cjs/utils/SchemaGraph.js.map +1 -1
  63. package/lib/cjs/utils/SchemaLoadingController.js.map +1 -1
  64. package/lib/esm/Constants.js.map +1 -1
  65. package/lib/esm/Context.js.map +1 -1
  66. package/lib/esm/DelayedPromise.js.map +1 -1
  67. package/lib/esm/Deserialization/AbstractParser.js.map +1 -1
  68. package/lib/esm/Deserialization/Helper.js.map +1 -1
  69. package/lib/esm/Deserialization/JsonParser.js.map +1 -1
  70. package/lib/esm/Deserialization/JsonProps.js.map +1 -1
  71. package/lib/esm/Deserialization/SchemaGraphUtil.js.map +1 -1
  72. package/lib/esm/Deserialization/XmlParser.js.map +1 -1
  73. package/lib/esm/Deserialization/XmlSerializationUtils.js.map +1 -1
  74. package/lib/esm/ECName.js.map +1 -1
  75. package/lib/esm/ECObjects.js.map +1 -1
  76. package/lib/esm/Exception.js.map +1 -1
  77. package/lib/esm/IncrementalLoading/ClassParsers.js.map +1 -1
  78. package/lib/esm/IncrementalLoading/ECSqlSchemaLocater.js.map +1 -1
  79. package/lib/esm/IncrementalLoading/FullSchemaQueries.js +465 -465
  80. package/lib/esm/IncrementalLoading/FullSchemaQueries.js.map +1 -1
  81. package/lib/esm/IncrementalLoading/IncrementalSchemaLocater.js.map +1 -1
  82. package/lib/esm/IncrementalLoading/IncrementalSchemaReader.js.map +1 -1
  83. package/lib/esm/IncrementalLoading/PerformanceLogger.js.map +1 -1
  84. package/lib/esm/IncrementalLoading/SchemaItemParsers.js.map +1 -1
  85. package/lib/esm/IncrementalLoading/SchemaItemQueries.js +235 -235
  86. package/lib/esm/IncrementalLoading/SchemaItemQueries.js.map +1 -1
  87. package/lib/esm/IncrementalLoading/SchemaParser.js.map +1 -1
  88. package/lib/esm/IncrementalLoading/SchemaStubQueries.js +326 -326
  89. package/lib/esm/IncrementalLoading/SchemaStubQueries.js.map +1 -1
  90. package/lib/esm/Interfaces.js.map +1 -1
  91. package/lib/esm/Metadata/Class.js.map +1 -1
  92. package/lib/esm/Metadata/Constant.js.map +1 -1
  93. package/lib/esm/Metadata/CustomAttribute.js.map +1 -1
  94. package/lib/esm/Metadata/CustomAttributeClass.js.map +1 -1
  95. package/lib/esm/Metadata/EntityClass.js.map +1 -1
  96. package/lib/esm/Metadata/Enumeration.js.map +1 -1
  97. package/lib/esm/Metadata/Format.js.map +1 -1
  98. package/lib/esm/Metadata/InvertedUnit.js.map +1 -1
  99. package/lib/esm/Metadata/KindOfQuantity.js.map +1 -1
  100. package/lib/esm/Metadata/Mixin.js.map +1 -1
  101. package/lib/esm/Metadata/OverrideFormat.js.map +1 -1
  102. package/lib/esm/Metadata/Phenomenon.js.map +1 -1
  103. package/lib/esm/Metadata/Property.js.map +1 -1
  104. package/lib/esm/Metadata/PropertyCategory.js.map +1 -1
  105. package/lib/esm/Metadata/RelationshipClass.js.map +1 -1
  106. package/lib/esm/Metadata/Schema.js.map +1 -1
  107. package/lib/esm/Metadata/SchemaItem.js.map +1 -1
  108. package/lib/esm/Metadata/Unit.js.map +1 -1
  109. package/lib/esm/Metadata/UnitSystem.js.map +1 -1
  110. package/lib/esm/PropertyTypes.js.map +1 -1
  111. package/lib/esm/SchemaFormatsProvider.js.map +1 -1
  112. package/lib/esm/SchemaJsonLocater.js.map +1 -1
  113. package/lib/esm/SchemaKey.js.map +1 -1
  114. package/lib/esm/SchemaLoader.js.map +1 -1
  115. package/lib/esm/SchemaPartVisitorDelegate.js.map +1 -1
  116. package/lib/esm/UnitConversion/Graph.js.map +1 -1
  117. package/lib/esm/UnitConversion/Parser.js.map +1 -1
  118. package/lib/esm/UnitConversion/UnitConversion.js.map +1 -1
  119. package/lib/esm/UnitConversion/UnitConverter.js.map +1 -1
  120. package/lib/esm/UnitConversion/UnitTree.js.map +1 -1
  121. package/lib/esm/UnitProvider/SchemaUnitProvider.js.map +1 -1
  122. package/lib/esm/Validation/SchemaWalker.js.map +1 -1
  123. package/lib/esm/ecschema-metadata.js.map +1 -1
  124. package/lib/esm/utils/SchemaGraph.js.map +1 -1
  125. package/lib/esm/utils/SchemaLoadingController.js.map +1 -1
  126. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaStubQueries.js","sourceRoot":"","sources":["../../../src/IncrementalLoading/SchemaStubQueries.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG,2DAAwD;AAEjD,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,EAAE;IACxC,OAAO;;cAEK,KAAK;cACL,KAAK;cACL,KAAK;;;GAGhB,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,QAAQ,YASnB;AAEK,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,EAAE;IACxC,OAAO;;cAEK,KAAK;cACL,KAAK;cACL,KAAK;;;GAGhB,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,QAAQ,YASnB;AAEK,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,EAAE;IACjD,OAAO;;cAEK,KAAK;cACL,KAAK;;;GAGhB,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B;AAEF,MAAM,aAAa,GAAG;;;;;;;;;;;;;;CAcrB,CAAC;AAEF,MAAM,oBAAoB,GAAG;;;;;;;;;;CAU5B,CAAC;AAEF,MAAM,oBAAoB,GAAG;;;;;;oBAMT,IAAA,gBAAQ,EAAC,OAAO,CAAC;;;;;;;;;;0BAUX,IAAA,gBAAQ,EAAC,WAAW,CAAC;;;;;;;;;;;;;;CAc9C,CAAC;AAEF,MAAM,WAAW,GAAG;;;;;;oBAMA,IAAA,gBAAQ,EAAC,OAAO,CAAC;;;;;;;;;0BASX,IAAA,gBAAQ,EAAC,WAAW,CAAC;;;;;;;;;;;;;CAa9C,CAAC;AAEF,MAAM,iBAAiB,GAAG;;;;;;oBAMN,IAAA,gBAAQ,EAAC,OAAO,CAAC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,eAAe,GAAG;;MAElB,oBAAoB;;;;;;;;;;;;;;;CAezB,CAAC;AAEF;;;GAGG;AACU,QAAA,YAAY,GAAG;IAC1B,eAAe;IACf,eAAe;CAChB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport { SchemaItemQueries } from \"./SchemaItemQueries\";\n\nexport const modifier = (alias: string) => {\n return `\n CASE\n WHEN [${alias}].[modifier] = 0 THEN 'None'\n WHEN [${alias}].[modifier] = 1 THEN 'Abstract'\n WHEN [${alias}].[modifier] = 2 THEN 'Sealed'\n ELSE NULL\n END\n `;\n};\n\nexport const strength = (alias: string) => {\n return `\n CASE\n WHEN [${alias}].[RelationshipStrength] = 0 THEN 'Referencing'\n WHEN [${alias}].[RelationshipStrength] = 1 THEN 'Holding'\n WHEN [${alias}].[RelationshipStrength] = 2 THEN 'Embedding'\n ELSE NULL\n END\n `;\n};\n\nexport const strengthDirection = (alias: string) => {\n return `\n CASE\n WHEN [${alias}].[RelationshipStrengthDirection] = 1 THEN 'Forward'\n WHEN [${alias}].[RelationshipStrengthDirection] = 2 THEN 'Backward'\n ELSE NULL\n END\n `;\n};\n\nconst withAppliesTo = `\n AppliesToCTE AS (\n SELECT\n [mixinAppliesTo].[ECInstanceId] AS [AppliesToId],\n [appliesToSchema].[name] as [AppliesToSchema],\n json_extract(XmlCAToJson([ca].[Class].[Id], [ca].[Instance]), '$.IsMixin.AppliesToEntityClass') AS [AppliesTo]\n FROM [meta].[CustomAttribute] [ca]\n JOIN [meta].[ECClassDef] [mixinAppliesTo]\n ON [mixinAppliesTo].[ECInstanceId] = [ca].[ContainerId]\n JOIN [meta].[ECSchemaDef] [appliesToSchema]\n ON [appliesToSchema].[ECInstanceId] = [mixinAppliesTo].[Schema].[Id]\n WHERE [ca].[ContainerType] = 30\n AND json_extract(XmlCAToJson([ca].[Class].[Id], [ca].[Instance]), '$.ecClass') = 'IsMixin'\n )\n`;\n\nconst withSchemaReferences = `\n SchemaReferences AS (\n SELECT\n [ref].[SourceECInstanceId] AS [SchemaId],\n CONCAT([Name],'.',[VersionMajor],'.',[VersionWrite],'.',[VersionMinor]) AS [fullName]\n FROM\n [meta].[ECSchemaDef] AS [refSchema]\n INNER JOIN [meta].[SchemaHasSchemaReferences] [ref]\n ON [ref].[TargetECInstanceId] = [refSchema].[ECInstanceId]\n )\n`;\n\nconst customAttributeQuery = `\n SELECT\n [Schema].[Id] AS [SchemaId],\n json_object(\n 'name', [class].[Name],\n 'schemaItemType', 'CustomAttributeClass',\n 'modifier', ${modifier(\"class\")},\n 'label', [class].[DisplayLabel],\n 'description', [class].[Description],\n 'appliesTo', [class].[CustomAttributeContainerType],\n 'baseClasses', (\n SELECT\n json_group_array(json(json_object(\n 'schema', ec_classname([baseClass].[ECInstanceId], 's'),\n 'name', [baseClass].[Name],\n 'schemaItemType', 'CustomAttributeClass',\n 'modifier', ${modifier(\"baseClass\")},\n 'label', [baseClass].[DisplayLabel],\n 'description', [baseClass].[Description],\n 'appliesTo', [baseClass].[CustomAttributeContainerType]\n )))\n FROM\n [meta].[ECClassDef] [baseClass]\n INNER JOIN [meta].[ClassHasAllBaseClasses] [baseClassMap]\n ON [baseClassMap].[TargetECInstanceId] = [baseclass].[ECInstanceId]\n WHERE [baseClassMap].[SourceECInstanceId] = [class].[ECInstanceId]\n )\n ) AS [item]\n FROM [meta].[ECClassDef] [class]\n WHERE [class].[Type] = 3\n`;\n\nconst structQuery = `\n SELECT\n [Schema].[Id] AS [SchemaId],\n json_object(\n 'name', [class].[Name],\n 'schemaItemType', 'StructClass',\n 'modifier', ${modifier(\"class\")},\n 'label', [class].[DisplayLabel],\n 'description', [class].[Description],\n 'baseClasses', (\n SELECT\n json_group_array(json(json_object(\n 'schema', ec_classname([baseClass].[ECInstanceId], 's'),\n 'name', [baseClass].[Name],\n 'schemaItemType', 'StructClass',\n 'modifier', ${modifier(\"baseClass\")},\n 'label', [baseClass].[DisplayLabel],\n 'description', [baseClass].[Description]\n )))\n FROM\n [meta].[ECClassDef] [baseClass]\n INNER JOIN [meta].[ClassHasAllBaseClasses] [baseClassMap]\n ON [baseClassMap].[TargetECInstanceId] = [baseclass].[ECInstanceId]\n WHERE [baseClassMap].[SourceECInstanceId] = [class].[ECInstanceId]\n )\n ) AS [item]\n FROM [meta].[ECClassDef] [class]\n WHERE [class].[Type] = 2\n`;\n\nconst relationshipQuery = `\n SELECT\n [Schema].[Id] AS [SchemaId],\n json_object(\n 'name', [class].[Name],\n 'schemaItemType', 'RelationshipClass',\n 'modifier', ${modifier(\"class\")},\n 'label', [class].[DisplayLabel],\n 'description', [class].[Description],\n 'strength', ${strength(\"class\")},\n 'strengthDirection', ${strengthDirection(\"class\")},\n 'baseClasses', (\n SELECT\n json_group_array(json(json_object(\n 'schema', ec_classname([baseClass].[ECInstanceId], 's'),\n 'name', [baseClass].[Name],\n 'schemaItemType', 'RelationshipClass',\n 'modifier', ${modifier(\"baseClass\")},\n 'label', [baseClass].[DisplayLabel],\n 'description', [baseClass].[Description],\n 'strength', ${strength(\"baseClass\")},\n 'strengthDirection', ${strengthDirection(\"baseClass\")}\n )))\n FROM\n [meta].[ECClassDef] [baseClass]\n INNER JOIN [meta].[ClassHasAllBaseClasses] [baseClassMap]\n ON [baseClassMap].[TargetECInstanceId] = [baseclass].[ECInstanceId]\n WHERE [baseClassMap].[SourceECInstanceId] = [class].[ECInstanceId]\n )\n ) AS [item]\n FROM [meta].[ECClassDef] [class]\n WHERE [class].[Type] = 1\n`;\n\nconst entityQuery = `\n SELECT\n [Schema].[Id] AS [SchemaId],\n json_object(\n 'name', [class].[Name],\n 'schemaItemType', 'EntityClass',\n 'modifier', ${modifier(\"class\")},\n 'label', [class].[DisplayLabel],\n 'description', [class].[Description],\n 'baseClasses', (\n SELECT\n json_group_array(json(json_object(\n 'schema', ec_classname([baseClass].[ECInstanceId], 's'),\n 'name', [baseClass].[Name],\n 'schemaItemType', 'EntityClass',\n 'modifier', ${modifier(\"baseClass\")},\n 'label', [baseClass].[DisplayLabel],\n 'description', [baseClass].[Description]\n )))\n FROM\n [meta].[ECClassDef] [baseClass]\n INNER JOIN [meta].[ClassHasAllBaseClasses] [baseClassMap]\n ON [baseClassMap].[TargetECInstanceId] = [baseclass].[ECInstanceId]\n WHERE [baseClassMap].[SourceECInstanceId] = [class].[ECInstanceId]\n AND NOT EXISTS(SELECT 1 FROM [meta].[ClassCustomAttribute] [ca] WHERE [baseClass].[ECInstanceId] = [ca].[Class].[Id]\n AND [ca].[CustomAttributeClass].[Id] Is ([CoreCA].[IsMixin]))\n ),\n 'mixins', (\n SELECT\n json_group_array(json(json_object(\n 'schema', ec_classname([baseClass].[ECInstanceId], 's'),\n 'name', [baseClass].[Name],\n 'schemaItemType', 'Mixin',\n 'modifier', ${modifier(\"baseClass\")},\n 'label', [baseClass].[DisplayLabel],\n 'description', [baseClass].[Description],\n 'appliesTo', (\n SELECT IIF(instr([atCTE].[AppliesTo], ':') > 1, ec_classname(ec_classId([atCTE].[AppliesTo]), 's.c'), CONCAT([atCTE].[AppliesToSchema], '.', [atCTE].[AppliesTo]))\n FROM [AppliesToCTE] [atCTE]\n WHERE [atCTE].[AppliesToId] = [baseClass].[ECInstanceId]\n ),\n 'baseClasses', (\n SELECT\n json_group_array(json(json_object(\n 'schema', ec_classname([mixinBaseClass].[ECInstanceId], 's'),\n 'name', [mixinBaseClass].[Name],\n 'schemaItemType', 'Mixin',\n 'modifier', ${modifier(\"mixinBaseClass\")},\n 'label', [mixinBaseClass].[DisplayLabel],\n 'description', [mixinBaseClass].[Description],\n 'appliesTo', (\n SELECT IIF(instr([atCTE].[AppliesTo], ':') > 1, ec_classname(ec_classId([atCTE].[AppliesTo]), 's.c'), CONCAT([atCTE].[AppliesToSchema], '.', [atCTE].[AppliesTo]))\n FROM [AppliesToCTE] [atCTE]\n WHERE [atCTE].[AppliesToId] = [mixinBaseClass].[ECInstanceId]\n )\n )))\n FROM\n [meta].[ECClassDef] [mixinBaseClass]\n INNER JOIN [meta].[ClassHasAllBaseClasses] [mixinBaseClassMap]\n ON [mixinBaseClassMap].[TargetECInstanceId] = [mixinBaseClass].[ECInstanceId]\n WHERE [mixinBaseClassMap].[SourceECInstanceId] = [baseClass].[ECInstanceId]\n )\n )))\n FROM\n [meta].[ECClassDef] [baseClass]\n INNER JOIN [meta].[ClassHasBaseClasses] [baseClassMap]\n ON [baseClassMap].[TargetECInstanceId] = [baseclass].[ECInstanceId]\n WHERE [baseClassMap].[SourceECInstanceId] = [class].[ECInstanceId]\n AND EXISTS(SELECT 1 FROM [meta].[ClassCustomAttribute] [ca] WHERE [baseClass].[ECInstanceId] = [ca].[Class].[Id]\n AND [ca].[CustomAttributeClass].[Id] Is ([CoreCA].[IsMixin]))\n )\n ) AS [item]\n FROM [meta].[ECClassDef] [class]\n WHERE [class].[Type] = 0\n AND NOT EXISTS(SELECT 1 FROM [meta].[ClassCustomAttribute] [ca] WHERE [class].[ECInstanceId] = [ca].[Class].[Id]\n AND [ca].[CustomAttributeClass].[Id] Is ([CoreCA].[IsMixin]))\n`;\n\nconst mixinQuery = `\n SELECT\n [Schema].[Id] AS [SchemaId],\n json_object(\n 'name', [class].[Name],\n 'schemaItemType', 'Mixin',\n 'modifier', ${modifier(\"class\")},\n 'label', [class].[DisplayLabel],\n 'description', [class].[Description],\n 'appliesTo', (\n SELECT IIF(instr([atCTE].[AppliesTo], ':') > 1, ec_classname(ec_classId([atCTE].[AppliesTo]), 's.c'), CONCAT([atCTE].[AppliesToSchema], '.', [atCTE].[AppliesTo]))\n FROM [AppliesToCTE] [atCTE]\n WHERE [atCTE].[AppliesToId] = [class].[ECInstanceId]\n ),\n 'baseClasses', (\n SELECT\n json_group_array(json(json_object(\n 'schema', ec_classname([baseClass].[ECInstanceId], 's'),\n 'name', [baseClass].[Name],\n 'schemaItemType', 'Mixin',\n 'modifier', ${modifier(\"baseClass\")},\n 'label', [baseClass].[DisplayLabel],\n 'description', [baseClass].[Description],\n 'appliesTo', (\n SELECT IIF(instr([atCTE].[AppliesTo], ':') > 1, ec_classname(ec_classId([atCTE].[AppliesTo]), 's.c'), CONCAT([atCTE].[AppliesToSchema], '.', [atCTE].[AppliesTo]))\n FROM [AppliesToCTE] [atCTE]\n WHERE [atCTE].[AppliesToId] = [baseClass].[ECInstanceId]\n )\n )))\n FROM\n [meta].[ECClassDef] [baseClass]\n INNER JOIN [meta].[ClassHasAllBaseClasses] [baseClassMap]\n ON [baseClassMap].[TargetECInstanceId] = [baseclass].[ECInstanceId]\n WHERE [baseClassMap].[SourceECInstanceId] = [class].[ECInstanceId]\n )\n ) AS [item]\n FROM [meta].[ECClassDef] [class]\n WHERE [class].[Type] = 0 AND EXISTS (SELECT 1 FROM [meta].[ClassCustomAttribute] [ca] WHERE [class].[ECInstanceId] = [ca].[Class].[Id]\n AND [ca].[CustomAttributeClass].[Id] Is ([CoreCA].[IsMixin]))\n`;\n\nconst withSchemaItems = `\nSchemaItems AS (\n ${customAttributeQuery}\n UNION ALL\n ${structQuery}\n UNION ALL\n ${relationshipQuery}\n UNION ALL\n ${entityQuery}\n UNION ALL\n ${mixinQuery}\n UNION ALL\n ${SchemaItemQueries.enumeration()}\n UNION ALL\n ${SchemaItemQueries.kindOfQuantity()}\n UNION ALL\n ${SchemaItemQueries.propertyCategory()}\n UNION ALL\n ${SchemaItemQueries.unit()}\n UNION ALL\n ${SchemaItemQueries.invertedUnit()}\n UNION ALL\n ${SchemaItemQueries.constant()}\n UNION ALL\n ${SchemaItemQueries.phenomenon()}\n UNION ALL\n ${SchemaItemQueries.unitSystem()}\n UNION ALL\n ${SchemaItemQueries.format()}\n )\n`;\n\nconst schemaStubQuery = `\n WITH\n ${withSchemaReferences},\n ${withAppliesTo},\n ${withSchemaItems}\n SELECT\n [Name] as [name],\n CONCAT('',[VersionMajor],'.',[VersionWrite],'.',[VersionMinor]) AS [version],\n [Alias] as [alias],\n [DisplayLabel] as [displayLabel],\n [Description] as [description],\n (\n SELECT\n json_group_array([schemaReferences].[fullName])\n FROM\n [SchemaReferences] [schemaReferences]\n WHERE\n [schemaReferences].[SchemaId] = [schemaDef].[ECInstanceId]\n ) AS [references],\n (\n SELECT\n json_group_array(json([items].[item]))\n FROM\n [SchemaItems] [items]\n WHERE\n [items].[SchemaId] = [schemaDef].[ECInstanceId]\n ) AS [items]\n FROM\n [meta].[ECSchemaDef] [schemaDef]\n WHERE [Name] = :schemaName\n`;\n\nconst schemaInfoQuery = `\n WITH\n ${withSchemaReferences}\n SELECT\n [Name] as [name],\n CONCAT('',[VersionMajor],'.',[VersionWrite],'.',[VersionMinor]) AS [version],\n [Alias] as [alias],\n (\n SELECT\n json_group_array([schemaReferences].[fullName])\n FROM\n [SchemaReferences] [schemaReferences]\n WHERE\n [schemaReferences].[SchemaId] = [schemaDef].[ECInstanceId]\n ) AS [references]\n FROM\n [meta].[ECSchemaDef] [schemaDef]\n`;\n\n/**\n * Partial Schema queries.\n * @internal\n */\nexport const ecsqlQueries = {\n schemaStubQuery,\n schemaInfoQuery,\n};\n"]}
1
+ {"version":3,"file":"SchemaStubQueries.js","sourceRoot":"","sources":["../../../src/IncrementalLoading/SchemaStubQueries.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG,2DAAwD;AAEjD,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,EAAE;IACxC,OAAO;;cAEK,KAAK;cACL,KAAK;cACL,KAAK;;;GAGhB,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,QAAQ,YASnB;AAEK,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,EAAE;IACxC,OAAO;;cAEK,KAAK;cACL,KAAK;cACL,KAAK;;;GAGhB,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,QAAQ,YASnB;AAEK,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,EAAE;IACjD,OAAO;;cAEK,KAAK;cACL,KAAK;;;GAGhB,CAAC;AAC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pB,oBAAoB;;IAEpB,WAAW;;IAEX,iBAAiB;;IAEjB,WAAW;;IAEX,UAAU;;IAEV,qCAAiB,CAAC,WAAW,EAAE;;IAE/B,qCAAiB,CAAC,cAAc,EAAE;;IAElC,qCAAiB,CAAC,gBAAgB,EAAE;;IAEpC,qCAAiB,CAAC,IAAI,EAAE;;IAExB,qCAAiB,CAAC,YAAY,EAAE;;IAEhC,qCAAiB,CAAC,QAAQ,EAAE;;IAE5B,qCAAiB,CAAC,UAAU,EAAE;;IAE9B,qCAAiB,CAAC,UAAU,EAAE;;IAE9B,qCAAiB,CAAC,MAAM,EAAE;;CAE7B,CAAC;AAEF,MAAM,eAAe,GAAG;;MAElB,oBAAoB;MACpB,aAAa;MACb,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BpB,CAAC;AAEF,MAAM,eAAe,GAAG;;MAElB,oBAAoB;;;;;;;;;;;;;;;CAezB,CAAC;AAEF;;;GAGG;AACU,QAAA,YAAY,GAAG;IAC1B,eAAe;IACf,eAAe;CAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../src/Interfaces.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { ECClass, StructClass } from \"./Metadata/Class\";\nimport { Constant } from \"./Metadata/Constant\";\nimport { CustomAttribute, CustomAttributeContainerProps } from \"./Metadata/CustomAttribute\";\nimport { CustomAttributeClass } from \"./Metadata/CustomAttributeClass\";\nimport { EntityClass } from \"./Metadata/EntityClass\";\nimport { AnyEnumerator, Enumeration } from \"./Metadata/Enumeration\";\nimport { Format } from \"./Metadata/Format\";\nimport { InvertedUnit } from \"./Metadata/InvertedUnit\";\nimport { KindOfQuantity } from \"./Metadata/KindOfQuantity\";\nimport { Mixin } from \"./Metadata/Mixin\";\nimport { OverrideFormat } from \"./Metadata/OverrideFormat\";\nimport { Phenomenon } from \"./Metadata/Phenomenon\";\nimport { AnyProperty } from \"./Metadata/Property\";\nimport { PropertyCategory } from \"./Metadata/PropertyCategory\";\nimport { RelationshipClass, RelationshipConstraint } from \"./Metadata/RelationshipClass\";\nimport { Schema } from \"./Metadata/Schema\";\nimport { SchemaItem } from \"./Metadata/SchemaItem\";\nimport { Unit } from \"./Metadata/Unit\";\nimport { UnitSystem } from \"./Metadata/UnitSystem\";\nimport { SchemaItemKey, SchemaKey } from \"./SchemaKey\";\n\n/** @public @preview */\nexport type LazyLoadedSchema = SchemaKey & Promise<Schema>;\n\n/** @public @preview */\nexport type LazyLoadedSchemaItem<T extends SchemaItem> = SchemaItemKey & Promise<T>;\n/** @public @preview */\nexport type LazyLoadedECClass = LazyLoadedSchemaItem<ECClass>;\n/** @public @preview */\nexport type LazyLoadedEntityClass = LazyLoadedSchemaItem<EntityClass>;\n/** @public @preview */\nexport type LazyLoadedMixin = LazyLoadedSchemaItem<Mixin>;\n/** @public @preview */\nexport type LazyLoadedStructClass = LazyLoadedSchemaItem<StructClass>;\n/** @public @preview */\nexport type LazyLoadedRelationshipClass = LazyLoadedSchemaItem<RelationshipClass>;\n/** @public @preview */\nexport type LazyLoadedEnumeration = LazyLoadedSchemaItem<Enumeration>;\n/** @public @preview */\nexport type LazyLoadedFormat = LazyLoadedSchemaItem<Format>;\n/** @public @preview */\nexport type LazyLoadedKindOfQuantity = LazyLoadedSchemaItem<KindOfQuantity>;\n/** @public @preview */\nexport type LazyLoadedPropertyCategory = LazyLoadedSchemaItem<PropertyCategory>;\n/** @public @preview */\nexport type LazyLoadedRelationshipConstraintClass = LazyLoadedSchemaItem<EntityClass | Mixin | RelationshipClass>;\n/** @public @preview */\nexport type LazyLoadedUnit = LazyLoadedSchemaItem<Unit>;\n/** @public @preview */\nexport type LazyLoadedInvertedUnit = LazyLoadedSchemaItem<InvertedUnit>;\n/** @public @preview */\nexport type LazyLoadedPhenomenon = LazyLoadedSchemaItem<Phenomenon>;\n/** @public @preview */\nexport type LazyLoadedUnitSystem = LazyLoadedSchemaItem<UnitSystem>;\n\n/** @public @preview */\nexport type AnyClass =\n EntityClass |\n Mixin |\n StructClass |\n CustomAttributeClass |\n RelationshipClass;\n\n/** @public @preview */\nexport type AnySchemaItem =\n AnyClass |\n Enumeration |\n KindOfQuantity |\n PropertyCategory |\n Unit |\n InvertedUnit |\n Constant |\n Phenomenon |\n UnitSystem |\n Format;\n\n/** @public @preview */\nexport type AnyECType =\n Schema |\n SchemaItem |\n AnyProperty |\n RelationshipConstraint |\n CustomAttributeContainerProps |\n CustomAttribute |\n OverrideFormat |\n AnyEnumerator;\n\n/**\n * Holds the SchemaKeys for a schema and it's references. Designed so that Schema fulfills this interface.\n * @public @preview\n */\nexport interface SchemaInfo {\n readonly alias: string;\n readonly schemaKey: SchemaKey;\n readonly references: ReadonlyArray<WithSchemaKey>;\n}\n\n/** @public @preview */\nexport interface WithSchemaKey {\n readonly schemaKey: SchemaKey;\n}\n\n/** This is needed to break a circular dependency between Class and EntityClass.\n * @public @preview\n */\nexport interface HasMixins {\n readonly mixins: ReadonlyArray<LazyLoadedMixin>;\n getMixinsSync(): Iterable<Mixin>;\n}\n"]}
1
+ {"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../src/Interfaces.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG"}
@@ -1 +1 @@
1
- {"version":3,"file":"Class.js","sourceRoot":"","sources":["../../../src/Metadata/Class.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,sDAA4D;AAE5D,oFAAiF;AACjF,4CAA8L;AAC9L,4CAA6D;AAE7D,4CAAwD;AACxD,uDAAkI;AAClI,+CAA4C;AAC5C,yCAEoB;AAEpB,6CAA0C;AAC1C,sDAA4E;AA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E,OAAO,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACK,kBAAkB,CAAC,SAAkB,EAAE,YAAqB;QAClE,IAAI,CAAC,SAAS,CAAC,eAAe;YAC5B,OAAO;QAET,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC;YACvD,OAAO;QAET,SAAS,CAAC,eAAe,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC1D,CAAC;CACF;AAr2BD,0BAq2BC;AAED;;;GAGG;AACH,MAAa,WAAY,SAAQ,OAAO;IACtC;;OAEG;IACsB,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC;IAErE;;;OAGG;IACI,MAAM,KAAc,cAAc,KAAK,OAAO,0BAAc,CAAC,WAAW,CAAC,CAAC,CAAC;IAClF;;;;OAIG;IACI,MAAM,CAAC,aAAa,CAAC,IAAiB;QAC3C,IAAI,IAAI,IAAI,IAAI,CAAC,cAAc,KAAK,0BAAc,CAAC,WAAW;YAC5D,OAAO,IAAI,CAAC;QAEd,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,mBAAmB,CAAC,IAAiB;QACjD,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;YAC3B,MAAM,IAAI,yBAAa,CAAC,0BAAc,CAAC,qBAAqB,EAAE,aAAa,0BAAc,CAAC,WAAW,iBAAiB,CAAC,CAAC;IAC5H,CAAC;CACF;AAjCD,kCAiCC;AAED;;;GAGG;AACH,MAAsB,kBAAmB,SAAQ,WAAW;CAE3D;AAFD,gDAEC;AAED;;;GAGG;AACH,MAAsB,YAAa,SAAQ,OAAO;CA6BjD;AA7BD,oCA6BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { assert } from \"@itwin/core-bentley\";\nimport { DelayedPromiseWithProps } from \"../DelayedPromise\";\nimport { ClassProps } from \"../Deserialization/JsonProps\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { AbstractSchemaItemType, classModifierToString, ECClassModifier, parseClassModifier, parsePrimitiveType, PrimitiveType, SchemaItemType, SupportedSchemaItemType } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { AnyClass, HasMixins, LazyLoadedECClass } from \"../Interfaces\";\nimport { SchemaItemKey, SchemaKey } from \"../SchemaKey\";\nimport { CustomAttribute, CustomAttributeContainerProps, CustomAttributeSet, serializeCustomAttributes } from \"./CustomAttribute\";\nimport { Enumeration } from \"./Enumeration\";\nimport {\n EnumerationArrayProperty, EnumerationProperty, PrimitiveArrayProperty, PrimitiveProperty, Property, StructArrayProperty, StructProperty,\n} from \"./Property\";\nimport { Schema } from \"./Schema\";\nimport { SchemaItem } from \"./SchemaItem\";\nimport { ECSpecVersion, SchemaReadHelper } from \"../Deserialization/Helper\";\n\n/**\n * A common abstract class for all of the ECClass types.\n * @public @preview\n */\nexport abstract class ECClass extends SchemaItem implements CustomAttributeContainerProps {\n /** @internal */\n public static override get schemaItemType(): SupportedSchemaItemType { return AbstractSchemaItemType.Class; } // need this so getItem(\"name\", ECClass) in schema works\n private _modifier: ECClassModifier;\n private _baseClass?: LazyLoadedECClass;\n private _derivedClasses?: Map<string, LazyLoadedECClass>;\n private _properties?: Map<string, Property>;\n private _customAttributes?: Map<string, CustomAttribute>;\n private _mergedPropertyCache?: Map<string, Property>;\n\n public get modifier() { return this._modifier; }\n public get customAttributes(): CustomAttributeSet | undefined { return this._customAttributes; }\n\n /** @internal */\n constructor(schema: Schema, name: string, modifier?: ECClassModifier) {\n super(schema, name);\n\n if (modifier)\n this._modifier = modifier;\n else\n this._modifier = ECClassModifier.None;\n }\n\n /**\n * Gets the base class if it exists, otherwise returns undefined.\n */\n public get baseClass(): LazyLoadedECClass | undefined {\n return this._baseClass;\n }\n\n public getBaseClassSync(): ECClass | undefined {\n if (!this.baseClass) {\n return undefined;\n }\n\n return this.schema.lookupItemSync(this.baseClass, ECClass);\n }\n\n /**\n * Sets the base class of the ECClass. Pass undefined to 'remove' the base class.\n *\n * @internal\n */\n protected async setBaseClass(baseClass: LazyLoadedECClass | undefined) {\n const oldBaseClass = this._baseClass;\n this._baseClass = baseClass;\n\n if (baseClass)\n this.addDerivedClass(await baseClass, this);\n else if (oldBaseClass)\n this.removeDerivedClass(await oldBaseClass, this);\n }\n\n /**\n * Gets the derived classes belonging to this class.\n * @returns An array of ECClasses or undefined if no derived classes exist.\n */\n public async getDerivedClasses(): Promise<ECClass[] | undefined> {\n if (!this._derivedClasses || this._derivedClasses.size === 0)\n return undefined;\n\n return Array.from(await Promise.all(this._derivedClasses.values()));\n }\n\n /**\n * Convenience method for adding an already loaded ECProperty used by create*Property methods.\n * @param prop The property to add.\n * @return The property that was added.\n *\n * @internal\n */\n protected addProperty<T extends Property>(prop: T): T {\n if (!this._properties)\n this._properties = new Map<string, Property>();\n\n this._properties.set(prop.name.toUpperCase(), prop);\n this.cleanCache();\n return prop;\n }\n\n /**\n * Deletes a property from within this class.\n * @param name The property name to delete, lookup is case-insensitive\n * @internal\n */\n protected async deleteProperty(name: string): Promise<void> {\n if (this._properties) {\n const property = await this.getProperty(name);\n if (property) {\n this._properties.delete(name.toUpperCase());\n this.cleanCache();\n }\n }\n }\n\n /**\n * Deletes a property from within this class.\n * @param name The property name to delete, lookup is case-insensitive\n * @internal\n */\n protected deletePropertySync(name: string): void {\n if (this._properties) {\n const property = this.getPropertySync(name);\n if (property) {\n this._properties.delete(name.toUpperCase());\n this.cleanCache();\n }\n }\n }\n\n\n /**\n * Searches, case-insensitive, for an ECProperty with given the name on this class and, by default, on\n * all base classes. Set excludeInherited to 'true' to only search the local class.\n * @param name The name of the property to retrieve.\n * @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.\n */\n public async getProperty(name: string, excludeInherited?: boolean): Promise<Property | undefined> {\n const upperKey = name.toUpperCase();\n let property: Property | undefined;\n\n if (this._properties) {\n property = this._properties.get(upperKey);\n if (property) {\n return property;\n }\n }\n\n if (excludeInherited) {\n return undefined;\n }\n\n if (!this._mergedPropertyCache) {\n this._mergedPropertyCache = await this.buildPropertyCache();\n }\n\n return this._mergedPropertyCache.get(upperKey);\n }\n\n /**\n * Searches, case-insensitive, for a local ECProperty with the name provided.\n * @param name The name of the property to retrieve.\n * @param excludeInherited If true, excludes inherited properties from the results. Defaults to false.\n */\n public getPropertySync(name: string, excludeInherited?: boolean): Property | undefined {\n const upperKey = name.toUpperCase();\n let property: Property | undefined;\n\n if (this._properties) {\n property = this._properties.get(upperKey);\n if (property) {\n return property;\n }\n }\n\n if (excludeInherited) {\n return undefined;\n }\n\n if (!this._mergedPropertyCache) {\n this._mergedPropertyCache = this.buildPropertyCacheSync();\n }\n\n return this._mergedPropertyCache.get(upperKey);\n }\n\n /**\n * Searches the base class, if one exists, for the property with the name provided.\n * @param name The name of the inherited property to find.\n */\n public async getInheritedProperty(name: string): Promise<Property | undefined> {\n if (this.baseClass) {\n const baseClassObj = await this.baseClass;\n return baseClassObj.getProperty(name);\n }\n\n return undefined;\n }\n\n /**\n * Searches the base class, if one exists, for the property with the name provided.\n * @param name The name of the inherited property to find.\n */\n public getInheritedPropertySync(name: string): Property | undefined {\n const baseClassObj = this.getBaseClassSync();\n if (baseClassObj)\n return baseClassObj.getPropertySync(name);\n\n return undefined;\n }\n\n /**\n * Creates a PrimitiveECProperty.\n * @param name The name of property to create.\n * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer\n * @throws ECSchemaStatus DuplicateProperty: thrown if a property with the same name already exists in the class.\n *\n * @internal\n */\n protected async createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;\n protected async createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;\n protected async createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property> {\n if (await this.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n const propType = await this.loadPrimitiveType(primitiveType, this.schema);\n if (typeof (propType) === \"number\")\n return this.addProperty(new PrimitiveProperty(this, name, propType));\n\n return this.addProperty(new EnumerationProperty(this, name, new DelayedPromiseWithProps(propType.key, async () => propType)));\n }\n\n /**\n * Creates a PrimitiveECProperty.\n * @param name The name of property to create.\n * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer\n * @throws ECSchemaStatus DuplicateProperty: thrown if a property with the same name already exists in the class.\n *\n * @internal\n */\n protected createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;\n protected createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;\n protected createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property {\n if (this.getPropertySync(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n const propType = this.loadPrimitiveTypeSync(primitiveType, this.schema);\n if (typeof (propType) === \"number\")\n return this.addProperty(new PrimitiveProperty(this, name, propType));\n\n return this.addProperty(new EnumerationProperty(this, name, new DelayedPromiseWithProps(propType.key, async () => propType)));\n }\n\n /**\n * Creates a PrimitiveArrayECProperty.\n * @param name The name of property to create.\n * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer\n *\n * @internal\n */\n protected async createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;\n protected async createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;\n protected async createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property> {\n if (await this.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n const propType = await this.loadPrimitiveType(primitiveType, this.schema);\n if (typeof (propType) === \"number\")\n return this.addProperty(new PrimitiveArrayProperty(this, name, propType));\n\n return this.addProperty(new EnumerationArrayProperty(this, name, new DelayedPromiseWithProps(propType.key, async () => propType)));\n }\n\n /**\n * Creates a PrimitiveArrayECProperty.\n * @param name The name of property to create.\n * @param primitiveType The primitive type of property to create. If not provided the default is PrimitiveType.Integer\n *\n * @internal\n */\n protected createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;\n protected createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;\n protected createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property {\n if (this.getPropertySync(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n const propType = this.loadPrimitiveTypeSync(primitiveType, this.schema);\n if (typeof (propType) === \"number\")\n return this.addProperty(new PrimitiveArrayProperty(this, name, propType));\n\n return this.addProperty(new EnumerationArrayProperty(this, name, new DelayedPromiseWithProps(propType.key, async () => propType)));\n }\n\n /**\n *\n * @param name The name of property to create.\n * @param structType The struct type of property to create.\n *\n * @internal\n */\n protected async createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty> {\n if (await this.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n return this.addProperty(new StructProperty(this, name, await this.loadStructType(structType, this.schema)));\n }\n\n /**\n *\n * @param name The name of property to create.\n * @param structType The struct type of property to create.\n *\n * @internal\n */\n protected createStructPropertySync(name: string, structType: string | StructClass): StructProperty {\n if (this.getPropertySync(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n return this.addProperty(new StructProperty(this, name, this.loadStructTypeSync(structType, this.schema)));\n }\n\n /**\n *\n * @param name\n * @param type\n *\n * @internal\n */\n protected async createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty> {\n if (await this.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n return this.addProperty(new StructArrayProperty(this, name, await this.loadStructType(structType, this.schema)));\n }\n\n /**\n *\n * @param name\n * @param type\n *\n * @internal\n */\n protected createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty {\n if (this.getPropertySync(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${this.name}.`);\n\n return this.addProperty(new StructArrayProperty(this, name, this.loadStructTypeSync(structType, this.schema)));\n }\n\n /**\n *\n * @param structType\n * @param schema\n * @returns\n *\n * @internal\n */\n protected async loadStructType(structType: string | StructClass | undefined, schema: Schema): Promise<StructClass> {\n let correctType: StructClass | undefined;\n if (typeof (structType) === \"string\") {\n correctType = await schema.lookupItem(structType, StructClass);\n } else\n correctType = structType;\n\n if (!correctType)\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);\n\n return correctType;\n }\n\n /**\n *\n * @param structType\n * @param schema\n * @returns\n *\n * @internal\n */\n protected loadStructTypeSync(structType: string | StructClass | undefined, schema: Schema): StructClass {\n let correctType: StructClass | undefined;\n if (typeof (structType) === \"string\") {\n correctType = schema.lookupItemSync(structType, StructClass);\n } else\n correctType = structType;\n\n if (!correctType)\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);\n\n return correctType;\n }\n\n /**\n *\n * @param primitiveType\n * @param schema\n * @returns\n *\n * @internal\n */\n protected async loadPrimitiveType(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): Promise<PrimitiveType | Enumeration> {\n if (primitiveType === undefined)\n return PrimitiveType.Integer;\n\n if (typeof (primitiveType) === \"string\") {\n let resolvedType: (PrimitiveType | Enumeration | undefined) = parsePrimitiveType(primitiveType);\n if (!resolvedType) {\n resolvedType = await schema.lookupItem(primitiveType, Enumeration);\n }\n\n if (resolvedType === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);\n\n // If resolvedType is a SchemaItem, make sure it is an Enumeration- if not, throw an error\n if (typeof (resolvedType) !== \"number\" && resolvedType.schemaItemType !== SchemaItemType.Enumeration)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);\n\n return resolvedType;\n }\n\n return primitiveType;\n }\n\n /**\n *\n * @param primitiveType\n * @param schema\n * @returns\n *\n * @internal\n */\n protected loadPrimitiveTypeSync(primitiveType: string | PrimitiveType | Enumeration | undefined, schema: Schema): PrimitiveType | Enumeration {\n if (primitiveType === undefined)\n return PrimitiveType.Integer;\n\n if (typeof (primitiveType) === \"string\") {\n let resolvedType: (PrimitiveType | Enumeration | undefined) = parsePrimitiveType(primitiveType);\n if (!resolvedType) {\n resolvedType = schema.lookupItemSync(primitiveType, Enumeration);\n }\n\n if (resolvedType === undefined)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided primitive type, ${primitiveType}, is not a valid PrimitiveType or Enumeration.`);\n\n return resolvedType;\n }\n\n return primitiveType;\n }\n\n /**\n * Save this Classes properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): ClassProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n const isMixin = SchemaItemType.Mixin === this.schemaItemType;\n const isRelationship = SchemaItemType.RelationshipClass === this.schemaItemType;\n if (!isMixin && (ECClassModifier.None !== this.modifier || isRelationship))\n schemaJson.modifier = classModifierToString(this.modifier);\n if (this.baseClass !== undefined)\n schemaJson.baseClass = this.baseClass.fullName;\n if (this._properties !== undefined && this._properties.size > 0)\n schemaJson.properties = [...this._properties.values()].map((prop) => prop.toJSON());\n\n const customAttributes = serializeCustomAttributes(this.customAttributes);\n if (customAttributes !== undefined)\n schemaJson.customAttributes = customAttributes;\n return schemaJson as ClassProps;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n\n if (undefined !== this.modifier)\n itemElement.setAttribute(\"modifier\", classModifierToString(this.modifier));\n\n if (undefined !== this.baseClass) {\n const baseClass = await this.baseClass;\n const baseClassElement = schemaXml.createElement(\"BaseClass\");\n const baseClassName = XmlSerializationUtils.createXmlTypedName(this.schema, baseClass.schema, baseClass.name);\n baseClassElement.textContent = baseClassName;\n itemElement.appendChild(baseClassElement);\n }\n\n if (this._properties) {\n for (const prop of this._properties.values()) {\n const propXml = await prop.toXml(schemaXml);\n itemElement.appendChild(propXml);\n }\n }\n\n if (this._customAttributes) {\n const caContainerElement = schemaXml.createElement(\"ECCustomAttributes\");\n for (const [name, attribute] of this._customAttributes) {\n const caElement = await XmlSerializationUtils.writeCustomAttribute(name, attribute, schemaXml, this.schema);\n caContainerElement.appendChild(caElement);\n }\n itemElement.appendChild(caContainerElement);\n }\n\n return itemElement;\n }\n\n public override fromJSONSync(classProps: ClassProps) {\n super.fromJSONSync(classProps);\n\n if (undefined !== classProps.modifier) {\n const modifier = parseClassModifier(classProps.modifier);\n if (undefined === modifier) {\n if (SchemaReadHelper.isECSpecVersionNewer({ readVersion: classProps.originalECSpecMajorVersion, writeVersion: classProps.originalECSpecMinorVersion } as ECSpecVersion))\n this._modifier = ECClassModifier.None;\n else\n throw new ECSchemaError(ECSchemaStatus.InvalidModifier, `The string '${classProps.modifier}' is not a valid ECClassModifier.`);\n } else {\n this._modifier = modifier;\n }\n }\n\n if (undefined !== classProps.baseClass) {\n const ecClassSchemaItemKey = this.schema.getSchemaItemKey(classProps.baseClass);\n if (!ecClassSchemaItemKey)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the baseClass ${classProps.baseClass}.`);\n\n const baseClass = this.schema.lookupItemSync(ecClassSchemaItemKey);\n\n let lazyBase: LazyLoadedECClass;\n if (!baseClass) {\n lazyBase = new DelayedPromiseWithProps<SchemaItemKey, ECClass>(ecClassSchemaItemKey,\n async () => {\n const baseItem = await this.schema.lookupItem(ecClassSchemaItemKey);\n if (undefined === baseItem || !ECClass.isECClass(baseItem))\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the baseClass ${classProps.baseClass}.`);\n return baseItem;\n });\n } else {\n lazyBase = new DelayedPromiseWithProps<SchemaItemKey, ECClass>(ecClassSchemaItemKey,\n async () => {\n return baseClass as ECClass;\n });\n }\n\n this._baseClass = lazyBase;\n\n if (!baseClass)\n return;\n\n this.addDerivedClass(baseClass as ECClass, this);\n }\n }\n\n public override async fromJSON(classProps: ClassProps): Promise<void> {\n this.fromJSONSync(classProps);\n }\n\n /**\n *\n * @param customAttribute\n *\n * @internal\n */\n protected addCustomAttribute(customAttribute: CustomAttribute) {\n if (!this._customAttributes)\n this._customAttributes = new Map<string, CustomAttribute>();\n\n this._customAttributes.set(customAttribute.className, customAttribute);\n }\n\n /**\n * Iterates (recursively) over all base classes and mixins, in \"property override\" order.\n * This is essentially a depth-first traversal through the inheritance tree.\n */\n public async *getAllBaseClasses(): AsyncIterable<ECClass> {\n const baseClasses: ECClass[] = [this];\n const addBaseClasses = async (ecClass: AnyClass) => {\n if (SchemaItemType.EntityClass === ecClass.schemaItemType) {\n for (let i = (ecClass as HasMixins).mixins.length - 1; i >= 0; i--) {\n baseClasses.push(await (ecClass as HasMixins).mixins[i]);\n }\n }\n\n if (ecClass.baseClass)\n baseClasses.push(await ecClass.baseClass);\n };\n\n while (baseClasses.length > 0) {\n const baseClass = baseClasses.pop() as AnyClass;\n await addBaseClasses(baseClass);\n if (baseClass !== this)\n yield baseClass as ECClass;\n }\n }\n\n public *getAllBaseClassesSync(): Iterable<AnyClass> {\n const baseClasses: ECClass[] = [this];\n const addBaseClasses = (ecClass: AnyClass) => {\n if (ecClass.schemaItemType === SchemaItemType.EntityClass) { // cannot use EntityClass typeguard because of circular reference\n for (const m of Array.from((ecClass as HasMixins).getMixinsSync()).reverse()) {\n baseClasses.push(m);\n }\n }\n\n const baseClass = ecClass.getBaseClassSync();\n if (baseClass)\n baseClasses.push(baseClass);\n };\n\n while (baseClasses.length > 0) {\n const baseClass = baseClasses.pop() as AnyClass;\n addBaseClasses(baseClass);\n if (baseClass !== this)\n yield baseClass;\n }\n }\n\n /**\n *\n * @param cache\n * @returns\n *\n * @internal\n */\nprotected async buildPropertyCache(): Promise<Map<string, Property>> {\n const cache = new Map<string, Property>();\n const baseClass = await this.baseClass;\n if (baseClass) {\n for (const property of await baseClass.getProperties()) {\n if (!cache.has(property.name.toUpperCase())) {\n cache.set(property.name.toUpperCase(), property);\n }\n }\n }\n\n if (this._properties) {\n this._properties.forEach(property => {\n cache.set(property.name.toUpperCase(), property);\n });\n }\n return cache;\n}\n\n /**\n *\n * @param cache\n * @returns\n *\n * @internal\n */\n protected buildPropertyCacheSync(): Map<string, Property> {\n const cache = new Map<string, Property>();\n const baseClass = this.getBaseClassSync();\n if (baseClass) {\n for (const property of baseClass.getPropertiesSync()) {\n if (!cache.has(property.name.toUpperCase())) {\n cache.set(property.name.toUpperCase(), property);\n }\n }\n }\n\n if (this._properties) {\n this._properties.forEach(property => {\n cache.set(property.name.toUpperCase(), property);\n });\n }\n return cache;\n }\n\n /**\n * Clears all caches on this object. This is called implicitly for this class,\n * but needs to be called if derived classes have changed.\n * @internal\n */\n public cleanCache() {\n this._mergedPropertyCache = undefined;\n }\n\n /**\n * Returns the properties on this class and its base classes.\n * Since this is an expensive operation, results will be cached after first call.\n * @param excludeInherited If true, only properties defined directly on this class will be returned. Defaults to false.\n * @returns An array of properties, empty array if none exist.\n */\n public getPropertiesSync(excludeInherited?: boolean): Iterable<Property> {\n if (excludeInherited) {\n return this._properties && this._properties.size > 0 ? this._properties.values() : [];\n }\n\n if (!this._mergedPropertyCache) {\n this._mergedPropertyCache = this.buildPropertyCacheSync();\n }\n\n return this._mergedPropertyCache.values();\n }\n\n /**\n * Quick way to check whether this class has any local properties without having to use the iterable\n */\n public get hasLocalProperties(): boolean {\n return this._properties !== undefined && this._properties.size > 0;\n }\n\n /**\n * Returns the properties on this class and its base classes.\n * Since this is an expensive operation, results will be cached after first call.\n * @param excludeInherited If true, only properties defined directly on this class will be returned.\n * @returns An array of properties, empty array if none exist.\n */\n public async getProperties(excludeInherited?: boolean): Promise<Iterable<Property>> {\n // At the moment we do not lazy load properties, so this is the same as getPropertiesSync\n return this.getPropertiesSync(excludeInherited);\n }\n\n /**\n * Retrieve all custom attributes in the current class and its bases\n * This is the async version of getCustomAttributesSync()\n */\n public async getCustomAttributes(): Promise<CustomAttributeSet> {\n return this.getCustomAttributesSync();\n }\n\n /**\n * Retrieve all custom attributes in the current class and its bases.\n */\n public getCustomAttributesSync(): CustomAttributeSet {\n let customAttributes: Map<string, CustomAttribute> | undefined = this._customAttributes;\n if (undefined === customAttributes) {\n customAttributes = new Map<string, CustomAttribute>();\n }\n\n this.traverseBaseClassesSync((ecClass: ECClass) => {\n if (undefined === ecClass.customAttributes)\n return false;\n\n for (const [className, customAttribute] of ecClass.customAttributes) {\n if (customAttributes.has(className))\n continue;\n customAttributes.set(className, customAttribute);\n }\n\n return false;\n });\n\n return customAttributes;\n }\n\n /**\n * Asynchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback\n * function for each base class encountered.\n * @param callback The function to call for each base class in the hierarchy.\n * @param arg An argument that will be passed as the second parameter to the callback function.\n */\n public async traverseBaseClasses(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): Promise<boolean> {\n for await (const baseClass of this.getAllBaseClasses()) {\n if (callback(baseClass, arg))\n return true;\n }\n\n return false;\n }\n\n /**\n * Synchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback\n * function for each base class encountered.\n * @param callback The function to call for each base class in the hierarchy.\n * @param arg An argument that will be passed as the second parameter to the callback function.\n */\n public traverseBaseClassesSync(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): boolean {\n const baseClasses = this.getAllBaseClassesSync();\n if (!baseClasses)\n return false;\n\n for (const baseClass of baseClasses) {\n if (callback(baseClass, arg))\n return true;\n }\n\n return false;\n }\n\n /**\n * Indicates if the targetClass is of this type.\n * @param targetClass The ECClass or ECClass name to check.\n * @param schemaName The schema name. Required if targetClass is the ECClass name.\n */\n public async is(targetClass: string, schemaName: string): Promise<boolean>;\n public async is(targetClass: ECClass): Promise<boolean>;\n public async is(targetClass: ECClass | string, schemaName?: string): Promise<boolean> {\n if (schemaName !== undefined) {\n assert(typeof (targetClass) === \"string\", \"Expected targetClass of type string because schemaName was specified\");\n\n const key = new SchemaItemKey(targetClass, new SchemaKey(schemaName));\n if (SchemaItem.equalByKey(this, key))\n return true;\n\n return this.traverseBaseClasses((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), key);\n } else {\n assert(ECClass.isECClass(targetClass), \"Expected targetClass to be of type ECClass\");\n\n if (SchemaItem.equalByKey(this, targetClass))\n return true;\n\n return this.traverseBaseClasses((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), targetClass);\n }\n }\n\n /**\n * A synchronous version of the [[ECClass.is]], indicating if the targetClass is of this type.\n * @param targetClass The class to check.\n */\n public isSync(targetClass: ECClass): boolean;\n public isSync(targetClass: string, schemaName: string): boolean;\n\n /** @internal */\n public isSync(targetClass: ECClass | string, schemaName?: string): boolean {\n if (schemaName !== undefined) {\n assert(typeof (targetClass) === \"string\", \"Expected targetClass of type string because schemaName was specified\");\n\n const key = new SchemaItemKey(targetClass, new SchemaKey(schemaName));\n if (SchemaItem.equalByKey(this, key))\n return true;\n\n return this.traverseBaseClassesSync((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), key);\n } else {\n assert(ECClass.isECClass(targetClass), \"Expected targetClass to be of type ECClass\");\n\n if (SchemaItem.equalByKey(this, targetClass))\n return true;\n\n return this.traverseBaseClassesSync((thisSchemaItem, thatSchemaItemOrKey) => SchemaItem.equalByKey(thisSchemaItem, thatSchemaItemOrKey), targetClass);\n }\n }\n\n /**\n * @internal\n */\n public static isECClass(object: any): object is ECClass {\n if (!SchemaItem.isSchemaItem(object))\n return false;\n\n return object.schemaItemType === SchemaItemType.EntityClass || object.schemaItemType === SchemaItemType.Mixin || object.schemaItemType === SchemaItemType.RelationshipClass ||\n object.schemaItemType === SchemaItemType.StructClass || object.schemaItemType === SchemaItemType.CustomAttributeClass;\n }\n\n /**\n * A setter method for the ECClass modifier, used specifically for schema editing.\n * @param modifier\n * @internal\n */\n protected setModifier(modifier: ECClassModifier) {\n this._modifier = modifier;\n }\n\n /**\n * Adds an ECClass to the derived class collection. This method is only intended to update the local\n * cache of derived classes. For adding a class to the hierarchy, use the baseClass setter method.\n * @param prop The property to add.\n * @return The property that was added.\n */\n private addDerivedClass(baseClass: ECClass, derivedClass: ECClass) {\n if (!baseClass._derivedClasses)\n baseClass._derivedClasses = new Map<string, LazyLoadedECClass>();\n\n if (baseClass._derivedClasses.has(derivedClass.fullName))\n return;\n\n if (derivedClass.isSync(baseClass)) {\n const promise = new DelayedPromiseWithProps<SchemaItemKey, ECClass>(derivedClass.key, async () => derivedClass);\n baseClass._derivedClasses.set(derivedClass.fullName, promise);\n }\n }\n\n /**\n * Removes an ECClass from the derived class collection. This method is only intended to update the local\n * cache of derived classes. For updating the class hierarchy, use the baseClass setter method.\n * @param prop The property to add.\n * @return The property that was added.\n */\n private removeDerivedClass(baseClass: ECClass, derivedClass: ECClass) {\n if (!baseClass._derivedClasses)\n return;\n\n if (!baseClass._derivedClasses.has(derivedClass.fullName))\n return;\n\n baseClass._derivedClasses.delete(derivedClass.fullName);\n }\n}\n\n/**\n * A Typescript class representation of an ECStructClass.\n * @public @preview\n */\nexport class StructClass extends ECClass {\n /**\n * Get the type of item represented by this instance\n */\n public override readonly schemaItemType = StructClass.schemaItemType;\n\n /**\n * Get the type of item represented by this class\n * @internal\n */\n public static override get schemaItemType() { return SchemaItemType.StructClass; }\n /**\n * Type guard to check if the SchemaItem is of type StructClass.\n * @param item The SchemaItem to check.\n * @returns True if the item is a StructClass, false otherwise.\n */\n public static isStructClass(item?: SchemaItem): item is StructClass {\n if (item && item.schemaItemType === SchemaItemType.StructClass)\n return true;\n\n return false;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type StructClass.\n * @param item The SchemaItem to check.\n * @returns The item cast to StructClass if it is a StructClass, undefined otherwise.\n * @internal\n */\n public static assertIsStructClass(item?: SchemaItem): asserts item is StructClass {\n if (!this.isStructClass(item))\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.StructClass}' (StructClass)`);\n }\n}\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableStructClass extends StructClass {\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n\n/**\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\n * @internal\n */\nexport abstract class MutableClass extends ECClass {\n public abstract override setBaseClass(baseClass: LazyLoadedECClass | undefined): Promise<void>;\n public abstract override addCustomAttribute(customAttribute: CustomAttribute): void;\n public abstract override setModifier(modifier: ECClassModifier): void;\n public abstract override setName(name: string): void;\n public abstract override createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty>;\n public abstract override createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty>;\n public abstract override createPrimitiveProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;\n\n public abstract override createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty;\n public abstract override createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty;\n public abstract override createPrimitivePropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;\n\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty>;\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty>;\n public abstract override createPrimitiveArrayProperty(name: string, primitiveType?: string | PrimitiveType | Enumeration): Promise<Property>;\n\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty;\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty;\n public abstract override createPrimitiveArrayPropertySync(name: string, primitiveType?: string | PrimitiveType | Enumeration): Property;\n\n public abstract override createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty>;\n public abstract override createStructPropertySync(name: string, structType: string | StructClass): StructProperty;\n\n public abstract override createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty>;\n public abstract override createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty;\n\n public abstract override deleteProperty(name: string): Promise<void>;\n public abstract override deletePropertySync(name: string): void;\n}\n"]}
1
+ {"version":3,"file":"Class.js","sourceRoot":"","sources":["../../../src/Metadata/Class.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,sDAA4D;AAE5D,oFAAiF;AACjF,4CAA8L;AAC9L,4CAA6D;AAE7D,4CAAwD;AACxD,uDAAkI;AAClI,+CAA4C;AAC5C,yCAEoB;AAEpB,6CAA0C;AAC1C,sDAA4E;AAE5E;;;GAGG;AACH,MAAsB,OAAQ,SAAQ,uBAAU;IAC9C,gBAAgB;IACT,MAAM,KAAc,cAAc,KAA8B,OAAO,kCAAsB,CAAC,KAAK,CAAC,CAAC,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CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED;;OAEG;IACO,YAAY,CAAC,SAAiB;QACtC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;IAED;;OAEG;IACO,cAAc,CAAC,WAAmB;QAC1C,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,UAAU,CAAC,IAAiB;QACxC,IAAI,IAAI,IAAI,IAAI,CAAC,cAAc,KAAK,0BAAc,CAAC,QAAQ;YACzD,OAAO,IAAI,CAAC;QAEd,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,gBAAgB,CAAC,IAAiB;QAC9C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YACxB,MAAM,IAAI,yBAAa,CAAC,0BAAc,CAAC,qBAAqB,EAAE,aAAa,0BAAc,CAAC,QAAQ,cAAc,CAAC,CAAC;IACtH,CAAC;CACF;AA9ID,4BA8IC;AACD;;;GAGG;AACH,MAAsB,eAAgB,SAAQ,QAAQ;CAMrD;AAND,0CAMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { DelayedPromiseWithProps } from \"../DelayedPromise\";\nimport { ConstantProps } from \"../Deserialization/JsonProps\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { SchemaItemType } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { LazyLoadedPhenomenon } from \"../Interfaces\";\nimport { SchemaItemKey } from \"../SchemaKey\";\nimport { Phenomenon } from \"./Phenomenon\";\nimport { Schema } from \"./Schema\";\nimport { SchemaItem } from \"./SchemaItem\";\n\n/**\n * A Constant is a specific type of Unit that represents a number.\n * @public @preview\n */\nexport class Constant extends SchemaItem {\n public override readonly schemaItemType = Constant.schemaItemType;\n /** @internal */\n public static override get schemaItemType() { return SchemaItemType.Constant; }\n private _phenomenon?: LazyLoadedPhenomenon;\n private _definition: string;\n private _numerator?: number;\n private _denominator?: number;\n\n /** @internal */\n constructor(schema: Schema, name: string) {\n super(schema, name);\n this._definition = \"\";\n }\n\n public get phenomenon(): LazyLoadedPhenomenon | undefined { return this._phenomenon; }\n public get definition(): string { return this._definition; }\n public get numerator(): number { return this._numerator ?? 1.0; }\n public get denominator(): number { return this._denominator ?? 1.0; }\n public get hasNumerator(): boolean { return (this._numerator !== undefined); }\n public get hasDenominator(): boolean { return (this._denominator !== undefined); }\n\n /**\n * Save this Constants properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): ConstantProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n if (this.phenomenon !== undefined)\n schemaJson.phenomenon = this.phenomenon.fullName;\n schemaJson.definition = this.definition;\n if (this.hasNumerator)\n schemaJson.numerator = this.numerator;\n if (this.hasDenominator)\n schemaJson.denominator = this.denominator;\n return schemaJson as ConstantProps;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n itemElement.setAttribute(\"definition\", this.definition);\n if (this.hasNumerator)\n itemElement.setAttribute(\"numerator\", this.numerator.toString());\n if (this.hasDenominator)\n itemElement.setAttribute(\"denominator\", this.denominator.toString());\n\n const phenomenon = await this.phenomenon;\n if (undefined !== phenomenon) {\n const phenomenonName = XmlSerializationUtils.createXmlTypedName(this.schema, phenomenon.schema, phenomenon.name);\n itemElement.setAttribute(\"phenomenon\", phenomenonName);\n }\n\n return itemElement;\n }\n\n public override fromJSONSync(constantProps: ConstantProps) {\n super.fromJSONSync(constantProps);\n\n const schemaItemKey = this.schema.getSchemaItemKey(constantProps.phenomenon);\n if (!schemaItemKey)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the phenomenon ${constantProps.phenomenon}.`);\n this._phenomenon = new DelayedPromiseWithProps<SchemaItemKey, Phenomenon>(schemaItemKey,\n async () => {\n const phenom = await this.schema.lookupItem(schemaItemKey, Phenomenon);\n if (undefined === phenom)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the phenomenon ${constantProps.phenomenon}.`);\n return phenom;\n });\n\n if (this._definition !== \"\" && constantProps.definition.toLowerCase() !== this._definition.toLowerCase())\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Constant ${this.name} has an invalid 'definition' attribute.`);\n else if (this._definition === \"\")\n this._definition = constantProps.definition;\n\n if (undefined !== constantProps.numerator) {\n if (constantProps.numerator !== this._numerator)\n this._numerator = constantProps.numerator;\n }\n\n if (undefined !== constantProps.denominator) {\n if (constantProps.denominator !== this._denominator)\n this._denominator = constantProps.denominator;\n }\n }\n\n public override async fromJSON(constantProps: ConstantProps) {\n this.fromJSONSync(constantProps);\n }\n\n /**\n * @param phenomenon A LazyLoadedPhenomenon.\n * @internal\n */\n protected setPhenomenon(phenomenon: LazyLoadedPhenomenon) {\n this._phenomenon = phenomenon;\n }\n\n /**\n * @internal\n */\n protected setDefinition(definition: string) {\n this._definition = definition;\n }\n\n /**\n * @internal\n */\n protected setNumerator(numerator: number) {\n this._numerator = numerator;\n }\n\n /**\n * @internal\n */\n protected setDenominator(denominator: number) {\n this._denominator = denominator;\n }\n\n /**\n * Type guard to check if the SchemaItem is of type Constant.\n * @param item The SchemaItem to check.\n * @returns True if the item is a Constant, false otherwise.\n */\n public static isConstant(item?: SchemaItem): item is Constant {\n if (item && item.schemaItemType === SchemaItemType.Constant)\n return true;\n\n return false;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type Constant.\n * @param item The SchemaItem to check.\n * @returns The item cast to Constant if it is a Constant, undefined otherwise.\n * @internal\n */\n public static assertIsConstant(item?: SchemaItem): asserts item is Constant {\n if (!this.isConstant(item))\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.Constant}' (Constant)`);\n }\n}\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableConstant extends Constant {\n public abstract override setPhenomenon(phenomenon: LazyLoadedPhenomenon): void;\n public abstract override setDefinition(definition: string): void;\n public abstract override setNumerator(numerator: number): void;\n public abstract override setDenominator(denominator: number): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
1
+ {"version":3,"file":"Constant.js","sourceRoot":"","sources":["../../../src/Metadata/Constant.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA4D;AAE5D,oFAAiF;AACjF,4CAA8C;AAC9C,4CAA6D;AAG7D,6CAA0C;AAE1C,6CAA0C;AAE1C;;;GAGG;AACH,MAAa,QAAS,SAAQ,uBAAU;IACb,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;IAClE,gBAAgB;IACT,MAAM,KAAc,cAAc,KAAK,OAAO,0BAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvE,WAAW,CAAwB;IACnC,WAAW,CAAS;IACpB,UAAU,CAAU;IACpB,YAAY,CAAU;IAE9B,gBAAgB;IAChB,YAAY,MAAc,EAAE,IAAY;QACtC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACpB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;IACxB,CAAC;IAED,IAAW,UAAU,KAAuC,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IACtF,IAAW,UAAU,KAAa,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5D,IAAW,SAAS,KAAa,OAAO,IAAI,CAAC,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC;IACjE,IAAW,WAAW,KAAa,OAAO,IAAI,CAAC,YAAY,IAAI,G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C;IACtH,CAAC;CACF;AA9ID,4BA8IC;AACD;;;GAGG;AACH,MAAsB,eAAgB,SAAQ,QAAQ;CAMrD;AAND,0CAMC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CustomAttribute.js","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AA+BH,8DAcC;AAfD,gBAAgB;AAChB,SAAgB,yBAAyB,CAAC,gBAAgD;IACxF,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC,CAAC,gCAAgC;QACpE,MAAM,UAAU,GAAU,EAAE,CAAC;QAC7B,KAAK,MAAM,CAAC,EAAE,eAAe,CAAC,IAAI,gBAAgB,EAAE,CAAC;YACnD,MAAM,SAAS,GAA6B,EAAE,CAAC;YAC/C,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,QAAa,EAAE,EAAE;gBACjD,MAAM,YAAY,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;gBACzC,SAAS,CAAC,YAAY,CAAC,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;YACH,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { Schema } from \"./Schema\";\n\n/** @public @preview */\nexport interface CustomAttribute {\n className: string;\n [propName: string]: any;\n}\n\n/**\n* A collection of custom attributes, accessed by full class names in the format `SchemaName.ClassName`.\n* Iterates over, checks, and retrieves attributes. Class names are case-insensitive, separated by a dot (`.`).\n* @param className - The full class name.\n* @returns Iterator, boolean, or custom attribute.\n* @public @preview\n*/\nexport interface CustomAttributeSet {\n [Symbol.iterator]: () => IterableIterator<[string, CustomAttribute]>;\n has(className: string): boolean;\n get(className: string): CustomAttribute | undefined;\n}\n\n/** @public @preview */\nexport interface CustomAttributeContainerProps {\n customAttributes?: CustomAttributeSet;\n fullName: string;\n schema: Schema;\n}\n\n/** @internal */\nexport function serializeCustomAttributes(customAttributes: CustomAttributeSet | undefined): any[] | undefined {\n if (undefined !== customAttributes) { // custom attributes is optional\n const attributes: any[] = [];\n for (const [, customAttribute] of customAttributes) {\n const attribute: { [value: string]: any } = {};\n Object.keys(customAttribute).map((property: any) => {\n const propertyName = property.toString();\n attribute[propertyName] = customAttribute[property];\n });\n attributes.push(attribute);\n }\n return (attributes.length > 0) ? attributes : undefined;\n }\n return undefined;\n}\n"]}
1
+ {"version":3,"file":"CustomAttribute.js","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AA+BH,8DAcC;AAfD,gBAAgB;AAChB,SAAgB,yBAAyB,CAAC,gBAAgD;IACxF,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC,CAAC,gCAAgC;QACpE,MAAM,UAAU,GAAU,EAAE,CAAC;QAC7B,KAAK,MAAM,CAAC,EAAE,eAAe,CAAC,IAAI,gBAAgB,EAAE,CAAC;YACnD,MAAM,SAAS,GAA6B,EAAE,CAAC;YAC/C,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,QAAa,EAAE,EAAE;gBACjD,MAAM,YAAY,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;gBACzC,SAAS,CAAC,YAAY,CAAC,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;YACH,UAAU,CAAC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AAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACjD,WAAW,CAAC,YAAY,CAAC,WAAW,EAAE,IAAA,iCAAqB,EAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;QAC7E,OAAO,WAAW,CAAC;IACrB,CAAC;IAEe,YAAY,CAAC,oBAA+C;QAC1E,KAAK,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;QACzC,MAAM,SAAS,GAAG,IAAA,6CAAiC,EAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;QACpF,IAAI,SAAS,KAAK,SAAS;YACzB,MAAM,IAAI,yBAAa,CAAC,0BAAc,CAAC,oBAAoB,EAAE,GAAG,SAAS,+CAA+C,CAAC,CAAC;QAC5H,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;IAEe,KAAK,CAAC,QAAQ,CAAC,oBAA+C;QAC5E,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACO,YAAY,CAAC,aAA2C;QAChE,IAAI,CAAC,UAAU,GAAG,aAAa,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,sBAAsB,CAAC,IAAiB;QACpD,IAAI,IAAI,IAAI,IAAI,CAAC,cAAc,KAAK,0BAAc,CAAC,oBAAoB;YACrE,OAAO,IAAI,CAAC;QAEd,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,4BAA4B,CAAC,IAAiB;QAC1D,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC;YACpC,MAAM,IAAI,yBAAa,CAAC,0BAAc,CAAC,qBAAqB,EAAE,aAAa,0BAAc,CAAC,oBAAoB,0BAA0B,CAAC,CAAC;IAC9I,CAAC;CACF;AA9ED,oDA8EC;AACD;;;GAGG;AACH,MAAsB,cAAe,SAAQ,oBAAoB;CAGhE;AAHD,wCAGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { CustomAttributeClassProps } from \"../Deserialization/JsonProps\";\nimport {\n containerTypeToString, CustomAttributeContainerType, parseCustomAttributeContainerType, SchemaItemType,\n} from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { ECClass } from \"./Class\";\nimport { SchemaItem } from \"./SchemaItem\";\n\n/**\n * A Typescript class representation of an ECCustomAttributeClass.\n * @public @preview\n */\nexport class CustomAttributeClass extends ECClass {\n public override readonly schemaItemType = CustomAttributeClass.schemaItemType;\n /** @internal */\n public static override get schemaItemType() { return SchemaItemType.CustomAttributeClass; }\n private _appliesTo?: CustomAttributeContainerType;\n\n /**\n * @deprecated in 4.8 - will not be removed until after 2026-06-13. Use [[appliesTo]]\n * */\n public get containerType(): CustomAttributeContainerType {\n return this.appliesTo;\n }\n\n public get appliesTo(): CustomAttributeContainerType {\n if (undefined === this._appliesTo)\n throw new ECSchemaError(ECSchemaStatus.InvalidContainerType, `The CustomAttributeClass ${this.name} does not have a CustomAttributeContainerType.`);\n return this._appliesTo;\n }\n\n /**\n * Save this CustomAttributeClasses properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): CustomAttributeClassProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n schemaJson.appliesTo = containerTypeToString(this.appliesTo);\n return schemaJson as CustomAttributeClassProps;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n itemElement.setAttribute(\"appliesTo\", containerTypeToString(this.appliesTo));\n return itemElement;\n }\n\n public override fromJSONSync(customAttributeProps: CustomAttributeClassProps) {\n super.fromJSONSync(customAttributeProps);\n const appliesTo = parseCustomAttributeContainerType(customAttributeProps.appliesTo);\n if (undefined === appliesTo)\n throw new ECSchemaError(ECSchemaStatus.InvalidContainerType, `${appliesTo} is not a valid CustomAttributeContainerType.`);\n this._appliesTo = appliesTo;\n }\n\n public override async fromJSON(customAttributeProps: CustomAttributeClassProps) {\n this.fromJSONSync(customAttributeProps);\n }\n\n /**\n * @internal\n */\n protected setAppliesTo(containerType: CustomAttributeContainerType) {\n this._appliesTo = containerType;\n }\n\n /**\n * Type guard to check if the SchemaItem is of type CustomAttributeClass.\n * @param item The SchemaItem to check.\n * @returns True if the item is a CustomAttributeClass, false otherwise.\n */\n public static isCustomAttributeClass(item?: SchemaItem): item is CustomAttributeClass {\n if (item && item.schemaItemType === SchemaItemType.CustomAttributeClass)\n return true;\n\n return false;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type CustomAttributeClass.\n * @param item The SchemaItem to check.\n * @returns The item cast to CustomAttributeClass if it is a CustomAttributeClass, undefined otherwise.\n * @internal\n */\n public static assertIsCustomAttributeClass(item?: SchemaItem): asserts item is CustomAttributeClass {\n if (!this.isCustomAttributeClass(item))\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.CustomAttributeClass}' (CustomAttributeClass)`);\n }\n}\n/**\n * @internal\n * An abstract class used for Schema editing.\n */\nexport abstract class MutableCAClass extends CustomAttributeClass {\n public abstract override setAppliesTo(containerType: CustomAttributeContainerType): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
1
+ {"version":3,"file":"CustomAttributeClass.js","sourceRoot":"","sources":["../../../src/Metadata/CustomAttributeClass.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,4CAEsB;AACtB,4CAA6D;AAC7D,mCAAkC;AAGlC;;;GAGG;AACH,MAAa,oBAAqB,SAAQ,eAAO;IACtB,cAAc,GAAG,oBAAoB,CAAC,cAAc,CAAC;IAC9E,gBAAgB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,CAAC,0BAAc,CAAC,iBAAiB,EAAE,+BAA+B,IAAI,gCAAgC,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC;IAEhJ,IAAI,oBAAmD,CAAC;IACxD,IAAI,OAAO,CAAC,YAAY,CAAC,KAAK,QAAQ,EAAE,CAAC;QACvC,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,YAAY,EAAE,qCAAiB,CAAC,CAAC;IACxF,CAAC;;QACC,oBAAoB,GAAG,YAAY,CAAC;IAEtC,IAAI,CAAC,oBAAoB;QACvB,MAAM,IAAI,yBAAa,CAAC,0BAAc,CAAC,WAAW,EAAE,mCAAmC,YAAY,8CAA8C,CAAC,CAAC,CAAE,2DAA2D;IAElN,IAAI,OAAO,CAAC,SAAS,CAAC,KAAK,QAAQ,EAAE,CAAC;QACpC,MAAM,YAAY,GAAG,IAAA,kCAAsB,EAAC,SAAS,CAAC,CAAC;QACvD,IAAI,SAAS,KAAK,YAAY;YAC5B,MAAM,IAAI,yBAAa,CAAC,0BAAc,CAAC,wBAAwB,EAAE,mCAAmC,SAAS,qCAAqC,CAAC,CAAC;QACtJ,SAAS,GAAG,YAAY,CAAC;IAC3B,CAAC;IAED,MAAM,gBAAgB,GAAG,IAAI,wCAAuB,CAAC,oBAAoB,CAAC,GAAG,EAAE,KAAK,IAAI,EAAE,CAAC,oBAAoB,CAAC,CAAC;IACjH,OAAO,IAAI,6BAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,SAAS,CAAC,CAAC;AAC5E,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { DelayedPromiseWithProps } from \"../DelayedPromise\";\nimport { EntityClassProps } from \"../Deserialization/JsonProps\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { parseStrengthDirection, SchemaItemType, StrengthDirection } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { HasMixins, LazyLoadedMixin } from \"../Interfaces\";\nimport { SchemaItemKey } from \"../SchemaKey\";\nimport { ECClass } from \"./Class\";\nimport { Mixin } from \"./Mixin\";\nimport { AnyProperty, NavigationProperty, Property } from \"./Property\";\nimport { RelationshipClass } from \"./RelationshipClass\";\nimport { SchemaItem } from \"./SchemaItem\";\n\n/**\n * A Typescript class representation of an ECEntityClass.\n * @public @preview\n */\nexport class EntityClass extends ECClass implements HasMixins {\n public override readonly schemaItemType = EntityClass.schemaItemType;\n /** @internal */\n public static override get schemaItemType() { return SchemaItemType.EntityClass; }\n private _mixins?: LazyLoadedMixin[];\n\n public get mixins(): ReadonlyArray<LazyLoadedMixin> {\n if (!this._mixins)\n return [];\n return this._mixins;\n }\n\n public *getMixinsSync(): Iterable<Mixin> {\n if (!this._mixins)\n return;\n\n for (const mixin of this._mixins) {\n const mObj = this.schema.lookupItemSync(mixin, Mixin);\n if (mObj) {\n yield mObj;\n }\n }\n }\n\n /**\n *\n * @param mixin\n * @internal\n */\n protected addMixin(mixin: Mixin) {\n if (!this._mixins)\n this._mixins = [];\n\n this._mixins.push(new DelayedPromiseWithProps(mixin.key, async () => mixin));\n return;\n }\n\n /**\n * Searches the base class, if one exists, first then any mixins that exist for the property with the name provided.\n * @param name The name of the property to find.\n */\n public override async getInheritedProperty(name: string): Promise<AnyProperty | undefined> {\n let inheritedProperty = await super.getInheritedProperty(name);\n\n if (!inheritedProperty && this._mixins) {\n const mixinProps = await Promise.all(this._mixins.map(async (mixin) => (await mixin).getProperty(name)));\n mixinProps.some((prop) => {\n inheritedProperty = prop as AnyProperty;\n return inheritedProperty !== undefined;\n });\n }\n\n return inheritedProperty as AnyProperty | undefined;\n }\n\n /**\n * Searches the base class, if one exists, first then any mixins that exist for the property with the name provided.\n * @param name The name of the property to find.\n */\n public override getInheritedPropertySync(name: string): Property | undefined {\n const inheritedProperty = super.getInheritedPropertySync(name);\n if (inheritedProperty)\n return inheritedProperty;\n\n if (!this._mixins) {\n return undefined;\n }\n\n for (const mixin of this._mixins) {\n const mObj = this.schema.lookupItemSync(mixin);\n if (mObj && ECClass.isECClass(mObj)) {\n const result = mObj.getPropertySync(name, true);\n if (result) {\n return result;\n }\n }\n }\n\n return undefined;\n }\n\n /**\n *\n * @param cache\n * @returns\n *\n * @internal\n */\nprotected override async buildPropertyCache(): Promise<Map<string, Property>> {\n const cache = new Map<string, Property>();\n const baseClass = await this.baseClass;\n if (baseClass) {\n for (const property of await baseClass.getProperties()) {\n if (!cache.has(property.name.toUpperCase()))\n cache.set(property.name.toUpperCase(), property);\n }\n }\n\n for (const mixin of this.mixins) {\n const mixinObj = await mixin;\n const mixinProps = mixinObj.getPropertiesSync();\n for (const property of mixinProps) {\n if (!cache.has(property.name.toUpperCase()))\n cache.set(property.name.toUpperCase(), property);\n }\n }\n\n const localProps = await this.getProperties(true);\n if (localProps) {\n for (const property of localProps) {\n cache.set(property.name.toUpperCase(), property);\n }\n }\n return cache;\n}\n\n /**\n *\n * @param cache\n * @internal\n */\n protected override buildPropertyCacheSync(): Map<string, Property> {\n const cache = new Map<string, Property>();\n const baseClass = this.getBaseClassSync();\n if (baseClass) {\n Array.from(baseClass.getPropertiesSync()).forEach((property) => {\n if (!cache.has(property.name.toUpperCase()))\n cache.set(property.name.toUpperCase(), property);\n });\n }\n\n for (const mixin of this.getMixinsSync()) {\n const mixinProps = mixin.getPropertiesSync();\n for (const property of mixinProps) {\n if (!cache.has(property.name.toUpperCase()))\n cache.set(property.name.toUpperCase(), property);\n }\n }\n\n const localProps = this.getPropertiesSync(true);\n if (localProps) {\n Array.from(localProps).forEach(property => {\n cache.set(property.name.toUpperCase(), property);\n });\n }\n return cache;\n }\n\n /**\n *\n * @param name\n * @param relationship\n * @param direction\n * @internal\n */\n protected async createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty> {\n return this.addProperty(await createNavigationProperty(this, name, relationship, direction));\n }\n\n /**\n *\n * @param name\n * @param relationship\n * @param direction\n * @internal\n */\n protected createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty {\n return this.addProperty(createNavigationPropertySync(this, name, relationship, direction));\n }\n\n /**\n * Save this EntityClass' properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): EntityClassProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n if (this.mixins.length > 0)\n schemaJson.mixins = this.mixins.map((mixin) => mixin.fullName);\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n\n for (const lazyMixin of this.mixins) {\n const mixin = await lazyMixin;\n const mixinElement = schemaXml.createElement(\"BaseClass\");\n const mixinName = XmlSerializationUtils.createXmlTypedName(this.schema, mixin.schema, mixin.name);\n mixinElement.textContent = mixinName;\n itemElement.appendChild(mixinElement);\n }\n return itemElement;\n }\n\n public override async fromJSON(entityClassProps: EntityClassProps) {\n this.fromJSONSync(entityClassProps);\n }\n\n public override fromJSONSync(entityClassProps: EntityClassProps) {\n super.fromJSONSync(entityClassProps);\n\n if (undefined !== entityClassProps.mixins) {\n if (!this._mixins)\n this._mixins = [];\n for (const name of entityClassProps.mixins) {\n const mixinSchemaItemKey = this.schema.getSchemaItemKey(name);\n if (!mixinSchemaItemKey)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The ECEntityClass ${this.name} has a mixin (\"${name}\") that cannot be found.`);\n\n if (!this._mixins.find((value) => mixinSchemaItemKey.matchesFullName(value.fullName))) {\n this._mixins.push(new DelayedPromiseWithProps<SchemaItemKey, Mixin>(mixinSchemaItemKey,\n async () => {\n const mixin = await this.schema.lookupItem(mixinSchemaItemKey, Mixin);\n if (undefined === mixin)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The ECEntityClass ${this.name} has a mixin (\"${name}\") that cannot be found.`);\n return mixin;\n }));\n }\n }\n }\n }\n\n /**\n * Type guard to check if the SchemaItem is of type EntityClass.\n * @param item The SchemaItem to check.\n * @returns True if the item is an EntityClass, false otherwise.\n */\n public static isEntityClass(item?: SchemaItem): item is EntityClass {\n if (item && item.schemaItemType === SchemaItemType.EntityClass)\n return true;\n\n return false;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type EntityClass.\n * @param item The SchemaItem to check.\n * @returns The item cast to EntityClass if it is an EntityClass, undefined otherwise.\n * @internal\n */\n public static assertIsEntityClass(item?: SchemaItem): asserts item is EntityClass {\n if (!this.isEntityClass(item))\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.EntityClass}' (EntityClass)`);\n }\n}\n\n/**\n * Hackish approach that works like a \"friend class\" so we can access protected members without making them public.\n * @internal\n */\nexport abstract class MutableEntityClass extends EntityClass {\n public abstract override addMixin(mixin: Mixin): any;\n public abstract override createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty>;\n public abstract override createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n\n/** @internal */\nexport async function createNavigationProperty(ecClass: ECClass, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty> {\n if (await ecClass.getProperty(name, true))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${ecClass.name}.`);\n\n let resolvedRelationship: RelationshipClass | undefined;\n if (typeof (relationship) === \"string\") {\n resolvedRelationship = await ecClass.schema.lookupItem(relationship, RelationshipClass);\n } else\n resolvedRelationship = relationship;\n\n if (!resolvedRelationship)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided RelationshipClass, ${relationship}, is not a valid RelationshipClassInterface.`); // eslint-disable-line @typescript-eslint/no-base-to-string\n\n if (typeof (direction) === \"string\") {\n const tmpDirection = parseStrengthDirection(direction);\n if (undefined === tmpDirection)\n throw new ECSchemaError(ECSchemaStatus.InvalidStrengthDirection, `The provided StrengthDirection, ${direction}, is not a valid StrengthDirection.`);\n direction = tmpDirection;\n }\n\n const lazyRelationship = new DelayedPromiseWithProps(resolvedRelationship.key, async () => resolvedRelationship);\n return new NavigationProperty(ecClass, name, lazyRelationship, direction);\n}\n\n/** @internal */\nexport function createNavigationPropertySync(ecClass: ECClass, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty {\n if (ecClass.getPropertySync(name))\n throw new ECSchemaError(ECSchemaStatus.DuplicateProperty, `An ECProperty with the name ${name} already exists in the class ${ecClass.name}.`);\n\n let resolvedRelationship: RelationshipClass | undefined;\n if (typeof (relationship) === \"string\") {\n resolvedRelationship = ecClass.schema.lookupItemSync(relationship, RelationshipClass);\n } else\n resolvedRelationship = relationship;\n\n if (!resolvedRelationship)\n throw new ECSchemaError(ECSchemaStatus.InvalidType, `The provided RelationshipClass, ${relationship}, is not a valid RelationshipClassInterface.`); // eslint-disable-line @typescript-eslint/no-base-to-string\n\n if (typeof (direction) === \"string\") {\n const tmpDirection = parseStrengthDirection(direction);\n if (undefined === tmpDirection)\n throw new ECSchemaError(ECSchemaStatus.InvalidStrengthDirection, `The provided StrengthDirection, ${direction}, is not a valid StrengthDirection.`);\n direction = tmpDirection;\n }\n\n const lazyRelationship = new DelayedPromiseWithProps(resolvedRelationship.key, async () => resolvedRelationship);\n return new NavigationProperty(ecClass, name, lazyRelationship, direction);\n}\n"]}
1
+ {"version":3,"file":"EntityClass.js","sourceRoot":"","sources":["../../../src/Metadata/EntityClass.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAuRH,4DAsBC;AAGD,oEAsBC;AApUD,sDAA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AE,CAAC;YAC/C,gBAAgB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,UAA2B,EAAE,EAAE;gBACnE,4JAA4J;gBAC5J,yFAAyF;gBACzF,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;YACzH,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAEe,KAAK,CAAC,QAAQ,CAAC,gBAAkC;QAC/D,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACO,WAAW,CAAC,QAAiB;QACrC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,aAAa,CAAC,IAAiB;QAC3C,OAAO,IAAI,EAAE,cAAc,KAAK,0BAAc,CAAC,WAAW,CAAC;IAC7D,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,mBAAmB,CAAC,IAAiB;QACjD,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;YAC3B,MAAM,IAAI,yBAAa,CAAC,0BAAc,CAAC,qBAAqB,EAAE,aAAa,0BAAc,CAAC,WAAW,iBAAiB,CAAC,CAAC;IAC5H,CAAC;CACF;AA1LD,kCA0LC;AAED;;;;GAIG;AACH,MAAsB,kBAAmB,SAAQ,WAAW;CAI3D;AAJD,gDAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { ECSpecVersion, SchemaReadHelper } from \"../Deserialization/Helper\";\nimport { EnumerationProps, EnumeratorProps } from \"../Deserialization/JsonProps\";\nimport { PrimitiveType, primitiveTypeToString, SchemaItemType } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { ECName } from \"../ECName\";\nimport { Schema } from \"./Schema\";\nimport { SchemaItem } from \"./SchemaItem\";\n\n/** @public @preview */\nexport interface Enumerator<T> {\n readonly name: string;\n readonly value: T;\n readonly label?: string;\n readonly description?: string;\n}\n\n/** @public @preview */\nexport type AnyEnumerator = Enumerator<string | number>;\n\n/**\n * A Typescript class representation of an ECEnumeration.\n * @public @preview\n */\nexport class Enumeration extends SchemaItem {\n public override readonly schemaItemType = Enumeration.schemaItemType;\n /** @internal */\n public static override get schemaItemType() { return SchemaItemType.Enumeration; }\n private _type?: PrimitiveType.Integer | PrimitiveType.String;\n private _isStrict: boolean;\n private _enumerators: AnyEnumerator[];\n\n public get enumerators(): ReadonlyArray<AnyEnumerator> { return this._enumerators; }\n public get type() { return this._type; }\n public get isStrict() { return this._isStrict; }\n\n /** @internal */\n constructor(schema: Schema, name: string, primitiveType?: PrimitiveType.Integer | PrimitiveType.String) {\n super(schema, name);\n this._type = primitiveType;\n this._isStrict = true;\n this._enumerators = [];\n }\n\n public get isInt(): boolean { return this._type === PrimitiveType.Integer; }\n public get isString(): boolean { return this._type === PrimitiveType.String; }\n\n /**\n * Gets an enumerator that matches the name provided.\n * @param name The ECName of the Enumerator to find.\n */\n public getEnumeratorByName(name: string): AnyEnumerator | undefined {\n return this.enumerators.find((item) => item.name.toLowerCase() === name.toLowerCase());\n }\n\n /**\n * Gets an enumerator that matches the value provided.\n * @param value The value of the Enumerator to find.\n */\n public getEnumerator(value: string): Enumerator<string> | undefined;\n public getEnumerator(value: number): Enumerator<number> | undefined;\n public getEnumerator(value: string | number): AnyEnumerator | undefined {\n return this.enumerators.find((item) => item.value === value);\n }\n\n /**\n * Checks whether there already exists an enumerator with this name or this value\n * @param name The name of the enumerator we are trying to create\n * @param value The value of the enumerator we are trying to create\n * @internal\n */\n private findDuplicateEnumerators(name: string, value: string | number) {\n this._enumerators.forEach((element: AnyEnumerator) => { // Name and value must be unique within the ECEnumerations\n if (element.name.toLowerCase() === name.toLowerCase())\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Enumeration ${this.name} has a duplicate Enumerator with name '${name}'.`);\n if (element.value === value)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Enumeration ${this.name} has a duplicate Enumerator with value '${value}'.`);\n });\n }\n\n /**\n * Creates an Enumerator with the provided name and value as well as optional parameters label and description\n * @param name The name of the enumerator\n * @param value The value of the enumerator. The type of this value is dependent on the backing type of the this Enumeration.\n * @param label A localized display label that is used instead of the name in a GUI.\n * @param description A localized description for the enumerator.\n * @return AnyEnumerator object\n * @internal\n */\n public createEnumerator(name: string, value: string | number, label?: string, description?: string): AnyEnumerator {\n if (this.isInt && typeof (value) === \"string\") // throws if backing type is int and value is string\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Enumeration ${this.name} has a backing type 'integer' and an enumerator with value of type 'string'.`);\n if (!this.isInt && typeof (value) === \"number\") // also throws if backing type is string and value is number\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Enumeration ${this.name} has a backing type 'string' and an enumerator with value of type 'integer'.`);\n this.findDuplicateEnumerators(name, value); // check for duplicates; throw if there are any\n if (!ECName.validate(name))\n throw new ECSchemaError(ECSchemaStatus.InvalidECName, `The Enumeration ${this.name} has an enumerator with an invalid 'name' attribute. ${name} is not a valid ECName.`);\n return { name, value, label, description };\n }\n\n /**\n * Adds enumerator to list of enumerators on this Enumeration\n * @param enumerator The enumerator to add\n * @internal\n */\n protected addEnumerator(enumerator: AnyEnumerator) {\n this._enumerators.push(enumerator);\n }\n\n /**\n * Save this Enumeration's properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): EnumerationProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n schemaJson.type = (this.isInt) ? \"int\" : \"string\";\n schemaJson.isStrict = this.isStrict;\n schemaJson.enumerators = this._enumerators.map(({ name, label, value, description }) => {\n const enumJson: any = { name, value };\n if (undefined !== label)\n enumJson.label = label;\n if (undefined !== description)\n enumJson.description = description;\n return enumJson;\n });\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n if (undefined !== this.type)\n itemElement.setAttribute(\"backingTypeName\", primitiveTypeToString(this.type));\n itemElement.setAttribute(\"isStrict\", String(this.isStrict));\n\n for (const enumerator of this.enumerators) {\n const enumElement = schemaXml.createElement(\"ECEnumerator\");\n enumElement.setAttribute(\"name\", enumerator.name);\n const enumValue = typeof enumerator.value === \"string\" ? enumerator.value : enumerator.value.toString();\n enumElement.setAttribute(\"value\", enumValue);\n if (undefined !== enumerator.label)\n enumElement.setAttribute(\"displayLabel\", enumerator.label);\n if (undefined !== enumerator.description)\n enumElement.setAttribute(\"description\", enumerator.description);\n itemElement.appendChild(enumElement);\n }\n\n return itemElement;\n }\n\n public override fromJSONSync(enumerationProps: EnumerationProps) {\n super.fromJSONSync(enumerationProps);\n if (undefined === this._type) {\n if (/int/i.test(enumerationProps.type)) {\n this._type = PrimitiveType.Integer;\n } else if (/string/i.test(enumerationProps.type)) {\n this._type = PrimitiveType.String;\n } else {\n if (SchemaReadHelper.isECSpecVersionNewer({ readVersion: enumerationProps.originalECSpecMajorVersion, writeVersion: enumerationProps.originalECSpecMinorVersion } as ECSpecVersion))\n this._type = PrimitiveType.String;\n else\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Enumeration ${this.name} has an invalid 'type' attribute. It should be either \"int\" or \"string\".`);\n }\n } else {\n const primitiveTypePattern = (this.isInt) ? /int/i : /string/i;\n if (!primitiveTypePattern.test(enumerationProps.type))\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Enumeration ${this.name} has an incompatible type. It must be \"${(this.isInt) ? \"int\" : \"string\"}\", not \"${(this.isInt) ? \"string\" : \"int\"}\".`);\n }\n this._isStrict = enumerationProps.isStrict;\n\n if (undefined !== enumerationProps.enumerators) {\n enumerationProps.enumerators.forEach((enumerator: EnumeratorProps) => {\n // Creates a new enumerator (with the specified name, value, label and description- label and description are optional) and adds to the list of enumerators.\n // Throws ECSchemaError if there are duplicate names or values present in the enumeration\n this.addEnumerator(this.createEnumerator(enumerator.name, enumerator.value, enumerator.label, enumerator.description));\n });\n }\n }\n\n public override async fromJSON(enumerationProps: EnumerationProps) {\n this.fromJSONSync(enumerationProps);\n }\n\n /**\n * @internal\n */\n protected setIsStrict(isStrict: boolean) {\n this._isStrict = isStrict;\n }\n\n /**\n * Type guard to check if the SchemaItem is of type Enumeration.\n * @param item The SchemaItem to check.\n * @returns True if the item is an Enumeration, false otherwise.\n */\n public static isEnumeration(item?: SchemaItem): item is Enumeration {\n return item?.schemaItemType === SchemaItemType.Enumeration;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type Enumeration.\n * @param item The SchemaItem to check.\n * @returns The item cast to Enumeration if it is an Enumeration, undefined otherwise.\n * @internal\n */\n public static assertIsEnumeration(item?: SchemaItem): asserts item is Enumeration {\n if (!this.isEnumeration(item))\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.Enumeration}' (Enumeration)`);\n }\n}\n\n/**\n * An abstract class used for schema editing.\n *\n * @internal\n */\nexport abstract class MutableEnumeration extends Enumeration {\n public abstract override addEnumerator(enumerator: AnyEnumerator): void;\n public abstract override setIsStrict(isStrict: boolean): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
1
+ {"version":3,"file":"Enumeration.js","sourceRoot":"","sources":["../../../src/Metadata/Enumeration.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA4E;AAE5E,4CAAoF;AACpF,4CAA6D;AAC7D,sCAAmC;AAEnC,6CAA0C;AAa1C;;;GAGG;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W,GAAG,WAAW,CAAC;IACvC,CAAC;IAED;;OAEG;IACO,eAAe,CAAC,YAA0B;QAClD,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;IACzC,CAAC;IAED;;OAEG;IACO,QAAQ,CAAC,KAA2E;QAC5F,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,QAAQ,CAAC,IAAiB;QACtC,IAAI,IAAI,IAAI,IAAI,CAAC,cAAc,KAAK,0BAAc,CAAC,MAAM;YACvD,OAAO,IAAI,CAAC;QAEd,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,cAAc,CAAC,IAAiB;QAC5C,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YACtB,MAAM,IAAI,yBAAa,CAAC,0BAAc,CAAC,qBAAqB,EAAE,aAAa,0BAAc,CAAC,MAAM,YAAY,CAAC,CAAC;IAClH,CAAC;CACF;AArWD,wBAqWC;AAED;;;GAGG;AACH,MAAsB,aAAc,SAAQ,MAAM;CAWjD;AAXD,sCAWC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { SchemaItemFormatProps } from \"../Deserialization/JsonProps\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { SchemaItemType } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport {\n BaseFormat, DecimalPrecision, FormatTraits, formatTraitsToArray, FormatType, FractionalPrecision,\n ScientificType, ShowSignOption,\n} from \"@itwin/core-quantity\";\nimport { InvertedUnit } from \"./InvertedUnit\";\nimport { Schema } from \"./Schema\";\nimport { SchemaItem } from \"./SchemaItem\";\nimport { Unit } from \"./Unit\";\nimport { LazyLoadedInvertedUnit, LazyLoadedUnit } from \"../Interfaces\";\nimport { DelayedPromiseWithProps } from \"../DelayedPromise\";\n\n/**\n * @public @preview\n */\nexport class Format extends SchemaItem {\n public override readonly schemaItemType = Format.schemaItemType;\n /** @internal */\n public static override get schemaItemType() { return SchemaItemType.Format; }\n private _base: BaseFormat;\n private _units?: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]>;\n\n /** @internal */\n constructor(schema: Schema, name: string) {\n super(schema, name);\n this._base = new BaseFormat(name);\n }\n\n public get roundFactor(): number { return this._base.roundFactor; }\n public get type(): FormatType { return this._base.type; }\n public get precision(): DecimalPrecision | FractionalPrecision { return this._base.precision; }\n public get minWidth(): number | undefined { return this._base.minWidth; }\n public get scientificType(): ScientificType | undefined { return this._base.scientificType; }\n public get showSignOption(): ShowSignOption { return this._base.showSignOption; }\n public get decimalSeparator(): string { return this._base.decimalSeparator; }\n public get thousandSeparator(): string { return this._base.thousandSeparator; }\n public get uomSeparator(): string { return this._base.uomSeparator; }\n public get stationSeparator(): string { return this._base.stationSeparator; }\n public get stationOffsetSize(): number | undefined { return this._base.stationOffsetSize; }\n public get stationBaseFactor(): number | undefined { return this._base.stationBaseFactor; }\n public get formatTraits(): FormatTraits { return this._base.formatTraits; }\n public get spacer(): string | undefined { return this._base.spacer; }\n public get includeZero(): boolean | undefined { return this._base.includeZero; }\n public get units(): ReadonlyArray<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]> | undefined {\n return this._units;\n }\n\n private parseFormatTraits(formatTraitsFromJson: string | string[]) {\n return this._base.parseFormatTraits(formatTraitsFromJson);\n }\n\n public hasFormatTrait(formatTrait: FormatTraits) {\n return this._base.hasFormatTraitSet(formatTrait);\n }\n\n /**\n * Adds a Unit, or InvertedUnit, with an optional label override.\n * @param unit The Unit, or InvertedUnit, to add to this Format.\n * @param label A label that overrides the label defined within the Unit when a value is formatted.\n * @internal\n */\n protected addUnit(unit: LazyLoadedUnit | LazyLoadedInvertedUnit, label?: string) {\n if (undefined === this._units)\n this._units = [];\n else { // Validate that a duplicate is not added.\n for (const existingUnit of this._units) {\n if (unit.fullName.toLowerCase() === existingUnit[0].fullName.toLowerCase())\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Format ${this.fullName} has duplicate units, '${unit.fullName}'.`); // TODO: Validation - this should be a validation error not a hard failure.\n }\n }\n\n this._units.push([unit, label]);\n }\n\n /**\n *\n * @param precision\n * @internal\n */\n protected setPrecision(precision: number) { this._base.precision = precision; }\n\n private typecheck(formatProps: SchemaItemFormatProps) {\n this._base.loadFormatProperties(formatProps);\n\n if (undefined !== formatProps.composite) { // TODO: This is duplicated below when the units need to be processed...\n if (undefined !== formatProps.composite.includeZero)\n this._base.includeZero = formatProps.composite.includeZero;\n\n if (undefined !== formatProps.composite.spacer) {\n if (formatProps.composite.spacer.length > 1)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Format ${this.fullName} has a composite with an invalid 'spacer' attribute. It should be an empty or one character string.`);\n this._base.spacer = formatProps.composite.spacer;\n }\n\n // Composite requires 1-4 units\n if (formatProps.composite.units.length <= 0 || formatProps.composite.units.length > 4)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `The Format ${this.fullName} has an invalid 'Composite' attribute. It should have 1-4 units.`);\n }\n }\n\n public override fromJSONSync(formatProps: SchemaItemFormatProps) {\n super.fromJSONSync(formatProps);\n this.typecheck(formatProps);\n if (undefined === formatProps.composite)\n return;\n\n // Units are separated from the rest of the deserialization because of the need to have separate sync and async implementation\n for (const unit of formatProps.composite.units) {\n const newUnit = this.schema.lookupItemSync(unit.name);\n if (undefined === newUnit || (!Unit.isUnit(newUnit) && !InvertedUnit.isInvertedUnit(newUnit)))\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, ``);\n\n if(Unit.isUnit(newUnit))\n this.addUnit(new DelayedPromiseWithProps(newUnit.key, async () => newUnit), unit.label);\n else if(InvertedUnit.isInvertedUnit(newUnit))\n this.addUnit(new DelayedPromiseWithProps(newUnit.key, async () => newUnit), unit.label);\n }\n }\n\n public override async fromJSON(formatProps: SchemaItemFormatProps) {\n await super.fromJSON(formatProps);\n this.typecheck(formatProps);\n if (undefined === formatProps.composite)\n return;\n\n // Units are separated from the rest of the deserialization because of the need to have separate sync and async implementation\n for (const unit of formatProps.composite.units) {\n const newUnit = await this.schema.lookupItem(unit.name);\n if (undefined === newUnit || (!Unit.isUnit(newUnit) && !InvertedUnit.isInvertedUnit(newUnit)))\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, ``);\n\n if(Unit.isUnit(newUnit))\n this.addUnit(new DelayedPromiseWithProps(newUnit.key, async () => newUnit), unit.label);\n else if(InvertedUnit.isInvertedUnit(newUnit))\n this.addUnit(new DelayedPromiseWithProps(newUnit.key, async () => newUnit), unit.label);\n }\n }\n\n /**\n * Save this Format's properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): SchemaItemFormatProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n schemaJson.type = this.type;\n schemaJson.precision = this.precision;\n\n // this._spacer = \" \";\n // this._includeZero = true;\n\n // Serialize the minimal amount of information needed so anything that is the same as the default, do not serialize.\n if (0.0 !== this.roundFactor)\n schemaJson.roundFactor = this.roundFactor;\n if (ShowSignOption.OnlyNegative !== this.showSignOption)\n schemaJson.showSignOption = this.showSignOption;\n if (FormatTraits.Uninitialized !== this.formatTraits)\n schemaJson.formatTraits = formatTraitsToArray(this.formatTraits);\n if (\".\" !== this.decimalSeparator)\n schemaJson.decimalSeparator = this.decimalSeparator;\n if (\",\" !== this.thousandSeparator)\n schemaJson.thousandSeparator = this.thousandSeparator;\n if (\" \" !== this.uomSeparator)\n schemaJson.uomSeparator = this.uomSeparator;\n\n if (undefined !== this.minWidth)\n schemaJson.minWidth = this.minWidth;\n\n if (FormatType.Scientific === this.type && undefined !== this.scientificType)\n schemaJson.scientificType = this.scientificType;\n\n if (FormatType.Station === this.type) {\n if (undefined !== this.stationOffsetSize)\n schemaJson.stationOffsetSize = this.stationOffsetSize;\n if (\" \" !== this.stationSeparator)\n schemaJson.stationSeparator = this.stationSeparator;\n }\n\n if (undefined === this.units)\n return schemaJson;\n\n schemaJson.composite = {};\n\n if (\" \" !== this.spacer)\n schemaJson.composite.spacer = this.spacer;\n\n if (true !== this.includeZero)\n schemaJson.composite.includeZero = this.includeZero;\n\n schemaJson.composite.units = [];\n for (const unit of this.units) {\n schemaJson.composite.units.push({\n name: unit[0].fullName,\n label: unit[1],\n });\n }\n\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n itemElement.setAttribute(\"type\", this.type.toLowerCase());\n itemElement.setAttribute(\"precision\", this.precision.toString());\n itemElement.setAttribute(\"roundFactor\", this.roundFactor.toString());\n itemElement.setAttribute(\"showSignOption\", this.showSignOption);\n itemElement.setAttribute(\"decimalSeparator\", this.decimalSeparator);\n itemElement.setAttribute(\"thousandSeparator\", this.thousandSeparator);\n itemElement.setAttribute(\"uomSeparator\", this.uomSeparator);\n itemElement.setAttribute(\"stationSeparator\", this.stationSeparator);\n\n if (undefined !== this.minWidth)\n itemElement.setAttribute(\"minWidth\", this.minWidth.toString());\n if (undefined !== this.scientificType)\n itemElement.setAttribute(\"scientificType\", this.scientificType);\n if (undefined !== this.stationOffsetSize)\n itemElement.setAttribute(\"stationOffsetSize\", this.stationOffsetSize.toString());\n\n const formatTraits = formatTraitsToArray(this.formatTraits);\n if (formatTraits.length > 0)\n itemElement.setAttribute(\"formatTraits\", formatTraits.join(\"|\"));\n\n if (undefined !== this.units) {\n const compositeElement = schemaXml.createElement(\"Composite\");\n if (undefined !== this.spacer)\n compositeElement.setAttribute(\"spacer\", this.spacer);\n if (undefined !== this.includeZero)\n compositeElement.setAttribute(\"includeZero\", this.includeZero.toString());\n\n for(const [unit, label] of this.units) {\n const resolvedUnit = await unit;\n const unitElement = schemaXml.createElement(\"Unit\");\n if (undefined !== label)\n unitElement.setAttribute(\"label\", label);\n const unitName = XmlSerializationUtils.createXmlTypedName(this.schema, resolvedUnit.schema, resolvedUnit.name);\n unitElement.textContent = unitName;\n compositeElement.appendChild(unitElement);\n };\n\n itemElement.appendChild(compositeElement);\n }\n\n return itemElement;\n }\n\n /**\n * @internal\n */\n protected setFormatType(formatType: FormatType) {\n this._base.type = formatType;\n }\n\n /**\n * @internal\n */\n protected setRoundFactor(roundFactor: number) {\n this._base.roundFactor = roundFactor;\n }\n\n /**\n * @internal\n */\n protected setShowSignOption(signOption: ShowSignOption) {\n this._base.showSignOption = signOption;\n }\n\n /**\n * @internal\n */\n protected setDecimalSeparator(separator: string) {\n this._base.decimalSeparator = separator;\n }\n\n /**\n * @internal\n */\n protected setThousandSeparator(separator: string) {\n this._base.thousandSeparator = separator;\n }\n\n /**\n * @internal\n */\n protected setUomSeparator(separator: string) {\n this._base.uomSeparator = separator;\n }\n\n /**\n * @internal\n */\n protected setStationSeparator(separator: string) {\n this._base.stationSeparator = separator;\n }\n\n /**\n * @internal\n */\n protected setStationOffsetSize(stationOffsetSize: number) {\n this._base.stationOffsetSize = stationOffsetSize;\n }\n\n /**\n * @internal\n */\n protected setStationBaseFactor(stationBaseFactor: number) {\n this._base.stationBaseFactor = stationBaseFactor;\n }\n\n /**\n * @internal\n */\n protected setScientificType(scientificType: ScientificType) {\n this._base.scientificType = scientificType;\n }\n\n /**\n * @internal\n */\n protected setMinWidth(minWidth: number) {\n this._base.minWidth = minWidth;\n }\n\n /**\n * @internal\n */\n protected setSpacer(spacer: string) {\n this._base.spacer = spacer;\n }\n\n /**\n * @internal\n */\n protected setIncludeZero(includeZero: boolean) {\n this._base.includeZero = includeZero;\n }\n\n /**\n * @internal\n */\n protected setFormatTraits(formatTraits: FormatTraits) {\n this._base.formatTraits = formatTraits;\n }\n\n /**\n * @internal\n */\n protected setUnits(units: Array<[LazyLoadedUnit | LazyLoadedInvertedUnit, string | undefined]>) {\n this._units = units;\n }\n\n /** Type guard to check if the SchemaItem is of type Format.\n * @param item The SchemaItem to check.\n * @returns True if the item is a Format, false otherwise.\n */\n public static isFormat(item?: SchemaItem): item is Format {\n if (item && item.schemaItemType === SchemaItemType.Format)\n return true;\n\n return false;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type Format.\n * @param item The SchemaItem to check.\n * @returns The item cast to Format if it is a Format, undefined otherwise.\n * @internal\n */\n public static assertIsFormat(item?: SchemaItem): asserts item is Format {\n if (!this.isFormat(item))\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.Format}' (Format)`);\n }\n}\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableFormat extends Format {\n public abstract override addUnit(unit: LazyLoadedUnit | LazyLoadedInvertedUnit, label?: string): void;\n public abstract override setPrecision(precision: number): void;\n public abstract override setFormatType(formatType: FormatType): void;\n public abstract override setRoundFactor(roundFactor: number): void;\n public abstract override setShowSignOption(signOption: ShowSignOption): void;\n public abstract override setDecimalSeparator(separator: string): void;\n public abstract override setThousandSeparator(separator: string): void;\n public abstract override setUomSeparator(separator: string): void;\n public abstract override setStationSeparator(separator: string): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
1
+ {"version":3,"file":"Format.js","sourceRoot":"","sources":["../../../src/Metadata/Format.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,oFAAiF;AACjF,4CAA8C;AAC9C,4CAA6D;AAC7D,wDAG8B;AAC9B,iDAA8C;AAE9C,6CAA0C;AAC1C,iCAA8B;AAE9B,sDAA4D;AAE5D;;GAEG;AACH,MAAa,MAAO,SAAQ,uBAAU;IACX,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAChE,gBAAgB;IACT,MAAM,KAAc,cAAc,KAAK,OAAO,0BAAc,CA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AC,0BAAc,CAAC,aAAa,EAAE,mCAAmC,iBAAiB,CAAC,UAAU,GAAG,CAAC,CAAC;QAC5H,IAAI,CAAC,WAAW,GAAG,IAAI,wCAAuB,CAA4B,uBAAuB,EAC/F,KAAK,IAAI,EAAE;YACT,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,uBAAuB,EAAE,uBAAU,CAAC,CAAC;YACrF,IAAI,SAAS,KAAK,UAAU;gBAC1B,MAAM,IAAI,yBAAa,CAAC,0BAAc,CAAC,aAAa,EAAE,mCAAmC,iBAAiB,CAAC,UAAU,GAAG,CAAC,CAAC;YAC5H,OAAO,UAAU,CAAC;QACpB,CAAC,CAAC,CAAC;IACP,CAAC;IAEe,KAAK,CAAC,QAAQ,CAAC,iBAAoC;QACjE,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACO,cAAc,CAAC,WAA2B;QAClD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IAClC,CAAC;IAED;;;OAGG;IACO,aAAa,CAAC,UAAgC;QACtD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;CACF;AA1GD,oCA0GC;AAED;;;GAGG;AACH,MAAsB,mBAAoB,SAAQ,YAAY;CAI7D;AAJD,kDAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { DelayedPromiseWithProps } from \"../DelayedPromise\";\nimport { InvertedUnitProps } from \"../Deserialization/JsonProps\";\nimport { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\nimport { SchemaItemType } from \"../ECObjects\";\nimport { ECSchemaError, ECSchemaStatus } from \"../Exception\";\nimport { LazyLoadedUnit, LazyLoadedUnitSystem } from \"../Interfaces\";\nimport { SchemaItemKey } from \"../SchemaKey\";\nimport { SchemaItem } from \"./SchemaItem\";\nimport { Unit } from \"./Unit\";\nimport { UnitSystem } from \"./UnitSystem\";\n\n/**\n * An InvertedUnit is a specific type of Unit that describes the inverse of a single Unit whose dimensional derivation is unit-less.\n * @public @preview\n */\nexport class InvertedUnit extends SchemaItem {\n public override readonly schemaItemType = InvertedUnit.schemaItemType;\n /** @internal */\n public static override get schemaItemType() { return SchemaItemType.InvertedUnit; }\n private _invertsUnit?: LazyLoadedUnit; // required\n private _unitSystem?: LazyLoadedUnitSystem; // required\n\n public get invertsUnit(): LazyLoadedUnit | undefined { return this._invertsUnit; }\n public get unitSystem(): LazyLoadedUnitSystem | undefined { return this._unitSystem; }\n\n /**\n * Type guard to check if the SchemaItem is of type InvertedUnit.\n * @param item The SchemaItem to check.\n * @returns True if the item is a InvertedUnit, false otherwise.\n */\n public static isInvertedUnit(item?: SchemaItem): item is InvertedUnit {\n if (item && item.schemaItemType === SchemaItemType.InvertedUnit)\n return true;\n\n return false;\n }\n\n /**\n * Type assertion to check if the SchemaItem is of type InvertedUnit.\n * @param item The SchemaItem to check.\n * @returns The item cast to InvertedUnit if it is an InvertedUnit, undefined otherwise.\n * @internal\n */\n public static assertIsInvertedUnit(item?: SchemaItem): asserts item is InvertedUnit {\n if (!this.isInvertedUnit(item))\n throw new ECSchemaError(ECSchemaStatus.InvalidSchemaItemType, `Expected '${SchemaItemType.InvertedUnit}' (InvertedUnit)`);\n }\n\n /**\n * Save this InvertedUnit's properties to an object for serializing to JSON.\n * @param standalone Serialization includes only this object (as opposed to the full schema).\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\n */\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): InvertedUnitProps {\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\n schemaJson.invertsUnit = this.invertsUnit!.fullName;\n schemaJson.unitSystem = this.unitSystem!.fullName;\n return schemaJson;\n }\n\n /** @internal */\n public override async toXml(schemaXml: Document): Promise<Element> {\n const itemElement = await super.toXml(schemaXml);\n\n const unitSystem = await this.unitSystem;\n if (undefined !== unitSystem) {\n const unitSystemName = XmlSerializationUtils.createXmlTypedName(this.schema, unitSystem.schema, unitSystem.name);\n itemElement.setAttribute(\"unitSystem\", unitSystemName);\n }\n\n const invertsUnit = await this.invertsUnit;\n if (undefined !== invertsUnit) {\n const invertsUnitName = XmlSerializationUtils.createXmlTypedName(this.schema, invertsUnit.schema, invertsUnit.name);\n itemElement.setAttribute(\"invertsUnit\", invertsUnitName);\n }\n\n return itemElement;\n }\n\n public override fromJSONSync(invertedUnitProps: InvertedUnitProps) {\n super.fromJSONSync(invertedUnitProps);\n const unitSchemaItemKey = this.schema.getSchemaItemKey(invertedUnitProps.invertsUnit);\n this._invertsUnit = new DelayedPromiseWithProps<SchemaItemKey, Unit>(unitSchemaItemKey,\n async () => {\n const invertsUnit = await this.schema.lookupItem(unitSchemaItemKey, Unit);\n if (undefined === invertsUnit)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the invertsUnit ${invertedUnitProps.invertsUnit}.`);\n return invertsUnit;\n });\n\n const unitSystemSchemaItemKey = this.schema.getSchemaItemKey(invertedUnitProps.unitSystem);\n if (!unitSystemSchemaItemKey)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the unitSystem ${invertedUnitProps.unitSystem}.`);\n this._unitSystem = new DelayedPromiseWithProps<SchemaItemKey, UnitSystem>(unitSystemSchemaItemKey,\n async () => {\n const unitSystem = await this.schema.lookupItem(unitSystemSchemaItemKey, UnitSystem);\n if (undefined === unitSystem)\n throw new ECSchemaError(ECSchemaStatus.InvalidECJson, `Unable to locate the unitSystem ${invertedUnitProps.unitSystem}.`);\n return unitSystem;\n });\n }\n\n public override async fromJSON(invertedUnitProps: InvertedUnitProps) {\n this.fromJSONSync(invertedUnitProps);\n }\n\n /**\n * @internal\n * Used for schema editing\n */\n protected setInvertsUnit(invertsUnit: LazyLoadedUnit) {\n this._invertsUnit = invertsUnit;\n }\n\n /**\n * @internal\n * Used for schema editing\n */\n protected setUnitSystem(unitSystem: LazyLoadedUnitSystem) {\n this._unitSystem = unitSystem;\n }\n}\n\n/**\n * @internal\n * An abstract class used for schema editing.\n */\nexport abstract class MutableInvertedUnit extends InvertedUnit {\n public abstract override setInvertsUnit(invertsUnit: LazyLoadedUnit): void;\n public abstract override setUnitSystem(unitSystem: LazyLoadedUnitSystem): void;\n public abstract override setDisplayLabel(displayLabel: string): void;\n}\n"]}
1
+ {"version":3,"file":"InvertedUnit.js","sourceRoot":"","sources":["../../../src/Metadata/InvertedUnit.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA4D;AAE5D,oFAAiF;AACjF,4CAA8C;AAC9C,4CAA6D;AAG7D,6CAA0C;AAC1C,iCAA8B;AAC9B,6CAA0C;AAE1C;;;GAGG;AACH,MAAa,YAAa,SAAQ,uBAAU;IACjB,cAAc,GAAG,YAAY,CAAC,cAAc,CAAC;IACtE,gBAAgB;IACT,MAAM,KAAc,cAAc,KAAK,OAAO,0BAAc,CAAC,YAAY,CAAC,CAAC,CAAC;IAC3E,YAAY,CAAkB,CAAC,WAAW;IAC1C,WAAW,CAAwB,CAAC,WAAW;IAEvD,IAAW,WAAW,KAAiC,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAClF,IAAW,UAAU,KAAuC,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAEtF;;;;OAIG;IACI,MAAM,CAAC,cAAc,CAAC,IAAiB;QAC5C,IAAI,IAAI,IAAI,IAAI,CAAC,cAAc,KAAK,0BAAc,CAAC,YAAY;YAC7D,OAAO,IAAI,CAAC;QAEd,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,oBAAoB,CAAC,IAAiB;QAClD,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;YAC5B,MAAM,IAAI,yB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