@itwin/core-backend 5.10.0-dev.10 → 5.10.0-dev.12

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 (121) hide show
  1. package/lib/cjs/Category.d.ts +4 -4
  2. package/lib/cjs/Category.js.map +1 -1
  3. package/lib/cjs/ChangesetECAdaptor.d.ts +6 -6
  4. package/lib/cjs/ChangesetECAdaptor.js +4 -4
  5. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  6. package/lib/cjs/CodeSpecs.d.ts +3 -3
  7. package/lib/cjs/CodeSpecs.js.map +1 -1
  8. package/lib/cjs/DisplayStyle.d.ts +2 -2
  9. package/lib/cjs/DisplayStyle.js.map +1 -1
  10. package/lib/cjs/Element.d.ts +10 -10
  11. package/lib/cjs/Element.js +2 -2
  12. package/lib/cjs/Element.js.map +1 -1
  13. package/lib/cjs/ElementAspect.d.ts +1 -1
  14. package/lib/cjs/ElementAspect.js.map +1 -1
  15. package/lib/cjs/ElementTreeWalker.d.ts +5 -5
  16. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  17. package/lib/cjs/ExternalSource.d.ts +2 -2
  18. package/lib/cjs/ExternalSource.js.map +1 -1
  19. package/lib/cjs/IModelDb.d.ts +33 -23
  20. package/lib/cjs/IModelDb.d.ts.map +1 -1
  21. package/lib/cjs/IModelDb.js +32 -20
  22. package/lib/cjs/IModelDb.js.map +1 -1
  23. package/lib/cjs/LineStyle.d.ts +6 -6
  24. package/lib/cjs/LineStyle.js.map +1 -1
  25. package/lib/cjs/LocalHub.d.ts +6 -0
  26. package/lib/cjs/LocalHub.d.ts.map +1 -1
  27. package/lib/cjs/LocalHub.js +23 -0
  28. package/lib/cjs/LocalHub.js.map +1 -1
  29. package/lib/cjs/Material.d.ts +1 -1
  30. package/lib/cjs/Material.js.map +1 -1
  31. package/lib/cjs/Model.d.ts +6 -6
  32. package/lib/cjs/Model.js.map +1 -1
  33. package/lib/cjs/Relationship.d.ts +10 -10
  34. package/lib/cjs/Relationship.js +6 -6
  35. package/lib/cjs/Relationship.js.map +1 -1
  36. package/lib/cjs/SheetIndex.d.ts +4 -4
  37. package/lib/cjs/SheetIndex.js.map +1 -1
  38. package/lib/cjs/Texture.d.ts +1 -1
  39. package/lib/cjs/Texture.js.map +1 -1
  40. package/lib/cjs/ViewDefinition.d.ts +6 -6
  41. package/lib/cjs/ViewDefinition.js.map +1 -1
  42. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +1 -1
  43. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  44. package/lib/cjs/annotations/FrameGeometry.d.ts.map +1 -1
  45. package/lib/cjs/annotations/FrameGeometry.js +2 -3
  46. package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
  47. package/lib/cjs/domains/FunctionalElements.d.ts +1 -1
  48. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  49. package/lib/cjs/domains/GenericElements.d.ts +2 -2
  50. package/lib/cjs/domains/GenericElements.js.map +1 -1
  51. package/lib/cjs/internal/ChannelAdmin.d.ts +2 -2
  52. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  53. package/lib/cjs/internal/HubMock.d.ts +24 -1
  54. package/lib/cjs/internal/HubMock.d.ts.map +1 -1
  55. package/lib/cjs/internal/HubMock.js +60 -39
  56. package/lib/cjs/internal/HubMock.js.map +1 -1
  57. package/lib/esm/Category.d.ts +4 -4
  58. package/lib/esm/Category.js.map +1 -1
  59. package/lib/esm/ChangesetECAdaptor.d.ts +6 -6
  60. package/lib/esm/ChangesetECAdaptor.js +4 -4
  61. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  62. package/lib/esm/CodeSpecs.d.ts +3 -3
  63. package/lib/esm/CodeSpecs.js.map +1 -1
  64. package/lib/esm/DisplayStyle.d.ts +2 -2
  65. package/lib/esm/DisplayStyle.js.map +1 -1
  66. package/lib/esm/Element.d.ts +10 -10
  67. package/lib/esm/Element.js +2 -2
  68. package/lib/esm/Element.js.map +1 -1
  69. package/lib/esm/ElementAspect.d.ts +1 -1
  70. package/lib/esm/ElementAspect.js.map +1 -1
  71. package/lib/esm/ElementTreeWalker.d.ts +5 -5
  72. package/lib/esm/ElementTreeWalker.js.map +1 -1
  73. package/lib/esm/ExternalSource.d.ts +2 -2
  74. package/lib/esm/ExternalSource.js.map +1 -1
  75. package/lib/esm/IModelDb.d.ts +33 -23
  76. package/lib/esm/IModelDb.d.ts.map +1 -1
  77. package/lib/esm/IModelDb.js +32 -20
  78. package/lib/esm/IModelDb.js.map +1 -1
  79. package/lib/esm/LineStyle.d.ts +6 -6
  80. package/lib/esm/LineStyle.js.map +1 -1
  81. package/lib/esm/LocalHub.d.ts +6 -0
  82. package/lib/esm/LocalHub.d.ts.map +1 -1
  83. package/lib/esm/LocalHub.js +23 -0
  84. package/lib/esm/LocalHub.js.map +1 -1
  85. package/lib/esm/Material.d.ts +1 -1
  86. package/lib/esm/Material.js.map +1 -1
  87. package/lib/esm/Model.d.ts +6 -6
  88. package/lib/esm/Model.js.map +1 -1
  89. package/lib/esm/Relationship.d.ts +10 -10
  90. package/lib/esm/Relationship.js +6 -6
  91. package/lib/esm/Relationship.js.map +1 -1
  92. package/lib/esm/SheetIndex.d.ts +4 -4
  93. package/lib/esm/SheetIndex.js.map +1 -1
  94. package/lib/esm/Texture.d.ts +1 -1
  95. package/lib/esm/Texture.js.map +1 -1
  96. package/lib/esm/ViewDefinition.d.ts +6 -6
  97. package/lib/esm/ViewDefinition.js.map +1 -1
  98. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +1 -1
  99. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  100. package/lib/esm/annotations/FrameGeometry.d.ts.map +1 -1
  101. package/lib/esm/annotations/FrameGeometry.js +2 -3
  102. package/lib/esm/annotations/FrameGeometry.js.map +1 -1
  103. package/lib/esm/domains/FunctionalElements.d.ts +1 -1
  104. package/lib/esm/domains/FunctionalElements.js.map +1 -1
  105. package/lib/esm/domains/GenericElements.d.ts +2 -2
  106. package/lib/esm/domains/GenericElements.js.map +1 -1
  107. package/lib/esm/internal/ChannelAdmin.d.ts +2 -2
  108. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  109. package/lib/esm/internal/HubMock.d.ts +24 -1
  110. package/lib/esm/internal/HubMock.d.ts.map +1 -1
  111. package/lib/esm/internal/HubMock.js +61 -40
  112. package/lib/esm/internal/HubMock.js.map +1 -1
  113. package/lib/esm/test/SchemaChangesetCanBeReversed.test.d.ts +2 -0
  114. package/lib/esm/test/SchemaChangesetCanBeReversed.test.d.ts.map +1 -0
  115. package/lib/esm/test/SchemaChangesetCanBeReversed.test.js +239 -0
  116. package/lib/esm/test/SchemaChangesetCanBeReversed.test.js.map +1 -0
  117. package/lib/esm/test/annotations/FrameGeometry.test.js +2 -1
  118. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
  119. package/lib/esm/test/standalone/DeleteElements.test.js +45 -0
  120. package/lib/esm/test/standalone/DeleteElements.test.js.map +1 -1
  121. package/package.json +13 -13
