@itwin/grouping-mapping-widget 0.26.0 → 0.26.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 (579) hide show
  1. package/LICENSE.md +9 -9
  2. package/README.md +115 -115
  3. package/lib/cjs/WidgetShell/GroupingMapping.js +2 -4
  4. package/lib/cjs/WidgetShell/GroupingMapping.js.map +1 -1
  5. package/lib/cjs/WidgetShell/GroupingMappingContent.js +4 -4
  6. package/lib/cjs/WidgetShell/GroupingMappingContent.js.map +1 -1
  7. package/lib/cjs/WidgetShell/GroupingMappingHeader.d.ts +1 -1
  8. package/lib/cjs/WidgetShell/GroupingMappingHeader.js +5 -5
  9. package/lib/cjs/WidgetShell/GroupingMappingHeader.js.map +1 -1
  10. package/lib/cjs/WidgetShell/GroupingMappingWidget.js +1 -3
  11. package/lib/cjs/WidgetShell/GroupingMappingWidget.js.map +1 -1
  12. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js +28 -8
  13. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
  14. package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.d.ts +1 -1
  15. package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js +7 -7
  16. package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -1
  17. package/lib/cjs/common/hooks/useIsMounted.js +3 -3
  18. package/lib/cjs/common/hooks/useIsMounted.js.map +1 -1
  19. package/lib/cjs/common/hooks/useMemoizedCollectionPick.js +3 -3
  20. package/lib/cjs/common/hooks/useMemoizedCollectionPick.js.map +1 -1
  21. package/lib/cjs/common/utils.js +3 -3
  22. package/lib/cjs/common/utils.js.map +1 -1
  23. package/lib/cjs/common/viewerUtils.js +2 -2
  24. package/lib/cjs/common/viewerUtils.js.map +1 -1
  25. package/lib/cjs/components/Constants.js +4 -4
  26. package/lib/cjs/components/Constants.js.map +1 -1
  27. package/lib/cjs/components/GroupingMappingContext.js +13 -4
  28. package/lib/cjs/components/GroupingMappingContext.js.map +1 -1
  29. package/lib/cjs/components/Groups/Editing/GroupAction.js +7 -9
  30. package/lib/cjs/components/Groups/Editing/GroupAction.js.map +1 -1
  31. package/lib/cjs/components/Groups/Editing/GroupDetails.d.ts +1 -1
  32. package/lib/cjs/components/Groups/Editing/GroupDetails.js +5 -7
  33. package/lib/cjs/components/Groups/Editing/GroupDetails.js.map +1 -1
  34. package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.d.ts +1 -1
  35. package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js +4 -4
  36. package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
  37. package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js +4 -4
  38. package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js.map +1 -1
  39. package/lib/cjs/components/Groups/GroupColorLegend.js +3 -3
  40. package/lib/cjs/components/Groups/GroupColorLegend.js.map +1 -1
  41. package/lib/cjs/components/Groups/GroupListItem.js +3 -4
  42. package/lib/cjs/components/Groups/GroupListItem.js.map +1 -1
  43. package/lib/cjs/components/Groups/GroupListItem.scss +2 -2
  44. package/lib/cjs/components/Groups/GroupMenuActions.js +17 -6
  45. package/lib/cjs/components/Groups/GroupMenuActions.js.map +1 -1
  46. package/lib/cjs/components/Groups/GroupOverlapProgressBar.js.map +1 -1
  47. package/lib/cjs/components/Groups/Groups.js +3 -3
  48. package/lib/cjs/components/Groups/Groups.js.map +1 -1
  49. package/lib/cjs/components/Groups/GroupsAddButton.d.ts +1 -1
  50. package/lib/cjs/components/Groups/GroupsAddButton.js +4 -4
  51. package/lib/cjs/components/Groups/GroupsAddButton.js.map +1 -1
  52. package/lib/cjs/components/Groups/GroupsAddButton.scss +1 -1
  53. package/lib/cjs/components/Groups/GroupsShowHideButtons.d.ts +1 -1
  54. package/lib/cjs/components/Groups/GroupsShowHideButtons.js +2 -2
  55. package/lib/cjs/components/Groups/GroupsShowHideButtons.js.map +1 -1
  56. package/lib/cjs/components/Groups/GroupsView.js +8 -10
  57. package/lib/cjs/components/Groups/GroupsView.js.map +1 -1
  58. package/lib/cjs/components/Groups/GroupsView.scss +1 -1
  59. package/lib/cjs/components/Groups/GroupsVisualization.js +19 -20
  60. package/lib/cjs/components/Groups/GroupsVisualization.js.map +1 -1
  61. package/lib/cjs/components/Groups/GroupsVisualizationActions.js +4 -4
  62. package/lib/cjs/components/Groups/GroupsVisualizationActions.js.map +1 -1
  63. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.d.ts +1 -1
  64. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js +4 -4
  65. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
  66. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.scss +7 -7
  67. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js +13 -35
  68. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
  69. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js +4 -4
  70. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -1
  71. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +1 -1
  72. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +4 -4
  73. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
  74. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js +4 -4
  75. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -1
  76. package/lib/cjs/components/Groups/ToggleGroupVisibility.js +3 -3
  77. package/lib/cjs/components/Groups/ToggleGroupVisibility.js.map +1 -1
  78. package/lib/cjs/components/Groups/groupsHelpers.js +8 -4
  79. package/lib/cjs/components/Groups/groupsHelpers.js.map +1 -1
  80. package/lib/cjs/components/Groups/hooks/useFetchGroups.js.map +1 -1
  81. package/lib/cjs/components/Groups/hooks/useGroupsOperations.d.ts +1 -1
  82. package/lib/cjs/components/Groups/hooks/useGroupsOperations.js +5 -5
  83. package/lib/cjs/components/Groups/hooks/useGroupsOperations.js.map +1 -1
  84. package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
  85. package/lib/cjs/components/Groups/hooks/useVisualization.js +2 -4
  86. package/lib/cjs/components/Groups/hooks/useVisualization.js.map +1 -1
  87. package/lib/cjs/components/Mappings/BlockingOverlay.js +3 -3
  88. package/lib/cjs/components/Mappings/BlockingOverlay.js.map +1 -1
  89. package/lib/cjs/components/Mappings/Editing/MappingAction.js +11 -15
  90. package/lib/cjs/components/Mappings/Editing/MappingAction.js.map +1 -1
  91. package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.d.ts +1 -1
  92. package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js +1 -1
  93. package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
  94. package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js +9 -6
  95. package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
  96. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js +3 -3
  97. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js.map +1 -1
  98. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js +3 -3
  99. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js.map +1 -1
  100. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js +3 -3
  101. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js.map +1 -1
  102. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js +3 -3
  103. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js.map +1 -1
  104. package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.d.ts +1 -1
  105. package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js +9 -9
  106. package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
  107. package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.js +4 -4
  108. package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -1
  109. package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js +26 -30
  110. package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
  111. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.d.ts +1 -1
  112. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js +3 -3
  113. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
  114. package/lib/cjs/components/Mappings/Import/SelectIModel.d.ts +1 -1
  115. package/lib/cjs/components/Mappings/Import/SelectIModel.js +5 -5
  116. package/lib/cjs/components/Mappings/Import/SelectIModel.js.map +1 -1
  117. package/lib/cjs/components/Mappings/Import/SelectITwin.js +2 -2
  118. package/lib/cjs/components/Mappings/Import/SelectITwin.js.map +1 -1
  119. package/lib/cjs/components/Mappings/Import/SelectITwin.scss +1 -1
  120. package/lib/cjs/components/Mappings/Import/SelectMappings.d.ts +1 -1
  121. package/lib/cjs/components/Mappings/Import/SelectMappings.js +7 -7
  122. package/lib/cjs/components/Mappings/Import/SelectMappings.js.map +1 -1
  123. package/lib/cjs/components/Mappings/MappingListItem.js.map +1 -1
  124. package/lib/cjs/components/Mappings/MappingViewActionGroup.d.ts +1 -1
  125. package/lib/cjs/components/Mappings/MappingViewActionGroup.js +6 -6
  126. package/lib/cjs/components/Mappings/MappingViewActionGroup.js.map +1 -1
  127. package/lib/cjs/components/Mappings/Mappings.js +3 -3
  128. package/lib/cjs/components/Mappings/Mappings.js.map +1 -1
  129. package/lib/cjs/components/Mappings/MappingsView.js +13 -15
  130. package/lib/cjs/components/Mappings/MappingsView.js.map +1 -1
  131. package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js +3 -1
  132. package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
  133. package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -1
  134. package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js +3 -3
  135. package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
  136. package/lib/cjs/components/Mappings/hooks/useFetchMappings.js +1 -1
  137. package/lib/cjs/components/Mappings/hooks/useFetchMappings.js.map +1 -1
  138. package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js +36 -18
  139. package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
  140. package/lib/cjs/components/Mappings/hooks/useRunExtraction.d.ts +1 -1
  141. package/lib/cjs/components/Mappings/hooks/useRunExtraction.js +8 -6
  142. package/lib/cjs/components/Mappings/hooks/useRunExtraction.js.map +1 -1
  143. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +1 -1
  144. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +8 -8
  145. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
  146. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +11 -13
  147. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
  148. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +1 -1
  149. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +1 -1
  150. package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +4 -6
  151. package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
  152. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +1 -1
  153. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js +27 -21
  154. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
  155. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.scss +1 -1
  156. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js +15 -11
  157. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js.map +1 -1
  158. package/lib/cjs/components/Properties/GroupColorToggle.js +4 -4
  159. package/lib/cjs/components/Properties/GroupColorToggle.js.map +1 -1
  160. package/lib/cjs/components/Properties/GroupInformationPanel.js +3 -3
  161. package/lib/cjs/components/Properties/GroupInformationPanel.js.map +1 -1
  162. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.d.ts +1 -1
  163. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js +20 -27
  164. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
  165. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +1 -1
  166. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.js +5 -5
  167. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.js.map +1 -1
  168. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.d.ts +1 -1
  169. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js +14 -12
  170. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
  171. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js +20 -39
  172. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
  173. package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +20 -29
  174. package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
  175. package/lib/cjs/components/Properties/GroupProperties/SaveModal.d.ts +1 -1
  176. package/lib/cjs/components/Properties/GroupProperties/SaveModal.js +7 -7
  177. package/lib/cjs/components/Properties/GroupProperties/SaveModal.js.map +1 -1
  178. package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js +4 -4
  179. package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
  180. package/lib/cjs/components/Properties/PropertyAction.js +9 -21
  181. package/lib/cjs/components/Properties/PropertyAction.js.map +1 -1
  182. package/lib/cjs/components/Properties/PropertyMenu.js +4 -4
  183. package/lib/cjs/components/Properties/PropertyMenu.js.map +1 -1
  184. package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js +5 -5
  185. package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js.map +1 -1
  186. package/lib/cjs/components/Properties/PropertyNameCell.d.ts +1 -1
  187. package/lib/cjs/components/Properties/PropertyNameCell.js +4 -4
  188. package/lib/cjs/components/Properties/PropertyNameCell.js.map +1 -1
  189. package/lib/cjs/components/Properties/PropertyTable.js +5 -6
  190. package/lib/cjs/components/Properties/PropertyTable.js.map +1 -1
  191. package/lib/cjs/components/Properties/PropertyTableToolbar.d.ts +1 -1
  192. package/lib/cjs/components/Properties/PropertyTableToolbar.js +4 -4
  193. package/lib/cjs/components/Properties/PropertyTableToolbar.js.map +1 -1
  194. package/lib/cjs/components/Properties/hooks/useFormulaValidation.js +3 -3
  195. package/lib/cjs/components/Properties/hooks/useFormulaValidation.js.map +1 -1
  196. package/lib/cjs/components/Properties/hooks/usePropertiesQuery.js.map +1 -1
  197. package/lib/cjs/components/Properties/hooks/useValidator.js +4 -4
  198. package/lib/cjs/components/Properties/hooks/useValidator.js.map +1 -1
  199. package/lib/cjs/components/SharedComponents/ActionPanel.d.ts +1 -1
  200. package/lib/cjs/components/SharedComponents/ActionPanel.js +9 -10
  201. package/lib/cjs/components/SharedComponents/ActionPanel.js.map +1 -1
  202. package/lib/cjs/components/SharedComponents/DeleteModal.d.ts +1 -1
  203. package/lib/cjs/components/SharedComponents/DeleteModal.js +9 -10
  204. package/lib/cjs/components/SharedComponents/DeleteModal.js.map +1 -1
  205. package/lib/cjs/components/SharedComponents/EmptyMessage.js +4 -4
  206. package/lib/cjs/components/SharedComponents/EmptyMessage.js.map +1 -1
  207. package/lib/cjs/components/SharedComponents/LoadingOverlay.js +4 -4
  208. package/lib/cjs/components/SharedComponents/LoadingOverlay.js.map +1 -1
  209. package/lib/cjs/components/SharedComponents/LoadingSpinner.js +3 -3
  210. package/lib/cjs/components/SharedComponents/LoadingSpinner.js.map +1 -1
  211. package/lib/cjs/components/SharedComponents/StatusIcon.js +3 -3
  212. package/lib/cjs/components/SharedComponents/StatusIcon.js.map +1 -1
  213. package/lib/cjs/components/context/ExtractionClientContext.js.map +1 -1
  214. package/lib/cjs/components/context/ExtractionStateJobContext.js +3 -3
  215. package/lib/cjs/components/context/ExtractionStateJobContext.js.map +1 -1
  216. package/lib/cjs/components/context/GroupHilitedElementsContext.js +3 -3
  217. package/lib/cjs/components/context/GroupHilitedElementsContext.js.map +1 -1
  218. package/lib/cjs/components/context/GroupingApiConfigContext.js.map +1 -1
  219. package/lib/cjs/components/context/GroupingMappingCustomUIContext.js +3 -3
  220. package/lib/cjs/components/context/GroupingMappingCustomUIContext.js.map +1 -1
  221. package/lib/cjs/components/context/GroupsClientContext.js.map +1 -1
  222. package/lib/cjs/components/context/IModelsClientContext.js.map +1 -1
  223. package/lib/cjs/components/context/ITwinsClientContext.js +3 -3
  224. package/lib/cjs/components/context/ITwinsClientContext.js.map +1 -1
  225. package/lib/cjs/components/context/MappingClientContext.js.map +1 -1
  226. package/lib/cjs/components/context/PropertiesClientContext.js.map +1 -1
  227. package/lib/cjs/components/context/PropertiesGroupColorContext.js +3 -3
  228. package/lib/cjs/components/context/PropertiesGroupColorContext.js.map +1 -1
  229. package/lib/cjs/components/context/PropertyGridWrapperContext.js +3 -3
  230. package/lib/cjs/components/context/PropertyGridWrapperContext.js.map +1 -1
  231. package/lib/cjs/components/customUI/DefaultGroupingUI.js +3 -3
  232. package/lib/cjs/components/customUI/DefaultGroupingUI.js.map +1 -1
  233. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.d.ts +1 -1
  234. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js +13 -18
  235. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
  236. package/lib/cjs/components/customUI/GroupingMappingCustomUI.js.map +1 -1
  237. package/lib/cjs/components/customUI/ManualGroupingCustomUI.d.ts +1 -1
  238. package/lib/cjs/components/customUI/ManualGroupingCustomUI.js +8 -8
  239. package/lib/cjs/components/customUI/ManualGroupingCustomUI.js.map +1 -1
  240. package/lib/cjs/components/customUI/SearchGroupingCustomUI.d.ts +1 -1
  241. package/lib/cjs/components/customUI/SearchGroupingCustomUI.js +16 -45
  242. package/lib/cjs/components/customUI/SearchGroupingCustomUI.js.map +1 -1
  243. package/lib/cjs/decorators/BboxDimensionsDecorator.js +3 -10
  244. package/lib/cjs/decorators/BboxDimensionsDecorator.js.map +1 -1
  245. package/lib/cjs/formula/FormulaDataTypeResolver.js +3 -3
  246. package/lib/cjs/formula/FormulaDataTypeResolver.js.map +1 -1
  247. package/lib/cjs/formula/FormulaFunctionProvider.js +146 -65
  248. package/lib/cjs/formula/FormulaFunctionProvider.js.map +1 -1
  249. package/lib/cjs/formula/FormulaOperatorsProvider.js +138 -44
  250. package/lib/cjs/formula/FormulaOperatorsProvider.js.map +1 -1
  251. package/lib/cjs/formula/FormulaSplitter.js +63 -13
  252. package/lib/cjs/formula/FormulaSplitter.js.map +1 -1
  253. package/lib/cjs/formula/FormulaTokensDataTypeResolver.js +7 -14
  254. package/lib/cjs/formula/FormulaTokensDataTypeResolver.js.map +1 -1
  255. package/lib/cjs/formula/IResult.js.map +1 -1
  256. package/lib/cjs/formula/InfixToPostfixConverter.js +4 -4
  257. package/lib/cjs/formula/InfixToPostfixConverter.js.map +1 -1
  258. package/lib/cjs/formula/InputStream.js +3 -3
  259. package/lib/cjs/formula/InputStream.js.map +1 -1
  260. package/lib/cjs/formula/ParenthesisValidator.js +3 -3
  261. package/lib/cjs/formula/ParenthesisValidator.js.map +1 -1
  262. package/lib/cjs/formula/Queue.js +3 -3
  263. package/lib/cjs/formula/Queue.js.map +1 -1
  264. package/lib/cjs/formula/Stack.js +3 -3
  265. package/lib/cjs/formula/Stack.js.map +1 -1
  266. package/lib/cjs/formula/StringBuilder.js +3 -3
  267. package/lib/cjs/formula/StringBuilder.js.map +1 -1
  268. package/lib/cjs/formula/Types.js.map +1 -1
  269. package/lib/cjs/formula/Utils.js +4 -4
  270. package/lib/cjs/formula/Utils.js.map +1 -1
  271. package/lib/cjs/grouping-mapping-widget.d.ts +4 -4
  272. package/lib/cjs/grouping-mapping-widget.js +3 -3
  273. package/lib/cjs/grouping-mapping-widget.js.map +1 -1
  274. package/lib/cjs/test/GroupPropertyUtils.test.js +27 -26
  275. package/lib/cjs/test/GroupPropertyUtils.test.js.map +1 -1
  276. package/lib/cjs/test/GroupingMappingCustomUI.test.js +4 -6
  277. package/lib/cjs/test/GroupingMappingCustomUI.test.js.map +1 -1
  278. package/lib/cjs/test/MockFactory.js +3 -3
  279. package/lib/cjs/test/MockFactory.js.map +1 -1
  280. package/lib/cjs/test/PropertyFieldsHelpers.js +3 -3
  281. package/lib/cjs/test/PropertyFieldsHelpers.js.map +1 -1
  282. package/lib/cjs/test/QueryBuilder.test.js +3 -3
  283. package/lib/cjs/test/QueryBuilder.test.js.map +1 -1
  284. package/lib/cjs/test/QueryBuilder.testdata.js +3 -3
  285. package/lib/cjs/test/QueryBuilder.testdata.js.map +1 -1
  286. package/lib/cjs/test/QueryBuilderTestData.js.map +1 -1
  287. package/lib/cjs/test/WidgetHeader.test.js +3 -3
  288. package/lib/cjs/test/WidgetHeader.test.js.map +1 -1
  289. package/lib/cjs/test/test-utils.js +4 -4
  290. package/lib/cjs/test/test-utils.js.map +1 -1
  291. package/lib/esm/WidgetShell/GroupingMapping.js +3 -5
  292. package/lib/esm/WidgetShell/GroupingMapping.js.map +1 -1
  293. package/lib/esm/WidgetShell/GroupingMappingContent.js +4 -4
  294. package/lib/esm/WidgetShell/GroupingMappingContent.js.map +1 -1
  295. package/lib/esm/WidgetShell/GroupingMappingHeader.d.ts +1 -1
  296. package/lib/esm/WidgetShell/GroupingMappingHeader.js +5 -5
  297. package/lib/esm/WidgetShell/GroupingMappingHeader.js.map +1 -1
  298. package/lib/esm/WidgetShell/GroupingMappingWidget.js +2 -4
  299. package/lib/esm/WidgetShell/GroupingMappingWidget.js.map +1 -1
  300. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js +28 -8
  301. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
  302. package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.d.ts +1 -1
  303. package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js +7 -7
  304. package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -1
  305. package/lib/esm/common/hooks/useIsMounted.js +3 -3
  306. package/lib/esm/common/hooks/useIsMounted.js.map +1 -1
  307. package/lib/esm/common/hooks/useMemoizedCollectionPick.js +3 -3
  308. package/lib/esm/common/hooks/useMemoizedCollectionPick.js.map +1 -1
  309. package/lib/esm/common/utils.js +3 -3
  310. package/lib/esm/common/utils.js.map +1 -1
  311. package/lib/esm/common/viewerUtils.js +2 -2
  312. package/lib/esm/common/viewerUtils.js.map +1 -1
  313. package/lib/esm/components/Constants.js +4 -4
  314. package/lib/esm/components/Constants.js.map +1 -1
  315. package/lib/esm/components/GroupingMappingContext.js +14 -5
  316. package/lib/esm/components/GroupingMappingContext.js.map +1 -1
  317. package/lib/esm/components/Groups/Editing/GroupAction.js +8 -10
  318. package/lib/esm/components/Groups/Editing/GroupAction.js.map +1 -1
  319. package/lib/esm/components/Groups/Editing/GroupDetails.d.ts +1 -1
  320. package/lib/esm/components/Groups/Editing/GroupDetails.js +5 -7
  321. package/lib/esm/components/Groups/Editing/GroupDetails.js.map +1 -1
  322. package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.d.ts +1 -1
  323. package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js +4 -4
  324. package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
  325. package/lib/esm/components/Groups/Editing/GroupDetailsStep.js +4 -4
  326. package/lib/esm/components/Groups/Editing/GroupDetailsStep.js.map +1 -1
  327. package/lib/esm/components/Groups/GroupColorLegend.js +3 -3
  328. package/lib/esm/components/Groups/GroupColorLegend.js.map +1 -1
  329. package/lib/esm/components/Groups/GroupListItem.js +3 -4
  330. package/lib/esm/components/Groups/GroupListItem.js.map +1 -1
  331. package/lib/esm/components/Groups/GroupListItem.scss +2 -2
  332. package/lib/esm/components/Groups/GroupMenuActions.js +17 -6
  333. package/lib/esm/components/Groups/GroupMenuActions.js.map +1 -1
  334. package/lib/esm/components/Groups/GroupOverlapProgressBar.js.map +1 -1
  335. package/lib/esm/components/Groups/Groups.js +3 -3
  336. package/lib/esm/components/Groups/Groups.js.map +1 -1
  337. package/lib/esm/components/Groups/GroupsAddButton.d.ts +1 -1
  338. package/lib/esm/components/Groups/GroupsAddButton.js +4 -4
  339. package/lib/esm/components/Groups/GroupsAddButton.js.map +1 -1
  340. package/lib/esm/components/Groups/GroupsAddButton.scss +1 -1
  341. package/lib/esm/components/Groups/GroupsShowHideButtons.d.ts +1 -1
  342. package/lib/esm/components/Groups/GroupsShowHideButtons.js +2 -2
  343. package/lib/esm/components/Groups/GroupsShowHideButtons.js.map +1 -1
  344. package/lib/esm/components/Groups/GroupsView.js +10 -12
  345. package/lib/esm/components/Groups/GroupsView.js.map +1 -1
  346. package/lib/esm/components/Groups/GroupsView.scss +1 -1
  347. package/lib/esm/components/Groups/GroupsVisualization.js +21 -22
  348. package/lib/esm/components/Groups/GroupsVisualization.js.map +1 -1
  349. package/lib/esm/components/Groups/GroupsVisualizationActions.js +4 -4
  350. package/lib/esm/components/Groups/GroupsVisualizationActions.js.map +1 -1
  351. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.d.ts +1 -1
  352. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js +5 -5
  353. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
  354. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.scss +7 -7
  355. package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js +13 -35
  356. package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
  357. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js +4 -4
  358. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -1
  359. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +1 -1
  360. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +4 -4
  361. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
  362. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js +4 -4
  363. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -1
  364. package/lib/esm/components/Groups/ToggleGroupVisibility.js +3 -3
  365. package/lib/esm/components/Groups/ToggleGroupVisibility.js.map +1 -1
  366. package/lib/esm/components/Groups/groupsHelpers.js +9 -5
  367. package/lib/esm/components/Groups/groupsHelpers.js.map +1 -1
  368. package/lib/esm/components/Groups/hooks/useFetchGroups.js.map +1 -1
  369. package/lib/esm/components/Groups/hooks/useGroupsOperations.d.ts +1 -1
  370. package/lib/esm/components/Groups/hooks/useGroupsOperations.js +5 -5
  371. package/lib/esm/components/Groups/hooks/useGroupsOperations.js.map +1 -1
  372. package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
  373. package/lib/esm/components/Groups/hooks/useVisualization.js +3 -5
  374. package/lib/esm/components/Groups/hooks/useVisualization.js.map +1 -1
  375. package/lib/esm/components/Mappings/BlockingOverlay.js +3 -3
  376. package/lib/esm/components/Mappings/BlockingOverlay.js.map +1 -1
  377. package/lib/esm/components/Mappings/Editing/MappingAction.js +11 -15
  378. package/lib/esm/components/Mappings/Editing/MappingAction.js.map +1 -1
  379. package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.d.ts +1 -1
  380. package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js +1 -1
  381. package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
  382. package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js +9 -6
  383. package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
  384. package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js +3 -3
  385. package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js.map +1 -1
  386. package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js +3 -3
  387. package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js.map +1 -1
  388. package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js +3 -3
  389. package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js.map +1 -1
  390. package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js +3 -3
  391. package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js.map +1 -1
  392. package/lib/esm/components/Mappings/Extraction/ExtractionStatus.d.ts +1 -1
  393. package/lib/esm/components/Mappings/Extraction/ExtractionStatus.js +9 -9
  394. package/lib/esm/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
  395. package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.js +4 -4
  396. package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -1
  397. package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js +27 -31
  398. package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
  399. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.d.ts +1 -1
  400. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js +3 -3
  401. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
  402. package/lib/esm/components/Mappings/Import/SelectIModel.d.ts +1 -1
  403. package/lib/esm/components/Mappings/Import/SelectIModel.js +5 -5
  404. package/lib/esm/components/Mappings/Import/SelectIModel.js.map +1 -1
  405. package/lib/esm/components/Mappings/Import/SelectITwin.js +2 -2
  406. package/lib/esm/components/Mappings/Import/SelectITwin.js.map +1 -1
  407. package/lib/esm/components/Mappings/Import/SelectITwin.scss +1 -1
  408. package/lib/esm/components/Mappings/Import/SelectMappings.d.ts +1 -1
  409. package/lib/esm/components/Mappings/Import/SelectMappings.js +8 -8
  410. package/lib/esm/components/Mappings/Import/SelectMappings.js.map +1 -1
  411. package/lib/esm/components/Mappings/MappingListItem.js.map +1 -1
  412. package/lib/esm/components/Mappings/MappingViewActionGroup.d.ts +1 -1
  413. package/lib/esm/components/Mappings/MappingViewActionGroup.js +8 -8
  414. package/lib/esm/components/Mappings/MappingViewActionGroup.js.map +1 -1
  415. package/lib/esm/components/Mappings/Mappings.js +3 -3
  416. package/lib/esm/components/Mappings/Mappings.js.map +1 -1
  417. package/lib/esm/components/Mappings/MappingsView.js +15 -17
  418. package/lib/esm/components/Mappings/MappingsView.js.map +1 -1
  419. package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js +3 -1
  420. package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
  421. package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -1
  422. package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js +3 -3
  423. package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
  424. package/lib/esm/components/Mappings/hooks/useFetchMappings.js +1 -1
  425. package/lib/esm/components/Mappings/hooks/useFetchMappings.js.map +1 -1
  426. package/lib/esm/components/Mappings/hooks/useMappingsOperations.js +36 -18
  427. package/lib/esm/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
  428. package/lib/esm/components/Mappings/hooks/useRunExtraction.d.ts +1 -1
  429. package/lib/esm/components/Mappings/hooks/useRunExtraction.js +8 -6
  430. package/lib/esm/components/Mappings/hooks/useRunExtraction.js.map +1 -1
  431. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +1 -1
  432. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +9 -9
  433. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
  434. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +13 -15
  435. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
  436. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +2 -2
  437. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +1 -1
  438. package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +5 -7
  439. package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
  440. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +1 -1
  441. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js +28 -22
  442. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
  443. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.scss +1 -1
  444. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js +17 -13
  445. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js.map +1 -1
  446. package/lib/esm/components/Properties/GroupColorToggle.js +4 -4
  447. package/lib/esm/components/Properties/GroupColorToggle.js.map +1 -1
  448. package/lib/esm/components/Properties/GroupInformationPanel.js +3 -3
  449. package/lib/esm/components/Properties/GroupInformationPanel.js.map +1 -1
  450. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.d.ts +1 -1
  451. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js +22 -29
  452. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
  453. package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +1 -1
  454. package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.js +5 -5
  455. package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.js.map +1 -1
  456. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.d.ts +1 -1
  457. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js +16 -14
  458. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
  459. package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js +21 -40
  460. package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
  461. package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +26 -35
  462. package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
  463. package/lib/esm/components/Properties/GroupProperties/SaveModal.d.ts +1 -1
  464. package/lib/esm/components/Properties/GroupProperties/SaveModal.js +8 -8
  465. package/lib/esm/components/Properties/GroupProperties/SaveModal.js.map +1 -1
  466. package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js +4 -4
  467. package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
  468. package/lib/esm/components/Properties/PropertyAction.js +9 -21
  469. package/lib/esm/components/Properties/PropertyAction.js.map +1 -1
  470. package/lib/esm/components/Properties/PropertyMenu.js +4 -4
  471. package/lib/esm/components/Properties/PropertyMenu.js.map +1 -1
  472. package/lib/esm/components/Properties/PropertyMenuWithVisualization.js +5 -5
  473. package/lib/esm/components/Properties/PropertyMenuWithVisualization.js.map +1 -1
  474. package/lib/esm/components/Properties/PropertyNameCell.d.ts +1 -1
  475. package/lib/esm/components/Properties/PropertyNameCell.js +4 -4
  476. package/lib/esm/components/Properties/PropertyNameCell.js.map +1 -1
  477. package/lib/esm/components/Properties/PropertyTable.js +5 -6
  478. package/lib/esm/components/Properties/PropertyTable.js.map +1 -1
  479. package/lib/esm/components/Properties/PropertyTableToolbar.d.ts +1 -1
  480. package/lib/esm/components/Properties/PropertyTableToolbar.js +4 -4
  481. package/lib/esm/components/Properties/PropertyTableToolbar.js.map +1 -1
  482. package/lib/esm/components/Properties/hooks/useFormulaValidation.js +3 -3
  483. package/lib/esm/components/Properties/hooks/useFormulaValidation.js.map +1 -1
  484. package/lib/esm/components/Properties/hooks/usePropertiesQuery.js.map +1 -1
  485. package/lib/esm/components/Properties/hooks/useValidator.js +4 -4
  486. package/lib/esm/components/Properties/hooks/useValidator.js.map +1 -1
  487. package/lib/esm/components/SharedComponents/ActionPanel.d.ts +1 -1
  488. package/lib/esm/components/SharedComponents/ActionPanel.js +9 -10
  489. package/lib/esm/components/SharedComponents/ActionPanel.js.map +1 -1
  490. package/lib/esm/components/SharedComponents/DeleteModal.d.ts +1 -1
  491. package/lib/esm/components/SharedComponents/DeleteModal.js +10 -11
  492. package/lib/esm/components/SharedComponents/DeleteModal.js.map +1 -1
  493. package/lib/esm/components/SharedComponents/EmptyMessage.js +4 -4
  494. package/lib/esm/components/SharedComponents/EmptyMessage.js.map +1 -1
  495. package/lib/esm/components/SharedComponents/LoadingOverlay.js +4 -4
  496. package/lib/esm/components/SharedComponents/LoadingOverlay.js.map +1 -1
  497. package/lib/esm/components/SharedComponents/LoadingSpinner.js +3 -3
  498. package/lib/esm/components/SharedComponents/LoadingSpinner.js.map +1 -1
  499. package/lib/esm/components/SharedComponents/StatusIcon.js +3 -3
  500. package/lib/esm/components/SharedComponents/StatusIcon.js.map +1 -1
  501. package/lib/esm/components/context/ExtractionClientContext.js.map +1 -1
  502. package/lib/esm/components/context/ExtractionStateJobContext.js +3 -3
  503. package/lib/esm/components/context/ExtractionStateJobContext.js.map +1 -1
  504. package/lib/esm/components/context/GroupHilitedElementsContext.js +3 -3
  505. package/lib/esm/components/context/GroupHilitedElementsContext.js.map +1 -1
  506. package/lib/esm/components/context/GroupingApiConfigContext.js.map +1 -1
  507. package/lib/esm/components/context/GroupingMappingCustomUIContext.js +3 -3
  508. package/lib/esm/components/context/GroupingMappingCustomUIContext.js.map +1 -1
  509. package/lib/esm/components/context/GroupsClientContext.js.map +1 -1
  510. package/lib/esm/components/context/IModelsClientContext.js.map +1 -1
  511. package/lib/esm/components/context/ITwinsClientContext.js +3 -3
  512. package/lib/esm/components/context/ITwinsClientContext.js.map +1 -1
  513. package/lib/esm/components/context/MappingClientContext.js.map +1 -1
  514. package/lib/esm/components/context/PropertiesClientContext.js.map +1 -1
  515. package/lib/esm/components/context/PropertiesGroupColorContext.js +3 -3
  516. package/lib/esm/components/context/PropertiesGroupColorContext.js.map +1 -1
  517. package/lib/esm/components/context/PropertyGridWrapperContext.js +3 -3
  518. package/lib/esm/components/context/PropertyGridWrapperContext.js.map +1 -1
  519. package/lib/esm/components/customUI/DefaultGroupingUI.js +3 -3
  520. package/lib/esm/components/customUI/DefaultGroupingUI.js.map +1 -1
  521. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.d.ts +1 -1
  522. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js +14 -19
  523. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
  524. package/lib/esm/components/customUI/GroupingMappingCustomUI.js.map +1 -1
  525. package/lib/esm/components/customUI/ManualGroupingCustomUI.d.ts +1 -1
  526. package/lib/esm/components/customUI/ManualGroupingCustomUI.js +8 -8
  527. package/lib/esm/components/customUI/ManualGroupingCustomUI.js.map +1 -1
  528. package/lib/esm/components/customUI/SearchGroupingCustomUI.d.ts +1 -1
  529. package/lib/esm/components/customUI/SearchGroupingCustomUI.js +16 -45
  530. package/lib/esm/components/customUI/SearchGroupingCustomUI.js.map +1 -1
  531. package/lib/esm/decorators/BboxDimensionsDecorator.js +5 -12
  532. package/lib/esm/decorators/BboxDimensionsDecorator.js.map +1 -1
  533. package/lib/esm/formula/FormulaDataTypeResolver.js +3 -3
  534. package/lib/esm/formula/FormulaDataTypeResolver.js.map +1 -1
  535. package/lib/esm/formula/FormulaFunctionProvider.js +146 -65
  536. package/lib/esm/formula/FormulaFunctionProvider.js.map +1 -1
  537. package/lib/esm/formula/FormulaOperatorsProvider.js +138 -44
  538. package/lib/esm/formula/FormulaOperatorsProvider.js.map +1 -1
  539. package/lib/esm/formula/FormulaSplitter.js +63 -13
  540. package/lib/esm/formula/FormulaSplitter.js.map +1 -1
  541. package/lib/esm/formula/FormulaTokensDataTypeResolver.js +7 -14
  542. package/lib/esm/formula/FormulaTokensDataTypeResolver.js.map +1 -1
  543. package/lib/esm/formula/IResult.js.map +1 -1
  544. package/lib/esm/formula/InfixToPostfixConverter.js +5 -5
  545. package/lib/esm/formula/InfixToPostfixConverter.js.map +1 -1
  546. package/lib/esm/formula/InputStream.js +3 -3
  547. package/lib/esm/formula/InputStream.js.map +1 -1
  548. package/lib/esm/formula/ParenthesisValidator.js +3 -3
  549. package/lib/esm/formula/ParenthesisValidator.js.map +1 -1
  550. package/lib/esm/formula/Queue.js +3 -3
  551. package/lib/esm/formula/Queue.js.map +1 -1
  552. package/lib/esm/formula/Stack.js +3 -3
  553. package/lib/esm/formula/Stack.js.map +1 -1
  554. package/lib/esm/formula/StringBuilder.js +3 -3
  555. package/lib/esm/formula/StringBuilder.js.map +1 -1
  556. package/lib/esm/formula/Types.js.map +1 -1
  557. package/lib/esm/formula/Utils.js +4 -4
  558. package/lib/esm/formula/Utils.js.map +1 -1
  559. package/lib/esm/grouping-mapping-widget.d.ts +4 -4
  560. package/lib/esm/grouping-mapping-widget.js +7 -7
  561. package/lib/esm/grouping-mapping-widget.js.map +1 -1
  562. package/lib/esm/test/GroupPropertyUtils.test.js +28 -27
  563. package/lib/esm/test/GroupPropertyUtils.test.js.map +1 -1
  564. package/lib/esm/test/GroupingMappingCustomUI.test.js +4 -6
  565. package/lib/esm/test/GroupingMappingCustomUI.test.js.map +1 -1
  566. package/lib/esm/test/MockFactory.js +3 -3
  567. package/lib/esm/test/MockFactory.js.map +1 -1
  568. package/lib/esm/test/PropertyFieldsHelpers.js +3 -3
  569. package/lib/esm/test/PropertyFieldsHelpers.js.map +1 -1
  570. package/lib/esm/test/QueryBuilder.test.js +3 -3
  571. package/lib/esm/test/QueryBuilder.test.js.map +1 -1
  572. package/lib/esm/test/QueryBuilder.testdata.js +3 -3
  573. package/lib/esm/test/QueryBuilder.testdata.js.map +1 -1
  574. package/lib/esm/test/QueryBuilderTestData.js.map +1 -1
  575. package/lib/esm/test/WidgetHeader.test.js +3 -3
  576. package/lib/esm/test/WidgetHeader.test.js.map +1 -1
  577. package/lib/esm/test/test-utils.js +4 -4
  578. package/lib/esm/test/test-utils.js.map +1 -1
  579. package/package.json +8 -4
