@finos/legend-extension-dsl-data-quality 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +1 -0
  3. package/lib/components/DSL_DataQuality_ClassElementDriver.d.ts +46 -0
  4. package/lib/components/DSL_DataQuality_ClassElementDriver.d.ts.map +1 -0
  5. package/lib/components/DSL_DataQuality_ClassElementDriver.js +116 -0
  6. package/lib/components/DSL_DataQuality_ClassElementDriver.js.map +1 -0
  7. package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.d.ts +30 -0
  8. package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.d.ts.map +1 -0
  9. package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.js +161 -0
  10. package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.js.map +1 -0
  11. package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.d.ts +25 -0
  12. package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.d.ts.map +1 -0
  13. package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.js +2 -0
  14. package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.js.map +1 -0
  15. package/lib/components/DSL_DataQuality_ServiceElementDriver.d.ts +27 -0
  16. package/lib/components/DSL_DataQuality_ServiceElementDriver.d.ts.map +1 -0
  17. package/lib/components/DSL_DataQuality_ServiceElementDriver.js +41 -0
  18. package/lib/components/DSL_DataQuality_ServiceElementDriver.js.map +1 -0
  19. package/lib/components/DSL_NewDataQualityClassValidationElement.d.ts +19 -0
  20. package/lib/components/DSL_NewDataQualityClassValidationElement.d.ts.map +1 -0
  21. package/lib/components/DSL_NewDataQualityClassValidationElement.js +64 -0
  22. package/lib/components/DSL_NewDataQualityClassValidationElement.js.map +1 -0
  23. package/lib/components/DSL_NewDataQualityServiceValidationElement.d.ts +19 -0
  24. package/lib/components/DSL_NewDataQualityServiceValidationElement.d.ts.map +1 -0
  25. package/lib/components/DSL_NewDataQualityServiceValidationElement.js +41 -0
  26. package/lib/components/DSL_NewDataQualityServiceValidationElement.js.map +1 -0
  27. package/lib/components/DataQualityClassValidationEditor.d.ts +19 -0
  28. package/lib/components/DataQualityClassValidationEditor.d.ts.map +1 -0
  29. package/lib/components/DataQualityClassValidationEditor.js +29 -0
  30. package/lib/components/DataQualityClassValidationEditor.js.map +1 -0
  31. package/lib/components/DataQualityConstraintsSelection.d.ts +39 -0
  32. package/lib/components/DataQualityConstraintsSelection.d.ts.map +1 -0
  33. package/lib/components/DataQualityConstraintsSelection.js +133 -0
  34. package/lib/components/DataQualityConstraintsSelection.js.map +1 -0
  35. package/lib/components/DataQualityDataSpaceBuilder.d.ts +22 -0
  36. package/lib/components/DataQualityDataSpaceBuilder.d.ts.map +1 -0
  37. package/lib/components/DataQualityDataSpaceBuilder.js +101 -0
  38. package/lib/components/DataQualityDataSpaceBuilder.js.map +1 -0
  39. package/lib/components/DataQualityExplorerPanel.d.ts +29 -0
  40. package/lib/components/DataQualityExplorerPanel.d.ts.map +1 -0
  41. package/lib/components/DataQualityExplorerPanel.js +185 -0
  42. package/lib/components/DataQualityExplorerPanel.js.map +1 -0
  43. package/lib/components/DataQualityFilterPanel.d.ts +24 -0
  44. package/lib/components/DataQualityFilterPanel.d.ts.map +1 -0
  45. package/lib/components/DataQualityFilterPanel.js +32 -0
  46. package/lib/components/DataQualityFilterPanel.js.map +1 -0
  47. package/lib/components/DataQualityMappingAndRuntimeBuilder.d.ts +22 -0
  48. package/lib/components/DataQualityMappingAndRuntimeBuilder.d.ts.map +1 -0
  49. package/lib/components/DataQualityMappingAndRuntimeBuilder.js +98 -0
  50. package/lib/components/DataQualityMappingAndRuntimeBuilder.js.map +1 -0
  51. package/lib/components/DataQualityResultPanel.d.ts +22 -0
  52. package/lib/components/DataQualityResultPanel.d.ts.map +1 -0
  53. package/lib/components/DataQualityResultPanel.js +110 -0
  54. package/lib/components/DataQualityResultPanel.js.map +1 -0
  55. package/lib/components/DataQualityResultValues.d.ts +24 -0
  56. package/lib/components/DataQualityResultValues.d.ts.map +1 -0
  57. package/lib/components/DataQualityResultValues.js +31 -0
  58. package/lib/components/DataQualityResultValues.js.map +1 -0
  59. package/lib/components/DataQualityServiceValidationEditor.d.ts +19 -0
  60. package/lib/components/DataQualityServiceValidationEditor.d.ts.map +1 -0
  61. package/lib/components/DataQualityServiceValidationEditor.js +29 -0
  62. package/lib/components/DataQualityServiceValidationEditor.js.map +1 -0
  63. package/lib/components/DataQualitySideBar.d.ts +40 -0
  64. package/lib/components/DataQualitySideBar.d.ts.map +1 -0
  65. package/lib/components/DataQualitySideBar.js +78 -0
  66. package/lib/components/DataQualitySideBar.js.map +1 -0
  67. package/lib/components/DataQualityStructuralValidationsPanel.d.ts +22 -0
  68. package/lib/components/DataQualityStructuralValidationsPanel.d.ts.map +1 -0
  69. package/lib/components/DataQualityStructuralValidationsPanel.js +50 -0
  70. package/lib/components/DataQualityStructuralValidationsPanel.js.map +1 -0
  71. package/lib/components/DataQualityTabs.d.ts +22 -0
  72. package/lib/components/DataQualityTabs.d.ts.map +1 -0
  73. package/lib/components/DataQualityTabs.js +58 -0
  74. package/lib/components/DataQualityTabs.js.map +1 -0
  75. package/lib/components/DataQualityValidationEditor.d.ts +23 -0
  76. package/lib/components/DataQualityValidationEditor.d.ts.map +1 -0
  77. package/lib/components/DataQualityValidationEditor.js +24 -0
  78. package/lib/components/DataQualityValidationEditor.js.map +1 -0
  79. package/lib/components/constants/DataQualityConstants.d.ts +24 -0
  80. package/lib/components/constants/DataQualityConstants.d.ts.map +1 -0
  81. package/lib/components/constants/DataQualityConstants.js +25 -0
  82. package/lib/components/constants/DataQualityConstants.js.map +1 -0
  83. package/lib/components/index.d.ts +19 -0
  84. package/lib/components/index.d.ts.map +1 -0
  85. package/lib/components/index.js +19 -0
  86. package/lib/components/index.js.map +1 -0
  87. package/lib/components/states/ConstraintState.d.ts +30 -0
  88. package/lib/components/states/ConstraintState.d.ts.map +1 -0
  89. package/lib/components/states/ConstraintState.js +55 -0
  90. package/lib/components/states/ConstraintState.js.map +1 -0
  91. package/lib/components/states/DataQualityClassValidationState.d.ts +43 -0
  92. package/lib/components/states/DataQualityClassValidationState.d.ts.map +1 -0
  93. package/lib/components/states/DataQualityClassValidationState.js +162 -0
  94. package/lib/components/states/DataQualityClassValidationState.js.map +1 -0
  95. package/lib/components/states/DataQualityGraphFetchTreeState.d.ts +34 -0
  96. package/lib/components/states/DataQualityGraphFetchTreeState.d.ts.map +1 -0
  97. package/lib/components/states/DataQualityGraphFetchTreeState.js +70 -0
  98. package/lib/components/states/DataQualityGraphFetchTreeState.js.map +1 -0
  99. package/lib/components/states/DataQualityQueryBuilderState.d.ts +19 -0
  100. package/lib/components/states/DataQualityQueryBuilderState.d.ts.map +1 -0
  101. package/lib/components/states/DataQualityQueryBuilderState.js +19 -0
  102. package/lib/components/states/DataQualityQueryBuilderState.js.map +1 -0
  103. package/lib/components/states/DataQualityResultState.d.ts +44 -0
  104. package/lib/components/states/DataQualityResultState.d.ts.map +1 -0
  105. package/lib/components/states/DataQualityResultState.js +154 -0
  106. package/lib/components/states/DataQualityResultState.js.map +1 -0
  107. package/lib/components/states/DataQualityServiceValidationState.d.ts +25 -0
  108. package/lib/components/states/DataQualityServiceValidationState.d.ts.map +1 -0
  109. package/lib/components/states/DataQualityServiceValidationState.js +33 -0
  110. package/lib/components/states/DataQualityServiceValidationState.js.map +1 -0
  111. package/lib/components/states/DataQualityState.d.ts +67 -0
  112. package/lib/components/states/DataQualityState.d.ts.map +1 -0
  113. package/lib/components/states/DataQualityState.js +204 -0
  114. package/lib/components/states/DataQualityState.js.map +1 -0
  115. package/lib/components/utils/DataQualityGraphFetchTreeUtil.d.ts +51 -0
  116. package/lib/components/utils/DataQualityGraphFetchTreeUtil.d.ts.map +1 -0
  117. package/lib/components/utils/DataQualityGraphFetchTreeUtil.js +321 -0
  118. package/lib/components/utils/DataQualityGraphFetchTreeUtil.js.map +1 -0
  119. package/lib/graph/metamodel/DSL_DataQuality_HashUtils.d.ts +29 -0
  120. package/lib/graph/metamodel/DSL_DataQuality_HashUtils.d.ts.map +1 -0
  121. package/lib/graph/metamodel/DSL_DataQuality_HashUtils.js +30 -0
  122. package/lib/graph/metamodel/DSL_DataQuality_HashUtils.js.map +1 -0
  123. package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.d.ts +22 -0
  124. package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.d.ts.map +1 -0
  125. package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.js +31 -0
  126. package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.js.map +1 -0
  127. package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.d.ts +26 -0
  128. package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.d.ts.map +1 -0
  129. package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.js +44 -0
  130. package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.js.map +1 -0
  131. package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.d.ts +47 -0
  132. package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.d.ts.map +1 -0
  133. package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js +75 -0
  134. package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js.map +1 -0
  135. package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.d.ts +20 -0
  136. package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.d.ts.map +1 -0
  137. package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.js +20 -0
  138. package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.js.map +1 -0
  139. package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.d.ts +20 -0
  140. package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.d.ts.map +1 -0
  141. package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.js +30 -0
  142. package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.js.map +1 -0
  143. package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.d.ts +26 -0
  144. package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.d.ts.map +1 -0
  145. package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.js +57 -0
  146. package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.js.map +1 -0
  147. package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.d.ts +7 -0
  148. package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.d.ts.map +1 -0
  149. package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.js +42 -0
  150. package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.js.map +1 -0
  151. package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.d.ts +24 -0
  152. package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.d.ts.map +1 -0
  153. package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.js +98 -0
  154. package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.js.map +1 -0
  155. package/lib/graph-manager/index.d.ts +19 -0
  156. package/lib/graph-manager/index.d.ts.map +1 -0
  157. package/lib/graph-manager/index.js +19 -0
  158. package/lib/graph-manager/index.js.map +1 -0
  159. package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.d.ts +27 -0
  160. package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.d.ts.map +1 -0
  161. package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.js +21 -0
  162. package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.js.map +1 -0
  163. package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.d.ts +25 -0
  164. package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.d.ts.map +1 -0
  165. package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.js +140 -0
  166. package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.js.map +1 -0
  167. package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.d.ts +18 -0
  168. package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.d.ts.map +1 -0
  169. package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.js +20 -0
  170. package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.js.map +1 -0
  171. package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.d.ts +41 -0
  172. package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.d.ts.map +1 -0
  173. package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.js +95 -0
  174. package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.js.map +1 -0
  175. package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.d.ts +46 -0
  176. package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.d.ts.map +1 -0
  177. package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.js +76 -0
  178. package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.js.map +1 -0
  179. package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.d.ts +22 -0
  180. package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.d.ts.map +1 -0
  181. package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.js +32 -0
  182. package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.js.map +1 -0
  183. package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.d.ts +22 -0
  184. package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.d.ts.map +1 -0
  185. package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.js +31 -0
  186. package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.js.map +1 -0
  187. package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.d.ts +24 -0
  188. package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.d.ts.map +1 -0
  189. package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.js +92 -0
  190. package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.js.map +1 -0
  191. package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.d.ts +20 -0
  192. package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.d.ts.map +1 -0
  193. package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.js +56 -0
  194. package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.js.map +1 -0
  195. package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.d.ts +22 -0
  196. package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.d.ts.map +1 -0
  197. package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.js +70 -0
  198. package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.js.map +1 -0
  199. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.d.ts +29 -0
  200. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.d.ts.map +1 -0
  201. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.js +80 -0
  202. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.js.map +1 -0
  203. package/lib/index.css +17 -0
  204. package/lib/index.css.map +1 -0
  205. package/lib/package.json +87 -0
  206. package/package.json +87 -0
  207. package/src/components/DSL_DataQuality_ClassElementDriver.tsx +175 -0
  208. package/src/components/DSL_DataQuality_LegendStudioApplicationPlugin.tsx +220 -0
  209. package/src/components/DSL_DataQuality_LegendStudioPlugin_Extension.ts +39 -0
  210. package/src/components/DSL_DataQuality_ServiceElementDriver.tsx +57 -0
  211. package/src/components/DSL_NewDataQualityClassValidationElement.tsx +156 -0
  212. package/src/components/DSL_NewDataQualityServiceValidationElement.tsx +74 -0
  213. package/src/components/DataQualityClassValidationEditor.tsx +49 -0
  214. package/src/components/DataQualityConstraintsSelection.tsx +376 -0
  215. package/src/components/DataQualityDataSpaceBuilder.tsx +274 -0
  216. package/src/components/DataQualityExplorerPanel.tsx +584 -0
  217. package/src/components/DataQualityFilterPanel.tsx +50 -0
  218. package/src/components/DataQualityMappingAndRuntimeBuilder.tsx +224 -0
  219. package/src/components/DataQualityResultPanel.tsx +335 -0
  220. package/src/components/DataQualityResultValues.tsx +61 -0
  221. package/src/components/DataQualityServiceValidationEditor.tsx +49 -0
  222. package/src/components/DataQualitySideBar.tsx +216 -0
  223. package/src/components/DataQualityStructuralValidationsPanel.tsx +105 -0
  224. package/src/components/DataQualityTabs.tsx +104 -0
  225. package/src/components/DataQualityValidationEditor.tsx +52 -0
  226. package/src/components/constants/DataQualityConstants.ts +24 -0
  227. package/src/components/index.ts +19 -0
  228. package/src/components/states/ConstraintState.ts +70 -0
  229. package/src/components/states/DataQualityClassValidationState.ts +308 -0
  230. package/src/components/states/DataQualityGraphFetchTreeState.ts +125 -0
  231. package/src/components/states/DataQualityQueryBuilderState.ts +19 -0
  232. package/src/components/states/DataQualityResultState.ts +217 -0
  233. package/src/components/states/DataQualityServiceValidationState.ts +56 -0
  234. package/src/components/states/DataQualityState.ts +354 -0
  235. package/src/components/utils/DataQualityGraphFetchTreeUtil.ts +592 -0
  236. package/src/graph/metamodel/DSL_DataQuality_HashUtils.ts +29 -0
  237. package/src/graph/metamodel/DSL_DataQuality_PureGraphPlugin.ts +36 -0
  238. package/src/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.ts +55 -0
  239. package/src/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.ts +107 -0
  240. package/src/graph-manager/DSL_DataQuality_GraphManagerHelper.ts +46 -0
  241. package/src/graph-manager/DSL_DataQuality_GraphManagerPreset.ts +31 -0
  242. package/src/graph-manager/DSL_DataQuality_GraphModifierHelper.ts +113 -0
  243. package/src/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.ts +59 -0
  244. package/src/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.ts +153 -0
  245. package/src/graph-manager/index.ts +19 -0
  246. package/src/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.ts +59 -0
  247. package/src/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.ts +283 -0
  248. package/src/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.ts +27 -0
  249. package/src/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.ts +246 -0
  250. package/src/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.ts +103 -0
  251. package/src/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.ts +37 -0
  252. package/src/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.ts +36 -0
  253. package/src/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.ts +241 -0
  254. package/src/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.ts +113 -0
  255. package/src/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.ts +139 -0
  256. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.ts +186 -0
  257. package/style/_data-quality-validation-builder.scss +1660 -0
  258. package/style/index.scss +67 -0
  259. package/tsconfig.json +137 -0
  260. package/tsconfig.package.json +9 -0
