@itwin/grouping-mapping-widget 0.25.2 → 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 (689) hide show
  1. package/LICENSE.md +9 -9
  2. package/README.md +115 -115
  3. package/lib/cjs/WidgetShell/GroupingMapping.d.ts +5 -5
  4. package/lib/cjs/WidgetShell/GroupingMapping.js +2 -4
  5. package/lib/cjs/WidgetShell/GroupingMapping.js.map +1 -1
  6. package/lib/cjs/WidgetShell/GroupingMappingContent.js +4 -4
  7. package/lib/cjs/WidgetShell/GroupingMappingContent.js.map +1 -1
  8. package/lib/cjs/WidgetShell/GroupingMappingHeader.d.ts +1 -1
  9. package/lib/cjs/WidgetShell/GroupingMappingHeader.js +5 -5
  10. package/lib/cjs/WidgetShell/GroupingMappingHeader.js.map +1 -1
  11. package/lib/cjs/WidgetShell/GroupingMappingWidget.d.ts +4 -0
  12. package/lib/cjs/WidgetShell/GroupingMappingWidget.js +5 -3
  13. package/lib/cjs/WidgetShell/GroupingMappingWidget.js.map +1 -1
  14. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js +28 -8
  15. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
  16. package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.d.ts +1 -1
  17. package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js +7 -7
  18. package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -1
  19. package/lib/cjs/common/hooks/useIsMounted.js +3 -3
  20. package/lib/cjs/common/hooks/useIsMounted.js.map +1 -1
  21. package/lib/cjs/common/hooks/useMemoizedCollectionPick.js +3 -3
  22. package/lib/cjs/common/hooks/useMemoizedCollectionPick.js.map +1 -1
  23. package/lib/cjs/common/utils.js +3 -3
  24. package/lib/cjs/common/utils.js.map +1 -1
  25. package/lib/cjs/common/viewerUtils.js +2 -2
  26. package/lib/cjs/common/viewerUtils.js.map +1 -1
  27. package/lib/cjs/components/Constants.js +4 -4
  28. package/lib/cjs/components/Constants.js.map +1 -1
  29. package/lib/cjs/components/GroupingMappingContext.d.ts +19 -3
  30. package/lib/cjs/components/GroupingMappingContext.js +40 -13
  31. package/lib/cjs/components/GroupingMappingContext.js.map +1 -1
  32. package/lib/cjs/components/Groups/Editing/GroupAction.d.ts +10 -2
  33. package/lib/cjs/components/Groups/Editing/GroupAction.js +16 -14
  34. package/lib/cjs/components/Groups/Editing/GroupAction.js.map +1 -1
  35. package/lib/cjs/components/Groups/Editing/GroupDetails.d.ts +1 -1
  36. package/lib/cjs/components/Groups/Editing/GroupDetails.js +5 -7
  37. package/lib/cjs/components/Groups/Editing/GroupDetails.js.map +1 -1
  38. package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.d.ts +1 -1
  39. package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js +4 -4
  40. package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
  41. package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js +4 -4
  42. package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js.map +1 -1
  43. package/lib/cjs/components/Groups/GroupColorLegend.d.ts +3 -3
  44. package/lib/cjs/components/Groups/GroupColorLegend.js +3 -3
  45. package/lib/cjs/components/Groups/GroupColorLegend.js.map +1 -1
  46. package/lib/cjs/components/Groups/GroupListItem.d.ts +4 -4
  47. package/lib/cjs/components/Groups/GroupListItem.js +6 -4
  48. package/lib/cjs/components/Groups/GroupListItem.js.map +1 -1
  49. package/lib/cjs/components/Groups/GroupListItem.scss +14 -0
  50. package/lib/cjs/components/Groups/GroupMenuActions.d.ts +4 -4
  51. package/lib/cjs/components/Groups/GroupMenuActions.js +17 -6
  52. package/lib/cjs/components/Groups/GroupMenuActions.js.map +1 -1
  53. package/lib/cjs/components/Groups/GroupMenuActions.scss +2 -0
  54. package/lib/cjs/components/Groups/GroupOverlapProgressBar.d.ts +2 -2
  55. package/lib/cjs/components/Groups/GroupOverlapProgressBar.js.map +1 -1
  56. package/lib/cjs/components/Groups/Groups.d.ts +12 -4
  57. package/lib/cjs/components/Groups/Groups.js +7 -3
  58. package/lib/cjs/components/Groups/Groups.js.map +1 -1
  59. package/lib/cjs/components/Groups/GroupsAddButton.d.ts +1 -1
  60. package/lib/cjs/components/Groups/GroupsAddButton.js +4 -4
  61. package/lib/cjs/components/Groups/GroupsAddButton.js.map +1 -1
  62. package/lib/cjs/components/Groups/GroupsAddButton.scss +1 -1
  63. package/lib/cjs/components/Groups/GroupsShowHideButtons.d.ts +5 -5
  64. package/lib/cjs/components/Groups/GroupsShowHideButtons.js +2 -2
  65. package/lib/cjs/components/Groups/GroupsShowHideButtons.js.map +1 -1
  66. package/lib/cjs/components/Groups/GroupsView.d.ts +19 -11
  67. package/lib/cjs/components/Groups/GroupsView.js +12 -10
  68. package/lib/cjs/components/Groups/GroupsView.js.map +1 -1
  69. package/lib/cjs/components/Groups/GroupsView.scss +1 -1
  70. package/lib/cjs/components/Groups/GroupsVisualization.d.ts +8 -0
  71. package/lib/cjs/components/Groups/GroupsVisualization.js +27 -24
  72. package/lib/cjs/components/Groups/GroupsVisualization.js.map +1 -1
  73. package/lib/cjs/components/Groups/GroupsVisualizationActions.js +4 -4
  74. package/lib/cjs/components/Groups/GroupsVisualizationActions.js.map +1 -1
  75. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.d.ts +4 -4
  76. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js +4 -4
  77. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
  78. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.scss +7 -7
  79. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js +13 -35
  80. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
  81. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js +4 -4
  82. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -1
  83. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +3 -3
  84. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +4 -4
  85. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
  86. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js +4 -4
  87. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -1
  88. package/lib/cjs/components/Groups/ToggleGroupVisibility.js +3 -3
  89. package/lib/cjs/components/Groups/ToggleGroupVisibility.js.map +1 -1
  90. package/lib/cjs/components/Groups/groupsHelpers.d.ts +2 -2
  91. package/lib/cjs/components/Groups/groupsHelpers.js +8 -4
  92. package/lib/cjs/components/Groups/groupsHelpers.js.map +1 -1
  93. package/lib/cjs/components/Groups/hooks/useFetchGroups.d.ts +3 -3
  94. package/lib/cjs/components/Groups/hooks/useFetchGroups.js +6 -5
  95. package/lib/cjs/components/Groups/hooks/useFetchGroups.js.map +1 -1
  96. package/lib/cjs/components/Groups/hooks/useGroupsOperations.d.ts +16 -8
  97. package/lib/cjs/components/Groups/hooks/useGroupsOperations.js +14 -10
  98. package/lib/cjs/components/Groups/hooks/useGroupsOperations.js.map +1 -1
  99. package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.d.ts +4 -4
  100. package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
  101. package/lib/cjs/components/Groups/hooks/useVisualization.js +2 -4
  102. package/lib/cjs/components/Groups/hooks/useVisualization.js.map +1 -1
  103. package/lib/cjs/components/Mappings/BlockingOverlay.js +3 -3
  104. package/lib/cjs/components/Mappings/BlockingOverlay.js.map +1 -1
  105. package/lib/cjs/components/Mappings/Editing/MappingAction.d.ts +8 -0
  106. package/lib/cjs/components/Mappings/Editing/MappingAction.js +16 -15
  107. package/lib/cjs/components/Mappings/Editing/MappingAction.js.map +1 -1
  108. package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.d.ts +1 -1
  109. package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js +1 -1
  110. package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
  111. package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js +12 -7
  112. package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
  113. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js +3 -3
  114. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js.map +1 -1
  115. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js +3 -3
  116. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js.map +1 -1
  117. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js +3 -3
  118. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js.map +1 -1
  119. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js +3 -3
  120. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js.map +1 -1
  121. package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.d.ts +1 -1
  122. package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js +9 -9
  123. package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
  124. package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.js +4 -4
  125. package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -1
  126. package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.d.ts +1 -2
  127. package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js +30 -33
  128. package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
  129. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.d.ts +1 -1
  130. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js +4 -4
  131. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
  132. package/lib/cjs/components/Mappings/Import/SelectIModel.d.ts +1 -1
  133. package/lib/cjs/components/Mappings/Import/SelectIModel.js +5 -5
  134. package/lib/cjs/components/Mappings/Import/SelectIModel.js.map +1 -1
  135. package/lib/cjs/components/Mappings/Import/SelectITwin.js +2 -2
  136. package/lib/cjs/components/Mappings/Import/SelectITwin.js.map +1 -1
  137. package/lib/cjs/components/Mappings/Import/SelectITwin.scss +1 -1
  138. package/lib/cjs/components/Mappings/Import/SelectMappings.d.ts +1 -1
  139. package/lib/cjs/components/Mappings/Import/SelectMappings.js +7 -7
  140. package/lib/cjs/components/Mappings/Import/SelectMappings.js.map +1 -1
  141. package/lib/cjs/components/Mappings/MappingListItem.js.map +1 -1
  142. package/lib/cjs/components/Mappings/MappingViewActionGroup.d.ts +1 -1
  143. package/lib/cjs/components/Mappings/MappingViewActionGroup.js +6 -6
  144. package/lib/cjs/components/Mappings/MappingViewActionGroup.js.map +1 -1
  145. package/lib/cjs/components/Mappings/Mappings.d.ts +8 -0
  146. package/lib/cjs/components/Mappings/Mappings.js +7 -3
  147. package/lib/cjs/components/Mappings/Mappings.js.map +1 -1
  148. package/lib/cjs/components/Mappings/MappingsView.d.ts +7 -0
  149. package/lib/cjs/components/Mappings/MappingsView.js +17 -15
  150. package/lib/cjs/components/Mappings/MappingsView.js.map +1 -1
  151. package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.d.ts +1 -2
  152. package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js +11 -8
  153. package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
  154. package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -1
  155. package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js +8 -7
  156. package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
  157. package/lib/cjs/components/Mappings/hooks/useFetchMappings.js +2 -2
  158. package/lib/cjs/components/Mappings/hooks/useFetchMappings.js.map +1 -1
  159. package/lib/cjs/components/Mappings/hooks/useMappingsOperations.d.ts +9 -2
  160. package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js +44 -22
  161. package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
  162. package/lib/cjs/components/Mappings/hooks/useRunExtraction.d.ts +2 -2
  163. package/lib/cjs/components/Mappings/hooks/useRunExtraction.js +27 -19
  164. package/lib/cjs/components/Mappings/hooks/useRunExtraction.js.map +1 -1
  165. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +11 -3
  166. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +28 -15
  167. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
  168. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +11 -3
  169. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +30 -20
  170. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
  171. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.d.ts +3 -3
  172. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +7 -5
  173. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +1 -1
  174. package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +4 -6
  175. package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
  176. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +11 -3
  177. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js +74 -50
  178. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
  179. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.scss +1 -1
  180. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.d.ts +3 -3
  181. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js +21 -15
  182. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js.map +1 -1
  183. package/lib/cjs/components/Properties/GroupColorToggle.d.ts +2 -2
  184. package/lib/cjs/components/Properties/GroupColorToggle.js +4 -4
  185. package/lib/cjs/components/Properties/GroupColorToggle.js.map +1 -1
  186. package/lib/cjs/components/Properties/GroupInformationPanel.js +3 -3
  187. package/lib/cjs/components/Properties/GroupInformationPanel.js.map +1 -1
  188. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.d.ts +13 -5
  189. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js +41 -42
  190. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
  191. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +1 -1
  192. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.js +5 -5
  193. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.js.map +1 -1
  194. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.d.ts +4 -4
  195. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js +20 -16
  196. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
  197. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.d.ts +3 -5
  198. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js +20 -65
  199. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
  200. package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +20 -29
  201. package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
  202. package/lib/cjs/components/Properties/GroupProperties/SaveModal.d.ts +1 -1
  203. package/lib/cjs/components/Properties/GroupProperties/SaveModal.js +7 -7
  204. package/lib/cjs/components/Properties/GroupProperties/SaveModal.js.map +1 -1
  205. package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js +4 -4
  206. package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
  207. package/lib/cjs/components/Properties/PropertyAction.js +9 -21
  208. package/lib/cjs/components/Properties/PropertyAction.js.map +1 -1
  209. package/lib/cjs/components/Properties/PropertyMenu.d.ts +13 -5
  210. package/lib/cjs/components/Properties/PropertyMenu.js +16 -18
  211. package/lib/cjs/components/Properties/PropertyMenu.js.map +1 -1
  212. package/lib/cjs/components/Properties/PropertyMenuWithVisualization.d.ts +8 -0
  213. package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js +9 -5
  214. package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js.map +1 -1
  215. package/lib/cjs/components/Properties/PropertyNameCell.d.ts +1 -1
  216. package/lib/cjs/components/Properties/PropertyNameCell.js +4 -4
  217. package/lib/cjs/components/Properties/PropertyNameCell.js.map +1 -1
  218. package/lib/cjs/components/Properties/PropertyTable.js +5 -6
  219. package/lib/cjs/components/Properties/PropertyTable.js.map +1 -1
  220. package/lib/cjs/components/Properties/PropertyTableToolbar.d.ts +1 -1
  221. package/lib/cjs/components/Properties/PropertyTableToolbar.js +4 -4
  222. package/lib/cjs/components/Properties/PropertyTableToolbar.js.map +1 -1
  223. package/lib/cjs/components/Properties/hooks/useFormulaValidation.d.ts +2 -1
  224. package/lib/cjs/components/Properties/hooks/useFormulaValidation.js +11 -7
  225. package/lib/cjs/components/Properties/hooks/useFormulaValidation.js.map +1 -1
  226. package/lib/cjs/components/Properties/hooks/usePropertiesQuery.d.ts +4 -0
  227. package/lib/cjs/components/Properties/hooks/usePropertiesQuery.js +12 -0
  228. package/lib/cjs/components/Properties/hooks/usePropertiesQuery.js.map +1 -0
  229. package/lib/cjs/components/Properties/hooks/useValidator.js +4 -4
  230. package/lib/cjs/components/Properties/hooks/useValidator.js.map +1 -1
  231. package/lib/cjs/components/SharedComponents/ActionPanel.d.ts +1 -1
  232. package/lib/cjs/components/SharedComponents/ActionPanel.js +9 -10
  233. package/lib/cjs/components/SharedComponents/ActionPanel.js.map +1 -1
  234. package/lib/cjs/components/SharedComponents/DeleteModal.d.ts +1 -1
  235. package/lib/cjs/components/SharedComponents/DeleteModal.js +9 -10
  236. package/lib/cjs/components/SharedComponents/DeleteModal.js.map +1 -1
  237. package/lib/cjs/components/SharedComponents/EmptyMessage.js +4 -4
  238. package/lib/cjs/components/SharedComponents/EmptyMessage.js.map +1 -1
  239. package/lib/cjs/components/SharedComponents/LoadingOverlay.js +4 -4
  240. package/lib/cjs/components/SharedComponents/LoadingOverlay.js.map +1 -1
  241. package/lib/cjs/components/SharedComponents/LoadingSpinner.js +3 -3
  242. package/lib/cjs/components/SharedComponents/LoadingSpinner.js.map +1 -1
  243. package/lib/cjs/components/SharedComponents/StatusIcon.js +3 -3
  244. package/lib/cjs/components/SharedComponents/StatusIcon.js.map +1 -1
  245. package/lib/cjs/components/context/ExtractionClientContext.js +3 -3
  246. package/lib/cjs/components/context/ExtractionClientContext.js.map +1 -1
  247. package/lib/cjs/components/context/ExtractionStateJobContext.js +3 -3
  248. package/lib/cjs/components/context/ExtractionStateJobContext.js.map +1 -1
  249. package/lib/cjs/components/context/GroupHilitedElementsContext.js +3 -3
  250. package/lib/cjs/components/context/GroupHilitedElementsContext.js.map +1 -1
  251. package/lib/cjs/components/context/GroupingApiConfigContext.d.ts +16 -0
  252. package/lib/cjs/components/context/GroupingApiConfigContext.js +7 -0
  253. package/lib/cjs/components/context/GroupingApiConfigContext.js.map +1 -1
  254. package/lib/cjs/components/context/GroupingMappingCustomUIContext.js +3 -3
  255. package/lib/cjs/components/context/GroupingMappingCustomUIContext.js.map +1 -1
  256. package/lib/cjs/components/context/GroupsClientContext.d.ts +20 -0
  257. package/lib/cjs/components/context/GroupsClientContext.js +45 -0
  258. package/lib/cjs/components/context/GroupsClientContext.js.map +1 -0
  259. package/lib/cjs/components/context/IModelsClientContext.js.map +1 -1
  260. package/lib/cjs/components/context/ITwinsClientContext.js +3 -3
  261. package/lib/cjs/components/context/ITwinsClientContext.js.map +1 -1
  262. package/lib/cjs/components/context/MappingClientContext.d.ts +12 -0
  263. package/lib/cjs/components/context/MappingClientContext.js +14 -2
  264. package/lib/cjs/components/context/MappingClientContext.js.map +1 -1
  265. package/lib/cjs/components/context/PropertiesClientContext.d.ts +20 -0
  266. package/lib/cjs/components/context/PropertiesClientContext.js +45 -0
  267. package/lib/cjs/components/context/PropertiesClientContext.js.map +1 -0
  268. package/lib/cjs/components/context/PropertiesGroupColorContext.js +3 -3
  269. package/lib/cjs/components/context/PropertiesGroupColorContext.js.map +1 -1
  270. package/lib/cjs/components/context/PropertyGridWrapperContext.js +3 -3
  271. package/lib/cjs/components/context/PropertyGridWrapperContext.js.map +1 -1
  272. package/lib/cjs/components/customUI/DefaultGroupingUI.js +3 -3
  273. package/lib/cjs/components/customUI/DefaultGroupingUI.js.map +1 -1
  274. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.d.ts +5 -1
  275. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js +17 -18
  276. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
  277. package/lib/cjs/components/customUI/GroupingMappingCustomUI.d.ts +15 -3
  278. package/lib/cjs/components/customUI/GroupingMappingCustomUI.js +3 -0
  279. package/lib/cjs/components/customUI/GroupingMappingCustomUI.js.map +1 -1
  280. package/lib/cjs/components/customUI/ManualGroupingCustomUI.d.ts +5 -1
  281. package/lib/cjs/components/customUI/ManualGroupingCustomUI.js +12 -8
  282. package/lib/cjs/components/customUI/ManualGroupingCustomUI.js.map +1 -1
  283. package/lib/cjs/components/customUI/SearchGroupingCustomUI.d.ts +5 -1
  284. package/lib/cjs/components/customUI/SearchGroupingCustomUI.js +20 -45
  285. package/lib/cjs/components/customUI/SearchGroupingCustomUI.js.map +1 -1
  286. package/lib/cjs/decorators/BboxDimensionsDecorator.js +3 -10
  287. package/lib/cjs/decorators/BboxDimensionsDecorator.js.map +1 -1
  288. package/lib/cjs/formula/FormulaDataTypeResolver.d.ts +1 -0
  289. package/lib/cjs/formula/FormulaDataTypeResolver.js +4 -3
  290. package/lib/cjs/formula/FormulaDataTypeResolver.js.map +1 -1
  291. package/lib/cjs/formula/FormulaFunctionProvider.js +146 -65
  292. package/lib/cjs/formula/FormulaFunctionProvider.js.map +1 -1
  293. package/lib/cjs/formula/FormulaOperatorsProvider.js +139 -45
  294. package/lib/cjs/formula/FormulaOperatorsProvider.js.map +1 -1
  295. package/lib/cjs/formula/FormulaSplitter.js +63 -13
  296. package/lib/cjs/formula/FormulaSplitter.js.map +1 -1
  297. package/lib/cjs/formula/FormulaTokensDataTypeResolver.js +9 -16
  298. package/lib/cjs/formula/FormulaTokensDataTypeResolver.js.map +1 -1
  299. package/lib/cjs/formula/IResult.d.ts +3 -0
  300. package/lib/cjs/formula/IResult.js.map +1 -1
  301. package/lib/cjs/formula/InfixToPostfixConverter.js +4 -4
  302. package/lib/cjs/formula/InfixToPostfixConverter.js.map +1 -1
  303. package/lib/cjs/formula/InputStream.js +3 -3
  304. package/lib/cjs/formula/InputStream.js.map +1 -1
  305. package/lib/cjs/formula/ParenthesisValidator.js +3 -3
  306. package/lib/cjs/formula/ParenthesisValidator.js.map +1 -1
  307. package/lib/cjs/formula/Queue.js +3 -3
  308. package/lib/cjs/formula/Queue.js.map +1 -1
  309. package/lib/cjs/formula/Stack.js +3 -3
  310. package/lib/cjs/formula/Stack.js.map +1 -1
  311. package/lib/cjs/formula/StringBuilder.js +3 -3
  312. package/lib/cjs/formula/StringBuilder.js.map +1 -1
  313. package/lib/cjs/formula/Types.d.ts +16 -1
  314. package/lib/cjs/formula/Types.js.map +1 -1
  315. package/lib/cjs/formula/Utils.js +4 -4
  316. package/lib/cjs/formula/Utils.js.map +1 -1
  317. package/lib/cjs/grouping-mapping-widget.d.ts +5 -3
  318. package/lib/cjs/grouping-mapping-widget.js +14 -4
  319. package/lib/cjs/grouping-mapping-widget.js.map +1 -1
  320. package/lib/cjs/test/GroupPropertyUtils.test.js +27 -65
  321. package/lib/cjs/test/GroupPropertyUtils.test.js.map +1 -1
  322. package/lib/cjs/test/GroupingMappingCustomUI.test.js +21 -12
  323. package/lib/cjs/test/GroupingMappingCustomUI.test.js.map +1 -1
  324. package/lib/cjs/test/MockFactory.js +3 -3
  325. package/lib/cjs/test/MockFactory.js.map +1 -1
  326. package/lib/cjs/test/PropertyFieldsHelpers.js +3 -3
  327. package/lib/cjs/test/PropertyFieldsHelpers.js.map +1 -1
  328. package/lib/cjs/test/QueryBuilder.test.js +3 -3
  329. package/lib/cjs/test/QueryBuilder.test.js.map +1 -1
  330. package/lib/cjs/test/QueryBuilder.testdata.js +3 -3
  331. package/lib/cjs/test/QueryBuilder.testdata.js.map +1 -1
  332. package/lib/cjs/test/QueryBuilderTestData.js.map +1 -1
  333. package/lib/cjs/test/WidgetHeader.test.js +3 -3
  334. package/lib/cjs/test/WidgetHeader.test.js.map +1 -1
  335. package/lib/cjs/test/test-utils.js +4 -4
  336. package/lib/cjs/test/test-utils.js.map +1 -1
  337. package/lib/esm/WidgetShell/GroupingMapping.d.ts +5 -5
  338. package/lib/esm/WidgetShell/GroupingMapping.js +3 -5
  339. package/lib/esm/WidgetShell/GroupingMapping.js.map +1 -1
  340. package/lib/esm/WidgetShell/GroupingMappingContent.js +4 -4
  341. package/lib/esm/WidgetShell/GroupingMappingContent.js.map +1 -1
  342. package/lib/esm/WidgetShell/GroupingMappingHeader.d.ts +1 -1
  343. package/lib/esm/WidgetShell/GroupingMappingHeader.js +5 -5
  344. package/lib/esm/WidgetShell/GroupingMappingHeader.js.map +1 -1
  345. package/lib/esm/WidgetShell/GroupingMappingWidget.d.ts +4 -0
  346. package/lib/esm/WidgetShell/GroupingMappingWidget.js +6 -4
  347. package/lib/esm/WidgetShell/GroupingMappingWidget.js.map +1 -1
  348. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js +28 -8
  349. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
  350. package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.d.ts +1 -1
  351. package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js +7 -7
  352. package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -1
  353. package/lib/esm/common/hooks/useIsMounted.js +3 -3
  354. package/lib/esm/common/hooks/useIsMounted.js.map +1 -1
  355. package/lib/esm/common/hooks/useMemoizedCollectionPick.js +3 -3
  356. package/lib/esm/common/hooks/useMemoizedCollectionPick.js.map +1 -1
  357. package/lib/esm/common/utils.js +3 -3
  358. package/lib/esm/common/utils.js.map +1 -1
  359. package/lib/esm/common/viewerUtils.js +2 -2
  360. package/lib/esm/common/viewerUtils.js.map +1 -1
  361. package/lib/esm/components/Constants.js +4 -4
  362. package/lib/esm/components/Constants.js.map +1 -1
  363. package/lib/esm/components/GroupingMappingContext.d.ts +19 -3
  364. package/lib/esm/components/GroupingMappingContext.js +41 -14
  365. package/lib/esm/components/GroupingMappingContext.js.map +1 -1
  366. package/lib/esm/components/Groups/Editing/GroupAction.d.ts +10 -2
  367. package/lib/esm/components/Groups/Editing/GroupAction.js +17 -15
  368. package/lib/esm/components/Groups/Editing/GroupAction.js.map +1 -1
  369. package/lib/esm/components/Groups/Editing/GroupDetails.d.ts +1 -1
  370. package/lib/esm/components/Groups/Editing/GroupDetails.js +5 -7
  371. package/lib/esm/components/Groups/Editing/GroupDetails.js.map +1 -1
  372. package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.d.ts +1 -1
  373. package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js +4 -4
  374. package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
  375. package/lib/esm/components/Groups/Editing/GroupDetailsStep.js +4 -4
  376. package/lib/esm/components/Groups/Editing/GroupDetailsStep.js.map +1 -1
  377. package/lib/esm/components/Groups/GroupColorLegend.d.ts +3 -3
  378. package/lib/esm/components/Groups/GroupColorLegend.js +3 -3
  379. package/lib/esm/components/Groups/GroupColorLegend.js.map +1 -1
  380. package/lib/esm/components/Groups/GroupListItem.d.ts +4 -4
  381. package/lib/esm/components/Groups/GroupListItem.js +6 -4
  382. package/lib/esm/components/Groups/GroupListItem.js.map +1 -1
  383. package/lib/esm/components/Groups/GroupListItem.scss +14 -0
  384. package/lib/esm/components/Groups/GroupMenuActions.d.ts +4 -4
  385. package/lib/esm/components/Groups/GroupMenuActions.js +17 -6
  386. package/lib/esm/components/Groups/GroupMenuActions.js.map +1 -1
  387. package/lib/esm/components/Groups/GroupMenuActions.scss +2 -0
  388. package/lib/esm/components/Groups/GroupOverlapProgressBar.d.ts +2 -2
  389. package/lib/esm/components/Groups/GroupOverlapProgressBar.js.map +1 -1
  390. package/lib/esm/components/Groups/Groups.d.ts +12 -4
  391. package/lib/esm/components/Groups/Groups.js +7 -3
  392. package/lib/esm/components/Groups/Groups.js.map +1 -1
  393. package/lib/esm/components/Groups/GroupsAddButton.d.ts +1 -1
  394. package/lib/esm/components/Groups/GroupsAddButton.js +4 -4
  395. package/lib/esm/components/Groups/GroupsAddButton.js.map +1 -1
  396. package/lib/esm/components/Groups/GroupsAddButton.scss +1 -1
  397. package/lib/esm/components/Groups/GroupsShowHideButtons.d.ts +5 -5
  398. package/lib/esm/components/Groups/GroupsShowHideButtons.js +2 -2
  399. package/lib/esm/components/Groups/GroupsShowHideButtons.js.map +1 -1
  400. package/lib/esm/components/Groups/GroupsView.d.ts +19 -11
  401. package/lib/esm/components/Groups/GroupsView.js +14 -12
  402. package/lib/esm/components/Groups/GroupsView.js.map +1 -1
  403. package/lib/esm/components/Groups/GroupsView.scss +1 -1
  404. package/lib/esm/components/Groups/GroupsVisualization.d.ts +8 -0
  405. package/lib/esm/components/Groups/GroupsVisualization.js +29 -26
  406. package/lib/esm/components/Groups/GroupsVisualization.js.map +1 -1
  407. package/lib/esm/components/Groups/GroupsVisualizationActions.js +4 -4
  408. package/lib/esm/components/Groups/GroupsVisualizationActions.js.map +1 -1
  409. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.d.ts +4 -4
  410. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js +5 -5
  411. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
  412. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.scss +7 -7
  413. package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js +13 -35
  414. package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
  415. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js +4 -4
  416. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -1
  417. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +3 -3
  418. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +4 -4
  419. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
  420. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js +4 -4
  421. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -1
  422. package/lib/esm/components/Groups/ToggleGroupVisibility.js +3 -3
  423. package/lib/esm/components/Groups/ToggleGroupVisibility.js.map +1 -1
  424. package/lib/esm/components/Groups/groupsHelpers.d.ts +2 -2
  425. package/lib/esm/components/Groups/groupsHelpers.js +9 -5
  426. package/lib/esm/components/Groups/groupsHelpers.js.map +1 -1
  427. package/lib/esm/components/Groups/hooks/useFetchGroups.d.ts +3 -3
  428. package/lib/esm/components/Groups/hooks/useFetchGroups.js +6 -5
  429. package/lib/esm/components/Groups/hooks/useFetchGroups.js.map +1 -1
  430. package/lib/esm/components/Groups/hooks/useGroupsOperations.d.ts +16 -8
  431. package/lib/esm/components/Groups/hooks/useGroupsOperations.js +14 -10
  432. package/lib/esm/components/Groups/hooks/useGroupsOperations.js.map +1 -1
  433. package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.d.ts +4 -4
  434. package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
  435. package/lib/esm/components/Groups/hooks/useVisualization.js +3 -5
  436. package/lib/esm/components/Groups/hooks/useVisualization.js.map +1 -1
  437. package/lib/esm/components/Mappings/BlockingOverlay.js +3 -3
  438. package/lib/esm/components/Mappings/BlockingOverlay.js.map +1 -1
  439. package/lib/esm/components/Mappings/Editing/MappingAction.d.ts +8 -0
  440. package/lib/esm/components/Mappings/Editing/MappingAction.js +16 -15
  441. package/lib/esm/components/Mappings/Editing/MappingAction.js.map +1 -1
  442. package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.d.ts +1 -1
  443. package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js +1 -1
  444. package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
  445. package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js +12 -7
  446. package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
  447. package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js +3 -3
  448. package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js.map +1 -1
  449. package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js +3 -3
  450. package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js.map +1 -1
  451. package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js +3 -3
  452. package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js.map +1 -1
  453. package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js +3 -3
  454. package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js.map +1 -1
  455. package/lib/esm/components/Mappings/Extraction/ExtractionStatus.d.ts +1 -1
  456. package/lib/esm/components/Mappings/Extraction/ExtractionStatus.js +9 -9
  457. package/lib/esm/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
  458. package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.js +4 -4
  459. package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -1
  460. package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.d.ts +1 -2
  461. package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js +31 -34
  462. package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
  463. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.d.ts +1 -1
  464. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js +4 -4
  465. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
  466. package/lib/esm/components/Mappings/Import/SelectIModel.d.ts +1 -1
  467. package/lib/esm/components/Mappings/Import/SelectIModel.js +5 -5
  468. package/lib/esm/components/Mappings/Import/SelectIModel.js.map +1 -1
  469. package/lib/esm/components/Mappings/Import/SelectITwin.js +2 -2
  470. package/lib/esm/components/Mappings/Import/SelectITwin.js.map +1 -1
  471. package/lib/esm/components/Mappings/Import/SelectITwin.scss +1 -1
  472. package/lib/esm/components/Mappings/Import/SelectMappings.d.ts +1 -1
  473. package/lib/esm/components/Mappings/Import/SelectMappings.js +8 -8
  474. package/lib/esm/components/Mappings/Import/SelectMappings.js.map +1 -1
  475. package/lib/esm/components/Mappings/MappingListItem.js.map +1 -1
  476. package/lib/esm/components/Mappings/MappingViewActionGroup.d.ts +1 -1
  477. package/lib/esm/components/Mappings/MappingViewActionGroup.js +8 -8
  478. package/lib/esm/components/Mappings/MappingViewActionGroup.js.map +1 -1
  479. package/lib/esm/components/Mappings/Mappings.d.ts +8 -0
  480. package/lib/esm/components/Mappings/Mappings.js +7 -3
  481. package/lib/esm/components/Mappings/Mappings.js.map +1 -1
  482. package/lib/esm/components/Mappings/MappingsView.d.ts +7 -0
  483. package/lib/esm/components/Mappings/MappingsView.js +19 -17
  484. package/lib/esm/components/Mappings/MappingsView.js.map +1 -1
  485. package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.d.ts +1 -2
  486. package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js +11 -8
  487. package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
  488. package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -1
  489. package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js +9 -8
  490. package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
  491. package/lib/esm/components/Mappings/hooks/useFetchMappings.js +2 -2
  492. package/lib/esm/components/Mappings/hooks/useFetchMappings.js.map +1 -1
  493. package/lib/esm/components/Mappings/hooks/useMappingsOperations.d.ts +9 -2
  494. package/lib/esm/components/Mappings/hooks/useMappingsOperations.js +45 -23
  495. package/lib/esm/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
  496. package/lib/esm/components/Mappings/hooks/useRunExtraction.d.ts +2 -2
  497. package/lib/esm/components/Mappings/hooks/useRunExtraction.js +27 -19
  498. package/lib/esm/components/Mappings/hooks/useRunExtraction.js.map +1 -1
  499. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +11 -3
  500. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +30 -17
  501. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
  502. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +11 -3
  503. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +33 -23
  504. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
  505. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.d.ts +3 -3
  506. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +8 -6
  507. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +1 -1
  508. package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +5 -7
  509. package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
  510. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +11 -3
  511. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js +76 -52
  512. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
  513. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.scss +1 -1
  514. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.d.ts +3 -3
  515. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js +23 -17
  516. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js.map +1 -1
  517. package/lib/esm/components/Properties/GroupColorToggle.d.ts +2 -2
  518. package/lib/esm/components/Properties/GroupColorToggle.js +4 -4
  519. package/lib/esm/components/Properties/GroupColorToggle.js.map +1 -1
  520. package/lib/esm/components/Properties/GroupInformationPanel.js +3 -3
  521. package/lib/esm/components/Properties/GroupInformationPanel.js.map +1 -1
  522. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.d.ts +13 -5
  523. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js +43 -44
  524. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
  525. package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +1 -1
  526. package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.js +5 -5
  527. package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.js.map +1 -1
  528. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.d.ts +4 -4
  529. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js +22 -18
  530. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
  531. package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.d.ts +3 -5
  532. package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js +21 -66
  533. package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
  534. package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +26 -35
  535. package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
  536. package/lib/esm/components/Properties/GroupProperties/SaveModal.d.ts +1 -1
  537. package/lib/esm/components/Properties/GroupProperties/SaveModal.js +8 -8
  538. package/lib/esm/components/Properties/GroupProperties/SaveModal.js.map +1 -1
  539. package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js +4 -4
  540. package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
  541. package/lib/esm/components/Properties/PropertyAction.js +9 -21
  542. package/lib/esm/components/Properties/PropertyAction.js.map +1 -1
  543. package/lib/esm/components/Properties/PropertyMenu.d.ts +13 -5
  544. package/lib/esm/components/Properties/PropertyMenu.js +16 -18
  545. package/lib/esm/components/Properties/PropertyMenu.js.map +1 -1
  546. package/lib/esm/components/Properties/PropertyMenuWithVisualization.d.ts +8 -0
  547. package/lib/esm/components/Properties/PropertyMenuWithVisualization.js +9 -5
  548. package/lib/esm/components/Properties/PropertyMenuWithVisualization.js.map +1 -1
  549. package/lib/esm/components/Properties/PropertyNameCell.d.ts +1 -1
  550. package/lib/esm/components/Properties/PropertyNameCell.js +4 -4
  551. package/lib/esm/components/Properties/PropertyNameCell.js.map +1 -1
  552. package/lib/esm/components/Properties/PropertyTable.js +5 -6
  553. package/lib/esm/components/Properties/PropertyTable.js.map +1 -1
  554. package/lib/esm/components/Properties/PropertyTableToolbar.d.ts +1 -1
  555. package/lib/esm/components/Properties/PropertyTableToolbar.js +4 -4
  556. package/lib/esm/components/Properties/PropertyTableToolbar.js.map +1 -1
  557. package/lib/esm/components/Properties/hooks/useFormulaValidation.d.ts +2 -1
  558. package/lib/esm/components/Properties/hooks/useFormulaValidation.js +11 -7
  559. package/lib/esm/components/Properties/hooks/useFormulaValidation.js.map +1 -1
  560. package/lib/esm/components/Properties/hooks/usePropertiesQuery.d.ts +4 -0
  561. package/lib/esm/components/Properties/hooks/usePropertiesQuery.js +8 -0
  562. package/lib/esm/components/Properties/hooks/usePropertiesQuery.js.map +1 -0
  563. package/lib/esm/components/Properties/hooks/useValidator.js +4 -4
  564. package/lib/esm/components/Properties/hooks/useValidator.js.map +1 -1
  565. package/lib/esm/components/SharedComponents/ActionPanel.d.ts +1 -1
  566. package/lib/esm/components/SharedComponents/ActionPanel.js +9 -10
  567. package/lib/esm/components/SharedComponents/ActionPanel.js.map +1 -1
  568. package/lib/esm/components/SharedComponents/DeleteModal.d.ts +1 -1
  569. package/lib/esm/components/SharedComponents/DeleteModal.js +10 -11
  570. package/lib/esm/components/SharedComponents/DeleteModal.js.map +1 -1
  571. package/lib/esm/components/SharedComponents/EmptyMessage.js +4 -4
  572. package/lib/esm/components/SharedComponents/EmptyMessage.js.map +1 -1
  573. package/lib/esm/components/SharedComponents/LoadingOverlay.js +4 -4
  574. package/lib/esm/components/SharedComponents/LoadingOverlay.js.map +1 -1
  575. package/lib/esm/components/SharedComponents/LoadingSpinner.js +3 -3
  576. package/lib/esm/components/SharedComponents/LoadingSpinner.js.map +1 -1
  577. package/lib/esm/components/SharedComponents/StatusIcon.js +3 -3
  578. package/lib/esm/components/SharedComponents/StatusIcon.js.map +1 -1
  579. package/lib/esm/components/context/ExtractionClientContext.js +3 -3
  580. package/lib/esm/components/context/ExtractionClientContext.js.map +1 -1
  581. package/lib/esm/components/context/ExtractionStateJobContext.js +3 -3
  582. package/lib/esm/components/context/ExtractionStateJobContext.js.map +1 -1
  583. package/lib/esm/components/context/GroupHilitedElementsContext.js +3 -3
  584. package/lib/esm/components/context/GroupHilitedElementsContext.js.map +1 -1
  585. package/lib/esm/components/context/GroupingApiConfigContext.d.ts +16 -0
  586. package/lib/esm/components/context/GroupingApiConfigContext.js +7 -0
  587. package/lib/esm/components/context/GroupingApiConfigContext.js.map +1 -1
  588. package/lib/esm/components/context/GroupingMappingCustomUIContext.js +3 -3
  589. package/lib/esm/components/context/GroupingMappingCustomUIContext.js.map +1 -1
  590. package/lib/esm/components/context/GroupsClientContext.d.ts +20 -0
  591. package/lib/esm/components/context/GroupsClientContext.js +39 -0
  592. package/lib/esm/components/context/GroupsClientContext.js.map +1 -0
  593. package/lib/esm/components/context/IModelsClientContext.js.map +1 -1
  594. package/lib/esm/components/context/ITwinsClientContext.js +3 -3
  595. package/lib/esm/components/context/ITwinsClientContext.js.map +1 -1
  596. package/lib/esm/components/context/MappingClientContext.d.ts +12 -0
  597. package/lib/esm/components/context/MappingClientContext.js +15 -3
  598. package/lib/esm/components/context/MappingClientContext.js.map +1 -1
  599. package/lib/esm/components/context/PropertiesClientContext.d.ts +20 -0
  600. package/lib/esm/components/context/PropertiesClientContext.js +39 -0
  601. package/lib/esm/components/context/PropertiesClientContext.js.map +1 -0
  602. package/lib/esm/components/context/PropertiesGroupColorContext.js +3 -3
  603. package/lib/esm/components/context/PropertiesGroupColorContext.js.map +1 -1
  604. package/lib/esm/components/context/PropertyGridWrapperContext.js +3 -3
  605. package/lib/esm/components/context/PropertyGridWrapperContext.js.map +1 -1
  606. package/lib/esm/components/customUI/DefaultGroupingUI.js +3 -3
  607. package/lib/esm/components/customUI/DefaultGroupingUI.js.map +1 -1
  608. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.d.ts +5 -1
  609. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js +18 -19
  610. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
  611. package/lib/esm/components/customUI/GroupingMappingCustomUI.d.ts +15 -3
  612. package/lib/esm/components/customUI/GroupingMappingCustomUI.js +3 -0
  613. package/lib/esm/components/customUI/GroupingMappingCustomUI.js.map +1 -1
  614. package/lib/esm/components/customUI/ManualGroupingCustomUI.d.ts +5 -1
  615. package/lib/esm/components/customUI/ManualGroupingCustomUI.js +12 -8
  616. package/lib/esm/components/customUI/ManualGroupingCustomUI.js.map +1 -1
  617. package/lib/esm/components/customUI/SearchGroupingCustomUI.d.ts +5 -1
  618. package/lib/esm/components/customUI/SearchGroupingCustomUI.js +20 -45
  619. package/lib/esm/components/customUI/SearchGroupingCustomUI.js.map +1 -1
  620. package/lib/esm/decorators/BboxDimensionsDecorator.js +5 -12
  621. package/lib/esm/decorators/BboxDimensionsDecorator.js.map +1 -1
  622. package/lib/esm/formula/FormulaDataTypeResolver.d.ts +1 -0
  623. package/lib/esm/formula/FormulaDataTypeResolver.js +4 -3
  624. package/lib/esm/formula/FormulaDataTypeResolver.js.map +1 -1
  625. package/lib/esm/formula/FormulaFunctionProvider.js +146 -65
  626. package/lib/esm/formula/FormulaFunctionProvider.js.map +1 -1
  627. package/lib/esm/formula/FormulaOperatorsProvider.js +139 -45
  628. package/lib/esm/formula/FormulaOperatorsProvider.js.map +1 -1
  629. package/lib/esm/formula/FormulaSplitter.js +63 -13
  630. package/lib/esm/formula/FormulaSplitter.js.map +1 -1
  631. package/lib/esm/formula/FormulaTokensDataTypeResolver.js +9 -16
  632. package/lib/esm/formula/FormulaTokensDataTypeResolver.js.map +1 -1
  633. package/lib/esm/formula/IResult.d.ts +3 -0
  634. package/lib/esm/formula/IResult.js.map +1 -1
  635. package/lib/esm/formula/InfixToPostfixConverter.js +5 -5
  636. package/lib/esm/formula/InfixToPostfixConverter.js.map +1 -1
  637. package/lib/esm/formula/InputStream.js +3 -3
  638. package/lib/esm/formula/InputStream.js.map +1 -1
  639. package/lib/esm/formula/ParenthesisValidator.js +3 -3
  640. package/lib/esm/formula/ParenthesisValidator.js.map +1 -1
  641. package/lib/esm/formula/Queue.js +3 -3
  642. package/lib/esm/formula/Queue.js.map +1 -1
  643. package/lib/esm/formula/Stack.js +3 -3
  644. package/lib/esm/formula/Stack.js.map +1 -1
  645. package/lib/esm/formula/StringBuilder.js +3 -3
  646. package/lib/esm/formula/StringBuilder.js.map +1 -1
  647. package/lib/esm/formula/Types.d.ts +16 -1
  648. package/lib/esm/formula/Types.js.map +1 -1
  649. package/lib/esm/formula/Utils.js +4 -4
  650. package/lib/esm/formula/Utils.js.map +1 -1
  651. package/lib/esm/grouping-mapping-widget.d.ts +5 -3
  652. package/lib/esm/grouping-mapping-widget.js +8 -6
  653. package/lib/esm/grouping-mapping-widget.js.map +1 -1
  654. package/lib/esm/test/GroupPropertyUtils.test.js +28 -66
  655. package/lib/esm/test/GroupPropertyUtils.test.js.map +1 -1
  656. package/lib/esm/test/GroupingMappingCustomUI.test.js +21 -12
  657. package/lib/esm/test/GroupingMappingCustomUI.test.js.map +1 -1
  658. package/lib/esm/test/MockFactory.js +3 -3
  659. package/lib/esm/test/MockFactory.js.map +1 -1
  660. package/lib/esm/test/PropertyFieldsHelpers.js +3 -3
  661. package/lib/esm/test/PropertyFieldsHelpers.js.map +1 -1
  662. package/lib/esm/test/QueryBuilder.test.js +3 -3
  663. package/lib/esm/test/QueryBuilder.test.js.map +1 -1
  664. package/lib/esm/test/QueryBuilder.testdata.js +3 -3
  665. package/lib/esm/test/QueryBuilder.testdata.js.map +1 -1
  666. package/lib/esm/test/QueryBuilderTestData.js.map +1 -1
  667. package/lib/esm/test/WidgetHeader.test.js +3 -3
  668. package/lib/esm/test/WidgetHeader.test.js.map +1 -1
  669. package/lib/esm/test/test-utils.js +4 -4
  670. package/lib/esm/test/test-utils.js.map +1 -1
  671. package/package.json +10 -5
  672. package/lib/cjs/components/Properties/hooks/useCalculatedPropertiesQuery.d.ts +0 -4
  673. package/lib/cjs/components/Properties/hooks/useCalculatedPropertiesQuery.js +0 -12
  674. package/lib/cjs/components/Properties/hooks/useCalculatedPropertiesQuery.js.map +0 -1
  675. package/lib/cjs/components/Properties/hooks/useCustomCalculationsQuery.d.ts +0 -4
  676. package/lib/cjs/components/Properties/hooks/useCustomCalculationsQuery.js +0 -12
  677. package/lib/cjs/components/Properties/hooks/useCustomCalculationsQuery.js.map +0 -1
  678. package/lib/cjs/components/Properties/hooks/useGroupPropertiesQuery.d.ts +0 -4
  679. package/lib/cjs/components/Properties/hooks/useGroupPropertiesQuery.js +0 -12
  680. package/lib/cjs/components/Properties/hooks/useGroupPropertiesQuery.js.map +0 -1
  681. package/lib/esm/components/Properties/hooks/useCalculatedPropertiesQuery.d.ts +0 -4
  682. package/lib/esm/components/Properties/hooks/useCalculatedPropertiesQuery.js +0 -8
  683. package/lib/esm/components/Properties/hooks/useCalculatedPropertiesQuery.js.map +0 -1
  684. package/lib/esm/components/Properties/hooks/useCustomCalculationsQuery.d.ts +0 -4
  685. package/lib/esm/components/Properties/hooks/useCustomCalculationsQuery.js +0 -8
  686. package/lib/esm/components/Properties/hooks/useCustomCalculationsQuery.js.map +0 -1
  687. package/lib/esm/components/Properties/hooks/useGroupPropertiesQuery.d.ts +0 -4
  688. package/lib/esm/components/Properties/hooks/useGroupPropertiesQuery.js +0 -8
  689. package/lib/esm/components/Properties/hooks/useGroupPropertiesQuery.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"MappingClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/MappingClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE;QACrB,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,MAAM,kBAAkB,CAAC,CAAC;KACxE;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,MAAqB,EAAmB,EAAE;IACnF,MAAM,GAAG,GAAG,SAAS,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IACnD,OAAO,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAA0C,EAAE,EAAE;IAChF,IAAI,SAAS,KAAK,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAC9D,OAAO,0BAA0B,CAAC,UAA0B,CAAC,CAAC;KAC/D;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAkB,0BAA0B,EAAE,CAAC,CAAC;AAEjG,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,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 type { IMappingsClient} from \"@itwin/insights-client\";\nimport { MappingsClient, REPORTING_BASE_PATH } from \"@itwin/insights-client\";\nimport { createContext, useContext } from \"react\";\nimport type { ClientPrefix } from \"./GroupingApiConfigContext\";\n\nconst prefixUrl = (baseUrl?: string, prefix?: string) => {\n if (prefix && baseUrl) {\n return baseUrl.replace(\"api.bentley.com\", `${prefix}-api.bentley.com`);\n }\n return baseUrl;\n};\n\nexport const createDefaultMappingClient = (prefix?: ClientPrefix): IMappingsClient => {\n const url = prefixUrl(REPORTING_BASE_PATH, prefix);\n return new MappingsClient(url);\n};\n\nexport const createMappingClient = (clientProp: IMappingsClient | ClientPrefix) => {\n if (undefined === clientProp || typeof clientProp === \"string\") {\n return createDefaultMappingClient(clientProp as ClientPrefix);\n }\n return clientProp;\n};\nexport const MappingClientContext = createContext<IMappingsClient>(createDefaultMappingClient());\n\nexport const useMappingClient = () => {\n const context = useContext(MappingClientContext);\n if (!context) {\n throw new Error(\n \"useMappingClient should be used within a MappingClientContext provider\"\n );\n }\n return context;\n};\n"]}
