@itwin/grouping-mapping-widget 0.19.2 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (996) hide show
  1. package/README.md +1 -1
  2. package/lib/cjs/WidgetShell/GroupingMapping.d.ts +34 -0
  3. package/lib/cjs/WidgetShell/GroupingMapping.js +79 -0
  4. package/lib/cjs/WidgetShell/GroupingMapping.js.map +1 -0
  5. package/lib/cjs/WidgetShell/GroupingMappingContent.js +51 -0
  6. package/lib/cjs/WidgetShell/GroupingMappingContent.js.map +1 -0
  7. package/lib/cjs/WidgetShell/GroupingMappingHeader.js +24 -0
  8. package/lib/cjs/WidgetShell/GroupingMappingHeader.js.map +1 -0
  9. package/lib/cjs/WidgetShell/GroupingMappingWidget.d.ts +10 -0
  10. package/lib/cjs/WidgetShell/GroupingMappingWidget.js +31 -0
  11. package/lib/cjs/WidgetShell/GroupingMappingWidget.js.map +1 -0
  12. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.d.ts +8 -0
  13. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js +107 -0
  14. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js.map +1 -0
  15. package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -0
  16. package/lib/cjs/common/utils.d.ts +11 -0
  17. package/lib/cjs/common/utils.js +89 -0
  18. package/lib/cjs/common/utils.js.map +1 -0
  19. package/lib/cjs/common/viewerUtils.d.ts +30 -0
  20. package/lib/cjs/common/viewerUtils.js +293 -0
  21. package/lib/cjs/common/viewerUtils.js.map +1 -0
  22. package/lib/cjs/components/GroupingMappingContext.d.ts +39 -0
  23. package/lib/cjs/components/GroupingMappingContext.js +133 -0
  24. package/lib/cjs/components/GroupingMappingContext.js.map +1 -0
  25. package/lib/cjs/components/Groups/Editing/GroupAction.js +156 -0
  26. package/lib/cjs/components/Groups/Editing/GroupAction.js.map +1 -0
  27. package/lib/cjs/components/Groups/Editing/GroupDetails.js +34 -0
  28. package/lib/cjs/components/Groups/Editing/GroupDetails.js.map +1 -0
  29. package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -0
  30. package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js.map +1 -0
  31. package/lib/cjs/components/Groups/GroupColorLegend.js.map +1 -0
  32. package/lib/cjs/components/Groups/GroupItem.d.ts +13 -0
  33. package/lib/cjs/components/Groups/GroupItem.js +23 -0
  34. package/lib/cjs/components/Groups/GroupItem.js.map +1 -0
  35. package/lib/cjs/components/Groups/GroupMenuActions.d.ts +14 -0
  36. package/lib/cjs/components/Groups/GroupMenuActions.js +80 -0
  37. package/lib/cjs/components/Groups/GroupMenuActions.js.map +1 -0
  38. package/lib/cjs/components/Groups/GroupOverlapProgressBar.d.ts +11 -0
  39. package/lib/cjs/components/Groups/GroupOverlapProgressBar.js +18 -0
  40. package/lib/cjs/components/Groups/GroupOverlapProgressBar.js.map +1 -0
  41. package/lib/cjs/components/Groups/Groups.d.ts +18 -0
  42. package/lib/cjs/components/Groups/Groups.js +47 -0
  43. package/lib/cjs/components/Groups/Groups.js.map +1 -0
  44. package/lib/cjs/components/Groups/GroupsAddButton.d.ts +10 -0
  45. package/lib/cjs/components/Groups/GroupsAddButton.js.map +1 -0
  46. package/lib/cjs/components/Groups/GroupsShowHideButtons.js +45 -0
  47. package/lib/cjs/components/Groups/GroupsShowHideButtons.js.map +1 -0
  48. package/lib/cjs/components/Groups/GroupsView.d.ts +43 -0
  49. package/lib/cjs/components/Groups/GroupsView.js +49 -0
  50. package/lib/cjs/components/Groups/GroupsView.js.map +1 -0
  51. package/lib/cjs/components/Groups/GroupsView.scss +53 -0
  52. package/lib/cjs/components/Groups/GroupsVisualization.js +153 -0
  53. package/lib/cjs/components/Groups/GroupsVisualization.js.map +1 -0
  54. package/lib/cjs/components/Groups/GroupsVisualization.scss +18 -0
  55. package/lib/cjs/components/Groups/GroupsVisualizationActions.js +27 -0
  56. package/lib/cjs/components/Groups/GroupsVisualizationActions.js.map +1 -0
  57. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.d.ts +17 -0
  58. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js +91 -0
  59. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js.map +1 -0
  60. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.scss +14 -0
  61. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -0
  62. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -0
  63. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +13 -0
  64. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +28 -0
  65. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -0
  66. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -0
  67. package/lib/cjs/components/Groups/ToggleGroupVisibility.js.map +1 -0
  68. package/lib/cjs/components/Groups/groupsHelpers.d.ts +11 -0
  69. package/lib/cjs/components/Groups/groupsHelpers.js +202 -0
  70. package/lib/cjs/components/Groups/groupsHelpers.js.map +1 -0
  71. package/lib/cjs/components/Groups/hooks/useGroupsOperations.d.ts +26 -0
  72. package/lib/cjs/components/Groups/hooks/useGroupsOperations.js +71 -0
  73. package/lib/cjs/components/Groups/hooks/useGroupsOperations.js.map +1 -0
  74. package/lib/cjs/components/Groups/hooks/useVisualization.js +68 -0
  75. package/lib/cjs/components/Groups/hooks/useVisualization.js.map +1 -0
  76. package/lib/cjs/components/Mappings/BlockingOverlay.js +20 -0
  77. package/lib/cjs/components/Mappings/BlockingOverlay.js.map +1 -0
  78. package/lib/cjs/components/Mappings/ConfirmMappingsImport.js +134 -0
  79. package/lib/cjs/components/Mappings/ConfirmMappingsImport.js.map +1 -0
  80. package/lib/cjs/components/Mappings/Editing/MappingAction.js +109 -0
  81. package/lib/cjs/components/Mappings/Editing/MappingAction.js.map +1 -0
  82. package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js +42 -0
  83. package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -0
  84. package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.d.ts +11 -0
  85. package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js +129 -0
  86. package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -0
  87. package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.d.ts +8 -0
  88. package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -0
  89. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js +125 -0
  90. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js.map +1 -0
  91. package/lib/cjs/components/Mappings/Import/SelectIModel.js +102 -0
  92. package/lib/cjs/components/Mappings/Import/SelectIModel.js.map +1 -0
  93. package/lib/cjs/components/Mappings/Import/SelectITwin.js +115 -0
  94. package/lib/cjs/components/Mappings/Import/SelectITwin.js.map +1 -0
  95. package/lib/cjs/components/Mappings/Import/SelectMappings.d.ts +16 -0
  96. package/lib/cjs/components/Mappings/Import/SelectMappings.js +88 -0
  97. package/lib/cjs/components/Mappings/Import/SelectMappings.js.map +1 -0
  98. package/lib/cjs/components/Mappings/MappingViewActionGroup.js.map +1 -0
  99. package/lib/cjs/components/Mappings/Mappings.d.ts +13 -0
  100. package/lib/cjs/components/Mappings/Mappings.js +45 -0
  101. package/lib/cjs/components/Mappings/Mappings.js.map +1 -0
  102. package/lib/cjs/components/Mappings/MappingsView.d.ts +39 -0
  103. package/lib/cjs/components/Mappings/MappingsView.js +64 -0
  104. package/lib/cjs/components/Mappings/MappingsView.js.map +1 -0
  105. package/lib/cjs/components/Mappings/hooks/useMappingsOperations.d.ts +27 -0
  106. package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js +127 -0
  107. package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js.map +1 -0
  108. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +84 -0
  109. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -0
  110. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +150 -0
  111. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -0
  112. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +84 -0
  113. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +1 -0
  114. package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -0
  115. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +12 -0
  116. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js +185 -0
  117. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -0
  118. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js +84 -0
  119. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js.map +1 -0
  120. package/lib/cjs/components/Properties/GroupColorToggle.js +69 -0
  121. package/lib/cjs/components/Properties/GroupColorToggle.js.map +1 -0
  122. package/lib/cjs/components/Properties/GroupInformationPanel.js.map +1 -0
  123. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js +287 -0
  124. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -0
  125. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js +81 -0
  126. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -0
  127. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -0
  128. package/lib/cjs/components/Properties/GroupProperties/SaveModal.js.map +1 -0
  129. package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.d.ts +8 -0
  130. package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js +52 -0
  131. package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -0
  132. package/lib/cjs/components/Properties/PropertyAction.js +99 -0
  133. package/lib/cjs/components/Properties/PropertyAction.js.map +1 -0
  134. package/lib/cjs/components/Properties/PropertyMenu.js +60 -0
  135. package/lib/cjs/components/Properties/PropertyMenu.js.map +1 -0
  136. package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js.map +1 -0
  137. package/lib/cjs/components/Properties/PropertyNameCell.js.map +1 -0
  138. package/lib/cjs/components/Properties/PropertyTable.js +53 -0
  139. package/lib/cjs/components/Properties/PropertyTable.js.map +1 -0
  140. package/lib/cjs/components/Properties/PropertyTableToolbar.js.map +1 -0
  141. package/lib/cjs/components/Properties/hooks/useFetchData.js +43 -0
  142. package/lib/cjs/components/Properties/hooks/useFetchData.js.map +1 -0
  143. package/lib/cjs/components/Properties/hooks/useFormulaValidation.d.ts +6 -0
  144. package/lib/cjs/components/Properties/hooks/useFormulaValidation.js +29 -0
  145. package/lib/cjs/components/Properties/hooks/useFormulaValidation.js.map +1 -0
  146. package/lib/cjs/components/Properties/hooks/useValidator.js.map +1 -0
  147. package/lib/cjs/components/SharedComponents/ActionPanel.js +39 -0
  148. package/lib/cjs/components/SharedComponents/ActionPanel.js.map +1 -0
  149. package/lib/cjs/components/SharedComponents/DeleteModal.js +62 -0
  150. package/lib/cjs/components/SharedComponents/DeleteModal.js.map +1 -0
  151. package/lib/cjs/components/SharedComponents/EmptyMessage.d.ts +7 -0
  152. package/lib/cjs/components/SharedComponents/EmptyMessage.js +17 -0
  153. package/lib/cjs/components/SharedComponents/EmptyMessage.js.map +1 -0
  154. package/lib/cjs/components/SharedComponents/EmptyMessage.scss +12 -0
  155. package/lib/cjs/components/SharedComponents/HorizontalTile.d.ts +19 -0
  156. package/lib/cjs/components/SharedComponents/HorizontalTile.js +27 -0
  157. package/lib/cjs/components/SharedComponents/HorizontalTile.js.map +1 -0
  158. package/lib/cjs/components/SharedComponents/HorizontalTile.scss +58 -0
  159. package/lib/cjs/components/SharedComponents/LoadingOverlay.d.ts +4 -0
  160. package/lib/cjs/components/SharedComponents/LoadingOverlay.js +19 -0
  161. package/lib/cjs/components/SharedComponents/LoadingOverlay.js.map +1 -0
  162. package/lib/cjs/components/SharedComponents/LoadingOverlay.scss +13 -0
  163. package/lib/cjs/components/SharedComponents/LoadingSpinner.d.ts +4 -0
  164. package/lib/cjs/components/SharedComponents/LoadingSpinner.js +19 -0
  165. package/lib/cjs/components/SharedComponents/LoadingSpinner.js.map +1 -0
  166. package/lib/cjs/components/SharedComponents/LoadingSpinner.scss +8 -0
  167. package/lib/cjs/components/SharedComponents/StatusIcon.js.map +1 -0
  168. package/lib/cjs/components/context/ExtractionClientContext.js.map +1 -0
  169. package/lib/cjs/components/context/ExtractionStatusDataContext.d.ts +20 -0
  170. package/lib/cjs/components/context/ExtractionStatusDataContext.js +26 -0
  171. package/lib/cjs/components/context/ExtractionStatusDataContext.js.map +1 -0
  172. package/lib/cjs/components/context/GroupHilitedElementsContext.d.ts +38 -0
  173. package/lib/cjs/components/context/GroupHilitedElementsContext.js +55 -0
  174. package/lib/cjs/components/context/GroupHilitedElementsContext.js.map +1 -0
  175. package/lib/cjs/components/context/GroupingApiConfigContext.js.map +1 -0
  176. package/lib/cjs/components/context/GroupingMappingCustomUIContext.js.map +1 -0
  177. package/lib/cjs/components/context/IModelsClientContext.js.map +1 -0
  178. package/lib/cjs/components/context/ITwinsClientContext.js.map +1 -0
  179. package/lib/cjs/components/context/MappingClientContext.js.map +1 -0
  180. package/lib/cjs/components/context/PropertiesContext.js.map +1 -0
  181. package/lib/cjs/components/context/PropertyGridWrapperContext.d.ts +13 -0
  182. package/lib/cjs/components/context/PropertyGridWrapperContext.js.map +1 -0
  183. package/lib/cjs/components/customUI/DefaultGroupingUI.js.map +1 -0
  184. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js +107 -0
  185. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -0
  186. package/lib/cjs/components/customUI/GroupingMappingCustomUI.js.map +1 -0
  187. package/lib/cjs/components/customUI/ManualGroupingCustomUI.js +32 -0
  188. package/lib/cjs/components/customUI/ManualGroupingCustomUI.js.map +1 -0
  189. package/lib/cjs/components/customUI/SearchGroupingCustomUI.js +98 -0
  190. package/lib/cjs/components/customUI/SearchGroupingCustomUI.js.map +1 -0
  191. package/lib/cjs/grouping-mapping-widget.d.ts +23 -23
  192. package/lib/cjs/grouping-mapping-widget.js +23 -23
  193. package/lib/cjs/grouping-mapping-widget.js.map +1 -1
  194. package/lib/cjs/test/GroupPropertyUtils.test.js +1 -1
  195. package/lib/cjs/test/GroupPropertyUtils.test.js.map +1 -1
  196. package/lib/cjs/test/GroupingMappingCustomUI.test.js +4 -4
  197. package/lib/cjs/test/GroupingMappingCustomUI.test.js.map +1 -1
  198. package/lib/cjs/test/QueryBuilder.test.js +1 -1
  199. package/lib/cjs/test/QueryBuilder.test.js.map +1 -1
  200. package/lib/cjs/test/WidgetHeader.test.js +1 -1
  201. package/lib/cjs/test/WidgetHeader.test.js.map +1 -1
  202. package/lib/cjs/test/test-utils.js +1 -1
  203. package/lib/cjs/test/test-utils.js.map +1 -1
  204. package/lib/esm/WidgetShell/GroupingMapping.d.ts +34 -0
  205. package/lib/esm/WidgetShell/GroupingMapping.js +57 -0
  206. package/lib/esm/WidgetShell/GroupingMapping.js.map +1 -0
  207. package/lib/esm/WidgetShell/GroupingMappingContent.js +28 -0
  208. package/lib/esm/WidgetShell/GroupingMappingContent.js.map +1 -0
  209. package/lib/esm/WidgetShell/GroupingMappingHeader.js +17 -0
  210. package/lib/esm/WidgetShell/GroupingMappingHeader.js.map +1 -0
  211. package/lib/esm/WidgetShell/GroupingMappingWidget.d.ts +10 -0
  212. package/lib/esm/WidgetShell/GroupingMappingWidget.js +24 -0
  213. package/lib/esm/WidgetShell/GroupingMappingWidget.js.map +1 -0
  214. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.d.ts +8 -0
  215. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js +100 -0
  216. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js.map +1 -0
  217. package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -0
  218. package/lib/esm/common/utils.d.ts +11 -0
  219. package/lib/esm/common/utils.js +80 -0
  220. package/lib/esm/common/utils.js.map +1 -0
  221. package/lib/esm/common/viewerUtils.d.ts +30 -0
  222. package/lib/esm/common/viewerUtils.js +268 -0
  223. package/lib/esm/common/viewerUtils.js.map +1 -0
  224. package/lib/esm/components/GroupingMappingContext.d.ts +39 -0
  225. package/lib/esm/components/GroupingMappingContext.js +110 -0
  226. package/lib/esm/components/GroupingMappingContext.js.map +1 -0
  227. package/lib/esm/components/Groups/Editing/GroupAction.js +130 -0
  228. package/lib/esm/components/Groups/Editing/GroupAction.js.map +1 -0
  229. package/lib/esm/components/Groups/Editing/GroupDetails.js +27 -0
  230. package/lib/esm/components/Groups/Editing/GroupDetails.js.map +1 -0
  231. package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -0
  232. package/lib/esm/components/Groups/Editing/GroupDetailsStep.js.map +1 -0
  233. package/lib/esm/components/Groups/GroupColorLegend.js.map +1 -0
  234. package/lib/esm/components/Groups/GroupItem.d.ts +13 -0
  235. package/lib/esm/components/Groups/GroupItem.js +16 -0
  236. package/lib/esm/components/Groups/GroupItem.js.map +1 -0
  237. package/lib/esm/components/Groups/GroupMenuActions.d.ts +14 -0
  238. package/lib/esm/components/Groups/GroupMenuActions.js +57 -0
  239. package/lib/esm/components/Groups/GroupMenuActions.js.map +1 -0
  240. package/lib/esm/components/Groups/GroupOverlapProgressBar.d.ts +11 -0
  241. package/lib/esm/components/Groups/GroupOverlapProgressBar.js +11 -0
  242. package/lib/esm/components/Groups/GroupOverlapProgressBar.js.map +1 -0
  243. package/lib/esm/components/Groups/Groups.d.ts +18 -0
  244. package/lib/esm/components/Groups/Groups.js +24 -0
  245. package/lib/esm/components/Groups/Groups.js.map +1 -0
  246. package/lib/esm/components/Groups/GroupsAddButton.d.ts +10 -0
  247. package/lib/esm/components/Groups/GroupsAddButton.js.map +1 -0
  248. package/lib/esm/components/Groups/GroupsShowHideButtons.js +22 -0
  249. package/lib/esm/components/Groups/GroupsShowHideButtons.js.map +1 -0
  250. package/lib/esm/components/Groups/GroupsView.d.ts +43 -0
  251. package/lib/esm/components/Groups/GroupsView.js +42 -0
  252. package/lib/esm/components/Groups/GroupsView.js.map +1 -0
  253. package/lib/esm/components/Groups/GroupsView.scss +53 -0
  254. package/lib/esm/components/Groups/GroupsVisualization.js +130 -0
  255. package/lib/esm/components/Groups/GroupsVisualization.js.map +1 -0
  256. package/lib/esm/components/Groups/GroupsVisualization.scss +18 -0
  257. package/lib/esm/components/Groups/GroupsVisualizationActions.js +20 -0
  258. package/lib/esm/components/Groups/GroupsVisualizationActions.js.map +1 -0
  259. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.d.ts +17 -0
  260. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js +84 -0
  261. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js.map +1 -0
  262. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.scss +14 -0
  263. package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -0
  264. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -0
  265. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +13 -0
  266. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +21 -0
  267. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -0
  268. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -0
  269. package/lib/esm/components/Groups/ToggleGroupVisibility.js.map +1 -0
  270. package/lib/esm/components/Groups/groupsHelpers.d.ts +11 -0
  271. package/lib/esm/components/Groups/groupsHelpers.js +192 -0
  272. package/lib/esm/components/Groups/groupsHelpers.js.map +1 -0
  273. package/lib/esm/components/Groups/hooks/useGroupsOperations.d.ts +26 -0
  274. package/lib/esm/components/Groups/hooks/useGroupsOperations.js +67 -0
  275. package/lib/esm/components/Groups/hooks/useGroupsOperations.js.map +1 -0
  276. package/lib/esm/components/Groups/hooks/useVisualization.js +64 -0
  277. package/lib/esm/components/Groups/hooks/useVisualization.js.map +1 -0
  278. package/lib/esm/components/Mappings/BlockingOverlay.js +13 -0
  279. package/lib/esm/components/Mappings/BlockingOverlay.js.map +1 -0
  280. package/lib/esm/components/Mappings/ConfirmMappingsImport.js +113 -0
  281. package/lib/esm/components/Mappings/ConfirmMappingsImport.js.map +1 -0
  282. package/lib/esm/components/Mappings/Editing/MappingAction.js +83 -0
  283. package/lib/esm/components/Mappings/Editing/MappingAction.js.map +1 -0
  284. package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js +19 -0
  285. package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -0
  286. package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.d.ts +11 -0
  287. package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js +106 -0
  288. package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -0
  289. package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.d.ts +8 -0
  290. package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -0
  291. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js +99 -0
  292. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js.map +1 -0
  293. package/lib/esm/components/Mappings/Import/SelectIModel.js +81 -0
  294. package/lib/esm/components/Mappings/Import/SelectIModel.js.map +1 -0
  295. package/lib/esm/components/Mappings/Import/SelectITwin.js +94 -0
  296. package/lib/esm/components/Mappings/Import/SelectITwin.js.map +1 -0
  297. package/lib/esm/components/Mappings/Import/SelectMappings.d.ts +16 -0
  298. package/lib/esm/components/Mappings/Import/SelectMappings.js +67 -0
  299. package/lib/esm/components/Mappings/Import/SelectMappings.js.map +1 -0
  300. package/lib/esm/components/Mappings/MappingViewActionGroup.js.map +1 -0
  301. package/lib/esm/components/Mappings/Mappings.d.ts +13 -0
  302. package/lib/esm/components/Mappings/Mappings.js +22 -0
  303. package/lib/esm/components/Mappings/Mappings.js.map +1 -0
  304. package/lib/esm/components/Mappings/MappingsView.d.ts +39 -0
  305. package/lib/esm/components/Mappings/MappingsView.js +57 -0
  306. package/lib/esm/components/Mappings/MappingsView.js.map +1 -0
  307. package/lib/esm/components/Mappings/hooks/useMappingsOperations.d.ts +27 -0
  308. package/lib/esm/components/Mappings/hooks/useMappingsOperations.js +123 -0
  309. package/lib/esm/components/Mappings/hooks/useMappingsOperations.js.map +1 -0
  310. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +58 -0
  311. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -0
  312. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +124 -0
  313. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -0
  314. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +61 -0
  315. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +1 -0
  316. package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -0
  317. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +12 -0
  318. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js +159 -0
  319. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -0
  320. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js +61 -0
  321. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js.map +1 -0
  322. package/lib/esm/components/Properties/GroupColorToggle.js +46 -0
  323. package/lib/esm/components/Properties/GroupColorToggle.js.map +1 -0
  324. package/lib/esm/components/Properties/GroupInformationPanel.js.map +1 -0
  325. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js +261 -0
  326. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -0
  327. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js +58 -0
  328. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -0
  329. package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -0
  330. package/lib/esm/components/Properties/GroupProperties/SaveModal.js.map +1 -0
  331. package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.d.ts +8 -0
  332. package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js +31 -0
  333. package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -0
  334. package/lib/esm/components/Properties/PropertyAction.js +76 -0
  335. package/lib/esm/components/Properties/PropertyAction.js.map +1 -0
  336. package/lib/esm/components/Properties/PropertyMenu.js +37 -0
  337. package/lib/esm/components/Properties/PropertyMenu.js.map +1 -0
  338. package/lib/esm/components/Properties/PropertyMenuWithVisualization.js.map +1 -0
  339. package/lib/esm/components/Properties/PropertyNameCell.js.map +1 -0
  340. package/lib/esm/components/Properties/PropertyTable.js +27 -0
  341. package/lib/esm/components/Properties/PropertyTable.js.map +1 -0
  342. package/lib/esm/components/Properties/PropertyTableToolbar.js.map +1 -0
  343. package/lib/esm/components/Properties/hooks/useFetchData.js +37 -0
  344. package/lib/esm/components/Properties/hooks/useFetchData.js.map +1 -0
  345. package/lib/esm/components/Properties/hooks/useFormulaValidation.d.ts +6 -0
  346. package/lib/esm/components/Properties/hooks/useFormulaValidation.js +25 -0
  347. package/lib/esm/components/Properties/hooks/useFormulaValidation.js.map +1 -0
  348. package/lib/esm/components/Properties/hooks/useValidator.js.map +1 -0
  349. package/lib/esm/components/SharedComponents/ActionPanel.js +18 -0
  350. package/lib/esm/components/SharedComponents/ActionPanel.js.map +1 -0
  351. package/lib/esm/components/SharedComponents/DeleteModal.js +39 -0
  352. package/lib/esm/components/SharedComponents/DeleteModal.js.map +1 -0
  353. package/lib/esm/components/SharedComponents/EmptyMessage.d.ts +7 -0
  354. package/lib/esm/components/SharedComponents/EmptyMessage.js +10 -0
  355. package/lib/esm/components/SharedComponents/EmptyMessage.js.map +1 -0
  356. package/lib/esm/components/SharedComponents/EmptyMessage.scss +12 -0
  357. package/lib/esm/components/SharedComponents/HorizontalTile.d.ts +19 -0
  358. package/lib/esm/components/SharedComponents/HorizontalTile.js +20 -0
  359. package/lib/esm/components/SharedComponents/HorizontalTile.js.map +1 -0
  360. package/lib/esm/components/SharedComponents/HorizontalTile.scss +58 -0
  361. package/lib/esm/components/SharedComponents/LoadingOverlay.d.ts +4 -0
  362. package/lib/esm/components/SharedComponents/LoadingOverlay.js +12 -0
  363. package/lib/esm/components/SharedComponents/LoadingOverlay.js.map +1 -0
  364. package/lib/esm/components/SharedComponents/LoadingOverlay.scss +13 -0
  365. package/lib/esm/components/SharedComponents/LoadingSpinner.d.ts +4 -0
  366. package/lib/esm/components/SharedComponents/LoadingSpinner.js +12 -0
  367. package/lib/esm/components/SharedComponents/LoadingSpinner.js.map +1 -0
  368. package/lib/esm/components/SharedComponents/LoadingSpinner.scss +8 -0
  369. package/lib/esm/components/SharedComponents/StatusIcon.js.map +1 -0
  370. package/lib/esm/components/context/ExtractionClientContext.js.map +1 -0
  371. package/lib/esm/components/context/ExtractionStatusDataContext.d.ts +20 -0
  372. package/lib/esm/components/context/ExtractionStatusDataContext.js +22 -0
  373. package/lib/esm/components/context/ExtractionStatusDataContext.js.map +1 -0
  374. package/lib/esm/components/context/GroupHilitedElementsContext.d.ts +38 -0
  375. package/lib/esm/components/context/GroupHilitedElementsContext.js +32 -0
  376. package/lib/esm/components/context/GroupHilitedElementsContext.js.map +1 -0
  377. package/lib/esm/components/context/GroupingApiConfigContext.js.map +1 -0
  378. package/lib/esm/components/context/GroupingMappingCustomUIContext.js.map +1 -0
  379. package/lib/esm/components/context/IModelsClientContext.js.map +1 -0
  380. package/lib/esm/components/context/ITwinsClientContext.js.map +1 -0
  381. package/lib/esm/components/context/MappingClientContext.js.map +1 -0
  382. package/lib/esm/components/context/PropertiesContext.js.map +1 -0
  383. package/lib/esm/components/context/PropertyGridWrapperContext.d.ts +13 -0
  384. package/lib/esm/components/context/PropertyGridWrapperContext.js.map +1 -0
  385. package/lib/esm/components/customUI/DefaultGroupingUI.js.map +1 -0
  386. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js +84 -0
  387. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -0
  388. package/lib/esm/components/customUI/GroupingMappingCustomUI.js.map +1 -0
  389. package/lib/esm/components/customUI/ManualGroupingCustomUI.js +25 -0
  390. package/lib/esm/components/customUI/ManualGroupingCustomUI.js.map +1 -0
  391. package/lib/esm/components/customUI/SearchGroupingCustomUI.js +91 -0
  392. package/lib/esm/components/customUI/SearchGroupingCustomUI.js.map +1 -0
  393. package/lib/esm/grouping-mapping-widget.d.ts +23 -23
  394. package/lib/esm/grouping-mapping-widget.js +23 -23
  395. package/lib/esm/grouping-mapping-widget.js.map +1 -1
  396. package/lib/esm/test/GroupPropertyUtils.test.js +1 -1
  397. package/lib/esm/test/GroupPropertyUtils.test.js.map +1 -1
  398. package/lib/esm/test/GroupingMappingCustomUI.test.js +4 -4
  399. package/lib/esm/test/GroupingMappingCustomUI.test.js.map +1 -1
  400. package/lib/esm/test/QueryBuilder.test.js +1 -1
  401. package/lib/esm/test/QueryBuilder.test.js.map +1 -1
  402. package/lib/esm/test/WidgetHeader.test.js +1 -1
  403. package/lib/esm/test/WidgetHeader.test.js.map +1 -1
  404. package/lib/esm/test/test-utils.js +1 -1
  405. package/lib/esm/test/test-utils.js.map +1 -1
  406. package/package.json +30 -31
  407. package/lib/cjs/widget/GroupingMappingWidget.d.ts +0 -10
  408. package/lib/cjs/widget/GroupingMappingWidget.js +0 -31
  409. package/lib/cjs/widget/GroupingMappingWidget.js.map +0 -1
  410. package/lib/cjs/widget/components/ActionPanel.js +0 -39
  411. package/lib/cjs/widget/components/ActionPanel.js.map +0 -1
  412. package/lib/cjs/widget/components/BlockingOverlay.js +0 -20
  413. package/lib/cjs/widget/components/BlockingOverlay.js.map +0 -1
  414. package/lib/cjs/widget/components/CalculatedPropertyAction.js +0 -84
  415. package/lib/cjs/widget/components/CalculatedPropertyAction.js.map +0 -1
  416. package/lib/cjs/widget/components/CalculatedPropertyActionWithVisuals.js +0 -150
  417. package/lib/cjs/widget/components/CalculatedPropertyActionWithVisuals.js.map +0 -1
  418. package/lib/cjs/widget/components/CalculatedPropertyTable.js +0 -84
  419. package/lib/cjs/widget/components/CalculatedPropertyTable.js.map +0 -1
  420. package/lib/cjs/widget/components/ConfirmMappingsImport.js +0 -134
  421. package/lib/cjs/widget/components/ConfirmMappingsImport.js.map +0 -1
  422. package/lib/cjs/widget/components/CustomCalculationAction.d.ts +0 -13
  423. package/lib/cjs/widget/components/CustomCalculationAction.js +0 -186
  424. package/lib/cjs/widget/components/CustomCalculationAction.js.map +0 -1
  425. package/lib/cjs/widget/components/CustomCalculationTable.js +0 -84
  426. package/lib/cjs/widget/components/CustomCalculationTable.js.map +0 -1
  427. package/lib/cjs/widget/components/DeleteModal.js +0 -61
  428. package/lib/cjs/widget/components/DeleteModal.js.map +0 -1
  429. package/lib/cjs/widget/components/ExtractionLogCustomFilter.js +0 -42
  430. package/lib/cjs/widget/components/ExtractionLogCustomFilter.js.map +0 -1
  431. package/lib/cjs/widget/components/ExtractionMessageModal.d.ts +0 -11
  432. package/lib/cjs/widget/components/ExtractionMessageModal.js +0 -87
  433. package/lib/cjs/widget/components/ExtractionMessageModal.js.map +0 -1
  434. package/lib/cjs/widget/components/ExtractionStatusIcon.d.ts +0 -8
  435. package/lib/cjs/widget/components/ExtractionStatusIcon.js.map +0 -1
  436. package/lib/cjs/widget/components/GroupAction.js +0 -155
  437. package/lib/cjs/widget/components/GroupAction.js.map +0 -1
  438. package/lib/cjs/widget/components/GroupColorLegend.js.map +0 -1
  439. package/lib/cjs/widget/components/GroupColorToggle.js +0 -69
  440. package/lib/cjs/widget/components/GroupColorToggle.js.map +0 -1
  441. package/lib/cjs/widget/components/GroupDetails.js +0 -34
  442. package/lib/cjs/widget/components/GroupDetails.js.map +0 -1
  443. package/lib/cjs/widget/components/GroupDetailsActionPanel.js.map +0 -1
  444. package/lib/cjs/widget/components/GroupDetailsStep.js.map +0 -1
  445. package/lib/cjs/widget/components/GroupInformationPanel.js.map +0 -1
  446. package/lib/cjs/widget/components/GroupItem.d.ts +0 -12
  447. package/lib/cjs/widget/components/GroupItem.js +0 -19
  448. package/lib/cjs/widget/components/GroupItem.js.map +0 -1
  449. package/lib/cjs/widget/components/GroupMenuActions.d.ts +0 -13
  450. package/lib/cjs/widget/components/GroupMenuActions.js +0 -68
  451. package/lib/cjs/widget/components/GroupMenuActions.js.map +0 -1
  452. package/lib/cjs/widget/components/GroupPropertyAction.js +0 -287
  453. package/lib/cjs/widget/components/GroupPropertyAction.js.map +0 -1
  454. package/lib/cjs/widget/components/GroupPropertyTable.js +0 -81
  455. package/lib/cjs/widget/components/GroupPropertyTable.js.map +0 -1
  456. package/lib/cjs/widget/components/GroupPropertyUtils.js.map +0 -1
  457. package/lib/cjs/widget/components/GroupingMapping.d.ts +0 -34
  458. package/lib/cjs/widget/components/GroupingMapping.js +0 -79
  459. package/lib/cjs/widget/components/GroupingMapping.js.map +0 -1
  460. package/lib/cjs/widget/components/GroupingMappingContent.js +0 -51
  461. package/lib/cjs/widget/components/GroupingMappingContent.js.map +0 -1
  462. package/lib/cjs/widget/components/GroupingMappingContext.d.ts +0 -40
  463. package/lib/cjs/widget/components/GroupingMappingContext.js +0 -109
  464. package/lib/cjs/widget/components/GroupingMappingContext.js.map +0 -1
  465. package/lib/cjs/widget/components/GroupingMappingHeader.js +0 -24
  466. package/lib/cjs/widget/components/GroupingMappingHeader.js.map +0 -1
  467. package/lib/cjs/widget/components/GroupingMappingRouter.d.ts +0 -8
  468. package/lib/cjs/widget/components/GroupingMappingRouter.js +0 -107
  469. package/lib/cjs/widget/components/GroupingMappingRouter.js.map +0 -1
  470. package/lib/cjs/widget/components/Groups.d.ts +0 -16
  471. package/lib/cjs/widget/components/Groups.js +0 -46
  472. package/lib/cjs/widget/components/Groups.js.map +0 -1
  473. package/lib/cjs/widget/components/GroupsAddButton.d.ts +0 -10
  474. package/lib/cjs/widget/components/GroupsAddButton.js.map +0 -1
  475. package/lib/cjs/widget/components/GroupsShowHideButtons.js +0 -45
  476. package/lib/cjs/widget/components/GroupsShowHideButtons.js.map +0 -1
  477. package/lib/cjs/widget/components/GroupsView.d.ts +0 -31
  478. package/lib/cjs/widget/components/GroupsView.js +0 -37
  479. package/lib/cjs/widget/components/GroupsView.js.map +0 -1
  480. package/lib/cjs/widget/components/GroupsView.scss +0 -49
  481. package/lib/cjs/widget/components/GroupsVisualization.js +0 -141
  482. package/lib/cjs/widget/components/GroupsVisualization.js.map +0 -1
  483. package/lib/cjs/widget/components/GroupsVisualization.scss +0 -12
  484. package/lib/cjs/widget/components/GroupsVisualizationActions.js +0 -27
  485. package/lib/cjs/widget/components/GroupsVisualizationActions.js.map +0 -1
  486. package/lib/cjs/widget/components/HorizontalTile.d.ts +0 -15
  487. package/lib/cjs/widget/components/HorizontalTile.js +0 -24
  488. package/lib/cjs/widget/components/HorizontalTile.js.map +0 -1
  489. package/lib/cjs/widget/components/HorizontalTile.scss +0 -57
  490. package/lib/cjs/widget/components/MappingAction.js +0 -109
  491. package/lib/cjs/widget/components/MappingAction.js.map +0 -1
  492. package/lib/cjs/widget/components/MappingImportWizardModal.js +0 -125
  493. package/lib/cjs/widget/components/MappingImportWizardModal.js.map +0 -1
  494. package/lib/cjs/widget/components/MappingViewActionGroup.js.map +0 -1
  495. package/lib/cjs/widget/components/Mappings.d.ts +0 -13
  496. package/lib/cjs/widget/components/Mappings.js +0 -45
  497. package/lib/cjs/widget/components/Mappings.js.map +0 -1
  498. package/lib/cjs/widget/components/MappingsView.d.ts +0 -39
  499. package/lib/cjs/widget/components/MappingsView.js +0 -63
  500. package/lib/cjs/widget/components/MappingsView.js.map +0 -1
  501. package/lib/cjs/widget/components/PropertyAction.js +0 -99
  502. package/lib/cjs/widget/components/PropertyAction.js.map +0 -1
  503. package/lib/cjs/widget/components/PropertyMenu.js +0 -60
  504. package/lib/cjs/widget/components/PropertyMenu.js.map +0 -1
  505. package/lib/cjs/widget/components/PropertyMenuWithVisualization.js.map +0 -1
  506. package/lib/cjs/widget/components/PropertyNameCell.js.map +0 -1
  507. package/lib/cjs/widget/components/PropertyTable.js +0 -53
  508. package/lib/cjs/widget/components/PropertyTable.js.map +0 -1
  509. package/lib/cjs/widget/components/PropertyTableToolbar.js.map +0 -1
  510. package/lib/cjs/widget/components/QueryBuilder.js.map +0 -1
  511. package/lib/cjs/widget/components/QueryBuilderActionPanel.js.map +0 -1
  512. package/lib/cjs/widget/components/QueryBuilderCustomUI.d.ts +0 -13
  513. package/lib/cjs/widget/components/QueryBuilderCustomUI.js +0 -28
  514. package/lib/cjs/widget/components/QueryBuilderCustomUI.js.map +0 -1
  515. package/lib/cjs/widget/components/QueryBuilderStep.js.map +0 -1
  516. package/lib/cjs/widget/components/SaveModal.js.map +0 -1
  517. package/lib/cjs/widget/components/SelectIModel.js +0 -102
  518. package/lib/cjs/widget/components/SelectIModel.js.map +0 -1
  519. package/lib/cjs/widget/components/SelectITwin.js +0 -115
  520. package/lib/cjs/widget/components/SelectITwin.js.map +0 -1
  521. package/lib/cjs/widget/components/SelectMappings.d.ts +0 -16
  522. package/lib/cjs/widget/components/SelectMappings.js +0 -88
  523. package/lib/cjs/widget/components/SelectMappings.js.map +0 -1
  524. package/lib/cjs/widget/components/SharedCalculatedPropertyForms.js.map +0 -1
  525. package/lib/cjs/widget/components/SortableHorizontalTile.d.ts +0 -8
  526. package/lib/cjs/widget/components/SortableHorizontalTile.js +0 -52
  527. package/lib/cjs/widget/components/SortableHorizontalTile.js.map +0 -1
  528. package/lib/cjs/widget/components/StatusIcon.js.map +0 -1
  529. package/lib/cjs/widget/components/ToggleGroupVisibility.js.map +0 -1
  530. package/lib/cjs/widget/components/WidgetHeader.js.map +0 -1
  531. package/lib/cjs/widget/components/context/ExtractionClientContext.js.map +0 -1
  532. package/lib/cjs/widget/components/context/GroupHilitedElementsContext.d.ts +0 -22
  533. package/lib/cjs/widget/components/context/GroupHilitedElementsContext.js +0 -47
  534. package/lib/cjs/widget/components/context/GroupHilitedElementsContext.js.map +0 -1
  535. package/lib/cjs/widget/components/context/GroupingApiConfigContext.js.map +0 -1
  536. package/lib/cjs/widget/components/context/GroupingMappingCustomUIContext.js.map +0 -1
  537. package/lib/cjs/widget/components/context/IModelsClientContext.js.map +0 -1
  538. package/lib/cjs/widget/components/context/ITwinsClientContext.js.map +0 -1
  539. package/lib/cjs/widget/components/context/MappingClientContext.js.map +0 -1
  540. package/lib/cjs/widget/components/context/PropertiesContext.js.map +0 -1
  541. package/lib/cjs/widget/components/context/PropertyGridWrapperContext.d.ts +0 -13
  542. package/lib/cjs/widget/components/context/PropertyGridWrapperContext.js.map +0 -1
  543. package/lib/cjs/widget/components/customUI/DefaultGroupingUI.js.map +0 -1
  544. package/lib/cjs/widget/components/customUI/GroupQueryBuilderCustomUI.js +0 -107
  545. package/lib/cjs/widget/components/customUI/GroupQueryBuilderCustomUI.js.map +0 -1
  546. package/lib/cjs/widget/components/customUI/GroupingMappingCustomUI.js.map +0 -1
  547. package/lib/cjs/widget/components/customUI/ManualGroupingCustomUI.js +0 -32
  548. package/lib/cjs/widget/components/customUI/ManualGroupingCustomUI.js.map +0 -1
  549. package/lib/cjs/widget/components/customUI/SearchGroupingCustomUI.js +0 -98
  550. package/lib/cjs/widget/components/customUI/SearchGroupingCustomUI.js.map +0 -1
  551. package/lib/cjs/widget/components/groupsHelpers.d.ts +0 -10
  552. package/lib/cjs/widget/components/groupsHelpers.js +0 -84
  553. package/lib/cjs/widget/components/groupsHelpers.js.map +0 -1
  554. package/lib/cjs/widget/components/hooks/useGroupsOperations.d.ts +0 -20
  555. package/lib/cjs/widget/components/hooks/useGroupsOperations.js +0 -67
  556. package/lib/cjs/widget/components/hooks/useGroupsOperations.js.map +0 -1
  557. package/lib/cjs/widget/components/hooks/useMappingsOperations.d.ts +0 -35
  558. package/lib/cjs/widget/components/hooks/useMappingsOperations.js +0 -120
  559. package/lib/cjs/widget/components/hooks/useMappingsOperations.js.map +0 -1
  560. package/lib/cjs/widget/components/utils.d.ts +0 -16
  561. package/lib/cjs/widget/components/utils.js +0 -99
  562. package/lib/cjs/widget/components/utils.js.map +0 -1
  563. package/lib/cjs/widget/components/utils.scss +0 -18
  564. package/lib/cjs/widget/components/viewerUtils.d.ts +0 -30
  565. package/lib/cjs/widget/components/viewerUtils.js +0 -293
  566. package/lib/cjs/widget/components/viewerUtils.js.map +0 -1
  567. package/lib/cjs/widget/hooks/useFetchData.js +0 -43
  568. package/lib/cjs/widget/hooks/useFetchData.js.map +0 -1
  569. package/lib/cjs/widget/hooks/useFormulaValidation.d.ts +0 -6
  570. package/lib/cjs/widget/hooks/useFormulaValidation.js +0 -29
  571. package/lib/cjs/widget/hooks/useFormulaValidation.js.map +0 -1
  572. package/lib/cjs/widget/hooks/useValidator.js.map +0 -1
  573. package/lib/cjs/widget/hooks/useVisualization.js +0 -68
  574. package/lib/cjs/widget/hooks/useVisualization.js.map +0 -1
  575. package/lib/cjs/widget/utils.d.ts +0 -5
  576. package/lib/cjs/widget/utils.js +0 -12
  577. package/lib/cjs/widget/utils.js.map +0 -1
  578. package/lib/esm/widget/GroupingMappingWidget.d.ts +0 -10
  579. package/lib/esm/widget/GroupingMappingWidget.js +0 -24
  580. package/lib/esm/widget/GroupingMappingWidget.js.map +0 -1
  581. package/lib/esm/widget/components/ActionPanel.js +0 -18
  582. package/lib/esm/widget/components/ActionPanel.js.map +0 -1
  583. package/lib/esm/widget/components/BlockingOverlay.js +0 -13
  584. package/lib/esm/widget/components/BlockingOverlay.js.map +0 -1
  585. package/lib/esm/widget/components/CalculatedPropertyAction.js +0 -58
  586. package/lib/esm/widget/components/CalculatedPropertyAction.js.map +0 -1
  587. package/lib/esm/widget/components/CalculatedPropertyActionWithVisuals.js +0 -124
  588. package/lib/esm/widget/components/CalculatedPropertyActionWithVisuals.js.map +0 -1
  589. package/lib/esm/widget/components/CalculatedPropertyTable.js +0 -61
  590. package/lib/esm/widget/components/CalculatedPropertyTable.js.map +0 -1
  591. package/lib/esm/widget/components/ConfirmMappingsImport.js +0 -113
  592. package/lib/esm/widget/components/ConfirmMappingsImport.js.map +0 -1
  593. package/lib/esm/widget/components/CustomCalculationAction.d.ts +0 -13
  594. package/lib/esm/widget/components/CustomCalculationAction.js +0 -160
  595. package/lib/esm/widget/components/CustomCalculationAction.js.map +0 -1
  596. package/lib/esm/widget/components/CustomCalculationTable.js +0 -61
  597. package/lib/esm/widget/components/CustomCalculationTable.js.map +0 -1
  598. package/lib/esm/widget/components/DeleteModal.js +0 -38
  599. package/lib/esm/widget/components/DeleteModal.js.map +0 -1
  600. package/lib/esm/widget/components/ExtractionLogCustomFilter.js +0 -19
  601. package/lib/esm/widget/components/ExtractionLogCustomFilter.js.map +0 -1
  602. package/lib/esm/widget/components/ExtractionMessageModal.d.ts +0 -11
  603. package/lib/esm/widget/components/ExtractionMessageModal.js +0 -64
  604. package/lib/esm/widget/components/ExtractionMessageModal.js.map +0 -1
  605. package/lib/esm/widget/components/ExtractionStatusIcon.d.ts +0 -8
  606. package/lib/esm/widget/components/ExtractionStatusIcon.js.map +0 -1
  607. package/lib/esm/widget/components/GroupAction.js +0 -129
  608. package/lib/esm/widget/components/GroupAction.js.map +0 -1
  609. package/lib/esm/widget/components/GroupColorLegend.js.map +0 -1
  610. package/lib/esm/widget/components/GroupColorToggle.js +0 -46
  611. package/lib/esm/widget/components/GroupColorToggle.js.map +0 -1
  612. package/lib/esm/widget/components/GroupDetails.js +0 -27
  613. package/lib/esm/widget/components/GroupDetails.js.map +0 -1
  614. package/lib/esm/widget/components/GroupDetailsActionPanel.js.map +0 -1
  615. package/lib/esm/widget/components/GroupDetailsStep.js.map +0 -1
  616. package/lib/esm/widget/components/GroupInformationPanel.js.map +0 -1
  617. package/lib/esm/widget/components/GroupItem.d.ts +0 -12
  618. package/lib/esm/widget/components/GroupItem.js +0 -12
  619. package/lib/esm/widget/components/GroupItem.js.map +0 -1
  620. package/lib/esm/widget/components/GroupMenuActions.d.ts +0 -13
  621. package/lib/esm/widget/components/GroupMenuActions.js +0 -45
  622. package/lib/esm/widget/components/GroupMenuActions.js.map +0 -1
  623. package/lib/esm/widget/components/GroupPropertyAction.js +0 -261
  624. package/lib/esm/widget/components/GroupPropertyAction.js.map +0 -1
  625. package/lib/esm/widget/components/GroupPropertyTable.js +0 -58
  626. package/lib/esm/widget/components/GroupPropertyTable.js.map +0 -1
  627. package/lib/esm/widget/components/GroupPropertyUtils.js.map +0 -1
  628. package/lib/esm/widget/components/GroupingMapping.d.ts +0 -34
  629. package/lib/esm/widget/components/GroupingMapping.js +0 -57
  630. package/lib/esm/widget/components/GroupingMapping.js.map +0 -1
  631. package/lib/esm/widget/components/GroupingMappingContent.js +0 -28
  632. package/lib/esm/widget/components/GroupingMappingContent.js.map +0 -1
  633. package/lib/esm/widget/components/GroupingMappingContext.d.ts +0 -40
  634. package/lib/esm/widget/components/GroupingMappingContext.js +0 -86
  635. package/lib/esm/widget/components/GroupingMappingContext.js.map +0 -1
  636. package/lib/esm/widget/components/GroupingMappingHeader.js +0 -17
  637. package/lib/esm/widget/components/GroupingMappingHeader.js.map +0 -1
  638. package/lib/esm/widget/components/GroupingMappingRouter.d.ts +0 -8
  639. package/lib/esm/widget/components/GroupingMappingRouter.js +0 -100
  640. package/lib/esm/widget/components/GroupingMappingRouter.js.map +0 -1
  641. package/lib/esm/widget/components/Groups.d.ts +0 -16
  642. package/lib/esm/widget/components/Groups.js +0 -23
  643. package/lib/esm/widget/components/Groups.js.map +0 -1
  644. package/lib/esm/widget/components/GroupsAddButton.d.ts +0 -10
  645. package/lib/esm/widget/components/GroupsAddButton.js.map +0 -1
  646. package/lib/esm/widget/components/GroupsShowHideButtons.js +0 -22
  647. package/lib/esm/widget/components/GroupsShowHideButtons.js.map +0 -1
  648. package/lib/esm/widget/components/GroupsView.d.ts +0 -31
  649. package/lib/esm/widget/components/GroupsView.js +0 -30
  650. package/lib/esm/widget/components/GroupsView.js.map +0 -1
  651. package/lib/esm/widget/components/GroupsView.scss +0 -49
  652. package/lib/esm/widget/components/GroupsVisualization.js +0 -118
  653. package/lib/esm/widget/components/GroupsVisualization.js.map +0 -1
  654. package/lib/esm/widget/components/GroupsVisualization.scss +0 -12
  655. package/lib/esm/widget/components/GroupsVisualizationActions.js +0 -20
  656. package/lib/esm/widget/components/GroupsVisualizationActions.js.map +0 -1
  657. package/lib/esm/widget/components/HorizontalTile.d.ts +0 -15
  658. package/lib/esm/widget/components/HorizontalTile.js +0 -17
  659. package/lib/esm/widget/components/HorizontalTile.js.map +0 -1
  660. package/lib/esm/widget/components/HorizontalTile.scss +0 -57
  661. package/lib/esm/widget/components/MappingAction.js +0 -83
  662. package/lib/esm/widget/components/MappingAction.js.map +0 -1
  663. package/lib/esm/widget/components/MappingImportWizardModal.js +0 -99
  664. package/lib/esm/widget/components/MappingImportWizardModal.js.map +0 -1
  665. package/lib/esm/widget/components/MappingViewActionGroup.js.map +0 -1
  666. package/lib/esm/widget/components/Mappings.d.ts +0 -13
  667. package/lib/esm/widget/components/Mappings.js +0 -22
  668. package/lib/esm/widget/components/Mappings.js.map +0 -1
  669. package/lib/esm/widget/components/MappingsView.d.ts +0 -39
  670. package/lib/esm/widget/components/MappingsView.js +0 -56
  671. package/lib/esm/widget/components/MappingsView.js.map +0 -1
  672. package/lib/esm/widget/components/PropertyAction.js +0 -76
  673. package/lib/esm/widget/components/PropertyAction.js.map +0 -1
  674. package/lib/esm/widget/components/PropertyMenu.js +0 -37
  675. package/lib/esm/widget/components/PropertyMenu.js.map +0 -1
  676. package/lib/esm/widget/components/PropertyMenuWithVisualization.js.map +0 -1
  677. package/lib/esm/widget/components/PropertyNameCell.js.map +0 -1
  678. package/lib/esm/widget/components/PropertyTable.js +0 -27
  679. package/lib/esm/widget/components/PropertyTable.js.map +0 -1
  680. package/lib/esm/widget/components/PropertyTableToolbar.js.map +0 -1
  681. package/lib/esm/widget/components/QueryBuilder.js.map +0 -1
  682. package/lib/esm/widget/components/QueryBuilderActionPanel.js.map +0 -1
  683. package/lib/esm/widget/components/QueryBuilderCustomUI.d.ts +0 -13
  684. package/lib/esm/widget/components/QueryBuilderCustomUI.js +0 -21
  685. package/lib/esm/widget/components/QueryBuilderCustomUI.js.map +0 -1
  686. package/lib/esm/widget/components/QueryBuilderStep.js.map +0 -1
  687. package/lib/esm/widget/components/SaveModal.js.map +0 -1
  688. package/lib/esm/widget/components/SelectIModel.js +0 -81
  689. package/lib/esm/widget/components/SelectIModel.js.map +0 -1
  690. package/lib/esm/widget/components/SelectITwin.js +0 -94
  691. package/lib/esm/widget/components/SelectITwin.js.map +0 -1
  692. package/lib/esm/widget/components/SelectMappings.d.ts +0 -16
  693. package/lib/esm/widget/components/SelectMappings.js +0 -67
  694. package/lib/esm/widget/components/SelectMappings.js.map +0 -1
  695. package/lib/esm/widget/components/SharedCalculatedPropertyForms.js.map +0 -1
  696. package/lib/esm/widget/components/SortableHorizontalTile.d.ts +0 -8
  697. package/lib/esm/widget/components/SortableHorizontalTile.js +0 -31
  698. package/lib/esm/widget/components/SortableHorizontalTile.js.map +0 -1
  699. package/lib/esm/widget/components/StatusIcon.js.map +0 -1
  700. package/lib/esm/widget/components/ToggleGroupVisibility.js.map +0 -1
  701. package/lib/esm/widget/components/WidgetHeader.js.map +0 -1
  702. package/lib/esm/widget/components/context/ExtractionClientContext.js.map +0 -1
  703. package/lib/esm/widget/components/context/GroupHilitedElementsContext.d.ts +0 -22
  704. package/lib/esm/widget/components/context/GroupHilitedElementsContext.js +0 -24
  705. package/lib/esm/widget/components/context/GroupHilitedElementsContext.js.map +0 -1
  706. package/lib/esm/widget/components/context/GroupingApiConfigContext.js.map +0 -1
  707. package/lib/esm/widget/components/context/GroupingMappingCustomUIContext.js.map +0 -1
  708. package/lib/esm/widget/components/context/IModelsClientContext.js.map +0 -1
  709. package/lib/esm/widget/components/context/ITwinsClientContext.js.map +0 -1
  710. package/lib/esm/widget/components/context/MappingClientContext.js.map +0 -1
  711. package/lib/esm/widget/components/context/PropertiesContext.js.map +0 -1
  712. package/lib/esm/widget/components/context/PropertyGridWrapperContext.d.ts +0 -13
  713. package/lib/esm/widget/components/context/PropertyGridWrapperContext.js.map +0 -1
  714. package/lib/esm/widget/components/customUI/DefaultGroupingUI.js.map +0 -1
  715. package/lib/esm/widget/components/customUI/GroupQueryBuilderCustomUI.js +0 -84
  716. package/lib/esm/widget/components/customUI/GroupQueryBuilderCustomUI.js.map +0 -1
  717. package/lib/esm/widget/components/customUI/GroupingMappingCustomUI.js.map +0 -1
  718. package/lib/esm/widget/components/customUI/ManualGroupingCustomUI.js +0 -25
  719. package/lib/esm/widget/components/customUI/ManualGroupingCustomUI.js.map +0 -1
  720. package/lib/esm/widget/components/customUI/SearchGroupingCustomUI.js +0 -91
  721. package/lib/esm/widget/components/customUI/SearchGroupingCustomUI.js.map +0 -1
  722. package/lib/esm/widget/components/groupsHelpers.d.ts +0 -10
  723. package/lib/esm/widget/components/groupsHelpers.js +0 -75
  724. package/lib/esm/widget/components/groupsHelpers.js.map +0 -1
  725. package/lib/esm/widget/components/hooks/useGroupsOperations.d.ts +0 -20
  726. package/lib/esm/widget/components/hooks/useGroupsOperations.js +0 -63
  727. package/lib/esm/widget/components/hooks/useGroupsOperations.js.map +0 -1
  728. package/lib/esm/widget/components/hooks/useMappingsOperations.d.ts +0 -35
  729. package/lib/esm/widget/components/hooks/useMappingsOperations.js +0 -116
  730. package/lib/esm/widget/components/hooks/useMappingsOperations.js.map +0 -1
  731. package/lib/esm/widget/components/utils.d.ts +0 -16
  732. package/lib/esm/widget/components/utils.js +0 -85
  733. package/lib/esm/widget/components/utils.js.map +0 -1
  734. package/lib/esm/widget/components/utils.scss +0 -18
  735. package/lib/esm/widget/components/viewerUtils.d.ts +0 -30
  736. package/lib/esm/widget/components/viewerUtils.js +0 -268
  737. package/lib/esm/widget/components/viewerUtils.js.map +0 -1
  738. package/lib/esm/widget/hooks/useFetchData.js +0 -37
  739. package/lib/esm/widget/hooks/useFetchData.js.map +0 -1
  740. package/lib/esm/widget/hooks/useFormulaValidation.d.ts +0 -6
  741. package/lib/esm/widget/hooks/useFormulaValidation.js +0 -25
  742. package/lib/esm/widget/hooks/useFormulaValidation.js.map +0 -1
  743. package/lib/esm/widget/hooks/useValidator.js.map +0 -1
  744. package/lib/esm/widget/hooks/useVisualization.js +0 -64
  745. package/lib/esm/widget/hooks/useVisualization.js.map +0 -1
  746. package/lib/esm/widget/utils.d.ts +0 -5
  747. package/lib/esm/widget/utils.js +0 -8
  748. package/lib/esm/widget/utils.js.map +0 -1
  749. /package/lib/cjs/{widget/components → WidgetShell}/GroupingMapping.scss +0 -0
  750. /package/lib/cjs/{widget/components → WidgetShell}/GroupingMappingContent.d.ts +0 -0
  751. /package/lib/cjs/{widget/components → WidgetShell}/GroupingMappingHeader.d.ts +0 -0
  752. /package/lib/cjs/{widget/components → WidgetShell/WidgetHeader}/WidgetHeader.d.ts +0 -0
  753. /package/lib/cjs/{widget/components → WidgetShell/WidgetHeader}/WidgetHeader.js +0 -0
  754. /package/lib/cjs/{widget/components → WidgetShell/WidgetHeader}/WidgetHeader.scss +0 -0
  755. /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupAction.d.ts +0 -0
  756. /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupAction.scss +0 -0
  757. /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupDetails.d.ts +0 -0
  758. /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupDetailsActionPanel.d.ts +0 -0
  759. /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupDetailsActionPanel.js +0 -0
  760. /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupDetailsStep.d.ts +0 -0
  761. /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupDetailsStep.js +0 -0
  762. /package/lib/cjs/{widget/components → components/Groups/Editing}/GroupDetailsStep.scss +0 -0
  763. /package/lib/cjs/{widget/components → components/Groups}/GroupColorLegend.d.ts +0 -0
  764. /package/lib/cjs/{widget/components → components/Groups}/GroupColorLegend.js +0 -0
  765. /package/lib/cjs/{widget/components → components/Groups}/GroupColorLegend.scss +0 -0
  766. /package/lib/cjs/{widget/components → components/Groups}/GroupMenuActions.scss +0 -0
  767. /package/lib/cjs/{widget/components → components/Groups}/GroupsAddButton.js +0 -0
  768. /package/lib/cjs/{widget/components → components/Groups}/GroupsAddButton.scss +0 -0
  769. /package/lib/cjs/{widget/components → components/Groups}/GroupsShowHideButtons.d.ts +0 -0
  770. /package/lib/cjs/{widget/components → components/Groups}/GroupsVisualization.d.ts +0 -0
  771. /package/lib/cjs/{widget/components → components/Groups}/GroupsVisualizationActions.d.ts +0 -0
  772. /package/lib/cjs/{widget/components → components/Groups}/GroupsVisualizationActions.scss +0 -0
  773. /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilder.d.ts +0 -0
  774. /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilder.js +0 -0
  775. /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilderActionPanel.d.ts +0 -0
  776. /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilderActionPanel.js +0 -0
  777. /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilderStep.d.ts +0 -0
  778. /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilderStep.js +0 -0
  779. /package/lib/cjs/{widget/components → components/Groups/QueryBuilder}/QueryBuilderStep.scss +0 -0
  780. /package/lib/cjs/{widget/components → components/Groups}/ToggleGroupVisibility.d.ts +0 -0
  781. /package/lib/cjs/{widget/components → components/Groups}/ToggleGroupVisibility.js +0 -0
  782. /package/lib/cjs/{widget/components → components/Groups}/ToggleGroupVisibility.scss +0 -0
  783. /package/lib/cjs/{widget → components/Groups}/hooks/useVisualization.d.ts +0 -0
  784. /package/lib/cjs/{widget/components → components/Mappings}/BlockingOverlay.d.ts +0 -0
  785. /package/lib/cjs/{widget/components → components/Mappings}/BlockingOverlay.scss +0 -0
  786. /package/lib/cjs/{widget/components → components/Mappings}/ConfirmMappingsImport.d.ts +0 -0
  787. /package/lib/cjs/{widget/components → components/Mappings}/ConfirmMappingsImport.scss +0 -0
  788. /package/lib/cjs/{widget/components → components/Mappings/Editing}/MappingAction.d.ts +0 -0
  789. /package/lib/cjs/{widget/components → components/Mappings/Editing}/MappingAction.scss +0 -0
  790. /package/lib/cjs/{widget/components → components/Mappings/Extraction}/ExtractionLogCustomFilter.d.ts +0 -0
  791. /package/lib/cjs/{widget/components → components/Mappings/Extraction}/ExtractionMessageModal.scss +0 -0
  792. /package/lib/cjs/{widget/components → components/Mappings/Extraction}/ExtractionStatusIcon.js +0 -0
  793. /package/lib/cjs/{widget/components → components/Mappings/Import}/MappingImportWizardModal.d.ts +0 -0
  794. /package/lib/cjs/{widget/components → components/Mappings/Import}/MappingImportWizardModal.scss +0 -0
  795. /package/lib/cjs/{widget/components → components/Mappings/Import}/SelectIModel.d.ts +0 -0
  796. /package/lib/cjs/{widget/components → components/Mappings/Import}/SelectIModel.scss +0 -0
  797. /package/lib/cjs/{widget/components → components/Mappings/Import}/SelectITwin.d.ts +0 -0
  798. /package/lib/cjs/{widget/components → components/Mappings/Import}/SelectITwin.scss +0 -0
  799. /package/lib/cjs/{widget/components → components/Mappings/Import}/SelectMapping.scss +0 -0
  800. /package/lib/cjs/{widget/components → components/Mappings}/MappingViewActionGroup.d.ts +0 -0
  801. /package/lib/cjs/{widget/components → components/Mappings}/MappingViewActionGroup.js +0 -0
  802. /package/lib/cjs/{widget/components → components/Mappings}/MappingsView.scss +0 -0
  803. /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyAction.d.ts +0 -0
  804. /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyAction.scss +0 -0
  805. /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyActionWithVisuals.d.ts +0 -0
  806. /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyActionWithVisuals.scss +0 -0
  807. /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyTable.d.ts +0 -0
  808. /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyTable.scss +0 -0
  809. /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/SharedCalculatedPropertyForms.d.ts +0 -0
  810. /package/lib/cjs/{widget/components → components/Properties/CalculatedProperties}/SharedCalculatedPropertyForms.js +0 -0
  811. /package/lib/cjs/{widget/components → components/Properties/CustomCalculations}/CustomCalculationAction.scss +0 -0
  812. /package/lib/cjs/{widget/components → components/Properties/CustomCalculations}/CustomCalculationTable.d.ts +0 -0
  813. /package/lib/cjs/{widget/components → components/Properties}/GroupColorToggle.d.ts +0 -0
  814. /package/lib/cjs/{widget/components → components/Properties}/GroupInformationPanel.d.ts +0 -0
  815. /package/lib/cjs/{widget/components → components/Properties}/GroupInformationPanel.js +0 -0
  816. /package/lib/cjs/{widget/components → components/Properties}/GroupInformationPanel.scss +0 -0
  817. /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/GroupPropertyAction.d.ts +0 -0
  818. /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/GroupPropertyAction.scss +0 -0
  819. /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/GroupPropertyTable.d.ts +0 -0
  820. /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/GroupPropertyUtils.d.ts +0 -0
  821. /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/GroupPropertyUtils.js +0 -0
  822. /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/SaveModal.d.ts +0 -0
  823. /package/lib/cjs/{widget/components → components/Properties/GroupProperties}/SaveModal.js +0 -0
  824. /package/lib/cjs/{widget/components → components/Properties}/PropertyAction.d.ts +0 -0
  825. /package/lib/cjs/{widget/components → components/Properties}/PropertyAction.scss +0 -0
  826. /package/lib/cjs/{widget/components → components/Properties}/PropertyMenu.d.ts +0 -0
  827. /package/lib/cjs/{widget/components → components/Properties}/PropertyMenu.scss +0 -0
  828. /package/lib/cjs/{widget/components → components/Properties}/PropertyMenuWithVisualization.d.ts +0 -0
  829. /package/lib/cjs/{widget/components → components/Properties}/PropertyMenuWithVisualization.js +0 -0
  830. /package/lib/cjs/{widget/components → components/Properties}/PropertyMenuWithVisualization.scss +0 -0
  831. /package/lib/cjs/{widget/components → components/Properties}/PropertyNameCell.d.ts +0 -0
  832. /package/lib/cjs/{widget/components → components/Properties}/PropertyNameCell.js +0 -0
  833. /package/lib/cjs/{widget/components → components/Properties}/PropertyTable.d.ts +0 -0
  834. /package/lib/cjs/{widget/components → components/Properties}/PropertyTable.scss +0 -0
  835. /package/lib/cjs/{widget/components → components/Properties}/PropertyTableToolbar.d.ts +0 -0
  836. /package/lib/cjs/{widget/components → components/Properties}/PropertyTableToolbar.js +0 -0
  837. /package/lib/cjs/{widget/components → components/Properties}/PropertyTableToolbar.scss +0 -0
  838. /package/lib/cjs/{widget → components/Properties}/hooks/useFetchData.d.ts +0 -0
  839. /package/lib/cjs/{widget → components/Properties}/hooks/useValidator.d.ts +0 -0
  840. /package/lib/cjs/{widget → components/Properties}/hooks/useValidator.js +0 -0
  841. /package/lib/cjs/{widget/components → components/SharedComponents}/ActionPanel.d.ts +0 -0
  842. /package/lib/cjs/{widget/components → components/SharedComponents}/ActionPanel.scss +0 -0
  843. /package/lib/cjs/{widget/components → components/SharedComponents}/DeleteModal.d.ts +0 -0
  844. /package/lib/cjs/{widget/components → components/SharedComponents}/DeleteModal.scss +0 -0
  845. /package/lib/cjs/{widget/components → components/SharedComponents}/StatusIcon.d.ts +0 -0
  846. /package/lib/cjs/{widget/components → components/SharedComponents}/StatusIcon.js +0 -0
  847. /package/lib/cjs/{widget/components → components/SharedComponents}/StatusIcon.scss +0 -0
  848. /package/lib/cjs/{widget/components → components}/context/ExtractionClientContext.d.ts +0 -0
  849. /package/lib/cjs/{widget/components → components}/context/ExtractionClientContext.js +0 -0
  850. /package/lib/cjs/{widget/components → components}/context/GroupingApiConfigContext.d.ts +0 -0
  851. /package/lib/cjs/{widget/components → components}/context/GroupingApiConfigContext.js +0 -0
  852. /package/lib/cjs/{widget/components → components}/context/GroupingMappingCustomUIContext.d.ts +0 -0
  853. /package/lib/cjs/{widget/components → components}/context/GroupingMappingCustomUIContext.js +0 -0
  854. /package/lib/cjs/{widget/components → components}/context/IModelsClientContext.d.ts +0 -0
  855. /package/lib/cjs/{widget/components → components}/context/IModelsClientContext.js +0 -0
  856. /package/lib/cjs/{widget/components → components}/context/ITwinsClientContext.d.ts +0 -0
  857. /package/lib/cjs/{widget/components → components}/context/ITwinsClientContext.js +0 -0
  858. /package/lib/cjs/{widget/components → components}/context/MappingClientContext.d.ts +0 -0
  859. /package/lib/cjs/{widget/components → components}/context/MappingClientContext.js +0 -0
  860. /package/lib/cjs/{widget/components → components}/context/PropertiesContext.d.ts +0 -0
  861. /package/lib/cjs/{widget/components → components}/context/PropertiesContext.js +0 -0
  862. /package/lib/cjs/{widget/components → components}/context/PropertyGridWrapperContext.js +0 -0
  863. /package/lib/cjs/{widget/components → components}/customUI/DefaultGroupingUI.d.ts +0 -0
  864. /package/lib/cjs/{widget/components → components}/customUI/DefaultGroupingUI.js +0 -0
  865. /package/lib/cjs/{widget/components → components}/customUI/GroupQueryBuilderCustomUI.d.ts +0 -0
  866. /package/lib/cjs/{widget/components → components}/customUI/GroupQueryBuilderCustomUI.scss +0 -0
  867. /package/lib/cjs/{widget/components → components}/customUI/GroupingMappingCustomUI.d.ts +0 -0
  868. /package/lib/cjs/{widget/components → components}/customUI/GroupingMappingCustomUI.js +0 -0
  869. /package/lib/cjs/{widget/components → components}/customUI/ManualGroupingCustomUI.d.ts +0 -0
  870. /package/lib/cjs/{widget/components → components}/customUI/ManualGroupingCustomUI.scss +0 -0
  871. /package/lib/cjs/{widget/components → components}/customUI/SearchGroupingCustomUI.d.ts +0 -0
  872. /package/lib/cjs/{widget/components → components}/customUI/SearchGroupingCustomUI.scss +0 -0
  873. /package/lib/esm/{widget/components → WidgetShell}/GroupingMapping.scss +0 -0
  874. /package/lib/esm/{widget/components → WidgetShell}/GroupingMappingContent.d.ts +0 -0
  875. /package/lib/esm/{widget/components → WidgetShell}/GroupingMappingHeader.d.ts +0 -0
  876. /package/lib/esm/{widget/components → WidgetShell/WidgetHeader}/WidgetHeader.d.ts +0 -0
  877. /package/lib/esm/{widget/components → WidgetShell/WidgetHeader}/WidgetHeader.js +0 -0
  878. /package/lib/esm/{widget/components → WidgetShell/WidgetHeader}/WidgetHeader.scss +0 -0
  879. /package/lib/esm/{widget/components → components/Groups/Editing}/GroupAction.d.ts +0 -0
  880. /package/lib/esm/{widget/components → components/Groups/Editing}/GroupAction.scss +0 -0
  881. /package/lib/esm/{widget/components → components/Groups/Editing}/GroupDetails.d.ts +0 -0
  882. /package/lib/esm/{widget/components → components/Groups/Editing}/GroupDetailsActionPanel.d.ts +0 -0
  883. /package/lib/esm/{widget/components → components/Groups/Editing}/GroupDetailsActionPanel.js +0 -0
  884. /package/lib/esm/{widget/components → components/Groups/Editing}/GroupDetailsStep.d.ts +0 -0
  885. /package/lib/esm/{widget/components → components/Groups/Editing}/GroupDetailsStep.js +0 -0
  886. /package/lib/esm/{widget/components → components/Groups/Editing}/GroupDetailsStep.scss +0 -0
  887. /package/lib/esm/{widget/components → components/Groups}/GroupColorLegend.d.ts +0 -0
  888. /package/lib/esm/{widget/components → components/Groups}/GroupColorLegend.js +0 -0
  889. /package/lib/esm/{widget/components → components/Groups}/GroupColorLegend.scss +0 -0
  890. /package/lib/esm/{widget/components → components/Groups}/GroupMenuActions.scss +0 -0
  891. /package/lib/esm/{widget/components → components/Groups}/GroupsAddButton.js +0 -0
  892. /package/lib/esm/{widget/components → components/Groups}/GroupsAddButton.scss +0 -0
  893. /package/lib/esm/{widget/components → components/Groups}/GroupsShowHideButtons.d.ts +0 -0
  894. /package/lib/esm/{widget/components → components/Groups}/GroupsVisualization.d.ts +0 -0
  895. /package/lib/esm/{widget/components → components/Groups}/GroupsVisualizationActions.d.ts +0 -0
  896. /package/lib/esm/{widget/components → components/Groups}/GroupsVisualizationActions.scss +0 -0
  897. /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilder.d.ts +0 -0
  898. /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilder.js +0 -0
  899. /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilderActionPanel.d.ts +0 -0
  900. /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilderActionPanel.js +0 -0
  901. /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilderStep.d.ts +0 -0
  902. /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilderStep.js +0 -0
  903. /package/lib/esm/{widget/components → components/Groups/QueryBuilder}/QueryBuilderStep.scss +0 -0
  904. /package/lib/esm/{widget/components → components/Groups}/ToggleGroupVisibility.d.ts +0 -0
  905. /package/lib/esm/{widget/components → components/Groups}/ToggleGroupVisibility.js +0 -0
  906. /package/lib/esm/{widget/components → components/Groups}/ToggleGroupVisibility.scss +0 -0
  907. /package/lib/esm/{widget → components/Groups}/hooks/useVisualization.d.ts +0 -0
  908. /package/lib/esm/{widget/components → components/Mappings}/BlockingOverlay.d.ts +0 -0
  909. /package/lib/esm/{widget/components → components/Mappings}/BlockingOverlay.scss +0 -0
  910. /package/lib/esm/{widget/components → components/Mappings}/ConfirmMappingsImport.d.ts +0 -0
  911. /package/lib/esm/{widget/components → components/Mappings}/ConfirmMappingsImport.scss +0 -0
  912. /package/lib/esm/{widget/components → components/Mappings/Editing}/MappingAction.d.ts +0 -0
  913. /package/lib/esm/{widget/components → components/Mappings/Editing}/MappingAction.scss +0 -0
  914. /package/lib/esm/{widget/components → components/Mappings/Extraction}/ExtractionLogCustomFilter.d.ts +0 -0
  915. /package/lib/esm/{widget/components → components/Mappings/Extraction}/ExtractionMessageModal.scss +0 -0
  916. /package/lib/esm/{widget/components → components/Mappings/Extraction}/ExtractionStatusIcon.js +0 -0
  917. /package/lib/esm/{widget/components → components/Mappings/Import}/MappingImportWizardModal.d.ts +0 -0
  918. /package/lib/esm/{widget/components → components/Mappings/Import}/MappingImportWizardModal.scss +0 -0
  919. /package/lib/esm/{widget/components → components/Mappings/Import}/SelectIModel.d.ts +0 -0
  920. /package/lib/esm/{widget/components → components/Mappings/Import}/SelectIModel.scss +0 -0
  921. /package/lib/esm/{widget/components → components/Mappings/Import}/SelectITwin.d.ts +0 -0
  922. /package/lib/esm/{widget/components → components/Mappings/Import}/SelectITwin.scss +0 -0
  923. /package/lib/esm/{widget/components → components/Mappings/Import}/SelectMapping.scss +0 -0
  924. /package/lib/esm/{widget/components → components/Mappings}/MappingViewActionGroup.d.ts +0 -0
  925. /package/lib/esm/{widget/components → components/Mappings}/MappingViewActionGroup.js +0 -0
  926. /package/lib/esm/{widget/components → components/Mappings}/MappingsView.scss +0 -0
  927. /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyAction.d.ts +0 -0
  928. /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyAction.scss +0 -0
  929. /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyActionWithVisuals.d.ts +0 -0
  930. /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyActionWithVisuals.scss +0 -0
  931. /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyTable.d.ts +0 -0
  932. /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/CalculatedPropertyTable.scss +0 -0
  933. /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/SharedCalculatedPropertyForms.d.ts +0 -0
  934. /package/lib/esm/{widget/components → components/Properties/CalculatedProperties}/SharedCalculatedPropertyForms.js +0 -0
  935. /package/lib/esm/{widget/components → components/Properties/CustomCalculations}/CustomCalculationAction.scss +0 -0
  936. /package/lib/esm/{widget/components → components/Properties/CustomCalculations}/CustomCalculationTable.d.ts +0 -0
  937. /package/lib/esm/{widget/components → components/Properties}/GroupColorToggle.d.ts +0 -0
  938. /package/lib/esm/{widget/components → components/Properties}/GroupInformationPanel.d.ts +0 -0
  939. /package/lib/esm/{widget/components → components/Properties}/GroupInformationPanel.js +0 -0
  940. /package/lib/esm/{widget/components → components/Properties}/GroupInformationPanel.scss +0 -0
  941. /package/lib/esm/{widget/components → components/Properties/GroupProperties}/GroupPropertyAction.d.ts +0 -0
  942. /package/lib/esm/{widget/components → components/Properties/GroupProperties}/GroupPropertyAction.scss +0 -0
  943. /package/lib/esm/{widget/components → components/Properties/GroupProperties}/GroupPropertyTable.d.ts +0 -0
  944. /package/lib/esm/{widget/components → components/Properties/GroupProperties}/GroupPropertyUtils.d.ts +0 -0
  945. /package/lib/esm/{widget/components → components/Properties/GroupProperties}/GroupPropertyUtils.js +0 -0
  946. /package/lib/esm/{widget/components → components/Properties/GroupProperties}/SaveModal.d.ts +0 -0
  947. /package/lib/esm/{widget/components → components/Properties/GroupProperties}/SaveModal.js +0 -0
  948. /package/lib/esm/{widget/components → components/Properties}/PropertyAction.d.ts +0 -0
  949. /package/lib/esm/{widget/components → components/Properties}/PropertyAction.scss +0 -0
  950. /package/lib/esm/{widget/components → components/Properties}/PropertyMenu.d.ts +0 -0
  951. /package/lib/esm/{widget/components → components/Properties}/PropertyMenu.scss +0 -0
  952. /package/lib/esm/{widget/components → components/Properties}/PropertyMenuWithVisualization.d.ts +0 -0
  953. /package/lib/esm/{widget/components → components/Properties}/PropertyMenuWithVisualization.js +0 -0
  954. /package/lib/esm/{widget/components → components/Properties}/PropertyMenuWithVisualization.scss +0 -0
  955. /package/lib/esm/{widget/components → components/Properties}/PropertyNameCell.d.ts +0 -0
  956. /package/lib/esm/{widget/components → components/Properties}/PropertyNameCell.js +0 -0
  957. /package/lib/esm/{widget/components → components/Properties}/PropertyTable.d.ts +0 -0
  958. /package/lib/esm/{widget/components → components/Properties}/PropertyTable.scss +0 -0
  959. /package/lib/esm/{widget/components → components/Properties}/PropertyTableToolbar.d.ts +0 -0
  960. /package/lib/esm/{widget/components → components/Properties}/PropertyTableToolbar.js +0 -0
  961. /package/lib/esm/{widget/components → components/Properties}/PropertyTableToolbar.scss +0 -0
  962. /package/lib/esm/{widget → components/Properties}/hooks/useFetchData.d.ts +0 -0
  963. /package/lib/esm/{widget → components/Properties}/hooks/useValidator.d.ts +0 -0
  964. /package/lib/esm/{widget → components/Properties}/hooks/useValidator.js +0 -0
  965. /package/lib/esm/{widget/components → components/SharedComponents}/ActionPanel.d.ts +0 -0
  966. /package/lib/esm/{widget/components → components/SharedComponents}/ActionPanel.scss +0 -0
  967. /package/lib/esm/{widget/components → components/SharedComponents}/DeleteModal.d.ts +0 -0
  968. /package/lib/esm/{widget/components → components/SharedComponents}/DeleteModal.scss +0 -0
  969. /package/lib/esm/{widget/components → components/SharedComponents}/StatusIcon.d.ts +0 -0
  970. /package/lib/esm/{widget/components → components/SharedComponents}/StatusIcon.js +0 -0
  971. /package/lib/esm/{widget/components → components/SharedComponents}/StatusIcon.scss +0 -0
  972. /package/lib/esm/{widget/components → components}/context/ExtractionClientContext.d.ts +0 -0
  973. /package/lib/esm/{widget/components → components}/context/ExtractionClientContext.js +0 -0
  974. /package/lib/esm/{widget/components → components}/context/GroupingApiConfigContext.d.ts +0 -0
  975. /package/lib/esm/{widget/components → components}/context/GroupingApiConfigContext.js +0 -0
  976. /package/lib/esm/{widget/components → components}/context/GroupingMappingCustomUIContext.d.ts +0 -0
  977. /package/lib/esm/{widget/components → components}/context/GroupingMappingCustomUIContext.js +0 -0
  978. /package/lib/esm/{widget/components → components}/context/IModelsClientContext.d.ts +0 -0
  979. /package/lib/esm/{widget/components → components}/context/IModelsClientContext.js +0 -0
  980. /package/lib/esm/{widget/components → components}/context/ITwinsClientContext.d.ts +0 -0
  981. /package/lib/esm/{widget/components → components}/context/ITwinsClientContext.js +0 -0
  982. /package/lib/esm/{widget/components → components}/context/MappingClientContext.d.ts +0 -0
  983. /package/lib/esm/{widget/components → components}/context/MappingClientContext.js +0 -0
  984. /package/lib/esm/{widget/components → components}/context/PropertiesContext.d.ts +0 -0
  985. /package/lib/esm/{widget/components → components}/context/PropertiesContext.js +0 -0
  986. /package/lib/esm/{widget/components → components}/context/PropertyGridWrapperContext.js +0 -0
  987. /package/lib/esm/{widget/components → components}/customUI/DefaultGroupingUI.d.ts +0 -0
  988. /package/lib/esm/{widget/components → components}/customUI/DefaultGroupingUI.js +0 -0
  989. /package/lib/esm/{widget/components → components}/customUI/GroupQueryBuilderCustomUI.d.ts +0 -0
  990. /package/lib/esm/{widget/components → components}/customUI/GroupQueryBuilderCustomUI.scss +0 -0
  991. /package/lib/esm/{widget/components → components}/customUI/GroupingMappingCustomUI.d.ts +0 -0
  992. /package/lib/esm/{widget/components → components}/customUI/GroupingMappingCustomUI.js +0 -0
  993. /package/lib/esm/{widget/components → components}/customUI/ManualGroupingCustomUI.d.ts +0 -0
  994. /package/lib/esm/{widget/components → components}/customUI/ManualGroupingCustomUI.scss +0 -0
  995. /package/lib/esm/{widget/components → components}/customUI/SearchGroupingCustomUI.d.ts +0 -0
  996. /package/lib/esm/{widget/components → components}/customUI/SearchGroupingCustomUI.scss +0 -0