@@ -1 +1 @@
1
- {"version":3,"file":"QueryBuilderTestData.js","sourceRoot":"","sources":["../../../src/test/QueryBuilderTestData.ts"],"names":[],"mappings":"","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 type { PropertyDescription, PropertyValue } from \"@itwin/appui-abstract\";\nimport type { FieldDescriptorType, RelationshipPath } from \"@itwin/presentation-common\";\n\nexport interface ClassInfoTestData {\n name: string;\n}\n\nexport interface NavigationPropertyInfoTestData {\n classInfo: ClassInfoTestData;\n}\n\nexport interface PropertyTestData {\n name: string;\n classInfo: ClassInfoTestData;\n navigationPropertyInfo?: NavigationPropertyInfoTestData;\n}\n\nexport interface PropertiesTestData {\n property: PropertyTestData;\n}\n\nexport interface ContentClassInfoTestData {\n name: string;\n}\n\nexport interface ParentTestData {\n pathToPrimaryClass: RelationshipPath;\n contentClassInfo?: ContentClassInfoTestData;\n}\n\nexport interface TypeTestData {\n typeName: string;\n}\n\nexport interface PropertiesFieldTestData {\n properties: PropertiesTestData[];\n type: TypeTestData;\n parent: ParentTestData;\n}\n\nexport interface PropertyRecordTestData {\n value: PropertyValue;\n property: PropertyDescription;\n}\n\nexport interface OperationTestData {\n expectedResult?: boolean;\n operationType: string;\n fieldDescriptorType: FieldDescriptorType.Name | FieldDescriptorType.Properties;\n fieldDescriptorName?: string;\n propertyRecord: PropertyRecordTestData;\n propertiesField: PropertiesFieldTestData;\n}\n\nexport interface TestCase {\n name: string;\n expectedResult: string;\n operations: OperationTestData[];\n}\n\nexport interface QueryBuilderTestData {\n testCases: TestCase[];\n}\n"]}
1
+ {"version":3,"file":"QueryBuilderTestData.js","sourceRoot":"","sources":["../../../src/test/QueryBuilderTestData.ts"],"names":[],"mappings":"","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 type { PropertyDescription, PropertyValue } from \"@itwin/appui-abstract\";\nimport type { FieldDescriptorType, RelationshipPath } from \"@itwin/presentation-common\";\n\nexport interface ClassInfoTestData {\n name: string;\n}\n\nexport interface NavigationPropertyInfoTestData {\n classInfo: ClassInfoTestData;\n}\n\nexport interface PropertyTestData {\n name: string;\n classInfo: ClassInfoTestData;\n navigationPropertyInfo?: NavigationPropertyInfoTestData;\n}\n\nexport interface PropertiesTestData {\n property: PropertyTestData;\n}\n\nexport interface ContentClassInfoTestData {\n name: string;\n}\n\nexport interface ParentTestData {\n pathToPrimaryClass: RelationshipPath;\n contentClassInfo?: ContentClassInfoTestData;\n}\n\nexport interface TypeTestData {\n typeName: string;\n}\n\nexport interface PropertiesFieldTestData {\n properties: PropertiesTestData[];\n type: TypeTestData;\n parent: ParentTestData;\n}\n\nexport interface PropertyRecordTestData {\n value: PropertyValue;\n property: PropertyDescription;\n}\n\nexport interface OperationTestData {\n expectedResult?: boolean;\n operationType: string;\n fieldDescriptorType: FieldDescriptorType.Name | FieldDescriptorType.Properties;\n fieldDescriptorName?: string;\n propertyRecord: PropertyRecordTestData;\n propertiesField: PropertiesFieldTestData;\n}\n\nexport interface TestCase {\n name: string;\n expectedResult: string;\n operations: OperationTestData[];\n}\n\nexport interface QueryBuilderTestData {\n testCases: TestCase[];\n}\n"]}
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  /*---------------------------------------------------------------------------------------------
7
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
8
- * See LICENSE.md in the project root for license terms and full copyright notice.
9
- *--------------------------------------------------------------------------------------------*/
7
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
8
+ * See LICENSE.md in the project root for license terms and full copyright notice.
9
+ *--------------------------------------------------------------------------------------------*/
10
10
  const react_1 = __importDefault(require("react"));