@@ -1 +1 @@
1
- {"version":3,"file":"SheetIndex.js","sourceRoot":"","sources":["../../src/SheetIndex.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,IAAI,EAA8D,WAAW,EAAmH,MAAM,oBAAoB,CAAC;AACjP,OAAO,EAAE,2BAA2B,EAAS,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAc,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,qCAAqC,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAClK,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAkClD;;;;GAIG;AACH,MAAM,OAAO,UAAW,SAAQ,2BAA2B;IAClD,MAAM,KAAc,SAAS,KA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,CAAC,GAAI,CAAC,CAAC,CAAC;YACrD,iBAAiB,EAAE,QAAQ,CAAC,iBAAiB;YAC7C,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,OAAO,EAAE,QAAQ,CAAC,OAAO;SAC1B,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;QACrE,QAAQ,CAAC,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACnC,OAAO,QAAQ,CAAC,EAAE,CAAC;IACrB,CAAC;IAED,aAAa;IACM,mBAAmB,CAAC,YAAgC;QACrE,KAAK,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACxC,IAAI,IAAI,CAAC,KAAK;YACZ,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACzC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Elements\r\n */\r\n\r\nimport { BisCodeSpec, Code, CodeScopeProps, CodeSpec, ElementProps, EntityReferenceSet, IModelError, RelatedElementProps, SheetIndexEntryProps, SheetIndexFolderProps, SheetIndexReferenceProps, SheetReferenceProps } from \"@itwin/core-common\";\r\nimport { InformationReferenceElement, Sheet } from \"./Element\";\r\nimport { EditTxn } from \"./EditTxn\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { Id64String, IModelStatus } from \"@itwin/core-bentley\";\r\nimport { SheetIndexFolderOwnsEntries, SheetIndexOwnsEntries, SheetIndexReferenceRefersToSheetIndex, SheetReferenceRefersToSheet } from \"./NavigationRelationship\";\r\nimport { _implicitTxn } from \"./internal/Symbols\";\r\n\r\n/** Arguments used to create a [[SheetIndexEntry]].\r\n * @beta\r\n */\r\nexport interface SheetIndexEntryCreateArgs {\r\n /** The iModel that will contain the sheet index entry. */\r\n iModelDb: IModelDb;\r\n /** The Id of the [[SheetIndexModel]] that will contain the sheet index entry. */\r\n sheetIndexModelId: Id64String;\r\n /** The [[SheetIndex]] or [[SheetIndexFolder]] that is parent to this SheetIndexEntry */\r\n parentId: Id64String;\r\n /** The name of the SheetIndexEntry */\r\n name: string;\r\n /** The priority of the SheetIndexEntry */\r\n priority: number;\r\n}\r\n\r\n/** Arguments supplied when creating a [[SheetIndexReference]].\r\n * @beta\r\n */\r\nexport interface SheetIndexReferenceCreateArgs extends SheetIndexEntryCreateArgs {\r\n /** The [[SheetIndex]] to which the reference refers. */\r\n sheetIndexId?: Id64String;\r\n}\r\n\r\n/** Arguments supplied when creating a [[SheetReference]].\r\n * @beta\r\n */\r\nexport interface SheetReferenceCreateArgs extends SheetIndexEntryCreateArgs {\r\n /** The [[Sheet]] to which the reference refers. */\r\n sheetId?: Id64String;\r\n}\r\n\r\n/** A [structured collection]($docs/bis/domains/drawings-sheets#sheet-index) of [[SheetIndexEntry]]s.\r\n * The sheet index is a tree whose leaf nodes refer to [[Sheet]]s, optionally grouped by [[SheetIndexFolder]]s and/or incorporating\r\n * sub-trees via [[SheetIndexReference]]s.\r\n * @beta\r\n */\r\nexport class SheetIndex extends InformationReferenceElement {\r\n public static override get className(): string { return \"SheetIndex\"; }\r\n\r\n /** Create a Code for a SheetIndex given a name that is meant to be unique within the scope of the specified SheetIndexModel.\r\n * @param iModel The IModelDb\r\n * @param scopeSheetIndexModelId The Id of the Model that contains the LinkElement and provides the scope for its name.\r\n * @param codeValue The SheetIndex name\r\n */\r\n public static createCode(iModel: IModelDb, scopeSheetIndexModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.sheetIndex);\r\n return new Code({ spec: codeSpec.id, scope: scopeSheetIndexModelId, value: codeValue });\r\n }\r\n\r\n /** Create a SheetIndex\r\n * @param iModelDb The IModelDb\r\n * @param modelId The Id of the Model that contains the SheetIndex and provides the scope for its name.\r\n * @param name The name (codeValue) of the SheetIndex\r\n * @returns The newly constructed SheetIndex\r\n * @throws [[IModelError]] if there is a problem creating the SheetIndex\r\n */\r\n public static create(iModelDb: IModelDb, modelId: Id64String, name: string): SheetIndex {\r\n const props: ElementProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, modelId, name).toJSON(),\r\n model: modelId,\r\n };\r\n return new this(props, iModelDb);\r\n }\r\n\r\n /** Insert a SheetIndex\r\n * @param iModelDb The IModelDb\r\n * @param modelId The Id of the Model that contains the SheetIndex and provides the scope for its name.\r\n * @param name The name (codeValue) of the SheetIndex\r\n * @returns The Id of the newly inserted SheetIndex\r\n * @throws [[IModelError]] if there is a problem inserting the SheetIndex\r\n */\r\n public static insert(txn: EditTxn, modelId: Id64String, name: string): Id64String;\r\n /** @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use SheetIndex.insert(txn, ...) instead. */\r\n public static insert(iModelDb: IModelDb, modelId: Id64String, name: string): Id64String;\r\n public static insert(txnOrDb: EditTxn | IModelDb, modelId: Id64String, name: string): Id64String {\r\n const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];\r\n const instance = this.create(txn.iModel, modelId, name);\r\n instance.id = instance.insert(txn);\r\n return instance.id;\r\n }\r\n}\r\n\r\n/** The base class for all elements that can participate in a [[SheetIndex]] hierarchy.\r\n * @beta\r\n*/\r\nexport abstract class SheetIndexEntry extends InformationReferenceElement {\r\n public static override get className(): string { return \"SheetIndexEntry\"; }\r\n /** Can be used to prioritize or order members within a SheetIndex or SheetIndexFolder. */\r\n public entryPriority: number;\r\n\r\n protected constructor(props: SheetIndexEntryProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.entryPriority = props.entryPriority;\r\n }\r\n\r\n public override toJSON(): SheetIndexEntryProps {\r\n return { ...super.toJSON(), entryPriority: this.entryPriority };\r\n }\r\n\r\n /** Create a Code for a Sheet Index Entry given a name that is meant to be unique within the scope of the specified SheetIndexModel.\r\n * @param iModel The IModel\r\n * @param scopeModelId The Id of the [[SheetIndexModel]] that contains the [[SheetIndexEntry]] and provides the scope for its name.\r\n * @param codeValue The name of the entry\r\n */\r\n public static createCode(iModelDb: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.sheetIndexEntry);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n protected static createParentRelationshipProps(iModelDb: IModelDb, id: Id64String): RelatedElementProps {\r\n const parentElementProps = iModelDb.elements.getElementProps(id);\r\n const isFolder = parentElementProps.classFullName === SheetIndexFolder.classFullName;\r\n const relClass = isFolder ? SheetIndexFolderOwnsEntries : SheetIndexOwnsEntries;\r\n return { id, relClassName: relClass.classFullName };\r\n }\r\n\r\n protected static createProps(arg: SheetIndexEntryCreateArgs) {\r\n const parent = this.createParentRelationshipProps(arg.iModelDb, arg.parentId);\r\n const props: SheetIndexEntryProps = {\r\n classFullName: this.classFullName,\r\n model: arg.sheetIndexModelId,\r\n code: this.createCode(arg.iModelDb, arg.sheetIndexModelId, arg.name),\r\n entryPriority: arg.priority,\r\n parent,\r\n };\r\n return props;\r\n }\r\n}\r\n\r\n/** A container used to group [[SheetIndexEntry]]s within a [[SheetIndex]].\r\n * @beta\r\n */\r\nexport class SheetIndexFolder extends SheetIndexEntry {\r\n public static override get className(): string { return \"SheetIndexFolder\"; }\r\n\r\n /** Create a new SheetIndexFolder\r\n * @returns The newly constructed SheetIndexFolder element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(arg: SheetIndexEntryCreateArgs) {\r\n const props: SheetIndexFolderProps = this.createProps(arg);\r\n return new this(props, arg.iModelDb);\r\n }\r\n\r\n /** Create a new SheetIndexFolder\r\n * @returns The Id of the newly inserted SheetIndexFolder element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static insert(txn: EditTxn, arg: Omit<SheetIndexEntryCreateArgs, \"iModelDb\">): Id64String;\r\n /** @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use SheetIndexFolder.insert(txn, ...) instead. */\r\n public static insert(arg: SheetIndexEntryCreateArgs): Id64String;\r\n public static insert(txnOrArg: EditTxn | SheetIndexEntryCreateArgs, arg?: Omit<SheetIndexEntryCreateArgs, \"iModelDb\">): Id64String {\r\n const txn = txnOrArg instanceof EditTxn ? txnOrArg : txnOrArg.iModelDb[_implicitTxn];\r\n const createArg = txnOrArg instanceof EditTxn ? arg! : {\r\n sheetIndexModelId: txnOrArg.sheetIndexModelId,\r\n parentId: txnOrArg.parentId,\r\n name: txnOrArg.name,\r\n priority: txnOrArg.priority,\r\n };\r\n const instance = this.create({ ...createArg, iModelDb: txn.iModel });\r\n instance.id = instance.insert(txn);\r\n return instance.id;\r\n }\r\n}\r\n\r\n/** A node within one [[SheetIndex]] that incorporates another [[SheetIndex]] as a sub-tree.\r\n * @beta\r\n*/\r\nexport class SheetIndexReference extends SheetIndexEntry {\r\n public static override get className(): string { return \"SheetIndexReference\"; }\r\n\r\n /** The bis:SheetIndex that this bis:SheetIndexReference is pointing to. */\r\n public sheetIndex?: SheetIndexReferenceRefersToSheetIndex;\r\n\r\n protected constructor(props: SheetIndexReferenceProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n if (props.sheetIndex) {\r\n const sheetIndex = iModel.elements.tryGetElement<SheetIndex>(props.sheetIndex.id);\r\n if (!sheetIndex)\r\n throw new IModelError(IModelStatus.NotFound, \"SheetIndex not found\");\r\n\r\n this.sheetIndex = new SheetIndexReferenceRefersToSheetIndex(props.sheetIndex.id);\r\n }\r\n }\r\n\r\n protected static createReferenceRelationshipProps(id: Id64String): RelatedElementProps {\r\n return { id, relClassName: SheetIndexReferenceRefersToSheetIndex.classFullName };\r\n }\r\n\r\n public override toJSON(): SheetIndexReferenceProps { // This override only specializes the return type\r\n return {\r\n ...super.toJSON(),\r\n sheetIndex: this.sheetIndex ? this.sheetIndex.toJSON() : undefined,\r\n };\r\n }\r\n\r\n /** Create a new SheetIndexReference\r\n * @returns The newly constructed SheetIndexReference element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(arg: SheetIndexReferenceCreateArgs) {\r\n const props: SheetIndexReferenceProps = {\r\n ...this.createProps(arg),\r\n sheetIndex: arg.sheetIndexId ? this.createReferenceRelationshipProps(arg.sheetIndexId) : undefined,\r\n };\r\n return new this(props, arg.iModelDb);\r\n }\r\n\r\n /** Create a new SheetIndexReference\r\n * @returns The Id of the newly inserted SheetIndexReference element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static insert(txn: EditTxn, arg: Omit<SheetIndexReferenceCreateArgs, \"iModelDb\">): Id64String;\r\n /** @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use SheetIndexReference.insert(txn, ...) instead. */\r\n public static insert(arg: SheetIndexReferenceCreateArgs): Id64String;\r\n public static insert(txnOrArg: EditTxn | SheetIndexReferenceCreateArgs, arg?: Omit<SheetIndexReferenceCreateArgs, \"iModelDb\">): Id64String {\r\n const txn = txnOrArg instanceof EditTxn ? txnOrArg : txnOrArg.iModelDb[_implicitTxn];\r\n const createArg = txnOrArg instanceof EditTxn ? arg! : {\r\n sheetIndexModelId: txnOrArg.sheetIndexModelId,\r\n parentId: txnOrArg.parentId,\r\n name: txnOrArg.name,\r\n priority: txnOrArg.priority,\r\n sheetIndexId: txnOrArg.sheetIndexId,\r\n };\r\n const instance = this.create({ ...createArg, iModelDb: txn.iModel });\r\n instance.id = instance.insert(txn);\r\n return instance.id;\r\n }\r\n\r\n /** @alpha */\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n if (this.sheetIndex)\r\n referenceIds.addElement(this.sheetIndex.id);\r\n }\r\n}\r\n\r\n/** A leaf node in a [[SheetIndex]] that refers to a specific [[Sheet]].\r\n * @beta\r\n*/\r\nexport class SheetReference extends SheetIndexEntry {\r\n public static override get className(): string { return \"SheetReference\"; }\r\n\r\n /** The bis:Sheet that this bis:SheetReference is pointing to. */\r\n public sheet: SheetReferenceRefersToSheet | undefined;\r\n\r\n protected constructor(props: SheetReferenceProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n if (props.sheet) {\r\n const sheet = iModel.elements.tryGetElement<Sheet>(props.sheet.id);\r\n if (!sheet)\r\n throw new IModelError(IModelStatus.NotFound, \"Sheet not found\");\r\n\r\n this.sheet = new SheetReferenceRefersToSheet(sheet.id);\r\n }\r\n }\r\n\r\n protected static createReferenceRelationshipProps(id: Id64String): RelatedElementProps {\r\n return { id, relClassName: SheetIndexReferenceRefersToSheetIndex.classFullName };\r\n }\r\n\r\n public override toJSON(): SheetReferenceProps { // This override only specializes the return type\r\n return {\r\n ...super.toJSON(),\r\n sheet: this.sheet ? this.sheet.toJSON() : undefined,\r\n };\r\n }\r\n\r\n /** Create a new SheetReference\r\n * @returns The newly constructed SheetReference element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(arg: SheetReferenceCreateArgs) {\r\n const props: SheetReferenceProps = {\r\n ...this.createProps(arg),\r\n sheet: arg.sheetId ? this.createReferenceRelationshipProps(arg.sheetId) : undefined,\r\n };\r\n return new this(props, arg.iModelDb);\r\n }\r\n\r\n /** Insert a new SheetReference\r\n * @returns The Id of the newly inserted SheetReference element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static insert(txn: EditTxn, arg: Omit<SheetReferenceCreateArgs, \"iModelDb\">): Id64String;\r\n /** @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use SheetReference.insert(txn, ...) instead. */\r\n public static insert(arg: SheetReferenceCreateArgs): Id64String;\r\n public static insert(txnOrArg: EditTxn | SheetReferenceCreateArgs, arg?: Omit<SheetReferenceCreateArgs, \"iModelDb\">): Id64String {\r\n const txn = txnOrArg instanceof EditTxn ? txnOrArg : txnOrArg.iModelDb[_implicitTxn];\r\n const createArg = txnOrArg instanceof EditTxn ? arg! : {\r\n sheetIndexModelId: txnOrArg.sheetIndexModelId,\r\n parentId: txnOrArg.parentId,\r\n name: txnOrArg.name,\r\n priority: txnOrArg.priority,\r\n sheetId: txnOrArg.sheetId,\r\n };\r\n const instance = this.create({ ...createArg, iModelDb: txn.iModel });\r\n instance.id = instance.insert(txn);\r\n return instance.id;\r\n }\r\n\r\n /** @alpha */\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n if (this.sheet)\r\n referenceIds.addModel(this.sheet.id);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"SheetIndex.js","sourceRoot":"","sources":["../../src/SheetIndex.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,IAAI,EAA8D,WAAW,EAAmH,MAAM,oBAAoB,CAAC;AACjP,OAAO,EAAE,2BAA2B,EAAS,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAc,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,qCAAqC,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAClK,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAkClD;;;;GAIG;AACH,MAAM,OAAO,UAAW,SAAQ,2BAA2B;IAClD,MAAM,KAAc,SAAS,KAAa,OAAO,YAAY,CAAC,CAAC,CAAC;IAEvE;;;;OAIG;IACI,MAAM,CAAC,UAAU,CAAC,MAAgB,EAAE,sBAAsC,EAAE,SAAiB;QAClG,MAAM,QAAQ,GAAa,MAAM,CAAC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I;YACnB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,OAAO,EAAE,QAAQ,CAAC,OAAO;SAC1B,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;QACrE,QAAQ,CAAC,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACnC,OAAO,QAAQ,CAAC,EAAE,CAAC;IACrB,CAAC;IAED,aAAa;IACM,mBAAmB,CAAC,YAAgC;QACrE,KAAK,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACxC,IAAI,IAAI,CAAC,KAAK;YACZ,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACzC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Elements\r\n */\r\n\r\nimport { BisCodeSpec, Code, CodeScopeProps, CodeSpec, ElementProps, EntityReferenceSet, IModelError, RelatedElementProps, SheetIndexEntryProps, SheetIndexFolderProps, SheetIndexReferenceProps, SheetReferenceProps } from \"@itwin/core-common\";\r\nimport { InformationReferenceElement, Sheet } from \"./Element\";\r\nimport { EditTxn } from \"./EditTxn\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { Id64String, IModelStatus } from \"@itwin/core-bentley\";\r\nimport { SheetIndexFolderOwnsEntries, SheetIndexOwnsEntries, SheetIndexReferenceRefersToSheetIndex, SheetReferenceRefersToSheet } from \"./NavigationRelationship\";\r\nimport { _implicitTxn } from \"./internal/Symbols\";\r\n\r\n/** Arguments used to create a [[SheetIndexEntry]].\r\n * @beta\r\n */\r\nexport interface SheetIndexEntryCreateArgs {\r\n /** The iModel that will contain the sheet index entry. */\r\n iModelDb: IModelDb;\r\n /** The Id of the [[SheetIndexModel]] that will contain the sheet index entry. */\r\n sheetIndexModelId: Id64String;\r\n /** The [[SheetIndex]] or [[SheetIndexFolder]] that is parent to this SheetIndexEntry */\r\n parentId: Id64String;\r\n /** The name of the SheetIndexEntry */\r\n name: string;\r\n /** The priority of the SheetIndexEntry */\r\n priority: number;\r\n}\r\n\r\n/** Arguments supplied when creating a [[SheetIndexReference]].\r\n * @beta\r\n */\r\nexport interface SheetIndexReferenceCreateArgs extends SheetIndexEntryCreateArgs {\r\n /** The [[SheetIndex]] to which the reference refers. */\r\n sheetIndexId?: Id64String;\r\n}\r\n\r\n/** Arguments supplied when creating a [[SheetReference]].\r\n * @beta\r\n */\r\nexport interface SheetReferenceCreateArgs extends SheetIndexEntryCreateArgs {\r\n /** The [[Sheet]] to which the reference refers. */\r\n sheetId?: Id64String;\r\n}\r\n\r\n/** A [structured collection]($docs/bis/domains/drawings-sheets#sheet-index) of [[SheetIndexEntry]]s.\r\n * The sheet index is a tree whose leaf nodes refer to [[Sheet]]s, optionally grouped by [[SheetIndexFolder]]s and/or incorporating\r\n * sub-trees via [[SheetIndexReference]]s.\r\n * @beta\r\n */\r\nexport class SheetIndex extends InformationReferenceElement {\r\n public static override get className(): string { return \"SheetIndex\"; }\r\n\r\n /** Create a Code for a SheetIndex given a name that is meant to be unique within the scope of the specified SheetIndexModel.\r\n * @param iModel The IModelDb\r\n * @param scopeSheetIndexModelId The Id of the Model that contains the LinkElement and provides the scope for its name.\r\n * @param codeValue The SheetIndex name\r\n */\r\n public static createCode(iModel: IModelDb, scopeSheetIndexModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.sheetIndex);\r\n return new Code({ spec: codeSpec.id, scope: scopeSheetIndexModelId, value: codeValue });\r\n }\r\n\r\n /** Create a SheetIndex\r\n * @param iModelDb The IModelDb\r\n * @param modelId The Id of the Model that contains the SheetIndex and provides the scope for its name.\r\n * @param name The name (codeValue) of the SheetIndex\r\n * @returns The newly constructed SheetIndex\r\n * @throws [[IModelError]] if there is a problem creating the SheetIndex\r\n */\r\n public static create(iModelDb: IModelDb, modelId: Id64String, name: string): SheetIndex {\r\n const props: ElementProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, modelId, name).toJSON(),\r\n model: modelId,\r\n };\r\n return new this(props, iModelDb);\r\n }\r\n\r\n /** Insert a SheetIndex\r\n * @param iModelDb The IModelDb\r\n * @param modelId The Id of the Model that contains the SheetIndex and provides the scope for its name.\r\n * @param name The name (codeValue) of the SheetIndex\r\n * @returns The Id of the newly inserted SheetIndex\r\n * @throws [[IModelError]] if there is a problem inserting the SheetIndex\r\n */\r\n public static insert(txn: EditTxn, modelId: Id64String, name: string): Id64String;\r\n /** @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use SheetIndex.insert(txn, ...) instead. */\r\n public static insert(iModelDb: IModelDb, modelId: Id64String, name: string): Id64String;\r\n public static insert(txnOrDb: EditTxn | IModelDb, modelId: Id64String, name: string): Id64String {\r\n const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];\r\n const instance = this.create(txn.iModel, modelId, name);\r\n instance.id = instance.insert(txn);\r\n return instance.id;\r\n }\r\n}\r\n\r\n/** The base class for all elements that can participate in a [[SheetIndex]] hierarchy.\r\n * @beta\r\n*/\r\nexport abstract class SheetIndexEntry extends InformationReferenceElement {\r\n public static override get className(): string { return \"SheetIndexEntry\"; }\r\n /** Can be used to prioritize or order members within a SheetIndex or SheetIndexFolder. */\r\n public entryPriority: number;\r\n\r\n protected constructor(props: SheetIndexEntryProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.entryPriority = props.entryPriority;\r\n }\r\n\r\n public override toJSON(): SheetIndexEntryProps {\r\n return { ...super.toJSON(), entryPriority: this.entryPriority };\r\n }\r\n\r\n /** Create a Code for a Sheet Index Entry given a name that is meant to be unique within the scope of the specified SheetIndexModel.\r\n * @param iModel The IModel\r\n * @param scopeModelId The Id of the [[SheetIndexModel]] that contains the [[SheetIndexEntry]] and provides the scope for its name.\r\n * @param codeValue The name of the entry\r\n */\r\n public static createCode(iModelDb: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.sheetIndexEntry);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n protected static createParentRelationshipProps(iModelDb: IModelDb, id: Id64String): RelatedElementProps {\r\n const parentElementProps = iModelDb.elements.getElementProps(id);\r\n const isFolder = parentElementProps.classFullName === SheetIndexFolder.classFullName;\r\n const relClass = isFolder ? SheetIndexFolderOwnsEntries : SheetIndexOwnsEntries;\r\n return { id, relClassName: relClass.classFullName };\r\n }\r\n\r\n protected static createProps(arg: SheetIndexEntryCreateArgs) {\r\n const parent = this.createParentRelationshipProps(arg.iModelDb, arg.parentId);\r\n const props: SheetIndexEntryProps = {\r\n classFullName: this.classFullName,\r\n model: arg.sheetIndexModelId,\r\n code: this.createCode(arg.iModelDb, arg.sheetIndexModelId, arg.name),\r\n entryPriority: arg.priority,\r\n parent,\r\n };\r\n return props;\r\n }\r\n}\r\n\r\n/** A container used to group [[SheetIndexEntry]]s within a [[SheetIndex]].\r\n * @beta\r\n */\r\nexport class SheetIndexFolder extends SheetIndexEntry {\r\n public static override get className(): string { return \"SheetIndexFolder\"; }\r\n\r\n /** Create a new SheetIndexFolder\r\n * @returns The newly constructed SheetIndexFolder element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(arg: SheetIndexEntryCreateArgs) {\r\n const props: SheetIndexFolderProps = this.createProps(arg);\r\n return new this(props, arg.iModelDb);\r\n }\r\n\r\n /** Create a new SheetIndexFolder\r\n * @returns The Id of the newly inserted SheetIndexFolder element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static insert(txn: EditTxn, arg: Omit<SheetIndexEntryCreateArgs, \"iModelDb\">): Id64String;\r\n /** @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use SheetIndexFolder.insert(txn, ...) instead. */\r\n public static insert(arg: SheetIndexEntryCreateArgs): Id64String;\r\n public static insert(txnOrArg: EditTxn | SheetIndexEntryCreateArgs, arg?: Omit<SheetIndexEntryCreateArgs, \"iModelDb\">): Id64String {\r\n const txn = txnOrArg instanceof EditTxn ? txnOrArg : txnOrArg.iModelDb[_implicitTxn];\r\n const createArg = txnOrArg instanceof EditTxn ? arg! : {\r\n sheetIndexModelId: txnOrArg.sheetIndexModelId,\r\n parentId: txnOrArg.parentId,\r\n name: txnOrArg.name,\r\n priority: txnOrArg.priority,\r\n };\r\n const instance = this.create({ ...createArg, iModelDb: txn.iModel });\r\n instance.id = instance.insert(txn);\r\n return instance.id;\r\n }\r\n}\r\n\r\n/** A node within one [[SheetIndex]] that incorporates another [[SheetIndex]] as a sub-tree.\r\n * @beta\r\n*/\r\nexport class SheetIndexReference extends SheetIndexEntry {\r\n public static override get className(): string { return \"SheetIndexReference\"; }\r\n\r\n /** The bis:SheetIndex that this bis:SheetIndexReference is pointing to. */\r\n public sheetIndex?: SheetIndexReferenceRefersToSheetIndex;\r\n\r\n protected constructor(props: SheetIndexReferenceProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n if (props.sheetIndex) {\r\n const sheetIndex = iModel.elements.tryGetElement<SheetIndex>(props.sheetIndex.id);\r\n if (!sheetIndex)\r\n throw new IModelError(IModelStatus.NotFound, \"SheetIndex not found\");\r\n\r\n this.sheetIndex = new SheetIndexReferenceRefersToSheetIndex(props.sheetIndex.id);\r\n }\r\n }\r\n\r\n protected static createReferenceRelationshipProps(id: Id64String): RelatedElementProps {\r\n return { id, relClassName: SheetIndexReferenceRefersToSheetIndex.classFullName };\r\n }\r\n\r\n public override toJSON(): SheetIndexReferenceProps { // This override only specializes the return type\r\n return {\r\n ...super.toJSON(),\r\n sheetIndex: this.sheetIndex ? this.sheetIndex.toJSON() : undefined,\r\n };\r\n }\r\n\r\n /** Create a new SheetIndexReference\r\n * @returns The newly constructed SheetIndexReference element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(arg: SheetIndexReferenceCreateArgs) {\r\n const props: SheetIndexReferenceProps = {\r\n ...this.createProps(arg),\r\n sheetIndex: arg.sheetIndexId ? this.createReferenceRelationshipProps(arg.sheetIndexId) : undefined,\r\n };\r\n return new this(props, arg.iModelDb);\r\n }\r\n\r\n /** Create a new SheetIndexReference\r\n * @returns The Id of the newly inserted SheetIndexReference element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static insert(txn: EditTxn, arg: Omit<SheetIndexReferenceCreateArgs, \"iModelDb\">): Id64String;\r\n /** @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use SheetIndexReference.insert(txn, ...) instead. */\r\n public static insert(arg: SheetIndexReferenceCreateArgs): Id64String;\r\n public static insert(txnOrArg: EditTxn | SheetIndexReferenceCreateArgs, arg?: Omit<SheetIndexReferenceCreateArgs, \"iModelDb\">): Id64String {\r\n const txn = txnOrArg instanceof EditTxn ? txnOrArg : txnOrArg.iModelDb[_implicitTxn];\r\n const createArg = txnOrArg instanceof EditTxn ? arg! : {\r\n sheetIndexModelId: txnOrArg.sheetIndexModelId,\r\n parentId: txnOrArg.parentId,\r\n name: txnOrArg.name,\r\n priority: txnOrArg.priority,\r\n sheetIndexId: txnOrArg.sheetIndexId,\r\n };\r\n const instance = this.create({ ...createArg, iModelDb: txn.iModel });\r\n instance.id = instance.insert(txn);\r\n return instance.id;\r\n }\r\n\r\n /** @alpha */\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n if (this.sheetIndex)\r\n referenceIds.addElement(this.sheetIndex.id);\r\n }\r\n}\r\n\r\n/** A leaf node in a [[SheetIndex]] that refers to a specific [[Sheet]].\r\n * @beta\r\n*/\r\nexport class SheetReference extends SheetIndexEntry {\r\n public static override get className(): string { return \"SheetReference\"; }\r\n\r\n /** The bis:Sheet that this bis:SheetReference is pointing to. */\r\n public sheet: SheetReferenceRefersToSheet | undefined;\r\n\r\n protected constructor(props: SheetReferenceProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n if (props.sheet) {\r\n const sheet = iModel.elements.tryGetElement<Sheet>(props.sheet.id);\r\n if (!sheet)\r\n throw new IModelError(IModelStatus.NotFound, \"Sheet not found\");\r\n\r\n this.sheet = new SheetReferenceRefersToSheet(sheet.id);\r\n }\r\n }\r\n\r\n protected static createReferenceRelationshipProps(id: Id64String): RelatedElementProps {\r\n return { id, relClassName: SheetIndexReferenceRefersToSheetIndex.classFullName };\r\n }\r\n\r\n public override toJSON(): SheetReferenceProps { // This override only specializes the return type\r\n return {\r\n ...super.toJSON(),\r\n sheet: this.sheet ? this.sheet.toJSON() : undefined,\r\n };\r\n }\r\n\r\n /** Create a new SheetReference\r\n * @returns The newly constructed SheetReference element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(arg: SheetReferenceCreateArgs) {\r\n const props: SheetReferenceProps = {\r\n ...this.createProps(arg),\r\n sheet: arg.sheetId ? this.createReferenceRelationshipProps(arg.sheetId) : undefined,\r\n };\r\n return new this(props, arg.iModelDb);\r\n }\r\n\r\n /** Insert a new SheetReference\r\n * @returns The Id of the newly inserted SheetReference element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static insert(txn: EditTxn, arg: Omit<SheetReferenceCreateArgs, \"iModelDb\">): Id64String;\r\n /** @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use SheetReference.insert(txn, ...) instead. */\r\n public static insert(arg: SheetReferenceCreateArgs): Id64String;\r\n public static insert(txnOrArg: EditTxn | SheetReferenceCreateArgs, arg?: Omit<SheetReferenceCreateArgs, \"iModelDb\">): Id64String {\r\n const txn = txnOrArg instanceof EditTxn ? txnOrArg : txnOrArg.iModelDb[_implicitTxn];\r\n const createArg = txnOrArg instanceof EditTxn ? arg! : {\r\n sheetIndexModelId: txnOrArg.sheetIndexModelId,\r\n parentId: txnOrArg.parentId,\r\n name: txnOrArg.name,\r\n priority: txnOrArg.priority,\r\n sheetId: txnOrArg.sheetId,\r\n };\r\n const instance = this.create({ ...createArg, iModelDb: txn.iModel });\r\n instance.id = instance.insert(txn);\r\n return instance.id;\r\n }\r\n\r\n /** @alpha */\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n if (this.sheet)\r\n referenceIds.addModel(this.sheet.id);\r\n }\r\n}\r\n"]}
@@ -57,7 +57,7 @@ export declare class Texture extends DefinitionElement {
57
57
  */
58
58
  static insertTexture(txn: EditTxn, definitionModelId: Id64String, name: string, format: ImageSourceFormat, data: Uint8Array | Base64EncodedString, description?: string): Id64String;
59
59
  /** Insert a new texture into a [[DefinitionModel]].
60
- * @deprecated in 5.1.9 - will not be removed until after 2026-08-04. Use Texture.insertTexture(txn, ...) instead.
60
+ * @deprecated in 5.9.0 - will not be removed until after 2026-08-04. Use Texture.insertTexture(txn, ...) instead.
61
61
  */
62
62
  static insertTexture(iModelDb: IModelDb, definitionModelId: Id64String, name: string, format: ImageSourceFormat, data: Uint8Array | Base64EncodedString, description?: string): Id64String;
63
63
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Texture.js","sourceRoot":"","sources":["../../src/Texture.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EACL,mBAAmB,EAAE,WAAW,EAAE,IAAI,GACvC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAUlD;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,iBAAiB;IAC5C,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,O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AC,QAAkB,EAAE,iBAA6B,EAAE,IAAY,EAAE,MAAyB,EAAE,IAAsC,EAAE,WAAoB;QAClL,MAAM,YAAY,GAAuB;YACvC,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,iBAAiB,EAAE,IAAI,CAAC;YACxD,MAAM;YACN,IAAI;YACJ,WAAW;YACX,KAAK,EAAE,iBAAiB;YACxB,SAAS,EAAE,KAAK;SACjB,CAAC;QAEF,OAAO,IAAI,OAAO,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAmBM,MAAM,CAAC,aAAa,CAAC,OAA2B,EAAE,iBAA6B,EAAE,IAAY,EAAE,MAAyB,EAAE,IAAsC,EAAE,WAAoB;QAC3L,MAAM,GAAG,GAAG,OAAO,YAAY,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACzE,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;QACnG,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Elements\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n Base64EncodedString, BisCodeSpec, Code, CodeScopeProps, CodeSpec, ImageSourceFormat, TextureProps,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement } from \"./Element\";\r\nimport { EditTxn } from \"./EditTxn\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { _implicitTxn } from \"./internal/Symbols\";\r\n\r\n/** A [TextureProps]($common) in which the image data can be specified either as a base-64-encoded string or a Uint8Array.\r\n * @see [[Texture]] constructor.\r\n * @beta\r\n */\r\nexport interface TextureCreateProps extends Omit<TextureProps, \"data\"> {\r\n data: Base64EncodedString | Uint8Array;\r\n}\r\n\r\n/** Defines a rendering texture that is associated with a Material and applied to surface geometry.\r\n * @public @preview\r\n */\r\nexport class Texture extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"Texture\"; }\r\n public format: ImageSourceFormat;\r\n public data: Uint8Array;\r\n public description?: string;\r\n\r\n /** @beta */\r\n protected constructor(props: TextureCreateProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.format = props.format;\r\n this.data = typeof props.data === \"string\" ? Base64EncodedString.toUint8Array(props.data) : props.data;\r\n this.description = props.description;\r\n }\r\n\r\n public override toJSON(): TextureProps {\r\n const val = super.toJSON() as TextureProps;\r\n val.format = this.format;\r\n val.data = Base64EncodedString.fromUint8Array(this.data);\r\n val.description = this.description;\r\n return val;\r\n }\r\n\r\n /** Create a Code for a Texture given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the Texture and provides the scope for its name.\r\n * @param name The Texture name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.texture);\r\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\r\n }\r\n\r\n /** Create a texture with the given parameters.\r\n * @param iModelDb The iModel to contain the texture.\r\n * @param definitionModelId The [[DefinitionModel]] to contain the texture.\r\n * @param name The name to serve as the texture's [Code]($common) value.\r\n * @param format The format of the image data.\r\n * @param data The image data in the format specified by `format`.\r\n * @param description An optional description of the texture\r\n * @returns The newly constructed Texture element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n * @see [[insertTexture]] to insert a new texture into the iModel.\r\n */\r\n public static createTexture(iModelDb: IModelDb, definitionModelId: Id64String, name: string, format: ImageSourceFormat, data: Uint8Array | Base64EncodedString, description?: string): Texture {\r\n const textureProps: TextureCreateProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n format,\r\n data,\r\n description,\r\n model: definitionModelId,\r\n isPrivate: false,\r\n };\r\n\r\n return new Texture(textureProps, iModelDb);\r\n }\r\n\r\n /** Insert a new texture into a [[DefinitionModel]].\r\n * @param iModelDb The iModel to contain the texture.\r\n * @param definitionModelId The [[DefinitionModel]] to contain the texture.\r\n * @param name The name to serve as the texture's [Code]($common) value.\r\n * @param format The format of the image data.\r\n * @param data The image data in the format specified by `format`.\r\n * @param description An optional description of the texture\r\n * @returns The Id of the newly-inserted texture element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n * @see [[insertTexture]] to insert a new texture into the iModel.\r\n * @beta\r\n */\r\n public static insertTexture(txn: EditTxn, definitionModelId: Id64String, name: string, format: ImageSourceFormat, data: Uint8Array | Base64EncodedString, description?: string): Id64String;\r\n /** Insert a new texture into a [[DefinitionModel]].\r\n * @deprecated in 5.1.9 - will not be removed until after 2026-08-04. Use Texture.insertTexture(txn, ...) instead.\r\n */\r\n public static insertTexture(iModelDb: IModelDb, definitionModelId: Id64String, name: string, format: ImageSourceFormat, data: Uint8Array | Base64EncodedString, description?: string): Id64String;\r\n public static insertTexture(txnOrDb: EditTxn | IModelDb, definitionModelId: Id64String, name: string, format: ImageSourceFormat, data: Uint8Array | Base64EncodedString, description?: string): Id64String {\r\n const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];\r\n const texture = this.createTexture(txn.iModel, definitionModelId, name, format, data, description);\r\n return texture.insert(txn);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Texture.js","sourceRoot":"","sources":["../../src/Texture.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;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C,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC3E,OAAO,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACpH,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM,CAAC,aAAa,CAAC,QAAkB,EAAE,iBAA6B,EAAE,IAAY,EAAE,MAAyB,EAAE,IAAsC,EAAE,WAAoB;QAClL,MAAM,YAAY,GAAuB;YACvC,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,iBAAiB,EAAE,IAAI,CAAC;YACxD,MAAM;YACN,IAAI;YACJ,WAAW;YACX,KAAK,EAAE,iBAAiB;YACxB,SAAS,EAAE,KAAK;SACjB,CAAC;QAEF,OAAO,IAAI,OAAO,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAmBM,MAAM,CAAC,aAAa,CAAC,OAA2B,EAAE,iBAA6B,EAAE,IAAY,EAAE,MAAyB,EAAE,IAAsC,EAAE,WAAoB;QAC3L,MAAM,GAAG,GAAG,OAAO,YAAY,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACzE,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;QACnG,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Elements\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n Base64EncodedString, BisCodeSpec, Code, CodeScopeProps, CodeSpec, ImageSourceFormat, TextureProps,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement } from \"./Element\";\r\nimport { EditTxn } from \"./EditTxn\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { _implicitTxn } from \"./internal/Symbols\";\r\n\r\n/** A [TextureProps]($common) in which the image data can be specified either as a base-64-encoded string or a Uint8Array.\r\n * @see [[Texture]] constructor.\r\n * @beta\r\n */\r\nexport interface TextureCreateProps extends Omit<TextureProps, \"data\"> {\r\n data: Base64EncodedString | Uint8Array;\r\n}\r\n\r\n/** Defines a rendering texture that is associated with a Material and applied to surface geometry.\r\n * @public @preview\r\n */\r\nexport class Texture extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"Texture\"; }\r\n public format: ImageSourceFormat;\r\n public data: Uint8Array;\r\n public description?: string;\r\n\r\n /** @beta */\r\n protected constructor(props: TextureCreateProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.format = props.format;\r\n this.data = typeof props.data === \"string\" ? Base64EncodedString.toUint8Array(props.data) : props.data;\r\n this.description = props.description;\r\n }\r\n\r\n public override toJSON(): TextureProps {\r\n const val = super.toJSON() as TextureProps;\r\n val.format = this.format;\r\n val.data = Base64EncodedString.fromUint8Array(this.data);\r\n val.description = this.description;\r\n return val;\r\n }\r\n\r\n /** Create a Code for a Texture given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the Texture and provides the scope for its name.\r\n * @param name The Texture name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.texture);\r\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\r\n }\r\n\r\n /** Create a texture with the given parameters.\r\n * @param iModelDb The iModel to contain the texture.\r\n * @param definitionModelId The [[DefinitionModel]] to contain the texture.\r\n * @param name The name to serve as the texture's [Code]($common) value.\r\n * @param format The format of the image data.\r\n * @param data The image data in the format specified by `format`.\r\n * @param description An optional description of the texture\r\n * @returns The newly constructed Texture element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n * @see [[insertTexture]] to insert a new texture into the iModel.\r\n */\r\n public static createTexture(iModelDb: IModelDb, definitionModelId: Id64String, name: string, format: ImageSourceFormat, data: Uint8Array | Base64EncodedString, description?: string): Texture {\r\n const textureProps: TextureCreateProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n format,\r\n data,\r\n description,\r\n model: definitionModelId,\r\n isPrivate: false,\r\n };\r\n\r\n return new Texture(textureProps, iModelDb);\r\n }\r\n\r\n /** Insert a new texture into a [[DefinitionModel]].\r\n * @param iModelDb The iModel to contain the texture.\r\n * @param definitionModelId The [[DefinitionModel]] to contain the texture.\r\n * @param name The name to serve as the texture's [Code]($common) value.\r\n * @param format The format of the image data.\r\n * @param data The image data in the format specified by `format`.\r\n * @param description An optional description of the texture\r\n * @returns The Id of the newly-inserted texture element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n * @see [[insertTexture]] to insert a new texture into the iModel.\r\n * @beta\r\n */\r\n public static insertTexture(txn: EditTxn, definitionModelId: Id64String, name: string, format: ImageSourceFormat, data: Uint8Array | Base64EncodedString, description?: string): Id64String;\r\n /** Insert a new texture into a [[DefinitionModel]].\r\n * @deprecated in 5.9.0 - will not be removed until after 2026-08-04. Use Texture.insertTexture(txn, ...) instead.\r\n */\r\n public static insertTexture(iModelDb: IModelDb, definitionModelId: Id64String, name: string, format: ImageSourceFormat, data: Uint8Array | Base64EncodedString, description?: string): Id64String;\r\n public static insertTexture(txnOrDb: EditTxn | IModelDb, definitionModelId: Id64String, name: string, format: ImageSourceFormat, data: Uint8Array | Base64EncodedString, description?: string): Id64String {\r\n const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];\r\n const texture = this.createTexture(txn.iModel, definitionModelId, name, format, data, description);\r\n return texture.insert(txn);\r\n }\r\n}\r\n"]}
@@ -60,7 +60,7 @@ export declare class ModelSelector extends DefinitionElement {
60
60
  * @beta
61
61
  */
62
62
  static insert(txn: EditTxn, definitionModelId: Id64String, name: string, models: Id64Array): Id64String;
63
- /** @deprecated in 5.1.9 - will not be removed until after 2026-08-04. Use ModelSelector.insert(txn, ...) instead. */
63
+ /** @deprecated in 5.9.0 - will not be removed until after 2026-08-04. Use ModelSelector.insert(txn, ...) instead. */
64
64
  static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String;
65
65
  }