@@ -1,98 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.SearchGroupingCustomUI = void 0;
7
- /*---------------------------------------------------------------------------------------------
8
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
9
- * See LICENSE.md in the project root for license terms and full copyright notice.
10
- *--------------------------------------------------------------------------------------------*/
11
- const react_1 = __importDefault(require("react"));
12
- const itwinui_react_1 = require("@itwin/itwinui-react");
13
- const utils_1 = require("../utils");
14
- require("./SearchGroupingCustomUI.scss");
15
- const SearchGroupingCustomUI = ({ updateQuery, isUpdating, resetView, }) => {
16
- const [searchInput, setSearchInput] = react_1.default.useState("");
17
- const isWrappedInQuotes = (text) => {
18
- return text.startsWith(`"`) && text.endsWith(`"`);
19
- };
20
- const needsAndOperator = (token, index, searchQuery) => isWrappedInQuotes(token) ||
21
- (index === 1 && isWrappedInQuotes(searchQuery[0]));
22
- const generateSearchQuery = (searchQuery) => {
23
- if (searchQuery.length === 0) {
24
- updateQuery("");
25
- return;
26
- }
27
- let generatedSearchQuery = `SELECT be.ECInstanceId, be.ECClassId FROM bis.geometricelement3d be `;
28
- generatedSearchQuery += `LEFT JOIN bis.SpatialCategory cat ON be.Category.Id = cat.ECInstanceID LEFT JOIN ecdbmeta.ECClassDef ecc ON be.ECClassId = ecc.ECInstanceId `;
29
- generatedSearchQuery += `LEFT JOIN bis.PhysicalType pt ON be.TypeDefinition.Id = pt.ECInstanceID`;
30
- generatedSearchQuery += ` WHERE `;
31
- generatedSearchQuery += `((${searchQuery
32
- .map((token, index) => `${index === 0
33
- ? ""
34
- : needsAndOperator(token, index, searchQuery)
35
- ? "AND"
36
- : "OR"} be.codevalue LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
37
- .join(" ")}) OR (${searchQuery
38
- .map((token, index) => `${index === 0
39
- ? ""
40
- : needsAndOperator(token, index, searchQuery)
41
- ? "AND"
42
- : "OR"} be.userlabel LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
43
- .join(" ")})) OR ((${searchQuery
44
- .map((token, index) => `${index === 0
45
- ? ""
46
- : needsAndOperator(token, index, searchQuery)
47
- ? "AND"
48
- : "OR"} cat.codevalue LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
49
- .join(" ")}) OR (${searchQuery
50
- .map((token, index) => `${index === 0
51
- ? ""
52
- : needsAndOperator(token, index, searchQuery)
53
- ? "AND"
54
- : "OR"} cat.userlabel LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
55
- .join(" ")})) OR (${searchQuery
56
- .map((token, index) => `${index === 0
57
- ? ""
58
- : needsAndOperator(token, index, searchQuery)
59
- ? "AND"
60
- : "OR"} ecc.name LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
61
- .join(" ")})`;
62
- // Physical Types
63
- generatedSearchQuery += ` OR ((${searchQuery
64
- .map((token, index) => `${index === 0
65
- ? ""
66
- : needsAndOperator(token, index, searchQuery)
67
- ? "AND"
68
- : "OR"} pt.codevalue LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
69
- .join(" ")}) OR (${searchQuery
70
- .map((token, index) => `${index === 0
71
- ? ""
72
- : needsAndOperator(token, index, searchQuery)
73
- ? "AND"
74
- : "OR"} pt.userlabel LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
75
- .join(" ")})) `;
76
- updateQuery(generatedSearchQuery);
77
- };
78
- return (react_1.default.createElement("div", { className: 'gmw-search-form' },
79
- react_1.default.createElement(itwinui_react_1.Alert, { type: 'informational' }, "Generate a query by keywords. Keywords wrapped in double quotes will be considered a required criteria."),
80
- react_1.default.createElement(itwinui_react_1.LabeledTextarea, { label: 'Query Keywords', required: true, value: searchInput, onChange: (event) => setSearchInput(event.target.value), disabled: isUpdating, placeholder: `E.g. "red" chair` }),
81
- react_1.default.createElement("div", { className: 'gmw-search-actions' },
82
- isUpdating && react_1.default.createElement(utils_1.LoadingSpinner, null),
83
- react_1.default.createElement(itwinui_react_1.Button, { disabled: isUpdating, onClick: () => generateSearchQuery(searchInput
84
- ? searchInput
85
- .replace(/(\r\n|\n|\r)/gm, "")
86
- .trim()
87
- .split(" ")
88
- : []) }, "Apply"),
89
- react_1.default.createElement(itwinui_react_1.Button, { disabled: isUpdating, onClick: async () => {
90
- updateQuery("");
91
- setSearchInput("");
92
- if (resetView) {
93
- await resetView();
94
- }
95
- } }, "Clear"))));
96
- };
97
- exports.SearchGroupingCustomUI = SearchGroupingCustomUI;
98
- //# sourceMappingURL=SearchGroupingCustomUI.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SearchGroupingCustomUI.js","sourceRoot":"","sources":["../../../../../src/widget/components/customUI/SearchGroupingCustomUI.tsx"],"names":[],"mappings":";;;;;;AAAA;;;+FAG+F;AAC/F,kDAA0B;AAC1B,wDAAsE;AAEtE,oCAA0C;AAC1C,yCAAuC;AAEhC,MAAM,sBAAsB,GAAG,CAAC,EACrC,WAAW,EACX,UAAU,EACV,SAAS,GACa,EAAE,EAAE;IAC1B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACzD,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;QACzC,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC,CAAC;IAEF,MAAM,gBAAgB,GAAG,CACvB,KAAa,EACb,KAAa,EACb,WAAqB,EACrB,EAAE,CACF,iBAAiB,CAAC,KAAK,CAAC;QACxB,CAAC,KAAK,KAAK,CAAC,IAAI,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAErD,MAAM,mBAAmB,GAAG,CAAC,WAAqB,EAAE,EAAE;QACpD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,WAAW,CAAC,EAAE,CAAC,CAAC;YAChB,OAAO;SACR;QAED,IAAI,oBAAoB,GAAG,sEAAsE,CAAC;QAClG,oBAAoB,IAAI,8IAA8I,CAAC;QACvK,oBAAoB,IAAI,yEAAyE,CAAC;QAClG,oBAAoB,I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,EAAE,UAAU,EACpB,OAAO,EAAE,KAAK,IAAI,EAAE;oBAClB,WAAW,CAAC,EAAE,CAAC,CAAC;oBAChB,cAAc,CAAC,EAAE,CAAC,CAAC;oBACnB,IAAI,SAAS,EAAE;wBACb,MAAM,SAAS,EAAE,CAAC;qBACnB;gBACH,CAAC,YAGM,CACL,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AA9JW,QAAA,sBAAsB,0BA8JjC","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 from \"react\";\nimport { Alert, Button, LabeledTextarea } from \"@itwin/itwinui-react\";\nimport type { GroupingCustomUIProps } from \"./GroupingMappingCustomUI\";\nimport { LoadingSpinner } from \"../utils\";\nimport \"./SearchGroupingCustomUI.scss\";\n\nexport const SearchGroupingCustomUI = ({\n updateQuery,\n isUpdating,\n resetView,\n}: GroupingCustomUIProps) => {\n const [searchInput, setSearchInput] = React.useState(\"\");\n const isWrappedInQuotes = (text: string) => {\n return text.startsWith(`\"`) && text.endsWith(`\"`);\n };\n\n const needsAndOperator = (\n token: string,\n index: number,\n searchQuery: string[],\n ) =>\n isWrappedInQuotes(token) ||\n (index === 1 && isWrappedInQuotes(searchQuery[0]));\n\n const generateSearchQuery = (searchQuery: string[]) => {\n if (searchQuery.length === 0) {\n updateQuery(\"\");\n return;\n }\n\n let generatedSearchQuery = `SELECT be.ECInstanceId, be.ECClassId FROM bis.geometricelement3d be `;\n generatedSearchQuery += `LEFT JOIN bis.SpatialCategory cat ON be.Category.Id = cat.ECInstanceID LEFT JOIN ecdbmeta.ECClassDef ecc ON be.ECClassId = ecc.ECInstanceId `;\n generatedSearchQuery += `LEFT JOIN bis.PhysicalType pt ON be.TypeDefinition.Id = pt.ECInstanceID`;\n generatedSearchQuery += ` WHERE `;\n generatedSearchQuery += `((${searchQuery\n .map(\n (token, index) =>\n `${index === 0\n ? \"\"\n : needsAndOperator(token, index, searchQuery)\n ? \"AND\"\n : \"OR\"\n } be.codevalue LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")}) OR (${searchQuery\n .map(\n (token, index) =>\n `${index === 0\n ? \"\"\n : needsAndOperator(token, index, searchQuery)\n ? \"AND\"\n : \"OR\"\n } be.userlabel LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")})) OR ((${searchQuery\n .map(\n (token, index) =>\n `${index === 0\n ? \"\"\n : needsAndOperator(token, index, searchQuery)\n ? \"AND\"\n : \"OR\"\n } cat.codevalue LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")}) OR (${searchQuery\n .map(\n (token, index) =>\n `${index === 0\n ? \"\"\n : needsAndOperator(token, index, searchQuery)\n ? \"AND\"\n : \"OR\"\n } cat.userlabel LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")})) OR (${searchQuery\n .map(\n (token, index) =>\n `${index === 0\n ? \"\"\n : needsAndOperator(token, index, searchQuery)\n ? \"AND\"\n : \"OR\"\n } ecc.name LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")})`;\n // Physical Types\n generatedSearchQuery += ` OR ((${searchQuery\n .map(\n (token, index) =>\n `${index === 0\n ? \"\"\n : needsAndOperator(token, index, searchQuery)\n ? \"AND\"\n : \"OR\"\n } pt.codevalue LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")}) OR (${searchQuery\n .map(\n (token, index) =>\n `${index === 0\n ? \"\"\n : needsAndOperator(token, index, searchQuery)\n ? \"AND\"\n : \"OR\"\n } pt.userlabel LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token\n }%'`,\n )\n .join(\" \")})) `;\n\n updateQuery(generatedSearchQuery);\n };\n\n return (\n <div className='gmw-search-form'>\n <Alert type='informational'>\n Generate a query by keywords. Keywords wrapped in double quotes will be\n considered a required criteria.\n </Alert>\n <LabeledTextarea\n label='Query Keywords'\n required\n value={searchInput}\n onChange={(event) => setSearchInput(event.target.value)}\n disabled={isUpdating}\n placeholder={`E.g. \"red\" chair`}\n />\n <div className='gmw-search-actions'>\n {isUpdating && <LoadingSpinner />}\n <Button\n disabled={isUpdating}\n onClick={() =>\n generateSearchQuery(\n searchInput\n ? searchInput\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .trim()\n .split(\" \")\n : [],\n )\n }\n >\n Apply\n </Button>\n <Button\n disabled={isUpdating}\n onClick={async () => {\n updateQuery(\"\");\n setSearchInput(\"\");\n if (resetView) {\n await resetView();\n }\n }}\n >\n Clear\n </Button>\n </div>\n </div>\n );\n};\n\n"]}
@@ -1,10 +0,0 @@
1
- import type { IModelConnection } from "@itwin/core-frontend";
2
- import type { Group } from "@itwin/insights-client";
3
- import type { QueryCacheItem } from "./context/GroupHilitedElementsContext";
4
- export declare const getGroupColor: (index: number) => string;
5
- export declare const getHiliteIdsFromGroups: (iModelConnection: IModelConnection, groups: Group[], hilitedElementsQueryCache: React.MutableRefObject<Map<string, QueryCacheItem>>) => Promise<string[]>;
6
- export declare const hideGroups: (iModelConnection: IModelConnection, viewGroups: Group[], hilitedElementsQueryCache: React.MutableRefObject<Map<string, QueryCacheItem>>) => Promise<void>;
7
- export declare const hideGroup: (iModelConnection: IModelConnection, viewGroup: Group, hilitedElementsQueryCache: React.MutableRefObject<Map<string, QueryCacheItem>>) => Promise<void>;
8
- export declare const visualizeGroupColors: (iModelConnection: IModelConnection, groups: Group[], hiddenGroupsIds: Set<string>, hilitedElementsQueryCache: React.MutableRefObject<Map<string, QueryCacheItem>>, setNumberOfVisualizedGroups: (numberOfVisualizedGroups: number | ((numberOfVisualizedGroups: number) => number)) => void, doEmphasizeElements?: boolean) => Promise<void>;
9
- export declare const getHiliteIdsAndKeysetFromGroup: (iModelConnection: IModelConnection, group: Group, hilitedElementsQueryCache: React.MutableRefObject<Map<string, QueryCacheItem>>) => Promise<QueryCacheItem>;
10
- //# sourceMappingURL=groupsHelpers.d.ts.map
@@ -1,84 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getHiliteIdsAndKeysetFromGroup = exports.visualizeGroupColors = exports.hideGroup = exports.hideGroups = exports.getHiliteIdsFromGroups = exports.getGroupColor = void 0;
4
- /*---------------------------------------------------------------------------------------------
5
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
- * See LICENSE.md in the project root for license terms and full copyright notice.
7
- *--------------------------------------------------------------------------------------------*/
8
- const core_common_1 = require("@itwin/core-common");
9
- const itwinui_react_1 = require("@itwin/itwinui-react");
10
- const presentation_common_1 = require("@itwin/presentation-common");
11
- const viewerUtils_1 = require("./viewerUtils");
12
- const goldenAngle = 180 * (3 - Math.sqrt(5));
13
- const getGroupColor = function (index) {
14
- return `hsl(${index * goldenAngle + 60}, 100%, 50%)`;
15
- };
16
- exports.getGroupColor = getGroupColor;
17
- const getHiliteIdsFromGroups = async (iModelConnection, groups, hilitedElementsQueryCache) => {
18
- const distinctQueries = new Set();
19
- const promises = [];
20
- for (const group of groups) {
21
- if (!distinctQueries.has(group.query)) {
22
- distinctQueries.add(group.query);
23
- promises.push((0, exports.getHiliteIdsAndKeysetFromGroup)(iModelConnection, group, hilitedElementsQueryCache));
24
- }
25
- }
26
- const results = await Promise.all(promises);
27
- const allIds = results.flatMap((result) => result.ids);
28
- return allIds;
29
- };
30
- exports.getHiliteIdsFromGroups = getHiliteIdsFromGroups;
31
- const hideGroups = async (iModelConnection, viewGroups, hilitedElementsQueryCache) => {
32
- const distinctQueries = new Set();
33
- const promises = [];
34
- for (const viewGroup of viewGroups) {
35
- if (!distinctQueries.has(viewGroup.query)) {
36
- distinctQueries.add(viewGroup.query);
37
- promises.push((0, exports.hideGroup)(iModelConnection, viewGroup, hilitedElementsQueryCache));
38
- }
39
- }
40
- await Promise.all(promises);
41
- };
42
- exports.hideGroups = hideGroups;
43
- const hideGroup = async (iModelConnection, viewGroup, hilitedElementsQueryCache) => {
44
- const result = await (0, exports.getHiliteIdsAndKeysetFromGroup)(iModelConnection, viewGroup, hilitedElementsQueryCache);
45
- (0, viewerUtils_1.hideElements)(result.ids);
46
- };
47
- exports.hideGroup = hideGroup;
48
- const processGroupVisualization = async (iModelConnection, group, hiddenGroupsIds, hilitedElementsQueryCache, doEmphasizeElements, groupColor, setNumberOfVisualizedGroups) => {
49
- const result = await (0, exports.getHiliteIdsAndKeysetFromGroup)(iModelConnection, group, hilitedElementsQueryCache);
50
- const hilitedIds = result.ids;
51
- (0, viewerUtils_1.overrideElements)(hilitedIds, groupColor, core_common_1.FeatureOverrideType.ColorAndAlpha);
52
- setNumberOfVisualizedGroups((numberOfVisualizedGroups) => numberOfVisualizedGroups + 1);
53
- doEmphasizeElements && (0, viewerUtils_1.emphasizeElements)(hilitedIds, undefined);
54
- return hiddenGroupsIds.has(group.id) ? [] : hilitedIds;
55
- };
56
- const visualizeGroupColors = async (iModelConnection, groups, hiddenGroupsIds, hilitedElementsQueryCache, setNumberOfVisualizedGroups, doEmphasizeElements = true) => {
57
- (0, viewerUtils_1.clearEmphasizedOverriddenElements)();
58
- const allIdsPromises = groups.map(async (group, index) => processGroupVisualization(iModelConnection, group, hiddenGroupsIds, hilitedElementsQueryCache, doEmphasizeElements, (0, exports.getGroupColor)(index), setNumberOfVisualizedGroups));
59
- const allIdsArrays = await Promise.all(allIdsPromises);
60
- const allIds = allIdsArrays.flat();
61
- await (0, viewerUtils_1.zoomToElements)(allIds);
62
- };
63
- exports.visualizeGroupColors = visualizeGroupColors;
64
- const getHiliteIdsAndKeysetFromGroup = async (iModelConnection, group, hilitedElementsQueryCache) => {
65
- const query = group.query;
66
- if (hilitedElementsQueryCache.current.has(query)) {
67
- return hilitedElementsQueryCache.current.get(query) ?? ({ keySet: new presentation_common_1.KeySet(), ids: [] });
68
- }
69
- try {
70
- const queryRowCount = await iModelConnection.queryRowCount(query);
71
- if (queryRowCount === 0) {
72
- itwinui_react_1.toaster.warning(`${group.groupName}'s query is valid but produced no results.`);
73
- }
74
- const result = await (0, viewerUtils_1.getHiliteIds)(query, iModelConnection);
75
- hilitedElementsQueryCache.current.set(query, result);
76
- return result;
77
- }
78
- catch {
79
- itwinui_react_1.toaster.negative(`Query could not be resolved.`);
80
- return ({ keySet: new presentation_common_1.KeySet(), ids: [] });
81
- }
82
- };
83
- exports.getHiliteIdsAndKeysetFromGroup = getHiliteIdsAndKeysetFromGroup;
84
- //# sourceMappingURL=groupsHelpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"groupsHelpers.js","sourceRoot":"","sources":["../../../../src/widget/components/groupsHelpers.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,oDAAyD;AAGzD,wDAA+C;AAC/C,oEAAoD;AAEpD,+CAAmJ;AAEnJ,MAAM,WAAW,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAEtC,MAAM,aAAa,GAAG,UAAU,KAAa;IAClD,OAAO,OAAO,KAAK,GAAG,WAAW,GAAG,EAAE,cAAc,CAAC;AACvD,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB;AAEK,MAAM,sBAAsB,GAAG,KAAK,EACzC,gBAAkC,EAClC,MAAe,EACf,yBAA8E,EAC9E,EAAE;IACF,MAAM,eAAe,GAAG,IAAI,GAAG,EAAU,CAAC;IAC1C,MAAM,QAAQ,GAAiC,EAAE,CAAC;IAClD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;QAC1B,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;YACrC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACjC,QAAQ,CAAC,IAAI,CAAC,IAAA,sC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BA0B/B;AAEK,MAAM,8BAA8B,GAAG,KAAK,EACjD,gBAAkC,EAClC,KAAY,EACZ,yBAA8E,EAC9E,EAAE;IACF,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC1B,IAAI,yBAAyB,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QAChD,OAAO,yBAAyB,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,4BAAM,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;KAC5F;IACD,IAAI;QACF,MAAM,aAAa,GAAG,MAAM,gBAAgB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAClE,IAAI,aAAa,KAAK,CAAC,EAAE;YACvB,uBAAO,CAAC,OAAO,CACb,GAAG,KAAK,CAAC,SAAS,4CAA4C,CAC/D,CAAC;SACH;QACD,MAAM,MAAM,GAAG,MAAM,IAAA,0BAAY,EAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;QAC3D,yBAAyB,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrD,OAAO,MAAM,CAAC;KACf;IAAC,MAAM;QACN,uBAAO,CAAC,QAAQ,CACd,8BAA8B,CAC/B,CAAC;QACF,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,4BAAM,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;KAC5C;AAEH,CAAC,CAAC;AA1BW,QAAA,8BAA8B,kCA0BzC","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 { FeatureOverrideType } from \"@itwin/core-common\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport type { Group } from \"@itwin/insights-client\";\nimport { toaster } from \"@itwin/itwinui-react\";\nimport { KeySet } from \"@itwin/presentation-common\";\nimport type { QueryCacheItem } from \"./context/GroupHilitedElementsContext\";\nimport { clearEmphasizedOverriddenElements, emphasizeElements, getHiliteIds, hideElements, overrideElements, zoomToElements } from \"./viewerUtils\";\n\nconst goldenAngle = 180 * (3 - Math.sqrt(5));\n\nexport const getGroupColor = function (index: number) {\n return `hsl(${index * goldenAngle + 60}, 100%, 50%)`;\n};\n\nexport const getHiliteIdsFromGroups = async (\n iModelConnection: IModelConnection,\n groups: Group[],\n hilitedElementsQueryCache: React.MutableRefObject<Map<string, QueryCacheItem>>\n) => {\n const distinctQueries = new Set<string>();\n const promises: Promise<{ ids: string[] }>[] = [];\n for (const group of groups) {\n if (!distinctQueries.has(group.query)) {\n distinctQueries.add(group.query);\n promises.push(getHiliteIdsAndKeysetFromGroup(iModelConnection, group, hilitedElementsQueryCache));\n }\n }\n const results = await Promise.all(promises);\n const allIds = results.flatMap((result) => result.ids);\n return allIds;\n};\n\nexport const hideGroups = async (\n iModelConnection: IModelConnection,\n viewGroups: Group[],\n hilitedElementsQueryCache: React.MutableRefObject<Map<string, QueryCacheItem>>\n) => {\n const distinctQueries = new Set<string>();\n const promises: Promise<void>[] = [];\n\n for (const viewGroup of viewGroups) {\n if (!distinctQueries.has(viewGroup.query)) {\n distinctQueries.add(viewGroup.query);\n promises.push(hideGroup(iModelConnection, viewGroup, hilitedElementsQueryCache));\n }\n }\n await Promise.all(promises);\n};\n\nexport const hideGroup = async (\n iModelConnection: IModelConnection,\n viewGroup: Group,\n hilitedElementsQueryCache: React.MutableRefObject<Map<string, QueryCacheItem>>\n) => {\n const result = await getHiliteIdsAndKeysetFromGroup(iModelConnection, viewGroup, hilitedElementsQueryCache);\n hideElements(result.ids);\n};\n\nconst processGroupVisualization = async (\n iModelConnection: IModelConnection,\n group: Group,\n hiddenGroupsIds: Set<string>,\n hilitedElementsQueryCache: React.MutableRefObject<Map<string, QueryCacheItem>>,\n doEmphasizeElements: boolean,\n groupColor: string,\n setNumberOfVisualizedGroups: (numberOfVisualizedGroups: number | ((numberOfVisualizedGroups: number) => number)) => void,\n) => {\n const result = await getHiliteIdsAndKeysetFromGroup(iModelConnection, group, hilitedElementsQueryCache);\n const hilitedIds = result.ids;\n overrideElements(hilitedIds, groupColor, FeatureOverrideType.ColorAndAlpha);\n setNumberOfVisualizedGroups((numberOfVisualizedGroups) => numberOfVisualizedGroups + 1);\n\n doEmphasizeElements && emphasizeElements(hilitedIds, undefined);\n\n return hiddenGroupsIds.has(group.id) ? [] : hilitedIds;\n};\n\nexport const visualizeGroupColors = async (\n iModelConnection: IModelConnection,\n groups: Group[],\n hiddenGroupsIds: Set<string>,\n hilitedElementsQueryCache: React.MutableRefObject<Map<string, QueryCacheItem>>,\n setNumberOfVisualizedGroups: (numberOfVisualizedGroups: number | ((numberOfVisualizedGroups: number) => number)) => void,\n doEmphasizeElements: boolean = true,\n) => {\n clearEmphasizedOverriddenElements();\n\n const allIdsPromises = groups.map(async (group, index) =>\n processGroupVisualization(\n iModelConnection,\n group,\n hiddenGroupsIds,\n hilitedElementsQueryCache,\n doEmphasizeElements,\n getGroupColor(index),\n setNumberOfVisualizedGroups,\n )\n );\n\n const allIdsArrays = await Promise.all(allIdsPromises);\n const allIds = allIdsArrays.flat();\n\n await zoomToElements(allIds);\n};\n\nexport const getHiliteIdsAndKeysetFromGroup = async (\n iModelConnection: IModelConnection,\n group: Group,\n hilitedElementsQueryCache: React.MutableRefObject<Map<string, QueryCacheItem>>\n) => {\n const query = group.query;\n if (hilitedElementsQueryCache.current.has(query)) {\n return hilitedElementsQueryCache.current.get(query) ?? ({ keySet: new KeySet(), ids: [] });\n }\n try {\n const queryRowCount = await iModelConnection.queryRowCount(query);\n if (queryRowCount === 0) {\n toaster.warning(\n `${group.groupName}'s query is valid but produced no results.`\n );\n }\n const result = await getHiliteIds(query, iModelConnection);\n hilitedElementsQueryCache.current.set(query, result);\n return result;\n } catch {\n toaster.negative(\n `Query could not be resolved.`\n );\n return ({ keySet: new KeySet(), ids: [] });\n }\n\n};\n"]}
@@ -1,20 +0,0 @@
1
- /// <reference types="react" />
2
- import type { Group } from "@itwin/insights-client";
3
- import type { ContextCustomUI, GroupingCustomUI } from "../customUI/GroupingMappingCustomUI";
4
- export interface GroupsOperationsProps {
5
- mappingId: string;
6
- }
7
- export declare const useGroupsOperations: ({ mappingId, }: GroupsOperationsProps) => {
8
- groups: Group[];
9
- isLoading: boolean;
10
- refresh: () => Promise<void>;
11
- onDeleteGroup: (group: Group) => Promise<void>;
12
- setShowDeleteModal: import("react").Dispatch<import("react").SetStateAction<Group | undefined>>;
13
- showDeleteModal: Group | undefined;
14
- groupUIs: GroupingCustomUI[];
15
- contextUIs: ContextCustomUI[];
16
- numberOfVisualizedGroups: number;
17
- errorMessage: string | undefined;
18
- setErrorMessage: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
19
- };
20
- //# sourceMappingURL=useGroupsOperations.d.ts.map
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useGroupsOperations = void 0;
4
- /*---------------------------------------------------------------------------------------------
5
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
- * See LICENSE.md in the project root for license terms and full copyright notice.
7
- *--------------------------------------------------------------------------------------------*/
8
- const react_1 = require("react");
9
- const GroupingApiConfigContext_1 = require("../context/GroupingApiConfigContext");
10
- const utils_1 = require("../utils");
11
- const GroupingMappingCustomUI_1 = require("../customUI/GroupingMappingCustomUI");
12
- const GroupingMappingCustomUIContext_1 = require("../context/GroupingMappingCustomUIContext");
13
- const GroupHilitedElementsContext_1 = require("../context/GroupHilitedElementsContext");
14
- const MappingClientContext_1 = require("../context/MappingClientContext");
15
- const fetchGroups = async (setGroups, iModelId, mappingId, setIsLoading, getAccessToken, mappingsClient, setErrorMessage) => {
16
- try {
17
- setIsLoading(true);
18
- const accessToken = await getAccessToken();
19
- const groups = await mappingsClient.getGroups(accessToken, iModelId, mappingId);
20
- setGroups(groups.sort((a, b) => a.groupName.localeCompare(b.groupName)));
21
- }
22
- catch (error) {
23
- setErrorMessage((0, utils_1.getErrorMessage)(error.status));
24
- }
25
- finally {
26
- setIsLoading(false);
27
- }
28
- };
29
- const useGroupsOperations = ({ mappingId, }) => {
30
- const { getAccessToken, iModelId } = (0, GroupingApiConfigContext_1.useGroupingMappingApiConfig)();
31
- const { groups, setGroups, numberOfVisualizedGroups } = (0, GroupHilitedElementsContext_1.useGroupHilitedElementsContext)();
32
- const mappingClient = (0, MappingClientContext_1.useMappingClient)();
33
- const groupUIs = (0, GroupingMappingCustomUIContext_1.useGroupingMappingCustomUI)().customUIs.filter((p) => p.type === GroupingMappingCustomUI_1.GroupingMappingCustomUIType.Grouping);
34
- const contextUIs = (0, GroupingMappingCustomUIContext_1.useGroupingMappingCustomUI)().customUIs.filter((p) => p.type === GroupingMappingCustomUI_1.GroupingMappingCustomUIType.Context);
35
- const [showDeleteModal, setShowDeleteModal] = (0, react_1.useState)(undefined);
36
- const [isLoading, setIsLoading] = (0, react_1.useState)(true);
37
- const [errorMessage, setErrorMessage] = (0, react_1.useState)(undefined);
38
- (0, react_1.useEffect)(() => {
39
- const initialize = async () => {
40
- await fetchGroups(setGroups, iModelId, mappingId, setIsLoading, getAccessToken, mappingClient, setErrorMessage);
41
- };
42
- void initialize();
43
- }, [getAccessToken, mappingClient, iModelId, mappingId, setGroups]);
44
- const refresh = (0, react_1.useCallback)(async () => {
45
- await fetchGroups(setGroups, iModelId, mappingId, setIsLoading, getAccessToken, mappingClient, setErrorMessage);
46
- }, [getAccessToken, mappingClient, iModelId, mappingId, setGroups]);
47
- const onDeleteGroup = (0, react_1.useCallback)(async (group) => {
48
- const accessToken = await getAccessToken();
49
- await mappingClient.deleteGroup(accessToken, iModelId, mappingId, group.id);
50
- await refresh();
51
- }, [getAccessToken, iModelId, mappingClient, mappingId, refresh]);
52
- return {
53
- groups,
54
- isLoading,
55
- refresh,
56
- onDeleteGroup,
57
- setShowDeleteModal,
58
- showDeleteModal,
59
- groupUIs,
60
- contextUIs,
61
- numberOfVisualizedGroups,
62
- errorMessage,
63
- setErrorMessage,
64
- };
65
- };
66
- exports.useGroupsOperations = useGroupsOperations;
67
- //# sourceMappingURL=useGroupsOperations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useGroupsOperations.js","sourceRoot":"","sources":["../../../../../src/widget/components/hooks/useGroupsOperations.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,iCAAyD;AAGzD,kFAAkF;AAClF,oCAA2C;AAE3C,iFAAkF;AAClF,8FAAuF;AACvF,wFAAwF;AACxF,0EAAmE;AAEnE,MAAM,WAAW,GAAG,KAAK,EACvB,SAAoC,EACpC,QAAgB,EAChB,SAAiB,EACjB,YAA0C,EAC1C,cAAgC,EAChC,cAA+B,EAC/B,eAAsD,EACvC,EAAE;IACjB,IAAI;QACF,YAAY,CAAC,IAAI,CAAC,CAAC;QACnB,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;QAC3C,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,SAAS,CAC3C,WAAW,EACX,QAAQ,EACR,SAAS,CACV,CAAC;QACF,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;KAC1E;IAAC,OAAO,KAAU,EAAE;QACnB,eAAe,CAAC,IAAA,uBAAe,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;KAChD;YAAS;QACR,YAAY,CAAC,KAAK,CAAC,CAAC;KACrB;AACH,CAAC,CAAC;AAMK,MAAM,mBAAmB,GAAG,CAAC,EAClC,SAAS,GACa,EAAE,EAAE;IAC1B,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,IAAA,sDAA2B,GAAE,CAAC;IACnE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,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,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;IAEpE,MAAM,aAAa,GAAG,IAAA,mBAAW,EAAC,KAAK,EAAE,KAAY,EAAE,EAAE;QACvD,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;QAC3C,MAAM,aAAa,CAAC,WAAW,CAC7B,WAAW,EACX,QAAQ,EACR,SAAS,EACT,KAAK,CAAC,EAAE,CACT,CAAC;QACF,MAAM,OAAO,EAAE,CAAC;IAClB,CAAC,EAAE,CAAC,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IAElE,OAAO;QACL,MAAM;QACN,SAAS;QACT,OAAO;QACP,aAAa;QACb,kBAAkB;QAClB,eAAe;QACf,QAAQ;QACR,UAAU;QACV,wBAAwB;QACxB,YAAY;QACZ,eAAe;KAChB,CAAC;AACJ,CAAC,CAAC;AAvEW,QAAA,mBAAmB,uBAuE9B","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 { useCallback, useEffect, useState } from \"react\";\nimport type { Group, IMappingsClient } from \"@itwin/insights-client\";\nimport type { GetAccessTokenFn } from \"../context/GroupingApiConfigContext\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport { getErrorMessage } from \"../utils\";\nimport type { ContextCustomUI, GroupingCustomUI } from \"../customUI/GroupingMappingCustomUI\";\nimport { GroupingMappingCustomUIType } from \"../customUI/GroupingMappingCustomUI\";\nimport { useGroupingMappingCustomUI } from \"../context/GroupingMappingCustomUIContext\";\nimport { useGroupHilitedElementsContext } from \"../context/GroupHilitedElementsContext\";\nimport { useMappingClient } from \"../context/MappingClientContext\";\n\nconst fetchGroups = async (\n setGroups: (groups: Group[]) => void,\n iModelId: string,\n mappingId: string,\n setIsLoading: (isLoading: boolean) => void,\n getAccessToken: GetAccessTokenFn,\n mappingsClient: IMappingsClient,\n setErrorMessage: (message: string | undefined) => void\n): Promise<void> => {\n try {\n setIsLoading(true);\n const accessToken = await getAccessToken();\n const groups = await mappingsClient.getGroups(\n accessToken,\n iModelId,\n mappingId\n );\n setGroups(groups.sort((a, b) => a.groupName.localeCompare(b.groupName)));\n } catch (error: any) {\n setErrorMessage(getErrorMessage(error.status));\n } finally {\n setIsLoading(false);\n }\n};\n\nexport interface GroupsOperationsProps {\n mappingId: string;\n}\n\nexport const useGroupsOperations = ({\n mappingId,\n}: GroupsOperationsProps) => {\n const { getAccessToken, iModelId } = useGroupingMappingApiConfig();\n const { groups, setGroups, numberOfVisualizedGroups } = useGroupHilitedElementsContext();\n const mappingClient = useMappingClient();\n const groupUIs: GroupingCustomUI[] =\n useGroupingMappingCustomUI().customUIs.filter(\n (p) => p.type === GroupingMappingCustomUIType.Grouping\n ) as GroupingCustomUI[];\n const contextUIs: ContextCustomUI[] =\n useGroupingMappingCustomUI().customUIs.filter(\n (p) => p.type === GroupingMappingCustomUIType.Context\n ) as ContextCustomUI[];\n const [showDeleteModal, setShowDeleteModal] = useState<Group | undefined>(\n undefined\n );\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [errorMessage, setErrorMessage] = useState<string | undefined>(undefined);\n\n useEffect(() => {\n const initialize = async () => {\n await fetchGroups(\n setGroups,\n iModelId,\n mappingId,\n setIsLoading,\n getAccessToken,\n mappingClient,\n setErrorMessage\n );\n };\n void initialize();\n }, [getAccessToken, mappingClient, iModelId, mappingId, setGroups]);\n\n const refresh = useCallback(async () => {\n await fetchGroups(\n setGroups,\n iModelId,\n mappingId,\n setIsLoading,\n getAccessToken,\n mappingClient,\n setErrorMessage\n );\n }, [getAccessToken, mappingClient, iModelId, mappingId, setGroups]);\n\n const onDeleteGroup = useCallback(async (group: Group) => {\n const accessToken = await getAccessToken();\n await mappingClient.deleteGroup(\n accessToken,\n iModelId,\n mappingId,\n group.id\n );\n await refresh();\n }, [getAccessToken, iModelId, mappingClient, mappingId, refresh]);\n\n return {\n groups,\n isLoading,\n refresh,\n onDeleteGroup,\n setShowDeleteModal,\n showDeleteModal,\n groupUIs,\n contextUIs,\n numberOfVisualizedGroups,\n errorMessage,\n setErrorMessage,\n };\n};\n"]}
@@ -1,35 +0,0 @@
1
- /// <reference types="react" />
2
- import type { IMappingsClient, Mapping } from "@itwin/insights-client";
3
- import type { GroupingMappingApiConfig } from "../context/GroupingApiConfigContext";
4
- export interface MappingsOperationsProps extends GroupingMappingApiConfig {
5
- mappingClient: IMappingsClient;
6
- }
7
- export interface ExtractionMessageData {
8
- date: string;
9
- category: string;
10
- level: string;
11
- message: string;
12
- }
13
- export interface ExtractionIconData {
14
- iconStatus: "negative" | "positive" | "warning";
15
- iconMessage: string;
16
- }
17
- export declare const useMappingsOperations: ({ iModelId, getAccessToken, mappingClient }: MappingsOperationsProps) => {
18
- mappings: Mapping[];
19
- isLoading: boolean;
20
- extractionIconData: ExtractionIconData;
21
- showExtractionMessageModal: boolean;
22
- extractionMessageData: ExtractionMessageData[];
23
- setShowExtractionMessageModal: import("react").Dispatch<import("react").SetStateAction<boolean>>;
24
- refresh: () => Promise<void>;
25
- toggleExtraction: (mapping: Mapping) => Promise<void>;
26
- onDelete: (mapping: Mapping) => Promise<void>;
27
- setShowImportModal: import("react").Dispatch<import("react").SetStateAction<boolean | undefined>>;
28
- showImportModal: boolean | undefined;
29
- setShowDeleteModal: import("react").Dispatch<import("react").SetStateAction<Mapping | undefined>>;
30
- showDeleteModal: Mapping | undefined;
31
- isTogglingExtraction: boolean;
32
- errorMessage: string | undefined;
33
- setErrorMessage: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
34
- };
35
- //# sourceMappingURL=useMappingsOperations.d.ts.map
@@ -1,120 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useMappingsOperations = void 0;
4
- /*---------------------------------------------------------------------------------------------
5
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
- * See LICENSE.md in the project root for license terms and full copyright notice.
7
- *--------------------------------------------------------------------------------------------*/
8
- const react_1 = require("react");
9
- const utils_1 = require("../utils");
10
- const ExtractionClientContext_1 = require("../context/ExtractionClientContext");
11
- const fetchMappings = async (setMappings, iModelId, setIsLoading, getAccessToken, mappingsClient, setErrorMessage) => {
12
- try {
13
- setIsLoading(true);
14
- const accessToken = await getAccessToken();
15
- const mappings = await mappingsClient.getMappings(accessToken, iModelId);
16
- setMappings(mappings.sort((a, b) => a.mappingName.localeCompare(b.mappingName)));
17
- }
18
- catch (error) {
19
- setErrorMessage((0, utils_1.getErrorMessage)(error.status));
20
- }
21
- finally {
22
- setIsLoading(false);
23
- }
24
- };
25
- const fetchExtractionStatus = async (iModelId, getAccessToken, extractionClient, setExtractionIconData, setExtractionMessageData) => {
26
- setExtractionIconData({
27
- iconStatus: "warning",
28
- iconMessage: "Extraction status pending.",
29
- });
30
- try {
31
- const accessToken = await getAccessToken();
32
- const extractions = await extractionClient.getExtractionHistory(accessToken, iModelId, 1);
33
- if (extractions.length === 0) {
34
- setExtractionIconData({
35
- iconStatus: "negative",
36
- iconMessage: "No extraction found.",
37
- });
38
- }
39
- else {
40
- const jobId = extractions[0].jobId;
41
- const status = await extractionClient.getExtractionStatus(accessToken, jobId);
42
- if (status.containsIssues) {
43
- setExtractionIconData({
44
- iconStatus: "negative",
45
- iconMessage: "Extraction contains issues. Click to view extraction logs.",
46
- });
47
- const logs = await extractionClient.getExtractionLogs(accessToken, jobId);
48
- const filteredLogs = logs.filter((log) => log.message !== null);
49
- const extractionMessageData = filteredLogs.map((filteredLog) => ({
50
- date: filteredLog.dateTime,
51
- category: filteredLog.category,
52
- level: filteredLog.level,
53
- message: String(filteredLog.message),
54
- }));
55
- setExtractionMessageData(extractionMessageData);
56
- }
57
- else {
58
- setExtractionIconData({
59
- iconStatus: "positive",
60
- iconMessage: "Extraction successful.",
61
- });
62
- }
63
- }
64
- }
65
- catch (error) {
66
- setExtractionIconData({
67
- iconStatus: "negative",
68
- iconMessage: "Operation failed. Please try again.",
69
- });
70
- }
71
- };
72
- const useMappingsOperations = ({ iModelId, getAccessToken, mappingClient }) => {
73
- const [showImportModal, setShowImportModal] = (0, react_1.useState)(false);
74
- const [showDeleteModal, setShowDeleteModal] = (0, react_1.useState)(undefined);
75
- const [isLoading, setIsLoading] = (0, react_1.useState)(true);
76
- const [mappings, setMappings] = (0, react_1.useState)([]);
77
- const extractionClient = (0, ExtractionClientContext_1.useExtractionClient)();
78
- const [errorMessage, setErrorMessage] = (0, react_1.useState)(undefined);
79
- const [isTogglingExtraction, setIsTogglingExtraction] = (0, react_1.useState)(false);
80
- const [extractionIconData, setExtractionIconData] = (0, react_1.useState)({
81
- iconStatus: "warning",
82
- iconMessage: "",
83
- });
84
- const [showExtractionMessageModal, setShowExtractionMessageModal] = (0, react_1.useState)(false);
85
- const [extractionMessageData, setExtractionMessageData] = (0, react_1.useState)([]);
86
- (0, react_1.useEffect)(() => {
87
- void fetchMappings(setMappings, iModelId, setIsLoading, getAccessToken, mappingClient, setErrorMessage);
88
- }, [getAccessToken, mappingClient, iModelId]);
89
- (0, react_1.useEffect)(() => {
90
- void fetchExtractionStatus(iModelId, getAccessToken, extractionClient, setExtractionIconData, setExtractionMessageData);
91
- }, [iModelId, getAccessToken, extractionClient]);
92
- const refresh = (0, react_1.useCallback)(async () => {
93
- setMappings([]);
94
- await fetchMappings(setMappings, iModelId, setIsLoading, getAccessToken, mappingClient, setErrorMessage);
95
- }, [getAccessToken, mappingClient, iModelId]);
96
- const toggleExtraction = (0, react_1.useCallback)(async (mapping) => {
97
- try {
98
- setIsTogglingExtraction(true);
99
- const newState = !mapping.extractionEnabled;
100
- const accessToken = await getAccessToken();
101
- await mappingClient.updateMapping(accessToken, iModelId, mapping.id, {
102
- extractionEnabled: newState,
103
- });
104
- }
105
- catch (error) {
106
- setErrorMessage((0, utils_1.getErrorMessage)(error.status));
107
- }
108
- finally {
109
- setIsTogglingExtraction(false);
110
- }
111
- }, [getAccessToken, iModelId, mappingClient]);
112
- const onDelete = async (mapping) => {
113
- const accessToken = await getAccessToken();
114
- await mappingClient.deleteMapping(accessToken, iModelId, mapping.id);
115
- await refresh();
116
- };
117
- return { mappings, isLoading, extractionIconData, showExtractionMessageModal, extractionMessageData, setShowExtractionMessageModal, refresh, toggleExtraction, onDelete, setShowImportModal, showImportModal, setShowDeleteModal, showDeleteModal, isTogglingExtraction, errorMessage, setErrorMessage };
118
- };
119
- exports.useMappingsOperations = useMappingsOperations;
120
- //# sourceMappingURL=useMappingsOperations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMappingsOperations.js","sourceRoot":"","sources":["../../../../../src/widget/components/hooks/useMappingsOperations.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,iCAAyD;AACzD,oCAEkB;AAIlB,gFAAyE;AAEzE,MAAM,aAAa,GAAG,KAAK,EACzB,WAA4D,EAC5D,QAAgB,EAChB,YAA2D,EAC3D,cAAgC,EAChC,cAA+B,EAC/B,eAAsD,EACtD,EAAE;IACF,IAAI;QACF,YAAY,CAAC,IAAI,CAAC,CAAC;QACnB,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;QAC3C,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QACzE,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;KAClF;IAAC,OAAO,KAAU,EAAE;QACnB,eAAe,CAAC,IAAA,uBAAe,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;KAChD;YAAS;QACR,YAAY,CAAC,KAAK,CAAC,CAAC;KACrB;AACH,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,KAAK,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C,IAAA,uBAAe,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;SAChD;gBAAS;YACR,uBAAuB,CAAC,KAAK,CAAC,CAAC;SAChC;IACH,CAAC,EAAE,CAAC,cAAc,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;IAE9C,MAAM,QAAQ,GAAG,KAAK,EAAE,OAAgB,EAAE,EAAE;QAC1C,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;QAC3C,MAAM,aAAa,CAAC,aAAa,CAAC,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;QACrE,MAAM,OAAO,EAAE,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,eAAe,EAAE,kBAAkB,EAAE,eAAe,EAAE,oBAAoB,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAC3S,CAAC,CAAC;AAxDW,QAAA,qBAAqB,yBAwDhC","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 { useCallback, useEffect, useState } from \"react\";\nimport {\n getErrorMessage,\n} from \"../utils\";\nimport type { IExtractionClient, IMappingsClient, Mapping } from \"@itwin/insights-client\";\nimport type { GroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport type { GetAccessTokenFn } from \"../context/GroupingApiConfigContext\";\nimport { useExtractionClient } from \"../context/ExtractionClientContext\";\n\nconst fetchMappings = async (\n setMappings: React.Dispatch<React.SetStateAction<Mapping[]>>,\n iModelId: string,\n setIsLoading: React.Dispatch<React.SetStateAction<boolean>>,\n getAccessToken: GetAccessTokenFn,\n mappingsClient: IMappingsClient,\n setErrorMessage: (message: string | undefined) => void\n) => {\n try {\n setIsLoading(true);\n const accessToken = await getAccessToken();\n const mappings = await mappingsClient.getMappings(accessToken, iModelId);\n setMappings(mappings.sort((a, b) => a.mappingName.localeCompare(b.mappingName)));\n } catch (error: any) {\n setErrorMessage(getErrorMessage(error.status));\n } finally {\n setIsLoading(false);\n }\n};\n\nconst fetchExtractionStatus = async (\n iModelId: string,\n getAccessToken: GetAccessTokenFn,\n extractionClient: IExtractionClient,\n setExtractionIconData: React.Dispatch<React.SetStateAction<ExtractionIconData>>,\n setExtractionMessageData: React.Dispatch<React.SetStateAction<ExtractionMessageData[]>>\n) => {\n setExtractionIconData({\n iconStatus: \"warning\",\n iconMessage: \"Extraction status pending.\",\n });\n try {\n const accessToken = await getAccessToken();\n const extractions = await extractionClient.getExtractionHistory(accessToken, iModelId, 1);\n if(extractions.length === 0){\n setExtractionIconData({\n iconStatus: \"negative\",\n iconMessage: \"No extraction found.\",\n });\n } else {\n const jobId = extractions[0].jobId;\n const status = await extractionClient.getExtractionStatus(accessToken, jobId);\n if (status.containsIssues) {\n setExtractionIconData({\n iconStatus: \"negative\",\n iconMessage: \"Extraction contains issues. Click to view extraction logs.\",\n });\n const logs = await extractionClient.getExtractionLogs(accessToken, jobId);\n const filteredLogs = logs.filter((log) => log.message !== null);\n const extractionMessageData = filteredLogs.map((filteredLog) =>\n (\n {\n date: filteredLog.dateTime,\n category: filteredLog.category,\n level: filteredLog.level,\n message: String(filteredLog.message),\n }\n ));\n setExtractionMessageData(extractionMessageData);\n } else {\n setExtractionIconData({\n iconStatus: \"positive\",\n iconMessage: \"Extraction successful.\",\n });\n }\n }\n } catch (error: any) {\n setExtractionIconData({\n iconStatus: \"negative\",\n iconMessage: \"Operation failed. Please try again.\",\n });\n }\n};\n\nexport interface MappingsOperationsProps extends GroupingMappingApiConfig {\n mappingClient: IMappingsClient;\n}\n\nexport interface ExtractionMessageData {\n date: string;\n category: string;\n level: string;\n message: string;\n}\n\nexport interface ExtractionIconData {\n iconStatus: \"negative\" | \"positive\" | \"warning\";\n iconMessage: string;\n}\n\nexport const useMappingsOperations = ({ iModelId, getAccessToken, mappingClient }: MappingsOperationsProps) => {\n const [showImportModal, setShowImportModal] = useState<boolean | undefined>(false);\n const [showDeleteModal, setShowDeleteModal] = useState<Mapping | undefined>(undefined);\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [mappings, setMappings] = useState<Mapping[]>([]);\n const extractionClient = useExtractionClient();\n const [errorMessage, setErrorMessage] = useState<string | undefined>(undefined);\n const [isTogglingExtraction, setIsTogglingExtraction] = useState<boolean>(false);\n const [extractionIconData, setExtractionIconData] = useState<ExtractionIconData>({\n iconStatus: \"warning\",\n iconMessage: \"\",\n });\n const [showExtractionMessageModal, setShowExtractionMessageModal] = useState<boolean>(false);\n const [extractionMessageData, setExtractionMessageData] = useState<ExtractionMessageData[]>([]);\n\n useEffect(() => {\n void fetchMappings(setMappings, iModelId, setIsLoading, getAccessToken, mappingClient, setErrorMessage);\n }, [getAccessToken, mappingClient, iModelId]);\n\n useEffect(() => {\n void fetchExtractionStatus(\n iModelId,\n getAccessToken,\n extractionClient,\n setExtractionIconData,\n setExtractionMessageData\n );\n }, [iModelId, getAccessToken, extractionClient]);\n\n const refresh = useCallback(async () => {\n setMappings([]);\n await fetchMappings(setMappings, iModelId, setIsLoading, getAccessToken, mappingClient, setErrorMessage);\n }, [getAccessToken, mappingClient, iModelId]);\n\n const toggleExtraction = useCallback(async (mapping: Mapping) => {\n try {\n setIsTogglingExtraction(true);\n const newState = !mapping.extractionEnabled;\n const accessToken = await getAccessToken();\n await mappingClient.updateMapping(accessToken, iModelId, mapping.id, {\n extractionEnabled: newState,\n });\n } catch (error: any) {\n setErrorMessage(getErrorMessage(error.status));\n } finally {\n setIsTogglingExtraction(false);\n }\n }, [getAccessToken, iModelId, mappingClient]);\n\n const onDelete = async (mapping: Mapping) => {\n const accessToken = await getAccessToken();\n await mappingClient.deleteMapping(accessToken, iModelId, mapping.id);\n await refresh();\n };\n\n return { mappings, isLoading, extractionIconData, showExtractionMessageModal, extractionMessageData, setShowExtractionMessageModal, refresh, toggleExtraction, onDelete, setShowImportModal, showImportModal, setShowDeleteModal, showDeleteModal, isTogglingExtraction, errorMessage, setErrorMessage };\n};\n"]}
@@ -1,16 +0,0 @@
1
- import "./utils.scss";
2
- import React from "react";
3
- import type { IModelConnection } from "@itwin/core-frontend";
4
- export declare const handleInputChange: <T>(e: React.ChangeEvent<HTMLInputElement>, values: T, setValues: (newValues: T) => void) => void;
5
- export declare const fetchIdsFromQuery: (query: string, iModelConnection: IModelConnection) => Promise<string[]>;
6
- export declare const getErrorMessage: (errorStatus: number) => string;
7
- export declare const handleError: (errorStatus: number) => void;
8
- export declare const LoadingOverlay: () => JSX.Element;
9
- interface EmptyMessageProps {
10
- message: string;
11
- }
12
- export declare const EmptyMessage: ({ message }: EmptyMessageProps) => JSX.Element;
13
- export declare const LoadingSpinner: () => JSX.Element;
14
- export declare const enableExperimentalFeatures: (iModelConnection: IModelConnection) => Promise<void>;
15
- export {};
16
- //# sourceMappingURL=utils.d.ts.map