11
11
  require("@testing-library/jest-dom");
12
12
  const test_utils_1 = require("../test/test-utils");
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetHeader.test.js","sourceRoot":"","sources":["../../../src/test/WidgetHeader.test.tsx"],"names":[],"mappings":";;;;;AAAA;;;+FAG+F;AAC/F,kDAA0B;AAC1B,qCAAmC;AACnC,mDAAoD;AACpD,2CAAwC;AACxC,2EAAwE;AAExE,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,eAAe,EAAE,KAAK,IAAI,EAAE;QAC7B,UAAU;QACV,MAAM,SAAS,GAAG,aAAK,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;QAE5C,MAAM;QACN,IAAA,mBAAM,EAAC,8BAAC,2BAAY,IAAC,KAAK,EAAE,SAAS,GAAI,CAAC,CAAC;QAE3C,SAAS;QACT,MAAM,KAAK,GAAG,mBAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC1C,MAAM,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+BAA+B,EAAE,KAAK,IAAI,EAAE;QAC7C,UAAU;QACV,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAE/B,MAAM;QACN,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAA,mBAAM,EAAC,8BAAC,2BAAY,IAAC,KAAK,EAAC,EAAE,EAAC,QAAQ,EAAE,YAAY,GAAI,CAAC,CAAC;QAEtF,SAAS;QACT,MAAM,SAAS,GAAG,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QACrE,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC5B,MAAM,CAAC,YAAY,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport React from \"react\";\nimport \"@testing-library/jest-dom\";\nimport { render, screen } from \"../test/test-utils\";\nimport { faker } from \"@faker-js/faker\";\nimport { WidgetHeader } from \"../WidgetShell/WidgetHeader/WidgetHeader\";\n\ndescribe(\"Widget Header Component\", () => {\n it(\"title renders\", async () => {\n // Arrange\n const fakeTitle = faker.word.interjection();\n\n // Act\n render(<WidgetHeader title={fakeTitle} />);\n\n // Assert\n const title = screen.getByText(fakeTitle);\n expect(title).toHaveTextContent(fakeTitle);\n });\n\n it(\"header allows return callback\", async () => {\n // Arrange\n const mockReturnFn = jest.fn();\n\n // Act\n const { user, container } = render(<WidgetHeader title=\"\" returnFn={mockReturnFn} />);\n\n // Assert\n const returnBtn = container.getElementsByClassName(\"gmw-chevron\")[0];\n await user.click(returnBtn);\n expect(mockReturnFn).toHaveBeenCalledTimes(1);\n });\n});\n"]}
1
+ {"version":3,"file":"WidgetHeader.test.js","sourceRoot":"","sources":["../../../src/test/WidgetHeader.test.tsx"],"names":[],"mappings":";;;;;AAAA;;;gGAGgG;AAChG,kDAA0B;AAC1B,qCAAmC;AACnC,mDAAoD;AACpD,2CAAwC;AACxC,2EAAwE;AAExE,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,eAAe,EAAE,KAAK,IAAI,EAAE;QAC7B,UAAU;QACV,MAAM,SAAS,GAAG,aAAK,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;QAE5C,MAAM;QACN,IAAA,mBAAM,EAAC,8BAAC,2BAAY,IAAC,KAAK,EAAE,SAAS,GAAI,CAAC,CAAC;QAE3C,SAAS;QACT,MAAM,KAAK,GAAG,mBAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC1C,MAAM,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+BAA+B,EAAE,KAAK,IAAI,EAAE;QAC7C,UAAU;QACV,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAE/B,MAAM;QACN,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAA,mBAAM,EAAC,8BAAC,2BAAY,IAAC,KAAK,EAAC,EAAE,EAAC,QAAQ,EAAE,YAAY,GAAI,CAAC,CAAC;QAEtF,SAAS;QACT,MAAM,SAAS,GAAG,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QACrE,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC5B,MAAM,CAAC,YAAY,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport React from \"react\";\nimport \"@testing-library/jest-dom\";\nimport { render, screen } from \"../test/test-utils\";\nimport { faker } from \"@faker-js/faker\";\nimport { WidgetHeader } from \"../WidgetShell/WidgetHeader/WidgetHeader\";\n\ndescribe(\"Widget Header Component\", () => {\n it(\"title renders\", async () => {\n // Arrange\n const fakeTitle = faker.word.interjection();\n\n // Act\n render(<WidgetHeader title={fakeTitle} />);\n\n // Assert\n const title = screen.getByText(fakeTitle);\n expect(title).toHaveTextContent(fakeTitle);\n });\n\n it(\"header allows return callback\", async () => {\n // Arrange\n const mockReturnFn = jest.fn();\n\n // Act\n const { user, container } = render(<WidgetHeader title=\"\" returnFn={mockReturnFn} />);\n\n // Assert\n const returnBtn = container.getElementsByClassName(\"gmw-chevron\")[0];\n await user.click(returnBtn);\n expect(mockReturnFn).toHaveBeenCalledTimes(1);\n });\n});\n"]}
@@ -31,9 +31,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
32
  exports.render = exports.mockMappingClient = exports.mockAccessToken = void 0;