66
66
  /** Holds a list of Ids of Categories to be displayed in a view.
@@ -114,7 +114,7 @@ export declare class CategorySelector extends DefinitionElement {
114
114
  * @beta
115
115
  */
116
116
  static insert(txn: EditTxn, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String;
117
- /** @deprecated in 5.1.9 - will not be removed until after 2026-08-04. Use CategorySelector.insert(txn, ...) instead. */
117
+ /** @deprecated in 5.9.0 - will not be removed until after 2026-08-04. Use CategorySelector.insert(txn, ...) instead. */
118
118
  static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String;
119
119
  }
120
120
  /**
@@ -305,7 +305,7 @@ export declare class SpatialViewDefinition extends ViewDefinition3d {
305
305
  * @beta
306
306
  */
307
307
  static insertWithCamera(txn: EditTxn, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView?: StandardViewIndex, cameraAngle?: number): Id64String;
308
- /** @deprecated in 5.1.9 - will not be removed until after 2026-08-04. Use SpatialViewDefinition.insertWithCamera(txn, ...) instead. */
308
+ /** @deprecated in 5.9.0 - will not be removed until after 2026-08-04. Use SpatialViewDefinition.insertWithCamera(txn, ...) instead. */
309
309
  static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView?: StandardViewIndex, cameraAngle?: number): Id64String;
