@itwin/grouping-mapping-widget 0.26.0 → 0.27.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 (611) hide show
  1. package/LICENSE.md +9 -9
  2. package/README.md +115 -115
  3. package/lib/cjs/WidgetShell/GroupingMapping.js +2 -4
  4. package/lib/cjs/WidgetShell/GroupingMapping.js.map +1 -1
  5. package/lib/cjs/WidgetShell/GroupingMappingContent.js +4 -4
  6. package/lib/cjs/WidgetShell/GroupingMappingContent.js.map +1 -1
  7. package/lib/cjs/WidgetShell/GroupingMappingHeader.d.ts +1 -1
  8. package/lib/cjs/WidgetShell/GroupingMappingHeader.js +5 -5
  9. package/lib/cjs/WidgetShell/GroupingMappingHeader.js.map +1 -1
  10. package/lib/cjs/WidgetShell/GroupingMappingWidget.js +1 -3
  11. package/lib/cjs/WidgetShell/GroupingMappingWidget.js.map +1 -1
  12. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js +29 -23
  13. package/lib/cjs/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
  14. package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.d.ts +1 -1
  15. package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js +7 -7
  16. package/lib/cjs/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -1
  17. package/lib/cjs/common/hooks/useIsMounted.js +3 -3
  18. package/lib/cjs/common/hooks/useIsMounted.js.map +1 -1
  19. package/lib/cjs/common/hooks/useMemoizedCollectionPick.js +3 -3
  20. package/lib/cjs/common/hooks/useMemoizedCollectionPick.js.map +1 -1
  21. package/lib/cjs/common/utils.js +3 -3
  22. package/lib/cjs/common/utils.js.map +1 -1
  23. package/lib/cjs/common/viewerUtils.js +2 -2
  24. package/lib/cjs/common/viewerUtils.js.map +1 -1
  25. package/lib/cjs/components/Constants.js +4 -4
  26. package/lib/cjs/components/Constants.js.map +1 -1
  27. package/lib/cjs/components/GroupingMappingContext.js +13 -4
  28. package/lib/cjs/components/GroupingMappingContext.js.map +1 -1
  29. package/lib/cjs/components/Groups/Editing/GroupAction.js +7 -9
  30. package/lib/cjs/components/Groups/Editing/GroupAction.js.map +1 -1
  31. package/lib/cjs/components/Groups/Editing/GroupDetails.d.ts +1 -1
  32. package/lib/cjs/components/Groups/Editing/GroupDetails.js +5 -7
  33. package/lib/cjs/components/Groups/Editing/GroupDetails.js.map +1 -1
  34. package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.d.ts +1 -1
  35. package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js +4 -4
  36. package/lib/cjs/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
  37. package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js +4 -4
  38. package/lib/cjs/components/Groups/Editing/GroupDetailsStep.js.map +1 -1
  39. package/lib/cjs/components/Groups/GroupColorLegend.js +3 -3
  40. package/lib/cjs/components/Groups/GroupColorLegend.js.map +1 -1
  41. package/lib/cjs/components/Groups/GroupListItem.js +3 -4
  42. package/lib/cjs/components/Groups/GroupListItem.js.map +1 -1
  43. package/lib/cjs/components/Groups/GroupListItem.scss +2 -2
  44. package/lib/cjs/components/Groups/GroupMenuActions.js +17 -6
  45. package/lib/cjs/components/Groups/GroupMenuActions.js.map +1 -1
  46. package/lib/cjs/components/Groups/GroupOverlapProgressBar.js.map +1 -1
  47. package/lib/cjs/components/Groups/Groups.js +3 -3
  48. package/lib/cjs/components/Groups/Groups.js.map +1 -1
  49. package/lib/cjs/components/Groups/GroupsAddButton.d.ts +1 -1
  50. package/lib/cjs/components/Groups/GroupsAddButton.js +4 -4
  51. package/lib/cjs/components/Groups/GroupsAddButton.js.map +1 -1
  52. package/lib/cjs/components/Groups/GroupsAddButton.scss +1 -1
  53. package/lib/cjs/components/Groups/GroupsShowHideButtons.d.ts +1 -1
  54. package/lib/cjs/components/Groups/GroupsShowHideButtons.js +2 -2
  55. package/lib/cjs/components/Groups/GroupsShowHideButtons.js.map +1 -1
  56. package/lib/cjs/components/Groups/GroupsView.js +8 -10
  57. package/lib/cjs/components/Groups/GroupsView.js.map +1 -1
  58. package/lib/cjs/components/Groups/GroupsView.scss +1 -1
  59. package/lib/cjs/components/Groups/GroupsVisualization.js +19 -20
  60. package/lib/cjs/components/Groups/GroupsVisualization.js.map +1 -1
  61. package/lib/cjs/components/Groups/GroupsVisualizationActions.js +4 -4
  62. package/lib/cjs/components/Groups/GroupsVisualizationActions.js.map +1 -1
  63. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.d.ts +1 -1
  64. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js +4 -4
  65. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
  66. package/lib/cjs/components/Groups/OverlappedElementsInformationPanel.scss +7 -7
  67. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js +13 -35
  68. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
  69. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js +4 -4
  70. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -1
  71. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +1 -1
  72. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +4 -4
  73. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
  74. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js +4 -4
  75. package/lib/cjs/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -1
  76. package/lib/cjs/components/Groups/ToggleGroupVisibility.js +3 -3
  77. package/lib/cjs/components/Groups/ToggleGroupVisibility.js.map +1 -1
  78. package/lib/cjs/components/Groups/groupsHelpers.js +8 -4
  79. package/lib/cjs/components/Groups/groupsHelpers.js.map +1 -1
  80. package/lib/cjs/components/Groups/hooks/useFetchGroups.js.map +1 -1
  81. package/lib/cjs/components/Groups/hooks/useGroupsOperations.d.ts +1 -1
  82. package/lib/cjs/components/Groups/hooks/useGroupsOperations.js +5 -5
  83. package/lib/cjs/components/Groups/hooks/useGroupsOperations.js.map +1 -1
  84. package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.d.ts +1 -1
  85. package/lib/cjs/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
  86. package/lib/cjs/components/Groups/hooks/useVisualization.js +2 -4
  87. package/lib/cjs/components/Groups/hooks/useVisualization.js.map +1 -1
  88. package/lib/cjs/components/Mappings/BlockingOverlay.js +3 -3
  89. package/lib/cjs/components/Mappings/BlockingOverlay.js.map +1 -1
  90. package/lib/cjs/components/Mappings/Editing/MappingAction.js +11 -15
  91. package/lib/cjs/components/Mappings/Editing/MappingAction.js.map +1 -1
  92. package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.d.ts +1 -1
  93. package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js +1 -1
  94. package/lib/cjs/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
  95. package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js +9 -6
  96. package/lib/cjs/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
  97. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js +3 -3
  98. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js.map +1 -1
  99. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js +3 -3
  100. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js.map +1 -1
  101. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js +3 -3
  102. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js.map +1 -1
  103. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js +3 -3
  104. package/lib/cjs/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js.map +1 -1
  105. package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.d.ts +1 -1
  106. package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js +9 -9
  107. package/lib/cjs/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
  108. package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.js +4 -4
  109. package/lib/cjs/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -1
  110. package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js +26 -30
  111. package/lib/cjs/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
  112. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.d.ts +1 -1
  113. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js +3 -3
  114. package/lib/cjs/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
  115. package/lib/cjs/components/Mappings/Import/SelectIModel.d.ts +1 -1
  116. package/lib/cjs/components/Mappings/Import/SelectIModel.js +5 -5
  117. package/lib/cjs/components/Mappings/Import/SelectIModel.js.map +1 -1
  118. package/lib/cjs/components/Mappings/Import/SelectITwin.js +2 -2
  119. package/lib/cjs/components/Mappings/Import/SelectITwin.js.map +1 -1
  120. package/lib/cjs/components/Mappings/Import/SelectITwin.scss +1 -1
  121. package/lib/cjs/components/Mappings/Import/SelectMappings.d.ts +1 -1
  122. package/lib/cjs/components/Mappings/Import/SelectMappings.js +7 -7
  123. package/lib/cjs/components/Mappings/Import/SelectMappings.js.map +1 -1
  124. package/lib/cjs/components/Mappings/MappingListItem.js.map +1 -1
  125. package/lib/cjs/components/Mappings/MappingViewActionGroup.d.ts +1 -1
  126. package/lib/cjs/components/Mappings/MappingViewActionGroup.js +6 -7
  127. package/lib/cjs/components/Mappings/MappingViewActionGroup.js.map +1 -1
  128. package/lib/cjs/components/Mappings/Mappings.js +3 -3
  129. package/lib/cjs/components/Mappings/Mappings.js.map +1 -1
  130. package/lib/cjs/components/Mappings/MappingsView.js +14 -16
  131. package/lib/cjs/components/Mappings/MappingsView.js.map +1 -1
  132. package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js +3 -1
  133. package/lib/cjs/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
  134. package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -1
  135. package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js +3 -3
  136. package/lib/cjs/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
  137. package/lib/cjs/components/Mappings/hooks/useFetchMappings.js +1 -1
  138. package/lib/cjs/components/Mappings/hooks/useFetchMappings.js.map +1 -1
  139. package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js +36 -18
  140. package/lib/cjs/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
  141. package/lib/cjs/components/Mappings/hooks/useRunExtraction.d.ts +1 -1
  142. package/lib/cjs/components/Mappings/hooks/useRunExtraction.js +8 -6
  143. package/lib/cjs/components/Mappings/hooks/useRunExtraction.js.map +1 -1
  144. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +3 -1
  145. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +10 -9
  146. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
  147. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +7 -8
  148. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +24 -66
  149. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
  150. package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.d.ts +5 -9
  151. package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +6 -17
  152. package/lib/cjs/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
  153. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +8 -9
  154. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js +20 -161
  155. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
  156. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationAction.scss +5 -4
  157. package/lib/cjs/components/Properties/GroupColorToggle.js +4 -4
  158. package/lib/cjs/components/Properties/GroupColorToggle.js.map +1 -1
  159. package/lib/cjs/components/Properties/GroupInformationPanel.js +3 -3
  160. package/lib/cjs/components/Properties/GroupInformationPanel.js.map +1 -1
  161. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.d.ts +1 -1
  162. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js +90 -40
  163. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
  164. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyAction.scss +3 -2
  165. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +1 -1
  166. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.js +5 -5
  167. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyListItem.js.map +1 -1
  168. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.d.ts +1 -1
  169. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js +24 -14
  170. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
  171. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js +20 -39
  172. package/lib/cjs/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
  173. package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +20 -29
  174. package/lib/cjs/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
  175. package/lib/cjs/components/Properties/GroupProperties/SaveModal.d.ts +1 -1
  176. package/lib/cjs/components/Properties/GroupProperties/SaveModal.js +7 -7
  177. package/lib/cjs/components/Properties/GroupProperties/SaveModal.js.map +1 -1
  178. package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js +4 -4
  179. package/lib/cjs/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
  180. package/lib/cjs/components/Properties/PropertyAction.js +9 -21
  181. package/lib/cjs/components/Properties/PropertyAction.js.map +1 -1
  182. package/lib/cjs/components/Properties/PropertyMenu.d.ts +1 -1
  183. package/lib/cjs/components/Properties/PropertyMenu.js +5 -10
  184. package/lib/cjs/components/Properties/PropertyMenu.js.map +1 -1
  185. package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js +5 -5
  186. package/lib/cjs/components/Properties/PropertyMenuWithVisualization.js.map +1 -1
  187. package/lib/cjs/components/Properties/PropertyNameCell.d.ts +1 -1
  188. package/lib/cjs/components/Properties/PropertyNameCell.js +4 -4
  189. package/lib/cjs/components/Properties/PropertyNameCell.js.map +1 -1
  190. package/lib/cjs/components/Properties/PropertyTable.js +5 -6
  191. package/lib/cjs/components/Properties/PropertyTable.js.map +1 -1
  192. package/lib/cjs/components/Properties/PropertyTableToolbar.d.ts +1 -1
  193. package/lib/cjs/components/Properties/PropertyTableToolbar.js +4 -4
  194. package/lib/cjs/components/Properties/PropertyTableToolbar.js.map +1 -1
  195. package/lib/cjs/components/Properties/ScrollableExpandableBlock.d.ts +11 -0
  196. package/lib/cjs/components/Properties/ScrollableExpandableBlock.js +55 -0
  197. package/lib/cjs/components/Properties/ScrollableExpandableBlock.js.map +1 -0
  198. package/lib/cjs/components/Properties/hooks/useFormulaValidation.d.ts +6 -3
  199. package/lib/cjs/components/Properties/hooks/useFormulaValidation.js +62 -16
  200. package/lib/cjs/components/Properties/hooks/useFormulaValidation.js.map +1 -1
  201. package/lib/cjs/components/Properties/hooks/useForwardRef.d.ts +3 -0
  202. package/lib/cjs/components/Properties/hooks/useForwardRef.js +20 -0
  203. package/lib/cjs/components/Properties/hooks/useForwardRef.js.map +1 -0
  204. package/lib/cjs/components/Properties/hooks/usePropertiesQuery.js.map +1 -1
  205. package/lib/cjs/components/Properties/hooks/useValidator.js +4 -4
  206. package/lib/cjs/components/Properties/hooks/useValidator.js.map +1 -1
  207. package/lib/cjs/components/SharedComponents/ActionPanel.d.ts +3 -1
  208. package/lib/cjs/components/SharedComponents/ActionPanel.js +9 -10
  209. package/lib/cjs/components/SharedComponents/ActionPanel.js.map +1 -1
  210. package/lib/cjs/components/SharedComponents/DeleteModal.d.ts +1 -1
  211. package/lib/cjs/components/SharedComponents/DeleteModal.js +9 -10
  212. package/lib/cjs/components/SharedComponents/DeleteModal.js.map +1 -1
  213. package/lib/cjs/components/SharedComponents/EmptyMessage.js +4 -4
  214. package/lib/cjs/components/SharedComponents/EmptyMessage.js.map +1 -1
  215. package/lib/cjs/components/SharedComponents/LoadingOverlay.js +4 -4
  216. package/lib/cjs/components/SharedComponents/LoadingOverlay.js.map +1 -1
  217. package/lib/cjs/components/SharedComponents/LoadingSpinner.js +3 -3
  218. package/lib/cjs/components/SharedComponents/LoadingSpinner.js.map +1 -1
  219. package/lib/cjs/components/SharedComponents/StatusIcon.js +3 -3
  220. package/lib/cjs/components/SharedComponents/StatusIcon.js.map +1 -1
  221. package/lib/cjs/components/context/ExtractionClientContext.js.map +1 -1
  222. package/lib/cjs/components/context/ExtractionStateJobContext.js +3 -3
  223. package/lib/cjs/components/context/ExtractionStateJobContext.js.map +1 -1
  224. package/lib/cjs/components/context/GroupHilitedElementsContext.js +3 -3
  225. package/lib/cjs/components/context/GroupHilitedElementsContext.js.map +1 -1
  226. package/lib/cjs/components/context/GroupingApiConfigContext.js.map +1 -1
  227. package/lib/cjs/components/context/GroupingMappingCustomUIContext.js +3 -3
  228. package/lib/cjs/components/context/GroupingMappingCustomUIContext.js.map +1 -1
  229. package/lib/cjs/components/context/GroupsClientContext.js.map +1 -1
  230. package/lib/cjs/components/context/IModelsClientContext.js.map +1 -1
  231. package/lib/cjs/components/context/ITwinsClientContext.js +3 -3
  232. package/lib/cjs/components/context/ITwinsClientContext.js.map +1 -1
  233. package/lib/cjs/components/context/MappingClientContext.js.map +1 -1
  234. package/lib/cjs/components/context/PropertiesClientContext.js.map +1 -1
  235. package/lib/cjs/components/context/PropertiesGroupColorContext.js +3 -3
  236. package/lib/cjs/components/context/PropertiesGroupColorContext.js.map +1 -1
  237. package/lib/cjs/components/context/PropertyGridWrapperContext.js +3 -3
  238. package/lib/cjs/components/context/PropertyGridWrapperContext.js.map +1 -1
  239. package/lib/cjs/components/customUI/DefaultGroupingUI.js +3 -3
  240. package/lib/cjs/components/customUI/DefaultGroupingUI.js.map +1 -1
  241. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.d.ts +1 -1
  242. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js +13 -18
  243. package/lib/cjs/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
  244. package/lib/cjs/components/customUI/GroupingMappingCustomUI.js.map +1 -1
  245. package/lib/cjs/components/customUI/ManualGroupingCustomUI.d.ts +1 -1
  246. package/lib/cjs/components/customUI/ManualGroupingCustomUI.js +8 -8
  247. package/lib/cjs/components/customUI/ManualGroupingCustomUI.js.map +1 -1
  248. package/lib/cjs/components/customUI/SearchGroupingCustomUI.d.ts +1 -1
  249. package/lib/cjs/components/customUI/SearchGroupingCustomUI.js +16 -45
  250. package/lib/cjs/components/customUI/SearchGroupingCustomUI.js.map +1 -1
  251. package/lib/cjs/decorators/BboxDimensionsDecorator.js +3 -10
  252. package/lib/cjs/decorators/BboxDimensionsDecorator.js.map +1 -1
  253. package/lib/cjs/formula/FormulaDataTypeResolver.d.ts +3 -2
  254. package/lib/cjs/formula/FormulaDataTypeResolver.js +10 -6
  255. package/lib/cjs/formula/FormulaDataTypeResolver.js.map +1 -1
  256. package/lib/cjs/formula/FormulaFunctionProvider.js +146 -65
  257. package/lib/cjs/formula/FormulaFunctionProvider.js.map +1 -1
  258. package/lib/cjs/formula/FormulaOperatorsProvider.js +138 -44
  259. package/lib/cjs/formula/FormulaOperatorsProvider.js.map +1 -1
  260. package/lib/cjs/formula/FormulaSplitter.js +63 -13
  261. package/lib/cjs/formula/FormulaSplitter.js.map +1 -1
  262. package/lib/cjs/formula/FormulaTokensDataTypeResolver.js +7 -14
  263. package/lib/cjs/formula/FormulaTokensDataTypeResolver.js.map +1 -1
  264. package/lib/cjs/formula/IResult.js.map +1 -1
  265. package/lib/cjs/formula/InfixToPostfixConverter.js +4 -4
  266. package/lib/cjs/formula/InfixToPostfixConverter.js.map +1 -1
  267. package/lib/cjs/formula/InputStream.js +3 -3
  268. package/lib/cjs/formula/InputStream.js.map +1 -1
  269. package/lib/cjs/formula/ParenthesisValidator.js +3 -3
  270. package/lib/cjs/formula/ParenthesisValidator.js.map +1 -1
  271. package/lib/cjs/formula/Queue.js +3 -3
  272. package/lib/cjs/formula/Queue.js.map +1 -1
  273. package/lib/cjs/formula/Stack.js +3 -3
  274. package/lib/cjs/formula/Stack.js.map +1 -1
  275. package/lib/cjs/formula/StringBuilder.js +3 -3
  276. package/lib/cjs/formula/StringBuilder.js.map +1 -1
  277. package/lib/cjs/formula/Types.js.map +1 -1
  278. package/lib/cjs/formula/Utils.js +4 -4
  279. package/lib/cjs/formula/Utils.js.map +1 -1
  280. package/lib/cjs/grouping-mapping-widget.d.ts +3 -5
  281. package/lib/cjs/grouping-mapping-widget.js +4 -8
  282. package/lib/cjs/grouping-mapping-widget.js.map +1 -1
  283. package/lib/cjs/test/GroupPropertyUtils.test.js +27 -26
  284. package/lib/cjs/test/GroupPropertyUtils.test.js.map +1 -1
  285. package/lib/cjs/test/GroupingMappingCustomUI.test.js +4 -6
  286. package/lib/cjs/test/GroupingMappingCustomUI.test.js.map +1 -1
  287. package/lib/cjs/test/MockFactory.js +3 -3
  288. package/lib/cjs/test/MockFactory.js.map +1 -1
  289. package/lib/cjs/test/PropertyFieldsHelpers.js +3 -3
  290. package/lib/cjs/test/PropertyFieldsHelpers.js.map +1 -1
  291. package/lib/cjs/test/QueryBuilder.test.js +3 -3
  292. package/lib/cjs/test/QueryBuilder.test.js.map +1 -1
  293. package/lib/cjs/test/QueryBuilder.testdata.js +3 -3
  294. package/lib/cjs/test/QueryBuilder.testdata.js.map +1 -1
  295. package/lib/cjs/test/QueryBuilderTestData.js.map +1 -1
  296. package/lib/cjs/test/WidgetHeader.test.js +3 -3
  297. package/lib/cjs/test/WidgetHeader.test.js.map +1 -1
  298. package/lib/cjs/test/test-utils.js +4 -4
  299. package/lib/cjs/test/test-utils.js.map +1 -1
  300. package/lib/esm/WidgetShell/GroupingMapping.js +3 -5
  301. package/lib/esm/WidgetShell/GroupingMapping.js.map +1 -1
  302. package/lib/esm/WidgetShell/GroupingMappingContent.js +4 -4
  303. package/lib/esm/WidgetShell/GroupingMappingContent.js.map +1 -1
  304. package/lib/esm/WidgetShell/GroupingMappingHeader.d.ts +1 -1
  305. package/lib/esm/WidgetShell/GroupingMappingHeader.js +5 -5
  306. package/lib/esm/WidgetShell/GroupingMappingHeader.js.map +1 -1
  307. package/lib/esm/WidgetShell/GroupingMappingWidget.js +2 -4
  308. package/lib/esm/WidgetShell/GroupingMappingWidget.js.map +1 -1
  309. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js +29 -23
  310. package/lib/esm/WidgetShell/Router/GroupingMappingRouter.js.map +1 -1
  311. package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.d.ts +1 -1
  312. package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js +7 -7
  313. package/lib/esm/WidgetShell/WidgetHeader/WidgetHeader.js.map +1 -1
  314. package/lib/esm/common/hooks/useIsMounted.js +3 -3
  315. package/lib/esm/common/hooks/useIsMounted.js.map +1 -1
  316. package/lib/esm/common/hooks/useMemoizedCollectionPick.js +3 -3
  317. package/lib/esm/common/hooks/useMemoizedCollectionPick.js.map +1 -1
  318. package/lib/esm/common/utils.js +3 -3
  319. package/lib/esm/common/utils.js.map +1 -1
  320. package/lib/esm/common/viewerUtils.js +2 -2
  321. package/lib/esm/common/viewerUtils.js.map +1 -1
  322. package/lib/esm/components/Constants.js +4 -4
  323. package/lib/esm/components/Constants.js.map +1 -1
  324. package/lib/esm/components/GroupingMappingContext.js +14 -5
  325. package/lib/esm/components/GroupingMappingContext.js.map +1 -1
  326. package/lib/esm/components/Groups/Editing/GroupAction.js +8 -10
  327. package/lib/esm/components/Groups/Editing/GroupAction.js.map +1 -1
  328. package/lib/esm/components/Groups/Editing/GroupDetails.d.ts +1 -1
  329. package/lib/esm/components/Groups/Editing/GroupDetails.js +5 -7
  330. package/lib/esm/components/Groups/Editing/GroupDetails.js.map +1 -1
  331. package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.d.ts +1 -1
  332. package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js +4 -4
  333. package/lib/esm/components/Groups/Editing/GroupDetailsActionPanel.js.map +1 -1
  334. package/lib/esm/components/Groups/Editing/GroupDetailsStep.js +4 -4
  335. package/lib/esm/components/Groups/Editing/GroupDetailsStep.js.map +1 -1
  336. package/lib/esm/components/Groups/GroupColorLegend.js +3 -3
  337. package/lib/esm/components/Groups/GroupColorLegend.js.map +1 -1
  338. package/lib/esm/components/Groups/GroupListItem.js +3 -4
  339. package/lib/esm/components/Groups/GroupListItem.js.map +1 -1
  340. package/lib/esm/components/Groups/GroupListItem.scss +2 -2
  341. package/lib/esm/components/Groups/GroupMenuActions.js +17 -6
  342. package/lib/esm/components/Groups/GroupMenuActions.js.map +1 -1
  343. package/lib/esm/components/Groups/GroupOverlapProgressBar.js.map +1 -1
  344. package/lib/esm/components/Groups/Groups.js +3 -3
  345. package/lib/esm/components/Groups/Groups.js.map +1 -1
  346. package/lib/esm/components/Groups/GroupsAddButton.d.ts +1 -1
  347. package/lib/esm/components/Groups/GroupsAddButton.js +4 -4
  348. package/lib/esm/components/Groups/GroupsAddButton.js.map +1 -1
  349. package/lib/esm/components/Groups/GroupsAddButton.scss +1 -1
  350. package/lib/esm/components/Groups/GroupsShowHideButtons.d.ts +1 -1
  351. package/lib/esm/components/Groups/GroupsShowHideButtons.js +2 -2
  352. package/lib/esm/components/Groups/GroupsShowHideButtons.js.map +1 -1
  353. package/lib/esm/components/Groups/GroupsView.js +10 -12
  354. package/lib/esm/components/Groups/GroupsView.js.map +1 -1
  355. package/lib/esm/components/Groups/GroupsView.scss +1 -1
  356. package/lib/esm/components/Groups/GroupsVisualization.js +21 -22
  357. package/lib/esm/components/Groups/GroupsVisualization.js.map +1 -1
  358. package/lib/esm/components/Groups/GroupsVisualizationActions.js +4 -4
  359. package/lib/esm/components/Groups/GroupsVisualizationActions.js.map +1 -1
  360. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.d.ts +1 -1
  361. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js +5 -5
  362. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.js.map +1 -1
  363. package/lib/esm/components/Groups/OverlappedElementsInformationPanel.scss +7 -7
  364. package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js +13 -35
  365. package/lib/esm/components/Groups/QueryBuilder/QueryBuilder.js.map +1 -1
  366. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js +4 -4
  367. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderActionPanel.js.map +1 -1
  368. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.d.ts +1 -1
  369. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js +4 -4
  370. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderCustomUI.js.map +1 -1
  371. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js +4 -4
  372. package/lib/esm/components/Groups/QueryBuilder/QueryBuilderStep.js.map +1 -1
  373. package/lib/esm/components/Groups/ToggleGroupVisibility.js +3 -3
  374. package/lib/esm/components/Groups/ToggleGroupVisibility.js.map +1 -1
  375. package/lib/esm/components/Groups/groupsHelpers.js +9 -5
  376. package/lib/esm/components/Groups/groupsHelpers.js.map +1 -1
  377. package/lib/esm/components/Groups/hooks/useFetchGroups.js.map +1 -1
  378. package/lib/esm/components/Groups/hooks/useGroupsOperations.d.ts +1 -1
  379. package/lib/esm/components/Groups/hooks/useGroupsOperations.js +5 -5
  380. package/lib/esm/components/Groups/hooks/useGroupsOperations.js.map +1 -1
  381. package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.d.ts +1 -1
  382. package/lib/esm/components/Groups/hooks/useKeySetHiliteQueries.js.map +1 -1
  383. package/lib/esm/components/Groups/hooks/useVisualization.js +3 -5
  384. package/lib/esm/components/Groups/hooks/useVisualization.js.map +1 -1
  385. package/lib/esm/components/Mappings/BlockingOverlay.js +3 -3
  386. package/lib/esm/components/Mappings/BlockingOverlay.js.map +1 -1
  387. package/lib/esm/components/Mappings/Editing/MappingAction.js +11 -15
  388. package/lib/esm/components/Mappings/Editing/MappingAction.js.map +1 -1
  389. package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.d.ts +1 -1
  390. package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js +1 -1
  391. package/lib/esm/components/Mappings/Extraction/ExtractionLogCustomFilter.js.map +1 -1
  392. package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js +9 -6
  393. package/lib/esm/components/Mappings/Extraction/ExtractionMessageModal.js.map +1 -1
  394. package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js +3 -3
  395. package/lib/esm/components/Mappings/Extraction/ExtractionStates/QueuedExtractionState.js.map +1 -1
  396. package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js +3 -3
  397. package/lib/esm/components/Mappings/Extraction/ExtractionStates/RunningExtractionState.js.map +1 -1
  398. package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js +3 -3
  399. package/lib/esm/components/Mappings/Extraction/ExtractionStates/StartingExtractionState.js.map +1 -1
  400. package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js +3 -3
  401. package/lib/esm/components/Mappings/Extraction/ExtractionStates/TerminalExtractionState.js.map +1 -1
  402. package/lib/esm/components/Mappings/Extraction/ExtractionStatus.d.ts +1 -1
  403. package/lib/esm/components/Mappings/Extraction/ExtractionStatus.js +9 -9
  404. package/lib/esm/components/Mappings/Extraction/ExtractionStatus.js.map +1 -1
  405. package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.js +4 -4
  406. package/lib/esm/components/Mappings/Extraction/ExtractionStatusIcon.js.map +1 -1
  407. package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js +27 -31
  408. package/lib/esm/components/Mappings/Import/ConfirmMappingsImport.js.map +1 -1
  409. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.d.ts +1 -1
  410. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js +3 -3
  411. package/lib/esm/components/Mappings/Import/MappingImportWizardModal.js.map +1 -1
  412. package/lib/esm/components/Mappings/Import/SelectIModel.d.ts +1 -1
  413. package/lib/esm/components/Mappings/Import/SelectIModel.js +5 -5
  414. package/lib/esm/components/Mappings/Import/SelectIModel.js.map +1 -1
  415. package/lib/esm/components/Mappings/Import/SelectITwin.js +2 -2
  416. package/lib/esm/components/Mappings/Import/SelectITwin.js.map +1 -1
  417. package/lib/esm/components/Mappings/Import/SelectITwin.scss +1 -1
  418. package/lib/esm/components/Mappings/Import/SelectMappings.d.ts +1 -1
  419. package/lib/esm/components/Mappings/Import/SelectMappings.js +8 -8
  420. package/lib/esm/components/Mappings/Import/SelectMappings.js.map +1 -1
  421. package/lib/esm/components/Mappings/MappingListItem.js.map +1 -1
  422. package/lib/esm/components/Mappings/MappingViewActionGroup.d.ts +1 -1
  423. package/lib/esm/components/Mappings/MappingViewActionGroup.js +8 -9
  424. package/lib/esm/components/Mappings/MappingViewActionGroup.js.map +1 -1
  425. package/lib/esm/components/Mappings/Mappings.js +3 -3
  426. package/lib/esm/components/Mappings/Mappings.js.map +1 -1
  427. package/lib/esm/components/Mappings/MappingsView.js +16 -18
  428. package/lib/esm/components/Mappings/MappingsView.js.map +1 -1
  429. package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js +3 -1
  430. package/lib/esm/components/Mappings/hooks/useFetchExtractionStatus.js.map +1 -1
  431. package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.d.ts +1 -1
  432. package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js +3 -3
  433. package/lib/esm/components/Mappings/hooks/useFetchMappingExtractionStatus.js.map +1 -1
  434. package/lib/esm/components/Mappings/hooks/useFetchMappings.js +1 -1
  435. package/lib/esm/components/Mappings/hooks/useFetchMappings.js.map +1 -1
  436. package/lib/esm/components/Mappings/hooks/useMappingsOperations.js +36 -18
  437. package/lib/esm/components/Mappings/hooks/useMappingsOperations.js.map +1 -1
  438. package/lib/esm/components/Mappings/hooks/useRunExtraction.d.ts +1 -1
  439. package/lib/esm/components/Mappings/hooks/useRunExtraction.js +8 -6
  440. package/lib/esm/components/Mappings/hooks/useRunExtraction.js.map +1 -1
  441. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.d.ts +3 -1
  442. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js +11 -10
  443. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyAction.js.map +1 -1
  444. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.d.ts +7 -8
  445. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js +27 -66
  446. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyActionWithVisuals.js.map +1 -1
  447. package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.d.ts +5 -9
  448. package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js +8 -19
  449. package/lib/esm/components/Properties/CalculatedProperties/SharedCalculatedPropertyForms.js.map +1 -1
  450. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.d.ts +8 -9
  451. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js +21 -139
  452. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.js.map +1 -1
  453. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationAction.scss +5 -4
  454. package/lib/esm/components/Properties/GroupColorToggle.js +4 -4
  455. package/lib/esm/components/Properties/GroupColorToggle.js.map +1 -1
  456. package/lib/esm/components/Properties/GroupInformationPanel.js +3 -3
  457. package/lib/esm/components/Properties/GroupInformationPanel.js.map +1 -1
  458. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.d.ts +1 -1
  459. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js +94 -44
  460. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.js.map +1 -1
  461. package/lib/esm/components/Properties/GroupProperties/GroupPropertyAction.scss +3 -2
  462. package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.d.ts +1 -1
  463. package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.js +5 -5
  464. package/lib/esm/components/Properties/GroupProperties/GroupPropertyListItem.js.map +1 -1
  465. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.d.ts +1 -1
  466. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js +26 -16
  467. package/lib/esm/components/Properties/GroupProperties/GroupPropertyTable.js.map +1 -1
  468. package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js +21 -40
  469. package/lib/esm/components/Properties/GroupProperties/GroupPropertyUtils.js.map +1 -1
  470. package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js +26 -35
  471. package/lib/esm/components/Properties/GroupProperties/GroupsPropertiesSelectionModal.js.map +1 -1
  472. package/lib/esm/components/Properties/GroupProperties/SaveModal.d.ts +1 -1
  473. package/lib/esm/components/Properties/GroupProperties/SaveModal.js +8 -8
  474. package/lib/esm/components/Properties/GroupProperties/SaveModal.js.map +1 -1
  475. package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js +4 -4
  476. package/lib/esm/components/Properties/GroupProperties/SortableHorizontalTile.js.map +1 -1
  477. package/lib/esm/components/Properties/PropertyAction.js +9 -21
  478. package/lib/esm/components/Properties/PropertyAction.js.map +1 -1
  479. package/lib/esm/components/Properties/PropertyMenu.d.ts +1 -1
  480. package/lib/esm/components/Properties/PropertyMenu.js +5 -10
  481. package/lib/esm/components/Properties/PropertyMenu.js.map +1 -1
  482. package/lib/esm/components/Properties/PropertyMenuWithVisualization.js +5 -5
  483. package/lib/esm/components/Properties/PropertyMenuWithVisualization.js.map +1 -1
  484. package/lib/esm/components/Properties/PropertyNameCell.d.ts +1 -1
  485. package/lib/esm/components/Properties/PropertyNameCell.js +4 -4
  486. package/lib/esm/components/Properties/PropertyNameCell.js.map +1 -1
  487. package/lib/esm/components/Properties/PropertyTable.js +5 -6
  488. package/lib/esm/components/Properties/PropertyTable.js.map +1 -1
  489. package/lib/esm/components/Properties/PropertyTableToolbar.d.ts +1 -1
  490. package/lib/esm/components/Properties/PropertyTableToolbar.js +4 -4
  491. package/lib/esm/components/Properties/PropertyTableToolbar.js.map +1 -1
  492. package/lib/esm/components/Properties/ScrollableExpandableBlock.d.ts +11 -0
  493. package/lib/esm/components/Properties/ScrollableExpandableBlock.js +29 -0
  494. package/lib/esm/components/Properties/ScrollableExpandableBlock.js.map +1 -0
  495. package/lib/esm/components/Properties/hooks/useFormulaValidation.d.ts +6 -3
  496. package/lib/esm/components/Properties/hooks/useFormulaValidation.js +60 -15
  497. package/lib/esm/components/Properties/hooks/useFormulaValidation.js.map +1 -1
  498. package/lib/esm/components/Properties/hooks/useForwardRef.d.ts +3 -0
  499. package/lib/esm/components/Properties/hooks/useForwardRef.js +16 -0
  500. package/lib/esm/components/Properties/hooks/useForwardRef.js.map +1 -0
  501. package/lib/esm/components/Properties/hooks/usePropertiesQuery.js.map +1 -1
  502. package/lib/esm/components/Properties/hooks/useValidator.js +4 -4
  503. package/lib/esm/components/Properties/hooks/useValidator.js.map +1 -1
  504. package/lib/esm/components/SharedComponents/ActionPanel.d.ts +3 -1
  505. package/lib/esm/components/SharedComponents/ActionPanel.js +9 -10
  506. package/lib/esm/components/SharedComponents/ActionPanel.js.map +1 -1
  507. package/lib/esm/components/SharedComponents/DeleteModal.d.ts +1 -1
  508. package/lib/esm/components/SharedComponents/DeleteModal.js +10 -11
  509. package/lib/esm/components/SharedComponents/DeleteModal.js.map +1 -1
  510. package/lib/esm/components/SharedComponents/EmptyMessage.js +4 -4
  511. package/lib/esm/components/SharedComponents/EmptyMessage.js.map +1 -1
  512. package/lib/esm/components/SharedComponents/LoadingOverlay.js +4 -4
  513. package/lib/esm/components/SharedComponents/LoadingOverlay.js.map +1 -1
  514. package/lib/esm/components/SharedComponents/LoadingSpinner.js +3 -3
  515. package/lib/esm/components/SharedComponents/LoadingSpinner.js.map +1 -1
  516. package/lib/esm/components/SharedComponents/StatusIcon.js +3 -3
  517. package/lib/esm/components/SharedComponents/StatusIcon.js.map +1 -1
  518. package/lib/esm/components/context/ExtractionClientContext.js.map +1 -1
  519. package/lib/esm/components/context/ExtractionStateJobContext.js +3 -3
  520. package/lib/esm/components/context/ExtractionStateJobContext.js.map +1 -1
  521. package/lib/esm/components/context/GroupHilitedElementsContext.js +3 -3
  522. package/lib/esm/components/context/GroupHilitedElementsContext.js.map +1 -1
  523. package/lib/esm/components/context/GroupingApiConfigContext.js.map +1 -1
  524. package/lib/esm/components/context/GroupingMappingCustomUIContext.js +3 -3
  525. package/lib/esm/components/context/GroupingMappingCustomUIContext.js.map +1 -1
  526. package/lib/esm/components/context/GroupsClientContext.js.map +1 -1
  527. package/lib/esm/components/context/IModelsClientContext.js.map +1 -1
  528. package/lib/esm/components/context/ITwinsClientContext.js +3 -3
  529. package/lib/esm/components/context/ITwinsClientContext.js.map +1 -1
  530. package/lib/esm/components/context/MappingClientContext.js.map +1 -1
  531. package/lib/esm/components/context/PropertiesClientContext.js.map +1 -1
  532. package/lib/esm/components/context/PropertiesGroupColorContext.js +3 -3
  533. package/lib/esm/components/context/PropertiesGroupColorContext.js.map +1 -1
  534. package/lib/esm/components/context/PropertyGridWrapperContext.js +3 -3
  535. package/lib/esm/components/context/PropertyGridWrapperContext.js.map +1 -1
  536. package/lib/esm/components/customUI/DefaultGroupingUI.js +3 -3
  537. package/lib/esm/components/customUI/DefaultGroupingUI.js.map +1 -1
  538. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.d.ts +1 -1
  539. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js +14 -19
  540. package/lib/esm/components/customUI/GroupQueryBuilderCustomUI.js.map +1 -1
  541. package/lib/esm/components/customUI/GroupingMappingCustomUI.js.map +1 -1
  542. package/lib/esm/components/customUI/ManualGroupingCustomUI.d.ts +1 -1
  543. package/lib/esm/components/customUI/ManualGroupingCustomUI.js +8 -8
  544. package/lib/esm/components/customUI/ManualGroupingCustomUI.js.map +1 -1
  545. package/lib/esm/components/customUI/SearchGroupingCustomUI.d.ts +1 -1
  546. package/lib/esm/components/customUI/SearchGroupingCustomUI.js +16 -45
  547. package/lib/esm/components/customUI/SearchGroupingCustomUI.js.map +1 -1
  548. package/lib/esm/decorators/BboxDimensionsDecorator.js +5 -12
  549. package/lib/esm/decorators/BboxDimensionsDecorator.js.map +1 -1
  550. package/lib/esm/formula/FormulaDataTypeResolver.d.ts +3 -2
  551. package/lib/esm/formula/FormulaDataTypeResolver.js +10 -6
  552. package/lib/esm/formula/FormulaDataTypeResolver.js.map +1 -1
  553. package/lib/esm/formula/FormulaFunctionProvider.js +146 -65
  554. package/lib/esm/formula/FormulaFunctionProvider.js.map +1 -1
  555. package/lib/esm/formula/FormulaOperatorsProvider.js +138 -44
  556. package/lib/esm/formula/FormulaOperatorsProvider.js.map +1 -1
  557. package/lib/esm/formula/FormulaSplitter.js +63 -13
  558. package/lib/esm/formula/FormulaSplitter.js.map +1 -1
  559. package/lib/esm/formula/FormulaTokensDataTypeResolver.js +7 -14
  560. package/lib/esm/formula/FormulaTokensDataTypeResolver.js.map +1 -1
  561. package/lib/esm/formula/IResult.js.map +1 -1
  562. package/lib/esm/formula/InfixToPostfixConverter.js +5 -5
  563. package/lib/esm/formula/InfixToPostfixConverter.js.map +1 -1
  564. package/lib/esm/formula/InputStream.js +3 -3
  565. package/lib/esm/formula/InputStream.js.map +1 -1
  566. package/lib/esm/formula/ParenthesisValidator.js +3 -3
  567. package/lib/esm/formula/ParenthesisValidator.js.map +1 -1
  568. package/lib/esm/formula/Queue.js +3 -3
  569. package/lib/esm/formula/Queue.js.map +1 -1
  570. package/lib/esm/formula/Stack.js +3 -3
  571. package/lib/esm/formula/Stack.js.map +1 -1
  572. package/lib/esm/formula/StringBuilder.js +3 -3
  573. package/lib/esm/formula/StringBuilder.js.map +1 -1
  574. package/lib/esm/formula/Types.js.map +1 -1
  575. package/lib/esm/formula/Utils.js +4 -4
  576. package/lib/esm/formula/Utils.js.map +1 -1
  577. package/lib/esm/grouping-mapping-widget.d.ts +3 -5
  578. package/lib/esm/grouping-mapping-widget.js +6 -8
  579. package/lib/esm/grouping-mapping-widget.js.map +1 -1
  580. package/lib/esm/test/GroupPropertyUtils.test.js +28 -27
  581. package/lib/esm/test/GroupPropertyUtils.test.js.map +1 -1
  582. package/lib/esm/test/GroupingMappingCustomUI.test.js +4 -6
  583. package/lib/esm/test/GroupingMappingCustomUI.test.js.map +1 -1
  584. package/lib/esm/test/MockFactory.js +3 -3
  585. package/lib/esm/test/MockFactory.js.map +1 -1
  586. package/lib/esm/test/PropertyFieldsHelpers.js +3 -3
  587. package/lib/esm/test/PropertyFieldsHelpers.js.map +1 -1
  588. package/lib/esm/test/QueryBuilder.test.js +3 -3
  589. package/lib/esm/test/QueryBuilder.test.js.map +1 -1
  590. package/lib/esm/test/QueryBuilder.testdata.js +3 -3
  591. package/lib/esm/test/QueryBuilder.testdata.js.map +1 -1
  592. package/lib/esm/test/QueryBuilderTestData.js.map +1 -1
  593. package/lib/esm/test/WidgetHeader.test.js +3 -3
  594. package/lib/esm/test/WidgetHeader.test.js.map +1 -1
  595. package/lib/esm/test/test-utils.js +4 -4
  596. package/lib/esm/test/test-utils.js.map +1 -1
  597. package/package.json +8 -4
  598. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.d.ts +0 -14
  599. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +0 -87
  600. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +0 -1
  601. package/lib/cjs/components/Properties/CalculatedProperties/CalculatedPropertyTable.scss +0 -9
  602. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.d.ts +0 -13
  603. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js +0 -87
  604. package/lib/cjs/components/Properties/CustomCalculations/CustomCalculationTable.js.map +0 -1
  605. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.d.ts +0 -14
  606. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js +0 -60
  607. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.js.map +0 -1
  608. package/lib/esm/components/Properties/CalculatedProperties/CalculatedPropertyTable.scss +0 -9
  609. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.d.ts +0 -13
  610. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js +0 -60
  611. package/lib/esm/components/Properties/CustomCalculations/CustomCalculationTable.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyAction.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyAction.tsx"],"names":[],"mappings":"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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport React, { useCallback, useEffect, useState } from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { usePropertyGridWrapper } from \"../context/PropertyGridWrapperContext\";\nimport { Checkbox } from \"@itwin/itwinui-react\";\nimport \"./PropertyAction.scss\";\nimport type { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\n\nexport interface PropertyActionProps {\n property: PropertyRecord;\n}\n\nconst usePropertySelection = (\n property: PropertyRecord,\n currentPropertyList: PropertyRecord[],\n queryBuilder: QueryBuilder | undefined\n) => {\n const [isCheckboxLoading, setIsCheckboxLoading] = useState(false);\n\n const checkIfPropertyIsSelected = useCallback(\n (property: PropertyRecord): boolean => {\n if (property.value.valueFormat === PropertyValueFormat.Primitive) {\n return currentPropertyList.includes(property);\n }\n\n if (property.value.valueFormat === PropertyValueFormat.Array) {\n return (\n property.value.items.length === 0 &&\n currentPropertyList.includes(property)\n );\n }\n return Object.values(property.value.members).every(\n (subProp: PropertyRecord) => checkIfPropertyIsSelected(subProp)\n );\n },\n [currentPropertyList]\n );\n\n const isPropertySelected = checkIfPropertyIsSelected(property);\n\n const addProperty = useCallback(\n async (prop: PropertyRecord) => {\n if (\n prop.value.valueFormat === PropertyValueFormat.Primitive &&\n !currentPropertyList.includes(prop) &&\n (await queryBuilder?.addProperty(prop))\n ) {\n setIsCheckboxLoading(false);\n return true;\n }\n return false;\n },\n [currentPropertyList, queryBuilder]\n );\n\n const removeProperty = useCallback(\n async (prop: PropertyRecord) => {\n if (currentPropertyList.includes(prop)) {\n await queryBuilder?.removeProperty(prop);\n setIsCheckboxLoading(false);\n }\n },\n [currentPropertyList, queryBuilder]\n );\n\n return {\n isPropertySelected,\n addProperty,\n removeProperty,\n isCheckboxLoading,\n setIsCheckboxLoading,\n };\n};\n\nexport const PropertyAction = ({ property }: PropertyActionProps) => {\n const {\n currentPropertyList,\n queryBuilder,\n setCurrentPropertyList,\n setQuery,\n isUpdating,\n } = usePropertyGridWrapper();\n\n const {\n isPropertySelected,\n addProperty,\n removeProperty,\n isCheckboxLoading,\n setIsCheckboxLoading,\n } = usePropertySelection(property, currentPropertyList, queryBuilder);\n\n useEffect(() => {\n setIsCheckboxLoading(isPropertySelected && isUpdating);\n }, [isPropertySelected, isUpdating, setIsCheckboxLoading]);\n\n const onPropertySelectionChanged = useCallback(async () => {\n if (isPropertySelected) {\n await removeProperty(property);\n setCurrentPropertyList((prevList) =>\n prevList.filter((x) => x !== property)\n );\n setQuery(queryBuilder?.buildQueryString() ?? \"\");\n } else {\n if (await addProperty(property)) {\n setCurrentPropertyList((prevList) => prevList.concat(property));\n setQuery(queryBuilder?.buildQueryString() ?? \"\");\n }\n }\n }, [\n addProperty,\n isPropertySelected,\n property,\n removeProperty,\n queryBuilder,\n setCurrentPropertyList,\n setQuery,\n ]);\n\n return (\n <div className=\"gmw-property-selection-checkbox\">\n {property.value.valueFormat === PropertyValueFormat.Primitive &&\n property.value.value !== undefined && (\n <Checkbox\n checked={isPropertySelected}\n onChange={onPropertySelectionChanged}\n disabled={isUpdating}\n isLoading={isCheckboxLoading}\n />\n )}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"PropertyAction.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyAction.tsx"],"names":[],"mappings":"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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport React, { useCallback, useEffect, useState } from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { usePropertyGridWrapper } from \"../context/PropertyGridWrapperContext\";\nimport { Checkbox } from \"@itwin/itwinui-react\";\nimport \"./PropertyAction.scss\";\nimport type { QueryBuilder } from \"../Groups/QueryBuilder/QueryBuilder\";\n\nexport interface PropertyActionProps {\n property: PropertyRecord;\n}\n\nconst usePropertySelection = (property: PropertyRecord, currentPropertyList: PropertyRecord[], queryBuilder: QueryBuilder | undefined) => {\n const [isCheckboxLoading, setIsCheckboxLoading] = useState(false);\n\n const checkIfPropertyIsSelected = useCallback(\n (property: PropertyRecord): boolean => {\n if (property.value.valueFormat === PropertyValueFormat.Primitive) {\n return currentPropertyList.includes(property);\n }\n\n if (property.value.valueFormat === PropertyValueFormat.Array) {\n return property.value.items.length === 0 && currentPropertyList.includes(property);\n }\n return Object.values(property.value.members).every((subProp: PropertyRecord) => checkIfPropertyIsSelected(subProp));\n },\n [currentPropertyList],\n );\n\n const isPropertySelected = checkIfPropertyIsSelected(property);\n\n const addProperty = useCallback(\n async (prop: PropertyRecord) => {\n if (prop.value.valueFormat === PropertyValueFormat.Primitive && !currentPropertyList.includes(prop) && (await queryBuilder?.addProperty(prop))) {\n setIsCheckboxLoading(false);\n return true;\n }\n return false;\n },\n [currentPropertyList, queryBuilder],\n );\n\n const removeProperty = useCallback(\n async (prop: PropertyRecord) => {\n if (currentPropertyList.includes(prop)) {\n await queryBuilder?.removeProperty(prop);\n setIsCheckboxLoading(false);\n }\n },\n [currentPropertyList, queryBuilder],\n );\n\n return {\n isPropertySelected,\n addProperty,\n removeProperty,\n isCheckboxLoading,\n setIsCheckboxLoading,\n };\n};\n\nexport const PropertyAction = ({ property }: PropertyActionProps) => {\n const { currentPropertyList, queryBuilder, setCurrentPropertyList, setQuery, isUpdating } = usePropertyGridWrapper();\n\n const { isPropertySelected, addProperty, removeProperty, isCheckboxLoading, setIsCheckboxLoading } = usePropertySelection(\n property,\n currentPropertyList,\n queryBuilder,\n );\n\n useEffect(() => {\n setIsCheckboxLoading(isPropertySelected && isUpdating);\n }, [isPropertySelected, isUpdating, setIsCheckboxLoading]);\n\n const onPropertySelectionChanged = useCallback(async () => {\n if (isPropertySelected) {\n await removeProperty(property);\n setCurrentPropertyList((prevList) => prevList.filter((x) => x !== property));\n setQuery(queryBuilder?.buildQueryString() ?? \"\");\n } else {\n if (await addProperty(property)) {\n setCurrentPropertyList((prevList) => prevList.concat(property));\n setQuery(queryBuilder?.buildQueryString() ?? \"\");\n }\n }\n }, [addProperty, isPropertySelected, property, removeProperty, queryBuilder, setCurrentPropertyList, setQuery]);\n\n return (\n <div className=\"gmw-property-selection-checkbox\">\n {property.value.valueFormat === PropertyValueFormat.Primitive && property.value.value !== undefined && (\n <Checkbox checked={isPropertySelected} onChange={onPropertySelectionChanged} disabled={isUpdating} isLoading={isCheckboxLoading} />\n )}\n </div>\n );\n};\n"]}
