@itwin/grouping-mapping-widget 0.35.4 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (598) hide show
  1. package/lib/cjs/GroupingMappingWidget.d.ts +28 -0
  2. package/lib/cjs/GroupingMappingWidget.js +58 -0
  3. package/lib/cjs/GroupingMappingWidget.js.map +1 -0
  4. package/lib/cjs/WidgetShell/GroupingMapping.d.ts +1 -2
  5. package/lib/cjs/WidgetShell/GroupingMapping.js +5 -4
  6. package/lib/cjs/WidgetShell/GroupingMapping.js.map +1 -1
  7. package/lib/cjs/WidgetShell/GroupingMappingContent.d.ts +2 -3
  8. package/lib/cjs/WidgetShell/GroupingMappingContent.js.map +1 -1
  9. package/lib/cjs/WidgetShell/GroupingMappingHeader.d.ts +0 -1
  10. package/lib/cjs/WidgetShell/GroupingMappingWidget.js +4 -2
  11. package/lib/cjs/WidgetShell/GroupingMappingWidget.js.map +1 -1
  12. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.d.ts +2 -3
  13. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js +6 -5
  14. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
  15. package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.d.ts +0 -1
  16. package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js +3 -2
  17. package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -1
  18. package/lib/cjs/common/hooks/useIsMounted.d.ts +0 -1
  19. package/lib/cjs/common/hooks/useMemoizedCollectionPick.js +1 -2
  20. package/lib/cjs/common/hooks/useMemoizedCollectionPick.js.map +1 -1
  21. package/lib/cjs/common/utils.d.ts +1 -1
  22. package/lib/cjs/common/utils.js +22 -32
  23. package/lib/cjs/common/utils.js.map +1 -1
  24. package/lib/cjs/common/viewerUtils.js.map +1 -1
  25. package/lib/cjs/components/Constants.js +1 -1
  26. package/lib/cjs/components/Constants.js.map +1 -1
  27. package/lib/cjs/components/GroupingMappingContext.js +3 -2
  28. package/lib/cjs/components/GroupingMappingContext.js.map +1 -1
  29. package/lib/cjs/components/Groups/Editing/GroupAction.d.ts +2 -3
  30. package/lib/cjs/components/Groups/Editing/GroupAction.js +16 -11
  31. package/lib/cjs/components/Groups/Editing/GroupAction.js.map +1 -1
  32. package/lib/cjs/components/Groups/Editing/GroupDetails.d.ts +0 -1
  33. package/lib/cjs/components/Groups/Editing/GroupDetails.js +4 -3
  34. package/lib/cjs/components/Groups/Editing/GroupDetails.js.map +1 -1
  35. package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.d.ts +0 -1
  36. package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js +3 -2
  37. package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
  38. package/lib/cjs/components/Groups/Editing/GroupDetailsStep.d.ts +2 -3
  39. package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js +5 -4
  40. package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js.map +1 -1
  41. package/lib/cjs/components/Groups/GroupColorLegend.d.ts +0 -1
  42. package/lib/cjs/components/Groups/GroupListItem.d.ts +0 -1
  43. package/lib/cjs/components/Groups/GroupListItem.js.map +1 -1
  44. package/lib/cjs/components/Groups/GroupMenuActions.d.ts +0 -1
  45. package/lib/cjs/components/Groups/GroupMenuActions.js +5 -4
  46. package/lib/cjs/components/Groups/GroupMenuActions.js.map +1 -1
  47. package/lib/cjs/components/Groups/GroupOverlapProgressBar.d.ts +0 -1
  48. package/lib/cjs/components/Groups/GroupOverlapProgressBar.js +2 -1
  49. package/lib/cjs/components/Groups/GroupOverlapProgressBar.js.map +1 -1
  50. package/lib/cjs/components/Groups/Groups.js.map +1 -1
  51. package/lib/cjs/components/Groups/GroupsAddButton.d.ts +0 -1
  52. package/lib/cjs/components/Groups/GroupsAddButton.js +2 -1
  53. package/lib/cjs/components/Groups/GroupsAddButton.js.map +1 -1
  54. package/lib/cjs/components/Groups/GroupsShowHideButtons.d.ts +0 -1
  55. package/lib/cjs/components/Groups/GroupsShowHideButtons.js +2 -1
  56. package/lib/cjs/components/Groups/GroupsShowHideButtons.js.map +1 -1
  57. package/lib/cjs/components/Groups/GroupsView.d.ts +1 -1
  58. package/lib/cjs/components/Groups/GroupsView.js +4 -3
  59. package/lib/cjs/components/Groups/GroupsView.js.map +1 -1
  60. package/lib/cjs/components/Groups/GroupsVisualization.d.ts +0 -1
  61. package/lib/cjs/components/Groups/GroupsVisualization.js +9 -6
  62. package/lib/cjs/components/Groups/GroupsVisualization.js.map +1 -1
  63. package/lib/cjs/components/Groups/GroupsVisualizationActions.d.ts +0 -1
  64. package/lib/cjs/components/Groups/GroupsVisualizationActions.js +3 -2
  65. package/lib/cjs/components/Groups/GroupsVisualizationActions.js.map +1 -1
  66. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.d.ts +0 -1
  67. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js +34 -14
  68. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
  69. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js +40 -36
  70. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
  71. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.d.ts +0 -1
  72. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js +2 -1
  73. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -1
  74. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +0 -1
  75. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +2 -1
  76. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
  77. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.d.ts +2 -3
  78. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js +7 -6
  79. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -1
  80. package/lib/cjs/components/Groups/ToggleGroupVisibility.d.ts +0 -1
  81. package/lib/cjs/components/Groups/ToggleGroupVisibility.js +3 -2
  82. package/lib/cjs/components/Groups/ToggleGroupVisibility.js.map +1 -1
  83. package/lib/cjs/components/Groups/groupsHelpers.d.ts +1 -1
  84. package/lib/cjs/components/Groups/groupsHelpers.js.map +1 -1
  85. package/lib/cjs/components/Groups/hooks/useGroupsOperations.d.ts +0 -1
  86. package/lib/cjs/components/Groups/hooks/useGroupsOperations.js.map +1 -1
  87. package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.js +1 -2
  88. package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
  89. package/lib/cjs/components/Groups/hooks/useVisualization.d.ts +0 -1
  90. package/lib/cjs/components/Groups/hooks/useVisualization.js +2 -1
  91. package/lib/cjs/components/Groups/hooks/useVisualization.js.map +1 -1
  92. package/lib/cjs/components/Mappings/BlockingOverlay.d.ts +0 -1
  93. package/lib/cjs/components/Mappings/Editing/MappingAction.d.ts +2 -3
  94. package/lib/cjs/components/Mappings/Editing/MappingAction.js +9 -8
  95. package/lib/cjs/components/Mappings/Editing/MappingAction.js.map +1 -1
  96. package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js +18 -8
  97. package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
  98. package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.d.ts +0 -1
  99. package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js +20 -11
  100. package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
  101. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.d.ts +0 -1
  102. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js +2 -1
  103. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js.map +1 -1
  104. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.d.ts +0 -1
  105. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js +2 -1
  106. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js.map +1 -1
  107. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.d.ts +0 -1
  108. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js +2 -1
  109. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js.map +1 -1
  110. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.d.ts +0 -1
  111. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js +2 -1
  112. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js.map +1 -1
  113. package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.d.ts +0 -1
  114. package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js +1 -1
  115. package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
  116. package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.d.ts +1 -2
  117. package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.d.ts +2 -2
  118. package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js +20 -19
  119. package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
  120. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.d.ts +2 -3
  121. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js +19 -19
  122. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
  123. package/lib/cjs/components/Mappings/Import/SelectIModel.d.ts +2 -3
  124. package/lib/cjs/components/Mappings/Import/SelectIModel.js +9 -8
  125. package/lib/cjs/components/Mappings/Import/SelectIModel.js.map +1 -1
  126. package/lib/cjs/components/Mappings/Import/SelectITwin.d.ts +2 -3
  127. package/lib/cjs/components/Mappings/Import/SelectITwin.js +15 -14
  128. package/lib/cjs/components/Mappings/Import/SelectITwin.js.map +1 -1
  129. package/lib/cjs/components/Mappings/Import/SelectMappings.d.ts +2 -3
  130. package/lib/cjs/components/Mappings/Import/SelectMappings.js +10 -9
  131. package/lib/cjs/components/Mappings/Import/SelectMappings.js.map +1 -1
  132. package/lib/cjs/components/Mappings/MappingListItem.d.ts +0 -1
  133. package/lib/cjs/components/Mappings/MappingListItem.js +1 -2
  134. package/lib/cjs/components/Mappings/MappingListItem.js.map +1 -1
  135. package/lib/cjs/components/Mappings/MappingViewActionGroup.d.ts +0 -1
  136. package/lib/cjs/components/Mappings/MappingViewActionGroup.js +5 -4
  137. package/lib/cjs/components/Mappings/MappingViewActionGroup.js.map +1 -1
  138. package/lib/cjs/components/Mappings/Mappings.d.ts +3 -4
  139. package/lib/cjs/components/Mappings/Mappings.js.map +1 -1
  140. package/lib/cjs/components/Mappings/MappingsView.d.ts +2 -2
  141. package/lib/cjs/components/Mappings/MappingsView.js +18 -16
  142. package/lib/cjs/components/Mappings/MappingsView.js.map +1 -1
  143. package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js +4 -3
  144. package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
  145. package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -2
  146. package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js +1 -1
  147. package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
  148. package/lib/cjs/components/Mappings/hooks/useMappingsOperations.d.ts +0 -1
  149. package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js +2 -1
  150. package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
  151. package/lib/cjs/components/Mappings/hooks/useRunExtraction.d.ts +0 -1
  152. package/lib/cjs/components/Mappings/hooks/useRunExtraction.js.map +1 -1
  153. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +2 -3
  154. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +4 -3
  155. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
  156. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +0 -1
  157. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +19 -5
  158. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
  159. package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.d.ts +0 -1
  160. package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +3 -2
  161. package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
  162. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +0 -1
  163. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js +4 -3
  164. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
  165. package/lib/cjs/components/Properties/GroupColorToggle.d.ts +1 -2
  166. package/lib/cjs/components/Properties/GroupColorToggle.js +3 -2
  167. package/lib/cjs/components/Properties/GroupColorToggle.js.map +1 -1
  168. package/lib/cjs/components/Properties/GroupInformationPanel.d.ts +0 -1
  169. package/lib/cjs/components/Properties/GroupInformationPanel.js +3 -2
  170. package/lib/cjs/components/Properties/GroupInformationPanel.js.map +1 -1
  171. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.d.ts +1 -2
  172. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js +28 -26
  173. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
  174. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +0 -1
  175. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.d.ts +0 -1
  176. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js +5 -4
  177. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
  178. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
  179. package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.d.ts +0 -1
  180. package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +16 -17
  181. package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
  182. package/lib/cjs/components/Properties/GroupProperties/SaveModal.d.ts +0 -1
  183. package/lib/cjs/components/Properties/GroupProperties/SaveModal.js +5 -4
  184. package/lib/cjs/components/Properties/GroupProperties/SaveModal.js.map +1 -1
  185. package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.d.ts +0 -1
  186. package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js +2 -1
  187. package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
  188. package/lib/cjs/components/Properties/PropertyAction.d.ts +0 -1
  189. package/lib/cjs/components/Properties/PropertyAction.js +7 -3
  190. package/lib/cjs/components/Properties/PropertyAction.js.map +1 -1
  191. package/lib/cjs/components/Properties/PropertyMenu.d.ts +0 -1
  192. package/lib/cjs/components/Properties/PropertyMenuWithVisualization.d.ts +0 -1
  193. package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js +2 -1
  194. package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js.map +1 -1
  195. package/lib/cjs/components/Properties/PropertyNameCell.d.ts +0 -1
  196. package/lib/cjs/components/Properties/PropertyTable.d.ts +0 -1
  197. package/lib/cjs/components/Properties/PropertyTable.js +2 -1
  198. package/lib/cjs/components/Properties/PropertyTable.js.map +1 -1
  199. package/lib/cjs/components/Properties/PropertyTableToolbar.d.ts +0 -1
  200. package/lib/cjs/components/Properties/PropertyTableToolbar.js +3 -5
  201. package/lib/cjs/components/Properties/PropertyTableToolbar.js.map +1 -1
  202. package/lib/cjs/components/Properties/ScrollableExpandableBlock.js.map +1 -1
  203. package/lib/cjs/components/Properties/hooks/useFormulaValidation.js +2 -2
  204. package/lib/cjs/components/Properties/hooks/useFormulaValidation.js.map +1 -1
  205. package/lib/cjs/components/Properties/hooks/useForwardRef.js.map +1 -1
  206. package/lib/cjs/components/Properties/hooks/useValidator.d.ts +2 -2
  207. package/lib/cjs/components/Properties/hooks/useValidator.js +12 -9
  208. package/lib/cjs/components/Properties/hooks/useValidator.js.map +1 -1
  209. package/lib/cjs/components/SharedComponents/ActionPanel.d.ts +0 -1
  210. package/lib/cjs/components/SharedComponents/ActionPanel.js +3 -2
  211. package/lib/cjs/components/SharedComponents/ActionPanel.js.map +1 -1
  212. package/lib/cjs/components/SharedComponents/DeleteModal.d.ts +0 -1
  213. package/lib/cjs/components/SharedComponents/DeleteModal.js +5 -4
  214. package/lib/cjs/components/SharedComponents/DeleteModal.js.map +1 -1
  215. package/lib/cjs/components/SharedComponents/EmptyMessage.d.ts +0 -1
  216. package/lib/cjs/components/SharedComponents/LoadingOverlay.d.ts +0 -1
  217. package/lib/cjs/components/SharedComponents/LoadingOverlay.js +3 -2
  218. package/lib/cjs/components/SharedComponents/LoadingOverlay.js.map +1 -1
  219. package/lib/cjs/components/SharedComponents/LoadingSpinner.d.ts +0 -1
  220. package/lib/cjs/components/SharedComponents/StatusIcon.d.ts +1 -1
  221. package/lib/cjs/components/context/ExtractionClientContext.d.ts +0 -1
  222. package/lib/cjs/components/context/ExtractionClientContext.js.map +1 -1
  223. package/lib/cjs/components/context/ExtractionStateJobContext.js.map +1 -1
  224. package/lib/cjs/components/context/GroupHilitedElementsContext.js.map +1 -1
  225. package/lib/cjs/components/context/GroupingApiConfigContext.d.ts +2 -2
  226. package/lib/cjs/components/context/GroupingApiConfigContext.js.map +1 -1
  227. package/lib/cjs/components/context/GroupingMappingCustomUIContext.d.ts +0 -1
  228. package/lib/cjs/components/context/GroupingMappingCustomUIContext.js.map +1 -1
  229. package/lib/cjs/components/context/GroupsClientContext.d.ts +0 -1
  230. package/lib/cjs/components/context/GroupsClientContext.js.map +1 -1
  231. package/lib/cjs/components/context/IModelsClientContext.d.ts +0 -1
  232. package/lib/cjs/components/context/IModelsClientContext.js.map +1 -1
  233. package/lib/cjs/components/context/ITwinsClientContext.d.ts +0 -1
  234. package/lib/cjs/components/context/ITwinsClientContext.js.map +1 -1
  235. package/lib/cjs/components/context/MappingClientContext.d.ts +0 -1
  236. package/lib/cjs/components/context/MappingClientContext.js.map +1 -1
  237. package/lib/cjs/components/context/PropertiesClientContext.d.ts +0 -1
  238. package/lib/cjs/components/context/PropertiesClientContext.js.map +1 -1
  239. package/lib/cjs/components/context/PropertiesGroupColorContext.js.map +1 -1
  240. package/lib/cjs/components/context/PropertyGridWrapperContext.d.ts +1 -0
  241. package/lib/cjs/components/context/PropertyGridWrapperContext.js.map +1 -1
  242. package/lib/cjs/components/customUI/DefaultGroupingUI.d.ts +1 -1
  243. package/lib/cjs/components/customUI/DefaultGroupingUI.js +7 -5
  244. package/lib/cjs/components/customUI/DefaultGroupingUI.js.map +1 -1
  245. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.d.ts +0 -1
  246. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js +5 -3
  247. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
  248. package/lib/cjs/components/customUI/GroupingMappingCustomUI.d.ts +1 -1
  249. package/lib/cjs/components/customUI/GroupingMappingCustomUI.js +1 -1
  250. package/lib/cjs/components/customUI/GroupingMappingCustomUI.js.map +1 -1
  251. package/lib/cjs/components/customUI/ManualGroupingCustomUI.d.ts +0 -1
  252. package/lib/cjs/components/customUI/ManualGroupingCustomUI.js +5 -4
  253. package/lib/cjs/components/customUI/ManualGroupingCustomUI.js.map +1 -1
  254. package/lib/cjs/components/customUI/SearchGroupingCustomUI.d.ts +0 -1
  255. package/lib/cjs/components/customUI/SearchGroupingCustomUI.js +5 -4
  256. package/lib/cjs/components/customUI/SearchGroupingCustomUI.js.map +1 -1
  257. package/lib/cjs/decorators/BboxDimensionsDecorator.d.ts +2 -0
  258. package/lib/cjs/decorators/BboxDimensionsDecorator.js +80 -29
  259. package/lib/cjs/decorators/BboxDimensionsDecorator.js.map +1 -1
  260. package/lib/cjs/formula/FormulaDataTypeResolver.js +1 -2
  261. package/lib/cjs/formula/FormulaDataTypeResolver.js.map +1 -1
  262. package/lib/cjs/formula/FormulaFunctionProvider.js +3 -4
  263. package/lib/cjs/formula/FormulaFunctionProvider.js.map +1 -1
  264. package/lib/cjs/formula/FormulaOperatorsProvider.js +11 -11
  265. package/lib/cjs/formula/FormulaOperatorsProvider.js.map +1 -1
  266. package/lib/cjs/formula/FormulaSplitter.js +1 -2
  267. package/lib/cjs/formula/FormulaSplitter.js.map +1 -1
  268. package/lib/cjs/formula/FormulaTokensDataTypeResolver.js +1 -2
  269. package/lib/cjs/formula/FormulaTokensDataTypeResolver.js.map +1 -1
  270. package/lib/cjs/formula/InfixToPostfixConverter.js +3 -3
  271. package/lib/cjs/formula/InfixToPostfixConverter.js.map +1 -1
  272. package/lib/cjs/formula/InputStream.js +3 -2
  273. package/lib/cjs/formula/InputStream.js.map +1 -1
  274. package/lib/cjs/formula/ParenthesisValidator.js +3 -3
  275. package/lib/cjs/formula/ParenthesisValidator.js.map +1 -1
  276. package/lib/cjs/formula/Queue.js +1 -0
  277. package/lib/cjs/formula/Queue.js.map +1 -1
  278. package/lib/cjs/formula/Stack.js +2 -3
  279. package/lib/cjs/formula/Stack.js.map +1 -1
  280. package/lib/cjs/formula/StringBuilder.js +1 -0
  281. package/lib/cjs/formula/StringBuilder.js.map +1 -1
  282. package/lib/cjs/formula/Types.d.ts +4 -4
  283. package/lib/cjs/formula/Utils.js +6 -7
  284. package/lib/cjs/formula/Utils.js.map +1 -1
  285. package/lib/cjs/grouping-mapping-widget.d.ts +3 -0
  286. package/lib/cjs/grouping-mapping-widget.js +4 -1
  287. package/lib/cjs/grouping-mapping-widget.js.map +1 -1
  288. package/lib/cjs/test/CalculatedPropertyActionWithVisuals.test.d.ts +2 -0
  289. package/lib/cjs/test/CalculatedPropertyActionWithVisuals.test.js +137 -0
  290. package/lib/cjs/test/CalculatedPropertyActionWithVisuals.test.js.map +1 -0
  291. package/lib/cjs/test/GroupingMappingCustomUI.test.d.ts +1 -1
  292. package/lib/cjs/test/GroupingMappingCustomUI.test.js +42 -33
  293. package/lib/cjs/test/GroupingMappingCustomUI.test.js.map +1 -1
  294. package/lib/cjs/test/MockFactory.d.ts +1 -1
  295. package/lib/cjs/test/MockFactory.js.map +1 -1
  296. package/lib/cjs/test/PropertyFieldsHelpers.d.ts +22 -20
  297. package/lib/cjs/test/QueryBuilder.test.js.map +1 -1
  298. package/lib/cjs/test/WidgetHeader.test.d.ts +1 -1
  299. package/lib/cjs/test/WidgetHeader.test.js +2 -2
  300. package/lib/cjs/test/WidgetHeader.test.js.map +1 -1
  301. package/lib/cjs/test/setup.d.ts +2 -0
  302. package/lib/cjs/test/setup.js +11 -0
  303. package/lib/cjs/test/setup.js.map +1 -0
  304. package/lib/cjs/test/test-utils.d.ts +3 -3
  305. package/lib/cjs/test/test-utils.js +12 -6
  306. package/lib/cjs/test/test-utils.js.map +1 -1
  307. package/lib/esm/GroupingMappingWidget.d.ts +28 -0
  308. package/lib/esm/GroupingMappingWidget.js +54 -0
  309. package/lib/esm/GroupingMappingWidget.js.map +1 -0
  310. package/lib/esm/WidgetShell/GroupingMapping.d.ts +1 -2
  311. package/lib/esm/WidgetShell/GroupingMapping.js +5 -4
  312. package/lib/esm/WidgetShell/GroupingMapping.js.map +1 -1
  313. package/lib/esm/WidgetShell/GroupingMappingContent.d.ts +2 -3
  314. package/lib/esm/WidgetShell/GroupingMappingContent.js.map +1 -1
  315. package/lib/esm/WidgetShell/GroupingMappingHeader.d.ts +0 -1
  316. package/lib/esm/WidgetShell/GroupingMappingWidget.js +4 -2
  317. package/lib/esm/WidgetShell/GroupingMappingWidget.js.map +1 -1
  318. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.d.ts +2 -3
  319. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js +6 -5
  320. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
  321. package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.d.ts +0 -1
  322. package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js +3 -2
  323. package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -1
  324. package/lib/esm/common/hooks/useIsMounted.d.ts +0 -1
  325. package/lib/esm/common/hooks/useMemoizedCollectionPick.js.map +1 -1
  326. package/lib/esm/common/utils.d.ts +1 -1
  327. package/lib/esm/common/utils.js +20 -30
  328. package/lib/esm/common/utils.js.map +1 -1
  329. package/lib/esm/common/viewerUtils.js.map +1 -1
  330. package/lib/esm/components/GroupingMappingContext.js +3 -2
  331. package/lib/esm/components/GroupingMappingContext.js.map +1 -1
  332. package/lib/esm/components/Groups/Editing/GroupAction.d.ts +2 -3
  333. package/lib/esm/components/Groups/Editing/GroupAction.js +16 -11
  334. package/lib/esm/components/Groups/Editing/GroupAction.js.map +1 -1
  335. package/lib/esm/components/Groups/Editing/GroupDetails.d.ts +0 -1
  336. package/lib/esm/components/Groups/Editing/GroupDetails.js +4 -3
  337. package/lib/esm/components/Groups/Editing/GroupDetails.js.map +1 -1
  338. package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.d.ts +0 -1
  339. package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js +3 -2
  340. package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
  341. package/lib/esm/components/Groups/Editing/GroupDetailsStep.d.ts +2 -3
  342. package/lib/esm/components/Groups/Editing/GroupDetailsStep.js +5 -4
  343. package/lib/esm/components/Groups/Editing/GroupDetailsStep.js.map +1 -1
  344. package/lib/esm/components/Groups/GroupColorLegend.d.ts +0 -1
  345. package/lib/esm/components/Groups/GroupListItem.d.ts +0 -1
  346. package/lib/esm/components/Groups/GroupListItem.js.map +1 -1
  347. package/lib/esm/components/Groups/GroupMenuActions.d.ts +0 -1
  348. package/lib/esm/components/Groups/GroupMenuActions.js +5 -4
  349. package/lib/esm/components/Groups/GroupMenuActions.js.map +1 -1
  350. package/lib/esm/components/Groups/GroupOverlapProgressBar.d.ts +0 -1
  351. package/lib/esm/components/Groups/GroupOverlapProgressBar.js +2 -1
  352. package/lib/esm/components/Groups/GroupOverlapProgressBar.js.map +1 -1
  353. package/lib/esm/components/Groups/Groups.js.map +1 -1
  354. package/lib/esm/components/Groups/GroupsAddButton.d.ts +0 -1
  355. package/lib/esm/components/Groups/GroupsAddButton.js +2 -1
  356. package/lib/esm/components/Groups/GroupsAddButton.js.map +1 -1
  357. package/lib/esm/components/Groups/GroupsShowHideButtons.d.ts +0 -1
  358. package/lib/esm/components/Groups/GroupsShowHideButtons.js +2 -1
  359. package/lib/esm/components/Groups/GroupsShowHideButtons.js.map +1 -1
  360. package/lib/esm/components/Groups/GroupsView.d.ts +1 -1
  361. package/lib/esm/components/Groups/GroupsView.js +4 -3
  362. package/lib/esm/components/Groups/GroupsView.js.map +1 -1
  363. package/lib/esm/components/Groups/GroupsVisualization.d.ts +0 -1
  364. package/lib/esm/components/Groups/GroupsVisualization.js +9 -6
  365. package/lib/esm/components/Groups/GroupsVisualization.js.map +1 -1
  366. package/lib/esm/components/Groups/GroupsVisualizationActions.d.ts +0 -1
  367. package/lib/esm/components/Groups/GroupsVisualizationActions.js +3 -2
  368. package/lib/esm/components/Groups/GroupsVisualizationActions.js.map +1 -1
  369. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.d.ts +0 -1
  370. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js +7 -7
  371. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
  372. package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js +40 -36
  373. package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
  374. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.d.ts +0 -1
  375. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js +2 -1
  376. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -1
  377. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +0 -1
  378. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +2 -1
  379. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
  380. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.d.ts +2 -3
  381. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js +7 -6
  382. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -1
  383. package/lib/esm/components/Groups/ToggleGroupVisibility.d.ts +0 -1
  384. package/lib/esm/components/Groups/ToggleGroupVisibility.js +3 -2
  385. package/lib/esm/components/Groups/ToggleGroupVisibility.js.map +1 -1
  386. package/lib/esm/components/Groups/groupsHelpers.d.ts +1 -1
  387. package/lib/esm/components/Groups/groupsHelpers.js.map +1 -1
  388. package/lib/esm/components/Groups/hooks/useGroupsOperations.d.ts +0 -1
  389. package/lib/esm/components/Groups/hooks/useGroupsOperations.js.map +1 -1
  390. package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.js +1 -2
  391. package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
  392. package/lib/esm/components/Groups/hooks/useVisualization.d.ts +0 -1
  393. package/lib/esm/components/Groups/hooks/useVisualization.js +2 -1
  394. package/lib/esm/components/Groups/hooks/useVisualization.js.map +1 -1
  395. package/lib/esm/components/Mappings/BlockingOverlay.d.ts +0 -1
  396. package/lib/esm/components/Mappings/Editing/MappingAction.d.ts +2 -3
  397. package/lib/esm/components/Mappings/Editing/MappingAction.js +9 -8
  398. package/lib/esm/components/Mappings/Editing/MappingAction.js.map +1 -1
  399. package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js +17 -6
  400. package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
  401. package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.d.ts +0 -1
  402. package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js +20 -11
  403. package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
  404. package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.d.ts +0 -1
  405. package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js +2 -1
  406. package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js.map +1 -1
  407. package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.d.ts +0 -1
  408. package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js +2 -1
  409. package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js.map +1 -1
  410. package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.d.ts +0 -1
  411. package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js +2 -1
  412. package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js.map +1 -1
  413. package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.d.ts +0 -1
  414. package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js +2 -1
  415. package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js.map +1 -1
  416. package/lib/esm/components/Mappings/Extraction/ExtractionStatus.d.ts +0 -1
  417. package/lib/esm/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
  418. package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.d.ts +1 -2
  419. package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.d.ts +2 -2
  420. package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js +20 -19
  421. package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
  422. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.d.ts +2 -3
  423. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js +20 -20
  424. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
  425. package/lib/esm/components/Mappings/Import/SelectIModel.d.ts +2 -3
  426. package/lib/esm/components/Mappings/Import/SelectIModel.js +9 -8
  427. package/lib/esm/components/Mappings/Import/SelectIModel.js.map +1 -1
  428. package/lib/esm/components/Mappings/Import/SelectITwin.d.ts +2 -3
  429. package/lib/esm/components/Mappings/Import/SelectITwin.js +14 -13
  430. package/lib/esm/components/Mappings/Import/SelectITwin.js.map +1 -1
  431. package/lib/esm/components/Mappings/Import/SelectMappings.d.ts +2 -3
  432. package/lib/esm/components/Mappings/Import/SelectMappings.js +10 -9
  433. package/lib/esm/components/Mappings/Import/SelectMappings.js.map +1 -1
  434. package/lib/esm/components/Mappings/MappingListItem.d.ts +0 -1
  435. package/lib/esm/components/Mappings/MappingListItem.js +1 -2
  436. package/lib/esm/components/Mappings/MappingListItem.js.map +1 -1
  437. package/lib/esm/components/Mappings/MappingViewActionGroup.d.ts +0 -1
  438. package/lib/esm/components/Mappings/MappingViewActionGroup.js +5 -4
  439. package/lib/esm/components/Mappings/MappingViewActionGroup.js.map +1 -1
  440. package/lib/esm/components/Mappings/Mappings.d.ts +3 -4
  441. package/lib/esm/components/Mappings/Mappings.js.map +1 -1
  442. package/lib/esm/components/Mappings/MappingsView.d.ts +2 -2
  443. package/lib/esm/components/Mappings/MappingsView.js +16 -15
  444. package/lib/esm/components/Mappings/MappingsView.js.map +1 -1
  445. package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js +4 -3
  446. package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
  447. package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -2
  448. package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js +1 -1
  449. package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
  450. package/lib/esm/components/Mappings/hooks/useMappingsOperations.d.ts +0 -1
  451. package/lib/esm/components/Mappings/hooks/useMappingsOperations.js +2 -1
  452. package/lib/esm/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
  453. package/lib/esm/components/Mappings/hooks/useRunExtraction.d.ts +0 -1
  454. package/lib/esm/components/Mappings/hooks/useRunExtraction.js.map +1 -1
  455. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +2 -3
  456. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +4 -3
  457. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
  458. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +0 -1
  459. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +19 -5
  460. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
  461. package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.d.ts +0 -1
  462. package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +3 -2
  463. package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
  464. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +0 -1
  465. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js +4 -3
  466. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
  467. package/lib/esm/components/Properties/GroupColorToggle.d.ts +1 -2
  468. package/lib/esm/components/Properties/GroupColorToggle.js +3 -2
  469. package/lib/esm/components/Properties/GroupColorToggle.js.map +1 -1
  470. package/lib/esm/components/Properties/GroupInformationPanel.d.ts +0 -1
  471. package/lib/esm/components/Properties/GroupInformationPanel.js +3 -2
  472. package/lib/esm/components/Properties/GroupInformationPanel.js.map +1 -1
  473. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.d.ts +1 -2
  474. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js +26 -25
  475. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
  476. package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +0 -1
  477. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.d.ts +0 -1
  478. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js +5 -4
  479. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
  480. package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
  481. package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.d.ts +0 -1
  482. package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +14 -15
  483. package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
  484. package/lib/esm/components/Properties/GroupProperties/SaveModal.d.ts +0 -1
  485. package/lib/esm/components/Properties/GroupProperties/SaveModal.js +5 -4
  486. package/lib/esm/components/Properties/GroupProperties/SaveModal.js.map +1 -1
  487. package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.d.ts +0 -1
  488. package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js +2 -1
  489. package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
  490. package/lib/esm/components/Properties/PropertyAction.d.ts +0 -1
  491. package/lib/esm/components/Properties/PropertyAction.js +7 -3
  492. package/lib/esm/components/Properties/PropertyAction.js.map +1 -1
  493. package/lib/esm/components/Properties/PropertyMenu.d.ts +0 -1
  494. package/lib/esm/components/Properties/PropertyMenuWithVisualization.d.ts +0 -1
  495. package/lib/esm/components/Properties/PropertyMenuWithVisualization.js +2 -1
  496. package/lib/esm/components/Properties/PropertyMenuWithVisualization.js.map +1 -1
  497. package/lib/esm/components/Properties/PropertyNameCell.d.ts +0 -1
  498. package/lib/esm/components/Properties/PropertyTable.d.ts +0 -1
  499. package/lib/esm/components/Properties/PropertyTable.js +2 -1
  500. package/lib/esm/components/Properties/PropertyTable.js.map +1 -1
  501. package/lib/esm/components/Properties/PropertyTableToolbar.d.ts +0 -1
  502. package/lib/esm/components/Properties/PropertyTableToolbar.js +3 -5
  503. package/lib/esm/components/Properties/PropertyTableToolbar.js.map +1 -1
  504. package/lib/esm/components/Properties/ScrollableExpandableBlock.js.map +1 -1
  505. package/lib/esm/components/Properties/hooks/useFormulaValidation.js.map +1 -1
  506. package/lib/esm/components/Properties/hooks/useForwardRef.js.map +1 -1
  507. package/lib/esm/components/Properties/hooks/useValidator.d.ts +2 -2
  508. package/lib/esm/components/Properties/hooks/useValidator.js +9 -8
  509. package/lib/esm/components/Properties/hooks/useValidator.js.map +1 -1
  510. package/lib/esm/components/SharedComponents/ActionPanel.d.ts +0 -1
  511. package/lib/esm/components/SharedComponents/ActionPanel.js +3 -2
  512. package/lib/esm/components/SharedComponents/ActionPanel.js.map +1 -1
  513. package/lib/esm/components/SharedComponents/DeleteModal.d.ts +0 -1
  514. package/lib/esm/components/SharedComponents/DeleteModal.js +5 -4
  515. package/lib/esm/components/SharedComponents/DeleteModal.js.map +1 -1
  516. package/lib/esm/components/SharedComponents/EmptyMessage.d.ts +0 -1
  517. package/lib/esm/components/SharedComponents/LoadingOverlay.d.ts +0 -1
  518. package/lib/esm/components/SharedComponents/LoadingOverlay.js +3 -2
  519. package/lib/esm/components/SharedComponents/LoadingOverlay.js.map +1 -1
  520. package/lib/esm/components/SharedComponents/LoadingSpinner.d.ts +0 -1
  521. package/lib/esm/components/SharedComponents/StatusIcon.d.ts +1 -1
  522. package/lib/esm/components/context/ExtractionClientContext.d.ts +0 -1
  523. package/lib/esm/components/context/ExtractionClientContext.js.map +1 -1
  524. package/lib/esm/components/context/ExtractionStateJobContext.js.map +1 -1
  525. package/lib/esm/components/context/GroupHilitedElementsContext.js.map +1 -1
  526. package/lib/esm/components/context/GroupingApiConfigContext.d.ts +2 -2
  527. package/lib/esm/components/context/GroupingApiConfigContext.js.map +1 -1
  528. package/lib/esm/components/context/GroupingMappingCustomUIContext.d.ts +0 -1
  529. package/lib/esm/components/context/GroupingMappingCustomUIContext.js.map +1 -1
  530. package/lib/esm/components/context/GroupsClientContext.d.ts +0 -1
  531. package/lib/esm/components/context/GroupsClientContext.js.map +1 -1
  532. package/lib/esm/components/context/IModelsClientContext.d.ts +0 -1
  533. package/lib/esm/components/context/IModelsClientContext.js.map +1 -1
  534. package/lib/esm/components/context/ITwinsClientContext.d.ts +0 -1
  535. package/lib/esm/components/context/ITwinsClientContext.js.map +1 -1
  536. package/lib/esm/components/context/MappingClientContext.d.ts +0 -1
  537. package/lib/esm/components/context/MappingClientContext.js.map +1 -1
  538. package/lib/esm/components/context/PropertiesClientContext.d.ts +0 -1
  539. package/lib/esm/components/context/PropertiesClientContext.js.map +1 -1
  540. package/lib/esm/components/context/PropertiesGroupColorContext.js.map +1 -1
  541. package/lib/esm/components/context/PropertyGridWrapperContext.d.ts +1 -0
  542. package/lib/esm/components/context/PropertyGridWrapperContext.js.map +1 -1
  543. package/lib/esm/components/customUI/DefaultGroupingUI.d.ts +1 -1
  544. package/lib/esm/components/customUI/DefaultGroupingUI.js +5 -4
  545. package/lib/esm/components/customUI/DefaultGroupingUI.js.map +1 -1
  546. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.d.ts +0 -1
  547. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js +5 -3
  548. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
  549. package/lib/esm/components/customUI/GroupingMappingCustomUI.d.ts +1 -1
  550. package/lib/esm/components/customUI/ManualGroupingCustomUI.d.ts +0 -1
  551. package/lib/esm/components/customUI/ManualGroupingCustomUI.js +5 -4
  552. package/lib/esm/components/customUI/ManualGroupingCustomUI.js.map +1 -1
  553. package/lib/esm/components/customUI/SearchGroupingCustomUI.d.ts +0 -1
  554. package/lib/esm/components/customUI/SearchGroupingCustomUI.js +5 -4
  555. package/lib/esm/components/customUI/SearchGroupingCustomUI.js.map +1 -1
  556. package/lib/esm/decorators/BboxDimensionsDecorator.d.ts +2 -0
  557. package/lib/esm/decorators/BboxDimensionsDecorator.js +79 -28
  558. package/lib/esm/decorators/BboxDimensionsDecorator.js.map +1 -1
  559. package/lib/esm/formula/FormulaDataTypeResolver.js.map +1 -1
  560. package/lib/esm/formula/FormulaFunctionProvider.js.map +1 -1
  561. package/lib/esm/formula/FormulaOperatorsProvider.js.map +1 -1
  562. package/lib/esm/formula/FormulaSplitter.js.map +1 -1
  563. package/lib/esm/formula/FormulaTokensDataTypeResolver.js.map +1 -1
  564. package/lib/esm/formula/InfixToPostfixConverter.js.map +1 -1
  565. package/lib/esm/formula/InputStream.js +3 -2
  566. package/lib/esm/formula/InputStream.js.map +1 -1
  567. package/lib/esm/formula/ParenthesisValidator.js.map +1 -1
  568. package/lib/esm/formula/Queue.js +1 -0
  569. package/lib/esm/formula/Queue.js.map +1 -1
  570. package/lib/esm/formula/Stack.js +2 -3
  571. package/lib/esm/formula/Stack.js.map +1 -1
  572. package/lib/esm/formula/StringBuilder.js +1 -0
  573. package/lib/esm/formula/StringBuilder.js.map +1 -1
  574. package/lib/esm/formula/Types.d.ts +4 -4
  575. package/lib/esm/grouping-mapping-widget.d.ts +3 -0
  576. package/lib/esm/grouping-mapping-widget.js +2 -0
  577. package/lib/esm/grouping-mapping-widget.js.map +1 -1
  578. package/lib/esm/test/CalculatedPropertyActionWithVisuals.test.d.ts +2 -0
  579. package/lib/esm/test/CalculatedPropertyActionWithVisuals.test.js +132 -0
  580. package/lib/esm/test/CalculatedPropertyActionWithVisuals.test.js.map +1 -0
  581. package/lib/esm/test/GroupingMappingCustomUI.test.d.ts +1 -1
  582. package/lib/esm/test/GroupingMappingCustomUI.test.js +42 -33
  583. package/lib/esm/test/GroupingMappingCustomUI.test.js.map +1 -1
  584. package/lib/esm/test/MockFactory.d.ts +1 -1
  585. package/lib/esm/test/MockFactory.js.map +1 -1
  586. package/lib/esm/test/PropertyFieldsHelpers.d.ts +22 -20
  587. package/lib/esm/test/QueryBuilder.test.js.map +1 -1
  588. package/lib/esm/test/WidgetHeader.test.d.ts +1 -1
  589. package/lib/esm/test/WidgetHeader.test.js +2 -2
  590. package/lib/esm/test/WidgetHeader.test.js.map +1 -1
  591. package/lib/esm/test/setup.d.ts +2 -0
  592. package/lib/esm/test/setup.js +9 -0
  593. package/lib/esm/test/setup.js.map +1 -0
  594. package/lib/esm/test/test-utils.d.ts +3 -3
  595. package/lib/esm/test/test-utils.js +3 -2
  596. package/lib/esm/test/test-utils.js.map +1 -1
  597. package/lib/public/locales/en/GroupingMappingWidget.json +220 -0
  598. package/package.json +45 -68