33
33
  /*---------------------------------------------------------------------------------------------
34
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
35
- * See LICENSE.md in the project root for license terms and full copyright notice.
36
- *--------------------------------------------------------------------------------------------*/
34
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
35
+ * See LICENSE.md in the project root for license terms and full copyright notice.
36
+ *--------------------------------------------------------------------------------------------*/
37
37
  const React = __importStar(require("react"));
38
38
  const react_1 = require("@testing-library/react");
39
39
  const user_event_1 = __importDefault(require("@testing-library/user-event"));
@@ -56,7 +56,7 @@ function render(ui, mockUIs = [], { ...options } = {}) {
56
56
  },
57
57
  }),
58
58
  };
59
- const Wrapper = ({ children }) => (React.createElement(GroupingMappingContext_1.GroupingMappingContext, { ...contextProps }, children));
59
+ const Wrapper = ({ children }) => React.createElement(GroupingMappingContext_1.GroupingMappingContext, { ...contextProps }, children);
60
60
  return {
61
61
  user: user_event_1.default.setup(),
62
62
  ...(0, react_1.render)(ui, { wrapper: Wrapper, ...options }),
@@ -1 +1 @@
1
- {"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../../../src/test/test-utils.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,6CAA+B;AAC/B,kDAA6D;AAC7D,6EAAoD;AAGpD,6CAA+B;AAE/B,iFAA8E;AAC9E,uDAAoD;AAE7C,MAAM,eAAe,GAAG,KAAK,IAAI,EAAE,CAAC,iBAAiB,CAAC;AAAhD,QAAA,eAAe,mBAAiC;AAChD,QAAA,iBAAiB,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,EAAmB,CAAC;AAMpE,SAAS,MAAM,CAAC,EAAsB,EAAE,UAAqC,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE;IAClG,MAAM,YAAY,GAAgC;QAChD,cAAc,EAAE,uBAAe;QAC/B,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,OAAO;QAClB,WAAW,EAAE,IAAI,yBAAW,CAAC;YAC3B,cAAc,EAAE;gBACd,OAAO,EAAE;oBACP,oBAAoB,EAAE,KAAK;iBAC5B;aACF;SACF,CAAC;KACH,CAAC;IACF,MAAM,OAAO,GAAG,CAAC,EAAE,QAAQ,EAAgB,EAAE,EAAE,CAAC,CAC9C,oBAAC,+CAAsB,OAAK,YAAY,IACrC,QAAQ,CACc,CAC1B,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,oBAAS,CAAC,KAAK,EAAE;QACvB,GAAG,IAAA,cAAS,EAAC,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC;KACnD,CAAC;AACJ,CAAC;AAIQ,wBAAM;AAFf,yDAAuC","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 * as React from \"react\";\nimport { render as rtlRender } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport type { IMappingsClient } from \"@itwin/insights-client\";\nimport type { GroupingMappingCustomUI } from \"../grouping-mapping-widget\";\nimport * as moq from \"typemoq\";\nimport type { GroupingMappingContextProps } from \"../components/GroupingMappingContext\";\nimport { GroupingMappingContext } from \"../components/GroupingMappingContext\";\nimport { QueryClient } from \"@tanstack/react-query\";\n\nexport const mockAccessToken = async () => \"Bearer eyJhbGci\";\nexport const mockMappingClient = moq.Mock.ofType<IMappingsClient>();\n\ninterface WrapperProps {\n children?: React.ReactNode;\n}\n\nfunction render(ui: React.ReactElement, mockUIs: GroupingMappingCustomUI[] = [], { ...options } = {}) {\n const contextProps: GroupingMappingContextProps = {\n getAccessToken: mockAccessToken,\n iModelId: \"mock\",\n customUIs: mockUIs,\n queryClient: new QueryClient({\n defaultOptions: {\n queries: {\n refetchOnWindowFocus: false,\n },\n },\n }),\n };\n const Wrapper = ({ children }: WrapperProps) => (\n <GroupingMappingContext {...contextProps}>\n {children}\n </GroupingMappingContext>\n );\n\n return {\n user: userEvent.setup(),\n ...rtlRender(ui, { wrapper: Wrapper, ...options }),\n };\n}\n\nexport * from \"@testing-library/react\";\n// override React Testing Library's render with our own\nexport { render };\n"]}
1
+ {"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../../../src/test/test-utils.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG,6CAA+B;AAC/B,kDAA6D;AAC7D,6EAAoD;AAGpD,6CAA+B;AAE/B,iFAA8E;AAC9E,uDAAoD;AAE7C,MAAM,eAAe,GAAG,KAAK,IAAI,EAAE,CAAC,iBAAiB,CAAC;AAAhD,QAAA,eAAe,mBAAiC;AAChD,QAAA,iBAAiB,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,EAAmB,CAAC;AAMpE,SAAS,MAAM,CAAC,EAAsB,EAAE,UAAqC,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE;IAClG,MAAM,YAAY,GAAgC;QAChD,cAAc,EAAE,uBAAe;QAC/B,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,OAAO;QAClB,WAAW,EAAE,IAAI,yBAAW,CAAC;YAC3B,cAAc,EAAE;gBACd,OAAO,EAAE;oBACP,oBAAoB,EAAE,KAAK;iBAC5B;aACF;SACF,CAAC;KACH,CAAC;IACF,MAAM,OAAO,GAAG,CAAC,EAAE,QAAQ,EAAgB,EAAE,EAAE,CAAC,oBAAC,+CAAsB,OAAK,YAAY,IAAG,QAAQ,CAA0B,CAAC;IAE9H,OAAO;QACL,IAAI,EAAE,oBAAS,CAAC,KAAK,EAAE;QACvB,GAAG,IAAA,cAAS,EAAC,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC;KACnD,CAAC;AACJ,CAAC;AAIQ,wBAAM;AAFf,yDAAuC","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 * as React from \"react\";\nimport { render as rtlRender } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport type { IMappingsClient } from \"@itwin/insights-client\";\nimport type { GroupingMappingCustomUI } from \"../grouping-mapping-widget\";\nimport * as moq from \"typemoq\";\nimport type { GroupingMappingContextProps } from \"../components/GroupingMappingContext\";\nimport { GroupingMappingContext } from \"../components/GroupingMappingContext\";\nimport { QueryClient } from \"@tanstack/react-query\";\n\nexport const mockAccessToken = async () => \"Bearer eyJhbGci\";\nexport const mockMappingClient = moq.Mock.ofType<IMappingsClient>();\n\ninterface WrapperProps {\n children?: React.ReactNode;\n}\n\nfunction render(ui: React.ReactElement, mockUIs: GroupingMappingCustomUI[] = [], { ...options } = {}) {\n const contextProps: GroupingMappingContextProps = {\n getAccessToken: mockAccessToken,\n iModelId: \"mock\",\n customUIs: mockUIs,\n queryClient: new QueryClient({\n defaultOptions: {\n queries: {\n refetchOnWindowFocus: false,\n },\n },\n }),\n };\n const Wrapper = ({ children }: WrapperProps) => <GroupingMappingContext {...contextProps}>{children}</GroupingMappingContext>;\n\n return {\n user: userEvent.setup(),\n ...rtlRender(ui, { wrapper: Wrapper, ...options }),\n };\n}\n\nexport * from \"@testing-library/react\";\n// override React Testing Library's render with our own\nexport { render };\n"]}
@@ -3,7 +3,7 @@ import { GroupingMappingContext } from "../components/GroupingMappingContext";
3
3
  import "./GroupingMapping.scss";
4
4
  import { useActiveIModelConnection } from "@itwin/appui-react";
5
5
  import { GroupingMappingCustomUIType } from "../components/customUI/GroupingMappingCustomUI";
6
- import { SvgList, } from "@itwin/itwinui-icons-react";
6
+ import { SvgList } from "@itwin/itwinui-icons-react";
7
7
  import { GroupingMappingContent } from "./GroupingMappingContent";
8
8
  import { GroupingMappingHeader } from "./GroupingMappingHeader";
9
9
  import { defaultGroupingUI } from "../components/customUI/DefaultGroupingUI";
@@ -20,9 +20,7 @@ export var RouteStep;
20
20
  RouteStep[RouteStep["CustomCalculationPropertyAction"] = 8] = "CustomCalculationPropertyAction";
21
21
  })(RouteStep || (RouteStep = {}));
22
22
  const GroupingMapping = (props) => {
23
- const [routingHistory, setRoutingHistory] = useState([
24
- { step: RouteStep.Mappings, title: "Mapping", groupingRouteFields: {} },
25
- ]);
23
+ const [routingHistory, setRoutingHistory] = useState([{ step: RouteStep.Mappings, title: "Mapping", groupingRouteFields: {} }]);
26
24
  const currentRoute = routingHistory[routingHistory.length - 1];
27
25
  const activeIModelConnection = useActiveIModelConnection();
28
26
  const iModelConnection = props.iModelConnection ?? activeIModelConnection;
@@ -48,7 +46,7 @@ const GroupingMapping = (props) => {
48
46
  })),
49
47
  },
50
48
  // No group UI's provided means the widget provides its own
51
- ...props.customUIs ?? defaultGroupingUI,
49
+ ...(props.customUIs ?? defaultGroupingUI),
52
50
  ], [props.customUIs, navigateTo]);
