@itwin/tree-widget-react 0.10.0 → 1.0.0-dev.0

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 (194) hide show
  1. package/CHANGELOG.md +331 -0
  2. package/README.md +146 -29
  3. package/lib/cjs/TreeWidget.d.ts +0 -1
  4. package/lib/cjs/TreeWidget.js +1 -6
  5. package/lib/cjs/TreeWidget.js.map +1 -1
  6. package/lib/cjs/components/TreeFilteringState.d.ts +3 -1
  7. package/lib/cjs/components/TreeFilteringState.js +19 -40
  8. package/lib/cjs/components/TreeFilteringState.js.map +1 -1
  9. package/lib/cjs/components/TreeWidgetComponent.d.ts +29 -5
  10. package/lib/cjs/components/TreeWidgetComponent.js +85 -29
  11. package/lib/cjs/components/TreeWidgetComponent.js.map +1 -1
  12. package/lib/cjs/components/TreeWidgetComponent.scss +4 -24
  13. package/lib/cjs/components/TreeWidgetUiItemsProvider.d.ts +25 -2
  14. package/lib/cjs/components/TreeWidgetUiItemsProvider.js +31 -46
  15. package/lib/cjs/components/TreeWidgetUiItemsProvider.js.map +1 -1
  16. package/lib/cjs/components/tree-header/TreeHeader.d.ts +26 -0
  17. package/lib/cjs/components/tree-header/TreeHeader.js +43 -0
  18. package/lib/cjs/components/tree-header/TreeHeader.js.map +1 -0
  19. package/lib/cjs/components/tree-header/TreeHeader.scss +69 -0
  20. package/lib/cjs/components/trees/CategoriesVisibilityUtils.d.ts +12 -6
  21. package/lib/cjs/components/trees/CategoriesVisibilityUtils.js +10 -4
  22. package/lib/cjs/components/trees/CategoriesVisibilityUtils.js.map +1 -1
  23. package/lib/cjs/components/trees/Common.d.ts +2 -2
  24. package/lib/cjs/components/trees/Common.js +1 -1
  25. package/lib/cjs/components/trees/Common.js.map +1 -1
  26. package/lib/cjs/components/trees/VisibilityTreeBase.scss +66 -10
  27. package/lib/cjs/components/trees/VisibilityTreeEventHandler.d.ts +13 -12
  28. package/lib/cjs/components/trees/VisibilityTreeEventHandler.js +6 -17
  29. package/lib/cjs/components/trees/VisibilityTreeEventHandler.js.map +1 -1
  30. package/lib/cjs/components/trees/VisibilityTreeRenderer.d.ts +38 -14
  31. package/lib/cjs/components/trees/VisibilityTreeRenderer.js +35 -41
  32. package/lib/cjs/components/trees/VisibilityTreeRenderer.js.map +1 -1
  33. package/lib/cjs/components/trees/category-tree/CategoriesTree.d.ts +12 -11
  34. package/lib/cjs/components/trees/category-tree/CategoriesTree.js +17 -41
  35. package/lib/cjs/components/trees/category-tree/CategoriesTree.js.map +1 -1
  36. package/lib/cjs/components/trees/category-tree/CategoriesTreeComponent.d.ts +67 -6
  37. package/lib/cjs/components/trees/category-tree/CategoriesTreeComponent.js +61 -72
  38. package/lib/cjs/components/trees/category-tree/CategoriesTreeComponent.js.map +1 -1
  39. package/lib/cjs/components/trees/category-tree/CategoryVisibilityHandler.d.ts +30 -8
  40. package/lib/cjs/components/trees/category-tree/CategoryVisibilityHandler.js +61 -34
  41. package/lib/cjs/components/trees/category-tree/CategoryVisibilityHandler.js.map +1 -1
  42. package/lib/cjs/components/trees/external-sources-tree/ExternalSources.json +230 -0
  43. package/lib/cjs/components/trees/external-sources-tree/ExternalSourcesTree.d.ts +27 -0
  44. package/lib/cjs/components/trees/external-sources-tree/ExternalSourcesTree.js +61 -0
  45. package/lib/cjs/components/trees/external-sources-tree/ExternalSourcesTree.js.map +1 -0
  46. package/lib/cjs/components/trees/external-sources-tree/ExternalSourcesTreeComponent.d.ts +20 -0
  47. package/lib/cjs/components/trees/external-sources-tree/ExternalSourcesTreeComponent.js +39 -0
  48. package/lib/cjs/components/trees/external-sources-tree/ExternalSourcesTreeComponent.js.map +1 -0
  49. package/lib/cjs/components/trees/imodel-content-tree/IModelContentTree.d.ts +30 -0
  50. package/lib/cjs/components/trees/imodel-content-tree/IModelContentTree.js +39 -0
  51. package/lib/cjs/components/trees/imodel-content-tree/IModelContentTree.js.map +1 -0
  52. package/lib/cjs/components/trees/imodel-content-tree/IModelContentTreeComponent.d.ts +26 -0
  53. package/lib/cjs/components/trees/imodel-content-tree/IModelContentTreeComponent.js +35 -0
  54. package/lib/cjs/components/trees/imodel-content-tree/IModelContentTreeComponent.js.map +1 -0
  55. package/lib/cjs/components/trees/index.d.ts +5 -1
  56. package/lib/cjs/components/trees/index.js +10 -2
  57. package/lib/cjs/components/trees/index.js.map +1 -1
  58. package/lib/cjs/components/trees/models-tree/ModelsTree.d.ts +26 -18
  59. package/lib/cjs/components/trees/models-tree/ModelsTree.js +22 -50
  60. package/lib/cjs/components/trees/models-tree/ModelsTree.js.map +1 -1
  61. package/lib/cjs/components/trees/models-tree/ModelsTreeComponent.d.ts +70 -2
  62. package/lib/cjs/components/trees/models-tree/ModelsTreeComponent.js +68 -105
  63. package/lib/cjs/components/trees/models-tree/ModelsTreeComponent.js.map +1 -1
  64. package/lib/cjs/components/trees/models-tree/ModelsVisibilityHandler.d.ts +40 -12
  65. package/lib/cjs/components/trees/models-tree/ModelsVisibilityHandler.js +65 -5
  66. package/lib/cjs/components/trees/models-tree/ModelsVisibilityHandler.js.map +1 -1
  67. package/lib/cjs/components/trees/models-tree/Utils.d.ts +12 -0
  68. package/lib/cjs/components/trees/models-tree/Utils.js +625 -1
  69. package/lib/cjs/components/trees/models-tree/Utils.js.map +1 -1
  70. package/lib/cjs/components/utils/AutoSizer.d.ts +6 -3
  71. package/lib/cjs/components/utils/AutoSizer.js +9 -29
  72. package/lib/cjs/components/utils/AutoSizer.js.map +1 -1
  73. package/lib/cjs/components/utils/IsPromiseLike.d.ts +4 -1
  74. package/lib/cjs/components/utils/IsPromiseLike.js +6 -3
  75. package/lib/cjs/components/utils/IsPromiseLike.js.map +1 -1
  76. package/lib/cjs/tree-widget-react.d.ts +0 -1
  77. package/lib/cjs/tree-widget-react.js +5 -2
  78. package/lib/cjs/tree-widget-react.js.map +1 -1
  79. package/lib/esm/TreeWidget.d.ts +0 -1
  80. package/lib/esm/TreeWidget.js +2 -7
  81. package/lib/esm/TreeWidget.js.map +1 -1
  82. package/lib/esm/components/TreeFilteringState.d.ts +3 -1
  83. package/lib/esm/components/TreeFilteringState.js +17 -19
  84. package/lib/esm/components/TreeFilteringState.js.map +1 -1
  85. package/lib/esm/components/TreeWidgetComponent.d.ts +29 -5
  86. package/lib/esm/components/TreeWidgetComponent.js +82 -7
  87. package/lib/esm/components/TreeWidgetComponent.js.map +1 -1
  88. package/lib/esm/components/TreeWidgetComponent.scss +4 -24
  89. package/lib/esm/components/TreeWidgetUiItemsProvider.d.ts +25 -2
  90. package/lib/esm/components/TreeWidgetUiItemsProvider.js +29 -41
  91. package/lib/esm/components/TreeWidgetUiItemsProvider.js.map +1 -1
  92. package/lib/esm/components/tree-header/TreeHeader.d.ts +26 -0
  93. package/lib/esm/components/tree-header/TreeHeader.js +36 -0
  94. package/lib/esm/components/tree-header/TreeHeader.js.map +1 -0
  95. package/lib/esm/components/tree-header/TreeHeader.scss +69 -0
  96. package/lib/esm/components/trees/CategoriesVisibilityUtils.d.ts +12 -6
  97. package/lib/esm/components/trees/CategoriesVisibilityUtils.js +10 -4
  98. package/lib/esm/components/trees/CategoriesVisibilityUtils.js.map +1 -1
  99. package/lib/esm/components/trees/Common.d.ts +2 -2
  100. package/lib/esm/components/trees/Common.js +1 -1
  101. package/lib/esm/components/trees/Common.js.map +1 -1
  102. package/lib/esm/components/trees/VisibilityTreeBase.scss +66 -10
  103. package/lib/esm/components/trees/VisibilityTreeEventHandler.d.ts +13 -12
  104. package/lib/esm/components/trees/VisibilityTreeEventHandler.js +6 -17
  105. package/lib/esm/components/trees/VisibilityTreeEventHandler.js.map +1 -1
  106. package/lib/esm/components/trees/VisibilityTreeRenderer.d.ts +38 -14
  107. package/lib/esm/components/trees/VisibilityTreeRenderer.js +29 -19
  108. package/lib/esm/components/trees/VisibilityTreeRenderer.js.map +1 -1
  109. package/lib/esm/components/trees/category-tree/CategoriesTree.d.ts +12 -11
  110. package/lib/esm/components/trees/category-tree/CategoriesTree.js +16 -21
  111. package/lib/esm/components/trees/category-tree/CategoriesTree.js.map +1 -1
  112. package/lib/esm/components/trees/category-tree/CategoriesTreeComponent.d.ts +67 -6
  113. package/lib/esm/components/trees/category-tree/CategoriesTreeComponent.js +60 -52
  114. package/lib/esm/components/trees/category-tree/CategoriesTreeComponent.js.map +1 -1
  115. package/lib/esm/components/trees/category-tree/CategoryVisibilityHandler.d.ts +30 -8
  116. package/lib/esm/components/trees/category-tree/CategoryVisibilityHandler.js +57 -14
  117. package/lib/esm/components/trees/category-tree/CategoryVisibilityHandler.js.map +1 -1
  118. package/lib/esm/components/trees/external-sources-tree/ExternalSources.json +230 -0
  119. package/lib/esm/components/trees/external-sources-tree/ExternalSourcesTree.d.ts +27 -0
  120. package/lib/esm/components/trees/external-sources-tree/ExternalSourcesTree.js +34 -0
  121. package/lib/esm/components/trees/external-sources-tree/ExternalSourcesTree.js.map +1 -0
  122. package/lib/esm/components/trees/external-sources-tree/ExternalSourcesTreeComponent.d.ts +20 -0
  123. package/lib/esm/components/trees/external-sources-tree/ExternalSourcesTreeComponent.js +35 -0
  124. package/lib/esm/components/trees/external-sources-tree/ExternalSourcesTreeComponent.js.map +1 -0
  125. package/lib/esm/components/trees/imodel-content-tree/IModelContentTree.d.ts +30 -0
  126. package/lib/esm/components/trees/imodel-content-tree/IModelContentTree.js +32 -0
  127. package/lib/esm/components/trees/imodel-content-tree/IModelContentTree.js.map +1 -0
  128. package/lib/esm/components/trees/imodel-content-tree/IModelContentTreeComponent.d.ts +26 -0
  129. package/lib/esm/components/trees/imodel-content-tree/IModelContentTreeComponent.js +31 -0
  130. package/lib/esm/components/trees/imodel-content-tree/IModelContentTreeComponent.js.map +1 -0
  131. package/lib/esm/components/trees/index.d.ts +5 -1
  132. package/lib/esm/components/trees/index.js +5 -1
  133. package/lib/esm/components/trees/index.js.map +1 -1
  134. package/lib/esm/components/trees/models-tree/ModelsTree.d.ts +26 -18
  135. package/lib/esm/components/trees/models-tree/ModelsTree.js +23 -32
  136. package/lib/esm/components/trees/models-tree/ModelsTree.js.map +1 -1
  137. package/lib/esm/components/trees/models-tree/ModelsTreeComponent.d.ts +70 -2
  138. package/lib/esm/components/trees/models-tree/ModelsTreeComponent.js +66 -84
  139. package/lib/esm/components/trees/models-tree/ModelsTreeComponent.js.map +1 -1
  140. package/lib/esm/components/trees/models-tree/ModelsVisibilityHandler.d.ts +40 -12
  141. package/lib/esm/components/trees/models-tree/ModelsVisibilityHandler.js +60 -5
  142. package/lib/esm/components/trees/models-tree/ModelsVisibilityHandler.js.map +1 -1
  143. package/lib/esm/components/trees/models-tree/Utils.d.ts +12 -0
  144. package/lib/esm/components/trees/models-tree/Utils.js +622 -0
  145. package/lib/esm/components/trees/models-tree/Utils.js.map +1 -1
  146. package/lib/esm/components/utils/AutoSizer.d.ts +6 -3
  147. package/lib/esm/components/utils/AutoSizer.js +9 -10
  148. package/lib/esm/components/utils/AutoSizer.js.map +1 -1
  149. package/lib/esm/components/utils/IsPromiseLike.d.ts +4 -1
  150. package/lib/esm/components/utils/IsPromiseLike.js +4 -1
  151. package/lib/esm/components/utils/IsPromiseLike.js.map +1 -1
  152. package/lib/esm/tree-widget-react.d.ts +0 -1
  153. package/lib/esm/tree-widget-react.js +0 -1
  154. package/lib/esm/tree-widget-react.js.map +1 -1
  155. package/lib/public/locales/en/TreeWidget.json +13 -4
  156. package/package.json +42 -47
  157. package/lib/cjs/components/rulesets/ClassificationSystems.json +0 -122
  158. package/lib/cjs/components/search-bar/SearchBar.d.ts +0 -48
  159. package/lib/cjs/components/search-bar/SearchBar.js +0 -86
  160. package/lib/cjs/components/search-bar/SearchBar.js.map +0 -1
  161. package/lib/cjs/components/search-bar/SearchBar.scss +0 -118
  162. package/lib/cjs/components/search-bar/SearchBox.d.ts +0 -70
  163. package/lib/cjs/components/search-bar/SearchBox.js +0 -186
  164. package/lib/cjs/components/search-bar/SearchBox.js.map +0 -1
  165. package/lib/cjs/components/search-bar/SearchBox.scss +0 -70
  166. package/lib/cjs/components/trees/IModelContentTree.d.ts +0 -4
  167. package/lib/cjs/components/trees/IModelContentTree.js +0 -50
  168. package/lib/cjs/components/trees/IModelContentTree.js.map +0 -1
  169. package/lib/cjs/components/trees/models-tree/Hierarchy.GroupedByClass.json +0 -391
  170. package/lib/cjs/components/trees/models-tree/Hierarchy.json +0 -386
  171. package/lib/cjs/components/trees/models-tree/ModelsTreeSearch.json +0 -239
  172. package/lib/cjs/types.d.ts +0 -44
  173. package/lib/cjs/types.js +0 -11
  174. package/lib/cjs/types.js.map +0 -1
  175. package/lib/esm/components/rulesets/ClassificationSystems.json +0 -122
  176. package/lib/esm/components/search-bar/SearchBar.d.ts +0 -48
  177. package/lib/esm/components/search-bar/SearchBar.js +0 -60
  178. package/lib/esm/components/search-bar/SearchBar.js.map +0 -1
  179. package/lib/esm/components/search-bar/SearchBar.scss +0 -118
  180. package/lib/esm/components/search-bar/SearchBox.d.ts +0 -70
  181. package/lib/esm/components/search-bar/SearchBox.js +0 -160
  182. package/lib/esm/components/search-bar/SearchBox.js.map +0 -1
  183. package/lib/esm/components/search-bar/SearchBox.scss +0 -70
  184. package/lib/esm/components/trees/IModelContentTree.d.ts +0 -4
  185. package/lib/esm/components/trees/IModelContentTree.js +0 -24
  186. package/lib/esm/components/trees/IModelContentTree.js.map +0 -1
  187. package/lib/esm/components/trees/models-tree/Hierarchy.GroupedByClass.json +0 -391
  188. package/lib/esm/components/trees/models-tree/Hierarchy.json +0 -386
  189. package/lib/esm/components/trees/models-tree/ModelsTreeSearch.json +0 -239
  190. package/lib/esm/types.d.ts +0 -44
  191. package/lib/esm/types.js +0 -8
  192. package/lib/esm/types.js.map +0 -1
  193. /package/lib/cjs/components/{rulesets → trees/imodel-content-tree}/IModelContent.json +0 -0
  194. /package/lib/esm/components/{rulesets → trees/imodel-content-tree}/IModelContent.json +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../../../src/components/trees/models-tree/Utils.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAI/F,gBAAgB;AAChB,MAAM,OAAO,0BAA0B;IAErC,YAAoB,UAAsC;QAAtC,eAAU,GAAV,UAAU,CAA4B;QADlD,SAAI,GAAG,IAAI,KAAK,EAAc,CAAC;IAEvC,CAAC;IAEO,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAE9D,KAAK,CAAA,CAAE,aAAa;QACzB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE;YAC1B,MAAM,EAAE,CAAC;SACV;QAED,IAAI,MAAM,CAAC;QACX,OAAO,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACvB,MAAM,MAAM,CAAC;SACd;IACH,CAAC;CACF","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\nimport type { Id64String } from \"@itwin/core-bentley\";\n\n/** @internal */\nexport class CachingElementIdsContainer {\n private _ids = new Array<Id64String>();\n constructor(private _generator: AsyncGenerator<Id64String>) {\n }\n\n private async next() { return (await this._generator.next()).value; }\n\n public async* getElementIds() {\n for (const id of this._ids) {\n yield id;\n }\n\n let nextId;\n while (nextId = await this.next()) {\n this._ids.push(nextId);\n yield nextId;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../../../src/components/trees/models-tree/Utils.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAM/F,gBAAgB;AAChB,MAAM,OAAO,0BAA0B;IAErC,YAAoB,UAAsC;QAAtC,eAAU,GAAV,UAAU,CAA4B;QADlD,SAAI,GAAG,IAAI,KAAK,EAAc,CAAC;IAEvC,CAAC;IAEO,KAAK,CAAC,IAAI,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BAClB;wBACE,QAAQ,EAAE,cAAc;wBACxB,KAAK,EAAE;4BACL,OAAO,EAAE,MAAM;yBAChB;qBACF;iBACF;aACF;YACD;gBACE,QAAQ,EAAE,iBAAiB;gBAC3B,SAAS,EAAE,0CAA0C;gBACrD,iBAAiB,EAAE,mEAAmE;aACvF;YACD;gBACE,QAAQ,EAAE,iBAAiB;gBAC3B,SAAS,EAAE,wCAAwC;gBACnD,iBAAiB,EAAE,cAAc;aAClC;SACF;KACF,CAAC;AACJ,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\nimport type { Id64String } from \"@itwin/core-bentley\";\nimport type { Ruleset } from \"@itwin/presentation-common\";\nimport type { ModelsTreeHierarchyConfiguration } from \"./ModelsTree\";\n\n/** @internal */\nexport class CachingElementIdsContainer {\n private _ids = new Array<Id64String>();\n constructor(private _generator: AsyncGenerator<Id64String>) {\n }\n\n private async next() { return (await this._generator.next()).value; }\n\n public async* getElementIds() {\n for (const id of this._ids) {\n yield id;\n }\n\n let nextId;\n while (nextId = await this.next()) {\n this._ids.push(nextId);\n yield nextId;\n }\n }\n}\n\n/** @internal */\nexport type CreateRulesetProps = Omit<ModelsTreeHierarchyConfiguration, \"enableElementsClassGrouping\"> & {\n enableElementsClassGrouping?: boolean;\n};\n\n/** @internal */\nexport function createRuleset(props: CreateRulesetProps): Ruleset {\n const elementClassSpecification = props.elementClassSpecification ?? { schemaName: \"BisCore\", className: \"GeometricElement3d\" };\n return {\n id: \"tree-widget-react/ModelsTree\",\n requiredSchemas: [\n {\n name: \"BisCore\",\n },\n ],\n rules: [\n {\n ruleType: \"RootNodes\",\n autoExpand: true,\n specifications: [\n {\n specType: \"InstanceNodesOfSpecificClasses\",\n classes: [\n {\n schemaName: \"BisCore\",\n classNames: [\n \"Subject\",\n ],\n },\n ],\n instanceFilter: `this.Parent = NULL`,\n groupByClass: false,\n groupByLabel: false,\n },\n ],\n customizationRules: [\n {\n ruleType: \"ExtendedData\",\n items: {\n isSubject: \"true\",\n },\n },\n ],\n },\n {\n ruleType: \"ChildNodes\",\n condition: `ParentNode.IsOfClass(\"Subject\", \"BisCore\")`,\n specifications: [\n {\n specType: \"RelatedInstanceNodes\",\n relationshipPaths: [\n {\n relationship: {\n schemaName: \"BisCore\",\n className: \"SubjectOwnsSubjects\",\n },\n direction: \"Forward\",\n targetClass: {\n schemaName: \"BisCore\",\n className: \"Subject\",\n },\n },\n ],\n instanceFilter: `json_extract(this.JsonProperties, \"$.Subject.Job.Bridge\") <> NULL OR ifnull(json_extract(this.JsonProperties, \"$.Subject.Model.Type\"), \"\") = \"Hierarchy\"`,\n hideNodesInHierarchy: true,\n groupByClass: false,\n groupByLabel: false,\n },\n {\n specType: \"RelatedInstanceNodes\",\n relationshipPaths: [\n {\n relationship: {\n schemaName: \"BisCore\",\n className: \"SubjectOwnsSubjects\",\n },\n direction: \"Forward\",\n targetClass: {\n schemaName: \"BisCore\",\n className: \"Subject\",\n },\n },\n ],\n instanceFilter: `json_extract(this.JsonProperties, \"$.Subject.Job.Bridge\") = NULL AND ifnull(json_extract(this.JsonProperties, \"$.Subject.Model.Type\"), \"\") <> \"Hierarchy\"`,\n hideIfNoChildren: true,\n groupByClass: false,\n groupByLabel: false,\n },\n ],\n customizationRules: [\n {\n ruleType: \"ExtendedData\",\n items: {\n isSubject: \"true\",\n },\n },\n ],\n },\n {\n ruleType: \"ChildNodes\",\n condition: `ParentNode.IsOfClass(\"Subject\", \"BisCore\")`,\n specifications: [\n {\n specType: \"InstanceNodesOfSpecificClasses\",\n classes: {\n schemaName: \"BisCore\",\n classNames: [\n \"GeometricModel3d\",\n ],\n arePolymorphic: true,\n },\n relatedInstances: [\n {\n relationshipPath: {\n relationship: {\n schemaName: \"BisCore\",\n className: \"ModelModelsElement\",\n },\n direction: \"Forward\",\n targetClass: {\n schemaName: \"BisCore\",\n className: \"InformationPartitionElement\",\n },\n },\n alias: \"partition\",\n isRequired: true,\n },\n ],\n instanceFilter: `(parent.ECInstanceId = partition.Parent.Id OR json_extract(parent.JsonProperties, \"$.Subject.Model.TargetPartition\") = printf(\"0x%x\", partition.ECInstanceId)) AND NOT this.IsPrivate AND json_extract(partition.JsonProperties, \"$.PhysicalPartition.Model.Content\") = NULL AND json_extract(partition.JsonProperties, \"$.GraphicalPartition3d.Model.Content\") = NULL AND this.HasRelatedInstance(\"BisCore:ModelContainsElements\", \"Forward\", \"${elementClassSpecification.schemaName}:${elementClassSpecification.className}\")`,\n hasChildren: \"Always\",\n hideIfNoChildren: true,\n groupByClass: false,\n groupByLabel: false,\n },\n {\n specType: \"InstanceNodesOfSpecificClasses\",\n classes: {\n schemaName: \"BisCore\",\n classNames: [\n \"GeometricModel3d\",\n ],\n arePolymorphic: true,\n },\n relatedInstances: [\n {\n relationshipPath: {\n relationship: {\n schemaName: \"BisCore\",\n className: \"ModelModelsElement\",\n },\n direction: \"Forward\",\n targetClass: {\n schemaName: \"BisCore\",\n className: \"InformationPartitionElement\",\n },\n },\n alias: \"partition\",\n isRequired: true,\n },\n ],\n instanceFilter: `(parent.ECInstanceId = partition.Parent.Id OR json_extract(parent.JsonProperties, \"$.Subject.Model.TargetPartition\") = printf(\"0x%x\", partition.ECInstanceId)) AND NOT this.IsPrivate AND (json_extract(partition.JsonProperties, \"$.PhysicalPartition.Model.Content\") <> NULL OR json_extract(partition.JsonProperties, \"$.GraphicalPartition3d.Model.Content\") <> NULL) AND this.HasRelatedInstance(\"BisCore:ModelContainsElements\", \"Forward\", \"${elementClassSpecification.schemaName}:${elementClassSpecification.className}\")`,\n hasChildren: \"Always\",\n hideNodesInHierarchy: true,\n groupByClass: false,\n groupByLabel: false,\n },\n ],\n customizationRules: [\n {\n ruleType: \"ExtendedData\",\n items: {\n isModel: \"true\",\n },\n },\n ],\n },\n {\n ruleType: \"ChildNodes\",\n condition: `ParentNode.IsOfClass(\"ISubModeledElement\", \"BisCore\")`,\n specifications: [\n {\n specType: \"RelatedInstanceNodes\",\n relationshipPaths: [\n {\n relationship: {\n schemaName: \"BisCore\",\n className: \"ModelModelsElement\",\n },\n direction: \"Backward\",\n },\n ],\n instanceFilter: `NOT this.IsPrivate AND this.HasRelatedInstance(\"BisCore:ModelContainsElements\", \"Forward\", \"${elementClassSpecification.schemaName}:${elementClassSpecification.className}\")`,\n hideNodesInHierarchy: true,\n groupByClass: false,\n groupByLabel: false,\n },\n ],\n customizationRules: [\n {\n ruleType: \"ExtendedData\",\n items: {\n isModel: \"true\",\n },\n },\n ],\n },\n {\n ruleType: \"ChildNodes\",\n condition: `ParentNode.IsOfClass(\"GeometricModel3d\", \"BisCore\")`,\n specifications: [\n {\n specType: \"RelatedInstanceNodes\",\n relationshipPaths: [\n [\n {\n relationship: {\n schemaName: \"BisCore\",\n className: \"ModelContainsElements\",\n },\n direction: \"Forward\",\n targetClass: elementClassSpecification,\n },\n {\n relationship: {\n schemaName: \"BisCore\",\n className: \"GeometricElement3dIsInCategory\",\n },\n direction: \"Forward\",\n },\n ],\n ],\n instanceFilter: `NOT this.IsPrivate`,\n suppressSimilarAncestorsCheck: true,\n hideIfNoChildren: true,\n groupByClass: false,\n groupByLabel: false,\n },\n ],\n customizationRules: [\n {\n ruleType: \"ExtendedData\",\n items: {\n isCategory: \"true\",\n modelId: \"ParentNode.InstanceId\",\n },\n },\n ],\n },\n {\n ruleType: \"ChildNodes\",\n condition: `ParentNode.IsOfClass(\"SpatialCategory\", \"BisCore\")`,\n specifications: [\n {\n specType: \"RelatedInstanceNodes\",\n relationshipPaths: [\n {\n relationship: {\n schemaName: \"BisCore\",\n className: \"GeometricElement3dIsInCategory\",\n },\n direction: \"Backward\",\n targetClass: elementClassSpecification,\n },\n ],\n instanceFilter: `this.Model.Id = parent.parent.ECInstanceId ANDALSO this.Parent = NULL`,\n groupByClass: !!props.enableElementsClassGrouping,\n groupByLabel: false,\n },\n ],\n customizationRules: [\n {\n ruleType: \"ExtendedData\",\n items: {\n modelId: \"this.Model.Id\",\n categoryId: \"this.Category.Id\",\n },\n },\n ],\n },\n {\n ruleType: \"ChildNodes\",\n condition: `ParentNode.IsOfClass(\"GeometricElement3d\", \"BisCore\")`,\n specifications: [\n {\n specType: \"RelatedInstanceNodes\",\n relationshipPaths: [\n {\n relationship: {\n schemaName: \"BisCore\",\n className: \"ElementOwnsChildElements\",\n },\n direction: \"Forward\",\n targetClass: elementClassSpecification,\n },\n ],\n groupByClass: !!props.enableElementsClassGrouping,\n groupByLabel: false,\n },\n ],\n customizationRules: [\n {\n ruleType: \"ExtendedData\",\n items: {\n modelId: \"this.Model.Id\",\n categoryId: \"this.Category.Id\",\n },\n },\n ],\n },\n {\n ruleType: \"Grouping\",\n class: {\n schemaName: \"BisCore\",\n className: \"Subject\",\n },\n groups: [\n {\n specType: \"SameLabelInstance\",\n applicationStage: \"PostProcess\",\n },\n ],\n },\n {\n ruleType: \"Grouping\",\n class: {\n schemaName: \"BisCore\",\n className: \"SpatialCategory\",\n },\n groups: [\n {\n specType: \"SameLabelInstance\",\n applicationStage: \"PostProcess\",\n },\n ],\n },\n {\n ruleType: \"ImageIdOverride\",\n condition: `ThisNode.IsInstanceNode ANDALSO ThisNode.IsOfClass(\"Subject\", \"BisCore\")`,\n imageIdExpression: `IIF(this.Parent.Id = NULL, \"icon-imodel-hollow-2\", \"icon-folder\")`,\n },\n {\n ruleType: \"ImageIdOverride\",\n condition: `ThisNode.IsInstanceNode ANDALSO ThisNode.IsOfClass(\"Model\", \"BisCore\")`,\n imageIdExpression: `\"icon-model\"`,\n },\n {\n ruleType: \"ImageIdOverride\",\n condition: `ThisNode.IsInstanceNode ANDALSO ThisNode.IsOfClass(\"Category\", \"BisCore\")`,\n imageIdExpression: `\"icon-layers\"`,\n },\n {\n ruleType: \"ImageIdOverride\",\n condition: `ThisNode.IsInstanceNode ANDALSO ThisNode.IsOfClass(\"Element\", \"BisCore\")`,\n imageIdExpression: `\"icon-item\"`,\n },\n {\n ruleType: \"ImageIdOverride\",\n condition: `ThisNode.IsClassGroupingNode`,\n imageIdExpression: `\"icon-ec-class\"`,\n },\n {\n ruleType: \"Content\",\n condition: `ContentDisplayType = \"AssemblyElementsRequest\"`,\n specifications: [\n {\n specType: \"SelectedNodeInstances\",\n },\n {\n specType: \"ContentRelatedInstances\",\n relationshipPaths: [\n {\n relationship: {\n schemaName: \"BisCore\",\n className: \"ElementOwnsChildElements\",\n },\n direction: \"Forward\",\n count: \"*\",\n },\n ],\n },\n ],\n },\n ],\n };\n}\n\n/** @internal */\nexport type CreateSearchRulesetProps = Omit<ModelsTreeHierarchyConfiguration, \"enableElementsClassGrouping\">;\n\n/** @internal */\nexport function createSearchRuleset(props: CreateSearchRulesetProps): Ruleset {\n const elementClassSpecification = props.elementClassSpecification ?? { schemaName: \"BisCore\", className: \"GeometricElement3d\" };\n return {\n id: \"tree-widget-react/ModelsTreeSearch\",\n rules: [\n {\n ruleType: \"RootNodes\",\n specifications: [\n {\n specType: \"InstanceNodesOfSpecificClasses\",\n classes: [\n {\n schemaName: \"BisCore\",\n classNames: [\n \"Subject\",\n ],\n },\n ],\n instanceFilter: \"this.Parent = NULL\",\n arePolymorphic: false,\n groupByClass: false,\n groupByLabel: false,\n },\n ],\n customizationRules: [\n {\n ruleType: \"ExtendedData\",\n items: {\n isSubject: \"true\",\n },\n },\n ],\n },\n {\n ruleType: \"ChildNodes\",\n condition: `ParentNode.IsOfClass(\"Subject\", \"BisCore\")`,\n specifications: [\n {\n specType: \"RelatedInstanceNodes\",\n relationshipPaths: [\n {\n relationship: {\n schemaName: \"BisCore\",\n className: \"SubjectOwnsSubjects\",\n },\n direction: \"Forward\",\n targetClass: {\n schemaName: \"BisCore\",\n className: \"Subject\",\n },\n },\n ],\n instanceFilter: `json_extract(this.JsonProperties, \"$.Subject.Job.Bridge\") <> NULL OR ifnull(json_extract(this.JsonProperties, \"$.Subject.Model.Type\"), \"\") = \"Hierarchy\"`,\n hideNodesInHierarchy: true,\n groupByClass: false,\n groupByLabel: false,\n },\n {\n specType: \"RelatedInstanceNodes\",\n relationshipPaths: [\n {\n relationship: {\n schemaName: \"BisCore\",\n className: \"SubjectOwnsSubjects\",\n },\n direction: \"Forward\",\n targetClass: {\n schemaName: \"BisCore\",\n className: \"Subject\",\n },\n },\n ],\n instanceFilter: `json_extract(this.JsonProperties, \"$.Subject.Job.Bridge\") = NULL AND ifnull(json_extract(this.JsonProperties, \"$.Subject.Model.Type\"), \"\") <> \"Hierarchy\"`,\n hideExpression: `NOT ThisNode.HasChildren ANDALSO NOT ThisNode.ChildrenArtifacts.AnyMatches(x => x.isContentModel)`,\n groupByClass: false,\n groupByLabel: false,\n },\n ],\n customizationRules: [\n {\n ruleType: \"ExtendedData\",\n items: {\n isSubject: \"true\",\n },\n },\n {\n ruleType: \"Grouping\",\n class: {\n schemaName: \"BisCore\",\n className: \"Subject\",\n },\n groups: [\n {\n specType: \"SameLabelInstance\",\n applicationStage: \"PostProcess\",\n },\n ],\n },\n ],\n },\n {\n ruleType: \"ChildNodes\",\n condition: `ParentNode.IsOfClass(\"Subject\", \"BisCore\")`,\n specifications: [\n {\n specType: \"InstanceNodesOfSpecificClasses\",\n classes: {\n schemaName: \"BisCore\",\n classNames: [\n \"GeometricModel3d\",\n ],\n },\n arePolymorphic: true,\n relatedInstances: [\n {\n relationshipPath: {\n relationship: {\n schemaName: \"BisCore\",\n className: \"ModelModelsElement\",\n },\n direction: \"Forward\",\n targetClass: {\n schemaName: \"BisCore\",\n className: \"InformationPartitionElement\",\n },\n },\n alias: \"partition\",\n isRequired: true,\n },\n ],\n instanceFilter: `(parent.ECInstanceId = partition.Parent.Id OR json_extract(parent.JsonProperties, \"$.Subject.Model.TargetPartition\") = printf(\"0x%x\", partition.ECInstanceId)) AND NOT this.IsPrivate AND json_extract(partition.JsonProperties, \"$.PhysicalPartition.Model.Content\") = NULL AND json_extract(partition.JsonProperties, \"$.GraphicalPartition3d.Model.Content\") = NULL AND this.HasRelatedInstance(\"BisCore:ModelContainsElements\", \"Forward\", \"${elementClassSpecification.schemaName}:${elementClassSpecification.className}\")`,\n groupByClass: false,\n groupByLabel: false,\n },\n ],\n customizationRules: [\n {\n ruleType: \"ExtendedData\",\n items: {\n isModel: \"true\",\n },\n },\n ],\n },\n {\n ruleType: \"ChildNodes\",\n condition: `ParentNode.IsOfClass(\"Subject\", \"BisCore\")`,\n specifications: [\n {\n specType: \"InstanceNodesOfSpecificClasses\",\n classes: {\n schemaName: \"BisCore\",\n classNames: [\n \"GeometricModel3d\",\n ],\n },\n arePolymorphic: true,\n relatedInstances: [\n {\n relationshipPath: {\n relationship: {\n schemaName: \"BisCore\",\n className: \"ModelModelsElement\",\n },\n direction: \"Forward\",\n targetClass: {\n schemaName: \"BisCore\",\n className: \"InformationPartitionElement\",\n },\n },\n alias: \"partition\",\n isRequired: true,\n },\n ],\n instanceFilter: `(parent.ECInstanceId = partition.Parent.Id OR json_extract(parent.JsonProperties, \"$.Subject.Model.TargetPartition\") = printf(\"0x%x\", partition.ECInstanceId)) AND NOT this.IsPrivate AND (json_extract(partition.JsonProperties, \"$.PhysicalPartition.Model.Content\") <> NULL OR json_extract(partition.JsonProperties, \"$.GraphicalPartition3d.Model.Content\") <> NULL) AND this.HasRelatedInstance(\"BisCore:ModelContainsElements\", \"Forward\", \"${elementClassSpecification.schemaName}:${elementClassSpecification.className}\")`,\n hideNodesInHierarchy: true,\n groupByClass: false,\n groupByLabel: false,\n },\n ],\n customizationRules: [\n {\n ruleType: \"NodeArtifacts\",\n items: {\n isContentModel: \"true\",\n },\n },\n {\n ruleType: \"ExtendedData\",\n items: {\n isModel: \"true\",\n },\n },\n ],\n },\n {\n ruleType: \"ChildNodes\",\n condition: `ParentNode.IsOfClass(\"GeometricModel3d\", \"BisCore\")`,\n specifications: [\n {\n specType: \"RelatedInstanceNodes\",\n relationshipPaths: [\n {\n relationship: {\n schemaName: \"BisCore\",\n className: \"ModelOwnsSubModel\",\n },\n direction: \"Forward\",\n targetClass: {\n schemaName: \"BisCore\",\n className: \"GeometricModel3d\",\n },\n },\n ],\n instanceFilter: `NOT this.IsPrivate AND this.HasRelatedInstance(\"BisCore:ModelContainsElements\", \"Forward\", \"${elementClassSpecification.schemaName}:${elementClassSpecification.className}\")`,\n groupByClass: false,\n groupByLabel: false,\n },\n ],\n customizationRules: [\n {\n ruleType: \"ExtendedData\",\n items: {\n isModel: \"true\",\n },\n },\n ],\n },\n {\n ruleType: \"ImageIdOverride\",\n condition: `ThisNode.IsOfClass(\"Subject\", \"BisCore\")`,\n imageIdExpression: `IIF(this.Parent.Id = NULL, \"icon-imodel-hollow-2\", \"icon-folder\")`,\n },\n {\n ruleType: \"ImageIdOverride\",\n condition: `ThisNode.IsOfClass(\"Model\", \"BisCore\")`,\n imageIdExpression: `\"icon-model\"`,\n },\n ],\n };\n}\n"]}