1
+ {"version":3,"file":"MappingClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/MappingClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE;QACrB,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,MAAM,kBAAkB,CAAC,CAAC;KACxE;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,MAAqB,EAAmB,EAAE;IACnF,MAAM,GAAG,GAAG,SAAS,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;IAC9D,OAAO,IAAI,cAAc,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAA0C,EAAE,EAAE;IAChF,IAAI,SAAS,KAAK,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAC9D,OAAO,0BAA0B,CAAC,UAA0B,CAAC,CAAC;KAC/D;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAkB,0BAA0B,EAAE,CAAC,CAAC;AAEjG;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;KAC3F;IACD,OAAO,OAAO,CAAC;AACjB,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 type { IMappingsClient } from \"@itwin/insights-client\";\nimport { GROUPING_AND_MAPPING_BASE_PATH, MappingsClient } from \"@itwin/insights-client\";\nimport { createContext, useContext } from \"react\";\nimport type { ClientPrefix } from \"./GroupingApiConfigContext\";\n\nconst prefixUrl = (baseUrl?: string, prefix?: string) => {\n if (prefix && baseUrl) {\n return baseUrl.replace(\"api.bentley.com\", `${prefix}-api.bentley.com`);\n }\n return baseUrl;\n};\n\n/**\n * @internal\n */\nexport const createDefaultMappingClient = (prefix?: ClientPrefix): IMappingsClient => {\n const url = prefixUrl(GROUPING_AND_MAPPING_BASE_PATH, prefix);\n return new MappingsClient(undefined, url);\n};\n\n/**\n * @internal\n */\nexport const createMappingClient = (clientProp: IMappingsClient | ClientPrefix) => {\n if (undefined === clientProp || typeof clientProp === \"string\") {\n return createDefaultMappingClient(clientProp as ClientPrefix);\n }\n return clientProp;\n};\n\n/**\n * @internal\n */\nexport const MappingClientContext = createContext<IMappingsClient>(createDefaultMappingClient());\n\n/**\n * @internal\n */\nexport const useMappingClient = () => {\n const context = useContext(MappingClientContext);\n if (!context) {\n throw new Error(\"useMappingClient should be used within a MappingClientContext provider\");\n }\n return context;\n};\n"]}
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import type { IPropertiesClient } from "@itwin/insights-client";
3
+ import type { ClientPrefix } from "./GroupingApiConfigContext";
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare const createDefaultPropertiesClient: (prefix?: ClientPrefix) => IPropertiesClient;
8
+ /**
9
+ * @internal
10
+ */
11
+ export declare const createPropertiesClient: (clientProp: IPropertiesClient | ClientPrefix) => IPropertiesClient;
12
+ /**
13
+ * @internal
14
+ */
15
+ export declare const PropertiesClientContext: import("react").Context<IPropertiesClient>;
16
+ /**
17
+ * @internal
18
+ */
19
+ export declare const usePropertiesClient: () => IPropertiesClient;
20
+ //# sourceMappingURL=PropertiesClientContext.d.ts.map
@@ -0,0 +1,39 @@
1
+ import { GROUPING_AND_MAPPING_BASE_PATH, PropertiesClient } from "@itwin/insights-client";
2
+ import { createContext, useContext } from "react";
3
+ const prefixUrl = (baseUrl, prefix) => {
4
+ if (prefix && baseUrl) {
5
+ return baseUrl.replace("api.bentley.com", `${prefix}-api.bentley.com`);
6
+ }
7
+ return baseUrl;
8
+ };
9
+ /**
10
+ * @internal
11
+ */
12
+ export const createDefaultPropertiesClient = (prefix) => {
13
+ const url = prefixUrl(GROUPING_AND_MAPPING_BASE_PATH, prefix);
14
+ return new PropertiesClient(undefined, url);
15
+ };
16
+ /**
17
+ * @internal
18
+ */
19
+ export const createPropertiesClient = (clientProp) => {
20
+ if (undefined === clientProp || typeof clientProp === "string") {
21
+ return createDefaultPropertiesClient(clientProp);
22
+ }
23
+ return clientProp;
24
+ };
25
+ /**
26
+ * @internal
27
+ */
28
+ export const PropertiesClientContext = createContext(createDefaultPropertiesClient());
29
+ /**
30
+ * @internal
31
+ */
32
+ export const usePropertiesClient = () => {
33
+ const context = useContext(PropertiesClientContext);
34
+ if (!context) {
35
+ throw new Error("useGroupsClient should be used within a GroupsClientContext provider");
36
+ }
37
+ return context;
38
+ };
39
+ //# sourceMappingURL=PropertiesClientContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertiesClientContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertiesClientContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,MAAe,EAAE,EAAE;IACtD,IAAI,MAAM,IAAI,OAAO,EAAE;QACrB,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,MAAM,kBAAkB,CAAC,CAAC;KACxE;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,MAAqB,EAAqB,EAAE;IACxF,MAAM,GAAG,GAAG,SAAS,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;IAC9D,OAAO,IAAI,gBAAgB,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;AAC9C,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,UAA4C,EAAE,EAAE;IACrF,IAAI,SAAS,KAAK,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAC9D,OAAO,6BAA6B,CAAC,UAA0B,CAAC,CAAC;KAClE;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAoB,6BAA6B,EAAE,CAAC,CAAC;AAEzG;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,OAAO,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC;IACpD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;KACzF;IACD,OAAO,OAAO,CAAC;AACjB,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 type { IPropertiesClient } from \"@itwin/insights-client\";\nimport { GROUPING_AND_MAPPING_BASE_PATH, PropertiesClient } from \"@itwin/insights-client\";\nimport { createContext, useContext } from \"react\";\nimport type { ClientPrefix } from \"./GroupingApiConfigContext\";\n\nconst prefixUrl = (baseUrl?: string, prefix?: string) => {\n if (prefix && baseUrl) {\n return baseUrl.replace(\"api.bentley.com\", `${prefix}-api.bentley.com`);\n }\n return baseUrl;\n};\n\n/**\n * @internal\n */\nexport const createDefaultPropertiesClient = (prefix?: ClientPrefix): IPropertiesClient => {\n const url = prefixUrl(GROUPING_AND_MAPPING_BASE_PATH, prefix);\n return new PropertiesClient(undefined, url);\n};\n\n/**\n * @internal\n */\nexport const createPropertiesClient = (clientProp: IPropertiesClient | ClientPrefix) => {\n if (undefined === clientProp || typeof clientProp === \"string\") {\n return createDefaultPropertiesClient(clientProp as ClientPrefix);\n }\n return clientProp;\n};\n\n/**\n * @internal\n */\nexport const PropertiesClientContext = createContext<IPropertiesClient>(createDefaultPropertiesClient());\n\n/**\n * @internal\n */\nexport const usePropertiesClient = () => {\n const context = useContext(PropertiesClientContext);\n if (!context) {\n throw new Error(\"useGroupsClient should be used within a GroupsClientContext provider\");\n }\n return context;\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 * as React from "react";
6
6
  export const PropertiesGroupColorContext = React.createContext({
7
7
  showGroupColor: false,
@@ -1 +1 @@
1
- {"version":3,"file":"PropertiesGroupColorContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertiesGroupColorContext.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,CAAC,aAAa,CAAuB;IACnF,cAAc,EAAE,KAAK;IACrB,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC;CAC7B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAyB,EAAE;IACvE,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;IAC9D,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,6FAA6F,CAC9F,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,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 * as React from \"react\";\n\nexport interface PropertiesGroupColor {\n showGroupColor: boolean;\n setShowGroupColor: (showGroupColor: boolean | ((showGroupColor: boolean) => boolean)) => void;\n}\n\nexport const PropertiesGroupColorContext = React.createContext<PropertiesGroupColor>({\n showGroupColor: false,\n setShowGroupColor: () => { },\n});\n\nexport const usePropertiesGroupColorContext = (): PropertiesGroupColor => {\n const context = React.useContext(PropertiesGroupColorContext);\n if (!context) {\n throw new Error(\n \"usePropertiesGroupColorContext should be used within a PropertiesGroupColorContext provider\"\n );\n }\n return context;\n};\n"]}
1
+ {"version":3,"file":"PropertiesGroupColorContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertiesGroupColorContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,CAAC,aAAa,CAAuB;IACnF,cAAc,EAAE,KAAK;IACrB,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC;CAC5B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAyB,EAAE;IACvE,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;IAC9D,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,6FAA6F,CAAC,CAAC;KAChH;IACD,OAAO,OAAO,CAAC;AACjB,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 * as React from \"react\";\n\nexport interface PropertiesGroupColor {\n showGroupColor: boolean;\n setShowGroupColor: (showGroupColor: boolean | ((showGroupColor: boolean) => boolean)) => void;\n}\n\nexport const PropertiesGroupColorContext = React.createContext<PropertiesGroupColor>({\n showGroupColor: false,\n setShowGroupColor: () => {},\n});\n\nexport const usePropertiesGroupColorContext = (): PropertiesGroupColor => {\n const context = React.useContext(PropertiesGroupColorContext);\n if (!context) {\n throw new Error(\"usePropertiesGroupColorContext should be used within a PropertiesGroupColorContext provider\");\n }\n return context;\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 * as React from "react";
6
6
  export const PropertyGridWrapperContext = React.createContext({
7
7
  currentPropertyList: [],
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyGridWrapperContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertyGridWrapperContext.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,CAAC,aAAa,CAAoB;IAC/E,mBAAmB,EAAE,EAAE;IACvB,sBAAsB,EAAE,GAAG,EAAE,CAAC,EAAE;IAChC,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE;IAClB,UAAU,EAAE,KAAK;CAClB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAsB,EAAE;IAC5D,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;IAC7D,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,2FAA2F,CAC5F,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,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 * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport type { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\n\nexport interface PropertySelection {\n currentPropertyList: PropertyRecord[];\n setCurrentPropertyList: (value: PropertyRecord[] | ((value: PropertyRecord[]) => PropertyRecord[])) => void;\n setQuery: (value: string) => void;\n queryBuilder?: QueryBuilder;\n isUpdating: boolean;\n}\n\nexport const PropertyGridWrapperContext = React.createContext<PropertySelection>({\n currentPropertyList: [],\n setCurrentPropertyList: () => [],\n setQuery: () => \"\",\n isUpdating: false,\n});\n\nexport const usePropertyGridWrapper = (): PropertySelection => {\n const context = React.useContext(PropertyGridWrapperContext);\n if (!context) {\n throw new Error(\n \"usePropertyGridWrapperContext should be used within a PropertyGridWrapperContext provider\"\n );\n }\n return context;\n};\n"]}
1
+ {"version":3,"file":"PropertyGridWrapperContext.js","sourceRoot":"","sources":["../../../../src/components/context/PropertyGridWrapperContext.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,CAAC,aAAa,CAAoB;IAC/E,mBAAmB,EAAE,EAAE;IACvB,sBAAsB,EAAE,GAAG,EAAE,CAAC,EAAE;IAChC,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE;IAClB,UAAU,EAAE,KAAK;CAClB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAsB,EAAE;IAC5D,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;IAC7D,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,2FAA2F,CAAC,CAAC;KAC9G;IACD,OAAO,OAAO,CAAC;AACjB,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 * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport type { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\n\nexport interface PropertySelection {\n currentPropertyList: PropertyRecord[];\n setCurrentPropertyList: (value: PropertyRecord[] | ((value: PropertyRecord[]) => PropertyRecord[])) => void;\n setQuery: (value: string) => void;\n queryBuilder?: QueryBuilder;\n isUpdating: boolean;\n}\n\nexport const PropertyGridWrapperContext = React.createContext<PropertySelection>({\n currentPropertyList: [],\n setCurrentPropertyList: () => [],\n setQuery: () => \"\",\n isUpdating: false,\n});\n\nexport const usePropertyGridWrapper = (): PropertySelection => {\n const context = React.useContext(PropertyGridWrapperContext);\n if (!context) {\n throw new Error(\"usePropertyGridWrapperContext should be used within a PropertyGridWrapperContext provider\");\n }\n return context;\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 { SvgCursor, SvgDraw, SvgSearch } from "@itwin/itwinui-icons-react";
7
7
  import { GroupingMappingCustomUIType } from "./GroupingMappingCustomUI";
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultGroupingUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/DefaultGroupingUI.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,iBAAiB,GAA8B;IAC1D;QACE,IAAI,EAAE,WAAW;QACjB,YAAY,EAAE,WAAW;QACzB,IAAI,EAAE,2BAA2B,CAAC,QAAQ;QAC1C,IAAI,EAAE,oBAAC,SAAS,OAAG;QACnB,WAAW,EAAE,yBAAyB;KACvC;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,YAAY,EAAE,gBAAgB;QAC9B,IAAI,EAAE,2BAA2B,CAAC,QAAQ;QAC1C,IAAI,EAAE,oBAAC,SAAS,OAAG;QACnB,WAAW,EAAE,sBAAsB;KACpC;IACD;QACE,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,QAAQ;QACtB,IAAI,EAAE,2BAA2B,CAAC,QAAQ;QAC1C,IAAI,EAAE,oBAAC,OAAO,OAAG;QACjB,WAAW,EAAE,sBAAsB;KACpC;CACF,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 { SvgCursor, SvgDraw, SvgSearch } from \"@itwin/itwinui-icons-react\";\nimport type { GroupingMappingCustomUI } from \"./GroupingMappingCustomUI\";\nimport { GroupingMappingCustomUIType } from \"./GroupingMappingCustomUI\";\nimport { GroupQueryBuilderCustomUI } from \"./GroupQueryBuilderCustomUI\";\nimport { ManualGroupingCustomUI } from \"./ManualGroupingCustomUI\";\nimport { SearchGroupingCustomUI } from \"./SearchGroupingCustomUI\";\n\nexport const defaultGroupingUI: GroupingMappingCustomUI[] = [\n {\n name: \"Selection\",\n displayLabel: \"Selection\",\n type: GroupingMappingCustomUIType.Grouping,\n icon: <SvgCursor />,\n uiComponent: GroupQueryBuilderCustomUI,\n },\n {\n name: \"Query Keywords\",\n displayLabel: \"Query Keywords\",\n type: GroupingMappingCustomUIType.Grouping,\n icon: <SvgSearch />,\n uiComponent: SearchGroupingCustomUI,\n },\n {\n name: \"Manual\",\n displayLabel: \"Manual\",\n type: GroupingMappingCustomUIType.Grouping,\n icon: <SvgDraw />,\n uiComponent: ManualGroupingCustomUI,\n },\n];\n"]}
1
+ {"version":3,"file":"DefaultGroupingUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/DefaultGroupingUI.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,iBAAiB,GAA8B;IAC1D;QACE,IAAI,EAAE,WAAW;QACjB,YAAY,EAAE,WAAW;QACzB,IAAI,EAAE,2BAA2B,CAAC,QAAQ;QAC1C,IAAI,EAAE,oBAAC,SAAS,OAAG;QACnB,WAAW,EAAE,yBAAyB;KACvC;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,YAAY,EAAE,gBAAgB;QAC9B,IAAI,EAAE,2BAA2B,CAAC,QAAQ;QAC1C,IAAI,EAAE,oBAAC,SAAS,OAAG;QACnB,WAAW,EAAE,sBAAsB;KACpC;IACD;QACE,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,QAAQ;QACtB,IAAI,EAAE,2BAA2B,CAAC,QAAQ;QAC1C,IAAI,EAAE,oBAAC,OAAO,OAAG;QACjB,WAAW,EAAE,sBAAsB;KACpC;CACF,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 { SvgCursor, SvgDraw, SvgSearch } from \"@itwin/itwinui-icons-react\";\nimport type { GroupingMappingCustomUI } from \"./GroupingMappingCustomUI\";\nimport { GroupingMappingCustomUIType } from \"./GroupingMappingCustomUI\";\nimport { GroupQueryBuilderCustomUI } from \"./GroupQueryBuilderCustomUI\";\nimport { ManualGroupingCustomUI } from \"./ManualGroupingCustomUI\";\nimport { SearchGroupingCustomUI } from \"./SearchGroupingCustomUI\";\n\nexport const defaultGroupingUI: GroupingMappingCustomUI[] = [\n {\n name: \"Selection\",\n displayLabel: \"Selection\",\n type: GroupingMappingCustomUIType.Grouping,\n icon: <SvgCursor />,\n uiComponent: GroupQueryBuilderCustomUI,\n },\n {\n name: \"Query Keywords\",\n displayLabel: \"Query Keywords\",\n type: GroupingMappingCustomUIType.Grouping,\n icon: <SvgSearch />,\n uiComponent: SearchGroupingCustomUI,\n },\n {\n name: \"Manual\",\n displayLabel: \"Manual\",\n type: GroupingMappingCustomUIType.Grouping,\n icon: <SvgDraw />,\n uiComponent: ManualGroupingCustomUI,\n },\n];\n"]}
@@ -1,5 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import "./GroupQueryBuilderCustomUI.scss";
3
3
  import type { GroupingCustomUIProps } from "./GroupingMappingCustomUI";
4
- export declare const GroupQueryBuilderCustomUI: ({ updateQuery, isUpdating, resetView, }: GroupingCustomUIProps) => JSX.Element;
4
+ /**
5
+ * A default group query builder for the Grouping Mapping Widget that uses the property grid to generate queries.
6
+ * @public
7
+ */
8
+ export declare const GroupQueryBuilderCustomUI: ({ updateQuery, isUpdating, resetView }: GroupingCustomUIProps) => JSX.Element;
5
9
  //# sourceMappingURL=GroupQueryBuilderCustomUI.d.ts.map
@@ -1,13 +1,13 @@
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, { useCallback, useEffect, useMemo, useState } from "react";
6
6
  import { Presentation } from "@itwin/presentation-frontend";
7
7
  import { KeySet } from "@itwin/presentation-common";
8
8
  import "./GroupQueryBuilderCustomUI.scss";
9
9
  import { QueryBuilder } from "../Groups/QueryBuilder/QueryBuilder";
10
- import { DEFAULT_PROPERTY_GRID_RULESET, PresentationPropertyDataProvider, } from "@itwin/presentation-components";
10
+ import { DEFAULT_PROPERTY_GRID_RULESET, PresentationPropertyDataProvider } from "@itwin/presentation-components";
11
11
  import { VirtualizedPropertyGridWithDataProvider } from "@itwin/components-react";
12
12
  import { ResizableContainerObserver } from "@itwin/core-react";
13
13
  import { PropertyGridWrapperContext } from "../context/PropertyGridWrapperContext";
@@ -29,7 +29,11 @@ const createPropertyDataProvider = async (keys, iModelConnection) => {
29
29
  }
30
30
  return dataProvider;
31
31
  };
32
- export const GroupQueryBuilderCustomUI = ({ updateQuery, isUpdating, resetView, }) => {
32
+ /**
33
+ * A default group query builder for the Grouping Mapping Widget that uses the property grid to generate queries.
34
+ * @public
35
+ */
36
+ export const GroupQueryBuilderCustomUI = ({ updateQuery, isUpdating, resetView }) => {
33
37
  const { iModelConnection } = useGroupingMappingApiConfig();
34
38
  if (!iModelConnection) {
35
39
  throw new Error("This component requires an active iModelConnection.");
@@ -48,9 +52,7 @@ export const GroupQueryBuilderCustomUI = ({ updateQuery, isUpdating, resetView,
48
52
  setDataProvider(dataProvider);
49
53
  setQueryBuilder(new QueryBuilder(dataProvider));
50
54
  };
51
- return iModelConnection
52
- ? Presentation.selection.selectionChange.addListener(onSelectionChanged)
53
- : () => { };
55
+ return iModelConnection ? Presentation.selection.selectionChange.addListener(onSelectionChanged) : () => { };
54
56
  }, [iModelConnection]);
55
57
  const onClickResetButton = async () => {
56
58
  queryBuilder?.resetQueryBuilder();
@@ -69,16 +71,13 @@ export const GroupQueryBuilderCustomUI = ({ updateQuery, isUpdating, resetView,
69
71
  setQuery: updateQuery,
70
72
  isUpdating: isUpdating ?? false,
71
73
  }), [currentPropertyList, isUpdating, queryBuilder, updateQuery]);
72
- const actionButtonRenderers = useMemo(() => [
73
- ({ property }) => (React.createElement(PropertyAction, { property: property })),
74
- ], []);
75
- return (React.createElement("div", { className: "gmw-select-query-generator-container" }, !dataProvider || selectionKeySet.size === 0 ? (React.createElement(Alert, { type: 'informational' }, "Please select on an element within the viewer first, then select properties to generate a group query.")) :
76
- React.createElement(React.Fragment, null,
77
- React.createElement("div", { className: "gmw-select-property-grid-container" },
78
- React.createElement(ResizableContainerObserver, { onResize: resize }),
79
- React.createElement(PropertyGridWrapperContext.Provider, { value: propertyContextValues },
80
- React.createElement(VirtualizedPropertyGridWithDataProvider, { dataProvider: dataProvider, width: size.width, height: size.height, actionButtonRenderers: actionButtonRenderers }))),
81
- React.createElement("div", { className: "gmw-select-reset-button" },
82
- React.createElement(Button, { styleType: "default", size: "small", onClick: onClickResetButton }, "Reset")))));
74
+ const actionButtonRenderers = useMemo(() => [({ property }) => React.createElement(PropertyAction, { property: property })], []);
75
+ return (React.createElement("div", { className: "gmw-select-query-generator-container" }, !dataProvider || selectionKeySet.size === 0 ? (React.createElement(Alert, { type: "informational" }, "Please select on an element within the viewer first, then select properties to generate a group query.")) : (React.createElement(React.Fragment, null,
76
+ React.createElement("div", { className: "gmw-select-property-grid-container" },
77
+ React.createElement(ResizableContainerObserver, { onResize: resize }),
78
+ React.createElement(PropertyGridWrapperContext.Provider, { value: propertyContextValues },
79
+ React.createElement(VirtualizedPropertyGridWithDataProvider, { dataProvider: dataProvider, width: size.width, height: size.height, actionButtonRenderers: actionButtonRenderers }))),
80
+ React.createElement("div", { className: "gmw-select-reset-button" },
81
+ React.createElement(Button, { styleType: "default", size: "small", onClick: onClickResetButton }, "Reset"))))));
83
82
  };
84
83
  //# sourceMappingURL=GroupQueryBuilderCustomUI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GroupQueryBuilderCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/GroupQueryBuilderCustomUI.tsx"],"names":[],"mappings":"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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { Presentation } from \"@itwin/presentation-frontend\";\nimport type {\n ISelectionProvider,\n SelectionChangeEventArgs,\n} from \"@itwin/presentation-frontend\";\nimport { KeySet } from \"@itwin/presentation-common\";\nimport \"./GroupQueryBuilderCustomUI.scss\";\nimport { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\nimport type { GroupingCustomUIProps } from \"./GroupingMappingCustomUI\";\nimport {\n DEFAULT_PROPERTY_GRID_RULESET,\n PresentationPropertyDataProvider,\n} from \"@itwin/presentation-components\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport type { ActionButtonRendererProps } from \"@itwin/components-react\";\nimport { VirtualizedPropertyGridWithDataProvider } from \"@itwin/components-react\";\nimport { ResizableContainerObserver } from \"@itwin/core-react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyGridWrapperContext } from \"../context/PropertyGridWrapperContext\";\nimport { PropertyAction } from \"../Properties/PropertyAction\";\nimport { Alert, Button } from \"@itwin/itwinui-react\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport { IModelApp } from \"@itwin/core-frontend\";\n\nconst createPropertyDataProvider = async (\n keys: KeySet,\n iModelConnection: IModelConnection\n): Promise<PresentationPropertyDataProvider> => {\n const dataProvider = new PresentationPropertyDataProvider({\n imodel: iModelConnection,\n ruleset: DEFAULT_PROPERTY_GRID_RULESET,\n });\n dataProvider.keys = keys;\n dataProvider.isNestedPropertyCategoryGroupingEnabled = true;\n const data = await dataProvider.getData();\n const selectedCategory = data.categories.find((category) => category.label === IModelApp.localization.getLocalizedString(\"Presentation:selectedItems.categoryLabel\"));\n if (selectedCategory) {\n selectedCategory.expand = true;\n }\n return dataProvider;\n};\n\ninterface ContainerDimensions {\n width: number;\n height: number;\n}\n\nexport const GroupQueryBuilderCustomUI = ({\n updateQuery,\n isUpdating,\n resetView,\n}: GroupingCustomUIProps) => {\n const { iModelConnection } = useGroupingMappingApiConfig();\n if (!iModelConnection) {\n throw new Error(\"This component requires an active iModelConnection.\");\n }\n const [size, setSize] = useState<ContainerDimensions>({ width: 0, height: 0 });\n const [dataProvider, setDataProvider] =\n useState<PresentationPropertyDataProvider | undefined>(undefined);\n const [currentPropertyList, setCurrentPropertyList] = useState<PropertyRecord[]>([]);\n const [selectionKeySet, setSelectionKeyset] = useState<KeySet>(new KeySet());\n const [queryBuilder, setQueryBuilder] = useState<QueryBuilder | undefined>();\n\n useEffect(() => {\n const onSelectionChanged = async (\n evt: SelectionChangeEventArgs,\n selectionProvider: ISelectionProvider\n ) => {\n const selection = selectionProvider.getSelection(evt.imodel, evt.level);\n const keys = new KeySet(selection);\n setSelectionKeyset(keys);\n const dataProvider = await createPropertyDataProvider(keys, iModelConnection);\n setDataProvider(dataProvider);\n setQueryBuilder(new QueryBuilder(dataProvider));\n };\n\n return iModelConnection\n ? Presentation.selection.selectionChange.addListener(onSelectionChanged)\n : () => { };\n }, [iModelConnection]);\n\n const onClickResetButton = async () => {\n queryBuilder?.resetQueryBuilder();\n updateQuery(\"\");\n setCurrentPropertyList([]);\n if (resetView)\n await resetView().catch((e) =>\n /* eslint-disable no-console */\n console.error(e)\n );\n };\n\n const resize = useCallback((width, height) => setSize({ width, height }), []);\n\n const propertyContextValues = useMemo(\n () => ({\n currentPropertyList,\n setCurrentPropertyList,\n queryBuilder,\n setQuery: updateQuery,\n isUpdating: isUpdating ?? false,\n }),\n [currentPropertyList, isUpdating, queryBuilder, updateQuery]\n );\n\n const actionButtonRenderers = useMemo(\n () => [\n ({ property }: ActionButtonRendererProps) => (\n <PropertyAction property={property} />\n ),\n ],\n []\n );\n\n return (\n <div className=\"gmw-select-query-generator-container\">\n {!dataProvider || selectionKeySet.size === 0 ? (\n <Alert type='informational'>\n Please select on an element within the viewer first, then select properties to generate a group query.\n </Alert>\n ) :\n <>\n <div className=\"gmw-select-property-grid-container\">\n <ResizableContainerObserver onResize={resize} />\n <PropertyGridWrapperContext.Provider value={propertyContextValues}>\n <VirtualizedPropertyGridWithDataProvider\n dataProvider={dataProvider}\n width={size.width}\n height={size.height}\n actionButtonRenderers={actionButtonRenderers}\n />\n </PropertyGridWrapperContext.Provider>\n </div>\n <div className=\"gmw-select-reset-button\">\n <Button\n styleType=\"default\"\n size=\"small\"\n onClick={onClickResetButton}\n >\n Reset\n </Button>\n </div>\n </>\n }\n </div>\n );\n};\n\n"]}
1
+ {"version":3,"file":"GroupQueryBuilderCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/GroupQueryBuilderCustomUI.tsx"],"names":[],"mappings":"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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { Presentation } from \"@itwin/presentation-frontend\";\nimport type { ISelectionProvider, SelectionChangeEventArgs } from \"@itwin/presentation-frontend\";\nimport { KeySet } from \"@itwin/presentation-common\";\nimport \"./GroupQueryBuilderCustomUI.scss\";\nimport { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\nimport type { GroupingCustomUIProps } from \"./GroupingMappingCustomUI\";\nimport { DEFAULT_PROPERTY_GRID_RULESET, PresentationPropertyDataProvider } from \"@itwin/presentation-components\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport type { ActionButtonRendererProps } from \"@itwin/components-react\";\nimport { VirtualizedPropertyGridWithDataProvider } from \"@itwin/components-react\";\nimport { ResizableContainerObserver } from \"@itwin/core-react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyGridWrapperContext } from \"../context/PropertyGridWrapperContext\";\nimport { PropertyAction } from \"../Properties/PropertyAction\";\nimport { Alert, Button } from \"@itwin/itwinui-react\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport { IModelApp } from \"@itwin/core-frontend\";\n\nconst createPropertyDataProvider = async (keys: KeySet, iModelConnection: IModelConnection): Promise<PresentationPropertyDataProvider> => {\n const dataProvider = new PresentationPropertyDataProvider({\n imodel: iModelConnection,\n ruleset: DEFAULT_PROPERTY_GRID_RULESET,\n });\n dataProvider.keys = keys;\n dataProvider.isNestedPropertyCategoryGroupingEnabled = true;\n const data = await dataProvider.getData();\n const selectedCategory = data.categories.find(\n (category) => category.label === IModelApp.localization.getLocalizedString(\"Presentation:selectedItems.categoryLabel\"),\n );\n if (selectedCategory) {\n selectedCategory.expand = true;\n }\n return dataProvider;\n};\n\ninterface ContainerDimensions {\n width: number;\n height: number;\n}\n\n/**\n * A default group query builder for the Grouping Mapping Widget that uses the property grid to generate queries.\n * @public\n */\nexport const GroupQueryBuilderCustomUI = ({ updateQuery, isUpdating, resetView }: GroupingCustomUIProps) => {\n const { iModelConnection } = useGroupingMappingApiConfig();\n if (!iModelConnection) {\n throw new Error(\"This component requires an active iModelConnection.\");\n }\n const [size, setSize] = useState<ContainerDimensions>({ width: 0, height: 0 });\n const [dataProvider, setDataProvider] = useState<PresentationPropertyDataProvider | undefined>(undefined);\n const [currentPropertyList, setCurrentPropertyList] = useState<PropertyRecord[]>([]);\n const [selectionKeySet, setSelectionKeyset] = useState<KeySet>(new KeySet());\n const [queryBuilder, setQueryBuilder] = useState<QueryBuilder | undefined>();\n\n useEffect(() => {\n const onSelectionChanged = async (evt: SelectionChangeEventArgs, selectionProvider: ISelectionProvider) => {\n const selection = selectionProvider.getSelection(evt.imodel, evt.level);\n const keys = new KeySet(selection);\n setSelectionKeyset(keys);\n const dataProvider = await createPropertyDataProvider(keys, iModelConnection);\n setDataProvider(dataProvider);\n setQueryBuilder(new QueryBuilder(dataProvider));\n };\n\n return iModelConnection ? Presentation.selection.selectionChange.addListener(onSelectionChanged) : () => {};\n }, [iModelConnection]);\n\n const onClickResetButton = async () => {\n queryBuilder?.resetQueryBuilder();\n updateQuery(\"\");\n setCurrentPropertyList([]);\n if (resetView)\n await resetView().catch((e) =>\n /* eslint-disable no-console */\n console.error(e),\n );\n };\n\n const resize = useCallback((width, height) => setSize({ width, height }), []);\n\n const propertyContextValues = useMemo(\n () => ({\n currentPropertyList,\n setCurrentPropertyList,\n queryBuilder,\n setQuery: updateQuery,\n isUpdating: isUpdating ?? false,\n }),\n [currentPropertyList, isUpdating, queryBuilder, updateQuery],\n );\n\n const actionButtonRenderers = useMemo(() => [({ property }: ActionButtonRendererProps) => <PropertyAction property={property} />], []);\n\n return (\n <div className=\"gmw-select-query-generator-container\">\n {!dataProvider || selectionKeySet.size === 0 ? (\n <Alert type=\"informational\">Please select on an element within the viewer first, then select properties to generate a group query.</Alert>\n ) : (\n <>\n <div className=\"gmw-select-property-grid-container\">\n <ResizableContainerObserver onResize={resize} />\n <PropertyGridWrapperContext.Provider value={propertyContextValues}>\n <VirtualizedPropertyGridWithDataProvider\n dataProvider={dataProvider}\n width={size.width}\n height={size.height}\n actionButtonRenderers={actionButtonRenderers}\n />\n </PropertyGridWrapperContext.Provider>\n </div>\n <div className=\"gmw-select-reset-button\">\n <Button styleType=\"default\" size=\"small\" onClick={onClickResetButton}>\n Reset\n </Button>\n </div>\n </>\n )}\n </div>\n );\n};\n"]}
@@ -1,11 +1,19 @@
1
- import type { Group, Mapping } from "@itwin/insights-client";
1
+ import type { GroupMinimal, Mapping } from "@itwin/insights-client";
2
2
  import type { ReactElement } from "react";
3
+ /**
4
+ * @public
5
+ */
3
6
  export declare enum GroupingMappingCustomUIType {
4
7
  Grouping = 0,
5
8
  Context = 1
6
9
  }
10
+ /**
11
+ * @public
12
+ */
7
13
  export declare type GroupingMappingCustomUI = GroupingCustomUI | ContextCustomUI;
8
- /** Custom UI Definitions. */
14
+ /** Custom UI Definitions.
15
+ * @public
16
+ */
9
17
  export interface IGroupingMappingCustomUI {
10
18
  /**
11
19
  * See GroupingMappingCustomUIType.
@@ -26,6 +34,7 @@ export interface IGroupingMappingCustomUI {
26
34
  }
27
35
  /**
28
36
  * Context custom UI type definition.
37
+ * @public
29
38
  */
30
39
  export interface ContextCustomUI extends IGroupingMappingCustomUI {
31
40
  /**
@@ -39,10 +48,11 @@ export interface ContextCustomUI extends IGroupingMappingCustomUI {
39
48
  /**
40
49
  * Callback function for context custom UI menu item click event.
41
50
  */
42
- onClick?: (group: Group, mapping: Mapping, iModelId: string) => void;
51
+ onClick?: (group: GroupMinimal, mapping: Mapping, iModelId: string) => void;
43
52
  }
44
53
  /**
45
54
  * Group custom UI type definition.
55
+ * @public
46
56
  */
47
57
  export interface GroupingCustomUI extends IGroupingMappingCustomUI {
48
58
  /**
@@ -57,6 +67,7 @@ export interface GroupingCustomUI extends IGroupingMappingCustomUI {
57
67
  /** Custom UI Component props definitions. */
58
68
  /**
59
69
  * Context custom UI component arguments definition.
70
+ * @public
60
71
  */
61
72
  export interface ContextCustomUIProps {
62
73
  /**
@@ -74,6 +85,7 @@ export interface ContextCustomUIProps {
74
85
  }
75
86
  /**
76
87
  * Group custom UI component arguments definition.
88
+ * @public
77
89
  */
78
90
  export interface GroupingCustomUIProps {
79
91
  /**
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @public
3
+ */
1
4
  export var GroupingMappingCustomUIType;
2
5
  (function (GroupingMappingCustomUIType) {
3
6
  GroupingMappingCustomUIType[GroupingMappingCustomUIType["Grouping"] = 0] = "Grouping";
@@ -1 +1 @@
1
- {"version":3,"file":"GroupingMappingCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/GroupingMappingCustomUI.ts"],"names":[],"mappings":"AAOA,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,qFAAQ,CAAA;IACR,mFAAO,CAAA;AACT,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC","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 { Group, Mapping } from \"@itwin/insights-client\";\nimport type { ReactElement } from \"react\";\n\nexport enum GroupingMappingCustomUIType {\n Grouping,\n Context,\n}\n\nexport type GroupingMappingCustomUI = GroupingCustomUI | ContextCustomUI;\n\n/** Custom UI Definitions. */\n\nexport interface IGroupingMappingCustomUI {\n /**\n * See GroupingMappingCustomUIType.\n */\n type: GroupingMappingCustomUIType;\n /**\n * Unique identifier of the custom UI.\n */\n name: string;\n /**\n * Display label in the widget.\n */\n displayLabel: string;\n /**\n * Optional icon, will be shown before display label in widget.\n */\n icon?: ReactElement;\n}\n\n/**\n * Context custom UI type definition.\n */\nexport interface ContextCustomUI extends IGroupingMappingCustomUI {\n /**\n * See GroupingMappingCustomUIType.\n */\n type: GroupingMappingCustomUIType.Context;\n /**\n * User defined component for UI interaction with grouping mapping widget.\n */\n uiComponent?: React.ComponentType<ContextCustomUIProps>;\n /**\n * Callback function for context custom UI menu item click event.\n */\n onClick?: (group: Group, mapping: Mapping, iModelId: string) => void;\n}\n\n/**\n * Group custom UI type definition.\n */\nexport interface GroupingCustomUI extends IGroupingMappingCustomUI {\n /**\n * See GroupingMappingCustomUIType.\n */\n type: GroupingMappingCustomUIType.Grouping;\n /**\n * Custom UI Component to build query interactively. Refer to SearchGroupingCustomUI/ManualGroupingCustomUI.\n */\n uiComponent: (props: GroupingCustomUIProps) => JSX.Element;\n}\n\n/** Custom UI Component props definitions. */\n\n/**\n * Context custom UI component arguments definition.\n */\nexport interface ContextCustomUIProps {\n /**\n * IModel Id.\n */\n iModelId: string;\n /**\n * Mapping Id.\n */\n mappingId: string;\n /**\n * Group Id.\n */\n groupId: string;\n}\n\n/**\n * Group custom UI component arguments definition.\n */\nexport interface GroupingCustomUIProps {\n /**\n * To validate and update current query.\n */\n updateQuery: (query: string) => void;\n /**\n * To get the query loading status.\n */\n isUpdating?: boolean;\n /**\n * To reset the viewer.\n */\n resetView?: () => Promise<void>;\n /**\n * The initial query for the Group being edited.\n */\n initialEditModeQuery?: string;\n\n}\n"]}
1
+ {"version":3,"file":"GroupingMappingCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/GroupingMappingCustomUI.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,qFAAQ,CAAA;IACR,mFAAO,CAAA;AACT,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC","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 } from \"@itwin/insights-client\";\nimport type { ReactElement } from \"react\";\n\n/**\n * @public\n */\nexport enum GroupingMappingCustomUIType {\n Grouping,\n Context,\n}\n\n/**\n * @public\n */\nexport type GroupingMappingCustomUI = GroupingCustomUI | ContextCustomUI;\n\n/** Custom UI Definitions.\n * @public\n */\nexport interface IGroupingMappingCustomUI {\n /**\n * See GroupingMappingCustomUIType.\n */\n type: GroupingMappingCustomUIType;\n /**\n * Unique identifier of the custom UI.\n */\n name: string;\n /**\n * Display label in the widget.\n */\n displayLabel: string;\n /**\n * Optional icon, will be shown before display label in widget.\n */\n icon?: ReactElement;\n}\n\n/**\n * Context custom UI type definition.\n * @public\n */\nexport interface ContextCustomUI extends IGroupingMappingCustomUI {\n /**\n * See GroupingMappingCustomUIType.\n */\n type: GroupingMappingCustomUIType.Context;\n /**\n * User defined component for UI interaction with grouping mapping widget.\n */\n uiComponent?: React.ComponentType<ContextCustomUIProps>;\n /**\n * Callback function for context custom UI menu item click event.\n */\n onClick?: (group: GroupMinimal, mapping: Mapping, iModelId: string) => void;\n}\n\n/**\n * Group custom UI type definition.\n * @public\n */\nexport interface GroupingCustomUI extends IGroupingMappingCustomUI {\n /**\n * See GroupingMappingCustomUIType.\n */\n type: GroupingMappingCustomUIType.Grouping;\n /**\n * Custom UI Component to build query interactively. Refer to SearchGroupingCustomUI/ManualGroupingCustomUI.\n */\n uiComponent: (props: GroupingCustomUIProps) => JSX.Element;\n}\n\n/** Custom UI Component props definitions. */\n\n/**\n * Context custom UI component arguments definition.\n * @public\n */\nexport interface ContextCustomUIProps {\n /**\n * IModel Id.\n */\n iModelId: string;\n /**\n * Mapping Id.\n */\n mappingId: string;\n /**\n * Group Id.\n */\n groupId: string;\n}\n\n/**\n * Group custom UI component arguments definition.\n * @public\n */\nexport interface GroupingCustomUIProps {\n /**\n * To validate and update current query.\n */\n updateQuery: (query: string) => void;\n /**\n * To get the query loading status.\n */\n isUpdating?: boolean;\n /**\n * To reset the viewer.\n */\n resetView?: () => Promise<void>;\n /**\n * The initial query for the Group being edited.\n */\n initialEditModeQuery?: string;\n}\n"]}
@@ -1,5 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import "./ManualGroupingCustomUI.scss";
3
3
  import type { GroupingCustomUIProps } from "./GroupingMappingCustomUI";
4
- export declare const ManualGroupingCustomUI: ({ updateQuery, isUpdating, resetView, initialEditModeQuery, }: GroupingCustomUIProps) => JSX.Element;
4
+ /**
5
+ * A default group query builder for the Grouping Mapping Widget that uses a manual input to generate queries.
6
+ * @public
7
+ */
8
+ export declare const ManualGroupingCustomUI: ({ updateQuery, isUpdating, resetView, initialEditModeQuery }: GroupingCustomUIProps) => JSX.Element;
5
9
  //# sourceMappingURL=ManualGroupingCustomUI.d.ts.map
@@ -1,17 +1,21 @@
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 { Alert, Button, LabeledTextarea } from "@itwin/itwinui-react";
7
7
  import { LoadingSpinner } from "../SharedComponents/LoadingSpinner";
8
8
  import "./ManualGroupingCustomUI.scss";
9
- export const ManualGroupingCustomUI = ({ updateQuery, isUpdating, resetView, initialEditModeQuery, }) => {
9
+ /**
10
+ * A default group query builder for the Grouping Mapping Widget that uses a manual input to generate queries.
11
+ * @public
12
+ */
13
+ export const ManualGroupingCustomUI = ({ updateQuery, isUpdating, resetView, initialEditModeQuery }) => {
10
14
  const [manualInput, setManualInput] = React.useState(initialEditModeQuery ?? "");
11
- return (React.createElement("div", { className: 'gmw-manual-form' },
12
- React.createElement(Alert, { type: 'informational' }, "Generate group using an ECSQL query. Please select ECInstanceId and ECClassId columns in the query."),
13
- React.createElement(LabeledTextarea, { label: 'Query', required: true, value: manualInput, onChange: (event) => setManualInput(event.target.value), disabled: isUpdating, placeholder: `E.g. "SELECT ECInstanceId, ECClassId FROM BisCore:PhysicalElement"` }),
14
- React.createElement("div", { className: 'gmw-manual-actions' },
15
+ return (React.createElement("div", { className: "gmw-manual-form" },
16
+ React.createElement(Alert, { type: "informational" }, "Generate group using an ECSQL query. Please select ECInstanceId and ECClassId columns in the query."),
17
+ React.createElement(LabeledTextarea, { label: "Query", required: true, value: manualInput, onChange: (event) => setManualInput(event.target.value), disabled: isUpdating, placeholder: `E.g. "SELECT ECInstanceId, ECClassId FROM BisCore:PhysicalElement"` }),
18
+ React.createElement("div", { className: "gmw-manual-actions" },
15
19
  isUpdating && React.createElement(LoadingSpinner, null),
16
20
  React.createElement(Button, { disabled: isUpdating, onClick: () => updateQuery(manualInput) }, "Apply"),
17
21
  React.createElement(Button, { disabled: isUpdating, onClick: async () => {
@@ -1 +1 @@
1
- {"version":3,"file":"ManualGroupingCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/ManualGroupingCustomUI.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,+BAA+B,CAAC;AAGvC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,WAAW,EACX,UAAU,EACV,SAAS,EACT,oBAAoB,GACE,EAAE,EAAE;IAC1B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;IAEjF,OAAO,CACL,6BAAK,SAAS,EAAC,iBAAiB;QAC9B,oBAAC,KAAK,IAAC,IAAI,EAAC,eAAe,0GAEnB;QACR,oBAAC,eAAe,IACd,KAAK,EAAC,OAAO,EACb,QAAQ,QACR,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EACvD,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,oEAAoE,GACjF;QACF,6BAAK,SAAS,EAAC,oBAAoB;YAChC,UAAU,IAAI,oBAAC,cAAc,OAAG;YACjC,oBAAC,MAAM,IAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,YAE5D;YACT,oBAAC,MAAM,IACL,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,KAAK,IAAI,EAAE;oBAClB,WAAW,CAAC,EAAE,CAAC,CAAC;oBAChB,cAAc,CAAC,EAAE,CAAC,CAAC;oBACnB,IAAI,SAAS,EAAE;wBACb,MAAM,SAAS,EAAE,CAAC;qBACnB;gBACH,CAAC,YAGM,CACL,CACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport React from \"react\";\nimport { Alert, Button, LabeledTextarea } from \"@itwin/itwinui-react\";\nimport { LoadingSpinner } from \"../SharedComponents/LoadingSpinner\";\nimport \"./ManualGroupingCustomUI.scss\";\nimport type { GroupingCustomUIProps } from \"./GroupingMappingCustomUI\";\n\nexport const ManualGroupingCustomUI = ({\n updateQuery,\n isUpdating,\n resetView,\n initialEditModeQuery,\n}: GroupingCustomUIProps) => {\n const [manualInput, setManualInput] = React.useState(initialEditModeQuery ?? \"\");\n\n return (\n <div className='gmw-manual-form'>\n <Alert type='informational'>\n Generate group using an ECSQL query. Please select ECInstanceId and ECClassId columns in the query.\n </Alert>\n <LabeledTextarea\n label='Query'\n required\n value={manualInput}\n onChange={(event) => setManualInput(event.target.value)}\n disabled={isUpdating}\n placeholder={`E.g. \"SELECT ECInstanceId, ECClassId FROM BisCore:PhysicalElement\"`}\n />\n <div className='gmw-manual-actions'>\n {isUpdating && <LoadingSpinner />}\n <Button disabled={isUpdating} onClick={() => updateQuery(manualInput)}>\n Apply\n </Button>\n <Button\n disabled={isUpdating}\n onClick={async () => {\n updateQuery(\"\");\n setManualInput(\"\");\n if (resetView) {\n await resetView();\n }\n }}\n >\n Clear\n </Button>\n </div>\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"ManualGroupingCustomUI.js","sourceRoot":"","sources":["../../../../src/components/customUI/ManualGroupingCustomUI.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,+BAA+B,CAAC;AAGvC;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,oBAAoB,EAAyB,EAAE,EAAE;IAC5H,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;IAEjF,OAAO,CACL,6BAAK,SAAS,EAAC,iBAAiB;QAC9B,oBAAC,KAAK,IAAC,IAAI,EAAC,eAAe,0GAA4G;QACvI,oBAAC,eAAe,IACd,KAAK,EAAC,OAAO,EACb,QAAQ,QACR,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EACvD,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,oEAAoE,GACjF;QACF,6BAAK,SAAS,EAAC,oBAAoB;YAChC,UAAU,IAAI,oBAAC,cAAc,OAAG;YACjC,oBAAC,MAAM,IAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,YAE5D;YACT,oBAAC,MAAM,IACL,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,KAAK,IAAI,EAAE;oBAClB,WAAW,CAAC,EAAE,CAAC,CAAC;oBAChB,cAAc,CAAC,EAAE,CAAC,CAAC;oBACnB,IAAI,SAAS,EAAE;wBACb,MAAM,SAAS,EAAE,CAAC;qBACnB;gBACH,CAAC,YAGM,CACL,CACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport React from \"react\";\nimport { Alert, Button, LabeledTextarea } from \"@itwin/itwinui-react\";\nimport { LoadingSpinner } from \"../SharedComponents/LoadingSpinner\";\nimport \"./ManualGroupingCustomUI.scss\";\nimport type { GroupingCustomUIProps } from \"./GroupingMappingCustomUI\";\n\n/**\n * A default group query builder for the Grouping Mapping Widget that uses a manual input to generate queries.\n * @public\n */\nexport const ManualGroupingCustomUI = ({ updateQuery, isUpdating, resetView, initialEditModeQuery }: GroupingCustomUIProps) => {\n const [manualInput, setManualInput] = React.useState(initialEditModeQuery ?? \"\");\n\n return (\n <div className=\"gmw-manual-form\">\n <Alert type=\"informational\">Generate group using an ECSQL query. Please select ECInstanceId and ECClassId columns in the query.</Alert>\n <LabeledTextarea\n label=\"Query\"\n required\n value={manualInput}\n onChange={(event) => setManualInput(event.target.value)}\n disabled={isUpdating}\n placeholder={`E.g. \"SELECT ECInstanceId, ECClassId FROM BisCore:PhysicalElement\"`}\n />\n <div className=\"gmw-manual-actions\">\n {isUpdating && <LoadingSpinner />}\n <Button disabled={isUpdating} onClick={() => updateQuery(manualInput)}>\n Apply\n </Button>\n <Button\n disabled={isUpdating}\n onClick={async () => {\n updateQuery(\"\");\n setManualInput(\"\");\n if (resetView) {\n await resetView();\n }\n }}\n >\n Clear\n </Button>\n </div>\n </div>\n );\n};\n"]}
@@ -1,5 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import type { GroupingCustomUIProps } from "./GroupingMappingCustomUI";
3
3
  import "./SearchGroupingCustomUI.scss";
4
- export declare const SearchGroupingCustomUI: ({ updateQuery, isUpdating, resetView, }: GroupingCustomUIProps) => JSX.Element;
4
+ /**
5
+ * A default group query builder for the Grouping Mapping Widget that uses a generic query template to search for elements.
6
+ * @public
7
+ */
8
+ export declare const SearchGroupingCustomUI: ({ updateQuery, isUpdating, resetView }: GroupingCustomUIProps) => JSX.Element;
5
9
  //# sourceMappingURL=SearchGroupingCustomUI.d.ts.map
@@ -1,18 +1,21 @@
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 { Alert, Button, LabeledTextarea } from "@itwin/itwinui-react";
7
7
  import { LoadingSpinner } from "../SharedComponents/LoadingSpinner";
8
8
  import "./SearchGroupingCustomUI.scss";
9
- export const SearchGroupingCustomUI = ({ updateQuery, isUpdating, resetView, }) => {
9
+ /**
10
+ * A default group query builder for the Grouping Mapping Widget that uses a generic query template to search for elements.
11
+ * @public
12
+ */
13
+ export const SearchGroupingCustomUI = ({ updateQuery, isUpdating, resetView }) => {
10
14
  const [searchInput, setSearchInput] = React.useState("");
11
15
  const isWrappedInQuotes = (text) => {
12
16
  return text.startsWith(`"`) && text.endsWith(`"`);
13
17
  };
14
- const needsAndOperator = (token, index, searchQuery) => isWrappedInQuotes(token) ||
15
- (index === 1 && isWrappedInQuotes(searchQuery[0]));
18
+ const needsAndOperator = (token, index, searchQuery) => isWrappedInQuotes(token) || (index === 1 && isWrappedInQuotes(searchQuery[0]));
16
19
  const generateSearchQuery = (searchQuery) => {
17
20
  if (searchQuery.length === 0) {
18
21
  updateQuery("");
@@ -23,56 +26,28 @@ export const SearchGroupingCustomUI = ({ updateQuery, isUpdating, resetView, })
23
26
  generatedSearchQuery += `LEFT JOIN bis.PhysicalType pt ON be.TypeDefinition.Id = pt.ECInstanceID`;
24
27
  generatedSearchQuery += ` WHERE `;
25
28
  generatedSearchQuery += `((${searchQuery
26
- .map((token, index) => `${index === 0
27
- ? ""
28
- : needsAndOperator(token, index, searchQuery)
29
- ? "AND"
30
- : "OR"} be.codevalue LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
29
+ .map((token, index) => `${index === 0 ? "" : needsAndOperator(token, index, searchQuery) ? "AND" : "OR"} be.codevalue LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
31
30
  .join(" ")}) OR (${searchQuery
32
- .map((token, index) => `${index === 0
33
- ? ""
34
- : needsAndOperator(token, index, searchQuery)
35
- ? "AND"
36
- : "OR"} be.userlabel LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
31
+ .map((token, index) => `${index === 0 ? "" : needsAndOperator(token, index, searchQuery) ? "AND" : "OR"} be.userlabel LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
37
32
  .join(" ")})) OR ((${searchQuery
38
- .map((token, index) => `${index === 0
39
- ? ""
40
- : needsAndOperator(token, index, searchQuery)
41
- ? "AND"
42
- : "OR"} cat.codevalue LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
33
+ .map((token, index) => `${index === 0 ? "" : needsAndOperator(token, index, searchQuery) ? "AND" : "OR"} cat.codevalue LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
43
34
  .join(" ")}) OR (${searchQuery
44
- .map((token, index) => `${index === 0
45
- ? ""
46
- : needsAndOperator(token, index, searchQuery)
47
- ? "AND"
48
- : "OR"} cat.userlabel LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
35
+ .map((token, index) => `${index === 0 ? "" : needsAndOperator(token, index, searchQuery) ? "AND" : "OR"} cat.userlabel LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
49
36
  .join(" ")})) OR (${searchQuery
50
- .map((token, index) => `${index === 0
51
- ? ""
52
- : needsAndOperator(token, index, searchQuery)
53
- ? "AND"
54
- : "OR"} ecc.name LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
37
+ .map((token, index) => `${index === 0 ? "" : needsAndOperator(token, index, searchQuery) ? "AND" : "OR"} ecc.name LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
55
38
  .join(" ")})`;
56
39
  // Physical Types
57
40
  generatedSearchQuery += ` OR ((${searchQuery
58
- .map((token, index) => `${index === 0
59
- ? ""
60
- : needsAndOperator(token, index, searchQuery)
61
- ? "AND"
62
- : "OR"} pt.codevalue LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
41
+ .map((token, index) => `${index === 0 ? "" : needsAndOperator(token, index, searchQuery) ? "AND" : "OR"} pt.codevalue LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
63
42
  .join(" ")}) OR (${searchQuery
64
- .map((token, index) => `${index === 0
65
- ? ""
66
- : needsAndOperator(token, index, searchQuery)
67
- ? "AND"
68
- : "OR"} pt.userlabel LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
43
+ .map((token, index) => `${index === 0 ? "" : needsAndOperator(token, index, searchQuery) ? "AND" : "OR"} pt.userlabel LIKE '%${isWrappedInQuotes(token) ? token.slice(1, -1) : token}%'`)
69
44
  .join(" ")})) `;
70
45
  updateQuery(generatedSearchQuery);
71
46
  };
72
- return (React.createElement("div", { className: 'gmw-search-form' },
73
- React.createElement(Alert, { type: 'informational' }, "Generate a query by keywords. Keywords wrapped in double quotes will be considered a required criteria."),
74
- React.createElement(LabeledTextarea, { label: 'Query Keywords', required: true, value: searchInput, onChange: (event) => setSearchInput(event.target.value), disabled: isUpdating, placeholder: `E.g. "red" chair` }),
75
- React.createElement("div", { className: 'gmw-search-actions' },
47
+ return (React.createElement("div", { className: "gmw-search-form" },
48
+ React.createElement(Alert, { type: "informational" }, "Generate a query by keywords. Keywords wrapped in double quotes will be considered a required criteria."),
49
+ React.createElement(LabeledTextarea, { label: "Query Keywords", required: true, value: searchInput, onChange: (event) => setSearchInput(event.target.value), disabled: isUpdating, placeholder: `E.g. "red" chair` }),
50
+ React.createElement("div", { className: "gmw-search-actions" },
76
51
  isUpdating && React.createElement(LoadingSpinner, null),
77
52
  React.createElement(Button, { disabled: isUpdating, onClick: () => generateSearchQuery(searchInput
78
53
  ? searchInput