53
51
  return (React.createElement(GroupingMappingContext, { iModelId: iModelId, ...props, customUIs: injectedCustomUI },
54
52
  React.createElement("div", { className: "gmw-group-mapping-container" },
@@ -1 +1 @@
1
- {"version":3,"file":"GroupingMapping.js","sourceRoot":"","sources":["../../../src/WidgetShell/GroupingMapping.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAK/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EACL,OAAO,GACR,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAI7E,MAAM,CAAN,IAAY,SAUX;AAVD,WAAY,SAAS;IACnB,iDAAQ,CAAA;IACR,6DAAc,CAAA;IACd,6CAAM,CAAA;IACN,uDAAW,CAAA;IACX,yEAAoB,CAAA;IACpB,qDAAU,CAAA;IACV,6DAAc,CAAA;IACd,iFAAwB,CAAA;IACxB,+FAA+B,CAAA;AACjC,CAAC,EAVW,SAAS,KAAT,SAAS,QAUpB;AAkBD,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAE,EAAE;IACtD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAU;QAC5D,EAAE,IAAI,EAAE,SAAS,CAAC,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,EAAE,EAAE;KACxE,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC/D,MAAM,sBAAsB,GAAG,yBAAyB,EAAE,CAAC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sB,IACrB,QAAQ,EAAE,QAAQ,KACd,KAAK,EACT,SAAS,EAAE,gBAAgB;QAE3B,6BAAK,SAAS,EAAC,6BAA6B;YAC1C,oBAAC,qBAAqB,IACpB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,GAC1B;YACF,oBAAC,sBAAsB,IACrB,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,GACd,CACE,CACiB,CAC1B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type {\n GroupMinimal,\n Mapping,\n Property,\n} from \"@itwin/insights-client\";\nimport React, { useCallback, useMemo, useState } from \"react\";\nimport type { GroupingMappingContextProps } from \"../components/GroupingMappingContext\";\nimport { GroupingMappingContext } from \"../components/GroupingMappingContext\";\nimport \"./GroupingMapping.scss\";\nimport { useActiveIModelConnection } from \"@itwin/appui-react\";\nimport type {\n ContextCustomUI,\n GroupingMappingCustomUI,\n} from \"../components/customUI/GroupingMappingCustomUI\";\nimport { GroupingMappingCustomUIType } from \"../components/customUI/GroupingMappingCustomUI\";\nimport {\n SvgList,\n} from \"@itwin/itwinui-icons-react\";\nimport { GroupingMappingContent } from \"./GroupingMappingContent\";\nimport { GroupingMappingHeader } from \"./GroupingMappingHeader\";\nimport { defaultGroupingUI } from \"../components/customUI/DefaultGroupingUI\";\n\nexport type GroupingMappingProps = Omit<GroupingMappingContextProps, \"iModelId\">;\n\nexport enum RouteStep {\n Mappings,\n MappingsAction,\n Groups,\n GroupAction,\n GroupContextCustomUI,\n Properties,\n PropertyAction,\n CalculatedPropertyAction,\n CustomCalculationPropertyAction,\n}\n\nexport interface Route {\n step: RouteStep;\n title: string;\n groupingRouteFields: GroupingRouteFields;\n}\nexport interface GroupingRouteFields {\n mapping?: Mapping;\n group?: GroupMinimal;\n property?: Property;\n calculatedProperty?: Property;\n customCalculation?: Property;\n // Optional prop but cannot be declared undefined.\n groupContextCustomUI?: Exclude<ContextCustomUI[\"uiComponent\"], undefined>;\n queryGenerationType?: string;\n}\n\nconst GroupingMapping = (props: GroupingMappingProps) => {\n const [routingHistory, setRoutingHistory] = useState<Route[]>([\n { step: RouteStep.Mappings, title: \"Mapping\", groupingRouteFields: {} },\n ]);\n const currentRoute = routingHistory[routingHistory.length - 1];\n const activeIModelConnection = useActiveIModelConnection();\n const iModelConnection = props.iModelConnection ?? activeIModelConnection;\n const iModelId = iModelConnection?.iModelId ?? \"\";\n const navigateTo = useCallback((toRoute: (prev: Route | undefined) => Route) => {\n setRoutingHistory((r) => [...r, toRoute(r[r.length - 1])]);\n }, []);\n\n const goBack = useCallback(() => {\n const updatedRouting = [...routingHistory];\n updatedRouting.pop();\n setRoutingHistory(updatedRouting);\n }, [routingHistory]);\n\n const injectedCustomUI = useMemo<GroupingMappingCustomUI[]>(\n () => [\n {\n name: \"Properties\",\n displayLabel: \"Properties\",\n type: GroupingMappingCustomUIType.Context,\n icon: <SvgList />,\n onClick: (group) =>\n navigateTo((prev) => ({\n step: RouteStep.Properties,\n title: group.groupName,\n groupingRouteFields: { ...prev?.groupingRouteFields, group },\n })),\n },\n // No group UI's provided means the widget provides its own\n ...props.customUIs ?? defaultGroupingUI,\n ],\n [props.customUIs, navigateTo]\n );\n\n return (\n <GroupingMappingContext\n iModelId={iModelId}\n {...props}\n customUIs={injectedCustomUI}\n >\n <div className=\"gmw-group-mapping-container\">\n <GroupingMappingHeader\n goBack={goBack}\n currentRoute={currentRoute}\n />\n <GroupingMappingContent\n routingHistory={routingHistory}\n navigateTo={navigateTo}\n goBack={goBack}\n />\n </div>\n </GroupingMappingContext>\n );\n};\n\nexport default GroupingMapping;\n"]}
1
+ {"version":3,"file":"GroupingMapping.js","sourceRoot":"","sources":["../../../src/WidgetShell/GroupingMapping.tsx"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6B;YAC1C,oBAAC,qBAAqB,IAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAI;YACrE,oBAAC,sBAAsB,IAAC,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAI,CAC9F,CACiB,CAC1B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport type { GroupMinimal, Mapping, Property } from \"@itwin/insights-client\";\nimport React, { useCallback, useMemo, useState } from \"react\";\nimport type { GroupingMappingContextProps } from \"../components/GroupingMappingContext\";\nimport { GroupingMappingContext } from \"../components/GroupingMappingContext\";\nimport \"./GroupingMapping.scss\";\nimport { useActiveIModelConnection } from \"@itwin/appui-react\";\nimport type { ContextCustomUI, GroupingMappingCustomUI } from \"../components/customUI/GroupingMappingCustomUI\";\nimport { GroupingMappingCustomUIType } from \"../components/customUI/GroupingMappingCustomUI\";\nimport { SvgList } from \"@itwin/itwinui-icons-react\";\nimport { GroupingMappingContent } from \"./GroupingMappingContent\";\nimport { GroupingMappingHeader } from \"./GroupingMappingHeader\";\nimport { defaultGroupingUI } from \"../components/customUI/DefaultGroupingUI\";\n\nexport type GroupingMappingProps = Omit<GroupingMappingContextProps, \"iModelId\">;\n\nexport enum RouteStep {\n Mappings,\n MappingsAction,\n Groups,\n GroupAction,\n GroupContextCustomUI,\n Properties,\n PropertyAction,\n CalculatedPropertyAction,\n CustomCalculationPropertyAction,\n}\n\nexport interface Route {\n step: RouteStep;\n title: string;\n groupingRouteFields: GroupingRouteFields;\n}\nexport interface GroupingRouteFields {\n mapping?: Mapping;\n group?: GroupMinimal;\n property?: Property;\n calculatedProperty?: Property;\n customCalculation?: Property;\n // Optional prop but cannot be declared undefined.\n groupContextCustomUI?: Exclude<ContextCustomUI[\"uiComponent\"], undefined>;\n queryGenerationType?: string;\n}\n\nconst GroupingMapping = (props: GroupingMappingProps) => {\n const [routingHistory, setRoutingHistory] = useState<Route[]>([{ step: RouteStep.Mappings, title: \"Mapping\", groupingRouteFields: {} }]);\n const currentRoute = routingHistory[routingHistory.length - 1];\n const activeIModelConnection = useActiveIModelConnection();\n const iModelConnection = props.iModelConnection ?? activeIModelConnection;\n const iModelId = iModelConnection?.iModelId ?? \"\";\n const navigateTo = useCallback((toRoute: (prev: Route | undefined) => Route) => {\n setRoutingHistory((r) => [...r, toRoute(r[r.length - 1])]);\n }, []);\n\n const goBack = useCallback(() => {\n const updatedRouting = [...routingHistory];\n updatedRouting.pop();\n setRoutingHistory(updatedRouting);\n }, [routingHistory]);\n\n const injectedCustomUI = useMemo<GroupingMappingCustomUI[]>(\n () => [\n {\n name: \"Properties\",\n displayLabel: \"Properties\",\n type: GroupingMappingCustomUIType.Context,\n icon: <SvgList />,\n onClick: (group) =>\n navigateTo((prev) => ({\n step: RouteStep.Properties,\n title: group.groupName,\n groupingRouteFields: { ...prev?.groupingRouteFields, group },\n })),\n },\n // No group UI's provided means the widget provides its own\n ...(props.customUIs ?? defaultGroupingUI),\n ],\n [props.customUIs, navigateTo],\n );\n\n return (\n <GroupingMappingContext iModelId={iModelId} {...props} customUIs={injectedCustomUI}>\n <div className=\"gmw-group-mapping-container\">\n <GroupingMappingHeader goBack={goBack} currentRoute={currentRoute} />\n <GroupingMappingContent routingHistory={routingHistory} navigateTo={navigateTo} goBack={goBack} />\n </div>\n </GroupingMappingContext>\n );\n};\n\nexport default GroupingMapping;\n"]}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  import React, { useEffect } from "react";
6
6
  import { useGroupHilitedElementsContext } from "../components/context/GroupHilitedElementsContext";
7
7
  import { usePropertiesGroupColorContext } from "../components/context/PropertiesGroupColorContext";
@@ -23,6 +23,6 @@ export const GroupingMappingContent = ({ routingHistory, navigateTo, goBack, })
23
23
  setPropertiesShowGroup(false);
24
24
  }
25
25
  }, [routingHistory, setHiddenGroupsIds, setPropertiesShowGroup, setShowGroupColor]);
26
- return (React.createElement(GroupingMappingRouter, { currentRoute: currentRoute, navigateTo: navigateTo, goBack: goBack }));
26
+ return React.createElement(GroupingMappingRouter, { currentRoute: currentRoute, navigateTo: navigateTo, goBack: goBack });
27
27
  };
28
28
  //# sourceMappingURL=GroupingMappingContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GroupingMappingContent.js","sourceRoot":"","sources":["../../../src/WidgetShell/GroupingMappingContent.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,8BAA8B,EAAE,MAAM,mDAAmD,CAAC;AACnG,OAAO,EAAE,8BAA8B,EAAE,MAAM,mDAAmD,CAAC;AAEnG,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,cAAc,EACd,UAAU,EACV,MAAM,GAKP,EAAE,EAAE;IACH,MAAM,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,GAAG,8BAA8B,EAAE,CAAC;IACnF,MAAM,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,GAAG,8BAA8B,EAAE,CAAC;IACvF,MAAM,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAE/D,gDAAgD;IAChD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE;YAC/B,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,kBAAkB,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;YAC9B,QAAQ,EAAE,CAAC;YACX,2CAA2C;SAC5C;aAAM,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE;YACtC,sBAAsB,CAAC,KAAK,CAAC,CAAC;SAC/B;IACH,CAAC,EAAE,CAAC,cAAc,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAEpF,OAAO,CACL,oBAAC,qBAAqB,IACpB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,GACd,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport React, { useEffect } from \"react\";\nimport { useGroupHilitedElementsContext } from \"../components/context/GroupHilitedElementsContext\";\nimport { usePropertiesGroupColorContext } from \"../components/context/PropertiesGroupColorContext\";\nimport type { Route } from \"./GroupingMapping\";\nimport { GroupingMappingRouter } from \"./Router/GroupingMappingRouter\";\nimport { clearAll } from \"../common/viewerUtils\";\n\nexport const GroupingMappingContent = ({\n routingHistory,\n navigateTo,\n goBack,\n}: {\n routingHistory: Route[];\n navigateTo: (toRoute: (prev: Route | undefined) => Route) => void;\n goBack: () => void;\n}) => {\n const { setShowGroupColor, setHiddenGroupsIds } = useGroupHilitedElementsContext();\n const { setShowGroupColor: setPropertiesShowGroup } = usePropertiesGroupColorContext();\n const currentRoute = routingHistory[routingHistory.length - 1];\n\n // Clean up group visualization when in mappings\n useEffect(() => {\n if (routingHistory.length === 1) {\n setShowGroupColor(false);\n setHiddenGroupsIds(new Set());\n clearAll();\n // Turn off visualiztion in properties menu\n } else if (routingHistory.length === 2) {\n setPropertiesShowGroup(false);\n }\n }, [routingHistory, setHiddenGroupsIds, setPropertiesShowGroup, setShowGroupColor]);\n\n return (\n <GroupingMappingRouter\n currentRoute={currentRoute}\n navigateTo={navigateTo}\n goBack={goBack}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"GroupingMappingContent.js","sourceRoot":"","sources":["../../../src/WidgetShell/GroupingMappingContent.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,8BAA8B,EAAE,MAAM,mDAAmD,CAAC;AACnG,OAAO,EAAE,8BAA8B,EAAE,MAAM,mDAAmD,CAAC;AAEnG,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,cAAc,EACd,UAAU,EACV,MAAM,GAKP,EAAE,EAAE;IACH,MAAM,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,GAAG,8BAA8B,EAAE,CAAC;IACnF,MAAM,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,GAAG,8BAA8B,EAAE,CAAC;IACvF,MAAM,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAE/D,gDAAgD;IAChD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE;YAC/B,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,kBAAkB,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;YAC9B,QAAQ,EAAE,CAAC;YACX,2CAA2C;SAC5C;aAAM,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE;YACtC,sBAAsB,CAAC,KAAK,CAAC,CAAC;SAC/B;IACH,CAAC,EAAE,CAAC,cAAc,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAEpF,OAAO,oBAAC,qBAAqB,IAAC,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;AACvG,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport React, { useEffect } from \"react\";\nimport { useGroupHilitedElementsContext } from \"../components/context/GroupHilitedElementsContext\";\nimport { usePropertiesGroupColorContext } from \"../components/context/PropertiesGroupColorContext\";\nimport type { Route } from \"./GroupingMapping\";\nimport { GroupingMappingRouter } from \"./Router/GroupingMappingRouter\";\nimport { clearAll } from \"../common/viewerUtils\";\n\nexport const GroupingMappingContent = ({\n routingHistory,\n navigateTo,\n goBack,\n}: {\n routingHistory: Route[];\n navigateTo: (toRoute: (prev: Route | undefined) => Route) => void;\n goBack: () => void;\n}) => {\n const { setShowGroupColor, setHiddenGroupsIds } = useGroupHilitedElementsContext();\n const { setShowGroupColor: setPropertiesShowGroup } = usePropertiesGroupColorContext();\n const currentRoute = routingHistory[routingHistory.length - 1];\n\n // Clean up group visualization when in mappings\n useEffect(() => {\n if (routingHistory.length === 1) {\n setShowGroupColor(false);\n setHiddenGroupsIds(new Set());\n clearAll();\n // Turn off visualiztion in properties menu\n } else if (routingHistory.length === 2) {\n setPropertiesShowGroup(false);\n }\n }, [routingHistory, setHiddenGroupsIds, setPropertiesShowGroup, setShowGroupColor]);\n\n return <GroupingMappingRouter currentRoute={currentRoute} navigateTo={navigateTo} goBack={goBack} />;\n};\n"]}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { Route } from "./GroupingMapping";