@@ -1,10 +1,13 @@
1
- import React from "react";
1
+ /// <reference types="react" />
2
+ /** @internal */
2
3
  export interface Size {
3
4
  width: number;
4
5
  height: number;
5
6
  }
7
+ /** @internal */
6
8
  export interface AutoSizerProps {
7
- children: (size: Size) => React.ReactElement | null;
9
+ children: (size: Size) => React.ReactNode;
8
10
  }
9
- export declare const AutoSizer: (props: AutoSizerProps) => JSX.Element;
11
+ /** @internal */
12
+ export declare function AutoSizer(props: AutoSizerProps): JSX.Element;
10
13
  //# sourceMappingURL=AutoSizer.d.ts.map
@@ -1,16 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  /*---------------------------------------------------------------------------------------------
2
3
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
4
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
5
  *--------------------------------------------------------------------------------------------*/
5
- import React, { useCallback, useState } from "react";
6
+ import { useCallback, useState } from "react";
6
7
  import { ResizableContainerObserver } from "@itwin/core-react";
7
- export const AutoSizer = (props) => {
8
- const [height, setHeight] = useState(0);
9
- const [width, setWidth] = useState(0);
10
- const handleResize = useCallback((w, h) => {
11
- setHeight(h);
12
- setWidth(w);
13
- }, []);
14
- return (React.createElement(ResizableContainerObserver, { onResize: handleResize }, props.children({ height, width })));
15
- };
8
+ // istanbul ignore next
9
+ /** @internal */
10
+ export function AutoSizer(props) {
11
+ const [{ height, width }, setSize] = useState({ height: 0, width: 0 });
12
+ const handleResize = useCallback((w, h) => { setSize({ height: h, width: w }); }, []);
13
+ return (_jsx(ResizableContainerObserver, { onResize: handleResize, children: props.children({ height, width }) }));
14
+ }
16
15
  //# sourceMappingURL=AutoSizer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AutoSizer.js","sourceRoot":"","sources":["../../../../src/components/utils/AutoSizer.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAW/D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IACjD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACxC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE;QACxD,SAAS,CAAC,CAAC,CAAC,CAAC;QACb,QAAQ,CAAC,CAAC,CAAC,CAAC;IACd,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,0BAA0B,IAAC,QAAQ,EAAE,YAAY,IAC/C,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CACP,CAC9B,CAAC;AACJ,CAAC,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 React, { useCallback, useState } from \"react\";\nimport { ResizableContainerObserver } from \"@itwin/core-react\";\n\nexport interface Size {\n width: number;\n height: number;\n}\n\nexport interface AutoSizerProps {\n children: (size: Size) => React.ReactElement | null;\n}\n\nexport const AutoSizer = (props: AutoSizerProps) => {\n const [height, setHeight] = useState(0);\n const [width, setWidth] = useState(0);\n const handleResize = useCallback((w: number, h: number) => {\n setHeight(h);\n setWidth(w);\n }, []);\n\n return (\n <ResizableContainerObserver onResize={handleResize}>\n {props.children({ height, width })}\n </ResizableContainerObserver>\n );\n};\n"]}