@@ -1 +1 @@
1
- {"version":3,"file":"CalculatedPropertyActionWithVisuals.js","sourceRoot":"","sources":["../../../../../src/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACrG,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC1F,OAAO,4CAA4C,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAErF,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAahF;;;GAGG;AACH,MAAM,CAAC,MAAM,mCAAmC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AAmC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAO,CAChH,CAAC;IAEJ,OAAO,CACL,6BAAK,SAAS,EAAC,4CAA4C;QACzD,oBAAC,UAAU,IAAC,SAAS,EAAC,kBAAkB;YACtC,oBAAC,YAAY,IACX,SAAS,EAAC,4BAA4B,EACtC,KAAK,EAAC,sBAAsB,EAC5B,aAAa,EAAC,MAAM,EACpB,QAAQ,EAAE,SAAS,EACnB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAC7B;YAChB,oBAAC,6BAA6B,IAC5B,sBAAsB,EAAE,sBAAsB,EAC9C,yBAAyB,EAAE,yBAAyB,EACpD,YAAY,EAAE,CAAC,MAAwC,EAAE,EAAE,CAAC,CAC1D,oBAAC,QAAQ;oBACP,6BAAK,SAAS,EAAC,qBAAqB;wBAClC,iCAAM,MAAM,CAAC,KAAK,CAAO;wBACxB,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,CACzB,CACG,CACZ,EACD,oBAAoB,EAAE,CAAC,MAAwC,EAAE,EAAE,CAAC,CAClE,6BAAK,SAAS,EAAC,iBAAiB;oBAC9B,iCAAM,MAAM,CAAC,KAAK,CAAO;oBACxB,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,CACzB,CACP,GACD,CACS,CACT,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 { IModelApp } from \"@itwin/core-frontend\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { InputGroup, MenuItem, ToggleSwitch } from \"@itwin/itwinui-react\";\nimport React, { useEffect, useMemo, useState } from \"react\";\nimport { BboxDimension, BboxDimensionsDecorator } from \"../../../decorators/BboxDimensionsDecorator\";\nimport { clearAll, visualizeElements, zoomToElements } from \"../../../common/viewerUtils\";\nimport \"./CalculatedPropertyActionWithVisuals.scss\";\nimport { useGroupingMappingApiConfig } from \"../../context/GroupingApiConfigContext\";\nimport type { CalculatedPropertyType, GroupMinimal } from \"@itwin/insights-client\";\nimport { SharedCalculatedPropertyForms } from \"./SharedCalculatedPropertyForms\";\nimport { useGroupKeySetQuery } from \"../../Groups/hooks/useKeySetHiliteQueries\";\n\n/**\n * Props for the {@link CalculatedPropertyActionWithVisuals} component.\n * @internal\n */\nexport interface CalculatedPropertyActionWithVisualsProps {\n group: GroupMinimal;\n calculatedPropertyType?: CalculatedPropertyType;\n isLoading?: boolean;\n setCalculatedPropertyType: (calculatedPropertyType: CalculatedPropertyType | undefined) => void;\n}\n\n/**\n * Component to create or update a calculated property with visualizations.\n * @internal\n */\nexport const CalculatedPropertyActionWithVisuals = ({\n group,\n calculatedPropertyType,\n isLoading,\n setCalculatedPropertyType,\n}: CalculatedPropertyActionWithVisualsProps) => {\n const { iModelConnection } = useGroupingMappingApiConfig();\n if (!iModelConnection) {\n throw new Error(\"This component requires an active iModelConnection.\");\n }\n const [bboxDecorator, setBboxDecorator] = useState<BboxDimensionsDecorator | undefined>();\n const [inferredSpatialData, setInferredSpatialData] = useState<Map<BboxDimension, number> | undefined>();\n const [colorProperty, setColorProperty] = useState<boolean>(false);\n const { data } = useGroupKeySetQuery(group, iModelConnection, true);\n\n const resolvedHiliteIds = useMemo(() => {\n // Resolved ids, default to an empty array if not available\n return data?.result?.ids ?? [];\n }, [data?.result?.ids]);\n\n useEffect(() => {\n const decorator = new BboxDimensionsDecorator();\n IModelApp.viewManager.addDecorator(decorator);\n setBboxDecorator(decorator);\n return () => {\n IModelApp.viewManager.dropDecorator(decorator);\n };\n }, []);\n\n useEffect(() => {\n if (!colorProperty || resolvedHiliteIds.length === 0) {\n clearAll();\n return;\n }\n visualizeElements(resolvedHiliteIds, \"red\");\n void zoomToElements([resolvedHiliteIds[0]]);\n }, [colorProperty, resolvedHiliteIds]);\n\n useEffect(() => {\n if (!colorProperty || resolvedHiliteIds.length === 0) {\n return;\n }\n const setContext = async () => {\n if (bboxDecorator) {\n await bboxDecorator.setContext(resolvedHiliteIds[0]);\n setInferredSpatialData(bboxDecorator.getInferredSpatialData());\n }\n };\n void setContext();\n }, [bboxDecorator, colorProperty, resolvedHiliteIds]);\n\n useEffect(() => {\n if (bboxDecorator && calculatedPropertyType && inferredSpatialData) {\n inferredSpatialData.has(BboxDimension[calculatedPropertyType as keyof typeof BboxDimension]) && colorProperty\n ? bboxDecorator.drawContext(BboxDimension[calculatedPropertyType as keyof typeof BboxDimension])\n : bboxDecorator.clearContext();\n } else {\n bboxDecorator?.clearContext();\n }\n }, [bboxDecorator, colorProperty, inferredSpatialData, calculatedPropertyType]);\n\n const getSpatialData = (value: string | undefined) =>\n value &&\n inferredSpatialData?.has(BboxDimension[value as keyof typeof BboxDimension]) && (\n <div>{`${inferredSpatialData?.get(BboxDimension[value as keyof typeof BboxDimension])?.toPrecision(4)}m`}</div>\n );\n\n return (\n <div className=\"gmw-calculated-properties-action-container\">\n <InputGroup className=\"gmw-details-form\">\n <ToggleSwitch\n className=\"gmw-field-legend-container\"\n label=\"Visualize Dimensions\"\n labelPosition=\"left\"\n disabled={isLoading}\n checked={colorProperty}\n onChange={() => setColorProperty((b) => !b)}\n ></ToggleSwitch>\n <SharedCalculatedPropertyForms\n calculatedPropertyType={calculatedPropertyType}\n setCalculatedPropertyType={setCalculatedPropertyType}\n itemRenderer={(option: SelectOption<string | undefined>) => (\n <MenuItem>\n <div className=\"gmw-gr-cp-menu-item\">\n <div>{option.label}</div>\n {getSpatialData(option.value)}\n </div>\n </MenuItem>\n )}\n selectedItemRenderer={(option: SelectOption<string | undefined>) => (\n <div className=\"gmw-select-item\">\n <div>{option.label}</div>\n {getSpatialData(option.value)}\n </div>\n )}\n />\n </InputGroup>\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"CalculatedPropertyActionWithVisuals.js","sourceRoot":"","sources":["../../../../../src/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACrG,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC1F,OAAO,4CAA4C,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAErF,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAalC;;;GAGG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,EAClD,KAAK,EACL,sBAAsB,EACtB,SAAS,EACT,yBAAyB,GACgB,EAAE,EAAE;IAC7C,MAAM,EAAE,gBAAgB,EAAE,GAAG,2BAA2B,EAAE,CAAC;IAC3D,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IACD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,EAAuC,CAAC;IAC1F,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,QAAQ,EAA0C,CAAC;IACzG,MAAM,CAAC,aAAa,EAAE,gBAA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,CAAC,KAAmC,CAAC,CAAC,IAAI,CAC9E,iCAAM,GAAG,mBAAmB,EAAE,GAAG,CAAC,aAAa,CAAC,KAAmC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAO,CAChH,CAAC;IAEJ,OAAO,CACL,6BAAK,SAAS,EAAC,4CAA4C;QACzD,oBAAC,UAAU,IAAC,SAAS,EAAC,kBAAkB;YACtC,oBAAC,YAAY,IACX,SAAS,EAAC,4BAA4B,EACtC,KAAK,EAAE,qBAAqB,CAAC,SAAS,CAAC,gCAAgC,CAAC,EACxE,aAAa,EAAC,MAAM,EACpB,QAAQ,EAAE,SAAS,EACnB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAC7B;YAChB,oBAAC,6BAA6B,IAC5B,sBAAsB,EAAE,sBAAsB,EAC9C,yBAAyB,EAAE,yBAAyB,EACpD,YAAY,EAAE,CAAC,MAAwC,EAAE,EAAE,CAAC,CAC1D,oBAAC,QAAQ;oBACP,6BAAK,SAAS,EAAC,qBAAqB;wBAClC,iCAAM,MAAM,CAAC,KAAK,CAAO;wBACxB,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,CACzB,CACG,CACZ,EACD,oBAAoB,EAAE,CAAC,MAAwC,EAAE,EAAE,CAAC,CAClE,6BAAK,SAAS,EAAC,iBAAiB;oBAC9B,iCAAM,MAAM,CAAC,KAAK,CAAO;oBACxB,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,CACzB,CACP,GACD,CACS,CACT,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 { IModelApp } from \"@itwin/core-frontend\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { InputGroup, MenuItem, ToggleSwitch } from \"@itwin/itwinui-react\";\nimport React, { useEffect, useMemo, useState } from \"react\";\nimport { BboxDimension, BboxDimensionsDecorator } from \"../../../decorators/BboxDimensionsDecorator\";\nimport { clearAll, visualizeElements, zoomToElements } from \"../../../common/viewerUtils\";\nimport \"./CalculatedPropertyActionWithVisuals.scss\";\nimport { useGroupingMappingApiConfig } from \"../../context/GroupingApiConfigContext\";\nimport type { CalculatedPropertyType, GroupMinimal } from \"@itwin/insights-client\";\nimport { SharedCalculatedPropertyForms } from \"./SharedCalculatedPropertyForms\";\nimport { useGroupKeySetQuery } from \"../../Groups/hooks/useKeySetHiliteQueries\";\nimport { GroupingMappingWidget } from \"../../../GroupingMappingWidget\";\n\nconst MAX_CONTEXT_CANDIDATES = 25;\n\n/**\n * Props for the {@link CalculatedPropertyActionWithVisuals} component.\n * @internal\n */\nexport interface CalculatedPropertyActionWithVisualsProps {\n group: GroupMinimal;\n calculatedPropertyType?: CalculatedPropertyType;\n isLoading?: boolean;\n setCalculatedPropertyType: (calculatedPropertyType: CalculatedPropertyType | undefined) => void;\n}\n\n/**\n * Component to create or update a calculated property with visualizations.\n * @internal\n */\nexport const CalculatedPropertyActionWithVisuals = ({\n group,\n calculatedPropertyType,\n isLoading,\n setCalculatedPropertyType,\n}: CalculatedPropertyActionWithVisualsProps) => {\n const { iModelConnection } = useGroupingMappingApiConfig();\n if (!iModelConnection) {\n throw new Error(\"This component requires an active iModelConnection.\");\n }\n const [bboxDecorator, setBboxDecorator] = useState<BboxDimensionsDecorator | undefined>();\n const [inferredSpatialData, setInferredSpatialData] = useState<Map<BboxDimension, number> | undefined>();\n const [colorProperty, setColorProperty] = useState<boolean>(false);\n const { data } = useGroupKeySetQuery(group, iModelConnection, true);\n\n const resolvedHiliteIds = useMemo(() => {\n // Resolved ids, default to an empty array if not available\n return data?.result?.ids ?? [];\n }, [data?.result?.ids]);\n\n useEffect(() => {\n const decorator = new BboxDimensionsDecorator();\n IModelApp.viewManager.addDecorator(decorator);\n setBboxDecorator(decorator);\n return () => {\n IModelApp.viewManager.dropDecorator(decorator);\n };\n }, []);\n\n useEffect(() => {\n if (!colorProperty || resolvedHiliteIds.length === 0) {\n clearAll();\n return;\n }\n visualizeElements(resolvedHiliteIds, \"red\");\n void zoomToElements([resolvedHiliteIds[0]]);\n }, [colorProperty, resolvedHiliteIds]);\n\n useEffect(() => {\n if (!colorProperty || resolvedHiliteIds.length === 0 || !bboxDecorator) {\n setInferredSpatialData(undefined);\n return;\n }\n let disposed = false;\n const setContext = async () => {\n const candidateIds = resolvedHiliteIds.slice(0, MAX_CONTEXT_CANDIDATES);\n let contextSet = false;\n for (const instanceId of candidateIds) {\n contextSet = await bboxDecorator.setContext(instanceId);\n if (contextSet) {\n break;\n }\n }\n if (!disposed) {\n setInferredSpatialData(contextSet ? bboxDecorator.getInferredSpatialData() : undefined);\n }\n };\n void setContext();\n return () => {\n disposed = true;\n };\n }, [bboxDecorator, colorProperty, resolvedHiliteIds]);\n\n useEffect(() => {\n if (bboxDecorator && calculatedPropertyType && inferredSpatialData) {\n inferredSpatialData.has(BboxDimension[calculatedPropertyType as keyof typeof BboxDimension]) && colorProperty\n ? bboxDecorator.drawContext(BboxDimension[calculatedPropertyType as keyof typeof BboxDimension])\n : bboxDecorator.clearContext();\n } else {\n bboxDecorator?.clearContext();\n }\n }, [bboxDecorator, colorProperty, inferredSpatialData, calculatedPropertyType]);\n\n const getSpatialData = (value: string | undefined) =>\n value &&\n inferredSpatialData?.has(BboxDimension[value as keyof typeof BboxDimension]) && (\n <div>{`${inferredSpatialData?.get(BboxDimension[value as keyof typeof BboxDimension])?.toPrecision(4)}m`}</div>\n );\n\n return (\n <div className=\"gmw-calculated-properties-action-container\">\n <InputGroup className=\"gmw-details-form\">\n <ToggleSwitch\n className=\"gmw-field-legend-container\"\n label={GroupingMappingWidget.translate(\"properties.visualizeDimensions\")}\n labelPosition=\"left\"\n disabled={isLoading}\n checked={colorProperty}\n onChange={() => setColorProperty((b) => !b)}\n ></ToggleSwitch>\n <SharedCalculatedPropertyForms\n calculatedPropertyType={calculatedPropertyType}\n setCalculatedPropertyType={setCalculatedPropertyType}\n itemRenderer={(option: SelectOption<string | undefined>) => (\n <MenuItem>\n <div className=\"gmw-gr-cp-menu-item\">\n <div>{option.label}</div>\n {getSpatialData(option.value)}\n </div>\n </MenuItem>\n )}\n selectedItemRenderer={(option: SelectOption<string | undefined>) => (\n <div className=\"gmw-select-item\">\n <div>{option.label}</div>\n {getSpatialData(option.value)}\n </div>\n )}\n />\n </InputGroup>\n </div>\n );\n};\n"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalculatedPropertyType } from "@itwin/insights-client";
3
2
  import type { SelectOption } from "@itwin/itwinui-react";
4
3
  interface SharedCalculatedPropertyFormsProps {
@@ -5,11 +5,12 @@
5
5
  import { CalculatedPropertyType } from "@itwin/insights-client";
6
6
  import React, { useCallback } from "react";
7
7
  import { LabeledSelect } from "@itwin/itwinui-react";
8
+ import { GroupingMappingWidget } from "../../../GroupingMappingWidget";
8
9
  export const SharedCalculatedPropertyForms = ({ calculatedPropertyType, setCalculatedPropertyType, itemRenderer, selectedItemRenderer, }) => {
9
10
  const generateOptionsFromCalculatedPropertyType = useCallback(() => {
10
11
  const options = [];
11
12
  const indexableEnum = CalculatedPropertyType;
12
- options.push({ value: undefined, label: "No Calculated Property Type" });
13
+ options.push({ value: undefined, label: GroupingMappingWidget.translate("properties.noCalculatedPropertyType") });
13
14
  for (const key in indexableEnum) {
14
15
  if (typeof indexableEnum[key] === "string" && key !== "Undefined") {
15
16
  // Generate labels by adding space between capitals
@@ -23,6 +24,6 @@ export const SharedCalculatedPropertyForms = ({ calculatedPropertyType, setCalcu
23
24
  return options;
24
25
  }, []);
25
26
  return (React.createElement(React.Fragment, null,
26
- React.createElement(LabeledSelect, { label: "Calculated Property Type", options: generateOptionsFromCalculatedPropertyType(), value: calculatedPropertyType, onChange: setCalculatedPropertyType, itemRenderer: itemRenderer, selectedItemRenderer: selectedItemRenderer, placeholder: 'No Calculated Property Type', onShow: () => { }, onHide: () => { } })));
27
+ React.createElement(LabeledSelect, { label: GroupingMappingWidget.translate("properties.calculatedPropertyType"), options: generateOptionsFromCalculatedPropertyType(), value: calculatedPropertyType, onChange: setCalculatedPropertyType, itemRenderer: itemRenderer, selectedItemRenderer: selectedItemRenderer, placeholder: GroupingMappingWidget.translate("properties.noCalculatedPropertyType"), onShow: () => { }, onHide: () => { } })));
27
28
  };
28
29
  //# sourceMappingURL=SharedCalculatedPropertyForms.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SharedCalculatedPropertyForms.js","sourceRoot":"","sources":["../../../../../src/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AASrD,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,EAC5C,sBAAsB,EACtB,yBAAyB,EACzB,YAAY,EACZ,oBAAoB,GACe,EAAE,EAAE;IACvC,MAAM,yCAAyC,GAAG,WAAW,CAAC,GAAG,EAAE;QACjE,MAAM,OAAO,GAAuD,EAAE,CAAC;QACvE,MAAM,aAAa,GAAG,sBAA8D,CAAC;QAErF,OAAO,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,6BAA6B,EAAC,CAAC,CAAC;QACvE,KAAK,MAAM,GAAG,IAAI,aAAa,EAAE;YAC/B,IAAI,OAAO,aAAa,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,GAAG,KAAK,WAAW,EAAE;gBACjE,mDAAmD;gBACnD,MAAM,KAAK,GAAG,GAAG;qBACd,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC;qBAC1B,IAAI,EAAE;qBACN,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;gBAC1C,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,GAAG,CAA2B,EAAE,KAAK,EAAE,CAAC,CAAC;aAC9E;SACF;QACD,OAAO,OAAO,CAAC;IACjB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL;QACE,oBAAC,aAAa,IACZ,KAAK,EAAC,0BAA0B,EAChC,OAAO,EAAE,yCAAyC,EAAE,EACpD,KAAK,EAAE,sBAAsB,EAC7B,QAAQ,EAAE,yBAAyB,EACnC,YAAY,EAAE,YAAY,EAC1B,oBAAoB,EAAE,oBAAoB,EAC1C,WAAW,EAAG,6BAA6B,EAC3C,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,EACjB,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,GACjB,CACD,CACJ,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 { CalculatedPropertyType } from \"@itwin/insights-client\";\nimport React, { useCallback } from \"react\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { LabeledSelect } from \"@itwin/itwinui-react\";\n\ninterface SharedCalculatedPropertyFormsProps {\n calculatedPropertyType: CalculatedPropertyType | undefined;\n setCalculatedPropertyType: (value: CalculatedPropertyType | undefined) => void;\n itemRenderer?: (option: SelectOption<string | undefined>) => JSX.Element;\n selectedItemRenderer?: (option: SelectOption<string | undefined>) => JSX.Element;\n}\n\nexport const SharedCalculatedPropertyForms = ({\n calculatedPropertyType,\n setCalculatedPropertyType,\n itemRenderer,\n selectedItemRenderer,\n}: SharedCalculatedPropertyFormsProps) => {\n const generateOptionsFromCalculatedPropertyType = useCallback(() => {\n const options: SelectOption<CalculatedPropertyType | undefined>[] = [];\n const indexableEnum = CalculatedPropertyType as unknown as { [key: string]: string };\n \n options.push({value: undefined, label: \"No Calculated Property Type\"});\n for (const key in indexableEnum) {\n if (typeof indexableEnum[key] === \"string\" && key !== \"Undefined\") {\n // Generate labels by adding space between capitals\n const label = key\n .replace(/([A-Z])/g, \" $1\")\n .trim()\n .replace(/^\\w/, (c) => c.toUpperCase());\n options.push({ value: indexableEnum[key] as CalculatedPropertyType, label });\n }\n }\n return options;\n }, []);\n\n return (\n <>\n <LabeledSelect<CalculatedPropertyType | undefined>\n label=\"Calculated Property Type\"\n options={generateOptionsFromCalculatedPropertyType()}\n value={calculatedPropertyType}\n onChange={setCalculatedPropertyType}\n itemRenderer={itemRenderer}\n selectedItemRenderer={selectedItemRenderer}\n placeholder = 'No Calculated Property Type'\n onShow={() => { }}\n onHide={() => { }}\n />\n </>\n );\n};\n"]}
1
+ {"version":3,"file":"SharedCalculatedPropertyForms.js","sourceRoot":"","sources":["../../../../../src/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AASvE,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,EAC5C,sBAAsB,EACtB,yBAAyB,EACzB,YAAY,EACZ,oBAAoB,GACe,EAAE,EAAE;IACvC,MAAM,yCAAyC,GAAG,WAAW,CAAC,GAAG,EAAE;QACjE,MAAM,OAAO,GAAuD,EAAE,CAAC;QACvE,MAAM,aAAa,GAAG,sBAA8D,CAAC;QAErF,OAAO,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,qBAAqB,CAAC,SAAS,CAAC,qCAAqC,CAAC,EAAC,CAAC,CAAC;QAChH,KAAK,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;YAChC,IAAI,OAAO,aAAa,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,GAAG,KAAK,WAAW,EAAE,CAAC;gBAClE,mDAAmD;gBACnD,MAAM,KAAK,GAAG,GAAG;qBACd,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC;qBAC1B,IAAI,EAAE;qBACN,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;gBAC1C,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,GAAG,CAA2B,EAAE,KAAK,EAAE,CAAC,CAAC;YAC/E,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL;QACE,oBAAC,aAAa,IACZ,KAAK,EAAE,qBAAqB,CAAC,SAAS,CAAC,mCAAmC,CAAC,EAC3E,OAAO,EAAE,yCAAyC,EAAE,EACpD,KAAK,EAAE,sBAAsB,EAC7B,QAAQ,EAAE,yBAAyB,EACnC,YAAY,EAAE,YAAY,EAC1B,oBAAoB,EAAE,oBAAoB,EAC1C,WAAW,EAAE,qBAAqB,CAAC,SAAS,CAAC,qCAAqC,CAAC,EACnF,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,EACjB,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,GACjB,CACD,CACJ,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 { CalculatedPropertyType } from \"@itwin/insights-client\";\nimport React, { useCallback } from \"react\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { LabeledSelect } from \"@itwin/itwinui-react\";\nimport { GroupingMappingWidget } from \"../../../GroupingMappingWidget\";\n\ninterface SharedCalculatedPropertyFormsProps {\n calculatedPropertyType: CalculatedPropertyType | undefined;\n setCalculatedPropertyType: (value: CalculatedPropertyType | undefined) => void;\n itemRenderer?: (option: SelectOption<string | undefined>) => JSX.Element;\n selectedItemRenderer?: (option: SelectOption<string | undefined>) => JSX.Element;\n}\n\nexport const SharedCalculatedPropertyForms = ({\n calculatedPropertyType,\n setCalculatedPropertyType,\n itemRenderer,\n selectedItemRenderer,\n}: SharedCalculatedPropertyFormsProps) => {\n const generateOptionsFromCalculatedPropertyType = useCallback(() => {\n const options: SelectOption<CalculatedPropertyType | undefined>[] = [];\n const indexableEnum = CalculatedPropertyType as unknown as { [key: string]: string };\n \n options.push({value: undefined, label: GroupingMappingWidget.translate(\"properties.noCalculatedPropertyType\")});\n for (const key in indexableEnum) {\n if (typeof indexableEnum[key] === \"string\" && key !== \"Undefined\") {\n // Generate labels by adding space between capitals\n const label = key\n .replace(/([A-Z])/g, \" $1\")\n .trim()\n .replace(/^\\w/, (c) => c.toUpperCase());\n options.push({ value: indexableEnum[key] as CalculatedPropertyType, label });\n }\n }\n return options;\n }, []);\n\n return (\n <>\n <LabeledSelect<CalculatedPropertyType | undefined>\n label={GroupingMappingWidget.translate(\"properties.calculatedPropertyType\")}\n options={generateOptionsFromCalculatedPropertyType()}\n value={calculatedPropertyType}\n onChange={setCalculatedPropertyType}\n itemRenderer={itemRenderer}\n selectedItemRenderer={selectedItemRenderer}\n placeholder={GroupingMappingWidget.translate(\"properties.noCalculatedPropertyType\")}\n onShow={() => { }}\n onHide={() => { }}\n />\n </>\n );\n};\n"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./CustomCalculationAction.scss";
3
2
  /**
4
3
  * Props for the {@link CustomCalculationAction} component.
@@ -5,18 +5,19 @@
5
5
  import { Alert, InputGroup, LabeledTextarea } from "@itwin/itwinui-react";
6
6
  import React from "react";
7
7
  import "./CustomCalculationAction.scss";
8
+ import { GroupingMappingWidget } from "../../../GroupingMappingWidget";
8
9
  /**
9
10
  * Component to create or update a custom calculation property.
10
11
  * @internal
11
12
  */
12
13
  export const CustomCalculationAction = ({ formula, setFormula, formulaErrorMessage, forceValidation, disabled }) => {
13
14
  return (React.createElement(InputGroup, { className: "gmw-custom-calculation-action-container" },
14
- React.createElement(Alert, { type: "informational", clickableText: "Click here.", clickableTextProps: {
15
+ React.createElement(Alert, { type: "informational", clickableText: GroupingMappingWidget.translate("properties.formulaDocLink"), clickableTextProps: {
15
16
  href: "https://developer.bentley.com/apis/grouping-and-mapping/operations/create-property/#customcalculations",
16
17
  target: "_blank",
17
18
  rel: "noreferrer",
18
- } }, "To learn more about creating custom calculation formulas, view the documentation."),
19
- React.createElement(LabeledTextarea, { className: "gmw-details-form", value: formula, name: "formula", label: "Formula", disabled: disabled, onChange: (event) => {
19
+ } }, GroupingMappingWidget.translate("properties.formulaDocMessage")),
20
+ React.createElement(LabeledTextarea, { className: "gmw-details-form", value: formula, name: "formula", label: GroupingMappingWidget.translate("properties.formula"), disabled: disabled, onChange: (event) => {
20
21
  setFormula(event.target.value);
21
22
  }, message: formulaErrorMessage, status: formulaErrorMessage ? "negative" : undefined, onBlur: (event) => {
22
23
  if (event.target.textLength === 0)
@@ -1 +1 @@
1
- {"version":3,"file":"CustomCalculationAction.js","sourceRoot":"","sources":["../../../../../src/components/Properties/CustomCalculations/CustomCalculationAction.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gCAAgC,CAAC;AAcxC;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,eAAe,EAAE,QAAQ,EAAgC,EAAE,EAAE;IAC/I,OAAO,CACL,oBAAC,UAAU,IAAC,SAAS,EAAC,yCAAyC;QAC7D,oBAAC,KAAK,IACJ,IAAI,EAAC,eAAe,EACpB,aAAa,EAAC,aAAa,EAC3B,kBAAkB,EAAE;gBAClB,IAAI,EAAE,wGAAwG;gBAC9G,MAAM,EAAE,QAAQ;gBAChB,GAAG,EAAE,YAAY;aAClB,wFAGK;QACR,oBAAC,eAAe,IACd,SAAS,EAAC,kBAAkB,EAC5B,KAAK,EAAE,OAAO,EACd,IAAI,EAAC,SAAS,EACd,KAAK,EAAC,SAAS,EACf,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;gBAClB,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACjC,CAAC,EACD,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EACpD,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;gBAChB,IAAI,KAAK,CAAC,MAAM,CAAC,UAAU,KAAK,CAAC;oBAAE,UAAU,CAAC,SAAS,CAAC,CAAC;YAC3D,CAAC,EACD,aAAa,EAAE,GAAG,EAAE;gBAClB,eAAe,EAAE,CAAC;YACpB,CAAC,GACD,CACS,CACd,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 { Alert, InputGroup, LabeledTextarea } from \"@itwin/itwinui-react\";\nimport React from \"react\";\nimport \"./CustomCalculationAction.scss\";\n\n/**\n * Props for the {@link CustomCalculationAction} component.\n * @internal\n */\nexport interface CustomCalculationActionProps {\n formula?: string;\n setFormula: (formula: string | undefined) => void;\n formulaErrorMessage?: string;\n forceValidation: () => void;\n disabled?: boolean;\n}\n\n/**\n * Component to create or update a custom calculation property.\n * @internal\n */\nexport const CustomCalculationAction = ({ formula, setFormula, formulaErrorMessage, forceValidation, disabled }: CustomCalculationActionProps) => {\n return (\n <InputGroup className=\"gmw-custom-calculation-action-container\">\n <Alert\n type=\"informational\"\n clickableText=\"Click here.\"\n clickableTextProps={{\n href: \"https://developer.bentley.com/apis/grouping-and-mapping/operations/create-property/#customcalculations\",\n target: \"_blank\",\n rel: \"noreferrer\",\n }}\n >\n To learn more about creating custom calculation formulas, view the documentation.\n </Alert>\n <LabeledTextarea\n className=\"gmw-details-form\"\n value={formula}\n name=\"formula\"\n label=\"Formula\"\n disabled={disabled}\n onChange={(event) => {\n setFormula(event.target.value);\n }}\n message={formulaErrorMessage}\n status={formulaErrorMessage ? \"negative\" : undefined}\n onBlur={(event) => {\n if (event.target.textLength === 0) setFormula(undefined);\n }}\n onBlurCapture={() => {\n forceValidation();\n }}\n />\n </InputGroup>\n );\n};\n"]}
1
+ {"version":3,"file":"CustomCalculationAction.js","sourceRoot":"","sources":["../../../../../src/components/Properties/CustomCalculations/CustomCalculationAction.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gCAAgC,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAcvE;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,eAAe,EAAE,QAAQ,EAAgC,EAAE,EAAE;IAC/I,OAAO,CACL,oBAAC,UAAU,IAAC,SAAS,EAAC,yCAAyC;QAC7D,oBAAC,KAAK,IACJ,IAAI,EAAC,eAAe,EACpB,aAAa,EAAE,qBAAqB,CAAC,SAAS,CAAC,2BAA2B,CAAC,EAC3E,kBAAkB,EAAE;gBAClB,IAAI,EAAE,wGAAwG;gBAC9G,MAAM,EAAE,QAAQ;gBAChB,GAAG,EAAE,YAAY;aAClB,IAEA,qBAAqB,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAC1D;QACR,oBAAC,eAAe,IACd,SAAS,EAAC,kBAAkB,EAC5B,KAAK,EAAE,OAAO,EACd,IAAI,EAAC,SAAS,EACd,KAAK,EAAE,qBAAqB,CAAC,SAAS,CAAC,oBAAoB,CAAC,EAC5D,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;gBAClB,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACjC,CAAC,EACD,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EACpD,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;gBAChB,IAAI,KAAK,CAAC,MAAM,CAAC,UAAU,KAAK,CAAC;oBAAE,UAAU,CAAC,SAAS,CAAC,CAAC;YAC3D,CAAC,EACD,aAAa,EAAE,GAAG,EAAE;gBAClB,eAAe,EAAE,CAAC;YACpB,CAAC,GACD,CACS,CACd,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 { Alert, InputGroup, LabeledTextarea } from \"@itwin/itwinui-react\";\nimport React from \"react\";\nimport \"./CustomCalculationAction.scss\";\nimport { GroupingMappingWidget } from \"../../../GroupingMappingWidget\";\n\n/**\n * Props for the {@link CustomCalculationAction} component.\n * @internal\n */\nexport interface CustomCalculationActionProps {\n formula?: string;\n setFormula: (formula: string | undefined) => void;\n formulaErrorMessage?: string;\n forceValidation: () => void;\n disabled?: boolean;\n}\n\n/**\n * Component to create or update a custom calculation property.\n * @internal\n */\nexport const CustomCalculationAction = ({ formula, setFormula, formulaErrorMessage, forceValidation, disabled }: CustomCalculationActionProps) => {\n return (\n <InputGroup className=\"gmw-custom-calculation-action-container\">\n <Alert\n type=\"informational\"\n clickableText={GroupingMappingWidget.translate(\"properties.formulaDocLink\")}\n clickableTextProps={{\n href: \"https://developer.bentley.com/apis/grouping-and-mapping/operations/create-property/#customcalculations\",\n target: \"_blank\",\n rel: \"noreferrer\",\n }}\n >\n {GroupingMappingWidget.translate(\"properties.formulaDocMessage\")}\n </Alert>\n <LabeledTextarea\n className=\"gmw-details-form\"\n value={formula}\n name=\"formula\"\n label={GroupingMappingWidget.translate(\"properties.formula\")}\n disabled={disabled}\n onChange={(event) => {\n setFormula(event.target.value);\n }}\n message={formulaErrorMessage}\n status={formulaErrorMessage ? \"negative\" : undefined}\n onBlur={(event) => {\n if (event.target.textLength === 0) setFormula(undefined);\n }}\n onBlurCapture={() => {\n forceValidation();\n }}\n />\n </InputGroup>\n );\n};\n"]}
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
1
  import type { ToggleSwitchProps } from "@itwin/itwinui-react";
3
2
  import type { GroupMinimal } from "@itwin/insights-client";
4
- export declare type GroupColorToggleProps = Partial<ToggleSwitchProps> & {
3
+ export type GroupColorToggleProps = Partial<ToggleSwitchProps> & {
5
4
  color: string;
6
5
  group: GroupMinimal;
7
6
  disableZoom?: boolean;
@@ -12,6 +12,7 @@ import { usePropertiesGroupColorContext } from "../context/PropertiesGroupColorC
12
12
  import { useMutation } from "@tanstack/react-query";
13
13
  import { useIsMounted } from "../../common/hooks/useIsMounted";
14
14
  import { useGroupHilitedElementsContext } from "../context/GroupHilitedElementsContext";
15
+ import { GroupingMappingWidget } from "../../GroupingMappingWidget";
15
16
  export const GroupColorToggle = ({ color, group, disableZoom, ...rest }) => {
16
17
  const { iModelConnection } = useGroupingMappingApiConfig();
17
18
  if (!iModelConnection) {
@@ -31,7 +32,7 @@ export const GroupColorToggle = ({ color, group, disableZoom, ...rest }) => {
31
32
  }
32
33
  },
33
34
  onError: (error) => {
34
- toaster.negative("There was an error visualizing group.");
35
+ toaster.negative(GroupingMappingWidget.translate("errors.visualizingGroup"));
35
36
  // eslint-disable-next-line no-console
36
37
  console.error(error);
37
38
  },
@@ -53,6 +54,6 @@ export const GroupColorToggle = ({ color, group, disableZoom, ...rest }) => {
53
54
  });
54
55
  }, [setShowGroupColor]);
55
56
  const isLoading = isFetching || isVisualizing;
56
- return React.createElement(ToggleSwitch, { label: "Color Group", disabled: isLoading, checked: showGroupColor, onChange: handleToggleChange, ...rest });
57
+ return React.createElement(ToggleSwitch, { label: GroupingMappingWidget.translate("groups.colorGroup"), disabled: isLoading, checked: showGroupColor, onChange: handleToggleChange, ...rest });
57
58
  };
58
59
  //# sourceMappingURL=GroupColorToggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GroupColorToggle.js","sourceRoot":"","sources":["../../../../src/components/Properties/GroupColorToggle.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAElF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC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QACb,SAAS,IAAI,cAAc,IAAI,eAAe,IAAI,SAAS,IAAI,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACtG,CAAC,EAAE,CAAC,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAEjF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,uBAAuB,EAAE;YAC3B,iBAAiB,CAAC,IAAI,CAAC,CAAC;SACzB;IACH,CAAC,EAAE,CAAC,uBAAuB,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAEjD,MAAM,kBAAkB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC1C,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAAE;YACtB,IAAI,CAAC,EAAE;gBACL,QAAQ,EAAE,CAAC;aACZ;YACD,OAAO,CAAC,CAAC,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAExB,MAAM,SAAS,GAAG,UAAU,IAAI,aAAa,CAAC;IAE9C,OAAO,oBAAC,YAAY,IAAC,KAAK,EAAC,aAAa,EAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,KAAM,IAAI,GAAiB,CAAC;AACjJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport React, { useCallback, useEffect } from \"react\";\nimport type { ToggleSwitchProps } from \"@itwin/itwinui-react\";\nimport { toaster, ToggleSwitch } from \"@itwin/itwinui-react\";\nimport type { GroupMinimal } from \"@itwin/insights-client\";\nimport { clearAll, visualizeElements, zoomToElements } from \"../../common/viewerUtils\";\nimport { Presentation } from \"@itwin/presentation-frontend\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport type { QueryResults } from \"../Groups/hooks/useKeySetHiliteQueries\";\nimport { useGroupKeySetQuery } from \"../Groups/hooks/useKeySetHiliteQueries\";\nimport { usePropertiesGroupColorContext } from \"../context/PropertiesGroupColorContext\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport { useIsMounted } from \"../../common/hooks/useIsMounted\";\nimport { useGroupHilitedElementsContext } from \"../context/GroupHilitedElementsContext\";\n\nexport type GroupColorToggleProps = Partial<ToggleSwitchProps> & {\n color: string;\n group: GroupMinimal;\n disableZoom?: boolean;\n};\n\nexport const GroupColorToggle = ({ color, group, disableZoom, ...rest }: GroupColorToggleProps) => {\n const { iModelConnection } = useGroupingMappingApiConfig();\n if (!iModelConnection) {\n throw new Error(\"This component requires an active iModelConnection.\");\n }\n const { showGroupColor, setShowGroupColor } = usePropertiesGroupColorContext();\n const { showGroupColor: isGroupsVisualizationOn } = useGroupHilitedElementsContext();\n const { data: hiliteIdsResult, isFetched, isFetching } = useGroupKeySetQuery(group, iModelConnection, showGroupColor);\n const isMounted = useIsMounted();\n\n const { mutate: mutateVisualization, isLoading: isVisualizing } = useMutation({\n mutationFn: async (hiliteIds: QueryResults) => {\n clearAll();\n Presentation.selection.clearSelection(\"GroupingMappingWidget\", iModelConnection);\n visualizeElements(hiliteIds.result.ids, color);\n if (!disableZoom) {\n await zoomToElements(hiliteIds.result.ids);\n }\n },\n onError: (error) => {\n toaster.negative(\"There was an error visualizing group.\");\n // eslint-disable-next-line no-console\n console.error(error);\n },\n });\n\n useEffect(() => {\n isFetched && showGroupColor && hiliteIdsResult && isMounted && mutateVisualization(hiliteIdsResult);\n }, [hiliteIdsResult, isFetched, isMounted, showGroupColor, mutateVisualization]);\n\n useEffect(() => {\n if (isGroupsVisualizationOn) {\n setShowGroupColor(true);\n }\n }, [isGroupsVisualizationOn, setShowGroupColor]);\n\n const handleToggleChange = useCallback(() => {\n setShowGroupColor((b) => {\n if (b) {\n clearAll();\n }\n return !b;\n });\n }, [setShowGroupColor]);\n\n const isLoading = isFetching || isVisualizing;\n\n return <ToggleSwitch label=\"Color Group\" disabled={isLoading} checked={showGroupColor} onChange={handleToggleChange} {...rest}></ToggleSwitch>;\n};\n"]}
1
+ {"version":3,"file":"GroupColorToggle.js","sourceRoot":"","sources":["../../../../src/components/Properties/GroupColorToggle.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAElF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAQpE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,EAAyB,EAAE,EAAE;IAChG,MAAM,EAAE,gBAAgB,EAAE,GAAG,2BAA2B,EAAE,CAAC;IAC3D,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IACD,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,GAAG,8BAA8B,EAAE,CAAC;IAC/E,MAAM,EAAE,cAAc,EAAE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AAuB,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAEjD,MAAM,kBAAkB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC1C,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAAE;YACtB,IAAI,CAAC,EAAE,CAAC;gBACN,QAAQ,EAAE,CAAC;YACb,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAExB,MAAM,SAAS,GAAG,UAAU,IAAI,aAAa,CAAC;IAE9C,OAAO,oBAAC,YAAY,IAAC,KAAK,EAAE,qBAAqB,CAAC,SAAS,CAAC,mBAAmB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,KAAM,IAAI,GAAiB,CAAC;AAC1L,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport React, { useCallback, useEffect } from \"react\";\nimport type { ToggleSwitchProps } from \"@itwin/itwinui-react\";\nimport { toaster, ToggleSwitch } from \"@itwin/itwinui-react\";\nimport type { GroupMinimal } from \"@itwin/insights-client\";\nimport { clearAll, visualizeElements, zoomToElements } from \"../../common/viewerUtils\";\nimport { Presentation } from \"@itwin/presentation-frontend\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport type { QueryResults } from \"../Groups/hooks/useKeySetHiliteQueries\";\nimport { useGroupKeySetQuery } from \"../Groups/hooks/useKeySetHiliteQueries\";\nimport { usePropertiesGroupColorContext } from \"../context/PropertiesGroupColorContext\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport { useIsMounted } from \"../../common/hooks/useIsMounted\";\nimport { useGroupHilitedElementsContext } from \"../context/GroupHilitedElementsContext\";\nimport { GroupingMappingWidget } from \"../../GroupingMappingWidget\";\n\nexport type GroupColorToggleProps = Partial<ToggleSwitchProps> & {\n color: string;\n group: GroupMinimal;\n disableZoom?: boolean;\n};\n\nexport const GroupColorToggle = ({ color, group, disableZoom, ...rest }: GroupColorToggleProps) => {\n const { iModelConnection } = useGroupingMappingApiConfig();\n if (!iModelConnection) {\n throw new Error(\"This component requires an active iModelConnection.\");\n }\n const { showGroupColor, setShowGroupColor } = usePropertiesGroupColorContext();\n const { showGroupColor: isGroupsVisualizationOn } = useGroupHilitedElementsContext();\n const { data: hiliteIdsResult, isFetched, isFetching } = useGroupKeySetQuery(group, iModelConnection, showGroupColor);\n const isMounted = useIsMounted();\n\n const { mutate: mutateVisualization, isLoading: isVisualizing } = useMutation({\n mutationFn: async (hiliteIds: QueryResults) => {\n clearAll();\n Presentation.selection.clearSelection(\"GroupingMappingWidget\", iModelConnection);\n visualizeElements(hiliteIds.result.ids, color);\n if (!disableZoom) {\n await zoomToElements(hiliteIds.result.ids);\n }\n },\n onError: (error) => {\n toaster.negative(GroupingMappingWidget.translate(\"errors.visualizingGroup\"));\n // eslint-disable-next-line no-console\n console.error(error);\n },\n });\n\n useEffect(() => {\n isFetched && showGroupColor && hiliteIdsResult && isMounted && mutateVisualization(hiliteIdsResult);\n }, [hiliteIdsResult, isFetched, isMounted, showGroupColor, mutateVisualization]);\n\n useEffect(() => {\n if (isGroupsVisualizationOn) {\n setShowGroupColor(true);\n }\n }, [isGroupsVisualizationOn, setShowGroupColor]);\n\n const handleToggleChange = useCallback(() => {\n setShowGroupColor((b) => {\n if (b) {\n clearAll();\n }\n return !b;\n });\n }, [setShowGroupColor]);\n\n const isLoading = isFetching || isVisualizing;\n\n return <ToggleSwitch label={GroupingMappingWidget.translate(\"groups.colorGroup\")} disabled={isLoading} checked={showGroupColor} onChange={handleToggleChange} {...rest}></ToggleSwitch>;\n};\n"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./GroupInformationPanel.scss";
3
2
  export interface GroupInformationPanelProps {
4
3
  isOpen: boolean;
@@ -5,12 +5,13 @@
5
5
  import React from "react";
6
6
  import { InformationPanel, InformationPanelBody, InformationPanelHeader, LabeledTextarea, Text } from "@itwin/itwinui-react";
7
7
  import "./GroupInformationPanel.scss";
8
+ import { GroupingMappingWidget } from "../../GroupingMappingWidget";
8
9
  export const GroupInformationPanel = ({ isOpen, onClose, groupName, query }) => {
9
10
  return (React.createElement(InformationPanel, { isOpen: isOpen },
10
11
  React.createElement(InformationPanelHeader, { onClose: onClose },
11
- React.createElement(Text, { variant: "subheading" }, `${groupName} Information`)),
12
+ React.createElement(Text, { variant: "subheading" }, GroupingMappingWidget.translate("properties.groupInformationTitle", { groupName }))),
12
13
  React.createElement(InformationPanelBody, null,
13
14
  React.createElement("div", { className: "gmw-group-information-body" },
14
- React.createElement(LabeledTextarea, { label: "Query", rows: 15, readOnly: true, defaultValue: query })))));
15
+ React.createElement(LabeledTextarea, { label: GroupingMappingWidget.translate("properties.query"), rows: 15, readOnly: true, defaultValue: query })))));
15
16
  };
16
17
  //# sourceMappingURL=GroupInformationPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GroupInformationPanel.js","sourceRoot":"","sources":["../../../../src/components/Properties/GroupInformationPanel.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7H,OAAO,8BAA8B,CAAC;AAStC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAA8B,EAAE,EAAE;IACzG,OAAO,CACL,oBAAC,gBAAgB,IAAC,MAAM,EAAE,MAAM;QAC9B,oBAAC,sBAAsB,IAAC,OAAO,EAAE,OAAO;YACtC,oBAAC,IAAI,IAAC,OAAO,EAAC,YAAY,IAAE,GAAG,SAAS,cAAc,CAAQ,CACvC;QACzB,oBAAC,oBAAoB;YACnB,6BAAK,SAAS,EAAC,4BAA4B;gBACzC,oBAAC,eAAe,IAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,QAAC,YAAY,EAAE,KAAK,GAAI,CACrE,CACe,CACN,CACpB,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 { InformationPanel, InformationPanelBody, InformationPanelHeader, LabeledTextarea, Text } from \"@itwin/itwinui-react\";\nimport \"./GroupInformationPanel.scss\";\n\nexport interface GroupInformationPanelProps {\n isOpen: boolean;\n onClose: () => void;\n groupName: string;\n query: string;\n}\n\nexport const GroupInformationPanel = ({ isOpen, onClose, groupName, query }: GroupInformationPanelProps) => {\n return (\n <InformationPanel isOpen={isOpen}>\n <InformationPanelHeader onClose={onClose}>\n <Text variant=\"subheading\">{`${groupName} Information`}</Text>\n </InformationPanelHeader>\n <InformationPanelBody>\n <div className=\"gmw-group-information-body\">\n <LabeledTextarea label=\"Query\" rows={15} readOnly defaultValue={query} />\n </div>\n </InformationPanelBody>\n </InformationPanel>\n );\n};\n"]}
1
+ {"version":3,"file":"GroupInformationPanel.js","sourceRoot":"","sources":["../../../../src/components/Properties/GroupInformationPanel.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC7H,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AASpE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAA8B,EAAE,EAAE;IACzG,OAAO,CACL,oBAAC,gBAAgB,IAAC,MAAM,EAAE,MAAM;QAC9B,oBAAC,sBAAsB,IAAC,OAAO,EAAE,OAAO;YACtC,oBAAC,IAAI,IAAC,OAAO,EAAC,YAAY,IAAE,qBAAqB,CAAC,SAAS,CAAC,kCAAkC,EAAE,EAAE,SAAS,EAAE,CAAC,CAAQ,CAC/F;QACzB,oBAAC,oBAAoB;YACnB,6BAAK,SAAS,EAAC,4BAA4B;gBACzC,oBAAC,eAAe,IAAC,KAAK,EAAE,qBAAqB,CAAC,SAAS,CAAC,kBAAkB,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,QAAC,YAAY,EAAE,KAAK,GAAI,CACnH,CACe,CACN,CACpB,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 { InformationPanel, InformationPanelBody, InformationPanelHeader, LabeledTextarea, Text } from \"@itwin/itwinui-react\";\nimport \"./GroupInformationPanel.scss\";\nimport { GroupingMappingWidget } from \"../../GroupingMappingWidget\";\n\nexport interface GroupInformationPanelProps {\n isOpen: boolean;\n onClose: () => void;\n groupName: string;\n query: string;\n}\n\nexport const GroupInformationPanel = ({ isOpen, onClose, groupName, query }: GroupInformationPanelProps) => {\n return (\n <InformationPanel isOpen={isOpen}>\n <InformationPanelHeader onClose={onClose}>\n <Text variant=\"subheading\">{GroupingMappingWidget.translate(\"properties.groupInformationTitle\", { groupName })}</Text>\n </InformationPanelHeader>\n <InformationPanelBody>\n <div className=\"gmw-group-information-body\">\n <LabeledTextarea label={GroupingMappingWidget.translate(\"properties.query\")} rows={15} readOnly defaultValue={query} />\n </div>\n </InformationPanelBody>\n </InformationPanel>\n );\n};\n"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { SelectOption } from "@itwin/itwinui-react";
3
2
  import { QuantityType } from "@itwin/insights-client";
4
3
  import type { GroupMinimal, Property } from "@itwin/insights-client";
@@ -14,7 +13,7 @@ export interface GroupPropertyActionProps {
14
13
  onSaveSuccess: () => void;
15
14
  onClickCancel?: () => void;
16
15
  }
17
- export declare const quantityTypesSelectionOptions: SelectOption<QuantityType | undefined>[];
16
+ export declare const getQuantityTypesSelectionOptions: () => SelectOption<QuantityType | undefined>[];
18
17
  /**
19
18
  * Component to create or update a group.
20
19
  * @public
@@ -24,15 +24,16 @@ import { CustomCalculationAction } from "../CustomCalculations/CustomCalculation
24
24
  import { usePropertiesQuery } from "../hooks/usePropertiesQuery";
25
25
  import { useFormulaValidation } from "../hooks/useFormulaValidation";
26
26
  import { ScrollableExpandableBlock } from "../ScrollableExpandableBlock";
27
- export const quantityTypesSelectionOptions = [
28
- { value: QuantityType.Area, label: "Area" },
29
- { value: QuantityType.Distance, label: "Distance" },
30
- { value: QuantityType.Force, label: "Force" },
31
- { value: QuantityType.Mass, label: "Mass" },
32
- { value: QuantityType.Monetary, label: "Monetary" },
33
- { value: QuantityType.Time, label: "Time" },
34
- { value: QuantityType.Volume, label: "Volume" },
35
- { value: undefined, label: "No Quantity Type" },
27
+ import { GroupingMappingWidget } from "../../../GroupingMappingWidget";
28
+ export const getQuantityTypesSelectionOptions = () => [
29
+ { value: QuantityType.Area, label: GroupingMappingWidget.translate("properties.quantityArea") },
30
+ { value: QuantityType.Distance, label: GroupingMappingWidget.translate("properties.quantityDistance") },
31
+ { value: QuantityType.Force, label: GroupingMappingWidget.translate("properties.quantityForce") },
32
+ { value: QuantityType.Mass, label: GroupingMappingWidget.translate("properties.quantityMass") },
33
+ { value: QuantityType.Monetary, label: GroupingMappingWidget.translate("properties.quantityMonetary") },
34
+ { value: QuantityType.Time, label: GroupingMappingWidget.translate("properties.quantityTime") },
35
+ { value: QuantityType.Volume, label: GroupingMappingWidget.translate("properties.quantityVolume") },
36
+ { value: undefined, label: GroupingMappingWidget.translate("properties.noQuantityType") },
36
37
  ];
37
38
  /**
38
39
  * Component to create or update a group.
@@ -172,39 +173,39 @@ export const GroupPropertyAction = ({ mappingId, group, groupProperty, onSaveSuc
172
173
  const isLoading = isLoadingProperties || isSaving || isLoadingGroupProperties;
173
174
  return (React.createElement(React.Fragment, null,
174
175
  React.createElement("div", { className: "gmw-group-property-action-container", ref: actionContainerRef },
175
- React.createElement(Fieldset, { disabled: isLoading, className: "gmw-property-options", legend: "Property Details" },
176
- React.createElement(Text, { variant: "small", as: "small", className: "gmw-field-legend" }, "Asterisk * indicates mandatory fields."),
177
- React.createElement(LabeledInput, { id: "propertyName", label: "Property Name", value: propertyName, required: true, onChange: (event) => {
176
+ React.createElement(Fieldset, { disabled: isLoading, className: "gmw-property-options", legend: GroupingMappingWidget.translate("properties.propertyDetails") },
177
+ React.createElement(Text, { variant: "small", as: "small", className: "gmw-field-legend" }, GroupingMappingWidget.translate("common.mandatoryFields")),
178
+ React.createElement(LabeledInput, { id: "propertyName", label: GroupingMappingWidget.translate("properties.propertyName"), value: propertyName, required: true, onChange: (event) => {
178
179
  setPropertyName(event.target.value);
179
180
  validator.showMessageFor("propertyName");
180
181
  }, message: validator.message("propertyName", propertyName, NAME_REQUIREMENTS), status: validator.message("propertyName", propertyName, NAME_REQUIREMENTS) ? "negative" : undefined, onBlur: () => {
181
182
  validator.showMessageFor("propertyName");
182
183
  } }),
183
- React.createElement(LabeledSelect, { label: "Data Type", id: "dataType", options: [
184
- { value: DataType.Boolean, label: "Boolean" },
185
- { value: DataType.Integer, label: "Integer" },
186
- { value: DataType.Double, label: "Double" },
187
- { value: DataType.String, label: "String" },
184
+ React.createElement(LabeledSelect, { label: GroupingMappingWidget.translate("properties.dataType"), id: "dataType", options: [
185
+ { value: DataType.Boolean, label: GroupingMappingWidget.translate("properties.boolean") },
186
+ { value: DataType.Integer, label: GroupingMappingWidget.translate("properties.integer") },
187
+ { value: DataType.Double, label: GroupingMappingWidget.translate("properties.double") },
188
+ { value: DataType.String, label: GroupingMappingWidget.translate("properties.string") },
188
189
  ], required: true, value: calculatedPropertyType ? DataType.Double : dataType, onChange: (value) => {
189
190
  validator.showMessageFor("dataType");
190
191
  setDataType(value);
191
192
  }, message: validator.message("dataType", propertyName, "required"), status: validator.message("dataType", propertyName, "required") ? "negative" : undefined, onBlur: () => {
192
193
  validator.showMessageFor("dataType");
193
194
  }, disabled: calculatedPropertyType ? true : false, onShow: () => { }, onHide: () => { } }),
194
- React.createElement(LabeledSelect, { label: "Quantity Type", options: quantityTypesSelectionOptions, value: quantityType, onChange: setQuantityType, onShow: () => { }, onHide: () => { }, placeholder: "No Quantity Type" })),
195
- propertiesNotFoundAlert && (React.createElement(Alert, { type: "warning" }, "Warning: Could not match saved properties from the current generated list. It does not confirm or deny validity. Overwriting will occur if a new selection is made and saved.")),
196
- React.createElement(ScrollableExpandableBlock, { title: "Mapped Properties", endIcon: React.createElement(Icon, { fill: selectedProperties.length > 0 ? "informational" : "default" },
195
+ React.createElement(LabeledSelect, { label: GroupingMappingWidget.translate("properties.quantityType"), options: getQuantityTypesSelectionOptions(), value: quantityType, onChange: setQuantityType, onShow: () => { }, onHide: () => { }, placeholder: GroupingMappingWidget.translate("properties.noQuantityType") })),
196
+ propertiesNotFoundAlert && (React.createElement(Alert, { type: "warning" }, GroupingMappingWidget.translate("properties.savedPropertiesWarning"))),
197
+ React.createElement(ScrollableExpandableBlock, { title: GroupingMappingWidget.translate("properties.mappedProperties"), endIcon: React.createElement(Icon, { fill: selectedProperties.length > 0 ? "informational" : "default" },
197
198
  React.createElement(SvgLabel, null)), isExpanded: isMappedBlockExpanded, setIsExpanded: setIsMappedBlockExpanded },
198
199
  React.createElement("div", { className: "gmw-property-view-container" },
199
200
  React.createElement("div", { className: "gmw-property-view-button" },
200
- React.createElement(Button, { onClick: async () => setShowPropertiesSelectionModal(true), disabled: isLoading }, "Select Properties")),
201
+ React.createElement(Button, { onClick: async () => setShowPropertiesSelectionModal(true), disabled: isLoading }, GroupingMappingWidget.translate("properties.selectProperties"))),
201
202
  React.createElement("div", { className: "gmw-properties-list" }, selectedProperties.length === 0 && !isLoading ? (React.createElement("div", { className: "gmw-empty-selection" },
202
- React.createElement(Text, null, "No properties selected."),
203
- React.createElement(Text, null, "Press the \"Select Properties\" button for options."))) : (selectedProperties.map((property) => (React.createElement(GroupPropertyListItem, { key: property.key, content: `${property.displayLabel}`, title: `${property.actualECClassName}`, description: property.categoryLabel }))))))),
204
- React.createElement(ScrollableExpandableBlock, { parentRef: actionContainerRef, ref: calculatedPropertyActionRef, title: "Calculated Property", endIcon: React.createElement(Icon, { fill: calculatedPropertyType ? "informational" : "default" },
203
+ React.createElement(Text, null, GroupingMappingWidget.translate("properties.noSelected")),
204
+ React.createElement(Text, null, GroupingMappingWidget.translate("properties.selectPropertiesHint")))) : (selectedProperties.map((property) => (React.createElement(GroupPropertyListItem, { key: property.key, content: `${property.displayLabel}`, title: `${property.actualECClassName}`, description: property.categoryLabel }))))))),
205
+ React.createElement(ScrollableExpandableBlock, { parentRef: actionContainerRef, ref: calculatedPropertyActionRef, title: GroupingMappingWidget.translate("properties.calculatedProperty"), endIcon: React.createElement(Icon, { fill: calculatedPropertyType ? "informational" : "default" },
205
206
  React.createElement(SvgMeasure, null)), isExpanded: isCalculatedBlockExpanded, setIsExpanded: setIsCalculatedBlockExpanded },
206
207
  React.createElement(CalculatedPropertyActionWithVisuals, { group: group, calculatedPropertyType: calculatedPropertyType, setCalculatedPropertyType: setCalculatedPropertyType })),
207
- React.createElement(ScrollableExpandableBlock, { parentRef: actionContainerRef, ref: customCalculationActionRef, title: "Custom Calculation", endIcon: React.createElement(Icon, { fill: formula ? "informational" : "default" },
208
+ React.createElement(ScrollableExpandableBlock, { parentRef: actionContainerRef, ref: customCalculationActionRef, title: GroupingMappingWidget.translate("properties.customCalculation"), endIcon: React.createElement(Icon, { fill: formula ? "informational" : "default" },
208
209
  React.createElement(SvgFunction, null)), isExpanded: isFormulaBlockExpanded, setIsExpanded: setIsFormulaBlockExpanded },
209
210
  React.createElement(CustomCalculationAction, { formula: formula, setFormula: setFormula, formulaErrorMessage: formulaErrorMessage, forceValidation: forceValidation, disabled: isLoading }))),
210
211
  React.createElement(ActionPanel, { onSave: handleSaveClick, onCancel: onClickCancel, onSaveCapture: clearAll, onCancelCapture: clearAll, isLoading: isLoading, isSavingDisabled: !propertyName || dataType === undefined || formulaErrorMessage !== undefined }),
@@ -1 +1 @@
1
- {"version":3,"file":"GroupPropertyAction.js","sourceRoot":"","sources":["../../../../../src/components/Properties/GroupProperties/GroupPropertyAction.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACxG,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAC7D,OAAO,YAAY,EAAE,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,4BAA4B,CAAC;AAEpC,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACrI,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,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AExC,oBAAC,uBAAuB,IACtB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,mBAAmB,EAAE,mBAAmB,EACxC,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,SAAS,GACnB,CACwB,CACxB;QACN,oBAAC,WAAW,IACV,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,aAAa,EACvB,aAAa,EAAE,QAAQ,EACvB,eAAe,EAAE,QAAQ,EACzB,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,CAAC,YAAY,IAAI,QAAQ,KAAK,SAAS,IAAI,mBAAmB,KAAK,SAAS,GAC9F;QACF,oBAAC,8BAA8B,IAC7B,SAAS,EAAE,4BAA4B,EACvC,YAAY,EAAE,+BAA+B,EAC7C,kBAAkB,EAAE,kBAAkB,EACtC,qBAAqB,EAAE,qBAAqB,EAC5C,kBAAkB,EAAE,kBAAkB,GACtC;QACF,oBAAC,SAAS,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,yBAAyB,GAAI,CACrG,CACJ,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 { PropertyValueFormat } from \"@itwin/presentation-common\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { Alert, Button, Fieldset, Icon, LabeledInput, LabeledSelect, Text } from \"@itwin/itwinui-react\";\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport ActionPanel from \"../../SharedComponents/ActionPanel\";\nimport useValidator, { NAME_REQUIREMENTS } from \"../hooks/useValidator\";\nimport { useGroupingMappingApiConfig } from \"../../context/GroupingApiConfigContext\";\nimport { DataType, QuantityType } from \"@itwin/insights-client\";\nimport type { CalculatedPropertyType, GroupMinimal, Property, PropertyModify } from \"@itwin/insights-client\";\nimport \"./GroupPropertyAction.scss\";\nimport type { PropertyMetaData } from \"./GroupPropertyUtils\";\nimport { convertPresentationFields, convertToECProperties, fetchPresentationDescriptor, findProperties } from \"./GroupPropertyUtils\";\nimport { clearAll, manufactureKeys } from \"../../../common/viewerUtils\";\nimport { SaveModal } from \"./SaveModal\";\nimport { GroupsPropertiesSelectionModal } from \"./GroupsPropertiesSelectionModal\";\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport { GroupPropertyListItem } from \"./GroupPropertyListItem\";\nimport { usePropertiesClient } from \"../../context/PropertiesClientContext\";\nimport { SvgFunction, SvgLabel, SvgMeasure } from \"@itwin/itwinui-icons-react\";\nimport { CalculatedPropertyActionWithVisuals } from \"../CalculatedProperties/CalculatedPropertyActionWithVisuals\";\nimport { handleError } from \"../../../common/utils\";\nimport { CustomCalculationAction } from \"../CustomCalculations/CustomCalculationAction\";\nimport { usePropertiesQuery } from \"../hooks/usePropertiesQuery\";\nimport { useFormulaValidation } from \"../hooks/useFormulaValidation\";\nimport { ScrollableExpandableBlock } from \"../ScrollableExpandableBlock\";\n\n/**\n * Props for the {@link GroupPropertyAction} component.\n * @public\n */\nexport interface GroupPropertyActionProps {\n mappingId: string;\n group: GroupMinimal;\n groupProperty?: Property;\n onSaveSuccess: () => void;\n onClickCancel?: () => void;\n}\n\nexport const quantityTypesSelectionOptions: SelectOption<QuantityType | undefined>[] = [\n { value: QuantityType.Area, label: \"Area\" },\n { value: QuantityType.Distance, label: \"Distance\" },\n { value: QuantityType.Force, label: \"Force\" },\n { value: QuantityType.Mass, label: \"Mass\" },\n { value: QuantityType.Monetary, label: \"Monetary\" },\n { value: QuantityType.Time, label: \"Time\" },\n { value: QuantityType.Volume, label: \"Volume\" },\n { value: undefined, label: \"No Quantity Type\" },\n];\n\n/**\n * Component to create or update a group.\n * @public\n */\nexport const GroupPropertyAction = ({ mappingId, group, groupProperty, onSaveSuccess, onClickCancel }: GroupPropertyActionProps) => {\n const actionContainerRef = useRef<HTMLDivElement>(null);\n const calculatedPropertyActionRef = useRef<HTMLDivElement>(null);\n const customCalculationActionRef = useRef<HTMLDivElement>(null);\n const propertiesClient = usePropertiesClient();\n const queryClient = useQueryClient();\n\n const [propertyName, setPropertyName] = useState<string>(\"\");\n const [oldPropertyName, setOldPropertyName] = useState<string>(\"\");\n const [dataType, setDataType] = useState<DataType>(groupProperty?.dataType ?? DataType.String);\n const [quantityType, setQuantityType] = useState<QuantityType | undefined>(groupProperty?.quantityType ?? undefined);\n const [selectedProperties, setSelectedProperties] = useState<PropertyMetaData[]>([]);\n const [propertiesMetaData, setPropertiesMetaData] = useState<PropertyMetaData[]>([]);\n const [propertiesNotFoundAlert, setPropertiesNotFoundAlert] = useState<boolean>(false);\n const [validator, showValidationMessage] = useValidator();\n const [showPropertiesSelectionModal, setShowPropertiesSelectionModal] = useState<boolean>(false);\n const [showSaveConfirmationModal, setShowSaveConfirmationModal] = useState<boolean>(false);\n const [calculatedPropertyType, setCalculatedPropertyType] = useState<CalculatedPropertyType | undefined>(groupProperty?.calculatedPropertyType ?? undefined);\n const [isCalculatedBlockExpanded, setIsCalculatedBlockExpanded] = useState<boolean>(!!calculatedPropertyType);\n const [isMappedBlockExpanded, setIsMappedBlockExpanded] = useState<boolean>((groupProperty?.ecProperties?.length ?? 0) > 0);\n const [isFormulaBlockExpanded, setIsFormulaBlockExpanded] = useState<boolean>(!!groupProperty?.formula);\n const [formula, setFormula] = useState<string | undefined>(groupProperty?.formula ?? undefined);\n const [formulaErrorMessage, setFormulaErrorMessage] = useState<string | undefined>(undefined);\n\n const { getAccessToken, iModelId, iModelConnection } = useGroupingMappingApiConfig();\n const { data: groupProperties, isFetching: isLoadingGroupProperties } = usePropertiesQuery(iModelId, mappingId, group.id, getAccessToken, propertiesClient);\n const { forceValidation } = useFormulaValidation(propertyName.toLowerCase(), formula, groupProperties?.properties ?? [], setFormulaErrorMessage, dataType);\n\n const reset = useCallback(() => {\n setPropertyName(\"\");\n setDataType(DataType.String);\n setQuantityType(undefined);\n setSelectedProperties([]);\n setCalculatedPropertyType(undefined);\n setFormula(undefined);\n }, []);\n\n const fetchPropertiesMetadata = useCallback(async () => {\n if (!iModelConnection) return;\n\n const result = await manufactureKeys(group.query, iModelConnection);\n const descriptor = await fetchPresentationDescriptor(iModelConnection, result);\n\n // Only allow primitives and structs\n const propertyFields =\n descriptor?.fields.filter((field) => field.type.valueFormat === PropertyValueFormat.Primitive || field.type.valueFormat === PropertyValueFormat.Struct) ??\n [];\n\n const propertiesMetaData = convertPresentationFields(propertyFields);\n\n let groupPropertyDetails = null;\n if (groupProperty) {\n const accessToken = await getAccessToken();\n groupPropertyDetails = await propertiesClient.getProperty(accessToken, mappingId, group.id, groupProperty.id);\n }\n\n return { propertiesMetaData, groupPropertyDetails };\n }, [getAccessToken, group.id, group.query, groupProperty, iModelConnection, mappingId, propertiesClient]);\n\n const scrollToFormulaErrorMessage = useCallback(() => {\n setTimeout(() => {\n if (actionContainerRef.current && customCalculationActionRef.current) {\n actionContainerRef.current.scrollTo({\n top: customCalculationActionRef.current.offsetTop,\n behavior: \"smooth\",\n });\n }\n }, 500);\n }, [actionContainerRef]);\n\n const {\n data,\n isFetching: isLoadingProperties,\n isSuccess: isLoadingPropertiesSuccessful,\n } = useQuery([\"properties\", iModelId, mappingId, group.id, groupProperty?.id, \"metadata\"], fetchPropertiesMetadata);\n\n useEffect(() => {\n if (isLoadingPropertiesSuccessful && data?.propertiesMetaData) {\n setPropertiesMetaData(data.propertiesMetaData);\n\n if (data.groupPropertyDetails) {\n setPropertyName(data.groupPropertyDetails.propertyName);\n setOldPropertyName(data.groupPropertyDetails.propertyName);\n setDataType(data.groupPropertyDetails.dataType);\n if (data.groupPropertyDetails.quantityType) setQuantityType(data.groupPropertyDetails.quantityType);\n\n if (data.groupPropertyDetails.ecProperties) {\n const properties = findProperties(data.groupPropertyDetails.ecProperties, data.propertiesMetaData);\n if (properties.length === 0) {\n setPropertiesNotFoundAlert(true);\n }\n setSelectedProperties(properties);\n }\n }\n }\n }, [data, isLoadingPropertiesSuccessful]);\n\n useEffect(() => {\n if (calculatedPropertyType) {\n setDataType(DataType.Double);\n }\n\n if (isCalculatedBlockExpanded === false || !calculatedPropertyType) {\n clearAll();\n }\n }, [calculatedPropertyType, isCalculatedBlockExpanded]);\n\n useEffect(() => {\n if (formulaErrorMessage) {\n scrollToFormulaErrorMessage();\n }\n }, [formulaErrorMessage, scrollToFormulaErrorMessage]);\n\n const { mutate: onSave, isLoading: isSaving } = useMutation({\n mutationFn: async () => {\n const accessToken = await getAccessToken();\n const newGroupProperty: PropertyModify = {\n propertyName,\n dataType,\n quantityType,\n ecProperties: selectedProperties.length > 0 ? selectedProperties.map((p) => convertToECProperties(p)).flat() : undefined,\n calculatedPropertyType,\n formula,\n };\n\n return groupProperty\n ? propertiesClient.updateProperty(accessToken, mappingId, group.id, groupProperty.id, newGroupProperty)\n : propertiesClient.createProperty(accessToken, mappingId, group.id, newGroupProperty);\n },\n onSuccess: async () => {\n onSaveSuccess();\n reset();\n await queryClient.invalidateQueries([\"properties\", iModelId, mappingId, group.id]);\n },\n onError(error: any) {\n handleError(error.status);\n },\n });\n\n const handleSaveClick = async () => {\n if (!validator.allValid()) {\n showValidationMessage(true);\n return;\n }\n if (oldPropertyName !== propertyName && oldPropertyName !== \"\") {\n setShowSaveConfirmationModal(true);\n } else {\n onSave();\n }\n };\n\n const handleCloseSaveModal = () => {\n setShowSaveConfirmationModal(false);\n };\n\n const isLoading = isLoadingProperties || isSaving || isLoadingGroupProperties;\n\n return (\n <>\n <div className=\"gmw-group-property-action-container\" ref={actionContainerRef}>\n <Fieldset disabled={isLoading} className=\"gmw-property-options\" legend=\"Property Details\">\n <Text variant=\"small\" as=\"small\" className=\"gmw-field-legend\">\n Asterisk * indicates mandatory fields.\n </Text>\n <LabeledInput\n id=\"propertyName\"\n label=\"Property Name\"\n value={propertyName}\n required\n onChange={(event) => {\n setPropertyName(event.target.value);\n validator.showMessageFor(\"propertyName\");\n }}\n message={validator.message(\"propertyName\", propertyName, NAME_REQUIREMENTS)}\n status={validator.message(\"propertyName\", propertyName, NAME_REQUIREMENTS) ? \"negative\" : undefined}\n onBlur={() => {\n validator.showMessageFor(\"propertyName\");\n }}\n />\n <LabeledSelect<DataType>\n label={\"Data Type\"}\n id=\"dataType\"\n options={[\n { value: DataType.Boolean, label: \"Boolean\" },\n { value: DataType.Integer, label: \"Integer\" },\n { value: DataType.Double, label: \"Double\" },\n { value: DataType.String, label: \"String\" },\n ]}\n required\n value={calculatedPropertyType ? DataType.Double : dataType}\n onChange={(value) => {\n validator.showMessageFor(\"dataType\");\n setDataType(value);\n }}\n message={validator.message(\"dataType\", propertyName, \"required\")}\n status={validator.message(\"dataType\", propertyName, \"required\") ? \"negative\" : undefined}\n onBlur={() => {\n validator.showMessageFor(\"dataType\");\n }}\n disabled={calculatedPropertyType ? true : false}\n onShow={() => {}}\n onHide={() => {}}\n />\n <LabeledSelect<QuantityType | undefined>\n label=\"Quantity Type\"\n options={quantityTypesSelectionOptions}\n value={quantityType}\n onChange={setQuantityType}\n onShow={() => {}}\n onHide={() => {}}\n placeholder=\"No Quantity Type\"\n />\n </Fieldset>\n {propertiesNotFoundAlert && (\n <Alert type=\"warning\">\n Warning: Could not match saved properties from the current generated list. It does not confirm or deny validity. Overwriting will occur if a new\n selection is made and saved.\n </Alert>\n )}\n <ScrollableExpandableBlock\n title={\"Mapped Properties\"}\n endIcon={\n <Icon fill={selectedProperties.length > 0 ? \"informational\" : \"default\"}>\n <SvgLabel />\n </Icon>\n }\n isExpanded={isMappedBlockExpanded}\n setIsExpanded={setIsMappedBlockExpanded}\n >\n <div className=\"gmw-property-view-container\">\n <div className=\"gmw-property-view-button\">\n <Button onClick={async () => setShowPropertiesSelectionModal(true)} disabled={isLoading}>\n Select Properties\n </Button>\n </div>\n <div className=\"gmw-properties-list\">\n {selectedProperties.length === 0 && !isLoading ? (\n <div className=\"gmw-empty-selection\">\n <Text>No properties selected.</Text>\n <Text>Press the &quot;Select Properties&quot; button for options.</Text>\n </div>\n ) : (\n selectedProperties.map((property) => (\n <GroupPropertyListItem\n key={property.key}\n content={`${property.displayLabel}`}\n title={`${property.actualECClassName}`}\n description={property.categoryLabel}\n />\n ))\n )}\n </div>\n </div>\n </ScrollableExpandableBlock>\n <ScrollableExpandableBlock\n parentRef={actionContainerRef}\n ref={calculatedPropertyActionRef}\n title={\"Calculated Property\"}\n endIcon={\n <Icon fill={calculatedPropertyType ? \"informational\" : \"default\"}>\n <SvgMeasure />\n </Icon>\n }\n isExpanded={isCalculatedBlockExpanded}\n setIsExpanded={setIsCalculatedBlockExpanded}\n >\n <CalculatedPropertyActionWithVisuals\n group={group}\n calculatedPropertyType={calculatedPropertyType}\n setCalculatedPropertyType={setCalculatedPropertyType}\n />\n </ScrollableExpandableBlock>\n <ScrollableExpandableBlock\n parentRef={actionContainerRef}\n ref={customCalculationActionRef}\n title={\"Custom Calculation\"}\n endIcon={\n <Icon fill={formula ? \"informational\" : \"default\"}>\n <SvgFunction />\n </Icon>\n }\n isExpanded={isFormulaBlockExpanded}\n setIsExpanded={setIsFormulaBlockExpanded}\n >\n <CustomCalculationAction\n formula={formula}\n setFormula={setFormula}\n formulaErrorMessage={formulaErrorMessage}\n forceValidation={forceValidation}\n disabled={isLoading}\n />\n </ScrollableExpandableBlock>\n </div>\n <ActionPanel\n onSave={handleSaveClick}\n onCancel={onClickCancel}\n onSaveCapture={clearAll}\n onCancelCapture={clearAll}\n isLoading={isLoading}\n isSavingDisabled={!propertyName || dataType === undefined || formulaErrorMessage !== undefined}\n />\n <GroupsPropertiesSelectionModal\n showModal={showPropertiesSelectionModal}\n setShowModal={setShowPropertiesSelectionModal}\n selectedProperties={selectedProperties}\n setSelectedProperties={setSelectedProperties}\n propertiesMetaData={propertiesMetaData}\n />\n <SaveModal onSave={onSave} onClose={handleCloseSaveModal} showSaveModal={showSaveConfirmationModal} />\n </>\n );\n};\n"]}
1
+ {"version":3,"file":"GroupPropertyAction.js","sourceR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AAkB,EAAE,kBAAkB,EACtC,qBAAqB,EAAE,qBAAqB,EAC5C,kBAAkB,EAAE,kBAAkB,GACtC;QACF,oBAAC,SAAS,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,yBAAyB,GAAI,CACrG,CACJ,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 { PropertyValueFormat } from \"@itwin/presentation-common\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { Alert, Button, Fieldset, Icon, LabeledInput, LabeledSelect, Text } from \"@itwin/itwinui-react\";\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport ActionPanel from \"../../SharedComponents/ActionPanel\";\nimport useValidator, { NAME_REQUIREMENTS } from \"../hooks/useValidator\";\nimport { useGroupingMappingApiConfig } from \"../../context/GroupingApiConfigContext\";\nimport { DataType, QuantityType } from \"@itwin/insights-client\";\nimport type { CalculatedPropertyType, GroupMinimal, Property, PropertyModify } from \"@itwin/insights-client\";\nimport \"./GroupPropertyAction.scss\";\nimport type { PropertyMetaData } from \"./GroupPropertyUtils\";\nimport { convertPresentationFields, convertToECProperties, fetchPresentationDescriptor, findProperties } from \"./GroupPropertyUtils\";\nimport { clearAll, manufactureKeys } from \"../../../common/viewerUtils\";\nimport { SaveModal } from \"./SaveModal\";\nimport { GroupsPropertiesSelectionModal } from \"./GroupsPropertiesSelectionModal\";\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport { GroupPropertyListItem } from \"./GroupPropertyListItem\";\nimport { usePropertiesClient } from \"../../context/PropertiesClientContext\";\nimport { SvgFunction, SvgLabel, SvgMeasure } from \"@itwin/itwinui-icons-react\";\nimport { CalculatedPropertyActionWithVisuals } from \"../CalculatedProperties/CalculatedPropertyActionWithVisuals\";\nimport { handleError } from \"../../../common/utils\";\nimport { CustomCalculationAction } from \"../CustomCalculations/CustomCalculationAction\";\nimport { usePropertiesQuery } from \"../hooks/usePropertiesQuery\";\nimport { useFormulaValidation } from \"../hooks/useFormulaValidation\";\nimport { ScrollableExpandableBlock } from \"../ScrollableExpandableBlock\";\nimport { GroupingMappingWidget } from \"../../../GroupingMappingWidget\";\n\n/**\n * Props for the {@link GroupPropertyAction} component.\n * @public\n */\nexport interface GroupPropertyActionProps {\n mappingId: string;\n group: GroupMinimal;\n groupProperty?: Property;\n onSaveSuccess: () => void;\n onClickCancel?: () => void;\n}\n\nexport const getQuantityTypesSelectionOptions = (): SelectOption<QuantityType | undefined>[] => [\n { value: QuantityType.Area, label: GroupingMappingWidget.translate(\"properties.quantityArea\") },\n { value: QuantityType.Distance, label: GroupingMappingWidget.translate(\"properties.quantityDistance\") },\n { value: QuantityType.Force, label: GroupingMappingWidget.translate(\"properties.quantityForce\") },\n { value: QuantityType.Mass, label: GroupingMappingWidget.translate(\"properties.quantityMass\") },\n { value: QuantityType.Monetary, label: GroupingMappingWidget.translate(\"properties.quantityMonetary\") },\n { value: QuantityType.Time, label: GroupingMappingWidget.translate(\"properties.quantityTime\") },\n { value: QuantityType.Volume, label: GroupingMappingWidget.translate(\"properties.quantityVolume\") },\n { value: undefined, label: GroupingMappingWidget.translate(\"properties.noQuantityType\") },\n];\n\n/**\n * Component to create or update a group.\n * @public\n */\nexport const GroupPropertyAction = ({ mappingId, group, groupProperty, onSaveSuccess, onClickCancel }: GroupPropertyActionProps) => {\n const actionContainerRef = useRef<HTMLDivElement>(null);\n const calculatedPropertyActionRef = useRef<HTMLDivElement>(null);\n const customCalculationActionRef = useRef<HTMLDivElement>(null);\n const propertiesClient = usePropertiesClient();\n const queryClient = useQueryClient();\n\n const [propertyName, setPropertyName] = useState<string>(\"\");\n const [oldPropertyName, setOldPropertyName] = useState<string>(\"\");\n const [dataType, setDataType] = useState<DataType>(groupProperty?.dataType ?? DataType.String);\n const [quantityType, setQuantityType] = useState<QuantityType | undefined>(groupProperty?.quantityType ?? undefined);\n const [selectedProperties, setSelectedProperties] = useState<PropertyMetaData[]>([]);\n const [propertiesMetaData, setPropertiesMetaData] = useState<PropertyMetaData[]>([]);\n const [propertiesNotFoundAlert, setPropertiesNotFoundAlert] = useState<boolean>(false);\n const [validator, showValidationMessage] = useValidator();\n const [showPropertiesSelectionModal, setShowPropertiesSelectionModal] = useState<boolean>(false);\n const [showSaveConfirmationModal, setShowSaveConfirmationModal] = useState<boolean>(false);\n const [calculatedPropertyType, setCalculatedPropertyType] = useState<CalculatedPropertyType | undefined>(groupProperty?.calculatedPropertyType ?? undefined);\n const [isCalculatedBlockExpanded, setIsCalculatedBlockExpanded] = useState<boolean>(!!calculatedPropertyType);\n const [isMappedBlockExpanded, setIsMappedBlockExpanded] = useState<boolean>((groupProperty?.ecProperties?.length ?? 0) > 0);\n const [isFormulaBlockExpanded, setIsFormulaBlockExpanded] = useState<boolean>(!!groupProperty?.formula);\n const [formula, setFormula] = useState<string | undefined>(groupProperty?.formula ?? undefined);\n const [formulaErrorMessage, setFormulaErrorMessage] = useState<string | undefined>(undefined);\n\n const { getAccessToken, iModelId, iModelConnection } = useGroupingMappingApiConfig();\n const { data: groupProperties, isFetching: isLoadingGroupProperties } = usePropertiesQuery(iModelId, mappingId, group.id, getAccessToken, propertiesClient);\n const { forceValidation } = useFormulaValidation(propertyName.toLowerCase(), formula, groupProperties?.properties ?? [], setFormulaErrorMessage, dataType);\n\n const reset = useCallback(() => {\n setPropertyName(\"\");\n setDataType(DataType.String);\n setQuantityType(undefined);\n setSelectedProperties([]);\n setCalculatedPropertyType(undefined);\n setFormula(undefined);\n }, []);\n\n const fetchPropertiesMetadata = useCallback(async () => {\n if (!iModelConnection) return;\n\n const result = await manufactureKeys(group.query, iModelConnection);\n const descriptor = await fetchPresentationDescriptor(iModelConnection, result);\n\n // Only allow primitives and structs\n const propertyFields =\n descriptor?.fields.filter((field) => field.type.valueFormat === PropertyValueFormat.Primitive || field.type.valueFormat === PropertyValueFormat.Struct) ??\n [];\n\n const propertiesMetaData = convertPresentationFields(propertyFields);\n\n let groupPropertyDetails = null;\n if (groupProperty) {\n const accessToken = await getAccessToken();\n groupPropertyDetails = await propertiesClient.getProperty(accessToken, mappingId, group.id, groupProperty.id);\n }\n\n return { propertiesMetaData, groupPropertyDetails };\n }, [getAccessToken, group.id, group.query, groupProperty, iModelConnection, mappingId, propertiesClient]);\n\n const scrollToFormulaErrorMessage = useCallback(() => {\n setTimeout(() => {\n if (actionContainerRef.current && customCalculationActionRef.current) {\n actionContainerRef.current.scrollTo({\n top: customCalculationActionRef.current.offsetTop,\n behavior: \"smooth\",\n });\n }\n }, 500);\n }, [actionContainerRef]);\n\n const {\n data,\n isFetching: isLoadingProperties,\n isSuccess: isLoadingPropertiesSuccessful,\n } = useQuery([\"properties\", iModelId, mappingId, group.id, groupProperty?.id, \"metadata\"], fetchPropertiesMetadata);\n\n useEffect(() => {\n if (isLoadingPropertiesSuccessful && data?.propertiesMetaData) {\n setPropertiesMetaData(data.propertiesMetaData);\n\n if (data.groupPropertyDetails) {\n setPropertyName(data.groupPropertyDetails.propertyName);\n setOldPropertyName(data.groupPropertyDetails.propertyName);\n setDataType(data.groupPropertyDetails.dataType);\n if (data.groupPropertyDetails.quantityType) setQuantityType(data.groupPropertyDetails.quantityType);\n\n if (data.groupPropertyDetails.ecProperties) {\n const properties = findProperties(data.groupPropertyDetails.ecProperties, data.propertiesMetaData);\n if (properties.length === 0) {\n setPropertiesNotFoundAlert(true);\n }\n setSelectedProperties(properties);\n }\n }\n }\n }, [data, isLoadingPropertiesSuccessful]);\n\n useEffect(() => {\n if (calculatedPropertyType) {\n setDataType(DataType.Double);\n }\n\n if (isCalculatedBlockExpanded === false || !calculatedPropertyType) {\n clearAll();\n }\n }, [calculatedPropertyType, isCalculatedBlockExpanded]);\n\n useEffect(() => {\n if (formulaErrorMessage) {\n scrollToFormulaErrorMessage();\n }\n }, [formulaErrorMessage, scrollToFormulaErrorMessage]);\n\n const { mutate: onSave, isLoading: isSaving } = useMutation({\n mutationFn: async () => {\n const accessToken = await getAccessToken();\n const newGroupProperty: PropertyModify = {\n propertyName,\n dataType,\n quantityType,\n ecProperties: selectedProperties.length > 0 ? selectedProperties.map((p) => convertToECProperties(p)).flat() : undefined,\n calculatedPropertyType,\n formula,\n };\n\n return groupProperty\n ? propertiesClient.updateProperty(accessToken, mappingId, group.id, groupProperty.id, newGroupProperty)\n : propertiesClient.createProperty(accessToken, mappingId, group.id, newGroupProperty);\n },\n onSuccess: async () => {\n onSaveSuccess();\n reset();\n await queryClient.invalidateQueries([\"properties\", iModelId, mappingId, group.id]);\n },\n onError(error: any) {\n handleError(error.status);\n },\n });\n\n const handleSaveClick = async () => {\n if (!validator.allValid()) {\n showValidationMessage(true);\n return;\n }\n if (oldPropertyName !== propertyName && oldPropertyName !== \"\") {\n setShowSaveConfirmationModal(true);\n } else {\n onSave();\n }\n };\n\n const handleCloseSaveModal = () => {\n setShowSaveConfirmationModal(false);\n };\n\n const isLoading = isLoadingProperties || isSaving || isLoadingGroupProperties;\n\n return (\n <>\n <div className=\"gmw-group-property-action-container\" ref={actionContainerRef}>\n <Fieldset disabled={isLoading} className=\"gmw-property-options\" legend={GroupingMappingWidget.translate(\"properties.propertyDetails\")}>\n <Text variant=\"small\" as=\"small\" className=\"gmw-field-legend\">\n {GroupingMappingWidget.translate(\"common.mandatoryFields\")}\n </Text>\n <LabeledInput\n id=\"propertyName\"\n label={GroupingMappingWidget.translate(\"properties.propertyName\")}\n value={propertyName}\n required\n onChange={(event) => {\n setPropertyName(event.target.value);\n validator.showMessageFor(\"propertyName\");\n }}\n message={validator.message(\"propertyName\", propertyName, NAME_REQUIREMENTS)}\n status={validator.message(\"propertyName\", propertyName, NAME_REQUIREMENTS) ? \"negative\" : undefined}\n onBlur={() => {\n validator.showMessageFor(\"propertyName\");\n }}\n />\n <LabeledSelect<DataType>\n label={GroupingMappingWidget.translate(\"properties.dataType\")}\n id=\"dataType\"\n options={[\n { value: DataType.Boolean, label: GroupingMappingWidget.translate(\"properties.boolean\") },\n { value: DataType.Integer, label: GroupingMappingWidget.translate(\"properties.integer\") },\n { value: DataType.Double, label: GroupingMappingWidget.translate(\"properties.double\") },\n { value: DataType.String, label: GroupingMappingWidget.translate(\"properties.string\") },\n ]}\n required\n value={calculatedPropertyType ? DataType.Double : dataType}\n onChange={(value) => {\n validator.showMessageFor(\"dataType\");\n setDataType(value);\n }}\n message={validator.message(\"dataType\", propertyName, \"required\")}\n status={validator.message(\"dataType\", propertyName, \"required\") ? \"negative\" : undefined}\n onBlur={() => {\n validator.showMessageFor(\"dataType\");\n }}\n disabled={calculatedPropertyType ? true : false}\n onShow={() => {}}\n onHide={() => {}}\n />\n <LabeledSelect<QuantityType | undefined>\n label={GroupingMappingWidget.translate(\"properties.quantityType\")}\n options={getQuantityTypesSelectionOptions()}\n value={quantityType}\n onChange={setQuantityType}\n onShow={() => {}}\n onHide={() => {}}\n placeholder={GroupingMappingWidget.translate(\"properties.noQuantityType\")}\n />\n </Fieldset>\n {propertiesNotFoundAlert && (\n <Alert type=\"warning\">\n {GroupingMappingWidget.translate(\"properties.savedPropertiesWarning\")}\n </Alert>\n )}\n <ScrollableExpandableBlock\n title={GroupingMappingWidget.translate(\"properties.mappedProperties\")}\n endIcon={\n <Icon fill={selectedProperties.length > 0 ? \"informational\" : \"default\"}>\n <SvgLabel />\n </Icon>\n }\n isExpanded={isMappedBlockExpanded}\n setIsExpanded={setIsMappedBlockExpanded}\n >\n <div className=\"gmw-property-view-container\">\n <div className=\"gmw-property-view-button\">\n <Button onClick={async () => setShowPropertiesSelectionModal(true)} disabled={isLoading}>\n {GroupingMappingWidget.translate(\"properties.selectProperties\")}\n </Button>\n </div>\n <div className=\"gmw-properties-list\">\n {selectedProperties.length === 0 && !isLoading ? (\n <div className=\"gmw-empty-selection\">\n <Text>{GroupingMappingWidget.translate(\"properties.noSelected\")}</Text>\n <Text>{GroupingMappingWidget.translate(\"properties.selectPropertiesHint\")}</Text>\n </div>\n ) : (\n selectedProperties.map((property) => (\n <GroupPropertyListItem\n key={property.key}\n content={`${property.displayLabel}`}\n title={`${property.actualECClassName}`}\n description={property.categoryLabel}\n />\n ))\n )}\n </div>\n </div>\n </ScrollableExpandableBlock>\n <ScrollableExpandableBlock\n parentRef={actionContainerRef}\n ref={calculatedPropertyActionRef}\n title={GroupingMappingWidget.translate(\"properties.calculatedProperty\")}\n endIcon={\n <Icon fill={calculatedPropertyType ? \"informational\" : \"default\"}>\n <SvgMeasure />\n </Icon>\n }\n isExpanded={isCalculatedBlockExpanded}\n setIsExpanded={setIsCalculatedBlockExpanded}\n >\n <CalculatedPropertyActionWithVisuals\n group={group}\n calculatedPropertyType={calculatedPropertyType}\n setCalculatedPropertyType={setCalculatedPropertyType}\n />\n </ScrollableExpandableBlock>\n <ScrollableExpandableBlock\n parentRef={actionContainerRef}\n ref={customCalculationActionRef}\n title={GroupingMappingWidget.translate(\"properties.customCalculation\")}\n endIcon={\n <Icon fill={formula ? \"informational\" : \"default\"}>\n <SvgFunction />\n </Icon>\n }\n isExpanded={isFormulaBlockExpanded}\n setIsExpanded={setIsFormulaBlockExpanded}\n >\n <CustomCalculationAction\n formula={formula}\n setFormula={setFormula}\n formulaErrorMessage={formulaErrorMessage}\n forceValidation={forceValidation}\n disabled={isLoading}\n />\n </ScrollableExpandableBlock>\n </div>\n <ActionPanel\n onSave={handleSaveClick}\n onCancel={onClickCancel}\n onSaveCapture={clearAll}\n onCancelCapture={clearAll}\n isLoading={isLoading}\n isSavingDisabled={!propertyName || dataType === undefined || formulaErrorMessage !== undefined}\n />\n <GroupsPropertiesSelectionModal\n showModal={showPropertiesSelectionModal}\n setShowModal={setShowPropertiesSelectionModal}\n selectedProperties={selectedProperties}\n setSelectedProperties={setSelectedProperties}\n propertiesMetaData={propertiesMetaData}\n />\n <SaveModal onSave={onSave} onClose={handleCloseSaveModal} showSaveModal={showSaveConfirmationModal} />\n </>\n );\n};\n"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./GroupPropertyListItem.scss";
3
2
  export interface GroupPropertyListItemProps {
4
3
  content: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Property } from "@itwin/insights-client";
3
2
  export interface GroupPropertyTableProps {
4
3
  iModelId: string;
@@ -10,6 +10,7 @@ import { PropertyTable } from "../PropertyTable";
10
10
  import { useGroupingMappingApiConfig } from "../../context/GroupingApiConfigContext";
11
11
  import { useMutation, useQueryClient } from "@tanstack/react-query";
12
12
  import { usePropertiesClient } from "../../context/PropertiesClientContext";
13
+ import { GroupingMappingWidget } from "../../../GroupingMappingWidget";
13
14
  export const GroupPropertyTable = ({ mappingId, groupId, onClickAdd, onClickModify, isLoading, groupProperties, refresh, hideRefreshIcon, onGroupPropertyDelete, }) => {
14
15
  const propertiesClient = usePropertiesClient();
15
16
  const { getAccessToken, iModelId } = useGroupingMappingApiConfig();
@@ -40,15 +41,15 @@ export const GroupPropertyTable = ({ mappingId, groupId, onClickAdd, onClickModi
40
41
  React.createElement(MenuItem, { key: 0, onClick: () => {
41
42
  onClickModify(value.row.original);
42
43
  close();
43
- }, icon: React.createElement(SvgEdit, null) }, "Modify"),
44
+ }, icon: React.createElement(SvgEdit, null) }, GroupingMappingWidget.translate("common.modify")),
44
45
  ]
45
46
  : [],
46
47
  React.createElement(MenuItem, { key: 1, onClick: () => {
47
48
  handleShowDeleteModal(value.row.original);
48
49
  close();
49
- }, icon: React.createElement(SvgDelete, null) }, "Remove"),
50
+ }, icon: React.createElement(SvgDelete, null) }, GroupingMappingWidget.translate("common.remove")),
50
51
  ].flatMap((p) => p) },
51
- React.createElement(IconButton, { styleType: "borderless", title: "Property Options" },
52
+ React.createElement(IconButton, { styleType: "borderless", title: GroupingMappingWidget.translate("properties.propertyOptions") },
52
53
  React.createElement(SvgMore, null))));
53
54
  },
54
55
  },
@@ -62,6 +63,6 @@ export const GroupPropertyTable = ({ mappingId, groupId, onClickAdd, onClickModi
62
63
  await queryClient.invalidateQueries({ queryKey: ["properties", iModelId, mappingId, groupId] });
63
64
  },
64
65
  });
65
- return (React.createElement(PropertyTable, { propertyType: "Group", columnsFactory: columnsFactory, data: groupProperties, isLoading: isLoading, onClickAdd: onClickAdd, refreshProperties: refresh, deleteProperty: deleteProperty, hideRefreshIcon: hideRefreshIcon, onGroupPropertyDelete: onGroupPropertyDelete }));
66
+ return (React.createElement(PropertyTable, { propertyType: GroupingMappingWidget.translate("properties.group"), columnsFactory: columnsFactory, data: groupProperties, isLoading: isLoading, onClickAdd: onClickAdd, refreshProperties: refresh, deleteProperty: deleteProperty, hideRefreshIcon: hideRefreshIcon, onGroupPropertyDelete: onGroupPropertyDelete }));
66
67
  };
67
68
  //# sourceMappingURL=GroupPropertyTable.js.map