@memberjunction/ng-dashboards 5.30.1 → 5.32.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 (424) hide show
  1. package/dist/AI/components/agents/agent-configuration.component.d.ts.map +1 -1
  2. package/dist/AI/components/agents/agent-configuration.component.js +4 -4
  3. package/dist/AI/components/agents/agent-configuration.component.js.map +1 -1
  4. package/dist/AI/components/agents/agent-editor.component.d.ts +2 -1
  5. package/dist/AI/components/agents/agent-editor.component.d.ts.map +1 -1
  6. package/dist/AI/components/agents/agent-editor.component.js +8 -6
  7. package/dist/AI/components/agents/agent-editor.component.js.map +1 -1
  8. package/dist/AI/components/analytics/agent-runs/agent-run-analysis.component.d.ts +2 -1
  9. package/dist/AI/components/analytics/agent-runs/agent-run-analysis.component.d.ts.map +1 -1
  10. package/dist/AI/components/analytics/agent-runs/agent-run-analysis.component.js +6 -5
  11. package/dist/AI/components/analytics/agent-runs/agent-run-analysis.component.js.map +1 -1
  12. package/dist/AI/components/analytics/cost-budget/cost-budget.component.d.ts +2 -1
  13. package/dist/AI/components/analytics/cost-budget/cost-budget.component.d.ts.map +1 -1
  14. package/dist/AI/components/analytics/cost-budget/cost-budget.component.js +6 -5
  15. package/dist/AI/components/analytics/cost-budget/cost-budget.component.js.map +1 -1
  16. package/dist/AI/components/analytics/error-analysis/error-analysis.component.d.ts +2 -1
  17. package/dist/AI/components/analytics/error-analysis/error-analysis.component.d.ts.map +1 -1
  18. package/dist/AI/components/analytics/error-analysis/error-analysis.component.js +6 -5
  19. package/dist/AI/components/analytics/error-analysis/error-analysis.component.js.map +1 -1
  20. package/dist/AI/components/analytics/executive-summary/executive-summary.component.d.ts +2 -1
  21. package/dist/AI/components/analytics/executive-summary/executive-summary.component.d.ts.map +1 -1
  22. package/dist/AI/components/analytics/executive-summary/executive-summary.component.js +7 -4
  23. package/dist/AI/components/analytics/executive-summary/executive-summary.component.js.map +1 -1
  24. package/dist/AI/components/analytics/model-performance/model-performance.component.d.ts +3 -2
  25. package/dist/AI/components/analytics/model-performance/model-performance.component.d.ts.map +1 -1
  26. package/dist/AI/components/analytics/model-performance/model-performance.component.js +10 -6
  27. package/dist/AI/components/analytics/model-performance/model-performance.component.js.map +1 -1
  28. package/dist/AI/components/analytics/prompt-runs/prompt-run-analysis.component.d.ts +2 -1
  29. package/dist/AI/components/analytics/prompt-runs/prompt-run-analysis.component.d.ts.map +1 -1
  30. package/dist/AI/components/analytics/prompt-runs/prompt-run-analysis.component.js +6 -5
  31. package/dist/AI/components/analytics/prompt-runs/prompt-run-analysis.component.js.map +1 -1
  32. package/dist/AI/components/analytics/usage-patterns/usage-patterns.component.d.ts +2 -1
  33. package/dist/AI/components/analytics/usage-patterns/usage-patterns.component.d.ts.map +1 -1
  34. package/dist/AI/components/analytics/usage-patterns/usage-patterns.component.js +6 -5
  35. package/dist/AI/components/analytics/usage-patterns/usage-patterns.component.js.map +1 -1
  36. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
  37. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +55 -52
  38. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
  39. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +15 -15
  40. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
  41. package/dist/AI/components/execution-monitoring.component.d.ts.map +1 -1
  42. package/dist/AI/components/execution-monitoring.component.js +4 -3
  43. package/dist/AI/components/execution-monitoring.component.js.map +1 -1
  44. package/dist/AI/components/models/model-management.component.js +2 -2
  45. package/dist/AI/components/models/model-management.component.js.map +1 -1
  46. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts +2 -1
  47. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
  48. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +10 -8
  49. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
  50. package/dist/AI/components/prompts/prompt-management.component.d.ts.map +1 -1
  51. package/dist/AI/components/prompts/prompt-management.component.js +2 -2
  52. package/dist/AI/components/prompts/prompt-management.component.js.map +1 -1
  53. package/dist/AI/components/prompts/prompt-version-control.component.d.ts +2 -1
  54. package/dist/AI/components/prompts/prompt-version-control.component.d.ts.map +1 -1
  55. package/dist/AI/components/prompts/prompt-version-control.component.js +13 -10
  56. package/dist/AI/components/prompts/prompt-version-control.component.js.map +1 -1
  57. package/dist/AI/components/requests/agent-requests-resource.component.js +1 -1
  58. package/dist/AI/components/requests/agent-requests-resource.component.js.map +1 -1
  59. package/dist/AI/components/tags/tags-resource.component.d.ts +1181 -0
  60. package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -0
  61. package/dist/AI/components/tags/tags-resource.component.js +7487 -0
  62. package/dist/AI/components/tags/tags-resource.component.js.map +1 -0
  63. package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
  64. package/dist/AI/components/vectors/vector-management-resource.component.js +25 -21
  65. package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
  66. package/dist/AI/index.d.ts +1 -0
  67. package/dist/AI/index.d.ts.map +1 -1
  68. package/dist/AI/index.js +5 -0
  69. package/dist/AI/index.js.map +1 -1
  70. package/dist/AI/services/ai-instrumentation.service.d.ts +5 -0
  71. package/dist/AI/services/ai-instrumentation.service.d.ts.map +1 -1
  72. package/dist/AI/services/ai-instrumentation.service.js +12 -4
  73. package/dist/AI/services/ai-instrumentation.service.js.map +1 -1
  74. package/dist/APIKeys/api-applications-panel.component.d.ts +3 -2
  75. package/dist/APIKeys/api-applications-panel.component.d.ts.map +1 -1
  76. package/dist/APIKeys/api-applications-panel.component.js +5 -4
  77. package/dist/APIKeys/api-applications-panel.component.js.map +1 -1
  78. package/dist/APIKeys/api-key-create-dialog.component.d.ts +2 -1
  79. package/dist/APIKeys/api-key-create-dialog.component.d.ts.map +1 -1
  80. package/dist/APIKeys/api-key-create-dialog.component.js +5 -5
  81. package/dist/APIKeys/api-key-create-dialog.component.js.map +1 -1
  82. package/dist/APIKeys/api-key-edit-panel.component.d.ts +3 -2
  83. package/dist/APIKeys/api-key-edit-panel.component.d.ts.map +1 -1
  84. package/dist/APIKeys/api-key-edit-panel.component.js +11 -10
  85. package/dist/APIKeys/api-key-edit-panel.component.js.map +1 -1
  86. package/dist/APIKeys/api-key-list.component.d.ts +2 -1
  87. package/dist/APIKeys/api-key-list.component.d.ts.map +1 -1
  88. package/dist/APIKeys/api-key-list.component.js +6 -5
  89. package/dist/APIKeys/api-key-list.component.js.map +1 -1
  90. package/dist/APIKeys/api-keys-resource.component.d.ts.map +1 -1
  91. package/dist/APIKeys/api-keys-resource.component.js +4 -4
  92. package/dist/APIKeys/api-keys-resource.component.js.map +1 -1
  93. package/dist/APIKeys/api-scopes-panel.component.d.ts +3 -2
  94. package/dist/APIKeys/api-scopes-panel.component.d.ts.map +1 -1
  95. package/dist/APIKeys/api-scopes-panel.component.js +8 -6
  96. package/dist/APIKeys/api-scopes-panel.component.js.map +1 -1
  97. package/dist/APIKeys/api-usage-panel.component.d.ts +3 -2
  98. package/dist/APIKeys/api-usage-panel.component.d.ts.map +1 -1
  99. package/dist/APIKeys/api-usage-panel.component.js +10 -8
  100. package/dist/APIKeys/api-usage-panel.component.js.map +1 -1
  101. package/dist/Actions/components/actions-list-view.component.d.ts +2 -1
  102. package/dist/Actions/components/actions-list-view.component.d.ts.map +1 -1
  103. package/dist/Actions/components/actions-list-view.component.js +6 -5
  104. package/dist/Actions/components/actions-list-view.component.js.map +1 -1
  105. package/dist/Actions/components/actions-overview.component.js +2 -2
  106. package/dist/Actions/components/actions-overview.component.js.map +1 -1
  107. package/dist/Actions/components/categories-list-view.component.d.ts +2 -1
  108. package/dist/Actions/components/categories-list-view.component.d.ts.map +1 -1
  109. package/dist/Actions/components/categories-list-view.component.js +6 -5
  110. package/dist/Actions/components/categories-list-view.component.js.map +1 -1
  111. package/dist/Actions/components/execution-monitoring.component.js +1 -1
  112. package/dist/Actions/components/execution-monitoring.component.js.map +1 -1
  113. package/dist/Actions/components/explorer/action-card.component.d.ts +2 -1
  114. package/dist/Actions/components/explorer/action-card.component.d.ts.map +1 -1
  115. package/dist/Actions/components/explorer/action-card.component.js +6 -4
  116. package/dist/Actions/components/explorer/action-card.component.js.map +1 -1
  117. package/dist/Actions/components/explorer/action-explorer.component.js +1 -1
  118. package/dist/Actions/components/explorer/action-explorer.component.js.map +1 -1
  119. package/dist/Actions/components/explorer/new-action-panel.component.d.ts +2 -1
  120. package/dist/Actions/components/explorer/new-action-panel.component.d.ts.map +1 -1
  121. package/dist/Actions/components/explorer/new-action-panel.component.js +7 -5
  122. package/dist/Actions/components/explorer/new-action-panel.component.js.map +1 -1
  123. package/dist/Actions/components/explorer/new-category-panel.component.d.ts +2 -1
  124. package/dist/Actions/components/explorer/new-category-panel.component.d.ts.map +1 -1
  125. package/dist/Actions/components/explorer/new-category-panel.component.js +7 -5
  126. package/dist/Actions/components/explorer/new-category-panel.component.js.map +1 -1
  127. package/dist/ApplicationRoles/application-roles-resource.component.js +4 -4
  128. package/dist/ApplicationRoles/application-roles-resource.component.js.map +1 -1
  129. package/dist/Communication/communication-logs-resource.component.js +1 -1
  130. package/dist/Communication/communication-logs-resource.component.js.map +1 -1
  131. package/dist/Communication/communication-monitor-resource.component.js +1 -1
  132. package/dist/Communication/communication-monitor-resource.component.js.map +1 -1
  133. package/dist/Communication/communication-providers-resource.component.js +3 -3
  134. package/dist/Communication/communication-providers-resource.component.js.map +1 -1
  135. package/dist/Communication/communication-runs-resource.component.js +1 -1
  136. package/dist/Communication/communication-runs-resource.component.js.map +1 -1
  137. package/dist/Communication/communication-templates-resource.component.js +3 -3
  138. package/dist/Communication/communication-templates-resource.component.js.map +1 -1
  139. package/dist/ComponentStudio/component-studio-dashboard.component.d.ts +1 -1
  140. package/dist/ComponentStudio/component-studio-dashboard.component.d.ts.map +1 -1
  141. package/dist/ComponentStudio/component-studio-dashboard.component.js +5 -4
  142. package/dist/ComponentStudio/component-studio-dashboard.component.js.map +1 -1
  143. package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.d.ts +2 -1
  144. package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.d.ts.map +1 -1
  145. package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.js +6 -4
  146. package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.js.map +1 -1
  147. package/dist/ComponentStudio/components/artifact-load-dialog.component.d.ts +11 -2
  148. package/dist/ComponentStudio/components/artifact-load-dialog.component.d.ts.map +1 -1
  149. package/dist/ComponentStudio/components/artifact-load-dialog.component.js +61 -27
  150. package/dist/ComponentStudio/components/artifact-load-dialog.component.js.map +1 -1
  151. package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts +4 -2
  152. package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts.map +1 -1
  153. package/dist/ComponentStudio/components/artifact-selection-dialog.component.js +19 -11
  154. package/dist/ComponentStudio/components/artifact-selection-dialog.component.js.map +1 -1
  155. package/dist/ComponentStudio/components/editors/data-requirements-editor.component.d.ts +4 -2
  156. package/dist/ComponentStudio/components/editors/data-requirements-editor.component.d.ts.map +1 -1
  157. package/dist/ComponentStudio/components/editors/data-requirements-editor.component.js +11 -3
  158. package/dist/ComponentStudio/components/editors/data-requirements-editor.component.js.map +1 -1
  159. package/dist/ComponentStudio/components/workspace/component-preview.component.d.ts +10 -1
  160. package/dist/ComponentStudio/components/workspace/component-preview.component.d.ts.map +1 -1
  161. package/dist/ComponentStudio/components/workspace/component-preview.component.js +18 -9
  162. package/dist/ComponentStudio/components/workspace/component-preview.component.js.map +1 -1
  163. package/dist/ComponentStudio/services/component-studio-state.service.d.ts +11 -1
  164. package/dist/ComponentStudio/services/component-studio-state.service.d.ts.map +1 -1
  165. package/dist/ComponentStudio/services/component-studio-state.service.js +23 -3
  166. package/dist/ComponentStudio/services/component-studio-state.service.js.map +1 -1
  167. package/dist/ComponentStudio/services/component-version.service.d.ts +6 -1
  168. package/dist/ComponentStudio/services/component-version.service.d.ts.map +1 -1
  169. package/dist/ComponentStudio/services/component-version.service.js +16 -6
  170. package/dist/ComponentStudio/services/component-version.service.js.map +1 -1
  171. package/dist/Credentials/components/credentials-audit-resource.component.js +1 -1
  172. package/dist/Credentials/components/credentials-audit-resource.component.js.map +1 -1
  173. package/dist/Credentials/components/credentials-categories-resource.component.d.ts.map +1 -1
  174. package/dist/Credentials/components/credentials-categories-resource.component.js +3 -3
  175. package/dist/Credentials/components/credentials-categories-resource.component.js.map +1 -1
  176. package/dist/Credentials/components/credentials-list-resource.component.d.ts.map +1 -1
  177. package/dist/Credentials/components/credentials-list-resource.component.js +3 -3
  178. package/dist/Credentials/components/credentials-list-resource.component.js.map +1 -1
  179. package/dist/Credentials/components/credentials-overview-resource.component.d.ts.map +1 -1
  180. package/dist/Credentials/components/credentials-overview-resource.component.js +3 -3
  181. package/dist/Credentials/components/credentials-overview-resource.component.js.map +1 -1
  182. package/dist/Credentials/components/credentials-types-resource.component.d.ts.map +1 -1
  183. package/dist/Credentials/components/credentials-types-resource.component.js +3 -3
  184. package/dist/Credentials/components/credentials-types-resource.component.js.map +1 -1
  185. package/dist/Credentials/credentials-dashboard.component.js +1 -1
  186. package/dist/Credentials/credentials-dashboard.component.js.map +1 -1
  187. package/dist/DashboardBrowser/dashboard-browser-resource.component.js +13 -13
  188. package/dist/DashboardBrowser/dashboard-browser-resource.component.js.map +1 -1
  189. package/dist/DashboardBrowser/dashboard-share-adapter.d.ts +4 -0
  190. package/dist/DashboardBrowser/dashboard-share-adapter.d.ts.map +1 -1
  191. package/dist/DashboardBrowser/dashboard-share-adapter.js +5 -2
  192. package/dist/DashboardBrowser/dashboard-share-adapter.js.map +1 -1
  193. package/dist/DashboardBrowser/dashboard-share-dialog.component.d.ts +3 -1
  194. package/dist/DashboardBrowser/dashboard-share-dialog.component.d.ts.map +1 -1
  195. package/dist/DashboardBrowser/dashboard-share-dialog.component.js +9 -4
  196. package/dist/DashboardBrowser/dashboard-share-dialog.component.js.map +1 -1
  197. package/dist/DataExplorer/components/navigation-panel/navigation-panel.component.d.ts +3 -2
  198. package/dist/DataExplorer/components/navigation-panel/navigation-panel.component.d.ts.map +1 -1
  199. package/dist/DataExplorer/components/navigation-panel/navigation-panel.component.js +7 -6
  200. package/dist/DataExplorer/components/navigation-panel/navigation-panel.component.js.map +1 -1
  201. package/dist/DataExplorer/components/view-selector/view-selector.component.d.ts +3 -2
  202. package/dist/DataExplorer/components/view-selector/view-selector.component.d.ts.map +1 -1
  203. package/dist/DataExplorer/components/view-selector/view-selector.component.js +6 -5
  204. package/dist/DataExplorer/components/view-selector/view-selector.component.js.map +1 -1
  205. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
  206. package/dist/DataExplorer/data-explorer-dashboard.component.js +10 -9
  207. package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
  208. package/dist/DataExplorer/services/explorer-state.service.d.ts +6 -1
  209. package/dist/DataExplorer/services/explorer-state.service.d.ts.map +1 -1
  210. package/dist/DataExplorer/services/explorer-state.service.js +15 -5
  211. package/dist/DataExplorer/services/explorer-state.service.js.map +1 -1
  212. package/dist/DatabaseDesigner/components/create-wizard/database-create-wizard.component.d.ts +64 -0
  213. package/dist/DatabaseDesigner/components/create-wizard/database-create-wizard.component.d.ts.map +1 -0
  214. package/dist/DatabaseDesigner/components/create-wizard/database-create-wizard.component.js +400 -0
  215. package/dist/DatabaseDesigner/components/create-wizard/database-create-wizard.component.js.map +1 -0
  216. package/dist/DatabaseDesigner/components/create-wizard/steps/step-basics.component.d.ts +42 -0
  217. package/dist/DatabaseDesigner/components/create-wizard/steps/step-basics.component.d.ts.map +1 -0
  218. package/dist/DatabaseDesigner/components/create-wizard/steps/step-basics.component.js +232 -0
  219. package/dist/DatabaseDesigner/components/create-wizard/steps/step-basics.component.js.map +1 -0
  220. package/dist/DatabaseDesigner/components/create-wizard/steps/step-fields.component.d.ts +14 -0
  221. package/dist/DatabaseDesigner/components/create-wizard/steps/step-fields.component.d.ts.map +1 -0
  222. package/dist/DatabaseDesigner/components/create-wizard/steps/step-fields.component.js +38 -0
  223. package/dist/DatabaseDesigner/components/create-wizard/steps/step-fields.component.js.map +1 -0
  224. package/dist/DatabaseDesigner/components/create-wizard/steps/step-pipeline.component.d.ts +24 -0
  225. package/dist/DatabaseDesigner/components/create-wizard/steps/step-pipeline.component.d.ts.map +1 -0
  226. package/dist/DatabaseDesigner/components/create-wizard/steps/step-pipeline.component.js +77 -0
  227. package/dist/DatabaseDesigner/components/create-wizard/steps/step-pipeline.component.js.map +1 -0
  228. package/dist/DatabaseDesigner/components/create-wizard/steps/step-relationships.component.d.ts +88 -0
  229. package/dist/DatabaseDesigner/components/create-wizard/steps/step-relationships.component.d.ts.map +1 -0
  230. package/dist/DatabaseDesigner/components/create-wizard/steps/step-relationships.component.js +404 -0
  231. package/dist/DatabaseDesigner/components/create-wizard/steps/step-relationships.component.js.map +1 -0
  232. package/dist/DatabaseDesigner/components/create-wizard/steps/step-review.component.d.ts +12 -0
  233. package/dist/DatabaseDesigner/components/create-wizard/steps/step-review.component.d.ts.map +1 -0
  234. package/dist/DatabaseDesigner/components/create-wizard/steps/step-review.component.js +116 -0
  235. package/dist/DatabaseDesigner/components/create-wizard/steps/step-review.component.js.map +1 -0
  236. package/dist/DatabaseDesigner/components/database-designer-dashboard.component.d.ts +55 -0
  237. package/dist/DatabaseDesigner/components/database-designer-dashboard.component.d.ts.map +1 -0
  238. package/dist/DatabaseDesigner/components/database-designer-dashboard.component.js +204 -0
  239. package/dist/DatabaseDesigner/components/database-designer-dashboard.component.js.map +1 -0
  240. package/dist/DatabaseDesigner/components/entity-list.component.d.ts +61 -0
  241. package/dist/DatabaseDesigner/components/entity-list.component.d.ts.map +1 -0
  242. package/dist/DatabaseDesigner/components/entity-list.component.js +485 -0
  243. package/dist/DatabaseDesigner/components/entity-list.component.js.map +1 -0
  244. package/dist/DatabaseDesigner/components/modify/database-modify.component.d.ts +52 -0
  245. package/dist/DatabaseDesigner/components/modify/database-modify.component.d.ts.map +1 -0
  246. package/dist/DatabaseDesigner/components/modify/database-modify.component.js +320 -0
  247. package/dist/DatabaseDesigner/components/modify/database-modify.component.js.map +1 -0
  248. package/dist/DatabaseDesigner/components/shared/database-preview-pane.component.d.ts +79 -0
  249. package/dist/DatabaseDesigner/components/shared/database-preview-pane.component.d.ts.map +1 -0
  250. package/dist/DatabaseDesigner/components/shared/database-preview-pane.component.js +378 -0
  251. package/dist/DatabaseDesigner/components/shared/database-preview-pane.component.js.map +1 -0
  252. package/dist/DatabaseDesigner/components/shared/entity-fields-grid.component.d.ts +85 -0
  253. package/dist/DatabaseDesigner/components/shared/entity-fields-grid.component.d.ts.map +1 -0
  254. package/dist/DatabaseDesigner/components/shared/entity-fields-grid.component.js +429 -0
  255. package/dist/DatabaseDesigner/components/shared/entity-fields-grid.component.js.map +1 -0
  256. package/dist/DatabaseDesigner/components/shared/entity-pipeline-panel.component.d.ts +58 -0
  257. package/dist/DatabaseDesigner/components/shared/entity-pipeline-panel.component.d.ts.map +1 -0
  258. package/dist/DatabaseDesigner/components/shared/entity-pipeline-panel.component.js +333 -0
  259. package/dist/DatabaseDesigner/components/shared/entity-pipeline-panel.component.js.map +1 -0
  260. package/dist/DatabaseDesigner/components/shared/entity-review-panel.component.d.ts +36 -0
  261. package/dist/DatabaseDesigner/components/shared/entity-review-panel.component.d.ts.map +1 -0
  262. package/dist/DatabaseDesigner/components/shared/entity-review-panel.component.js +345 -0
  263. package/dist/DatabaseDesigner/components/shared/entity-review-panel.component.js.map +1 -0
  264. package/dist/DatabaseDesigner/components/shared/wizard-step-indicator.component.d.ts +13 -0
  265. package/dist/DatabaseDesigner/components/shared/wizard-step-indicator.component.d.ts.map +1 -0
  266. package/dist/DatabaseDesigner/components/shared/wizard-step-indicator.component.js +81 -0
  267. package/dist/DatabaseDesigner/components/shared/wizard-step-indicator.component.js.map +1 -0
  268. package/dist/DatabaseDesigner/database-designer-dashboards.module.d.ts +30 -0
  269. package/dist/DatabaseDesigner/database-designer-dashboards.module.d.ts.map +1 -0
  270. package/dist/DatabaseDesigner/database-designer-dashboards.module.js +131 -0
  271. package/dist/DatabaseDesigner/database-designer-dashboards.module.js.map +1 -0
  272. package/dist/DatabaseDesigner/database-designer-erd.d.ts +19 -0
  273. package/dist/DatabaseDesigner/database-designer-erd.d.ts.map +1 -0
  274. package/dist/DatabaseDesigner/database-designer-erd.js +84 -0
  275. package/dist/DatabaseDesigner/database-designer-erd.js.map +1 -0
  276. package/dist/DatabaseDesigner/database-designer.types.d.ts +167 -0
  277. package/dist/DatabaseDesigner/database-designer.types.d.ts.map +1 -0
  278. package/dist/DatabaseDesigner/database-designer.types.js +26 -0
  279. package/dist/DatabaseDesigner/database-designer.types.js.map +1 -0
  280. package/dist/DatabaseDesigner/services/database-designer.engine.d.ts +94 -0
  281. package/dist/DatabaseDesigner/services/database-designer.engine.d.ts.map +1 -0
  282. package/dist/DatabaseDesigner/services/database-designer.engine.js +392 -0
  283. package/dist/DatabaseDesigner/services/database-designer.engine.js.map +1 -0
  284. package/dist/DatabaseDesigner/services/database-designer.service.d.ts +78 -0
  285. package/dist/DatabaseDesigner/services/database-designer.service.d.ts.map +1 -0
  286. package/dist/DatabaseDesigner/services/database-designer.service.js +273 -0
  287. package/dist/DatabaseDesigner/services/database-designer.service.js.map +1 -0
  288. package/dist/DatabaseDesigner/services/entity-wizard-state.service.d.ts +79 -0
  289. package/dist/DatabaseDesigner/services/entity-wizard-state.service.d.ts.map +1 -0
  290. package/dist/DatabaseDesigner/services/entity-wizard-state.service.js +204 -0
  291. package/dist/DatabaseDesigner/services/entity-wizard-state.service.js.map +1 -0
  292. package/dist/EntityAdmin/entity-admin-dashboard.component.d.ts.map +1 -1
  293. package/dist/EntityAdmin/entity-admin-dashboard.component.js +2 -2
  294. package/dist/EntityAdmin/entity-admin-dashboard.component.js.map +1 -1
  295. package/dist/Home/action-pin-config-dialog.component.d.ts +2 -1
  296. package/dist/Home/action-pin-config-dialog.component.d.ts.map +1 -1
  297. package/dist/Home/action-pin-config-dialog.component.js +6 -4
  298. package/dist/Home/action-pin-config-dialog.component.js.map +1 -1
  299. package/dist/Home/action-pin-runner-dialog.component.d.ts +2 -1
  300. package/dist/Home/action-pin-runner-dialog.component.d.ts.map +1 -1
  301. package/dist/Home/action-pin-runner-dialog.component.js +5 -4
  302. package/dist/Home/action-pin-runner-dialog.component.js.map +1 -1
  303. package/dist/Home/home-application.d.ts.map +1 -1
  304. package/dist/Home/home-application.js +10 -12
  305. package/dist/Home/home-application.js.map +1 -1
  306. package/dist/Home/home-dashboard.component.d.ts.map +1 -1
  307. package/dist/Home/home-dashboard.component.js +3 -3
  308. package/dist/Home/home-dashboard.component.js.map +1 -1
  309. package/dist/Integration/components/activity/activity.component.d.ts.map +1 -1
  310. package/dist/Integration/components/activity/activity.component.js +1 -0
  311. package/dist/Integration/components/activity/activity.component.js.map +1 -1
  312. package/dist/Integration/components/connections/connections.component.d.ts.map +1 -1
  313. package/dist/Integration/components/connections/connections.component.js +11 -10
  314. package/dist/Integration/components/connections/connections.component.js.map +1 -1
  315. package/dist/Integration/components/mapping-workspace/mapping-workspace.component.d.ts.map +1 -1
  316. package/dist/Integration/components/mapping-workspace/mapping-workspace.component.js +2 -2
  317. package/dist/Integration/components/mapping-workspace/mapping-workspace.component.js.map +1 -1
  318. package/dist/Integration/components/overview/overview.component.d.ts.map +1 -1
  319. package/dist/Integration/components/overview/overview.component.js +1 -0
  320. package/dist/Integration/components/overview/overview.component.js.map +1 -1
  321. package/dist/Integration/components/pipelines/pipelines.component.d.ts.map +1 -1
  322. package/dist/Integration/components/pipelines/pipelines.component.js +1 -0
  323. package/dist/Integration/components/pipelines/pipelines.component.js.map +1 -1
  324. package/dist/Integration/components/schedules/schedules.component.d.ts.map +1 -1
  325. package/dist/Integration/components/schedules/schedules.component.js +5 -4
  326. package/dist/Integration/components/schedules/schedules.component.js.map +1 -1
  327. package/dist/Integration/services/integration-data.service.d.ts +5 -1
  328. package/dist/Integration/services/integration-data.service.d.ts.map +1 -1
  329. package/dist/Integration/services/integration-data.service.js +27 -19
  330. package/dist/Integration/services/integration-data.service.js.map +1 -1
  331. package/dist/KnowledgeHub/components/analytics/analytics-resource.component.js +6 -6
  332. package/dist/KnowledgeHub/components/analytics/analytics-resource.component.js.map +1 -1
  333. package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.d.ts.map +1 -1
  334. package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.js +8 -6
  335. package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.js.map +1 -1
  336. package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js +6 -6
  337. package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js.map +1 -1
  338. package/dist/KnowledgeHub/components/scheduling/scheduling-resource.component.js +3 -3
  339. package/dist/KnowledgeHub/components/scheduling/scheduling-resource.component.js.map +1 -1
  340. package/dist/Lists/components/lists-browse-resource.component.js +6 -6
  341. package/dist/Lists/components/lists-browse-resource.component.js.map +1 -1
  342. package/dist/Lists/components/lists-categories-resource.component.js +4 -4
  343. package/dist/Lists/components/lists-categories-resource.component.js.map +1 -1
  344. package/dist/Lists/components/lists-my-lists-resource.component.js +6 -6
  345. package/dist/Lists/components/lists-my-lists-resource.component.js.map +1 -1
  346. package/dist/Lists/components/lists-operations-resource.component.d.ts.map +1 -1
  347. package/dist/Lists/components/lists-operations-resource.component.js +11 -10
  348. package/dist/Lists/components/lists-operations-resource.component.js.map +1 -1
  349. package/dist/Lists/services/list-set-operations.service.d.ts +5 -0
  350. package/dist/Lists/services/list-set-operations.service.d.ts.map +1 -1
  351. package/dist/Lists/services/list-set-operations.service.js +11 -3
  352. package/dist/Lists/services/list-set-operations.service.js.map +1 -1
  353. package/dist/MCP/components/mcp-connection-dialog.component.d.ts +2 -1
  354. package/dist/MCP/components/mcp-connection-dialog.component.d.ts.map +1 -1
  355. package/dist/MCP/components/mcp-connection-dialog.component.js +8 -6
  356. package/dist/MCP/components/mcp-connection-dialog.component.js.map +1 -1
  357. package/dist/MCP/components/mcp-server-dialog.component.d.ts +2 -1
  358. package/dist/MCP/components/mcp-server-dialog.component.d.ts.map +1 -1
  359. package/dist/MCP/components/mcp-server-dialog.component.js +7 -5
  360. package/dist/MCP/components/mcp-server-dialog.component.js.map +1 -1
  361. package/dist/MCP/mcp-dashboard.component.d.ts.map +1 -1
  362. package/dist/MCP/mcp-dashboard.component.js +12 -12
  363. package/dist/MCP/mcp-dashboard.component.js.map +1 -1
  364. package/dist/Permissions/permissions-shared.d.ts +3 -3
  365. package/dist/Permissions/permissions-shared.d.ts.map +1 -1
  366. package/dist/Permissions/permissions-shared.js +5 -5
  367. package/dist/Permissions/permissions-shared.js.map +1 -1
  368. package/dist/Permissions/resource-access-resource.component.js +1 -1
  369. package/dist/Permissions/resource-access-resource.component.js.map +1 -1
  370. package/dist/Permissions/user-access-resource.component.js +1 -2
  371. package/dist/Permissions/user-access-resource.component.js.map +1 -1
  372. package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
  373. package/dist/QueryBrowser/query-browser-resource.component.js +2 -2
  374. package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
  375. package/dist/Scheduling/scheduling-dashboard.component.d.ts.map +1 -1
  376. package/dist/Scheduling/scheduling-dashboard.component.js +1 -0
  377. package/dist/Scheduling/scheduling-dashboard.component.js.map +1 -1
  378. package/dist/Scheduling/services/scheduling-instrumentation.service.d.ts +5 -0
  379. package/dist/Scheduling/services/scheduling-instrumentation.service.d.ts.map +1 -1
  380. package/dist/Scheduling/services/scheduling-instrumentation.service.js +21 -13
  381. package/dist/Scheduling/services/scheduling-instrumentation.service.js.map +1 -1
  382. package/dist/SystemDiagnostics/system-diagnostics.component.d.ts.map +1 -1
  383. package/dist/SystemDiagnostics/system-diagnostics.component.js +2 -2
  384. package/dist/SystemDiagnostics/system-diagnostics.component.js.map +1 -1
  385. package/dist/Testing/components/testing-explorer.component.d.ts +2 -1
  386. package/dist/Testing/components/testing-explorer.component.d.ts.map +1 -1
  387. package/dist/Testing/components/testing-explorer.component.js +9 -7
  388. package/dist/Testing/components/testing-explorer.component.js.map +1 -1
  389. package/dist/Testing/services/testing-instrumentation.service.d.ts +6 -1
  390. package/dist/Testing/services/testing-instrumentation.service.d.ts.map +1 -1
  391. package/dist/Testing/services/testing-instrumentation.service.js +21 -11
  392. package/dist/Testing/services/testing-instrumentation.service.js.map +1 -1
  393. package/dist/Testing/testing-dashboard.component.d.ts +3 -1
  394. package/dist/Testing/testing-dashboard.component.d.ts.map +1 -1
  395. package/dist/Testing/testing-dashboard.component.js +15 -11
  396. package/dist/Testing/testing-dashboard.component.js.map +1 -1
  397. package/dist/VersionHistory/components/diff-resource.component.d.ts.map +1 -1
  398. package/dist/VersionHistory/components/diff-resource.component.js +5 -5
  399. package/dist/VersionHistory/components/diff-resource.component.js.map +1 -1
  400. package/dist/VersionHistory/components/graph-resource.component.d.ts.map +1 -1
  401. package/dist/VersionHistory/components/graph-resource.component.js +1 -2
  402. package/dist/VersionHistory/components/graph-resource.component.js.map +1 -1
  403. package/dist/VersionHistory/components/labels-resource.component.d.ts.map +1 -1
  404. package/dist/VersionHistory/components/labels-resource.component.js +3 -3
  405. package/dist/VersionHistory/components/labels-resource.component.js.map +1 -1
  406. package/dist/VersionHistory/components/restore-resource.component.js +1 -1
  407. package/dist/VersionHistory/components/restore-resource.component.js.map +1 -1
  408. package/dist/ai-dashboards.module.d.ts +35 -34
  409. package/dist/ai-dashboards.module.d.ts.map +1 -1
  410. package/dist/ai-dashboards.module.js +6 -0
  411. package/dist/ai-dashboards.module.js.map +1 -1
  412. package/dist/module.d.ts +13 -12
  413. package/dist/module.d.ts.map +1 -1
  414. package/dist/module.js +7 -0
  415. package/dist/module.js.map +1 -1
  416. package/dist/public-api.d.ts +3 -1
  417. package/dist/public-api.d.ts.map +1 -1
  418. package/dist/public-api.js +3 -1
  419. package/dist/public-api.js.map +1 -1
  420. package/dist/shared/entity-field-display.d.ts +4 -3
  421. package/dist/shared/entity-field-display.d.ts.map +1 -1
  422. package/dist/shared/entity-field-display.js +9 -9
  423. package/dist/shared/entity-field-display.js.map +1 -1
  424. package/package.json +52 -51