1
+ {"version":3,"file":"AutoSizer.js","sourceRoot":"","sources":["../../../../src/components/utils/AutoSizer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAa/D,uBAAuB;AACvB,gBAAgB;AAChB,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAO,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAC7E,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEtG,OAAO,CACL,KAAC,0BAA0B,IAAC,QAAQ,EAAE,YAAY,YAC/C,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GACP,CAC9B,CAAC;AACJ,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\nimport { useCallback, useState } from \"react\";\nimport { ResizableContainerObserver } from \"@itwin/core-react\";\n\n/** @internal */\nexport interface Size {\n width: number;\n height: number;\n}\n\n/** @internal */\nexport interface AutoSizerProps {\n children: (size: Size) => React.ReactNode;\n}\n\n// istanbul ignore next\n/** @internal */\nexport function AutoSizer(props: AutoSizerProps) {\n const [{ height, width }, setSize] = useState<Size>({ height: 0, width: 0 });\n const handleResize = useCallback((w: number, h: number) => { setSize({ height: h, width: w }); }, []);\n\n return (\n <ResizableContainerObserver onResize={handleResize}>\n {props.children({ height, width })}\n </ResizableContainerObserver>\n );\n}\n"]}
@@ -1,3 +1,6 @@
1
- /** Checks if the specified argument is a promise */
1
+ /**
2
+ * Checks if the specified argument is a promise
3
+ * @internal
4
+ */
2
5
  export declare function isPromiseLike(obj: unknown): obj is PromiseLike<unknown>;