@@ -0,0 +1,156 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { observer } from 'mobx-react-lite';
18
+ import { useEditorStore } from '@finos/legend-application-studio';
19
+ import { BaseRadioGroup, CustomSelectorInput } from '@finos/legend-art';
20
+ import type { Mapping } from '@finos/legend-graph';
21
+ import {
22
+ type PackageableElementOption,
23
+ buildElementOption,
24
+ } from '@finos/legend-lego/graph-editor';
25
+ import {
26
+ type RuntimeOption,
27
+ DataQuality_ClassElementDriver,
28
+ ELEMENT_CREATION_BASIS,
29
+ } from './DSL_DataQuality_ClassElementDriver.js';
30
+ import type { DataSpace } from '@finos/legend-extension-dsl-data-space/graph';
31
+
32
+ export const NewDataQualityClassValidationElementEditor = observer(() => {
33
+ const editorStore = useEditorStore();
34
+ const applicationStore = editorStore.applicationStore;
35
+
36
+ const dataQualityDataSpaceDriver =
37
+ editorStore.newElementState.getNewElementDriver(
38
+ DataQuality_ClassElementDriver,
39
+ );
40
+ const dqElementCreationBasis =
41
+ dataQualityDataSpaceDriver.dqElementCreationBasis;
42
+ const dataSpacesOptions = dataQualityDataSpaceDriver.dataSpaceOptions;
43
+ const mappingOptions = dataQualityDataSpaceDriver.mappingOptions;
44
+ const runtimeOptions =
45
+ dataQualityDataSpaceDriver.compatibleMappingRuntimes.map(
46
+ buildElementOption,
47
+ );
48
+
49
+ const onDataSpaceChange = (
50
+ val: PackageableElementOption<DataSpace> | null,
51
+ ): void => {
52
+ if (val) {
53
+ dataQualityDataSpaceDriver.setDataSpaceSelected(val);
54
+ }
55
+ };
56
+
57
+ const onMappingChange = (
58
+ val: PackageableElementOption<Mapping> | null,
59
+ ): void => {
60
+ if (val) {
61
+ dataQualityDataSpaceDriver.setMappingSelected(val);
62
+ } else {
63
+ dataQualityDataSpaceDriver.setMappingSelected(undefined);
64
+ }
65
+ dataQualityDataSpaceDriver.setRuntimeSelected(
66
+ dataQualityDataSpaceDriver.runtimeOptions.length > 0
67
+ ? dataQualityDataSpaceDriver.runtimeOptions[0]
68
+ : undefined,
69
+ );
70
+ };
71
+
72
+ const onRuntimeChange = (val: RuntimeOption | null): void => {
73
+ if (val) {
74
+ dataQualityDataSpaceDriver.setRuntimeSelected(val);
75
+ }
76
+ };
77
+
78
+ const handleDQElementCreationBasisChange = (
79
+ event: React.ChangeEvent<HTMLInputElement>,
80
+ ): void => {
81
+ const validationElementCreationBasis = (event.target as HTMLInputElement)
82
+ .value as ELEMENT_CREATION_BASIS;
83
+ dataQualityDataSpaceDriver.setDqElementCreationBasis(
84
+ validationElementCreationBasis,
85
+ );
86
+ };
87
+
88
+ return (
89
+ <div>
90
+ <div className="element-creation-basis">
91
+ <BaseRadioGroup
92
+ value={dqElementCreationBasis}
93
+ onChange={handleDQElementCreationBasisChange}
94
+ row={false}
95
+ options={[
96
+ ELEMENT_CREATION_BASIS.DATASPACE_BASED,
97
+ ELEMENT_CREATION_BASIS.MAPPING_RUNTIME_BASED,
98
+ ]}
99
+ size={2}
100
+ />
101
+ </div>
102
+ {dqElementCreationBasis === ELEMENT_CREATION_BASIS.DATASPACE_BASED ? (
103
+ <div>
104
+ <div className="panel__content__form__section__header__label">
105
+ DataSpace
106
+ </div>
107
+ <div className="data-quality-explorer__new-element-modal__driver">
108
+ <CustomSelectorInput
109
+ className="data-quality-explorer__new-element-modal__driver__dropdown"
110
+ options={dataSpacesOptions}
111
+ onChange={onDataSpaceChange}
112
+ value={dataQualityDataSpaceDriver.dataSpaceSelected}
113
+ darkMode={
114
+ !applicationStore.layoutService
115
+ .TEMPORARY__isLightColorThemeEnabled
116
+ }
117
+ />
118
+ </div>
119
+ </div>
120
+ ) : (
121
+ <div>
122
+ <div className="panel__content__form__section__header__label">
123
+ Mapping
124
+ </div>
125
+ <div className="data-quality-explorer__new-element-modal__driver">
126
+ <CustomSelectorInput
127
+ className="data-quality-explorer__new-element-modal__driver__dropdown"
128
+ options={mappingOptions}
129
+ onChange={onMappingChange}
130
+ value={dataQualityDataSpaceDriver.mappingSelected}
131
+ darkMode={
132
+ !applicationStore.layoutService
133
+ .TEMPORARY__isLightColorThemeEnabled
134
+ }
135
+ />
136
+ </div>
137
+ <div className="panel__content__form__section__header__label">
138
+ Runtime
139
+ </div>
140
+ <div className="data-quality-explorer__new-element-modal__driver">
141
+ <CustomSelectorInput
142
+ className="data-quality-explorer__new-element-modal__driver__dropdown"
143
+ options={runtimeOptions}
144
+ onChange={onRuntimeChange}
145
+ value={dataQualityDataSpaceDriver.runtimeSelected}
146
+ darkMode={
147
+ !applicationStore.layoutService
148
+ .TEMPORARY__isLightColorThemeEnabled
149
+ }
150
+ />
151
+ </div>
152
+ </div>
153
+ )}
154
+ </div>
155
+ );
156
+ });
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { observer } from 'mobx-react-lite';
18
+ import { useEditorStore } from '@finos/legend-application-studio';
19
+ import { CustomSelectorInput } from '@finos/legend-art';
20
+ import { DataQuality_ServiceElementDriver } from './DSL_DataQuality_ServiceElementDriver.js';
21
+ import {
22
+ type PackageableElementOption,
23
+ buildElementOption,
24
+ } from '@finos/legend-lego/graph-editor';
25
+ import type { Service } from '@finos/legend-graph';
26
+
27
+ export const NewDataQualityServiceValidationElementEditor = observer(() => {
28
+ const editorStore = useEditorStore();
29
+ const applicationStore = editorStore.applicationStore;
30
+ const dataQualityServiceElementDriver =
31
+ editorStore.newElementState.getNewElementDriver(
32
+ DataQuality_ServiceElementDriver,
33
+ );
34
+
35
+ const serviceOptions =
36
+ editorStore.graphManagerState.usableServices.map(buildElementOption);
37
+
38
+ const selectedServiceOption = dataQualityServiceElementDriver.serviceSelected
39
+ ? {
40
+ label: dataQualityServiceElementDriver.serviceSelected.value.name,
41
+ value: dataQualityServiceElementDriver.serviceSelected,
42
+ }
43
+ : undefined;
44
+
45
+ const onServiceOptionChange = (
46
+ val: PackageableElementOption<Service> | undefined,
47
+ ): void => {
48
+ if (val) {
49
+ dataQualityServiceElementDriver.setServiceSelected(val);
50
+ }
51
+ };
52
+
53
+ return (
54
+ <>
55
+ <div>
56
+ <div className="panel__content__form__section__header__label">
57
+ Service
58
+ </div>
59
+ <div className="data-quality-explorer__new-element-modal__driver">
60
+ <CustomSelectorInput
61
+ className="data-quality-explorer__new-element-modal__driver__dropdown"
62
+ options={serviceOptions}
63
+ onChange={onServiceOptionChange}
64
+ value={selectedServiceOption}
65
+ darkMode={
66
+ !applicationStore.layoutService
67
+ .TEMPORARY__isLightColorThemeEnabled
68
+ }
69
+ />
70
+ </div>
71
+ </div>
72
+ </>
73
+ );
74
+ });
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { observer } from 'mobx-react-lite';
18
+ import { useEditorStore } from '@finos/legend-application-studio';
19
+ import { DataQualityClassValidationState } from './states/DataQualityClassValidationState.js';
20
+ import { DataQualityClassValidationSideBar } from './DataQualitySideBar.js';
21
+ import { DataQualityValidationEditor } from './DataQualityValidationEditor.js';
22
+ import { DataQualityExplorerPanel } from './DataQualityExplorerPanel.js';
23
+ import { ResizablePanel, ResizablePanelGroup } from '@finos/legend-art';
24
+
25
+ export const DataQualityClassValidationEditor = observer(() => {
26
+ const editorStore = useEditorStore();
27
+ const dataQualityClassValidationState =
28
+ editorStore.tabManagerState.getCurrentEditorState(
29
+ DataQualityClassValidationState,
30
+ );
31
+ return (
32
+ <DataQualityValidationEditor
33
+ dataQualityState={dataQualityClassValidationState}
34
+ SideBarBasisComponent={
35
+ <DataQualityClassValidationSideBar
36
+ dataQualityClassValidationState={dataQualityClassValidationState}
37
+ >
38
+ <ResizablePanelGroup orientation="horizontal">
39
+ <ResizablePanel minSize={40} direction={1}>
40
+ <DataQualityExplorerPanel
41
+ dataQualityState={dataQualityClassValidationState}
42
+ />
43
+ </ResizablePanel>
44
+ </ResizablePanelGroup>
45
+ </DataQualityClassValidationSideBar>
46
+ }
47
+ />
48
+ );
49
+ });
@@ -0,0 +1,376 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { observer } from 'mobx-react-lite';
18
+ import type { DataQualityState } from './states/DataQualityState.js';
19
+ import { useDrop } from 'react-dnd';
20
+ import { useCallback } from 'react';
21
+ import { getClassPropertyIcon } from '@finos/legend-lego/graph-editor';
22
+ import {
23
+ type DataQualityGraphFetchTreeData,
24
+ DataQualityGraphFetchTreeNodeData,
25
+ isConstraintsClassesTreeEmpty,
26
+ removeNodeRecursively,
27
+ } from './utils/DataQualityGraphFetchTreeUtil.js';
28
+ import type { ConstraintState } from './states/ConstraintState.js';
29
+ import {
30
+ type TreeNodeContainerProps,
31
+ BlankPanelPlaceholder,
32
+ CheckSquareIcon,
33
+ ChevronDownIcon,
34
+ ChevronRightIcon,
35
+ clsx,
36
+ PanelDropZone,
37
+ PURE_UnknownElementTypeIcon,
38
+ SquareIcon,
39
+ TimesIcon,
40
+ TreeView,
41
+ } from '@finos/legend-art';
42
+ import { dataQualityClassValidation_setDataQualityGraphFetchTree } from '../graph-manager/DSL_DataQuality_GraphModifierHelper.js';
43
+ import type { DataQualityClassValidationsConfiguration } from '../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
44
+ import {
45
+ type Type,
46
+ Class,
47
+ Enumeration,
48
+ PropertyGraphFetchTree,
49
+ RootGraphFetchTree,
50
+ } from '@finos/legend-graph';
51
+ import { DATA_QUALITY_VALIDATION_TEST_ID } from './constants/DataQualityConstants.js';
52
+ import { flowResult } from 'mobx';
53
+ import { DataQualityStructuralValidationsPanel } from './DataQualityStructuralValidationsPanel.js';
54
+ import {
55
+ type QueryBuilderExplorerTreeDragSource,
56
+ QUERY_BUILDER_EXPLORER_TREE_DND_TYPE,
57
+ } from '@finos/legend-query-builder';
58
+
59
+ export const getQueryBuilderExplorerTreeNodeSortRank = (
60
+ node: DataQualityGraphFetchTreeNodeData,
61
+ ): number => {
62
+ if (node.type instanceof Class) {
63
+ return 1;
64
+ } else if (node.type instanceof Enumeration) {
65
+ return 2;
66
+ } else {
67
+ return 3;
68
+ }
69
+ };
70
+
71
+ export const DataQualityConstraintsTreeNodeContainer = observer(
72
+ (
73
+ props: TreeNodeContainerProps<
74
+ DataQualityGraphFetchTreeNodeData,
75
+ {
76
+ dataQualityState: DataQualityState;
77
+ isReadOnly: boolean;
78
+ removeNode?: (node: DataQualityGraphFetchTreeNodeData) => void;
79
+ }
80
+ >,
81
+ ) => {
82
+ const { node, level, stepPaddingInRem, onNodeSelect, innerProps } = props;
83
+ const { dataQualityState, isReadOnly, removeNode } = innerProps;
84
+ const { dataQualityGraphFetchTreeState } = dataQualityState;
85
+ let property, type: Type | undefined;
86
+ if (node.tree instanceof PropertyGraphFetchTree) {
87
+ property = node.tree.property.value;
88
+ type = property.genericType.value.rawType;
89
+ } else if (node.tree instanceof RootGraphFetchTree) {
90
+ type = node.tree.class.value;
91
+ }
92
+
93
+ const isExpandable = Boolean(node.childrenIds.length);
94
+ const nodeExpandIcon = isExpandable ? (
95
+ node.isOpen ? (
96
+ <ChevronDownIcon />
97
+ ) : (
98
+ <ChevronRightIcon />
99
+ )
100
+ ) : (
101
+ <div />
102
+ );
103
+ const nodeTypeIcon = type ? (
104
+ getClassPropertyIcon(type)
105
+ ) : (
106
+ <PURE_UnknownElementTypeIcon />
107
+ );
108
+ const toggleExpandNode = (): void => onNodeSelect?.(node);
109
+ const deleteNode = (): void => removeNode?.(node);
110
+ const toggleChecked = (constraint: ConstraintState): void => {
111
+ dataQualityGraphFetchTreeState.updateNode(
112
+ node,
113
+ constraint.constraint,
114
+ !constraint.isSelected,
115
+ );
116
+ constraint.setIsSelected(!constraint.isSelected);
117
+ };
118
+
119
+ return (
120
+ <div className="constraints-selection-node">
121
+ <div
122
+ className="tree-view__node__container data-quality-validation-graph-fetch-tree__node__container"
123
+ style={{
124
+ paddingLeft: `${(level - 1) * (stepPaddingInRem ?? 2)}rem`,
125
+ display: 'flex',
126
+ }}
127
+ >
128
+ <div className="data-quality-validation-graph-fetch-tree__node__content">
129
+ <div className="tree-view__node__icon data-quality-validation-graph-fetch-tree__node__icon">
130
+ <div
131
+ className="data-quality-validation-graph-fetch-tree__expand-icon"
132
+ onClick={toggleExpandNode}
133
+ >
134
+ {nodeExpandIcon}
135
+ </div>
136
+ <div
137
+ className="data-quality-validation-graph-fetch-tree__type-icon"
138
+ onClick={toggleExpandNode}
139
+ >
140
+ {nodeTypeIcon}
141
+ </div>
142
+ </div>
143
+ <div
144
+ className="tree-view__node__label data-quality-validation-graph-fetch-tree__node__label"
145
+ onClick={toggleExpandNode}
146
+ >
147
+ {node.label}
148
+ {
149
+ <div className="data-quality-validation-graph-fetch-tree__node__type">
150
+ <div className="data-quality-validation-graph-fetch-tree__node__type__label">
151
+ {type ? type.name : ''}
152
+ </div>
153
+ </div>
154
+ }
155
+ </div>
156
+ </div>
157
+ {!node.isReadOnly ? (
158
+ <div className="data-quality-validation-graph-fetch-tree__node__actions">
159
+ <button
160
+ className="data-quality-validation-graph-fetch-tree__node__action"
161
+ title="Remove"
162
+ tabIndex={-1}
163
+ onClick={deleteNode}
164
+ disabled={isReadOnly}
165
+ >
166
+ <TimesIcon />
167
+ </button>
168
+ </div>
169
+ ) : (
170
+ <div />
171
+ )}
172
+ </div>
173
+ {node.constraints.length ? (
174
+ <div
175
+ style={{
176
+ paddingLeft: `${(level + 2) * (stepPaddingInRem ?? 2)}rem`,
177
+ display: 'flex',
178
+ flexDirection: 'column',
179
+ }}
180
+ >
181
+ {node.constraints.map((constraint) => (
182
+ <div
183
+ className="data-quality-validation-graph-fetch-tree__node__label data-quality-validation-graph-fetch-tree__node__constraint"
184
+ key={constraint.lambdaId}
185
+ onClick={() => {
186
+ toggleChecked(constraint);
187
+ }}
188
+ >
189
+ <button
190
+ className={clsx(
191
+ 'panel__content__form__section__toggler__btn',
192
+ 'data-quality-validation-graph-fetch-tree__constraint__checkbox',
193
+ {
194
+ 'panel__content__form__section__toggler__btn--toggled':
195
+ constraint.isSelected,
196
+ },
197
+ )}
198
+ >
199
+ {constraint.isSelected ? <CheckSquareIcon /> : <SquareIcon />}
200
+ </button>
201
+ <div className="data-quality-validation-graph-fetch-tree__constraint__name">
202
+ {constraint.constraint.name}
203
+ </div>
204
+ <div className="data-quality-validation-graph-fetch-tree__constraint__value">
205
+ {constraint.lambdaString}
206
+ </div>
207
+ </div>
208
+ ))}
209
+ </div>
210
+ ) : (
211
+ <></>
212
+ )}
213
+ </div>
214
+ );
215
+ },
216
+ );
217
+
218
+ export const ConstraintsSelectionExplorer = observer(
219
+ (props: {
220
+ constraintsClasses: DataQualityGraphFetchTreeData;
221
+ dataQualityState: DataQualityState;
222
+ updateTreeData: (data: DataQualityGraphFetchTreeData) => void;
223
+ }) => {
224
+ const { constraintsClasses, dataQualityState, updateTreeData } = props;
225
+ const { applicationStore } = dataQualityState;
226
+ const getChildNodes = (
227
+ node: DataQualityGraphFetchTreeNodeData,
228
+ ): DataQualityGraphFetchTreeNodeData[] =>
229
+ node.childrenIds
230
+ .map((id) => constraintsClasses.nodes.get(id))
231
+ .filter(
232
+ (_node): _node is DataQualityGraphFetchTreeNodeData =>
233
+ _node instanceof DataQualityGraphFetchTreeNodeData,
234
+ )
235
+ .sort((a, b) => a.label.localeCompare(b.label))
236
+ .sort(
237
+ (a, b) =>
238
+ getQueryBuilderExplorerTreeNodeSortRank(b) -
239
+ getQueryBuilderExplorerTreeNodeSortRank(a),
240
+ );
241
+ const removeNode = (node: DataQualityGraphFetchTreeNodeData): void => {
242
+ removeNodeRecursively(constraintsClasses, node);
243
+ updateTreeData({ ...constraintsClasses });
244
+ dataQualityClassValidation_setDataQualityGraphFetchTree(
245
+ dataQualityState.constraintsConfigurationElement as DataQualityClassValidationsConfiguration,
246
+ constraintsClasses.tree,
247
+ );
248
+ };
249
+
250
+ const showStructuralValidations = () => {
251
+ dataQualityState.setShowStructuralValidations(true);
252
+ flowResult(dataQualityState.fetchStructuralValidations()).catch(
253
+ applicationStore.alertUnhandledError,
254
+ );
255
+ };
256
+
257
+ const disableSyncToDQ = Boolean(
258
+ !dataQualityState.dataQualityGraphFetchTreeState.treeData,
259
+ );
260
+
261
+ return (
262
+ <div className="data-quality-validation-graph-fetch-constraints-selection__config-group__content">
263
+ <div className="data-quality-validation-graph-fetch-constraints-selection__structural-attributes">
264
+ <button
265
+ className="btn--dark structure-validations-btn"
266
+ onClick={showStructuralValidations}
267
+ disabled={Boolean(disableSyncToDQ)}
268
+ tabIndex={-1}
269
+ title="Show Structural Attributes to be validated during run"
270
+ >
271
+ Show Structural Attributes
272
+ </button>
273
+ </div>
274
+ <div className="data-quality-validation-graph-fetch-constraints-selection__config-group__item">
275
+ <TreeView
276
+ components={{
277
+ TreeNodeContainer: DataQualityConstraintsTreeNodeContainer,
278
+ }}
279
+ className="data-quality-validation-graph-fetch-tree__container__tree"
280
+ treeData={constraintsClasses}
281
+ getChildNodes={getChildNodes}
282
+ innerProps={{
283
+ dataQualityState,
284
+ isReadOnly: false,
285
+ removeNode,
286
+ }}
287
+ />
288
+ </div>
289
+ <DataQualityStructuralValidationsPanel
290
+ dataQualityState={dataQualityState}
291
+ />
292
+ </div>
293
+ );
294
+ },
295
+ );
296
+
297
+ export const DataQualityConstraintsSelection = observer(
298
+ (props: { dataQualityState: DataQualityState }) => {
299
+ const { dataQualityState } = props;
300
+ const constraintsConfiguration =
301
+ dataQualityState.constraintsConfigurationElement;
302
+ const dataQualityGraphFetchTreeState =
303
+ dataQualityState.dataQualityGraphFetchTreeState;
304
+ const treeData = dataQualityGraphFetchTreeState.treeData;
305
+
306
+ const updateTreeData = (data: DataQualityGraphFetchTreeData): void => {
307
+ dataQualityGraphFetchTreeState.setGraphFetchTree(data);
308
+ };
309
+
310
+ const handleDrop = useCallback(
311
+ (item: QueryBuilderExplorerTreeDragSource): void => {
312
+ dataQualityGraphFetchTreeState.addProperty(item.node, {
313
+ refreshTreeData: true,
314
+ });
315
+ if (dataQualityGraphFetchTreeState.treeData) {
316
+ dataQualityClassValidation_setDataQualityGraphFetchTree(
317
+ constraintsConfiguration as DataQualityClassValidationsConfiguration,
318
+ dataQualityGraphFetchTreeState.treeData.tree,
319
+ );
320
+ }
321
+ },
322
+ [dataQualityGraphFetchTreeState, constraintsConfiguration],
323
+ );
324
+
325
+ const [{ isDragOver }, dropTargetConnector] = useDrop<
326
+ QueryBuilderExplorerTreeDragSource,
327
+ void,
328
+ { isDragOver: boolean }
329
+ >(
330
+ () => ({
331
+ accept: [
332
+ QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.CLASS_PROPERTY,
333
+ QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY,
334
+ ],
335
+ drop: (item, monitor): void => {
336
+ if (!monitor.didDrop()) {
337
+ handleDrop(item);
338
+ } // prevent drop event propagation to accomondate for nested DnD
339
+ },
340
+ collect: (monitor) => ({
341
+ isDragOver: monitor.isOver({ shallow: true }),
342
+ }),
343
+ }),
344
+ [handleDrop],
345
+ );
346
+
347
+ return (
348
+ <div
349
+ data-testid={
350
+ DATA_QUALITY_VALIDATION_TEST_ID.DATA_QUALITY_VALIDATION_TREE
351
+ }
352
+ className="constraints-selection-tab"
353
+ >
354
+ <PanelDropZone
355
+ isDragOver={isDragOver}
356
+ dropTargetConnector={dropTargetConnector}
357
+ contentClassName="data-quality-validation-graph-fetch-panel"
358
+ >
359
+ {(!treeData || isConstraintsClassesTreeEmpty(treeData)) && (
360
+ <BlankPanelPlaceholder
361
+ text="Add a scope for constraints"
362
+ tooltipText="Drag and drop properties here"
363
+ />
364
+ )}
365
+ {treeData && !isConstraintsClassesTreeEmpty(treeData) && (
366
+ <ConstraintsSelectionExplorer
367
+ constraintsClasses={treeData}
368
+ dataQualityState={dataQualityState}
369
+ updateTreeData={updateTreeData}
370
+ />
371
+ )}
372
+ </PanelDropZone>
373
+ </div>
374
+ );
375
+ },
376
+ );