@@ -0,0 +1,404 @@
1
+ /**
2
+ * @module step-relationships.component
3
+ * @description Step 3 — optional foreign key relationship definitions.
4
+ *
5
+ * Presents one card per FK row. Each card has cascading dropdowns:
6
+ * Source Column → Target Schema → Target Table → Target Column → FK Type
7
+ *
8
+ * All FK target data comes from `Metadata.Entities` (already in-memory at login),
9
+ * so every dropdown is synchronous — no async loading needed.
10
+ *
11
+ * Phase C: FK source columns are no longer restricted to UUID type — any column
12
+ * may be used as a FK source. When the user selects a target column, the
13
+ * component reads its SQL type and auto-selects the first source column whose
14
+ * type matches, improving UX and preventing silent type mismatches.
15
+ */
16
+ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef, inject, } from '@angular/core';
17
+ import { Metadata } from '@memberjunction/core';
18
+ import { UUIDsEqual } from '@memberjunction/global';
19
+ import * as i0 from "@angular/core";
20
+ import * as i1 from "@angular/forms";
21
+ import * as i2 from "@memberjunction/ng-ui-components";
22
+ const _forTrack0 = ($index, $item) => $item.Name;
23
+ const _forTrack1 = ($index, $item) => $item.ID;
24
+ function StepRelationshipsComponent_Conditional_4_For_2_For_14_Template(rf, ctx) { if (rf & 1) {
25
+ i0.ɵɵelementStart(0, "option", 17);
26
+ i0.ɵɵtext(1);
27
+ i0.ɵɵelementEnd();
28
+ } if (rf & 2) {
29
+ const col_r4 = ctx.$implicit;
30
+ i0.ɵɵproperty("value", col_r4.Name);
31
+ i0.ɵɵadvance();
32
+ i0.ɵɵtextInterpolate(col_r4.Name);
33
+ } }
34
+ function StepRelationshipsComponent_Conditional_4_For_2_For_22_Template(rf, ctx) { if (rf & 1) {
35
+ i0.ɵɵelementStart(0, "option", 17);
36
+ i0.ɵɵtext(1);
37
+ i0.ɵɵelementEnd();
38
+ } if (rf & 2) {
39
+ const schema_r5 = ctx.$implicit;
40
+ i0.ɵɵproperty("value", schema_r5);
41
+ i0.ɵɵadvance();
42
+ i0.ɵɵtextInterpolate(schema_r5);
43
+ } }
44
+ function StepRelationshipsComponent_Conditional_4_For_2_For_30_Template(rf, ctx) { if (rf & 1) {
45
+ i0.ɵɵelementStart(0, "option", 17);
46
+ i0.ɵɵtext(1);
47
+ i0.ɵɵelementEnd();
48
+ } if (rf & 2) {
49
+ const entity_r6 = ctx.$implicit;
50
+ i0.ɵɵproperty("value", entity_r6.ID);
51
+ i0.ɵɵadvance();
52
+ i0.ɵɵtextInterpolate(entity_r6.BaseTable);
53
+ } }
54
+ function StepRelationshipsComponent_Conditional_4_For_2_For_38_Template(rf, ctx) { if (rf & 1) {
55
+ i0.ɵɵelementStart(0, "option", 17);
56
+ i0.ɵɵtext(1);
57
+ i0.ɵɵelementEnd();
58
+ } if (rf & 2) {
59
+ const col_r7 = ctx.$implicit;
60
+ i0.ɵɵproperty("value", col_r7.Name);
61
+ i0.ɵɵadvance();
62
+ i0.ɵɵtextInterpolate2("", col_r7.Name, " (", col_r7.SqlType, ")");
63
+ } }
64
+ function StepRelationshipsComponent_Conditional_4_For_2_Template(rf, ctx) { if (rf & 1) {
65
+ const _r1 = i0.ɵɵgetCurrentView();
66
+ i0.ɵɵelementStart(0, "div", 7)(1, "div", 8)(2, "span", 9);
67
+ i0.ɵɵtext(3);
68
+ i0.ɵɵelementEnd();
69
+ i0.ɵɵelementStart(4, "button", 10);
70
+ i0.ɵɵlistener("click", function StepRelationshipsComponent_Conditional_4_For_2_Template_button_click_4_listener() { const row_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.DeleteRow(row_r2.rowIndex)); });
71
+ i0.ɵɵelement(5, "i", 11);
72
+ i0.ɵɵelementEnd()();
73
+ i0.ɵɵelementStart(6, "div", 12)(7, "div", 13)(8, "label", 14);
74
+ i0.ɵɵtext(9, "Source Column");
75
+ i0.ɵɵelementEnd();
76
+ i0.ɵɵelementStart(10, "select", 15);
77
+ i0.ɵɵlistener("change", function StepRelationshipsComponent_Conditional_4_For_2_Template_select_change_10_listener($event) { const row_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnSourceColumnChange(row_r2.rowIndex, $event.target.value)); });
78
+ i0.ɵɵelementStart(11, "option", 16);
79
+ i0.ɵɵtext(12);
80
+ i0.ɵɵelementEnd();
81
+ i0.ɵɵrepeaterCreate(13, StepRelationshipsComponent_Conditional_4_For_2_For_14_Template, 2, 2, "option", 17, _forTrack0);
82
+ i0.ɵɵelementEnd()();
83
+ i0.ɵɵelementStart(15, "div", 13)(16, "label", 14);
84
+ i0.ɵɵtext(17, "Target Schema");
85
+ i0.ɵɵelementEnd();
86
+ i0.ɵɵelementStart(18, "select", 15);
87
+ i0.ɵɵlistener("change", function StepRelationshipsComponent_Conditional_4_For_2_Template_select_change_18_listener($event) { const row_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnSchemaChange(row_r2.rowIndex, $event.target.value)); });
88
+ i0.ɵɵelementStart(19, "option", 16);
89
+ i0.ɵɵtext(20, "\u2014 select schema \u2014");
90
+ i0.ɵɵelementEnd();
91
+ i0.ɵɵrepeaterCreate(21, StepRelationshipsComponent_Conditional_4_For_2_For_22_Template, 2, 2, "option", 17, i0.ɵɵrepeaterTrackByIdentity);
92
+ i0.ɵɵelementEnd()();
93
+ i0.ɵɵelementStart(23, "div", 13)(24, "label", 14);
94
+ i0.ɵɵtext(25, "Target Table");
95
+ i0.ɵɵelementEnd();
96
+ i0.ɵɵelementStart(26, "select", 18);
97
+ i0.ɵɵlistener("change", function StepRelationshipsComponent_Conditional_4_For_2_Template_select_change_26_listener($event) { const row_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnTableChange(row_r2.rowIndex, $event.target.value)); });
98
+ i0.ɵɵelementStart(27, "option", 16);
99
+ i0.ɵɵtext(28);
100
+ i0.ɵɵelementEnd();
101
+ i0.ɵɵrepeaterCreate(29, StepRelationshipsComponent_Conditional_4_For_2_For_30_Template, 2, 2, "option", 17, _forTrack1);
102
+ i0.ɵɵelementEnd()();
103
+ i0.ɵɵelementStart(31, "div", 13)(32, "label", 14);
104
+ i0.ɵɵtext(33, "Target Column");
105
+ i0.ɵɵelementEnd();
106
+ i0.ɵɵelementStart(34, "select", 18);
107
+ i0.ɵɵlistener("change", function StepRelationshipsComponent_Conditional_4_For_2_Template_select_change_34_listener($event) { const row_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnColumnChange(row_r2.rowIndex, $event.target.value, row_r2.selectedEntityId)); });
108
+ i0.ɵɵelementStart(35, "option", 16);
109
+ i0.ɵɵtext(36);
110
+ i0.ɵɵelementEnd();
111
+ i0.ɵɵrepeaterCreate(37, StepRelationshipsComponent_Conditional_4_For_2_For_38_Template, 2, 3, "option", 17, _forTrack0);
112
+ i0.ɵɵelementEnd()();
113
+ i0.ɵɵelementStart(39, "div", 13)(40, "label", 14);
114
+ i0.ɵɵtext(41, "FK Type");
115
+ i0.ɵɵelementEnd();
116
+ i0.ɵɵelementStart(42, "select", 15);
117
+ i0.ɵɵlistener("change", function StepRelationshipsComponent_Conditional_4_For_2_Template_select_change_42_listener($event) { const row_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnFkTypeChange(row_r2.rowIndex, $event.target.value === "soft")); });
118
+ i0.ɵɵelementStart(43, "option", 19);
119
+ i0.ɵɵtext(44, "Soft (metadata only)");
120
+ i0.ɵɵelementEnd();
121
+ i0.ɵɵelementStart(45, "option", 20);
122
+ i0.ɵɵtext(46, "Hard (DB constraint)");
123
+ i0.ɵɵelementEnd()()()()();
124
+ } if (rf & 2) {
125
+ const row_r2 = ctx.$implicit;
126
+ const ctx_r2 = i0.ɵɵnextContext(2);
127
+ i0.ɵɵadvance(3);
128
+ i0.ɵɵtextInterpolate1("Relationship ", row_r2.rowIndex + 1);
129
+ i0.ɵɵadvance(7);
130
+ i0.ɵɵproperty("value", row_r2.ColumnName);
131
+ i0.ɵɵadvance(2);
132
+ i0.ɵɵtextInterpolate1("\u2014 auto-create ", row_r2.ColumnName || "\u2014", " \u2014");
133
+ i0.ɵɵadvance();
134
+ i0.ɵɵrepeater(ctx_r2.AllColumns);
135
+ i0.ɵɵadvance(5);
136
+ i0.ɵɵproperty("value", row_r2.ReferencedSchema);
137
+ i0.ɵɵadvance(3);
138
+ i0.ɵɵrepeater(ctx_r2.AvailableSchemas);
139
+ i0.ɵɵadvance(5);
140
+ i0.ɵɵproperty("value", row_r2.selectedEntityId)("disabled", !row_r2.ReferencedSchema);
141
+ i0.ɵɵadvance(2);
142
+ i0.ɵɵtextInterpolate(ctx_r2.TablePlaceholder(row_r2));
143
+ i0.ɵɵadvance();
144
+ i0.ɵɵrepeater(ctx_r2.EntitiesForSchema(row_r2.ReferencedSchema));
145
+ i0.ɵɵadvance(5);
146
+ i0.ɵɵproperty("value", row_r2.ReferencedColumn)("disabled", !row_r2.selectedEntityId);
147
+ i0.ɵɵadvance(2);
148
+ i0.ɵɵtextInterpolate(ctx_r2.ColumnPlaceholder(row_r2));
149
+ i0.ɵɵadvance();
150
+ i0.ɵɵrepeater(ctx_r2.ColumnsForEntity(row_r2.selectedEntityId));
151
+ i0.ɵɵadvance(5);
152
+ i0.ɵɵproperty("value", row_r2.IsSoft ? "soft" : "hard");
153
+ } }
154
+ function StepRelationshipsComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
155
+ i0.ɵɵelementStart(0, "div", 3);
156
+ i0.ɵɵrepeaterCreate(1, StepRelationshipsComponent_Conditional_4_For_2_Template, 47, 11, "div", 7, i0.ɵɵcomponentInstance().TrackByIndex, true);
157
+ i0.ɵɵelementEnd();
158
+ } if (rf & 2) {
159
+ const ctx_r2 = i0.ɵɵnextContext();
160
+ i0.ɵɵadvance();
161
+ i0.ɵɵrepeater(ctx_r2.rows);
162
+ } }
163
+ // `MJ: Schema Info` only surfaces MJ-registered schemas, so only __mj needs blocking here.
164
+ // Server-side RSM.GetAllProtectedSchemas() remains the authoritative gate.
165
+ const FRONTEND_BLOCKED_SCHEMAS = new Set(['__mj']);
166
+ /** Default referenced column name used when a FK relationship is first created or schema/table changes. */
167
+ const DEFAULT_PK_COLUMN = 'ID';
168
+ export class StepRelationshipsComponent {
169
+ cdr = inject(ChangeDetectorRef);
170
+ InitialForeignKeys = [];
171
+ AvailableColumns = [];
172
+ ForeignKeysChanged = new EventEmitter();
173
+ /** All Step 2 columns are valid FK source candidates (not just UUID). */
174
+ get AllColumns() {
175
+ return this.AvailableColumns;
176
+ }
177
+ // ─── Metadata-backed synchronous getters ──────────────────────────────────
178
+ /**
179
+ * Sorted schema names present in Metadata.Entities, excluding blocked schemas.
180
+ * `MJ: Schema Info` only surfaces MJ-registered schemas, so __mj is the only
181
+ * schema that needs filtering here.
182
+ */
183
+ get AvailableSchemas() {
184
+ return [...new Set(new Metadata().Entities.map(e => e.SchemaName))] // global-provider-ok: client-side Angular component, single provider
185
+ .filter(s => !FRONTEND_BLOCKED_SCHEMAS.has(s))
186
+ .sort();
187
+ }
188
+ /** Entities that belong to the given schema, sorted by BaseTable. */
189
+ EntitiesForSchema(schemaName) {
190
+ if (!schemaName)
191
+ return [];
192
+ return new Metadata().Entities // global-provider-ok: client-side Angular component, single provider
193
+ .filter(e => e.SchemaName === schemaName)
194
+ .sort((a, b) => a.BaseTable.localeCompare(b.BaseTable));
195
+ }
196
+ /**
197
+ * Physical columns for the entity identified by `entityId`, including SQL type info.
198
+ * Returns `EntityColumnInfo[]` so the template can display `Name (SqlType)` and
199
+ * the component can auto-match source columns by type.
200
+ */
201
+ ColumnsForEntity(entityId) {
202
+ if (!entityId)
203
+ return [];
204
+ const entity = new Metadata().Entities.find(e => UUIDsEqual(e.ID, entityId)); // global-provider-ok: client-side Angular component, single provider
205
+ if (!entity)
206
+ return [{ Name: 'ID', SqlType: 'uniqueidentifier' }];
207
+ return entity.Fields
208
+ .filter(f => !f.IsVirtual)
209
+ .map(f => ({ Name: f.Name, SqlType: f.Type ?? '' }));
210
+ }
211
+ // ─── Placeholder helpers ───────────────────────────────────────────────────
212
+ TablePlaceholder(row) {
213
+ if (!row.ReferencedSchema)
214
+ return '— select schema first —';
215
+ if (this.EntitiesForSchema(row.ReferencedSchema).length === 0)
216
+ return '— no entities in this schema —';
217
+ return '— select table —';
218
+ }
219
+ ColumnPlaceholder(row) {
220
+ if (!row.selectedEntityId)
221
+ return '— select table first —';
222
+ return '— select column —';
223
+ }
224
+ // ─── Row state ─────────────────────────────────────────────────────────────
225
+ rows = [];
226
+ // ─── Cascade handlers ──────────────────────────────────────────────────────
227
+ OnSchemaChange(rowIndex, schema) {
228
+ this.rows = this.rows.map(r => r.rowIndex === rowIndex
229
+ ? { ...r, ReferencedSchema: schema, ReferencedTable: '', ReferencedColumn: DEFAULT_PK_COLUMN, selectedEntityId: '', referencedColumnType: undefined }
230
+ : r);
231
+ this.emit();
232
+ }
233
+ OnTableChange(rowIndex, entityId) {
234
+ if (!entityId) {
235
+ this.rows = this.rows.map(r => r.rowIndex === rowIndex
236
+ ? { ...r, ReferencedTable: '', ReferencedColumn: DEFAULT_PK_COLUMN, selectedEntityId: '', referencedColumnType: undefined }
237
+ : r);
238
+ this.emit();
239
+ return;
240
+ }
241
+ const entity = new Metadata().Entities.find(e => UUIDsEqual(e.ID, entityId)); // global-provider-ok: client-side Angular component, single provider
242
+ this.rows = this.rows.map(r => {
243
+ if (r.rowIndex !== rowIndex)
244
+ return r;
245
+ // Auto-name the source FK column if the user hasn't chosen one — the
246
+ // wizard state service will materialize this as a real UUID column.
247
+ const autoSourceName = !r.ColumnName && entity?.BaseTable
248
+ ? this.defaultFkColumnName(entity.BaseTable)
249
+ : r.ColumnName;
250
+ return {
251
+ ...r,
252
+ ColumnName: autoSourceName,
253
+ ReferencedTable: entity?.BaseTable ?? '',
254
+ ReferencedColumn: DEFAULT_PK_COLUMN,
255
+ selectedEntityId: entityId,
256
+ referencedColumnType: undefined,
257
+ };
258
+ });
259
+ this.emit();
260
+ }
261
+ /** "CustomerOrders" → "CustomerOrderID"; "People" → "PersonID". Best-effort singularizer. */
262
+ defaultFkColumnName(tableName) {
263
+ const base = tableName.endsWith('ies')
264
+ ? tableName.slice(0, -3) + 'y'
265
+ : tableName.endsWith('s') && !tableName.endsWith('ss')
266
+ ? tableName.slice(0, -1)
267
+ : tableName;
268
+ return `${base}ID`;
269
+ }
270
+ /**
271
+ * Handle target-column selection. Reads the column's SQL type, stores it in row
272
+ * state, then auto-selects the first source column whose (normalised) type matches.
273
+ */
274
+ OnColumnChange(rowIndex, column, entityId) {
275
+ const colInfo = this.ColumnsForEntity(entityId).find(c => c.Name === column);
276
+ const targetType = colInfo?.SqlType;
277
+ const autoSourceColumn = targetType
278
+ ? this.findMatchingSourceColumn(targetType)
279
+ : undefined;
280
+ this.rows = this.rows.map(r => {
281
+ if (r.rowIndex !== rowIndex)
282
+ return r;
283
+ return {
284
+ ...r,
285
+ ReferencedColumn: column,
286
+ referencedColumnType: targetType,
287
+ // Only update source column if a better match was found
288
+ ColumnName: autoSourceColumn ?? r.ColumnName,
289
+ };
290
+ });
291
+ this.emit();
292
+ }
293
+ OnSourceColumnChange(rowIndex, column) {
294
+ this.rows = this.rows.map(r => r.rowIndex === rowIndex ? { ...r, ColumnName: column } : r);
295
+ this.emit();
296
+ }
297
+ OnFkTypeChange(rowIndex, isSoft) {
298
+ this.rows = this.rows.map(r => r.rowIndex === rowIndex ? { ...r, IsSoft: isSoft } : r);
299
+ this.emit();
300
+ }
301
+ // ─── Add / Delete ──────────────────────────────────────────────────────────
302
+ AddRelationship() {
303
+ const schemas = this.AvailableSchemas;
304
+ const defaultSchema = schemas.includes('__mj_UDT') ? '__mj_UDT' : (schemas[0] ?? '');
305
+ // Default the new row's source column to the first Step 2 column
306
+ // that isn't already used by another FK row. This honours the
307
+ // "give the user a sensible default of any type" intent from
308
+ // f842848683 while avoiding the multi-FK source-column collision
309
+ // bug fixed in 8e52898ec6 — when every existing column is already
310
+ // wired up, we fall through to OnTableChange's auto-naming
311
+ // (mints a unique "<TargetTable>ID" once the user picks a table).
312
+ const usedColumns = new Set(this.rows.map(r => r.ColumnName).filter(Boolean));
313
+ const firstFreeColumn = this.AllColumns.find(c => !usedColumns.has(c.Name))?.Name ?? '';
314
+ this.rows = [
315
+ ...this.rows,
316
+ {
317
+ ColumnName: firstFreeColumn,
318
+ ReferencedSchema: defaultSchema,
319
+ ReferencedTable: '',
320
+ ReferencedColumn: DEFAULT_PK_COLUMN,
321
+ IsSoft: true,
322
+ rowIndex: this.rows.length,
323
+ selectedEntityId: '',
324
+ },
325
+ ];
326
+ this.emit();
327
+ }
328
+ DeleteRow(index) {
329
+ this.rows = this.rows
330
+ .filter(r => r.rowIndex !== index)
331
+ .map((r, i) => ({ ...r, rowIndex: i }));
332
+ this.emit();
333
+ }
334
+ // ─── Restore from InitialForeignKeys (when navigating back) ───────────────
335
+ InitFromForeignKeys(fks) {
336
+ this.rows = fks.map((fk, index) => this.buildRowState(fk, index));
337
+ this.cdr.markForCheck();
338
+ }
339
+ buildRowState(fk, index) {
340
+ const entity = new Metadata().Entities.find(// global-provider-ok: client-side Angular component, single provider
341
+ // global-provider-ok: client-side Angular component, single provider
342
+ e => e.SchemaName === fk.ReferencedSchema && e.BaseTable === fk.ReferencedTable);
343
+ return { ...fk, rowIndex: index, selectedEntityId: entity?.ID ?? '' };
344
+ }
345
+ TrackByIndex(_, row) { return row.rowIndex; }
346
+ // ─── Source-column type matching ───────────────────────────────────────────
347
+ /**
348
+ * Find the first Step 2 source column whose SQL type matches `targetSqlType`.
349
+ * Type comparison is case-insensitive and ignores length/precision qualifiers
350
+ * (e.g. `NVARCHAR(255)` normalises to `NVARCHAR`).
351
+ *
352
+ * Returns `undefined` when no match is found so the caller can decide whether
353
+ * to leave the existing selection untouched.
354
+ */
355
+ findMatchingSourceColumn(targetSqlType) {
356
+ const normalise = (t) => t.toUpperCase().replace(/\s*\(.*\)$/, '').trim();
357
+ const targetNorm = normalise(targetSqlType);
358
+ const match = this.AllColumns.find(c => {
359
+ const colType = c.RawSqlType ?? c.Type ?? '';
360
+ return normalise(colType) === targetNorm;
361
+ });
362
+ return match?.Name;
363
+ }
364
+ // ─── Emit ──────────────────────────────────────────────────────────────────
365
+ emit() {
366
+ const fks = this.rows.map(row => ({
367
+ ColumnName: row.ColumnName,
368
+ ReferencedSchema: row.ReferencedSchema,
369
+ ReferencedTable: row.ReferencedTable,
370
+ ReferencedColumn: row.ReferencedColumn,
371
+ IsSoft: row.IsSoft,
372
+ }));
373
+ this.ForeignKeysChanged.emit(fks);
374
+ this.cdr.markForCheck();
375
+ }
376
+ static ɵfac = function StepRelationshipsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || StepRelationshipsComponent)(); };
377
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: StepRelationshipsComponent, selectors: [["mj-entity-step-relationships"]], inputs: { InitialForeignKeys: "InitialForeignKeys", AvailableColumns: "AvailableColumns" }, outputs: { ForeignKeysChanged: "ForeignKeysChanged" }, standalone: false, decls: 9, vars: 1, consts: [[1, "step-relationships"], [1, "step-info"], [1, "fa-solid", "fa-circle-info"], [1, "fk-rows"], [1, "add-bar"], ["mjButton", "", "buttonStyle", "secondary", "type", "button", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "fk-row"], [1, "fk-row-header"], [1, "fk-row-label"], ["type", "button", "title", "Remove relationship", 1, "delete-btn", 3, "click"], [1, "fa-solid", "fa-trash"], [1, "fk-row-grid"], [1, "fk-field"], [1, "fk-label"], [1, "mj-input", 3, "change", "value"], ["value", ""], [3, "value"], [1, "mj-input", 3, "change", "value", "disabled"], ["value", "soft"], ["value", "hard"]], template: function StepRelationshipsComponent_Template(rf, ctx) { if (rf & 1) {
378
+ i0.ɵɵelementStart(0, "div", 0)(1, "p", 1);
379
+ i0.ɵɵelement(2, "i", 2);
380
+ i0.ɵɵtext(3, " Optionally define foreign key relationships to other entities. Picking a target table auto-creates the UUID source column for you \u2014 or you can reuse an existing UUID column via the Source Column dropdown. ");
381
+ i0.ɵɵelementEnd();
382
+ i0.ɵɵconditionalCreate(4, StepRelationshipsComponent_Conditional_4_Template, 3, 0, "div", 3);
383
+ i0.ɵɵelementStart(5, "div", 4)(6, "button", 5);
384
+ i0.ɵɵlistener("click", function StepRelationshipsComponent_Template_button_click_6_listener() { return ctx.AddRelationship(); });
385
+ i0.ɵɵelement(7, "i", 6);
386
+ i0.ɵɵtext(8, " Add Relationship ");
387
+ i0.ɵɵelementEnd()()();
388
+ } if (rf & 2) {
389
+ i0.ɵɵadvance(4);
390
+ i0.ɵɵconditional(ctx.rows.length > 0 ? 4 : -1);
391
+ } }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i2.MJButtonDirective], styles: [".step-relationships[_ngcontent-%COMP%] {\n padding: 16px 24px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n\n\n\n.step-info[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin: 0;\n font-size: 0.875rem;\n color: var(--mj-text-secondary);\n}\n\n.step-info[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-status-info);\n margin-top: 2px;\n flex-shrink: 0;\n}\n\n\n\n\n.no-fk-hint[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n padding: 32px;\n text-align: center;\n color: var(--mj-text-muted);\n}\n\n.no-fk-hint[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 1.8rem;\n}\n\n.no-fk-hint[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 0.875rem;\n max-width: 400px;\n}\n\n\n\n\n.fk-rows[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.fk-row[_ngcontent-%COMP%] {\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n background: var(--mj-bg-surface-card);\n padding: 12px 16px;\n}\n\n\n\n\n.fk-row-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n}\n\n.fk-row-label[_ngcontent-%COMP%] {\n font-size: 0.8rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-secondary);\n}\n\n\n\n\n.fk-row-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 1fr 1fr 1.5fr 1fr 1.2fr;\n gap: 12px;\n align-items: end;\n}\n\n\n\n\n.fk-field[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.fk-label[_ngcontent-%COMP%] {\n font-size: 0.75rem;\n font-weight: 600;\n color: var(--mj-text-secondary);\n white-space: nowrap;\n}\n\n.fk-field[_ngcontent-%COMP%] select[_ngcontent-%COMP%] {\n width: 100%;\n font-size: 0.875rem;\n}\n\n\n\n\n.delete-btn[_ngcontent-%COMP%] {\n background: none;\n border: none;\n padding: 5px 7px;\n cursor: pointer;\n color: var(--mj-text-muted);\n border-radius: 4px;\n transition: color 0.15s, background 0.15s;\n line-height: 1;\n}\n\n.delete-btn[_ngcontent-%COMP%]:hover {\n color: var(--mj-status-error-text);\n background: var(--mj-status-error-bg);\n}\n\n\n\n\n.add-bar[_ngcontent-%COMP%] {\n padding-top: 4px;\n}\n\n\n\n\n@media (max-width: 640px) {\n .fk-row-grid[_ngcontent-%COMP%] {\n grid-template-columns: 1fr 1fr;\n }\n}"], changeDetection: 0 });
392
+ }
393
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(StepRelationshipsComponent, [{
394
+ type: Component,
395
+ args: [{ standalone: false, selector: 'mj-entity-step-relationships', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"step-relationships\">\n\n <p class=\"step-info\">\n <i class=\"fa-solid fa-circle-info\"></i>\n Optionally define foreign key relationships to other entities.\n Picking a target table auto-creates the UUID source column for you \u2014 or you can reuse an existing UUID column via the Source Column dropdown.\n </p>\n\n @if (rows.length > 0) {\n <div class=\"fk-rows\">\n @for (row of rows; track TrackByIndex($index, row)) {\n <div class=\"fk-row\">\n\n <div class=\"fk-row-header\">\n <span class=\"fk-row-label\">Relationship {{ row.rowIndex + 1 }}</span>\n <button type=\"button\" class=\"delete-btn\" title=\"Remove relationship\" (click)=\"DeleteRow(row.rowIndex)\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n\n <div class=\"fk-row-grid\">\n\n <!-- Source Column \u2014 any Step 2 column, not just UUID -->\n <div class=\"fk-field\">\n <label class=\"fk-label\">Source Column</label>\n <select class=\"mj-input\"\n [value]=\"row.ColumnName\"\n (change)=\"OnSourceColumnChange(row.rowIndex, $any($event.target).value)\">\n <option value=\"\">\u2014 auto-create {{ row.ColumnName || '\u2014' }} \u2014</option>\n @for (col of AllColumns; track col.Name) {\n <option [value]=\"col.Name\">{{ col.Name }}</option>\n }\n </select>\n </div>\n\n <!-- Target Schema -->\n <div class=\"fk-field\">\n <label class=\"fk-label\">Target Schema</label>\n <select class=\"mj-input\"\n [value]=\"row.ReferencedSchema\"\n (change)=\"OnSchemaChange(row.rowIndex, $any($event.target).value)\">\n <option value=\"\">\u2014 select schema \u2014</option>\n @for (schema of AvailableSchemas; track schema) {\n <option [value]=\"schema\">{{ schema }}</option>\n }\n </select>\n </div>\n\n <!-- Target Table -->\n <div class=\"fk-field\">\n <label class=\"fk-label\">Target Table</label>\n <select class=\"mj-input\"\n [value]=\"row.selectedEntityId\"\n [disabled]=\"!row.ReferencedSchema\"\n (change)=\"OnTableChange(row.rowIndex, $any($event.target).value)\">\n <option value=\"\">{{ TablePlaceholder(row) }}</option>\n @for (entity of EntitiesForSchema(row.ReferencedSchema); track entity.ID) {\n <option [value]=\"entity.ID\">{{ entity.BaseTable }}</option>\n }\n </select>\n </div>\n\n <!-- Target Column \u2014 shows SQL type to help user match source column type -->\n <div class=\"fk-field\">\n <label class=\"fk-label\">Target Column</label>\n <select class=\"mj-input\"\n [value]=\"row.ReferencedColumn\"\n [disabled]=\"!row.selectedEntityId\"\n (change)=\"OnColumnChange(row.rowIndex, $any($event.target).value, row.selectedEntityId)\">\n <option value=\"\">{{ ColumnPlaceholder(row) }}</option>\n @for (col of ColumnsForEntity(row.selectedEntityId); track col.Name) {\n <option [value]=\"col.Name\">{{ col.Name }} ({{ col.SqlType }})</option>\n }\n </select>\n </div>\n\n <!-- FK Type -->\n <div class=\"fk-field\">\n <label class=\"fk-label\">FK Type</label>\n <select class=\"mj-input\"\n [value]=\"row.IsSoft ? 'soft' : 'hard'\"\n (change)=\"OnFkTypeChange(row.rowIndex, $any($event.target).value === 'soft')\">\n <option value=\"soft\">Soft (metadata only)</option>\n <option value=\"hard\">Hard (DB constraint)</option>\n </select>\n </div>\n\n </div>\n </div>\n }\n </div>\n }\n\n <div class=\"add-bar\">\n <button mjButton buttonStyle=\"secondary\" type=\"button\"\n (click)=\"AddRelationship()\">\n <i class=\"fa-solid fa-plus\"></i>\n Add Relationship\n </button>\n </div>\n\n</div>\n", styles: [".step-relationships {\n padding: 16px 24px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n/* \u2500\u2500 Info banner \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.step-info {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin: 0;\n font-size: 0.875rem;\n color: var(--mj-text-secondary);\n}\n\n.step-info i {\n color: var(--mj-status-info);\n margin-top: 2px;\n flex-shrink: 0;\n}\n\n/* \u2500\u2500 Empty state \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.no-fk-hint {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n padding: 32px;\n text-align: center;\n color: var(--mj-text-muted);\n}\n\n.no-fk-hint i {\n font-size: 1.8rem;\n}\n\n.no-fk-hint p {\n margin: 0;\n font-size: 0.875rem;\n max-width: 400px;\n}\n\n/* \u2500\u2500 FK card list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.fk-rows {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.fk-row {\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n background: var(--mj-bg-surface-card);\n padding: 12px 16px;\n}\n\n/* \u2500\u2500 Card header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.fk-row-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n}\n\n.fk-row-label {\n font-size: 0.8rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-secondary);\n}\n\n/* \u2500\u2500 5-column grid \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.fk-row-grid {\n display: grid;\n grid-template-columns: 1fr 1fr 1.5fr 1fr 1.2fr;\n gap: 12px;\n align-items: end;\n}\n\n/* \u2500\u2500 Field (label + select) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.fk-field {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.fk-label {\n font-size: 0.75rem;\n font-weight: 600;\n color: var(--mj-text-secondary);\n white-space: nowrap;\n}\n\n.fk-field select {\n width: 100%;\n font-size: 0.875rem;\n}\n\n/* \u2500\u2500 Delete button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.delete-btn {\n background: none;\n border: none;\n padding: 5px 7px;\n cursor: pointer;\n color: var(--mj-text-muted);\n border-radius: 4px;\n transition: color 0.15s, background 0.15s;\n line-height: 1;\n}\n\n.delete-btn:hover {\n color: var(--mj-status-error-text);\n background: var(--mj-status-error-bg);\n}\n\n/* \u2500\u2500 Add bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.add-bar {\n padding-top: 4px;\n}\n\n/* \u2500\u2500 Responsive: stack to 2-col on narrow panels \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n@media (max-width: 640px) {\n .fk-row-grid {\n grid-template-columns: 1fr 1fr;\n }\n}\n"] }]
396
+ }], null, { InitialForeignKeys: [{
397
+ type: Input
398
+ }], AvailableColumns: [{
399
+ type: Input
400
+ }], ForeignKeysChanged: [{
401
+ type: Output
402
+ }] }); })();
403
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(StepRelationshipsComponent, { className: "StepRelationshipsComponent", filePath: "src/DatabaseDesigner/components/create-wizard/steps/step-relationships.component.ts", lineNumber: 55 }); })();
404
+ //# sourceMappingURL=step-relationships.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-relationships.component.js","sourceRoot":"","sources":["../../../../../src/DatabaseDesigner/components/create-wizard/steps/step-relationships.component.ts","../../../../../src/DatabaseDesigner/components/create-wizard/steps/step-relationships.component.html"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACH,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EACtC,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,GACrD,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ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uB;YAsFrB,AADF,8BAAqB,gBAEiB;YAA5B,uGAAS,qBAAiB,IAAC;YACjC,uBAAgC;YAChC,kCACF;YAGJ,AAFE,AADE,iBAAS,EACL,EAEF;;YA7FJ,eAmFC;YAnFD,8CAmFC;;;iFDrCU,0BAA0B;cAPtC,SAAS;6BACM,KAAK,YACP,8BAA8B,mBAGvB,uBAAuB,CAAC,MAAM;;kBAM9C,KAAK;;kBACL,KAAK;;kBACL,MAAM;;kFANE,0BAA0B","sourcesContent":["/**\n * @module step-relationships.component\n * @description Step 3 — optional foreign key relationship definitions.\n *\n * Presents one card per FK row. Each card has cascading dropdowns:\n * Source Column → Target Schema → Target Table → Target Column → FK Type\n *\n * All FK target data comes from `Metadata.Entities` (already in-memory at login),\n * so every dropdown is synchronous — no async loading needed.\n *\n * Phase C: FK source columns are no longer restricted to UUID type — any column\n * may be used as a FK source. When the user selects a target column, the\n * component reads its SQL type and auto-selects the first source column whose\n * type matches, improving UX and preventing silent type mismatches.\n */\n\nimport {\n Component, Input, Output, EventEmitter,\n ChangeDetectionStrategy, ChangeDetectorRef, inject,\n} from '@angular/core';\nimport { Metadata, EntityInfo } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport type { ColumnSpec, ForeignKeySpec } from '../../../database-designer.types.js';\n\n// `MJ: Schema Info` only surfaces MJ-registered schemas, so only __mj needs blocking here.\n// Server-side RSM.GetAllProtectedSchemas() remains the authoritative gate.\nconst FRONTEND_BLOCKED_SCHEMAS = new Set(['__mj']);\n\n/** Default referenced column name used when a FK relationship is first created or schema/table changes. */\nconst DEFAULT_PK_COLUMN = 'ID';\n\n/** Target entity column with its SQL type — used for source-column auto-matching. */\nexport interface EntityColumnInfo {\n Name: string;\n /** SQL type string from EntityInfo.Fields (e.g. 'uniqueidentifier', 'int', 'nvarchar'). */\n SqlType: string;\n}\n\n/** Internal per-row state — carries the resolved entityId alongside the FK spec. */\ninterface FkRowState extends ForeignKeySpec {\n rowIndex: number;\n /** EntityInfo.ID of the selected target entity — used to look up columns. */\n selectedEntityId: string;\n /** SQL type of the selected target column — used for source-column auto-matching. */\n referencedColumnType?: string;\n}\n\n@Component({\n standalone: false,\n selector: 'mj-entity-step-relationships',\n templateUrl: './step-relationships.component.html',\n styleUrls: ['./step-relationships.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class StepRelationshipsComponent {\n\n private readonly cdr = inject(ChangeDetectorRef);\n\n @Input() public InitialForeignKeys: ForeignKeySpec[] = [];\n @Input() public AvailableColumns: ColumnSpec[] = [];\n @Output() public readonly ForeignKeysChanged = new EventEmitter<ForeignKeySpec[]>();\n\n /** All Step 2 columns are valid FK source candidates (not just UUID). */\n public get AllColumns(): ColumnSpec[] {\n return this.AvailableColumns;\n }\n\n // ─── Metadata-backed synchronous getters ──────────────────────────────────\n\n /**\n * Sorted schema names present in Metadata.Entities, excluding blocked schemas.\n * `MJ: Schema Info` only surfaces MJ-registered schemas, so __mj is the only\n * schema that needs filtering here.\n */\n public get AvailableSchemas(): string[] {\n return [...new Set(new Metadata().Entities.map(e => e.SchemaName))] // global-provider-ok: client-side Angular component, single provider\n .filter(s => !FRONTEND_BLOCKED_SCHEMAS.has(s))\n .sort();\n }\n\n /** Entities that belong to the given schema, sorted by BaseTable. */\n public EntitiesForSchema(schemaName: string): EntityInfo[] {\n if (!schemaName) return [];\n return new Metadata().Entities // global-provider-ok: client-side Angular component, single provider\n .filter(e => e.SchemaName === schemaName)\n .sort((a, b) => a.BaseTable.localeCompare(b.BaseTable));\n }\n\n /**\n * Physical columns for the entity identified by `entityId`, including SQL type info.\n * Returns `EntityColumnInfo[]` so the template can display `Name (SqlType)` and\n * the component can auto-match source columns by type.\n */\n public ColumnsForEntity(entityId: string): EntityColumnInfo[] {\n if (!entityId) return [];\n const entity = new Metadata().Entities.find(e => UUIDsEqual(e.ID, entityId)); // global-provider-ok: client-side Angular component, single provider\n if (!entity) return [{ Name: 'ID', SqlType: 'uniqueidentifier' }];\n return entity.Fields\n .filter(f => !f.IsVirtual)\n .map(f => ({ Name: f.Name, SqlType: f.Type ?? '' }));\n }\n\n // ─── Placeholder helpers ───────────────────────────────────────────────────\n\n public TablePlaceholder(row: FkRowState): string {\n if (!row.ReferencedSchema) return '— select schema first —';\n if (this.EntitiesForSchema(row.ReferencedSchema).length === 0) return '— no entities in this schema —';\n return '— select table —';\n }\n\n public ColumnPlaceholder(row: FkRowState): string {\n if (!row.selectedEntityId) return '— select table first —';\n return '— select column —';\n }\n\n // ─── Row state ─────────────────────────────────────────────────────────────\n\n public rows: FkRowState[] = [];\n\n // ─── Cascade handlers ──────────────────────────────────────────────────────\n\n public OnSchemaChange(rowIndex: number, schema: string): void {\n this.rows = this.rows.map(r =>\n r.rowIndex === rowIndex\n ? { ...r, ReferencedSchema: schema, ReferencedTable: '', ReferencedColumn: DEFAULT_PK_COLUMN, selectedEntityId: '', referencedColumnType: undefined }\n : r\n );\n this.emit();\n }\n\n public OnTableChange(rowIndex: number, entityId: string): void {\n if (!entityId) {\n this.rows = this.rows.map(r =>\n r.rowIndex === rowIndex\n ? { ...r, ReferencedTable: '', ReferencedColumn: DEFAULT_PK_COLUMN, selectedEntityId: '', referencedColumnType: undefined }\n : r\n );\n this.emit();\n return;\n }\n const entity = new Metadata().Entities.find(e => UUIDsEqual(e.ID, entityId)); // global-provider-ok: client-side Angular component, single provider\n this.rows = this.rows.map(r => {\n if (r.rowIndex !== rowIndex) return r;\n // Auto-name the source FK column if the user hasn't chosen one — the\n // wizard state service will materialize this as a real UUID column.\n const autoSourceName = !r.ColumnName && entity?.BaseTable\n ? this.defaultFkColumnName(entity.BaseTable)\n : r.ColumnName;\n return {\n ...r,\n ColumnName: autoSourceName,\n ReferencedTable: entity?.BaseTable ?? '',\n ReferencedColumn: DEFAULT_PK_COLUMN,\n selectedEntityId: entityId,\n referencedColumnType: undefined,\n };\n });\n this.emit();\n }\n\n /** \"CustomerOrders\" → \"CustomerOrderID\"; \"People\" → \"PersonID\". Best-effort singularizer. */\n private defaultFkColumnName(tableName: string): string {\n const base = tableName.endsWith('ies')\n ? tableName.slice(0, -3) + 'y'\n : tableName.endsWith('s') && !tableName.endsWith('ss')\n ? tableName.slice(0, -1)\n : tableName;\n return `${base}ID`;\n }\n\n /**\n * Handle target-column selection. Reads the column's SQL type, stores it in row\n * state, then auto-selects the first source column whose (normalised) type matches.\n */\n public OnColumnChange(rowIndex: number, column: string, entityId: string): void {\n const colInfo = this.ColumnsForEntity(entityId).find(c => c.Name === column);\n const targetType = colInfo?.SqlType;\n\n const autoSourceColumn = targetType\n ? this.findMatchingSourceColumn(targetType)\n : undefined;\n\n this.rows = this.rows.map(r => {\n if (r.rowIndex !== rowIndex) return r;\n return {\n ...r,\n ReferencedColumn: column,\n referencedColumnType: targetType,\n // Only update source column if a better match was found\n ColumnName: autoSourceColumn ?? r.ColumnName,\n };\n });\n this.emit();\n }\n\n public OnSourceColumnChange(rowIndex: number, column: string): void {\n this.rows = this.rows.map(r =>\n r.rowIndex === rowIndex ? { ...r, ColumnName: column } : r\n );\n this.emit();\n }\n\n public OnFkTypeChange(rowIndex: number, isSoft: boolean): void {\n this.rows = this.rows.map(r =>\n r.rowIndex === rowIndex ? { ...r, IsSoft: isSoft } : r\n );\n this.emit();\n }\n\n // ─── Add / Delete ──────────────────────────────────────────────────────────\n\n public AddRelationship(): void {\n const schemas = this.AvailableSchemas;\n const defaultSchema = schemas.includes('__mj_UDT') ? '__mj_UDT' : (schemas[0] ?? '');\n\n // Default the new row's source column to the first Step 2 column\n // that isn't already used by another FK row. This honours the\n // \"give the user a sensible default of any type\" intent from\n // f842848683 while avoiding the multi-FK source-column collision\n // bug fixed in 8e52898ec6 — when every existing column is already\n // wired up, we fall through to OnTableChange's auto-naming\n // (mints a unique \"<TargetTable>ID\" once the user picks a table).\n const usedColumns = new Set(this.rows.map(r => r.ColumnName).filter(Boolean));\n const firstFreeColumn = this.AllColumns.find(c => !usedColumns.has(c.Name))?.Name ?? '';\n\n this.rows = [\n ...this.rows,\n {\n ColumnName: firstFreeColumn,\n ReferencedSchema: defaultSchema,\n ReferencedTable: '',\n ReferencedColumn: DEFAULT_PK_COLUMN,\n IsSoft: true,\n rowIndex: this.rows.length,\n selectedEntityId: '',\n },\n ];\n this.emit();\n }\n\n public DeleteRow(index: number): void {\n this.rows = this.rows\n .filter(r => r.rowIndex !== index)\n .map((r, i) => ({ ...r, rowIndex: i }));\n this.emit();\n }\n\n // ─── Restore from InitialForeignKeys (when navigating back) ───────────────\n\n public InitFromForeignKeys(fks: ForeignKeySpec[]): void {\n this.rows = fks.map((fk, index) => this.buildRowState(fk, index));\n this.cdr.markForCheck();\n }\n\n private buildRowState(fk: ForeignKeySpec, index: number): FkRowState {\n const entity = new Metadata().Entities.find( // global-provider-ok: client-side Angular component, single provider\n e => e.SchemaName === fk.ReferencedSchema && e.BaseTable === fk.ReferencedTable\n );\n return { ...fk, rowIndex: index, selectedEntityId: entity?.ID ?? '' };\n }\n\n public TrackByIndex(_: number, row: FkRowState): number { return row.rowIndex; }\n\n // ─── Source-column type matching ───────────────────────────────────────────\n\n /**\n * Find the first Step 2 source column whose SQL type matches `targetSqlType`.\n * Type comparison is case-insensitive and ignores length/precision qualifiers\n * (e.g. `NVARCHAR(255)` normalises to `NVARCHAR`).\n *\n * Returns `undefined` when no match is found so the caller can decide whether\n * to leave the existing selection untouched.\n */\n private findMatchingSourceColumn(targetSqlType: string): string | undefined {\n const normalise = (t: string) => t.toUpperCase().replace(/\\s*\\(.*\\)$/, '').trim();\n const targetNorm = normalise(targetSqlType);\n const match = this.AllColumns.find(c => {\n const colType = c.RawSqlType ?? c.Type ?? '';\n return normalise(colType) === targetNorm;\n });\n return match?.Name;\n }\n\n // ─── Emit ──────────────────────────────────────────────────────────────────\n\n private emit(): void {\n const fks: ForeignKeySpec[] = this.rows.map(row => ({\n ColumnName: row.ColumnName,\n ReferencedSchema: row.ReferencedSchema,\n ReferencedTable: row.ReferencedTable,\n ReferencedColumn: row.ReferencedColumn,\n IsSoft: row.IsSoft,\n }));\n this.ForeignKeysChanged.emit(fks);\n this.cdr.markForCheck();\n }\n}\n","<div class=\"step-relationships\">\n\n <p class=\"step-info\">\n <i class=\"fa-solid fa-circle-info\"></i>\n Optionally define foreign key relationships to other entities.\n Picking a target table auto-creates the UUID source column for you — or you can reuse an existing UUID column via the Source Column dropdown.\n </p>\n\n @if (rows.length > 0) {\n <div class=\"fk-rows\">\n @for (row of rows; track TrackByIndex($index, row)) {\n <div class=\"fk-row\">\n\n <div class=\"fk-row-header\">\n <span class=\"fk-row-label\">Relationship {{ row.rowIndex + 1 }}</span>\n <button type=\"button\" class=\"delete-btn\" title=\"Remove relationship\" (click)=\"DeleteRow(row.rowIndex)\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n\n <div class=\"fk-row-grid\">\n\n <!-- Source Column — any Step 2 column, not just UUID -->\n <div class=\"fk-field\">\n <label class=\"fk-label\">Source Column</label>\n <select class=\"mj-input\"\n [value]=\"row.ColumnName\"\n (change)=\"OnSourceColumnChange(row.rowIndex, $any($event.target).value)\">\n <option value=\"\">— auto-create {{ row.ColumnName || '—' }} —</option>\n @for (col of AllColumns; track col.Name) {\n <option [value]=\"col.Name\">{{ col.Name }}</option>\n }\n </select>\n </div>\n\n <!-- Target Schema -->\n <div class=\"fk-field\">\n <label class=\"fk-label\">Target Schema</label>\n <select class=\"mj-input\"\n [value]=\"row.ReferencedSchema\"\n (change)=\"OnSchemaChange(row.rowIndex, $any($event.target).value)\">\n <option value=\"\">— select schema —</option>\n @for (schema of AvailableSchemas; track schema) {\n <option [value]=\"schema\">{{ schema }}</option>\n }\n </select>\n </div>\n\n <!-- Target Table -->\n <div class=\"fk-field\">\n <label class=\"fk-label\">Target Table</label>\n <select class=\"mj-input\"\n [value]=\"row.selectedEntityId\"\n [disabled]=\"!row.ReferencedSchema\"\n (change)=\"OnTableChange(row.rowIndex, $any($event.target).value)\">\n <option value=\"\">{{ TablePlaceholder(row) }}</option>\n @for (entity of EntitiesForSchema(row.ReferencedSchema); track entity.ID) {\n <option [value]=\"entity.ID\">{{ entity.BaseTable }}</option>\n }\n </select>\n </div>\n\n <!-- Target Column — shows SQL type to help user match source column type -->\n <div class=\"fk-field\">\n <label class=\"fk-label\">Target Column</label>\n <select class=\"mj-input\"\n [value]=\"row.ReferencedColumn\"\n [disabled]=\"!row.selectedEntityId\"\n (change)=\"OnColumnChange(row.rowIndex, $any($event.target).value, row.selectedEntityId)\">\n <option value=\"\">{{ ColumnPlaceholder(row) }}</option>\n @for (col of ColumnsForEntity(row.selectedEntityId); track col.Name) {\n <option [value]=\"col.Name\">{{ col.Name }} ({{ col.SqlType }})</option>\n }\n </select>\n </div>\n\n <!-- FK Type -->\n <div class=\"fk-field\">\n <label class=\"fk-label\">FK Type</label>\n <select class=\"mj-input\"\n [value]=\"row.IsSoft ? 'soft' : 'hard'\"\n (change)=\"OnFkTypeChange(row.rowIndex, $any($event.target).value === 'soft')\">\n <option value=\"soft\">Soft (metadata only)</option>\n <option value=\"hard\">Hard (DB constraint)</option>\n </select>\n </div>\n\n </div>\n </div>\n }\n </div>\n }\n\n <div class=\"add-bar\">\n <button mjButton buttonStyle=\"secondary\" type=\"button\"\n (click)=\"AddRelationship()\">\n <i class=\"fa-solid fa-plus\"></i>\n Add Relationship\n </button>\n </div>\n\n</div>\n"]}
@@ -0,0 +1,12 @@
1
+ import type { EntityTableSpec } from '../../../database-designer.types.js';
2
+ import * as i0 from "@angular/core";
3
+ export declare class StepReviewComponent {
4
+ TableDefinition: Partial<EntityTableSpec>;
5
+ ValidationErrors: string[];
6
+ IsValidating: boolean;
7
+ get AsEntityTableSpec(): EntityTableSpec | null;
8
+ get ERDMermaidBlock(): string | null;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<StepReviewComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<StepReviewComponent, "mj-entity-step-review", never, { "TableDefinition": { "alias": "TableDefinition"; "required": false; }; "ValidationErrors": { "alias": "ValidationErrors"; "required": false; }; "IsValidating": { "alias": "IsValidating"; "required": false; }; }, {}, never, never, false, never>;
11
+ }
12
+ //# sourceMappingURL=step-review.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-review.component.d.ts","sourceRoot":"","sources":["../../../../../src/DatabaseDesigner/components/create-wizard/steps/step-review.component.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;;AAG3E,qBAyCa,mBAAmB;IACZ,eAAe,EAAE,OAAO,CAAC,eAAe,CAAC,CAAM;IAC/C,gBAAgB,EAAE,MAAM,EAAE,CAAM;IAChC,YAAY,UAAS;IAErC,IAAW,iBAAiB,IAAI,eAAe,GAAG,IAAI,CAIrD;IAED,IAAW,eAAe,IAAI,MAAM,GAAG,IAAI,CAM1C;yCAjBQ,mBAAmB;2CAAnB,mBAAmB;CAkB/B"}
@@ -0,0 +1,116 @@
1
+ /**
2
+ * @module step-review.component
3
+ * @description Step 4 wrapper — hosts EntityReviewPanelComponent.
4
+ * Also renders server-side validation errors returned from ValidateSchema().
5
+ */
6
+ import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
7
+ import { generateERDFromTableSpec } from '../../../database-designer-erd.js';
8
+ import * as i0 from "@angular/core";
9
+ import * as i1 from "@memberjunction/ng-markdown";
10
+ import * as i2 from "../../shared/entity-review-panel.component";
11
+ function StepReviewComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
12
+ i0.ɵɵelementStart(0, "div", 1);
13
+ i0.ɵɵelement(1, "i", 7);
14
+ i0.ɵɵtext(2, " Validating schema\u2026 ");
15
+ i0.ɵɵelementEnd();
16
+ } }
17
+ function StepReviewComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
18
+ i0.ɵɵelementStart(0, "div", 2);
19
+ i0.ɵɵelement(1, "i", 8);
20
+ i0.ɵɵtext(2, " Schema validated \u2014 review the definition below, then click ");
21
+ i0.ɵɵelementStart(3, "strong");
22
+ i0.ɵɵtext(4, "Create Entity");
23
+ i0.ɵɵelementEnd();
24
+ i0.ɵɵtext(5, " to build it. ");
25
+ i0.ɵɵelementEnd();
26
+ } }
27
+ function StepReviewComponent_Conditional_3_For_2_Template(rf, ctx) { if (rf & 1) {
28
+ i0.ɵɵelementStart(0, "div", 9);
29
+ i0.ɵɵelement(1, "i", 10);
30
+ i0.ɵɵtext(2);
31
+ i0.ɵɵelementEnd();
32
+ } if (rf & 2) {
33
+ const err_r1 = ctx.$implicit;
34
+ i0.ɵɵadvance(2);
35
+ i0.ɵɵtextInterpolate1(" ", err_r1, " ");
36
+ } }
37
+ function StepReviewComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
38
+ i0.ɵɵelementStart(0, "div", 3);
39
+ i0.ɵɵrepeaterCreate(1, StepReviewComponent_Conditional_3_For_2_Template, 3, 1, "div", 9, i0.ɵɵrepeaterTrackByIndex);
40
+ i0.ɵɵelementEnd();
41
+ } if (rf & 2) {
42
+ const ctx_r1 = i0.ɵɵnextContext();
43
+ i0.ɵɵadvance();
44
+ i0.ɵɵrepeater(ctx_r1.ValidationErrors);
45
+ } }
46
+ function StepReviewComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
47
+ i0.ɵɵelementStart(0, "p", 4);
48
+ i0.ɵɵtext(1);
49
+ i0.ɵɵelementEnd();
50
+ } if (rf & 2) {
51
+ const ctx_r1 = i0.ɵɵnextContext();
52
+ i0.ɵɵadvance();
53
+ i0.ɵɵtextInterpolate(ctx_r1.TableDefinition.Description);
54
+ } }
55
+ function StepReviewComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
56
+ i0.ɵɵelementStart(0, "div", 6);
57
+ i0.ɵɵelement(1, "mj-markdown", 11);
58
+ i0.ɵɵelementEnd();
59
+ } if (rf & 2) {
60
+ const ctx_r1 = i0.ɵɵnextContext();
61
+ i0.ɵɵadvance();
62
+ i0.ɵɵproperty("data", ctx_r1.ERDMermaidBlock);
63
+ } }
64
+ export class StepReviewComponent {
65
+ TableDefinition = {};
66
+ ValidationErrors = [];
67
+ IsValidating = false;
68
+ get AsEntityTableSpec() {
69
+ const td = this.TableDefinition;
70
+ if (!td.EntityName || !td.TableName || !td.SchemaName)
71
+ return null;
72
+ return td;
73
+ }
74
+ get ERDMermaidBlock() {
75
+ const spec = this.AsEntityTableSpec;
76
+ if (!spec)
77
+ return null;
78
+ const erd = generateERDFromTableSpec([spec]);
79
+ if (!erd)
80
+ return null;
81
+ return `\`\`\`mermaid\n${erd}\n\`\`\``;
82
+ }
83
+ static ɵfac = function StepReviewComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || StepReviewComponent)(); };
84
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: StepReviewComponent, selectors: [["mj-entity-step-review"]], inputs: { TableDefinition: "TableDefinition", ValidationErrors: "ValidationErrors", IsValidating: "IsValidating" }, standalone: false, decls: 7, vars: 5, consts: [[1, "step-review"], [1, "step-banner", "step-banner-validating"], [1, "step-banner", "step-banner-success"], [1, "step-banner", "step-banner-error"], [1, "entity-description"], ["ModificationType", "create", 3, "TableDefinition"], [1, "erd-container"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-circle-check"], [1, "banner-err-item"], [1, "fa-solid", "fa-triangle-exclamation"], [3, "data"]], template: function StepReviewComponent_Template(rf, ctx) { if (rf & 1) {
85
+ i0.ɵɵelementStart(0, "div", 0);
86
+ i0.ɵɵconditionalCreate(1, StepReviewComponent_Conditional_1_Template, 3, 0, "div", 1)(2, StepReviewComponent_Conditional_2_Template, 6, 0, "div", 2);
87
+ i0.ɵɵconditionalCreate(3, StepReviewComponent_Conditional_3_Template, 3, 0, "div", 3);
88
+ i0.ɵɵconditionalCreate(4, StepReviewComponent_Conditional_4_Template, 2, 1, "p", 4);
89
+ i0.ɵɵelement(5, "mj-database-review-panel", 5);
90
+ i0.ɵɵconditionalCreate(6, StepReviewComponent_Conditional_6_Template, 2, 1, "div", 6);
91
+ i0.ɵɵelementEnd();
92
+ } if (rf & 2) {
93
+ i0.ɵɵadvance();
94
+ i0.ɵɵconditional(ctx.IsValidating ? 1 : ctx.ValidationErrors.length === 0 && ctx.AsEntityTableSpec ? 2 : -1);
95
+ i0.ɵɵadvance(2);
96
+ i0.ɵɵconditional(ctx.ValidationErrors.length > 0 ? 3 : -1);
97
+ i0.ɵɵadvance();
98
+ i0.ɵɵconditional(ctx.TableDefinition.Description ? 4 : -1);
99
+ i0.ɵɵadvance();
100
+ i0.ɵɵproperty("TableDefinition", ctx.AsEntityTableSpec);
101
+ i0.ɵɵadvance();
102
+ i0.ɵɵconditional(ctx.ERDMermaidBlock ? 6 : -1);
103
+ } }, dependencies: [i1.MarkdownComponent, i2.EntityReviewPanelComponent], styles: [".step-banner[_ngcontent-%COMP%] {\n display: flex; flex-direction: column; gap: 6px;\n padding: 12px 16px;\n font-size: 0.875rem;\n border-bottom: 1px solid var(--mj-border-subtle);\n }\n .step-banner-validating[_ngcontent-%COMP%] {\n flex-direction: row; align-items: center; gap: 10px;\n color: var(--mj-text-secondary);\n }\n .step-banner-success[_ngcontent-%COMP%] {\n flex-direction: row; align-items: center; gap: 10px;\n color: var(--mj-status-success-text);\n background: var(--mj-status-success-bg);\n border-color: var(--mj-status-success-border);\n }\n .step-banner-error[_ngcontent-%COMP%] {\n background: var(--mj-status-error-bg);\n border-color: var(--mj-status-error-border);\n }\n .banner-err-item[_ngcontent-%COMP%] {\n display: flex; align-items: flex-start; gap: 8px;\n color: var(--mj-status-error-text);\n }\n .entity-description[_ngcontent-%COMP%] {\n margin: 12px 16px 0;\n font-size: 0.875rem;\n color: var(--mj-text-secondary);\n line-height: 1.5;\n }\n .erd-container[_ngcontent-%COMP%] {\n padding: 0 16px 12px;\n }"], changeDetection: 0 });
104
+ }
105
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(StepReviewComponent, [{
106
+ type: Component,
107
+ args: [{ standalone: false, selector: 'mj-entity-step-review', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"step-review\">\n\n @if (IsValidating) {\n <div class=\"step-banner step-banner-validating\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Validating schema\u2026\n </div>\n } @else if (ValidationErrors.length === 0 && AsEntityTableSpec) {\n <div class=\"step-banner step-banner-success\">\n <i class=\"fa-solid fa-circle-check\"></i>\n Schema validated \u2014 review the definition below, then click <strong>Create Entity</strong> to build it.\n </div>\n }\n\n @if (ValidationErrors.length > 0) {\n <div class=\"step-banner step-banner-error\">\n @for (err of ValidationErrors; track $index) {\n <div class=\"banner-err-item\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n {{ err }}\n </div>\n }\n </div>\n }\n\n @if (TableDefinition.Description) {\n <p class=\"entity-description\">{{ TableDefinition.Description }}</p>\n }\n\n <mj-database-review-panel\n [TableDefinition]=\"AsEntityTableSpec\"\n ModificationType=\"create\">\n </mj-database-review-panel>\n\n @if (ERDMermaidBlock) {\n <div class=\"erd-container\">\n <mj-markdown [data]=\"ERDMermaidBlock\"></mj-markdown>\n </div>\n }\n\n</div>\n", styles: ["\n .step-banner {\n display: flex; flex-direction: column; gap: 6px;\n padding: 12px 16px;\n font-size: 0.875rem;\n border-bottom: 1px solid var(--mj-border-subtle);\n }\n .step-banner-validating {\n flex-direction: row; align-items: center; gap: 10px;\n color: var(--mj-text-secondary);\n }\n .step-banner-success {\n flex-direction: row; align-items: center; gap: 10px;\n color: var(--mj-status-success-text);\n background: var(--mj-status-success-bg);\n border-color: var(--mj-status-success-border);\n }\n .step-banner-error {\n background: var(--mj-status-error-bg);\n border-color: var(--mj-status-error-border);\n }\n .banner-err-item {\n display: flex; align-items: flex-start; gap: 8px;\n color: var(--mj-status-error-text);\n }\n .entity-description {\n margin: 12px 16px 0;\n font-size: 0.875rem;\n color: var(--mj-text-secondary);\n line-height: 1.5;\n }\n .erd-container {\n padding: 0 16px 12px;\n }\n "] }]
108
+ }], null, { TableDefinition: [{
109
+ type: Input
110
+ }], ValidationErrors: [{
111
+ type: Input
112
+ }], IsValidating: [{
113
+ type: Input
114
+ }] }); })();
115
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(StepReviewComponent, { className: "StepReviewComponent", filePath: "src/DatabaseDesigner/components/create-wizard/steps/step-review.component.ts", lineNumber: 52 }); })();
116
+ //# sourceMappingURL=step-review.component.js.map