3
- export declare const GroupingMappingHeader: ({ goBack, currentRoute, }: {
3
+ export declare const GroupingMappingHeader: ({ goBack, currentRoute }: {
4
4
  goBack: () => void;
5
5
  currentRoute: Route;
6
6
  }) => JSX.Element;
@@ -1,17 +1,17 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  import React from "react";
6
6
  import { RouteStep } from "./GroupingMapping";
7
7
  import { WidgetHeader } from "./WidgetHeader/WidgetHeader";
8
- export const GroupingMappingHeader = ({ goBack, currentRoute, }) => {
8
+ export const GroupingMappingHeader = ({ goBack, currentRoute }) => {
9
9
  const shouldDisableReturnFn = currentRoute.step === RouteStep.Mappings ||
10
10
  currentRoute.step === RouteStep.MappingsAction ||
11
11
  currentRoute.step === RouteStep.GroupAction ||
12
12
  currentRoute.step === RouteStep.PropertyAction ||
13
13
  currentRoute.step === RouteStep.CalculatedPropertyAction ||
14
14
  currentRoute.step === RouteStep.CustomCalculationPropertyAction;
15
- return (React.createElement(WidgetHeader, { returnFn: shouldDisableReturnFn ? undefined : goBack, title: currentRoute.title }));
15
+ return React.createElement(WidgetHeader, { returnFn: shouldDisableReturnFn ? undefined : goBack, title: currentRoute.title });
16
16
  };
17
17
  //# sourceMappingURL=GroupingMappingHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GroupingMappingHeader.js","sourceRoot":"","sources":["../../../src/WidgetShell/GroupingMappingHeader.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,MAAM,EACN,YAAY,GAIb,EAAE,EAAE;IACH,MAAM,qBAAqB,GACzB,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,QAAQ;QACxC,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,cAAc;QAC9C,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,WAAW;QAC3C,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,cAAc;QAC9C,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,wBAAwB;QACxD,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,+BAA+B,CAAC;IAClE,OAAO,CACL,oBAAC,YAAY,IACX,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EACpD,KAAK,EAAE,YAAY,CAAC,KAAK,GACzB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport React from \"react\";\nimport type { Route } from \"./GroupingMapping\";\nimport { RouteStep } from \"./GroupingMapping\";\nimport { WidgetHeader } from \"./WidgetHeader/WidgetHeader\";\n\nexport const GroupingMappingHeader = ({\n goBack,\n currentRoute,\n}: {\n goBack: () => void;\n currentRoute: Route;\n}) => {\n const shouldDisableReturnFn =\n currentRoute.step === RouteStep.Mappings ||\n currentRoute.step === RouteStep.MappingsAction ||\n currentRoute.step === RouteStep.GroupAction ||\n currentRoute.step === RouteStep.PropertyAction ||\n currentRoute.step === RouteStep.CalculatedPropertyAction ||\n currentRoute.step === RouteStep.CustomCalculationPropertyAction;\n return (\n <WidgetHeader\n returnFn={shouldDisableReturnFn ? undefined : goBack}\n title={currentRoute.title}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"GroupingMappingHeader.js","sourceRoot":"","sources":["../../../src/WidgetShell/GroupingMappingHeader.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAE,MAAM,EAAE,YAAY,EAA+C,EAAE,EAAE;IAC7G,MAAM,qBAAqB,GACzB,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,QAAQ;QACxC,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,cAAc;QAC9C,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,WAAW;QAC3C,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,cAAc;QAC9C,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,wBAAwB;QACxD,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,+BAA+B,CAAC;IAClE,OAAO,oBAAC,YAAY,IAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,YAAY,CAAC,KAAK,GAAI,CAAC;AAC3G,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport React from \"react\";\nimport type { Route } from \"./GroupingMapping\";\nimport { RouteStep } from \"./GroupingMapping\";\nimport { WidgetHeader } from \"./WidgetHeader/WidgetHeader\";\n\nexport const GroupingMappingHeader = ({ goBack, currentRoute }: { goBack: () => void; currentRoute: Route }) => {\n const shouldDisableReturnFn =\n currentRoute.step === RouteStep.Mappings ||\n currentRoute.step === RouteStep.MappingsAction ||\n currentRoute.step === RouteStep.GroupAction ||\n currentRoute.step === RouteStep.PropertyAction ||\n currentRoute.step === RouteStep.CalculatedPropertyAction ||\n currentRoute.step === RouteStep.CustomCalculationPropertyAction;\n return <WidgetHeader returnFn={shouldDisableReturnFn ? undefined : goBack} title={currentRoute.title} />;\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { StagePanelLocation, StagePanelSection, StageUsage, } from "@itwin/appui-react";
1
+ import { StagePanelLocation, StagePanelSection, StageUsage } from "@itwin/appui-react";
2
2
  import React from "react";
3
3
  import GroupingMapping from "./GroupingMapping";
4
4
  /**
@@ -12,9 +12,7 @@ export class GroupingMappingProvider {
12
12
  }
13
13
  provideWidgets(_stageId, stageUsage, location, section) {
14
14
  const widgets = [];
15
- if (location === StagePanelLocation.Left &&
16
- section === StagePanelSection.Start &&
17
- stageUsage === StageUsage.General) {
15
+ if (location === StagePanelLocation.Left && section === StagePanelSection.Start && stageUsage === StageUsage.General) {
18
16
  const GroupingMappingWidget = {
19
17
  id: "GroupingMappingWidget",
20
18
  label: "Grouping & Mapping",
@@ -1 +1 @@
1
- {"version":3,"file":"GroupingMappingWidget.js","sourceRoot":"","sources":["../../../src/WidgetShell/GroupingMappingWidget.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,GACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAGlC,YAA6B,SAA+B,EAAE;QAAjC,WAAM,GAAN,MAAM,CAA2B;QAF9C,OAAE,GAAG,yBAAyB,CAAC;IAEmB,CAAC;IAE5D,cAAc,CACnB,QAAgB,EAChB,UAAkB,EAClB,QAA4B,EAC5B,OAA2B;QAE3B,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,IAAI,QAAQ,KAAK,kBAAkB,CAAC,IAAI;YACpC,OAAO,KAAK,iBAAiB,CAAC,KAAK;YACnC,UAAU,KAAK,UAAU,CAAC,OAAO,EACnC;YACA,MAAM,qBAAqB,GAAW;gBACpC,EAAE,EAAE,uBAAuB;gBAC3B,KAAK,EAAE,oBAAoB;gBAC3B,OAAO,EAAE,oBAAC,eAAe,OAAK,IAAI,CAAC,MAAM,GAAI;aAC9C,CAAC;YAEF,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;SACrC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type {\n UiItemsProvider,\n Widget,\n} from \"@itwin/appui-react\";\nimport {\n StagePanelLocation,\n StagePanelSection,\n StageUsage,\n} from \"@itwin/appui-react\";\nimport React from \"react\";\nimport type { GroupingMappingProps } from \"./GroupingMapping\";\nimport GroupingMapping from \"./GroupingMapping\";\n\n/**\n * UI Provider for Grouping & Mapping Widget\n * @public\n */\nexport class GroupingMappingProvider implements UiItemsProvider {\n public readonly id = \"GroupingMappingProvider\";\n\n constructor(private readonly _props: GroupingMappingProps = {}) { }\n\n public provideWidgets(\n _stageId: string,\n stageUsage: string,\n location: StagePanelLocation,\n section?: StagePanelSection,\n ): ReadonlyArray<Widget> {\n const widgets: Widget[] = [];\n if (location === StagePanelLocation.Left &&\n section === StagePanelSection.Start &&\n stageUsage === StageUsage.General\n ) {\n const GroupingMappingWidget: Widget = {\n id: \"GroupingMappingWidget\",\n label: \"Grouping & Mapping\",\n content: <GroupingMapping {...this._props} />,\n };\n\n widgets.push(GroupingMappingWidget);\n }\n\n return widgets;\n }\n}\n"]}
1
+ {"version":3,"file":"GroupingMappingWidget.js","sourceRoot":"","sources":["../../../src/WidgetShell/GroupingMappingWidget.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAGlC,YAA6B,SAA+B,EAAE;QAAjC,WAAM,GAAN,MAAM,CAA2B;QAF9C,OAAE,GAAG,yBAAyB,CAAC;IAEkB,CAAC;IAE3D,cAAc,CAAC,QAAgB,EAAE,UAAkB,EAAE,QAA4B,EAAE,OAA2B;QACnH,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,IAAI,QAAQ,KAAK,kBAAkB,CAAC,IAAI,IAAI,OAAO,KAAK,iBAAiB,CAAC,KAAK,IAAI,UAAU,KAAK,UAAU,CAAC,OAAO,EAAE;YACpH,MAAM,qBAAqB,GAAW;gBACpC,EAAE,EAAE,uBAAuB;gBAC3B,KAAK,EAAE,oBAAoB;gBAC3B,OAAO,EAAE,oBAAC,eAAe,OAAK,IAAI,CAAC,MAAM,GAAI;aAC9C,CAAC;YAEF,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;SACrC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport type { UiItemsProvider, Widget } from \"@itwin/appui-react\";\nimport { StagePanelLocation, StagePanelSection, StageUsage } from \"@itwin/appui-react\";\nimport React from \"react\";\nimport type { GroupingMappingProps } from \"./GroupingMapping\";\nimport GroupingMapping from \"./GroupingMapping\";\n\n/**\n * UI Provider for Grouping & Mapping Widget\n * @public\n */\nexport class GroupingMappingProvider implements UiItemsProvider {\n public readonly id = \"GroupingMappingProvider\";\n\n constructor(private readonly _props: GroupingMappingProps = {}) {}\n\n public provideWidgets(_stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection): ReadonlyArray<Widget> {\n const widgets: Widget[] = [];\n if (location === StagePanelLocation.Left && section === StagePanelSection.Start && stageUsage === StageUsage.General) {\n const GroupingMappingWidget: Widget = {\n id: \"GroupingMappingWidget\",\n label: \"Grouping & Mapping\",\n content: <GroupingMapping {...this._props} />,\n };\n\n widgets.push(GroupingMappingWidget);\n }\n\n return widgets;\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  import React from "react";
6
6
  import { useGroupingMappingApiConfig } from "../../components/context/GroupingApiConfigContext";
7
7
  import { CustomCalculationAction } from "../../components/Properties/CustomCalculations/CustomCalculationAction";
@@ -32,7 +32,7 @@ export const GroupingMappingRouter = ({ currentRoute, navigateTo, goBack, }) =>
32
32
  }));
33
33
  } }));
34
34
  case RouteStep.MappingsAction:
35
- return (React.createElement(MappingAction, { mapping: mapping, onClickCancel: goBack, onSaveSuccess: goBack }));
35
+ return React.createElement(MappingAction, { mapping: mapping, onClickCancel: goBack, onSaveSuccess: goBack });
36
36
  case RouteStep.Groups:
