@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,87 @@
1
+ {
2
+ "name": "@finos/legend-extension-dsl-data-quality",
3
+ "version": "1.0.0",
4
+ "description": "Legend extension for Data Quality",
5
+ "keywords": [
6
+ "legend",
7
+ "legend-extension",
8
+ "dsl",
9
+ "dsl-data-quality"
10
+ ],
11
+ "homepage": "https://github.com/finos/legend-studio/tree/master/packages/legend-extension-dsl-data-quality",
12
+ "bugs": {
13
+ "url": "https://github.com/finos/legend-studio/issues"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/finos/legend-studio.git",
18
+ "directory": "packages/legend-extension-dsl-data-quality"
19
+ },
20
+ "license": "Apache-2.0",
21
+ "sideEffects": false,
22
+ "type": "module",
23
+ "exports": {
24
+ "./graph": "./lib/graph-manager/index.js",
25
+ "./application-studio": "./lib/components/index.js",
26
+ "./lib/index.css": "./lib/index.css"
27
+ },
28
+ "scripts": {
29
+ "build": "yarn clean && yarn build:sass && yarn build:ts",
30
+ "build:sass": "cross-env INIT_CWD=$INIT_CWD node ../../scripts/workflow/buildSass.js",
31
+ "build:ts": "tsc --project ./tsconfig.build.json",
32
+ "clean": "npm-run-all clean:cache clean:lib",
33
+ "clean:cache": "rimraf \"build\"",
34
+ "clean:lib": "rimraf \"lib\"",
35
+ "dev": "npm-run-all --parallel dev:sass dev:ts",
36
+ "dev:sass": "sass style:lib --watch --load-path=../../node_modules/@finos/legend-art/scss",
37
+ "dev:ts": "tsc --watch --preserveWatchOutput",
38
+ "lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location ./build/.eslintcache --report-unused-disable-directives --parser-options=project:\"./tsconfig.json\" \"./src/**/*.{js,ts,tsx}\"",
39
+ "publish:prepare": "node ../../scripts/release/preparePublishContent.js",
40
+ "publish:snapshot": "node ../../scripts/release/publishDevSnapshot.js",
41
+ "test": "jest",
42
+ "test:watch": "jest --watch"
43
+ },
44
+ "dependencies": {
45
+ "@finos/legend-application": "workspace:*",
46
+ "@finos/legend-application-studio": "workspace:*",
47
+ "@finos/legend-art": "workspace:*",
48
+ "@finos/legend-extension-dsl-data-space": "workspace:*",
49
+ "@finos/legend-graph": "workspace:*",
50
+ "@finos/legend-lego": "workspace:*",
51
+ "@finos/legend-query-builder": "workspace:*",
52
+ "@finos/legend-shared": "workspace:*",
53
+ "@finos/legend-storage": "workspace:*",
54
+ "@types/react": "18.3.3",
55
+ "@types/react-dom": "18.3.0",
56
+ "mobx": "6.12.3",
57
+ "mobx-react-lite": "4.0.7",
58
+ "react": "18.3.1",
59
+ "react-dnd": "16.0.1",
60
+ "react-dom": "18.3.1",
61
+ "serializr": "3.0.2"
62
+ },
63
+ "devDependencies": {
64
+ "@finos/legend-dev-utils": "workspace:*",
65
+ "@jest/globals": "29.7.0",
66
+ "cross-env": "7.0.3",
67
+ "eslint": "8.57.0",
68
+ "jest": "29.7.0",
69
+ "npm-run-all": "4.1.5",
70
+ "rimraf": "5.0.7",
71
+ "sass": "1.77.4",
72
+ "typescript": "5.4.5"
73
+ },
74
+ "peerDependencies": {
75
+ "react": "^18.0.0"
76
+ },
77
+ "publishConfig": {
78
+ "directory": "build/publishContent"
79
+ },
80
+ "extensions": {
81
+ "graphManagerPreset": "@finos/legend-graph-manager-preset-dsl-data-quality",
82
+ "applicationStudioPlugin": "@finos/legend-application-plugin-data-quality",
83
+ "pureGraphPlugin": "@finos/legend-pure-graph-plugin-dsl-data-quality",
84
+ "pureGraphManagerPlugin": "@finos/legend-pure-graph-manager-plugin-dsl-data-quality",
85
+ "pureProtocolProcessorPlugin": "@finos/legend-pure-protocol-processor-plugin-dsl-data-quality"
86
+ }
87
+ }
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "@finos/legend-extension-dsl-data-quality",
3
+ "version": "1.0.0",
4
+ "description": "Legend extension for Data Quality",
5
+ "keywords": [
6
+ "legend",
7
+ "legend-extension",
8
+ "dsl",
9
+ "dsl-data-quality"
10
+ ],
11
+ "homepage": "https://github.com/finos/legend-studio/tree/master/packages/legend-extension-dsl-data-quality",
12
+ "bugs": {
13
+ "url": "https://github.com/finos/legend-studio/issues"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/finos/legend-studio.git",
18
+ "directory": "packages/legend-extension-dsl-data-quality"
19
+ },
20
+ "license": "Apache-2.0",
21
+ "sideEffects": false,
22
+ "type": "module",
23
+ "exports": {
24
+ "./graph": "./lib/graph-manager/index.js",
25
+ "./application-studio": "./lib/components/index.js",
26
+ "./lib/index.css": "./lib/index.css"
27
+ },
28
+ "scripts": {
29
+ "build": "yarn clean && yarn build:sass && yarn build:ts",
30
+ "build:sass": "cross-env INIT_CWD=$INIT_CWD node ../../scripts/workflow/buildSass.js",
31
+ "build:ts": "tsc --project ./tsconfig.build.json",
32
+ "clean": "npm-run-all clean:cache clean:lib",
33
+ "clean:cache": "rimraf \"build\"",
34
+ "clean:lib": "rimraf \"lib\"",
35
+ "dev": "npm-run-all --parallel dev:sass dev:ts",
36
+ "dev:sass": "sass style:lib --watch --load-path=../../node_modules/@finos/legend-art/scss",
37
+ "dev:ts": "tsc --watch --preserveWatchOutput",
38
+ "lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location ./build/.eslintcache --report-unused-disable-directives --parser-options=project:\"./tsconfig.json\" \"./src/**/*.{js,ts,tsx}\"",
39
+ "publish:prepare": "node ../../scripts/release/preparePublishContent.js",
40
+ "publish:snapshot": "node ../../scripts/release/publishDevSnapshot.js",
41
+ "test": "jest",
42
+ "test:watch": "jest --watch"
43
+ },
44
+ "dependencies": {
45
+ "@finos/legend-application": "15.1.13",
46
+ "@finos/legend-application-studio": "28.17.17",
47
+ "@finos/legend-art": "7.1.41",
48
+ "@finos/legend-extension-dsl-data-space": "10.3.34",
49
+ "@finos/legend-graph": "31.10.8",
50
+ "@finos/legend-lego": "1.2.44",
51
+ "@finos/legend-query-builder": "4.14.56",
52
+ "@finos/legend-shared": "10.0.43",
53
+ "@finos/legend-storage": "3.0.93",
54
+ "@types/react": "18.3.3",
55
+ "@types/react-dom": "18.3.0",
56
+ "mobx": "6.12.3",
57
+ "mobx-react-lite": "4.0.7",
58
+ "react": "18.3.1",
59
+ "react-dnd": "16.0.1",
60
+ "react-dom": "18.3.1",
61
+ "serializr": "3.0.2"
62
+ },
63
+ "devDependencies": {
64
+ "@finos/legend-dev-utils": "2.1.11",
65
+ "@jest/globals": "29.7.0",
66
+ "cross-env": "7.0.3",
67
+ "eslint": "8.57.0",
68
+ "jest": "29.7.0",
69
+ "npm-run-all": "4.1.5",
70
+ "rimraf": "5.0.7",
71
+ "sass": "1.77.4",
72
+ "typescript": "5.4.5"
73
+ },
74
+ "peerDependencies": {
75
+ "react": "^18.0.0"
76
+ },
77
+ "publishConfig": {
78
+ "directory": "build/publishContent"
79
+ },
80
+ "extensions": {
81
+ "graphManagerPreset": "@finos/legend-graph-manager-preset-dsl-data-quality",
82
+ "applicationStudioPlugin": "@finos/legend-application-plugin-data-quality",
83
+ "pureGraphPlugin": "@finos/legend-pure-graph-plugin-dsl-data-quality",
84
+ "pureGraphManagerPlugin": "@finos/legend-pure-graph-manager-plugin-dsl-data-quality",
85
+ "pureProtocolProcessorPlugin": "@finos/legend-pure-protocol-processor-plugin-dsl-data-quality"
86
+ }
87
+ }
@@ -0,0 +1,175 @@
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 {
18
+ type EditorStore,
19
+ NewElementDriver,
20
+ } from '@finos/legend-application-studio';
21
+ import {
22
+ DataQualityClassValidationsConfiguration,
23
+ DataSpaceDataQualityExecutionContext,
24
+ MappingAndRuntimeDataQualityExecutionContext,
25
+ } from '../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
26
+ import { action, computed, makeObservable, observable } from 'mobx';
27
+ import {
28
+ filterByType,
29
+ getNullableFirstEntry,
30
+ guaranteeNonNullable,
31
+ } from '@finos/legend-shared';
32
+ import {
33
+ type Mapping,
34
+ type PackageableRuntime,
35
+ getMappingCompatibleRuntimes,
36
+ PackageableElementExplicitReference,
37
+ } from '@finos/legend-graph';
38
+ import {
39
+ type PackageableElementOption,
40
+ buildElementOption,
41
+ } from '@finos/legend-lego/graph-editor';
42
+ import { DataSpace } from '@finos/legend-extension-dsl-data-space/graph';
43
+
44
+ export type RuntimeOption = {
45
+ label: string;
46
+ value: PackageableRuntime | undefined;
47
+ };
48
+
49
+ export enum ELEMENT_CREATION_BASIS {
50
+ MAPPING_RUNTIME_BASED = 'Mapping/Runtime',
51
+ DATASPACE_BASED = 'DataSpace',
52
+ }
53
+
54
+ export class DataQuality_ClassElementDriver extends NewElementDriver<DataQualityClassValidationsConfiguration> {
55
+ dqElementCreationBasis: ELEMENT_CREATION_BASIS;
56
+ dataSpaceSelected: PackageableElementOption<DataSpace> | undefined;
57
+ mappingSelected: PackageableElementOption<Mapping> | undefined;
58
+ runtimeSelected: RuntimeOption | undefined;
59
+
60
+ constructor(editorStore: EditorStore) {
61
+ super(editorStore);
62
+
63
+ makeObservable(this, {
64
+ dataSpaceSelected: observable,
65
+ mappingSelected: observable,
66
+ runtimeSelected: observable,
67
+ dqElementCreationBasis: observable,
68
+ setDataSpaceSelected: action,
69
+ setMappingSelected: action,
70
+ setRuntimeSelected: action,
71
+ setDqElementCreationBasis: action,
72
+ runtimeOptions: computed,
73
+ });
74
+ this.dqElementCreationBasis = ELEMENT_CREATION_BASIS.DATASPACE_BASED;
75
+ this.dataSpaceSelected = getNullableFirstEntry(this.dataSpaceOptions);
76
+ this.mappingSelected = getNullableFirstEntry(this.mappingOptions);
77
+ this.runtimeSelected = getNullableFirstEntry(this.runtimeOptions);
78
+ }
79
+
80
+ get dataSpaceOptions(): PackageableElementOption<DataSpace>[] {
81
+ return this.editorStore.graphManagerState.graph.allOwnElements
82
+ .filter(filterByType(DataSpace))
83
+ .map(buildElementOption);
84
+ }
85
+
86
+ get mappingOptions(): PackageableElementOption<Mapping>[] {
87
+ return this.editorStore.graphManagerState.usableMappings.map(
88
+ buildElementOption,
89
+ );
90
+ }
91
+
92
+ get compatibleMappingRuntimes(): PackageableRuntime[] {
93
+ return this.mappingSelected?.value
94
+ ? getMappingCompatibleRuntimes(
95
+ this.mappingSelected.value,
96
+ this.editorStore.graphManagerState.usableRuntimes,
97
+ )
98
+ : [];
99
+ }
100
+
101
+ get runtimeOptions(): RuntimeOption[] {
102
+ return this.compatibleMappingRuntimes.map((runtime) =>
103
+ buildElementOption(runtime),
104
+ );
105
+ }
106
+
107
+ setDataSpaceSelected(
108
+ dataSpace: PackageableElementOption<DataSpace> | undefined,
109
+ ): void {
110
+ this.dataSpaceSelected = dataSpace;
111
+ }
112
+
113
+ setMappingSelected(
114
+ mappingSelected: PackageableElementOption<Mapping> | undefined,
115
+ ): void {
116
+ this.mappingSelected = mappingSelected;
117
+ }
118
+
119
+ setRuntimeSelected(runtimeSelected: RuntimeOption | undefined): void {
120
+ this.runtimeSelected = runtimeSelected;
121
+ }
122
+
123
+ setDqElementCreationBasis(
124
+ dqElementCreationBasis: ELEMENT_CREATION_BASIS,
125
+ ): void {
126
+ this.dqElementCreationBasis = dqElementCreationBasis;
127
+ }
128
+
129
+ get isValid(): boolean {
130
+ if (
131
+ this.dqElementCreationBasis === ELEMENT_CREATION_BASIS.DATASPACE_BASED
132
+ ) {
133
+ return Boolean(this.dataSpaceSelected);
134
+ }
135
+ return Boolean(this.mappingSelected && this.runtimeSelected);
136
+ }
137
+
138
+ createElement(name: string): DataQualityClassValidationsConfiguration {
139
+ const dataQualityConstraintsConfiguration =
140
+ new DataQualityClassValidationsConfiguration(name);
141
+ if (
142
+ this.dqElementCreationBasis === ELEMENT_CREATION_BASIS.DATASPACE_BASED
143
+ ) {
144
+ const dataSpaceToSet = PackageableElementExplicitReference.create(
145
+ this.dataSpaceSelected!.value,
146
+ );
147
+ const dataSpaceExecutionContext =
148
+ new DataSpaceDataQualityExecutionContext();
149
+ dataSpaceExecutionContext.context =
150
+ dataSpaceToSet.value.defaultExecutionContext.name;
151
+ dataSpaceExecutionContext.dataSpace = dataSpaceToSet;
152
+ dataQualityConstraintsConfiguration.context = dataSpaceExecutionContext;
153
+ dataQualityConstraintsConfiguration.dataQualityRootGraphFetchTree =
154
+ undefined;
155
+ } else {
156
+ if (this.mappingSelected && this.runtimeSelected) {
157
+ const mappingOption = guaranteeNonNullable(this.mappingSelected);
158
+ const _mapping = mappingOption.value;
159
+ const mapping = PackageableElementExplicitReference.create(_mapping);
160
+ const runtimeOption = guaranteeNonNullable(this.runtimeSelected.value);
161
+ const runtimeValue =
162
+ PackageableElementExplicitReference.create(runtimeOption);
163
+ const mappingAndRuntimeExecutionContext =
164
+ new MappingAndRuntimeDataQualityExecutionContext();
165
+ mappingAndRuntimeExecutionContext.mapping = mapping;
166
+ mappingAndRuntimeExecutionContext.runtime = runtimeValue;
167
+ dataQualityConstraintsConfiguration.context =
168
+ mappingAndRuntimeExecutionContext;
169
+ }
170
+ dataQualityConstraintsConfiguration.dataQualityRootGraphFetchTree =
171
+ undefined;
172
+ }
173
+ return dataQualityConstraintsConfiguration;
174
+ }
175
+ }
@@ -0,0 +1,220 @@
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 packageJson from '../../package.json';
18
+ import {
19
+ type DSL_LegendStudioApplicationPlugin_Extension,
20
+ type ElementClassifier,
21
+ type ElementEditorRenderer,
22
+ type ElementEditorStateCreator,
23
+ type ElementIconGetter,
24
+ type ElementTypeLabelGetter,
25
+ type NewElementDriverCreator,
26
+ type NewElementDriverEditorRenderer,
27
+ type NewElementFromStateCreator,
28
+ type ElementEditorState,
29
+ type NewElementDriver,
30
+ type EditorStore,
31
+ type NewElementState,
32
+ LegendStudioApplicationPlugin,
33
+ PACKAGEABLE_ELEMENT_GROUP_BY_CATEGORY,
34
+ } from '@finos/legend-application-studio';
35
+ import type { PackageableElement } from '@finos/legend-graph';
36
+ import {
37
+ DataQualityClassValidationsConfiguration,
38
+ DataQualityServiceValidationConfiguration,
39
+ } from '../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
40
+ import { EyeIcon } from '@finos/legend-art';
41
+ import { DataQualityClassValidationEditor } from './DataQualityClassValidationEditor.js';
42
+ import { DataQuality_ClassElementDriver } from './DSL_DataQuality_ClassElementDriver.js';
43
+ import { NewDataQualityServiceValidationElementEditor } from './DSL_NewDataQualityServiceValidationElement.js';
44
+ import { DataQuality_ServiceElementDriver } from './DSL_DataQuality_ServiceElementDriver.js';
45
+ import { DataQualityServiceValidationEditor } from './DataQualityServiceValidationEditor.js';
46
+ import { DataQualityClassValidationState } from './states/DataQualityClassValidationState.js';
47
+ import { NewDataQualityClassValidationElementEditor } from './DSL_NewDataQualityClassValidationElement.js';
48
+ import { type ReactNode } from 'react';
49
+ import { DataQualityServiceValidationState } from './states/DataQualityServiceValidationState.js';
50
+
51
+ const DATA_QUALITY_ELEMENT_TYPE = 'DATAQUALITY';
52
+ const DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE =
53
+ 'DATAQUALITYSERVICEVALIDATION';
54
+
55
+ const DATA_QUALITY_ELEMENT_TYPE_LABEL = 'Data Quality Class Validation';
56
+ const DATA_QUALITY_SERVICE_VALIDATION_TYPE_LABEL =
57
+ 'Data Quality Service Validation';
58
+
59
+ export class DSL_DataQuality_LegendStudioApplicationPlugin
60
+ extends LegendStudioApplicationPlugin
61
+ implements DSL_LegendStudioApplicationPlugin_Extension
62
+ {
63
+ constructor() {
64
+ super(packageJson.extensions.applicationStudioPlugin, packageJson.version);
65
+ }
66
+
67
+ getExtraSupportedElementTypes(): string[] {
68
+ return [
69
+ DATA_QUALITY_ELEMENT_TYPE,
70
+ DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE,
71
+ ];
72
+ }
73
+
74
+ getExtraSupportedElementTypesWithCategory(): Map<string, string[]> {
75
+ const elementTypeswithCategory = new Map<string, string[]>();
76
+ elementTypeswithCategory.set(PACKAGEABLE_ELEMENT_GROUP_BY_CATEGORY.OTHER, [
77
+ DATA_QUALITY_ELEMENT_TYPE,
78
+ // DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE,
79
+ ]);
80
+ return elementTypeswithCategory;
81
+ }
82
+
83
+ getExtraElementClassifiers(): ElementClassifier[] {
84
+ return [
85
+ (element: PackageableElement): string | undefined => {
86
+ if (element instanceof DataQualityClassValidationsConfiguration) {
87
+ return DATA_QUALITY_ELEMENT_TYPE;
88
+ }
89
+ if (element instanceof DataQualityServiceValidationConfiguration) {
90
+ return DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE;
91
+ }
92
+ return undefined;
93
+ },
94
+ ];
95
+ }
96
+
97
+ getExtraElementIconGetters(): ElementIconGetter[] {
98
+ return [
99
+ (type: string): React.ReactNode | undefined => {
100
+ if (type === DATA_QUALITY_ELEMENT_TYPE) {
101
+ return (
102
+ <div className="icon icon--dataQuality">
103
+ <EyeIcon />
104
+ </div>
105
+ );
106
+ }
107
+ if (type === DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE) {
108
+ return (
109
+ <div className="icon icon--dataQuality">
110
+ <EyeIcon />
111
+ </div>
112
+ );
113
+ }
114
+ return undefined;
115
+ },
116
+ ];
117
+ }
118
+
119
+ getExtraElementTypeLabelGetters(): ElementTypeLabelGetter[] {
120
+ return [
121
+ (type: string): string | undefined => {
122
+ if (type === DATA_QUALITY_ELEMENT_TYPE) {
123
+ return DATA_QUALITY_ELEMENT_TYPE_LABEL;
124
+ }
125
+ if (type === DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE) {
126
+ return DATA_QUALITY_SERVICE_VALIDATION_TYPE_LABEL;
127
+ }
128
+ return undefined;
129
+ },
130
+ ];
131
+ }
132
+
133
+ getExtraNewElementFromStateCreators(): NewElementFromStateCreator[] {
134
+ return [
135
+ (
136
+ type: string,
137
+ name: string,
138
+ state: NewElementState,
139
+ ): PackageableElement | undefined => {
140
+ if (type === DATA_QUALITY_ELEMENT_TYPE) {
141
+ return state
142
+ .getNewElementDriver(DataQuality_ClassElementDriver)
143
+ .createElement(name);
144
+ }
145
+ if (type === DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE) {
146
+ return state
147
+ .getNewElementDriver(DataQuality_ServiceElementDriver)
148
+ .createElement(name);
149
+ }
150
+ return undefined;
151
+ },
152
+ ];
153
+ }
154
+
155
+ getExtraElementEditorRenderers(): ElementEditorRenderer[] {
156
+ return [
157
+ (elementEditorState: ElementEditorState): React.ReactNode | undefined => {
158
+ if (elementEditorState instanceof DataQualityServiceValidationState) {
159
+ return (
160
+ <DataQualityServiceValidationEditor key={elementEditorState.uuid} />
161
+ );
162
+ }
163
+ if (elementEditorState instanceof DataQualityClassValidationState) {
164
+ return (
165
+ <DataQualityClassValidationEditor key={elementEditorState.uuid} />
166
+ );
167
+ }
168
+ return undefined;
169
+ },
170
+ ];
171
+ }
172
+
173
+ getExtraElementEditorStateCreators(): ElementEditorStateCreator[] {
174
+ return [
175
+ (
176
+ editorStore: EditorStore,
177
+ element: PackageableElement,
178
+ ): ElementEditorState | undefined => {
179
+ if (element instanceof DataQualityClassValidationsConfiguration) {
180
+ return new DataQualityClassValidationState(editorStore, element);
181
+ }
182
+ if (element instanceof DataQualityServiceValidationConfiguration) {
183
+ return new DataQualityServiceValidationState(editorStore, element);
184
+ }
185
+ return undefined;
186
+ },
187
+ ];
188
+ }
189
+
190
+ getExtraNewElementDriverEditorRenderers(): NewElementDriverEditorRenderer[] {
191
+ return [
192
+ (type: string): ReactNode | undefined => {
193
+ if (type === DATA_QUALITY_ELEMENT_TYPE) {
194
+ return <NewDataQualityClassValidationElementEditor />;
195
+ }
196
+ if (type === DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE) {
197
+ return <NewDataQualityServiceValidationElementEditor />;
198
+ }
199
+ return undefined;
200
+ },
201
+ ];
202
+ }
203
+
204
+ getExtraNewElementDriverCreators(): NewElementDriverCreator[] {
205
+ return [
206
+ (
207
+ editorStore: EditorStore,
208
+ type: string,
209
+ ): NewElementDriver<PackageableElement> | undefined => {
210
+ if (type === DATA_QUALITY_ELEMENT_TYPE) {
211
+ return new DataQuality_ClassElementDriver(editorStore);
212
+ }
213
+ if (type === DATA_QUALITY_SERVICE_VALIDATION_ELEMENT_TYPE) {
214
+ return new DataQuality_ServiceElementDriver(editorStore);
215
+ }
216
+ return undefined;
217
+ },
218
+ ];
219
+ }
220
+ }
@@ -0,0 +1,39 @@
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
+ import type { DataQualityState } from './states/DataQualityState.js';
17
+ import type {
18
+ EditorExtensionState,
19
+ EditorStore,
20
+ ElementEditorState,
21
+ LegendStudioApplicationPlugin,
22
+ } from '@finos/legend-application-studio';
23
+
24
+ export type ExtensionStateBuilder = (
25
+ editorStore: EditorStore,
26
+ dataQualityState: DataQualityState,
27
+ ) => EditorExtensionState | undefined;
28
+
29
+ export type ComponentRenderer = (
30
+ tabName: string,
31
+ elementEditorState: ElementEditorState,
32
+ ) => React.ReactNode | undefined;
33
+
34
+ export interface DSL_DataQuality_LegendStudioPlugin_Extension
35
+ extends LegendStudioApplicationPlugin {
36
+ getExtensionStates?(): ExtensionStateBuilder[];
37
+ getComponentRenderers?(): ComponentRenderer[];
38
+ getAllTabs?(): (() => string[])[];
39
+ }
@@ -0,0 +1,57 @@
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 {
18
+ type EditorStore,
19
+ NewElementDriver,
20
+ } from '@finos/legend-application-studio';
21
+ import { DataQualityServiceValidationConfiguration } from '../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
22
+ import { action, makeObservable, observable } from 'mobx';
23
+ import type { Service } from '@finos/legend-graph';
24
+ import {
25
+ type PackageableElementOption,
26
+ buildElementOption,
27
+ } from '@finos/legend-lego/graph-editor';
28
+
29
+ export class DataQuality_ServiceElementDriver extends NewElementDriver<DataQualityServiceValidationConfiguration> {
30
+ serviceSelected: PackageableElementOption<Service> | undefined;
31
+
32
+ constructor(editorStore: EditorStore) {
33
+ super(editorStore);
34
+
35
+ makeObservable(this, {
36
+ serviceSelected: observable,
37
+ setServiceSelected: action,
38
+ });
39
+
40
+ this.serviceSelected =
41
+ editorStore.graphManagerState.usableServices.map(buildElementOption)[0];
42
+ }
43
+
44
+ setServiceSelected(
45
+ serviceSelected: PackageableElementOption<Service> | undefined,
46
+ ): void {
47
+ this.serviceSelected = serviceSelected;
48
+ }
49
+
50
+ get isValid(): boolean {
51
+ return Boolean(this.serviceSelected);
52
+ }
53
+
54
+ createElement(name: string): DataQualityServiceValidationConfiguration {
55
+ return new DataQualityServiceValidationConfiguration(name);
56
+ }
57
+ }