3
6
  //# sourceMappingURL=IsPromiseLike.d.ts.map
@@ -2,7 +2,10 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
- /** Checks if the specified argument is a promise */
5
+ /**
6
+ * Checks if the specified argument is a promise
7
+ * @internal
8
+ */
6
9
  export function isPromiseLike(obj) {
7
10
  return !!(obj && (typeof obj === "object") && (typeof obj.then === "function"));
8
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IsPromiseLike.js","sourceRoot":"","sources":["../../../../src/components/utils/IsPromiseLike.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,oDAAoD;AACpD,MAAM,UAAU,aAAa,CAAC,GAAY;IACxC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,IAAI,CAAC,OAAQ,GAAW,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC;AAC3F,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/** Checks if the specified argument is a promise */\nexport function isPromiseLike(obj: unknown): obj is PromiseLike<unknown> {\n return !!(obj && (typeof obj === \"object\") && (typeof (obj as any).then === \"function\"));\n}\n"]}
1
+ {"version":3,"file":"IsPromiseLike.js","sourceRoot":"","sources":["../../../../src/components/utils/IsPromiseLike.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,GAAY;IACxC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,IAAI,CAAC,OAAQ,GAAW,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC;AAC3F,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\n/**\n * Checks if the specified argument is a promise\n * @internal\n */\nexport function isPromiseLike(obj: unknown): obj is PromiseLike<unknown> {\n return !!(obj && (typeof obj === \"object\") && (typeof (obj as any).then === \"function\"));\n}\n"]}
@@ -1,4 +1,3 @@
1
- export * from "./types";
2
1
  export * from "./TreeWidget";
3
2
  export * from "./components/TreeWidgetComponent";
4
3
  export * from "./components/trees";
@@ -2,7 +2,6 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
- export * from "./types";
6
5
  export * from "./TreeWidget";
7
6
  export * from "./components/TreeWidgetComponent";
8
7
  export * from "./components/trees";
@@ -1 +1 @@
1
- {"version":3,"file":"tree-widget-react.js","sourceRoot":"","sources":["../../src/tree-widget-react.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,kCAAkC,CAAC;AACjD,cAAc,oBAAoB,CAAC;AACnC,cAAc,wCAAwC,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\nexport * from \"./types\";\nexport * from \"./TreeWidget\";\nexport * from \"./components/TreeWidgetComponent\";\nexport * from \"./components/trees\";\nexport * from \"./components/TreeWidgetUiItemsProvider\";\n"]}
1
+ {"version":3,"file":"tree-widget-react.js","sourceRoot":"","sources":["../../src/tree-widget-react.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,cAAc,cAAc,CAAC;AAC7B,cAAc,kCAAkC,CAAC;AACjD,cAAc,oBAAoB,CAAC;AACnC,cAAc,wCAAwC,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\nexport * from \"./TreeWidget\";\nexport * from \"./components/TreeWidgetComponent\";\nexport * from \"./components/trees\";\nexport * from \"./components/TreeWidgetUiItemsProvider\";\n"]}
@@ -1,6 +1,4 @@
1
1
  {
2
- "searchForSomething": "Search for something",
3
- "search": "Search...",
4
2
  "showAll": "Show All",
5
3
  "hideAll": "Hide All",
6
4
  "invert": "Invert",
@@ -11,8 +9,10 @@
11
9
  "learnMore": "Learn more",
12
10
  "models": "Models",
13
11
  "categories": "Categories",
14
- "containment": "Spatial Containment",
12
+ "imodelContent": "iModel Content",
13
+ "externalSources": "External Sources",
15
14
  "treeview": "Tree View",
15
+ "noTrees": "There are no trees available for this iModel.",
16
16
  "categoriesTree": {
17
17
  "noCategoryFound": "No category found.",
18
18
  "noMatchingCategoryNames": "There are no category names matching your search."
@@ -49,5 +49,14 @@
49
49
  },
50
50
  "noModelFound": "No model found.",
51
51
  "noMatchingModelNames": "There are no model names matching your search."
52
+ },
53
+ "searchBox": {
54
+ "searchForSomething": "Search for something",
55
+ "search": "Search...",
56
+ "tree": "Tree search",
57
+ "open": "Open",
58
+ "close": "Close",
59
+ "next": "Next",
60
+ "previous": "Previous"
52
61
  }
53
- }
62
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/tree-widget-react",
3
- "version": "0.10.0",
3
+ "version": "1.0.0-dev.0",
4
4
  "description": "Tree Widget React",
5
5
  "keywords": [
6
6
  "Bentley",
@@ -20,21 +20,20 @@
20
20
  "module": "lib/esm/tree-widget-react.js",
21
21
  "typings": "lib/cjs/tree-widget-react",
22
22
  "dependencies": {
23
+ "@bentley/icons-generic": "^1.0.34",
23
24
  "@itwin/itwinui-icons-react": "^2.1.0",
24
- "@itwin/itwinui-react": "^2.7.0",
25
+ "@itwin/itwinui-react": "^2.11.0",
25
26
  "@itwin/itwinui-variables": "^2.0.0",
26
27
  "classnames": "^2.3.1",
27
28
  "i18next": "^10.2.2",
28
- "react-redux": "^7.2.0",
29
- "redux": "^4.0.3",
30
29
  "rxjs": "^6.6.2"
31
30
  },
32
31
  "devDependencies": {
33
32
  "@itwin/appui-abstract": "^4.0.0",
34
- "@itwin/appui-layout-react": "^4.0.0",
35
- "@itwin/appui-react": "^4.0.0",
33
+ "@itwin/appui-layout-react": "^4.1.0",
34
+ "@itwin/appui-react": "^4.1.0",
36
35
  "@itwin/build-tools": "^4.0.0",
37
- "@itwin/components-react": "^4.0.0",
36
+ "@itwin/components-react": "^4.1.0",
38
37
  "@itwin/core-backend": "^4.0.0",
39
38
  "@itwin/core-bentley": "^4.0.0",
40
39
  "@itwin/core-common": "^4.0.0",
@@ -44,47 +43,56 @@
44
43
  "@itwin/core-markup": "^4.0.0",
45
44
  "@itwin/core-orbitgt": "^4.0.0",
46
45
  "@itwin/core-quantity": "^4.0.0",
47
- "@itwin/core-react": "^4.0.0",
46
+ "@itwin/core-react": "^4.1.0",
48
47
  "@itwin/core-telemetry": "^4.0.0",
49
48
  "@itwin/ecschema-metadata": "^4.0.0",
50
- "@itwin/eslint-plugin": "^3.7.0",
51
- "@itwin/imodel-components-react": "^4.0.0",
49
+ "@itwin/eslint-plugin": "^4.0.0-dev.38",
50
+ "@itwin/imodel-components-react": "^4.1.0",
52
51
  "@itwin/presentation-backend": "^4.0.0",
53
52
  "@itwin/presentation-common": "^4.0.0",
54
53
  "@itwin/presentation-components": "^4.0.0",
55
54
  "@itwin/presentation-frontend": "^4.0.0",
56
55
  "@itwin/presentation-testing": "^4.0.0",
57
56
  "@itwin/webgl-compatibility": "^4.0.0",
57
+ "@rushstack/eslint-patch": "1.2.0",
58
+ "@testing-library/dom": "^8.12.0",
58
59
  "@testing-library/react": "^12.0.0",
59
60
  "@testing-library/react-hooks": "^7.0.2",
60
- "@types/chai": "4.3.1",
61
+ "@testing-library/user-event": "14.4.3",
62
+ "@types/chai": "4.3.5",
61
63
  "@types/chai-jest-snapshot": "^1.3.4",
64
+ "@types/chai-subset": "1.3.3",
62
65
  "@types/deep-equal": "^1.0.1",
63
66
  "@types/i18next": "^8.4.2",
64
- "@types/jsdom-global": "3.0.2",
65
- "@types/mocha": "^8.2.2",
67
+ "@types/jsdom-global": "^3.0.4",
68
+ "@types/mocha": "^10.0.1",
66
69
  "@types/react": "^17.0.19",
67
70
  "@types/react-dom": "^17.0.9",
68
- "@types/react-redux": "^7.0.1",
69
- "@types/sinon": "^9.0.0",
70
- "@types/sinon-chai": "^3.2.0",
71
- "@typescript-eslint/eslint-plugin": "^5.3.1",
72
- "@typescript-eslint/parser": "^5.0.0",
73
- "chai": "^4.2.0",
71
+ "@types/sinon": "^10.0.15",
72
+ "@types/sinon-chai": "^3.2.9",
73
+ "@typescript-eslint/eslint-plugin": "^5.59.8",
74
+ "@typescript-eslint/parser": "^5.59.8",
75
+ "chai": "^4.3.7",
74
76
  "chai-jest-snapshot": "^2.0.0",
77
+ "chai-subset": "1.6.0",
75
78
  "cpx2": "^3.0.0",
76
79
  "deep-equal": "^1.0.0",
77
- "eslint": "^7.11.0",
78
- "jsdom": "^19.0.0",
80
+ "eslint": "^8.41.0",
81
+ "eslint-plugin-unused-imports": "^2.0.0",
82
+ "eslint-plugin-react": "^7.32.2",
83
+ "jsdom": "^22.1.0",
79
84
  "jsdom-global": "3.0.2",
80
- "mocha": "^10.0.0",
81
- "react": "^17.0.2",
82
- "react-dom": "^17.0.2",
85
+ "mocha": "^10.2.0",
86
+ "nyc": "15.1.0",
87
+ "react": "^17.0.0",
88
+ "react-dom": "^17.0.0",
89
+ "react-redux": "^7.2.2",
90
+ "redux": "^4.1.0",
83
91
  "rimraf": "^3.0.2",
84
- "sinon": "^9.0.2",
85
- "sinon-chai": "^3.2.0",
92
+ "sinon": "^15.1.0",
93
+ "sinon-chai": "^3.7.0",
86
94
  "typemoq": "^2.1.0",
87
- "typescript": "~4.4.0",
95
+ "typescript": "~5.0.0",
88
96
  "xmlhttprequest": "^1.8.0"
89
97
  },
90
98
  "peerDependencies": {
@@ -94,27 +102,13 @@
94
102
  "@itwin/core-frontend": "^4.0.0",
95
103
  "@itwin/core-react": "^4.0.0",
96
104
  "@itwin/presentation-components": "^4.0.0",
97
- "react": "^17.0.2",
98
- "react-dom": "^17.0.2"
105
+ "react": "^17.0.0",
106
+ "react-dom": "^17.0.0"
99
107
  },
100
108
  "eslintConfig": {
101
- "plugins": [
102
- "@itwin"
103
- ],
104
109
  "extends": [
105
- "plugin:@itwin/ui"
106
- ],
107
- "rules": {
108
- "@itwin/no-internal": [
109
- "error"
110
- ],
111
- "@typescript-eslint/no-floating-promises": [
112
- "error",
113
- {
114
- "ignoreIIFE": true
115
- }
116
- ]
117
- }
110
+ ".eslintrc.js"
111
+ ]
118
112
  },
119
113
  "scripts": {
120
114
  "build": "npm run -s dual-build && npm run -s copy:assets",
@@ -125,7 +119,8 @@
125
119
  "copy:public": "cpx \"./public/**/*\" ./lib/public",
126
120
  "copy:cjs": "cpx \"./src/**/*.{scss,json}\" ./lib/cjs",
127
121
  "copy:esm": "cpx \"./src/**/*.{scss,json}\" ./lib/esm",
128
- "cover": "npm run test",
122
+ "cover": "nyc npm run test",
123
+ "extract-api": "betools extract-api --entry=tree-widget-react",
129
124
  "lint": "eslint -f visualstudio \"./src/**/*.{ts,tsx}\" 1>&2",
130
125
  "lint:fix": "npm run lint -- --fix",
131
126
  "pseudolocalize": "betools pseudolocalize --englishDir ./public/locales/en --out ./lib/public/locales/en-PSEUDO",
@@ -133,5 +128,5 @@
133
128
  "clean": "rimraf lib .rush/temp/package-deps*.json",
134
129
  "rebuild": "npm run clean && npm run build"
135
130
  },
136
- "readme": "# @itwin/tree-widget-react\n\nCopyright © Bentley Systems, Incorporated. All rights reserved.\n\nThe tree-widget-react package provides React components to access Models and Categories within an iModel via a UiProvider, `TreeWidgetUiItemsProvider`.\n\nThe package also provides the underlying component, `TreeWidgetComponent`, which you can wrap within your own custom UiProvider and pass in your own custom trees to display.\n\n## Usage\n\n### What to add in your iTwin AppUI based application\n\nWith a few short lines, you can add the tree widget to your app.\n\n#### Call TreeWidget.initialize() **_before_** making use of the provided Tree Widget Provider\n\n```ts\nimport { TreeWidget } from \"@itwin/tree-widget-react\";\n...\nawait TreeWidget.initialize(IModelApp.localization);\n```\n\n#### Register Tree Widget Provider\n\n```ts\nimport { UiItemsManager } from \"@itwin/appui-abstract\";\nimport { TreeWidgetUiItemsProvider } from \"@itwin/tree-widget-react\";\n...\nUiItemsManager.register(\n new TreeWidgetUiItemsProvider({ ...TreeWidgetOptions })\n);\n```\n\n### Additional trees avaialable\n\n#### IModelContentTree\n\nComponent that displays a hierarchy with content of a given `IModelConnection`.\n\n##### Resulting hierarchy\n\n- Root Subject\n - Child Subjects\n - Target Model\n - Spatial Categories of top-assemblies in the Model (if model is a GeometricModel3d)\n - Top-assemblies in the model and category\n - Child elements of the assembly\n - Drawing Categories of top-assemblies in the Model (if model is a GeometricModel2d)\n - Top-assemblies in the model and category\n - Child elements of the assembly\n - Top-assemblies in the Model (if model is neither GeometricModel3d nor GeometricModel2d)\n - Child elements of the assembly\n\nIn addition, for every modeled element we show content of the model as children for the element's node.\n\nMore details about Subjects and Models can be found here:\n\n- <https://www.imodeljs.org/bis/intro/information-hierarchy/>\n- <https://www.imodeljs.org/bis/intro/organizing-models-and-elements/>\n\nMore details about the hierarchy can be found in the [presentation ruleset JSON file](./src/components/rulesets/IModelContent.json).\n"
131
+ "readme": "# @itwin/tree-widget-react\n\nCopyright © Bentley Systems, Incorporated. All rights reserved.\n\nThe `@itwin/tree-widget-react` package provides React components to build a widget with tree components' selector, along with all the building blocks that can be used individually.\n\n![Widget example](./media/widget.png)\n\n## Usage\n\nTypically, the package is used with an [AppUI](https://github.com/iTwin/appui/tree/master/ui/appui-react) based application, but the building blocks may as well be used with any other iTwin.js React app.\n\nIn any case, **before** using any APIs or components delivered with the package, it needs to be initialized:\n\n```ts\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { TreeWidget } from \"@itwin/tree-widget-react\";\n...\nawait TreeWidget.initialize(IModelApp.localization);\n```\n\nIn [AppUI](https://github.com/iTwin/appui/tree/master/ui/appui-react) based applications widgets are typically provided using `UiItemsProvider` implementations. The `@itwin/tree-widget-react` package delivers `TreeWidgetUiItemsProvider` that can be used to add the tree widget to UI:\n\n```ts\nimport { UiItemsManager } from \"@itwin/appui-react\";\nimport { TreeWidgetUiItemsProvider } from \"@itwin/tree-widget-react\";\n...\nUiItemsManager.register(\n new TreeWidgetUiItemsProvider()\n);\n```\n\nThe above example uses default widget parameters and results in a component similar to the one visible at the top of this README. Customization is also possible:\n\n```ts\nimport { UiItemsManager } from \"@itwin/appui-react\";\nimport { TreeWidgetUiItemsProvider, ModelsTreeComponent } from \"@itwin/tree-widget-react\";\n...\nUiItemsManager.register(\n new TreeWidgetUiItemsProvider({\n // defaults to `StagePanelLocation.Right`\n defaultPanelLocation: StagePanelLocation.Left,\n // defaults to `StagePanelSection.Start`\n defaultPanelSection: StagePanelSection.End,\n // defaults to whatever the default `Widget.priority` in AppUI is\n defaultTreeWidgetPriority: 1000,\n // defaults to `ModelsTreeComponent` and `CategoriesTreeComponent`\n trees: [{\n id: ModelsTreeComponent.id,\n getLabel: ModelsTreeComponent.getLabel,\n render: () => <ModelsTreeComponent />,\n }, {\n id: \"my-tree-id\",\n getLabel: \"My Custom Tree\",\n render: () => <>This is my custom tree.</>,\n }];\n })\n);\n```\n\nAs seen in the above code snippet, `TreeWidgetUiItemsProvider` takes a list of trees that are displayed in the widget. This package delivers a number of tree components for everyone's use (see below), but providing custom trees is also an option.\n\n## Components\n\nWhile we expect this package to be mostly used with [AppUI](https://github.com/iTwin/appui/tree/master/ui/appui-react) and widget created through `TreeWidgetUiItemsProvider`, the package delivers components used within the widget to meet other use cases:\n\n- `TreeWidgetComponent` renders a tree selector and selected tree (based on the `trees` prop).\n\n- Visibility tree components help you build trees that look and feel like [Models](#models-tree) and [Categories](#categories-tree) trees, letting you control display of elements in the hierarchy.\n\n - `createVisibilityTreeRenderer` returns a tree renderer that renders nodes with \"eye\" checkboxes. Its building blocks:\n - `createVisibilityTreeNodeRenderer`\n - `VisibilityTreeNodeCheckbox`\n - `useVisibilityTreeFiltering` is used to filter the hierarchy.\n - `VisibilityTreeNoFilteredData` is used to render a \"no results\" when filtering.\n - `VisibilityTreeEventHandler` is an extension of [UnifiedSelectionTreeEventHandler](https://www.itwinjs.org/reference/presentation-components/tree/unifiedselectiontreeeventhandler/), that additionally handles checkbox events and calls provided `IVisibilityHandler` to get/set display of the elements in the hierarchy.\n\n### Models tree\n\nThe component renders a tree that tries to replicate how a typical \"Models\" tree of the iModel would look like in the source application. There's also a header that renders models search box and various visibility control buttons.\n\n![Models tree example](./media/models-tree.png)\n\nTypical usage:\n\n```tsx\nimport { ModelsTreeComponent, ClassGroupingOption } from \"@itwin/tree-widget-react\";\nimport { SelectionMode } from \"@itwin/components-react\";\n...\nfunction MyWidget() {\n return (\n <ModelsTreeComponent\n headerButtons={[\n (props) => <ModelsTreeComponent.ShowAllButton {...props} />,\n (props) => <ModelsTreeComponent.HideAllButton {...props} />,\n (props) => <MyCustomButton />,\n ]}\n selectionMode={SelectionMode.Extended}\n hierarchyConfig={{\n enableElementsClassGrouping: ClassGroupingOption.Yes,\n }}\n />\n );\n}\n```\n\nAvailable header buttons:\n\n- `ModelsTreeComponent.ShowAllButton` makes everything in the iModel displayed.\n- `ModelsTreeComponent.HideAllButton` makes everything in the iModel hidden by turning off all models.\n- `ModelsTreeComponent.InvertButton` inverts display of all models.\n- `ModelsTreeComponent.View2DButton` toggles plan projection models' display.\n- `ModelsTreeComponent.View3DButton` toggles non-plan projection models' display.\n\n`ModelsTreeComponent` building blocks:\n\n- `ModelsTree` renders the tree without the header.\n- `ModelsVisibilityHandler` knows how to get and control display of various concepts displayed in the Models tree: Subjects, Models, Categories, Elements.\n\n### Categories tree\n\nThe component, based on the active view, renders a hierarchy of either spatial (3d) or drawing (2d) categories. The hierarchy consists of two levels - the category (spatial or drawing) and its sub-categories. There's also a header that renders categories search box and various visibility control buttons.\n\n![Categories tree example](./media/categories-tree.png)\n\nTypical usage:\n\n```tsx\nimport { CategoriesTreeComponent } from \"@itwin/tree-widget-react\";\n...\nfunction MyWidget() {\n return (\n <CategoriesTreeComponent\n headerButtons={[\n (props) => <CategoriesTreeComponent.ShowAllButton {...props} />,\n (props) => <CategoriesTreeComponent.HideAllButton {...props} />,\n (props) => <MyCustomButton />,\n ]}\n />\n );\n}\n```\n\nAvailable header buttons:\n\n- `ModelsTreeComponent.ShowAllButton` makes all categories and their subcategories displayed.\n- `ModelsTreeComponent.HideAllButton` makes all categories hidden.\n- `ModelsTreeComponent.InvertButton` inverts display of all categories.\n\n`CategoriesTreeComponent` building blocks:\n\n- `CategoryTree` renders the tree without the header.\n- `CategoryVisibilityHandler` knows how to get and control display of Categories and SubCategories.\n\n### IModel content tree\n\nThe component renders a similar hierarchy to [Models tree](#models-tree), but with the following changes:\n\n- Only the hierarchy, without a header is rendered.\n- Visibility control is not allowed.\n- There's less hiding of `Subject` and `Model` nodes.\n- Show not only geometric, but all Models.\n\nIn general, the component is expected to be used by advanced users to inspect contents of the iModel.\n\n![IModel content tree example](./media/imodel-content-tree.png)\n\nTypical usage:\n\n```tsx\nimport { IModelContentTreeComponent } from \"@itwin/tree-widget-react\";\n...\nfunction MyWidget() {\n return (\n <IModelContentTreeComponent />\n );\n}\n```\n"
137
132
  }