310
310
  }
311
311
  /** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.
@@ -344,7 +344,7 @@ export declare class OrthographicViewDefinition extends SpatialViewDefinition {
344
344
  * @beta
345
345
  */
346
346
  static insert(txn: EditTxn, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView?: StandardViewIndex): Id64String;
347
- /** @deprecated in 5.1.9 - will not be removed until after 2026-08-04. Use OrthographicViewDefinition.insert(txn, ...) instead. */
347
+ /** @deprecated in 5.9.0 - will not be removed until after 2026-08-04. Use OrthographicViewDefinition.insert(txn, ...) instead. */
348
348
  static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView?: StandardViewIndex): Id64String;
349
349
  /** Set a new viewed range without changing the rotation or any other properties. */
350
350
  setRange(range: Range3d): void;
@@ -423,7 +423,7 @@ export declare class DrawingViewDefinition extends ViewDefinition2d {
423
423
  * @beta
424
424
  */
425
425
  static insert(txn: EditTxn, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String;
426
- /** @deprecated in 5.1.9 - will not be removed until after 2026-08-04. Use DrawingViewDefinition.insert(txn, ...) instead. */
426
+ /** @deprecated in 5.9.0 - will not be removed until after 2026-08-04. Use DrawingViewDefinition.insert(txn, ...) instead. */
427
427
  static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String;
428
428
  }
429
429
  /** Arguments to be passed in to [[SheetViewDefinition.create]]
@@ -457,7 +457,7 @@ export declare class SheetViewDefinition extends ViewDefinition2d {
457
457
  * @beta
458
458
  */
459
459
  static insert(txn: EditTxn, args: Omit<CreateSheetViewDefinitionArgs, "iModel">): Id64String;
460
- /** @deprecated in 5.1.9 - will not be removed until after 2026-08-04. Use SheetViewDefinition.insert(txn, ...) instead. */
460
+ /** @deprecated in 5.9.0 - will not be removed until after 2026-08-04. Use SheetViewDefinition.insert(txn, ...) instead. */
461
461
  static insert(args: CreateSheetViewDefinitionArgs): Id64String;
462
462
  /** Create a SheetViewDefinition from JSON props */
463
463
  static fromJSON(props: Omit<ViewDefinition2dProps, "classFullName">, iModel: IModelDb): SheetViewDefinition;