37
37
  if (mapping) {
38
38
  return (React.createElement(GroupsVisualization, { mapping: mapping, onClickAddGroup: (qType) => navigateTo((prev) => ({
@@ -63,21 +63,41 @@ export const GroupingMappingRouter = ({ currentRoute, navigateTo, goBack, }) =>
63
63
  return null;
64
64
  case RouteStep.GroupContextCustomUI:
65
65
  if (mapping && group && groupContextCustomUI) {
66
- return (React.createElement(groupContextCustomUI, {
66
+ return React.createElement(groupContextCustomUI, {
67
67
  iModelId,
68
68
  mappingId: mapping.id,
69
69
  groupId: group.id,
70
- }));
70
+ });
71
71
  }
72
72
  return null;
73
73
  case RouteStep.Properties:
74
74
  if (mapping && group) {
75
- return (React.createElement(PropertyMenuWithVisualization, { mapping: mapping, group: group, color: "red", onClickAddGroupProperty: () => navigateTo((prev) => ({ step: RouteStep.PropertyAction, title: "Add Property", groupingRouteFields: { ...prev?.groupingRouteFields } })), onClickModifyGroupProperty: (gp) => navigateTo((prev) => ({ step: RouteStep.PropertyAction, title: gp.propertyName, groupingRouteFields: { ...prev?.groupingRouteFields, property: gp } })), onClickAddCalculatedProperty: () => navigateTo((prev) => ({ step: RouteStep.CalculatedPropertyAction, title: "Create Calculated Property", groupingRouteFields: { ...prev?.groupingRouteFields } })), onClickModifyCalculatedProperty: (cp) => navigateTo((prev) => ({ step: RouteStep.CalculatedPropertyAction, title: cp.propertyName, groupingRouteFields: { ...prev?.groupingRouteFields, calculatedProperty: cp } })), onClickAddCustomCalculationProperty: () => navigateTo((prev) => ({ step: RouteStep.CustomCalculationPropertyAction, title: "Create Custom Calculation", groupingRouteFields: { ...prev?.groupingRouteFields } })), onClickModifyCustomCalculation: (cc) => navigateTo((prev) => ({ step: RouteStep.CustomCalculationPropertyAction, title: cc.propertyName, groupingRouteFields: { ...prev?.groupingRouteFields, customCalculation: cc } })) }));
75
+ return (React.createElement(PropertyMenuWithVisualization, { mapping: mapping, group: group, color: "red", onClickAddGroupProperty: () => navigateTo((prev) => ({ step: RouteStep.PropertyAction, title: "Add Property", groupingRouteFields: { ...prev?.groupingRouteFields } })), onClickModifyGroupProperty: (gp) => navigateTo((prev) => ({
76
+ step: RouteStep.PropertyAction,
77
+ title: gp.propertyName,
78
+ groupingRouteFields: { ...prev?.groupingRouteFields, property: gp },
79
+ })), onClickAddCalculatedProperty: () => navigateTo((prev) => ({
80
+ step: RouteStep.CalculatedPropertyAction,
81
+ title: "Create Calculated Property",
82
+ groupingRouteFields: { ...prev?.groupingRouteFields },
83
+ })), onClickModifyCalculatedProperty: (cp) => navigateTo((prev) => ({
84
+ step: RouteStep.CalculatedPropertyAction,
85
+ title: cp.propertyName,
86
+ groupingRouteFields: { ...prev?.groupingRouteFields, calculatedProperty: cp },
87
+ })), onClickAddCustomCalculationProperty: () => navigateTo((prev) => ({
88
+ step: RouteStep.CustomCalculationPropertyAction,
89
+ title: "Create Custom Calculation",
90
+ groupingRouteFields: { ...prev?.groupingRouteFields },
91
+ })), onClickModifyCustomCalculation: (cc) => navigateTo((prev) => ({
92
+ step: RouteStep.CustomCalculationPropertyAction,
93
+ title: cc.propertyName,
94
+ groupingRouteFields: { ...prev?.groupingRouteFields, customCalculation: cc },
95
+ })) }));
76
96
  }
77
97
  return null;
78
98
  case RouteStep.PropertyAction: {
79
99
  if (mapping && group) {
80
- return (React.createElement(GroupPropertyAction, { mappingId: mapping.id, group: group, groupProperty: property, onSaveSuccess: goBack, onClickCancel: goBack }));
100
+ return React.createElement(GroupPropertyAction, { mappingId: mapping.id, group: group, groupProperty: property, onSaveSuccess: goBack, onClickCancel: goBack });
81
101
  }
82
102
  return null;
83
103
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GroupingMappingRouter.js","sourceRoot":"","sources":["../../../../src/WidgetShell/Router/GroupingMappingRouter.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAChG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wEAAwE,CAAC;AACjH,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;AACtG,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAChF,OAAO,EAAE,mCAAmC,EAAE,MAAM,sFAAsF,CAAC;AAC3I,OAAO,EAAE,6BAA6B,EAAE,MAAM,2DAA2D,CAAC;AAC1G,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAElF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,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ACL,oBAAC,mBAAmB,IAClB,SAAS,EAAE,OAAO,CAAC,EAAE,EACrB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,QAAQ,EACvB,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,GACrB,CACH,CAAC;aACH;YACD,OAAO,IAAI,CAAC;SACb;QACD,KAAK,SAAS,CAAC,wBAAwB,CAAC,CAAC;YACvC,IAAI,OAAO,IAAI,KAAK,EAAE;gBACpB,OAAO,CACL,oBAAC,mCAAmC,IAClC,SAAS,EAAE,OAAO,CAAC,EAAE,EACrB,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,GACrB,CACH,CAAC;aACH;YACD,OAAO,IAAI,CAAC;SACb;QACD,KAAK,SAAS,CAAC,+BAA+B,CAAC,CAAC;YAC9C,IAAI,OAAO,IAAI,KAAK,EAAE;gBACpB,OAAO,CACL,oBAAC,uBAAuB,IACtB,SAAS,EAAE,OAAO,CAAC,EAAE,EACrB,OAAO,EAAE,KAAK,CAAC,EAAE,EACjB,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,GACrB,CACH,CAAC;aACH;YACD,OAAO,IAAI,CAAC;SACb;QACD;YACE,OAAO,IAAI,CAAC;KACf;AACH,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport React from \"react\";\nimport { useGroupingMappingApiConfig } from \"../../components/context/GroupingApiConfigContext\";\nimport { CustomCalculationAction } from \"../../components/Properties/CustomCalculations/CustomCalculationAction\";\nimport { GroupAction } from \"../../components/Groups/Editing/GroupAction\";\nimport type { Route } from \"../GroupingMapping\";\nimport { RouteStep } from \"../GroupingMapping\";\nimport { GroupPropertyAction } from \"../../components/Properties/GroupProperties/GroupPropertyAction\";\nimport { Mappings } from \"../../components/Mappings/Mappings\";\nimport { MappingAction } from \"../../components/Mappings/Editing/MappingAction\";\nimport { CalculatedPropertyActionWithVisuals } from \"../../components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals\";\nimport { PropertyMenuWithVisualization } from \"../../components/Properties/PropertyMenuWithVisualization\";\nimport { GroupsVisualization } from \"../../components/Groups/GroupsVisualization\";\n\nexport const GroupingMappingRouter = ({\n currentRoute,\n navigateTo,\n goBack,\n}: {\n currentRoute: Route;\n navigateTo: (toRoute: (prev: Route | undefined) => Route) => void;\n goBack: () => void;\n}) => {\n const { iModelId } = useGroupingMappingApiConfig();\n const { mapping, group, property, calculatedProperty, customCalculation, groupContextCustomUI, queryGenerationType } = currentRoute.groupingRouteFields;\n\n switch (currentRoute.step) {\n case RouteStep.Mappings:\n return (\n <Mappings\n onClickAddMapping={() =>\n navigateTo(() => ({ step: RouteStep.MappingsAction, title: \"Add Mapping\", groupingRouteFields: {} }))\n }\n onClickMappingTitle={(mapping) => {\n navigateTo(() => ({\n step: RouteStep.Groups,\n groupingRouteFields: { mapping },\n title: mapping.mappingName,\n }));\n }}\n onClickMappingModify={(mapping) => {\n navigateTo(() => ({\n step: RouteStep.MappingsAction,\n groupingRouteFields: { mapping },\n title: mapping.mappingName,\n }));\n }}\n />);\n case RouteStep.MappingsAction:\n return (<MappingAction mapping={mapping} onClickCancel={goBack} onSaveSuccess={goBack} />);\n case RouteStep.Groups:\n if (mapping) {\n return (\n <GroupsVisualization\n mapping={mapping}\n onClickAddGroup={(qType) =>\n navigateTo((prev) => ({\n step: RouteStep.GroupAction,\n groupingRouteFields: { ...prev?.groupingRouteFields, queryGenerationType: qType },\n title: \"Add Group\",\n }))\n }\n onClickGroupTitle={(g) =>\n navigateTo((prev) => ({\n step: RouteStep.Properties,\n title: g.groupName,\n groupingRouteFields: { ...prev?.groupingRouteFields, group: g },\n }))\n }\n onClickGroupModify={(g, qType) =>\n navigateTo((prev) => ({\n step: RouteStep.GroupAction,\n title: g.groupName,\n groupingRouteFields: { ...prev?.groupingRouteFields, group: g, queryGenerationType: qType },\n }))\n }\n onClickRenderContextCustomUI={(ccUI, g, displayLabel) =>\n navigateTo((prev) => ({\n step: RouteStep.GroupContextCustomUI,\n title: displayLabel,\n groupingRouteFields: { ...prev?.groupingRouteFields, group: g, groupContextCustomUI: ccUI },\n }))\n }\n />\n );\n }\n return null;\n case RouteStep.GroupAction:\n if (mapping) {\n if (queryGenerationType) {\n return (\n <GroupAction\n shouldVisualize\n mappingId={mapping.id}\n group={group}\n onClickCancel={goBack}\n onSaveSuccess={goBack}\n queryGenerationType={queryGenerationType}\n />\n );\n }\n }\n return null;\n case RouteStep.GroupContextCustomUI:\n if (mapping && group && groupContextCustomUI) {\n return (\n React.createElement(groupContextCustomUI, {\n iModelId,\n mappingId: mapping.id,\n groupId: group.id,\n })\n );\n }\n return null;\n case RouteStep.Properties:\n if (mapping && group) {\n return (\n <PropertyMenuWithVisualization\n mapping={mapping}\n group={group}\n color=\"red\"\n onClickAddGroupProperty={() =>\n navigateTo((prev) => ({ step: RouteStep.PropertyAction, title: \"Add Property\", groupingRouteFields: { ...prev?.groupingRouteFields } }))\n }\n onClickModifyGroupProperty={(gp) =>\n navigateTo((prev) => ({ step: RouteStep.PropertyAction, title: gp.propertyName, groupingRouteFields: { ...prev?.groupingRouteFields, property: gp } }))\n }\n onClickAddCalculatedProperty={() =>\n navigateTo((prev) => ({ step: RouteStep.CalculatedPropertyAction, title: \"Create Calculated Property\", groupingRouteFields: { ...prev?.groupingRouteFields } }))\n }\n onClickModifyCalculatedProperty={(cp) =>\n navigateTo((prev) => ({ step: RouteStep.CalculatedPropertyAction, title: cp.propertyName, groupingRouteFields: { ...prev?.groupingRouteFields, calculatedProperty: cp } }))\n }\n onClickAddCustomCalculationProperty={() =>\n navigateTo((prev) => ({ step: RouteStep.CustomCalculationPropertyAction, title: \"Create Custom Calculation\", groupingRouteFields: { ...prev?.groupingRouteFields } }))\n }\n onClickModifyCustomCalculation={(cc) =>\n navigateTo((prev) => ({ step: RouteStep.CustomCalculationPropertyAction, title: cc.propertyName, groupingRouteFields: { ...prev?.groupingRouteFields, customCalculation: cc } }))\n }\n />\n );\n }\n return null;\n case RouteStep.PropertyAction: {\n if (mapping && group) {\n return (\n <GroupPropertyAction\n mappingId={mapping.id}\n group={group}\n groupProperty={property}\n onSaveSuccess={goBack}\n onClickCancel={goBack}\n />\n );\n }\n return null;\n }\n case RouteStep.CalculatedPropertyAction: {\n if (mapping && group) {\n return (\n <CalculatedPropertyActionWithVisuals\n mappingId={mapping.id}\n group={group}\n calculatedProperty={calculatedProperty}\n onSaveSuccess={goBack}\n onClickCancel={goBack}\n />\n );\n }\n return null;\n }\n case RouteStep.CustomCalculationPropertyAction: {\n if (mapping && group) {\n return (\n <CustomCalculationAction\n mappingId={mapping.id}\n groupId={group.id}\n customCalculation={customCalculation}\n onSaveSuccess={goBack}\n onClickCancel={goBack}\n />\n );\n }\n return null;\n }\n default:\n return null;\n }\n};\n"]}
1
+ {"version":3,"file":"GroupingMappingRouter.js","sourceRoot":"","sources":["../../../../src/WidgetShell/Router/GroupingMappingRouter.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAChG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wEAAwE,CAAC;AACjH,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;AACtG,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAChF,OAAO,EAAE,mCAAmC,EAAE,MAAM,sFAAsF,CAAC;AAC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AE;qBAC7E,CAAC,CAAC,GAEL,CACH,CAAC;aACH;YACD,OAAO,IAAI,CAAC;QACd,KAAK,SAAS,CAAC,cAAc,CAAC,CAAC;YAC7B,IAAI,OAAO,IAAI,KAAK,EAAE;gBACpB,OAAO,oBAAC,mBAAmB,IAAC,SAAS,EAAE,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAI,CAAC;aAC5I;YACD,OAAO,IAAI,CAAC;SACb;QACD,KAAK,SAAS,CAAC,wBAAwB,CAAC,CAAC;YACvC,IAAI,OAAO,IAAI,KAAK,EAAE;gBACpB,OAAO,CACL,oBAAC,mCAAmC,IAClC,SAAS,EAAE,OAAO,CAAC,EAAE,EACrB,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,GACrB,CACH,CAAC;aACH;YACD,OAAO,IAAI,CAAC;SACb;QACD,KAAK,SAAS,CAAC,+BAA+B,CAAC,CAAC;YAC9C,IAAI,OAAO,IAAI,KAAK,EAAE;gBACpB,OAAO,CACL,oBAAC,uBAAuB,IACtB,SAAS,EAAE,OAAO,CAAC,EAAE,EACrB,OAAO,EAAE,KAAK,CAAC,EAAE,EACjB,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,MAAM,GACrB,CACH,CAAC;aACH;YACD,OAAO,IAAI,CAAC;SACb;QACD;YACE,OAAO,IAAI,CAAC;KACf;AACH,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport React from \"react\";\nimport { useGroupingMappingApiConfig } from \"../../components/context/GroupingApiConfigContext\";\nimport { CustomCalculationAction } from \"../../components/Properties/CustomCalculations/CustomCalculationAction\";\nimport { GroupAction } from \"../../components/Groups/Editing/GroupAction\";\nimport type { Route } from \"../GroupingMapping\";\nimport { RouteStep } from \"../GroupingMapping\";\nimport { GroupPropertyAction } from \"../../components/Properties/GroupProperties/GroupPropertyAction\";\nimport { Mappings } from \"../../components/Mappings/Mappings\";\nimport { MappingAction } from \"../../components/Mappings/Editing/MappingAction\";\nimport { CalculatedPropertyActionWithVisuals } from \"../../components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals\";\nimport { PropertyMenuWithVisualization } from \"../../components/Properties/PropertyMenuWithVisualization\";\nimport { GroupsVisualization } from \"../../components/Groups/GroupsVisualization\";\n\nexport const GroupingMappingRouter = ({\n currentRoute,\n navigateTo,\n goBack,\n}: {\n currentRoute: Route;\n navigateTo: (toRoute: (prev: Route | undefined) => Route) => void;\n goBack: () => void;\n}) => {\n const { iModelId } = useGroupingMappingApiConfig();\n const { mapping, group, property, calculatedProperty, customCalculation, groupContextCustomUI, queryGenerationType } = currentRoute.groupingRouteFields;\n\n switch (currentRoute.step) {\n case RouteStep.Mappings:\n return (\n <Mappings\n onClickAddMapping={() => navigateTo(() => ({ step: RouteStep.MappingsAction, title: \"Add Mapping\", groupingRouteFields: {} }))}\n onClickMappingTitle={(mapping) => {\n navigateTo(() => ({\n step: RouteStep.Groups,\n groupingRouteFields: { mapping },\n title: mapping.mappingName,\n }));\n }}\n onClickMappingModify={(mapping) => {\n navigateTo(() => ({\n step: RouteStep.MappingsAction,\n groupingRouteFields: { mapping },\n title: mapping.mappingName,\n }));\n }}\n />\n );\n case RouteStep.MappingsAction:\n return <MappingAction mapping={mapping} onClickCancel={goBack} onSaveSuccess={goBack} />;\n case RouteStep.Groups:\n if (mapping) {\n return (\n <GroupsVisualization\n mapping={mapping}\n onClickAddGroup={(qType) =>\n navigateTo((prev) => ({\n step: RouteStep.GroupAction,\n groupingRouteFields: { ...prev?.groupingRouteFields, queryGenerationType: qType },\n title: \"Add Group\",\n }))\n }\n onClickGroupTitle={(g) =>\n navigateTo((prev) => ({\n step: RouteStep.Properties,\n title: g.groupName,\n groupingRouteFields: { ...prev?.groupingRouteFields, group: g },\n }))\n }\n onClickGroupModify={(g, qType) =>\n navigateTo((prev) => ({\n step: RouteStep.GroupAction,\n title: g.groupName,\n groupingRouteFields: { ...prev?.groupingRouteFields, group: g, queryGenerationType: qType },\n }))\n }\n onClickRenderContextCustomUI={(ccUI, g, displayLabel) =>\n navigateTo((prev) => ({\n step: RouteStep.GroupContextCustomUI,\n title: displayLabel,\n groupingRouteFields: { ...prev?.groupingRouteFields, group: g, groupContextCustomUI: ccUI },\n }))\n }\n />\n );\n }\n return null;\n case RouteStep.GroupAction:\n if (mapping) {\n if (queryGenerationType) {\n return (\n <GroupAction\n shouldVisualize\n mappingId={mapping.id}\n group={group}\n onClickCancel={goBack}\n onSaveSuccess={goBack}\n queryGenerationType={queryGenerationType}\n />\n );\n }\n }\n return null;\n case RouteStep.GroupContextCustomUI:\n if (mapping && group && groupContextCustomUI) {\n return React.createElement(groupContextCustomUI, {\n iModelId,\n mappingId: mapping.id,\n groupId: group.id,\n });\n }\n return null;\n case RouteStep.Properties:\n if (mapping && group) {\n return (\n <PropertyMenuWithVisualization\n mapping={mapping}\n group={group}\n color=\"red\"\n onClickAddGroupProperty={() =>\n navigateTo((prev) => ({ step: RouteStep.PropertyAction, title: \"Add Property\", groupingRouteFields: { ...prev?.groupingRouteFields } }))\n }\n onClickModifyGroupProperty={(gp) =>\n navigateTo((prev) => ({\n step: RouteStep.PropertyAction,\n title: gp.propertyName,\n groupingRouteFields: { ...prev?.groupingRouteFields, property: gp },\n }))\n }\n onClickAddCalculatedProperty={() =>\n navigateTo((prev) => ({\n step: RouteStep.CalculatedPropertyAction,\n title: \"Create Calculated Property\",\n groupingRouteFields: { ...prev?.groupingRouteFields },\n }))\n }\n onClickModifyCalculatedProperty={(cp) =>\n navigateTo((prev) => ({\n step: RouteStep.CalculatedPropertyAction,\n title: cp.propertyName,\n groupingRouteFields: { ...prev?.groupingRouteFields, calculatedProperty: cp },\n }))\n }\n onClickAddCustomCalculationProperty={() =>\n navigateTo((prev) => ({\n step: RouteStep.CustomCalculationPropertyAction,\n title: \"Create Custom Calculation\",\n groupingRouteFields: { ...prev?.groupingRouteFields },\n }))\n }\n onClickModifyCustomCalculation={(cc) =>\n navigateTo((prev) => ({\n step: RouteStep.CustomCalculationPropertyAction,\n title: cc.propertyName,\n groupingRouteFields: { ...prev?.groupingRouteFields, customCalculation: cc },\n }))\n }\n />\n );\n }\n return null;\n case RouteStep.PropertyAction: {\n if (mapping && group) {\n return <GroupPropertyAction mappingId={mapping.id} group={group} groupProperty={property} onSaveSuccess={goBack} onClickCancel={goBack} />;\n }\n return null;\n }\n case RouteStep.CalculatedPropertyAction: {\n if (mapping && group) {\n return (\n <CalculatedPropertyActionWithVisuals\n mappingId={mapping.id}\n group={group}\n calculatedProperty={calculatedProperty}\n onSaveSuccess={goBack}\n onClickCancel={goBack}\n />\n );\n }\n return null;\n }\n case RouteStep.CustomCalculationPropertyAction: {\n if (mapping && group) {\n return (\n <CustomCalculationAction\n mappingId={mapping.id}\n groupId={group.id}\n customCalculation={customCalculation}\n onSaveSuccess={goBack}\n onClickCancel={goBack}\n />\n );\n }\n return null;\n }\n default:\n return null;\n }\n};\n"]}
@@ -5,5 +5,5 @@ export interface WidgetHeaderProps {
5
5
  disabled?: boolean;
6
6
  returnFn?: () => void;
7
7
  }
8
- export declare const WidgetHeader: ({ title, disabled, returnFn, }: WidgetHeaderProps) => JSX.Element;
8
+ export declare const WidgetHeader: ({ title, disabled, returnFn }: WidgetHeaderProps) => JSX.Element;
9
9
  //# sourceMappingURL=WidgetHeader.d.ts.map
@@ -1,15 +1,15 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  import { SvgChevronLeft } from "@itwin/itwinui-icons-react";
6
6
  import { Icon, Text } from "@itwin/itwinui-react";
7
7
  import "./WidgetHeader.scss";
8
8
  import React from "react";
9
- export const WidgetHeader = ({ title, disabled = false, returnFn, }) => {
10
- return (React.createElement("div", { className: 'gmw-widget-header-container' },
11
- returnFn && (React.createElement(Icon, { className: `${disabled ? "gmw-chevron-disabled" : "gmw-chevron"}`, size: "large", onClick: disabled ? undefined : returnFn, title: 'Back' },
9
+ export const WidgetHeader = ({ title, disabled = false, returnFn }) => {
10
+ return (React.createElement("div", { className: "gmw-widget-header-container" },
11
+ returnFn && (React.createElement(Icon, { className: `${disabled ? "gmw-chevron-disabled" : "gmw-chevron"}`, size: "large", onClick: disabled ? undefined : returnFn, title: "Back" },
12
12
  React.createElement(SvgChevronLeft, null))),
13
- React.createElement(Text, { className: 'gmw-title', variant: 'title' }, title)));
13
+ React.createElement(Text, { className: "gmw-title", variant: "title" }, title)));
14
14
  };
15
15
  //# sourceMappingURL=WidgetHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetHeader.js","sourceRoot":"","sources":["../../../../src/WidgetShell/WidgetHeader/WidgetHeader.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,QAAQ,GACU,EAAE,EAAE;IACtB,OAAO,CACL,6BAAK,SAAS,EAAC,6BAA6B;QACzC,QAAQ,IAAI,CACX,oBAAC,IAAI,IACH,SAAS,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,aAAa,EAAE,EACjE,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EACxC,KAAK,EAAC,MAAM;YAEZ,oBAAC,cAAc,OAAG,CACb,CACR;QACD,oBAAC,IAAI,IAAC,SAAS,EAAC,WAAW,EAAC,OAAO,EAAC,OAAO,IACxC,KAAK,CACD,CACH,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { SvgChevronLeft } from \"@itwin/itwinui-icons-react\";\nimport { Icon, Text } from \"@itwin/itwinui-react\";\nimport \"./WidgetHeader.scss\";\nimport React from \"react\";\n\nexport interface WidgetHeaderProps {\n title: string;\n disabled?: boolean;\n returnFn?: () => void;\n}\n\nexport const WidgetHeader = ({\n title,\n disabled = false,\n returnFn,\n}: WidgetHeaderProps) => {\n return (\n <div className='gmw-widget-header-container'>\n {returnFn && (\n <Icon\n className={`${disabled ? \"gmw-chevron-disabled\" : \"gmw-chevron\"}`}\n size=\"large\"\n onClick={disabled ? undefined : returnFn}\n title='Back'\n >\n <SvgChevronLeft />\n </Icon>\n )}\n <Text className='gmw-title' variant='title'>\n {title}\n </Text>\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"WidgetHeader.js","sourceRoot":"","sources":["../../../../src/WidgetShell/WidgetHeader/WidgetHeader.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,GAAG,KAAK,EAAE,QAAQ,EAAqB,EAAE,EAAE;IACvF,OAAO,CACL,6BAAK,SAAS,EAAC,6BAA6B;QACzC,QAAQ,IAAI,CACX,oBAAC,IAAI,IAAC,SAAS,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,aAAa,EAAE,EAAE,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAC,MAAM;YAC1I,oBAAC,cAAc,OAAG,CACb,CACR;QACD,oBAAC,IAAI,IAAC,SAAS,EAAC,WAAW,EAAC,OAAO,EAAC,OAAO,IACxC,KAAK,CACD,CACH,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport { SvgChevronLeft } from \"@itwin/itwinui-icons-react\";\nimport { Icon, Text } from \"@itwin/itwinui-react\";\nimport \"./WidgetHeader.scss\";\nimport React from \"react\";\n\nexport interface WidgetHeaderProps {\n title: string;\n disabled?: boolean;\n returnFn?: () => void;\n}\n\nexport const WidgetHeader = ({ title, disabled = false, returnFn }: WidgetHeaderProps) => {\n return (\n <div className=\"gmw-widget-header-container\">\n {returnFn && (\n <Icon className={`${disabled ? \"gmw-chevron-disabled\" : \"gmw-chevron\"}`} size=\"large\" onClick={disabled ? undefined : returnFn} title=\"Back\">\n <SvgChevronLeft />\n </Icon>\n )}\n <Text className=\"gmw-title\" variant=\"title\">\n {title}\n </Text>\n </div>\n );\n};\n"]}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  import { useEffect, useRef } from "react";
6
6
  export const useIsMounted = () => {
7
7
  const isMounted = useRef(false);
@@ -1 +1 @@
1
- {"version":3,"file":"useIsMounted.js","sourceRoot":"","sources":["../../../../src/common/hooks/useIsMounted.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAEhC,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;QACzB,OAAO,GAAG,EAAE;YACV,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { useEffect, useRef } from \"react\";\n\nexport const useIsMounted = () => {\n const isMounted = useRef(false);\n\n useEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n\n return isMounted;\n};\n"]}
1
+ {"version":3,"file":"useIsMounted.js","sourceRoot":"","sources":["../../../../src/common/hooks/useIsMounted.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAEhC,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;QACzB,OAAO,GAAG,EAAE;YACV,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport { useEffect, useRef } from \"react\";\n\nexport const useIsMounted = () => {\n const isMounted = useRef(false);\n\n useEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n\n return isMounted;\n};\n"]}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  import { useMemo, useRef } from "react";
6
6
  import { pick } from "lodash";
7
7
  // Workaround for github.com/TanStack/query/issues/5137. Will be removed when updating to the latest version of react-query and React 18.
@@ -1 +1 @@
1
- {"version":3,"file":"useMemoizedCollectionPick.js","sourceRoot":"","sources":["../../../../src/common/hooks/useMemoizedCollectionPick.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,yIAAyI;AACzI,SAAS,qBAAqB,CAAmC,CAAI,EAAE,CAAI;IACzE,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,SAAS,yBAAyB,CAAe,CAAM,EAAE,CAAM;IAC7D,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAClG,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAkC,KAAU,EAAE,SAAuB;IAC5G,uDAAuD;IACvD,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC9E,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC;IACxG,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,yBAAyB,CAAC,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,EAAE;YACvD,OAAO,SAAS,CAAC,OAAO,CAAC;SAC1B;QACD,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;QAC1B,OAAO,KAAK,CAAC;IACf,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AACd,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { useMemo, useRef } from \"react\";\nimport { pick } from \"lodash\";\n\n// Workaround for github.com/TanStack/query/issues/5137. Will be removed when updating to the latest version of react-query and React 18.\nfunction shallowCompareObjects<T extends { [key: string]: any }>(a: T, b: T): boolean {\n return Object.keys(a).every((key) => a[key] === b[key]);\n}\n\nfunction shallowCompareCollections<T extends {}>(a: T[], b: T[]) {\n return a.length === b.length && a.every((item, index) => shallowCompareObjects(item, b[index]));\n}\n\nexport function useMemoizedCollectionPick<T extends {}, P extends keyof T>(array: T[], pickValue: readonly P[]): Pick<T, P>[] {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const stablePickValue = useMemo(() => pickValue, [JSON.stringify(pickValue)]);\n const value = useMemo(() => array.map((item) => pick(item, stablePickValue)), [array, stablePickValue]);\n const prevValue = useRef(value);\n return useMemo(() => {\n if (shallowCompareCollections(value, prevValue.current)) {\n return prevValue.current;\n }\n prevValue.current = value;\n return value;\n }, [value]);\n}\n"]}
1
+ {"version":3,"file":"useMemoizedCollectionPick.js","sourceRoot":"","sources":["../../../../src/common/hooks/useMemoizedCollectionPick.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,yIAAyI;AACzI,SAAS,qBAAqB,CAAmC,CAAI,EAAE,CAAI;IACzE,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,SAAS,yBAAyB,CAAe,CAAM,EAAE,CAAM;IAC7D,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAClG,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAkC,KAAU,EAAE,SAAuB;IAC5G,uDAAuD;IACvD,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC9E,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC;IACxG,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,yBAAyB,CAAC,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,EAAE;YACvD,OAAO,SAAS,CAAC,OAAO,CAAC;SAC1B;QACD,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;QAC1B,OAAO,KAAK,CAAC;IACf,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AACd,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport { useMemo, useRef } from \"react\";\nimport { pick } from \"lodash\";\n\n// Workaround for github.com/TanStack/query/issues/5137. Will be removed when updating to the latest version of react-query and React 18.\nfunction shallowCompareObjects<T extends { [key: string]: any }>(a: T, b: T): boolean {\n return Object.keys(a).every((key) => a[key] === b[key]);\n}\n\nfunction shallowCompareCollections<T extends {}>(a: T[], b: T[]) {\n return a.length === b.length && a.every((item, index) => shallowCompareObjects(item, b[index]));\n}\n\nexport function useMemoizedCollectionPick<T extends {}, P extends keyof T>(array: T[], pickValue: readonly P[]): Pick<T, P>[] {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const stablePickValue = useMemo(() => pickValue, [JSON.stringify(pickValue)]);\n const value = useMemo(() => array.map((item) => pick(item, stablePickValue)), [array, stablePickValue]);\n const prevValue = useRef(value);\n return useMemo(() => {\n if (shallowCompareCollections(value, prevValue.current)) {\n return prevValue.current;\n }\n prevValue.current = value;\n return value;\n }, [value]);\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  import { QueryRowFormat } from "@itwin/core-common";
6
6
  import { IModelApp } from "@itwin/core-frontend";
7
7
  import { toaster } from "@itwin/itwinui-react";
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/common/utils.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAM/C,MAAM,UAAU,QAAQ,CAAqC,CAAI,EAAE,KAAa;IAC9E,IAAI,KAAyB,CAAC;IAC9B,OAAO,CAAC,GAAG,IAAW,EAAE,EAAE;QACxB,KAAK,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QACpC,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC;IAC/C,CAAC,CAAC;AACJ,CA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,sDAAsD;QACtD,MAAM,aAAa,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAE3D,OAAO,SAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC;KACjE;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { QueryRowFormat } from \"@itwin/core-common\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { toaster } from \"@itwin/itwinui-react\";\n\nexport type CreateTypeFromInterface<Interface> = {\n [Property in keyof Interface]: Interface[Property];\n};\n\nexport function debounce<F extends (...args: any[]) => void>(f: F, delay: number) {\n let timer: number | undefined;\n return (...args: any[]) => {\n timer && window.clearTimeout(timer);\n timer = window.setTimeout(f, delay, ...args);\n };\n}\n\nexport const fetchIdsFromQuery = async (\n query: string,\n iModelConnection: IModelConnection\n) => {\n if (query === \"\") {\n return [];\n }\n const ids: string[] = [];\n const rowIterator = iModelConnection.query(query, undefined, {\n rowFormat: QueryRowFormat.UseJsPropertyNames,\n });\n while (true) {\n const { done, value } = await rowIterator.next();\n if (done) {\n break;\n }\n if (Object.keys(value).includes(\"id\")) {\n ids.push(value.id);\n } else if (Object.keys(value).includes(\"element.id\")) {\n ids.push(value[\"element.id\"]);\n } else if (Object.keys(value).includes(\"eCInstanceId\")) {\n ids.push(value.eCInstanceId);\n }\n }\n return ids;\n};\n\nexport const getErrorMessage = (errorStatus: number): string => {\n switch (errorStatus) {\n case 401:\n return \"You are unauthorized to do this operation.\";\n case 403:\n return \"You don't have permission to access the requested resource.\";\n case 404:\n return \"The requested resource was not found.\";\n case 409:\n return \"This property name is already being used.\";\n case 422:\n return \"Unable to process the request.\";\n case 429:\n return \"Too many requests.\";\n case 500:\n return \"Internal server error.\";\n case 502:\n return \"Bad gateway.\";\n case 503:\n return \"Service unavailable.\";\n default:\n return \"Something went wrong!\";\n }\n};\n\nexport const handleError = (errorStatus: number) => {\n const baseErrorMessage = \"Error!\";\n const specificErrorMessage = getErrorMessage(errorStatus);\n const fullErrorMessage = `${baseErrorMessage} ${specificErrorMessage}`;\n\n toaster.negative(fullErrorMessage);\n};\n\nexport const handleInputChange = <T,>(\n e: React.ChangeEvent<HTMLInputElement>,\n values: T,\n setValues: (newValues: T) => void,\n) => {\n const { name, value } = e.target;\n\n setValues({\n ...values,\n [name]: value,\n });\n};\n\nexport const enableExperimentalFeatures = async (iModelConnection: IModelConnection) => {\n const reader = iModelConnection.createQueryReader(\"PRAGMA experimental_features_enabled=true\");\n await reader.step();\n};\n\nexport const getLocalizedStringPresentation = (input: string): string => {\n // https://www.itwinjs.org/presentation/advanced/localization/\n // Check if the string starts and ends with \"@\"\n if (input.startsWith(\"@\") && input.endsWith(\"@\")) {\n // Remove the leading and trailing \"@\" from the string\n const trimmedString = input.substring(1, input.length - 1);\n\n return IModelApp.localization.getLocalizedString(trimmedString);\n }\n\n return input;\n};\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/common/utils.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAM/C,MAAM,UAAU,QAAQ,CAAqC,CAAI,EAAE,KAAa;IAC9E,IAAI,KAAyB,CAAC;IAC9B,OAAO,CAAC,GAAG,IAAW,EAAE,EAAE;QACxB,KAAK,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QACpC,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,EAA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CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAChD,sDAAsD;QACtD,MAAM,aAAa,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAE3D,OAAO,SAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC;KACjE;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport { QueryRowFormat } from \"@itwin/core-common\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { toaster } from \"@itwin/itwinui-react\";\n\nexport type CreateTypeFromInterface<Interface> = {\n [Property in keyof Interface]: Interface[Property];\n};\n\nexport function debounce<F extends (...args: any[]) => void>(f: F, delay: number) {\n let timer: number | undefined;\n return (...args: any[]) => {\n timer && window.clearTimeout(timer);\n timer = window.setTimeout(f, delay, ...args);\n };\n}\n\nexport const fetchIdsFromQuery = async (query: string, iModelConnection: IModelConnection) => {\n if (query === \"\") {\n return [];\n }\n const ids: string[] = [];\n const rowIterator = iModelConnection.query(query, undefined, {\n rowFormat: QueryRowFormat.UseJsPropertyNames,\n });\n while (true) {\n const { done, value } = await rowIterator.next();\n if (done) {\n break;\n }\n if (Object.keys(value).includes(\"id\")) {\n ids.push(value.id);\n } else if (Object.keys(value).includes(\"element.id\")) {\n ids.push(value[\"element.id\"]);\n } else if (Object.keys(value).includes(\"eCInstanceId\")) {\n ids.push(value.eCInstanceId);\n }\n }\n return ids;\n};\n\nexport const getErrorMessage = (errorStatus: number): string => {\n switch (errorStatus) {\n case 401:\n return \"You are unauthorized to do this operation.\";\n case 403:\n return \"You don't have permission to access the requested resource.\";\n case 404:\n return \"The requested resource was not found.\";\n case 409:\n return \"This property name is already being used.\";\n case 422:\n return \"Unable to process the request.\";\n case 429:\n return \"Too many requests.\";\n case 500:\n return \"Internal server error.\";\n case 502:\n return \"Bad gateway.\";\n case 503:\n return \"Service unavailable.\";\n default:\n return \"Something went wrong!\";\n }\n};\n\nexport const handleError = (errorStatus: number) => {\n const baseErrorMessage = \"Error!\";\n const specificErrorMessage = getErrorMessage(errorStatus);\n const fullErrorMessage = `${baseErrorMessage} ${specificErrorMessage}`;\n\n toaster.negative(fullErrorMessage);\n};\n\nexport const handleInputChange = <T>(e: React.ChangeEvent<HTMLInputElement>, values: T, setValues: (newValues: T) => void) => {\n const { name, value } = e.target;\n\n setValues({\n ...values,\n [name]: value,\n });\n};\n\nexport const enableExperimentalFeatures = async (iModelConnection: IModelConnection) => {\n const reader = iModelConnection.createQueryReader(\"PRAGMA experimental_features_enabled=true\");\n await reader.step();\n};\n\nexport const getLocalizedStringPresentation = (input: string): string => {\n // https://www.itwinjs.org/presentation/advanced/localization/\n // Check if the string starts and ends with \"@\"\n if (input.startsWith(\"@\") && input.endsWith(\"@\")) {\n // Remove the leading and trailing \"@\" from the string\n const trimmedString = input.substring(1, input.length - 1);\n\n return IModelApp.localization.getLocalizedString(trimmedString);\n }\n\n return input;\n};\n"]}
@@ -214,7 +214,7 @@ export const zoomToElements = async (elementIds) => {
214
214
  };
215
215
  export const getHiliteIds = async (query, iModelConnection) => {
216
216
  if (!IModelApp.viewManager.selectedView) {
217
- return ({ keySet: new KeySet(), ids: [] });
217
+ return { keySet: new KeySet(), ids: [] };
218
218
  }
219
219
  const vp = IModelApp.viewManager.selectedView;
220
220
  const keySet = await manufactureKeys(query, iModelConnection);
@@ -225,7 +225,7 @@ export const getHiliteIds = async (query, iModelConnection) => {
225
225
  if (set.elements) {
226
226
  return { keySet, ids: [...set.elements] };
227
227
  }
228
- return ({ keySet: new KeySet(), ids: [] });
228
+ return { keySet: new KeySet(), ids: [] };
229
229
  };
230
230
  export const manufactureKeys = async (query, iModelConnection) => {
231
231
  if (query === "") {