@@ -1,122 +0,0 @@
1
- {
2
- "id": "tree-widget-react/ClassificationSystems",
3
- "rules": [
4
- {
5
- "ruleType": "RootNodes",
6
- "specifications": [
7
- {
8
- "specType": "InstanceNodesOfSpecificClasses",
9
- "classes": [
10
- {
11
- "schemaName": "ClassificationSystems",
12
- "classNames": [
13
- "ClassificationSystem"
14
- ]
15
- }
16
- ],
17
- "arePolymorphic": false,
18
- "groupByClass": false,
19
- "groupByLabel": false
20
- }
21
- ]
22
- },
23
- {
24
- "ruleType": "ChildNodes",
25
- "condition": "ParentNode.IsOfClass(\"ClassificationSystem\", \"ClassificationSystems\")",
26
- "specifications": [
27
- {
28
- "specType": "RelatedInstanceNodes",
29
- "relationships": {
30
- "schemaName": "ClassificationSystems",
31
- "classNames": [
32
- "ClassificationSystemOwnsClassificationTable"
33
- ]
34
- },
35
- "relatedClasses": {
36
- "schemaName": "ClassificationSystems",
37
- "classNames": [
38
- "ClassificationTable"
39
- ]
40
- },
41
- "requiredDirection": "Forward",
42
- "groupByClass": false,
43
- "groupByLabel": false,
44
- "doNotSort": true
45
- }
46
- ]
47
- },
48
- {
49
- "ruleType": "ChildNodes",
50
- "condition": "ParentNode.IsOfClass(\"ClassificationTable\", \"ClassificationSystems\")",
51
- "specifications": [
52
- {
53
- "specType": "RelatedInstanceNodes",
54
- "relationships": {
55
- "schemaName": "BisCore",
56
- "classNames": [
57
- "ModelModelsElement"
58
- ]
59
- },
60
- "relatedClasses": {
61
- "schemaName": "BisCore",
62
- "classNames": [
63
- "Model"
64
- ]
65
- },
66
- "requiredDirection": "Backward",
67
- "groupByClass": false,
68
- "groupByLabel": false,
69
- "hideNodesInHierarchy": true
70
- }
71
- ]
72
- },
73
- {
74
- "ruleType": "ChildNodes",
75
- "condition": "ParentNode.IsOfClass(\"Model\", \"BisCore\")",
76
- "specifications": [
77
- {
78
- "specType": "RelatedInstanceNodes",
79
- "relationships": {
80
- "schemaName": "BisCore",
81
- "classNames": [
82
- "ModelContainsElements"
83
- ]
84
- },
85
- "relatedClasses": {
86
- "schemaName": "ClassificationSystems",
87
- "classNames": [
88
- "Classification"
89
- ]
90
- },
91
- "requiredDirection": "Forward",
92
- "groupByClass": false,
93
- "groupByLabel": false
94
- }
95
- ]
96
- },
97
- {
98
- "ruleType": "ChildNodes",
99
- "condition": "ParentNode.IsOfClass(\"Classification\", \"ClassificationSystems\")",
100
- "specifications": [
101
- {
102
- "specType": "RelatedInstanceNodes",
103
- "relationships": {
104
- "schemaName": "ClassificationSystems",
105
- "classNames": [
106
- "ElementHasClassifications"
107
- ]
108
- },
109
- "relatedClasses": {
110
- "schemaName": "BisCore",
111
- "classNames": [
112
- "Element"
113
- ]
114
- },
115
- "requiredDirection": "Backward",
116
- "groupByClass": false,
117
- "groupByLabel": false
118
- }
119
- ]
120
- }
121
- ]
122
- }
@@ -1,48 +0,0 @@
1
- import * as React from "react";
2
- import type { CommonProps } from "@itwin/core-react";
3
- import "./SearchBar.scss";
4
- export declare enum Alignment {
5
- Left = 0,
6
- Right = 1
7
- }
8
- export interface SearchBarProps extends CommonProps {
9
- /** value to set SearchBox */
10
- value?: string;
11
- /** Enable or disable dropdown functionality. If disabled, searchbox simply expands without displaying the group button */
12
- enableGrouping: boolean;
13
- /** show the search box in the open (expanded) state */
14
- showSearch?: boolean;
15
- /** alignment content to the left or right of the search bar */
16
- alignment?: Alignment;
17
- /** searchbox frequency to poll for changes in value (milliseconds) */
18
- valueChangedDelay?: number;
19
- /** searchbox placeholder value to show in gray before anything is entered in */
20
- placeholder?: string;
21
- /** title (tooltip) */
22
- title?: string;
23
- /** Tells the component if parent component is still handling the filtering */
24
- filteringInProgress?: boolean;
25
- /** Filtering is cleared after everything's loaded */
26
- onFilterStart: (newFilter: string) => void;
27
- /** Filtering is cleared after everything's loaded */
28
- onFilterClear?: () => void;
29
- /** Total number of results/entries */
30
- resultCount: number;
31
- /** Callback to currently selected result/entry change */
32
- onSelectedChanged: (index: number) => void;
33
- }
34
- interface SearchBarState {
35
- showSearch: boolean;
36
- showDropdown: boolean;
37
- }
38
- /** SearchBox with expanding search box capability */
39
- export declare class SearchBar extends React.PureComponent<SearchBarProps, SearchBarState> {
40
- private _searchBox;
41
- static defaultProps: Partial<SearchBarProps>;
42
- constructor(props: any);
43
- componentDidUpdate(prevProps: SearchBarProps): Promise<void>;
44
- private _onToggleSearch;
45
- render(): JSX.Element;
46
- }
47
- export {};
48
- //# sourceMappingURL=SearchBar.d.ts.map