@@ -22,5 +22,5 @@ export interface PropertyMenuProps {
22
22
  * Component to display the properties of a group.
23
23
  * @public
24
24
  */
25
- export declare const PropertyMenu: ({ mapping, group, onClickAddGroupProperty, onClickModifyGroupProperty, onClickAddCalculatedProperty, onClickModifyCalculatedProperty, onClickAddCustomCalculationProperty, onClickModifyCustomCalculation, hideGroupProps, hideCalculatedProps, hideCustomCalculationProps, }: PropertyMenuProps) => JSX.Element;
25
+ export declare const PropertyMenu: ({ mapping, group, onClickAddGroupProperty, onClickModifyGroupProperty, hideGroupProps }: PropertyMenuProps) => JSX.Element;
26
26
  //# sourceMappingURL=PropertyMenu.d.ts.map
@@ -25,15 +25,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.PropertyMenu = void 0;
27
27
  /*---------------------------------------------------------------------------------------------
28
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
29
- * See LICENSE.md in the project root for license terms and full copyright notice.
30
- *--------------------------------------------------------------------------------------------*/
28
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
29
+ * See LICENSE.md in the project root for license terms and full copyright notice.
30
+ *--------------------------------------------------------------------------------------------*/
31
31
  const react_1 = __importStar(require("react"));
32
32
  require("./PropertyMenu.scss");
33
33
  const GroupPropertyTable_1 = require("./GroupProperties/GroupPropertyTable");
34
34
  const GroupingApiConfigContext_1 = require("../context/GroupingApiConfigContext");
35
- const CalculatedPropertyTable_1 = require("./CalculatedProperties/CalculatedPropertyTable");
36
- const CustomCalculationTable_1 = require("./CustomCalculations/CustomCalculationTable");
37
35
  const usePropertiesQuery_1 = require("./hooks/usePropertiesQuery");
38
36
  const react_query_1 = require("@tanstack/react-query");
39
37
  const PropertiesClientContext_1 = require("../context/PropertiesClientContext");
@@ -41,7 +39,7 @@ const PropertiesClientContext_1 = require("../context/PropertiesClientContext");
41
39
  * Component to display the properties of a group.
42
40
  * @public
43
41
  */
44
- const PropertyMenu = ({ mapping, group, onClickAddGroupProperty, onClickModifyGroupProperty, onClickAddCalculatedProperty, onClickModifyCalculatedProperty, onClickAddCustomCalculationProperty, onClickModifyCustomCalculation, hideGroupProps = false, hideCalculatedProps = false, hideCustomCalculationProps = false, }) => {
42
+ const PropertyMenu = ({ mapping, group, onClickAddGroupProperty, onClickModifyGroupProperty, hideGroupProps = false }) => {
45
43
  const groupId = group.id;
46
44
  const mappingId = mapping.id;
47
45
  const { getAccessToken, iModelId } = (0, GroupingApiConfigContext_1.useGroupingMappingApiConfig)();
@@ -49,10 +47,7 @@ const PropertyMenu = ({ mapping, group, onClickAddGroupProperty, onClickModifyGr
49
47
  const queryClient = (0, react_query_1.useQueryClient)();
50
48
  const { data: groupProperties, isFetching: isLoadingGroupProperties } = (0, usePropertiesQuery_1.usePropertiesQuery)(iModelId, mappingId, groupId, getAccessToken, propertiesClient);
51
49
  const refreshGroupProperties = (0, react_1.useCallback)(async () => queryClient.invalidateQueries({ queryKey: ["properties", iModelId, mappingId, group.id] }), [group.id, iModelId, mappingId, queryClient]);
52
- return (react_1.default.createElement("div", { className: 'gmw-property-menu-wrapper' },
53
- !hideGroupProps && (react_1.default.createElement(GroupPropertyTable_1.GroupPropertyTable, { iModelId: iModelId, mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddGroupProperty, onClickModify: onClickModifyGroupProperty, isLoading: isLoadingGroupProperties, groupProperties: groupProperties ? groupProperties.properties : [], refresh: refreshGroupProperties })),
54
- !hideCalculatedProps && (react_1.default.createElement(CalculatedPropertyTable_1.CalculatedPropertyTable, { mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddCalculatedProperty, onClickModify: onClickModifyCalculatedProperty, isLoading: isLoadingGroupProperties, calculatedProperties: groupProperties ? groupProperties.properties : [], refresh: refreshGroupProperties })),
55
- !hideCustomCalculationProps && (react_1.default.createElement(CustomCalculationTable_1.CustomCalculationTable, { mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddCustomCalculationProperty, onClickModify: onClickModifyCustomCalculation, isLoading: isLoadingGroupProperties, customCalculations: groupProperties ? groupProperties.properties : [], refresh: refreshGroupProperties }))));
50
+ return (react_1.default.createElement("div", { className: "gmw-property-menu-wrapper" }, !hideGroupProps && (react_1.default.createElement(GroupPropertyTable_1.GroupPropertyTable, { iModelId: iModelId, mappingId: mappingId, groupId: groupId, onClickAdd: onClickAddGroupProperty, onClickModify: onClickModifyGroupProperty, isLoading: isLoadingGroupProperties, groupProperties: groupProperties ? groupProperties.properties : [], refresh: refreshGroupProperties }))));
56
51
  };
57
52
  exports.PropertyMenu = PropertyMenu;
58
53
  //# sourceMappingURL=PropertyMenu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyMenu.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyMenu.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,+CAA2C;AAC3C,+BAA6B;AAC7B,6EAA0E;AAC1E,kFAAkF;AAElF,4FAAyF;AACzF,wFAAqF;AACrF,mEAAgE;AAChE,uDAAuD;AACvD,gFAAyE;AAoBzE;;;GAGG;AACI,MAAM,YAAY,GAAG,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,EAC/B,mCAAmC,EACnC,8BAA8B,EAC9B,cAAc,GAAG,KAAK,EACtB,mBAAmB,GAAG,KAAK,EAC3B,0BAA0B,GAAG,KAAK,GAChB,EAAE,EAAE;IACtB,MAAM,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC;IACzB,MAAM,SAAS,GAAG,OAAO,CAAC,EAAE,CAAC;IAC7B,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,IAAA,sDAA2B,GAAE,CAAC;IACnE,MAAM,gBAAgB,GAAG,IAAA,6CAAmB,GAAE,CAAC;IAC/C,MAAM,WAAW,GAAG,IAAA,4BAAc,GAAE,CAAC;IAErC,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,wBAAwB,EAAE,GAAG,IAAA,uCAAkB,EAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,gBAAgB,CAAC,CAAC;IAE3J,MAAM,sBAAsB,GAAG,IAAA,mBAAW,EAAC,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;IAEjM,OAAO,CACL,uCAAK,SAAS,EAAC,2BAA2B;QACvC,CAAC,cAAc,IAAI,CAClB,8BAAC,uCAAkB,IACjB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,uBAAuB,EACnC,aAAa,EAAE,0BAA0B,EACzC,SAAS,EAAE,wBAAwB,EACnC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAClE,OAAO,EAAE,sBAAsB,GAC/B,CACH;QACA,CAAC,mBAAmB,IAAI,CACvB,8BAAC,iDAAuB,IACtB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,4BAA4B,EACxC,aAAa,EAAE,+BAA+B,EAC9C,SAAS,EAAE,wBAAwB,EACnC,oBAAoB,EAAE,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EACvE,OAAO,EAAE,sBAAsB,GAC/B,CACH;QACA,CAAC,0BAA0B,IAAI,CAC9B,8BAAC,+CAAsB,IACrB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,mCAAmC,EAC/C,aAAa,EAAE,8BAA8B,EAC7C,SAAS,EAAE,wBAAwB,EACnC,kBAAkB,EAAE,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EACrE,OAAO,EAAE,sBAAsB,GAC/B,CACH,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AA7DW,QAAA,YAAY,gBA6DvB","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 } from \"react\";\nimport \"./PropertyMenu.scss\";\nimport { GroupPropertyTable } from \"./GroupProperties/GroupPropertyTable\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport type { GroupMinimal, Mapping, Property } from \"@itwin/insights-client\";\nimport { CalculatedPropertyTable } from \"./CalculatedProperties/CalculatedPropertyTable\";\nimport { CustomCalculationTable } from \"./CustomCalculations/CustomCalculationTable\";\nimport { usePropertiesQuery } from \"./hooks/usePropertiesQuery\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { usePropertiesClient } from \"../context/PropertiesClientContext\";\n\n/**\n * Props for the {@link PropertyMenu} component.\n * @public\n */\nexport interface PropertyMenuProps {\n mapping: Mapping;\n group: GroupMinimal;\n onClickAddGroupProperty?: () => void;\n onClickModifyGroupProperty?: (groupProperty: Property) => void;\n onClickAddCalculatedProperty?: () => void;\n onClickModifyCalculatedProperty?: (calculatedProperty: Property) => void;\n onClickAddCustomCalculationProperty?: () => void;\n onClickModifyCustomCalculation?: (customCalculation: Property) => void;\n hideGroupProps?: boolean;\n hideCalculatedProps?: boolean;\n hideCustomCalculationProps?: boolean;\n}\n\n/**\n * Component to display the properties of a group.\n * @public\n */\nexport const PropertyMenu = ({\n mapping,\n group,\n onClickAddGroupProperty,\n onClickModifyGroupProperty,\n onClickAddCalculatedProperty,\n onClickModifyCalculatedProperty,\n onClickAddCustomCalculationProperty,\n onClickModifyCustomCalculation,\n hideGroupProps = false,\n hideCalculatedProps = false,\n hideCustomCalculationProps = false,\n}: PropertyMenuProps) => {\n const groupId = group.id;\n const mappingId = mapping.id;\n const { getAccessToken, iModelId } = useGroupingMappingApiConfig();\n const propertiesClient = usePropertiesClient();\n const queryClient = useQueryClient();\n\n const { data: groupProperties, isFetching: isLoadingGroupProperties } = usePropertiesQuery(iModelId, mappingId, groupId, getAccessToken, propertiesClient);\n\n const refreshGroupProperties = useCallback(async () => queryClient.invalidateQueries({ queryKey: [\"properties\", iModelId, mappingId, group.id] }), [group.id, iModelId, mappingId, queryClient]);\n\n return (\n <div className='gmw-property-menu-wrapper'>\n {!hideGroupProps && (\n <GroupPropertyTable\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n onClickAdd={onClickAddGroupProperty}\n onClickModify={onClickModifyGroupProperty}\n isLoading={isLoadingGroupProperties}\n groupProperties={groupProperties ? groupProperties.properties : []}\n refresh={refreshGroupProperties}\n />\n )}\n {!hideCalculatedProps && (\n <CalculatedPropertyTable\n mappingId={mappingId}\n groupId={groupId}\n onClickAdd={onClickAddCalculatedProperty}\n onClickModify={onClickModifyCalculatedProperty}\n isLoading={isLoadingGroupProperties}\n calculatedProperties={groupProperties ? groupProperties.properties : []}\n refresh={refreshGroupProperties}\n />\n )}\n {!hideCustomCalculationProps && (\n <CustomCalculationTable\n mappingId={mappingId}\n groupId={groupId}\n onClickAdd={onClickAddCustomCalculationProperty}\n onClickModify={onClickModifyCustomCalculation}\n isLoading={isLoadingGroupProperties}\n customCalculations={groupProperties ? groupProperties.properties : []}\n refresh={refreshGroupProperties}\n />\n )}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"PropertyMenu.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyMenu.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG,+CAA2C;AAC3C,+BAA6B;AAC7B,6EAA0E;AAC1E,kFAAkF;AAElF,mEAAgE;AAChE,uDAAuD;AACvD,gFAAyE;AAoBzE;;;GAGG;AACI,MAAM,YAAY,GAAG,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,cAAc,GAAG,KAAK,EACJ,EAAE,EAAE;IACtB,MAAM,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC;IACzB,MAAM,SAAS,GAAG,OAAO,CAAC,EAAE,CAAC;IAC7B,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,IAAA,sDAA2B,GAAE,CAAC;IACnE,MAAM,gBAAgB,GAAG,IAAA,6CAAmB,GAAE,CAAC;IAC/C,MAAM,WAAW,GAAG,IAAA,4BAAc,GAAE,CAAC;IAErC,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,wBAAwB,EAAE,GAAG,IAAA,uCAAkB,EAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,gBAAgB,CAAC,CAAC;IAE3J,MAAM,sBAAsB,GAAG,IAAA,mBAAW,EACxC,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EACtG,CAAC,KAAK,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAC7C,CAAC;IAEF,OAAO,CACL,uCAAK,SAAS,EAAC,2BAA2B,IACvC,CAAC,cAAc,IAAI,CAClB,8BAAC,uCAAkB,IACjB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,uBAAuB,EACnC,aAAa,EAAE,0BAA0B,EACzC,SAAS,EAAE,wBAAwB,EACnC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAClE,OAAO,EAAE,sBAAsB,GAC/B,CACH,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AApCW,QAAA,YAAY,gBAoCvB","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 } from \"react\";\nimport \"./PropertyMenu.scss\";\nimport { GroupPropertyTable } from \"./GroupProperties/GroupPropertyTable\";\nimport { useGroupingMappingApiConfig } from \"../context/GroupingApiConfigContext\";\nimport type { GroupMinimal, Mapping, Property } from \"@itwin/insights-client\";\nimport { usePropertiesQuery } from \"./hooks/usePropertiesQuery\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { usePropertiesClient } from \"../context/PropertiesClientContext\";\n\n/**\n * Props for the {@link PropertyMenu} component.\n * @public\n */\nexport interface PropertyMenuProps {\n mapping: Mapping;\n group: GroupMinimal;\n onClickAddGroupProperty?: () => void;\n onClickModifyGroupProperty?: (groupProperty: Property) => void;\n onClickAddCalculatedProperty?: () => void;\n onClickModifyCalculatedProperty?: (calculatedProperty: Property) => void;\n onClickAddCustomCalculationProperty?: () => void;\n onClickModifyCustomCalculation?: (customCalculation: Property) => void;\n hideGroupProps?: boolean;\n hideCalculatedProps?: boolean;\n hideCustomCalculationProps?: boolean;\n}\n\n/**\n * Component to display the properties of a group.\n * @public\n */\nexport const PropertyMenu = ({\n mapping,\n group,\n onClickAddGroupProperty,\n onClickModifyGroupProperty,\n hideGroupProps = false\n}: PropertyMenuProps) => {\n const groupId = group.id;\n const mappingId = mapping.id;\n const { getAccessToken, iModelId } = useGroupingMappingApiConfig();\n const propertiesClient = usePropertiesClient();\n const queryClient = useQueryClient();\n\n const { data: groupProperties, isFetching: isLoadingGroupProperties } = usePropertiesQuery(iModelId, mappingId, groupId, getAccessToken, propertiesClient);\n\n const refreshGroupProperties = useCallback(\n async () => queryClient.invalidateQueries({ queryKey: [\"properties\", iModelId, mappingId, group.id] }),\n [group.id, iModelId, mappingId, queryClient],\n );\n\n return (\n <div className=\"gmw-property-menu-wrapper\">\n {!hideGroupProps && (\n <GroupPropertyTable\n iModelId={iModelId}\n mappingId={mappingId}\n groupId={groupId}\n onClickAdd={onClickAddGroupProperty}\n onClickModify={onClickModifyGroupProperty}\n isLoading={isLoadingGroupProperties}\n groupProperties={groupProperties ? groupProperties.properties : []}\n refresh={refreshGroupProperties}\n />\n )}\n </div>\n );\n};\n"]}
@@ -25,9 +25,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.PropertyMenuWithVisualization = void 0;
27
27
  /*---------------------------------------------------------------------------------------------
28
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
29
- * See LICENSE.md in the project root for license terms and full copyright notice.
30
- *--------------------------------------------------------------------------------------------*/
28
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
29
+ * See LICENSE.md in the project root for license terms and full copyright notice.
30
+ *--------------------------------------------------------------------------------------------*/
31
31
  const react_1 = __importStar(require("react"));
32
32
  const PropertyMenu_1 = require("./PropertyMenu");
33
33
  const GroupColorToggle_1 = require("./GroupColorToggle");
@@ -41,10 +41,10 @@ require("./PropertyMenuWithVisualization.scss");
41
41
  */
42
42
  const PropertyMenuWithVisualization = ({ group, color, ...rest }) => {
43
43
  const [isInformationPanelOpen, setIsInformationPanelOpen] = (0, react_1.useState)(false);
44
- return (react_1.default.createElement(itwinui_react_1.InformationPanelWrapper, { className: 'gmw-property-menu-vis-wrapper' },
44
+ return (react_1.default.createElement(itwinui_react_1.InformationPanelWrapper, { className: "gmw-property-menu-vis-wrapper" },
45
45
  react_1.default.createElement("div", { className: "gmw-property-menu-vis-toolbar" },
46
46
  react_1.default.createElement(GroupColorToggle_1.GroupColorToggle, { group: group, color: color, labelPosition: "left" }),
47
- react_1.default.createElement(itwinui_react_1.IconButton, { styleType: 'borderless', onClick: () => setIsInformationPanelOpen(true), title: 'Group Information' },
47
+ react_1.default.createElement(itwinui_react_1.IconButton, { styleType: "borderless", onClick: () => setIsInformationPanelOpen(true), title: "Group Information" },
48
48
  react_1.default.createElement(itwinui_icons_react_1.SvgProperties, null))),
49
49
  react_1.default.createElement(PropertyMenu_1.PropertyMenu, { group: group, ...rest }),
50
50
  react_1.default.createElement(GroupInformationPanel_1.GroupInformationPanel, { isOpen: isInformationPanelOpen, onClose: () => setIsInformationPanelOpen(false), query: group.query, groupName: group.groupName })));
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyMenuWithVisualization.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyMenuWithVisualization.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,+CAAwC;AAExC,iDAA8C;AAC9C,yDAAsD;AACtD,wDAA2E;AAC3E,mEAAgE;AAChE,oEAA2D;AAC3D,gDAA8C;AAU9C;;;GAGG;AACI,MAAM,6BAA6B,GAAG,CAAC,EAC5C,KAAK,EACL,KAAK,EACL,GAAG,IAAI,EAC4B,EAAE,EAAE;IACvC,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IAErF,OAAO,CACL,8BAAC,uCAAuB,IAAC,SAAS,EAAC,+BAA+B;QAChE,uCAAK,SAAS,EAAC,+BAA+B;YAC5C,8BAAC,mCAAgB,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAC,MAAM,GAAG;YACrE,8BAAC,0BAAU,IACT,SAAS,EAAC,YAAY,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,EAC9C,KAAK,EAAC,mBAAmB;gBAEzB,8BAAC,mCAAa,OAAG,CACN,CACT;QACN,8BAAC,2BAAY,IAAC,KAAK,EAAE,KAAK,KAAM,IAAI,GAAI;QACxC,8BAAC,6CAAqB,IACpB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,KAAK,CAAC,EAC/C,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,SAAS,EAAE,KAAK,CAAC,SAAS,GAC1B,CACsB,CAC3B,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,6BAA6B,iCA4BxC","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, { useState } from \"react\";\nimport type { PropertyMenuProps } from \"./PropertyMenu\";\nimport { PropertyMenu } from \"./PropertyMenu\";\nimport { GroupColorToggle } from \"./GroupColorToggle\";\nimport { IconButton, InformationPanelWrapper } from \"@itwin/itwinui-react\";\nimport { GroupInformationPanel } from \"./GroupInformationPanel\";\nimport { SvgProperties } from \"@itwin/itwinui-icons-react\";\nimport \"./PropertyMenuWithVisualization.scss\";\n\n/**\n * Properties for the {@link PropertyMenuWithVisualization} component.\n * @public\n */\nexport interface PropertyMenuWithVisualizationProps extends PropertyMenuProps {\n color: string;\n}\n\n/**\n * Component to display a property menu with visualization.\n * @public\n */\nexport const PropertyMenuWithVisualization = ({\n group,\n color,\n ...rest\n}: PropertyMenuWithVisualizationProps) => {\n const [isInformationPanelOpen, setIsInformationPanelOpen] = useState<boolean>(false);\n\n return (\n <InformationPanelWrapper className='gmw-property-menu-vis-wrapper'>\n <div className=\"gmw-property-menu-vis-toolbar\">\n <GroupColorToggle group={group} color={color} labelPosition=\"left\" />\n <IconButton\n styleType='borderless'\n onClick={() => setIsInformationPanelOpen(true)}\n title='Group Information'\n >\n <SvgProperties />\n </IconButton>\n </div>\n <PropertyMenu group={group} {...rest} />\n <GroupInformationPanel\n isOpen={isInformationPanelOpen}\n onClose={() => setIsInformationPanelOpen(false)}\n query={group.query}\n groupName={group.groupName}\n />\n </InformationPanelWrapper>\n );\n};\n"]}
1
+ {"version":3,"file":"PropertyMenuWithVisualization.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyMenuWithVisualization.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG,+CAAwC;AAExC,iDAA8C;AAC9C,yDAAsD;AACtD,wDAA2E;AAC3E,mEAAgE;AAChE,oEAA2D;AAC3D,gDAA8C;AAU9C;;;GAGG;AACI,MAAM,6BAA6B,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,EAAsC,EAAE,EAAE;IAC7G,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IAErF,OAAO,CACL,8BAAC,uCAAuB,IAAC,SAAS,EAAC,+BAA+B;QAChE,uCAAK,SAAS,EAAC,+BAA+B;YAC5C,8BAAC,mCAAgB,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAC,MAAM,GAAG;YACrE,8BAAC,0BAAU,IAAC,SAAS,EAAC,YAAY,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAC,mBAAmB;gBAC1G,8BAAC,mCAAa,OAAG,CACN,CACT;QACN,8BAAC,2BAAY,IAAC,KAAK,EAAE,KAAK,KAAM,IAAI,GAAI;QACxC,8BAAC,6CAAqB,IAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,CAClI,CAC3B,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,6BAA6B,iCAexC","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, { useState } from \"react\";\nimport type { PropertyMenuProps } from \"./PropertyMenu\";\nimport { PropertyMenu } from \"./PropertyMenu\";\nimport { GroupColorToggle } from \"./GroupColorToggle\";\nimport { IconButton, InformationPanelWrapper } from \"@itwin/itwinui-react\";\nimport { GroupInformationPanel } from \"./GroupInformationPanel\";\nimport { SvgProperties } from \"@itwin/itwinui-icons-react\";\nimport \"./PropertyMenuWithVisualization.scss\";\n\n/**\n * Properties for the {@link PropertyMenuWithVisualization} component.\n * @public\n */\nexport interface PropertyMenuWithVisualizationProps extends PropertyMenuProps {\n color: string;\n}\n\n/**\n * Component to display a property menu with visualization.\n * @public\n */\nexport const PropertyMenuWithVisualization = ({ group, color, ...rest }: PropertyMenuWithVisualizationProps) => {\n const [isInformationPanelOpen, setIsInformationPanelOpen] = useState<boolean>(false);\n\n return (\n <InformationPanelWrapper className=\"gmw-property-menu-vis-wrapper\">\n <div className=\"gmw-property-menu-vis-toolbar\">\n <GroupColorToggle group={group} color={color} labelPosition=\"left\" />\n <IconButton styleType=\"borderless\" onClick={() => setIsInformationPanelOpen(true)} title=\"Group Information\">\n <SvgProperties />\n </IconButton>\n </div>\n <PropertyMenu group={group} {...rest} />\n <GroupInformationPanel isOpen={isInformationPanelOpen} onClose={() => setIsInformationPanelOpen(false)} query={group.query} groupName={group.groupName} />\n </InformationPanelWrapper>\n );\n};\n"]}
@@ -7,5 +7,5 @@ export interface PropertyNameCellProps<T extends {
7
7
  }
8
8
  export declare const PropertyNameCell: <T extends {
9
9
  propertyName: string;
10
- }>({ property, onClickModify, }: PropertyNameCellProps<T>) => JSX.Element;
10
+ }>({ property, onClickModify }: PropertyNameCellProps<T>) => JSX.Element;
11
11
  //# sourceMappingURL=PropertyNameCell.d.ts.map
@@ -5,11 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PropertyNameCell = void 0;
7
7
  /*---------------------------------------------------------------------------------------------
8
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
9
- * See LICENSE.md in the project root for license terms and full copyright notice.
10
- *--------------------------------------------------------------------------------------------*/
8
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
9
+ * See LICENSE.md in the project root for license terms and full copyright notice.
10
+ *--------------------------------------------------------------------------------------------*/
11
11
  const react_1 = __importDefault(require("react"));
12
12
  const itwinui_react_1 = require("@itwin/itwinui-react");
13
- const PropertyNameCell = ({ property, onClickModify, }) => onClickModify ? (react_1.default.createElement("div", { className: "iui-anchor", onClick: () => onClickModify(property) }, property.propertyName)) : (react_1.default.createElement(itwinui_react_1.Text, null, property.propertyName));
13
+ const PropertyNameCell = ({ property, onClickModify }) => onClickModify ? (react_1.default.createElement("div", { className: "iui-anchor", onClick: () => onClickModify(property) }, property.propertyName)) : (react_1.default.createElement(itwinui_react_1.Text, null, property.propertyName));
14
14
  exports.PropertyNameCell = PropertyNameCell;
15
15
  //# sourceMappingURL=PropertyNameCell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyNameCell.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyNameCell.tsx"],"names":[],"mappings":";;;;;;AAAA;;;+FAG+F;AAC/F,kDAA0B;AAC1B,wDAA4C;AAOrC,MAAM,gBAAgB,GAAG,CAAsC,EACpE,QAAQ,EACR,aAAa,GACY,EAAE,EAAE,CAC7B,aAAa,CAAC,CAAC,CAAC,CACd,uCAAK,SAAS,EAAC,YAAY,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,IAC/D,QAAQ,CAAC,YAAY,CAClB,CACP,CAAC,CAAC,CAAC,CACF,8BAAC,oBAAI,QAAE,QAAQ,CAAC,YAAY,CAAQ,CACrC,CAAC;AAVS,QAAA,gBAAgB,oBAUzB","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 { Text } from \"@itwin/itwinui-react\";\n\nexport interface PropertyNameCellProps<T extends { propertyName: string }> {\n property: T;\n onClickModify?: (value: T) => void;\n}\n\nexport const PropertyNameCell = <T extends { propertyName: string },>({\n property,\n onClickModify,\n}: PropertyNameCellProps<T>) =>\n onClickModify ? (\n <div className=\"iui-anchor\" onClick={() => onClickModify(property)}>\n {property.propertyName}\n </div>\n ) : (\n <Text>{property.propertyName}</Text>\n );\n"]}
1
+ {"version":3,"file":"PropertyNameCell.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyNameCell.tsx"],"names":[],"mappings":";;;;;;AAAA;;;gGAGgG;AAChG,kDAA0B;AAC1B,wDAA4C;AAOrC,MAAM,gBAAgB,GAAG,CAAqC,EAAE,QAAQ,EAAE,aAAa,EAA4B,EAAE,EAAE,CAC5H,aAAa,CAAC,CAAC,CAAC,CACd,uCAAK,SAAS,EAAC,YAAY,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,IAC/D,QAAQ,CAAC,YAAY,CAClB,CACP,CAAC,CAAC,CAAC,CACF,8BAAC,oBAAI,QAAE,QAAQ,CAAC,YAAY,CAAQ,CACrC,CAAC;AAPS,QAAA,gBAAgB,oBAOzB","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 { Text } from \"@itwin/itwinui-react\";\n\nexport interface PropertyNameCellProps<T extends { propertyName: string }> {\n property: T;\n onClickModify?: (value: T) => void;\n}\n\nexport const PropertyNameCell = <T extends { propertyName: string }>({ property, onClickModify }: PropertyNameCellProps<T>) =>\n onClickModify ? (\n <div className=\"iui-anchor\" onClick={() => onClickModify(property)}>\n {property.propertyName}\n </div>\n ) : (\n <Text>{property.propertyName}</Text>\n );\n"]}
@@ -28,9 +28,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.PropertyTable = void 0;
30
30
  /*---------------------------------------------------------------------------------------------
31
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
32
- * See LICENSE.md in the project root for license terms and full copyright notice.
33
- *--------------------------------------------------------------------------------------------*/
31
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
32
+ * See LICENSE.md in the project root for license terms and full copyright notice.
33
+ *--------------------------------------------------------------------------------------------*/
34
34
  const itwinui_react_1 = require("@itwin/itwinui-react");
35
35
  const react_1 = __importStar(require("react"));
36
36
  const DeleteModal_1 = __importDefault(require("../SharedComponents/DeleteModal"));
@@ -50,9 +50,8 @@ const PropertyTable = ({ propertyType, columnsFactory, data, isLoading, onClickA
50
50
  const memoizedColumns = (0, react_1.useMemo)(() => columnsFactory(handleShowDeleteModal), [columnsFactory, handleShowDeleteModal]);
51
51
  return (react_1.default.createElement("div", { className: "gmw-property-table-container" },
52
52
  react_1.default.createElement(PropertyTableToolbar_1.PropertyTableToolbar, { propertyType: propertyType, onClickAddProperty: onClickAdd, refreshProperties: refreshProperties, isLoading: isLoading }),
53
- react_1.default.createElement(itwinui_react_1.Table, { data: isLoading ? [] : data, density: 'extra-condensed', columns: memoizedColumns, emptyTableContent: `No ${propertyType} Properties`, isSortable: true, isLoading: isLoading }),
54
- showDeleteModal &&
55
- react_1.default.createElement(DeleteModal_1.default, { entityName: showDeleteModal.propertyName, onClose: handleCloseDeleteModal, onDelete: handleDeleteProperty })));
53
+ react_1.default.createElement(itwinui_react_1.Table, { data: isLoading ? [] : data, density: "extra-condensed", columns: memoizedColumns, emptyTableContent: `No ${propertyType} Properties`, isSortable: true, isLoading: isLoading }),
54
+ showDeleteModal && react_1.default.createElement(DeleteModal_1.default, { entityName: showDeleteModal.propertyName, onClose: handleCloseDeleteModal, onDelete: handleDeleteProperty })));
56
55
  };
57
56
  exports.PropertyTable = PropertyTable;
58
57
  //# sourceMappingURL=PropertyTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyTable.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyTable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,wDAA6C;AAC7C,+CAA8D;AAG9D,kFAA0D;AAC1D,iEAA8D;AAC9D,gCAA8B;AAiBvB,MAAM,aAAa,GAAG,CAA8B,EACzD,YAAY,EACZ,cAAc,EACd,IAAI,EACJ,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,cAAc,GACQ,EAAE,EAAE;IAE1B,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EAAgB,SAAS,CAAC,CAAC;IAEjF,MAAM,oBAAoB,GAAG,IAAA,mBAAW,EAAC,KAAK,IAAI,EAAE;QAClD,MAAM,cAAc,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAClD,CAAC,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC;IAE1C,MAAM,qBAAqB,GAAG,IAAA,mBAAW,EAAC,CAAC,QAAW,EAAE,EAAE;QACxD,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,sBAAsB,GAAG,GAAG,EAAE;QAClC,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CACnC,cAAc,CAAC,qBAAqB,CAAC,EAAE,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAElF,OAAO,CACL,uCAAK,SAAS,EAAC,8BAA8B;QAC3C,8BAAC,2CAAoB,IACnB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,UAAU,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,SAAS,GACpB;QACF,8BAAC,qBAAK,IACJ,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAC3B,OAAO,EAAC,iBAAiB,EACzB,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,MAAM,YAAY,aAAa,EAClD,UAAU,QACV,SAAS,EAAE,SAAS,GACpB;QACD,eAAe;YACd,8BAAC,qBAAW,IACV,UAAU,EAAE,eAAe,CAAC,YAAY,EACxC,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,oBAAoB,GAC9B,CACA,CACP,CAAC;AACJ,CAAC,CAAC;AAnDW,QAAA,aAAa,iBAmDxB","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 { Table } from \"@itwin/itwinui-react\";\nimport React, { useCallback, useMemo, useState } from \"react\";\nimport type { Column } from \"react-table\";\nimport type { CreateTypeFromInterface } from \"../../common/utils\";\nimport DeleteModal from \"../SharedComponents/DeleteModal\";\nimport { PropertyTableToolbar } from \"./PropertyTableToolbar\";\nimport \"./PropertyTable.scss\";\n\nexport interface PropertyTableItem {\n propertyName: string;\n id: string;\n}\n\nexport interface PropertyTableProps<T extends PropertyTableItem> {\n propertyType: string;\n columnsFactory: (handleShowDeleteModal: (value: T) => void) => Array<Column<T>>;\n data: T[];\n isLoading: boolean;\n onClickAdd?: () => void;\n refreshProperties: () => Promise<void>;\n deleteProperty: (propertyId: string) => Promise<void>;\n}\n\nexport const PropertyTable = <T extends PropertyTableItem>({\n propertyType,\n columnsFactory,\n data,\n isLoading,\n onClickAdd,\n refreshProperties,\n deleteProperty,\n}: PropertyTableProps<T>) => {\n\n const [showDeleteModal, setShowDeleteModal] = useState<T | undefined>(undefined);\n\n const handleDeleteProperty = useCallback(async () => {\n await deleteProperty(showDeleteModal?.id ?? \"\");\n }, [deleteProperty, showDeleteModal?.id]);\n\n const handleShowDeleteModal = useCallback((property: T) => {\n setShowDeleteModal(property);\n }, []);\n\n const handleCloseDeleteModal = () => {\n setShowDeleteModal(undefined);\n };\n\n const memoizedColumns = useMemo(() =>\n columnsFactory(handleShowDeleteModal), [columnsFactory, handleShowDeleteModal]);\n\n return (\n <div className=\"gmw-property-table-container\">\n <PropertyTableToolbar\n propertyType={propertyType}\n onClickAddProperty={onClickAdd}\n refreshProperties={refreshProperties}\n isLoading={isLoading}\n />\n <Table<CreateTypeFromInterface<T>>\n data={isLoading ? [] : data}\n density='extra-condensed'\n columns={memoizedColumns}\n emptyTableContent={`No ${propertyType} Properties`}\n isSortable\n isLoading={isLoading}\n />\n {showDeleteModal &&\n <DeleteModal\n entityName={showDeleteModal.propertyName}\n onClose={handleCloseDeleteModal}\n onDelete={handleDeleteProperty}\n />}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"PropertyTable.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyTable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG,wDAA6C;AAC7C,+CAA8D;AAG9D,kFAA0D;AAC1D,iEAA8D;AAC9D,gCAA8B;AAiBvB,MAAM,aAAa,GAAG,CAA8B,EACzD,YAAY,EACZ,cAAc,EACd,IAAI,EACJ,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,cAAc,GACQ,EAAE,EAAE;IAC1B,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EAAgB,SAAS,CAAC,CAAC;IAEjF,MAAM,oBAAoB,GAAG,IAAA,mBAAW,EAAC,KAAK,IAAI,EAAE;QAClD,MAAM,cAAc,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAClD,CAAC,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC;IAE1C,MAAM,qBAAqB,GAAG,IAAA,mBAAW,EAAC,CAAC,QAAW,EAAE,EAAE;QACxD,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,sBAAsB,GAAG,GAAG,EAAE;QAClC,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC,EAAE,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAEtH,OAAO,CACL,uCAAK,SAAS,EAAC,8BAA8B;QAC3C,8BAAC,2CAAoB,IAAC,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,GAAI;QAChJ,8BAAC,qBAAK,IACJ,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAC3B,OAAO,EAAC,iBAAiB,EACzB,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,MAAM,YAAY,aAAa,EAClD,UAAU,QACV,SAAS,EAAE,SAAS,GACpB;QACD,eAAe,IAAI,8BAAC,qBAAW,IAAC,UAAU,EAAE,eAAe,CAAC,YAAY,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,oBAAoB,GAAI,CAC1I,CACP,CAAC;AACJ,CAAC,CAAC;AAvCW,QAAA,aAAa,iBAuCxB","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 { Table } from \"@itwin/itwinui-react\";\nimport React, { useCallback, useMemo, useState } from \"react\";\nimport type { Column } from \"react-table\";\nimport type { CreateTypeFromInterface } from \"../../common/utils\";\nimport DeleteModal from \"../SharedComponents/DeleteModal\";\nimport { PropertyTableToolbar } from \"./PropertyTableToolbar\";\nimport \"./PropertyTable.scss\";\n\nexport interface PropertyTableItem {\n propertyName: string;\n id: string;\n}\n\nexport interface PropertyTableProps<T extends PropertyTableItem> {\n propertyType: string;\n columnsFactory: (handleShowDeleteModal: (value: T) => void) => Array<Column<T>>;\n data: T[];\n isLoading: boolean;\n onClickAdd?: () => void;\n refreshProperties: () => Promise<void>;\n deleteProperty: (propertyId: string) => Promise<void>;\n}\n\nexport const PropertyTable = <T extends PropertyTableItem>({\n propertyType,\n columnsFactory,\n data,\n isLoading,\n onClickAdd,\n refreshProperties,\n deleteProperty,\n}: PropertyTableProps<T>) => {\n const [showDeleteModal, setShowDeleteModal] = useState<T | undefined>(undefined);\n\n const handleDeleteProperty = useCallback(async () => {\n await deleteProperty(showDeleteModal?.id ?? \"\");\n }, [deleteProperty, showDeleteModal?.id]);\n\n const handleShowDeleteModal = useCallback((property: T) => {\n setShowDeleteModal(property);\n }, []);\n\n const handleCloseDeleteModal = () => {\n setShowDeleteModal(undefined);\n };\n\n const memoizedColumns = useMemo(() => columnsFactory(handleShowDeleteModal), [columnsFactory, handleShowDeleteModal]);\n\n return (\n <div className=\"gmw-property-table-container\">\n <PropertyTableToolbar propertyType={propertyType} onClickAddProperty={onClickAdd} refreshProperties={refreshProperties} isLoading={isLoading} />\n <Table<CreateTypeFromInterface<T>>\n data={isLoading ? [] : data}\n density=\"extra-condensed\"\n columns={memoizedColumns}\n emptyTableContent={`No ${propertyType} Properties`}\n isSortable\n isLoading={isLoading}\n />\n {showDeleteModal && <DeleteModal entityName={showDeleteModal.propertyName} onClose={handleCloseDeleteModal} onDelete={handleDeleteProperty} />}\n </div>\n );\n};\n"]}
@@ -6,5 +6,5 @@ export interface PropertyTableToolbarProps {
6
6
  refreshProperties: () => void;
7
7
  isLoading: boolean;
8
8
  }
9
- export declare const PropertyTableToolbar: ({ propertyType, onClickAddProperty, refreshProperties, isLoading, }: PropertyTableToolbarProps) => JSX.Element;
9
+ export declare const PropertyTableToolbar: ({ propertyType, onClickAddProperty, refreshProperties, isLoading }: PropertyTableToolbarProps) => JSX.Element;
10
10
  //# sourceMappingURL=PropertyTableToolbar.d.ts.map
@@ -5,14 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PropertyTableToolbar = void 0;
7
7
  /*---------------------------------------------------------------------------------------------
8
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
9
- * See LICENSE.md in the project root for license terms and full copyright notice.
10
- *--------------------------------------------------------------------------------------------*/
8
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
9
+ * See LICENSE.md in the project root for license terms and full copyright notice.
10
+ *--------------------------------------------------------------------------------------------*/
11
11
  const react_1 = __importDefault(require("react"));
12
12
  const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
13
13
  const itwinui_react_1 = require("@itwin/itwinui-react");
14
14
  require("./PropertyTableToolbar.scss");
15
- const PropertyTableToolbar = ({ propertyType, onClickAddProperty, refreshProperties, isLoading, }) => (react_1.default.createElement("div", { className: "gmw-property-table-toolbar" },
15
+ const PropertyTableToolbar = ({ propertyType, onClickAddProperty, refreshProperties, isLoading }) => (react_1.default.createElement("div", { className: "gmw-property-table-toolbar" },
16
16
  onClickAddProperty && (react_1.default.createElement(itwinui_react_1.Button, { startIcon: react_1.default.createElement(itwinui_icons_react_1.SvgAdd, null), styleType: "high-visibility", onClick: onClickAddProperty },
17
17
  "Add ",
18
18
  propertyType,
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyTableToolbar.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyTableToolbar.tsx"],"names":[],"mappings":";;;;;;AAAA;;;+FAG+F;AAC/F,kDAA0B;AAC1B,oEAAgE;AAChE,wDAA0D;AAC1D,uCAAqC;AAS9B,MAAM,oBAAoB,GAAG,CAAC,EACnC,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,GACiB,EAAE,EAAE,CAAC,CAC/B,uCAAK,SAAS,EAAC,4BAA4B;IACxC,kBAAkB,IAAI,CACrB,8BAAC,sBAAM,IACL,SAAS,EAAE,8BAAC,4BAAM,OAAG,EACrB,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAE,kBAAkB;;QAEtB,YAAY;oBACV,CACV;IACD,8BAAC,0BAAU,IACT,KAAK,EAAC,SAAS,EACf,SAAS,EAAC,mCAAmC,EAC7C,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,SAAS,EACnB,SAAS,EAAC,YAAY;QAEtB,8BAAC,gCAAU,OAAG,CACH,CACT,CACP,CAAC;AA1BW,QAAA,oBAAoB,wBA0B/B","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 { SvgAdd, SvgRefresh } from \"@itwin/itwinui-icons-react\";\nimport { Button, IconButton } from \"@itwin/itwinui-react\";\nimport \"./PropertyTableToolbar.scss\";\n\nexport interface PropertyTableToolbarProps {\n propertyType: string;\n onClickAddProperty?: () => void;\n refreshProperties: () => void;\n isLoading: boolean;\n}\n\nexport const PropertyTableToolbar = ({\n propertyType,\n onClickAddProperty,\n refreshProperties,\n isLoading,\n}: PropertyTableToolbarProps) => (\n <div className=\"gmw-property-table-toolbar\">\n {onClickAddProperty && (\n <Button\n startIcon={<SvgAdd />}\n styleType=\"high-visibility\"\n onClick={onClickAddProperty}\n >\n Add {propertyType} Property\n </Button>\n )}\n <IconButton\n title=\"Refresh\"\n className=\"gmw-property-table-refresh-button\"\n onClick={refreshProperties}\n disabled={isLoading}\n styleType=\"borderless\"\n >\n <SvgRefresh />\n </IconButton>\n </div>\n);\n"]}
1
+ {"version":3,"file":"PropertyTableToolbar.js","sourceRoot":"","sources":["../../../../src/components/Properties/PropertyTableToolbar.tsx"],"names":[],"mappings":";;;;;;AAAA;;;gGAGgG;AAChG,kDAA0B;AAC1B,oEAAgE;AAChE,wDAA0D;AAC1D,uCAAqC;AAS9B,MAAM,oBAAoB,GAAG,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,SAAS,EAA6B,EAAE,EAAE,CAAC,CACrI,uCAAK,SAAS,EAAC,4BAA4B;IACxC,kBAAkB,IAAI,CACrB,8BAAC,sBAAM,IAAC,SAAS,EAAE,8BAAC,4BAAM,OAAG,EAAE,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,kBAAkB;;QAC/E,YAAY;oBACV,CACV;IACD,8BAAC,0BAAU,IAAC,KAAK,EAAC,SAAS,EAAC,SAAS,EAAC,mCAAmC,EAAC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAC,YAAY;QAC/I,8BAAC,gCAAU,OAAG,CACH,CACT,CACP,CAAC;AAXW,QAAA,oBAAoB,wBAW/B","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 { SvgAdd, SvgRefresh } from \"@itwin/itwinui-icons-react\";\nimport { Button, IconButton } from \"@itwin/itwinui-react\";\nimport \"./PropertyTableToolbar.scss\";\n\nexport interface PropertyTableToolbarProps {\n propertyType: string;\n onClickAddProperty?: () => void;\n refreshProperties: () => void;\n isLoading: boolean;\n}\n\nexport const PropertyTableToolbar = ({ propertyType, onClickAddProperty, refreshProperties, isLoading }: PropertyTableToolbarProps) => (\n <div className=\"gmw-property-table-toolbar\">\n {onClickAddProperty && (\n <Button startIcon={<SvgAdd />} styleType=\"high-visibility\" onClick={onClickAddProperty}>\n Add {propertyType} Property\n </Button>\n )}\n <IconButton title=\"Refresh\" className=\"gmw-property-table-refresh-button\" onClick={refreshProperties} disabled={isLoading} styleType=\"borderless\">\n <SvgRefresh />\n </IconButton>\n </div>\n);\n"]}
@@ -0,0 +1,11 @@
1
+ import type { ExpandableBlockProps } from "@itwin/itwinui-react";
2
+ import React from "react";
3
+ interface ScrollableExpandableBlockProps extends ExpandableBlockProps {
4
+ parentRef?: React.RefObject<HTMLDivElement>;
5
+ children: React.ReactNode;
6
+ isExpanded: boolean;
7
+ setIsExpanded: (isExpanded: boolean) => void;
8
+ }
9
+ export declare const ScrollableExpandableBlock: React.ForwardRefExoticComponent<ScrollableExpandableBlockProps & React.RefAttributes<HTMLDivElement>>;
10
+ export {};
11
+ //# sourceMappingURL=ScrollableExpandableBlock.d.ts.map
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.ScrollableExpandableBlock = void 0;
27
+ const itwinui_react_1 = require("@itwin/itwinui-react");
28
+ const react_1 = __importStar(require("react"));
29
+ const useForwardRef_1 = require("./hooks/useForwardRef");
30
+ exports.ScrollableExpandableBlock = (0, react_1.forwardRef)(function ExpandableBlockWithRef(props, forwardRef) {
31
+ const { parentRef, children, isExpanded, setIsExpanded, ...rest } = props;
32
+ const forwardedRef = (0, useForwardRef_1.useForwardRef)(forwardRef);
33
+ const scrollToBlock = (0, react_1.useCallback)(() => {
34
+ setTimeout(() => {
35
+ if (parentRef?.current && forwardedRef.current) {
36
+ parentRef?.current.scrollTo({
37
+ top: forwardedRef.current.offsetTop,
38
+ behavior: "smooth",
39
+ });
40
+ }
41
+ }, 500);
42
+ }, [forwardedRef, parentRef]);
43
+ const handleToggle = (0, react_1.useCallback)((isExpanding) => {
44
+ if (isExpanding === true) {
45
+ setIsExpanded(true);
46
+ scrollToBlock();
47
+ }
48
+ else {
49
+ setIsExpanded(false);
50
+ }
51
+ }, [scrollToBlock, setIsExpanded]);
52
+ return (react_1.default.createElement("div", { ref: forwardedRef },
53
+ react_1.default.createElement(itwinui_react_1.ExpandableBlock, { onToggle: handleToggle, isExpanded: isExpanded, ...rest }, children)));
54
+ });
55
+ //# sourceMappingURL=ScrollableExpandableBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScrollableExpandableBlock.js","sourceRoot":"","sources":["../../../../src/components/Properties/ScrollableExpandableBlock.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wDAAuD;AACvD,+CAAuD;AACvD,yDAAsD;AASzC,QAAA,yBAAyB,GAAG,IAAA,kBAAU,EAAiD,SAAS,sBAAsB,CAAC,KAAK,EAAE,UAAU;IACnJ,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAC,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACzE,MAAM,YAAY,GAAG,IAAA,6BAAa,EAAiB,UAAU,CAAC,CAAC;IAE/D,MAAM,aAAa,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACrC,UAAU,CAAC,GAAG,EAAE;YACd,IAAI,SAAS,EAAE,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE;gBAC9C,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC;oBAC1B,GAAG,EAAE,YAAY,CAAC,OAAO,CAAC,SAAS;oBACnC,QAAQ,EAAE,QAAQ;iBACnB,CAAC,CAAC;aACJ;QACH,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC;IAE9B,MAAM,YAAY,GAAG,IAAA,mBAAW,EAC9B,CAAC,WAAoB,EAAE,EAAE;QACvB,IAAI,WAAW,KAAK,IAAI,EAAE;YACxB,aAAa,CAAC,IAAI,CAAC,CAAC;YACpB,aAAa,EAAE,CAAC;SACjB;aAAK;YACJ,aAAa,CAAC,KAAK,CAAC,CAAC;SACtB;IACH,CAAC,EACD,CAAC,aAAa,EAAE,aAAa,CAAC,CAC/B,CAAC;IAEF,OAAO,CACL,uCAAK,GAAG,EAAE,YAAY;QACpB,8BAAC,+BAAe,IAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,KAAM,IAAI,IACtE,QAAQ,CACO,CACd,CACP,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport type { ExpandableBlockProps } from \"@itwin/itwinui-react\";\nimport { ExpandableBlock } from \"@itwin/itwinui-react\";\nimport React, { forwardRef, useCallback } from \"react\";\nimport { useForwardRef } from \"./hooks/useForwardRef\";\n\ninterface ScrollableExpandableBlockProps extends ExpandableBlockProps {\n parentRef?: React.RefObject<HTMLDivElement>;\n children: React.ReactNode;\n isExpanded: boolean;\n setIsExpanded: (isExpanded: boolean) => void;\n}\n\nexport const ScrollableExpandableBlock = forwardRef<HTMLDivElement, ScrollableExpandableBlockProps>(function ExpandableBlockWithRef(props, forwardRef) {\n const { parentRef, children, isExpanded, setIsExpanded,...rest } = props;\n const forwardedRef = useForwardRef<HTMLDivElement>(forwardRef);\n\n const scrollToBlock = useCallback(() => {\n setTimeout(() => {\n if (parentRef?.current && forwardedRef.current) {\n parentRef?.current.scrollTo({\n top: forwardedRef.current.offsetTop,\n behavior: \"smooth\",\n });\n }\n }, 500);\n }, [forwardedRef, parentRef]);\n\n const handleToggle = useCallback(\n (isExpanding: boolean) => {\n if (isExpanding === true) {\n setIsExpanded(true);\n scrollToBlock();\n }else {\n setIsExpanded(false);\n }\n },\n [scrollToBlock, setIsExpanded],\n );\n\n return (\n <div ref={forwardedRef}>\n <ExpandableBlock onToggle={handleToggle} isExpanded={isExpanded} {...rest}>\n {children}\n </ExpandableBlock>\n </div>\n );\n});\n"]}
@@ -1,7 +1,10 @@
1
- import type { DataType, PropertyMap } from "../../../formula/Types";
2
- export declare function useFormulaValidation(formulaName: string, formula: string, properties: PropertyMap, setFormulaErrorMessage: (s: string) => void): {
3
- isValid: boolean;
1
+ import type { DataType as FormulaDataType } from "../../../formula/Types";
2
+ import type { Property } from "@itwin/insights-client";
3
+ import { DataType } from "@itwin/insights-client";
4
+ export declare function useFormulaValidation(formulaName: string, formula: string | undefined, groupProperties: Property[], setFormulaErrorMessage: (s: string | undefined) => void, providedDataType?: DataType): {
5
+ isFormulaValid: boolean;
4
6
  inferredDataType: DataType | undefined;
5
7
  forceValidation: () => boolean;
6
8
  };
9
+ export declare const inferToPropertyDataType: (value: FormulaDataType | undefined) => DataType;
7
10
  //# sourceMappingURL=useFormulaValidation.d.ts.map
@@ -1,33 +1,79 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useFormulaValidation = void 0;
3
+ exports.inferToPropertyDataType = exports.useFormulaValidation = void 0;
4
4
  /*---------------------------------------------------------------------------------------------
5
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
- * See LICENSE.md in the project root for license terms and full copyright notice.
7
- *--------------------------------------------------------------------------------------------*/
5
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
+ * See LICENSE.md in the project root for license terms and full copyright notice.
7
+ *--------------------------------------------------------------------------------------------*/
8
8
  const react_1 = require("react");
9
9
  const FormulaDataTypeResolver_1 = require("../../../formula/FormulaDataTypeResolver");
10
10
  const utils_1 = require("../../../common/utils");
11
- function validate(formulaName, formula, properties, setFormulaErrorMessage, setIsValid, setDataType) {
11
+ const insights_client_1 = require("@itwin/insights-client");
12
+ function validate(formulaName, formula, properties, setFormulaErrorMessage, setIsFormulaValid, setDataType, providedDataType) {
12
13
  if (!formula) {
13
- setFormulaErrorMessage("");
14
- setIsValid(false);
14
+ setFormulaErrorMessage(undefined);
15
+ setIsFormulaValid(false);
15
16
  setDataType(undefined);
16
17
  return false;
17
18
  }
18
- const resolveFormulaType = (0, FormulaDataTypeResolver_1.resolveFormulaDataType)(formulaName, formula, properties);
19
- const error = resolveFormulaType.errorMessage ?? "";
19
+ const resolveFormulaType = (0, FormulaDataTypeResolver_1.resolveFormulaDataType)(formulaName, formula, properties, providedDataType);
20
+ const error = resolveFormulaType.errorMessage;
20
21
  setFormulaErrorMessage(error);
21
- setIsValid(!error);
22
- setDataType(resolveFormulaType.value);
22
+ setIsFormulaValid(!error);
23
+ setDataType((0, exports.inferToPropertyDataType)(resolveFormulaType.value));
23
24
  return !error;
24
25
  }
25
- const debouncedValidationFunc = (0, utils_1.debounce)(validate, 5000);
26
- function useFormulaValidation(formulaName, formula, properties, setFormulaErrorMessage) {
27
- const [isValid, setIsValid] = (0, react_1.useState)(false);
26
+ const debouncedValidationFunc = (0, utils_1.debounce)(validate, 2000);
27
+ function useFormulaValidation(formulaName, formula, groupProperties, setFormulaErrorMessage, providedDataType) {
28
+ const [isFormulaValid, setIsFormulaValid] = (0, react_1.useState)(false);
28
29
  const [inferredDataType, setDataType] = (0, react_1.useState)(undefined);
29
- (0, react_1.useEffect)(() => debouncedValidationFunc(formulaName, formula, properties, setFormulaErrorMessage, setIsValid, setDataType), [formulaName, formula, properties, setFormulaErrorMessage]);
30
- return { isValid, inferredDataType, forceValidation: () => validate(formulaName, formula, properties, setFormulaErrorMessage, setIsValid, setDataType) };
30
+ const [propertyMap, setPropertyMap] = (0, react_1.useState)({});
31
+ (0, react_1.useEffect)(() => setPropertyMap(convertToPropertyMap(groupProperties)), [groupProperties]);
32
+ (0, react_1.useEffect)(() => debouncedValidationFunc(formulaName, formula, propertyMap, setFormulaErrorMessage, setIsFormulaValid, setDataType, providedDataType), [formulaName, formula, groupProperties, setFormulaErrorMessage, propertyMap, providedDataType]);
33
+ return {
34
+ isFormulaValid,
35
+ inferredDataType,
36
+ forceValidation: () => validate(formulaName, formula, propertyMap, setFormulaErrorMessage, setIsFormulaValid, setDataType, providedDataType),
37
+ };
31
38
  }
32
39
  exports.useFormulaValidation = useFormulaValidation;
40
+ const inferToPropertyDataType = (value) => {
41
+ switch (value) {
42
+ case "Double":
43
+ return insights_client_1.DataType.Double;
44
+ case "Integer":
45
+ return insights_client_1.DataType.Integer;
46
+ case "String":
47
+ return insights_client_1.DataType.String;
48
+ case "Boolean":
49
+ return insights_client_1.DataType.Boolean;
50
+ default:
51
+ return insights_client_1.DataType.String;
52
+ }
53
+ };
54
+ exports.inferToPropertyDataType = inferToPropertyDataType;
55
+ const convertToPropertyMap = (properties, selectedPropertyName) => {
56
+ const map = {};
57
+ const selectedLowerName = selectedPropertyName?.toLowerCase();
58
+ properties.forEach((p) => {
59
+ const lowerName = p.propertyName?.toLowerCase();
60
+ if (lowerName && lowerName !== selectedLowerName)
61
+ map[lowerName] = stringToPossibleDataType(p.dataType);
62
+ });
63
+ return map;
64
+ };
65
+ const stringToPossibleDataType = (str) => {
66
+ switch (str?.toLowerCase()) {
67
+ case "double":
68
+ return "Double";
69
+ case "integer":
70
+ return "Integer";
71
+ case "string":
72
+ return "String";
73
+ case "boolean":
74
+ return "Boolean";
75
+ default:
76
+ return "Undefined";
77
+ }
78
+ };
33
79
  //# sourceMappingURL=useFormulaValidation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFormulaValidation.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/useFormulaValidation.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,iCAA4C;AAC5C,sFAAkF;AAElF,iDAAiD;AAEjD,SAAS,QAAQ,CAAC,WAAmB,EAAE,OAAe,EAAE,UAAuB,EAAE,sBAA2C,EAAE,UAAgC,EAAE,WAA6D;IAC3N,IAAI,CAAC,OAAO,EAAE;QACZ,sBAAsB,CAAC,EAAE,CAAC,CAAC;QAC3B,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,WAAW,CAAC,SAAS,CAAC,CAAC;QACvB,OAAO,KAAK,CAAC;KACd;IAED,MAAM,kBAAkB,GAAG,IAAA,gDAAsB,EAAC,WAAW,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IACpF,MAAM,KAAK,GAAG,kBAAkB,CAAC,YAAY,IAAI,EAAE,CAAC;IACpD,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAC9B,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC;IACnB,WAAW,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,KAAK,CAAC;AAChB,CAAC;AAED,MAAM,uBAAuB,GAAG,IAAA,gBAAQ,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAEzD,SAAgB,oBAAoB,CAAC,WAAmB,EAAE,OAAe,EAAE,UAAuB,EAAE,sBAA2C;IAC7I,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAuB,SAAS,CAAC,CAAC;IAClF,IAAA,iBAAS,EAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,sBAAsB,CAAC,CAAC,CAAC;IACxL,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,CAAC;AAC3J,CAAC;AALD,oDAKC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { useEffect, useState } from \"react\";\nimport { resolveFormulaDataType } from \"../../../formula/FormulaDataTypeResolver\";\nimport type { DataType, PropertyMap } from \"../../../formula/Types\";\nimport { debounce } from \"../../../common/utils\";\n\nfunction validate(formulaName: string, formula: string, properties: PropertyMap, setFormulaErrorMessage: (s: string) => void, setIsValid: (b: boolean) => void, setDataType: (inferredDataType: DataType | undefined) => void ): boolean {\n if (!formula) {\n setFormulaErrorMessage(\"\");\n setIsValid(false);\n setDataType(undefined);\n return false;\n }\n\n const resolveFormulaType = resolveFormulaDataType(formulaName, formula, properties);\n const error = resolveFormulaType.errorMessage ?? \"\";\n setFormulaErrorMessage(error);\n setIsValid(!error);\n setDataType(resolveFormulaType.value);\n return !error;\n}\n\nconst debouncedValidationFunc = debounce(validate, 5000);\n\nexport function useFormulaValidation(formulaName: string, formula: string, properties: PropertyMap, setFormulaErrorMessage: (s: string) => void) {\n const [isValid, setIsValid] = useState(false);\n const [inferredDataType, setDataType] = useState<DataType | undefined>(undefined);\n useEffect(() => debouncedValidationFunc(formulaName, formula, properties, setFormulaErrorMessage, setIsValid, setDataType), [formulaName, formula, properties, setFormulaErrorMessage]);\n return { isValid, inferredDataType, forceValidation: () => validate(formulaName, formula, properties, setFormulaErrorMessage, setIsValid, setDataType) };\n}\n"]}
1
+ {"version":3,"file":"useFormulaValidation.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/useFormulaValidation.ts"],"names":[],"mappings":"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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport { useEffect, useState } from \"react\";\nimport { resolveFormulaDataType } from \"../../../formula/FormulaDataTypeResolver\";\nimport type { DataType as FormulaDataType, PossibleDataType, PropertyMap } from \"../../../formula/Types\";\nimport { debounce } from \"../../../common/utils\";\nimport type { Property } from \"@itwin/insights-client\";\nimport { DataType } from \"@itwin/insights-client\";\n\nfunction validate(\n formulaName: string,\n formula: string | undefined,\n properties: PropertyMap,\n setFormulaErrorMessage: (s: string | undefined) => void,\n setIsFormulaValid: (b: boolean) => void,\n setDataType: (inferredDataType: DataType | undefined) => void,\n providedDataType?: DataType,\n): boolean {\n if (!formula) {\n setFormulaErrorMessage(undefined);\n setIsFormulaValid(false);\n setDataType(undefined);\n return false;\n }\n\n const resolveFormulaType = resolveFormulaDataType(formulaName, formula, properties, providedDataType);\n const error = resolveFormulaType.errorMessage;\n setFormulaErrorMessage(error);\n setIsFormulaValid(!error);\n setDataType(inferToPropertyDataType(resolveFormulaType.value));\n return !error;\n}\n\nconst debouncedValidationFunc = debounce(validate, 2000);\n\nexport function useFormulaValidation(\n formulaName: string,\n formula: string | undefined,\n groupProperties: Property[],\n setFormulaErrorMessage: (s: string | undefined) => void,\n providedDataType?: DataType,\n) {\n const [isFormulaValid, setIsFormulaValid] = useState(false);\n const [inferredDataType, setDataType] = useState<DataType | undefined>(undefined);\n const [propertyMap, setPropertyMap] = useState<PropertyMap>({});\n useEffect(() => setPropertyMap(convertToPropertyMap(groupProperties)), [groupProperties]);\n useEffect(\n () => debouncedValidationFunc(formulaName, formula, propertyMap, setFormulaErrorMessage, setIsFormulaValid, setDataType, providedDataType),\n [formulaName, formula, groupProperties, setFormulaErrorMessage, propertyMap, providedDataType],\n );\n return {\n isFormulaValid,\n inferredDataType,\n forceValidation: () => validate(formulaName, formula, propertyMap, setFormulaErrorMessage, setIsFormulaValid, setDataType, providedDataType),\n };\n}\n\nexport const inferToPropertyDataType = (value: FormulaDataType | undefined): DataType => {\n switch (value) {\n case \"Double\":\n return DataType.Double;\n case \"Integer\":\n return DataType.Integer;\n case \"String\":\n return DataType.String;\n case \"Boolean\":\n return DataType.Boolean;\n default:\n return DataType.String;\n }\n};\n\nconst convertToPropertyMap = (properties: Property[], selectedPropertyName?: string): PropertyMap => {\n const map: PropertyMap = {};\n const selectedLowerName = selectedPropertyName?.toLowerCase();\n\n properties.forEach((p) => {\n const lowerName = p.propertyName?.toLowerCase();\n if (lowerName && lowerName !== selectedLowerName) map[lowerName] = stringToPossibleDataType(p.dataType);\n });\n\n return map;\n};\n\nconst stringToPossibleDataType = (str?: string): PossibleDataType => {\n switch (str?.toLowerCase()) {\n case \"double\":\n return \"Double\";\n case \"integer\":\n return \"Integer\";\n case \"string\":\n return \"String\";\n case \"boolean\":\n return \"Boolean\";\n default:\n return \"Undefined\";\n }\n};\n"]}
@@ -0,0 +1,3 @@
1
+ import type { ForwardedRef } from "react";
2
+ export declare const useForwardRef: <T>(ref: ForwardedRef<T>, initialValue?: any) => import("react").MutableRefObject<T>;
3
+ //# sourceMappingURL=useForwardRef.d.ts.map
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useForwardRef = void 0;
4
+ const react_1 = require("react");
5
+ const useForwardRef = (ref, initialValue = null) => {
6
+ const targetRef = (0, react_1.useRef)(initialValue);
7
+ (0, react_1.useEffect)(() => {
8
+ if (!ref)
9
+ return;
10
+ if (typeof ref === 'function') {
11
+ ref(targetRef.current);
12
+ }
13
+ else {
14
+ ref.current = targetRef.current;
15
+ }
16
+ }, [ref]);
17
+ return targetRef;
18
+ };
19
+ exports.useForwardRef = useForwardRef;
20
+ //# sourceMappingURL=useForwardRef.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useForwardRef.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/useForwardRef.ts"],"names":[],"mappings":";;;AAKA,iCAA0C;AAEnC,MAAM,aAAa,GAAG,CACzB,GAAoB,EACpB,eAAoB,IAAI,EACxB,EAAE;IACF,MAAM,SAAS,GAAG,IAAA,cAAM,EAAI,YAAY,CAAC,CAAC;IAE1C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAAG;YAAE,OAAO;QAEjB,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;YAC7B,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;SACxB;aAAM;YACL,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;SACjC;IACH,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEV,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAjBS,QAAA,aAAa,iBAiBtB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport type { ForwardedRef } from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const useForwardRef = <T,>(\n ref: ForwardedRef<T>,\n initialValue: any = null\n ) => {\n const targetRef = useRef<T>(initialValue);\n \n useEffect(() => {\n if (!ref) return;\n \n if (typeof ref === 'function') {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n }, [ref]);\n \n return targetRef;\n };"]}
@@ -1 +1 @@
1
- {"version":3,"file":"usePropertiesQuery.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/usePropertiesQuery.ts"],"names":[],"mappings":";;;AAKA,uDAAiD;AAG1C,MAAM,kBAAkB,GAAG,CAAC,QAAgB,EAAE,SAAiB,EAAE,OAAe,EAAE,cAAgC,EAAE,gBAAmC,EAAE,EAAE;IAChK,OAAO,IAAA,sBAAQ,EAAC;QACd,QAAQ,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;QACtD,OAAO,EAAG,KAAK,IAAI,EAAE,CAAC,gBAAgB,CAAC,aAAa,CAAC,MAAM,cAAc,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC;KACjG,CAAC,CAAC;AACL,CAAC,CAAC;AALW,QAAA,kBAAkB,sBAK7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type { IPropertiesClient } from \"@itwin/insights-client\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport type { GetAccessTokenFn } from \"../../context/GroupingApiConfigContext\";\n\nexport const usePropertiesQuery = (iModelId: string, mappingId: string, groupId: string, getAccessToken: GetAccessTokenFn, propertiesClient: IPropertiesClient) => {\n return useQuery({\n queryKey: [\"properties\", iModelId, mappingId, groupId],\n queryFn: async () => propertiesClient.getProperties(await getAccessToken(), mappingId, groupId),\n });\n};\n"]}
1
+ {"version":3,"file":"usePropertiesQuery.js","sourceRoot":"","sources":["../../../../../src/components/Properties/hooks/usePropertiesQuery.ts"],"names":[],"mappings":";;;AAKA,uDAAiD;AAG1C,MAAM,kBAAkB,GAAG,CAChC,QAAgB,EAChB,SAAiB,EACjB,OAAe,EACf,cAAgC,EAChC,gBAAmC,EACnC,EAAE;IACF,OAAO,IAAA,sBAAQ,EAAC;QACd,QAAQ,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;QACtD,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,gBAAgB,CAAC,aAAa,CAAC,MAAM,cAAc,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC;KAChG,CAAC,CAAC;AACL,CAAC,CAAC;AAXW,QAAA,kBAAkB,sBAW7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport type { IPropertiesClient } from \"@itwin/insights-client\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport type { GetAccessTokenFn } from \"../../context/GroupingApiConfigContext\";\n\nexport const usePropertiesQuery = (\n iModelId: string,\n mappingId: string,\n groupId: string,\n getAccessToken: GetAccessTokenFn,\n propertiesClient: IPropertiesClient,\n) => {\n return useQuery({\n queryKey: [\"properties\", iModelId, mappingId, groupId],\n queryFn: async () => propertiesClient.getProperties(await getAccessToken(), mappingId, groupId),\n });\n};\n"]}
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Messages = exports.NAME_REQUIREMENTS = exports.Validators = void 0;
7
7
  /*---------------------------------------------------------------------------------------------
8
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
9
- * See LICENSE.md in the project root for license terms and full copyright notice.
10
- *--------------------------------------------------------------------------------------------*/
8
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
9
+ * See LICENSE.md in the project root for license terms and full copyright notice.
10
+ *--------------------------------------------------------------------------------------------*/
11
11
  const react_1 = require("react");
12
12
  const simple_react_validator_1 = __importDefault(require("simple-react-validator"));
13
13
  exports.Validators = {
@@ -27,7 +27,7 @@ exports.Validators = {
27
27
  FollowedByLettersUnderscoresAndDigits: {
28
28
  message: "Name can only contain letters, underscores, or digits",
29
29
  rule: (val) => {
30
- const regexPattern = new RegExp(/[\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]+$/u);
30
+ const regexPattern = new RegExp(/^[\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]+$/u);
31
31
  return regexPattern.test(val);
32
32
  },
33
33
  },